diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/EULA.rtf b/windows_libs/Microsoft Visual C++ Toolkit 2003/EULA.rtf new file mode 100644 index 00000000..46c764b4 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/EULA.rtf @@ -0,0 +1,237 @@ +{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;} +{\f35\fswiss\fcharset0\fprq2{\*\panose 020b0604030504040204}Tahoma;}{\f36\froman\fcharset0\fprq2{\*\panose 02040602050305030304}Book Antiqua;}{\f37\fnil\fcharset0\fprq2{\*\panose 00000000000000000000}Microsoft Logo;} +{\f38\fswiss\fcharset0\fprq2{\*\panose 020b0706030402020204}Franklin Gothic Demi Cond;}{\f39\fswiss\fcharset0\fprq2{\*\panose 020b0503020102020204}Franklin Gothic Book{\*\falt Franklin Gothic Medium};}{\f64\froman\fcharset238\fprq2 Times New Roman CE;} +{\f65\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f67\froman\fcharset161\fprq2 Times New Roman Greek;}{\f68\froman\fcharset162\fprq2 Times New Roman Tur;}{\f69\froman\fcharset177\fprq2 Times New Roman (Hebrew);} +{\f70\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f71\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f72\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}{\f74\fswiss\fcharset238\fprq2 Arial CE;} +{\f75\fswiss\fcharset204\fprq2 Arial Cyr;}{\f77\fswiss\fcharset161\fprq2 Arial Greek;}{\f78\fswiss\fcharset162\fprq2 Arial Tur;}{\f79\fswiss\fcharset177\fprq2 Arial (Hebrew);}{\f80\fswiss\fcharset178\fprq2 Arial (Arabic);} +{\f81\fswiss\fcharset186\fprq2 Arial Baltic;}{\f82\fswiss\fcharset163\fprq2 Arial (Vietnamese);}{\f414\fswiss\fcharset238\fprq2 Tahoma CE;}{\f415\fswiss\fcharset204\fprq2 Tahoma Cyr;}{\f417\fswiss\fcharset161\fprq2 Tahoma Greek;} +{\f418\fswiss\fcharset162\fprq2 Tahoma Tur;}{\f419\fswiss\fcharset177\fprq2 Tahoma (Hebrew);}{\f420\fswiss\fcharset178\fprq2 Tahoma (Arabic);}{\f421\fswiss\fcharset186\fprq2 Tahoma Baltic;}{\f422\fswiss\fcharset163\fprq2 Tahoma (Vietnamese);} +{\f423\fswiss\fcharset222\fprq2 Tahoma (Thai);}{\f424\froman\fcharset238\fprq2 Book Antiqua CE;}{\f425\froman\fcharset204\fprq2 Book Antiqua Cyr;}{\f427\froman\fcharset161\fprq2 Book Antiqua Greek;}{\f428\froman\fcharset162\fprq2 Book Antiqua Tur;} +{\f431\froman\fcharset186\fprq2 Book Antiqua Baltic;}{\f444\fswiss\fcharset238\fprq2 Franklin Gothic Demi Cond CE;}{\f445\fswiss\fcharset204\fprq2 Franklin Gothic Demi Cond Cyr;}{\f447\fswiss\fcharset161\fprq2 Franklin Gothic Demi Cond Greek;} +{\f448\fswiss\fcharset162\fprq2 Franklin Gothic Demi Cond Tur;}{\f451\fswiss\fcharset186\fprq2 Franklin Gothic Demi Cond Baltic;}{\f454\fswiss\fcharset238\fprq2 Franklin Gothic Book CE{\*\falt Franklin Gothic Medium};} +{\f455\fswiss\fcharset204\fprq2 Franklin Gothic Book Cyr{\*\falt Franklin Gothic Medium};}{\f457\fswiss\fcharset161\fprq2 Franklin Gothic Book Greek{\*\falt Franklin Gothic Medium};} +{\f458\fswiss\fcharset162\fprq2 Franklin Gothic Book Tur{\*\falt Franklin Gothic Medium};}{\f461\fswiss\fcharset186\fprq2 Franklin Gothic Book Baltic{\*\falt Franklin Gothic Medium};}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255; +\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0; +\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive +\ssemihidden Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}{\s15\ql \fi-274\li274\ri0\sb120\sl-460\slmult0 +\nowidctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin274\itap0 \f38\fs44\lang1033\langfe1033\kerning42\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext15 1. Section Head;}{\s16\ql \li0\ri0\sb120\sl-200\slmult0\widctlpar\brdrt\brdrs\brdrw15 +\tx576\tx1152\tx1728\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \caps\f38\fs16\lang1033\langfe1033\kerning16\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext16 4. LA Para Head;}{\s17\ql \li0\ri-18\sb120\sl-240\slmult0\widctlpar +\tx576\tx1152\tx1728\aspalpha\aspnum\faauto\adjustright\rin-18\lin0\itap0 \f38\fs22\lang1033\langfe1033\kerning22\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext17 2. LA Subhead;}{\s18\ql \li0\ri0\sb60\sl-180\slmult0 +\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f39\fs16\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext18 3. LA Body;}{\s19\ql \fi-187\li187\ri0\sb60\sl-180\slmult0 +\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin187\itap0 \f39\fs16\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon18 \snext19 3c. Numbered;}{\s20\ql \fi-340\li624\ri0\sb60\sl-160\slmult0 +\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin624\itap0 \f39\fs14\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon18 \snext20 3i. Numbered 2nd level;}{\s21\ql \fi-510\li1134\ri0\sb40\sl-180\slmult0 +\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin1134\itap0 \f39\fs16\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon18 \snext21 3k. Numbered-Sub 3rd level;}{\s22\ql \fi-567\li1701\ri0\sb40\sl-180\slmult0 +\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin1701\itap0 \f39\fs16\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon21 \snext22 3m. Numbered 4th level;}{\s23\ql \li0\ri0\sb240\sl-240\slmult0\widctlpar +\tx576\tx1152\tx1728\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f38\fs22\lang1033\langfe1033\kerning22\cgrid\langnp1033\langfenp1033 \sbasedon17 \snext23 2a. French Subhead;}{\s24\ql \li0\ri0\sl-180\slmult0\widctlpar +\tqc\tx4320\tqr\tx8640\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f39\fs16\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext24 footer;}{\s25\ql \li0\ri0\sl-320\slmult0\widctlpar +\tx360\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f39\fs12\cf5\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext25 6. Part No.;}{\*\cs26 \additive \sbasedon10 page number;}{\*\cs27 \additive \fs16 \sbasedon10 \ssemihidden +annotation reference;}{\s28\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext28 \ssemihidden annotation text;}{\s29\ql \li0\ri0\widctlpar +\tqc\tx4320\tqr\tx8640\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext29 header;}{\s30\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 +\f35\fs16\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext30 \ssemihidden Balloon Text;}{\*\cs31 \additive \ul\cf2 \sbasedon10 Hyperlink;}{\s32\ql \fi-274\li274\ri0\sb120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin274\itap0 +\f36\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \sbasedon0 \snext32 \slink33 Body 1;}{\*\cs33 \additive \f36\lang1033\langfe1033\langnp1033\langfenp1033 \sbasedon10 \slink32 Body 1 Char;}}{\*\rsidtbl \rsid14224422} +{\*\generator Microsoft Word 10.0.4524;}{\info{\title END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE}{\creatim\yr2004\mo4\dy7\hr8\min43}{\revtim\yr2004\mo4\dy7\hr8\min43}{\printim\yr2004\mo3\dy17\hr12\min30}{\version2}{\edmins1}{\nofpages6} +{\nofwords2790}{\nofchars15906}{\nofcharsws18659}{\vern16475}}\margl1440\margr1440 \widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\formshade\horzdoc\dgmargin\dghspace100\dgvspace136\dghorigin1440\dgvorigin1440\dghshow2 +\dgvshow2\jexpand\viewkind1\viewscale100\pgbrdrhead\pgbrdrfoot\splytwnine\ftnlytwnine\htmautsp\nolnhtadjtbl\useltbaln\alntblind\lytcalctblwd\lyttblrtgr\lnbrkrule\rempersonalinfo\rsidroot14224422 \fet0{\*\ftnsep \pard\plain +\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid14224422 \chftnsep +\par }}{\*\ftnsepc \pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid14224422 \chftnsepc +\par }}{\*\aftnsep \pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid14224422 \chftnsep +\par }}{\*\aftnsepc \pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid14224422 \chftnsepc +\par }}\sectd \psz1\sbknone\linex0\headery0\sectdefaultcl\sftnbj {\header \pard\plain \s29\ql \li0\ri0\widctlpar\tqc\tx4320\tqr\tx8640\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid14224422 + +\par }}{\footer \pard\plain \s24\ql \li0\ri0\sl-180\slmult0\widctlpar\tqc\tx4320\tqr\tx8640\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f39\fs16\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\insrsid14224422 +\par }}{\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}} +{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl8 +\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \s15\ql \li0\ri0\sa60\nowidctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 +\f38\fs44\lang1033\langfe1033\kerning42\cgrid\langnp1033\langfenp1033 {\b\f36\fs28\insrsid14224422\charrsid9510088 END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE +\par }{\b\f36\fs22\insrsid14224422 +\par }{\b\f36\fs24\insrsid14224422 MICROSOFT VISUAL C++ TOOLKIT 2003 +\par }{\b\f36\fs22\kerning44\insrsid14224422 +\par }\pard\plain \s17\ql \li0\ri-17\sa60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin-17\lin0\itap0 \f38\fs22\lang1033\langfe1033\kerning22\cgrid\langnp1033\langfenp1033 {\b\f36\insrsid14224422 IMPORTANT\emdash READ CAREFULLY: }{\f36\insrsid14224422 +This End-User License Agreement (\'93EULA\'94) is a legal agreement between you (either an individual or a single entity) and Microsoft Corporation (\'93Microsoft\'94 +) for the Microsoft software that accompanies this EULA, which includes computer software and may include associated media, printed materials including best practices, white papers, templates, \'93online\'94 or electronic documentation, and Internet-ba +sed services (\'93Software\'94). An amendment or addendum to this EULA may accompany the Software. }{\b\f36\insrsid14224422 +YOU AGREE TO BE BOUND BY THE TERMS OF THIS EULA BY INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE. IF YOU DO NOT AGREE, DO NOT INSTALL, COPY, OR USE THE SOFTWARE. +\par +\par +\par }\pard\plain \s16\ql \li0\ri0\sa60\widctlpar\brdrt\brdrs\brdrw15 \aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \caps\f38\fs16\lang1033\langfe1033\kerning16\cgrid\langnp1033\langfenp1033 {\b\f36\fs22\insrsid14224422 +\par MICROSOFT Software LICENSE +\par }\pard\plain \ql \li0\ri0\sa144\widctlpar\faauto\rin0\lin0\itap0\lisa60 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f36\fs22\insrsid14224422 1.\tab }{\b\f36\fs22\insrsid14224422 GRANTS OF LICENSE}{\f36\fs22\insrsid14224422 +. Microsoft grants you the rights described in this EULA provided that you comply with all terms and conditions of this EULA. }{\insrsid14224422 +\par }\pard\plain \s20\ql \fi720\li0\ri0\sa144\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\lisa60 \f39\fs14\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f36\fs22\insrsid14224422\charrsid3747970 1.1\tab }{ +\b\i\f36\fs22\insrsid14224422\charrsid3747970 General License Grant}{\f36\fs22\insrsid14224422\charrsid3747970 . Microsoft grants to you as an individual, a personal, nonexclusive license to make and use copies of the Software }{\f36\fs22\insrsid14224422 +(i) }{\f36\fs22\insrsid14224422\charrsid3747970 for your internal use}{\f36\fs22\insrsid14224422 ; (ii) for designing, developing, testing and demonstrating your software product(s); }{\f36\fs22\insrsid14224422\charrsid3747970 and }{ +\f36\fs22\insrsid14224422 (iii) for }{\f36\fs22\insrsid14224422\charrsid3747970 evaluation}{\f36\fs22\insrsid14224422 of the Software}{\f36\fs22\insrsid14224422\charrsid3747970 .}{\f36\fs22\insrsid14224422 +\par }\pard \s20\ql \fi720\li0\ri0\sa60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\f36\fs22\insrsid14224422 1.2\tab }{\b\i\f36\fs22\insrsid14224422 Documentation}{\f36\fs22\insrsid14224422 .}{\b\f36\fs22\insrsid14224422 }{ +\f36\fs22\insrsid14224422 You may }{\f36\fs22\insrsid14224422 ma +ke and use an unlimited number of copies of any documentation, provided that such copies shall be used only for personal internal purposes and are not to be republished or distributed (either in hard copy or electronic form) beyond your premises }{ +\f36\fs22\insrsid14224422\charrsid10697201 except as otherwise specifically provided herein.}{\f36\fs22\insrsid14224422 +\par }\pard\plain \s19\ql \li0\ri0\sa60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f39\fs16\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f36\fs22\insrsid14224422 2.\tab ADDITIONAL LICENSE RIGHTS -- REDISTRIBUTABLES}{ +\f36\fs22\insrsid14224422 . In addition to the rights granted in Section 1, certain portions of the Software, as described in this Section\~2, are provided to you with additional license rights. + These additional license rights are conditioned upon your compliance with the distribution requirements and license restrictions described in Section 3.}{\i\f36\fs22\insrsid14224422 +\par }\pard\plain \s20\ql \fi720\li0\ri0\sa60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f39\fs14\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f36\fs22\insrsid14224422 2.1\tab }{\b\i\f36\fs22\insrsid14224422 Sample Code.}{ +\f36\fs22\insrsid14224422 Microsoft grants you the right to use and modify the source code version of those portions of the Software identified as \'93Samples\'94 in REDIST.TXT or elsewhere in the Software (\'93Sample Code\'94 +) for the sole purposes of designing, developing, and testing your software product(s), and to reproduce and distribute the Sample Code along with any modifications thereof, in }{\f36\fs22\insrsid14224422\charrsid10697201 object and/or source code form}{ +\f36\fs22\insrsid14224422 . For applicable redistribution requirements for Sample Code, see Section\~3.1 below. +\par 2.2\tab }{\b\i\f36\fs22\insrsid14224422 Redistributable Code\emdash General}{\f36\fs22\insrsid14224422 . Microsoft grants you a nonexclusive, royalty-free right to reproduce and dist +ribute the object code form of any portion of the Software listed in REDIST.TXT (\'93Redistributable Code\'94). For general redistribution requirements for Redistributable Code, see Section\~3.1, below. }{\insrsid14224422 +\par }{\f36\fs22\insrsid14224422 +\par }{\insrsid14224422 +\par }\pard\plain \s19\ql \li0\ri0\sa60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f39\fs16\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f36\fs22\insrsid14224422 3.\tab }{\b\f36\fs22\insrsid14224422 +LICENSE RESTRICTIONS -- DISTRIBUTION REQUIREMENTS.}{\f36\fs22\insrsid14224422 If you choose to exercise your rights under Section\~2, any redistribution by you is subject to your compliance with the following terms. +\par }\pard\plain \ql \fi720\li0\ri0\sb100\sa100\widctlpar\faauto\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f36\fs22\insrsid14224422 3.1\tab If you are authorized and choose to redistribute Sample Code }{ +\f36\fs22\insrsid14224422\charrsid10697201 or Redistributable Code (collectively, the \'93Redistributables\'94) as described in Section 2, you agr}{\f36\fs22\insrsid14224422 ee: }{\b\f36\fs22\insrsid14224422 (i)}{\f36\fs22\insrsid14224422 + except as otherwise noted in Section 2.1 (Sample Code) }{\f36\fs22\insrsid14224422\charrsid10697201 to distribute the Redistributables only }{\f36\fs22\insrsid14224422 +in object code form and in conjunction with and as a part of a software application product developed by you that adds significant and primary functionality to the Redistributables (\'93Licensee Software\'94); }{\b\f36\fs22\insrsid14224422 (ii)}{ +\f36\fs22\insrsid14224422 \~that the Redistributables only operate in conjunction with Microsoft Windows platforms; }{\b\f36\fs22\insrsid14224422 (iii)}{\f36\fs22\insrsid14224422 }{\f36\fs22\insrsid14224422\charrsid8725318 to}{ +\b\f36\fs22\insrsid14224422\charrsid8725318 }{\f36\fs22\insrsid14224422 distribute the Licensee}{\f36\fs22\insrsid14224422\charrsid8725318 }{\f36\fs22\insrsid14224422 Software}{\f36\fs22\insrsid14224422\charrsid8725318 containing the Redistrib +utables pursuant to an end user license agreement (which may be \'93break-the-seal\'94, \'93click-wrap\'94 or signed), with terms no less protective than those contained }{\f36\fs22\insrsid14224422 in this EULA}{\f36\fs20\insrsid14224422\charrsid13910098 +;}{\f36\fs20\insrsid14224422 (}{\b\f36\fs20\insrsid14224422\charrsid8725318 iv}{\f36\fs20\insrsid14224422 )\~}{\f36\fs22\insrsid14224422 not to use Microsoft\rquote s name, logo, or trademarks to market the Licensee Software; }{ +\b\f36\fs22\insrsid14224422 (v)}{\f36\fs22\insrsid14224422 }{\f36\fs22\insrsid14224422 to display your }{\f36\fs22\insrsid14224422\charrsid8725318 own valid }{\f36\fs22\insrsid14224422 copyright notice }{\f36\fs22\insrsid14224422\charrsid8725318 +which shall be}{\f36\fs22\cf6\insrsid14224422 }{\f36\fs22\insrsid14224422 sufficient to protect Microsoft\rquote s copyright in the Software; }{\b\f36\fs22\insrsid14224422 (vi)}{\f36\fs22\insrsid14224422 \~ +not to remove or obscure any copyright, trademark or patent notices that appear on the Software as delivered to you; }{\b\f36\fs22\insrsid14224422 (vii)}{\f36\fs22\insrsid14224422 to + indemnify, hold harmless, and defend Microsoft from and against any claims or lawsuits, including attorney\rquote s fees, that arise or result from the use or distribution of the Licensee Software; }{\b\f36\fs22\insrsid14224422 (viii)}{ +\f36\fs22\insrsid14224422 otherwise comply with the terms of this EULA; and }{\b\f36\fs22\insrsid14224422 (ix)\~}{\f36\fs22\insrsid14224422 agree that Microsoft reserves all rights not expressly granted. }{ +\b\i\f36\fs22\insrsid14224422\charrsid16543122 +\par }\pard \ql \fi1440\li0\ri0\sb100\sa100\widctlpar\faauto\rin0\lin0\itap0 {\f36\fs22\insrsid14224422 You also agree not to permit further distribution of the Redistributables by your end users }{\i\f36\fs22\insrsid14224422 except}{\f36\fs22\insrsid14224422 + you may permit further redistribution of the Redistributables by your distributors to your e +nd-user customers if your distributors only distribute the Redistributables in conjunction with, and as part of, the Licensee Software and you and your distributors comply with all other terms of this EULA. +\par }\pard\plain \s32\ql \fi630\li90\ri0\sb120\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin90\itap0 \f36\fs20\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\fs22\insrsid14224422 3.2\tab If you use the Redistributables, then in add +ition to your compliance with the applicable distribution requirements described for the Redistributables, the following also applies}{\fs22\insrsid14224422\charrsid6578484 . Your license rights to the Redistributable}{\fs22\insrsid14224422 s}{ +\fs22\insrsid14224422\charrsid6578484 are conditioned upon your not (a) creating derivative works of the Redistributable}{\fs22\insrsid14224422 s}{\fs22\insrsid14224422\charrsid6578484 in any manner that would cause the Redistributable}{ +\fs22\insrsid14224422 s}{\fs22\insrsid14224422\charrsid6578484 in whole or in part to become subject to any of the terms of an Excluded License; and (b) distributing the Redistributable}{\fs22\insrsid14224422 s}{\fs22\insrsid14224422\charrsid6578484 + (or derivative works thereof) in any manner that would cause the Redistributable}{\fs22\insrsid14224422 s}{\fs22\insrsid14224422\charrsid6578484 to become subject to any of the terms of an Excluded License. An \'93Excluded License\'94 + is any license which requires as a condition of use, modification and/or distribution of software subject to the Excluded License, that such software or other +software combined and/or distributed with such software (x) be disclosed or distributed in source code form; (y) be licensed for the purpose of making derivative works; or (z) be redistributable at no charge}{\b\fs22\cf1\insrsid14224422\charrsid6578484 .} +{\fs22\cf1\insrsid14224422\charrsid6578484 +\par }\pard\plain \s19\ql \li0\ri0\sa60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f39\fs16\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f36\fs22\insrsid14224422 4.\tab }{\b\f36\fs22\insrsid14224422 +RESERVATION OF RIGHTS AND OWNERSHIP. }{\f36\fs22\insrsid14224422 Micros +oft reserves all rights not expressly granted to you in this EULA. The Software is protected by copyright and other intellectual property laws and treaties. Microsoft or its suppliers own the title, copyright, and other intellectual property rights in th +e Software. }{\b\f36\fs22\insrsid14224422 The Software is licensed, not sold.}{\f36\fs22\insrsid14224422 +\par }\pard\plain \s20\ql \li0\ri0\sa60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f39\fs14\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f36\fs22\insrsid14224422 5.\tab }{\b\f36\fs22\insrsid14224422 +LIMITATIONS ON REVERSE ENGINEERING, DECOMPILATION, AND DISASSEMBLY}{\b\i\f36\fs22\insrsid14224422 .}{\f36\fs22\insrsid14224422 + You may not reverse engineer, decompile, or disassemble the Software, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation. +\par }\pard\plain \s19\ql \li0\ri0\sl220\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f39\fs16\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f36\fs22\insrsid14224422 6.}{\f36\fs22\cf6\insrsid14224422 \tab }{ +\b\f36\fs22\insrsid14224422 NO }{\b\f36\fs22\insrsid14224422 RENTAL/COMMERCIAL HOSTING.}{\b\i\f36\fs22\insrsid14224422 }{\f36\fs22\insrsid14224422 You may not rent, lease, lend, or provide commercial hosting services with the Software. +\par }\pard\plain \s20\ql \li0\ri0\sa60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f39\fs14\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f36\fs22\insrsid14224422 7.\tab }{\b\f36\fs22\insrsid14224422 CONSENT TO USE OF DATA.}{ +\b\f36\fs22\insrsid14224422 }{\f36\fs22\insrsid14224422 You agree that Microsoft and its affiliates may c +ollect and use technical information gathered as part of the product support services provided to you, if any, related to the Software. Microsoft may use this information solely to improve our products or to provide customized services or technologies to + you and will not disclose this information in a form that personally identifies you. }{\f36\fs22\insrsid14224422 +\par }\pard\plain \s19\ql \li0\ri0\sb60\sl220\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f39\fs16\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f36\fs22\insrsid14224422 8.\tab }{\b\f36\fs22\insrsid14224422 +LINKS TO THIRD PARTY SITES. }{\f36\fs22\insrsid14224422 You may link to third party sites through the use of the Software. The third party sites are not under the control of Microsoft, and Mi +crosoft is not responsible for the contents of any third party sites, any links contained in third party sites, or any changes or updates to third party sites. Microsoft is not responsible for webcasting or any other form of transmission received from an +y third party sites. Microsoft is providing these links to third party sites to you only as a convenience, and the inclusion of any link does not imply an endorsement by Microsoft of the third party site. +\par }\pard\plain \s20\ql \li0\ri0\sa60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f39\fs14\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f36\fs22\insrsid14224422 9.\tab }{\b\f36\fs22\insrsid14224422 ADDITIONAL SOFTWARE/SERVICES. +}{\f36\fs22\insrsid14224422 This EULA applies + to updates, supplements, add-on components, or Internet-based services components, of the Software that Microsoft may provide to you or make available to you after the date you obtain your initial copy of the Software, unless we provide other terms along + with the update, supplement, add-on component, or Internet-based services component. Microsoft reserves the right to discontinue any Internet-based services provided to you or made available to you through the use of the Software. }{ +\f36\fs22\insrsid14224422 +\par }\pard\plain \s19\ql \li0\ri0\sb120\sl220\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f39\fs16\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f36\fs22\insrsid14224422 10.\tab }{\b\f36\fs22\insrsid14224422 EXPORT RESTRICTIONS +}{\f36\fs22\insrsid14224422 . }{\f36\fs22\cgrid0\insrsid14224422 +You acknowledge that the Software is subject to U.S. export jurisdiction. You agree to comply with all applicable international and national laws that apply to the Software, including the U.S. Export Administration Regulations, as well as end-user, en +d-use, and destination restrictions issued by U.S. and other governments. For additional information, see }{\f36\fs22\ul\cgrid0\insrsid14224422 }{\f36\fs22\cgrid0\insrsid14224422 . +\par }\pard\plain \s20\ql \li0\ri0\sa60\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f39\fs14\cf1\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f36\fs22\insrsid14224422 11.\tab }{\b\f36\fs22\insrsid14224422 SOFTWARE TRANSFER. }{ +\f36\fs22\insrsid14224422 The initial user of the Software may make a one-time permanent transfer of this EULA +and Software to another end user, provided the initial user retains no copies of the Software. This transfer must include all of the Software (including all component parts, the media and printed materials, any upgrades to this EULA, and, if applicable, +the Certificate of Authenticity). The transfer may not be an indirect transfer, such as a consignment. Prior to the transfer, the end user receiving the Software must agree to all the EULA terms. +\par 12.\tab }{\b\f36\fs22\insrsid14224422 TERMINATION.}{\f36\fs22\insrsid14224422 Without prejudice to any other rights, Mi +crosoft may terminate this EULA if you fail to comply with the terms and conditions of this EULA. In such event, you must destroy all copies of the Software and all of its component parts. +\par }\pard\plain \s19\ql \li0\ri0\sb60\sl220\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f39\fs16\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f36\fs22\insrsid14224422 13.\tab }{\b\f36\fs22\ul\insrsid14224422\charrsid16006145 +DISCLAIMER OF WARRANTIES}{\b\f36\fs22\insrsid14224422 . TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND ITS SUPPLIERS PROVIDE THE }{\b\f36\fs22\insrsid14224422 SOFTWARE}{\f36\fs22\insrsid14224422 }{\b\f36\fs22\insrsid14224422 +AND SUPPORT SERVICES (IF ANY) }{\b\i\f36\fs22\insrsid14224422 AS IS AND WITH ALL FAULTS}{\b\f36\fs22\insrsid14224422 , AND HEREBY DISCLAIM ALL OTHER WARRANTIES AND CONDITIONS, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY (IF +ANY) IMPLIED WARRANTIES, DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF RELIABILITY OR AVAILABILITY, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGEN +CE, ALL WITH REGARD TO THE }{\b\f36\fs22\insrsid14224422 SOFTWARE}{\b\f36\fs22\insrsid14224422 +, AND THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT OR OTHER SERVICES, INFORMATION, SOFTWARE, AND RELATED CONTENT THROUGH THE SOFTWARE OR OTHERWISE ARISING OUT OF THE USE OF THE SOFTWARE. ALSO, THERE IS NO WARRANTY OR CO +NDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT WITH REGARD TO THE SOFTWARE. +\par }{\f36\fs22\insrsid14224422 14.}{\b\f36\fs22\insrsid14224422 \tab }{\b\f36\fs22\ul\insrsid14224422\charrsid10224643 EXCLUSION OF INCIDENTAL, CONSEQUENTIAL AND CERTAIN OTHER DAMAGES}{\b\f36\fs22\insrsid14224422 . }{\b\caps\f36\fs22\insrsid14224422 +To the maximum extent permitted by applicable law, in + no event shall Microsoft or its suppliers be liable for any special, incidental, punitive, indirect, or consequential damages whatsoever (including, but not limited to, damages for loss of profits or confidential or other information}{ +\b\f36\fs22\insrsid14224422 , }{\b\caps\f36\fs22\insrsid14224422 for business interruption, for personal injury, for loss of privacy, for failure to meet any duty including of good faith or of reasonable care, for negligence, and}{ +\b\f36\fs22\insrsid14224422 }{\b\caps\f36\fs22\insrsid14224422 for any other pecuniary or other loss whatsoever) arising out of or in any way related to the use of or inabili +ty to use the SOFTWARE, the provision of or failure to provide Support OR OTHER Services, informatIon, software, and related CONTENT through the software or otherwise arising out of the use of the software, or otherwise under or in connection with any pro +v +ision of this EULA, even in the event of the fault, tort (including negligence), misrepresentation, strict liability, breach of contract or breach of warranty of Microsoft or any supplier, and even if Microsoft or any supplier has been advised of the poss +ibility of such damages. +\par }{\f36\fs22\insrsid14224422 15.}{\b\f36\fs22\insrsid14224422 \tab }{\b\f36\fs22\ul\insrsid14224422\charrsid10224643 LIMITATION OF LIABILITY AND REMEDIES}{\b\f36\fs22\insrsid14224422 +. NOTWITHSTANDING ANY DAMAGES THAT YOU MIGHT INCUR FOR ANY REASON WHATSOEVER (INCLUDING, WITHOUT LIMITATION, ALL DAMAGES REFERENCED HEREIN AND ALL DIRECT OR GENERAL DAMAGES IN CONTRACT OR ANY +THING ELSE), THE ENTIRE LIABILITY OF MICROSOFT AND ANY OF ITS SUPPLIERS UNDER ANY PROVISION OF THIS EULA AND YOUR EXCLUSIVE REMEDY HEREUNDER SHALL BE LIMITED TO THE GREATER OF THE ACTUAL DAMAGES YOU INCUR IN REASONABLE RELIANCE ON THE SOFTWARE UP TO THE A +MOUNT ACTUALLY PAID BY YOU FOR THE }{\b\f36\fs22\insrsid14224422 SOFTWARE}{\f36\fs22\insrsid14224422 }{\b\f36\fs22\insrsid14224422 +OR US$5.00. THE FOREGOING LIMITATIONS, EXCLUSIONS AND DISCLAIMERS SHALL APPLY TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EVEN IF ANY REMEDY FAILS ITS ESSENTIAL PURPOSE. +\par }\pard \s19\ql \li0\ri0\sa96\sl220\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\lisa40 {\f36\fs22\insrsid14224422\charrsid223825 1}{\f36\fs22\insrsid14224422 6}{\f36\fs22\insrsid14224422\charrsid223825 .\tab }{ +\b\f36\fs22\insrsid14224422\charrsid223825 APPLICABLE LAW. }{\f36\fs22\insrsid14224422\charrsid223825 If you acquire +d this Software in the United States, this EULA is governed by the laws of the State of Washington. If you acquired this Software in Canada, unless expressly prohibited by local law, this EULA is governed by the laws in force in the Province of Ontario, +Canada; and, in respect of any dispute which may arise hereunder, you consent to the jurisdiction of the federal and provincial courts sitting in Toronto, Ontario. If you acquired this Software in the Eur}{\f36\fs22\insrsid14224422 o}{ +\f36\fs22\insrsid14224422\charrsid223825 pean Union, Iceland, Norway, or Switzerland, then local law applies. If you acquired this }{\f36\fs22\insrsid14224422 Software in any other country, }{\f36\fs22\insrsid14224422\charrsid223825 +then local law may apply. }{\f36\fs22\insrsid14224422 +\par }\pard \s19\ql \li0\ri0\sb120\sl220\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\f36\fs22\insrsid14224422 17.\tab }{\b\f36\fs22\insrsid14224422 U.S. GOVERNMENT LICENSE RIGHTS}{\f36\fs22\insrsid14224422 +. All Software provided to the U.S. Government pursuant to solicitations issued on or after December 1, 1995 is provided with + the commercial license rights and restrictions described elsewhere herein. All Software provided to the U.S. Government pursuant to solicitations issued prior to December 1, 1995 is provided with \'93Restricted Rights\'94 + as provided for in FAR, 48 CFR 52.227-14 (JUNE 1987) or DFAR, 48 CFR 252.227-7013 (OCT 1988), as applicable. +\par }\pard \s19\ql \li0\ri0\sa96\sl220\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\lisa40 {\f36\fs22\insrsid14224422\charrsid223825 1}{\f36\fs22\insrsid14224422 8}{\f36\fs22\insrsid14224422\charrsid223825 .\tab }{ +\b\f36\fs22\insrsid14224422\charrsid223825 ENTIRE AGREEMENT; SEVERABILITY. }{\f36\fs22\insrsid14224422\charrsid223825 +This EULA (including any addendum or amendment to this EULA which is included with the Software) are the entire agreement between you and Microsoft + relating to the Software and the support services (if any) and they supersede all prior or contemporaneous oral or written communications, proposals and representations with respect to the Software or any other subject matter covered by this EULA. To th +e + extent the terms of any Microsoft policies or programs for support services conflict with the terms of this EULA, the terms of this EULA shall control. If any provision of this EULA is held to be void, invalid, unenforceable or illegal, the other provis +ions shall continue in full force and effect.}{\f36\fs22\insrsid14224422 +\par }\pard\plain \ql \li0\ri0\keep\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\f36\fs22\cf1\insrsid14224422 +Should you have any questions concerning this EULA, or if you desire to contact Microsoft for any reason, please use the address information enclosed in this Software to contact the Microsoft subsidiary serving +your country or visit Microsoft on the World Wide Web at }{\field\flddirty{\*\fldinst {\f36\fs22\cf1\insrsid14224422 HYPERLINK "http://www.microsoft.com" }{\f36\fs22\cf1\insrsid14224422 {\*\datafield +00d0c9ea79f9bace118c8200aa004ba90b02000000170000001900000068007400740070003a002f002f007700770077002e006d006900630072006f0073006f00660074002e0063006f006d000000e0c9ea79f9bace118c8200aa004ba90b3400000068007400740070003a002f002f007700770077002e006d0069006300 +72006f0073006f00660074002e0063006f006d002f000000}}}{\fldrslt {\f36\fs22\ul\cf2\insrsid14224422 http://www.microsoft.com}}}{\f36\fs22\cf1\insrsid14224422 . +\par }\pard\plain \s19\ql \li0\ri0\sa96\sl220\slmult0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0\lisa40 \f39\fs16\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\f36\fs22\insrsid14224422\charrsid223825 +\par }\pard\plain \s23\ql \li0\ri0\sb240\sl-240\slmult0\widctlpar\tx576\tx1152\tx1728\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f38\fs22\lang1033\langfe1033\kerning22\cgrid\langnp1033\langfenp1033 { +\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid16606910 Si vous avez acquis votre produit Microsoft au CANADA, la garantie limit\'e9e suivante }{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422 s\rquote applique}{ +\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid16606910 \~: +\par }{\b\f36\ul\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid2979837 D\'c9NI DE GARANTIES}{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 . }{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422 D}{ +\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 ANS LA MESURE MAXIMALE PERMISE PAR LES LOIS APPLICABLES, LE LOGICIEL ET LES SERVICES DE SOUTIEN TECHNIQUE (LE CAS \'c9CH\'c9ANT) SONT FOURNIS }{ +\b\i\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 TELS QUELS}{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 }{\b\i\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 ET AVEC TOUS LES D\'c9 +FAUTS }{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 PAR MICROSOFT ET SES FOURNISSEURS, LESQUELS PAR LES PR\'c9SENTES D\'c9NIENT TOUTES AUTRES GARANTIES ET CONDITIONS EXPRESSES, IMPLICITES OU EN VERTU DE LA LOI, NOTAMMENT}{ +\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422 , MAIS SANS LIMITATION,}{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 (LE CAS \'c9CH\'c9ANT) LES GARANTIES, DEVOIRS OU CONDITIONS IMPLICITES DE QUALIT\'c9 MARCHANDE, D +\rquote ADAPTATION \'c0 UN}{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422 E}{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 }{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422 FIN }{ +\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 PARTICULI}{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422 \'c8}{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 R}{ +\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422 E}{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 , }{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422 DE FIABILIT\'c9 OU DE DISPONIBILIT\'c9, }{ +\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 D\rquote EXACTITUDE OU D\rquote EXHAUSTIVIT\'c9 DES R\'c9PONSES, DES R\'c9SULTATS, DES EFFORTS D\'c9PLOY\'c9S SELON LES R\'c8GLES DE L\rquote ART, D\rquote ABSENCE DE VIRUS ET }{ +\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422 D\rquote ABSENCE }{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 DE N\'c9GLIGENCE, LE TOUT \'c0 L\rquote \'c9GARD DU LOGICIEL ET DE LA PRESTATION OU DE L\rquote OMISSION D}{ +\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422 E LA }{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 PRESTATION}{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422 }{ +\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 DES SERVICES DE SOUTIEN TECHNIQUE}{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422 OU \'c0 L\rquote \'c9GARD DE LA FOURNITURE OU DE L\rquote +OMISSION DE LA FOURNITURE DE TOUS AUTRES SERVICES, RENSEIGNEMENTS, LOGICIELS, ET CONTENU QUI S\rquote Y RAPPORTE GR\'c2CE AU LOGICIEL OU PROVENANT AUTREMENT DE L\rquote UTILISATION DU LOGICIEL }{ +\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 . PAR AILLEURS, IL N\rquote Y A AUCUNE GARANTIE OU CONDITION QUANT AU TITRE DE PROPRI\'c9T\'c9, \'c0 LA JOUISSANCE OU LA POSSESSION PAISIBLE, \'c0 LA CONCORDANCE \'c0 + UNE DESCRIPTION NI QUANT \'c0 UNE ABSENCE DE CONTREFA\'c7ON CONCERNANT LE LOGICIEL. +\par }{\b\f36\ul\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid2979837 EXCLUSION DES DOMMAGES ACCESSOIRES, INDIRECTS ET DE CERTAINS AUTRES DOMMAGES}{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid16606910 +. DANS LA MESURE MAXIMALE PERMISE PAR LES LOIS APPLICABLES, EN AUCUN CAS MICROSOFT OU SES FOURNISSEURS NE SERONT RESPONSABLES DES DOMMAGES SP\'c9CIAUX, CONS\'c9CUTIFS, ACCESSOIRES OU INDIRECTS DE QUELQUE NATURE QUE CE SOIT (NOTAMMENT, LES DOMMAGES \'c0 L +\rquote \'c9GARD DU MANQUE \'c0 GAGNER OU DE LA DIVULGATION DE RENSEIGNEMENTS CONFIDENTIELS OU AUTRES, DE LA PERTE D\rquote EXPLOITATION, DE BLESSURES CORPORELLES, DE LA VIOLATION DE LA VIE PRIV\'c9E, DE L\rquote +OMISSION DE REMPLIR TOUT DEVOIR, Y COMPRIS D\rquote AGIR DE BONNE FOI OU D\rquote EXERCER UN SOIN RAISONNABLE, DE LA N\'c9GLIGENCE ET DE TOUTE AUTRE PERTE P\'c9CUNIAIRE OU AUTRE PERTE DE QUELQUE NATURE QUE CE SOIT) SE RAPPORTANT DE QUELQUE MANI\'c8 +RE QUE CE SOIT \'c0 L\rquote UTILISATION DU LOGICIEL OU \'c0 L\rquote INCAPACIT\'c9 DE S\rquote EN SERVIR, \'c0 LA PRESTATION OU \'c0 L\rquote OMISSION D}{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422 E LA }{ +\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid16606910 PRESTATION DE SERVICES DE SOUTIEN TECHNIQUE }{\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422 OU \'c0 LA FOURNITURE OU \'c0 L\rquote +OMISSION DE LA FOURNITURE DE TOUS AUTRES SERVICES, RENSEIGNEMENTS, LOGICIELS, ET CONTENU QUI S\rquote Y RAPPORTE GR\'c2CE AU LOGICIEL OU PROVENANT AUTREMENT DE L\rquote UTILISATION DU LOGICIEL}{ +\b\f36\lang3084\langfe1033\langnp3084\insrsid14224422\charrsid16606910 }{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid16606910 OU AUTREMENT AUX TERMES DE TOUTE DISPOSITION D}{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422 E LA }{ +\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid16606910 PR\'c9SENT}{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422 E}{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid16606910 }{ +\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422 CONVENTION }{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid16606910 OU RELATIVEMENT \'c0 UNE TELLE DISPOSITION, M\'caME EN CAS DE FAUTE, DE D\'c9LIT CIVIL (Y COMPRIS LA N\'c9 +GLIGENCE), DE RESPONSABILIT\'c9 STRICTE, DE VIOLATION DE CONTRAT OU DE VIOLATION DE GARANTIE DE MICROSOFT OU DE TOUT FOURNISSEUR ET M\'caME SI MICROSOFT OU TOUT FOURNISSEUR A \'c9T\'c9 AVIS\'c9 DE LA POSSIBILIT\'c9 DE TELS DOMMAGES.}{ +\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid3175708 +\par }{\b\f36\ul\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid2979837 LIMITATION DE RESPONSABILIT\'c9 ET RECOURS}{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid3175708 . MALGR\'c9 + LES DOMMAGES QUE VOUS PUISSIEZ SUBIR POUR QUELQUE MOTIF QUE CE SOIT (NOTAMMENT, }{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422 MAIS SANS LIMITATION, }{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid3175708 +TOUS LES DOMMAGES SUSMENTIONN\'c9S ET TOUS LES DOMMAGES DIRECTS OU G\'c9N\'c9RAUX}{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422 OU AUTRES}{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid3175708 ), L}{ +\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422 A SEULE RESPONSABILIT\'c9 }{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid3175708 DE MICROSOFT ET DE L\rquote UN OU L\rquote AUTRE DE SES FOURNISSEURS AUX TERMES DE TOUTE DISPOSITION D} +{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422 E}{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid3175708 }{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422 LA }{ +\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid3175708 PR\'c9SENT}{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422 E}{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid3175708 }{ +\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422 CONVENTION }{\b\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid3175708 ET VOTRE RECOURS EXCLUSIF \'c0 L\rquote \'c9GARD DE TOUT CE QUI PR\'c9C\'c8DE SE LIMITE AU PLUS \'c9LEV\'c9 + ENTRE LES MONTANTS SUIVANTS\~: LE MONTANT QUE VOUS AVEZ R\'c9ELLEMENT PAY\'c9 POUR LE LOGICIEL OU 5,00\~$US. LES LIMITES, EXCLUSIONS ET D\'c9NIS QUI PR\'c9C\'c8DENT (Y COMPRIS LES CLAUSES CI-DESSUS), S\rquote +APPLIQUENT DANS LA MESURE MAXIMALE PERMISE PAR LES LOIS APPLICABLES, M\'caME SI TOUT RECOURS N\rquote ATTEINT PAS SON BUT ESSENTIEL. +\par }{\f36\lang1036\langfe1033\langnp1036\insrsid14224422 \'c0 moins que cela ne soit prohib\'e9 par le droit local applicable, l}{\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid16606910 a pr\'e9sente Convention est r\'e9 +gie par les lois de la province d\rquote Ontario, Canada. }{\f36\lang1036\langfe1033\langnp1036\insrsid14224422 Vous consentez \'e0 }{\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid16606910 la comp\'e9tence des tribunaux }{ +\f36\lang1036\langfe1033\langnp1036\insrsid14224422 f\'e9d\'e9raux et provinciaux si\'e9geant \'e0 Toronto, dans }{\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid16606910 la province d\rquote Ontario. +\par Au cas o\'f9 vous auriez des questions concernant cette licence ou que vous d\'e9siriez vous mettre en rapport avec Microsoft pour quelque raison que ce soit, veuillez }{\f36\lang1036\langfe1033\langnp1036\insrsid14224422 utiliser l\rquote +information contenue dans le Logiciel pour }{\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid16606910 contacter la }{\f36\lang1036\langfe1033\langnp1036\insrsid14224422 filiale de }{ +\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid16606910 Microsoft desservant votre pays, ou }{\f36\lang1036\langfe1033\langnp1036\insrsid14224422 visitez }{\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid16606910 Microsoft }{ +\f36\lang1036\langfe1033\langnp1036\insrsid14224422 sur le }{\f36\cf1\lang1036\langfe1033\langnp1036\insrsid14224422 World Wide Web \'e0 }{\field\flddirty{\*\fldinst {\f36\cf1\lang1036\langfe1033\langnp1036\insrsid14224422 + HYPERLINK "http://www.microsoft.com" }{\f36\cf1\insrsid14224422\charrsid14896281 {\*\datafield +00d0c9ea79f9bace118c8200aa004ba90b0200000003000000e0c9ea79f9bace118c8200aa004ba90b3400000068007400740070003a002f002f007700770077002e006d006900630072006f0073006f00660074002e0063006f006d002f000000}}}{\fldrslt { +\f36\ul\cf2\lang1036\langfe1033\langnp1036\insrsid14224422 http://www.microsoft.com}}}{\f36\lang1036\langfe1033\langnp1036\insrsid14224422\charrsid16606910 .}{\f36\lang1036\langfe1033\langnp1036\insrsid14224422 +\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\lang1036\langfe1033\langnp1036\insrsid14224422 +\par }{\b\f36\fs22\lang1036\langfe1033\langnp1036\insrsid14224422 +\par }\pard\plain \s23\ql \li0\ri0\sa60\widctlpar\tx576\tx1152\tx1728\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \f38\fs22\lang1033\langfe1033\kerning22\cgrid\langnp1033\langfenp1033 {\f36\lang1036\langfe1033\langnp1036\insrsid14224422 +\par }\pard\plain \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\lang1036\langfe1033\langnp1036\insrsid14224422 +\par }\pard \ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 {\lang1036\langfe1033\langnp1036\insrsid14224422 +\par }} \ No newline at end of file diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/EULA.txt b/windows_libs/Microsoft Visual C++ Toolkit 2003/EULA.txt new file mode 100644 index 00000000..8ed77743 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/EULA.txt @@ -0,0 +1,48 @@ +END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE + +MICROSOFT VISUAL C++ TOOLKIT 2003 + +IMPORTANT-READ CAREFULLY: This End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and Microsoft Corporation ("Microsoft") for the Microsoft software that accompanies this EULA, which includes computer software and may include associated media, printed materials including best practices, white papers, templates, "online" or electronic documentation, and Internet-based services ("Software"). An amendment or addendum to this EULA may accompany the Software. YOU AGREE TO BE BOUND BY THE TERMS OF THIS EULA BY INSTALLING, COPYING, OR OTHERWISE USING THE SOFTWARE. IF YOU DO NOT AGREE, DO NOT INSTALL, COPY, OR USE THE SOFTWARE. + + + +MICROSOFT Software LICENSE +1. GRANTS OF LICENSE. Microsoft grants you the rights described in this EULA provided that you comply with all terms and conditions of this EULA. +1.1 General License Grant. Microsoft grants to you as an individual, a personal, nonexclusive license to make and use copies of the Software (i) for your internal use; (ii) for designing, developing, testing and demonstrating your software product(s); and (iii) for evaluation of the Software. +1.2 Documentation. You may make and use an unlimited number of copies of any documentation, provided that such copies shall be used only for personal internal purposes and are not to be republished or distributed (either in hard copy or electronic form) beyond your premises except as otherwise specifically provided herein. +2. ADDITIONAL LICENSE RIGHTS -- REDISTRIBUTABLES. In addition to the rights granted in Section 1, certain portions of the Software, as described in this Section˙2, are provided to you with additional license rights. These additional license rights are conditioned upon your compliance with the distribution requirements and license restrictions described in Section 3. +2.1 Sample Code. Microsoft grants you the right to use and modify the source code version of those portions of the Software identified as "Samples" in REDIST.TXT or elsewhere in the Software ("Sample Code") for the sole purposes of designing, developing, and testing your software product(s), and to reproduce and distribute the Sample Code along with any modifications thereof, in object and/or source code form. For applicable redistribution requirements for Sample Code, see Section˙3.1 below. +2.2 Redistributable Code-General. Microsoft grants you a nonexclusive, royalty-free right to reproduce and distribute the object code form of any portion of the Software listed in REDIST.TXT ("Redistributable Code"). For general redistribution requirements for Redistributable Code, see Section˙3.1, below. + + +3. LICENSE RESTRICTIONS -- DISTRIBUTION REQUIREMENTS. If you choose to exercise your rights under Section˙2, any redistribution by you is subject to your compliance with the following terms. +3.1 If you are authorized and choose to redistribute Sample Code or Redistributable Code (collectively, the "Redistributables") as described in Section 2, you agree: (i) except as otherwise noted in Section 2.1 (Sample Code) to distribute the Redistributables only in object code form and in conjunction with and as a part of a software application product developed by you that adds significant and primary functionality to the Redistributables ("Licensee Software"); (ii)˙that the Redistributables only operate in conjunction with Microsoft Windows platforms; (iii) to distribute the Licensee Software containing the Redistributables pursuant to an end user license agreement (which may be "break-the-seal", "click-wrap" or signed), with terms no less protective than those contained in this EULA; (iv)˙not to use Microsoft's name, logo, or trademarks to market the Licensee Software; (v) to display your own valid copyright notice which shall be sufficient to protect Microsoft's copyright in the Software; (vi)˙not to remove or obscure any copyright, trademark or patent notices that appear on the Software as delivered to you; (vii) to indemnify, hold harmless, and defend Microsoft from and against any claims or lawsuits, including attorney's fees, that arise or result from the use or distribution of the Licensee Software; (viii) otherwise comply with the terms of this EULA; and (ix)˙agree that Microsoft reserves all rights not expressly granted. +You also agree not to permit further distribution of the Redistributables by your end users except you may permit further redistribution of the Redistributables by your distributors to your end-user customers if your distributors only distribute the Redistributables in conjunction with, and as part of, the Licensee Software and you and your distributors comply with all other terms of this EULA. +3.2 If you use the Redistributables, then in addition to your compliance with the applicable distribution requirements described for the Redistributables, the following also applies. Your license rights to the Redistributables are conditioned upon your not (a) creating derivative works of the Redistributables in any manner that would cause the Redistributables in whole or in part to become subject to any of the terms of an Excluded License; and (b) distributing the Redistributables (or derivative works thereof) in any manner that would cause the Redistributables to become subject to any of the terms of an Excluded License. An "Excluded License" is any license which requires as a condition of use, modification and/or distribution of software subject to the Excluded License, that such software or other software combined and/or distributed with such software (x) be disclosed or distributed in source code form; (y) be licensed for the purpose of making derivative works; or (z) be redistributable at no charge. +4. RESERVATION OF RIGHTS AND OWNERSHIP. Microsoft reserves all rights not expressly granted to you in this EULA. The Software is protected by copyright and other intellectual property laws and treaties. Microsoft or its suppliers own the title, copyright, and other intellectual property rights in the Software. The Software is licensed, not sold. +5. LIMITATIONS ON REVERSE ENGINEERING, DECOMPILATION, AND DISASSEMBLY. You may not reverse engineer, decompile, or disassemble the Software, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation. +6. NO RENTAL/COMMERCIAL HOSTING. You may not rent, lease, lend, or provide commercial hosting services with the Software. +7. CONSENT TO USE OF DATA. You agree that Microsoft and its affiliates may collect and use technical information gathered as part of the product support services provided to you, if any, related to the Software. Microsoft may use this information solely to improve our products or to provide customized services or technologies to you and will not disclose this information in a form that personally identifies you. +8. LINKS TO THIRD PARTY SITES. You may link to third party sites through the use of the Software. The third party sites are not under the control of Microsoft, and Microsoft is not responsible for the contents of any third party sites, any links contained in third party sites, or any changes or updates to third party sites. Microsoft is not responsible for webcasting or any other form of transmission received from any third party sites. Microsoft is providing these links to third party sites to you only as a convenience, and the inclusion of any link does not imply an endorsement by Microsoft of the third party site. +9. ADDITIONAL SOFTWARE/SERVICES. This EULA applies to updates, supplements, add-on components, or Internet-based services components, of the Software that Microsoft may provide to you or make available to you after the date you obtain your initial copy of the Software, unless we provide other terms along with the update, supplement, add-on component, or Internet-based services component. Microsoft reserves the right to discontinue any Internet-based services provided to you or made available to you through the use of the Software. +10. EXPORT RESTRICTIONS. You acknowledge that the Software is subject to U.S. export jurisdiction. You agree to comply with all applicable international and national laws that apply to the Software, including the U.S. Export Administration Regulations, as well as end-user, end-use, and destination restrictions issued by U.S. and other governments. For additional information, see . +11. SOFTWARE TRANSFER. The initial user of the Software may make a one-time permanent transfer of this EULA and Software to another end user, provided the initial user retains no copies of the Software. This transfer must include all of the Software (including all component parts, the media and printed materials, any upgrades to this EULA, and, if applicable, the Certificate of Authenticity). The transfer may not be an indirect transfer, such as a consignment. Prior to the transfer, the end user receiving the Software must agree to all the EULA terms. +12. TERMINATION. Without prejudice to any other rights, Microsoft may terminate this EULA if you fail to comply with the terms and conditions of this EULA. In such event, you must destroy all copies of the Software and all of its component parts. +13. DISCLAIMER OF WARRANTIES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND ITS SUPPLIERS PROVIDE THE SOFTWARE AND SUPPORT SERVICES (IF ANY) AS IS AND WITH ALL FAULTS, AND HEREBY DISCLAIM ALL OTHER WARRANTIES AND CONDITIONS, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) IMPLIED WARRANTIES, DUTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF RELIABILITY OR AVAILABILITY, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, OF WORKMANLIKE EFFORT, OF LACK OF VIRUSES, AND OF LACK OF NEGLIGENCE, ALL WITH REGARD TO THE SOFTWARE, AND THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT OR OTHER SERVICES, INFORMATION, SOFTWARE, AND RELATED CONTENT THROUGH THE SOFTWARE OR OTHERWISE ARISING OUT OF THE USE OF THE SOFTWARE. ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION, CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT WITH REGARD TO THE SOFTWARE. +14. EXCLUSION OF INCIDENTAL, CONSEQUENTIAL AND CERTAIN OTHER DAMAGES. To the maximum extent permitted by applicable law, in no event shall Microsoft or its suppliers be liable for any special, incidental, punitive, indirect, or consequential damages whatsoever (including, but not limited to, damages for loss of profits or confidential or other information, for business interruption, for personal injury, for loss of privacy, for failure to meet any duty including of good faith or of reasonable care, for negligence, and for any other pecuniary or other loss whatsoever) arising out of or in any way related to the use of or inability to use the SOFTWARE, the provision of or failure to provide Support OR OTHER Services, informatIon, software, and related CONTENT through the software or otherwise arising out of the use of the software, or otherwise under or in connection with any provision of this EULA, even in the event of the fault, tort (including negligence), misrepresentation, strict liability, breach of contract or breach of warranty of Microsoft or any supplier, and even if Microsoft or any supplier has been advised of the possibility of such damages. +15. LIMITATION OF LIABILITY AND REMEDIES. NOTWITHSTANDING ANY DAMAGES THAT YOU MIGHT INCUR FOR ANY REASON WHATSOEVER (INCLUDING, WITHOUT LIMITATION, ALL DAMAGES REFERENCED HEREIN AND ALL DIRECT OR GENERAL DAMAGES IN CONTRACT OR ANYTHING ELSE), THE ENTIRE LIABILITY OF MICROSOFT AND ANY OF ITS SUPPLIERS UNDER ANY PROVISION OF THIS EULA AND YOUR EXCLUSIVE REMEDY HEREUNDER SHALL BE LIMITED TO THE GREATER OF THE ACTUAL DAMAGES YOU INCUR IN REASONABLE RELIANCE ON THE SOFTWARE UP TO THE AMOUNT ACTUALLY PAID BY YOU FOR THE SOFTWARE OR US$5.00. THE FOREGOING LIMITATIONS, EXCLUSIONS AND DISCLAIMERS SHALL APPLY TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EVEN IF ANY REMEDY FAILS ITS ESSENTIAL PURPOSE. +16. APPLICABLE LAW. If you acquired this Software in the United States, this EULA is governed by the laws of the State of Washington. If you acquired this Software in Canada, unless expressly prohibited by local law, this EULA is governed by the laws in force in the Province of Ontario, Canada; and, in respect of any dispute which may arise hereunder, you consent to the jurisdiction of the federal and provincial courts sitting in Toronto, Ontario. If you acquired this Software in the European Union, Iceland, Norway, or Switzerland, then local law applies. If you acquired this Software in any other country, then local law may apply. +17. U.S. GOVERNMENT LICENSE RIGHTS. All Software provided to the U.S. Government pursuant to solicitations issued on or after December 1, 1995 is provided with the commercial license rights and restrictions described elsewhere herein. All Software provided to the U.S. Government pursuant to solicitations issued prior to December 1, 1995 is provided with "Restricted Rights" as provided for in FAR, 48 CFR 52.227-14 (JUNE 1987) or DFAR, 48 CFR 252.227-7013 (OCT 1988), as applicable. +18. ENTIRE AGREEMENT; SEVERABILITY. This EULA (including any addendum or amendment to this EULA which is included with the Software) are the entire agreement between you and Microsoft relating to the Software and the support services (if any) and they supersede all prior or contemporaneous oral or written communications, proposals and representations with respect to the Software or any other subject matter covered by this EULA. To the extent the terms of any Microsoft policies or programs for support services conflict with the terms of this EULA, the terms of this EULA shall control. If any provision of this EULA is held to be void, invalid, unenforceable or illegal, the other provisions shall continue in full force and effect. +Should you have any questions concerning this EULA, or if you desire to contact Microsoft for any reason, please use the address information enclosed in this Software to contact the Microsoft subsidiary serving your country or visit Microsoft on the World Wide Web at http://www.microsoft.com. + +Si vous avez acquis votre produit Microsoft au CANADA, la garantie limit‚e suivante s'applique˙: +DNI DE GARANTIES. DANS LA MESURE MAXIMALE PERMISE PAR LES LOIS APPLICABLES, LE LOGICIEL ET LES SERVICES DE SOUTIEN TECHNIQUE (LE CAS CHANT) SONT FOURNIS TELS QUELS ET AVEC TOUS LES DFAUTS PAR MICROSOFT ET SES FOURNISSEURS, LESQUELS PAR LES PRSENTES DNIENT TOUTES AUTRES GARANTIES ET CONDITIONS EXPRESSES, IMPLICITES OU EN VERTU DE LA LOI, NOTAMMENT, MAIS SANS LIMITATION, (LE CAS CHANT) LES GARANTIES, DEVOIRS OU CONDITIONS IMPLICITES DE QUALIT MARCHANDE, D'ADAPTATION A UNE FIN PARTICULIERE, DE FIABILIT OU DE DISPONIBILIT, D'EXACTITUDE OU D'EXHAUSTIVIT DES RPONSES, DES RSULTATS, DES EFFORTS DPLOYS SELON LES REGLES DE L'ART, D'ABSENCE DE VIRUS ET D'ABSENCE DE NGLIGENCE, LE TOUT A L'GARD DU LOGICIEL ET DE LA PRESTATION OU DE L'OMISSION DE LA PRESTATION DES SERVICES DE SOUTIEN TECHNIQUE OU A L'GARD DE LA FOURNITURE OU DE L'OMISSION DE LA FOURNITURE DE TOUS AUTRES SERVICES, RENSEIGNEMENTS, LOGICIELS, ET CONTENU QUI S'Y RAPPORTE GRACE AU LOGICIEL OU PROVENANT AUTREMENT DE L'UTILISATION DU LOGICIEL . PAR AILLEURS, IL N'Y A AUCUNE GARANTIE OU CONDITION QUANT AU TITRE DE PROPRIT, A LA JOUISSANCE OU LA POSSESSION PAISIBLE, A LA CONCORDANCE A UNE DESCRIPTION NI QUANT A UNE ABSENCE DE CONTREFA€ON CONCERNANT LE LOGICIEL. +EXCLUSION DES DOMMAGES ACCESSOIRES, INDIRECTS ET DE CERTAINS AUTRES DOMMAGES. DANS LA MESURE MAXIMALE PERMISE PAR LES LOIS APPLICABLES, EN AUCUN CAS MICROSOFT OU SES FOURNISSEURS NE SERONT RESPONSABLES DES DOMMAGES SPCIAUX, CONSCUTIFS, ACCESSOIRES OU INDIRECTS DE QUELQUE NATURE QUE CE SOIT (NOTAMMENT, LES DOMMAGES A L'GARD DU MANQUE A GAGNER OU DE LA DIVULGATION DE RENSEIGNEMENTS CONFIDENTIELS OU AUTRES, DE LA PERTE D'EXPLOITATION, DE BLESSURES CORPORELLES, DE LA VIOLATION DE LA VIE PRIVE, DE L'OMISSION DE REMPLIR TOUT DEVOIR, Y COMPRIS D'AGIR DE BONNE FOI OU D'EXERCER UN SOIN RAISONNABLE, DE LA NGLIGENCE ET DE TOUTE AUTRE PERTE PCUNIAIRE OU AUTRE PERTE DE QUELQUE NATURE QUE CE SOIT) SE RAPPORTANT DE QUELQUE MANIERE QUE CE SOIT A L'UTILISATION DU LOGICIEL OU A L'INCAPACIT DE S'EN SERVIR, A LA PRESTATION OU A L'OMISSION DE LA PRESTATION DE SERVICES DE SOUTIEN TECHNIQUE OU A LA FOURNITURE OU A L'OMISSION DE LA FOURNITURE DE TOUS AUTRES SERVICES, RENSEIGNEMENTS, LOGICIELS, ET CONTENU QUI S'Y RAPPORTE GRACE AU LOGICIEL OU PROVENANT AUTREMENT DE L'UTILISATION DU LOGICIEL OU AUTREMENT AUX TERMES DE TOUTE DISPOSITION DE LA PRSENTE CONVENTION OU RELATIVEMENT A UNE TELLE DISPOSITION, MEME EN CAS DE FAUTE, DE DLIT CIVIL (Y COMPRIS LA NGLIGENCE), DE RESPONSABILIT STRICTE, DE VIOLATION DE CONTRAT OU DE VIOLATION DE GARANTIE DE MICROSOFT OU DE TOUT FOURNISSEUR ET MEME SI MICROSOFT OU TOUT FOURNISSEUR A T AVIS DE LA POSSIBILIT DE TELS DOMMAGES. +LIMITATION DE RESPONSABILIT ET RECOURS. MALGR LES DOMMAGES QUE VOUS PUISSIEZ SUBIR POUR QUELQUE MOTIF QUE CE SOIT (NOTAMMENT, MAIS SANS LIMITATION, TOUS LES DOMMAGES SUSMENTIONNS ET TOUS LES DOMMAGES DIRECTS OU GNRAUX OU AUTRES), LA SEULE RESPONSABILIT DE MICROSOFT ET DE L'UN OU L'AUTRE DE SES FOURNISSEURS AUX TERMES DE TOUTE DISPOSITION DE LA PRSENTE CONVENTION ET VOTRE RECOURS EXCLUSIF A L'GARD DE TOUT CE QUI PRCEDE SE LIMITE AU PLUS LEV ENTRE LES MONTANTS SUIVANTS˙: LE MONTANT QUE VOUS AVEZ RELLEMENT PAY POUR LE LOGICIEL OU 5,00˙$US. LES LIMITES, EXCLUSIONS ET DNIS QUI PRCEDENT (Y COMPRIS LES CLAUSES CI-DESSUS), S'APPLIQUENT DANS LA MESURE MAXIMALE PERMISE PAR LES LOIS APPLICABLES, MEME SI TOUT RECOURS N'ATTEINT PAS SON BUT ESSENTIEL. +A moins que cela ne soit prohib‚ par le droit local applicable, la pr‚sente Convention est r‚gie par les lois de la province d'Ontario, Canada. Vous consentez … la comp‚tence des tribunaux f‚d‚raux et provinciaux si‚geant … Toronto, dans la province d'Ontario. +Au cas o— vous auriez des questions concernant cette licence ou que vous d‚siriez vous mettre en rapport avec Microsoft pour quelque raison que ce soit, veuillez utiliser l'information contenue dans le Logiciel pour contacter la filiale de Microsoft desservant votre pays, ou visitez Microsoft sur le World Wide Web … http://www.microsoft.com. + + + + diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/README.htm b/windows_libs/Microsoft Visual C++ Toolkit 2003/README.htm new file mode 100644 index 00000000..13158d46 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/README.htm @@ -0,0 +1,860 @@ + + + + + + + + +Thank you for choosing the Visual C++ Toolkit 2003 + + + + + + + + +
+ +

Thank you for choosing the +Visual C++ Toolkit!

+ +

 

+ +

Use the free Visual C++ Toolkit to build your ISO C++ Standard code, to +evaluate new compiler features, and to get a feel for some of the capabilities +included with Visual Studio .NET +2003.    The tools and libraries +included with the Toolkit are a subset of the features and capabilities of +Visual Studio .NET 2003 +Professional.  Buy Visual Studio .NET 2003 Professional and get a full Integrated +Development Environment (IDE), an award-winning debugger, additional C++ +libraries including ATL and MFC, and much more.

+ +

 

+ +

Learn more about Visual C++ at http://msdn.microsoft.com/visualc

+ +

 

+ +

Learn more about Visual Studio at http://msdn.microsoft.com/vstudio/

+ +

 

+ +

 

+ +

What’s Included, and What’s Not Included

+ +

 

+ +

The Visual C++ Toolkit 2003 is a free download and does not include +customer support or specific documentation.  Please refer to documentation +for the Visual C++ compiler and libraries online at: 

+ +

 

+ +

http://msdn.microsoft.com/library/en-us/vcedit/html/vcorivisualcmainnode.asp

+ +

 

+ +

Please refer to the End User License Agreement (EULA.TXT) and +Redistributable File List (REDIST.TXT) for complete licensing +information.  In general, applications and components built using the +Visual C++ Toolkit may be redistributed without restriction.

+ +

 

+ +

The Visual C++ Toolkit includes the core tools and libraries necessary +to build basic C++ applications and programs:

+ +

 

+ +
    +
  1. Microsoft + C/C++ Optimizing Compiler and Linker.  These are the same compiler + and linker that ship with Visual Studio .NET + 2003 Professional!
  2. +
+ +

 

+ +
    +
  1. C Runtime + Library and the C++ Standard Library, including the Standard Template + Library.  These are the same static-link libraries included with + Visual Studio.  Visual Studio also ships these libraries in + dynamic-link versions, and with full source code.
  2. +
+ +

 

+ +
    +
  1. Microsoft .NET Framework Common Language Runtime.  + Visual C++ can optionally build applications that run on the Common + Language Runtime (CLR). 
  2. +
+ +

 

+ +
    +
  1. Sample + code.  The toolkit includes four samples designed to showcase the + powerful new features of the 2003 version, including new optimization capabilities, + features to improve code-security and robustness, enhanced ISO C++ + standards support, and the ability to use the .NET + Framework library and target the CLR.
  2. +
+ +

 

+ +

The Visual C++ Toolkit does not include several core features found in +Visual Studio .NET 2003. 

+ +

 

+ +
    +
  1. Visual Studio + Integrated Development Environment (IDE).  The Visual Studio IDE + incorporates multitudes of developer tools + including code editors, the Visual Studio debugger, and a project + system.   Learn more about Visual Studio at http://msdn.microsoft.com/vstudio.
  2. +
+ +

 

+ +
    +
  1. Microsoft + Foundation Class (MFC) and Active Template Libraries (ATL).  These + robust and mature libraries provide C++ developers with encapsulated + functionality for building Windows-based applications.   In + Visual Studio these are provided with complete source code.
  2. +
+ +

 

+ +
    +
  1. Advanced developer tools, including compilers and tools + for developing using other languages like Visual Basic and C#.  + Visual Studio provides developers with a complete toolset for building all + types of applications and components for Windows and .NET.
  2. +
+ +

 

+ +

Using the Visual C++ Toolkit

+ +

 

+ +

The Visual C++ Toolkit installs the “Visual C++ Toolkit 2003 Command +Prompt” into the Start Menu.  This command-shell window is configured to +enable compilation and linking of C++ programs using the toolkit-provided +tools. 

+ +

 

+ +

A batch file (vcvars32.bat) in the Toolkit installation directory sets +the environment variables (PATH, INCLUDE, LIB) to point at Toolkit +directories.  Execute this batch file from any command prompt to configure +for compilation using the Toolkit compiler.

+ +

 

+ +

There are four samples included with the Toolkit, located in the +Samples subdirectory.  These short samples showcase new or updated +capabilities of the Visual C++ compiler.  Each sample includes a short +whitepaper explaining the sample, and one or more batch files that can be used +to compile the sample code. 

+ +

 

+ +

Next Steps

+ +

 

+ +

Once you’ve familiarized yourself with the Visual C++ compiler and the +samples included with the Toolkit, you’re ready to build!  You can use the +Toolkit to build a variety of C++-based programs, using core C++ libraries and +the .NET Framework.  If you like, +you can augment the toolkit with additional free developer + tools and resources.  For example, you can download any of +the following:

+ +

 

+ + + +

 

+ + + +

 

+ + + +

 

+ +

If you have any questions about the C++ programming, or the Toolkit +itself, we highly recommend visiting a C++ newsgroup or community site.  +The free Toolkit does not include technical support, but many questions about +Visual C++ are answered online.  Start by checking the Visual C++ FAQ:

+ +

 

+ +

http://msdn.microsoft.com/visualc/productinfo/faq

+ +

 

+ +

When you’re ready, we suggest you check out Visual Studio .NET 2003 Professional, which includes lots of +additional functionality for C++ developers, including an award-winning IDE and +code debugger, additional libraries, and much more!  You can try out Visual Studio for free, +online.  Visit http://msdn.microsoft.com/vstudio/tryit/ +for more information.

+ +

 

+ +

Uninstalling the Visual C++ Toolkit

+ +

 

+ +

Use the Add/Remove Programs tool in the Windows Control Panel to +uninstall the Visual C++ Toolkit. 

+ +

 

+ +

The Toolkit installs the ‘Microsoft .NET Framework 1.1’ if it is not previously +installed.  The uninstaller does not remove this shared component, but it +may be removed manually using the Add/Remove Programs tool.

+ +

 

+ +

 

+ +
+ + + + diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/README.txt b/windows_libs/Microsoft Visual C++ Toolkit 2003/README.txt new file mode 100644 index 00000000..802bf404 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/README.txt @@ -0,0 +1,66 @@ +Thank you for choosing the Visual C++ Toolkit! + +Use the free Visual C++ Toolkit to build your ISO C++ Standard code, to evaluate new compiler features, and to get a feel for some of the capabilities included with Visual Studio .NET 2003. The tools and libraries included with the Toolkit are a subset of the features and capabilities of Visual Studio .NET 2003 Professional. Buy Visual Studio .NET 2003 Professional and get a full Integrated Development Environment (IDE), an award-winning debugger, additional C++ libraries including ATL and MFC, and much more. + +Learn more about Visual C++ at http://msdn.microsoft.com/visualc + +Learn more about Visual Studio at http://msdn.microsoft.com/vstudio/ + + +What's Included, and What's Not Included + +The Visual C++ Toolkit 2003 is a free download and does not include customer support or specific documentation. Please refer to documentation for the Visual C++ compiler and libraries online at: + +http://msdn.microsoft.com/library/en-us/vcedit/html/vcorivisualcmainnode.asp + +Please refer to the End User License Agreement (EULA.TXT) and Redistributable File List (REDIST.TXT) for complete licensing information. In general, applications and components built using the Visual C++ Toolkit may be redistributed without restriction. + +The Visual C++ Toolkit includes the core tools and libraries necessary to build basic C++ applications and programs: + +1. Microsoft C/C++ Optimizing Compiler and Linker. These are the same compiler and linker that ship with Visual Studio .NET 2003 Professional! + +2. C Runtime Library and the C++ Standard Library, including the Standard Template Library. These are the same static-link libraries included with Visual Studio. Visual Studio also ships these libraries in dynamic-link versions, and with full source code. + +3. Microsoft .NET Framework Common Language Runtime. Visual C++ can optionally build applications that run on the Common Language Runtime (CLR). + +4. Sample code. The toolkit includes four samples designed to showcase the powerful new features of the 2003 version, including new optimization capabilities, features to improve code-security and robustness, enhanced ISO C++ standards support, and the ability to use the .NET Framework library and target the CLR. + +The Visual C++ Toolkit does not include several core features found in Visual Studio .NET 2003. + +1. Visual Studio Integrated Development Environment (IDE). The Visual Studio IDE incorporates multitudes of developer tools including code editors, the Visual Studio debugger, and a project system. Learn more about Visual Studio at http://msdn.microsoft.com/vstudio. + +2. Microsoft Foundation Class (MFC) and Active Template Libraries (ATL). These robust and mature libraries provide C++ developers with encapsulated functionality for building Windows-based applications. In Visual Studio these are provided with complete source code. + +3. Advanced developer tools, including compilers and tools for developing using other languages like Visual Basic and C#. Visual Studio provides developers with a complete toolset for building all types of applications and components for Windows and .NET. + +Using the Visual C++ Toolkit + +The Visual C++ Toolkit installs the "Visual C++ Toolkit 2003 Command Prompt" into the Start Menu. This command-shell window is configured to enable compilation and linking of C++ programs using the toolkit-provided tools. + +A batch file (vcvars32.bat) in the Toolkit installation directory sets the environment variables (PATH, INCLUDE, LIB) to point at Toolkit directories. Execute this batch file from any command prompt to configure for compilation using the Toolkit compiler. + +There are four samples included with the Toolkit, located in the Samples subdirectory. These short samples showcase new or updated capabilities of the Visual C++ compiler. Each sample includes a short whitepaper explaining the sample, and one or more batch files that can be used to compile the sample code. + +Next Steps + +Once you've familiarized yourself with the Visual C++ compiler and the samples included with the Toolkit, you're ready to build! You can use the Toolkit to build a variety of C++-based programs, using core C++ libraries and the .NET Framework. If you like, you can augment the toolkit with additional free developer tools and resources. For example, you can download any of the following: + +* Microsoft Platform SDK. This Software Developer Kit provides extensive headers and libraries for building Win32-based applications. And it includes additional developer tools as well! http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ + +* Microsoft .NET Framework SDK Version 1.1. The Visual C++ Toolkit installs a subset of the full .NET Framework SDK. Install the full SDK to gain access to documentation and additional tools. http://www.microsoft.com/downloads/details.aspx?FamilyId=9B3A2CA6-3647-4070-9F41-A333C6B9181D&displaylang=en + +* DirectX 9.0 SDK. Install the DirectX 9 SDK and get started building cool software with full 3D rendering capabilities. Lots of samples are included. http://www.microsoft.com/downloads/details.aspx?FamilyID=1d97f320-9dfd-4e7a-b947-3a037ccf84af&displaylang=en + +If you have any questions about the C++ programming, or the Toolkit itself, we highly recommend visiting a C++ newsgroup or community site. The free Toolkit does not include technical support, but many questions about Visual C++ are answered online. Start by checking the Visual C++ FAQ: + +http://msdn.microsoft.com/visualc/productinfo/faq + +When you're ready, we suggest you check out Visual Studio .NET 2003 Professional, which includes lots of additional functionality for C++ developers, including an award-winning IDE and code debugger, additional libraries, and much more! You can try out Visual Studio for free, online. Visit http://msdn.microsoft.com/vstudio/tryit/ for more information. + +Uninstalling the Visual C++ Toolkit + +Use the Add/Remove Programs tool in the Windows Control Panel to uninstall the Visual C++ Toolkit. + +The Toolkit installs the 'Microsoft .NET Framework 1.1' if it is not previously installed. The uninstaller does not remove this shared component, but it may be removed manually using the Add/Remove Programs tool. + + diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/Visual C++ Toolkit 2003 Command Prompt.lnk b/windows_libs/Microsoft Visual C++ Toolkit 2003/Visual C++ Toolkit 2003 Command Prompt.lnk new file mode 100644 index 00000000..8047b62e Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/Visual C++ Toolkit 2003 Command Prompt.lnk differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/c1.dll b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/c1.dll new file mode 100644 index 00000000..4df787bd Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/c1.dll differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/c1xx.dll b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/c1xx.dll new file mode 100644 index 00000000..7bc5d884 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/c1xx.dll differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/c2.dll b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/c2.dll new file mode 100644 index 00000000..4318ca5a Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/c2.dll differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/cl.exe b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/cl.exe new file mode 100644 index 00000000..086519c6 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/cl.exe differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/cl.exe.config b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/cl.exe.config new file mode 100644 index 00000000..80e3a3fb --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/cl.exe.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/dbghelp.dll b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/dbghelp.dll new file mode 100644 index 00000000..ac6f75fa Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/dbghelp.dll differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/link.exe b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/link.exe new file mode 100644 index 00000000..4f2dfe82 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/link.exe differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/link.exe.config b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/link.exe.config new file mode 100644 index 00000000..80e3a3fb --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/link.exe.config @@ -0,0 +1,6 @@ + + + + + + diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/msobj71.dll b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/msobj71.dll new file mode 100644 index 00000000..fefbb8da Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/msobj71.dll differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/mspdb71.dll b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/mspdb71.dll new file mode 100644 index 00000000..0294b093 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/mspdb71.dll differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/msvcp71.dll b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/msvcp71.dll new file mode 100644 index 00000000..9ed0d17e Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/msvcp71.dll differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/msvcr71.dll b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/msvcr71.dll new file mode 100644 index 00000000..9d9e0286 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/bin/msvcr71.dll differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/_vcclrit.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/_vcclrit.h new file mode 100644 index 00000000..0292c51e --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/_vcclrit.h @@ -0,0 +1,135 @@ +/*** +*_vcclrit.h +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the functions and variables used by user +* to initialize CRT and the dll in IJW scenario. +* +****/ + +#pragma once + +#ifdef __cplusplus +extern "C" { +#endif + +extern IMAGE_DOS_HEADER __ImageBase; + +BOOL WINAPI _DllMainCRTStartup( + HANDLE hDllHandle, + DWORD dwReason, + LPVOID lpreserved + ); +#ifdef __cplusplus +} +#endif + +#ifdef _cplusplus +#define __USE_GLOBAL_NAMESPACE :: +#else +#define __USE_GLOBAL_NAMESPACE +#endif + +// Used to lock +__declspec( selectany ) LONG volatile __lock_handle = 0; + +// Init called +__declspec(selectany) BOOL volatile __initialized = FALSE; + +// Term called +__declspec( selectany ) BOOL volatile __terminated = FALSE; + +__inline BOOL WINAPI __crt_dll_initialize() +{ + // Try to make the variable names unique, so that the variables don't even clash with macros. + static BOOL volatile (__retval) = FALSE; + static DWORD volatile (__lockThreadId) = 0xffffffff; + DWORD volatile (__currentThreadId) = __USE_GLOBAL_NAMESPACE(GetCurrentThreadId)(); + int (__int_var)=0; + + // Take Lock, This is needed for multithreaded scenario. Moreover the threads + // need to wait here to make sure that the dll is initialized when they get + // past this function. + while ( __USE_GLOBAL_NAMESPACE(InterlockedExchange)( &(__lock_handle), 1) == 1 ) + { + ++(__int_var); + if ((__lockThreadId) == (__currentThreadId)) + { + return TRUE; + } + __USE_GLOBAL_NAMESPACE(Sleep)( (__int_var)>1000?100:0 ); + + // If you hang in this loop, this implies that your dllMainCRTStartup is hung on another + // thread. The most likely cause of this is a hang in one of your static constructors or + // destructors. + } + // Note that we don't really need any interlocked stuff here as the writes are always + // in the lock. Only reads are outside the lock. + (__lockThreadId) = (__currentThreadId); + __try { + + if ( (__terminated) == TRUE ) + { + (__retval) = FALSE; + } + else if ( (__initialized) == FALSE ) + { + (__retval) = (_DllMainCRTStartup)( ( HINSTANCE )( &__ImageBase ), DLL_PROCESS_ATTACH, 0 ); + (__initialized) = TRUE; + } + + } __finally { + // revert the __lockThreadId + (__lockThreadId) = 0xffffffff; + // Release Lock + __USE_GLOBAL_NAMESPACE(InterlockedExchange)( &(__lock_handle), 0 ); + } + return (__retval); +} + +__inline BOOL WINAPI __crt_dll_terminate() +{ + static BOOL volatile (__retval) = TRUE; + static DWORD volatile (__lockThreadId) = 0xffffffff; + DWORD volatile (__currentThreadId) = __USE_GLOBAL_NAMESPACE(GetCurrentThreadId)(); + int (__int_var)=0; + + // Take Lock, this lock is needed to keep Terminate in sync with Initialize. + while ( __USE_GLOBAL_NAMESPACE(InterlockedExchange)( &(__lock_handle), 1) == 1 ) + { + ++(__int_var); + if ((__lockThreadId) == (__currentThreadId)) + { + return TRUE; + } + __USE_GLOBAL_NAMESPACE(Sleep)( (__int_var)>1000?100:0 ); + + // If you hang in this loop, this implies that your dllMainCRTStartup is hung on another + // thread. The most likely cause of this is a hang in one of your static constructors or + // destructors. + } + // Note that we don't really need any interlocked stuff here as the writes are always + // in the lock. Only reads are outside the lock. + (__lockThreadId) = (__currentThreadId); + __try { + + if ( (__initialized) == FALSE ) + { + (__retval) = FALSE; + } + else if ( (__terminated) == FALSE ) + { + (__retval) = _DllMainCRTStartup( ( HINSTANCE )( &(__ImageBase) ), DLL_PROCESS_DETACH, 0 ); + (__terminated) = TRUE; + } + + } __finally { + // revert the __lockThreadId + (__lockThreadId) = 0xffffffff; + // Release Lock + __USE_GLOBAL_NAMESPACE(InterlockedExchange)( &(__lock_handle), 0 ); + } + return (__retval); +} diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/algorithm b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/algorithm new file mode 100644 index 00000000..6cc8bb18 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/algorithm @@ -0,0 +1,2678 @@ +// algorithm standard header +#pragma once +#ifndef _ALGORITHM_ +#define _ALGORITHM_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) + #pragma warning(disable: 4244) +_STD_BEGIN + + // COMMON SORT PARAMETERS +const int _ISORT_MAX = 32; // maximum size for insertion sort + + // TEMPLATE FUNCTION for_each +template inline + _Fn1 for_each(_InIt _First, _InIt _Last, _Fn1 _Func) + { // perform function for each element + for (; _First != _Last; ++_First) + _Func(*_First); + return (_Func); + } + + // TEMPLATE FUNCTION find +template inline + _InIt find(_InIt _First, _InIt _Last, const _Ty& _Val) + { // find first matching _Val + for (; _First != _Last; ++_First) + if (*_First == _Val) + break; + return (_First); + } + +inline const char *find(const char *_First, const char *_Last, int _Val) + { // find first char that matches _Val + _First = (const char *)::memchr(_First, _Val, _Last - _First); + return (_First == 0 ? _Last : _First); + } + +inline const signed char *find(const signed char *_First, + const signed char *_Last, int _Val) + { // find first signed char that matches _Val + _First = (const signed char *)::memchr(_First, _Val, + _Last - _First); + return (_First == 0 ? _Last : _First); + } + +inline const unsigned char *find(const unsigned char *_First, + const unsigned char *_Last, int _Val) + { // find first unsigned char that matches _Val + _First = (const unsigned char *)::memchr(_First, _Val, + _Last - _First); + return (_First == 0 ? _Last : _First); + } + + // TEMPLATE FUNCTION find_if +template inline + _InIt find_if(_InIt _First, _InIt _Last, _Pr _Pred) + { // find first satisfying _Pred + for (; _First != _Last; ++_First) + if (_Pred(*_First)) + break; + return (_First); + } + + // TEMPLATE FUNCTION adjacent_find +template inline + _FwdIt adjacent_find(_FwdIt _First, _FwdIt _Last) + { // find first matching successor + for (_FwdIt _Firstb; (_Firstb = _First) != _Last && ++_First != _Last; ) + if (*_Firstb == *_First) + return (_Firstb); + return (_Last); + } + + // TEMPLATE FUNCTION adjacent_find WITH PRED +template inline + _FwdIt adjacent_find(_FwdIt _First, _FwdIt _Last, _Pr _Pred) + { // find first satisfying _Pred with successor + for (_FwdIt _Firstb; (_Firstb = _First) != _Last && ++_First != _Last; ) + if (_Pred(*_Firstb, *_First)) + return (_Firstb); + return (_Last); + } + + // TEMPLATE FUNCTION count +template inline + typename iterator_traits<_InIt>::difference_type + count(_InIt _First, _InIt _Last, const _Ty& _Val) + { // count elements that match _Val + typename iterator_traits<_InIt>::difference_type _Count = 0; + + for (; _First != _Last; ++_First) + if (*_First == _Val) + ++_Count; + return (_Count); + } + + // TEMPLATE FUNCTION count_if +template inline + typename iterator_traits<_InIt>::difference_type + count_if(_InIt _First, _InIt _Last, _Pr _Pred) + { // count elements satisfying _Pred + typename iterator_traits<_InIt>::difference_type _Count = 0; + + for (; _First != _Last; ++_First) + if (_Pred(*_First)) + ++_Count; + return (_Count); + } + + + // TEMPLATE FUNCTION search +template inline + _FwdIt1 _Search(_FwdIt1 _First1, _FwdIt1 _Last1, + _FwdIt2 _First2, _FwdIt2 _Last2, _Diff1 *, _Diff2 *) + { // find first [_First2, _Last2) match + _Diff1 _Count1 = 0; + _Distance(_First1, _Last1, _Count1); + _Diff2 _Count2 = 0; + _Distance(_First2, _Last2, _Count2); + + for (; _Count2 <= _Count1; ++_First1, --_Count1) + { // room for match, try it + _FwdIt1 _Mid1 = _First1; + for (_FwdIt2 _Mid2 = _First2; ; ++_Mid1, ++_Mid2) + if (_Mid2 == _Last2) + return (_First1); + else if (!(*_Mid1 == *_Mid2)) + break; + } + return (_Last1); + } + +template inline + _FwdIt1 search(_FwdIt1 _First1, _FwdIt1 _Last1, + _FwdIt2 _First2, _FwdIt2 _Last2) + { // find first [_First2, _Last2) match + return (_Search(_First1, _Last1, _First2, _Last2, + _Dist_type(_First1), _Dist_type(_First2))); + } + + // TEMPLATE FUNCTION search WITH PRED +template inline + _FwdIt1 _Search(_FwdIt1 _First1, _FwdIt1 _Last1, + _FwdIt2 _First2, _FwdIt2 _Last2, _Pr _Pred, _Diff1 *, _Diff2 *) + { // find first [_First2, _Last2) satisfying _Pred + _Diff1 _Count1 = 0; + _Distance(_First1, _Last1, _Count1); + _Diff2 _Count2 = 0; + _Distance(_First2, _Last2, _Count2); + + for (; _Count2 <= _Count1; ++_First1, --_Count1) + { // room for match, try it + _FwdIt1 _Mid1 = _First1; + for (_FwdIt2 _Mid2 = _First2; ; ++_Mid1, ++_Mid2) + if (_Mid2 == _Last2) + return (_First1); + else if (!_Pred(*_Mid1, *_Mid2)) + break; + } + return (_Last1); + } + +template inline + _FwdIt1 search(_FwdIt1 _First1, _FwdIt1 _Last1, + _FwdIt2 _First2, _FwdIt2 _Last2, _Pr _Pred) + { // find first [_First2, _Last2) satisfying _Pred + return (_Search(_First1, _Last1, _First2, _Last2, _Pred, + _Dist_type(_First1), _Dist_type(_First2))); + } + + // TEMPLATE FUNCTION search_n +template inline + _FwdIt1 _Search_n(_FwdIt1 _First1, _FwdIt1 _Last1, + _Diff2 _Count, const _Ty& _Val, _Diff1 *) + { // find first _Count * _Val match + _Diff1 _Count1 = 0; + _Distance(_First1, _Last1, _Count1); + + for (; _Count <= _Count1; ++_First1, --_Count1) + { // room for match, try it + _FwdIt1 _Mid1 = _First1; + for (_Diff2 _Count2 = _Count; ; ++_Mid1, --_Count2) + if (_Count2 == 0) + return (_First1); + else if (!(*_Mid1 == _Val)) + break; + } + return (_Last1); + } + +template inline + _FwdIt1 search_n(_FwdIt1 _First1, _FwdIt1 _Last1, + _Diff2 _Count, const _Ty& _Val) + { // find first _Count * _Val match + return (_Search_n(_First1, _Last1, _Count, _Val, _Dist_type(_First1))); + } + + // TEMPLATE FUNCTION search_n WITH PRED +template inline + _FwdIt1 _Search_n(_FwdIt1 _First1, _FwdIt1 _Last1, + _Diff2 _Count, const _Ty& _Val, _Pr _Pred, _Diff1 *) + { // find first _Count * _Val satisfying _Pred + _Diff1 _Count1 = 0; + _Distance(_First1, _Last1, _Count1); + + for (; _Count <= _Count1; ++_First1, --_Count1) + { // room for match, try it + _FwdIt1 _Mid1 = _First1; + for (_Diff2 _Count2 = _Count; ; ++_Mid1, --_Count2) + if (_Count2 == 0) + return (_First1); + else if (!_Pred(*_Mid1, _Val)) + break; + } + return (_Last1); + } + +template inline + _FwdIt1 search_n(_FwdIt1 _First1, _FwdIt1 _Last1, + _Diff2 _Count, const _Ty& _Val, _Pr _Pred) + { // find first _Count * _Val satisfying _Pred + return (_Search_n(_First1, _Last1, + _Count, _Val, _Pred, _Dist_type(_First1))); + } + + // TEMPLATE FUNCTION find_end +template inline + _FwdIt1 _Find_end(_FwdIt1 _First1, _FwdIt1 _Last1, + _FwdIt2 _First2, _FwdIt2 _Last2, _Diff1 *, _Diff2 *) + { // find last [_First2, _Last2) match + _Diff1 _Count1 = 0; + _Distance(_First1, _Last1, _Count1); + _Diff2 _Count2 = 0; + _Distance(_First2, _Last2, _Count2); + _FwdIt1 _Ans = _Last1; + + if (0 < _Count2) + for (; _Count2 <= _Count1; ++_First1, --_Count1) + { // room for match, try it + _FwdIt1 _Mid1 = _First1; + for (_FwdIt2 _Mid2 = _First2; ; ++_Mid1) + if (!(*_Mid1 == *_Mid2)) + break; + else if (++_Mid2 == _Last2) + { // potential answer, save it + _Ans = _First1; + break; + } + } + return (_Ans); + } + +template inline + _FwdIt1 find_end(_FwdIt1 _First1, _FwdIt1 _Last1, + _FwdIt2 _First2, _FwdIt2 _Last2) + { // find last [_First2, _Last2) match + return (_Find_end(_First1, _Last1, _First2, _Last2, + _Dist_type(_First1), _Dist_type(_First2))); + } + + // TEMPLATE FUNCTION find_end WITH PRED +template inline + _FwdIt1 _Find_end(_FwdIt1 _First1, _FwdIt1 _Last1, + _FwdIt2 _First2, _FwdIt2 _Last2, _Pr _Pred, _Diff1 *, _Diff2 *) + { // find last [_First2, _Last2) satisfying _Pred + _Diff1 _Count1 = 0; + _Distance(_First1, _Last1, _Count1); + _Diff2 _Count2 = 0; + _Distance(_First2, _Last2, _Count2); + _FwdIt1 _Ans = _Last1; + + if (0 < _Count2) + for (; _Count2 <= _Count1; ++_First1, --_Count1) + { // room for match, try it + _FwdIt1 _Mid1 = _First1; + for (_FwdIt2 _Mid2 = _First2; ; ++_Mid1) + if (!_Pred(*_Mid1, *_Mid2)) + break; + else if (++_Mid2 == _Last2) + { // potential answer, save it + _Ans = _First1; + break; + } + } + return (_Ans); + } + +template inline + _FwdIt1 find_end(_FwdIt1 _First1, _FwdIt1 _Last1, + _FwdIt2 _First2, _FwdIt2 _Last2, _Pr _Pred) + { // find last [_First2, _Last2) satisfying _Pred + return (_Find_end(_First1, _Last1, _First2, _Last2, _Pred, + _Dist_type(_First1), _Dist_type(_First2))); + } + + // TEMPLATE FUNCTION find_first_of +template inline + _FwdIt1 find_first_of(_FwdIt1 _First1, _FwdIt1 _Last1, + _FwdIt2 _First2, _FwdIt2 _Last2) + { // look for one of [_First2, _Last2) that matches element + for (; _First1 != _Last1; ++_First1) + for (_FwdIt2 _Mid2 = _First2; _Mid2 != _Last2; ++_Mid2) + if (*_First1 == *_Mid2) + return (_First1); + return (_First1); + } + + // TEMPLATE FUNCTION find_first_of WITH PRED +template inline + _FwdIt1 find_first_of(_FwdIt1 _First1, _FwdIt1 _Last1, + _FwdIt2 _First2, _FwdIt2 _Last2, _Pr _Pred) + { // look for one of [_First2, _Last2) satisfying _Pred with element + for (; _First1 != _Last1; ++_First1) + for (_FwdIt2 _Mid2 = _First2; _Mid2 != _Last2; ++_Mid2) + if (_Pred(*_First1, *_Mid2)) + return (_First1); + return (_First1); + } + + // TEMPLATE FUNCTION iter_swap +template inline + void iter_swap(_FwdIt1 _Left, _FwdIt2 _Right) + { // swap *_Left and *_Right + std::swap(*_Left, *_Right); + } + + // TEMPLATE FUNCTION swap_ranges +template inline + _FwdIt2 swap_ranges(_FwdIt1 _First1, _FwdIt1 _Last1, _FwdIt2 _First2) + { // swap [_First1, _Last1) with [_First2, ...) + for (; _First1 != _Last1; ++_First1, ++_First2) + std::iter_swap(_First1, _First2); + return (_First2); + } + + // TEMPLATE FUNCTION transform WITH UNARY OP +template inline + _OutIt transform(_InIt _First, _InIt _Last, _OutIt _Dest, _Fn1 _Func) + { // transform [_First, _Last) with _Func + for (; _First != _Last; ++_First, ++_Dest) + *_Dest = _Func(*_First); + return (_Dest); + } + + // TEMPLATE FUNCTION transform WITH BINARY OP +template inline + _OutIt transform(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, + _OutIt _Dest, _Fn2 _Func) + { // transform [_First1, _Last1) and [_First2, _Last2) with _Func + for (; _First1 != _Last1; ++_First1, ++_First2, ++_Dest) + *_Dest = _Func(*_First1, *_First2); + return (_Dest); + } + + // TEMPLATE FUNCTION replace +template inline + void replace(_FwdIt _First, _FwdIt _Last, + const _Ty& _Oldval, const _Ty& _Newval) + { // replace each matching _Oldval with _Newval + for (; _First != _Last; ++_First) + if (*_First == _Oldval) + *_First = _Newval; + } + + // TEMPLATE FUNCTION replace_if +template inline + void replace_if(_FwdIt _First, _FwdIt _Last, _Pr _Pred, const _Ty& _Val) + { // replace each satisfying _Pred with _Val + for (; _First != _Last; ++_First) + if (_Pred(*_First)) + *_First = _Val; + } + + // TEMPLATE FUNCTION replace_copy +template inline + _OutIt replace_copy(_InIt _First, _InIt _Last, _OutIt _Dest, + const _Ty& _Oldval, const _Ty& _Newval) + { // copy replacing each matching _Oldval with _Newval + for (; _First != _Last; ++_First, ++_Dest) + *_Dest = *_First == _Oldval ? _Newval : *_First; + return (_Dest); + } + + // TEMPLATE FUNCTION replace_copy_if +template inline + _OutIt replace_copy_if(_InIt _First, _InIt _Last, _OutIt _Dest, + _Pr _Pred, const _Ty& _Val) + { // copy replacing each satisfying _Pred with _Val + for (; _First != _Last; ++_First, ++_Dest) + *_Dest = _Pred(*_First) ? _Val : *_First; + return (_Dest); + } + + // TEMPLATE FUNCTION generate +template inline + void generate(_FwdIt _First, _FwdIt _Last, _Fn0 _Func) + { // replace [_First, _Last) with _Func() + for (; _First != _Last; ++_First) + *_First = _Func(); + } + + // TEMPLATE FUNCTION generate_n +template inline + void generate_n(_OutIt _Dest, _Diff _Count, _Fn0 _Func) + { // replace [_Dest, _Dest + _Count) with _Func() + for (; 0 < _Count; --_Count, ++_Dest) + *_Dest = _Func(); + } + + // TEMPLATE FUNCTION remove_copy +template inline + _OutIt remove_copy(_InIt _First, _InIt _Last, + _OutIt _Dest, const _Ty& _Val) + { // copy omitting each matching _Val + for (; _First != _Last; ++_First) + if (!(*_First == _Val)) + *_Dest++ = *_First; + return (_Dest); + } + + // TEMPLATE FUNCTION remove_copy_if +template inline + _OutIt remove_copy_if(_InIt _First, _InIt _Last, _OutIt _Dest, _Pr _Pred) + { // copy omitting each element satisfying _Pred + for (; _First != _Last; ++_First) + if (!_Pred(*_First)) + *_Dest++ = *_First; + return (_Dest); + } + + // TEMPLATE FUNCTION remove +template inline + _FwdIt remove(_FwdIt _First, _FwdIt _Last, const _Ty& _Val) + { // remove each matching _Val + _First = find(_First, _Last, _Val); + if (_First == _Last) + return (_First); // empty sequence, all done + else + { // nonempty sequence, worth doing + _FwdIt _First1 = _First; + return (std::remove_copy(++_First1, _Last, _First, _Val)); + } + } + + // TEMPLATE FUNCTION remove_if +template inline + _FwdIt remove_if(_FwdIt _First, _FwdIt _Last, _Pr _Pred) + { // remove each satisfying _Pred + _First = std::find_if(_First, _Last, _Pred); + if (_First == _Last) + return (_First); // empty sequence, all done + else + { // nonempty sequence, worth doing + _FwdIt _First1 = _First; + return (std::remove_copy_if(++_First1, _Last, _First, _Pred)); + } + } + + // TEMPLATE FUNCTION unique +template inline + _FwdIt unique(_FwdIt _First, _FwdIt _Last) + { // remove each matching previous + for (_FwdIt _Firstb; (_Firstb = _First) != _Last && ++_First != _Last; ) + if (*_Firstb == *_First) + { // copy down + for (; ++_First != _Last; ) + if (!(*_Firstb == *_First)) + *++_Firstb = *_First; + return (++_Firstb); + } + return (_Last); + } + + // TEMPLATE FUNCTION unique WITH PRED +template inline + _FwdIt unique(_FwdIt _First, _FwdIt _Last, _Pr _Pred) + { // remove each satisfying _Pred with previous + for (_FwdIt _Firstb; (_Firstb = _First) != _Last && ++_First != _Last; ) + if (_Pred(*_Firstb, *_First)) + { // copy down + for (; ++_First != _Last; ) + if (!_Pred(*_Firstb, *_First)) + *++_Firstb = *_First; + return (++_Firstb); + } + return (_Last); + } + + // TEMPLATE FUNCTION unique_copy +template inline + _OutIt _Unique_copy(_InIt _First, _InIt _Last, _OutIt _Dest, _Ty *) + { // copy compressing pairs that match, input iterators + _Ty _Val = *_First; + + for (*_Dest++ = _Val; ++_First != _Last; ) + if (!(_Val == *_First)) + _Val = *_First, *_Dest++ = _Val; + return (_Dest); + } + +template inline + _OutIt _Unique_copy(_InIt _First, _InIt _Last, _OutIt _Dest, + input_iterator_tag) + { // copy compressing pairs that match, input iterators + return (_Unique_copy(_First, _Last, _Dest, _Val_type(_First))); + } + +template inline + _OutIt _Unique_copy(_FwdIt _First, _FwdIt _Last, _OutIt _Dest, + forward_iterator_tag) + { // copy compressing pairs that match, forward iterators + _FwdIt _Firstb = _First; + for (*_Dest++ = *_Firstb; ++_First != _Last; ) + if (!(*_Firstb == *_First)) + _Firstb = _First, *_Dest++ = *_Firstb; + return (_Dest); + } + +template inline + _OutIt _Unique_copy(_BidIt _First, _BidIt _Last, _OutIt _Dest, + bidirectional_iterator_tag) + { // copy compressing pairs that match, bidirectional iterators + return (_Unique_copy(_First, _Last, _Dest, forward_iterator_tag())); + } + +template inline + _OutIt _Unique_copy(_RanIt _First, _RanIt _Last, _OutIt _Dest, + random_access_iterator_tag) + { // copy compressing pairs that match, random-access iterators + return (_Unique_copy(_First, _Last, _Dest, forward_iterator_tag())); + } + +template inline + _OutIt unique_copy(_InIt _First, _InIt _Last, _OutIt _Dest) + { // copy compressing pairs that match + return (_First == _Last ? _Dest : + _Unique_copy(_First, _Last, _Dest, _Iter_cat(_First))); + } + + // TEMPLATE FUNCTION unique_copy WITH PRED +template inline + _OutIt _Unique_copy(_InIt _First, _InIt _Last, _OutIt _Dest, _Pr _Pred, + _Ty *) + { // copy compressing pairs satisfying _Pred, input iterators + _Ty _Val = *_First; + + for (*_Dest++ = _Val; ++_First != _Last; ) + if (!_Pred(_Val, *_First)) + _Val = *_First, *_Dest++ = _Val; + return (_Dest); + } + +template inline + _OutIt _Unique_copy(_InIt _First, _InIt _Last, _OutIt _Dest, _Pr _Pred, + input_iterator_tag) + { // copy compressing pairs satisfying _Pred, input iterators + return (_Unique_copy(_First, _Last, _Dest, _Pred, _Val_type(_First))); + } + +template inline + _OutIt _Unique_copy(_FwdIt _First, _FwdIt _Last, _OutIt _Dest, _Pr _Pred, + forward_iterator_tag) + { // copy compressing pairs satisfying _Pred, forward iterators + _FwdIt _Firstb = _First; + + for (*_Dest++ = *_Firstb; ++_First != _Last; ) + if (!_Pred(*_Firstb, *_First)) + _Firstb = _First, *_Dest++ = *_Firstb; + return (_Dest); + } + +template inline + _OutIt _Unique_copy(_BidIt _First, _BidIt _Last, _OutIt _Dest, _Pr _Pred, + bidirectional_iterator_tag) + { // copy compressing pairs satisfying _Pred, bidirectional iterators + return (_Unique_copy(_First, _Last, _Dest, _Pred, + forward_iterator_tag())); + } + +template inline + _OutIt _Unique_copy(_RanIt _First, _RanIt _Last, _OutIt _Dest, _Pr _Pred, + random_access_iterator_tag) + { // copy compressing pairs satisfying _Pred, random-access iterators + return (_Unique_copy(_First, _Last, _Dest, _Pred, + forward_iterator_tag())); + } + +template inline + _OutIt unique_copy(_InIt _First, _InIt _Last, _OutIt _Dest, _Pr _Pred) + { // copy compressing pairs satisfying _Pred + return (_First == _Last ? _Dest + : _Unique_copy(_First, _Last, _Dest, _Pred, _Iter_cat(_First))); + } + + // TEMPLATE FUNCTION reverse +template inline + void _Reverse(_BidIt _First, _BidIt _Last, bidirectional_iterator_tag) + { // reverse elements in [_First, _Last), bidirectional iterators + for (; _First != _Last && _First != --_Last; ++_First) + std::iter_swap(_First, _Last); + } + +template inline + void _Reverse(_RanIt _First, _RanIt _Last, random_access_iterator_tag) + { // reverse elements in [_First, _Last), random-access iterators + for (; _First < _Last; ++_First) + std::iter_swap(_First, --_Last); + } + +template inline + void reverse(_BidIt _First, _BidIt _Last) + { // reverse elements in [_First, _Last) + _Reverse(_First, _Last, _Iter_cat(_First)); + } + + // TEMPLATE FUNCTION reverse_copy +template inline + _OutIt reverse_copy(_BidIt _First, _BidIt _Last, _OutIt _Dest) + { // copy reversing elements in [_First, _Last) + for (; _First != _Last; ++_Dest) + *_Dest = *--_Last; + return (_Dest); + } + + // TEMPLATE FUNCTION rotate +template inline + void _Rotate(_FwdIt _First, _FwdIt _Mid, _FwdIt _Last, + forward_iterator_tag) + { // rotate [_First, _Last), forward iterators + for (_FwdIt _Next = _Mid; ; ) + { // swap [_First, ...) into place + std::iter_swap(_First, _Next); + if (++_First == _Mid) + if (++_Next == _Last) + break; // done, quit + else + _Mid = _Next; // mark end of next interval + else if (++_Next == _Last) + _Next = _Mid; // wrap to last end + } + } + +template inline + void _Rotate(_BidIt _First, _BidIt _Mid, _BidIt _Last, + bidirectional_iterator_tag) + { // rotate [_First, _Last), bidirectional iterators + std::reverse(_First, _Mid); + std::reverse(_Mid, _Last); + std::reverse(_First, _Last); + } + +template inline + void _Rotate(_RanIt _First, _RanIt _Mid, _RanIt _Last, _Diff *, _Ty *) + { // rotate [_First, _Last), random-access iterators + _Diff _Shift = _Mid - _First; + _Diff _Count = _Last - _First; + + for (_Diff _Factor = _Shift; _Factor != 0; ) + { // find subcycle count as GCD of shift count and length + _Diff _Tmp = _Count % _Factor; + _Count = _Factor, _Factor = _Tmp; + } + + if (_Count < _Last - _First) + for (; 0 < _Count; --_Count) + { // rotate each subcycle + _RanIt _Hole = _First + _Count; + _RanIt _Next = _Hole; + _Ty _Holeval = *_Hole; + _RanIt _Next1 = _Next + _Shift == _Last ? _First : _Next + _Shift; + while (_Next1 != _Hole) + { // percolate elements back around subcycle + *_Next = *_Next1; + _Next = _Next1; + _Next1 = _Shift < _Last - _Next1 ? _Next1 + _Shift + : _First + (_Shift - (_Last - _Next1)); + } + *_Next = _Holeval; + } + } + +template inline + void _Rotate(_RanIt _First, _RanIt _Mid, _RanIt _Last, + random_access_iterator_tag) + { // rotate [_First, _Last), random-access iterators + _Rotate(_First, _Mid, _Last, _Dist_type(_First), _Val_type(_First)); + } + +template inline + void rotate(_FwdIt _First, _FwdIt _Mid, _FwdIt _Last) + { // rotate [_First, _Last) + if (_First != _Mid && _Mid != _Last) + _Rotate(_First, _Mid, _Last, _Iter_cat(_First)); + } + + // TEMPLATE FUNCTION rotate_copy +template inline + _OutIt rotate_copy(_FwdIt _First, _FwdIt _Mid, _FwdIt _Last, _OutIt _Dest) + { // copy rotating [_First, _Last) + _Dest = std::copy(_Mid, _Last, _Dest); + return (std::copy(_First, _Mid, _Dest)); + } + + // TEMPLATE FUNCTION random_shuffle +template inline + void _Random_shuffle(_RanIt _First, _RanIt _Last, _Diff *) + { // shuffle [_First, _Last) + const int _RANDOM_BITS = 15; // minimum random bits from rand() + const int _RANDOM_MAX = (1U << _RANDOM_BITS) - 1; + + _RanIt _Next = _First; + for (unsigned long _Index = 2; ++_Next != _Last; ++_Index) + { // assume unsigned long big enough for _Diff count + unsigned long _Rm = _RANDOM_MAX; + unsigned long _Rn = ::rand() & _RANDOM_MAX; + for (; _Rm < _Index && _Rm != ~0UL; + _Rm = _Rm << _RANDOM_BITS | _RANDOM_MAX) + _Rn = _Rn << _RANDOM_BITS | _RANDOM_MAX; // build random value + + std::iter_swap(_Next, _First + _Diff(_Rn % _Index)); // swap a pair + } + } + +template inline + void random_shuffle(_RanIt _First, _RanIt _Last) + { // shuffle [_First, _Last) + if (_First != _Last) + _Random_shuffle(_First, _Last, _Dist_type(_First)); + } + + // TEMPLATE FUNCTION random_shuffle WITH RANDOM FN +template inline + void _Random_shuffle(_RanIt _First, _RanIt _Last, _Fn1& _Func, _Diff *) + { // shuffle nonempty [_First, _Last) using random function _Func + _RanIt _Next = _First; + + for (_Diff _Index = 2; ++_Next != _Last; ++_Index) + std::iter_swap(_Next, _First + _Diff(_Func(_Index))); + } + +template inline + void random_shuffle(_RanIt _First, _RanIt _Last, _Fn1& _Func) + { // shuffle [_First, _Last) using random function _Func + if (_First != _Last) + _Random_shuffle(_First, _Last, _Func, _Dist_type(_First)); + } + + // TEMPLATE FUNCTION partition +template inline + _BidIt partition(_BidIt _First, _BidIt _Last, _Pr _Pred) + { // move elements satisfying _Pred to beginning of sequence + for (; ; ++_First) + { // find any out-of-order pair + for (; _First != _Last && _Pred(*_First); ++_First) + ; // skip in-place elements at beginning + if (_First == _Last) + break; // done + + for (; _First != --_Last && !_Pred(*_Last); ) + ; // skip in-place elements at end + if (_First == _Last) + break; // done + + std::iter_swap(_First, _Last); // swap out-of-place pair and loop + } + return (_First); + } + + // TEMPLATE FUNCTION stable_partition +template inline + _BidIt _Stable_partition(_BidIt _First, _BidIt _Last, _Pr _Pred, + _Diff _Count, _Temp_iterator<_Ty>& _Tempbuf) + { // partition preserving order of equivalents, using _Pred + if (_Count == 1) + return (_Pred(*_First) ? _Last : _First); + else if (_Count <= _Tempbuf._Maxlen()) + { // temp buffer big enough, copy right partition out and back + _BidIt _Next = _First; + for (_Tempbuf._Init(); _First != _Last; ++_First) + if (_Pred(*_First)) + *_Next++ = *_First; + else + *_Tempbuf++ = *_First; + + std::copy(_Tempbuf._First(), _Tempbuf._Last(), _Next); // copy back + return (_Next); + } + else + { // temp buffer not big enough, divide and conquer + _BidIt _Mid = _First; + std::advance(_Mid, _Count / 2); + + _BidIt _Left = _Stable_partition(_First, _Mid, _Pred, + _Count / 2, _Tempbuf); // form L1R1 in left half + _BidIt _Right = _Stable_partition(_Mid, _Last, _Pred, + _Count - _Count / 2, _Tempbuf); // form L2R2 in right half + + _Diff _Count1 = 0; + _Distance(_Left, _Mid, _Count1); + _Diff _Count2 = 0; + _Distance(_Mid, _Right, _Count2); + + return (_Buffered_rotate(_Left, _Mid, _Right, + _Count1, _Count2, _Tempbuf)); // rotate L1R1L2R2 to L1L2R1R2 + } + } + +template inline + _BidIt _Stable_partition(_BidIt _First, _BidIt _Last, _Pr _Pred, + _Diff *, _Ty *) + { // partition preserving order of equivalents, using _Pred + _Diff _Count = 0; + _Distance(_First, _Last, _Count); + _Temp_iterator<_Ty> _Tempbuf(_Count); + return (_Stable_partition(_First, _Last, _Pred, _Count, _Tempbuf)); + } + +template inline + _BidIt stable_partition(_BidIt _First, _BidIt _Last, _Pr _Pred) + { // partition preserving order of equivalents, using _Pred + return (_First == _Last ? _First : _Stable_partition(_First, _Last, _Pred, + _Dist_type(_First), _Val_type(_First))); + } + + // TEMPLATE FUNCTION push_heap +template inline + void _Push_heap(_RanIt _First, _Diff _Hole, + _Diff _Top, _Ty _Val) + { // percolate _Hole to _Top or where _Val belongs, using operator< + for (_Diff _Idx = (_Hole - 1) / 2; + _Top < _Hole && *(_First + _Idx) < _Val; + _Idx = (_Hole - 1) / 2) + { // move _Hole up to parent + *(_First + _Hole) = *(_First + _Idx); + _Hole = _Idx; + } + + *(_First + _Hole) = _Val; // drop _Val into final hole + } + +template inline + void _Push_heap_0(_RanIt _First, _RanIt _Last, _Diff *, _Ty *) + { // push *_Last onto heap at [_First, _Last), using operator< + _Diff _Count = _Last - _First; + if (0 < _Count) + _Push_heap(_First, _Count, _Diff(0), _Ty(*_Last)); + } + +template inline + void push_heap(_RanIt _First, _RanIt _Last) + { // push *(_Last - 1) onto heap at [_First, _Last - 1), using operator< + if (_First != _Last) + _Push_heap_0(_First, --_Last, + _Dist_type(_First), _Val_type(_First)); + } + + // TEMPLATE FUNCTION push_heap WITH PRED +template inline + void _Push_heap(_RanIt _First, _Diff _Hole, + _Diff _Top, _Ty _Val, _Pr _Pred) + { // percolate _Hole to _Top or where _Val belongs, using operator< + for (_Diff _Idx = (_Hole - 1) / 2; + _Top < _Hole && _Pred(*(_First + _Idx), _Val); + _Idx = (_Hole - 1) / 2) + { // move _Hole up to parent + *(_First + _Hole) = *(_First + _Idx); + _Hole = _Idx; + } + + *(_First + _Hole) = _Val; // drop _Val into final hole + } + +template inline + void _Push_heap_0(_RanIt _First, _RanIt _Last, _Pr _Pred, _Diff *, _Ty *) + { // push *_Last onto heap at [_First, _Last), using _Pred + _Diff _Count = _Last - _First; + if (0 < _Count) + _Push_heap(_First, _Count, _Diff(0), _Ty(*_Last), _Pred); + } + +template inline + void push_heap(_RanIt _First, _RanIt _Last, _Pr _Pred) + { // push *(_Last - 1) onto heap at [_First, _Last - 1), using _Pred + if (_First != _Last) + _Push_heap_0(_First, --_Last, _Pred, + _Dist_type(_First), _Val_type(_First)); + } + + // TEMPLATE FUNCTION pop_heap +template inline + void _Adjust_heap(_RanIt _First, _Diff _Hole, _Diff _Bottom, _Ty _Val) + { // percolate _Hole to _Bottom, then push _Val, using operator< + _Diff _Top = _Hole; + _Diff _Idx = 2 * _Hole + 2; + + for (; _Idx < _Bottom; _Idx = 2 * _Idx + 2) + { // move _Hole down to larger child + if (*(_First + _Idx) < *(_First + (_Idx - 1))) + --_Idx; + *(_First + _Hole) = *(_First + _Idx), _Hole = _Idx; + } + + if (_Idx == _Bottom) + { // only child at bottom, move _Hole down to it + *(_First + _Hole) = *(_First + (_Bottom - 1)); + _Hole = _Bottom - 1; + } + _Push_heap(_First, _Hole, _Top, _Val); + } + +template inline + void _Pop_heap(_RanIt _First, _RanIt _Last, _RanIt _Dest, + _Ty _Val, _Diff *) + { // pop *_First to *_Dest and reheap, using operator< + *_Dest = *_First; + _Adjust_heap(_First, _Diff(0), _Diff(_Last - _First), _Val); + } + +template inline + void _Pop_heap_0(_RanIt _First, _RanIt _Last, _Ty *) + { // pop *_First to *(_Last - 1) and reheap, using operator< + _Pop_heap(_First, _Last - 1, _Last - 1, + _Ty(*(_Last - 1)), _Dist_type(_First)); + } + +template inline + void pop_heap(_RanIt _First, _RanIt _Last) + { // pop *_First to *(_Last - 1) and reheap, using operator< + if (1 < _Last - _First) + _Pop_heap_0(_First, _Last, _Val_type(_First)); + } + + // TEMPLATE FUNCTION pop_heap WITH PRED +template inline + void _Adjust_heap(_RanIt _First, _Diff _Hole, _Diff _Bottom, + _Ty _Val, _Pr _Pred) + { // percolate _Hole to _Bottom, then push _Val, using _Pred + _Diff _Top = _Hole; + _Diff _Idx = 2 * _Hole + 2; + + for (; _Idx < _Bottom; _Idx = 2 * _Idx + 2) + { // move _Hole down to larger child + if (_Pred(*(_First + _Idx), *(_First + (_Idx - 1)))) + --_Idx; + *(_First + _Hole) = *(_First + _Idx), _Hole = _Idx; + } + + if (_Idx == _Bottom) + { // only child at bottom, move _Hole down to it + *(_First + _Hole) = *(_First + (_Bottom - 1)); + _Hole = _Bottom - 1; + } + _Push_heap(_First, _Hole, _Top, _Val, _Pred); + } + +template inline + void _Pop_heap(_RanIt _First, _RanIt _Last, _RanIt _Dest, + _Ty _Val, _Pr _Pred, _Diff *) + { // pop *_First to *_Dest and reheap, using _Pred + *_Dest = *_First; + _Adjust_heap(_First, _Diff(0), _Diff(_Last - _First), _Val, _Pred); + } + +template inline + void _Pop_heap_0(_RanIt _First, _RanIt _Last, _Pr _Pred, _Ty *) + { // pop *_First to *(_Last - 1) and reheap, using _Pred + _Pop_heap(_First, _Last - 1, _Last - 1, + _Ty(*(_Last - 1)), _Pred, _Dist_type(_First)); + } + +template inline + void pop_heap(_RanIt _First, _RanIt _Last, _Pr _Pred) + { // pop *_First to *(_Last - 1) and reheap, using _Pred + if (1 < _Last - _First) + _Pop_heap_0(_First, _Last, _Pred, _Val_type(_First)); + } + + // TEMPLATE FUNCTION make_heap +template inline + void _Make_heap(_RanIt _First, _RanIt _Last, _Diff *, _Ty *) + { // make nontrivial [_First, _Last) into a heap, using operator< + _Diff _Bottom = _Last - _First; + + for (_Diff _Hole = _Bottom / 2; 0 < _Hole; ) + { // reheap top half, bottom to top + --_Hole; + _Adjust_heap(_First, _Hole, _Bottom, _Ty(*(_First + _Hole))); + } + } + +template inline + void make_heap(_RanIt _First, _RanIt _Last) + { // make [_First, _Last) into a heap, using operator< + if (1 < _Last - _First) + _Make_heap(_First, _Last, + _Dist_type(_First), _Val_type(_First)); + } + + // TEMPLATE FUNCTION make_heap WITH PRED +template inline + void _Make_heap(_RanIt _First, _RanIt _Last, _Pr _Pred, _Diff *, _Ty *) + { // make nontrivial [_First, _Last) into a heap, using _Pred + _Diff _Bottom = _Last - _First; + for (_Diff _Hole = _Bottom / 2; 0 < _Hole; ) + { // reheap top half, bottom to top + --_Hole; + _Adjust_heap(_First, _Hole, _Bottom, + _Ty(*(_First + _Hole)), _Pred); + } + } + +template inline + void make_heap(_RanIt _First, _RanIt _Last, _Pr _Pred) + { // make [_First, _Last) into a heap, using _Pred + if (1 < _Last - _First) + _Make_heap(_First, _Last, _Pred, + _Dist_type(_First), _Val_type(_First)); + } + + // TEMPLATE FUNCTION sort_heap +template inline + void sort_heap(_RanIt _First, _RanIt _Last) + { // order heap by repeatedly popping, using operator< + for (; 1 < _Last - _First; --_Last) + std::pop_heap(_First, _Last); + } + + // TEMPLATE FUNCTION sort_heap WITH PRED +template inline + void sort_heap(_RanIt _First, _RanIt _Last, _Pr _Pred) + { // order heap by repeatedly popping, using _Pred + for (; 1 < _Last - _First; --_Last) + std::pop_heap(_First, _Last, _Pred); + } + + // TEMPLATE FUNCTION lower_bound +template inline + _FwdIt _Lower_bound(_FwdIt _First, _FwdIt _Last, const _Ty& _Val, _Diff *) + { // find first element not before _Val, using operator< + _Diff _Count = 0; + _Distance(_First, _Last, _Count); + + for (; 0 < _Count; ) + { // divide and conquer, find half that contains answer + _Diff _Count2 = _Count / 2; + _FwdIt _Mid = _First; + std::advance(_Mid, _Count2); + + if (*_Mid < _Val) + _First = ++_Mid, _Count -= _Count2 + 1; + else + _Count = _Count2; + } + return (_First); + } + +template inline + _FwdIt lower_bound(_FwdIt _First, _FwdIt _Last, const _Ty& _Val) + { // find first element not before _Val, using operator< + return (_Lower_bound(_First, _Last, _Val, _Dist_type(_First))); + } + + // TEMPLATE FUNCTION lower_bound WITH PRED +template inline + _FwdIt _Lower_bound(_FwdIt _First, _FwdIt _Last, + const _Ty& _Val, _Pr _Pred, _Diff *) + { // find first element not before _Val, using _Pred + _Diff _Count = 0; + _Distance(_First, _Last, _Count); + for (; 0 < _Count; ) + { // divide and conquer, find half that contains answer + _Diff _Count2 = _Count / 2; + _FwdIt _Mid = _First; + std::advance(_Mid, _Count2); + + if (_Pred(*_Mid, _Val)) + _First = ++_Mid, _Count -= _Count2 + 1; + else + _Count = _Count2; + } + return (_First); + } + +template inline + _FwdIt lower_bound(_FwdIt _First, _FwdIt _Last, + const _Ty& _Val, _Pr _Pred) + { // find first element not before _Val, using _Pred + return (_Lower_bound(_First, _Last, _Val, _Pred, _Dist_type(_First))); + } + + // TEMPLATE FUNCTION upper_bound +template inline + _FwdIt _Upper_bound(_FwdIt _First, _FwdIt _Last, const _Ty& _Val, _Diff *) + { // find first element that _Val is before, using operator< + _Diff _Count = 0; + _Distance(_First, _Last, _Count); + for (; 0 < _Count; ) + { // divide and conquer, find half that contains answer + _Diff _Count2 = _Count / 2; + _FwdIt _Mid = _First; + std::advance(_Mid, _Count2); + + if (!(_Val < *_Mid)) + _First = ++_Mid, _Count -= _Count2 + 1; + else + _Count = _Count2; + } + return (_First); + } + +template inline + _FwdIt upper_bound(_FwdIt _First, _FwdIt _Last, const _Ty& _Val) + { // find first element that _Val is before, using operator< + return (_Upper_bound(_First, _Last, _Val, _Dist_type(_First))); + } + + // TEMPLATE FUNCTION upper_bound WITH PRED +template inline + _FwdIt _Upper_bound(_FwdIt _First, _FwdIt _Last, + const _Ty& _Val, _Pr _Pred, _Diff *) + { // find first element that _Val is before, using _Pred + _Diff _Count = 0; + _Distance(_First, _Last, _Count); + for (; 0 < _Count; ) + { // divide and conquer, find half that contains answer + _Diff _Count2 = _Count / 2; + _FwdIt _Mid = _First; + std::advance(_Mid, _Count2); + + if (!_Pred(_Val, *_Mid)) + _First = ++_Mid, _Count -= _Count2 + 1; + else + _Count = _Count2; + } + return (_First); + } + +template inline + _FwdIt upper_bound(_FwdIt _First, _FwdIt _Last, + const _Ty& _Val, _Pr _Pred) + { // find first element that _Val is before, using _Pred + return (_Upper_bound(_First, _Last, _Val, _Pred, _Dist_type(_First))); + } + + // TEMPLATE FUNCTION equal_range +template inline + pair<_FwdIt, _FwdIt> _Equal_range(_FwdIt _First, _FwdIt _Last, + const _Ty& _Val, _Diff *) + { // find range equivalent to _Val, using operator< + _Diff _Count = 0; + _Distance(_First, _Last, _Count); + + for (; 0 < _Count; ) + { // divide and conquer, check midpoint + _Diff _Count2 = _Count / 2; + _FwdIt _Mid = _First; + std::advance(_Mid, _Count2); + + if (*_Mid < _Val) + { // range begins above _Mid, loop + _First = ++_Mid; + _Count -= _Count2 + 1; + } + else if (_Val < *_Mid) + _Count = _Count2; // range in first half, loop + else + { // range straddles mid, find each end and return + _FwdIt _First2 = lower_bound(_First, _Mid, _Val); + std::advance(_First, _Count); + _FwdIt _Last2 = upper_bound(++_Mid, _First, _Val); + return (pair<_FwdIt, _FwdIt>(_First2, _Last2)); + } + } + + return (pair<_FwdIt, _FwdIt>(_First, _First)); // empty range + } + +template inline + pair<_FwdIt, _FwdIt> equal_range(_FwdIt _First, _FwdIt _Last, + const _Ty& _Val) + { // find range equivalent to _Val, using operator< + return (_Equal_range(_First, _Last, _Val, _Dist_type(_First))); + } + + // TEMPLATE FUNCTION equal_range WITH PRED +template inline + pair<_FwdIt, _FwdIt> _Equal_range(_FwdIt _First, _FwdIt _Last, + const _Ty& _Val, _Pr _Pred, _Diff *) + { // find range equivalent to _Val, using _Pred + _Diff _Count = 0; + _Distance(_First, _Last, _Count); + + for (; 0 < _Count; ) + { // divide and conquer, check midpoint + _Diff _Count2 = _Count / 2; + _FwdIt _Mid = _First; + std::advance(_Mid, _Count2); + + if (_Pred(*_Mid, _Val)) + { // range begins above _Mid, loop + _First = ++_Mid; + _Count -= _Count2 + 1; + } + else if (_Pred(_Val, *_Mid)) + _Count = _Count2; // range in first half, loop + else + { // range straddles _Mid, find each end and return + _FwdIt _First2 = lower_bound(_First, _Mid, _Val, _Pred); + std::advance(_First, _Count); + _FwdIt _Last2 = upper_bound(++_Mid, _First, _Val, _Pred); + return (pair<_FwdIt, _FwdIt>(_First2, _Last2)); + } + } + + return (pair<_FwdIt, _FwdIt>(_First, _First)); // empty range + } + +template inline + pair<_FwdIt, _FwdIt> equal_range(_FwdIt _First, _FwdIt _Last, + const _Ty& _Val, _Pr _Pred) + { // find range equivalent to _Val, using _Pred + return (_Equal_range(_First, _Last, _Val, _Pred, _Dist_type(_First))); + } + + // TEMPLATE FUNCTION binary_search +template inline + bool binary_search(_FwdIt _First, _FwdIt _Last, const _Ty& _Val) + { // test if _Val equivalent to some element, using operator< + _First = std::lower_bound(_First, _Last, _Val); + return (_First != _Last && !(_Val < *_First)); + } + + // TEMPLATE FUNCTION binary_search WITH PRED +template inline + bool binary_search(_FwdIt _First, _FwdIt _Last, + const _Ty& _Val, _Pr _Pred) + { // test if _Val equivalent to some element, using _Pred + _First = std::lower_bound(_First, _Last, _Val, _Pred); + return (_First != _Last && !_Pred(_Val, *_First)); + } + + // TEMPLATE FUNCTION merge +template inline + _OutIt merge(_InIt1 _First1, _InIt1 _Last1, + _InIt2 _First2, _InIt2 _Last2, _OutIt _Dest) + { // copy merging ranges, both using operator< + for (; _First1 != _Last1 && _First2 != _Last2; ++_Dest) + if (*_First2 < *_First1) + *_Dest = *_First2, ++_First2; + else + *_Dest = *_First1, ++_First1; + + _Dest = std::copy(_First1, _Last1, _Dest); // copy any tail + return (std::copy(_First2, _Last2, _Dest)); + } + + // TEMPLATE FUNCTION merge WITH PRED +template inline + _OutIt merge(_InIt1 _First1, _InIt1 _Last1, + _InIt2 _First2, _InIt2 _Last2, _OutIt _Dest, _Pr _Pred) + { // copy merging ranges, both using _Pred + for (; _First1 != _Last1 && _First2 != _Last2; ++_Dest) + if (_Pred(*_First2, *_First1)) + *_Dest = *_First2, ++_First2; + else + *_Dest = *_First1, ++_First1; + + _Dest = std::copy(_First1, _Last1, _Dest); // copy any tail + return (std::copy(_First2, _Last2, _Dest)); + } + + // TEMPLATE FUNCTION inplace_merge +template inline + _BidIt _Buffered_rotate(_BidIt _First, _BidIt _Mid, _BidIt _Last, + _Diff _Count1, _Diff _Count2, _Temp_iterator<_Ty>& _Tempbuf) + { // rotate [_First, _Last) using temp buffer + if (_Count1 <= _Count2 && _Count1 <= _Tempbuf._Maxlen()) + { // buffer left partition, then copy parts + std::copy(_First, _Mid, _Tempbuf._Init()); + std::copy(_Mid, _Last, _First); + return (std::copy_backward(_Tempbuf._First(), _Tempbuf._Last(), + _Last)); + } + else if (_Count2 <= _Tempbuf._Maxlen()) + { // buffer right partition, then copy parts + std::copy(_Mid, _Last, _Tempbuf._Init()); + std::copy_backward(_First, _Mid, _Last); + return (std::copy(_Tempbuf._First(), _Tempbuf._Last(), _First)); + } + else + { // buffer too small, rotate in place + std::rotate(_First, _Mid, _Last); + std::advance(_First, _Count2); + return (_First); + } + } + +template inline + _BidIt3 _Merge_backward(_BidIt1 _First1, _BidIt1 _Last1, + _BidIt2 _First2, _BidIt2 _Last2, _BidIt3 _Dest) + { // merge backwards to _Dest, using operator< + for (; ; ) + if (_First1 == _Last1) + return (std::copy_backward(_First2, _Last2, _Dest)); + else if (_First2 == _Last2) + return (std::copy_backward(_First1, _Last1, _Dest)); + else if (*--_Last2 < *--_Last1) + *--_Dest = *_Last1, ++_Last2; + else + *--_Dest = *_Last2, ++_Last1; + } + +template inline + void _Buffered_merge(_BidIt _First, _BidIt _Mid, _BidIt _Last, + _Diff _Count1, _Diff _Count2, + _Temp_iterator<_Ty>& _Tempbuf) + { // merge [_First, _Mid) with [_Mid, _Last), using operator< + if (_Count1 + _Count2 == 2) + { // order two one-element partitions + if (*_Mid < *_First) + std::iter_swap(_First, _Mid); + } + else if (_Count1 <= _Count2 && _Count1 <= _Tempbuf._Maxlen()) + { // buffer left partition, then merge + std::copy(_First, _Mid, _Tempbuf._Init()); + std::merge(_Tempbuf._First(), _Tempbuf._Last(), _Mid, _Last, _First); + } + else if (_Count2 <= _Tempbuf._Maxlen()) + { // buffer right partition, then merge + std::copy(_Mid, _Last, _Tempbuf._Init()); + _Merge_backward(_First, _Mid, + _Tempbuf._First(), _Tempbuf._Last(), _Last); + } + else + { // buffer too small, divide and conquer + _BidIt _Firstn, _Lastn; + _Diff _Count1n, _Count2n; + + if (_Count2 < _Count1) + { // left larger, cut it in half and partition right to match + _Count1n = _Count1 / 2, _Count2n = 0; + _Firstn = _First; + std::advance(_Firstn, _Count1n); + _Lastn = std::lower_bound(_Mid, _Last, *_Firstn); + _Distance(_Mid, _Lastn, _Count2n); + } + else + { // right larger, cut it in half and partition left to match + _Count1n = 0, _Count2n = _Count2 / 2; + _Lastn = _Mid; + std::advance(_Lastn, _Count2n); + _Firstn = std::upper_bound(_First, _Mid, *_Lastn); + _Distance(_First, _Firstn, _Count1n); + } + + _BidIt _Midn = _Buffered_rotate(_Firstn, _Mid, _Lastn, + _Count1 - _Count1n, _Count2n, _Tempbuf); // rearrange middle + _Buffered_merge(_First, _Firstn, _Midn, + _Count1n, _Count2n, _Tempbuf); // merge each new part + _Buffered_merge(_Midn, _Lastn, _Last, + _Count1 - _Count1n, _Count2 - _Count2n, _Tempbuf); + } + } + +template inline + void _Inplace_merge(_BidIt _First, _BidIt _Mid, _BidIt _Last, + _Diff *, _Ty *) + { // merge [_First, _Mid) with [_Mid, _Last), using operator< + _Diff _Count1 = 0; + _Distance(_First, _Mid, _Count1); + _Diff _Count2 = 0; + _Distance(_Mid, _Last, _Count2); + _Temp_iterator<_Ty> _Tempbuf(_Count1 < _Count2 ? _Count1 : _Count2); + _Buffered_merge(_First, _Mid, _Last, + _Count1, _Count2, _Tempbuf); + } + +template inline + void inplace_merge(_BidIt _First, _BidIt _Mid, _BidIt _Last) + { // merge [_First, _Mid) with [_Mid, _Last), using operator< + if (_First != _Mid && _Mid != _Last) + _Inplace_merge(_First, _Mid, _Last, + _Dist_type(_First), _Val_type(_First)); + } + + // TEMPLATE FUNCTION inplace_merge WITH PRED +template inline + _BidIt3 _Merge_backward(_BidIt1 _First1, _BidIt1 _Last1, + _BidIt2 _First2, _BidIt2 _Last2, _BidIt3 _Dest, _Pr _Pred) + { // merge backwards to _Dest, using _Pred + for (; ; ) + if (_First1 == _Last1) + return (std::copy_backward(_First2, _Last2, _Dest)); + else if (_First2 == _Last2) + return (std::copy_backward(_First1, _Last1, _Dest)); + else if (_Pred(*--_Last2, *--_Last1)) + *--_Dest = *_Last1, ++_Last2; + else + *--_Dest = *_Last2, ++_Last1; + } + +template inline + void _Buffered_merge(_BidIt _First, _BidIt _Mid, _BidIt _Last, + _Diff _Count1, _Diff _Count2, + _Temp_iterator<_Ty>& _Tempbuf, _Pr _Pred) + { // merge [_First, _Mid) with [_Mid, _Last), using _Pred + if (_Count1 + _Count2 == 2) + { // order two one-element partitions + if (_Pred(*_Mid, *_First)) + std::iter_swap(_First, _Mid); + } + else if (_Count1 <= _Count2 && _Count1 <= _Tempbuf._Maxlen()) + { // buffer left partition, then merge + std::copy(_First, _Mid, _Tempbuf._Init()); + std::merge(_Tempbuf._First(), _Tempbuf._Last(), + _Mid, _Last, _First, _Pred); + } + else if (_Count2 <= _Tempbuf._Maxlen()) + { // buffer right partition, then merge + std::copy(_Mid, _Last, _Tempbuf._Init()); + _Merge_backward(_First, _Mid, _Tempbuf._First(), _Tempbuf._Last(), + _Last, _Pred); + } + else + { // buffer too small, divide and conquer + _BidIt _Firstn, _Lastn; + _Diff _Count1n, _Count2n; + if (_Count2 < _Count1) + { // left larger, cut it in half and partition right to match + _Count1n = _Count1 / 2, _Count2n = 0; + _Firstn = _First; + std::advance(_Firstn, _Count1n); + _Lastn = lower_bound(_Mid, _Last, *_Firstn, _Pred); + _Distance(_Mid, _Lastn, _Count2n); + } + else + { // right larger, cut it in half and partition left to match + _Count1n = 0, _Count2n = _Count2 / 2; + _Lastn = _Mid; + std::advance(_Lastn, _Count2n); + _Firstn = upper_bound(_First, _Mid, *_Lastn, _Pred); + _Distance(_First, _Firstn, _Count1n); + } + _BidIt _Midn = _Buffered_rotate(_Firstn, _Mid, _Lastn, + _Count1 - _Count1n, _Count2n, _Tempbuf); // rearrange middle + _Buffered_merge(_First, _Firstn, _Midn, + _Count1n, _Count2n, _Tempbuf, _Pred); // merge each new part + _Buffered_merge(_Midn, _Lastn, _Last, + _Count1 - _Count1n, _Count2 - _Count2n, _Tempbuf, _Pred); + } + } + +template inline + void _Inplace_merge(_BidIt _First, _BidIt _Mid, _BidIt _Last, _Pr _Pred, + _Diff *, _Ty *) + { // merge [_First, _Mid) with [_Mid, _Last), using _Pred + _Diff _Count1 = 0; + _Distance(_First, _Mid, _Count1); + _Diff _Count2 = 0; + _Distance(_Mid, _Last, _Count2); + _Temp_iterator<_Ty> _Tempbuf(_Count1 < _Count2 ? _Count1 : _Count2); + _Buffered_merge(_First, _Mid, _Last, + _Count1, _Count2, _Tempbuf, _Pred); + } + +template inline + void inplace_merge(_BidIt _First, _BidIt _Mid, _BidIt _Last, _Pr _Pred) + { // merge [_First, _Mid) with [_Mid, _Last), using _Pred + if (_First != _Mid && _Mid != _Last) + _Inplace_merge(_First, _Mid, _Last, _Pred, + _Dist_type(_First), _Val_type(_First)); + } + + // TEMPLATE FUNCTION sort +template inline + void _Insertion_sort(_BidIt _First, _BidIt _Last) + { // insertion sort [_First, _Last), using operator< + if (_First != _Last) + for (_BidIt _Next = _First; ++_Next != _Last; ) + if (*_Next < *_First) + { // found new earliest element, rotate to front + _BidIt _Next1 = _Next; + std::rotate(_First, _Next, ++_Next1); + } + else + { // look for insertion point after first + _BidIt _Dest = _Next; + for (_BidIt _Dest0 = _Dest; *_Next < *--_Dest0; ) + _Dest = _Dest0; + if (_Dest != _Next) + { // rotate into place + _BidIt _Next1 = _Next; + std::rotate(_Dest, _Next, ++_Next1); + } + } + } + +template inline + void _Med3(_RanIt _First, _RanIt _Mid, _RanIt _Last) + { // sort median of three elements to middle + if (*_Mid < *_First) + std::iter_swap(_Mid, _First); + if (*_Last < *_Mid) + std::iter_swap(_Last, _Mid); + if (*_Mid < *_First) + std::iter_swap(_Mid, _First); + } + +template inline + void _Median(_RanIt _First, _RanIt _Mid, _RanIt _Last) + { // sort median element to middle + if (40 < _Last - _First) + { // median of nine + int _Step = (_Last - _First + 1) / 8; + _Med3(_First, _First + _Step, _First + 2 * _Step); + _Med3(_Mid - _Step, _Mid, _Mid + _Step); + _Med3(_Last - 2 * _Step, _Last - _Step, _Last); + _Med3(_First + _Step, _Mid, _Last - _Step); + } + else + _Med3(_First, _Mid, _Last); + } + +template inline + pair<_RanIt, _RanIt> _Unguarded_partition(_RanIt _First, _RanIt _Last) + { // partition [_First, _Last), using operator< + _RanIt _Mid = _First + (_Last - _First) / 2; // sort median to _Mid + _Median(_First, _Mid, _Last - 1); + _RanIt _Pfirst = _Mid; + _RanIt _Plast = _Pfirst + 1; + + while (_First < _Pfirst + && !(*(_Pfirst - 1) < *_Pfirst) + && !(*_Pfirst < *(_Pfirst - 1))) + --_Pfirst; + while (_Plast < _Last + && !(*_Plast < *_Pfirst) + && !(*_Pfirst < *_Plast)) + ++_Plast; + + _RanIt _Gfirst = _Plast; + _RanIt _Glast = _Pfirst; + + for (; ; ) + { // partition + for (; _Gfirst < _Last; ++_Gfirst) + if (*_Pfirst < *_Gfirst) + ; + else if (*_Gfirst < *_Pfirst) + break; + else + std::iter_swap(_Plast++, _Gfirst); + for (; _First < _Glast; --_Glast) + if (*(_Glast - 1) < *_Pfirst) + ; + else if (*_Pfirst < *(_Glast - 1)) + break; + else + std::iter_swap(--_Pfirst, _Glast - 1); + if (_Glast == _First && _Gfirst == _Last) + return (pair<_RanIt, _RanIt>(_Pfirst, _Plast)); + + if (_Glast == _First) + { // no room at bottom, rotate pivot upward + if (_Plast != _Gfirst) + std::iter_swap(_Pfirst, _Plast); + ++_Plast; + std::iter_swap(_Pfirst++, _Gfirst++); + } + else if (_Gfirst == _Last) + { // no room at top, rotate pivot downward + if (--_Glast != --_Pfirst) + std::iter_swap(_Glast, _Pfirst); + std::iter_swap(_Pfirst, --_Plast); + } + else + std::iter_swap(_Gfirst++, --_Glast); + } + } + +template inline + void _Sort(_RanIt _First, _RanIt _Last, _Diff _Ideal) + { // order [_First, _Last), using operator< + _Diff _Count; + for (; _ISORT_MAX < (_Count = _Last - _First) && 0 < _Ideal; ) + { // divide and conquer by quicksort + pair<_RanIt, _RanIt> _Mid = _Unguarded_partition(_First, _Last); + _Ideal /= 2, _Ideal += _Ideal / 2; // allow 1.5 log2(N) divisions + + if (_Mid.first - _First < _Last - _Mid.second) // loop on larger half + _Sort(_First, _Mid.first, _Ideal), _First = _Mid.second; + else + _Sort(_Mid.second, _Last, _Ideal), _Last = _Mid.first; + } + + if (_ISORT_MAX < _Count) + { // heap sort if too many divisions + std::make_heap(_First, _Last); + std::sort_heap(_First, _Last); + } + else if (1 < _Count) + _Insertion_sort(_First, _Last); // small, insertion sort + } + +template inline + void sort(_RanIt _First, _RanIt _Last) + { // order [_First, _Last), using operator< + _Sort(_First, _Last, _Last - _First); + } + + // TEMPLATE FUNCTION sort WITH PRED +template inline + void _Insertion_sort(_BidIt _First, _BidIt _Last, _Pr _Pred) + { // insertion sort [_First, _Last), using _Pred + if (_First != _Last) + for (_BidIt _Next = _First; ++_Next != _Last; ) + if (_Pred(*_Next, *_First)) + { // found new earliest element, rotate to front + _BidIt _Next1 = _Next; + std::rotate(_First, _Next, ++_Next1); + } + else + { // look for insertion point after first + _BidIt _Dest = _Next; + for (_BidIt _Dest0 = _Dest; _Pred(*_Next, *--_Dest0); ) + _Dest = _Dest0; + if (_Dest != _Next) + { // rotate into place + _BidIt _Next1 = _Next; + std::rotate(_Dest, _Next, ++_Next1); + } + } + } + +template inline + void _Med3(_RanIt _First, _RanIt _Mid, _RanIt _Last, _Pr _Pred) + { // sort median of three elements to middle + if (_Pred(*_Mid, *_First)) + std::iter_swap(_Mid, _First); + if (_Pred(*_Last, *_Mid)) + std::iter_swap(_Last, _Mid); + if (_Pred(*_Mid, *_First)) + std::iter_swap(_Mid, _First); + } + +template inline + void _Median(_RanIt _First, _RanIt _Mid, _RanIt _Last, _Pr _Pred) + { // sort median element to middle + if (40 < _Last - _First) + { // median of nine + int _Step = (_Last - _First + 1) / 8; + _Med3(_First, _First + _Step, _First + 2 * _Step, _Pred); + _Med3(_Mid - _Step, _Mid, _Mid + _Step, _Pred); + _Med3(_Last - 2 * _Step, _Last - _Step, _Last, _Pred); + _Med3(_First + _Step, _Mid, _Last - _Step, _Pred); + } + else + _Med3(_First, _Mid, _Last, _Pred); + } + +template inline + pair<_RanIt, _RanIt> _Unguarded_partition(_RanIt _First, _RanIt _Last, + _Pr _Pred) + { // partition [_First, _Last), using _Pred + _RanIt _Mid = _First + (_Last - _First) / 2; + _Median(_First, _Mid, _Last - 1, _Pred); + _RanIt _Pfirst = _Mid; + _RanIt _Plast = _Pfirst + 1; + + while (_First < _Pfirst + && !_Pred(*(_Pfirst - 1), *_Pfirst) + && !_Pred(*_Pfirst, *(_Pfirst - 1))) + --_Pfirst; + while (_Plast < _Last + && !_Pred(*_Plast, *_Pfirst) + && !_Pred(*_Pfirst, *_Plast)) + ++_Plast; + + _RanIt _Gfirst = _Plast; + _RanIt _Glast = _Pfirst; + + for (; ; ) + { // partition + for (; _Gfirst < _Last; ++_Gfirst) + if (_Pred(*_Pfirst, *_Gfirst)) + ; + else if (_Pred(*_Gfirst, *_Pfirst)) + break; + else + std::iter_swap(_Plast++, _Gfirst); + for (; _First < _Glast; --_Glast) + if (_Pred(*(_Glast - 1), *_Pfirst)) + ; + else if (_Pred(*_Pfirst, *(_Glast - 1))) + break; + else + std::iter_swap(--_Pfirst, _Glast - 1); + if (_Glast == _First && _Gfirst == _Last) + return (pair<_RanIt, _RanIt>(_Pfirst, _Plast)); + + if (_Glast == _First) + { // no room at bottom, rotate pivot upward + if (_Plast != _Gfirst) + std::iter_swap(_Pfirst, _Plast); + ++_Plast; + std::iter_swap(_Pfirst++, _Gfirst++); + } + else if (_Gfirst == _Last) + { // no room at top, rotate pivot downward + if (--_Glast != --_Pfirst) + std::iter_swap(_Glast, _Pfirst); + std::iter_swap(_Pfirst, --_Plast); + } + else + std::iter_swap(_Gfirst++, --_Glast); + } + } + +template inline + void _Sort(_RanIt _First, _RanIt _Last, _Diff _Ideal, _Pr _Pred) + { // order [_First, _Last), using _Pred + _Diff _Count; + for (; _ISORT_MAX < (_Count = _Last - _First) && 0 < _Ideal; ) + { // divide and conquer by quicksort + pair<_RanIt, _RanIt> _Mid = + _Unguarded_partition(_First, _Last, _Pred); + _Ideal /= 2, _Ideal += _Ideal / 2; // allow 1.5 log2(N) divisions + + if (_Mid.first - _First < _Last - _Mid.second) // loop on larger half + _Sort(_First, _Mid.first, _Ideal, _Pred), _First = _Mid.second; + else + _Sort(_Mid.second, _Last, _Ideal, _Pred), _Last = _Mid.first; + } + + if (_ISORT_MAX < _Count) + { // heap sort if too many divisions + std::make_heap(_First, _Last, _Pred); + std::sort_heap(_First, _Last, _Pred); + } + else if (1 < _Count) + _Insertion_sort(_First, _Last, _Pred); // small, insertion sort + } + +template inline + void sort(_RanIt _First, _RanIt _Last, _Pr _Pred) + { // order [_First, _Last), using _Pred + _Sort(_First, _Last, _Last - _First, _Pred); + } + + // TEMPLATE FUNCTION stable_sort +template inline + void _Chunked_merge(_BidIt _First, _BidIt _Last, _OutIt _Dest, + _Diff _Chunk, _Diff _Count) + { // copy merging chunks, using operator< + for (_Diff _Chunk2 = _Chunk * 2; _Chunk2 <= _Count; _Count -= _Chunk2) + { // copy merging pairs of adjacent chunks + _BidIt _Mid1 = _First; + std::advance(_Mid1, _Chunk); + _BidIt _Mid2 = _Mid1; + std::advance(_Mid2, _Chunk); + + _Dest = std::merge(_First, _Mid1, _Mid1, _Mid2, _Dest); + _First = _Mid2; + } + + if (_Count <= _Chunk) + std::copy(_First, _Last, _Dest); // copy partial last chunk + else + { // copy merging whole and partial last chunk + _BidIt _Mid = _First; + std::advance(_Mid, _Chunk); + + std::merge(_First, _Mid, _Mid, _Last, _Dest); + } + } + +template inline + void _Buffered_merge_sort(_BidIt _First, _BidIt _Last, _Diff _Count, + _Temp_iterator<_Ty>& _Tempbuf) + { // sort using temp buffer for merges, using operator< + _BidIt _Mid = _First; + for (_Diff _Nleft = _Count; _ISORT_MAX <= _Nleft; _Nleft -= _ISORT_MAX) + { // sort chunks + _BidIt _Midend = _Mid; + std::advance(_Midend, (int)_ISORT_MAX); + + _Insertion_sort(_Mid, _Midend); + _Mid = _Midend; + } + _Insertion_sort(_Mid, _Last); // sort partial last chunk + + for (_Diff _Chunk = _ISORT_MAX; _Chunk < _Count; _Chunk *= 2) + { // merge adjacent pairs of chunks to and from temp buffer + _Chunked_merge(_First, _Last, _Tempbuf._Init(), + _Chunk, _Count); + _Chunked_merge(_Tempbuf._First(), _Tempbuf._Last(), _First, + _Chunk *= 2, _Count); + } + } + +template inline + void _Stable_sort(_BidIt _First, _BidIt _Last, _Diff _Count, + _Temp_iterator<_Ty>& _Tempbuf) + { // sort preserving order of equivalents, using operator< + if (_Count <= _ISORT_MAX) + _Insertion_sort(_First, _Last); // small, insertion sort + else + { // sort halves and merge + _Diff _Count2 = (_Count + 1) / 2; + _BidIt _Mid = _First; + std::advance(_Mid, _Count2); + + if (_Count2 <= _Tempbuf._Maxlen()) + { // temp buffer big enough, sort each half using buffer + _Buffered_merge_sort(_First, _Mid, _Count2, _Tempbuf); + _Buffered_merge_sort(_Mid, _Last, _Count - _Count2, _Tempbuf); + } + else + { // temp buffer not big enough, divide and conquer + _Stable_sort(_First, _Mid, _Count2, _Tempbuf); + _Stable_sort(_Mid, _Last, _Count - _Count2, _Tempbuf); + } + + _Buffered_merge(_First, _Mid, _Last, + _Count2, _Count - _Count2, _Tempbuf); // merge sorted halves + } + } + +template inline + void _Stable_sort(_BidIt _First, _BidIt _Last, _Diff *, _Ty *) + { // sort preserving order of equivalents, using operator< + _Diff _Count = 0; + _Distance(_First, _Last, _Count); + _Temp_iterator<_Ty> _Tempbuf(_Count); + _Stable_sort(_First, _Last, _Count, _Tempbuf); + } + +template inline + void stable_sort(_BidIt _First, _BidIt _Last) + { // sort preserving order of equivalents, using operator< + if (_First != _Last) + _Stable_sort(_First, _Last, _Dist_type(_First), _Val_type(_First)); + } + + // TEMPLATE FUNCTION stable_sort WITH PRED +template inline + void _Chunked_merge(_BidIt _First, _BidIt _Last, _OutIt _Dest, + _Diff _Chunk, _Diff _Count, _Pr _Pred) + { // copy merging chunks, using _Pred + for (_Diff _Chunk2 = _Chunk * 2; _Chunk2 <= _Count; _Count -= _Chunk2) + { // copy merging pairs of adjacent chunks + _BidIt _Mid1 = _First; + std::advance(_Mid1, _Chunk); + _BidIt _Mid2 = _Mid1; + std::advance(_Mid2, _Chunk); + + _Dest = std::merge(_First, _Mid1, _Mid1, _Mid2, _Dest, _Pred); + _First = _Mid2; + } + + if (_Count <= _Chunk) + std::copy(_First, _Last, _Dest); // copy partial last chunk + else + { // copy merging whole and partial last chunk + _BidIt _Mid1 = _First; + std::advance(_Mid1, _Chunk); + + std::merge(_First, _Mid1, _Mid1, _Last, _Dest, _Pred); + } + } + +template inline + void _Buffered_merge_sort(_BidIt _First, _BidIt _Last, _Diff _Count, + _Temp_iterator<_Ty>& _Tempbuf, _Pr _Pred) + { // sort using temp buffer for merges, using _Pred + _BidIt _Mid = _First; + for (_Diff _Nleft = _Count; _ISORT_MAX <= _Nleft; _Nleft -= _ISORT_MAX) + { // sort chunks + _BidIt _Midn = _Mid; + std::advance(_Midn, (int)_ISORT_MAX); + + _Insertion_sort(_Mid, _Midn, _Pred); + _Mid = _Midn; + } + _Insertion_sort(_Mid, _Last, _Pred); // sort partial last chunk + + for (_Diff _Chunk = _ISORT_MAX; _Chunk < _Count; _Chunk *= 2) + { // merge adjacent pairs of chunks to and from temp buffer + _Chunked_merge(_First, _Last, _Tempbuf._Init(), + _Chunk, _Count, _Pred); + _Chunked_merge(_Tempbuf._First(), _Tempbuf._Last(), _First, + _Chunk *= 2, _Count, _Pred); + } + } + +template inline + void _Stable_sort(_BidIt _First, _BidIt _Last, _Diff _Count, + _Temp_iterator<_Ty>& _Tempbuf, _Pr _Pred) + { // sort preserving order of equivalents, using _Pred + if (_Count <= _ISORT_MAX) + _Insertion_sort(_First, _Last, _Pred); // small, insertion sort + else + { // sort halves and merge + _Diff _Count2 = (_Count + 1) / 2; + _BidIt _Mid = _First; + std::advance(_Mid, _Count2); + + if (_Count2 <= _Tempbuf._Maxlen()) + { // temp buffer big enough, sort each half using buffer + _Buffered_merge_sort(_First, _Mid, _Count2, _Tempbuf, _Pred); + _Buffered_merge_sort(_Mid, _Last, _Count - _Count2, + _Tempbuf, _Pred); + } + else + { // temp buffer not big enough, divide and conquer + _Stable_sort(_First, _Mid, _Count2, _Tempbuf, _Pred); + _Stable_sort(_Mid, _Last, _Count - _Count2, _Tempbuf, _Pred); + } + + _Buffered_merge(_First, _Mid, _Last, + _Count2, _Count - _Count2, _Tempbuf, _Pred); // merge halves + } + } + +template inline + void _Stable_sort(_BidIt _First, _BidIt _Last, _Diff *, _Ty *, _Pr _Pred) + { // sort preserving order of equivalents, using _Pred + _Diff _Count = 0; + _Distance(_First, _Last, _Count); + _Temp_iterator<_Ty> _Tempbuf(_Count); + _Stable_sort(_First, _Last, _Count, _Tempbuf, _Pred); + } + +template inline + void stable_sort(_BidIt _First, _BidIt _Last, _Pr _Pred) + { // sort preserving order of equivalents, using _Pred + if (_First != _Last) + _Stable_sort(_First, _Last, + _Dist_type(_First), _Val_type(_First), _Pred); + } + + // TEMPLATE FUNCTION partial_sort +template inline + void _Partial_sort(_RanIt _First, _RanIt _Mid, _RanIt _Last, _Ty *) + { // order [First, _Last) up to _Mid, using operator< + std::make_heap(_First, _Mid); + + for (_RanIt _Next = _Mid; _Next < _Last; ++_Next) + if (*_Next < *_First) + _Pop_heap(_First, _Mid, _Next, _Ty(*_Next), + _Dist_type(_First)); // replace top with new largest + std::sort_heap(_First, _Mid); + } + +template inline + void partial_sort(_RanIt _First, _RanIt _Mid, _RanIt _Last) + { // order [First, _Last) up to _Mid, using operator< + _Partial_sort(_First, _Mid, _Last, _Val_type(_First)); + } + + // TEMPLATE FUNCTION partial_sort WITH PRED +template inline + void _Partial_sort(_RanIt _First, _RanIt _Mid, _RanIt _Last, + _Pr _Pred, _Ty *) + { // order [First, _Last) up to _Mid, using _Pred + std::make_heap(_First, _Mid, _Pred); + + for (_RanIt _Next = _Mid; _Next < _Last; ++_Next) + if (_Pred(*_Next, *_First)) + _Pop_heap(_First, _Mid, _Next, _Ty(*_Next), _Pred, + _Dist_type(_First)); // replace top with new largest + std::sort_heap(_First, _Mid, _Pred); + } + +template inline + void partial_sort(_RanIt _First, _RanIt _Mid, _RanIt _Last, _Pr _Pred) + { // order [First, _Last) up to _Mid, using _Pred + _Partial_sort(_First, _Mid, _Last, _Pred, _Val_type(_First)); + } + + // TEMPLATE FUNCTION partial_sort_copy +template inline + _RanIt _Partial_sort_copy(_InIt _First1, _InIt _Last1, + _RanIt _First2, _RanIt _Last2, _Diff *, _Ty *) + { // copy [First1, _Last1) into [_First2, _Last2), using operator< + _RanIt _Mid2 = _First2; + for (; _First1 != _Last1 && _Mid2 != _Last2; ++_First1, ++_Mid2) + *_Mid2 = *_First1; // copy min(_Last1 - _First1, _Last2 - _First2) + std::make_heap(_First2, _Mid2); + + for (; _First1 != _Last1; ++_First1) + if (*_First1 < *_First2) + _Adjust_heap(_First2, _Diff(0), _Diff(_Mid2 - _First2), + _Ty(*_First1)); // replace top with new largest + + std::sort_heap(_First2, _Mid2); + return (_Mid2); + } + +template inline + _RanIt partial_sort_copy(_InIt _First1, _InIt _Last1, + _RanIt _First2, _RanIt _Last2) + { // copy [First1, _Last1) into [_First2, _Last2), using operator< + return (_First1 == _Last1 || _First2 == _Last2 ? _First2 + : _Partial_sort_copy(_First1, _Last1, _First2, _Last2, + _Dist_type(_First2), _Val_type(_First1))); + } + + // TEMPLATE FUNCTION partial_sort_copy WITH PRED +template inline + _RanIt _Partial_sort_copy(_InIt _First1, _InIt _Last1, + _RanIt _First2, _RanIt _Last2, _Pr _Pred, _Diff *, _Ty *) + { // copy [First1, _Last1) into [_First2, _Last2) using _Pred + _RanIt _Mid2 = _First2; + for (; _First1 != _Last1 && _Mid2 != _Last2; ++_First1, ++_Mid2) + *_Mid2 = *_First1; // copy min(_Last1 - _First1, _Last2 - _First2) + std::make_heap(_First2, _Mid2, _Pred); + + for (; _First1 != _Last1; ++_First1) + if (_Pred(*_First1, *_First2)) + _Adjust_heap(_First2, _Diff(0), _Diff(_Mid2 - _First2), + _Ty(*_First1), _Pred); // replace top with new largest + + std::sort_heap(_First2, _Mid2, _Pred); + return (_Mid2); + } + +template inline + _RanIt partial_sort_copy(_InIt _First1, _InIt _Last1, + _RanIt _First2, _RanIt _Last2, _Pr _Pred) + { // copy [First1, _Last1) into [_First2, _Last2) using _Pred + return (_First1 == _Last1 || _First2 == _Last2 ? _First2 + : _Partial_sort_copy(_First1, _Last1, _First2, _Last2, _Pred, + _Dist_type(_First2), _Val_type(_First1))); + } + + // TEMPLATE FUNCTION nth_element +template inline + void nth_element(_RanIt _First, _RanIt _Nth, _RanIt _Last) + { // order Nth element, using operator< + for (; _ISORT_MAX < _Last - _First; ) + { // divide and conquer, ordering partition containing Nth + pair<_RanIt, _RanIt> _Mid = + _Unguarded_partition(_First, _Last); + + if (_Mid.second <= _Nth) + _First = _Mid.second; + else if (_Mid.first <= _Nth) + return; // Nth inside fat pivot, done + else + _Last = _Mid.first; + } + + _Insertion_sort(_First, _Last); // sort any remainder + } + + // TEMPLATE FUNCTION nth_element WITH PRED +template inline + void nth_element(_RanIt _First, _RanIt _Nth, _RanIt _Last, _Pr _Pred) + { // order Nth element, using _Pred + for (; _ISORT_MAX < _Last - _First; ) + { // divide and conquer, ordering partition containing Nth + pair<_RanIt, _RanIt> _Mid = + _Unguarded_partition(_First, _Last, _Pred); + + if (_Mid.second <= _Nth) + _First = _Mid.second; + else if (_Mid.first <= _Nth) + return; // Nth inside fat pivot, done + else + _Last = _Mid.first; + } + + _Insertion_sort(_First, _Last, _Pred); // sort any remainder + } + + // TEMPLATE FUNCTION includes +template inline + bool includes(_InIt1 _First1, _InIt1 _Last1, + _InIt2 _First2, _InIt2 _Last2) + { // test if all [_First1, _Last1) in [_First2, _Last2), using operator< + for (; _First1 != _Last1 && _First2 != _Last2; ) + if (*_First2 < *_First1) + return (false); + else if (*_First1 < *_First2) + ++_First1; + else + ++_First1, ++_First2; + return (_First2 == _Last2); + } + + // TEMPLATE FUNCTION includes WITH PRED +template inline + bool includes(_InIt1 _First1, _InIt1 _Last1, + _InIt2 _First2, _InIt2 _Last2, _Pr _Pred) + { // test if set [_First1, _Last1) in [_First2, _Last2), using _Pred + for (; _First1 != _Last1 && _First2 != _Last2; ) + if (_Pred(*_First2, *_First1)) + return (false); + else if (_Pred(*_First1, *_First2)) + ++_First1; + else + ++_First1, ++_First2; + return (_First2 == _Last2); + } + + // TEMPLATE FUNCTION set_union +template inline + _OutIt set_union(_InIt1 _First1, _InIt1 _Last1, + _InIt2 _First2, _InIt2 _Last2, _OutIt _Dest) + { // OR sets [_First1, _Last1) and [_First2, _Last2), using operator< + for (; _First1 != _Last1 && _First2 != _Last2; ) + if (*_First1 < *_First2) + *_Dest++ = *_First1, ++_First1; + else if (*_First2 < *_First1) + *_Dest++ = *_First2, ++_First2; + else + *_Dest++ = *_First1, ++_First1, ++_First2; + _Dest = std::copy(_First1, _Last1, _Dest); + return (std::copy(_First2, _Last2, _Dest)); + } + + // TEMPLATE FUNCTION set_union WITH PRED +template inline + _OutIt set_union(_InIt1 _First1, _InIt1 _Last1, + _InIt2 _First2, _InIt2 _Last2, _OutIt _Dest, _Pr _Pred) + { // OR sets [_First1, _Last1) and [_First2, _Last2), using _Pred + for (; _First1 != _Last1 && _First2 != _Last2; ) + if (_Pred(*_First1, *_First2)) + *_Dest++ = *_First1, ++_First1; + else if (_Pred(*_First2, *_First1)) + *_Dest++ = *_First2, ++_First2; + else + *_Dest++ = *_First1, ++_First1, ++_First2; + _Dest = std::copy(_First1, _Last1, _Dest); + return (std::copy(_First2, _Last2, _Dest)); + } + + // TEMPLATE FUNCTION set_intersection +template inline + _OutIt set_intersection(_InIt1 _First1, _InIt1 _Last1, + _InIt2 _First2, _InIt2 _Last2, _OutIt _Dest) + { // AND sets [_First1, _Last1) and [_First2, _Last2), using operator< + for (; _First1 != _Last1 && _First2 != _Last2; ) + if (*_First1 < *_First2) + ++_First1; + else if (*_First2 < *_First1) + ++_First2; + else + *_Dest++ = *_First1++, ++_First2; + return (_Dest); + } + + // TEMPLATE FUNCTION set_intersection WITH PRED +template inline + _OutIt set_intersection(_InIt1 _First1, _InIt1 _Last1, + _InIt2 _First2, _InIt2 _Last2, _OutIt _Dest, _Pr _Pred) + { // AND sets [_First1, _Last1) and [_First2, _Last2), using _Pred + for (; _First1 != _Last1 && _First2 != _Last2; ) + if (_Pred(*_First1, *_First2)) + ++_First1; + else if (_Pred(*_First2, *_First1)) + ++_First2; + else + *_Dest++ = *_First1++, ++_First2; + return (_Dest); + } + + // TEMPLATE FUNCTION set_difference +template inline + _OutIt set_difference(_InIt1 _First1, _InIt1 _Last1, + _InIt2 _First2, _InIt2 _Last2, _OutIt _Dest) + { // take set [_First2, _Last2) from [_First1, _Last1), using operator< + for (; _First1 != _Last1 && _First2 != _Last2; ) + if (*_First1 < *_First2) + *_Dest++ = *_First1, ++_First1; + else if (*_First2 < *_First1) + ++_First2; + else + ++_First1, ++_First2; + return (std::copy(_First1, _Last1, _Dest)); + } + + // TEMPLATE FUNCTION set_difference WITH PRED +template inline + _OutIt set_difference(_InIt1 _First1, _InIt1 _Last1, + _InIt2 _First2, _InIt2 _Last2, _OutIt _Dest, _Pr _Pred) + { // take set [_First2, _Last2) from [_First1, _Last1), using _Pred + for (; _First1 != _Last1 && _First2 != _Last2; ) + if (_Pred(*_First1, *_First2)) + *_Dest++ = *_First1, ++_First1; + else if (_Pred(*_First2, *_First1)) + ++_First2; + else + ++_First1, ++_First2; + return (std::copy(_First1, _Last1, _Dest)); + } + + // TEMPLATE FUNCTION set_symmetric_difference +template inline + _OutIt set_symmetric_difference(_InIt1 _First1, _InIt1 _Last1, + _InIt2 _First2, _InIt2 _Last2, _OutIt _Dest) + { // XOR sets [_First1, _Last1) and [_First2, _Last2), using operator< + for (; _First1 != _Last1 && _First2 != _Last2; ) + if (*_First1 < *_First2) + *_Dest++ = *_First1, ++_First1; + else if (*_First2 < *_First1) + *_Dest++ = *_First2, ++_First2; + else + ++_First1, ++_First2; + _Dest = std::copy(_First1, _Last1, _Dest); + return (std::copy(_First2, _Last2, _Dest)); + } + + // TEMPLATE FUNCTION set_symmetric_difference WITH PRED +template inline + _OutIt set_symmetric_difference(_InIt1 _First1, _InIt1 _Last1, + _InIt2 _First2, _InIt2 _Last2, _OutIt _Dest, _Pr _Pred) + { // XOR sets [_First1, _Last1) and [_First2, _Last2), using _Pred + for (; _First1 != _Last1 && _First2 != _Last2; ) + if (_Pred(*_First1, *_First2)) + *_Dest++ = *_First1, ++_First1; + else if (_Pred(*_First2, *_First1)) + *_Dest++ = *_First2, ++_First2; + else + ++_First1, ++_First2; + _Dest = std::copy(_First1, _Last1, _Dest); + return (std::copy(_First2, _Last2, _Dest)); + } + + // TEMPLATE FUNCTION max_element +template inline + _FwdIt max_element(_FwdIt _First, _FwdIt _Last) + { // find largest element, using operator< + _FwdIt _Found = _First; + if (_First != _Last) + for (; ++_First != _Last; ) + if (*_Found < *_First) + _Found = _First; + return (_Found); + } + + // TEMPLATE FUNCTION max_element WITH PRED +template inline + _FwdIt max_element(_FwdIt _First, _FwdIt _Last, _Pr _Pred) + { // find largest element, using _Pred + _FwdIt _Found = _First; + if (_First != _Last) + for (; ++_First != _Last; ) + if (_Pred(*_Found, *_First)) + _Found = _First; + return (_Found); + } + + // TEMPLATE FUNCTION min_element +template inline + _FwdIt min_element(_FwdIt _First, _FwdIt _Last) + { // find smallest element, using operator< + _FwdIt _Found = _First; + if (_First != _Last) + for (; ++_First != _Last; ) + if (*_First < *_Found) + _Found = _First; + return (_Found); + } + + // TEMPLATE FUNCTION min_element WITH PRED +template inline + _FwdIt min_element(_FwdIt _First, _FwdIt _Last, _Pr _Pred) + { // find smallest element, using _Pred + _FwdIt _Found = _First; + if (_First != _Last) + for (; ++_First != _Last; ) + if (_Pred(*_First, *_Found)) + _Found = _First; + return (_Found); + } + + // TEMPLATE FUNCTION next_permutation +template inline + bool next_permutation(_BidIt _First, _BidIt _Last) + { // permute and test for pure ascending, using operator< + _BidIt _Next = _Last; + if (_First == _Last || _First == --_Next) + return (false); + + for (; ; ) + { // find rightmost element smaller than successor + _BidIt _Next1 = _Next; + if (*--_Next < *_Next1) + { // swap with rightmost element that's smaller, flip suffix + _BidIt _Mid = _Last; + for (; !(*_Next < *--_Mid); ) + ; + std::iter_swap(_Next, _Mid); + std::reverse(_Next1, _Last); + return (true); + } + + if (_Next == _First) + { // pure descending, flip all + std::reverse(_First, _Last); + return (false); + } + } + } + + // TEMPLATE FUNCTION next_permutation WITH PRED +template inline + bool next_permutation(_BidIt _First, _BidIt _Last, _Pr _Pred) + { // permute and test for pure ascending, using _Pred + _BidIt _Next = _Last; + if (_First == _Last || _First == --_Next) + return (false); + + for (; ; ) + { // find rightmost element smaller than successor + _BidIt _Next1 = _Next; + if (_Pred(*--_Next, *_Next1)) + { // swap with rightmost element that's smaller, flip suffix + _BidIt _Mid = _Last; + for (; !_Pred(*_Next, *--_Mid); ) + ; + std::iter_swap(_Next, _Mid); + std::reverse(_Next1, _Last); + return (true); + } + + if (_Next == _First) + { // pure descending, flip all + std::reverse(_First, _Last); + return (false); + } + } + } + + // TEMPLATE FUNCTION prev_permutation +template inline + bool prev_permutation(_BidIt _First, _BidIt _Last) + { // reverse permute and test for pure descending, using operator< + _BidIt _Next = _Last; + if (_First == _Last || _First == --_Next) + return (false); + for (; ; ) + { // find rightmost element not smaller than successor + _BidIt _Next1 = _Next; + if (!(*--_Next < *_Next1)) + { // swap with rightmost element that's not smaller, flip suffix + _BidIt _Mid = _Last; + for (; *_Next < *--_Mid; ) + ; + std::iter_swap(_Next, _Mid); + std::reverse(_Next1, _Last); + return (true); + } + + if (_Next == _First) + { // pure ascending, flip all + std::reverse(_First, _Last); + return (false); + } + } + } + + // TEMPLATE FUNCTION prev_permutation WITH PRED +template inline + bool prev_permutation(_BidIt _First, _BidIt _Last, _Pr _Pred) + { // reverse permute and test for pure descending, using _Pred + _BidIt _Next = _Last; + if (_First == _Last || _First == --_Next) + return (false); + + for (; ; ) + { // find rightmost element not smaller than successor + _BidIt _Next1 = _Next; + if (!_Pred(*--_Next, *_Next1)) + { // swap with rightmost element that's not smaller, flip suffix + _BidIt _Mid = _Last; + for (; _Pred(*_Next, *--_Mid); ) + ; + std::iter_swap(_Next, _Mid); + std::reverse(_Next1, _Last); + return (true); + } + + if (_Next == _First) + { // pure ascending, flip all + std::reverse(_First, _Last); + return (false); + } + } + } +_STD_END + + #pragma warning(default: 4244) + +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _ALGORITHM_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + */ + +/* + * This file is derived from software bearing the following + * restrictions: + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this + * software and its documentation for any purpose is hereby + * granted without fee, provided that the above copyright notice + * appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation. + * Hewlett-Packard Company makes no representations about the + * suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/assert.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/assert.h new file mode 100644 index 00000000..a122efbe --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/assert.h @@ -0,0 +1,58 @@ +/*** +*assert.h - define the assert macro +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* Defines the assert(exp) macro. +* [ANSI/System V] +* +* [Public] +* +****/ + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + +#undef assert + +#ifdef NDEBUG + +#define assert(exp) ((void)0) + +#else + +#ifdef __cplusplus +extern "C" { +#endif + +_CRTIMP void __cdecl _assert(const char *, const char *, unsigned); + +#ifdef __cplusplus +} +#endif + +#define assert(exp) (void)( (exp) || (_assert(#exp, __FILE__, __LINE__), 0) ) + +#endif /* NDEBUG */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/bitset b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/bitset new file mode 100644 index 00000000..e5e00f3f --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/bitset @@ -0,0 +1,481 @@ +// bitset standard header +#pragma once +#ifndef _BITSET_ +#define _BITSET_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) + + #pragma warning(disable: 4127) + + + +_STD_BEGIN + + // TEMPLATE CLASS bitset +template + class bitset + { // store fixed-length sequence of Boolean elements + typedef unsigned long _Ty; // base type for a storage word + +public: + typedef bool element_type; // retained + + // CLASS reference + class reference + { // proxy for an element + friend class bitset<_Bits>; + + public: + reference& operator=(bool _Val) + { // assign Boolean to element + _Pbitset->set(_Mypos, _Val); + return (*this); + } + + reference& operator=(const reference& _Bitref) + { // assign reference to element + _Pbitset->set(_Mypos, bool(_Bitref)); + return (*this); + } + + reference& flip() + { // complement stored element + _Pbitset->flip(_Mypos); + return (*this); + } + + bool operator~() const + { // return complemented element + return (!_Pbitset->test(_Mypos)); + } + + operator bool() const + { // return element + return (_Pbitset->test(_Mypos)); + } + + private: + reference(bitset<_Bits>& _Bitset, size_t _Pos) + : _Pbitset(&_Bitset), _Mypos(_Pos) + { // construct from bitset reference and position + } + + bitset<_Bits> *_Pbitset; // pointer to the bitset + size_t _Mypos; // position of element in bitset + }; + + bool at(size_t _Pos) const // retained + { // subscript nonmutable sequence with checking + if (_Bits <= _Pos) + _Xran(); + return (test(_Pos)); + } + + reference at(size_t _Pos) // retained + { // subscript mutable sequence with checking + if (_Bits <= _Pos) + _Xran(); + return (reference(*this, _Pos)); + } + + bool operator[](size_t _Pos) const + { // subscript nonmutable sequence + return (test(_Pos)); + } + + reference operator[](size_t _Pos) + { // subscript mutable sequence + return (reference(*this, _Pos)); + } + + bitset() + { // construct with all false values + _Tidy(); + } + + bitset(unsigned long _Val) + { // construct from bits in unsigned long + _Tidy(); + for (size_t _Pos = 0; _Val != 0 && _Pos < _Bits; _Val >>= 1, ++_Pos) + if (_Val & 1) + set(_Pos); + } + + #define _BITSET_SIZE_TYPE \ + typename basic_string<_Elem, _Tr, _Alloc>::size_type + + template + explicit bitset(const basic_string<_Elem, _Tr, _Alloc>& _Str, + _BITSET_SIZE_TYPE _Pos = 0) + { // construct from [_Pos, ...) elements in string + _Construct(_Str, _Pos, basic_string<_Elem, _Tr, _Alloc>::npos); + } + + template + explicit bitset(const basic_string<_Elem, _Tr, _Alloc>& _Str, + _BITSET_SIZE_TYPE _Pos, + _BITSET_SIZE_TYPE _Count) + { // construct from [_Pos, _Pos + _Count) elements in string + _Construct(_Str, _Pos, _Count); + } + + template + void _Construct( + const basic_string<_Elem, _Tr, _Alloc>& _Str, + _BITSET_SIZE_TYPE _Pos, + _BITSET_SIZE_TYPE _Count) + { // initialize from [_Pos, _Pos + _Count) elements in string + typename basic_string<_Elem, _Tr, _Alloc>::size_type _Num; + if (_Str.size() < _Pos) + _Xran(); // _Pos off end + if (_Str.size() - _Pos < _Count) + _Count = _Str.size() - _Pos; // trim _Count to size + if (_Bits < _Count) + _Count = _Bits; // trim _Count to length of bitset + _Tidy(); + + for (_Pos += _Count, _Num = 0; _Num < _Count; ++_Num) + if (_Str[--_Pos] == '1') + set(_Num); + else if (_Str[_Pos] != '0') + _Xinv(); + } + + bitset<_Bits>& operator&=(const bitset<_Bits>& _Right) + { // AND in _Right + for (int _Wpos = _Words; 0 <= _Wpos; --_Wpos) + _Array[_Wpos] &= _Right._Getword(_Wpos); + return (*this); + } + + bitset<_Bits>& operator|=(const bitset<_Bits>& _Right) + { // OR in _Right + for (int _Wpos = _Words; 0 <= _Wpos; --_Wpos) + _Array[_Wpos] |= _Right._Getword(_Wpos); + return (*this); + } + + bitset<_Bits>& operator^=(const bitset<_Bits>& _Right) + { // XOR in _Right + for (int _Wpos = _Words; 0 <= _Wpos; --_Wpos) + _Array[_Wpos] ^= _Right._Getword(_Wpos); + return (*this); + } + + bitset<_Bits>& operator<<=(size_t _Pos) + { // shift left by _Pos + const int _Wordshift = _Pos / _Bitsperword; + if (_Wordshift != 0) + for (int _Wpos = _Words; 0 <= _Wpos; --_Wpos) // shift by words + _Array[_Wpos] = _Wordshift <= _Wpos + ? _Array[_Wpos - _Wordshift] : (_Ty)0; + + if ((_Pos %= _Bitsperword) != 0) + { // 0 < _Pos < _Bitsperword, shift by bits + for (int _Wpos = _Words; 0 < _Wpos; --_Wpos) + _Array[_Wpos] = (_Ty)((_Array[_Wpos] << _Pos) + | (_Array[_Wpos - 1] >> (_Bitsperword - _Pos))); + _Array[0] <<= _Pos; + _Trim(); + } + return (*this); + } + + bitset<_Bits>& operator>>=(size_t _Pos) + { // shift right by _Pos + const int _Wordshift = _Pos / _Bitsperword; + if (_Wordshift != 0) + for (int _Wpos = 0; _Wpos <= _Words; ++_Wpos) // shift by words + _Array[_Wpos] = _Wordshift <= _Words - _Wpos + ? _Array[_Wpos + _Wordshift] : (_Ty)0; + + if ((_Pos %= _Bitsperword) != 0) + { // 0 < _Pos < _Bitsperword, shift by bits + for (int _Wpos = 0; _Wpos < _Words; ++_Wpos) + _Array[_Wpos] = (_Ty)((_Array[_Wpos] >> _Pos) + | (_Array[_Wpos + 1] << (_Bitsperword - _Pos))); + _Array[_Words] >>= _Pos; + } + return (*this); + } + + bitset<_Bits>& set() + { // set all bits true + _Tidy((_Ty)~0); + return (*this); + } + + bitset<_Bits>& set(size_t _Pos, + bool _Val = true) + { // set bit at _Pos to _Val + if (_Bits <= _Pos) + _Xran(); // _Pos off end + if (_Val) + _Array[_Pos / _Bitsperword] |= (_Ty)1 << _Pos % _Bitsperword; + else + _Array[_Pos / _Bitsperword] &= ~((_Ty)1 << _Pos % _Bitsperword); + return (*this); + } + + bitset<_Bits>& reset() + { // set all bits false + _Tidy(); + return (*this); + } + + bitset<_Bits>& reset(size_t _Pos) + { // set bit at _Pos to false + return (set(_Pos, false)); + } + + bitset<_Bits> operator~() const + { // flip all bits + return (bitset<_Bits>(*this).flip()); + } + + bitset<_Bits>& flip() + { // flip all bits + for (int _Wpos = _Words; 0 <= _Wpos; --_Wpos) + _Array[_Wpos] = (_Ty)~_Array[_Wpos]; + + _Trim(); + return (*this); + } + + bitset<_Bits>& flip(size_t _Pos) + { // flip bit at _Pos + if (_Bits <= _Pos) + _Xran(); // _Pos off end + _Array[_Pos / _Bitsperword] ^= (_Ty)1 << _Pos % _Bitsperword; + return (*this); + } + + unsigned long to_ulong() const + { // convert bitset to unsigned long + enum + { // cause zero divide if unsigned long not multiple of _Ty + _Assertion = 1 + / (int)(sizeof (unsigned long) % sizeof (_Ty) == 0)}; + + int _Wpos = _Words; + for (; sizeof (unsigned long) / sizeof (_Ty) <= _Wpos; --_Wpos) + if (_Array[_Wpos] != 0) + _Xoflo(); // fail if any high-order words are nonzero + + unsigned long _Val = _Array[_Wpos]; + for (; 0 <= --_Wpos; ) + _Val = _Val << _Bitsperword | _Array[_Wpos]; + return (_Val); + } + + template + basic_string<_Elem, _Tr, _Alloc> to_string() const + { // convert bitset to string + basic_string<_Elem, _Tr, _Alloc> _Str; + typename basic_string<_Elem, _Tr, _Alloc>::size_type _Pos; + _Str.reserve(_Bits); + + for (_Pos = _Bits; 0 < _Pos; ) + _Str += (char)('0' + (int)test(--_Pos)); + return (_Str); + } + + size_t count() const + { // count number of set bits + static char _Bitsperhex[] = "\0\1\1\2\1\2\2\3\1\2\2\3\2\3\3\4"; + size_t _Val = 0; + for (int _Wpos = _Words; 0 <= _Wpos; --_Wpos) + for (_Ty _Wordval = _Array[_Wpos]; _Wordval != 0; _Wordval >>= 4) + _Val += _Bitsperhex[_Wordval & 0xF]; + return (_Val); + } + + size_t size() const + { // return size of bitset + return (_Bits); + } + + bool operator==(const bitset<_Bits>& _Right) const + { // test for bitset equality + for (int _Wpos = _Words; 0 <= _Wpos; --_Wpos) + if (_Array[_Wpos] != _Right._Getword(_Wpos)) + return (false); + return (true); + } + + bool operator!=(const bitset<_Bits>& _Right) const + { // test for bitset inequality + return (!(*this == _Right)); + } + + bool test(size_t _Pos) const + { // test if bit at _Pos is set + if (_Bits <= _Pos) + _Xran(); // _Pos off end + return ((_Array[_Pos / _Bitsperword] + & ((_Ty)1 << _Pos % _Bitsperword)) != 0); + } + + bool any() const + { // test if any bits are set + for (int _Wpos = _Words; 0 <= _Wpos; --_Wpos) + if (_Array[_Wpos] != 0) + return (true); + return (false); + } + + bool none() const + { // test if no bits are set + return (!any()); + } + + bitset<_Bits> operator<<(size_t _Pos) const + { // return bitset shifted left by _Pos + return (bitset<_Bits>(*this) <<= _Pos); + } + + bitset<_Bits> operator>>(size_t _Pos) const + { // return bitset shifted right by _Pos + return (bitset<_Bits>(*this) >>= _Pos); + } + + bitset<_Bits> operator&(const bitset<_Bits>& _Right) const + { // return bitset AND _Right + return (bitset<_Bits>(*this) &= _Right); + } + + bitset<_Bits> operator|(const bitset<_Bits>& _Right) const + { // return bitset OR _Right + return (bitset<_Bits>(*this) |= _Right); + } + + bitset<_Bits> operator^(const bitset<_Bits>& _Right) const + { // return bitset XOR _Right + return (bitset<_Bits>(*this) ^= _Right); + } + + _Ty _Getword(size_t _Wpos) const + { // get word at _Wpos + return (_Array[_Wpos]); + } + +private: + enum + { // parameters for packing bits into words + _Bitsperword = CHAR_BIT * sizeof (_Ty), // bits in each word + _Words = _Bits == 0 + ? 0 : (_Bits - 1) / _Bitsperword}; // NB: number of words - 1 + + void _Tidy(_Ty _Wordval = 0) + { // set all words to _Wordval + for (int _Wpos = _Words; 0 <= _Wpos; --_Wpos) + _Array[_Wpos] = _Wordval; + if (_Wordval != 0) + _Trim(); + } + + void _Trim() + { // clear any trailing bits in last word + if (_Bits % _Bitsperword != 0) + _Array[_Words] &= ((_Ty)1 << _Bits % _Bitsperword) - 1; + } + + void _Xinv() const + { // report invalid string element in bitset conversion + _THROW(invalid_argument, "invalid bitset char"); + } + + void _Xoflo() const + { // report converted value too big to represent + _THROW(overflow_error, "bitset overflow"); + } + + void _Xran() const + { // report bit index out of range + _THROW(out_of_range, "invalid bitset position"); + } + + _Ty _Array[_Words + 1]; // the set of bits + }; + + // TEMPLATE operator<< +template inline + basic_ostream<_Elem, _Tr>& operator<<( + basic_ostream<_Elem, _Tr>& _Ostr, const bitset<_Bits>& _Right) + { // insert bitset as a string + return (_Ostr + << _Right.template to_string<_Elem, _Tr, allocator<_Elem> >()); + } + + // TEMPLATE operator>> +template inline + basic_istream<_Elem, _Tr>& operator>>( + basic_istream<_Elem, _Tr>& _Istr, bitset<_Bits>& _Right) + { // extract bitset as a string + const ctype<_Elem>& _Ctype_fac = _USE(_Istr.getloc(), ctype<_Elem>); + const _Elem _E0 = _Ctype_fac.widen('0'); + ios_base::iostate _State = ios_base::goodbit; + bool _Changed = false; + string _Str; + const typename basic_istream<_Elem, _Tr>::sentry _Ok(_Istr); + + if (_Ok) + { // valid stream, extract elements + _TRY_IO_BEGIN + typename _Tr::int_type _Meta = _Istr.rdbuf()->sgetc(); + for (size_t _Count = _Right.size(); 0 < _Count; + _Meta = _Istr.rdbuf()->snextc(), --_Count) + { // test _Meta + _Elem _Char; + if (_Tr::eq_int_type(_Tr::eof(), _Meta)) + { // end of file, quit + _State |= ios_base::eofbit; + break; + } + else if ((_Char = _Tr::to_char_type(_Meta)) + != _E0 && _Char != _E0 + 1) + break; // invalid element + else if (_Str.max_size() <= _Str.size()) + { // no room in string, give up (unlikely) + _State |= ios_base::failbit; + break; + } + else + _Str.append(1, (_Char - _E0) + '0'), _Changed = true; + } + _CATCH_IO_(_Istr) + } + + if (!_Changed) + _State |= ios_base::failbit; + _Istr.setstate(_State); + _Right = bitset<_Bits>(_Str); // convert string and store + return (_Istr); + } +_STD_END + + #pragma warning(default: 4127) + +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _BITSET */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cassert b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cassert new file mode 100644 index 00000000..244e31f7 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cassert @@ -0,0 +1,8 @@ +// cassert standard header +#include +#include + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cctype b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cctype new file mode 100644 index 00000000..8818d0f1 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cctype @@ -0,0 +1,31 @@ +// cctype standard header +#pragma once +#ifndef _CCTYPE_ +#define _CCTYPE_ +#include + +#ifdef _STD_USING + #undef _STD_USING + #include + #define _STD_USING + +#else /* _STD_USING */ + #include + + #if _GLOBAL_USING +_STD_BEGIN +using ::isalnum; using ::isalpha; using ::iscntrl; +using ::isdigit; using ::isgraph; using ::islower; +using ::isprint; using ::ispunct; using ::isspace; +using ::isupper; using ::isxdigit; using ::tolower; +using ::toupper; +_STD_END + #endif /* _GLOBAL_USING */ + +#endif /* _STD_USING */ +#endif /* _CCTYPE_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cerrno b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cerrno new file mode 100644 index 00000000..e84e841c --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cerrno @@ -0,0 +1,30 @@ +// cerrno standard header +#pragma once +#ifndef _CERRNO_ +#define _CERRNO_ +#include + +#ifdef _STD_USING + #undef _STD_USING + #include + #define _STD_USING + +#else /* _STD_USING */ + #include + + #if _GLOBAL_USING +_STD_BEGIN + #ifndef errno +using ::errno; + #endif /* errno */ + +_STD_END + #endif /* _GLOBAL_USING */ + +#endif /* _CERRNO_ */ +#endif /* _STD_USING */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cfloat b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cfloat new file mode 100644 index 00000000..f6f50f0d --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cfloat @@ -0,0 +1,13 @@ +// cfloat standard header +#pragma once +#ifndef _CFLOAT_ +#define _CFLOAT_ +#include + +#include +#endif /* _CFLOAT_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ciso646 b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ciso646 new file mode 100644 index 00000000..0a1de626 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ciso646 @@ -0,0 +1,13 @@ +// ciso646 standard header +#pragma once +#ifndef _CISO646_ +#define _CISO646_ +#include + +#include +#endif /* _CISO646_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/climits b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/climits new file mode 100644 index 00000000..0f1ce63b --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/climits @@ -0,0 +1,15 @@ +// climits standard header +#pragma once +#ifndef _CLIMITS_ +#define _CLIMITS_ +#include + + #pragma warning(disable: 4514) + +#include +#endif /* _CLIMITS_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/clocale b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/clocale new file mode 100644 index 00000000..b00137d8 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/clocale @@ -0,0 +1,27 @@ +// clocale standard header +#pragma once +#ifndef _CLOCALE_ +#define _CLOCALE_ +#include + +#ifdef _STD_USING + #undef _STD_USING + #include + #define _STD_USING + +#else /* _STD_USING */ + #include + + #if _GLOBAL_USING +_STD_BEGIN +using ::lconv; using ::localeconv; using ::setlocale; +_STD_END + #endif /* _GLOBAL_USING */ + +#endif /* _STD_USING */ +#endif /* _CLOCALE_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cmath b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cmath new file mode 100644 index 00000000..35242c84 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cmath @@ -0,0 +1,52 @@ +// cmath standard header +#pragma once +#ifndef _CMATH_ +#define _CMATH_ +#include + +#ifdef _STD_USING + #undef _STD_USING + #include + #define _STD_USING + +#else /* _STD_USING */ + #include + + #if _GLOBAL_USING +_STD_BEGIN +using ::abs; using ::acos; using ::asin; +using ::atan; using ::atan2; using ::ceil; +using ::cos; using ::cosh; using ::exp; +using ::fabs; using ::floor; using ::fmod; +using ::frexp; using ::ldexp; using ::log; +using ::log10; using ::modf; using ::pow; +using ::sin; using ::sinh; using ::sqrt; +using ::tan; using ::tanh; + +using ::acosf; using ::asinf; +using ::atanf; using ::atan2f; using ::ceilf; +using ::cosf; using ::coshf; using ::expf; +using ::fabsf; using ::floorf; using ::fmodf; +using ::frexpf; using ::ldexpf; using ::logf; +using ::log10f; using ::modff; using ::powf; +using ::sinf; using ::sinhf; using ::sqrtf; +using ::tanf; using ::tanhf; + +using ::acosl; using ::asinl; +using ::atanl; using ::atan2l; using ::ceill; +using ::cosl; using ::coshl; using ::expl; +using ::fabsl; using ::floorl; using ::fmodl; +using ::frexpl; using ::ldexpl; using ::logl; +using ::log10l; using ::modfl; using ::powl; +using ::sinl; using ::sinhl; using ::sqrtl; +using ::tanl; using ::tanhl; +_STD_END + #endif /* _GLOBAL_USING */ + +#endif /* _STD_USING */ +#endif /* _CMATH_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/complex b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/complex new file mode 100644 index 00000000..cecc5985 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/complex @@ -0,0 +1,1170 @@ +// complex standard header +#pragma once +#ifndef _COMPLEX_ +#define _COMPLEX_ +#include +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) + + #pragma warning(disable: 4244) + +typedef struct _C_double_complex + { /* double complex */ + double _Val[2]; + } _C_double_complex; + +typedef struct _C_float_complex + { /* float complex */ + float _Val[2]; + } _C_float_complex; + +typedef struct _C_ldouble_complex + { /* long double complex */ + long double _Val[2]; + } _C_ldouble_complex; + +_STD_BEGIN +typedef ::_C_double_complex _Dcomplex_value; +typedef ::_C_float_complex _Fcomplex_value; +typedef ::_C_ldouble_complex _Lcomplex_value; + +#define __STD_COMPLEX /* signal presence of complex classes */ + + // TEMPLATE CLASS _Ctraits +template + class _Ctraits + { // complex traits for _Ty +public: + static _Ty __cdecl _Cosh(_Ty _Left, _Ty _Right) + { // return cosh(_Left) * _Right + return (::_Cosh((double)_Left, (double)_Right)); + } + + static short __cdecl _Exp(_Ty *_Pleft, _Ty _Right, short _Exponent) + { // compute exp(*_Pleft) * _Right * 2 ^ _Exponent + double _Tmp = (double)*_Pleft; + short _Ans = ::_Exp(&_Tmp, (double)_Right, _Exponent); + *_Pleft = (_Ty)_Tmp; + return (_Ans); + } + + static _Ty __cdecl _Infv(_Ty) + { // return infinity + return (::_Inf._Double); + } + + static bool __cdecl _Isinf(_Ty _Left) + { // test for infinity + double _Tmp = (double)_Left; + return (::_Dtest(&_Tmp) == _INFCODE); + } + + static bool __cdecl _Isnan(_Ty _Left) + { // test for NaN + double _Tmp = (double)_Left; + return (::_Dtest(&_Tmp) == _NANCODE); + } + + static _Ty __cdecl _Nanv(_Ty) + { // return NaN + return (::_Nan._Double); + } + + static _Ty __cdecl _Sinh(_Ty _Left, _Ty _Right) + { // return sinh(_Left) * _Right + return (::_Sinh((double)_Left, (double)_Right)); + } + + static _Ty __cdecl atan2(_Ty _Yval, _Ty _Xval) + { // return atan(_Yval / _Xval) + return (::atan2((double)_Yval, (double)_Xval)); + } + + static _Ty __cdecl cos(_Ty _Left) + { // return cos(_Left) + return (::cos((double)_Left)); + } + + static _Ty __cdecl exp(_Ty _Left) + { // return exp(_Left) + return (::exp((double)_Left)); + } + + static _Ty __cdecl ldexp(_Ty _Left, int _Exponent) + { // return _Left * 2 ^ _Exponent + return (::ldexp((double)_Left, _Exponent)); + } + + static _Ty __cdecl log(_Ty _Left) + { // return log(_Left) + return (::log((double)_Left)); + } + + static _Ty __cdecl pow(_Ty _Left, _Ty _Right) + { // return _Left ^ _Right + return (::pow((double)_Left, (double)_Right)); + } + + static _Ty __cdecl sin(_Ty _Left) + { // return sin(_Left) + return (::sin((double)_Left)); + } + + static _Ty __cdecl sqrt(_Ty _Left) + { // return sqrt(_Left) + return (::sqrt((double)_Left)); + } + + static _Ty __cdecl tan(_Ty _Left) + { // return tan(_Left) + return (::tan((double)_Left)); + } + }; + + // CLASS _Ctraits +template<> class _CRTIMP2 _Ctraits + { // complex traits for long double +public: + typedef long double _Ty; + + static _Ty __cdecl _Cosh(_Ty _Left, _Ty _Right) + { // return cosh(_Left) * _Right + return (::_LCosh(_Left, _Right)); + } + + static short __cdecl _Exp(_Ty *_Pleft, _Ty _Right, short _Exponent) + { // compute exp(*_Pleft) * _Right * 2 ^ _Exponent + return (::_LExp(_Pleft, _Right, _Exponent)); + } + + static _Ty __cdecl _Infv(_Ty) + { // return infinity + return (::_LInf._Long_double); + } + + static bool __cdecl _Isinf(_Ty _Left) + { // test for infinity + return (::_LDtest(&_Left) == _INFCODE); + } + + static bool __cdecl _Isnan(_Ty _Left) + { // test for NaN + return (::_LDtest(&_Left) == _NANCODE); + } + + static _Ty __cdecl _Nanv(_Ty) + { // return NaN + return (::_LNan._Long_double); + } + + static _Ty __cdecl _Sinh(_Ty _Left, _Ty _Right) + { // return sinh(_Left) * _Right + return (::_LSinh(_Left, _Right)); + } + + static _Ty __cdecl atan2(_Ty _Yval, _Ty _Xval) + { // return atan(_Yval / _Xval) + return (::atan2l(_Yval, _Xval)); + } + + static _Ty __cdecl cos(_Ty _Left) + { // return cos(_Left) + return (::cosl(_Left)); + } + + static _Ty __cdecl exp(_Ty _Left) + { // return exp(_Left) + return (::expl(_Left)); + } + + static _Ty __cdecl ldexp(_Ty _Left, int _Exponent) + { // return _Left * 2 ^ _Exponent + return (::ldexpl(_Left, _Exponent)); + } + + static _Ty __cdecl log(_Ty _Left) + { // return log(_Left) + return (::logl(_Left)); + } + + static _Ty __cdecl pow(_Ty _Left, _Ty _Right) + { // return _Left ^ _Right + return (::powl(_Left, _Right)); + } + + static _Ty __cdecl sin(_Ty _Left) + { // return sin(_Left) + return (::sinl(_Left)); + } + + static _Ty __cdecl sqrt(_Ty _Left) + { // return sqrt(_Left) + return (::sqrtl(_Left)); + } + + static _Ty __cdecl tan(_Ty _Left) + { // return tan(_Left) + return (::tanl(_Left)); + } + }; + + // CLASS _Ctraits +template<> class _CRTIMP2 _Ctraits + { // complex traits for double +public: + typedef double _Ty; + + static _Ty __cdecl _Cosh(_Ty _Left, _Ty _Right) + { // return cosh(_Left) * _Right + return (::_Cosh(_Left, _Right)); + } + + static short __cdecl _Exp(_Ty *_Pleft, _Ty _Right, short _Exponent) + { // compute exp(*_Pleft) * _Right * 2 ^ _Exponent + return (::_Exp(_Pleft, _Right, _Exponent)); + } + + static _Ty __cdecl _Infv(_Ty) + { // return infinity + return (::_Inf._Double); + } + + static bool __cdecl _Isinf(_Ty _Left) + { // test for infinity + return (::_Dtest(&_Left) == _INFCODE); + } + + static bool __cdecl _Isnan(_Ty _Left) + { // test for NaN + return (::_Dtest(&_Left) == _NANCODE); + } + + static _Ty __cdecl _Nanv(_Ty) + { // return NaN + return (::_Nan._Double); + } + + static _Ty __cdecl _Sinh(_Ty _Left, _Ty _Right) + { // return sinh(_Left) * _Right + return (::_Sinh(_Left, _Right)); + } + + static _Ty __cdecl atan2(_Ty _Yval, _Ty _Xval) + { // return atan(_Yval / _Xval) + return (::atan2(_Yval, _Xval)); + } + + static _Ty __cdecl cos(_Ty _Left) + { // return cos(_Left) + return (::cos(_Left)); + } + + static _Ty __cdecl exp(_Ty _Left) + { // return exp(_Left) + return (::exp(_Left)); + } + + static _Ty __cdecl ldexp(_Ty _Left, int _Exponent) + { // return _Left * 2 ^ _Exponent + return (::ldexp(_Left, _Exponent)); + } + + static _Ty __cdecl log(_Ty _Left) + { // return log(_Left) + return (::log(_Left)); + } + + static _Ty __cdecl pow(_Ty _Left, _Ty _Right) + { // return _Left ^ _Right + return (::pow(_Left, _Right)); + } + + static _Ty __cdecl sin(_Ty _Left) + { // return sin(_Left) + return (::sin(_Left)); + } + + static _Ty __cdecl sqrt(_Ty _Left) + { // return sqrt(_Left) + return (::sqrt(_Left)); + } + + static _Ty __cdecl tan(_Ty _Left) + { // return tan(_Left) + return (::tan(_Left)); + } + }; + + // CLASS _Ctraits +template<> class _CRTIMP2 _Ctraits + { // complex traits for float +public: + typedef float _Ty; + + static _Ty __cdecl _Cosh(_Ty _Left, _Ty _Right) + { // return cosh(_Left) * _Right + return (::_FCosh(_Left, _Right)); + } + + static short __cdecl _Exp(_Ty *_Pleft, _Ty _Right, short _Exponent) + { // compute exp(*_Pleft) * _Right * 2 ^ _Exponent + return (::_FExp(_Pleft, _Right, _Exponent)); + } + + static _Ty __cdecl _Infv(_Ty) + { // return infinity + return (::_FInf._Float); + } + + static bool __cdecl _Isinf(_Ty _Left) + { // test for infinity + return (::_FDtest(&_Left) == _INFCODE); + } + + static bool __cdecl _Isnan(_Ty _Left) + { // test for NaN + return (::_FDtest(&_Left) == _NANCODE); + } + + static _Ty __cdecl _Nanv(_Ty) + { // return NaN + return (::_FNan._Float); + } + + static _Ty __cdecl _Sinh(_Ty _Left, _Ty _Right) + { // return sinh(_Left) * _Right + return (::_FSinh(_Left, _Right)); + } + + static _Ty __cdecl atan2(_Ty _Yval, _Ty _Xval) + { // return atan(_Yval / _Xval) + return (::atan2f(_Yval, _Xval)); + } + + static _Ty __cdecl cos(_Ty _Left) + { // return cos(_Left) + return (::cosf(_Left)); + } + + static _Ty __cdecl exp(_Ty _Left) + { // return exp(_Left) + return (::expf(_Left)); + } + + static _Ty __cdecl ldexp(_Ty _Left, int _Exponent) + { // return _Left * 2 ^ _Exponent + return (::ldexpf(_Left, _Exponent)); + } + + static _Ty __cdecl log(_Ty _Left) + { // return log(_Left) + return (::logf(_Left)); + } + + static _Ty __cdecl pow(_Ty _Left, _Ty _Right) + { // return _Left ^ _Right + return (::powf(_Left, _Right)); + } + + static _Ty __cdecl sin(_Ty _Left) + { // return sin(_Left) + return (::sinf(_Left)); + } + + static _Ty __cdecl sqrt(_Ty _Left) + { // return sqrt(_Left) + return (::sqrtf(_Left)); + } + + static _Ty __cdecl tan(_Ty _Left) + { // return tan(_Left) + return (::tanf(_Left)); + } + }; + +template + class complex; +template<> class _CRTIMP2 complex; +template<> class _CRTIMP2 complex; +template<> class _CRTIMP2 complex; + + // TEMPLATE CLASS _Complex_value +template + struct _Complex_value + { /* templatized complex value */ + _Ty _Val[2]; + }; + + // TEMPLATE CLASS _Complex_base +template + class _Complex_base + : public _Valbase + { // base for all complex types +public: + typedef _Ctraits<_Ty> _Myctraits; + typedef _Complex_base<_Ty, _Valbase> _Myt; + typedef _Ty value_type; + + _Complex_base(const _Ty& _Realval, const _Ty& _Imagval) + { // construct from components of same type + this->_Val[0] = _Realval; + this->_Val[1] = _Imagval; + } + + _Ty real(const _Ty& _Right) + { // set real component + return (this->_Val[0] = _Right); + } + + _Ty imag(const _Ty& _Right) + { // set imaginary component + return (this->_Val[1] = _Right); + } + + _Ty real() const + { // return real component + return (this->_Val[0]); + } + + _Ty imag() const + { // return imaginary component + return (this->_Val[1]); + } + +protected: + template inline + void _Add(const complex<_Other>& _Right) + { // add other complex + this->_Val[0] = this->_Val[0] + (_Ty)_Right.real(); + this->_Val[1] = this->_Val[1] + (_Ty)_Right.imag(); + } + + template inline + void _Sub(const complex<_Other>& _Right) + { // subtract other complex + this->_Val[0] = this->_Val[0] - (_Ty)_Right.real(); + this->_Val[1] = this->_Val[1] - (_Ty)_Right.imag(); + } + + template inline + void _Mul(const complex<_Other>& _Right) + { // multiply by other complex + _Ty _Rightreal = (_Ty)_Right.real(); + _Ty _Rightimag = (_Ty)_Right.imag(); + + _Ty _Tmp = this->_Val[0] * _Rightreal - this->_Val[1] * _Rightimag; + this->_Val[1] = this->_Val[0] * _Rightimag + this->_Val[1] * _Rightreal; + this->_Val[0] = _Tmp; + } + + template inline + void _Div(const complex<_Other>& _Right) + { // divide by other complex + typedef _Ctraits<_Ty> _Myctraits; + _Ty _Rightreal = (_Ty)_Right.real(); + _Ty _Rightimag = (_Ty)_Right.imag(); + + if (_Myctraits::_Isnan(_Rightreal) || _Myctraits::_Isnan(_Rightimag)) + { // set NaN result + this->_Val[0] = _Myctraits::_Nanv(_Rightreal); + this->_Val[1] = this->_Val[0]; + } + else if ((_Rightimag < 0 ? -_Rightimag : +_Rightimag) + < (_Rightreal < 0 ? -_Rightreal : +_Rightreal)) + { // |_Right.imag()| < |_Right.real()| + _Ty _Wr = _Rightimag / _Rightreal; + _Ty _Wd = _Rightreal + _Wr * _Rightimag; + + if (_Myctraits::_Isnan(_Wd) || _Wd == 0) + { // set NaN result + this->_Val[0] = _Myctraits::_Nanv(_Rightreal); + this->_Val[1] = this->_Val[0]; + } + else + { // compute representable result + _Ty _Tmp = (this->_Val[0] + this->_Val[1] * _Wr) / _Wd; + this->_Val[1] = (this->_Val[1] - this->_Val[0] * _Wr) / _Wd; + this->_Val[0] = _Tmp; + } + } + else if (_Rightimag == 0) + { // set NaN result + this->_Val[0] = _Myctraits::_Nanv(_Rightreal); + this->_Val[1] = this->_Val[0]; + } + else + { // 0 < |_Right.real()| <= |_Right.imag()| + _Ty _Wr = _Rightreal / _Rightimag; + _Ty _Wd = _Rightimag + _Wr * _Rightreal; + + if (_Myctraits::_Isnan(_Wd) || _Wd == 0) + { // set NaN result + this->_Val[0] = _Myctraits::_Nanv(_Rightreal); + this->_Val[1] = this->_Val[0]; + } + else + { // compute representable result + _Ty _Tmp = (this->_Val[0] * _Wr + this->_Val[1]) / _Wd; + this->_Val[1] = (this->_Val[1] * _Wr - this->_Val[0]) / _Wd; + this->_Val[0] = _Tmp; + } + } + } + }; + + // CLASS complex +template<> class _CRTIMP2 complex + : public _Complex_base + { // complex with float components +public: + typedef float _Ty; + typedef complex<_Ty> _Myt; + + explicit complex(const complex&); // defined below + + explicit complex(const complex&); // defined below + + complex(const _Ty& _Realval = 0, const _Ty& _Imagval = 0) + : _Complex_base(_Realval, _Imagval) + { // construct from float components + } + + complex(const _Fcomplex_value& _Right) + : _Complex_base(_Right._Val[0], + _Right._Val[1]) + { // construct from float complex value + } + + complex<_Ty>& operator=(const _Ty& _Right) + { // assign real + this->_Val[0] = _Right; + this->_Val[1] = 0; + return (*this); + } + + _Myt& operator+=(const _Ty& _Right) + { // add real + this->_Val[0] = this->_Val[0] + _Right; + return (*this); + } + + _Myt& operator-=(const _Ty& _Right) + { // subtract real + this->_Val[0] = this->_Val[0] - _Right; + return (*this); + } + + _Myt& operator*=(const _Ty& _Right) + { // multiply by real + this->_Val[0] = this->_Val[0] * _Right; + this->_Val[1] = this->_Val[1] * _Right; + return (*this); + } + + _Myt& operator/=(const _Ty& _Right) + { // divide by real + this->_Val[0] = this->_Val[0] / _Right; + this->_Val[1] = this->_Val[1] / _Right; + return (*this); + } + + _Myt& operator=(const _Myt& _Right) + { // assign other complex + this->_Val[0] = _Right.real(); + this->_Val[1] = _Right.imag(); + return (*this); + } + + _Myt& operator+=(const _Myt& _Right) + { // add other complex + this->_Add(_Right); + return (*this); + } + + _Myt& operator-=(const _Myt& _Right) + { // subtract other complex + this->_Sub(_Right); + return (*this); + } + + _Myt& operator*=(const _Myt& _Right) + { // multiply by other complex + this->_Mul(_Right); + return (*this); + } + + _Myt& operator/=(const _Myt& _Right) + { // divide by other complex + this->_Div(_Right); + return (*this); + } + + template + _Myt& operator=(const complex<_Other>& _Right) + { // assign other complex type + this->_Val[0] = (_Ty)_Right.real(); + this->_Val[1] = (_Ty)_Right.imag(); + return (*this); + } + + template inline + _Myt& operator+=(const complex<_Other>& _Right) + { // add other complex + this->_Add(_Right); + return (*this); + } + + template inline + _Myt& operator-=(const complex<_Other>& _Right) + { // subtract other complex + this->_Sub(_Right); + return (*this); + } + + template inline + _Myt& operator*=(const complex<_Other>& _Right) + { // multiply by other complex + this->_Mul(_Right); + return (*this); + } + + template inline + _Myt& operator/=(const complex<_Other>& _Right) + { // divide by other complex + this->_Div(_Right); + return (*this); + } + }; + + // CLASS complex +template<> class _CRTIMP2 complex + : public _Complex_base + { // complex with double components +public: + typedef double _Ty; + typedef complex<_Ty> _Myt; + + complex(const complex&); // defined below + + explicit complex(const complex&); // defined below + + complex(const _Ty& _Realval = 0, const _Ty& _Imagval = 0) + : _Complex_base(_Realval, _Imagval) + { // construct from double components + } + + complex(const _Dcomplex_value& _Right) + : _Complex_base(_Right._Val[0], + _Right._Val[1]) + { // construct from double complex value + } + + complex<_Ty>& operator=(const _Ty& _Right) + { // assign real + this->_Val[0] = _Right; + this->_Val[1] = 0; + return (*this); + } + + _Myt& operator+=(const _Ty& _Right) + { // add real + this->_Val[0] = this->_Val[0] + _Right; + return (*this); + } + + _Myt& operator-=(const _Ty& _Right) + { // subtract real + this->_Val[0] = this->_Val[0] - _Right; + return (*this); + } + + _Myt& operator*=(const _Ty& _Right) + { // multiply by real + this->_Val[0] = this->_Val[0] * _Right; + this->_Val[1] = this->_Val[1] * _Right; + return (*this); + } + + _Myt& operator/=(const _Ty& _Right) + { // divide by real + this->_Val[0] = this->_Val[0] / _Right; + this->_Val[1] = this->_Val[1] / _Right; + return (*this); + } + + _Myt& operator=(const _Myt& _Right) + { // assign other complex + this->_Val[0] = _Right.real(); + this->_Val[1] = _Right.imag(); + return (*this); + } + + _Myt& operator+=(const _Myt& _Right) + { // add other complex + this->_Add(_Right); + return (*this); + } + + _Myt& operator-=(const _Myt& _Right) + { // subtract other complex + this->_Sub(_Right); + return (*this); + } + + _Myt& operator*=(const _Myt& _Right) + { // multiply by other complex + this->_Mul(_Right); + return (*this); + } + + _Myt& operator/=(const _Myt& _Right) + { // divide by other complex + this->_Div(_Right); + return (*this); + } + + template + _Myt& operator=(const complex<_Other>& _Right) + { // assign other complex type + this->_Val[0] = (_Ty)_Right.real(); + this->_Val[1] = (_Ty)_Right.imag(); + return (*this); + } + + template inline + _Myt& operator+=(const complex<_Other>& _Right) + { // add other complex + this->_Add(_Right); + return (*this); + } + + template inline + _Myt& operator-=(const complex<_Other>& _Right) + { // subtract other complex + this->_Sub(_Right); + return (*this); + } + + template inline + _Myt& operator*=(const complex<_Other>& _Right) + { // multiply by other complex + this->_Mul(_Right); + return (*this); + } + + template inline + _Myt& operator/=(const complex<_Other>& _Right) + { // divide by other complex + this->_Div(_Right); + return (*this); + } + }; + + // CLASS complex +template<> class _CRTIMP2 complex + : public _Complex_base + { // complex with long double components +public: + typedef long double _Ty; + typedef complex<_Ty> _Myt; + + complex(const complex&); // defined below + + complex(const complex&); // defined below + + complex(const _Ty& _Realval = 0, const _Ty& _Imagval = 0) + : _Complex_base(_Realval, _Imagval) + { // construct from long double components + } + + complex(const _Lcomplex_value& _Right) + : _Complex_base(_Right._Val[0], + _Right._Val[1]) + { // construct from long double complex value + } + + complex<_Ty>& operator=(const _Ty& _Right) + { // assign real + this->_Val[0] = _Right; + this->_Val[1] = 0; + return (*this); + } + + _Myt& operator+=(const _Ty& _Right) + { // add real + this->_Val[0] = this->_Val[0] + _Right; + return (*this); + } + + _Myt& operator-=(const _Ty& _Right) + { // subtract real + this->_Val[0] = this->_Val[0] - _Right; + return (*this); + } + + _Myt& operator*=(const _Ty& _Right) + { // multiply by real + this->_Val[0] = this->_Val[0] * _Right; + this->_Val[1] = this->_Val[1] * _Right; + return (*this); + } + + _Myt& operator/=(const _Ty& _Right) + { // divide by real + this->_Val[0] = this->_Val[0] / _Right; + this->_Val[1] = this->_Val[1] / _Right; + return (*this); + } + + _Myt& operator=(const _Myt& _Right) + { // assign other complex + this->_Val[0] = _Right.real(); + this->_Val[1] = _Right.imag(); + return (*this); + } + + _Myt& operator+=(const _Myt& _Right) + { // add other complex + this->_Add(_Right); + return (*this); + } + + _Myt& operator-=(const _Myt& _Right) + { // subtract other complex + this->_Sub(_Right); + return (*this); + } + + _Myt& operator*=(const _Myt& _Right) + { // multiply by other complex + this->_Mul(_Right); + return (*this); + } + + _Myt& operator/=(const _Myt& _Right) + { // divide by other complex + this->_Div(_Right); + return (*this); + } + + template + _Myt& operator=(const complex<_Other>& _Right) + { // assign other complex type + this->_Val[0] = (_Ty)_Right.real(); + this->_Val[1] = (_Ty)_Right.imag(); + return (*this); + } + + template inline + _Myt& operator+=(const complex<_Other>& _Right) + { // add other complex + this->_Add(_Right); + return (*this); + } + + template inline + _Myt& operator-=(const complex<_Other>& _Right) + { // subtract other complex + this->_Sub(_Right); + return (*this); + } + + template inline + _Myt& operator*=(const complex<_Other>& _Right) + { // multiply by other complex + this->_Mul(_Right); + return (*this); + } + + template inline + _Myt& operator/=(const complex<_Other>& _Right) + { // divide by other complex + this->_Div(_Right); + return (*this); + } + }; + + // CONSTRUCTORS FOR complex SPECIALIZATIONS +inline + complex::complex(const complex& _Right) + : _Complex_base( + (_Ty)_Right.real(), (_Ty)_Right.imag()) + { // construct complex from complex + } + +inline + complex::complex(const complex& _Right) + : _Complex_base( + (_Ty)_Right.real(), (_Ty)_Right.imag()) + { // construct complex from complex + } + +inline + complex::complex(const complex& _Right) + : _Complex_base( + (_Ty)_Right.real(), (_Ty)_Right.imag()) + { // construct complex from complex + } + +inline + complex::complex(const complex& _Right) + : _Complex_base( + (_Ty)_Right.real(), (_Ty)_Right.imag()) + { // construct complex from complex + } + +inline + complex::complex(const complex& _Right) + : _Complex_base( + (_Ty)_Right.real(), (_Ty)_Right.imag()) + { // construct complex from complex + } + +inline + complex::complex(const complex& _Right) + : _Complex_base( + (_Ty)_Right.real(), (_Ty)_Right.imag()) + { // construct complex from complex + } + + // TEMPLATE CLASS complex +template + class complex + : public _Complex_base<_Ty, _Complex_value<_Ty> > + { // complex with _Ty components +public: + typedef complex<_Ty> _Myt; + typedef _Complex_base<_Ty, _Complex_value<_Ty> > _Mybase; + + complex(const _Ty& _Realval = 0, const _Ty& _Imagval = 0) + : _Mybase(_Realval, _Imagval) + { // construct from components of same type + } + + _Myt& operator=(const _Ty& _Right) + { // assign real + this->_Val[0] = _Right; + this->_Val[1] = 0; + return (*this); + } + + template + complex(const complex<_Other>& _Right) + : _Mybase((_Ty)_Right.real(), (_Ty)_Right.imag()) + { // construct from other complex type + } + + template + _Myt& operator=(const complex<_Other>& _Right) + { // assign other complex type + this->_Val[0] = (_Ty)_Right.real(); + this->_Val[1] = (_Ty)_Right.imag(); + return (*this); + } + + _Myt& operator+=(const _Ty& _Right) + { // add real + this->_Val[0] = this->_Val[0] + _Right; + return (*this); + } + + _Myt& operator-=(const _Ty& _Right) + { // subtract real + this->_Val[0] = this->_Val[0] - _Right; + return (*this); + } + + _Myt& operator*=(const _Ty& _Right) + { // multiply by real + this->_Val[0] = this->_Val[0] * _Right; + this->_Val[1] = this->_Val[1] * _Right; + return (*this); + } + + _Myt& operator/=(const _Ty& _Right) + { // divide by real + this->_Val[0] = this->_Val[0] / _Right; + this->_Val[1] = this->_Val[1] / _Right; + return (*this); + } + + _Myt& operator+=(const _Myt& _Right) + { // add other complex + this->_Add(_Right); + return (*this); + } + + _Myt& operator-=(const _Myt& _Right) + { // subtract other complex + this->_Sub(_Right); + return (*this); + } + + _Myt& operator*=(const _Myt& _Right) + { // multiply by other complex + this->_Mul(_Right); + return (*this); + } + + _Myt& operator/=(const _Myt& _Right) + { // divide by other complex + this->_Div(_Right); + return (*this); + } + + template inline + _Myt& operator+=(const complex<_Other>& _Right) + { // add other complex + this->_Add(_Right); + return (*this); + } + + template inline + _Myt& operator-=(const complex<_Other>& _Right) + { // subtract other complex + this->_Sub(_Right); + return (*this); + } + + template inline + _Myt& operator*=(const complex<_Other>& _Right) + { // multiply by other complex + this->_Mul(_Right); + return (*this); + } + + template inline + _Myt& operator/=(const complex<_Other>& _Right) + { // divide by other complex + this->_Div(_Right); + return (*this); + } + }; + + #define _CMPLX(T) complex + #define _CTR(T) _Ctraits + #define _TMPLT(T) template + #include /* define all complex template functions */ + + + // TEMPLATE FUNCTION operator>> +template inline + basic_istream<_Elem, _Tr>& __cdecl operator>>( + basic_istream<_Elem, _Tr>& _Istr, complex<_Ty>& _Right) + { // extract a complex<_Ty> + typedef complex<_Ty> _Myt; + const ctype<_Elem>& _Ctype_fac = _USE(_Istr.getloc(), ctype<_Elem>); + _Elem _Ch; + long double _Real, _Imag = 0; + + if (_Istr >> _Ch && _Ch != _Ctype_fac.widen('(')) + { // no leading '(', treat as real only + _Istr.putback(_Ch); + _Istr >> _Real; + _Imag = 0; + } + else if (_Istr >> _Real >> _Ch && _Ch != _Ctype_fac.widen(',')) + if (_Ch == _Ctype_fac.widen(')')) + _Imag = 0; // (real) + else + { // no trailing ')' after real, treat as bad field + _Istr.putback(_Ch); + _Istr.setstate(ios_base::failbit); + } + else if (_Istr >> _Imag >> _Ch && _Ch != _Ctype_fac.widen(')')) + { // no imag or trailing ')', treat as bad field + _Istr.putback(_Ch); + _Istr.setstate(ios_base::failbit); + } + + if (!_Istr.fail()) + { // store valid result + _Ty _Tyreal((_Ty)_Real), _Tyimag((_Ty)_Imag); + _Right = _Myt(_Tyreal, _Tyimag); + } + return (_Istr); + } + + // TEMPLATE FUNCTION operator<< +template inline + basic_ostream<_Elem, _Tr>& __cdecl operator<<( + basic_ostream<_Elem, _Tr>& _Ostr, const complex<_Ty>& _Right) + { // insert a complex<_Ty> + const ctype<_Elem>& _Ctype_fac = _USE(_Ostr.getloc(), ctype<_Elem>); + basic_ostringstream<_Elem, _Tr, allocator<_Elem> > _Sstr; + + _Sstr.flags(_Ostr.flags()); + _Sstr.imbue(_Ostr.getloc()); + _Sstr.precision(_Ostr.precision()); + _Sstr << _Ctype_fac.widen('(') << real(_Right) + << _Ctype_fac.widen(',') << imag(_Right) + << _Ctype_fac.widen(')'); + + basic_string<_Elem, _Tr, allocator<_Elem> > _Str = _Sstr.str(); + return (_Ostr << _Str.c_str()); + } + + #ifdef _DLL_CPPLIB +template _CRTIMP2 basic_istream >& + __cdecl operator>>(basic_istream >&, + complex&); +template _CRTIMP2 basic_ostream >& + __cdecl operator<<(basic_ostream >&, + const complex&); +template _CRTIMP2 basic_istream >& + __cdecl operator>>(basic_istream >&, + complex&); +template _CRTIMP2 basic_ostream >& + __cdecl operator<<(basic_ostream >&, + const complex&); + + +template _CRTIMP2 basic_istream >& + __cdecl operator>>(basic_istream >&, + complex&); +template _CRTIMP2 basic_ostream >& + __cdecl operator<<(basic_ostream >&, + const complex&); +template _CRTIMP2 basic_istream >& + __cdecl operator>>(basic_istream >&, + complex&); +template _CRTIMP2 basic_ostream >& + __cdecl operator<<(basic_ostream >&, + const complex&); + + +template _CRTIMP2 basic_istream >& + __cdecl operator>>(basic_istream >&, + complex&); +template _CRTIMP2 basic_ostream >& + __cdecl operator<<(basic_ostream >&, + const complex&); +template _CRTIMP2 basic_istream >& + __cdecl operator>>(basic_istream >&, + complex&); +template _CRTIMP2 basic_ostream >& + __cdecl operator<<(basic_ostream >&, + const complex&); + + + + #endif /* _DLL_CPPLIB */ +_STD_END + #pragma warning(default: 4244) + +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _COMPLEX_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/conio.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/conio.h new file mode 100644 index 00000000..8642e395 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/conio.h @@ -0,0 +1,131 @@ +/*** +*conio.h - console and port I/O declarations +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file contains the function declarations for +* the MS C V2.03 compatible console I/O routines. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_CONIO +#define _INC_CONIO + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +#ifndef _WCTYPE_T_DEFINED +typedef unsigned short wint_t; +typedef unsigned short wctype_t; +#define _WCTYPE_T_DEFINED +#endif + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + +/* Function prototypes */ + +_CRTIMP char * __cdecl _cgets(char *); +_CRTIMP int __cdecl _cprintf(const char *, ...); +_CRTIMP int __cdecl _cputs(const char *); +_CRTIMP int __cdecl _cscanf(const char *, ...); +_CRTIMP int __cdecl _getch(void); +_CRTIMP int __cdecl _getche(void); +#ifdef _M_IX86 +int __cdecl _inp(unsigned short); +unsigned short __cdecl _inpw(unsigned short); +unsigned long __cdecl _inpd(unsigned short); +#endif /* _M_IX86 */ +_CRTIMP int __cdecl _kbhit(void); +#ifdef _M_IX86 +int __cdecl _outp(unsigned short, int); +unsigned short __cdecl _outpw(unsigned short, unsigned short); +unsigned long __cdecl _outpd(unsigned short, unsigned long); +#endif /* _M_IX86 */ +_CRTIMP int __cdecl _putch(int); +_CRTIMP int __cdecl _ungetch(int); + + +#ifndef _WCONIO_DEFINED + +/* wide function prototypes, also declared in wchar.h */ + +#ifndef WEOF +#define WEOF (wint_t)(0xFFFF) +#endif + +_CRTIMP wchar_t * __cdecl _cgetws(wchar_t *); +_CRTIMP wint_t __cdecl _getwch(void); +_CRTIMP wint_t __cdecl _getwche(void); +_CRTIMP wint_t __cdecl _putwch(wchar_t); +_CRTIMP wint_t __cdecl _ungetwch(wint_t); +_CRTIMP int __cdecl _cputws(const wchar_t *); +_CRTIMP int __cdecl _cwprintf(const wchar_t *, ...); +_CRTIMP int __cdecl _cwscanf(const wchar_t *, ...); + + +#define _WCONIO_DEFINED +#endif /* _WCONIO_DEFINED */ + +#if !__STDC__ + +/* Non-ANSI names for compatibility */ + +_CRTIMP char * __cdecl cgets(char *); +_CRTIMP int __cdecl cprintf(const char *, ...); +_CRTIMP int __cdecl cputs(const char *); +_CRTIMP int __cdecl cscanf(const char *, ...); +#ifdef _M_IX86 +int __cdecl inp(unsigned short); +unsigned short __cdecl inpw(unsigned short); +#endif /* _M_IX86 */ +_CRTIMP int __cdecl getch(void); +_CRTIMP int __cdecl getche(void); +_CRTIMP int __cdecl kbhit(void); +#ifdef _M_IX86 +int __cdecl outp(unsigned short, int); +unsigned short __cdecl outpw(unsigned short, unsigned short); +#endif /* _M_IX86 */ +_CRTIMP int __cdecl putch(int); +_CRTIMP int __cdecl ungetch(int); + +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#endif /* _INC_CONIO */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/crtdbg.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/crtdbg.h new file mode 100644 index 00000000..099af8af --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/crtdbg.h @@ -0,0 +1,704 @@ +/*** +*crtdbg.h - Supports debugging features of the C runtime library. +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* Support CRT debugging features. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_CRTDBG +#define _INC_CRTDBG + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + + + /**************************************************************************** + * + * Constants and types + * + ***************************************************************************/ + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +#ifndef _SIZE_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 size_t; +#else +typedef _W64 unsigned int size_t; +#endif +#define _SIZE_T_DEFINED +#endif + +/* Define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + /**************************************************************************** + * + * Debug Reporting + * + ***************************************************************************/ + +typedef void *_HFILE; /* file handle pointer */ + +#define _CRT_WARN 0 +#define _CRT_ERROR 1 +#define _CRT_ASSERT 2 +#define _CRT_ERRCNT 3 + +#define _CRTDBG_MODE_FILE 0x1 +#define _CRTDBG_MODE_DEBUG 0x2 +#define _CRTDBG_MODE_WNDW 0x4 +#define _CRTDBG_REPORT_MODE -1 + +#define _CRTDBG_INVALID_HFILE ((_HFILE)-1) +#define _CRTDBG_HFILE_ERROR ((_HFILE)-2) +#define _CRTDBG_FILE_STDOUT ((_HFILE)-4) +#define _CRTDBG_FILE_STDERR ((_HFILE)-5) +#define _CRTDBG_REPORT_FILE ((_HFILE)-6) + +typedef int (__cdecl * _CRT_REPORT_HOOK)(int, char *, int *); + +#define _CRT_RPTHOOK_INSTALL 0 +#define _CRT_RPTHOOK_REMOVE 1 + + /**************************************************************************** + * + * Heap + * + ***************************************************************************/ + + /**************************************************************************** + * + * Client-defined allocation hook + * + ***************************************************************************/ + +#define _HOOK_ALLOC 1 +#define _HOOK_REALLOC 2 +#define _HOOK_FREE 3 + +typedef int (__cdecl * _CRT_ALLOC_HOOK)(int, void *, size_t, int, long, const unsigned char *, int); + + /**************************************************************************** + * + * Memory management + * + ***************************************************************************/ + +/* + * Bit values for _crtDbgFlag flag: + * + * These bitflags control debug heap behavior. + */ + +#define _CRTDBG_ALLOC_MEM_DF 0x01 /* Turn on debug allocation */ +#define _CRTDBG_DELAY_FREE_MEM_DF 0x02 /* Don't actually free memory */ +#define _CRTDBG_CHECK_ALWAYS_DF 0x04 /* Check heap every alloc/dealloc */ +#define _CRTDBG_RESERVED_DF 0x08 /* Reserved - do not use */ +#define _CRTDBG_CHECK_CRT_DF 0x10 /* Leak check/diff CRT blocks */ +#define _CRTDBG_LEAK_CHECK_DF 0x20 /* Leak check at program exit */ + +/* + * Some bit values for _crtDbgFlag which correspond to frequencies for checking + * the the heap. + */ +#define _CRTDBG_CHECK_EVERY_16_DF 0x00100000 /* check heap every 16 heap ops */ +#define _CRTDBG_CHECK_EVERY_128_DF 0x00800000 /* check heap every 128 heap ops */ +#define _CRTDBG_CHECK_EVERY_1024_DF 0x04000000 /* check heap every 1024 heap ops */ +/* +We do not check the heap by default at this point because the cost was too high +for some applications. You can still turn this feature on manually. +*/ +#define _CRTDBG_CHECK_DEFAULT_DF 0 + +#define _CRTDBG_REPORT_FLAG -1 /* Query bitflag status */ + +#define _BLOCK_TYPE(block) (block & 0xFFFF) +#define _BLOCK_SUBTYPE(block) (block >> 16 & 0xFFFF) + + + /**************************************************************************** + * + * Memory state + * + ***************************************************************************/ + +/* Memory block identification */ +#define _FREE_BLOCK 0 +#define _NORMAL_BLOCK 1 +#define _CRT_BLOCK 2 +#define _IGNORE_BLOCK 3 +#define _CLIENT_BLOCK 4 +#define _MAX_BLOCKS 5 + +typedef void (__cdecl * _CRT_DUMP_CLIENT)(void *, size_t); + +struct _CrtMemBlockHeader; +typedef struct _CrtMemState +{ + struct _CrtMemBlockHeader * pBlockHeader; + size_t lCounts[_MAX_BLOCKS]; + size_t lSizes[_MAX_BLOCKS]; + size_t lHighWaterCount; + size_t lTotalCount; +} _CrtMemState; + + + /**************************************************************************** + * + * Declarations, prototype and function-like macros + * + ***************************************************************************/ + + +#ifndef _DEBUG + + /**************************************************************************** + * + * Debug OFF + * Debug OFF + * Debug OFF + * + ***************************************************************************/ + +/* We allow our basic _ASSERT macros to be overridden by pre-existing definitions. + This is not the ideal mechanism, but is helpful in some scenarios and helps avoid + multiple definition problems */ + +#ifndef _ASSERT +#define _ASSERT(expr) ((void)0) +#endif + +#ifndef _ASSERTE +#define _ASSERTE(expr) ((void)0) +#endif + +#define _RPT0(rptno, msg) + +#define _RPT1(rptno, msg, arg1) + +#define _RPT2(rptno, msg, arg1, arg2) + +#define _RPT3(rptno, msg, arg1, arg2, arg3) + +#define _RPT4(rptno, msg, arg1, arg2, arg3, arg4) + + +#define _RPTF0(rptno, msg) + +#define _RPTF1(rptno, msg, arg1) + +#define _RPTF2(rptno, msg, arg1, arg2) + +#define _RPTF3(rptno, msg, arg1, arg2, arg3) + +#define _RPTF4(rptno, msg, arg1, arg2, arg3, arg4) + +#define _malloc_dbg(s, t, f, l) malloc(s) +#define _calloc_dbg(c, s, t, f, l) calloc(c, s) +#define _realloc_dbg(p, s, t, f, l) realloc(p, s) +#define _expand_dbg(p, s, t, f, l) _expand(p, s) +#define _free_dbg(p, t) free(p) +#define _msize_dbg(p, t) _msize(p) + +#define _aligned_malloc_dbg(s, a, f, l) _aligned_malloc(s, a) +#define _aligned_realloc_dbg(p, s, a, f, l) _aligned_realloc(p, s, a) +#define _aligned_free_dbg(p) _aligned_free(p) +#define _aligned_offset_malloc_dbg(s, a, o, f, l) _aligned_offset_malloc(s, a, o) +#define _aligned_offset_realloc_dbg(p, s, a, o, f, l) _aligned_offset_realloc(p, s, a, o) + +#define _CrtSetReportHook(f) ((_CRT_REPORT_HOOK)0) +#define _CrtSetReportHook2(t, f) ((int)0) +#define _CrtSetReportMode(t, f) ((int)0) +#define _CrtSetReportFile(t, f) ((_HFILE)0) + +#define _CrtDbgBreak() ((void)0) + +#define _CrtSetBreakAlloc(a) ((long)0) + +#define _CrtSetAllocHook(f) ((_CRT_ALLOC_HOOK)0) + +#define _CrtCheckMemory() ((int)1) +#define _CrtSetDbgFlag(f) ((int)0) +#define _CrtDoForAllClientObjects(f, c) ((void)0) +#define _CrtIsValidPointer(p, n, r) ((int)1) +#define _CrtIsValidHeapPointer(p) ((int)1) +#define _CrtIsMemoryBlock(p, t, r, f, l) ((int)1) +#define _CrtReportBlockType(p) ((int)-1) + +#define _CrtSetDumpClient(f) ((_CRT_DUMP_CLIENT)0) + +#define _CrtMemCheckpoint(s) ((void)0) +#define _CrtMemDifference(s1, s2, s3) ((int)0) +#define _CrtMemDumpAllObjectsSince(s) ((void)0) +#define _CrtMemDumpStatistics(s) ((void)0) +#define _CrtDumpMemoryLeaks() ((int)0) + + +#else /* _DEBUG */ + + + /**************************************************************************** + * + * Debug ON + * Debug ON + * Debug ON + * + ***************************************************************************/ + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + /**************************************************************************** + * + * Debug Reporting + * + ***************************************************************************/ + +_CRTIMP extern long _crtAssertBusy; + +_CRTIMP _CRT_REPORT_HOOK __cdecl _CrtSetReportHook( + _CRT_REPORT_HOOK + ); + +_CRTIMP int __cdecl _CrtSetReportHook2( + int, + _CRT_REPORT_HOOK + ); + +_CRTIMP int __cdecl _CrtSetReportMode( + int, + int + ); + +_CRTIMP _HFILE __cdecl _CrtSetReportFile( + int, + _HFILE + ); + +_CRTIMP int __cdecl _CrtDbgReport( + int, + const char *, + int, + const char *, + const char *, + ...); + +/* Asserts */ + +#if _MSC_VER >= 1300 || !defined(_M_IX86) || defined(_CRT_PORTABLE) +#define _ASSERT_BASE(expr, msg) \ + (void) ((expr) || \ + (1 != _CrtDbgReport(_CRT_ASSERT, __FILE__, __LINE__, NULL, msg)) || \ + (_CrtDbgBreak(), 0)) +#else +#define _ASSERT_BASE(expr, msg) \ + do { if (!(expr) && \ + (1 == _CrtDbgReport(_CRT_ASSERT, __FILE__, __LINE__, NULL, msg))) \ + _CrtDbgBreak(); } while (0) +#endif + +#ifndef _ASSERT +#define _ASSERT(expr) _ASSERT_BASE((expr), NULL) +#endif + +#ifndef _ASSERTE +#define _ASSERTE(expr) _ASSERT_BASE((expr), #expr) +#endif + +/* Reports with no file/line info */ + +#if _MSC_VER >= 1300 || !defined(_M_IX86) || defined(_CRT_PORTABLE) +#define _RPT_BASE(args) \ + (void) ((1 != _CrtDbgReport args) || \ + (_CrtDbgBreak(), 0)) +#else +#define _RPT_BASE(args) \ + do { if ((1 == _CrtDbgReport args)) \ + _CrtDbgBreak(); } while (0) +#endif + +#define _RPT0(rptno, msg) \ + _RPT_BASE((rptno, NULL, 0, NULL, "%s", msg)) + +#define _RPT1(rptno, msg, arg1) \ + _RPT_BASE((rptno, NULL, 0, NULL, msg, arg1)) + +#define _RPT2(rptno, msg, arg1, arg2) \ + _RPT_BASE((rptno, NULL, 0, NULL, msg, arg1, arg2)) + +#define _RPT3(rptno, msg, arg1, arg2, arg3) \ + _RPT_BASE((rptno, NULL, 0, NULL, msg, arg1, arg2, arg3)) + +#define _RPT4(rptno, msg, arg1, arg2, arg3, arg4) \ + _RPT_BASE((rptno, NULL, 0, NULL, msg, arg1, arg2, arg3, arg4)) + + +/* Reports with file/line info */ + +#define _RPTF0(rptno, msg) \ + _RPT_BASE((rptno, __FILE__, __LINE__, NULL, "%s", msg)) + +#define _RPTF1(rptno, msg, arg1) \ + _RPT_BASE((rptno, __FILE__, __LINE__, NULL, msg, arg1)) + +#define _RPTF2(rptno, msg, arg1, arg2) \ + _RPT_BASE((rptno, __FILE__, __LINE__, NULL, msg, arg1, arg2)) + +#define _RPTF3(rptno, msg, arg1, arg2, arg3) \ + _RPT_BASE((rptno, __FILE__, __LINE__, NULL, msg, arg1, arg2, arg3)) + +#define _RPTF4(rptno, msg, arg1, arg2, arg3, arg4) \ + _RPT_BASE((rptno, __FILE__, __LINE__, NULL, msg, arg1, arg2, arg3, arg4)) + +#if _MSC_VER >= 1300 && !defined(_CRT_PORTABLE) +#define _CrtDbgBreak() __debugbreak() +#elif defined(_M_IX86) && !defined(_CRT_PORTABLE) +#define _CrtDbgBreak() __asm { int 3 } +#elif defined(_M_ALPHA) && !defined(_CRT_PORTABLE) +void _BPT(); +#pragma intrinsic(_BPT) +#define _CrtDbgBreak() _BPT() +#elif defined(_M_IA64) && !defined(_CRT_PORTABLE) +void __break(int); +#pragma intrinsic (__break) +#define _CrtDbgBreak() __break(0x80016) +#else +_CRTIMP void __cdecl _CrtDbgBreak( + void + ); +#endif + + /**************************************************************************** + * + * Heap routines + * + ***************************************************************************/ + +#ifdef _CRTDBG_MAP_ALLOC + +#define malloc(s) _malloc_dbg(s, _NORMAL_BLOCK, __FILE__, __LINE__) +#define calloc(c, s) _calloc_dbg(c, s, _NORMAL_BLOCK, __FILE__, __LINE__) +#define realloc(p, s) _realloc_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__) +#define _expand(p, s) _expand_dbg(p, s, _NORMAL_BLOCK, __FILE__, __LINE__) +#define free(p) _free_dbg(p, _NORMAL_BLOCK) +#define _msize(p) _msize_dbg(p, _NORMAL_BLOCK) +#define _aligned_malloc(s, a) _aligned_malloc_dbg(s, a, __FILE__, __LINE__) +#define _aligned_realloc(p, s, a) _aligned_realloc_dbg(p, s, a, __FILE__, __LINE__) +#define _aligned_offset_malloc(s, a, o) _aligned_offset_malloc_dbg(s, a, o, __FILE__, __LINE__) +#define _aligned_offset_realloc(p, s, a, o) _aligned_offset_realloc_dbg(p, s, a, o, __FILE__, __LINE__) +#define _aligned_free(p) _aligned_free_dbg(p) + +#endif /* _CRTDBG_MAP_ALLOC */ + +_CRTIMP extern long _crtBreakAlloc; /* Break on this allocation */ + +_CRTIMP long __cdecl _CrtSetBreakAlloc( + long + ); + +/* + * Prototypes for malloc, free, realloc, etc are in malloc.h + */ + +_CRTIMP void * __cdecl _malloc_dbg( + size_t, + int, + const char *, + int + ); + +_CRTIMP void * __cdecl _calloc_dbg( + size_t, + size_t, + int, + const char *, + int + ); + +_CRTIMP void * __cdecl _realloc_dbg( + void *, + size_t, + int, + const char *, + int + ); + +_CRTIMP void * __cdecl _expand_dbg( + void *, + size_t, + int, + const char *, + int + ); + +_CRTIMP void __cdecl _free_dbg( + void *, + int + ); + +_CRTIMP size_t __cdecl _msize_dbg ( + void *, + int + ); + +_CRTIMP void * __cdecl _aligned_malloc_dbg( + size_t, + size_t, + const char *, + int + ); + +_CRTIMP void * __cdecl _aligned_realloc_dbg( + void *, + size_t, + size_t, + const char *, + int + ); + +_CRTIMP void * __cdecl _aligned_offset_malloc_dbg( + size_t, + size_t, + size_t, + const char *, + int + ); + +_CRTIMP void * __cdecl _aligned_offset_realloc_dbg( + void *, + size_t, + size_t, + size_t, + const char *, + int + ); + +_CRTIMP void __cdecl _aligned_free_dbg( + void * + ); + + + /**************************************************************************** + * + * Client-defined allocation hook + * + ***************************************************************************/ + +_CRTIMP _CRT_ALLOC_HOOK __cdecl _CrtSetAllocHook( + _CRT_ALLOC_HOOK + ); + + + /**************************************************************************** + * + * Memory management + * + ***************************************************************************/ + +/* + * Bitfield flag that controls CRT heap behavior + * Default setting is _CRTDBG_ALLOC_MEM_DF + */ + +_CRTIMP extern int _crtDbgFlag; + +_CRTIMP int __cdecl _CrtCheckMemory( + void + ); + +_CRTIMP int __cdecl _CrtSetDbgFlag( + int + ); + +_CRTIMP void __cdecl _CrtDoForAllClientObjects( + void (*pfn)(void *, void *), + void * + ); + +_CRTIMP int __cdecl _CrtIsValidPointer( + const void *, + unsigned int, + int + ); + +_CRTIMP int __cdecl _CrtIsValidHeapPointer( + const void * + ); + +_CRTIMP int __cdecl _CrtIsMemoryBlock( + const void *, + unsigned int, + long *, + char **, + int * + ); + +_CRTIMP int __cdecl _CrtReportBlockType( + const void * + ); + + + /**************************************************************************** + * + * Memory state + * + ***************************************************************************/ + +_CRTIMP _CRT_DUMP_CLIENT __cdecl _CrtSetDumpClient( + _CRT_DUMP_CLIENT + ); + +_CRTIMP void __cdecl _CrtMemCheckpoint( + _CrtMemState * + ); + +_CRTIMP int __cdecl _CrtMemDifference( + _CrtMemState *, + const _CrtMemState *, + const _CrtMemState * + ); + +_CRTIMP void __cdecl _CrtMemDumpAllObjectsSince( + const _CrtMemState * + ); + +_CRTIMP void __cdecl _CrtMemDumpStatistics( + const _CrtMemState * + ); + +_CRTIMP int __cdecl _CrtDumpMemoryLeaks( + void + ); + +#endif /* _DEBUG */ + +#ifdef __cplusplus +} + +#ifndef _MFC_OVERRIDES_NEW + +extern "C++" { + +#pragma warning(disable: 4507) /* Ignore faulty warning */ + +#ifndef _DEBUG + + /**************************************************************************** + * + * Debug OFF + * Debug OFF + * Debug OFF + * + ***************************************************************************/ + + +void * __cdecl operator new[](size_t); + +inline void * __cdecl operator new(size_t s, int, const char *, int) + { return ::operator new(s); } + +inline void* __cdecl operator new[](size_t s, int, const char *, int) + { return ::operator new[](s); } + +#if _MSC_VER >= 1200 + + +void __cdecl operator delete[](void *); + +inline void __cdecl operator delete(void * _P, int, const char *, int) + { ::operator delete(_P); } +inline void __cdecl operator delete[](void * _P, int, const char *, int) + { ::operator delete[](_P); } +#endif +#else /* _DEBUG */ + + /**************************************************************************** + * + * Debug ON + * Debug ON + * Debug ON + * + ***************************************************************************/ + +void * __cdecl operator new[](size_t); + +void * __cdecl operator new( + size_t, + int, + const char *, + int + ); + +void * __cdecl operator new[]( + size_t, + int, + const char *, + int + ); + +#if _MSC_VER >= 1200 +void __cdecl operator delete[](void *); + +inline void __cdecl operator delete(void * _P, int, const char *, int) + { ::operator delete(_P); } + +inline void __cdecl operator delete[](void * _P, int, const char *, int) + { ::operator delete[](_P); } +#endif + +#ifdef _CRTDBG_MAP_ALLOC + +inline void * __cdecl operator new(size_t s) + { return ::operator new(s, _NORMAL_BLOCK, __FILE__, __LINE__); } + +inline void* __cdecl operator new[](size_t s) + { return ::operator new[](s, _NORMAL_BLOCK, __FILE__, __LINE__); } + +#endif /* _CRTDBG_MAP_ALLOC */ + +#endif /* _DEBUG */ + +} + +#endif /* _MFC_OVERRIDES_NEW */ + +#endif /* __cplusplus */ + +#endif /* _INC_CRTDBG */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/csetjmp b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/csetjmp new file mode 100644 index 00000000..521a38aa --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/csetjmp @@ -0,0 +1,31 @@ +// csetjmp standard header +#pragma once +#ifndef _CSETJMP_ +#define _CSETJMP_ +#include + +#ifdef _STD_USING + #undef _STD_USING + #include + #define _STD_USING + +#else /* _STD_USING */ + #include + + #if _GLOBAL_USING +_STD_BEGIN +using ::jmp_buf; using ::longjmp; + #ifndef setjmp +using ::setjmp; + #endif /* setjmp */ + +_STD_END + #endif /* _GLOBAL_USING */ + +#endif /* _STD_USING */ +#endif /* _CSETJMP_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/csignal b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/csignal new file mode 100644 index 00000000..cb20295c --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/csignal @@ -0,0 +1,27 @@ +// csignal standard header +#pragma once +#ifndef _CSIGNAL_ +#define _CSIGNAL_ +#include + +#ifdef _STD_USING + #undef _STD_USING + #include + #define _STD_USING + +#else /* _STD_USING */ + #include + + #if _GLOBAL_USING +_STD_BEGIN +using ::sig_atomic_t; using ::raise; using ::signal; +_STD_END + #endif /* _GLOBAL_USING */ + +#endif /* _STD_USING */ +#endif /* _CSIGNAL_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cstdarg b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cstdarg new file mode 100644 index 00000000..4eb77bcd --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cstdarg @@ -0,0 +1,27 @@ +// cstdarg standard header +#pragma once +#ifndef _CSTDARG_ +#define _CSTDARG_ +#include + +#ifdef _STD_USING + #undef _STD_USING + #include + #define _STD_USING + +#else /* _STD_USING */ + #include + + #if _GLOBAL_USING +_STD_BEGIN +using ::va_list; +_STD_END + #endif /* _GLOBAL_USING */ + +#endif /* _STD_USING */ +#endif /* _CSTDARG_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cstddef b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cstddef new file mode 100644 index 00000000..e5577cc2 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cstddef @@ -0,0 +1,27 @@ +// cstddef standard header +#pragma once +#ifndef _CSTDDEF_ +#define _CSTDDEF_ +#include + +#ifdef _STD_USING + #undef _STD_USING + #include + #define _STD_USING + +#else /* _STD_USING */ + #include + + #if _GLOBAL_USING +_STD_BEGIN +using ::ptrdiff_t; using ::size_t; +_STD_END + #endif /* _GLOBAL_USING */ + +#endif /* _STD_USING */ +#endif /* _CSTDDEF_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cstdio b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cstdio new file mode 100644 index 00000000..912bede4 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cstdio @@ -0,0 +1,42 @@ +// cstdio standard header +#pragma once +#ifndef _CSTDIO_ +#define _CSTDIO_ +#include + +#ifdef _STD_USING + #undef _STD_USING + #include + #define _STD_USING + +#else /* _STD_USING */ + #include + + #if _GLOBAL_USING +_STD_BEGIN +using ::size_t; using ::fpos_t; using ::FILE; +using ::clearerr; using ::fclose; using ::feof; +using ::ferror; using ::fflush; using ::fgetc; +using ::fgetpos; using ::fgets; using ::fopen; +using ::fprintf; using ::fputc; using ::fputs; +using ::fread; using ::freopen; using ::fscanf; +using ::fseek; using ::fsetpos; using ::ftell; +using ::fwrite; using ::getc; using ::getchar; +using ::gets; using ::perror; +using ::putc; using ::putchar; +using ::printf; using ::puts; using ::remove; +using ::rename; using ::rewind; using ::scanf; +using ::setbuf; using ::setvbuf; using ::sprintf; +using ::sscanf; using ::tmpfile; using ::tmpnam; +using ::ungetc; using ::vfprintf; using ::vprintf; +using ::vsprintf; +_STD_END + #endif /* _GLOBAL_USING */ + +#endif /* _STD_USING */ +#endif /* _CSTDIO_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cstdlib b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cstdlib new file mode 100644 index 00000000..115269be --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cstdlib @@ -0,0 +1,38 @@ +// cstdlib standard header +#pragma once +#ifndef _CSTDLIB_ +#define _CSTDLIB_ +#include + +#ifdef _STD_USING + #undef _STD_USING + #include + #define _STD_USING + +#else /* _STD_USING */ + #include + + #if _GLOBAL_USING +_STD_BEGIN +using ::size_t; using ::div_t; using ::ldiv_t; + +using ::abort; using ::abs; using ::atexit; +using ::atof; using ::atoi; using ::atol; +using ::bsearch; using ::calloc; using ::div; +using ::exit; using ::free; using ::getenv; +using ::labs; using ::ldiv; using ::malloc; +using ::mblen; using ::mbstowcs; using ::mbtowc; +using ::qsort; using ::rand; using ::realloc; +using ::srand; using ::strtod; using ::strtol; +using ::strtoul; using ::system; +using ::wcstombs; using ::wctomb; +_STD_END + #endif /* _GLOBAL_USING */ + +#endif /* _STD_USING */ +#endif /* _CSTDLIB_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cstring b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cstring new file mode 100644 index 00000000..221f5af9 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cstring @@ -0,0 +1,34 @@ +// cstring standard header +#pragma once +#ifndef _CSTRING_ +#define _CSTRING_ +#include + +#ifdef _STD_USING + #undef _STD_USING + #include + #define _STD_USING + +#else /* _STD_USING */ + #include + + #if _GLOBAL_USING +_STD_BEGIN +using ::size_t; using ::memchr; using ::memcmp; +using ::memcpy; using ::memmove; using ::memset; +using ::strcat; using ::strchr; using ::strcmp; +using ::strcoll; using ::strcpy; using ::strcspn; +using ::strerror; using ::strlen; using ::strncat; +using ::strncmp; using ::strncpy; using ::strpbrk; +using ::strrchr; using ::strspn; using ::strstr; +using ::strtok; using ::strxfrm; +_STD_END + #endif /* _GLOBAL_USING */ + +#endif /* _STD_USING */ +#endif /* _CSTRING_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ctime b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ctime new file mode 100644 index 00000000..6209fbe9 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ctime @@ -0,0 +1,31 @@ +// ctime standard header +#pragma once +#ifndef _CTIME_ +#define _CTIME_ +#include + +#ifdef _STD_USING + #undef _STD_USING + #include + #define _STD_USING + +#else /* _STD_USING */ + #include + + #if _GLOBAL_USING +_STD_BEGIN +using ::clock_t; using ::size_t; +using ::time_t; using ::tm; +using ::asctime; using ::clock; using ::ctime; +using ::difftime; using ::gmtime; using ::localtime; +using ::mktime; using ::strftime; using ::time; +_STD_END + #endif /* _GLOBAL_USING */ + +#endif /* _STD_USING */ +#endif /* _CTIME_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ctype.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ctype.h new file mode 100644 index 00000000..89d109a5 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ctype.h @@ -0,0 +1,295 @@ +/*** +*ctype.h - character conversion macros and ctype macros +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* Defines macros for character classification/conversion. +* [ANSI/System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_CTYPE +#define _INC_CTYPE + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +#ifndef _WCTYPE_T_DEFINED +typedef unsigned short wint_t; +typedef unsigned short wctype_t; +#define _WCTYPE_T_DEFINED +#endif + +#ifndef WEOF +#define WEOF (wint_t)(0xFFFF) +#endif + +#ifndef _CTYPE_DISABLE_MACROS +_CRTIMP extern const unsigned short _wctype[]; +_CRTIMP extern const unsigned short *_pctype; +_CRTIMP extern const wctype_t *_pwctype; +#endif /* _CTYPE_DISABLE_MACROS */ + + + + +/* set bit masks for the possible character types */ + +#define _UPPER 0x1 /* upper case letter */ +#define _LOWER 0x2 /* lower case letter */ +#define _DIGIT 0x4 /* digit[0-9] */ +#define _SPACE 0x8 /* tab, carriage return, newline, */ + /* vertical tab or form feed */ +#define _PUNCT 0x10 /* punctuation character */ +#define _CONTROL 0x20 /* control character */ +#define _BLANK 0x40 /* space char */ +#define _HEX 0x80 /* hexadecimal digit */ + +#define _LEADBYTE 0x8000 /* multibyte leadbyte */ +#define _ALPHA (0x0100|_UPPER|_LOWER) /* alphabetic character */ + + +/* character classification function prototypes */ + +#ifndef _CTYPE_DEFINED + +_CRTIMP int __cdecl _isctype(int, int); +_CRTIMP int __cdecl isalpha(int); +_CRTIMP int __cdecl isupper(int); +_CRTIMP int __cdecl islower(int); +_CRTIMP int __cdecl isdigit(int); +_CRTIMP int __cdecl isxdigit(int); +_CRTIMP int __cdecl isspace(int); +_CRTIMP int __cdecl ispunct(int); +_CRTIMP int __cdecl isalnum(int); +_CRTIMP int __cdecl isprint(int); +_CRTIMP int __cdecl isgraph(int); +_CRTIMP int __cdecl iscntrl(int); +_CRTIMP int __cdecl toupper(int); +_CRTIMP int __cdecl tolower(int); +_CRTIMP int __cdecl _tolower(int); +_CRTIMP int __cdecl _toupper(int); +_CRTIMP int __cdecl __isascii(int); +_CRTIMP int __cdecl __toascii(int); +_CRTIMP int __cdecl __iscsymf(int); +_CRTIMP int __cdecl __iscsym(int); +#define _CTYPE_DEFINED +#endif + +#ifndef _WCTYPE_DEFINED + +/* wide function prototypes, also declared in wchar.h */ + +/* character classification function prototypes */ + +_CRTIMP int __cdecl iswalpha(wint_t); +_CRTIMP int __cdecl iswupper(wint_t); +_CRTIMP int __cdecl iswlower(wint_t); +_CRTIMP int __cdecl iswdigit(wint_t); +_CRTIMP int __cdecl iswxdigit(wint_t); +_CRTIMP int __cdecl iswspace(wint_t); +_CRTIMP int __cdecl iswpunct(wint_t); +_CRTIMP int __cdecl iswalnum(wint_t); +_CRTIMP int __cdecl iswprint(wint_t); +_CRTIMP int __cdecl iswgraph(wint_t); +_CRTIMP int __cdecl iswcntrl(wint_t); +_CRTIMP int __cdecl iswascii(wint_t); +_CRTIMP int __cdecl isleadbyte(int); + +_CRTIMP wchar_t __cdecl towupper(wchar_t); +_CRTIMP wchar_t __cdecl towlower(wchar_t); + +_CRTIMP int __cdecl iswctype(wint_t, wctype_t); + +/* --------- The following functions are OBSOLETE --------- */ +_CRTIMP int __cdecl is_wctype(wint_t, wctype_t); +/* --------- The preceding functions are OBSOLETE --------- */ + +#define _WCTYPE_DEFINED +#endif + +/* the character classification macro definitions */ + +#ifndef _CTYPE_DISABLE_MACROS + +/* + * Maximum number of bytes in multi-byte character in the current locale + * (also defined in stdlib.h). + */ +#ifndef MB_CUR_MAX +#define MB_CUR_MAX __mb_cur_max +_CRTIMP extern int __mb_cur_max; +/* These functions are for enabling STATIC_CPPLIB functionality */ +_CRTIMP int __cdecl ___mb_cur_max_func(void); +#endif /* MB_CUR_MAX */ + +/* Introduced to detect error when character testing functions are called + * with illegal input of integer. + */ +#ifdef _DEBUG +_CRTIMP int __cdecl _chvalidator(int, int); +#define __chvalidchk(a,b) _chvalidator(a,b) +#else +#define __chvalidchk(a,b) (_pctype[a] & (b)) +#endif + + + +#ifndef _MT +#ifndef __cplusplus +#define isalpha(_c) (MB_CUR_MAX > 1 ? _isctype(_c,_ALPHA) : __chvalidchk(_c, _ALPHA)) +#define isupper(_c) (MB_CUR_MAX > 1 ? _isctype(_c,_UPPER) : __chvalidchk(_c, _UPPER)) +#define islower(_c) (MB_CUR_MAX > 1 ? _isctype(_c,_LOWER) : __chvalidchk(_c, _LOWER)) +#define isdigit(_c) (MB_CUR_MAX > 1 ? _isctype(_c,_DIGIT) : __chvalidchk(_c, _DIGIT)) +#define isxdigit(_c) (MB_CUR_MAX > 1 ? _isctype(_c,_HEX) : __chvalidchk(_c, _HEX)) +#define isspace(_c) (MB_CUR_MAX > 1 ? _isctype(_c,_SPACE) : __chvalidchk(_c, _SPACE)) +#define ispunct(_c) (MB_CUR_MAX > 1 ? _isctype(_c,_PUNCT) : __chvalidchk(_c, _PUNCT)) +#define isalnum(_c) (MB_CUR_MAX > 1 ? _isctype(_c,_ALPHA|_DIGIT) : __chvalidchk(_c, (_ALPHA|_DIGIT))) +#define isprint(_c) (MB_CUR_MAX > 1 ? _isctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT) : __chvalidchk(_c, (_BLANK|_PUNCT|_ALPHA|_DIGIT))) +#define isgraph(_c) (MB_CUR_MAX > 1 ? _isctype(_c,_PUNCT|_ALPHA|_DIGIT) : __chvalidchk(_c, (_PUNCT|_ALPHA|_DIGIT))) +#define iscntrl(_c) (MB_CUR_MAX > 1 ? _isctype(_c,_CONTROL) : __chvalidchk(_c, _CONTROL)) +#elif 0 /* Pending ANSI C++ integration */ +inline int isalpha(int _C) + {return (MB_CUR_MAX > 1 ? _isctype(_C,_ALPHA) : __chvalidchk(_C, _ALPHA)); } +inline int isupper(int _C) + {return (MB_CUR_MAX > 1 ? _isctype(_C,_UPPER) : __chvalidchk(_C, _UPPER)); } +inline int islower(int _C) + {return (MB_CUR_MAX > 1 ? _isctype(_C,_LOWER) : __chvalidchk(_C, _LOWER)); } +inline int isdigit(int _C) + {return (MB_CUR_MAX > 1 ? _isctype(_C,_DIGIT) : __chvalidchk(_C, _DIGIT)); } +inline int isxdigit(int _C) + {return (MB_CUR_MAX > 1 ? _isctype(_C,_HEX) : __chvalidchk(_C, _HEX)); } +inline int isspace(int _C) + {return (MB_CUR_MAX > 1 ? _isctype(_C,_SPACE) : __chvalidchk(_C, _SPACE)); } +inline int ispunct(int _C) + {return (MB_CUR_MAX > 1 ? _isctype(_C,_PUNCT) : __chvalidchk(_C, _PUNCT)); } +inline int isalnum(int _C) + {return (MB_CUR_MAX > 1 ? _isctype(_C,_ALPHA|_DIGIT) + : __chvalidchk(_C) , (_ALPHA|_DIGIT)); } +inline int isprint(int _C) + {return (MB_CUR_MAX > 1 ? _isctype(_C,_BLANK|_PUNCT|_ALPHA|_DIGIT) + : __chvalidchk(_C , (_BLANK|_PUNCT|_ALPHA|_DIGIT))); } +inline int isgraph(int _C) + {return (MB_CUR_MAX > 1 ? _isctype(_C,_PUNCT|_ALPHA|_DIGIT) + : __chvalidchk(_C , (_PUNCT|_ALPHA|_DIGIT))); } +inline int iscntrl(int _C) + {return (MB_CUR_MAX > 1 ? _isctype(_C,_CONTROL) + : __chvalidchk(_C , _CONTROL)); } +#endif /* __cplusplus */ +#endif /* _MT */ + + +#define _tolower(_c) ( (_c)-'A'+'a' ) +#define _toupper(_c) ( (_c)-'a'+'A' ) + +#define __isascii(_c) ( (unsigned)(_c) < 0x80 ) +#define __toascii(_c) ( (_c) & 0x7f ) + +#ifndef _WCTYPE_INLINE_DEFINED +#ifndef __cplusplus +#define iswalpha(_c) ( iswctype(_c,_ALPHA) ) +#define iswupper(_c) ( iswctype(_c,_UPPER) ) +#define iswlower(_c) ( iswctype(_c,_LOWER) ) +#define iswdigit(_c) ( iswctype(_c,_DIGIT) ) +#define iswxdigit(_c) ( iswctype(_c,_HEX) ) +#define iswspace(_c) ( iswctype(_c,_SPACE) ) +#define iswpunct(_c) ( iswctype(_c,_PUNCT) ) +#define iswalnum(_c) ( iswctype(_c,_ALPHA|_DIGIT) ) +#define iswprint(_c) ( iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT) ) +#define iswgraph(_c) ( iswctype(_c,_PUNCT|_ALPHA|_DIGIT) ) +#define iswcntrl(_c) ( iswctype(_c,_CONTROL) ) +#define iswascii(_c) ( (unsigned)(_c) < 0x80 ) +#define isleadbyte(_c) ( _pctype[(unsigned char)(_c)] & _LEADBYTE) +#elif 0 /* __cplusplus */ +inline int iswalpha(wint_t _C) {return (iswctype(_C,_ALPHA)); } +inline int iswupper(wint_t _C) {return (iswctype(_C,_UPPER)); } +inline int iswlower(wint_t _C) {return (iswctype(_C,_LOWER)); } +inline int iswdigit(wint_t _C) {return (iswctype(_C,_DIGIT)); } +inline int iswxdigit(wint_t _C) {return (iswctype(_C,_HEX)); } +inline int iswspace(wint_t _C) {return (iswctype(_C,_SPACE)); } +inline int iswpunct(wint_t _C) {return (iswctype(_C,_PUNCT)); } +inline int iswalnum(wint_t _C) {return (iswctype(_C,_ALPHA|_DIGIT)); } +inline int iswprint(wint_t _C) + {return (iswctype(_C,_BLANK|_PUNCT|_ALPHA|_DIGIT)); } +inline int iswgraph(wint_t _C) + {return (iswctype(_C,_PUNCT|_ALPHA|_DIGIT)); } +inline int iswcntrl(wint_t _C) {return (iswctype(_C,_CONTROL)); } +inline int iswascii(wint_t _C) {return ((unsigned)(_C) < 0x80); } + +inline int isleadbyte(int _C) + {return (_pctype[(unsigned char)(_C)] & _LEADBYTE); } +#endif /* __cplusplus */ +#define _WCTYPE_INLINE_DEFINED +#endif /* _WCTYPE_INLINE_DEFINED */ + + + +/* MS C version 2.0 extended ctype macros */ + +#define __iscsymf(_c) (isalpha(_c) || ((_c) == '_')) +#define __iscsym(_c) (isalnum(_c) || ((_c) == '_')) + +#endif /* _CTYPE_DISABLE_MACROS */ + + +#if !__STDC__ + +/* Non-ANSI names for compatibility */ + +#ifndef _CTYPE_DEFINED +_CRTIMP int __cdecl isascii(int); +_CRTIMP int __cdecl toascii(int); +_CRTIMP int __cdecl iscsymf(int); +_CRTIMP int __cdecl iscsym(int); +#else +#define isascii __isascii +#define toascii __toascii +#define iscsymf __iscsymf +#define iscsym __iscsym +#endif + +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + + +#endif /* _INC_CTYPE */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cwchar b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cwchar new file mode 100644 index 00000000..86a44754 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cwchar @@ -0,0 +1,45 @@ +// cwchar standard header +#pragma once +#ifndef _CWCHAR_ +#define _CWCHAR_ +#include + +#ifdef _STD_USING + #undef _STD_USING + #include + #define _STD_USING + +#else /* _STD_USING */ + #include + + #if _GLOBAL_USING +_STD_BEGIN +using ::mbstate_t; using ::size_t; using ::tm; using ::wint_t; + +using ::btowc; using ::fgetwc; using ::fgetws; using ::fputwc; +using ::fputws; using ::fwide; using ::fwprintf; +using ::fwscanf; using ::getwc; using ::getwchar; +using ::mbrlen; using ::mbrtowc; using ::mbsrtowcs; +using ::mbsinit; using ::putwc; using ::putwchar; +using ::swprintf; using ::swscanf; using ::ungetwc; +using ::vfwprintf; using ::vswprintf; using ::vwprintf; +using ::wcrtomb; using ::wprintf; using ::wscanf; +using ::wcsrtombs; using ::wcstol; using ::wcscat; +using ::wcschr; using ::wcscmp; using ::wcscoll; +using ::wcscpy; using ::wcscspn; using ::wcslen; +using ::wcsncat; using ::wcsncmp; using ::wcsncpy; +using ::wcspbrk; using ::wcsrchr; using ::wcsspn; +using ::wcstod; using ::wcstoul; using ::wcsstr; +using ::wcstok; using ::wcsxfrm; using ::wctob; +using ::wmemchr; using ::wmemcmp; using ::wmemcpy; +using ::wmemmove; using ::wmemset; using ::wcsftime; +_STD_END + #endif /* _GLOBAL_USING */ + +#endif /* _STD_USING */ +#endif /* _CWCHAR_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cwctype b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cwctype new file mode 100644 index 00000000..f0ec180a --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/cwctype @@ -0,0 +1,34 @@ +// cwctype standard header +#pragma once +#ifndef _CWCTYPE_ +#define _CWCTYPE_ +#include + +#ifdef _STD_USING + #undef _STD_USING + #include + #define _STD_USING + +#else /* _STD_USING */ + #include + + #if _GLOBAL_USING +_STD_BEGIN +using ::wint_t; using ::wctrans_t; using ::wctype_t; + +using ::iswalnum; using ::iswalpha; using ::iswcntrl; +using ::iswctype; using ::iswdigit; using ::iswgraph; +using ::iswlower; using ::iswprint; using ::iswpunct; +using ::iswspace; using ::iswupper; using ::iswxdigit; +using ::towctrans; using ::towlower; using ::towupper; +using ::wctrans; using ::wctype; +_STD_END + #endif /* _GLOBAL_USING */ + +#endif /* _STD_USING */ +#endif /* _CWCTYPE_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/deque b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/deque new file mode 100644 index 00000000..451eac29 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/deque @@ -0,0 +1,1056 @@ +// deque standard header +#pragma once +#ifndef _DEQUE_ +#define _DEQUE_ +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) + +_STD_BEGIN + + // TEMPLATE CLASS _Deque_map +template + class _Deque_map + { // ultimate base class for deque to hold allocator _Almap +protected: + _Deque_map(_Alloc _Al) + : _Almap(_Al) + { // construct allocator from _Al + } + + typedef typename _Alloc::template rebind<_Ty>::other::pointer + _Tptr; + + typename _Alloc::template rebind<_Tptr>::other + _Almap; // allocator object for maps + }; + + // TEMPLATE CLASS _Deque_val +template + class _Deque_val + : public _Deque_map<_Ty, _Alloc> + { // base class for deque to hold allocator _Alval +protected: + _Deque_val(_Alloc _Al = _Alloc()) + : _Deque_map<_Ty, _Alloc>(_Al), _Alval(_Al) + { // construct allocator and base from _Al + } + + typedef typename _Alloc::template rebind<_Ty>::other + _Alty; + + _Alty _Alval; // allocator object for stored elements + }; + + // TEMPLATE CLASS deque +template > + class deque + : public _Deque_val<_Ty, _Ax> + { // circular queue of pointers to blocks +public: + enum + { // deque parameters + _DEQUEMAPSIZ = 8, /* minimum map size, at least 1 */ + _DEQUESIZ = sizeof (_Ty) <= 1 ? 16 + : sizeof (_Ty) <= 2 ? 8 + : sizeof (_Ty) <= 4 ? 4 + : sizeof (_Ty) <= 8 ? 2 : 1}; // elements per block + + typedef deque<_Ty, _Ax> _Myt; + typedef _Deque_val<_Ty, _Ax> _Mybase; + typedef typename _Mybase::_Alty _Alloc; + typedef _Alloc allocator_type; + typedef typename _Alloc::size_type size_type; + typedef typename _Alloc::difference_type _Dift; + typedef _Dift difference_type; + typedef typename _Alloc::pointer _Tptr; + typedef typename _Alloc::const_pointer _Ctptr; + typedef _Tptr pointer; + typedef _Ctptr const_pointer; + typedef _POINTER_X(_Tptr, _Alloc) _Mapptr; + typedef typename _Alloc::reference _Reft; + typedef _Reft reference; + typedef typename _Alloc::const_reference const_reference; + typedef typename _Alloc::value_type value_type; + + // CLASS const_iterator + class const_iterator; + friend class const_iterator; + + class const_iterator + : public _Ranit<_Ty, _Dift, _Ctptr, const_reference> + { // iterator for nonmutable deque + public: + typedef random_access_iterator_tag iterator_category; + typedef _Ty value_type; + typedef _Dift difference_type; + typedef _Ctptr pointer; + typedef const_reference reference; + + const_iterator() + { // construct with null deque pointer + _Mycont = 0; + _Myoff = 0; + } + + const_iterator(size_type _Off, const _Myt *_Pdeque) + { // construct with offset _Off in *_Pdeque + _Mycont = _Pdeque; + _Myoff = _Off; + } + + const_reference operator*() const + { // return designated object + size_type _Block = _Myoff / _DEQUESIZ; + size_type _Off = _Myoff - _Block * _DEQUESIZ; + if (_Mycont->_Mapsize <= _Block) + _Block -= _Mycont->_Mapsize; + return ((_Mycont->_Map)[_Block][_Off]); + } + + _Ctptr operator->() const + { // return pointer to class object + return (&**this); + } + + const_iterator& operator++() + { // preincrement + ++_Myoff; + return (*this); + } + + const_iterator operator++(int) + { // postincrement + const_iterator _Tmp = *this; + ++*this; + return (_Tmp); + } + + const_iterator& operator--() + { // predecrement + --_Myoff; + return (*this); + } + + const_iterator operator--(int) + { // postdecrement + const_iterator _Tmp = *this; + --*this; + return (_Tmp); + } + + const_iterator& operator+=(difference_type _Off) + { // increment by integer + _Myoff += _Off; + return (*this); + } + + const_iterator operator+(difference_type _Off) const + { // return this + integer + const_iterator _Tmp = *this; + return (_Tmp += _Off); + } + + const_iterator& operator-=(difference_type _Off) + { // decrement by integer + return (*this += -_Off); + } + + const_iterator operator-(difference_type _Off) const + { // return this - integer + const_iterator _Tmp = *this; + return (_Tmp -= _Off); + } + + difference_type operator-(const const_iterator& _Right) const + { // return difference of iterators + return (_Right._Myoff <= _Myoff ? _Myoff - _Right._Myoff + : -(difference_type)(_Right._Myoff - _Myoff)); + } + + const_reference operator[](difference_type _Off) const + { // subscript + return (*(*this + _Off)); + } + + bool operator==(const const_iterator& _Right) const + { // test for iterator equality + return (_Mycont == _Right._Mycont && _Myoff == _Right._Myoff); + } + + bool operator!=(const const_iterator& _Right) const + { // test for iterator inequality + return (!(*this == _Right)); + } + + bool operator<(const const_iterator& _Right) const + { // test if this < _Right + return (_Mycont == _Right._Mycont && _Myoff < _Right._Myoff); + } + + bool operator>(const const_iterator& _Right) const + { // test if this > _Right + return (_Right < *this); + } + + bool operator<=(const const_iterator& _Right) const + { // test if this <= _Right + return (!(_Right < *this)); + } + + bool operator>=(const const_iterator& _Right) const + { // test if this >= _Right + return (!(*this < _Right)); + } + + friend const_iterator operator+(difference_type _Off, + const const_iterator& _Right) + { // return iterator + integer + return (_Right + _Off); + } + + protected: + const _Myt *_Mycont; // pointer to deque + size_type _Myoff; // offset of element in deque + }; + + // CLASS iterator + class iterator; + friend class iterator; + + class iterator + : public const_iterator + { // iterator for mutable deque + public: + typedef random_access_iterator_tag iterator_category; + typedef _Ty value_type; + typedef _Dift difference_type; + typedef _Tptr pointer; + typedef _Reft reference; + + iterator() + { // construct with null deque pointer + } + + iterator(size_type _Off, const deque<_Ty, _Alloc> *_Pdeque) + : const_iterator(_Off, _Pdeque) + { // construct with offset _Off in *_Pdeque + } + + reference operator*() const + { // return designated object + return ((reference)**(const_iterator *)this); + } + + _Tptr operator->() const + { // return pointer to class object + return (&**this); + } + + iterator& operator++() + { // preincrement + ++this->_Myoff; + return (*this); + } + + iterator operator++(int) + { // postincrement + iterator _Tmp = *this; + ++*this; + return (_Tmp); + } + + iterator& operator--() + { // predecrement + --this->_Myoff; + return (*this); + } + + iterator operator--(int) + { // postdecrement + iterator _Tmp = *this; + --*this; + return (_Tmp); + } + + iterator& operator+=(difference_type _Off) + { // increment by integer + this->_Myoff += _Off; + return (*this); + } + + iterator operator+(difference_type _Off) const + { // return this + integer + iterator _Tmp = *this; + return (_Tmp += _Off); + } + + iterator& operator-=(difference_type _Off) + { // decrement by integer + return (*this += -_Off); + } + + iterator operator-(difference_type _Off) const + { // return this - integer + iterator _Tmp = *this; + return (_Tmp -= _Off); + } + + difference_type operator-(const const_iterator& _Right) const + { // return difference of iterators + return ((const_iterator)*this - _Right); + } + + reference operator[](difference_type _Off) const + { // subscript + return (*(*this + _Off)); + } + + friend iterator operator+(difference_type _Off, + const iterator& _Right) + { // return iterator + integer + return (_Right + _Off); + } + }; + + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + + deque() + : _Mybase(), _Map(0), + _Mapsize(0), _Myoff(0), _Mysize(0) + { // construct empty deque + } + + explicit deque(const _Alloc& _Al) + : _Mybase(_Al), _Map(0), + _Mapsize(0), _Myoff(0), _Mysize(0) + { // construct empty deque with allocator + } + + explicit deque(size_type _Count) + : _Mybase(), _Map(0), + _Mapsize(0), _Myoff(0), _Mysize(0) + { // construct from _Count * _Ty() + _Construct_n(_Count, _Ty()); + } + + deque(size_type _Count, const _Ty& _Val) + : _Mybase(), _Map(0), + _Mapsize(0), _Myoff(0), _Mysize(0) + { // construct from _Count * _Val + _Construct_n(_Count, _Val); + } + + deque(size_type _Count, const _Ty& _Val, const _Alloc& _Al) + : _Mybase(_Al), _Map(0), + _Mapsize(0), _Myoff(0), _Mysize(0) + { // construct from _Count * _Val with allocator + _Construct_n(_Count, _Val); + } + + deque(const _Myt& _Right) + : _Mybase(_Right._Alval), _Map(0), + _Mapsize(0), _Myoff(0), _Mysize(0) + { // construct by copying _Right + _TRY_BEGIN + insert(begin(), _Right.begin(), _Right.end()); + _CATCH_ALL + _Tidy(); + _RERAISE; + _CATCH_END + } + + template + deque(_It _First, _It _Last) + : _Mybase(), _Map(0), + _Mapsize(0), _Myoff(0), _Mysize(0) + { // construct from [_First, _Last) + _Construct(_First, _Last, _Iter_cat(_First)); + } + + template + deque(_It _First, _It _Last, const _Alloc& _Al) + : _Mybase(_Al), _Map(0), + _Mapsize(0), _Myoff(0), _Mysize(0) + { // construct from [_First, _Last) with allocator + _Construct(_First, _Last, _Iter_cat(_First)); + } + + template + void _Construct(_It _Count, _It _Val, _Int_iterator_tag) + { // initialize from _Count * _Val + _Construct_n((size_type)_Count, (_Ty)_Val); + } + + template + void _Construct(_It _First, _It _Last, input_iterator_tag) + { // initialize from [_First, _Last), input iterators + _TRY_BEGIN + insert(begin(), _First, _Last); + _CATCH_ALL + _Tidy(); + _RERAISE; + _CATCH_END + } + + void _Construct_n(size_type _Count, const _Ty& _Val) + { // construct from _Count * _Val + _TRY_BEGIN + _Insert_n(begin(), _Count, _Val); + _CATCH_ALL + _Tidy(); + _RERAISE; + _CATCH_END + } + + ~deque() + { // destroy the deque + _Tidy(); + } + + _Myt& operator=(const _Myt& _Right) + { // assign _Right + if (this == &_Right) + ; + else if (_Right._Mysize == 0) + clear(); + else if (_Right._Mysize <= _Mysize) + { // new sequence not longer, assign elements and erase unused + iterator _Mid = copy(_Right.begin(), _Right.end(), begin()); + erase(_Mid, end()); + } + else + { // new sequence longer, assign elements and append rest + const_iterator _Mid = _Right.begin() + _Mysize; + copy(_Right.begin(), _Mid, begin()); + insert(end(), _Mid, _Right.end()); + } + return (*this); + } + + iterator begin() + { // return iterator for beginning of mutable sequence + return (iterator(_Myoff, this)); + } + + const_iterator begin() const + { // return iterator for beginning of nonmutable sequence + return (const_iterator(_Myoff, this)); + } + + iterator end() + { // return iterator for end of mutable sequence + return (iterator(_Myoff + _Mysize, this)); + } + + const_iterator end() const + { // return iterator for end of nonmutable sequence + return (const_iterator(_Myoff + _Mysize, this)); + } + + reverse_iterator rbegin() + { // return iterator for beginning of reversed mutable sequence + return (reverse_iterator(end())); + } + + const_reverse_iterator rbegin() const + { // return iterator for beginning of reversed nonmutable sequence + return (const_reverse_iterator(end())); + } + + reverse_iterator rend() + { // return iterator for end of reversed mutable sequence + return (reverse_iterator(begin())); + } + + const_reverse_iterator rend() const + { // return iterator for end of reversed nonmutable sequence + return (const_reverse_iterator(begin())); + } + + void resize(size_type _Newsize) + { // determine new length, padding with _Ty() elements as needed + resize(_Newsize, _Ty()); + } + + void resize(size_type _Newsize, _Ty _Val) + { // determine new length, padding with _Val elements as needed + if (_Mysize < _Newsize) + _Insert_n(end(), _Newsize - _Mysize, _Val); + else if (_Newsize < _Mysize) + erase(begin() + _Newsize, end()); + } + + size_type size() const + { // return length of sequence + return (_Mysize); + } + + size_type max_size() const + { // return maximum possible length of sequence + return (this->_Alval.max_size()); + } + + bool empty() const + { // test if sequence is empty + return (_Mysize == 0); + } + + allocator_type get_allocator() const + { // return allocator object for values + return (this->_Alval); + } + + const_reference at(size_type _Pos) const + { // subscript nonmutable sequence with checking + if (_Mysize <= _Pos) + _Xran(); + return (*(begin() + _Pos)); + } + + reference at(size_type _Pos) + { // subscript mutable sequence with checking + if (_Mysize <= _Pos) + _Xran(); + return (*(begin() + _Pos)); + } + + const_reference operator[](size_type _Pos) const + { // subscript nonmutable sequence + return (*(begin() + _Pos)); + } + + reference operator[](size_type _Pos) + { // subscript mutable sequence + return (*(begin() + _Pos)); + } + + reference front() + { // return first element of mutable sequence + return (*begin()); + } + + const_reference front() const + { // return first element of nonmutable sequence + return (*begin()); + } + + reference back() + { // return last element of mutable sequence + return (*(end() - 1)); + } + + const_reference back() const + { // return last element of nonmutable sequence + return (*(end() - 1)); + } + + void push_front(const _Ty& _Val) + { // insert element at beginning + if (_Myoff % _DEQUESIZ == 0 + && _Mapsize <= (_Mysize + _DEQUESIZ) / _DEQUESIZ) + _Growmap(1); + size_type _Newoff = _Myoff != 0 ? _Myoff + : _Mapsize * _DEQUESIZ; + size_type _Block = --_Newoff / _DEQUESIZ; + if (_Map[_Block] == 0) + _Map[_Block] = this->_Alval.allocate(_DEQUESIZ); + this->_Alval.construct(_Map[_Block] + _Newoff % _DEQUESIZ, _Val); + _Myoff = _Newoff; + ++_Mysize; + } + + void pop_front() + { // erase element at beginning + if (!empty()) + { // something to erase, do it + size_type _Block = _Myoff / _DEQUESIZ; + this->_Alval.destroy(_Map[_Block] + _Myoff % _DEQUESIZ); + if (_Mapsize * _DEQUESIZ <= ++_Myoff) + _Myoff = 0; + if (--_Mysize == 0) + _Myoff = 0; + } + } + + void push_back(const _Ty& _Val) + { // insert element at end + if ((_Myoff + _Mysize) % _DEQUESIZ == 0 + && _Mapsize <= (_Mysize + _DEQUESIZ) / _DEQUESIZ) + _Growmap(1); + size_type _Newoff = _Myoff + _Mysize; + size_type _Block = _Newoff / _DEQUESIZ; + if (_Mapsize <= _Block) + _Block -= _Mapsize; + if (_Map[_Block] == 0) + _Map[_Block] = this->_Alval.allocate(_DEQUESIZ); + this->_Alval.construct(_Map[_Block] + _Newoff % _DEQUESIZ, _Val); + ++_Mysize; + } + + void pop_back() + { // erase element at end + if (!empty()) + { // something to erase, do it + size_type _Newoff = _Mysize + _Myoff - 1; + size_type _Block = _Newoff / _DEQUESIZ; + if (_Mapsize <= _Block) + _Block -= _Mapsize; + this->_Alval.destroy(_Map[_Block] + _Newoff % _DEQUESIZ); + if (--_Mysize == 0) + _Myoff = 0; + } + } + + template + void assign(_It _First, _It _Last) + { // assign [_First, _Last) + _Assign(_First, _Last, _Iter_cat(_First)); + } + + template + void _Assign(_It _Count, _It _Val, _Int_iterator_tag) + { // assign _Count * _Val + _Assign_n((size_type)_Count, (_Ty)_Val); + } + + template + void _Assign(_It _First, _It _Last, input_iterator_tag) + { // assign [_First, _Last), input iterators + erase(begin(), end()); + insert(begin(), _First, _Last); + } + + void assign(size_type _Count, const _Ty& _Val) + { // assign _Count * _Val + _Assign_n(_Count, _Val); + } + + iterator insert(iterator _Where, const _Ty& _Val) + { // insert _Val at _Where + if (_Where == begin()) + { // insert at front + push_front(_Val); + return (begin()); + } + else if (_Where == end()) + { // insert at back + push_back(_Val); + return (end() - 1); + } + else + { // insert inside sequence + iterator _Mid; + size_type _Off = _Where - begin(); + _Ty _Tmp = _Val; // in case _Val is in sequence + + if (_Off < _Mysize / 2) + { // closer to front, push to front then copy + push_front(front()); + _Mid = begin() + _Off; + copy(begin() + 2, _Mid + 1, begin() + 1); + } + else + { // closer to back, push to back then copy + push_back(back()); + _Mid = begin() + _Off; + copy_backward(_Mid, end() - 2, end() - 1); + } + + *_Mid = _Tmp; // store inserted value + return (_Mid); + } + } + + void insert(iterator _Where, size_type _Count, const _Ty& _Val) + { // insert _Count * _Val at _Where + _Insert_n(_Where, _Count, _Val); + } + + template + void insert(iterator _Where, _It _First, _It _Last) + { // insert [_First, _Last) at _Where + _Insert(_Where, _First, _Last, _Iter_cat(_First)); + } + + template + void _Insert(iterator _Where, _It _Count, _It _Val, + _Int_iterator_tag) + { // insert _Count * _Val at _Where + _Insert_n(_Where, (size_type)_Count, (_Ty)_Val); + } + + template + void _Insert(iterator _Where, _It _First, _It _Last, + input_iterator_tag) + { // insert [_First, _Last) at _Where, input iterators + size_type _Off = _Where - begin(); + for (; _First != _Last; ++_First, ++_Off) + insert(begin() + _Off, *_First); + } + + template + void _Insert(iterator _Where, + _It _First, _It _Last, bidirectional_iterator_tag) + { // insert [_First, _Last) at _Where, bidirectional iterators + size_type _Off = _Where - begin(); + size_type _Rem = _Mysize - _Off; + size_type _Oldsize = _Mysize; + size_type _Count = 0; + _Distance(_First, _Last, _Count); + size_type _Num; + + if (_Off < _Rem) + { // closer to front + _TRY_BEGIN + if (_Off < _Count) + { // insert longer than prefix + _It _Mid = _First; + advance(_Mid, _Count - _Off); + + for (_It _Next = _Mid; _First != _Next; ) + push_front(*--_Next); // push head of insert + for (_Num = _Off; 0 < _Num; --_Num) + push_front(begin()[_Count - 1]); // push prefix + copy(_Mid, _Last, begin() + _Count); // copy rest of insert + } + else + { // insert not longer than prefix + for (_Num = _Count; 0 < _Num; --_Num) + push_front(begin()[_Count - 1]); // push part of prefix + + iterator _Mid = begin() + _Count; + copy(_Mid + _Count, _Mid + _Off, _Mid); // copy rest of prefix + copy(_First, _Last, begin() + _Off); // copy in insert + } + _CATCH_ALL + for (; _Oldsize < _Mysize; ) + pop_front(); // restore old size, at least + _RERAISE; + _CATCH_END + } + else + { // closer to back + _TRY_BEGIN + if (_Rem < _Count) + { // insert longer than suffix + _It _Mid = _First; + advance(_Mid, _Rem); + + for (_It _Next = _Mid; _Next != _Last; ++_Next) + push_back(*_Next); // push tail of insert + for (_Num = 0; _Num < _Rem; ++_Num) + push_back(begin()[_Off + _Num]); // push suffix + + copy(_First, _Mid, begin() + _Off); // copy rest of insert + } + else + { // insert not longer than suffix + for (_Num = 0; _Num < _Count; ++_Num) + push_back(begin()[_Off + _Rem + - _Count + _Num]); // push part of suffix + + iterator _Mid = begin() + _Off; + copy_backward(_Mid, _Mid + _Rem - _Count, + _Mid + _Rem); // copy rest of prefix + copy(_First, _Last, _Mid); // copy in values + } + _CATCH_ALL + for (; _Oldsize < _Mysize; ) + pop_back(); // restore old size, at least + _RERAISE; + _CATCH_END + } + } + + iterator erase(iterator _Where) + { // erase element at _Where + return (erase(_Where, _Where + 1)); + } + + iterator erase(iterator _First, iterator _Last) + { // erase [_First, _Last) + size_type _Off = _First - begin(); + size_type _Count = _Last - _First; + + if (_Off < (size_type)(end() - _Last)) + { // closer to front + copy_backward(begin(), _First, _Last); // copy over hole + for (; 0 < _Count; --_Count) + pop_front(); // pop copied elements + } + else + { // closer to back + copy(_Last, end(), _First); // copy over hole + for (; 0 < _Count; --_Count) + pop_back(); // pop copied elements + } + return (begin() + _Off); + } + + void clear() + { // erase all + _Tidy(); + } + + void swap(_Myt& _Right) + { // exchange contents with _Right + if (this->_Alval == _Right._Alval) + { // same allocator, swap control information + std::swap(_Map, _Right._Map); + std::swap(_Mapsize, _Right._Mapsize); + std::swap(_Myoff, _Right._Myoff); + std::swap(_Mysize, _Right._Mysize); + } + else + { // different allocator, do multiple assigns + _Myt _Ts = *this; *this = _Right, _Right = _Ts; + } + } + +protected: + void _Assign_n(size_type _Count, const _Ty& _Val) + { // assign _Count * _Val + _Ty _Tmp = _Val; // in case _Val is in sequence + erase(begin(), end()); + _Insert_n(begin(), _Count, _Tmp); + } + + void _Insert_n(iterator _Where, + size_type _Count, const _Ty& _Val) + { // insert _Count * _Val at _Where + iterator _Mid; + size_type _Num; + size_type _Off = _Where - begin(); + size_type _Rem = _Mysize - _Off; + size_type _Oldsize = _Mysize; + + if (_Off < _Rem) + { // closer to front + _TRY_BEGIN + if (_Off < _Count) + { // insert longer than prefix + for (_Num = _Count - _Off; 0 < _Num; --_Num) + push_front(_Val); // push excess values + for (_Num = _Off; 0 < _Num; --_Num) + push_front(begin()[_Count - 1]); // push prefix + + _Mid = begin() + _Count; + fill(_Mid, _Mid + _Off, _Val); // fill in rest of values + } + else + { // insert not longer than prefix + for (_Num = _Count; 0 < _Num; --_Num) + push_front(begin()[_Count - 1]); // push part of prefix + + _Mid = begin() + _Count; + _Ty _Tmp = _Val; // in case _Val is in sequence + copy(_Mid + _Count, _Mid + _Off, _Mid); // copy rest of prefix + fill(begin() + _Off, _Mid + _Off, _Tmp); // fill in values + } + _CATCH_ALL + for (; _Oldsize < _Mysize; ) + pop_front(); // restore old size, at least + _RERAISE; + _CATCH_END + } + else + { // closer to back + _TRY_BEGIN + if (_Rem < _Count) + { // insert longer than suffix + for (_Num = _Count - _Rem; 0 < _Num; --_Num) + push_back(_Val); // push excess values + for (_Num = 0; _Num < _Rem; ++_Num) + push_back(begin()[_Off + _Num]); // push suffix + + _Mid = begin() + _Off; + fill(_Mid, _Mid + _Rem, _Val); // fill in rest of values + } + else + { // insert not longer than prefix + for (_Num = 0; _Num < _Count; ++_Num) + push_back(begin()[_Off + _Rem + - _Count + _Num]); // push part of prefix + + _Mid = begin() + _Off; + _Ty _Tmp = _Val; // in case _Val is in sequence + copy_backward(_Mid, _Mid + _Rem - _Count, + _Mid + _Rem); // copy rest of prefix + fill(_Mid, _Mid + _Count, _Tmp); // fill in values + } + _CATCH_ALL + for (; _Oldsize < _Mysize; ) + pop_back(); // restore old size, at least + _RERAISE; + _CATCH_END + } + } + + void _Xlen() const + { // report length error + _THROW(length_error, "deque too long"); + } + + void _Xran() const + { // report range error + _THROW(out_of_range, "invalid deque subscript"); + } + + void _Growmap(size_type _Count) + { // grow map by _Count pointers + if (max_size() / _DEQUESIZ - _Mapsize < _Count) + _Xlen(); // result too long + + size_type _Inc = _Mapsize / 2; // try to grow by 50% + if (_Inc < _DEQUEMAPSIZ) + _Inc = _DEQUEMAPSIZ; + if (_Count < _Inc && _Mapsize <= max_size() / _DEQUESIZ - _Inc) + _Count = _Inc; + size_type _Myboff = _Myoff / _DEQUESIZ; + _Mapptr _Newmap = this->_Almap.allocate(_Mapsize + _Count); + _Mapptr _Myptr = _Newmap + _Myboff; + + _Myptr = _Uninitialized_copy(_Map + _Myboff, + _Map + _Mapsize, _Myptr, this->_Almap); // copy initial to end + if (_Myboff <= _Count) + { // increment greater than offset of initial block + _Myptr = _Uninitialized_copy(_Map, + _Map + _Myboff, _Myptr, this->_Almap); // copy rest of old + _Uninitialized_fill_n(_Myptr, _Count - _Myboff, + (_Tptr)0, this->_Almap); // clear suffix of new + _Uninitialized_fill_n(_Newmap, _Myboff, + (_Tptr)0, this->_Almap); // clear prefix of new + } + else + { // increment not greater than offset of initial block + _Uninitialized_copy(_Map, + _Map + _Count, _Myptr, this->_Almap); // copy more old + _Myptr = _Uninitialized_copy(_Map + _Count, + _Map + _Myboff, _Newmap, this->_Almap); // copy rest of old + _Uninitialized_fill_n(_Myptr, _Count, + (_Tptr)0, this->_Almap); // clear rest to initial block + } + + _Destroy_range(_Map + _Myboff, _Map + _Mapsize, this->_Almap); + if (_Map) + this->_Almap.deallocate(_Map, _Mapsize); // free storage for old + + _Map = _Newmap; // point at new + _Mapsize += _Count; + } + + void _Tidy() + { // free all storage + while (!empty()) + pop_back(); + for (size_type _Count = _Mapsize; 0 < _Count; ) + { // free storage for a block and destroy pointer + if (*(_Map + --_Count) != 0) + this->_Alval.deallocate(*(_Map + _Count), _DEQUESIZ); + this->_Almap.destroy(_Map + _Count); + } + + if (_Map) + this->_Almap.deallocate(_Map, _Mapsize); // free storage for map + _Mapsize = 0; + _Map = 0; + } + + _Mapptr _Map; // pointer to array of pointers to blocks + size_type _Mapsize; // size of map array + size_type _Myoff; // offset of initial element + size_type _Mysize; // current length of sequence + }; + + // deque TEMPLATE OPERATORS +template inline + void swap(deque<_Ty, _Alloc>& _Left, deque<_Ty, _Alloc>& _Right) + { // swap _Left and _Right deques + _Left.swap(_Right); + } + +template inline + bool operator==(const deque<_Ty, _Alloc>& _Left, + const deque<_Ty, _Alloc>& _Right) + { // test for deque equality + return (_Left.size() == _Right.size() + && equal(_Left.begin(), _Left.end(), _Right.begin())); + } + +template inline + bool operator!=(const deque<_Ty, _Alloc>& _Left, + const deque<_Ty, _Alloc>& _Right) + { // test for deque inequality + return (!(_Left == _Right)); + } + +template inline + bool operator<(const deque<_Ty, _Alloc>& _Left, + const deque<_Ty, _Alloc>& _Right) + { // test if _Left < _Right for deques + return (lexicographical_compare(_Left.begin(), _Left.end(), + _Right.begin(), _Right.end())); + } + +template inline + bool operator<=(const deque<_Ty, _Alloc>& _Left, + const deque<_Ty, _Alloc>& _Right) + { // test if _Left <= _Right for deques + return (!(_Right < _Left)); + } + +template inline + bool operator>(const deque<_Ty, _Alloc>& _Left, + const deque<_Ty, _Alloc>& _Right) + { // test if _Left > _Right for deques + return (_Right < _Left); + } + +template inline + bool operator>=(const deque<_Ty, _Alloc>& _Left, + const deque<_Ty, _Alloc>& _Right) + { // test if _Left >= _Right for deques + return (!(_Left < _Right)); + } +_STD_END + +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _DEQUE_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + */ + +/* + * This file is derived from software bearing the following + * restrictions: + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this + * software and its documentation for any purpose is hereby + * granted without fee, provided that the above copyright notice + * appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation. + * Hewlett-Packard Company makes no representations about the + * suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/direct.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/direct.h new file mode 100644 index 00000000..2bda8e39 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/direct.h @@ -0,0 +1,139 @@ +/*** +*direct.h - function declarations for directory handling/creation +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file contains the function declarations for the library +* functions related to directory handling and creation. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_DIRECT +#define _INC_DIRECT + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +/* + * Currently, all MS C compilers for Win32 platforms default to 8 byte + * alignment. + */ +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +#ifndef _SIZE_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 size_t; +#else +typedef _W64 unsigned int size_t; +#endif +#define _SIZE_T_DEFINED +#endif + +/* _getdiskfree structure for _getdiskfree() */ +#ifndef _DISKFREE_T_DEFINED + +struct _diskfree_t { + unsigned total_clusters; + unsigned avail_clusters; + unsigned sectors_per_cluster; + unsigned bytes_per_sector; + }; + +#define _DISKFREE_T_DEFINED +#endif + +/* function prototypes */ + +_CRTIMP int __cdecl _chdir(const char *); +_CRTIMP char * __cdecl _getcwd(char *, int); +_CRTIMP int __cdecl _mkdir(const char *); +_CRTIMP int __cdecl _rmdir(const char *); + +_CRTIMP int __cdecl _chdrive(int); +_CRTIMP char * __cdecl _getdcwd(int, char *, int); +_CRTIMP int __cdecl _getdrive(void); +_CRTIMP unsigned long __cdecl _getdrives(void); +_CRTIMP unsigned __cdecl _getdiskfree(unsigned, struct _diskfree_t *); + +#ifndef _WDIRECT_DEFINED + +/* wide function prototypes, also declared in wchar.h */ + +_CRTIMP int __cdecl _wchdir(const wchar_t *); +_CRTIMP wchar_t * __cdecl _wgetcwd(wchar_t *, int); +_CRTIMP wchar_t * __cdecl _wgetdcwd(int, wchar_t *, int); +_CRTIMP int __cdecl _wmkdir(const wchar_t *); +_CRTIMP int __cdecl _wrmdir(const wchar_t *); + +#define _WDIRECT_DEFINED +#endif + + +#if !__STDC__ + +/* Non-ANSI names for compatibility */ + +_CRTIMP int __cdecl chdir(const char *); +_CRTIMP char * __cdecl getcwd(char *, int); +_CRTIMP int __cdecl mkdir(const char *); +_CRTIMP int __cdecl rmdir(const char *); + +#define diskfree_t _diskfree_t + +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_DIRECT */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/dos.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/dos.h new file mode 100644 index 00000000..ba0233cb --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/dos.h @@ -0,0 +1,106 @@ +/*** +*dos.h - definitions for MS-DOS interface routines +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* Defines the structs and unions used for the direct DOS interface +* routines; includes macros to access the segment and offset +* values of far pointers, so that they may be used by the routines; and +* provides function prototypes for direct DOS interface functions. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_DOS +#define _INC_DOS + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +/* + * Currently, all MS C compilers for Win32 platforms default to 8 byte + * alignment. + */ +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +#ifndef _DISKFREE_T_DEFINED +/* _getdiskfree structure (duplicated in DIRECT.H) */ +struct _diskfree_t { + unsigned total_clusters; + unsigned avail_clusters; + unsigned sectors_per_cluster; + unsigned bytes_per_sector; + }; + +#define _DISKFREE_T_DEFINED +#endif + +/* File attribute constants */ + +#define _A_NORMAL 0x00 /* Normal file - No read/write restrictions */ +#define _A_RDONLY 0x01 /* Read only file */ +#define _A_HIDDEN 0x02 /* Hidden file */ +#define _A_SYSTEM 0x04 /* System file */ +#define _A_SUBDIR 0x10 /* Subdirectory */ +#define _A_ARCH 0x20 /* Archive file */ + +/* Function prototypes */ +_CRTIMP unsigned __cdecl _getdiskfree(unsigned, struct _diskfree_t *); + +#ifdef _M_IX86 +void __cdecl _disable(void); +void __cdecl _enable(void); +#endif /* _M_IX86 */ + +#if !__STDC__ +/* Non-ANSI name for compatibility */ +#define diskfree_t _diskfree_t +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_DOS */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/dvec.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/dvec.h new file mode 100644 index 00000000..9476b02a --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/dvec.h @@ -0,0 +1,1081 @@ +/** +*** Copyright (C) 1985-1999 Intel Corporation. All rights reserved. +*** +*** The information and source code contained herein is the exclusive +*** property of Intel Corporation and may not be disclosed, examined +*** or reproduced in whole or in part without explicit written authorization +*** from the company. +*** +**/ + +/* + * Definition of a C++ class interface to Willamette New Instruction intrinsics. + * + * File name : dvec.h class definitions + * + * Concept: A C++ abstraction of Willamette new intructions designed to improve + * programmer productivity. Speed and accuracy are sacrificed for utility. + * Facilitates an easy transition to compiler intrinsics + * or assembly language. + * + */ + +#ifndef DVEC_H_INCLUDED +#define DVEC_H_INCLUDED + +#if !defined __cplusplus + #error ERROR: This file is only supported in C++ compilations! +#endif /* !__cplusplus */ + +#include /* Willamette New Instructions Intrinsics include file */ +#include +#include + +/* Define _ENABLE_VEC_DEBUG to enable std::ostream inserters for debug output */ +#if defined(_ENABLE_VEC_DEBUG) + #include +#endif + +#pragma pack(push,16) /* Must ensure class & union 16-B aligned */ + + +/* If using MSVC5.0, explicit keyword should be used */ +#if (_MSC_VER >= 1100) + #define EXPLICIT explicit +#else + #if (__ICL) + #define EXPLICIT __explicit /* If MSVC4.x & ICL, use __explicit */ + #else + #define EXPLICIT /* nothing */ + #pragma message( "explicit keyword not recognized") + #endif +#endif + +/* EMM Functionality Intrinsics */ + +class I8vec16; /* 16 elements, each element a signed or unsigned char data type */ +class Is8vec16; /* 16 elements, each element a signed char data type */ +class Iu8vec16; /* 16 elements, each element an unsigned char data type */ +class I16vec8; /* 8 elements, each element a signed or unsigned short */ +class Is16vec8; /* 8 elements, each element a signed short */ +class Iu16vec8; /* 8 elements, each element an unsigned short */ +class I32vec4; /* 4 elements, each element a signed or unsigned long */ +class Is32vec4; /* 4 elements, each element a signed long */ +class Iu32vec4; /* 4 elements, each element a unsigned long */ +class I64vec2; /* 2 element, each a __m64 data type */ +class I128vec1; /* 1 element, a __m128i data type */ + +#define _MM_16UB(element,vector) (*((unsigned char*)&##vector + ##element)) +#define _MM_16B(element,vector) (*((signed char*)&##vector + ##element)) + +#define _MM_8UW(element,vector) (*((unsigned short*)&##vector + ##element)) +#define _MM_8W(element,vector) (*((short*)&##vector + ##element)) + +#define _MM_4UDW(element,vector) (*((unsigned int*)&##vector + ##element)) +#define _MM_4DW(element,vector) (*((int*)&##vector + ##element)) + +#define _MM_2QW(element,vector) (*((__int64*)&##vector + ##element)) + + +/* We need a m128i constant, keeping performance in mind*/ + +inline const __m128i get_mask128() +{ + static const __m128i mask128 = _mm_set1_epi64(M64(0xffffffffffffffffi64)); + return mask128; +} + + +/* M128 Class: + * 1 element, a __m128i data type + * Contructors & Logical Operations + */ + +class M128 +{ +protected: + __m128i vec; + +public: + M128() { } + M128(__m128i mm) { vec = mm; } + + operator __m128i() const { return vec; } + + /* Logical Operations */ + M128& operator&=(const M128 &a) { return *this = (M128) _mm_and_si128(vec,a); } + M128& operator|=(const M128 &a) { return *this = (M128) _mm_or_si128(vec,a); } + M128& operator^=(const M128 &a) { return *this = (M128) _mm_xor_si128(vec,a); } + +}; + +inline M128 operator&(const M128 &a, const M128 &b) { return _mm_and_si128(a,b); } +inline M128 operator|(const M128 &a, const M128 &b) { return _mm_or_si128(a,b); } +inline M128 operator^(const M128 &a, const M128 &b) { return _mm_xor_si128(a,b); } +inline M128 andnot(const M128 &a, const M128 &b) { return _mm_andnot_si128(a,b); } + +/* I128vec1 Class: + * 1 element, a __m128i data type + * Contains Operations which can operate on any __m6128i data type + */ + +class I128vec1 : public M128 +{ +public: + I128vec1() { } + I128vec1(__m128i mm) : M128(mm) { } + + I128vec1& operator= (const M128 &a) { return *this = (I128vec1) a; } + I128vec1& operator&=(const M128 &a) { return *this = (I128vec1) _mm_and_si128(vec,a); } + I128vec1& operator|=(const M128 &a) { return *this = (I128vec1) _mm_or_si128(vec,a); } + I128vec1& operator^=(const M128 &a) { return *this = (I128vec1) _mm_xor_si128(vec,a); } + +}; + +/* I64vec2 Class: + * 2 elements, each element signed or unsigned 64-bit integer + */ +class I64vec2 : public M128 +{ +public: + I64vec2() { } + I64vec2(__m128i mm) : M128(mm) { } + + I64vec2(__m64 q1, __m64 q0) + { + _MM_2QW(0,vec) = *(__int64*)&q0; + _MM_2QW(1,vec) = *(__int64*)&q1; + } + + /* Assignment Operator */ + I64vec2& operator= (const M128 &a) { return *this = (I64vec2) a; } + + /* Logical Assignment Operators */ + I64vec2& operator&=(const M128 &a) { return *this = (I64vec2) _mm_and_si128(vec,a); } + I64vec2& operator|=(const M128 &a) { return *this = (I64vec2) _mm_or_si128(vec,a); } + I64vec2& operator^=(const M128 &a) { return *this = (I64vec2) _mm_xor_si128(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + I64vec2& operator +=(const I64vec2 &a) { return *this = (I64vec2) _mm_add_epi64(vec,a); } + I64vec2& operator -=(const I64vec2 &a) { return *this = (I64vec2) _mm_sub_epi64(vec,a); } + + /* Shift Logical Operators */ + I64vec2 operator<<(const I64vec2 &a) { return _mm_sll_epi64(vec,a); } + I64vec2 operator<<(int count) { return _mm_slli_epi64(vec,count); } + I64vec2& operator<<=(const I64vec2 &a) { return *this = (I64vec2) _mm_sll_epi64(vec,a); } + I64vec2& operator<<=(int count) { return *this = (I64vec2) _mm_slli_epi64(vec,count); } + I64vec2 operator>>(const I64vec2 &a) { return _mm_srl_epi64(vec,a); } + I64vec2 operator>>(int count) { return _mm_srli_epi64(vec,count); } + I64vec2& operator>>=(const I64vec2 &a) { return *this = (I64vec2) _mm_srl_epi64(vec,a); } + I64vec2& operator>>=(int count) { return *this = (I64vec2) _mm_srli_epi64(vec,count); } + + /* Element Access for Debug, No data modified */ + const __int64& operator[](int i)const + { + assert(static_cast(i) < 2); /* Only 2 elements to access */ + return _MM_2QW(i,vec); + } + + /* Element Access and Assignment for Debug */ + __int64& operator[](int i) + { + assert(static_cast(i) < 2); /* Only 2 elements to access */ + return _MM_2QW(i,vec); + } + + +}; + +/* Unpacks */ +inline I64vec2 unpack_low(const I64vec2 &a, const I64vec2 &b) {return _mm_unpacklo_epi64(a,b); } +inline I64vec2 unpack_high(const I64vec2 &a, const I64vec2 &b) {return _mm_unpackhi_epi64(a,b); } + +/* I32vec4 Class: + * 4 elements, each element either a signed or unsigned int + */ +class I32vec4 : public M128 +{ +public: + I32vec4() { } + I32vec4(__m128i mm) : M128(mm) { } + + /* Assignment Operator */ + I32vec4& operator= (const M128 &a) { return *this = (I32vec4) a; } + + /* Logicals Operators */ + I32vec4& operator&=(const M128 &a) { return *this = (I32vec4) _mm_and_si128(vec,a); } + I32vec4& operator|=(const M128 &a) { return *this = (I32vec4) _mm_or_si128(vec,a); } + I32vec4& operator^=(const M128 &a) { return *this = (I32vec4) _mm_xor_si128(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + I32vec4& operator +=(const I32vec4 &a) { return *this = (I32vec4)_mm_add_epi32(vec,a); } + I32vec4& operator -=(const I32vec4 &a) { return *this = (I32vec4)_mm_sub_epi32(vec,a); } + + /* Shift Logical Operators */ + I32vec4 operator<<(const I32vec4 &a) { return _mm_sll_epi32(vec,a); } + I32vec4 operator<<(int count) { return _mm_slli_epi32(vec,count); } + I32vec4& operator<<=(const I32vec4 &a) { return *this = (I32vec4)_mm_sll_epi32(vec,a); } + I32vec4& operator<<=(int count) { return *this = (I32vec4)_mm_slli_epi32(vec,count); } + +}; + +inline I32vec4 cmpeq(const I32vec4 &a, const I32vec4 &b) { return _mm_cmpeq_epi32(a,b); } +inline I32vec4 cmpneq(const I32vec4 &a, const I32vec4 &b) { return _mm_andnot_si128(_mm_cmpeq_epi32(a,b), get_mask128()); } + +inline I32vec4 unpack_low(const I32vec4 &a, const I32vec4 &b) { return _mm_unpacklo_epi32(a,b); } +inline I32vec4 unpack_high(const I32vec4 &a, const I32vec4 &b) { return _mm_unpackhi_epi32(a,b); } + +/* Is32vec4 Class: + * 4 elements, each element signed integer + */ +class Is32vec4 : public I32vec4 +{ +public: + Is32vec4() { } + Is32vec4(__m128i mm) : I32vec4(mm) { } + Is32vec4(int i3, int i2, int i1, int i0) + { + _MM_4DW(0,vec) = i0; + _MM_4DW(1,vec) = i1; + _MM_4DW(2,vec) = i2; + _MM_4DW(3,vec) = i3; + } + + /* Assignment Operator */ + Is32vec4& operator= (const M128 &a) { return *this = (Is32vec4) a; } + + /* Logical Operators */ + Is32vec4& operator&=(const M128 &a) { return *this = (Is32vec4) _mm_and_si128(vec,a); } + Is32vec4& operator|=(const M128 &a) { return *this = (Is32vec4) _mm_or_si128(vec,a); } + Is32vec4& operator^=(const M128 &a) { return *this = (Is32vec4) _mm_xor_si128(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + Is32vec4& operator +=(const I32vec4 &a) { return *this = (Is32vec4)_mm_add_epi32(vec,a); } + Is32vec4& operator -=(const I32vec4 &a) { return *this = (Is32vec4)_mm_sub_epi32(vec,a); } + + /* Shift Logical Operators */ + Is32vec4 operator<<(const M128 &a) { return _mm_sll_epi32(vec,a); } + Is32vec4 operator<<(int count) { return _mm_slli_epi32(vec,count); } + Is32vec4& operator<<=(const M128 &a) { return *this = (Is32vec4)_mm_sll_epi32(vec,a); } + Is32vec4& operator<<=(int count) { return *this = (Is32vec4)_mm_slli_epi32(vec,count); } + /* Shift Arithmetic Operations */ + Is32vec4 operator>>(const M128 &a) { return _mm_sra_epi32(vec,a); } + Is32vec4 operator>>(int count) { return _mm_srai_epi32(vec,count); } + Is32vec4& operator>>=(const M128 &a) { return *this = (Is32vec4) _mm_sra_epi32(vec,a); } + Is32vec4& operator>>=(int count) { return *this = (Is32vec4) _mm_srai_epi32(vec,count); } + +#if defined(_ENABLE_VEC_DEBUG) + /* Output for Debug */ + friend std::ostream& operator<< (std::ostream &os, const Is32vec4 &a) + { + os << "[3]:" << _MM_4DW(3,a) + << " [2]:" << _MM_4DW(2,a) + << " [1]:" << _MM_4DW(1,a) + << " [0]:" << _MM_4DW(0,a); + return os; + } +#endif + + /* Element Access for Debug, No data modified */ + const int& operator[](int i)const + { + assert(static_cast(i) < 4); /* Only 4 elements to access */ + return _MM_4DW(i,vec); + } + + /* Element Access for Debug */ + int& operator[](int i) + { + assert(static_cast(i) < 4); /* Only 4 elements to access */ + return _MM_4DW(i,vec); + } +}; + +/* Compares */ +inline Is32vec4 cmpeq(const Is32vec4 &a, const Is32vec4 &b) { return _mm_cmpeq_epi32(a,b); } +inline Is32vec4 cmpneq(const Is32vec4 &a, const Is32vec4 &b) { return _mm_andnot_si128(_mm_cmpeq_epi32(a,b), get_mask128()); } +inline Is32vec4 cmpgt(const Is32vec4 &a, const Is32vec4 &b) { return _mm_cmpgt_epi32(a,b); } +inline Is32vec4 cmplt(const Is32vec4 &a, const Is32vec4 &b) { return _mm_cmpgt_epi32(b,a); } + +/* Unpacks */ +inline Is32vec4 unpack_low(const Is32vec4 &a, const Is32vec4 &b) { return _mm_unpacklo_epi32(a,b); } +inline Is32vec4 unpack_high(const Is32vec4 &a, const Is32vec4 &b) { return _mm_unpackhi_epi32(a,b); } + + + +/* Iu32vec4 Class: + * 4 elements, each element unsigned int + */ +class Iu32vec4 : public I32vec4 +{ +public: + Iu32vec4() { } + Iu32vec4(__m128i mm) : I32vec4(mm) { } + Iu32vec4(unsigned int ui3, unsigned int ui2, unsigned int ui1, unsigned int ui0) + { + _MM_4UDW(0,vec) = ui0; + _MM_4UDW(1,vec) = ui1; + _MM_4UDW(2,vec) = ui2; + _MM_4UDW(3,vec) = ui3; + } + + /* Assignment Operator */ + Iu32vec4& operator= (const M128 &a) { return *this = (Iu32vec4) a; } + + /* Logical Assignment Operators */ + Iu32vec4& operator&=(const M128 &a) { return *this = (Iu32vec4) _mm_and_si128(vec,a); } + Iu32vec4& operator|=(const M128 &a) { return *this = (Iu32vec4) _mm_or_si128(vec,a); } + Iu32vec4& operator^=(const M128 &a) { return *this = (Iu32vec4) _mm_xor_si128(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + Iu32vec4& operator +=(const I32vec4 &a) { return *this = (Iu32vec4)_mm_add_epi32(vec,a); } + Iu32vec4& operator -=(const I32vec4 &a) { return *this = (Iu32vec4)_mm_sub_epi32(vec,a); } + + /* Shift Logical Operators */ + Iu32vec4 operator<<(const M128 &a) { return _mm_sll_epi32(vec,a); } + Iu32vec4 operator<<(int count) { return _mm_slli_epi32(vec,count); } + Iu32vec4& operator<<=(const M128 &a) { return *this = (Iu32vec4)_mm_sll_epi32(vec,a); } + Iu32vec4& operator<<=(int count) { return *this = (Iu32vec4)_mm_slli_epi32(vec,count); } + Iu32vec4 operator>>(const M128 &a) { return _mm_srl_epi32(vec,a); } + Iu32vec4 operator>>(int count) { return _mm_srli_epi32(vec,count); } + Iu32vec4& operator>>=(const M128 &a) { return *this = (Iu32vec4) _mm_srl_epi32(vec,a); } + Iu32vec4& operator>>=(int count) { return *this = (Iu32vec4) _mm_srli_epi32(vec,count); } + +#if defined(_ENABLE_VEC_DEBUG) + /* Output for Debug */ + friend std::ostream& operator<< (std::ostream &os, const Iu32vec4 &a) + { + os << "[3]:" << _MM_4UDW(3,a) + << " [2]:" << _MM_4UDW(2,a) + << " [1]:" << _MM_4UDW(1,a) + << " [0]:" << _MM_4UDW(0,a); + return os; + } +#endif + + /* Element Access for Debug, No data modified */ + const unsigned int& operator[](int i)const + { + assert(static_cast(i) < 4); /* Only 4 elements to access */ + return _MM_4UDW(i,vec); + } + + /* Element Access and Assignment for Debug */ + unsigned int& operator[](int i) + { + assert(static_cast(i) < 4); /* Only 4 elements to access */ + return _MM_4UDW(i,vec); + } +}; + +inline I64vec2 operator*(const Iu32vec4 &a, const Iu32vec4 &b) { return _mm_mul_epu32(a,b); } +inline Iu32vec4 cmpeq(const Iu32vec4 &a, const Iu32vec4 &b) { return _mm_cmpeq_epi32(a,b); } +inline Iu32vec4 cmpneq(const Iu32vec4 &a, const Iu32vec4 &b) { return _mm_andnot_si128(_mm_cmpeq_epi32(a,b), get_mask128()); } + +inline Iu32vec4 unpack_low(const Iu32vec4 &a, const Iu32vec4 &b) { return _mm_unpacklo_epi32(a,b); } +inline Iu32vec4 unpack_high(const Iu32vec4 &a, const Iu32vec4 &b) { return _mm_unpackhi_epi32(a,b); } + +/* I16vec8 Class: + * 8 elements, each element either unsigned or signed short + */ +class I16vec8 : public M128 +{ +public: + I16vec8() { } + I16vec8(__m128i mm) : M128(mm) { } + + /* Assignment Operator */ + I16vec8& operator= (const M128 &a) { return *this = (I16vec8) a; } + + /* Logical Assignment Operators */ + I16vec8& operator&=(const M128 &a) { return *this = (I16vec8) _mm_and_si128(vec,a); } + I16vec8& operator|=(const M128 &a) { return *this = (I16vec8) _mm_or_si128(vec,a); } + I16vec8& operator^=(const M128 &a) { return *this = (I16vec8) _mm_xor_si128(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + I16vec8& operator +=(const I16vec8 &a) { return *this = (I16vec8) _mm_add_epi16(vec,a); } + I16vec8& operator -=(const I16vec8 &a) { return *this = (I16vec8) _mm_sub_epi16(vec,a); } + I16vec8& operator *=(const I16vec8 &a) { return *this = (I16vec8) _mm_mullo_epi16(vec,a); } + + /* Shift Logical Operators */ + I16vec8 operator<<(const M128 &a) { return _mm_sll_epi16(vec,a); } + I16vec8 operator<<(int count) { return _mm_slli_epi16(vec,count); } + I16vec8& operator<<=(const M128 &a) { return *this = (I16vec8)_mm_sll_epi16(vec,a); } + I16vec8& operator<<=(int count) { return *this = (I16vec8)_mm_slli_epi16(vec,count); } + +}; + + +inline I16vec8 operator*(const I16vec8 &a, const I16vec8 &b) { return _mm_mullo_epi16(a,b); } + +inline I16vec8 cmpeq(const I16vec8 &a, const I16vec8 &b) { return _mm_cmpeq_epi16(a,b); } +inline I16vec8 cmpneq(const I16vec8 &a, const I16vec8 &b) { return _mm_andnot_si128(_mm_cmpeq_epi16(a,b), get_mask128()); } + +inline I16vec8 unpack_low(const I16vec8 &a, const I16vec8 &b) { return _mm_unpacklo_epi16(a,b); } +inline I16vec8 unpack_high(const I16vec8 &a, const I16vec8 &b) { return _mm_unpackhi_epi16(a,b); } + +/* Is16vec8 Class: + * 8 elements, each element signed short + */ +class Is16vec8 : public I16vec8 +{ +public: + Is16vec8() { } + Is16vec8(__m128i mm) : I16vec8(mm) { } + Is16vec8(signed short s7,signed short s6,signed short s5,signed short s4,signed short s3,signed short s2,signed short s1,signed short s0) + { + _MM_8W(0,vec) = s0; + _MM_8W(1,vec) = s1; + _MM_8W(2,vec) = s2; + _MM_8W(3,vec) = s3; + _MM_8W(4,vec) = s4; + _MM_8W(5,vec) = s5; + _MM_8W(6,vec) = s6; + _MM_8W(7,vec) = s7; + } + + /* Assignment Operator */ + Is16vec8& operator= (const M128 &a) { return *this = (Is16vec8) a; } + + /* Logical Assignment Operators */ + Is16vec8& operator&=(const M128 &a) { return *this = (Is16vec8) _mm_and_si128(vec,a); } + Is16vec8& operator|=(const M128 &a) { return *this = (Is16vec8) _mm_or_si128(vec,a); } + Is16vec8& operator^=(const M128 &a) { return *this = (Is16vec8) _mm_xor_si128(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + Is16vec8& operator +=(const I16vec8 &a) { return *this = (Is16vec8) _mm_add_epi16(vec,a); } + Is16vec8& operator -=(const I16vec8 &a) { return *this = (Is16vec8) _mm_sub_epi16(vec,a); } + Is16vec8& operator *=(const I16vec8 &a) { return *this = (Is16vec8) _mm_mullo_epi16(vec,a); } + + /* Shift Logical Operators */ + Is16vec8 operator<<(const M128 &a) { return _mm_sll_epi16(vec,a); } + Is16vec8 operator<<(int count) { return _mm_slli_epi16(vec,count); } + Is16vec8& operator<<=(const M128 &a) { return *this = (Is16vec8)_mm_sll_epi16(vec,a); } + Is16vec8& operator<<=(int count) { return *this = (Is16vec8)_mm_slli_epi16(vec,count); } + /* Shift Arithmetic Operators */ + Is16vec8 operator>>(const M128 &a) { return _mm_sra_epi16(vec,a); } + Is16vec8 operator>>(int count) { return _mm_srai_epi16(vec,count); } + Is16vec8& operator>>=(const M128 &a) { return *this = (Is16vec8)_mm_sra_epi16(vec,a); } + Is16vec8& operator>>=(int count) { return *this = (Is16vec8)_mm_srai_epi16(vec,count); } + +#if defined(_ENABLE_VEC_DEBUG) + /* Output for Debug */ + friend std::ostream& operator<< (std::ostream &os, const Is16vec8 &a) + { + os << "[7]:" << _MM_8W(7,a) + << " [6]:" << _MM_8W(6,a) + << " [5]:" << _MM_8W(5,a) + << " [4]:" << _MM_8W(4,a) + << " [3]:" << _MM_8W(3,a) + << " [2]:" << _MM_8W(2,a) + << " [1]:" << _MM_8W(1,a) + << " [0]:" << _MM_8W(0,a); + return os; + } +#endif + + /* Element Access for Debug, No data modified */ + const signed short& operator[](int i)const + { + assert(static_cast(i) < 8); /* Only 8 elements to access */ + return _MM_8W(i,vec); + } + + /* Element Access and Assignment for Debug */ + signed short& operator[](int i) + { + assert(static_cast(i) < 8); /* Only 8 elements to access */ + return _MM_8W(i,vec); + } +}; + +inline Is16vec8 operator*(const Is16vec8 &a, const Is16vec8 &b) { return _mm_mullo_epi16(a,b); } + + +/* Additional Is16vec8 functions: compares, unpacks, sat add/sub */ +inline Is16vec8 cmpeq(const Is16vec8 &a, const Is16vec8 &b) { return _mm_cmpeq_epi16(a,b); } +inline Is16vec8 cmpneq(const Is16vec8 &a, const Is16vec8 &b) { return _mm_andnot_si128(_mm_cmpeq_epi16(a,b), get_mask128()); } +inline Is16vec8 cmpgt(const Is16vec8 &a, const Is16vec8 &b) { return _mm_cmpgt_epi16(a,b); } +inline Is16vec8 cmplt(const Is16vec8 &a, const Is16vec8 &b) { return _mm_cmpgt_epi16(b,a); } + +inline Is16vec8 unpack_low(const Is16vec8 &a, const Is16vec8 &b) { return _mm_unpacklo_epi16(a,b); } +inline Is16vec8 unpack_high(const Is16vec8 &a, const Is16vec8 &b) { return _mm_unpackhi_epi16(a,b); } + +inline Is16vec8 mul_high(const Is16vec8 &a, const Is16vec8 &b) { return _mm_mulhi_epi16(a,b); } +inline Is32vec4 mul_add(const Is16vec8 &a, const Is16vec8 &b) { return _mm_madd_epi16(a,b);} + +inline Is16vec8 sat_add(const Is16vec8 &a, const Is16vec8 &b) { return _mm_adds_epi16(a,b); } +inline Is16vec8 sat_sub(const Is16vec8 &a, const Is16vec8 &b) { return _mm_subs_epi16(a,b); } + +inline Is16vec8 simd_max(const Is16vec8 &a, const Is16vec8 &b) { return _mm_max_epi16(a,b); } +inline Is16vec8 simd_min(const Is16vec8 &a, const Is16vec8 &b) { return _mm_min_epi16(a,b); } + + +/* Iu16vec8 Class: + * 8 elements, each element unsigned short + */ +class Iu16vec8 : public I16vec8 +{ +public: + Iu16vec8() { } + Iu16vec8(__m128i mm) : I16vec8(mm) { } + Iu16vec8(unsigned short s7,unsigned short s6,unsigned short s5,unsigned short s4, unsigned short s3,unsigned short s2,unsigned short s1,unsigned short s0) + { + _MM_8UW(0,vec) = s0; + _MM_8UW(1,vec) = s1; + _MM_8UW(2,vec) = s2; + _MM_8UW(3,vec) = s3; + _MM_8UW(4,vec) = s4; + _MM_8UW(5,vec) = s5; + _MM_8UW(6,vec) = s6; + _MM_8UW(7,vec) = s7; + } + + /* Assignment Operator */ + Iu16vec8& operator= (const M128 &a) { return *this = (Iu16vec8) a; } + /* Logical Assignment Operators */ + Iu16vec8& operator&=(const M128 &a) { return *this = (Iu16vec8) _mm_and_si128(vec,a); } + Iu16vec8& operator|=(const M128 &a) { return *this = (Iu16vec8) _mm_or_si128(vec,a); } + Iu16vec8& operator^=(const M128 &a) { return *this = (Iu16vec8) _mm_xor_si128(vec,a); } + /* Addition & Subtraction Assignment Operators */ + Iu16vec8& operator +=(const I16vec8 &a) { return *this = (Iu16vec8) _mm_add_epi16(vec,a); } + Iu16vec8& operator -=(const I16vec8 &a) { return *this = (Iu16vec8) _mm_sub_epi16(vec,a); } + Iu16vec8& operator *=(const I16vec8 &a) { return *this = (Iu16vec8) _mm_mullo_epi16(vec,a); } + + /* Shift Logical Operators */ + Iu16vec8 operator<<(const M128 &a) { return _mm_sll_epi16(vec,a); } + Iu16vec8 operator<<(int count) { return _mm_slli_epi16(vec,count); } + Iu16vec8& operator<<=(const M128 &a) { return *this = (Iu16vec8)_mm_sll_epi16(vec,a); } + Iu16vec8& operator<<=(int count) { return *this = (Iu16vec8)_mm_slli_epi16(vec,count); } + Iu16vec8 operator>>(const M128 &a) { return _mm_srl_epi16(vec,a); } + Iu16vec8 operator>>(int count) { return _mm_srli_epi16(vec,count); } + Iu16vec8& operator>>=(const M128 &a) { return *this = (Iu16vec8) _mm_srl_epi16(vec,a); } + Iu16vec8& operator>>=(int count) { return *this = (Iu16vec8) _mm_srli_epi16(vec,count); } + + +#if defined(_ENABLE_VEC_DEBUG) + /* Output for Debug */ + friend std::ostream& operator << (std::ostream &os, const Iu16vec8 &a) + { + os << "[7]:" << unsigned short(_MM_8UW(7,a)) + << " [6]:" << unsigned short(_MM_8UW(6,a)) + << " [5]:" << unsigned short(_MM_8UW(5,a)) + << " [4]:" << unsigned short(_MM_8UW(4,a)) + << " [3]:" << unsigned short(_MM_8UW(3,a)) + << " [2]:" << unsigned short(_MM_8UW(2,a)) + << " [1]:" << unsigned short(_MM_8UW(1,a)) + << " [0]:" << unsigned short(_MM_8UW(0,a)); + return os; + } +#endif + + /* Element Access for Debug, No data modified */ + const unsigned short& operator[](int i)const + { + assert(static_cast(i) < 8); /* Only 8 elements to access */ + return _MM_8UW(i,vec); + } + + /* Element Access for Debug */ + unsigned short& operator[](int i) + { + assert(static_cast(i) < 8); /* Only 8 elements to access */ + return _MM_8UW(i,vec); + } +}; + +inline Iu16vec8 operator*(const Iu16vec8 &a, const Iu16vec8 &b) { return _mm_mullo_epi16(a,b); } + +/* Additional Iu16vec8 functions: cmpeq,cmpneq, unpacks, sat add/sub */ +inline Iu16vec8 cmpeq(const Iu16vec8 &a, const Iu16vec8 &b) { return _mm_cmpeq_epi16(a,b); } +inline Iu16vec8 cmpneq(const Iu16vec8 &a, const Iu16vec8 &b) { return _mm_andnot_si128(_mm_cmpeq_epi16(a,b), get_mask128()); } + +inline Iu16vec8 unpack_low(const Iu16vec8 &a, const Iu16vec8 &b) { return _mm_unpacklo_epi16(a,b); } +inline Iu16vec8 unpack_high(const Iu16vec8 &a, const Iu16vec8 &b) { return _mm_unpackhi_epi16(a,b); } + +inline Iu16vec8 sat_add(const Iu16vec8 &a, const Iu16vec8 &b) { return _mm_adds_epu16(a,b); } +inline Iu16vec8 sat_sub(const Iu16vec8 &a, const Iu16vec8 &b) { return _mm_subs_epu16(a,b); } + +inline Iu16vec8 simd_avg(const Iu16vec8 &a, const Iu16vec8 &b) { return _mm_avg_epu16(a,b); } +inline I16vec8 mul_high(const Iu16vec8 &a, const Iu16vec8 &b) { return _mm_mulhi_epu16(a,b); } + +/* I8vec16 Class: + * 16 elements, each element either unsigned or signed char + */ +class I8vec16 : public M128 +{ +public: + I8vec16() { } + I8vec16(__m128i mm) : M128(mm) { } + + /* Assignment Operator */ + I8vec16& operator= (const M128 &a) { return *this = (I8vec16) a; } + + /* Logical Assignment Operators */ + I8vec16& operator&=(const M128 &a) { return *this = (I8vec16) _mm_and_si128(vec,a); } + I8vec16& operator|=(const M128 &a) { return *this = (I8vec16) _mm_or_si128(vec,a); } + I8vec16& operator^=(const M128 &a) { return *this = (I8vec16) _mm_xor_si128(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + I8vec16& operator +=(const I8vec16 &a) { return *this = (I8vec16) _mm_add_epi8(vec,a); } + I8vec16& operator -=(const I8vec16 &a) { return *this = (I8vec16) _mm_sub_epi8(vec,a); } + +}; + +inline I8vec16 cmpeq(const I8vec16 &a, const I8vec16 &b) { return _mm_cmpeq_epi8(a,b); } +inline I8vec16 cmpneq(const I8vec16 &a, const I8vec16 &b) { return _mm_andnot_si128(_mm_cmpeq_epi8(a,b), get_mask128()); } + +inline I8vec16 unpack_low(const I8vec16 &a, const I8vec16 &b) { return _mm_unpacklo_epi8(a,b); } +inline I8vec16 unpack_high(const I8vec16 &a, const I8vec16 &b) { return _mm_unpackhi_epi8(a,b); } + +/* Is8vec16 Class: + * 16 elements, each element a signed char + */ +class Is8vec16 : public I8vec16 +{ +public: + Is8vec16() { } + Is8vec16(__m128i mm) : I8vec16(mm) { } + + /* Assignment Operator */ + Is8vec16& operator= (const M128 &a) { return *this = (Is8vec16) a; } + + /* Logical Assignment Operators */ + Is8vec16& operator&=(const M128 &a) { return *this = (Is8vec16) _mm_and_si128(vec,a); } + Is8vec16& operator|=(const M128 &a) { return *this = (Is8vec16) _mm_or_si128(vec,a); } + Is8vec16& operator^=(const M128 &a) { return *this = (Is8vec16) _mm_xor_si128(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + Is8vec16& operator +=(const I8vec16 &a) { return *this = (Is8vec16) _mm_add_epi8(vec,a); } + Is8vec16& operator -=(const I8vec16 &a) { return *this = (Is8vec16) _mm_sub_epi8(vec,a); } + +#if defined(_ENABLE_VEC_DEBUG) + /* Output for Debug */ + friend std::ostream& operator << (std::ostream &os, const Is8vec16 &a) + { + os << "[15]:" << short(_MM_16B(15,a)) + << " [14]:" << short(_MM_16B(14,a)) + << " [13]:" << short(_MM_16B(13,a)) + << " [12]:" << short(_MM_16B(12,a)) + << " [11]:" << short(_MM_16B(11,a)) + << " [10]:" << short(_MM_16B(10,a)) + << " [9]:" << short(_MM_16B(9,a)) + << " [8]:" << short(_MM_16B(8,a)) + << " [7]:" << short(_MM_16B(7,a)) + << " [6]:" << short(_MM_16B(6,a)) + << " [5]:" << short(_MM_16B(5,a)) + << " [4]:" << short(_MM_16B(4,a)) + << " [3]:" << short(_MM_16B(3,a)) + << " [2]:" << short(_MM_16B(2,a)) + << " [1]:" << short(_MM_16B(1,a)) + << " [0]:" << short(_MM_16B(0,a)); + return os; + } +#endif + + /* Element Access for Debug, No data modified */ + const signed char& operator[](int i)const + { + assert(static_cast(i) < 16); /* Only 16 elements to access */ + return _MM_16B(i,vec); + } + + /* Element Access for Debug */ + signed char& operator[](int i) + { + assert(static_cast(i) < 16); /* Only 16 elements to access */ + return _MM_16B(i,vec); + } + +}; + +inline Is8vec16 cmpeq(const Is8vec16 &a, const Is8vec16 &b) { return _mm_cmpeq_epi8(a,b); } +inline Is8vec16 cmpneq(const Is8vec16 &a, const Is8vec16 &b) { return _mm_andnot_si128(_mm_cmpeq_epi8(a,b), get_mask128()); } +inline Is8vec16 cmpgt(const Is8vec16 &a, const Is8vec16 &b) { return _mm_cmpgt_epi8(a,b); } +inline Is8vec16 cmplt(const Is8vec16 &a, const Is8vec16 &b) { return _mm_cmplt_epi8(a,b); } + +inline Is8vec16 unpack_low(const Is8vec16 &a, const Is8vec16 &b) { return _mm_unpacklo_epi8(a,b); } +inline Is8vec16 unpack_high(const Is8vec16 &a, const Is8vec16 &b) { return _mm_unpackhi_epi8(a,b); } + +inline Is8vec16 sat_add(const Is8vec16 &a, const Is8vec16 &b) { return _mm_adds_epi8(a,b); } +inline Is8vec16 sat_sub(const Is8vec16 &a, const Is8vec16 &b) { return _mm_subs_epi8(a,b); } + +/* Iu8vec16 Class: + * 16 elements, each element a unsigned char + */ +class Iu8vec16 : public I8vec16 +{ +public: + Iu8vec16() { } + Iu8vec16(__m128i mm) : I8vec16(mm) { } + + /* Assignment Operator */ + Iu8vec16& operator= (const M128 &a) { return *this = (Iu8vec16) a; } + + /* Logical Assignment Operators */ + Iu8vec16& operator&=(const M128 &a) { return *this = (Iu8vec16) _mm_and_si128(vec,a); } + Iu8vec16& operator|=(const M128 &a) { return *this = (Iu8vec16) _mm_or_si128(vec,a); } + Iu8vec16& operator^=(const M128 &a) { return *this = (Iu8vec16) _mm_xor_si128(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + Iu8vec16& operator +=(const I8vec16 &a) { return *this = (Iu8vec16) _mm_add_epi8(vec,a); } + Iu8vec16& operator -=(const I8vec16 &a) { return *this = (Iu8vec16) _mm_sub_epi8(vec,a); } + +#if defined(_ENABLE_VEC_DEBUG) + /* Output for Debug */ + friend std::ostream& operator << (std::ostream &os, const Iu8vec16 &a) + { + os << "[15]:" << unsigned short(_MM_16UB(15,a)) + << " [14]:" << unsigned short(_MM_16UB(14,a)) + << " [13]:" << unsigned short(_MM_16UB(13,a)) + << " [12]:" << unsigned short(_MM_16UB(12,a)) + << " [11]:" << unsigned short(_MM_16UB(11,a)) + << " [10]:" << unsigned short(_MM_16UB(10,a)) + << " [9]:" << unsigned short(_MM_16UB(9,a)) + << " [8]:" << unsigned short(_MM_16UB(8,a)) + << " [7]:" << unsigned short(_MM_16UB(7,a)) + << " [6]:" << unsigned short(_MM_16UB(6,a)) + << " [5]:" << unsigned short(_MM_16UB(5,a)) + << " [4]:" << unsigned short(_MM_16UB(4,a)) + << " [3]:" << unsigned short(_MM_16UB(3,a)) + << " [2]:" << unsigned short(_MM_16UB(2,a)) + << " [1]:" << unsigned short(_MM_16UB(1,a)) + << " [0]:" << unsigned short(_MM_16UB(0,a)); + return os; + } +#endif + + /* Element Access for Debug, No data modified */ + const unsigned char& operator[](int i)const + { + assert(static_cast(i) < 16); /* Only 16 elements to access */ + return _MM_16UB(i,vec); + } + + /* Element Access for Debug */ + unsigned char& operator[](int i) + { + assert(static_cast(i) < 16); /* Only 16 elements to access */ + return _MM_16UB(i,vec); + } + +}; + +inline Iu8vec16 cmpeq(const Iu8vec16 &a, const Iu8vec16 &b) { return _mm_cmpeq_epi8(a,b); } +inline Iu8vec16 cmpneq(const Iu8vec16 &a, const Iu8vec16 &b) { return _mm_andnot_si128(_mm_cmpeq_epi8(a,b), get_mask128()); } + +inline Iu8vec16 unpack_low(const Iu8vec16 &a, const Iu8vec16 &b) { return _mm_unpacklo_epi8(a,b); } +inline Iu8vec16 unpack_high(const Iu8vec16 &a, const Iu8vec16 &b) { return _mm_unpackhi_epi8(a,b); } + +inline Iu8vec16 sat_add(const Iu8vec16 &a, const Iu8vec16 &b) { return _mm_adds_epu8(a,b); } +inline Iu8vec16 sat_sub(const Iu8vec16 &a, const Iu8vec16 &b) { return _mm_subs_epu8(a,b); } + +inline I64vec2 sum_abs(const Iu8vec16 &a, const Iu8vec16 &b) { return _mm_sad_epu8(a,b); } + +inline Iu8vec16 simd_avg(const Iu8vec16 &a, const Iu8vec16 &b) { return _mm_avg_epu8(a,b); } +inline Iu8vec16 simd_max(const Iu8vec16 &a, const Iu8vec16 &b) { return _mm_max_epu8(a,b); } +inline Iu8vec16 simd_min(const Iu8vec16 &a, const Iu8vec16 &b) { return _mm_min_epu8(a,b); } + +/* Pack & Saturates */ + +inline Is16vec8 pack_sat(const Is32vec4 &a, const Is32vec4 &b) { return _mm_packs_epi32(a,b); } +inline Is8vec16 pack_sat(const Is16vec8 &a, const Is16vec8 &b) { return _mm_packs_epi16(a,b); } +inline Iu8vec16 packu_sat(const Is16vec8 &a, const Is16vec8 &b) { return _mm_packus_epi16(a,b);} + +/********************************* Logicals ****************************************/ +#define IVEC128_LOGICALS(vect,element) \ +inline I##vect##vec##element operator& (const I##vect##vec##element &a, const I##vect##vec##element &b) \ +{ return _mm_and_si128( a,b); } \ +inline I##vect##vec##element operator| (const I##vect##vec##element &a, const I##vect##vec##element &b) \ +{ return _mm_or_si128( a,b); } \ +inline I##vect##vec##element operator^ (const I##vect##vec##element &a, const I##vect##vec##element &b) \ +{ return _mm_xor_si128( a,b); } \ +inline I##vect##vec##element andnot (const I##vect##vec##element &a, const I##vect##vec##element &b) \ +{ return _mm_andnot_si128( a,b); } + +IVEC128_LOGICALS(8,16) +IVEC128_LOGICALS(u8,16) +IVEC128_LOGICALS(s8,16) +IVEC128_LOGICALS(16,8) +IVEC128_LOGICALS(u16,8) +IVEC128_LOGICALS(s16,8) +IVEC128_LOGICALS(32,4) +IVEC128_LOGICALS(u32,4) +IVEC128_LOGICALS(s32,4) +IVEC128_LOGICALS(64,2) +IVEC128_LOGICALS(128,1) +#undef IVEC128_LOGICALS + +/********************************* Add & Sub ****************************************/ +#define IVEC128_ADD_SUB(vect,element,opsize) \ +inline I##vect##vec##element operator+ (const I##vect##vec##element &a, const I##vect##vec##element &b) \ +{ return _mm_add_##opsize( a,b); } \ +inline I##vect##vec##element operator- (const I##vect##vec##element &a, const I##vect##vec##element &b) \ +{ return _mm_sub_##opsize( a,b); } + +IVEC128_ADD_SUB(8,16, epi8) +IVEC128_ADD_SUB(u8,16, epi8) +IVEC128_ADD_SUB(s8,16, epi8) +IVEC128_ADD_SUB(16,8, epi16) +IVEC128_ADD_SUB(u16,8, epi16) +IVEC128_ADD_SUB(s16,8, epi16) +IVEC128_ADD_SUB(32,4, epi32) +IVEC128_ADD_SUB(u32,4, epi32) +IVEC128_ADD_SUB(s32,4, epi32) +IVEC128_ADD_SUB(64,2, epi64) +#undef IVEC128_ADD_SUB + +/********************************* Conditional Select ****************************************/ +/* version of: retval = (a OP b)? c : d; * + * Where OP is one of the possible comparision operators. * + * Example: r = select_eq(a,b,c,d); * + * if "member at position x of the vector a" == "member at position x of vector b" * + * assign the corresponding member in r from c, else assign from d. * + ********************************* Conditional Select ****************************************/ + +#define IVEC128_SELECT(vect12,vect34,element,selop,arg1,arg2) \ + inline I##vect34##vec##element select_##selop (const I##vect12##vec##element &a, const I##vect12##vec##element &b, const I##vect34##vec##element &c, const I##vect34##vec##element &d) \ +{ \ + I##vect12##vec##element mask = cmp##selop(a,b); \ + return( I##vect34##vec##element ((mask & arg1 ) | I##vect12##vec##element ((_mm_andnot_si128(mask, arg2 ))))); \ +} +IVEC128_SELECT(8,s8,16,eq,c,d) +IVEC128_SELECT(8,u8,16,eq,c,d) +IVEC128_SELECT(8,8,16,eq,c,d) +IVEC128_SELECT(8,s8,16,neq,c,d) +IVEC128_SELECT(8,u8,16,neq,c,d) +IVEC128_SELECT(8,8,16,neq,c,d) + +IVEC128_SELECT(16,s16,8,eq,c,d) +IVEC128_SELECT(16,u16,8,eq,c,d) +IVEC128_SELECT(16,16,8,eq,c,d) +IVEC128_SELECT(16,s16,8,neq,c,d) +IVEC128_SELECT(16,u16,8,neq,c,d) +IVEC128_SELECT(16,16,8,neq,c,d) + +IVEC128_SELECT(32,s32,4,eq,c,d) +IVEC128_SELECT(32,u32,4,eq,c,d) +IVEC128_SELECT(32,32,4,eq,c,d) +IVEC128_SELECT(32,s32,4,neq,c,d) +IVEC128_SELECT(32,u32,4,neq,c,d) +IVEC128_SELECT(32,32,4,neq,c,d) + +IVEC128_SELECT(s8,s8,16,gt,c,d) +IVEC128_SELECT(s8,u8,16,gt,c,d) +IVEC128_SELECT(s8,8,16,gt,c,d) +IVEC128_SELECT(s8,s8,16,lt,c,d) +IVEC128_SELECT(s8,u8,16,lt,c,d) +IVEC128_SELECT(s8,8,16,lt,c,d) + +IVEC128_SELECT(s16,s16,8,gt,c,d) +IVEC128_SELECT(s16,u16,8,gt,c,d) +IVEC128_SELECT(s16,16,8,gt,c,d) +IVEC128_SELECT(s16,s16,8,lt,c,d) +IVEC128_SELECT(s16,u16,8,lt,c,d) +IVEC128_SELECT(s16,16,8,lt,c,d) + + +#undef IVEC128_SELECT + + +class F64vec2 +{ +protected: + __m128d vec; +public: + + /* Constructors: __m128d, 2 doubles */ + F64vec2() {} + + /* initialize 2 DP FP with __m128d data type */ + F64vec2(__m128d m) { vec = m;} + + /* initialize 2 DP FPs with 2 doubles */ + F64vec2(double d1, double d0) { vec= _mm_set_pd(d1,d0); } + + /* Explicitly initialize each of 2 DP FPs with same double */ + EXPLICIT F64vec2(double d) { vec = _mm_set1_pd(d); } + + /* Conversion functions */ + operator __m128d() const { return vec; } /* Convert to __m128d */ + + /* Logical Operators */ + friend F64vec2 operator &(const F64vec2 &a, const F64vec2 &b) { return _mm_and_pd(a,b); } + friend F64vec2 operator |(const F64vec2 &a, const F64vec2 &b) { return _mm_or_pd(a,b); } + friend F64vec2 operator ^(const F64vec2 &a, const F64vec2 &b) { return _mm_xor_pd(a,b); } + + /* Arithmetic Operators */ + friend F64vec2 operator +(const F64vec2 &a, const F64vec2 &b) { return _mm_add_pd(a,b); } + friend F64vec2 operator -(const F64vec2 &a, const F64vec2 &b) { return _mm_sub_pd(a,b); } + friend F64vec2 operator *(const F64vec2 &a, const F64vec2 &b) { return _mm_mul_pd(a,b); } + friend F64vec2 operator /(const F64vec2 &a, const F64vec2 &b) { return _mm_div_pd(a,b); } + + F64vec2& operator +=(F64vec2 &a) { return *this = _mm_add_pd(vec,a); } + F64vec2& operator -=(F64vec2 &a) { return *this = _mm_sub_pd(vec,a); } + F64vec2& operator *=(F64vec2 &a) { return *this = _mm_mul_pd(vec,a); } + F64vec2& operator /=(F64vec2 &a) { return *this = _mm_div_pd(vec,a); } + F64vec2& operator &=(F64vec2 &a) { return *this = _mm_and_pd(vec,a); } + F64vec2& operator |=(F64vec2 &a) { return *this = _mm_or_pd(vec,a); } + F64vec2& operator ^=(F64vec2 &a) { return *this = _mm_xor_pd(vec,a); } + + /* Horizontal Add */ + friend double add_horizontal(F64vec2 &a) + { + F64vec2 ftemp = _mm_add_sd(a,_mm_shuffle_pd(a, a, 1)); + return ftemp[0]; + } + + /* And Not */ + friend F64vec2 andnot(const F64vec2 &a, const F64vec2 &b) { return _mm_andnot_pd(a,b); } + + /* Square Root */ + friend F64vec2 sqrt(const F64vec2 &a) { return _mm_sqrt_pd(a); } + + /* Compares: Mask is returned */ + /* Macros expand to all compare intrinsics. Example: + friend F64vec2 cmpeq(const F64vec2 &a, const F64vec2 &b) + { return _mm_cmpeq_ps(a,b);} */ + #define F64vec2_COMP(op) \ + friend F64vec2 cmp##op (const F64vec2 &a, const F64vec2 &b) { return _mm_cmp##op##_pd(a,b); } + F64vec2_COMP(eq) // expanded to cmpeq(a,b) + F64vec2_COMP(lt) // expanded to cmplt(a,b) + F64vec2_COMP(le) // expanded to cmple(a,b) + F64vec2_COMP(gt) // expanded to cmpgt(a,b) + F64vec2_COMP(ge) // expanded to cmpge(a,b) + F64vec2_COMP(ngt) // expanded to cmpngt(a,b) + F64vec2_COMP(nge) // expanded to cmpnge(a,b) + F64vec2_COMP(neq) // expanded to cmpneq(a,b) + F64vec2_COMP(nlt) // expanded to cmpnlt(a,b) + F64vec2_COMP(nle) // expanded to cmpnle(a,b) + #undef F64vec2_COMP + + /* Min and Max */ + friend F64vec2 simd_min(const F64vec2 &a, const F64vec2 &b) { return _mm_min_pd(a,b); } + friend F64vec2 simd_max(const F64vec2 &a, const F64vec2 &b) { return _mm_max_pd(a,b); } + + /* Compare lower DP FP values */ + #define F64vec2_COMI(op) \ + friend int comi##op (const F64vec2 &a, const F64vec2 &b) { return _mm_comi##op##_sd(a,b); } + F64vec2_COMI(eq) // expanded to comieq(a,b) + F64vec2_COMI(lt) // expanded to comilt(a,b) + F64vec2_COMI(le) // expanded to comile(a,b) + F64vec2_COMI(gt) // expanded to comigt(a,b) + F64vec2_COMI(ge) // expanded to comige(a,b) + F64vec2_COMI(neq) // expanded to comineq(a,b) + #undef F64vec2_COMI + + /* Compare lower DP FP values */ + #define F64vec2_UCOMI(op) \ + friend int ucomi##op (const F64vec2 &a, const F64vec2 &b) { return _mm_ucomi##op##_sd(a,b); } + F64vec2_UCOMI(eq) // expanded to ucomieq(a,b) + F64vec2_UCOMI(lt) // expanded to ucomilt(a,b) + F64vec2_UCOMI(le) // expanded to ucomile(a,b) + F64vec2_UCOMI(gt) // expanded to ucomigt(a,b) + F64vec2_UCOMI(ge) // expanded to ucomige(a,b) + F64vec2_UCOMI(neq) // expanded to ucomineq(a,b) + #undef F64vec2_UCOMI + + /* Debug Features */ +#if defined(_ENABLE_VEC_DEBUG) + /* Output */ + friend std::ostream & operator<<(std::ostream & os, const F64vec2 &a) + { + /* To use: cout << "Elements of F64vec2 fvec are: " << fvec; */ + double *dp = (double*)&a; + os << " [1]:" << *(dp+1) + << " [0]:" << *dp; + return os; + } +#endif + /* Element Access Only, no modifications to elements*/ + const double& operator[](int i) const + { + /* Assert enabled only during debug /DDEBUG */ + assert((0 <= i) && (i <= 1)); /* User should only access elements 0-1 */ + double *dp = (double*)&vec; + return *(dp+i); + } + /* Element Access and Modification*/ + double& operator[](int i) + { + /* Assert enabled only during debug /DDEBUG */ + assert((0 <= i) && (i <= 1)); /* User should only access elements 0-1 */ + double *dp = (double*)&vec; + return *(dp+i); + } +}; + + /* Miscellaneous */ + +/* Interleave low order data elements of a and b into destination */ +inline F64vec2 unpack_low(const F64vec2 &a, const F64vec2 &b) +{ return _mm_unpacklo_pd(a, b); } + +/* Interleave high order data elements of a and b into target */ +inline F64vec2 unpack_high(const F64vec2 &a, const F64vec2 &b) +{ return _mm_unpackhi_pd(a, b); } + +/* Move Mask to Integer returns 4 bit mask formed of most significant bits of a */ +inline int move_mask(const F64vec2 &a) +{ return _mm_movemask_pd(a);} + + /* Data Motion Functions */ + +/* Load Unaligned loadu_pd: Unaligned */ +inline void loadu(F64vec2 &a, double *p) +{ a = _mm_loadu_pd(p); } + +/* Store Temporal storeu_pd: Unaligned */ +inline void storeu(double *p, const F64vec2 &a) +{ _mm_storeu_pd(p, a); } + + /* Cacheability Support */ + +/* Non-Temporal Store */ +inline void store_nta(double *p, F64vec2 &a) +{ _mm_stream_pd(p,a);} + +#define F64vec2_SELECT(op) \ +inline F64vec2 select_##op (const F64vec2 &a, const F64vec2 &b, const F64vec2 &c, const F64vec2 &d) \ +{ \ + F64vec2 mask = _mm_cmp##op##_pd(a,b); \ + return( (mask & c) | F64vec2((_mm_andnot_pd(mask,d)))); \ +} +F64vec2_SELECT(eq) // generates select_eq(a,b) +F64vec2_SELECT(lt) // generates select_lt(a,b) +F64vec2_SELECT(le) // generates select_le(a,b) +F64vec2_SELECT(gt) // generates select_gt(a,b) +F64vec2_SELECT(ge) // generates select_ge(a,b) +F64vec2_SELECT(neq) // generates select_neq(a,b) +F64vec2_SELECT(nlt) // generates select_nlt(a,b) +F64vec2_SELECT(nle) // generates select_nle(a,b) +#undef F64vec2_SELECT + +/* Convert the lower DP FP value of a to a 32 bit signed integer using Truncate*/ +inline int F64vec2ToInt(const F64vec2 &a) +{ + + return _mm_cvttsd_si32(a); + +} + +/* Convert the 4 SP FP values of a to DP FP values */ +inline F64vec2 F32vec4ToF64vec2(const F32vec4 &a) +{ + return _mm_cvtps_pd(a); +} + +/* Convert the 2 DP FP values of a to SP FP values */ +inline F32vec4 F64vec2ToF32vec4(const F64vec2 &a) +{ + return _mm_cvtpd_ps(a); +} + +/* Convert the signed int in b to a DP FP value. Upper DP FP value in a passed through */ +inline F64vec2 IntToF64vec2(const F64vec2 &a, int b) +{ + return _mm_cvtsi32_sd(a,b); +} + +#pragma pack(pop) /* 16-B aligned */ +#endif // DVEC_H_INCLUDED diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/eh.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/eh.h new file mode 100644 index 00000000..4e899022 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/eh.h @@ -0,0 +1,70 @@ +/*** +*eh.h - User include file for exception handling. +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* User include file for exception handling. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_EH +#define _INC_EH + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +// Currently, all MS C compilers for Win32 platforms default to 8 byte +// alignment. +#pragma pack(push,8) +#endif // _MSC_VER + +#ifndef __cplusplus +#error "eh.h is only for C++!" +#endif + + +/* Define _CRTIMP */ +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + +typedef void (__cdecl *terminate_function)(); +typedef void (__cdecl *unexpected_function)(); +typedef void (__cdecl *terminate_handler)(); +typedef void (__cdecl *unexpected_handler)(); + +struct _EXCEPTION_POINTERS; +typedef void (__cdecl *_se_translator_function)(unsigned int, struct _EXCEPTION_POINTERS*); + +#if _MSC_VER >= 1200 +_CRTIMP __declspec(noreturn) void __cdecl terminate(void); +_CRTIMP __declspec(noreturn) void __cdecl unexpected(void); +#else +_CRTIMP void __cdecl terminate(void); +_CRTIMP void __cdecl unexpected(void); +#endif + +_CRTIMP terminate_function __cdecl set_terminate(terminate_function); +_CRTIMP unexpected_function __cdecl set_unexpected(unexpected_function); +_CRTIMP _se_translator_function __cdecl _set_se_translator(_se_translator_function); +_CRTIMP bool __cdecl __uncaught_exception(); + +#ifdef _MSC_VER +#pragma pack(pop) +#endif // _MSC_VER + +#endif // _INC_EH diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/emmintrin.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/emmintrin.h new file mode 100644 index 00000000..d43df304 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/emmintrin.h @@ -0,0 +1,382 @@ +/** +*** Copyright (C) 1985-1999 Intel Corporation. All rights reserved. +*** +*** The information and source code contained herein is the exclusive +*** property of Intel Corporation and may not be disclosed, examined +*** or reproduced in whole or in part without explicit written authorization +*** from the company. +*** +**/ + +/* + * emmintrin.h + * + * Principal header file for Willamette New Instruction intrinsics + * + * The intrinsics package can be used in 2 ways, based whether or not + * _EMM_FUNCTIONALITY is defined; if it is, the C implementation + * will be used (the "functional intrinsics"). + */ + +#ifndef _INCLUDED_EMM +#define _INCLUDED_EMM + +/* + * the __m128 & __m64 types are required for the intrinsics + */ +#include + +#ifdef __ICL +#ifdef _EMM_FUNCTIONALITY +#include "emm_func.h" +#else +typedef long long __m128d; +typedef long long __m128i; +#endif +#elif _MSC_VER >= 1300 +typedef union __declspec(intrin_type) __declspec(align(16)) __m128i { + __int8 m128i_i8[16]; + __int16 m128i_i16[8]; + __int32 m128i_i32[4]; + __int64 m128i_i64[2]; + unsigned __int8 m128i_u8[16]; + unsigned __int16 m128i_u16[8]; + unsigned __int32 m128i_u32[4]; + unsigned __int64 m128i_u64[2]; +} __m128i; + +typedef struct __declspec(intrin_type) __declspec(align(16)) __m128d { + double m128d_f64[2]; +} __m128d; +#endif + +/* + * Macro function for shuffle + */ +#define _MM_SHUFFLE2(x,y) (((x)<<1) | (y)) + +/*****************************************************/ +/* INTRINSICS FUNCTION PROTOTYPES START HERE */ +/*****************************************************/ + +#if defined __cplusplus +extern "C" { /* Begin "C" */ + /* Intrinsics use C name-mangling. */ +#endif /* __cplusplus */ + +/* + * DP, arithmetic + */ + +extern __m128d _mm_add_sd(__m128d a, __m128d b); +extern __m128d _mm_add_pd(__m128d a, __m128d b); +extern __m128d _mm_sub_sd(__m128d a, __m128d b); +extern __m128d _mm_sub_pd(__m128d a, __m128d b); +extern __m128d _mm_mul_sd(__m128d a, __m128d b); +extern __m128d _mm_mul_pd(__m128d a, __m128d b); +extern __m128d _mm_sqrt_sd(__m128d a, __m128d b); +extern __m128d _mm_sqrt_pd(__m128d a); +extern __m128d _mm_div_sd(__m128d a, __m128d b); +extern __m128d _mm_div_pd(__m128d a, __m128d b); +extern __m128d _mm_min_sd(__m128d a, __m128d b); +extern __m128d _mm_min_pd(__m128d a, __m128d b); +extern __m128d _mm_max_sd(__m128d a, __m128d b); +extern __m128d _mm_max_pd(__m128d a, __m128d b); + +/* + * DP, logicals + */ + +extern __m128d _mm_and_pd(__m128d a, __m128d b); +extern __m128d _mm_andnot_pd(__m128d a, __m128d b); +extern __m128d _mm_or_pd(__m128d a, __m128d b); +extern __m128d _mm_xor_pd(__m128d a, __m128d b); + +/* + * DP, comparisons + */ + +extern __m128d _mm_cmpeq_sd(__m128d a, __m128d b); +extern __m128d _mm_cmpeq_pd(__m128d a, __m128d b); +extern __m128d _mm_cmplt_sd(__m128d a, __m128d b); +extern __m128d _mm_cmplt_pd(__m128d a, __m128d b); +extern __m128d _mm_cmple_sd(__m128d a, __m128d b); +extern __m128d _mm_cmple_pd(__m128d a, __m128d b); +extern __m128d _mm_cmpgt_sd(__m128d a, __m128d b); +extern __m128d _mm_cmpgt_pd(__m128d a, __m128d b); +extern __m128d _mm_cmpge_sd(__m128d a, __m128d b); +extern __m128d _mm_cmpge_pd(__m128d a, __m128d b); +extern __m128d _mm_cmpneq_sd(__m128d a, __m128d b); +extern __m128d _mm_cmpneq_pd(__m128d a, __m128d b); +extern __m128d _mm_cmpnlt_sd(__m128d a, __m128d b); +extern __m128d _mm_cmpnlt_pd(__m128d a, __m128d b); +extern __m128d _mm_cmpnle_sd(__m128d a, __m128d b); +extern __m128d _mm_cmpnle_pd(__m128d a, __m128d b); +extern __m128d _mm_cmpngt_sd(__m128d a, __m128d b); +extern __m128d _mm_cmpngt_pd(__m128d a, __m128d b); +extern __m128d _mm_cmpnge_sd(__m128d a, __m128d b); +extern __m128d _mm_cmpnge_pd(__m128d a, __m128d b); +extern __m128d _mm_cmpord_pd(__m128d a, __m128d b); +extern __m128d _mm_cmpord_sd(__m128d a, __m128d b); +extern __m128d _mm_cmpunord_pd(__m128d a, __m128d b); +extern __m128d _mm_cmpunord_sd(__m128d a, __m128d b); +extern int _mm_comieq_sd(__m128d a, __m128d b); +extern int _mm_comilt_sd(__m128d a, __m128d b); +extern int _mm_comile_sd(__m128d a, __m128d b); +extern int _mm_comigt_sd(__m128d a, __m128d b); +extern int _mm_comige_sd(__m128d a, __m128d b); +extern int _mm_comineq_sd(__m128d a, __m128d b); +extern int _mm_ucomieq_sd(__m128d a, __m128d b); +extern int _mm_ucomilt_sd(__m128d a, __m128d b); +extern int _mm_ucomile_sd(__m128d a, __m128d b); +extern int _mm_ucomigt_sd(__m128d a, __m128d b); +extern int _mm_ucomige_sd(__m128d a, __m128d b); +extern int _mm_ucomineq_sd(__m128d a, __m128d b); + +/* + * DP, converts + */ + +extern __m128d _mm_cvtepi32_pd(__m128i a); +extern __m128i _mm_cvtpd_epi32(__m128d a); +extern __m128i _mm_cvttpd_epi32(__m128d a); +extern __m128 _mm_cvtepi32_ps(__m128i a); +extern __m128i _mm_cvtps_epi32(__m128 a); +extern __m128i _mm_cvttps_epi32(__m128 a); +extern __m128 _mm_cvtpd_ps(__m128d a); +extern __m128d _mm_cvtps_pd(__m128 a); +extern __m128 _mm_cvtsd_ss(__m128 a, __m128d b); +extern __m128d _mm_cvtss_sd(__m128d a, __m128 b); + +extern int _mm_cvtsd_si32(__m128d a); +extern int _mm_cvttsd_si32(__m128d a); +extern __m128d _mm_cvtsi32_sd(__m128d a, int b); + +extern __m64 _mm_cvtpd_pi32(__m128d a); +extern __m64 _mm_cvttpd_pi32(__m128d a); +extern __m128d _mm_cvtpi32_pd(__m64 a); + +/* + * DP, misc + */ + +extern __m128d _mm_unpackhi_pd(__m128d a, __m128d b); +extern __m128d _mm_unpacklo_pd(__m128d a, __m128d b); +extern int _mm_movemask_pd(__m128d a); +extern __m128d _mm_shuffle_pd(__m128d a, __m128d b, int i); + +/* + * DP, loads + */ + +extern __m128d _mm_load_pd(double const*dp); +extern __m128d _mm_load1_pd(double const*dp); +extern __m128d _mm_loadr_pd(double const*dp); +extern __m128d _mm_loadu_pd(double const*dp); +extern __m128d _mm_load_sd(double const*dp); +extern __m128d _mm_loadh_pd(__m128d a, double const*dp); +extern __m128d _mm_loadl_pd(__m128d a, double const*dp); + +/* + * DP, sets + */ + +extern __m128d _mm_set_sd(double w); +extern __m128d _mm_set1_pd(double a); +extern __m128d _mm_set_pd(double z, double y); +extern __m128d _mm_setr_pd(double y, double z); +extern __m128d _mm_setzero_pd(void); +extern __m128d _mm_move_sd(__m128d a, __m128d b); + +/* + * DP, stores + */ + +extern void _mm_store_sd(double *dp, __m128d a); +extern void _mm_store1_pd(double *dp, __m128d a); +extern void _mm_store_pd(double *dp, __m128d a); +extern void _mm_storeu_pd(double *dp, __m128d a); +extern void _mm_storer_pd(double *dp, __m128d a); +extern void _mm_storeh_pd(double *dp, __m128d a); +extern void _mm_storel_pd(double *dp, __m128d a); + +/* + * Integer, arithmetic + */ + +extern __m128i _mm_add_epi8(__m128i a, __m128i b); +extern __m128i _mm_add_epi16(__m128i a, __m128i b); +extern __m128i _mm_add_epi32(__m128i a, __m128i b); +extern __m64 _mm_add_si64(__m64 a, __m64 b); +extern __m128i _mm_add_epi64(__m128i a, __m128i b); +extern __m128i _mm_adds_epi8(__m128i a, __m128i b); +extern __m128i _mm_adds_epi16(__m128i a, __m128i b); +extern __m128i _mm_adds_epu8(__m128i a, __m128i b); +extern __m128i _mm_adds_epu16(__m128i a, __m128i b); +extern __m128i _mm_avg_epu8(__m128i a, __m128i b); +extern __m128i _mm_avg_epu16(__m128i a, __m128i b); +extern __m128i _mm_madd_epi16(__m128i a, __m128i b); +extern __m128i _mm_max_epi16(__m128i a, __m128i b); +extern __m128i _mm_max_epu8(__m128i a, __m128i b); +extern __m128i _mm_min_epi16(__m128i a, __m128i b); +extern __m128i _mm_min_epu8(__m128i a, __m128i b); +extern __m128i _mm_mulhi_epi16(__m128i a, __m128i b); +extern __m128i _mm_mulhi_epu16(__m128i a, __m128i b); +extern __m128i _mm_mullo_epi16(__m128i a, __m128i b); +extern __m64 _mm_mul_su32(__m64 a, __m64 b); +extern __m128i _mm_mul_epu32(__m128i a, __m128i b); +extern __m128i _mm_sad_epu8(__m128i a, __m128i b); +extern __m128i _mm_sub_epi8(__m128i a, __m128i b); +extern __m128i _mm_sub_epi16(__m128i a, __m128i b); +extern __m128i _mm_sub_epi32(__m128i a, __m128i b); +extern __m64 _mm_sub_si64(__m64 a, __m64 b); +extern __m128i _mm_sub_epi64(__m128i a, __m128i b); +extern __m128i _mm_subs_epi8(__m128i a, __m128i b); +extern __m128i _mm_subs_epi16(__m128i a, __m128i b); +extern __m128i _mm_subs_epu8(__m128i a, __m128i b); +extern __m128i _mm_subs_epu16(__m128i a, __m128i b); + +/* + * Integer, logicals + */ + +extern __m128i _mm_and_si128(__m128i a, __m128i b); +extern __m128i _mm_andnot_si128(__m128i a, __m128i b); +extern __m128i _mm_or_si128(__m128i a, __m128i b); +extern __m128i _mm_xor_si128(__m128i a, __m128i b); + +/* + * Integer, shifts + */ + +extern __m128i _mm_slli_si128(__m128i a, int imm); +extern __m128i _mm_slli_epi16(__m128i a, int count); +extern __m128i _mm_sll_epi16(__m128i a, __m128i count); +extern __m128i _mm_slli_epi32(__m128i a, int count); +extern __m128i _mm_sll_epi32(__m128i a, __m128i count); +extern __m128i _mm_slli_epi64(__m128i a, int count); +extern __m128i _mm_sll_epi64(__m128i a, __m128i count); +extern __m128i _mm_srai_epi16(__m128i a, int count); +extern __m128i _mm_sra_epi16(__m128i a, __m128i count); +extern __m128i _mm_srai_epi32(__m128i a, int count); +extern __m128i _mm_sra_epi32(__m128i a, __m128i count); +extern __m128i _mm_srli_si128(__m128i a, int imm); +extern __m128i _mm_srli_epi16(__m128i a, int count); +extern __m128i _mm_srl_epi16(__m128i a, __m128i count); +extern __m128i _mm_srli_epi32(__m128i a, int count); +extern __m128i _mm_srl_epi32(__m128i a, __m128i count); +extern __m128i _mm_srli_epi64(__m128i a, int count); +extern __m128i _mm_srl_epi64(__m128i a, __m128i count); + +/* + * Integer, comparisons + */ + +extern __m128i _mm_cmpeq_epi8(__m128i a, __m128i b); +extern __m128i _mm_cmpeq_epi16(__m128i a, __m128i b); +extern __m128i _mm_cmpeq_epi32(__m128i a, __m128i b); +extern __m128i _mm_cmpgt_epi8(__m128i a, __m128i b); +extern __m128i _mm_cmpgt_epi16(__m128i a, __m128i b); +extern __m128i _mm_cmpgt_epi32(__m128i a, __m128i b); +extern __m128i _mm_cmplt_epi8(__m128i a, __m128i b); +extern __m128i _mm_cmplt_epi16(__m128i a, __m128i b); +extern __m128i _mm_cmplt_epi32(__m128i a, __m128i b); + +/* + * Integer, converts + */ + +extern __m128i _mm_cvtsi32_si128(int a); +extern int _mm_cvtsi128_si32(__m128i a); + +/* + * Integer, misc + */ + +extern __m128i _mm_packs_epi16(__m128i a, __m128i b); +extern __m128i _mm_packs_epi32(__m128i a, __m128i b); +extern __m128i _mm_packus_epi16(__m128i a, __m128i b); +extern int _mm_extract_epi16(__m128i a, int imm); +extern __m128i _mm_insert_epi16(__m128i a, int b, int imm); +extern int _mm_movemask_epi8(__m128i a); +extern __m128i _mm_shuffle_epi32(__m128i a, int imm); +extern __m128i _mm_shufflehi_epi16(__m128i a, int imm); +extern __m128i _mm_shufflelo_epi16(__m128i a, int imm); +extern __m128i _mm_unpackhi_epi8(__m128i a, __m128i b); +extern __m128i _mm_unpackhi_epi16(__m128i a, __m128i b); +extern __m128i _mm_unpackhi_epi32(__m128i a, __m128i b); +extern __m128i _mm_unpackhi_epi64(__m128i a, __m128i b); +extern __m128i _mm_unpacklo_epi8(__m128i a, __m128i b); +extern __m128i _mm_unpacklo_epi16(__m128i a, __m128i b); +extern __m128i _mm_unpacklo_epi32(__m128i a, __m128i b); +extern __m128i _mm_unpacklo_epi64(__m128i a, __m128i b); + +/* + * Integer, loads + */ + +extern __m128i _mm_load_si128(__m128i const*p); +extern __m128i _mm_loadu_si128(__m128i const*p); +extern __m128i _mm_loadl_epi64(__m128i const*p); + +/* + * Integer, sets + */ + +extern __m128i _mm_set_epi64(__m64 q1, __m64 q0); +extern __m128i _mm_set_epi32(int i3, int i2, int i1, int i0); +extern __m128i _mm_set_epi16(short w7, short w6, short w5, short w4, + short w3, short w2, short w1, short w0); +extern __m128i _mm_set_epi8(char b15, char b14, char b13, char b12, + char b11, char b10, char b9, char b8, + char b7, char b6, char b5, char b4, + char b3, char b2, char b1, char b0); +extern __m128i _mm_set1_epi64(__m64 q); +extern __m128i _mm_set1_epi32(int i); +extern __m128i _mm_set1_epi16(short w); +extern __m128i _mm_set1_epi8(char b); +extern __m128i _mm_setl_epi64(__m128i q); +extern __m128i _mm_setr_epi64(__m64 q0, __m64 q1); +extern __m128i _mm_setr_epi32(int i0, int i1, int i2, int i3); +extern __m128i _mm_setr_epi16(short w0, short w1, short w2, short w3, + short w4, short w5, short w6, short w7); +extern __m128i _mm_setr_epi8(char b15, char b14, char b13, char b12, + char b11, char b10, char b9, char b8, + char b7, char b6, char b5, char b4, + char b3, char b2, char b1, char b0); +extern __m128i _mm_setzero_si128(); + +/* + * Integer, stores + */ + +extern void _mm_store_si128(__m128i *p, __m128i b); +extern void _mm_storeu_si128(__m128i *p, __m128i b); +extern void _mm_storel_epi64(__m128i *p, __m128i q); +extern void _mm_maskmoveu_si128(__m128i d, __m128i n, char *p); + +/* + * Integer, moves + */ + +extern __m128i _mm_move_epi64(__m128i q); +extern __m128i _mm_movpi64_epi64(__m64 q); +extern __m64 _mm_movepi64_pi64(__m128i q); + +/* + * Cacheability support + */ + +extern void _mm_stream_pd(double *dp, __m128d a); +extern void _mm_stream_si128(__m128i *p, __m128i a); +extern void _mm_clflush(void const*p); +extern void _mm_lfence(void); +extern void _mm_mfence(void); +extern void _mm_stream_si32(int *p, int i); +extern void _mm_pause(void); + +#if defined __cplusplus +}; /* End "C" */ +#endif /* __cplusplus */ + +#endif /* _INCLUDED_EMM */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/errno.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/errno.h new file mode 100644 index 00000000..4a30a8be --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/errno.h @@ -0,0 +1,110 @@ +/*** +*errno.h - system wide error numbers (set by system calls) +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the system-wide error numbers (set by +* system calls). Conforms to the XENIX standard. Extended +* for compatibility with Uniforum standard. +* [System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_ERRNO +#define _INC_ERRNO + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + +/* declare reference to errno */ + +#if defined(_MT) || defined(_DLL) +_CRTIMP extern int * __cdecl _errno(void); +#define errno (*_errno()) +#else /* ndef _MT && ndef _DLL */ +_CRTIMP extern int errno; +#endif /* _MT || _DLL */ + +/* Error Codes */ + +#define EPERM 1 +#define ENOENT 2 +#define ESRCH 3 +#define EINTR 4 +#define EIO 5 +#define ENXIO 6 +#define E2BIG 7 +#define ENOEXEC 8 +#define EBADF 9 +#define ECHILD 10 +#define EAGAIN 11 +#define ENOMEM 12 +#define EACCES 13 +#define EFAULT 14 +#define EBUSY 16 +#define EEXIST 17 +#define EXDEV 18 +#define ENODEV 19 +#define ENOTDIR 20 +#define EISDIR 21 +#define EINVAL 22 +#define ENFILE 23 +#define EMFILE 24 +#define ENOTTY 25 +#define EFBIG 27 +#define ENOSPC 28 +#define ESPIPE 29 +#define EROFS 30 +#define EMLINK 31 +#define EPIPE 32 +#define EDOM 33 +#define ERANGE 34 +#define EDEADLK 36 +#define ENAMETOOLONG 38 +#define ENOLCK 39 +#define ENOSYS 40 +#define ENOTEMPTY 41 +#define EILSEQ 42 + +/* + * Support EDEADLOCK for compatibiity with older MS-C versions. + */ +#define EDEADLOCK EDEADLK + +#ifdef __cplusplus +} +#endif + +#endif /* _INC_ERRNO */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/exception b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/exception new file mode 100644 index 00000000..b2c077f7 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/exception @@ -0,0 +1,183 @@ +// exception standard header for Microsoft +#pragma once +#ifndef _EXCEPTION_ +#define _EXCEPTION_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + #define _USE_EX using ::exception; \ + using ::set_terminate; using ::terminate_handler; using ::terminate; \ + using ::set_unexpected; using ::unexpected_handler; using ::unexpected; + + + #if _HAS_EXCEPTIONS + _STD_END + + #include + + #if !defined(_WIN32) + #error ERROR: Only Win32 targets supported! + #endif /* !defined(_WIN32) */ + + #ifndef _CRTIMP + + #ifdef _DLL + #define _CRTIMP __declspec(dllimport) + + #else /* ndef _DLL */ + #define _CRTIMP + #endif /* _DLL */ + + #endif /* _CRTIMP */ + +typedef const char *__exString; + +class _CRTIMP exception + { // base of all library exceptions +public: + exception(); + exception(const char *const&); + exception(const exception&); + exception& operator=(const exception&); + virtual ~exception(); + virtual const char *what() const; + +private: + const char *_m_what; + int _m_doFree; + }; + + _STD_BEGIN + +_USE_EX +typedef void (*_Prhand)(const exception&); +extern _CRTIMP2 _Prhand _Raise_handler; +_CRTIMP2 bool __cdecl uncaught_exception(); + + #else /* _HAS_EXCEPTIONS */ + // CLASS exception +class exception; +typedef void (*_Prhand)(const exception&); + +extern _CRTIMP2 _Prhand _Raise_handler; // pointer to raise handler + +_CRTIMP2 void __cdecl _Throw(const exception&); // throw the exception + +class _CRTIMP2 exception + { // base of all library exceptions +public: + static _Prhand _Set_raise_handler(_Prhand _Pnew) + { // register a handler for _Raise calls + const _Prhand _Pold = _Raise_handler; + _Raise_handler = _Pnew; + return (_Pold); + } + + explicit exception(const char *_Message = _MESG("unknown")) + _THROW0() + : _Ptr(_Message) + { // construct from message string + } + + exception(const exception& _Right) _THROW0() + : _Ptr(_Right._Ptr) + { // construct by copying _Right + } + + exception& operator=(const exception& _Right) _THROW0() + { // assign _Right + _Ptr = _Right._Ptr; + return (*this); + } + + virtual ~exception() + { // destroy the object + } + + virtual const char *what() const _THROW0() + { // return pointer to message string + return (_Ptr); + } + + void _Raise() const + { // raise the exception + if (_Raise_handler != 0) + (*_Raise_handler)(*this); // call raise handler if present + + _Doraise(); // call the protected virtual + _RAISE(*this); // raise this exception + } + +protected: + virtual void _Doraise() const + { // perform class-specific exception handling + } + +protected: + const char *_Ptr; // the message pointer + }; + + // TYPES +typedef void (__cdecl *terminate_handler)(); +typedef void (__cdecl *unexpected_handler)(); + + // DUMMY FUNCTION DECLARATIONS +inline terminate_handler __cdecl set_terminate(terminate_handler) + _THROW0() + { // register a terminate handler + return 0; + } + +inline unexpected_handler __cdecl set_unexpected(unexpected_handler) + _THROW0() + { // register an unexpected handler + return 0; + } + +inline void __cdecl terminate() + { // handle exception termination + } + +inline void __cdecl unexpected() + { // handle unexpected exception + } + +_CRTIMP2 bool __cdecl uncaught_exception(); // handle uncaught exception + #endif /* _HAS_EXCEPTIONS */ + + // CLASS bad_exception +class bad_exception : public exception + { // base of all bad exceptions +public: + bad_exception(const char *_Message = _MESG("bad exception")) + _THROW0() + : exception(_Message) + { // construct from message string + } + + virtual ~bad_exception() _THROW0() + { // destroy the object + } + + #if !_HAS_EXCEPTIONS +protected: + virtual void _Doraise() const + { // raise this exception + _RAISE(*this); + } + #endif /* _HAS_EXCEPTIONS */ + + }; +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _EXCEPTION_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/excpt.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/excpt.h new file mode 100644 index 00000000..a0314c48 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/excpt.h @@ -0,0 +1,159 @@ +/*** +*excpt.h - defines exception values, types and routines +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the definitions and prototypes for the compiler- +* dependent intrinsics, support functions and keywords which implement +* the structured exception handling extensions. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_EXCPT +#define _INC_EXCPT + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +/* + * Currently, all MS C compilers for Win32 platforms default to 8 byte + * alignment. + */ +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + + +/* + * Exception disposition return values. + */ +typedef enum _EXCEPTION_DISPOSITION { + ExceptionContinueExecution, + ExceptionContinueSearch, + ExceptionNestedException, + ExceptionCollidedUnwind +} EXCEPTION_DISPOSITION; + + +/* + * Prototype for SEH support function. + */ + +#ifdef _M_IX86 + +/* + * Declarations to keep MS C 8 (386/486) compiler happy + */ +struct _EXCEPTION_RECORD; +struct _CONTEXT; + +EXCEPTION_DISPOSITION __cdecl _except_handler ( + struct _EXCEPTION_RECORD *ExceptionRecord, + void * EstablisherFrame, + struct _CONTEXT *ContextRecord, + void * DispatcherContext + ); + +#elif defined(_M_MRX000) || defined(_M_ALPHA) || defined(_M_PPC) || defined(_M_IA64) + +/* + * Declarations to keep MIPS, ALPHA, and PPC compiler happy + */ +typedef struct _EXCEPTION_POINTERS *Exception_info_ptr; +struct _EXCEPTION_RECORD; +struct _CONTEXT; +struct _DISPATCHER_CONTEXT; + + +#if defined(_M_IA64) +_CRTIMP EXCEPTION_DISPOSITION __C_specific_handler ( + struct _EXCEPTION_RECORD *ExceptionRecord, + unsigned __int64 MemoryStackFp, + unsigned __int64 BackingStoreFp, + struct _CONTEXT *ContextRecord, + struct _DISPATCHER_CONTEXT *DispatcherContext, + unsigned __int64 GlobalPointer + ); +#else +_CRTIMP EXCEPTION_DISPOSITION __C_specific_handler ( + struct _EXCEPTION_RECORD *ExceptionRecord, + void *EstablisherFrame, + struct _CONTEXT *ContextRecord, + struct _DISPATCHER_CONTEXT *DispatcherContext + ); +#endif /* defined(_M_IA64) */ + +#endif + + +/* + * Keywords and intrinsics for SEH + */ + +#ifdef _MSC_VER + +#define GetExceptionCode _exception_code +#define exception_code _exception_code +#define GetExceptionInformation (struct _EXCEPTION_POINTERS *)_exception_info +#define exception_info (struct _EXCEPTION_POINTERS *)_exception_info +#define AbnormalTermination _abnormal_termination +#define abnormal_termination _abnormal_termination + +unsigned long __cdecl _exception_code(void); +void * __cdecl _exception_info(void); +int __cdecl _abnormal_termination(void); + +#endif + + +/* + * Legal values for expression in except(). + */ + +#define EXCEPTION_EXECUTE_HANDLER 1 +#define EXCEPTION_CONTINUE_SEARCH 0 +#define EXCEPTION_CONTINUE_EXECUTION -1 + + + +#ifdef __cplusplus +} +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_EXCPT */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/fcntl.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/fcntl.h new file mode 100644 index 00000000..dc180e8e --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/fcntl.h @@ -0,0 +1,82 @@ +/*** +*fcntl.h - file control options used by open() +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines constants for the file control options used +* by the _open() function. +* [System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_FCNTL +#define _INC_FCNTL + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#define _O_RDONLY 0x0000 /* open for reading only */ +#define _O_WRONLY 0x0001 /* open for writing only */ +#define _O_RDWR 0x0002 /* open for reading and writing */ +#define _O_APPEND 0x0008 /* writes done at eof */ + +#define _O_CREAT 0x0100 /* create and open file */ +#define _O_TRUNC 0x0200 /* open and truncate */ +#define _O_EXCL 0x0400 /* open only if file doesn't already exist */ + +/* O_TEXT files have sequences translated to on read()'s, +** and sequences translated to on write()'s +*/ + +#define _O_TEXT 0x4000 /* file mode is text (translated) */ +#define _O_BINARY 0x8000 /* file mode is binary (untranslated) */ + +/* macro to translate the C 2.0 name used to force binary mode for files */ + +#define _O_RAW _O_BINARY + +/* Open handle inherit bit */ + +#define _O_NOINHERIT 0x0080 /* child process doesn't inherit file */ + +/* Temporary file bit - file is deleted when last handle is closed */ + +#define _O_TEMPORARY 0x0040 /* temporary file bit */ + +/* temporary access hint */ + +#define _O_SHORT_LIVED 0x1000 /* temporary storage file, try not to flush */ + +/* sequential/random access hints */ + +#define _O_SEQUENTIAL 0x0020 /* file access is primarily sequential */ +#define _O_RANDOM 0x0010 /* file access is primarily random */ + +#if !__STDC__ || defined(_POSIX_) +/* Non-ANSI names for compatibility */ +#define O_RDONLY _O_RDONLY +#define O_WRONLY _O_WRONLY +#define O_RDWR _O_RDWR +#define O_APPEND _O_APPEND +#define O_CREAT _O_CREAT +#define O_TRUNC _O_TRUNC +#define O_EXCL _O_EXCL +#define O_TEXT _O_TEXT +#define O_BINARY _O_BINARY +#define O_RAW _O_BINARY +#define O_TEMPORARY _O_TEMPORARY +#define O_NOINHERIT _O_NOINHERIT +#define O_SEQUENTIAL _O_SEQUENTIAL +#define O_RANDOM _O_RANDOM +#endif /* __STDC__ */ + +#endif /* _INC_FCNTL */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/float.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/float.h new file mode 100644 index 00000000..6c82e1fd --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/float.h @@ -0,0 +1,302 @@ +/*** +*float.h - constants for floating point values +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains defines for a number of implementation dependent +* values which are commonly used by sophisticated numerical (floating +* point) programs. +* [ANSI] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_FLOAT +#define _INC_FLOAT + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + +#define DBL_DIG 15 /* # of decimal digits of precision */ +#define DBL_EPSILON 2.2204460492503131e-016 /* smallest such that 1.0+DBL_EPSILON != 1.0 */ +#define DBL_MANT_DIG 53 /* # of bits in mantissa */ +#define DBL_MAX 1.7976931348623158e+308 /* max value */ +#define DBL_MAX_10_EXP 308 /* max decimal exponent */ +#define DBL_MAX_EXP 1024 /* max binary exponent */ +#define DBL_MIN 2.2250738585072014e-308 /* min positive value */ +#define DBL_MIN_10_EXP (-307) /* min decimal exponent */ +#define DBL_MIN_EXP (-1021) /* min binary exponent */ +#define _DBL_RADIX 2 /* exponent radix */ +#define _DBL_ROUNDS 1 /* addition rounding: near */ + +#define FLT_DIG 6 /* # of decimal digits of precision */ +#define FLT_EPSILON 1.192092896e-07F /* smallest such that 1.0+FLT_EPSILON != 1.0 */ +#define FLT_GUARD 0 +#define FLT_MANT_DIG 24 /* # of bits in mantissa */ +#define FLT_MAX 3.402823466e+38F /* max value */ +#define FLT_MAX_10_EXP 38 /* max decimal exponent */ +#define FLT_MAX_EXP 128 /* max binary exponent */ +#define FLT_MIN 1.175494351e-38F /* min positive value */ +#define FLT_MIN_10_EXP (-37) /* min decimal exponent */ +#define FLT_MIN_EXP (-125) /* min binary exponent */ +#define FLT_NORMALIZE 0 +#define FLT_RADIX 2 /* exponent radix */ +#define FLT_ROUNDS 1 /* addition rounding: near */ + +#define LDBL_DIG DBL_DIG /* # of decimal digits of precision */ +#define LDBL_EPSILON DBL_EPSILON /* smallest such that 1.0+LDBL_EPSILON != 1.0 */ +#define LDBL_MANT_DIG DBL_MANT_DIG /* # of bits in mantissa */ +#define LDBL_MAX DBL_MAX /* max value */ +#define LDBL_MAX_10_EXP DBL_MAX_10_EXP /* max decimal exponent */ +#define LDBL_MAX_EXP DBL_MAX_EXP /* max binary exponent */ +#define LDBL_MIN DBL_MIN /* min positive value */ +#define LDBL_MIN_10_EXP DBL_MIN_10_EXP /* min decimal exponent */ +#define LDBL_MIN_EXP DBL_MIN_EXP /* min binary exponent */ +#define _LDBL_RADIX DBL_RADIX /* exponent radix */ +#define _LDBL_ROUNDS DBL_ROUNDS /* addition rounding: near */ + +/* Function prototypes */ + +_CRTIMP unsigned int __cdecl _clearfp(void); +_CRTIMP unsigned int __cdecl _controlfp(unsigned int,unsigned int); +_CRTIMP unsigned int __cdecl _statusfp(void); +_CRTIMP void __cdecl _fpreset(void); + +#define _clear87 _clearfp +#define _status87 _statusfp + +/* + * Abstract User Control Word Mask and bit definitions + */ +#define _MCW_EM 0x0008001f /* interrupt Exception Masks */ +#define _EM_INEXACT 0x00000001 /* inexact (precision) */ +#define _EM_UNDERFLOW 0x00000002 /* underflow */ +#define _EM_OVERFLOW 0x00000004 /* overflow */ +#define _EM_ZERODIVIDE 0x00000008 /* zero divide */ +#define _EM_INVALID 0x00000010 /* invalid */ + +#define _MCW_RC 0x00000300 /* Rounding Control */ +#define _RC_NEAR 0x00000000 /* near */ +#define _RC_DOWN 0x00000100 /* down */ +#define _RC_UP 0x00000200 /* up */ +#define _RC_CHOP 0x00000300 /* chop */ + +/* + * Abstract User Status Word bit definitions + */ + +#define _SW_INEXACT 0x00000001 /* inexact (precision) */ +#define _SW_UNDERFLOW 0x00000002 /* underflow */ +#define _SW_OVERFLOW 0x00000004 /* overflow */ +#define _SW_ZERODIVIDE 0x00000008 /* zero divide */ +#define _SW_INVALID 0x00000010 /* invalid */ + + +/* + * i386 specific definitions + */ +#define _MCW_PC 0x00030000 /* Precision Control */ +#define _PC_64 0x00000000 /* 64 bits */ +#define _PC_53 0x00010000 /* 53 bits */ +#define _PC_24 0x00020000 /* 24 bits */ + +#define _MCW_IC 0x00040000 /* Infinity Control */ +#define _IC_AFFINE 0x00040000 /* affine */ +#define _IC_PROJECTIVE 0x00000000 /* projective */ + +#define _EM_DENORMAL 0x00080000 /* denormal exception mask (_control87 only) */ + +#define _SW_DENORMAL 0x00080000 /* denormal status bit */ + + +_CRTIMP unsigned int __cdecl _control87(unsigned int,unsigned int); + + +/* + * RISC specific definitions + */ + +#define _MCW_DN 0x03000000 /* Denormal Control */ +#define _DN_SAVE 0x00000000 /* save denormal results and operands */ +#define _DN_FLUSH 0x01000000 /* flush denormal results and operands to zero */ +#define _DN_FLUSH_OPERANDS_SAVE_RESULTS 0x02000000 /* flush operands to zero and save results */ +#define _DN_SAVE_OPERANDS_FLUSH_RESULTS 0x03000000 /* save operands and flush results to zero */ + + +/* initial Control Word value */ + +#if defined(_M_IX86) + +#define _CW_DEFAULT ( _RC_NEAR + _PC_53 + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT + _EM_DENORMAL) + +#elif defined(_M_IA64) + +#define _CW_DEFAULT ( _RC_NEAR + _PC_64 + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT + _EM_DENORMAL) + +#elif defined(_M_MRX000) || defined (_M_ALPHA) || defined(_M_PPC) + +#define _CW_DEFAULT ( _RC_NEAR + _DN_FLUSH + _EM_INVALID + _EM_ZERODIVIDE + _EM_OVERFLOW + _EM_UNDERFLOW + _EM_INEXACT ) + +#endif + +/* Global variable holding floating point error code */ + +#if defined(_MT) || defined(_DLL) +_CRTIMP extern int * __cdecl __fpecode(void); +#define _fpecode (*__fpecode()) +#else /* ndef _MT && ndef _DLL */ +extern int _fpecode; +#endif /* _MT || _DLL */ + +/* invalid subconditions (_SW_INVALID also set) */ + +#define _SW_UNEMULATED 0x0040 /* unemulated instruction */ +#define _SW_SQRTNEG 0x0080 /* square root of a neg number */ +#define _SW_STACKOVERFLOW 0x0200 /* FP stack overflow */ +#define _SW_STACKUNDERFLOW 0x0400 /* FP stack underflow */ + +/* Floating point error signals and return codes */ + +#define _FPE_INVALID 0x81 +#define _FPE_DENORMAL 0x82 +#define _FPE_ZERODIVIDE 0x83 +#define _FPE_OVERFLOW 0x84 +#define _FPE_UNDERFLOW 0x85 +#define _FPE_INEXACT 0x86 + +#define _FPE_UNEMULATED 0x87 +#define _FPE_SQRTNEG 0x88 +#define _FPE_STACKOVERFLOW 0x8a +#define _FPE_STACKUNDERFLOW 0x8b + +#define _FPE_EXPLICITGEN 0x8c /* raise( SIGFPE ); */ + + +/* IEEE recommended functions */ + +_CRTIMP double __cdecl _copysign (double, double); +_CRTIMP double __cdecl _chgsign (double); +_CRTIMP double __cdecl _scalb(double, long); +_CRTIMP double __cdecl _logb(double); +_CRTIMP double __cdecl _nextafter(double, double); +_CRTIMP int __cdecl _finite(double); +_CRTIMP int __cdecl _isnan(double); +_CRTIMP int __cdecl _fpclass(double); + +#define _FPCLASS_SNAN 0x0001 /* signaling NaN */ +#define _FPCLASS_QNAN 0x0002 /* quiet NaN */ +#define _FPCLASS_NINF 0x0004 /* negative infinity */ +#define _FPCLASS_NN 0x0008 /* negative normal */ +#define _FPCLASS_ND 0x0010 /* negative denormal */ +#define _FPCLASS_NZ 0x0020 /* -0 */ +#define _FPCLASS_PZ 0x0040 /* +0 */ +#define _FPCLASS_PD 0x0080 /* positive denormal */ +#define _FPCLASS_PN 0x0100 /* positive normal */ +#define _FPCLASS_PINF 0x0200 /* positive infinity */ + + +#if !__STDC__ + +/* Non-ANSI names for compatibility */ + +#define clear87 _clear87 +#define status87 _status87 +#define control87 _control87 + +_CRTIMP void __cdecl fpreset(void); + +#define DBL_RADIX _DBL_RADIX +#define DBL_ROUNDS _DBL_ROUNDS + +#define LDBL_RADIX _LDBL_RADIX +#define LDBL_ROUNDS _LDBL_ROUNDS + +#define MCW_EM _MCW_EM +#define EM_INVALID _EM_INVALID +#define EM_DENORMAL _EM_DENORMAL +#define EM_ZERODIVIDE _EM_ZERODIVIDE +#define EM_OVERFLOW _EM_OVERFLOW +#define EM_UNDERFLOW _EM_UNDERFLOW +#define EM_INEXACT _EM_INEXACT + +#define MCW_IC _MCW_IC +#define IC_AFFINE _IC_AFFINE +#define IC_PROJECTIVE _IC_PROJECTIVE + +#define MCW_RC _MCW_RC +#define RC_CHOP _RC_CHOP +#define RC_UP _RC_UP +#define RC_DOWN _RC_DOWN +#define RC_NEAR _RC_NEAR + +#define MCW_PC _MCW_PC +#define PC_24 _PC_24 +#define PC_53 _PC_53 +#define PC_64 _PC_64 + +#define CW_DEFAULT _CW_DEFAULT + +#define SW_INVALID _SW_INVALID +#define SW_DENORMAL _SW_DENORMAL +#define SW_ZERODIVIDE _SW_ZERODIVIDE +#define SW_OVERFLOW _SW_OVERFLOW +#define SW_UNDERFLOW _SW_UNDERFLOW +#define SW_INEXACT _SW_INEXACT + +#define SW_UNEMULATED _SW_UNEMULATED +#define SW_SQRTNEG _SW_SQRTNEG +#define SW_STACKOVERFLOW _SW_STACKOVERFLOW +#define SW_STACKUNDERFLOW _SW_STACKUNDERFLOW + +#define FPE_INVALID _FPE_INVALID +#define FPE_DENORMAL _FPE_DENORMAL +#define FPE_ZERODIVIDE _FPE_ZERODIVIDE +#define FPE_OVERFLOW _FPE_OVERFLOW +#define FPE_UNDERFLOW _FPE_UNDERFLOW +#define FPE_INEXACT _FPE_INEXACT + +#define FPE_UNEMULATED _FPE_UNEMULATED +#define FPE_SQRTNEG _FPE_SQRTNEG +#define FPE_STACKOVERFLOW _FPE_STACKOVERFLOW +#define FPE_STACKUNDERFLOW _FPE_STACKUNDERFLOW + +#define FPE_EXPLICITGEN _FPE_EXPLICITGEN + +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#endif /* _INC_FLOAT */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/fpieee.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/fpieee.h new file mode 100644 index 00000000..961d02aa --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/fpieee.h @@ -0,0 +1,362 @@ +/*** +*fpieee.h - Definitions for floating point IEEE exception handling +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains constant and type definitions for handling +* floating point exceptions [ANSI/IEEE std. 754] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_FPIEEE +#define _INC_FPIEEE + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifndef __assembler /* MIPS ONLY: Protect from assembler */ + +#ifdef _MSC_VER +/* + * Currently, all MS C compilers for Win32 platforms default to 8 byte + * alignment. + */ +#pragma pack(push,8) + +/* Disable C4324: structure was padded due to __declspec(align()) */ +#pragma warning(push) +#pragma warning(disable: 4324) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + +/* + * Define floating point IEEE compare result values. + */ + +typedef enum { + _FpCompareEqual, + _FpCompareGreater, + _FpCompareLess, + _FpCompareUnordered +} _FPIEEE_COMPARE_RESULT; + +/* + * Define floating point format and result precision values. + */ + +typedef enum { + _FpFormatFp32, + _FpFormatFp64, + _FpFormatFp80, + _FpFormatFp128, + _FpFormatI16, + _FpFormatI32, + _FpFormatI64, + _FpFormatU16, + _FpFormatU32, + _FpFormatU64, + _FpFormatBcd80, + _FpFormatCompare, + _FpFormatString, +#if defined(_M_IA64) + _FpFormatFp82 +#endif +} _FPIEEE_FORMAT; + +/* + * Define operation code values. + */ + +typedef enum { + _FpCodeUnspecified, + _FpCodeAdd, + _FpCodeSubtract, + _FpCodeMultiply, + _FpCodeDivide, + _FpCodeSquareRoot, + _FpCodeRemainder, + _FpCodeCompare, + _FpCodeConvert, + _FpCodeRound, + _FpCodeTruncate, + _FpCodeFloor, + _FpCodeCeil, + _FpCodeAcos, + _FpCodeAsin, + _FpCodeAtan, + _FpCodeAtan2, + _FpCodeCabs, + _FpCodeCos, + _FpCodeCosh, + _FpCodeExp, + _FpCodeFabs, + _FpCodeFmod, + _FpCodeFrexp, + _FpCodeHypot, + _FpCodeLdexp, + _FpCodeLog, + _FpCodeLog10, + _FpCodeModf, + _FpCodePow, + _FpCodeSin, + _FpCodeSinh, + _FpCodeTan, + _FpCodeTanh, + _FpCodeY0, + _FpCodeY1, + _FpCodeYn, + _FpCodeLogb, + _FpCodeNextafter, + _FpCodeNegate, + _FpCodeFmin, /* XMMI */ + _FpCodeFmax, /* XMMI */ + _FpCodeConvertTrunc, /* XMMI */ + _XMMIAddps, /* XMMI */ + _XMMIAddss, + _XMMISubps, + _XMMISubss, + _XMMIMulps, + _XMMIMulss, + _XMMIDivps, + _XMMIDivss, + _XMMISqrtps, + _XMMISqrtss, + _XMMIMaxps, + _XMMIMaxss, + _XMMIMinps, + _XMMIMinss, + _XMMICmpps, + _XMMICmpss, + _XMMIComiss, + _XMMIUComiss, + _XMMICvtpi2ps, + _XMMICvtsi2ss, + _XMMICvtps2pi, + _XMMICvtss2si, + _XMMICvttps2pi, + _XMMICvttss2si, + _XMMI2Addpd, /* XMMI2 */ + _XMMI2Addsd, + _XMMI2Subpd, + _XMMI2Subsd, + _XMMI2Mulpd, + _XMMI2Mulsd, + _XMMI2Divpd, + _XMMI2Divsd, + _XMMI2Sqrtpd, + _XMMI2Sqrtsd, + _XMMI2Maxpd, + _XMMI2Maxsd, + _XMMI2Minpd, + _XMMI2Minsd, + _XMMI2Cmppd, + _XMMI2Cmpsd, + _XMMI2Comisd, + _XMMI2UComisd, + _XMMI2Cvtpd2pi, /* 66 2D */ + _XMMI2Cvtsd2si, /* F2 */ + _XMMI2Cvttpd2pi, /* 66 2C */ + _XMMI2Cvttsd2si, /* F2 */ + _XMMI2Cvtps2pd, /* 0F 5A */ + _XMMI2Cvtss2sd, /* F3 */ + _XMMI2Cvtpd2ps, /* 66 */ + _XMMI2Cvtsd2ss, /* F2 */ + _XMMI2Cvtdq2ps, /* 0F 5B */ + _XMMI2Cvttps2dq, /* F3 */ + _XMMI2Cvtps2dq, /* 66 */ + _XMMI2Cvttpd2dq, /* 66 0F E6 */ + _XMMI2Cvtpd2dq, /* F2 */ +#if defined(_M_IA64) + _FpCodeFma, + _FpCodeFmaSingle, + _FpCodeFmaDouble, + _FpCodeFms, + _FpCodeFmsSingle, + _FpCodeFmsDouble, + _FpCodeFnma, + _FpCodeFnmaSingle, + _FpCodeFnmaDouble, + _FpCodeFamin, + _FpCodeFamax +#endif +} _FP_OPERATION_CODE; + +#endif /* #ifndef __assembler */ + +/* + * Define rounding modes. + */ + +#ifndef __assembler /* MIPS ONLY: Protect from assembler */ + +typedef enum { + _FpRoundNearest, + _FpRoundMinusInfinity, + _FpRoundPlusInfinity, + _FpRoundChopped +} _FPIEEE_ROUNDING_MODE; + +typedef enum { + _FpPrecisionFull, + _FpPrecision53, + _FpPrecision24, +#if defined(_M_IA64) + _FpPrecision64, + _FpPrecision113 +#endif +} _FPIEEE_PRECISION; + + +/* + * Define floating point context record + */ + +typedef float _FP32; +typedef double _FP64; +typedef short _I16; +typedef int _I32; +typedef unsigned short _U16; +typedef unsigned int _U32; +typedef __int64 _Q64; + + +typedef struct +#if defined(_M_IA64) + __declspec(align(16)) +#endif +{ + unsigned short W[5]; +} _FP80; + +typedef struct __declspec(align(16)) +{ + unsigned long W[4]; +} _FP128; + +typedef struct __declspec(align(8)) +{ + unsigned long W[2]; +} _I64; + +typedef struct __declspec(align(8)) +{ + unsigned long W[2]; +} _U64; + +typedef struct +#if defined(_M_IA64) + __declspec(align(16)) +#endif +{ + unsigned short W[5]; +} _BCD80; + +typedef struct __declspec(align(16)) +{ + _Q64 W[2]; +} _FPQ64; + +typedef struct { + union { + _FP32 Fp32Value; + _FP64 Fp64Value; + _FP80 Fp80Value; + _FP128 Fp128Value; + _I16 I16Value; + _I32 I32Value; + _I64 I64Value; + _U16 U16Value; + _U32 U32Value; + _U64 U64Value; + _BCD80 Bcd80Value; + char *StringValue; + int CompareValue; + _Q64 Q64Value; + _FPQ64 Fpq64Value; + } Value; + + unsigned int OperandValid : 1; + unsigned int Format : 4; + +} _FPIEEE_VALUE; + + +typedef struct { + unsigned int Inexact : 1; + unsigned int Underflow : 1; + unsigned int Overflow : 1; + unsigned int ZeroDivide : 1; + unsigned int InvalidOperation : 1; +} _FPIEEE_EXCEPTION_FLAGS; + + +typedef struct { + unsigned int RoundingMode : 2; + unsigned int Precision : 3; + unsigned int Operation :12; + _FPIEEE_EXCEPTION_FLAGS Cause; + _FPIEEE_EXCEPTION_FLAGS Enable; + _FPIEEE_EXCEPTION_FLAGS Status; + _FPIEEE_VALUE Operand1; + _FPIEEE_VALUE Operand2; + _FPIEEE_VALUE Result; +#if defined(_M_IA64) + _FPIEEE_VALUE Operand3; +#endif +} _FPIEEE_RECORD, *_PFPIEEE_RECORD; + + +struct _EXCEPTION_POINTERS; + +/* + * Floating point IEEE exception filter routine + */ + +_CRTIMP int __cdecl _fpieee_flt( + unsigned long, + struct _EXCEPTION_POINTERS *, + int (__cdecl *)(_FPIEEE_RECORD *) + ); + +#ifdef __cplusplus +} +#endif + +#ifdef _MSC_VER +#pragma warning(pop) +#pragma pack(pop) +#endif /* _MSC_VER */ +#endif /* #ifndef __assembler */ + +#endif /* _INC_FPIEEE */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/fstream b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/fstream new file mode 100644 index 00000000..ce0c8d4d --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/fstream @@ -0,0 +1,743 @@ +// fstream standard header +#pragma once +#ifndef _FSTREAM_ +#define _FSTREAM_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) + + #pragma warning(disable: 4127) +_STD_BEGIN + +extern _CRTIMP2 _Filet *__cdecl _Fiopen(const char *, ios_base::openmode, int); + + // TEMPLATE FUNCTION _Fgetc +template inline + bool _Fgetc(_Elem& _Ch, _Filet *_File) + { // get an element from a C stream + return (fread(&_Ch, sizeof (_Elem), 1, _File) == 1); + } + +template<> inline bool _Fgetc(char& _Byte, _Filet *_File) + { // get a char element from a C stream + int _Meta; + if ((_Meta = fgetc(_File)) == EOF) + return (false); + else + { // got one, convert to char + _Byte = (char)_Meta; + return (true); + } + } + +template<> inline bool _Fgetc(wchar_t& _Wchar, _Filet *_File) + { // get a wchar_t element from a C stream + wint_t _Meta; + if ((_Meta = fgetwc(_File)) == WEOF) + return (false); + else + { // got one, convert to wchar_t + _Wchar = (wchar_t)_Meta; + return (true); + } + } + + + // TEMPLATE FUNCTION _Fputc +template inline + bool _Fputc(_Elem _Ch, _Filet *_File) + { // put an element to a C stream + return (fwrite(&_Ch, sizeof (_Elem), 1, _File) == 1); + } + +template<> inline bool _Fputc(char _Byte, _Filet *_File) + { // put a char element to a C stream + return (fputc(_Byte, _File) != EOF); + } + +template<> inline bool _Fputc(wchar_t _Wchar, _Filet *_File) + { // put a wchar_t element to a C stream + return (fputwc(_Wchar, _File) != WEOF); + } + + + // TEMPLATE FUNCTION _Ungetc +template inline + bool _Ungetc(const _Elem& _Ch, _Filet *_File) + { // put back an arbitrary element to a C stream (always fail) + return (false); + } + +template<> inline bool _Ungetc(const char& _Byte, _Filet *_File) + { // put back a char element to a C stream + return (ungetc((unsigned char)_Byte, _File) != EOF); + } + +template<> inline bool _Ungetc(const signed char& _Byte, _Filet *_File) + { // put back a signed char element to a C stream + return (ungetc((unsigned char)_Byte, _File) != EOF); + } + +template<> inline bool _Ungetc(const unsigned char& _Byte, _Filet *_File) + { // put back an unsigned char element to a C stream + return (ungetc(_Byte, _File) != EOF); + } + +template<> inline bool _Ungetc(const wchar_t& _Wchar, _Filet *_File) + { // put back a wchar_t element to a C stream + return (ungetwc(_Wchar, _File) != WEOF); + } + + + // TEMPLATE CLASS basic_filebuf +template + class basic_filebuf + : public basic_streambuf<_Elem, _Traits> + { // stream buffer associated with a C stream +public: + typedef basic_filebuf<_Elem, _Traits> _Myt; + typedef basic_streambuf<_Elem, _Traits> _Mysb; + typedef codecvt<_Elem, char, typename _Traits::state_type> _Cvt; + + virtual ~basic_filebuf() + { // destroy the object + if (_Closef) + close(); + _DELETE_CRT(_Mystr); + } + + basic_filebuf(_Filet *_File = 0) + : _Mysb(), _Mystr(0) + { // construct from pointer to C stream + _Init(_File, _Newfl); + } + + typedef _Elem char_type; + typedef _Traits traits_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + + basic_filebuf(_Uninitialized) + : _Mysb(_Noinit) + { // construct uninitialized + } + + enum _Initfl + { // reasons for a call to _Init + _Newfl, _Openfl, _Closefl}; + + bool is_open() const + { // test if C stream has been opened + return (_Myfile != 0); + } + + _Myt *open(const char *_Filename, + ios_base::openmode _Mode, + int _Prot = (int)ios_base::_Openprot) + { // open a C stream with specified mode + _Filet *_File; + if (_Myfile != 0 || (_File = _Fiopen(_Filename, _Mode, _Prot)) == 0) + return (0); // open failed + + _Init(_File, _Openfl); + _Initcvt((_Cvt *)&_USE(_Mysb::getloc(), _Cvt)); + return (this); // open succeeded + } + + _Myt *open(const char *_Filename, ios_base::open_mode _Mode) + { // open a C stream with specified mode (old style) + return (open(_Filename, (ios_base::openmode)_Mode)); + } + + _Myt *close() + { // close the C stream + if (_Myfile != 0 && _Endwrite() && fclose(_Myfile) == 0) + { // close succeeded, tidy up + _Init(0, _Closefl); + return (this); + } + else + return (0); + } + +protected: + virtual int_type overflow(int_type _Meta = _Traits::eof()) + { // put an element to stream + if (_Traits::eq_int_type(_Traits::eof(), _Meta)) + return (_Traits::not_eof(_Meta)); // EOF, return success code + else if (_Mysb::pptr() != 0 + && _Mysb::pptr() < _Mysb::epptr()) + { // room in buffer, store it + *_Mysb::_Pninc() = _Traits::to_char_type(_Meta); + return (_Meta); + } + else if (_Myfile == 0) + return (_Traits::eof()); // no open C stream, fail + else if (_Pcvt == 0) + return (_Fputc(_Traits::to_char_type(_Meta), _Myfile) + ? _Meta : _Traits::eof()); // no codecvt facet, put as is + else + { // put using codecvt facet + const int _STRING_INC = 8; + const _Elem _Ch = _Traits::to_char_type(_Meta); + const _Elem *_Source; + char *_Dest; + + _Mystr->erase(); + string _Str(_STRING_INC, '\0'); + for (; ; ) + switch (_Pcvt->out(_State, + &_Ch, &_Ch + 1, _Source, + &*_Str.begin(), &*_Str.begin() + _Str.size(), _Dest)) + { // test result of converting one element + case codecvt_base::partial: + case codecvt_base::ok: + { // converted something, try to put it out + size_t _Count = _Dest - &*_Str.begin(); + if (0 < _Count && _Count != + fwrite(&*_Str.begin(), 1, _Count, _Myfile)) + return (_Traits::eof()); // write failed + + _Wrotesome = true; // write succeeded + if (_Source != &_Ch) + return (_Meta); // converted whole element + if (_Count == 0) + _Str.append(_STRING_INC, '\0'); // try with more space + break; + } + + case codecvt_base::noconv: + return (_Fputc(_Ch, _Myfile) ? _Meta + : _Traits::eof()); // no conversion, put as is + + default: + return (_Traits::eof()); // conversion failed + } + } + } + + virtual int_type pbackfail(int_type _Meta = _Traits::eof()) + { // put an element back to stream + if (_Mysb::gptr() != 0 + && _Mysb::eback() < _Mysb::gptr() + && (_Traits::eq_int_type(_Traits::eof(), _Meta) + || _Traits::eq_int_type(_Traits::to_int_type(_Mysb::gptr()[-1]), + _Meta))) + { // just back up position + _Mysb::_Gndec(); + return (_Traits::not_eof(_Meta)); + } + else if (_Myfile == 0 || _Traits::eq_int_type(_Traits::eof(), _Meta)) + return (_Traits::eof()); // no open C stream or EOF, fail + else if (_Pcvt == 0 && _Ungetc(_Traits::to_char_type(_Meta), _Myfile)) + return (_Meta); // no facet and unget succeeded, return + else if (_Mysb::gptr() != &_Mychar) + { // putback to _Mychar + _Mychar = _Traits::to_char_type(_Meta); + _Mysb::setg(&_Mychar, &_Mychar, &_Mychar + 1); + return (_Meta); + } + else + return (_Traits::eof()); // nowhere to put back + } + + virtual int_type underflow() + { // get an element from stream, but don't point past it + int_type _Meta; + if (_Mysb::gptr() != 0 + && _Mysb::gptr() < _Mysb::egptr()) + return (_Traits::to_int_type(*_Mysb::gptr())); // return buffered + else if (_Traits::eq_int_type(_Traits::eof(), _Meta = uflow())) + return (_Meta); // uflow failed, return EOF + else + { // get a char, don't point past it + pbackfail(_Meta); + return (_Meta); + } + } + + virtual int_type uflow() + { // get an element from stream, point past it + if (_Mysb::gptr() != 0 + && _Mysb::gptr() < _Mysb::egptr()) + return (_Traits::to_int_type( + *_Mysb::_Gninc())); // return buffered + else if (_Myfile == 0) + return (_Traits::eof()); // no open C stream, fail + else if (_Pcvt == 0) + { // no codecvt facet, just get it + _Elem _Ch = 0; + return (_Fgetc(_Ch, _Myfile) ? _Traits::to_int_type(_Ch) + : _Traits::eof()); + } + else + for (_State0 = _State, _Mystr->erase(); ; ) + { // get using codecvt facet + _Elem _Ch, *_Dest; + const char *_Source; + ptrdiff_t _Nleft; + int _Meta = fgetc(_Myfile); + + if (_Meta == EOF) + return (_Traits::eof()); // partial char? + + _Mystr->append(1, (char)_Meta); // append byte and convert + switch (_Pcvt->in(_State, + &*_Mystr->begin(), &*_Mystr->begin() + _Mystr->size(), + _Source, &_Ch, &_Ch + 1, _Dest)) + { // test result of converting one element + case codecvt_base::partial: + _Mystr->erase((size_t)0, // partial, not done yet + (size_t)(_Source - &*_Mystr->begin())); + break; + + case codecvt_base::noconv: + if (_Mystr->size() < sizeof (_Elem)) + break; // no conversion, but need more chars + + memcpy(&_Ch, &*_Mystr->begin(), + sizeof (_Elem)); // copy raw bytes to element + return (_Traits::to_int_type(_Ch)); // return result + + case codecvt_base::ok: + for (_Nleft = &*_Mystr->begin() + _Mystr->size() - _Source; + 0 < _Nleft; ) + ungetc(_Source[--_Nleft], _Myfile); + return (_Traits::to_int_type(_Ch)); // return result + + default: + return (_Traits::eof()); // conversion failed + } + } + } + + virtual pos_type seekoff(off_type _Off, + ios_base::seekdir _Way, + ios_base::openmode = + (ios_base::openmode)(ios_base::in | ios_base::out)) + { // change position by _Off + fpos_t _Fileposition; + + if (_Mysb::egptr() <= _Mysb::gptr() // nothing buffered + || _Mysb::gptr() != &_Mychar // nothing putback + || _Way != ios_base::cur) // not a relative seek + ; // don't have to worry about putback character + else if (_Pcvt == 0) + _Off -= (off_type)sizeof (_Elem); // back up over _Elem bytes + else + { // back up over converted bytes + for (ptrdiff_t _Nleft = _Mystr->size(); 0 < _Nleft; ) + ungetc(_Mystr->operator[](--_Nleft), _Myfile); + _Mystr->erase(); + _State = _State0; + } + if (_Myfile == 0 || !_Endwrite() + || (_Off != 0 || _Way != ios_base::cur) + && fseek(_Myfile, (long)_Off, _Way) != 0 + || fgetpos(_Myfile, &_Fileposition) != 0) + return (pos_type(_BADOFF)); // report failure + if (_Mysb::gptr() == &_Mychar) + _Mysb::setg(&_Mychar, &_Mychar, &_Mychar); // discard any putback + return (_POS_TYPE_FROM_STATE(pos_type, _State, + _Fileposition)); // return new position + } + + virtual pos_type seekpos(pos_type _Pos, + ios_base::openmode = + (ios_base::openmode)(ios_base::in | ios_base::out)) + { // change position to _Pos + fpos_t _Fileposition = _POS_TYPE_TO_FPOS_T(_Pos); + off_type _Off = (off_type)_Pos - _FPOSOFF(_Fileposition); + + if (_Myfile == 0 || !_Endwrite() + || fsetpos(_Myfile, &_Fileposition) != 0 + || _Off != 0 && fseek(_Myfile, (long)_Off, SEEK_CUR) != 0 + || fgetpos(_Myfile, &_Fileposition) != 0) + return (pos_type(_BADOFF)); // report failure + if (_Mystr != 0) + { // restore state + _State = _POS_TYPE_TO_STATE(_Pos); + _Mystr->erase(); + } + if (_Mysb::gptr() == &_Mychar) + _Mysb::setg(&_Mychar, &_Mychar, &_Mychar); // discard any putback + return (_POS_TYPE_FROM_STATE(pos_type, _State, + _Fileposition)); // return new position + } + + virtual _Mysb *setbuf(_Elem *_Buffer, streamsize _Count) + { // offer _Buffer to C stream + return (_Myfile == 0 || setvbuf(_Myfile, (char *)_Buffer, + _Buffer == 0 && _Count == 0 ? _IONBF : _IOFBF, + _Count * sizeof (_Elem)) != 0 ? 0 : this); + } + + virtual int sync() + { // synchronize C stream with external file + return (_Myfile == 0 + || _Traits::eq_int_type(_Traits::eof(), overflow()) + || 0 <= fflush(_Myfile) ? 0 : -1); + } + + virtual void imbue(const locale& _Loc) + { // set locale to argument (capture nontrivial codecvt facet) + _Initcvt((_Cvt *)&_USE(_Loc, _Cvt)); + } + + void _Init(_Filet *_File, _Initfl _Which) + { // initialize to C stream _File after {new, open, close} + static typename _Traits::state_type _Stinit; // initial state + _Closef = _Which == _Openfl; + _Wrotesome = false; + + _Mysb::_Init(); // initialize stream buffer base object + + #ifndef _IORCNT + #define _IORCNT _IOCNT /* read and write counts are the same */ + #define _IOWCNT _IOCNT + #endif /* _IORCNT */ + + if (_File != 0 && sizeof (_Elem) == 1) + { // point inside C stream with [first, first + count) buffer + _Elem **_Pb = (_Elem **)&_File->_IOBASE; + _Elem **_Pn = (_Elem **)&_File->_IOPTR; + int *_Nr = (int *)&_File->_IORCNT; + int *_Nw = (int *)&_File->_IOWCNT; + _Mysb::_Init(_Pb, _Pn, _Nr, _Pb, _Pn, _Nw); + } + _Myfile = _File; + _State = _Stinit; + _State0 = _Stinit; + _Pcvt = 0; // pointer to codecvt facet + } + + bool _Endwrite() + { // put shift to initial conversion state, as needed + if (_Pcvt == 0 || !_Wrotesome) + return (true); + else + { // may have to put + const int _STRING_INC = 8; + char *_Dest; + overflow(); + + string _Str(_STRING_INC, '\0'); + for (; ; ) + switch (_Pcvt->unshift(_State, + &*_Str.begin(), &*_Str.begin() + _Str.size(), _Dest)) + { // test result of homing conversion + case codecvt_base::ok: + _Wrotesome = false; // homed successfully + + case codecvt_base::partial: // can fall through + { // put any generated bytes + size_t _Count = _Dest - &*_Str.begin(); + if (0 < _Count && _Count != + fwrite(&*_Str.begin(), _Count, 1, _Myfile)) + return (false); // write failed + if (!_Wrotesome) + return (true); + _Str.append(_STRING_INC, '\0'); // try some more + break; + } + + case codecvt_base::noconv: + return (true); // nothing to do + + default: + return (false); // conversion failed + } + } + } + + void _Initcvt(_Cvt *_Newpcvt) + { // initialize codecvt pointer + if (_Newpcvt->always_noconv()) + _Pcvt = 0; // nothing to do + else + { // set up for nontrivial codecvt facet + _Pcvt = _Newpcvt; + _Mysb::_Init(); // reset any buffering + if (_Mystr == 0) + _Mystr = _NEW_CRT _STRING_CRT; // buy conversion buffer + } + } + +private: + _Cvt *_Pcvt; // pointer to codecvt facet (may be null) + typename _Traits::state_type _State0; // rollback for bad conversion + _Elem _Mychar; // putback character, when _Ungetc fails + _STRING_CRT *_Mystr; // string to hold partial conversion sequences + bool _Wrotesome; // true if homing sequence may be needed + typename _Traits::state_type _State; // current conversion state + bool _Closef; // true if C stream must be closed + _Filet *_Myfile; // pointer to C stream + }; + + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 basic_filebuf >; +template class _CRTIMP2 basic_filebuf >; + + + + #endif /* _DLL_CPPLIB */ + + // TEMPLATE CLASS basic_ifstream +template + class basic_ifstream + : public basic_istream<_Elem, _Traits> + { // input stream associated with a C stream +public: + typedef basic_ifstream<_Elem, _Traits> _Myt; + typedef basic_filebuf<_Elem, _Traits> _Myfb; + typedef basic_ios<_Elem, _Traits> _Myios; + + basic_ifstream() + : basic_istream<_Elem, _Traits>(&_Filebuffer) + { // construct unopened + } + + explicit basic_ifstream(const char *_Filename, + ios_base::openmode _Mode = ios_base::in, + int _Prot = (int)ios_base::_Openprot) + : basic_istream<_Elem, _Traits>(&_Filebuffer) + { // construct with named file and specified mode + if (_Filebuffer.open(_Filename, _Mode | ios_base::in, _Prot) == 0) + _Myios::setstate(ios_base::failbit); + } + + explicit basic_ifstream(_Filet *_File) + : basic_istream<_Elem, _Traits>(&_Filebuffer), + _Filebuffer(_File) + { // construct with specified C stream + } + virtual ~basic_ifstream() + { // destroy the object + } + + _Myfb *rdbuf() const + { // return pointer to file buffer + return ((_Myfb *)&_Filebuffer); + } + + bool is_open() const + { // test if C stream has been opened + return (_Filebuffer.is_open()); + } + + void open(const char *_Filename, + ios_base::openmode _Mode = ios_base::in, + int _Prot = (int)ios_base::_Openprot) + { // open a C stream with specified mode + if (_Filebuffer.open(_Filename, _Mode | ios_base::in, _Prot) == 0) + _Myios::setstate(ios_base::failbit); + } + + void open(const char *_Filename, ios_base::open_mode _Mode) + { // open named file with specified mode (old style) + open(_Filename, (ios_base::openmode)_Mode); + } + + void close() + { // close the C stream + if (_Filebuffer.close() == 0) + _Myios::setstate(ios_base::failbit); + } + +private: + _Myfb _Filebuffer; // the file buffer + }; + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 basic_ifstream >; +template class _CRTIMP2 basic_ifstream >; + + + + #endif /* _DLL_CPPLIB */ + + // TEMPLATE CLASS basic_ofstream +template + class basic_ofstream + : public basic_ostream<_Elem, _Traits> + { // output stream associated with a C stream +public: + typedef basic_ofstream<_Elem, _Traits> _Myt; + typedef basic_filebuf<_Elem, _Traits> _Myfb; + typedef basic_ios<_Elem, _Traits> _Myios; + + basic_ofstream() + : basic_ostream<_Elem, _Traits>(&_Filebuffer) + { // construct unopened + } + + explicit basic_ofstream(const char *_Filename, + ios_base::openmode _Mode = ios_base::out, + int _Prot = (int)ios_base::_Openprot) + : basic_ostream<_Elem, _Traits>(&_Filebuffer) + { // construct with named file and specified mode + if (_Filebuffer.open(_Filename, _Mode | ios_base::out, _Prot) == 0) + _Myios::setstate(ios_base::failbit); + } + + explicit basic_ofstream(_Filet *_File) + : basic_ostream<_Elem, _Traits>(&_Filebuffer), + _Filebuffer(_File) + { // construct with specified C stream + } + + virtual ~basic_ofstream() + { // destroy the object + } + + _Myfb *rdbuf() const + { // return pointer to file buffer + return ((_Myfb *)&_Filebuffer); + } + + bool is_open() const + { // test if C stream has been opened + return (_Filebuffer.is_open()); + } + + void open(const char *_Filename, + ios_base::openmode _Mode = ios_base::out, + int _Prot = (int)ios_base::_Openprot) + { // open a C stream with specified mode + if (_Filebuffer.open(_Filename, _Mode | ios_base::out, _Prot) == 0) + _Myios::setstate(ios_base::failbit); + } + + void open(const char *_Filename, ios_base::open_mode _Mode) + { // open a C stream with specified mode (old style) + open(_Filename, (ios_base::openmode)_Mode); + } + + void close() + { // close the C stream + if (_Filebuffer.close() == 0) + _Myios::setstate(ios_base::failbit); + } + +private: + _Myfb _Filebuffer; // the file buffer + }; + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 basic_ofstream >; +template class _CRTIMP2 basic_ofstream >; + + + + #endif /* _DLL_CPPLIB */ + + // TEMPLATE CLASS basic_fstream +template + class basic_fstream + : public basic_iostream<_Elem, _Traits> + { // input/output stream associated with a C stream +public: + typedef basic_fstream<_Elem, _Traits> _Myt; + typedef basic_ios<_Elem, _Traits> _Myios; + typedef _Elem char_type; + typedef _Traits traits_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + + basic_fstream() + : basic_iostream<_Elem, _Traits>(&_Filebuffer) + { // construct unopened + } + + explicit basic_fstream(const char *_Filename, + ios_base::openmode _Mode = ios_base::in | ios_base::out, + int _Prot = (int)ios_base::_Openprot) + : basic_iostream<_Elem, _Traits>(&_Filebuffer) + { // construct with named file and specified mode + if (_Filebuffer.open(_Filename, _Mode, _Prot) == 0) + _Myios::setstate(ios_base::failbit); + } + + explicit basic_fstream(_Filet *_File) + : basic_iostream<_Elem, _Traits>(&_Filebuffer), + _Filebuffer(_File) + { // construct with specified C stream + } + + virtual ~basic_fstream() + { // destroy the object + } + + basic_filebuf<_Elem, _Traits> *rdbuf() const + { // return pointer to file buffer + return ((basic_filebuf<_Elem, _Traits> *)&_Filebuffer); + } + + bool is_open() const + { // test if C stream has been opened + return (_Filebuffer.is_open()); + } + + void open(const char *_Filename, + ios_base::openmode _Mode = ios_base::in | ios_base::out, + int _Prot = (int)ios_base::_Openprot) + { // open a C stream with specified mode + if (_Filebuffer.open(_Filename, _Mode, _Prot) == 0) + _Myios::setstate(ios_base::failbit); + } + + void open(const char *_Filename, ios_base::open_mode _Mode) + { // open a C stream with specified mode (old style) + open(_Filename, (ios_base::openmode)_Mode); + } + + void close() + { // close the C stream + if (_Filebuffer.close() == 0) + _Myios::setstate(ios_base::failbit); + } + +private: + basic_filebuf<_Elem, _Traits> _Filebuffer; // the file buffer + }; + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 basic_fstream >; +template class _CRTIMP2 basic_fstream >; + + + + #endif /* _DLL_CPPLIB */ +_STD_END + + #pragma warning(default: 4127) + +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _FSTREAM_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/functional b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/functional new file mode 100644 index 00000000..20f4de07 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/functional @@ -0,0 +1,685 @@ +// functional standard header +#pragma once +#ifndef _FUNCTIONAL_ +#define _FUNCTIONAL_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) + + #pragma warning(disable: 4244) +_STD_BEGIN + + // TEMPLATE STRUCT unary_function +template + struct unary_function + { // base class for unary functions + typedef _Arg argument_type; + typedef _Result result_type; + }; + + // TEMPLATE STRUCT binary_function +template + struct binary_function + { // base class for binary functions + typedef _Arg1 first_argument_type; + typedef _Arg2 second_argument_type; + typedef _Result result_type; + }; + + // TEMPLATE STRUCT plus +template + struct plus + : public binary_function<_Ty, _Ty, _Ty> + { // functor for operator+ + _Ty operator()(const _Ty& _Left, const _Ty& _Right) const + { // apply operator+ to operands + return (_Left + _Right); + } + }; + + // TEMPLATE STRUCT minus +template + struct minus + : public binary_function<_Ty, _Ty, _Ty> + { // functor for operator- + _Ty operator()(const _Ty& _Left, const _Ty& _Right) const + { // apply operator- to operands + return (_Left - _Right); + } + }; + + // TEMPLATE STRUCT multiplies +template + struct multiplies + : public binary_function<_Ty, _Ty, _Ty> + { // functor for operator* + _Ty operator()(const _Ty& _Left, const _Ty& _Right) const + { // apply operator* to operands + return (_Left * _Right); + } + }; + + // TEMPLATE STRUCT divides +template + struct divides + : public binary_function<_Ty, _Ty, _Ty> + { // functor for operator/ + _Ty operator()(const _Ty& _Left, const _Ty& _Right) const + { // apply operator/ to operands + return (_Left / _Right); + } + }; + + // TEMPLATE STRUCT modulus +template + struct modulus + : public binary_function<_Ty, _Ty, _Ty> + { // functor for operator% + _Ty operator()(const _Ty& _Left, const _Ty& _Right) const + { // apply operator% to operands + return (_Left % _Right); + } + }; + + // TEMPLATE STRUCT negate +template + struct negate + : public unary_function<_Ty, _Ty> + { // functor for unary operator- + _Ty operator()(const _Ty& _Left) const + { // apply operator- to operand + return (-_Left); + } + }; + + // TEMPLATE STRUCT equal_to +template + struct equal_to + : public binary_function<_Ty, _Ty, bool> + { // functor for operator== + bool operator()(const _Ty& _Left, const _Ty& _Right) const + { // apply operator== to operands + return (_Left == _Right); + } + }; + + // TEMPLATE STRUCT not_equal_to +template + struct not_equal_to + : public binary_function<_Ty, _Ty, bool> + { // functor for operator!= + bool operator()(const _Ty& _Left, const _Ty& _Right) const + { // apply operator= to operands + return (_Left != _Right); + } + }; + + // TEMPLATE STRUCT greater +template + struct greater + : public binary_function<_Ty, _Ty, bool> + { // functor for operator> + bool operator()(const _Ty& _Left, const _Ty& _Right) const + { // apply operator> to operands + return (_Left > _Right); + } + }; + + // TEMPLATE STRUCT less +template + struct less + : public binary_function<_Ty, _Ty, bool> + { // functor for operator< + bool operator()(const _Ty& _Left, const _Ty& _Right) const + { // apply operator< to operands + return (_Left < _Right); + } + }; + + // TEMPLATE STRUCT greater_equal +template + struct greater_equal + : public binary_function<_Ty, _Ty, bool> + { // functor for operator>= + bool operator()(const _Ty& _Left, const _Ty& _Right) const + { // apply operator>= to operands + return (_Left >= _Right); + } + }; + + // TEMPLATE STRUCT less_equal +template + struct less_equal + : public binary_function<_Ty, _Ty, bool> + { // functor for operator<= + bool operator()(const _Ty& _Left, const _Ty& _Right) const + { // apply operator<= to operands + return (_Left <= _Right); + } + }; + + // TEMPLATE STRUCT logical_and +template + struct logical_and + : public binary_function<_Ty, _Ty, bool> + { // functor for operator&& + bool operator()(const _Ty& _Left, const _Ty& _Right) const + { // apply operator&& to operands + return (_Left && _Right); + } + }; + + // TEMPLATE STRUCT logical_or +template + struct logical_or + : public binary_function<_Ty, _Ty, bool> + { // functor for operator|| + bool operator()(const _Ty& _Left, const _Ty& _Right) const + { // apply operator|| to operands + return (_Left || _Right); + } + }; + + // TEMPLATE STRUCT logical_not +template + struct logical_not + : public unary_function<_Ty, bool> + { // functor for unary operator! + bool operator()(const _Ty& _Left) const + { // apply operator! to operand + return (!_Left); + } + }; + + // TEMPLATE CLASS unary_negate +template + class unary_negate + : public unary_function + { // functor adapter !_Func(left) +public: + explicit unary_negate(const _Fn1& _Func) + : _Functor(_Func) + { // construct from functor + } + + bool operator()(const typename _Fn1::argument_type& _Left) const + { // apply functor to operand + return (!_Functor(_Left)); + } + +protected: + _Fn1 _Functor; // the functor to apply + }; + + // TEMPLATE FUNCTION not1 +template inline + unary_negate<_Fn1> not1(const _Fn1& _Func) + { // return a unary_negate functor adapter + return (std::unary_negate<_Fn1>(_Func)); + } + + // TEMPLATE CLASS binary_negate +template + class binary_negate + : public binary_function + { // functor adapter !_Func(left, right) +public: + explicit binary_negate(const _Fn2& _Func) + : _Functor(_Func) + { // construct from functor + } + + bool operator()(const typename _Fn2::first_argument_type& _Left, + const typename _Fn2::second_argument_type& _Right) const + { // apply functor to operands + return (!_Functor(_Left, _Right)); + } + +protected: + _Fn2 _Functor; // the functor to apply + }; + + // TEMPLATE FUNCTION not2 +template inline + binary_negate<_Fn2> not2(const _Fn2& _Func) + { // return a binary_negate functor adapter + return (std::binary_negate<_Fn2>(_Func)); + } + + // TEMPLATE CLASS binder1st +template + class binder1st + : public unary_function + { // functor adapter _Func(stored, right) +public: + typedef unary_function _Base; + typedef typename _Base::argument_type argument_type; + typedef typename _Base::result_type result_type; + + binder1st(const _Fn2& _Func, + const typename _Fn2::first_argument_type& _Left) + : op(_Func), value(_Left) + { // construct from functor and left operand + } + + result_type operator()(const argument_type& _Right) const + { // apply functor to operands + return (op(value, _Right)); + } + + result_type operator()(argument_type& _Right) const + { // apply functor to operands + return (op(value, _Right)); + } + +protected: + _Fn2 op; // the functor to apply + typename _Fn2::first_argument_type value; // the left operand + }; + + // TEMPLATE FUNCTION bind1st +template inline + binder1st<_Fn2> bind1st(const _Fn2& _Func, const _Ty& _Left) + { // return a binder1st functor adapter + typename _Fn2::first_argument_type _Val(_Left); + return (std::binder1st<_Fn2>(_Func, _Val)); + } + + // TEMPLATE CLASS binder2nd +template + class binder2nd + : public unary_function + { // functor adapter _Func(left, stored) +public: + typedef unary_function _Base; + typedef typename _Base::argument_type argument_type; + typedef typename _Base::result_type result_type; + + binder2nd(const _Fn2& _Func, + const typename _Fn2::second_argument_type& _Right) + : op(_Func), value(_Right) + { // construct from functor and right operand + } + + result_type operator()(const argument_type& _Left) const + { // apply functor to operands + return (op(_Left, value)); + } + + result_type operator()(argument_type& _Left) const + { // apply functor to operands + return (op(_Left, value)); + } + +protected: + _Fn2 op; // the functor to apply + typename _Fn2::second_argument_type value; // the right operand + }; + + // TEMPLATE FUNCTION bind2nd +template inline + binder2nd<_Fn2> bind2nd(const _Fn2& _Func, const _Ty& _Right) + { // return a binder2nd functor adapter + typename _Fn2::second_argument_type _Val(_Right); + return (std::binder2nd<_Fn2>(_Func, _Val)); + } + + // TEMPLATE CLASS pointer_to_unary_function +template + class pointer_to_unary_function + : public unary_function<_Arg, _Result> + { // functor adapter (*pfunc)(left) +public: + explicit pointer_to_unary_function(_Result (__cdecl *_Left)(_Arg)) + : _Pfun(_Left) + { // construct from pointer + } + + _Result operator()(_Arg _Left) const + { // call function with operand + return (_Pfun(_Left)); + } + +protected: + _Result (__cdecl *_Pfun)(_Arg); // the function pointer + }; + + // TEMPLATE CLASS pointer_to_binary_function +template + class pointer_to_binary_function + : public binary_function<_Arg1, _Arg2, _Result> + { // functor adapter (*pfunc)(left, right) +public: + explicit pointer_to_binary_function( + _Result (__cdecl *_Left)(_Arg1, _Arg2)) + : _Pfun(_Left) + { // construct from pointer + } + + _Result operator()(_Arg1 _Left, _Arg2 _Right) const + { // call function with operands + return (_Pfun(_Left, _Right)); + } + +protected: + _Result (__cdecl *_Pfun)(_Arg1, _Arg2); // the function pointer + }; + + // TEMPLATE FUNCTION ptr_fun +template inline + pointer_to_unary_function<_Arg, _Result> + ptr_fun(_Result (__cdecl *_Left)(_Arg)) + { // return pointer_to_unary_function functor adapter + return (std::pointer_to_unary_function<_Arg, _Result>(_Left)); + } + +template inline + pointer_to_binary_function<_Arg1, _Arg2, _Result> + ptr_fun(_Result (__cdecl *_Left)(_Arg1, _Arg2)) + { // return pointer_to_binary_function functor adapter + return (std::pointer_to_binary_function<_Arg1, _Arg2, _Result>(_Left)); + } + + // TEMPLATE CLASS mem_fun_t +template + class mem_fun_t + : public unary_function<_Ty *, _Result> + { // functor adapter (*p->*pfunc)(), non-const *pfunc +public: + explicit mem_fun_t(_Result (_Ty::*_Pm)()) + : _Pmemfun(_Pm) + { // construct from pointer + } + + _Result operator()(_Ty *_Pleft) const + { // call function + return ((_Pleft->*_Pmemfun)()); + } + +private: + _Result (_Ty::*_Pmemfun)(); // the member function pointer + }; + + // TEMPLATE CLASS mem_fun1_t +template + class mem_fun1_t + : public binary_function<_Ty *, _Arg, _Result> + { // functor adapter (*p->*pfunc)(val), non-const *pfunc +public: + explicit mem_fun1_t(_Result (_Ty::*_Pm)(_Arg)) + : _Pmemfun(_Pm) + { // construct from pointer + } + + _Result operator()(_Ty *_Pleft, _Arg _Right) const + { // call function with operand + return ((_Pleft->*_Pmemfun)(_Right)); + } + +private: + _Result (_Ty::*_Pmemfun)(_Arg); // the member function pointer + }; + + // TEMPLATE CLASS const_mem_fun_t +template + class const_mem_fun_t + : public unary_function + { // functor adapter (*p->*pfunc)(), const *pfunc +public: + explicit const_mem_fun_t(_Result (_Ty::*_Pm)() const) + : _Pmemfun(_Pm) + { // construct from pointer + } + + _Result operator()(const _Ty *_Pleft) const + { // call function + return ((_Pleft->*_Pmemfun)()); + } + +private: + _Result (_Ty::*_Pmemfun)() const; // the member function pointer + }; + + // TEMPLATE CLASS const_mem_fun1_t +template + class const_mem_fun1_t + : public binary_function + { // functor adapter (*p->*pfunc)(val), const *pfunc +public: + explicit const_mem_fun1_t(_Result (_Ty::*_Pm)(_Arg) const) + : _Pmemfun(_Pm) + { // construct from pointer + } + + _Result operator()(const _Ty *_Pleft, _Arg _Right) const + { // call function with operand + return ((_Pleft->*_Pmemfun)(_Right)); + } + +private: + _Result (_Ty::*_Pmemfun)(_Arg) const; // the member function pointer + }; + + // TEMPLATE FUNCTION mem_fun +template inline + mem_fun_t<_Result, _Ty> mem_fun(_Result (_Ty::*_Pm)()) + { // return a mem_fun_t functor adapter + return (std::mem_fun_t<_Result, _Ty>(_Pm)); + } + +template inline + mem_fun1_t<_Result, _Ty, _Arg> mem_fun(_Result (_Ty::*_Pm)(_Arg)) + { // return a mem_fun1_t functor adapter + return (std::mem_fun1_t<_Result, _Ty, _Arg>(_Pm)); + } + +template inline + const_mem_fun_t<_Result, _Ty> + mem_fun(_Result (_Ty::*_Pm)() const) + { // return a const_mem_fun_t functor adapter + return (std::const_mem_fun_t<_Result, _Ty>(_Pm)); + } + +template inline + const_mem_fun1_t<_Result, _Ty, _Arg> + mem_fun(_Result (_Ty::*_Pm)(_Arg) const) + { // return a const_mem_fun1_t functor adapter + return (std::const_mem_fun1_t<_Result, _Ty, _Arg>(_Pm)); + } + + // TEMPLATE FUNCTION mem_fun1 (retained) +template inline + mem_fun1_t<_Result, _Ty, _Arg> mem_fun1(_Result (_Ty::*_Pm)(_Arg)) + { // return a mem_fun1_t functor adapter + return (std::mem_fun1_t<_Result, _Ty, _Arg>(_Pm)); + } + + // TEMPLATE CLASS mem_fun_ref_t +template + class mem_fun_ref_t + : public unary_function<_Ty, _Result> + { // functor adapter (*left.*pfunc)(), non-const *pfunc +public: + explicit mem_fun_ref_t(_Result (_Ty::*_Pm)()) + : _Pmemfun(_Pm) + { // construct from pointer + } + + _Result operator()(_Ty& _Left) const + { // call function + return ((_Left.*_Pmemfun)()); + } + +private: + _Result (_Ty::*_Pmemfun)(); // the member function pointer + }; + + // TEMPLATE CLASS mem_fun1_ref_t +template + class mem_fun1_ref_t + : public binary_function<_Ty, _Arg, _Result> + { // functor adapter (*left.*pfunc)(val), non-const *pfunc +public: + explicit mem_fun1_ref_t(_Result (_Ty::*_Pm)(_Arg)) + : _Pmemfun(_Pm) + { // construct from pointer + } + + _Result operator()(_Ty& _Left, _Arg _Right) const + { // call function with operand + return ((_Left.*_Pmemfun)(_Right)); + } + +private: + _Result (_Ty::*_Pmemfun)(_Arg); // the member function pointer + }; + + // TEMPLATE CLASS const_mem_fun_ref_t +template + class const_mem_fun_ref_t + : public unary_function<_Ty, _Result> + { // functor adapter (*left.*pfunc)(), const *pfunc +public: + explicit const_mem_fun_ref_t(_Result (_Ty::*_Pm)() const) + : _Pmemfun(_Pm) + { // construct from pointer + } + + _Result operator()(const _Ty& _Left) const + { // call function + return ((_Left.*_Pmemfun)()); + } + +private: + _Result (_Ty::*_Pmemfun)() const; // the member function pointer + }; + + // TEMPLATE CLASS const_mem_fun1_ref_t +template + class const_mem_fun1_ref_t + : public binary_function<_Ty, _Arg, _Result> + { // functor adapter (*left.*pfunc)(val), const *pfunc +public: + explicit const_mem_fun1_ref_t(_Result (_Ty::*_Pm)(_Arg) const) + : _Pmemfun(_Pm) + { // construct from pointer + } + + _Result operator()(const _Ty& _Left, _Arg _Right) const + { // call function with operand + return ((_Left.*_Pmemfun)(_Right)); + } + +private: + _Result (_Ty::*_Pmemfun)(_Arg) const; // the member function pointer + }; + + // TEMPLATE FUNCTION mem_fun_ref +template inline + mem_fun_ref_t<_Result, _Ty> mem_fun_ref(_Result (_Ty::*_Pm)()) + { // return a mem_fun_ref_t functor adapter + return (std::mem_fun_ref_t<_Result, _Ty>(_Pm)); + } + +template inline + mem_fun1_ref_t<_Result, _Ty, _Arg> + mem_fun_ref(_Result (_Ty::*_Pm)(_Arg)) + { // return a mem_fun1_ref_t functor adapter + return (std::mem_fun1_ref_t<_Result, _Ty, _Arg>(_Pm)); + } + +template inline + const_mem_fun_ref_t<_Result, _Ty> + mem_fun_ref(_Result (_Ty::*_Pm)() const) + { // return a const_mem_fun_ref_t functor adapter + return (std::const_mem_fun_ref_t<_Result, _Ty>(_Pm)); + } + +template inline + const_mem_fun1_ref_t<_Result, _Ty, _Arg> + mem_fun_ref(_Result (_Ty::*_Pm)(_Arg) const) + { // return a const_mem_fun1_ref_t functor adapter + return (std::const_mem_fun1_ref_t<_Result, _Ty, _Arg>(_Pm)); + } + + // TEMPLATE FUNCTION mem_fun1_ref (retained) +template inline + mem_fun1_ref_t<_Result, _Ty, _Arg> mem_fun1_ref(_Result (_Ty::*_Pm)(_Arg)) + { // return a mem_fun1_ref_t functor adapter + return (std::mem_fun1_ref_t<_Result, _Ty, _Arg>(_Pm)); + } +_STD_END + + #pragma warning(default: 4244) + +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _FUNCTIONAL_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + */ + +/* + * This file is derived from software bearing the following + * restrictions: + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this + * software and its documentation for any purpose is hereby + * granted without fee, provided that the above copyright notice + * appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation. + * Hewlett-Packard Company makes no representations about the + * suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/fvec.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/fvec.h new file mode 100644 index 00000000..4bef5f48 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/fvec.h @@ -0,0 +1,467 @@ +/** +*** Copyright (C) 1985-1999 Intel Corporation. All rights reserved. +*** +*** The information and source code contained herein is the exclusive +*** property of Intel Corporation and may not be disclosed, examined +*** or reproduced in whole or in part without explicit written authorization +*** from the company. +*** +**/ + +/* + * Definition of a C++ class interface to Streaming SIMD Extension intrinsics. + * + * + * File name : fvec.h Fvec class definitions + * + * Concept: A C++ abstraction of Streaming SIMD Extensions designed to improve + * + * programmer productivity. Speed and accuracy are sacrificed for utility. + * + * Facilitates an easy transition to compiler intrinsics + * + * or assembly language. + * + * F32vec4: 4 packed single precision + * 32-bit floating point numbers +*/ + +#ifndef FVEC_H_INCLUDED +#define FVEC_H_INCLUDED + +#if !defined __cplusplus + #error ERROR: This file is only supported in C++ compilations! +#endif /* !__cplusplus */ + +#include /* Streaming SIMD Extensions Intrinsics include file */ +#include +#include + +/* Define _ENABLE_VEC_DEBUG to enable std::ostream inserters for debug output */ +#if defined(_ENABLE_VEC_DEBUG) + #include +#endif + +#pragma pack(push,16) /* Must ensure class & union 16-B aligned */ + +/* If using MSVC5.0, explicit keyword should be used */ +#if (_MSC_VER >= 1100) + #define EXPLICIT explicit +#else + #if (__ICL) + #define EXPLICIT __explicit /* If MSVC4.x & ICL, use __explicit */ + #else + #define EXPLICIT /* nothing */ + #pragma message( "explicit keyword not recognized") + #endif +#endif + +class F32vec4 +{ +protected: + __m128 vec; +public: + + /* Constructors: __m128, 4 floats, 1 float */ + F32vec4() {} + + /* initialize 4 SP FP with __m128 data type */ + F32vec4(__m128 m) { vec = m;} + + /* initialize 4 SP FPs with 4 floats */ + F32vec4(float f3, float f2, float f1, float f0) { vec= _mm_set_ps(f3,f2,f1,f0); } + + /* Explicitly initialize each of 4 SP FPs with same float */ + EXPLICIT F32vec4(float f) { vec = _mm_set_ps1(f); } + + /* Explicitly initialize each of 4 SP FPs with same double */ + EXPLICIT F32vec4(double d) { vec = _mm_set_ps1((float) d); } + + /* Assignment operations */ + + F32vec4& operator =(float f) { vec = _mm_set_ps1(f); return *this; } + + F32vec4& operator =(double d) { vec = _mm_set_ps1((float) d); return *this; } + + /* Conversion functions */ + operator __m128() const { return vec; } /* Convert to __m128 */ + + /* Logical Operators */ + friend F32vec4 operator &(const F32vec4 &a, const F32vec4 &b) { return _mm_and_ps(a,b); } + friend F32vec4 operator |(const F32vec4 &a, const F32vec4 &b) { return _mm_or_ps(a,b); } + friend F32vec4 operator ^(const F32vec4 &a, const F32vec4 &b) { return _mm_xor_ps(a,b); } + + /* Arithmetic Operators */ + friend F32vec4 operator +(const F32vec4 &a, const F32vec4 &b) { return _mm_add_ps(a,b); } + friend F32vec4 operator -(const F32vec4 &a, const F32vec4 &b) { return _mm_sub_ps(a,b); } + friend F32vec4 operator *(const F32vec4 &a, const F32vec4 &b) { return _mm_mul_ps(a,b); } + friend F32vec4 operator /(const F32vec4 &a, const F32vec4 &b) { return _mm_div_ps(a,b); } + + F32vec4& operator =(const F32vec4 &a) { vec = a.vec; return *this; } + F32vec4& operator =(const __m128 &avec) { vec = avec; return *this; } + F32vec4& operator +=(F32vec4 &a) { return *this = _mm_add_ps(vec,a); } + F32vec4& operator -=(F32vec4 &a) { return *this = _mm_sub_ps(vec,a); } + F32vec4& operator *=(F32vec4 &a) { return *this = _mm_mul_ps(vec,a); } + F32vec4& operator /=(F32vec4 &a) { return *this = _mm_div_ps(vec,a); } + F32vec4& operator &=(F32vec4 &a) { return *this = _mm_and_ps(vec,a); } + F32vec4& operator |=(F32vec4 &a) { return *this = _mm_or_ps(vec,a); } + F32vec4& operator ^=(F32vec4 &a) { return *this = _mm_xor_ps(vec,a); } + + /* Horizontal Add */ + friend float add_horizontal(F32vec4 &a) + { + F32vec4 ftemp = _mm_add_ss(a,_mm_add_ss(_mm_shuffle_ps(a, a, 1),_mm_add_ss(_mm_shuffle_ps(a, a, 2),_mm_shuffle_ps(a, a, 3)))); + return ftemp[0]; + } + + /* Square Root */ + friend F32vec4 sqrt(const F32vec4 &a) { return _mm_sqrt_ps(a); } + /* Reciprocal */ + friend F32vec4 rcp(const F32vec4 &a) { return _mm_rcp_ps(a); } + /* Reciprocal Square Root */ + friend F32vec4 rsqrt(const F32vec4 &a) { return _mm_rsqrt_ps(a); } + + /* NewtonRaphson Reciprocal + [2 * rcpps(x) - (x * rcpps(x) * rcpps(x))] */ + friend F32vec4 rcp_nr(const F32vec4 &a) + { + F32vec4 Ra0 = _mm_rcp_ps(a); + return _mm_sub_ps(_mm_add_ps(Ra0, Ra0), _mm_mul_ps(_mm_mul_ps(Ra0, a), Ra0)); + } + + /* NewtonRaphson Reciprocal Square Root + 0.5 * rsqrtps * (3 - x * rsqrtps(x) * rsqrtps(x)) */ + friend F32vec4 rsqrt_nr(const F32vec4 &a) + { + static const F32vec4 fvecf0pt5(0.5f); + static const F32vec4 fvecf3pt0(3.0f); + F32vec4 Ra0 = _mm_rsqrt_ps(a); + return (fvecf0pt5 * Ra0) * (fvecf3pt0 - (a * Ra0) * Ra0); + + } + + /* Compares: Mask is returned */ + /* Macros expand to all compare intrinsics. Example: + friend F32vec4 cmpeq(const F32vec4 &a, const F32vec4 &b) + { return _mm_cmpeq_ps(a,b);} */ + #define Fvec32s4_COMP(op) \ + friend F32vec4 cmp##op (const F32vec4 &a, const F32vec4 &b) { return _mm_cmp##op##_ps(a,b); } + Fvec32s4_COMP(eq) // expanded to cmpeq(a,b) + Fvec32s4_COMP(lt) // expanded to cmplt(a,b) + Fvec32s4_COMP(le) // expanded to cmple(a,b) + Fvec32s4_COMP(gt) // expanded to cmpgt(a,b) + Fvec32s4_COMP(ge) // expanded to cmpge(a,b) + Fvec32s4_COMP(neq) // expanded to cmpneq(a,b) + Fvec32s4_COMP(nlt) // expanded to cmpnlt(a,b) + Fvec32s4_COMP(nle) // expanded to cmpnle(a,b) + Fvec32s4_COMP(ngt) // expanded to cmpngt(a,b) + Fvec32s4_COMP(nge) // expanded to cmpnge(a,b) + #undef Fvec32s4_COMP + + /* Min and Max */ + friend F32vec4 simd_min(const F32vec4 &a, const F32vec4 &b) { return _mm_min_ps(a,b); } + friend F32vec4 simd_max(const F32vec4 &a, const F32vec4 &b) { return _mm_max_ps(a,b); } + + /* Debug Features */ +#if defined(_ENABLE_VEC_DEBUG) + /* Output */ + friend std::ostream & operator<<(std::ostream & os, const F32vec4 &a) + { + /* To use: cout << "Elements of F32vec4 fvec are: " << fvec; */ + float *fp = (float*)&a; + os << "[3]:" << *(fp+3) + << " [2]:" << *(fp+2) + << " [1]:" << *(fp+1) + << " [0]:" << *fp; + return os; + } +#endif + /* Element Access Only, no modifications to elements*/ + const float& operator[](int i) const + { + /* Assert enabled only during debug /DDEBUG */ + assert((0 <= i) && (i <= 3)); /* User should only access elements 0-3 */ + float *fp = (float*)&vec; + return *(fp+i); + } + /* Element Access and Modification*/ + float& operator[](int i) + { + /* Assert enabled only during debug /DDEBUG */ + assert((0 <= i) && (i <= 3)); /* User should only access elements 0-3 */ + float *fp = (float*)&vec; + return *(fp+i); + } +}; + + /* Miscellaneous */ + +/* Interleave low order data elements of a and b into destination */ +inline F32vec4 unpack_low(const F32vec4 &a, const F32vec4 &b) +{ return _mm_unpacklo_ps(a, b); } + +/* Interleave high order data elements of a and b into target */ +inline F32vec4 unpack_high(const F32vec4 &a, const F32vec4 &b) +{ return _mm_unpackhi_ps(a, b); } + +/* Move Mask to Integer returns 4 bit mask formed of most significant bits of a */ +inline int move_mask(const F32vec4 &a) +{ return _mm_movemask_ps(a);} + + /* Data Motion Functions */ + +/* Load Unaligned loadu_ps: Unaligned */ +inline void loadu(F32vec4 &a, float *p) +{ a = _mm_loadu_ps(p); } + +/* Store Temporal storeu_ps: Unaligned */ +inline void storeu(float *p, const F32vec4 &a) +{ _mm_storeu_ps(p, a); } + + /* Cacheability Support */ + +/* Non-Temporal Store */ +inline void store_nta(float *p, F32vec4 &a) +{ _mm_stream_ps(p,a);} + + /* Conditional Selects:*/ +/*(a OP b)? c : d; where OP is any compare operator +Macros expand to conditional selects which use all compare intrinsics. +Example: +friend F32vec4 select_eq(const F32vec4 &a, const F32vec4 &b, const F32vec4 &c, const F32vec4 &d) +{ + F32vec4 mask = _mm_cmpeq_ps(a,b); + return( (mask & c) | F32vec4((_mm_andnot_ps(mask,d)))); +} +*/ + +#define Fvec32s4_SELECT(op) \ +inline F32vec4 select_##op (const F32vec4 &a, const F32vec4 &b, const F32vec4 &c, const F32vec4 &d) \ +{ \ + F32vec4 mask = _mm_cmp##op##_ps(a,b); \ + return( (mask & c) | F32vec4((_mm_andnot_ps(mask,d)))); \ +} +Fvec32s4_SELECT(eq) // generates select_eq(a,b) +Fvec32s4_SELECT(lt) // generates select_lt(a,b) +Fvec32s4_SELECT(le) // generates select_le(a,b) +Fvec32s4_SELECT(gt) // generates select_gt(a,b) +Fvec32s4_SELECT(ge) // generates select_ge(a,b) +Fvec32s4_SELECT(neq) // generates select_neq(a,b) +Fvec32s4_SELECT(nlt) // generates select_nlt(a,b) +Fvec32s4_SELECT(nle) // generates select_nle(a,b) +Fvec32s4_SELECT(ngt) // generates select_ngt(a,b) +Fvec32s4_SELECT(nge) // generates select_nge(a,b) +#undef Fvec32s4_SELECT + + +/* Streaming SIMD Extensions Integer Intrinsics */ + +/* Max and Min */ +inline Is16vec4 simd_max(const Is16vec4 &a, const Is16vec4 &b) { return _m_pmaxsw(a,b);} +inline Is16vec4 simd_min(const Is16vec4 &a, const Is16vec4 &b) { return _m_pminsw(a,b);} +inline Iu8vec8 simd_max(const Iu8vec8 &a, const Iu8vec8 &b) { return _m_pmaxub(a,b);} +inline Iu8vec8 simd_min(const Iu8vec8 &a, const Iu8vec8 &b) { return _m_pminub(a,b);} + +/* Average */ +inline Iu16vec4 simd_avg(const Iu16vec4 &a, const Iu16vec4 &b) { return _m_pavgw(a,b); } +inline Iu8vec8 simd_avg(const Iu8vec8 &a, const Iu8vec8 &b) { return _m_pavgb(a,b); } + +/* Move ByteMask To Int: returns mask formed from most sig bits of each vec of a */ +inline int move_mask(const I8vec8 &a) { return _m_pmovmskb(a);} + +/* Packed Multiply High Unsigned */ +inline Iu16vec4 mul_high(const Iu16vec4 &a, const Iu16vec4 &b) { return _m_pmulhuw(a,b); } + +/* Byte Mask Write: Write bytes if most significant bit in each corresponding byte is set */ +inline void mask_move(const I8vec8 &a, const I8vec8 &b, char *addr) { _m_maskmovq(a, b, addr); } + +/* Data Motion: Store Non Temporal */ +inline void store_nta(__m64 *p, M64 &a) { _mm_stream_pi(p,a); } + +/* Conversions between ivec <-> fvec */ + +/* Convert first element of F32vec4 to int with truncation */ +inline int F32vec4ToInt(const F32vec4 &a) +{ + + return _mm_cvtt_ss2si(a); + +} + +/* Convert two lower SP FP values of a to Is32vec2 with truncation */ +inline Is32vec2 F32vec4ToIs32vec2 (const F32vec4 &a) +{ + + __m64 result; + result = _mm_cvtt_ps2pi(a); + return Is32vec2(result); + +} + +/* Convert the 32-bit int i to an SP FP value; the upper three SP FP values are passed through from a. */ +inline F32vec4 IntToF32vec4(const F32vec4 &a, int i) +{ + + __m128 result; + result = _mm_cvt_si2ss(a,i); + return F32vec4(result); + +} + +/* Convert the two 32-bit integer values in b to two SP FP values; the upper two SP FP values are passed from a. */ +inline F32vec4 Is32vec2ToF32vec4(const F32vec4 &a, const Is32vec2 &b) +{ + + __m128 result; + result = _mm_cvt_pi2ps(a,b); + return F32vec4(result); +} + +class F32vec1 +{ +protected: + __m128 vec; +public: + + /* Constructors: 1 float */ + F32vec1() {} + + F32vec1(int i) { vec = _mm_cvt_si2ss(vec,i);}; + + /* Initialize each of 4 SP FPs with same float */ + EXPLICIT F32vec1(float f) { vec = _mm_set_ss(f); } + + /* Initialize each of 4 SP FPs with same float */ + EXPLICIT F32vec1(double d) { vec = _mm_set_ss((float) d); } + + /* initialize with __m128 data type */ + F32vec1(__m128 m) { vec = m; } + + /* Conversion functions */ + operator __m128() const { return vec; } /* Convert to float */ + + /* Logical Operators */ + friend F32vec1 operator &(const F32vec1 &a, const F32vec1 &b) { return _mm_and_ps(a,b); } + friend F32vec1 operator |(const F32vec1 &a, const F32vec1 &b) { return _mm_or_ps(a,b); } + friend F32vec1 operator ^(const F32vec1 &a, const F32vec1 &b) { return _mm_xor_ps(a,b); } + + /* Arithmetic Operators */ + friend F32vec1 operator +(const F32vec1 &a, const F32vec1 &b) { return _mm_add_ss(a,b); } + friend F32vec1 operator -(const F32vec1 &a, const F32vec1 &b) { return _mm_sub_ss(a,b); } + friend F32vec1 operator *(const F32vec1 &a, const F32vec1 &b) { return _mm_mul_ss(a,b); } + friend F32vec1 operator /(const F32vec1 &a, const F32vec1 &b) { return _mm_div_ss(a,b); } + + F32vec1& operator +=(F32vec1 &a) { return *this = _mm_add_ss(vec,a); } + F32vec1& operator -=(F32vec1 &a) { return *this = _mm_sub_ss(vec,a); } + F32vec1& operator *=(F32vec1 &a) { return *this = _mm_mul_ss(vec,a); } + F32vec1& operator /=(F32vec1 &a) { return *this = _mm_div_ss(vec,a); } + F32vec1& operator &=(F32vec1 &a) { return *this = _mm_and_ps(vec,a); } + F32vec1& operator |=(F32vec1 &a) { return *this = _mm_or_ps(vec,a); } + F32vec1& operator ^=(F32vec1 &a) { return *this = _mm_xor_ps(vec,a); } + + + /* Square Root */ + friend F32vec1 sqrt(const F32vec1 &a) { return _mm_sqrt_ss(a); } + /* Reciprocal */ + friend F32vec1 rcp(const F32vec1 &a) { return _mm_rcp_ss(a); } + /* Reciprocal Square Root */ + friend F32vec1 rsqrt(const F32vec1 &a) { return _mm_rsqrt_ss(a); } + + /* NewtonRaphson Reciprocal + [2 * rcpss(x) - (x * rcpss(x) * rcpss(x))] */ + friend F32vec1 rcp_nr(const F32vec1 &a) + { + F32vec1 Ra0 = _mm_rcp_ss(a); + return _mm_sub_ss(_mm_add_ss(Ra0, Ra0), _mm_mul_ss(_mm_mul_ss(Ra0, a), Ra0)); + } + + /* NewtonRaphson Reciprocal Square Root + 0.5 * rsqrtss * (3 - x * rsqrtss(x) * rsqrtss(x)) */ + friend F32vec1 rsqrt_nr(const F32vec1 &a) + { + static const F32vec1 fvecf0pt5(0.5f); + static const F32vec1 fvecf3pt0(3.0f); + F32vec1 Ra0 = _mm_rsqrt_ss(a); + return (fvecf0pt5 * Ra0) * (fvecf3pt0 - (a * Ra0) * Ra0); + + } + + /* Compares: Mask is returned */ + /* Macros expand to all compare intrinsics. Example: + friend F32vec1 cmpeq(const F32vec1 &a, const F32vec1 &b) + { return _mm_cmpeq_ss(a,b);} */ + #define Fvec32s1_COMP(op) \ + friend F32vec1 cmp##op (const F32vec1 &a, const F32vec1 &b) { return _mm_cmp##op##_ss(a,b); } + Fvec32s1_COMP(eq) // expanded to cmpeq(a,b) + Fvec32s1_COMP(lt) // expanded to cmplt(a,b) + Fvec32s1_COMP(le) // expanded to cmple(a,b) + Fvec32s1_COMP(gt) // expanded to cmpgt(a,b) + Fvec32s1_COMP(ge) // expanded to cmpge(a,b) + Fvec32s1_COMP(neq) // expanded to cmpneq(a,b) + Fvec32s1_COMP(nlt) // expanded to cmpnlt(a,b) + Fvec32s1_COMP(nle) // expanded to cmpnle(a,b) + Fvec32s1_COMP(ngt) // expanded to cmpngt(a,b) + Fvec32s1_COMP(nge) // expanded to cmpnge(a,b) + #undef Fvec32s1_COMP + + /* Min and Max */ + friend F32vec1 simd_min(const F32vec1 &a, const F32vec1 &b) { return _mm_min_ss(a,b); } + friend F32vec1 simd_max(const F32vec1 &a, const F32vec1 &b) { return _mm_max_ss(a,b); } + + /* Debug Features */ +#if defined(_ENABLE_VEC_DEBUG) + /* Output */ + friend std::ostream & operator<<(std::ostream & os, const F32vec1 &a) + { + /* To use: cout << "Elements of F32vec1 fvec are: " << fvec; */ + float *fp = (float*)&a; + os << "float:" << *fp; + return os; + } +#endif + +}; + + /* Conditional Selects:*/ +/*(a OP b)? c : d; where OP is any compare operator +Macros expand to conditional selects which use all compare intrinsics. +Example: +friend F32vec1 select_eq(const F32vec1 &a, const F32vec1 &b, const F32vec1 &c, const F32vec1 &d) +{ + F32vec1 mask = _mm_cmpeq_ss(a,b); + return( (mask & c) | F32vec1((_mm_andnot_ps(mask,d)))); +} +*/ + +#define Fvec32s1_SELECT(op) \ +inline F32vec1 select_##op (const F32vec1 &a, const F32vec1 &b, const F32vec1 &c, const F32vec1 &d) \ +{ \ + F32vec1 mask = _mm_cmp##op##_ss(a,b); \ + return( (mask & c) | F32vec1((_mm_andnot_ps(mask,d)))); \ +} +Fvec32s1_SELECT(eq) // generates select_eq(a,b) +Fvec32s1_SELECT(lt) // generates select_lt(a,b) +Fvec32s1_SELECT(le) // generates select_le(a,b) +Fvec32s1_SELECT(gt) // generates select_gt(a,b) +Fvec32s1_SELECT(ge) // generates select_ge(a,b) +Fvec32s1_SELECT(neq) // generates select_neq(a,b) +Fvec32s1_SELECT(nlt) // generates select_nlt(a,b) +Fvec32s1_SELECT(nle) // generates select_nle(a,b) +Fvec32s1_SELECT(ngt) // generates select_ngt(a,b) +Fvec32s1_SELECT(nge) // generates select_nge(a,b) +#undef Fvec32s1_SELECT + +/* Conversions between ivec <-> fvec */ + +/* Convert F32vec1 to int */ +inline int F32vec1ToInt(const F32vec1 &a) +{ + return _mm_cvtt_ss2si(a); +} + + + +#pragma pack(pop) /* 16-B aligned */ +#endif /* FVEC_H_INCLUDED */ + + diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/gcroot.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/gcroot.h new file mode 100644 index 00000000..b140f278 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/gcroot.h @@ -0,0 +1,132 @@ +// +// gcroot.h - Template class that wraps GCHandle from mscorlib.dll. +// Copyright (C) 2000-2001 Microsoft Corporation +// All rights reserved. +// +// Use this class to declare gc "pointers" that live in the C++ heap. +// +// Example: +// struct StringList { +// gcroot str; +// StringList *next; +// StringList(); // should have ctors and dtors +// ~StringList(); +// }; +// +// By convention, we maintain a 1-to-1 relationship between C++ objects +// and the handle slots they "point" to. Thus, two distinct C++ objects +// always refer to two distinct handles, even if they "point" to the same +// object. Therefore, when the C++ object is destroyed, its handle can +// be freed without error. +// +// Note that we cannot currently embed a GCHandle directly in an unmanaged C++ +// class. We therefore store an integer (intptr_t), and use the conversion methods of +// GCHandle to reconstitute a GCHandle from the integer on demand. +// + + +#if _MSC_VER > 1000 +#pragma once +#endif + +#if !defined(_INC_GCROOT) +#define _INC_GCROOT + +#using + +#include + +template struct gcroot { + + typedef System::Runtime::InteropServices::GCHandle GCHandle; + + // always allocate a new handle during construction (see above) + // + gcroot() { + _handle = GCHandle::op_Explicit(GCHandle::Alloc(0)) +#ifdef _WIN32 + .ToInt32() +#elif defined(_WIN64) + .ToInt64() +#else +#error ERROR: either _WIN64 or _WIN32 must be defined +#endif + ; + } + + // this can't be T& here because & does not yet work on managed types + // (T should be a pointer anyway). + // + gcroot(T t) { + _handle = GCHandle::op_Explicit(GCHandle::Alloc(t)) +#ifdef _WIN32 + .ToInt32() +#elif defined(_WIN64) + .ToInt64() +#else +#error ERROR: either _WIN64 or _WIN32 must be defined +#endif + ; + } + + gcroot(const gcroot& r) { + // don't copy a handle, copy what it points to (see above) + _handle = GCHandle::op_Explicit( + GCHandle::Alloc( + GCHandle::op_Explicit(r._handle).Target )) +#ifdef _WIN32 + .ToInt32() +#elif defined(_WIN64) + .ToInt64() +#else +#error ERROR: either _WIN64 or _WIN32 must be defined +#endif + ; + } + + // Since C++ objects and handles are allocated 1-to-1, we can + // free the handle when the object is destroyed + // + ~gcroot() { + GCHandle g = GCHandle::op_Explicit(_handle); + g.Free(); + _handle = 0; // should fail if reconstituted + } + + gcroot& operator=(T t) { + // no need to check for valid handle; was allocated in ctor + GCHandle::op_Explicit(_handle).Target = t; + return *this; + } + + gcroot& operator=(const gcroot &r) { + // no need to check for valid handle; was allocated in ctor + T t = (T)r; + GCHandle::op_Explicit(_handle).Target = t; + return *this; + } + + operator T () const { + // gcroot is typesafe, so use static_cast + return static_cast( GCHandle::op_Explicit(_handle).Target ); + } + + // don't return T& here because & to gc pointer not yet implemented + // (T should be a pointer anyway). + T operator->() const { + // gcroot is typesafe, so use static_cast + return static_cast(GCHandle::op_Explicit(_handle).Target); + } + +private: + // Don't let anyone copy the handle value directly, or make a copy + // by taking the address of this object and pointing to it from + // somewhere else. The root will be freed when the dtor of this + // object gets called, and anyone pointing to it still will + // cause serious harm to the Garbage Collector. + // + intptr_t _handle; + T* operator& (); +}; + +#endif // _INC_GCROOT diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/hash_map b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/hash_map new file mode 100644 index 00000000..9ebbd137 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/hash_map @@ -0,0 +1,475 @@ +// hash_map standard header +#pragma once +#ifndef _HASH_MAP_ +#define _HASH_MAP_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STDEXT_BEGIN + + // TEMPLATE CLASS _Hmap_traits +template // true if multiple equivalent keys are permitted + class _Hmap_traits + { // traits required to make _Hash behave like a map +public: + typedef _Kty key_type; + typedef _STD pair value_type; + typedef _Tr key_compare; + typedef typename _Alloc::template rebind::other + allocator_type; + + enum + { // make multi parameter visible as an enum constant + _Multi = _Mfl}; + + _Hmap_traits() + : comp() + { // construct with default comparator + } + + _Hmap_traits(const _Tr& _Traits) + : comp(_Traits) + { // construct with specified comparator + } + + class value_compare + : public _STD binary_function + { // functor for comparing two element values + friend class _Hmap_traits<_Kty, _Ty, _Tr, _Alloc, _Mfl>; + + public: + bool operator()(const value_type& _Left, + const value_type& _Right) const + { // test if _Left precedes _Right by comparing just keys + return (comp(_Left.first, _Right.first)); + } + + value_compare(const key_compare& _Traits) + : comp(_Traits) + { // construct with specified predicate + } + + protected: + key_compare comp; // the comparator predicate for keys + }; + + static const _Kty& _Kfn(const value_type& _Val) + { // extract key from element value + return (_Val.first); + } + + _Tr comp; // the comparator predicate for keys + }; + + // TEMPLATE CLASS hash_map +template >, + class _Alloc = _STD allocator< _STD pair > > + class hash_map + : public _Hash<_Hmap_traits<_Kty, _Ty, _Tr, _Alloc, false> > + { // hash table of {key, mapped} values, unique keys +public: + typedef hash_map<_Kty, _Ty, _Tr, _Alloc> _Myt; + typedef _Hash<_Hmap_traits<_Kty, _Ty, _Tr, _Alloc, false> > _Mybase; + typedef _Kty key_type; + typedef _Ty mapped_type; + typedef _Ty referent_type; + typedef _Tr key_compare; + typedef typename _Mybase::value_compare value_compare; + typedef typename _Mybase::allocator_type allocator_type; + typedef typename _Mybase::size_type size_type; + typedef typename _Mybase::difference_type difference_type; + typedef typename _Mybase::pointer pointer; + typedef typename _Mybase::const_pointer const_pointer; + typedef typename _Mybase::reference reference; + typedef typename _Mybase::const_reference const_reference; + typedef typename _Mybase::iterator iterator; + typedef typename _Mybase::const_iterator const_iterator; + typedef typename _Mybase::reverse_iterator reverse_iterator; + typedef typename _Mybase::const_reverse_iterator + const_reverse_iterator; + typedef typename _Mybase::value_type value_type; + + hash_map() + : _Mybase(key_compare(), allocator_type()) + { // construct empty map from defaults + } + + explicit hash_map(const key_compare& _Traits) + : _Mybase(_Traits, allocator_type()) + { // construct empty map from comparator + } + + hash_map(const key_compare& _Traits, const allocator_type& _Al) + : _Mybase(_Traits, _Al) + { // construct empty map from comparator and allocator + } + + template + hash_map(_Iter _First, _Iter _Last) + : _Mybase(key_compare(), allocator_type()) + { // construct map from sequence, defaults + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + hash_map(_Iter _First, _Iter _Last, + const key_compare& _Traits) + : _Mybase(_Traits, allocator_type()) + { // construct map from sequence, comparator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + hash_map(_Iter _First, _Iter _Last, + const key_compare& _Traits, + const allocator_type& _Al) + : _Mybase(_Traits, _Al) + { // construct map from sequence, comparator, and allocator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + mapped_type& operator[](const key_type& _Keyval) + { // find element matching _Keyval or insert with default mapped + iterator _Where = this->lower_bound(_Keyval); + if (_Where == this->end()) + _Where = this->insert(value_type(_Keyval, mapped_type())).first; + return ((*_Where).second); + } + }; + +template inline + void swap( _STDEXT hash_map<_Kty, _Ty, _Tr, _Alloc>& _Left, + _STDEXT hash_map<_Kty, _Ty, _Tr, _Alloc>& _Right) + { // swap _Left and _Right hash_maps + _Left.swap(_Right); + } + + // TEMPLATE CLASS hash_multimap +template >, + class _Alloc = _STD allocator< _STD pair > > + class hash_multimap + : public _Hash<_Hmap_traits<_Kty, _Ty, _Tr, _Alloc, true> > + { // hash table of {key, mapped} values, non-unique keys +public: + typedef hash_multimap<_Kty, _Ty, _Tr, _Alloc> _Myt; + typedef _Hash<_Hmap_traits<_Kty, _Ty, _Tr, _Alloc, true> > _Mybase; + typedef _Kty key_type; + typedef _Ty mapped_type; + typedef _Ty referent_type; // old name, magically gone + typedef _Tr key_compare; + typedef typename _Mybase::value_compare value_compare; + typedef typename _Mybase::allocator_type allocator_type; + typedef typename _Mybase::size_type size_type; + typedef typename _Mybase::difference_type difference_type; + typedef typename _Mybase::pointer pointer; + typedef typename _Mybase::const_pointer const_pointer; + typedef typename _Mybase::reference reference; + typedef typename _Mybase::const_reference const_reference; + typedef typename _Mybase::iterator iterator; + typedef typename _Mybase::const_iterator const_iterator; + typedef typename _Mybase::reverse_iterator reverse_iterator; + typedef typename _Mybase::const_reverse_iterator + const_reverse_iterator; + typedef typename _Mybase::value_type value_type; + + hash_multimap() + : _Mybase(key_compare(), allocator_type()) + { // construct empty map from defaults + } + + explicit hash_multimap(const key_compare& _Traits) + : _Mybase(_Traits, allocator_type()) + { // construct empty map from comparator + } + + hash_multimap(const key_compare& _Traits, + const allocator_type& _Al) + : _Mybase(_Traits, _Al) + { // construct empty map from comparator and allocator + } + + template + hash_multimap(_Iter _First, _Iter _Last) + : _Mybase(key_compare(), allocator_type()) + { // construct map from sequence, defaults + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + hash_multimap(_Iter _First, _Iter _Last, + const key_compare& _Traits) + : _Mybase(_Traits, allocator_type()) + { // construct map from sequence, comparator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + hash_multimap(_Iter _First, _Iter _Last, + const key_compare& _Traits, + const allocator_type& _Al) + : _Mybase(_Traits, _Al) + { // construct map from sequence, comparator, and allocator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + iterator insert(const value_type& _Val) + { // insert a {key, mapped} value + return (_Mybase::insert(_Val).first); + } + + iterator insert(iterator _Where, const value_type& _Val) + { // insert a {key, mapped} value, with hint + return (_Mybase::insert(_Where, _Val)); + } + + template + void insert(_Iter _First, _Iter _Last) + { // insert [_First, _Last), arbitrary iterators + for (; _First != _Last; ++_First) + insert(*_First); + } + }; + +template inline + void swap( _STDEXT hash_multimap<_Kty, _Ty, _Tr, _Alloc>& _Left, + _STDEXT hash_multimap<_Kty, _Ty, _Tr, _Alloc>& _Right) + { // swap _Left and _Right hash_multimaps + _Left.swap(_Right); + } + +_STDEXT_END + +#ifdef _MSC_EXTENSIONS +#if _DEFINE_DEPRECATED_HASH_CLASSES +#pragma warning(push) +#pragma warning(disable: 4996) + +_STD_BEGIN + // TEMPLATE CLASS hash_map +template >, + class _Alloc = allocator< pair > > + class _DEPRECATED hash_map + : public _STDEXT _Hash< _STDEXT _Hmap_traits<_Kty, _Ty, _Tr, _Alloc, false> > + { // hash table of {key, mapped} values, unique keys +public: + typedef hash_map<_Kty, _Ty, _Tr, _Alloc> _Myt; + typedef _STDEXT _Hash< _STDEXT _Hmap_traits<_Kty, _Ty, _Tr, _Alloc, false> > _Mybase; + typedef _Kty key_type; + typedef _Ty mapped_type; + typedef _Ty referent_type; + typedef _Tr key_compare; + typedef typename _Mybase::value_compare value_compare; + typedef typename _Mybase::allocator_type allocator_type; + typedef typename _Mybase::size_type size_type; + typedef typename _Mybase::difference_type difference_type; + typedef typename _Mybase::pointer pointer; + typedef typename _Mybase::const_pointer const_pointer; + typedef typename _Mybase::reference reference; + typedef typename _Mybase::const_reference const_reference; + typedef typename _Mybase::iterator iterator; + typedef typename _Mybase::const_iterator const_iterator; + typedef typename _Mybase::reverse_iterator reverse_iterator; + typedef typename _Mybase::const_reverse_iterator + const_reverse_iterator; + typedef typename _Mybase::value_type value_type; + + hash_map() + : _Mybase(key_compare(), allocator_type()) + { // construct empty map from defaults + } + + explicit hash_map(const key_compare& _Traits) + : _Mybase(_Traits, allocator_type()) + { // construct empty map from comparator + } + + hash_map(const key_compare& _Traits, const allocator_type& _Al) + : _Mybase(_Traits, _Al) + { // construct empty map from comparator and allocator + } + + template + hash_map(_Iter _First, _Iter _Last) + : _Mybase(key_compare(), allocator_type()) + { // construct map from sequence, defaults + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + hash_map(_Iter _First, _Iter _Last, + const key_compare& _Traits) + : _Mybase(_Traits, allocator_type()) + { // construct map from sequence, comparator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + hash_map(_Iter _First, _Iter _Last, + const key_compare& _Traits, + const allocator_type& _Al) + : _Mybase(_Traits, _Al) + { // construct map from sequence, comparator, and allocator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + mapped_type& operator[](const key_type& _Keyval) + { // find element matching _Keyval or insert with default mapped + iterator _Where = this->lower_bound(_Keyval); + if (_Where == this->end()) + _Where = this->insert(value_type(_Keyval, mapped_type())).first; + return ((*_Where).second); + } + }; + +template inline + void swap(hash_map<_Kty, _Ty, _Tr, _Alloc>& _Left, + hash_map<_Kty, _Ty, _Tr, _Alloc>& _Right) + { // swap _Left and _Right hash_maps + _Left.swap(_Right); + } + + // TEMPLATE CLASS hash_multimap +template >, + class _Alloc = allocator< pair > > + class _DEPRECATED hash_multimap + : public _STDEXT _Hash< _STDEXT _Hmap_traits<_Kty, _Ty, _Tr, _Alloc, true> > + { // hash table of {key, mapped} values, non-unique keys +public: + typedef hash_multimap<_Kty, _Ty, _Tr, _Alloc> _Myt; + typedef _STDEXT _Hash< _STDEXT _Hmap_traits<_Kty, _Ty, _Tr, _Alloc, true> > _Mybase; + typedef _Kty key_type; + typedef _Ty mapped_type; + typedef _Ty referent_type; // old name, magically gone + typedef _Tr key_compare; + typedef typename _Mybase::value_compare value_compare; + typedef typename _Mybase::allocator_type allocator_type; + typedef typename _Mybase::size_type size_type; + typedef typename _Mybase::difference_type difference_type; + typedef typename _Mybase::pointer pointer; + typedef typename _Mybase::const_pointer const_pointer; + typedef typename _Mybase::reference reference; + typedef typename _Mybase::const_reference const_reference; + typedef typename _Mybase::iterator iterator; + typedef typename _Mybase::const_iterator const_iterator; + typedef typename _Mybase::reverse_iterator reverse_iterator; + typedef typename _Mybase::const_reverse_iterator + const_reverse_iterator; + typedef typename _Mybase::value_type value_type; + + hash_multimap() + : _Mybase(key_compare(), allocator_type()) + { // construct empty map from defaults + } + + explicit hash_multimap(const key_compare& _Traits) + : _Mybase(_Traits, allocator_type()) + { // construct empty map from comparator + } + + hash_multimap(const key_compare& _Traits, + const allocator_type& _Al) + : _Mybase(_Traits, _Al) + { // construct empty map from comparator and allocator + } + + template + hash_multimap(_Iter _First, _Iter _Last) + : _Mybase(key_compare(), allocator_type()) + { // construct map from sequence, defaults + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + hash_multimap(_Iter _First, _Iter _Last, + const key_compare& _Traits) + : _Mybase(_Traits, allocator_type()) + { // construct map from sequence, comparator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + hash_multimap(_Iter _First, _Iter _Last, + const key_compare& _Traits, + const allocator_type& _Al) + : _Mybase(_Traits, _Al) + { // construct map from sequence, comparator, and allocator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + iterator insert(const value_type& _Val) + { // insert a {key, mapped} value + return (_Mybase::insert(_Val).first); + } + + iterator insert(iterator _Where, const value_type& _Val) + { // insert a {key, mapped} value, with hint + return (_Mybase::insert(_Where, _Val)); + } + + template + void insert(_Iter _First, _Iter _Last) + { // insert [_First, _Last), arbitrary iterators + for (; _First != _Last; ++_First) + insert(*_First); + } + }; + +template inline + void swap(hash_multimap<_Kty, _Ty, _Tr, _Alloc>& _Left, + hash_multimap<_Kty, _Ty, _Tr, _Alloc>& _Right) + { // swap _Left and _Right hash_multimaps + _Left.swap(_Right); + } + +_STD_END + +#pragma warning(pop) +#endif /* _DEFINE_DEPRECATED_HASH_CLASSES */ +#endif /* MSC_EXTENSIONS */ + +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _HASH_MAP_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/hash_set b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/hash_set new file mode 100644 index 00000000..cbf5ab28 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/hash_set @@ -0,0 +1,419 @@ +// hash_set standard header +#pragma once +#ifndef _HASH_SET_ +#define _HASH_SET_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STDEXT_BEGIN + + // TEMPLATE CLASS _Hset_traits +template // true if multiple equivalent keys are permitted + class _Hset_traits + { // traits required to make _Hash behave like a set +public: + typedef _Kty key_type; + typedef _Kty value_type; + typedef _Tr key_compare; + typedef typename _Alloc::template rebind::other + allocator_type; + + enum + { // make multi parameter visible as an enum constant + _Multi = _Mfl}; + + _Hset_traits() + : comp() + { // construct with default comparator + } + + _Hset_traits(const _Tr& _Traits) + : comp(_Traits) + { // construct with specified comparator + } + + typedef key_compare value_compare; + + static const _Kty& _Kfn(const value_type& _Val) + { // return entire value as key + return (_Val); + } + + _Tr comp; // the comparator predicate for keys + }; + + // TEMPLATE CLASS hash_set +template >, + class _Alloc = _STD allocator<_Kty> > + class hash_set + : public _Hash<_Hset_traits<_Kty, _Tr, _Alloc, false> > + { // hash table of key values, unique keys +public: + typedef hash_set<_Kty, _Tr, _Alloc> _Myt; + typedef _Hash<_Hset_traits<_Kty, _Tr, _Alloc, false> > _Mybase; + typedef _Kty key_type; + typedef _Tr key_compare; + typedef typename _Mybase::value_compare value_compare; + typedef typename _Mybase::allocator_type allocator_type; + typedef typename _Mybase::size_type size_type; + typedef typename _Mybase::difference_type difference_type; + typedef typename _Mybase::pointer pointer; + typedef typename _Mybase::const_pointer const_pointer; + typedef typename _Mybase::reference reference; + typedef typename _Mybase::const_reference const_reference; + typedef typename _Mybase::iterator iterator; + typedef typename _Mybase::const_iterator const_iterator; + typedef typename _Mybase::reverse_iterator reverse_iterator; + typedef typename _Mybase::const_reverse_iterator + const_reverse_iterator; + typedef typename _Mybase::value_type value_type; + + hash_set() + : _Mybase(key_compare(), allocator_type()) + { // construct empty set from defaults + } + + explicit hash_set(const key_compare& _Traits) + : _Mybase(_Traits, allocator_type()) + { // construct empty set from comparator + } + + hash_set(const key_compare& _Traits, const allocator_type& _Al) + : _Mybase(_Traits, _Al) + { // construct empty set from comparator and allocator + } + + template + hash_set(_Iter _First, _Iter _Last) + : _Mybase(key_compare(), allocator_type()) + { // construct set from sequence, defaults + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + hash_set(_Iter _First, _Iter _Last, + const key_compare& _Traits) + : _Mybase(_Traits, allocator_type()) + { // construct set from sequence, comparator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + hash_set(_Iter _First, _Iter _Last, + const key_compare& _Traits, const allocator_type& _Al) + : _Mybase(_Traits, _Al) + { // construct set from sequence, comparator, and allocator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + }; + +template inline + void swap(_STDEXT hash_set<_Kty, _Tr, _Alloc>& _Left, + _STDEXT hash_set<_Kty, _Tr, _Alloc>& _Right) + { // swap _Left and _Right hash_sets + _Left.swap(_Right); + } + + // TEMPLATE CLASS hash_multiset +template >, + class _Alloc = _STD allocator<_Kty> > + class hash_multiset + : public _Hash<_Hset_traits<_Kty, _Tr, _Alloc, true> > + { // hash table of key values, non-unique keys +public: + typedef hash_multiset<_Kty, _Tr, _Alloc> _Myt; + typedef _Hash<_Hset_traits<_Kty, _Tr, _Alloc, true> > _Mybase; + typedef _Kty key_type; + typedef _Tr key_compare; + typedef typename _Mybase::value_compare value_compare; + typedef typename _Mybase::allocator_type allocator_type; + typedef typename _Mybase::size_type size_type; + typedef typename _Mybase::difference_type difference_type; + typedef typename _Mybase::pointer pointer; + typedef typename _Mybase::const_pointer const_pointer; + typedef typename _Mybase::reference reference; + typedef typename _Mybase::const_reference const_reference; + typedef typename _Mybase::iterator iterator; + typedef typename _Mybase::const_iterator const_iterator; + typedef typename _Mybase::reverse_iterator reverse_iterator; + typedef typename _Mybase::const_reverse_iterator + const_reverse_iterator; + typedef typename _Mybase::value_type value_type; + + hash_multiset() + : _Mybase(key_compare(), allocator_type()) + { // construct empty set from defaults + } + + explicit hash_multiset(const key_compare& _Traits) + : _Mybase(_Traits, allocator_type()) + { // construct empty set from comparator + } + + hash_multiset(const key_compare& _Traits, + const allocator_type& _Al) + : _Mybase(_Traits, _Al) + { // construct empty set from comparator and allocator + } + + template + hash_multiset(_Iter _First, _Iter _Last) + : _Mybase(key_compare(), allocator_type()) + { // construct from sequence, defaults + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + hash_multiset(_Iter _First, _Iter _Last, + const key_compare& _Traits) + : _Mybase(_Traits, allocator_type()) + { // construct from sequence, comparator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + hash_multiset(_Iter _First, _Iter _Last, + const key_compare& _Traits, const allocator_type& _Al) + : _Mybase(_Traits, _Al) + { // construct from sequence, comparator, and allocator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + iterator insert(const value_type& _Val) + { // insert a key value + return (_Mybase::insert(_Val).first); + } + + iterator insert(iterator _Where, const value_type& _Val) + { // insert a key value, with hint + return (_Mybase::insert(_Where, _Val)); + } + + template + void insert(_Iter _First, _Iter _Last) + { // insert [_First, _Last), arbitrary iterators + for (; _First != _Last; ++_First) + insert(*_First); + } + }; + +template inline + void swap(_STDEXT hash_multiset<_Kty, _Tr, _Alloc>& _Left, + _STDEXT hash_multiset<_Kty, _Tr, _Alloc>& _Right) + { // swap _Left and _Right hash_multisets + _Left.swap(_Right); + } +_STDEXT_END + +#ifdef _MSC_EXTENSIONS +#if _DEFINE_DEPRECATED_HASH_CLASSES +#pragma warning(push) +#pragma warning(disable: 4996) + +_STD_BEGIN + + // TEMPLATE CLASS hash_set +template >, + class _Alloc = allocator<_Kty> > + class _DEPRECATED hash_set + : public _STDEXT _Hash< _STDEXT _Hset_traits<_Kty, _Tr, _Alloc, false> > + { // hash table of key values, unique keys +public: + typedef hash_set<_Kty, _Tr, _Alloc> _Myt; + typedef _STDEXT _Hash< _STDEXT _Hset_traits<_Kty, _Tr, _Alloc, false> > _Mybase; + typedef _Kty key_type; + typedef _Tr key_compare; + typedef typename _Mybase::value_compare value_compare; + typedef typename _Mybase::allocator_type allocator_type; + typedef typename _Mybase::size_type size_type; + typedef typename _Mybase::difference_type difference_type; + typedef typename _Mybase::pointer pointer; + typedef typename _Mybase::const_pointer const_pointer; + typedef typename _Mybase::reference reference; + typedef typename _Mybase::const_reference const_reference; + typedef typename _Mybase::iterator iterator; + typedef typename _Mybase::const_iterator const_iterator; + typedef typename _Mybase::reverse_iterator reverse_iterator; + typedef typename _Mybase::const_reverse_iterator + const_reverse_iterator; + typedef typename _Mybase::value_type value_type; + + hash_set() + : _Mybase(key_compare(), allocator_type()) + { // construct empty set from defaults + } + + explicit hash_set(const key_compare& _Traits) + : _Mybase(_Traits, allocator_type()) + { // construct empty set from comparator + } + + hash_set(const key_compare& _Traits, const allocator_type& _Al) + : _Mybase(_Traits, _Al) + { // construct empty set from comparator and allocator + } + + template + hash_set(_Iter _First, _Iter _Last) + : _Mybase(key_compare(), allocator_type()) + { // construct set from sequence, defaults + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + hash_set(_Iter _First, _Iter _Last, + const key_compare& _Traits) + : _Mybase(_Traits, allocator_type()) + { // construct set from sequence, comparator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + hash_set(_Iter _First, _Iter _Last, + const key_compare& _Traits, const allocator_type& _Al) + : _Mybase(_Traits, _Al) + { // construct set from sequence, comparator, and allocator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + }; + +template inline + void swap(hash_set<_Kty, _Tr, _Alloc>& _Left, + hash_set<_Kty, _Tr, _Alloc>& _Right) + { // swap _Left and _Right hash_sets + _Left.swap(_Right); + } + + // TEMPLATE CLASS hash_multiset +template >, + class _Alloc = allocator<_Kty> > + class _DEPRECATED hash_multiset + : public _STDEXT _Hash< _STDEXT _Hset_traits<_Kty, _Tr, _Alloc, true> > + { // hash table of key values, non-unique keys +public: + typedef hash_multiset<_Kty, _Tr, _Alloc> _Myt; + typedef _STDEXT _Hash< _STDEXT _Hset_traits<_Kty, _Tr, _Alloc, true> > _Mybase; + typedef _Kty key_type; + typedef _Tr key_compare; + typedef typename _Mybase::value_compare value_compare; + typedef typename _Mybase::allocator_type allocator_type; + typedef typename _Mybase::size_type size_type; + typedef typename _Mybase::difference_type difference_type; + typedef typename _Mybase::pointer pointer; + typedef typename _Mybase::const_pointer const_pointer; + typedef typename _Mybase::reference reference; + typedef typename _Mybase::const_reference const_reference; + typedef typename _Mybase::iterator iterator; + typedef typename _Mybase::const_iterator const_iterator; + typedef typename _Mybase::reverse_iterator reverse_iterator; + typedef typename _Mybase::const_reverse_iterator + const_reverse_iterator; + typedef typename _Mybase::value_type value_type; + + hash_multiset() + : _Mybase(key_compare(), allocator_type()) + { // construct empty set from defaults + } + + explicit hash_multiset(const key_compare& _Traits) + : _Mybase(_Traits, allocator_type()) + { // construct empty set from comparator + } + + hash_multiset(const key_compare& _Traits, + const allocator_type& _Al) + : _Mybase(_Traits, _Al) + { // construct empty set from comparator and allocator + } + + template + hash_multiset(_Iter _First, _Iter _Last) + : _Mybase(key_compare(), allocator_type()) + { // construct from sequence, defaults + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + hash_multiset(_Iter _First, _Iter _Last, + const key_compare& _Traits) + : _Mybase(_Traits, allocator_type()) + { // construct from sequence, comparator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + hash_multiset(_Iter _First, _Iter _Last, + const key_compare& _Traits, const allocator_type& _Al) + : _Mybase(_Traits, _Al) + { // construct from sequence, comparator, and allocator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + iterator insert(const value_type& _Val) + { // insert a key value + return (_Mybase::insert(_Val).first); + } + + iterator insert(iterator _Where, const value_type& _Val) + { // insert a key value, with hint + return (_Mybase::insert(_Where, _Val)); + } + + template + void insert(_Iter _First, _Iter _Last) + { // insert [_First, _Last), arbitrary iterators + for (; _First != _Last; ++_First) + insert(*_First); + } + }; + +template inline + void swap(hash_multiset<_Kty, _Tr, _Alloc>& _Left, + hash_multiset<_Kty, _Tr, _Alloc>& _Right) + { // swap _Left and _Right hash_multisets + _Left.swap(_Right); + } + +_STD_END + +#pragma warning(pop) +#endif /* _DEFINE_DEPRECATED_HASH_CLASSES */ +#endif /* _MSC_EXTENSIONS */ + +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _HASH_SET_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/io.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/io.h new file mode 100644 index 00000000..b8879282 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/io.h @@ -0,0 +1,290 @@ +/*** +*io.h - declarations for low-level file handling and I/O functions +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the function declarations for the low-level +* file handling and I/O functions. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_IO +#define _INC_IO + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +/* + * Currently, all MS C compilers for Win32 platforms default to 8 byte + * alignment. + */ +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifndef _POSIX_ + +#ifdef __cplusplus +extern "C" { +#endif + + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + +#ifndef _INTPTR_T_DEFINED +#ifdef _WIN64 +typedef __int64 intptr_t; +#else +typedef _W64 int intptr_t; +#endif +#define _INTPTR_T_DEFINED +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +#ifndef _TIME_T_DEFINED +#ifdef _WIN64 +typedef __int64 time_t; /* time value */ +#else +typedef _W64 long time_t; /* time value */ +#endif +#define _TIME_T_DEFINED /* avoid multiple def's of time_t */ +#endif + +#ifndef _TIME64_T_DEFINED +#if _INTEGRAL_MAX_BITS >= 64 +typedef __int64 __time64_t; /* 64-bit time value */ +#endif +#define _TIME64_T_DEFINED +#endif + +#ifndef _FSIZE_T_DEFINED +typedef unsigned long _fsize_t; /* Could be 64 bits for Win32 */ +#define _FSIZE_T_DEFINED +#endif + +#ifndef _FINDDATA_T_DEFINED + +struct _finddata_t { + unsigned attrib; + time_t time_create; /* -1 for FAT file systems */ + time_t time_access; /* -1 for FAT file systems */ + time_t time_write; + _fsize_t size; + char name[260]; +}; + +#if _INTEGRAL_MAX_BITS >= 64 + +struct _finddatai64_t { + unsigned attrib; + time_t time_create; /* -1 for FAT file systems */ + time_t time_access; /* -1 for FAT file systems */ + time_t time_write; + __int64 size; + char name[260]; +}; + +struct __finddata64_t { + unsigned attrib; + __time64_t time_create; /* -1 for FAT file systems */ + __time64_t time_access; /* -1 for FAT file systems */ + __time64_t time_write; + __int64 size; + char name[260]; +}; + +#endif + +#define _FINDDATA_T_DEFINED +#endif + +#ifndef _WFINDDATA_T_DEFINED + +struct _wfinddata_t { + unsigned attrib; + time_t time_create; /* -1 for FAT file systems */ + time_t time_access; /* -1 for FAT file systems */ + time_t time_write; + _fsize_t size; + wchar_t name[260]; +}; + +#if _INTEGRAL_MAX_BITS >= 64 + +struct _wfinddatai64_t { + unsigned attrib; + time_t time_create; /* -1 for FAT file systems */ + time_t time_access; /* -1 for FAT file systems */ + time_t time_write; + __int64 size; + wchar_t name[260]; +}; + +struct __wfinddata64_t { + unsigned attrib; + __time64_t time_create; /* -1 for FAT file systems */ + __time64_t time_access; /* -1 for FAT file systems */ + __time64_t time_write; + __int64 size; + wchar_t name[260]; +}; + +#endif + +#define _WFINDDATA_T_DEFINED +#endif + +/* File attribute constants for _findfirst() */ + +#define _A_NORMAL 0x00 /* Normal file - No read/write restrictions */ +#define _A_RDONLY 0x01 /* Read only file */ +#define _A_HIDDEN 0x02 /* Hidden file */ +#define _A_SYSTEM 0x04 /* System file */ +#define _A_SUBDIR 0x10 /* Subdirectory */ +#define _A_ARCH 0x20 /* Archive file */ + +/* function prototypes */ + +_CRTIMP int __cdecl _access(const char *, int); +_CRTIMP int __cdecl _chmod(const char *, int); +_CRTIMP int __cdecl _chsize(int, long); +_CRTIMP int __cdecl _close(int); +_CRTIMP int __cdecl _commit(int); +_CRTIMP int __cdecl _creat(const char *, int); +_CRTIMP int __cdecl _dup(int); +_CRTIMP int __cdecl _dup2(int, int); +_CRTIMP int __cdecl _eof(int); +_CRTIMP long __cdecl _filelength(int); +_CRTIMP intptr_t __cdecl _findfirst(const char *, struct _finddata_t *); +_CRTIMP int __cdecl _findnext(intptr_t, struct _finddata_t *); +_CRTIMP int __cdecl _findclose(intptr_t); +_CRTIMP int __cdecl _isatty(int); +_CRTIMP int __cdecl _locking(int, int, long); +_CRTIMP long __cdecl _lseek(int, long, int); +_CRTIMP char * __cdecl _mktemp(char *); +_CRTIMP int __cdecl _open(const char *, int, ...); +_CRTIMP int __cdecl _pipe(int *, unsigned int, int); +_CRTIMP int __cdecl _read(int, void *, unsigned int); +_CRTIMP int __cdecl remove(const char *); +_CRTIMP int __cdecl rename(const char *, const char *); +_CRTIMP int __cdecl _setmode(int, int); +_CRTIMP int __cdecl _sopen(const char *, int, int, ...); +_CRTIMP long __cdecl _tell(int); +_CRTIMP int __cdecl _umask(int); +_CRTIMP int __cdecl _unlink(const char *); +_CRTIMP int __cdecl _write(int, const void *, unsigned int); + +#if _INTEGRAL_MAX_BITS >= 64 +_CRTIMP __int64 __cdecl _filelengthi64(int); +_CRTIMP intptr_t __cdecl _findfirsti64(const char *, struct _finddatai64_t *); +_CRTIMP intptr_t __cdecl _findfirst64(const char *, struct __finddata64_t *); +_CRTIMP int __cdecl _findnexti64(intptr_t, struct _finddatai64_t *); +_CRTIMP int __cdecl _findnext64(intptr_t, struct __finddata64_t *); +_CRTIMP __int64 __cdecl _lseeki64(int, __int64, int); +_CRTIMP __int64 __cdecl _telli64(int); +#endif + +#ifndef _WIO_DEFINED + +/* wide function prototypes, also declared in wchar.h */ + +_CRTIMP int __cdecl _waccess(const wchar_t *, int); +_CRTIMP int __cdecl _wchmod(const wchar_t *, int); +_CRTIMP int __cdecl _wcreat(const wchar_t *, int); +_CRTIMP intptr_t __cdecl _wfindfirst(const wchar_t *, struct _wfinddata_t *); +_CRTIMP int __cdecl _wfindnext(intptr_t, struct _wfinddata_t *); +_CRTIMP int __cdecl _wunlink(const wchar_t *); +_CRTIMP int __cdecl _wrename(const wchar_t *, const wchar_t *); +_CRTIMP int __cdecl _wopen(const wchar_t *, int, ...); +_CRTIMP int __cdecl _wsopen(const wchar_t *, int, int, ...); +_CRTIMP wchar_t * __cdecl _wmktemp(wchar_t *); + +#if _INTEGRAL_MAX_BITS >= 64 +_CRTIMP intptr_t __cdecl _wfindfirsti64(const wchar_t *, struct _wfinddatai64_t *); +_CRTIMP int __cdecl _wfindnexti64(intptr_t, struct _wfinddatai64_t *); +_CRTIMP intptr_t __cdecl _wfindfirst64(const wchar_t *, struct __wfinddata64_t *); +_CRTIMP int __cdecl _wfindnext64(intptr_t, struct __wfinddata64_t *); +#endif + +#define _WIO_DEFINED +#endif + + +_CRTIMP intptr_t __cdecl _get_osfhandle(int); +_CRTIMP int __cdecl _open_osfhandle(intptr_t, int); + +#if !__STDC__ + +/* Non-ANSI names for compatibility */ + +_CRTIMP int __cdecl access(const char *, int); +_CRTIMP int __cdecl chmod(const char *, int); +_CRTIMP int __cdecl chsize(int, long); +_CRTIMP int __cdecl close(int); +_CRTIMP int __cdecl creat(const char *, int); +_CRTIMP int __cdecl dup(int); +_CRTIMP int __cdecl dup2(int, int); +_CRTIMP int __cdecl eof(int); +_CRTIMP long __cdecl filelength(int); +_CRTIMP int __cdecl isatty(int); +_CRTIMP int __cdecl locking(int, int, long); +_CRTIMP long __cdecl lseek(int, long, int); +_CRTIMP char * __cdecl mktemp(char *); +_CRTIMP int __cdecl open(const char *, int, ...); +_CRTIMP int __cdecl read(int, void *, unsigned int); +_CRTIMP int __cdecl setmode(int, int); +_CRTIMP int __cdecl sopen(const char *, int, int, ...); +_CRTIMP long __cdecl tell(int); +_CRTIMP int __cdecl umask(int); +_CRTIMP int __cdecl unlink(const char *); +_CRTIMP int __cdecl write(int, const void *, unsigned int); + +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#endif /* _POSIX_ */ + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_IO */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/iomanip b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/iomanip new file mode 100644 index 00000000..72b1a4f2 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/iomanip @@ -0,0 +1,92 @@ +// iomanip standard header +#pragma once +#ifndef _IOMANIP_ +#define _IOMANIP_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // TEMPLATE STRUCT _Fillobj +template + struct _Fillobj + { // store fill character + _Fillobj(_Elem _Ch) + : _Fill(_Ch) + { // construct from fill character + } + + _Elem _Fill; // the fill character + }; + + // TEMPLATE FUNCTION setfill +template inline + _Fillobj<_Elem> __cdecl setfill(_Elem _Ch) + { // return a _Fillobj manipulator + return (_Fillobj<_Elem>(_Ch)); + } + +template inline + basic_istream<_Elem, _Traits>& + __cdecl operator>>(basic_istream<_Elem, _Traits>& _Istr, + const _Fillobj<_Elem>& _Manip) + { // set fill character in input stream + _Istr.fill(_Manip._Fill); + return (_Istr); + } + +template inline + basic_ostream<_Elem, _Traits>& + __cdecl operator<<(basic_ostream<_Elem, _Traits>& _Ostr, + const _Fillobj<_Elem>& _Manip) + { // set fill character in output stream + _Ostr.fill(_Manip._Fill); + return (_Ostr); + } + + // TEMPLATE STRUCT _Smanip +template + struct _Smanip + { // store function pointer and argument value + _Smanip(void (__cdecl *_Left)(ios_base&, _Arg), _Arg _Val) + : _Pfun(_Left), _Manarg(_Val) + { // construct from function pointer and argument value + } + + void (__cdecl *_Pfun)(ios_base&, _Arg); // the function pointer + _Arg _Manarg; // the argument value + }; + +template inline + basic_istream<_Elem, _Traits>& __cdecl operator>>( + basic_istream<_Elem, _Traits>& _Istr, const _Smanip<_Arg>& _Manip) + { // extract by calling function with input stream and argument + (*_Manip._Pfun)(_Istr, _Manip._Manarg); + return (_Istr); + } + +template inline + basic_ostream<_Elem, _Traits>& __cdecl operator<<( + basic_ostream<_Elem, _Traits>& _Ostr, const _Smanip<_Arg>& _Manip) + { // insert by calling function with output stream and argument + (*_Manip._Pfun)(_Ostr, _Manip._Manarg); + return (_Ostr); + } + + // INSTANTIATIONS +_CRTIMP2 _Smanip __cdecl resetiosflags(ios_base::fmtflags); +_CRTIMP2 _Smanip __cdecl setiosflags(ios_base::fmtflags); +_CRTIMP2 _Smanip __cdecl setbase(int); +_CRTIMP2 _Smanip __cdecl setprecision(streamsize); +_CRTIMP2 _Smanip __cdecl setw(streamsize); +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _IOMANIP_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ios b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ios new file mode 100644 index 00000000..44bdc9fc --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ios @@ -0,0 +1,307 @@ +// ios standard header +#pragma once +#ifndef _IOS_ +#define _IOS_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // TEMPLATE CLASS basic_ios +template + class basic_ios + : public ios_base + { // base class for basic_istream/basic_ostream +public: + typedef basic_ios<_Elem, _Traits> _Myt; + typedef basic_ostream<_Elem, _Traits> _Myos; + typedef basic_streambuf<_Elem, _Traits> _Mysb; + typedef ctype<_Elem> _Ctype; + typedef _Elem char_type; + typedef _Traits traits_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + + explicit basic_ios(_Mysb *_Strbuf) + { // construct from stream buffer pointer + init(_Strbuf); + } + + virtual ~basic_ios() + { // destroy the object + } + + void clear(iostate _State = goodbit, bool _Except = false) + { // set state, possibly reraise exception + ios_base::clear((iostate)(_Mystrbuf == 0 + ? (int)_State | (int)badbit : (int)_State), _Except); + } + + void clear(io_state _State) + { // set state to _State + clear((iostate)_State); + } + + void setstate(iostate _State, bool _Except = false) + { // merge _State into state, possible reraise exception + if (_State != goodbit) + clear((iostate)((int)rdstate() | (int)_State), _Except); + } + + void setstate(io_state _State) + { // merge _State into state + setstate((iostate)_State); + } + + _Myt& copyfmt(const _Myt& _Right) + { // copy format parameters + _Tiestr = _Right.tie(); + _Fillch = _Right.fill(); + ios_base::copyfmt(_Right); + return (*this); + } + + _Myos *tie() const + { // return tie pointer + return (_Tiestr); + } + + _Myos *tie(_Myos *_Newtie) + { // set tie pointer + _Myos *_Oldtie = _Tiestr; + _Tiestr = _Newtie; + return (_Oldtie); + } + + _Mysb *rdbuf() const + { // return stream buffer pointer + return (_Mystrbuf); + } + + _Mysb *rdbuf(_Mysb *_Strbuf) + { // set stream buffer pointer + _Mysb *_Oldstrbuf = _Mystrbuf; + _Mystrbuf = _Strbuf; + clear(); + return (_Oldstrbuf); + } + + locale imbue(const locale& _Loc) + { // set locale to argument + locale _Oldlocale = ios_base::imbue(_Loc); + if (rdbuf() != 0) + rdbuf()->pubimbue(_Loc); + return (_Oldlocale); + } + + _Elem fill() const + { // return fill character + return (_Fillch); + } + + _Elem fill(_Elem _Newfill) + { // set fill character + _Elem _Oldfill = _Fillch; + _Fillch = _Newfill; + return (_Oldfill); + } + + char narrow(_Elem _Ch, char _Dflt = '\0') const + { // convert _Ch to byte using imbued locale + const _Ctype& _Ctype_fac = _USE(getloc(), _Ctype); + return (_Ctype_fac.narrow(_Ch, _Dflt)); + } + + _Elem widen(char _Byte) const + { // convert _Byte to character using imbued locale + const _Ctype& _Ctype_fac = _USE(getloc(), _Ctype); + return (_Ctype_fac.widen(_Byte)); + } + +protected: + void init(_Mysb *_Strbuf = 0, + bool _Isstd = false) + { // initialize with stream buffer pointer + _Init(); // initialize ios_base + _Mystrbuf = _Strbuf; + _Tiestr = 0; + _Fillch = widen(' '); + + if (_Mystrbuf == 0) + setstate(badbit); + + if (_Isstd) + _Addstd(); // special handling for standard streams + else + _Stdstr = 0; + } + + basic_ios() + { // default constructor, do nothing + } + +private: + basic_ios(const _Myt&); // not defined + _Myt& operator=(const _Myt&); // not defined + + _Mysb *_Mystrbuf; // pointer to stream buffer + _Myos *_Tiestr; // pointer to tied output stream + _Elem _Fillch; // the fill character + }; + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 basic_ios >; +template class _CRTIMP2 basic_ios >; + + + + #endif /* _DLL_CPPLIB */ + + // MANIPULATORS +inline ios_base& __cdecl boolalpha(ios_base& _Iosbase) + { // set boolalpha + _Iosbase.setf(ios_base::boolalpha); + return (_Iosbase); + } + +inline ios_base& __cdecl dec(ios_base& _Iosbase) + { // set basefield to dec + _Iosbase.setf(ios_base::dec, ios_base::basefield); + return (_Iosbase); + } + +inline ios_base& __cdecl fixed(ios_base& _Iosbase) + { // set floatfield to fixed + _Iosbase.setf(ios_base::fixed, ios_base::floatfield); + return (_Iosbase); + } + +inline ios_base& __cdecl hex(ios_base& _Iosbase) + { // set basefield to hex + _Iosbase.setf(ios_base::hex, ios_base::basefield); + return (_Iosbase); + } + +inline ios_base& __cdecl internal(ios_base& _Iosbase) + { // set adjustfield to internal + _Iosbase.setf(ios_base::internal, ios_base::adjustfield); + return (_Iosbase); + } + +inline ios_base& __cdecl left(ios_base& _Iosbase) + { // set adjustfield to left + _Iosbase.setf(ios_base::left, ios_base::adjustfield); + return (_Iosbase); + } + +inline ios_base& __cdecl noboolalpha(ios_base& _Iosbase) + { // clear boolalpha + _Iosbase.unsetf(ios_base::boolalpha); + return (_Iosbase); + } + +inline ios_base& __cdecl noshowbase(ios_base& _Iosbase) + { // clear showbase + _Iosbase.unsetf(ios_base::showbase); + return (_Iosbase); + } + +inline ios_base& __cdecl noshowpoint(ios_base& _Iosbase) + { // clear showpoint + _Iosbase.unsetf(ios_base::showpoint); + return (_Iosbase); + } + +inline ios_base& __cdecl noshowpos(ios_base& _Iosbase) + { // clear showpos + _Iosbase.unsetf(ios_base::showpos); + return (_Iosbase); + } + +inline ios_base& __cdecl noskipws(ios_base& _Iosbase) + { // clear skipws + _Iosbase.unsetf(ios_base::skipws); + return (_Iosbase); + } + +inline ios_base& __cdecl nounitbuf(ios_base& _Iosbase) + { // clear unitbuf + _Iosbase.unsetf(ios_base::unitbuf); + return (_Iosbase); + } + +inline ios_base& __cdecl nouppercase(ios_base& _Iosbase) + { // clear uppercase + _Iosbase.unsetf(ios_base::uppercase); + return (_Iosbase); + } + +inline ios_base& __cdecl oct(ios_base& _Iosbase) + { // set oct in basefield + _Iosbase.setf(ios_base::oct, ios_base::basefield); + return (_Iosbase); + } + +inline ios_base& __cdecl right(ios_base& _Iosbase) + { // set right in adjustfield + _Iosbase.setf(ios_base::right, ios_base::adjustfield); + return (_Iosbase); + } + +inline ios_base& __cdecl scientific(ios_base& _Iosbase) + { // set scientific in floatfield + _Iosbase.setf(ios_base::scientific, ios_base::floatfield); + return (_Iosbase); + } + +inline ios_base& __cdecl showbase(ios_base& _Iosbase) + { // set showbase + _Iosbase.setf(ios_base::showbase); + return (_Iosbase); + } + +inline ios_base& __cdecl showpoint(ios_base& _Iosbase) + { // set showpoint + _Iosbase.setf(ios_base::showpoint); + return (_Iosbase); + } + +inline ios_base& __cdecl showpos(ios_base& _Iosbase) + { // set showpos + _Iosbase.setf(ios_base::showpos); + return (_Iosbase); + } + +inline ios_base& __cdecl skipws(ios_base& _Iosbase) + { // set skipws + _Iosbase.setf(ios_base::skipws); + return (_Iosbase); + } + +inline ios_base& __cdecl unitbuf(ios_base& _Iosbase) + { // set unitbuf + _Iosbase.setf(ios_base::unitbuf); + return (_Iosbase); + } + +inline ios_base& __cdecl uppercase(ios_base& _Iosbase) + { // set uppercase + _Iosbase.setf(ios_base::uppercase); + return (_Iosbase); + } +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _IOS_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/iosfwd b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/iosfwd new file mode 100644 index 00000000..decbd6ba --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/iosfwd @@ -0,0 +1,533 @@ +// iosfwd standard header +#pragma once +#ifndef _IOSFWD_ +#define _IOSFWD_ +#include +#include +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // STREAM POSITIONING TYPES (from ) + + #ifdef _WIN64 +typedef __int64 streamoff; +typedef __int64 streamsize; + + #else /* _WIN64 */ +typedef long streamoff; +typedef int streamsize; + #endif /* _WIN64 */ + +extern _CRTIMP2 fpos_t _Fpz; +extern _CRTIMP2 const streamoff _BADOFF; + + // TEMPLATE CLASS fpos (from ) +template + class fpos + { // store arbitrary file position + typedef fpos<_Statetype> _Myt; + +public: + fpos(streamoff _Off = 0) + : _Myoff(_Off), _Fpos(_Fpz), _Mystate(_Stz) + { // construct with stream offset + } + + fpos(_Statetype _State, fpos_t _Fileposition) + : _Myoff(0), _Fpos(_Fileposition), _Mystate(_State) + { // construct with conversion state and C file position + } + + _Statetype state() const + { // return conversion state + return (_Mystate); + } + + void state(_Statetype _State) + { // set conversion state + _Mystate = _State; + } + + fpos_t seekpos() const + { // return C file position + return (_Fpos); + } + + operator streamoff() const + { // return offset + return (_Myoff + _FPOSOFF(_Fpos)); + } + + streamoff operator-(const _Myt& _Right) const + { // return difference of file positions as an offset + return ((streamoff)*this - (streamoff)_Right); + } + + _Myt& operator+=(streamoff _Off) + { // add offset + _Myoff += _Off; + return (*this); + } + + _Myt& operator-=(streamoff _Off) + { // subtract offset + _Myoff -= _Off; + return (*this); + } + + _Myt operator+(streamoff _Off) const + { // return this + offset + _Myt _Tmp = *this; + return (_Tmp += _Off); + } + + _Myt operator-(streamoff _Off) const + { // return this - offset + _Myt _Tmp = *this; + return (_Tmp -= _Off); + } + + bool operator==(const _Myt& _Right) const + { // test for file position equality + return ((streamoff)*this == (streamoff)_Right); + } + + bool operator!=(const _Myt& _Right) const + { // test for file position inequality + return (!(*this == _Right)); + } + +private: + static _Statetype _Stz; // initial conversion state + streamoff _Myoff; // stream offset + fpos_t _Fpos; // C file position + _Statetype _Mystate; // current conversion state + }; + + // STATIC fpos::_Stz OBJECT +template + _Statetype fpos<_Statetype>::_Stz; + + #define _POS_TYPE_FROM_STATE(postype, state, position) \ + postype(state, position) + #define _POS_TYPE_TO_FPOS_T(pos) pos.seekpos() + #define _POS_TYPE_TO_STATE(pos) pos.state() + +typedef fpos streampos; +typedef streampos wstreampos; + + // TEMPLATE STRUCT char_traits (FROM ) +template + struct char_traits + { // properties of a string or stream element + typedef _Elem char_type; + typedef _Elem int_type; + typedef streampos pos_type; + typedef streamoff off_type; + typedef mbstate_t state_type; + + static void __cdecl assign(_Elem& _Left, const _Elem& _Right) + { // assign an element + _Left = _Right; + } + + static bool __cdecl eq(const _Elem& _Left, const _Elem& _Right) + { // test for element equality + return (_Left == _Right); + } + + static bool __cdecl lt(const _Elem& _Left, const _Elem& _Right) + { // test if _Left precedes _Right + return (_Left < _Right); + } + + static int __cdecl compare(const _Elem *_First1, + const _Elem *_First2, size_t _Count) + { // compare [_First1, _First1 + _Count) with [_First2, ...) + for (; 0 < _Count; --_Count, ++_First1, ++_First2) + if (!eq(*_First1, *_First2)) + return (lt(*_First1, *_First2) ? -1 : +1); + return (0); + } + + static size_t __cdecl length(const _Elem *_First) + { // find length of null-terminated sequence + size_t _Count; + for (_Count = 0; !eq(*_First, _Elem()); ++_First) + ++_Count; + return (_Count); + } + + static _Elem *__cdecl copy(_Elem *_First1, + const _Elem *_First2, size_t _Count) + { // copy [_First1, _First1 + _Count) to [_First2, ...) + _Elem *_Next = _First1; + for (; 0 < _Count; --_Count, ++_Next, ++_First2) + assign(*_Next, *_First2); + return (_First1); + } + + static const _Elem *__cdecl find(const _Elem *_First, + size_t _Count, const _Elem& _Ch) + { // look for _Ch in [_First, _First + _Count) + for (; 0 < _Count; --_Count, ++_First) + if (eq(*_First, _Ch)) + return (_First); + return (0); + } + + static _Elem *__cdecl move(_Elem *_First1, + const _Elem *_First2, size_t _Count) + { // copy [_First1, _First1 + _Count) to [_First2, ...) + _Elem *_Next = _First1; + if (_First2 < _Next && _Next < _First2 + _Count) + for (_Next += _Count, _First2 += _Count; 0 < _Count; --_Count) + assign(*--_Next, *--_First2); + else + for (; 0 < _Count; --_Count, ++_Next, ++_First2) + assign(*_Next, *_First2); + return (_First1); + } + + static _Elem *__cdecl assign(_Elem *_First, + size_t _Count, _Elem _Ch) + { // assign _Count * _Ch to [_First, ...) + _Elem *_Next = _First; + for (; 0 < _Count; --_Count, ++_Next) + assign(*_Next, _Ch); + return (_First); + } + + static _Elem __cdecl to_char_type(const int_type& _Meta) + { // convert metacharacter to character + return (_Meta); + } + + static int_type __cdecl to_int_type(const _Elem& _Ch) + { // convert character to metacharacter + return (_Ch); + } + + static bool __cdecl eq_int_type(const int_type& _Left, + const int_type& _Right) + { // test for metacharacter equality + return (_Left == _Right); + } + + static int_type __cdecl eof() + { // return end-of-file metacharacter + return ((int_type)EOF); + } + + static int_type __cdecl not_eof(const int_type& _Meta) + { // return anything but EOF + return (_Meta != eof() ? _Meta : !eof()); + } + }; + + // STRUCT char_traits +template<> struct _CRTIMP2 char_traits + { // properties of a string or stream wchar_t element + typedef wchar_t _Elem; + typedef _Elem char_type; // for overloads + typedef wint_t int_type; + typedef streampos pos_type; + typedef streamoff off_type; + typedef mbstate_t state_type; + + static void __cdecl assign(_Elem& _Left, const _Elem& _Right) + { // assign an element + _Left = _Right; + } + + static bool __cdecl eq(const _Elem& _Left, const _Elem& _Right) + { // test for element equality + return (_Left == _Right); + } + + static bool __cdecl lt(const _Elem& _Left, const _Elem& _Right) + { // test if _Left precedes _Right + return (_Left < _Right); + } + + static int __cdecl compare(const _Elem *_First1, const _Elem *_First2, + size_t _Count) + { // compare [_First1, _First1 + _Count) with [_First2, ...) + return (::wmemcmp(_First1, _First2, _Count)); + } + + static size_t __cdecl length(const _Elem *_First) + { // find length of null-terminated sequence + return (::wcslen(_First)); + } + + static _Elem *__cdecl copy(_Elem *_First1, const _Elem *_First2, + size_t _Count) + { // copy [_First1, _First1 + _Count) to [_First2, ...) + return (::wmemcpy(_First1, _First2, _Count)); + } + + static const _Elem *__cdecl find(const _Elem *_First, size_t _Count, + const _Elem& _Ch) + { // look for _Ch in [_First, _First + _Count) + return ((const _Elem *)::wmemchr(_First, _Ch, _Count)); + } + + static _Elem *__cdecl move(_Elem *_First1, const _Elem *_First2, + size_t _Count) + { // copy [_First1, _First1 + _Count) to [_First2, ...) + return (::wmemmove(_First1, _First2, _Count)); + } + + static _Elem *__cdecl assign(_Elem *_First, size_t _Count, _Elem _Ch) + { // assign _Count * _Ch to [_First, ...) + return (::wmemset(_First, _Ch, _Count)); + } + + static _Elem __cdecl to_char_type(const int_type& _Meta) + { // convert metacharacter to character + return (_Meta); + } + + static int_type __cdecl to_int_type(const _Elem& _Ch) + { // convert character to metacharacter + return (_Ch); + } + + static bool __cdecl eq_int_type(const int_type& _Left, + const int_type& _Right) + { // test for metacharacter equality + return (_Left == _Right); + } + + static int_type __cdecl eof() + { // return end-of-file metacharacter + return (WEOF); + } + + static int_type __cdecl not_eof(const int_type& _Meta) + { // return anything but EOF + return (_Meta != eof() ? _Meta : !eof()); + } + }; + + + // STRUCT char_traits (FROM ) +template<> struct _CRTIMP2 char_traits + { // properties of a string or stream char element + typedef char _Elem; + typedef _Elem char_type; + typedef int int_type; + typedef streampos pos_type; + typedef streamoff off_type; + typedef mbstate_t state_type; + + static void __cdecl assign(_Elem& _Left, const _Elem& _Right) + { // assign an element + _Left = _Right; + } + + static bool __cdecl eq(const _Elem& _Left, const _Elem& _Right) + { // test for element equality + return (_Left == _Right); + } + + static bool __cdecl lt(const _Elem& _Left, const _Elem& _Right) + { // test if _Left precedes _Right + return (_Left < _Right); + } + + static int __cdecl compare(const _Elem *_First1, const _Elem *_First2, + size_t _Count) + { // compare [_First1, _First1 + _Count) with [_First2, ...) + return (::memcmp(_First1, _First2, _Count)); + } + + static size_t __cdecl length(const _Elem *_First) + { // find length of null-terminated string + return (::strlen(_First)); + } + + static _Elem *__cdecl copy(_Elem *_First1, const _Elem *_First2, + size_t _Count) + { // copy [_First1, _First1 + _Count) to [_First2, ...) + return ((_Elem *)::memcpy(_First1, _First2, _Count)); + } + + static const _Elem *__cdecl find(const _Elem *_First, size_t _Count, + const _Elem& _Ch) + { // look for _Ch in [_First, _First + _Count) + return ((const _Elem *)::memchr(_First, _Ch, _Count)); + } + + static _Elem *__cdecl move(_Elem *_First1, const _Elem *_First2, + size_t _Count) + { // copy [_First1, _First1 + _Count) to [_First2, ...) + return ((_Elem *)::memmove(_First1, _First2, _Count)); + } + + static _Elem *__cdecl assign(_Elem *_First, size_t _Count, _Elem _Ch) + { // assign _Count * _Ch to [_First, ...) + return ((_Elem *)::memset(_First, _Ch, _Count)); + } + + static _Elem __cdecl to_char_type(const int_type& _Meta) + { // convert metacharacter to character + return ((_Elem)_Meta); + } + + static int_type __cdecl to_int_type(const _Elem& _Ch) + { // convert character to metacharacter + return ((unsigned char)_Ch); + } + + static bool __cdecl eq_int_type(const int_type& _Left, + const int_type& _Right) + { // test for metacharacter equality + return (_Left == _Right); + } + + static int_type __cdecl eof() + { // return end-of-file metacharacter + return (EOF); + } + + static int_type __cdecl not_eof(const int_type& _Meta) + { // return anything but EOF + return (_Meta != eof() ? _Meta : !eof()); + } + }; + + // FORWARD REFERENCES +template + class allocator; +class ios_base; +template > + class basic_ios; +template > + class istreambuf_iterator; +template > + class ostreambuf_iterator; +template > + class basic_streambuf; +template > + class basic_istream; +template > + class basic_ostream; +template > + class basic_iostream; +template, + class _Alloc = allocator<_Elem> > + class basic_stringbuf; +template, + class _Alloc = allocator<_Elem> > + class basic_istringstream; +template, + class _Alloc = allocator<_Elem> > + class basic_ostringstream; +template, + class _Alloc = allocator<_Elem> > + class basic_stringstream; +template > + class basic_filebuf; +template > + class basic_ifstream; +template > + class basic_ofstream; +template > + class basic_fstream; + + #ifdef _DLL_CPPLIB +template + class num_get; +template + class num_put; +template + class collate; + #endif /* _DLL_CPPLIB */ + + // char TYPEDEFS +typedef basic_ios > ios; +typedef basic_streambuf > streambuf; +typedef basic_istream > istream; +typedef basic_ostream > ostream; +typedef basic_iostream > iostream; +typedef basic_stringbuf, + allocator > stringbuf; +typedef basic_istringstream, + allocator > istringstream; +typedef basic_ostringstream, + allocator > ostringstream; +typedef basic_stringstream, + allocator > stringstream; +typedef basic_filebuf > filebuf; +typedef basic_ifstream > ifstream; +typedef basic_ofstream > ofstream; +typedef basic_fstream > fstream; + + // wchat_t TYPEDEFS +typedef basic_ios > wios; +typedef basic_streambuf > + wstreambuf; +typedef basic_istream > wistream; +typedef basic_ostream > wostream; +typedef basic_iostream > wiostream; +typedef basic_stringbuf, + allocator > wstringbuf; +typedef basic_istringstream, + allocator > wistringstream; +typedef basic_ostringstream, + allocator > wostringstream; +typedef basic_stringstream, + allocator > wstringstream; +typedef basic_filebuf > wfilebuf; +typedef basic_ifstream > wifstream; +typedef basic_ofstream > wofstream; +typedef basic_fstream > wfstream; + + + + #ifdef _DLL_CPPLIB +typedef num_get > > + numget; +typedef num_get > > + wnumget; +typedef num_put > > + numput; +typedef num_put > > + wnumput; +typedef collate ncollate; +typedef collate wcollate; + #endif /* _DLL_CPPLIB */ + +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _IOSFWD_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/iostream b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/iostream new file mode 100644 index 00000000..01eea4c2 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/iostream @@ -0,0 +1,40 @@ +// iostream standard header for Microsoft +#pragma once +#ifndef _IOSTREAM_ +#define _IOSTREAM_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // OBJECTS +extern _CRTIMP2 istream cin, *_Ptr_cin; +extern _CRTIMP2 ostream cout, *_Ptr_cout; +extern _CRTIMP2 ostream cerr, *_Ptr_cerr; +extern _CRTIMP2 ostream clog, *_Ptr_clog; + + // CLASS _Winit +class _CRTIMP2 _Winit { +public: + _Winit(); + ~_Winit(); +private: + static int _Init_cnt; + }; + + // WIDE OBJECTS +extern _CRTIMP2 wistream wcin, *_Ptr_wcin; +extern _CRTIMP2 wostream wcout, *_Ptr_wcout; +extern _CRTIMP2 wostream wcerr, *_Ptr_wcerr; +extern _CRTIMP2 wostream wclog, *_Ptr_wclog; +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _IOSTREAM_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/iso646.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/iso646.h new file mode 100644 index 00000000..0577720b --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/iso646.h @@ -0,0 +1,25 @@ +/* iso646.h standard header */ +#pragma once +#ifndef _ISO646 +#define _ISO646 + +#if !defined(__cplusplus) || defined(_MSC_EXTENSIONS) + #define and && + #define and_eq &= + #define bitand & + #define bitor | + #define compl ~ + #define not ! + #define not_eq != + #define or || + #define or_eq |= + #define xor ^ + #define xor_eq ^= +#endif /* !__cplusplus || _MSC_EXTENSIONS */ + +#endif /* _ISO646 */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/istream b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/istream new file mode 100644 index 00000000..61956ca0 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/istream @@ -0,0 +1,1128 @@ +// istream standard header +#pragma once +#ifndef _ISTREAM_ +#define _ISTREAM_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // TEMPLATE CLASS basic_istream +template + class basic_istream + : virtual public basic_ios<_Elem, _Traits> + { // control extractions from a stream buffer +public: + typedef basic_istream<_Elem, _Traits> _Myt; + typedef basic_ios<_Elem, _Traits> _Myios; + typedef basic_streambuf<_Elem, _Traits> _Mysb; + typedef istreambuf_iterator<_Elem, _Traits> _Iter; + typedef ctype<_Elem> _Ctype; + typedef num_get<_Elem, _Iter> _Nget; + + explicit basic_istream(_Mysb *_Strbuf, bool _Isstd = false, + bool _Noinit = false) + : _Chcount(0) + { // construct from stream buffer pointer + if (!_Noinit) + _Myios::init(_Strbuf, _Isstd); + } + + basic_istream(_Uninitialized) + { // construct uninitialized + ios_base::_Addstd(); + } + + virtual ~basic_istream() + { // destroy the object + } + + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + + // TEMPLATE CLASS sentry + class _Sentry_base + { // stores thread lock and reference to input stream + public: + _Sentry_base(_Myt& _Istr) + : _Myistr(_Istr) + { // lock the stream buffer, if there + if (_Myistr.rdbuf() != 0) + _Myistr.rdbuf()->_Lock(); + } + + ~_Sentry_base() + { // destroy after unlocking + if (_Myistr.rdbuf() != 0) + _Myistr.rdbuf()->_Unlock(); + } + + _Myt& _Myistr; // the input stream, for _Unlock call at destruction + }; + + class sentry + : public _Sentry_base + { // stores thread lock and result of _Ipfx call + public: + explicit sentry(_Myt& _Istr, bool _Noskip = false) + : _Sentry_base(_Istr) + { // construct locking and calling _Ipfx + _Ok = this->_Myistr._Ipfx(_Noskip); + } + + operator bool() const + { // test if _Ipfx succeeded + return (_Ok); + } + + private: + sentry(const sentry&); // not defined + sentry& operator=(const sentry&); // not defined + + bool _Ok; // true if _Ipfx succeeded at construction + }; + + bool _Ipfx(bool _Noskip = false) + { // test stream state and skip whitespace as needed + if (ios_base::good()) + { // state okay, flush tied stream and skip whitespace + if (_Myios::tie() != 0) + _Myios::tie()->flush(); + + if (!_Noskip && ios_base::flags() & ios_base::skipws) + { // skip whitespace + const _Ctype& _Ctype_fac = _USE(ios_base::getloc(), _Ctype); + + _TRY_IO_BEGIN + int_type _Meta = _Myios::rdbuf()->sgetc(); + + for (; ; _Meta = _Myios::rdbuf()->snextc()) + if (_Traits::eq_int_type(_Traits::eof(), _Meta)) + { // end of file, quit + _Myios::setstate(ios_base::eofbit); + break; + } + else if (!_Ctype_fac.is(_Ctype::space, + _Traits::to_char_type(_Meta))) + break; // not whitespace, quit + _CATCH_IO_END + } + + if (ios_base::good()) + return (true); + } + _Myios::setstate(ios_base::failbit); + return (false); + } + + bool ipfx(bool _Noskip = false) + { // test stream state and skip whitespace as needed (retained) + return _Ipfx(_Noskip); + } + + void isfx() + { // perform any wrapup (retained) + } + + _Myt& operator>>(_Myt& (__cdecl *_Pfn)(_Myt&)) + { // call basic_istream manipulator + return ((*_Pfn)(*this)); + } + + _Myt& operator>>(_Myios& (__cdecl *_Pfn)(_Myios&)) + { // call basic_ios manipulator + (*_Pfn)(*(_Myios *)this); + return (*this); + } + + _Myt& operator>>(ios_base& (__cdecl *_Pfn)(ios_base&)) + { // call ios_base manipulator + (*_Pfn)(*(ios_base *)this); + return (*this); + } + + _Myt& operator>>(_Bool& _Val) + { // extract a boolean + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to extract + const _Nget& _Nget_fac = _USE(ios_base::getloc(), _Nget); + + _TRY_IO_BEGIN + _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0), + *this, _State, _Val); + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator>>(short& _Val) + { // extract a short + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to extract + long _Tmp = 0; + const _Nget& _Nget_fac = _USE(ios_base::getloc(), _Nget); + + _TRY_IO_BEGIN + _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0), + *this, _State, _Tmp); + _CATCH_IO_END + + if (_State & ios_base::failbit + || _Tmp < SHRT_MIN || SHRT_MAX < _Tmp) + _State |= ios_base::failbit; + else + _Val = (short)_Tmp; + } + + _Myios::setstate(_State); + return (*this); + } + + /* Note that if your stream is wchar_t, and you are not using native wchar_t + Then this operation will be unavailable as there is an explicit + specialisation further down this file that is designed to treat an + unsigned short as a character. + + If you wish to read or write unsigned shorts to wchar_t streams, you should + consider making wchar_t a native type by turning on /Zc:wchar_t + */ + _Myt& operator>>(unsigned short& _Val) + { // extract an unsigned short + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to extract + const _Nget& _Nget_fac = _USE(ios_base::getloc(), _Nget); + + _TRY_IO_BEGIN + _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0), + *this, _State, _Val); + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator>>(int& _Val) + { // extract an int + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to extract + long _Tmp = 0; + const _Nget& _Nget_fac = _USE(ios_base::getloc(), _Nget); + + _TRY_IO_BEGIN + _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0), + *this, _State, _Tmp); + _CATCH_IO_END + + if (_State & ios_base::failbit + || _Tmp < INT_MIN || INT_MAX < _Tmp) + _State |= ios_base::failbit; + else + _Val = _Tmp; + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator>>(unsigned int& _Val) + { // extract an unsigned int + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + if (_Ok) + { // state okay, use facet to extract + const _Nget& _Nget_fac = _USE(ios_base::getloc(), _Nget); + + _TRY_IO_BEGIN + _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0), + *this, _State, _Val); + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator>>(long& _Val) + { // extract a long + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to extract + const _Nget& _Nget_fac = _USE(ios_base::getloc(), _Nget); + _TRY_IO_BEGIN + _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0), + *this, _State, _Val); + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator>>(unsigned long& _Val) + { // extract an unsigned long + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to extract + const _Nget& _Nget_fac = _USE(ios_base::getloc(), _Nget); + + _TRY_IO_BEGIN + _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0), + *this, _State, _Val); + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + #ifdef _LONGLONG + _Myt& operator>>(_LONGLONG& _Val) + { // extract a long long + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to extract + const _Nget& _Nget_fac = _USE(ios_base::getloc(), _Nget); + + _TRY_IO_BEGIN + _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0), + *this, _State, _Val); + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator>>(_ULONGLONG& _Val) + { // extract an unsigned long long + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + if (_Ok) + { // state okay, use facet to extract + const _Nget& _Nget_fac = _USE(ios_base::getloc(), _Nget); + + _TRY_IO_BEGIN + _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0), + *this, _State, _Val); + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + #endif /* _LONGLONG */ + + _Myt& operator>>(float& _Val) + { // extract a float + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to extract + const _Nget& _Nget_fac = _USE(ios_base::getloc(), _Nget); + + _TRY_IO_BEGIN + _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0), + *this, _State, _Val); + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator>>(double& _Val) + { // extract a double + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + if (_Ok) + { // state okay, use facet to extract + const _Nget& _Nget_fac = _USE(ios_base::getloc(), _Nget); + + _TRY_IO_BEGIN + _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0), + *this, _State, _Val); + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator>>(long double& _Val) + { // extract a long double + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to extract + const _Nget& _Nget_fac = _USE(ios_base::getloc(), _Nget); + _TRY_IO_BEGIN + _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0), + *this, _State, _Val); + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator>>(void *& _Val) + { // extract a void pointer + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to extract + const _Nget& _Nget_fac = _USE(ios_base::getloc(), _Nget); + + _TRY_IO_BEGIN + _Nget_fac.get(_Iter(_Myios::rdbuf()), _Iter(0), + *this, _State, _Val); + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator>>(_Mysb *_Strbuf) + { // extract until end-of-file into a stream buffer + ios_base::iostate _State = ios_base::goodbit; + bool _Copied = false; + const sentry _Ok(*this); + + if (_Ok && _Strbuf != 0) + { // state okay, extract characters + _TRY_IO_BEGIN + int_type _Meta = _Myios::rdbuf()->sgetc(); + + for (; ; _Meta = _Myios::rdbuf()->snextc()) + if (_Traits::eq_int_type(_Traits::eof(), _Meta)) + { // end of file, quit + _State |= ios_base::eofbit; + break; + } + else + { // got a character, insert it into buffer + _TRY_BEGIN + if (_Traits::eq_int_type(_Traits::eof(), + _Strbuf->sputc(_Traits::to_char_type(_Meta)))) + break; + _CATCH_ALL + break; + _CATCH_END + _Copied = true; + } + _CATCH_IO_END + } + + _Myios::setstate(!_Copied ? _State | ios_base::failbit : _State); + return (*this); + } + + int_type get() + { // extract a metacharacter + int_type _Meta = 0; + ios_base::iostate _State = ios_base::goodbit; + _Chcount = 0; + const sentry _Ok(*this, true); + + if (!_Ok) + _Meta = _Traits::eof(); // state not okay, return EOF + else + { // state okay, extract a character + _TRY_IO_BEGIN + _Meta = _Myios::rdbuf()->sbumpc(); + + if (_Traits::eq_int_type(_Traits::eof(), _Meta)) + _State |= ios_base::eofbit | ios_base::failbit; // end of file + else + ++_Chcount; // got a character, count it + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (_Meta); + } + + _Myt& get(_Elem *_Str, streamsize _Count) + { // get up to _Count characters into NTCS + return (get(_Str, _Count, _Myios::widen('\n'))); + } + + _Myt& get(_Elem *_Str, + streamsize _Count, _Elem _Delim) + { // get up to _Count characters into NTCS, stop before _Delim + ios_base::iostate _State = ios_base::goodbit; + _Chcount = 0; + const sentry _Ok(*this, true); + + if (_Ok && 0 < _Count) + { // state okay, extract characters + _TRY_IO_BEGIN + int_type _Meta = _Myios::rdbuf()->sgetc(); + + for (; 0 < --_Count; _Meta = _Myios::rdbuf()->snextc()) + if (_Traits::eq_int_type(_Traits::eof(), _Meta)) + { // end of file, quit + _State |= ios_base::eofbit; + break; + } + else if (_Traits::to_char_type(_Meta) == _Delim) + break; // got a delimiter, quit + else + { // got a character, add it to string + *_Str++ = _Traits::to_char_type(_Meta); + ++_Chcount; + } + _CATCH_IO_END + } + + _Myios::setstate(_Chcount == 0 + ? _State | ios_base::failbit : _State); + *_Str = _Elem(); // add terminating null character + return (*this); + } + + _Myt& get(_Elem& _Ch) + { // get a character + int_type _Meta = get(); + if (!_Traits::eq_int_type(_Traits::eof(), _Meta)) + _Ch = _Traits::to_char_type(_Meta); + return (*this); + } + + _Myt& get(_Mysb& _Strbuf) + { // extract up to newline and insert into stream buffer + return (get(_Strbuf, _Myios::widen('\n'))); + } + + _Myt& get(_Mysb& _Strbuf, _Elem _Delim) + { // extract up to delimiter and insert into stream buffer + ios_base::iostate _State = ios_base::goodbit; + _Chcount = 0; + const sentry _Ok(*this, true); + + if (_Ok) + { // state okay, use facet to extract + _TRY_IO_BEGIN + int_type _Meta = _Myios::rdbuf()->sgetc(); + + for (; ; _Meta = _Myios::rdbuf()->snextc()) + if (_Traits::eq_int_type(_Traits::eof(), _Meta)) + { // end of file, quit + _State |= ios_base::eofbit; + break; + } + else + { // got a character, insert it into stream buffer + _TRY_BEGIN + _Elem _Ch = _Traits::to_char_type(_Meta); + if (_Ch == _Delim + || _Traits::eq_int_type(_Traits::eof(), + _Strbuf.sputc(_Ch))) + break; + _CATCH_ALL + break; + _CATCH_END + ++_Chcount; + } + _CATCH_IO_END + } + + if (_Chcount == 0) + _State |= ios_base::failbit; + _Myios::setstate(_State); + return (*this); + } + + _Myt& getline(_Elem *_Str, streamsize _Count) + { // get up to _Count characters into NTCS, discard newline + return (getline(_Str, _Count, _Myios::widen('\n'))); + } + + _Myt& getline(_Elem *_Str, + streamsize _Count, _Elem _Delim) + { // get up to _Count characters into NTCS, discard _Delim + ios_base::iostate _State = ios_base::goodbit; + _Chcount = 0; + const sentry _Ok(*this, true); + + if (_Ok && 0 < _Count) + { // state okay, use facet to extract + int_type _Metadelim = _Traits::to_int_type(_Delim); + + _TRY_IO_BEGIN + int_type _Meta = _Myios::rdbuf()->sgetc(); + + for (; ; _Meta = _Myios::rdbuf()->snextc()) + if (_Traits::eq_int_type(_Traits::eof(), _Meta)) + { // end of file, quit + _State |= ios_base::eofbit; + break; + } + else if (_Meta == _Metadelim) + { // got a delimiter, discard it and quit + ++_Chcount; + _Myios::rdbuf()->sbumpc(); + break; + } + else if (--_Count <= 0) + { // buffer full, quit + _State |= ios_base::failbit; + break; + } + else + { // got a character, add it to string + ++_Chcount; + *_Str++ = _Traits::to_char_type(_Meta); + } + _CATCH_IO_END + } + + *_Str = _Elem(); // add terminating null character + _Myios::setstate(_Chcount == 0 ? _State | ios_base::failbit : _State); + return (*this); + } + + _Myt& ignore(streamsize _Count = 1, + int_type _Metadelim = _Traits::eof()) + { // ignore up to _Count characters, discarding delimiter + ios_base::iostate _State = ios_base::goodbit; + _Chcount = 0; + const sentry _Ok(*this, true); + + if (_Ok && 0 < _Count) + { // state okay, use facet to extract + _TRY_IO_BEGIN + for (; ; ) + { // get a metacharacter if more room in buffer + int_type _Meta; + if (_Count != INT_MAX && --_Count < 0) + break; // buffer full, quit + else if (_Traits::eq_int_type(_Traits::eof(), + _Meta = _Myios::rdbuf()->sbumpc())) + { // end of file, quit + _State |= ios_base::eofbit; + break; + } + else + { // got a character, count it + ++_Chcount; + if (_Meta == _Metadelim) + break; // got a delimiter, quit + } + } + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& read(_Elem *_Str, streamsize _Count) + { // read up to _Count characters into buffer + ios_base::iostate _State = ios_base::goodbit; + _Chcount = 0; + const sentry _Ok(*this, true); + + if (_Ok) + { // state okay, use facet to extract + _TRY_IO_BEGIN + const streamsize _Num = _Myios::rdbuf()->sgetn(_Str, _Count); + _Chcount += _Num; + if (_Num != _Count) + _State |= ios_base::eofbit | ios_base::failbit; // short read + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + streamsize readsome(_Elem *_Str, + streamsize _Count) + { // read up to _Count characters into buffer, without blocking + ios_base::iostate _State = ios_base::goodbit; + _Chcount = 0; + const sentry _Ok(*this, true); + streamsize _Num; + + if (!_Ok) + _State |= ios_base::failbit; // no buffer, fail + else if ((_Num = _Myios::rdbuf()->in_avail()) < 0) + _State |= ios_base::eofbit; // no characters available + else if (0 < _Num) + read(_Str, _Num < _Count ? _Num : _Count); // read available + + _Myios::setstate(_State); + return (gcount()); + } + + int_type peek() + { // return next character, unconsumed + ios_base::iostate _State = ios_base::goodbit; + _Chcount = 0; + int_type _Meta = 0; + const sentry _Ok(*this, true); + + if (!_Ok) + _Meta = _Traits::eof(); // state not okay, return EOF + else + { // state okay, read a character + _TRY_IO_BEGIN + if (_Traits::eq_int_type(_Traits::eof(), + _Meta = _Myios::rdbuf()->sgetc())) + _State |= ios_base::eofbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (_Meta); + } + + _Myt& putback(_Elem _Ch) + { // put back a character + ios_base::iostate _State = ios_base::goodbit; + _Chcount = 0; + const sentry _Ok(*this, true); + + if (_Ok) + { // state okay, put character back + _TRY_IO_BEGIN + if (_Traits::eq_int_type(_Traits::eof(), + _Myios::rdbuf()->sputbackc(_Ch))) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& unget() + { // put back last read character + ios_base::iostate _State = ios_base::goodbit; + _Chcount = 0; + const sentry _Ok(*this, true); + + if (_Ok) + { // state okay, use facet to extract + _TRY_IO_BEGIN + if (_Traits::eq_int_type(_Traits::eof(), + _Myios::rdbuf()->sungetc())) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + streamsize gcount() const + { // get count from last extraction + return (_Chcount); + } + + int sync() + { // synchronize with input source + ios_base::iostate _State = ios_base::goodbit; + int _Ans; + + if (_Myios::rdbuf() == 0) + _Ans = -1; // no buffer, fail + else if (_Myios::rdbuf()->pubsync() == -1) + { // stream buffer sync failed, fail + _State |= ios_base::badbit; + _Ans = -1; + } + else + _Ans = 0; // success + + _Myios::setstate(_State); + return (_Ans); + } + + _Myt& seekg(pos_type _Pos) + { // set input stream position to _Pos + if (!ios_base::fail() + && (off_type)_Myios::rdbuf()->pubseekpos(_Pos, + ios_base::in) == _BADOFF) + _Myios::setstate(ios_base::failbit); + return (*this); + } + + _Myt& seekg(off_type _Off, ios_base::seekdir _Way) + { // change input stream position by _Off, according to _Way + if (!ios_base::fail() + && (off_type)_Myios::rdbuf()->pubseekoff(_Off, _Way, + ios_base::in) == _BADOFF) + _Myios::setstate(ios_base::failbit); + return (*this); + } + + pos_type tellg() + { // return input stream position + if (!ios_base::fail()) + return (_Myios::rdbuf()->pubseekoff(0, + ios_base::cur, ios_base::in)); + else + return (pos_type(_BADOFF)); + } + +private: + streamsize _Chcount; // the character count + }; + +#ifndef _NATIVE_WCHAR_T_DEFINED +/* +This explicit template specialisation reads a single unicode character from the stream. + +By default, the compiler treats wchar_t as if it were a typedef for unsigned short. This means +that we cannot distinguish between an unsigned short and a wchar_t in the library. To be most +consistent with previous practice, we add this explicit specialisation to ensure that a single +unsigned short is read and written as a character. + +If you wish to read and write unsigned shorts as integers, we recommend you consider making +wchar_t a native type by using the /Zc:wchar_t compiler switch. +*/ +template <> inline + basic_istream >& + basic_istream >::operator>>( + unsigned short& _Ch) + { // extract a character + typedef basic_istream > _Myis; + typedef char_traits _Traits; + _Myis::int_type _Meta; + _Myis &_Istr=*this; + ios_base::iostate _State = ios_base::goodbit; + const _Myis::sentry _Ok(_Istr); + + if (_Ok) + { // state okay, extract characters + _TRY_IO_BEGIN + _Meta = _Istr.rdbuf()->sbumpc(); + if (_Traits::eq_int_type(_Traits::eof(), _Meta)) + _State |= ios_base::eofbit | ios_base::failbit; // end of file + else + _Ch = _Traits::to_char_type(_Meta); // got a character + _CATCH_IO_(_Istr) + } + + _Istr.setstate(_State); + return (_Istr); + } +#endif + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 basic_istream >; +template class _CRTIMP2 basic_istream >; + + + + #endif /* _DLL_CPPLIB */ + + // TEMPLATE CLASS basic_iostream +template + class basic_iostream + : public basic_istream<_Elem, _Traits>, + public basic_ostream<_Elem, _Traits> + { // control insertions and extractions from a stream buffer +public: + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + + explicit basic_iostream(basic_streambuf<_Elem, _Traits> *_Strbuf) + : basic_istream<_Elem, _Traits>(_Strbuf, false, true), + basic_ostream<_Elem, _Traits>(_Strbuf) + { // construct from stream buffer pointer + } + + virtual ~basic_iostream() + { // destroy the object + } + }; + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 basic_iostream >; +template class _CRTIMP2 basic_iostream >; + + + + #endif /* _DLL_CPPLIB */ + + // EXTRACTORS +template inline + basic_istream<_Elem, _Traits>& __cdecl operator>>( + basic_istream<_Elem, _Traits>& _Istr, _Elem *_Str) + { // extract NTBS + typedef basic_istream<_Elem, _Traits> _Myis; + typedef ctype<_Elem> _Ctype; + ios_base::iostate _State = ios_base::goodbit; + _Elem *_Str0 = _Str; + const typename _Myis::sentry _Ok(_Istr); + + if (_Ok) + { // state okay, extract characters + const _Ctype& _Ctype_fac = _USE(_Istr.getloc(), _Ctype); + + _TRY_IO_BEGIN + streamsize _Count = 0 < _Istr.width() ? _Istr.width() : INT_MAX; + typename _Myis::int_type _Meta = _Istr.rdbuf()->sgetc(); + _Elem _Ch; + for (; 0 < --_Count; _Meta = _Istr.rdbuf()->snextc()) + if (_Traits::eq_int_type(_Traits::eof(), _Meta)) + { // end of file, quit + _State |= ios_base::eofbit; + break; + } + else if (_Ctype_fac.is(_Ctype::space, + _Ch = _Traits::to_char_type(_Meta)) + || _Ch == _Elem()) + break; // whitespace or nul, quit + else + *_Str++ = _Traits::to_char_type(_Meta); // add it to string + _CATCH_IO_(_Istr) + } + + *_Str = _Elem(); // add terminating null character + _Istr.width(0); + _Istr.setstate(_Str == _Str0 ? _State | ios_base::failbit : _State); + return (_Istr); + } + +template inline + basic_istream<_Elem, _Traits>& __cdecl operator>>( + basic_istream<_Elem, _Traits>& _Istr, _Elem& _Ch) + { // extract a character + typedef basic_istream<_Elem, _Traits> _Myis; + typename _Myis::int_type _Meta; + ios_base::iostate _State = ios_base::goodbit; + const typename _Myis::sentry _Ok(_Istr); + + if (_Ok) + { // state okay, extract characters + _TRY_IO_BEGIN + _Meta = _Istr.rdbuf()->sbumpc(); + if (_Traits::eq_int_type(_Traits::eof(), _Meta)) + _State |= ios_base::eofbit | ios_base::failbit; // end of file + else + _Ch = _Traits::to_char_type(_Meta); // got a character + _CATCH_IO_(_Istr) + } + + _Istr.setstate(_State); + return (_Istr); + } + +template inline + basic_istream<_Elem, _Traits>& __cdecl operator>>( + basic_istream<_Elem, _Traits>& _Istr, signed char *_Str) + { // extract a signed char NTBS + return (_Istr >> (char *)_Str); + } + +template inline + basic_istream<_Elem, _Traits>& __cdecl operator>>( + basic_istream<_Elem, _Traits>& _Istr, signed char& _Ch) + { // extract a signed char + return (_Istr >> (char&)_Ch); + } + +template inline + basic_istream<_Elem, _Traits>& __cdecl operator>>( + basic_istream<_Elem, _Traits>& _Istr, unsigned char *_Str) + { // extract an unsigned char NTBS + return (_Istr >> (char *)_Str); + } + +template inline + basic_istream<_Elem, _Traits>& __cdecl operator>>( + basic_istream<_Elem, _Traits>& _Istr, unsigned char& _Ch) + { // extract an unsigned char + return (_Istr >> (char&)_Ch); + } + +template inline + basic_istream<_Elem, _Traits>& __cdecl operator>>( + basic_istream<_Elem, _Traits>& _Istr, signed short * _Str) + { // extract a wide character NTBS + return (_Istr >> (wchar_t *)_Str); + } + + #ifdef _DLL_CPPLIB +template _CRTIMP2 basic_istream >& __cdecl + operator>>(basic_istream >&, char *); +template _CRTIMP2 basic_istream >& __cdecl + operator>>(basic_istream >&, char&); +template _CRTIMP2 basic_istream >& __cdecl + operator>>(basic_istream >&, signed char *); +template _CRTIMP2 basic_istream >& __cdecl + operator>>(basic_istream >&, signed char&); +template _CRTIMP2 basic_istream >& __cdecl + operator>>(basic_istream >&, unsigned char *); +template _CRTIMP2 basic_istream >& __cdecl + operator>>(basic_istream >&, unsigned char&); +template _CRTIMP2 basic_istream >& __cdecl + operator>>(basic_istream >&, wchar_t *); +template _CRTIMP2 basic_istream >& __cdecl + operator>>(basic_istream >&, wchar_t&); + + + + #endif /* _DLL_CPPLIB */ + + // MANIPULATORS +template inline + basic_istream<_Elem, _Traits>& + __cdecl ws(basic_istream<_Elem, _Traits>& _Istr) + { // consume whitespace + typedef basic_istream<_Elem, _Traits> _Myis; + typedef ctype<_Elem> _Ctype; + + if (!_Istr.eof()) + { // not at eof, okay to construct sentry and skip + ios_base::iostate _State = ios_base::goodbit; + const typename _Myis::sentry _Ok(_Istr, true); + + if (_Ok) + { // state okay, extract characters + const _Ctype& _Ctype_fac = _USE(_Istr.getloc(), _Ctype); + + _TRY_IO_BEGIN + for (typename _Traits::int_type _Meta = _Istr.rdbuf()->sgetc(); ; + _Meta = _Istr.rdbuf()->snextc()) + if (_Traits::eq_int_type(_Traits::eof(), _Meta)) + { // end of file, quit + _State |= ios_base::eofbit; + break; + } + else if (!_Ctype_fac.is(_Ctype::space, + _Traits::to_char_type(_Meta))) + break; // not whitespace, quit + _CATCH_IO_(_Istr) + } + + _Istr.setstate(_State); + } + return (_Istr); + } + +_CRTIMP2 inline basic_istream >& + __cdecl ws(basic_istream >& _Istr) + { // consume whitespace + typedef char _Elem; + typedef char_traits<_Elem> _Traits; + + if (!_Istr.eof()) + { // not at eof, okay to construct sentry and skip + ios_base::iostate _State = ios_base::goodbit; + const basic_istream<_Elem, _Traits>::sentry _Ok(_Istr, true); + + if (_Ok) + { // state okay, use facet to extract + const ctype<_Elem>& _Ctype_fac = + _USE(_Istr.getloc(), ctype<_Elem>); + + _TRY_IO_BEGIN + for (_Traits::int_type _Meta = _Istr.rdbuf()->sgetc(); ; + _Meta = _Istr.rdbuf()->snextc()) + if (_Traits::eq_int_type(_Traits::eof(), _Meta)) + { // end of file, quit + _State |= ios_base::eofbit; + break; + } + else if (!_Ctype_fac.is(ctype<_Elem>::space, + _Traits::to_char_type(_Meta))) + break; // not whitespace, quit + _CATCH_IO_(_Istr) + } + + _Istr.setstate(_State); + } + return (_Istr); + } + +_CRTIMP2 inline basic_istream >& + __cdecl ws(basic_istream >& _Istr) + { // consume whitespace + typedef wchar_t _Elem; + typedef char_traits<_Elem> _Traits; + + if (!_Istr.eof()) + { // not at eof, okay to construct sentry and skip + ios_base::iostate _State = ios_base::goodbit; + const basic_istream<_Elem, _Traits>::sentry _Ok(_Istr, true); + + if (_Ok) + { // state okay, use facet to extract + const ctype<_Elem>& _Ctype_fac = + _USE(_Istr.getloc(), ctype<_Elem>); + + _TRY_IO_BEGIN + for (_Traits::int_type _Meta = _Istr.rdbuf()->sgetc(); ; + _Meta = _Istr.rdbuf()->snextc()) + if (_Traits::eq_int_type(_Traits::eof(), _Meta)) + { // end of file, quit + _State |= ios_base::eofbit; + break; + } + else if (!_Ctype_fac.is(ctype<_Elem>::space, + _Traits::to_char_type(_Meta))) + break; // not whitespace, quit + _CATCH_IO_(_Istr) + } + + _Istr.setstate(_State); + } + return (_Istr); + } + + +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _ISTREAM_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/iterator b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/iterator new file mode 100644 index 00000000..e750edf1 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/iterator @@ -0,0 +1,362 @@ +// iterator standard header +#pragma once +#ifndef _ITERATOR_ +#define _ITERATOR_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) + +_STD_BEGIN + + // TEMPLATE CLASS back_insert_iterator +template + class back_insert_iterator + : public _Outit + { // wrap pushes to back of container as output iterator +public: + typedef _Container container_type; + typedef typename _Container::reference reference; + + explicit back_insert_iterator(_Container& _Cont) + : container(&_Cont) + { // construct with container + } + + back_insert_iterator<_Container>& operator=( + typename _Container::const_reference _Val) + { // push value into container + container->push_back(_Val); + return (*this); + } + + back_insert_iterator<_Container>& operator*() + { // pretend to return designated value + return (*this); + } + + back_insert_iterator<_Container>& operator++() + { // pretend to preincrement + return (*this); + } + + back_insert_iterator<_Container> operator++(int) + { // pretend to postincrement + return (*this); + } + +protected: + _Container *container; // pointer to container + }; + + // TEMPLATE FUNCTION back_inserter +template inline + back_insert_iterator<_Container> back_inserter(_Container& _Cont) + { // return a back_insert_iterator + return (std::back_insert_iterator<_Container>(_Cont)); + } + + // TEMPLATE CLASS front_insert_iterator +template + class front_insert_iterator + : public _Outit + { // wrap pushes to front of container as output iterator +public: + typedef _Container container_type; + typedef typename _Container::reference reference; + + explicit front_insert_iterator(_Container& _Cont) + : container(&_Cont) + { // construct with container + } + + front_insert_iterator<_Container>& operator=( + typename _Container::const_reference _Val) + { // push value into container + container->push_front(_Val); + return (*this); + } + + front_insert_iterator<_Container>& operator*() + { // pretend to return designated value + return (*this); + } + + front_insert_iterator<_Container>& operator++() + { // pretend to preincrement + return (*this); + } + + front_insert_iterator<_Container> operator++(int) + { // pretend to postincrement + return (*this); + } + +protected: + _Container *container; // pointer to container + }; + + // TEMPLATE FUNCTION front_inserter +template inline + front_insert_iterator<_Container> front_inserter(_Container& _Cont) + { // return front_insert_iterator + return (std::front_insert_iterator<_Container>(_Cont)); + } + + // TEMPLATE CLASS insert_iterator +template + class insert_iterator + : public _Outit + { // wrap inserts into container as output iterator +public: + typedef _Container container_type; + typedef typename _Container::reference reference; + + insert_iterator(_Container& _Cont, typename _Container::iterator _Where) + : container(&_Cont), iter(_Where) + { // construct with container and iterator + } + + insert_iterator<_Container>& operator=( + typename _Container::const_reference _Val) + { // insert into container and increment stored iterator + iter = container->insert(iter, _Val); + ++iter; + return (*this); + } + + insert_iterator<_Container>& operator*() + { // pretend to return designated value + return (*this); + } + + insert_iterator<_Container>& operator++() + { // pretend to preincrement + return (*this); + } + + insert_iterator<_Container>& operator++(int) + { // pretend to postincrement + return (*this); + } + +protected: + _Container *container; // pointer to container + typename _Container::iterator iter; // iterator into container + }; + + // TEMPLATE FUNCTION inserter +template inline + insert_iterator<_Container> inserter(_Container& _Cont, _Iter _Where) + { // return insert_iterator + return (std::insert_iterator<_Container>(_Cont, _Where)); + } + + // TEMPLATE CLASS istream_iterator +template, + class _Diff = ptrdiff_t> + class istream_iterator + : public iterator + { // wrap _Ty extracts from input stream as input iterator +public: + typedef istream_iterator<_Ty, _Elem, _Traits, _Diff> _Myt; + typedef _Elem char_type; + typedef _Traits traits_type; + typedef basic_istream<_Elem, _Traits> istream_type; + + istream_iterator() + : _Myistr(0) + { // construct singular iterator + } + + istream_iterator(istream_type& _Istr) + : _Myistr(&_Istr) + { // construct with input stream + _Getval(); + } + + const _Ty& operator*() const + { // return designated value + return (_Myval); + } + + const _Ty *operator->() const + { // return pointer to class object + return (&**this); + } + + _Myt& operator++() + { // preincrement + _Getval(); + return (*this); + } + + _Myt operator++(int) + { // postincrement + _Myt _Tmp = *this; + ++*this; + return (_Tmp); + } + + bool _Equal(const _Myt& _Right) const + { // test for iterator equality + return (_Myistr == _Right._Myistr); + } + +protected: + void _Getval() + { // get a _Ty value if possible + if (_Myistr != 0 && !(*_Myistr >> _Myval)) + _Myistr = 0; + } + + istream_type *_Myistr; // pointer to input stream + _Ty _Myval; // lookahead value (valid if _Myistr is not null) + }; + + // istream_iterator TEMPLATE OPERATORS +template inline + bool operator==( + const istream_iterator<_Ty, _Elem, _Traits, _Diff>& _Left, + const istream_iterator<_Ty, _Elem, _Traits, _Diff>& _Right) + { // test for istream_iterator equality + return (_Left._Equal(_Right)); + } + +template inline + bool operator!=( + const istream_iterator<_Ty, _Elem, _Traits, _Diff>& _Left, + const istream_iterator<_Ty, _Elem, _Traits, _Diff>& _Right) + { // test for istream_iterator inequality + return (!(_Left == _Right)); + } + + // TEMPLATE CLASS ostream_iterator +template > + class ostream_iterator + : public _Outit + { // wrap _Ty inserts to output stream as output iterator +public: + typedef _Elem char_type; + typedef _Traits traits_type; + typedef basic_ostream<_Elem, _Traits> ostream_type; + + ostream_iterator(ostream_type& _Ostr, + const _Elem *_Delim = 0) + : _Myostr(&_Ostr), _Mydelim(_Delim) + { // construct from output stream and delimiter + } + + ostream_iterator<_Ty, _Elem, _Traits>& operator=(const _Ty& _Val) + { // insert value into output stream, followed by delimiter + *_Myostr << _Val; + if (_Mydelim != 0) + *_Myostr << _Mydelim; + return (*this); + } + + ostream_iterator<_Ty, _Elem, _Traits>& operator*() + { // pretend to return designated value + return (*this); + } + + ostream_iterator<_Ty, _Elem, _Traits>& operator++() + { // pretend to preincrement + return (*this); + } + + ostream_iterator<_Ty, _Elem, _Traits> operator++(int) + { // pretend to postincrement + return (*this); + } + +protected: + const _Elem *_Mydelim; // pointer to delimiter string (NB: not freed) + ostream_type *_Myostr; // pointer to output stream + }; + + // TEMPLATE FUNCTION _Val_type +template inline + typename iterator_traits<_Iter>::value_type *_Val_type(_Iter) + { // return value type from arbitrary argument + return (0); + } + + + // TEMPLATE FUNCTION advance +template inline + void advance(_InIt& _Where, _Diff _Off) + { // increment iterator by offset, arbitrary iterators + _Advance(_Where, _Off, _Iter_cat(_Where)); + } + +template inline + void _Advance(_InIt& _Where, _Diff _Off, input_iterator_tag) + { // increment iterator by offset, input iterators + for (; 0 < _Off; --_Off) + ++_Where; + } + +template inline + void _Advance(_FI& _Where, _Diff _Off, forward_iterator_tag) + { // increment iterator by offset, forward iterators + for (; 0 < _Off; --_Off) + ++_Where; + } + +template inline + void _Advance(_BI& _Where, _Diff _Off, bidirectional_iterator_tag) + { // increment iterator by offset, bidirectional iterators + for (; 0 < _Off; --_Off) + ++_Where; + for (; _Off < 0; ++_Off) + --_Where; + } + +template inline + void _Advance(_RI& _Where, _Diff _Off, random_access_iterator_tag) + { // increment iterator by offset, random-access iterators + _Where += _Off; + } + + // TEMPLATE FUNCTION _Dist_type +template inline + typename iterator_traits<_Iter>::difference_type + *_Dist_type(_Iter) + { // return distance type from arbitrary argument + return (0); + } + + +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _ITERATOR_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + */ + +/* + * This file is derived from software bearing the following + * restrictions: + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this + * software and its documentation for any purpose is hereby + * granted without fee, provided that the above copyright notice + * appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation. + * Hewlett-Packard Company makes no representations about the + * suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ivec.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ivec.h new file mode 100644 index 00000000..645c477d --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ivec.h @@ -0,0 +1,837 @@ +/** +*** Copyright (C) 1985-1999 Intel Corporation. All rights reserved. +*** +*** The information and source code contained herein is the exclusive +*** property of Intel Corporation and may not be disclosed, examined +*** or reproduced in whole or in part without explicit written authorization +*** from the company. +*** +**/ + +/* + * Definition of a C++ class interface to MMX(TM) instruction intrinsics. + * + */ + +#ifndef IVEC_H_INCLUDED +#define IVEC_H_INCLUDED + +#if !defined __cplusplus + #error ERROR: This file is only supported in C++ compilations! +#endif /* !__cplusplus */ + +#include +#include + +/* + * Define _SILENCE_IVEC_C4799 to disable warning C4799 inside this header. + * Be careful that any code that uses these functions properly executes EMMS + * or _m_empty() after using any MMX instruction and before using the x87 NDP. + */ +#if defined(_SILENCE_IVEC_C4799) + #pragma warning(push) + #pragma warning(disable: 4799) +#endif + +/* + * Define _ENABLE_VEC_DEBUG to enable std::ostream inserters for debug output + */ +#if defined(_ENABLE_VEC_DEBUG) + #include +#endif + +/* If using MSVC5.0, explicit keyword should be used */ +#if (_MSC_VER >= 1100) + #define EXPLICIT explicit +#else + #if (__ICL) + #define EXPLICIT __explicit /* If MSVC4.x & ICL, use __explicit */ + #else + #define EXPLICIT /* nothing */ + #pragma message( "explicit keyword not recognized") + #endif +#endif + +class I8vec8; /* 8 elements, each element a signed or unsigned char data type */ +class Is8vec8; /* 8 elements, each element a signed char data type */ +class Iu8vec8; /* 8 elements, each element an unsigned char data type */ +class I16vec4; /* 4 elements, each element a signed or unsigned short */ +class Is16vec4; /* 4 elements, each element a signed short */ +class Iu16vec4; /* 4 elements, each element an unsigned short */ +class I32vec2; /* 2 elements, each element a signed or unsigned long */ +class Is32vec2; /* 2 elements, each element a signed long */ +class Iu32vec2; /* 2 elements, each element a unsigned long */ +class I64vec1; /* 1 element, a __m64 data type - Base I64vec1 class */ + +#define _MM_8UB(element,vector) (*((unsigned char*)&##vector + ##element)) +#define _MM_8B(element,vector) (*((signed char*)&##vector + ##element)) + +#define _MM_4UW(element,vector) (*((unsigned short*)&##vector + ##element)) +#define _MM_4W(element,vector) (*((short*)&##vector + ##element)) + +#define _MM_2UDW(element,vector) (*((unsigned int*)&##vector + ##element)) +#define _MM_2DW(element,vector) (*((int*)&##vector + ##element)) + +#define _MM_QW (*((__int64*)&vec)) + +/* M64 Class: + * 1 element, a __m64 data type + * Contructors & Logical Operations + */ +class M64 +{ +protected: + __m64 vec; + +public: + M64() { } + M64(__m64 mm) { vec = mm; } + M64(__int64 mm) { _MM_QW = mm; } + M64(int i) { vec = _m_from_int(i); } + + operator __m64() const { return vec; } + + /* Logical Operations */ + M64& operator&=(const M64 &a) { return *this = (M64) _m_pand(vec,a); } + M64& operator|=(const M64 &a) { return *this = (M64) _m_por(vec,a); } + M64& operator^=(const M64 &a) { return *this = (M64) _m_pxor(vec,a); } + +}; + +inline M64 operator&(const M64 &a, const M64 &b) { return _m_pand( a,b); } +inline M64 operator|(const M64 &a, const M64 &b) { return _m_por(a,b); } +inline M64 operator^(const M64 &a, const M64 &b) { return _m_pxor(a,b); } +inline M64 andnot(const M64 &a, const M64 &b) { return _m_pandn(a,b); } + +/* I64vec1 Class: + * 1 element, a __m64 data type + * Contains Operations which can operate on any __m64 data type + */ + +class I64vec1 : public M64 +{ +public: + I64vec1() { } + I64vec1(__m64 mm) : M64(mm) { } + EXPLICIT I64vec1(int i) : M64(i) { } + EXPLICIT I64vec1(__int64 mm) : M64(mm) { } + + I64vec1& operator= (const M64 &a) { return *this = (I64vec1) a; } + I64vec1& operator&=(const M64 &a) { return *this = (I64vec1) _m_pand(vec,a); } + I64vec1& operator|=(const M64 &a) { return *this = (I64vec1) _m_por(vec,a); } + I64vec1& operator^=(const M64 &a) { return *this = (I64vec1) _m_pxor(vec,a); } + + /* Shift Logical Operations */ + I64vec1 operator<<(const M64 &a) { return _m_psllq(vec, a); } + I64vec1 operator<<(int count) { return _m_psllqi(vec, count); } + I64vec1& operator<<=(const M64 &a) { return *this = (I64vec1) _m_psllq(vec, a); } + I64vec1& operator<<=(int count) { return *this = (I64vec1) _m_psllqi(vec, count); } + I64vec1 operator>>(const M64 &a) { return _m_psrlq(vec, a); } + I64vec1 operator>>(int count) { return _m_psrlqi(vec, count); } + I64vec1& operator>>=(const M64 &a) { return *this = (I64vec1) _m_psrlq(vec, a); } + I64vec1& operator>>=(int count) { return *this = (I64vec1) _m_psrlqi(vec, count); } +}; + +/* I32vec2 Class: + * 2 elements, each element either a signed or unsigned int + */ +class I32vec2 : public M64 +{ +public: + I32vec2() { } + I32vec2(__m64 mm) : M64(mm) { } + EXPLICIT I32vec2(int i) : M64 (i) { } + EXPLICIT I32vec2(__int64 i): M64(i) {} + + /* Assignment Operator */ + I32vec2& operator= (const M64 &a) { return *this = (I32vec2) a; } + + /* Logical Assignment Operators */ + I32vec2& operator&=(const M64 &a) { return *this = (I32vec2) _m_pand(vec,a); } + I32vec2& operator|=(const M64 &a) { return *this = (I32vec2) _m_por(vec,a); } + I32vec2& operator^=(const M64 &a) { return *this = (I32vec2) _m_pxor(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + I32vec2& operator +=(const I32vec2 &a) { return *this = (I32vec2) _m_paddd(vec,a); } + I32vec2& operator -=(const I32vec2 &a) { return *this = (I32vec2) _m_psubd(vec,a); } + + /* Shift Logical Operators */ + I32vec2 operator<<(const I32vec2 &a) { return _m_pslld(vec,a); } + I32vec2 operator<<(int count) { return _m_pslldi(vec,count); } + I32vec2& operator<<=(const I32vec2 &a) { return *this = (I32vec2) _m_pslld(vec,a); } + I32vec2& operator<<=(int count) { return *this = (I32vec2) _m_pslldi(vec,count); } + +}; + +/* Compare For Equality */ +inline I32vec2 cmpeq(const I32vec2 &a, const I32vec2 &b) { return _m_pcmpeqd(a,b); } +inline I32vec2 cmpneq(const I32vec2 &a, const I32vec2 &b) { return _m_pandn(_m_pcmpeqd(a,b), M64(0xffffffffffffffffi64)); } +/* Unpacks */ +inline I32vec2 unpack_low(const I32vec2 &a, const I32vec2 &b) {return _m_punpckldq(a,b); } +inline I32vec2 unpack_high(const I32vec2 &a, const I32vec2 &b) {return _m_punpckhdq(a,b); } + +/* Is32vec2 Class: + * 2 elements, each element a signed int + */ +class Is32vec2 : public I32vec2 +{ +public: + Is32vec2() { } + Is32vec2(__m64 mm) : I32vec2(mm) { } + Is32vec2(signed int i0, signed int i1) + { + _MM_2DW(0,vec) = i1; + _MM_2DW(1,vec) = i0; + } + EXPLICIT Is32vec2(int i) : I32vec2 (i) {} + EXPLICIT Is32vec2(__int64 i): I32vec2(i) {} + + /* Assignment Operator */ + Is32vec2& operator= (const M64 &a) { return *this = (Is32vec2) a; } + + /* Logical Assignment Operators */ + Is32vec2& operator&=(const M64 &a) { return *this = (Is32vec2) _m_pand(vec,a); } + Is32vec2& operator|=(const M64 &a) { return *this = (Is32vec2) _m_por(vec,a); } + Is32vec2& operator^=(const M64 &a) { return *this = (Is32vec2) _m_pxor(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + Is32vec2& operator +=(const I32vec2 &a) { return *this = (Is32vec2) _m_paddd(vec,a); } + Is32vec2& operator -=(const I32vec2 &a) { return *this = (Is32vec2) _m_psubd(vec,a); } + + /* Shift Logical Operators */ + Is32vec2 operator<<(const M64 &a) { return _m_pslld(vec,a); } + Is32vec2 operator<<(int count) { return _m_pslldi(vec,count); } + Is32vec2& operator<<=(const M64 &a) { return *this = (Is32vec2) _m_pslld(vec,a); } + Is32vec2& operator<<=(int count) { return *this = (Is32vec2) _m_pslldi(vec,count); } + /* Shift Arithmetic Operations */ + Is32vec2 operator>>(const M64 &a) { return _m_psrad(vec, a); } + Is32vec2 operator>>(int count) { return _m_psradi(vec, count); } + Is32vec2& operator>>=(const M64 &a) { return *this = (Is32vec2) _m_psrad(vec, a); } + Is32vec2& operator>>=(int count) { return *this = (Is32vec2) _m_psradi(vec, count); } + +#if defined(_ENABLE_VEC_DEBUG) + /* Output for Debug */ + friend std::ostream& operator<< (std::ostream &os, const Is32vec2 &a) + { + os << " [1]:" << _MM_2DW(1,a) + << " [0]:" << _MM_2DW(0,a); + return os; + } +#endif + + /* Element Access for Debug, No data modified */ + const int& operator[](int i)const + { + assert(static_cast(i) < 2); /* Only 2 elements to access */ + return _MM_2DW(i,vec); + } + + /* Element Access and Assignment for Debug */ + int& operator[](int i) + { + assert(static_cast(i) < 2); /* Only 2 elements to access */ + return _MM_2DW(i,vec); + } +}; + +/* Compares */ +inline Is32vec2 cmpeq(const Is32vec2 &a, const Is32vec2 &b) { return _m_pcmpeqd(a,b); } +inline Is32vec2 cmpneq(const Is32vec2 &a, const Is32vec2 &b) { return _m_pandn(_m_pcmpeqd(a,b), M64(0xffffffffffffffffi64)); } +inline Is32vec2 cmpgt(const Is32vec2 &a, const Is32vec2 &b) { return _m_pcmpgtd(a,b); } +inline Is32vec2 cmplt(const Is32vec2 &a, const Is32vec2 &b) { return _m_pcmpgtd(b,a); } +inline Is32vec2 cmple(const Is32vec2 &a, const Is32vec2 &b) { return _m_pandn(_m_pcmpgtd(a,b), M64(0xffffffffffffffffi64)); } +inline Is32vec2 cmpge(const Is32vec2 &a, const Is32vec2 &b) { return _m_pandn(_m_pcmpgtd(b,a), M64(0xffffffffffffffffi64)); } +/* Unpacks & Pack */ +inline Is32vec2 unpack_low(const Is32vec2 &a, const Is32vec2 &b) { return _m_punpckldq(a,b); } +inline Is32vec2 unpack_high(const Is32vec2 &a, const Is32vec2 &b) { return _m_punpckhdq(a,b); } + +/* Iu32vec2 Class: + * 2 elements, each element unsigned int + */ +class Iu32vec2 : public I32vec2 +{ +public: + Iu32vec2() { } + Iu32vec2(__m64 mm) : I32vec2(mm) { } + Iu32vec2(unsigned int ui0, unsigned int ui1) + { + _MM_2UDW(0,vec) = ui1; + _MM_2UDW(1,vec) = ui0; + } + + EXPLICIT Iu32vec2(int i) : I32vec2 (i) { } + EXPLICIT Iu32vec2(__int64 i) : I32vec2 (i) { } + + /* Assignment Operator */ + Iu32vec2& operator= (const M64 &a) { return *this = (Iu32vec2) a; } + + /* Logical Assignment Operators */ + Iu32vec2& operator&=(const M64 &a) { return *this = (Iu32vec2) _m_pand(vec,a); } + Iu32vec2& operator|=(const M64 &a) { return *this = (Iu32vec2) _m_por(vec,a); } + Iu32vec2& operator^=(const M64 &a) { return *this = (Iu32vec2) _m_pxor(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + Iu32vec2& operator +=(const I32vec2 &a) { return *this = (Iu32vec2) _m_paddd(vec,a); } + Iu32vec2& operator -=(const I32vec2 &a) { return *this = (Iu32vec2) _m_psubd(vec,a); } + + /* Shift Logical Operators */ + Iu32vec2 operator<<(const M64 &a) { return _m_pslld(vec,a); } + Iu32vec2 operator<<(int count) { return _m_pslldi(vec,count); } + Iu32vec2& operator<<=(const M64 &a) { return *this = (Iu32vec2) _m_pslld(vec,a); } + Iu32vec2& operator<<=(int count) { return *this = (Iu32vec2) _m_pslldi(vec,count); } + Iu32vec2 operator>>(const M64 &a) { return _m_psrld(vec,a); } + Iu32vec2 operator>>(int count) { return _m_psrldi(vec,count); } + Iu32vec2& operator>>=(const M64 &a) { return *this = (Iu32vec2) _m_psrld(vec,a); } + Iu32vec2& operator>>=(int count) { return *this = (Iu32vec2) _m_psrldi(vec,count); } + +#if defined(_ENABLE_VEC_DEBUG) + /* Output for Debug */ + friend std::ostream& operator<< (std::ostream &os, const Iu32vec2 &a) + { + os << " [1]:" << _MM_2UDW(1,a) + << " [0]:" << _MM_2UDW(0,a); + return os; + } +#endif + + /* Element Access for Debug, No data modified */ + const unsigned int& operator[](int i)const + { + assert(static_cast(i) < 2); /* Only 2 elements to access */ + return _MM_2UDW(i,vec); + } + + /* Element Access and Assignment for Debug */ + unsigned int& operator[](int i) + { + assert(static_cast(i) < 2); /* Only 2 elements to access */ + return _MM_2UDW(i,vec); + } +}; + +/* Compares For Equality / Inequality */ +inline Iu32vec2 cmpeq(const Iu32vec2 &a, const Iu32vec2 &b) { return _m_pcmpeqd(a,b); } +inline Iu32vec2 cmpneq(const Iu32vec2 &a, const Iu32vec2 &b) { return _m_pandn(_m_pcmpeqd(a,b), M64(0xffffffffffffffffi64)); } +/* Unpacks */ +inline Iu32vec2 unpack_low(const Iu32vec2 &a, const Iu32vec2 &b) {return _m_punpckldq(a,b); } +inline Iu32vec2 unpack_high(const Iu32vec2 &a, const Iu32vec2 &b) {return _m_punpckhdq(a,b); } + +/* I16vec4 Class: + * 4 elements, each element either a signed or unsigned short + */ +class I16vec4 : public M64 +{ +public: + I16vec4() { } + I16vec4(__m64 mm) : M64(mm) { } + EXPLICIT I16vec4(__int64 i) : M64 (i) { } + EXPLICIT I16vec4(int i) : M64 (i) { } + + /* Assignment Operator */ + I16vec4& operator= (const M64 &a) { return *this = (I16vec4) a; } + + /* Addition & Subtraction Assignment Operators */ + I16vec4& operator&=(const M64 &a) { return *this = (I16vec4) _m_pand(vec,a); } + I16vec4& operator|=(const M64 &a) { return *this = (I16vec4) _m_por(vec,a); } + I16vec4& operator^=(const M64 &a) { return *this = (I16vec4) _m_pxor(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + I16vec4& operator +=(const I16vec4 &a) { return *this = (I16vec4)_m_paddw(vec,a); } + I16vec4& operator -=(const I16vec4 &a) { return *this = (I16vec4)_m_psubw(vec,a); } + I16vec4& operator *=(const I16vec4 &a) { return *this = (I16vec4)_m_pmullw(vec,a); } + + /* Shift Logical Operators */ + I16vec4 operator<<(const I16vec4 &a) { return _m_psllw(vec,a); } + I16vec4 operator<<(int count) { return _m_psllwi(vec,count); } + I16vec4& operator<<=(const I16vec4 &a) { return *this = (I16vec4)_m_psllw(vec,a); } + I16vec4& operator<<=(int count) { return *this = (I16vec4)_m_psllwi(vec,count); } +}; + +inline I16vec4 operator*(const I16vec4 &a, const I16vec4 &b) { return _m_pmullw(a,b); } +inline I16vec4 cmpeq(const I16vec4 &a, const I16vec4 &b) { return _m_pcmpeqw(a,b); } +inline I16vec4 cmpneq(const I16vec4 &a, const I16vec4 &b) { return _m_pandn(_m_pcmpeqw(a,b), M64(0xffffffffffffffffi64)); } + +inline I16vec4 unpack_low(const I16vec4 &a, const I16vec4 &b) { return _m_punpcklwd(a,b); } +inline I16vec4 unpack_high(const I16vec4 &a, const I16vec4 &b) { return _m_punpckhwd(a,b); } + +/* Is16vec4 Class: + * 4 elements, each element signed short + */ +class Is16vec4 : public I16vec4 +{ +public: + Is16vec4() { } + Is16vec4(__m64 mm) : I16vec4(mm) { } + Is16vec4(short i0, short i1, short i2, short i3) + { + _MM_4W(0,vec) = i3; + _MM_4W(1,vec) = i2; + _MM_4W(2,vec) = i1; + _MM_4W(3,vec) = i0; + } + + EXPLICIT Is16vec4(__int64 i) : I16vec4 (i) { } + EXPLICIT Is16vec4(int i) : I16vec4 (i) { } + + /* Assignment Operator */ + Is16vec4& operator= (const M64 &a) { return *this = (Is16vec4) a; } + + /* Addition & Subtraction Assignment Operators */ + Is16vec4& operator&=(const M64 &a) { return *this = (Is16vec4) _m_pand(vec,a); } + Is16vec4& operator|=(const M64 &a) { return *this = (Is16vec4) _m_por(vec,a); } + Is16vec4& operator^=(const M64 &a) { return *this = (Is16vec4) _m_pxor(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + Is16vec4& operator +=(const I16vec4 &a) { return *this = (Is16vec4)_m_paddw(vec,a); } + Is16vec4& operator -=(const I16vec4 &a) { return *this = (Is16vec4)_m_psubw(vec,a); } + Is16vec4& operator *=(const I16vec4 &a) { return *this = (Is16vec4)_m_pmullw(vec,a); } + + /* Shift Logical Operators */ + Is16vec4 operator<<(const M64 &a) { return _m_psllw(vec,a); } + Is16vec4 operator<<(int count) { return _m_psllwi(vec,count); } + Is16vec4& operator<<=(const M64 &a) { return *this = (Is16vec4)_m_psllw(vec,a); } + Is16vec4& operator<<=(int count) { return *this = (Is16vec4)_m_psllwi(vec,count); } + /* Shift Arithmetic Operations */ + Is16vec4 operator>>(const M64 &a) { return _m_psraw(vec,a); } + Is16vec4 operator>>(int count) { return _m_psrawi(vec,count); } + Is16vec4& operator>>=(const M64 &a) { return *this = (Is16vec4) _m_psraw(vec,a); } + Is16vec4& operator>>=(int count) { return *this = (Is16vec4) _m_psrawi(vec,count); } + +#if defined(_ENABLE_VEC_DEBUG) + /* Output for Debug */ + friend std::ostream& operator<< (std::ostream &os, const Is16vec4 &a) + { + os << "[3]:" << _MM_4W(3,a) + << " [2]:" << _MM_4W(2,a) + << " [1]:" << _MM_4W(1,a) + << " [0]:" << _MM_4W(0,a); + return os; + } +#endif + + /* Element Access for Debug, No data modified */ + const short& operator[](int i)const + { + assert(static_cast(i) < 4); /* Only 4 elements to access */ + return _MM_4W(i,vec); + } + + /* Element Access for Debug */ + short& operator[](int i) + { + assert(static_cast(i) < 4); /* Only 4 elements to access */ + return _MM_4W(i,vec); + } +}; + +inline Is16vec4 operator*(const Is16vec4 &a, const Is16vec4 &b) { return _m_pmullw(a,b); } + +/* Compares */ +inline Is16vec4 cmpeq(const Is16vec4 &a, const Is16vec4 &b) { return _m_pcmpeqw(a,b); } +inline Is16vec4 cmpneq(const Is16vec4 &a, const Is16vec4 &b) { return _m_pandn(_m_pcmpeqw(a,b), M64(0xffffffffffffffffi64)); } +inline Is16vec4 cmpgt(const Is16vec4 &a, const Is16vec4 &b) { return _m_pcmpgtw(a,b); } +inline Is16vec4 cmplt(const Is16vec4 &a, const Is16vec4 &b) { return _m_pcmpgtw(b,a); } +inline Is16vec4 cmple(const Is16vec4 &a, const Is16vec4 &b) { return _m_pandn(_m_pcmpgtw(a,b), M64(0xffffffffffffffffi64)); } +inline Is16vec4 cmpge(const Is16vec4 &a, const Is16vec4 &b) { return _m_pandn(_m_pcmpgtw(b,a), M64(0xffffffffffffffffi64)); } +/* Unpacks */ +inline Is16vec4 unpack_low(const Is16vec4 &a, const Is16vec4 &b) { return _m_punpcklwd(a,b); } +inline Is16vec4 unpack_high(const Is16vec4 &a, const Is16vec4 &b) { return _m_punpckhwd(a,b); } + +inline Is16vec4 sat_add(const Is16vec4 &a, const Is16vec4 &b) { return _m_paddsw(a,b); } +inline Is16vec4 sat_sub(const Is16vec4 &a, const Is16vec4 &b) { return _m_psubsw(a,b); } +inline Is16vec4 mul_high(const Is16vec4 &a, const Is16vec4 &b) { return _m_pmulhw(a,b); } +inline Is32vec2 mul_add(const Is16vec4 &a, const Is16vec4 &b) { return _m_pmaddwd(a,b);} + + +/* Iu16vec4 Class: + * 4 elements, each element unsigned short + */ +class Iu16vec4 : public I16vec4 +{ +public: + Iu16vec4() { } + Iu16vec4(__m64 mm) : I16vec4(mm) { } + Iu16vec4(unsigned short ui0, unsigned short ui1, unsigned short ui2, unsigned short ui3) + { + _MM_4UW(0,vec) = ui3; + _MM_4UW(1,vec) = ui2; + _MM_4UW(2,vec) = ui1; + _MM_4UW(3,vec) = ui0; + } + EXPLICIT Iu16vec4(__int64 i) : I16vec4 (i) { } + EXPLICIT Iu16vec4(int i) : I16vec4 (i) { } + + /* Assignment Operator */ + Iu16vec4& operator= (const M64 &a) { return *this = (Iu16vec4) a; } + + /* Logical Assignment Operators */ + Iu16vec4& operator&=(const M64 &a) { return *this = (Iu16vec4) _m_pand(vec,a); } + Iu16vec4& operator|=(const M64 &a) { return *this = (Iu16vec4) _m_por(vec,a); } + Iu16vec4& operator^=(const M64 &a) { return *this = (Iu16vec4) _m_pxor(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + Iu16vec4& operator +=(const I16vec4 &a) { return *this = (Iu16vec4)_m_paddw(vec,a); } + Iu16vec4& operator -=(const I16vec4 &a) { return *this = (Iu16vec4)_m_psubw(vec,a); } + Iu16vec4& operator *=(const I16vec4 &a) { return *this = (Iu16vec4)_m_pmullw(vec,a); } + + /* Shift Logical Operators */ + Iu16vec4 operator<<(const M64 &a) { return _m_psllw(vec,a); } + Iu16vec4 operator<<(int count) { return _m_psllwi(vec,count); } + Iu16vec4& operator<<=(const M64 &a) { return *this = (Iu16vec4)_m_psllw(vec,a); } + Iu16vec4& operator<<=(int count) { return *this = (Iu16vec4)_m_psllwi(vec,count); } + Iu16vec4 operator>>(const M64 &a) { return _m_psrlw(vec,a); } + Iu16vec4 operator>>(int count) { return _m_psrlwi(vec,count); } + Iu16vec4& operator>>=(const M64 &a) { return *this = (Iu16vec4) _m_psrlw(vec,a); } + Iu16vec4& operator>>=(int count) { return *this = (Iu16vec4) _m_psrlwi(vec,count); } + +#if defined(_ENABLE_VEC_DEBUG) + /* Output for Debug */ + friend std::ostream& operator<< (std::ostream &os, const Iu16vec4 &a) + { + os << "[3]:" << _MM_4UW(3,a) + << " [2]:" << _MM_4UW(2,a) + << " [1]:" << _MM_4UW(1,a) + << " [0]:" << _MM_4UW(0,a); + return os; + } +#endif + + /* Element Access for Debug, No data modified */ + const unsigned short& operator[](int i)const + { + assert(static_cast(i) < 4); /* Only 4 elements to access */ + return _MM_4UW(i,vec); + } + + /* Element Access and Assignment for Debug */ + unsigned short& operator[](int i) + { + assert(static_cast(i) < 4); /* Only 4 elements to access */ + return _MM_4UW(i,vec); + } +}; + +inline Iu16vec4 operator*(const Iu16vec4 &a, const Iu16vec4 &b) { return _m_pmullw(a,b); } +inline Iu16vec4 cmpeq(const Iu16vec4 &a, const Iu16vec4 &b) { return _m_pcmpeqw(a,b); } +inline Iu16vec4 cmpneq(const Iu16vec4 &a, const Iu16vec4 &b) { return _m_pandn(_m_pcmpeqw(a,b), M64(0xffffffffffffffffi64)); } + +inline Iu16vec4 sat_add(const Iu16vec4 &a, const Iu16vec4 &b) { return _m_paddusw(a,b); } +inline Iu16vec4 sat_sub(const Iu16vec4 &a, const Iu16vec4 &b) { return _m_psubusw(a,b); } + +inline Iu16vec4 unpack_low(const Iu16vec4 &a, const Iu16vec4 &b) { return _m_punpcklwd(a,b); } +inline Iu16vec4 unpack_high(const Iu16vec4 &a, const Iu16vec4 &b) { return _m_punpckhwd(a,b); } + +/* I8vec8 Class: + * 8 elements, each element either unsigned or signed char + */ +class I8vec8 : public M64 +{ +public: + I8vec8() { } + I8vec8(__m64 mm) : M64(mm) { } + EXPLICIT I8vec8(__int64 i) : M64 (i) { } + EXPLICIT I8vec8(int i) : M64 (i) { } + + /* Assignment Operator */ + I8vec8& operator= (const M64 &a) { return *this = (I8vec8) a; } + + /* Logical Assignment Operators */ + I8vec8& operator&=(const M64 &a) { return *this = (I8vec8) _m_pand(vec,a); } + I8vec8& operator|=(const M64 &a) { return *this = (I8vec8) _m_por(vec,a); } + I8vec8& operator^=(const M64 &a) { return *this = (I8vec8) _m_pxor(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + I8vec8& operator +=(const I8vec8 &a) { return *this = (I8vec8) _m_paddb(vec,a); } + I8vec8& operator -=(const I8vec8 &a) { return *this = (I8vec8) _m_psubb(vec,a); } +}; + + +inline I8vec8 cmpeq(const I8vec8 &a, const I8vec8 &b) { return _m_pcmpeqb(a,b); } +inline I8vec8 cmpneq(const I8vec8 &a, const I8vec8 &b) { return _m_pandn(_m_pcmpeqb(a,b), M64(0xffffffffffffffffi64)); } + +inline I8vec8 unpack_low(const I8vec8 &a, const I8vec8 &b) { return _m_punpcklbw(a,b); } +inline I8vec8 unpack_high(const I8vec8 &a, const I8vec8 &b) { return _m_punpckhbw(a,b); } + +/* Is8vec8 Class: + * 8 elements, each element signed char + */ +class Is8vec8 : public I8vec8 +{ +public: + Is8vec8() { } + Is8vec8(__m64 mm) : I8vec8(mm) { } + Is8vec8(signed char s0,signed char s1,signed char s2,signed char s3,signed char s4,signed char s5,signed char s6,signed char s7) + { + _MM_8B(0,vec) = s7; + _MM_8B(1,vec) = s6; + _MM_8B(2,vec) = s5; + _MM_8B(3,vec) = s4; + _MM_8B(4,vec) = s3; + _MM_8B(5,vec) = s2; + _MM_8B(6,vec) = s1; + _MM_8B(7,vec) = s0; + } + + EXPLICIT Is8vec8(__int64 i) : I8vec8 (i) { } + EXPLICIT Is8vec8(int i) : I8vec8 (i) { } + + /* Assignment Operator */ + Is8vec8& operator= (const M64 &a) { return *this = (Is8vec8) a; } + + /* Logical Assignment Operators */ + Is8vec8& operator&=(const M64 &a) { return *this = (Is8vec8) _m_pand(vec,a); } + Is8vec8& operator|=(const M64 &a) { return *this = (Is8vec8) _m_por(vec,a); } + Is8vec8& operator^=(const M64 &a) { return *this = (Is8vec8) _m_pxor(vec,a); } + + /* Addition & Subtraction Assignment Operators */ + Is8vec8& operator +=(const I8vec8 &a) { return *this = (Is8vec8) _m_paddb(vec,a); } + Is8vec8& operator -=(const I8vec8 &a) { return *this = (Is8vec8) _m_psubb(vec,a); } + +#if defined(_ENABLE_VEC_DEBUG) + /* Output for Debug */ + friend std::ostream& operator<< (std::ostream &os, const Is8vec8 &a) + { + os << "[7]:" << short(_MM_8B(7,a)) + << " [6]:" << short(_MM_8B(6,a)) + << " [5]:" << short(_MM_8B(5,a)) + << " [4]:" << short(_MM_8B(4,a)) + << " [3]:" << short(_MM_8B(3,a)) + << " [2]:" << short(_MM_8B(2,a)) + << " [1]:" << short(_MM_8B(1,a)) + << " [0]:" << short(_MM_8B(0,a)); + return os; + } +#endif + + /* Element Access for Debug, No data modified */ + const signed char& operator[](int i)const + { + assert(static_cast(i) < 8); /* Only 8 elements to access */ + return _MM_8B(i,vec); + } + + /* Element Access and Assignment for Debug */ + signed char& operator[](int i) + { + assert(static_cast(i) < 8); /* Only 8 elements to access */ + return _MM_8B(i,vec); + } +}; + +/* Additional Is8vec8 functions: compares, unpacks, sat add/sub */ +inline Is8vec8 cmpeq(const Is8vec8 &a, const Is8vec8 &b) { return _m_pcmpeqb(a,b); } +inline Is8vec8 cmpneq(const Is8vec8 &a, const Is8vec8 &b) { return _m_pandn(_m_pcmpeqb(a,b), M64(0xffffffffffffffffi64)); } +inline Is8vec8 cmpgt(const Is8vec8 &a, const Is8vec8 &b) { return _m_pcmpgtb(a,b); } +inline Is8vec8 cmplt(const Is8vec8 &a, const Is8vec8 &b) { return _m_pcmpgtb(b,a); } +inline Is8vec8 cmple(const Is8vec8 &a, const Is8vec8 &b) { return _m_pandn(_m_pcmpgtb(a,b), M64(0xffffffffffffffffi64)); } +inline Is8vec8 cmpge(const Is8vec8 &a, const Is8vec8 &b) { return _m_pandn(_m_pcmpgtb(b,a), M64(0xffffffffffffffffi64)); } + +inline Is8vec8 unpack_low(const Is8vec8 &a, const Is8vec8 &b) { return _m_punpcklbw(a,b); } +inline Is8vec8 unpack_high(const Is8vec8 &a, const Is8vec8 &b) { return _m_punpckhbw(a,b); } + +inline Is8vec8 sat_add(const Is8vec8 &a, const Is8vec8 &b) { return _m_paddsb(a,b); } +inline Is8vec8 sat_sub(const Is8vec8 &a, const Is8vec8 &b) { return _m_psubsb(a,b); } + +/* Iu8vec8 Class: + * 8 elements, each element unsigned char + */ +class Iu8vec8 : public I8vec8 +{ +public: + Iu8vec8() { } + Iu8vec8(__m64 mm) : I8vec8(mm) { } + Iu8vec8(unsigned char s0,unsigned char s1,unsigned char s2,unsigned char s3,unsigned char s4,unsigned char s5,unsigned char s6,unsigned char s7) + { + _MM_8UB(0,vec) = s7; + _MM_8UB(1,vec) = s6; + _MM_8UB(2,vec) = s5; + _MM_8UB(3,vec) = s4; + _MM_8UB(4,vec) = s3; + _MM_8UB(5,vec) = s2; + _MM_8UB(6,vec) = s1; + _MM_8UB(7,vec) = s0; + } + EXPLICIT Iu8vec8(__int64 i) : I8vec8 (i) { } + EXPLICIT Iu8vec8(int i) : I8vec8 (i) { } + + /* Assignment Operator */ + Iu8vec8& operator= (const M64 &a) { return *this = (Iu8vec8) a; } + /* Logical Assignment Operators */ + Iu8vec8& operator&=(const M64 &a) { return *this = (Iu8vec8) _m_pand(vec,a); } + Iu8vec8& operator|=(const M64 &a) { return *this = (Iu8vec8) _m_por(vec,a); } + Iu8vec8& operator^=(const M64 &a) { return *this = (Iu8vec8) _m_pxor(vec,a); } + /* Addition & Subtraction Assignment Operators */ + Iu8vec8& operator +=(const I8vec8 &a) { return *this = (Iu8vec8) _m_paddb(vec,a); } + Iu8vec8& operator -=(const I8vec8 &a) { return *this = (Iu8vec8) _m_psubb(vec,a); } + +#if defined(_ENABLE_VEC_DEBUG) + /* Output for Debug */ + friend std::ostream& operator << (std::ostream &os, const Iu8vec8 &a) + { + os << "[7]:" << unsigned short(_MM_8UB(7,a)) + << " [6]:" << unsigned short(_MM_8UB(6,a)) + << " [5]:" << unsigned short(_MM_8UB(5,a)) + << " [4]:" << unsigned short(_MM_8UB(4,a)) + << " [3]:" << unsigned short(_MM_8UB(3,a)) + << " [2]:" << unsigned short(_MM_8UB(2,a)) + << " [1]:" << unsigned short(_MM_8UB(1,a)) + << " [0]:" << unsigned short(_MM_8UB(0,a)); + return os; + } +#endif + + /* Element Access for Debug, No data modified */ + const unsigned char& operator[](int i)const + { + assert(static_cast(i) < 8); /* Only 8 elements to access */ + return _MM_8UB(i,vec); + } + + /* Element Access for Debug */ + unsigned char& operator[](int i) + { + assert(static_cast(i) < 8); /* Only 8 elements to access */ + return _MM_8UB(i,vec); + } +}; + +/* Additional Iu8vec8 functions: cmpeq,cmpneq, unpacks, sat add/sub */ +inline Iu8vec8 cmpeq(const Iu8vec8 &a, const Iu8vec8 &b) { return _m_pcmpeqb(a,b); } +inline Iu8vec8 cmpneq(const Iu8vec8 &a, const Iu8vec8 &b) { return _m_pandn(_m_pcmpeqb(a,b), M64(0xffffffffffffffffi64)); } + +inline Iu8vec8 unpack_low(const Iu8vec8 &a, const Iu8vec8 &b) { return _m_punpcklbw(a,b); } +inline Iu8vec8 unpack_high(const Iu8vec8 &a, const Iu8vec8 &b) { return _m_punpckhbw(a,b); } + +inline Iu8vec8 sat_add(const Iu8vec8 &a, const Iu8vec8 &b) { return _m_paddusb(a,b); } +inline Iu8vec8 sat_sub(const Iu8vec8 &a, const Iu8vec8 &b) { return _m_psubusb(a,b); } + +inline Is16vec4 pack_sat(const Is32vec2 &a, const Is32vec2 &b) { return _m_packssdw(a,b); } +inline Is8vec8 pack_sat(const Is16vec4 &a, const Is16vec4 &b) { return _m_packsswb(a,b); } +inline Iu8vec8 packu_sat(const Is16vec4 &a, const Is16vec4 &b) { return _m_packuswb(a,b); } + +/********************************* Logicals ****************************************/ +#define IVEC_LOGICALS(vect,element) \ +inline I##vect##vec##element operator& (const I##vect##vec##element &a, const I##vect##vec##element &b) \ +{ return _m_pand( a,b); } \ +inline I##vect##vec##element operator| (const I##vect##vec##element &a, const I##vect##vec##element &b) \ +{ return _m_por( a,b); } \ +inline I##vect##vec##element operator^ (const I##vect##vec##element &a, const I##vect##vec##element &b) \ +{ return _m_pxor( a,b); } \ +inline I##vect##vec##element andnot (const I##vect##vec##element &a, const I##vect##vec##element &b) \ +{ return _m_pandn( a,b); } + +IVEC_LOGICALS(8,8) +IVEC_LOGICALS(u8,8) +IVEC_LOGICALS(s8,8) +IVEC_LOGICALS(16,4) +IVEC_LOGICALS(u16,4) +IVEC_LOGICALS(s16,4) +IVEC_LOGICALS(32,2) +IVEC_LOGICALS(u32,2) +IVEC_LOGICALS(s32,2) +IVEC_LOGICALS(64,1) +#undef IVEC_LOGICALS + +/********************************* Add & Sub ****************************************/ +#define IVEC_ADD_SUB(vect,element,opsize) \ +inline I##vect##vec##element operator+ (const I##vect##vec##element &a, const I##vect##vec##element &b) \ +{ return _m_padd##opsize( a,b); } \ +inline I##vect##vec##element operator- (const I##vect##vec##element &a, const I##vect##vec##element &b) \ +{ return _m_psub##opsize( a,b); } + +IVEC_ADD_SUB(8,8, b) +IVEC_ADD_SUB(u8,8, b) +IVEC_ADD_SUB(s8,8, b) +IVEC_ADD_SUB(16,4, w) +IVEC_ADD_SUB(u16,4, w) +IVEC_ADD_SUB(s16,4, w) +IVEC_ADD_SUB(32,2, d) +IVEC_ADD_SUB(u32,2, d) +IVEC_ADD_SUB(s32,2, d) +#undef IVEC_ADD_SUB + +/********************************* Conditional Select ****************************************/ +/* version of: retval = (a OP b)? c : d; * + * Where OP is one of the possible comparision operators. * + * Example: r = select_eq(a,b,c,d); * + * if "member at position x of the vector a" == "member at position x of vector b" * + * assign the corresponding member in r from c, else assign from d. * + ********************************* Conditional Select ****************************************/ + +#define IVEC_SELECT(vect12,vect34,element,selop,arg1,arg2) \ + inline I##vect34##vec##element select_##selop (const I##vect12##vec##element &a, const I##vect12##vec##element &b, const I##vect34##vec##element &c, const I##vect34##vec##element &d) \ +{ \ + I##vect12##vec##element mask = cmp##selop(a,b); \ + return( I##vect34##vec##element ((mask & arg1 ) | I##vect12##vec##element ((_m_pandn(mask, arg2 ))))); \ +} +IVEC_SELECT(8,s8,8,eq,c,d) +IVEC_SELECT(8,u8,8,eq,c,d) +IVEC_SELECT(8,8,8,eq,c,d) +IVEC_SELECT(8,s8,8,neq,c,d) +IVEC_SELECT(8,u8,8,neq,c,d) +IVEC_SELECT(8,8,8,neq,c,d) + +IVEC_SELECT(16,s16,4,eq,c,d) +IVEC_SELECT(16,u16,4,eq,c,d) +IVEC_SELECT(16,16,4,eq,c,d) +IVEC_SELECT(16,s16,4,neq,c,d) +IVEC_SELECT(16,u16,4,neq,c,d) +IVEC_SELECT(16,16,4,neq,c,d) + +IVEC_SELECT(32,s32,2,eq,c,d) +IVEC_SELECT(32,u32,2,eq,c,d) +IVEC_SELECT(32,32,2,eq,c,d) +IVEC_SELECT(32,s32,2,neq,c,d) +IVEC_SELECT(32,u32,2,neq,c,d) +IVEC_SELECT(32,32,2,neq,c,d) + + +IVEC_SELECT(s8,s8,8,gt,c,d) +IVEC_SELECT(s8,u8,8,gt,c,d) +IVEC_SELECT(s8,8,8,gt,c,d) +IVEC_SELECT(s8,s8,8,lt,c,d) +IVEC_SELECT(s8,u8,8,lt,c,d) +IVEC_SELECT(s8,8,8,lt,c,d) +IVEC_SELECT(s8,s8,8,le,c,d) +IVEC_SELECT(s8,u8,8,le,c,d) +IVEC_SELECT(s8,8,8,le,c,d) +IVEC_SELECT(s8,s8,8,ge,c,d) +IVEC_SELECT(s8,u8,8,ge,c,d) +IVEC_SELECT(s8,8,8,ge,c,d) + +IVEC_SELECT(s16,s16,4,gt,c,d) +IVEC_SELECT(s16,u16,4,gt,c,d) +IVEC_SELECT(s16,16,4,gt,c,d) +IVEC_SELECT(s16,s16,4,lt,c,d) +IVEC_SELECT(s16,u16,4,lt,c,d) +IVEC_SELECT(s16,16,4,lt,c,d) +IVEC_SELECT(s16,s16,4,le,c,d) +IVEC_SELECT(s16,u16,4,le,c,d) +IVEC_SELECT(s16,16,4,le,c,d) +IVEC_SELECT(s16,s16,4,ge,c,d) +IVEC_SELECT(s16,u16,4,ge,c,d) +IVEC_SELECT(s16,16,4,ge,c,d) + +IVEC_SELECT(s32,s32,2,gt,c,d) +IVEC_SELECT(s32,u32,2,gt,c,d) +IVEC_SELECT(s32,32,2,gt,c,d) +IVEC_SELECT(s32,s32,2,lt,c,d) +IVEC_SELECT(s32,u32,2,lt,c,d) +IVEC_SELECT(s32,32,2,lt,c,d) +IVEC_SELECT(s32,s32,2,le,c,d) +IVEC_SELECT(s32,u32,2,le,c,d) +IVEC_SELECT(s32,32,2,le,c,d) +IVEC_SELECT(s32,s32,2,ge,c,d) +IVEC_SELECT(s32,u32,2,ge,c,d) +IVEC_SELECT(s32,32,2,ge,c,d) + + +#undef IVEC_SELECT + +inline static void empty(void) { _m_empty(); } + +#if defined(_SILENCE_IVEC_C4799) + #pragma warning(pop) +#endif + +#endif // IVEC_H_INCLUDED diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/largeint.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/largeint.h new file mode 100644 index 00000000..393b69bc --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/largeint.h @@ -0,0 +1,257 @@ +/*-- + +Module Name: + + largeint.h + +Abstract: + + Include file for sample Large Integer Arithmetic routines. + This file includes all of the prototypes for the routines found in + largeint.lib. For complete descriptions of these functions, see the + largeint.s source file for MIPS, or the divlarge.c and largeint.asm + source files for x86. + +Revision History: + +--*/ + +#ifdef __cplusplus +extern "C" { +#endif + +// +//Large integer arithmetic routines. +// + +// +// Large integer add - 64-bits + 64-bits -> 64-bits +// + +LARGE_INTEGER +WINAPI +LargeIntegerAdd ( + LARGE_INTEGER Addend1, + LARGE_INTEGER Addend2 + ); + +// +// Enlarged integer multiply - 32-bits * 32-bits -> 64-bits +// + +LARGE_INTEGER +WINAPI +EnlargedIntegerMultiply ( + LONG Multiplicand, + LONG Multiplier + ); + +// +// Unsigned enlarged integer multiply - 32-bits * 32-bits -> 64-bits +// + +LARGE_INTEGER +WINAPI +EnlargedUnsignedMultiply ( + ULONG Multiplicand, + ULONG Multiplier + ); + +// +// Enlarged integer divide - 64-bits / 32-bits > 32-bits +// + +ULONG +WINAPI +EnlargedUnsignedDivide ( + IN ULARGE_INTEGER Dividend, + IN ULONG Divisor, + IN PULONG Remainder + ); + +// +// Extended large integer magic divide - 64-bits / 32-bits -> 64-bits +// + +LARGE_INTEGER +WINAPI +ExtendedMagicDivide ( + LARGE_INTEGER Dividend, + LARGE_INTEGER MagicDivisor, + CCHAR ShiftCount + ); + +// +// Large Integer divide - 64-bits / 32-bits -> 64-bits +// + +LARGE_INTEGER +WINAPI +ExtendedLargeIntegerDivide ( + LARGE_INTEGER Dividend, + ULONG Divisor, + PULONG Remainder + ); + +// +// Large Integer divide - 64-bits / 32-bits -> 64-bits +// + +LARGE_INTEGER +WINAPI +LargeIntegerDivide ( + LARGE_INTEGER Dividend, + LARGE_INTEGER Divisor, + PLARGE_INTEGER Remainder + ); + +// +// Extended integer multiply - 32-bits * 64-bits -> 64-bits +// + +LARGE_INTEGER +WINAPI +ExtendedIntegerMultiply ( + LARGE_INTEGER Multiplicand, + LONG Multiplier + ); + +// +// Large integer negation - -(64-bits) +// + +LARGE_INTEGER +WINAPI +LargeIntegerNegate ( + LARGE_INTEGER Subtrahend + ); + +// +// Large integer subtract - 64-bits - 64-bits -> 64-bits. +// + +LARGE_INTEGER +WINAPI +LargeIntegerSubtract ( + LARGE_INTEGER Minuend, + LARGE_INTEGER Subtrahend + ); + +// +// Large integer and - 64-bite & 64-bits -> 64-bits. +// + +#define LargeIntegerAnd(Result, Source, Mask) \ + { \ + Result.HighPart = Source.HighPart & Mask.HighPart; \ + Result.LowPart = Source.LowPart & Mask.LowPart; \ + } + + +// +// Large integer conversion routines. +// + +// +// Convert signed integer to large integer. +// + +LARGE_INTEGER +WINAPI +ConvertLongToLargeInteger ( + LONG SignedInteger + ); + +// +// Convert unsigned integer to large integer. +// + +LARGE_INTEGER +WINAPI +ConvertUlongToLargeInteger ( + ULONG UnsignedInteger + ); + + +// +// Large integer shift routines. +// + +LARGE_INTEGER +WINAPI +LargeIntegerShiftLeft ( + LARGE_INTEGER LargeInteger, + CCHAR ShiftCount + ); + +LARGE_INTEGER +WINAPI +LargeIntegerShiftRight ( + LARGE_INTEGER LargeInteger, + CCHAR ShiftCount + ); + +LARGE_INTEGER +WINAPI +LargeIntegerArithmeticShift ( + LARGE_INTEGER LargeInteger, + CCHAR ShiftCount + ); + +#define LargeIntegerGreaterThan(X,Y) ( \ + (((X).HighPart == (Y).HighPart) && ((X).LowPart > (Y).LowPart)) || \ + ((X).HighPart > (Y).HighPart) \ +) + +#define LargeIntegerGreaterThanOrEqualTo(X,Y) ( \ + (((X).HighPart == (Y).HighPart) && ((X).LowPart >= (Y).LowPart)) || \ + ((X).HighPart > (Y).HighPart) \ +) + +#define LargeIntegerEqualTo(X,Y) ( \ + !(((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)) \ +) + +#define LargeIntegerNotEqualTo(X,Y) ( \ + (((X).LowPart ^ (Y).LowPart) | ((X).HighPart ^ (Y).HighPart)) \ +) + +#define LargeIntegerLessThan(X,Y) ( \ + (((X).HighPart == (Y).HighPart) && ((X).LowPart < (Y).LowPart)) || \ + ((X).HighPart < (Y).HighPart) \ +) + +#define LargeIntegerLessThanOrEqualTo(X,Y) ( \ + (((X).HighPart == (Y).HighPart) && ((X).LowPart <= (Y).LowPart)) || \ + ((X).HighPart < (Y).HighPart) \ +) + +#define LargeIntegerGreaterThanZero(X) ( \ + (((X).HighPart == 0) && ((X).LowPart > 0)) || \ + ((X).HighPart > 0 ) \ +) + +#define LargeIntegerGreaterOrEqualToZero(X) ( \ + (X).HighPart >= 0 \ +) + +#define LargeIntegerEqualToZero(X) ( \ + !((X).LowPart | (X).HighPart) \ +) + +#define LargeIntegerNotEqualToZero(X) ( \ + ((X).LowPart | (X).HighPart) \ +) + +#define LargeIntegerLessThanZero(X) ( \ + ((X).HighPart < 0) \ +) + +#define LargeIntegerLessOrEqualToZero(X) ( \ + ((X).HighPart < 0) || !((X).LowPart | (X).HighPart) \ +) + +#ifdef __cplusplus +} +#endif + diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/limits b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/limits new file mode 100644 index 00000000..31beec74 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/limits @@ -0,0 +1,1015 @@ +// limits standard header +#pragma once +#ifndef _LIMITS_ +#define _LIMITS_ +#include +#include +#include +#include +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + +// ASSUMES: +// wraparound 2's complement integer arithmetic w/o traps +// all CHAR_BITs of each byte used by integers +// IEC559 (IEEE 754) floating-point arithmetic +// floating-point errors can trap +// tinyness detected before floating-point rounding +// 64-bit long long (if _LONGLONG defined) + + // ENUM float_denorm_style +typedef enum + { // constants for different IEEE float denormalization styles + denorm_indeterminate = -1, + denorm_absent = 0, + denorm_present = 1} + float_denorm_style; + + // ENUM float_round_style +typedef enum + { // constants for different IEEE rounding styles + round_indeterminate = -1, + round_toward_zero = 0, + round_to_nearest = 1, + round_toward_infinity = 2, + round_toward_neg_infinity = 3} + float_round_style; + + // STRUCT _Num_base +struct _CRTIMP2 _Num_base + { // base for all types, with common defaults + _STCONS(float_denorm_style, has_denorm, denorm_absent); + _STCONS(bool, has_denorm_loss, false); + _STCONS(bool, has_infinity, false); + _STCONS(bool, has_quiet_NaN, false); + _STCONS(bool, has_signaling_NaN, false); + _STCONS(bool, is_bounded, false); + _STCONS(bool, is_exact, false); + _STCONS(bool, is_iec559, false); + _STCONS(bool, is_integer, false); + _STCONS(bool, is_modulo, false); + _STCONS(bool, is_signed, false); + _STCONS(bool, is_specialized, false); + _STCONS(bool, tinyness_before, false); + _STCONS(bool, traps, false); + _STCONS(float_round_style, round_style, round_toward_zero); + _STCONS(int, digits, 0); + _STCONS(int, digits10, 0); + _STCONS(int, max_exponent, 0); + _STCONS(int, max_exponent10, 0); + _STCONS(int, min_exponent, 0); + _STCONS(int, min_exponent10, 0); + _STCONS(int, radix, 0); + }; + + // TEMPLATE CLASS numeric_limits +template + class numeric_limits + : public _Num_base + { // numeric limits for arbitrary type _Ty (say little or nothing) +public: + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return (_Ty(0)); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return (_Ty(0)); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (_Ty(0)); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (_Ty(0)); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (_Ty(0)); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (_Ty(0)); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (_Ty(0)); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (_Ty(0)); + } + }; + + // STRUCT _Num_int_base +struct _CRTIMP2 _Num_int_base + : public _Num_base + { // base for integer types + _STCONS(bool, is_bounded, true); + _STCONS(bool, is_exact, true); + _STCONS(bool, is_integer, true); + _STCONS(bool, is_modulo, true); + _STCONS(bool, is_specialized, true); + _STCONS(int, radix, 2); + }; + + // STRUCT _Num_float_base +struct _CRTIMP2 _Num_float_base + : public _Num_base + { // base for floating-point types + _STCONS(float_denorm_style, has_denorm, denorm_present); + _STCONS(bool, has_denorm_loss, true); + _STCONS(bool, has_infinity, true); + _STCONS(bool, has_quiet_NaN, true); + _STCONS(bool, has_signaling_NaN, true); + _STCONS(bool, is_bounded, true); + _STCONS(bool, is_exact, false); + _STCONS(bool, is_iec559, true); + _STCONS(bool, is_integer, false); + _STCONS(bool, is_modulo, false); + _STCONS(bool, is_signed, true); + _STCONS(bool, is_specialized, true); + _STCONS(bool, tinyness_before, true); + _STCONS(bool, traps, true); + _STCONS(float_round_style, round_style, round_to_nearest); + _STCONS(int, radix, FLT_RADIX); + }; + + // CLASS numeric_limits +template<> class _CRTIMP2 numeric_limits + : public _Num_int_base + { // limits for type char +public: + typedef char _Ty; + + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return (CHAR_MIN); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return (CHAR_MAX); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (0); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (0); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (0); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (0); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (0); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (0); + } + + _STCONS(bool, is_signed, CHAR_MIN != 0); + _STCONS(int, digits, CHAR_BIT - (CHAR_MIN != 0 ? 1 : 0)); + _STCONS(int, digits10, (CHAR_BIT - (CHAR_MIN != 0 ? 1 : 0)) + * 301L / 1000); + }; + + #ifdef _NATIVE_WCHAR_T_DEFINED + // CLASS numeric_limits +template<> class _CRTIMP2 numeric_limits + : public _Num_int_base + { // limits for type wchar_t +public: + typedef wchar_t _Ty; + + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return ((_Ty)WCHAR_MIN); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return ((_Ty)WCHAR_MAX); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (0); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (0); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (0); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (0); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (0); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (0); + } + + _STCONS(bool, is_signed, WCHAR_MIN != 0); + _STCONS(int, digits, CHAR_BIT * sizeof (wchar_t) + - (WCHAR_MIN != 0 ? 1 : 0)); + _STCONS(int, digits10, (CHAR_BIT * sizeof (wchar_t) + - (WCHAR_MIN != 0 ? 1 : 0)) * 301L / 1000); + }; + #endif /* _NATIVE_WCHAR_T_DEFINED */ + + // CLASS numeric_limits<_Bool> +template<> class _CRTIMP2 numeric_limits<_Bool> + : public _Num_int_base + { // limits for type bool +public: + typedef bool _Ty; + + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return (false); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return (true); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (0); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (0); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (0); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (0); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (0); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (0); + } + + _STCONS(bool, is_modulo, false); + _STCONS(bool, is_signed, false); + _STCONS(int, digits, 1); + _STCONS(int, digits10, 0); + }; + + // CLASS numeric_limits +template<> class _CRTIMP2 numeric_limits + : public _Num_int_base + { // limits for type signed char +public: + typedef signed char _Ty; + + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return (SCHAR_MIN); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return (SCHAR_MAX); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (0); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (0); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (0); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (0); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (0); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (0); + } + + _STCONS(bool, is_signed, true); + _STCONS(int, digits, CHAR_BIT - 1); + _STCONS(int, digits10, (CHAR_BIT - 1) * 301L / 1000); + }; + + // CLASS numeric_limits +template<> class _CRTIMP2 numeric_limits + : public _Num_int_base + { // limits for type unsigned char +public: + typedef unsigned char _Ty; + + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return (0); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return (UCHAR_MAX); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (0); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (0); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (0); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (0); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (0); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (0); + } + + _STCONS(bool, is_signed, false); + _STCONS(int, digits, CHAR_BIT); + _STCONS(int, digits10, (CHAR_BIT) * 301L / 1000); + }; + + // CLASS numeric_limits +template<> class _CRTIMP2 numeric_limits + : public _Num_int_base + { // limits for type short +public: + typedef short _Ty; + + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return (SHRT_MIN); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return (SHRT_MAX); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (0); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (0); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (0); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (0); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (0); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (0); + } + + _STCONS(bool, is_signed, true); + _STCONS(int, digits, CHAR_BIT * sizeof (short) - 1); + _STCONS(int, digits10, (CHAR_BIT * sizeof (short) - 1) + * 301L / 1000); + }; + + // CLASS numeric_limits +template<> class _CRTIMP2 numeric_limits + : public _Num_int_base + { // limits for type unsigned short +public: + typedef unsigned short _Ty; + + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return (0); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return (USHRT_MAX); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (0); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (0); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (0); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (0); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (0); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (0); + } + + _STCONS(bool, is_signed, false); + _STCONS(int, digits, CHAR_BIT * sizeof (unsigned short)); + _STCONS(int, digits10, (CHAR_BIT * sizeof (unsigned short)) + * 301L / 1000); + }; + + // CLASS numeric_limits +template<> class _CRTIMP2 numeric_limits + : public _Num_int_base + { // limits for type int +public: + typedef int _Ty; + + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return (INT_MIN); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return (INT_MAX); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (0); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (0); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (0); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (0); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (0); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (0); + } + + _STCONS(bool, is_signed, true); + _STCONS(int, digits, CHAR_BIT * sizeof (int) - 1); + _STCONS(int, digits10, (CHAR_BIT * sizeof (int) - 1) + * 301L / 1000); + }; + + // CLASS numeric_limits +template<> class _CRTIMP2 numeric_limits + : public _Num_int_base + { // limits for type unsigned int +public: + typedef unsigned int _Ty; + + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return (0); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return (UINT_MAX); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (0); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (0); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (0); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (0); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (0); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (0); + } + + _STCONS(bool, is_signed, false); + _STCONS(int, digits, CHAR_BIT * sizeof (unsigned int)); + _STCONS(int, digits10, (CHAR_BIT * sizeof (unsigned int)) + * 301L / 1000); + }; + + // CLASS numeric_limits +template<> class _CRTIMP2 numeric_limits + : public _Num_int_base + { // limits for type long +public: + typedef long _Ty; + + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return (LONG_MIN); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return (LONG_MAX); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (0); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (0); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (0); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (0); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (0); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (0); + } + + _STCONS(bool, is_signed, true); + _STCONS(int, digits, CHAR_BIT * sizeof (long) - 1); + _STCONS(int, digits10, (CHAR_BIT * sizeof (long) - 1) + * 301L / 1000); + }; + + // CLASS numeric_limits +template<> class _CRTIMP2 numeric_limits + : public _Num_int_base + { // limits for type unsigned long +public: + typedef unsigned long _Ty; + + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return (0); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return (ULONG_MAX); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (0); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (0); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (0); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (0); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (0); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (0); + } + + _STCONS(bool, is_signed, false); + _STCONS(int, digits, CHAR_BIT * sizeof (unsigned long)); + _STCONS(int, digits10, (CHAR_BIT * sizeof (unsigned long)) + * 301L / 1000); + }; + + #ifdef _LONGLONG + // CLASS numeric_limits<_LONGLONG> +template<> class _CRTIMP2 numeric_limits<_LONGLONG> + : public _Num_int_base + { // limits for type long long +public: + typedef _LONGLONG _Ty; + + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return (-_LLONG_MAX - _C2); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return (_LLONG_MAX); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (0); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (0); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (0); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (0); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (0); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (0); + } + + _STCONS(bool, is_signed, true); + _STCONS(int, digits, CHAR_BIT * sizeof (_LONGLONG) - 1); + _STCONS(int, digits10, (CHAR_BIT * sizeof (_LONGLONG) - 1) + * 301L / 1000); + }; + + // CLASS numeric_limits<_ULONGLONG> +template<> class _CRTIMP2 numeric_limits<_ULONGLONG> + : public _Num_int_base + { // limits for type unsigned long long +public: + typedef _ULONGLONG _Ty; + + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return (0); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return (_ULLONG_MAX); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (0); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (0); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (0); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (0); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (0); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (0); + } + + _STCONS(bool, is_signed, false); + _STCONS(int, digits, CHAR_BIT * sizeof (_ULONGLONG)); + _STCONS(int, digits10, (CHAR_BIT * sizeof (_ULONGLONG)) + * 301L / 1000); + }; + #endif /* _LONGLONG */ + + // CLASS numeric_limits +template<> class _CRTIMP2 numeric_limits + : public _Num_float_base + { // limits for type float +public: + typedef float _Ty; + + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return (FLT_MIN); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return (FLT_MAX); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (FLT_EPSILON); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (0.5); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (_FDenorm._Float); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (_FInf._Float); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (_FNan._Float); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (_FSnan._Float); + } + + _STCONS(int, digits, FLT_MANT_DIG); + _STCONS(int, digits10, FLT_DIG); + _STCONS(int, max_exponent, (int)FLT_MAX_EXP); + _STCONS(int, max_exponent10, (int)FLT_MAX_10_EXP); + _STCONS(int, min_exponent, (int)FLT_MIN_EXP); + _STCONS(int, min_exponent10, (int)FLT_MIN_10_EXP); + }; + + // CLASS numeric_limits +template<> class _CRTIMP2 numeric_limits + : public _Num_float_base + { // limits for type double +public: + typedef double _Ty; + + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return (DBL_MIN); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return (DBL_MAX); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (DBL_EPSILON); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (0.5); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (_Denorm._Double); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (_Inf._Double); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (_Nan._Double); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (_Snan._Double); + } + + _STCONS(int, digits, DBL_MANT_DIG); + _STCONS(int, digits10, DBL_DIG); + _STCONS(int, max_exponent, (int)DBL_MAX_EXP); + _STCONS(int, max_exponent10, (int)DBL_MAX_10_EXP); + _STCONS(int, min_exponent, (int)DBL_MIN_EXP); + _STCONS(int, min_exponent10, (int)DBL_MIN_10_EXP); + }; + + // CLASS numeric_limits +template<> class _CRTIMP2 numeric_limits + : public _Num_float_base + { // limits for type long double +public: + typedef long double _Ty; + + static _Ty (__cdecl min)() _THROW0() + { // return minimum value + return (LDBL_MIN); + } + + static _Ty (__cdecl max)() _THROW0() + { // return maximum value + return (LDBL_MAX); + } + + static _Ty __cdecl epsilon() _THROW0() + { // return smallest effective increment from 1.0 + return (LDBL_EPSILON); + } + + static _Ty __cdecl round_error() _THROW0() + { // return largest rounding error + return (0.5); + } + + static _Ty __cdecl denorm_min() _THROW0() + { // return minimum denormalized value + return (_LDenorm._Long_double); + } + + static _Ty __cdecl infinity() _THROW0() + { // return positive infinity + return (_LInf._Long_double); + } + + static _Ty __cdecl quiet_NaN() _THROW0() + { // return non-signaling NaN + return (_LNan._Long_double); + } + + static _Ty __cdecl signaling_NaN() _THROW0() + { // return signaling NaN + return (_LSnan._Long_double); + } + + _STCONS(int, digits, LDBL_MANT_DIG); + _STCONS(int, digits10, LDBL_DIG); + _STCONS(int, max_exponent, (int)LDBL_MAX_EXP); + _STCONS(int, max_exponent10, (int)LDBL_MAX_10_EXP); + _STCONS(int, min_exponent, (int)LDBL_MIN_EXP); + _STCONS(int, min_exponent10, (int)LDBL_MIN_10_EXP); + }; +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _LIMITS_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/limits.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/limits.h new file mode 100644 index 00000000..4c074006 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/limits.h @@ -0,0 +1,125 @@ +/*** +*limits.h - implementation dependent values +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* Contains defines for a number of implementation dependent values +* which are commonly used in C programs. +* [ANSI] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_LIMITS +#define _INC_LIMITS + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#define CHAR_BIT 8 /* number of bits in a char */ +#define SCHAR_MIN (-128) /* minimum signed char value */ +#define SCHAR_MAX 127 /* maximum signed char value */ +#define UCHAR_MAX 0xff /* maximum unsigned char value */ + +#ifndef _CHAR_UNSIGNED +#define CHAR_MIN SCHAR_MIN /* mimimum char value */ +#define CHAR_MAX SCHAR_MAX /* maximum char value */ +#else +#define CHAR_MIN 0 +#define CHAR_MAX UCHAR_MAX +#endif /* _CHAR_UNSIGNED */ + +#define MB_LEN_MAX 5 /* max. # bytes in multibyte char */ +#define SHRT_MIN (-32768) /* minimum (signed) short value */ +#define SHRT_MAX 32767 /* maximum (signed) short value */ +#define USHRT_MAX 0xffff /* maximum unsigned short value */ +#define INT_MIN (-2147483647 - 1) /* minimum (signed) int value */ +#define INT_MAX 2147483647 /* maximum (signed) int value */ +#define UINT_MAX 0xffffffff /* maximum unsigned int value */ +#define LONG_MIN (-2147483647L - 1) /* minimum (signed) long value */ +#define LONG_MAX 2147483647L /* maximum (signed) long value */ +#define ULONG_MAX 0xffffffffUL /* maximum unsigned long value */ + +/* Make sure these macros don't show up in ANSI C++ code */ +#if !defined(__cplusplus) || defined(_MSC_EXTENSIONS) +#define LLONG_MAX 0x7fffffffffffffff /*maximum signed __int64 value */ +#define LLONG_MIN 0x8000000000000000 /*minimum signed __int64 value */ +#define ULLONG_MAX 0xffffffffffffffff /*maximum unsigned __int64 value */ +#endif + +#if _INTEGRAL_MAX_BITS >= 8 +#define _I8_MIN (-127i8 - 1) /* minimum signed 8 bit value */ +#define _I8_MAX 127i8 /* maximum signed 8 bit value */ +#define _UI8_MAX 0xffui8 /* maximum unsigned 8 bit value */ +#endif + +#if _INTEGRAL_MAX_BITS >= 16 +#define _I16_MIN (-32767i16 - 1) /* minimum signed 16 bit value */ +#define _I16_MAX 32767i16 /* maximum signed 16 bit value */ +#define _UI16_MAX 0xffffui16 /* maximum unsigned 16 bit value */ +#endif + +#if _INTEGRAL_MAX_BITS >= 32 +#define _I32_MIN (-2147483647i32 - 1) /* minimum signed 32 bit value */ +#define _I32_MAX 2147483647i32 /* maximum signed 32 bit value */ +#define _UI32_MAX 0xffffffffui32 /* maximum unsigned 32 bit value */ +#endif + +#if _INTEGRAL_MAX_BITS >= 64 +/* minimum signed 64 bit value */ +#define _I64_MIN (-9223372036854775807i64 - 1) +/* maximum signed 64 bit value */ +#define _I64_MAX 9223372036854775807i64 +/* maximum unsigned 64 bit value */ +#define _UI64_MAX 0xffffffffffffffffui64 +#endif + +#if _INTEGRAL_MAX_BITS >= 128 +/* minimum signed 128 bit value */ +#define _I128_MIN (-170141183460469231731687303715884105727i128 - 1) +/* maximum signed 128 bit value */ +#define _I128_MAX 170141183460469231731687303715884105727i128 +/* maximum unsigned 128 bit value */ +#define _UI128_MAX 0xffffffffffffffffffffffffffffffffui128 +#endif + +#ifdef _POSIX_ + +#define _POSIX_ARG_MAX 4096 +#define _POSIX_CHILD_MAX 6 +#define _POSIX_LINK_MAX 8 +#define _POSIX_MAX_CANON 255 +#define _POSIX_MAX_INPUT 255 +#define _POSIX_NAME_MAX 14 +#define _POSIX_NGROUPS_MAX 0 +#define _POSIX_OPEN_MAX 16 +#define _POSIX_PATH_MAX 255 +#define _POSIX_PIPE_BUF 512 +#define _POSIX_SSIZE_MAX 32767 +#define _POSIX_STREAM_MAX 8 +#define _POSIX_TZNAME_MAX 3 + +#define ARG_MAX 14500 /* 16k heap, minus overhead */ +#define LINK_MAX 1024 +#define MAX_CANON _POSIX_MAX_CANON +#define MAX_INPUT _POSIX_MAX_INPUT +#define NAME_MAX 255 +#define NGROUPS_MAX 16 +#define OPEN_MAX 32 +#define PATH_MAX 512 +#define PIPE_BUF _POSIX_PIPE_BUF +#define SSIZE_MAX _POSIX_SSIZE_MAX +#define STREAM_MAX 20 +#define TZNAME_MAX 10 + +#endif /* POSIX */ + +#endif /* _INC_LIMITS */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/list b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/list new file mode 100644 index 00000000..e4143d74 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/list @@ -0,0 +1,1046 @@ +// list standard header +#pragma once +#ifndef _LIST_ +#define _LIST_ +#include +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) + + #pragma warning(disable:4284) + + #define _GENERIC_BASE _Node + + +_STD_BEGIN + + // TEMPLATE CLASS _List_nod +template + class _List_nod + { // base class for _List_ptr to hold allocator _Alnod +protected: + struct _Node; + friend struct _Node; + typedef typename _Alloc::template + rebind<_GENERIC_BASE>::other::pointer _Genptr; + + struct _Node + { // list node + _Node(_Genptr _Nextarg, _Genptr _Prevarg, const _Ty& _Myvalarg) + : _Next(_Nextarg), _Prev(_Prevarg), _Myval(_Myvalarg) + { // construct a node with value + } + + _Genptr _Next; // successor node, or first element if head + _Genptr _Prev; // predecessor node, or last element if head + _Ty _Myval; // the stored value, unused if head + }; + + _List_nod(_Alloc _Al) + : _Alnod(_Al) + { // construct allocator from _Al + } + + typename _Alloc::template rebind<_Node>::other + _Alnod; // allocator object for nodes + }; + + // TEMPLATE CLASS _List_ptr +template + class _List_ptr + : public _List_nod<_Ty, _Alloc> + { // base class for _List_val to hold allocator _Alptr +protected: + typedef typename _List_nod<_Ty, _Alloc>::_Node _Node; + typedef typename _Alloc::template + rebind<_Node>::other::pointer _Nodeptr; + + _List_ptr(_Alloc _Al) + : _List_nod<_Ty, _Alloc>(_Al), _Alptr(_Al) + { // construct base, and allocator from _Al + } + + typename _Alloc::template rebind<_Nodeptr>::other + _Alptr; // allocator object for pointers to nodes + }; + + // TEMPLATE CLASS _List_val +template + class _List_val + : public _List_ptr<_Ty, _Alloc> + { // base class for list to hold allocator _Alval +protected: + typedef typename _Alloc::template rebind<_Ty>::other _Alty; + + _List_val(_Alloc _Al = _Alloc()) + : _List_ptr<_Ty, _Alloc>(_Al), _Alval(_Al) + { // construct base, and allocator from _Al + } + + _Alty _Alval; // allocator object for values stored in nodes + }; + + // TEMPLATE CLASS list +template > + class list + : public _List_val<_Ty, _Ax> + { // bidirectional linked list +public: + typedef list<_Ty, _Ax> _Myt; + typedef _List_val<_Ty, _Ax> _Mybase; + typedef typename _Mybase::_Alty _Alloc; + +protected: + typedef typename _List_nod<_Ty, _Ax>::_Genptr _Genptr; + typedef typename _List_nod<_Ty, _Ax>::_Node _Node; + typedef _POINTER_X(_Node, _Alloc) _Nodeptr; + typedef _REFERENCE_X(_Nodeptr, _Alloc) _Nodepref; + typedef typename _Alloc::reference _Vref; + + static _Nodepref _Nextnode(_Nodeptr _Pnode) + { // return reference to successor pointer in node + return ((_Nodepref)(*_Pnode)._Next); + } + + static _Nodepref _Prevnode(_Nodeptr _Pnode) + { // return reference to predecessor pointer in node + return ((_Nodepref)(*_Pnode)._Prev); + } + + static _Vref _Myval(_Nodeptr _Pnode) + { // return reference to value in node + return ((_Vref)(*_Pnode)._Myval); + } + +public: + typedef _Alloc allocator_type; + typedef typename _Alloc::size_type size_type; + typedef typename _Alloc::difference_type _Dift; + typedef _Dift difference_type; + typedef typename _Alloc::pointer _Tptr; + typedef typename _Alloc::const_pointer _Ctptr; + typedef _Tptr pointer; + typedef _Ctptr const_pointer; + typedef typename _Alloc::reference _Reft; + typedef _Reft reference; + typedef typename _Alloc::const_reference const_reference; + typedef typename _Alloc::value_type value_type; + + // CLASS const_iterator + class const_iterator; + friend class const_iterator; + + class const_iterator + : public _Bidit<_Ty, _Dift, _Ctptr, const_reference> + { // iterator for nonmutable list + public: + typedef bidirectional_iterator_tag iterator_category; + typedef _Ty value_type; + typedef _Dift difference_type; + typedef _Ctptr pointer; + typedef const_reference reference; + + const_iterator() + : _Ptr(0) + { // construct with null node pointer + } + + const_iterator(_Nodeptr _Pnode) + : _Ptr(_Pnode) + { // construct with node pointer _Pnode + } + + const_reference operator*() const + { // return designated value + return (_Myval(_Ptr)); + } + + _Ctptr operator->() const + { // return pointer to class object + return (&**this); + } + + const_iterator& operator++() + { // preincrement + _Ptr = _Nextnode(_Ptr); + return (*this); + } + + const_iterator operator++(int) + { // postincrement + const_iterator _Tmp = *this; + ++*this; + return (_Tmp); + } + + const_iterator& operator--() + { // predecrement + _Ptr = _Prevnode(_Ptr); + return (*this); + } + + const_iterator operator--(int) + { // postdecrement + const_iterator _Tmp = *this; + --*this; + return (_Tmp); + } + + bool operator==(const const_iterator& _Right) const + { // test for iterator equality + return (_Ptr == _Right._Ptr); + } + + bool operator!=(const const_iterator& _Right) const + { // test for iterator inequality + return (!(*this == _Right)); + } + + _Nodeptr _Mynode() const + { // return node pointer + return (_Ptr); + } + + + protected: + _Nodeptr _Ptr; // pointer to node + }; + + // CLASS iterator + class iterator; + friend class iterator; + + class iterator + : public const_iterator + { // iterator for mutable list + public: + typedef bidirectional_iterator_tag iterator_category; + typedef _Ty value_type; + typedef _Dift difference_type; + typedef _Tptr pointer; + typedef _Reft reference; + + iterator() + { // construct with null node + } + + iterator(_Nodeptr _Pnode) + : const_iterator(_Pnode) + { // construct with node pointer _Pnode + } + + reference operator*() const + { // return designated value + return ((reference)**(const_iterator *)this); + } + + _Tptr operator->() const + { // return pointer to class object + return (&**this); + } + + iterator& operator++() + { // preincrement + ++(*(const_iterator *)this); + return (*this); + } + + iterator operator++(int) + { // postincrement + iterator _Tmp = *this; + ++*this; + return (_Tmp); + } + + iterator& operator--() + { // predecrement + --(*(const_iterator *)this); + return (*this); + } + + iterator operator--(int) + { // postdecrement + iterator _Tmp = *this; + --*this; + return (_Tmp); + } + }; + + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + + list() + : _Mybase(), _Myhead(_Buynode()), _Mysize(0) + { // construct empty list + } + + explicit list(const _Alloc& _Al) + : _Mybase(_Al), _Myhead(_Buynode()), _Mysize(0) + { // construct empty list, allocator + } + + explicit list(size_type _Count) + : _Mybase(), _Mysize(0) + { // construct list from _Count * _Ty() + _Ty _Val = _Ty(); + _Myhead = _Buynode(); + _Construct_n(_Count, _Val); + } + + list(size_type _Count, const _Ty& _Val) + : _Mybase(), _Myhead(_Buynode()), _Mysize(0) + { // construct list from _Count * _Val + _Construct_n(_Count, _Val); + } + + list(size_type _Count, const _Ty& _Val, const _Alloc& _Al) + : _Mybase(_Al), _Myhead(_Buynode()), _Mysize(0) + { // construct list, allocator from _Count * _Val + _Construct_n(_Count, _Val); + } + + list(const _Myt& _Right) + : _Mybase(_Right._Alval), + _Myhead(_Buynode()), _Mysize(0) + { // construct list by copying _Right + _TRY_BEGIN + insert(begin(), _Right.begin(), _Right.end()); + _CATCH_ALL + _Tidy(); + _RERAISE; + _CATCH_END + } + + template + list(_Iter _First, _Iter _Last) + : _Mybase(), _Myhead(_Buynode()), _Mysize(0) + { // construct list from [_First, _Last) + _Construct(_First, _Last, _Iter_cat(_First)); + } + + template + list(_Iter _First, _Iter _Last, const _Alloc& _Al) + : _Mybase(_Al), _Myhead(_Buynode()), _Mysize(0) + { // construct list, allocator from [_First, _Last) + _Construct(_First, _Last, _Iter_cat(_First)); + } + + template + void _Construct(_Iter _Count, _Iter _Val, _Int_iterator_tag) + { // construct list from _Count * _Val + _Construct_n((size_type)_Count, (_Ty)_Val); + } + + template + void _Construct(_Iter _First, + _Iter _Last, input_iterator_tag) + { // construct list from [_First, _Last), input iterators + _TRY_BEGIN + insert(begin(), _First, _Last); + _CATCH_ALL + _Tidy(); + _RERAISE; + _CATCH_END + } + + void _Construct_n(size_type _Count, + const _Ty& _Val) + { // construct from _Count * _Val + _TRY_BEGIN + _Insert_n(begin(), _Count, _Val); + _CATCH_ALL + _Tidy(); + _RERAISE; + _CATCH_END + } + + ~list() + { // destroy the object + _Tidy(); + } + + _Myt& operator=(const _Myt& _Right) + { // assign _Right + if (this != &_Right) + assign(_Right.begin(), _Right.end()); + return (*this); + } + + iterator begin() + { // return iterator for beginning of mutable sequence + return (iterator(_Nextnode(_Myhead))); + } + + const_iterator begin() const + { // return iterator for beginning of nonmutable sequence + return (const_iterator(_Nextnode(_Myhead))); + } + + iterator end() + { // return iterator for end of mutable sequence + return (iterator(_Myhead)); + } + + const_iterator end() const + { // return iterator for end of nonmutable sequence + return (const_iterator(_Myhead)); + } + + reverse_iterator rbegin() + { // return iterator for beginning of reversed mutable sequence + return (reverse_iterator(end())); + } + + const_reverse_iterator rbegin() const + { // return iterator for beginning of reversed nonmutable sequence + return (const_reverse_iterator(end())); + } + + reverse_iterator rend() + { // return iterator for end of reversed mutable sequence + return (reverse_iterator(begin())); + } + + const_reverse_iterator rend() const + { // return iterator for end of reversed nonmutable sequence + return (const_reverse_iterator(begin())); + } + + void resize(size_type _Newsize) + { // determine new length, padding with _Ty() elements as needed + resize(_Newsize, _Ty()); + } + + void resize(size_type _Newsize, _Ty _Val) + { // determine new length, padding with _Val elements as needed + if (_Mysize < _Newsize) + _Insert_n(end(), _Newsize - _Mysize, _Val); + else + while (_Newsize < _Mysize) + pop_back(); + } + + size_type size() const + { // return length of sequence + return (_Mysize); + } + + size_type max_size() const + { // return maximum possible length of sequence + return (this->_Alval.max_size()); + } + + bool empty() const + { // test if sequence is empty + return (_Mysize == 0); + } + + allocator_type get_allocator() const + { // return allocator object for values + return (this->_Alval); + } + + reference front() + { // return first element of mutable sequence + return (*begin()); + } + + const_reference front() const + { // return first element of nonmutable sequence + return (*begin()); + } + + reference back() + { // return last element of mutable sequence + return (*(--end())); + } + + const_reference back() const + { // return last element of nonmutable sequence + return (*(--end())); + } + + void push_front(const _Ty& _Val) + { // insert element at beginning + _Insert(begin(), _Val); + } + + void pop_front() + { // erase element at beginning + erase(begin()); + } + + void push_back(const _Ty& _Val) + { // insert element at end + _Insert(end(), _Val); + } + + void pop_back() + { // erase element at end + erase(--end()); + } + + template + void assign(_Iter _First, _Iter _Last) + { // assign [_First, _Last) + _Assign(_First, _Last, _Iter_cat(_First)); + } + + template + void _Assign(_Iter _Count, _Iter _Val, _Int_iterator_tag) + { // assign _Count * _Val + _Assign_n((size_type)_Count, (_Ty)_Val); + } + + template + void _Assign(_Iter _First, _Iter _Last, input_iterator_tag) + { // assign [_First, _Last), input iterators + clear(); + insert(begin(), _First, _Last); + } + + void assign(size_type _Count, const _Ty& _Val) + { // assign _Count * _Val + _Assign_n(_Count, _Val); + } + + iterator insert(iterator _Where, const _Ty& _Val) + { // insert _Val at _Where + _Insert(_Where, _Val); + return (--_Where); + } + + void _Insert(iterator _Where, + const _Ty& _Val) + { // insert _Val at _Where + _Nodeptr _Pnode = _Where._Mynode(); + _Nodeptr _Newnode = _Buynode(_Pnode, _Prevnode(_Pnode), _Val); + _Incsize(1); + _Prevnode(_Pnode) = _Newnode; + _Nextnode(_Prevnode(_Newnode)) = _Newnode; + } + + void insert(iterator _Where, size_type _Count, const _Ty& _Val) + { // insert _Count * _Val at _Where + _Insert_n(_Where, _Count, _Val); + } + + template + void insert(iterator _Where, _Iter _First, _Iter _Last) + { // insert [_First, _Last) at _Where + _Insert(_Where, _First, _Last, _Iter_cat(_First)); + } + + template + void _Insert(iterator _Where, _Iter _Count, _Iter _Val, + _Int_iterator_tag) + { // insert _Count * _Val at _Where + _Insert_n(_Where, (size_type)_Count, (_Ty)_Val); + } + + template + void _Insert(iterator _Where, + _Iter _First, _Iter _Last, input_iterator_tag) + { // insert [_First, _Last) at _Where, input iterators + size_type _Num = 0; + + _TRY_BEGIN + for (; _First != _Last; ++_First, ++_Num) + _Insert(_Where, *_First); + _CATCH_ALL + for (; 0 < _Num; --_Num) + { // undo inserts + iterator _Before = _Where; + erase(--_Before); + } + _RERAISE; + _CATCH_END + } + + template + void _Insert(iterator _Where, + _Iter _First, _Iter _Last, forward_iterator_tag) + { // insert [_First, _Last) at _Where, forward iterators + _Iter _Next = _First; + + _TRY_BEGIN + for (; _First != _Last; ++_First) + _Insert(_Where, *_First); + _CATCH_ALL + for (; _Next != _First; ++_Next) + { // undo inserts + iterator _Before = _Where; + erase(--_Before); + } + _RERAISE; + _CATCH_END + } + + iterator erase(iterator _Where) + { // erase element at _Where + _Nodeptr _Pnode = (_Where++)._Mynode(); + if (_Pnode != _Myhead) + { // not list head, safe to erase + _Nextnode(_Prevnode(_Pnode)) = _Nextnode(_Pnode); + _Prevnode(_Nextnode(_Pnode)) = _Prevnode(_Pnode); + this->_Alnod.destroy(_Pnode); + this->_Alnod.deallocate(_Pnode, 1); + --_Mysize; + } + return (_Where); + } + + iterator erase(iterator _First, iterator _Last) + { // erase [_First, _Last) + if (_First == begin() && _Last == end()) + clear(); + else + while (_First != _Last) + _First = erase(_First); + return (_Last); + } + + void clear() + { // erase all + _Nodeptr _Pnext; + _Nodeptr _Pnode = _Nextnode(_Myhead); + _Nextnode(_Myhead) = _Myhead; + _Prevnode(_Myhead) = _Myhead; + _Mysize = 0; + + for (; _Pnode != _Myhead; _Pnode = _Pnext) + { // delete an element + _Pnext = _Nextnode(_Pnode); + this->_Alnod.destroy(_Pnode); + this->_Alnod.deallocate(_Pnode, 1); + } + } + + void swap(_Myt& _Right) + { // exchange contents with _Right + if (this->_Alval == _Right._Alval) + { // same allocator, swap control information + std::swap(_Myhead, _Right._Myhead); + std::swap(_Mysize, _Right._Mysize); + } + else + { // different allocator, do splices + iterator _Where = begin(); + splice(_Where, _Right); + _Right.splice(_Right.begin(), *this, _Where, end()); + } + } + + void splice(iterator _Where, _Myt& _Right) + { // splice all of _Right at _Where + if (this != &_Right && !_Right.empty()) + { // worth splicing, do it + _Splice(_Where, _Right, _Right.begin(), _Right.end(), + _Right._Mysize); + } + } + + void splice(iterator _Where, _Myt& _Right, iterator _First) + { // splice _Right [_First, _First + 1) at _Where + if (_First != _Right.end()) + + { // element exists, try splice + iterator _Last = _First; + ++_Last; + if (this != &_Right + || (_Where != _First && _Where != _Last)) + _Splice(_Where, _Right, _First, _Last, 1); + } + } + + void splice(iterator _Where, + _Myt& _Right, iterator _First, iterator _Last) + { // splice _Right [_First, _Last) at _Where + if (_First != _Last && (this != &_Right || _Where != _Last)) + { // worth splicing, do it + size_type _Count = 0; + if (this == &_Right) + ; // just rearrange this list + else if (_First == _Right.begin() && _Last == _Right.end()) + _Count = _Right._Mysize; // splice in whole list + else + _Distance(_First, _Last, _Count); // splice in partial list + _Splice(_Where, _Right, _First, _Last, _Count); + } + } + + void remove(const _Ty& _Val) + { // erase each element matching _Val + iterator _Last = end(); + for (iterator _First = begin(); _First != _Last; ) + if (*_First == _Val) + _First = erase(_First); + else + ++_First; + } + + template + void remove_if(_Pr1 _Pred) + { // erase each element satisfying _Pr1 + iterator _Last = end(); + for (iterator _First = begin(); _First != _Last; ) + if (_Pred(*_First)) + _First = erase(_First); + else + ++_First; + } + + void unique() + { // erase each element matching previous + if (2 <= _Mysize) + { // worth doing + iterator _First = begin(); + iterator _After = _First; + for (++_After; _After != end(); ) + if (*_First == *_After) + _After = erase(_After); + else + _First = _After++; + } + } + + template + void unique(_Pr2 _Pred) + { // erase each element satisfying _Pred with previous + if (2 <= _Mysize) + { // worth doing + iterator _First = begin(); + iterator _After = _First; + for (++_After; _After != end(); ) + if (_Pred(*_First, *_After)) + _After = erase(_After); + else + _First = _After++; + } + } + + void merge(_Myt& _Right) + { // merge in elements from _Right, both ordered by operator< + if (&_Right != this) + { // safe to merge, do it + iterator _First1 = begin(), _Last1 = end(); + iterator _First2 = _Right.begin(), _Last2 = _Right.end(); + + while (_First1 != _Last1 && _First2 != _Last2) + if (*_First2 < *_First1) + { // splice in an element from _Right + iterator _Mid2 = _First2; + _Splice(_First1, _Right, _First2, ++_Mid2, 1); + _First2 = _Mid2; + } + else + ++_First1; + + if (_First2 != _Last2) + _Splice(_Last1, _Right, _First2, _Last2, + _Right._Mysize); // splice remainder of _Right + } + } + + template + void merge(_Myt& _Right, _Pr3 _Pred) + { // merge in elements from _Right, both ordered by _Pred + if (&_Right != this) + { // safe to merge, do it + iterator _First1 = begin(), _Last1 = end(); + iterator _First2 = _Right.begin(), _Last2 = _Right.end(); + + while (_First1 != _Last1 && _First2 != _Last2) + if (_Pred(*_First2, *_First1)) + { // splice in an element from _Right + iterator _Mid2 = _First2; + _Splice(_First1, _Right, _First2, ++_Mid2, 1); + _First2 = _Mid2; + } + else + ++_First1; + + if (_First2 != _Last2) + _Splice(_Last1, _Right, _First2, _Last2, + _Right._Mysize); // splice remainder of _Right + } + } + + void sort() + { // order sequence, using operator< + if (2 <= _Mysize) + { // worth sorting, do it + const size_t _MAXBINS = 25; + _Myt _Templist(this->_Alval), _Binlist[_MAXBINS + 1]; + size_t _Maxbin = 0; + + while (!empty()) + { // sort another element, using bins + _Templist.splice(_Templist.begin(), *this, begin()); + size_t _Bin; + + for (_Bin = 0; _Bin < _Maxbin && !_Binlist[_Bin].empty(); + ++_Bin) + { // merge into ever larger bins + _Binlist[_Bin].merge(_Templist); + _Binlist[_Bin].swap(_Templist); + } + + if (_Bin == _MAXBINS) + _Binlist[_Bin - 1].merge(_Templist); + else + { // spill to new bin, while they last + _Binlist[_Bin].swap(_Templist); + if (_Bin == _Maxbin) + ++_Maxbin; + } + } + + for (size_t _Bin = 1; _Bin < _Maxbin; ++_Bin) + _Binlist[_Bin].merge(_Binlist[_Bin - 1]); // merge up + swap(_Binlist[_Maxbin - 1]); // replace from last bin + } + } + + template + void sort(_Pr3 _Pred) + { // order sequence, using _Pred + if (2 <= _Mysize) + { // worth sorting, do it + const size_t _MAXBINS = 25; + _Myt _Templist(this->_Alval), _Binlist[_MAXBINS + 1]; + size_t _Maxbin = 0; + + while (!empty()) + { // sort another element, using bins + _Templist.splice(_Templist.begin(), *this, begin()); + size_t _Bin; + + for (_Bin = 0; _Bin < _Maxbin && !_Binlist[_Bin].empty(); + ++_Bin) + { // merge into ever larger bins + _Binlist[_Bin].merge(_Templist, _Pred); + _Binlist[_Bin].swap(_Templist); + } + + if (_Bin == _MAXBINS) + _Binlist[_Bin - 1].merge(_Templist, _Pred); + else + { // spill to new bin, while they last + _Binlist[_Bin].swap(_Templist); + if (_Bin == _Maxbin) + ++_Maxbin; + } + } + + for (size_t _Bin = 1; _Bin < _Maxbin; ++_Bin) + _Binlist[_Bin].merge(_Binlist[_Bin - 1], + _Pred); // merge up + swap(_Binlist[_Maxbin - 1]); // replace with last bin + } + } + + void reverse() + { // reverse sequence + if (2 <= _Mysize) + { // worth doing + iterator _Last = end(); + for (iterator _Next = ++begin(); _Next != _Last; ) + { // move next element to beginning + iterator _Before = _Next; + _Splice(begin(), *this, _Before, ++_Next, 1); + } + } + } + + void _Splice(iterator _Where, + _Myt& _Right, iterator _First, iterator _Last, size_type _Count) + { // splice _Right [_First, _Last) before _Where + + if (this->_Alval == _Right._Alval) + { // same allocator, just relink + + if (this != &_Right) + { // splicing from another list, adjust counts + _Incsize(_Count); + _Right._Mysize -= _Count; + } + _Nextnode(_Prevnode(_First._Mynode())) = _Last._Mynode(); + _Nextnode(_Prevnode(_Last._Mynode())) = _Where._Mynode(); + _Nextnode(_Prevnode(_Where._Mynode())) = _First._Mynode(); + _Nodeptr _Pnode = _Prevnode(_Where._Mynode()); + _Prevnode(_Where._Mynode()) = _Prevnode(_Last._Mynode()); + _Prevnode(_Last._Mynode()) = _Prevnode(_First._Mynode()); + _Prevnode(_First._Mynode()) = _Pnode; + } + else + { // different allocator, copy nodes then erase source + insert(_Where, _First, _Last); + _Right.erase(_First, _Last); + } + } + +protected: + void _Assign_n(size_type _Count, const _Ty& _Val) + { // assign _Count * _Val + _Ty _Tmp = _Val; // in case _Val is in sequence + clear(); + _Insert_n(begin(), _Count, _Tmp); + } + + _Nodeptr _Buynode() + { // allocate a head node and set links + _Nodeptr _Pnode = this->_Alnod.allocate(1); + int _Linkcnt = 0; + + _TRY_BEGIN + this->_Alptr.construct(&_Nextnode(_Pnode), _Pnode); + ++_Linkcnt; + this->_Alptr.construct(&_Prevnode(_Pnode), _Pnode); + _CATCH_ALL + if (0 < _Linkcnt) + this->_Alptr.destroy(&_Nextnode(_Pnode)); + this->_Alnod.deallocate(_Pnode, 1); + _RERAISE; + _CATCH_END + return (_Pnode); + } + + _Nodeptr _Buynode(_Nodeptr _Next, + _Nodeptr _Prev, const _Ty& _Val) + { // allocate a node and set links and value + _Nodeptr _Pnode = this->_Alnod.allocate(1); + _TRY_BEGIN + new ((void *)_Pnode) _Node(_Next, _Prev, _Val); + _CATCH_ALL + this->_Alnod.deallocate(_Pnode, 1); + _RERAISE; + _CATCH_END + return (_Pnode); + } + + void _Tidy() + { // free all storage + clear(); + this->_Alptr.destroy(&_Nextnode(_Myhead)); + this->_Alptr.destroy(&_Prevnode(_Myhead)); + this->_Alnod.deallocate(_Myhead, 1); + _Myhead = 0; + } + + void _Insert_n(iterator _Where, + size_type _Count, const _Ty& _Val) + { // insert _Count * _Val at _Where + size_type _Countsave = _Count; + + _TRY_BEGIN + for (; 0 < _Count; --_Count) + _Insert(_Where, _Val); + _CATCH_ALL + for (; _Count < _Countsave; ++_Count) + { // undo inserts + iterator _Before = _Where; + erase(--_Before); + } + _RERAISE; + _CATCH_END + } + + void _Incsize(size_type _Count) + { // alter element count, with checking + if (max_size() - _Mysize < _Count) + _THROW(length_error, "list too long"); + _Mysize += _Count; + } + + +public: + _Nodeptr _Myhead; // pointer to head node + size_type _Mysize; // number of elements + }; + + // list TEMPLATE OPERATORS +template inline + void swap(list<_Ty, _Alloc>& _Left, list<_Ty, _Alloc>& _Right) + { // swap _Left and _Right lists + _Left.swap(_Right); + } + +template inline + bool operator==(const list<_Ty, _Alloc>& _Left, + const list<_Ty, _Alloc>& _Right) + { // test for list equality + return (_Left.size() == _Right.size() + && equal(_Left.begin(), _Left.end(), _Right.begin())); + } + +template inline + bool operator!=(const list<_Ty, _Alloc>& _Left, + const list<_Ty, _Alloc>& _Right) + { // test for list inequality + return (!(_Left == _Right)); + } + +template inline + bool operator<(const list<_Ty, _Alloc>& _Left, + const list<_Ty, _Alloc>& _Right) + { // test if _Left < _Right for lists + return (lexicographical_compare(_Left.begin(), _Left.end(), + _Right.begin(), _Right.end())); + } + +template inline + bool operator>(const list<_Ty, _Alloc>& _Left, + const list<_Ty, _Alloc>& _Right) + { // test if _Left > _Right for lists + return (_Right < _Left); + } + +template inline + bool operator<=(const list<_Ty, _Alloc>& _Left, + const list<_Ty, _Alloc>& _Right) + { // test if _Left <= _Right for lists + return (!(_Right < _Left)); + } + +template inline + bool operator>=(const list<_Ty, _Alloc>& _Left, + const list<_Ty, _Alloc>& _Right) + { // test if _Left >= _Right for lists + return (!(_Left < _Right)); + } + + +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _LIST_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + */ + +/* + * This file is derived from software bearing the following + * restrictions: + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this + * software and its documentation for any purpose is hereby + * granted without fee, provided that the above copyright notice + * appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation. + * Hewlett-Packard Company makes no representations about the + * suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/locale b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/locale new file mode 100644 index 00000000..9afd99f1 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/locale @@ -0,0 +1,244 @@ +// locale standard header +#pragma once +#ifndef _LOCALE_ +#define _LOCALE_ +#include +#include +#include +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // TEMPLATE CLASS collate +template + class collate + : public locale::facet + { // facet for ordering sequences of elements +public: + typedef _Elem char_type; + typedef basic_string<_Elem, char_traits<_Elem>, + allocator<_Elem> > string_type; + + int compare(const _Elem *_First1, const _Elem *_Last1, + const _Elem *_First2, const _Elem *_Last2) const + { // compare [_First1, _Last1) to [_First2, _Last2) + return (do_compare(_First1, _Last1, _First2, _Last2)); + } + + string_type transform(const _Elem *_First, const _Elem *_Last) const + { // transform [_First, _Last) to key string + return (do_transform(_First, _Last)); + } + + long hash(const _Elem *_First, const _Elem *_Last) const + { // compute hash code for [_First, _Last) + return (do_hash(_First, _Last)); + } + + static locale::id id; // unique facet id + + explicit collate(size_t _Refs = 0) + : locale::facet(_Refs) + { // construct from current locale + _Init(_Locinfo()); + } + + collate(const _Locinfo& _Lobj, size_t _Refs = 0) + : locale::facet(_Refs) + { // construct from specified locale + _Init(_Lobj); + } + + static size_t __cdecl _Getcat(const locale::facet **_Ppf = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) + *_Ppf = _NEW_CRT collate<_Elem>; + return (_X_COLLATE); + } + +_PROTECTED: + ~collate() + { // destroy the object + } + +protected: + void _Init(const _Locinfo& _Lobj) + { // initialize from _Lobj + _Coll = _Lobj._Getcoll(); + } + + virtual int do_compare(const _Elem *_First1, const _Elem *_Last1, + const _Elem *_First2, const _Elem *_Last2) const + { // compare [_First1, _Last1) to [_First2, _Last2) + return (_LStrcoll(_First1, _Last1, _First2, _Last2, &_Coll)); + } + + virtual string_type do_transform(const _Elem *_First, + const _Elem *_Last) const + { // transform [_First, _Last) to key string + size_t _Count; + string_type _Str; + + for (_Count = _Last - _First; 0 < _Count; ) + { // grow string if locale-specific strxfrm fails + _Str.resize(_Count); + if ((_Count = _LStrxfrm(&*_Str.begin(), + &*_Str.begin() + _Str.size(), + _First, _Last, &_Coll)) <= _Str.size()) + break; + } + _Str.resize(_Count); + return (_Str); + } + + virtual long do_hash(const _Elem *_First, + const _Elem *_Last) const + { // compute hash code for [_First, _Last) + unsigned long _Val = 0; + for (; _First != _Last; ++_First) + _Val = (_Val << 8 | _Val >> 24) + *_First; + return ((long)_Val); + } + +private: + _Locinfo::_Collvec _Coll; // used by _LStrcoll and _XStrxfrm + }; + + // STATIC collate::id OBJECT +template + locale::id collate<_Elem>::id; + + #ifdef _DLL_CPPLIB +template class _CRTIMP2 collate; +template class _CRTIMP2 collate; + + + + #endif /* _DLL_CPPLIB */ + + // TEMPLATE CLASS collate_byname +template + class collate_byname + : public collate<_Elem> + { // collate for named locale +public: + explicit collate_byname(const char *_Locname, size_t _Refs = 0) + : collate<_Elem>(_Locinfo(_Locname), _Refs) + { // construct for named locale + } + +_PROTECTED: + virtual ~collate_byname() + { // destroy the object + } + }; + + // locale SUPPORT TEMPLATES + + #define _HAS(loc, fac) has_facet(loc) + +template inline + bool has_facet(const locale& _Loc) _THROW0() + { // test if facet is in locale + _Lockit _Lock(_LOCK_LOCALE); // the thread lock, make get atomic + size_t _Id = _Facet::id; + return (_Loc._Getfacet(_Id) != 0 || _Facet::_Getcat() != (size_t)(-1)); + } + +template inline _DEPRECATED + bool has_facet(const locale& _Loc, const _Facet *) _THROW0() + { // test if facet is in locale -- retained, two arg version + return (has_facet<_Facet>(_Loc)); + } + + // ctype TEMPLATE FUNCTIONS +template inline + bool (isalnum)(_Elem _Ch, const locale& _Loc) + { // test if character is alphanumeric, locale specific + return (_USE(_Loc, ctype<_Elem>).is(ctype_base::alnum, _Ch)); + } + +template inline + bool (isalpha)(_Elem _Ch, const locale& _Loc) + { // test if character is alphabetic, locale specific + return (_USE(_Loc, ctype<_Elem>).is(ctype_base::alpha, _Ch)); + } + +template inline + bool (iscntrl)(_Elem _Ch, const locale& _Loc) + { // test if character is control, locale specific + return (_USE(_Loc, ctype<_Elem>).is(ctype_base::cntrl, _Ch)); + } + +template inline + bool (isdigit)(_Elem _Ch, const locale& _Loc) + { // test if character is digit, locale specific + return (_USE(_Loc, ctype<_Elem>).is(ctype_base::digit, _Ch)); + } + +template inline + bool (isgraph)(_Elem _Ch, const locale& _Loc) + { // test if character is graphic, locale specific + return (_USE(_Loc, ctype<_Elem>).is(ctype_base::graph, _Ch)); + } + +template inline + bool (islower)(_Elem _Ch, const locale& _Loc) + { // test if character is lower case, locale specific + return (_USE(_Loc, ctype<_Elem>).is(ctype_base::lower, _Ch)); + } + +template inline + bool (isprint)(_Elem _Ch, const locale& _Loc) + { // test if character is printing, locale specific + return (_USE(_Loc, ctype<_Elem>).is(ctype_base::print, _Ch)); + } + +template inline + bool (ispunct)(_Elem _Ch, const locale& _Loc) + { // test if character is punctuation, locale specific + return (_USE(_Loc, ctype<_Elem>).is(ctype_base::punct, _Ch)); + } + +template inline + bool (isspace)(_Elem _Ch, const locale& _Loc) + { // test if character is whitespace, locale specific + return (_USE(_Loc, ctype<_Elem>).is(ctype_base::space, _Ch)); + } + +template inline + bool (isupper)(_Elem _Ch, const locale& _Loc) + { // test if character is upper case, locale specific + return (_USE(_Loc, ctype<_Elem>).is(ctype_base::upper, _Ch)); + } + +template inline + bool (isxdigit)(_Elem _Ch, const locale& _Loc) + { // test if character is hexadecimal digit, locale specific + return (_USE(_Loc, ctype<_Elem>).is(ctype_base::xdigit, _Ch)); + } + +template inline + _Elem (tolower)(_Elem _Ch, const locale& _Loc) + { // convert character to lower case, locale specific + return (_USE(_Loc, ctype<_Elem>).tolower(_Ch)); + } + +template inline + _Elem (toupper)(_Elem _Ch, const locale& _Loc) + { // convert character to upper case, locale specific + return (_USE(_Loc, ctype<_Elem>).toupper(_Ch)); + } +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _LOCALE_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/locale.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/locale.h new file mode 100644 index 00000000..0a5722c0 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/locale.h @@ -0,0 +1,141 @@ +/*** +*locale.h - definitions/declarations for localization routines +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the structures, values, macros, and functions +* used by the localization routines. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_LOCALE +#define _INC_LOCALE + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +/* + * Currently, all MS C compilers for Win32 platforms default to 8 byte + * alignment. + */ +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + +/* Locale categories */ + +#define LC_ALL 0 +#define LC_COLLATE 1 +#define LC_CTYPE 2 +#define LC_MONETARY 3 +#define LC_NUMERIC 4 +#define LC_TIME 5 + +#define LC_MIN LC_ALL +#define LC_MAX LC_TIME + +/* Locale convention structure */ + +#ifndef _LCONV_DEFINED +struct lconv { + char *decimal_point; + char *thousands_sep; + char *grouping; + char *int_curr_symbol; + char *currency_symbol; + char *mon_decimal_point; + char *mon_thousands_sep; + char *mon_grouping; + char *positive_sign; + char *negative_sign; + char int_frac_digits; + char frac_digits; + char p_cs_precedes; + char p_sep_by_space; + char n_cs_precedes; + char n_sep_by_space; + char p_sign_posn; + char n_sign_posn; + }; +#define _LCONV_DEFINED +#endif + +/* ANSI: char lconv members default is CHAR_MAX which is compile time + dependent. Defining and using _charmax here causes CRT startup code + to initialize lconv members properly */ + +#ifdef _CHAR_UNSIGNED +extern int _charmax; +extern __inline int __dummy() { return _charmax; } +#endif + +/* function prototypes */ + +_CRTIMP char * __cdecl setlocale(int, const char *); +_CRTIMP struct lconv * __cdecl localeconv(void); + +#ifndef _WLOCALE_DEFINED + +/* wide function prototypes, also declared in wchar.h */ + +_CRTIMP wchar_t * __cdecl _wsetlocale(int, const wchar_t *); + +#define _WLOCALE_DEFINED +#endif + +#ifdef __cplusplus +} +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_LOCALE */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/malloc.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/malloc.h new file mode 100644 index 00000000..fe7ba327 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/malloc.h @@ -0,0 +1,188 @@ +/*** +*malloc.h - declarations and definitions for memory allocation functions +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* Contains the function declarations for memory allocation functions; +* also defines manifest constants and types used by the heap routines. +* [System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_MALLOC +#define _INC_MALLOC + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +/* + * Currently, all MS C compilers for Win32 platforms default to 8 byte + * alignment. + */ +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + + +#ifndef _SIZE_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 size_t; +#else +typedef _W64 unsigned int size_t; +#endif +#define _SIZE_T_DEFINED +#endif + +#ifndef _INTPTR_T_DEFINED +#ifdef _WIN64 +typedef __int64 intptr_t; +#else +typedef _W64 int intptr_t; +#endif +#define _INTPTR_T_DEFINED +#endif + + +/* Maximum heap request the heap manager will attempt */ + +#ifdef _WIN64 +#define _HEAP_MAXREQ 0xFFFFFFFFFFFFFFE0 +#else +#define _HEAP_MAXREQ 0xFFFFFFE0 +#endif + +/* Constants for _heapchk/_heapset/_heapwalk routines */ + +#define _HEAPEMPTY (-1) +#define _HEAPOK (-2) +#define _HEAPBADBEGIN (-3) +#define _HEAPBADNODE (-4) +#define _HEAPEND (-5) +#define _HEAPBADPTR (-6) +#define _FREEENTRY 0 +#define _USEDENTRY 1 + +#ifndef _HEAPINFO_DEFINED +typedef struct _heapinfo { + int * _pentry; + size_t _size; + int _useflag; + } _HEAPINFO; +#define _HEAPINFO_DEFINED +#endif + +/* External variable declarations */ + +extern unsigned int _amblksiz; + +#define _mm_free(a) _aligned_free(a) +#define _mm_malloc(a, b) _aligned_malloc(a, b) + +/* Function prototypes */ + +_CRTIMP void * __cdecl calloc(size_t, size_t); +_CRTIMP void __cdecl free(void *); +_CRTIMP void * __cdecl malloc(size_t); +_CRTIMP void * __cdecl realloc(void *, size_t); +_CRTIMP void __cdecl _aligned_free(void *); +_CRTIMP void * __cdecl _aligned_malloc(size_t, size_t); +_CRTIMP void * __cdecl _aligned_offset_malloc(size_t, size_t, size_t); +_CRTIMP void * __cdecl _aligned_realloc(void *, size_t, size_t); +_CRTIMP void * __cdecl _aligned_offset_realloc(void *, size_t, size_t, size_t); +_CRTIMP int __cdecl _resetstkoflw (void); + +#ifndef _POSIX_ + +void * __cdecl _alloca(size_t); +_CRTIMP void * __cdecl _expand(void *, size_t); +_CRTIMP size_t __cdecl _get_sbh_threshold(void); +_CRTIMP int __cdecl _set_sbh_threshold(size_t); +_CRTIMP int __cdecl _heapadd(void *, size_t); +_CRTIMP int __cdecl _heapchk(void); +_CRTIMP int __cdecl _heapmin(void); +_CRTIMP int __cdecl _heapset(unsigned int); +_CRTIMP int __cdecl _heapwalk(_HEAPINFO *); +_CRTIMP size_t __cdecl _heapused(size_t *, size_t *); +_CRTIMP size_t __cdecl _msize(void *); + +_CRTIMP intptr_t __cdecl _get_heap_handle(void); + +#if !__STDC__ +/* Non-ANSI names for compatibility */ +#define alloca _alloca +#endif /* __STDC__*/ + +#if defined(_M_MRX000) || defined(_M_PPC) || defined(_M_ALPHA) +#pragma intrinsic(_alloca) +#endif + +#endif /* _POSIX_ */ + +#ifdef HEAPHOOK +#ifndef _HEAPHOOK_DEFINED +/* hook function type */ +typedef int (__cdecl * _HEAPHOOK)(int, size_t, void *, void **); +#define _HEAPHOOK_DEFINED +#endif /* _HEAPHOOK_DEFINED */ + +/* set hook function */ +_CRTIMP _HEAPHOOK __cdecl _setheaphook(_HEAPHOOK); + +/* hook function must handle these types */ +#define _HEAP_MALLOC 1 +#define _HEAP_CALLOC 2 +#define _HEAP_FREE 3 +#define _HEAP_REALLOC 4 +#define _HEAP_MSIZE 5 +#define _HEAP_EXPAND 6 +#endif /* HEAPHOOK */ + + +#ifdef __cplusplus +} +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_MALLOC */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/map b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/map new file mode 100644 index 00000000..dccf4ec2 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/map @@ -0,0 +1,268 @@ +// map standard header +#pragma once +#ifndef _MAP_ +#define _MAP_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // TEMPLATE CLASS _Tmap_traits +template // true if multiple equivalent keys are permitted + class _Tmap_traits + { // traits required to make _Tree behave like a map +public: + typedef _Kty key_type; + typedef pair value_type; + typedef _Pr key_compare; + typedef typename _Alloc::template rebind::other + allocator_type; + typedef _POINTER_X(value_type, allocator_type) _ITptr; + typedef _REFERENCE_X(value_type, allocator_type) _IReft; + enum + { // make multi parameter visible as an enum constant + _Multi = _Mfl}; + + _Tmap_traits() + : comp() + { // construct with default comparator + } + + _Tmap_traits(_Pr _Parg) + : comp(_Parg) + { // construct with specified comparator + } + + class value_compare + : public binary_function + { // functor for comparing two element values + friend class _Tmap_traits<_Kty, _Ty, _Pr, _Alloc, _Mfl>; + + public: + bool operator()(const value_type& _Left, + const value_type& _Right) const + { // test if _Left precedes _Right by comparing just keys + return (comp(_Left.first, _Right.first)); + } + + value_compare(key_compare _Pred) + : comp(_Pred) + { // construct with specified predicate + } + + protected: + key_compare comp; // the comparator predicate for keys + }; + + static const _Kty& _Kfn(const value_type& _Val) + { // extract key from element value + return (_Val.first); + } + + _Pr comp; // the comparator predicate for keys + }; + + // TEMPLATE CLASS map +template, + class _Alloc = allocator > > + class map + : public _Tree<_Tmap_traits<_Kty, _Ty, _Pr, _Alloc, false> > + { // ordered red-black tree of {key, mapped} values, unique keys +public: + typedef map<_Kty, _Ty, _Pr, _Alloc> _Myt; + typedef _Tree<_Tmap_traits<_Kty, _Ty, _Pr, _Alloc, false> > _Mybase; + typedef _Kty key_type; + typedef _Ty mapped_type; + typedef _Ty referent_type; // retained + typedef _Pr key_compare; + typedef typename _Mybase::value_compare value_compare; + typedef typename _Mybase::allocator_type allocator_type; + typedef typename _Mybase::size_type size_type; + typedef typename _Mybase::difference_type difference_type; + typedef typename _Mybase::pointer pointer; + typedef typename _Mybase::const_pointer const_pointer; + typedef typename _Mybase::reference reference; + typedef typename _Mybase::const_reference const_reference; + typedef typename _Mybase::iterator iterator; + typedef typename _Mybase::const_iterator const_iterator; + typedef typename _Mybase::reverse_iterator reverse_iterator; + typedef typename _Mybase::const_reverse_iterator + const_reverse_iterator; + typedef typename _Mybase::value_type value_type; + + map() + : _Mybase(key_compare(), allocator_type()) + { // construct empty map from defaults + } + + explicit map(const key_compare& _Pred) + : _Mybase(_Pred, allocator_type()) + { // construct empty map from comparator + } + + map(const key_compare& _Pred, const allocator_type& _Al) + : _Mybase(_Pred, _Al) + { // construct empty map from comparator and allocator + } + + template + map(_Iter _First, _Iter _Last) + : _Mybase(key_compare(), allocator_type()) + { // construct map from [_First, _Last), defaults + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + map(_Iter _First, _Iter _Last, + const key_compare& _Pred) + : _Mybase(_Pred, allocator_type()) + { // construct map from [_First, _Last), comparator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + map(_Iter _First, _Iter _Last, + const key_compare& _Pred, const allocator_type& _Al) + : _Mybase(_Pred, _Al) + { // construct map from [_First, _Last), comparator, and allocator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + mapped_type& operator[](const key_type& _Keyval) + { // find element matching _Keyval or insert with default mapped + iterator _Where = this->lower_bound(_Keyval); + if (_Where == this->end() || this->comp(_Keyval, this->_Key(_Where._Mynode()))) + _Where = this->insert(_Where, + value_type(_Keyval, mapped_type())); + return ((*_Where).second); + } + }; + +template inline + void swap(map<_Kty, _Ty, _Pr, _Alloc>& _Left, + map<_Kty, _Ty, _Pr, _Alloc>& _Right) + { // swap _Left and _Right maps + _Left.swap(_Right); + } + + // TEMPLATE CLASS multimap +template, + class _Alloc = allocator > > + class multimap + : public _Tree<_Tmap_traits<_Kty, _Ty, _Pr, _Alloc, true> > + { // ordered red-black tree of {key, mapped} values, non-unique keys +public: + typedef multimap<_Kty, _Ty, _Pr, _Alloc> _Myt; + typedef _Tree<_Tmap_traits<_Kty, _Ty, _Pr, _Alloc, true> > _Mybase; + typedef _Kty key_type; + typedef _Ty mapped_type; + typedef _Ty referent_type; // retained + typedef _Pr key_compare; + typedef typename _Mybase::value_compare value_compare; + typedef typename _Mybase::allocator_type allocator_type; + typedef typename _Mybase::size_type size_type; + typedef typename _Mybase::difference_type difference_type; + typedef typename _Mybase::pointer pointer; + typedef typename _Mybase::const_pointer const_pointer; + typedef typename _Mybase::reference reference; + typedef typename _Mybase::const_reference const_reference; + typedef typename _Mybase::iterator iterator; + typedef typename _Mybase::const_iterator const_iterator; + typedef typename _Mybase::reverse_iterator reverse_iterator; + typedef typename _Mybase::const_reverse_iterator + const_reverse_iterator; + typedef typename _Mybase::value_type value_type; + + multimap() + : _Mybase(key_compare(), allocator_type()) + { // construct empty map from defaults + } + + explicit multimap(const key_compare& _Pred) + : _Mybase(_Pred, allocator_type()) + { // construct empty map from comparator + } + multimap(const key_compare& _Pred, const allocator_type& _Al) + : _Mybase(_Pred, _Al) + { // construct empty map from comparator and allocator + } + + template + multimap(_Iter _First, _Iter _Last) + : _Mybase(key_compare(), allocator_type()) + { // construct map from [_First, _Last), defaults + for (; _First != _Last; ++_First) + insert(*_First); + } + + template + multimap(_Iter _First, _Iter _Last, + const key_compare& _Pred) + : _Mybase(_Pred, allocator_type()) + { // construct map from [_First, _Last), comparator + for (; _First != _Last; ++_First) + insert(*_First); + } + + template + multimap(_Iter _First, _Iter _Last, + const key_compare& _Pred, const allocator_type& _Al) + : _Mybase(_Pred, _Al) + { // construct map from [_First, _Last), comparator, and allocator + for (; _First != _Last; ++_First) + insert(*_First); + } + + iterator insert(const value_type& _Val) + { // insert a {key, mapped} value + return (_Mybase::insert(_Val).first); + } + + iterator insert(iterator _Where, const value_type& _Val) + { // insert a {key, mapped} value, with hint + return (_Mybase::insert(_Where, _Val)); + } + + template + void insert(_Iter _First, _Iter _Last) + { // insert [_First, _Last), arbitrary iterators + for (; _First != _Last; ++_First) + insert(*_First); + } + }; + +template inline + void swap(multimap<_Kty, _Ty, _Pr, _Alloc>& _Left, + multimap<_Kty, _Ty, _Pr, _Alloc>& _Right) + { // swap _Left and _Right multimaps + _Left.swap(_Right); + } + +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _MAP_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/math.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/math.h new file mode 100644 index 00000000..14f82905 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/math.h @@ -0,0 +1,640 @@ +/*** +*math.h - definitions and declarations for math library +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains constant definitions and external subroutine +* declarations for the math subroutine library. +* [ANSI/System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_MATH +#define _INC_MATH + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +/* + * Currently, all MS C compilers for Win32 platforms default to 8 byte + * alignment. + */ +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef __assembler /* Protect from assembler */ + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + + +/* Definition of _exception struct - this struct is passed to the matherr + * routine when a floating point exception is detected + */ + +#ifndef _EXCEPTION_DEFINED +struct _exception { + int type; /* exception type - see below */ + char *name; /* name of function where error occured */ + double arg1; /* first argument to function */ + double arg2; /* second argument (if any) to function */ + double retval; /* value to be returned by function */ + } ; + +#define _EXCEPTION_DEFINED +#endif + + +/* Definition of a _complex struct to be used by those who use cabs and + * want type checking on their argument + */ + +#ifndef _COMPLEX_DEFINED +struct _complex { + double x,y; /* real and imaginary parts */ + } ; + +#if !__STDC__ && !defined (__cplusplus) +/* Non-ANSI name for compatibility */ +#define complex _complex +#endif + +#define _COMPLEX_DEFINED +#endif +#endif /* __assembler */ + + +/* Constant definitions for the exception type passed in the _exception struct + */ + +#define _DOMAIN 1 /* argument domain error */ +#define _SING 2 /* argument singularity */ +#define _OVERFLOW 3 /* overflow range error */ +#define _UNDERFLOW 4 /* underflow range error */ +#define _TLOSS 5 /* total loss of precision */ +#define _PLOSS 6 /* partial loss of precision */ + +#define EDOM 33 +#define ERANGE 34 + + +/* Definitions of _HUGE and HUGE_VAL - respectively the XENIX and ANSI names + * for a value returned in case of error by a number of the floating point + * math routines + */ +#ifndef __assembler /* Protect from assembler */ +_CRTIMP extern double _HUGE; +#endif /* __assembler */ + +#define HUGE_VAL _HUGE + +#ifdef _USE_MATH_DEFINES + +/* Define _USE_MATH_DEFINES before including math.h to expose these macro + * definitions for common math constants. These are placed under an #ifdef + * since these commonly-defined names are not part of the C/C++ standards. + */ + +/* Definitions of useful mathematical constants + * M_E - e + * M_LOG2E - log2(e) + * M_LOG10E - log10(e) + * M_LN2 - ln(2) + * M_LN10 - ln(10) + * M_PI - pi + * M_PI_2 - pi/2 + * M_PI_4 - pi/4 + * M_1_PI - 1/pi + * M_2_PI - 2/pi + * M_2_SQRTPI - 2/sqrt(pi) + * M_SQRT2 - sqrt(2) + * M_SQRT1_2 - 1/sqrt(2) + */ + +#define M_E 2.71828182845904523536 +#define M_LOG2E 1.44269504088896340736 +#define M_LOG10E 0.434294481903251827651 +#define M_LN2 0.693147180559945309417 +#define M_LN10 2.30258509299404568402 +#define M_PI 3.14159265358979323846 +#define M_PI_2 1.57079632679489661923 +#define M_PI_4 0.785398163397448309616 +#define M_1_PI 0.318309886183790671538 +#define M_2_PI 0.636619772367581343076 +#define M_2_SQRTPI 1.12837916709551257390 +#define M_SQRT2 1.41421356237309504880 +#define M_SQRT1_2 0.707106781186547524401 + +#endif /* _USE_MATH_DEFINES */ + +/* Function prototypes */ + +#if !defined(__assembler) /* Protect from assembler */ +#if defined(_M_MRX000) +_CRTIMP int __cdecl abs(int); +_CRTIMP double __cdecl acos(double); +_CRTIMP double __cdecl asin(double); +_CRTIMP double __cdecl atan(double); +_CRTIMP double __cdecl atan2(double, double); +_CRTIMP double __cdecl cos(double); +_CRTIMP double __cdecl cosh(double); +_CRTIMP double __cdecl exp(double); +_CRTIMP double __cdecl fabs(double); +_CRTIMP double __cdecl fmod(double, double); +_CRTIMP long __cdecl labs(long); +_CRTIMP double __cdecl log(double); +_CRTIMP double __cdecl log10(double); +_CRTIMP double __cdecl pow(double, double); +_CRTIMP double __cdecl sin(double); +_CRTIMP double __cdecl sinh(double); +_CRTIMP double __cdecl tan(double); +_CRTIMP double __cdecl tanh(double); +_CRTIMP double __cdecl sqrt(double); +#else + int __cdecl abs(int); + double __cdecl acos(double); + double __cdecl asin(double); + double __cdecl atan(double); + double __cdecl atan2(double, double); + double __cdecl cos(double); + double __cdecl cosh(double); + double __cdecl exp(double); + double __cdecl fabs(double); + double __cdecl fmod(double, double); + long __cdecl labs(long); + double __cdecl log(double); + double __cdecl log10(double); + double __cdecl pow(double, double); + double __cdecl sin(double); + double __cdecl sinh(double); + double __cdecl tan(double); + double __cdecl tanh(double); + double __cdecl sqrt(double); +#endif +_CRTIMP double __cdecl atof(const char *); +_CRTIMP double __cdecl _cabs(struct _complex); +#if defined(_M_ALPHA) + double __cdecl ceil(double); + double __cdecl floor(double); +#else +_CRTIMP double __cdecl ceil(double); +_CRTIMP double __cdecl floor(double); +#endif +_CRTIMP double __cdecl frexp(double, int *); +_CRTIMP double __cdecl _hypot(double, double); +_CRTIMP double __cdecl _j0(double); +_CRTIMP double __cdecl _j1(double); +_CRTIMP double __cdecl _jn(int, double); +_CRTIMP double __cdecl ldexp(double, int); + int __cdecl _matherr(struct _exception *); +_CRTIMP double __cdecl modf(double, double *); + +_CRTIMP double __cdecl _y0(double); +_CRTIMP double __cdecl _y1(double); +_CRTIMP double __cdecl _yn(int, double); + + +#if defined(_M_IX86) + +_CRTIMP int __cdecl _set_SSE2_enable(int); + +#endif + +#if defined(_M_MRX000) + +/* MIPS fast prototypes for float */ +/* ANSI C, 4.5 Mathematics */ + +/* 4.5.2 Trigonometric functions */ + +_CRTIMP float __cdecl acosf( float ); +_CRTIMP float __cdecl asinf( float ); +_CRTIMP float __cdecl atanf( float ); +_CRTIMP float __cdecl atan2f( float , float ); +_CRTIMP float __cdecl cosf( float ); +_CRTIMP float __cdecl sinf( float ); +_CRTIMP float __cdecl tanf( float ); + +/* 4.5.3 Hyperbolic functions */ +_CRTIMP float __cdecl coshf( float ); +_CRTIMP float __cdecl sinhf( float ); +_CRTIMP float __cdecl tanhf( float ); + +/* 4.5.4 Exponential and logarithmic functions */ +_CRTIMP float __cdecl expf( float ); +_CRTIMP float __cdecl logf( float ); +_CRTIMP float __cdecl log10f( float ); +_CRTIMP float __cdecl modff( float , float* ); + +/* 4.5.5 Power functions */ +_CRTIMP float __cdecl powf( float , float ); + float __cdecl sqrtf( float ); + +/* 4.5.6 Nearest integer, absolute value, and remainder functions */ + float __cdecl ceilf( float ); + float __cdecl fabsf( float ); + float __cdecl floorf( float ); +_CRTIMP float __cdecl fmodf( float , float ); + +_CRTIMP float __cdecl hypotf(float, float); + +#endif /* _M_MRX000 */ + +#if defined(_M_ALPHA) + +/* ALPHA fast prototypes for float */ +/* ANSI C, 4.5 Mathematics */ + +/* 4.5.2 Trigonometric functions */ + + float __cdecl acosf( float ); + float __cdecl asinf( float ); + float __cdecl atanf( float ); + float __cdecl atan2f( float , float ); + float __cdecl cosf( float ); + float __cdecl sinf( float ); + float __cdecl tanf( float ); + +/* 4.5.3 Hyperbolic functions */ + float __cdecl coshf( float ); + float __cdecl sinhf( float ); + float __cdecl tanhf( float ); + +/* 4.5.4 Exponential and logarithmic functions */ + float __cdecl expf( float ); + float __cdecl logf( float ); + float __cdecl log10f( float ); +_CRTIMP float __cdecl modff( float , float* ); + +/* 4.5.5 Power functions */ + float __cdecl powf( float , float ); + float __cdecl sqrtf( float ); + +/* 4.5.6 Nearest integer, absolute value, and remainder functions */ + float __cdecl ceilf( float ); + float __cdecl fabsf( float ); + float __cdecl floorf( float ); + float __cdecl fmodf( float , float ); + +_CRTIMP float __cdecl _hypotf(float, float); + +#endif /* _M_ALPHA */ + +#if defined(_M_IA64) + +/* ANSI C, 4.5 Mathematics */ + +/* 4.5.2 Trigonometric functions */ + + float __cdecl acosf( float ); + float __cdecl asinf( float ); + float __cdecl atanf( float ); + float __cdecl atan2f( float , float ); + float __cdecl cosf( float ); + float __cdecl sinf( float ); + float __cdecl tanf( float ); + +/* 4.5.3 Hyperbolic functions */ + float __cdecl coshf( float ); + float __cdecl sinhf( float ); + float __cdecl tanhf( float ); + +/* 4.5.4 Exponential and logarithmic functions */ + float __cdecl expf( float ); + float __cdecl logf( float ); + float __cdecl log10f( float ); + float __cdecl modff( float , float* ); + +/* 4.5.5 Power functions */ + float __cdecl powf( float , float ); + float __cdecl sqrtf( float ); + +/* 4.5.6 Nearest integer, absolute value, and remainder functions */ + float __cdecl ceilf( float ); + float __cdecl fabsf( float ); + float __cdecl floorf( float ); + float __cdecl fmodf( float , float ); + + float __cdecl hypotf(float, float); + +#endif /* _M_IA64 */ + +/* Macros defining long double functions to be their double counterparts + * (long double is synonymous with double in this implementation). + */ + +#ifndef __cplusplus +#define acosl(x) ((long double)acos((double)(x))) +#define asinl(x) ((long double)asin((double)(x))) +#define atanl(x) ((long double)atan((double)(x))) +#define atan2l(x,y) ((long double)atan2((double)(x), (double)(y))) +#define _cabsl _cabs +#define ceill(x) ((long double)ceil((double)(x))) +#define cosl(x) ((long double)cos((double)(x))) +#define coshl(x) ((long double)cosh((double)(x))) +#define expl(x) ((long double)exp((double)(x))) +#define fabsl(x) ((long double)fabs((double)(x))) +#define floorl(x) ((long double)floor((double)(x))) +#define fmodl(x,y) ((long double)fmod((double)(x), (double)(y))) +#define frexpl(x,y) ((long double)frexp((double)(x), (y))) +#define _hypotl(x,y) ((long double)_hypot((double)(x), (double)(y))) +#define ldexpl(x,y) ((long double)ldexp((double)(x), (y))) +#define logl(x) ((long double)log((double)(x))) +#define log10l(x) ((long double)log10((double)(x))) +#define _matherrl _matherr +#define modfl(x,y) ((long double)modf((double)(x), (double *)(y))) +#define powl(x,y) ((long double)pow((double)(x), (double)(y))) +#define sinl(x) ((long double)sin((double)(x))) +#define sinhl(x) ((long double)sinh((double)(x))) +#define sqrtl(x) ((long double)sqrt((double)(x))) +#define tanl(x) ((long double)tan((double)(x))) +#define tanhl(x) ((long double)tanh((double)(x))) +#else /* __cplusplus */ +inline long double acosl(long double _X) + {return (acos((double)_X)); } +inline long double asinl(long double _X) + {return (asin((double)_X)); } +inline long double atanl(long double _X) + {return (atan((double)_X)); } +inline long double atan2l(long double _X, long double _Y) + {return (atan2((double)_X, (double)_Y)); } +inline long double ceill(long double _X) + {return (ceil((double)_X)); } +inline long double cosl(long double _X) + {return (cos((double)_X)); } +inline long double coshl(long double _X) + {return (cosh((double)_X)); } +inline long double expl(long double _X) + {return (exp((double)_X)); } +inline long double fabsl(long double _X) + {return (fabs((double)_X)); } +inline long double floorl(long double _X) + {return (floor((double)_X)); } +inline long double fmodl(long double _X, long double _Y) + {return (fmod((double)_X, (double)_Y)); } +inline long double frexpl(long double _X, int *_Y) + {return (frexp((double)_X, _Y)); } +inline long double ldexpl(long double _X, int _Y) + {return (ldexp((double)_X, _Y)); } +inline long double logl(long double _X) + {return (log((double)_X)); } +inline long double log10l(long double _X) + {return (log10((double)_X)); } +inline long double modfl(long double _X, long double *_Y) + {double _Di, _Df = modf((double)_X, &_Di); + *_Y = (long double)_Di; + return (_Df); } +inline long double powl(long double _X, long double _Y) + {return (pow((double)_X, (double)_Y)); } +inline long double sinl(long double _X) + {return (sin((double)_X)); } +inline long double sinhl(long double _X) + {return (sinh((double)_X)); } +inline long double sqrtl(long double _X) + {return (sqrt((double)_X)); } +inline long double tanl(long double _X) + {return (tan((double)_X)); } +inline long double tanhl(long double _X) + {return (tanh((double)_X)); } + +inline float frexpf(float _X, int *_Y) + {return ((float)frexp((double)_X, _Y)); } +inline float ldexpf(float _X, int _Y) + {return ((float)ldexp((double)_X, _Y)); } +#if !defined(_M_MRX000) && !defined(_M_ALPHA) && !defined(_M_IA64) +inline float acosf(float _X) + {return ((float)acos((double)_X)); } +inline float asinf(float _X) + {return ((float)asin((double)_X)); } +inline float atanf(float _X) + {return ((float)atan((double)_X)); } +inline float atan2f(float _X, float _Y) + {return ((float)atan2((double)_X, (double)_Y)); } +inline float ceilf(float _X) + {return ((float)ceil((double)_X)); } +inline float cosf(float _X) + {return ((float)cos((double)_X)); } +inline float coshf(float _X) + {return ((float)cosh((double)_X)); } +inline float expf(float _X) + {return ((float)exp((double)_X)); } +inline float fabsf(float _X) + {return ((float)fabs((double)_X)); } +inline float floorf(float _X) + {return ((float)floor((double)_X)); } +inline float fmodf(float _X, float _Y) + {return ((float)fmod((double)_X, (double)_Y)); } +inline float logf(float _X) + {return ((float)log((double)_X)); } +inline float log10f(float _X) + {return ((float)log10((double)_X)); } +inline float modff(float _X, float *_Y) + { double _Di, _Df = modf((double)_X, &_Di); + *_Y = (float)_Di; + return ((float)_Df); } +inline float powf(float _X, float _Y) + {return ((float)pow((double)_X, (double)_Y)); } +inline float sinf(float _X) + {return ((float)sin((double)_X)); } +inline float sinhf(float _X) + {return ((float)sinh((double)_X)); } +inline float sqrtf(float _X) + {return ((float)sqrt((double)_X)); } +inline float tanf(float _X) + {return ((float)tan((double)_X)); } +inline float tanhf(float _X) + {return ((float)tanh((double)_X)); } +#endif /* !defined(_M_MRX000) && !defined(_M_ALPHA) && !defined(_M_IA64) */ +#endif /* __cplusplus */ +#endif /* __assembler */ + +#if !__STDC__ + +/* Non-ANSI names for compatibility */ + +#define DOMAIN _DOMAIN +#define SING _SING +#define OVERFLOW _OVERFLOW +#define UNDERFLOW _UNDERFLOW +#define TLOSS _TLOSS +#define PLOSS _PLOSS + +#define matherr _matherr + +#ifndef __assembler /* Protect from assembler */ + +_CRTIMP extern double HUGE; + +_CRTIMP double __cdecl cabs(struct _complex); +_CRTIMP double __cdecl hypot(double, double); +_CRTIMP double __cdecl j0(double); +_CRTIMP double __cdecl j1(double); +_CRTIMP double __cdecl jn(int, double); + int __cdecl matherr(struct _exception *); +_CRTIMP double __cdecl y0(double); +_CRTIMP double __cdecl y1(double); +_CRTIMP double __cdecl yn(int, double); + +#endif /* __assembler */ + +#endif /* __STDC__ */ + +#ifdef __cplusplus +} + +extern "C++" { + +template inline + _Ty _Pow_int(_Ty _X, int _Y) + {unsigned int _N; + if (_Y >= 0) + _N = _Y; + else + _N = -_Y; + for (_Ty _Z = _Ty(1); ; _X *= _X) + {if ((_N & 1) != 0) + _Z *= _X; + if ((_N >>= 1) == 0) + return (_Y < 0 ? _Ty(1) / _Z : _Z); }} + +inline long __cdecl abs(long _X) + {return (labs(_X)); } +inline double __cdecl abs(double _X) + {return (fabs(_X)); } +inline double __cdecl pow(double _X, int _Y) + {return (_Pow_int(_X, _Y)); } +inline double __cdecl pow(int _X, int _Y) + {return (_Pow_int(_X, _Y)); } +inline float __cdecl abs(float _X) + {return (fabsf(_X)); } +inline float __cdecl acos(float _X) + {return (acosf(_X)); } +inline float __cdecl asin(float _X) + {return (asinf(_X)); } +inline float __cdecl atan(float _X) + {return (atanf(_X)); } +inline float __cdecl atan2(float _Y, float _X) + {return (atan2f(_Y, _X)); } +inline float __cdecl ceil(float _X) + {return (ceilf(_X)); } +inline float __cdecl cos(float _X) + {return (cosf(_X)); } +inline float __cdecl cosh(float _X) + {return (coshf(_X)); } +inline float __cdecl exp(float _X) + {return (expf(_X)); } +inline float __cdecl fabs(float _X) + {return (fabsf(_X)); } +inline float __cdecl floor(float _X) + {return (floorf(_X)); } +inline float __cdecl fmod(float _X, float _Y) + {return (fmodf(_X, _Y)); } +inline float __cdecl frexp(float _X, int * _Y) + {return (frexpf(_X, _Y)); } +inline float __cdecl ldexp(float _X, int _Y) + {return (ldexpf(_X, _Y)); } +inline float __cdecl log(float _X) + {return (logf(_X)); } +inline float __cdecl log10(float _X) + {return (log10f(_X)); } +inline float __cdecl modf(float _X, float * _Y) + {return (modff(_X, _Y)); } +inline float __cdecl pow(float _X, float _Y) + {return (powf(_X, _Y)); } +inline float __cdecl pow(float _X, int _Y) + {return (_Pow_int(_X, _Y)); } +inline float __cdecl sin(float _X) + {return (sinf(_X)); } +inline float __cdecl sinh(float _X) + {return (sinhf(_X)); } +inline float __cdecl sqrt(float _X) + {return (sqrtf(_X)); } +inline float __cdecl tan(float _X) + {return (tanf(_X)); } +inline float __cdecl tanh(float _X) + {return (tanhf(_X)); } +inline long double __cdecl abs(long double _X) + {return (fabsl(_X)); } +inline long double __cdecl acos(long double _X) + {return (acosl(_X)); } +inline long double __cdecl asin(long double _X) + {return (asinl(_X)); } +inline long double __cdecl atan(long double _X) + {return (atanl(_X)); } +inline long double __cdecl atan2(long double _Y, long double _X) + {return (atan2l(_Y, _X)); } +inline long double __cdecl ceil(long double _X) + {return (ceill(_X)); } +inline long double __cdecl cos(long double _X) + {return (cosl(_X)); } +inline long double __cdecl cosh(long double _X) + {return (coshl(_X)); } +inline long double __cdecl exp(long double _X) + {return (expl(_X)); } +inline long double __cdecl fabs(long double _X) + {return (fabsl(_X)); } +inline long double __cdecl floor(long double _X) + {return (floorl(_X)); } +inline long double __cdecl fmod(long double _X, long double _Y) + {return (fmodl(_X, _Y)); } +inline long double __cdecl frexp(long double _X, int * _Y) + {return (frexpl(_X, _Y)); } +inline long double __cdecl ldexp(long double _X, int _Y) + {return (ldexpl(_X, _Y)); } +inline long double __cdecl log(long double _X) + {return (logl(_X)); } +inline long double __cdecl log10(long double _X) + {return (log10l(_X)); } +inline long double __cdecl modf(long double _X, long double * _Y) + {return (modfl(_X, _Y)); } +inline long double __cdecl pow(long double _X, long double _Y) + {return (powl(_X, _Y)); } +inline long double __cdecl pow(long double _X, int _Y) + {return (_Pow_int(_X, _Y)); } +inline long double __cdecl sin(long double _X) + {return (sinl(_X)); } +inline long double __cdecl sinh(long double _X) + {return (sinhl(_X)); } +inline long double __cdecl sqrt(long double _X) + {return (sqrtl(_X)); } +inline long double __cdecl tan(long double _X) + {return (tanl(_X)); } +inline long double __cdecl tanh(long double _X) + {return (tanhl(_X)); } + +} +#endif /* __cplusplus */ + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_MATH */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/mbctype.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/mbctype.h new file mode 100644 index 00000000..0f848e63 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/mbctype.h @@ -0,0 +1,146 @@ +/*** +*mbctype.h - MBCS character conversion macros +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* Defines macros for MBCS character classification/conversion. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_MBCTYPE +#define _INC_MBCTYPE + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +/* include the standard ctype.h header file */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if (!defined(_MSC_VER) && !defined(__cdecl)) +#define __cdecl +#endif + + +/* + * MBCS - Multi-Byte Character Set + */ + +/* + * This declaration allows the user access the _mbctype[] look-up array. + */ +_CRTIMP extern unsigned char _mbctype[]; +_CRTIMP extern unsigned char _mbcasemap[]; + + +/* bit masks for MBCS character types */ + +#define _MS 0x01 /* MBCS single-byte symbol */ +#define _MP 0x02 /* MBCS punct */ +#define _M1 0x04 /* MBCS 1st (lead) byte */ +#define _M2 0x08 /* MBCS 2nd byte*/ + +#define _SBUP 0x10 /* SBCS upper char */ +#define _SBLOW 0x20 /* SBCS lower char */ + +/* byte types */ + +#define _MBC_SINGLE 0 /* valid single byte char */ +#define _MBC_LEAD 1 /* lead byte */ +#define _MBC_TRAIL 2 /* trailing byte */ +#define _MBC_ILLEGAL (-1) /* illegal byte */ + +#define _KANJI_CP 932 + +/* _setmbcp parameter defines */ +#define _MB_CP_SBCS 0 +#define _MB_CP_OEM -2 +#define _MB_CP_ANSI -3 +#define _MB_CP_LOCALE -4 + + +#ifndef _MBCTYPE_DEFINED + +/* MB control routines */ + +_CRTIMP int __cdecl _setmbcp(int); +_CRTIMP int __cdecl _getmbcp(void); + + +/* MBCS character classification function prototypes */ + + +/* byte routines */ +_CRTIMP int __cdecl _ismbbkalnum( unsigned int ); +_CRTIMP int __cdecl _ismbbkana( unsigned int ); +_CRTIMP int __cdecl _ismbbkpunct( unsigned int ); +_CRTIMP int __cdecl _ismbbkprint( unsigned int ); +_CRTIMP int __cdecl _ismbbalpha( unsigned int ); +_CRTIMP int __cdecl _ismbbpunct( unsigned int ); +_CRTIMP int __cdecl _ismbbalnum( unsigned int ); +_CRTIMP int __cdecl _ismbbprint( unsigned int ); +_CRTIMP int __cdecl _ismbbgraph( unsigned int ); + +#ifndef _MBLEADTRAIL_DEFINED +_CRTIMP int __cdecl _ismbblead( unsigned int ); +_CRTIMP int __cdecl _ismbbtrail( unsigned int ); +_CRTIMP int __cdecl _ismbslead( const unsigned char *, const unsigned char *); +_CRTIMP int __cdecl _ismbstrail( const unsigned char *, const unsigned char *); +#define _MBLEADTRAIL_DEFINED +#endif + +#define _MBCTYPE_DEFINED +#endif + +/* + * char byte classification macros + */ + +#define _ismbbkalnum(_c) ((_mbctype+1)[(unsigned char)(_c)] & _MS) +#define _ismbbkprint(_c) ((_mbctype+1)[(unsigned char)(_c)] & (_MS|_MP)) +#define _ismbbkpunct(_c) ((_mbctype+1)[(unsigned char)(_c)] & _MP) + +#define _ismbbalnum(_c) (((_pctype)[(unsigned char)(_c)] & (_ALPHA|_DIGIT))||_ismbbkalnum(_c)) +#define _ismbbalpha(_c) (((_pctype)[(unsigned char)(_c)] & (_ALPHA))||_ismbbkalnum(_c)) +#define _ismbbgraph(_c) (((_pctype)[(unsigned char)(_c)] & (_PUNCT|_ALPHA|_DIGIT))||_ismbbkprint(_c)) +#define _ismbbprint(_c) (((_pctype)[(unsigned char)(_c)] & (_BLANK|_PUNCT|_ALPHA|_DIGIT))||_ismbbkprint(_c)) +#define _ismbbpunct(_c) (((_pctype)[(unsigned char)(_c)] & _PUNCT)||_ismbbkpunct(_c)) + +#define _ismbblead(_c) ((_mbctype+1)[(unsigned char)(_c)] & _M1) +#define _ismbbtrail(_c) ((_mbctype+1)[(unsigned char)(_c)] & _M2) + +#define _ismbbkana(_c) ((_mbctype+1)[(unsigned char)(_c)] & (_MS|_MP)) + + +#ifdef __cplusplus +} +#endif + +#endif /* _INC_MBCTYPE */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/mbstring.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/mbstring.h new file mode 100644 index 00000000..a17bec05 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/mbstring.h @@ -0,0 +1,213 @@ +/*** +* mbstring.h - MBCS string manipulation macros and functions +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains macros and function declarations for the MBCS +* string manipulation functions. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_MBSTRING +#define _INC_MBSTRING + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +/* + * Currently, all MS C compilers for Win32 platforms default to 8 byte + * alignment. + */ +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + + +#ifndef _SIZE_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 size_t; +#else +typedef _W64 unsigned int size_t; +#endif +#define _SIZE_T_DEFINED +#endif + + +#ifndef _NLSCMP_DEFINED +#define _NLSCMPERROR 2147483647 /* currently == INT_MAX */ +#define _NLSCMP_DEFINED +#endif + + +#ifndef _VA_LIST_DEFINED +#ifdef _M_ALPHA +typedef struct { + char *a0; /* pointer to first homed integer argument */ + int offset; /* byte offset of next parameter */ +} va_list; +#else +typedef char * va_list; +#endif +#define _VA_LIST_DEFINED +#endif + +#ifndef _FILE_DEFINED +struct _iobuf { + char *_ptr; + int _cnt; + char *_base; + int _flag; + int _file; + int _charbuf; + int _bufsiz; + char *_tmpfname; + }; +typedef struct _iobuf FILE; +#define _FILE_DEFINED +#endif + +/* + * MBCS - Multi-Byte Character Set + */ + +#ifndef _MBSTRING_DEFINED + +/* function prototypes */ + +_CRTIMP unsigned int __cdecl _mbbtombc(unsigned int); +_CRTIMP int __cdecl _mbbtype(unsigned char, int); +_CRTIMP unsigned int __cdecl _mbctombb(unsigned int); +_CRTIMP int __cdecl _mbsbtype(const unsigned char *, size_t); +_CRTIMP unsigned char * __cdecl _mbscat(unsigned char *, const unsigned char *); +_CRTIMP unsigned char * __cdecl _mbschr(const unsigned char *, unsigned int); +_CRTIMP int __cdecl _mbscmp(const unsigned char *, const unsigned char *); +_CRTIMP int __cdecl _mbscoll(const unsigned char *, const unsigned char *); +_CRTIMP unsigned char * __cdecl _mbscpy(unsigned char *, const unsigned char *); +_CRTIMP size_t __cdecl _mbscspn(const unsigned char *, const unsigned char *); +_CRTIMP unsigned char * __cdecl _mbsdec(const unsigned char *, const unsigned char *); +_CRTIMP unsigned char * __cdecl _mbsdup(const unsigned char *); +_CRTIMP int __cdecl _mbsicmp(const unsigned char *, const unsigned char *); +_CRTIMP int __cdecl _mbsicoll(const unsigned char *, const unsigned char *); +_CRTIMP unsigned char * __cdecl _mbsinc(const unsigned char *); +_CRTIMP size_t __cdecl _mbslen(const unsigned char *); +_CRTIMP unsigned char * __cdecl _mbslwr(unsigned char *); +_CRTIMP unsigned char * __cdecl _mbsnbcat(unsigned char *, const unsigned char *, size_t); +_CRTIMP int __cdecl _mbsnbcmp(const unsigned char *, const unsigned char *, size_t); +_CRTIMP int __cdecl _mbsnbcoll(const unsigned char *, const unsigned char *, size_t); +_CRTIMP size_t __cdecl _mbsnbcnt(const unsigned char *, size_t); +_CRTIMP unsigned char * __cdecl _mbsnbcpy(unsigned char *, const unsigned char *, size_t); +_CRTIMP int __cdecl _mbsnbicmp(const unsigned char *, const unsigned char *, size_t); +_CRTIMP int __cdecl _mbsnbicoll(const unsigned char *, const unsigned char *, size_t); +_CRTIMP unsigned char * __cdecl _mbsnbset(unsigned char *, unsigned int, size_t); +_CRTIMP unsigned char * __cdecl _mbsncat(unsigned char *, const unsigned char *, size_t); +_CRTIMP size_t __cdecl _mbsnccnt(const unsigned char *, size_t); +_CRTIMP int __cdecl _mbsncmp(const unsigned char *, const unsigned char *, size_t); +_CRTIMP int __cdecl _mbsncoll(const unsigned char *, const unsigned char *, size_t); +_CRTIMP unsigned char * __cdecl _mbsncpy(unsigned char *, const unsigned char *, size_t); +_CRTIMP unsigned int __cdecl _mbsnextc (const unsigned char *); +_CRTIMP int __cdecl _mbsnicmp(const unsigned char *, const unsigned char *, size_t); +_CRTIMP int __cdecl _mbsnicoll(const unsigned char *, const unsigned char *, size_t); +_CRTIMP unsigned char * __cdecl _mbsninc(const unsigned char *, size_t); +_CRTIMP unsigned char * __cdecl _mbsnset(unsigned char *, unsigned int, size_t); +_CRTIMP unsigned char * __cdecl _mbspbrk(const unsigned char *, const unsigned char *); +_CRTIMP unsigned char * __cdecl _mbsrchr(const unsigned char *, unsigned int); +_CRTIMP unsigned char * __cdecl _mbsrev(unsigned char *); +_CRTIMP unsigned char * __cdecl _mbsset(unsigned char *, unsigned int); +_CRTIMP size_t __cdecl _mbsspn(const unsigned char *, const unsigned char *); +_CRTIMP unsigned char * __cdecl _mbsspnp(const unsigned char *, const unsigned char *); +_CRTIMP unsigned char * __cdecl _mbsstr(const unsigned char *, const unsigned char *); +_CRTIMP unsigned char * __cdecl _mbstok(unsigned char *, const unsigned char *); +_CRTIMP unsigned char * __cdecl _mbsupr(unsigned char *); + +_CRTIMP size_t __cdecl _mbclen(const unsigned char *); +_CRTIMP void __cdecl _mbccpy(unsigned char *, const unsigned char *); +#define _mbccmp(_cpc1, _cpc2) _mbsncmp((_cpc1),(_cpc2),1) + +/* character routines */ + +_CRTIMP int __cdecl _ismbcalnum(unsigned int); +_CRTIMP int __cdecl _ismbcalpha(unsigned int); +_CRTIMP int __cdecl _ismbcdigit(unsigned int); +_CRTIMP int __cdecl _ismbcgraph(unsigned int); +_CRTIMP int __cdecl _ismbclegal(unsigned int); +_CRTIMP int __cdecl _ismbclower(unsigned int); +_CRTIMP int __cdecl _ismbcprint(unsigned int); +_CRTIMP int __cdecl _ismbcpunct(unsigned int); +_CRTIMP int __cdecl _ismbcspace(unsigned int); +_CRTIMP int __cdecl _ismbcupper(unsigned int); + +_CRTIMP unsigned int __cdecl _mbctolower(unsigned int); +_CRTIMP unsigned int __cdecl _mbctoupper(unsigned int); + + +#define _MBSTRING_DEFINED +#endif + +#ifndef _MBLEADTRAIL_DEFINED +_CRTIMP int __cdecl _ismbblead(unsigned int); +_CRTIMP int __cdecl _ismbbtrail(unsigned int); +_CRTIMP int __cdecl _ismbslead(const unsigned char *, const unsigned char *); +_CRTIMP int __cdecl _ismbstrail(const unsigned char *, const unsigned char *); +#define _MBLEADTRAIL_DEFINED +#endif + +/* Kanji specific prototypes. */ + +_CRTIMP int __cdecl _ismbchira(unsigned int); +_CRTIMP int __cdecl _ismbckata(unsigned int); +_CRTIMP int __cdecl _ismbcsymbol(unsigned int); +_CRTIMP int __cdecl _ismbcl0(unsigned int); +_CRTIMP int __cdecl _ismbcl1(unsigned int); +_CRTIMP int __cdecl _ismbcl2(unsigned int); +_CRTIMP unsigned int __cdecl _mbcjistojms(unsigned int); +_CRTIMP unsigned int __cdecl _mbcjmstojis(unsigned int); +_CRTIMP unsigned int __cdecl _mbctohira(unsigned int); +_CRTIMP unsigned int __cdecl _mbctokata(unsigned int); + +#ifdef __cplusplus +} +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_MBSTRING */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/memory b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/memory new file mode 100644 index 00000000..3a06fc9a --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/memory @@ -0,0 +1,545 @@ +// memory standard header +#pragma once +#ifndef _MEMORY_ +#define _MEMORY_ +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // TEMPLATE FUNCTION get_temporary_buffer +template inline + pair<_Ty _FARQ *, _PDFT> + get_temporary_buffer(_PDFT _Count) + { // get raw temporary buffer of up to _Count elements + _Ty _FARQ *_Pbuf; + + for (_Pbuf = 0; 0 < _Count; _Count /= 2) + if ((_Pbuf = (_Ty _FARQ *)operator new( + (_SIZT)_Count * sizeof (_Ty), nothrow)) != 0) + break; + + return (pair<_Ty _FARQ *, _PDFT>(_Pbuf, _Count)); + } + + // TEMPLATE FUNCTION return_temporary_buffer +template inline + void return_temporary_buffer(_Ty *_Pbuf) + { // delete raw temporary buffer + operator delete(_Pbuf); + } + + // TEMPLATE FUNCTION uninitialized_copy +template inline + _FwdIt _Uninit_copy(_InIt _First, _InIt _Last, _FwdIt _Dest, + _Nonscalar_ptr_iterator_tag) + { // copy [_First, _Last) to raw _Dest, arbitrary type + _FwdIt _Next = _Dest; + + _TRY_BEGIN + for (; _First != _Last; ++_Dest, ++_First) + _Construct(&*_Dest, *_First); + _CATCH_ALL + for (; _Next != _Dest; ++_Next) + _Destroy(&*_Next); + _RERAISE; + _CATCH_END + return (_Dest); + } + +template inline + _Ty2 *_Uninit_copy(_Ty1 *_First, _Ty1 *_Last, _Ty2 *_Dest, + _Scalar_ptr_iterator_tag) + { // copy [_First, _Last) to raw _Dest, scalar type + size_t _Count = (size_t)(_Last - _First); + return ((_Ty2 *)memmove(&*_Dest, &*_First, + _Count * sizeof (*_First)) + _Count); // NB: non-overlapping move + } + +template inline + _FwdIt uninitialized_copy(_InIt _First, _InIt _Last, _FwdIt _Dest) + { // copy [_First, _Last) to raw _Dest + return (_Uninit_copy(_First, _Last, _Dest, + _Ptr_cat(_First, _Dest))); + } + + // TEMPLATE FUNCTION _Uninitialized_copy WITH ALLOCATOR +template inline + _FwdIt _Uninit_copy(_InIt _First, _InIt _Last, _FwdIt _Dest, + _Alloc& _Al, _Nonscalar_ptr_iterator_tag) + { // copy [_First, _Last) to raw _Dest, using _Al, arbitrary type + _FwdIt _Next = _Dest; + + _TRY_BEGIN + for (; _First != _Last; ++_Dest, ++_First) + _Al.construct(_Dest, *_First); + _CATCH_ALL + for (; _Next != _Dest; ++_Next) + _Al.destroy(_Next); + _RERAISE; + _CATCH_END + return (_Dest); + } + +template inline + _FwdIt _Uninit_copy(_InIt _First, _InIt _Last, _FwdIt _Dest, + _Alloc& _Al, _Scalar_ptr_iterator_tag) + { // copy [_First, _Last) to raw _Dest, using _Al, scalar type + return (_Uninit_copy(_First, _Last, _Dest, + _Al, _Nonscalar_ptr_iterator_tag())); + } + +template inline + _Ty2 *_Uninit_copy(_Ty1 *_First, _Ty1 *_Last, _Ty2 *_Dest, + allocator<_Ty2>&, _Scalar_ptr_iterator_tag) + { // copy [_First, _Last) to raw _Dest, (const) scalar type + size_t _Count = (size_t)(_Last - _First); + return ((_Ty2 *)memmove(&*_Dest, &*_First, + _Count * sizeof (*_First)) + _Count); // NB: non-overlapping move + } + +template inline + _Ty2 *_Uninit_copy(_Ty1 *_First, _Ty1 *_Last, _Ty2 *_Dest, + allocator&, _Scalar_ptr_iterator_tag) + { // copy [_First, _Last) to raw _Dest, (const) scalar type + size_t _Count = (size_t)(_Last - _First); + return ((_Ty2 *)memmove(&*_Dest, &*_First, + _Count * sizeof (*_First)) + _Count); // NB: non-overlapping move + } + +template inline + _FwdIt _Uninitialized_copy(_InIt _First, _InIt _Last, _FwdIt _Dest, + _Alloc& _Al) + { // copy [_First, _Last) to raw _Dest, using _Al + return (_Uninit_copy(_First, _Last, _Dest, _Al, + _Ptr_cat(_First, _Dest))); + } + + // TEMPLATE FUNCTION uninitialized_fill +template inline + void _Uninit_fill(_FwdIt _First, _FwdIt _Last, const _Tval& _Val, + _Nonscalar_ptr_iterator_tag) + { // copy _Val throughout raw [_First, _Last), arbitrary type + _FwdIt _Next = _First; + + _TRY_BEGIN + for (; _First != _Last; ++_First) + _Construct(&*_First, _Val); + _CATCH_ALL + for (; _Next != _First; ++_Next) + _Destroy(&*_Next); + _RERAISE; + _CATCH_END + } + +template inline + void _Uninit_fill(_Ty *_First, _Ty *_Last, const _Tval& _Val, + _Scalar_ptr_iterator_tag) + { // copy _Val throughout raw [_First, _Last), scalar type + std::fill(_First, _Last, _Val); + } + +template inline + void uninitialized_fill(_FwdIt _First, _FwdIt _Last, const _Tval& _Val) + { // copy _Val throughout raw [_First, _Last) + _Uninit_fill(_First, _Last, _Val, _Ptr_cat(_First, _First)); + } + + // TEMPLATE FUNCTION uninitialized_fill_n +template inline + void _Uninit_fill_n(_FwdIt _First, _Diff _Count, const _Tval& _Val, + _Nonscalar_ptr_iterator_tag) + { // copy _Count *_Val to raw _First, arbitrary type + _FwdIt _Next = _First; + + _TRY_BEGIN + for (; 0 < _Count; --_Count, ++_First) + _Construct(&*_First, _Val); + _CATCH_ALL + for (; _Next != _First; ++_Next) + _Destroy(&*_Next); + _RERAISE; + _CATCH_END + } + +template inline + void _Uninit_fill_n(_Ty *_First, _Diff _Count, const _Tval& _Val, + _Scalar_ptr_iterator_tag) + { // copy _Count *_Val to raw _First, scalar type + std::fill_n(_First, _Count, _Val); + } + +template inline + void uninitialized_fill_n(_FwdIt _First, _Diff _Count, const _Tval& _Val) + { // copy _Count *_Val to raw _First + _Uninit_fill_n(_First, _Count, _Val, _Ptr_cat(_First, _First)); + } + + // TEMPLATE FUNCTION _Uninitialized_fill_n WITH ALLOCATOR +template inline + void _Uninit_fill_n(_FwdIt _First, _Diff _Count, + const _Tval& _Val, _Alloc& _Al, _Nonscalar_ptr_iterator_tag) + { // copy _Count *_Val to raw _First, using _Al, arbitrary type + _FwdIt _Next = _First; + + _TRY_BEGIN + for (; 0 < _Count; --_Count, ++_First) + _Al.construct(_First, _Val); + _CATCH_ALL + for (; _Next != _First; ++_Next) + _Al.destroy(_Next); + _RERAISE; + _CATCH_END + } + +template inline + void _Uninit_fill_n(_FwdIt _First, _Diff _Count, + const _Tval& _Val, _Alloc& _Al, _Scalar_ptr_iterator_tag) + { // copy _Count *_Val to raw _First, using _Al, arbitrary type + _Uninit_fill_n(_First, _Count, + _Val, _Al, _Nonscalar_ptr_iterator_tag()); + } + +template inline + void _Uninit_fill_n(_Ty *_First, _Diff _Count, + const _Tval& _Val, allocator<_Ty>&, _Scalar_ptr_iterator_tag) + { // copy _Count *_Val to raw _First, using _Al, scalar type + fill_n(_First, _Count, _Val); + } + +template inline + void _Uninit_fill_n(_Ty *_First, _Diff _Count, + const _Tval& _Val, allocator&, _Scalar_ptr_iterator_tag) + { // copy _Count *_Val to raw _First, using _Al, scalar type + fill_n(_First, _Count, _Val); + } + +template inline + void _Uninitialized_fill_n(_FwdIt _First, _Diff _Count, + const _Tval& _Val, _Alloc& _Al) + { // copy _Count *_Val to raw _First, using _Al + _Uninit_fill_n(_First, _Count, _Val, _Al, + _Ptr_cat(_First, _First)); + } + + // TEMPLATE CLASS raw_storage_iterator +template + class raw_storage_iterator + : public _Outit + { // wrap stores to raw buffer as output iterator +public: + typedef _FwdIt iterator_type; // retained + typedef _FwdIt iter_type; // retained + typedef _Ty element_type; // retained + + explicit raw_storage_iterator(_FwdIt _First) + : _Next(_First) + { // construct with iterator + } + + raw_storage_iterator<_FwdIt, _Ty>& operator*() + { // pretend to return designated value + return (*this); + } + + raw_storage_iterator<_FwdIt, _Ty>& operator=(const _Ty& _Val) + { // construct value designated by stored iterator + _Construct(&*_Next, _Val); + return (*this); + } + + raw_storage_iterator<_FwdIt, _Ty>& operator++() + { // preincrement + ++_Next; + return (*this); + } + + raw_storage_iterator<_FwdIt, _Ty> operator++(int) + { // postincrement + raw_storage_iterator<_FwdIt, _Ty> _Ans = *this; + ++_Next; + return (_Ans); + } + +private: + _FwdIt _Next; // the stored iterator + }; + + // TEMPLATE CLASS _Temp_iterator +template + class _Temp_iterator + : public _Outit + { // wrap stores to temporary buffer as output iterator +public: + typedef _Ty _FARQ *_Pty; + + _Temp_iterator(_PDFT _Count = 0) + { // construct from desired temporary buffer size + pair<_Pty, _PDFT> _Pair = + std::get_temporary_buffer<_Ty>(_Count); + _Buf._Begin = _Pair.first; + _Buf._Current = _Pair.first; + _Buf._Hiwater = _Pair.first; + _Buf._Size = _Pair.second; + _Pbuf = &_Buf; + } + + _Temp_iterator(const _Temp_iterator<_Ty>& _Right) + { // construct from _Right (share active buffer) + _Buf._Begin = 0; // clear stored buffer, to be tidy + _Buf._Current = 0; + _Buf._Hiwater = 0; + _Buf._Size = 0; + *this = _Right; + } + + ~_Temp_iterator() + { // destroy the object + if (_Buf._Begin != 0) + { // destroy any constructed elements in buffer + for (_Pty _Next = _Buf._Begin; + _Next != _Buf._Hiwater; ++_Next) + _Destroy(&*_Next); + std::return_temporary_buffer(_Buf._Begin); + } + } + + _Temp_iterator<_Ty>& operator=(const _Temp_iterator<_Ty>& _Right) + { // assign _Right (share active buffer) + _Pbuf = _Right._Pbuf; + return (*this); + } + + _Temp_iterator<_Ty>& operator=(const _Ty& _Val) + { // assign or construct value into active buffer, and increment + if (_Pbuf->_Current < _Pbuf->_Hiwater) + *_Pbuf->_Current++ = _Val; // below high water mark, assign + else + { // above high water mark, construct + _Construct(&*_Pbuf->_Current, _Val); + _Pbuf->_Hiwater = ++_Pbuf->_Current; + } + return (*this); + } + + _Temp_iterator<_Ty>& operator*() + { // pretend to return designated value + return (*this); + } + + _Temp_iterator<_Ty>& operator++() + { // pretend to preincrement + return (*this); + } + + _Temp_iterator<_Ty>& operator++(int) + { // pretend to postincrement + return (*this); + } + + _Temp_iterator<_Ty>& _Init() + { // set pointer at beginning of buffer + _Pbuf->_Current = _Pbuf->_Begin; + return (*this); + } + + _Pty _First() const + { // return pointer to beginning of buffer + return (_Pbuf->_Begin); + } + + _Pty _Last() const + { // return pointer past end of buffer contents + return (_Pbuf->_Current); + } + + _PDFT _Maxlen() const + { // return size of buffer + return (_Pbuf->_Size); + } + +private: + struct _Bufpar + { // control information for a temporary buffer + _Pty _Begin; // pointer to beginning of buffer + _Pty _Current; // pointer to next available element + _Pty _Hiwater; // pointer to first unconstructed element + _PDFT _Size; // length of buffer + }; + _Bufpar _Buf; // buffer control stored in iterator + _Bufpar *_Pbuf; // pointer to active buffer control + }; + + // TEMPLATE CLASS auto_ptr +template + class auto_ptr; + +template + struct auto_ptr_ref + { // proxy reference for auto_ptr copying + auto_ptr_ref(auto_ptr<_Ty>& _Right) + : _Ref(_Right) + { // construct from compatible auto_ptr + } + + auto_ptr<_Ty>& _Ref; // reference to constructor argument + }; + +template + class auto_ptr + { // wrap an object pointer to ensure destruction +public: + typedef _Ty element_type; + + explicit auto_ptr(_Ty *_Ptr = 0) _THROW0() + : _Myptr(_Ptr) + { // construct from object pointer + } + + auto_ptr(auto_ptr<_Ty>& _Right) _THROW0() + : _Myptr(_Right.release()) + { // construct by assuming pointer from _Right auto_ptr + } + + auto_ptr(auto_ptr_ref<_Ty> _Right) _THROW0() + : _Myptr(_Right._Ref.release()) + { // construct by assuming pointer from _Right auto_ptr_ref + } + + template + operator auto_ptr<_Other>() _THROW0() + { // convert to compatible auto_ptr + return (auto_ptr<_Other>(*this)); + } + + template + operator auto_ptr_ref<_Other>() _THROW0() + { // convert to compatible auto_ptr_ref + return (auto_ptr_ref<_Other>(*this)); + } + + template + auto_ptr<_Ty>& operator=(auto_ptr<_Other>& _Right) _THROW0() + { // assign compatible _Right (assume pointer) + reset(_Right.release()); + return (*this); + } + + template + auto_ptr(auto_ptr<_Other>& _Right) _THROW0() + : _Myptr(_Right.release()) + { // construct by assuming pointer from _Right + } + + auto_ptr<_Ty>& operator=(auto_ptr<_Ty>& _Right) _THROW0() + { // assign compatible _Right (assume pointer) + reset(_Right.release()); + return (*this); + } + + auto_ptr<_Ty>& operator=(auto_ptr_ref<_Ty>& _Right) _THROW0() + { // assign compatible _Right._Ref (assume pointer) + reset(_Right._Ref.release()); + return (*this); + } + + ~auto_ptr() + { // destroy the object + delete _Myptr; + } + + _Ty& operator*() const _THROW0() + { // return designated value + return (*_Myptr); + } + + _Ty *operator->() const _THROW0() + { // return pointer to class object + return (&**this); + } + + _Ty *get() const _THROW0() + { // return wrapped pointer + return (_Myptr); + } + + _Ty *release() _THROW0() + { // return wrapped pointer and give up ownership + _Ty *_Tmp = _Myptr; + _Myptr = 0; + return (_Tmp); + } + + void reset(_Ty* _Ptr = 0) + { // destroy designated object and store new pointer + if (_Ptr != _Myptr) + delete _Myptr; + _Myptr = _Ptr; + } + +private: + _Ty *_Myptr; // the wrapped object pointer + }; +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _MEMORY_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + */ + +/* + * This file is derived from software bearing the following + * restrictions: + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this + * software and its documentation for any purpose is hereby + * granted without fee, provided that the above copyright notice + * appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation. + * Hewlett-Packard Company makes no representations about the + * suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/memory.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/memory.h new file mode 100644 index 00000000..c7d338f0 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/memory.h @@ -0,0 +1,95 @@ +/*** +*memory.h - declarations for buffer (memory) manipulation routines +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file contains the function declarations for the +* buffer (memory) manipulation routines. +* [System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_MEMORY +#define _INC_MEMORY + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + + +#ifndef _SIZE_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 size_t; +#else +typedef _W64 unsigned int size_t; +#endif +#define _SIZE_T_DEFINED +#endif + +/* Function prototypes */ + +_CRTIMP void * __cdecl _memccpy(void *, const void *, int, size_t); +_CRTIMP void * __cdecl memchr(const void *, int, size_t); +_CRTIMP int __cdecl _memicmp(const void *, const void *, size_t); +#ifdef _M_MRX000 +_CRTIMP int __cdecl memcmp(const void *, const void *, size_t); +_CRTIMP void * __cdecl memcpy(void *, const void *, size_t); +_CRTIMP void * __cdecl memset(void *, int, size_t); +#else + int __cdecl memcmp(const void *, const void *, size_t); + void * __cdecl memcpy(void *, const void *, size_t); + void * __cdecl memset(void *, int, size_t); +#endif + +#if !__STDC__ + +/* Non-ANSI names for compatibility */ + +_CRTIMP void * __cdecl memccpy(void *, const void *, int, size_t); +_CRTIMP int __cdecl memicmp(const void *, const void *, size_t); + +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#endif /* _INC_MEMORY */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/minmax.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/minmax.h new file mode 100644 index 00000000..caa59cab --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/minmax.h @@ -0,0 +1,28 @@ +/*** +*minmax.h - familiar min & max macros +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* Defines min and max macros. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_MINMAX +#define _INC_MINMAX + +#ifndef max +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#endif + +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +#endif diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/mm3dnow.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/mm3dnow.h new file mode 100644 index 00000000..2167e725 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/mm3dnow.h @@ -0,0 +1,66 @@ +/** +*** Copyright (C) 1999 Advanced Micro Devices Inc. All rights reserved. +*** +*** The information and source code contained herein is the exclusive +*** property of Advanced Micro Devices and may not be disclosed, examined +*** or reproduced in whole or in part without explicit written authorization +*** from the company. +*** +**/ + +/* + * mm3dnow.h + * + */ + +#ifndef _MM3DNOW_H_INCLUDED +#define _MM3DNOW_H_INCLUDED + +#include +#include + +#if defined __cplusplus +extern "C" { /* Intrinsics use C name-mangling. */ +#endif /* __cplusplus */ + +/* 3DNOW intrinsics */ + +void _m_femms(void); +__m64 _m_pavgusb(__m64, __m64); +__m64 _m_pf2id(__m64); +__m64 _m_pfacc(__m64, __m64); +__m64 _m_pfadd(__m64, __m64); +__m64 _m_pfcmpeq(__m64, __m64); +__m64 _m_pfcmpge(__m64, __m64); +__m64 _m_pfcmpgt(__m64, __m64); +__m64 _m_pfmax(__m64, __m64); +__m64 _m_pfmin(__m64, __m64); +__m64 _m_pfmul(__m64, __m64); +__m64 _m_pfrcp(__m64); +__m64 _m_pfrcpit1(__m64, __m64); +__m64 _m_pfrcpit2(__m64, __m64); +__m64 _m_pfrsqrt(__m64); +__m64 _m_pfrsqit1(__m64, __m64); +__m64 _m_pfsub(__m64, __m64); +__m64 _m_pfsubr(__m64, __m64); +__m64 _m_pi2fd(__m64); +__m64 _m_pmulhrw(__m64, __m64); +void _m_prefetch(void*); +void _m_prefetchw(void*); + +__m64 _m_from_float(float); +float _m_to_float(__m64); + +/* Athlon DSP intrinsics */ + +__m64 _m_pf2iw(__m64); +__m64 _m_pfnacc(__m64, __m64); +__m64 _m_pfpnacc(__m64, __m64); +__m64 _m_pi2fw(__m64); +__m64 _m_pswapd(__m64); + +#if defined __cplusplus +}; /* End "C" */ +#endif /* __cplusplus */ + +#endif /* _MM3DNOW_H_INCLUDED */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/mmintrin.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/mmintrin.h new file mode 100644 index 00000000..79fa16c4 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/mmintrin.h @@ -0,0 +1,183 @@ +/** +*** Copyright (C) 1985-1999 Intel Corporation. All rights reserved. +*** +*** The information and source code contained herein is the exclusive +*** property of Intel Corporation and may not be disclosed, examined +*** or reproduced in whole or in part without explicit written authorization +*** from the company. +*** +**/ + +/* + * Definitions and declarations for use with compiler intrinsics. + */ + +#ifndef _MMINTRIN_H_INCLUDED +#define _MMINTRIN_H_INCLUDED + +#if defined __cplusplus +extern "C" { /* Begin "C" */ +/* Intrinsics use C name-mangling. + */ +#endif /* __cplusplus */ + +#ifdef __ICL +typedef unsigned long long __m64; +#elif _MSC_VER >= 1300 +typedef union __declspec(intrin_type) __declspec(align(8)) __m64 +{ + unsigned __int64 m64_u64; + float m64_f32[2]; + __int8 m64_i8[8]; + __int16 m64_i16[4]; + __int32 m64_i32[2]; + __int64 m64_i64; + unsigned __int8 m64_u8[8]; + unsigned __int16 m64_u16[4]; + unsigned __int32 m64_u32[2]; +} __m64; +#endif + +/* General support intrinsics */ +void _m_empty(void); +__m64 _m_from_int(int i); +int _m_to_int(__m64 m); +__m64 _m_packsswb(__m64 m1, __m64 m2); +__m64 _m_packssdw(__m64 m1, __m64 m2); +__m64 _m_packuswb(__m64 m1, __m64 m2); +__m64 _m_punpckhbw(__m64 m1, __m64 m2); +__m64 _m_punpckhwd(__m64 m1, __m64 m2); +__m64 _m_punpckhdq(__m64 m1, __m64 m2); +__m64 _m_punpcklbw(__m64 m1, __m64 m2); +__m64 _m_punpcklwd(__m64 m1, __m64 m2); +__m64 _m_punpckldq(__m64 m1, __m64 m2); + +/* Packed arithmetic intrinsics */ +__m64 _m_paddb(__m64 m1, __m64 m2); +__m64 _m_paddw(__m64 m1, __m64 m2); +__m64 _m_paddd(__m64 m1, __m64 m2); +__m64 _m_paddsb(__m64 m1, __m64 m2); +__m64 _m_paddsw(__m64 m1, __m64 m2); +__m64 _m_paddusb(__m64 m1, __m64 m2); +__m64 _m_paddusw(__m64 m1, __m64 m2); +__m64 _m_psubb(__m64 m1, __m64 m2); +__m64 _m_psubw(__m64 m1, __m64 m2); +__m64 _m_psubd(__m64 m1, __m64 m2); +__m64 _m_psubsb(__m64 m1, __m64 m2); +__m64 _m_psubsw(__m64 m1, __m64 m2); +__m64 _m_psubusb(__m64 m1, __m64 m2); +__m64 _m_psubusw(__m64 m1, __m64 m2); +__m64 _m_pmaddwd(__m64 m1, __m64 m2); +__m64 _m_pmulhw(__m64 m1, __m64 m2); +__m64 _m_pmullw(__m64 m1, __m64 m2); + +/* Shift intrinsics */ +__m64 _m_psllw(__m64 m, __m64 count); +__m64 _m_psllwi(__m64 m, int count); +__m64 _m_pslld(__m64 m, __m64 count); +__m64 _m_pslldi(__m64 m, int count); +__m64 _m_psllq(__m64 m, __m64 count); +__m64 _m_psllqi(__m64 m, int count); +__m64 _m_psraw(__m64 m, __m64 count); +__m64 _m_psrawi(__m64 m, int count); +__m64 _m_psrad(__m64 m, __m64 count); +__m64 _m_psradi(__m64 m, int count); +__m64 _m_psrlw(__m64 m, __m64 count); +__m64 _m_psrlwi(__m64 m, int count); +__m64 _m_psrld(__m64 m, __m64 count); +__m64 _m_psrldi(__m64 m, int count); +__m64 _m_psrlq(__m64 m, __m64 count); +__m64 _m_psrlqi(__m64 m, int count); + +/* Logical intrinsics */ +__m64 _m_pand(__m64 m1, __m64 m2); +__m64 _m_pandn(__m64 m1, __m64 m2); +__m64 _m_por(__m64 m1, __m64 m2); +__m64 _m_pxor(__m64 m1, __m64 m2); + +/* Comparison intrinsics */ +__m64 _m_pcmpeqb(__m64 m1, __m64 m2); +__m64 _m_pcmpeqw(__m64 m1, __m64 m2); +__m64 _m_pcmpeqd(__m64 m1, __m64 m2); +__m64 _m_pcmpgtb(__m64 m1, __m64 m2); +__m64 _m_pcmpgtw(__m64 m1, __m64 m2); +__m64 _m_pcmpgtd(__m64 m1, __m64 m2); + +/* Utility intrinsics */ +__m64 _mm_setzero_si64(); +__m64 _mm_set_pi32(int i1, int i0); +__m64 _mm_set_pi16(short s3, short s2, short s1, short s0); +__m64 _mm_set_pi8(char b7, char b6, char b5, char b4, + char b3, char b2, char b1, char b0); +__m64 _mm_set1_pi32(int i); +__m64 _mm_set1_pi16(short s); +__m64 _mm_set1_pi8(char b); +__m64 _mm_setr_pi32(int i1, int i0); +__m64 _mm_setr_pi16(short s3, short s2, short s1, short s0); +__m64 _mm_setr_pi8(char b7, char b6, char b5, char b4, + char b3, char b2, char b1, char b0); + +/* Alternate intrinsic name definitions */ +#define _mm_empty _m_empty +#define _mm_cvtsi32_si64 _m_from_int +#define _mm_cvtsi64_si32 _m_to_int +#define _mm_packs_pi16 _m_packsswb +#define _mm_packs_pi32 _m_packssdw +#define _mm_packs_pu16 _m_packuswb +#define _mm_unpackhi_pi8 _m_punpckhbw +#define _mm_unpackhi_pi16 _m_punpckhwd +#define _mm_unpackhi_pi32 _m_punpckhdq +#define _mm_unpacklo_pi8 _m_punpcklbw +#define _mm_unpacklo_pi16 _m_punpcklwd +#define _mm_unpacklo_pi32 _m_punpckldq +#define _mm_add_pi8 _m_paddb +#define _mm_add_pi16 _m_paddw +#define _mm_add_pi32 _m_paddd +#define _mm_adds_pi8 _m_paddsb +#define _mm_adds_pi16 _m_paddsw +#define _mm_adds_pu8 _m_paddusb +#define _mm_adds_pu16 _m_paddusw +#define _mm_sub_pi8 _m_psubb +#define _mm_sub_pi16 _m_psubw +#define _mm_sub_pi32 _m_psubd +#define _mm_subs_pi8 _m_psubsb +#define _mm_subs_pi16 _m_psubsw +#define _mm_subs_pu8 _m_psubusb +#define _mm_subs_pu16 _m_psubusw +#define _mm_madd_pi16 _m_pmaddwd +#define _mm_mulhi_pi16 _m_pmulhw +#define _mm_mullo_pi16 _m_pmullw +#define _mm_sll_pi16 _m_psllw +#define _mm_slli_pi16 _m_psllwi +#define _mm_sll_pi32 _m_pslld +#define _mm_slli_pi32 _m_pslldi +#define _mm_sll_si64 _m_psllq +#define _mm_slli_si64 _m_psllqi +#define _mm_sra_pi16 _m_psraw +#define _mm_srai_pi16 _m_psrawi +#define _mm_sra_pi32 _m_psrad +#define _mm_srai_pi32 _m_psradi +#define _mm_srl_pi16 _m_psrlw +#define _mm_srli_pi16 _m_psrlwi +#define _mm_srl_pi32 _m_psrld +#define _mm_srli_pi32 _m_psrldi +#define _mm_srl_si64 _m_psrlq +#define _mm_srli_si64 _m_psrlqi +#define _mm_and_si64 _m_pand +#define _mm_andnot_si64 _m_pandn +#define _mm_or_si64 _m_por +#define _mm_xor_si64 _m_pxor +#define _mm_cmpeq_pi8 _m_pcmpeqb +#define _mm_cmpeq_pi16 _m_pcmpeqw +#define _mm_cmpeq_pi32 _m_pcmpeqd +#define _mm_cmpgt_pi8 _m_pcmpgtb +#define _mm_cmpgt_pi16 _m_pcmpgtw +#define _mm_cmpgt_pi32 _m_pcmpgtd + + +#if defined __cplusplus +}; /* End "C" */ +#endif /* __cplusplus */ + +#endif /* _MMINTRIN_H_INCLUDED */ + diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/new b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/new new file mode 100644 index 00000000..3e44ab10 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/new @@ -0,0 +1,120 @@ +// new standard header for Microsoft +#pragma once +#ifndef _NEW_ +#define _NEW_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) + + #pragma push_macro("new") + #undef new + +_STD_BEGIN + // CLASS bad_alloc +class bad_alloc + : public exception + { // base of all bad allocation exceptions +public: + bad_alloc(const char *_Message = _MESG("bad allocation")) _THROW0() + : exception(_Message) + { // construct from message string + } + + virtual ~bad_alloc() _THROW0() + { // destroy the object + } + + #if !_HAS_EXCEPTIONS +protected: + virtual void _Doraise() const + { // perform class-specific exception handling + _RAISE(*this); + } +#endif /* _HAS_EXCEPTIONS */ + + }; + + // SUPPORT TYPES + #if !defined(_INC_NEW) || !defined(_MSC_EXTENSIONS) +typedef void (__cdecl *new_handler)(); // handler for operator new failures + #endif /* !defined(_INC_NEW) || !defined(_MSC_EXTENSIONS) */ + + #ifndef __NOTHROW_T_DEFINED +struct nothrow_t + { // placement new tag type to suppress exceptions + }; + +extern const nothrow_t nothrow; // constant for placement new tag + #endif /* __NOTHROW_T_DEFINED */ + + // FUNCTION AND OBJECT DECLARATIONS +_CRTIMP2 new_handler __cdecl set_new_handler(new_handler) + _THROW0(); // establish alternate new handler +_STD_END + + // new AND delete DECLARATIONS (NB: NOT IN std) +void __cdecl operator delete(void *) _THROW0(); +void *__cdecl operator new(size_t) _THROW1(std::bad_alloc); + + #ifndef __PLACEMENT_NEW_INLINE + #define __PLACEMENT_NEW_INLINE +inline void *__cdecl operator new(size_t, void *_Where) _THROW0() + { // construct array with placement at _Where + return (_Where); + } + +inline void __cdecl operator delete(void *, void *) _THROW0() + { // delete if placement new fails + } + #endif /* __PLACEMENT_NEW_INLINE */ + + #ifndef __PLACEMENT_VEC_NEW_INLINE + #define __PLACEMENT_VEC_NEW_INLINE +inline void *__cdecl operator new[](size_t, void *_Where) _THROW0() + { // construct array with placement at _Where + return (_Where); + } + +inline void __cdecl operator delete[](void *, void *) _THROW0() + { // delete if placement array new fails + } + #endif /* __PLACEMENT_VEC_NEW_INLINE */ + +void __cdecl operator delete[](void *) _THROW0(); // delete allocated array + +void *__cdecl operator new[](size_t) + _THROW1(std::bad_alloc); // allocate array or throw exception + + #ifndef __NOTHROW_T_DEFINED + #define __NOTHROW_T_DEFINED +void *__cdecl operator new(size_t, const std::nothrow_t&) + _THROW0(); + +void *__cdecl operator new[](size_t, const std::nothrow_t&) + _THROW0(); // allocate array or return null pointer + +void __cdecl operator delete(void *, const std::nothrow_t&) + _THROW0(); // delete if nothrow new fails -- REPLACEABLE + +void __cdecl operator delete[](void *, const std::nothrow_t&) + _THROW0(); // delete if nothrow array new fails -- REPLACEABLE + #endif /* __NOTHROW_T_DEFINED */ + + + + #if !defined(_INC_NEW) || !defined(_MSC_EXTENSIONS) +using std::new_handler; + #endif /* !defined(_INC_NEW) || !defined(_MSC_EXTENSIONS) */ + + #pragma pop_macro("new") + +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _NEW_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/new.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/new.h new file mode 100644 index 00000000..e113eab6 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/new.h @@ -0,0 +1,148 @@ +/*** +*new.h - declarations and definitions for C++ memory allocation functions +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* Contains the declarations for C++ memory allocation functions. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_NEW +#define _INC_NEW + +#ifdef __cplusplus + +#ifndef _MSC_EXTENSIONS +#include +#endif + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +/* Protect against #define of new */ +#pragma push_macro("new") +#undef new + + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + +/* Define _CRTIMP2 */ +#ifndef _CRTIMP2 +#if defined(_DLL) && !defined(_STATIC_CPPLIB) +#define _CRTIMP2 __declspec(dllimport) +#else /* ndef _DLL && !STATIC_CPPLIB */ +#define _CRTIMP2 +#endif /* _DLL && !STATIC_CPPLIB */ +#endif /* _CRTIMP2 */ + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + + +/* types and structures */ + +#ifndef _SIZE_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 size_t; +#else +typedef _W64 unsigned int size_t; +#endif +#define _SIZE_T_DEFINED +#endif + +#ifdef _MSC_EXTENSIONS +namespace std { + typedef void (__cdecl * new_handler) (); + _CRTIMP2 new_handler __cdecl set_new_handler(new_handler) throw(); +}; +using std::new_handler; +using std::set_new_handler; +#endif + +#ifndef __NOTHROW_T_DEFINED +#define __NOTHROW_T_DEFINED +namespace std { + /* placement new tag type to suppress exceptions */ + struct nothrow_t {}; + + /* constant for placement new tag */ + extern const nothrow_t nothrow; +}; + +void *__cdecl operator new(size_t, const std::nothrow_t&) throw(); +void *__cdecl operator new[](size_t, const std::nothrow_t&) throw(); +void __cdecl operator delete(void *, const std::nothrow_t&) throw(); +void __cdecl operator delete[](void *, const std::nothrow_t&) throw(); +#endif + +#ifndef __PLACEMENT_NEW_INLINE +#define __PLACEMENT_NEW_INLINE +inline void *__cdecl operator new(size_t, void *_P) + {return (_P); } +#if _MSC_VER >= 1200 +inline void __cdecl operator delete(void *, void *) + {return; } +#endif +#endif + + +/* + * new mode flag -- when set, makes malloc() behave like new() + */ + +_CRTIMP int __cdecl _query_new_mode( void ); +_CRTIMP int __cdecl _set_new_mode( int ); + +#ifndef _PNH_DEFINED +typedef int (__cdecl * _PNH)( size_t ); +#define _PNH_DEFINED +#endif + +_CRTIMP _PNH __cdecl _query_new_handler( void ); +_CRTIMP _PNH __cdecl _set_new_handler( _PNH ); + +/* + * Microsoft extension: + * + * _NO_ANSI_NEW_HANDLER de-activates the ANSI new_handler. Use this special value + * to support old style (_set_new_handler) behavior. + */ + +#ifndef _NO_ANSI_NH_DEFINED +#define _NO_ANSI_NEW_HANDLER ((new_handler)-1) +#define _NO_ANSI_NH_DEFINED +#endif + +#pragma pop_macro("new") + +#endif /* __cplusplus */ + +#endif /* _INC_NEW */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/numeric b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/numeric new file mode 100644 index 00000000..631a87c4 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/numeric @@ -0,0 +1,179 @@ +// numeric standard header +#pragma once +#ifndef _NUMERIC_ +#define _NUMERIC_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // TEMPLATE FUNCTION accumulate +template inline + _Ty accumulate(_InIt _First, _InIt _Last, _Ty _Val) + { // return sum of _Val and all in [_First, _Last) + for (; _First != _Last; ++_First) + _Val = _Val + *_First; + return (_Val); + } + + // TEMPLATE FUNCTION accumulate WITH BINOP +template inline + _Ty accumulate(_InIt _First, _InIt _Last, _Ty _Val, _Fn2 _Func) + { // return sum of _Val and all in [_First, _Last), using _Func + for (; _First != _Last; ++_First) + _Val = _Func(_Val, *_First); + return (_Val); + } + + // TEMPLATE FUNCTION inner_product +template inline + _Ty inner_product(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _Ty _Val) + { // return inner product of sequences + for (; _First1 != _Last1; ++_First1, ++_First2) + _Val = _Val + *_First1 * *_First2; + return (_Val); + } + + // TEMPLATE FUNCTION inner_product WITH BINOPS +template inline + _Ty inner_product(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _Ty _Val, + _Fn21 _Func1, _Fn22 _Func2) + { // return inner product of sequences, using _Func1 and _Func2 + for (; _First1 != _Last1; ++_First1, ++_First2) + _Val = _Func1(_Val, _Func2(*_First1, *_First2)); + return (_Val); + } + + // TEMPLATE FUNCTION partial_sum +template inline + _OutIt _Partial_sum(_InIt _First, _InIt _Last, _OutIt _Dest, _Ty *) + { // compute partial sums into _Dest + _Ty _Val = *_First; + for (*_Dest = _Val; ++_First != _Last; *++_Dest = _Val) + _Val = _Val + *_First; + return (++_Dest); + } + +template inline + _OutIt partial_sum(_InIt _First, _InIt _Last, _OutIt _Dest) + { // compute partial sums into _Dest + return (_First == _Last ? _Dest + : _Partial_sum(_First, _Last, _Dest, _Val_type(_First))); + } + + // TEMPLATE FUNCTION partial_sum WITH BINOP +template inline + _OutIt _Partial_sum(_InIt _First, _InIt _Last, + _OutIt _Dest, _Fn2 _Func, _Ty *) + { // compute partial sums into _Dest, using _Func + _Ty _Val = *_First; + for (*_Dest = _Val; ++_First != _Last; *++_Dest = _Val) + _Val = _Func(_Val, *_First); + return (++_Dest); + } + +template inline + _OutIt partial_sum(_InIt _First, _InIt _Last, + _OutIt _Dest, _Fn2 _Func) + { // compute partial sums into _Dest, using _Func + return (_First == _Last ? _Dest + : _Partial_sum(_First, _Last, _Dest, _Func, _Val_type(_First))); + } + + // TEMPLATE FUNCTION adjacent_difference +template inline + _OutIt _Adjacent_difference(_InIt _First, _InIt _Last, + _OutIt _Dest, _Ty *) + { // compute adjacent differences into _Dest + _Ty _Val = *_First; + for (*_Dest = _Val; ++_First != _Last; ) + { // compute another difference + _Ty _Tmp = *_First; + *++_Dest = _Tmp - _Val; + _Val = _Tmp; + } + return (++_Dest); + } + +template inline + _OutIt adjacent_difference(_InIt _First, _InIt _Last, _OutIt _Dest) + { // compute adjacent differences into _Dest + return (_First == _Last ? _Dest + : _Adjacent_difference(_First, _Last, _Dest, _Val_type(_First))); + } + + // TEMPLATE FUNCTION adjacent_difference WITH BINOP +template inline + _OutIt _Adjacent_difference(_InIt _First, _InIt _Last, + _OutIt _Dest, _Fn2 _Func, _Ty *) + { // compute adjacent differences into _Dest, using _Func + _Ty _Val = *_First; + for (*_Dest = _Val; ++_First != _Last; ) + { // compute another difference + _Ty _Tmp = *_First; + *++_Dest = _Func(_Tmp, _Val); + _Val = _Tmp; + } + return (++_Dest); + } + +template inline + _OutIt adjacent_difference(_InIt _First, _InIt _Last, + _OutIt _Dest, _Fn2 _Func) + { // compute adjacent differences into _Dest, using _Func + return (_First == _Last ? _Dest : _Adjacent_difference(_First, _Last, + _Dest, _Func, _Val_type(_First))); + } +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _NUMERIC_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + */ + +/* + * This file is derived from software bearing the following + * restrictions: + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this + * software and its documentation for any purpose is hereby + * granted without fee, provided that the above copyright notice + * appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation. + * Hewlett-Packard Company makes no representations about the + * suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ostream b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ostream new file mode 100644 index 00000000..25fbcbd2 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ostream @@ -0,0 +1,1003 @@ +// ostream standard header +#pragma once +#ifndef _OSTREAM_ +#define _OSTREAM_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // I/O EXCEPTION MACROS + + #if _HAS_EXCEPTIONS + #define _TRY_IO_BEGIN _TRY_BEGIN /* begin try block */ + + #define _CATCH_IO_END _CATCH_ALL /* catch block for _Myios */ \ + _Myios::setstate(ios_base::badbit, true); /* set badbit and rethrow */ \ + _CATCH_END + + #define _CATCH_IO_(x) _CATCH_ALL /* catch block for basic_ios x */ \ + (x).setstate(ios_base::badbit, true); /* set badbit and rethrow */ \ + _CATCH_END + + #else /* _HAS_EXCEPTIONS */ + #define _TRY_IO_BEGIN { /* begin try block */ + + #define _CATCH_IO_END } /* catch block for _Myios */ + + #define _CATCH_IO_(x) } /* catch block for basic_ios x */ + #endif /* _HAS_EXCEPTIONS */ + + // TEMPLATE CLASS basic_ostream +template + class basic_ostream + : virtual public basic_ios<_Elem, _Traits> + { // control insertions into a stream buffer +public: + typedef basic_ostream<_Elem, _Traits> _Myt; + typedef basic_ios<_Elem, _Traits> _Myios; + typedef basic_streambuf<_Elem, _Traits> _Mysb; + typedef ostreambuf_iterator<_Elem, _Traits> _Iter; + typedef num_put<_Elem, _Iter> _Nput; + + explicit basic_ostream(basic_streambuf<_Elem, _Traits> *_Strbuf, + bool _Isstd = false) + { // construct from a stream buffer pointer + _Myios::init(_Strbuf, _Isstd); + } + + basic_ostream(_Uninitialized) + { // construct uninitialized + ios_base::_Addstd(); + } + + virtual ~basic_ostream() + { // destroy the object + } + + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + + class _Sentry_base + { // stores thread lock and reference to output stream + public: + _Sentry_base(_Myt& _Ostr) + : _Myostr(_Ostr) + { // lock the stream buffer, if there + if (_Myostr.rdbuf() != 0) + _Myostr.rdbuf()->_Lock(); + } + + ~_Sentry_base() + { // destroy after unlocking + if (_Myostr.rdbuf() != 0) + _Myostr.rdbuf()->_Unlock(); + } + + _Myt& _Myostr; // the output stream, for _Unlock call at destruction + }; + + class sentry + : public _Sentry_base + { // stores thread lock and state of stream + public: + explicit sentry(_Myt& _Ostr) + : _Sentry_base(_Ostr) + { // construct locking and testing stream + if (_Ostr.good() && _Ostr.tie() != 0) + _Ostr.tie()->flush(); + _Ok = _Ostr.good(); // store test only after flushing tie + } + + ~sentry() + { // destroy the object + + #if _HAS_EXCEPTIONS + if (!uncaught_exception()) + this->_Myostr._Osfx(); + } + + #else /* _HAS_EXCEPTIONS */ + this->_Myostr._Osfx(); + } + #endif /* _HAS_EXCEPTIONS */ + + operator bool() const + { // test if stream state okay + return (_Ok); + } + + private: + sentry(const sentry&); // not defined + sentry& operator=(const sentry&); // not defined + + bool _Ok; // true if stream state okay at construction + }; + + bool opfx() + { // test stream state and flush tie stream as needed (retained) + if (ios_base::good() && _Myios::tie() != 0) + _Myios::tie()->flush(); + return (ios_base::good()); + } + + void osfx() + { // perform any wrapup (retained) + _Osfx(); + } + + void _Osfx() + { // perform any wrapup + if (ios_base::flags() & ios_base::unitbuf) + flush(); // flush stream as needed + } + + _Myt& operator<<(_Myt& (__cdecl *_Pfn)(_Myt&)) + { // call basic_ostream manipulator + return ((*_Pfn)(*this)); + } + + _Myt& operator<<(_Myios& (__cdecl *_Pfn)(_Myios&)) + { // call basic_ios manipulator + (*_Pfn)(*(_Myios *)this); + return (*this); + } + + _Myt& operator<<(ios_base& (__cdecl *_Pfn)(ios_base&)) + { // call ios_base manipulator + (*_Pfn)(*(ios_base *)this); + return (*this); + } + + _Myt& operator<<(_Bool _Val) + { // insert a boolean + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to insert + const _Nput& _Nput_fac = _USE(ios_base::getloc(), _Nput); + + _TRY_IO_BEGIN + if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this, + _Myios::fill(), _Val).failed()) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator<<(short _Val) + { // insert a short + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to insert + const _Nput& _Nput_fac = _USE(ios_base::getloc(), _Nput); + ios_base::fmtflags _Bfl = + ios_base::flags() & ios_base::basefield; + long _Tmp = (_Bfl == ios_base::oct + || _Bfl == ios_base::hex) + ? (long)(unsigned short)_Val : (long)_Val; + + _TRY_IO_BEGIN + if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this, + _Myios::fill(), _Tmp).failed()) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + /* Note that if your stream is wchar_t, and you are not using native wchar_t + Then this operation will be unavailable as there is an explicit + specialisation further down this file that is designed to treat an + unsigned short as a character. + + If you wish to read or write unsigned shorts to wchar_t streams, you should + consider making wchar_t a native type by turning on /Zc:wchar_t + */ + _Myt& operator<<(unsigned short _Val) + { // insert an unsigned short + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to insert + const _Nput& _Nput_fac = _USE(ios_base::getloc(), _Nput); + + _TRY_IO_BEGIN + if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this, + _Myios::fill(), (unsigned long)_Val).failed()) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator<<(int _Val) + { // insert an int + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to insert + const _Nput& _Nput_fac = _USE(ios_base::getloc(), _Nput); + ios_base::fmtflags _Bfl = + ios_base::flags() & ios_base::basefield; + long _Tmp = (_Bfl == ios_base::oct + || _Bfl == ios_base::hex) + ? (long)(unsigned int)_Val : (long)_Val; + + _TRY_IO_BEGIN + if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this, + _Myios::fill(), _Tmp).failed()) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator<<(unsigned int _Val) + { // insert an unsigned int + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to insert + const _Nput& _Nput_fac = _USE(ios_base::getloc(), _Nput); + + _TRY_IO_BEGIN + if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this, + _Myios::fill(), (unsigned long)_Val).failed()) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator<<(long _Val) + { // insert a long + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to insert + const _Nput& _Nput_fac = _USE(ios_base::getloc(), _Nput); + + _TRY_IO_BEGIN + if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this, + _Myios::fill(), _Val).failed()) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator<<(unsigned long _Val) + { // insert an unsigned long + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to insert + const _Nput& _Nput_fac = _USE(ios_base::getloc(), _Nput); + + _TRY_IO_BEGIN + if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this, + _Myios::fill(), _Val).failed()) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + #ifdef _LONGLONG + _Myt& operator<<(_LONGLONG _Val) + { // insert a long long + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to insert + const _Nput& _Nput_fac = _USE(ios_base::getloc(), _Nput); + + _TRY_IO_BEGIN + if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this, + _Myios::fill(), _Val).failed()) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator<<(_ULONGLONG _Val) + { // insert an unsigned long long + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to insert + const _Nput& _Nput_fac = _USE(ios_base::getloc(), _Nput); + + _TRY_IO_BEGIN + if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this, + _Myios::fill(), _Val).failed()) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + #endif /* _LONGLONG */ + + _Myt& operator<<(float _Val) + { // insert a float + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to insert + const _Nput& _Nput_fac = _USE(ios_base::getloc(), _Nput); + + _TRY_IO_BEGIN + if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this, + _Myios::fill(), (double)_Val).failed()) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator<<(double _Val) + { // insert a double + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to insert + const _Nput& _Nput_fac = _USE(ios_base::getloc(), _Nput); + + _TRY_IO_BEGIN + if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this, + _Myios::fill(), _Val).failed()) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator<<(long double _Val) + { // insert a long double + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to insert + const _Nput& _Nput_fac = _USE(ios_base::getloc(), _Nput); + + _TRY_IO_BEGIN + if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this, + _Myios::fill(), _Val).failed()) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator<<(const void *_Val) + { // insert a void pointer + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (_Ok) + { // state okay, use facet to insert + const _Nput& _Nput_fac = _USE(ios_base::getloc(), _Nput); + + _TRY_IO_BEGIN + if (_Nput_fac.put(_Iter(_Myios::rdbuf()), *this, + _Myios::fill(), _Val).failed()) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& operator<<(_Mysb *_Strbuf) + { // insert until end-of-file from a stream buffer + ios_base::iostate _State = ios_base::goodbit; + bool _Copied = false; + const sentry _Ok(*this); + + if (_Ok && _Strbuf != 0) + for (int_type _Meta = _Traits::eof(); ; _Copied = true) + { // extract another character from stream buffer + _TRY_BEGIN + _Meta = _Traits::eq_int_type(_Traits::eof(), _Meta) + ? _Strbuf->sgetc() : _Strbuf->snextc(); + _CATCH_ALL + _Myios::setstate(ios_base::failbit); + _RERAISE; + _CATCH_END + + if (_Traits::eq_int_type(_Traits::eof(), _Meta)) + break; // end of file, quit + + _TRY_IO_BEGIN + if (_Traits::eq_int_type(_Traits::eof(), + _Myios::rdbuf()->sputc( + _Traits::to_char_type(_Meta)))) + { // insertion failed, quit + _State |= ios_base::badbit; + break; + } + _CATCH_IO_END + } + + ios_base::width(0); + _Myios::setstate(!_Copied ? _State | ios_base::failbit : _State); + return (*this); + } + + _Myt& put(_Elem _Ch) + { // insert a character + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (!_Ok) + _State |= ios_base::badbit; + else + { // state okay, insert character + _TRY_IO_BEGIN + if (_Traits::eq_int_type(_Traits::eof(), + _Myios::rdbuf()->sputc(_Ch))) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& write(const _Elem *_Str, + streamsize _Count) + { // insert _Count characters from array _Str + ios_base::iostate _State = ios_base::goodbit; + const sentry _Ok(*this); + + if (!_Ok) + _State |= ios_base::badbit; + else + { // state okay, insert characters + _TRY_IO_BEGIN + if (_Myios::rdbuf()->sputn(_Str, _Count) != _Count) + _State |= ios_base::badbit; + _CATCH_IO_END + } + + _Myios::setstate(_State); + return (*this); + } + + _Myt& flush() + { // flush output stream + ios_base::iostate _State = ios_base::goodbit; + if (!ios_base::fail() && _Myios::rdbuf()->pubsync() == -1) + _State |= ios_base::badbit; // sync failed + _Myios::setstate(_State); + return (*this); + } + + _Myt& seekp(pos_type _Pos) + { // set output stream position to _Pos + if (!ios_base::fail() + && (off_type)_Myios::rdbuf()->pubseekpos(_Pos, + ios_base::out) == _BADOFF) + _Myios::setstate(ios_base::failbit); + return (*this); + } + + _Myt& seekp(off_type _Off, ios_base::seekdir _Way) + { // change output stream position by _Off, according to _Way + if (!ios_base::fail() + && (off_type)_Myios::rdbuf()->pubseekoff(_Off, _Way, + ios_base::out) == _BADOFF) + _Myios::setstate(ios_base::failbit); + return (*this); + } + + pos_type tellp() + { // return output stream position + if (!ios_base::fail()) + return (_Myios::rdbuf()->pubseekoff(0, + ios_base::cur, ios_base::out)); + else + return (pos_type(_BADOFF)); + } + }; + +#ifndef _NATIVE_WCHAR_T_DEFINED +/* +This explicit template specialisation writes a single unicode character to the stream. + +By default, the compiler treats wchar_t as if it were a typedef for unsigned short. This means +that we cannot distinguish between an unsigned short and a wchar_t in the library. To be most +consistent with previous practice, we add this explicit specialisation to ensure that a single +unsigned short is read and written as a character. + +If you wish to read and write unsigned shorts as integers, we recommend you consider making +wchar_t a native type by using the /Zc:wchar_t compiler switch. +*/ +template <> inline + basic_ostream >& + basic_ostream >::operator<<( + unsigned short _Ch) + { // insert a character + typedef basic_ostream > _Myos; + typedef char_traits _Traits; + _Myos &_Ostr=*this; + ios_base::iostate _State = ios_base::goodbit; + const _Myos::sentry _Ok(_Ostr); + + if (_Ok) + { // state okay, insert + streamsize _Pad = _Ostr.width() <= 1 ? 0 : _Ostr.width() - 1; + + _TRY_IO_BEGIN + if ((_Ostr.flags() & ios_base::adjustfield) != ios_base::left) + for (; _State == ios_base::goodbit && 0 < _Pad; + --_Pad) // pad on left + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ostr.fill()))) + _State |= ios_base::badbit; + + if (_State == ios_base::goodbit + && _Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ch))) + _State |= ios_base::badbit; + + for (; _State == ios_base::goodbit && 0 < _Pad; + --_Pad) // pad on right + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ostr.fill()))) + _State |= ios_base::badbit; + _CATCH_IO_(_Ostr) + } + + _Ostr.width(0); + _Ostr.setstate(_State); + return (_Ostr); + } +#endif + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 basic_ostream >; +template class _CRTIMP2 basic_ostream >; + + + + #endif /* _DLL_CPPLIB */ + + // INSERTERS + +template inline + basic_ostream<_Elem, _Traits>& __cdecl operator<<( + basic_ostream<_Elem, _Traits>& _Ostr, const char *_Val) + { // insert NTBS + ios_base::iostate _State = ios_base::goodbit; + streamsize _Count = (streamsize)::strlen(_Val); // may overflow + streamsize _Pad = _Ostr.width() <= 0 || _Ostr.width() <= _Count + ? 0 : _Ostr.width() - _Count; + const typename basic_ostream<_Elem, _Traits>::sentry _Ok(_Ostr); + + if (!_Ok) + _State |= ios_base::badbit; + else + { // state okay, insert characters + _TRY_IO_BEGIN + const ctype<_Elem>& _Ctype_fac = _USE(_Ostr.getloc(), ctype<_Elem>); + if ((_Ostr.flags() & ios_base::adjustfield) != ios_base::left) + for (; 0 < _Pad; --_Pad) // pad on left + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ostr.fill()))) + { // insertion failed, quit + _State |= ios_base::badbit; + break; + } + + for (; _State == ios_base::goodbit && 0 < _Count; --_Count, ++_Val) + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ctype_fac.widen(*_Val)))) + _State |= ios_base::badbit; + + if (_State == ios_base::goodbit) + for (; 0 < _Pad; --_Pad) // pad on right + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ostr.fill()))) + { // insertion failed, quit + _State |= ios_base::badbit; + break; + } + _Ostr.width(0); + _CATCH_IO_(_Ostr) + } + + _Ostr.setstate(_State); + return (_Ostr); + } + +template inline + basic_ostream<_Elem, _Traits>& __cdecl operator<<( + basic_ostream<_Elem, _Traits>& _Ostr, char _Ch) + { // insert a character + ios_base::iostate _State = ios_base::goodbit; + const typename basic_ostream<_Elem, _Traits>::sentry _Ok(_Ostr); + + if (_Ok) + { // state okay, insert + const ctype<_Elem>& _Ctype_fac = _USE(_Ostr.getloc(), ctype<_Elem>); + streamsize _Pad = _Ostr.width() <= 1 ? 0 : _Ostr.width() - 1; + + _TRY_IO_BEGIN + if ((_Ostr.flags() & ios_base::adjustfield) != ios_base::left) + for (; _State == ios_base::goodbit && 0 < _Pad; + --_Pad) // pad on left + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ostr.fill()))) + _State |= ios_base::badbit; + + if (_State == ios_base::goodbit + && _Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ctype_fac.widen(_Ch)))) + _State |= ios_base::badbit; + + for (; _State == ios_base::goodbit && 0 < _Pad; + --_Pad) // pad on right + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ostr.fill()))) + _State |= ios_base::badbit; + _CATCH_IO_(_Ostr) + } + + _Ostr.width(0); + _Ostr.setstate(_State); + return (_Ostr); + } + +template inline + basic_ostream& __cdecl operator<<( + basic_ostream& _Ostr, + const char *_Val) + { // insert NTBS into char stream + typedef char _Elem; + typedef basic_ostream<_Elem, _Traits> _Myos; + ios_base::iostate _State = ios_base::goodbit; + streamsize _Count = (streamsize)_Traits::length(_Val); // may overflow + streamsize _Pad = _Ostr.width() <= 0 || _Ostr.width() <= _Count + ? 0 : _Ostr.width() - _Count; + const typename _Myos::sentry _Ok(_Ostr); + + if (!_Ok) + _State |= ios_base::badbit; + else + { // state okay, insert + _TRY_IO_BEGIN + if ((_Ostr.flags() & ios_base::adjustfield) != ios_base::left) + for (; 0 < _Pad; --_Pad) // pad on left + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ostr.fill()))) + { // insertion failed, quit + _State |= ios_base::badbit; + break; + } + + if (_State == ios_base::goodbit + && _Ostr.rdbuf()->sputn(_Val, _Count) != _Count) + _State |= ios_base::badbit; + + if (_State == ios_base::goodbit) + for (; 0 < _Pad; --_Pad) // pad on right + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ostr.fill()))) + { // insertion failed, quit + _State |= ios_base::badbit; + break; + } + _Ostr.width(0); + _CATCH_IO_(_Ostr) + } + + _Ostr.setstate(_State); + return (_Ostr); + } + +template inline + basic_ostream& __cdecl operator<<( + basic_ostream& _Ostr, char _Ch) + { // insert a char into char stream + typedef char _Elem; + typedef basic_ostream<_Elem, _Traits> _Myos; + ios_base::iostate _State = ios_base::goodbit; + const typename _Myos::sentry _Ok(_Ostr); + + if (_Ok) + { // state okay, insert + streamsize _Pad = _Ostr.width() <= 1 ? 0 : _Ostr.width() - 1; + + _TRY_IO_BEGIN + if ((_Ostr.flags() & ios_base::adjustfield) != ios_base::left) + for (; _State == ios_base::goodbit && 0 < _Pad; + --_Pad) // pad on left + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ostr.fill()))) + _State |= ios_base::badbit; + + if (_State == ios_base::goodbit + && _Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ch))) + _State |= ios_base::badbit; + + for (; _State == ios_base::goodbit && 0 < _Pad; + --_Pad) // pad on right + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ostr.fill()))) + _State |= ios_base::badbit; + _CATCH_IO_(_Ostr) + } + + _Ostr.width(0); + _Ostr.setstate(_State); + return (_Ostr); + } + +template inline + basic_ostream<_Elem, _Traits>& __cdecl operator<<( + basic_ostream<_Elem, _Traits>& _Ostr, const _Elem *_Val) + { // insert NTCS + typedef basic_ostream<_Elem, _Traits> _Myos; + ios_base::iostate _State = ios_base::goodbit; + streamsize _Count = (streamsize)_Traits::length(_Val); // may overflow + streamsize _Pad = _Ostr.width() <= 0 || _Ostr.width() <= _Count + ? 0 : _Ostr.width() - _Count; + const typename _Myos::sentry _Ok(_Ostr); + + if (!_Ok) + _State |= ios_base::badbit; + else + { // state okay, insert + _TRY_IO_BEGIN + if ((_Ostr.flags() & ios_base::adjustfield) != ios_base::left) + for (; 0 < _Pad; --_Pad) // pad on left + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ostr.fill()))) + { // insertion failed, quit + _State |= ios_base::badbit; + break; + } + + if (_State == ios_base::goodbit + && _Ostr.rdbuf()->sputn(_Val, _Count) != _Count) + _State |= ios_base::badbit; + + if (_State == ios_base::goodbit) + for (; 0 < _Pad; --_Pad) // pad on right + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ostr.fill()))) + { // insertion failed, quit + _State |= ios_base::badbit; + break; + } + _Ostr.width(0); + _CATCH_IO_(_Ostr) + } + + _Ostr.setstate(_State); + return (_Ostr); + } + +template inline + basic_ostream<_Elem, _Traits>& __cdecl operator<<( + basic_ostream<_Elem, _Traits>& _Ostr, _Elem _Ch) + { // insert a character + typedef basic_ostream<_Elem, _Traits> _Myos; + ios_base::iostate _State = ios_base::goodbit; + const typename _Myos::sentry _Ok(_Ostr); + + if (_Ok) + { // state okay, insert + streamsize _Pad = _Ostr.width() <= 1 ? 0 : _Ostr.width() - 1; + + _TRY_IO_BEGIN + if ((_Ostr.flags() & ios_base::adjustfield) != ios_base::left) + for (; _State == ios_base::goodbit && 0 < _Pad; + --_Pad) // pad on left + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ostr.fill()))) + _State |= ios_base::badbit; + + if (_State == ios_base::goodbit + && _Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ch))) + _State |= ios_base::badbit; + + for (; _State == ios_base::goodbit && 0 < _Pad; + --_Pad) // pad on right + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ostr.fill()))) + _State |= ios_base::badbit; + _CATCH_IO_(_Ostr) + } + + _Ostr.width(0); + _Ostr.setstate(_State); + return (_Ostr); + } + +template inline + basic_ostream& __cdecl operator<<( + basic_ostream& _Ostr, const signed char *_Val) + { // insert a signed char NTBS + return (_Ostr << (const char *)_Val); + } + +template inline + basic_ostream& __cdecl operator<<( + basic_ostream& _Ostr, signed char _Ch) + { // insert a signed char + return (_Ostr << (char)_Ch); + } + +template inline + basic_ostream& __cdecl operator<<( + basic_ostream& _Ostr, const unsigned char *_Val) + { // insert an unsigned char NTBS + return (_Ostr << (const char *)_Val); + } + +template inline + basic_ostream& __cdecl operator<<( + basic_ostream& _Ostr, unsigned char _Ch) + { // insert an unsigned char + return (_Ostr << (char)_Ch); + } + + // MANIPULATORS +template inline + basic_ostream<_Elem, _Traits>& + __cdecl endl(basic_ostream<_Elem, _Traits>& _Ostr) + { // insert newline and flush stream + _Ostr.put(_Ostr.widen('\n')); + _Ostr.flush(); + return (_Ostr); + } + +template inline + basic_ostream<_Elem, _Traits>& + __cdecl ends(basic_ostream<_Elem, _Traits>& _Ostr) + { // insert null character + _Ostr.put(_Elem()); + return (_Ostr); + } + +template inline + basic_ostream<_Elem, _Traits>& + __cdecl flush(basic_ostream<_Elem, _Traits>& _Ostr) + { // flush stream + _Ostr.flush(); + return (_Ostr); + } + +_CRTIMP2 inline basic_ostream >& + __cdecl endl(basic_ostream >& _Ostr) + { // insert newline and flush byte stream + _Ostr.put('\n'); + _Ostr.flush(); + return (_Ostr); + } + +_CRTIMP2 inline basic_ostream >& + __cdecl endl(basic_ostream >& _Ostr) + { // insert newline and flush wide stream + _Ostr.put('\n'); + _Ostr.flush(); + return (_Ostr); + } + + +_CRTIMP2 inline basic_ostream >& + __cdecl ends(basic_ostream >& _Ostr) + { // insert null character into byte stream + _Ostr.put('\0'); + return (_Ostr); + } + +_CRTIMP2 inline basic_ostream >& + __cdecl ends(basic_ostream >& _Ostr) + { // insert null character into wide stream + _Ostr.put('\0'); + return (_Ostr); + } + + +_CRTIMP2 inline basic_ostream >& + __cdecl flush(basic_ostream >& _Ostr) + { // flush byte stream + _Ostr.flush(); + return (_Ostr); + } + +_CRTIMP2 inline basic_ostream >& + __cdecl flush(basic_ostream >& _Ostr) + { // flush wide stream + _Ostr.flush(); + return (_Ostr); + } + + + #ifdef _DLL_CPPLIB +template _CRTIMP2 basic_ostream >& __cdecl + operator<<(basic_ostream >&, + const char *); +template _CRTIMP2 basic_ostream >& __cdecl + operator<<(basic_ostream >&, char); +template _CRTIMP2 basic_ostream >& __cdecl + operator<<(basic_ostream >&, + const signed char *); +template _CRTIMP2 basic_ostream >& __cdecl + operator<<(basic_ostream >&, signed char); +template _CRTIMP2 basic_ostream >& __cdecl + operator<<(basic_ostream >&, + const unsigned char *); +template _CRTIMP2 basic_ostream >& __cdecl + operator<<(basic_ostream >&, unsigned char); +template _CRTIMP2 basic_ostream >& __cdecl + operator<<(basic_ostream >&, + const wchar_t *); +template _CRTIMP2 basic_ostream >& __cdecl + operator<<(basic_ostream >&, wchar_t); + + + + #endif /* _DLL_CPPLIB */ +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _OSTREAM_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/process.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/process.h new file mode 100644 index 00000000..16aee05d --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/process.h @@ -0,0 +1,251 @@ +/*** +*process.h - definition and declarations for process control functions +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the modeflag values for spawnxx calls. +* Also contains the function argument declarations for all +* process control related routines. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_PROCESS +#define _INC_PROCESS + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifndef _POSIX_ + +#ifdef __cplusplus +extern "C" { +#endif + + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + +#ifndef _INTPTR_T_DEFINED +#ifdef _WIN64 +typedef __int64 intptr_t; +#else +typedef _W64 int intptr_t; +#endif +#define _INTPTR_T_DEFINED +#endif + +#ifndef _UINTPTR_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 uintptr_t; +#else +typedef _W64 unsigned int uintptr_t; +#endif +#define _UINTPTR_T_DEFINED +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + + +/* modeflag values for _spawnxx routines */ + +#define _P_WAIT 0 +#define _P_NOWAIT 1 +#define _OLD_P_OVERLAY 2 +#define _P_NOWAITO 3 +#define _P_DETACH 4 + +#ifdef _MT +#define _P_OVERLAY 2 +#else +extern int _p_overlay; +#define _P_OVERLAY _p_overlay +#endif /* _MT */ + +/* Action codes for _cwait(). The action code argument to _cwait is ignored + on Win32 though it is accepted for compatibilty with old MS CRT libs */ +#define _WAIT_CHILD 0 +#define _WAIT_GRANDCHILD 1 + + +/* function prototypes */ + +#ifdef _MT +_CRTIMP uintptr_t __cdecl _beginthread (void (__cdecl *) (void *), + unsigned, void *); +_CRTIMP void __cdecl _endthread(void); +_CRTIMP uintptr_t __cdecl _beginthreadex(void *, unsigned, + unsigned (__stdcall *) (void *), void *, unsigned, unsigned *); +_CRTIMP void __cdecl _endthreadex(unsigned); +#endif + +#if _MSC_VER >= 1200 +_CRTIMP __declspec(noreturn) void __cdecl abort(void); +_CRTIMP __declspec(noreturn) void __cdecl exit(int); +_CRTIMP __declspec(noreturn) void __cdecl _exit(int); +#else +_CRTIMP void __cdecl abort(void); +_CRTIMP void __cdecl exit(int); +_CRTIMP void __cdecl _exit(int); +#endif +_CRTIMP void __cdecl _cexit(void); +_CRTIMP void __cdecl _c_exit(void); +_CRTIMP int __cdecl _getpid(void); + +_CRTIMP intptr_t __cdecl _cwait(int *, intptr_t, int); +_CRTIMP intptr_t __cdecl _execl(const char *, const char *, ...); +_CRTIMP intptr_t __cdecl _execle(const char *, const char *, ...); +_CRTIMP intptr_t __cdecl _execlp(const char *, const char *, ...); +_CRTIMP intptr_t __cdecl _execlpe(const char *, const char *, ...); +_CRTIMP intptr_t __cdecl _execv(const char *, const char * const *); +_CRTIMP intptr_t __cdecl _execve(const char *, const char * const *, const char * const *); +_CRTIMP intptr_t __cdecl _execvp(const char *, const char * const *); +_CRTIMP intptr_t __cdecl _execvpe(const char *, const char * const *, const char * const *); +_CRTIMP intptr_t __cdecl _spawnl(int, const char *, const char *, ...); +_CRTIMP intptr_t __cdecl _spawnle(int, const char *, const char *, ...); +_CRTIMP intptr_t __cdecl _spawnlp(int, const char *, const char *, ...); +_CRTIMP intptr_t __cdecl _spawnlpe(int, const char *, const char *, ...); +_CRTIMP intptr_t __cdecl _spawnv(int, const char *, const char * const *); +_CRTIMP intptr_t __cdecl _spawnve(int, const char *, const char * const *, + const char * const *); +_CRTIMP intptr_t __cdecl _spawnvp(int, const char *, const char * const *); +_CRTIMP intptr_t __cdecl _spawnvpe(int, const char *, const char * const *, + const char * const *); +_CRTIMP int __cdecl system(const char *); + +#ifndef _WPROCESS_DEFINED +/* wide function prototypes, also declared in wchar.h */ +_CRTIMP intptr_t __cdecl _wexecl(const wchar_t *, const wchar_t *, ...); +_CRTIMP intptr_t __cdecl _wexecle(const wchar_t *, const wchar_t *, ...); +_CRTIMP intptr_t __cdecl _wexeclp(const wchar_t *, const wchar_t *, ...); +_CRTIMP intptr_t __cdecl _wexeclpe(const wchar_t *, const wchar_t *, ...); +_CRTIMP intptr_t __cdecl _wexecv(const wchar_t *, const wchar_t * const *); +_CRTIMP intptr_t __cdecl _wexecve(const wchar_t *, const wchar_t * const *, const wchar_t * const *); +_CRTIMP intptr_t __cdecl _wexecvp(const wchar_t *, const wchar_t * const *); +_CRTIMP intptr_t __cdecl _wexecvpe(const wchar_t *, const wchar_t * const *, const wchar_t * const *); +_CRTIMP intptr_t __cdecl _wspawnl(int, const wchar_t *, const wchar_t *, ...); +_CRTIMP intptr_t __cdecl _wspawnle(int, const wchar_t *, const wchar_t *, ...); +_CRTIMP intptr_t __cdecl _wspawnlp(int, const wchar_t *, const wchar_t *, ...); +_CRTIMP intptr_t __cdecl _wspawnlpe(int, const wchar_t *, const wchar_t *, ...); +_CRTIMP intptr_t __cdecl _wspawnv(int, const wchar_t *, const wchar_t * const *); +_CRTIMP intptr_t __cdecl _wspawnve(int, const wchar_t *, const wchar_t * const *, + const wchar_t * const *); +_CRTIMP intptr_t __cdecl _wspawnvp(int, const wchar_t *, const wchar_t * const *); +_CRTIMP intptr_t __cdecl _wspawnvpe(int, const wchar_t *, const wchar_t * const *, + const wchar_t * const *); +_CRTIMP int __cdecl _wsystem(const wchar_t *); + +#define _WPROCESS_DEFINED +#endif + +/* --------- The following functions are OBSOLETE --------- */ +/* + * The Win32 API LoadLibrary, FreeLibrary and GetProcAddress should be used + * instead. + */ +intptr_t __cdecl _loaddll(char *); +int __cdecl _unloaddll(intptr_t); +int (__cdecl * __cdecl _getdllprocaddr(intptr_t, char *, intptr_t))(); +/* --------- The preceding functions are OBSOLETE --------- */ + + +#ifdef _DECL_DLLMAIN +/* + * Declare DLL notification (initialization/termination) routines + * The preferred method is for the user to provide DllMain() which will + * be called automatically by the DLL entry point defined by the C run- + * time library code. If the user wants to define the DLL entry point + * routine, the user's entry point must call _CRT_INIT on all types of + * notifications, as the very first thing on attach notifications and + * as the very last thing on detach notifications. + */ +#ifdef _WINDOWS_ /* Use types from WINDOWS.H */ +BOOL WINAPI DllMain(HANDLE, DWORD, LPVOID); +BOOL WINAPI _CRT_INIT(HANDLE, DWORD, LPVOID); +BOOL WINAPI _wCRT_INIT(HANDLE, DWORD, LPVOID); +extern BOOL (WINAPI *_pRawDllMain)(HANDLE, DWORD, LPVOID); +#else +int __stdcall DllMain(void *, unsigned, void *); +int __stdcall _CRT_INIT(void *, unsigned, void *); +int __stdcall _wCRT_INIT(void *, unsigned, void *); +extern int (__stdcall *_pRawDllMain)(void *, unsigned, void *); +#endif /* _WINDOWS_ */ +#endif + +#if !__STDC__ + +/* Non-ANSI names for compatibility */ + +#define P_WAIT _P_WAIT +#define P_NOWAIT _P_NOWAIT +#define P_OVERLAY _P_OVERLAY +#define OLD_P_OVERLAY _OLD_P_OVERLAY +#define P_NOWAITO _P_NOWAITO +#define P_DETACH _P_DETACH +#define WAIT_CHILD _WAIT_CHILD +#define WAIT_GRANDCHILD _WAIT_GRANDCHILD + +/* current declarations */ +_CRTIMP intptr_t __cdecl cwait(int *, intptr_t, int); +_CRTIMP intptr_t __cdecl execl(const char *, const char *, ...); +_CRTIMP intptr_t __cdecl execle(const char *, const char *, ...); +_CRTIMP intptr_t __cdecl execlp(const char *, const char *, ...); +_CRTIMP intptr_t __cdecl execlpe(const char *, const char *, ...); +_CRTIMP intptr_t __cdecl execv(const char *, const char * const *); +_CRTIMP intptr_t __cdecl execve(const char *, const char * const *, const char * const *); +_CRTIMP intptr_t __cdecl execvp(const char *, const char * const *); +_CRTIMP intptr_t __cdecl execvpe(const char *, const char * const *, const char * const *); +_CRTIMP intptr_t __cdecl spawnl(int, const char *, const char *, ...); +_CRTIMP intptr_t __cdecl spawnle(int, const char *, const char *, ...); +_CRTIMP intptr_t __cdecl spawnlp(int, const char *, const char *, ...); +_CRTIMP intptr_t __cdecl spawnlpe(int, const char *, const char *, ...); +_CRTIMP intptr_t __cdecl spawnv(int, const char *, const char * const *); +_CRTIMP intptr_t __cdecl spawnve(int, const char *, const char * const *, + const char * const *); +_CRTIMP intptr_t __cdecl spawnvp(int, const char *, const char * const *); +_CRTIMP intptr_t __cdecl spawnvpe(int, const char *, const char * const *, + const char * const *); + +_CRTIMP int __cdecl getpid(void); + +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#endif /* _POSIX_ */ + +#endif /* _INC_PROCESS */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/queue b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/queue new file mode 100644 index 00000000..4dffb07b --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/queue @@ -0,0 +1,239 @@ +// queue standard header +#pragma once +#ifndef _QUEUE_ +#define _QUEUE_ +#include +#include +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // TEMPLATE CLASS queue +template > + class queue + { // FIFO queue implemented with a container +public: + typedef _Container container_type; + typedef typename _Container::value_type value_type; + typedef typename _Container::size_type size_type; + + queue() + : c() + { // construct with empty container + } + + explicit queue(const _Container& _Cont) + : c(_Cont) + { // construct by copying specified container + } + + bool empty() const + { // test if queue is empty + return (c.empty()); + } + + size_type size() const + { // return length of queue + return (c.size()); + } + + value_type& front() + { // return first element of mutable queue + return (c.front()); + } + + const value_type& front() const + { // return first element of nonmutable queue + return (c.front()); + } + + value_type& back() + { // return last element of mutable queue + return (c.back()); + } + + const value_type& back() const + { // return last element of nonmutable queue + return (c.back()); + } + + void push(const value_type& _Val) + { // insert element at beginning + c.push_back(_Val); + } + + void pop() + { // erase element at end + c.pop_front(); + } + +//protected: + _Container c; // the underlying container + }; + + // queue TEMPLATE FUNCTIONS +template inline + bool operator==(const queue<_Ty, _Container>& _Left, + const queue<_Ty, _Container>& _Right) + { // test for queue equality + return (_Left.c == _Right.c); + } + +template inline + bool operator!=(const queue<_Ty, _Container>& _Left, + const queue<_Ty, _Container>& _Right) + { // test for queue inequality + return (!(_Left == _Right)); + } + +template inline + bool operator<(const queue<_Ty, _Container>& _Left, + const queue<_Ty, _Container>& _Right) + { // test if _Left < _Right for queues + return (_Left.c < _Right.c); + } + +template inline + bool operator>(const queue<_Ty, _Container>& _Left, + const queue<_Ty, _Container>& _Right) + { // test if _Left > _Right for queues + return (_Right < _Left); + } + +template inline + bool operator<=(const queue<_Ty, _Container>& _Left, + const queue<_Ty, _Container>& _Right) + { // test if _Left <= _Right for queues + return (!(_Right < _Left)); + } + +template inline + bool operator>=(const queue<_Ty, _Container>& _Left, + const queue<_Ty, _Container>& _Right) + { // test if _Left >= _Right for queues + return (!(_Left < _Right)); + } + + // TEMPLATE CLASS priority_queue +template, + class _Pr = less > + class priority_queue + { // priority queue implemented with a _Container +public: + typedef _Container container_type; + typedef typename _Container::value_type value_type; + typedef typename _Container::size_type size_type; + + priority_queue() + : c(), comp() + { // construct with empty container, default comparator + } + + explicit priority_queue(const _Pr& _Pred) + : c(), comp(_Pred) + { // construct with empty container, specified comparator + } + + priority_queue(const _Pr& _Pred, const _Container& _Cont) + : c(_Cont), comp(_Pred) + { // construct by copying specified container, comparator + make_heap(c.begin(), c.end(), comp); + } + + template + priority_queue(_Iter _First, _Iter _Last) + : c(_First, _Last), comp() + { // construct by copying [_First, _Last), default comparator + make_heap(c.begin(), c.end(), comp); + } + + template + priority_queue(_Iter _First, _Iter _Last, const _Pr& _Pred) + : c(_First, _Last), comp(_Pred) + { // construct by copying [_First, _Last), specified comparator + make_heap(c.begin(), c.end(), comp); + } + + template + priority_queue(_Iter _First, _Iter _Last, const _Pr& _Pred, + const _Container& _Cont) + : c(_Cont), comp(_Pred) + { // construct by copying [_First, _Last), container, and comparator + c.insert(c.end(), _First, _Last); + make_heap(c.begin(), c.end(), comp); + } + + bool empty() const + { // test if queue is empty + return (c.empty()); + } + + size_type size() const + { // return length of queue + return (c.size()); + } + + const value_type& top() const + { // return highest-priority element + return (c.front()); + } + + value_type& top() + { // return mutable highest-priority element (retained) + return (c.front()); + } + + void push(const value_type& _Pred) + { // insert value in priority order + c.push_back(_Pred); + push_heap(c.begin(), c.end(), comp); + } + + void pop() + { // erase highest-priority element + pop_heap(c.begin(), c.end(), comp); + c.pop_back(); + } + +protected: + _Container c; // the underlying container + _Pr comp; // the comparator functor + }; +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _QUEUE_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + */ + +/* + * This file is derived from software bearing the following + * restrictions: + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this + * software and its documentation for any purpose is hereby + * granted without fee, provided that the above copyright notice + * appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation. + * Hewlett-Packard Company makes no representations about the + * suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/rtcapi.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/rtcapi.h new file mode 100644 index 00000000..ab719f5a --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/rtcapi.h @@ -0,0 +1,103 @@ +/*** +*rtcapi.h - declarations and definitions for RTC use +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* Contains the declarations and definitions for all RunTime Check +* support. +* +****/ + +#ifndef _INC_RTCAPI +#define _INC_RTCAPI + + +#ifdef __cplusplus + +extern "C" { + +#endif + + /* General User API */ + +typedef enum _RTC_ErrorNumber { + _RTC_CHKSTK = 0, + _RTC_CVRT_LOSS_INFO, + _RTC_CORRUPT_STACK, + _RTC_UNINIT_LOCAL_USE, + _RTC_ILLEGAL +} _RTC_ErrorNumber; + +# define _RTC_ERRTYPE_IGNORE -1 +# define _RTC_ERRTYPE_ASK -2 + + typedef int (__cdecl *_RTC_error_fn)(int, const char *, int, const char *, const char *, ...); + + /* User API */ + int __cdecl _RTC_NumErrors(void); + const char * __cdecl _RTC_GetErrDesc(_RTC_ErrorNumber errnum); + int __cdecl _RTC_SetErrorType(_RTC_ErrorNumber errnum, int ErrType); + _RTC_error_fn __cdecl _RTC_SetErrorFunc(_RTC_error_fn); + + /* Power User/library API */ + + + /* Init functions */ + + /* These functions all call _CRT_RTC_INIT */ + void __cdecl _RTC_Initialize(void); + void __cdecl _RTC_Terminate(void); + + /* + * If you're not using the CRT, you have to implement _CRT_RTC_INIT + * Just return either null, or your error reporting function + * *** Don't mess with res0/res1/res2/res3/res4 - YOU'VE BEEN WARNED! *** + */ + _RTC_error_fn _CRT_RTC_INIT(void *res0, void **res1, int res2, int res3, int res4); + + /* Compiler generated calls (unlikely to be used, even by power users) */ + /* Types */ + typedef struct _RTC_vardesc { + int addr; + int size; + char *name; + } _RTC_vardesc; + + typedef struct _RTC_framedesc { + int varCount; + _RTC_vardesc *variables; + } _RTC_framedesc; + + /* Shortening convert checks - name indicates src bytes to target bytes */ + /* Signedness is NOT checked */ + char __fastcall _RTC_Check_2_to_1(short src); + char __fastcall _RTC_Check_4_to_1(int src); + char __fastcall _RTC_Check_8_to_1(__int64 src); + short __fastcall _RTC_Check_4_to_2(int src); + short __fastcall _RTC_Check_8_to_2(__int64 src); + int __fastcall _RTC_Check_8_to_4(__int64 src); + + + /* Stack Checking Calls */ + void __cdecl _RTC_CheckEsp(); + void __fastcall _RTC_CheckStackVars(void *esp, _RTC_framedesc *fd); + + /* Unintialized Local call */ + void __cdecl _RTC_UninitUse(const char *varname); + + + /* Subsystem initialization stuff */ + void __cdecl _RTC_Shutdown(void); + void __cdecl _RTC_InitBase(void); + + +#ifdef __cplusplus + + void* _ReturnAddress(); +} + +#endif + + +#endif /* _INC_RTCAPI */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/search.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/search.h new file mode 100644 index 00000000..e8e4e544 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/search.h @@ -0,0 +1,92 @@ +/*** +*search.h - declarations for searcing/sorting routines +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the declarations for the sorting and +* searching routines. +* [System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_SEARCH +#define _INC_SEARCH + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + + +#ifndef _SIZE_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 size_t; +#else +typedef _W64 unsigned int size_t; +#endif +#define _SIZE_T_DEFINED +#endif + + +/* Function prototypes */ + +_CRTIMP void * __cdecl bsearch(const void *, const void *, size_t, size_t, + int (__cdecl *)(const void *, const void *)); +_CRTIMP void * __cdecl _lfind(const void *, const void *, unsigned int *, unsigned int, + int (__cdecl *)(const void *, const void *)); +_CRTIMP void * __cdecl _lsearch(const void *, void *, unsigned int *, unsigned int, + int (__cdecl *)(const void *, const void *)); +_CRTIMP void __cdecl qsort(void *, size_t, size_t, int (__cdecl *)(const void *, + const void *)); + + +#if !__STDC__ +/* Non-ANSI names for compatibility */ +_CRTIMP void * __cdecl lfind(const void *, const void *, unsigned int *, unsigned int, + int (__cdecl *)(const void *, const void *)); +_CRTIMP void * __cdecl lsearch(const void *, void *, unsigned int *, unsigned int, + int (__cdecl *)(const void *, const void *)); +#endif /* __STDC__ */ + + +#ifdef __cplusplus +} +#endif + +#endif /* _INC_SEARCH */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/set b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/set new file mode 100644 index 00000000..43843e4b --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/set @@ -0,0 +1,233 @@ +// set standard header +#pragma once +#ifndef _SET_ +#define _SET_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // TEMPLATE CLASS _Tset_traits +template // true if multiple equivalent keys are permitted + class _Tset_traits + { // traits required to make _Tree behave like a set +public: + typedef _Kty key_type; + typedef _Kty value_type; + typedef _Pr key_compare; + typedef typename _Alloc::template rebind::other + allocator_type; + typedef _POINTER_X(value_type, allocator_type) _ITptr; + typedef _REFERENCE_X(value_type, allocator_type) _IReft; + + enum + { // make multi parameter visible as an enumeration constant + _Multi = _Mfl}; + + _Tset_traits() + : comp() + { // construct with default comparator + } + + _Tset_traits(_Pr _Parg) + : comp(_Parg) + { // construct with specified comparator + } + + typedef key_compare value_compare; + + static const _Kty& _Kfn(const value_type& _Val) + { // extract key from element value + return (_Val); + } + + _Pr comp; // the comparator predicate for keys + }; + + // TEMPLATE CLASS set +template, + class _Alloc = allocator<_Kty> > + class set + : public _Tree<_Tset_traits<_Kty, _Pr, _Alloc, false> > + { // ordered red-black tree of key values, unique keys +public: + typedef set<_Kty, _Pr, _Alloc> _Myt; + typedef _Tree<_Tset_traits<_Kty, _Pr, _Alloc, false> > _Mybase; + typedef _Kty key_type; + typedef _Pr key_compare; + typedef typename _Mybase::value_compare value_compare; + typedef typename _Mybase::allocator_type allocator_type; + typedef typename _Mybase::size_type size_type; + typedef typename _Mybase::difference_type difference_type; + typedef typename _Mybase::pointer pointer; + typedef typename _Mybase::const_pointer const_pointer; + typedef typename _Mybase::reference reference; + typedef typename _Mybase::const_reference const_reference; + typedef typename _Mybase::iterator iterator; + typedef typename _Mybase::const_iterator const_iterator; + typedef typename _Mybase::reverse_iterator reverse_iterator; + typedef typename _Mybase::const_reverse_iterator + const_reverse_iterator; + typedef typename _Mybase::value_type value_type; + + set() + : _Mybase(key_compare(), allocator_type()) + { // construct empty set from defaults + } + + explicit set(const key_compare& _Pred) + : _Mybase(_Pred, allocator_type()) + { // construct empty set from comparator + } + + set(const key_compare& _Pred, const allocator_type& _Al) + : _Mybase(_Pred, _Al) + { // construct empty set from comparator and allocator + } + + template + set(_Iter _First, _Iter _Last) + : _Mybase(key_compare(), allocator_type()) + { // construct set from [_First, _Last), defaults + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + set(_Iter _First, _Iter _Last, + const key_compare& _Pred) + : _Mybase(_Pred, allocator_type()) + { // construct set from [_First, _Last), comparator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + set(_Iter _First, _Iter _Last, + const key_compare& _Pred, const allocator_type& _Al) + : _Mybase(_Pred, _Al) + { // construct set from [_First, _Last), defaults, and allocator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + }; + +template inline + void swap(set<_Kty, _Pr, _Alloc>& _Left, + set<_Kty, _Pr, _Alloc>& _Right) + { // swap _Left and _Right sets + _Left.swap(_Right); + } + + // TEMPLATE CLASS multiset +template, + class _Alloc = allocator<_Kty> > + class multiset + : public _Tree<_Tset_traits<_Kty, _Pr, _Alloc, true> > + { // ordered red-black tree of key values, non-unique keys +public: + typedef multiset<_Kty, _Pr, _Alloc> _Myt; + typedef _Tree<_Tset_traits<_Kty, _Pr, _Alloc, true> > _Mybase; + typedef _Kty key_type; + typedef _Pr key_compare; + typedef typename _Mybase::value_compare value_compare; + typedef typename _Mybase::allocator_type allocator_type; + typedef typename _Mybase::size_type size_type; + typedef typename _Mybase::difference_type difference_type; + typedef typename _Mybase::pointer pointer; + typedef typename _Mybase::const_pointer const_pointer; + typedef typename _Mybase::reference reference; + typedef typename _Mybase::const_reference const_reference; + typedef typename _Mybase::iterator iterator; + typedef typename _Mybase::const_iterator const_iterator; + typedef typename _Mybase::reverse_iterator reverse_iterator; + typedef typename _Mybase::const_reverse_iterator + const_reverse_iterator; + typedef typename _Mybase::value_type value_type; + + multiset() + : _Mybase(key_compare(), allocator_type()) + { // construct empty set from defaults + } + + explicit multiset(const key_compare& _Pred) + : _Mybase(_Pred, allocator_type()) + { // construct empty set from comparator + } + + multiset(const key_compare& _Pred, const allocator_type& _Al) + : _Mybase(_Pred, _Al) + { // construct empty set from comparator and allocator + } + + template + multiset(_Iter _First, _Iter _Last) + : _Mybase(key_compare(), allocator_type()) + { // construct set from [_First, _Last) + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + multiset(_Iter _First, _Iter _Last, + const key_compare& _Pred) + : _Mybase(_Pred, allocator_type()) + { // construct set from [_First, _Last), comparator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + template + multiset(_Iter _First, _Iter _Last, + const key_compare& _Pred, const allocator_type& _Al) + : _Mybase(_Pred, _Al) + { // construct set from [_First, _Last), comparator, and allocator + for (; _First != _Last; ++_First) + this->insert(*_First); + } + + iterator insert(const value_type& _Val) + { // insert a key value + return (_Mybase::insert(_Val).first); + } + + iterator insert(iterator _Where, const value_type& _Val) + { // insert a key value, with hint + return (_Mybase::insert(_Where, _Val)); + } + + template + void insert(_Iter _First, _Iter _Last) + { // insert [_First, _Last) + for (; _First != _Last; ++_First) + this->insert(*_First); + } + }; + +template inline + void swap(multiset<_Kty, _Pr, _Alloc>& _Left, + multiset<_Kty, _Pr, _Alloc>& _Right) + { // swap _Left and _Right multisets + _Left.swap(_Right); + } + +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _SET_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/setjmp.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/setjmp.h new file mode 100644 index 00000000..818c1a52 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/setjmp.h @@ -0,0 +1,413 @@ +/*** +*setjmp.h - definitions/declarations for setjmp/longjmp routines +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the machine-dependent buffer used by +* setjmp/longjmp to save and restore the program state, and +* declarations for those routines. +* [ANSI/System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_SETJMP +#define _INC_SETJMP + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +/* + * Currently, all MS C compilers for Win32 platforms default to 8 byte + * alignment. + */ +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + + +/* + * Definitions specific to particular setjmp implementations. + */ + +#if defined(_M_IX86) + +/* + * MS compiler for x86 + */ + +#ifndef _INC_SETJMPEX +#define setjmp _setjmp +#endif + +#define _JBLEN 16 +#define _JBTYPE int + +/* + * Define jump buffer layout for x86 setjmp/longjmp. + */ +typedef struct __JUMP_BUFFER { + unsigned long Ebp; + unsigned long Ebx; + unsigned long Edi; + unsigned long Esi; + unsigned long Esp; + unsigned long Eip; + unsigned long Registration; + unsigned long TryLevel; + unsigned long Cookie; + unsigned long UnwindFunc; + unsigned long UnwindData[6]; +} _JUMP_BUFFER; + + + +#elif defined(_M_MRX000) + +#ifndef _INC_SETJMPEX +#if _MSC_VER >= 1100 +#define _setjmp _setjmpVfp +#endif +#define setjmp _setjmp +#endif + +/* + * All MIPS implementations need _JBLEN of 16 + */ + +#define _JBLEN 16 +#define _JBTYPE double + +/* + * Define jump buffer layout for MIPS setjmp/longjmp. + */ +typedef struct __JUMP_BUFFER { + unsigned long FltF20; + unsigned long FltF21; + unsigned long FltF22; + unsigned long FltF23; + unsigned long FltF24; + unsigned long FltF25; + unsigned long FltF26; + unsigned long FltF27; + unsigned long FltF28; + unsigned long FltF29; + unsigned long FltF30; + unsigned long FltF31; + unsigned long IntS0; + unsigned long IntS1; + unsigned long IntS2; + unsigned long IntS3; + unsigned long IntS4; + unsigned long IntS5; + unsigned long IntS6; + unsigned long IntS7; + unsigned long IntS8; + unsigned long IntSp; + unsigned long Type; + unsigned long Fir; +} _JUMP_BUFFER; + + +#elif defined(_M_ALPHA) + +/* + * The Alpha C8/GEM C compiler uses an intrinsic _setjmp. + * The Alpha acc compiler implements setjmp as a function. + */ +#ifdef _MSC_VER +#ifndef _INC_SETJMPEX +#define setjmp _setjmpex /* Alpha should always use setjmp as _setjmpex */ +#endif +#endif + +/* + * Alpha implementations use a _JBLEN of 24 quadwords. + * A double is used only to obtain quadword size and alignment. + */ +#define _JBLEN 24 +#define _JBTYPE double + +/* + * Define jump buffer layout for Alpha setjmp/longjmp. + * A double is used only to obtain quadword size and alignment. + */ +typedef struct __JUMP_BUFFER { +#ifdef _M_ALPHA64 +#define _JBFILL 3 + unsigned __int64 Fp; + unsigned __int64 Pc; + unsigned __int64 Seb; + unsigned long Type; + unsigned long Type_Fill; +#else +#define _JBFILL 5 + unsigned long Fp; + unsigned long Pc; + unsigned long Seb; + unsigned long Type; +#endif + double FltF2; + double FltF3; + double FltF4; + double FltF5; + double FltF6; + double FltF7; + double FltF8; + double FltF9; + double IntS0; + double IntS1; + double IntS2; + double IntS3; + double IntS4; + double IntS5; + double IntS6; + double IntSp; + double Fir; + double Fill[_JBFILL]; +} _JUMP_BUFFER; +#undef _JBFILL + +#elif defined(_M_PPC) +/* + * The Microsoft VC++ V4.0 compiler uses an intrinsic _setjmp. + * The Motorola C8.5 compiler implements setjmp as a function. + */ + +#if _MSC_VER > 850 +#ifndef _INC_SETJMPEX +#undef _setjmp +#define setjmp _setjmp +#endif +#endif + +/* + * Min length is 240 bytes; round to 256 bytes. + * Since this is allocated as an array of "double", the + * number of entries required is 32. + * + * All PPC implementations need _JBLEN of 32 + */ + +#define _JBLEN 32 +#define _JBTYPE double + +/* + * Define jump buffer layout for PowerPC setjmp/longjmp. + */ + +typedef struct __JUMP_BUFFER { + double Fpr14; + double Fpr15; + double Fpr16; + double Fpr17; + double Fpr18; + double Fpr19; + double Fpr20; + double Fpr21; + double Fpr22; + double Fpr23; + double Fpr24; + double Fpr25; + double Fpr26; + double Fpr27; + double Fpr28; + double Fpr29; + double Fpr30; + double Fpr31; + unsigned long Gpr1; + unsigned long Gpr2; + unsigned long Gpr13; + unsigned long Gpr14; + unsigned long Gpr15; + unsigned long Gpr16; + unsigned long Gpr17; + unsigned long Gpr18; + unsigned long Gpr19; + unsigned long Gpr20; + unsigned long Gpr21; + unsigned long Gpr22; + unsigned long Gpr23; + unsigned long Gpr24; + unsigned long Gpr25; + unsigned long Gpr26; + unsigned long Gpr27; + unsigned long Gpr28; + unsigned long Gpr29; + unsigned long Gpr30; + unsigned long Gpr31; + unsigned long Cr; + unsigned long Iar; + unsigned long Type; +} _JUMP_BUFFER; + +#elif defined(_M_IA64) + +/* + * Minimum length is 528 bytes + * Since this is allocated as an array of "SETJMP_FLOAT128", the + * number of entries required is 33 (16-byte aligned). + */ + +/* Avoid conflicts with winnt.h FLOAT128 by giving the typedef another name. */ +typedef __declspec(align(16)) struct _SETJMP_FLOAT128 { + __int64 LowPart; + __int64 HighPart; +} SETJMP_FLOAT128; + +#define _JBLEN 33 +typedef SETJMP_FLOAT128 _JBTYPE; +#ifndef _INC_SETJMPEX +#define setjmp _setjmp +#endif +/* + * Define jump buffer layout for IA64 setjmp/longjmp. + */ + +typedef struct __JUMP_BUFFER { + + unsigned long iAReserved[6]; + + /* + * x86 C9.0 compatibility + */ + + unsigned long Registration; /* point to the UnwindData field. */ + unsigned long TryLevel; /* ignored by setjmp */ + unsigned long Cookie; /* set to "VC20" by setjmp */ + unsigned long UnwindFunc; /* set to EM longjmp() by setjmp */ + + /* + * First dword is zero to indicate it's an exception registration + * record prepared by EM setjmp function. + * Second dword is set to 0 for unsafe EM setjmp, and 1 for safe + * EM setjmp. + * Third dword is set to the setjmp site memory stack frame pointer. + * Fourth dword is set to the setjmp site backing store frame pointer. + */ + + unsigned long UnwindData[6]; + + /* + * floating point status register, + * and preserved floating point registers fs0 - fs19 + */ + + SETJMP_FLOAT128 FltS0; + SETJMP_FLOAT128 FltS1; + SETJMP_FLOAT128 FltS2; + SETJMP_FLOAT128 FltS3; + SETJMP_FLOAT128 FltS4; + SETJMP_FLOAT128 FltS5; + SETJMP_FLOAT128 FltS6; + SETJMP_FLOAT128 FltS7; + SETJMP_FLOAT128 FltS8; + SETJMP_FLOAT128 FltS9; + SETJMP_FLOAT128 FltS10; + SETJMP_FLOAT128 FltS11; + SETJMP_FLOAT128 FltS12; + SETJMP_FLOAT128 FltS13; + SETJMP_FLOAT128 FltS14; + SETJMP_FLOAT128 FltS15; + SETJMP_FLOAT128 FltS16; + SETJMP_FLOAT128 FltS17; + SETJMP_FLOAT128 FltS18; + SETJMP_FLOAT128 FltS19; + + __int64 FPSR; + + /* + * return link and preserved branch registers bs0 - bs4 + */ + + __int64 StIIP; /* continuation address */ + __int64 BrS0; + __int64 BrS1; + __int64 BrS2; + __int64 BrS3; + __int64 BrS4; + + /* + * preserved general registers s0 - s3, sp, nats + */ + + __int64 IntS0; + __int64 IntS1; + __int64 IntS2; + __int64 IntS3; + + /* + * bsp, pfs, unat, lc + */ + + __int64 RsBSP; + __int64 RsPFS; /* previous frame marker (cfm of setjmp's caller) */ + __int64 ApUNAT; /* User Nat collection register (preserved) */ + __int64 ApLC; /* loop counter */ + + __int64 IntSp; /* memory stack pointer */ + __int64 IntNats; /* Nat bits of preserved integer regs s0 - s3 */ + __int64 Preds; /* predicates */ + +} _JUMP_BUFFER; + +#endif + + +/* Define the buffer type for holding the state information */ + +#ifndef _JMP_BUF_DEFINED +typedef _JBTYPE jmp_buf[_JBLEN]; +#define _JMP_BUF_DEFINED +#endif + + +/* Function prototypes */ + +int __cdecl setjmp(jmp_buf); + +#if _MSC_VER >= 1200 +_CRTIMP __declspec(noreturn) void __cdecl longjmp(jmp_buf, int); +#else +_CRTIMP void __cdecl longjmp(jmp_buf, int); +#endif + +#ifdef __cplusplus +} +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_SETJMP */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/setjmpex.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/setjmpex.h new file mode 100644 index 00000000..a9076b0e --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/setjmpex.h @@ -0,0 +1,58 @@ +/*** +*setjmpex.h - definitions/declarations for extended setjmp/longjmp routines +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file causes _setjmpex to be called which will enable safe +* setjmp/longjmp that work correctly with try/except/finally. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_SETJMPEX +#define _INC_SETJMPEX + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +/* + * Definitions specific to particular setjmp implementations. + */ + +#if defined(_M_IX86) + +/* + * MS compiler for x86 + */ + +#define setjmp _setjmp +#define longjmp _longjmpex + +#elif defined(_M_MRX000) + +#if _MSC_VER >= 1100 +#define _setjmpex _setjmpexVfp +#endif + +#define setjmp _setjmpex + +#else + +#ifdef setjmp +#undef setjmp +#endif +#define setjmp _setjmpex + +#endif + +#include + +#endif /* _INC_SETJMPEX */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/share.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/share.h new file mode 100644 index 00000000..0bfa5f19 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/share.h @@ -0,0 +1,38 @@ +/*** +*share.h - defines file sharing modes for sopen +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the file sharing modes for sopen(). +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_SHARE +#define _INC_SHARE + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#define _SH_DENYRW 0x10 /* deny read/write mode */ +#define _SH_DENYWR 0x20 /* deny write mode */ +#define _SH_DENYRD 0x30 /* deny read mode */ +#define _SH_DENYNO 0x40 /* deny none mode */ + +#if !__STDC__ +/* Non-ANSI names for compatibility */ +#define SH_DENYRW _SH_DENYRW +#define SH_DENYWR _SH_DENYWR +#define SH_DENYRD _SH_DENYRD +#define SH_DENYNO _SH_DENYNO +#endif + +#endif /* _INC_SHARE */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/signal.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/signal.h new file mode 100644 index 00000000..f8756ee9 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/signal.h @@ -0,0 +1,100 @@ +/*** +*signal.h - defines signal values and routines +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the signal values and declares the signal functions. +* [ANSI/System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_SIGNAL +#define _INC_SIGNAL + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + +#ifndef _SIG_ATOMIC_T_DEFINED +typedef int sig_atomic_t; +#define _SIG_ATOMIC_T_DEFINED +#endif + +#define NSIG 23 /* maximum signal number + 1 */ + + +/* Signal types */ + +#define SIGINT 2 /* interrupt */ +#define SIGILL 4 /* illegal instruction - invalid function image */ +#define SIGFPE 8 /* floating point exception */ +#define SIGSEGV 11 /* segment violation */ +#define SIGTERM 15 /* Software termination signal from kill */ +#define SIGBREAK 21 /* Ctrl-Break sequence */ +#define SIGABRT 22 /* abnormal termination triggered by abort call */ + + +/* signal action codes */ + +#define SIG_DFL (void (__cdecl *)(int))0 /* default signal action */ +#define SIG_IGN (void (__cdecl *)(int))1 /* ignore signal */ +#define SIG_SGE (void (__cdecl *)(int))3 /* signal gets error */ +#define SIG_ACK (void (__cdecl *)(int))4 /* acknowledge */ + + +/* signal error value (returned by signal call on error) */ + +#define SIG_ERR (void (__cdecl *)(int))-1 /* signal error value */ + + +/* pointer to exception information pointers structure */ + +#if defined(_MT) || defined(_DLL) +extern void * * __cdecl __pxcptinfoptrs(void); +#define _pxcptinfoptrs (*__pxcptinfoptrs()) +#else /* ndef _MT && ndef _DLL */ +extern void * _pxcptinfoptrs; +#endif /* _MT || _DLL */ + + +/* Function prototypes */ + +_CRTIMP void (__cdecl * __cdecl signal(int, void (__cdecl *)(int)))(int); +_CRTIMP int __cdecl raise(int); + + +#ifdef __cplusplus +} +#endif + +#endif /* _INC_SIGNAL */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sstream b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sstream new file mode 100644 index 00000000..953265f4 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sstream @@ -0,0 +1,525 @@ +// sstream standard header +#pragma once +#ifndef _SSTREAM_ +#define _SSTREAM_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + #pragma warning(disable:4251) + + // TEMPLATE CLASS basic_stringbuf +template + class basic_stringbuf + : public basic_streambuf<_Elem, _Traits> + { // stream buffer maintaining an allocated character array +public: + typedef _Alloc allocator_type; + typedef basic_streambuf<_Elem, _Traits> _Mysb; + typedef basic_string<_Elem, _Traits, _Alloc> _Mystr; + + explicit basic_stringbuf(ios_base::openmode _Mode = + ios_base::in | ios_base::out) + { // construct empty character buffer from mode + _Init(0, 0, _Getstate(_Mode)); + } + + explicit basic_stringbuf(const _Mystr& _Str, + ios_base::openmode _Mode = ios_base::in | ios_base::out) + { // construct character buffer from string, mode + _Init(_Str.c_str(), _Str.size(), _Getstate(_Mode)); + } + + virtual ~basic_stringbuf() + { // destroy the object + _Tidy(); + } + + enum + { // constants for bits in stream state + _Allocated = 1, // set if character array storage has been allocated + _Constant = 2, // set if character array nonmutable + _Noread = 4, // set if character array cannot be read + _Append = 8}; // set if all writes are appends + typedef int _Strstate; + + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + + _Mystr str() const + { // return string copy of character array + if (!(_Mystate & _Constant) && _Mysb::pptr() != 0) + { // writable, make string from write buffer + _Mystr _Str(_Mysb::pbase(), (_Seekhigh < _Mysb::pptr() + ? _Mysb::pptr() : _Seekhigh) - _Mysb::pbase()); + return (_Str); + } + else if (!(_Mystate & _Noread) && _Mysb::gptr() != 0) + { // readable, make string from read buffer + _Mystr _Str(_Mysb::eback(), _Mysb::egptr() - _Mysb::eback()); + return (_Str); + } + else + { // inaccessible, return empty string + _Mystr _Nul; + return (_Nul); + } + } + + void str(const _Mystr& _Newstr) + { // replace character array from string + _Tidy(); + _Init(_Newstr.c_str(), _Newstr.size(), _Mystate); + } + +protected: + virtual int_type overflow(int_type _Meta = _Traits::eof()) + { // put an element to stream + if (_Mystate & _Append + && _Mysb::pptr() != 0 && _Mysb::pptr() < _Seekhigh) + _Mysb::setp(_Mysb::pbase(), _Seekhigh, _Mysb::epptr()); + + if (_Traits::eq_int_type(_Traits::eof(), _Meta)) + return (_Traits::not_eof(_Meta)); // EOF, return success code + else if (_Mysb::pptr() != 0 + && _Mysb::pptr() < _Mysb::epptr()) + { // room in buffer, store it + *_Mysb::_Pninc() = _Traits::to_char_type(_Meta); + return (_Meta); + } + else if (_Mystate & _Constant) + return (_Traits::eof()); // array nonmutable, fail + else + { // grow buffer and store element + size_t _Oldsize = _Mysb::pptr() == 0 + ? 0 : _Mysb::epptr() - _Mysb::eback(); + size_t _Newsize = _Oldsize; + size_t _Inc = _Newsize / 2 < _MINSIZE + ? _MINSIZE : _Newsize / 2; // grow by 50 per cent + _Elem *_Ptr = 0; + + while (0 < _Inc && INT_MAX - _Inc < _Newsize) + _Inc /= 2; // increment causes overflow, halve it + if (0 < _Inc) + { // finite increment, allocate new character array + _Newsize += _Inc; + _Ptr = _Al.allocate(_Newsize); + } + + if (0 < _Oldsize) + _Traits::copy(_Ptr, _Mysb::eback(), _Oldsize); + if (_Mystate & _Allocated) + _Al.deallocate(_Mysb::eback(), _Oldsize); + _Mystate |= _Allocated; + + if (_Oldsize == 0) + { // first growth, set up pointers + _Seekhigh = _Ptr; + _Mysb::setp(_Ptr, _Ptr + _Newsize); + if (_Mystate & _Noread) + _Mysb::setg(_Ptr, 0, _Ptr); + else + _Mysb::setg(_Ptr, _Ptr, _Ptr + 1); + } + else + { // not first growth, adjust pointers + _Seekhigh = _Seekhigh - _Mysb::eback() + _Ptr; + _Mysb::setp(_Mysb::pbase() - _Mysb::eback() + _Ptr, + _Mysb::pptr() - _Mysb::eback() + _Ptr, _Ptr + _Newsize); + if (_Mystate & _Noread) + _Mysb::setg(_Ptr, 0, _Ptr); + else + _Mysb::setg(_Ptr, + _Mysb::gptr() - _Mysb::eback() + _Ptr, + _Mysb::pptr() + 1); + } + + *_Mysb::_Pninc() = _Traits::to_char_type(_Meta); + return (_Meta); + } + } + + virtual int_type pbackfail(int_type _Meta = _Traits::eof()) + { // put an element back to stream + if (_Mysb::gptr() == 0 + || _Mysb::gptr() <= _Mysb::eback() + || !_Traits::eq_int_type(_Traits::eof(), _Meta) + && !_Traits::eq(_Traits::to_char_type(_Meta), _Mysb::gptr()[-1]) + && _Mystate & _Constant) + return (_Traits::eof()); // can't put back, fail + else + { // back up one position and store put-back character + _Mysb::gbump(-1); + if (!_Traits::eq_int_type(_Traits::eof(), _Meta)) + *_Mysb::gptr() = _Traits::to_char_type(_Meta); + return (_Traits::not_eof(_Meta)); + } + } + + virtual int_type underflow() + { // get an element from stream, but don't point past it + if (_Mysb::gptr() == 0) + return (_Traits::eof()); // no character buffer, fail + else if (_Mysb::gptr() < _Mysb::egptr()) + return (_Traits::to_int_type(*_Mysb::gptr())); // return buffered + else if (_Mystate & _Noread || _Mysb::pptr() == 0 + || _Mysb::pptr() <= _Mysb::gptr() && _Seekhigh <= _Mysb::gptr()) + return (_Traits::eof()); // can't read, fail + else + { // extend read buffer into written area, then return buffered + if (_Seekhigh < _Mysb::pptr()) + _Seekhigh = _Mysb::pptr(); + _Mysb::setg(_Mysb::eback(), _Mysb::gptr(), _Seekhigh); + return (_Traits::to_int_type(*_Mysb::gptr())); + } + } + + virtual pos_type seekoff(off_type _Off, + ios_base::seekdir _Way, + ios_base::openmode _Which = ios_base::in | ios_base::out) + { // change position by _Off, according to _Way, _Mode + if (_Mysb::pptr() != 0 && _Seekhigh < _Mysb::pptr()) + _Seekhigh = _Mysb::pptr(); // update high-water pointer + + if (_Which & ios_base::in && _Mysb::gptr() != 0) + { // position within read buffer + if (_Way == ios_base::end) + _Off += (off_type)(_Seekhigh - _Mysb::eback()); + else if (_Way == ios_base::cur + && (_Which & ios_base::out) == 0) + _Off += (off_type)(_Mysb::gptr() - _Mysb::eback()); + else if (_Way != ios_base::beg) + _Off = _BADOFF; + + if (0 <= _Off && _Off <= _Seekhigh - _Mysb::eback()) + { // change read position + _Mysb::gbump((int)(_Mysb::eback() - _Mysb::gptr() + _Off)); + if (_Which & ios_base::out && _Mysb::pptr() != 0) + _Mysb::setp(_Mysb::pbase(), _Mysb::gptr(), + _Mysb::epptr()); // change write position to match + } + else + _Off = _BADOFF; + } + else if (_Which & ios_base::out && _Mysb::pptr() != 0) + { // position within write buffer + if (_Way == ios_base::end) + _Off += (off_type)(_Seekhigh - _Mysb::eback()); + else if (_Way == ios_base::cur) + _Off += (off_type)(_Mysb::pptr() - _Mysb::eback()); + else if (_Way != ios_base::beg) + _Off = _BADOFF; + + if (0 <= _Off && _Off <= _Seekhigh - _Mysb::eback()) + _Mysb::pbump((int)(_Mysb::eback() + - _Mysb::pptr() + _Off)); // change write position + else + _Off = _BADOFF; + } + else + _Off = _BADOFF; // neither read nor write buffer selected, fail + return (pos_type(_Off)); + } + + virtual pos_type seekpos(pos_type _Ptr, + ios_base::openmode _Mode = ios_base::in | ios_base::out) + { // change position to _Pos, according to _Mode + streamoff _Off = (streamoff)_Ptr; + if (_Mysb::pptr() != 0 && _Seekhigh < _Mysb::pptr()) + _Seekhigh = _Mysb::pptr(); // update high-water pointer + + if (_Off == _BADOFF) + ; + else if (_Mode & ios_base::in && _Mysb::gptr() != 0) + { // position within read buffer + if (0 <= _Off && _Off <= _Seekhigh - _Mysb::eback()) + { // change read position + _Mysb::gbump((int)(_Mysb::eback() - _Mysb::gptr() + _Off)); + if (_Mode & ios_base::out && _Mysb::pptr() != 0) + _Mysb::setp(_Mysb::pbase(), _Mysb::gptr(), + _Mysb::epptr()); // change write position to match + } + else + _Off = _BADOFF; + } + else if (_Mode & ios_base::out && _Mysb::pptr() != 0) + { // position within write buffer + if (0 <= _Off && _Off <= _Seekhigh - _Mysb::eback()) + _Mysb::pbump((int)(_Mysb::eback() + - _Mysb::pptr() + _Off)); // change write position + else + _Off = _BADOFF; + } + else + _Off = _BADOFF; + return (streampos(_Off)); + } + + void _Init(const _Elem *_Ptr, + size_t _Count, _Strstate _State) + { // initialize buffer to [_Ptr, _Ptr + _Count), set state + _Seekhigh = 0; + _Mystate = _State; + + if (_Count != 0 + && (_Mystate & (_Noread | _Constant)) != (_Noread | _Constant)) + { // finite buffer that can be read or written, set it up + _Elem *_Pnew = _Al.allocate(_Count); + _Traits::copy(_Pnew, _Ptr, _Count); + _Seekhigh = _Pnew + _Count; + + if (!(_Mystate & _Noread)) + _Mysb::setg(_Pnew, _Pnew, + _Pnew + _Count); // setup read buffer + if (!(_Mystate & _Constant)) + { // setup write buffer, and maybe read buffer + _Mysb::setp(_Pnew, _Pnew + _Count); + if (_Mysb::gptr() == 0) + _Mysb::setg(_Pnew, 0, _Pnew); + } + _Mystate |= _Allocated; + } + } + + void _Tidy() + { // discard any allocated buffer and clear pointers + if (_Mystate & _Allocated) + _Al.deallocate(_Mysb::eback(), + (_Mysb::pptr() != 0 ? _Mysb::epptr() + : _Mysb::egptr()) - _Mysb::eback()); + _Mysb::setg(0, 0, 0); + _Mysb::setp(0, 0); + _Seekhigh = 0; + _Mystate &= ~_Allocated; + } + +private: + enum + { // constant for minimum buffer size + _MINSIZE = 32}; + + _Strstate _Getstate(ios_base::openmode _Mode) + { // convert open mode to stream state bits + _Strstate _State = (_Strstate)0; + if (!(_Mode & ios_base::in)) + _State |= _Noread; + if (!(_Mode & ios_base::out)) + _State |= _Constant; + if (_Mode & ios_base::app) + _State |= _Append; + return (_State); + } + + _Elem *_Seekhigh; // the high-water pointer in character array + _Strstate _Mystate; // the stream state + allocator_type _Al; // the allocator object + }; + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 basic_stringbuf, allocator >; +template class _CRTIMP2 basic_stringbuf, allocator >; + + + + #endif /* _DLL_CPPLIB */ + + // TEMPLATE CLASS basic_istringstream +template + class basic_istringstream + : public basic_istream<_Elem, _Traits> + { // input stream associated with a character array +public: + typedef _Alloc allocator_type; + typedef basic_stringbuf<_Elem, _Traits, _Alloc> _Mysb; + typedef basic_string<_Elem, _Traits, _Alloc> _Mystr; + + explicit basic_istringstream(ios_base::openmode _Mode = ios_base::in) + : basic_istream<_Elem, _Traits>(&_Stringbuffer), + _Stringbuffer(_Mode | ios_base::in) + { // construct empty readable character buffer + } + + explicit basic_istringstream(const _Mystr& _Str, + ios_base::openmode _Mode = ios_base::in) + : basic_istream<_Elem, _Traits>(&_Stringbuffer), + _Stringbuffer(_Str, _Mode | ios_base::in) + { // construct readable character buffer from NTCS + } + + virtual ~basic_istringstream() + { // destroy the object + } + + _Mysb *rdbuf() const + { // return pointer to file buffer + return ((_Mysb *)&_Stringbuffer); + } + + _Mystr str() const + { // return string copy of character array + return (_Stringbuffer.str()); + } + + void str(const _Mystr& _Newstr) + { // replace character array from string + _Stringbuffer.str(_Newstr); + } + +private: + _Mysb _Stringbuffer; // the string buffer + }; + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 basic_istringstream, allocator >; +template class _CRTIMP2 basic_istringstream, allocator >; + + + + #endif /* _DLL_CPPLIB */ + + // TEMPLATE CLASS basic_ostringstream +template + class basic_ostringstream + : public basic_ostream<_Elem, _Traits> + { // output stream associated with a character array +public: + typedef _Alloc allocator_type; + typedef basic_stringbuf<_Elem, _Traits, _Alloc> _Mysb; + typedef basic_string<_Elem, _Traits, _Alloc> _Mystr; + + explicit basic_ostringstream(ios_base::openmode _Mode = ios_base::out) + : basic_ostream<_Elem, _Traits>(&_Stringbuffer), + _Stringbuffer(_Mode | ios_base::out) + { // construct empty writable character buffer + } + + explicit basic_ostringstream(const _Mystr& _Str, + ios_base::openmode _Mode = ios_base::out) + : basic_ostream<_Elem, _Traits>(&_Stringbuffer), + _Stringbuffer(_Str, _Mode | ios_base::out) + { // construct writable character buffer from NTCS + } + + virtual ~basic_ostringstream() + { // destroy the object + } + + _Mysb *rdbuf() const + { // return pointer to buffer + return ((_Mysb *)&_Stringbuffer); + } + + _Mystr str() const + { // return string copy of character array + return (_Stringbuffer.str()); + } + + void str(const _Mystr& _Newstr) + { // replace character array from string + _Stringbuffer.str(_Newstr); + } + +private: + _Mysb _Stringbuffer; // the string buffer + }; + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 basic_ostringstream, allocator >; +template class _CRTIMP2 basic_ostringstream, allocator >; + + + + #endif /* _DLL_CPPLIB */ + + // TEMPLATE CLASS basic_stringstream +template + class basic_stringstream + : public basic_iostream<_Elem, _Traits> + { // input/output stream associated with a character array +public: + typedef _Elem char_type; + typedef _Traits traits_type; + typedef _Alloc allocator_type; + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + typedef basic_string<_Elem, _Traits, _Alloc> _Mystr; + + explicit basic_stringstream(ios_base::openmode _Mode = + ios_base::in | ios_base::out) + : basic_iostream<_Elem, _Traits>(&_Stringbuffer), + _Stringbuffer(_Mode) + { // construct empty character buffer + } + + explicit basic_stringstream(const _Mystr& _Str, + ios_base::openmode _Mode = ios_base::in | ios_base::out) + : basic_iostream<_Elem, _Traits>(&_Stringbuffer), + _Stringbuffer(_Str, _Mode) + { // construct character buffer from NTCS + } + + virtual ~basic_stringstream() + { // destroy the object + } + + basic_stringbuf<_Elem, _Traits, _Alloc> *rdbuf() const + { // return pointer to buffer + return ((basic_stringbuf<_Elem, _Traits, _Alloc> *)&_Stringbuffer); + } + + _Mystr str() const + { // return string copy of character array + return (_Stringbuffer.str()); + } + + void str(const _Mystr& _Newstr) + { // replace character array from string + _Stringbuffer.str(_Newstr); + } + +private: + basic_stringbuf<_Elem, _Traits, _Alloc> + _Stringbuffer; // the string buffer + }; + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 basic_stringstream, allocator >; +template class _CRTIMP2 basic_stringstream, allocator >; + + + + #endif /* _DLL_CPPLIB */ +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _SSTREAM_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stack b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stack new file mode 100644 index 00000000..af9d1936 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stack @@ -0,0 +1,139 @@ +// stack standard header +#pragma once +#ifndef _STACK_ +#define _STACK_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // TEMPLATE CLASS stack +template > + class stack + { // LIFO queue implemented with a container +public: + typedef _Container container_type; + typedef typename _Container::value_type value_type; + typedef typename _Container::size_type size_type; + + stack() + : c() + { // construct with empty container + } + + explicit stack(const _Container& _Cont) + : c(_Cont) + { // construct by copying specified container + } + + bool empty() const + { // test if stack is empty + return (c.empty()); + } + + size_type size() const + { // test length of stack + return (c.size()); + } + + value_type& top() + { // return last element of mutable stack + return (c.back()); + } + + const value_type& top() const + { // return last element of nonmutable stack + return (c.back()); + } + + void push(const value_type& _Val) + { // insert element at end + c.push_back(_Val); + } + + void pop() + { // erase last element + c.pop_back(); + } + +//protected: + _Container c; // the underlying container + }; + + // stack TEMPLATE FUNCTIONS +template inline + bool operator==(const stack<_Ty, _Container>& _Left, + const stack<_Ty, _Container>& _Right) + { // test for stack equality + return (_Left.c == _Right.c); + } + +template inline + bool operator!=(const stack<_Ty, _Container>& _Left, + const stack<_Ty, _Container>& _Right) + { // test for stack inequality + return (!(_Left == _Right)); + } + +template inline + bool operator<(const stack<_Ty, _Container>& _Left, + const stack<_Ty, _Container>& _Right) + { // test if _Left < _Right for stacks + return (_Left.c < _Right.c); + } + +template inline + bool operator>(const stack<_Ty, _Container>& _Left, + const stack<_Ty, _Container>& _Right) + { // test if _Left > _Right for stacks + return (_Right < _Left); + } + +template inline + bool operator<=(const stack<_Ty, _Container>& _Left, + const stack<_Ty, _Container>& _Right) + { // test if _Left <= _Right for stacks + return (!(_Right < _Left)); + } + +template inline + bool operator>=(const stack<_Ty, _Container>& _Left, + const stack<_Ty, _Container>& _Right) + { // test if _Left >= _Right for stacks + return (!(_Left < _Right)); + } +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _STACK_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + */ + +/* + * This file is derived from software bearing the following + * restrictions: + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this + * software and its documentation for any purpose is hereby + * granted without fee, provided that the above copyright notice + * appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation. + * Hewlett-Packard Company makes no representations about the + * suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stdarg.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stdarg.h new file mode 100644 index 00000000..b6015d3b --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stdarg.h @@ -0,0 +1,210 @@ +/*** +*stdarg.h - defines ANSI-style macros for variable argument functions +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines ANSI-style macros for accessing arguments +* of functions which take a variable number of arguments. +* [ANSI] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_STDARG +#define _INC_STDARG + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +/* + * Currently, all MS C compilers for Win32 platforms default to 8 byte + * alignment. + */ +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +#ifndef _UINTPTR_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 uintptr_t; +#else +typedef _W64 unsigned int uintptr_t; +#endif +#define _UINTPTR_T_DEFINED +#endif + +#ifndef _VA_LIST_DEFINED +#ifdef _M_ALPHA +typedef struct { + char *a0; /* pointer to first homed integer argument */ + int offset; /* byte offset of next parameter */ +} va_list; +#else +typedef char * va_list; +#endif +#define _VA_LIST_DEFINED +#endif + +#ifdef __cplusplus +#define _ADDRESSOF(v) ( &reinterpret_cast(v) ) +#else +#define _ADDRESSOF(v) ( &(v) ) +#endif + +#if defined(_M_IA64) +#define _VA_ALIGN 8 +#define _SLOTSIZEOF(t) ( (sizeof(t) + _VA_ALIGN - 1) & ~(_VA_ALIGN - 1) ) + +#define _VA_STRUCT_ALIGN 16 + +#define _ALIGNOF(ap) ((((ap)+_VA_STRUCT_ALIGN - 1) & ~(_VA_STRUCT_ALIGN -1)) \ + - (ap)) +#define _APALIGN(t,ap) (__alignof(t) > 8 ? _ALIGNOF((uintptr_t) ap) : 0) + +#else +#define _SLOTSIZEOF(t) (sizeof(t)) +#define _APALIGN(t,ap) (__builtin_alignof(t)) +#endif + +#if defined(_M_CEE) + +extern void __cdecl __va_start(va_list*, ...); +extern void * __cdecl __va_arg(va_list*, ...); +extern void __cdecl __va_end(va_list*); + +#define va_start(ap,v) ( __va_start(&ap, _ADDRESSOF(v), _SLOTSIZEOF(v), \ + __builtin_alignof(v), _ADDRESSOF(v)) ) +#define va_arg(ap,t) ( *(t *)__va_arg(&ap, _SLOTSIZEOF(t), \ + _APALIGN(t,ap), (t *)0) ) +#define va_end(ap) ( __va_end(&ap) ) + +#elif defined(_M_IX86) + +#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) ) + +#define va_start(ap,v) ( ap = (va_list)_ADDRESSOF(v) + _INTSIZEOF(v) ) +#define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) +#define va_end(ap) ( ap = (va_list)0 ) + +#elif defined(_M_MRX000) + + +/* Use these types and definitions if generating code for MIPS */ + +#define va_start(ap,v) ap = (va_list)_ADDRESSOF(v) + sizeof(v) +#define va_end(list) +#define va_arg(list, mode) ((mode *)(list =\ + (char *) ((((int)list + (__builtin_alignof(mode)<=4?3:7)) &\ + (__builtin_alignof(mode)<=4?-4:-8))+sizeof(mode))))[-1] + +/* +++++++++++++++++++++++++++++++++++++++++++ + Because of parameter passing conventions in C: + use mode=int for char, and short types + use mode=double for float types + use a pointer for array types + +++++++++++++++++++++++++++++++++++++++++++ */ + + +#elif defined(_M_ALPHA) + + +/* Use these types and definitions if generating code for ALPHA */ + +/* + * The Alpha compiler supports two builtin functions that are used to + * implement stdarg/varargs. The __builtin_va_start function is used + * by va_start to initialize the data structure that locates the next + * argument. The __builtin_isfloat function is used by va_arg to pick + * which part of the home area a given register argument is stored in. + * The home area is where up to six integer and/or six floating point + * register arguments are stored down (so they can also be referenced + * by a pointer like any arguments passed on the stack). + */ + +extern void * __builtin_va_start(va_list, ...); + +#ifdef _CFRONT +#define __builtin_isfloat(a) __builtin_alignof(a) +#endif + +#define va_start(list, v) __builtin_va_start(list, v, 1) +#define va_end(list) +#define va_arg(list, mode) \ + ( *( ((list).offset += ((int)sizeof(mode) + 7) & -8) , \ + (mode *)((list).a0 + (list).offset - \ + ((__builtin_isfloat(mode) && (list).offset <= (6 * 8)) ? \ + (6 * 8) + 8 : ((int)sizeof(mode) + 7) & -8) \ + ) \ + ) \ + ) + +#elif defined(_M_PPC) + +/* Microsoft C8 front end (used in Motorola Merged compiler) */ +/* bytes that a type occupies in the argument list */ +#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) ) +/* return 'ap' adjusted for type 't' in arglist */ +#define _ALIGNIT(ap,t) \ + ((((int)(ap))+(sizeof(t)<8?3:7)) & (sizeof(t)<8?~3:~7)) + +#define va_start(ap,v) ( ap = (va_list)_ADDRESSOF(v) + _INTSIZEOF(v) ) +#define va_arg(ap,t) ( *(t *)((ap = (char *) (_ALIGNIT(ap, t) + _INTSIZEOF(t))) - _INTSIZEOF(t)) ) +#define va_end(ap) ( ap = (va_list)0 ) + +#elif defined(_M_IA64) + +#ifdef __cplusplus +extern void __cdecl __va_start(va_list*, ...); +#define va_start(ap,v) ( __va_start(&ap, _ADDRESSOF(v), _SLOTSIZEOF(v), \ + _ADDRESSOF(v)) ) +#else +#define va_start(ap,v) ( ap = (va_list)_ADDRESSOF(v) + _SLOTSIZEOF(v) ) +#endif + +#define va_arg(ap,t) (*(t *)((ap += _SLOTSIZEOF(t)+ _APALIGN(t,ap)) \ + -_SLOTSIZEOF(t))) + +#define va_end(ap) ( ap = (va_list)0 ) + +#else + +/* A guess at the proper definitions for other platforms */ + +#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) ) + +#define va_start(ap,v) ( ap = (va_list)_ADDRESSOF(v) + _INTSIZEOF(v) ) +#define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) +#define va_end(ap) ( ap = (va_list)0 ) + +#endif + +#ifdef __cplusplus +} +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_STDARG */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stddef.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stddef.h new file mode 100644 index 00000000..b0042249 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stddef.h @@ -0,0 +1,143 @@ +/*** +*stddef.h - definitions/declarations for common constants, types, variables +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains definitions and declarations for some commonly +* used constants, types, and variables. +* [ANSI] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_STDDEF +#define _INC_STDDEF + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + + +/* Define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +/* Declare reference to errno */ + +#if defined(_MT) || defined(_DLL) +_CRTIMP extern int * __cdecl _errno(void); +#define errno (*_errno()) +#else /* ndef _MT && ndef _DLL */ +_CRTIMP extern int errno; +#endif /* _MT || _DLL */ + + +/* Define the implementation dependent size types */ + +#ifndef _INTPTR_T_DEFINED +#ifdef _WIN64 +typedef __int64 intptr_t; +#else +typedef _W64 int intptr_t; +#endif +#define _INTPTR_T_DEFINED +#endif + +#ifndef _UINTPTR_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 uintptr_t; +#else +typedef _W64 unsigned int uintptr_t; +#endif +#define _UINTPTR_T_DEFINED +#endif + +#ifndef _PTRDIFF_T_DEFINED +#ifdef _WIN64 +typedef __int64 ptrdiff_t; +#else +typedef _W64 int ptrdiff_t; +#endif +#define _PTRDIFF_T_DEFINED +#endif + + +#ifndef _SIZE_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 size_t; +#else +typedef _W64 unsigned int size_t; +#endif +#define _SIZE_T_DEFINED +#endif + + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +/* Define offsetof macro */ + +#ifdef _WIN64 +#define offsetof(s,m) (size_t)( (ptrdiff_t)&(((s *)0)->m) ) +#else +#define offsetof(s,m) (size_t)&(((s *)0)->m) +#endif + + +#ifdef _MT +_CRTIMP extern unsigned long __cdecl __threadid(void); +#define _threadid (__threadid()) +_CRTIMP extern uintptr_t __cdecl __threadhandle(void); +#endif + + +#ifdef __cplusplus +} +#endif + +#endif /* _INC_STDDEF */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stdexcept b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stdexcept new file mode 100644 index 00000000..4fd78c9f --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stdexcept @@ -0,0 +1,241 @@ +// stdexcept standard header +#pragma once +#ifndef _STDEXCEPT_ +#define _STDEXCEPT_ +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // CLASS logic_error +class logic_error + : public _XSTD exception + { // base of all logic-error exceptions +public: + explicit logic_error(const string& _Message) + : _Str(_Message) + { // construct from message string + } + + virtual ~logic_error() + {} // destroy the object + + virtual const char *what() const _THROW0() + { // return pointer to message string + return (_Str.c_str()); + } + + #if !_HAS_EXCEPTIONS +protected: + virtual void _Doraise() const + { // perform class-specific exception handling + _RAISE(*this); + } + #endif /* _HAS_EXCEPTIONS */ + +private: + string _Str; // the stored message string + }; + + // CLASS domain_error +class domain_error + : public logic_error + { // base of all domain-error exceptions +public: + explicit domain_error(const string& _Message) + : logic_error(_Message) + { // construct from message string + } + + virtual ~domain_error() + {} // destroy the object + + #if !_HAS_EXCEPTIONS +protected: + virtual void _Doraise() const + { // perform class-specific exception handling + _RAISE(*this); + } + #endif /* _HAS_EXCEPTIONS */ + + }; + + // CLASS invalid_argument +class invalid_argument + : public logic_error + { // base of all invalid-argument exceptions +public: + explicit invalid_argument(const string& _Message) + : logic_error(_Message) + { // construct from message string + } + + virtual ~invalid_argument() + {} // destroy the object + + #if !_HAS_EXCEPTIONS +protected: + virtual void _Doraise() const + { // perform class-specific exception handling + _RAISE(*this); + } + #endif /* _HAS_EXCEPTIONS */ + + }; + + // CLASS length_error +class length_error + : public logic_error + { // base of all length-error exceptions +public: + explicit length_error(const string& _Message) + : logic_error(_Message) + { // construct from message string + } + + virtual ~length_error() + {} // destroy the object + + #if !_HAS_EXCEPTIONS +protected: + virtual void _Doraise() const + { // perform class-specific exception handling + _RAISE(*this); + } + #endif /* _HAS_EXCEPTIONS */ + + }; + + // CLASS out_of_range +class out_of_range + : public logic_error + { // base of all out-of-range exceptions +public: + explicit out_of_range(const string& _Message) + : logic_error(_Message) + { // construct from message string + } + + virtual ~out_of_range() + {} // destroy the object + + #if !_HAS_EXCEPTIONS +protected: + virtual void _Doraise() const + { // perform class-specific exception handling + _RAISE(*this); + } + #endif /* _HAS_EXCEPTIONS */ + + }; + + // CLASS runtime_error +class runtime_error + : public _XSTD exception + { // base of all runtime-error exceptions +public: + explicit runtime_error(const string& _Message) + : _Str(_Message) + { // construct from message string + } + + virtual ~runtime_error() + {} // destroy the object + + virtual const char *what() const _THROW0() + { // return pointer to message string + return (_Str.c_str()); + } + + #if !_HAS_EXCEPTIONS +protected: + virtual void _Doraise() const + { // perform class-specific exception handling + _RAISE(*this); + } + #endif /* _HAS_EXCEPTIONS */ + +private: + string _Str; // the stored message string + }; + + // CLASS overflow_error +class overflow_error + : public runtime_error + { // base of all overflow-error exceptions +public: + explicit overflow_error(const string& _Message) + : runtime_error(_Message) + { // construct from message string + } + + virtual ~overflow_error() + {} // destroy the object + + #if !_HAS_EXCEPTIONS +protected: + virtual void _Doraise() const + { // perform class-specific exception handling + _RAISE(*this); + } + #endif /* _HAS_EXCEPTIONS */ + + }; + + // CLASS underflow_error +class underflow_error + : public runtime_error + { // base of all underflow-error exceptions +public: + explicit underflow_error(const string& _Message) + : runtime_error(_Message) + { // construct from message string + } + + virtual ~underflow_error() + {} // destroy the object + + #if !_HAS_EXCEPTIONS +protected: + virtual void _Doraise() const + { // perform class-specific exception handling + _RAISE(*this); + } + #endif /* _HAS_EXCEPTIONS */ + + }; + + // CLASS range_error +class range_error + : public runtime_error + { // base of all range-error exceptions +public: + explicit range_error(const string& _Message) + : runtime_error(_Message) + { // construct from message string + } + + virtual ~range_error() + {} // destroy the object + + #if !_HAS_EXCEPTIONS +protected: + virtual void _Doraise() const + { // perform class-specific exception handling + _RAISE(*this); + } + #endif /* _HAS_EXCEPTIONS */ + + }; +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _STDEXCEPT_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stdexcpt.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stdexcpt.h new file mode 100644 index 00000000..75319576 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stdexcpt.h @@ -0,0 +1,31 @@ +/*** +*stdexcpt.h - User include file for standard exception classes +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file is the previous location of the standard exception class +* definitions, now found in the standard header . +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_STDEXCPT +#define _INC_STDEXCPT + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef __cplusplus + +#include + +#endif /* __cplusplus */ +#endif /* _INC_STDEXCPT */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stdio.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stdio.h new file mode 100644 index 00000000..eec6e83e --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stdio.h @@ -0,0 +1,458 @@ +/*** +*stdio.h - definitions/declarations for standard I/O routines +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the structures, values, macros, and functions +* used by the level 2 I/O ("standard I/O") routines. +* [ANSI/System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_STDIO +#define _INC_STDIO + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +/* + * Currently, all MS C compilers for Win32 platforms default to 8 byte + * alignment. + */ +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + + +#ifndef _SIZE_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 size_t; +#else +typedef _W64 unsigned int size_t; +#endif +#define _SIZE_T_DEFINED +#endif + + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + + +#ifndef _WCTYPE_T_DEFINED +typedef unsigned short wint_t; +typedef unsigned short wctype_t; +#define _WCTYPE_T_DEFINED +#endif + + +#ifndef _VA_LIST_DEFINED +#ifdef _M_ALPHA +typedef struct { + char *a0; /* pointer to first homed integer argument */ + int offset; /* byte offset of next parameter */ +} va_list; +#else +typedef char * va_list; +#endif +#define _VA_LIST_DEFINED +#endif + + +/* Buffered I/O macros */ + +#define BUFSIZ 512 + + +/* + * Default number of supported streams. _NFILE is confusing and obsolete, but + * supported anyway for backwards compatibility. + */ +#define _NFILE _NSTREAM_ + +#define _NSTREAM_ 512 + +/* + * Number of entries in _iob[] (declared below). Note that _NSTREAM_ must be + * greater than or equal to _IOB_ENTRIES. + */ +#define _IOB_ENTRIES 20 + +#define EOF (-1) + + +#ifndef _FILE_DEFINED +struct _iobuf { + char *_ptr; + int _cnt; + char *_base; + int _flag; + int _file; + int _charbuf; + int _bufsiz; + char *_tmpfname; + }; +typedef struct _iobuf FILE; +#define _FILE_DEFINED +#endif + + +/* Directory where temporary files may be created. */ + +#ifdef _POSIX_ +#define _P_tmpdir "/" +#define _wP_tmpdir L"/" +#else +#define _P_tmpdir "\\" +#define _wP_tmpdir L"\\" +#endif + +/* L_tmpnam = length of string _P_tmpdir + * + 1 if _P_tmpdir does not end in "/" or "\", else 0 + * + 12 (for the filename string) + * + 1 (for the null terminator) + */ +#define L_tmpnam sizeof(_P_tmpdir)+12 + + +#ifdef _POSIX_ +#define L_ctermid 9 +#define L_cuserid 32 +#endif + + +/* Seek method constants */ + +#define SEEK_CUR 1 +#define SEEK_END 2 +#define SEEK_SET 0 + + +#define FILENAME_MAX 260 +#define FOPEN_MAX 20 +#define _SYS_OPEN 20 +#define TMP_MAX 32767 + + +/* Define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +/* Declare _iob[] array */ + +#ifndef _STDIO_DEFINED +_CRTIMP extern FILE _iob[]; +#endif /* _STDIO_DEFINED */ + + +/* Define file position type */ + +#ifndef _FPOS_T_DEFINED +#undef _FPOSOFF + +#if defined (_POSIX_) +typedef long fpos_t; +#define _FPOSOFF(fp) ((long)(fp)) +#else /* _POSIX_ */ + +#if !__STDC__ && _INTEGRAL_MAX_BITS >= 64 +typedef __int64 fpos_t; +#define _FPOSOFF(fp) ((long)(fp)) +#else +typedef struct fpos_t { + unsigned int lopart; + int hipart; + } fpos_t; +#define _FPOSOFF(fp) ((long)(fp).lopart) +#endif +#endif /* _POSIX_ */ + +#define _FPOS_T_DEFINED +#endif + + +#define stdin (&_iob[0]) +#define stdout (&_iob[1]) +#define stderr (&_iob[2]) + + +#define _IOREAD 0x0001 +#define _IOWRT 0x0002 + +#define _IOFBF 0x0000 +#define _IOLBF 0x0040 +#define _IONBF 0x0004 + +#define _IOMYBUF 0x0008 +#define _IOEOF 0x0010 +#define _IOERR 0x0020 +#define _IOSTRG 0x0040 +#define _IORW 0x0080 +#ifdef _POSIX_ +#define _IOAPPEND 0x0200 +#endif + + +/* Function prototypes */ + +#ifndef _STDIO_DEFINED + +_CRTIMP int __cdecl _filbuf(FILE *); +_CRTIMP int __cdecl _flsbuf(int, FILE *); + +#ifdef _POSIX_ +_CRTIMP FILE * __cdecl _fsopen(const char *, const char *); +#else +_CRTIMP FILE * __cdecl _fsopen(const char *, const char *, int); +#endif + +_CRTIMP void __cdecl clearerr(FILE *); +_CRTIMP int __cdecl fclose(FILE *); +_CRTIMP int __cdecl _fcloseall(void); + +#ifdef _POSIX_ +_CRTIMP FILE * __cdecl fdopen(int, const char *); +#else +_CRTIMP FILE * __cdecl _fdopen(int, const char *); +#endif + +_CRTIMP int __cdecl feof(FILE *); +_CRTIMP int __cdecl ferror(FILE *); +_CRTIMP int __cdecl fflush(FILE *); +_CRTIMP int __cdecl fgetc(FILE *); +_CRTIMP int __cdecl _fgetchar(void); +_CRTIMP int __cdecl fgetpos(FILE *, fpos_t *); +_CRTIMP char * __cdecl fgets(char *, int, FILE *); + +#ifdef _POSIX_ +_CRTIMP int __cdecl fileno(FILE *); +#else +_CRTIMP int __cdecl _fileno(FILE *); +#endif + +_CRTIMP int __cdecl _flushall(void); +_CRTIMP FILE * __cdecl fopen(const char *, const char *); +_CRTIMP int __cdecl fprintf(FILE *, const char *, ...); +_CRTIMP int __cdecl fputc(int, FILE *); +_CRTIMP int __cdecl _fputchar(int); +_CRTIMP int __cdecl fputs(const char *, FILE *); +_CRTIMP size_t __cdecl fread(void *, size_t, size_t, FILE *); +_CRTIMP FILE * __cdecl freopen(const char *, const char *, FILE *); +_CRTIMP int __cdecl fscanf(FILE *, const char *, ...); +_CRTIMP int __cdecl fsetpos(FILE *, const fpos_t *); +_CRTIMP int __cdecl fseek(FILE *, long, int); +_CRTIMP long __cdecl ftell(FILE *); +_CRTIMP size_t __cdecl fwrite(const void *, size_t, size_t, FILE *); +_CRTIMP int __cdecl getc(FILE *); +_CRTIMP int __cdecl getchar(void); +_CRTIMP int __cdecl _getmaxstdio(void); +_CRTIMP char * __cdecl gets(char *); +_CRTIMP int __cdecl _getw(FILE *); +_CRTIMP void __cdecl perror(const char *); +_CRTIMP int __cdecl _pclose(FILE *); +_CRTIMP FILE * __cdecl _popen(const char *, const char *); +_CRTIMP int __cdecl printf(const char *, ...); +_CRTIMP int __cdecl putc(int, FILE *); +_CRTIMP int __cdecl putchar(int); +_CRTIMP int __cdecl puts(const char *); +_CRTIMP int __cdecl _putw(int, FILE *); +_CRTIMP int __cdecl remove(const char *); +_CRTIMP int __cdecl rename(const char *, const char *); +_CRTIMP void __cdecl rewind(FILE *); +_CRTIMP int __cdecl _rmtmp(void); +_CRTIMP int __cdecl scanf(const char *, ...); +_CRTIMP void __cdecl setbuf(FILE *, char *); +_CRTIMP int __cdecl _setmaxstdio(int); +_CRTIMP int __cdecl setvbuf(FILE *, char *, int, size_t); +_CRTIMP int __cdecl _snprintf(char *, size_t, const char *, ...); +_CRTIMP int __cdecl sprintf(char *, const char *, ...); +_CRTIMP int __cdecl _scprintf(const char *, ...); +_CRTIMP int __cdecl sscanf(const char *, const char *, ...); +_CRTIMP int __cdecl _snscanf(const char *, size_t, const char *, ...); +_CRTIMP char * __cdecl _tempnam(const char *, const char *); +_CRTIMP FILE * __cdecl tmpfile(void); +_CRTIMP char * __cdecl tmpnam(char *); +_CRTIMP int __cdecl ungetc(int, FILE *); +_CRTIMP int __cdecl _unlink(const char *); +_CRTIMP int __cdecl vfprintf(FILE *, const char *, va_list); +_CRTIMP int __cdecl vprintf(const char *, va_list); +_CRTIMP int __cdecl _vsnprintf(char *, size_t, const char *, va_list); +_CRTIMP int __cdecl vsprintf(char *, const char *, va_list); +_CRTIMP int __cdecl _vscprintf(const char *, va_list); + +#ifndef _WSTDIO_DEFINED + +/* wide function prototypes, also declared in wchar.h */ + +#ifndef WEOF +#define WEOF (wint_t)(0xFFFF) +#endif + +#ifdef _POSIX_ +_CRTIMP FILE * __cdecl _wfsopen(const wchar_t *, const wchar_t *); +#else +_CRTIMP FILE * __cdecl _wfsopen(const wchar_t *, const wchar_t *, int); +#endif + +_CRTIMP wint_t __cdecl fgetwc(FILE *); +_CRTIMP wint_t __cdecl _fgetwchar(void); +_CRTIMP wint_t __cdecl fputwc(wchar_t, FILE *); +_CRTIMP wint_t __cdecl _fputwchar(wchar_t); +_CRTIMP wint_t __cdecl getwc(FILE *); +_CRTIMP wint_t __cdecl getwchar(void); +_CRTIMP wint_t __cdecl putwc(wchar_t, FILE *); +_CRTIMP wint_t __cdecl putwchar(wchar_t); +_CRTIMP wint_t __cdecl ungetwc(wint_t, FILE *); + +_CRTIMP wchar_t * __cdecl fgetws(wchar_t *, int, FILE *); +_CRTIMP int __cdecl fputws(const wchar_t *, FILE *); +_CRTIMP wchar_t * __cdecl _getws(wchar_t *); +_CRTIMP int __cdecl _putws(const wchar_t *); + +_CRTIMP int __cdecl fwprintf(FILE *, const wchar_t *, ...); +_CRTIMP int __cdecl wprintf(const wchar_t *, ...); +_CRTIMP int __cdecl _snwprintf(wchar_t *, size_t, const wchar_t *, ...); +/* This non-standard definition exists for historical reasons to avoid breaking old code */ +_CRTIMP int __cdecl swprintf(wchar_t *, const wchar_t *, ...); +#ifdef __cplusplus +/* For C++ we have an overloaded version with the standard definition */ +extern "C++" _CRTIMP int __cdecl swprintf(wchar_t *, size_t, const wchar_t *, ...); +#endif +_CRTIMP int __cdecl _scwprintf(const wchar_t *, ...); +_CRTIMP int __cdecl vfwprintf(FILE *, const wchar_t *, va_list); +_CRTIMP int __cdecl vwprintf(const wchar_t *, va_list); +_CRTIMP int __cdecl _vsnwprintf(wchar_t *, size_t, const wchar_t *, va_list); +/* This non-standard definition exists for historical reasons to avoid breaking old code */ +_CRTIMP int __cdecl vswprintf(wchar_t *, const wchar_t *, va_list); +#ifdef __cplusplus +/* For C++ we have an overloaded version with the standard definition */ +extern "C++" _CRTIMP int __cdecl vswprintf(wchar_t *, size_t, const wchar_t *, va_list); +#endif +_CRTIMP int __cdecl _vscwprintf(const wchar_t *, va_list); +_CRTIMP int __cdecl fwscanf(FILE *, const wchar_t *, ...); +_CRTIMP int __cdecl swscanf(const wchar_t *, const wchar_t *, ...); +_CRTIMP int __cdecl _snwscanf(const wchar_t *, size_t, const wchar_t *, ...); +_CRTIMP int __cdecl wscanf(const wchar_t *, ...); + +#define getwchar() fgetwc(stdin) +#define putwchar(_c) fputwc((_c),stdout) +#define getwc(_stm) fgetwc(_stm) +#define putwc(_c,_stm) fputwc(_c,_stm) + +_CRTIMP FILE * __cdecl _wfdopen(int, const wchar_t *); +_CRTIMP FILE * __cdecl _wfopen(const wchar_t *, const wchar_t *); +_CRTIMP FILE * __cdecl _wfreopen(const wchar_t *, const wchar_t *, FILE *); +_CRTIMP void __cdecl _wperror(const wchar_t *); +_CRTIMP FILE * __cdecl _wpopen(const wchar_t *, const wchar_t *); +_CRTIMP int __cdecl _wremove(const wchar_t *); +_CRTIMP wchar_t * __cdecl _wtempnam(const wchar_t *, const wchar_t *); +_CRTIMP wchar_t * __cdecl _wtmpnam(wchar_t *); + + +#define _WSTDIO_DEFINED +#endif /* _WSTDIO_DEFINED */ + +#define _STDIO_DEFINED +#endif /* _STDIO_DEFINED */ + + +/* Macro definitions */ + +#define feof(_stream) ((_stream)->_flag & _IOEOF) +#define ferror(_stream) ((_stream)->_flag & _IOERR) +#define _fileno(_stream) ((_stream)->_file) +#define getc(_stream) (--(_stream)->_cnt >= 0 \ + ? 0xff & *(_stream)->_ptr++ : _filbuf(_stream)) +#define putc(_c,_stream) (--(_stream)->_cnt >= 0 \ + ? 0xff & (*(_stream)->_ptr++ = (char)(_c)) : _flsbuf((_c),(_stream))) +#define getchar() getc(stdin) +#define putchar(_c) putc((_c),stdout) + + + +#ifdef _MT +#undef getc +#undef putc +#undef getchar +#undef putchar +#endif + + + +#if !__STDC__ && !defined(_POSIX_) + +/* Non-ANSI names for compatibility */ + +#define P_tmpdir _P_tmpdir +#define SYS_OPEN _SYS_OPEN + +_CRTIMP int __cdecl fcloseall(void); +_CRTIMP FILE * __cdecl fdopen(int, const char *); +_CRTIMP int __cdecl fgetchar(void); +_CRTIMP int __cdecl fileno(FILE *); +_CRTIMP int __cdecl flushall(void); +_CRTIMP int __cdecl fputchar(int); +_CRTIMP int __cdecl getw(FILE *); +_CRTIMP int __cdecl putw(int, FILE *); +_CRTIMP int __cdecl rmtmp(void); +_CRTIMP char * __cdecl tempnam(const char *, const char *); +_CRTIMP int __cdecl unlink(const char *); + +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_STDIO */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stdlib.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stdlib.h new file mode 100644 index 00000000..dfae0cd6 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/stdlib.h @@ -0,0 +1,455 @@ +/*** +*stdlib.h - declarations/definitions for commonly used library functions +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This include file contains the function declarations for commonly +* used library functions which either don't fit somewhere else, or, +* cannot be declared in the normal place for other reasons. +* [ANSI] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_STDLIB +#define _INC_STDLIB + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +/* + * Currently, all MS C compilers for Win32 platforms default to 8 byte + * alignment. + */ +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + + +#ifndef _SIZE_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 size_t; +#else +typedef _W64 unsigned int size_t; +#endif +#define _SIZE_T_DEFINED +#endif + + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + + +/* Define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +/* Definition of the argument values for the exit() function */ + +#define EXIT_SUCCESS 0 +#define EXIT_FAILURE 1 + + +#ifndef _ONEXIT_T_DEFINED +typedef int (__cdecl * _onexit_t)(void); +#if !__STDC__ +/* Non-ANSI name for compatibility */ +#define onexit_t _onexit_t +#endif +#define _ONEXIT_T_DEFINED +#endif + + +/* Data structure definitions for div and ldiv runtimes. */ + +#ifndef _DIV_T_DEFINED + +typedef struct _div_t { + int quot; + int rem; +} div_t; + +typedef struct _ldiv_t { + long quot; + long rem; +} ldiv_t; + +#define _DIV_T_DEFINED +#endif + + +/* Maximum value that can be returned by the rand function. */ + +#define RAND_MAX 0x7fff + +/* + * Maximum number of bytes in multi-byte character in the current locale + * (also defined in ctype.h). + */ +#ifndef MB_CUR_MAX +#define MB_CUR_MAX __mb_cur_max +_CRTIMP extern int __mb_cur_max; +/* These functions are for enabling STATIC_CPPLIB functionality */ +_CRTIMP int __cdecl ___mb_cur_max_func(void); +#endif /* MB_CUR_MAX */ + + +/* Minimum and maximum macros */ + +#define __max(a,b) (((a) > (b)) ? (a) : (b)) +#define __min(a,b) (((a) < (b)) ? (a) : (b)) + +/* + * Sizes for buffers used by the _makepath() and _splitpath() functions. + * note that the sizes include space for 0-terminator + */ +#define _MAX_PATH 260 /* max. length of full pathname */ +#define _MAX_DRIVE 3 /* max. length of drive component */ +#define _MAX_DIR 256 /* max. length of path component */ +#define _MAX_FNAME 256 /* max. length of file name component */ +#define _MAX_EXT 256 /* max. length of extension component */ + +/* + * Argument values for _set_error_mode(). + */ +#define _OUT_TO_DEFAULT 0 +#define _OUT_TO_STDERR 1 +#define _OUT_TO_MSGBOX 2 +#define _REPORT_ERRMODE 3 + +#if defined(_M_IX86) +/* + * Typedefs and argument values for _set_security_error_handler() + */ +#define _SECERR_BUFFER_OVERRUN 1 /* void* arg ignored */ +typedef void (__cdecl * _secerr_handler_func)(int, void *); +#endif + +/* a purecall handler procedure. Never returns normally */ +typedef void (__cdecl *_purecall_handler)(); +/* establishes a purecall handler for the process */ +_CRTIMP _purecall_handler __cdecl _set_purecall_handler(_purecall_handler); + +/* External variable declarations */ + +#if defined(_MT) || defined(_DLL) +_CRTIMP int * __cdecl _errno(void); +_CRTIMP unsigned long * __cdecl __doserrno(void); +#define errno (*_errno()) +#define _doserrno (*__doserrno()) +#else /* ndef _MT && ndef _DLL */ +_CRTIMP extern int errno; /* XENIX style error number */ +_CRTIMP extern unsigned long _doserrno; /* OS system error value */ +#endif /* _MT || _DLL */ + + +_CRTIMP extern char * _sys_errlist[]; /* perror error message table */ +_CRTIMP extern int _sys_nerr; /* # of entries in sys_errlist table */ + + +#if defined(_DLL) && defined(_M_IX86) + +#define __argc (*__p___argc()) /* count of cmd line args */ +#define __argv (*__p___argv()) /* pointer to table of cmd line args */ +#define __wargv (*__p___wargv()) /* pointer to table of wide cmd line args */ +#define _environ (*__p__environ()) /* pointer to environment table */ +#ifdef _POSIX_ +extern char ** environ; /* pointer to environment table */ +#else +#define _wenviron (*__p__wenviron()) /* pointer to wide environment table */ +#endif /* _POSIX_ */ +#define _pgmptr (*__p__pgmptr()) /* points to the module (EXE) name */ +#define _wpgmptr (*__p__wpgmptr()) /* points to the module (EXE) wide name */ + +_CRTIMP int * __cdecl __p___argc(void); +_CRTIMP char *** __cdecl __p___argv(void); +_CRTIMP wchar_t *** __cdecl __p___wargv(void); +_CRTIMP char *** __cdecl __p__environ(void); +_CRTIMP wchar_t *** __cdecl __p__wenviron(void); +_CRTIMP char ** __cdecl __p__pgmptr(void); +_CRTIMP wchar_t ** __cdecl __p__wpgmptr(void); + + +#else + +_CRTIMP extern int __argc; /* count of cmd line args */ +_CRTIMP extern char ** __argv; /* pointer to table of cmd line args */ +_CRTIMP extern wchar_t ** __wargv; /* pointer to table of wide cmd line args */ + +#ifdef _POSIX_ +extern char ** environ; /* pointer to environment table */ +#else +_CRTIMP extern char ** _environ; /* pointer to environment table */ +_CRTIMP extern wchar_t ** _wenviron; /* pointer to wide environment table */ +#endif /* _POSIX_ */ + +_CRTIMP extern char * _pgmptr; /* points to the module (EXE) name */ +_CRTIMP extern wchar_t * _wpgmptr; /* points to the module (EXE) wide name */ + +#endif + + +_CRTIMP extern int _fmode; /* default file translation mode */ +_CRTIMP extern int _fileinfo; /* open file info mode (for spawn) */ + + +/* Windows major/minor and O.S. version numbers */ + +_CRTIMP extern unsigned int _osplatform; +_CRTIMP extern unsigned int _osver; +_CRTIMP extern unsigned int _winver; +_CRTIMP extern unsigned int _winmajor; +_CRTIMP extern unsigned int _winminor; + + +/* function prototypes */ + +#if _MSC_VER >= 1200 +_CRTIMP __declspec(noreturn) void __cdecl abort(void); +_CRTIMP __declspec(noreturn) void __cdecl exit(int); +#else +_CRTIMP void __cdecl abort(void); +_CRTIMP void __cdecl exit(int); +#endif + +#if defined(_M_MRX000) +_CRTIMP int __cdecl abs(int); +#else + int __cdecl abs(int); +#endif + __int64 __cdecl _abs64(__int64); + int __cdecl atexit(void (__cdecl *)(void)); +_CRTIMP double __cdecl atof(const char *); +_CRTIMP int __cdecl atoi(const char *); +_CRTIMP long __cdecl atol(const char *); +_CRTIMP void * __cdecl bsearch(const void *, const void *, size_t, size_t, + int (__cdecl *)(const void *, const void *)); + unsigned short __cdecl _byteswap_ushort(unsigned short); + unsigned long __cdecl _byteswap_ulong (unsigned long); + unsigned __int64 __cdecl _byteswap_uint64(unsigned __int64); +_CRTIMP void * __cdecl calloc(size_t, size_t); +_CRTIMP div_t __cdecl div(int, int); +_CRTIMP void __cdecl free(void *); +_CRTIMP char * __cdecl getenv(const char *); +_CRTIMP char * __cdecl _itoa(int, char *, int); +#if _INTEGRAL_MAX_BITS >= 64 +_CRTIMP char * __cdecl _i64toa(__int64, char *, int); +_CRTIMP char * __cdecl _ui64toa(unsigned __int64, char *, int); +_CRTIMP __int64 __cdecl _atoi64(const char *); +_CRTIMP __int64 __cdecl _strtoi64(const char *, char **, int); +_CRTIMP unsigned __int64 __cdecl _strtoui64(const char *, char **, int); +#endif +#if defined(_M_MRX000) +_CRTIMP long __cdecl labs(long); +#else + long __cdecl labs(long); +#endif +_CRTIMP ldiv_t __cdecl ldiv(long, long); +_CRTIMP char * __cdecl _ltoa(long, char *, int); +_CRTIMP void * __cdecl malloc(size_t); +_CRTIMP int __cdecl mblen(const char *, size_t); +_CRTIMP size_t __cdecl _mbstrlen(const char *s); +_CRTIMP int __cdecl mbtowc(wchar_t *, const char *, size_t); +_CRTIMP size_t __cdecl mbstowcs(wchar_t *, const char *, size_t); +_CRTIMP void __cdecl qsort(void *, size_t, size_t, int (__cdecl *) + (const void *, const void *)); +_CRTIMP int __cdecl rand(void); +_CRTIMP void * __cdecl realloc(void *, size_t); +_CRTIMP int __cdecl _set_error_mode(int); +#if defined(_M_IX86) +_CRTIMP _secerr_handler_func + __cdecl _set_security_error_handler(_secerr_handler_func); +#endif +_CRTIMP void __cdecl srand(unsigned int); +_CRTIMP double __cdecl strtod(const char *, char **); +_CRTIMP long __cdecl strtol(const char *, char **, int); +_CRTIMP unsigned long __cdecl strtoul(const char *, char **, int); +_CRTIMP int __cdecl system(const char *); +_CRTIMP char * __cdecl _ultoa(unsigned long, char *, int); +_CRTIMP int __cdecl wctomb(char *, wchar_t); +_CRTIMP size_t __cdecl wcstombs(char *, const wchar_t *, size_t); + + +#ifndef _WSTDLIB_DEFINED + +/* wide function prototypes, also declared in wchar.h */ + +_CRTIMP wchar_t * __cdecl _itow (int, wchar_t *, int); +_CRTIMP wchar_t * __cdecl _ltow (long, wchar_t *, int); +_CRTIMP wchar_t * __cdecl _ultow (unsigned long, wchar_t *, int); +_CRTIMP double __cdecl wcstod(const wchar_t *, wchar_t **); +_CRTIMP long __cdecl wcstol(const wchar_t *, wchar_t **, int); +_CRTIMP unsigned long __cdecl wcstoul(const wchar_t *, wchar_t **, int); +_CRTIMP wchar_t * __cdecl _wgetenv(const wchar_t *); +_CRTIMP int __cdecl _wsystem(const wchar_t *); +_CRTIMP double __cdecl _wtof(const wchar_t *); +_CRTIMP int __cdecl _wtoi(const wchar_t *); +_CRTIMP long __cdecl _wtol(const wchar_t *); +#if _INTEGRAL_MAX_BITS >= 64 +_CRTIMP wchar_t * __cdecl _i64tow(__int64, wchar_t *, int); +_CRTIMP wchar_t * __cdecl _ui64tow(unsigned __int64, wchar_t *, int); +_CRTIMP __int64 __cdecl _wtoi64(const wchar_t *); +_CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *, wchar_t **, int); +_CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *, wchar_t **, int); +#endif + +#define _WSTDLIB_DEFINED +#endif + + +#ifndef _POSIX_ + +/* +Buffer size required to be passed to _gcvt, fcvt and other fp conversion routines +*/ +#define _CVTBUFSIZE (309+40) /* # of digits in max. dp value + slop */ + +_CRTIMP char * __cdecl _ecvt(double, int, int *, int *); +#if _MSC_VER >= 1200 +_CRTIMP __declspec(noreturn) void __cdecl _exit(int); +#else +_CRTIMP void __cdecl _exit(int); +#endif +_CRTIMP char * __cdecl _fcvt(double, int, int *, int *); +_CRTIMP char * __cdecl _fullpath(char *, const char *, size_t); +_CRTIMP char * __cdecl _gcvt(double, int, char *); + unsigned long __cdecl _lrotl(unsigned long, int); + unsigned long __cdecl _lrotr(unsigned long, int); +_CRTIMP void __cdecl _makepath(char *, const char *, const char *, const char *, + const char *); + _onexit_t __cdecl _onexit(_onexit_t); +_CRTIMP void __cdecl perror(const char *); +_CRTIMP int __cdecl _putenv(const char *); + unsigned int __cdecl _rotl(unsigned int, int); + unsigned __int64 __cdecl _rotl64(unsigned __int64, int); + unsigned int __cdecl _rotr(unsigned int, int); + unsigned __int64 __cdecl _rotr64(unsigned __int64, int); +_CRTIMP void __cdecl _searchenv(const char *, const char *, char *); +_CRTIMP void __cdecl _splitpath(const char *, char *, char *, char *, char *); +_CRTIMP void __cdecl _swab(char *, char *, int); + +#ifndef _WSTDLIBP_DEFINED + +/* wide function prototypes, also declared in wchar.h */ + +_CRTIMP wchar_t * __cdecl _wfullpath(wchar_t *, const wchar_t *, size_t); +_CRTIMP void __cdecl _wmakepath(wchar_t *, const wchar_t *, const wchar_t *, const wchar_t *, + const wchar_t *); +_CRTIMP void __cdecl _wperror(const wchar_t *); +_CRTIMP int __cdecl _wputenv(const wchar_t *); +_CRTIMP void __cdecl _wsearchenv(const wchar_t *, const wchar_t *, wchar_t *); +_CRTIMP void __cdecl _wsplitpath(const wchar_t *, wchar_t *, wchar_t *, wchar_t *, wchar_t *); + +#define _WSTDLIBP_DEFINED +#endif + +/* --------- The following functions are OBSOLETE --------- */ +/* The Win32 API SetErrorMode, Beep and Sleep should be used instead. */ +_CRTIMP void __cdecl _seterrormode(int); +_CRTIMP void __cdecl _beep(unsigned, unsigned); +_CRTIMP void __cdecl _sleep(unsigned long); +/* --------- The preceding functions are OBSOLETE --------- */ + +#endif /* _POSIX_ */ + + +#if !__STDC__ +/* --------- The declarations below should not be in stdlib.h --------- */ +/* --------- and will be removed in a future release. Include --------- */ +/* --------- ctype.h to obtain these declarations. --------- */ +#ifndef tolower /* tolower has been undefined - use function */ +_CRTIMP int __cdecl tolower(int); +#endif /* tolower */ +#ifndef toupper /* toupper has been undefined - use function */ +_CRTIMP int __cdecl toupper(int); +#endif /* toupper */ +/* --------- The declarations above will be removed. --------- */ +#endif + + +#if !__STDC__ + +#ifndef _POSIX_ + +/* Non-ANSI names for compatibility */ + +#ifndef __cplusplus +#define max(a,b) (((a) > (b)) ? (a) : (b)) +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif + +#define sys_errlist _sys_errlist +#define sys_nerr _sys_nerr +#define environ _environ + +_CRTIMP char * __cdecl ecvt(double, int, int *, int *); +_CRTIMP char * __cdecl fcvt(double, int, int *, int *); +_CRTIMP char * __cdecl gcvt(double, int, char *); +_CRTIMP char * __cdecl itoa(int, char *, int); +_CRTIMP char * __cdecl ltoa(long, char *, int); + onexit_t __cdecl onexit(onexit_t); +_CRTIMP int __cdecl putenv(const char *); +_CRTIMP void __cdecl swab(char *, char *, int); +_CRTIMP char * __cdecl ultoa(unsigned long, char *, int); + +#endif /* _POSIX_ */ + +#endif /* __STDC__ */ + +#ifdef __cplusplus +} + +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_STDLIB */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/streambuf b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/streambuf new file mode 100644 index 00000000..e94bbddd --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/streambuf @@ -0,0 +1,409 @@ +// streambuf standard header +#pragma once +#ifndef _STREAMBUF_ +#define _STREAMBUF_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // TEMPLATE CLASS basic_streambuf +template + class basic_streambuf + { // control read/write buffers + + basic_streambuf(const basic_streambuf<_Elem, _Traits>&); // not defined + basic_streambuf<_Elem, _Traits>& + operator=(const basic_streambuf<_Elem, _Traits>&); // not defined + + +protected: + basic_streambuf() + : _Plocale(_NEW_CRT locale) + { // construct with no buffers + _Init(); + } + + basic_streambuf(_Uninitialized) + { // construct uninitialized + } + +public: + typedef basic_streambuf<_Elem, _Traits> _Myt; + typedef _Elem char_type; + typedef _Traits traits_type; + + virtual ~basic_streambuf() + { // destroy the object + _DELETE_CRT(_Plocale); + } + + typedef typename _Traits::int_type int_type; + typedef typename _Traits::pos_type pos_type; + typedef typename _Traits::off_type off_type; + + pos_type pubseekoff(off_type _Off, ios_base::seekdir _Way, + ios_base::openmode _Mode = ios_base::in | ios_base::out) + { // change position by _Off, according to _Way, _Mode + return (seekoff(_Off, _Way, _Mode)); + } + + pos_type pubseekoff(off_type _Off, ios_base::seek_dir _Way, + ios_base::open_mode _Mode) + { // change position by _Off, according to _Way, _Mode (old style) + return (pubseekoff(_Off, (ios_base::seekdir)_Way, + (ios_base::openmode)_Mode)); + } + + pos_type pubseekpos(pos_type _Pos, + ios_base::openmode _Mode = ios_base::in | ios_base::out) + { // change position to _Pos, according to _Mode + return (seekpos(_Pos, _Mode)); + } + + pos_type pubseekpos(pos_type _Pos, ios_base::open_mode _Mode) + { // change position to _Pos, according to _Mode (old style) + return (seekpos(_Pos, (ios_base::openmode)_Mode)); + } + + _Myt *pubsetbuf(_Elem *_Buffer, streamsize _Count) + { // offer _Buffer to external agent + return (setbuf(_Buffer, _Count)); + } + + locale pubimbue(const locale &_Newlocale) + { // set locale to argument + locale _Oldlocale = *_Plocale; + imbue(_Newlocale); + *_Plocale = _Newlocale; + return (_Oldlocale); + } + + locale getloc() const + { // get locale + return (*_Plocale); + } + + streamsize in_avail() + { // return count of buffered input characters + return (gptr() != 0 && gptr() < egptr() + ? (streamsize)(egptr() - gptr()) : showmanyc()); + } + + int pubsync() + { // synchronize with external agent + return (sync()); + } + + int_type sbumpc() + { // get a character and point past it + return (gptr() != 0 && gptr() < egptr() + ? _Traits::to_int_type(*_Gninc()) : uflow()); + } + + int_type sgetc() + { // get a character and don't point past it + return (gptr() != 0 && gptr() < egptr() + ? _Traits::to_int_type(*gptr()) : underflow()); + } + + streamsize sgetn(_Elem *_Ptr, streamsize _Count) + { // get up to _Count characters into array beginning at _Ptr + return (xsgetn(_Ptr, _Count)); + } + + int_type snextc() + { // point to next character and return it + return (_Traits::eq_int_type(_Traits::eof(), sbumpc()) + ? _Traits::eof() : sgetc()); + } + + int_type sputbackc(_Elem _Ch) + { // put back _Ch + return (gptr() != 0 && eback() < gptr() + && _Traits::eq(_Ch, gptr()[-1]) + ? _Traits::to_int_type(*_Gndec()) + : pbackfail(_Traits::to_int_type(_Ch))); + } + + void stossc() + { // point past a character + if (gptr() != 0 && gptr() < egptr()) + _Gninc(); + else + uflow(); + } + + int_type sungetc() + { // back up one position + return (gptr() != 0 && eback() < gptr() + ? _Traits::to_int_type(*_Gndec()) : pbackfail()); + } + + int_type sputc(_Elem _Ch) + { // put a character + return (pptr() != 0 && pptr() < epptr() + ? _Traits::to_int_type(*_Pninc() = _Ch) + : overflow(_Traits::to_int_type(_Ch))); + } + + streamsize sputn(const _Elem *_Ptr, streamsize _Count) + { // put _Count characters from array beginning at _Ptr + return (xsputn(_Ptr, _Count)); + } + + void _Lock() + { // set the thread lock + _Mylock._Lock(); + } + + void _Unlock() + { // clear the thread lock + _Mylock._Unlock(); + } + + +protected: + _Elem *eback() const + { // return beginning of read buffer + return (*_IGfirst); + } + + _Elem *gptr() const + { // return current position in read buffer + return (*_IGnext); + } + + _Elem *pbase() const + { // return beginning of write buffer + return (*_IPfirst); + } + + _Elem *pptr() const + { // return current position in write buffer + return (*_IPnext); + } + + _Elem *egptr() const + { // return end of read buffer + return (*_IGnext + *_IGcount); + } + + void gbump(int _Off) + { // alter current position in read buffer by _Off + *_IGcount -= _Off; + *_IGnext += _Off; + } + + void setg(_Elem *_First, _Elem *_Next, _Elem *_Last) + { // set pointers for read buffer + *_IGfirst = _First; + *_IGnext = _Next; + *_IGcount = (int)(_Last - _Next); + } + + _Elem *epptr() const + { // return end of write buffer + return (*_IPnext + *_IPcount); + } + + _Elem *_Gndec() + { // decrement current position in read buffer + ++*_IGcount; + return (--*_IGnext); + } + + _Elem *_Gninc() + { // increment current position in read buffer + --*_IGcount; + return ((*_IGnext)++); + } + + void pbump(int _Off) + { // alter current position in write buffer by _Off + *_IPcount -= _Off; + *_IPnext += _Off; + } + + void setp(_Elem *_First, _Elem *_Last) + { // set pointers for write buffer + *_IPfirst = _First; + *_IPnext = _First; + *_IPcount = (int)(_Last - _First); + } + + void setp(_Elem *_First, _Elem *_Next, _Elem *_Last) + { // set pointers for write buffer, extended version + *_IPfirst = _First; + *_IPnext = _Next; + *_IPcount = (int)(_Last - _Next); + } + + _Elem *_Pninc() + { // decrement current position in write buffer + --*_IPcount; + return ((*_IPnext)++); + } + + void _Init() + { // initialize buffer parameters for no buffers + _IGfirst = &_Gfirst, _IPfirst = &_Pfirst; + _IGnext = &_Gnext, _IPnext = &_Pnext; + _IGcount = &_Gcount, _IPcount = &_Pcount; + setp(0, 0), setg(0, 0, 0); + } + + void _Init(_Elem **_Gf, _Elem **_Gn, int *_Gc, + _Elem **_Pf, _Elem **_Pn, int *_Pc) + { // initialize buffer parameters as specified + _IGfirst = _Gf, _IPfirst = _Pf; + _IGnext = _Gn, _IPnext = _Pn; + _IGcount = _Gc, _IPcount = _Pc; + } + + virtual int_type overflow(int_type = _Traits::eof()) + { // put a character to stream (always fail) + return (_Traits::eof()); + } + + virtual int_type pbackfail(int_type = _Traits::eof()) + { // put a character back to stream (always fail) + return (_Traits::eof()); + } + + virtual streamsize showmanyc() + { // return count of input characters + return (0); + } + + virtual int_type underflow() + { // get a character from stream, but don't point past it + return (_Traits::eof()); + } + + virtual int_type uflow() + { // get a character from stream, point past it + return (_Traits::eq_int_type(_Traits::eof(), underflow()) + ? _Traits::eof() : _Traits::to_int_type(*_Gninc())); + } + + virtual streamsize xsgetn(_Elem * _Ptr, + streamsize _Count) + { // get _Count characters from stream + int_type _Meta; + streamsize _Size, _Copied; + + for (_Copied = 0; 0 < _Count; ) + if (gptr() != 0 && 0 < (_Size = (streamsize)(egptr() - gptr()))) + { // copy from read buffer + if (_Count < _Size) + _Size = _Count; + _Traits::copy(_Ptr, gptr(), _Size); + _Ptr += _Size; + _Copied += _Size; + _Count -= _Size; + gbump((int)_Size); + } + else if (_Traits::eq_int_type(_Traits::eof(), _Meta = uflow())) + break; // end of file, quit + else + { // get a single character + *_Ptr++ = _Traits::to_char_type(_Meta); + ++_Copied; + --_Count; + } + + return (_Copied); + } + + virtual streamsize xsputn(const _Elem *_Ptr, + streamsize _Count) + { // put _Count characters to stream + streamsize _Size, _Copied; + + for (_Copied = 0; 0 < _Count; ) + if (pptr() != 0 && 0 < (_Size = (streamsize)(epptr() - pptr()))) + { // copy to write buffer + if (_Count < _Size) + _Size = _Count; + _Traits::copy(pptr(), _Ptr, _Size); + _Ptr += _Size; + _Copied += _Size; + _Count -= _Size; + pbump((int)_Size); + } + else if (_Traits::eq_int_type(_Traits::eof(), + overflow(_Traits::to_int_type(*_Ptr)))) + break; // single character put failed, quit + else + { // count character successfully put + ++_Ptr; + ++_Copied; + --_Count; + } + + return (_Copied); + } + + virtual pos_type seekoff(off_type, ios_base::seekdir, + ios_base::openmode = ios_base::in | ios_base::out) + { // change position by offset, according to way and mode + return (streampos(_BADOFF)); + } + + virtual pos_type seekpos(pos_type, + ios_base::openmode = ios_base::in | ios_base::out) + { // change to specified position, according to mode + return (streampos(_BADOFF)); + } + + virtual _Myt *setbuf(_Elem *, streamsize) + { // offer buffer to external agent (do nothing) + return (this); + } + + virtual int sync() + { // synchronize with external agent (do nothing) + return (0); + } + + virtual void imbue(const locale&) + { // set locale to argument (do nothing) + } + +private: + _Mutex _Mylock; // thread lock + _Elem *_Gfirst; // beginning of read buffer + _Elem *_Pfirst; // beginning of write buffer + _Elem **_IGfirst; // pointer to beginning of read buffer + _Elem **_IPfirst; // pointer to beginning of write buffer + _Elem *_Gnext; // current position in read buffer + _Elem *_Pnext; // current position in write buffer + _Elem **_IGnext; // pointer to current position in read buffer + _Elem **_IPnext; // pointer to current position in write buffer + int _Gcount; // length of read buffer + int _Pcount; // length of write buffer + int *_IGcount; // pointer to length of read buffer + int *_IPcount; // pointer to length of write buffer + locale *_Plocale; // pointer to imbued locale object + }; + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 basic_streambuf >; +template class _CRTIMP2 basic_streambuf >; + + + + #endif /* _DLL_CPPLIB */ +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _STREAMBUF_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/string b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/string new file mode 100644 index 00000000..89b49007 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/string @@ -0,0 +1,639 @@ +// string standard header +#pragma once +#ifndef _STRING_ +#define _STRING_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) + + #pragma warning(disable: 4189) + +_STD_BEGIN + + // basic_string TEMPLATE OPERATORS +template inline + basic_string<_Elem, _Traits, _Alloc> __cdecl operator+( + const basic_string<_Elem, _Traits, _Alloc>& _Left, + const basic_string<_Elem, _Traits, _Alloc>& _Right) + { // return string + string + return (basic_string<_Elem, _Traits, _Alloc>(_Left) += _Right); + } + +template inline + basic_string<_Elem, _Traits, _Alloc> __cdecl operator+( + const _Elem *_Left, + const basic_string<_Elem, _Traits, _Alloc>& _Right) + { // return NTCS + string + return (basic_string<_Elem, _Traits, _Alloc>(_Left) += _Right); + } + +template inline + basic_string<_Elem, _Traits, _Alloc> __cdecl operator+( + const _Elem _Left, + const basic_string<_Elem, _Traits, _Alloc>& _Right) + { // return character + string + return (basic_string<_Elem, _Traits, _Alloc>(1, _Left) += _Right); + } + +template inline + basic_string<_Elem, _Traits, _Alloc> __cdecl operator+( + const basic_string<_Elem, _Traits, _Alloc>& _Left, + const _Elem *_Right) + { // return string + NTCS + return (basic_string<_Elem, _Traits, _Alloc>(_Left) += _Right); + } + +template inline + basic_string<_Elem, _Traits, _Alloc> __cdecl operator+( + const basic_string<_Elem, _Traits, _Alloc>& _Left, + const _Elem _Right) + { // return string + character + return (basic_string<_Elem, _Traits, _Alloc>(_Left) += _Right); + } + +template inline + bool __cdecl operator==( + const basic_string<_Elem, _Traits, _Alloc>& _Left, + const basic_string<_Elem, _Traits, _Alloc>& _Right) + { // test for string equality + return (_Left.compare(_Right) == 0); + } + +template inline + bool __cdecl operator==( + const _Elem * _Left, + const basic_string<_Elem, _Traits, _Alloc>& _Right) + { // test for NTCS vs. string equality + return (_Right.compare(_Left) == 0); + } + +template inline + bool __cdecl operator==( + const basic_string<_Elem, _Traits, _Alloc>& _Left, + const _Elem *_Right) + { // test for string vs. NTCS equality + return (_Left.compare(_Right) == 0); + } + +template inline + bool __cdecl operator!=( + const basic_string<_Elem, _Traits, _Alloc>& _Left, + const basic_string<_Elem, _Traits, _Alloc>& _Right) + { // test for string inequality + return (!(_Left == _Right)); + } + +template inline + bool __cdecl operator!=( + const _Elem *_Left, + const basic_string<_Elem, _Traits, _Alloc>& _Right) + { // test for NTCS vs. string inequality + return (!(_Left == _Right)); + } + +template inline + bool __cdecl operator!=( + const basic_string<_Elem, _Traits, _Alloc>& _Left, + const _Elem *_Right) + { // test for string vs. NTCS inequality + return (!(_Left == _Right)); + } + +template inline + bool __cdecl operator<( + const basic_string<_Elem, _Traits, _Alloc>& _Left, + const basic_string<_Elem, _Traits, _Alloc>& _Right) + { // test if string < string + return (_Left.compare(_Right) < 0); + } + +template inline + bool __cdecl operator<( + const _Elem * _Left, + const basic_string<_Elem, _Traits, _Alloc>& _Right) + { // test if NTCS < string + return (_Right.compare(_Left) > 0); + } + +template inline + bool __cdecl operator<( + const basic_string<_Elem, _Traits, _Alloc>& _Left, + const _Elem *_Right) + { // test if string < NTCS + return (_Left.compare(_Right) < 0); + } + +template inline + bool __cdecl operator>( + const basic_string<_Elem, _Traits, _Alloc>& _Left, + const basic_string<_Elem, _Traits, _Alloc>& _Right) + { // test if string > string + return (_Right < _Left); + } + +template inline + bool __cdecl operator>( + const _Elem * _Left, + const basic_string<_Elem, _Traits, _Alloc>& _Right) + { // test if NTCS > string + return (_Right < _Left); + } + +template inline + bool __cdecl operator>( + const basic_string<_Elem, _Traits, _Alloc>& _Left, + const _Elem *_Right) + { // test if string > NTCS + return (_Right < _Left); + } + +template inline + bool __cdecl operator<=( + const basic_string<_Elem, _Traits, _Alloc>& _Left, + const basic_string<_Elem, _Traits, _Alloc>& _Right) + { // test if string <= string + return (!(_Right < _Left)); + } + +template inline + bool __cdecl operator<=( + const _Elem * _Left, + const basic_string<_Elem, _Traits, _Alloc>& _Right) + { // test if NTCS <= string + return (!(_Right < _Left)); + } + +template inline + bool __cdecl operator<=( + const basic_string<_Elem, _Traits, _Alloc>& _Left, + const _Elem *_Right) + { // test if string <= NTCS + return (!(_Right < _Left)); + } + +template inline + bool __cdecl operator>=( + const basic_string<_Elem, _Traits, _Alloc>& _Left, + const basic_string<_Elem, _Traits, _Alloc>& _Right) + { // test if string >= string + return (!(_Left < _Right)); + } + +template inline + bool __cdecl operator>=( + const _Elem * _Left, + const basic_string<_Elem, _Traits, _Alloc>& _Right) + { // test if NTCS >= string + return (!(_Left < _Right)); + } + +template inline + bool __cdecl operator>=( + const basic_string<_Elem, _Traits, _Alloc>& _Left, + const _Elem *_Right) + { // test if string >= NTCS + return (!(_Left < _Right)); + } + + #ifdef _DLL_CPPLIB +template class _CRTIMP2 basic_string, allocator > __cdecl operator+( + const basic_string, allocator >&, + const basic_string, allocator >&); +template class _CRTIMP2 basic_string, allocator > __cdecl operator+( + const char *, + const basic_string, allocator >&); +template class _CRTIMP2 basic_string, allocator > __cdecl operator+( + const char, + const basic_string, allocator >&); +template class _CRTIMP2 basic_string, allocator > __cdecl operator+( + const basic_string, allocator >&, + const char *); +template class _CRTIMP2 basic_string, allocator > __cdecl operator+( + const basic_string, allocator >&, + const char); + +template _CRTIMP2 bool __cdecl operator==( + const basic_string, allocator >&, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator==( + const char *, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator==( + const basic_string, allocator >&, + const char *); + +template _CRTIMP2 bool __cdecl operator!=( + const basic_string, allocator >&, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator!=( + const char *, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator!=( + const basic_string, allocator >&, + const char *); + +template _CRTIMP2 bool __cdecl operator<( + const basic_string, allocator >&, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator<( + const char *, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator<( + const basic_string, allocator >&, + const char *); + +template _CRTIMP2 bool __cdecl operator>( + const basic_string, allocator >&, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator>( + const char *, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator>( + const basic_string, allocator >&, + const char *); + +template _CRTIMP2 bool __cdecl operator<=( + const basic_string, allocator >&, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator<=( + const char *, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator<=( + const basic_string, allocator >&, + const char *); + +template _CRTIMP2 bool __cdecl operator>=( + const basic_string, allocator >&, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator>=( + const char *, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator>=( + const basic_string, allocator >&, + const char *); + +template class _CRTIMP2 basic_string, allocator > __cdecl operator+( + const basic_string, + allocator >&, + const basic_string, + allocator >&); +template class _CRTIMP2 basic_string, allocator > __cdecl operator+( + const wchar_t *, + const basic_string, + allocator >&); +template class _CRTIMP2 basic_string, allocator > __cdecl operator+( + const wchar_t, + const basic_string, + allocator >&); +template class _CRTIMP2 basic_string, allocator > __cdecl operator+( + const basic_string, + allocator >&, + const wchar_t *); +template class _CRTIMP2 basic_string, allocator > __cdecl operator+( + const basic_string, + allocator >&, + const wchar_t); + +template _CRTIMP2 bool __cdecl operator==( + const basic_string, allocator >&, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator==( + const wchar_t *, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator==( + const basic_string, allocator >&, + const wchar_t *); + +template _CRTIMP2 bool __cdecl operator!=( + const basic_string, allocator >&, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator!=( + const wchar_t *, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator!=( + const basic_string, allocator >&, + const wchar_t *); + +template _CRTIMP2 bool __cdecl operator<( + const basic_string, allocator >&, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator<( + const wchar_t *, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator<( + const basic_string, allocator >&, + const wchar_t *); + +template _CRTIMP2 bool __cdecl operator>( + const basic_string, allocator >&, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator>( + const wchar_t *, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator>( + const basic_string, allocator >&, + const wchar_t *); + +template _CRTIMP2 bool __cdecl operator<=( + const basic_string, allocator >&, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator<=( + const wchar_t *, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator<=( + const basic_string, allocator >&, + const wchar_t *); + +template _CRTIMP2 bool __cdecl operator>=( + const basic_string, allocator >&, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator>=( + const wchar_t *, + const basic_string, allocator >&); +template _CRTIMP2 bool __cdecl operator>=( + const basic_string, allocator >&, + const wchar_t *); + + + + #endif /* _DLL_CPPLIB */ + + // basic_string INSERTERS AND EXTRACTORS +template inline + basic_istream<_Elem, _Traits>& __cdecl operator>>( + basic_istream<_Elem, _Traits>& _Istr, + basic_string<_Elem, _Traits, _Alloc>& _Str) + { // extract a string + typedef ctype<_Elem> _Ctype; + typedef basic_istream<_Elem, _Traits> _Myis; + typedef basic_string<_Elem, _Traits, _Alloc> _Mystr; + typedef typename _Mystr::size_type _Mysizt; + + ios_base::iostate _State = ios_base::goodbit; + bool _Changed = false; + const typename _Myis::sentry _Ok(_Istr); + + if (_Ok) + { // state okay, extract characters + const _Ctype& _Ctype_fac = _USE(_Istr.getloc(), _Ctype); + _Str.erase(); + + _TRY_IO_BEGIN + _Mysizt _Size = 0 < _Istr.width() + && (_Mysizt)_Istr.width() < _Str.max_size() + ? (_Mysizt)_Istr.width() : _Str.max_size(); + typename _Traits::int_type _Meta = _Istr.rdbuf()->sgetc(); + + for (; 0 < _Size; --_Size, _Meta = _Istr.rdbuf()->snextc()) + if(_Traits::eq_int_type(_Traits::eof(), _Meta)) + { // end of file, quit + _State |= ios_base::eofbit; + break; + } + else if (_Ctype_fac.is(_Ctype::space, + _Traits::to_char_type(_Meta))) + break; // whitespace, quit + else + { // add character to string + _Str.append(1, _Traits::to_char_type(_Meta)); + _Changed = true; + } + _CATCH_IO_(_Istr) + } + + _Istr.width(0); + if (!_Changed) + _State |= ios_base::failbit; + _Istr.setstate(_State); + return (_Istr); + } + +template inline + basic_istream<_Elem, _Traits>& __cdecl getline( + basic_istream<_Elem, _Traits>& _Istr, + basic_string<_Elem, _Traits, _Alloc>& _Str, + const _Elem _Delim) + { // get characters into string, discard delimiter + typedef basic_istream<_Elem, _Traits> _Myis; + ios_base::iostate _State = ios_base::goodbit; + bool _Changed = false; + const typename _Myis::sentry _Ok(_Istr, true); + + if (_Ok) + { // state okay, extract characters + _TRY_IO_BEGIN + _Str.erase(); + const typename _Traits::int_type _Metadelim = + _Traits::to_int_type(_Delim); + typename _Traits::int_type _Meta = _Istr.rdbuf()->sgetc(); + + for (; ; _Meta = _Istr.rdbuf()->snextc()) + if (_Traits::eq_int_type(_Traits::eof(), _Meta)) + { // end of file, quit + _State |= ios_base::eofbit; + break; + } + else if (_Traits::eq_int_type(_Meta, _Metadelim)) + { // got a delimiter, discard it and quit + _Changed = true; + _Istr.rdbuf()->sbumpc(); + break; + } + else if (_Str.max_size() <= _Str.size()) + { // string too large, quit + _State |= ios_base::failbit; + break; + } + else + { // got a character, add it to string + _Str += _Traits::to_char_type(_Meta); + _Changed = true; + } + _CATCH_IO_(_Istr) + } + + if (!_Changed) + _State |= ios_base::failbit; + _Istr.setstate(_State); + return (_Istr); + } + +template inline + basic_istream<_Elem, _Traits>& __cdecl getline( + basic_istream<_Elem, _Traits>& _Istr, + basic_string<_Elem, _Traits, _Alloc>& _Str) + { // get characters into string, discard newline + return (getline(_Istr, _Str, _Istr.widen('\n'))); + } + +template inline + basic_ostream<_Elem, _Traits>& __cdecl operator<<( + basic_ostream<_Elem, _Traits>& _Ostr, + const basic_string<_Elem, _Traits, _Alloc>& _Str) + { // insert a string + typedef basic_ostream<_Elem, _Traits> _Myos; + typedef basic_string<_Elem, _Traits, _Alloc> _Mystr; + typedef typename _Mystr::size_type _Mysizt; + + ios_base::iostate _State = ios_base::goodbit; + _Mysizt _Size = _Str.size(); + _Mysizt _Pad = _Ostr.width() <= 0 || (_Mysizt)_Ostr.width() <= _Size + ? 0 : (_Mysizt)_Ostr.width() - _Size; + const typename _Myos::sentry _Ok(_Ostr); + + if (!_Ok) + _State |= ios_base::badbit; + else + { // state okay, insert characters + _TRY_IO_BEGIN + if ((_Ostr.flags() & ios_base::adjustfield) != ios_base::left) + for (; 0 < _Pad; --_Pad) // pad on left + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ostr.fill()))) + { // insertion failed, quit + _State |= ios_base::badbit; + break; + } + + if (_State == ios_base::goodbit) + for (_Mysizt _Count = 0; _Count < _Size; ++_Count) + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Str[_Count]))) + { // insertion failed, quit + _State |= ios_base::badbit; + break; + } + + if (_State == ios_base::goodbit) + for (; 0 < _Pad; --_Pad) // pad on right + if (_Traits::eq_int_type(_Traits::eof(), + _Ostr.rdbuf()->sputc(_Ostr.fill()))) + { // insertion failed, quit + _State |= ios_base::badbit; + break; + } + _Ostr.width(0); + _CATCH_IO_(_Ostr) + } + + _Ostr.setstate(_State); + return (_Ostr); + } + + #ifdef _DLL_CPPLIB +template class _CRTIMP2 basic_istream >& __cdecl operator>>( + basic_istream >&, + basic_string, allocator >&); +template class _CRTIMP2 basic_istream >& __cdecl getline( + basic_istream >&, + basic_string, allocator >&); +template class _CRTIMP2 basic_istream >& __cdecl getline( + basic_istream >&, + basic_string, allocator >&, + const char); +template class _CRTIMP2 basic_ostream >& __cdecl operator<<( + basic_ostream >&, + const basic_string, allocator >&); + +template class _CRTIMP2 basic_istream >& __cdecl operator>>( + basic_istream >&, + basic_string, allocator >&); +template class _CRTIMP2 basic_istream >& __cdecl getline( + basic_istream >&, + basic_string, allocator >&); +template class _CRTIMP2 basic_istream >& __cdecl getline( + basic_istream >&, + basic_string, allocator >&, + const wchar_t); +template class _CRTIMP2 basic_ostream >& __cdecl operator<<( + basic_ostream >&, + const basic_string, + allocator >&); + + + + #endif /* _DLL_CPPLIB */ +_STD_END + #pragma warning(default: 4189) +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _STRING */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/string.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/string.h new file mode 100644 index 00000000..94e1e9db --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/string.h @@ -0,0 +1,227 @@ +/*** +*string.h - declarations for string manipulation functions +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the function declarations for the string +* manipulation functions. +* [ANSI/System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_STRING +#define _INC_STRING + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + + +#ifndef _SIZE_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 size_t; +#else +typedef _W64 unsigned int size_t; +#endif +#define _SIZE_T_DEFINED +#endif + + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +#ifndef _NLSCMP_DEFINED +#define _NLSCMPERROR 2147483647 /* currently == INT_MAX */ +#define _NLSCMP_DEFINED +#endif + +/* Define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +/* Function prototypes */ + +#ifdef _M_MRX000 +_CRTIMP void * __cdecl memcpy(void *, const void *, size_t); +_CRTIMP int __cdecl memcmp(const void *, const void *, size_t); +_CRTIMP void * __cdecl memset(void *, int, size_t); +_CRTIMP char * __cdecl _strset(char *, int); +_CRTIMP char * __cdecl strcpy(char *, const char *); +_CRTIMP char * __cdecl strcat(char *, const char *); +_CRTIMP int __cdecl strcmp(const char *, const char *); +_CRTIMP size_t __cdecl strlen(const char *); +#else + void * __cdecl memcpy(void *, const void *, size_t); + int __cdecl memcmp(const void *, const void *, size_t); + void * __cdecl memset(void *, int, size_t); + char * __cdecl _strset(char *, int); + char * __cdecl strcpy(char *, const char *); + char * __cdecl strcat(char *, const char *); + int __cdecl strcmp(const char *, const char *); + size_t __cdecl strlen(const char *); +#endif +_CRTIMP void * __cdecl _memccpy(void *, const void *, int, size_t); +_CRTIMP void * __cdecl memchr(const void *, int, size_t); +_CRTIMP int __cdecl _memicmp(const void *, const void *, size_t); + +#if defined(_M_IA64) || defined(_M_ALPHA) + void * __cdecl memmove(void *, const void *, size_t); +#else +_CRTIMP void * __cdecl memmove(void *, const void *, size_t); +#endif + + +_CRTIMP char * __cdecl strchr(const char *, int); +_CRTIMP int __cdecl _strcmpi(const char *, const char *); +_CRTIMP int __cdecl _stricmp(const char *, const char *); +_CRTIMP int __cdecl strcoll(const char *, const char *); +_CRTIMP int __cdecl _stricoll(const char *, const char *); +_CRTIMP int __cdecl _strncoll(const char *, const char *, size_t); +_CRTIMP int __cdecl _strnicoll(const char *, const char *, size_t); +_CRTIMP size_t __cdecl strcspn(const char *, const char *); +_CRTIMP char * __cdecl _strdup(const char *); +_CRTIMP char * __cdecl _strerror(const char *); +_CRTIMP char * __cdecl strerror(int); +_CRTIMP char * __cdecl _strlwr(char *); +_CRTIMP char * __cdecl strncat(char *, const char *, size_t); +_CRTIMP int __cdecl strncmp(const char *, const char *, size_t); +_CRTIMP int __cdecl _strnicmp(const char *, const char *, size_t); +_CRTIMP char * __cdecl strncpy(char *, const char *, size_t); +_CRTIMP char * __cdecl _strnset(char *, int, size_t); +_CRTIMP char * __cdecl strpbrk(const char *, const char *); +_CRTIMP char * __cdecl strrchr(const char *, int); +_CRTIMP char * __cdecl _strrev(char *); +_CRTIMP size_t __cdecl strspn(const char *, const char *); +_CRTIMP char * __cdecl strstr(const char *, const char *); +_CRTIMP char * __cdecl strtok(char *, const char *); +_CRTIMP char * __cdecl _strupr(char *); +_CRTIMP size_t __cdecl strxfrm (char *, const char *, size_t); + + +#if !__STDC__ + +/* prototypes for oldnames.lib functions */ +_CRTIMP void * __cdecl memccpy(void *, const void *, int, size_t); +_CRTIMP int __cdecl memicmp(const void *, const void *, size_t); +_CRTIMP int __cdecl strcmpi(const char *, const char *); +_CRTIMP int __cdecl stricmp(const char *, const char *); +_CRTIMP char * __cdecl strdup(const char *); +_CRTIMP char * __cdecl strlwr(char *); +_CRTIMP int __cdecl strnicmp(const char *, const char *, size_t); +_CRTIMP char * __cdecl strnset(char *, int, size_t); +_CRTIMP char * __cdecl strrev(char *); + char * __cdecl strset(char *, int); +_CRTIMP char * __cdecl strupr(char *); + +#endif /* !__STDC__ */ + + +#ifndef _WSTRING_DEFINED + +/* wide function prototypes, also declared in wchar.h */ + +_CRTIMP wchar_t * __cdecl wcscat(wchar_t *, const wchar_t *); +_CRTIMP wchar_t * __cdecl wcschr(const wchar_t *, wchar_t); +_CRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *); +_CRTIMP wchar_t * __cdecl wcscpy(wchar_t *, const wchar_t *); +_CRTIMP size_t __cdecl wcscspn(const wchar_t *, const wchar_t *); +_CRTIMP size_t __cdecl wcslen(const wchar_t *); +_CRTIMP wchar_t * __cdecl wcsncat(wchar_t *, const wchar_t *, size_t); +_CRTIMP int __cdecl wcsncmp(const wchar_t *, const wchar_t *, size_t); +_CRTIMP wchar_t * __cdecl wcsncpy(wchar_t *, const wchar_t *, size_t); +_CRTIMP wchar_t * __cdecl wcspbrk(const wchar_t *, const wchar_t *); +_CRTIMP wchar_t * __cdecl wcsrchr(const wchar_t *, wchar_t); +_CRTIMP size_t __cdecl wcsspn(const wchar_t *, const wchar_t *); +_CRTIMP wchar_t * __cdecl wcsstr(const wchar_t *, const wchar_t *); +_CRTIMP wchar_t * __cdecl wcstok(wchar_t *, const wchar_t *); +_CRTIMP wchar_t * __cdecl _wcserror(int); +_CRTIMP wchar_t * __cdecl __wcserror(const wchar_t *); + +_CRTIMP wchar_t * __cdecl _wcsdup(const wchar_t *); +_CRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *); +_CRTIMP int __cdecl _wcsnicmp(const wchar_t *, const wchar_t *, size_t); +_CRTIMP wchar_t * __cdecl _wcsnset(wchar_t *, wchar_t, size_t); +_CRTIMP wchar_t * __cdecl _wcsrev(wchar_t *); +_CRTIMP wchar_t * __cdecl _wcsset(wchar_t *, wchar_t); + +_CRTIMP wchar_t * __cdecl _wcslwr(wchar_t *); +_CRTIMP wchar_t * __cdecl _wcsupr(wchar_t *); +_CRTIMP size_t __cdecl wcsxfrm(wchar_t *, const wchar_t *, size_t); +_CRTIMP int __cdecl wcscoll(const wchar_t *, const wchar_t *); +_CRTIMP int __cdecl _wcsicoll(const wchar_t *, const wchar_t *); +_CRTIMP int __cdecl _wcsncoll(const wchar_t *, const wchar_t *, size_t); +_CRTIMP int __cdecl _wcsnicoll(const wchar_t *, const wchar_t *, size_t); + +#if !__STDC__ + +/* old names */ +#define wcswcs wcsstr + +/* prototypes for oldnames.lib functions */ +_CRTIMP wchar_t * __cdecl wcsdup(const wchar_t *); +_CRTIMP int __cdecl wcsicmp(const wchar_t *, const wchar_t *); +_CRTIMP int __cdecl wcsnicmp(const wchar_t *, const wchar_t *, size_t); +_CRTIMP wchar_t * __cdecl wcsnset(wchar_t *, wchar_t, size_t); +_CRTIMP wchar_t * __cdecl wcsrev(wchar_t *); +_CRTIMP wchar_t * __cdecl wcsset(wchar_t *, wchar_t); +_CRTIMP wchar_t * __cdecl wcslwr(wchar_t *); +_CRTIMP wchar_t * __cdecl wcsupr(wchar_t *); +_CRTIMP int __cdecl wcsicoll(const wchar_t *, const wchar_t *); + +#endif /* !__STDC__ */ + +#define _WSTRING_DEFINED +#endif + + +#ifdef __cplusplus +} +#endif + +#endif /* _INC_STRING */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/strstream b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/strstream new file mode 100644 index 00000000..203c8630 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/strstream @@ -0,0 +1,253 @@ +// strstream standard header +#pragma once +#ifndef _STRSTREAM_ +#define _STRSTREAM_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // CLASS strstreambuf +class strstreambuf + : public streambuf + { // stream buffer associated with static or allocated character array +public: + enum + { // constants for bits in stream state + _Allocated = 1, // set if character array storage has been allocated + _Constant = 2, // set if character array nonmutable + _Dynamic = 4, // set if character array length grows on demand + _Frozen = 8}; // set if character array ownership given away + typedef int _Strstate; + + explicit strstreambuf(streamsize _Count = 0) + { // construct with empty character array, suggested initial size + _Init(_Count); + } + + strstreambuf(void *(__cdecl *_Allocfunc)(size_t), + void (__cdecl *_Freefunc)(void *)) + { // construct with empty character array, allocation functions + _Init(); + _Palloc = _Allocfunc; + _Pfree = _Freefunc; + } + + strstreambuf(char *_Getptr, streamsize _Count, char *_Putptr = 0) + { // construct with [_Getptr, _Getptr + _Count), possibly mutable + _Init(_Count, _Getptr, _Putptr); + } + + strstreambuf(unsigned char *_Getptr, streamsize _Count, + unsigned char *_Putptr = 0) + { // construct with [_Getptr, _Getptr + _Count), possibly mutable + _Init(_Count, (char *)_Getptr, (char *)_Putptr); + } + + strstreambuf(const char *_Getptr, streamsize _Count) + { // construct with [_Getptr, _Getptr + _Count), nonmutable + _Init(_Count, (char *)_Getptr, 0, _Constant); + } + + strstreambuf(const unsigned char *_Getptr, streamsize _Count) + { // construct with [_Getptr, _Getptr + _Count), nonmutable + _Init(_Count, (char *)_Getptr, 0, _Constant); + } + + _CRTIMP2 virtual ~strstreambuf(); // destroy the object + + _CRTIMP2 void freeze(bool = true); // freeze or unfreeze writing + + char *str() + { // freeze and return pointer to character array + freeze(); + return (gptr()); + } + + streamsize pcount() const + { // return size of writable character array + return (pptr() == 0 ? 0 : (streamsize)(pptr() - pbase())); + } + + strstreambuf(signed char *_Getptr, streamsize _Count, + signed char *_Putptr = 0) + { // construct with [_Getptr, _Getptr + _Count), possibly mutable + _Init(_Count, (char *)_Getptr, (char *)_Putptr); + } + + strstreambuf(const signed char *_Getptr, streamsize _Count) + { // construct with [_Getptr, _Getptr + _Count), nonmutable + _Init(_Count, (char *)_Getptr, 0, _Constant); + } + +protected: + _CRTIMP2 virtual int overflow(int = EOF); // try to extend write area + + _CRTIMP2 virtual int pbackfail(int = EOF); // try to putback a character + + _CRTIMP2 virtual int underflow(); // read if read position available + + _CRTIMP2 virtual streampos seekoff(streamoff, + ios_base::seekdir, + ios_base::openmode = + ios_base::in | ios_base::out); // seek by specified offset + + _CRTIMP2 virtual streampos seekpos(streampos, + ios_base::openmode = + ios_base::in | ios_base::out); // seek to memorized position + + _CRTIMP2 void _Init(streamsize = 0, char * = 0, char * = 0, + _Strstate = (_Strstate)0); // initialize with possibly static buffer + + _CRTIMP2 void _Tidy(); // free any allocated storage + +private: + enum + { // constant for default minimum buffer size + _MINSIZE = 32}; + + streamsize _Minsize; // the minimum buffer size + char *_Pendsave; // the saved end pointer during freeze + char *_Seekhigh; // the high-water pointer in character array + _Strstate _Strmode; // the stream state + void *(__cdecl *_Palloc)(size_t); // the pointer to allocator function + void (__cdecl *_Pfree)(void *); // the pointer to free function + }; + + // CLASS istrstream +class istrstream + : public istream + { // input stream associated with a character array +public: + + explicit istrstream(const char *_Ptr) + : istream(&_Mysb), _Mysb(_Ptr, 0) + { // construct with NTBS + } + + istrstream(const char *_Ptr, streamsize _Count) + : istream(&_Mysb), _Mysb(_Ptr, _Count) + { // construct with [_Ptr, _Ptr + _Count) + } + + explicit istrstream(char *_Ptr) + : istream(&_Mysb), _Mysb((const char *)_Ptr, 0) + { // construct with NTBS + } + + istrstream(char *_Ptr, int _Count) + : istream(&_Mysb), _Mysb((const char *)_Ptr, _Count) + { // construct with [_Ptr, _Ptr + _Count) + } + + _CRTIMP2 virtual ~istrstream(); // destroy the object + + strstreambuf *rdbuf() const + { // return pointer to character array buffer + return ((strstreambuf *)&_Mysb); + } + + char *str() + { // freeze and return pointer to character array + return (_Mysb.str()); + } + +private: + strstreambuf _Mysb; // the string buffer + }; + + // CLASS ostrstream +class ostrstream + : public ostream + { // output stream associated with a character array +public: + ostrstream() + : ostream(&_Mysb), _Mysb() + { // construct with empty character array + } + + _CRTIMP2 ostrstream(char *, streamsize, + ios_base::openmode = + ios_base::out); // construct with static array + + _CRTIMP2 virtual ~ostrstream(); // destroy the object + + strstreambuf *rdbuf() const + { // return pointer to character array buffer + return ((strstreambuf *)&_Mysb); + } + + void freeze(bool _Freezeit = true) + { // freeze or unfreeze writing + _Mysb.freeze(_Freezeit); + } + + char *str() + { // freeze and return pointer to character array + return (_Mysb.str()); + } + + streamsize pcount() const + { // return size of writable character array + return (_Mysb.pcount()); + } + +private: + strstreambuf _Mysb; // the character array buffer + }; + + // CLASS strstream +class strstream + : public iostream + { // input/output stream associated with character array buffer +public: + typedef char char_type; + typedef int int_type; + typedef streampos pos_type; + typedef streamoff off_type; + + strstream() + : iostream(&_Mysb), _Mysb() + { // construct with empty character array + } + + _CRTIMP2 strstream(char *, streamsize, + ios_base::openmode = + ios_base::in | ios_base::out); // construct with static array + + _CRTIMP2 virtual ~strstream(); // destroy the object + + strstreambuf *rdbuf() const + { // return pointer to character array buffer + return ((strstreambuf *)&_Mysb); + } + + void freeze(bool _Freezeit = true) + { // freeze or unfreeze writing + _Mysb.freeze(_Freezeit); + } + + char *str() + { // freeze and return pointer to character array + return (_Mysb.str()); + } + + streamsize pcount() const + { // return size of writable character array + return (_Mysb.pcount()); + } + +private: + strstreambuf _Mysb; // the character array buffer + }; +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _STRSTREAM_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sys/locking.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sys/locking.h new file mode 100644 index 00000000..3e6aaf66 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sys/locking.h @@ -0,0 +1,41 @@ +/*** +*sys/locking.h - flags for locking() function +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the flags for the locking() function. +* [System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_LOCKING +#define _INC_LOCKING + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#define _LK_UNLCK 0 /* unlock the file region */ +#define _LK_LOCK 1 /* lock the file region */ +#define _LK_NBLCK 2 /* non-blocking lock */ +#define _LK_RLCK 3 /* lock for writing */ +#define _LK_NBRLCK 4 /* non-blocking lock for writing */ + +#if !__STDC__ +/* Non-ANSI names for compatibility */ +#define LK_UNLCK _LK_UNLCK +#define LK_LOCK _LK_LOCK +#define LK_NBLCK _LK_NBLCK +#define LK_RLCK _LK_RLCK +#define LK_NBRLCK _LK_NBRLCK +#endif + +#endif /* _INC_LOCKING */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sys/stat.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sys/stat.h new file mode 100644 index 00000000..e1b7a3fa --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sys/stat.h @@ -0,0 +1,214 @@ +/*** +*sys/stat.h - defines structure used by stat() and fstat() +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the structure used by the _stat() and _fstat() +* routines. +* [System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_STAT +#define _INC_STAT + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + + +#include + + +#ifndef _TIME_T_DEFINED +#ifdef _WIN64 +typedef __int64 time_t; /* time value */ +#else +typedef long time_t; /* time value */ +#endif +#if _INTEGRAL_MAX_BITS >= 64 +typedef __int64 __time64_t; /* 64-bit time value */ +#endif +#define _TIME_T_DEFINED /* avoid multiple def's of time_t */ +#endif + + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + + +/* define structure for returning status information */ + +#ifndef _STAT_DEFINED + +struct _stat { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + _off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; + }; + +#if !__STDC__ + +/* Non-ANSI names for compatibility */ + +struct stat { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + _off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; + }; + +#endif /* __STDC__ */ + +#if _INTEGRAL_MAX_BITS >= 64 + +struct _stati64 { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + __int64 st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; + }; + +struct __stat64 { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + __int64 st_size; + __time64_t st_atime; + __time64_t st_mtime; + __time64_t st_ctime; + }; + +#endif + +#define _STAT_DEFINED +#endif + + +#define _S_IFMT 0170000 /* file type mask */ +#define _S_IFDIR 0040000 /* directory */ +#define _S_IFCHR 0020000 /* character special */ +#define _S_IFIFO 0010000 /* pipe */ +#define _S_IFREG 0100000 /* regular */ +#define _S_IREAD 0000400 /* read permission, owner */ +#define _S_IWRITE 0000200 /* write permission, owner */ +#define _S_IEXEC 0000100 /* execute/search permission, owner */ + + +/* Function prototypes */ + +_CRTIMP int __cdecl _fstat(int, struct _stat *); +_CRTIMP int __cdecl _stat(const char *, struct _stat *); + +#if _INTEGRAL_MAX_BITS >= 64 +_CRTIMP int __cdecl _fstati64(int, struct _stati64 *); +_CRTIMP int __cdecl _fstat64(int, struct __stat64 *); +_CRTIMP int __cdecl _stati64(const char *, struct _stati64 *); +_CRTIMP int __cdecl _stat64(const char *, struct __stat64 *); +#endif + +#ifndef _WSTAT_DEFINED + +/* wide function prototypes, also declared in wchar.h */ + +_CRTIMP int __cdecl _wstat(const wchar_t *, struct _stat *); + +#if _INTEGRAL_MAX_BITS >= 64 +_CRTIMP int __cdecl _wstati64(const wchar_t *, struct _stati64 *); +_CRTIMP int __cdecl _wstat64(const wchar_t *, struct __stat64 *); +#endif + +#define _WSTAT_DEFINED +#endif + + +#if !__STDC__ + +/* Non-ANSI names for compatibility */ + +#define S_IFMT _S_IFMT +#define S_IFDIR _S_IFDIR +#define S_IFCHR _S_IFCHR +#define S_IFREG _S_IFREG +#define S_IREAD _S_IREAD +#define S_IWRITE _S_IWRITE +#define S_IEXEC _S_IEXEC + +_CRTIMP int __cdecl fstat(int, struct stat *); +_CRTIMP int __cdecl stat(const char *, struct stat *); + +#endif /* __STDC__ */ + + +#ifdef __cplusplus +} +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_STAT */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sys/timeb.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sys/timeb.h new file mode 100644 index 00000000..ddd0218d --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sys/timeb.h @@ -0,0 +1,127 @@ +/*** +*sys/timeb.h - definition/declarations for _ftime() +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file define the _ftime() function and the types it uses. +* [System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_TIMEB +#define _INC_TIMEB + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + + +#ifndef _TIME_T_DEFINED +#ifdef _WIN64 +typedef __int64 time_t; /* time value */ +#else +typedef long time_t; /* time value */ +#endif +#if _INTEGRAL_MAX_BITS >= 64 +typedef __int64 __time64_t; +#endif +#define _TIME_T_DEFINED /* avoid multiple def's of time_t */ +#endif + + +/* Structure returned by _ftime system call */ + +#ifndef _TIMEB_DEFINED +struct _timeb { + time_t time; + unsigned short millitm; + short timezone; + short dstflag; + }; + +#if !__STDC__ + +/* Non-ANSI name for compatibility */ + +struct timeb { + time_t time; + unsigned short millitm; + short timezone; + short dstflag; + }; + +#endif + +#if _INTEGRAL_MAX_BITS >= 64 +struct __timeb64 { + __time64_t time; + unsigned short millitm; + short timezone; + short dstflag; + }; +#endif + +#define _TIMEB_DEFINED +#endif + + +/* Function prototypes */ + +_CRTIMP void __cdecl _ftime(struct _timeb *); + +#if !__STDC__ + +/* Non-ANSI name for compatibility */ + +_CRTIMP void __cdecl ftime(struct timeb *); + +#endif + +#if _INTEGRAL_MAX_BITS >= 64 +_CRTIMP void __cdecl _ftime64(struct __timeb64 *); +#endif + +#ifdef __cplusplus +} +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_TIMEB */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sys/types.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sys/types.h new file mode 100644 index 00000000..09b7fc78 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sys/types.h @@ -0,0 +1,78 @@ +/*** +*sys/types.h - types returned by system level calls for file and time info +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines types used in defining values returned by system +* level calls for file status and time information. +* [System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_TYPES +#define _INC_TYPES + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifndef _TIME_T_DEFINED +#ifdef _WIN64 +typedef __int64 time_t; /* time value */ +#else +typedef long time_t; /* time value */ +#endif +#if _INTEGRAL_MAX_BITS >= 64 +typedef __int64 __time64_t; +#endif +#define _TIME_T_DEFINED /* avoid multiple def's of time_t */ +#endif + + +#ifndef _INO_T_DEFINED + +typedef unsigned short _ino_t; /* i-node number (not used on DOS) */ + +#if !__STDC__ +/* Non-ANSI name for compatibility */ +typedef unsigned short ino_t; +#endif + +#define _INO_T_DEFINED +#endif + + +#ifndef _DEV_T_DEFINED + +typedef unsigned int _dev_t; /* device code */ + +#if !__STDC__ +/* Non-ANSI name for compatibility */ +typedef unsigned int dev_t; +#endif + +#define _DEV_T_DEFINED +#endif + + +#ifndef _OFF_T_DEFINED + +typedef long _off_t; /* file offset value */ + +#if !__STDC__ +/* Non-ANSI name for compatibility */ +typedef long off_t; +#endif + +#define _OFF_T_DEFINED +#endif + +#endif /* _INC_TYPES */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sys/utime.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sys/utime.h new file mode 100644 index 00000000..34b885d3 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/sys/utime.h @@ -0,0 +1,129 @@ +/*** +*sys/utime.h - definitions/declarations for utime() +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines the structure used by the utime routine to set +* new file access and modification times. NOTE - MS-DOS +* does not recognize access time, so this field will +* always be ignored and the modification time field will be +* used to set the new time. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_UTIME +#define _INC_UTIME + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +#ifndef _TIME_T_DEFINED +#ifdef _WIN64 +typedef __int64 time_t; /* time value */ +#else +typedef long time_t; /* time value */ +#endif +#if _INTEGRAL_MAX_BITS >= 64 +typedef __int64 __time64_t; +#endif +#define _TIME_T_DEFINED /* avoid multiple def's of time_t */ +#endif + +/* define struct used by _utime() function */ + +#ifndef _UTIMBUF_DEFINED + +struct _utimbuf { + time_t actime; /* access time */ + time_t modtime; /* modification time */ + }; + +#if !__STDC__ +/* Non-ANSI name for compatibility */ +struct utimbuf { + time_t actime; /* access time */ + time_t modtime; /* modification time */ + }; +#endif + +#if _INTEGRAL_MAX_BITS >= 64 +struct __utimbuf64 { + __time64_t actime; /* access time */ + __time64_t modtime; /* modification time */ + }; +#endif + +#define _UTIMBUF_DEFINED +#endif + + +/* Function Prototypes */ + +_CRTIMP int __cdecl _utime(const char *, struct _utimbuf *); + +_CRTIMP int __cdecl _futime(int, struct _utimbuf *); + +/* Wide Function Prototypes */ +_CRTIMP int __cdecl _wutime(const wchar_t *, struct _utimbuf *); + +#if _INTEGRAL_MAX_BITS >= 64 +_CRTIMP int __cdecl _utime64(const char *, struct __utimbuf64 *); +_CRTIMP int __cdecl _futime64(int, struct __utimbuf64 *); +_CRTIMP int __cdecl _wutime64(const wchar_t *, struct __utimbuf64 *); +#endif + +#if !__STDC__ +/* Non-ANSI name for compatibility */ +_CRTIMP int __cdecl utime(const char *, struct utimbuf *); +#endif + +#ifdef __cplusplus +} +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_UTIME */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/tchar.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/tchar.h new file mode 100644 index 00000000..5a4cf77f --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/tchar.h @@ -0,0 +1,1100 @@ +/*** +*tchar.h - definitions for generic international text functions +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* Definitions for generic international functions, mostly defines +* which map string/formatted-io/ctype functions to char, wchar_t, or +* MBCS versions. To be used for compatibility between single-byte, +* multi-byte and Unicode text models. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 /*IFSTRIP=IGN*/ +#pragma once +#endif + +#ifndef _INC_TCHAR +#define _INC_TCHAR + +#ifdef _MSC_VER +#pragma warning(disable:4514) /* disable unwanted C++ /W4 warning */ +/* #pragma warning(default:4514) */ /* use this to reenable, if necessary */ +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef CRTDLL +#define _CRTIMP __declspec(dllexport) +#else /* ndef CRTDLL */ +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* CRTDLL */ +#endif /* _CRTIMP */ + + +#define _ftcscat _tcscat +#define _ftcschr _tcschr +#define _ftcscpy _tcscpy +#define _ftcscspn _tcscspn +#define _ftcslen _tcslen +#define _ftcsncat _tcsncat +#define _ftcsncpy _tcsncpy +#define _ftcspbrk _tcspbrk +#define _ftcsrchr _tcsrchr +#define _ftcsspn _tcsspn +#define _ftcsstr _tcsstr +#define _ftcstok _tcstok + +#define _ftcsdup _tcsdup +#define _ftcsnset _tcsnset +#define _ftcsrev _tcsrev +#define _ftcsset _tcsset + +#define _ftcscmp _tcscmp +#define _ftcsicmp _tcsicmp +#define _ftcsnccmp _tcsnccmp +#define _ftcsncmp _tcsncmp +#define _ftcsncicmp _tcsncicmp +#define _ftcsnicmp _tcsnicmp + +#define _ftcscoll _tcscoll +#define _ftcsicoll _tcsicoll +#define _ftcsnccoll _tcsnccoll +#define _ftcsncoll _tcsncoll +#define _ftcsncicoll _tcsncicoll +#define _ftcsnicoll _tcsnicoll + +/* Redundant "logical-character" mappings */ + +#define _ftcsclen _tcsclen +#define _ftcsnccat _tcsnccat +#define _ftcsnccpy _tcsnccpy +#define _ftcsncset _tcsncset + +#define _ftcsdec _tcsdec +#define _ftcsinc _tcsinc +#define _ftcsnbcnt _tcsnbcnt +#define _ftcsnccnt _tcsnccnt +#define _ftcsnextc _tcsnextc +#define _ftcsninc _tcsninc +#define _ftcsspnp _tcsspnp + +#define _ftcslwr _tcslwr +#define _ftcsupr _tcsupr + +#define _ftclen _tclen +#define _ftccpy _tccpy +#define _ftccmp _tccmp + + +#ifdef _UNICODE + +#ifdef __cplusplus +} /* ... extern "C" */ +#endif + +/* ++++++++++++++++++++ UNICODE ++++++++++++++++++++ */ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +#ifndef _WCTYPE_T_DEFINED +typedef unsigned short wint_t; +typedef unsigned short wctype_t; +#define _WCTYPE_T_DEFINED +#endif + +#ifndef __TCHAR_DEFINED +typedef wchar_t _TCHAR; +typedef wchar_t _TSCHAR; +typedef wchar_t _TUCHAR; +typedef wchar_t _TXCHAR; +typedef wint_t _TINT; +#define __TCHAR_DEFINED +#endif + +#ifndef _TCHAR_DEFINED +#if !__STDC__ +typedef wchar_t TCHAR; +#endif +#define _TCHAR_DEFINED +#endif + +#define _TEOF WEOF + +#define __T(x) L ## x + + +/* Program */ + +#define _tmain wmain +#define _tWinMain wWinMain +#define _tenviron _wenviron +#define __targv __wargv + +/* Formatted i/o */ + +#define _tprintf wprintf +#define _tcprintf _cwprintf +#define _ftprintf fwprintf +#define _stprintf swprintf +#define _sctprintf _scwprintf +#define _sntprintf _snwprintf +#define _vtprintf vwprintf +#define _vftprintf vfwprintf +#define _vstprintf vswprintf +#define _vsctprintf _vscwprintf +#define _vsntprintf _vsnwprintf +#define _tscanf wscanf +#define _tcscanf _cwscanf +#define _ftscanf fwscanf +#define _stscanf swscanf +#define _sntscanf _snwscanf + + +/* Unformatted i/o */ + +#define _fgettc fgetwc +#define _fgettchar _fgetwchar +#define _fgetts fgetws +#define _fputtc fputwc +#define _fputtchar _fputwchar +#define _fputts fputws +#define _cputts _cputws +#define _cgetts _cgetws +#define _gettc getwc +#define _gettch _getwch +#define _gettche _getwche +#define _gettchar getwchar +#define _getts _getws +#define _puttc putwc +#define _puttchar putwchar +#define _puttch _putwch +#define _putts _putws +#define _ungettc ungetwc +#define _ungettch _ungetwch + + +/* String conversion functions */ + +#define _tcstod wcstod +#define _tcstol wcstol +#define _tcstoul wcstoul +#define _tcstoi64 _wcstoi64 +#define _tcstoui64 _wcstoui64 +#define _tstof _wtof +#define _tstol _wtol +#define _tstoi _wtoi +#define _tstoi64 _wtoi64 + +#define _itot _itow +#define _ltot _ltow +#define _ultot _ultow +#define _ttoi _wtoi +#define _ttol _wtol + +#define _ttoi64 _wtoi64 +#define _i64tot _i64tow +#define _ui64tot _ui64tow + +/* String functions */ + +#define _tcscat wcscat +#define _tcschr wcschr +#define _tcscpy wcscpy +#define _tcscspn wcscspn +#define _tcslen wcslen +#define _tcsncat wcsncat +#define _tcsncpy wcsncpy +#define _tcspbrk wcspbrk +#define _tcsrchr wcsrchr +#define _tcsspn wcsspn +#define _tcsstr wcsstr +#define _tcstok wcstok +#define _tcserror _wcserror +#define __tcserror __wcserror + +#define _tcsdup _wcsdup +#define _tcsnset _wcsnset +#define _tcsrev _wcsrev +#define _tcsset _wcsset + +#define _tcscmp wcscmp +#define _tcsicmp _wcsicmp +#define _tcsnccmp wcsncmp +#define _tcsncmp wcsncmp +#define _tcsncicmp _wcsnicmp +#define _tcsnicmp _wcsnicmp + +#define _tcscoll wcscoll +#define _tcsicoll _wcsicoll +#define _tcsnccoll _wcsncoll +#define _tcsncoll _wcsncoll +#define _tcsncicoll _wcsnicoll +#define _tcsnicoll _wcsnicoll + + +/* Execute functions */ + +#define _texecl _wexecl +#define _texecle _wexecle +#define _texeclp _wexeclp +#define _texeclpe _wexeclpe +#define _texecv _wexecv +#define _texecve _wexecve +#define _texecvp _wexecvp +#define _texecvpe _wexecvpe + +#define _tspawnl _wspawnl +#define _tspawnle _wspawnle +#define _tspawnlp _wspawnlp +#define _tspawnlpe _wspawnlpe +#define _tspawnv _wspawnv +#define _tspawnve _wspawnve +#define _tspawnvp _wspawnvp +#define _tspawnvp _wspawnvp +#define _tspawnvpe _wspawnvpe + +#define _tsystem _wsystem + + +/* Time functions */ + +#define _tasctime _wasctime +#define _tctime _wctime +#define _tctime64 _wctime64 +#define _tstrdate _wstrdate +#define _tstrtime _wstrtime +#define _tutime _wutime +#define _tutime64 _wutime64 +#define _tcsftime wcsftime + + +/* Directory functions */ + +#define _tchdir _wchdir +#define _tgetcwd _wgetcwd +#define _tgetdcwd _wgetdcwd +#define _tmkdir _wmkdir +#define _trmdir _wrmdir + + +/* Environment/Path functions */ + +#define _tfullpath _wfullpath +#define _tgetenv _wgetenv +#define _tmakepath _wmakepath +#define _tpgmptr _wpgmptr +#define _tputenv _wputenv +#define _tsearchenv _wsearchenv +#define _tsplitpath _wsplitpath + + +/* Stdio functions */ + +#define _tfdopen _wfdopen +#define _tfsopen _wfsopen +#define _tfopen _wfopen +#define _tfreopen _wfreopen +#define _tperror _wperror +#define _tpopen _wpopen +#define _ttempnam _wtempnam +#define _ttmpnam _wtmpnam + + +/* Io functions */ + +#define _taccess _waccess +#define _tchmod _wchmod +#define _tcreat _wcreat +#define _tfindfirst _wfindfirst +#define _tfindfirst64 _wfindfirst64 +#define _tfindfirsti64 _wfindfirsti64 +#define _tfindnext _wfindnext +#define _tfindnext64 _wfindnext64 +#define _tfindnexti64 _wfindnexti64 +#define _tmktemp _wmktemp +#define _topen _wopen +#define _tremove _wremove +#define _trename _wrename +#define _tsopen _wsopen +#define _tunlink _wunlink + +#define _tfinddata_t _wfinddata_t +#define _tfinddata64_t __wfinddata64_t +#define _tfinddatai64_t _wfinddatai64_t + + +/* Stat functions */ + +#define _tstat _wstat +#define _tstat64 _wstat64 +#define _tstati64 _wstati64 + + +/* Setlocale functions */ + +#define _tsetlocale _wsetlocale + + +/* Redundant "logical-character" mappings */ + +#define _tcsclen wcslen +#define _tcsnccat wcsncat +#define _tcsnccpy wcsncpy +#define _tcsncset _wcsnset + +#define _tcsdec _wcsdec +#define _tcsinc _wcsinc +#define _tcsnbcnt _wcsncnt +#define _tcsnccnt _wcsncnt +#define _tcsnextc _wcsnextc +#define _tcsninc _wcsninc +#define _tcsspnp _wcsspnp + +#define _tcslwr _wcslwr +#define _tcsupr _wcsupr +#define _tcsxfrm wcsxfrm + + +#if __STDC__ || defined(_NO_INLINING) +#define _tclen(_pc) (1) +#define _tccpy(_pc1,_cpc2) ((*(_pc1) = *(_cpc2))) +#define _tccmp(_cpc1,_cpc2) ((*(_cpc1))-(*(_cpc2))) +#else /* __STDC__ */ +__inline size_t __cdecl _tclen(const wchar_t *_cpc) +{ + /* avoid compiler warning */ + (void *)_cpc; + return 1; +} +__inline void __cdecl _tccpy(wchar_t *_pc1, const wchar_t *_cpc2) { *_pc1 = (wchar_t)*_cpc2; } +__inline int __cdecl _tccmp(const wchar_t *_cpc1, const wchar_t *_cpc2) { return (int) ((*_cpc1)-(*_cpc2)); } +#endif /* __STDC__ */ + + +/* ctype functions */ + +#define _istalnum iswalnum +#define _istalpha iswalpha +#define _istascii iswascii +#define _istcntrl iswcntrl +#define _istdigit iswdigit +#define _istgraph iswgraph +#define _istlower iswlower +#define _istprint iswprint +#define _istpunct iswpunct +#define _istspace iswspace +#define _istupper iswupper +#define _istxdigit iswxdigit + +#define _totupper towupper +#define _totlower towlower + +#define _istlegal(_c) (1) +#define _istlead(_c) (0) +#define _istleadbyte(_c) (0) + + +#if __STDC__ || defined(_NO_INLINING) +#define _wcsdec(_cpc1, _cpc2) ((_cpc1)>=(_cpc2) ? NULL : (_cpc2)-1) +#define _wcsinc(_pc) ((_pc)+1) +#define _wcsnextc(_cpc) ((unsigned int) *(_cpc)) +#define _wcsninc(_pc, _sz) (((_pc)+(_sz))) +#define _wcsncnt(_cpc, _sz) ((wcslen(_cpc)>_sz) ? _sz : wcslen(_cpc)) +#define _wcsspnp(_cpc1, _cpc2) ((*((_cpc1)+wcsspn(_cpc1,_cpc2))) ? ((_cpc1)+wcsspn(_cpc1,_cpc2)) : NULL) +#else /* __STDC__ */ +__inline wchar_t * __cdecl _wcsdec(const wchar_t * _cpc1, const wchar_t * _cpc2) { return (wchar_t *)((_cpc1)>=(_cpc2) ? NULL : ((_cpc2)-1)); } +__inline wchar_t * __cdecl _wcsinc(const wchar_t * _pc) { return (wchar_t *)(_pc+1); } +__inline unsigned int __cdecl _wcsnextc(const wchar_t * _cpc) { return (unsigned int)*_cpc; } +__inline wchar_t * __cdecl _wcsninc(const wchar_t * _pc, size_t _sz) { return (wchar_t *)(_pc+_sz); } +__inline size_t __cdecl _wcsncnt( const wchar_t * _cpc, size_t _sz) { size_t len; len = wcslen(_cpc); return (len>_sz) ? _sz : len; } +__inline wchar_t * __cdecl _wcsspnp( const wchar_t * _cpc1, const wchar_t * _cpc2) { return (*(_cpc1 += wcsspn(_cpc1,_cpc2))!='\0') ? (wchar_t*)_cpc1 : NULL; } +#endif /* __STDC__ */ + + +#else /* ndef _UNICODE */ + +/* ++++++++++++++++++++ SBCS and MBCS ++++++++++++++++++++ */ + +#ifdef __cplusplus +} /* ... extern "C" */ +#endif + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +#define _TEOF EOF + +#define __T(x) x + + +/* Program */ + +#define _tmain main +#define _tWinMain WinMain +#ifdef _POSIX_ +#define _tenviron environ +#else +#define _tenviron _environ +#endif +#define __targv __argv + + +/* Formatted i/o */ + +#define _tprintf printf +#define _tcprintf _cprintf +#define _ftprintf fprintf +#define _stprintf sprintf +#define _sctprintf _scprintf +#define _sntprintf _snprintf +#define _vtprintf vprintf +#define _vftprintf vfprintf +#define _vstprintf vsprintf +#define _vsctprintf _vscprintf +#define _vsntprintf _vsnprintf +#define _tscanf scanf +#define _tcscanf _cscanf +#define _ftscanf fscanf +#define _stscanf sscanf +#define _sntscanf _snscanf + + +/* Unformatted i/o */ + +#define _fgettc fgetc +#define _fgettchar _fgetchar +#define _fgetts fgets +#define _fputtc fputc +#define _fputtchar _fputchar +#define _fputts fputs +#define _cputts _cputs +#define _gettc getc +#define _gettch _getch +#define _gettche _getche +#define _gettchar getchar +#define _getts gets +#define _cgetts _cgets +#define _puttc putc +#define _puttchar putchar +#define _puttch _putch +#define _putts puts +#define _ungettc ungetc +#define _ungettch _ungetch + + +/* String conversion functions */ + +#define _tcstod strtod +#define _tcstol strtol +#define _tcstoul strtoul +#define _tstof atof +#define _tstol atol +#define _tstoi atoi +#define _tstoi64 _atoi64 + +#define _itot _itoa +#define _ltot _ltoa +#define _ultot _ultoa +#define _ttoi atoi +#define _ttol atol + +#define _ttoi64 _atoi64 +#define _tcstoi64 _strtoi64 +#define _tcstoui64 _strtoui64 +#define _i64tot _i64toa +#define _ui64tot _ui64toa + +/* String functions */ + +/* Note that _mbscat, _mbscpy and _mbsdup are functionally equivalent to + strcat, strcpy and strdup, respectively. */ + +#define _tcscat strcat +#define _tcscpy strcpy +#define _tcsdup _strdup + +#define _tcslen strlen +#define _tcsxfrm strxfrm +#define _tcserror strerror +#define __tcserror _strerror + + +/* Execute functions */ + +#define _texecl _execl +#define _texecle _execle +#define _texeclp _execlp +#define _texeclpe _execlpe +#define _texecv _execv +#define _texecve _execve +#define _texecvp _execvp +#define _texecvpe _execvpe + +#define _tspawnl _spawnl +#define _tspawnle _spawnle +#define _tspawnlp _spawnlp +#define _tspawnlpe _spawnlpe +#define _tspawnv _spawnv +#define _tspawnve _spawnve +#define _tspawnvp _spawnvp +#define _tspawnvpe _spawnvpe + +#define _tsystem system + + +/* Time functions */ + +#define _tasctime asctime +#define _tctime ctime +#define _tctime64 _ctime64 +#define _tstrdate _strdate +#define _tstrtime _strtime +#define _tutime _utime +#define _tutime64 _utime64 +#define _tcsftime strftime + + +/* Directory functions */ + +#define _tchdir _chdir +#define _tgetcwd _getcwd +#define _tgetdcwd _getdcwd +#define _tmkdir _mkdir +#define _trmdir _rmdir + + +/* Environment/Path functions */ + +#define _tfullpath _fullpath +#define _tgetenv getenv +#define _tmakepath _makepath +#define _tpgmptr _pgmptr +#define _tputenv _putenv +#define _tsearchenv _searchenv +#define _tsplitpath _splitpath + + +/* Stdio functions */ + +#ifdef _POSIX_ +#define _tfdopen fdopen +#else +#define _tfdopen _fdopen +#endif +#define _tfsopen _fsopen +#define _tfopen fopen +#define _tfreopen freopen +#define _tperror perror +#define _tpopen _popen +#define _ttempnam _tempnam +#define _ttmpnam tmpnam + + +/* Io functions */ + +#define _tchmod _chmod +#define _tcreat _creat +#define _tfindfirst _findfirst +#define _tfindfirst64 _findfirst64 +#define _tfindfirsti64 _findfirsti64 +#define _tfindnext _findnext +#define _tfindnext64 _findnext64 +#define _tfindnexti64 _findnexti64 +#define _tmktemp _mktemp + +#ifdef _POSIX_ +#define _topen open +#define _taccess access +#else +#define _topen _open +#define _taccess _access +#endif + +#define _tremove remove +#define _trename rename +#define _tsopen _sopen +#define _tunlink _unlink + +#define _tfinddata_t _finddata_t +#define _tfinddata64_t __finddata64_t +#define _tfinddatai64_t _finddatai64_t + + +/* ctype functions */ + +#define _istascii isascii +#define _istcntrl iscntrl +#define _istxdigit isxdigit + + +/* Stat functions */ + +#define _tstat _stat +#define _tstat64 _stat64 +#define _tstati64 _stati64 + + +/* Setlocale functions */ + +#define _tsetlocale setlocale + + +#ifdef _MBCS + +/* ++++++++++++++++++++ MBCS ++++++++++++++++++++ */ + +#ifdef __cplusplus +} /* ... extern "C" */ +#endif + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +#ifndef __TCHAR_DEFINED +typedef char _TCHAR; +typedef signed char _TSCHAR; +typedef unsigned char _TUCHAR; +typedef unsigned char _TXCHAR; +typedef unsigned int _TINT; +#define __TCHAR_DEFINED +#endif + +#ifndef _TCHAR_DEFINED +#if !__STDC__ +typedef char TCHAR; +#endif +#define _TCHAR_DEFINED +#endif + + +#ifdef _MB_MAP_DIRECT + +/* use mb functions directly - types must match */ + +/* String functions */ + +#define _tcschr _mbschr +#define _tcscspn _mbscspn +#define _tcsncat _mbsnbcat +#define _tcsncpy _mbsnbcpy +#define _tcspbrk _mbspbrk +#define _tcsrchr _mbsrchr +#define _tcsspn _mbsspn +#define _tcsstr _mbsstr +#define _tcstok _mbstok + +#define _tcsnset _mbsnbset +#define _tcsrev _mbsrev +#define _tcsset _mbsset + +#define _tcscmp _mbscmp +#define _tcsicmp _mbsicmp +#define _tcsnccmp _mbsncmp +#define _tcsncmp _mbsnbcmp +#define _tcsncicmp _mbsnicmp +#define _tcsnicmp _mbsnbicmp + +#define _tcscoll _mbscoll +#define _tcsicoll _mbsicoll +#define _tcsnccoll _mbsncoll +#define _tcsncoll _mbsnbcoll +#define _tcsncicoll _mbsnicoll +#define _tcsnicoll _mbsnbicoll + + +/* "logical-character" mappings */ + +#define _tcsclen _mbslen +#define _tcsnccat _mbsncat +#define _tcsnccpy _mbsncpy +#define _tcsncset _mbsnset + + +/* MBCS-specific mappings */ + +#define _tcsdec _mbsdec +#define _tcsinc _mbsinc +#define _tcsnbcnt _mbsnbcnt +#define _tcsnccnt _mbsnccnt +#define _tcsnextc _mbsnextc +#define _tcsninc _mbsninc +#define _tcsspnp _mbsspnp + +#define _tcslwr _mbslwr +#define _tcsupr _mbsupr + +#define _tclen _mbclen +#define _tccpy _mbccpy + +#define _tccmp(_cpuc1,_cpuc2) _tcsnccmp(_cpuc1,_cpuc2,1) + + +#else /* _MB_MAP_DIRECT */ + +#if __STDC__ || defined(_NO_INLINING) + +/* use type-safe linked-in function thunks */ + +/* String functions */ + +_CRTIMP char * __cdecl _tcschr(const char *, unsigned int); +_CRTIMP size_t __cdecl _tcscspn(const char *, const char *); +_CRTIMP char * __cdecl _tcsncat(char *, const char *, size_t); +_CRTIMP char * __cdecl _tcsncpy(char *, const char *, size_t); +_CRTIMP char * __cdecl _tcspbrk(const char *, const char *); +_CRTIMP char * __cdecl _tcsrchr(const char *, int); +_CRTIMP size_t __cdecl _tcsspn(const char *, const char *); +_CRTIMP char * __cdecl _tcsstr(const char *, const char *); +_CRTIMP char * __cdecl _tcstok(char *, const char *); + +_CRTIMP char * __cdecl _tcsnset(char *, unsigned int, size_t); +_CRTIMP char * __cdecl _tcsrev(char *); +_CRTIMP char * __cdecl _tcsset(char *, unsigned int); + +_CRTIMP int __cdecl _tcscmp(const char *, const char *); +_CRTIMP int __cdecl _tcsicmp(const char *, const char *); +_CRTIMP int __cdecl _tcsnccmp(const char *, const char *, size_t); +_CRTIMP int __cdecl _tcsncmp(const char *, const char *, size_t); +_CRTIMP int __cdecl _tcsncicmp(const char *, const char *, size_t); +_CRTIMP int __cdecl _tcsnicmp(const char *, const char *, size_t); + +_CRTIMP int __cdecl _tcscoll(const char *, const char *); +_CRTIMP int __cdecl _tcsicoll(const char *, const char *); +_CRTIMP int __cdecl _tcsnccoll(const char *, const char *, size_t); +_CRTIMP int __cdecl _tcsncoll(const char *, const char *, size_t); +_CRTIMP int __cdecl _tcsncicoll(const char *, const char *, size_t); +_CRTIMP int __cdecl _tcsnicoll(const char *, const char *, size_t); + + +/* "logical-character" mappings */ + +_CRTIMP size_t __cdecl _tcsclen(const char *); +_CRTIMP char * __cdecl _tcsnccat(char *, const char *, size_t); +_CRTIMP char * __cdecl _tcsnccpy(char *, const char *, size_t); +_CRTIMP char * __cdecl _tcsncset(char *, unsigned int, size_t); + + +/* MBCS-specific mappings */ + +_CRTIMP char * __cdecl _tcsdec(const char *, const char *); +_CRTIMP char * __cdecl _tcsinc(const char *); +_CRTIMP size_t __cdecl _tcsnbcnt(const char *, size_t); +_CRTIMP size_t __cdecl _tcsnccnt(const char *, size_t); +_CRTIMP unsigned int __cdecl _tcsnextc (const char *); +_CRTIMP char * __cdecl _tcsninc(const char *, size_t); +_CRTIMP char * __cdecl _tcsspnp(const char *, const char *); + +_CRTIMP char * __cdecl _tcslwr(char *); +_CRTIMP char * __cdecl _tcsupr(char *); + +_CRTIMP size_t __cdecl _tclen(const char *); +_CRTIMP void __cdecl _tccpy(char *, const char *); + + +#else /* __STDC__ */ + +/* the default: use type-safe inline function thunks */ + +#define _PUC unsigned char * +#define _CPUC const unsigned char * +#define _PC char * +#define _CPC const char * +#define _UI unsigned int + + +/* String functions */ + +__inline _PC _tcschr(_CPC _s1,_UI _c) {return (_PC)_mbschr((_CPUC)_s1,_c);} +__inline size_t _tcscspn(_CPC _s1,_CPC _s2) {return _mbscspn((_CPUC)_s1,(_CPUC)_s2);} +__inline _PC _tcsncat(_PC _s1,_CPC _s2,size_t _n) {return (_PC)_mbsnbcat((_PUC)_s1,(_CPUC)_s2,_n);} +__inline _PC _tcsncpy(_PC _s1,_CPC _s2,size_t _n) {return (_PC)_mbsnbcpy((_PUC)_s1,(_CPUC)_s2,_n);} +__inline _PC _tcspbrk(_CPC _s1,_CPC _s2) {return (_PC)_mbspbrk((_CPUC)_s1,(_CPUC)_s2);} +__inline _PC _tcsrchr(_CPC _s1,_UI _c) {return (_PC)_mbsrchr((_CPUC)_s1,_c);} +__inline size_t _tcsspn(_CPC _s1,_CPC _s2) {return _mbsspn((_CPUC)_s1,(_CPUC)_s2);} +__inline _PC _tcsstr(_CPC _s1,_CPC _s2) {return (_PC)_mbsstr((_CPUC)_s1,(_CPUC)_s2);} +__inline _PC _tcstok(_PC _s1,_CPC _s2) {return (_PC)_mbstok((_PUC)_s1,(_CPUC)_s2);} + +__inline _PC _tcsnset(_PC _s1,_UI _c,size_t _n) {return (_PC)_mbsnbset((_PUC)_s1,_c,_n);} +__inline _PC _tcsrev(_PC _s1) {return (_PC)_mbsrev((_PUC)_s1);} +__inline _PC _tcsset(_PC _s1,_UI _c) {return (_PC)_mbsset((_PUC)_s1,_c);} + +__inline int _tcscmp(_CPC _s1,_CPC _s2) {return _mbscmp((_CPUC)_s1,(_CPUC)_s2);} +__inline int _tcsicmp(_CPC _s1,_CPC _s2) {return _mbsicmp((_CPUC)_s1,(_CPUC)_s2);} +__inline int _tcsnccmp(_CPC _s1,_CPC _s2,size_t _n) {return _mbsncmp((_CPUC)_s1,(_CPUC)_s2,_n);} +__inline int _tcsncmp(_CPC _s1,_CPC _s2,size_t _n) {return _mbsnbcmp((_CPUC)_s1,(_CPUC)_s2,_n);} +__inline int _tcsncicmp(_CPC _s1,_CPC _s2,size_t _n) {return _mbsnicmp((_CPUC)_s1,(_CPUC)_s2,_n);} +__inline int _tcsnicmp(_CPC _s1,_CPC _s2,size_t _n) {return _mbsnbicmp((_CPUC)_s1,(_CPUC)_s2,_n);} + +__inline int _tcscoll(_CPC _s1,_CPC _s2) {return _mbscoll((_CPUC)_s1,(_CPUC)_s2);} +__inline int _tcsicoll(_CPC _s1,_CPC _s2) {return _mbsicoll((_CPUC)_s1,(_CPUC)_s2);} +__inline int _tcsnccoll(_CPC _s1,_CPC _s2,size_t _n) {return _mbsncoll((_CPUC)_s1,(_CPUC)_s2,_n);} +__inline int _tcsncoll(_CPC _s1,_CPC _s2,size_t _n) {return _mbsnbcoll((_CPUC)_s1,(_CPUC)_s2,_n);} +__inline int _tcsncicoll(_CPC _s1,_CPC _s2,size_t _n) {return _mbsnicoll((_CPUC)_s1,(_CPUC)_s2,_n);} +__inline int _tcsnicoll(_CPC _s1,_CPC _s2,size_t _n) {return _mbsnbicoll((_CPUC)_s1,(_CPUC)_s2,_n);} + + +/* "logical-character" mappings */ + +__inline size_t _tcsclen(_CPC _s1) {return _mbslen((_CPUC)_s1);} +__inline _PC _tcsnccat(_PC _s1,_CPC _s2,size_t _n) {return (_PC)_mbsncat((_PUC)_s1,(_CPUC)_s2,_n);} +__inline _PC _tcsnccpy(_PC _s1,_CPC _s2,size_t _n) {return (_PC)_mbsncpy((_PUC)_s1,(_CPUC)_s2,_n);} +__inline _PC _tcsncset(_PC _s1,_UI _c,size_t _n) {return (_PC)_mbsnset((_PUC)_s1,_c,_n);} + + +/* MBCS-specific mappings */ + +__inline _PC _tcsdec(_CPC _s1,_CPC _s2) {return (_PC)_mbsdec((_CPUC)_s1,(_CPUC)_s2);} +__inline _PC _tcsinc(_CPC _s1) {return (_PC)_mbsinc((_CPUC)_s1);} +__inline size_t _tcsnbcnt(_CPC _s1,size_t _n) {return _mbsnbcnt((_CPUC)_s1,_n);} +__inline size_t _tcsnccnt(_CPC _s1,size_t _n) {return _mbsnccnt((_CPUC)_s1,_n);} +__inline _PC _tcsninc(_CPC _s1,size_t _n) {return (_PC)_mbsninc((_CPUC)_s1,_n);} +__inline _PC _tcsspnp(_CPC _s1,_CPC _s2) {return (_PC)_mbsspnp((_CPUC)_s1,(_CPUC)_s2);} +__inline _PC _tcslwr(_PC _s1) {return (_PC)_mbslwr((_PUC)_s1);} +__inline _PC _tcsupr(_PC _s1) {return (_PC)_mbsupr((_PUC)_s1);} + +__inline size_t _tclen(_CPC _s1) {return _mbclen((_CPUC)_s1);} +__inline void _tccpy(_PC _s1,_CPC _s2) {_mbccpy((_PUC)_s1,(_CPUC)_s2); return;} + + +/* inline helper */ +__inline _UI _tcsnextc(_CPC _s1) +{ + _UI _n=0; + if (_ismbblead((_UI)*(_PUC)_s1)) + { + /* for a dud MBCS string (leadbyte, EOS), we don't move forward 2 + We do not assert here because this routine is too low-level + */ + if(_s1[1]!='\0') + { + _n=((_UI)*(_PUC)_s1)<<8; + _s1++; + } + } + _n+=(_UI)*(_PUC)_s1; + + return(_n); +} + + +#endif /* __STDC__ */ + +#endif /* _MB_MAP_DIRECT */ + + +/* MBCS-specific mappings */ + +#define _tccmp(_cp1,_cp2) _tcsnccmp(_cp1,_cp2,1) + + +/* ctype functions */ + +#define _istalnum _ismbcalnum +#define _istalpha _ismbcalpha +#define _istdigit _ismbcdigit +#define _istgraph _ismbcgraph +#define _istlegal _ismbclegal +#define _istlower _ismbclower +#define _istprint _ismbcprint +#define _istpunct _ismbcpunct +#define _istspace _ismbcspace +#define _istupper _ismbcupper + +#define _totupper _mbctoupper +#define _totlower _mbctolower + +#define _istlead _ismbblead +#define _istleadbyte isleadbyte + +#else /* !_MBCS */ + +/* ++++++++++++++++++++ SBCS ++++++++++++++++++++ */ + + +#ifndef __TCHAR_DEFINED +typedef char _TCHAR; +typedef signed char _TSCHAR; +typedef unsigned char _TUCHAR; +typedef char _TXCHAR; +typedef int _TINT; +#define __TCHAR_DEFINED +#endif + +#ifndef _TCHAR_DEFINED +#if !__STDC__ +typedef char TCHAR; +#endif +#define _TCHAR_DEFINED +#endif + + +/* String functions */ + +#define _tcschr strchr +#define _tcscspn strcspn +#define _tcsncat strncat +#define _tcsncpy strncpy +#define _tcspbrk strpbrk +#define _tcsrchr strrchr +#define _tcsspn strspn +#define _tcsstr strstr +#define _tcstok strtok + +#define _tcsnset _strnset +#define _tcsrev _strrev +#define _tcsset _strset + +#define _tcscmp strcmp +#define _tcsicmp _stricmp +#define _tcsnccmp strncmp +#define _tcsncmp strncmp +#define _tcsncicmp _strnicmp +#define _tcsnicmp _strnicmp + +#define _tcscoll strcoll +#define _tcsicoll _stricoll +#define _tcsnccoll _strncoll +#define _tcsncoll _strncoll +#define _tcsncicoll _strnicoll +#define _tcsnicoll _strnicoll + + +/* "logical-character" mappings */ + +#define _tcsclen strlen +#define _tcsnccat strncat +#define _tcsnccpy strncpy +#define _tcsncset _strnset + + +/* MBCS-specific functions */ + +#define _tcsdec _strdec +#define _tcsinc _strinc +#define _tcsnbcnt _strncnt +#define _tcsnccnt _strncnt +#define _tcsnextc _strnextc +#define _tcsninc _strninc +#define _tcsspnp _strspnp + +#define _tcslwr _strlwr +#define _tcsupr _strupr +#define _tcsxfrm strxfrm + +#define _istlead(_c) (0) +#define _istleadbyte(_c) (0) + +#if __STDC__ || defined(_NO_INLINING) +#define _tclen(_pc) (1) +#define _tccpy(_pc1,_cpc2) (*(_pc1) = *(_cpc2)) +#define _tccmp(_cpc1,_cpc2) (((unsigned char)*(_cpc1))-((unsigned char)*(_cpc2))) +#else /* __STDC__ */ +__inline size_t __cdecl _tclen(const char *_cpc) +{ + /* avoid compiler warning */ + (void *)_cpc; + return 1; +} +__inline void __cdecl _tccpy(char *_pc1, const char *_cpc2) { *_pc1 = *_cpc2; } +__inline int __cdecl _tccmp(const char *_cpc1, const char *_cpc2) { return (int) (((unsigned char)*_cpc1)-((unsigned char)*_cpc2)); } +#endif /* __STDC__ */ + + +/* ctype-functions */ + +#define _istalnum isalnum +#define _istalpha isalpha +#define _istdigit isdigit +#define _istgraph isgraph +#define _istlower islower +#define _istprint isprint +#define _istpunct ispunct +#define _istspace isspace +#define _istupper isupper + +#define _totupper toupper +#define _totlower tolower + +#define _istlegal(_c) (1) + + +/* the following is optional if functional versions are available */ + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +#if __STDC__ || defined(_NO_INLINING) +#define _strdec(_cpc1, _cpc2) ((_cpc1)>=(_cpc2) ? NULL : (_cpc2)-1) +#define _strinc(_pc) ((_pc)+1) +#define _strnextc(_cpc) ((unsigned int) *(const unsigned char *)(_cpc)) +#define _strninc(_pc, _sz) (((_pc)+(_sz))) +#define _strncnt(_cpc, _sz) ((strlen(_cpc)>_sz) ? _sz : strlen(_cpc)) +#define _strspnp(_cpc1, _cpc2) ((*((_cpc1)+strspn(_cpc1,_cpc2))) ? ((_cpc1)+strspn(_cpc1,_cpc2)) : NULL) +#else /* __STDC__ */ +__inline char * __cdecl _strdec(const char * _cpc1, const char * _cpc2) { return (char *)((_cpc1)>=(_cpc2) ? NULL : (_cpc2-1)); } +__inline char * __cdecl _strinc(const char * _pc) { return (char *)(_pc+1); } +__inline unsigned int __cdecl _strnextc(const char * _cpc) { return (unsigned int)*(const unsigned char *)_cpc; } +__inline char * __cdecl _strninc(const char * _pc, size_t _sz) { return (char *)(_pc+_sz); } +__inline size_t __cdecl _strncnt( const char * _cpc, size_t _sz) { size_t len; len = strlen(_cpc); return (len>_sz) ? _sz : len; } +__inline char * __cdecl _strspnp( const char * _cpc1, const char * _cpc2) { return (*(_cpc1 += strspn(_cpc1,_cpc2))!='\0') ? (char*)_cpc1 : NULL; } +#endif /* __STDC__ */ + + +#endif /* _MBCS */ + +#endif /* _UNICODE */ + + +/* Generic text macros to be used with string literals and character constants. + Will also allow symbolic constants that resolve to same. */ + +#define _T(x) __T(x) +#define _TEXT(x) __T(x) + + +#ifdef __cplusplus +} /* ... extern "C" */ +#endif + +#endif /* _INC_TCHAR */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/time.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/time.h new file mode 100644 index 00000000..cba81a6b --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/time.h @@ -0,0 +1,236 @@ +/*** +*time.h - definitions/declarations for time routines +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file has declarations of time routines and defines +* the structure returned by the localtime and gmtime routines and +* used by asctime. +* [ANSI/System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_TIME +#define _INC_TIME + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +/* + * Currently, all MS C compilers for Win32 platforms default to 8 byte + * alignment. + */ +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +/* Define the implementation defined time type */ + +#ifndef _TIME_T_DEFINED +#ifdef _WIN64 +typedef __int64 time_t; /* time value */ +#else +typedef _W64 long time_t; /* time value */ +#endif +#define _TIME_T_DEFINED /* avoid multiple def's of time_t */ +#endif + +#ifndef _TIME64_T_DEFINED +#if _INTEGRAL_MAX_BITS >= 64 +typedef __int64 __time64_t; /* 64-bit time value */ +#endif +#define _TIME64_T_DEFINED +#endif + +#ifndef _CLOCK_T_DEFINED +typedef long clock_t; +#define _CLOCK_T_DEFINED +#endif + +#ifndef _SIZE_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 size_t; +#else +typedef _W64 unsigned int size_t; +#endif +#define _SIZE_T_DEFINED +#endif + + +/* Define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +#ifndef _TM_DEFINED +struct tm { + int tm_sec; /* seconds after the minute - [0,59] */ + int tm_min; /* minutes after the hour - [0,59] */ + int tm_hour; /* hours since midnight - [0,23] */ + int tm_mday; /* day of the month - [1,31] */ + int tm_mon; /* months since January - [0,11] */ + int tm_year; /* years since 1900 */ + int tm_wday; /* days since Sunday - [0,6] */ + int tm_yday; /* days since January 1 - [0,365] */ + int tm_isdst; /* daylight savings time flag */ + }; +#define _TM_DEFINED +#endif + + +/* Clock ticks macro - ANSI version */ + +#define CLOCKS_PER_SEC 1000 + + +/* Extern declarations for the global variables used by the ctime family of + * routines. + */ + +/* non-zero if daylight savings time is used */ +_CRTIMP extern int _daylight; + +/* offset for Daylight Saving Time */ +_CRTIMP extern long _dstbias; + +/* difference in seconds between GMT and local time */ +_CRTIMP extern long _timezone; + +/* standard/daylight savings time zone names */ +_CRTIMP extern char * _tzname[2]; + + +/* Function prototypes */ + +_CRTIMP char * __cdecl asctime(const struct tm *); +_CRTIMP char * __cdecl ctime(const time_t *); +_CRTIMP clock_t __cdecl clock(void); +_CRTIMP double __cdecl difftime(time_t, time_t); +_CRTIMP struct tm * __cdecl gmtime(const time_t *); +_CRTIMP struct tm * __cdecl localtime(const time_t *); +_CRTIMP time_t __cdecl mktime(struct tm *); +_CRTIMP size_t __cdecl strftime(char *, size_t, const char *, + const struct tm *); +_CRTIMP char * __cdecl _strdate(char *); +_CRTIMP char * __cdecl _strtime(char *); +_CRTIMP time_t __cdecl time(time_t *); + +#ifdef _POSIX_ +_CRTIMP void __cdecl tzset(void); +#else +_CRTIMP void __cdecl _tzset(void); +#endif + +#if _INTEGRAL_MAX_BITS >= 64 +_CRTIMP char * __cdecl _ctime64(const __time64_t *); +_CRTIMP struct tm * __cdecl _gmtime64(const __time64_t *); +_CRTIMP struct tm * __cdecl _localtime64(const __time64_t *); +_CRTIMP __time64_t __cdecl _mktime64(struct tm *); +_CRTIMP __time64_t __cdecl _time64(__time64_t *); +#endif + +/* --------- The following functions are OBSOLETE --------- */ +/* The Win32 API GetLocalTime and SetLocalTime should be used instead. */ +unsigned __cdecl _getsystime(struct tm *); +unsigned __cdecl _setsystime(struct tm *, unsigned); +/* --------- The preceding functions are OBSOLETE --------- */ + + +#ifndef _SIZE_T_DEFINED +typedef unsigned int size_t; +#define _SIZE_T_DEFINED +#endif + +#ifndef _WTIME_DEFINED + +/* wide function prototypes, also declared in wchar.h */ + +_CRTIMP wchar_t * __cdecl _wasctime(const struct tm *); +_CRTIMP wchar_t * __cdecl _wctime(const time_t *); +_CRTIMP size_t __cdecl wcsftime(wchar_t *, size_t, const wchar_t *, + const struct tm *); +_CRTIMP wchar_t * __cdecl _wstrdate(wchar_t *); +_CRTIMP wchar_t * __cdecl _wstrtime(wchar_t *); + +#if _INTEGRAL_MAX_BITS >= 64 +_CRTIMP wchar_t * __cdecl _wctime64(const __time64_t *); +#endif + +#define _WTIME_DEFINED +#endif + + +#if !__STDC__ || defined(_POSIX_) + +/* Non-ANSI names for compatibility */ + +#define CLK_TCK CLOCKS_PER_SEC + +_CRTIMP extern int daylight; +_CRTIMP extern long timezone; +_CRTIMP extern char * tzname[2]; + +_CRTIMP void __cdecl tzset(void); + +#endif /* __STDC__ */ + + +#ifdef __cplusplus +} +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_TIME */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/typeinfo b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/typeinfo new file mode 100644 index 00000000..50709d77 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/typeinfo @@ -0,0 +1,102 @@ +/*** +*typeinfo.h - Defines the type_info structure and exceptions used for RTTI +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* Modified January 1996 by P.J. Plauger +* +*Purpose: +* Defines the type_info structure and exceptions used for +* Runtime Type Identification. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _TYPEINFO_ +#define _TYPEINFO_ +#include + + #ifndef __cplusplus + #error This header requires a C++ compiler ... + #endif + + #if !defined(_WIN32) + #error ERROR: Only Win32 target supported! + #endif + + #include + + _STD_BEGIN + #if _HAS_EXCEPTIONS +using ::type_info; +using ::bad_cast; +using ::bad_typeid; +using ::__non_rtti_object; + #else + // CLASS bad_cast +class _CRTIMP2 bad_cast + : public exception + { // base of all bad cast exceptions +public: + bad_cast(const char *_Message = "bad cast") _THROW0() + : exception(_Message) + { // construct from message string + } + + virtual ~bad_cast() _THROW0() + { // destroy the object + } + +protected: + virtual void _Doraise() const + { // perform class-specific exception handling + _RAISE(*this); + } + }; + + // CLASS bad_typeid +class _CRTIMP2 bad_typeid + : public exception + { // base of all bad typeid exceptions +public: + bad_typeid(const char *_Message = "bad typeid") _THROW0() + : exception(_Message) + { // construct from message string + } + + virtual ~bad_typeid() _THROW0() + { // destroy the object + } + +protected: + virtual void _Doraise() const + { // perform class-specific exception handling + _RAISE(*this); + } + }; + +class _CRTIMP2 __non_rtti_object + : public bad_typeid + { // report a non RTTI object +public: + __non_rtti_object(const char *_Message) + : bad_typeid(_Message) + { // construct from message string + } + }; + #endif /* _HAS_EXCEPTIONS */ + + _STD_END + +#endif // _TYPEINFO_ + +/* + * Copyright (c) Microsoft Corporation. All rights reserved. + * Modified January 1996 by P.J. Plauger + * Modified November 1998 by P.J. Plauger + * Consult your license regarding permissions and restrictions. + */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/typeinfo.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/typeinfo.h new file mode 100644 index 00000000..3c0e2d8c --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/typeinfo.h @@ -0,0 +1,88 @@ +/*** +*typeinfo.h - Defines the type_info structure and exceptions used for RTTI +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* Defines the type_info structure and exceptions used for +* Runtime Type Identification. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef __cplusplus +#error This header requires a C++ compiler ... +#endif + +#ifndef _INC_TYPEINFO +#define _INC_TYPEINFO + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + +class type_info { +public: + _CRTIMP virtual ~type_info(); + _CRTIMP int operator==(const type_info& rhs) const; + _CRTIMP int operator!=(const type_info& rhs) const; + _CRTIMP int before(const type_info& rhs) const; + _CRTIMP const char* name() const; + _CRTIMP const char* raw_name() const; +private: + void *_m_data; + char _m_d_name[1]; + type_info(const type_info& rhs); + type_info& operator=(const type_info& rhs); +}; + + +// This include must occur below the definition of class type_info +#include + +class _CRTIMP bad_cast : public exception { +public: + bad_cast(const char * _Message = "bad cast"); + bad_cast(const bad_cast &); + virtual ~bad_cast(); +}; + +class _CRTIMP bad_typeid : public exception { +public: + bad_typeid(const char * _Message = "bad typeid"); + bad_typeid(const bad_typeid &); + virtual ~bad_typeid(); +}; + +class _CRTIMP __non_rtti_object : public bad_typeid { +public: + __non_rtti_object(const char * _Message); + __non_rtti_object(const __non_rtti_object &); + virtual ~__non_rtti_object(); +}; + +#ifdef __RTTI_OLDNAMES +// Some synonyms for folks using older standard +typedef type_info Type_info; +typedef bad_cast Bad_cast; +typedef bad_typeid Bad_typeid; +#endif // __RTTI_OLDNAMES + + +#endif // _INC_TYPEINFO diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/use_ansi.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/use_ansi.h new file mode 100644 index 00000000..1867f9d4 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/use_ansi.h @@ -0,0 +1,46 @@ +/*** +*use_ansi.h - pragmas for ANSI Standard C++ libraries +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This header is intended to force the use of the appropriate ANSI +* Standard C++ libraries whenever it is included. +* +* [Public] +* +****/ + + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _USE_ANSI_CPP +#define _USE_ANSI_CPP + +#ifdef _MT +#if defined(_DLL) && !defined(_STATIC_CPPLIB) +#ifdef _DEBUG +#pragma comment(lib,"msvcprtd") +#else // _DEBUG +#pragma comment(lib,"msvcprt") +#endif // _DEBUG + +#else // _DLL && !STATIC_CPPLIB +#ifdef _DEBUG +#pragma comment(lib,"libcpmtd") +#else // _DEBUG +#pragma comment(lib,"libcpmt") +#endif // _DEBUG +#endif // _DLL && !STATIC_CPPLIB + +#else // _MT +#ifdef _DEBUG +#pragma comment(lib,"libcpd") +#else // _DEBUG +#pragma comment(lib,"libcp") +#endif // _DEBUG +#endif + +#endif // _USE_ANSI_CPP diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/utility b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/utility new file mode 100644 index 00000000..fe939ed4 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/utility @@ -0,0 +1,171 @@ +// utility standard header +#pragma once +#ifndef _UTILITY_ +#define _UTILITY_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) + +_STD_BEGIN + // TEMPLATE FUNCTION swap (from ) +template inline + void swap(_Ty& _Left, _Ty& _Right) + { // exchange values stored at _Left and _Right + _Ty _Tmp = _Left; + _Left = _Right, _Right = _Tmp; + } + + // TEMPLATE STRUCT pair +template struct pair + { // store a pair of values + typedef pair<_Ty1, _Ty2> _Myt; + typedef _Ty1 first_type; + typedef _Ty2 second_type; + + pair() + : first(_Ty1()), second(_Ty2()) + { // construct from defaults + } + + pair(const _Ty1& _Val1, const _Ty2& _Val2) + : first(_Val1), second(_Val2) + { // construct from specified values + } + + template + pair(const pair<_Other1, _Other2>& _Right) + : first(_Right.first), second(_Right.second) + { // construct from compatible pair + } + + void swap(_Myt& _Right) + { // exchange contents with _Right + std::swap(first, _Right.first); + std::swap(second, _Right.second); + } + + _Ty1 first; // the first stored value + _Ty2 second; // the second stored value + }; + + // pair TEMPLATE OPERATORS +template inline + bool __cdecl operator==(const pair<_Ty1, _Ty2>& _Left, + const pair<_Ty1, _Ty2>& _Right) + { // test for pair equality + return (_Left.first == _Right.first && _Left.second == _Right.second); + } + +template inline + bool __cdecl operator!=(const pair<_Ty1, _Ty2>& _Left, + const pair<_Ty1, _Ty2>& _Right) + { // test for pair inequality + return (!(_Left == _Right)); + } + +template inline + bool __cdecl operator<(const pair<_Ty1, _Ty2>& _Left, + const pair<_Ty1, _Ty2>& _Right) + { // test if _Left < _Right for pairs + return (_Left.first < _Right.first || + !(_Right.first < _Left.first) && _Left.second < _Right.second); + } + +template inline + bool __cdecl operator>(const pair<_Ty1, _Ty2>& _Left, + const pair<_Ty1, _Ty2>& _Right) + { // test if _Left > _Right for pairs + return (_Right < _Left); + } + +template inline + bool __cdecl operator<=(const pair<_Ty1, _Ty2>& _Left, + const pair<_Ty1, _Ty2>& _Right) + { // test if _Left <= _Right for pairs + return (!(_Right < _Left)); + } + +template inline + bool __cdecl operator>=(const pair<_Ty1, _Ty2>& _Left, + const pair<_Ty1, _Ty2>& _Right) + { // test if _Left >= _Right for pairs + return (!(_Left < _Right)); + } + +template inline + pair<_Ty1, _Ty2> __cdecl make_pair(_Ty1 _Val1, _Ty2 _Val2) + { // return pair composed from arguments + return (pair<_Ty1, _Ty2>(_Val1, _Val2)); + } + +template inline + void swap(pair<_Ty1, _Ty2>& _Left, pair<_Ty1, _Ty2>& _Right) + { // swap _Left and _Right pairs + _Left.swap(_Right); + } + + // TEMPLATE OPERATORS + namespace rel_ops + { // nested namespace to hide relational operators from std +template inline + bool __cdecl operator!=(const _Ty& _Left, const _Ty& _Right) + { // test for inequality, in terms of equality + return (!(_Left == _Right)); + } + +template inline + bool __cdecl operator>(const _Ty& _Left, const _Ty& _Right) + { // test if _Left > _Right, in terms of operator< + return (_Right < _Left); + } + +template inline + bool __cdecl operator<=(const _Ty& _Left, const _Ty& _Right) + { // test if _Left <= _Right, in terms of operator< + return (!(_Right < _Left)); + } + +template inline + bool __cdecl operator>=(const _Ty& _Left, const _Ty& _Right) + { // test if _Left >= _Right, in terms of operator< + return (!(_Left < _Right)); + } + } +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _UTILITY_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + */ + +/* + * This file is derived from software bearing the following + * restrictions: + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this + * software and its documentation for any purpose is hereby + * granted without fee, provided that the above copyright notice + * appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation. + * Hewlett-Packard Company makes no representations about the + * suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/valarray b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/valarray new file mode 100644 index 00000000..dfdf4866 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/valarray @@ -0,0 +1,1548 @@ +// valarray standard header +#pragma once +#ifndef _VALARRAY_ +#define _VALARRAY_ +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) + + #pragma warning(disable: 4244 4700) +_STD_BEGIN + + // FORWARD REFERENCES +class gslice; +class slice; + +template + class gslice_array; +template + class indirect_array; +template + class mask_array; +template + class slice_array; +template + class valarray; + +typedef valarray<_Bool> _Boolarray; +typedef valarray _Sizarray; + + // MACROS FOR valarray +#define _VALOP(TYPE, LENGTH, RHS) /* assign RHS(_Idx) to new valarray */ \ + valarray _Ans(LENGTH); \ + for (size_t _Idx = 0; _Idx < _Ans.size(); ++_Idx) \ + _Ans[_Idx] = RHS; \ + return _Ans + +#define _VALGOP(RHS) /* apply RHS(_Idx) to valarray */ \ + for (size_t _Idx = 0; _Idx < size(); ++_Idx) \ + _Myptr[_Idx] RHS; \ + return *this + + // TEMPLATE CLASS valarray +template + class valarray + { // store array with various indexing options +public: + typedef _Ty value_type; + + explicit valarray(size_t _Count = 0) + { // construct with _Count * _Ty() + _Tidy(); + _Myres = _Count; + _Grow(_Count); + } + + valarray(const _Ty& _Val, size_t _Count) + { // construct with _Count * _Val + _Tidy(); + _Grow(_Count, &_Val); + } + + valarray(const _Ty *_Ptr, size_t _Count) + { // construct with [_Ptr, _Ptr + _Count) + _Tidy(); + _Grow(_Count, _Ptr, 1); + } + + valarray(const valarray<_Ty>& _Right) + { // construct from valarray + _Tidy(); + _Grow(_Right.size(), _Right._Myptr, 1); + } + + valarray(const slice_array<_Ty>& _Slicearr) + { // construct from slice_array + _Tidy(); + *this = _Slicearr; + } + + valarray(const gslice_array<_Ty>& _Gslicearr) + { // construct from gslice_array + _Tidy(); + *this = _Gslicearr; + } + + valarray(const mask_array<_Ty>& _Maskarr) + { // construct from mask_array + _Tidy(); + *this = _Maskarr; + } + + valarray(const indirect_array<_Ty>& _Indarr) + { // construct from indirect_array + _Tidy(); + *this = _Indarr; + } + + ~valarray() + { // destroy the object + _Tidy(true); + } + + valarray<_Ty>& operator=(const valarray<_Ty>& _Right) + { // assign valarray _Right + if (this == &_Right) + ; // do nothing + else if (size() == _Right.size()) + for (size_t _Idx = 0; _Idx < size(); ++_Idx) + _Myptr[_Idx] = _Right[_Idx]; + else + { // resize and copy + _Tidy(true); + _Grow(_Right.size(), _Right._Myptr, 1); + } + return (*this); + } + + valarray<_Ty>& operator=(const _Ty& _Val) + { // assign _Val to each element + _VALGOP(= _Val); + } + + void resize(size_t _Newsize) + { // determine new length, padding with _Ty() elements as needed + resize(_Newsize, _Ty()); + } + + void resize(size_t _Newsize, const _Ty _Val) + { // determine new length, padding with _Val elements as needed + _Grow(_Newsize, &_Val, 0, true); + } + + valarray<_Ty>& operator=( + const slice_array<_Ty>& _Slicearr); // defined below + + valarray<_Ty>& operator=( + const gslice_array<_Ty>& _Gslicearr); // defined below + + valarray<_Ty>& operator=( + const mask_array<_Ty>& _Maskarr); // defined below + + valarray<_Ty>& operator=( + const indirect_array<_Ty>& _Indarr); // defined below + + valarray<_Ty> operator+() const + { // return +valarray + _VALOP(_Ty, size(), +_Myptr[_Idx]); + } + + valarray<_Ty> operator-() const + { // return -valarray + _VALOP(_Ty, size(), -_Myptr[_Idx]); + } + + valarray<_Ty> operator~() const + { // return ~valarray + _VALOP(_Ty, size(), ~_Myptr[_Idx]); + } + + _Boolarray operator!() const + { // return !valarray + _VALOP(_Bool, size(), !_Myptr[_Idx]); + } + + valarray<_Ty>& operator*=(const _Ty& _Right) + { // multiply valarray elements by _Right + _VALGOP(*= _Right); + } + + valarray<_Ty>& operator/=(const _Ty& _Right) + { // divide valarray elements by _Right + _VALGOP(/= _Right); + } + + valarray<_Ty>& operator%=(const _Ty& _Right) + { // remainder valarray elements by _Right + _VALGOP(%= _Right); + } + + valarray<_Ty>& operator+=(const _Ty& _Right) + { // add _Right to valarray elements + _VALGOP(+= _Right); + } + + valarray<_Ty>& operator-=(const _Ty& _Right) + { // subtract _Right from valarray elements + _VALGOP(-= _Right); + } + + valarray<_Ty>& operator^=(const _Ty& _Right) + { // XOR _Right into valarray elements + _VALGOP(^= _Right); + } + + valarray<_Ty>& operator&=(const _Ty& _Right) + { // AND _Right into valarray elements + _VALGOP(&= _Right); + } + + valarray<_Ty>& operator|=(const _Ty& _Right) + { // OR _Right into valarray elements + _VALGOP(|= _Right); + } + + valarray<_Ty>& operator<<=(const _Ty& _Right) + { // left shift valarray elements by _Right + _VALGOP(<<= _Right); + } + + valarray<_Ty>& operator>>=(const _Ty& _Right) + { // right shift valarray elements by _Right + _VALGOP(>>= _Right); + } + + valarray<_Ty>& operator*=(const valarray<_Ty>& _Right) + { // multiply valarray elements by valarray _Right elements + _VALGOP(*= _Right[_Idx]); + } + + valarray<_Ty>& operator/=(const valarray<_Ty>& _Right) + { // divide valarray elements by valarray _Right elements + _VALGOP(/= _Right[_Idx]); + } + + valarray<_Ty>& operator%=(const valarray<_Ty>& _Right) + { // remainder valarray elements by valarray _Right elements + _VALGOP(%= _Right[_Idx]); + } + + valarray<_Ty>& operator+=(const valarray<_Ty>& _Right) + { // add valarray _Right elements to valarray elements + _VALGOP(+= _Right[_Idx]); + } + + valarray<_Ty>& operator-=(const valarray<_Ty>& _Right) + { // subtract valarray _Right elements from valarray elements + _VALGOP(-= _Right[_Idx]); + } + + valarray<_Ty>& operator^=(const valarray<_Ty>& _Right) + { // XOR valarray _Right elements into valarray elements + _VALGOP(^= _Right[_Idx]); + } + + valarray<_Ty>& operator|=(const valarray<_Ty>& _Right) + { // OR valarray _Right elements into valarray elements + _VALGOP(|= _Right[_Idx]); + } + + valarray<_Ty>& operator&=(const valarray<_Ty>& _Right) + { // AND valarray _Right elements into valarray elements + _VALGOP(&= _Right[_Idx]); + } + + valarray<_Ty>& operator<<=(const valarray<_Ty>& _Right) + { // left shift valarray elements by valarray _Right elements + _VALGOP(<<= _Right[_Idx]); + } + + valarray<_Ty>& operator>>=(const valarray<_Ty>& _Right) + { // right shift valarray elements by valarray _Right elements + _VALGOP(>>= _Right[_Idx]); + } + + size_t size() const + { // return length of sequence + return (_Mysize); + } + + _Ty operator[](size_t _Off) const + { // subscript nonmutable sequence + return (_Myptr[_Off]); + } + + _Ty& operator[](size_t _Off) + { // subscript mutable sequence + return (_Myptr[_Off]); + } + + valarray<_Ty> operator[]( + slice _Slicearr) const; // defined below + + slice_array<_Ty> operator[]( + slice _Slicearr); // defined below + + valarray<_Ty> operator[]( + const gslice& _Gslicearr) const; // defined below + + gslice_array<_Ty> operator[]( + const gslice& _Gslicearr); // defined below + + valarray<_Ty> operator[]( + const _Boolarray& _Boolarr) const; // defined below + + mask_array<_Ty> operator[]( + const _Boolarray& _Boolarr); // defined below + + valarray<_Ty> operator[]( + const _Sizarray& _Indarr) const; // defined below + + indirect_array<_Ty> operator[]( + const _Sizarray& _Indarr); // defined below + + _Ty sum() const + { // return sum all elements + _Ty _Sum = _Myptr[0]; + for (size_t _Idx = 0; ++_Idx < size(); ) + _Sum += _Myptr[_Idx]; + return (_Sum); + } + + _Ty min() const + { // return smallest of all elements + _Ty _Min = _Myptr[0]; + for (size_t _Idx = 0; ++_Idx < size(); ) + if (_Myptr[_Idx] < _Min) + _Min = _Myptr[_Idx]; + return (_Min); + } + + _Ty max() const + { // return largest of all elements + _Ty _Max = _Myptr[0]; + for (size_t _Idx = 0; ++_Idx < size(); ) + if (_Max < _Myptr[_Idx]) + _Max = _Myptr[_Idx]; + return (_Max); + } + + valarray<_Ty> shift(int _Count) const + { // return valarray left shifted + static _Ty _Dflt; + _VALOP(_Ty, size(), + 0 < _Count && size() - _Idx <= (size_t)_Count + || _Count < 0 && _Idx < (size_t)-_Count + ? _Dflt : _Myptr[_Idx + _Count]); + } + + valarray<_Ty> cshift(int _Count) const + { // return valarray left rotated + if (size() == 0) + ; // no shift + else if (_Count < 0) + { // right shift + if ((_Count += size()) < 0) + _Count = size() - (-_Count) % size(); + } + else if (size() <= (size_t)_Count) + _Count %= size(); + + _VALOP(_Ty, size(), size() - _Idx <= (size_t)_Count + ? _Myptr[_Idx - size() + _Count] : _Myptr[_Idx + _Count]); + } + + valarray<_Ty> apply(_Ty _Func(_Ty)) const + { // return valarray transformed by _Func, value argument + _VALOP(_Ty, size(), _Func(_Myptr[_Idx])); + } + + valarray<_Ty> apply(_Ty _Func(const _Ty&)) const + { // return valarray transformed by _Func, nonmutable argument + _VALOP(_Ty, size(), _Func(_Myptr[_Idx])); + } + + void free() // retained + { // erase all elements + _Tidy(true); + } + +private: + void _Grow(size_t _Count, + const _Ty *_Ptr = 0, + size_t _Inc = 0, + bool _Trim = false) + { // grow to _Count elements and pad, trim if _Trim is true + size_t _Oldsize = _Myptr == 0 ? 0 : _Myres; + + if (_Count == 0) + { // new sequence empty + if (_Trim) + _Tidy(true); + } + else if (_Count == _Oldsize || _Count < _Oldsize && !_Trim) + ; // big enough, no need to pad or trim + else + { // allocate new array, copy and pad + size_t _Idx; + size_t _Newsize = _Myptr == 0 && _Count < _Myres + ? _Myres : _Count; + _Ty *_Newptr = 0; + size_t _Nm = _Count < _Mysize ? _Count : _Mysize; + + _TRY_BEGIN + _Newptr = new _Ty[_Newsize]; + _CATCH_ALL + _Tidy(true); // allocation failed, discard storage and reraise + _RERAISE; + _CATCH_END + + for (_Idx = 0; _Idx < _Nm; ++_Idx) + _Newptr[_Idx] = _Myptr[_Idx]; + if (_Ptr != 0) + for (; _Idx < _Newsize; ++_Idx, _Ptr += _Inc) + _Newptr[_Idx] = *_Ptr; + + _Tidy(true); + _Myptr = _Newptr; + _Myres = _Newsize; + } + _Mysize = _Count; + } + + void _Tidy(bool _Constructed = false) + { // initialize the object, freeing any allocated storage + if (_Constructed && _Myptr != 0) + delete[] _Myptr; + _Mysize = 0; + _Myptr = 0; + _Myres = 0; + } + + _Ty *_Myptr; // current storage reserved for array + size_t _Mysize; // current length of sequence + size_t _Myres; // length of array + }; + + // valarray TEMPLATE FUNCTIONS +template inline + valarray<_Ty> operator*(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray * scalar + _VALOP(_Ty, _Left.size(), _Left[_Idx] * _Right); + } + +template inline + valarray<_Ty> operator*(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar * valarray + _VALOP(_Ty, _Right.size(), _Left * _Right[_Idx]); + } + +template inline + valarray<_Ty> operator/(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray / scalar + _VALOP(_Ty, _Left.size(), _Left[_Idx] / _Right); + } + +template inline + valarray<_Ty> operator/(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar / valarray + _VALOP(_Ty, _Right.size(), _Left / _Right[_Idx]); + } + +template inline + valarray<_Ty> operator%(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray % scalar + _VALOP(_Ty, _Left.size(), _Left[_Idx] % _Right); + } + +template inline + valarray<_Ty> operator%(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar % valarray + _VALOP(_Ty, _Right.size(), _Left % _Right[_Idx]); + } + +template inline + valarray<_Ty> operator+(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray + scalar + _VALOP(_Ty, _Left.size(), _Left[_Idx] + _Right); + } + +template inline + valarray<_Ty> operator+(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar + valarray + _VALOP(_Ty, _Right.size(), _Left + _Right[_Idx]); + } + +template inline + valarray<_Ty> operator-(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray - scalar + _VALOP(_Ty, _Left.size(), _Left[_Idx] - _Right); + } + +template inline + valarray<_Ty> operator-(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar - valarray + _VALOP(_Ty, _Right.size(), _Left - _Right[_Idx]); + } + +template inline + valarray<_Ty> operator^(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray ^ scalar + _VALOP(_Ty, _Left.size(), _Left[_Idx] ^ _Right); + } + +template inline + valarray<_Ty> operator^(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar ^ valarray + _VALOP(_Ty, _Right.size(), _Left ^ _Right[_Idx]); + } + +template inline + valarray<_Ty> operator&(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray & scalar + _VALOP(_Ty, _Left.size(), _Left[_Idx] & _Right); + } + +template inline + valarray<_Ty> operator&(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar & valarray + _VALOP(_Ty, _Right.size(), _Left & _Right[_Idx]); + } + +template inline + valarray<_Ty> operator|(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray | scalar + _VALOP(_Ty, _Left.size(), _Left[_Idx] | _Right); + } + +template inline + valarray<_Ty> operator|(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar | valarray + _VALOP(_Ty, _Right.size(), _Left | _Right[_Idx]); + } + +template inline + valarray<_Ty> operator<<(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray << scalar + _VALOP(_Ty, _Left.size(), _Left[_Idx] << _Right); + } + +template inline + valarray<_Ty> operator<<(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar << valarray + _VALOP(_Ty, _Right.size(), _Left << _Right[_Idx]); + } + +template inline + valarray<_Ty> operator>>(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray >> scalar + _VALOP(_Ty, _Left.size(), _Left[_Idx] >> _Right); + } + +template inline + valarray<_Ty> operator>>(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar >> valarray + _VALOP(_Ty, _Right.size(), _Left >> _Right[_Idx]); + } + +template inline + _Boolarray operator&&(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray && scalar + _VALOP(_Bool, _Left.size(), _Left[_Idx] && _Right); + } + +template inline + _Boolarray operator&&(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar && valarray + _VALOP(_Bool, _Right.size(), _Left && _Right[_Idx]); + } + +template inline + _Boolarray operator||(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray || scalar + _VALOP(_Bool, _Left.size(), _Left[_Idx] || _Right); + } + +template inline + _Boolarray operator||(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar || valarray + _VALOP(_Bool, _Right.size(), _Left || _Right[_Idx]); + } + +template inline + valarray<_Ty> operator*(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray * valarray + _VALOP(_Ty, _Left.size(), _Left[_Idx] * _Right[_Idx]); + } + +template inline + valarray<_Ty> operator/(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray ? valarray + _VALOP(_Ty, _Left.size(), _Left[_Idx] / _Right[_Idx]); + } + +template inline + valarray<_Ty> operator%(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray % valarray + _VALOP(_Ty, _Left.size(), _Left[_Idx] % _Right[_Idx]); + } + +template inline + valarray<_Ty> operator+(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray + valarray + _VALOP(_Ty, _Left.size(), _Left[_Idx] + _Right[_Idx]); + } + +template inline + valarray<_Ty> operator-(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray - valarray + _VALOP(_Ty, _Left.size(), _Left[_Idx] - _Right[_Idx]); + } + +template inline + valarray<_Ty> operator^(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray ^ valarray + _VALOP(_Ty, _Left.size(), _Left[_Idx] ^ _Right[_Idx]); + } + +template inline + valarray<_Ty> operator&(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray & valarray + _VALOP(_Ty, _Left.size(), _Left[_Idx] & _Right[_Idx]); + } + +template inline + valarray<_Ty> operator|(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray | valarray + _VALOP(_Ty, _Left.size(), _Left[_Idx] | _Right[_Idx]); + } + +template inline + valarray<_Ty> operator<<(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray << valarray + _VALOP(_Ty, _Left.size(), _Left[_Idx] << _Right[_Idx]); + } + +template inline + valarray<_Ty> operator>>(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray >> valarray + _VALOP(_Ty, _Left.size(), _Left[_Idx] >> _Right[_Idx]); + } + +template inline + _Boolarray operator&&(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray && valarray + _VALOP(_Bool, _Left.size(), _Left[_Idx] && _Right[_Idx]); + } + +template inline + _Boolarray operator||(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray || valarray + _VALOP(_Bool, _Left.size(), _Left[_Idx] || _Right[_Idx]); + } + +template inline + _Boolarray operator==(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray == scalar + _VALOP(_Bool, _Left.size(), _Left[_Idx] == _Right); + } + +template inline + _Boolarray operator==(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar == valarray + _VALOP(_Bool, _Right.size(), _Left == _Right[_Idx]); + } + +template inline + _Boolarray operator==(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray == valarray + _VALOP(_Bool, _Left.size(), _Left[_Idx] == _Right[_Idx]); + } + +template inline + _Boolarray operator!=(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray != scalar + _VALOP(_Bool, _Left.size(), _Left[_Idx] != _Right); + } + +template inline + _Boolarray operator!=(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar != valarray + _VALOP(_Bool, _Right.size(), _Left != _Right[_Idx]); + } + +template inline + _Boolarray operator!=(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray != valarray + _VALOP(_Bool, _Left.size(), _Left[_Idx] != _Right[_Idx]); + } + +template inline + _Boolarray operator<(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray < scalar + _VALOP(_Bool, _Left.size(), _Left[_Idx] < _Right); + } + +template inline + _Boolarray operator<(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar < valarray + _VALOP(_Bool, _Right.size(), _Left < _Right[_Idx]); + } + +template inline + _Boolarray operator<(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray < valarray + _VALOP(_Bool, _Left.size(), _Left[_Idx] < _Right[_Idx]); + } + +template inline + _Boolarray operator>(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray > scalar + _VALOP(_Bool, _Left.size(), _Left[_Idx] > _Right); + } + +template inline + _Boolarray operator>(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar > valarray + _VALOP(_Bool, _Right.size(), _Left > _Right[_Idx]); + } + +template inline + _Boolarray operator>(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray > valarray + _VALOP(_Bool, _Left.size(), _Left[_Idx] > _Right[_Idx]); + } + +template inline + _Boolarray operator<=(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray <= scalar + _VALOP(_Bool, _Left.size(), _Left[_Idx] <= _Right); + } + +template inline + _Boolarray operator<=(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar <= valarray + _VALOP(_Bool, _Right.size(), _Left <= _Right[_Idx]); + } + +template inline + _Boolarray operator<=(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray <= valarray + _VALOP(_Bool, _Left.size(), _Left[_Idx] <= _Right[_Idx]); + } + +template inline + _Boolarray operator>=(const valarray<_Ty>& _Left, + const _Ty& _Right) + { // return valarray >= scalar + _VALOP(_Bool, _Left.size(), _Left[_Idx] >= _Right); + } + +template inline + _Boolarray operator>=(const _Ty& _Left, + const valarray<_Ty>& _Right) + { // return scalar >= valarray + _VALOP(_Bool, _Right.size(), _Left >= _Right[_Idx]); + } + +template inline + _Boolarray operator>=(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // return valarray >= valarray + _VALOP(_Bool, _Left.size(), _Left[_Idx] >= _Right[_Idx]); + } + +template inline + valarray<_Ty> abs(const valarray<_Ty>& _Left) + { // apply abs to each element of valarray + _VALOP(_Ty, _Left.size(), abs(_Left[_Idx])); + } + +template inline + valarray<_Ty> acos(const valarray<_Ty>& _Left) + { // apply acos to each element of valarray + _VALOP(_Ty, _Left.size(), ::acos(_Left[_Idx])); + } + +template inline + valarray<_Ty> asin(const valarray<_Ty>& _Left) + { // apply asin to each element of valarray + _VALOP(_Ty, _Left.size(), ::asin(_Left[_Idx])); + } + +template inline + valarray<_Ty> atan(const valarray<_Ty>& _Left) + { // apply atan to each element of valarray + _VALOP(_Ty, _Left.size(), ::atan(_Left[_Idx])); + } + +template inline + valarray<_Ty> atan2(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // apply atan2 to pairs of valarray elements + _VALOP(_Ty, _Left.size(), ::atan2(_Left[_Idx], _Right[_Idx])); + } + +template inline + valarray<_Ty> atan2(const valarray<_Ty>& _Left, const _Ty& _Right) + { // apply atan2 to each valarray element and scalar + _VALOP(_Ty, _Left.size(), ::atan2(_Left[_Idx], _Right)); + } + +template inline + valarray<_Ty> atan2(const _Ty& _Left, const valarray<_Ty>& _Right) + { // apply atan2 to scalar and each valarray element + _VALOP(_Ty, _Right.size(), ::atan2(_Left, _Right[_Idx])); + } + +template inline + valarray<_Ty> cos(const valarray<_Ty>& _Left) + { // apply cos to each element of valarray + _VALOP(_Ty, _Left.size(), ::cos(_Left[_Idx])); + } + +template inline + valarray<_Ty> cosh(const valarray<_Ty>& _Left) + { // apply cosh to each element of valarray + _VALOP(_Ty, _Left.size(), ::cosh(_Left[_Idx])); + } + +template inline + valarray<_Ty> exp(const valarray<_Ty>& _Left) + { // apply exp to each element of valarray + _VALOP(_Ty, _Left.size(), ::exp(_Left[_Idx])); + } + +template inline + valarray<_Ty> log(const valarray<_Ty>& _Left) + { // apply log to each element of valarray + _VALOP(_Ty, _Left.size(), ::log(_Left[_Idx])); + } + +template inline + valarray<_Ty> log10(const valarray<_Ty>& _Left) + { // apply log10 to each element of valarray + _VALOP(_Ty, _Left.size(), ::log10(_Left[_Idx])); + } + +template inline + valarray<_Ty> pow(const valarray<_Ty>& _Left, + const valarray<_Ty>& _Right) + { // apply pow to pairs of valarray elements + _VALOP(_Ty, _Left.size(), ::pow(_Left[_Idx], _Right[_Idx])); + } + +template inline + valarray<_Ty> pow(const valarray<_Ty>& _Left, const _Ty& _Right) + { // apply pow to each valarray element and scalar + _VALOP(_Ty, _Left.size(), ::pow(_Left[_Idx], _Right)); + } + +template inline + valarray<_Ty> pow(const _Ty& _Left, const valarray<_Ty>& _Right) + { // apply pow to scalar and each valarray element + _VALOP(_Ty, _Right.size(), ::pow(_Left, _Right[_Idx])); + } + +template inline + valarray<_Ty> sin(const valarray<_Ty>& _Left) + { // apply sin to each element of valarray + _VALOP(_Ty, _Left.size(), ::sin(_Left[_Idx])); + } + +template inline + valarray<_Ty> sinh(const valarray<_Ty>& _Left) + { // apply sinh to each element of valarray + _VALOP(_Ty, _Left.size(), ::sinh(_Left[_Idx])); + } + +template inline + valarray<_Ty> sqrt(const valarray<_Ty>& _Left) + { // apply sqrt to each element of valarray + _VALOP(_Ty, _Left.size(), ::sqrt(_Left[_Idx])); + } + +template inline + valarray<_Ty> tan(const valarray<_Ty>& _Left) + { // apply tan to each element of valarray + _VALOP(_Ty, _Left.size(), ::tan(_Left[_Idx])); + } + +template inline + valarray<_Ty> tanh(const valarray<_Ty>& _Left) + { // apply tanh to each element of valarray + _VALOP(_Ty, _Left.size(), ::tanh(_Left[_Idx])); + } + + // CLASS slice +class slice + { // define a slice of a valarray +public: + slice() + : _Start(0), _Len(0), _Stride(0) + { // construct with all zeros + } + + slice(size_t _Off, size_t _Count, size_t _Inc) + : _Start(_Off), _Len(_Count), _Stride(_Inc) + { // construct slice from starting offset, length, and stride + } + + size_t start() const + { // return starting offset of slice + return (_Start); + } + + size_t size() const + { // return number of elements specified by slice + return (_Len); + } + + size_t stride() const + { // return distance between elements specified by slice + return (_Stride); + } + +protected: + size_t _Start; // the starting offset + size_t _Len; // the number of elements + size_t _Stride; // the distance between elements + }; + + // MACROS FOR slice_array +#define _SLOP(RHS) /* apply RHS(_Idx) to slice_array */ \ + size_t _Off = _Start; \ + for (size_t _Idx = 0; _Idx < _Len; ++_Idx, _Off += _Stride) \ + _Myptr[_Off] RHS; + + // TEMPLATE CLASS slice_array +template + class slice_array + : public slice + { // define a slice of a valarray +public: + typedef _Ty value_type; + + void operator=(const valarray<_Ty>& _Right) const + { // assign a valarray to a slice + _SLOP(= _Right[_Idx]); + } + + void operator=(const _Ty& _Right) const + { // assign a scalar to elements of a slice + _SLOP(= _Right); + } + + void operator*=(const valarray<_Ty>& _Right) const + { // multiply slice by valarray + _SLOP(*= _Right[_Idx]); + } + + void operator/=(const valarray<_Ty>& _Right) const + { // divide slice by valarray + _SLOP(/= _Right[_Idx]); + } + + void operator%=(const valarray<_Ty>& _Right) const + { // remainder slice by valarray + _SLOP(%= _Right[_Idx]); + } + + void operator+=(const valarray<_Ty>& _Right) const + { // add slice to valarray + _SLOP(+= _Right[_Idx]); + } + + void operator-=(const valarray<_Ty>& _Right) const + { // subtract valarray from slice + _SLOP(-= _Right[_Idx]); + } + + void operator^=(const valarray<_Ty>& _Right) const + { // XOR valarray into slice + _SLOP(^= _Right[_Idx]); + } + + void operator&=(const valarray<_Ty>& _Right) const + { // AND valarray into slice + _SLOP(&= _Right[_Idx]); + } + + void operator|=(const valarray<_Ty>& _Right) const + { // OR valarray into slice + _SLOP(|= _Right[_Idx]); + } + + void operator<<=(const valarray<_Ty>& _Right) const + { // left shift slice by valarray + _SLOP(<<= _Right[_Idx]); + } + + void operator>>=(const valarray<_Ty>& _Right) const + { // right shift slice by valarray + _SLOP(>>= _Right[_Idx]); + } + + _Ty& _Data(size_t _Idx) const + { // return reference to underlying array element + return (_Myptr[_Idx]); + } + +private: + friend class valarray<_Ty>; + + slice_array(const slice& _Slice, _Ty *_Pdata) + : slice(_Slice), _Myptr(_Pdata) + { // construct from slice and pointer to valarray contents + } + +// slice_array(); // not defined + +// slice_array(const slice_array&); // not defined + +// slice_array& operator=(const slice_array&); // not defined + + _Ty *_Myptr; // pointer to valarray contents + }; + + // CLASS gslice +class gslice + { // define a generalized (multidimensional) slice of a valarray +public: + gslice() + : _Start(0) + { // construct with all zeros + } + + gslice(size_t _Off, const _Sizarray& _Lenarr, + const _Sizarray& _Incarr) + : _Start(_Off), _Len(_Lenarr), _Stride(_Incarr) + { // construct from starting offset, arrays of lengths and strides + } + + size_t start() const + { // return starting offset of generalized slice + return (_Start); + } + + _Sizarray size() const + { // return array of lengths of slices + return (_Len); + } + + _Sizarray stride() const + { // return array of strides of slices + return (_Stride); + } + + size_t _Nslice() const + { // return number of slices + return (_Len.size()); + } + + size_t _Off(_Sizarray& _Indexarr) const + { // return offset for an array of indexes, then increment + size_t _Idx, _Ans = _Start; + + for (_Idx = 0; _Idx < _Indexarr.size(); ++_Idx) + _Ans += _Indexarr[_Idx] * _Stride[_Idx]; // compute offset + + while (0 < _Idx--) + if (++_Indexarr[_Idx] < _Len[_Idx]) + break; // increment done, quit + else + _Indexarr[_Idx] = 0; // carry to more-significant index + return (_Ans); + } + + size_t _Totlen() const + { // return total length of generalized slice + if (_Len.size() == 0) + return (0); + + size_t _Count = _Len[0]; + for (size_t _Idx = 0; ++_Idx < _Len.size(); ) + _Count *= _Len[_Idx]; + return (_Count); + } + +private: + size_t _Start; // the starting offset + _Sizarray _Len; // array of numbers of elements + _Sizarray _Stride; // array of distances between elements + }; + + // MACROS FOR gslice_array +#define _GSLOP(RHS) /* apply RHS(_Idx) to gslice_array */ \ + _Sizarray _Indexarray((size_t)0, _Nslice()); \ + size_t _Size = _Totlen(); \ + for (size_t _Idx = 0; _Idx < _Size; ++_Idx) \ + _Myptr[_Off(_Indexarray)] RHS; + + // TEMPLATE CLASS gslice_array +template + class gslice_array + : public gslice + { // define a generalized slice of a valarray +public: + typedef _Ty value_type; + + void operator=(const valarray<_Ty>& _Right) const + { // assign a valarray to a generalized slice + _GSLOP(= _Right[_Idx]); + } + + void operator=(const _Ty& _Right) const + { // assign a scalar to elements of a generalized slice + _GSLOP(= _Right); + } + + void operator*=(const valarray<_Ty>& _Right) const + { // multiply generalized slice by valarray + _GSLOP(*= _Right[_Idx]); + } + + void operator/=(const valarray<_Ty>& _Right) const + { // divide generalized slice by valarray + _GSLOP(/= _Right[_Idx]); + } + + void operator%=(const valarray<_Ty>& _Right) const + { // remainder generalized slice by valarray + _GSLOP(%= _Right[_Idx]); + } + + void operator+=(const valarray<_Ty>& _Right) const + { // add valarray to generalized slice + _GSLOP(+= _Right[_Idx]); + } + + void operator-=(const valarray<_Ty>& _Right) const + { // subtract valarray from generalized slice + _GSLOP(-= _Right[_Idx]); + } + + void operator^=(const valarray<_Ty>& _Right) const + { // XOR valarray into generalized slice + _GSLOP(^= _Right[_Idx]); + } + + void operator&=(const valarray<_Ty>& _Right) const + { // AND valarray into generalized slice + _GSLOP(&= _Right[_Idx]); + } + + void operator|=(const valarray<_Ty>& _Right) const + { // OR valarray into generalized slice + _GSLOP(|= _Right[_Idx]); + } + + void operator<<=(const valarray<_Ty>& _Right) const + { // left shift generalized slice by valarray + _GSLOP(<<= _Right[_Idx]); + } + + void operator>>=(const valarray<_Ty>& _Right) const + { // right shift generalized slice by valarray + _GSLOP(>>= _Right[_Idx]); + } + + _Ty& _Data(size_t _Idx) const + { // return reference to underlying array element + return (_Myptr[_Idx]); + } + +private: + friend class valarray<_Ty>; + + gslice_array(const gslice& _Gslice, _Ty *_Ptr) + : gslice(_Gslice), _Myptr(_Ptr) + { // construct from gslice and pointer to valarray contents + } + +// gslice_array(); // not defined + +// gslice_array(const gslice_array&); // not defined + +// gslice_array& operator=( const gslice_array&); // not defined + + _Ty *_Myptr; // pointer to valarray contents + }; + + // MACROS FOR mask_array +#define _MOP(RHS) /* apply RHS(_Idx) to mask_array */ \ + size_t _Off = 0; \ + size_t _Size = _Totlen(); \ + for (size_t _Idx = 0; _Idx < _Size; ++_Off) \ + if (_Mask(_Off)) \ + _Myptr[_Off] RHS, ++_Idx; + + // TEMPLATE CLASS mask_array +template + class mask_array + { // define a subset of a valarray with an array of mask bits +public: + typedef _Ty value_type; + + void operator=(const valarray<_Ty>& _Right) const + { // assign a valarray to a masked array + _MOP(= _Right[_Idx]); + } + + void operator=(const _Ty& _Right) const + { // assign a scalar to elements of a masked array + _MOP(= _Right); + } + + void operator*=(const valarray<_Ty>& _Right) const + { // multiply masked array by valarray + _MOP(*= _Right[_Idx]); + } + + void operator/=(const valarray<_Ty>& _Right) const + { // divide masked array by valarray + _MOP(/= _Right[_Idx]); + } + + void operator%=(const valarray<_Ty>& _Right) const + { // remainder masked array by valarray + _MOP(%= _Right[_Idx]); + } + + void operator+=(const valarray<_Ty>& _Right) const + { // add valarray to masked array + _MOP(+= _Right[_Idx]); + } + + void operator-=(const valarray<_Ty>& _Right) const + { // subtract valarray from masked array + _MOP(-= _Right[_Idx]); + } + + void operator^=(const valarray<_Ty>& _Right) const + { // XOR valarray into masked array + _MOP(^= _Right[_Idx]); + } + + void operator&=(const valarray<_Ty>& _Right) const + { // OR valarray into masked array + _MOP(&= _Right[_Idx]); + } + + void operator|=(const valarray<_Ty>& _Right) const + { // OR valarray into masked array + _MOP(|= _Right[_Idx]); + } + + void operator<<=(const valarray<_Ty>& _Right) const + { // left shift masked array by valarray + _MOP(<<= _Right[_Idx]); + } + + void operator>>=(const valarray<_Ty>& _Right) const + { // right shift masked array by valarray + _MOP(>>= _Right[_Idx]); + } + + _Ty& _Data(size_t _Idx) const + { // return reference to underlying array element + return (_Myptr[_Idx]); + } + + bool _Mask(size_t _Idx) const + { // return mask element for a given index + return (_Mybool[_Idx]); + } + + size_t _Totlen() const + { // return total length of masked array + size_t _Count = 0; + for (size_t _Idx = 0; _Idx < _Mybool.size(); ++_Idx) + if (_Mybool[_Idx]) + ++_Count; + return (_Count); + } + +private: + friend class valarray<_Ty>; + + mask_array(const _Boolarray& _Maskarr, _Ty *_Pdata) + : _Mybool(_Maskarr), _Myptr(_Pdata) + { // construct from mask array and pointer to valarray contents + } + +// mask_array(); // not defined + +// mask_array(const mask_array&); // not defined + +// mask_array& operator=(const mask_array&); // not defined + + _Boolarray _Mybool; // array of mask bits + _Ty *_Myptr; // pointer to valarray contents + }; + + // MACROS FOR indirect_array +#define _IOP(RHS) /* apply RHS(_Idx) to indirect_array */ \ + size_t _Size = _Totlen(); \ + for (size_t _Idx = 0; _Idx < _Size; ++_Idx) \ + _Myptr[_Indir(_Idx)] RHS; + + // TEMPLATE CLASS indirect_array +template + class indirect_array + { // define a subset of a valarray with an array of indexes +public: + typedef _Ty value_type; + + void operator=(const valarray<_Ty>& _Right) const + { // assign a valarray to an indirect array + _IOP(= _Right[_Idx]); + } + + void operator=(const _Ty& _Right) const + { // assign a scalar to elements of an indirect array + _IOP(= _Right); + } + + void operator*=(const valarray<_Ty>& _Right) const + { // multiply indirect array by valarray + _IOP(*= _Right[_Idx]); + } + + void operator/=(const valarray<_Ty>& _Right) const + { // divide indirect array by valarray + _IOP(/= _Right[_Idx]); + } + + void operator%=(const valarray<_Ty>& _Right) const + { // remainder indirect array by valarray + _IOP(%= _Right[_Idx]); + } + + void operator+=(const valarray<_Ty>& _Right) const + { // add valarray to indirect array + _IOP(+= _Right[_Idx]); + } + + void operator-=(const valarray<_Ty>& _Right) const + { // subtract valarray from indirect array + _IOP(-= _Right[_Idx]); + } + + void operator^=(const valarray<_Ty>& _Right) const + { // XOR valarray into indirect array + _IOP(^= _Right[_Idx]); + } + + void operator&=(const valarray<_Ty>& _Right) const + { // AND valarray into indirect array + _IOP(&= _Right[_Idx]); + } + + void operator|=(const valarray<_Ty>& _Right) const + { // OR valarray into indirect array + _IOP(|= _Right[_Idx]); + } + + void operator<<=(const valarray<_Ty>& _Right) const + { // left shift indirect array by valarray + _IOP(<<= _Right[_Idx]); + } + + void operator>>=(const valarray<_Ty>& _Right) const + { // right shift indirect array by valarray + _IOP(>>= _Right[_Idx]); + } + + _Ty& _Data(size_t _Idx) const + { // return reference to underlying array element + return (_Myptr[_Idx]); + } + + size_t _Indir(size_t _Idx) const + { // return mapped index for a given index + return (_Myindarr[_Idx]); + } + + size_t _Totlen() const + { // return total length of indirect array + return (_Myindarr.size()); + } + +private: + friend class valarray<_Ty>; + + indirect_array(const _Sizarray& _Indarr, _Ty *_Ptr) + : _Myindarr(_Indarr), _Myptr(_Ptr) + { // construct from indirect array and pointer to valarray contents + } + +// indirect_array(); // not defined + +// indirect_array(const indirect_array&); // not defined + +// indirect_array& operator=(const indirect_array&); // not defined + + _Sizarray _Myindarr; // array of indirect indexes + _Ty *_Myptr; // pointer to valarray contents + }; + + // slice_array TEMPLATE FUNCTIONS +template inline + valarray<_Ty>& valarray<_Ty>::operator=( + const slice_array<_Ty>& _Slicearr) + { // assign slice array to valarray + _Tidy(true); + _Grow(_Slicearr.size(), &_Slicearr._Data(_Slicearr.start()), + _Slicearr.stride()); + return (*this); + } + +template inline + valarray<_Ty> valarray<_Ty>::operator[](slice _Slice) const + { // subscript nonmutable valarray by slice + return (valarray<_Ty>(slice_array<_Ty>(_Slice, _Myptr))); + } + +template inline + slice_array<_Ty> valarray<_Ty>::operator[](slice _Slice) + { // subscript mutable valarray by slice + return (slice_array<_Ty>(_Slice, _Myptr)); + } + + // gslice_array TEMPLATE FUNCTIONS +template inline + valarray<_Ty>& valarray<_Ty>::operator=( + const gslice_array<_Ty>& _Gslicearr) + { // assign generalized slice array to valarray + _Tidy(true); + _Grow(_Gslicearr._Totlen()); + _Sizarray _Indexarray((size_t)0, _Gslicearr._Nslice()); + _VALGOP(= _Gslicearr._Data(_Gslicearr._Off(_Indexarray))); + } + +template inline + valarray<_Ty> valarray<_Ty>::operator[](const gslice& _Gslice) const + { // subscript nonmutable valarray by generalized slice + return (valarray<_Ty>(gslice_array<_Ty>(_Gslice, _Myptr))); + } + +template inline + gslice_array<_Ty> valarray<_Ty>::operator[](const gslice& _Gslicearr) + { // subscript mutable valarray by generalized slice + return (gslice_array<_Ty>(_Gslicearr, _Myptr)); + } + + // mask_array TEMPLATE FUNCTIONS +template inline + valarray<_Ty>& valarray<_Ty>::operator=(const mask_array<_Ty>& _Maskarr) + { // assign masked array to valarray + _Tidy(true); + _Grow(_Maskarr._Totlen()); + size_t _Count = 0; + + for (size_t _Idx = 0; _Idx < size(); ++_Count) + if (_Maskarr._Mask(_Count)) + _Myptr[_Idx++] = _Maskarr._Data(_Count); + return (*this); + } + +template inline + valarray<_Ty> valarray<_Ty>::operator[](const _Boolarray& _Boolarr) const + { // subscript nonmutable valarray by boolean (mask) array + return (valarray<_Ty>(mask_array<_Ty>(_Boolarr, _Myptr))); + } + +template inline + mask_array<_Ty> valarray<_Ty>::operator[](const _Boolarray& _Boolarr) + { // subscript nonmutable valarray by boolean (mask) array + return (mask_array<_Ty>(_Boolarr, _Myptr)); + } + + // indirect_array TEMPLATE FUNCTIONS +template inline + valarray<_Ty>& valarray<_Ty>::operator=( + const indirect_array<_Ty>& _Indarr) + { // assign indirect array to valarray + _Tidy(true); + _Grow(_Indarr._Totlen()); + _VALGOP(= _Indarr._Data(_Indarr._Indir(_Idx))); + } + +template inline + valarray<_Ty> valarray<_Ty>::operator[](const _Sizarray& _Indarr) const + { // subscript nonmutable valarray by indirect (mapping) array + return (valarray<_Ty>(indirect_array<_Ty>(_Indarr, _Myptr))); + } + +template inline + indirect_array<_Ty> valarray<_Ty>::operator[](const _Sizarray& _Indarr) + { // subscript mutable valarray by indirect (mapping) array + return (indirect_array<_Ty>(_Indarr, _Myptr)); + } +_STD_END + + #pragma warning(default: 4244) + #pragma warning(default: 4700) +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _VALARRAY_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/varargs.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/varargs.h new file mode 100644 index 00000000..abc659d5 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/varargs.h @@ -0,0 +1,209 @@ +/*** +*varargs.h - XENIX style macros for variable argument functions +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file defines XENIX style macros for accessing arguments of a +* function which takes a variable number of arguments. +* [System V] +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_VARARGS +#define _INC_VARARGS + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +/* + * Currently, all MS C compilers for Win32 platforms default to 8 byte + * alignment. + */ +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + +#if __STDC__ +#error varargs.h incompatible with ANSI (use stdarg.h) +#endif + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +#ifndef _UINTPTR_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 uintptr_t; +#else +typedef _W64 unsigned int uintptr_t; +#endif +#define _UINTPTR_T_DEFINED +#endif + +#ifndef _VA_LIST_DEFINED + +#ifdef _M_ALPHA +typedef struct { + char *a0; /* pointer to first homed integer argument */ + int offset; /* byte offset of next parameter */ +} va_list; +#else +typedef char *va_list; +#endif + +#define _VA_LIST_DEFINED +#endif + + +#if defined(_M_CEE) + +#error varargs.h not supported when targetting _M_CEE (use stdarg.h) + +#elif defined(_M_IX86) + +/* + * define a macro to compute the size of a type, variable or expression, + * rounded up to the nearest multiple of sizeof(int). This number is its + * size as function argument (Intel architecture). Note that the macro + * depends on sizeof(int) being a power of 2! + */ +#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) ) + +#define va_dcl va_list va_alist; +#define va_start(ap) ap = (va_list)&va_alist +#define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) +#define va_end(ap) ap = (va_list)0 + + +#elif defined(_M_MRX000) /* _MIPS_ */ + + +#define va_dcl int va_alist; +#define va_start(list) list = (char *) &va_alist +#define va_end(list) +#define va_arg(list, mode) ((mode *)(list =\ + (char *) ((((int)list + (__builtin_alignof(mode)<=4?3:7)) &\ + (__builtin_alignof(mode)<=4?-4:-8))+sizeof(mode))))[-1] +/* +++++++++++++++++++++++++++++++++++++++++++ + Because of parameter passing conventions in C: + use mode=int for char, and short types + use mode=double for float types + use a pointer for array types + +++++++++++++++++++++++++++++++++++++++++++ */ + + +#elif defined(_M_ALPHA) + +/* + * The Alpha compiler supports two builtin functions that are used to + * implement stdarg/varargs. The __builtin_va_start function is used + * by va_start to initialize the data structure that locates the next + * argument. The __builtin_isfloat function is used by va_arg to pick + * which part of the home area a given register argument is stored in. + * The home area is where up to six integer and/or six floating point + * register arguments are stored down (so they can also be referenced + * by a pointer like any arguments passed on the stack). + */ +extern void * __builtin_va_start(va_list, ...); + +#define va_dcl long va_alist; +#define va_start(list) __builtin_va_start(list, va_alist, 0) +#define va_end(list) +#define va_arg(list, mode) \ + ( *( ((list).offset += ((int)sizeof(mode) + 7) & -8) , \ + (mode *)((list).a0 + (list).offset - \ + ((__builtin_isfloat(mode) && (list).offset <= (6 * 8)) ? \ + (6 * 8) + 8 : ((int)sizeof(mode) + 7) & -8) \ + ) \ + ) \ + ) + + +#elif defined(_M_PPC) + +/* + * define a macro to compute the size of a type, variable or expression, + * rounded up to the nearest multiple of sizeof(int). This number is its + * size as function argument (PPC architecture). Note that the macro + * depends on sizeof(int) being a power of 2! + */ +/* this is for LITTLE-ENDIAN PowerPC */ + +/* bytes that a type occupies in the argument list */ +#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) ) +/* return 'ap' adjusted for type 't' in arglist */ +#define _ALIGNIT(ap,t) \ + ((((int)(ap))+(sizeof(t)<8?3:7)) & (sizeof(t)<8?~3:~7)) + +#define va_dcl va_list va_alist; +#define va_start(ap) ap = (va_list)&va_alist +#define va_arg(ap,t) ( *(t *)((ap = (char *) (_ALIGNIT(ap, t) + _INTSIZEOF(t))) - _INTSIZEOF(t)) ) +#define va_end(ap) ap = (va_list)0 + +#elif defined(_M_IA64) + +#ifndef _VA_LIST +#define _VA_LIST char* +#endif +typedef _VA_LIST va_list; + +#define _VA_STRUCT_ALIGN 16 + +#define _VA_ALIGN 8 + +#define _ALIGNOF(ap) ((((ap)+_VA_STRUCT_ALIGN - 1) & ~(_VA_STRUCT_ALIGN -1)) \ + - (ap)) +#define _APALIGN(t,ap) (__alignof(t) > 8 ? _ALIGNOF((uintptr_t) ap) : 0) + +#define _SLOTSIZEOF(t) ( (sizeof(t) + _VA_ALIGN - 1) & ~(_VA_ALIGN - 1) ) + +#define va_dcl __int64 va_alist; + +#define va_start(ap) ( ap = (va_list)&va_alist ) + +#define va_arg(ap,t) (*(t *)((ap += _SLOTSIZEOF(t)+ _APALIGN(t,ap)) \ + -_SLOTSIZEOF(t))) + +#define va_end(ap) ( ap = (va_list)0 ) + +#else + +/* A guess at the proper definitions for other platforms */ + +#define _INTSIZEOF(n) ( (sizeof(n) + sizeof(int) - 1) & ~(sizeof(int) - 1) ) + +#define va_dcl va_list va_alist; +#define va_start(ap) ap = (va_list)&va_alist +#define va_arg(ap,t) ( *(t *)((ap += _INTSIZEOF(t)) - _INTSIZEOF(t)) ) +#define va_end(ap) ap = (va_list)0 + + +#endif + + +#ifdef __cplusplus +} +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_VARARGS */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/vcclr.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/vcclr.h new file mode 100644 index 00000000..e23dffc9 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/vcclr.h @@ -0,0 +1,31 @@ +// +// vcclr.h - helper code for using the managed extensions to C++ +// +// Copyright (C) 2000-2001 Microsoft Corporation +// All rights reserved. +// + +#if _MSC_VER > 1000 +#pragma once +#endif + +#if !defined(_INC_VCCLR) +#define _INC_VCCLR + +#using +#include + +// +// get an interior gc pointer to the first character contained in a System::String object +// +inline const System::Char * PtrToStringChars(const System::String *s) { + + const System::Byte *bp = reinterpret_cast(s); + if( bp != 0 ) { + unsigned offset = System::Runtime::CompilerServices::RuntimeHelpers::OffsetToStringData; + bp += offset; + } + return reinterpret_cast(bp); +} + +#endif //_INC_VCCLR diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/vector b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/vector new file mode 100644 index 00000000..c5a06593 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/vector @@ -0,0 +1,1706 @@ +// vector standard header +#pragma once +#ifndef _VECTOR_ +#define _VECTOR_ +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) + + #pragma warning(disable: 4244) + +_STD_BEGIN + // TEMPLATE CLASS _Vector_val +template + class _Vector_val + { // base class for vector to hold allocator _Alval +protected: + _Vector_val(_Alloc _Al = _Alloc()) + : _Alval(_Al) + { // construct allocator from _Al + } + + typedef typename _Alloc::template + rebind<_Ty>::other _Alty; + + _Alty _Alval; // allocator object for values + }; + + // TEMPLATE CLASS vector +template > + class vector + : public _Vector_val<_Ty, _Ax> + { // varying size array of values +public: + typedef vector<_Ty, _Ax> _Myt; + typedef _Vector_val<_Ty, _Ax> _Mybase; + typedef typename _Mybase::_Alty _Alloc; + typedef _Alloc allocator_type; + typedef typename _Alloc::size_type size_type; + typedef typename _Alloc::difference_type _Dift; + typedef _Dift difference_type; + typedef typename _Alloc::pointer _Tptr; + typedef typename _Alloc::const_pointer _Ctptr; + typedef _Tptr pointer; + typedef _Ctptr const_pointer; + typedef typename _Alloc::reference _Reft; + typedef _Reft reference; + typedef typename _Alloc::const_reference const_reference; + typedef typename _Alloc::value_type value_type; + + #define _ITER_BASE(it) (it)._Myptr + // CLASS const_iterator + class const_iterator; + friend class const_iterator; + + class const_iterator + : public _Ranit<_Ty, _Dift, _Ctptr, const_reference> + { // iterator for nonmutable vector + public: + typedef random_access_iterator_tag iterator_category; + typedef _Ty value_type; + typedef _Dift difference_type; + typedef _Ctptr pointer; + typedef const_reference reference; + + const_iterator() + { // construct with null pointer + _Myptr = 0; + } + + const_iterator(_Tptr _Ptr) + { // construct with pointer _Ptr + _Myptr = _Ptr; + } + + const_reference operator*() const + { // return designated object + + + return (*_Myptr); + } + + _Ctptr operator->() const + { // return pointer to class object + return (&**this); + } + + const_iterator& operator++() + { // preincrement + ++_Myptr; + return (*this); + } + + const_iterator operator++(int) + { // postincrement + const_iterator _Tmp = *this; + ++*this; + return (_Tmp); + } + + const_iterator& operator--() + { // predecrement + --_Myptr; + return (*this); + } + + const_iterator operator--(int) + { // postdecrement + const_iterator _Tmp = *this; + --*this; + return (_Tmp); + } + + const_iterator& operator+=(difference_type _Off) + { // increment by integer + _Myptr += _Off; + return (*this); + } + + const_iterator operator+(difference_type _Off) const + { // return this + integer + const_iterator _Tmp = *this; + return (_Tmp += _Off); + } + + const_iterator& operator-=(difference_type _Off) + { // decrement by integer + return (*this += -_Off); + } + + const_iterator operator-(difference_type _Off) const + { // return this - integer + const_iterator _Tmp = *this; + return (_Tmp -= _Off); + } + + difference_type operator-(const const_iterator& _Right) const + { // return difference of iterators + + + return (_Myptr - _Right._Myptr); + } + + const_reference operator[](difference_type _Off) const + { // subscript + return (*(*this + _Off)); + } + + bool operator==(const const_iterator& _Right) const + { // test for iterator equality + + + return (_Myptr == _Right._Myptr); + } + + bool operator!=(const const_iterator& _Right) const + { // test for iterator inequality + return (!(*this == _Right)); + } + + bool operator<(const const_iterator& _Right) const + { // test if this < _Right + + + return (_Myptr < _Right._Myptr); + } + + bool operator>(const const_iterator& _Right) const + { // test if this > _Right + return (_Right < *this); + } + + bool operator<=(const const_iterator& _Right) const + { // test if this <= _Right + return (!(_Right < *this)); + } + + bool operator>=(const const_iterator& _Right) const + { // test if this >= _Right + return (!(*this < _Right)); + } + + friend const_iterator operator+(difference_type _Off, + const const_iterator& _Right) + { // return iterator + integer + return (_Right + _Off); + } + + + _Tptr _Myptr; // offset of element in vector + }; + + // CLASS iterator + class iterator; + friend class iterator; + + class iterator + : public const_iterator + { // iterator for mutable vector + public: + typedef random_access_iterator_tag iterator_category; + typedef _Ty value_type; + typedef _Dift difference_type; + typedef _Tptr pointer; + typedef _Reft reference; + + iterator() + { // construct with null vector pointer + } + + iterator(pointer _Ptr) + : const_iterator(_Ptr) + { // construct with pointer _Ptr + } + + reference operator*() const + { // return designated object + return ((reference)**(const_iterator *)this); + } + + _Tptr operator->() const + { // return pointer to class object + return (&**this); + } + + iterator& operator++() + { // preincrement + ++this->_Myptr; + return (*this); + } + + iterator operator++(int) + { // postincrement + iterator _Tmp = *this; + ++*this; + return (_Tmp); + } + + iterator& operator--() + { // predecrement + --this->_Myptr; + return (*this); + } + + iterator operator--(int) + { // postdecrement + iterator _Tmp = *this; + --*this; + return (_Tmp); + } + + iterator& operator+=(difference_type _Off) + { // increment by integer + this->_Myptr += _Off; + return (*this); + } + + iterator operator+(difference_type _Off) const + { // return this + integer + iterator _Tmp = *this; + return (_Tmp += _Off); + } + + iterator& operator-=(difference_type _Off) + { // decrement by integer + return (*this += -_Off); + } + + iterator operator-(difference_type _Off) const + { // return this - integer + iterator _Tmp = *this; + return (_Tmp -= _Off); + } + + difference_type operator-(const const_iterator& _Right) const + { // return difference of iterators + return ((const_iterator)*this - _Right); + } + + reference operator[](difference_type _Off) const + { // subscript + return (*(*this + _Off)); + } + + friend iterator operator+(difference_type _Off, + const iterator& _Right) + { // return iterator + integer + return (_Right + _Off); + } + }; + + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + + vector() + : _Mybase() + { // construct empty vector + _Buy(0); + } + + explicit vector(const _Alloc& _Al) + : _Mybase(_Al) + { // construct empty vector with allocator + _Buy(0); + } + + explicit vector(size_type _Count) + : _Mybase() + { // construct from _Count * _Ty() + _Construct_n(_Count, _Ty()); + } + + vector(size_type _Count, const _Ty& _Val) + : _Mybase() + { // construct from _Count * _Val + _Construct_n(_Count, _Val); + } + + vector(size_type _Count, const _Ty& _Val, const _Alloc& _Al) + : _Mybase(_Al) + { // construct from _Count * _Val, with allocator + _Construct_n(_Count, _Val); + } + + vector(const _Myt& _Right) + : _Mybase(_Right._Alval) + { // construct by copying _Right + if (_Buy(_Right.size())) + _TRY_BEGIN + _Mylast = _Ucopy(_Right.begin(), _Right.end(), _Myfirst); + _CATCH_ALL + _Tidy(); + _RERAISE; + _CATCH_END + } + + template + vector(_Iter _First, _Iter _Last) + : _Mybase() + { // construct from [_First, _Last) + _Construct(_First, _Last, _Iter_cat(_First)); + } + + template + vector(_Iter _First, _Iter _Last, const _Alloc& _Al) + : _Mybase(_Al) + { // construct from [_First, _Last), with allocator + _Construct(_First, _Last, _Iter_cat(_First)); + } + + template + void _Construct(_Iter _Count, _Iter _Val, _Int_iterator_tag) + { // initialize with _Count * _Val + size_type _Size = (size_type)_Count; + _Construct_n(_Size, _Val); + } + + template + void _Construct(_Iter _First, + _Iter _Last, input_iterator_tag) + { // initialize with [_First, _Last), input iterators + _Buy(0); + _TRY_BEGIN + insert(begin(), _First, _Last); + _CATCH_ALL + _Tidy(); + _RERAISE; + _CATCH_END + } + + void _Construct_n(size_type _Count, const _Ty& _Val) + { // construct from _Count * _Val + if (_Buy(_Count)) + { // nonzero, fill it + _TRY_BEGIN + _Mylast = _Ufill(_Myfirst, _Count, _Val); + _CATCH_ALL + _Tidy(); + _RERAISE; + _CATCH_END + } + } + + ~vector() + { // destroy the object + _Tidy(); + } + + _Myt& operator=(const _Myt& _Right) + { // assign _Right + if (this != &_Right) + { // worth doing + + + if (_Right.size() == 0) + clear(); // new sequence empty, free storage + else if (_Right.size() <= size()) + { // enough elements, copy new and destroy old + pointer _Ptr = copy(_Right._Myfirst, _Right._Mylast, + _Myfirst); // copy new + _Destroy(_Ptr, _Mylast); // destroy old + _Mylast = _Myfirst + _Right.size(); + } + else if (_Right.size() <= capacity()) + { // enough room, copy and construct new + pointer _Ptr = _Right._Myfirst + size(); + copy(_Right._Myfirst, _Ptr, _Myfirst); + _Mylast = _Ucopy(_Ptr, _Right._Mylast, _Mylast); + } + else + { // not enough room, allocate new array and construct new + if (_Myfirst != 0) + { // discard old array + _Destroy(_Myfirst, _Mylast); + this->_Alval.deallocate(_Myfirst, _Myend - _Myfirst); + } + if (_Buy(_Right.size())) + _Mylast = _Ucopy(_Right._Myfirst, _Right._Mylast, + _Myfirst); + } + } + return (*this); + } + + void reserve(size_type _Count) + { // determine new minimum length of allocated storage + if (max_size() < _Count) + _Xlen(); // result too long + else if (capacity() < _Count) + { // not enough room, reallocate + pointer _Ptr = this->_Alval.allocate(_Count); + + _TRY_BEGIN + _Ucopy(begin(), end(), _Ptr); + _CATCH_ALL + this->_Alval.deallocate(_Ptr, _Count); + _RERAISE; + _CATCH_END + + size_type _Size = size(); + if (_Myfirst != 0) + { // destroy and deallocate old array + _Destroy(_Myfirst, _Mylast); + this->_Alval.deallocate(_Myfirst, _Myend - _Myfirst); + } + + + _Myend = _Ptr + _Count; + _Mylast = _Ptr + _Size; + _Myfirst = _Ptr; + } + } + + size_type capacity() const + { // return current length of allocated storage + return (_Myfirst == 0 ? 0 : _Myend - _Myfirst); + } + + iterator begin() + { // return iterator for beginning of mutable sequence + return (iterator(_Myfirst)); + } + + const_iterator begin() const + { // return iterator for beginning of nonmutable sequence + return (const_iterator(_Myfirst)); + } + + iterator end() + { // return iterator for end of mutable sequence + return (iterator(_Mylast)); + } + + const_iterator end() const + { // return iterator for end of nonmutable sequence + return (const_iterator(_Mylast)); + } + + reverse_iterator rbegin() + { // return iterator for beginning of reversed mutable sequence + return (reverse_iterator(end())); + } + + const_reverse_iterator rbegin() const + { // return iterator for beginning of reversed nonmutable sequence + return (const_reverse_iterator(end())); + } + + reverse_iterator rend() + { // return iterator for end of reversed mutable sequence + return (reverse_iterator(begin())); + } + + const_reverse_iterator rend() const + { // return iterator for end of reversed nonmutable sequence + return (const_reverse_iterator(begin())); + } + + void resize(size_type _Newsize) + { // determine new length, padding with _Ty() elements as needed + resize(_Newsize, _Ty()); + } + + void resize(size_type _Newsize, _Ty _Val) + { // determine new length, padding with _Val elements as needed + if (size() < _Newsize) + _Insert_n(end(), _Newsize - size(), _Val); + else if (_Newsize < size()) + erase(begin() + _Newsize, end()); + } + + size_type size() const + { // return length of sequence + return (_Myfirst == 0 ? 0 : _Mylast - _Myfirst); + } + + size_type max_size() const + { // return maximum possible length of sequence + return (this->_Alval.max_size()); + } + + bool empty() const + { // test if sequence is empty + return (size() == 0); + } + + _Alloc get_allocator() const + { // return allocator object for values + return (this->_Alval); + } + + const_reference at(size_type _Pos) const + { // subscript nonmutable sequence with checking + if (size() <= _Pos) + _Xran(); + return (*(begin() + _Pos)); + } + + reference at(size_type _Pos) + { // subscript mutable sequence with checking + if (size() <= _Pos) + _Xran(); + return (*(begin() + _Pos)); + } + + const_reference operator[](size_type _Pos) const + { // subscript nonmutable sequence + return (*(begin() + _Pos)); + } + + reference operator[](size_type _Pos) + { // subscript mutable sequence + return (*(begin() + _Pos)); + } + + reference front() + { // return first element of mutable sequence + return (*begin()); + } + + const_reference front() const + { // return first element of nonmutable sequence + return (*begin()); + } + + reference back() + { // return last element of mutable sequence + return (*(end() - 1)); + } + + const_reference back() const + { // return last element of nonmutable sequence + return (*(end() - 1)); + } + + void push_back(const _Ty& _Val) + { // insert element at end + if (size() < capacity()) + _Mylast = _Ufill(_Mylast, 1, _Val); + else + insert(end(), _Val); + } + + void pop_back() + { // erase element at end + if (!empty()) + { // erase last element + _Destroy(_Mylast - 1, _Mylast); + --_Mylast; + } + } + + template + void assign(_Iter _First, _Iter _Last) + { // assign [_First, _Last) + _Assign(_First, _Last, _Iter_cat(_First)); + } + + template + void _Assign(_Iter _Count, _Iter _Val, _Int_iterator_tag) + { // assign _Count * _Val + _Assign_n((size_type)_Count, (_Ty)_Val); + } + + template + void _Assign(_Iter _First, _Iter _Last, input_iterator_tag) + { // assign [_First, _Last), input iterators + erase(begin(), end()); + insert(begin(), _First, _Last); + } + + void assign(size_type _Count, const _Ty& _Val) + { // assign _Count * _Val + _Assign_n(_Count, _Val); + } + + iterator insert(iterator _Where, const _Ty& _Val) + { // insert _Val at _Where + size_type _Off = size() == 0 ? 0 : _Where - begin(); + _Insert_n(_Where, (size_type)1, _Val); + return (begin() + _Off); + } + + void insert(iterator _Where, size_type _Count, const _Ty& _Val) + { // insert _Count * _Val at _Where + _Insert_n(_Where, _Count, _Val); + } + + template + void insert(iterator _Where, _Iter _First, _Iter _Last) + { // insert [_First, _Last) at _Where + _Insert(_Where, _First, _Last, _Iter_cat(_First)); + } + + template + void _Insert(iterator _Where, _Iter _First, _Iter _Last, + _Int_iterator_tag) + { // insert _Count * _Val at _Where + _Insert_n(_Where, (size_type)_First, (_Ty)_Last); + } + + template + void _Insert(iterator _Where, _Iter _First, _Iter _Last, + input_iterator_tag) + { // insert [_First, _Last) at _Where, input iterators + for (; _First != _Last; ++_First, ++_Where) + _Where = insert(_Where, *_First); + } + + template + void _Insert(iterator _Where, + _Iter _First, _Iter _Last, forward_iterator_tag) + { // insert [_First, _Last) at _Where, forward iterators + size_type _Count = 0; + _Distance(_First, _Last, _Count); + size_type _Capacity = capacity(); + + if (_Count == 0) + ; + else if (max_size() - size() < _Count) + _Xlen(); // result too long + else if (_Capacity < size() + _Count) + { // not enough room, reallocate + _Capacity = max_size() - _Capacity / 2 < _Capacity + ? 0 : _Capacity + _Capacity / 2; // try to grow by 50% + if (_Capacity < size() + _Count) + _Capacity = size() + _Count; + pointer _Newvec = this->_Alval.allocate(_Capacity); + pointer _Ptr = _Newvec; + + _TRY_BEGIN + _Ptr = _Ucopy(_Myfirst, _ITER_BASE(_Where), + _Newvec); // copy prefix + _Ptr = _Ucopy(_First, _Last, _Ptr); // add new stuff + _Ucopy(_ITER_BASE(_Where), _Mylast, _Ptr); // copy suffix + _CATCH_ALL + _Destroy(_Newvec, _Ptr); + this->_Alval.deallocate(_Newvec, _Capacity); + _RERAISE; + _CATCH_END + + _Count += size(); + if (_Myfirst != 0) + { // destroy and deallocate old array + _Destroy(_Myfirst, _Mylast); + this->_Alval.deallocate(_Myfirst, _Myend - _Myfirst); + } + _Myend = _Newvec + _Capacity; + _Mylast = _Newvec + _Count; + _Myfirst = _Newvec; + } + else if ((size_type)(end() - _Where) < _Count) + { // new stuff spills off end + _Ucopy(_ITER_BASE(_Where), _Mylast, + _ITER_BASE(_Where) + _Count); // copy suffix + _Iter _Mid = _First; + advance(_Mid, end() - _Where); + + _TRY_BEGIN + _Ucopy(_Mid, _Last, _Mylast); // insert new stuff off end + _CATCH_ALL + _Destroy(_ITER_BASE(_Where) + _Count, _Mylast + _Count); + _RERAISE; + _CATCH_END + + _Mylast += _Count; + copy(_First, _Mid, _ITER_BASE(_Where)); // insert to old end + } + else + { // new stuff can all be assigned + pointer _Oldend = _Mylast; + _Mylast = _Ucopy(_Oldend - _Count, _Oldend, + _Mylast); // copy suffix + copy_backward(_ITER_BASE(_Where), _Oldend - _Count, + _Oldend); // copy hole + copy(_First, _Last, _ITER_BASE(_Where)); // insert into hole + } + } + + iterator erase(iterator _Where) + { // erase element at where + copy(_ITER_BASE(_Where) + 1, _Mylast, _ITER_BASE(_Where)); + _Destroy(_Mylast - 1, _Mylast); + --_Mylast; + return (_Where); + } + + iterator erase(iterator _First, iterator _Last) + { // erase [_First, _Last) + if (_First != _Last) + { // worth doing, copy down over hole + pointer _Ptr = copy(_ITER_BASE(_Last), _Mylast, + _ITER_BASE(_First)); + _Destroy(_Ptr, _Mylast); + _Mylast = _Ptr; + } + return (_First); + } + + void clear() + { // erase all + _Tidy(); + } + + void swap(_Myt& _Right) + { // exchange contents with _Right + if (this->_Alval == _Right._Alval) + { // same allocator, swap control information + std::swap(_Myfirst, _Right._Myfirst); + std::swap(_Mylast, _Right._Mylast); + std::swap(_Myend, _Right._Myend); + } + else + { // different allocator, do multiple assigns + _Myt _Ts = *this; *this = _Right, _Right = _Ts; + } + } + +protected: + void _Assign_n(size_type _Count, const _Ty& _Val) + { // assign _Count * _Val + _Ty _Tmp = _Val; // in case _Val is in sequence + erase(begin(), end()); + insert(begin(), _Count, _Tmp); + } + + bool _Buy(size_type _Capacity) + { // allocate array with _Capacity elements + _Myfirst = 0, _Mylast = 0, _Myend = 0; + if (_Capacity == 0) + return (false); + else if (max_size() < _Capacity) + _Xlen(); // result too long + else + { // nonempty array, allocate storage + _Myfirst = this->_Alval.allocate(_Capacity); + _Mylast = _Myfirst; + _Myend = _Myfirst + _Capacity; + } + return (true); + } + + void _Destroy(pointer _First, pointer _Last) + { // destroy [_First, _Last) using allocator + _Destroy_range(_First, _Last, this->_Alval); + } + + void _Tidy() + { // free all storage + if (_Myfirst != 0) + { // something to free, destroy and deallocate it + _Destroy(_Myfirst, _Mylast); + this->_Alval.deallocate(_Myfirst, _Myend - _Myfirst); + } + _Myfirst = 0, _Mylast = 0, _Myend = 0; + } + + template + pointer _Ucopy(_Iter _First, _Iter _Last, pointer _Ptr) + { // copy initializing [_First, _Last), using allocator + return (_Uninitialized_copy(_First, _Last, + _Ptr, this->_Alval)); + } + + void _Insert_n(iterator _Where, + size_type _Count, const _Ty& _Val) + { // insert _Count * _Val at _Where + _Ty _Tmp = _Val; // in case _Val is in sequence + size_type _Capacity = capacity(); + + if (_Count == 0) + ; + else if (max_size() - size() < _Count) + _Xlen(); // result too long + else if (_Capacity < size() + _Count) + { // not enough room, reallocate + _Capacity = max_size() - _Capacity / 2 < _Capacity + ? 0 : _Capacity + _Capacity / 2; // try to grow by 50% + if (_Capacity < size() + _Count) + _Capacity = size() + _Count; + pointer _Newvec = this->_Alval.allocate(_Capacity); + pointer _Ptr = _Newvec; + + _TRY_BEGIN + _Ptr = _Ucopy(_Myfirst, _ITER_BASE(_Where), + _Newvec); // copy prefix + _Ptr = _Ufill(_Ptr, _Count, _Tmp); // add new stuff + _Ucopy(_ITER_BASE(_Where), _Mylast, _Ptr); // copy suffix + _CATCH_ALL + _Destroy(_Newvec, _Ptr); + this->_Alval.deallocate(_Newvec, _Capacity); + _RERAISE; + _CATCH_END + + _Count += size(); + if (_Myfirst != 0) + { // destroy and deallocate old array + _Destroy(_Myfirst, _Mylast); + this->_Alval.deallocate(_Myfirst, _Myend - _Myfirst); + } + _Myend = _Newvec + _Capacity; + _Mylast = _Newvec + _Count; + _Myfirst = _Newvec; + } + else if ((size_type)(_Mylast - _ITER_BASE(_Where)) < _Count) + { // new stuff spills off end + _Ucopy(_ITER_BASE(_Where), _Mylast, + _ITER_BASE(_Where) + _Count); // copy suffix + + _TRY_BEGIN + _Ufill(_Mylast, _Count - (_Mylast - _ITER_BASE(_Where)), + _Tmp); // insert new stuff off end + _CATCH_ALL + _Destroy(_ITER_BASE(_Where) + _Count, _Mylast + _Count); + _RERAISE; + _CATCH_END + + _Mylast += _Count; + fill(_ITER_BASE(_Where), _Mylast - _Count, + _Tmp); // insert up to old end + } + else + { // new stuff can all be assigned + pointer _Oldend = _Mylast; + _Mylast = _Ucopy(_Oldend - _Count, _Oldend, + _Mylast); // copy suffix + copy_backward(_ITER_BASE(_Where), _Oldend - _Count, + _Oldend); // copy hole + fill(_ITER_BASE(_Where), _ITER_BASE(_Where) + _Count, + _Tmp); // insert into hole + } + } + + pointer _Ufill(pointer _Ptr, size_type _Count, const _Ty &_Val) + { // copy initializing _Count * _Val, using allocator + _Uninitialized_fill_n(_Ptr, _Count, _Val, this->_Alval); + return (_Ptr + _Count); + } + + void _Xlen() const + { // report a length_error + _THROW(length_error, "vector too long"); + } + + void _Xran() const + { // report an out_of_range error + _THROW(out_of_range, "invalid vector subscript"); + } + +public: + pointer _Myfirst; // pointer to beginning of array + pointer _Mylast; // pointer to current end of sequence + pointer _Myend; // pointer to end of array + }; + + // vector TEMPLATE FUNCTIONS +template inline + bool operator==(const vector<_Ty, _Alloc>& _Left, + const vector<_Ty, _Alloc>& _Right) + { // test for vector equality + return (_Left.size() == _Right.size() + && equal(_Left.begin(), _Left.end(), _Right.begin())); + } + +template inline + bool operator!=(const vector<_Ty, _Alloc>& _Left, + const vector<_Ty, _Alloc>& _Right) + { // test for vector inequality + return (!(_Left == _Right)); + } + +template inline + bool operator<(const vector<_Ty, _Alloc>& _Left, + const vector<_Ty, _Alloc>& _Right) + { // test if _Left < _Right for vectors + return (lexicographical_compare(_Left.begin(), _Left.end(), + _Right.begin(), _Right.end())); + } + +template inline + bool operator>(const vector<_Ty, _Alloc>& _Left, + const vector<_Ty, _Alloc>& _Right) + { // test if _Left > _Right for vectors + return (_Right < _Left); + } + +template inline + bool operator<=(const vector<_Ty, _Alloc>& _Left, + const vector<_Ty, _Alloc>& _Right) + { // test if _Left <= _Right for vectors + return (!(_Right < _Left)); + } + +template inline + bool operator>=(const vector<_Ty, _Alloc>& _Left, + const vector<_Ty, _Alloc>& _Right) + { // test if _Left >= _Right for vectors + return (!(_Left < _Right)); + } + +template inline + void swap(vector<_Ty, _Alloc>& _Left, vector<_Ty, _Alloc>& _Right) + { // swap _Left and _Right vectors + _Left.swap(_Right); + } + + // CLASS vector +typedef unsigned _Vbase; // word type for vector representation +const int _VBITS = 8 * sizeof (_Vbase); // at least CHAR_BITS bits per word + +template + class vector<_Bool, _Alloc> + { // varying size array of bits +public: + typedef typename _Alloc::size_type size_type; + typedef typename _Alloc::difference_type _Dift; + typedef std::vector<_Vbase, + typename _Alloc::template rebind<_Vbase>::other> + _Vbtype; + typedef std::vector<_Bool, _Alloc> _Myt; + typedef _Dift difference_type; + typedef _Bool _Ty; + typedef _Alloc allocator_type; + + typedef bool const_reference; + typedef bool value_type; + + + // CLASS _Vb_iter_base + class _Vb_iter_base + : public _Ranit<_Bool, _Dift, value_type *, value_type> + { // store information common to reference and iterators + public: + _Vb_iter_base() + : _Myoff(0), _Myptr(0) + { // construct with null pointer + } + + _Vb_iter_base(_Vbase *_Ptr) + : _Myoff(0), _Myptr(_Ptr) + { // construct with offset and pointer + } + + size_type _Myoff; + _Vbase *_Myptr; + }; + + // CLASS reference + class reference + : public _Vb_iter_base + { // reference to a bit within a base word + public: + reference() + { // construct with null pointer + } + + reference(const _Vb_iter_base& _Right) + : _Vb_iter_base(_Right) + { // construct with base + } + + reference& operator=(const reference& _Right) + { // assign reference _Right to bit + return (*this = bool(_Right)); + } + + reference& operator=(bool _Val) + { // assign _Val to bit + if (_Val) + *_Getptr() |= _Mask(); + else + *_Getptr() &= ~_Mask(); + return (*this); + } + + void flip() + { // toggle the bit + *_Getptr() ^= _Mask(); + } + + bool operator~() const + { // test if bit is reset + return (!bool(*this)); + } + + operator bool() const + { // test if bit is set + return ((*_Getptr() & _Mask()) != 0); + } + + _Vbase *_Getptr() const + { // get pointer to base word + + + return (this->_Myptr); + } + + protected: + _Vbase _Mask() const + { // convert offset to mask + return ((_Vbase)(1 << this->_Myoff)); + } + }; + + typedef reference _Reft; + + // CLASS const_iterator + class const_iterator + : public _Vb_iter_base + { // iterator for nonmutable vector + public: + typedef random_access_iterator_tag iterator_category; + typedef _Bool value_type; + typedef _Dift difference_type; + typedef const_reference *pointer; + typedef const_reference reference; + + const_iterator() + { // construct with null reference + } + + const_iterator(const _Vbase *_Ptr) + : _Vb_iter_base((_Vbase *)_Ptr) + + { // construct with offset and pointer + } + + const_reference operator*() const + { // return (reference to) designated object + return (_Reft(*this)); + } + + const_iterator& operator++() + { // preincrement + _Inc(); + return (*this); + } + + const_iterator operator++(int) + { // postincrement + const_iterator _Tmp = *this; + ++*this; + return (_Tmp); + } + + const_iterator& operator--() + { // predecrement + _Dec(); + return (*this); + } + + const_iterator operator--(int) + { // postdecrement + const_iterator _Tmp = *this; + --*this; + return (_Tmp); + } + + const_iterator& operator+=(difference_type _Off) + { // increment by integer + this->_Myoff += _Off; + this->_Myptr += this->_Myoff / _VBITS; + this->_Myoff %= _VBITS; + return (*this); + } + + const_iterator operator+(difference_type _Off) const + { // return this + integer + const_iterator _Tmp = *this; + return (_Tmp += _Off); + } + + const_iterator& operator-=(difference_type _Off) + { // decrement by integer + return (*this += -_Off); + } + + const_iterator operator-(difference_type _Off) const + { // return this - integer + const_iterator _Tmp = *this; + return (_Tmp -= _Off); + } + + difference_type operator-(const const_iterator _Right) const + { // return difference of iterators + return (_VBITS * (this->_Myptr - _Right._Myptr) + + (difference_type)this->_Myoff + - (difference_type)_Right._Myoff); + } + + const_reference operator[](difference_type _Off) const + { // subscript + return (*(*this + _Off)); + } + + bool operator==(const const_iterator& _Right) const + { // test for iterator equality + return (this->_Myptr == _Right._Myptr && this->_Myoff == _Right._Myoff); + } + + bool operator!=(const const_iterator& _Right) const + { // test for iterator inequality + return (!(*this == _Right)); + } + + bool operator<(const const_iterator& _Right) const + { // test if this < _Right + return (this->_Myptr < _Right._Myptr + || this->_Myptr == _Right._Myptr && this->_Myoff < _Right._Myoff); + } + + bool operator>(const const_iterator& _Right) const + { // test if this > _Right + return (_Right < *this); + } + + bool operator<=(const const_iterator& _Right) const + { // test if this <= _Right + return (!(_Right < *this)); + } + + bool operator>=(const const_iterator& _Right) const + { // test if this >= _Right + return (!(*this < _Right)); + } + + friend const_iterator operator+(difference_type _Off, + const const_iterator& _Right) + { // return iterator + integer + return (_Right + _Off); + } + + protected: + void _Dec() + { // decrement bit position + if (this->_Myoff != 0) + --this->_Myoff; + else + this->_Myoff = _VBITS - 1, --this->_Myptr; + } + + void _Inc() + { // increment bit position + if (this->_Myoff < _VBITS - 1) + ++this->_Myoff; + else + this->_Myoff = 0, ++this->_Myptr; + } + }; + + // CLASS iterator + class iterator + : public const_iterator + { // iterator for mutable vector + public: + typedef random_access_iterator_tag iterator_category; + typedef _Bool value_type; + typedef _Dift difference_type; + typedef _Reft *pointer; + typedef _Reft reference; + + iterator() + { // construct with null reference + } + + iterator( _Vbase *_Ptr) + : const_iterator(_Ptr) + { // construct with offset and pointer + } + + reference operator*() const + { // return (reference to) designated object + return (_Reft(*this)); + } + + iterator& operator++() + { // preincrement + ++*(const_iterator *)this; + return (*this); + } + + iterator operator++(int) + { // postincrement + iterator _Tmp = *this; + ++*this; + return (_Tmp); + } + + iterator& operator--() + { // predecrement + --*(const_iterator *)this; + return (*this); + } + + iterator operator--(int) + { // postdecrement + iterator _Tmp = *this; + --*this; + return (_Tmp); + } + + iterator& operator+=(difference_type _Off) + { // increment by integer + *(const_iterator *)this += _Off; + return (*this); + } + + iterator operator+(difference_type _Off) const + { // return this + integer + iterator _Tmp = *this; + return (_Tmp += _Off); + } + + iterator& operator-=(difference_type _Off) + { // decrement by integer + return (*this += -_Off); + } + + iterator operator-(difference_type _Off) const + { // return this - integer + iterator _Tmp = *this; + return (_Tmp -= _Off); + } + + difference_type operator-(const const_iterator _Right) const + { // return difference of iterators + return (*(const_iterator *)this - _Right); + } + + reference operator[](difference_type _Off) const + { // subscript + return (*(*this + _Off)); + } + + friend iterator operator+(difference_type _Off, + const iterator& _Right) + { // return iterator + integer + return (_Right + _Off); + } + }; + + typedef iterator pointer; + typedef const_iterator const_pointer; + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + + vector() + : _Mysize(0), _Myvec() + { // construct empty vector + } + + explicit vector(const _Alloc& _Al) + : _Mysize(0), _Myvec(_Al) + { // construct empty vector, with allocator + } + + explicit vector(size_type _Count, bool _Val = false) + : _Mysize(0), _Myvec(_Nw(_Count), (_Vbase)(_Val ? -1 : 0)) + { // construct from _Count * _Val + _Trim(_Count); + } + + vector(size_type _Count, bool _Val, const _Alloc& _Al) + : _Mysize(0), _Myvec(_Nw(_Count), (_Vbase)(_Val ? -1 : 0), _Al) + { // construct from _Count * _Val, with allocator + _Trim(_Count); + } + + template + vector(_Iter _First, _Iter _Last) + : _Mysize(0), _Myvec() + { // construct from [_First, _Last) + _BConstruct(_First, _Last, _Iter_cat(_First)); + } + + template + vector(_Iter _First, _Iter _Last, const _Alloc& _Al) + : _Mysize(0), _Myvec(_Al) + { // construct from [_First, _Last), with allocator + _BConstruct(_First, _Last, _Iter_cat(_First)); + } + + template + void _BConstruct(_Iter _Count, _Iter _Val, _Int_iterator_tag) + { // initialize from _Count * _Val + size_type _Num = (size_type)_Count; + _Myvec.assign(_Num, (_Ty)_Val ? -1 : 0); + _Trim(_Num); + } + + template + void _BConstruct(_Iter _First, _Iter _Last, input_iterator_tag) + { // initialize from [_First, _Last), input iterators + insert(begin(), _First, _Last); + } + + ~vector() + { // destroy the object + _Mysize = 0; + } + + void reserve(size_type _Count) + { // determine new minimum length of allocated storage + _Myvec.reserve(_Nw(_Count)); + } + + size_type capacity() const + { // return current length of allocated storage + return (_Myvec.capacity() * _VBITS); + } + + iterator begin() + { // return iterator for beginning of mutable sequence + return (iterator(_ITER_BASE(_Myvec.begin()))); + } + + const_iterator begin() const + { // return iterator for beginning of nonmutable sequence + return (const_iterator(_ITER_BASE(_Myvec.begin()))); + } + + iterator end() + { // return iterator for end of mutable sequence + iterator _Tmp = begin(); + if (0 < _Mysize) + _Tmp += _Mysize; + return (_Tmp); + } + + const_iterator end() const + { // return iterator for end of nonmutable sequence + const_iterator _Tmp = begin(); + if (0 < _Mysize) + _Tmp += _Mysize; + return (_Tmp); + } + + reverse_iterator rbegin() + { // return iterator for beginning of reversed mutable sequence + return (reverse_iterator(end())); + } + + const_reverse_iterator rbegin() const + { // return iterator for beginning of reversed nonmutable sequence + return (const_reverse_iterator(end())); + } + + reverse_iterator rend() + { // return iterator for end of reversed mutable sequence + return (reverse_iterator(begin())); + } + + const_reverse_iterator rend() const + { // return iterator for end of reversed nonmutable sequence + return (const_reverse_iterator(begin())); + } + + void resize(size_type _Newsize, bool _Val = false) + { // determine new length, padding with _Val elements as needed + if (size() < _Newsize) + _Insert_n(end(), _Newsize - size(), _Val); + else if (_Newsize < size()) + erase(begin() + _Newsize, end()); + } + + size_type size() const + { // return length of sequence + return (_Mysize); + } + + size_type max_size() const + { // return maximum possible length of sequence + const size_type _Maxsize = _Myvec.max_size(); + return (_Maxsize < (size_type)(-1) / _VBITS + ? _Maxsize * _VBITS : (size_type)(-1)); + } + + bool empty() const + { // test if sequence is empty + return (size() == 0); + } + + _Alloc get_allocator() const + { // return allocator object for values + return (_Myvec.get_allocator()); + } + + const_reference at(size_type _Off) const + { // subscript nonmutable sequence with checking + if (size() <= _Off) + _Xran(); + return (*(begin() + _Off)); + } + + reference at(size_type _Off) + { // subscript mutable sequence with checking + if (size() <= _Off) + _Xran(); + return (*(begin() + _Off)); + } + + const_reference operator[](size_type _Off) const + { // subscript nonmutable sequence + return (*(begin() + _Off)); + } + + reference operator[](size_type _Off) + { // subscript mutable sequence + return (*(begin() + _Off)); + } + + reference front() + { // return first element of mutable sequence + return (*begin()); + } + + const_reference front() const + { // return first element of nonmutable sequence + return (*begin()); + } + + reference back() + { // return last element of mutable sequence + return (*(end() - 1)); + } + + const_reference back() const + { // return last element of nonmutable sequence + return (*(end() - 1)); + } + + void push_back(bool _Val) + { // insert element at end + insert(end(), _Val); + } + + void pop_back() + { // erase element at end + if (!empty()) + erase(end() - 1); + } + + template + void assign(_Iter _First, _Iter _Last) + { // assign [_First, _Last) + _Assign(_First, _Last, _Iter_cat(_First)); + } + + template + void _Assign(_Iter _Count, _Iter _Val, _Int_iterator_tag) + { // assign _Count * _Val + _Assign_n((size_type)_Count, (bool)_Val); + } + + template + void _Assign(_Iter _First, _Iter _Last, input_iterator_tag) + { // assign [_First, _Last), input iterators + erase(begin(), end()); + insert(begin(), _First, _Last); + } + + void assign(size_type _Count, bool _Val) + { // assign _Count * _Val + _Assign_n(_Count, _Val); + } + + iterator insert(iterator _Where, bool _Val) + { // insert _Val at _Where + size_type _Off = _Where - begin(); + _Insert_n(_Where, (size_type)1, _Val); + return (begin() + _Off); + } + + void insert(iterator _Where, size_type _Count, bool _Val) + { // insert _Count * _Val at _Where + _Insert_n(_Where, _Count, _Val); + } + + template + void insert(iterator _Where, _Iter _First, _Iter _Last) + { // insert [_First, _Last) at _Where + _Insert(_Where, _First, _Last, _Iter_cat(_First)); + } + + template + void _Insert(iterator _Where, _Iter _Count, _Iter _Val, + _Int_iterator_tag) + { // insert _Count * _Val at _Where + _Insert_n(_Where, (size_type)_Count, (bool)_Val); + } + + template + void _Insert(iterator _Where, _Iter _First, _Iter _Last, + input_iterator_tag) + { // insert [_First, _Last) at _Where, input iterators + size_type _Off = _Where - begin(); + + for (; _First != _Last; ++_First, ++_Off) + insert(begin() + _Off, *_First); + } + + template + void _Insert(iterator _Where, + _Iter _First, _Iter _Last, + forward_iterator_tag) + { // insert [_First, _Last) at _Where, forward iterators + + + size_type _Count = 0; + _Distance(_First, _Last, _Count); + + size_type _Off = _Insert_x(_Where, _Count); + copy(_First, _Last, begin() + _Off); + } + + iterator erase(iterator _Where) + { // erase element at _Where + size_type _Off = _Where - begin(); + + copy(_Where + 1, end(), _Where); + _Trim(_Mysize - 1); + return (begin() + _Off); + } + + iterator erase(iterator _First, iterator _Last) + { // erase [_First, _Last) + size_type _Off = _First - begin(); + + iterator _Next = copy(_Last, end(), _First); + _Trim(_Next - begin()); + + return (begin() + _Off); + } + + void clear() + { // erase all elements + erase(begin(), end()); + } + + void flip() + { // toggle all elements + for (typename _Vbtype::iterator _Next = _Myvec.begin(); + _Next != _Myvec.end(); ++_Next) + *_Next = (_Vbase)~*_Next; + _Trim(_Mysize); + } + + void swap(_Myt& _Right) + { // exchange contents with right + std::swap(_Mysize, _Right._Mysize); + _Myvec.swap(_Right._Myvec); + } + + static void swap(reference _Left, reference _Right) + { // swap _Left and _Right vector elements + bool _Val = _Left; + _Left = _Right; + _Right = _Val; + } + +protected: + void _Assign_n(size_type _Count, bool _Val) + { // assign _Count * _Val + erase(begin(), end()); + _Insert_n(begin(), _Count, _Val); + } + + void _Insert_n(iterator _Where, + size_type _Count, bool _Val) + { // insert _Count * _Val at _Where + size_type _Off = _Insert_x(_Where, _Count); + fill(begin() + _Off, begin() + (_Off + _Count), _Val); + } + + size_type _Insert_x(iterator _Where, size_type _Count) + { // make room to insert _Count elements at _Where + size_type _Off = _Where - begin(); + + + if (_Count == 0) + ; + else if (max_size() - size() < _Count) + _Xlen(); // result too long + else + { // worth doing + _Myvec.resize(_Nw(size() + _Count), 0); + if (size() == 0) + _Mysize += _Count; + else + { // make room and copy down suffix + iterator _Oldend = end(); + _Mysize += _Count; + copy_backward(begin() + _Off, _Oldend, end()); + } + + } + return (_Off); + } + + static size_type _Nw(size_type _Count) + { // return number of base words from number of bits + return ((_Count + _VBITS - 1) / _VBITS); + } + + void _Trim(size_type _Size) + { // trim base vector to exact length in bits + if (max_size() < _Size) + _Xlen(); // result too long + size_type _Words = _Nw(_Size); + + if (_Words < _Myvec.size()) + _Myvec.erase(_Myvec.begin() + _Words, _Myvec.end()); + _Mysize = _Size; + _Size %= _VBITS; + if (0 < _Size) + _Myvec[_Words - 1] &= (_Vbase)((1 << _Size) - 1); + } + + void _Xlen() const + { // report a length_error + _THROW(length_error, "vector too long"); + } + + void _Xran() const + { // throw an out_of_range error + _THROW(out_of_range, "invalid vector subscript"); + } + +public: + size_type _Mysize; // current length of sequence + _Vbtype _Myvec; // base vector of words + }; + +typedef vector > _Bvector; + + +_STD_END + #pragma warning(default: 4244) +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _VECTOR_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + */ + +/* + * This file is derived from software bearing the following + * restrictions: + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this + * software and its documentation for any purpose is hereby + * granted without fee, provided that the above copyright notice + * appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation. + * Hewlett-Packard Company makes no representations about the + * suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/wchar.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/wchar.h new file mode 100644 index 00000000..ea169a06 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/wchar.h @@ -0,0 +1,817 @@ +/*** +*wchar.h - declarations for wide character functions +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* +*Purpose: +* This file contains the types, macros and function declarations for +* all wide character-related functions. They may also be declared in +* individual header files on a functional basis. +* [ISO] +* +* Note: keep in sync with ctype.h, stdio.h, stdlib.h, string.h, time.h. +* +* [Public] +* +****/ + +#if _MSC_VER > 1000 +#pragma once +#endif + + +#ifndef _INC_WCHAR +#define _INC_WCHAR + + + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + +/* Define _CRTIMP2 */ +#ifndef _CRTIMP2 +#if defined(_DLL) && !defined(_STATIC_CPPLIB) +#define _CRTIMP2 __declspec(dllimport) +#else /* ndef _DLL && !STATIC_CPPLIB */ +#define _CRTIMP2 +#endif /* _DLL && !STATIC_CPPLIB */ +#endif /* _CRTIMP2 */ + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + + +#ifndef _SIZE_T_DEFINED +#ifdef _WIN64 +typedef unsigned __int64 size_t; +#else +typedef _W64 unsigned int size_t; +#endif +#define _SIZE_T_DEFINED +#endif + +#ifndef _TIME_T_DEFINED +#ifdef _WIN64 +typedef __int64 time_t; /* time value */ +#else +typedef _W64 long time_t; /* time value */ +#endif +#define _TIME_T_DEFINED /* avoid multiple def's of time_t */ +#endif + +#ifndef _TIME64_T_DEFINED +#if _INTEGRAL_MAX_BITS >= 64 +typedef __int64 __time64_t; /* 64-bit time value */ +#endif +#define _TIME64_T_DEFINED +#endif + +#ifndef _INTPTR_T_DEFINED +#ifdef _WIN64 +typedef __int64 intptr_t; +#else +typedef _W64 int intptr_t; +#endif +#define _INTPTR_T_DEFINED +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +#define WCHAR_MIN 0 +#define WCHAR_MAX ((wchar_t)-1) + +#ifndef _WCTYPE_T_DEFINED +typedef unsigned short wint_t; +typedef unsigned short wctype_t; +#define _WCTYPE_T_DEFINED +#endif + + +#ifndef _VA_LIST_DEFINED +#ifdef _M_ALPHA +typedef struct { + char *a0; /* pointer to first homed integer argument */ + int offset; /* byte offset of next parameter */ +} va_list; +#else +typedef char * va_list; +#endif +#define _VA_LIST_DEFINED +#endif + +#ifndef WEOF +#define WEOF (wint_t)(0xFFFF) +#endif + +#ifndef _FILE_DEFINED +struct _iobuf { + char *_ptr; + int _cnt; + char *_base; + int _flag; + int _file; + int _charbuf; + int _bufsiz; + char *_tmpfname; + }; +typedef struct _iobuf FILE; +#define _FILE_DEFINED +#endif + +/* Declare _iob[] array */ + +#ifndef _STDIO_DEFINED +_CRTIMP extern FILE _iob[]; +#endif /* _STDIO_DEFINED */ + +#ifndef _FSIZE_T_DEFINED +typedef unsigned long _fsize_t; /* Could be 64 bits for Win32 */ +#define _FSIZE_T_DEFINED +#endif + +#ifndef _WFINDDATA_T_DEFINED + +struct _wfinddata_t { + unsigned attrib; + time_t time_create; /* -1 for FAT file systems */ + time_t time_access; /* -1 for FAT file systems */ + time_t time_write; + _fsize_t size; + wchar_t name[260]; +}; + +#if _INTEGRAL_MAX_BITS >= 64 + +struct _wfinddatai64_t { + unsigned attrib; + time_t time_create; /* -1 for FAT file systems */ + time_t time_access; /* -1 for FAT file systems */ + time_t time_write; + __int64 size; + wchar_t name[260]; +}; + +struct __wfinddata64_t { + unsigned attrib; + __time64_t time_create; /* -1 for FAT file systems */ + __time64_t time_access; /* -1 for FAT file systems */ + __time64_t time_write; + __int64 size; + wchar_t name[260]; +}; + +#endif + +#define _WFINDDATA_T_DEFINED +#endif + +/* define NULL pointer value */ + +#ifndef NULL +#ifdef __cplusplus +#define NULL 0 +#else +#define NULL ((void *)0) +#endif +#endif + + +#ifndef _CTYPE_DISABLE_MACROS +_CRTIMP extern const unsigned short _wctype[]; +_CRTIMP extern const unsigned short *_pctype; +_CRTIMP extern const wctype_t *_pwctype; +#endif /* _CTYPE_DISABLE_MACROS */ + + +/* set bit masks for the possible character types */ + +#define _UPPER 0x1 /* upper case letter */ +#define _LOWER 0x2 /* lower case letter */ +#define _DIGIT 0x4 /* digit[0-9] */ +#define _SPACE 0x8 /* tab, carriage return, newline, */ + /* vertical tab or form feed */ +#define _PUNCT 0x10 /* punctuation character */ +#define _CONTROL 0x20 /* control character */ +#define _BLANK 0x40 /* space char */ +#define _HEX 0x80 /* hexadecimal digit */ + +#define _LEADBYTE 0x8000 /* multibyte leadbyte */ +#define _ALPHA (0x0100|_UPPER|_LOWER) /* alphabetic character */ + + +/* Function prototypes */ + +#ifndef _WCTYPE_DEFINED + +/* Character classification function prototypes */ +/* also declared in ctype.h */ + +_CRTIMP int __cdecl iswalpha(wint_t); +_CRTIMP int __cdecl iswupper(wint_t); +_CRTIMP int __cdecl iswlower(wint_t); +_CRTIMP int __cdecl iswdigit(wint_t); +_CRTIMP int __cdecl iswxdigit(wint_t); +_CRTIMP int __cdecl iswspace(wint_t); +_CRTIMP int __cdecl iswpunct(wint_t); +_CRTIMP int __cdecl iswalnum(wint_t); +_CRTIMP int __cdecl iswprint(wint_t); +_CRTIMP int __cdecl iswgraph(wint_t); +_CRTIMP int __cdecl iswcntrl(wint_t); +_CRTIMP int __cdecl iswascii(wint_t); +_CRTIMP int __cdecl isleadbyte(int); + +_CRTIMP wchar_t __cdecl towupper(wchar_t); +_CRTIMP wchar_t __cdecl towlower(wchar_t); + +_CRTIMP int __cdecl iswctype(wint_t, wctype_t); + +/* --------- The following functions are OBSOLETE --------- */ +_CRTIMP int __cdecl is_wctype(wint_t, wctype_t); +/* --------- The preceding functions are OBSOLETE --------- */ + +#define _WCTYPE_DEFINED +#endif + +#ifndef _WDIRECT_DEFINED + +/* also declared in direct.h */ + +_CRTIMP int __cdecl _wchdir(const wchar_t *); +_CRTIMP wchar_t * __cdecl _wgetcwd(wchar_t *, int); +_CRTIMP wchar_t * __cdecl _wgetdcwd(int, wchar_t *, int); +_CRTIMP int __cdecl _wmkdir(const wchar_t *); +_CRTIMP int __cdecl _wrmdir(const wchar_t *); + +#define _WDIRECT_DEFINED +#endif + +#ifndef _WIO_DEFINED + +/* also declared in io.h */ + +_CRTIMP int __cdecl _waccess(const wchar_t *, int); +_CRTIMP int __cdecl _wchmod(const wchar_t *, int); +_CRTIMP int __cdecl _wcreat(const wchar_t *, int); +_CRTIMP intptr_t __cdecl _wfindfirst(wchar_t *, struct _wfinddata_t *); +_CRTIMP int __cdecl _wfindnext(intptr_t, struct _wfinddata_t *); +_CRTIMP int __cdecl _wunlink(const wchar_t *); +_CRTIMP int __cdecl _wrename(const wchar_t *, const wchar_t *); +_CRTIMP int __cdecl _wopen(const wchar_t *, int, ...); +_CRTIMP int __cdecl _wsopen(const wchar_t *, int, int, ...); +_CRTIMP wchar_t * __cdecl _wmktemp(wchar_t *); + +#if _INTEGRAL_MAX_BITS >= 64 +_CRTIMP intptr_t __cdecl _wfindfirsti64(wchar_t *, struct _wfinddatai64_t *); +_CRTIMP intptr_t __cdecl _wfindfirst64(wchar_t *, struct __wfinddata64_t *); +_CRTIMP int __cdecl _wfindnexti64(intptr_t, struct _wfinddatai64_t *); +_CRTIMP int __cdecl _wfindnext64(intptr_t, struct __wfinddata64_t *); +#endif + +#define _WIO_DEFINED +#endif + +#ifndef _WLOCALE_DEFINED + +/* wide function prototypes, also declared in wchar.h */ + +_CRTIMP wchar_t * __cdecl _wsetlocale(int, const wchar_t *); + +#define _WLOCALE_DEFINED +#endif + +#ifndef _WPROCESS_DEFINED + +/* also declared in process.h */ + +_CRTIMP intptr_t __cdecl _wexecl(const wchar_t *, const wchar_t *, ...); +_CRTIMP intptr_t __cdecl _wexecle(const wchar_t *, const wchar_t *, ...); +_CRTIMP intptr_t __cdecl _wexeclp(const wchar_t *, const wchar_t *, ...); +_CRTIMP intptr_t __cdecl _wexeclpe(const wchar_t *, const wchar_t *, ...); +_CRTIMP intptr_t __cdecl _wexecv(const wchar_t *, const wchar_t * const *); +_CRTIMP intptr_t __cdecl _wexecve(const wchar_t *, const wchar_t * const *, const wchar_t * const *); +_CRTIMP intptr_t __cdecl _wexecvp(const wchar_t *, const wchar_t * const *); +_CRTIMP intptr_t __cdecl _wexecvpe(const wchar_t *, const wchar_t * const *, const wchar_t * const *); +_CRTIMP intptr_t __cdecl _wspawnl(int, const wchar_t *, const wchar_t *, ...); +_CRTIMP intptr_t __cdecl _wspawnle(int, const wchar_t *, const wchar_t *, ...); +_CRTIMP intptr_t __cdecl _wspawnlp(int, const wchar_t *, const wchar_t *, ...); +_CRTIMP intptr_t __cdecl _wspawnlpe(int, const wchar_t *, const wchar_t *, ...); +_CRTIMP intptr_t __cdecl _wspawnv(int, const wchar_t *, const wchar_t * const *); +_CRTIMP intptr_t __cdecl _wspawnve(int, const wchar_t *, const wchar_t * const *, + const wchar_t * const *); +_CRTIMP intptr_t __cdecl _wspawnvp(int, const wchar_t *, const wchar_t * const *); +_CRTIMP intptr_t __cdecl _wspawnvpe(int, const wchar_t *, const wchar_t * const *, + const wchar_t * const *); +_CRTIMP int __cdecl _wsystem(const wchar_t *); + +#define _WPROCESS_DEFINED +#endif + +#ifndef _WCTYPE_INLINE_DEFINED +#ifndef __cplusplus +#define iswalpha(_c) ( iswctype(_c,_ALPHA) ) +#define iswupper(_c) ( iswctype(_c,_UPPER) ) +#define iswlower(_c) ( iswctype(_c,_LOWER) ) +#define iswdigit(_c) ( iswctype(_c,_DIGIT) ) +#define iswxdigit(_c) ( iswctype(_c,_HEX) ) +#define iswspace(_c) ( iswctype(_c,_SPACE) ) +#define iswpunct(_c) ( iswctype(_c,_PUNCT) ) +#define iswalnum(_c) ( iswctype(_c,_ALPHA|_DIGIT) ) +#define iswprint(_c) ( iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT) ) +#define iswgraph(_c) ( iswctype(_c,_PUNCT|_ALPHA|_DIGIT) ) +#define iswcntrl(_c) ( iswctype(_c,_CONTROL) ) +#define iswascii(_c) ( (unsigned)(_c) < 0x80 ) + +#ifndef _CTYPE_DISABLE_MACROS +#define isleadbyte(_c) (_pctype[(unsigned char)(_c)] & _LEADBYTE) +#endif /* _CTYPE_DISABLE_MACROS */ + +#else /* __cplusplus */ +inline int __cdecl iswalpha(wint_t _C) {return (iswctype(_C,_ALPHA)); } +inline int __cdecl iswupper(wint_t _C) {return (iswctype(_C,_UPPER)); } +inline int __cdecl iswlower(wint_t _C) {return (iswctype(_C,_LOWER)); } +inline int __cdecl iswdigit(wint_t _C) {return (iswctype(_C,_DIGIT)); } +inline int __cdecl iswxdigit(wint_t _C) {return (iswctype(_C,_HEX)); } +inline int __cdecl iswspace(wint_t _C) {return (iswctype(_C,_SPACE)); } +inline int __cdecl iswpunct(wint_t _C) {return (iswctype(_C,_PUNCT)); } +inline int __cdecl iswalnum(wint_t _C) {return (iswctype(_C,_ALPHA|_DIGIT)); } +inline int __cdecl iswprint(wint_t _C) + {return (iswctype(_C,_BLANK|_PUNCT|_ALPHA|_DIGIT)); } +inline int __cdecl iswgraph(wint_t _C) + {return (iswctype(_C,_PUNCT|_ALPHA|_DIGIT)); } +inline int __cdecl iswcntrl(wint_t _C) {return (iswctype(_C,_CONTROL)); } +inline int __cdecl iswascii(wint_t _C) {return ((unsigned)(_C) < 0x80); } + +#ifndef _CTYPE_DISABLE_MACROS +inline int __cdecl isleadbyte(int _C) + {return (_pctype[(unsigned char)(_C)] & _LEADBYTE); } +#endif /* _CTYPE_DISABLE_MACROS */ +#endif /* __cplusplus */ +#define _WCTYPE_INLINE_DEFINED +#endif /* _WCTYPE_INLINE_DEFINED */ + + +#ifndef _POSIX_ + +/* define structure for returning status information */ + +#ifndef _INO_T_DEFINED +typedef unsigned short _ino_t; /* i-node number (not used on DOS) */ +#if !__STDC__ +/* Non-ANSI name for compatibility */ +typedef unsigned short ino_t; +#endif +#define _INO_T_DEFINED +#endif + +#ifndef _DEV_T_DEFINED +typedef unsigned int _dev_t; /* device code */ +#if !__STDC__ +/* Non-ANSI name for compatibility */ +typedef unsigned int dev_t; +#endif +#define _DEV_T_DEFINED +#endif + +#ifndef _OFF_T_DEFINED +typedef long _off_t; /* file offset value */ +#if !__STDC__ +/* Non-ANSI name for compatibility */ +typedef long off_t; +#endif +#define _OFF_T_DEFINED +#endif + +#ifndef _STAT_DEFINED + +struct _stat { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + _off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; + }; + +#if !__STDC__ +/* Non-ANSI names for compatibility */ +struct stat { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + _off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; + }; +#endif /* __STDC__ */ + +#if _INTEGRAL_MAX_BITS >= 64 + +struct _stati64 { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + __int64 st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; + }; + +struct __stat64 { + _dev_t st_dev; + _ino_t st_ino; + unsigned short st_mode; + short st_nlink; + short st_uid; + short st_gid; + _dev_t st_rdev; + __int64 st_size; + __time64_t st_atime; + __time64_t st_mtime; + __time64_t st_ctime; + }; + +#endif + +#define _STAT_DEFINED +#endif + + +#ifndef _WSTAT_DEFINED + +/* also declared in stat.h */ + +_CRTIMP int __cdecl _wstat(const wchar_t *, struct _stat *); + +#if _INTEGRAL_MAX_BITS >= 64 +_CRTIMP int __cdecl _wstati64(const wchar_t *, struct _stati64 *); +_CRTIMP int __cdecl _wstat64(const wchar_t *, struct __stat64 *); +#endif + +#define _WSTAT_DEFINED +#endif + +#endif /* !_POSIX_ */ + + +#ifndef _WCONIO_DEFINED + +_CRTIMP wchar_t * __cdecl _cgetws(wchar_t *); +_CRTIMP wint_t __cdecl _getwch(void); +_CRTIMP wint_t __cdecl _getwche(void); +_CRTIMP wint_t __cdecl _putwch(wchar_t); +_CRTIMP wint_t __cdecl _ungetwch(wint_t); +_CRTIMP int __cdecl _cputws(const wchar_t *); +_CRTIMP int __cdecl _cwprintf(const wchar_t *, ...); +_CRTIMP int __cdecl _cwscanf(const wchar_t *, ...); + + +#define _WCONIO_DEFINED +#endif + +#ifndef _WSTDIO_DEFINED + +/* also declared in stdio.h */ + +#ifdef _POSIX_ +_CRTIMP FILE * __cdecl _wfsopen(const wchar_t *, const wchar_t *); +#else +_CRTIMP FILE * __cdecl _wfsopen(const wchar_t *, const wchar_t *, int); +#endif + +_CRTIMP wint_t __cdecl fgetwc(FILE *); +_CRTIMP wint_t __cdecl _fgetwchar(void); +_CRTIMP wint_t __cdecl fputwc(wchar_t, FILE *); +_CRTIMP wint_t __cdecl _fputwchar(wchar_t); +_CRTIMP wint_t __cdecl getwc(FILE *); +_CRTIMP wint_t __cdecl getwchar(void); +_CRTIMP wint_t __cdecl putwc(wchar_t, FILE *); +_CRTIMP wint_t __cdecl putwchar(wchar_t); +_CRTIMP wint_t __cdecl ungetwc(wint_t, FILE *); +_CRTIMP wchar_t * __cdecl fgetws(wchar_t *, int, FILE *); +_CRTIMP int __cdecl fputws(const wchar_t *, FILE *); +_CRTIMP wchar_t * __cdecl _getws(wchar_t *); +_CRTIMP int __cdecl _putws(const wchar_t *); +_CRTIMP int __cdecl fwprintf(FILE *, const wchar_t *, ...); +_CRTIMP int __cdecl wprintf(const wchar_t *, ...); +_CRTIMP int __cdecl _snwprintf(wchar_t *, size_t, const wchar_t *, ...); +/* This non-standard definition exists for historical reasons to avoid breaking old code */ +_CRTIMP int __cdecl swprintf(wchar_t *, const wchar_t *, ...); +#ifdef __cplusplus +/* For C++ we have an overloaded version with the standard definition */ +extern "C++" _CRTIMP int __cdecl swprintf(wchar_t *, size_t, const wchar_t *, ...); +#endif +_CRTIMP int __cdecl _scwprintf(const wchar_t *, ...); +_CRTIMP int __cdecl vfwprintf(FILE *, const wchar_t *, va_list); +_CRTIMP int __cdecl vwprintf(const wchar_t *, va_list); +_CRTIMP int __cdecl _vsnwprintf(wchar_t *, size_t, const wchar_t *, va_list); +/* This non-standard definition exists for historical reasons to avoid breaking old code */ +_CRTIMP int __cdecl vswprintf(wchar_t *, const wchar_t *, va_list); +#ifdef __cplusplus +/* For C++ we have an overloaded version with the standard definition */ +extern "C++" _CRTIMP int __cdecl vswprintf(wchar_t *, size_t, const wchar_t *, va_list); +#endif +_CRTIMP int __cdecl _vscwprintf(const wchar_t *, va_list); +_CRTIMP int __cdecl fwscanf(FILE *, const wchar_t *, ...); +_CRTIMP int __cdecl swscanf(const wchar_t *, const wchar_t *, ...); +_CRTIMP int __cdecl _snwscanf(const wchar_t *, size_t, const wchar_t *, ...); +_CRTIMP int __cdecl wscanf(const wchar_t *, ...); + +#ifndef __cplusplus +#define getwchar() fgetwc(stdin) +#define putwchar(_c) fputwc((_c),stdout) +#else /* __cplusplus */ +inline wint_t __cdecl getwchar() + {return (fgetwc(&_iob[0])); } /* stdin */ +inline wint_t __cdecl putwchar(wchar_t _C) + {return (fputwc(_C, &_iob[1])); } /* stdout */ +#endif /* __cplusplus */ + +#define getwc(_stm) fgetwc(_stm) +#define putwc(_c,_stm) fputwc(_c,_stm) + +_CRTIMP FILE * __cdecl _wfdopen(int, const wchar_t *); +_CRTIMP FILE * __cdecl _wfopen(const wchar_t *, const wchar_t *); +_CRTIMP FILE * __cdecl _wfreopen(const wchar_t *, const wchar_t *, FILE *); +_CRTIMP void __cdecl _wperror(const wchar_t *); +_CRTIMP FILE * __cdecl _wpopen(const wchar_t *, const wchar_t *); +_CRTIMP int __cdecl _wremove(const wchar_t *); +_CRTIMP wchar_t * __cdecl _wtempnam(const wchar_t *, const wchar_t *); +_CRTIMP wchar_t * __cdecl _wtmpnam(wchar_t *); + + +#define _WSTDIO_DEFINED +#endif + + +#ifndef _WSTDLIB_DEFINED + +/* also declared in stdlib.h */ + +_CRTIMP wchar_t * __cdecl _itow (int, wchar_t *, int); +_CRTIMP wchar_t * __cdecl _ltow (long, wchar_t *, int); +_CRTIMP wchar_t * __cdecl _ultow (unsigned long, wchar_t *, int); +_CRTIMP double __cdecl wcstod(const wchar_t *, wchar_t **); +_CRTIMP long __cdecl wcstol(const wchar_t *, wchar_t **, int); +_CRTIMP unsigned long __cdecl wcstoul(const wchar_t *, wchar_t **, int); +_CRTIMP wchar_t * __cdecl _wgetenv(const wchar_t *); +_CRTIMP int __cdecl _wsystem(const wchar_t *); +_CRTIMP double __cdecl _wtof(const wchar_t *); +_CRTIMP int __cdecl _wtoi(const wchar_t *); +_CRTIMP long __cdecl _wtol(const wchar_t *); + +#if _INTEGRAL_MAX_BITS >= 64 +_CRTIMP wchar_t * __cdecl _i64tow(__int64, wchar_t *, int); +_CRTIMP wchar_t * __cdecl _ui64tow(unsigned __int64, wchar_t *, int); +_CRTIMP __int64 __cdecl _wtoi64(const wchar_t *); +_CRTIMP __int64 __cdecl _wcstoi64(const wchar_t *, wchar_t **, int); +_CRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *, wchar_t **, int); +#endif + +#define _WSTDLIB_DEFINED +#endif + +#ifndef _POSIX_ + +#ifndef _WSTDLIBP_DEFINED + +/* also declared in stdlib.h */ + +_CRTIMP wchar_t * __cdecl _wfullpath(wchar_t *, const wchar_t *, size_t); +_CRTIMP void __cdecl _wmakepath(wchar_t *, const wchar_t *, const wchar_t *, const wchar_t *, + const wchar_t *); +_CRTIMP void __cdecl _wperror(const wchar_t *); +_CRTIMP int __cdecl _wputenv(const wchar_t *); +_CRTIMP void __cdecl _wsearchenv(const wchar_t *, const wchar_t *, wchar_t *); +_CRTIMP void __cdecl _wsplitpath(const wchar_t *, wchar_t *, wchar_t *, wchar_t *, wchar_t *); + +#define _WSTDLIBP_DEFINED +#endif + +#endif /* _POSIX_ */ + + +#ifndef _WSTRING_DEFINED + +/* also declared in string.h */ + +#ifdef __cplusplus + #define _WConst_return const +#else + #define _WConst_return +#endif + +_CRTIMP wchar_t * __cdecl wcscat(wchar_t *, const wchar_t *); +_CRTIMP _WConst_return wchar_t * __cdecl wcschr(const wchar_t *, wchar_t); +_CRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *); +_CRTIMP wchar_t * __cdecl wcscpy(wchar_t *, const wchar_t *); +_CRTIMP size_t __cdecl wcscspn(const wchar_t *, const wchar_t *); +_CRTIMP size_t __cdecl wcslen(const wchar_t *); +_CRTIMP wchar_t * __cdecl wcsncat(wchar_t *, const wchar_t *, size_t); +_CRTIMP int __cdecl wcsncmp(const wchar_t *, const wchar_t *, size_t); +_CRTIMP wchar_t * __cdecl wcsncpy(wchar_t *, const wchar_t *, size_t); +_CRTIMP _WConst_return wchar_t * __cdecl wcspbrk(const wchar_t *, const wchar_t *); +_CRTIMP _WConst_return wchar_t * __cdecl wcsrchr(const wchar_t *, wchar_t); +_CRTIMP size_t __cdecl wcsspn(const wchar_t *, const wchar_t *); +_CRTIMP _WConst_return wchar_t * __cdecl wcsstr(const wchar_t *, const wchar_t *); +_CRTIMP wchar_t * __cdecl wcstok(wchar_t *, const wchar_t *); +_CRTIMP wchar_t * __cdecl _wcserror(int); +_CRTIMP wchar_t * __cdecl __wcserror(const wchar_t *); +_CRTIMP wchar_t * __cdecl _wcsdup(const wchar_t *); +_CRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *); +_CRTIMP int __cdecl _wcsnicmp(const wchar_t *, const wchar_t *, size_t); +_CRTIMP wchar_t * __cdecl _wcsnset(wchar_t *, wchar_t, size_t); +_CRTIMP wchar_t * __cdecl _wcsrev(wchar_t *); +_CRTIMP wchar_t * __cdecl _wcsset(wchar_t *, wchar_t); +_CRTIMP wchar_t * __cdecl _wcslwr(wchar_t *); +_CRTIMP wchar_t * __cdecl _wcsupr(wchar_t *); +_CRTIMP size_t __cdecl wcsxfrm(wchar_t *, const wchar_t *, size_t); +_CRTIMP int __cdecl wcscoll(const wchar_t *, const wchar_t *); +_CRTIMP int __cdecl _wcsicoll(const wchar_t *, const wchar_t *); +_CRTIMP int __cdecl _wcsncoll(const wchar_t *, const wchar_t *, size_t); +_CRTIMP int __cdecl _wcsnicoll(const wchar_t *, const wchar_t *, size_t); + +#if !__STDC__ + +/* old names */ +#define wcswcs wcsstr + +/* prototypes for oldnames.lib functions */ +_CRTIMP wchar_t * __cdecl wcsdup(const wchar_t *); +_CRTIMP int __cdecl wcsicmp(const wchar_t *, const wchar_t *); +_CRTIMP int __cdecl wcsnicmp(const wchar_t *, const wchar_t *, size_t); +_CRTIMP wchar_t * __cdecl wcsnset(wchar_t *, wchar_t, size_t); +_CRTIMP wchar_t * __cdecl wcsrev(wchar_t *); +_CRTIMP wchar_t * __cdecl wcsset(wchar_t *, wchar_t); +_CRTIMP wchar_t * __cdecl wcslwr(wchar_t *); +_CRTIMP wchar_t * __cdecl wcsupr(wchar_t *); +_CRTIMP int __cdecl wcsicoll(const wchar_t *, const wchar_t *); + +#endif /* !__STDC__ */ + +#ifdef __cplusplus +} /* end of extern "C" */ + +extern "C++" { +inline wchar_t *wcschr(wchar_t *_S, wchar_t _C) + {return ((wchar_t *)wcschr((const wchar_t *)_S, _C)); } +inline wchar_t *wcspbrk(wchar_t *_S, const wchar_t *_P) + {return ((wchar_t *)wcspbrk((const wchar_t *)_S, _P)); } +inline wchar_t *wcsrchr(wchar_t *_S, wchar_t _C) + {return ((wchar_t *)wcsrchr((const wchar_t *)_S, _C)); } +inline wchar_t *wcsstr(wchar_t *_S, const wchar_t *_P) + {return ((wchar_t *)wcsstr((const wchar_t *)_S, _P)); } +} + +extern "C" { +#endif /* __cplusplus */ + +#define _WSTRING_DEFINED +#endif + +#ifndef _TM_DEFINED +struct tm { + int tm_sec; /* seconds after the minute - [0,59] */ + int tm_min; /* minutes after the hour - [0,59] */ + int tm_hour; /* hours since midnight - [0,23] */ + int tm_mday; /* day of the month - [1,31] */ + int tm_mon; /* months since January - [0,11] */ + int tm_year; /* years since 1900 */ + int tm_wday; /* days since Sunday - [0,6] */ + int tm_yday; /* days since January 1 - [0,365] */ + int tm_isdst; /* daylight savings time flag */ + }; +#define _TM_DEFINED +#endif + +#ifndef _WTIME_DEFINED + +/* also declared in time.h */ + +_CRTIMP wchar_t * __cdecl _wasctime(const struct tm *); +_CRTIMP wchar_t * __cdecl _wctime(const time_t *); +_CRTIMP size_t __cdecl wcsftime(wchar_t *, size_t, const wchar_t *, + const struct tm *); +_CRTIMP wchar_t * __cdecl _wstrdate(wchar_t *); +_CRTIMP wchar_t * __cdecl _wstrtime(wchar_t *); + +#if _INTEGRAL_MAX_BITS >= 64 +_CRTIMP wchar_t * __cdecl _wctime64(const __time64_t *); +#endif + +#define _WTIME_DEFINED +#endif + + + +typedef int mbstate_t; +typedef wchar_t _Wint_t; + +_CRTIMP2 wint_t __cdecl btowc(int); +_CRTIMP2 size_t __cdecl mbrlen(const char *, size_t, mbstate_t *); +_CRTIMP2 size_t __cdecl mbrtowc(wchar_t *, const char *, size_t, mbstate_t *); +_CRTIMP2 size_t __cdecl mbsrtowcs(wchar_t *, const char **, size_t, mbstate_t *); + +_CRTIMP2 size_t __cdecl wcrtomb(char *, wchar_t, mbstate_t *); +_CRTIMP2 size_t __cdecl wcsrtombs(char *, const wchar_t **, size_t, mbstate_t *); +_CRTIMP2 int __cdecl wctob(wint_t); + +#ifdef __cplusplus + +/* memcpy and memmove are defined just for use in wmemcpy and wmemmove */ +#if defined(_M_IA64) || defined(_M_ALPHA) +void * __cdecl memmove(void *, const void *, size_t); +#else +_CRTIMP void * __cdecl memmove(void *, const void *, size_t); +#endif +void * __cdecl memcpy(void *, const void *, size_t); + +inline int fwide(FILE *, int _M) + {return (_M); } +inline int mbsinit(const mbstate_t *_P) + {return (_P == NULL || *_P == 0); } +inline const wchar_t *wmemchr(const wchar_t *_S, wchar_t _C, size_t _N) + {for (; 0 < _N; ++_S, --_N) + if (*_S == _C) + return (_S); + return (0); } +inline int wmemcmp(const wchar_t *_S1, const wchar_t *_S2, size_t _N) + {for (; 0 < _N; ++_S1, ++_S2, --_N) + if (*_S1 != *_S2) + return (*_S1 < *_S2 ? -1 : +1); + return (0); } +inline wchar_t *wmemcpy(wchar_t *_S1, const wchar_t *_S2, size_t _N) + { + return (wchar_t *)memcpy(_S1, _S2, _N*sizeof(wchar_t)); + } +inline wchar_t *wmemmove(wchar_t *_S1, const wchar_t *_S2, size_t _N) + { + return (wchar_t *)memmove(_S1, _S2, _N*sizeof(wchar_t)); + } +inline wchar_t *wmemset(wchar_t *_S, wchar_t _C, size_t _N) + {wchar_t *_Su = _S; + for (; 0 < _N; ++_Su, --_N) + *_Su = _C; + return (_S); } +} /* end of extern "C" */ + +extern "C++" { +inline wchar_t *wmemchr(wchar_t *_S, wchar_t _C, size_t _N) + {return ((wchar_t *)wmemchr((const wchar_t *)_S, _C, _N)); } +} + +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_WCHAR */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/wctype.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/wctype.h new file mode 100644 index 00000000..93d8f888 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/wctype.h @@ -0,0 +1,199 @@ +/*** +*wctype.h - declarations for wide character functions +* +* Copyright (c) Microsoft Corporation. All rights reserved. +* Created from wchar.h January 1996 by P.J. Plauger +* +*Purpose: +* This file contains the types, macros and function declarations for +* all ctype-style wide-character functions. They may also be declared in +* wchar.h. +* [ISO] +* +* Note: keep in sync with ctype.h and wchar.h. +* +* [Public] +* +****/ + + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifndef _INC_WCTYPE +#define _INC_WCTYPE + +#if !defined(_WIN32) +#error ERROR: Only Win32 target supported! +#endif + + +#ifdef _MSC_VER +#pragma pack(push,8) +#endif /* _MSC_VER */ + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Define _CRTIMP */ + +#ifndef _CRTIMP +#ifdef _DLL +#define _CRTIMP __declspec(dllimport) +#else /* ndef _DLL */ +#define _CRTIMP +#endif /* _DLL */ +#endif /* _CRTIMP */ + +/* Define _CRTIMP2 */ +#ifndef _CRTIMP2 +#if defined(_DLL) && !defined(_STATIC_CPPLIB) +#define _CRTIMP2 __declspec(dllimport) +#else /* ndef _DLL && !STATIC_CPPLIB */ +#define _CRTIMP2 +#endif /* _DLL && !STATIC_CPPLIB */ +#endif /* _CRTIMP2 */ + +/* Define __cdecl for non-Microsoft compilers */ + +#if ( !defined(_MSC_VER) && !defined(__cdecl) ) +#define __cdecl +#endif + +#ifndef _WCHAR_T_DEFINED +typedef unsigned short wchar_t; +#define _WCHAR_T_DEFINED +#endif + +#ifndef _WCTYPE_T_DEFINED +typedef unsigned short wint_t; +typedef unsigned short wctype_t; +#define _WCTYPE_T_DEFINED +#endif + + +#ifndef WEOF +#define WEOF (wint_t)(0xFFFF) +#endif + +/* + * This declaration allows the user access to the ctype look-up + * array _ctype defined in ctype.obj by simply including ctype.h + */ + +_CRTIMP extern const unsigned short _wctype[]; + +#if defined(_DLL) && defined(_M_IX86) +/* Retained for compatibility with VC++ 5.0 and earlier versions */ +_CRTIMP const unsigned short ** __cdecl __p__pctype(void); +_CRTIMP const wctype_t ** __cdecl ___p__pwctype(void); +#endif +_CRTIMP extern const unsigned short *_pctype; +_CRTIMP extern const wctype_t *_pwctype; + + +/* set bit masks for the possible character types */ + +#define _UPPER 0x1 /* upper case letter */ +#define _LOWER 0x2 /* lower case letter */ +#define _DIGIT 0x4 /* digit[0-9] */ +#define _SPACE 0x8 /* tab, carriage return, newline, */ + /* vertical tab or form feed */ +#define _PUNCT 0x10 /* punctuation character */ +#define _CONTROL 0x20 /* control character */ +#define _BLANK 0x40 /* space char */ +#define _HEX 0x80 /* hexadecimal digit */ + +#define _LEADBYTE 0x8000 /* multibyte leadbyte */ +#define _ALPHA (0x0100|_UPPER|_LOWER) /* alphabetic character */ + + +/* Function prototypes */ + +#ifndef _WCTYPE_DEFINED + +/* Character classification function prototypes */ +/* also declared in ctype.h */ + +_CRTIMP int __cdecl iswalpha(wint_t); +_CRTIMP int __cdecl iswupper(wint_t); +_CRTIMP int __cdecl iswlower(wint_t); +_CRTIMP int __cdecl iswdigit(wint_t); +_CRTIMP int __cdecl iswxdigit(wint_t); +_CRTIMP int __cdecl iswspace(wint_t); +_CRTIMP int __cdecl iswpunct(wint_t); +_CRTIMP int __cdecl iswalnum(wint_t); +_CRTIMP int __cdecl iswprint(wint_t); +_CRTIMP int __cdecl iswgraph(wint_t); +_CRTIMP int __cdecl iswcntrl(wint_t); +_CRTIMP int __cdecl iswascii(wint_t); +_CRTIMP int __cdecl isleadbyte(int); + +_CRTIMP wchar_t __cdecl towupper(wchar_t); +_CRTIMP wchar_t __cdecl towlower(wchar_t); + +_CRTIMP int __cdecl iswctype(wint_t, wctype_t); + +/* --------- The following functions are OBSOLETE --------- */ +_CRTIMP int __cdecl is_wctype(wint_t, wctype_t); +/* --------- The preceding functions are OBSOLETE --------- */ + +#define _WCTYPE_DEFINED +#endif + +#ifndef _WCTYPE_INLINE_DEFINED +#ifndef __cplusplus +#define iswalpha(_c) ( iswctype(_c,_ALPHA) ) +#define iswupper(_c) ( iswctype(_c,_UPPER) ) +#define iswlower(_c) ( iswctype(_c,_LOWER) ) +#define iswdigit(_c) ( iswctype(_c,_DIGIT) ) +#define iswxdigit(_c) ( iswctype(_c,_HEX) ) +#define iswspace(_c) ( iswctype(_c,_SPACE) ) +#define iswpunct(_c) ( iswctype(_c,_PUNCT) ) +#define iswalnum(_c) ( iswctype(_c,_ALPHA|_DIGIT) ) +#define iswprint(_c) ( iswctype(_c,_BLANK|_PUNCT|_ALPHA|_DIGIT) ) +#define iswgraph(_c) ( iswctype(_c,_PUNCT|_ALPHA|_DIGIT) ) +#define iswcntrl(_c) ( iswctype(_c,_CONTROL) ) +#define iswascii(_c) ( (unsigned)(_c) < 0x80 ) + +#define isleadbyte(_c) (_pctype[(unsigned char)(_c)] & _LEADBYTE) +#else /* __cplusplus */ +inline int __cdecl iswalpha(wint_t _C) {return (iswctype(_C,_ALPHA)); } +inline int __cdecl iswupper(wint_t _C) {return (iswctype(_C,_UPPER)); } +inline int __cdecl iswlower(wint_t _C) {return (iswctype(_C,_LOWER)); } +inline int __cdecl iswdigit(wint_t _C) {return (iswctype(_C,_DIGIT)); } +inline int __cdecl iswxdigit(wint_t _C) {return (iswctype(_C,_HEX)); } +inline int __cdecl iswspace(wint_t _C) {return (iswctype(_C,_SPACE)); } +inline int __cdecl iswpunct(wint_t _C) {return (iswctype(_C,_PUNCT)); } +inline int __cdecl iswalnum(wint_t _C) {return (iswctype(_C,_ALPHA|_DIGIT)); } +inline int __cdecl iswprint(wint_t _C) + {return (iswctype(_C,_BLANK|_PUNCT|_ALPHA|_DIGIT)); } +inline int __cdecl iswgraph(wint_t _C) + {return (iswctype(_C,_PUNCT|_ALPHA|_DIGIT)); } +inline int __cdecl iswcntrl(wint_t _C) {return (iswctype(_C,_CONTROL)); } +inline int __cdecl iswascii(wint_t _C) {return ((unsigned)(_C) < 0x80); } + +inline int __cdecl isleadbyte(int _C) + {return (_pctype[(unsigned char)(_C)] & _LEADBYTE); } +#endif /* __cplusplus */ +#define _WCTYPE_INLINE_DEFINED +#endif /* _WCTYPE_INLINE_DEFINED */ + +typedef wchar_t wctrans_t; +_CRTIMP2 wint_t __cdecl towctrans(wint_t, wctrans_t); +_CRTIMP2 wctrans_t __cdecl wctrans(const char *); +_CRTIMP2 wctype_t __cdecl wctype(const char *); + + +#ifdef __cplusplus +} +#endif + +#ifdef _MSC_VER +#pragma pack(pop) +#endif /* _MSC_VER */ + +#endif /* _INC_WCTYPE */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xcomplex b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xcomplex new file mode 100644 index 00000000..94c5c2eb --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xcomplex @@ -0,0 +1,744 @@ +// xcomplex internal header +#pragma once +#ifndef _XCOMPLEX_ +#define _XCOMPLEX_ + + // TEMPLATE FUNCTION imag +_TMPLT(_Ty) inline + _Ty __cdecl imag(const _CMPLX(_Ty)& _Left) + { // return imaginary component + return (_Left.imag()); + } + + // TEMPLATE FUNCTION real +_TMPLT(_Ty) inline + _Ty __cdecl real(const _CMPLX(_Ty)& _Left) + { // return real component + return (_Left.real()); + } + + // TEMPLATE FUNCTION _Fabs +_TMPLT(_Ty) inline + _Ty __cdecl _Fabs(const _CMPLX(_Ty)& _Left, int *_Pexp) + { // return magnitude and scale factor + *_Pexp = 0; + _Ty _Av = real(_Left); + _Ty _Bv = imag(_Left); + + if (_CTR(_Ty)::_Isinf(_Av) || _CTR(_Ty)::_Isinf(_Bv)) + return (_CTR(_Ty)::_Infv(_Bv)); // at least one component is INF + else if (_CTR(_Ty)::_Isnan(_Av)) + return (_Av); // real component is NaN + else if (_CTR(_Ty)::_Isnan(_Bv)) + return (_Bv); // imaginary component is NaN + else + { // neither component is NaN or INF + if (_Av < 0) + _Av = -_Av; + if (_Bv < 0) + _Bv = -_Bv; + if (_Av < _Bv) + { // ensure that |_Bv| <= |_Av| + _Ty _Tmp = _Av; + _Av = _Bv; + _Bv = _Tmp; + } + + if (_Av == 0) + return (_Av); // |0| == 0 + if (1 <= _Av) + *_Pexp = 2, _Av = _Av * (_Ty)0.25, _Bv = _Bv * (_Ty)0.25; + else + *_Pexp = -2, _Av = _Av * 4, _Bv = _Bv * 4; + + _Ty _Tmp = _Av - _Bv; + if (_Tmp == _Av) + return (_Av); // _Bv unimportant + else if (_Bv < _Tmp) + { // use simple approximation + const _Ty _Qv = _Av / _Bv; + return (_Av + _Bv / (_Qv + _CTR(_Ty)::sqrt(_Qv * _Qv + 1))); + } + else + { // use 1 1/2 precision to preserve bits + static const _Ty _Root2 = + (_Ty)1.4142135623730950488016887242096981L; + static const _Ty _Oneplusroot2high = + (_Ty)(10125945.0 / 4194304.0); // exact if prec >= 24 bits + static const _Ty _Oneplusroot2low = + (_Ty)1.4341252375973918872420969807856967e-7L; + + const _Ty _Qv = _Tmp / _Bv; + const _Ty _Rv = (_Qv + 2) * _Qv; + const _Ty _Sv = _Rv / (_Root2 + _CTR(_Ty)::sqrt(_Rv + 2)) + + _Oneplusroot2low + _Qv + _Oneplusroot2high; + return (_Av + _Bv / _Sv); + } + } + } + + // TEMPLATE FUNCTION operator+ +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl operator+(const _CMPLX(_Ty)& _Left, + const _CMPLX(_Ty)& _Right) + { // add complex to complex + _CMPLX(_Ty) _Tmp(_Left); + return (_Tmp += _Right); + } + +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl operator+(const _CMPLX(_Ty)& _Left, + const _Ty& _Right) + { // add real to complex + _CMPLX(_Ty) _Tmp(_Left); + _Tmp.real(_Tmp.real() + _Right); + return (_Tmp); + } + +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl operator+(const _Ty& _Left, + const _CMPLX(_Ty)& _Right) + { // add complex to real + _CMPLX(_Ty) _Tmp(_Left); + return (_Tmp += _Right); + } + + // TEMPLATE FUNCTION operator- +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl operator-(const _CMPLX(_Ty)& _Left, + const _CMPLX(_Ty)& _Right) + { // subtract complex from complex + _CMPLX(_Ty) _Tmp(_Left); + return (_Tmp -= _Right); + } + +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl operator-(const _CMPLX(_Ty)& _Left, + const _Ty& _Right) + { // subtract real from complex + _CMPLX(_Ty) _Tmp(_Left); + _Tmp.real(_Tmp.real() - _Right); + return (_Tmp); + } + +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl operator-(const _Ty& _Left, + const _CMPLX(_Ty)& _Right) + { // subtract complex from real + _CMPLX(_Ty) _Tmp(_Left); + return (_Tmp -= _Right); + } + + // TEMPLATE FUNCTION operator* +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl operator*(const _CMPLX(_Ty)& _Left, + const _CMPLX(_Ty)& _Right) + { // multiply complex by complex + _CMPLX(_Ty) _Tmp(_Left); + return (_Tmp *= _Right); + } + +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl operator*(const _CMPLX(_Ty)& _Left, + const _Ty& _Right) + { // multiply complex by real + _CMPLX(_Ty) _Tmp(_Left); + _Tmp.real(_Tmp.real() * _Right); + _Tmp.imag(_Tmp.imag() * _Right); + return (_Tmp); + } + +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl operator*(const _Ty& _Left, + const _CMPLX(_Ty)& _Right) + { // multiply real by complex + _CMPLX(_Ty) _Tmp(_Left); + return (_Tmp *= _Right); + } + + // TEMPLATE FUNCTION operator/ +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl operator/(const _CMPLX(_Ty)& _Left, + const _CMPLX(_Ty)& _Right) + { // divide complex by complex + _CMPLX(_Ty) _Tmp(_Left); + return (_Tmp /= _Right); + } + +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl operator/(const _CMPLX(_Ty)& _Left, + const _Ty& _Right) + { // divide complex by real + _CMPLX(_Ty) _Tmp(_Left); + _Tmp.real(_Tmp.real() / _Right); + _Tmp.imag(_Tmp.imag() / _Right); + return (_Tmp); + } + +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl operator/(const _Ty& _Left, + const _CMPLX(_Ty)& _Right) + { // divide real by complex + _CMPLX(_Ty) _Tmp(_Left); + return (_Tmp /= _Right); + } + + // TEMPLATE FUNCTION UNARY operator+ +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl operator+(const _CMPLX(_Ty)& _Left) + { // return +complex + return (_CMPLX(_Ty)(_Left)); + } + + // TEMPLATE FUNCTION UNARY operator- +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl operator-(const _CMPLX(_Ty)& _Left) + { // return -complex + return (_CMPLX(_Ty)(-real(_Left), -imag(_Left))); + } + + // TEMPLATE FUNCTION operator== +_TMPLT(_Ty) inline + bool __cdecl operator==(const _CMPLX(_Ty)& _Left, + const _CMPLX(_Ty)& _Right) + { // test complex equal to complex + return (real(_Left) == real(_Right) && imag(_Left) == imag(_Right)); + } + +_TMPLT(_Ty) inline + bool __cdecl operator==(const _CMPLX(_Ty)& _Left, + const _Ty& _Right) + { // test real equal to complex + return (real(_Left) == _Right && imag(_Left) == 0); + } + +_TMPLT(_Ty) inline + bool __cdecl operator==(const _Ty& _Left, + const _CMPLX(_Ty)& _Right) + { // test complex equal to real + return (_Left == real(_Right) && 0 == imag(_Right)); + } + + // TEMPLATE FUNCTION operator!= +_TMPLT(_Ty) inline + bool __cdecl operator!=(const _CMPLX(_Ty)& _Left, + const _CMPLX(_Ty)& _Right) + { // test complex not equal to complex + return (!(_Left == _Right)); + } + +_TMPLT(_Ty) inline + bool __cdecl operator!=(const _CMPLX(_Ty)& _Left, + const _Ty& _Right) + { // test real not equal to complex + return (!(_Left == _Right)); + } + +_TMPLT(_Ty) inline + bool __cdecl operator!=(const _Ty& _Left, + const _CMPLX(_Ty)& _Right) + { // test complex not equal to real + return (!(_Left == _Right)); + } + + // TEMPLATE FUNCTION abs +_TMPLT(_Ty) inline + _Ty __cdecl abs(const _CMPLX(_Ty)& _Left) + { // return |complex| as real + int _Leftexp; + _Ty _Rho = _Fabs(_Left, &_Leftexp); // get magnitude and scale factor + + if (_Leftexp == 0) + return (_Rho); // no scale factor + else + return (_CTR(_Ty)::ldexp(_Rho, _Leftexp)); // scale result + } + + // TEMPLATE FUNCTION arg +_TMPLT(_Ty) inline + _Ty __cdecl arg(const _CMPLX(_Ty)& _Left) + { // return phase angle of complex as real + return (_CTR(_Ty)::atan2(imag(_Left), real(_Left))); + } + + // TEMPLATE FUNCTION conj +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl conj(const _CMPLX(_Ty)& _Left) + { // return complex conjugate + return (_CMPLX(_Ty)(real(_Left), -imag(_Left))); + } + + // TEMPLATE FUNCTION cos +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl cos(const _CMPLX(_Ty)& _Left) + { // return cos(complex) + return (_CMPLX(_Ty)( + _CTR(_Ty)::_Cosh(imag(_Left), _CTR(_Ty)::cos(real(_Left))), + -_CTR(_Ty)::_Sinh(imag(_Left), + _CTR(_Ty)::sin(real(_Left))))); + } + + // TEMPLATE FUNCTION cosh +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl cosh(const _CMPLX(_Ty)& _Left) + { // return cosh(complex) + return (_CMPLX(_Ty)( + _CTR(_Ty)::_Cosh(real(_Left), _CTR(_Ty)::cos(imag(_Left))), + _CTR(_Ty)::_Sinh(real(_Left), _CTR(_Ty)::sin(imag(_Left))))); + } + + // TEMPLATE FUNCTION exp +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl exp(const _CMPLX(_Ty)& _Left) + { // return exp(complex) + _Ty _Real(real(_Left)), _Imag(real(_Left)); + _CTR(_Ty)::_Exp(&_Real, _CTR(_Ty)::cos(imag(_Left)), 0); + _CTR(_Ty)::_Exp(&_Imag, _CTR(_Ty)::sin(imag(_Left)), 0); + return (_CMPLX(_Ty)(_Real, _Imag)); + } + + // TEMPLATE FUNCTION log +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl log(const _CMPLX(_Ty)& _Left) + { // return log(complex) + _Ty _Theta = _CTR(_Ty)::atan2(imag(_Left), real(_Left)); // get phase + + if (_CTR(_Ty)::_Isnan(_Theta)) + return (_CMPLX(_Ty)(_Theta, _Theta)); // real or imag is NaN + else + { // use 1 1/2 precision to preserve bits + static const _Ty _Cm = (_Ty)(22713.0L / 32768.0L); + static const _Ty _Cl = + (_Ty)1.4286068203094172321214581765680755e-6L; + int _Leftexp; + _Ty _Rho = _Fabs(_Left, &_Leftexp); // get magnitude and scale factor + + _Ty _Leftn = (_Ty)_Leftexp; + _CMPLX(_Ty) _Tmp( + _Rho == 0 ? -_CTR(_Ty)::_Infv(_Rho) // log(0) == -INF + : _CTR(_Ty)::_Isinf(_Rho) ? _Rho // log(INF) == INF + : _CTR(_Ty)::log(_Rho) + _Leftn * _Cl + _Leftn * _Cm, + _Theta); + return (_Tmp); + } + } + + // TEMPLATE FUNCTION log10 +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl log10(const _CMPLX(_Ty)& _Left) + { // return log10(complex) + return (log(_Left) * (_Ty)0.43429448190325182765112891891660508L); + } + + // TEMPLATE FUNCTION norm +_TMPLT(_Ty) inline + _Ty __cdecl norm(const _CMPLX(_Ty)& _Left) + { // return squared magnitude + return (real(_Left) * real(_Left) + imag(_Left) * imag(_Left)); + } + + // TEMPLATE FUNCTION polar +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl polar(const _Ty& _Rho, const _Ty& _Theta) + { // return _Rho * exp(i * _Theta) as complex + return (_CMPLX(_Ty)(_Rho * _CTR(_Ty)::cos(_Theta), + _Rho * _CTR(_Ty)::sin(_Theta))); + } + +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl polar(const _Ty& _Rho) + { // return _Rho * exp(i * 0) as complex + return (_CMPLX(_Ty)(_Rho, (_Ty)0)); + } + + // TEMPLATE FUNCTION pow +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl pow(const _CMPLX(_Ty)& _Left, const _Ty& _Right) + { // return complex ^ real + if (imag(_Left) == 0 && 0 < real(_Left)) + return (_CMPLX(_Ty)(_CTR(_Ty)::pow(real(_Left), _Right))); + else + return (exp(_Right * log(_Left))); + } + +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl pow(const _CMPLX(_Ty)& _Left, int _Right) + { // return complex ^ integer + _CMPLX(_Ty) _Tmp = _Left; + unsigned int _Count = _Right; + + if (_Right < 0) + _Count = 0 - _Count; // safe negation as unsigned + + for (_CMPLX(_Ty) _Zv = _CMPLX(_Ty)(1); ; _Tmp *= _Tmp) + { // fold in _Left ^ (2 ^ _Count) as needed + if ((_Count & 1) != 0) + _Zv *= _Tmp; + if ((_Count >>= 1) == 0) + return (_Right < 0 ? _CMPLX(_Ty)(1) / _Zv : _Zv); + } + } + +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl pow(const _Ty& _Left, const _CMPLX(_Ty)& _Right) + { // return real ^ complex + if (imag(_Right) == 0) + return (_CMPLX(_Ty)(_CTR(_Ty)::pow(_Left, real(_Right)))); + else if (0 < _Left) + return (exp(_Right * _CTR(_Ty)::log(_Left))); + else + return (exp(_Right * log(_CMPLX(_Ty)(_Left)))); + } + +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl pow(const _CMPLX(_Ty)& _Left, + const _CMPLX(_Ty)& _Right) + { // return complex ^ complex + if (imag(_Right) == 0) + return (pow(_Left, real(_Right))); + else if (imag(_Left) == 0) + return (_CMPLX(_Ty)(pow(real(_Left), _Right))); + else + return (exp(_Right * log(_Left))); + } + + // TEMPLATE FUNCTION sin +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl sin(const _CMPLX(_Ty)& _Left) + { // return sin(complex) + return (_CMPLX(_Ty)( + _CTR(_Ty)::_Cosh(imag(_Left), _CTR(_Ty)::sin(real(_Left))), + _CTR(_Ty)::_Sinh(imag(_Left), _CTR(_Ty)::cos(real(_Left))))); + } + + // TEMPLATE FUNCTION sinh +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl sinh(const _CMPLX(_Ty)& _Left) + { // return sinh(complex) + return (_CMPLX(_Ty)( + _CTR(_Ty)::_Sinh(real(_Left), _CTR(_Ty)::cos(imag(_Left))), + _CTR(_Ty)::_Cosh(real(_Left), _CTR(_Ty)::sin(imag(_Left))))); + } + + // TEMPLATE FUNCTION sqrt +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl sqrt(const _CMPLX(_Ty)& _Left) + { // return sqrt(complex) + int _Leftexp; + _Ty _Rho = _Fabs(_Left, &_Leftexp); // get magnitude and scale factor + + if (_Leftexp == 0) + return (_CMPLX(_Ty)(_Rho, _Rho)); // argument is zero, INF, or NaN + else + { // compute in safest quadrant + _Ty _Realmag = _CTR(_Ty)::ldexp(real(_Left) < 0 + ? - real(_Left) : real(_Left), -_Leftexp); + _Rho = _CTR(_Ty)::ldexp(_CTR(_Ty)::sqrt( + 2 * (_Realmag + _Rho)), _Leftexp / 2 - 1); + + if (0 <= real(_Left)) + return (_CMPLX(_Ty)(_Rho, imag(_Left) / (2 * _Rho))); + else if (imag(_Left) < 0) + return (_CMPLX(_Ty)(-imag(_Left) / (2 * _Rho), -_Rho)); + else + return (_CMPLX(_Ty)(imag(_Left) / (2 * _Rho), _Rho)); + } + } + + // TEMPLATE FUNCTION tanh +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl tanh(const _CMPLX(_Ty)& _Left) + { // return tanh(complex) + _Ty _Tv = _CTR(_Ty)::tan(imag(_Left)); + _Ty _Sv = _CTR(_Ty)::_Sinh(real(_Left), (_Ty)(1)); + _Ty _Bv = _Sv *((_Ty)(1) + _Tv * _Tv); + _Ty _Dv = (_Ty)(1) + _Bv * _Sv; + return (_CMPLX(_Ty)((_CTR(_Ty)::sqrt((_Ty)(1) + _Sv * _Sv)) + * _Bv / _Dv, _Tv / _Dv)); + } + + // TEMPLATE FUNCTION tan +_TMPLT(_Ty) inline + _CMPLX(_Ty) __cdecl tan(const _CMPLX(_Ty)& _Left) + { // return tan(complex) + _CMPLX(_Ty) _Zv(tanh(_CMPLX(_Ty)(-imag(_Left), real(_Left)))); + return (_CMPLX(_Ty)(imag(_Zv), -real(_Zv))); + } + + #ifdef _DLL_CPPLIB +template _CRTIMP2 float + __cdecl imag(const complex&); +template _CRTIMP2 float + __cdecl real(const complex&); +template _CRTIMP2 float + __cdecl _Fabs(const complex&, int *); +template _CRTIMP2 complex + __cdecl operator+(const complex&, const complex&); +template _CRTIMP2 complex + __cdecl operator+(const complex&, const float&); +template _CRTIMP2 complex + __cdecl operator+(const float&, const complex&); +template _CRTIMP2 complex + __cdecl operator-(const complex&, const complex&); +template _CRTIMP2 complex + __cdecl operator-(const complex&, const float&); +template _CRTIMP2 complex + __cdecl operator-(const float&, const complex&); +template _CRTIMP2 complex + __cdecl operator*(const complex&, const complex&); +template _CRTIMP2 complex + __cdecl operator*(const complex&, const float&); +template _CRTIMP2 complex + __cdecl operator*(const float&, const complex&); +template _CRTIMP2 complex + __cdecl operator/(const complex&, const complex&); +template _CRTIMP2 complex + __cdecl operator/(const complex&, const float&); +template _CRTIMP2 complex + __cdecl operator/(const float&, const complex&); +template _CRTIMP2 complex + __cdecl operator+(const complex&); +template _CRTIMP2 complex + __cdecl operator-(const complex&); +template _CRTIMP2 bool + __cdecl operator==(const complex&, const complex&); +template _CRTIMP2 bool + __cdecl operator==(const complex&, const float&); +template _CRTIMP2 bool + __cdecl operator==(const float&, const complex&); +template _CRTIMP2 bool + __cdecl operator!=(const complex&, const complex&); +template _CRTIMP2 bool + __cdecl operator!=(const complex&, const float&); +template _CRTIMP2 bool + __cdecl operator!=(const float&, const complex&); +template _CRTIMP2 float + __cdecl abs(const complex&); +template _CRTIMP2 float + __cdecl arg(const complex&); +template _CRTIMP2 complex + __cdecl conj(const complex&); +template _CRTIMP2 complex + __cdecl cos(const complex&); +template _CRTIMP2 complex + __cdecl cosh(const complex&); +template _CRTIMP2 complex + __cdecl exp(const complex&); +template _CRTIMP2 complex + __cdecl log(const complex&); +template _CRTIMP2 complex + __cdecl log10(const complex&); +template _CRTIMP2 float + __cdecl norm(const complex&); +template _CRTIMP2 complex + __cdecl polar(const float&, const float&); +template _CRTIMP2 complex + __cdecl polar(const float&); +template _CRTIMP2 complex + __cdecl pow(const complex&, const float&); +template _CRTIMP2 complex + __cdecl pow(const complex&, int); +template _CRTIMP2 complex + __cdecl pow(const float&, const complex&); +template _CRTIMP2 complex + __cdecl pow(const complex&, const complex&); +template _CRTIMP2 complex + __cdecl sin(const complex&); +template _CRTIMP2 complex + __cdecl sinh(const complex&); +template _CRTIMP2 complex + __cdecl sqrt(const complex&); +template _CRTIMP2 complex + __cdecl tanh(const complex&); +template _CRTIMP2 complex + __cdecl tan(const complex&); + +template _CRTIMP2 double + __cdecl imag(const complex&); +template _CRTIMP2 double + __cdecl real(const complex&); +template _CRTIMP2 double + __cdecl _Fabs(const complex&, int *); +template _CRTIMP2 complex + __cdecl operator+(const complex&, const complex&); +template _CRTIMP2 complex + __cdecl operator+(const complex&, const double&); +template _CRTIMP2 complex + __cdecl operator+(const double&, const complex&); +template _CRTIMP2 complex + __cdecl operator-(const complex&, const complex&); +template _CRTIMP2 complex + __cdecl operator-(const complex&, const double&); +template _CRTIMP2 complex + __cdecl operator-(const double&, const complex&); +template _CRTIMP2 complex + __cdecl operator*(const complex&, const complex&); +template _CRTIMP2 complex + __cdecl operator*(const complex&, const double&); +template _CRTIMP2 complex + __cdecl operator*(const double&, const complex&); +template _CRTIMP2 complex + __cdecl operator/(const complex&, const complex&); +template _CRTIMP2 complex + __cdecl operator/(const complex&, const double&); +template _CRTIMP2 complex + __cdecl operator/(const double&, const complex&); +template _CRTIMP2 complex + __cdecl operator+(const complex&); +template _CRTIMP2 complex + __cdecl operator-(const complex&); +template _CRTIMP2 bool + __cdecl operator==(const complex&, const complex&); +template _CRTIMP2 bool + __cdecl operator==(const complex&, const double&); +template _CRTIMP2 bool + __cdecl operator==(const double&, const complex&); +template _CRTIMP2 bool + __cdecl operator!=(const complex&, const complex&); +template _CRTIMP2 bool + __cdecl operator!=(const complex&, const double&); +template _CRTIMP2 bool + __cdecl operator!=(const double&, const complex&); +template _CRTIMP2 double + __cdecl abs(const complex&); +template _CRTIMP2 double + __cdecl arg(const complex&); +template _CRTIMP2 complex + __cdecl conj(const complex&); +template _CRTIMP2 complex + __cdecl cos(const complex&); +template _CRTIMP2 complex + __cdecl cosh(const complex&); +template _CRTIMP2 complex + __cdecl exp(const complex&); +template _CRTIMP2 complex + __cdecl log(const complex&); +template _CRTIMP2 complex + __cdecl log10(const complex&); +template _CRTIMP2 double + __cdecl norm(const complex&); +template _CRTIMP2 complex + __cdecl polar(const double&, const double&); +template _CRTIMP2 complex + __cdecl polar(const double&); +template _CRTIMP2 complex + __cdecl pow(const complex&, const double&); +template _CRTIMP2 complex + __cdecl pow(const complex&, int); +template _CRTIMP2 complex + __cdecl pow(const double&, const complex&); +template _CRTIMP2 complex + __cdecl pow(const complex&, const complex&); +template _CRTIMP2 complex + __cdecl sin(const complex&); +template _CRTIMP2 complex + __cdecl sinh(const complex&); +template _CRTIMP2 complex + __cdecl sqrt(const complex&); +template _CRTIMP2 complex + __cdecl tanh(const complex&); +template _CRTIMP2 complex + __cdecl tan(const complex&); + +template _CRTIMP2 long double + __cdecl imag(const complex&); +template _CRTIMP2 long double + __cdecl real(const complex&); +template _CRTIMP2 long double + __cdecl _Fabs(const complex&, int *); +template _CRTIMP2 complex + __cdecl operator+(const complex&, + const complex&); +template _CRTIMP2 complex + __cdecl operator+(const complex&, const long double&); +template _CRTIMP2 complex + __cdecl operator+(const long double&, const complex&); +template _CRTIMP2 complex + __cdecl operator-(const complex&, + const complex&); +template _CRTIMP2 complex + __cdecl operator-(const complex&, const long double&); +template _CRTIMP2 complex + __cdecl operator-(const long double&, const complex&); +template _CRTIMP2 complex + __cdecl operator*(const complex&, + const complex&); +template _CRTIMP2 complex + __cdecl operator*(const complex&, const long double&); +template _CRTIMP2 complex + __cdecl operator*(const long double&, const complex&); +template _CRTIMP2 complex + __cdecl operator/(const complex&, + const complex&); +template _CRTIMP2 complex + __cdecl operator/(const complex&, const long double&); +template _CRTIMP2 complex + __cdecl operator/(const long double&, const complex&); +template _CRTIMP2 complex + __cdecl operator+(const complex&); +template _CRTIMP2 complex + __cdecl operator-(const complex&); +template _CRTIMP2 bool + __cdecl operator==(const complex&, + const complex&); +template _CRTIMP2 bool + __cdecl operator==(const complex&, const long double&); +template _CRTIMP2 bool + __cdecl operator==(const long double&, const complex&); +template _CRTIMP2 bool + __cdecl operator!=(const complex&, + const complex&); +template _CRTIMP2 bool + __cdecl operator!=(const complex&, const long double&); +template _CRTIMP2 bool + __cdecl operator!=(const long double&, const complex&); +template _CRTIMP2 long double + __cdecl abs(const complex&); +template _CRTIMP2 long double + __cdecl arg(const complex&); +template _CRTIMP2 complex + __cdecl conj(const complex&); +template _CRTIMP2 complex + __cdecl cos(const complex&); +template _CRTIMP2 complex + __cdecl cosh(const complex&); +template _CRTIMP2 complex + __cdecl exp(const complex&); +template _CRTIMP2 complex + __cdecl log(const complex&); +template _CRTIMP2 complex + __cdecl log10(const complex&); +template _CRTIMP2 long double + __cdecl norm(const complex&); +template _CRTIMP2 complex + __cdecl polar(const long double&, const long double&); +template _CRTIMP2 complex + __cdecl polar(const long double&); +template _CRTIMP2 complex + __cdecl pow(const complex&, const long double&); +template _CRTIMP2 complex + __cdecl pow(const complex&, int); +template _CRTIMP2 complex + __cdecl pow(const long double&, const complex&); +template _CRTIMP2 complex + __cdecl pow(const complex&, const complex&); +template _CRTIMP2 complex + __cdecl sin(const complex&); +template _CRTIMP2 complex + __cdecl sinh(const complex&); +template _CRTIMP2 complex + __cdecl sqrt(const complex&); +template _CRTIMP2 complex + __cdecl tanh(const complex&); +template _CRTIMP2 complex + __cdecl tan(const complex&); + + #endif /* _DLL_CPPLIB */ + +#undef _XCOMPLEX_ /* SIC: may be included multiple times */ +#endif /* _XCOMPLEX_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xdebug b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xdebug new file mode 100644 index 00000000..85e82fd1 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xdebug @@ -0,0 +1,143 @@ +// debug heap support header for Microsoft +#pragma once +#ifndef _XDEBUG_ +#define _XDEBUG_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) + + // SUPPORT FOR DEBUG HEAP + + #if !defined(_DEBUG) + #define _NEW_CRT new + #define _DELETE_CRT(_P) delete (_P) + #define _DELETE_CRT_VEC(_P) delete[] (_P) + #define _STRING_CRT string + + #else /* !defined(_DEBUG) */ + #include + #include + +_STD_BEGIN +struct _DebugHeapTag_t + { // placement new tag type to select debug CRT heap + int _Type; + }; +_STD_END + +_CRTIMP2 void * __cdecl operator new(size_t, + const std::_DebugHeapTag_t&, char *, int) + _THROW1(std::bad_alloc); // allocate from the debug CRT heap + +_CRTIMP2 void * __cdecl operator new[](size_t, + const std::_DebugHeapTag_t&, char *, int) + _THROW1(std::bad_alloc); // allocate array from the debug CRT heap + +_CRTIMP2 void __cdecl operator delete(void *, + const std::_DebugHeapTag_t&, char *, int) + _THROW0(); // delete if new for debug CRT heap fails + +_CRTIMP2 void __cdecl operator delete[](void *, + const std::_DebugHeapTag_t&, char *, int) + _THROW0(); // delete if array new for debug CRT heap fails + +_STD_BEGIN + + #define _NEW_CRT new(std::_DebugHeapTag, __FILE__, __LINE__) + #define _DELETE_CRT(_P) std::_DebugHeapDelete(_P) + #define _DELETE_CRT_VEC(_P) std::_DebugHeapDelete((void *)_P) + #define _STRING_CRT _DebugHeapString + +extern _CRTIMP2 const _DebugHeapTag_t _DebugHeapTag; + + // TEMPLATE FUNCTION _DebugHeapDelete +template + void _DebugHeapDelete(_Ty *_Ptr) + { // delete from the debug CRT heap even if operator delete exists + if (_Ptr != 0) + { // worth deleting + _Ptr->~_Ty(); + // delete as _NORMAL_BLOCK, not _CRT_BLOCK, since we might have + // facets allocated by normal new. + free(_Ptr); + } + } + + // TEMPLATE CLASS _DebugHeapAllocator +template + class _DebugHeapAllocator + : public allocator<_Ty> + { // an allocator which uses the debug CRT heap +public: + + template + struct rebind + { // convert _DebugHeapAllocator<_Ty> to _DebugHeapAllocator<_Other> + typedef typename _DebugHeapAllocator<_Other> other; + }; + + allocator<_Ty>::pointer allocate(allocator<_Ty>::size_type _Count, const void *) + { // allocate array of _Count elements, ignore hint + return ((_Ty *)_NEW_CRT char[_Count * sizeof(_Ty)]); + } + + allocator<_Ty>::pointer allocate(allocator<_Ty>::size_type _Count) + { // allocate array of _Count elements + return ((_Ty *)_NEW_CRT char[_Count * sizeof(_Ty)]); + } + + void deallocate(allocator<_Ty>::pointer _Ptr, allocator<_Ty>::size_type) + { // deallocate object at _Ptr, ignore size + _DELETE_CRT_VEC(_Ptr); + } + }; + + // CLASS _DebugHeapString +class _DebugHeapString + : public basic_string, _DebugHeapAllocator > + { // a version of std::string allocated on the debug CRT heap +public: + typedef _DebugHeapString _Myt; + typedef basic_string, _DebugHeapAllocator > + _Mybase; + typedef char _Elem; + + _DebugHeapString() + : _Mybase() + { // construct empty string + } + + _DebugHeapString(const _Myt& _Right) + : _Mybase(_Right) + { // construct by copying _Right + } + + _DebugHeapString(const _Elem *_Ptr) + : _Mybase(_Ptr) + { // construct from [_Ptr, ) + } + + _DebugHeapString(const string &_Str) + : _Mybase(_Str.c_str()) + { // construct from std::string + } + + operator string() const + { // convert to a string + return (string(c_str())); + } + }; +_STD_END + #endif /* !defined(_DEBUG) */ + +#pragma warning(pop) +#pragma pack(pop) + + +#endif /* _XDEBUG_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xhash b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xhash new file mode 100644 index 00000000..882d2481 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xhash @@ -0,0 +1,737 @@ +// xhash internal header +#pragma once +#ifndef _XHASH_ +#define _XHASH_ +#include +#include +#include +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) + + #pragma warning(disable: 4127) + + // TEMPLATE FUNCTION hash_value + #define _HASH_SEED (size_t)0xdeadbeef + +/* +We start off by defining a specialisation of hash_value for stdext. +This will work for stdext::hash_map inline + size_t hash_value(const _STD basic_string<_Elem, _Traits, _Alloc>& _Str) + { // hash string to size_t value + typedef typename _STD basic_string<_Elem, _Traits, _Alloc>::size_type _Strsize; + + size_t _Val = _HASH_SEED; + _Strsize _Size = _Str.size(); + if (0 < _Size) + { // add one or more elements + _Strsize _Stride = (_Size / 16) + 1; + _Size -= _Stride; // protect against _Size near _Str.max_size() + for(_Strsize _Idx = 0; _Idx <= _Size; _Idx += _Stride) + _Val += (size_t)_Str[_Idx]; + } + return (_Val); + } + +_STDEXT_END + +#ifdef _MSC_EXTENSIONS +#if _DEFINE_DEPRECATED_HASH_CLASSES +#pragma warning(push) +#pragma warning(disable: 4996) + +_STD_BEGIN + + using _STDEXT hash_value; + +_STD_END + +#pragma warning(pop) +#endif /* _DEFINE_DEPRECATED_HASH_CLASSES */ +#endif /* _MSC_EXTENSIONS */ + +_STDEXT_BEGIN + +template inline + size_t hash_value(const _Kty& _Keyval) + { // hash _Keyval to size_t value one-to-one + return ((size_t)_Keyval ^ _HASH_SEED); + } + +inline size_t hash_value(const char *_Str) + { // hash NTBS to size_t value + typedef size_t _Strsize; + + size_t _Val = _HASH_SEED; + _Strsize _Size = ::strlen(_Str); + if (0 < _Size) + { // add one or more elements + _Strsize _Stride = (_Size / 16) + 1; + _Size -= _Stride; // protect against _Size near _Str.max_size() + for(_Strsize _Idx = 0; _Idx <= _Size; _Idx += _Stride) + _Val += (size_t)_Str[_Idx]; + } + return (_Val); + } + +inline size_t hash_value(const wchar_t *_Str) + { // hash NTWCS to size_t value + typedef size_t _Strsize; + + size_t _Val = _HASH_SEED; + _Strsize _Size = ::wcslen(_Str); + if (0 < _Size) + { // add one or more elements + _Strsize _Stride = (_Size / 16) + 1; + _Size -= _Stride; // protect against _Size near _Str.max_size() + for(_Strsize _Idx = 0; _Idx <= _Size; _Idx += _Stride) + _Val += (size_t)_Str[_Idx]; + } + return (_Val); + } + + // TEMPLATE CLASS hash_compare + + +template > + class hash_compare + { // traits class for hash containers +public: + enum + { // parameters for hash table + bucket_size = 4, // 0 < bucket_size + min_buckets = 8}; // min_buckets = 2 ^^ N, 0 < N + + hash_compare() + : comp() + { // construct with default comparator + } + + hash_compare(_Pr _Pred) + : comp(_Pred) + { // construct with _Pred comparator + } + + size_t operator()(const _Kty& _Keyval) const + { // hash _Keyval to size_t value + return ((size_t)hash_value(_Keyval)); + } + +// size_t operator()(const _Kty& _Keyval) const +// { // hash _Keyval to size_t value by pseudorandomizing transform +// ldiv_t _Qrem = ldiv((size_t)_Keyval, 127773); +// _Qrem.rem = 16807 * _Qrem.rem - 2836 * _Qrem.quot; +// if (_Qrem.rem < 0) +// _Qrem.rem += 2147483647; +// return ((size_t)_Qrem.rem); } + + bool operator()(const _Kty& _Keyval1, const _Kty& _Keyval2) const + { // test if _Keyval1 ordered before _Keyval2 + return (comp(_Keyval1, _Keyval2)); + } + +protected: + _Pr comp; // the comparator object + }; + + // TEMPLATE CLASS _Hash +template + class _Hash + : public _Traits // traits serves as base class + { // hash table -- list with vector of iterators for quick access +public: + typedef _Hash<_Traits> _Myt; + typedef typename _Traits::key_type key_type; + typedef typename _Traits::key_compare key_compare; + typedef typename _Traits::value_compare value_compare; + enum + { // hoist constants from key_compare + bucket_size = key_compare::bucket_size, + min_buckets = key_compare::min_buckets, + _Multi = _Traits::_Multi}; + typedef _STD list _Mylist; + + typedef typename _Mylist::allocator_type allocator_type; + typedef typename _Mylist::size_type size_type; + typedef typename _Mylist::difference_type difference_type; + typedef typename _Mylist::pointer pointer; + typedef typename _Mylist::const_pointer const_pointer; + typedef typename _Mylist::reference reference; + typedef typename _Mylist::const_reference const_reference; + typedef typename _Mylist::iterator iterator; + typedef typename _Mylist::const_iterator const_iterator; + typedef typename _Mylist::reverse_iterator + reverse_iterator; + typedef typename _Mylist::const_reverse_iterator + const_reverse_iterator; + typedef typename _Mylist::value_type value_type; + + typedef _STD vector::other> _Myvec; + typedef _STD pair _Pairib; + typedef _STD pair _Pairii; + typedef _STD pair _Paircc; + + explicit _Hash(const key_compare& _Parg, + const allocator_type& _Al) + : _Traits(_Parg), _List(_Al), + _Vec(min_buckets + 1, end(), _Al), + _Mask(1), _Maxidx(1) + { // construct empty hash table + } + + _Hash(const value_type *_First, const value_type *_Last, + const key_compare& _Parg, const allocator_type& _Al) + : _Traits(_Parg), _List(_Al), + _Vec(min_buckets + 1, end(), _Al), + _Mask(1), _Maxidx(1) + { // construct hash table from [_First, _Last) array + insert(_First, _Last); + } + + _Hash(const _Myt& _Right) + : _Traits(_Right.comp), _List(_Right.get_allocator()), + _Vec(_Right.get_allocator()) + { // construct hash table by copying right + _Copy(_Right); + } + + ~_Hash() + { // destroy hash table + } + + _Myt& operator=(const _Myt& _Right) + { // replace contents from _Right + if (this != &_Right) + _Copy(_Right); + return (*this); + } + + iterator begin() + { // return iterator for beginning of mutable sequence + return (_List.begin()); + } + + const_iterator begin() const + { // return iterator for beginning of nonmutable sequence + return (_List.begin()); + } + + iterator end() + { // return iterator for end of mutable sequence + return (_List.end()); + } + + const_iterator end() const + { // return iterator for end of nonmutable sequence + return (_List.end()); + } + + reverse_iterator rbegin() + { // return iterator for beginning of reversed mutable sequence + return (_List.rbegin()); + } + + const_reverse_iterator rbegin() const + { // return iterator for beginning of reversed nonmutable sequence + return (_List.rbegin()); + } + + reverse_iterator rend() + { // return iterator for end of reversed mutable sequence + return (_List.rend()); + } + + const_reverse_iterator rend() const + { // return iterator for end of reversed nonmutable sequence + return (_List.rend()); + } + + size_type size() const + { // return length of sequence + return (_List.size()); + } + + size_type max_size() const + { // return maximum possible length of sequence + return (_List.max_size()); + } + + bool empty() const + { // return true only if sequence is empty + return (_List.empty()); + } + + allocator_type get_allocator() const + { // return allocator object for values + return (_List.get_allocator()); + } + + key_compare key_comp() const + { // return object for comparing keys + return (this->comp); + } + + value_compare value_comp() const + { // return object for comparing values + return (value_compare(key_comp())); + } + + _Pairib insert(const value_type& _Val) + { // try to insert node with value _Val + iterator _Plist, _Where; + if (_Maxidx <= size() / bucket_size) + { // too dense, need to grow hash table + if (_Vec.size() - 1 <= _Maxidx) + { // table full, double its size + _Mask = ((_Vec.size() - 1) << 1) - 1; + _Vec.resize(_Mask + 2, end()); + } + else if (_Mask < _Maxidx) + _Mask = (_Mask << 1) + 1; + + size_type _Bucket = _Maxidx - (_Mask >> 1) - 1; + for (_Plist = _Vec[_Bucket]; _Plist != _Vec[_Bucket + 1]; ) + { // split old bucket + size_type _Newbucket = + this->comp(this->_Kfn(*_Plist)) & _Mask; + if (_Newbucket == _Bucket) + ++_Plist; // leave element in old bucket + else + { // move element to new bucket + size_type _Idx; + iterator _Pnext = _Plist; + if (++_Pnext != end()) + { // not at end, move it + for (_Idx = _Bucket; _Plist == _Vec[_Idx]; --_Idx) + { // update end iterators if moving first + _Vec[_Idx] = _Pnext; + if (_Idx == 0) + break; + } + _List._Splice(end(), _List, _Plist, _Pnext, 0); + _Plist = --end(); + _Vec[_Maxidx + 1] = end(); + } + + for (_Idx = _Maxidx; _Bucket < _Idx; --_Idx) + { // update end iterators if new bucket filled + if (_Vec[_Idx] != end()) + break; + _Vec[_Idx] = _Plist; + } + + if (_Pnext == end()) + break; + else + _Plist = _Pnext; + } + } + ++_Maxidx; // open new bucket for hash lookup + } + + size_type _Bucket = _Hashval(this->_Kfn(_Val)); + for (_Plist = _Vec[_Bucket + 1]; _Plist != _Vec[_Bucket]; ) + if (this->comp(this->_Kfn(_Val), this->_Kfn(*--_Plist))) + ; // still too high in bucket list + else if (this->comp(this->_Kfn(*_Plist), this->_Kfn(_Val))) + { // found insertion point, back up to it + ++_Plist; + break; + } + else if (_Multi) + break; // equivalent, insert only if multi + else + return (_Pairib(_Plist, false)); // already present + + _Where = _List.insert(_Plist, _Val); // insert new element + for (; _Plist == _Vec[_Bucket]; --_Bucket) + { // update end iterators if new first bucket element + _Vec[_Bucket] = _Where; + if (_Bucket == 0) + break; + } + + return (_Pairib(_Where, true)); // return iterator for new element + } + + iterator insert(iterator, const value_type& _Val) + { // try to insert node with value _Val, ignore hint + return (insert(_Val).first); + } + + template + void insert(_Iter _First, _Iter _Last) + { // insert [_First, _Last) one at a time + for (; _First != _Last; ++_First) + insert(*_First); + } + + iterator erase(iterator _Where) + { // erase element at _Where + size_type _Bucket = _Hashval(this->_Kfn(*_Where)); + for (; _Where == _Vec[_Bucket]; --_Bucket) + { // update end iterators if erasing first + ++_Vec[_Bucket]; + if (_Bucket == 0) + break; + } + return (_List.erase(_Where)); + } + + iterator erase(iterator _First, iterator _Last) + { // erase [_First, _Last) + if (_First == begin() && _Last == end()) + { // erase all + clear(); + return (begin()); + } + else + { // partial erase, one at a time + while (_First != _Last) + erase(_First++); + return (_First); + } + } + + size_type erase(const key_type& _Keyval) + { // erase and count all that match _Keyval + _Pairii _Where = equal_range(_Keyval); + size_type _Num = 0; + _Distance(_Where.first, _Where.second, _Num); + erase(_Where.first, _Where.second); + return (_Num); + } + + void erase(const key_type *_First, + const key_type *_Last) + { // erase all that match array of keys [_First, _Last) + for (; _First != _Last; ++_First) + erase(*_First); + } + + void clear() + { // erase all + _List.clear(); + _Vec.assign(min_buckets + 1, end()); + _Mask = 1; + _Maxidx = 1; + } + + iterator find(const key_type& _Keyval) + { // find an element in mutable hash table that matches _Keyval + return (lower_bound(_Keyval)); + } + + const_iterator find(const key_type& _Keyval) const + { // find an element in nonmutable hash table that matches _Keyval + return (lower_bound(_Keyval)); + } + + size_type count(const key_type& _Keyval) const + { // count all elements that match _Keyval + _Paircc _Ans = equal_range(_Keyval); + size_type _Num = 0; + _Distance(_Ans.first, _Ans.second, _Num); + return (_Num); + } + + iterator lower_bound(const key_type& _Keyval) + { // find leftmost not less than _Keyval in mutable hash table + size_type _Bucket = _Hashval(_Keyval); + iterator _Where; + for (_Where = _Vec[_Bucket]; _Where != _Vec[_Bucket + 1]; ++_Where) + if (!this->comp(this->_Kfn(*_Where), _Keyval)) + return (this->comp(_Keyval, + this->_Kfn(*_Where)) ? end() : _Where); + return (end()); + } + + const_iterator lower_bound(const key_type& _Keyval) const + { // find leftmost not less than _Keyval in nonmutable hash table + size_type _Bucket = _Hashval(_Keyval); + const_iterator _Where; + for (_Where = _Vec[_Bucket]; _Where != _Vec[_Bucket + 1]; ++_Where) + if (!this->comp(this->_Kfn(*_Where), _Keyval)) + return (this->comp(_Keyval, + this->_Kfn(*_Where)) ? end() : _Where); + return (end()); + } + + iterator upper_bound(const key_type& _Keyval) + { // find leftmost not greater than _Keyval in mutable hash table + size_type _Bucket = _Hashval(_Keyval); + iterator _Where; + for (_Where = _Vec[_Bucket + 1]; _Where != _Vec[_Bucket]; ) + if (!this->comp(_Keyval, this->_Kfn(*--_Where))) + return (this->comp(this->_Kfn(*_Where), + _Keyval) ? end() : ++_Where); + return (end()); + } + + const_iterator upper_bound(const key_type& _Keyval) const + { // find leftmost not greater than _Keyval in nonmutable hash table + size_type _Bucket = _Hashval(_Keyval); + const_iterator _Where; + for (_Where = _Vec[_Bucket + 1]; _Where != _Vec[_Bucket]; ) + if (!this->comp(_Keyval, this->_Kfn(*--_Where))) + return (this->comp(this->_Kfn(*_Where), + _Keyval) ? end() : ++_Where); + return (end()); + } + + _Pairii equal_range(const key_type& _Keyval) + { // find range equivalent to _Keyval in mutable hash table + size_type _Bucket = _Hashval(_Keyval); + iterator _First, _Where; + for (_Where = _Vec[_Bucket]; _Where != _Vec[_Bucket + 1]; ++_Where) + if (!this->comp(this->_Kfn(*_Where), _Keyval)) + { // found _First, look for end of range + for (_First = _Where; _Where != _Vec[_Bucket + 1]; ++_Where) + if (this->comp(_Keyval, this->_Kfn(*_Where))) + break; + if (_First == _Where) + break; + return (_Pairii(_First, _Where)); + } + return (_Pairii(end(), end())); + } + + _Paircc equal_range(const key_type& _Keyval) const + { // find range equivalent to _Keyval in nonmutable hash table + size_type _Bucket = _Hashval(_Keyval); + iterator _First, _Where; + for (_Where = _Vec[_Bucket]; _Where != _Vec[_Bucket + 1]; ++_Where) + if (!this->comp(this->_Kfn(*_Where), _Keyval)) + { // found _First, look for end of range + for (_First = _Where; _Where != _Vec[_Bucket + 1]; ++_Where) + if (this->comp(_Keyval, this->_Kfn(*_Where))) + break; + if (_First == _Where) + break; + return (_Paircc(_First, _Where)); + } + return (_Paircc(end(), end())); + } + + void swap(_Myt& _Right) + { // exchange contents with _Right + if (get_allocator() == _Right.get_allocator()) + { // same allocator, swap control information + _List.swap(_Right._List); + std::swap(_Vec, _Right._Vec); + std::swap(_Mask, _Right._Mask); + std::swap(_Maxidx, _Right._Maxidx); + std::swap(this->comp, _Right.comp); + } + else + { // different allocator, do multiple assigns + _Myt _Tmp = *this; *this = _Right, _Right = _Tmp; + } + } + +protected: + void _Copy(const _Myt& _Right) + { // copy entire hash table + _Vec.resize(_Right._Vec.size(), end()); + _Mask = _Right._Mask; + _Maxidx = _Right._Maxidx; + _List.clear(); + + _TRY_BEGIN + _List.insert(end(), _Right._List.begin(), _Right._List.end()); + this->comp = _Right.comp; + _CATCH_ALL + _List.clear(); // list or compare copy failed, bail out + fill(_Vec.begin(), _Vec.end(), end()); + _RERAISE; + _CATCH_END + + iterator _Whereto = begin(); + const_iterator _Wherefrom = _Right.begin(); + for (size_type _Bucket = 0; _Bucket < _Vec.size(); ) + if (_Wherefrom == _Right._Vec[_Bucket]) + _Vec[_Bucket] = _Whereto, ++_Bucket; + else + ++_Whereto, ++_Wherefrom; + } + + size_type _Hashval(const key_type& _Keyval) const + { // return hash value, masked and wrapped to current table size + size_type _Num = this->comp(_Keyval) & _Mask; + if (_Maxidx <= _Num) + _Num -= (_Mask >> 1) + 1; + return (_Num); + } + + _Mylist _List; // the list of elements, must initialize before _Vec + _Myvec _Vec; // the vector of list iterators + size_type _Mask; // the key mask + size_type _Maxidx; // current maximum key value + }; + + // _Hash TEMPLATE OPERATORS +template inline + bool operator==(const _Hash<_Ty>& _Left, const _Hash<_Ty>& _Right) + { // test for hash table equality + return (_Left.size() == _Right.size() + && equal(_Left.begin(), _Left.end(), _Right.begin())); + } + +template inline + bool operator!=(const _Hash<_Ty>& _Left, const _Hash<_Ty>& _Right) + { // test for hash table inequality + return (!(_Left == _Right)); + } + +template inline + bool operator<(const _Hash<_Ty>& _Left, const _Hash<_Ty>& _Right) + { // test if _Left < _Right for hash tables + return (lexicographical_compare(_Left.begin(), _Left.end(), + _Right.begin(), _Right.end())); + } + +template inline + bool operator>(const _Hash<_Ty>& _Left, const _Hash<_Ty>& _Right) + { // test if _Left > _Right for hash tables + return (_Right < _Left); + } + +template inline + bool operator<=(const _Hash<_Ty>& _Left, const _Hash<_Ty>& _Right) + { // test if _Left <= _Right for hash tables + return (!(_Right < _Left)); + } + +template inline + bool operator>=(const _Hash<_Ty>& _Left, const _Hash<_Ty>& _Right) + { // test if _Left >= _Right for hash tables + return (!(_Left < _Right)); + } +_STDEXT_END + +#ifdef _MSC_EXTENSIONS +#if _DEFINE_DEPRECATED_HASH_CLASSES +#pragma warning(push) +#pragma warning(disable: 4996) + +_STD_BEGIN + + // TEMPLATE FUNCTION hash_value +template inline + size_t _DEPRECATED hash_value(const _Kty& _Keyval) + { // hash _Keyval to size_t value one-to-one + return ((size_t)_Keyval ^ _HASH_SEED); + } + +inline size_t _DEPRECATED hash_value(const char *_Str) + { // hash NTBS to size_t value + typedef size_t _Strsize; + + size_t _Val = _HASH_SEED; + _Strsize _Size = ::strlen(_Str); + if (0 < _Size) + { // add one or more elements + _Strsize _Stride = (_Size / 16) + 1; + _Size -= _Stride; // protect against _Size near _Str.max_size() + for(_Strsize _Idx = 0; _Idx <= _Size; _Idx += _Stride) + _Val += (size_t)_Str[_Idx]; + } + return (_Val); + } + +inline size_t _DEPRECATED hash_value(const wchar_t *_Str) + { // hash NTWCS to size_t value + typedef size_t _Strsize; + + size_t _Val = _HASH_SEED; + _Strsize _Size = ::wcslen(_Str); + if (0 < _Size) + { // add one or more elements + _Strsize _Stride = (_Size / 16) + 1; + _Size -= _Stride; // protect against _Size near _Str.max_size() + for(_Strsize _Idx = 0; _Idx <= _Size; _Idx += _Stride) + _Val += (size_t)_Str[_Idx]; + } + return (_Val); + } + + // TEMPLATE CLASS hash_compare + + +template > + class _DEPRECATED hash_compare + { // traits class for hash containers +public: + enum + { // parameters for hash table + bucket_size = 4, // 0 < bucket_size + min_buckets = 8}; // min_buckets = 2 ^^ N, 0 < N + + hash_compare() + : comp() + { // construct with default comparator + } + + hash_compare(_Pr _Pred) + : comp(_Pred) + { // construct with _Pred comparator + } + + size_t operator()(const _Kty& _Keyval) const + { // hash _Keyval to size_t value + return ((size_t)hash_value(_Keyval)); + } + +// size_t operator()(const _Kty& _Keyval) const +// { // hash _Keyval to size_t value by pseudorandomizing transform +// ldiv_t _Qrem = ldiv((size_t)_Keyval, 127773); +// _Qrem.rem = 16807 * _Qrem.rem - 2836 * _Qrem.quot; +// if (_Qrem.rem < 0) +// _Qrem.rem += 2147483647; +// return ((size_t)_Qrem.rem); } + + bool operator()(const _Kty& _Keyval1, const _Kty& _Keyval2) const + { // test if _Keyval1 ordered before _Keyval2 + return (comp(_Keyval1, _Keyval2)); + } + +protected: + _Pr comp; // the comparator object + }; + +_STD_END + +#pragma warning(pop) +#endif /* _DEFINE_DEPRECATED_HASH_CLASSES */ +#endif /* _MSC_EXTENSIONS */ + + #pragma warning(default: 4127) + +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _XHASH_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xiosbase b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xiosbase new file mode 100644 index 00000000..2a86e0dd --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xiosbase @@ -0,0 +1,488 @@ +// xiosbase internal header (from ) +#pragma once +#ifndef _XIOSBASE_ +#define _XIOSBASE_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + #define _IOSskipws 0x0001 + #define _IOSunitbuf 0x0002 + #define _IOSuppercase 0x0004 + #define _IOSshowbase 0x0008 + #define _IOSshowpoint 0x0010 + #define _IOSshowpos 0x0020 + #define _IOSleft 0x0040 + #define _IOSright 0x0080 + #define _IOSinternal 0x0100 + #define _IOSdec 0x0200 + #define _IOSoct 0x0400 + #define _IOShex 0x0800 + #define _IOSscientific 0x1000 + #define _IOSfixed 0x2000 + #define _IOSboolalpha 0x4000 + #define _IOS_Stdio 0x8000 + + #define _IOS_Nocreate 0x40 + #define _IOS_Noreplace 0x80 + #define _IOSbinary 0x20 + // TEMPLATE CLASS _Iosb +template + class _Iosb + { // define templatized bitmask/enumerated types, instantiate on demand +public: + enum _Dummy_enum {_Dummy_enum_val = 1}; // don't ask + + enum _Fmtflags + { // constants for formatting options + _Fmtmask = 0xffff, _Fmtzero = 0}; + _BITMASK(_Fmtflags, fmtflags); + + static const _Fmtflags skipws = (_Fmtflags)_IOSskipws; + static const _Fmtflags unitbuf = (_Fmtflags)_IOSunitbuf; + static const _Fmtflags uppercase = (_Fmtflags)_IOSuppercase; + static const _Fmtflags showbase = (_Fmtflags)_IOSshowbase; + static const _Fmtflags showpoint = (_Fmtflags)_IOSshowpoint; + static const _Fmtflags showpos = (_Fmtflags)_IOSshowpos; + static const _Fmtflags left = (_Fmtflags)_IOSleft; + static const _Fmtflags right = (_Fmtflags)_IOSright; + static const _Fmtflags internal = (_Fmtflags)_IOSinternal; + static const _Fmtflags dec = (_Fmtflags)_IOSdec; + static const _Fmtflags oct = (_Fmtflags)_IOSoct; + static const _Fmtflags hex = (_Fmtflags)_IOShex; + static const _Fmtflags scientific = (_Fmtflags)_IOSscientific; + static const _Fmtflags fixed = (_Fmtflags)_IOSfixed; + static const _Fmtflags boolalpha = (_Fmtflags)_IOSboolalpha; + static const _Fmtflags _Stdio = (_Fmtflags)_IOS_Stdio; + static const _Fmtflags adjustfield = (_Fmtflags)(_IOSleft + | _IOSright | _IOSinternal); + static const _Fmtflags basefield = (_Fmtflags)(_IOSdec + | _IOSoct | _IOShex); + static const _Fmtflags floatfield = (_Fmtflags)(_IOSscientific + | _IOSfixed); + + enum _Iostate + { // constants for stream states + _Statmask = 0x17}; + _BITMASK(_Iostate, iostate); + + static const _Iostate goodbit = (_Iostate)0x0; + static const _Iostate eofbit = (_Iostate)0x1; + static const _Iostate failbit = (_Iostate)0x2; + static const _Iostate badbit = (_Iostate)0x4; + static const _Iostate _Hardfail = (_Iostate)0x10; + + enum _Openmode + { // constants for file opening options + _Openmask = 0xff}; + _BITMASK(_Openmode, openmode); + + static const _Openmode in = (_Openmode)0x01; + static const _Openmode out = (_Openmode)0x02; + static const _Openmode ate = (_Openmode)0x04; + static const _Openmode app = (_Openmode)0x08; + static const _Openmode trunc = (_Openmode)0x10; + static const _Openmode _Nocreate = (_Openmode)_IOS_Nocreate; + static const _Openmode _Noreplace = (_Openmode)_IOS_Noreplace; + static const _Openmode binary = (_Openmode)_IOSbinary; + + enum _Seekdir + { // constants for file positioning options + _Seekmask = 0x3}; + _BITMASK(_Seekdir, seekdir); + + static const _Seekdir beg = (_Seekdir)0; + static const _Seekdir cur = (_Seekdir)1; + static const _Seekdir end = (_Seekdir)2; + + enum + { // constant for default file opening protection + _Openprot = 0666}; + }; + +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::skipws; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::unitbuf; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::uppercase; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::showbase; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::showpoint; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::showpos; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::left; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::right; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::internal; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::dec; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::oct; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::hex; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::scientific; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::fixed; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::boolalpha; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::_Stdio; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::adjustfield; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::basefield; +template + const typename _Iosb<_Dummy>::_Fmtflags _Iosb<_Dummy>::floatfield; + +template + const typename _Iosb<_Dummy>::_Iostate _Iosb<_Dummy>::goodbit; +template + const typename _Iosb<_Dummy>::_Iostate _Iosb<_Dummy>::eofbit; +template + const typename _Iosb<_Dummy>::_Iostate _Iosb<_Dummy>::failbit; +template + const typename _Iosb<_Dummy>::_Iostate _Iosb<_Dummy>::badbit; +template + const typename _Iosb<_Dummy>::_Iostate _Iosb<_Dummy>::_Hardfail; + +template + const typename _Iosb<_Dummy>::_Openmode _Iosb<_Dummy>::in; +template + const typename _Iosb<_Dummy>::_Openmode _Iosb<_Dummy>::out; +template + const typename _Iosb<_Dummy>::_Openmode _Iosb<_Dummy>::ate; +template + const typename _Iosb<_Dummy>::_Openmode _Iosb<_Dummy>::app; +template + const typename _Iosb<_Dummy>::_Openmode _Iosb<_Dummy>::trunc; +template + const typename _Iosb<_Dummy>::_Openmode _Iosb<_Dummy>::_Nocreate; +template + const typename _Iosb<_Dummy>::_Openmode _Iosb<_Dummy>::_Noreplace; +template + const typename _Iosb<_Dummy>::_Openmode _Iosb<_Dummy>::binary; + +template + const typename _Iosb<_Dummy>::_Seekdir _Iosb<_Dummy>::beg; +template + const typename _Iosb<_Dummy>::_Seekdir _Iosb<_Dummy>::cur; +template + const typename _Iosb<_Dummy>::_Seekdir _Iosb<_Dummy>::end; + + // CLASS ios_base +class _CRTIMP2 ios_base + : public _Iosb + { // base class for ios +public: + + typedef std::streamoff streamoff; + typedef std::streampos streampos; + + enum event + { // constants for ios events + erase_event, imbue_event, copyfmt_event}; + + typedef void (__cdecl *event_callback)(event, ios_base&, int); + typedef unsigned int io_state, open_mode, seek_dir; + + // CLASS failure + class failure + : public runtime_error + { // base of all iostreams exceptions + public: + explicit failure(const string &_Message) + : runtime_error(_Message) + { // construct with message + } + + virtual ~failure() + { // destroy the object + } + +#if !_HAS_EXCEPTIONS + + protected: + virtual void _Doraise() const + { // report the exception + _RAISE(*this); + } +#endif /* _HAS_EXCEPTIONS */ + + }; + + // CLASS Init + class _CRTIMP2 Init + { // controller for standard-stream initialization + public: + Init(); // initialize standard streams on first construction + + ~Init(); // flush standard streams on last destruction + + private: + static int _Init_cnt; // net constructions - destructions + }; + + ios_base& operator=(const ios_base& _Right) + { // assign state and format stuff from _Right + if (this != &_Right) + { // worth doing + _Mystate = _Right._Mystate; + copyfmt(_Right); + } + return (*this); + } + + operator void *() const + { // test if any stream operation has failed + return (fail() ? 0 : (void *)this); + } + + bool operator!() const + { // test if no stream operation has failed + return (fail()); + } + + void clear(iostate, bool); // set state, possibly reraise exception + + void clear(iostate _State = goodbit) + { // set state to argument + clear(_State, false); + } + + void clear(io_state _State) + { // set state to argument, old-style + clear((iostate)_State); + } + + iostate rdstate() const + { // return stream state + return (_Mystate); + } + + void setstate(iostate _State, bool _Exreraise) + { // merge in state argument, possibly reraise exception + if (_State != goodbit) + clear((iostate)((int)rdstate() | (int)_State), _Exreraise); + } + + void setstate(iostate _State) + { // merge in state argument + if (_State != goodbit) + clear((iostate)((int)rdstate() | (int)_State), false); + } + + void setstate(io_state _State) + { // merge in state argument, old style + setstate((iostate)_State); + } + + bool good() const + { // test if no state bits are set + return (rdstate() == goodbit); + } + + bool eof() const + { // test if eofbit is set in stream state + return ((int)rdstate() & (int)eofbit); + } + + bool fail() const + { // test if badbit or failbit is set in stream state + return (((int)rdstate() + & ((int)badbit | (int)failbit)) != 0); + } + + bool bad() const + { // test if badbit is set in stream state + return (((int)rdstate() & (int)badbit) != 0); + } + + iostate exceptions() const + { // return exception mask + return (_Except); + } + + void exceptions(iostate _Newexcept) + { // set exception mask to argument + _Except = (iostate)((int)_Newexcept & (int)_Statmask); + clear(_Mystate); + } + + void exceptions(io_state _State) + { // set exception mask to argument, old style + exceptions((iostate)_State); + } + + fmtflags flags() const + { // return format flags + return (_Fmtfl); + } + + fmtflags flags(fmtflags _Newfmtflags) + { // set format flags to argument + fmtflags _Oldfmtflags = _Fmtfl; + _Fmtfl = (fmtflags)((int)_Newfmtflags & (int)_Fmtmask); + return (_Oldfmtflags); + } + + fmtflags setf(fmtflags _Newfmtflags) + { // merge in format flags argument + ios_base::fmtflags _Oldfmtflags = _Fmtfl; + _Fmtfl = (fmtflags)((int)_Fmtfl + | (int)_Newfmtflags & (int)_Fmtmask); + return (_Oldfmtflags); + } + + fmtflags setf(fmtflags _Newfmtflags, fmtflags _Mask) + { // merge in format flags argument under mask argument + ios_base::fmtflags _Oldfmtflags = _Fmtfl; + _Fmtfl = (fmtflags)(((int)_Fmtfl & (int)~_Mask) + | ((int)_Newfmtflags & (int)_Mask & (int)_Fmtmask)); + return (_Oldfmtflags); + } + + void unsetf(fmtflags _Mask) + { // clear format flags under mask argument + _Fmtfl = (fmtflags)((int)_Fmtfl & (int)~_Mask); + } + + streamsize precision() const + { // return precision + return (_Prec); + } + + streamsize precision(streamsize _Newprecision) + { // set precision to argument + streamsize _Oldprecision = _Prec; + _Prec = _Newprecision; + return (_Oldprecision); + } + + streamsize width() const + { // return width + return (_Wide); + } + + streamsize width(streamsize _Newwidth) + { // set width to argument + streamsize _Oldwidth = _Wide; + _Wide = _Newwidth; + return (_Oldwidth); + } + + locale getloc() const + { // get locale + return (*_Ploc); + } + + locale imbue(const locale&); // set locale to argument + + static int __cdecl xalloc() + { // allocate new iword/pword index + _Lockit _Lock(_LOCK_STREAM); // lock thread to ensure atomicity + return (_Index++); + } + + long& iword(int _Idx) + { // return reference to long element + return (_Findarr(_Idx)._Lo); + } + + void *& pword(int _Idx) + { // return reference to pointer element + return (_Findarr(_Idx)._Vp); + } + + void register_callback(event_callback, int); // register event handler + + ios_base& copyfmt(const ios_base&); // copy format stuff + + virtual ~ios_base(); // destroy the object + + static bool __cdecl sync_with_stdio(bool _Newsync = true) + { // set C/C++ synchronization flag from argument + _Lockit _Lock(_LOCK_STREAM); // lock thread to ensure atomicity + const bool _Oldsync = _Sync; + _Sync = _Newsync; + return (_Oldsync); + } + + void _Addstd(); // add this to list of standard streams + size_t _Stdstr; // if > 0 index of standard stream to suppress destruction + +protected: + ios_base() + { // default constructor + } + + void _Init(); // initialize to standard values + +private: + // STRUCT _Iosarray + struct _Iosarray + { // list element for open-ended sparse array of longs/pointers + public: + _Iosarray(int _Idx, _Iosarray *_Link) + : _Next(_Link), _Index(_Idx), _Lo(0), _Vp(0) + { // construct node for index _Idx and link it in + } + + _Iosarray *_Next; // pointer to next node + int _Index; // index of this node + long _Lo; // stored long value + void *_Vp; // stored pointer value + }; + + // STRUCT _Fnarray + struct _Fnarray + { // list element for open-ended sparse array of event handlers + _Fnarray(int _Idx, event_callback _Pnew, _Fnarray *_Link) + : _Next(_Link), _Index(_Idx), _Pfn(_Pnew) + { // construct node for index _Idx and link it in + } + + _Fnarray *_Next; // pointer to next node + int _Index; // index of this node + event_callback _Pfn; // pointer to event handler + }; + + void _Callfns(event); // call all event handlers, reporting event + + _Iosarray& _Findarr(int); // find an array element + + void _Tidy(); // free allocated storage + + iostate _Mystate; // stream state + iostate _Except; // exception mask + fmtflags _Fmtfl; // format flags + streamsize _Prec; // field precision + streamsize _Wide; // field width + _Iosarray *_Arr; // pointer to first node of long/pointer array + _Fnarray *_Calls; // pointer to first node of call list + locale *_Ploc; // pointer to locale + + static int _Index; // source of unique indexes for long/pointer array + static bool _Sync; // C/C++ synchronization flag (ignored) + }; + +_BITMASK_OPS(ios_base::_Fmtflags) +_BITMASK_OPS(ios_base::_Iostate) +_BITMASK_OPS(ios_base::_Openmode) +_BITMASK_OPS(ios_base::_Seekdir) +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _XIOSBASE_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocale b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocale new file mode 100644 index 00000000..d25b47a2 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocale @@ -0,0 +1,1572 @@ +// xlocale internal header (from ) +#pragma once +#ifndef _XLOCALE_ +#define _XLOCALE_ +#include +#include +#include +#include +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) + +_STD_BEGIN + + // TEMPLATE CLASS _Locbase +template + class _Locbase + { // define templatized category constants, instantiate on demand +public: + static const int collate = _M_COLLATE; + static const int ctype = _M_CTYPE; + static const int monetary = _M_MONETARY; + static const int numeric = _M_NUMERIC; + static const int time = _M_TIME; + static const int messages = _M_MESSAGE; + static const int all = _M_ALL; + static const int none = 0; + }; + +template + const int _Locbase<_Dummy>::collate; +template + const int _Locbase<_Dummy>::ctype; +template + const int _Locbase<_Dummy>::monetary; +template + const int _Locbase<_Dummy>::numeric; +template + const int _Locbase<_Dummy>::time; +template + const int _Locbase<_Dummy>::messages; +template + const int _Locbase<_Dummy>::all; +template + const int _Locbase<_Dummy>::none; + + // CLASS locale +class locale; +template + const _Facet& __cdecl use_facet(const locale&); + +class _CRTIMP2 locale + : public _Locbase + { // nonmutable collection of facets that describe a locale +public: + typedef int category; + + // CLASS id + class _CRTIMP2 id + { // identifier stamp, unique for each distinct kind of facet + public: + id(size_t _Val = 0) + : _Id(_Val) + { // construct with specified stamp value + } + + operator size_t() + { // get stamp, with lazy allocation + if (_Id == 0) + { // still zero, allocate stamp + _Lockit _Lock(_LOCK_LOCALE); + if (_Id == 0) + _Id = ++_Id_cnt; + } + return (_Id); + } + + private: + id(const id&); // not defined + id& operator=(const id&); // not defined + + size_t _Id; // the identifier stamp + static int _Id_cnt; // static source of unique stamps + }; + + class _Locimp; + + // class facet + class _CRTIMP2 facet + { // base class for all locale facets, performs reference counting + friend class locale; + friend class _Locimp; + + public: + static size_t __cdecl _Getcat(const facet ** = 0) + { // get category value, or -1 if no corresponding C category + return ((size_t)(-1)); + } + + void _Incref() + { // safely increment the reference count + _Lockit _Lock(_LOCK_LOCALE); + + if (_Refs < (size_t)(-1)) + ++_Refs; + } + + facet *_Decref() + { // safely decrement the reference count, return this when dead + _Lockit _Lock(_LOCK_LOCALE); + + if (0 < _Refs && _Refs < (size_t)(-1)) + --_Refs; + return (_Refs == 0 ? this : 0); + } + + void _Register(); // queue up lazy facet for destruction + +// _PROTECTED: + virtual ~facet() + { // destroy the object + } + + protected: + explicit facet(size_t _Initrefs = 0) + : _Refs(_Initrefs) + { // construct with initial reference count + } + + private: + facet(const facet&); // not defined + facet& operator=(const facet&); // not defined + + size_t _Refs; // the reference count + }; + + // CLASS _Locimp + class _Locimp + : public facet + { // reference-counted actual implementation of a locale + _PROTECTED: + ~_Locimp(); // destroy the object + + private: + friend class locale; + + _Locimp(bool _Transparent = false); // construct from current locale + + _CRTIMP2 _Locimp(const _Locimp&); // copy a _Locimp + + _CRTIMP2 void _Addfac(facet *, size_t); // add a facet + + static _Locimp *__cdecl _Makeloc(const _Locinfo&, + category, _Locimp *, const locale *); // make essential facets + + static void __cdecl _Makewloc(const _Locinfo&, + category, _Locimp *, const locale *); // make wchar_t facets + + + static void __cdecl _Makexloc(const _Locinfo&, + category, _Locimp *, const locale *); // make remaining facets + + facet **_Facetvec; // pointer to vector of facets + size_t _Facetcount; // size of vector of facets + category _Catmask; // mask describing implemented categories + bool _Xparent; // true if locale is transparent + _STRING_CRT _Name; // locale name, or "*" if not known + static _CRTIMP2 _Locimp *_Clocptr; // pointer to "C" locale object + }; + + _DEPRECATED locale& _Addfac(facet *, size_t, + size_t); // add a facet, copying on write + + template + bool operator()(const basic_string<_Elem, _Traits, _Alloc>& _Left, + const basic_string<_Elem, _Traits, _Alloc>& _Right) const + { // compare _Left and _Right strings using collate facet in locale + const std::collate<_Elem>& _Coll_fac = + std::use_facet >(*this); + + return (_Coll_fac.compare(_Left.c_str(), _Left.c_str() + _Left.size(), + _Right.c_str(), _Right.c_str() + _Right.size()) < 0); + } + + template + locale combine(const locale& _Loc) const + { // combine two locales + _Facet *_Facptr; + + _TRY_BEGIN + _Facptr = (_Facet *)&std::use_facet<_Facet>(_Loc); + _CATCH_ALL + _THROW(runtime_error, "locale::combine facet missing"); + _CATCH_END + + _Locimp *_Newimp = _NEW_CRT _Locimp(*_Ptr); + _Newimp->_Addfac(_Facptr, _Facet::id); + if (_Facet::_Getcat() != (size_t)(-1)) + { // not a standard facet, result has no name + _Newimp->_Catmask = 0; + _Newimp->_Name = "*"; + } + return (locale(_Newimp)); + } + + template + locale(const locale& _Loc, _Facet *_Facptr) + : _Ptr(_NEW_CRT _Locimp(*_Loc._Ptr)) + { // construct from _Loc, replacing facet with *_Facptr + if (_Facptr != 0) + { // replace facet + _Ptr->_Addfac(_Facptr, _Facet::id); + if (_Facet::_Getcat() != (size_t)(-1)) + _Ptr->_Catmask = 0, _Ptr->_Name = "*"; // no C category + } + } + + + locale() _THROW0(); // construct from current locale + + locale(_Uninitialized) + { // defer construction + } + + locale(const locale& _Right) _THROW0() + : _Ptr(_Right._Ptr) + { // construct by copying + _Ptr->_Incref(); + } + + locale(const locale&, const locale&, + category); // construct from locale and category in another locale + + explicit locale(const char *, + category = all); // construct from named locale for category + + locale(const locale&, const char *, + category); // construct from locale and category in named locale + + ~locale() _THROW0() + { // destroy the object + if (_Ptr != 0) + _DELETE_CRT(_Ptr->_Decref()); + } + + locale& operator=(const locale& _Right) _THROW0() + { // assign a locale + if (_Ptr != _Right._Ptr) + { // different implementation, point at new one + _DELETE_CRT(_Ptr->_Decref()); + _Ptr = _Right._Ptr; + _Ptr->_Incref(); + } + return (*this); + } + + string name() const + { // return locale name + return (_Ptr->_Name); + } + + const facet *_Getfacet(size_t) const; // get facet by id + + bool operator==(const locale&) const; // test for locale equality + + bool operator!=(const locale& _Right) const + { // test for locale inequality + return (!(*this == _Right)); + } + + static const locale& __cdecl classic(); // return classic "C" locale + + static locale __cdecl global(const locale&); // return current locale + + static locale __cdecl empty(); // return empty (transparent) locale + +private: + locale(_Locimp *_Ptrimp) + : _Ptr(_Ptrimp) + { // construct from _Locimp pointer + } + + static _Locimp *__cdecl _Init(); // initialize locale + + _Locimp *_Ptr; // pointer to locale implementation object + }; + + // SUPPORT TEMPLATES +template + struct _Facetptr + { // store pointer to lazy facet for use_facet + static const locale::facet *_Psave; + }; + +template + const locale::facet *_Facetptr<_Facet>::_Psave = 0; + +template inline _DEPRECATED + locale _Addfac(locale _Loc, _Facet *_Fac) + { // add facet to locale -- retained + return (_Loc._Addfac(_Fac, _Facet::id, _Facet::_Getcat())); + } + + #define _ADDFAC(loc, pfac) locale(loc, pfac) /* add facet to locale */ + + #define _USE(loc, fac) \ + use_facet(loc) /* get facet reference from locale */ + +template inline + const _Facet& __cdecl use_facet(const locale& _Loc) + { // get facet reference from locale + _Lockit _Lock(_LOCK_LOCALE); // the thread lock, make get atomic + const locale::facet *_Psave = + _Facetptr<_Facet>::_Psave; // static pointer to lazy facet + + size_t _Id = _Facet::id; + const locale::facet *_Pf = _Loc._Getfacet(_Id); + + if (_Pf != 0) + ; // got facet from locale + else if (_Psave != 0) + _Pf = _Psave; // lazy facet already allocated + else if (_Facet::_Getcat(&_Psave) == (size_t)(-1)) + + #if _HAS_EXCEPTIONS + throw bad_cast(); // lazy disallowed + + #else /* _HAS_EXCEPTIONS */ + abort(); // lazy disallowed + #endif /* _HAS_EXCEPTIONS */ + + else + { // queue up lazy facet for destruction + _Pf = _Psave; + _Facetptr<_Facet>::_Psave = _Psave; + + locale::facet *_Pfmod = (_Facet *)_Psave; + _Pfmod->_Incref(); + _Pfmod->_Register(); + } + + return ((const _Facet&)(*_Pf)); // should be dynamic_cast + } + +template inline _DEPRECATED + const _Facet& __cdecl use_facet(const locale& _Loc, const _Facet *, + bool = false) + { // get facet reference from locale -- retained, 2/3 arg versions + return use_facet<_Facet>(_Loc); + } + + // TEMPLATE FUNCTION _Getloctxt +template inline + int __cdecl _Getloctxt(_InIt& _First, _InIt& _Last, size_t _Numfields, + const _Elem *_Ptr) + { // find field at _Ptr that matches longest in [_First, _Last) + for (size_t _Off = 0; _Ptr[_Off] != (_Elem)0; ++_Off) + if (_Ptr[_Off] == _Ptr[0]) + ++_Numfields; // add fields with leading mark to initial count + string _Str(_Numfields, '\0'); // one column counter for each field + + int _Ans = -2; // no candidates so far + for (size_t _Column = 1; ; ++_Column, ++_First, _Ans = -1) + { // test each element against all viable fields + bool _Prefix = false; // seen at least one valid prefix + size_t _Off = 0; // offset into fields + size_t _Field = 0; // current field number + + for (; _Field < _Numfields; ++_Field) + { // test element at _Column in field _Field + for (; _Ptr[_Off] != (_Elem)0 && _Ptr[_Off] != _Ptr[0]; ++_Off) + ; // find beginning of field + + if (_Str[_Field] != '\0') + _Off += _Str[_Field]; // skip tested columns in field + else if (_Ptr[_Off += _Column] == _Ptr[0] + || _Ptr[_Off] == (_Elem)0) + { // matched all of field, save as possible answer + _Str[_Field] = (char)(_Column < 127 + ? _Column : 127); // save skip count if small enough + _Ans = (int)_Field; // save answer + } + else if (_First == _Last || _Ptr[_Off] != *_First) + _Str[_Field] = (char)(_Column < 127 + ? _Column : 127); // no match, just save skip count + else + _Prefix = true; // still a valid prefix + } + + if (!_Prefix || _First == _Last) + break; // no pending prefixes or no input, give up + } + return (_Ans); // return field number or negative value on failure + } + + // TEMPLATE FUNCTION _Maklocbyte +#define _MAKLOCBYTE(Elem, chr, cvt) \ + _Maklocbyte((_Elem)chr, cvt) /* convert Elem to char */ + +template inline + char __cdecl _Maklocbyte(_Elem _Char, + const _Locinfo::_Cvtvec&) + { // convert _Elem to char using _Cvtvec + return ((char)(unsigned char)_Char); + } + +template<> inline + char __cdecl _Maklocbyte(wchar_t _Char, + const _Locinfo::_Cvtvec& _Cvt) + { // convert wchar_t to char using _Cvtvec + char _Byte = '\0'; + _Mbstinit(_Mbst1); + _Wcrtomb(&_Byte, _Char, &_Mbst1, &_Cvt); + return (_Byte); + } + + + // TEMPLATE FUNCTION _Maklocchr +#define _MAKLOCCHR(Elem, chr, cvt) \ + _Maklocchr(chr, (Elem *)0, cvt) /* convert char to Elem */ + +template inline + _Elem __cdecl _Maklocchr(char _Byte, _Elem *, + const _Locinfo::_Cvtvec&) + { // convert char to _Elem using _Cvtvec + return ((_Elem)(unsigned char)_Byte); + } + +template<> inline + wchar_t __cdecl _Maklocchr(char _Byte, wchar_t *, + const _Locinfo::_Cvtvec& _Cvt) + { // convert char to wchar_t using _Cvtvec + wchar_t _Wc = L'\0'; + _Mbstinit(_Mbst1); + _Mbrtowc(&_Wc, &_Byte, 1, &_Mbst1, &_Cvt); + return (_Wc); + } + + + // TEMPLATE FUNCTION _Maklocstr +#define _MAKLOCSTR(_Elem, _Str, _Cvt) \ + _Maklocstr(_Str, (_Elem *)0, _Cvt) // convert C string to _Elem sequence + +template inline + _Elem *__cdecl _Maklocstr(const char *_Ptr, _Elem *, + const _Locinfo::_Cvtvec&) + { // convert C string to _Elem sequence using _Cvtvec + size_t _Count = ::strlen(_Ptr) + 1; + _Elem *_Ptrdest = _NEW_CRT _Elem[_Count]; + + for (_Elem *_Ptrnext = _Ptrdest; 0 < _Count; --_Count, ++_Ptrnext, ++_Ptr) + *_Ptrnext = (_Elem)(unsigned char)*_Ptr; + return (_Ptrdest); + } + +template<> inline + wchar_t *__cdecl _Maklocstr(const char *_Ptr, wchar_t *, + const _Locinfo::_Cvtvec& _Cvt) + { // convert C string to wchar_t sequence using _Cvtvec + size_t _Count, _Count1; + size_t _Wchars; + const char *_Ptr1; + int _Bytes; + wchar_t _Wc; + _Mbstinit(_Mbst1); + + _Count1 = ::strlen(_Ptr) + 1; + for (_Count = _Count1, _Wchars = 0, _Ptr1 = _Ptr; 0 < _Count; + _Count -= _Bytes, _Ptr1 += _Bytes, ++_Wchars) + if ((_Bytes = _Mbrtowc(&_Wc, _Ptr1, _Count, &_Mbst1, &_Cvt)) <= 0) + break; + ++_Wchars; // count terminating nul + + wchar_t *_Ptrdest = _NEW_CRT wchar_t[_Wchars]; + wchar_t *_Ptrnext = _Ptrdest; + _Mbstinit(_Mbst2); + for (; 0 < _Wchars; + _Count -= _Bytes, _Ptr += _Bytes, --_Wchars, ++_Ptrnext) + if ((_Bytes = _Mbrtowc(_Ptrnext, _Ptr, _Count1, &_Mbst2, &_Cvt)) <= 0) + break; + *_Ptrnext = L'\0'; + return (_Ptrdest); + } + + + // STRUCT codecvt_base +class _CRTIMP2 codecvt_base + : public locale::facet + { // base class for codecvt +public: + enum + { // constants for different parse states + ok, partial, error, noconv}; + typedef int result; + + codecvt_base(size_t _Refs = 0) + : locale::facet(_Refs) + { // default constructor + } + + bool always_noconv() const _THROW0() + { // return true if conversions never change input (from codecvt) + return (do_always_noconv()); + } + + int max_length() const _THROW0() + { // return maximum length required for a conversion (from codecvt) + return (do_max_length()); + } + + int encoding() const _THROW0() + { // return length of code sequence (from codecvt) + return (do_encoding()); + } + + ~codecvt_base() + { // destroy the object + } + +protected: + virtual bool do_always_noconv() const _THROW0() + { // return true if conversions never change input (from codecvt) + return (true); + } + + virtual int do_max_length() const _THROW0() + { // return maximum length required for a conversion (from codecvt) + return (1); + } + + virtual int do_encoding() const _THROW0() + { // return length of code sequence (from codecvt) + return (1); // -1 ==> state dependent, 0 ==> varying length + } + }; + + // TEMPLATE CLASS codecvt +template + class codecvt + : public codecvt_base + { // facet for converting between _Elem and char (_Byte) sequences +public: + typedef _Elem intern_type; + typedef _Byte extern_type; + typedef _Statype state_type; + + result in(_Statype& _State, + const _Byte *_First1, const _Byte *_Last1, const _Byte *& _Mid1, + _Elem *_First2, _Elem *_Last2, _Elem *& _Mid2) const + { // convert bytes [_First1, _Last1) to [_First2, _Last) + return (do_in(_State, + _First1, _Last1, _Mid1, _First2, _Last2, _Mid2)); + } + + result out(_Statype& _State, + const _Elem *_First1, const _Elem *_Last1, const _Elem *& _Mid1, + _Byte *_First2, _Byte *_Last2, _Byte *& _Mid2) const + { // convert [_First1, _Last1) to bytes [_First2, _Last2) + return (do_out(_State, + _First1, _Last1, _Mid1, _First2, _Last2, _Mid2)); + } + + result unshift(_Statype& _State, + _Byte *_First2, _Byte *_Last2, _Byte *& _Mid2) const + { // generate bytes to return to default shift state + return (do_unshift(_State, _First2, _Last2, _Mid2)); + } + + int length(const _Statype& _State, const _Byte *_First1, + const _Byte *_Last1, size_t _Count) const _THROW0() + { // return min(_Count, converted length of bytes [_First1, _Last1)) + return (do_length(_State, _First1, _Last1, _Count)); + } + + static locale::id id; // unique facet id + + explicit codecvt(size_t _Refs = 0) + : codecvt_base(_Refs) + { // construct from current locale + _Init(_Locinfo()); + } + + codecvt(const _Locinfo& _Lobj, size_t _Refs = 0) + : codecvt_base(_Refs) + { // construct from specified locale + _Init(_Lobj); + } + + static size_t __cdecl _Getcat(const locale::facet **_Ppf = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) + *_Ppf = _NEW_CRT codecvt<_Elem, _Byte, _Statype>; + return (_X_CTYPE); + } + +_PROTECTED: + virtual ~codecvt() + { // destroy the object + } + +protected: + void _Init(const _Locinfo& _Lobj) + { // initialize from _Lobj + } + + virtual result do_in(_Statype&, + const _Byte *_First1, const _Byte *, const _Byte *& _Mid1, + _Elem *_First2, _Elem *, _Elem *& _Mid2) const + { // convert bytes [_First1, _Last1) to [_First2, _Last) + _Mid1 = _First1, _Mid2 = _First2; + return (noconv); // convert nothing + } + + virtual result do_out(_Statype&, + const _Elem *_First1, const _Elem *, const _Elem *& _Mid1, + _Byte *_First2, _Byte *, _Byte *& _Mid2) const + { // convert [_First1, _Last1) to bytes [_First2, _Last) + _Mid1 = _First1, _Mid2 = _First2; + return (noconv); // convert nothing + } + + virtual result do_unshift(_Statype&, + _Byte *, _Byte *, _Byte *&) const + { // generate bytes to return to default shift state + return (noconv); // convert nothing + } + + virtual int do_length(const _Statype&, const _Byte *_First1, + const _Byte *_Last1, size_t _Count) const _THROW0() + { // return min(_Count, converted length of bytes [_First1, _Last1)) + return ((int)(_Count < (size_t)(_Last1 - _First1) + ? _Count : _Last1 - _First1)); // assume 1-to-1 conversion + } + }; + + // STATIC codecvt::id OBJECT +template + locale::id codecvt<_Elem, _Byte, _Statype>::id; + + // CLASS codecvt +template<> class _CRTIMP2 codecvt + : public codecvt_base + { // facet for converting between wchar_t and char (_Byte) sequences +public: + typedef wchar_t _Elem; + typedef char _Byte; + typedef mbstate_t _Statype; + typedef _Elem intern_type; + typedef _Byte extern_type; + typedef _Statype state_type; + + result in(_Statype& _State, + const _Byte *_First1, const _Byte *_Last1, const _Byte *& _Mid1, + _Elem *_First2, _Elem *_Last2, _Elem *& _Mid2) const + { // convert bytes [_First1, _Last1) to [_First2, _Last) + return (do_in(_State, + _First1, _Last1, _Mid1, _First2, _Last2, _Mid2)); + } + + result out(_Statype& _State, + const _Elem *_First1, const _Elem *_Last1, const _Elem *& _Mid1, + _Byte *_First2, _Byte *_Last2, _Byte *& _Mid2) const + { // convert [_First1, _Last1) to bytes [_First2, _Last) + return (do_out(_State, + _First1, _Last1, _Mid1, _First2, _Last2, _Mid2)); + } + + result unshift(_Statype& _State, + _Byte *_First2, _Byte *_Last2, _Byte *& _Mid2) const + { // generate bytes to return to default shift state + return (do_unshift(_State, + _First2, _Last2, _Mid2)); + } + + int length(const _Statype& _State, const _Byte *_First1, + const _Byte *_Last1, size_t _Count) const _THROW0() + { // return min(_Count, converted length of bytes [_First1, _Last1)) + return (do_length(_State, _First1, _Last1, _Count)); + } + + static locale::id id; // unique facet id + + explicit codecvt(size_t _Refs = 0) + : codecvt_base(_Refs) + { // construct from current locale + _Init(_Locinfo()); + } + + codecvt(const _Locinfo& _Lobj, size_t _Refs = 0) + : codecvt_base(_Refs) + { // construct from specified locale + _Init(_Lobj); + } + + static size_t __cdecl _Getcat(const locale::facet **_Ppf = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) + *_Ppf = _NEW_CRT codecvt<_Elem, _Byte, _Statype>; + return (_X_CTYPE); + } + +_PROTECTED: + virtual ~codecvt() + { // destroy the object + } + +protected: + void _Init(const _Locinfo& _Lobj) + { // initialize from _Lobj + _Cvt = _Lobj._Getcvt(); + } + + virtual result do_in(_Statype& _State, + const _Byte *_First1, const _Byte *_Last1, const _Byte *& _Mid1, + _Elem *_First2, _Elem *_Last2, _Elem *& _Mid2) const + { // convert bytes [_First1, _Last1) to [_First2, _Last) + _Mid1 = _First1, _Mid2 = _First2; + result _Ans = _Mid1 == _Last1 ? ok : partial; + int _Bytes; + + while (_Mid1 != _Last1 && _Mid2 != _Last2) + switch (_Bytes = _Mbrtowc(_Mid2, _Mid1, _Last1 - _Mid1, + &_State, &_Cvt)) + { // test result of locale-specific mbrtowc call + case -2: // partial conversion + _Mid1 = _Last1; + return (_Ans); + + case -1: // failed conversion + return (error); + + case 0: // may have converted null character + if (*_Mid2 == (_Elem)0) + _Bytes = (int)::strlen(_Mid1) + 1; + // fall through + + default: // converted _Bytes bytes to a wchar_t + _Mid1 += _Bytes, ++_Mid2, _Ans = ok; + } + return (_Ans); + } + + virtual result do_out(_Statype& _State, + const _Elem *_First1, const _Elem *_Last1, const _Elem *& _Mid1, + _Byte *_First2, _Byte *_Last2, _Byte *& _Mid2) const + { // convert [_First1, _Last1) to bytes [_First2, _Last) + _Mid1 = _First1, _Mid2 = _First2; + result _Ans = _Mid1 == _Last1 ? ok : partial; + int _Bytes; + + while (_Mid1 != _Last1 && _Mid2 != _Last2) + if (___mb_cur_max_func() <= _Last2 - _Mid2) + if ((_Bytes = _Wcrtomb(_Mid2, *_Mid1, + &_State, &_Cvt)) < 0) + return (error); // locale-specific wcrtomb failed + else + ++_Mid1, _Mid2 += _Bytes, _Ans = ok; + else + { // destination too small, convert into buffer + _Byte _Buf[MB_LEN_MAX]; + _Statype _Stsave = _State; + + if ((_Bytes = _Wcrtomb(_Buf, *_Mid1, + &_State, &_Cvt)) < 0) + return (error); // locale-specific wcrtomb failed + else if (_Last2 - _Mid2 < _Bytes) + { // converted too many, roll back and return previous + _State = _Stsave; + return (_Ans); + } + else + { // copy converted bytes from buffer + ::memcpy(_Mid2, _Buf, _Bytes); + ++_Mid1, _Mid2 += _Bytes, _Ans = ok; + } + } + return (_Ans); + } + + virtual result do_unshift(_Statype& _State, + _Byte *_First2, _Byte *_Last2, _Byte *& _Mid2) const + { // generate bytes to return to default shift state + _Mid2 = _First2; + result _Ans = ok; + int _Bytes; + _Byte _Buf[MB_LEN_MAX]; + _Statype _Stsave = _State; + + if ((_Bytes = _Wcrtomb(_Buf, L'\0', &_State, &_Cvt)) <= 0) + _Ans = error; // locale-specific wcrtomb failed + else if (_Last2 - _Mid2 < --_Bytes) + { // converted too many, roll back and return + _State = _Stsave; + _Ans = partial; + } + else if (0 < _Bytes) + { // copy converted bytes from buffer + ::memcpy(_Mid2, _Buf, _Bytes); + _Mid2 += _Bytes; + } + return (_Ans); + } + + virtual int do_length(const _Statype& _State, + const _Byte *_First1, const _Byte *_Last1, + size_t _Count) const _THROW0() + { // return min(_Count, converted length of bytes [_First1, _Last1)) + int _Wchars; + const _Byte *_Mid1; + _Statype _Mystate = _State; + + for (_Wchars = 0, _Mid1 = _First1; + (size_t)_Wchars < _Count && _Mid1 != _Last1; ) + { // convert another wchar_t + int _Bytes; + _Elem _Ch; + + switch (_Bytes = _Mbrtowc(&_Ch, _Mid1, _Last1 - _Mid1, + &_Mystate, &_Cvt)) + { // test result of locale-specific mbrtowc call + case -2: // partial conversion + return (_Wchars); + + case -1: // failed conversion + return (_Wchars); + + case 0: // may have converted null character + if (_Ch == (_Elem)0) + _Bytes = (int)::strlen(_Mid1) + 1; + // fall through + + default: // converted _Bytes bytes to a wchar_t + _Mid1 += _Bytes, ++_Wchars; + } + } + return (_Wchars); + } + + virtual bool do_always_noconv() const _THROW0() + { // return true if conversions never change input + return (false); + } + + virtual int do_max_length() const _THROW0() + { // return maximum length required for a conversion (from codecvt) + return (MB_LEN_MAX); + } + + virtual int do_encoding() const _THROW0() + { // return length of code sequence (from codecvt) + return (0); + } + +private: + _Locinfo::_Cvtvec _Cvt; // locale info passed to _Mbrtowc, _Wcrtomb + }; + + + // TEMPLATE CLASS codecvt_byname +template + class codecvt_byname + : public codecvt<_Elem, _Byte, _Statype> + { // codecvt for named locale +public: + explicit codecvt_byname(const char *_Locname, size_t _Refs = 0) + : codecvt<_Elem, _Byte, _Statype>(_Locinfo(_Locname), _Refs) + { // construct for named locale + } + +_PROTECTED: + virtual ~codecvt_byname() + { // destroy the object + } + }; + + // STRUCT ctype_base +struct _CRTIMP2 ctype_base + : public locale::facet + { // base for ctype + enum + { // constants for character classifications + alnum = _DI|_LO|_UP|_XA, alpha = _LO|_UP|_XA, + cntrl = _BB, digit = _DI, graph = _DI|_LO|_PU|_UP|_XA, + lower = _LO, print = _DI|_LO|_PU|_SP|_UP|_XA|_XD, + punct = _PU, space = _CN|_SP|_XS, upper = _UP, + xdigit = _XD}; + typedef short mask; // to match + + ctype_base(size_t _Refs = 0) + : locale::facet(_Refs) + { // default constructor + } + + ~ctype_base() + { // destroy the object + } + }; + + // TEMPLATE CLASS ctype +template + class ctype + : public ctype_base + { // facet for classifying elements, converting cases +public: + typedef _Elem char_type; + + bool is(mask _Maskval, _Elem _Ch) const + { // test if element fits any mask classifications + return (do_is(_Maskval, _Ch)); + } + + const _Elem *is(const _Elem *_First, const _Elem *_Last, + mask *_Dest) const + { // get mask sequence for elements in [_First, _Last) + return (do_is(_First, _Last, _Dest)); + } + + const _Elem *scan_is(mask _Maskval, const _Elem *_First, + const _Elem *_Last) const + { // find first in [_First, _Last) that fits mask classification + return (do_scan_is(_Maskval, _First, _Last)); + } + + const _Elem *scan_not(mask _Maskval, const _Elem *_First, + const _Elem *_Last) const + { // find first in [_First, _Last) not fitting mask classification + return (do_scan_not(_Maskval, _First, _Last)); + } + + _Elem tolower(_Elem _Ch) const + { // convert element to lower case + return (do_tolower(_Ch)); + } + + const _Elem *tolower(_Elem *_First, const _Elem *_Last) const + { // convert [_First, _Last) in place to lower case + return (do_tolower(_First, _Last)); + } + + _Elem toupper(_Elem _Ch) const + { // convert element to upper case + return (do_toupper(_Ch)); + } + + const _Elem *toupper(_Elem *_First, const _Elem *_Last) const + { // convert [_First, _Last) in place to upper case + return (do_toupper(_First, _Last)); + } + + _Elem widen(char _Byte) const + { // widen char + return (do_widen(_Byte)); + } + + const char *widen(const char *_First, const char *_Last, + _Elem *_Dest) const + { // widen chars in [_First, _Last) + return (do_widen(_First, _Last, _Dest)); + } + + char narrow(_Elem _Ch, char _Dflt = '\0') const + { // narrow element to char + return (do_narrow(_Ch, _Dflt)); + } + + const _Elem *narrow(const _Elem *_First, const _Elem *_Last, + char _Dflt, char *_Dest) const + { // narrow elements in [_First, _Last) to chars + return (do_narrow(_First, _Last, _Dflt, _Dest)); + } + + static locale::id id; // unique facet id + + explicit ctype(size_t _Refs = 0) + : ctype_base(_Refs) + { // construct from current locale + _Init(_Locinfo()); + } + + ctype(const _Locinfo& _Lobj, size_t _Refs = 0) + : ctype_base(_Refs) + { // construct from specified locale + _Init(_Lobj); + } + + static size_t __cdecl _Getcat(const locale::facet **_Ppf = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) + *_Ppf = _NEW_CRT ctype<_Elem>; + return (_X_CTYPE); + } + +_PROTECTED: + virtual ~ctype() + { // destroy the object + if (_Ctype._Delfl) + free((void *)_Ctype._Table); + } + +protected: + void _Init(const _Locinfo& _Lobj) + { // initialize from _Lobj + _Ctype = _Lobj._Getctype(); + } + + virtual bool do_is(mask _Maskval, _Elem _Ch) const + { // test if element fits any mask classifications + return ((_Ctype._Table[(unsigned char)narrow(_Ch)] + & _Maskval) != 0); + } + + virtual const _Elem *do_is(const _Elem *_First, const _Elem *_Last, + mask *_Dest) const + { // get mask sequence for elements in [_First, _Last) + for (; _First != _Last; ++_First, ++_Dest) + *_Dest = _Ctype._Table[(unsigned char)narrow(*_First)]; + return (_First); + } + + virtual const _Elem *do_scan_is(mask _Maskval, + const _Elem *_First, const _Elem *_Last) const + { // find first in [_First, _Last) that fits mask classification + for (; _First != _Last && !is(_Maskval, *_First); ++_First) + ; + return (_First); + } + + virtual const _Elem *do_scan_not(mask _Maskval, + const _Elem *_First, const _Elem *_Last) const + { // find first in [_First, _Last) not fitting mask classification + for (; _First != _Last && is(_Maskval, *_First); ++_First) + ; + return (_First); + } + + virtual _Elem do_tolower(_Elem _Ch) const + { // convert element to lower case + unsigned char _Byte = (unsigned char)narrow(_Ch, '\0'); + if (_Byte == '\0') + return (_Ch); + else + return (widen((char)_Tolower(_Byte, &_Ctype))); + } + + virtual const _Elem *do_tolower(_Elem *_First, const _Elem *_Last) const + { // convert [_First, _Last) in place to lower case + for (; _First != _Last; ++_First) + { // convert *_First to lower case + unsigned char _Byte = (unsigned char)narrow(*_First, '\0'); + if (_Byte != '\0') + *_First = (widen((char)_Tolower(_Byte, &_Ctype))); + } + return ((const _Elem *)_First); + } + + virtual _Elem do_toupper(_Elem _Ch) const + { // convert element to upper case + unsigned char _Byte = (unsigned char)narrow(_Ch, '\0'); + if (_Byte == '\0') + return (_Ch); + else + return (widen((char)_Toupper(_Byte, &_Ctype))); + } + + virtual const _Elem *do_toupper(_Elem *_First, const _Elem *_Last) const + { // convert [_First, _Last) in place to upper case + for (; _First != _Last; ++_First) + { // convert *_First to upper case + unsigned char _Byte = (unsigned char)narrow(*_First, '\0'); + if (_Byte != '\0') + *_First = (widen((char)_Toupper(_Byte, &_Ctype))); + } + return ((const _Elem *)_First); + } + + virtual _Elem do_widen(char _Byte) const + { // widen char + return (_MAKLOCCHR(_Elem, _Byte, _Cvt)); + } + + virtual const char *do_widen(const char *_First, + const char *_Last, _Elem *_Dest) const + { // widen chars in [_First, _Last) + for (; _First != _Last; ++_First, ++_Dest) + *_Dest = _MAKLOCCHR(_Elem, *_First, _Cvt); + return (_First); + } + + char _Donarrow(_Elem _Ch, char _Dflt) const + { // narrow element to char + char _Byte; + if (_Ch == (_Elem)0) + return ('\0'); + else if ((_Byte = _MAKLOCBYTE(_Elem, _Ch, _Cvt)) == '\0') + return (_Dflt); + else + return (_Byte); + } + + virtual char do_narrow(_Elem _Ch, char _Dflt) const + { // narrow element to char + return (_Donarrow(_Ch, _Dflt)); + } + + virtual const _Elem *do_narrow(const _Elem *_First, + const _Elem *_Last, char _Dflt, char *_Dest) const + { // narrow elements in [_First, _Last) to chars + for (; _First != _Last; ++_First, ++_Dest) + *_Dest = _Donarrow(*_First, _Dflt); + return (_First); + } + +private: + _Locinfo::_Ctypevec _Ctype; // locale info passed to _Tolower, etc. + _Locinfo::_Cvtvec _Cvt; // conversion information + }; + + // STATIC ctype::id OBJECT +template + locale::id ctype<_Elem>::id; + + // CLASS ctype +template<> class _CRTIMP2 ctype + : public ctype_base + { // facet for classifying char elements, converting cases + typedef ctype _Myt; + +public: + typedef char _Elem; + typedef _Elem char_type; + + bool is(mask _Maskval, _Elem _Ch) const + { // test if element fits any mask classifications + return ((_Ctype._Table[(unsigned char)_Ch] & _Maskval) != 0); + } + + const _Elem *is(const _Elem *_First, + const _Elem *_Last, mask *_Dest) const + { // get mask sequence for elements in [_First, _Last) + for (; _First != _Last; ++_First, ++_Dest) + *_Dest = _Ctype._Table[(unsigned char)*_First]; + return (_First); + } + + const _Elem *scan_is(mask _Maskval, + const _Elem *_First, const _Elem *_Last) const + { // find first in [_First, _Last) that fits mask classification + for (; _First != _Last && !is(_Maskval, *_First); ++_First) + ; + return (_First); + } + + const _Elem *scan_not(mask _Maskval, + const _Elem *_First, const _Elem *_Last) const + { // find first in [_First, _Last) not fitting mask classification + for (; _First != _Last && is(_Maskval, *_First); ++_First) + ; + return (_First); + } + + _Elem tolower(_Elem _Ch) const + { // convert element to lower case + return (do_tolower(_Ch)); + } + + const _Elem *tolower(_Elem *_First, const _Elem *_Last) const + { // convert [_First, _Last) in place to lower case + return (do_tolower(_First, _Last)); + } + + _Elem toupper(_Elem _Ch) const + { // convert element to upper case + return (do_toupper(_Ch)); + } + + const _Elem *toupper(_Elem *_First, const _Elem *_Last) const + { // convert [_First, _Last) in place to upper case + return (do_toupper(_First, _Last)); + } + + _Elem widen(char _Byte) const + { // widen char + return (do_widen(_Byte)); + } + + const _Elem *widen(const char *_First, const char *_Last, + _Elem *_Dest) const + { // widen chars in [_First, _Last) + return (do_widen(_First, _Last, _Dest)); + } + + _Elem narrow(_Elem _Ch, char _Dflt = '\0') const + { // narrow element to char + return (do_narrow(_Ch, _Dflt)); + } + + const _Elem *narrow(const _Elem *_First, const _Elem *_Last, + char _Dflt, char *_Dest) const + { // narrow elements in [_First, _Last) to chars + return (do_narrow(_First, _Last, _Dflt, _Dest)); + } + + static locale::id id; // unique facet id + + explicit ctype(const mask *_Table = 0, + bool _Deletetable = false, + size_t _Refs = 0) + : ctype_base(_Refs) + { // construct with specified table and delete flag for table + _Init(_Locinfo()); + if (_Table != 0) + { // replace existing char to mask table + _Tidy(); + _Ctype._Table = _Table; + _Ctype._Delfl = _Deletetable ? -1 : 0; + } + } + + ctype(const _Locinfo& _Lobj, size_t _Refs = 0) + : ctype_base(_Refs) + { // construct from current locale + _Init(_Lobj); + } + + static size_t __cdecl _Getcat(const locale::facet **_Ppf = 0) + { // construct from specified locale + if (_Ppf != 0 && *_Ppf == 0) + *_Ppf = _NEW_CRT ctype<_Elem>; + return (_X_CTYPE); + } + + static const size_t table_size; // size of _Ctype._Table (char to mask) + +_PROTECTED: + virtual ~ctype() + { // destroy the object + _Tidy(); + } + +protected: + void _Init(const _Locinfo& _Lobj) + { // initialize from _Lobj + _Ctype = _Lobj._Getctype(); + } + + void _Tidy() + { // free any allocated storage + if (0 < _Ctype._Delfl) + free((void *)_Ctype._Table); + else if (_Ctype._Delfl < 0) + delete[] (void *)_Ctype._Table; + } + + virtual _Elem do_tolower(_Elem _Ch) const + { // convert element to lower case + return ((_Elem)_Tolower((unsigned char)_Ch, &_Ctype)); + } + + virtual const _Elem *do_tolower(_Elem *_First, + const _Elem *_Last) const + { // convert [_First, _Last) in place to lower case + for (; _First != _Last; ++_First) + *_First = (_Elem)_Tolower((unsigned char)*_First, &_Ctype); + return ((const _Elem *)_First); + } + + virtual _Elem do_toupper(_Elem _Ch) const + { // convert element to upper case + return ((_Elem)_Toupper((unsigned char)_Ch, &_Ctype)); + } + + virtual const _Elem *do_toupper(_Elem *_First, + const _Elem *_Last) const + { // convert [_First, _Last) in place to upper case + for (; _First != _Last; ++_First) + *_First = (_Elem)_Toupper((unsigned char)*_First, &_Ctype); + return ((const _Elem *)_First); + } + + virtual _Elem do_widen(char _Byte) const + { // widen char + return (_Byte); + } + + virtual const _Elem *do_widen(const char *_First, + const char *_Last, _Elem *_Dest) const + { // widen chars in [_First, _Last) + ::memcpy(_Dest, _First, _Last - _First); + return (_Last); + } + + virtual _Elem do_narrow(_Elem _Ch, char) const + { // narrow char + return (_Ch); + } + + virtual const _Elem *do_narrow(const _Elem *_First, + const _Elem *_Last, char, char *_Dest) const + { // narrow elements in [_First, _Last) to chars + ::memcpy(_Dest, _First, _Last - _First); + return (_Last); + } + + const mask *table() const _THROW0() + { // return address of char to mask table + return (_Ctype._Table); + } + + static const mask *__cdecl classic_table() _THROW0() + { // return address of char to mask table for "C" locale + const _Myt& _Ctype_fac = _USE(locale::classic(), _Myt); + return (_Ctype_fac.table()); + } + +private: + _Locinfo::_Ctypevec _Ctype; // information + }; + + // CLASS ctype +template<> class _CRTIMP2 ctype + : public ctype_base + { // facet for classifying wchar_t elements, converting cases + typedef ctype _Myt; + +public: + typedef wchar_t _Elem; + typedef _Elem char_type; + + bool is(mask _Maskval, _Elem _Ch) const + { // test if element fits any mask classifications + return (do_is(_Maskval, _Ch)); + } + + const _Elem *is(const _Elem *_First, const _Elem *_Last, + mask *_Dest) const + { // get mask sequence for elements in [_First, _Last) + return (do_is(_First, _Last, _Dest)); + } + + const _Elem *scan_is(mask _Maskval, const _Elem *_First, + const _Elem *_Last) const + { // find first in [_First, _Last) that fits mask classification + return (do_scan_is(_Maskval, _First, _Last)); + } + + const _Elem *scan_not(mask _Maskval, const _Elem *_First, + const _Elem *_Last) const + { // find first in [_First, _Last) not fitting mask classification + return (do_scan_not(_Maskval, _First, _Last)); + } + + _Elem tolower(_Elem _Ch) const + { // convert element to lower case + return (do_tolower(_Ch)); + } + + const _Elem *tolower(_Elem *_First, const _Elem *_Last) const + { // convert [_First, _Last) in place to lower case + return (do_tolower(_First, _Last)); + } + + _Elem toupper(_Elem _Ch) const + { // convert element to upper case + return (do_toupper(_Ch)); + } + + const _Elem *toupper(_Elem *_First, const _Elem *_Last) const + { // convert [_First, _Last) in place to upper case + return (do_toupper(_First, _Last)); + } + + _Elem widen(char _Byte) const + { // widen char + return (do_widen(_Byte)); + } + + const char *widen(const char *_First, const char *_Last, + _Elem *_Dest) const + { // widen chars in [_First, _Last) + return (do_widen(_First, _Last, _Dest)); + } + + char narrow(_Elem _Ch, char _Dflt = '\0') const + { // narrow element to char + return (do_narrow(_Ch, _Dflt)); + } + + const _Elem *narrow(const _Elem *_First, const _Elem *_Last, + char _Dflt, char *_Dest) const + { // narrow elements in [_First, _Last) to chars + return (do_narrow(_First, _Last, _Dflt, _Dest)); + } + + static locale::id id; // unique facet id + + explicit ctype(size_t _Refs = 0) + : ctype_base(_Refs) + { // construct from current locale + _Init(_Locinfo()); + } + + ctype(const _Locinfo& _Lobj, size_t _Refs = 0) + : ctype_base(_Refs) + { // construct from specified locale + _Init(_Lobj); + } + + static size_t __cdecl _Getcat(const locale::facet **_Ppf = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) + *_Ppf = _NEW_CRT ctype<_Elem>; + return (_X_CTYPE); + } + +_PROTECTED: + virtual ~ctype() + { // destroy the object + if (_Ctype._Delfl) + free((void *)_Ctype._Table); + } + +protected: + void _Init(const _Locinfo& _Lobj) + { // initialize from _Lobj + _Ctype = _Lobj._Getctype(); + _Cvt = _Lobj._Getcvt(); + } + + virtual bool do_is(mask _Maskval, _Elem _Ch) const + { // test if element fits any mask classifications + return ((::_Getwctype(_Ch, &_Ctype) & _Maskval) != 0); + } + + virtual const wchar_t *do_is(const _Elem *_First, const _Elem *_Last, + mask *_Dest) const + { // get mask sequence for elements in [_First, _Last) + return (::_Getwctypes(_First, _Last, _Dest, &_Ctype)); + } + + virtual const _Elem *do_scan_is(mask _Maskval, + const _Elem *_First, const _Elem *_Last) const + { // find first in [_First, _Last) that fits mask classification + for (; _First != _Last && !is(_Maskval, *_First); ++_First) + ; + return (_First); + } + + virtual const _Elem *do_scan_not(mask _Maskval, + const _Elem *_First, const _Elem *_Last) const + { // find first in [_First, _Last) not fitting mask classification + for (; _First != _Last && is(_Maskval, *_First); ++_First) + ; + return (_First); + } + + virtual _Elem do_tolower(_Elem _Ch) const + { // convert element to lower case + return (_Towlower(_Ch, &_Ctype)); + } + + virtual const _Elem *do_tolower(_Elem *_First, + const _Elem *_Last) const + { // convert [_First, _Last) in place to lower case + for (; _First != _Last; ++_First) + *_First = _Towlower(*_First, &_Ctype); + return ((const _Elem *)_First); + } + + virtual _Elem do_toupper(_Elem _Ch) const + { // convert element to upper case + return (_Towupper(_Ch, &_Ctype)); + } + + virtual const _Elem *do_toupper(_Elem *_First, + const _Elem *_Last) const + { // convert [_First, _Last) in place to upper case + for (; _First != _Last; ++_First) + *_First = _Towupper(*_First, &_Ctype); + return ((const _Elem *)_First); + } + + _Elem _Dowiden(char _Byte) const + { // widen char + _Mbstinit(_Mbst); + wchar_t _Wc; + return (_Mbrtowc(&_Wc, &_Byte, 1, &_Mbst, &_Cvt) <= 0 + ? (wchar_t)WEOF : _Wc); + } + + virtual _Elem do_widen(char _Byte) const + { // widen char + return (_Dowiden(_Byte)); + } + + virtual const char *do_widen(const char *_First, + const char *_Last, _Elem *_Dest) const + { // widen chars in [_First, _Last) + for (; _First != _Last; ++_First, ++_Dest) + *_Dest = _Dowiden(*_First); + return (_First); + } + + char _Donarrow(_Elem _Ch, char _Dflt) const + { // narrow element to char + char _Buf[MB_LEN_MAX]; + _Mbstinit(_Mbst); + return (_Wcrtomb(_Buf, _Ch, &_Mbst, &_Cvt) != 1 + ? _Dflt : _Buf[0]); + } + + virtual char do_narrow(_Elem _Ch, char _Dflt) const + { // narrow element to char + return (_Donarrow(_Ch, _Dflt)); + } + + virtual const _Elem *do_narrow(const _Elem *_First, + const _Elem *_Last, char _Dflt, char *_Dest) const + { // narrow elements in [_First, _Last) to chars + for (; _First != _Last; ++_First, ++_Dest) + *_Dest = _Donarrow(*_First, _Dflt); + return (_First); + } + +private: + _Locinfo::_Ctypevec _Ctype; // locale info passed to _Tolower, etc. + _Locinfo::_Cvtvec _Cvt; // conversion information + }; + + + // TEMPLATE CLASS ctype_byname +template + class ctype_byname + : public ctype<_Elem> + { // ctype for named locale +public: + explicit ctype_byname(const char *_Locname, size_t _Refs = 0) + : ctype<_Elem>(_Locinfo(_Locname), _Refs) + { // construct from named locale + } + +_PROTECTED: + virtual ~ctype_byname() + { // destroy the object + } + }; + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 codecvt; + + #endif /* _DLL_CPPLIB */ +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _XLOCALE_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocinfo b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocinfo new file mode 100644 index 00000000..e72a18d1 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocinfo @@ -0,0 +1,212 @@ +// xlocinfo internal header for Microsoft +#pragma once +#ifndef _XLOCINFO_ +#define _XLOCINFO_ +#include +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // CLASS _Timevec +class _CRTIMP2 _Timevec + { // smart pointer to information used by _Strftime +public: + _Timevec(void *_Ptr = 0) + : _Timeptr(_Ptr) + { // construct from ptr + } + + _Timevec(const _Timevec& _Right) + { // construct from _Right + *this = _Right; + } + + ~_Timevec() + { // destroy the object + free(_Timeptr); + } + + _Timevec& operator=(const _Timevec& _Right) + { // transfer ownership of _Timeptr from _Right + _Timeptr = _Right._Timeptr; + ((_Timevec *)&_Right)->_Timeptr = 0; + return (*this); + } + + void *_Getptr() const + { // return pointer to time information + return (_Timeptr); + } + +private: + void *_Timeptr; // pointer to time information + }; + + // CLASS _Locinfo +class _CRTIMP2 _Locinfo + { // summary of all stuff peculiar to a locale used by standard facets +public: + typedef ::_Collvec _Collvec; + typedef ::_Ctypevec _Ctypevec; + typedef ::_Cvtvec _Cvtvec; + typedef std::_Timevec _Timevec; + + _Locinfo(const char * = "C"); // construct from named locale + + _Locinfo(int, const char *); // construct from category + + ~_Locinfo(); // destroy the object + + _Locinfo& _Addcats(int, const char *); // add stuff for a category + + string _Getname() const + { // return the new locale name + return (_Newlocname); + } + + _Collvec _Getcoll() const + { // return collation stuff + return (::_Getcoll()); + } + + _Ctypevec _Getctype() const + { // return ctype stuff + return (::_Getctype()); + } + + _Cvtvec _Getcvt() const + { // return codecvt stuff + return (::_Getcvt()); + } + + const lconv *_Getlconv() const + { // return localeconv stuff + return (localeconv()); + } + + _Timevec _Gettnames() const + { // return names used by _Strftime + return (_Timevec(::_Gettnames())); + } + + const char *_Getdays() const + { // return names for weekdays + const char *_Ptr = ::_Getdays(); + if (_Ptr != 0) + { // capture names and free allocated C string + ((_Locinfo *)this)->_Days = _Ptr; + free((void *)_Ptr); + } + return (_Days.size() != 0 ? _Days.c_str() + : ":Sun:Sunday:Mon:Monday:Tue:Tuesday:Wed:Wednesday" + ":Thu:Thursday:Fri:Friday:Sat:Saturday"); + } + + const char *_Getmonths() const + { // return names for months + const char *_Ptr = ::_Getmonths(); + if (_Ptr != 0) + { // capture names and free allocated C string + ((_Locinfo *)this)->_Months = _Ptr; + free((void *)_Ptr); + } + return (_Months.size() != 0 ? _Months.c_str() + : ":Jan:January:Feb:February:Mar:March" + ":Apr:April:May:May:Jun:June" + ":Jul:July:Aug:August:Sep:September" + ":Oct:October:Nov:November:Dec:December"); + } + + const char *_Getfalse() const + { // return false name (no C source) + return ("false"); + } + + const char *_Gettrue() const + { // return true name (no C source) + return ("true"); + } + + int _Getdateorder() const + { // return date order + return ::_Getdateorder(); + } + +private: + _Lockit _Lock; // thread lock, because global locale is altered + string _Days; // weekday names + string _Months; // month names + string _Oldlocname; // old locale name to revert to on destruction + string _Newlocname; // new locale name for this object + }; + + // TEMPLATE FUNCTION _LStrcoll +template inline + int __cdecl _LStrcoll(const _Elem *_First1, const _Elem *_Last1, + const _Elem *_First2, const _Elem *_Last2, + const _Locinfo::_Collvec *) + { // perform locale-specific comparison of _Elem sequences + for (; _First1 != _Last1 && _First2 != _Last2; ++_First1, ++_First2) + if (*_First1 < *_First2) + return (-1); // [_First1, _Last1) < [_First2, _Last2) + else if (*_First2 < *_First1) + return (+1); // [_First1, _Last1) > [_First2, _Last2) + return (_First2 != _Last2 ? -1 : _First1 != _Last1 ? +1 : 0); + } + +template<> inline + int __cdecl _LStrcoll(const char *_First1, const char *_Last1, + const char *_First2, const char *_Last2, + const _Locinfo::_Collvec *_Vector) + { // perform locale-specific comparison of char sequences + return (_Strcoll(_First1, _Last1, _First2, _Last2, _Vector)); + } + +template<> inline + int __cdecl _LStrcoll(const wchar_t *_First1, const wchar_t *_Last1, + const wchar_t *_First2, const wchar_t *_Last2, + const _Locinfo::_Collvec *_Vector) + { // perform locale-specific comparison of wchar_t sequences + return (_Wcscoll(_First1, _Last1, _First2, _Last2, _Vector)); + } + + // TEMPLATE FUNCTION _LStrxfrm +template inline + size_t __cdecl _LStrxfrm(_Elem *_First1, _Elem *_Last1, + const _Elem *_First2, const _Elem *_Last2, + const _Locinfo::_Collvec *) + { // perform locale-specific transform of _Elems [_First1, _Last1) + size_t _Count = _Last2 - _First2; + if (_Count <= (size_t)(_Last1 - _First1)) + memcpy(_First1, _First2, _Count * sizeof (_Elem)); + return (_Count); + } + +template<> inline + size_t __cdecl _LStrxfrm(char *_First1, char *_Last1, + const char *_First2, const char *_Last2, + const _Locinfo::_Collvec *_Vector) + { // perform locale-specific transform of chars [_First1, _Last1) + return (_Strxfrm(_First1, _Last1, _First2, _Last2, _Vector)); + } + +template<> inline + size_t __cdecl _LStrxfrm(wchar_t *_First1, wchar_t *_Last1, + const wchar_t *_First2, const wchar_t *_Last2, + const _Locinfo::_Collvec *_Vector) + { // perform locale-specific transform of wchar_ts [_First1, _Last1) + return (_Wcsxfrm(_First1, _Last1, _First2, _Last2, _Vector)); + } +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _XLOCINFO_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocinfo.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocinfo.h new file mode 100644 index 00000000..c48db017 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocinfo.h @@ -0,0 +1,109 @@ +/* xlocinfo.h internal header for Microsoft C */ +#pragma once +#ifndef _XLOCINFO +#define _XLOCINFO +#include +#include +#include +#ifndef _YVALS + #include +#endif + +_C_STD_BEGIN +_C_LIB_DECL + + /* SUPPLEMENTAL CTYPE MACROS & DECLARATIONS */ +#define _XA 0x100 /* extra alphabetic */ +#define _XS 0x000 /* extra space */ +#define _BB _CONTROL /* BEL, BS, etc. */ +#define _CN _SPACE /* CR, FF, HT, NL, VT */ +#define _DI _DIGIT /* '0'-'9' */ +#define _LO _LOWER /* 'a'-'z' */ +#define _PU _PUNCT /* punctuation */ +#define _SP _BLANK /* space */ +#define _UP _UPPER /* 'A'-'Z' */ +#define _XD _HEX /* '0'-'9', 'A'-'F', 'a'-'f' */ + + /* SUPPLEMENTAL LOCALE MACROS AND DECLARATIONS */ +#define _X_ALL LC_ALL +#define _X_COLLATE LC_COLLATE +#define _X_CTYPE LC_CTYPE +#define _X_MONETARY LC_MONETARY +#define _X_NUMERIC LC_NUMERIC +#define _X_TIME LC_TIME +#define _X_MAX LC_MAX +#define _X_MESSAGE 6 +#define _NCAT 7 + +#define _CATMASK(n) ((1 << (n)) >> 1) +#define _M_COLLATE _CATMASK(_X_COLLATE) +#define _M_CTYPE _CATMASK(_X_CTYPE) +#define _M_MONETARY _CATMASK(_X_MONETARY) +#define _M_NUMERIC _CATMASK(_X_NUMERIC) +#define _M_TIME _CATMASK(_X_TIME) +#define _M_MESSAGE _CATMASK(_X_MESSAGE) +#define _M_ALL (_CATMASK(_NCAT) - 1) + +typedef struct _Collvec + { /* stuff needed by _Strcoll, etc. */ + unsigned long _Hand; // LCID + unsigned int _Page; // UINT + } _Collvec; + +typedef struct _Ctypevec + { /* stuff needed by _Tolower, etc. */ + unsigned long _Hand; // LCID + unsigned int _Page; // UINT + const short *_Table; + int _Delfl; + } _Ctypevec; + +typedef struct _Cvtvec + { /* stuff needed by _Mbrtowc, etc. */ + unsigned long _Hand; // LCID + unsigned int _Page; // UINT + } _Cvtvec; + + /* FUNCTION DECLARATIONS */ +_CRTIMP2 _Collvec __cdecl _Getcoll(); +_CRTIMP2 _Ctypevec __cdecl _Getctype(); +_CRTIMP2 _Cvtvec __cdecl _Getcvt(); + +_CRTIMP2 int __cdecl _Getdateorder(); +_CRTIMP2 char *__cdecl _Getdays(); +_CRTIMP2 char *__cdecl _Getmonths(); +_CRTIMP2 void *__cdecl _Gettnames(); + +_CRTIMP2 int __cdecl _Mbrtowc(wchar_t *, const char *, size_t, + mbstate_t *, const _Cvtvec *); +_CRTIMP2 float __cdecl _Stof(const char *, char **, long); +_CRTIMP2 double __cdecl _Stod(const char *, char **, long); +_CRTIMP2 long double __cdecl _Stold(const char *, char **, long); +_CRTIMP2 int __cdecl _Strcoll(const char *, const char *, + const char *, const char *, const _Collvec *); +_CRTIMP2 size_t __cdecl _Strftime(char *, size_t, const char *, + const struct tm *, void *); +_CRTIMP2 size_t __cdecl _Strxfrm(char *, char *, + const char *, const char *, const _Collvec *); +_CRTIMP2 int __cdecl _Tolower(int, const _Ctypevec *); +_CRTIMP2 int __cdecl _Toupper(int, const _Ctypevec *); +_CRTIMP2 int __cdecl _Wcrtomb(char *, wchar_t, mbstate_t *, + const _Cvtvec *); +_CRTIMP2 int __cdecl _Wcscoll(const wchar_t *, const wchar_t *, + const wchar_t *, const wchar_t *, const _Collvec *); +_CRTIMP2 size_t __cdecl _Wcsxfrm(wchar_t *, wchar_t *, + const wchar_t *, const wchar_t *, const _Collvec *); + +_CRTIMP2 short __cdecl _Getwctype(wchar_t, const _Ctypevec *); +_CRTIMP2 const wchar_t * __cdecl _Getwctypes(const wchar_t *, const wchar_t *, + short*, const _Ctypevec*); +_CRTIMP2 wchar_t __cdecl _Towlower(wchar_t, const _Ctypevec *); +_CRTIMP2 wchar_t __cdecl _Towupper(wchar_t, const _Ctypevec *); +_END_C_LIB_DECL +_C_STD_END +#endif /* _XLOCINFO */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocmes b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocmes new file mode 100644 index 00000000..20f560cd --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocmes @@ -0,0 +1,129 @@ +// xlocmes internal header (from ) +#pragma once +#ifndef _XLOCMES_ +#define _XLOCMES_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // STRUCT messages_base +struct _CRTIMP2 messages_base + : public locale::facet + { // base class for messages + typedef int catalog; + + explicit messages_base(size_t _Refs = 0) + : locale::facet(_Refs) + { // default constructor + } + }; + + // TEMPLATE CLASS messages +template + class messages + : public messages_base + { // facet for obtaining messages from a catalog +public: + typedef _Elem char_type; + typedef basic_string<_Elem, char_traits<_Elem>, allocator<_Elem> > + string_type; + + catalog open(const string& _Catname, const locale& _Loc) const + { // open catalog + return (do_open(_Catname, _Loc)); + } + + string_type get(catalog _Catval, int _Set, int _Message, + const string_type& _Dflt) const + { // get message from set in catalog + return (do_get(_Catval, _Set, _Message, _Dflt)); + } + + void close(catalog _Catval) const + { // close catalog + do_close(_Catval); + } + + static locale::id id; // unique facet id + + explicit messages(size_t _Refs = 0) + : messages_base(_Refs) + { // construct from current locale + _Init(_Locinfo()); + } + + messages(const _Locinfo& _Lobj, size_t _Refs = 0) + : messages_base(_Refs) + { // construct from specified locale + _Init(_Lobj); + } + + static size_t __cdecl _Getcat(const locale::facet **_Ppf = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) + *_Ppf = _NEW_CRT messages<_Elem>; + return (_X_MESSAGE); + } + +protected: + void _Init(const _Locinfo&) + { // initialize from _Locinfo object (do nothing) + } + + virtual catalog do_open(const string&, const locale&) const + { // open catalog (do nothing) + return (0); + } + + virtual string_type do_get(catalog, int, int, + const string_type& _Dflt) const + { // get message from set in catalog (return default) + return (_Dflt); + } + + virtual void do_close(catalog) const + { // close catalog (do nothing) + } + }; + + // STATIC messages::id OBJECT +template + locale::id messages<_Elem>::id; + + // TEMPLATE CLASS messages_byname +template + class messages_byname + : public messages<_Elem> + { // messages for named locale +public: + explicit messages_byname(const char *_Locname, size_t _Refs = 0) + : messages<_Elem>(_Locinfo(_Locname), _Refs) + { // construct for named locale + } + +_PROTECTED: + virtual ~messages_byname() + { // destroy the object + } + }; + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 messages; +template class _CRTIMP2 messages; + + + + #endif /* _DLL_CPPLIB */ +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _XLOCMES_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocmon b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocmon new file mode 100644 index 00000000..8e42ae4b --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocmon @@ -0,0 +1,854 @@ +// xlocmon internal header (from ) +#pragma once +#ifndef _XLOCMON_ +#define _XLOCMON_ +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + // STRUCT money_base +struct _CRTIMP2 money_base + : public locale::facet + { // ultimate base class for moneypunct + enum + { // constants for different format codes + symbol = '$', sign = '+', space = ' ', value = 'v', none = 'x'}; + typedef int part; + + struct pattern + { // four-part formats for monetary text + char field[4]; + }; + + money_base(size_t _Refs = 0) + : locale::facet(_Refs) + { // default constructor + } + }; + + // TEMPLATE CLASS _Mpunct +template + class _Mpunct + : public money_base + { // common base class for moneypunct<_Elem, false/true> +public: + typedef _Elem char_type; + typedef basic_string<_Elem, char_traits<_Elem>, allocator<_Elem> > + string_type; + + _Elem decimal_point() const + { // return decimal point + return (do_decimal_point()); + } + + _Elem thousands_sep() const + { // return thousands separator + return (do_thousands_sep()); + } + + string grouping() const + { // return grouping string + return (do_grouping()); + } + + string_type curr_symbol() const + { // return currency symbol string + return (do_curr_symbol()); + } + + string_type positive_sign() const + { // return plus sign + return (do_positive_sign()); + } + + string_type negative_sign() const + { // return minus sign + return (do_negative_sign()); + } + + int frac_digits() const + { // return number of fraction digits + return (do_frac_digits()); + } + + pattern pos_format() const + { // return format for positive values + return (do_pos_format()); + } + + pattern neg_format() const + { // return format for negative values + return (do_neg_format()); + } + + explicit _Mpunct(size_t _Refs, bool _Intl) + : money_base(_Refs), _International(_Intl) + { // construct from current locale + _Init(_Locinfo()); + } + + _Mpunct(const _Locinfo& _Lobj, size_t _Refs, bool _Intl) + : money_base(_Refs), _International(_Intl) + { // construct from specified locale + _Init(_Lobj); + } + +_PROTECTED: + virtual ~_Mpunct() + { // destroy the object + _Tidy(); + } + +protected: + void _Init(const _Locinfo& _Lobj) + { // initialize from _Lobj + _Cvt = _Lobj._Getcvt(); + const lconv *_Ptr = _Lobj._Getlconv(); + + _Grouping = 0; + _Currencysign = 0; + _Plussign = 0; + _Minussign = 0; + + _TRY_BEGIN + _Grouping = _MAKLOCSTR(char, _Ptr->mon_grouping, _Cvt); + _Currencysign = _MAKLOCSTR(_Elem, _International + ? _Ptr->int_curr_symbol : _Ptr->currency_symbol, _Cvt); + _Plussign = _MAKLOCSTR(_Elem, 4 < (unsigned int)_Ptr->p_sign_posn + ? "" : _Ptr->positive_sign, _Cvt); + _Minussign = _MAKLOCSTR(_Elem, 4 < (unsigned int)_Ptr->n_sign_posn + ? "-" : _Ptr->negative_sign, _Cvt); + _CATCH_ALL + _Tidy(); + _RERAISE; + _CATCH_END + + _Decimalpoint = _MAKLOCCHR(_Elem, _Ptr->mon_decimal_point[0], _Cvt); + _Kseparator = _MAKLOCCHR(_Elem, _Ptr->mon_thousands_sep[0], _Cvt); + + _Fracdigits = _International ? _Ptr->int_frac_digits + : _Ptr->frac_digits; + if (_Fracdigits < 0 || CHAR_MAX <= _Fracdigits) + _Fracdigits = 0; + + _Makpat(_Plusformat, _Ptr->p_sep_by_space, + _Ptr->p_cs_precedes, _Ptr->p_sign_posn); + _Makpat(_Minusformat, _Ptr->n_sep_by_space, + _Ptr->n_cs_precedes, _Ptr->n_sign_posn); + } + + virtual _Elem do_decimal_point() const + { // return decimal point + return (_Decimalpoint); + } + + virtual _Elem do_thousands_sep() const + { // return thousands separator + return (_Kseparator); + } + + virtual string do_grouping() const + { // return grouping string + return (string(_Grouping)); + } + + virtual string_type do_curr_symbol() const + { // return currency symbol string + return (string_type(_Currencysign)); + } + + virtual string_type do_positive_sign() const + { // return plus sign + return (string_type(_Plussign)); + } + + virtual string_type do_negative_sign() const + { // return minus sign + return (string_type(_Minussign)); + } + + virtual int do_frac_digits() const + { // return number of fraction digits + return (_Fracdigits); + } + + virtual pattern do_pos_format() const + { // return format for positive values + return (_Plusformat); + } + + virtual pattern do_neg_format() const + { // return format for negative values + return (_Minusformat); + } + +private: + void _Makpat(pattern& _Pattern, unsigned int _Sepbyspace, + unsigned int _Symbolprecedes, unsigned int _Signposition) + { // make format pattern from locale information + const char *_Ptr = _International || (_Sepbyspace & ~1) != 0 + || (_Symbolprecedes & ~1) != 0 || 4 < _Signposition + ? "$+vx" // international or bad parameters + : "+v$x" "+v$x" "v$+x" "v+$x" "v$+x" + "+$vx" "+$vx" "$v+x" "+$vx" "$+vx" + "+v $" "+v $" "v $+" "v+ $" "v $+" + "+$ v" "+$ v" "$ v+" "+$ v" "$ +v" + + (_Signposition * 4 // pick even/odd column + + (_Symbolprecedes == 1 ? 20 : 0) // pick even/odd row + + (_Sepbyspace == 1 ? 40 : 0)); // pick first/second half + memcpy(_Pattern.field, _Ptr, 4); + } + + void _Tidy() + { // free all storage + _DELETE_CRT_VEC((void *)_Grouping); + _DELETE_CRT_VEC((void *)_Currencysign); + _DELETE_CRT_VEC((void *)_Plussign); + _DELETE_CRT_VEC((void *)_Minussign); + } + + const char *_Grouping; // grouping string, "" for "C" locale + _Elem _Decimalpoint; // decimal point, '\0' for "C" locale + _Elem _Kseparator; // thousands separator, '\0' for "C" locale + const _Elem *_Currencysign; // currency symbol, "" for "C" locale + const _Elem *_Plussign; // plus sign, "" for "C" locale + const _Elem *_Minussign; // minus sign, "-" for "C" locale + int _Fracdigits; // number of fraction digits, 0 for "C" locale + pattern _Plusformat; // positive format, "$+vx" for "C" locale + pattern _Minusformat; // negative format, "$+vx" for "C" locale + bool _International; // true if international format + + _Locinfo::_Cvtvec _Cvt; // conversion information + }; + + // TEMPLATE CLASS moneypunct +template + class moneypunct + : public _Mpunct<_Elem> + { // facet for defining monetary punctuation text +public: + static const bool intl; // true if international + static locale::id id; // unique facet id + + explicit moneypunct(size_t _Refs = 0) + : _Mpunct<_Elem>(_Refs, _Intl) + { // construct from current locale + } + + moneypunct(const _Locinfo& _Lobj, size_t _Refs = 0) + : _Mpunct<_Elem>(_Lobj, _Refs, _Intl) + { // construct from specified locale + } + + static size_t __cdecl _Getcat(const locale::facet **_Ppf = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) + *_Ppf = _NEW_CRT moneypunct<_Elem, _Intl>; + return (_X_MONETARY); + } + }; + + // STATIC moneypunct::intl OBJECT +template + const bool moneypunct<_Elem, _Intl>::intl = _Intl; + + // STATIC moneypunct::id OBJECT +template + locale::id moneypunct<_Elem, _Intl>::id; + + // TEMPLATE CLASS moneypunct_byname +template + class moneypunct_byname + : public moneypunct<_Elem, _Intl> + { // moneypunct for named locale +public: + explicit moneypunct_byname(const char *_Locname, size_t _Refs = 0) + : moneypunct<_Elem, _Intl>(_Locinfo(_Locname), _Refs) + { // construct for named locale + } + +_PROTECTED: + virtual ~moneypunct_byname() + { // destroy the object + } + }; + + // TEMPLATE CLASS money_get +template > > + class money_get + : public locale::facet + { // facet for converting text to encoded monetary amounts + typedef moneypunct<_Elem, false> _Mypunct0; + typedef moneypunct<_Elem, true> _Mypunct1; + +public: + typedef _Elem char_type; + typedef _InIt iter_type; + typedef basic_string<_Elem, char_traits<_Elem>, allocator<_Elem> > + string_type; + + _InIt get(_InIt _First, _InIt _Last, + bool _Intl, ios_base& _Iosbase, ios_base::iostate& _State, + long double& _Val) const + { // get long double from [_First, _Last) into _Val + return (do_get(_First, _Last, _Intl, _Iosbase, _State, _Val)); + } + + _InIt get(_InIt _First, _InIt _Last, + bool _Intl, ios_base& _Iosbase, ios_base::iostate& _State, + string_type& _Val) const + { // get string_type from [_First, _Last) into _Val + return (do_get(_First, _Last, _Intl, _Iosbase, _State, _Val)); + } + + static locale::id id; // unique facet id + + explicit money_get(size_t _Refs = 0) + : locale::facet(_Refs) + { // construct from current locale + _Init(_Locinfo()); + } + + money_get(const _Locinfo& _Lobj, size_t _Refs = 0) + : locale::facet(_Refs) + { // construct from specified locale + _Init(_Lobj); + } + + static size_t __cdecl _Getcat(const locale::facet **_Ppf = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) + *_Ppf = _NEW_CRT money_get<_Elem, _InIt>; + return (_X_MONETARY); + } + +_PROTECTED: + virtual ~money_get() + { // destroy the object + } + +protected: + void _Init(const _Locinfo& _Lobj) + { // initialize from _Locinfo object + _Cvt = _Lobj._Getcvt(); + } + + virtual _InIt do_get(_InIt _First, _InIt _Last, + bool _Intl, ios_base& _Iosbase, ios_base::iostate& _State, + long double& _Val) const + { // get long double from [_First, _Last) into _Val + string_type _Str = _Getmfld(_First, _Last, _Intl, _Iosbase); + + if (_First == _Last) + _State |= ios_base::eofbit; + if (_Str.size() == 0) + _State |= ios_base::failbit; // _Getmfld failed + else + { // convert to char string, then to long double + const _Elem _E0 = _MAKLOCCHR(_Elem, '0', _Cvt); + string _Str2; + _Str2.reserve(_Str.size()); + size_t _Off = 0; + + if (_Str[0] < _E0 || _E0 + 9 < _Str[0]) + _Str2 += '-', ++_Off; + for (; _Off < _Str.size(); ++_Off) + _Str2 += (_Str[_Off] - _E0) + '0'; + + const char *_Eb = _Str2.c_str(); + char *_Ep; + errno = 0; + const long double _Ans = _Stold(_Eb, &_Ep, 0); // convert + + if (_Ep == _Eb || errno != 0) + _State |= ios_base::failbit; + else + _Val = _Ans; // deliver value + } + return (_First); + } + + virtual _InIt do_get(_InIt _First, _InIt _Last, + bool _Intl, ios_base& _Iosbase, ios_base::iostate& _State, + string_type& _Val) const + { // get string_type from [_First, _Last) into _Val + string_type _Str = _Getmfld(_First, _Last, _Intl, _Iosbase); + + if (_First == _Last) + _State |= ios_base::eofbit; + if (_Str.size() == 0) + _State |= ios_base::failbit; // _Getmfld failed + else + _Val = _Str; // deliver value + return (_First); + } + +private: + string_type _Getmfld(_InIt& _First, _InIt& _Last, + bool _Intl, ios_base& _Iosbase) const + { // get monetary field from [_First, _Last) into string_type + const _Mpunct<_Elem> *_Ppunct_fac; + if (_Intl) + _Ppunct_fac = + &_USE(_Iosbase.getloc(), _Mypunct1); // international + else + _Ppunct_fac = + &_USE(_Iosbase.getloc(), _Mypunct0); // local + + bool _Bad = false, _Neg = false; + string_type _Sign, _Val; + const money_base::pattern _Pattern = _Ppunct_fac->neg_format(); + + for (size_t _Off = 0; !_Bad && _Off < 4; ++_Off) + switch (_Pattern.field[_Off]) + { // parse a format component + case money_base::symbol: + { // parse currency symbol + string_type _Symbol = _Ppunct_fac->curr_symbol(); + typename string_type::const_iterator _Source; + + if (_Iosbase.flags() & ios_base::showbase) + ; // showbase ==> mandatory currency symbol + else if (_Off == 3 && _Sign.size() <= 1 + && (_First == _Last || *_First != *_Symbol.c_str())) + _Symbol.erase(); // currency symbol optional at end + + for (_Source = _Symbol.begin(); + _First != _Last && _Source != _Symbol.end() + && *_First == *_Source; ++_Source, ++_First) + ; // still matching currency symbol + + if (_Source != _Symbol.end()) + _Bad = true; // currency symbol match failed + break; + } + + case money_base::sign: // parse sign + if (_First == _Last) + ; // assume no sign + else if (0 < (_Ppunct_fac->positive_sign()).size() + && _Ppunct_fac->positive_sign()[0] == *_First) + { // match positive sign + ++_First; + _Sign = _Ppunct_fac->positive_sign(); + } + else if (0 < (_Ppunct_fac->negative_sign()).size() + && _Ppunct_fac->negative_sign()[0] == *_First) + { // match negative sign + ++_First; + _Sign = _Ppunct_fac->negative_sign(); + _Neg = true; + } + break; // sign match can't fail + + case money_base::value: + { // parse value field + int _Fracdigseen = 0; + int _Fracdigits = _Ppunct_fac->frac_digits(); + const _Elem _E0 = _MAKLOCCHR(_Elem, '0', _Cvt); + const string _Grouping = _Ppunct_fac->grouping(); + + if (CHAR_MAX <= (unsigned char)*_Grouping.c_str()) + for (; _First != _Last + && _E0 <= *_First && *_First <= _E0 + 9; ++_First) + _Val += *_First; // no grouping, just gather digits + else + { // grouping specified, gather digits and group sizes + const _Elem _Kseparator = _Ppunct_fac->thousands_sep(); + string _Groups((size_t)1, '\0'); + size_t _Group = 0; + + for (; _First != _Last; ++_First) + if ( _E0 <= *_First && *_First <= _E0 + 9) + { // got a digit, add to group size + _Val += *_First; + if (_Groups[_Group] != CHAR_MAX) + ++_Groups[_Group]; + } + else if (_Groups[_Group] == '\0' + || _Kseparator == (_Elem)0 + || *_First != _Kseparator) + break; // not a group separator, done + else + { // add a new group to _Groups string + _Groups.append((size_t)1, '\0'); + ++_Group; + } + + if (_Group == 0) + ; // no thousands separators seen + else if ('\0' < _Groups[_Group]) + ++_Group; // add trailing group to group count + else + _Bad = true; // trailing separator, fail + + for (const char *_Pg = _Grouping.c_str(); + !_Bad && 0 < _Group; ) + if (*_Pg == CHAR_MAX) + break; // end of grouping constraints to check + else if (0 < --_Group && *_Pg != _Groups[_Group] + || 0 == _Group && *_Pg < _Groups[_Group]) + _Bad = true; // bad group size, fail + else if ('\0' < _Pg[1]) + ++_Pg; // group size okay, advance to next test + if (_Bad) + break; // bad grouping, give up + } + + if (_First != _Last + && *_First == _Ppunct_fac->decimal_point()) + { // seen decimal point, gather fraction digits + while (++_First != _Last + && _E0 <= *_First && *_First <= _E0 + 9) + if (_Fracdigseen < _Fracdigits) + _Val += *_First, ++_Fracdigseen; + } + + if (_Val.size() == 0) + _Bad = true; // fail if no elements parsed + else + for (; _Fracdigseen < _Fracdigits; ++_Fracdigseen) + _Val += _E0; // pad out fraction + break; + } + + case money_base::space: // parse space + if (_Off == 3) + break; // ignore space format at end + + const ctype<_Elem>& _Ctype_fac = + _USE(_Iosbase.getloc(), ctype<_Elem>); + while (_First != _Last + && _Ctype_fac.is(ctype_base::space, *_First)) + ++_First; // space match can't fail + } + + if (!_Bad && 1 < _Sign.size()) + { // match rest of sign string + typename string_type::const_iterator _Source; + + for (_Source = _Sign.begin(); _First != _Last + && ++_Source != _Sign.end() && *_First == *_Source; ++_First) + ; + if (_Source != _Sign.end()) + _Bad = true; // rest of sign doesn't match, fail + } + + if (_Bad) + _Val.erase(); // bad input, return empty string + else if (_Neg) + _Val.insert((size_t)0, (size_t)1, _MAKLOCCHR(_Elem, '-', _Cvt)); + return (_Val); + } + + _Locinfo::_Cvtvec _Cvt; // conversion information + }; + + // STATIC money_get::id OBJECT +template + locale::id money_get<_Elem, _InIt>::id; + + // TEMPLATE CLASS money_put +template > > + class money_put + : public locale::facet + { // facet for converting encoded monetary amounts to text + typedef moneypunct<_Elem, false> _Mypunct0; + typedef moneypunct<_Elem, true> _Mypunct1; + +public: + typedef _Elem char_type; + typedef _OutIt iter_type; + typedef basic_string<_Elem, char_traits<_Elem>, allocator<_Elem> > + string_type; + + _OutIt put(_OutIt _Dest, + bool _Intl, ios_base& _Iosbase, _Elem _Fill, + long double _Val) const + { // put long double to _Dest + return (do_put(_Dest, _Intl, _Iosbase, _Fill, _Val)); + } + + _OutIt put(_OutIt _Dest, + bool _Intl, ios_base& _Iosbase, _Elem _Fill, + const string_type& _Val) const + { // put string_type to _Dest + return (do_put(_Dest, _Intl, _Iosbase, _Fill, _Val)); + } + + static locale::id id; // unique facet id + + explicit money_put(size_t _Refs = 0) + : locale::facet(_Refs) + { // construct from current locale + _Init(_Locinfo()); + } + + money_put(const _Locinfo& _Lobj, size_t _Refs = 0) + : locale::facet(_Refs) + { // construct from specified locale + _Init(_Lobj); + } + + static size_t __cdecl _Getcat(const locale::facet **_Ppf = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) + *_Ppf = _NEW_CRT money_put<_Elem, _OutIt>; + return (_X_MONETARY); + } + +_PROTECTED: + virtual ~money_put() + { // destroy the object + } + +protected: + void _Init(const _Locinfo& _Lobj) + { // initialize from _Locinfo object + _Cvt = _Lobj._Getcvt(); + } + + virtual _OutIt do_put(_OutIt _Dest, + bool _Intl, ios_base& _Iosbase, _Elem _Fill, + long double _Val) const + { // put long double to _Dest + bool _Negative = false; + if (_Val < 0) + _Negative = true, _Val = -_Val; + + size_t _Exp; + for (_Exp = 0; 1e35 <= _Val && _Exp < 5000; _Exp += 10) + _Val /= 1e10; // drop 10 zeros before decimal point + + string_type _Val2; + char _Buf[40]; + int _Count = ::sprintf(_Buf, "%.0Lf", + _Val); // convert to chars + for (int _Off = 0; _Off < _Count; ++_Off) + _Val2.append((typename string_type::size_type)1, + _MAKLOCCHR(_Elem, _Buf[_Off], _Cvt)); // convert chars + _Val2.append(_Exp, + _MAKLOCCHR(_Elem, '0', _Cvt)); // scale by trailing zeros + + return (_Putmfld(_Dest, _Intl, _Iosbase, _Fill, _Negative, _Val2)); + } + + virtual _OutIt do_put(_OutIt _Dest, + bool _Intl, ios_base& _Iosbase, _Elem _Fill, + const string_type& _Val) const + { // put string_type to _Dest + const _Elem _E0 = _MAKLOCCHR(_Elem, '0', _Cvt); + const _Elem *_Ptr = _Val.c_str(); + bool _Negative = false; + if (*_Ptr == _MAKLOCCHR(_Elem, '-', _Cvt)) + _Negative = true, ++_Ptr; + + size_t _Count; + for (_Count = 0; _E0 <= _Ptr[_Count] && _Ptr[_Count] <= _E0 + 9; + ++_Count) + ; // count digits + string_type _Val2(_Ptr, _Count); + if (_Count == 0) // replace empty digit string with '0' + _Val2.append((typename string_type::size_type)1, _E0); + + return (_Putmfld(_Dest, _Intl, _Iosbase, _Fill, _Negative, _Val2)); + } + +private: + _OutIt _Putmfld(_OutIt _Dest, + bool _Intl, ios_base& _Iosbase, _Elem _Fill, + bool _Neg, string_type _Val) const + { // put string_type with just digits to _Dest + const _Mpunct<_Elem> *_Ppunct_fac; + if (_Intl) + _Ppunct_fac = + &_USE(_Iosbase.getloc(), _Mypunct1); // international + else + _Ppunct_fac = + &_USE(_Iosbase.getloc(), _Mypunct0); // local + const _Elem _E0 = _MAKLOCCHR(_Elem, '0', _Cvt); + + size_t _Fracdigits = _Ppunct_fac->frac_digits(); + const string _Grouping = _Ppunct_fac->grouping(); + + if (_Val.size() <= _Fracdigits) + _Val.insert((size_t)0, _Fracdigits - _Val.size() + 1, _E0); + else if (*_Grouping.c_str() != CHAR_MAX && '\0' < *_Grouping.c_str()) + { // grouping specified, add thousands separators + const _Elem _Kseparator = _Ppunct_fac->thousands_sep(); + const char *_Pg = _Grouping.c_str(); + size_t _Off = _Val.size() - _Fracdigits; // start of fraction + + while (*_Pg != CHAR_MAX && '\0' < *_Pg + && (size_t)*_Pg < _Off) + { // add a thousands separator, right to left + _Val.insert(_Off -= *_Pg, (size_t)1, _Kseparator); + if ('\0' < _Pg[1]) + ++_Pg; // not last group, advance + } + } + + money_base::pattern _Pattern; + string_type _Sign; + if (_Neg) + { // negative value, choose appropriate format and sign + _Pattern = _Ppunct_fac->neg_format(); + _Sign = _Ppunct_fac->negative_sign(); + } + else + { // positive value, choose appropriate format and sign + _Pattern = _Ppunct_fac->pos_format(); + _Sign = _Ppunct_fac->positive_sign(); + } + + string_type _Symbol; + if (_Iosbase.flags() & ios_base::showbase) + _Symbol = _Ppunct_fac->curr_symbol(); // showbase ==> show $ + + bool _Intern = false; + size_t _Fillcount, _Off; + for (_Fillcount = 0, _Off = 0; _Off < 4; ++_Off) + switch (_Pattern.field[_Off]) + { // accumulate total length in _Fillcount + case money_base::symbol: // count currency symbol size + _Fillcount += _Symbol.size(); + break; + + case money_base::sign: // count sign size + _Fillcount += _Sign.size(); + break; + + case money_base::value: // count value field size + _Fillcount += _Val.size() + (0 < _Fracdigits ? 1 : 0) + + (_Val.size() <= _Fracdigits + ? _Fracdigits - _Val.size() + 1 : 0); + break; + + case money_base::space: // count space size + _Intern = true; + } + + _Fillcount = _Iosbase.width() <= 0 + || (size_t)_Iosbase.width() <= _Fillcount + ? 0 : (size_t)_Iosbase.width() - _Fillcount; + + ios_base::fmtflags _Afl = + _Iosbase.flags() & ios_base::adjustfield; + if (_Afl != ios_base::left + && (_Afl != ios_base::internal || !_Intern)) + { // put leading fill + _Dest = _Rep(_Dest, _Fill, _Fillcount); + _Fillcount = 0; + } + + for (_Off = 0; _Off < 4; ++_Off) + switch (_Pattern.field[_Off]) + { // put components as specified by _Pattern + case money_base::symbol: // put currency symbol + _Dest = _Put(_Dest, _Symbol.begin(), _Symbol.size()); + break; + + case money_base::sign: // put sign + if (0 < _Sign.size()) + _Dest = _Put(_Dest, _Sign.begin(), 1); + break; + + case money_base::value: // put value field + if (_Fracdigits == 0) + _Dest = _Put(_Dest, _Val.begin(), + _Val.size()); // no fraction part + else if (_Val.size() <= _Fracdigits) + { // put leading zero, all fraction digits + *_Dest++ = _E0; + *_Dest++ = _Ppunct_fac->decimal_point(); + _Dest = _Rep(_Dest, _E0, + _Fracdigits - _Val.size()); // insert zeros + _Dest = _Put(_Dest, _Val.begin(), _Val.size()); + } + else + { // put both integer and fraction parts + _Dest = _Put(_Dest, _Val.begin(), + _Val.size() - _Fracdigits); // put integer part + *_Dest++ = _Ppunct_fac->decimal_point(); + _Dest = _Put(_Dest, _Val.end() - _Fracdigits, + _Fracdigits); // put fraction part + } + break; + + case money_base::space: // put any internal fill + if (_Afl == ios_base::internal) + { // put internal fill + _Dest = _Rep(_Dest, _Fill, _Fillcount); + _Fillcount = 0; + } + } + + if (1 < _Sign.size()) + _Dest = _Put(_Dest, _Sign.begin() + 1, + _Sign.size() - 1); // put remainder of sign + _Iosbase.width(0); + return (_Rep(_Dest, _Fill, _Fillcount)); // put trailing fill + } + + static _OutIt __cdecl _Put(_OutIt _Dest, + typename string_type::const_iterator _Source, size_t _Count) + { // put [_Source, _Source + _Count) to _Dest + for (; 0 < _Count; --_Count, ++_Dest, ++_Source) + *_Dest = *_Source; + return (_Dest); + } + + static _OutIt __cdecl _Rep(_OutIt _Dest, + _Elem _Ch, size_t _Count) + { // put _Count * _Ch to _Dest + for (; 0 < _Count; --_Count, ++_Dest) + *_Dest = _Ch; + return (_Dest); + } + + _Locinfo::_Cvtvec _Cvt; // conversion information + }; + + // STATIC money_put::id OBJECT +template + locale::id money_put<_Elem, _OutIt>::id; + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 moneypunct; +template class _CRTIMP2 moneypunct; +template class _CRTIMP2 money_get > >; +template class _CRTIMP2 money_put > >; + +template class _CRTIMP2 moneypunct; +template class _CRTIMP2 moneypunct; +template class _CRTIMP2 money_get > >; +template class _CRTIMP2 money_put > >; + + + + #endif /* _DLL_CPPLIB */ +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _XLOCMON_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocnum b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocnum new file mode 100644 index 00000000..113113c5 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xlocnum @@ -0,0 +1,1314 @@ +// xlocnum internal header (from ) +#pragma once +#ifndef _XLOCNUM_ +#define _XLOCNUM_ +#include +#include +#include +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) + + + #ifdef _LONGLONG + #define _STOLL(buf, ptr, base) _strtoi64(buf, ptr, base) + #define _STOULL(buf, ptr, base) _strtoui64(buf, ptr, base) + #endif /* _LONGLONG */ + + +_STD_BEGIN + + #define _VIRTUAL virtual + + // TEMPLATE CLASS numpunct +template + class numpunct + : public locale::facet + { // facet for defining numeric punctuation text +public: + typedef basic_string<_Elem, char_traits<_Elem>, allocator<_Elem> > + string_type; + typedef _Elem char_type; + + static locale::id id; // unique facet id + + _Elem decimal_point() const + { // return decimal point + return (do_decimal_point()); + } + + _Elem thousands_sep() const + { // return thousands separator + return (do_thousands_sep()); + } + + string grouping() const + { // return grouping string + return (do_grouping()); + } + + string_type falsename() const + { // return name for false + return (do_falsename()); + } + + string_type truename() const + { // return name for true + return (do_truename()); + } + + explicit numpunct(size_t _Refs = 0) + : locale::facet(_Refs) + { // construct from current locale + _Init(_Locinfo()); + } + + numpunct(const _Locinfo& _Lobj, size_t _Refs = 0) + : locale::facet(_Refs) + { // construct from specified locale + _Init(_Lobj); + } + + static size_t __cdecl _Getcat(const locale::facet **_Ppf = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) + *_Ppf = _NEW_CRT numpunct<_Elem>; + return (_X_NUMERIC); + } + +_PROTECTED: + _VIRTUAL ~numpunct() + { // destroy the object + _Tidy(); + } + +protected: + void _Init(const _Locinfo& _Lobj) + { // initialize from _Lobj + const lconv *_Ptr = _Lobj._Getlconv(); + + _Grouping = 0; + _Falsename = 0; + _Truename = 0; + + _TRY_BEGIN + _Grouping = _MAKLOCSTR(char, _Ptr->grouping, _Lobj._Getcvt()); + _Falsename = _MAKLOCSTR(_Elem, _Lobj._Getfalse(), _Lobj._Getcvt()); + _Truename = _MAKLOCSTR(_Elem, _Lobj._Gettrue(), _Lobj._Getcvt()); + _CATCH_ALL + _Tidy(); + _RERAISE; + _CATCH_END + + _Dp = _MAKLOCCHR(_Elem, _Ptr->decimal_point[0], _Lobj._Getcvt()); + _Kseparator = + _MAKLOCCHR(_Elem, _Ptr->thousands_sep[0], _Lobj._Getcvt()); + } + + _VIRTUAL _Elem do_decimal_point() const + { // return decimal point + return (_Dp); + } + + _VIRTUAL _Elem do_thousands_sep() const + { // return thousands separator + return (_Kseparator); + } + + _VIRTUAL string do_grouping() const + { // return grouping string + return (string(_Grouping)); + } + + _VIRTUAL string_type do_falsename() const + { // return name for false + return (string_type(_Falsename)); + } + + _VIRTUAL string_type do_truename() const + { // return name for true + return (string_type(_Truename)); + } + +private: + void _Tidy() + { // free all storage + _DELETE_CRT_VEC((void *)_Grouping); + _DELETE_CRT_VEC((void *)_Falsename); + _DELETE_CRT_VEC((void *)_Truename); + } + + const char *_Grouping; // grouping string, "" for "C" locale + _Elem _Dp; // decimal point, '.' for "C" locale + _Elem _Kseparator; // thousands separator, '\0' for "C" locale + const _Elem *_Falsename; // name for false, "false" for "C" locale + const _Elem *_Truename; // name for true, "true" for "C" locale + }; + +typedef numpunct _Npc; +typedef numpunct _Npwc; + + // TEMPLATE CLASS numpunct_byname +template + class numpunct_byname + : public numpunct<_Elem> + { // numpunct for named locale +public: + explicit numpunct_byname(const char *_Locname, size_t _Refs = 0) + : numpunct<_Elem>(_Locinfo(_Locname), _Refs) + { // construct for named locale + } + +_PROTECTED: + _VIRTUAL ~numpunct_byname() + { // destroy the object + } + }; + + // STATIC numpunct::id OBJECT +template + locale::id numpunct<_Elem>::id; + + // TEMPLATE CLASS num_get +template > > + class num_get + : public locale::facet + { // facet for converting text to encoded numbers +public: + typedef numpunct<_Elem> _Mypunct; + typedef basic_string<_Elem, char_traits<_Elem>, allocator<_Elem> > + _Mystr; + + static size_t __cdecl _Getcat(const locale::facet **_Ppf = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) + *_Ppf = _NEW_CRT num_get<_Elem, _InIt>; + return (_X_NUMERIC); + } + + static locale::id id; // unique facet id + +_PROTECTED: + _VIRTUAL ~num_get() + { // destroy the object + } + +protected: + void _Init(const _Locinfo& _Lobj) + { // initialize from _Locinfo object + _Cvt = _Lobj._Getcvt(); + } + + _Locinfo::_Cvtvec _Cvt; // conversion information + +public: + explicit num_get(size_t _Refs = 0) + : locale::facet(_Refs) + { // construct from current locale + _Init(_Locinfo()); + } + + num_get(const _Locinfo& _Lobj, size_t _Refs = 0) + : locale::facet(_Refs) + { // construct from specified locale + _Init(_Lobj); + } + + typedef _Elem char_type; + typedef _InIt iter_type; + + _InIt get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + _Bool& _Val) const + { // get bool from [_First, _Last) into _Val + return (do_get(_First, _Last, _Iosbase, _State, _Val)); + } + + _InIt get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + unsigned short& _Val) const + { // get unsigned short from [_First, _Last) into _Val + return (do_get(_First, _Last, _Iosbase, _State, _Val)); + } + + _InIt get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + unsigned int& _Val) const + { // get unsigned int from [_First, _Last) into _Val + return (do_get(_First, _Last, _Iosbase, _State, _Val)); + } + + _InIt get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + long& _Val) const + { // get long from [_First, _Last) into _Val + return (do_get(_First, _Last, _Iosbase, _State, _Val)); + } + + _InIt get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + unsigned long& _Val) const + { // get unsigned long from [_First, _Last) into _Val + return (do_get(_First, _Last, _Iosbase, _State, _Val)); + } + + #ifdef _LONGLONG + _InIt get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + _LONGLONG& _Val) const + { // get long long from [_First, _Last) into _Val + return (do_get(_First, _Last, _Iosbase, _State, _Val)); + } + + _InIt get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + _ULONGLONG& _Val) const + { // get unsigned long long from [_First, _Last) into _Val + return (do_get(_First, _Last, _Iosbase, _State, _Val)); + } + #endif /* _LONGLONG */ + + _InIt get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + float& _Val) const + { // get float from [_First, _Last) into _Val + return (do_get(_First, _Last, _Iosbase, _State, _Val)); + } + + _InIt get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + double& _Val) const + { // get double from [_First, _Last) into _Val + return (do_get(_First, _Last, _Iosbase, _State, _Val)); + } + + _InIt get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + long double& _Val) const + { // get long double from [_First, _Last) into _Val + return (do_get(_First, _Last, _Iosbase, _State, _Val)); + } + + _InIt get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + void *& _Val) const + { // get void pointer from [_First, _Last) into _Val + return (do_get(_First, _Last, _Iosbase, _State, _Val)); + } + +protected: + _VIRTUAL _InIt do_get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + _Bool& _Val) const + { // get bool from [_First, _Last) into _Val + int _Ans = -1; // negative answer indicates failure + + if (_Iosbase.flags() & ios_base::boolalpha) + { // get false name or true name + typedef typename _Mystr::size_type _Mystrsize; + const _Mypunct& _Punct_fac = _USE(_Iosbase.getloc(), _Mypunct); + _Mystr _Str((_Mystrsize)1, (char_type)0); + _Str += _Punct_fac.falsename(); + _Str += (char_type)0; + _Str += _Punct_fac.truename(); // construct "\0false\0true" + _Ans = _Getloctxt(_First, _Last, (size_t)2, _Str.c_str()); + } + else + { // get zero or nonzero integer + char _Ac[_MAX_INT_DIG], *_Ep; + errno = 0; + const unsigned long _Ulo = ::strtoul(_Ac, &_Ep, + _Getifld(_Ac, _First, _Last, _Iosbase.flags(), + _Iosbase.getloc())); + if (_Ep != _Ac && errno == 0 && _Ulo <= 1) + _Ans = _Ulo; + } + + if (_First == _Last) + _State |= ios_base::eofbit; + if (_Ans < 0) + _State |= ios_base::failbit; + else + _Val = _Ans != 0; // deliver value + return (_First); + } + + _VIRTUAL _InIt do_get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + unsigned short& _Val) const + { // get unsigned short from [_First, _Last) into _Val + char _Ac[_MAX_INT_DIG], *_Ep; + errno = 0; + int _Base = _Getifld(_Ac, _First, _Last, _Iosbase.flags(), + _Iosbase.getloc()); // gather field into _Ac + char *_Ptr = _Ac[0] == '-' ? _Ac + 1 : _Ac; // point past any sign + const unsigned long _Ans = + ::strtoul(_Ptr, &_Ep, _Base); // convert + + if (_First == _Last) + _State |= ios_base::eofbit; + if (_Ep == _Ptr || errno != 0 || USHRT_MAX < _Ans) + _State |= ios_base::failbit; + else + _Val = (unsigned short)(_Ac[0] == '-' + ? 0 -_Ans : _Ans); // deliver value + return (_First); + } + + _VIRTUAL _InIt do_get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + unsigned int& _Val) const + { // get unsigned int from [_First, _Last) into _Val + char _Ac[_MAX_INT_DIG], *_Ep; + errno = 0; + int _Base = _Getifld(_Ac, _First, _Last, _Iosbase.flags(), + _Iosbase.getloc()); // gather field into _Ac + char *_Ptr = _Ac[0] == '-' ? _Ac + 1 : _Ac; // point past any sign + const unsigned long _Ans = + ::strtoul(_Ptr, &_Ep, _Base); // convert + + if (_First == _Last) + _State |= ios_base::eofbit; + if (_Ep == _Ptr || errno != 0 || UINT_MAX < _Ans) + _State |= ios_base::failbit; + else + _Val = _Ac[0] == '-' ? 0 -_Ans : _Ans; // deliver value + return (_First); + } + + _VIRTUAL _InIt do_get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + long& _Val) const + { // get long from [_First, _Last) into _Val + char _Ac[_MAX_INT_DIG], *_Ep; + errno = 0; + const long _Ans = ::strtol(_Ac, &_Ep, + _Getifld(_Ac, _First, _Last, _Iosbase.flags(), + _Iosbase.getloc())); // gather field, convert + + if (_First == _Last) + _State |= ios_base::eofbit; + if (_Ep == _Ac || errno != 0) + _State |= ios_base::failbit; + else + _Val = _Ans; // deliver value + return (_First); + } + + _VIRTUAL _InIt do_get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + unsigned long& _Val) const + { // get unsigned long from [_First, _Last) into _Val + char _Ac[_MAX_INT_DIG], *_Ep; + errno = 0; + const unsigned long _Ans = ::strtoul(_Ac, &_Ep, + _Getifld(_Ac, _First, _Last, _Iosbase.flags(), + _Iosbase.getloc())); // gather field, convert + + if (_First == _Last) + _State |= ios_base::eofbit; + if (_Ep == _Ac || errno != 0) + _State |= ios_base::failbit; + else + _Val = _Ans; // deliver value + return (_First); + } + + #ifdef _LONGLONG + _VIRTUAL _InIt do_get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + _LONGLONG& _Val) const + { // get long long from [_First, _Last) into _Val + char _Ac[_MAX_INT_DIG], *_Ep; + errno = 0; + const _LONGLONG _Ans = ::_STOLL(_Ac, &_Ep, + _Getifld(_Ac, _First, _Last, _Iosbase.flags(), + _Iosbase.getloc())); // gather field, convert + + if (_First == _Last) + _State |= ios_base::eofbit; + if (_Ep == _Ac || errno != 0) + _State |= ios_base::failbit; + else + _Val = _Ans; // deliver value + return (_First); + } + + _VIRTUAL _InIt do_get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + _ULONGLONG& _Val) const + { // get unsigned long long from [_First, _Last) into _Val + char _Ac[_MAX_INT_DIG], *_Ep; + errno = 0; + const _ULONGLONG _Ans = ::_STOULL(_Ac, &_Ep, + _Getifld(_Ac, _First, _Last, _Iosbase.flags(), + _Iosbase.getloc())); // gather field, convert + + if (_First == _Last) + _State |= ios_base::eofbit; + if (_Ep == _Ac || errno != 0) + _State |= ios_base::failbit; + else + _Val = _Ans; // deliver value + return (_First); + } + #endif /* _LONGLONG */ + + _VIRTUAL _InIt do_get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + float& _Val) const + { // get float from [_First, _Last) into _Val + char _Ac[_MAX_EXP_DIG + _MAX_SIG_DIG + 16], *_Ep; + errno = 0; + const float _Ans = ::_Stof(_Ac, &_Ep, + _Getffld(_Ac, _First, _Last, + _Iosbase.getloc())); // gather field, convert + + if (_First == _Last) + _State |= ios_base::eofbit; + if (_Ep == _Ac || errno != 0) + _State |= ios_base::failbit; + else + _Val = _Ans; // deliver value + return (_First); + } + + _VIRTUAL _InIt do_get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + double& _Val) const + { // get double from [_First, _Last) into _Val + char _Ac[_MAX_EXP_DIG + _MAX_SIG_DIG + 16], *_Ep; + errno = 0; + const double _Ans = ::_Stod(_Ac, &_Ep, + _Getffld(_Ac, _First, _Last, + _Iosbase.getloc())); // gather field, convert + + if (_First == _Last) + _State |= ios_base::eofbit; + if (_Ep == _Ac || errno != 0) + _State |= ios_base::failbit; + else + _Val = _Ans; // deliver value + return (_First); + } + + _VIRTUAL _InIt do_get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + long double& _Val) const + { // get long double from [_First, _Last) into _Val + char _Ac[_MAX_EXP_DIG + _MAX_SIG_DIG + 16], *_Ep; + errno = 0; + const long double _Ans = ::_Stold(_Ac, &_Ep, + _Getffld(_Ac, _First, _Last, + _Iosbase.getloc())); // gather field, convert + + if (_First == _Last) + _State |= ios_base::eofbit; + if (_Ep == _Ac || errno != 0) + _State |= ios_base::failbit; + else + _Val = _Ans; // deliver value + return (_First); + } + + _VIRTUAL _InIt do_get(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, + void *& _Val) const + { // get void pointer from [_First, _Last) into _Val + char _Ac[_MAX_INT_DIG], *_Ep; + errno = 0; + + #ifdef _LONGLONG + int _Base = _Getifld(_Ac, _First, _Last, ios_base::hex, + _Iosbase.getloc()); // gather field + const _ULONGLONG _Ans = + (sizeof (void *) == sizeof (unsigned long)) + ? (_ULONGLONG)::strtoul(_Ac, &_Ep, _Base) + : ::_STOULL(_Ac, &_Ep, _Base); + + #else /* _LONGLONG */ + const unsigned long _Ans = ::strtoul(_Ac, &_Ep, + _Getifld(_Ac, _First, _Last, ios_base::hex, + _Iosbase.getloc())); // gather field, convert + #endif /* _LONGLONG */ + + if (_First == _Last) + _State |= ios_base::eofbit; + if (_Ep == _Ac || errno != 0) + _State |= ios_base::failbit; + else + _Val = (void *)(uintptr_t)_Ans; // deliver value + return (_First); + } + +private: + int __cdecl _Getifld(char *_Ac, + _InIt& _First, _InIt& _Last, ios_base::fmtflags _Basefield, + const locale& _Loc) const + { // get integer field from [_First, _Last) into _Ac + const _Mypunct& _Punct_fac = _USE(_Loc, _Mypunct); + const string _Grouping = _Punct_fac.grouping(); + const _Elem _Kseparator = _Punct_fac.thousands_sep(); + const _Elem _E0 = _MAKLOCCHR(_Elem, '0', _Cvt); + char *_Ptr = _Ac; + + if (_First == _Last) + ; // empty field + else if (*_First == _MAKLOCCHR(_Elem, '+', _Cvt)) + *_Ptr++ = '+', ++_First; // gather plus sign + else if (*_First == _MAKLOCCHR(_Elem, '-', _Cvt)) + *_Ptr++ = '-', ++_First; // gather minus sign + + _Basefield &= ios_base::basefield; + int _Base = _Basefield == ios_base::oct ? 8 + : _Basefield == ios_base::hex ? 16 + : _Basefield == ios_base::_Fmtzero ? 0 : 10; + + bool _Seendigit = false; // seen a digit in input + bool _Nonzero = false; // seen a nonzero digit in input + + if (_First != _Last && *_First == _E0) + { // leading zero, look for 0x, 0X + _Seendigit = true, ++_First; + if (_First != _Last && (*_First == _MAKLOCCHR(_Elem, 'x', _Cvt) + || *_First == _MAKLOCCHR(_Elem, 'X', _Cvt)) + && (_Base == 0 || _Base == 16)) + _Base = 16, _Seendigit = false, ++_First; + else if (_Base == 0) + _Base = 8; + } + + int _Dlen = _Base == 0 || _Base == 10 ? 10 + : _Base == 8 ? 8 : 16 + 6; + string _Groups((size_t)1, (char)_Seendigit); + size_t _Group = 0; + + for (char *const _Pe = &_Ac[_MAX_INT_DIG - 1]; + _First != _Last; ++_First) + if (::memchr("0123456789abcdefABCDEF", + *_Ptr = _MAKLOCBYTE(_Elem, *_First, _Cvt), _Dlen) != 0) + { // got a digit, characterize it and add to group size + if ((_Nonzero || *_Ptr != '0') && _Ptr < _Pe) + ++_Ptr, _Nonzero = true; + _Seendigit = true; + if (_Groups[_Group] != CHAR_MAX) + ++_Groups[_Group]; + } + else if (_Groups[_Group] == '\0' + || _Kseparator == (_Elem)0 + || *_First != _Kseparator) + break; // not a group separator, done + else + { // add a new group to _Groups string + _Groups.append((string::size_type)1, '\0'); + ++_Group; + } + + if (_Group == 0) + ; // no thousands separators seen + else if ('\0' < _Groups[_Group]) + ++_Group; // add trailing group to group count + else + _Seendigit = false; // trailing separator, fail + + for (const char *_Pg = _Grouping.c_str(); _Seendigit && 0 < _Group; ) + if (*_Pg == CHAR_MAX) + break; // end of grouping constraints to check + else if (0 < --_Group && *_Pg != _Groups[_Group] + || 0 == _Group && *_Pg < _Groups[_Group]) + _Seendigit = false; // bad group size, fail + else if ('\0' < _Pg[1]) + ++_Pg; // group size okay, advance to next test + + if (_Seendigit && !_Nonzero) + *_Ptr++ = '0'; // zero field, replace stripped zero(s) + else if (!_Seendigit) + _Ptr = _Ac; // roll back pointer to indicate failure + *_Ptr = '\0'; + return (_Base); + } + + int __cdecl _Getffld(char *_Ac, + _InIt& _First, _InIt &_Last, const locale& _Loc) const + { // get floating-point field from [_First, _Last) into _Ac + const _Mypunct& _Punct_fac = _USE(_Loc, _Mypunct); + const string _Grouping = _Punct_fac.grouping(); + const _Elem _E0 = _MAKLOCCHR(_Elem, '0', _Cvt); + char *_Ptr = _Ac; + bool _Bad = false; + + if (_First == _Last) + ; // empty field + else if (*_First == _MAKLOCCHR(_Elem, '+', _Cvt)) + *_Ptr++ = '+', ++_First; // gather plus sign + else if (*_First == _MAKLOCCHR(_Elem, '-', _Cvt)) + *_Ptr++ = '-', ++_First; // gather minus sign + + bool _Seendigit = false; // seen a digit in input + int _Significant = 0; // number of significant digits + int _Pten = 0; // power of 10 multiplier + + if (*_Grouping.c_str() == CHAR_MAX || *_Grouping.c_str() <= '\0') + for (; _First != _Last + && _E0 <= *_First && *_First <= _E0 + 9; + _Seendigit = true, ++_First) + if (_MAX_SIG_DIG <= _Significant) + ++_Pten; // just scale by 10 + else if (*_First == _E0 && _Significant == 0) + ; // drop leading zeros + else + { // save a significant digit + *_Ptr++ = (*_First - _E0) + '0'; + ++_Significant; + } + else + { // grouping specified, gather digits and group sizes + const _Elem _Kseparator = _Punct_fac.thousands_sep(); + string _Groups((size_t)1, '\0'); + size_t _Group = 0; + + for (; _First != _Last; ++_First) + if (_E0 <= *_First && *_First <= _E0 + 9) + { // got a digit, add to group size + _Seendigit = true; + if (_MAX_SIG_DIG <= _Significant) + ++_Pten; // just scale by 10 + else if (*_First == _E0 && _Significant == 0) + ; // drop leading zeros + else + { // save a significant digit + *_Ptr++ = (*_First - _E0) + '0'; + ++_Significant; + } + if (_Groups[_Group] != CHAR_MAX) + ++_Groups[_Group]; + } + else if (_Groups[_Group] == '\0' + || _Kseparator == (_Elem)0 + || *_First != _Kseparator) + break; // not a group separator, done + else + { // add a new group to _Groups string + _Groups.append((size_t)1, '\0'); + ++_Group; + } + if (_Group == 0) + ; // no thousands separators seen + else if ('\0' < _Groups[_Group]) + ++_Group; // add trailing group to group count + else + _Bad = true; // trailing separator, fail + + for (const char *_Pg = _Grouping.c_str(); + !_Bad && 0 < _Group; ) + if (*_Pg == CHAR_MAX) + break; // end of grouping constraints to check + else if (0 < --_Group && *_Pg != _Groups[_Group] + || 0 == _Group && *_Pg < _Groups[_Group]) + _Bad = true; // bad group size, fail + else if ('\0' < _Pg[1]) + ++_Pg; // group size okay, advance to next test + } + + if (_Seendigit && _Significant == 0) + *_Ptr++ = '0'; // save at least one leading digit + + if (_First != _Last && *_First == _Punct_fac.decimal_point()) + *_Ptr++ = localeconv()->decimal_point[0], ++_First; // add . + + if (_Significant == 0) + { // 0000. so far + for (; _First != _Last && *_First == _E0; + _Seendigit = true, ++_First) + --_Pten; // just count leading fraction zeros + if (_Pten < 0) + *_Ptr++ = '0', ++_Pten; // put one back + } + + for (; _First != _Last + && _E0 <= *_First && *_First <= _E0 + 9; + _Seendigit = true, ++_First) + if (_Significant < _MAX_SIG_DIG) + { // save a significant fraction digit + *_Ptr++ = (*_First - _E0) + '0'; + ++_Significant; + } + + if (_Seendigit && _First != _Last + && (*_First == _MAKLOCCHR(_Elem, 'e', _Cvt) + || *_First == _MAKLOCCHR(_Elem, 'E', _Cvt))) + { // 'e' or 'E', collect exponent + *_Ptr++ = 'e', ++_First; + _Seendigit = false, _Significant = 0; + + if (_First == _Last) + ; // 'e' or 'E' is last element + else if (*_First == _MAKLOCCHR(_Elem, '+', _Cvt)) + *_Ptr++ = '+', ++_First; // gather plus sign + else if (*_First == _MAKLOCCHR(_Elem, '-', _Cvt)) + *_Ptr++ = '-', ++_First; // gather minus sign + for (; _First != _Last && *_First == _E0; ) + _Seendigit = true, ++_First; // strip leading zeros + if (_Seendigit) + *_Ptr++ = '0'; // put one back + for (; _First != _Last + && _E0 <= *_First && *_First <= _E0 + 9; + _Seendigit = true, ++_First) + if (_Significant < _MAX_EXP_DIG) + { // save a significant exponent digit + *_Ptr++ = (*_First - _E0) + '0'; + ++_Significant; + } + } + + if (_Bad || !_Seendigit) + _Ptr = _Ac; // roll back pointer to indicate failure + *_Ptr = '\0'; + return (_Pten); + } + }; + + // STATIC num_get::id OBJECT +template + locale::id num_get<_Elem, _InIt>::id; + + // TEMPLATE CLASS num_put +template > > + class num_put + : public locale::facet + { // facet for converting encoded numbers to text +public: + typedef numpunct<_Elem> _Mypunct; + typedef basic_string<_Elem, char_traits<_Elem>, allocator<_Elem> > + _Mystr; + + static size_t __cdecl _Getcat(const locale::facet **_Ppf = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) + *_Ppf = _NEW_CRT num_put<_Elem, _OutIt>; + return (_X_NUMERIC); + } + + static locale::id id; // unique facet id + +_PROTECTED: + _VIRTUAL ~num_put() + { // destroy the object + } + +protected: + void _Init(const _Locinfo& _Lobj) + { // initialize from _Locinfo object + _Cvt = _Lobj._Getcvt(); + } + + _Locinfo::_Cvtvec _Cvt; // conversion information + +public: + explicit num_put(size_t _Refs = 0) + : locale::facet(_Refs) + { // construct from current locale + _Init(_Locinfo()); + } + + num_put(const _Locinfo& _Lobj, size_t _Refs = 0) + : locale::facet(_Refs) + { // construct from specified locale + _Init(_Lobj); + } + + typedef _Elem char_type; + typedef _OutIt iter_type; + + _OutIt put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, _Bool _Val) const + { // put formatted bool to _Dest + return (do_put(_Dest, _Iosbase, _Fill, _Val)); + } + + _OutIt put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, long _Val) const + { // put formatted long to _Dest + return (do_put(_Dest, _Iosbase, _Fill, _Val)); + } + + _OutIt put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, unsigned long _Val) const + { // put formatted unsigned long to _Dest + return (do_put(_Dest, _Iosbase, _Fill, _Val)); + } + + #ifdef _LONGLONG + _OutIt put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, _LONGLONG _Val) const + { // put formatted long long to _Dest + return (do_put(_Dest, _Iosbase, _Fill, _Val)); + } + + _OutIt put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, _ULONGLONG _Val) const + { // put formatted unsigned long long to _Dest + return (do_put(_Dest, _Iosbase, _Fill, _Val)); + } + #endif /* _LONGLONG */ + + _OutIt put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, double _Val) const + { // put formatted double to _Dest + return (do_put(_Dest, _Iosbase, _Fill, _Val)); + } + + _OutIt put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, long double _Val) const + { // put formatted long double to _Dest + return (do_put(_Dest, _Iosbase, _Fill, _Val)); + } + + _OutIt put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, const void *_Val) const + { // put formatted void pointer to _Dest + return (do_put(_Dest, _Iosbase, _Fill, _Val)); + } + +protected: + _VIRTUAL _OutIt do_put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, _Bool _Val) const + { // put formatted bool to _Dest + if (!(_Iosbase.flags() & ios_base::boolalpha)) + return (do_put(_Dest, _Iosbase, _Fill, (long)_Val)); + else + { // put "false" or "true" + const _Mypunct& _Punct_fac = _USE(_Iosbase.getloc(), _Mypunct); + _Mystr _Str; + if (_Val) + _Str.assign(_Punct_fac.truename()); + else + _Str.assign(_Punct_fac.falsename()); + + size_t _Fillcount = _Iosbase.width() <= 0 + || (size_t)_Iosbase.width() <= _Str.size() + ? 0 : (size_t)_Iosbase.width() - _Str.size(); + + if ((_Iosbase.flags() & ios_base::adjustfield) != ios_base::left) + { // put leading fill + _Dest = _Rep(_Dest, _Fill, _Fillcount); + _Fillcount = 0; + } + _Dest = _Put(_Dest, _Str.c_str(), _Str.size()); // put field + _Iosbase.width(0); + return (_Rep(_Dest, _Fill, _Fillcount)); // put trailing fill + } + } + + _VIRTUAL _OutIt do_put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, long _Val) const + { // put formatted long to _Dest + char _Buf[2 * _MAX_INT_DIG], _Fmt[6]; + return (_Iput(_Dest, _Iosbase, _Fill, _Buf, + ::sprintf(_Buf, _Ifmt(_Fmt, "ld", + _Iosbase.flags()), _Val))); + } + + _VIRTUAL _OutIt do_put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, unsigned long _Val) const + { // put formatted unsigned long to _Dest + char _Buf[2 * _MAX_INT_DIG], _Fmt[6]; + return (_Iput(_Dest, _Iosbase, _Fill, _Buf, + ::sprintf(_Buf, _Ifmt(_Fmt, "lu", + _Iosbase.flags()), _Val))); + } + + #ifdef _LONGLONG + _VIRTUAL _OutIt do_put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, _LONGLONG _Val) const + { // put formatted long long to _Dest + char _Buf[2 * _MAX_INT_DIG], _Fmt[8]; + return (_Iput(_Dest, _Iosbase, _Fill, _Buf, + ::sprintf(_Buf, _Ifmt(_Fmt, "Ld", + _Iosbase.flags()), _Val))); + } + + _VIRTUAL _OutIt do_put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, _ULONGLONG _Val) const + { // put formatted unsigned long long to _Dest + char _Buf[2 * _MAX_INT_DIG], _Fmt[8]; + return (_Iput(_Dest, _Iosbase, _Fill, _Buf, + ::sprintf(_Buf, _Ifmt(_Fmt, "Lu", + _Iosbase.flags()), _Val))); + } + #endif /* _LONGLONG */ + + _VIRTUAL _OutIt do_put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, double _Val) const + { // put formatted double to _Dest + char _Buf[_MAX_EXP_DIG + _MAX_SIG_DIG + 64], _Fmt[8]; + streamsize _Precision = _Iosbase.precision() <= 0 + && !(_Iosbase.flags() & ios_base::fixed) + ? 6 : _Iosbase.precision(); // desired precision + int _Significance = _MAX_SIG_DIG < _Precision + ? _MAX_SIG_DIG : (int)_Precision; // actual sprintf precision + _Precision -= _Significance; + size_t _Beforepoint = 0; // zeros to add before decimal point + size_t _Afterpoint = 0; // zeros to add after decimal point + + if ((_Iosbase.flags() & ios_base::floatfield) == ios_base::fixed) + { // scale silly fixed-point value + bool _Signed = _Val < 0; + if (_Signed) + _Val = -_Val; + + for (; 1e35 <= _Val && _Beforepoint < 5000; _Beforepoint += 10) + _Val /= 1e10; // drop 10 zeros before decimal point + + if (0 < _Val) + for (; 10 <= _Precision && _Val <= 1e-35 + && _Afterpoint < 5000; _Afterpoint += 10) + { // drop 10 zeros after decimal point + _Val *= 1e10; + _Precision -= 10; + } + + if (_Signed) + _Val = -_Val; + } + + return (_Fput(_Dest, _Iosbase, _Fill, _Buf, + _Beforepoint, _Afterpoint, _Precision, + ::sprintf(_Buf, _Ffmt(_Fmt, 0, _Iosbase.flags()), + _Significance, _Val))); // convert and put + } + + _VIRTUAL _OutIt do_put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, long double _Val) const + { // put formatted long double to _Dest + char _Buf[_MAX_EXP_DIG + _MAX_SIG_DIG + 64], _Fmt[8]; + streamsize _Precision = _Iosbase.precision() <= 0 + && !(_Iosbase.flags() & ios_base::fixed) + ? 6 : _Iosbase.precision(); // desired precision + int _Significance = _MAX_SIG_DIG < _Precision + ? _MAX_SIG_DIG : (int)_Precision; // actual sprintf precision + _Precision -= _Significance; + size_t _Beforepoint = 0; // zeros to add before decimal point + size_t _Afterpoint = 0; // zeros to add after decimal point + + if ((_Iosbase.flags() & ios_base::floatfield) == ios_base::fixed) + { // scale silly fixed-point value + bool _Signed = _Val < 0; + if (_Signed) + _Val = -_Val; + + for (; 1e35 <= _Val && _Beforepoint < 5000; _Beforepoint += 10) + _Val /= 1e10; // drop 10 zeros before decimal point + + if (0 < _Val) + for (; 10 <= _Precision && _Val <= 1e-35 + && _Afterpoint < 5000; _Afterpoint += 10) + { // drop 10 zeros after decimal point + _Val *= 1e10; + _Precision -= 10; + } + + if (_Signed) + _Val = -_Val; + } + + return (_Fput(_Dest, _Iosbase, _Fill, _Buf, + _Beforepoint, _Afterpoint, _Precision, + ::sprintf(_Buf, _Ffmt(_Fmt, 'L', _Iosbase.flags()), + _Significance, _Val))); // convert and put + } + + _VIRTUAL _OutIt do_put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, const void *_Val) const + { // put formatted void pointer to _Dest + char _Buf[2 * _MAX_INT_DIG]; + return (_Iput(_Dest, _Iosbase, _Fill, _Buf, + ::sprintf(_Buf, "%p", _Val))); + } + +private: + char *__cdecl _Ffmt(char *_Fmt, + char _Spec, ios_base::fmtflags _Flags) const + { // generate sprintf format for floating-point + char *_Ptr = _Fmt; + *_Ptr++ = '%'; + + if (_Flags & ios_base::showpos) + *_Ptr++ = '+'; + if (_Flags & ios_base::showpoint) + *_Ptr++ = '#'; + *_Ptr++ = '.'; + *_Ptr++ = '*'; // for precision argument + if (_Spec != '\0') + *_Ptr++ = _Spec; // 'L' qualifier for long double only + + ios_base::fmtflags _Ffl = _Flags & ios_base::floatfield; + *_Ptr++ = _Ffl == ios_base::fixed ? 'f' + : _Ffl == ios_base::scientific ? 'e' : 'g'; // specifier + *_Ptr = '\0'; + return (_Fmt); + } + + _OutIt __cdecl _Fput(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, const char *_Buf, + size_t _Beforepoint, size_t _Afterpoint, + size_t _Trailing, size_t _Count) const + { // put formatted floating-point to _Dest + const _Mypunct& _Punct_fac = _USE(_Iosbase.getloc(), _Mypunct); + const string _Grouping = _Punct_fac.grouping(); + const _Elem _Kseparator = _Punct_fac.thousands_sep(); + string _Groupstring; + const _Elem _E0 = _MAKLOCCHR(_Elem, '0', _Cvt); + size_t _Prefix = _Buf[0] == '+' || _Buf[0] == '-' ? 1 : 0; + + char _Enders[3]; + _Enders[0] = ::localeconv()->decimal_point[0]; + _Enders[1] = 'e'; + _Enders[2] = '\0'; + + if (*_Grouping.c_str() != CHAR_MAX && '\0' < *_Grouping.c_str()) + { // grouping specified, add thousands separators + _Groupstring.append(_Buf, _Count); // assemble field into string + const char *_Ptr = (const char *)::memchr(_Buf, + 'e', _Count); // find exponent + if (_Ptr == 0) + _Groupstring.append(_Trailing, '0'); + else + _Groupstring.insert(_Ptr - _Buf, _Trailing, '0'); + + _Ptr = (const char *)::memchr(_Buf, + _Enders[0], _Count); // find decimal point + if (_Ptr == 0) + _Groupstring.append(_Beforepoint, '0'); + else + { // fill in zeros around decimal point + _Groupstring.insert(_Ptr - _Buf + 1, _Afterpoint, '0'); + _Groupstring.insert(_Ptr - _Buf, _Beforepoint, '0'); + } + + const char *_Pg = _Grouping.c_str(); + size_t _Off = ::strcspn(&_Groupstring[0], &_Enders[0]); + while (*_Pg != CHAR_MAX && '\0' < *_Pg + && (size_t)*_Pg < _Off - _Prefix) + { // add a comma to mark thousands separator + _Groupstring.insert(_Off -= *_Pg, (size_t)1, ','); + if ('\0' < _Pg[1]) + ++_Pg; // not last group, advance + } + + _Buf = &_Groupstring[0]; + _Beforepoint = 0; + _Afterpoint = 0; + _Trailing = 0; + _Count = _Groupstring.size(); + } + + size_t _Fillcount = _Beforepoint + _Afterpoint + _Trailing + _Count; + _Fillcount = _Iosbase.width() <= 0 + || (size_t)_Iosbase.width() <= _Fillcount + ? 0 : (size_t)_Iosbase.width() - _Fillcount; + ios_base::fmtflags _Adjustfield = + _Iosbase.flags() & ios_base::adjustfield; + if (_Adjustfield != ios_base::left + && _Adjustfield != ios_base::internal) + { // put leading fill + _Dest = _Rep(_Dest, _Fill, _Fillcount); + _Fillcount = 0; + } + else if (_Adjustfield == ios_base::internal) + { // put internal fill + if (0 < _Prefix) + { // but first put sign + _Dest = _Putc(_Dest, _Buf, 1); + ++_Buf, --_Count; + } + _Dest = _Rep(_Dest, _Fill, _Fillcount); + _Fillcount = 0; + } + + const char *_Ptr = (const char *)::memchr(_Buf, + _Enders[0], _Count); // find decimal point + if (_Ptr != 0) + { // has decimal point, put pieces and zero fills + size_t _Fracoffset = _Ptr - _Buf + 1; + _Dest = _Putgrouped(_Dest, _Buf, _Fracoffset - 1, _Kseparator); + _Dest = _Rep(_Dest, _E0, _Beforepoint); + _Dest = _Rep(_Dest, _Punct_fac.decimal_point(), 1); + _Dest = _Rep(_Dest, _E0, _Afterpoint); + _Buf += _Fracoffset, _Count -= _Fracoffset; + } + + if ((_Ptr = (const char *)::memchr(_Buf, 'e', _Count)) != 0) + { // has exponent field, put it out + size_t _Expoffset = _Ptr - _Buf + 1; + _Dest = _Putgrouped(_Dest, _Buf, _Expoffset - 1, _Kseparator); + _Dest = _Rep(_Dest, _E0, _Trailing), _Trailing = 0; + _Dest = _Putc(_Dest, _Iosbase.flags() & ios_base::uppercase + ? "E" : "e", 1); + _Buf += _Expoffset, _Count -= _Expoffset; + } + + _Dest = _Putgrouped(_Dest, _Buf, _Count, + _Kseparator); // put leftover field + _Dest = _Rep(_Dest, _E0, _Trailing); // put trailing zeros + _Iosbase.width(0); + return (_Rep(_Dest, _Fill, _Fillcount)); // put trailing fill + } + + char *__cdecl _Ifmt(char *_Fmt, + const char *_Spec, ios_base::fmtflags _Flags) const + { // generate sprintf format for integer + char *_Ptr = _Fmt; + *_Ptr++ = '%'; + + if (_Flags & ios_base::showpos) + *_Ptr++ = '+'; + if (_Flags & ios_base::showbase) + *_Ptr++ = '#'; + if (_Spec[0] != 'L') + *_Ptr++ = _Spec[0]; // qualifier + else + { /* change L to I64 */ + *_Ptr++ = 'I'; + *_Ptr++ = '6'; + *_Ptr++ = '4'; + } + + ios_base::fmtflags _Basefield = _Flags & ios_base::basefield; + *_Ptr++ = _Basefield == ios_base::oct ? 'o' + : _Basefield != ios_base::hex ? _Spec[1] // 'd' or 'u' + : _Flags & ios_base::uppercase ? 'X' : 'x'; + *_Ptr = '\0'; + return (_Fmt); + } + + _OutIt __cdecl _Iput(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, char *_Buf, size_t _Count) const + { // put formatted integer to _Dest + const _Mypunct& _Punct_fac = _USE(_Iosbase.getloc(), _Mypunct); + const string _Grouping = _Punct_fac.grouping(); + const size_t _Prefix = *_Buf == '+' || *_Buf == '-' ? 1 + : *_Buf == '0' && (_Buf[1] == 'x' || _Buf[1] == 'X') ? 2 + : 0; + + if (*_Grouping.c_str() != CHAR_MAX && '\0' < *_Grouping.c_str()) + { // grouping specified, add thousands separators + const char *_Pg = _Grouping.c_str(); + size_t _Off = _Count; + while (*_Pg != CHAR_MAX && '\0' < *_Pg + && (size_t)*_Pg < _Off - _Prefix) + { // add a comma to mark thousands separator + _Off -= *_Pg; + ::memmove(&_Buf[_Off + 1], &_Buf[_Off], + _Count + 1 - _Off); + _Buf[_Off] = ',', ++_Count; + if ('\0' < _Pg[1]) + ++_Pg; // not last group, advance + } + } + + size_t _Fillcount = _Iosbase.width() <= 0 + || (size_t)_Iosbase.width() <= _Count + ? 0 : (size_t)_Iosbase.width() - _Count; + + ios_base::fmtflags _Adjustfield = + _Iosbase.flags() & ios_base::adjustfield; + if (_Adjustfield != ios_base::left + && _Adjustfield != ios_base::internal) + { // put leading fill + _Dest = _Rep(_Dest, _Fill, _Fillcount); + _Fillcount = 0; + } + else if (_Adjustfield == ios_base::internal) + { // put internal fill + _Dest = _Putc(_Dest, _Buf, _Prefix); // put prefix + _Buf += _Prefix, _Count -= _Prefix; + _Dest = _Rep(_Dest, _Fill, _Fillcount), _Fillcount = 0; + } + + _Dest = _Putgrouped(_Dest, _Buf, _Count, + _Punct_fac.thousands_sep()); // put field + _Iosbase.width(0); + return (_Rep(_Dest, _Fill, _Fillcount)); // put trailing fill + } + + _OutIt __cdecl _Put(_OutIt _Dest, + const _Elem *_Ptr, size_t _Count) const + { // put [_Ptr, _Ptr + _Count) to _Dest + for (; 0 < _Count; --_Count, ++_Dest, ++_Ptr) + *_Dest = *_Ptr; + return (_Dest); + } + + _OutIt __cdecl _Putc(_OutIt _Dest, + const char *_Ptr, size_t _Count) const + { // put char sequence [_Ptr, _Ptr + _Count) to _Dest + for (; 0 < _Count; --_Count, ++_Dest, ++_Ptr) + *_Dest = _MAKLOCCHR(_Elem, *_Ptr, _Cvt); + return (_Dest); + } + + _OutIt __cdecl _Putgrouped(_OutIt _Dest, + const char *_Ptr, size_t _Count, _Elem _Kseparator) const + { // put char sequence [_Ptr, _Ptr + _Count) to _Dest with commas + for (; ; ++_Ptr, --_Count) + { // put field with thousands separators for commas + const char *_Pend = (const char *)::memchr(_Ptr, ',', _Count); + size_t _Groupsize = _Pend != 0 ? _Pend - _Ptr : _Count; + + _Dest = _Putc(_Dest, _Ptr, _Groupsize); + _Ptr += _Groupsize, _Count -= _Groupsize; + if (_Count == 0) + break; + if (_Kseparator != (_Elem)0) + _Dest = _Rep(_Dest, _Kseparator, 1); + } + return (_Dest); + } + + _OutIt __cdecl _Rep(_OutIt _Dest, + _Elem _Ch, size_t _Count) const + { // put _Count * _Ch to _Dest + for (; 0 < _Count; --_Count, ++_Dest) + *_Dest = _Ch; + return (_Dest); + } + }; + + // STATIC num_put::id OBJECT +template + locale::id num_put<_Elem, _OutIt>::id; + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 numpunct; +template class _CRTIMP2 num_get > >; +template class _CRTIMP2 num_put > >; + +template class _CRTIMP2 numpunct; +template class _CRTIMP2 num_get > >; +template class _CRTIMP2 num_put > >; + + + + #endif /* _DLL_CPPLIB */ +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _XLOCNUM_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xloctime b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xloctime new file mode 100644 index 00000000..683499cb --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xloctime @@ -0,0 +1,658 @@ +// xloctime internal header (from ) +#pragma once +#ifndef _XLOCTIME_ +#define _XLOCTIME_ +#include +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // STRUCT time_base +struct _CRTIMP2 time_base + : public locale::facet + { // base class for time_get + enum dateorder + { // constants for different orders of date components + no_order, dmy, mdy, ymd, ydm}; + + time_base(size_t _Refs = 0) + : locale::facet(_Refs) + { // default constructor + } + }; + + // TEMPLATE CLASS time_get +template > > + class time_get + : public time_base + { // facet for converting text to encoded times +public: + typedef _Elem char_type; + typedef _InIt iter_type; + + static locale::id id; // unique facet id + + dateorder date_order() const + { // return date order code + return (do_date_order()); + } + + _InIt get_time(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, tm *_Pt) const + { // get time of day from [_First, _Last) into _Pt + return (do_get_time(_First, _Last, _Iosbase, _State, _Pt)); + } + + _InIt get_date(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, tm *_Pt) const + { // get date from [_First, _Last) into _Pt + return (do_get_date(_First, _Last, _Iosbase, _State, _Pt)); + } + + _InIt get_weekday(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, tm *_Pt) const + { // get weekday from [_First, _Last) into _Pt + return (do_get_weekday(_First, _Last, _Iosbase, _State, _Pt)); + } + + _InIt get_monthname(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, tm *_Pt) const + { // get month from [_First, _Last) into _Pt + return (do_get_monthname(_First, _Last, _Iosbase, _State, _Pt)); + } + + _InIt get_year(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, tm *_Pt) const + { // get year from [_First, _Last) into _Pt + return (do_get_year(_First, _Last, _Iosbase, _State, _Pt)); + } + + explicit time_get(size_t _Refs = 0) + : time_base(_Refs) + { // construct from current locale + _Init(_Locinfo()); + } + + time_get(const _Locinfo& _Lobj, size_t _Refs = 0) + : time_base(_Refs) + { // construct from specified locale + _Init(_Lobj); + } + + static size_t __cdecl _Getcat(const locale::facet **_Ppf = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) + *_Ppf = _NEW_CRT time_get<_Elem, _InIt>; + return (_X_TIME); + } + +_PROTECTED: + virtual ~time_get() + { // destroy the object + _Tidy(); + } + +protected: + void _Init(const _Locinfo& _Lobj) + { // initialize from _Lobj + _Cvt = _Lobj._Getcvt(); + _Days = 0; + _Months = 0; + + _TRY_BEGIN + _Days = _MAKLOCSTR(_Elem, _Lobj._Getdays(), _Cvt); + _Months = _MAKLOCSTR(_Elem, _Lobj._Getmonths(), _Cvt); + _Dateorder = (dateorder)_Lobj._Getdateorder(); + _CATCH_ALL + _Tidy(); + _RERAISE; + _CATCH_END + } + + virtual dateorder do_date_order() const + { // return date order code + return (_Dateorder); + } + + virtual _InIt do_get_time(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, tm *_Pt) const + { // get time of day from [_First, _Last) into _Pt + const _Elem _Colon = _MAKLOCCHR(_Elem, ':', _Cvt); + _State |= _Getint(_First, _Last, 0, 23, _Pt->tm_hour); + + if (_State != ios_base::goodbit || *_First != _Colon) + _State |= ios_base::failbit; // hour field is bad + else + _State |= _Getint(++_First, _Last, 0, 59, _Pt->tm_min); + + if (_State != ios_base::goodbit || *_First != _Colon) + _State |= ios_base::failbit; // min field is bad + else + _State |= _Getint(++_First, _Last, 0, 59, _Pt->tm_sec); + return (_First); + } + + virtual _InIt do_get_date(_InIt _First, _InIt _Last, + ios_base& _Iosbase, ios_base::iostate& _State, tm *_Pt) const + { // get date from [_First, _Last) into _Pt + const _Elem _E0 = _MAKLOCCHR(_Elem, '0', _Cvt); + const _Elem _Colon = _MAKLOCCHR(_Elem, ':', _Cvt); + const _Elem _Comma = _MAKLOCCHR(_Elem, ',', _Cvt); + const _Elem _Slash = _MAKLOCCHR(_Elem, '/', _Cvt); + const _Elem _Space = _MAKLOCCHR(_Elem, ' ', _Cvt); + + dateorder _Dorder = date_order(); + if (_Dorder == no_order) + _Dorder = mdy; + + if (*_First < _E0 || _E0 + 9 < *_First) + { // begins with month name, assume mdy + _First = get_monthname(_First, _Last, _Iosbase, _State, _Pt); + _Dorder = mdy; + } + else if (_Dorder == mdy) + { // get month number + _State |= _Getint(_First, _Last, 1, 12, _Pt->tm_mon); + --_Pt->tm_mon; + } + else if (_Dorder == dmy) + _State |= _Getint(_First, _Last, 1, 31, _Pt->tm_mday); + else // ymd or ydm + _First = get_year(_First, _Last, _Iosbase, _State, _Pt); + + if (_State == ios_base::goodbit) + { // skip spaces [:,/] spaces + while (*_First == _Space) + ++_First; + if (*_First == _Colon || *_First == _Comma || *_First == _Slash) + ++_First; + while (*_First == _Space) + ++_First; + } + + if (_State != ios_base::goodbit) + ; + else if (*_First < _E0 || _E0 + 9 < *_First) + if (_Dorder == mdy) + _State |= ios_base::failbit; // error, month already seen + else + { // month name is second, like it or not + _First = get_monthname(_First, _Last, _Iosbase, _State, _Pt); + if (_Dorder == ydm) + _Dorder = ymd; + } + else if (_Dorder == dmy || _Dorder == ymd) + { // get month number + _State |= _Getint(_First, _Last, 1, 12, _Pt->tm_mon); + --_Pt->tm_mon; + } + else + _State |= _Getint(_First, _Last, 1, 31, _Pt->tm_mday); + + if (_State == ios_base::goodbit) + { // skip spaces [:,/] spaces + while (*_First == _Space) + ++_First; + if (*_First == _Colon || *_First == _Comma || *_First == _Slash) + ++_First; + while (*_First == _Space) + ++_First; + } + + if (_State != ios_base::goodbit) + ; + else if (*_First < _E0 || _E0 + 9 < *_First) + if (_Dorder != ydm) + _State |= ios_base::failbit; // error, month out of place + else + _First = get_monthname(_First, _Last, _Iosbase, _State, _Pt); + else if (_Dorder == ydm) + { // get month number + _State |= _Getint(_First, _Last, 1, 12, _Pt->tm_mon); + --_Pt->tm_mon; + } + else if (_Dorder == ymd) + _State |= _Getint(_First, _Last, 1, 31, _Pt->tm_mday); + else // mdy or dmy + _First = get_year(_First, _Last, _Iosbase, _State, _Pt); + + if (_First == _Last) + _State |= ios_base::eofbit; + return (_First); + } + + virtual _InIt do_get_weekday(_InIt _First, _InIt _Last, + ios_base&, ios_base::iostate& _State, tm *_Pt) const + { // get weekday from [_First, _Last) into _Pt + int _Num = _Getloctxt(_First, _Last, (size_t)0, _Days); + + if (_Num < 0) + _State |= ios_base::failbit; + else + _Pt->tm_wday = _Num >> 1; // set wday + return (_First); + } + + virtual _InIt do_get_monthname(_InIt _First, _InIt _Last, + ios_base&, ios_base::iostate& _State, tm *_Pt) const + { // get month from [_First, _Last) into _Pt + int _Num = _Getloctxt(_First, _Last, (size_t)0, _Months); + + if (_Num < 0) + _State |= ios_base::failbit; + else + _Pt->tm_mon = _Num >> 1; // set mon + return (_First); + } + + virtual _InIt do_get_year(_InIt _First, _InIt _Last, + ios_base&, ios_base::iostate& _State, tm *_Pt) const + { // get year from [_First, _Last) into _Pt + int _Ans = 0; + _State |= _Getint(_First, _Last, 0, 2035, _Ans); + + if (_State & ios_base::failbit) + ; + else if (1900 <= _Ans) + _Ans -= 1900; // [1900, ...) as is + else if (2035 - 1900 < _Ans) + _State |= ios_base::failbit; + + if (!(_State & ios_base::failbit)) + _Pt->tm_year = _Ans; // set year + return (_First); + } + +private: + ios_base::iostate __cdecl _Getint(_InIt& _First, _InIt& _Last, + int _Lo, int _Hi, int& _Val) const + { // get integer in range [_Lo, _Hi] from [_First, _Last) + const _Elem _E0 = _MAKLOCCHR(_Elem, '0', _Cvt); + char _Ac[_MAX_INT_DIG], *_Ep; + char *_Ptr = _Ac; + + if (_First == _Last) + ; + else if (*_First == _MAKLOCCHR(_Elem, '+', _Cvt)) + *_Ptr++ = '+', ++_First; // copy plus sign + else if (*_First == _MAKLOCCHR(_Elem, '-', _Cvt)) + *_Ptr++ = '-', ++_First; // copy minus sign + + bool _Seendigit = false; + while (_First != _Last && *_First == _E0) + _Seendigit = true, ++_First; // strip leading zeros + if (_Seendigit) + *_Ptr++ = '0'; // replace one or more with single zero + + for (char *const _Pe = &_Ac[_MAX_INT_DIG - 1]; _First != _Last + && _E0 <= *_First && *_First <= _E0 + 9; + _Seendigit = true, ++_First) + { // copy digits + *_Ptr = (*_First - _E0) + '0'; + if (_Ptr < _Pe) + ++_Ptr; // drop trailing digits if already too large + } + + if (!_Seendigit) + _Ptr = _Ac; + *_Ptr = '\0'; + errno = 0; + const long _Ans = ::strtol(_Ac, &_Ep, 10); + ios_base::iostate _State = ios_base::goodbit; + + if (_First == _Last) + _State |= ios_base::eofbit; + if (_Ep == _Ac || errno != 0 || _Ans < _Lo || _Hi < _Ans) + _State |= ios_base::failbit; // bad conversion + else + _Val = _Ans; // store valid result + return (_State); + } + + void _Tidy() + { // free all storage + _DELETE_CRT_VEC((void *)_Days); + _DELETE_CRT_VEC((void *)_Months); + } + + const _Elem *_Days; // ":Sun:Sunday:Mon:Monday..." for example + const _Elem *_Months; // "Jan:January:Feb:February..." for example + dateorder _Dateorder; + _Locinfo::_Cvtvec _Cvt; // conversion information + }; + + // STATIC time_get::id OBJECT +template + locale::id time_get<_Elem, _InIt>::id; + + // TEMPLATE CLASS time_get_byname +template > > + class time_get_byname + : public time_get<_Elem, _InIt> + { // time_get for named locale +public: + explicit time_get_byname(const char *_Locname, size_t _Refs = 0) + : time_get<_Elem, _InIt>(_Locinfo(_Locname), _Refs) + { // construct for named locale + } + +_PROTECTED: + virtual ~time_get_byname() + { // destroy the object + } + }; + + // TEMPLATE CLASS time_put +template > > + class time_put + : public locale::facet + { // facet for converting encoded times to text +public: + typedef _Elem char_type; + typedef _OutIt iter_type; + + _OutIt put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, const tm *_Pt, + const _Elem *_Fmtfirst, const _Elem *_Fmtlast) const + { // put formatted time from _Pt to _Dest for [_Fmtfirst, _Fmtlast) + const _Elem _Percent = _MAKLOCCHR(_Elem, '%', _Cvt); + + for (; _Fmtfirst != _Fmtlast; ++_Fmtfirst) + if (*_Fmtfirst != _Percent) + *_Dest++ = *_Fmtfirst; // copy literal element + else if (++_Fmtfirst == _Fmtlast) + { // treat trailing % as %% + *_Dest++ = _Percent; + break; + } + else + { // get specifier after % + char _Specifier = _MAKLOCBYTE(_Elem, *_Fmtfirst, _Cvt); + char _Qualifier = '\0'; + + if (_Specifier != 'E' && _Specifier != 'O' + && _Specifier != 'Q' && _Specifier != '#') + ; // not [E0Q#] qualifier, treat as specifier + else if (++_Fmtfirst == _Fmtlast) + { // no specifier, copy %[E0Q#] as literal elements + *_Dest++ = _Percent, *_Dest++ = _Specifier; + break; + } + else + { // save both qualifier and specifier + _Qualifier = _Specifier; + _Specifier = _MAKLOCBYTE(_Elem, *_Fmtfirst, _Cvt); + } + + _Dest = do_put(_Dest, _Iosbase, _Fill, _Pt, + _Specifier, _Qualifier); // convert a single field + } + return (_Dest); + } + + _OutIt put(_OutIt _Dest, ios_base& _Iosbase, _Elem _Fill, const tm *_Pt, + char _Specifier, char _Modifier = 0) const + { // put formatted time from _Pt to _Dest for _Specifier/_Modifier + return (do_put(_Dest, _Iosbase, _Fill, _Pt, _Specifier, _Modifier)); + } + + static locale::id id; // unique facet id + + explicit time_put(size_t _Refs = 0) + : locale::facet(_Refs) + { // construct from current locale + _Init(_Locinfo()); + } + + time_put(const _Locinfo& _Lobj, size_t _Refs = 0) + : locale::facet(_Refs) + { // construct from specified locale + _Init(_Lobj); + } + + static size_t __cdecl _Getcat(const locale::facet **_Ppf = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) + *_Ppf = _NEW_CRT time_put<_Elem, _OutIt>; + return (_X_TIME); + } + +_PROTECTED: + virtual ~time_put() + { // destroy the object + } + +protected: + void _Init(const _Locinfo& _Lobj) + { // initialize from _Lobj + _Cvt = _Lobj._Getcvt(); + _Tnames = _Lobj._Gettnames(); + } + + virtual _OutIt do_put(_OutIt _Dest, + ios_base&, _Elem, const tm *_Pt, + char _Specifier, char _Modifier = 0) const + { // put formatted time from _Pt to _Dest for [_Fmtfirst, _Fmtlast) + char _Fmt[5] = "!%x\0"; // '!' for nonzero count, null for modifier + size_t _Count, _Num; + string _Str; + + if (_Modifier == (_Elem)0) + _Fmt[2] = _Specifier; + else + _Fmt[2] = _Modifier, _Fmt[3] = _Specifier; + + for (_Num = 16; ; _Num *= 2) + { // convert into ever larger string buffer until success + _Str.append(_Num, '\0'); + if (0 < (_Count = _Strftime(&*_Str.begin(), _Str.size(), + _Fmt, _Pt, _Tnames._Getptr()))) + break; + } + + for (string::const_iterator _Snext = _Str.begin(); + 0 < --_Count; ++_Dest) // skip literal '!' + *_Dest = _MAKLOCCHR(_Elem, *++_Snext, _Cvt); + return (_Dest); + } + +private: + _Locinfo::_Timevec _Tnames; // locale-specific stuff for _Strftime + _Locinfo::_Cvtvec _Cvt; // conversion information + }; + + // STATIC time_put::id OBJECT +template + locale::id time_put<_Elem, _OutIt>::id; + + // CLASS time_put + +template + class _CRTIMP2 time_put + : public locale::facet + { // facet for converting encoded times to wchar_t text +public: + + + typedef wchar_t _Elem; + typedef _Elem char_type; + typedef _OutIt iter_type; + + _OutIt put(_OutIt _Dest, + ios_base& _Iosbase, _Elem _Fill, const tm *_Pt, + const _Elem *_Fmtfirst, const _Elem *_Fmtlast) const + { // put formatted time from _Pt to _Dest for [_Fmtfirst, _Fmtlast) + const _Elem _Percent = _MAKLOCCHR(_Elem, '%', _Cvt); + + for (; _Fmtfirst != _Fmtlast; ++_Fmtfirst) + if (*_Fmtfirst != _Percent) + *_Dest++ = *_Fmtfirst; // copy literal element + else if (++_Fmtfirst == _Fmtlast) + { // treat trailing % as %% + *_Dest++ = _Percent; + break; + } + else + { // get specifier after % + char _Specifier = _MAKLOCBYTE(_Elem, *_Fmtfirst, _Cvt); + char _Qualifier = '\0'; + + if (_Specifier != 'E' && _Specifier != 'O' + && _Specifier != 'Q' && _Specifier != '#') + ; // not [E0Q#] qualifier, treat as specifier + else if (++_Fmtfirst == _Fmtlast) + { // no specifier, copy %[E0Q#] as literal elements + *_Dest++ = _Percent, *_Dest++ = _Specifier; + break; + } + else + { // save both qualifier and specifier + _Qualifier = _Specifier; + _Specifier = _MAKLOCBYTE(_Elem, *_Fmtfirst, _Cvt); + } + + _Dest = do_put(_Dest, _Iosbase, _Fill, _Pt, + _Specifier, _Qualifier); // convert a single field + } + return (_Dest); + } + + _OutIt put(_OutIt _Dest, ios_base& _Iosbase, _Elem _Fill, const tm *_Pt, + char _Specifier, char _Modifier = 0) const + { // put formatted time from _Pt to _Dest for _Specifier/_Modifier + return (do_put(_Dest, _Iosbase, _Fill, _Pt, _Specifier, _Modifier)); + } + + static locale::id id; // unique facet id + + explicit time_put(size_t _Refs = 0) + : locale::facet(_Refs) + { // construct from current locale + _Init(_Locinfo()); + } + + time_put(const _Locinfo& _Lobj, size_t _Refs = 0) + : locale::facet(_Refs) + { // construct from specified locale + _Init(_Lobj); + } + + static size_t __cdecl _Getcat(const locale::facet **_Ppf = 0) + { // return locale category mask and construct standard facet + if (_Ppf != 0 && *_Ppf == 0) + *_Ppf = _NEW_CRT time_put<_Elem, _OutIt>; + return (_X_TIME); + } + +_PROTECTED: + virtual ~time_put() + { // destroy the object + } + +protected: + void _Init(const _Locinfo& _Lobj) + { // initialize from _Lobj + _Cvt = _Lobj._Getcvt(); + _Tnames = _Lobj._Gettnames(); + } + + virtual _OutIt do_put(_OutIt _Dest, + ios_base&, _Elem, const tm *_Pt, + char _Specifier, char _Modifier = 0) const + { // put formatted time from _Pt to _Dest for [_Fmtfirst, _Fmtlast) + char _Fmt[5] = "!%x\0"; // '!' for nonzero count, null for modifier + size_t _Count, _Num; + string _Str; + + if (_Modifier == (_Elem)0) + _Fmt[2] = _Specifier; + else + _Fmt[2] = _Modifier, _Fmt[3] = _Specifier; + + for (_Num = 16; ; _Num *= 2) + { // convert into ever larger string buffer until success + _Str.append(_Num, '\0'); + if (0 < (_Count = _Strftime(&*_Str.begin(), _Str.size(), + _Fmt, _Pt, _Tnames._Getptr()))) + break; + } + + int _Bytes; + _Mbstinit(_Mbst); + wchar_t _Wc; + --_Count; // skip '!' + for (string::const_iterator _Snext = _Str.begin() + 1; 0 < _Count; + _Count -= _Bytes, _Snext += _Bytes, *_Dest++ = _Wc) + switch (_Bytes = _Mbrtowc(&_Wc, &*_Snext, _Count, &_Mbst, &_Cvt)) + { // convert a wchar_t + case -2: // partial conversion + case -1: // failed conversion + return (_Dest); + + case 0: // may have converted null character + if (_Wc == L'\0') + _Bytes = (int)::strlen(&*_Snext) + 1; + } + return (_Dest); + } + +private: + _Locinfo::_Timevec _Tnames; // locale-specific stuff for _Strftime + _Locinfo::_Cvtvec _Cvt; // conversion information + }; + + // STATIC time_put::id OBJECT +template + locale::id time_put::id; + + + // TEMPLATE CLASS time_put_byname +template > > + class time_put_byname + : public time_put<_Elem, _OutIt> + { // time_put for named locale +public: + explicit time_put_byname(const char *_Locname, size_t _Refs = 0) + : time_put<_Elem, _OutIt>(_Locinfo(_Locname), _Refs) + { // construct for named locale + } + +_PROTECTED: + virtual ~time_put_byname() + { // destroy the object + } + }; + + #ifdef _DLL_CPPLIB +template class _CRTIMP2 time_get > >; +template class _CRTIMP2 time_put > >; + +template class _CRTIMP2 time_get > >; +template class _CRTIMP2 time_put > >; + + + + #endif /* _DLL_CPPLIB */ +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _XLOCTIME_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xmath.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xmath.h new file mode 100644 index 00000000..81001671 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xmath.h @@ -0,0 +1,125 @@ +/* xmath.h internal header for Microsoft C */ +#ifndef _XMATH +#define _XMATH +#include +#include +#include +#ifndef _YMATH + #include +#endif + +_STD_BEGIN + + /* FLOAT PROPERTIES */ +#define _DBIAS 0x3fe +#define _DOFF 4 +#define _FBIAS 0x7e +#define _FOFF 7 +#define _FRND 1 + + #define _D0 3 /* little-endian, small long doubles */ + #define _D1 2 + #define _D2 1 + #define _D3 0 + #define _DLONG 0 + #define _LBIAS 0x3fe + #define _LOFF 4 + + /* IEEE 754 double properties */ +#define _DFRAC ((unsigned short)((1 << _DOFF) - 1)) +#define _DMASK ((unsigned short)(0x7fff & ~_DFRAC)) +#define _DMAX ((unsigned short)((1 << (15 - _DOFF)) - 1)) +#define _DSIGN ((unsigned short)0x8000) +#define DSIGN(x) (((unsigned short *)&(x))[_D0] & _DSIGN) +#define HUGE_EXP (int)(_DMAX * 900L / 1000) +#define HUGE_RAD 2.73e9 /* ~ 2^33 / pi */ +#define SAFE_EXP ((unsigned short)(_DMAX >> 1)) + + /* IEEE 754 float properties */ +#define _FFRAC ((unsigned short)((1 << _FOFF) - 1)) +#define _FMASK ((unsigned short)(0x7fff & ~_FFRAC)) +#define _FMAX ((unsigned short)((1 << (15 - _FOFF)) - 1)) +#define _FSIGN ((unsigned short)0x8000) +#define FSIGN(x) (((unsigned short *)&(x))[_F0] & _FSIGN) +#define FHUGE_EXP (int)(_FMAX * 900L / 1000) +#define FHUGE_RAD 31.8 /* ~ 2^10 / pi */ +#define FSAFE_EXP ((unsigned short)(_FMAX >> 1)) + + #define _F0 1 /* little-endian order */ + #define _F1 0 + + /* IEEE 754 long double properties */ +#define _LFRAC ((unsigned short)(-1)) +#define _LMASK ((unsigned short)0x7fff) +#define _LMAX ((unsigned short)0x7fff) +#define _LSIGN ((unsigned short)0x8000) +#define LSIGN(x) (((unsigned short *)&(x))[_L0] & _LSIGN) +#define LHUGE_EXP (int)(_LMAX * 900L / 1000) +#define LHUGE_RAD 2.73e9 /* ~ 2^33 / pi */ +#define LSAFE_EXP ((unsigned short)(_LMAX >> 1)) + + #define _L0 3 /* little-endian, small long doubles */ + #define _L1 2 + #define _L2 1 + #define _L3 0 + #define _L4 xxx + + /* return values for testing functions */ +#define FINITE _FINITE +#define INF _INFCODE +#define NAN _NANCODE + + /* return values for _Stopfx/_Stoflt */ +#define FL_ERR 0 +#define FL_DEC 1 +#define FL_HEX 2 +#define FL_INF 3 +#define FL_NAN 4 +#define FL_NEG 8 + +_C_LIB_DECL + /* double declarations */ +_CRTIMP2 double __cdecl _Atan(double, int); +_CRTIMP2 short __cdecl _Dint(double *, short); +_CRTIMP2 short __cdecl _Dnorm(unsigned short *); +_CRTIMP2 short __cdecl _Dscale(double *, long); +_CRTIMP2 double __cdecl _Dtento(double, long); +_CRTIMP2 short __cdecl _Dunscale(short *, double *); +_CRTIMP2 double __cdecl _Poly(double, const double *, int); + +_CRTIMP2 int __cdecl _Stoflt(const char *, char **, long[], int); + +extern _CRTIMP2 const _Dconst _Eps, _Rteps; +extern _CRTIMP2 const double _Xbig; + + /* float declarations */ +_CRTIMP2 float __cdecl _FAtan(float, int); +_CRTIMP2 short __cdecl _FDint(float *, short); +_CRTIMP2 short __cdecl _FDnorm(unsigned short *); +_CRTIMP2 short __cdecl _FDscale(float *, long); +_CRTIMP2 float __cdecl _FDtento(float, long); +_CRTIMP2 short __cdecl _FDunscale(short *, float *); +_CRTIMP2 float __cdecl _FPoly(float, const float *, int); + +extern _CRTIMP2 const _Dconst _FEps, _FRteps; +extern _CRTIMP2 const float _FXbig; + + /* long double functions */ +_CRTIMP2 long double __cdecl _LAtan(long double, int); +_CRTIMP2 short __cdecl _LDint(long double *, short); +_CRTIMP2 short __cdecl _LDnorm(unsigned short *); +_CRTIMP2 short __cdecl _LDscale(long double *, long); +_CRTIMP2 long double __cdecl _LDtento(long double, long); +_CRTIMP2 short __cdecl _LDunscale(short *, long double *); +_CRTIMP2 long double __cdecl _LPoly(long double, const long double *, int); + +extern _CRTIMP2 const _Dconst _LEps, _LRteps; +extern _CRTIMP2 const long double _LXbig; +_END_C_LIB_DECL +_STD_END +#endif /* _XMATH */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xmemory b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xmemory new file mode 100644 index 00000000..1b24f5f6 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xmemory @@ -0,0 +1,264 @@ +// xmemory internal header (from ) +#pragma once +#ifndef _XMEMORY_ +#define _XMEMORY_ +#include +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) + + #pragma warning(disable: 4100) + +#ifndef _FARQ /* specify standard memory model */ + #define _FARQ + #define _PDFT ptrdiff_t + #define _SIZT size_t +#endif + + #define _CPOINTER_X(T, A) \ + typename A::template rebind::other::const_pointer + #define _CREFERENCE_X(T, A) \ + typename A::template rebind::other::const_reference + #define _POINTER_X(T, A) \ + typename A::template rebind::other::pointer + #define _REFERENCE_X(T, A) \ + typename A::template rebind::other::reference + +_STD_BEGIN + // TEMPLATE FUNCTION _Allocate +template inline + _Ty _FARQ *_Allocate(_SIZT _Count, _Ty _FARQ *) + { // allocate storage for _Count elements of type _Ty + return ((_Ty _FARQ *)operator new(_Count * sizeof (_Ty))); + } + + // TEMPLATE FUNCTION _Construct +template inline + void _Construct(_T1 _FARQ *_Ptr, const _T2& _Val) + { // construct object at _Ptr with value _Val + new ((void _FARQ *)_Ptr) _T1(_Val); + } + + // TEMPLATE FUNCTION _Destroy +template inline + void _Destroy(_Ty _FARQ *_Ptr) + { // destroy object at _Ptr + _DESTRUCTOR(_Ty, _Ptr); + } + +template<> inline + void _Destroy(char _FARQ *) + { // destroy a char (do nothing) + } + +template<> inline + void _Destroy(wchar_t _FARQ *) + { // destroy a wchar_t (do nothing) + } + + + // TEMPLATE CLASS _Allocator_base +template + struct _Allocator_base + { // base class for generic allocators + typedef _Ty value_type; + }; + + // TEMPLATE CLASS _Allocator_base +template + struct _Allocator_base + { // base class for generic allocators for const _Ty + typedef _Ty value_type; + }; + + // TEMPLATE CLASS allocator +template + class allocator + : public _Allocator_base<_Ty> + { // generic allocator for objects of class _Ty +public: + typedef _Allocator_base<_Ty> _Mybase; + typedef typename _Mybase::value_type value_type; + + + typedef value_type _FARQ *pointer; + typedef value_type _FARQ& reference; + typedef const value_type _FARQ *const_pointer; + typedef const value_type _FARQ& const_reference; + + typedef _SIZT size_type; + typedef _PDFT difference_type; + + template + struct rebind + { // convert an allocator<_Ty> to an allocator <_Other> + typedef allocator<_Other> other; + }; + + pointer address(reference _Val) const + { // return address of mutable _Val + return (&_Val); + } + + const_pointer address(const_reference _Val) const + { // return address of nonmutable _Val + return (&_Val); + } + + allocator() + { // construct default allocator (do nothing) + } + + allocator(const allocator<_Ty>&) + { // construct by copying (do nothing) + } + + template + allocator(const allocator<_Other>&) + { // construct from a related allocator (do nothing) + } + + template + allocator<_Ty>& operator=(const allocator<_Other>&) + { // assign from a related allocator (do nothing) + return (*this); + } + + void deallocate(pointer _Ptr, size_type) + { // deallocate object at _Ptr, ignore size + operator delete(_Ptr); + } + + pointer allocate(size_type _Count) + { // allocate array of _Count elements + return (_Allocate(_Count, (pointer)0)); + } + + pointer allocate(size_type _Count, const void _FARQ *) + { // allocate array of _Count elements, ignore hint + return (allocate(_Count)); + } + + void construct(pointer _Ptr, const _Ty& _Val) + { // construct object at _Ptr with value _Val + _Construct(_Ptr, _Val); + } + + void destroy(pointer _Ptr) + { // destroy object at _Ptr + _Destroy(_Ptr); + } + + _SIZT max_size() const + { // estimate maximum array size + _SIZT _Count = (_SIZT)(-1) / sizeof (_Ty); + return (0 < _Count ? _Count : 1); + } + }; + + // allocator TEMPLATE OPERATORS +template inline + bool operator==(const allocator<_Ty>&, const allocator<_Other>&) + { // test for allocator equality (always true) + return (true); + } + +template inline + bool operator!=(const allocator<_Ty>&, const allocator<_Other>&) + { // test for allocator inequality (always false) + return (false); + } + + // CLASS allocator +template<> class _CRTIMP2 allocator + { // generic allocator for type void +public: + typedef void _Ty; + typedef _Ty _FARQ *pointer; + typedef const _Ty _FARQ *const_pointer; + typedef _Ty value_type; + + template + struct rebind + { // convert an allocator to an allocator <_Other> + typedef allocator<_Other> other; + }; + + allocator() + { // construct default allocator (do nothing) + } + + allocator(const allocator<_Ty>&) + { // construct by copying (do nothing) + } + + template + allocator(const allocator<_Other>&) + { // construct from related allocator (do nothing) + } + + template + allocator<_Ty>& operator=(const allocator<_Other>&) + { // assign from a related allocator (do nothing) + return (*this); + } + }; + + // TEMPLATE FUNCTION _Destroy_range +template inline + void _Destroy_range(_Ty *_First, _Ty *_Last, _Alloc& _Al) + { // destroy [_First, _Last) + _Destroy_range(_First, _Last, _Al, _Ptr_cat(_First, _Last)); + } + +template inline + void _Destroy_range(_Ty *_First, _Ty *_Last, _Alloc& _Al, + _Nonscalar_ptr_iterator_tag) + { // destroy [_First, _Last), arbitrary type + for (; _First != _Last; ++_First) + _Al.destroy(_First); + } + +template inline + void _Destroy_range(_Ty *_First, _Ty *_Last, _Alloc& _Al, + _Scalar_ptr_iterator_tag) + { // destroy [_First, _Last), scalar type (do nothing) + } +_STD_END + + #pragma warning(default: 4100) + +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _XMEMORY_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + */ + +/* + * This file is derived from software bearing the following + * restrictions: + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this + * software and its documentation for any purpose is hereby + * granted without fee, provided that the above copyright notice + * appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation. + * Hewlett-Packard Company makes no representations about the + * suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xmmintrin.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xmmintrin.h new file mode 100644 index 00000000..0a7916bb --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xmmintrin.h @@ -0,0 +1,467 @@ +/** +*** Copyright (C) 1985-1999 Intel Corporation. All rights reserved. +*** +*** The information and source code contained herein is the exclusive +*** property of Intel Corporation and may not be disclosed, examined +*** or reproduced in whole or in part without explicit written authorization +*** from the company. +*** +**/ + +/* + * xmmintrin.h + * + * Principal header file for Streaming SIMD Extensions intrinsics + * + * The intrinsics package can be used in 2 ways, based whether or not + * _MM_FUNCTIONALITY is defined; if it is, the C/x87 implementation + * will be used (the "faux intrinsics"). + * + * + * Note that the m128 datatype provided using _MM2_FUNCTIONALITY mode is + * implemented as struct, will not be 128b aligned, will be passed + * via the stack, etc. MM_FUNCTIONALITY mode is not intended for + * performance, just semantics. + * + */ + +#ifndef _INCLUDED_MM2 +#define _INCLUDED_MM2 + + +/* + * the m64 type is required for the integer Streaming SIMD Extensions intrinsics + */ +#ifndef _MMINTRIN_H_INCLUDED +#include +#endif + +#ifdef _MM2_FUNCTIONALITY +/* support old notation */ +#ifndef _MM_FUNCTIONALITY +#define _MM_FUNCTIONALITY +#endif +#endif + +#ifdef __ICL +#ifdef _MM_FUNCTIONALITY +#include "xmm_func.h" +#else +/* using real intrinsics */ +typedef long long __m128; +#endif +#else + +#if _MSC_VER >= 1300 +typedef struct __declspec(intrin_type) __declspec(align(16)) __m128 { + float m128_f32[4]; +} __m128; +#endif + +#ifndef _INC_MALLOC +/* pick up _mm_malloc() and _mm_free() */ +#include +#endif +#endif + +/*******************************************************/ +/* MACRO for shuffle parameter for _mm_shuffle_ps(). */ +/* Argument fp3 is a digit[0123] that represents the fp*/ +/* from argument "b" of mm_shuffle_ps that will be */ +/* placed in fp3 of result. fp2 is the same for fp2 in */ +/* result. fp1 is a digit[0123] that represents the fp */ +/* from argument "a" of mm_shuffle_ps that will be */ +/* places in fp1 of result. fp0 is the same for fp0 of */ +/* result */ +/*******************************************************/ +#define _MM_SHUFFLE(fp3,fp2,fp1,fp0) (((fp3) << 6) | ((fp2) << 4) | \ + ((fp1) << 2) | ((fp0))) + + +/*******************************************************/ +/* MACRO for performing the transpose of a 4x4 matrix */ +/* of single precision floating point values. */ +/* Arguments row0, row1, row2, and row3 are __m128 */ +/* values whose elements form the corresponding rows */ +/* of a 4x4 matrix. The matrix transpose is returned */ +/* in arguments row0, row1, row2, and row3 where row0 */ +/* now holds column 0 of the original matrix, row1 now */ +/* holds column 1 of the original matrix, etc. */ +/*******************************************************/ +#define _MM_TRANSPOSE4_PS(row0, row1, row2, row3) { \ + __m128 tmp3, tmp2, tmp1, tmp0; \ + \ + tmp0 = _mm_shuffle_ps((row0), (row1), 0x44); \ + tmp2 = _mm_shuffle_ps((row0), (row1), 0xEE); \ + tmp1 = _mm_shuffle_ps((row2), (row3), 0x44); \ + tmp3 = _mm_shuffle_ps((row2), (row3), 0xEE); \ + \ + (row0) = _mm_shuffle_ps(tmp0, tmp1, 0x88); \ + (row1) = _mm_shuffle_ps(tmp0, tmp1, 0xDD); \ + (row2) = _mm_shuffle_ps(tmp2, tmp3, 0x88); \ + (row3) = _mm_shuffle_ps(tmp2, tmp3, 0xDD); \ + } + + +/* constants for use with _mm_prefetch */ +#define _MM_HINT_T0 1 +#define _MM_HINT_T1 2 +#define _MM_HINT_T2 3 +#define _MM_HINT_NTA 0 + +/* (this declspec not supported with 0.A or 0.B) */ +#define _MM_ALIGN16 __declspec(align(16)) + +/* MACRO functions for setting and reading the MXCSR */ +#define _MM_EXCEPT_MASK 0x003f +#define _MM_EXCEPT_INVALID 0x0001 +#define _MM_EXCEPT_DENORM 0x0002 +#define _MM_EXCEPT_DIV_ZERO 0x0004 +#define _MM_EXCEPT_OVERFLOW 0x0008 +#define _MM_EXCEPT_UNDERFLOW 0x0010 +#define _MM_EXCEPT_INEXACT 0x0020 + +#define _MM_MASK_MASK 0x1f80 +#define _MM_MASK_INVALID 0x0080 +#define _MM_MASK_DENORM 0x0100 +#define _MM_MASK_DIV_ZERO 0x0200 +#define _MM_MASK_OVERFLOW 0x0400 +#define _MM_MASK_UNDERFLOW 0x0800 +#define _MM_MASK_INEXACT 0x1000 + +#define _MM_ROUND_MASK 0x6000 +#define _MM_ROUND_NEAREST 0x0000 +#define _MM_ROUND_DOWN 0x2000 +#define _MM_ROUND_UP 0x4000 +#define _MM_ROUND_TOWARD_ZERO 0x6000 + +#define _MM_FLUSH_ZERO_MASK 0x8000 +#define _MM_FLUSH_ZERO_ON 0x8000 +#define _MM_FLUSH_ZERO_OFF 0x0000 + +#define _MM_SET_EXCEPTION_STATE(mask) \ + _mm_setcsr((_mm_getcsr() & ~_MM_EXCEPT_MASK) | (mask)) +#define _MM_GET_EXCEPTION_STATE() \ + (_mm_getcsr() & _MM_EXCEPT_MASK) + +#define _MM_SET_EXCEPTION_MASK(mask) \ + _mm_setcsr((_mm_getcsr() & ~_MM_MASK_MASK) | (mask)) +#define _MM_GET_EXCEPTION_MASK() \ + (_mm_getcsr() & _MM_MASK_MASK) + +#define _MM_SET_ROUNDING_MODE(mode) \ + _mm_setcsr((_mm_getcsr() & ~_MM_ROUND_MASK) | (mode)) +#define _MM_GET_ROUNDING_MODE() \ + (_mm_getcsr() & _MM_ROUND_MASK) + +#define _MM_SET_FLUSH_ZERO_MODE(mode) \ + _mm_setcsr((_mm_getcsr() & ~_MM_FLUSH_ZERO_MASK) | (mode)) +#define _MM_GET_FLUSH_ZERO_MODE(mode) \ + (_mm_getcsr() & _MM_FLUSH_ZERO_MASK) + +/*****************************************************/ +/* INTRINSICS FUNCTION PROTOTYPES START HERE */ +/*****************************************************/ + +#if defined __cplusplus +extern "C" { /* Begin "C" */ + /* Intrinsics use C name-mangling. */ +#endif /* __cplusplus */ + +/* + * FP, arithmetic + */ + +extern __m128 _mm_add_ss(__m128 a, __m128 b); +extern __m128 _mm_add_ps(__m128 a, __m128 b); +extern __m128 _mm_sub_ss(__m128 a, __m128 b); +extern __m128 _mm_sub_ps(__m128 a, __m128 b); +extern __m128 _mm_mul_ss(__m128 a, __m128 b); +extern __m128 _mm_mul_ps(__m128 a, __m128 b); +extern __m128 _mm_div_ss(__m128 a, __m128 b); +extern __m128 _mm_div_ps(__m128 a, __m128 b); +extern __m128 _mm_sqrt_ss(__m128 a); +extern __m128 _mm_sqrt_ps(__m128 a); +extern __m128 _mm_rcp_ss(__m128 a); +extern __m128 _mm_rcp_ps(__m128 a); +extern __m128 _mm_rsqrt_ss(__m128 a); +extern __m128 _mm_rsqrt_ps(__m128 a); +extern __m128 _mm_min_ss(__m128 a, __m128 b); +extern __m128 _mm_min_ps(__m128 a, __m128 b); +extern __m128 _mm_max_ss(__m128 a, __m128 b); +extern __m128 _mm_max_ps(__m128 a, __m128 b); + +/* + * FP, logical + */ + +extern __m128 _mm_and_ps(__m128 a, __m128 b); +extern __m128 _mm_andnot_ps(__m128 a, __m128 b); +extern __m128 _mm_or_ps(__m128 a, __m128 b); +extern __m128 _mm_xor_ps(__m128 a, __m128 b); + +/* + * FP, comparison + */ + +extern __m128 _mm_cmpeq_ss(__m128 a, __m128 b); +extern __m128 _mm_cmpeq_ps(__m128 a, __m128 b); +extern __m128 _mm_cmplt_ss(__m128 a, __m128 b); +extern __m128 _mm_cmplt_ps(__m128 a, __m128 b); +extern __m128 _mm_cmple_ss(__m128 a, __m128 b); +extern __m128 _mm_cmple_ps(__m128 a, __m128 b); +extern __m128 _mm_cmpgt_ss(__m128 a, __m128 b); +extern __m128 _mm_cmpgt_ps(__m128 a, __m128 b); +extern __m128 _mm_cmpge_ss(__m128 a, __m128 b); +extern __m128 _mm_cmpge_ps(__m128 a, __m128 b); +extern __m128 _mm_cmpneq_ss(__m128 a, __m128 b); +extern __m128 _mm_cmpneq_ps(__m128 a, __m128 b); +extern __m128 _mm_cmpnlt_ss(__m128 a, __m128 b); +extern __m128 _mm_cmpnlt_ps(__m128 a, __m128 b); +extern __m128 _mm_cmpnle_ss(__m128 a, __m128 b); +extern __m128 _mm_cmpnle_ps(__m128 a, __m128 b); +extern __m128 _mm_cmpngt_ss(__m128 a, __m128 b); +extern __m128 _mm_cmpngt_ps(__m128 a, __m128 b); +extern __m128 _mm_cmpnge_ss(__m128 a, __m128 b); +extern __m128 _mm_cmpnge_ps(__m128 a, __m128 b); +extern __m128 _mm_cmpord_ss(__m128 a, __m128 b); +extern __m128 _mm_cmpord_ps(__m128 a, __m128 b); +extern __m128 _mm_cmpunord_ss(__m128 a, __m128 b); +extern __m128 _mm_cmpunord_ps(__m128 a, __m128 b); +extern int _mm_comieq_ss(__m128 a, __m128 b); +extern int _mm_comilt_ss(__m128 a, __m128 b); +extern int _mm_comile_ss(__m128 a, __m128 b); +extern int _mm_comigt_ss(__m128 a, __m128 b); +extern int _mm_comige_ss(__m128 a, __m128 b); +extern int _mm_comineq_ss(__m128 a, __m128 b); +extern int _mm_ucomieq_ss(__m128 a, __m128 b); +extern int _mm_ucomilt_ss(__m128 a, __m128 b); +extern int _mm_ucomile_ss(__m128 a, __m128 b); +extern int _mm_ucomigt_ss(__m128 a, __m128 b); +extern int _mm_ucomige_ss(__m128 a, __m128 b); +extern int _mm_ucomineq_ss(__m128 a, __m128 b); + +/* + * FP, conversions + */ + +extern int _mm_cvt_ss2si(__m128 a); +extern __m64 _mm_cvt_ps2pi(__m128 a); +extern int _mm_cvtt_ss2si(__m128 a); +extern __m64 _mm_cvtt_ps2pi(__m128 a); +extern __m128 _mm_cvt_si2ss(__m128, int); +extern __m128 _mm_cvt_pi2ps(__m128, __m64); + +/* + * FP, misc + */ + +extern __m128 _mm_shuffle_ps(__m128 a, __m128 b, unsigned int imm8); +extern __m128 _mm_unpackhi_ps(__m128 a, __m128 b); +extern __m128 _mm_unpacklo_ps(__m128 a, __m128 b); +extern __m128 _mm_loadh_pi(__m128, __m64 const*); +extern __m128 _mm_movehl_ps(__m128, __m128); +extern __m128 _mm_movelh_ps(__m128, __m128); +extern void _mm_storeh_pi(__m64 *, __m128); +extern __m128 _mm_loadl_pi(__m128, __m64 const*); +extern void _mm_storel_pi(__m64 *, __m128); +extern int _mm_movemask_ps(__m128 a); + + +/* + * Integer extensions + */ +extern int _m_pextrw(__m64, int); +extern __m64 _m_pinsrw(__m64, int, int); +extern __m64 _m_pmaxsw(__m64, __m64); +extern __m64 _m_pmaxub(__m64, __m64); +extern __m64 _m_pminsw(__m64, __m64); +extern __m64 _m_pminub(__m64, __m64); +extern int _m_pmovmskb(__m64); +extern __m64 _m_pmulhuw(__m64, __m64); +extern __m64 _m_pshufw(__m64, int); +extern void _m_maskmovq(__m64, __m64, char *); +extern __m64 _m_pavgb(__m64, __m64); +extern __m64 _m_pavgw(__m64, __m64); +extern __m64 _m_psadbw(__m64, __m64); + +/* + * memory & initialization + */ + +extern __m128 _mm_set_ss(float a); +extern __m128 _mm_set_ps1(float a); +extern __m128 _mm_set_ps(float a, float b, float c, float d); +extern __m128 _mm_setr_ps(float a, float b, float c, float d); +extern __m128 _mm_setzero_ps(void); +extern __m128 _mm_load_ss(float const*a); +extern __m128 _mm_load_ps1(float const*a); +extern __m128 _mm_load_ps(float const*a); +extern __m128 _mm_loadr_ps(float const*a); +extern __m128 _mm_loadu_ps(float const*a); +extern void _mm_store_ss(float *v, __m128 a); +extern void _mm_store_ps1(float *v, __m128 a); +extern void _mm_store_ps(float *v, __m128 a); +extern void _mm_storer_ps(float *v, __m128 a); +extern void _mm_storeu_ps(float *v, __m128 a); +extern void _mm_prefetch(char const*a, int sel); +extern void _mm_stream_pi(__m64 *, __m64); +extern void _mm_stream_ps(float *, __m128); +extern __m128 _mm_move_ss(__m128 a, __m128 b); + +extern void _mm_sfence(void); +extern unsigned int _mm_getcsr(void); +extern void _mm_setcsr(unsigned int); + +#ifdef __ICL +extern void* __cdecl _mm_malloc(int siz, int al); +extern void __cdecl _mm_free(void *p); +#endif + +/* Alternate intrinsic names definition */ +#define _mm_cvtss_si32 _mm_cvt_ss2si +#define _mm_cvtps_pi32 _mm_cvt_ps2pi +#define _mm_cvttss_si32 _mm_cvtt_ss2si +#define _mm_cvttps_pi32 _mm_cvtt_ps2pi +#define _mm_cvtsi32_ss _mm_cvt_si2ss +#define _mm_cvtpi32_ps _mm_cvt_pi2ps +#define _mm_extract_pi16 _m_pextrw +#define _mm_insert_pi16 _m_pinsrw +#define _mm_max_pi16 _m_pmaxsw +#define _mm_max_pu8 _m_pmaxub +#define _mm_min_pi16 _m_pminsw +#define _mm_min_pu8 _m_pminub +#define _mm_movemask_pi8 _m_pmovmskb +#define _mm_mulhi_pu16 _m_pmulhuw +#define _mm_shuffle_pi16 _m_pshufw +#define _mm_maskmove_si64 _m_maskmovq +#define _mm_avg_pu8 _m_pavgb +#define _mm_avg_pu16 _m_pavgw +#define _mm_sad_pu8 _m_psadbw +#define _mm_set1_ps _mm_set_ps1 +#define _mm_load1_ps _mm_load_ps1 +#define _mm_store1_ps _mm_store_ps1 + +/******************************************************/ +/* UTILITY INTRINSICS FUNCTION DEFINITIONS START HERE */ +/******************************************************/ + +/*********************************************************/ +/* NAME : _mm_cvtpi16_ps */ +/* DESCRIPTION : Convert 4 16-bit signed integer values */ +/* to 4 single-precision float values */ +/* IN : __m64 a */ +/* OUT : none */ +/* RETURN : __m128 : (float)a */ +/*********************************************************/ +__inline __m128 _mm_cvtpi16_ps(__m64 a) +{ + __m128 tmp; + __m64 ext_val = _mm_cmpgt_pi16(_mm_setzero_si64(), a); + + tmp = _mm_cvtpi32_ps(_mm_setzero_ps(), _mm_unpackhi_pi16(a, ext_val)); + return(_mm_cvtpi32_ps(_mm_movelh_ps(tmp, tmp), + _mm_unpacklo_pi16(a, ext_val))); +} + + +/***********************************************************/ +/* NAME : _mm_cvtpu16_ps */ +/* DESCRIPTION : Convert 4 16-bit unsigned integer values */ +/* to 4 single-precision float values */ +/* IN : __m64 a */ +/* OUT : none */ +/* RETURN : __m128 : (float)a */ +/***********************************************************/ +__inline __m128 _mm_cvtpu16_ps(__m64 a) +{ + __m128 tmp; + __m64 ext_val = _mm_setzero_si64(); + + tmp = _mm_cvtpi32_ps(_mm_setzero_ps(), _mm_unpackhi_pi16(a, ext_val)); + return(_mm_cvtpi32_ps(_mm_movelh_ps(tmp, tmp), + _mm_unpacklo_pi16(a, ext_val))); +} + + +/******************************************************/ +/* NAME : _mm_cvtps_pi16 */ +/* DESCRIPTION : Convert 4 single-precision float */ +/* values to 4 16-bit integer values */ +/* IN : __m128 a */ +/* OUT : none */ +/* RETURN : __m64 : (short)a */ +/******************************************************/ +__inline __m64 _mm_cvtps_pi16(__m128 a) +{ + return _mm_packs_pi32(_mm_cvtps_pi32(a), + _mm_cvtps_pi32(_mm_movehl_ps(a, a))); +} + + +/******************************************************/ +/* NAME : _mm_cvtpi8_ps */ +/* DESCRIPTION : Convert 4 8-bit integer values to 4 */ +/* single-precision float values */ +/* IN : __m64 a */ +/* OUT : none */ +/* RETURN : __m128 : (float)a */ +/******************************************************/ +__inline __m128 _mm_cvtpi8_ps(__m64 a) +{ + __m64 ext_val = _mm_cmpgt_pi8(_mm_setzero_si64(), a); + + return _mm_cvtpi16_ps(_mm_unpacklo_pi8(a, ext_val)); +} + + +/******************************************************/ +/* NAME : _mm_cvtpu8_ps */ +/* DESCRIPTION : Convert 4 8-bit unsigned integer */ +/* values to 4 single-precision float */ +/* values */ +/* IN : __m64 a */ +/* OUT : none */ +/* RETURN : __m128 : (float)a */ +/******************************************************/ +__inline __m128 _mm_cvtpu8_ps(__m64 a) +{ + return _mm_cvtpu16_ps(_mm_unpacklo_pi8(a, _mm_setzero_si64())); +} + + +/******************************************************/ +/* NAME : _mm_cvtps_pi8 */ +/* DESCRIPTION : Convert 4 single-precision float */ +/* values to 4 8-bit integer values */ +/* IN : __m128 a */ +/* OUT : none */ +/* RETURN : __m64 : (char)a */ +/******************************************************/ +__inline __m64 _mm_cvtps_pi8(__m128 a) +{ + return _mm_packs_pi16(_mm_cvtps_pi16(a), _mm_setzero_si64()); +} + + +/******************************************************/ +/* NAME : _mm_cvtpi32x2_ps */ +/* DESCRIPTION : Convert 4 32-bit integer values */ +/* to 4 single-precision float values */ +/* IN : __m64 a : operand 1 */ +/* __m64 b : operand 2 */ +/* OUT : none */ +/* RETURN : __m128 : (float)a,(float)b */ +/******************************************************/ +__inline __m128 _mm_cvtpi32x2_ps(__m64 a, __m64 b) +{ + return _mm_movelh_ps(_mm_cvt_pi2ps(_mm_setzero_ps(), a), + _mm_cvt_pi2ps(_mm_setzero_ps(), b)); +} + + +#if defined __cplusplus +}; /* End "C" */ +#endif /* __cplusplus */ + +#endif /* _INCLUDED_MM2 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xstddef b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xstddef new file mode 100644 index 00000000..1a31c374 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xstddef @@ -0,0 +1,81 @@ +// xstddef standard header +#pragma once +#ifndef _XSTDDEF_ +#define _XSTDDEF_ +#ifndef _YVALS + #include +#endif /* _YVALS */ + +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + // EXCEPTION MACROS + + #if _HAS_EXCEPTIONS + #define _TRY_BEGIN try { + #define _CATCH(x) } catch (x) { + #define _CATCH_ALL } catch (...) { + #define _CATCH_END } + + #define _RAISE(x) throw (x) + #define _RERAISE throw + + #define _THROW0() throw () + #define _THROW1(x) throw (...) + #define _THROW(x, y) throw x(y) + + #else /* _HAS_EXCEPTIONS */ + #define _TRY_BEGIN {{ + #define _CATCH(x) } if (0) { + #define _CATCH_ALL } if (0) { + #define _CATCH_END }} + + #define _RAISE(x) _Throw(x) + #define _RERAISE + + #define _THROW0() + #define _THROW1(x) + #define _THROW(x, y) x(y)._Raise() + #endif /* _HAS_EXCEPTIONS */ + + // BITMASK MACROS + #define _BITMASK(Enum, Ty) typedef int Ty + + #define _BITMASK_OPS(Ty) + + // MISCELLANEOUS MACROS +#define _DESTRUCTOR(ty, ptr) (ptr)->~ty() +#define _MESG(str) str +#define _PROTECTED protected + + #define _TDEF(x) = x + #define _TDEF2(x, y) = x, y + + #define _STCONS(ty, name, val) static const ty name = (ty)(val) + + #ifndef _XSTD + #define _X_STD_BEGIN _STD_BEGIN + #define _X_STD_END _STD_END + #define _XSTD std::/* LEAVE SPACE */ + #endif /* _XSTD */ + + // TYPE DEFINITIONS +enum _Uninitialized + { // tag for suppressing initialization + _Noinit}; + + // FUNCTIONS +_CRTIMP2 void __cdecl _Nomemory(); +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _XSTDDEF_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xstring b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xstring new file mode 100644 index 00000000..6cf17dca --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xstring @@ -0,0 +1,1587 @@ +// xstring internal header (from ) +#pragma once +#ifndef _XSTRING_ +#define _XSTRING_ +#include + +#pragma pack(push,8) +#pragma warning(push,3) +_STD_BEGIN + + #pragma warning(disable:4251) + + // CLASS _String_base +class _CRTIMP2 _String_base + { // ultimate base class for basic_string to hold error reporters +public: + void _Xlen() const; // report a length_error + + void _Xran() const; // report an out_of_range error + }; + + // TEMPLATE CLASS _String_val +template + class _String_val + : public _String_base + { // base class for basic_string to hold allocator _Alval +protected: + typedef typename _Alloc::template + rebind<_Ty>::other _Alty; + + _String_val(_Alty _Al = _Alty()) + : _Alval(_Al) + { // construct allocator from _Al + } + + _Alty _Alval; // allocator object for strings + }; + + // TEMPLATE CLASS basic_string +template, + class _Ax = allocator<_Elem> > + class basic_string + : public _String_val<_Elem, _Ax> + { // null-terminated transparent array of elements +public: + typedef basic_string<_Elem, _Traits, _Ax> _Myt; + typedef _String_val<_Elem, _Ax> _Mybase; + typedef typename _Mybase::_Alty _Alloc; + typedef typename _Alloc::size_type size_type; + typedef typename _Alloc::difference_type _Dift; + typedef _Dift difference_type; + typedef typename _Alloc::pointer _Tptr; + typedef typename _Alloc::const_pointer _Ctptr; + typedef _Tptr pointer; + typedef _Ctptr const_pointer; + typedef typename _Alloc::reference _Reft; + typedef _Reft reference; + typedef typename _Alloc::const_reference const_reference; + typedef typename _Alloc::value_type value_type; + + #define _ITER_BASE(it) (it)._Myptr + // CLASS const_iterator + class const_iterator; + friend class const_iterator; + + class const_iterator + : public _Ranit<_Elem, _Dift, _Ctptr, const_reference> + { // iterator for nonmutable string + public: + typedef random_access_iterator_tag iterator_category; + typedef _Elem value_type; + typedef _Dift difference_type; + typedef _Ctptr pointer; + typedef const_reference reference; + + const_iterator() + { // construct with null pointer + _Myptr = 0; + } + + #define _STRING_CONST_ITERATOR(ptr) const_iterator(ptr) + const_iterator(_Ctptr _Ptr) + { // construct with pointer _Ptr + _Myptr = _Ptr; + } + + const_reference operator*() const + { // return designated object + + + return (*_Myptr); + } + + _Ctptr operator->() const + { // return pointer to class object + return (&**this); + } + + const_iterator& operator++() + { // preincrement + ++_Myptr; + return (*this); + } + + const_iterator operator++(int) + { // postincrement + const_iterator _Tmp = *this; + ++*this; + return (_Tmp); + } + + const_iterator& operator--() + { // predecrement + --_Myptr; + return (*this); + } + + const_iterator operator--(int) + { // postdecrement + const_iterator _Tmp = *this; + --*this; + return (_Tmp); + } + + const_iterator& operator+=(difference_type _Off) + { // increment by integer + _Myptr += _Off; + return (*this); + } + + const_iterator operator+(difference_type _Off) const + { // return this + integer + const_iterator _Tmp = *this; + return (_Tmp += _Off); + } + + const_iterator& operator-=(difference_type _Off) + { // decrement by integer + return (*this += -_Off); + } + + const_iterator operator-(difference_type _Off) const + { // return this - integer + const_iterator _Tmp = *this; + return (_Tmp -= _Off); + } + + difference_type operator-(const const_iterator& _Right) const + { // return difference of iterators + + + return (_Myptr - _Right._Myptr); + } + + const_reference operator[](difference_type _Off) const + { // subscript + return (*(*this + _Off)); + } + + bool operator==(const const_iterator& _Right) const + { // test for iterator equality + + + return (_Myptr == _Right._Myptr); + } + + bool operator!=(const const_iterator& _Right) const + { // test for iterator inequality + return (!(*this == _Right)); + } + + bool operator<(const const_iterator& _Right) const + { // test if this < _Right + + + return (_Myptr < _Right._Myptr); + } + + bool operator>(const const_iterator& _Right) const + { // test if this > _Right + return (_Right < *this); + } + + bool operator<=(const const_iterator& _Right) const + { // test if this <= _Right + return (!(_Right < *this)); + } + + bool operator>=(const const_iterator& _Right) const + { // test if this >= _Right + return (!(*this < _Right)); + } + + friend const_iterator operator+(difference_type _Off, + const const_iterator& _Right) + { // return iterator + integer + return (_Right + _Off); + } + + + _Ctptr _Myptr; // offset of element in string + }; + + // CLASS iterator + class iterator; + friend class iterator; + + class iterator + : public const_iterator + { // iterator for mutable string + public: + typedef random_access_iterator_tag iterator_category; + typedef _Elem value_type; + typedef _Dift difference_type; + typedef _Tptr pointer; + typedef _Reft reference; + + iterator() + { // construct with null string pointer + } + + #define _STRING_ITERATOR(ptr) iterator(ptr) + iterator(pointer _Ptr) + : const_iterator(_Ptr) + { // construct with pointer _Ptr + } + + reference operator*() const + { // return designated object + return ((reference)**(const_iterator *)this); + } + + _Tptr operator->() const + { // return pointer to class object + return (&**this); + } + + iterator& operator++() + { // preincrement + ++this->_Myptr; + return (*this); + } + + iterator operator++(int) + { // postincrement + iterator _Tmp = *this; + ++*this; + return (_Tmp); + } + + iterator& operator--() + { // predecrement + --this->_Myptr; + return (*this); + } + + iterator operator--(int) + { // postdecrement + iterator _Tmp = *this; + --*this; + return (_Tmp); + } + + iterator& operator+=(difference_type _Off) + { // increment by integer + this->_Myptr += _Off; + return (*this); + } + + iterator operator+(difference_type _Off) const + { // return this + integer + iterator _Tmp = *this; + return (_Tmp += _Off); + } + + iterator& operator-=(difference_type _Off) + { // decrement by integer + return (*this += -_Off); + } + + iterator operator-(difference_type _Off) const + { // return this - integer + iterator _Tmp = *this; + return (_Tmp -= _Off); + } + + difference_type operator-(const const_iterator& _Right) const + { // return difference of iterators + return ((const_iterator)*this - _Right); + } + + reference operator[](difference_type _Off) const + { // subscript + return (*(*this + _Off)); + } + + friend iterator operator+(difference_type _Off, + const iterator& _Right) + { // return iterator + integer + return (_Right + _Off); + } + }; + + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + + basic_string() + : _Mybase() + { // construct empty string + _Tidy(); + } + + explicit basic_string(const _Alloc& _Al) + : _Mybase(_Al) + { // construct empty string with allocator + _Tidy(); + } + + basic_string(const _Myt& _Right) + : _Mybase(_Right._Alval) + { // construct by copying _Right + _Tidy(); + assign(_Right, 0, npos); + } + + basic_string(const _Myt& _Right, size_type _Roff, + size_type _Count = npos) + : _Mybase() + { // construct from _Right [_Roff, _Roff + _Count) + _Tidy(); + assign(_Right, _Roff, _Count); + } + + basic_string(const _Myt& _Right, size_type _Roff, size_type _Count, + const _Alloc& _Al) + : _Mybase(_Al) + { // construct from _Right [_Roff, _Roff + _Count) with allocator + _Tidy(); + assign(_Right, _Roff, _Count); + } + + basic_string(const _Elem *_Ptr, size_type _Count) + : _Mybase() + { // construct from [_Ptr, _Ptr + _Count) + _Tidy(); + assign(_Ptr, _Count); + } + + basic_string(const _Elem *_Ptr, size_type _Count, const _Alloc& _Al) + : _Mybase(_Al) + { // construct from [_Ptr, _Ptr + _Count) with allocator + _Tidy(); + assign(_Ptr, _Count); + } + + basic_string(const _Elem *_Ptr) + : _Mybase() + { // construct from [_Ptr, ) + _Tidy(); + assign(_Ptr); + } + + basic_string(const _Elem *_Ptr, const _Alloc& _Al) + : _Mybase(_Al) + { // construct from [_Ptr, ) with allocator + _Tidy(); + assign(_Ptr); + } + + basic_string(size_type _Count, _Elem _Ch) + : _Mybase() + { // construct from _Count * _Ch + _Tidy(); + assign(_Count, _Ch); + } + + basic_string(size_type _Count, _Elem _Ch, const _Alloc& _Al) + : _Mybase(_Al) + { // construct from _Count * _Ch with allocator + _Tidy(); + assign(_Count, _Ch); + } + + template + basic_string(_It _First, _It _Last) + : _Mybase() + { // construct from [_First, _Last) + _Tidy(); + _Construct(_First, _Last, _Iter_cat(_First)); + } + + template + basic_string(_It _First, _It _Last, const _Alloc& _Al) + : _Mybase(_Al) + { // construct from [_First, _Last) with allocator + _Tidy(); + _Construct(_First, _Last, _Iter_cat(_First)); + } + + template + void _Construct(_It _Count, + _It _Ch, _Int_iterator_tag) + { // initialize from _Count * _Ch + assign((size_type)_Count, (_Elem)_Ch); + } + + template + void _Construct(_It _First, + _It _Last, input_iterator_tag) + { // initialize from [_First, _Last), input iterators + _TRY_BEGIN + for (; _First != _Last; ++_First) + append((size_type)1, (_Elem)*_First); + _CATCH_ALL + _Tidy(true); + _RERAISE; + _CATCH_END + } + + template + void _Construct(_It _First, + _It _Last, forward_iterator_tag) + { // initialize from [_First, _Last), forward iterators + size_type _Count = 0; + _Distance(_First, _Last, _Count); + reserve(_Count); + + _TRY_BEGIN + for (; _First != _Last; ++_First) + append((size_type)1, (_Elem)*_First); + _CATCH_ALL + _Tidy(true); + _RERAISE; + _CATCH_END + } + + basic_string(const_pointer _First, const_pointer _Last) + : _Mybase() + { // construct from [_First, _Last), const pointers + _Tidy(); + if (_First != _Last) + assign(&*_First, _Last - _First); + } + + basic_string(const_iterator _First, const_iterator _Last) + : _Mybase() + { // construct from [_First, _Last), const_iterators + _Tidy(); + if (_First != _Last) + assign(&*_First, _Last - _First); + } + + ~basic_string() + { // destroy the string + _Tidy(true); + } + + typedef _Traits traits_type; + typedef _Alloc allocator_type; + + static const size_type npos; // generic bad/missing length/position + + _Myt& operator=(const _Myt& _Right) + { // assign _Right + return (assign(_Right)); + } + + _Myt& operator=(const _Elem *_Ptr) + { // assign [_Ptr, ) + return (assign(_Ptr)); + } + + _Myt& operator=(_Elem _Ch) + { // assign 1 * _Ch + return (assign(1, _Ch)); + } + + _Myt& operator+=(const _Myt& _Right) + { // append _Right + return (append(_Right)); + } + + _Myt& operator+=(const _Elem *_Ptr) + { // append [_Ptr, ) + return (append(_Ptr)); + } + + _Myt& operator+=(_Elem _Ch) + { // append 1 * _Ch + return (append((size_type)1, _Ch)); + } + + _Myt& append(const _Myt& _Right) + { // append _Right + return (append(_Right, 0, npos)); + } + + _Myt& append(const _Myt& _Right, + size_type _Roff, size_type _Count) + { // append _Right [_Roff, _Roff + _Count) + if (_Right.size() < _Roff) + _String_base::_Xran(); // _Roff off end + size_type _Num = _Right.size() - _Roff; + if (_Num < _Count) + _Count = _Num; // trim _Count to size + if (npos - _Mysize <= _Count) + _String_base::_Xlen(); // result too long + + if (0 < _Count && _Grow(_Num = _Mysize + _Count)) + { // make room and append new stuff + _Traits::copy(_Myptr() + _Mysize, + _Right._Myptr() + _Roff, _Count); + _Eos(_Num); + } + return (*this); + } + + _Myt& append(const _Elem *_Ptr, size_type _Count) + { // append [_Ptr, _Ptr + _Count) + if (_Inside(_Ptr)) + return (append(*this, _Ptr - _Myptr(), _Count)); // substring + if (npos - _Mysize <= _Count) + _String_base::_Xlen(); // result too long + + size_type _Num; + if (0 < _Count && _Grow(_Num = _Mysize + _Count)) + { // make room and append new stuff + _Traits::copy(_Myptr() + _Mysize, _Ptr, _Count); + _Eos(_Num); + } + return (*this); + } + + _Myt& append(const _Elem *_Ptr) + { // append [_Ptr, ) + return (append(_Ptr, _Traits::length(_Ptr))); + } + + _Myt& append(size_type _Count, _Elem _Ch) + { // append _Count * _Ch + if (npos - _Mysize <= _Count) + _String_base::_Xlen(); // result too long + + size_type _Num; + if (0 < _Count && _Grow(_Num = _Mysize + _Count)) + { // make room and append new stuff using assign + _Traits::assign(_Myptr() + _Mysize, _Count, _Ch); + _Eos(_Num); + } + return (*this); + } + + template + _Myt& append(_It _First, _It _Last) + { // append [_First, _Last) + return (_Append(_First, _Last, _Iter_cat(_First))); + } + + template + _Myt& _Append(_It _Count, _It _Ch, _Int_iterator_tag) + { // append _Count * _Ch + return (append((size_type)_Count, (_Elem)_Ch)); + } + + template + _Myt& _Append(_It _First, _It _Last, input_iterator_tag) + { // append [_First, _Last), input iterators + return (replace(end(), end(), _First, _Last)); + } + + _Myt& append(const_pointer _First, const_pointer _Last) + { // append [_First, _Last), const pointers + return (replace(end(), end(), _First, _Last)); + } + + _Myt& append(const_iterator _First, const_iterator _Last) + { // append [_First, _Last), const_iterators + return (replace(end(), end(), _First, _Last)); + } + + _Myt& assign(const _Myt& _Right) + { // assign _Right + return (assign(_Right, 0, npos)); + } + + _Myt& assign(const _Myt& _Right, + size_type _Roff, size_type _Count) + { // assign _Right [_Roff, _Roff + _Count) + if (_Right.size() < _Roff) + _String_base::_Xran(); // _Roff off end + size_type _Num = _Right.size() - _Roff; + if (_Count < _Num) + _Num = _Count; // trim _Num to size + + if (this == &_Right) + erase((size_type)(_Roff + _Num)), erase(0, _Roff); // substring + else if (_Grow(_Num)) + { // make room and assign new stuff + _Traits::copy(_Myptr(), _Right._Myptr() + _Roff, _Num); + _Eos(_Num); + } + return (*this); + } + + _Myt& assign(const _Elem *_Ptr, size_type _Num) + { // assign [_Ptr, _Ptr + _Num) + if (_Inside(_Ptr)) + return (assign(*this, _Ptr - _Myptr(), _Num)); // substring + + if (_Grow(_Num)) + { // make room and assign new stuff + _Traits::copy(_Myptr(), _Ptr, _Num); + _Eos(_Num); + } + return (*this); + } + + _Myt& assign(const _Elem *_Ptr) + { // assign [_Ptr, ) + return (assign(_Ptr, _Traits::length(_Ptr))); + } + + _Myt& assign(size_type _Count, _Elem _Ch) + { // assign _Count * _Ch + if (_Count == npos) + _String_base::_Xlen(); // result too long + + if (_Grow(_Count)) + { // make room and assign new stuff + _Traits::assign(_Myptr(), _Count, _Ch); + _Eos(_Count); + } + return (*this); + } + + template + _Myt& assign(_It _First, _It _Last) + { // assign [First, _Last) + return (_Assign(_First, _Last, _Iter_cat(_First))); + } + + template + _Myt& _Assign(_It _Count, _It _Ch, _Int_iterator_tag) + { // assign _Count * _Ch + return (assign((size_type)_Count, (_Elem)_Ch)); + } + + template + _Myt& _Assign(_It _First, _It _Last, input_iterator_tag) + { // assign [First, _Last), input iterators + return (replace(begin(), end(), _First, _Last)); + } + + _Myt& assign(const_pointer _First, const_pointer _Last) + { // assign [First, _Last), const pointers + return (replace(begin(), end(), _First, _Last)); + } + + _Myt& assign(const_iterator _First, const_iterator _Last) + { // assign [First, _Last), const_iterators + return (replace(begin(), end(), _First, _Last)); + } + + _Myt& insert(size_type _Off, const _Myt& _Right) + { // insert _Right at _Off + return (insert(_Off, _Right, 0, npos)); + } + + _Myt& insert(size_type _Off, + const _Myt& _Right, size_type _Roff, size_type _Count) + { // insert _Right [_Roff, _Roff + _Count) at _Off + if (_Mysize < _Off || _Right.size() < _Roff) + _String_base::_Xran(); // _Off or _Roff off end + size_type _Num = _Right.size() - _Roff; + if (_Num < _Count) + _Count = _Num; // trim _Count to size + if (npos - _Mysize <= _Count) + _String_base::_Xlen(); // result too long + + if (0 < _Count && _Grow(_Num = _Mysize + _Count)) + { // make room and insert new stuff + _Traits::move(_Myptr() + _Off + _Count, + _Myptr() + _Off, _Mysize - _Off); // empty out hole + if (this == &_Right) + _Traits::move(_Myptr() + _Off, + _Myptr() + (_Off < _Roff ? _Roff + _Count : _Roff), + _Count); // substring + else + _Traits::copy(_Myptr() + _Off, + _Right._Myptr() + _Roff, _Count); // fill hole + _Eos(_Num); + } + return (*this); + } + + _Myt& insert(size_type _Off, + const _Elem *_Ptr, size_type _Count) + { // insert [_Ptr, _Ptr + _Count) at _Off + if (_Inside(_Ptr)) + return (insert(_Off, *this, + _Ptr - _Myptr(), _Count)); // substring + if (_Mysize < _Off) + _String_base::_Xran(); // _Off off end + if (npos - _Mysize <= _Count) + _String_base::_Xlen(); // result too long + size_type _Num; + if (0 < _Count && _Grow(_Num = _Mysize + _Count)) + { // make room and insert new stuff + _Traits::move(_Myptr() + _Off + _Count, + _Myptr() + _Off, _Mysize - _Off); // empty out hole + _Traits::copy(_Myptr() + _Off, _Ptr, _Count); // fill hole + _Eos(_Num); + } + return (*this); + } + + _Myt& insert(size_type _Off, const _Elem *_Ptr) + { // insert [_Ptr, ) at _Off + return (insert(_Off, _Ptr, _Traits::length(_Ptr))); + } + + _Myt& insert(size_type _Off, + size_type _Count, _Elem _Ch) + { // insert _Count * _Ch at _Off + if (_Mysize < _Off) + _String_base::_Xran(); // _Off off end + if (npos - _Mysize <= _Count) + _String_base::_Xlen(); // result too long + size_type _Num; + if (0 < _Count && _Grow(_Num = _Mysize + _Count)) + { // make room and insert new stuff + _Traits::move(_Myptr() + _Off + _Count, + _Myptr() + _Off, _Mysize - _Off); // empty out hole + _Traits::assign(_Myptr() + _Off, _Count, _Ch); // fill hole + _Eos(_Num); + } + return (*this); + } + + iterator insert(iterator _Where) + { // insert at _Where + return (insert(_Where, _Elem())); + } + + iterator insert(iterator _Where, _Elem _Ch) + { // insert _Ch at _Where + size_type _Off = _Pdif(_Where, begin()); + insert(_Off, 1, _Ch); + return (begin() + _Off); + } + + void insert(iterator _Where, size_type _Count, _Elem _Ch) + { // insert _Count * _Elem at _Where + size_type _Off = _Pdif(_Where, begin()); + insert(_Off, _Count, _Ch); + } + + template + void insert(iterator _Where, _It _First, _It _Last) + { // insert [_First, _Last) at _Where + _Insert(_Where, _First, _Last, _Iter_cat(_First)); + } + + template + void _Insert(iterator _Where, _It _Count, _It _Ch, + _Int_iterator_tag) + { // insert _Count * _Ch at _Where + insert(_Where, (size_type)_Count, (_Elem)_Ch); + } + + template + void _Insert(iterator _Where, _It _First, _It _Last, + input_iterator_tag) + { // insert [_First, _Last) at _Where, input iterators + replace(_Where, _Where, _First, _Last); + } + + void insert(iterator _Where, const_pointer _First, const_pointer _Last) + { // insert [_First, _Last) at _Where, const pointers + replace(_Where, _Where, _First, _Last); + } + + void insert(iterator _Where, const_iterator _First, const_iterator _Last) + { // insert [_First, _Last) at _Where, const_iterators + replace(_Where, _Where, _First, _Last); + } + + _Myt& erase(size_type _Off = 0, + size_type _Count = npos) + { // erase elements [_Off, _Off + _Count) + if (_Mysize < _Off) + _String_base::_Xran(); // _Off off end + if (_Mysize - _Off < _Count) + _Count = _Mysize - _Off; // trim _Count + if (0 < _Count) + { // move elements down + _Traits::move(_Myptr() + _Off, _Myptr() + _Off + _Count, + _Mysize - _Off - _Count); + size_type _Newsize = _Mysize - _Count; + _Eos(_Newsize); + } + return (*this); + } + + iterator erase(iterator _Where) + { // erase element at _Where + size_type _Count = _Pdif(_Where, begin()); + erase(_Count, 1); + return (_STRING_ITERATOR(_Myptr() + _Count)); + } + + iterator erase(iterator _First, iterator _Last) + { // erase substring [_First, _Last) + size_type _Count = _Pdif(_First, begin()); + erase(_Count, _Pdif(_Last, _First)); + return (_STRING_ITERATOR(_Myptr() + _Count)); + } + + void clear() + { // erase all + erase(begin(), end()); + } + + _Myt& replace(size_type _Off, size_type _N0, const _Myt& _Right) + { // replace [_Off, _Off + _N0) with _Right + return (replace(_Off, _N0, _Right, 0, npos)); + } + + _Myt& replace(size_type _Off, + size_type _N0, const _Myt& _Right, size_type _Roff, size_type _Count) + { // replace [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count) + if (_Mysize < _Off || _Right.size() < _Roff) + _String_base::_Xran(); // _Off or _Roff off end + if (_Mysize - _Off < _N0) + _N0 = _Mysize - _Off; // trim _N0 to size + size_type _Num = _Right.size() - _Roff; + if (_Num < _Count) + _Count = _Num; // trim _Count to size + if (npos - _Count <= _Mysize - _N0) + _String_base::_Xlen(); // result too long + + size_type _Nm = _Mysize - _N0 - _Off; // length of preserved tail + size_type _Newsize = _Mysize + _Count - _N0; + if (_Mysize < _Newsize) + _Grow(_Newsize); + + if (this != &_Right) + { // no overlap, just move down and copy in new stuff + _Traits::move(_Myptr() + _Off + _Count, + _Myptr() + _Off + _N0, _Nm); // empty hole + _Traits::copy(_Myptr() + _Off, + _Right._Myptr() + _Roff, _Count); // fill hole + } + else if (_Count <= _N0) + { // hole doesn't get larger, just copy in substring + _Traits::move(_Myptr() + _Off, + _Myptr() + _Roff, _Count); // fill hole + _Traits::move(_Myptr() + _Off + _Count, + _Myptr() + _Off + _N0, _Nm); // move tail down + } + else if (_Roff <= _Off) + { // hole gets larger, substring begins before hole + _Traits::move(_Myptr() + _Off + _Count, + _Myptr() + _Off + _N0, _Nm); // move tail down + _Traits::move(_Myptr() + _Off, + _Myptr() + _Roff, _Count); // fill hole + } + else if (_Off + _N0 <= _Roff) + { // hole gets larger, substring begins after hole + _Traits::move(_Myptr() + _Off + _Count, + _Myptr() + _Off + _N0, _Nm); // move tail down + _Traits::move(_Myptr() + _Off, + _Myptr() + (_Roff + _Count - _N0), _Count); // fill hole + } + else + { // hole gets larger, substring begins in hole + _Traits::move(_Myptr() + _Off, + _Myptr() + _Roff, _N0); // fill old hole + _Traits::move(_Myptr() + _Off + _Count, + _Myptr() + _Off + _N0, _Nm); // move tail down + _Traits::move(_Myptr() + _Off + _N0, _Myptr() + _Roff + _Count, + _Count - _N0); // fill rest of new hole + } + + _Eos(_Newsize); + return (*this); + } + + _Myt& replace(size_type _Off, + size_type _N0, const _Elem *_Ptr, size_type _Count) + { // replace [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count) + if (_Inside(_Ptr)) + return (replace(_Off, _N0, *this, + _Ptr - _Myptr(), _Count)); // substring, replace carefully + if (_Mysize < _Off) + _String_base::_Xran(); // _Off off end + if (_Mysize - _Off < _N0) + _N0 = _Mysize - _Off; // trim _N0 to size + if (npos - _Count <= _Mysize - _N0) + _String_base::_Xlen(); // result too long + size_type _Nm = _Mysize - _N0 - _Off; + + if (_Count < _N0) + _Traits::move(_Myptr() + _Off + _Count, + _Myptr() + _Off + _N0, _Nm); // smaller hole, move tail up + size_type _Num; + if ((0 < _Count || 0 < _N0) && _Grow(_Num = _Mysize + _Count - _N0)) + { // make room and rearrange + if (_N0 < _Count) + _Traits::move(_Myptr() + _Off + _Count, + _Myptr() + _Off + _N0, _Nm); // move tail down + _Traits::copy(_Myptr() + _Off, _Ptr, _Count); // fill hole + _Eos(_Num); + } + return (*this); + } + + _Myt& replace(size_type _Off, size_type _N0, const _Elem *_Ptr) + { // replace [_Off, _Off + _N0) with [_Ptr, ) + return (replace(_Off, _N0, _Ptr, _Traits::length(_Ptr))); + } + + _Myt& replace(size_type _Off, + size_type _N0, size_type _Count, _Elem _Ch) + { // replace [_Off, _Off + _N0) with _Count * _Ch + if (_Mysize < _Off) + _String_base::_Xran(); // _Off off end + if (_Mysize - _Off < _N0) + _N0 = _Mysize - _Off; // trim _N0 to size + if (npos - _Count <= _Mysize - _N0) + _String_base::_Xlen(); // result too long + size_type _Nm = _Mysize - _N0 - _Off; + + if (_Count < _N0) + _Traits::move(_Myptr() + _Off + _Count, + _Myptr() + _Off + _N0, _Nm); // smaller hole, move tail up + size_type _Num; + if ((0 < _Count || 0 < _N0) && _Grow(_Num = _Mysize + _Count - _N0)) + { // make room and rearrange + if (_N0 < _Count) + _Traits::move(_Myptr() + _Off + _Count, + _Myptr() + _Off + _N0, _Nm); // move tail down + _Traits::assign(_Myptr() + _Off, _Count, _Ch); // fill hole + _Eos(_Num); + } + return (*this); + } + + _Myt& replace(iterator _First, iterator _Last, const _Myt& _Right) + { // replace [_First, _Last) with _Right + return (replace( + _Pdif(_First, begin()), _Pdif(_Last, _First), _Right)); + } + + _Myt& replace(iterator _First, iterator _Last, const _Elem *_Ptr, + size_type _Count) + { // replace [_First, _Last) with [_Ptr, _Ptr + _Count) + return (replace( + _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr, _Count)); + } + + _Myt& replace(iterator _First, iterator _Last, const _Elem *_Ptr) + { // replace [_First, _Last) with [_Ptr, ) + return (replace( + _Pdif(_First, begin()), _Pdif(_Last, _First), _Ptr)); + } + + _Myt& replace(iterator _First, iterator _Last, + size_type _Count, _Elem _Ch) + { // replace [_First, _Last) with _Count * _Ch + return (replace( + _Pdif(_First, begin()), _Pdif(_Last, _First), _Count, _Ch)); + } + + template + _Myt& replace(iterator _First, iterator _Last, + _It _First2, _It _Last2) + { // replace [_First, _Last) with [_First2, _Last2) + return (_Replace(_First, _Last, + _First2, _Last2, _Iter_cat(_First2))); + } + + template + _Myt& _Replace(iterator _First, iterator _Last, + _It _Count, _It _Ch, _Int_iterator_tag) + { // replace [_First, _Last) with _Count * _Ch + return (replace(_First, _Last, (size_type)_Count, (_Elem)_Ch)); + } + + template + _Myt& _Replace(iterator _First, iterator _Last, + _It _First2, _It _Last2, input_iterator_tag) + { // replace [_First, _Last) with [_First2, _Last2), input iterators + _Myt _Right(_First2, _Last2); + replace(_First, _Last, _Right); + return (*this); + } + + _Myt& replace(iterator _First, iterator _Last, + const_pointer _First2, const_pointer _Last2) + { // replace [_First, _Last) with [_First2, _Last2), const pointers + if (_First2 == _Last2) + erase(_Pdif(_First, begin()), _Pdif(_Last, _First)); + else + replace(_Pdif(_First, begin()), _Pdif(_Last, _First), + &*_First2, _Last2 - _First2); + return (*this); + } + + _Myt& replace(iterator _First, iterator _Last, + const_iterator _First2, const_iterator _Last2) + { // replace [_First, _Last) with [_First2, _Last2), const_iterators + if (_First2 == _Last2) + erase(_Pdif(_First, begin()), _Pdif(_Last, _First)); + else + replace(_Pdif(_First, begin()), _Pdif(_Last, _First), + &*_First2, _Last2 - _First2); + return (*this); + } + + iterator begin() + { // return iterator for beginning of mutable sequence + return (_STRING_ITERATOR(_Myptr())); + } + + const_iterator begin() const + { // return iterator for beginning of nonmutable sequence + return (_STRING_CONST_ITERATOR(_Myptr())); + } + + iterator end() + { // return iterator for end of mutable sequence + return (_STRING_ITERATOR(_Myptr() + _Mysize)); + } + + const_iterator end() const + { // return iterator for end of nonmutable sequence + return (_STRING_CONST_ITERATOR(_Myptr() + _Mysize)); + } + + reverse_iterator rbegin() + { // return iterator for beginning of reversed mutable sequence + return (reverse_iterator(end())); + } + + const_reverse_iterator rbegin() const + { // return iterator for beginning of reversed nonmutable sequence + return (const_reverse_iterator(end())); + } + + reverse_iterator rend() + { // return iterator for end of reversed mutable sequence + return (reverse_iterator(begin())); + } + + const_reverse_iterator rend() const + { // return iterator for end of reversed nonmutable sequence + return (const_reverse_iterator(begin())); + } + + reference at(size_type _Off) + { // subscript mutable sequence with checking + if (_Mysize <= _Off) + _String_base::_Xran(); // _Off off end + return (_Myptr()[_Off]); + } + + const_reference at(size_type _Off) const + { // subscript nonmutable sequence with checking + if (_Mysize <= _Off) + _String_base::_Xran(); // _Off off end + return (_Myptr()[_Off]); + } + + reference operator[](size_type _Off) + { // subscript mutable sequence + return (_Myptr()[_Off]); + } + + const_reference operator[](size_type _Off) const + { // subscript nonmutable sequence + return (_Myptr()[_Off]); + } + + void push_back(_Elem _Ch) + { // insert element at end + insert(end(), _Ch); + } + + const _Elem *c_str() const + { // return pointer to null-terminated nonmutable array + return (_Myptr()); + } + + const _Elem *data() const + { // return pointer to nonmutable array + return (c_str()); + } + + size_type length() const + { // return length of sequence + return (_Mysize); + } + + size_type size() const + { // return length of sequence + return (_Mysize); + } + + size_type max_size() const + { // return maximum possible length of sequence + size_type _Num = _Mybase::_Alval.max_size(); + return (_Num <= 1 ? 1 : _Num - 1); + } + + void resize(size_type _Newsize) + { // determine new length, padding with null elements as needed + resize(_Newsize, _Elem()); + } + + void resize(size_type _Newsize, _Elem _Ch) + { // determine new length, padding with _Ch elements as needed + if (_Newsize <= _Mysize) + erase(_Newsize); + else + append(_Newsize - _Mysize, _Ch); + } + + size_type capacity() const + { // return current length of allocated storage + return (_Myres); + } + + void reserve(size_type _Newcap = 0) + { // determine new minimum length of allocated storage + if (_Mysize <= _Newcap && _Myres != _Newcap) + { // change reservation + size_type _Size = _Mysize; + if (_Grow(_Newcap, true)) + _Eos(_Size); + } + } + + bool empty() const + { // test if sequence is empty + return (_Mysize == 0); + } + + size_type copy(_Elem *_Ptr, + size_type _Count, size_type _Off = 0) const + { // copy [_Off, _Off + _Count) to [_Ptr, _Ptr + _Count) + if (_Mysize < _Off) + _String_base::_Xran(); // _Off off end + if (_Mysize - _Off < _Count) + _Count = _Mysize - _Off; + _Traits::copy(_Ptr, _Myptr() + _Off, _Count); + return (_Count); + } + + void swap(_Myt& _Right) + { // exchange contents with _Right + if (_Mybase::_Alval == _Right._Alval) + { // same allocator, swap control information + _Bxty _Tbx = _Bx; + _Bx = _Right._Bx, _Right._Bx = _Tbx; + + size_type _Tlen = _Mysize; + _Mysize = _Right._Mysize, _Right._Mysize = _Tlen; + + size_type _Tres = _Myres; + _Myres = _Right._Myres, _Right._Myres = _Tres; + } + else + { // different allocator, do multiple assigns + _Myt _Tmp = *this; *this = _Right, _Right = _Tmp; + } + } + + size_type find(const _Myt& _Right, size_type _Off = 0) const + { // look for _Right beginnng at or after _Off + return (find(_Right._Myptr(), _Off, _Right.size())); + } + + size_type find(const _Elem *_Ptr, + size_type _Off, size_type _Count) const + { // look for [_Ptr, _Ptr + _Count) beginnng at or after _Off + if (_Count == 0 && _Off <= _Mysize) + return (_Off); // null string always matches (if inside string) + + size_type _Nm; + if (_Off < _Mysize && _Count <= (_Nm = _Mysize - _Off)) + { // room for match, look for it + const _Elem *_Uptr, *_Vptr; + for (_Nm -= _Count - 1, _Vptr = _Myptr() + _Off; + (_Uptr = _Traits::find(_Vptr, _Nm, *_Ptr)) != 0; + _Nm -= _Uptr - _Vptr + 1, _Vptr = _Uptr + 1) + if (_Traits::compare(_Uptr, _Ptr, _Count) == 0) + return (_Uptr - _Myptr()); // found a match + } + + return (npos); // no match + } + + size_type find(const _Elem *_Ptr, size_type _Off = 0) const + { // look for [_Ptr, ) beginnng at or after _Off + return (find(_Ptr, _Off, _Traits::length(_Ptr))); + } + + size_type find(_Elem _Ch, size_type _Off = 0) const + { // look for _Ch at or after _Off + return (find((const _Elem *)&_Ch, _Off, 1)); + } + + size_type rfind(const _Myt& _Right, size_type _Off = npos) const + { // look for _Right beginning before _Off + return (rfind(_Right._Myptr(), _Off, _Right.size())); + } + + size_type rfind(const _Elem *_Ptr, + size_type _Off, size_type _Count) const + { // look for [_Ptr, _Ptr + _Count) beginning before _Off + if (_Count == 0) + return (_Off < _Mysize ? _Off : _Mysize); // null always matches + if (_Count <= _Mysize) + { // room for match, look for it + const _Elem *_Uptr = _Myptr() + + (_Off < _Mysize - _Count ? _Off : _Mysize - _Count); + for (; ; --_Uptr) + if (_Traits::eq(*_Uptr, *_Ptr) + && _Traits::compare(_Uptr, _Ptr, _Count) == 0) + return (_Uptr - _Myptr()); // found a match + else if (_Uptr == _Myptr()) + break; // at beginning, no more chance for match + } + + return (npos); // no match + } + + size_type rfind(const _Elem *_Ptr, size_type _Off = npos) const + { // look for [_Ptr, ) beginning before _Off + return (rfind(_Ptr, _Off, _Traits::length(_Ptr))); + } + + size_type rfind(_Elem _Ch, size_type _Off = npos) const + { // look for _Ch before _Off + return (rfind((const _Elem *)&_Ch, _Off, 1)); + } + + size_type find_first_of(const _Myt& _Right, + size_type _Off = 0) const + { // look for one of _Right at or after _Off + return (find_first_of(_Right._Myptr(), _Off, _Right.size())); + } + + size_type find_first_of(const _Elem *_Ptr, + size_type _Off, size_type _Count) const + { // look for one of [_Ptr, _Ptr + _Count) at or after _Off + if (0 < _Count && _Off < _Mysize) + { // room for match, look for it + const _Elem *const _Vptr = _Myptr() + _Mysize; + for (const _Elem *_Uptr = _Myptr() + _Off; _Uptr < _Vptr; ++_Uptr) + if (_Traits::find(_Ptr, _Count, *_Uptr) != 0) + return (_Uptr - _Myptr()); // found a match + } + + return (npos); // no match + } + + size_type find_first_of(const _Elem *_Ptr, size_type _Off = 0) const + { // look for one of [_Ptr, ) at or after _Off + return (find_first_of(_Ptr, _Off, _Traits::length(_Ptr))); + } + + size_type find_first_of(_Elem _Ch, size_type _Off = 0) const + { // look for _Ch at or after _Off + return (find((const _Elem *)&_Ch, _Off, 1)); + } + + size_type find_last_of(const _Myt& _Right, + size_type _Off = npos) const + { // look for one of _Right before _Off + return (find_last_of(_Right._Myptr(), _Off, _Right.size())); + } + + size_type find_last_of(const _Elem *_Ptr, + size_type _Off, size_type _Count) const + { // look for one of [_Ptr, _Ptr + _Count) before _Off + if (0 < _Count && 0 < _Mysize) + for (const _Elem *_Uptr = _Myptr() + + (_Off < _Mysize ? _Off : _Mysize - 1); ; --_Uptr) + if (_Traits::find(_Ptr, _Count, *_Uptr) != 0) + return (_Uptr - _Myptr()); // found a match + else if (_Uptr == _Myptr()) + break; // at beginning, no more chance for match + + return (npos); // no match + } + + size_type find_last_of(const _Elem *_Ptr, + size_type _Off = npos) const + { // look for one of [_Ptr, ) before _Off + return (find_last_of(_Ptr, _Off, _Traits::length(_Ptr))); + } + + size_type find_last_of(_Elem _Ch, size_type _Off = npos) const + { // look for _Ch before _Off + return (rfind((const _Elem *)&_Ch, _Off, 1)); + } + + size_type find_first_not_of(const _Myt& _Right, + size_type _Off = 0) const + { // look for none of _Right at or after _Off + return (find_first_not_of(_Right._Myptr(), _Off, + _Right.size())); + } + + size_type find_first_not_of(const _Elem *_Ptr, + size_type _Off, size_type _Count) const + { // look for none of [_Ptr, _Ptr + _Count) at or after _Off + if (_Off < _Mysize) + { // room for match, look for it + const _Elem *const _Vptr = _Myptr() + _Mysize; + for (const _Elem *_Uptr = _Myptr() + _Off; _Uptr < _Vptr; ++_Uptr) + if (_Traits::find(_Ptr, _Count, *_Uptr) == 0) + return (_Uptr - _Myptr()); + } + return (npos); + } + + size_type find_first_not_of(const _Elem *_Ptr, + size_type _Off = 0) const + { // look for one of [_Ptr, ) at or after _Off + return (find_first_not_of(_Ptr, _Off, _Traits::length(_Ptr))); + } + + size_type find_first_not_of(_Elem _Ch, size_type _Off = 0) const + { // look for non _Ch at or after _Off + return (find_first_not_of((const _Elem *)&_Ch, _Off, 1)); + } + + size_type find_last_not_of(const _Myt& _Right, + size_type _Off = npos) const + { // look for none of _Right before _Off + return (find_last_not_of(_Right._Myptr(), _Off, _Right.size())); + } + + size_type find_last_not_of(const _Elem *_Ptr, + size_type _Off, size_type _Count) const + { // look for none of [_Ptr, _Ptr + _Count) before _Off + if (0 < _Mysize) + for (const _Elem *_Uptr = _Myptr() + + (_Off < _Mysize ? _Off : _Mysize - 1); ; --_Uptr) + if (_Traits::find(_Ptr, _Count, *_Uptr) == 0) + return (_Uptr - _Myptr()); + else if (_Uptr == _Myptr()) + break; + return (npos); + } + + size_type find_last_not_of(const _Elem *_Ptr, + size_type _Off = npos) const + { // look for none of [_Ptr, ) before _Off + return (find_last_not_of(_Ptr, _Off, _Traits::length(_Ptr))); + } + + size_type find_last_not_of(_Elem _Ch, size_type _Off = npos) const + { // look for non _Ch before _Off + return (find_last_not_of((const _Elem *)&_Ch, _Off, 1)); + } + + _Myt substr(size_type _Off = 0, size_type _Count = npos) const + { // return [_Off, _Off + _Count) as new string + return (_Myt(*this, _Off, _Count)); + } + + int compare(const _Myt& _Right) const + { // compare [0, _Mysize) with _Right + return (compare(0, _Mysize, _Right._Myptr(), _Right.size())); + } + + int compare(size_type _Off, size_type _N0, + const _Myt& _Right) const + { // compare [_Off, _Off + _N0) with _Right + return (compare(_Off, _N0, _Right, 0, npos)); + } + + int compare(size_type _Off, + size_type _N0, const _Myt& _Right, + size_type _Roff, size_type _Count) const + { // compare [_Off, _Off + _N0) with _Right [_Roff, _Roff + _Count) + if (_Right.size() < _Roff) + _String_base::_Xran(); // _Off off end + if (_Right._Mysize - _Roff < _Count) + _Count = _Right._Mysize - _Roff; // trim _Count to size + return (compare(_Off, _N0, _Right._Myptr() + _Roff, _Count)); + } + + int compare(const _Elem *_Ptr) const + { // compare [0, _Mysize) with [_Ptr, ) + return (compare(0, _Mysize, _Ptr, _Traits::length(_Ptr))); + } + + int compare(size_type _Off, size_type _N0, const _Elem *_Ptr) const + { // compare [_Off, _Off + _N0) with [_Ptr, ) + return (compare(_Off, _N0, _Ptr, _Traits::length(_Ptr))); + } + + int compare(size_type _Off, + size_type _N0, const _Elem *_Ptr, size_type _Count) const + { // compare [_Off, _Off + _N0) with [_Ptr, _Ptr + _Count) + if (_Mysize < _Off) + _String_base::_Xran(); // _Off off end + if (_Mysize - _Off < _N0) + _N0 = _Mysize - _Off; // trim _N0 to size + + size_type _Ans = _N0 == 0 ? 0 + : _Traits::compare(_Myptr() + _Off, _Ptr, + _N0 < _Count ? _N0 : _Count); + return (_Ans != 0 ? (int)_Ans : _N0 < _Count ? -1 + : _N0 == _Count ? 0 : +1); + } + + allocator_type get_allocator() const + { // return allocator object for values + return (_Mybase::_Alval); + } + + enum + { // length of internal buffer, [1, 16] + _BUF_SIZE = 16 / sizeof (_Elem) < 1 ? 1 + : 16 / sizeof(_Elem)}; + +protected: + enum + { // roundup mask for allocated buffers, [0, 15] + _ALLOC_MASK = sizeof (_Elem) <= 1 ? 15 + : sizeof (_Elem) <= 2 ? 7 + : sizeof (_Elem) <= 4 ? 3 + : sizeof (_Elem) <= 8 ? 1 : 0}; + + void _Copy(size_type _Newsize, size_type _Oldlen) + { // copy _Oldlen elements to newly allocated buffer + size_type _Newres = _Newsize | _ALLOC_MASK; + if (max_size() < _Newres) + _Newres = _Newsize; // undo roundup if too big + else if (_Newres / 3 < _Myres / 2 + && _Myres <= max_size() - _Myres / 2) + _Newres = _Myres + _Myres / 2; // grow exponentially if possible + _Elem *_Ptr; + + _TRY_BEGIN + _Ptr = _Mybase::_Alval.allocate(_Newres + 1); + _CATCH_ALL + _Newres = _Newsize; // allocation failed, undo roundup and retry + _TRY_BEGIN + _Ptr = _Mybase::_Alval.allocate(_Newres + 1); + _CATCH_ALL + _Tidy(true); // failed again, discard storage and reraise + _RERAISE; + _CATCH_END + _CATCH_END + + if (0 < _Oldlen) + _Traits::copy(_Ptr, _Myptr(), _Oldlen); // copy existing elements + _Tidy(true); + _Bx._Ptr = _Ptr; + _Myres = _Newres; + _Eos(_Oldlen); + } + + void _Eos(size_type _Newsize) + { // set new length and null terminator + _Traits::assign(_Myptr()[_Mysize = _Newsize], _Elem()); + } + + bool _Grow(size_type _Newsize, + bool _Trim = false) + { // ensure buffer is big enough, trim to size if _Trim is true + if (max_size() < _Newsize) + _String_base::_Xlen(); // result too long + if (_Myres < _Newsize) + _Copy(_Newsize, _Mysize); // reallocate to grow + else if (_Trim && _Newsize < _BUF_SIZE) + _Tidy(true, // copy and deallocate if trimming to small string + _Newsize < _Mysize ? _Newsize : _Mysize); + else if (_Newsize == 0) + _Eos(0); // new size is zero, just null terminate + return (0 < _Newsize); // return true only if more work to do + } + + bool _Inside(const _Elem *_Ptr) + { // test if _Ptr points inside string + if (_Ptr < _Myptr() || _Myptr() + _Mysize <= _Ptr) + return (false); // don't ask + else + return (true); + } + + static size_type __cdecl _Pdif(const_iterator _P2, + const_iterator _P1) + { // compute safe iterator difference + return (_ITER_BASE(_P2) == 0 ? 0 : _P2 - _P1); + } + + void _Tidy(bool _Built = false, + size_type _Newsize = 0) + { // initialize buffer, deallocating any storage + if (!_Built) + ; + else if (_BUF_SIZE <= _Myres) + { // copy any leftovers to small buffer and deallocate + _Elem *_Ptr = _Bx._Ptr; + if (0 < _Newsize) + _Traits::copy(_Bx._Buf, _Ptr, _Newsize); + _Mybase::_Alval.deallocate(_Ptr, _Myres + 1); + } + _Myres = _BUF_SIZE - 1; + _Eos(_Newsize); + } + + union _Bxty + { // storage for small buffer or pointer to larger one + _Elem _Buf[_BUF_SIZE]; + _Elem *_Ptr; + } _Bx; + +public: + _Elem *_Myptr() + { // determine current pointer to buffer for mutable string + return (_BUF_SIZE <= _Myres ? _Bx._Ptr : _Bx._Buf); + } + + const _Elem *_Myptr() const + { // determine current pointer to buffer for nonmutable string + return (_BUF_SIZE <= _Myres ? _Bx._Ptr : _Bx._Buf); + } + + size_type _Mysize; // current length of string + size_type _Myres; // current storage reserved for string + }; + + // STATIC npos OBJECT +template + const typename basic_string<_Elem, _Traits, _Alloc>::size_type + basic_string<_Elem, _Traits, _Alloc>::npos = + (basic_string<_Elem, _Traits, _Alloc>::size_type)(-1); + +template inline + void swap(basic_string<_Elem, _Traits, _Alloc>& _Left, + basic_string<_Elem, _Traits, _Alloc>& _Right) + { // swap _Left and _Right strings + _Left.swap(_Right); + } + +typedef basic_string, allocator > + string; +typedef basic_string, + allocator > wstring; + + #ifdef _DLL_CPPLIB + +template class _CRTIMP2 basic_string, + allocator >; +template class _CRTIMP2 basic_string, + allocator >; + + + + + #endif /* _DLL_CPPLIB */ +_STD_END + #pragma warning(default: 4251) +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _XSTRING */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xtree b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xtree new file mode 100644 index 00000000..fd09ce07 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xtree @@ -0,0 +1,1222 @@ +// xtree internal header +#pragma once +#ifndef _XTREE_ +#define _XTREE_ +#include +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) + + #pragma warning(disable:4127 4284) + + #define _GENERIC_BASE _Node + + +_STD_BEGIN + + // TEMPLATE CLASS _Tree_nod +template + class _Tree_nod + : public _Traits // traits form ultimate base + { // base class for _Tree_ptr to hold allocator _Alnod +protected: + struct _Node; + friend struct _Node; + + typedef typename _Traits::allocator_type allocator_type; + typedef typename _Traits::key_compare key_compare; + typedef typename _Traits::value_type value_type; + typedef typename allocator_type::template + rebind<_GENERIC_BASE>::other::pointer _Genptr; + + struct _Node + { // tree node + _Node(_Genptr _Larg, _Genptr _Parg, _Genptr _Rarg, + const value_type& _Val, char _Carg) + : _Left(_Larg), _Parent(_Parg), _Right(_Rarg), + _Myval(_Val), _Color(_Carg), _Isnil(false) + { // construct a node with value + } + + _Genptr _Left; // left subtree, or smallest element if head + _Genptr _Parent; // parent, or root of tree if head + _Genptr _Right; // right subtree, or largest element if head + value_type _Myval; // the stored value, unused if head + char _Color; // _Red or _Black, _Black if head + char _Isnil; // true only if head (also nil) node + }; + + _Tree_nod(const key_compare& _Parg, + allocator_type _Al) + : _Traits(_Parg), _Alnod(_Al) + { // construct traits from _Parg and allocator from _Al + } + + typename allocator_type::template rebind<_Node>::other + _Alnod; // allocator object for nodes + }; + + // TEMPLATE CLASS _Tree_ptr +template + class _Tree_ptr + : public _Tree_nod<_Traits> + { // base class for _Tree_val to hold allocator _Alptr +protected: + typedef typename _Tree_nod<_Traits>::_Node _Node; + typedef typename _Traits::allocator_type allocator_type; + typedef typename _Traits::key_compare key_compare; + typedef typename allocator_type::template + rebind<_Node>::other::pointer _Nodeptr; + + _Tree_ptr(const key_compare& _Parg, + allocator_type _Al) + : _Tree_nod<_Traits>(_Parg, _Al), _Alptr(_Al) + { // construct base, and allocator from _Al + } + + typename allocator_type::template rebind<_Nodeptr>::other + _Alptr; // allocator object for pointers to nodes + }; + + // TEMPLATE CLASS _Tree_val +template + class _Tree_val + : public _Tree_ptr<_Traits> + { // base class for _Tree to hold allocator _Alval +protected: + typedef typename _Traits::allocator_type allocator_type; + typedef typename _Traits::key_compare key_compare; + + _Tree_val(const key_compare& _Parg, + allocator_type _Al) + : _Tree_ptr<_Traits>(_Parg, _Al), _Alval(_Al) + { // construct base, and allocator from _Al + } + + allocator_type _Alval; // allocator object for values stored in nodes + }; + + // TEMPLATE CLASS _Tree +template + class _Tree + : public _Tree_val<_Traits> + { // ordered red-black tree for [multi_]{map set} +public: + typedef _Tree<_Traits> _Myt; + typedef _Tree_val<_Traits> _Mybase; + typedef typename _Traits::key_type key_type; + typedef typename _Traits::key_compare key_compare; + typedef typename _Traits::value_compare value_compare; + typedef typename _Traits::value_type value_type; + typedef typename _Traits::allocator_type allocator_type; + typedef typename _Traits::_ITptr _ITptr; + typedef typename _Traits::_IReft _IReft; + +protected: + typedef typename _Tree_nod<_Traits>::_Genptr _Genptr; + typedef typename _Tree_nod<_Traits>::_Node _Node; + + enum _Redbl + { // colors for link to parent + _Red, _Black}; + typedef _POINTER_X(_Node, allocator_type) _Nodeptr; + typedef _REFERENCE_X(_Nodeptr, allocator_type) _Nodepref; + typedef _CREFERENCE_X(key_type, allocator_type) _Keyref; + typedef _REFERENCE_X(char, allocator_type) _Charref; + typedef _REFERENCE_X(value_type, allocator_type) _Vref; + + static _Charref _Color(_Nodeptr _Pnode) + { // return reference to color in node + return ((_Charref)(*_Pnode)._Color); + } + + static _Charref _Isnil(_Nodeptr _Pnode) + { // return reference to nil flag in node + return ((_Charref)(*_Pnode)._Isnil); + } + + static _Keyref _Key(_Nodeptr _Pnode) + { // return reference to key in node + return (_Mybase::_Kfn(_Myval(_Pnode))); + } + + static _Nodepref _Left(_Nodeptr _Pnode) + { // return reference to left pointer in node + return ((_Nodepref)(*_Pnode)._Left); + } + + static _Nodepref _Parent(_Nodeptr _Pnode) + { // return reference to parent pointer in node + return ((_Nodepref)(*_Pnode)._Parent); + } + + static _Nodepref _Right(_Nodeptr _Pnode) + { // return reference to right pointer in node + return ((_Nodepref)(*_Pnode)._Right); + } + + static _Vref _Myval(_Nodeptr _Pnode) + { // return reference to value in node + return ((_Vref)(*_Pnode)._Myval); + } + +public: + typedef typename allocator_type::size_type size_type; + typedef typename allocator_type::difference_type _Dift; + typedef _Dift difference_type; + typedef _POINTER_X(value_type, allocator_type) _Tptr; + typedef _CPOINTER_X(value_type, allocator_type) _Ctptr; + typedef _REFERENCE_X(value_type, allocator_type) _Reft; + typedef _Tptr pointer; + typedef _Ctptr const_pointer; + typedef _Reft reference; + typedef _CREFERENCE_X(value_type, allocator_type) + const_reference; + + // CLASS const_iterator + class const_iterator; + friend class const_iterator; + + class const_iterator + : public _Bidit + { // iterator for nonmutable _Tree + public: + typedef bidirectional_iterator_tag iterator_category; + typedef _Dift difference_type; + typedef _Ctptr pointer; + typedef const_reference reference; + + const_iterator() + : _Ptr(0) + { // construct with null node pointer + } + + #define _TREE_CONST_ITERATOR(ppnode) const_iterator(ppnode) + + const_iterator(_Nodeptr _Pnode) + : _Ptr(_Pnode) + { // construct with node pointer _Pnode + } + + const_reference operator*() const + { // return designated value + return (_Myval(_Ptr)); + } + + _Ctptr operator->() const + { // return pointer to class object + return (&**this); + } + + const_iterator& operator++() + { // preincrement + _Inc(); + return (*this); + } + + const_iterator operator++(int) + { // postincrement + const_iterator _Tmp = *this; + ++*this; + return (_Tmp); + } + + const_iterator& operator--() + { // predecrement + _Dec(); + return (*this); + } + + const_iterator operator--(int) + { // postdecrement + const_iterator _Tmp = *this; + --*this; + return (_Tmp); + } + + bool operator==(const const_iterator& _Right) const + { // test for iterator equality + return (_Ptr == _Right._Ptr); + } + + bool operator!=(const const_iterator& _Right) const + { // test for iterator inequality + return (!(*this == _Right)); + } + + void _Dec() + { // move to node with next smaller value + if (_Isnil(_Ptr)) + _Ptr = _Right(_Ptr); // end() ==> rightmost + else if (!_Isnil(_Left(_Ptr))) + _Ptr = _Max(_Left(_Ptr)); // ==> largest of left subtree + else + { // climb looking for left subtree + _Nodeptr _Pnode; + while (!_Isnil(_Pnode = _Parent(_Ptr)) + && _Ptr == _Left(_Pnode)) + _Ptr = _Pnode; // ==> parent while left subtree + if (!_Isnil(_Pnode)) + _Ptr = _Pnode; // ==> parent if not head + } + } + + void _Inc() + { // move to node with next larger value + if (_Isnil(_Ptr)) + ; // end() shouldn't be incremented, don't move + else if (!_Isnil(_Right(_Ptr))) + _Ptr = _Min(_Right(_Ptr)); // ==> smallest of right subtree + else + { // climb looking for right subtree + _Nodeptr _Pnode; + while (!_Isnil(_Pnode = _Parent(_Ptr)) + && _Ptr == _Right(_Pnode)) + _Ptr = _Pnode; // ==> parent while right subtree + _Ptr = _Pnode; // ==> parent (head if end()) + } + } + + _Nodeptr _Mynode() const + { // return node pointer + return (_Ptr); + } + + protected: + _Nodeptr _Ptr; // pointer to node + }; + + // CLASS iterator + class iterator; + friend class iterator; + + class iterator + : public const_iterator + { // iterator for mutable _Tree + public: + typedef bidirectional_iterator_tag iterator_category; + typedef _Dift difference_type; + typedef _ITptr pointer; + typedef _IReft reference; + + iterator() + { // construct with null node pointer + } + + #define _TREE_ITERATOR(ppnode) iterator(ppnode) + + iterator(_Nodeptr _Pnode) + : const_iterator(_Pnode) + { // construct with node pointer _Pnode + } + + reference operator*() const + { // return designated value + return ((reference)**(const_iterator *)this); + } + + pointer operator->() const + { // return pointer to class object + return (&**this); + } + + iterator& operator++() + { // preincrement + ++(*(const_iterator *)this); + return (*this); + } + + iterator operator++(int) + { // postincrement + iterator _Tmp = *this; + ++*this; + return (_Tmp); + } + + iterator& operator--() + { // predecrement + --(*(const_iterator *)this); + return (*this); + } + + iterator operator--(int) + { // postdecrement + iterator _Tmp = *this; + --*this; + return (_Tmp); + } + }; + + typedef std::reverse_iterator reverse_iterator; + typedef std::reverse_iterator const_reverse_iterator; + typedef pair _Pairib; + typedef pair _Pairii; + typedef pair _Paircc; + + explicit _Tree(const key_compare& _Parg, + const allocator_type& _Al) + : _Mybase(_Parg, _Al) + { // construct empty tree + _Init(); + } + + _Tree(const value_type *_First, const value_type *_Last, + const key_compare& _Parg, const allocator_type& _Al) + : _Mybase(_Parg, _Al) + { // construct tree from [_First, _Last) array + _Init(); + _TRY_BEGIN + insert(_First, _Last); + _CATCH_ALL + _Tidy(); + _RERAISE; + _CATCH_END + } + + _Tree(const _Myt& _Right) + : _Mybase(_Right.key_comp(), _Right.get_allocator()) + { // construct tree by copying _Right + _Init(); + _TRY_BEGIN + _Copy(_Right); + _CATCH_ALL + _Tidy(); + _RERAISE; + _CATCH_END + } + + ~_Tree() + { // destroy tree + _Tidy(); + } + + _Myt& operator=(const _Myt& _Right) + { // replace contents from _Right + if (this != &_Right) + { // worth doing + erase(begin(), end()); + this->comp = _Right.comp; + _Copy(_Right); + } + return (*this); + } + + iterator begin() + { // return iterator for beginning of mutable sequence + return (_TREE_ITERATOR(_Lmost())); + } + + const_iterator begin() const + { // return iterator for beginning of nonmutable sequence + return (_TREE_CONST_ITERATOR(_Lmost())); + } + + iterator end() + { // return iterator for end of mutable sequence + return (_TREE_ITERATOR(_Myhead)); + } + + const_iterator end() const + { // return iterator for end of nonmutable sequence + return (_TREE_CONST_ITERATOR(_Myhead)); + } + + reverse_iterator rbegin() + { // return iterator for beginning of reversed mutable sequence + return (reverse_iterator(end())); + } + + const_reverse_iterator rbegin() const + { // return iterator for beginning of reversed nonmutable sequence + return (const_reverse_iterator(end())); + } + + reverse_iterator rend() + { // return iterator for end of reversed mutable sequence + return (reverse_iterator(begin())); + } + + const_reverse_iterator rend() const + { // return iterator for end of reversed nonmutable sequence + return (const_reverse_iterator(begin())); + } + + size_type size() const + { // return length of sequence + return (_Mysize); + } + + size_type max_size() const + { // return maximum possible length of sequence + return (this->_Alval.max_size()); + } + + bool empty() const + { // return true only if sequence is empty + return (size() == 0); + } + + allocator_type get_allocator() const + { // return allocator object for values + return (this->_Alval); + } + + key_compare key_comp() const + { // return object for comparing keys + return (this->comp); + } + + value_compare value_comp() const + { // return object for comparing values + return (value_compare(key_comp())); + } + + _Pairib insert(const value_type& _Val) + { // try to insert node with value _Val + _Nodeptr _Trynode = _Root(); + _Nodeptr _Wherenode = _Myhead; + bool _Addleft = true; // add to left of head if tree empty + while (!_Isnil(_Trynode)) + { // look for leaf to insert before (_Addleft) or after + _Wherenode = _Trynode; + _Addleft = this->comp(this->_Kfn(_Val), _Key(_Trynode)); + _Trynode = _Addleft ? _Left(_Trynode) : _Right(_Trynode); + } + + if (this->_Multi) + return (_Pairib(_Insert(_Addleft, _Wherenode, _Val), true)); + else + { // insert only if unique + iterator _Where = _TREE_ITERATOR(_Wherenode); + if (!_Addleft) + ; // need to test if insert after is okay + else if (_Where == begin()) + return (_Pairib(_Insert(true, _Wherenode, _Val), true)); + else + --_Where; // need to test if insert before is okay + + if (this->comp(_Key(_Where._Mynode()), this->_Kfn(_Val))) + return (_Pairib(_Insert(_Addleft, _Wherenode, _Val), true)); + else + return (_Pairib(_Where, false)); + } + } + + iterator insert(iterator _Where, + const value_type& _Val) + { // try to insert node with value _Val using _Where as a hint + iterator _Next; + + if (size() == 0) + return (_Insert(true, _Myhead, _Val)); // insert into empty tree + else if (this->_Multi) + { // insert even if duplicate + if (_Where == begin()) + { // insert at beginning if before first element + if (!this->comp(_Key(_Where._Mynode()), this->_Kfn(_Val))) + return (_Insert(true, _Where._Mynode(), _Val)); + } + else if (_Where == end()) + { // insert at end if after last element + if (!this->comp(this->_Kfn(_Val), _Key(_Rmost()))) + return (_Insert(false, _Rmost(), _Val)); + } + else if (!this->comp(_Key(_Where._Mynode()), this->_Kfn(_Val)) + && !this->comp(this->_Kfn(_Val), + _Key((--(_Next = _Where))._Mynode()))) + { // insert before _Where + if (_Isnil(_Right(_Next._Mynode()))) + return (_Insert(false, _Next._Mynode(), _Val)); + else + return (_Insert(true, _Where._Mynode(), _Val)); + } + else if (!this->comp(this->_Kfn(_Val), _Key(_Where._Mynode())) + && (++(_Next = _Where) == end() + || !this->comp(_Key(_Next._Mynode()), + this->_Kfn(_Val)))) + { // insert after _Where + if (_Isnil(_Right(_Where._Mynode()))) + return (_Insert(false, _Where._Mynode(), _Val)); + else + return (_Insert(true, _Next._Mynode(), _Val)); + } + } + else + { // insert only if unique + if (_Where == begin()) + { // insert at beginning if before first element + if (this->comp(this->_Kfn(_Val), _Key(_Where._Mynode()))) + return (_Insert(true, _Where._Mynode(), _Val)); + } + else if (_Where == end()) + { // insert at end if after last element + if (this->comp(_Key(_Rmost()), this->_Kfn(_Val))) + return (_Insert(false, _Rmost(), _Val)); + } + else if (this->comp(this->_Kfn(_Val), _Key(_Where._Mynode())) + && this->comp(_Key((--(_Next = _Where))._Mynode()), + this->_Kfn(_Val))) + { // insert before _Where + if (_Isnil(_Right(_Next._Mynode()))) + return (_Insert(false, _Next._Mynode(), _Val)); + else + return (_Insert(true, _Where._Mynode(), _Val)); + } + else if (this->comp(_Key(_Where._Mynode()), this->_Kfn(_Val)) + && (++(_Next = _Where) == end() + || this->comp(this->_Kfn(_Val), + _Key(_Next._Mynode())))) + { // insert after _Where + if (_Isnil(_Right(_Where._Mynode()))) + return (_Insert(false, _Where._Mynode(), _Val)); + else + return (_Insert(true, _Next._Mynode(), _Val)); + } + } + + return (insert(_Val).first); // try usual insert if all else fails + } + + template + void insert(_Iter _First, _Iter _Last) + { // insert [_First, _Last) one at a time + for (; _First != _Last; ++_First) + insert(*_First); + } + + iterator erase(iterator _Where) + { // erase element at _Where + if (_Isnil(_Where._Mynode())) + _THROW(out_of_range, "invalid map/set iterator"); + _Nodeptr _Erasednode = _Where._Mynode(); // node to erase + ++_Where; // save successor iterator for return + + _Nodeptr _Fixnode; // the node to recolor as needed + _Nodeptr _Fixnodeparent; // parent of _Fixnode (which may be nil) + _Nodeptr _Pnode = _Erasednode; + + if (_Isnil(_Left(_Pnode))) + _Fixnode = _Right(_Pnode); // must stitch up right subtree + else if (_Isnil(_Right(_Pnode))) + _Fixnode = _Left(_Pnode); // must stitch up left subtree + else + { // two subtrees, must lift successor node to replace erased + _Pnode = _Where._Mynode(); // _Pnode is successor node + _Fixnode = _Right(_Pnode); // _Fixnode is its only subtree + } + + if (_Pnode == _Erasednode) + { // at most one subtree, relink it + _Fixnodeparent = _Parent(_Erasednode); + if (!_Isnil(_Fixnode)) + _Parent(_Fixnode) = _Fixnodeparent; // link up + + if (_Root() == _Erasednode) + _Root() = _Fixnode; // link down from root + else if (_Left(_Fixnodeparent) == _Erasednode) + _Left(_Fixnodeparent) = _Fixnode; // link down to left + else + _Right(_Fixnodeparent) = _Fixnode; // link down to right + + if (_Lmost() == _Erasednode) + _Lmost() = _Isnil(_Fixnode) + ? _Fixnodeparent // smallest is parent of erased node + : _Min(_Fixnode); // smallest in relinked subtree + + if (_Rmost() == _Erasednode) + _Rmost() = _Isnil(_Fixnode) + ? _Fixnodeparent // largest is parent of erased node + : _Max(_Fixnode); // largest in relinked subtree + } + else + { // erased has two subtrees, _Pnode is successor to erased + _Parent(_Left(_Erasednode)) = _Pnode; // link left up + _Left(_Pnode) = _Left(_Erasednode); // link successor down + + if (_Pnode == _Right(_Erasednode)) + _Fixnodeparent = _Pnode; // successor is next to erased + else + { // successor further down, link in place of erased + _Fixnodeparent = _Parent(_Pnode); // parent is successor's + if (!_Isnil(_Fixnode)) + _Parent(_Fixnode) = _Fixnodeparent; // link fix up + _Left(_Fixnodeparent) = _Fixnode; // link fix down + _Right(_Pnode) = _Right(_Erasednode); // link successor down + _Parent(_Right(_Erasednode)) = _Pnode; // link right up + } + + if (_Root() == _Erasednode) + _Root() = _Pnode; // link down from root + else if (_Left(_Parent(_Erasednode)) == _Erasednode) + _Left(_Parent(_Erasednode)) = _Pnode; // link down to left + else + _Right(_Parent(_Erasednode)) = _Pnode; // link down to right + + _Parent(_Pnode) = _Parent(_Erasednode); // link successor up + std::swap(_Color(_Pnode), _Color(_Erasednode)); // recolor it + } + + if (_Color(_Erasednode) == _Black) + { // erasing black link, must recolor/rebalance tree + for (; _Fixnode != _Root() && _Color(_Fixnode) == _Black; + _Fixnodeparent = _Parent(_Fixnode)) + if (_Fixnode == _Left(_Fixnodeparent)) + { // fixup left subtree + _Pnode = _Right(_Fixnodeparent); + if (_Color(_Pnode) == _Red) + { // rotate red up from right subtree + _Color(_Pnode) = _Black; + _Color(_Fixnodeparent) = _Red; + _Lrotate(_Fixnodeparent); + _Pnode = _Right(_Fixnodeparent); + } + + if (_Isnil(_Pnode)) + _Fixnode = _Fixnodeparent; // shouldn't happen + else if (_Color(_Left(_Pnode)) == _Black + && _Color(_Right(_Pnode)) == _Black) + { // redden right subtree with black children + _Color(_Pnode) = _Red; + _Fixnode = _Fixnodeparent; + } + else + { // must rearrange right subtree + if (_Color(_Right(_Pnode)) == _Black) + { // rotate red up from left sub-subtree + _Color(_Left(_Pnode)) = _Black; + _Color(_Pnode) = _Red; + _Rrotate(_Pnode); + _Pnode = _Right(_Fixnodeparent); + } + + _Color(_Pnode) = _Color(_Fixnodeparent); + _Color(_Fixnodeparent) = _Black; + _Color(_Right(_Pnode)) = _Black; + _Lrotate(_Fixnodeparent); + break; // tree now recolored/rebalanced + } + } + else + { // fixup right subtree + _Pnode = _Left(_Fixnodeparent); + if (_Color(_Pnode) == _Red) + { // rotate red up from left subtree + _Color(_Pnode) = _Black; + _Color(_Fixnodeparent) = _Red; + _Rrotate(_Fixnodeparent); + _Pnode = _Left(_Fixnodeparent); + } + if (_Isnil(_Pnode)) + _Fixnode = _Fixnodeparent; // shouldn't happen + else if (_Color(_Right(_Pnode)) == _Black + && _Color(_Left(_Pnode)) == _Black) + { // redden left subtree with black children + _Color(_Pnode) = _Red; + _Fixnode = _Fixnodeparent; + } + else + { // must rearrange left subtree + if (_Color(_Left(_Pnode)) == _Black) + { // rotate red up from right sub-subtree + _Color(_Right(_Pnode)) = _Black; + _Color(_Pnode) = _Red; + _Lrotate(_Pnode); + _Pnode = _Left(_Fixnodeparent); + } + + _Color(_Pnode) = _Color(_Fixnodeparent); + _Color(_Fixnodeparent) = _Black; + _Color(_Left(_Pnode)) = _Black; + _Rrotate(_Fixnodeparent); + break; // tree now recolored/rebalanced + } + } + + _Color(_Fixnode) = _Black; // ensure stopping node is black + } + + this->_Alnod.destroy(_Erasednode); // destroy, free erased node + this->_Alnod.deallocate(_Erasednode, 1); + + if (0 < _Mysize) + --_Mysize; + + return (_Where); // return successor iterator + } + + iterator erase(iterator _First, iterator _Last) + { // erase [_First, _Last) + if (_First == begin() && _Last == end()) + { // erase all + clear(); + return (begin()); + } + else + { // partial erase, one at a time + while (_First != _Last) + erase(_First++); + return (_First); + } + } + + size_type erase(const key_type& _Keyval) + { // erase and count all that match _Keyval + _Pairii _Where = equal_range(_Keyval); + size_type _Num = 0; + _Distance(_Where.first, _Where.second, _Num); + erase(_Where.first, _Where.second); + return (_Num); + } + + void erase(const key_type *_First, const key_type *_Last) + { // erase all that match array of keys [_First, _Last) + while (_First != _Last) + erase(*_First++); + } + + void clear() + { // erase all + _Erase(_Root()); + _Root() = _Myhead, _Mysize = 0; + _Lmost() = _Myhead, _Rmost() = _Myhead; + } + + iterator find(const key_type& _Keyval) + { // find an element in mutable sequence that matches _Keyval + iterator _Where = lower_bound(_Keyval); + return (_Where == end() || this->comp(_Keyval, _Key(_Where._Mynode())) + ? end() : _Where); + } + + const_iterator find(const key_type& _Keyval) const + { // find an element in nonmutable sequence that matches _Keyval + const_iterator _Where = lower_bound(_Keyval); + return (_Where == end() || this->comp(_Keyval, _Key(_Where._Mynode())) + ? end() : _Where); + } + + size_type count(const key_type& _Keyval) const + { // count all elements that match _Keyval + _Paircc _Ans = equal_range(_Keyval); + size_type _Num = 0; + _Distance(_Ans.first, _Ans.second, _Num); + return (_Num); + } + + iterator lower_bound(const key_type& _Keyval) + { // find leftmost node not less than _Keyval in mutable tree + return (_TREE_ITERATOR(_Lbound(_Keyval))); + } + + const_iterator lower_bound(const key_type& _Keyval) const + { // find leftmost node not less than _Keyval in nonmutable tree + return (_TREE_CONST_ITERATOR(_Lbound(_Keyval))); + } + + iterator upper_bound(const key_type& _Keyval) + { // find leftmost node greater than _Keyval in mutable tree + return (_TREE_ITERATOR(_Ubound(_Keyval))); + } + + const_iterator upper_bound(const key_type& _Keyval) const + { // find leftmost node greater than _Keyval in nonmutable tree + return (_TREE_CONST_ITERATOR(_Ubound(_Keyval))); + } + + _Pairii equal_range(const key_type& _Keyval) + { // find range equivalent to _Keyval in mutable tree + return (_Pairii(lower_bound(_Keyval), upper_bound(_Keyval))); + } + + _Paircc equal_range(const key_type& _Keyval) const + { // find range equivalent to _Keyval in nonmutable tree + return (_Paircc(lower_bound(_Keyval), upper_bound(_Keyval))); + } + + void swap(_Myt& _Right) + { // exchange contents with _Right + if (get_allocator() == _Right.get_allocator()) + { // same allocator, swap control information + std::swap(this->comp, _Right.comp); + std::swap(_Myhead, _Right._Myhead); + std::swap(_Mysize, _Right._Mysize); + } + else + { // different allocator, do multiple assigns + _Myt _Tmp = *this; *this = _Right, _Right = _Tmp; + } + } + +protected: + void _Copy(const _Myt& _Right) + { // copy entire tree from _Right + _Root() = _Copy(_Right._Root(), _Myhead); + _Mysize = _Right.size(); + if (!_Isnil(_Root())) + { // nonempty tree, look for new smallest and largest + _Lmost() = _Min(_Root()); + _Rmost() = _Max(_Root()); + } + else + _Lmost() = _Myhead, _Rmost() = _Myhead; // empty tree + } + + _Nodeptr _Copy(_Nodeptr _Rootnode, _Nodeptr _Wherenode) + { // copy entire subtree, recursively + _Nodeptr _Newroot = _Myhead; // point at nil node + + if (!_Isnil(_Rootnode)) + { // copy a node, then any subtrees + _Nodeptr _Pnode = _Buynode(_Myhead, _Wherenode, _Myhead, + _Myval(_Rootnode), _Color(_Rootnode)); + if (_Isnil(_Newroot)) + _Newroot = _Pnode; // memorize new root + + _TRY_BEGIN + _Left(_Pnode) = _Copy(_Left(_Rootnode), _Pnode); + _Right(_Pnode) = _Copy(_Right(_Rootnode), _Pnode); + _CATCH_ALL + _Erase(_Newroot); // subtree copy failed, bail out + _RERAISE; + _CATCH_END + } + + return (_Newroot); // return newly constructed tree + } + + void _Erase(_Nodeptr _Rootnode) + { // free entire subtree, recursively + for (_Nodeptr _Pnode = _Rootnode; !_Isnil(_Pnode); _Rootnode = _Pnode) + { // free subtrees, then node + _Erase(_Right(_Pnode)); + _Pnode = _Left(_Pnode); + this->_Alnod.destroy(_Rootnode); // destroy, free erased node + this->_Alnod.deallocate(_Rootnode, 1); + } + } + + void _Init() + { // create head/nil node and make tree empty + _Myhead = _Buynode(); + _Isnil(_Myhead) = true; + _Root() = _Myhead; + _Lmost() = _Myhead, _Rmost() = _Myhead; + _Mysize = 0; + } + + iterator _Insert(bool _Addleft, _Nodeptr _Wherenode, + const value_type& _Val) + { // add node with value next to _Wherenode, to left if _Addnode + if (max_size() - 1 <= _Mysize) + _THROW(length_error, "map/set too long"); + _Nodeptr _Newnode = _Buynode(_Myhead, _Wherenode, _Myhead, + _Val, _Red); + + ++_Mysize; + if (_Wherenode == _Myhead) + { // first node in tree, just set head values + _Root() = _Newnode; + _Lmost() = _Newnode, _Rmost() = _Newnode; + } + else if (_Addleft) + { // add to left of _Wherenode + _Left(_Wherenode) = _Newnode; + if (_Wherenode == _Lmost()) + _Lmost() = _Newnode; + } + else + { // add to right of _Wherenode + _Right(_Wherenode) = _Newnode; + if (_Wherenode == _Rmost()) + _Rmost() = _Newnode; + } + + for (_Nodeptr _Pnode = _Newnode; _Color(_Parent(_Pnode)) == _Red; ) + if (_Parent(_Pnode) == _Left(_Parent(_Parent(_Pnode)))) + { // fixup red-red in left subtree + _Wherenode = _Right(_Parent(_Parent(_Pnode))); + if (_Color(_Wherenode) == _Red) + { // parent has two red children, blacken both + _Color(_Parent(_Pnode)) = _Black; + _Color(_Wherenode) = _Black; + _Color(_Parent(_Parent(_Pnode))) = _Red; + _Pnode = _Parent(_Parent(_Pnode)); + } + else + { // parent has red and black children + if (_Pnode == _Right(_Parent(_Pnode))) + { // rotate right child to left + _Pnode = _Parent(_Pnode); + _Lrotate(_Pnode); + } + _Color(_Parent(_Pnode)) = _Black; // propagate red up + _Color(_Parent(_Parent(_Pnode))) = _Red; + _Rrotate(_Parent(_Parent(_Pnode))); + } + } + else + { // fixup red-red in right subtree + _Wherenode = _Left(_Parent(_Parent(_Pnode))); + if (_Color(_Wherenode) == _Red) + { // parent has two red children, blacken both + _Color(_Parent(_Pnode)) = _Black; + _Color(_Wherenode) = _Black; + _Color(_Parent(_Parent(_Pnode))) = _Red; + _Pnode = _Parent(_Parent(_Pnode)); + } + else + { // parent has red and black children + if (_Pnode == _Left(_Parent(_Pnode))) + { // rotate left child to right + _Pnode = _Parent(_Pnode); + _Rrotate(_Pnode); + } + _Color(_Parent(_Pnode)) = _Black; // propagate red up + _Color(_Parent(_Parent(_Pnode))) = _Red; + _Lrotate(_Parent(_Parent(_Pnode))); + } + } + + _Color(_Root()) = _Black; // root is always black + return (_TREE_ITERATOR(_Newnode)); + } + + _Nodeptr _Lbound(const key_type& _Keyval) const + { // find leftmost node not less than _Keyval + _Nodeptr _Pnode = _Root(); + _Nodeptr _Wherenode = _Myhead; // end() if search fails + + while (!_Isnil(_Pnode)) + if (this->comp(_Key(_Pnode), _Keyval)) + _Pnode = _Right(_Pnode); // descend right subtree + else + { // _Pnode not less than _Keyval, remember it + _Wherenode = _Pnode; + _Pnode = _Left(_Pnode); // descend left subtree + } + + return (_Wherenode); // return best remembered candidate + } + + _Nodeptr& _Lmost() + { // return leftmost node in mutable tree + return (_Left(_Myhead)); + } + + _Nodeptr& _Lmost() const + { // return leftmost node in nonmutable tree + return (_Left(_Myhead)); + } + + void _Lrotate(_Nodeptr _Wherenode) + { // promote right node to root of subtree + _Nodeptr _Pnode = _Right(_Wherenode); + _Right(_Wherenode) = _Left(_Pnode); + + if (!_Isnil(_Left(_Pnode))) + _Parent(_Left(_Pnode)) = _Wherenode; + _Parent(_Pnode) = _Parent(_Wherenode); + + if (_Wherenode == _Root()) + _Root() = _Pnode; + else if (_Wherenode == _Left(_Parent(_Wherenode))) + _Left(_Parent(_Wherenode)) = _Pnode; + else + _Right(_Parent(_Wherenode)) = _Pnode; + + _Left(_Pnode) = _Wherenode; + _Parent(_Wherenode) = _Pnode; + } + + static _Nodeptr _Max(_Nodeptr _Pnode) + { // return rightmost node in subtree at _Pnode + while (!_Isnil(_Right(_Pnode))) + _Pnode = _Right(_Pnode); + return (_Pnode); + } + + static _Nodeptr _Min(_Nodeptr _Pnode) + { // return leftmost node in subtree at _Pnode + while (!_Isnil(_Left(_Pnode))) + _Pnode = _Left(_Pnode); + return (_Pnode); + } + + _Nodeptr& _Rmost() + { // return rightmost node in mutable tree + return (_Right(_Myhead)); + } + + _Nodeptr& _Rmost() const + { // return rightmost node in nonmutable tree + return (_Right(_Myhead)); + } + + _Nodeptr& _Root() + { // return root of mutable tree + return (_Parent(_Myhead)); + } + + _Nodeptr& _Root() const + { // return root of nonmutable tree + return (_Parent(_Myhead)); + } + + void _Rrotate(_Nodeptr _Wherenode) + { // promote left node to root of subtree + _Nodeptr _Pnode = _Left(_Wherenode); + _Left(_Wherenode) = _Right(_Pnode); + + if (!_Isnil(_Right(_Pnode))) + _Parent(_Right(_Pnode)) = _Wherenode; + _Parent(_Pnode) = _Parent(_Wherenode); + + if (_Wherenode == _Root()) + _Root() = _Pnode; + else if (_Wherenode == _Right(_Parent(_Wherenode))) + _Right(_Parent(_Wherenode)) = _Pnode; + else + _Left(_Parent(_Wherenode)) = _Pnode; + + _Right(_Pnode) = _Wherenode; + _Parent(_Wherenode) = _Pnode; + } + + _Nodeptr _Ubound(const key_type& _Keyval) const + { // find leftmost node greater than _Keyval + _Nodeptr _Pnode = _Root(); + _Nodeptr _Wherenode = _Myhead; // end() if search fails + + while (!_Isnil(_Pnode)) + if (this->comp(_Keyval, _Key(_Pnode))) + { // _Pnode greater than _Keyval, remember it + _Wherenode = _Pnode; + _Pnode = _Left(_Pnode); // descend left subtree + } + else + _Pnode = _Right(_Pnode); // descend right subtree + + return (_Wherenode); // return best remembered candidate + } + + _Nodeptr _Buynode() + { // allocate a head/nil node + _Nodeptr _Wherenode = this->_Alnod.allocate(1); + int _Linkcnt = 0; + + _TRY_BEGIN + this->_Alptr.construct(&_Left(_Wherenode), 0); + ++_Linkcnt; + this->_Alptr.construct(&_Parent(_Wherenode), 0); + ++_Linkcnt; + this->_Alptr.construct(&_Right(_Wherenode), 0); + _CATCH_ALL + if (1 < _Linkcnt) + this->_Alptr.destroy(&_Parent(_Wherenode)); + if (0 < _Linkcnt) + this->_Alptr.destroy(&_Left(_Wherenode)); + this->_Alnod.deallocate(_Wherenode, 1); + _RERAISE; + _CATCH_END + _Color(_Wherenode) = _Black; + _Isnil(_Wherenode) = false; + return (_Wherenode); + } + + _Nodeptr _Buynode(_Nodeptr _Larg, _Nodeptr _Parg, + _Nodeptr _Rarg, const value_type& _Val, char _Carg) + { // allocate a node with pointers, value, and color + _Nodeptr _Wherenode = this->_Alnod.allocate(1); + _TRY_BEGIN + new (_Wherenode) _Node(_Larg, _Parg, _Rarg, _Val, _Carg); + _CATCH_ALL + this->_Alnod.deallocate(_Wherenode, 1); + _RERAISE; + _CATCH_END + return (_Wherenode); + } + + void _Tidy() + { // free all storage + erase(begin(), end()); + this->_Alptr.destroy(&_Left(_Myhead)); + this->_Alptr.destroy(&_Parent(_Myhead)); + this->_Alptr.destroy(&_Right(_Myhead)); + this->_Alnod.deallocate(_Myhead, 1); + _Myhead = 0, _Mysize = 0; + } + + _Nodeptr _Myhead; // pointer to head node + size_type _Mysize; // number of elements + }; + + // _Tree TEMPLATE OPERATORS +template inline + bool operator==(const _Tree<_Traits>& _Left, const _Tree<_Traits>& _Right) + { // test for _Tree equality + return (_Left.size() == _Right.size() + && equal(_Left.begin(), _Left.end(), _Right.begin())); + } + +template inline + bool operator!=(const _Tree<_Traits>& _Left, const _Tree<_Traits>& _Right) + { // test for _Tree inequality + return (!(_Left == _Right)); + } + +template inline + bool operator<(const _Tree<_Traits>& _Left, const _Tree<_Traits>& _Right) + { // test if _Less < _Right for _Trees + return (lexicographical_compare(_Left.begin(), _Left.end(), + _Right.begin(), _Right.end())); + } + +template inline + bool operator>(const _Tree<_Traits>& _Left, const _Tree<_Traits>& _Right) + { // test if _Less > _Right for _Trees + return (_Right < _Left); + } + +template inline + bool operator<=(const _Tree<_Traits>& _Left, const _Tree<_Traits>& _Right) + { // test if _Less <= _Right for _Trees + return (!(_Right < _Left)); + } + +template inline + bool operator>=(const _Tree<_Traits>& _Left, const _Tree<_Traits>& _Right) + { // test if _Less >= _Right for _Trees + return (!(_Left < _Right)); + } +_STD_END + + #pragma warning(default:4127 4284) + +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _XTREE_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + */ + +/* + * This file is derived from software bearing the following + * restrictions: + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this + * software and its documentation for any purpose is hereby + * granted without fee, provided that the above copyright notice + * appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation. + * Hewlett-Packard Company makes no representations about the + * suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xutility b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xutility new file mode 100644 index 00000000..b3161491 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/xutility @@ -0,0 +1,1299 @@ +// xutility internal header +#pragma once +#ifndef _XUTILITY_ +#define _XUTILITY_ +#include +#include + +#pragma pack(push,8) +#pragma warning(push,3) + + #pragma warning(disable:4284 4786) +_STD_BEGIN + +// ITERATOR STUFF (from ) + + // ITERATOR TAGS +struct input_iterator_tag + { // identifying tag for input iterators + }; + +struct output_iterator_tag + { // identifying tag for output iterators + }; + +struct forward_iterator_tag + : public input_iterator_tag + { // identifying tag for forward iterators + }; + +struct bidirectional_iterator_tag + : public forward_iterator_tag + { // identifying tag for bidirectional iterators + }; + +struct random_access_iterator_tag + : public bidirectional_iterator_tag + { // identifying tag for random-access iterators + }; + +struct _Int_iterator_tag + { // identifying tag for integer types, not an iterator + }; + + // POINTER ITERATOR TAGS +struct _Nonscalar_ptr_iterator_tag + { // pointer to unknown type + }; +struct _Scalar_ptr_iterator_tag + { // pointer to scalar type + }; + + // TEMPLATE CLASS iterator +template + struct iterator + { // base type for all iterator classes + typedef _Category iterator_category; + typedef _Ty value_type; + typedef _Diff difference_type; + typedef _Diff distance_type; // retained + typedef _Pointer pointer; + typedef _Reference reference; + }; + +template + struct _Bidit + : public iterator + { // base for bidirectional iterators + }; + +template + struct _Ranit + : public iterator + { // base for random-access iterators + }; + +struct _Outit + : public iterator + { // base for output iterators + }; + + // TEMPLATE CLASS iterator_traits +template + struct iterator_traits + { // get traits from iterator _Iter + typedef typename _Iter::iterator_category iterator_category; + typedef typename _Iter::value_type value_type; + typedef typename _Iter::difference_type difference_type; + typedef difference_type distance_type; // retained + typedef typename _Iter::pointer pointer; + typedef typename _Iter::reference reference; + }; + +template + struct iterator_traits<_Ty *> + { // get traits from pointer + typedef random_access_iterator_tag iterator_category; + typedef _Ty value_type; + typedef ptrdiff_t difference_type; + typedef ptrdiff_t distance_type; // retained + typedef _Ty *pointer; + typedef _Ty& reference; + }; + +template + struct iterator_traits + { // get traits from const pointer + typedef random_access_iterator_tag iterator_category; + typedef _Ty value_type; + typedef ptrdiff_t difference_type; + typedef ptrdiff_t distance_type; // retained + typedef const _Ty *pointer; + typedef const _Ty& reference; + }; + +template<> struct iterator_traits<_Bool> + { // get traits from integer type + typedef _Int_iterator_tag iterator_category; + }; + +template<> struct iterator_traits + { // get traits from integer type + typedef _Int_iterator_tag iterator_category; + }; + +template<> struct iterator_traits + { // get traits from integer type + typedef _Int_iterator_tag iterator_category; + }; + +template<> struct iterator_traits + { // get traits from integer type + typedef _Int_iterator_tag iterator_category; + }; + + #ifdef _NATIVE_WCHAR_T_DEFINED +template<> struct iterator_traits + { // get traits from integer type + typedef _Int_iterator_tag iterator_category; + }; + #endif /* _NATIVE_WCHAR_T_DEFINED */ + +template<> struct iterator_traits + { // get traits from integer type + typedef _Int_iterator_tag iterator_category; + }; + +template<> struct iterator_traits + { // get traits from integer type + typedef _Int_iterator_tag iterator_category; + }; + +template<> struct iterator_traits + { // get traits from integer type + typedef _Int_iterator_tag iterator_category; + }; + +template<> struct iterator_traits + { // get traits from integer type + typedef _Int_iterator_tag iterator_category; + }; + +template<> struct iterator_traits + { // get traits from integer type + typedef _Int_iterator_tag iterator_category; + }; + +template<> struct iterator_traits + { // get traits from integer type + typedef _Int_iterator_tag iterator_category; + }; + + #ifdef _LONGLONG +template<> struct iterator_traits<_LONGLONG> + { // get traits from integer type + typedef _Int_iterator_tag iterator_category; + }; + +template<> struct iterator_traits<_ULONGLONG> + { // get traits from integer type + typedef _Int_iterator_tag iterator_category; + }; + #endif /* _LONGLONG */ + + // TEMPLATE FUNCTION _Iter_cat +template inline + typename iterator_traits<_Iter>::iterator_category + _Iter_cat(const _Iter&) + { // return category from iterator argument + typename iterator_traits<_Iter>::iterator_category _Cat; + return (_Cat); + } + + + // TEMPLATE FUNCTION _Ptr_cat +template inline + _Nonscalar_ptr_iterator_tag _Ptr_cat(_T1&, _T2&) + { // return pointer category from arbitrary arguments + _Nonscalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +template inline + _Scalar_ptr_iterator_tag _Ptr_cat(_Ty **, _Ty **) + { // return pointer category from pointer to pointer arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +template inline + _Scalar_ptr_iterator_tag _Ptr_cat(_Ty **, const _Ty **) + { // return pointer category from pointer to pointer arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +template inline + _Scalar_ptr_iterator_tag _Ptr_cat(_Ty *const *, _Ty **) + { // return pointer category from pointer to pointer arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +template inline + _Scalar_ptr_iterator_tag _Ptr_cat(_Ty *const *, const _Ty **) + { // return pointer category from pointer to pointer arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + + // INTEGER FUNCTION _Ptr_cat +inline _Scalar_ptr_iterator_tag _Ptr_cat(_Bool *, _Bool *) + { // return pointer category from pointer to bool arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(const _Bool *, _Bool *) + { // return pointer category from pointer to bool arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(char *, char *) + { // return pointer category from pointer to char arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(const char *, char *) + { // return pointer category from pointer to char arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(signed char *, signed char *) + { // return pointer category from pointer to signed char arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(const signed char *, signed char *) + { // return pointer category from pointer to signed char arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(unsigned char *, unsigned char *) + { // return pointer category from pointer to unsigned char arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(const unsigned char *, + unsigned char *) + { // return pointer category from pointer to unsigned char arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + + #ifdef _NATIVE_WCHAR_T_DEFINED +inline _Scalar_ptr_iterator_tag _Ptr_cat(wchar_t *, wchar_t *) + { // return pointer category from pointer to wchar_t arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(const wchar_t *, wchar_t *) + { // return pointer category from pointer to wchar_t arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + #endif /* _NATIVE_WCHAR_T_DEFINED */ + +inline _Scalar_ptr_iterator_tag _Ptr_cat(short *, short *) + { // return pointer category from pointer to short arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(const short *, short *) + { // return pointer category from pointer to short arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(unsigned short *, + unsigned short *) + { // return pointer category from pointer to unsigned short arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(const unsigned short *, + unsigned short *) + { // return pointer category from pointer to unsigned short arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(int *, int *) + { // return pointer category from pointer to int arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(const int *, int *) + { // return pointer category from pointer to int arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(unsigned int *, unsigned int *) + { // return pointer category from pointer to unsigned int arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(const unsigned int *, unsigned int *) + { // return pointer category from pointer to unsigned int arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(long *, long *) + { // return pointer category from pointer to long arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(const long *, long *) + { // return pointer category from pointer to long arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(unsigned long *, unsigned long *) + { // return pointer category from pointer to unsigned long arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(const unsigned long *, + unsigned long *) + { // return pointer category from pointer to unsigned long arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(float *, float *) + { // return pointer category from pointer to float arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(const float *, float *) + { // return pointer category from pointer to float arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(double *, double *) + { // return pointer category from pointer to double arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(const double *, double *) + { // return pointer category from pointer to double arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(long double *, long double *) + { // return pointer category from pointer to long double arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(const long double *, long double *) + { // return pointer category from pointer to long double arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + + #ifdef _LONGLONG +inline _Scalar_ptr_iterator_tag _Ptr_cat(_LONGLONG *, _LONGLONG *) + { // return pointer category from pointer to long long arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(const _LONGLONG *, _LONGLONG *) + { // return pointer category from pointer to long long arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(_ULONGLONG *, _ULONGLONG *) + { // return pointer category from pointer to ulong long arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + +inline _Scalar_ptr_iterator_tag _Ptr_cat(const _ULONGLONG *, _ULONGLONG *) + { // return pointer category from pointer to ulong long arguments + _Scalar_ptr_iterator_tag _Cat; + return (_Cat); + } + #endif /* _LONGLONG */ + + + // TEMPLATE FUNCTIONS distance and _Distance +template inline + void _Distance2(_InIt _First, _InIt _Last, _Diff& _Off, + input_iterator_tag) + { // add to _Off distance between input iterators + for (; _First != _Last; ++_First) + ++_Off; + } + +template inline + void _Distance2(_FwdIt _First, _FwdIt _Last, _Diff& _Off, + forward_iterator_tag) + { // add to _Off distance between forward iterators (redundant) + for (; _First != _Last; ++_First) + ++_Off; + } + +template inline + void _Distance2(_BidIt _First, _BidIt _Last, _Diff& _Off, + bidirectional_iterator_tag) + { // add to _Off distance between bidirectional iterators (redundant) + for (; _First != _Last; ++_First) + ++_Off; + } + +template inline + void _Distance2(_RanIt _First, _RanIt _Last, _Diff& _Off, + random_access_iterator_tag) + { // add to _Off distance between random-access iterators + + + _Off += _Last - _First; + } + +template inline + typename iterator_traits<_InIt>::difference_type + distance(_InIt _First, _InIt _Last) + { // return distance between iterators + typename iterator_traits<_InIt>::difference_type _Off = 0; + _Distance2(_First, _Last, _Off, _Iter_cat(_First)); + return (_Off); + } + + +template inline + void _Distance(_InIt _First, _InIt _Last, _Diff& _Off) + { // add to _Off distance between iterators + _Distance2(_First, _Last, _Off, _Iter_cat(_First)); + } + + // TEMPLATE CLASS reverse_iterator +template + class reverse_iterator + : public iterator< + typename iterator_traits<_RanIt>::iterator_category, + typename iterator_traits<_RanIt>::value_type, + typename iterator_traits<_RanIt>::difference_type, + typename iterator_traits<_RanIt>::pointer, + typename iterator_traits<_RanIt>::reference> + { // wrap iterator to run it backwards +public: + typedef reverse_iterator<_RanIt> _Myt; + typedef typename iterator_traits<_RanIt>::difference_type difference_type; + typedef typename iterator_traits<_RanIt>::pointer pointer; + typedef typename iterator_traits<_RanIt>::reference reference; + typedef _RanIt iterator_type; + + reverse_iterator() + { // construct with default wrapped iterator + } + + explicit reverse_iterator(_RanIt _Right) + : current(_Right) + { // construct wrapped iterator from _Right + } + + template + reverse_iterator(const reverse_iterator<_Other>& _Right) + : current(_Right.base()) + { // initialize with compatible base + } + + _RanIt base() const + { // return wrapped iterator + return (current); + } + + reference operator*() const + { // return designated value + _RanIt _Tmp = current; + return (*--_Tmp); + } + + pointer operator->() const + { // return pointer to class object + return (&**this); + } + + _Myt& operator++() + { // preincrement + --current; + return (*this); + } + + _Myt operator++(int) + { // postincrement + _Myt _Tmp = *this; + --current; + return (_Tmp); + } + + _Myt& operator--() + { // predecrement + ++current; + return (*this); + } + + _Myt operator--(int) + { // postdecrement + _Myt _Tmp = *this; + ++current; + return (_Tmp); + } + + bool _Equal(const _Myt& _Right) const + { // test for iterator equality + return (current == _Right.current); + } + +// N.B. functions valid for random-access iterators only beyond this point + + _Myt& operator+=(difference_type _Off) + { // increment by integer + current -= _Off; + return (*this); + } + + _Myt operator+(difference_type _Off) const + { // return this + integer + return (_Myt(current - _Off)); + } + + _Myt& operator-=(difference_type _Off) + { // decrement by integer + current += _Off; + return (*this); + } + + _Myt operator-(difference_type _Off) const + { // return this - integer + return (_Myt(current + _Off)); + } + + reference operator[](difference_type _Off) const + { // subscript + return (*(*this + _Off)); + } + + bool _Less(const _Myt& _Right) const + { // test if this < _Right + return (_Right.current < current); + } + + difference_type _Minus(const _Myt& _Right) const + { // return difference of iterators + return (_Right.current - current); + } + +protected: + _RanIt current; // the wrapped iterator + }; + + // reverse_iterator TEMPLATE OPERATORS +template inline + reverse_iterator<_RanIt> __cdecl operator+(_Diff _Off, + const reverse_iterator<_RanIt>& _Right) + { // return reverse_iterator + integer + return (_Right + _Off); + } + +template inline + typename reverse_iterator<_RanIt>::difference_type + __cdecl operator-(const reverse_iterator<_RanIt>& _Left, + const reverse_iterator<_RanIt>& _Right) + { // return difference of reverse_iterators + return (_Left._Minus(_Right)); + } + +template inline + bool __cdecl operator==(const reverse_iterator<_RanIt>& _Left, + const reverse_iterator<_RanIt>& _Right) + { // test for reverse_iterator equality + return (_Left._Equal(_Right)); + } + +template inline + bool __cdecl operator!=(const reverse_iterator<_RanIt>& _Left, + const reverse_iterator<_RanIt>& _Right) + { // test for reverse_iterator inequality + return (!(_Left == _Right)); + } + +template inline + bool __cdecl operator<(const reverse_iterator<_RanIt>& _Left, + const reverse_iterator<_RanIt>& _Right) + { // test for reverse_iterator < reverse_iterator + return (_Left._Less(_Right)); + } + +template inline + bool __cdecl operator>(const reverse_iterator<_RanIt>& _Left, + const reverse_iterator<_RanIt>& _Right) + { // test for reverse_iterator > reverse_iterator + return (_Right < _Left); + } + +template inline + bool __cdecl operator<=(const reverse_iterator<_RanIt>& _Left, + const reverse_iterator<_RanIt>& _Right) + { // test for reverse_iterator <= reverse_iterator + return (!(_Right < _Left)); + } + +template inline + bool __cdecl operator>=(const reverse_iterator<_RanIt>& _Left, + const reverse_iterator<_RanIt>& _Right) + { // test for reverse_iterator >= reverse_iterator + return (!(_Left < _Right)); + } + + // TEMPLATE CLASS reverse_bidirectional_iterator (retained) +template + class reverse_bidirectional_iterator + : public _Bidit<_Ty, _Diff, _Pointer, _Reference> + { // wrap bidirectional iterator to run it backwards +public: + typedef reverse_bidirectional_iterator<_BidIt, _Ty, _Reference, + _Pointer, _Diff> _Myt; + typedef _BidIt iterator_type; + + reverse_bidirectional_iterator() + { // construct with default wrapped iterator + } + + explicit reverse_bidirectional_iterator(_BidIt _Right) + : current(_Right) + { // construct wrapped iterator from _Right + } + + _BidIt base() const + { // return wrapped iterator + return (current); + } + + _Reference operator*() const + { // return designated value + _BidIt _Tmp = current; + return (*--_Tmp); + } + + _Pointer operator->() const + { // return pointer to class object + _Reference _Tmp = **this; + return (&_Tmp); + } + + _Myt& operator++() + { // preincrement + --current; + return (*this); + } + + _Myt operator++(int) + { // postincrement + _Myt _Tmp = *this; + --current; + return (_Tmp); + } + + _Myt& operator--() + { // predecrement + ++current; + return (*this); + } + + _Myt operator--(int) + { // postdecrement + _Myt _Tmp = *this; + ++current; + return (_Tmp); + } + + bool operator==(const _Myt& _Right) const + { // test for iterator equality + return (current == _Right.current); + } + + bool operator!=(const _Myt& _Right) const + { // test for iterator inequality + return (!(*this == _Right)); + } + +protected: + _BidIt current; // the wrapped iterator + }; + + // TEMPLATE CLASS _Revbidit +template + class _Revbidit + : public iterator< + typename iterator_traits<_BidIt>::iterator_category, + typename iterator_traits<_BidIt>::value_type, + typename iterator_traits<_BidIt>::difference_type, + typename iterator_traits<_BidIt>::pointer, + typename iterator_traits<_BidIt>::reference> + { // wrap bidirectional iterator to run it backwards +public: + typedef _Revbidit<_BidIt, _BidIt2> _Myt; + typedef typename iterator_traits<_BidIt>::difference_type _Diff; + typedef typename iterator_traits<_BidIt>::pointer _Pointer; + typedef typename iterator_traits<_BidIt>::reference _Reference; + typedef _BidIt iterator_type; + + _Revbidit() + { // construct with default wrapped iterator + } + + explicit _Revbidit(_BidIt _Right) + : current(_Right) + { // construct wrapped iterator from _Right + } + + _Revbidit(const _Revbidit<_BidIt2>& _Other) + : current (_Other.base()) + { // const converter or copy constructor + } + + _BidIt base() const + { // return wrapped iterator + return (current); + } + + _Reference operator*() const + { // return designated value + _BidIt _Tmp = current; + return (*--_Tmp); + } + + _Pointer operator->() const + { // return pointer to class object + _Reference _Tmp = **this; + return (&_Tmp); + } + + _Myt& operator++() + { // preincrement + --current; + return (*this); + } + + _Myt operator++(int) + { // postincrement + _Myt _Tmp = *this; + --current; + return (_Tmp); + } + + _Myt& operator--() + { // predecrement + ++current; + return (*this); + } + + _Myt operator--(int) + { // postdecrement + _Myt _Tmp = *this; + ++current; + return (_Tmp); + } + + bool operator==(const _Myt& _Right) const + { // test for iterator equality + return (current == _Right.current); + } + + bool operator!=(const _Myt& _Right) const + { // test for iterator inequality + return (!(*this == _Right)); + } + +protected: + _BidIt current; + }; + + // TEMPLATE CLASS istreambuf_iterator +template + class istreambuf_iterator + : public iterator + { // wrap stream buffer as input iterator +public: + typedef istreambuf_iterator<_Elem, _Traits> _Myt; + typedef _Elem char_type; + typedef _Traits traits_type; + typedef basic_streambuf<_Elem, _Traits> streambuf_type; + typedef basic_istream<_Elem, _Traits> istream_type; + typedef typename traits_type::int_type int_type; + + istreambuf_iterator(streambuf_type *_Sb = 0) _THROW0() + : _Strbuf(_Sb), _Got(_Sb == 0) + { // construct from stream buffer _Sb + } + + istreambuf_iterator(istream_type& _Istr) _THROW0() + : _Strbuf(_Istr.rdbuf()), _Got(_Istr.rdbuf() == 0) + { // construct from stream buffer in istream _Istr + } + + _Elem operator*() const + { // return designated value + if (!_Got) + ((_Myt *)this)->_Peek(); + return (_Val); + } + + _Myt& operator++() + { // preincrement + _Inc(); + return (*this); + } + + _Myt operator++(int) + { // postincrement + if (!_Got) + _Peek(); + _Myt _Tmp = *this; + ++*this; + return (_Tmp); + } + + bool equal(const _Myt& _Right) const + { // test for equality + if (!_Got) + ((_Myt *)this)->_Peek(); + if (!_Right._Got) + ((_Myt *)&_Right)->_Peek(); + return (_Strbuf == 0 && _Right._Strbuf == 0 + || _Strbuf != 0 && _Right._Strbuf != 0); + } + +private: + void _Inc() + { // skip to next input element + if (_Strbuf == 0 + || traits_type::eq_int_type(traits_type::eof(), + _Strbuf->sbumpc())) + _Strbuf = 0, _Got = true; + else + _Got = false; + } + + _Elem _Peek() + { // peek at next input element + int_type _Meta; + if (_Strbuf == 0 + || traits_type::eq_int_type(traits_type::eof(), + _Meta = _Strbuf->sgetc())) + _Strbuf = 0; + else + _Val = traits_type::to_char_type(_Meta); + _Got = true; + return (_Val); + } + + streambuf_type *_Strbuf; // the wrapped stream buffer + bool _Got; // true if _Val is valid + _Elem _Val; // next element to deliver + }; + + // istreambuf_iterator TEMPLATE OPERATORS +template inline + bool __cdecl operator==( + const istreambuf_iterator<_Elem, _Traits>& _Left, + const istreambuf_iterator<_Elem, _Traits>& _Right) + { // test for istreambuf_iterator equality + return (_Left.equal(_Right)); + } + +template inline + bool __cdecl operator!=( + const istreambuf_iterator<_Elem, _Traits>& _Left, + const istreambuf_iterator<_Elem, _Traits>& _Right) + { // test for istreambuf_iterator inequality + return (!(_Left == _Right)); + } + + // TEMPLATE CLASS ostreambuf_iterator +template + class ostreambuf_iterator + : public _Outit + { // wrap stream buffer as output iterator + typedef ostreambuf_iterator<_Elem, _Traits> _Myt; +public: + typedef _Elem char_type; + typedef _Traits traits_type; + typedef basic_streambuf<_Elem, _Traits> streambuf_type; + typedef basic_ostream<_Elem, _Traits> ostream_type; + + ostreambuf_iterator(streambuf_type *_Sb) _THROW0() + : _Failed(false), _Strbuf(_Sb) + { // construct from stream buffer _Sb + } + + ostreambuf_iterator(ostream_type& _Ostr) _THROW0() + : _Failed(false), _Strbuf(_Ostr.rdbuf()) + { // construct from stream buffer in _Ostr + } + + _Myt& operator=(_Elem _Right) + { // store element and increment + if (_Strbuf == 0 + || traits_type::eq_int_type(_Traits::eof(), + _Strbuf->sputc(_Right))) + _Failed = true; + return (*this); + } + + _Myt& operator*() + { // pretend to get designated element + return (*this); + } + + _Myt& operator++() + { // pretend to preincrement + return (*this); + } + + _Myt& operator++(int) + { // pretend to postincrement + return (*this); + } + + bool failed() const _THROW0() + { // return true if any stores failed + return (_Failed); + } + +private: + bool _Failed; // true if any stores have failed + streambuf_type *_Strbuf; // the wrapped stream buffer + }; + +// ALGORITHM STUFF (from ) + + // TEMPLATE FUNCTION copy +template inline + _OutIt _Copy_opt(_InIt _First, _InIt _Last, _OutIt _Dest, + _Nonscalar_ptr_iterator_tag) + { // copy [_First, _Last) to [_Dest, ...), arbitrary iterators + for (; _First != _Last; ++_Dest, ++_First) + *_Dest = *_First; + return (_Dest); + } + +template inline + _OutIt _Copy_opt(_InIt _First, _InIt _Last, _OutIt _Dest, + _Scalar_ptr_iterator_tag) + { // copy [_First, _Last) to [_Dest, ...), pointers to scalars + ptrdiff_t _Off = _Last - _First; // NB: non-overlapping move + return ((_OutIt)::memmove(&*_Dest, &*_First, + _Off * sizeof (*_First)) + _Off); + } + +template inline + _OutIt copy(_InIt _First, _InIt _Last, _OutIt _Dest) + { // copy [_First, _Last) to [_Dest, ...) + return (_Copy_opt(_First, _Last, _Dest, _Ptr_cat(_First, _Dest))); + } + + // TEMPLATE FUNCTION copy_backward +template inline + _BidIt2 _Copy_backward_opt(_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest, + _Nonscalar_ptr_iterator_tag) + { // copy [_First, _Last) backwards to [..., _Dest), arbitrary iterators + while (_First != _Last) + *--_Dest = *--_Last; + return (_Dest); + } + +template inline + _OutIt _Copy_backward_opt(_InIt _First, _InIt _Last, _OutIt _Dest, + _Scalar_ptr_iterator_tag) + { // copy [_First, _Last) backwards to [..., _Dest), pointers to scalars + ptrdiff_t _Off = _Last - _First; // NB: non-overlapping move + return ((_OutIt)memmove(&*_Dest - _Off, &*_First, + _Off * sizeof (*_First))); + } + +template inline + _BidIt2 copy_backward(_BidIt1 _First, _BidIt1 _Last, _BidIt2 _Dest) + { // copy [_First, _Last) backwards to [..., _Dest) + return (_Copy_backward_opt(_First, _Last, _Dest, + _Ptr_cat(_First, _Dest))); + } + + // TEMPLATE FUNCTION mismatch +template inline + pair<_InIt1, _InIt2> + mismatch(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2) + { // return [_First1, _Last1) and [_First2, _Last2) mismatch + for (; _First1 != _Last1 && *_First1 == *_First2; ) + ++_First1, ++_First2; + return (pair<_InIt1, _InIt2>(_First1, _First2)); + } + + // TEMPLATE FUNCTION mismatch WITH PRED +template inline + pair<_InIt1, _InIt2> + mismatch(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _Pr _Pred) + { // return [_First1, _Last1) and [_First2, _Last2) mismatch using _Pred + for (; _First1 != _Last1 && _Pred(*_First1, *_First2); ) + ++_First1, ++_First2; + return (pair<_InIt1, _InIt2>(_First1, _First2)); + } + + // TEMPLATE FUNCTION equal +template inline + bool equal(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2) + { // compare [_First1, _Last1) to [First2, ...) + return (mismatch(_First1, _Last1, _First2).first == _Last1); + } + +inline bool equal(const char *_First1, + const char *_Last1, const char *_First2) + { // compare [_First1, _Last1) to [First2, ...), for chars + return (::memcmp(_First1, _First2, _Last1 - _First1) == 0); + } + +inline bool equal(const signed char *_First1, + const signed char *_Last1, const signed char *_First2) + { // compare [_First1, _Last1) to [First2, ...), for signed chars + return (::memcmp(_First1, _First2, _Last1 - _First1) == 0); + } + +inline bool equal(const unsigned char *_First1, + const unsigned char *_Last1, const unsigned char *_First2) + { // compare [_First1, _Last1) to [First2, ...), for unsigned chars + return (::memcmp(_First1, _First2, _Last1 - _First1) == 0); + } + + // TEMPLATE FUNCTION equal WITH PRED +template inline + bool equal(_InIt1 _First1, _InIt1 _Last1, _InIt2 _First2, _Pr _Pred) + { // compare [_First1, _Last1) to [First2, ...) using _Pred + return (mismatch(_First1, _Last1, _First2, _Pred).first == _Last1); + } + + // TEMPLATE FUNCTION fill +template inline + void fill(_FwdIt _First, _FwdIt _Last, const _Ty& _Val) + { // copy _Val through [_First, _Last) + for (; _First != _Last; ++_First) + *_First = _Val; + } + +inline void fill(char *_First, char *_Last, int _Val) + { // copy char _Val through [_First, _Last) + ::memset(_First, _Val, _Last - _First); + } + +inline void fill(signed char *_First, signed char *_Last, int _Val) + { // copy signed char _Val through [_First, _Last) + ::memset(_First, _Val, _Last - _First); + } + +inline void fill(unsigned char *_First, unsigned char *_Last, int _Val) + { // copy unsigned char _Val through [_First, _Last) + ::memset(_First, _Val, _Last - _First); + } + + // TEMPLATE FUNCTION fill_n +template inline + void fill_n(_OutIt _First, _Diff _Count, const _Ty& _Val) + { // copy _Val _Count times through [_First, ...) + for (; 0 < _Count; --_Count, ++_First) + *_First = _Val; + } + +inline void fill_n(char *_First, size_t _Count, int _Val) + { // copy char _Val _Count times through [_First, ...) + ::memset(_First, _Val, _Count); + } + +inline void fill_n(signed char *_First, size_t _Count, int _Val) + { // copy signed char _Val _Count times through [_First, ...) + ::memset(_First, _Val, _Count); + } + +inline void fill_n(unsigned char *_First, size_t _Count, int _Val) + { // copy unsigned char _Val _Count times through [_First, ...) + ::memset(_First, _Val, _Count); + } + + // TEMPLATE FUNCTION lexicographical_compare +template inline + bool lexicographical_compare(_InIt1 _First1, _InIt1 _Last1, + _InIt2 _First2, _InIt2 _Last2) + { // order [_First1, _Last1) vs. [First2, Last2) + for (; _First1 != _Last1 && _First2 != _Last2; ++_First1, ++_First2) + if (*_First1 < *_First2) + return (true); + else if (*_First2 < *_First1) + return (false); + return (_First1 == _Last1 && _First2 != _Last2); + } + +inline bool lexicographical_compare( + const unsigned char *_First1, const unsigned char *_Last1, + const unsigned char *_First2, const unsigned char *_Last2) + { // order [_First1, _Last1) vs. [First2, Last2), for unsigned char + ptrdiff_t _Num1 = _Last1 - _First1; + ptrdiff_t _Num2 = _Last2 - _First2; + int _Ans = ::memcmp(_First1, _First2, _Num1 < _Num2 ? _Num1 : _Num2); + return (_Ans < 0 || _Ans == 0 && _Num1 < _Num2); + } + + #if CHAR_MAX == UCHAR_MAX +inline bool lexicographical_compare( + const char *_First1, const char *_Last1, + const char *_First2, const char *_Last2) + { // order [_First1, _Last1) vs. [First2, Last2), for nonnegative char + ptrdiff_t _Num1 = _Last1 - _First1; + ptrdiff_t _Num2 = _Last2 - _First2; + int _Ans = ::memcmp(_First1, _First2, _Num1 < _Num2 ? _Num1 : _Num2); + return (_Ans < 0 || _Ans == 0 && _Num1 < _Num2); + } + #endif /* CHAR_MAX == UCHAR_MAX */ + + // TEMPLATE FUNCTION lexicographical_compare WITH PRED +template inline + bool lexicographical_compare(_InIt1 _First1, _InIt1 _Last1, + _InIt2 _First2, _InIt2 _Last2, _Pr _Pred) + { // order [_First1, _Last1) vs. [First2, Last2) using _Pred + for (; _First1 != _Last1 && _First2 != _Last2; ++_First1, ++_First2) + if (_Pred(*_First1, *_First2)) + return (true); + else if (_Pred(*_First2, *_First1)) + return (false); + return (_First1 == _Last1 && _First2 != _Last2); + } + + #ifndef _cpp_max + #define _cpp_max max /* retained */ + #define _cpp_min min /* retained */ + #endif + + #ifndef _MAX /* avoid collision with common (nonconforming) macros */ + #define _MAX (max) + #define _MIN (min) + #endif + + // TEMPLATE FUNCTION max +template inline + const _Ty& _MAX(const _Ty& _Left, const _Ty& _Right) + { // return larger of _Left and _Right + return (_Left < _Right ? _Right : _Left); + } + + // TEMPLATE FUNCTION max WITH PRED +template inline + const _Ty& _MAX(const _Ty& _Left, const _Ty& _Right, _Pr _Pred) + { // return larger of _Left and _Right using _Pred + return (_Pred(_Left, _Right) ? _Right : _Left); + } + + // TEMPLATE FUNCTION min +template inline + const _Ty& _MIN(const _Ty& _Left, const _Ty& _Right) + { // return smaller of _Left and _Right + return (_Right < _Left ? _Right : _Left); + } + + // TEMPLATE FUNCTION min WITH PRED +template inline + const _Ty& _MIN(const _Ty& _Left, const _Ty& _Right, _Pr _Pred) + { // return smaller of _Left and _Right using _Pred + return (_Pred(_Right, _Left) ? _Right : _Left); + } + + + #pragma warning(default:4284 4786) + +_STD_END +#pragma warning(pop) +#pragma pack(pop) + +#endif /* _XUTILITY_ */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + */ + +/* + * This file is derived from software bearing the following + * restrictions: + * + * Copyright (c) 1994 + * Hewlett-Packard Company + * + * Permission to use, copy, modify, distribute and sell this + * software and its documentation for any purpose is hereby + * granted without fee, provided that the above copyright notice + * appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation. + * Hewlett-Packard Company makes no representations about the + * suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ymath.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ymath.h new file mode 100644 index 00000000..ad96757b --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/ymath.h @@ -0,0 +1,68 @@ +/* ymath.h internal header */ +#pragma once +#ifndef _YMATH +#define _YMATH +#include +_C_STD_BEGIN +_C_LIB_DECL + + /* MACROS FOR _Dtest RETURN (0 => ZERO) */ +#define _DENORM (-2) /* C9X only */ +#define _FINITE (-1) +#define _INFCODE 1 +#define _NANCODE 2 + + /* MACROS FOR _Feraise ARGUMENT */ +#define _FE_DIVBYZERO 0x04 +#define _FE_INEXACT 0x20 +#define _FE_INVALID 0x01 +#define _FE_OVERFLOW 0x08 +#define _FE_UNDERFLOW 0x10 + + /* TYPE DEFINITIONS */ +typedef union + { /* pun float types as integer array */ + unsigned short _Word[8]; + float _Float; + double _Double; + long double _Long_double; + } _Dconst; + + /* ERROR REPORTING */ +void __cdecl _Feraise(int); + + /* double DECLARATIONS */ +_CRTIMP2 double __cdecl _Cosh(double, double); +_CRTIMP2 short __cdecl _Dtest(double *); +_CRTIMP2 short __cdecl _Exp(double *, double, short); +_CRTIMP2 double __cdecl _Log(double, int); +_CRTIMP2 double __cdecl _Sin(double, unsigned int); +_CRTIMP2 double __cdecl _Sinh(double, double); +extern _CRTIMP2 const _Dconst _Denorm, _Hugeval, _Inf, + _Nan, _Snan; + + /* float DECLARATIONS */ +_CRTIMP2 float __cdecl _FCosh(float, float); +_CRTIMP2 short __cdecl _FDtest(float *); +_CRTIMP2 short __cdecl _FExp(float *, float, short); +_CRTIMP2 float __cdecl _FLog(float, int); +_CRTIMP2 float __cdecl _FSin(float, unsigned int); +_CRTIMP2 float __cdecl _FSinh(float, float); +extern _CRTIMP2 const _Dconst _FDenorm, _FInf, _FNan, _FSnan; + + /* long double DECLARATIONS */ +_CRTIMP2 long double __cdecl _LCosh(long double, long double); +_CRTIMP2 short __cdecl _LDtest(long double *); +_CRTIMP2 short __cdecl _LExp(long double *, long double, short); +_CRTIMP2 long double __cdecl _LLog(long double, int); +_CRTIMP2 long double __cdecl _LSin(long double, unsigned int); +_CRTIMP2 long double __cdecl _LSinh(long double, long double); +_CRTIMP2 extern const _Dconst _LDenorm, _LInf, _LNan, _LSnan; +_END_C_LIB_DECL +_C_STD_END +#endif /* _YMATH */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/include/yvals.h b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/yvals.h new file mode 100644 index 00000000..5903a1a0 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/include/yvals.h @@ -0,0 +1,258 @@ +/* yvals.h values header for Microsoft C/C++ */ +#pragma once +#ifndef _YVALS +#define _YVALS + +#define _CPPLIB_VER 313 + + + /* NAMING PROPERTIES */ +#define _WIN32_C_LIB 1 + + /* THREAD AND LOCALE CONTROL */ +#define _MULTI_THREAD _MT /* nontrivial locks if multithreaded */ +#define _GLOBAL_LOCALE 0 /* 0 for per-thread locales, 1 for shared */ + + /* THREAD-LOCAL STORAGE */ +#define _COMPILER_TLS 1 /* 1 if compiler supports TLS directly */ + #if _MULTI_THREAD + #define _TLS_QUAL __declspec(thread) /* TLS qualifier, if any */ + + #else /* _MULTI_THREAD */ + #define _TLS_QUAL + #endif /* _MULTI_THREAD */ + + #ifndef _HAS_EXCEPTIONS + #define _HAS_EXCEPTIONS 1 /* predefine as 0 to disable exceptions */ + #endif /* _HAS_EXCEPTIONS */ + + #define _GLOBAL_USING 1 + +/* +Predefine this to be 0 to suppress us putting deprecated versions of the hash_xxx +family of classes into _STD +*/ +#ifndef _DEFINE_DEPRECATED_HASH_CLASSES +#define _DEFINE_DEPRECATED_HASH_CLASSES 1 +#endif + +#include + +#ifndef _VC6SP2 + #define _VC6SP2 0 /* define as 1 to fix linker errors with V6.0 SP2 */ +#endif /* _VC6SP2 */ + +/* Define _CRTIMP2 */ + #ifndef _CRTIMP2 + + #if defined(_DLL) && !defined(_STATIC_CPPLIB) + #define _CRTIMP2 __declspec(dllimport) + + #else /* ndef _DLL && !STATIC_CPPLIB */ + #define _CRTIMP2 + #endif /* _DLL && !STATIC_CPPLIB */ + + #endif /* _CRTIMP2 */ + + #if defined(_DLL) && !defined(_STATIC_CPPLIB) + #define _DLL_CPPLIB + #endif + + + #define _DEPRECATED __declspec(deprecated) + + + + /* NAMESPACE */ + + #if defined(__cplusplus) + #define _STD_BEGIN namespace std { + #define _STD_END } + #define _STD ::std:: + +/* +We use the stdext (standard extension) namespace to contain extensions that are not part of the current standard +*/ + #define _STDEXT_BEGIN namespace stdext { + #define _STDEXT_END } + #define _STDEXT ::stdext:: + + #ifdef _STD_USING + #define _C_STD_BEGIN namespace std { /* only if *.c compiled as C++ */ + #define _C_STD_END } + #define _CSTD ::std:: + + #else /* _STD_USING */ +/* #define _GLOBAL_USING *.h in global namespace, c* imports to std */ + + #define _C_STD_BEGIN + #define _C_STD_END + #define _CSTD :: + #endif /* _STD_USING */ + + #define _C_LIB_DECL extern "C" { /* C has extern "C" linkage */ + #define _END_C_LIB_DECL } + #define _EXTERN_C extern "C" { + #define _END_EXTERN_C } + + #else /* __cplusplus */ + #define _STD_BEGIN + #define _STD_END + #define _STD + + #define _C_STD_BEGIN + #define _C_STD_END + #define _CSTD + + #define _C_LIB_DECL + #define _END_C_LIB_DECL + #define _EXTERN_C + #define _END_EXTERN_C + #endif /* __cplusplus */ + + #define _Restrict restrict + + #ifdef __cplusplus +_STD_BEGIN +typedef bool _Bool; +_STD_END + #endif /* __cplusplus */ + + /* VC++ COMPILER PARAMETERS */ +#define _LONGLONG __int64 +#define _ULONGLONG unsigned __int64 +#define _LLONG_MAX 0x7fffffffffffffff +#define _ULLONG_MAX 0xffffffffffffffff + + /* INTEGER PROPERTIES */ +#define _C2 1 /* 0 if not 2's complement */ + +#define _MAX_EXP_DIG 8 /* for parsing numerics */ +#define _MAX_INT_DIG 32 +#define _MAX_SIG_DIG 36 + +typedef _LONGLONG _Longlong; +typedef _ULONGLONG _ULonglong; + + /* STDIO PROPERTIES */ +#define _Filet _iobuf + + #ifndef _FPOS_T_DEFINED + #define _FPOSOFF(fp) ((long)(fp)) + #endif /* _FPOS_T_DEFINED */ + +#define _IOBASE _base +#define _IOPTR _ptr +#define _IOCNT _cnt + + /* MULTITHREAD PROPERTIES */ + /* LOCK MACROS */ +#define _LOCK_LOCALE 0 +#define _LOCK_MALLOC 1 +#define _LOCK_STREAM 2 +#define _MAX_LOCK 3 /* one more than highest lock number */ + + #ifdef __cplusplus +_STD_BEGIN + // CLASS _Lockit +class _CRTIMP2 _Lockit + { // lock while object in existence -- MUST NEST +public: + #if _MULTI_THREAD + + explicit _Lockit(); // set default lock + explicit _Lockit(int); // set the lock + ~_Lockit(); // clear the lock + +private: + _Lockit(const _Lockit&); // not defined + _Lockit& operator=(const _Lockit&); // not defined + + int _Locktype; + + #else /* _MULTI_THREAD */ + + explicit _Lockit() + { // do nothing + } + + explicit _Lockit(int) + { // do nothing + } + + ~_Lockit() + { // do nothing + } + #endif /* _MULTI_THREAD */ + + }; + +class _CRTIMP2 _Mutex + { // lock under program control +public: + + #if _MULTI_THREAD + _Mutex(); + ~_Mutex(); + void _Lock(); + void _Unlock(); + +private: + _Mutex(const _Mutex&); // not defined + _Mutex& operator=(const _Mutex&); // not defined + void *_Mtx; + + #else /* _MULTI_THREAD */ + void _Lock() + { // do nothing + } + + void _Unlock() + { // do nothing + } + #endif /* _MULTI_THREAD */ + + }; + +class _Init_locks + { // initialize mutexes +public: + + #if _MULTI_THREAD + _Init_locks(); + ~_Init_locks(); + + #else /* _MULTI_THREAD */ + _Init_locks() + { // do nothing + } + + ~_Init_locks() + { // do nothing + } + #endif /* _MULTI_THREAD */ + + }; +_STD_END + #endif /* __cplusplus */ + + + + /* MISCELLANEOUS MACROS AND TYPES */ +_C_STD_BEGIN +_EXTERN_C +_CRTIMP2 void __cdecl _Atexit(void (__cdecl *)(void)); +_END_EXTERN_C + +typedef int _Mbstatet; + +#define _ATEXIT_T void +#define _Mbstinit(x) mbstate_t x = {0} +_C_STD_END + +#endif /* _YVALS */ + +/* + * Copyright (c) 1992-2002 by P.J. Plauger. ALL RIGHTS RESERVED. + * Consult your license regarding permissions and restrictions. + V3.13:0009 */ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/kernel32.lib b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/kernel32.lib new file mode 100644 index 00000000..235b727f Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/kernel32.lib differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libc.lib b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libc.lib new file mode 100644 index 00000000..d424d6f9 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libc.lib differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcd.lib b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcd.lib new file mode 100644 index 00000000..721a276e Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcd.lib differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcd.pdb b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcd.pdb new file mode 100644 index 00000000..e950b864 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcd.pdb differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcmt.lib b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcmt.lib new file mode 100644 index 00000000..c1a38663 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcmt.lib differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcp.lib b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcp.lib new file mode 100644 index 00000000..b6305fac Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcp.lib differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcpd.lib b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcpd.lib new file mode 100644 index 00000000..61734911 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcpd.lib differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcpd.pdb b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcpd.pdb new file mode 100644 index 00000000..86bc4ed1 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcpd.pdb differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcpmt.lib b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcpmt.lib new file mode 100644 index 00000000..6a56298a Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/libcpmt.lib differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/mscoree.lib b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/mscoree.lib new file mode 100644 index 00000000..def178f2 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/mscoree.lib differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/oldnames.lib b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/oldnames.lib new file mode 100644 index 00000000..b3fb4a25 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/lib/oldnames.lib differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/redist.txt b/windows_libs/Microsoft Visual C++ Toolkit 2003/redist.txt new file mode 100644 index 00000000..a1c4b617 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/redist.txt @@ -0,0 +1 @@ +There are no redistributable files (i.e., dll's/cab's, etc.) included with the Visual C++ Toolkit 2003. Object library files included with the Visual C++ Toolkit 2003 (e.g. the C Runtime Library static libraries designated with the suffix ".lib") will be automatically linked to your program when they are compiled by the Visual C++ compiler and linker. Inclusion of these static libraries as compiled into your program is acceptable; you may not, however, redistribute the static libraries standalone - on their own. \ No newline at end of file diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Conformance/Conformance.cpp b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Conformance/Conformance.cpp new file mode 100644 index 00000000..791b84e7 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Conformance/Conformance.cpp @@ -0,0 +1,62 @@ + +#include +using namespace std; + + +template +class Pair +{ +private: + A index; + B value; +public: + Pair(A aa, B bb):index(aa),value(bb) {} + void display() + { + cout << index << ' ' << value << endl; + } + bool operator>(const Pair& p) + { return index>p.index;} +}; + +template +class Pair +{ +private: + char* index; + B value; +public: + Pair(char* aa, B bb):value(bb) + {index = new char[strlen(aa)]; strcpy(index,aa);} + void display() + { + cout << index << ' ' << value << endl; + } + bool operator>(const Pair& p) + { return ( strcmp(index,p.index) > 0);} +}; + + + +int main(int argc, char* argv[]) +{ + Pair first(2.2,3); + first.display(); + Pair second(2.1,4); + second.display(); + if (first > second) + cout << "first is greater" << endl; + else + cout << "first is not greater" << endl; + Pair third("Hello",4); + third.display(); + Pair fourth("World",5); + fourth.display(); + if (third > fourth) + cout << "third is greater" << endl; + else + cout << "third is not greater" << endl; + + return 0; +} + diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Conformance/Conformance.doc b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Conformance/Conformance.doc new file mode 100644 index 00000000..52520505 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Conformance/Conformance.doc differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Conformance/go.bat b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Conformance/go.bat new file mode 100644 index 00000000..9856f502 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Conformance/go.bat @@ -0,0 +1,2 @@ +cl /EHsc conformance.cpp +conformance diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Framework/Framework.cpp b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Framework/Framework.cpp new file mode 100644 index 00000000..cc67e83d --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Framework/Framework.cpp @@ -0,0 +1,69 @@ + +#using +#using + +using namespace System; + +#using +using namespace System::Xml; + +#using +using namespace System::Drawing; + +using namespace System::Diagnostics; + + +int main() +{ + XmlDocument* xmlDoc = new XmlDocument(); + + try + { + xmlDoc->Load(S"sample.xml"); + Console::WriteLine(S"Document loaded ok." ); + XmlNodeList* items = xmlDoc->GetElementsByTagName(S"Item"); + double total = 0; + long numitems = items->Count; + for (int i=0;iItem(i); + double price = Double::Parse(item->Attributes->GetNamedItem(S"Price")->get_Value()); + double qty = Double::Parse(item->Attributes->GetNamedItem(S"Quantity")->get_Value()); + total += price * qty; + } + Console::WriteLine(S"Purchase Order total is ${0}", __box(total)); + } + catch (Exception *e) + { + Console::WriteLine(S"problem loading XML"); + Console::WriteLine(e->Message); + } + try + { + Image* image = Image::FromFile(S"largepicture.jpg"); + Image* thumbnail = image->GetThumbnailImage(100,100,0,0); + thumbnail->Save(S"thumbnail.jpg",Imaging::ImageFormat::Jpeg); + Console::WriteLine(S"Thumbnail created"); + } + catch (Exception* e) + { + // out of memory exception thrown for bad format + Console::WriteLine(S"Image file not found or invalid format"); + Console::WriteLine(e->Message); + } + + try + { + if (! EventLog::SourceExists(S"SDKSample") ) + EventLog::CreateEventSource(S"SDKSample",S"SDKSampleLog"); + EventLog::WriteEntry(S"SDKSample",S"The sample has been run.", EventLogEntryType::Information); + Console::WriteLine(S"Event logged"); + } + catch (Exception* e) + { + Console::WriteLine(S"problem creating or writing to event log"); + Console::WriteLine(e->Message); + } + + return 0; +} \ No newline at end of file diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Framework/Framework.doc b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Framework/Framework.doc new file mode 100644 index 00000000..229718e1 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Framework/Framework.doc differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Framework/go.bat b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Framework/go.bat new file mode 100644 index 00000000..9e120bfb --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Framework/go.bat @@ -0,0 +1,2 @@ +cl /clr framework.cpp +framework diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Framework/largepicture.jpg b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Framework/largepicture.jpg new file mode 100644 index 00000000..83f67d95 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Framework/largepicture.jpg differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Framework/sample.xml b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Framework/sample.xml new file mode 100644 index 00000000..782d3437 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Framework/sample.xml @@ -0,0 +1,6 @@ + + + + + + diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/G7Compile.bat b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/G7Compile.bat new file mode 100644 index 00000000..772c992d --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/G7Compile.bat @@ -0,0 +1 @@ +cl /O2 /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /MLd /W4 /Wp64 /TP /EHsc /Zi /G7 GL-G7.cpp module.cpp diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/G7SSE2Compile.bat b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/G7SSE2Compile.bat new file mode 100644 index 00000000..dd9cef14 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/G7SSE2Compile.bat @@ -0,0 +1 @@ +cl /O2 /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /MLd /W4 /Wp64 /TP /EHsc /Zi /G7 /arch:SSE2 GL-G7.cpp module.cpp diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/GL-G7.cpp b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/GL-G7.cpp new file mode 100644 index 00000000..1d18e97e --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/GL-G7.cpp @@ -0,0 +1,192 @@ +// GL-G7.cpp : Defines the entry point for the console application. +// + +#include +using namespace std; + +// _ReturnAddress should be prototyped before use +#ifdef __cplusplus +extern "C" +#endif +void * _ReturnAddress(void); + +#pragma intrinsic(_ReturnAddress) + +//prototyping here to save #include of windows.h -- functions are in kernel32 + +typedef unsigned long DWORD; +typedef void *HANDLE; +typedef long LONG; +typedef int BOOL; +typedef __int64 LONGLONG; +typedef union _LARGE_INTEGER { + struct { + DWORD LowPart; + LONG HighPart; + }; + struct { + DWORD LowPart; + LONG HighPart; + } u; + LONGLONG QuadPart; +} LARGE_INTEGER; + +#define WINBASEAPI +#define WINAPI __stdcall +#define IN +#define OUT +#define VOID void + +#ifdef __cplusplus +extern "C" { +#endif +WINBASEAPI BOOL WINAPI QueryPerformanceCounter(OUT LARGE_INTEGER *lpPerformanceCount); +WINBASEAPI BOOL WINAPI QueryPerformanceFrequency(OUT LARGE_INTEGER *lpFrequency); +WINBASEAPI DWORD WINAPI SetThreadAffinityMask(IN HANDLE hThread,IN DWORD dwThreadAffinityMask); +WINBASEAPI HANDLE WINAPI GetCurrentThread(VOID); +#ifdef __cplusplus +} +#endif + +//end of replacement for windows.h + + +void* inlineReturnAddress; // set in Add() +int Add(int a, int b); // implementation in module.cpp + +void DisplayAdd(int a, int b) +{ + cout << a << " + " << b << " = " << a + b << endl; + cout << "Return address from " << __FUNCTION__ << " " << _ReturnAddress() << endl; +} + +void Test1() +{ + DisplayAdd(1,2); + cout << "1 + 2 = " << Add(1,2) << endl; + + cout << "Return address from Add " << inlineReturnAddress << endl; + + cout << "Return address from " << __FUNCTION__ << " " << _ReturnAddress() << endl; +} + + +#define INT_ARRAY_LEN 100000 +int intarray[INT_ARRAY_LEN]; +int intCalculate() +{ + int total = 0; + + for (int i = 1; i < INT_ARRAY_LEN; i++) + { + total += intarray[i-1]*7; + } + + return total; +} +void Test2() +{ + int var1 = 2; + int i; + + for (i = 0; i < INT_ARRAY_LEN; i++) + { + intarray[i] = i*5; + var1 += 2; + } + + LARGE_INTEGER start, end; + LARGE_INTEGER freq; + + SetThreadAffinityMask(GetCurrentThread(), 1); + QueryPerformanceFrequency(&freq); + QueryPerformanceCounter(&start); + double total = 0; + + for (i = 0; i < 100000; i++) + { + total += intCalculate(); + } + + QueryPerformanceCounter(&end); + + cout << "Total = " << total << endl; + + cout << (end.QuadPart - start.QuadPart)/(double)freq.QuadPart << " seconds" << endl; +} + +#define ARRAY_LEN 10000 +double array[ARRAY_LEN]; + +double Calculate() +{ + double total = 0; + + for (int i = 1; i < ARRAY_LEN; i++) + { + total += array[i-1]*array[i]; + } + + return total; +} + +void Test3() +{ + double var1 = 2; + int i; + + for (i = 0; i < ARRAY_LEN; i++) + { + array[i] = var1; + var1 += .012; + } + + LARGE_INTEGER start, end; + LARGE_INTEGER freq; + + SetThreadAffinityMask(GetCurrentThread(), 1); + QueryPerformanceFrequency(&freq); + QueryPerformanceCounter(&start); + double total = 0; + + for (i = 0; i < 100000; i++) + { + total += Calculate(); + } + + QueryPerformanceCounter(&end); + + cout << "Total = " << total << endl; + + cout << (end.QuadPart - start.QuadPart)/(double)freq.QuadPart << " seconds" << endl; +} + +int main(int argc, char* argv[]) +{ + if (argc > 1) + { + int test = atoi(argv[1]); + switch (test) + { + case 1: + Test1(); + break; + case 2: + Test2(); + break; + case 3: + Test3(); + break; + default: + break; + } + } + else + { + cout << "usage: gl-g7 num1 num2" << endl; + cout << "num1 is 1 through 3." << endl; + } + + + return 0; +} diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/GLCompile.bat b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/GLCompile.bat new file mode 100644 index 00000000..ca2507c6 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/GLCompile.bat @@ -0,0 +1 @@ +cl /O2 /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /MLd /W4 /Wp64 /TP /EHsc /Zi /GL GL-G7.cpp module.cpp diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/Optimization.doc b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/Optimization.doc new file mode 100644 index 00000000..e7e12659 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/Optimization.doc differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/PlainCompile.bat b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/PlainCompile.bat new file mode 100644 index 00000000..9f9ebc6a --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/PlainCompile.bat @@ -0,0 +1 @@ +cl /O2 /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /MLd /W4 /Wp64 /TP /EHsc /Zi GL-G7.cpp module.cpp diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/module.cpp b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/module.cpp new file mode 100644 index 00000000..8cde3e0a --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/Optimization/module.cpp @@ -0,0 +1,16 @@ +extern void *inlineReturnAddress; + +// _ReturnAddress should be prototyped before use +#ifdef __cplusplus +extern "C" +#endif +void * _ReturnAddress(void); + +#pragma intrinsic(_ReturnAddress) + +int Add(int a, int b) +{ + inlineReturnAddress = _ReturnAddress(); + return a+b; +} + diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/GS-RTC.cpp b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/GS-RTC.cpp new file mode 100644 index 00000000..3969ff91 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/GS-RTC.cpp @@ -0,0 +1,135 @@ +// GS-RTC.cpp : Defines the entry point for the console application. +// +#include +#include + +using namespace std; + +// will get a runtime error with /RTCs and with /GS because return address is compromised as well as +// other stack variables +void Test1() +{ + char buffer1[100]; + + for (int i=0 ; i < 200; i++) + { + buffer1[i] = 'a'; + } + + buffer1[sizeof(buffer1)-1] = 0; + + cout << buffer1 << endl; +} + +// will get a runtime error with /RTCs, but not /GS because return address not compromised, only other +// stack variables +void Test2() +{ + char buffer1[100]; + char buffer2[100]; + + buffer1[0] = 0; + + for (int i=0 ; i <= sizeof(buffer2); i++) + { + buffer2[i] = 'a'; + } + + buffer2[sizeof(buffer2)-1] = 0; + + cout << buffer2 << '-' << buffer1 << endl; +} + +// underrun buffer 3 - caught by RTCs +void Test3() +{ + char buffer1[100]; + char buffer2[100]; + + memset(buffer1,'a',sizeof(buffer1)-1); + buffer1[sizeof(buffer1)-1]=0; + memset(buffer2,'b',sizeof(buffer2)-1); + buffer2[sizeof(buffer2)-1]=0; + + *(buffer1-1) = 'c'; + cout << buffer1 << endl; + cout << buffer2 << endl; +} + +// show starting values with /RTCs +void Test4() +{ + unsigned int var; + + cout << hex << var; +} + +// truncate an integer into a char (/RTCc) +void Test5(int value) +{ + unsigned char ch; + ch = (unsigned char)value; +} + +// Use uninitialized variables (/RTCu) +void Test6(int value) +{ + int uninitialized; + int var; + + switch (value) + { + case 3: + uninitialized = 4; + case 2: + var = 5 * uninitialized; + break; + case 1: + int* var2 = &uninitialized; + var = 5 * uninitialized; + break; + } +} + +int main(int argc, char* argv[]) +{ + if (argc > 1) { + int test = atoi(argv[1]); + int value = 0; + if (argc > 2) + { + value = atoi(argv[2]); + } + switch (test) + { + case 1: + Test1(); + break; + case 2: + Test2(); + break; + case 3: + Test3(); + break; + case 4: + Test4(); + break; + case 5: + Test5(value); + break; + case 6: + Test6(value); + break; + default: + break; + } + } + else + { + cout << "usage: gs-rtc num1 num2" << endl; + cout << "num1 is 1 through 6. Tests 5 and 6 require an integer parameter, default 0" << endl; + } + + return 0; +} + diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/GSCompile.bat b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/GSCompile.bat new file mode 100644 index 00000000..7fabc383 --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/GSCompile.bat @@ -0,0 +1 @@ +cl /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /ML /GS /W4 /Wp64 /TP /EHsc GS-RTC.cpp diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/PlainCompile.bat b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/PlainCompile.bat new file mode 100644 index 00000000..68c37e1a --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/PlainCompile.bat @@ -0,0 +1 @@ +cl /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /MLd /W3 /Wp64 /TP /EHsc /ZI GS-RTC.cpp diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/RTCcCompile.bat b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/RTCcCompile.bat new file mode 100644 index 00000000..7c013cdf --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/RTCcCompile.bat @@ -0,0 +1 @@ +cl /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /MLd /W3 /Wp64 /TP /ZI /EHsc /RTCc GS-RTC.cpp diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/RTCsCompile.bat b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/RTCsCompile.bat new file mode 100644 index 00000000..7e55120e --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/RTCsCompile.bat @@ -0,0 +1 @@ +cl /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /MLd /W3 /Wp64 /TP /ZI /EHsc /RTCs GS-RTC.cpp diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/RTCuCompile.bat b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/RTCuCompile.bat new file mode 100644 index 00000000..27a27fac --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/RTCuCompile.bat @@ -0,0 +1 @@ +cl /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /MLd /W4 /Wp64 /TP /ZI /EHsc /RTCu GS-RTC.cpp diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/SecurityChecks.doc b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/SecurityChecks.doc new file mode 100644 index 00000000..99562277 Binary files /dev/null and b/windows_libs/Microsoft Visual C++ Toolkit 2003/samples/SecurityChecks/SecurityChecks.doc differ diff --git a/windows_libs/Microsoft Visual C++ Toolkit 2003/vcvars32.bat b/windows_libs/Microsoft Visual C++ Toolkit 2003/vcvars32.bat new file mode 100644 index 00000000..5c5d4ddd --- /dev/null +++ b/windows_libs/Microsoft Visual C++ Toolkit 2003/vcvars32.bat @@ -0,0 +1,19 @@ +@echo off + +Set PATH=C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin;%PATH% +Set INCLUDE=C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;%INCLUDE% +Set LIB=C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;%LIB% + +echo Setting environment for using Microsoft Visual C++ 2003 Toolkit. +echo (If you have another version of Visual Studio or Visual C++ installed and wish +echo to use its tools from the command line, run vcvars32.bat for that version.) +echo. +echo Thank you for choosing the Visual C++ Toolkit 2003! Get started quickly by +echo building the code samples included in the "Samples" directory. Each sample +echo includes a short whitepaper discussing the Visual C++ features, and a batch +echo file for building the code. +echo. +echo Type "cl /?" for brief documentaion on compiler options. +echo. +echo Visit http://msdn.microsoft.com/visualc/using/documentation/default.aspx for +echo complete compiler documentation. diff --git a/windows_libs/jpeg-6a/README b/windows_libs/jpeg-6a/README new file mode 100644 index 00000000..fa69a18c --- /dev/null +++ b/windows_libs/jpeg-6a/README @@ -0,0 +1,383 @@ +The Independent JPEG Group's JPEG software +========================================== + +README for release 6a of 7-Feb-96 +================================= + +This distribution contains the sixth public release of the Independent JPEG +Group's free JPEG software. You are welcome to redistribute this software and +to use it for any purpose, subject to the conditions under LEGAL ISSUES, below. + +Serious users of this software (particularly those incorporating it into +larger programs) should contact IJG at jpeg-info@uunet.uu.net to be added to +our electronic mailing list. Mailing list members are notified of updates +and have a chance to participate in technical discussions, etc. + +This software is the work of Tom Lane, Philip Gladstone, Luis Ortiz, Jim +Boucher, Lee Crocker, Julian Minguillon, George Phillips, Davide Rossi, +Ge' Weijers, and other members of the Independent JPEG Group. + +IJG is not affiliated with the official ISO JPEG standards committee. + + +DOCUMENTATION ROADMAP +===================== + +This file contains the following sections: + +OVERVIEW General description of JPEG and the IJG software. +LEGAL ISSUES Copyright, lack of warranty, terms of distribution. +REFERENCES Where to learn more about JPEG. +ARCHIVE LOCATIONS Where to find newer versions of this software. +RELATED SOFTWARE Other stuff you should get. +FILE FORMAT WARS Software *not* to get. +TO DO Plans for future IJG releases. + +Other documentation files in the distribution are: + +User documentation: + install.doc How to configure and install the IJG software. + usage.doc Usage instructions for cjpeg, djpeg, jpegtran, + rdjpgcom, and wrjpgcom. + *.1 Unix-style man pages for programs (same info as usage.doc). + wizard.doc Advanced usage instructions for JPEG wizards only. + change.log Version-to-version change highlights. +Programmer and internal documentation: + libjpeg.doc How to use the JPEG library in your own programs. + example.c Sample code for calling the JPEG library. + structure.doc Overview of the JPEG library's internal structure. + filelist.doc Road map of IJG files. + coderules.doc Coding style rules --- please read if you contribute code. + +Please read at least the files install.doc and usage.doc. Useful information +can also be found in the JPEG FAQ (Frequently Asked Questions) article. See +ARCHIVE LOCATIONS below to find out where to obtain the FAQ article. + +If you want to understand how the JPEG code works, we suggest reading one or +more of the REFERENCES, then looking at the documentation files (in roughly +the order listed) before diving into the code. + + +OVERVIEW +======== + +This package contains C software to implement JPEG image compression and +decompression. JPEG (pronounced "jay-peg") is a standardized compression +method for full-color and gray-scale images. JPEG is intended for compressing +"real-world" scenes; line drawings, cartoons and other non-realistic images +are not its strong suit. JPEG is lossy, meaning that the output image is not +exactly identical to the input image. Hence you must not use JPEG if you +have to have identical output bits. However, on typical photographic images, +very good compression levels can be obtained with no visible change, and +remarkably high compression levels are possible if you can tolerate a +low-quality image. For more details, see the references, or just experiment +with various compression settings. + +This software implements JPEG baseline, extended-sequential, and progressive +compression processes. Provision is made for supporting all variants of these +processes, although some uncommon parameter settings aren't implemented yet. +For legal reasons, we are not distributing code for the arithmetic-coding +variants of JPEG; see LEGAL ISSUES. We have made no provision for supporting +the hierarchical or lossless processes defined in the standard. + +We provide a set of library routines for reading and writing JPEG image files, +plus two sample applications "cjpeg" and "djpeg", which use the library to +perform conversion between JPEG and some other popular image file formats. +The library is intended to be reused in other applications. + +In order to support file conversion and viewing software, we have included +considerable functionality beyond the bare JPEG coding/decoding capability; +for example, the color quantization modules are not strictly part of JPEG +decoding, but they are essential for output to colormapped file formats or +colormapped displays. These extra functions can be compiled out of the +library if not required for a particular application. We have also included +"jpegtran", a utility for lossless transcoding between different JPEG +processes, and "rdjpgcom" and "wrjpgcom", two simple applications for +inserting and extracting textual comments in JFIF files. + +The emphasis in designing this software has been on achieving portability and +flexibility, while also making it fast enough to be useful. In particular, +the software is not intended to be read as a tutorial on JPEG. (See the +REFERENCES section for introductory material.) Rather, it is intended to +be reliable, portable, industrial-strength code. We do not claim to have +achieved that goal in every aspect of the software, but we strive for it. + +We welcome the use of this software as a component of commercial products. +No royalty is required, but we do ask for an acknowledgement in product +documentation, as described under LEGAL ISSUES. + + +LEGAL ISSUES +============ + +In plain English: + +1. We don't promise that this software works. (But if you find any bugs, + please let us know!) +2. You can use this software for whatever you want. You don't have to pay us. +3. You may not pretend that you wrote this software. If you use it in a + program, you must acknowledge somewhere in your documentation that + you've used the IJG code. + +In legalese: + +The authors make NO WARRANTY or representation, either express or implied, +with respect to this software, its quality, accuracy, merchantability, or +fitness for a particular purpose. This software is provided "AS IS", and you, +its user, assume the entire risk as to its quality and accuracy. + +This software is copyright (C) 1991-1996, Thomas G. Lane. +All Rights Reserved except as specified below. + +Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to these +conditions: +(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice +unaltered; and any additions, deletions, or changes to the original files +must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work of +the Independent JPEG Group". +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. + +Permission is NOT granted for the use of any IJG author's name or company name +in advertising or publicity relating to this software or products derived from +it. This software may be referred to only as "the Independent JPEG Group's +software". + +We specifically permit and encourage the use of this software as the basis of +commercial products, provided that all warranty or liability claims are +assumed by the product vendor. + + +ansi2knr.c is included in this distribution by permission of L. Peter Deutsch, +sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA. +ansi2knr.c is NOT covered by the above copyright and conditions, but instead +by the usual distribution terms of the Free Software Foundation; principally, +that you must include source code if you redistribute it. (See the file +ansi2knr.c for full details.) However, since ansi2knr.c is not needed as part +of any program generated from the IJG code, this does not limit you more than +the foregoing paragraphs do. + +The configuration script "configure" was produced with GNU Autoconf. It +is copyright by the Free Software Foundation but is freely distributable. + +It appears that the arithmetic coding option of the JPEG spec is covered by +patents owned by IBM, AT&T, and Mitsubishi. Hence arithmetic coding cannot +legally be used without obtaining one or more licenses. For this reason, +support for arithmetic coding has been removed from the free JPEG software. +(Since arithmetic coding provides only a marginal gain over the unpatented +Huffman mode, it is unlikely that very many implementations will support it.) +So far as we are aware, there are no patent restrictions on the remaining +code. + +WARNING: Unisys has begun to enforce their patent on LZW compression against +GIF encoders and decoders. You will need a license from Unisys to use the +included rdgif.c or wrgif.c files in a commercial or shareware application. +At this time, Unisys is not enforcing their patent against freeware, so +distribution of this package remains legal. However, we intend to remove +GIF support from the IJG package as soon as a suitable replacement format +becomes reasonably popular. + +We are required to state that + "The Graphics Interchange Format(c) is the Copyright property of + CompuServe Incorporated. GIF(sm) is a Service Mark property of + CompuServe Incorporated." + + +REFERENCES +========== + +We highly recommend reading one or more of these references before trying to +understand the innards of the JPEG software. + +The best short technical introduction to the JPEG compression algorithm is + Wallace, Gregory K. "The JPEG Still Picture Compression Standard", + Communications of the ACM, April 1991 (vol. 34 no. 4), pp. 30-44. +(Adjacent articles in that issue discuss MPEG motion picture compression, +applications of JPEG, and related topics.) If you don't have the CACM issue +handy, a PostScript file containing a revised version of Wallace's article +is available at ftp.uu.net, graphics/jpeg/wallace.ps.gz. The file (actually +a preprint for an article that appeared in IEEE Trans. Consumer Electronics) +omits the sample images that appeared in CACM, but it includes corrections +and some added material. Note: the Wallace article is copyright ACM and +IEEE, and it may not be used for commercial purposes. + +A somewhat less technical, more leisurely introduction to JPEG can be found in +"The Data Compression Book" by Mark Nelson, published by M&T Books (Redwood +City, CA), 1991, ISBN 1-55851-216-0. This book provides good explanations and +example C code for a multitude of compression methods including JPEG. It is +an excellent source if you are comfortable reading C code but don't know much +about data compression in general. The book's JPEG sample code is far from +industrial-strength, but when you are ready to look at a full implementation, +you've got one here... + +The best full description of JPEG is the textbook "JPEG Still Image Data +Compression Standard" by William B. Pennebaker and Joan L. Mitchell, published +by Van Nostrand Reinhold, 1993, ISBN 0-442-01272-1. Price US$59.95, 638 pp. +The book includes the complete text of the ISO JPEG standards (DIS 10918-1 +and draft DIS 10918-2). This is by far the most complete exposition of JPEG +in existence, and we highly recommend it. + +The JPEG standard itself is not available electronically; you must order a +paper copy through ISO or ITU. (Unless you feel a need to own a certified +official copy, we recommend buying the Pennebaker and Mitchell book instead; +it's much cheaper and includes a great deal of useful explanatory material.) +In the USA, copies of the standard may be ordered from ANSI Sales at (212) +642-4900, or from Global Engineering Documents at (800) 854-7179. (ANSI +doesn't take credit card orders, but Global does.) It's not cheap: as of +1992, ANSI was charging $95 for Part 1 and $47 for Part 2, plus 7% +shipping/handling. The standard is divided into two parts, Part 1 being the +actual specification, while Part 2 covers compliance testing methods. Part 1 +is titled "Digital Compression and Coding of Continuous-tone Still Images, +Part 1: Requirements and guidelines" and has document numbers ISO/IEC IS +10918-1, ITU-T T.81. Part 2 is titled "Digital Compression and Coding of +Continuous-tone Still Images, Part 2: Compliance testing" and has document +numbers ISO/IEC IS 10918-2, ITU-T T.83. + +Extensions to the original JPEG standard are defined in JPEG Part 3, a new ISO +document. Part 3 is undergoing ISO balloting and is expected to be approved +by the end of 1995; it will have document numbers ISO/IEC IS 10918-3, ITU-T +T.84. IJG currently does not support any Part 3 extensions. + +The JPEG standard does not specify all details of an interchangeable file +format. For the omitted details we follow the "JFIF" conventions, revision +1.02. A copy of the JFIF spec is available from: + Literature Department + C-Cube Microsystems, Inc. + 1778 McCarthy Blvd. + Milpitas, CA 95035 + phone (408) 944-6300, fax (408) 944-6314 +A PostScript version of this document is available at ftp.uu.net, file +graphics/jpeg/jfif.ps.gz. It can also be obtained by e-mail from the C-Cube +mail server, netlib@c3.pla.ca.us. Send the message "send jfif_ps from jpeg" +to the server to obtain the JFIF document; send the message "help" if you have +trouble. + +The TIFF 6.0 file format specification can be obtained by FTP from sgi.com +(192.48.153.1), file graphics/tiff/TIFF6.ps.Z; or you can order a printed +copy from Aldus Corp. at (206) 628-6593. The JPEG incorporation scheme +found in the TIFF 6.0 spec of 3-June-92 has a number of serious problems. +IJG does not recommend use of the TIFF 6.0 design (TIFF Compression tag 6). +Instead, we recommend the JPEG design proposed by TIFF Technical Note #2 +(Compression tag 7). Copies of this Note can be obtained from sgi.com or +from ftp.uu.net:/graphics/jpeg/. It is expected that the next revision of +the TIFF spec will replace the 6.0 JPEG design with the Note's design. +Although IJG's own code does not support TIFF/JPEG, the free libtiff library +uses our library to implement TIFF/JPEG per the Note. libtiff is available +from sgi.com:/graphics/tiff/. + + +ARCHIVE LOCATIONS +================= + +The "official" archive site for this software is ftp.uu.net (Internet +address 192.48.96.9). The most recent released version can always be found +there in directory graphics/jpeg. This particular version will be archived +as graphics/jpeg/jpegsrc.v6a.tar.gz. If you are on the Internet, you +can retrieve files from ftp.uu.net by standard anonymous FTP. If you don't +have FTP access, UUNET's archives are also available via UUCP; contact +help@uunet.uu.net for information on retrieving files that way. + +Numerous Internet sites maintain copies of the UUNET files. However, only +ftp.uu.net is guaranteed to have the latest official version. + +You can also obtain this software in DOS-compatible "zip" archive format from +the SimTel archives (ftp.coast.net:/SimTel/msdos/graphics/), or on CompuServe +in the Graphics Support forum (GO CIS:GRAPHSUP), library 12 "JPEG Tools". +Again, these versions may sometimes lag behind the ftp.uu.net release. + +The JPEG FAQ (Frequently Asked Questions) article is a useful source of +general information about JPEG. It is updated constantly and therefore is +not included in this distribution. The FAQ is posted every two weeks to +Usenet newsgroups comp.graphics.misc, news.answers, and other groups. +You can always obtain the latest version from the news.answers archive at +rtfm.mit.edu. By FTP, fetch /pub/usenet/news.answers/jpeg-faq/part1 and +.../part2. If you don't have FTP, send e-mail to mail-server@rtfm.mit.edu +with body + send usenet/news.answers/jpeg-faq/part1 + send usenet/news.answers/jpeg-faq/part2 + + +RELATED SOFTWARE +================ + +Numerous viewing and image manipulation programs now support JPEG. (Quite a +few of them use this library to do so.) The JPEG FAQ described above lists +some of the more popular free and shareware viewers, and tells where to +obtain them on Internet. + +If you are on a Unix machine, we highly recommend Jef Poskanzer's free +PBMPLUS image software, which provides many useful operations on PPM-format +image files. In particular, it can convert PPM images to and from a wide +range of other formats. You can obtain this package by FTP from ftp.x.org +(contrib/pbmplus*.tar.Z) or ftp.ee.lbl.gov (pbmplus*.tar.Z). There is also +a newer update of this package called NETPBM, available from +wuarchive.wustl.edu under directory /graphics/graphics/packages/NetPBM/. +Unfortunately PBMPLUS/NETPBM is not nearly as portable as the IJG software +is; you are likely to have difficulty making it work on any non-Unix machine. + +A different free JPEG implementation, written by the PVRG group at Stanford, +is available from havefun.stanford.edu in directory pub/jpeg. This program +is designed for research and experimentation rather than production use; +it is slower, harder to use, and less portable than the IJG code, but it +is easier to read and modify. Also, the PVRG code supports lossless JPEG, +which we do not. + + +FILE FORMAT WARS +================ + +Some JPEG programs produce files that are not compatible with our library. +The root of the problem is that the ISO JPEG committee failed to specify a +concrete file format. Some vendors "filled in the blanks" on their own, +creating proprietary formats that no one else could read. (For example, none +of the early commercial JPEG implementations for the Macintosh were able to +exchange compressed files.) + +The file format we have adopted is called JFIF (see REFERENCES). This format +has been agreed to by a number of major commercial JPEG vendors, and it has +become the de facto standard. JFIF is a minimal or "low end" representation. +We recommend the use of TIFF/JPEG (TIFF revision 6.0 as modified by TIFF +Technical Note #2) for "high end" applications that need to record a lot of +additional data about an image. TIFF/JPEG is fairly new and not yet widely +supported, unfortunately. + +The upcoming JPEG Part 3 standard defines a file format called SPIFF. +SPIFF is interoperable with JFIF, in the sense that most JFIF decoders should +be able to read the most common variant of SPIFF. SPIFF has some technical +advantages over JFIF, but its major claim to fame is simply that it is an +official standard rather than an informal one. At this point it is unclear +whether SPIFF will supersede JFIF or whether JFIF will remain the de-facto +standard. IJG intends to support SPIFF once the standard is frozen, but we +have not decided whether it should become our default output format or not. +(In any case, our decoder will remain capable of reading JFIF indefinitely.) + +Various proprietary file formats incorporating JPEG compression also exist. +We have little or no sympathy for the existence of these formats. Indeed, +one of the original reasons for developing this free software was to help +force convergence on common, open format standards for JPEG files. Don't +use a proprietary file format! + + +TO DO +===== + +In future versions, we are considering supporting some of the upcoming JPEG +Part 3 extensions --- principally, variable quantization and the SPIFF file +format. + +Tuning the software for better behavior at low quality/high compression +settings is also of interest. The current method for scaling the +quantization tables is known not to be very good at low Q values. + +As always, speeding things up is high on our priority list. + +Please send bug reports, offers of help, etc. to jpeg-info@uunet.uu.net. diff --git a/windows_libs/jpeg-6a/ansi2knr.1 b/windows_libs/jpeg-6a/ansi2knr.1 new file mode 100644 index 00000000..f9ee5a63 --- /dev/null +++ b/windows_libs/jpeg-6a/ansi2knr.1 @@ -0,0 +1,36 @@ +.TH ANSI2KNR 1 "19 Jan 1996" +.SH NAME +ansi2knr \- convert ANSI C to Kernighan & Ritchie C +.SH SYNOPSIS +.I ansi2knr +[--varargs] input_file [output_file] +.SH DESCRIPTION +If no output_file is supplied, output goes to stdout. +.br +There are no error messages. +.sp +.I ansi2knr +recognizes function definitions by seeing a non-keyword identifier at the left +margin, followed by a left parenthesis, with a right parenthesis as the last +character on the line, and with a left brace as the first token on the +following line (ignoring possible intervening comments). It will recognize a +multi-line header provided that no intervening line ends with a left or right +brace or a semicolon. These algorithms ignore whitespace and comments, except +that the function name must be the first thing on the line. +.sp +The following constructs will confuse it: +.br + - Any other construct that starts at the left margin and follows the +above syntax (such as a macro or function call). +.br + - Some macros that tinker with the syntax of the function header. +.sp +The --varargs switch is obsolete, and is recognized only for +backwards compatibility. The present version of +.I ansi2knr +will always attempt to convert a ... argument to va_alist and va_dcl. +.SH AUTHOR +L. Peter Deutsch wrote the original ansi2knr and +continues to maintain the current version; most of the code in the current +version is his work. ansi2knr also includes contributions by Francois +Pinard and Jim Avera . diff --git a/windows_libs/jpeg-6a/ansi2knr.c b/windows_libs/jpeg-6a/ansi2knr.c new file mode 100644 index 00000000..4e05fc2d --- /dev/null +++ b/windows_libs/jpeg-6a/ansi2knr.c @@ -0,0 +1,693 @@ +/* ansi2knr.c */ +/* Convert ANSI C function definitions to K&R ("traditional C") syntax */ + +/* +ansi2knr is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY. No author or distributor accepts responsibility to anyone for the +consequences of using it or for whether it serves any particular purpose or +works at all, unless he says so in writing. Refer to the GNU General Public +License (the "GPL") for full details. + +Everyone is granted permission to copy, modify and redistribute ansi2knr, +but only under the conditions described in the GPL. A copy of this license +is supposed to have been given to you along with ansi2knr so you can know +your rights and responsibilities. It should be in a file named COPYLEFT. +[In the IJG distribution, the GPL appears below, not in a separate file.] +Among other things, the copyright notice and this notice must be preserved +on all copies. + +We explicitly state here what we believe is already implied by the GPL: if +the ansi2knr program is distributed as a separate set of sources and a +separate executable file which are aggregated on a storage medium together +with another program, this in itself does not bring the other program under +the GPL, nor does the mere fact that such a program or the procedures for +constructing it invoke the ansi2knr executable bring any other part of the +program under the GPL. +*/ + +/* +---------- Here is the GNU GPL file COPYLEFT, referred to above ---------- +----- These terms do NOT apply to the JPEG software itself; see README ------ + + GHOSTSCRIPT GENERAL PUBLIC LICENSE + (Clarified 11 Feb 1988) + + Copyright (C) 1988 Richard M. Stallman + Everyone is permitted to copy and distribute verbatim copies of this + license, but changing it is not allowed. You can also use this wording + to make the terms for other programs. + + The license agreements of most software companies keep you at the +mercy of those companies. By contrast, our general public license is +intended to give everyone the right to share Ghostscript. To make sure +that you get the rights we want you to have, we need to make +restrictions that forbid anyone to deny you these rights or to ask you +to surrender the rights. Hence this license agreement. + + Specifically, we want to make sure that you have the right to give +away copies of Ghostscript, that you receive source code or else can get +it if you want it, that you can change Ghostscript or use pieces of it +in new free programs, and that you know you can do these things. + + To make sure that everyone has such rights, we have to forbid you to +deprive anyone else of these rights. For example, if you distribute +copies of Ghostscript, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must tell them their rights. + + Also, for our own protection, we must make certain that everyone finds +out that there is no warranty for Ghostscript. If Ghostscript is +modified by someone else and passed on, we want its recipients to know +that what they have is not what we distributed, so that any problems +introduced by others will not reflect on our reputation. + + Therefore we (Richard M. Stallman and the Free Software Foundation, +Inc.) make the following terms which say what you must do to be allowed +to distribute or change Ghostscript. + + + COPYING POLICIES + + 1. You may copy and distribute verbatim copies of Ghostscript source +code as you receive it, in any medium, provided that you conspicuously +and appropriately publish on each copy a valid copyright and license +notice "Copyright (C) 1989 Aladdin Enterprises. All rights reserved. +Distributed by Free Software Foundation, Inc." (or with whatever year is +appropriate); keep intact the notices on all files that refer to this +License Agreement and to the absence of any warranty; and give any other +recipients of the Ghostscript program a copy of this License Agreement +along with the program. You may charge a distribution fee for the +physical act of transferring a copy. + + 2. You may modify your copy or copies of Ghostscript or any portion of +it, and copy and distribute such modifications under the terms of +Paragraph 1 above, provided that you also do the following: + + a) cause the modified files to carry prominent notices stating + that you changed the files and the date of any change; and + + b) cause the whole of any work that you distribute or publish, + that in whole or in part contains or is a derivative of Ghostscript + or any part thereof, to be licensed at no charge to all third + parties on terms identical to those contained in this License + Agreement (except that you may choose to grant more extensive + warranty protection to some or all third parties, at your option). + + c) You may charge a distribution fee for the physical act of + transferring a copy, and you may at your option offer warranty + protection in exchange for a fee. + +Mere aggregation of another unrelated program with this program (or its +derivative) on a volume of a storage or distribution medium does not bring +the other program under the scope of these terms. + + 3. You may copy and distribute Ghostscript (or a portion or derivative +of it, under Paragraph 2) in object code or executable form under the +terms of Paragraphs 1 and 2 above provided that you also do one of the +following: + + a) accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of + Paragraphs 1 and 2 above; or, + + b) accompany it with a written offer, valid for at least three + years, to give any third party free (except for a nominal + shipping charge) a complete machine-readable copy of the + corresponding source code, to be distributed under the terms of + Paragraphs 1 and 2 above; or, + + c) accompany it with the information you received as to where the + corresponding source code may be obtained. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form alone.) + +For an executable file, complete source code means all the source code for +all modules it contains; but, as a special exception, it need not include +source code for modules which are standard libraries that accompany the +operating system on which the executable file runs. + + 4. You may not copy, sublicense, distribute or transfer Ghostscript +except as expressly provided under this License Agreement. Any attempt +otherwise to copy, sublicense, distribute or transfer Ghostscript is +void and your rights to use the program under this License agreement +shall be automatically terminated. However, parties who have received +computer software programs from you with this License Agreement will not +have their licenses terminated so long as such parties remain in full +compliance. + + 5. If you wish to incorporate parts of Ghostscript into other free +programs whose distribution conditions are different, write to the Free +Software Foundation at 675 Mass Ave, Cambridge, MA 02139. We have not +yet worked out a simple rule that can be stated here, but we will often +permit this. We will be guided by the two goals of preserving the free +status of all derivatives of our free software and of promoting the +sharing and reuse of software. + +Your comments and suggestions about our licensing policies and our +software are welcome! Please contact the Free Software Foundation, +Inc., 675 Mass Ave, Cambridge, MA 02139, or call (617) 876-3296. + + NO WARRANTY + + BECAUSE GHOSTSCRIPT IS LICENSED FREE OF CHARGE, WE PROVIDE ABSOLUTELY +NO WARRANTY, TO THE EXTENT PERMITTED BY APPLICABLE STATE LAW. EXCEPT +WHEN OTHERWISE STATED IN WRITING, FREE SOFTWARE FOUNDATION, INC, RICHARD +M. STALLMAN, ALADDIN ENTERPRISES, L. PETER DEUTSCH, AND/OR OTHER PARTIES +PROVIDE GHOSTSCRIPT "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER +EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE +ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF GHOSTSCRIPT IS WITH +YOU. SHOULD GHOSTSCRIPT PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL +NECESSARY SERVICING, REPAIR OR CORRECTION. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW WILL RICHARD M. +STALLMAN, THE FREE SOFTWARE FOUNDATION, INC., L. PETER DEUTSCH, ALADDIN +ENTERPRISES, AND/OR ANY OTHER PARTY WHO MAY MODIFY AND REDISTRIBUTE +GHOSTSCRIPT AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING +ANY LOST PROFITS, LOST MONIES, OR OTHER SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE +(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED +INACCURATE OR LOSSES SUSTAINED BY THIRD PARTIES OR A FAILURE OF THE +PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS) GHOSTSCRIPT, EVEN IF YOU +HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, OR FOR ANY CLAIM +BY ANY OTHER PARTY. + +-------------------- End of file COPYLEFT ------------------------------ +*/ + +/* + * Usage: + ansi2knr input_file [output_file] + * If no output_file is supplied, output goes to stdout. + * There are no error messages. + * + * ansi2knr recognizes function definitions by seeing a non-keyword + * identifier at the left margin, followed by a left parenthesis, + * with a right parenthesis as the last character on the line, + * and with a left brace as the first token on the following line + * (ignoring possible intervening comments). + * It will recognize a multi-line header provided that no intervening + * line ends with a left or right brace or a semicolon. + * These algorithms ignore whitespace and comments, except that + * the function name must be the first thing on the line. + * The following constructs will confuse it: + * - Any other construct that starts at the left margin and + * follows the above syntax (such as a macro or function call). + * - Some macros that tinker with the syntax of the function header. + */ + +/* + * The original and principal author of ansi2knr is L. Peter Deutsch + * . Other authors are noted in the change history + * that follows (in reverse chronological order): + lpd 96-01-21 added code to cope with not HAVE_CONFIG_H and with + compilers that don't understand void, as suggested by + Tom Lane + lpd 96-01-15 changed to require that the first non-comment token + on the line following a function header be a left brace, + to reduce sensitivity to macros, as suggested by Tom Lane + + lpd 95-06-22 removed #ifndefs whose sole purpose was to define + undefined preprocessor symbols as 0; changed all #ifdefs + for configuration symbols to #ifs + lpd 95-04-05 changed copyright notice to make it clear that + including ansi2knr in a program does not bring the entire + program under the GPL + lpd 94-12-18 added conditionals for systems where ctype macros + don't handle 8-bit characters properly, suggested by + Francois Pinard ; + removed --varargs switch (this is now the default) + lpd 94-10-10 removed CONFIG_BROKETS conditional + lpd 94-07-16 added some conditionals to help GNU `configure', + suggested by Francois Pinard ; + properly erase prototype args in function parameters, + contributed by Jim Avera ; + correct error in writeblanks (it shouldn't erase EOLs) + lpd 89-xx-xx original version + */ + +/* Most of the conditionals here are to make ansi2knr work with */ +/* or without the GNU configure machinery. */ + +#if HAVE_CONFIG_H +# include +#endif + +#include +#include + +#if HAVE_CONFIG_H + +/* + For properly autoconfiguring ansi2knr, use AC_CONFIG_HEADER(config.h). + This will define HAVE_CONFIG_H and so, activate the following lines. + */ + +# if STDC_HEADERS || HAVE_STRING_H +# include +# else +# include +# endif + +#else /* not HAVE_CONFIG_H */ + +/* Otherwise do it the hard way */ + +# ifdef BSD +# include +# else +# ifdef VMS + extern int strlen(), strncmp(); +# else +# include +# endif +# endif + +#endif /* not HAVE_CONFIG_H */ + +#if STDC_HEADERS +# include +#else +/* + malloc and free should be declared in stdlib.h, + but if you've got a K&R compiler, they probably aren't. + */ +# ifdef MSDOS +# include +# else +# ifdef VMS + extern char *malloc(); + extern void free(); +# else + extern char *malloc(); + extern int free(); +# endif +# endif + +#endif + +/* + * The ctype macros don't always handle 8-bit characters correctly. + * Compensate for this here. + */ +#ifdef isascii +# undef HAVE_ISASCII /* just in case */ +# define HAVE_ISASCII 1 +#else +#endif +#if STDC_HEADERS || !HAVE_ISASCII +# define is_ascii(c) 1 +#else +# define is_ascii(c) isascii(c) +#endif + +#define is_space(c) (is_ascii(c) && isspace(c)) +#define is_alpha(c) (is_ascii(c) && isalpha(c)) +#define is_alnum(c) (is_ascii(c) && isalnum(c)) + +/* Scanning macros */ +#define isidchar(ch) (is_alnum(ch) || (ch) == '_') +#define isidfirstchar(ch) (is_alpha(ch) || (ch) == '_') + +/* Forward references */ +char *skipspace(); +int writeblanks(); +int test1(); +int convert1(); + +/* The main program */ +int +main(argc, argv) + int argc; + char *argv[]; +{ FILE *in, *out; +#define bufsize 5000 /* arbitrary size */ + char *buf; + char *line; + char *more; + /* + * In previous versions, ansi2knr recognized a --varargs switch. + * If this switch was supplied, ansi2knr would attempt to convert + * a ... argument to va_alist and va_dcl; if this switch was not + * supplied, ansi2knr would simply drop any such arguments. + * Now, ansi2knr always does this conversion, and we only + * check for this switch for backward compatibility. + */ + int convert_varargs = 1; + + if ( argc > 1 && argv[1][0] == '-' ) + { if ( !strcmp(argv[1], "--varargs") ) + { convert_varargs = 1; + argc--; + argv++; + } + else + { fprintf(stderr, "Unrecognized switch: %s\n", argv[1]); + exit(1); + } + } + switch ( argc ) + { + default: + printf("Usage: ansi2knr input_file [output_file]\n"); + exit(0); + case 2: + out = stdout; + break; + case 3: + out = fopen(argv[2], "w"); + if ( out == NULL ) + { fprintf(stderr, "Cannot open output file %s\n", argv[2]); + exit(1); + } + } + in = fopen(argv[1], "r"); + if ( in == NULL ) + { fprintf(stderr, "Cannot open input file %s\n", argv[1]); + exit(1); + } + fprintf(out, "#line 1 \"%s\"\n", argv[1]); + buf = malloc(bufsize); + line = buf; + while ( fgets(line, (unsigned)(buf + bufsize - line), in) != NULL ) + { +test: line += strlen(line); + switch ( test1(buf) ) + { + case 2: /* a function header */ + convert1(buf, out, 1, convert_varargs); + break; + case 1: /* a function */ + /* Check for a { at the start of the next line. */ + more = ++line; +f: if ( line >= buf + (bufsize - 1) ) /* overflow check */ + goto wl; + if ( fgets(line, (unsigned)(buf + bufsize - line), in) == NULL ) + goto wl; + switch ( *skipspace(more, 1) ) + { + case '{': + /* Definitely a function header. */ + convert1(buf, out, 0, convert_varargs); + fputs(more, out); + break; + case 0: + /* The next line was blank or a comment: */ + /* keep scanning for a non-comment. */ + line += strlen(line); + goto f; + default: + /* buf isn't a function header, but */ + /* more might be. */ + fputs(buf, out); + strcpy(buf, more); + line = buf; + goto test; + } + break; + case -1: /* maybe the start of a function */ + if ( line != buf + (bufsize - 1) ) /* overflow check */ + continue; + /* falls through */ + default: /* not a function */ +wl: fputs(buf, out); + break; + } + line = buf; + } + if ( line != buf ) + fputs(buf, out); + free(buf); + fclose(out); + fclose(in); + return 0; +} + +/* Skip over space and comments, in either direction. */ +char * +skipspace(p, dir) + register char *p; + register int dir; /* 1 for forward, -1 for backward */ +{ for ( ; ; ) + { while ( is_space(*p) ) + p += dir; + if ( !(*p == '/' && p[dir] == '*') ) + break; + p += dir; p += dir; + while ( !(*p == '*' && p[dir] == '/') ) + { if ( *p == 0 ) + return p; /* multi-line comment?? */ + p += dir; + } + p += dir; p += dir; + } + return p; +} + +/* + * Write blanks over part of a string. + * Don't overwrite end-of-line characters. + */ +int +writeblanks(start, end) + char *start; + char *end; +{ char *p; + for ( p = start; p < end; p++ ) + if ( *p != '\r' && *p != '\n' ) + *p = ' '; + return 0; +} + +/* + * Test whether the string in buf is a function definition. + * The string may contain and/or end with a newline. + * Return as follows: + * 0 - definitely not a function definition; + * 1 - definitely a function definition; + * 2 - definitely a function prototype (NOT USED); + * -1 - may be the beginning of a function definition, + * append another line and look again. + * The reason we don't attempt to convert function prototypes is that + * Ghostscript's declaration-generating macros look too much like + * prototypes, and confuse the algorithms. + */ +int +test1(buf) + char *buf; +{ register char *p = buf; + char *bend; + char *endfn; + int contin; + + if ( !isidfirstchar(*p) ) + return 0; /* no name at left margin */ + bend = skipspace(buf + strlen(buf) - 1, -1); + switch ( *bend ) + { + case ';': contin = 0 /*2*/; break; + case ')': contin = 1; break; + case '{': return 0; /* not a function */ + case '}': return 0; /* not a function */ + default: contin = -1; + } + while ( isidchar(*p) ) + p++; + endfn = p; + p = skipspace(p, 1); + if ( *p++ != '(' ) + return 0; /* not a function */ + p = skipspace(p, 1); + if ( *p == ')' ) + return 0; /* no parameters */ + /* Check that the apparent function name isn't a keyword. */ + /* We only need to check for keywords that could be followed */ + /* by a left parenthesis (which, unfortunately, is most of them). */ + { static char *words[] = + { "asm", "auto", "case", "char", "const", "double", + "extern", "float", "for", "if", "int", "long", + "register", "return", "short", "signed", "sizeof", + "static", "switch", "typedef", "unsigned", + "void", "volatile", "while", 0 + }; + char **key = words; + char *kp; + int len = endfn - buf; + + while ( (kp = *key) != 0 ) + { if ( strlen(kp) == len && !strncmp(kp, buf, len) ) + return 0; /* name is a keyword */ + key++; + } + } + return contin; +} + +/* Convert a recognized function definition or header to K&R syntax. */ +int +convert1(buf, out, header, convert_varargs) + char *buf; + FILE *out; + int header; /* Boolean */ + int convert_varargs; /* Boolean */ +{ char *endfn; + register char *p; + char **breaks; + unsigned num_breaks = 2; /* for testing */ + char **btop; + char **bp; + char **ap; + char *vararg = 0; + + /* Pre-ANSI implementations don't agree on whether strchr */ + /* is called strchr or index, so we open-code it here. */ + for ( endfn = buf; *(endfn++) != '('; ) + ; +top: p = endfn; + breaks = (char **)malloc(sizeof(char *) * num_breaks * 2); + if ( breaks == 0 ) + { /* Couldn't allocate break table, give up */ + fprintf(stderr, "Unable to allocate break table!\n"); + fputs(buf, out); + return -1; + } + btop = breaks + num_breaks * 2 - 2; + bp = breaks; + /* Parse the argument list */ + do + { int level = 0; + char *lp = NULL; + char *rp; + char *end = NULL; + + if ( bp >= btop ) + { /* Filled up break table. */ + /* Allocate a bigger one and start over. */ + free((char *)breaks); + num_breaks <<= 1; + goto top; + } + *bp++ = p; + /* Find the end of the argument */ + for ( ; end == NULL; p++ ) + { switch(*p) + { + case ',': + if ( !level ) end = p; + break; + case '(': + if ( !level ) lp = p; + level++; + break; + case ')': + if ( --level < 0 ) end = p; + else rp = p; + break; + case '/': + p = skipspace(p, 1) - 1; + break; + default: + ; + } + } + /* Erase any embedded prototype parameters. */ + if ( lp ) + writeblanks(lp + 1, rp); + p--; /* back up over terminator */ + /* Find the name being declared. */ + /* This is complicated because of procedure and */ + /* array modifiers. */ + for ( ; ; ) + { p = skipspace(p - 1, -1); + switch ( *p ) + { + case ']': /* skip array dimension(s) */ + case ')': /* skip procedure args OR name */ + { int level = 1; + while ( level ) + switch ( *--p ) + { + case ']': case ')': level++; break; + case '[': case '(': level--; break; + case '/': p = skipspace(p, -1) + 1; break; + default: ; + } + } + if ( *p == '(' && *skipspace(p + 1, 1) == '*' ) + { /* We found the name being declared */ + while ( !isidfirstchar(*p) ) + p = skipspace(p, 1) + 1; + goto found; + } + break; + default: + goto found; + } + } +found: if ( *p == '.' && p[-1] == '.' && p[-2] == '.' ) + { if ( convert_varargs ) + { *bp++ = "va_alist"; + vararg = p-2; + } + else + { p++; + if ( bp == breaks + 1 ) /* sole argument */ + writeblanks(breaks[0], p); + else + writeblanks(bp[-1] - 1, p); + bp--; + } + } + else + { while ( isidchar(*p) ) p--; + *bp++ = p+1; + } + p = end; + } + while ( *p++ == ',' ); + *bp = p; + /* Make a special check for 'void' arglist */ + if ( bp == breaks+2 ) + { p = skipspace(breaks[0], 1); + if ( !strncmp(p, "void", 4) ) + { p = skipspace(p+4, 1); + if ( p == breaks[2] - 1 ) + { bp = breaks; /* yup, pretend arglist is empty */ + writeblanks(breaks[0], p + 1); + } + } + } + /* Put out the function name and left parenthesis. */ + p = buf; + while ( p != endfn ) putc(*p, out), p++; + /* Put out the declaration. */ + if ( header ) + { fputs(");", out); + for ( p = breaks[0]; *p; p++ ) + if ( *p == '\r' || *p == '\n' ) + putc(*p, out); + } + else + { for ( ap = breaks+1; ap < bp; ap += 2 ) + { p = *ap; + while ( isidchar(*p) ) + putc(*p, out), p++; + if ( ap < bp - 1 ) + fputs(", ", out); + } + fputs(") ", out); + /* Put out the argument declarations */ + for ( ap = breaks+2; ap <= bp; ap += 2 ) + (*ap)[-1] = ';'; + if ( vararg != 0 ) + { *vararg = 0; + fputs(breaks[0], out); /* any prior args */ + fputs("va_dcl", out); /* the final arg */ + fputs(bp[0], out); + } + else + fputs(breaks[0], out); + } + free((char *)breaks); + return 0; +} diff --git a/windows_libs/jpeg-6a/cderror.h b/windows_libs/jpeg-6a/cderror.h new file mode 100644 index 00000000..41a29cd1 --- /dev/null +++ b/windows_libs/jpeg-6a/cderror.h @@ -0,0 +1,132 @@ +/* + * cderror.h + * + * Copyright (C) 1994, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the error and message codes for the cjpeg/djpeg + * applications. These strings are not needed as part of the JPEG library + * proper. + * Edit this file to add new codes, or to translate the message strings to + * some other language. + */ + +/* + * To define the enum list of message codes, include this file without + * defining macro JMESSAGE. To create a message string table, include it + * again with a suitable JMESSAGE definition (see jerror.c for an example). + */ +#ifndef JMESSAGE +#ifndef CDERROR_H +#define CDERROR_H +/* First time through, define the enum list */ +#define JMAKE_ENUM_LIST +#else +/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ +#define JMESSAGE(code,string) +#endif /* CDERROR_H */ +#endif /* JMESSAGE */ + +#ifdef JMAKE_ENUM_LIST + +typedef enum { + +#define JMESSAGE(code,string) code , + +#endif /* JMAKE_ENUM_LIST */ + +JMESSAGE(JMSG_FIRSTADDONCODE=1000, NULL) /* Must be first entry! */ + +#ifdef BMP_SUPPORTED +JMESSAGE(JERR_BMP_BADCMAP, "Unsupported BMP colormap format") +JMESSAGE(JERR_BMP_BADDEPTH, "Only 8- and 24-bit BMP files are supported") +JMESSAGE(JERR_BMP_BADHEADER, "Invalid BMP file: bad header length") +JMESSAGE(JERR_BMP_BADPLANES, "Invalid BMP file: biPlanes not equal to 1") +JMESSAGE(JERR_BMP_COLORSPACE, "BMP output must be grayscale or RGB") +JMESSAGE(JERR_BMP_COMPRESSED, "Sorry, compressed BMPs not yet supported") +JMESSAGE(JERR_BMP_NOT, "Not a BMP file - does not start with BM") +JMESSAGE(JTRC_BMP, "%ux%u 24-bit BMP image") +JMESSAGE(JTRC_BMP_MAPPED, "%ux%u 8-bit colormapped BMP image") +JMESSAGE(JTRC_BMP_OS2, "%ux%u 24-bit OS2 BMP image") +JMESSAGE(JTRC_BMP_OS2_MAPPED, "%ux%u 8-bit colormapped OS2 BMP image") +#endif /* BMP_SUPPORTED */ + +#ifdef GIF_SUPPORTED +JMESSAGE(JERR_GIF_BUG, "GIF output got confused") +JMESSAGE(JERR_GIF_CODESIZE, "Bogus GIF codesize %d") +JMESSAGE(JERR_GIF_COLORSPACE, "GIF output must be grayscale or RGB") +JMESSAGE(JERR_GIF_IMAGENOTFOUND, "Too few images in GIF file") +JMESSAGE(JERR_GIF_NOT, "Not a GIF file") +JMESSAGE(JTRC_GIF, "%ux%ux%d GIF image") +JMESSAGE(JTRC_GIF_BADVERSION, + "Warning: unexpected GIF version number '%c%c%c'") +JMESSAGE(JTRC_GIF_EXTENSION, "Ignoring GIF extension block of type 0x%02x") +JMESSAGE(JTRC_GIF_NONSQUARE, "Caution: nonsquare pixels in input") +JMESSAGE(JWRN_GIF_BADDATA, "Corrupt data in GIF file") +JMESSAGE(JWRN_GIF_CHAR, "Bogus char 0x%02x in GIF file, ignoring") +JMESSAGE(JWRN_GIF_ENDCODE, "Premature end of GIF image") +JMESSAGE(JWRN_GIF_NOMOREDATA, "Ran out of GIF bits") +#endif /* GIF_SUPPORTED */ + +#ifdef PPM_SUPPORTED +JMESSAGE(JERR_PPM_COLORSPACE, "PPM output must be grayscale or RGB") +JMESSAGE(JERR_PPM_NONNUMERIC, "Nonnumeric data in PPM file") +JMESSAGE(JERR_PPM_NOT, "Not a PPM file") +JMESSAGE(JTRC_PGM, "%ux%u PGM image") +JMESSAGE(JTRC_PGM_TEXT, "%ux%u text PGM image") +JMESSAGE(JTRC_PPM, "%ux%u PPM image") +JMESSAGE(JTRC_PPM_TEXT, "%ux%u text PPM image") +#endif /* PPM_SUPPORTED */ + +#ifdef RLE_SUPPORTED +JMESSAGE(JERR_RLE_BADERROR, "Bogus error code from RLE library") +JMESSAGE(JERR_RLE_COLORSPACE, "RLE output must be grayscale or RGB") +JMESSAGE(JERR_RLE_DIMENSIONS, "Image dimensions (%ux%u) too large for RLE") +JMESSAGE(JERR_RLE_EMPTY, "Empty RLE file") +JMESSAGE(JERR_RLE_EOF, "Premature EOF in RLE header") +JMESSAGE(JERR_RLE_MEM, "Insufficient memory for RLE header") +JMESSAGE(JERR_RLE_NOT, "Not an RLE file") +JMESSAGE(JERR_RLE_TOOMANYCHANNELS, "Cannot handle %d output channels for RLE") +JMESSAGE(JERR_RLE_UNSUPPORTED, "Cannot handle this RLE setup") +JMESSAGE(JTRC_RLE, "%ux%u full-color RLE file") +JMESSAGE(JTRC_RLE_FULLMAP, "%ux%u full-color RLE file with map of length %d") +JMESSAGE(JTRC_RLE_GRAY, "%ux%u grayscale RLE file") +JMESSAGE(JTRC_RLE_MAPGRAY, "%ux%u grayscale RLE file with map of length %d") +JMESSAGE(JTRC_RLE_MAPPED, "%ux%u colormapped RLE file with map of length %d") +#endif /* RLE_SUPPORTED */ + +#ifdef TARGA_SUPPORTED +JMESSAGE(JERR_TGA_BADCMAP, "Unsupported Targa colormap format") +JMESSAGE(JERR_TGA_BADPARMS, "Invalid or unsupported Targa file") +JMESSAGE(JERR_TGA_COLORSPACE, "Targa output must be grayscale or RGB") +JMESSAGE(JTRC_TGA, "%ux%u RGB Targa image") +JMESSAGE(JTRC_TGA_GRAY, "%ux%u grayscale Targa image") +JMESSAGE(JTRC_TGA_MAPPED, "%ux%u colormapped Targa image") +#else +JMESSAGE(JERR_TGA_NOTCOMP, "Targa support was not compiled") +#endif /* TARGA_SUPPORTED */ + +JMESSAGE(JERR_BAD_CMAP_FILE, + "Color map file is invalid or of unsupported format") +JMESSAGE(JERR_TOO_MANY_COLORS, + "Output file format cannot handle %d colormap entries") +JMESSAGE(JERR_UNGETC_FAILED, "ungetc failed") +#ifdef TARGA_SUPPORTED +JMESSAGE(JERR_UNKNOWN_FORMAT, + "Unrecognized input file format --- perhaps you need -targa") +#else +JMESSAGE(JERR_UNKNOWN_FORMAT, "Unrecognized input file format") +#endif +JMESSAGE(JERR_UNSUPPORTED_FORMAT, "Unsupported output file format") + +#ifdef JMAKE_ENUM_LIST + + JMSG_LASTADDONCODE +} ADDON_MESSAGE_CODE; + +#undef JMAKE_ENUM_LIST +#endif /* JMAKE_ENUM_LIST */ + +/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ +#undef JMESSAGE diff --git a/windows_libs/jpeg-6a/cdjpeg.c b/windows_libs/jpeg-6a/cdjpeg.c new file mode 100644 index 00000000..a3d6e067 --- /dev/null +++ b/windows_libs/jpeg-6a/cdjpeg.c @@ -0,0 +1,179 @@ +/* + * cdjpeg.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains common support routines used by the IJG application + * programs (cjpeg, djpeg, jpegtran). + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ +#include /* to declare isupper(), tolower() */ +#ifdef NEED_SIGNAL_CATCHER +#include /* to declare signal() */ +#endif +#ifdef USE_SETMODE +#include /* to declare setmode()'s parameter macros */ +/* If you have setmode() but not , just delete this line: */ +#include /* to declare setmode() */ +#endif + + +/* + * Signal catcher to ensure that temporary files are removed before aborting. + * NB: for Amiga Manx C this is actually a global routine named _abort(); + * we put "#define signal_catcher _abort" in jconfig.h. Talk about bogus... + */ + +#ifdef NEED_SIGNAL_CATCHER + +static j_common_ptr sig_cinfo; + +void /* must be global for Manx C */ +signal_catcher (int signum) +{ + if (sig_cinfo != NULL) { + if (sig_cinfo->err != NULL) /* turn off trace output */ + sig_cinfo->err->trace_level = 0; + jpeg_destroy(sig_cinfo); /* clean up memory allocation & temp files */ + } + exit(EXIT_FAILURE); +} + + +GLOBAL(void) +enable_signal_catcher (j_common_ptr cinfo) +{ + sig_cinfo = cinfo; + signal(SIGINT, signal_catcher); +#ifdef SIGTERM /* not all systems have SIGTERM */ + signal(SIGTERM, signal_catcher); +#endif +} + +#endif + + +/* + * Optional progress monitor: display a percent-done figure on stderr. + */ + +#ifdef PROGRESS_REPORT + +METHODDEF(void) +progress_monitor (j_common_ptr cinfo) +{ + cd_progress_ptr prog = (cd_progress_ptr) cinfo->progress; + int total_passes = prog->pub.total_passes + prog->total_extra_passes; + int percent_done = (int) (prog->pub.pass_counter*100L/prog->pub.pass_limit); + + if (percent_done != prog->percent_done) { + prog->percent_done = percent_done; + if (total_passes > 1) { + fprintf(stderr, "\rPass %d/%d: %3d%% ", + prog->pub.completed_passes + prog->completed_extra_passes + 1, + total_passes, percent_done); + } else { + fprintf(stderr, "\r %3d%% ", percent_done); + } + fflush(stderr); + } +} + + +GLOBAL(void) +start_progress_monitor (j_common_ptr cinfo, cd_progress_ptr progress) +{ + /* Enable progress display, unless trace output is on */ + if (cinfo->err->trace_level == 0) { + progress->pub.progress_monitor = progress_monitor; + progress->completed_extra_passes = 0; + progress->total_extra_passes = 0; + progress->percent_done = -1; + cinfo->progress = &progress->pub; + } +} + + +GLOBAL(void) +end_progress_monitor (j_common_ptr cinfo) +{ + /* Clear away progress display */ + if (cinfo->err->trace_level == 0) { + fprintf(stderr, "\r \r"); + fflush(stderr); + } +} + +#endif + + +/* + * Case-insensitive matching of possibly-abbreviated keyword switches. + * keyword is the constant keyword (must be lower case already), + * minchars is length of minimum legal abbreviation. + */ + +GLOBAL(boolean) +keymatch (char * arg, const char * keyword, int minchars) +{ + register int ca, ck; + register int nmatched = 0; + + while ((ca = *arg++) != '\0') { + if ((ck = *keyword++) == '\0') + return FALSE; /* arg longer than keyword, no good */ + if (isupper(ca)) /* force arg to lcase (assume ck is already) */ + ca = tolower(ca); + if (ca != ck) + return FALSE; /* no good */ + nmatched++; /* count matched characters */ + } + /* reached end of argument; fail if it's too short for unique abbrev */ + if (nmatched < minchars) + return FALSE; + return TRUE; /* A-OK */ +} + + +/* + * Routines to establish binary I/O mode for stdin and stdout. + * Non-Unix systems often require some hacking to get out of text mode. + */ + +GLOBAL(FILE *) +read_stdin (void) +{ + FILE * input_file = stdin; + +#ifdef USE_SETMODE /* need to hack file mode? */ + setmode(fileno(stdin), O_BINARY); +#endif +#ifdef USE_FDOPEN /* need to re-open in binary mode? */ + if ((input_file = fdopen(fileno(stdin), READ_BINARY)) == NULL) { + fprintf(stderr, "Cannot reopen stdin\n"); + exit(EXIT_FAILURE); + } +#endif + return input_file; +} + + +GLOBAL(FILE *) +write_stdout (void) +{ + FILE * output_file = stdout; + +#ifdef USE_SETMODE /* need to hack file mode? */ + setmode(fileno(stdout), O_BINARY); +#endif +#ifdef USE_FDOPEN /* need to re-open in binary mode? */ + if ((output_file = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) { + fprintf(stderr, "Cannot reopen stdout\n"); + exit(EXIT_FAILURE); + } +#endif + return output_file; +} diff --git a/windows_libs/jpeg-6a/cdjpeg.h b/windows_libs/jpeg-6a/cdjpeg.h new file mode 100644 index 00000000..cc0d6001 --- /dev/null +++ b/windows_libs/jpeg-6a/cdjpeg.h @@ -0,0 +1,179 @@ +/* + * cdjpeg.h + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains common declarations for the sample applications + * cjpeg and djpeg. It is NOT used by the core JPEG library. + */ + +#define JPEG_CJPEG_DJPEG /* define proper options in jconfig.h */ +#define JPEG_INTERNAL_OPTIONS /* cjpeg.c,djpeg.c need to see xxx_SUPPORTED */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jerror.h" /* get library error codes too */ +#include "cderror.h" /* get application-specific error codes */ + + +/* + * Object interface for cjpeg's source file decoding modules + */ + +typedef struct cjpeg_source_struct * cjpeg_source_ptr; + +struct cjpeg_source_struct { + JMETHOD(void, start_input, (j_compress_ptr cinfo, + cjpeg_source_ptr sinfo)); + JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, + cjpeg_source_ptr sinfo)); + JMETHOD(void, finish_input, (j_compress_ptr cinfo, + cjpeg_source_ptr sinfo)); + + FILE *input_file; + + JSAMPARRAY buffer; + JDIMENSION buffer_height; +}; + + +/* + * Object interface for djpeg's output file encoding modules + */ + +typedef struct djpeg_dest_struct * djpeg_dest_ptr; + +struct djpeg_dest_struct { + /* start_output is called after jpeg_start_decompress finishes. + * The color map will be ready at this time, if one is needed. + */ + JMETHOD(void, start_output, (j_decompress_ptr cinfo, + djpeg_dest_ptr dinfo)); + /* Emit the specified number of pixel rows from the buffer. */ + JMETHOD(void, put_pixel_rows, (j_decompress_ptr cinfo, + djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied)); + /* Finish up at the end of the image. */ + JMETHOD(void, finish_output, (j_decompress_ptr cinfo, + djpeg_dest_ptr dinfo)); + + /* Target file spec; filled in by djpeg.c after object is created. */ + FILE * output_file; + + /* Output pixel-row buffer. Created by module init or start_output. + * Width is cinfo->output_width * cinfo->output_components; + * height is buffer_height. + */ + JSAMPARRAY buffer; + JDIMENSION buffer_height; +}; + + +/* + * cjpeg/djpeg may need to perform extra passes to convert to or from + * the source/destination file format. The JPEG library does not know + * about these passes, but we'd like them to be counted by the progress + * monitor. We use an expanded progress monitor object to hold the + * additional pass count. + */ + +struct cdjpeg_progress_mgr { + struct jpeg_progress_mgr pub; /* fields known to JPEG library */ + int completed_extra_passes; /* extra passes completed */ + int total_extra_passes; /* total extra */ + /* last printed percentage stored here to avoid multiple printouts */ + int percent_done; +}; + +typedef struct cdjpeg_progress_mgr * cd_progress_ptr; + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jinit_read_bmp jIRdBMP +#define jinit_write_bmp jIWrBMP +#define jinit_read_gif jIRdGIF +#define jinit_write_gif jIWrGIF +#define jinit_read_ppm jIRdPPM +#define jinit_write_ppm jIWrPPM +#define jinit_read_rle jIRdRLE +#define jinit_write_rle jIWrRLE +#define jinit_read_targa jIRdTarga +#define jinit_write_targa jIWrTarga +#define read_quant_tables RdQTables +#define read_scan_script RdScnScript +#define set_quant_slots SetQSlots +#define set_sample_factors SetSFacts +#define read_color_map RdCMap +#define enable_signal_catcher EnSigCatcher +#define start_progress_monitor StProgMon +#define end_progress_monitor EnProgMon +#define read_stdin RdStdin +#define write_stdout WrStdout +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +/* Module selection routines for I/O modules. */ + +EXTERN(cjpeg_source_ptr) jinit_read_bmp JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_bmp JPP((j_decompress_ptr cinfo, + boolean is_os2)); +EXTERN(cjpeg_source_ptr) jinit_read_gif JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_gif JPP((j_decompress_ptr cinfo)); +EXTERN(cjpeg_source_ptr) jinit_read_ppm JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_ppm JPP((j_decompress_ptr cinfo)); +EXTERN(cjpeg_source_ptr) jinit_read_rle JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_rle JPP((j_decompress_ptr cinfo)); +EXTERN(cjpeg_source_ptr) jinit_read_targa JPP((j_compress_ptr cinfo)); +EXTERN(djpeg_dest_ptr) jinit_write_targa JPP((j_decompress_ptr cinfo)); + +/* cjpeg support routines (in rdswitch.c) */ + +EXTERN(boolean) read_quant_tables JPP((j_compress_ptr cinfo, char * filename, + int scale_factor, boolean force_baseline)); +EXTERN(boolean) read_scan_script JPP((j_compress_ptr cinfo, char * filename)); +EXTERN(boolean) set_quant_slots JPP((j_compress_ptr cinfo, char *arg)); +EXTERN(boolean) set_sample_factors JPP((j_compress_ptr cinfo, char *arg)); + +/* djpeg support routines (in rdcolmap.c) */ + +EXTERN(void) read_color_map JPP((j_decompress_ptr cinfo, FILE * infile)); + +/* common support routines (in cdjpeg.c) */ + +EXTERN(void) enable_signal_catcher JPP((j_common_ptr cinfo)); +EXTERN(void) start_progress_monitor JPP((j_common_ptr cinfo, + cd_progress_ptr progress)); +EXTERN(void) end_progress_monitor JPP((j_common_ptr cinfo)); +EXTERN(boolean) keymatch JPP((char * arg, const char * keyword, int minchars)); +EXTERN(FILE *) read_stdin JPP((void)); +EXTERN(FILE *) write_stdout JPP((void)); + +/* miscellaneous useful macros */ + +#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ +#define READ_BINARY "r" +#define WRITE_BINARY "w" +#else +#define READ_BINARY "rb" +#define WRITE_BINARY "wb" +#endif + +#ifndef EXIT_FAILURE /* define exit() codes if not provided */ +#define EXIT_FAILURE 1 +#endif +#ifndef EXIT_SUCCESS +#ifdef VMS +#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ +#else +#define EXIT_SUCCESS 0 +#endif +#endif +#ifndef EXIT_WARNING +#ifdef VMS +#define EXIT_WARNING 1 /* VMS is very nonstandard */ +#else +#define EXIT_WARNING 2 +#endif +#endif diff --git a/windows_libs/jpeg-6a/change.log b/windows_libs/jpeg-6a/change.log new file mode 100644 index 00000000..231650e8 --- /dev/null +++ b/windows_libs/jpeg-6a/change.log @@ -0,0 +1,152 @@ +CHANGE LOG for Independent JPEG Group's JPEG software + + +Version 6a 7-Feb-96 +-------------------- + +Library initialization sequence modified to detect version mismatches +and struct field packing mismatches between library and calling application. +This change requires applications to be recompiled, but does not require +any application source code change. + +All routine declarations changed to the style "GLOBAL(type) name ...", +that is, GLOBAL, LOCAL, METHODDEF, EXTERN are now macros taking the +routine's return type as an argument. This makes it possible to add +Microsoft-style linkage keywords to all the routines by changing just +these macros. Note that any application code that was using these macros +will have to be changed. + +DCT coefficient quantization tables are now stored in normal array order +rather than zigzag order. Application code that calls jpeg_add_quant_table, +or otherwise manipulates quantization tables directly, will need to be +changed. If you need to make such code work with either older or newer +versions of the library, a test like "#if JPEG_LIB_VERSION >= 61" is +recommended. + +djpeg's trace capability now dumps DQT tables in natural order, not zigzag +order. This allows the trace output to be made into a "-qtables" file +more easily. + +New system-dependent memory manager module for use on Apple Macintosh. + +Fix bug in cjpeg's -smooth option: last one or two scanlines would be +duplicates of the prior line unless the image height mod 16 was 1 or 2. + +Repair minor problems in VMS, BCC, MC6 makefiles. + +New configure script based on latest GNU Autoconf. + +Correct the list of include files needed by MetroWerks C for ccommand(). + +Numerous small documentation updates. + + +Version 6 2-Aug-95 +------------------- + +Progressive JPEG support: library can read and write full progressive JPEG +files. A "buffered image" mode supports incremental decoding for on-the-fly +display of progressive images. Simply recompiling an existing IJG-v5-based +decoder with v6 should allow it to read progressive files, though of course +without any special progressive display. + +New "jpegtran" application performs lossless transcoding between different +JPEG formats; primarily, it can be used to convert baseline to progressive +JPEG and vice versa. In support of jpegtran, the library now allows lossless +reading and writing of JPEG files as DCT coefficient arrays. This ability +may be of use in other applications. + +Notes for programmers: +* We changed jpeg_start_decompress() to be able to suspend; this makes all +decoding modes available to suspending-input applications. However, +existing applications that use suspending input will need to be changed +to check the return value from jpeg_start_decompress(). You don't need to +do anything if you don't use a suspending data source. +* We changed the interface to the virtual array routines: access_virt_array +routines now take a count of the number of rows to access this time. The +last parameter to request_virt_array routines is now interpreted as the +maximum number of rows that may be accessed at once, but not necessarily +the height of every access. + + +Version 5b 15-Mar-95 +--------------------- + +Correct bugs with grayscale images having v_samp_factor > 1. + +jpeg_write_raw_data() now supports output suspension. + +Correct bugs in "configure" script for case of compiling in +a directory other than the one containing the source files. + +Repair bug in jquant1.c: sometimes didn't use as many colors as it could. + +Borland C makefile and jconfig file work under either MS-DOS or OS/2. + +Miscellaneous improvements to documentation. + + +Version 5a 7-Dec-94 +-------------------- + +Changed color conversion roundoff behavior so that grayscale values are +represented exactly. (This causes test image files to change.) + +Make ordered dither use 16x16 instead of 4x4 pattern for a small quality +improvement. + +New configure script based on latest GNU Autoconf. +Fix configure script to handle CFLAGS correctly. +Rename *.auto files to *.cfg, so that configure script still works if +file names have been truncated for DOS. + +Fix bug in rdbmp.c: didn't allow for extra data between header and image. + +Modify rdppm.c/wrppm.c to handle 2-byte raw PPM/PGM formats for 12-bit data. + +Fix several bugs in rdrle.c. + +NEED_SHORT_EXTERNAL_NAMES option was broken. + +Revise jerror.h/jerror.c for more flexibility in message table. + +Repair oversight in jmemname.c NO_MKTEMP case: file could be there +but unreadable. + + +Version 5 24-Sep-94 +-------------------- + +Version 5 represents a nearly complete redesign and rewrite of the IJG +software. Major user-visible changes include: + * Automatic configuration simplifies installation for most Unix systems. + * A range of speed vs. image quality tradeoffs are supported. + This includes resizing of an image during decompression: scaling down + by a factor of 1/2, 1/4, or 1/8 is handled very efficiently. + * New programs rdjpgcom and wrjpgcom allow insertion and extraction + of text comments in a JPEG file. + +The application programmer's interface to the library has changed completely. +Notable improvements include: + * We have eliminated the use of callback routines for handling the + uncompressed image data. The application now sees the library as a + set of routines that it calls to read or write image data on a + scanline-by-scanline basis. + * The application image data is represented in a conventional interleaved- + pixel format, rather than as a separate array for each color channel. + This can save a copying step in many programs. + * The handling of compressed data has been cleaned up: the application can + supply routines to source or sink the compressed data. It is possible to + suspend processing on source/sink buffer overrun, although this is not + supported in all operating modes. + * All static state has been eliminated from the library, so that multiple + instances of compression or decompression can be active concurrently. + * JPEG abbreviated datastream formats are supported, ie, quantization and + Huffman tables can be stored separately from the image data. + * And not only that, but the documentation of the library has improved + considerably! + + +The last widely used release before the version 5 rewrite was version 4A of +18-Feb-93. Change logs before that point have been discarded, since they +are not of much interest after the rewrite. diff --git a/windows_libs/jpeg-6a/cjpeg.1 b/windows_libs/jpeg-6a/cjpeg.1 new file mode 100644 index 00000000..4dfce000 --- /dev/null +++ b/windows_libs/jpeg-6a/cjpeg.1 @@ -0,0 +1,282 @@ +.TH CJPEG 1 "15 June 1995" +.SH NAME +cjpeg \- compress an image file to a JPEG file +.SH SYNOPSIS +.B cjpeg +[ +.I options +] +[ +.I filename +] +.LP +.SH DESCRIPTION +.LP +.B cjpeg +compresses the named image file, or the standard input if no file is +named, and produces a JPEG/JFIF file on the standard output. +The currently supported input file formats are: PPM (PBMPLUS color +format), PGM (PBMPLUS gray-scale format), BMP, GIF, Targa, and RLE (Utah Raster +Toolkit format). (RLE is supported only if the URT library is available.) +.SH OPTIONS +All switch names may be abbreviated; for example, +.B \-grayscale +may be written +.B \-gray +or +.BR \-gr . +Most of the "basic" switches can be abbreviated to as little as one letter. +Upper and lower case are equivalent (thus +.B \-GIF +is the same as +.BR \-gif ). +British spellings are also accepted (e.g., +.BR \-greyscale ), +though for brevity these are not mentioned below. +.PP +The basic switches are: +.TP +.BI \-quality " N" +Scale quantization tables to adjust image quality. Quality is 0 (worst) to +100 (best); default is 75. (See below for more info.) +.TP +.B \-grayscale +Create monochrome JPEG file from color input. Be sure to use this switch when +compressing a grayscale GIF file, because +.B cjpeg +isn't bright enough to notice whether a GIF file uses only shades of gray. +By saying +.BR \-grayscale , +you'll get a smaller JPEG file that takes less time to process. +.TP +.B \-optimize +Perform optimization of entropy encoding parameters. Without this, default +encoding parameters are used. +.B \-optimize +usually makes the JPEG file a little smaller, but +.B cjpeg +runs somewhat slower and needs much more memory. Image quality and speed of +decompression are unaffected by +.BR \-optimize . +.TP +.B \-progressive +Create progressive JPEG file (see below). +.TP +.B \-targa +Input file is Targa format. Targa files that contain an "identification" +field will not be automatically recognized by +.BR cjpeg ; +for such files you must specify +.B \-targa +to make +.B cjpeg +treat the input as Targa format. +For most Targa files, you won't need this switch. +.PP +The +.B \-quality +switch lets you trade off compressed file size against quality of the +reconstructed image: the higher the quality setting, the larger the JPEG file, +and the closer the output image will be to the original input. Normally you +want to use the lowest quality setting (smallest file) that decompresses into +something visually indistinguishable from the original image. For this +purpose the quality setting should be between 50 and 95; the default of 75 is +often about right. If you see defects at +.B \-quality +75, then go up 5 or 10 counts at a time until you are happy with the output +image. (The optimal setting will vary from one image to another.) +.PP +.B \-quality +100 will generate a quantization table of all 1's, minimizing loss in the +quantization step (but there is still information loss in subsampling, as well +as roundoff error). This setting is mainly of interest for experimental +purposes. Quality values above about 95 are +.B not +recommended for normal use; the compressed file size goes up dramatically for +hardly any gain in output image quality. +.PP +In the other direction, quality values below 50 will produce very small files +of low image quality. Settings around 5 to 10 might be useful in preparing an +index of a large image library, for example. Try +.B \-quality +2 (or so) for some amusing Cubist effects. (Note: quality +values below about 25 generate 2-byte quantization tables, which are +considered optional in the JPEG standard. +.B cjpeg +emits a warning message when you give such a quality value, because some +other JPEG programs may be unable to decode the resulting file. Use +.B \-baseline +if you need to ensure compatibility at low quality values.) +.PP +The +.B \-progressive +switch creates a "progressive JPEG" file. In this type of JPEG file, the data +is stored in multiple scans of increasing quality. If the file is being +transmitted over a slow communications link, the decoder can use the first +scan to display a low-quality image very quickly, and can then improve the +display with each subsequent scan. The final image is exactly equivalent to a +standard JPEG file of the same quality setting, and the total file size is +about the same --- often a little smaller. +.B Caution: +progressive JPEG is not yet widely implemented, so many decoders will be +unable to view a progressive JPEG file at all. +.PP +Switches for advanced users: +.TP +.B \-dct int +Use integer DCT method (default). +.TP +.B \-dct fast +Use fast integer DCT (less accurate). +.TP +.B \-dct float +Use floating-point DCT method. +The float method is very slightly more accurate than the int method, but is +much slower unless your machine has very fast floating-point hardware. Also +note that results of the floating-point method may vary slightly across +machines, while the integer methods should give the same results everywhere. +The fast integer method is much less accurate than the other two. +.TP +.BI \-restart " N" +Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is +attached to the number. +.B \-restart 0 +(the default) means no restart markers. +.TP +.BI \-smooth " N" +Smooth the input image to eliminate dithering noise. N, ranging from 1 to +100, indicates the strength of smoothing. 0 (the default) means no smoothing. +.TP +.BI \-maxmemory " N" +Set limit for amount of memory to use in processing large images. Value is +in thousands of bytes, or millions of bytes if "M" is attached to the +number. For example, +.B \-max 4m +selects 4000000 bytes. If more space is needed, temporary files will be used. +.TP +.BI \-outfile " name" +Send output image to the named file, not to standard output. +.TP +.B \-verbose +Enable debug printout. More +.BR \-v 's +give more output. Also, version information is printed at startup. +.TP +.B \-debug +Same as +.BR \-verbose . +.PP +The +.B \-restart +option inserts extra markers that allow a JPEG decoder to resynchronize after +a transmission error. Without restart markers, any damage to a compressed +file will usually ruin the image from the point of the error to the end of the +image; with restart markers, the damage is usually confined to the portion of +the image up to the next restart marker. Of course, the restart markers +occupy extra space. We recommend +.B \-restart 1 +for images that will be transmitted across unreliable networks such as Usenet. +.PP +The +.B \-smooth +option filters the input to eliminate fine-scale noise. This is often useful +when converting GIF files to JPEG: a moderate smoothing factor of 10 to 50 +gets rid of dithering patterns in the input file, resulting in a smaller JPEG +file and a better-looking image. Too large a smoothing factor will visibly +blur the image, however. +.PP +Switches for wizards: +.TP +.B \-baseline +Force a baseline JPEG file to be generated. This clamps quantization values +to 8 bits even at low quality settings. +.TP +.BI \-qtables " file" +Use the quantization tables given in the specified text file. +.TP +.BI \-qslots " N[,...]" +Select which quantization table to use for each color component. +.TP +.BI \-sample " HxV[,...]" +Set JPEG sampling factors for each color component. +.TP +.BI \-scans " file" +Use the scan script given in the specified text file. +.PP +The "wizard" switches are intended for experimentation with JPEG. If you +don't know what you are doing, \fBdon't use them\fR. These switches are +documented further in the file wizard.doc. +.SH EXAMPLES +.LP +This example compresses the PPM file foo.ppm with a quality factor of +60 and saves the output as foo.jpg: +.IP +.B cjpeg \-quality +.I 60 foo.ppm +.B > +.I foo.jpg +.SH HINTS +Color GIF files are not the ideal input for JPEG; JPEG is really intended for +compressing full-color (24-bit) images. In particular, don't try to convert +cartoons, line drawings, and other images that have only a few distinct +colors. GIF works great on these, JPEG does not. If you want to convert a +GIF to JPEG, you should experiment with +.BR cjpeg 's +.B \-quality +and +.B \-smooth +options to get a satisfactory conversion. +.B \-smooth 10 +or so is often helpful. +.PP +Avoid running an image through a series of JPEG compression/decompression +cycles. Image quality loss will accumulate; after ten or so cycles the image +may be noticeably worse than it was after one cycle. It's best to use a +lossless format while manipulating an image, then convert to JPEG format when +you are ready to file the image away. +.PP +The +.B \-optimize +option to +.B cjpeg +is worth using when you are making a "final" version for posting or archiving. +It's also a win when you are using low quality settings to make very small +JPEG files; the percentage improvement is often a lot more than it is on +larger files. (At present, +.B \-optimize +mode is always selected when generating progressive JPEG files.) +.SH ENVIRONMENT +.TP +.B JPEGMEM +If this environment variable is set, its value is the default memory limit. +The value is specified as described for the +.B \-maxmemory +switch. +.B JPEGMEM +overrides the default value specified when the program was compiled, and +itself is overridden by an explicit +.BR \-maxmemory . +.SH SEE ALSO +.BR djpeg (1), +.BR jpegtran (1), +.BR rdjpgcom (1), +.BR wrjpgcom (1) +.br +.BR ppm (5), +.BR pgm (5) +.br +Wallace, Gregory K. "The JPEG Still Picture Compression Standard", +Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. +.SH AUTHOR +Independent JPEG Group +.SH BUGS +Arithmetic coding is not supported for legal reasons. +.PP +Not all variants of BMP and Targa file formats are supported. +.PP +The +.B \-targa +switch is not a bug, it's a feature. (It would be a bug if the Targa format +designers had not been clueless.) +.PP +Still not as fast as we'd like. diff --git a/windows_libs/jpeg-6a/cjpeg.c b/windows_libs/jpeg-6a/cjpeg.c new file mode 100644 index 00000000..194d93bd --- /dev/null +++ b/windows_libs/jpeg-6a/cjpeg.c @@ -0,0 +1,606 @@ +/* + * cjpeg.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a command-line user interface for the JPEG compressor. + * It should work on any system with Unix- or MS-DOS-style command lines. + * + * Two different command line styles are permitted, depending on the + * compile-time switch TWO_FILE_COMMANDLINE: + * cjpeg [options] inputfile outputfile + * cjpeg [options] [inputfile] + * In the second style, output is always to standard output, which you'd + * normally redirect to a file or pipe to some other program. Input is + * either from a named file or from standard input (typically redirected). + * The second style is convenient on Unix but is unhelpful on systems that + * don't support pipes. Also, you MUST use the first style if your system + * doesn't do binary I/O to stdin/stdout. + * To simplify script writing, the "-outfile" switch is provided. The syntax + * cjpeg [options] -outfile outputfile inputfile + * works regardless of which command line style is used. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ +#include "jversion.h" /* for version message */ + +#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ +#ifdef __MWERKS__ +#include /* Metrowerks needs this */ +#include /* ... and this */ +#endif +#ifdef THINK_C +#include /* Think declares it here */ +#endif +#endif + + +/* Create the add-on message string table. */ + +#define JMESSAGE(code,string) string , + +static const char * const cdjpeg_message_table[] = { +#include "cderror.h" + NULL +}; + + +/* + * This routine determines what format the input file is, + * and selects the appropriate input-reading module. + * + * To determine which family of input formats the file belongs to, + * we may look only at the first byte of the file, since C does not + * guarantee that more than one character can be pushed back with ungetc. + * Looking at additional bytes would require one of these approaches: + * 1) assume we can fseek() the input file (fails for piped input); + * 2) assume we can push back more than one character (works in + * some C implementations, but unportable); + * 3) provide our own buffering (breaks input readers that want to use + * stdio directly, such as the RLE library); + * or 4) don't put back the data, and modify the input_init methods to assume + * they start reading after the start of file (also breaks RLE library). + * #1 is attractive for MS-DOS but is untenable on Unix. + * + * The most portable solution for file types that can't be identified by their + * first byte is to make the user tell us what they are. This is also the + * only approach for "raw" file types that contain only arbitrary values. + * We presently apply this method for Targa files. Most of the time Targa + * files start with 0x00, so we recognize that case. Potentially, however, + * a Targa file could start with any byte value (byte 0 is the length of the + * seldom-used ID field), so we provide a switch to force Targa input mode. + */ + +static boolean is_targa; /* records user -targa switch */ + + +LOCAL(cjpeg_source_ptr) +select_file_type (j_compress_ptr cinfo, FILE * infile) +{ + int c; + + if (is_targa) { +#ifdef TARGA_SUPPORTED + return jinit_read_targa(cinfo); +#else + ERREXIT(cinfo, JERR_TGA_NOTCOMP); +#endif + } + + if ((c = getc(infile)) == EOF) + ERREXIT(cinfo, JERR_INPUT_EMPTY); + if (ungetc(c, infile) == EOF) + ERREXIT(cinfo, JERR_UNGETC_FAILED); + + switch (c) { +#ifdef BMP_SUPPORTED + case 'B': + return jinit_read_bmp(cinfo); +#endif +#ifdef GIF_SUPPORTED + case 'G': + return jinit_read_gif(cinfo); +#endif +#ifdef PPM_SUPPORTED + case 'P': + return jinit_read_ppm(cinfo); +#endif +#ifdef RLE_SUPPORTED + case 'R': + return jinit_read_rle(cinfo); +#endif +#ifdef TARGA_SUPPORTED + case 0x00: + return jinit_read_targa(cinfo); +#endif + default: + ERREXIT(cinfo, JERR_UNKNOWN_FORMAT); + break; + } + + return NULL; /* suppress compiler warnings */ +} + + +/* + * Argument-parsing code. + * The switch parser is designed to be useful with DOS-style command line + * syntax, ie, intermixed switches and file names, where only the switches + * to the left of a given file name affect processing of that file. + * The main program in this file doesn't actually use this capability... + */ + + +static const char * progname; /* program name for error messages */ +static char * outfilename; /* for -outfile switch */ + + +LOCAL(void) +usage (void) +/* complain about bad command line */ +{ + fprintf(stderr, "usage: %s [switches] ", progname); +#ifdef TWO_FILE_COMMANDLINE + fprintf(stderr, "inputfile outputfile\n"); +#else + fprintf(stderr, "[inputfile]\n"); +#endif + + fprintf(stderr, "Switches (names may be abbreviated):\n"); + fprintf(stderr, " -quality N Compression quality (0..100; 5-95 is useful range)\n"); + fprintf(stderr, " -grayscale Create monochrome JPEG file\n"); +#ifdef ENTROPY_OPT_SUPPORTED + fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n"); +#endif +#ifdef C_PROGRESSIVE_SUPPORTED + fprintf(stderr, " -progressive Create progressive JPEG file\n"); +#endif +#ifdef TARGA_SUPPORTED + fprintf(stderr, " -targa Input file is Targa format (usually not needed)\n"); +#endif + fprintf(stderr, "Switches for advanced users:\n"); +#ifdef DCT_ISLOW_SUPPORTED + fprintf(stderr, " -dct int Use integer DCT method%s\n", + (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : "")); +#endif +#ifdef DCT_IFAST_SUPPORTED + fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n", + (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : "")); +#endif +#ifdef DCT_FLOAT_SUPPORTED + fprintf(stderr, " -dct float Use floating-point DCT method%s\n", + (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : "")); +#endif + fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n"); +#ifdef INPUT_SMOOTHING_SUPPORTED + fprintf(stderr, " -smooth N Smooth dithered input (N=1..100 is strength)\n"); +#endif + fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); + fprintf(stderr, " -outfile name Specify name for output file\n"); + fprintf(stderr, " -verbose or -debug Emit debug output\n"); + fprintf(stderr, "Switches for wizards:\n"); +#ifdef C_ARITH_CODING_SUPPORTED + fprintf(stderr, " -arithmetic Use arithmetic coding\n"); +#endif + fprintf(stderr, " -baseline Force baseline output\n"); + fprintf(stderr, " -qtables file Use quantization tables given in file\n"); + fprintf(stderr, " -qslots N[,...] Set component quantization tables\n"); + fprintf(stderr, " -sample HxV[,...] Set component sampling factors\n"); +#ifdef C_MULTISCAN_FILES_SUPPORTED + fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n"); +#endif + exit(EXIT_FAILURE); +} + + +LOCAL(int) +parse_switches (j_compress_ptr cinfo, int argc, char **argv, + int last_file_arg_seen, boolean for_real) +/* Parse optional switches. + * Returns argv[] index of first file-name argument (== argc if none). + * Any file names with indexes <= last_file_arg_seen are ignored; + * they have presumably been processed in a previous iteration. + * (Pass 0 for last_file_arg_seen on the first or only iteration.) + * for_real is FALSE on the first (dummy) pass; we may skip any expensive + * processing. + */ +{ + int argn; + char * arg; + int quality; /* -quality parameter */ + int q_scale_factor; /* scaling percentage for -qtables */ + boolean force_baseline; + boolean simple_progressive; + char * qtablefile = NULL; /* saves -qtables filename if any */ + char * qslotsarg = NULL; /* saves -qslots parm if any */ + char * samplearg = NULL; /* saves -sample parm if any */ + char * scansarg = NULL; /* saves -scans parm if any */ + + /* Set up default JPEG parameters. */ + /* Note that default -quality level need not, and does not, + * match the default scaling for an explicit -qtables argument. + */ + quality = 75; /* default -quality value */ + q_scale_factor = 100; /* default to no scaling for -qtables */ + force_baseline = FALSE; /* by default, allow 16-bit quantizers */ + simple_progressive = FALSE; + is_targa = FALSE; + outfilename = NULL; + cinfo->err->trace_level = 0; + + /* Scan command line options, adjust parameters */ + + for (argn = 1; argn < argc; argn++) { + arg = argv[argn]; + if (*arg != '-') { + /* Not a switch, must be a file name argument */ + if (argn <= last_file_arg_seen) { + outfilename = NULL; /* -outfile applies to just one input file */ + continue; /* ignore this name if previously processed */ + } + break; /* else done parsing switches */ + } + arg++; /* advance past switch marker character */ + + if (keymatch(arg, "arithmetic", 1)) { + /* Use arithmetic coding. */ +#ifdef C_ARITH_CODING_SUPPORTED + cinfo->arith_code = TRUE; +#else + fprintf(stderr, "%s: sorry, arithmetic coding not supported\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "baseline", 1)) { + /* Force baseline output (8-bit quantizer values). */ + force_baseline = TRUE; + + } else if (keymatch(arg, "dct", 2)) { + /* Select DCT algorithm. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (keymatch(argv[argn], "int", 1)) { + cinfo->dct_method = JDCT_ISLOW; + } else if (keymatch(argv[argn], "fast", 2)) { + cinfo->dct_method = JDCT_IFAST; + } else if (keymatch(argv[argn], "float", 2)) { + cinfo->dct_method = JDCT_FLOAT; + } else + usage(); + + } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { + /* Enable debug printouts. */ + /* On first -d, print version identification */ + static boolean printed_version = FALSE; + + if (! printed_version) { + fprintf(stderr, "Independent JPEG Group's CJPEG, version %s\n%s\n", + JVERSION, JCOPYRIGHT); + printed_version = TRUE; + } + cinfo->err->trace_level++; + + } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) { + /* Force a monochrome JPEG file to be generated. */ + jpeg_set_colorspace(cinfo, JCS_GRAYSCALE); + + } else if (keymatch(arg, "maxmemory", 3)) { + /* Maximum memory in Kb (or Mb with 'm'). */ + long lval; + char ch = 'x'; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) + usage(); + if (ch == 'm' || ch == 'M') + lval *= 1000L; + cinfo->mem->max_memory_to_use = lval * 1000L; + + } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) { + /* Enable entropy parm optimization. */ +#ifdef ENTROPY_OPT_SUPPORTED + cinfo->optimize_coding = TRUE; +#else + fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "outfile", 4)) { + /* Set output file name. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + outfilename = argv[argn]; /* save it away for later use */ + + } else if (keymatch(arg, "progressive", 1)) { + /* Select simple progressive mode. */ +#ifdef C_PROGRESSIVE_SUPPORTED + simple_progressive = TRUE; + /* We must postpone execution until num_components is known. */ +#else + fprintf(stderr, "%s: sorry, progressive output was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "quality", 1)) { + /* Quality factor (quantization table scaling factor). */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%d", &quality) != 1) + usage(); + /* Change scale factor in case -qtables is present. */ + q_scale_factor = jpeg_quality_scaling(quality); + + } else if (keymatch(arg, "qslots", 2)) { + /* Quantization table slot numbers. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + qslotsarg = argv[argn]; + /* Must delay setting qslots until after we have processed any + * colorspace-determining switches, since jpeg_set_colorspace sets + * default quant table numbers. + */ + + } else if (keymatch(arg, "qtables", 2)) { + /* Quantization tables fetched from file. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + qtablefile = argv[argn]; + /* We postpone actually reading the file in case -quality comes later. */ + + } else if (keymatch(arg, "restart", 1)) { + /* Restart interval in MCU rows (or in MCUs with 'b'). */ + long lval; + char ch = 'x'; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) + usage(); + if (lval < 0 || lval > 65535L) + usage(); + if (ch == 'b' || ch == 'B') { + cinfo->restart_interval = (unsigned int) lval; + cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */ + } else { + cinfo->restart_in_rows = (int) lval; + /* restart_interval will be computed during startup */ + } + + } else if (keymatch(arg, "sample", 2)) { + /* Set sampling factors. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + samplearg = argv[argn]; + /* Must delay setting sample factors until after we have processed any + * colorspace-determining switches, since jpeg_set_colorspace sets + * default sampling factors. + */ + + } else if (keymatch(arg, "scans", 2)) { + /* Set scan script. */ +#ifdef C_MULTISCAN_FILES_SUPPORTED + if (++argn >= argc) /* advance to next argument */ + usage(); + scansarg = argv[argn]; + /* We must postpone reading the file in case -progressive appears. */ +#else + fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "smooth", 2)) { + /* Set input smoothing factor. */ + int val; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%d", &val) != 1) + usage(); + if (val < 0 || val > 100) + usage(); + cinfo->smoothing_factor = val; + + } else if (keymatch(arg, "targa", 1)) { + /* Input file is Targa format. */ + is_targa = TRUE; + + } else { + usage(); /* bogus switch */ + } + } + + /* Post-switch-scanning cleanup */ + + if (for_real) { + + /* Set quantization tables for selected quality. */ + /* Some or all may be overridden if -qtables is present. */ + jpeg_set_quality(cinfo, quality, force_baseline); + + if (qtablefile != NULL) /* process -qtables if it was present */ + if (! read_quant_tables(cinfo, qtablefile, + q_scale_factor, force_baseline)) + usage(); + + if (qslotsarg != NULL) /* process -qslots if it was present */ + if (! set_quant_slots(cinfo, qslotsarg)) + usage(); + + if (samplearg != NULL) /* process -sample if it was present */ + if (! set_sample_factors(cinfo, samplearg)) + usage(); + +#ifdef C_PROGRESSIVE_SUPPORTED + if (simple_progressive) /* process -progressive; -scans can override */ + jpeg_simple_progression(cinfo); +#endif + +#ifdef C_MULTISCAN_FILES_SUPPORTED + if (scansarg != NULL) /* process -scans if it was present */ + if (! read_scan_script(cinfo, scansarg)) + usage(); +#endif + } + + return argn; /* return index of next arg (file name) */ +} + + +/* + * The main program. + */ + +int +main (int argc, char **argv) +{ + struct jpeg_compress_struct cinfo; + struct jpeg_error_mgr jerr; +#ifdef PROGRESS_REPORT + struct cdjpeg_progress_mgr progress; +#endif + int file_index; + cjpeg_source_ptr src_mgr; + FILE * input_file; + FILE * output_file; + JDIMENSION num_scanlines; + + /* On Mac, fetch a command line. */ +#ifdef USE_CCOMMAND + argc = ccommand(&argv); +#endif + + progname = argv[0]; + if (progname == NULL || progname[0] == 0) + progname = "cjpeg"; /* in case C library doesn't provide it */ + + /* Initialize the JPEG compression object with default error handling. */ + cinfo.err = jpeg_std_error(&jerr); + jpeg_create_compress(&cinfo); + /* Add some application-specific error messages (from cderror.h) */ + jerr.addon_message_table = cdjpeg_message_table; + jerr.first_addon_message = JMSG_FIRSTADDONCODE; + jerr.last_addon_message = JMSG_LASTADDONCODE; + + /* Now safe to enable signal catcher. */ +#ifdef NEED_SIGNAL_CATCHER + enable_signal_catcher((j_common_ptr) &cinfo); +#endif + + /* Initialize JPEG parameters. + * Much of this may be overridden later. + * In particular, we don't yet know the input file's color space, + * but we need to provide some value for jpeg_set_defaults() to work. + */ + + cinfo.in_color_space = JCS_RGB; /* arbitrary guess */ + jpeg_set_defaults(&cinfo); + + /* Scan command line to find file names. + * It is convenient to use just one switch-parsing routine, but the switch + * values read here are ignored; we will rescan the switches after opening + * the input file. + */ + + file_index = parse_switches(&cinfo, argc, argv, 0, FALSE); + +#ifdef TWO_FILE_COMMANDLINE + /* Must have either -outfile switch or explicit output file name */ + if (outfilename == NULL) { + if (file_index != argc-2) { + fprintf(stderr, "%s: must name one input and one output file\n", + progname); + usage(); + } + outfilename = argv[file_index+1]; + } else { + if (file_index != argc-1) { + fprintf(stderr, "%s: must name one input and one output file\n", + progname); + usage(); + } + } +#else + /* Unix style: expect zero or one file name */ + if (file_index < argc-1) { + fprintf(stderr, "%s: only one input file\n", progname); + usage(); + } +#endif /* TWO_FILE_COMMANDLINE */ + + /* Open the input file. */ + if (file_index < argc) { + if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]); + exit(EXIT_FAILURE); + } + } else { + /* default input file is stdin */ + input_file = read_stdin(); + } + + /* Open the output file. */ + if (outfilename != NULL) { + if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, outfilename); + exit(EXIT_FAILURE); + } + } else { + /* default output file is stdout */ + output_file = write_stdout(); + } + +#ifdef PROGRESS_REPORT + start_progress_monitor((j_common_ptr) &cinfo, &progress); +#endif + + /* Figure out the input file format, and set up to read it. */ + src_mgr = select_file_type(&cinfo, input_file); + src_mgr->input_file = input_file; + + /* Read the input file header to obtain file size & colorspace. */ + (*src_mgr->start_input) (&cinfo, src_mgr); + + /* Now that we know input colorspace, fix colorspace-dependent defaults */ + jpeg_default_colorspace(&cinfo); + + /* Adjust default compression parameters by re-parsing the options */ + file_index = parse_switches(&cinfo, argc, argv, 0, TRUE); + + /* Specify data destination for compression */ + jpeg_stdio_dest(&cinfo, output_file); + + /* Start compressor */ + jpeg_start_compress(&cinfo, TRUE); + + /* Process data */ + while (cinfo.next_scanline < cinfo.image_height) { + num_scanlines = (*src_mgr->get_pixel_rows) (&cinfo, src_mgr); + (void) jpeg_write_scanlines(&cinfo, src_mgr->buffer, num_scanlines); + } + + /* Finish compression and release memory */ + (*src_mgr->finish_input) (&cinfo, src_mgr); + jpeg_finish_compress(&cinfo); + jpeg_destroy_compress(&cinfo); + + /* Close files, if we opened them */ + if (input_file != stdin) + fclose(input_file); + if (output_file != stdout) + fclose(output_file); + +#ifdef PROGRESS_REPORT + end_progress_monitor((j_common_ptr) &cinfo); +#endif + + /* All done. */ + exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS); + return 0; /* suppress no-return-value warnings */ +} diff --git a/windows_libs/jpeg-6a/ckconfig.c b/windows_libs/jpeg-6a/ckconfig.c new file mode 100644 index 00000000..34baf795 --- /dev/null +++ b/windows_libs/jpeg-6a/ckconfig.c @@ -0,0 +1,402 @@ +/* + * ckconfig.c + * + * Copyright (C) 1991-1994, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + */ + +/* + * This program is intended to help you determine how to configure the JPEG + * software for installation on a particular system. The idea is to try to + * compile and execute this program. If your compiler fails to compile the + * program, make changes as indicated in the comments below. Once you can + * compile the program, run it, and it will produce a "jconfig.h" file for + * your system. + * + * As a general rule, each time you try to compile this program, + * pay attention only to the *first* error message you get from the compiler. + * Many C compilers will issue lots of spurious error messages once they + * have gotten confused. Go to the line indicated in the first error message, + * and read the comments preceding that line to see what to change. + * + * Almost all of the edits you may need to make to this program consist of + * changing a line that reads "#define SOME_SYMBOL" to "#undef SOME_SYMBOL", + * or vice versa. This is called defining or undefining that symbol. + */ + + +/* First we must see if your system has the include files we need. + * We start out with the assumption that your system has all the ANSI-standard + * include files. If you get any error trying to include one of these files, + * undefine the corresponding HAVE_xxx symbol. + */ + +#define HAVE_STDDEF_H /* replace 'define' by 'undef' if error here */ +#ifdef HAVE_STDDEF_H /* next line will be skipped if you undef... */ +#include +#endif + +#define HAVE_STDLIB_H /* same thing for stdlib.h */ +#ifdef HAVE_STDLIB_H +#include +#endif + +#include /* If you ain't got this, you ain't got C. */ + +/* We have to see if your string functions are defined by + * strings.h (old BSD convention) or string.h (everybody else). + * We try the non-BSD convention first; define NEED_BSD_STRINGS + * if the compiler says it can't find string.h. + */ + +#undef NEED_BSD_STRINGS + +#ifdef NEED_BSD_STRINGS +#include +#else +#include +#endif + +/* On some systems (especially older Unix machines), type size_t is + * defined only in the include file . If you get a failure + * on the size_t test below, try defining NEED_SYS_TYPES_H. + */ + +#undef NEED_SYS_TYPES_H /* start by assuming we don't need it */ +#ifdef NEED_SYS_TYPES_H +#include +#endif + + +/* Usually type size_t is defined in one of the include files we've included + * above. If not, you'll get an error on the "typedef size_t my_size_t;" line. + * In that case, first try defining NEED_SYS_TYPES_H just above. + * If that doesn't work, you'll have to search through your system library + * to figure out which include file defines "size_t". Look for a line that + * says "typedef something-or-other size_t;". Then, change the line below + * that says "#include " to instead include the file + * you found size_t in, and define NEED_SPECIAL_INCLUDE. If you can't find + * type size_t anywhere, try replacing "#include " with + * "typedef unsigned int size_t;". + */ + +#undef NEED_SPECIAL_INCLUDE /* assume we DON'T need it, for starters */ + +#ifdef NEED_SPECIAL_INCLUDE +#include +#endif + +typedef size_t my_size_t; /* The payoff: do we have size_t now? */ + + +/* The next question is whether your compiler supports ANSI-style function + * prototypes. You need to know this in order to choose between using + * makefile.ansi and using makefile.unix. + * The #define line below is set to assume you have ANSI function prototypes. + * If you get an error in this group of lines, undefine HAVE_PROTOTYPES. + */ + +#define HAVE_PROTOTYPES + +#ifdef HAVE_PROTOTYPES +int testfunction (int arg1, int * arg2); /* check prototypes */ + +struct methods_struct { /* check method-pointer declarations */ + int (*error_exit) (char *msgtext); + int (*trace_message) (char *msgtext); + int (*another_method) (void); +}; + +int testfunction (int arg1, int * arg2) /* check definitions */ +{ + return arg2[arg1]; +} + +int test2function (void) /* check void arg list */ +{ + return 0; +} +#endif + + +/* Now we want to find out if your compiler knows what "unsigned char" means. + * If you get an error on the "unsigned char un_char;" line, + * then undefine HAVE_UNSIGNED_CHAR. + */ + +#define HAVE_UNSIGNED_CHAR + +#ifdef HAVE_UNSIGNED_CHAR +unsigned char un_char; +#endif + + +/* Now we want to find out if your compiler knows what "unsigned short" means. + * If you get an error on the "unsigned short un_short;" line, + * then undefine HAVE_UNSIGNED_SHORT. + */ + +#define HAVE_UNSIGNED_SHORT + +#ifdef HAVE_UNSIGNED_SHORT +unsigned short un_short; +#endif + + +/* Now we want to find out if your compiler understands type "void". + * If you get an error anywhere in here, undefine HAVE_VOID. + */ + +#define HAVE_VOID + +#ifdef HAVE_VOID +/* Caution: a C++ compiler will insist on complete prototypes */ +typedef void * void_ptr; /* check void * */ +#ifdef HAVE_PROTOTYPES /* check ptr to function returning void */ +typedef void (*void_func) (int a, int b); +#else +typedef void (*void_func) (); +#endif + +#ifdef HAVE_PROTOTYPES /* check void function result */ +void test3function (void_ptr arg1, void_func arg2) +#else +void test3function (arg1, arg2) + void_ptr arg1; + void_func arg2; +#endif +{ + char * locptr = (char *) arg1; /* check casting to and from void * */ + arg1 = (void *) locptr; + (*arg2) (1, 2); /* check call of fcn returning void */ +} +#endif + + +/* Now we want to find out if your compiler knows what "const" means. + * If you get an error here, undefine HAVE_CONST. + */ + +#define HAVE_CONST + +#ifdef HAVE_CONST +static const int carray[3] = {1, 2, 3}; + +#ifdef HAVE_PROTOTYPES +int test4function (const int arg1) +#else +int test4function (arg1) + const int arg1; +#endif +{ + return carray[arg1]; +} +#endif + + +/* If you get an error or warning about this structure definition, + * define INCOMPLETE_TYPES_BROKEN. + */ + +#undef INCOMPLETE_TYPES_BROKEN + +#ifndef INCOMPLETE_TYPES_BROKEN +typedef struct undefined_structure * undef_struct_ptr; +#endif + + +/* If you get an error about duplicate names, + * define NEED_SHORT_EXTERNAL_NAMES. + */ + +#undef NEED_SHORT_EXTERNAL_NAMES + +#ifndef NEED_SHORT_EXTERNAL_NAMES + +int possibly_duplicate_function () +{ + return 0; +} + +int possibly_dupli_function () +{ + return 1; +} + +#endif + + + +/************************************************************************ + * OK, that's it. You should not have to change anything beyond this + * point in order to compile and execute this program. (You might get + * some warnings, but you can ignore them.) + * When you run the program, it will make a couple more tests that it + * can do automatically, and then it will create jconfig.h and print out + * any additional suggestions it has. + ************************************************************************ + */ + + +#ifdef HAVE_PROTOTYPES +int is_char_signed (int arg) +#else +int is_char_signed (arg) + int arg; +#endif +{ + if (arg == 189) { /* expected result for unsigned char */ + return 0; /* type char is unsigned */ + } + else if (arg != -67) { /* expected result for signed char */ + printf("Hmm, it seems 'char' is not eight bits wide on your machine.\n"); + printf("I fear the JPEG software will not work at all.\n\n"); + } + return 1; /* assume char is signed otherwise */ +} + + +#ifdef HAVE_PROTOTYPES +int is_shifting_signed (long arg) +#else +int is_shifting_signed (arg) + long arg; +#endif +/* See whether right-shift on a long is signed or not. */ +{ + long res = arg >> 4; + + if (res == -0x7F7E80CL) { /* expected result for signed shift */ + return 1; /* right shift is signed */ + } + /* see if unsigned-shift hack will fix it. */ + /* we can't just test exact value since it depends on width of long... */ + res |= (~0L) << (32-4); + if (res == -0x7F7E80CL) { /* expected result now? */ + return 0; /* right shift is unsigned */ + } + printf("Right shift isn't acting as I expect it to.\n"); + printf("I fear the JPEG software will not work at all.\n\n"); + return 0; /* try it with unsigned anyway */ +} + + +#ifdef HAVE_PROTOTYPES +int main (int argc, char ** argv) +#else +int main (argc, argv) + int argc; + char ** argv; +#endif +{ + char signed_char_check = (char) (-67); + FILE *outfile; + + /* Attempt to write jconfig.h */ + if ((outfile = fopen("jconfig.h", "w")) == NULL) { + printf("Failed to write jconfig.h\n"); + return 1; + } + + /* Write out all the info */ + fprintf(outfile, "/* jconfig.h --- generated by ckconfig.c */\n"); + fprintf(outfile, "/* see jconfig.doc for explanations */\n\n"); +#ifdef HAVE_PROTOTYPES + fprintf(outfile, "#define HAVE_PROTOTYPES\n"); +#else + fprintf(outfile, "#undef HAVE_PROTOTYPES\n"); +#endif +#ifdef HAVE_UNSIGNED_CHAR + fprintf(outfile, "#define HAVE_UNSIGNED_CHAR\n"); +#else + fprintf(outfile, "#undef HAVE_UNSIGNED_CHAR\n"); +#endif +#ifdef HAVE_UNSIGNED_SHORT + fprintf(outfile, "#define HAVE_UNSIGNED_SHORT\n"); +#else + fprintf(outfile, "#undef HAVE_UNSIGNED_SHORT\n"); +#endif +#ifdef HAVE_VOID + fprintf(outfile, "/* #define void char */\n"); +#else + fprintf(outfile, "#define void char\n"); +#endif +#ifdef HAVE_CONST + fprintf(outfile, "/* #define const */\n"); +#else + fprintf(outfile, "#define const\n"); +#endif + if (is_char_signed((int) signed_char_check)) + fprintf(outfile, "#undef CHAR_IS_UNSIGNED\n"); + else + fprintf(outfile, "#define CHAR_IS_UNSIGNED\n"); +#ifdef HAVE_STDDEF_H + fprintf(outfile, "#define HAVE_STDDEF_H\n"); +#else + fprintf(outfile, "#undef HAVE_STDDEF_H\n"); +#endif +#ifdef HAVE_STDLIB_H + fprintf(outfile, "#define HAVE_STDLIB_H\n"); +#else + fprintf(outfile, "#undef HAVE_STDLIB_H\n"); +#endif +#ifdef NEED_BSD_STRINGS + fprintf(outfile, "#define NEED_BSD_STRINGS\n"); +#else + fprintf(outfile, "#undef NEED_BSD_STRINGS\n"); +#endif +#ifdef NEED_SYS_TYPES_H + fprintf(outfile, "#define NEED_SYS_TYPES_H\n"); +#else + fprintf(outfile, "#undef NEED_SYS_TYPES_H\n"); +#endif + fprintf(outfile, "#undef NEED_FAR_POINTERS\n"); +#ifdef NEED_SHORT_EXTERNAL_NAMES + fprintf(outfile, "#define NEED_SHORT_EXTERNAL_NAMES\n"); +#else + fprintf(outfile, "#undef NEED_SHORT_EXTERNAL_NAMES\n"); +#endif +#ifdef INCOMPLETE_TYPES_BROKEN + fprintf(outfile, "#define INCOMPLETE_TYPES_BROKEN\n"); +#else + fprintf(outfile, "#undef INCOMPLETE_TYPES_BROKEN\n"); +#endif + fprintf(outfile, "\n#ifdef JPEG_INTERNALS\n\n"); + if (is_shifting_signed(-0x7F7E80B1L)) + fprintf(outfile, "#undef RIGHT_SHIFT_IS_UNSIGNED\n"); + else + fprintf(outfile, "#define RIGHT_SHIFT_IS_UNSIGNED\n"); + fprintf(outfile, "\n#endif /* JPEG_INTERNALS */\n"); + fprintf(outfile, "\n#ifdef JPEG_CJPEG_DJPEG\n\n"); + fprintf(outfile, "#define BMP_SUPPORTED /* BMP image file format */\n"); + fprintf(outfile, "#define GIF_SUPPORTED /* GIF image file format */\n"); + fprintf(outfile, "#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */\n"); + fprintf(outfile, "#undef RLE_SUPPORTED /* Utah RLE image file format */\n"); + fprintf(outfile, "#define TARGA_SUPPORTED /* Targa image file format */\n\n"); + fprintf(outfile, "#undef TWO_FILE_COMMANDLINE /* You may need this on non-Unix systems */\n"); + fprintf(outfile, "#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */\n"); + fprintf(outfile, "#undef DONT_USE_B_MODE\n"); + fprintf(outfile, "/* #define PROGRESS_REPORT */ /* optional */\n"); + fprintf(outfile, "\n#endif /* JPEG_CJPEG_DJPEG */\n"); + + /* Close the jconfig.h file */ + fclose(outfile); + + /* User report */ + printf("Configuration check for Independent JPEG Group's software done.\n"); + printf("\nI have written the jconfig.h file for you.\n\n"); +#ifdef HAVE_PROTOTYPES + printf("You should use makefile.ansi as the starting point for your Makefile.\n"); +#else + printf("You should use makefile.unix as the starting point for your Makefile.\n"); +#endif + +#ifdef NEED_SPECIAL_INCLUDE + printf("\nYou'll need to change jconfig.h to include the system include file\n"); + printf("that you found type size_t in, or add a direct definition of type\n"); + printf("size_t if that's what you used. Just add it to the end.\n"); +#endif + + return 0; +} diff --git a/windows_libs/jpeg-6a/coderules.doc b/windows_libs/jpeg-6a/coderules.doc new file mode 100644 index 00000000..0ab5d9bd --- /dev/null +++ b/windows_libs/jpeg-6a/coderules.doc @@ -0,0 +1,118 @@ +IJG JPEG LIBRARY: CODING RULES + +Copyright (C) 1991-1996, Thomas G. Lane. +This file is part of the Independent JPEG Group's software. +For conditions of distribution and use, see the accompanying README file. + + +Since numerous people will be contributing code and bug fixes, it's important +to establish a common coding style. The goal of using similar coding styles +is much more important than the details of just what that style is. + +In general we follow the recommendations of "Recommended C Style and Coding +Standards" revision 6.1 (Cannon et al. as modified by Spencer, Keppel and +Brader). This document is available in the IJG FTP archive (see +jpeg/doc/cstyle.ms.tbl.Z, or cstyle.txt.Z for those without nroff/tbl). + +Block comments should be laid out thusly: + +/* + * Block comments in this style. + */ + +We indent statements in K&R style, e.g., + if (test) { + then-part; + } else { + else-part; + } +with two spaces per indentation level. (This indentation convention is +handled automatically by GNU Emacs and many other text editors.) + +Multi-word names should be written in lower case with underscores, e.g., +multi_word_name (not multiWordName). Preprocessor symbols and enum constants +are similar but upper case (MULTI_WORD_NAME). Names should be unique within +the first fifteen characters. (On some older systems, global names must be +unique within six characters. We accommodate this without cluttering the +source code by using macros to substitute shorter names.) + +We use function prototypes everywhere; we rely on automatic source code +transformation to feed prototype-less C compilers. Transformation is done +by the simple and portable tool 'ansi2knr.c' (courtesy of Ghostscript). +ansi2knr is not very bright, so it imposes a format requirement on function +declarations: the function name MUST BEGIN IN COLUMN 1. Thus all functions +should be written in the following style: + +LOCAL(int *) +function_name (int a, char *b) +{ + code... +} + +Note that each function definition must begin with GLOBAL(type), LOCAL(type), +or METHODDEF(type). These macros expand to "static type" or just "type" as +appropriate. They provide a readable indication of the routine's usage and +can readily be changed for special needs. (For instance, special linkage +keywords can be inserted for use in Windows DLLs.) + +ansi2knr does not transform method declarations (function pointers in +structs). We handle these with a macro JMETHOD, defined as + #ifdef HAVE_PROTOTYPES + #define JMETHOD(type,methodname,arglist) type (*methodname) arglist + #else + #define JMETHOD(type,methodname,arglist) type (*methodname) () + #endif +which is used like this: + struct function_pointers { + JMETHOD(void, init_entropy_encoder, (int somearg, jparms *jp)); + JMETHOD(void, term_entropy_encoder, (void)); + }; +Note the set of parentheses surrounding the parameter list. + +A similar solution is used for forward and external function declarations +(see the EXTERN and JPP macros). + +If the code is to work on non-ANSI compilers, we cannot rely on a prototype +declaration to coerce actual parameters into the right types. Therefore, use +explicit casts on actual parameters whenever the actual parameter type is not +identical to the formal parameter. Beware of implicit conversions to "int". + +It seems there are some non-ANSI compilers in which the sizeof() operator +is defined to return int, yet size_t is defined as long. Needless to say, +this is brain-damaged. Always use the SIZEOF() macro in place of sizeof(), +so that the result is guaranteed to be of type size_t. + + +The JPEG library is intended to be used within larger programs. Furthermore, +we want it to be reentrant so that it can be used by applications that process +multiple images concurrently. The following rules support these requirements: + +1. Avoid direct use of file I/O, "malloc", error report printouts, etc; +pass these through the common routines provided. + +2. Minimize global namespace pollution. Functions should be declared static +wherever possible. (Note that our method-based calling conventions help this +a lot: in many modules only the initialization function will ever need to be +called directly, so only that function need be externally visible.) All +global function names should begin with "jpeg_", and should have an +abbreviated name (unique in the first six characters) substituted by macro +when NEED_SHORT_EXTERNAL_NAMES is set. + +3. Don't use global variables; anything that must be used in another module +should be in the common data structures. + +4. Don't use static variables except for read-only constant tables. Variables +that should be private to a module can be placed into private structures (see +the system architecture document, structure.doc). + +5. Source file names should begin with "j" for files that are part of the +library proper; source files that are not part of the library, such as cjpeg.c +and djpeg.c, do not begin with "j". Keep source file names to eight +characters (plus ".c" or ".h", etc) to make life easy for MS-DOSers. Keep +compression and decompression code in separate source files --- some +applications may want only one half of the library. + +Note: these rules (particularly #4) are not followed religiously in the +modules that are used in cjpeg/djpeg but are not part of the JPEG library +proper. Those modules are not really intended to be used in other +applications. diff --git a/windows_libs/jpeg-6a/configure b/windows_libs/jpeg-6a/configure new file mode 100644 index 00000000..146c43a4 --- /dev/null +++ b/windows_libs/jpeg-6a/configure @@ -0,0 +1,1731 @@ +#! /bin/sh + +# Guess values for system-dependent variables and create Makefiles. +# Generated automatically using autoconf version 2.7 +# Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc. +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. + +# Defaults: +ac_help= +ac_default_prefix=/usr/local +# Any additions from configure.in: +ac_help="$ac_help + --enable-maxmem[=N] enable use of temp files, set max mem usage to N MB" +ac_help="$ac_help +" + +# Initialize some variables set by options. +# The variables have the same names as the options, with +# dashes changed to underlines. +build=NONE +cache_file=./config.cache +exec_prefix=NONE +host=NONE +no_create= +nonopt=NONE +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +target=NONE +verbose= +x_includes=NONE +x_libraries=NONE +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +# Initialize some other variables. +subdirs= +MFLAGS= MAKEFLAGS= + +ac_prev= +for ac_option +do + + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + case "$ac_option" in + -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;; + *) ac_optarg= ;; + esac + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case "$ac_option" in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir="$ac_optarg" ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build="$ac_optarg" ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file="$ac_optarg" ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir="$ac_optarg" ;; + + -disable-* | --disable-*) + ac_feature=`echo $ac_option|sed -e 's/-*disable-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + eval "enable_${ac_feature}=no" ;; + + -enable-* | --enable-*) + ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; } + fi + ac_feature=`echo $ac_feature| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "enable_${ac_feature}='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix="$ac_optarg" ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he) + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat << EOF +Usage: configure [options] [host] +Options: [defaults in brackets after descriptions] +Configuration: + --cache-file=FILE cache test results in FILE + --help print this message + --no-create do not create output files + --quiet, --silent do not print \`checking...' messages + --version print the version of autoconf that created configure +Directory and file names: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [same as prefix] + --bindir=DIR user executables in DIR [EPREFIX/bin] + --sbindir=DIR system admin executables in DIR [EPREFIX/sbin] + --libexecdir=DIR program executables in DIR [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data in DIR + [PREFIX/share] + --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data in DIR + [PREFIX/com] + --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var] + --libdir=DIR object code libraries in DIR [EPREFIX/lib] + --includedir=DIR C header files in DIR [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include] + --infodir=DIR info documentation in DIR [PREFIX/info] + --mandir=DIR man documentation in DIR [PREFIX/man] + --srcdir=DIR find the sources in DIR [configure dir or ..] + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM + run sed PROGRAM on installed program names +EOF + cat << EOF +Host type: + --build=BUILD configure for building on BUILD [BUILD=HOST] + --host=HOST configure for HOST [guessed] + --target=TARGET configure for TARGET [TARGET=HOST] +Features and packages: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --x-includes=DIR X include files are in DIR + --x-libraries=DIR X library files are in DIR +EOF + if test -n "$ac_help"; then + echo "--enable and --with options recognized:$ac_help" + fi + exit 0 ;; + + -host | --host | --hos | --ho) + ac_prev=host ;; + -host=* | --host=* | --hos=* | --ho=*) + host="$ac_optarg" ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir="$ac_optarg" ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir="$ac_optarg" ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir="$ac_optarg" ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir="$ac_optarg" ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir="$ac_optarg" ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir="$ac_optarg" ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir="$ac_optarg" ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix="$ac_optarg" ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix="$ac_optarg" ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix="$ac_optarg" ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name="$ac_optarg" ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir="$ac_optarg" ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir="$ac_optarg" ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site="$ac_optarg" ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir="$ac_optarg" ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir="$ac_optarg" ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target="$ac_optarg" ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers) + echo "configure generated by autoconf version 2.7" + exit 0 ;; + + -with-* | --with-*) + ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + case "$ac_option" in + *=*) ;; + *) ac_optarg=yes ;; + esac + eval "with_${ac_package}='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`echo $ac_option|sed -e 's/-*without-//'` + # Reject names that are not valid shell variable names. + if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; } + fi + ac_package=`echo $ac_package| sed 's/-/_/g'` + eval "with_${ac_package}=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes="$ac_optarg" ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries="$ac_optarg" ;; + + -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; } + ;; + + *=*) + varname=`echo "$ac_option"|sed -e 's/=.*//'` + # Reject names that aren't valid shell variable names. + if test -n "`echo $varname| sed 's/[a-zA-Z0-9_]//g'`"; then + { echo "configure: error: $varname: invalid shell variable name" 1>&2; exit 1; } + fi + val="`echo "$ac_option"|sed 's/[^=]*=//'`" + test -n "$verbose" && echo " setting shell variable $varname to $val" + eval "$varname='$val'" + eval "export $varname" ;; + + *) + if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then + echo "configure: warning: $ac_option: invalid host type" 1>&2 + fi + if test "x$nonopt" != xNONE; then + { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } + fi + nonopt="$ac_option" + ;; + + esac +done + +if test -n "$ac_prev"; then + { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; } +fi + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +# File descriptor usage: +# 0 standard input +# 1 file creation +# 2 errors and warnings +# 3 some systems may open it to /dev/tty +# 4 used on the Kubota Titan +# 6 checking for... messages and results +# 5 compiler messages saved in config.log +if test "$silent" = yes; then + exec 6>/dev/null +else + exec 6>&1 +fi +exec 5>./config.log + +echo "\ +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. +" 1>&5 + +# Strip out --no-create and --no-recursion so they do not pile up. +# Also quote any args containing shell metacharacters. +ac_configure_args= +for ac_arg +do + case "$ac_arg" in + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c) ;; + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*) + ac_configure_args="$ac_configure_args '$ac_arg'" ;; + *) ac_configure_args="$ac_configure_args $ac_arg" ;; + esac +done + +# NLS nuisances. +# Only set LANG and LC_ALL to C if already set. +# These must not be set unconditionally because not all systems understand +# e.g. LANG=C (notably SCO). +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LANG+set}" = set; then LANG=C; export LANG; fi + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo > confdefs.h + +# A filename unique to this package, relative to the directory that +# configure is in, which we can look for to find out if srcdir is correct. +ac_unique_file=jcmaster.c + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_prog=$0 + ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'` + test "x$ac_confdir" = "x$ac_prog" && ac_confdir=. + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; } + else + { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; } + fi +fi +srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'` + +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + echo "loading site script $ac_site_file" + . "$ac_site_file" + fi +done + + +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='echo $CPP $CPPFLAGS 1>&5; +$CPP $CPPFLAGS' +ac_compile='echo ${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5; +${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5' +ac_link='echo ${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5; +${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5' + +if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then + # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. + if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then + ac_n= ac_c=' +' ac_t=' ' + else + ac_n=-n ac_c= ac_t= + fi +else + ac_n= ac_c='\c' ac_t= +fi + + + +# Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="gcc" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.c <&5 | egrep yes >/dev/null 2>&1; then + ac_cv_prog_gcc=yes +else + ac_cv_prog_gcc=no +fi +fi +echo "$ac_t""$ac_cv_prog_gcc" 1>&6 +if test $ac_cv_prog_gcc = yes; then + GCC=yes +else + GCC= +fi +if test "${CFLAGS+set}" != set; then + echo $ac_n "checking whether ${CC-cc} accepts -O""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_cc_o'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + echo 'int f(){ return 0; }' > conftest.c +if test -z "`${CC-cc} -O -c conftest.c 2>&1`"; then + ac_cv_prog_cc_o=yes +else + ac_cv_prog_cc_o=no +fi +rm -f conftest* + +fi + echo "$ac_t""$ac_cv_prog_cc_o" 1>&6 + if test $ac_cv_prog_cc_o = yes; then + CFLAGS="-O" + else + CFLAGS="" + fi +fi + +echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then +if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + # This must be in double quotes, not single quotes, because CPP may get + # substituted into the Makefile and "${CC-cc}" will confuse make. + CPP="${CC-cc} -E" + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. + cat > conftest.$ac_ext < +Syntax Error +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + rm -rf conftest* + CPP="${CC-cc} -E -traditional-cpp" + cat > conftest.$ac_ext < +Syntax Error +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + rm -rf conftest* + CPP=/lib/cpp +fi +rm -f conftest* +fi +rm -f conftest* + ac_cv_prog_CPP="$CPP" +fi + CPP="$ac_cv_prog_CPP" +else + ac_cv_prog_CPP="$CPP" +fi +echo "$ac_t""$CPP" 1>&6 + +# If we cannot run a trivial program, we must be cross compiling. +echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test "$cross_compiling" = yes; then + ac_cv_c_cross=yes +else +cat > conftest.$ac_ext </dev/null; then + ac_cv_c_cross=no +else + ac_cv_c_cross=yes +fi +fi +rm -fr conftest* +fi + +echo "$ac_t""$ac_cv_c_cross" 1>&6 +cross_compiling=$ac_cv_c_cross + +echo $ac_n "checking for function prototypes""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ijg_cv_have_prototypes'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <&6 +if test $ijg_cv_have_prototypes = yes; then + cat >> confdefs.h <<\EOF +#define HAVE_PROTOTYPES +EOF + +else + echo Your compiler does not seem to know about function prototypes. + echo Perhaps it needs a special switch to enable ANSI C mode. + echo If so, we recommend running configure like this: + echo " ./configure CC='cc -switch'" + echo where -switch is the proper switch. +fi +ac_safe=`echo "stddef.h" | tr './\055' '___'` +echo $ac_n "checking for stddef.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_STDDEF_H +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +ac_safe=`echo "stdlib.h" | tr './\055' '___'` +echo $ac_n "checking for stdlib.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define HAVE_STDLIB_H +EOF + +else + echo "$ac_t""no" 1>&6 +fi + +ac_safe=`echo "string.h" | tr './\055' '___'` +echo $ac_n "checking for string.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define NEED_BSD_STRINGS +EOF + +fi + +echo $ac_n "checking for size_t""... $ac_c" 1>&6 +cat > conftest.$ac_ext < +#endif +#ifdef HAVE_STDLIB_H +#include +#endif +#include +#ifdef NEED_BSD_STRINGS +#include +#else +#include +#endif +typedef size_t my_size_t; + +int main() { return 0; } +int t() { + my_size_t foovar; +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + ijg_size_t_ok=yes +else + rm -rf conftest* + ijg_size_t_ok="not ANSI, perhaps it is in sys/types.h" +fi +rm -f conftest* + +echo "$ac_t""$ijg_size_t_ok" 1>&6 +if test "$ijg_size_t_ok" != yes; then +ac_safe=`echo "sys/types.h" | tr './\055' '___'` +echo $ac_n "checking for sys/types.h""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +ac_err=`grep -v '^ *+' conftest.out` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define NEED_SYS_TYPES_H +EOF + +cat > conftest.$ac_ext < +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "size_t" >/dev/null 2>&1; then + rm -rf conftest* + ijg_size_t_ok="size_t is in sys/types.h" +else + rm -rf conftest* + ijg_size_t_ok=no +fi +rm -f conftest* + +else + echo "$ac_t""no" 1>&6 +ijg_size_t_ok=no +fi + +echo "$ac_t""$ijg_size_t_ok" 1>&6 +if test "$ijg_size_t_ok" = no; then + echo Type size_t is not defined in any of the usual places. + echo Try putting '"typedef unsigned int size_t;"' in jconfig.h. +fi +fi +echo $ac_n "checking for type unsigned char""... $ac_c" 1>&6 +cat > conftest.$ac_ext <&6 +cat >> confdefs.h <<\EOF +#define HAVE_UNSIGNED_CHAR +EOF + +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* +echo $ac_n "checking for type unsigned short""... $ac_c" 1>&6 +cat > conftest.$ac_ext <&6 +cat >> confdefs.h <<\EOF +#define HAVE_UNSIGNED_SHORT +EOF + +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* +echo $ac_n "checking for type void""... $ac_c" 1>&6 +cat > conftest.$ac_ext <&6 +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define void char +EOF + +fi +rm -f conftest* +echo $ac_n "checking for working const""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext <j = 5; +} +{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; +} + +; return 0; } +EOF +if eval $ac_compile; then + rm -rf conftest* + ac_cv_c_const=yes +else + rm -rf conftest* + ac_cv_c_const=no +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_c_const" 1>&6 +if test $ac_cv_c_const = no; then + cat >> confdefs.h <<\EOF +#define const +EOF + +fi + +echo $ac_n "checking for inline""... $ac_c" 1>&6 +ijg_cv_inline="" +cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <&6 +cat >> confdefs.h <&6 +cat > conftest.$ac_ext <&6 +else + rm -rf conftest* + echo "$ac_t""broken" 1>&6 +cat >> confdefs.h <<\EOF +#define INCOMPLETE_TYPES_BROKEN +EOF + +fi +rm -f conftest* +echo $ac_n "checking for short external names""... $ac_c" 1>&6 +cat > conftest.$ac_ext <&6 +else + rm -rf conftest* + echo "$ac_t""short" 1>&6 +cat >> confdefs.h <<\EOF +#define NEED_SHORT_EXTERNAL_NAMES +EOF + +fi +rm -f conftest* + +echo $ac_n "checking to see if char is signed""... $ac_c" 1>&6 +if test "$cross_compiling" = yes; then + echo Assuming that char is signed on target machine. +echo If it is unsigned, this will be a little bit inefficient. + +else +cat > conftest.$ac_ext </dev/null; then + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define CHAR_IS_UNSIGNED +EOF + +else + echo "$ac_t""yes" 1>&6 +fi +fi +rm -fr conftest* +echo $ac_n "checking to see if right shift is signed""... $ac_c" 1>&6 +if test "$cross_compiling" = yes; then + echo "$ac_t""Assuming that right shift is signed on target machine." 1>&6 +else +cat > conftest.$ac_ext <> 4; + + if (res == -0x7F7E80CL) { /* expected result for signed shift */ + return 1; /* right shift is signed */ + } + /* see if unsigned-shift hack will fix it. */ + /* we can't just test exact value since it depends on width of long... */ + res |= (~0L) << (32-4); + if (res == -0x7F7E80CL) { /* expected result now? */ + return 0; /* right shift is unsigned */ + } + printf("Right shift isn't acting as I expect it to.\n"); + printf("I fear the JPEG software will not work at all.\n\n"); + return 0; /* try it with unsigned anyway */ +} +main() { + exit(is_shifting_signed(-0x7F7E80B1L)); +} +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define RIGHT_SHIFT_IS_UNSIGNED +EOF + +else + echo "$ac_t""yes" 1>&6 +fi +fi +rm -fr conftest* +echo $ac_n "checking to see if fopen accepts b spec""... $ac_c" 1>&6 +if test "$cross_compiling" = yes; then + echo "$ac_t""Assuming that it does." 1>&6 +else +cat > conftest.$ac_ext < +main() { + if (fopen("conftestdata", "wb") != NULL) + exit(0); + exit(1); +} +EOF +eval $ac_link +if test -s conftest && (./conftest; exit) 2>/dev/null; then + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define DONT_USE_B_MODE +EOF + +fi +fi +rm -fr conftest* + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# ./install, which can be erroneously created by make from ./install.sh. +echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 +if test -z "$INSTALL"; then +if eval "test \"`echo '$''{'ijg_cv_path_install'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + # Account for people who put trailing slashes in PATH elements. + case "$ac_dir/" in + /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + for ac_prog in ginstall installbsd scoinst install; do + if test -f $ac_dir/$ac_prog; then + if test $ac_prog = install && + grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + # OSF/1 installbsd also uses dspmsg, but is usable. + : + else + ijg_cv_path_install="$ac_dir/$ac_prog -c" + break 2 + fi + fi + done + ;; + esac + done + IFS="$ac_save_ifs" + # As a last resort, use cp + test -z "$ijg_cv_path_install" && ijg_cv_path_install="cp" +fi + INSTALL="$ijg_cv_path_install" +fi +echo "$ac_t""$INSTALL" 1>&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +if test -z "$INSTALL_DATA"; then + if test "$INSTALL" = cp; then + INSTALL_DATA='${INSTALL}' + else + INSTALL_DATA='${INSTALL} -m 644' + fi +fi + +# Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_RANLIB="ranlib" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":" +fi +fi +RANLIB="$ac_cv_prog_RANLIB" +if test -n "$RANLIB"; then + echo "$ac_t""$RANLIB" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +MEMORYMGR="jmemnobs.o" +MAXMEM="no" +# Check whether --enable-maxmem or --disable-maxmem was given. +if test "${enable_maxmem+set}" = set; then + enableval="$enable_maxmem" + MAXMEM="$enableval" +fi + +# support --with-maxmem for backwards compatibility with IJG V5. +# Check whether --with-maxmem or --without-maxmem was given. +if test "${with_maxmem+set}" = set; then + withval="$with_maxmem" + MAXMEM="$withval" +fi + +if test "x$MAXMEM" = xyes; then + MAXMEM=1 +fi +if test "x$MAXMEM" != xno; then + if test -n "`echo $MAXMEM | sed 's/[0-9]//g'`"; then + { echo "configure: error: non-numeric argument to --enable-maxmem" 1>&2; exit 1; } + fi + DEFAULTMAXMEM=`expr $MAXMEM \* 1048576` +cat >> confdefs.h <&6 +cat > conftest.$ac_ext < +int main() { return 0; } +int t() { + FILE * tfile = tmpfile(); +; return 0; } +EOF +if eval $ac_link; then + rm -rf conftest* + echo "$ac_t""yes" 1>&6 +MEMORYMGR="jmemansi.o" +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +MEMORYMGR="jmemname.o" +cat >> confdefs.h <<\EOF +#define NEED_SIGNAL_CATCHER +EOF +echo $ac_n "checking for 'mktemp()'""... $ac_c" 1>&6 +cat > conftest.$ac_ext <&6 +else + rm -rf conftest* + echo "$ac_t""no" 1>&6 +cat >> confdefs.h <<\EOF +#define NO_MKTEMP +EOF + +fi +rm -f conftest* + +fi +rm -f conftest* + +fi + +# Prepare to massage makefile.cfg correctly. +if test $ijg_cv_have_prototypes = yes; then + ANSI2KNR="" + ISANSICOM="# " +else + ANSI2KNR="ansi2knr" + ISANSICOM="" +fi +# ansi2knr needs -DBSD if string.h is missing +if test $ac_cv_header_string_h = no; then + ANSI2KNRFLAGS="-DBSD" +else + ANSI2KNRFLAGS="" +fi +# Set up -I directives +if test "x$srcdir" = x.; then + INCLUDEFLAGS='-I$(srcdir)' +else + INCLUDEFLAGS='-I. -I$(srcdir)' +fi +trap '' 1 2 15 + +trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15 + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# Any assignment to VPATH causes Sun make to only execute +# the first set of double-colon rules, so remove it if not needed. +# If there is a colon in the path, we need to keep it. +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d' +fi + +trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15 + +DEFS=-DHAVE_CONFIG_H + +# Without the "./", some shells look in PATH for config.status. +: ${CONFIG_STATUS=./config.status} + +echo creating $CONFIG_STATUS +rm -f $CONFIG_STATUS +cat > $CONFIG_STATUS </dev/null | sed 1q`: +# +# $0 $ac_configure_args +# +# Compiler output produced by configure, useful for debugging +# configure, is in ./config.log if it exists. + +ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]" +for ac_option +do + case "\$ac_option" in + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" + exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; + -version | --version | --versio | --versi | --vers | --ver | --ve | --v) + echo "$CONFIG_STATUS generated by autoconf version 2.7" + exit 0 ;; + -help | --help | --hel | --he | --h) + echo "\$ac_cs_usage"; exit 0 ;; + *) echo "\$ac_cs_usage"; exit 1 ;; + esac +done + +ac_given_srcdir=$srcdir + +trap 'rm -fr `echo "Makefile:makefile.cfg jconfig.h:jconfig.cfg" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +EOF +cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF +$ac_vpsub +$extrasub +s%@CFLAGS@%$CFLAGS%g +s%@CPPFLAGS@%$CPPFLAGS%g +s%@CXXFLAGS@%$CXXFLAGS%g +s%@DEFS@%$DEFS%g +s%@LDFLAGS@%$LDFLAGS%g +s%@LIBS@%$LIBS%g +s%@exec_prefix@%$exec_prefix%g +s%@prefix@%$prefix%g +s%@program_transform_name@%$program_transform_name%g +s%@bindir@%$bindir%g +s%@sbindir@%$sbindir%g +s%@libexecdir@%$libexecdir%g +s%@datadir@%$datadir%g +s%@sysconfdir@%$sysconfdir%g +s%@sharedstatedir@%$sharedstatedir%g +s%@localstatedir@%$localstatedir%g +s%@libdir@%$libdir%g +s%@includedir@%$includedir%g +s%@oldincludedir@%$oldincludedir%g +s%@infodir@%$infodir%g +s%@mandir@%$mandir%g +s%@CC@%$CC%g +s%@CPP@%$CPP%g +s%@INSTALL@%$INSTALL%g +s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_DATA@%$INSTALL_DATA%g +s%@RANLIB@%$RANLIB%g +s%@MEMORYMGR@%$MEMORYMGR%g +s%@ANSI2KNR@%$ANSI2KNR%g +s%@ISANSICOM@%$ISANSICOM%g +s%@ANSI2KNRFLAGS@%$ANSI2KNRFLAGS%g +s%@INCLUDEFLAGS@%$INCLUDEFLAGS%g + +CEOF +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then + # Support "outfile[:infile]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + # Adjust relative srcdir, etc. for subdirectories. + + # Remove last slash and all that follows it. Not all systems have dirname. + ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` + if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then + # The file is in a subdirectory. + test ! -d "$ac_dir" && mkdir "$ac_dir" + ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`" + # A "../" for each directory in $ac_dir_suffix. + ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'` + else + ac_dir_suffix= ac_dots= + fi + + case "$ac_given_srcdir" in + .) srcdir=. + if test -z "$ac_dots"; then top_srcdir=. + else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;; + /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;; + *) # Relative path. + srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix" + top_srcdir="$ac_dots$ac_given_srcdir" ;; + esac + + echo creating "$ac_file" + rm -f "$ac_file" + configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." + case "$ac_file" in + *Makefile*) ac_comsub="1i\\ +# $configure_input" ;; + *) ac_comsub= ;; + esac + sed -e "$ac_comsub +s%@configure_input@%$configure_input%g +s%@srcdir@%$srcdir%g +s%@top_srcdir@%$top_srcdir%g +" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file +fi; done +rm -f conftest.subs + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s%^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='\([ ][ ]*\)[^ ]*%\1#\2' +ac_dC='\3' +ac_dD='%g' +# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE". +ac_uA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='\([ ]\)%\1#\2define\3' +ac_uC=' ' +ac_uD='\4%g' +# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_eA='s%^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_eB='$%\1#\2define\3' +ac_eC=' ' +ac_eD='%g' + +CONFIG_HEADERS=${CONFIG_HEADERS-"jconfig.h:jconfig.cfg"} +for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then + # Support "outfile[:infile]", defaulting infile="outfile.in". + case "$ac_file" in + *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; + *) ac_file_in="${ac_file}.in" ;; + esac + + echo creating $ac_file + + rm -f conftest.frag conftest.in conftest.out + cp $ac_given_srcdir/$ac_file_in conftest.in + +EOF + +# Transform confdefs.h into a sed script conftest.vals that substitutes +# the proper values into config.h.in to produce config.h. And first: +# Protect against being on the right side of a sed subst in config.status. +# Protect against being in an unquoted here document in config.status. +rm -f conftest.vals +cat > conftest.hdr <<\EOF +s/[\\&%]/\\&/g +s%[\\$`]%\\&%g +s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp +s%ac_d%ac_u%gp +s%ac_u%ac_e%gp +EOF +sed -n -f conftest.hdr confdefs.h > conftest.vals +rm -f conftest.hdr + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >> conftest.vals <<\EOF +EOF + +# Break up conftest.vals because some shells have a limit on +# the size of here documents, and old seds have small limits too. +# Maximum number of lines to put in a single here document. +ac_max_here_lines=12 + +rm -f conftest.tail +while : +do + ac_lines=`grep -c . conftest.vals` + # grep -c gives empty output for an empty file on some AIX systems. + if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi + # Write a limited-size here document to conftest.frag. + echo ' cat > conftest.frag <> $CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS + echo 'CEOF + sed -f conftest.frag conftest.in > conftest.out + rm -f conftest.in + mv conftest.out conftest.in +' >> $CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail + rm -f conftest.vals + mv conftest.tail conftest.vals +done +rm -f conftest.vals + +cat >> $CONFIG_STATUS <<\EOF + rm -f conftest.frag conftest.h + echo "/* $ac_file. Generated automatically by configure. */" > conftest.h + cat conftest.in >> conftest.h + rm -f conftest.in + if cmp -s $ac_file conftest.h 2>/dev/null; then + echo "$ac_file is unchanged" + rm -f conftest.h + else + rm -f $ac_file + mv conftest.h $ac_file + fi +fi; done + + + +exit 0 +EOF +chmod +x $CONFIG_STATUS +rm -fr confdefs* $ac_clean_files +test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1 + diff --git a/windows_libs/jpeg-6a/djpeg.1 b/windows_libs/jpeg-6a/djpeg.1 new file mode 100644 index 00000000..8efa5cd8 --- /dev/null +++ b/windows_libs/jpeg-6a/djpeg.1 @@ -0,0 +1,248 @@ +.TH DJPEG 1 "15 June 1995" +.SH NAME +djpeg \- decompress a JPEG file to an image file +.SH SYNOPSIS +.B djpeg +[ +.I options +] +[ +.I filename +] +.LP +.SH DESCRIPTION +.LP +.B djpeg +decompresses the named JPEG file, or the standard input if no file is named, +and produces an image file on the standard output. PBMPLUS (PPM/PGM), BMP, +GIF, Targa, or RLE (Utah Raster Toolkit) output format can be selected. +(RLE is supported only if the URT library is available.) +.SH OPTIONS +All switch names may be abbreviated; for example, +.B \-grayscale +may be written +.B \-gray +or +.BR \-gr . +Most of the "basic" switches can be abbreviated to as little as one letter. +Upper and lower case are equivalent (thus +.B \-GIF +is the same as +.BR \-gif ). +British spellings are also accepted (e.g., +.BR \-greyscale ), +though for brevity these are not mentioned below. +.PP +The basic switches are: +.TP +.BI \-colors " N" +Reduce image to at most N colors. This reduces the number of colors used in +the output image, so that it can be displayed on a colormapped display or +stored in a colormapped file format. For example, if you have an 8-bit +display, you'd need to reduce to 256 or fewer colors. +.TP +.BI \-quantize " N" +Same as +.BR \-colors . +.B \-colors +is the recommended name, +.B \-quantize +is provided only for backwards compatibility. +.TP +.B \-fast +Select recommended processing options for fast, low quality output. (The +default options are chosen for highest quality output.) Currently, this is +equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR. +.TP +.B \-grayscale +Force gray-scale output even if JPEG file is color. Useful for viewing on +monochrome displays; also, +.B djpeg +runs noticeably faster in this mode. +.TP +.BI \-scale " M/N" +Scale the output image by a factor M/N. Currently the scale factor must be +1/1, 1/2, 1/4, or 1/8. Scaling is handy if the image is larger than your +screen; also, +.B djpeg +runs much faster when scaling down the output. +.TP +.B \-bmp +Select BMP output format (Windows flavor). 8-bit colormapped format is +emitted if +.B \-colors +or +.B \-grayscale +is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color +format is emitted. +.TP +.B \-gif +Select GIF output format. Since GIF does not support more than 256 colors, +.B \-colors 256 +is assumed (unless you specify a smaller number of colors). +.TP +.B \-os2 +Select BMP output format (OS/2 1.x flavor). 8-bit colormapped format is +emitted if +.B \-colors +or +.B \-grayscale +is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color +format is emitted. +.TP +.B \-pnm +Select PBMPLUS (PPM/PGM) output format (this is the default format). +PGM is emitted if the JPEG file is gray-scale or if +.B \-grayscale +is specified; otherwise PPM is emitted. +.TP +.B \-rle +Select RLE output format. (Requires URT library.) +.TP +.B \-targa +Select Targa output format. Gray-scale format is emitted if the JPEG file is +gray-scale or if +.B \-grayscale +is specified; otherwise, colormapped format is emitted if +.B \-colors +is specified; otherwise, 24-bit full-color format is emitted. +.PP +Switches for advanced users: +.TP +.B \-dct int +Use integer DCT method (default). +.TP +.B \-dct fast +Use fast integer DCT (less accurate). +.TP +.B \-dct float +Use floating-point DCT method. +The float method is very slightly more accurate than the int method, but is +much slower unless your machine has very fast floating-point hardware. Also +note that results of the floating-point method may vary slightly across +machines, while the integer methods should give the same results everywhere. +The fast integer method is much less accurate than the other two. +.TP +.B \-dither fs +Use Floyd-Steinberg dithering in color quantization. +.TP +.B \-dither ordered +Use ordered dithering in color quantization. +.TP +.B \-dither none +Do not use dithering in color quantization. +By default, Floyd-Steinberg dithering is applied when quantizing colors; this +is slow but usually produces the best results. Ordered dither is a compromise +between speed and quality; no dithering is fast but usually looks awful. Note +that these switches have no effect unless color quantization is being done. +Ordered dither is only available in +.B \-onepass +mode. +.TP +.BI \-map " file" +Quantize to the colors used in the specified image file. This is useful for +producing multiple files with identical color maps, or for forcing a +predefined set of colors to be used. The +.I file +must be a GIF or PPM file. This option overrides +.B \-colors +and +.BR \-onepass . +.TP +.B \-nosmooth +Use a faster, lower-quality upsampling routine. +.TP +.B \-onepass +Use one-pass instead of two-pass color quantization. The one-pass method is +faster and needs less memory, but it produces a lower-quality image. +.B \-onepass +is ignored unless you also say +.B \-colors +.IR N . +Also, the one-pass method is always used for gray-scale output (the two-pass +method is no improvement then). +.TP +.BI \-maxmemory " N" +Set limit for amount of memory to use in processing large images. Value is +in thousands of bytes, or millions of bytes if "M" is attached to the +number. For example, +.B \-max 4m +selects 4000000 bytes. If more space is needed, temporary files will be used. +.TP +.BI \-outfile " name" +Send output image to the named file, not to standard output. +.TP +.B \-verbose +Enable debug printout. More +.BR \-v 's +give more output. Also, version information is printed at startup. +.TP +.B \-debug +Same as +.BR \-verbose . +.SH EXAMPLES +.LP +This example decompresses the JPEG file foo.jpg, automatically quantizes to +256 colors, and saves the output in GIF format in foo.gif: +.IP +.B djpeg \-gif +.I foo.jpg +.B > +.I foo.gif +.SH HINTS +To get a quick preview of an image, use the +.B \-grayscale +and/or +.B \-scale +switches. +.B \-grayscale \-scale 1/8 +is the fastest case. +.PP +Several options are available that trade off image quality to gain speed. +.B \-fast +turns on the recommended settings. +.PP +.B \-dct fast +and/or +.B \-nosmooth +gain speed at a small sacrifice in quality. +When producing a color-quantized image, +.B \-onepass \-dither ordered +is fast but much lower quality than the default behavior. +.B \-dither none +may give acceptable results in two-pass mode, but is seldom tolerable in +one-pass mode. +.PP +If you are fortunate enough to have very fast floating point hardware, +\fB\-dct float\fR may be even faster than \fB\-dct fast\fR. But on most +machines \fB\-dct float\fR is slower than \fB\-dct int\fR; in this case it is +not worth using, because its theoretical accuracy advantage is too small to be +significant in practice. +.SH ENVIRONMENT +.TP +.B JPEGMEM +If this environment variable is set, its value is the default memory limit. +The value is specified as described for the +.B \-maxmemory +switch. +.B JPEGMEM +overrides the default value specified when the program was compiled, and +itself is overridden by an explicit +.BR \-maxmemory . +.SH SEE ALSO +.BR cjpeg (1), +.BR jpegtran (1), +.BR rdjpgcom (1), +.BR wrjpgcom (1) +.br +.BR ppm (5), +.BR pgm (5) +.br +Wallace, Gregory K. "The JPEG Still Picture Compression Standard", +Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. +.SH AUTHOR +Independent JPEG Group +.SH BUGS +Arithmetic coding is not supported for legal reasons. +.PP +Still not as fast as we'd like. diff --git a/windows_libs/jpeg-6a/djpeg.c b/windows_libs/jpeg-6a/djpeg.c new file mode 100644 index 00000000..54659940 --- /dev/null +++ b/windows_libs/jpeg-6a/djpeg.c @@ -0,0 +1,604 @@ +/* + * djpeg.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a command-line user interface for the JPEG decompressor. + * It should work on any system with Unix- or MS-DOS-style command lines. + * + * Two different command line styles are permitted, depending on the + * compile-time switch TWO_FILE_COMMANDLINE: + * djpeg [options] inputfile outputfile + * djpeg [options] [inputfile] + * In the second style, output is always to standard output, which you'd + * normally redirect to a file or pipe to some other program. Input is + * either from a named file or from standard input (typically redirected). + * The second style is convenient on Unix but is unhelpful on systems that + * don't support pipes. Also, you MUST use the first style if your system + * doesn't do binary I/O to stdin/stdout. + * To simplify script writing, the "-outfile" switch is provided. The syntax + * djpeg [options] -outfile outputfile inputfile + * works regardless of which command line style is used. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ +#include "jversion.h" /* for version message */ + +#include /* to declare isprint() */ + +#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ +#ifdef __MWERKS__ +#include /* Metrowerks needs this */ +#include /* ... and this */ +#endif +#ifdef THINK_C +#include /* Think declares it here */ +#endif +#endif + + +/* Create the add-on message string table. */ + +#define JMESSAGE(code,string) string , + +static const char * const cdjpeg_message_table[] = { +#include "cderror.h" + NULL +}; + + +/* + * This list defines the known output image formats + * (not all of which need be supported by a given version). + * You can change the default output format by defining DEFAULT_FMT; + * indeed, you had better do so if you undefine PPM_SUPPORTED. + */ + +typedef enum { + FMT_BMP, /* BMP format (Windows flavor) */ + FMT_GIF, /* GIF format */ + FMT_OS2, /* BMP format (OS/2 flavor) */ + FMT_PPM, /* PPM/PGM (PBMPLUS formats) */ + FMT_RLE, /* RLE format */ + FMT_TARGA, /* Targa format */ + FMT_TIFF /* TIFF format */ +} IMAGE_FORMATS; + +#ifndef DEFAULT_FMT /* so can override from CFLAGS in Makefile */ +#define DEFAULT_FMT FMT_PPM +#endif + +static IMAGE_FORMATS requested_fmt; + + +/* + * Argument-parsing code. + * The switch parser is designed to be useful with DOS-style command line + * syntax, ie, intermixed switches and file names, where only the switches + * to the left of a given file name affect processing of that file. + * The main program in this file doesn't actually use this capability... + */ + + +static const char * progname; /* program name for error messages */ +static char * outfilename; /* for -outfile switch */ + + +LOCAL(void) +usage (void) +/* complain about bad command line */ +{ + fprintf(stderr, "usage: %s [switches] ", progname); +#ifdef TWO_FILE_COMMANDLINE + fprintf(stderr, "inputfile outputfile\n"); +#else + fprintf(stderr, "[inputfile]\n"); +#endif + + fprintf(stderr, "Switches (names may be abbreviated):\n"); + fprintf(stderr, " -colors N Reduce image to no more than N colors\n"); + fprintf(stderr, " -fast Fast, low-quality processing\n"); + fprintf(stderr, " -grayscale Force grayscale output\n"); +#ifdef IDCT_SCALING_SUPPORTED + fprintf(stderr, " -scale M/N Scale output image by fraction M/N, eg, 1/8\n"); +#endif +#ifdef BMP_SUPPORTED + fprintf(stderr, " -bmp Select BMP output format (Windows style)%s\n", + (DEFAULT_FMT == FMT_BMP ? " (default)" : "")); +#endif +#ifdef GIF_SUPPORTED + fprintf(stderr, " -gif Select GIF output format%s\n", + (DEFAULT_FMT == FMT_GIF ? " (default)" : "")); +#endif +#ifdef BMP_SUPPORTED + fprintf(stderr, " -os2 Select BMP output format (OS/2 style)%s\n", + (DEFAULT_FMT == FMT_OS2 ? " (default)" : "")); +#endif +#ifdef PPM_SUPPORTED + fprintf(stderr, " -pnm Select PBMPLUS (PPM/PGM) output format%s\n", + (DEFAULT_FMT == FMT_PPM ? " (default)" : "")); +#endif +#ifdef RLE_SUPPORTED + fprintf(stderr, " -rle Select Utah RLE output format%s\n", + (DEFAULT_FMT == FMT_RLE ? " (default)" : "")); +#endif +#ifdef TARGA_SUPPORTED + fprintf(stderr, " -targa Select Targa output format%s\n", + (DEFAULT_FMT == FMT_TARGA ? " (default)" : "")); +#endif + fprintf(stderr, "Switches for advanced users:\n"); +#ifdef DCT_ISLOW_SUPPORTED + fprintf(stderr, " -dct int Use integer DCT method%s\n", + (JDCT_DEFAULT == JDCT_ISLOW ? " (default)" : "")); +#endif +#ifdef DCT_IFAST_SUPPORTED + fprintf(stderr, " -dct fast Use fast integer DCT (less accurate)%s\n", + (JDCT_DEFAULT == JDCT_IFAST ? " (default)" : "")); +#endif +#ifdef DCT_FLOAT_SUPPORTED + fprintf(stderr, " -dct float Use floating-point DCT method%s\n", + (JDCT_DEFAULT == JDCT_FLOAT ? " (default)" : "")); +#endif + fprintf(stderr, " -dither fs Use F-S dithering (default)\n"); + fprintf(stderr, " -dither none Don't use dithering in quantization\n"); + fprintf(stderr, " -dither ordered Use ordered dither (medium speed, quality)\n"); +#ifdef QUANT_2PASS_SUPPORTED + fprintf(stderr, " -map FILE Map to colors used in named image file\n"); +#endif + fprintf(stderr, " -nosmooth Don't use high-quality upsampling\n"); +#ifdef QUANT_1PASS_SUPPORTED + fprintf(stderr, " -onepass Use 1-pass quantization (fast, low quality)\n"); +#endif + fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); + fprintf(stderr, " -outfile name Specify name for output file\n"); + fprintf(stderr, " -verbose or -debug Emit debug output\n"); + exit(EXIT_FAILURE); +} + + +LOCAL(int) +parse_switches (j_decompress_ptr cinfo, int argc, char **argv, + int last_file_arg_seen, boolean for_real) +/* Parse optional switches. + * Returns argv[] index of first file-name argument (== argc if none). + * Any file names with indexes <= last_file_arg_seen are ignored; + * they have presumably been processed in a previous iteration. + * (Pass 0 for last_file_arg_seen on the first or only iteration.) + * for_real is FALSE on the first (dummy) pass; we may skip any expensive + * processing. + */ +{ + int argn; + char * arg; + + /* Set up default JPEG parameters. */ + requested_fmt = DEFAULT_FMT; /* set default output file format */ + outfilename = NULL; + cinfo->err->trace_level = 0; + + /* Scan command line options, adjust parameters */ + + for (argn = 1; argn < argc; argn++) { + arg = argv[argn]; + if (*arg != '-') { + /* Not a switch, must be a file name argument */ + if (argn <= last_file_arg_seen) { + outfilename = NULL; /* -outfile applies to just one input file */ + continue; /* ignore this name if previously processed */ + } + break; /* else done parsing switches */ + } + arg++; /* advance past switch marker character */ + + if (keymatch(arg, "bmp", 1)) { + /* BMP output format. */ + requested_fmt = FMT_BMP; + + } else if (keymatch(arg, "colors", 1) || keymatch(arg, "colours", 1) || + keymatch(arg, "quantize", 1) || keymatch(arg, "quantise", 1)) { + /* Do color quantization. */ + int val; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%d", &val) != 1) + usage(); + cinfo->desired_number_of_colors = val; + cinfo->quantize_colors = TRUE; + + } else if (keymatch(arg, "dct", 2)) { + /* Select IDCT algorithm. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (keymatch(argv[argn], "int", 1)) { + cinfo->dct_method = JDCT_ISLOW; + } else if (keymatch(argv[argn], "fast", 2)) { + cinfo->dct_method = JDCT_IFAST; + } else if (keymatch(argv[argn], "float", 2)) { + cinfo->dct_method = JDCT_FLOAT; + } else + usage(); + + } else if (keymatch(arg, "dither", 2)) { + /* Select dithering algorithm. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (keymatch(argv[argn], "fs", 2)) { + cinfo->dither_mode = JDITHER_FS; + } else if (keymatch(argv[argn], "none", 2)) { + cinfo->dither_mode = JDITHER_NONE; + } else if (keymatch(argv[argn], "ordered", 2)) { + cinfo->dither_mode = JDITHER_ORDERED; + } else + usage(); + + } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { + /* Enable debug printouts. */ + /* On first -d, print version identification */ + static boolean printed_version = FALSE; + + if (! printed_version) { + fprintf(stderr, "Independent JPEG Group's DJPEG, version %s\n%s\n", + JVERSION, JCOPYRIGHT); + printed_version = TRUE; + } + cinfo->err->trace_level++; + + } else if (keymatch(arg, "fast", 1)) { + /* Select recommended processing options for quick-and-dirty output. */ + cinfo->two_pass_quantize = FALSE; + cinfo->dither_mode = JDITHER_ORDERED; + if (! cinfo->quantize_colors) /* don't override an earlier -colors */ + cinfo->desired_number_of_colors = 216; + cinfo->dct_method = JDCT_FASTEST; + cinfo->do_fancy_upsampling = FALSE; + + } else if (keymatch(arg, "gif", 1)) { + /* GIF output format. */ + requested_fmt = FMT_GIF; + + } else if (keymatch(arg, "grayscale", 2) || keymatch(arg, "greyscale",2)) { + /* Force monochrome output. */ + cinfo->out_color_space = JCS_GRAYSCALE; + + } else if (keymatch(arg, "map", 3)) { + /* Quantize to a color map taken from an input file. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (for_real) { /* too expensive to do twice! */ +#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */ + FILE * mapfile; + + if ((mapfile = fopen(argv[argn], READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); + exit(EXIT_FAILURE); + } + read_color_map(cinfo, mapfile); + fclose(mapfile); + cinfo->quantize_colors = TRUE; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } + + } else if (keymatch(arg, "maxmemory", 3)) { + /* Maximum memory in Kb (or Mb with 'm'). */ + long lval; + char ch = 'x'; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) + usage(); + if (ch == 'm' || ch == 'M') + lval *= 1000L; + cinfo->mem->max_memory_to_use = lval * 1000L; + + } else if (keymatch(arg, "nosmooth", 3)) { + /* Suppress fancy upsampling */ + cinfo->do_fancy_upsampling = FALSE; + + } else if (keymatch(arg, "onepass", 3)) { + /* Use fast one-pass quantization. */ + cinfo->two_pass_quantize = FALSE; + + } else if (keymatch(arg, "os2", 3)) { + /* BMP output format (OS/2 flavor). */ + requested_fmt = FMT_OS2; + + } else if (keymatch(arg, "outfile", 4)) { + /* Set output file name. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + outfilename = argv[argn]; /* save it away for later use */ + + } else if (keymatch(arg, "pnm", 1) || keymatch(arg, "ppm", 1)) { + /* PPM/PGM output format. */ + requested_fmt = FMT_PPM; + + } else if (keymatch(arg, "rle", 1)) { + /* RLE output format. */ + requested_fmt = FMT_RLE; + + } else if (keymatch(arg, "scale", 1)) { + /* Scale the output image by a fraction M/N. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%d/%d", + &cinfo->scale_num, &cinfo->scale_denom) != 2) + usage(); + + } else if (keymatch(arg, "targa", 1)) { + /* Targa output format. */ + requested_fmt = FMT_TARGA; + + } else { + usage(); /* bogus switch */ + } + } + + return argn; /* return index of next arg (file name) */ +} + + +/* + * Marker processor for COM markers. + * This replaces the library's built-in processor, which just skips the marker. + * We want to print out the marker as text, if possible. + * Note this code relies on a non-suspending data source. + */ + +LOCAL(unsigned int) +jpeg_getc (j_decompress_ptr cinfo) +/* Read next byte */ +{ + struct jpeg_source_mgr * datasrc = cinfo->src; + + if (datasrc->bytes_in_buffer == 0) { + if (! (*datasrc->fill_input_buffer) (cinfo)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); + } + datasrc->bytes_in_buffer--; + return GETJOCTET(*datasrc->next_input_byte++); +} + + +METHODDEF(boolean) +COM_handler (j_decompress_ptr cinfo) +{ + boolean traceit = (cinfo->err->trace_level >= 1); + INT32 length; + unsigned int ch; + unsigned int lastch = 0; + + length = jpeg_getc(cinfo) << 8; + length += jpeg_getc(cinfo); + length -= 2; /* discount the length word itself */ + + if (traceit) + fprintf(stderr, "Comment, length %ld:\n", (long) length); + + while (--length >= 0) { + ch = jpeg_getc(cinfo); + if (traceit) { + /* Emit the character in a readable form. + * Nonprintables are converted to \nnn form, + * while \ is converted to \\. + * Newlines in CR, CR/LF, or LF form will be printed as one newline. + */ + if (ch == '\r') { + fprintf(stderr, "\n"); + } else if (ch == '\n') { + if (lastch != '\r') + fprintf(stderr, "\n"); + } else if (ch == '\\') { + fprintf(stderr, "\\\\"); + } else if (isprint(ch)) { + putc(ch, stderr); + } else { + fprintf(stderr, "\\%03o", ch); + } + lastch = ch; + } + } + + if (traceit) + fprintf(stderr, "\n"); + + return TRUE; +} + + +/* + * The main program. + */ + +int +main (int argc, char **argv) +{ + struct jpeg_decompress_struct cinfo; + struct jpeg_error_mgr jerr; +#ifdef PROGRESS_REPORT + struct cdjpeg_progress_mgr progress; +#endif + int file_index; + djpeg_dest_ptr dest_mgr = NULL; + FILE * input_file; + FILE * output_file; + JDIMENSION num_scanlines; + + /* On Mac, fetch a command line. */ +#ifdef USE_CCOMMAND + argc = ccommand(&argv); +#endif + + progname = argv[0]; + if (progname == NULL || progname[0] == 0) + progname = "djpeg"; /* in case C library doesn't provide it */ + + /* Initialize the JPEG decompression object with default error handling. */ + cinfo.err = jpeg_std_error(&jerr); + jpeg_create_decompress(&cinfo); + /* Add some application-specific error messages (from cderror.h) */ + jerr.addon_message_table = cdjpeg_message_table; + jerr.first_addon_message = JMSG_FIRSTADDONCODE; + jerr.last_addon_message = JMSG_LASTADDONCODE; + /* Insert custom COM marker processor. */ + jpeg_set_marker_processor(&cinfo, JPEG_COM, COM_handler); + + /* Now safe to enable signal catcher. */ +#ifdef NEED_SIGNAL_CATCHER + enable_signal_catcher((j_common_ptr) &cinfo); +#endif + + /* Scan command line to find file names. */ + /* It is convenient to use just one switch-parsing routine, but the switch + * values read here are ignored; we will rescan the switches after opening + * the input file. + * (Exception: tracing level set here controls verbosity for COM markers + * found during jpeg_read_header...) + */ + + file_index = parse_switches(&cinfo, argc, argv, 0, FALSE); + +#ifdef TWO_FILE_COMMANDLINE + /* Must have either -outfile switch or explicit output file name */ + if (outfilename == NULL) { + if (file_index != argc-2) { + fprintf(stderr, "%s: must name one input and one output file\n", + progname); + usage(); + } + outfilename = argv[file_index+1]; + } else { + if (file_index != argc-1) { + fprintf(stderr, "%s: must name one input and one output file\n", + progname); + usage(); + } + } +#else + /* Unix style: expect zero or one file name */ + if (file_index < argc-1) { + fprintf(stderr, "%s: only one input file\n", progname); + usage(); + } +#endif /* TWO_FILE_COMMANDLINE */ + + /* Open the input file. */ + if (file_index < argc) { + if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]); + exit(EXIT_FAILURE); + } + } else { + /* default input file is stdin */ + input_file = read_stdin(); + } + + /* Open the output file. */ + if (outfilename != NULL) { + if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, outfilename); + exit(EXIT_FAILURE); + } + } else { + /* default output file is stdout */ + output_file = write_stdout(); + } + +#ifdef PROGRESS_REPORT + start_progress_monitor((j_common_ptr) &cinfo, &progress); +#endif + + /* Specify data source for decompression */ + jpeg_stdio_src(&cinfo, input_file); + + /* Read file header, set default decompression parameters */ + (void) jpeg_read_header(&cinfo, TRUE); + + /* Adjust default decompression parameters by re-parsing the options */ + file_index = parse_switches(&cinfo, argc, argv, 0, TRUE); + + /* Initialize the output module now to let it override any crucial + * option settings (for instance, GIF wants to force color quantization). + */ + switch (requested_fmt) { +#ifdef BMP_SUPPORTED + case FMT_BMP: + dest_mgr = jinit_write_bmp(&cinfo, FALSE); + break; + case FMT_OS2: + dest_mgr = jinit_write_bmp(&cinfo, TRUE); + break; +#endif +#ifdef GIF_SUPPORTED + case FMT_GIF: + dest_mgr = jinit_write_gif(&cinfo); + break; +#endif +#ifdef PPM_SUPPORTED + case FMT_PPM: + dest_mgr = jinit_write_ppm(&cinfo); + break; +#endif +#ifdef RLE_SUPPORTED + case FMT_RLE: + dest_mgr = jinit_write_rle(&cinfo); + break; +#endif +#ifdef TARGA_SUPPORTED + case FMT_TARGA: + dest_mgr = jinit_write_targa(&cinfo); + break; +#endif + default: + ERREXIT(&cinfo, JERR_UNSUPPORTED_FORMAT); + break; + } + dest_mgr->output_file = output_file; + + /* Start decompressor */ + (void) jpeg_start_decompress(&cinfo); + + /* Write output file header */ + (*dest_mgr->start_output) (&cinfo, dest_mgr); + + /* Process data */ + while (cinfo.output_scanline < cinfo.output_height) { + num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer, + dest_mgr->buffer_height); + (*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines); + } + +#ifdef PROGRESS_REPORT + /* Hack: count final pass as done in case finish_output does an extra pass. + * The library won't have updated completed_passes. + */ + progress.pub.completed_passes = progress.pub.total_passes; +#endif + + /* Finish decompression and release memory. + * I must do it in this order because output module has allocated memory + * of lifespan JPOOL_IMAGE; it needs to finish before releasing memory. + */ + (*dest_mgr->finish_output) (&cinfo, dest_mgr); + (void) jpeg_finish_decompress(&cinfo); + jpeg_destroy_decompress(&cinfo); + + /* Close files, if we opened them */ + if (input_file != stdin) + fclose(input_file); + if (output_file != stdout) + fclose(output_file); + +#ifdef PROGRESS_REPORT + end_progress_monitor((j_common_ptr) &cinfo); +#endif + + /* All done. */ + exit(jerr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS); + return 0; /* suppress no-return-value warnings */ +} diff --git a/windows_libs/jpeg-6a/example.c b/windows_libs/jpeg-6a/example.c new file mode 100644 index 00000000..7fc354f0 --- /dev/null +++ b/windows_libs/jpeg-6a/example.c @@ -0,0 +1,433 @@ +/* + * example.c + * + * This file illustrates how to use the IJG code as a subroutine library + * to read or write JPEG image files. You should look at this code in + * conjunction with the documentation file libjpeg.doc. + * + * This code will not do anything useful as-is, but it may be helpful as a + * skeleton for constructing routines that call the JPEG library. + * + * We present these routines in the same coding style used in the JPEG code + * (ANSI function definitions, etc); but you are of course free to code your + * routines in a different style if you prefer. + */ + +#include + +/* + * Include file for users of JPEG library. + * You will need to have included system headers that define at least + * the typedefs FILE and size_t before you can include jpeglib.h. + * (stdio.h is sufficient on ANSI-conforming systems.) + * You may also wish to include "jerror.h". + */ + +#include "jpeglib.h" + +/* + * is used for the optional error recovery mechanism shown in + * the second part of the example. + */ + +#include + + + +/******************** JPEG COMPRESSION SAMPLE INTERFACE *******************/ + +/* This half of the example shows how to feed data into the JPEG compressor. + * We present a minimal version that does not worry about refinements such + * as error recovery (the JPEG code will just exit() if it gets an error). + */ + + +/* + * IMAGE DATA FORMATS: + * + * The standard input image format is a rectangular array of pixels, with + * each pixel having the same number of "component" values (color channels). + * Each pixel row is an array of JSAMPLEs (which typically are unsigned chars). + * If you are working with color data, then the color values for each pixel + * must be adjacent in the row; for example, R,G,B,R,G,B,R,G,B,... for 24-bit + * RGB color. + * + * For this example, we'll assume that this data structure matches the way + * our application has stored the image in memory, so we can just pass a + * pointer to our image buffer. In particular, let's say that the image is + * RGB color and is described by: + */ + +extern JSAMPLE * image_buffer; /* Points to large array of R,G,B-order data */ +extern int image_height; /* Number of rows in image */ +extern int image_width; /* Number of columns in image */ + + +/* + * Sample routine for JPEG compression. We assume that the target file name + * and a compression quality factor are passed in. + */ + +GLOBAL(void) +write_JPEG_file (char * filename, int quality) +{ + /* This struct contains the JPEG compression parameters and pointers to + * working space (which is allocated as needed by the JPEG library). + * It is possible to have several such structures, representing multiple + * compression/decompression processes, in existence at once. We refer + * to any one struct (and its associated working data) as a "JPEG object". + */ + struct jpeg_compress_struct cinfo; + /* This struct represents a JPEG error handler. It is declared separately + * because applications often want to supply a specialized error handler + * (see the second half of this file for an example). But here we just + * take the easy way out and use the standard error handler, which will + * print a message on stderr and call exit() if compression fails. + * Note that this struct must live as long as the main JPEG parameter + * struct, to avoid dangling-pointer problems. + */ + struct jpeg_error_mgr jerr; + /* More stuff */ + FILE * outfile; /* target file */ + JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */ + int row_stride; /* physical row width in image buffer */ + + /* Step 1: allocate and initialize JPEG compression object */ + + /* We have to set up the error handler first, in case the initialization + * step fails. (Unlikely, but it could happen if you are out of memory.) + * This routine fills in the contents of struct jerr, and returns jerr's + * address which we place into the link field in cinfo. + */ + cinfo.err = jpeg_std_error(&jerr); + /* Now we can initialize the JPEG compression object. */ + jpeg_create_compress(&cinfo); + + /* Step 2: specify data destination (eg, a file) */ + /* Note: steps 2 and 3 can be done in either order. */ + + /* Here we use the library-supplied code to send compressed data to a + * stdio stream. You can also write your own code to do something else. + * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that + * requires it in order to write binary files. + */ + if ((outfile = fopen(filename, "wb")) == NULL) { + fprintf(stderr, "can't open %s\n", filename); + exit(1); + } + jpeg_stdio_dest(&cinfo, outfile); + + /* Step 3: set parameters for compression */ + + /* First we supply a description of the input image. + * Four fields of the cinfo struct must be filled in: + */ + cinfo.image_width = image_width; /* image width and height, in pixels */ + cinfo.image_height = image_height; + cinfo.input_components = 3; /* # of color components per pixel */ + cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ + /* Now use the library's routine to set default compression parameters. + * (You must set at least cinfo.in_color_space before calling this, + * since the defaults depend on the source color space.) + */ + jpeg_set_defaults(&cinfo); + /* Now you can set any non-default parameters you wish to. + * Here we just illustrate the use of quality (quantization table) scaling: + */ + jpeg_set_quality(&cinfo, quality, TRUE /* limit to baseline-JPEG values */); + + /* Step 4: Start compressor */ + + /* TRUE ensures that we will write a complete interchange-JPEG file. + * Pass TRUE unless you are very sure of what you're doing. + */ + jpeg_start_compress(&cinfo, TRUE); + + /* Step 5: while (scan lines remain to be written) */ + /* jpeg_write_scanlines(...); */ + + /* Here we use the library's state variable cinfo.next_scanline as the + * loop counter, so that we don't have to keep track ourselves. + * To keep things simple, we pass one scanline per call; you can pass + * more if you wish, though. + */ + row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */ + + while (cinfo.next_scanline < cinfo.image_height) { + /* jpeg_write_scanlines expects an array of pointers to scanlines. + * Here the array is only one element long, but you could pass + * more than one scanline at a time if that's more convenient. + */ + row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride]; + (void) jpeg_write_scanlines(&cinfo, row_pointer, 1); + } + + /* Step 6: Finish compression */ + + jpeg_finish_compress(&cinfo); + /* After finish_compress, we can close the output file. */ + fclose(outfile); + + /* Step 7: release JPEG compression object */ + + /* This is an important step since it will release a good deal of memory. */ + jpeg_destroy_compress(&cinfo); + + /* And we're done! */ +} + + +/* + * SOME FINE POINTS: + * + * In the above loop, we ignored the return value of jpeg_write_scanlines, + * which is the number of scanlines actually written. We could get away + * with this because we were only relying on the value of cinfo.next_scanline, + * which will be incremented correctly. If you maintain additional loop + * variables then you should be careful to increment them properly. + * Actually, for output to a stdio stream you needn't worry, because + * then jpeg_write_scanlines will write all the lines passed (or else exit + * with a fatal error). Partial writes can only occur if you use a data + * destination module that can demand suspension of the compressor. + * (If you don't know what that's for, you don't need it.) + * + * If the compressor requires full-image buffers (for entropy-coding + * optimization or a multi-scan JPEG file), it will create temporary + * files for anything that doesn't fit within the maximum-memory setting. + * (Note that temp files are NOT needed if you use the default parameters.) + * On some systems you may need to set up a signal handler to ensure that + * temporary files are deleted if the program is interrupted. See libjpeg.doc. + * + * Scanlines MUST be supplied in top-to-bottom order if you want your JPEG + * files to be compatible with everyone else's. If you cannot readily read + * your data in that order, you'll need an intermediate array to hold the + * image. See rdtarga.c or rdbmp.c for examples of handling bottom-to-top + * source data using the JPEG code's internal virtual-array mechanisms. + */ + + + +/******************** JPEG DECOMPRESSION SAMPLE INTERFACE *******************/ + +/* This half of the example shows how to read data from the JPEG decompressor. + * It's a bit more refined than the above, in that we show: + * (a) how to modify the JPEG library's standard error-reporting behavior; + * (b) how to allocate workspace using the library's memory manager. + * + * Just to make this example a little different from the first one, we'll + * assume that we do not intend to put the whole image into an in-memory + * buffer, but to send it line-by-line someplace else. We need a one- + * scanline-high JSAMPLE array as a work buffer, and we will let the JPEG + * memory manager allocate it for us. This approach is actually quite useful + * because we don't need to remember to deallocate the buffer separately: it + * will go away automatically when the JPEG object is cleaned up. + */ + + +/* + * ERROR HANDLING: + * + * The JPEG library's standard error handler (jerror.c) is divided into + * several "methods" which you can override individually. This lets you + * adjust the behavior without duplicating a lot of code, which you might + * have to update with each future release. + * + * Our example here shows how to override the "error_exit" method so that + * control is returned to the library's caller when a fatal error occurs, + * rather than calling exit() as the standard error_exit method does. + * + * We use C's setjmp/longjmp facility to return control. This means that the + * routine which calls the JPEG library must first execute a setjmp() call to + * establish the return point. We want the replacement error_exit to do a + * longjmp(). But we need to make the setjmp buffer accessible to the + * error_exit routine. To do this, we make a private extension of the + * standard JPEG error handler object. (If we were using C++, we'd say we + * were making a subclass of the regular error handler.) + * + * Here's the extended error handler struct: + */ + +struct my_error_mgr { + struct jpeg_error_mgr pub; /* "public" fields */ + + jmp_buf setjmp_buffer; /* for return to caller */ +}; + +typedef struct my_error_mgr * my_error_ptr; + +/* + * Here's the routine that will replace the standard error_exit method: + */ + +METHODDEF(void) +my_error_exit (j_common_ptr cinfo) +{ + /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */ + my_error_ptr myerr = (my_error_ptr) cinfo->err; + + /* Always display the message. */ + /* We could postpone this until after returning, if we chose. */ + (*cinfo->err->output_message) (cinfo); + + /* Return control to the setjmp point */ + longjmp(myerr->setjmp_buffer, 1); +} + + +/* + * Sample routine for JPEG decompression. We assume that the source file name + * is passed in. We want to return 1 on success, 0 on error. + */ + + +GLOBAL(int) +read_JPEG_file (char * filename) +{ + /* This struct contains the JPEG decompression parameters and pointers to + * working space (which is allocated as needed by the JPEG library). + */ + struct jpeg_decompress_struct cinfo; + /* We use our private extension JPEG error handler. + * Note that this struct must live as long as the main JPEG parameter + * struct, to avoid dangling-pointer problems. + */ + struct my_error_mgr jerr; + /* More stuff */ + FILE * infile; /* source file */ + JSAMPARRAY buffer; /* Output row buffer */ + int row_stride; /* physical row width in output buffer */ + + /* In this example we want to open the input file before doing anything else, + * so that the setjmp() error recovery below can assume the file is open. + * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that + * requires it in order to read binary files. + */ + + if ((infile = fopen(filename, "rb")) == NULL) { + fprintf(stderr, "can't open %s\n", filename); + return 0; + } + + /* Step 1: allocate and initialize JPEG decompression object */ + + /* We set up the normal JPEG error routines, then override error_exit. */ + cinfo.err = jpeg_std_error(&jerr.pub); + jerr.pub.error_exit = my_error_exit; + /* Establish the setjmp return context for my_error_exit to use. */ + if (setjmp(jerr.setjmp_buffer)) { + /* If we get here, the JPEG code has signaled an error. + * We need to clean up the JPEG object, close the input file, and return. + */ + jpeg_destroy_decompress(&cinfo); + fclose(infile); + return 0; + } + /* Now we can initialize the JPEG decompression object. */ + jpeg_create_decompress(&cinfo); + + /* Step 2: specify data source (eg, a file) */ + + jpeg_stdio_src(&cinfo, infile); + + /* Step 3: read file parameters with jpeg_read_header() */ + + (void) jpeg_read_header(&cinfo, TRUE); + /* We can ignore the return value from jpeg_read_header since + * (a) suspension is not possible with the stdio data source, and + * (b) we passed TRUE to reject a tables-only JPEG file as an error. + * See libjpeg.doc for more info. + */ + + /* Step 4: set parameters for decompression */ + + /* In this example, we don't need to change any of the defaults set by + * jpeg_read_header(), so we do nothing here. + */ + + /* Step 5: Start decompressor */ + + (void) jpeg_start_decompress(&cinfo); + /* We can ignore the return value since suspension is not possible + * with the stdio data source. + */ + + /* We may need to do some setup of our own at this point before reading + * the data. After jpeg_start_decompress() we have the correct scaled + * output image dimensions available, as well as the output colormap + * if we asked for color quantization. + * In this example, we need to make an output work buffer of the right size. + */ + /* JSAMPLEs per row in output buffer */ + row_stride = cinfo.output_width * cinfo.output_components; + /* Make a one-row-high sample array that will go away when done with image */ + buffer = (*cinfo.mem->alloc_sarray) + ((j_common_ptr) &cinfo, JPOOL_IMAGE, row_stride, 1); + + /* Step 6: while (scan lines remain to be read) */ + /* jpeg_read_scanlines(...); */ + + /* Here we use the library's state variable cinfo.output_scanline as the + * loop counter, so that we don't have to keep track ourselves. + */ + while (cinfo.output_scanline < cinfo.output_height) { + /* jpeg_read_scanlines expects an array of pointers to scanlines. + * Here the array is only one element long, but you could ask for + * more than one scanline at a time if that's more convenient. + */ + (void) jpeg_read_scanlines(&cinfo, buffer, 1); + /* Assume put_scanline_someplace wants a pointer and sample count. */ + put_scanline_someplace(buffer[0], row_stride); + } + + /* Step 7: Finish decompression */ + + (void) jpeg_finish_decompress(&cinfo); + /* We can ignore the return value since suspension is not possible + * with the stdio data source. + */ + + /* Step 8: Release JPEG decompression object */ + + /* This is an important step since it will release a good deal of memory. */ + jpeg_destroy_decompress(&cinfo); + + /* After finish_decompress, we can close the input file. + * Here we postpone it until after no more JPEG errors are possible, + * so as to simplify the setjmp error logic above. (Actually, I don't + * think that jpeg_destroy can do an error exit, but why assume anything...) + */ + fclose(infile); + + /* At this point you may want to check to see whether any corrupt-data + * warnings occurred (test whether jerr.pub.num_warnings is nonzero). + */ + + /* And we're done! */ + return 1; +} + + +/* + * SOME FINE POINTS: + * + * In the above code, we ignored the return value of jpeg_read_scanlines, + * which is the number of scanlines actually read. We could get away with + * this because we asked for only one line at a time and we weren't using + * a suspending data source. See libjpeg.doc for more info. + * + * We cheated a bit by calling alloc_sarray() after jpeg_start_decompress(); + * we should have done it beforehand to ensure that the space would be + * counted against the JPEG max_memory setting. In some systems the above + * code would risk an out-of-memory error. However, in general we don't + * know the output image dimensions before jpeg_start_decompress(), unless we + * call jpeg_calc_output_dimensions(). See libjpeg.doc for more about this. + * + * Scanlines are returned in the same order as they appear in the JPEG file, + * which is standardly top-to-bottom. If you must emit data bottom-to-top, + * you can use one of the virtual arrays provided by the JPEG memory manager + * to invert the data. See wrbmp.c for an example. + * + * As with compression, some operating modes may require temporary files. + * On some systems you may need to set up a signal handler to ensure that + * temporary files are deleted if the program is interrupted. See libjpeg.doc. + */ diff --git a/windows_libs/jpeg-6a/filelist.doc b/windows_libs/jpeg-6a/filelist.doc new file mode 100644 index 00000000..707dc1c6 --- /dev/null +++ b/windows_libs/jpeg-6a/filelist.doc @@ -0,0 +1,203 @@ +IJG JPEG LIBRARY: FILE LIST + +Copyright (C) 1994-1996, Thomas G. Lane. +This file is part of the Independent JPEG Group's software. +For conditions of distribution and use, see the accompanying README file. + + +Here is a road map to the files in the IJG JPEG distribution. The +distribution includes the JPEG library proper, plus two application +programs ("cjpeg" and "djpeg") which use the library to convert JPEG +files to and from some other popular image formats. A third application +"jpegtran" uses the library to do lossless conversion between different +variants of JPEG. There are also two stand-alone applications, +"rdjpgcom" and "wrjpgcom". + + +THE JPEG LIBRARY +================ + +Include files: + +jpeglib.h JPEG library's exported data and function declarations. +jconfig.h Configuration declarations. Note: this file is not present + in the distribution; it is generated during installation. +jmorecfg.h Additional configuration declarations; need not be changed + for a standard installation. +jerror.h Declares JPEG library's error and trace message codes. +jinclude.h Central include file used by all IJG .c files to reference + system include files. +jpegint.h JPEG library's internal data structures. +jchuff.h Private declarations for Huffman encoder modules. +jdhuff.h Private declarations for Huffman decoder modules. +jdct.h Private declarations for forward & reverse DCT subsystems. +jmemsys.h Private declarations for memory management subsystem. +jversion.h Version information. + +Applications using the library should include jpeglib.h (which in turn +includes jconfig.h and jmorecfg.h). Optionally, jerror.h may be included +if the application needs to reference individual JPEG error codes. The +other include files are intended for internal use and would not normally +be included by an application program. (cjpeg/djpeg/etc do use jinclude.h, +since its function is to improve portability of the whole IJG distribution. +Most other applications will directly include the system include files they +want, and hence won't need jinclude.h.) + + +C source code files: + +These files contain most of the functions intended to be called directly by +an application program: + +jcapimin.c Application program interface: core routines for compression. +jcapistd.c Application program interface: standard compression. +jdapimin.c Application program interface: core routines for decompression. +jdapistd.c Application program interface: standard decompression. +jcomapi.c Application program interface routines common to compression + and decompression. +jcparam.c Compression parameter setting helper routines. +jctrans.c API and library routines for transcoding compression. +jdtrans.c API and library routines for transcoding decompression. + +Compression side of the library: + +jcinit.c Initialization: determines which other modules to use. +jcmaster.c Master control: setup and inter-pass sequencing logic. +jcmainct.c Main buffer controller (preprocessor => JPEG compressor). +jcprepct.c Preprocessor buffer controller. +jccoefct.c Buffer controller for DCT coefficient buffer. +jccolor.c Color space conversion. +jcsample.c Downsampling. +jcdctmgr.c DCT manager (DCT implementation selection & control). +jfdctint.c Forward DCT using slow-but-accurate integer method. +jfdctfst.c Forward DCT using faster, less accurate integer method. +jfdctflt.c Forward DCT using floating-point arithmetic. +jchuff.c Huffman entropy coding for sequential JPEG. +jcphuff.c Huffman entropy coding for progressive JPEG. +jcmarker.c JPEG marker writing. +jdatadst.c Data destination manager for stdio output. + +Decompression side of the library: + +jdmaster.c Master control: determines which other modules to use. +jdinput.c Input controller: controls input processing modules. +jdmainct.c Main buffer controller (JPEG decompressor => postprocessor). +jdcoefct.c Buffer controller for DCT coefficient buffer. +jdpostct.c Postprocessor buffer controller. +jdmarker.c JPEG marker reading. +jdhuff.c Huffman entropy decoding for sequential JPEG. +jdphuff.c Huffman entropy decoding for progressive JPEG. +jddctmgr.c IDCT manager (IDCT implementation selection & control). +jidctint.c Inverse DCT using slow-but-accurate integer method. +jidctfst.c Inverse DCT using faster, less accurate integer method. +jidctflt.c Inverse DCT using floating-point arithmetic. +jidctred.c Inverse DCTs with reduced-size outputs. +jdsample.c Upsampling. +jdcolor.c Color space conversion. +jdmerge.c Merged upsampling/color conversion (faster, lower quality). +jquant1.c One-pass color quantization using a fixed-spacing colormap. +jquant2.c Two-pass color quantization using a custom-generated colormap. + Also handles one-pass quantization to an externally given map. +jdatasrc.c Data source manager for stdio input. + +Support files for both compression and decompression: + +jerror.c Standard error handling routines (application replaceable). +jmemmgr.c System-independent (more or less) memory management code. +jutils.c Miscellaneous utility routines. + +jmemmgr.c relies on a system-dependent memory management module. The IJG +distribution includes the following implementations of the system-dependent +module: + +jmemnobs.c "No backing store": assumes adequate virtual memory exists. +jmemansi.c Makes temporary files with ANSI-standard routine tmpfile(). +jmemname.c Makes temporary files with program-generated file names. +jmemdos.c Custom implementation for MS-DOS: knows about extended and + expanded memory as well as temporary files. +jmemmac.c Custom implementation for Apple Macintosh. + +Exactly one of the system-dependent modules should be configured into an +installed JPEG library (see install.doc for hints about which one to use). +On unusual systems you may find it worthwhile to make a special +system-dependent memory manager. + + +Non-C source code files: + +jmemdosa.asm 80x86 assembly code support for jmemdos.c; used only in + MS-DOS-specific configurations of the JPEG library. + + +CJPEG/DJPEG/JPEGTRAN +==================== + +Include files: + +cdjpeg.h Declarations shared by cjpeg/djpeg modules. +cderror.h Additional error and trace message codes for cjpeg/djpeg. + +C source code files: + +cjpeg.c Main program for cjpeg. +djpeg.c Main program for djpeg. +jpegtran.c Main program for jpegtran. +cdjpeg.c Utility routines used by all three programs. +rdcolmap.c Code to read a colormap file for djpeg's "-map" switch. +rdswitch.c Code to process some of cjpeg's more complex switches. + Also used by jpegtran. + +Image file reader modules for cjpeg: + +rdbmp.c BMP file input. +rdgif.c GIF file input. +rdppm.c PPM/PGM file input. +rdrle.c Utah RLE file input. +rdtarga.c Targa file input. + +Image file writer modules for djpeg: + +wrbmp.c BMP file output. +wrgif.c GIF file output. +wrppm.c PPM/PGM file output. +wrrle.c Utah RLE file output. +wrtarga.c Targa file output. + + +RDJPGCOM/WRJPGCOM +================= + +C source code files: + +rdjpgcom.c Stand-alone rdjpgcom application. +wrjpgcom.c Stand-alone wrjpgcom application. + +These programs do not depend on the IJG library. They do use +jconfig.h and jinclude.h, only to improve portability. + + +ADDITIONAL FILES +================ + +Documentation (see README for a guide to the documentation files): + +README Master documentation file. +*.doc Other documentation files. +*.1 Documentation in Unix man page format. +change.log Version-to-version change highlights. +example.c Sample code for calling JPEG library. + +Configuration/installation files and programs (see install.doc for more info): + +configure Unix shell script to perform automatic configuration. +ckconfig.c Program to generate jconfig.h on non-Unix systems. +jconfig.doc Template for making jconfig.h by hand. +makefile.* Sample makefiles for particular systems. +jconfig.* Sample jconfig.h for particular systems. +ansi2knr.c De-ANSIfier for pre-ANSI C compilers (courtesy of + L. Peter Deutsch and Aladdin Enterprises). + +Test files (see install.doc for test procedure): + +test*.* Source and comparison files for confidence test. + These are binary image files, NOT text files. diff --git a/windows_libs/jpeg-6a/install.doc b/windows_libs/jpeg-6a/install.doc new file mode 100644 index 00000000..585b29b2 --- /dev/null +++ b/windows_libs/jpeg-6a/install.doc @@ -0,0 +1,931 @@ +INSTALLATION INSTRUCTIONS for the Independent JPEG Group's JPEG software + +Copyright (C) 1991-1996, Thomas G. Lane. +This file is part of the Independent JPEG Group's software. +For conditions of distribution and use, see the accompanying README file. + + +This file explains how to configure and install the IJG software. We have +tried to make this software extremely portable and flexible, so that it can be +adapted to almost any environment. The downside of this decision is that the +installation process is complicated. We have provided shortcuts to simplify +the task on common systems. But in any case, you will need at least a little +familiarity with C programming and program build procedures for your system. + +If you are only using this software as part of a larger program, the larger +program's installation procedure may take care of configuring the IJG code. +For example, Ghostscript's installation script will configure the IJG code. +You don't need to read this file if you just want to compile Ghostscript. + +If you are on a Unix machine, you may not need to read this file at all. +Try doing + ./configure + make + make test +If that doesn't complain, do + make install +(better do "make -n install" first to see if the makefile will put the files +where you want them). Read further if you run into snags or want to customize +the code for your system. + + +TABLE OF CONTENTS +----------------- + +Before you start +Configuring the software: + using the automatic "configure" script + using one of the supplied jconfig and makefile files + by hand +Building the software +Testing the software +Installing the software +Optional stuff +Optimization +Hints for specific systems + + +BEFORE YOU START +================ + +Before installing the software you must unpack the distributed source code. +Since you are reading this file, you have probably already succeeded in this +task. However, there is a potential for error if you needed to convert the +files to the local standard text file format (for example, if you are on +MS-DOS you may have converted LF end-of-line to CR/LF). You must apply +such conversion to all the files EXCEPT those whose names begin with "test". +The test files contain binary data; if you change them in any way then the +self-test will give bad results. + +Please check the last section of this file to see if there are hints for the +specific machine or compiler you are using. + + +CONFIGURING THE SOFTWARE +======================== + +To configure the IJG code for your system, you need to create two files: + * jconfig.h: contains values for system-dependent #define symbols. + * Makefile: controls the compilation process. +(On a non-Unix machine, you may create "project files" or some other +substitute for a Makefile. jconfig.h is needed in any environment.) + +We provide three different ways to generate these files: + * On a Unix system, you can just run the "configure" script. + * We provide sample jconfig files and makefiles for popular machines; + if your machine matches one of the samples, just copy the right sample + files to jconfig.h and Makefile. + * If all else fails, read the instructions below and make your own files. + + +Configuring the software using the automatic "configure" script +--------------------------------------------------------------- + +If you are on a Unix machine, you can just type + ./configure +and let the configure script construct appropriate configuration files. +If you're using "csh" on an old version of System V, you might need to type + sh configure +instead to prevent csh from trying to execute configure itself. +Expect configure to run for a few minutes, particularly on slower machines; +it works by compiling a series of test programs. + +Configure was created with GNU Autoconf and it follows the usual conventions +for GNU configure scripts. It makes a few assumptions that you may want to +override. You can do this by providing optional switches to configure: + +* Configure will use gcc (GNU C compiler) if it's available, otherwise cc. +To force a particular compiler to be selected, use the CC option, for example + ./configure CC='cc' +The same method can be used to include any unusual compiler switches. +For example, on HP-UX you probably want to say + ./configure CC='cc -Aa' +to get HP's compiler to run in ANSI mode. + +* The default CFLAGS setting is "-O". You can override this by saying, +for example, ./configure CFLAGS='-O2'. + +* Configure will set up the makefile so that "make install" will install files +into /usr/local/bin, /usr/local/man, etc. You can specify an installation +prefix other than "/usr/local" by giving configure the option "--prefix=PATH". + +* If you don't have a lot of swap space, you may need to enable the IJG +software's internal virtual memory mechanism. To do this, give the option +"--enable-maxmem=N" where N is the default maxmemory limit in megabytes. +This is discussed in more detail under "Selecting a memory manager", below. +You probably don't need to worry about this on reasonably-sized Unix machines, +unless you plan to process very large images. + +Configure has some other features that are useful if you are cross-compiling +or working in a network of multiple machine types; but if you need those +features, you probably already know how to use them. + + +Configuring the software using one of the supplied jconfig and makefile files +----------------------------------------------------------------------------- + +If you have one of these systems, you can just use the provided configuration +files: + +Makefile jconfig file System and/or compiler + +makefile.manx jconfig.manx Amiga, Manx Aztec C +makefile.sas jconfig.sas Amiga, SAS C +mak*jpeg.st jconfig.st Atari ST/STE/TT, Pure C or Turbo C +makefile.bcc jconfig.bcc MS-DOS or OS/2, Borland C +makefile.dj jconfig.dj MS-DOS, DJGPP (Delorie's port of GNU C) +makefile.mc6 jconfig.mc6 MS-DOS, Microsoft C version 6.x and up +makefile.wat jconfig.wat MS-DOS, OS/2, or Windows NT, Watcom C +makefile.mms jconfig.vms Digital VMS, with MMS software +makefile.vms jconfig.vms Digital VMS, without MMS software + +Copy the proper jconfig file to jconfig.h and the makefile to Makefile +(or whatever your system uses as the standard makefile name). For the +Atari, we provide four project files; see the Atari hints below. + + +Configuring the software by hand +-------------------------------- + +First, generate a jconfig.h file. If you are moderately familiar with C, +the comments in jconfig.doc should be enough information to do this; just +copy jconfig.doc to jconfig.h and edit it appropriately. Otherwise, you may +prefer to use the ckconfig.c program. You will need to compile and execute +ckconfig.c by hand --- we hope you know at least enough to do that. +ckconfig.c may not compile the first try (in fact, the whole idea is for it +to fail if anything is going to). If you get compile errors, fix them by +editing ckconfig.c according to the directions given in ckconfig.c. Once +you get it to run, it will write a suitable jconfig.h file, and will also +print out some advice about which makefile to use. + +You may also want to look at the canned jconfig files, if there is one for a +system similar to yours. + +Second, select a makefile and copy it to Makefile (or whatever your system +uses as the standard makefile name). The most generic makefiles we provide +are + makefile.ansi: if your C compiler supports function prototypes + makefile.unix: if not. +(You have function prototypes if ckconfig.c put "#define HAVE_PROTOTYPES" +in jconfig.h.) You may want to start from one of the other makefiles if +there is one for a system similar to yours. + +Look over the selected Makefile and adjust options as needed. In particular +you may want to change the CC and CFLAGS definitions. For instance, if you +are using GCC, set CC=gcc. If you had to use any compiler switches to get +ckconfig.c to work, make sure the same switches are in CFLAGS. + +If you are on a system that doesn't use makefiles, you'll need to set up +project files (or whatever you do use) to compile all the source files and +link them into executable files cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom. +See the file lists in any of the makefiles to find out which files go into +each program. Note that the provided makefiles all make a "library" file +libjpeg first, but you don't have to do that if you don't want to; the file +lists identify which source files are actually needed for compression, +decompression, or both. As a last resort, you can make a batch script that +just compiles everything and links it all together; makefile.vms is an example +of this (it's for VMS systems that have no make-like utility). + +Here are comments about some specific configuration decisions you'll +need to make: + +Command line style +------------------ + +These programs can use a Unix-like command line style which supports +redirection and piping, like this: + cjpeg inputfile >outputfile + cjpeg outputfile + source program | cjpeg >outputfile +The simpler "two file" command line style is just + cjpeg inputfile outputfile +You may prefer the two-file style, particularly if you don't have pipes. + +You MUST use two-file style on any system that doesn't cope well with binary +data fed through stdin/stdout; this is true for some MS-DOS compilers, for +example. If you're not on a Unix system, it's safest to assume you need +two-file style. (But if your compiler provides either the Posix-standard +fdopen() library routine or a Microsoft-compatible setmode() routine, you +can safely use the Unix command line style, by defining USE_FDOPEN or +USE_SETMODE respectively.) + +To use the two-file style, make jconfig.h say "#define TWO_FILE_COMMANDLINE". + +Selecting a memory manager +-------------------------- + +The IJG code is capable of working on images that are too big to fit in main +memory; data is swapped out to temporary files as necessary. However, the +code to do this is rather system-dependent. We provide five different +memory managers: + +* jmemansi.c This version uses the ANSI-standard library routine tmpfile(), + which not all non-ANSI systems have. On some systems + tmpfile() may put the temporary file in a non-optimal + location; if you don't like what it does, use jmemname.c. + +* jmemname.c This version creates named temporary files. For anything + except a Unix machine, you'll need to configure the + select_file_name() routine appropriately; see the comments + near the head of jmemname.c. If you use this version, define + NEED_SIGNAL_CATCHER in jconfig.h to make sure the temp files + are removed if the program is aborted. + +* jmemnobs.c (That stands for No Backing Store :-).) This will compile on + almost any system, but it assumes you have enough main memory + or virtual memory to hold the biggest images you work with. + +* jmemdos.c This should be used with most 16-bit MS-DOS compilers. + See the system-specific notes about MS-DOS for more info. + IMPORTANT: if you use this, define USE_MSDOS_MEMMGR in + jconfig.h, and include the assembly file jmemdosa.asm in the + programs. The supplied makefiles and jconfig files for + 16-bit MS-DOS compilers already do both. + +* jmemmac.c Custom version for Apple Macintosh; see the system-specific + notes for Macintosh for more info. + +To use a particular memory manager, change the SYSDEPMEM variable in your +makefile to equal the corresponding object file name (for example, jmemansi.o +or jmemansi.obj for jmemansi.c). + +If you have plenty of (real or virtual) main memory, just use jmemnobs.c. +"Plenty" means about ten bytes for every pixel in the largest images +you plan to process, so a lot of systems don't meet this criterion. +If yours doesn't, try jmemansi.c first. If that doesn't compile, you'll have +to use jmemname.c; be sure to adjust select_file_name() for local conditions. +You may also need to change unlink() to remove() in close_backing_store(). + +Except with jmemnobs.c or jmemmac.c, you need to adjust the DEFAULT_MAX_MEM +setting to a reasonable value for your system (either by adding a #define for +DEFAULT_MAX_MEM to jconfig.h, or by adding a -D switch to the Makefile). +This value limits the amount of data space the program will attempt to +allocate. Code and static data space isn't counted, so the actual memory +needs for cjpeg or djpeg are typically 100 to 150Kb more than the max-memory +setting. Larger max-memory settings reduce the amount of I/O needed to +process a large image, but too large a value can result in "insufficient +memory" failures. On most Unix machines (and other systems with virtual +memory), just set DEFAULT_MAX_MEM to several million and forget it. At the +other end of the spectrum, for MS-DOS machines you probably can't go much +above 300K to 400K. (On MS-DOS the value refers to conventional memory only. +Extended/expanded memory is handled separately by jmemdos.c.) + + +BUILDING THE SOFTWARE +===================== + +Now you should be able to compile the software. Just say "make" (or +whatever's necessary to start the compilation). Have a cup of coffee. + +Here are some things that could go wrong: + +If your compiler complains about undefined structures, you should be able to +shut it up by putting "#define INCOMPLETE_TYPES_BROKEN" in jconfig.h. + +If you have trouble with missing system include files or inclusion of the +wrong ones, read jinclude.h. This shouldn't happen if you used configure +or ckconfig.c to set up jconfig.h. + +There are a fair number of routines that do not use all of their parameters; +some compilers will issue warnings about this, which you can ignore. There +are also a few configuration checks that may give "unreachable code" warnings. +Any other warning deserves investigation. + +If you don't have a getenv() library routine, define NO_GETENV. + +Also see the system-specific hints, below. + + +TESTING THE SOFTWARE +==================== + +As a quick test of functionality we've included a small sample image in +several forms: + testorig.jpg Starting point for the djpeg tests. + testimg.ppm The output of djpeg testorig.jpg + testimg.gif The output of djpeg -gif testorig.jpg + testimg.jpg The output of cjpeg testimg.ppm + testprog.jpg Progressive-mode equivalent of testorig.jpg. + testimgp.jpg The output of cjpeg -progressive -optimize testimg.ppm +(The first- and second-generation .jpg files aren't identical since JPEG is +lossy.) If you can generate duplicates of the testimg* files then you +probably have working programs. + +With most of the makefiles, "make test" will perform the necessary +comparisons. + +If you're using a makefile that doesn't provide the test option, run djpeg +and cjpeg by hand and compare the output files to testimg* with whatever +binary file comparison tool you have. The files should be bit-for-bit +identical. + +If the programs complain "MAX_ALLOC_CHUNK is wrong, please fix", then you +need to reduce MAX_ALLOC_CHUNK to a value that fits in type size_t. +Try adding "#define MAX_ALLOC_CHUNK 65520L" to jconfig.h. A less likely +configuration error is "ALIGN_TYPE is wrong, please fix": defining ALIGN_TYPE +as long should take care of that one. + +If the cjpeg test run fails with "Missing Huffman code table entry", it's a +good bet that you needed to define RIGHT_SHIFT_IS_UNSIGNED. Go back to the +configuration step and run ckconfig.c. (This is a good plan for any other +test failure, too.) + +If you are using Unix (one-file) command line style on a non-Unix system, +it's a good idea to check that binary I/O through stdin/stdout actually +works. You should get the same results from "djpeg out.ppm" +as from "djpeg -outfile out.ppm testorig.jpg". Note that the makefiles all +use the latter style and therefore do not exercise stdin/stdout! If this +check fails, try recompiling with USE_SETMODE or USE_FDOPEN defined. +If it still doesn't work, better use two-file style. + +If you chose a memory manager other than jmemnobs.c, you should test that +temporary-file usage works. Try "djpeg -gif -max 0 testorig.jpg" and make +sure its output matches testimg.gif. If you have any really large images +handy, try compressing them with -optimize and/or decompressing with -gif to +make sure your DEFAULT_MAX_MEM setting is not too large. + +NOTE: this is far from an exhaustive test of the JPEG software; some modules, +such as 1-pass color quantization, are not exercised at all. It's just a +quick test to give you some confidence that you haven't missed something +major. + + +INSTALLING THE SOFTWARE +======================= + +Once you're done with the above steps, you can install the software by +copying the executable files (cjpeg, djpeg, jpegtran, rdjpgcom, and wrjpgcom) +to wherever you normally install programs. On Unix systems, you'll also want +to put the man pages (cjpeg.1, djpeg.1, jpegtran.1, rdjpgcom.1, wrjpgcom.1) +in the man-page directory. The canned makefiles don't support this step +since there's such a wide variety of installation procedures on different +systems. + +If you generated a Makefile with the "configure" script, you can just say + make install +to install the programs and their man pages into the standard places. +(You'll probably need to be root to do this.) We recommend first saying + make -n install +to see where configure thought the files should go. You may need to edit +the Makefile, particularly if your system's conventions for man page +filenames don't match what configure expects. + +If you want to install the library file libjpeg.a and the include files j*.h +(for use in compiling other programs besides the IJG ones), then say + make install-lib + + +OPTIONAL STUFF +============== + +Progress monitor: + +If you like, you can #define PROGRESS_REPORT (in jconfig.h) to enable display +of percent-done progress reports. The routine provided in cdjpeg.c merely +prints percentages to stderr, but you can customize it to do something +fancier. + +Utah RLE file format support: + +We distribute the software with support for RLE image files (Utah Raster +Toolkit format) disabled, because the RLE support won't compile without the +Utah library. If you have URT version 3.1 or later, you can enable RLE +support as follows: + 1. #define RLE_SUPPORTED in jconfig.h. + 2. Add a -I option to CFLAGS in the Makefile for the directory + containing the URT .h files (typically the "include" + subdirectory of the URT distribution). + 3. Add -L... -lrle to LDLIBS in the Makefile, where ... specifies + the directory containing the URT "librle.a" file (typically the + "lib" subdirectory of the URT distribution). + +Support for 12-bit-deep pixel data: + +The JPEG standard allows either 8-bit or 12-bit data precision. (For color, +this means 8 or 12 bits per channel, of course.) If you need to work with +deeper than 8-bit data, you can compile the IJG code for 12-bit operation. +To do so: + 1. In jmorecfg.h, define BITS_IN_JSAMPLE as 12 rather than 8. + 2. In jconfig.h, undefine BMP_SUPPORTED, RLE_SUPPORTED, and TARGA_SUPPORTED, + because the code for those formats doesn't handle 12-bit data and won't + even compile. (The PPM code does work, as explained below. The GIF + code works too; it scales 8-bit GIF data to and from 12-bit depth + automatically.) + 3. Compile. Don't expect "make test" to pass, since the supplied test + files are for 8-bit data. + +Currently, 12-bit support does not work on 16-bit-int machines. + +Note that a 12-bit version will not read 8-bit JPEG files, nor vice versa; +so you'll want to keep around a regular 8-bit compilation as well. +(Run-time selection of data depth, to allow a single copy that does both, +is possible but would probably slow things down considerably; it's very low +on our to-do list.) + +The PPM reader (rdppm.c) can read 12-bit data from either text-format or +binary-format PPM and PGM files. Binary-format PPM/PGM files which have a +maxval greater than 255 are assumed to use 2 bytes per sample, LSB first +(little-endian order). As of early 1995, 2-byte binary format is not +officially supported by the PBMPLUS library, but it is expected that the +next release of PBMPLUS will support it. Note that the PPM reader will +read files of any maxval regardless of the BITS_IN_JSAMPLE setting; incoming +data is automatically rescaled to either maxval=255 or maxval=4095 as +appropriate for the cjpeg bit depth. + +The PPM writer (wrppm.c) will normally write 2-byte binary PPM or PGM +format, maxval 4095, when compiled with BITS_IN_JSAMPLE=12. Since this +format is not yet widely supported, you can disable it by compiling wrppm.c +with PPM_NORAWWORD defined; then the data is scaled down to 8 bits to make a +standard 1-byte/sample PPM or PGM file. (Yes, this means still another copy +of djpeg to keep around. But hopefully you won't need it for very long. +Poskanzer's supposed to get that new PBMPLUS release out Real Soon Now.) + +Of course, if you are working with 12-bit data, you probably have it stored +in some other, nonstandard format. In that case you'll probably want to +write your own I/O modules to read and write your format. + +Note that a 12-bit version of cjpeg always runs in "-optimize" mode, in +order to generate valid Huffman tables. This is necessary because our +default Huffman tables only cover 8-bit data. + +Removing code: + +If you need to make a smaller version of the JPEG software, some optional +functions can be removed at compile time. See the xxx_SUPPORTED #defines in +jconfig.h and jmorecfg.h. If at all possible, we recommend that you leave in +decoder support for all valid JPEG files, to ensure that you can read anyone's +output. Taking out support for image file formats that you don't use is the +most painless way to make the programs smaller. Another possibility is to +remove some of the DCT methods: in particular, the "IFAST" method may not be +enough faster than the others to be worth keeping on your machine. (If you +do remove ISLOW or IFAST, be sure to redefine JDCT_DEFAULT or JDCT_FASTEST +to a supported method, by adding a #define in jconfig.h.) + + +OPTIMIZATION +============ + +Unless you own a Cray, you'll probably be interested in making the JPEG +software go as fast as possible. This section covers some machine-dependent +optimizations you may want to try. We suggest that before trying any of +this, you first get the basic installation to pass the self-test step. +Repeat the self-test after any optimization to make sure that you haven't +broken anything. + +The integer DCT routines perform a lot of multiplications. These +multiplications must yield 32-bit results, but none of their input values +are more than 16 bits wide. On many machines, notably the 680x0 and 80x86 +CPUs, a 16x16=>32 bit multiply instruction is faster than a full 32x32=>32 +bit multiply. Unfortunately there is no portable way to specify such a +multiplication in C, but some compilers can generate one when you use the +right combination of casts. See the MULTIPLYxxx macro definitions in +jdct.h. If your compiler makes "int" be 32 bits and "short" be 16 bits, +defining SHORTxSHORT_32 is fairly likely to work. When experimenting with +alternate definitions, be sure to test not only whether the code still works +(use the self-test), but also whether it is actually faster --- on some +compilers, alternate definitions may compute the right answer, yet be slower +than the default. Timing cjpeg on a large PGM (grayscale) input file is the +best way to check this, as the DCT will be the largest fraction of the runtime +in that mode. (Note: some of the distributed compiler-specific jconfig files +already contain #define switches to select appropriate MULTIPLYxxx +definitions.) + +If your machine has sufficiently fast floating point hardware, you may find +that the float DCT method is faster than the integer DCT methods, even +after tweaking the integer multiply macros. In that case you may want to +make the float DCT be the default method. (The only objection to this is +that float DCT results may vary slightly across machines.) To do that, add +"#define JDCT_DEFAULT JDCT_FLOAT" to jconfig.h. Even if you don't change +the default, you should redefine JDCT_FASTEST, which is the method selected +by djpeg's -fast switch. Don't forget to update the documentation files +(usage.doc and/or cjpeg.1, djpeg.1) to agree with what you've done. + +If access to "short" arrays is slow on your machine, it may be a win to +define type JCOEF as int rather than short. This will cost a good deal of +memory though, particularly in some multi-pass modes, so don't do it unless +you have memory to burn and short is REALLY slow. + +If your compiler can compile function calls in-line, make sure the INLINE +macro in jmorecfg.h is defined as the keyword that marks a function +inline-able. Some compilers have a switch that tells the compiler to inline +any function it thinks is profitable (e.g., -finline-functions for gcc). +Enabling such a switch is likely to make the compiled code bigger but faster. + +In general, it's worth trying the maximum optimization level of your compiler, +and experimenting with any optional optimizations such as loop unrolling. +(Unfortunately, far too many compilers have optimizer bugs ... be prepared to +back off if the code fails self-test.) If you do any experimentation along +these lines, please report the optimal settings to jpeg-info@uunet.uu.net so +we can mention them in future releases. Be sure to specify your machine and +compiler version. + + +HINTS FOR SPECIFIC SYSTEMS +========================== + +We welcome reports on changes needed for systems not mentioned here. Submit +'em to jpeg-info@uunet.uu.net. Also, if configure or ckconfig.c is wrong +about how to configure the JPEG software for your system, please let us know. + + +Acorn RISC OS: + +(Thanks to Simon Middleton for these hints on compiling with Desktop C.) +After renaming the files according to Acorn conventions, take a copy of +makefile.ansi, change all occurrences of 'libjpeg.a' to 'libjpeg.o' and +change these definitions as indicated: + +CFLAGS= -throwback -IC: -Wn +LDLIBS=C:o.Stubs +SYSDEPMEM=jmemansi.o +LN=Link +AR=LibFile -c -o + +Also add a new line '.c.o:; $(cc) $< $(cflags) -c -o $@'. Remove the +lines '$(RM) libjpeg.o' and '$(AR2) libjpeg.o' and the 'jconfig.h' +dependency section. + +Copy jconfig.doc to jconfig.h. Edit jconfig.h to define TWO_FILE_COMMANDLINE +and CHAR_IS_UNSIGNED. + +Run the makefile using !AMU not !Make. If you want to use the 'clean' and +'test' makefile entries then you will have to fiddle with the syntax a bit +and rename the test files. + + +Amiga: + +SAS C 6.50 reportedly is too buggy to compile the IJG code properly. +A patch to update to 6.51 is available from SAS or AmiNet FTP sites. + +The supplied config files are set up to use jmemname.c as the memory +manager, with temporary files being created on the device named by +"JPEGTMP:". + + +Atari ST/STE/TT: + +Copy the project files makcjpeg.st, makdjpeg.st, maktjpeg.st, and makljpeg.st +to cjpeg.prj, djpeg.prj, jpegtran.prj, and libjpeg.prj respectively. The +project files should work as-is with Pure C. For Turbo C, change library +filenames "PC..." to "TC..." in each project file. Note that libjpeg.prj +selects jmemansi.c as the recommended memory manager. You'll probably want to +adjust the DEFAULT_MAX_MEM setting --- you want it to be a couple hundred K +less than your normal free memory. Put "#define DEFAULT_MAX_MEM nnnn" into +jconfig.h to do this. + +To use the 68881/68882 coprocessor for the floating point DCT, add the +compiler option "-8" to the project files and replace PCFLTLIB.LIB with +PC881LIB.LIB in cjpeg.prj and djpeg.prj. Or if you don't have a +coprocessor, you may prefer to remove the float DCT code by undefining +DCT_FLOAT_SUPPORTED in jmorecfg.h (since without a coprocessor, the float +code will be too slow to be useful). In that case, you can delete +PCFLTLIB.LIB from the project files. + +Note that you must make libjpeg.lib before making cjpeg.ttp, djpeg.ttp, +or jpegtran.ttp. You'll have to perform the self-test by hand. + +We haven't bothered to include project files for rdjpgcom and wrjpgcom. +Those source files should just be compiled by themselves; they don't +depend on the JPEG library. + +There is a bug in some older versions of the Turbo C library which causes the +space used by temporary files created with "tmpfile()" not to be freed after +an abnormal program exit. If you check your disk afterwards, you will find +cluster chains that are allocated but not used by a file. This should not +happen in cjpeg/djpeg/jpegtran, since we enable a signal catcher to explicitly +close temp files before exiting. But if you use the JPEG library with your +own code, be sure to supply a signal catcher, or else use a different +system-dependent memory manager. + + +Cray: + +Should you be so fortunate as to be running JPEG on a Cray YMP, there is a +compiler bug in old versions of Cray's Standard C (prior to 3.1). If you +still have an old compiler, you'll need to insert a line reading +"#pragma novector" just before the loop + for (i = 1; i <= (int) htbl->bits[l]; i++) + huffsize[p++] = (char) l; +in fix_huff_tbl (in V5beta1, line 204 of jchuff.c and line 176 of jdhuff.c). +[This bug may or may not still occur with the current IJG code, but it's +probably a dead issue anyway...] + + +HP-UX: + +If you have HP-UX 7.05 or later with the "software development" C compiler, +you should run the compiler in ANSI mode. If using the configure script, +say + ./configure CC='cc -Aa' +(or -Ae if you prefer). If configuring by hand, use makefile.ansi and add +"-Aa" to the CFLAGS line in the makefile. + +If you have a pre-7.05 system, or if you are using the non-ANSI C compiler +delivered with a minimum HP-UX system, then you must use makefile.unix +(and do NOT add -Aa); or just run configure without the CC option. + +On HP 9000 series 800 machines, the HP C compiler is buggy in revisions prior +to A.08.07. If you get complaints about "not a typedef name", you'll have to +use makefile.unix, or run configure without the CC option. + + +Macintosh, generic comments: + +The supplied user-interface files (cjpeg.c, djpeg.c, etc) are set up to +provide a Unix-style command line interface. You can use this interface on +the Mac by means of the ccommand() library routine provided by Metrowerks +CodeWarrior or Think C. This is only appropriate for testing the library, +however; to make a user-friendly equivalent of cjpeg/djpeg you'd really want +to develop a Mac-style user interface. Such an interface exists for pre-v5 +IJG libraries (see the Think C entry, below) but at this writing it has not +been updated to work with the current release. + +We recommend replacing "malloc" and "free" by "NewPtr" and "DisposePtr" in +whichever memory manager back end you use, because Mac C libraries often +have inferior implementations of malloc/free. jmemmac.c is recommended; +it is a customized version of jmemansi.c with this change and a Mac-specific +implementation of jpeg_mem_available(). You can also use jmemnobs.c if you +don't care about handling images larger than available memory. + + +Macintosh, MPW: + +We don't directly support MPW in the current release, but Larry Rosenstein +ported an earlier version of the IJG code without very much trouble. There's +useful notes and conversion scripts in his kit for porting PBMPLUS to MPW. +You can obtain the kit by FTP to ftp.apple.com, files /pub/lsr/pbmplus-port*. + + +Macintosh, Metrowerks CodeWarrior: + +Metrowerks release DR2 has problems with the IJG code; don't use it. Release +DR3.5 or later should be OK. + +The Unix-command-line-style interface can be used by defining USE_CCOMMAND. +You'll also need to define either TWO_FILE_COMMANDLINE (to avoid stdin/stdout) +or USE_FDOPEN (to make stdin/stdout work in binary mode). See the Think C +entry for more details. + +On 680x0 Macs, Metrowerks defines type "double" as a 10-byte IEEE extended +float. jmemmgr.c won't like this: it wants sizeof(ALIGN_TYPE) to be a power +of 2. Add "#define ALIGN_TYPE long" to jconfig.h to eliminate the complaint. + + +Macintosh, Think C: + +Jim Brunner has prepared a Mac-style user interface for the IJG library. +Unfortunately, the released version of it only works with pre-v5 libraries; +still, it may be a useful starting point. You can obtain Jim's additional +source code from the Info-Mac archives, at sumex-aim.stanford.edu or mirrors +thereof; see file /info-mac/dev/src/jpeg-convert-c.hqx. Jim's documentation +also includes more detailed build instructions for Think C. + +If you want to build the minimal command line version, proceed as follows. +You'll have to prepare project files for the programs; we don't include any +in the distribution since they are not text files. Use the file lists in +any of the supplied makefiles as a guide. Also add the ANSI and Unix C +libraries in a separate segment. You may need to divide the JPEG files into +more than one segment; we recommend dividing compression and decompression +modules. Define USE_CCOMMAND in jconfig.h so that the ccommand() routine is +called. You must also define TWO_FILE_COMMANDLINE because stdin/stdout +don't handle binary data correctly. + +On 680x0 Macs, Think C defines type "double" as a 12-byte IEEE extended float. +jmemmgr.c won't like this: it wants sizeof(ALIGN_TYPE) to be a power of 2. +Add "#define ALIGN_TYPE long" to jconfig.h to eliminate the complaint. + + +MIPS R3000: + +MIPS's cc version 1.31 has a rather nasty optimization bug. Don't use -O +if you have that compiler version. (Use "cc -V" to check the version.) +Note that the R3000 chip is found in workstations from DEC and others. + + +MS-DOS, generic comments for 16-bit compilers: + +The IJG code is designed to be compiled in 80x86 "small" or "medium" memory +models (i.e., data pointers are 16 bits unless explicitly declared "far"; +code pointers can be either size). You may be able to use small model to +compile cjpeg or djpeg by itself, but you will probably have to use medium +model for any larger application. This won't make much difference in +performance. You *will* take a noticeable performance hit if you use a +large-data memory model, and you should avoid "huge" model if at all +possible. Be sure that NEED_FAR_POINTERS is defined in jconfig.h if you use +a small-data memory model; be sure it is NOT defined if you use a large-data +model. (The supplied makefiles and jconfig files for Borland and Microsoft C +compile in medium model and define NEED_FAR_POINTERS.) + +The DOS-specific memory manager, jmemdos.c, should be used if possible. +It needs some assembly-code routines which are in jmemdosa.asm; make sure +your makefile assembles that file and includes it in the library. If you +don't have a suitable assembler, you can get pre-assembled object files for +jmemdosa by FTP from ftp.uu.net: graphics/jpeg/jdosaobj.zip. (DOS-oriented +distributions of the IJG source code often include these object files.) + +When using jmemdos.c, jconfig.h must define USE_MSDOS_MEMMGR and must set +MAX_ALLOC_CHUNK to less than 64K (65520L is a typical value). If your +C library's far-heap malloc() can't allocate blocks that large, reduce +MAX_ALLOC_CHUNK to whatever it can handle. + +If you can't use jmemdos.c for some reason --- for example, because you +don't have an assembler to assemble jmemdosa.asm --- you'll have to fall +back to jmemansi.c or jmemname.c. You'll probably still need to set +MAX_ALLOC_CHUNK in jconfig.h, because most DOS C libraries won't malloc() +more than 64K at a time. IMPORTANT: if you use jmemansi.c or jmemname.c, +you will have to compile in a large-data memory model in order to get the +right stdio library. Too bad. + +wrjpgcom needs to be compiled in large model, because it malloc()s a 64KB +work area to hold the comment text. If your C library's malloc can't +handle that, reduce MAX_COM_LENGTH as necessary in wrjpgcom.c. + +Most MS-DOS compilers treat stdin/stdout as text files, so you must use +two-file command line style. But if your compiler has either fdopen() or +setmode(), you can use one-file style if you like. To do this, define +USE_SETMODE or USE_FDOPEN so that stdin/stdout will be set to binary mode. +(USE_SETMODE seems to work with more DOS compilers than USE_FDOPEN.) You +should test that I/O through stdin/stdout produces the same results as I/O +to explicitly named files... the "make test" procedures in the supplied +makefiles do NOT use stdin/stdout. + + +MS-DOS, generic comments for 32-bit compilers: + +None of the above comments about memory models apply if you are using a +32-bit flat-memory-space environment, such as DJGPP or Watcom C. (And you +should use one if you have it, as performance will be much better than +8086-compatible code!) For flat-memory-space compilers, do NOT define +NEED_FAR_POINTERS, and do NOT use jmemdos.c. Use jmemnobs.c if the +environment supplies adequate virtual memory, otherwise use jmemansi.c or +jmemname.c. + +You'll still need to be careful about binary I/O through stdin/stdout. +See the last paragraph of the previous section. + + +MS-DOS, Borland C: + +Be sure to convert all the source files to DOS text format (CR/LF newlines). +Although Borland C will often work OK with unmodified Unix (LF newlines) +source files, sometimes it will give bogus compile errors. +"Illegal character '#'" is the most common such error. (This is true with +Borland C 3.1, but perhaps is fixed in newer releases.) + +If you want one-file command line style, just undefine TWO_FILE_COMMANDLINE. +jconfig.bcc already includes #define USE_SETMODE to make this work. +(fdopen does not work correctly.) + + +MS-DOS, DJGPP: + +Use a recent version of DJGPP (1.11 or better). If you prefer two-file +command line style, change the supplied jconfig.dj to define +TWO_FILE_COMMANDLINE. makefile.dj is set up to generate only COFF files +(cjpeg, djpeg, etc) when you say make. After testing, say "make exe" to +make executables with stub.exe, or "make standalone" if you want executables +that include go32. You will probably need to tweak the makefile's pointer to +go32.exe to do "make standalone". + + +MS-DOS, Microsoft C: + +makefile.mc6 works with Microsoft C, Visual C++, etc. Note that this +makefile assumes that the working copy of itself is called "makefile". +If you want to call it something else, say "makefile.mak", be sure to adjust +the dependency line that reads "$(RFILE) : makefile". Otherwise the make +will fail because it doesn't know how to create "makefile". Worse, some +releases of Microsoft's make utilities give an incorrect error message in +this situation. + +If you want one-file command line style, just undefine TWO_FILE_COMMANDLINE. +jconfig.mc6 already includes #define USE_SETMODE to make this work. +(fdopen does not work correctly.) + +Old versions of MS C fail with an "out of macro expansion space" error +because they can't cope with the macro TRACEMS8 (defined in jerror.h). +If this happens to you, the easiest solution is to change TRACEMS8 to +expand to nothing. You'll lose the ability to dump out JPEG coefficient +tables with djpeg -debug -debug, but at least you can compile. + +Original MS C 6.0 is very buggy; it compiles incorrect code unless you turn +off optimization entirely (remove -O from CFLAGS). 6.00A is better, but it +still generates bad code if you enable loop optimizations (-Ol or -Ox). + +MS C 8.0 reportedly fails to compile jquant1.c if optimization is turned off +(yes, off). + + +Microsoft Windows (all versions): + +Some Windows system include files define typedef boolean as "unsigned char". +The IJG code also defines typedef boolean, but we make it "int" by default. +This doesn't affect the IJG programs because we don't import those Windows +include files. But if you use the JPEG library in your own program, and some +of your program's files import one definition of boolean while some import the +other, you can get all sorts of mysterious problems. A good preventive step +is to change jmorecfg.h to define boolean as unsigned char. We recommend +making that part of jmorecfg.h read like this: + #ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */ + typedef unsigned char boolean; + #endif +In v6a and later, using incompatible definitions of boolean will usually lead +to the failure message "JPEG parameter struct mismatch", rather than the +difficult-to-diagnose bugs it caused with earlier versions. + +When using the library in a Windows application, you will almost certainly +want to modify or replace the error handler module jerror.c, since our +default error handler does a couple of inappropriate things: + 1. it tries to write error and warning messages on stderr; + 2. in event of a fatal error, it exits by calling exit(). +A simple stopgap solution for problem 1 is to replace the line + fprintf(stderr, "%s\n", buffer); +(in output_message in jerror.c) with something like + MessageBox(GetActiveWindow(),buffer,"JPEG Error",MB_OK); +It's highly recommended that you at least do that much, since otherwise +error messages will disappear into nowhere. +The proper solution for problem 2 is to return control to your calling +application after a library error. This can be done with the setjmp/longjmp +technique discussed in libjpeg.doc and illustrated in example.c. + +You may also want to modify jdatasrc.c and jdatadst.c to use Windows file +operations rather than fread/fwrite. This is only necessary if your C +compiler doesn't provide a competent implementation of C stdio functions. + +Many people want to convert the IJG library into a DLL. This is reasonably +straightforward, but watch out for the following: + 1. Don't try to compile as a DLL in small or medium memory model; use +large model, or even better, 32-bit flat model. Many places in the IJG code +assume the address of a local variable is an ordinary (not FAR) pointer; +that isn't true in a medium-model DLL. + 2. Microsoft C cannot pass file pointers between applications and DLLs. +(See Microsoft Knowledge Base, PSS ID Number Q50336.) So jdatasrc.c and +jdatadst.c don't work if you open a file in your application and then pass +the pointer to the DLL. One workaround is to make jdatasrc.c/jdatadst.c +part of your main application rather than part of the DLL. + 3. You'll probably need to modify the macros GLOBAL() and EXTERN() to +attach suitable linkage keywords to the exported routine names. Similarly, +you'll want to modify METHODDEF() and JMETHOD() to ensure function pointers +are declared in a way that lets application routines be called back through +the function pointers. These macros are in jmorecfg.h. Typical definitions +for a 16-bit DLL are: + #define GLOBAL(type) type _far _pascal _loadds _export + #define EXTERN(type) extern type _far _pascal + #define METHODDEF(type) static type _far _pascal + #define JMETHOD(type,methodname,arglist) \ + type (_far _pascal *methodname) arglist +Although not all the GLOBAL routines are actually intended to be called by +the application, the performance cost of making them all DLL entry points is +negligible. + +The unmodified IJG library presents a very C-specific application interface, +so the resulting DLL is only usable from C or C++ applications. There has +been some talk of writing wrapper code that would present a simpler interface +usable from other languages, such as Visual Basic. This is on our to-do list +but hasn't been very high priority --- any volunteers out there? + + +Microsoft Windows, Borland C: + +Borland C++ 4.5 fails with an internal compiler error when trying to compile +jdmerge.c in 32-bit mode. If enough people complain, perhaps Borland will fix +it. In the meantime, the simplest known workaround is to add a redundant +definition of the variable range_limit in h2v1_merged_upsample(), at the head +of the block that handles odd image width (about line 268 in v6 jdmerge.c): + /* If image width is odd, do the last output column separately */ + if (cinfo->output_width & 1) { + register JSAMPLE * range_limit = cinfo->sample_range_limit; /* ADD THIS */ + cb = GETJSAMPLE(*inptr1); +Pretty bizarre, especially since the very similar routine h2v2_merged_upsample +doesn't trigger the bug. +Recent reports suggest that this bug does not occur with "bcc32a" (the +Pentium-optimized version of the compiler). + + +SGI: + +On some SGI systems, you may need to set "AR2= ar -ts" in the Makefile. +If you are using configure, you can do this by saying + ./configure RANLIB='ar -ts' +This change is not needed on all SGIs. Use it only if the make fails at the +stage of linking the completed programs. + +On the MIPS R4000 architecture (Indy, etc.), the compiler option "-mips2" +reportedly speeds up the float DCT method substantially, enough to make it +faster than the default int method (but still slower than the fast int +method). If you use -mips2, you may want to alter the default DCT method to +be float. To do this, put "#define JDCT_DEFAULT JDCT_FLOAT" in jconfig.h. + + +VMS: + +On an Alpha/VMS system with MMS, be sure to use the "/Marco=Alpha=1" +qualifier with MMS when building the JPEG package. + +VAX/VMS v5.5-1 may have problems with the test step of the build procedure +reporting differences when it compares the original and test images. If the +error points to the last block of the files, it is most likely bogus and may +be safely ignored. It seems to be because the files are Stream_LF and +Backup/Compare has difficulty with the (presumably) null padded files. +This problem was not observed on VAX/VMS v6.1 or AXP/VMS v6.1. diff --git a/windows_libs/jpeg-6a/jcapimin.c b/windows_libs/jpeg-6a/jcapimin.c new file mode 100644 index 00000000..6d864574 --- /dev/null +++ b/windows_libs/jpeg-6a/jcapimin.c @@ -0,0 +1,236 @@ +/* + * jcapimin.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface code for the compression half + * of the JPEG library. These are the "minimum" API routines that may be + * needed in either the normal full-compression case or the transcoding-only + * case. + * + * Most of the routines intended to be called directly by an application + * are in this file or in jcapistd.c. But also see jcparam.c for + * parameter-setup helper routines, jcomapi.c for routines shared by + * compression and decompression, and jctrans.c for the transcoding case. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Initialization of a JPEG compression object. + * The error manager must already be set up (in case memory manager fails). + */ + +GLOBAL(void) +jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize) +{ + int i; + + /* Guard against version mismatches between library and caller. */ + cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */ + if (version != JPEG_LIB_VERSION) + ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); + if (structsize != SIZEOF(struct jpeg_compress_struct)) + ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, + (int) SIZEOF(struct jpeg_compress_struct), (int) structsize); + + /* For debugging purposes, zero the whole master structure. + * But error manager pointer is already there, so save and restore it. + */ + { + struct jpeg_error_mgr * err = cinfo->err; + MEMZERO(cinfo, SIZEOF(struct jpeg_compress_struct)); + cinfo->err = err; + } + cinfo->is_decompressor = FALSE; + + /* Initialize a memory manager instance for this object */ + jinit_memory_mgr((j_common_ptr) cinfo); + + /* Zero out pointers to permanent structures. */ + cinfo->progress = NULL; + cinfo->dest = NULL; + + cinfo->comp_info = NULL; + + for (i = 0; i < NUM_QUANT_TBLS; i++) + cinfo->quant_tbl_ptrs[i] = NULL; + + for (i = 0; i < NUM_HUFF_TBLS; i++) { + cinfo->dc_huff_tbl_ptrs[i] = NULL; + cinfo->ac_huff_tbl_ptrs[i] = NULL; + } + + cinfo->input_gamma = 1.0; /* in case application forgets */ + + /* OK, I'm ready */ + cinfo->global_state = CSTATE_START; +} + + +/* + * Destruction of a JPEG compression object + */ + +GLOBAL(void) +jpeg_destroy_compress (j_compress_ptr cinfo) +{ + jpeg_destroy((j_common_ptr) cinfo); /* use common routine */ +} + + +/* + * Abort processing of a JPEG compression operation, + * but don't destroy the object itself. + */ + +GLOBAL(void) +jpeg_abort_compress (j_compress_ptr cinfo) +{ + jpeg_abort((j_common_ptr) cinfo); /* use common routine */ +} + + +/* + * Forcibly suppress or un-suppress all quantization and Huffman tables. + * Marks all currently defined tables as already written (if suppress) + * or not written (if !suppress). This will control whether they get emitted + * by a subsequent jpeg_start_compress call. + * + * This routine is exported for use by applications that want to produce + * abbreviated JPEG datastreams. It logically belongs in jcparam.c, but + * since it is called by jpeg_start_compress, we put it here --- otherwise + * jcparam.o would be linked whether the application used it or not. + */ + +GLOBAL(void) +jpeg_suppress_tables (j_compress_ptr cinfo, boolean suppress) +{ + int i; + JQUANT_TBL * qtbl; + JHUFF_TBL * htbl; + + for (i = 0; i < NUM_QUANT_TBLS; i++) { + if ((qtbl = cinfo->quant_tbl_ptrs[i]) != NULL) + qtbl->sent_table = suppress; + } + + for (i = 0; i < NUM_HUFF_TBLS; i++) { + if ((htbl = cinfo->dc_huff_tbl_ptrs[i]) != NULL) + htbl->sent_table = suppress; + if ((htbl = cinfo->ac_huff_tbl_ptrs[i]) != NULL) + htbl->sent_table = suppress; + } +} + + +/* + * Finish JPEG compression. + * + * If a multipass operating mode was selected, this may do a great deal of + * work including most of the actual output. + */ + +GLOBAL(void) +jpeg_finish_compress (j_compress_ptr cinfo) +{ + JDIMENSION iMCU_row; + + if (cinfo->global_state == CSTATE_SCANNING || + cinfo->global_state == CSTATE_RAW_OK) { + /* Terminate first pass */ + if (cinfo->next_scanline < cinfo->image_height) + ERREXIT(cinfo, JERR_TOO_LITTLE_DATA); + (*cinfo->master->finish_pass) (cinfo); + } else if (cinfo->global_state != CSTATE_WRCOEFS) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Perform any remaining passes */ + while (! cinfo->master->is_last_pass) { + (*cinfo->master->prepare_for_pass) (cinfo); + for (iMCU_row = 0; iMCU_row < cinfo->total_iMCU_rows; iMCU_row++) { + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) iMCU_row; + cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + /* We bypass the main controller and invoke coef controller directly; + * all work is being done from the coefficient buffer. + */ + if (! (*cinfo->coef->compress_data) (cinfo, (JSAMPIMAGE) NULL)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); + } + (*cinfo->master->finish_pass) (cinfo); + } + /* Write EOI, do final cleanup */ + (*cinfo->marker->write_file_trailer) (cinfo); + (*cinfo->dest->term_destination) (cinfo); + /* We can use jpeg_abort to release memory and reset global_state */ + jpeg_abort((j_common_ptr) cinfo); +} + + +/* + * Write a special marker. + * This is only recommended for writing COM or APPn markers. + * Must be called after jpeg_start_compress() and before + * first call to jpeg_write_scanlines() or jpeg_write_raw_data(). + */ + +GLOBAL(void) +jpeg_write_marker (j_compress_ptr cinfo, int marker, + const JOCTET *dataptr, unsigned int datalen) +{ + if (cinfo->next_scanline != 0 || + (cinfo->global_state != CSTATE_SCANNING && + cinfo->global_state != CSTATE_RAW_OK && + cinfo->global_state != CSTATE_WRCOEFS)) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + (*cinfo->marker->write_any_marker) (cinfo, marker, dataptr, datalen); +} + + +/* + * Alternate compression function: just write an abbreviated table file. + * Before calling this, all parameters and a data destination must be set up. + * + * To produce a pair of files containing abbreviated tables and abbreviated + * image data, one would proceed as follows: + * + * initialize JPEG object + * set JPEG parameters + * set destination to table file + * jpeg_write_tables(cinfo); + * set destination to image file + * jpeg_start_compress(cinfo, FALSE); + * write data... + * jpeg_finish_compress(cinfo); + * + * jpeg_write_tables has the side effect of marking all tables written + * (same as jpeg_suppress_tables(..., TRUE)). Thus a subsequent start_compress + * will not re-emit the tables unless it is passed write_all_tables=TRUE. + */ + +GLOBAL(void) +jpeg_write_tables (j_compress_ptr cinfo) +{ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* (Re)initialize error mgr and destination modules */ + (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->dest->init_destination) (cinfo); + /* Initialize the marker writer ... bit of a crock to do it here. */ + jinit_marker_writer(cinfo); + /* Write them tables! */ + (*cinfo->marker->write_tables_only) (cinfo); + /* And clean up. */ + (*cinfo->dest->term_destination) (cinfo); + /* We can use jpeg_abort to release memory. */ + jpeg_abort((j_common_ptr) cinfo); +} diff --git a/windows_libs/jpeg-6a/jcapistd.c b/windows_libs/jpeg-6a/jcapistd.c new file mode 100644 index 00000000..c0320b1b --- /dev/null +++ b/windows_libs/jpeg-6a/jcapistd.c @@ -0,0 +1,161 @@ +/* + * jcapistd.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface code for the compression half + * of the JPEG library. These are the "standard" API routines that are + * used in the normal full-compression case. They are not used by a + * transcoding-only application. Note that if an application links in + * jpeg_start_compress, it will end up linking in the entire compressor. + * We thus must separate this file from jcapimin.c to avoid linking the + * whole compression library into a transcoder. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Compression initialization. + * Before calling this, all parameters and a data destination must be set up. + * + * We require a write_all_tables parameter as a failsafe check when writing + * multiple datastreams from the same compression object. Since prior runs + * will have left all the tables marked sent_table=TRUE, a subsequent run + * would emit an abbreviated stream (no tables) by default. This may be what + * is wanted, but for safety's sake it should not be the default behavior: + * programmers should have to make a deliberate choice to emit abbreviated + * images. Therefore the documentation and examples should encourage people + * to pass write_all_tables=TRUE; then it will take active thought to do the + * wrong thing. + */ + +GLOBAL(void) +jpeg_start_compress (j_compress_ptr cinfo, boolean write_all_tables) +{ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + if (write_all_tables) + jpeg_suppress_tables(cinfo, FALSE); /* mark all tables to be written */ + + /* (Re)initialize error mgr and destination modules */ + (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->dest->init_destination) (cinfo); + /* Perform master selection of active modules */ + jinit_compress_master(cinfo); + /* Set up for the first pass */ + (*cinfo->master->prepare_for_pass) (cinfo); + /* Ready for application to drive first pass through jpeg_write_scanlines + * or jpeg_write_raw_data. + */ + cinfo->next_scanline = 0; + cinfo->global_state = (cinfo->raw_data_in ? CSTATE_RAW_OK : CSTATE_SCANNING); +} + + +/* + * Write some scanlines of data to the JPEG compressor. + * + * The return value will be the number of lines actually written. + * This should be less than the supplied num_lines only in case that + * the data destination module has requested suspension of the compressor, + * or if more than image_height scanlines are passed in. + * + * Note: we warn about excess calls to jpeg_write_scanlines() since + * this likely signals an application programmer error. However, + * excess scanlines passed in the last valid call are *silently* ignored, + * so that the application need not adjust num_lines for end-of-image + * when using a multiple-scanline buffer. + */ + +GLOBAL(JDIMENSION) +jpeg_write_scanlines (j_compress_ptr cinfo, JSAMPARRAY scanlines, + JDIMENSION num_lines) +{ + JDIMENSION row_ctr, rows_left; + + if (cinfo->global_state != CSTATE_SCANNING) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + if (cinfo->next_scanline >= cinfo->image_height) + WARNMS(cinfo, JWRN_TOO_MUCH_DATA); + + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->next_scanline; + cinfo->progress->pass_limit = (long) cinfo->image_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + + /* Give master control module another chance if this is first call to + * jpeg_write_scanlines. This lets output of the frame/scan headers be + * delayed so that application can write COM, etc, markers between + * jpeg_start_compress and jpeg_write_scanlines. + */ + if (cinfo->master->call_pass_startup) + (*cinfo->master->pass_startup) (cinfo); + + /* Ignore any extra scanlines at bottom of image. */ + rows_left = cinfo->image_height - cinfo->next_scanline; + if (num_lines > rows_left) + num_lines = rows_left; + + row_ctr = 0; + (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, num_lines); + cinfo->next_scanline += row_ctr; + return row_ctr; +} + + +/* + * Alternate entry point to write raw data. + * Processes exactly one iMCU row per call, unless suspended. + */ + +GLOBAL(JDIMENSION) +jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data, + JDIMENSION num_lines) +{ + JDIMENSION lines_per_iMCU_row; + + if (cinfo->global_state != CSTATE_RAW_OK) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + if (cinfo->next_scanline >= cinfo->image_height) { + WARNMS(cinfo, JWRN_TOO_MUCH_DATA); + return 0; + } + + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->next_scanline; + cinfo->progress->pass_limit = (long) cinfo->image_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + + /* Give master control module another chance if this is first call to + * jpeg_write_raw_data. This lets output of the frame/scan headers be + * delayed so that application can write COM, etc, markers between + * jpeg_start_compress and jpeg_write_raw_data. + */ + if (cinfo->master->call_pass_startup) + (*cinfo->master->pass_startup) (cinfo); + + /* Verify that at least one iMCU row has been passed. */ + lines_per_iMCU_row = cinfo->max_v_samp_factor * DCTSIZE; + if (num_lines < lines_per_iMCU_row) + ERREXIT(cinfo, JERR_BUFFER_SIZE); + + /* Directly compress the row. */ + if (! (*cinfo->coef->compress_data) (cinfo, data)) { + /* If compressor did not consume the whole row, suspend processing. */ + return 0; + } + + /* OK, we processed one iMCU row. */ + cinfo->next_scanline += lines_per_iMCU_row; + return lines_per_iMCU_row; +} diff --git a/windows_libs/jpeg-6a/jccoefct.c b/windows_libs/jpeg-6a/jccoefct.c new file mode 100644 index 00000000..d971ce5b --- /dev/null +++ b/windows_libs/jpeg-6a/jccoefct.c @@ -0,0 +1,448 @@ +/* + * jccoefct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the coefficient buffer controller for compression. + * This controller is the top level of the JPEG compressor proper. + * The coefficient buffer lies between forward-DCT and entropy encoding steps. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* We use a full-image coefficient buffer when doing Huffman optimization, + * and also for writing multiple-scan JPEG files. In all cases, the DCT + * step is run during the first pass, and subsequent passes need only read + * the buffered coefficients. + */ +#ifdef ENTROPY_OPT_SUPPORTED +#define FULL_COEF_BUFFER_SUPPORTED +#else +#ifdef C_MULTISCAN_FILES_SUPPORTED +#define FULL_COEF_BUFFER_SUPPORTED +#endif +#endif + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_c_coef_controller pub; /* public fields */ + + JDIMENSION iMCU_row_num; /* iMCU row # within image */ + JDIMENSION mcu_ctr; /* counts MCUs processed in current row */ + int MCU_vert_offset; /* counts MCU rows within iMCU row */ + int MCU_rows_per_iMCU_row; /* number of such rows needed */ + + /* For single-pass compression, it's sufficient to buffer just one MCU + * (although this may prove a bit slow in practice). We allocate a + * workspace of C_MAX_BLOCKS_IN_MCU coefficient blocks, and reuse it for each + * MCU constructed and sent. (On 80x86, the workspace is FAR even though + * it's not really very big; this is to keep the module interfaces unchanged + * when a large coefficient buffer is necessary.) + * In multi-pass modes, this array points to the current MCU's blocks + * within the virtual arrays. + */ + JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU]; + + /* In multi-pass modes, we need a virtual block array for each component. */ + jvirt_barray_ptr whole_image[MAX_COMPONENTS]; +} my_coef_controller; + +typedef my_coef_controller * my_coef_ptr; + + +/* Forward declarations */ +METHODDEF(boolean) compress_data + JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); +#ifdef FULL_COEF_BUFFER_SUPPORTED +METHODDEF(boolean) compress_first_pass + JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); +METHODDEF(boolean) compress_output + JPP((j_compress_ptr cinfo, JSAMPIMAGE input_buf)); +#endif + + +LOCAL(void) +start_iMCU_row (j_compress_ptr cinfo) +/* Reset within-iMCU-row counters for a new row */ +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + /* In an interleaved scan, an MCU row is the same as an iMCU row. + * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. + * But at the bottom of the image, process only what's left. + */ + if (cinfo->comps_in_scan > 1) { + coef->MCU_rows_per_iMCU_row = 1; + } else { + if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1)) + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; + else + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; + } + + coef->mcu_ctr = 0; + coef->MCU_vert_offset = 0; +} + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + coef->iMCU_row_num = 0; + start_iMCU_row(cinfo); + + switch (pass_mode) { + case JBUF_PASS_THRU: + if (coef->whole_image[0] != NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + coef->pub.compress_data = compress_data; + break; +#ifdef FULL_COEF_BUFFER_SUPPORTED + case JBUF_SAVE_AND_PASS: + if (coef->whole_image[0] == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + coef->pub.compress_data = compress_first_pass; + break; + case JBUF_CRANK_DEST: + if (coef->whole_image[0] == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + coef->pub.compress_data = compress_output; + break; +#endif + default: + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + break; + } +} + + +/* + * Process some data in the single-pass case. + * We process the equivalent of one fully interleaved MCU row ("iMCU" row) + * per call, ie, v_samp_factor block rows for each component in the image. + * Returns TRUE if the iMCU row is completed, FALSE if suspended. + * + * NB: input_buf contains a plane for each component in image. + * For single pass, this is the same as the components in the scan. + */ + +METHODDEF(boolean) +compress_data (j_compress_ptr cinfo, JSAMPIMAGE input_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + int blkn, bi, ci, yindex, yoffset, blockcnt; + JDIMENSION ypos, xpos; + jpeg_component_info *compptr; + + /* Loop to write as much as one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->mcu_ctr; MCU_col_num <= last_MCU_col; + MCU_col_num++) { + /* Determine where data comes from in input_buf and do the DCT thing. + * Each call on forward_DCT processes a horizontal row of DCT blocks + * as wide as an MCU; we rely on having allocated the MCU_buffer[] blocks + * sequentially. Dummy blocks at the right or bottom edge are filled in + * specially. The data in them does not matter for image reconstruction, + * so we fill them with values that will encode to the smallest amount of + * data, viz: all zeroes in the AC entries, DC entries equal to previous + * block's DC value. (Thanks to Thomas Kinsman for this idea.) + */ + blkn = 0; + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width + : compptr->last_col_width; + xpos = MCU_col_num * compptr->MCU_sample_width; + ypos = yoffset * DCTSIZE; /* ypos == (yoffset+yindex) * DCTSIZE */ + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + if (coef->iMCU_row_num < last_iMCU_row || + yoffset+yindex < compptr->last_row_height) { + (*cinfo->fdct->forward_DCT) (cinfo, compptr, + input_buf[ci], coef->MCU_buffer[blkn], + ypos, xpos, (JDIMENSION) blockcnt); + if (blockcnt < compptr->MCU_width) { + /* Create some dummy blocks at the right edge of the image. */ + jzero_far((void FAR *) coef->MCU_buffer[blkn + blockcnt], + (compptr->MCU_width - blockcnt) * SIZEOF(JBLOCK)); + for (bi = blockcnt; bi < compptr->MCU_width; bi++) { + coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn+bi-1][0][0]; + } + } + } else { + /* Create a row of dummy blocks at the bottom of the image. */ + jzero_far((void FAR *) coef->MCU_buffer[blkn], + compptr->MCU_width * SIZEOF(JBLOCK)); + for (bi = 0; bi < compptr->MCU_width; bi++) { + coef->MCU_buffer[blkn+bi][0][0] = coef->MCU_buffer[blkn-1][0][0]; + } + } + blkn += compptr->MCU_width; + ypos += DCTSIZE; + } + } + /* Try to write the MCU. In event of a suspension failure, we will + * re-DCT the MCU on restart (a bit inefficient, could be fixed...) + */ + if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->mcu_ctr = MCU_col_num; + return FALSE; + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->mcu_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + coef->iMCU_row_num++; + start_iMCU_row(cinfo); + return TRUE; +} + + +#ifdef FULL_COEF_BUFFER_SUPPORTED + +/* + * Process some data in the first pass of a multi-pass case. + * We process the equivalent of one fully interleaved MCU row ("iMCU" row) + * per call, ie, v_samp_factor block rows for each component in the image. + * This amount of data is read from the source buffer, DCT'd and quantized, + * and saved into the virtual arrays. We also generate suitable dummy blocks + * as needed at the right and lower edges. (The dummy blocks are constructed + * in the virtual arrays, which have been padded appropriately.) This makes + * it possible for subsequent passes not to worry about real vs. dummy blocks. + * + * We must also emit the data to the entropy encoder. This is conveniently + * done by calling compress_output() after we've loaded the current strip + * of the virtual arrays. + * + * NB: input_buf contains a plane for each component in image. All + * components are DCT'd and loaded into the virtual arrays in this pass. + * However, it may be that only a subset of the components are emitted to + * the entropy encoder during this first pass; be careful about looking + * at the scan-dependent variables (MCU dimensions, etc). + */ + +METHODDEF(boolean) +compress_first_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + JDIMENSION blocks_across, MCUs_across, MCUindex; + int bi, ci, h_samp_factor, block_row, block_rows, ndummy; + JCOEF lastDC; + jpeg_component_info *compptr; + JBLOCKARRAY buffer; + JBLOCKROW thisblockrow, lastblockrow; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Align the virtual buffer for this component. */ + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[ci], + coef->iMCU_row_num * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, TRUE); + /* Count non-dummy DCT block rows in this iMCU row. */ + if (coef->iMCU_row_num < last_iMCU_row) + block_rows = compptr->v_samp_factor; + else { + /* NB: can't use last_row_height here, since may not be set! */ + block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (block_rows == 0) block_rows = compptr->v_samp_factor; + } + blocks_across = compptr->width_in_blocks; + h_samp_factor = compptr->h_samp_factor; + /* Count number of dummy blocks to be added at the right margin. */ + ndummy = (int) (blocks_across % h_samp_factor); + if (ndummy > 0) + ndummy = h_samp_factor - ndummy; + /* Perform DCT for all non-dummy blocks in this iMCU row. Each call + * on forward_DCT processes a complete horizontal row of DCT blocks. + */ + for (block_row = 0; block_row < block_rows; block_row++) { + thisblockrow = buffer[block_row]; + (*cinfo->fdct->forward_DCT) (cinfo, compptr, + input_buf[ci], thisblockrow, + (JDIMENSION) (block_row * DCTSIZE), + (JDIMENSION) 0, blocks_across); + if (ndummy > 0) { + /* Create dummy blocks at the right edge of the image. */ + thisblockrow += blocks_across; /* => first dummy block */ + jzero_far((void FAR *) thisblockrow, ndummy * SIZEOF(JBLOCK)); + lastDC = thisblockrow[-1][0]; + for (bi = 0; bi < ndummy; bi++) { + thisblockrow[bi][0] = lastDC; + } + } + } + /* If at end of image, create dummy block rows as needed. + * The tricky part here is that within each MCU, we want the DC values + * of the dummy blocks to match the last real block's DC value. + * This squeezes a few more bytes out of the resulting file... + */ + if (coef->iMCU_row_num == last_iMCU_row) { + blocks_across += ndummy; /* include lower right corner */ + MCUs_across = blocks_across / h_samp_factor; + for (block_row = block_rows; block_row < compptr->v_samp_factor; + block_row++) { + thisblockrow = buffer[block_row]; + lastblockrow = buffer[block_row-1]; + jzero_far((void FAR *) thisblockrow, + (size_t) (blocks_across * SIZEOF(JBLOCK))); + for (MCUindex = 0; MCUindex < MCUs_across; MCUindex++) { + lastDC = lastblockrow[h_samp_factor-1][0]; + for (bi = 0; bi < h_samp_factor; bi++) { + thisblockrow[bi][0] = lastDC; + } + thisblockrow += h_samp_factor; /* advance to next MCU in row */ + lastblockrow += h_samp_factor; + } + } + } + } + /* NB: compress_output will increment iMCU_row_num if successful. + * A suspension return will result in redoing all the work above next time. + */ + + /* Emit data to the entropy encoder, sharing code with subsequent passes */ + return compress_output(cinfo, input_buf); +} + + +/* + * Process some data in subsequent passes of a multi-pass case. + * We process the equivalent of one fully interleaved MCU row ("iMCU" row) + * per call, ie, v_samp_factor block rows for each component in the scan. + * The data is obtained from the virtual arrays and fed to the entropy coder. + * Returns TRUE if the iMCU row is completed, FALSE if suspended. + * + * NB: input_buf is ignored; it is likely to be a NULL pointer. + */ + +METHODDEF(boolean) +compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + int blkn, ci, xindex, yindex, yoffset; + JDIMENSION start_col; + JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; + JBLOCKROW buffer_ptr; + jpeg_component_info *compptr; + + /* Align the virtual buffers for the components used in this scan. + * NB: during first pass, this is safe only because the buffers will + * already be aligned properly, so jmemmgr.c won't need to do any I/O. + */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + buffer[ci] = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], + coef->iMCU_row_num * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + + /* Loop to process one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->mcu_ctr; MCU_col_num < cinfo->MCUs_per_row; + MCU_col_num++) { + /* Construct list of pointers to DCT blocks belonging to this MCU */ + blkn = 0; /* index of current DCT block within MCU */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + start_col = MCU_col_num * compptr->MCU_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + buffer_ptr = buffer[ci][yindex+yoffset] + start_col; + for (xindex = 0; xindex < compptr->MCU_width; xindex++) { + coef->MCU_buffer[blkn++] = buffer_ptr++; + } + } + } + /* Try to write the MCU. */ + if (! (*cinfo->entropy->encode_mcu) (cinfo, coef->MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->mcu_ctr = MCU_col_num; + return FALSE; + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->mcu_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + coef->iMCU_row_num++; + start_iMCU_row(cinfo); + return TRUE; +} + +#endif /* FULL_COEF_BUFFER_SUPPORTED */ + + +/* + * Initialize coefficient buffer controller. + */ + +GLOBAL(void) +jinit_c_coef_controller (j_compress_ptr cinfo, boolean need_full_buffer) +{ + my_coef_ptr coef; + + coef = (my_coef_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_coef_controller)); + cinfo->coef = (struct jpeg_c_coef_controller *) coef; + coef->pub.start_pass = start_pass_coef; + + /* Create the coefficient buffer. */ + if (need_full_buffer) { +#ifdef FULL_COEF_BUFFER_SUPPORTED + /* Allocate a full-image virtual array for each component, */ + /* padded to a multiple of samp_factor DCT blocks in each direction. */ + int ci; + jpeg_component_info *compptr; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + coef->whole_image[ci] = (*cinfo->mem->request_virt_barray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + (JDIMENSION) jround_up((long) compptr->width_in_blocks, + (long) compptr->h_samp_factor), + (JDIMENSION) jround_up((long) compptr->height_in_blocks, + (long) compptr->v_samp_factor), + (JDIMENSION) compptr->v_samp_factor); + } +#else + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); +#endif + } else { + /* We only need a single-MCU buffer. */ + JBLOCKROW buffer; + int i; + + buffer = (JBLOCKROW) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); + for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) { + coef->MCU_buffer[i] = buffer + i; + } + coef->whole_image[0] = NULL; /* flag for no virtual arrays */ + } +} diff --git a/windows_libs/jpeg-6a/jccolor.c b/windows_libs/jpeg-6a/jccolor.c new file mode 100644 index 00000000..0a8a4b5d --- /dev/null +++ b/windows_libs/jpeg-6a/jccolor.c @@ -0,0 +1,459 @@ +/* + * jccolor.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains input colorspace conversion routines. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private subobject */ + +typedef struct { + struct jpeg_color_converter pub; /* public fields */ + + /* Private state for RGB->YCC conversion */ + INT32 * rgb_ycc_tab; /* => table for RGB to YCbCr conversion */ +} my_color_converter; + +typedef my_color_converter * my_cconvert_ptr; + + +/**************** RGB -> YCbCr conversion: most common case **************/ + +/* + * YCbCr is defined per CCIR 601-1, except that Cb and Cr are + * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5. + * The conversion equations to be implemented are therefore + * Y = 0.29900 * R + 0.58700 * G + 0.11400 * B + * Cb = -0.16874 * R - 0.33126 * G + 0.50000 * B + CENTERJSAMPLE + * Cr = 0.50000 * R - 0.41869 * G - 0.08131 * B + CENTERJSAMPLE + * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.) + * Note: older versions of the IJG code used a zero offset of MAXJSAMPLE/2, + * rather than CENTERJSAMPLE, for Cb and Cr. This gave equal positive and + * negative swings for Cb/Cr, but meant that grayscale values (Cb=Cr=0) + * were not represented exactly. Now we sacrifice exact representation of + * maximum red and maximum blue in order to get exact grayscales. + * + * To avoid floating-point arithmetic, we represent the fractional constants + * as integers scaled up by 2^16 (about 4 digits precision); we have to divide + * the products by 2^16, with appropriate rounding, to get the correct answer. + * + * For even more speed, we avoid doing any multiplications in the inner loop + * by precalculating the constants times R,G,B for all possible values. + * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table); + * for 12-bit samples it is still acceptable. It's not very reasonable for + * 16-bit samples, but if you want lossless storage you shouldn't be changing + * colorspace anyway. + * The CENTERJSAMPLE offsets and the rounding fudge-factor of 0.5 are included + * in the tables to save adding them separately in the inner loop. + */ + +#define SCALEBITS 16 /* speediest right-shift on some machines */ +#define CBCR_OFFSET ((INT32) CENTERJSAMPLE << SCALEBITS) +#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) +#define FIX(x) ((INT32) ((x) * (1L< Y section */ +#define G_Y_OFF (1*(MAXJSAMPLE+1)) /* offset to G => Y section */ +#define B_Y_OFF (2*(MAXJSAMPLE+1)) /* etc. */ +#define R_CB_OFF (3*(MAXJSAMPLE+1)) +#define G_CB_OFF (4*(MAXJSAMPLE+1)) +#define B_CB_OFF (5*(MAXJSAMPLE+1)) +#define R_CR_OFF B_CB_OFF /* B=>Cb, R=>Cr are the same */ +#define G_CR_OFF (6*(MAXJSAMPLE+1)) +#define B_CR_OFF (7*(MAXJSAMPLE+1)) +#define TABLE_SIZE (8*(MAXJSAMPLE+1)) + + +/* + * Initialize for RGB->YCC colorspace conversion. + */ + +METHODDEF(void) +rgb_ycc_start (j_compress_ptr cinfo) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + INT32 * rgb_ycc_tab; + INT32 i; + + /* Allocate and fill in the conversion tables. */ + cconvert->rgb_ycc_tab = rgb_ycc_tab = (INT32 *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (TABLE_SIZE * SIZEOF(INT32))); + + for (i = 0; i <= MAXJSAMPLE; i++) { + rgb_ycc_tab[i+R_Y_OFF] = FIX(0.29900) * i; + rgb_ycc_tab[i+G_Y_OFF] = FIX(0.58700) * i; + rgb_ycc_tab[i+B_Y_OFF] = FIX(0.11400) * i + ONE_HALF; + rgb_ycc_tab[i+R_CB_OFF] = (-FIX(0.16874)) * i; + rgb_ycc_tab[i+G_CB_OFF] = (-FIX(0.33126)) * i; + /* We use a rounding fudge-factor of 0.5-epsilon for Cb and Cr. + * This ensures that the maximum output will round to MAXJSAMPLE + * not MAXJSAMPLE+1, and thus that we don't have to range-limit. + */ + rgb_ycc_tab[i+B_CB_OFF] = FIX(0.50000) * i + CBCR_OFFSET + ONE_HALF-1; +/* B=>Cb and R=>Cr tables are the same + rgb_ycc_tab[i+R_CR_OFF] = FIX(0.50000) * i + CBCR_OFFSET + ONE_HALF-1; +*/ + rgb_ycc_tab[i+G_CR_OFF] = (-FIX(0.41869)) * i; + rgb_ycc_tab[i+B_CR_OFF] = (-FIX(0.08131)) * i; + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * + * Note that we change from the application's interleaved-pixel format + * to our internal noninterleaved, one-plane-per-component format. + * The input buffer is therefore three times as wide as the output buffer. + * + * A starting row offset is provided only for the output buffer. The caller + * can easily adjust the passed input_buf value to accommodate any row + * offset required on that side. + */ + +METHODDEF(void) +rgb_ycc_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int r, g, b; + register INT32 * ctab = cconvert->rgb_ycc_tab; + register JSAMPROW inptr; + register JSAMPROW outptr0, outptr1, outptr2; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr0 = output_buf[0][output_row]; + outptr1 = output_buf[1][output_row]; + outptr2 = output_buf[2][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + r = GETJSAMPLE(inptr[RGB_RED]); + g = GETJSAMPLE(inptr[RGB_GREEN]); + b = GETJSAMPLE(inptr[RGB_BLUE]); + inptr += RGB_PIXELSIZE; + /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations + * must be too; we do not need an explicit range-limiting operation. + * Hence the value being shifted is never negative, and we don't + * need the general RIGHT_SHIFT macro. + */ + /* Y */ + outptr0[col] = (JSAMPLE) + ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) + >> SCALEBITS); + /* Cb */ + outptr1[col] = (JSAMPLE) + ((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF]) + >> SCALEBITS); + /* Cr */ + outptr2[col] = (JSAMPLE) + ((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF]) + >> SCALEBITS); + } + } +} + + +/**************** Cases other than RGB -> YCbCr **************/ + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles RGB->grayscale conversion, which is the same + * as the RGB->Y portion of RGB->YCbCr. + * We assume rgb_ycc_start has been called (we only use the Y tables). + */ + +METHODDEF(void) +rgb_gray_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int r, g, b; + register INT32 * ctab = cconvert->rgb_ycc_tab; + register JSAMPROW inptr; + register JSAMPROW outptr; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr = output_buf[0][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + r = GETJSAMPLE(inptr[RGB_RED]); + g = GETJSAMPLE(inptr[RGB_GREEN]); + b = GETJSAMPLE(inptr[RGB_BLUE]); + inptr += RGB_PIXELSIZE; + /* Y */ + outptr[col] = (JSAMPLE) + ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) + >> SCALEBITS); + } + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles Adobe-style CMYK->YCCK conversion, + * where we convert R=1-C, G=1-M, and B=1-Y to YCbCr using the same + * conversion as above, while passing K (black) unchanged. + * We assume rgb_ycc_start has been called. + */ + +METHODDEF(void) +cmyk_ycck_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int r, g, b; + register INT32 * ctab = cconvert->rgb_ycc_tab; + register JSAMPROW inptr; + register JSAMPROW outptr0, outptr1, outptr2, outptr3; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr0 = output_buf[0][output_row]; + outptr1 = output_buf[1][output_row]; + outptr2 = output_buf[2][output_row]; + outptr3 = output_buf[3][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + r = MAXJSAMPLE - GETJSAMPLE(inptr[0]); + g = MAXJSAMPLE - GETJSAMPLE(inptr[1]); + b = MAXJSAMPLE - GETJSAMPLE(inptr[2]); + /* K passes through as-is */ + outptr3[col] = inptr[3]; /* don't need GETJSAMPLE here */ + inptr += 4; + /* If the inputs are 0..MAXJSAMPLE, the outputs of these equations + * must be too; we do not need an explicit range-limiting operation. + * Hence the value being shifted is never negative, and we don't + * need the general RIGHT_SHIFT macro. + */ + /* Y */ + outptr0[col] = (JSAMPLE) + ((ctab[r+R_Y_OFF] + ctab[g+G_Y_OFF] + ctab[b+B_Y_OFF]) + >> SCALEBITS); + /* Cb */ + outptr1[col] = (JSAMPLE) + ((ctab[r+R_CB_OFF] + ctab[g+G_CB_OFF] + ctab[b+B_CB_OFF]) + >> SCALEBITS); + /* Cr */ + outptr2[col] = (JSAMPLE) + ((ctab[r+R_CR_OFF] + ctab[g+G_CR_OFF] + ctab[b+B_CR_OFF]) + >> SCALEBITS); + } + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles grayscale output with no conversion. + * The source can be either plain grayscale or YCbCr (since Y == gray). + */ + +METHODDEF(void) +grayscale_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + register JSAMPROW inptr; + register JSAMPROW outptr; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->image_width; + int instride = cinfo->input_components; + + while (--num_rows >= 0) { + inptr = *input_buf++; + outptr = output_buf[0][output_row]; + output_row++; + for (col = 0; col < num_cols; col++) { + outptr[col] = inptr[0]; /* don't need GETJSAMPLE() here */ + inptr += instride; + } + } +} + + +/* + * Convert some rows of samples to the JPEG colorspace. + * This version handles multi-component colorspaces without conversion. + * We assume input_components == num_components. + */ + +METHODDEF(void) +null_convert (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows) +{ + register JSAMPROW inptr; + register JSAMPROW outptr; + register JDIMENSION col; + register int ci; + int nc = cinfo->num_components; + JDIMENSION num_cols = cinfo->image_width; + + while (--num_rows >= 0) { + /* It seems fastest to make a separate pass for each component. */ + for (ci = 0; ci < nc; ci++) { + inptr = *input_buf; + outptr = output_buf[ci][output_row]; + for (col = 0; col < num_cols; col++) { + outptr[col] = inptr[ci]; /* don't need GETJSAMPLE() here */ + inptr += nc; + } + } + input_buf++; + output_row++; + } +} + + +/* + * Empty method for start_pass. + */ + +METHODDEF(void) +null_method (j_compress_ptr cinfo) +{ + /* no work needed */ +} + + +/* + * Module initialization routine for input colorspace conversion. + */ + +GLOBAL(void) +jinit_color_converter (j_compress_ptr cinfo) +{ + my_cconvert_ptr cconvert; + + cconvert = (my_cconvert_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_color_converter)); + cinfo->cconvert = (struct jpeg_color_converter *) cconvert; + /* set start_pass to null method until we find out differently */ + cconvert->pub.start_pass = null_method; + + /* Make sure input_components agrees with in_color_space */ + switch (cinfo->in_color_space) { + case JCS_GRAYSCALE: + if (cinfo->input_components != 1) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; + + case JCS_RGB: +#if RGB_PIXELSIZE != 3 + if (cinfo->input_components != RGB_PIXELSIZE) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; +#endif /* else share code with YCbCr */ + + case JCS_YCbCr: + if (cinfo->input_components != 3) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; + + case JCS_CMYK: + case JCS_YCCK: + if (cinfo->input_components != 4) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; + + default: /* JCS_UNKNOWN can be anything */ + if (cinfo->input_components < 1) + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + break; + } + + /* Check num_components, set conversion method based on requested space */ + switch (cinfo->jpeg_color_space) { + case JCS_GRAYSCALE: + if (cinfo->num_components != 1) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space == JCS_GRAYSCALE) + cconvert->pub.color_convert = grayscale_convert; + else if (cinfo->in_color_space == JCS_RGB) { + cconvert->pub.start_pass = rgb_ycc_start; + cconvert->pub.color_convert = rgb_gray_convert; + } else if (cinfo->in_color_space == JCS_YCbCr) + cconvert->pub.color_convert = grayscale_convert; + else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_RGB: + if (cinfo->num_components != 3) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space == JCS_RGB && RGB_PIXELSIZE == 3) + cconvert->pub.color_convert = null_convert; + else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_YCbCr: + if (cinfo->num_components != 3) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space == JCS_RGB) { + cconvert->pub.start_pass = rgb_ycc_start; + cconvert->pub.color_convert = rgb_ycc_convert; + } else if (cinfo->in_color_space == JCS_YCbCr) + cconvert->pub.color_convert = null_convert; + else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_CMYK: + if (cinfo->num_components != 4) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space == JCS_CMYK) + cconvert->pub.color_convert = null_convert; + else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_YCCK: + if (cinfo->num_components != 4) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + if (cinfo->in_color_space == JCS_CMYK) { + cconvert->pub.start_pass = rgb_ycc_start; + cconvert->pub.color_convert = cmyk_ycck_convert; + } else if (cinfo->in_color_space == JCS_YCCK) + cconvert->pub.color_convert = null_convert; + else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + default: /* allow null conversion of JCS_UNKNOWN */ + if (cinfo->jpeg_color_space != cinfo->in_color_space || + cinfo->num_components != cinfo->input_components) + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + cconvert->pub.color_convert = null_convert; + break; + } +} diff --git a/windows_libs/jpeg-6a/jcdctmgr.c b/windows_libs/jpeg-6a/jcdctmgr.c new file mode 100644 index 00000000..61fa79b9 --- /dev/null +++ b/windows_libs/jpeg-6a/jcdctmgr.c @@ -0,0 +1,387 @@ +/* + * jcdctmgr.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the forward-DCT management logic. + * This code selects a particular DCT implementation to be used, + * and it performs related housekeeping chores including coefficient + * quantization. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + + +/* Private subobject for this module */ + +typedef struct { + struct jpeg_forward_dct pub; /* public fields */ + + /* Pointer to the DCT routine actually in use */ + forward_DCT_method_ptr do_dct; + + /* The actual post-DCT divisors --- not identical to the quant table + * entries, because of scaling (especially for an unnormalized DCT). + * Each table is given in normal array order. + */ + DCTELEM * divisors[NUM_QUANT_TBLS]; + +#ifdef DCT_FLOAT_SUPPORTED + /* Same as above for the floating-point case. */ + float_DCT_method_ptr do_float_dct; + FAST_FLOAT * float_divisors[NUM_QUANT_TBLS]; +#endif +} my_fdct_controller; + +typedef my_fdct_controller * my_fdct_ptr; + + +/* + * Initialize for a processing pass. + * Verify that all referenced Q-tables are present, and set up + * the divisor table for each one. + * In the current implementation, DCT of all components is done during + * the first pass, even if only some components will be output in the + * first scan. Hence all components should be examined here. + */ + +METHODDEF(void) +start_pass_fdctmgr (j_compress_ptr cinfo) +{ + my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; + int ci, qtblno, i; + jpeg_component_info *compptr; + JQUANT_TBL * qtbl; + DCTELEM * dtbl; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + qtblno = compptr->quant_tbl_no; + /* Make sure specified quantization table is present */ + if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS || + cinfo->quant_tbl_ptrs[qtblno] == NULL) + ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno); + qtbl = cinfo->quant_tbl_ptrs[qtblno]; + /* Compute divisors for this quant table */ + /* We may do this more than once for same table, but it's not a big deal */ + switch (cinfo->dct_method) { +#ifdef DCT_ISLOW_SUPPORTED + case JDCT_ISLOW: + /* For LL&M IDCT method, divisors are equal to raw quantization + * coefficients multiplied by 8 (to counteract scaling). + */ + if (fdct->divisors[qtblno] == NULL) { + fdct->divisors[qtblno] = (DCTELEM *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + DCTSIZE2 * SIZEOF(DCTELEM)); + } + dtbl = fdct->divisors[qtblno]; + for (i = 0; i < DCTSIZE2; i++) { + dtbl[i] = ((DCTELEM) qtbl->quantval[i]) << 3; + } + break; +#endif +#ifdef DCT_IFAST_SUPPORTED + case JDCT_IFAST: + { + /* For AA&N IDCT method, divisors are equal to quantization + * coefficients scaled by scalefactor[row]*scalefactor[col], where + * scalefactor[0] = 1 + * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + * We apply a further scale factor of 8. + */ +#define CONST_BITS 14 + static const INT16 aanscales[DCTSIZE2] = { + /* precomputed values scaled up by 14 bits */ + 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, + 22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270, + 21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906, + 19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315, + 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, + 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552, + 8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446, + 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247 + }; + SHIFT_TEMPS + + if (fdct->divisors[qtblno] == NULL) { + fdct->divisors[qtblno] = (DCTELEM *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + DCTSIZE2 * SIZEOF(DCTELEM)); + } + dtbl = fdct->divisors[qtblno]; + for (i = 0; i < DCTSIZE2; i++) { + dtbl[i] = (DCTELEM) + DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i], + (INT32) aanscales[i]), + CONST_BITS-3); + } + } + break; +#endif +#ifdef DCT_FLOAT_SUPPORTED + case JDCT_FLOAT: + { + /* For float AA&N IDCT method, divisors are equal to quantization + * coefficients scaled by scalefactor[row]*scalefactor[col], where + * scalefactor[0] = 1 + * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + * We apply a further scale factor of 8. + * What's actually stored is 1/divisor so that the inner loop can + * use a multiplication rather than a division. + */ + FAST_FLOAT * fdtbl; + int row, col; + static const double aanscalefactor[DCTSIZE] = { + 1.0, 1.387039845, 1.306562965, 1.175875602, + 1.0, 0.785694958, 0.541196100, 0.275899379 + }; + + if (fdct->float_divisors[qtblno] == NULL) { + fdct->float_divisors[qtblno] = (FAST_FLOAT *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + DCTSIZE2 * SIZEOF(FAST_FLOAT)); + } + fdtbl = fdct->float_divisors[qtblno]; + i = 0; + for (row = 0; row < DCTSIZE; row++) { + for (col = 0; col < DCTSIZE; col++) { + fdtbl[i] = (FAST_FLOAT) + (1.0 / (((double) qtbl->quantval[i] * + aanscalefactor[row] * aanscalefactor[col] * 8.0))); + i++; + } + } + } + break; +#endif + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } + } +} + + +/* + * Perform forward DCT on one or more blocks of a component. + * + * The input samples are taken from the sample_data[] array starting at + * position start_row/start_col, and moving to the right for any additional + * blocks. The quantized coefficients are returned in coef_blocks[]. + */ + +METHODDEF(void) +forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY sample_data, JBLOCKROW coef_blocks, + JDIMENSION start_row, JDIMENSION start_col, + JDIMENSION num_blocks) +/* This version is used for integer DCT implementations. */ +{ + /* This routine is heavily used, so it's worth coding it tightly. */ + my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; + forward_DCT_method_ptr do_dct = fdct->do_dct; + DCTELEM * divisors = fdct->divisors[compptr->quant_tbl_no]; + DCTELEM workspace[DCTSIZE2]; /* work area for FDCT subroutine */ + JDIMENSION bi; + + sample_data += start_row; /* fold in the vertical offset once */ + + for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) { + /* Load data into workspace, applying unsigned->signed conversion */ + { register DCTELEM *workspaceptr; + register JSAMPROW elemptr; + register int elemr; + + workspaceptr = workspace; + for (elemr = 0; elemr < DCTSIZE; elemr++) { + elemptr = sample_data[elemr] + start_col; +#if DCTSIZE == 8 /* unroll the inner loop */ + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; +#else + { register int elemc; + for (elemc = DCTSIZE; elemc > 0; elemc--) { + *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; + } + } +#endif + } + } + + /* Perform the DCT */ + (*do_dct) (workspace); + + /* Quantize/descale the coefficients, and store into coef_blocks[] */ + { register DCTELEM temp, qval; + register int i; + register JCOEFPTR output_ptr = coef_blocks[bi]; + + for (i = 0; i < DCTSIZE2; i++) { + qval = divisors[i]; + temp = workspace[i]; + /* Divide the coefficient value by qval, ensuring proper rounding. + * Since C does not specify the direction of rounding for negative + * quotients, we have to force the dividend positive for portability. + * + * In most files, at least half of the output values will be zero + * (at default quantization settings, more like three-quarters...) + * so we should ensure that this case is fast. On many machines, + * a comparison is enough cheaper than a divide to make a special test + * a win. Since both inputs will be nonnegative, we need only test + * for a < b to discover whether a/b is 0. + * If your machine's division is fast enough, define FAST_DIVIDE. + */ +#ifdef FAST_DIVIDE +#define DIVIDE_BY(a,b) a /= b +#else +#define DIVIDE_BY(a,b) if (a >= b) a /= b; else a = 0 +#endif + if (temp < 0) { + temp = -temp; + temp += qval>>1; /* for rounding */ + DIVIDE_BY(temp, qval); + temp = -temp; + } else { + temp += qval>>1; /* for rounding */ + DIVIDE_BY(temp, qval); + } + output_ptr[i] = (JCOEF) temp; + } + } + } +} + + +#ifdef DCT_FLOAT_SUPPORTED + +METHODDEF(void) +forward_DCT_float (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY sample_data, JBLOCKROW coef_blocks, + JDIMENSION start_row, JDIMENSION start_col, + JDIMENSION num_blocks) +/* This version is used for floating-point DCT implementations. */ +{ + /* This routine is heavily used, so it's worth coding it tightly. */ + my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; + float_DCT_method_ptr do_dct = fdct->do_float_dct; + FAST_FLOAT * divisors = fdct->float_divisors[compptr->quant_tbl_no]; + FAST_FLOAT workspace[DCTSIZE2]; /* work area for FDCT subroutine */ + JDIMENSION bi; + + sample_data += start_row; /* fold in the vertical offset once */ + + for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) { + /* Load data into workspace, applying unsigned->signed conversion */ + { register FAST_FLOAT *workspaceptr; + register JSAMPROW elemptr; + register int elemr; + + workspaceptr = workspace; + for (elemr = 0; elemr < DCTSIZE; elemr++) { + elemptr = sample_data[elemr] + start_col; +#if DCTSIZE == 8 /* unroll the inner loop */ + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + *workspaceptr++ = (FAST_FLOAT)(GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); +#else + { register int elemc; + for (elemc = DCTSIZE; elemc > 0; elemc--) { + *workspaceptr++ = (FAST_FLOAT) + (GETJSAMPLE(*elemptr++) - CENTERJSAMPLE); + } + } +#endif + } + } + + /* Perform the DCT */ + (*do_dct) (workspace); + + /* Quantize/descale the coefficients, and store into coef_blocks[] */ + { register FAST_FLOAT temp; + register int i; + register JCOEFPTR output_ptr = coef_blocks[bi]; + + for (i = 0; i < DCTSIZE2; i++) { + /* Apply the quantization and scaling factor */ + temp = workspace[i] * divisors[i]; + /* Round to nearest integer. + * Since C does not specify the direction of rounding for negative + * quotients, we have to force the dividend positive for portability. + * The maximum coefficient size is +-16K (for 12-bit data), so this + * code should work for either 16-bit or 32-bit ints. + */ + output_ptr[i] = (JCOEF) ((int) (temp + (FAST_FLOAT) 16384.5) - 16384); + } + } + } +} + +#endif /* DCT_FLOAT_SUPPORTED */ + + +/* + * Initialize FDCT manager. + */ + +GLOBAL(void) +jinit_forward_dct (j_compress_ptr cinfo) +{ + my_fdct_ptr fdct; + int i; + + fdct = (my_fdct_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_fdct_controller)); + cinfo->fdct = (struct jpeg_forward_dct *) fdct; + fdct->pub.start_pass = start_pass_fdctmgr; + + switch (cinfo->dct_method) { +#ifdef DCT_ISLOW_SUPPORTED + case JDCT_ISLOW: + fdct->pub.forward_DCT = forward_DCT; + fdct->do_dct = jpeg_fdct_islow; + break; +#endif +#ifdef DCT_IFAST_SUPPORTED + case JDCT_IFAST: + fdct->pub.forward_DCT = forward_DCT; + fdct->do_dct = jpeg_fdct_ifast; + break; +#endif +#ifdef DCT_FLOAT_SUPPORTED + case JDCT_FLOAT: + fdct->pub.forward_DCT = forward_DCT_float; + fdct->do_float_dct = jpeg_fdct_float; + break; +#endif + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } + + /* Mark divisor tables unallocated */ + for (i = 0; i < NUM_QUANT_TBLS; i++) { + fdct->divisors[i] = NULL; +#ifdef DCT_FLOAT_SUPPORTED + fdct->float_divisors[i] = NULL; +#endif + } +} diff --git a/windows_libs/jpeg-6a/jchuff.c b/windows_libs/jpeg-6a/jchuff.c new file mode 100644 index 00000000..b3eec8ad --- /dev/null +++ b/windows_libs/jpeg-6a/jchuff.c @@ -0,0 +1,846 @@ +/* + * jchuff.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains Huffman entropy encoding routines. + * + * Much of the complexity here has to do with supporting output suspension. + * If the data destination module demands suspension, we want to be able to + * back up to the start of the current MCU. To do this, we copy state + * variables into local working storage, and update them back to the + * permanent JPEG objects only upon successful completion of an MCU. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jchuff.h" /* Declarations shared with jcphuff.c */ + + +/* Expanded entropy encoder object for Huffman encoding. + * + * The savable_state subrecord contains fields that change within an MCU, + * but must not be updated permanently until we complete the MCU. + */ + +typedef struct { + INT32 put_buffer; /* current bit-accumulation buffer */ + int put_bits; /* # of bits now in it */ + int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ +} savable_state; + +/* This macro is to work around compilers with missing or broken + * structure assignment. You'll need to fix this code if you have + * such a compiler and you change MAX_COMPS_IN_SCAN. + */ + +#ifndef NO_STRUCT_ASSIGN +#define ASSIGN_STATE(dest,src) ((dest) = (src)) +#else +#if MAX_COMPS_IN_SCAN == 4 +#define ASSIGN_STATE(dest,src) \ + ((dest).put_buffer = (src).put_buffer, \ + (dest).put_bits = (src).put_bits, \ + (dest).last_dc_val[0] = (src).last_dc_val[0], \ + (dest).last_dc_val[1] = (src).last_dc_val[1], \ + (dest).last_dc_val[2] = (src).last_dc_val[2], \ + (dest).last_dc_val[3] = (src).last_dc_val[3]) +#endif +#endif + + +typedef struct { + struct jpeg_entropy_encoder pub; /* public fields */ + + savable_state saved; /* Bit buffer & DC state at start of MCU */ + + /* These fields are NOT loaded into local working state. */ + unsigned int restarts_to_go; /* MCUs left in this restart interval */ + int next_restart_num; /* next restart number to write (0-7) */ + + /* Pointers to derived tables (these workspaces have image lifespan) */ + c_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS]; + c_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS]; + +#ifdef ENTROPY_OPT_SUPPORTED /* Statistics tables for optimization */ + long * dc_count_ptrs[NUM_HUFF_TBLS]; + long * ac_count_ptrs[NUM_HUFF_TBLS]; +#endif +} huff_entropy_encoder; + +typedef huff_entropy_encoder * huff_entropy_ptr; + +/* Working state while writing an MCU. + * This struct contains all the fields that are needed by subroutines. + */ + +typedef struct { + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + savable_state cur; /* Current bit buffer & DC state */ + j_compress_ptr cinfo; /* dump_buffer needs access to this */ +} working_state; + + +/* Forward declarations */ +METHODDEF(boolean) encode_mcu_huff JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(void) finish_pass_huff JPP((j_compress_ptr cinfo)); +#ifdef ENTROPY_OPT_SUPPORTED +METHODDEF(boolean) encode_mcu_gather JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(void) finish_pass_gather JPP((j_compress_ptr cinfo)); +#endif + + +/* + * Initialize for a Huffman-compressed scan. + * If gather_statistics is TRUE, we do not output anything during the scan, + * just count the Huffman symbols used and generate Huffman code tables. + */ + +METHODDEF(void) +start_pass_huff (j_compress_ptr cinfo, boolean gather_statistics) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int ci, dctbl, actbl; + jpeg_component_info * compptr; + + if (gather_statistics) { +#ifdef ENTROPY_OPT_SUPPORTED + entropy->pub.encode_mcu = encode_mcu_gather; + entropy->pub.finish_pass = finish_pass_gather; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + entropy->pub.encode_mcu = encode_mcu_huff; + entropy->pub.finish_pass = finish_pass_huff; + } + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + dctbl = compptr->dc_tbl_no; + actbl = compptr->ac_tbl_no; + /* Make sure requested tables are present */ + /* (In gather mode, tables need not be allocated yet) */ + if (dctbl < 0 || dctbl >= NUM_HUFF_TBLS || + (cinfo->dc_huff_tbl_ptrs[dctbl] == NULL && !gather_statistics)) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, dctbl); + if (actbl < 0 || actbl >= NUM_HUFF_TBLS || + (cinfo->ac_huff_tbl_ptrs[actbl] == NULL && !gather_statistics)) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, actbl); + if (gather_statistics) { +#ifdef ENTROPY_OPT_SUPPORTED + /* Allocate and zero the statistics tables */ + /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */ + if (entropy->dc_count_ptrs[dctbl] == NULL) + entropy->dc_count_ptrs[dctbl] = (long *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + 257 * SIZEOF(long)); + MEMZERO(entropy->dc_count_ptrs[dctbl], 257 * SIZEOF(long)); + if (entropy->ac_count_ptrs[actbl] == NULL) + entropy->ac_count_ptrs[actbl] = (long *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + 257 * SIZEOF(long)); + MEMZERO(entropy->ac_count_ptrs[actbl], 257 * SIZEOF(long)); +#endif + } else { + /* Compute derived values for Huffman tables */ + /* We may do this more than once for a table, but it's not expensive */ + jpeg_make_c_derived_tbl(cinfo, cinfo->dc_huff_tbl_ptrs[dctbl], + & entropy->dc_derived_tbls[dctbl]); + jpeg_make_c_derived_tbl(cinfo, cinfo->ac_huff_tbl_ptrs[actbl], + & entropy->ac_derived_tbls[actbl]); + } + /* Initialize DC predictions to 0 */ + entropy->saved.last_dc_val[ci] = 0; + } + + /* Initialize bit buffer to empty */ + entropy->saved.put_buffer = 0; + entropy->saved.put_bits = 0; + + /* Initialize restart stuff */ + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num = 0; +} + + +/* + * Compute the derived values for a Huffman table. + * Note this is also used by jcphuff.c. + */ + +GLOBAL(void) +jpeg_make_c_derived_tbl (j_compress_ptr cinfo, JHUFF_TBL * htbl, + c_derived_tbl ** pdtbl) +{ + c_derived_tbl *dtbl; + int p, i, l, lastp, si; + char huffsize[257]; + unsigned int huffcode[257]; + unsigned int code; + + /* Allocate a workspace if we haven't already done so. */ + if (*pdtbl == NULL) + *pdtbl = (c_derived_tbl *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(c_derived_tbl)); + dtbl = *pdtbl; + + /* Figure C.1: make table of Huffman code length for each symbol */ + /* Note that this is in code-length order. */ + + p = 0; + for (l = 1; l <= 16; l++) { + for (i = 1; i <= (int) htbl->bits[l]; i++) + huffsize[p++] = (char) l; + } + huffsize[p] = 0; + lastp = p; + + /* Figure C.2: generate the codes themselves */ + /* Note that this is in code-length order. */ + + code = 0; + si = huffsize[0]; + p = 0; + while (huffsize[p]) { + while (((int) huffsize[p]) == si) { + huffcode[p++] = code; + code++; + } + code <<= 1; + si++; + } + + /* Figure C.3: generate encoding tables */ + /* These are code and size indexed by symbol value */ + + /* Set any codeless symbols to have code length 0; + * this allows emit_bits to detect any attempt to emit such symbols. + */ + MEMZERO(dtbl->ehufsi, SIZEOF(dtbl->ehufsi)); + + for (p = 0; p < lastp; p++) { + dtbl->ehufco[htbl->huffval[p]] = huffcode[p]; + dtbl->ehufsi[htbl->huffval[p]] = huffsize[p]; + } +} + + +/* Outputting bytes to the file */ + +/* Emit a byte, taking 'action' if must suspend. */ +#define emit_byte(state,val,action) \ + { *(state)->next_output_byte++ = (JOCTET) (val); \ + if (--(state)->free_in_buffer == 0) \ + if (! dump_buffer(state)) \ + { action; } } + + +LOCAL(boolean) +dump_buffer (working_state * state) +/* Empty the output buffer; return TRUE if successful, FALSE if must suspend */ +{ + struct jpeg_destination_mgr * dest = state->cinfo->dest; + + if (! (*dest->empty_output_buffer) (state->cinfo)) + return FALSE; + /* After a successful buffer dump, must reset buffer pointers */ + state->next_output_byte = dest->next_output_byte; + state->free_in_buffer = dest->free_in_buffer; + return TRUE; +} + + +/* Outputting bits to the file */ + +/* Only the right 24 bits of put_buffer are used; the valid bits are + * left-justified in this part. At most 16 bits can be passed to emit_bits + * in one call, and we never retain more than 7 bits in put_buffer + * between calls, so 24 bits are sufficient. + */ + +INLINE +LOCAL(boolean) +emit_bits (working_state * state, unsigned int code, int size) +/* Emit some bits; return TRUE if successful, FALSE if must suspend */ +{ + /* This routine is heavily used, so it's worth coding tightly. */ + register INT32 put_buffer = (INT32) code; + register int put_bits = state->cur.put_bits; + + /* if size is 0, caller used an invalid Huffman table entry */ + if (size == 0) + ERREXIT(state->cinfo, JERR_HUFF_MISSING_CODE); + + put_buffer &= (((INT32) 1)<cur.put_buffer; /* and merge with old buffer contents */ + + while (put_bits >= 8) { + int c = (int) ((put_buffer >> 16) & 0xFF); + + emit_byte(state, c, return FALSE); + if (c == 0xFF) { /* need to stuff a zero byte? */ + emit_byte(state, 0, return FALSE); + } + put_buffer <<= 8; + put_bits -= 8; + } + + state->cur.put_buffer = put_buffer; /* update state variables */ + state->cur.put_bits = put_bits; + + return TRUE; +} + + +LOCAL(boolean) +flush_bits (working_state * state) +{ + if (! emit_bits(state, 0x7F, 7)) /* fill any partial byte with ones */ + return FALSE; + state->cur.put_buffer = 0; /* and reset bit-buffer to empty */ + state->cur.put_bits = 0; + return TRUE; +} + + +/* Encode a single block's worth of coefficients */ + +LOCAL(boolean) +encode_one_block (working_state * state, JCOEFPTR block, int last_dc_val, + c_derived_tbl *dctbl, c_derived_tbl *actbl) +{ + register int temp, temp2; + register int nbits; + register int k, r, i; + + /* Encode the DC coefficient difference per section F.1.2.1 */ + + temp = temp2 = block[0] - last_dc_val; + + if (temp < 0) { + temp = -temp; /* temp is abs value of input */ + /* For a negative input, want temp2 = bitwise complement of abs(input) */ + /* This code assumes we are on a two's complement machine */ + temp2--; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 0; + while (temp) { + nbits++; + temp >>= 1; + } + + /* Emit the Huffman-coded symbol for the number of bits */ + if (! emit_bits(state, dctbl->ehufco[nbits], dctbl->ehufsi[nbits])) + return FALSE; + + /* Emit that number of bits of the value, if positive, */ + /* or the complement of its magnitude, if negative. */ + if (nbits) /* emit_bits rejects calls with size 0 */ + if (! emit_bits(state, (unsigned int) temp2, nbits)) + return FALSE; + + /* Encode the AC coefficients per section F.1.2.2 */ + + r = 0; /* r = run length of zeros */ + + for (k = 1; k < DCTSIZE2; k++) { + if ((temp = block[jpeg_natural_order[k]]) == 0) { + r++; + } else { + /* if run length > 15, must emit special run-length-16 codes (0xF0) */ + while (r > 15) { + if (! emit_bits(state, actbl->ehufco[0xF0], actbl->ehufsi[0xF0])) + return FALSE; + r -= 16; + } + + temp2 = temp; + if (temp < 0) { + temp = -temp; /* temp is abs value of input */ + /* This code assumes we are on a two's complement machine */ + temp2--; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 1; /* there must be at least one 1 bit */ + while ((temp >>= 1)) + nbits++; + + /* Emit Huffman symbol for run length / number of bits */ + i = (r << 4) + nbits; + if (! emit_bits(state, actbl->ehufco[i], actbl->ehufsi[i])) + return FALSE; + + /* Emit that number of bits of the value, if positive, */ + /* or the complement of its magnitude, if negative. */ + if (! emit_bits(state, (unsigned int) temp2, nbits)) + return FALSE; + + r = 0; + } + } + + /* If the last coef(s) were zero, emit an end-of-block code */ + if (r > 0) + if (! emit_bits(state, actbl->ehufco[0], actbl->ehufsi[0])) + return FALSE; + + return TRUE; +} + + +/* + * Emit a restart marker & resynchronize predictions. + */ + +LOCAL(boolean) +emit_restart (working_state * state, int restart_num) +{ + int ci; + + if (! flush_bits(state)) + return FALSE; + + emit_byte(state, 0xFF, return FALSE); + emit_byte(state, JPEG_RST0 + restart_num, return FALSE); + + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < state->cinfo->comps_in_scan; ci++) + state->cur.last_dc_val[ci] = 0; + + /* The restart counter is not updated until we successfully write the MCU. */ + + return TRUE; +} + + +/* + * Encode and output one MCU's worth of Huffman-compressed coefficients. + */ + +METHODDEF(boolean) +encode_mcu_huff (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + working_state state; + int blkn, ci; + jpeg_component_info * compptr; + + /* Load up working state */ + state.next_output_byte = cinfo->dest->next_output_byte; + state.free_in_buffer = cinfo->dest->free_in_buffer; + ASSIGN_STATE(state.cur, entropy->saved); + state.cinfo = cinfo; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! emit_restart(&state, entropy->next_restart_num)) + return FALSE; + } + + /* Encode the MCU data blocks */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + if (! encode_one_block(&state, + MCU_data[blkn][0], state.cur.last_dc_val[ci], + entropy->dc_derived_tbls[compptr->dc_tbl_no], + entropy->ac_derived_tbls[compptr->ac_tbl_no])) + return FALSE; + /* Update last_dc_val */ + state.cur.last_dc_val[ci] = MCU_data[blkn][0][0]; + } + + /* Completed MCU, so update state */ + cinfo->dest->next_output_byte = state.next_output_byte; + cinfo->dest->free_in_buffer = state.free_in_buffer; + ASSIGN_STATE(entropy->saved, state.cur); + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * Finish up at the end of a Huffman-compressed scan. + */ + +METHODDEF(void) +finish_pass_huff (j_compress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + working_state state; + + /* Load up working state ... flush_bits needs it */ + state.next_output_byte = cinfo->dest->next_output_byte; + state.free_in_buffer = cinfo->dest->free_in_buffer; + ASSIGN_STATE(state.cur, entropy->saved); + state.cinfo = cinfo; + + /* Flush out the last data */ + if (! flush_bits(&state)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); + + /* Update state */ + cinfo->dest->next_output_byte = state.next_output_byte; + cinfo->dest->free_in_buffer = state.free_in_buffer; + ASSIGN_STATE(entropy->saved, state.cur); +} + + +/* + * Huffman coding optimization. + * + * This actually is optimization, in the sense that we find the best possible + * Huffman table(s) for the given data. We first scan the supplied data and + * count the number of uses of each symbol that is to be Huffman-coded. + * (This process must agree with the code above.) Then we build an + * optimal Huffman coding tree for the observed counts. + * + * The JPEG standard requires Huffman codes to be no more than 16 bits long. + * If some symbols have a very small but nonzero probability, the Huffman tree + * must be adjusted to meet the code length restriction. We currently use + * the adjustment method suggested in the JPEG spec. This method is *not* + * optimal; it may not choose the best possible limited-length code. But + * since the symbols involved are infrequently used, it's not clear that + * going to extra trouble is worthwhile. + */ + +#ifdef ENTROPY_OPT_SUPPORTED + + +/* Process a single block's worth of coefficients */ + +LOCAL(void) +htest_one_block (JCOEFPTR block, int last_dc_val, + long dc_counts[], long ac_counts[]) +{ + register int temp; + register int nbits; + register int k, r; + + /* Encode the DC coefficient difference per section F.1.2.1 */ + + temp = block[0] - last_dc_val; + if (temp < 0) + temp = -temp; + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 0; + while (temp) { + nbits++; + temp >>= 1; + } + + /* Count the Huffman symbol for the number of bits */ + dc_counts[nbits]++; + + /* Encode the AC coefficients per section F.1.2.2 */ + + r = 0; /* r = run length of zeros */ + + for (k = 1; k < DCTSIZE2; k++) { + if ((temp = block[jpeg_natural_order[k]]) == 0) { + r++; + } else { + /* if run length > 15, must emit special run-length-16 codes (0xF0) */ + while (r > 15) { + ac_counts[0xF0]++; + r -= 16; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + if (temp < 0) + temp = -temp; + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 1; /* there must be at least one 1 bit */ + while ((temp >>= 1)) + nbits++; + + /* Count Huffman symbol for run length / number of bits */ + ac_counts[(r << 4) + nbits]++; + + r = 0; + } + } + + /* If the last coef(s) were zero, emit an end-of-block code */ + if (r > 0) + ac_counts[0]++; +} + + +/* + * Trial-encode one MCU's worth of Huffman-compressed coefficients. + * No data is actually output, so no suspension return is possible. + */ + +METHODDEF(boolean) +encode_mcu_gather (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int blkn, ci; + jpeg_component_info * compptr; + + /* Take care of restart intervals if needed */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) + entropy->saved.last_dc_val[ci] = 0; + /* Update restart state */ + entropy->restarts_to_go = cinfo->restart_interval; + } + entropy->restarts_to_go--; + } + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + htest_one_block(MCU_data[blkn][0], entropy->saved.last_dc_val[ci], + entropy->dc_count_ptrs[compptr->dc_tbl_no], + entropy->ac_count_ptrs[compptr->ac_tbl_no]); + entropy->saved.last_dc_val[ci] = MCU_data[blkn][0][0]; + } + + return TRUE; +} + + +/* + * Generate the optimal coding for the given counts, fill htbl. + * Note this is also used by jcphuff.c. + */ + +GLOBAL(void) +jpeg_gen_optimal_table (j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[]) +{ +#define MAX_CLEN 32 /* assumed maximum initial code length */ + UINT8 bits[MAX_CLEN+1]; /* bits[k] = # of symbols with code length k */ + int codesize[257]; /* codesize[k] = code length of symbol k */ + int others[257]; /* next symbol in current branch of tree */ + int c1, c2; + int p, i, j; + long v; + + /* This algorithm is explained in section K.2 of the JPEG standard */ + + MEMZERO(bits, SIZEOF(bits)); + MEMZERO(codesize, SIZEOF(codesize)); + for (i = 0; i < 257; i++) + others[i] = -1; /* init links to empty */ + + freq[256] = 1; /* make sure there is a nonzero count */ + /* Including the pseudo-symbol 256 in the Huffman procedure guarantees + * that no real symbol is given code-value of all ones, because 256 + * will be placed in the largest codeword category. + */ + + /* Huffman's basic algorithm to assign optimal code lengths to symbols */ + + for (;;) { + /* Find the smallest nonzero frequency, set c1 = its symbol */ + /* In case of ties, take the larger symbol number */ + c1 = -1; + v = 1000000000L; + for (i = 0; i <= 256; i++) { + if (freq[i] && freq[i] <= v) { + v = freq[i]; + c1 = i; + } + } + + /* Find the next smallest nonzero frequency, set c2 = its symbol */ + /* In case of ties, take the larger symbol number */ + c2 = -1; + v = 1000000000L; + for (i = 0; i <= 256; i++) { + if (freq[i] && freq[i] <= v && i != c1) { + v = freq[i]; + c2 = i; + } + } + + /* Done if we've merged everything into one frequency */ + if (c2 < 0) + break; + + /* Else merge the two counts/trees */ + freq[c1] += freq[c2]; + freq[c2] = 0; + + /* Increment the codesize of everything in c1's tree branch */ + codesize[c1]++; + while (others[c1] >= 0) { + c1 = others[c1]; + codesize[c1]++; + } + + others[c1] = c2; /* chain c2 onto c1's tree branch */ + + /* Increment the codesize of everything in c2's tree branch */ + codesize[c2]++; + while (others[c2] >= 0) { + c2 = others[c2]; + codesize[c2]++; + } + } + + /* Now count the number of symbols of each code length */ + for (i = 0; i <= 256; i++) { + if (codesize[i]) { + /* The JPEG standard seems to think that this can't happen, */ + /* but I'm paranoid... */ + if (codesize[i] > MAX_CLEN) + ERREXIT(cinfo, JERR_HUFF_CLEN_OVERFLOW); + + bits[codesize[i]]++; + } + } + + /* JPEG doesn't allow symbols with code lengths over 16 bits, so if the pure + * Huffman procedure assigned any such lengths, we must adjust the coding. + * Here is what the JPEG spec says about how this next bit works: + * Since symbols are paired for the longest Huffman code, the symbols are + * removed from this length category two at a time. The prefix for the pair + * (which is one bit shorter) is allocated to one of the pair; then, + * skipping the BITS entry for that prefix length, a code word from the next + * shortest nonzero BITS entry is converted into a prefix for two code words + * one bit longer. + */ + + for (i = MAX_CLEN; i > 16; i--) { + while (bits[i] > 0) { + j = i - 2; /* find length of new prefix to be used */ + while (bits[j] == 0) + j--; + + bits[i] -= 2; /* remove two symbols */ + bits[i-1]++; /* one goes in this length */ + bits[j+1] += 2; /* two new symbols in this length */ + bits[j]--; /* symbol of this length is now a prefix */ + } + } + + /* Remove the count for the pseudo-symbol 256 from the largest codelength */ + while (bits[i] == 0) /* find largest codelength still in use */ + i--; + bits[i]--; + + /* Return final symbol counts (only for lengths 0..16) */ + MEMCOPY(htbl->bits, bits, SIZEOF(htbl->bits)); + + /* Return a list of the symbols sorted by code length */ + /* It's not real clear to me why we don't need to consider the codelength + * changes made above, but the JPEG spec seems to think this works. + */ + p = 0; + for (i = 1; i <= MAX_CLEN; i++) { + for (j = 0; j <= 255; j++) { + if (codesize[j] == i) { + htbl->huffval[p] = (UINT8) j; + p++; + } + } + } + + /* Set sent_table FALSE so updated table will be written to JPEG file. */ + htbl->sent_table = FALSE; +} + + +/* + * Finish up a statistics-gathering pass and create the new Huffman tables. + */ + +METHODDEF(void) +finish_pass_gather (j_compress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int ci, dctbl, actbl; + jpeg_component_info * compptr; + JHUFF_TBL **htblptr; + boolean did_dc[NUM_HUFF_TBLS]; + boolean did_ac[NUM_HUFF_TBLS]; + + /* It's important not to apply jpeg_gen_optimal_table more than once + * per table, because it clobbers the input frequency counts! + */ + MEMZERO(did_dc, SIZEOF(did_dc)); + MEMZERO(did_ac, SIZEOF(did_ac)); + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + dctbl = compptr->dc_tbl_no; + actbl = compptr->ac_tbl_no; + if (! did_dc[dctbl]) { + htblptr = & cinfo->dc_huff_tbl_ptrs[dctbl]; + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + jpeg_gen_optimal_table(cinfo, *htblptr, entropy->dc_count_ptrs[dctbl]); + did_dc[dctbl] = TRUE; + } + if (! did_ac[actbl]) { + htblptr = & cinfo->ac_huff_tbl_ptrs[actbl]; + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + jpeg_gen_optimal_table(cinfo, *htblptr, entropy->ac_count_ptrs[actbl]); + did_ac[actbl] = TRUE; + } + } +} + + +#endif /* ENTROPY_OPT_SUPPORTED */ + + +/* + * Module initialization routine for Huffman entropy encoding. + */ + +GLOBAL(void) +jinit_huff_encoder (j_compress_ptr cinfo) +{ + huff_entropy_ptr entropy; + int i; + + entropy = (huff_entropy_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(huff_entropy_encoder)); + cinfo->entropy = (struct jpeg_entropy_encoder *) entropy; + entropy->pub.start_pass = start_pass_huff; + + /* Mark tables unallocated */ + for (i = 0; i < NUM_HUFF_TBLS; i++) { + entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; +#ifdef ENTROPY_OPT_SUPPORTED + entropy->dc_count_ptrs[i] = entropy->ac_count_ptrs[i] = NULL; +#endif + } +} diff --git a/windows_libs/jpeg-6a/jchuff.h b/windows_libs/jpeg-6a/jchuff.h new file mode 100644 index 00000000..fa4643a4 --- /dev/null +++ b/windows_libs/jpeg-6a/jchuff.h @@ -0,0 +1,34 @@ +/* + * jchuff.h + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains declarations for Huffman entropy encoding routines + * that are shared between the sequential encoder (jchuff.c) and the + * progressive encoder (jcphuff.c). No other modules need to see these. + */ + +/* Derived data constructed for each Huffman table */ + +typedef struct { + unsigned int ehufco[256]; /* code for each symbol */ + char ehufsi[256]; /* length of code for each symbol */ + /* If no code has been allocated for a symbol S, ehufsi[S] contains 0 */ +} c_derived_tbl; + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_make_c_derived_tbl jMkCDerived +#define jpeg_gen_optimal_table jGenOptTbl +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +/* Expand a Huffman table definition into the derived format */ +EXTERN(void) jpeg_make_c_derived_tbl + JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, c_derived_tbl ** pdtbl)); + +/* Generate an optimal table definition given the specified counts */ +EXTERN(void) jpeg_gen_optimal_table + JPP((j_compress_ptr cinfo, JHUFF_TBL * htbl, long freq[])); diff --git a/windows_libs/jpeg-6a/jcinit.c b/windows_libs/jpeg-6a/jcinit.c new file mode 100644 index 00000000..d96bb377 --- /dev/null +++ b/windows_libs/jpeg-6a/jcinit.c @@ -0,0 +1,72 @@ +/* + * jcinit.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains initialization logic for the JPEG compressor. + * This routine is in charge of selecting the modules to be executed and + * making an initialization call to each one. + * + * Logically, this code belongs in jcmaster.c. It's split out because + * linking this routine implies linking the entire compression library. + * For a transcoding-only application, we want to be able to use jcmaster.c + * without linking in the whole library. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Master selection of compression modules. + * This is done once at the start of processing an image. We determine + * which modules will be used and give them appropriate initialization calls. + */ + +GLOBAL(void) +jinit_compress_master (j_compress_ptr cinfo) +{ + /* Initialize master control (includes parameter checking/processing) */ + jinit_c_master_control(cinfo, FALSE /* full compression */); + + /* Preprocessing */ + if (! cinfo->raw_data_in) { + jinit_color_converter(cinfo); + jinit_downsampler(cinfo); + jinit_c_prep_controller(cinfo, FALSE /* never need full buffer here */); + } + /* Forward DCT */ + jinit_forward_dct(cinfo); + /* Entropy encoding: either Huffman or arithmetic coding. */ + if (cinfo->arith_code) { + ERREXIT(cinfo, JERR_ARITH_NOTIMPL); + } else { + if (cinfo->progressive_mode) { +#ifdef C_PROGRESSIVE_SUPPORTED + jinit_phuff_encoder(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else + jinit_huff_encoder(cinfo); + } + + /* Need a full-image coefficient buffer in any multi-pass mode. */ + jinit_c_coef_controller(cinfo, + (cinfo->num_scans > 1 || cinfo->optimize_coding)); + jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */); + + jinit_marker_writer(cinfo); + + /* We can now tell the memory manager to allocate virtual arrays. */ + (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); + + /* Write the datastream header (SOI) immediately. + * Frame and scan headers are postponed till later. + * This lets application insert special markers after the SOI. + */ + (*cinfo->marker->write_file_header) (cinfo); +} diff --git a/windows_libs/jpeg-6a/jcmainct.c b/windows_libs/jpeg-6a/jcmainct.c new file mode 100644 index 00000000..e0279a7e --- /dev/null +++ b/windows_libs/jpeg-6a/jcmainct.c @@ -0,0 +1,293 @@ +/* + * jcmainct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the main buffer controller for compression. + * The main buffer lies between the pre-processor and the JPEG + * compressor proper; it holds downsampled data in the JPEG colorspace. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Note: currently, there is no operating mode in which a full-image buffer + * is needed at this step. If there were, that mode could not be used with + * "raw data" input, since this module is bypassed in that case. However, + * we've left the code here for possible use in special applications. + */ +#undef FULL_MAIN_BUFFER_SUPPORTED + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_c_main_controller pub; /* public fields */ + + JDIMENSION cur_iMCU_row; /* number of current iMCU row */ + JDIMENSION rowgroup_ctr; /* counts row groups received in iMCU row */ + boolean suspended; /* remember if we suspended output */ + J_BUF_MODE pass_mode; /* current operating mode */ + + /* If using just a strip buffer, this points to the entire set of buffers + * (we allocate one for each component). In the full-image case, this + * points to the currently accessible strips of the virtual arrays. + */ + JSAMPARRAY buffer[MAX_COMPONENTS]; + +#ifdef FULL_MAIN_BUFFER_SUPPORTED + /* If using full-image storage, this array holds pointers to virtual-array + * control blocks for each component. Unused if not full-image storage. + */ + jvirt_sarray_ptr whole_image[MAX_COMPONENTS]; +#endif +} my_main_controller; + +typedef my_main_controller * my_main_ptr; + + +/* Forward declarations */ +METHODDEF(void) process_data_simple_main + JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf, + JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail)); +#ifdef FULL_MAIN_BUFFER_SUPPORTED +METHODDEF(void) process_data_buffer_main + JPP((j_compress_ptr cinfo, JSAMPARRAY input_buf, + JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail)); +#endif + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + + /* Do nothing in raw-data mode. */ + if (cinfo->raw_data_in) + return; + + main->cur_iMCU_row = 0; /* initialize counters */ + main->rowgroup_ctr = 0; + main->suspended = FALSE; + main->pass_mode = pass_mode; /* save mode for use by process_data */ + + switch (pass_mode) { + case JBUF_PASS_THRU: +#ifdef FULL_MAIN_BUFFER_SUPPORTED + if (main->whole_image[0] != NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); +#endif + main->pub.process_data = process_data_simple_main; + break; +#ifdef FULL_MAIN_BUFFER_SUPPORTED + case JBUF_SAVE_SOURCE: + case JBUF_CRANK_DEST: + case JBUF_SAVE_AND_PASS: + if (main->whole_image[0] == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + main->pub.process_data = process_data_buffer_main; + break; +#endif + default: + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + break; + } +} + + +/* + * Process some data. + * This routine handles the simple pass-through mode, + * where we have only a strip buffer. + */ + +METHODDEF(void) +process_data_simple_main (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail) +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + + while (main->cur_iMCU_row < cinfo->total_iMCU_rows) { + /* Read input data if we haven't filled the main buffer yet */ + if (main->rowgroup_ctr < DCTSIZE) + (*cinfo->prep->pre_process_data) (cinfo, + input_buf, in_row_ctr, in_rows_avail, + main->buffer, &main->rowgroup_ctr, + (JDIMENSION) DCTSIZE); + + /* If we don't have a full iMCU row buffered, return to application for + * more data. Note that preprocessor will always pad to fill the iMCU row + * at the bottom of the image. + */ + if (main->rowgroup_ctr != DCTSIZE) + return; + + /* Send the completed row to the compressor */ + if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) { + /* If compressor did not consume the whole row, then we must need to + * suspend processing and return to the application. In this situation + * we pretend we didn't yet consume the last input row; otherwise, if + * it happened to be the last row of the image, the application would + * think we were done. + */ + if (! main->suspended) { + (*in_row_ctr)--; + main->suspended = TRUE; + } + return; + } + /* We did finish the row. Undo our little suspension hack if a previous + * call suspended; then mark the main buffer empty. + */ + if (main->suspended) { + (*in_row_ctr)++; + main->suspended = FALSE; + } + main->rowgroup_ctr = 0; + main->cur_iMCU_row++; + } +} + + +#ifdef FULL_MAIN_BUFFER_SUPPORTED + +/* + * Process some data. + * This routine handles all of the modes that use a full-size buffer. + */ + +METHODDEF(void) +process_data_buffer_main (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail) +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + int ci; + jpeg_component_info *compptr; + boolean writing = (main->pass_mode != JBUF_CRANK_DEST); + + while (main->cur_iMCU_row < cinfo->total_iMCU_rows) { + /* Realign the virtual buffers if at the start of an iMCU row. */ + if (main->rowgroup_ctr == 0) { + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + main->buffer[ci] = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, main->whole_image[ci], + main->cur_iMCU_row * (compptr->v_samp_factor * DCTSIZE), + (JDIMENSION) (compptr->v_samp_factor * DCTSIZE), writing); + } + /* In a read pass, pretend we just read some source data. */ + if (! writing) { + *in_row_ctr += cinfo->max_v_samp_factor * DCTSIZE; + main->rowgroup_ctr = DCTSIZE; + } + } + + /* If a write pass, read input data until the current iMCU row is full. */ + /* Note: preprocessor will pad if necessary to fill the last iMCU row. */ + if (writing) { + (*cinfo->prep->pre_process_data) (cinfo, + input_buf, in_row_ctr, in_rows_avail, + main->buffer, &main->rowgroup_ctr, + (JDIMENSION) DCTSIZE); + /* Return to application if we need more data to fill the iMCU row. */ + if (main->rowgroup_ctr < DCTSIZE) + return; + } + + /* Emit data, unless this is a sink-only pass. */ + if (main->pass_mode != JBUF_SAVE_SOURCE) { + if (! (*cinfo->coef->compress_data) (cinfo, main->buffer)) { + /* If compressor did not consume the whole row, then we must need to + * suspend processing and return to the application. In this situation + * we pretend we didn't yet consume the last input row; otherwise, if + * it happened to be the last row of the image, the application would + * think we were done. + */ + if (! main->suspended) { + (*in_row_ctr)--; + main->suspended = TRUE; + } + return; + } + /* We did finish the row. Undo our little suspension hack if a previous + * call suspended; then mark the main buffer empty. + */ + if (main->suspended) { + (*in_row_ctr)++; + main->suspended = FALSE; + } + } + + /* If get here, we are done with this iMCU row. Mark buffer empty. */ + main->rowgroup_ctr = 0; + main->cur_iMCU_row++; + } +} + +#endif /* FULL_MAIN_BUFFER_SUPPORTED */ + + +/* + * Initialize main buffer controller. + */ + +GLOBAL(void) +jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer) +{ + my_main_ptr main; + int ci; + jpeg_component_info *compptr; + + main = (my_main_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_main_controller)); + cinfo->main = (struct jpeg_c_main_controller *) main; + main->pub.start_pass = start_pass_main; + + /* We don't need to create a buffer in raw-data mode. */ + if (cinfo->raw_data_in) + return; + + /* Create the buffer. It holds downsampled data, so each component + * may be of a different size. + */ + if (need_full_buffer) { +#ifdef FULL_MAIN_BUFFER_SUPPORTED + /* Allocate a full-image virtual array for each component */ + /* Note we pad the bottom to a multiple of the iMCU height */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + main->whole_image[ci] = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + compptr->width_in_blocks * DCTSIZE, + (JDIMENSION) jround_up((long) compptr->height_in_blocks, + (long) compptr->v_samp_factor) * DCTSIZE, + (JDIMENSION) (compptr->v_samp_factor * DCTSIZE)); + } +#else + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); +#endif + } else { +#ifdef FULL_MAIN_BUFFER_SUPPORTED + main->whole_image[0] = NULL; /* flag for no virtual arrays */ +#endif + /* Allocate a strip buffer for each component */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + main->buffer[ci] = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + compptr->width_in_blocks * DCTSIZE, + (JDIMENSION) (compptr->v_samp_factor * DCTSIZE)); + } + } +} diff --git a/windows_libs/jpeg-6a/jcmarker.c b/windows_libs/jpeg-6a/jcmarker.c new file mode 100644 index 00000000..0198954c --- /dev/null +++ b/windows_libs/jpeg-6a/jcmarker.c @@ -0,0 +1,641 @@ +/* + * jcmarker.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write JPEG datastream markers. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +typedef enum { /* JPEG marker codes */ + M_SOF0 = 0xc0, + M_SOF1 = 0xc1, + M_SOF2 = 0xc2, + M_SOF3 = 0xc3, + + M_SOF5 = 0xc5, + M_SOF6 = 0xc6, + M_SOF7 = 0xc7, + + M_JPG = 0xc8, + M_SOF9 = 0xc9, + M_SOF10 = 0xca, + M_SOF11 = 0xcb, + + M_SOF13 = 0xcd, + M_SOF14 = 0xce, + M_SOF15 = 0xcf, + + M_DHT = 0xc4, + + M_DAC = 0xcc, + + M_RST0 = 0xd0, + M_RST1 = 0xd1, + M_RST2 = 0xd2, + M_RST3 = 0xd3, + M_RST4 = 0xd4, + M_RST5 = 0xd5, + M_RST6 = 0xd6, + M_RST7 = 0xd7, + + M_SOI = 0xd8, + M_EOI = 0xd9, + M_SOS = 0xda, + M_DQT = 0xdb, + M_DNL = 0xdc, + M_DRI = 0xdd, + M_DHP = 0xde, + M_EXP = 0xdf, + + M_APP0 = 0xe0, + M_APP1 = 0xe1, + M_APP2 = 0xe2, + M_APP3 = 0xe3, + M_APP4 = 0xe4, + M_APP5 = 0xe5, + M_APP6 = 0xe6, + M_APP7 = 0xe7, + M_APP8 = 0xe8, + M_APP9 = 0xe9, + M_APP10 = 0xea, + M_APP11 = 0xeb, + M_APP12 = 0xec, + M_APP13 = 0xed, + M_APP14 = 0xee, + M_APP15 = 0xef, + + M_JPG0 = 0xf0, + M_JPG13 = 0xfd, + M_COM = 0xfe, + + M_TEM = 0x01, + + M_ERROR = 0x100 +} JPEG_MARKER; + + +/* + * Basic output routines. + * + * Note that we do not support suspension while writing a marker. + * Therefore, an application using suspension must ensure that there is + * enough buffer space for the initial markers (typ. 600-700 bytes) before + * calling jpeg_start_compress, and enough space to write the trailing EOI + * (a few bytes) before calling jpeg_finish_compress. Multipass compression + * modes are not supported at all with suspension, so those two are the only + * points where markers will be written. + */ + +LOCAL(void) +emit_byte (j_compress_ptr cinfo, int val) +/* Emit a byte */ +{ + struct jpeg_destination_mgr * dest = cinfo->dest; + + *(dest->next_output_byte)++ = (JOCTET) val; + if (--dest->free_in_buffer == 0) { + if (! (*dest->empty_output_buffer) (cinfo)) + ERREXIT(cinfo, JERR_CANT_SUSPEND); + } +} + + +LOCAL(void) +emit_marker (j_compress_ptr cinfo, JPEG_MARKER mark) +/* Emit a marker code */ +{ + emit_byte(cinfo, 0xFF); + emit_byte(cinfo, (int) mark); +} + + +LOCAL(void) +emit_2bytes (j_compress_ptr cinfo, int value) +/* Emit a 2-byte integer; these are always MSB first in JPEG files */ +{ + emit_byte(cinfo, (value >> 8) & 0xFF); + emit_byte(cinfo, value & 0xFF); +} + + +/* + * Routines to write specific marker types. + */ + +LOCAL(int) +emit_dqt (j_compress_ptr cinfo, int index) +/* Emit a DQT marker */ +/* Returns the precision used (0 = 8bits, 1 = 16bits) for baseline checking */ +{ + JQUANT_TBL * qtbl = cinfo->quant_tbl_ptrs[index]; + int prec; + int i; + + if (qtbl == NULL) + ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, index); + + prec = 0; + for (i = 0; i < DCTSIZE2; i++) { + if (qtbl->quantval[i] > 255) + prec = 1; + } + + if (! qtbl->sent_table) { + emit_marker(cinfo, M_DQT); + + emit_2bytes(cinfo, prec ? DCTSIZE2*2 + 1 + 2 : DCTSIZE2 + 1 + 2); + + emit_byte(cinfo, index + (prec<<4)); + + for (i = 0; i < DCTSIZE2; i++) { + /* The table entries must be emitted in zigzag order. */ + unsigned int qval = qtbl->quantval[jpeg_natural_order[i]]; + if (prec) + emit_byte(cinfo, qval >> 8); + emit_byte(cinfo, qval & 0xFF); + } + + qtbl->sent_table = TRUE; + } + + return prec; +} + + +LOCAL(void) +emit_dht (j_compress_ptr cinfo, int index, boolean is_ac) +/* Emit a DHT marker */ +{ + JHUFF_TBL * htbl; + int length, i; + + if (is_ac) { + htbl = cinfo->ac_huff_tbl_ptrs[index]; + index += 0x10; /* output index has AC bit set */ + } else { + htbl = cinfo->dc_huff_tbl_ptrs[index]; + } + + if (htbl == NULL) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, index); + + if (! htbl->sent_table) { + emit_marker(cinfo, M_DHT); + + length = 0; + for (i = 1; i <= 16; i++) + length += htbl->bits[i]; + + emit_2bytes(cinfo, length + 2 + 1 + 16); + emit_byte(cinfo, index); + + for (i = 1; i <= 16; i++) + emit_byte(cinfo, htbl->bits[i]); + + for (i = 0; i < length; i++) + emit_byte(cinfo, htbl->huffval[i]); + + htbl->sent_table = TRUE; + } +} + + +LOCAL(void) +emit_dac (j_compress_ptr cinfo) +/* Emit a DAC marker */ +/* Since the useful info is so small, we want to emit all the tables in */ +/* one DAC marker. Therefore this routine does its own scan of the table. */ +{ +#ifdef C_ARITH_CODING_SUPPORTED + char dc_in_use[NUM_ARITH_TBLS]; + char ac_in_use[NUM_ARITH_TBLS]; + int length, i; + jpeg_component_info *compptr; + + for (i = 0; i < NUM_ARITH_TBLS; i++) + dc_in_use[i] = ac_in_use[i] = 0; + + for (i = 0; i < cinfo->comps_in_scan; i++) { + compptr = cinfo->cur_comp_info[i]; + dc_in_use[compptr->dc_tbl_no] = 1; + ac_in_use[compptr->ac_tbl_no] = 1; + } + + length = 0; + for (i = 0; i < NUM_ARITH_TBLS; i++) + length += dc_in_use[i] + ac_in_use[i]; + + emit_marker(cinfo, M_DAC); + + emit_2bytes(cinfo, length*2 + 2); + + for (i = 0; i < NUM_ARITH_TBLS; i++) { + if (dc_in_use[i]) { + emit_byte(cinfo, i); + emit_byte(cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i]<<4)); + } + if (ac_in_use[i]) { + emit_byte(cinfo, i + 0x10); + emit_byte(cinfo, cinfo->arith_ac_K[i]); + } + } +#endif /* C_ARITH_CODING_SUPPORTED */ +} + + +LOCAL(void) +emit_dri (j_compress_ptr cinfo) +/* Emit a DRI marker */ +{ + emit_marker(cinfo, M_DRI); + + emit_2bytes(cinfo, 4); /* fixed length */ + + emit_2bytes(cinfo, (int) cinfo->restart_interval); +} + + +LOCAL(void) +emit_sof (j_compress_ptr cinfo, JPEG_MARKER code) +/* Emit a SOF marker */ +{ + int ci; + jpeg_component_info *compptr; + + emit_marker(cinfo, code); + + emit_2bytes(cinfo, 3 * cinfo->num_components + 2 + 5 + 1); /* length */ + + /* Make sure image isn't bigger than SOF field can handle */ + if ((long) cinfo->image_height > 65535L || + (long) cinfo->image_width > 65535L) + ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) 65535); + + emit_byte(cinfo, cinfo->data_precision); + emit_2bytes(cinfo, (int) cinfo->image_height); + emit_2bytes(cinfo, (int) cinfo->image_width); + + emit_byte(cinfo, cinfo->num_components); + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + emit_byte(cinfo, compptr->component_id); + emit_byte(cinfo, (compptr->h_samp_factor << 4) + compptr->v_samp_factor); + emit_byte(cinfo, compptr->quant_tbl_no); + } +} + + +LOCAL(void) +emit_sos (j_compress_ptr cinfo) +/* Emit a SOS marker */ +{ + int i, td, ta; + jpeg_component_info *compptr; + + emit_marker(cinfo, M_SOS); + + emit_2bytes(cinfo, 2 * cinfo->comps_in_scan + 2 + 1 + 3); /* length */ + + emit_byte(cinfo, cinfo->comps_in_scan); + + for (i = 0; i < cinfo->comps_in_scan; i++) { + compptr = cinfo->cur_comp_info[i]; + emit_byte(cinfo, compptr->component_id); + td = compptr->dc_tbl_no; + ta = compptr->ac_tbl_no; + if (cinfo->progressive_mode) { + /* Progressive mode: only DC or only AC tables are used in one scan; + * furthermore, Huffman coding of DC refinement uses no table at all. + * We emit 0 for unused field(s); this is recommended by the P&M text + * but does not seem to be specified in the standard. + */ + if (cinfo->Ss == 0) { + ta = 0; /* DC scan */ + if (cinfo->Ah != 0 && !cinfo->arith_code) + td = 0; /* no DC table either */ + } else { + td = 0; /* AC scan */ + } + } + emit_byte(cinfo, (td << 4) + ta); + } + + emit_byte(cinfo, cinfo->Ss); + emit_byte(cinfo, cinfo->Se); + emit_byte(cinfo, (cinfo->Ah << 4) + cinfo->Al); +} + + +LOCAL(void) +emit_jfif_app0 (j_compress_ptr cinfo) +/* Emit a JFIF-compliant APP0 marker */ +{ + /* + * Length of APP0 block (2 bytes) + * Block ID (4 bytes - ASCII "JFIF") + * Zero byte (1 byte to terminate the ID string) + * Version Major, Minor (2 bytes - 0x01, 0x01) + * Units (1 byte - 0x00 = none, 0x01 = inch, 0x02 = cm) + * Xdpu (2 bytes - dots per unit horizontal) + * Ydpu (2 bytes - dots per unit vertical) + * Thumbnail X size (1 byte) + * Thumbnail Y size (1 byte) + */ + + emit_marker(cinfo, M_APP0); + + emit_2bytes(cinfo, 2 + 4 + 1 + 2 + 1 + 2 + 2 + 1 + 1); /* length */ + + emit_byte(cinfo, 0x4A); /* Identifier: ASCII "JFIF" */ + emit_byte(cinfo, 0x46); + emit_byte(cinfo, 0x49); + emit_byte(cinfo, 0x46); + emit_byte(cinfo, 0); + /* We currently emit version code 1.01 since we use no 1.02 features. + * This may avoid complaints from some older decoders. + */ + emit_byte(cinfo, 1); /* Major version */ + emit_byte(cinfo, 1); /* Minor version */ + emit_byte(cinfo, cinfo->density_unit); /* Pixel size information */ + emit_2bytes(cinfo, (int) cinfo->X_density); + emit_2bytes(cinfo, (int) cinfo->Y_density); + emit_byte(cinfo, 0); /* No thumbnail image */ + emit_byte(cinfo, 0); +} + + +LOCAL(void) +emit_adobe_app14 (j_compress_ptr cinfo) +/* Emit an Adobe APP14 marker */ +{ + /* + * Length of APP14 block (2 bytes) + * Block ID (5 bytes - ASCII "Adobe") + * Version Number (2 bytes - currently 100) + * Flags0 (2 bytes - currently 0) + * Flags1 (2 bytes - currently 0) + * Color transform (1 byte) + * + * Although Adobe TN 5116 mentions Version = 101, all the Adobe files + * now in circulation seem to use Version = 100, so that's what we write. + * + * We write the color transform byte as 1 if the JPEG color space is + * YCbCr, 2 if it's YCCK, 0 otherwise. Adobe's definition has to do with + * whether the encoder performed a transformation, which is pretty useless. + */ + + emit_marker(cinfo, M_APP14); + + emit_2bytes(cinfo, 2 + 5 + 2 + 2 + 2 + 1); /* length */ + + emit_byte(cinfo, 0x41); /* Identifier: ASCII "Adobe" */ + emit_byte(cinfo, 0x64); + emit_byte(cinfo, 0x6F); + emit_byte(cinfo, 0x62); + emit_byte(cinfo, 0x65); + emit_2bytes(cinfo, 100); /* Version */ + emit_2bytes(cinfo, 0); /* Flags0 */ + emit_2bytes(cinfo, 0); /* Flags1 */ + switch (cinfo->jpeg_color_space) { + case JCS_YCbCr: + emit_byte(cinfo, 1); /* Color transform = 1 */ + break; + case JCS_YCCK: + emit_byte(cinfo, 2); /* Color transform = 2 */ + break; + default: + emit_byte(cinfo, 0); /* Color transform = 0 */ + break; + } +} + + +/* + * This routine is exported for possible use by applications. + * The intended use is to emit COM or APPn markers after calling + * jpeg_start_compress() and before the first jpeg_write_scanlines() call + * (hence, after write_file_header but before write_frame_header). + * Other uses are not guaranteed to produce desirable results. + */ + +METHODDEF(void) +write_any_marker (j_compress_ptr cinfo, int marker, + const JOCTET *dataptr, unsigned int datalen) +/* Emit an arbitrary marker with parameters */ +{ + if (datalen <= (unsigned int) 65533) { /* safety check */ + emit_marker(cinfo, (JPEG_MARKER) marker); + + emit_2bytes(cinfo, (int) (datalen + 2)); /* total length */ + + while (datalen--) { + emit_byte(cinfo, *dataptr); + dataptr++; + } + } +} + + +/* + * Write datastream header. + * This consists of an SOI and optional APPn markers. + * We recommend use of the JFIF marker, but not the Adobe marker, + * when using YCbCr or grayscale data. The JFIF marker should NOT + * be used for any other JPEG colorspace. The Adobe marker is helpful + * to distinguish RGB, CMYK, and YCCK colorspaces. + * Note that an application can write additional header markers after + * jpeg_start_compress returns. + */ + +METHODDEF(void) +write_file_header (j_compress_ptr cinfo) +{ + emit_marker(cinfo, M_SOI); /* first the SOI */ + + if (cinfo->write_JFIF_header) /* next an optional JFIF APP0 */ + emit_jfif_app0(cinfo); + if (cinfo->write_Adobe_marker) /* next an optional Adobe APP14 */ + emit_adobe_app14(cinfo); +} + + +/* + * Write frame header. + * This consists of DQT and SOFn markers. + * Note that we do not emit the SOF until we have emitted the DQT(s). + * This avoids compatibility problems with incorrect implementations that + * try to error-check the quant table numbers as soon as they see the SOF. + */ + +METHODDEF(void) +write_frame_header (j_compress_ptr cinfo) +{ + int ci, prec; + boolean is_baseline; + jpeg_component_info *compptr; + + /* Emit DQT for each quantization table. + * Note that emit_dqt() suppresses any duplicate tables. + */ + prec = 0; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + prec += emit_dqt(cinfo, compptr->quant_tbl_no); + } + /* now prec is nonzero iff there are any 16-bit quant tables. */ + + /* Check for a non-baseline specification. + * Note we assume that Huffman table numbers won't be changed later. + */ + if (cinfo->arith_code || cinfo->progressive_mode || + cinfo->data_precision != 8) { + is_baseline = FALSE; + } else { + is_baseline = TRUE; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (compptr->dc_tbl_no > 1 || compptr->ac_tbl_no > 1) + is_baseline = FALSE; + } + if (prec && is_baseline) { + is_baseline = FALSE; + /* If it's baseline except for quantizer size, warn the user */ + TRACEMS(cinfo, 0, JTRC_16BIT_TABLES); + } + } + + /* Emit the proper SOF marker */ + if (cinfo->arith_code) { + emit_sof(cinfo, M_SOF9); /* SOF code for arithmetic coding */ + } else { + if (cinfo->progressive_mode) + emit_sof(cinfo, M_SOF2); /* SOF code for progressive Huffman */ + else if (is_baseline) + emit_sof(cinfo, M_SOF0); /* SOF code for baseline implementation */ + else + emit_sof(cinfo, M_SOF1); /* SOF code for non-baseline Huffman file */ + } +} + + +/* + * Write scan header. + * This consists of DHT or DAC markers, optional DRI, and SOS. + * Compressed data will be written following the SOS. + */ + +METHODDEF(void) +write_scan_header (j_compress_ptr cinfo) +{ + int i; + jpeg_component_info *compptr; + + if (cinfo->arith_code) { + /* Emit arith conditioning info. We may have some duplication + * if the file has multiple scans, but it's so small it's hardly + * worth worrying about. + */ + emit_dac(cinfo); + } else { + /* Emit Huffman tables. + * Note that emit_dht() suppresses any duplicate tables. + */ + for (i = 0; i < cinfo->comps_in_scan; i++) { + compptr = cinfo->cur_comp_info[i]; + if (cinfo->progressive_mode) { + /* Progressive mode: only DC or only AC tables are used in one scan */ + if (cinfo->Ss == 0) { + if (cinfo->Ah == 0) /* DC needs no table for refinement scan */ + emit_dht(cinfo, compptr->dc_tbl_no, FALSE); + } else { + emit_dht(cinfo, compptr->ac_tbl_no, TRUE); + } + } else { + /* Sequential mode: need both DC and AC tables */ + emit_dht(cinfo, compptr->dc_tbl_no, FALSE); + emit_dht(cinfo, compptr->ac_tbl_no, TRUE); + } + } + } + + /* Emit DRI if required --- note that DRI value could change for each scan. + * If it doesn't, a tiny amount of space is wasted in multiple-scan files. + * We assume DRI will never be nonzero for one scan and zero for a later one. + */ + if (cinfo->restart_interval) + emit_dri(cinfo); + + emit_sos(cinfo); +} + + +/* + * Write datastream trailer. + */ + +METHODDEF(void) +write_file_trailer (j_compress_ptr cinfo) +{ + emit_marker(cinfo, M_EOI); +} + + +/* + * Write an abbreviated table-specification datastream. + * This consists of SOI, DQT and DHT tables, and EOI. + * Any table that is defined and not marked sent_table = TRUE will be + * emitted. Note that all tables will be marked sent_table = TRUE at exit. + */ + +METHODDEF(void) +write_tables_only (j_compress_ptr cinfo) +{ + int i; + + emit_marker(cinfo, M_SOI); + + for (i = 0; i < NUM_QUANT_TBLS; i++) { + if (cinfo->quant_tbl_ptrs[i] != NULL) + (void) emit_dqt(cinfo, i); + } + + if (! cinfo->arith_code) { + for (i = 0; i < NUM_HUFF_TBLS; i++) { + if (cinfo->dc_huff_tbl_ptrs[i] != NULL) + emit_dht(cinfo, i, FALSE); + if (cinfo->ac_huff_tbl_ptrs[i] != NULL) + emit_dht(cinfo, i, TRUE); + } + } + + emit_marker(cinfo, M_EOI); +} + + +/* + * Initialize the marker writer module. + */ + +GLOBAL(void) +jinit_marker_writer (j_compress_ptr cinfo) +{ + /* Create the subobject */ + cinfo->marker = (struct jpeg_marker_writer *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(struct jpeg_marker_writer)); + /* Initialize method pointers */ + cinfo->marker->write_any_marker = write_any_marker; + cinfo->marker->write_file_header = write_file_header; + cinfo->marker->write_frame_header = write_frame_header; + cinfo->marker->write_scan_header = write_scan_header; + cinfo->marker->write_file_trailer = write_file_trailer; + cinfo->marker->write_tables_only = write_tables_only; +} diff --git a/windows_libs/jpeg-6a/jcmaster.c b/windows_libs/jpeg-6a/jcmaster.c new file mode 100644 index 00000000..c3e1ef5f --- /dev/null +++ b/windows_libs/jpeg-6a/jcmaster.c @@ -0,0 +1,578 @@ +/* + * jcmaster.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains master control logic for the JPEG compressor. + * These routines are concerned with parameter validation, initial setup, + * and inter-pass control (determining the number of passes and the work + * to be done in each pass). + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private state */ + +typedef enum { + main_pass, /* input data, also do first output step */ + huff_opt_pass, /* Huffman code optimization pass */ + output_pass /* data output pass */ +} c_pass_type; + +typedef struct { + struct jpeg_comp_master pub; /* public fields */ + + c_pass_type pass_type; /* the type of the current pass */ + + int pass_number; /* # of passes completed */ + int total_passes; /* total # of passes needed */ + + int scan_number; /* current index in scan_info[] */ +} my_comp_master; + +typedef my_comp_master * my_master_ptr; + + +/* + * Support routines that do various essential calculations. + */ + +LOCAL(void) +initial_setup (j_compress_ptr cinfo) +/* Do computations that are needed before master selection phase */ +{ + int ci; + jpeg_component_info *compptr; + long samplesperrow; + JDIMENSION jd_samplesperrow; + + /* Sanity check on image dimensions */ + if (cinfo->image_height <= 0 || cinfo->image_width <= 0 + || cinfo->num_components <= 0 || cinfo->input_components <= 0) + ERREXIT(cinfo, JERR_EMPTY_IMAGE); + + /* Make sure image isn't bigger than I can handle */ + if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION || + (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION) + ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION); + + /* Width of an input scanline must be representable as JDIMENSION. */ + samplesperrow = (long) cinfo->image_width * (long) cinfo->input_components; + jd_samplesperrow = (JDIMENSION) samplesperrow; + if ((long) jd_samplesperrow != samplesperrow) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); + + /* For now, precision must match compiled-in value... */ + if (cinfo->data_precision != BITS_IN_JSAMPLE) + ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); + + /* Check that number of components won't exceed internal array sizes */ + if (cinfo->num_components > MAX_COMPONENTS) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, + MAX_COMPONENTS); + + /* Compute maximum sampling factors; check factor validity */ + cinfo->max_h_samp_factor = 1; + cinfo->max_v_samp_factor = 1; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR || + compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR) + ERREXIT(cinfo, JERR_BAD_SAMPLING); + cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor, + compptr->h_samp_factor); + cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor, + compptr->v_samp_factor); + } + + /* Compute dimensions of components */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Fill in the correct component_index value; don't rely on application */ + compptr->component_index = ci; + /* For compression, we never do DCT scaling. */ + compptr->DCT_scaled_size = DCTSIZE; + /* Size in DCT blocks */ + compptr->width_in_blocks = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, + (long) (cinfo->max_h_samp_factor * DCTSIZE)); + compptr->height_in_blocks = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, + (long) (cinfo->max_v_samp_factor * DCTSIZE)); + /* Size in samples */ + compptr->downsampled_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, + (long) cinfo->max_h_samp_factor); + compptr->downsampled_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, + (long) cinfo->max_v_samp_factor); + /* Mark component needed (this flag isn't actually used for compression) */ + compptr->component_needed = TRUE; + } + + /* Compute number of fully interleaved MCU rows (number of times that + * main controller will call coefficient controller). + */ + cinfo->total_iMCU_rows = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, + (long) (cinfo->max_v_samp_factor*DCTSIZE)); +} + + +#ifdef C_MULTISCAN_FILES_SUPPORTED + +LOCAL(void) +validate_script (j_compress_ptr cinfo) +/* Verify that the scan script in cinfo->scan_info[] is valid; also + * determine whether it uses progressive JPEG, and set cinfo->progressive_mode. + */ +{ + const jpeg_scan_info * scanptr; + int scanno, ncomps, ci, coefi, thisi; + int Ss, Se, Ah, Al; + boolean component_sent[MAX_COMPONENTS]; +#ifdef C_PROGRESSIVE_SUPPORTED + int * last_bitpos_ptr; + int last_bitpos[MAX_COMPONENTS][DCTSIZE2]; + /* -1 until that coefficient has been seen; then last Al for it */ +#endif + + if (cinfo->num_scans <= 0) + ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, 0); + + /* For sequential JPEG, all scans must have Ss=0, Se=DCTSIZE2-1; + * for progressive JPEG, no scan can have this. + */ + scanptr = cinfo->scan_info; + if (scanptr->Ss != 0 || scanptr->Se != DCTSIZE2-1) { +#ifdef C_PROGRESSIVE_SUPPORTED + cinfo->progressive_mode = TRUE; + last_bitpos_ptr = & last_bitpos[0][0]; + for (ci = 0; ci < cinfo->num_components; ci++) + for (coefi = 0; coefi < DCTSIZE2; coefi++) + *last_bitpos_ptr++ = -1; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + cinfo->progressive_mode = FALSE; + for (ci = 0; ci < cinfo->num_components; ci++) + component_sent[ci] = FALSE; + } + + for (scanno = 1; scanno <= cinfo->num_scans; scanptr++, scanno++) { + /* Validate component indexes */ + ncomps = scanptr->comps_in_scan; + if (ncomps <= 0 || ncomps > MAX_COMPS_IN_SCAN) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, ncomps, MAX_COMPS_IN_SCAN); + for (ci = 0; ci < ncomps; ci++) { + thisi = scanptr->component_index[ci]; + if (thisi < 0 || thisi >= cinfo->num_components) + ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); + /* Components must appear in SOF order within each scan */ + if (ci > 0 && thisi <= scanptr->component_index[ci-1]) + ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); + } + /* Validate progression parameters */ + Ss = scanptr->Ss; + Se = scanptr->Se; + Ah = scanptr->Ah; + Al = scanptr->Al; + if (cinfo->progressive_mode) { +#ifdef C_PROGRESSIVE_SUPPORTED + if (Ss < 0 || Ss >= DCTSIZE2 || Se < Ss || Se >= DCTSIZE2 || + Ah < 0 || Ah > 13 || Al < 0 || Al > 13) + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + if (Ss == 0) { + if (Se != 0) /* DC and AC together not OK */ + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + } else { + if (ncomps != 1) /* AC scans must be for only one component */ + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + } + for (ci = 0; ci < ncomps; ci++) { + last_bitpos_ptr = & last_bitpos[scanptr->component_index[ci]][0]; + if (Ss != 0 && last_bitpos_ptr[0] < 0) /* AC without prior DC scan */ + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + for (coefi = Ss; coefi <= Se; coefi++) { + if (last_bitpos_ptr[coefi] < 0) { + /* first scan of this coefficient */ + if (Ah != 0) + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + } else { + /* not first scan */ + if (Ah != last_bitpos_ptr[coefi] || Al != Ah-1) + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + } + last_bitpos_ptr[coefi] = Al; + } + } +#endif + } else { + /* For sequential JPEG, all progression parameters must be these: */ + if (Ss != 0 || Se != DCTSIZE2-1 || Ah != 0 || Al != 0) + ERREXIT1(cinfo, JERR_BAD_PROG_SCRIPT, scanno); + /* Make sure components are not sent twice */ + for (ci = 0; ci < ncomps; ci++) { + thisi = scanptr->component_index[ci]; + if (component_sent[thisi]) + ERREXIT1(cinfo, JERR_BAD_SCAN_SCRIPT, scanno); + component_sent[thisi] = TRUE; + } + } + } + + /* Now verify that everything got sent. */ + if (cinfo->progressive_mode) { +#ifdef C_PROGRESSIVE_SUPPORTED + /* For progressive mode, we only check that at least some DC data + * got sent for each component; the spec does not require that all bits + * of all coefficients be transmitted. Would it be wiser to enforce + * transmission of all coefficient bits?? + */ + for (ci = 0; ci < cinfo->num_components; ci++) { + if (last_bitpos[ci][0] < 0) + ERREXIT(cinfo, JERR_MISSING_DATA); + } +#endif + } else { + for (ci = 0; ci < cinfo->num_components; ci++) { + if (! component_sent[ci]) + ERREXIT(cinfo, JERR_MISSING_DATA); + } + } +} + +#endif /* C_MULTISCAN_FILES_SUPPORTED */ + + +LOCAL(void) +select_scan_parameters (j_compress_ptr cinfo) +/* Set up the scan parameters for the current scan */ +{ + int ci; + +#ifdef C_MULTISCAN_FILES_SUPPORTED + if (cinfo->scan_info != NULL) { + /* Prepare for current scan --- the script is already validated */ + my_master_ptr master = (my_master_ptr) cinfo->master; + const jpeg_scan_info * scanptr = cinfo->scan_info + master->scan_number; + + cinfo->comps_in_scan = scanptr->comps_in_scan; + for (ci = 0; ci < scanptr->comps_in_scan; ci++) { + cinfo->cur_comp_info[ci] = + &cinfo->comp_info[scanptr->component_index[ci]]; + } + cinfo->Ss = scanptr->Ss; + cinfo->Se = scanptr->Se; + cinfo->Ah = scanptr->Ah; + cinfo->Al = scanptr->Al; + } + else +#endif + { + /* Prepare for single sequential-JPEG scan containing all components */ + if (cinfo->num_components > MAX_COMPS_IN_SCAN) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, + MAX_COMPS_IN_SCAN); + cinfo->comps_in_scan = cinfo->num_components; + for (ci = 0; ci < cinfo->num_components; ci++) { + cinfo->cur_comp_info[ci] = &cinfo->comp_info[ci]; + } + cinfo->Ss = 0; + cinfo->Se = DCTSIZE2-1; + cinfo->Ah = 0; + cinfo->Al = 0; + } +} + + +LOCAL(void) +per_scan_setup (j_compress_ptr cinfo) +/* Do computations that are needed before processing a JPEG scan */ +/* cinfo->comps_in_scan and cinfo->cur_comp_info[] are already set */ +{ + int ci, mcublks, tmp; + jpeg_component_info *compptr; + + if (cinfo->comps_in_scan == 1) { + + /* Noninterleaved (single-component) scan */ + compptr = cinfo->cur_comp_info[0]; + + /* Overall image size in MCUs */ + cinfo->MCUs_per_row = compptr->width_in_blocks; + cinfo->MCU_rows_in_scan = compptr->height_in_blocks; + + /* For noninterleaved scan, always one block per MCU */ + compptr->MCU_width = 1; + compptr->MCU_height = 1; + compptr->MCU_blocks = 1; + compptr->MCU_sample_width = DCTSIZE; + compptr->last_col_width = 1; + /* For noninterleaved scans, it is convenient to define last_row_height + * as the number of block rows present in the last iMCU row. + */ + tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (tmp == 0) tmp = compptr->v_samp_factor; + compptr->last_row_height = tmp; + + /* Prepare array describing MCU composition */ + cinfo->blocks_in_MCU = 1; + cinfo->MCU_membership[0] = 0; + + } else { + + /* Interleaved (multi-component) scan */ + if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan, + MAX_COMPS_IN_SCAN); + + /* Overall image size in MCUs */ + cinfo->MCUs_per_row = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, + (long) (cinfo->max_h_samp_factor*DCTSIZE)); + cinfo->MCU_rows_in_scan = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, + (long) (cinfo->max_v_samp_factor*DCTSIZE)); + + cinfo->blocks_in_MCU = 0; + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Sampling factors give # of blocks of component in each MCU */ + compptr->MCU_width = compptr->h_samp_factor; + compptr->MCU_height = compptr->v_samp_factor; + compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height; + compptr->MCU_sample_width = compptr->MCU_width * DCTSIZE; + /* Figure number of non-dummy blocks in last MCU column & row */ + tmp = (int) (compptr->width_in_blocks % compptr->MCU_width); + if (tmp == 0) tmp = compptr->MCU_width; + compptr->last_col_width = tmp; + tmp = (int) (compptr->height_in_blocks % compptr->MCU_height); + if (tmp == 0) tmp = compptr->MCU_height; + compptr->last_row_height = tmp; + /* Prepare array describing MCU composition */ + mcublks = compptr->MCU_blocks; + if (cinfo->blocks_in_MCU + mcublks > C_MAX_BLOCKS_IN_MCU) + ERREXIT(cinfo, JERR_BAD_MCU_SIZE); + while (mcublks-- > 0) { + cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci; + } + } + + } + + /* Convert restart specified in rows to actual MCU count. */ + /* Note that count must fit in 16 bits, so we provide limiting. */ + if (cinfo->restart_in_rows > 0) { + long nominal = (long) cinfo->restart_in_rows * (long) cinfo->MCUs_per_row; + cinfo->restart_interval = (unsigned int) MIN(nominal, 65535L); + } +} + + +/* + * Per-pass setup. + * This is called at the beginning of each pass. We determine which modules + * will be active during this pass and give them appropriate start_pass calls. + * We also set is_last_pass to indicate whether any more passes will be + * required. + */ + +METHODDEF(void) +prepare_for_pass (j_compress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + switch (master->pass_type) { + case main_pass: + /* Initial pass: will collect input data, and do either Huffman + * optimization or data output for the first scan. + */ + select_scan_parameters(cinfo); + per_scan_setup(cinfo); + if (! cinfo->raw_data_in) { + (*cinfo->cconvert->start_pass) (cinfo); + (*cinfo->downsample->start_pass) (cinfo); + (*cinfo->prep->start_pass) (cinfo, JBUF_PASS_THRU); + } + (*cinfo->fdct->start_pass) (cinfo); + (*cinfo->entropy->start_pass) (cinfo, cinfo->optimize_coding); + (*cinfo->coef->start_pass) (cinfo, + (master->total_passes > 1 ? + JBUF_SAVE_AND_PASS : JBUF_PASS_THRU)); + (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU); + if (cinfo->optimize_coding) { + /* No immediate data output; postpone writing frame/scan headers */ + master->pub.call_pass_startup = FALSE; + } else { + /* Will write frame/scan headers at first jpeg_write_scanlines call */ + master->pub.call_pass_startup = TRUE; + } + break; +#ifdef ENTROPY_OPT_SUPPORTED + case huff_opt_pass: + /* Do Huffman optimization for a scan after the first one. */ + select_scan_parameters(cinfo); + per_scan_setup(cinfo); + if (cinfo->Ss != 0 || cinfo->Ah == 0 || cinfo->arith_code) { + (*cinfo->entropy->start_pass) (cinfo, TRUE); + (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST); + master->pub.call_pass_startup = FALSE; + break; + } + /* Special case: Huffman DC refinement scans need no Huffman table + * and therefore we can skip the optimization pass for them. + */ + master->pass_type = output_pass; + master->pass_number++; + /*FALLTHROUGH*/ +#endif + case output_pass: + /* Do a data-output pass. */ + /* We need not repeat per-scan setup if prior optimization pass did it. */ + if (! cinfo->optimize_coding) { + select_scan_parameters(cinfo); + per_scan_setup(cinfo); + } + (*cinfo->entropy->start_pass) (cinfo, FALSE); + (*cinfo->coef->start_pass) (cinfo, JBUF_CRANK_DEST); + /* We emit frame/scan headers now */ + if (master->scan_number == 0) + (*cinfo->marker->write_frame_header) (cinfo); + (*cinfo->marker->write_scan_header) (cinfo); + master->pub.call_pass_startup = FALSE; + break; + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + } + + master->pub.is_last_pass = (master->pass_number == master->total_passes-1); + + /* Set up progress monitor's pass info if present */ + if (cinfo->progress != NULL) { + cinfo->progress->completed_passes = master->pass_number; + cinfo->progress->total_passes = master->total_passes; + } +} + + +/* + * Special start-of-pass hook. + * This is called by jpeg_write_scanlines if call_pass_startup is TRUE. + * In single-pass processing, we need this hook because we don't want to + * write frame/scan headers during jpeg_start_compress; we want to let the + * application write COM markers etc. between jpeg_start_compress and the + * jpeg_write_scanlines loop. + * In multi-pass processing, this routine is not used. + */ + +METHODDEF(void) +pass_startup (j_compress_ptr cinfo) +{ + cinfo->master->call_pass_startup = FALSE; /* reset flag so call only once */ + + (*cinfo->marker->write_frame_header) (cinfo); + (*cinfo->marker->write_scan_header) (cinfo); +} + + +/* + * Finish up at end of pass. + */ + +METHODDEF(void) +finish_pass_master (j_compress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + /* The entropy coder always needs an end-of-pass call, + * either to analyze statistics or to flush its output buffer. + */ + (*cinfo->entropy->finish_pass) (cinfo); + + /* Update state for next pass */ + switch (master->pass_type) { + case main_pass: + /* next pass is either output of scan 0 (after optimization) + * or output of scan 1 (if no optimization). + */ + master->pass_type = output_pass; + if (! cinfo->optimize_coding) + master->scan_number++; + break; + case huff_opt_pass: + /* next pass is always output of current scan */ + master->pass_type = output_pass; + break; + case output_pass: + /* next pass is either optimization or output of next scan */ + if (cinfo->optimize_coding) + master->pass_type = huff_opt_pass; + master->scan_number++; + break; + } + + master->pass_number++; +} + + +/* + * Initialize master compression control. + */ + +GLOBAL(void) +jinit_c_master_control (j_compress_ptr cinfo, boolean transcode_only) +{ + my_master_ptr master; + + master = (my_master_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_comp_master)); + cinfo->master = (struct jpeg_comp_master *) master; + master->pub.prepare_for_pass = prepare_for_pass; + master->pub.pass_startup = pass_startup; + master->pub.finish_pass = finish_pass_master; + master->pub.is_last_pass = FALSE; + + /* Validate parameters, determine derived values */ + initial_setup(cinfo); + + if (cinfo->scan_info != NULL) { +#ifdef C_MULTISCAN_FILES_SUPPORTED + validate_script(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + cinfo->progressive_mode = FALSE; + cinfo->num_scans = 1; + } + + if (cinfo->progressive_mode) /* TEMPORARY HACK ??? */ + cinfo->optimize_coding = TRUE; /* assume default tables no good for progressive mode */ + + /* Initialize my private state */ + if (transcode_only) { + /* no main pass in transcoding */ + if (cinfo->optimize_coding) + master->pass_type = huff_opt_pass; + else + master->pass_type = output_pass; + } else { + /* for normal compression, first pass is always this type: */ + master->pass_type = main_pass; + } + master->scan_number = 0; + master->pass_number = 0; + if (cinfo->optimize_coding) + master->total_passes = cinfo->num_scans * 2; + else + master->total_passes = cinfo->num_scans; +} diff --git a/windows_libs/jpeg-6a/jcomapi.c b/windows_libs/jpeg-6a/jcomapi.c new file mode 100644 index 00000000..b518ec62 --- /dev/null +++ b/windows_libs/jpeg-6a/jcomapi.c @@ -0,0 +1,94 @@ +/* + * jcomapi.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface routines that are used for both + * compression and decompression. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Abort processing of a JPEG compression or decompression operation, + * but don't destroy the object itself. + * + * For this, we merely clean up all the nonpermanent memory pools. + * Note that temp files (virtual arrays) are not allowed to belong to + * the permanent pool, so we will be able to close all temp files here. + * Closing a data source or destination, if necessary, is the application's + * responsibility. + */ + +GLOBAL(void) +jpeg_abort (j_common_ptr cinfo) +{ + int pool; + + /* Releasing pools in reverse order might help avoid fragmentation + * with some (brain-damaged) malloc libraries. + */ + for (pool = JPOOL_NUMPOOLS-1; pool > JPOOL_PERMANENT; pool--) { + (*cinfo->mem->free_pool) (cinfo, pool); + } + + /* Reset overall state for possible reuse of object */ + cinfo->global_state = (cinfo->is_decompressor ? DSTATE_START : CSTATE_START); +} + + +/* + * Destruction of a JPEG object. + * + * Everything gets deallocated except the master jpeg_compress_struct itself + * and the error manager struct. Both of these are supplied by the application + * and must be freed, if necessary, by the application. (Often they are on + * the stack and so don't need to be freed anyway.) + * Closing a data source or destination, if necessary, is the application's + * responsibility. + */ + +GLOBAL(void) +jpeg_destroy (j_common_ptr cinfo) +{ + /* We need only tell the memory manager to release everything. */ + /* NB: mem pointer is NULL if memory mgr failed to initialize. */ + if (cinfo->mem != NULL) + (*cinfo->mem->self_destruct) (cinfo); + cinfo->mem = NULL; /* be safe if jpeg_destroy is called twice */ + cinfo->global_state = 0; /* mark it destroyed */ +} + + +/* + * Convenience routines for allocating quantization and Huffman tables. + * (Would jutils.c be a more reasonable place to put these?) + */ + +GLOBAL(JQUANT_TBL *) +jpeg_alloc_quant_table (j_common_ptr cinfo) +{ + JQUANT_TBL *tbl; + + tbl = (JQUANT_TBL *) + (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JQUANT_TBL)); + tbl->sent_table = FALSE; /* make sure this is false in any new table */ + return tbl; +} + + +GLOBAL(JHUFF_TBL *) +jpeg_alloc_huff_table (j_common_ptr cinfo) +{ + JHUFF_TBL *tbl; + + tbl = (JHUFF_TBL *) + (*cinfo->mem->alloc_small) (cinfo, JPOOL_PERMANENT, SIZEOF(JHUFF_TBL)); + tbl->sent_table = FALSE; /* make sure this is false in any new table */ + return tbl; +} diff --git a/windows_libs/jpeg-6a/jconfig.bcc b/windows_libs/jpeg-6a/jconfig.bcc new file mode 100644 index 00000000..c6c53ff6 --- /dev/null +++ b/windows_libs/jpeg-6a/jconfig.bcc @@ -0,0 +1,48 @@ +/* jconfig.bcc --- jconfig.h for Borland C (Turbo C) on MS-DOS or OS/2. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#ifdef __MSDOS__ +#define NEED_FAR_POINTERS /* for small or medium memory model */ +#endif +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN /* this assumes you have -w-stu in CFLAGS */ + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#ifdef __MSDOS__ +#define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */ +#define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ +#define USE_FMEM /* Borland has _fmemcpy() and _fmemset() */ +#endif + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#define TWO_FILE_COMMANDLINE +#define USE_SETMODE /* Borland has setmode() */ +#ifdef __MSDOS__ +#define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */ +#endif +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/windows_libs/jpeg-6a/jconfig.cfg b/windows_libs/jpeg-6a/jconfig.cfg new file mode 100644 index 00000000..36a04fa8 --- /dev/null +++ b/windows_libs/jpeg-6a/jconfig.cfg @@ -0,0 +1,44 @@ +/* jconfig.cfg --- source file edited by configure script */ +/* see jconfig.doc for explanations */ + +#undef HAVE_PROTOTYPES +#undef HAVE_UNSIGNED_CHAR +#undef HAVE_UNSIGNED_SHORT +#undef void +#undef const +#undef CHAR_IS_UNSIGNED +#undef HAVE_STDDEF_H +#undef HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS +#undef NEED_SHORT_EXTERNAL_NAMES +/* Define this if you get warnings about undefined structures. */ +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED +#undef INLINE +/* These are for configuring the JPEG memory manager. */ +#undef DEFAULT_MAX_MEM +#undef NO_MKTEMP + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#undef TWO_FILE_COMMANDLINE +#undef NEED_SIGNAL_CATCHER +#undef DONT_USE_B_MODE + +/* Define this if you want percent-done progress reports from cjpeg/djpeg. */ +#undef PROGRESS_REPORT + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/windows_libs/jpeg-6a/jconfig.dj b/windows_libs/jpeg-6a/jconfig.dj new file mode 100644 index 00000000..f759a9db --- /dev/null +++ b/windows_libs/jpeg-6a/jconfig.dj @@ -0,0 +1,38 @@ +/* jconfig.dj --- jconfig.h for DJGPP (Delorie's GNU C port) on MS-DOS. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS /* DJGPP uses flat 32-bit addressing */ +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#undef TWO_FILE_COMMANDLINE /* optional */ +#define USE_SETMODE /* Needed to make one-file style work in DJGPP */ +#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */ +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/windows_libs/jpeg-6a/jconfig.doc b/windows_libs/jpeg-6a/jconfig.doc new file mode 100644 index 00000000..c18d1c06 --- /dev/null +++ b/windows_libs/jpeg-6a/jconfig.doc @@ -0,0 +1,155 @@ +/* + * jconfig.doc + * + * Copyright (C) 1991-1994, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file documents the configuration options that are required to + * customize the JPEG software for a particular system. + * + * The actual configuration options for a particular installation are stored + * in jconfig.h. On many machines, jconfig.h can be generated automatically + * or copied from one of the "canned" jconfig files that we supply. But if + * you need to generate a jconfig.h file by hand, this file tells you how. + * + * DO NOT EDIT THIS FILE --- IT WON'T ACCOMPLISH ANYTHING. + * EDIT A COPY NAMED JCONFIG.H. + */ + + +/* + * These symbols indicate the properties of your machine or compiler. + * #define the symbol if yes, #undef it if no. + */ + +/* Does your compiler support function prototypes? + * (If not, you also need to use ansi2knr, see install.doc) + */ +#define HAVE_PROTOTYPES + +/* Does your compiler support the declaration "unsigned char" ? + * How about "unsigned short" ? + */ +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT + +/* Define "void" as "char" if your compiler doesn't know about type void. + * NOTE: be sure to define void such that "void *" represents the most general + * pointer type, e.g., that returned by malloc(). + */ +/* #define void char */ + +/* Define "const" as empty if your compiler doesn't know the "const" keyword. + */ +/* #define const */ + +/* Define this if an ordinary "char" type is unsigned. + * If you're not sure, leaving it undefined will work at some cost in speed. + * If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal. + */ +#undef CHAR_IS_UNSIGNED + +/* Define this if your system has an ANSI-conforming file. + */ +#define HAVE_STDDEF_H + +/* Define this if your system has an ANSI-conforming file. + */ +#define HAVE_STDLIB_H + +/* Define this if your system does not have an ANSI/SysV , + * but does have a BSD-style . + */ +#undef NEED_BSD_STRINGS + +/* Define this if your system does not provide typedef size_t in any of the + * ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in + * instead. + */ +#undef NEED_SYS_TYPES_H + +/* For 80x86 machines, you need to define NEED_FAR_POINTERS, + * unless you are using a large-data memory model or 80386 flat-memory mode. + * On less brain-damaged CPUs this symbol must not be defined. + * (Defining this symbol causes large data structures to be referenced through + * "far" pointers and to be allocated with a special version of malloc.) + */ +#undef NEED_FAR_POINTERS + +/* Define this if your linker needs global names to be unique in less + * than the first 15 characters. + */ +#undef NEED_SHORT_EXTERNAL_NAMES + +/* Although a real ANSI C compiler can deal perfectly well with pointers to + * unspecified structures (see "incomplete types" in the spec), a few pre-ANSI + * and pseudo-ANSI compilers get confused. To keep one of these bozos happy, + * define INCOMPLETE_TYPES_BROKEN. This is not recommended unless you + * actually get "missing structure definition" warnings or errors while + * compiling the JPEG code. + */ +#undef INCOMPLETE_TYPES_BROKEN + + +/* + * The following options affect code selection within the JPEG library, + * but they don't need to be visible to applications using the library. + * To minimize application namespace pollution, the symbols won't be + * defined unless JPEG_INTERNALS has been defined. + */ + +#ifdef JPEG_INTERNALS + +/* Define this if your compiler implements ">>" on signed values as a logical + * (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift, + * which is the normal and rational definition. + */ +#undef RIGHT_SHIFT_IS_UNSIGNED + + +#endif /* JPEG_INTERNALS */ + + +/* + * The remaining options do not affect the JPEG library proper, + * but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c). + * Other applications can ignore these. + */ + +#ifdef JPEG_CJPEG_DJPEG + +/* These defines indicate which image (non-JPEG) file formats are allowed. */ + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +/* Define this if you want to name both input and output files on the command + * line, rather than using stdout and optionally stdin. You MUST do this if + * your system can't cope with binary I/O to stdin/stdout. See comments at + * head of cjpeg.c or djpeg.c. + */ +#undef TWO_FILE_COMMANDLINE + +/* Define this if your system needs explicit cleanup of temporary files. + * This is crucial under MS-DOS, where the temporary "files" may be areas + * of extended memory; on most other systems it's not as important. + */ +#undef NEED_SIGNAL_CATCHER + +/* By default, we open image files with fopen(...,"rb") or fopen(...,"wb"). + * This is necessary on systems that distinguish text files from binary files, + * and is harmless on most systems that don't. If you have one of the rare + * systems that complains about the "b" spec, define this symbol. + */ +#undef DONT_USE_B_MODE + +/* Define this if you want percent-done progress reports from cjpeg/djpeg. + */ +#undef PROGRESS_REPORT + + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/windows_libs/jpeg-6a/jconfig.manx b/windows_libs/jpeg-6a/jconfig.manx new file mode 100644 index 00000000..6dd0d008 --- /dev/null +++ b/windows_libs/jpeg-6a/jconfig.manx @@ -0,0 +1,43 @@ +/* jconfig.manx --- jconfig.h for Amiga systems using Manx Aztec C ver 5.x. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#define TEMP_DIRECTORY "JPEGTMP:" /* recommended setting for Amiga */ + +#define SHORTxSHORT_32 /* produces better DCT code with Aztec C */ + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#define TWO_FILE_COMMANDLINE +#define NEED_SIGNAL_CATCHER +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#define signal_catcher _abort /* hack for Aztec C naming requirements */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/windows_libs/jpeg-6a/jconfig.mc6 b/windows_libs/jpeg-6a/jconfig.mc6 new file mode 100644 index 00000000..c55082df --- /dev/null +++ b/windows_libs/jpeg-6a/jconfig.mc6 @@ -0,0 +1,52 @@ +/* jconfig.mc6 --- jconfig.h for Microsoft C on MS-DOS, version 6.00A & up. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#define NEED_FAR_POINTERS /* for small or medium memory model */ +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#define USE_MSDOS_MEMMGR /* Define this if you use jmemdos.c */ + +#define MAX_ALLOC_CHUNK 65520L /* Maximum request to malloc() */ + +#define USE_FMEM /* Microsoft has _fmemcpy() and _fmemset() */ + +#define NEED_FHEAPMIN /* far heap management routines are broken */ + +#define SHORTxLCONST_32 /* enable compiler-specific DCT optimization */ +/* Note: the above define is known to improve the code with Microsoft C 6.00A. + * I do not know whether it is good for later compiler versions. + * Please report any info on this point to jpeg-info@uunet.uu.net. + */ + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#define TWO_FILE_COMMANDLINE +#define USE_SETMODE /* Microsoft has setmode() */ +#define NEED_SIGNAL_CATCHER /* Define this if you use jmemdos.c */ +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/windows_libs/jpeg-6a/jconfig.sas b/windows_libs/jpeg-6a/jconfig.sas new file mode 100644 index 00000000..efdac222 --- /dev/null +++ b/windows_libs/jpeg-6a/jconfig.sas @@ -0,0 +1,43 @@ +/* jconfig.sas --- jconfig.h for Amiga systems using SAS C 6.0 and up. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#define TEMP_DIRECTORY "JPEGTMP:" /* recommended setting for Amiga */ + +#define NO_MKTEMP /* SAS C doesn't have mktemp() */ + +#define SHORTxSHORT_32 /* produces better DCT code with SAS C */ + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#define TWO_FILE_COMMANDLINE +#define NEED_SIGNAL_CATCHER +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/windows_libs/jpeg-6a/jconfig.st b/windows_libs/jpeg-6a/jconfig.st new file mode 100644 index 00000000..4421b7a1 --- /dev/null +++ b/windows_libs/jpeg-6a/jconfig.st @@ -0,0 +1,42 @@ +/* jconfig.st --- jconfig.h for Atari ST/STE/TT using Pure C or Turbo C. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS +#undef NEED_SHORT_EXTERNAL_NAMES +#define INCOMPLETE_TYPES_BROKEN /* suppress undefined-structure warnings */ + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#define ALIGN_TYPE long /* apparently double is a weird size? */ + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#define TWO_FILE_COMMANDLINE /* optional -- undef if you like Unix style */ +/* Note: if you undef TWO_FILE_COMMANDLINE, you may need to define + * USE_SETMODE. Some Atari compilers require it, some do not. + */ +#define NEED_SIGNAL_CATCHER /* needed if you use jmemname.c */ +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/windows_libs/jpeg-6a/jconfig.vms b/windows_libs/jpeg-6a/jconfig.vms new file mode 100644 index 00000000..55a6ffba --- /dev/null +++ b/windows_libs/jpeg-6a/jconfig.vms @@ -0,0 +1,37 @@ +/* jconfig.vms --- jconfig.h for use on Digital VMS. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#undef CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#define TWO_FILE_COMMANDLINE /* Needed on VMS */ +#undef NEED_SIGNAL_CATCHER +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/windows_libs/jpeg-6a/jconfig.wat b/windows_libs/jpeg-6a/jconfig.wat new file mode 100644 index 00000000..6cc545ba --- /dev/null +++ b/windows_libs/jpeg-6a/jconfig.wat @@ -0,0 +1,38 @@ +/* jconfig.wat --- jconfig.h for Watcom C/C++ on MS-DOS or OS/2. */ +/* see jconfig.doc for explanations */ + +#define HAVE_PROTOTYPES +#define HAVE_UNSIGNED_CHAR +#define HAVE_UNSIGNED_SHORT +/* #define void char */ +/* #define const */ +#define CHAR_IS_UNSIGNED +#define HAVE_STDDEF_H +#define HAVE_STDLIB_H +#undef NEED_BSD_STRINGS +#undef NEED_SYS_TYPES_H +#undef NEED_FAR_POINTERS /* Watcom uses flat 32-bit addressing */ +#undef NEED_SHORT_EXTERNAL_NAMES +#undef INCOMPLETE_TYPES_BROKEN + +#ifdef JPEG_INTERNALS + +#undef RIGHT_SHIFT_IS_UNSIGNED + +#endif /* JPEG_INTERNALS */ + +#ifdef JPEG_CJPEG_DJPEG + +#define BMP_SUPPORTED /* BMP image file format */ +#define GIF_SUPPORTED /* GIF image file format */ +#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */ +#undef RLE_SUPPORTED /* Utah RLE image file format */ +#define TARGA_SUPPORTED /* Targa image file format */ + +#undef TWO_FILE_COMMANDLINE /* optional */ +#define USE_SETMODE /* Needed to make one-file style work in Watcom */ +#undef NEED_SIGNAL_CATCHER /* Define this if you use jmemname.c */ +#undef DONT_USE_B_MODE +#undef PROGRESS_REPORT /* optional */ + +#endif /* JPEG_CJPEG_DJPEG */ diff --git a/windows_libs/jpeg-6a/jcparam.c b/windows_libs/jpeg-6a/jcparam.c new file mode 100644 index 00000000..54871d5b --- /dev/null +++ b/windows_libs/jpeg-6a/jcparam.c @@ -0,0 +1,574 @@ +/* + * jcparam.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains optional default-setting code for the JPEG compressor. + * Applications do not have to use this file, but those that don't use it + * must know a lot more about the innards of the JPEG code. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Quantization table setup routines + */ + +GLOBAL(void) +jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl, + const unsigned int *basic_table, + int scale_factor, boolean force_baseline) +/* Define a quantization table equal to the basic_table times + * a scale factor (given as a percentage). + * If force_baseline is TRUE, the computed quantization table entries + * are limited to 1..255 for JPEG baseline compatibility. + */ +{ + JQUANT_TBL ** qtblptr = & cinfo->quant_tbl_ptrs[which_tbl]; + int i; + long temp; + + /* Safety check to ensure start_compress not called yet. */ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + if (*qtblptr == NULL) + *qtblptr = jpeg_alloc_quant_table((j_common_ptr) cinfo); + + for (i = 0; i < DCTSIZE2; i++) { + temp = ((long) basic_table[i] * scale_factor + 50L) / 100L; + /* limit the values to the valid range */ + if (temp <= 0L) temp = 1L; + if (temp > 32767L) temp = 32767L; /* max quantizer needed for 12 bits */ + if (force_baseline && temp > 255L) + temp = 255L; /* limit to baseline range if requested */ + (*qtblptr)->quantval[i] = (UINT16) temp; + } + + /* Initialize sent_table FALSE so table will be written to JPEG file. */ + (*qtblptr)->sent_table = FALSE; +} + + +GLOBAL(void) +jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor, + boolean force_baseline) +/* Set or change the 'quality' (quantization) setting, using default tables + * and a straight percentage-scaling quality scale. In most cases it's better + * to use jpeg_set_quality (below); this entry point is provided for + * applications that insist on a linear percentage scaling. + */ +{ + /* These are the sample quantization tables given in JPEG spec section K.1. + * The spec says that the values given produce "good" quality, and + * when divided by 2, "very good" quality. + */ + static const unsigned int std_luminance_quant_tbl[DCTSIZE2] = { + 16, 11, 10, 16, 24, 40, 51, 61, + 12, 12, 14, 19, 26, 58, 60, 55, + 14, 13, 16, 24, 40, 57, 69, 56, + 14, 17, 22, 29, 51, 87, 80, 62, + 18, 22, 37, 56, 68, 109, 103, 77, + 24, 35, 55, 64, 81, 104, 113, 92, + 49, 64, 78, 87, 103, 121, 120, 101, + 72, 92, 95, 98, 112, 100, 103, 99 + }; + static const unsigned int std_chrominance_quant_tbl[DCTSIZE2] = { + 17, 18, 24, 47, 99, 99, 99, 99, + 18, 21, 26, 66, 99, 99, 99, 99, + 24, 26, 56, 99, 99, 99, 99, 99, + 47, 66, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99, + 99, 99, 99, 99, 99, 99, 99, 99 + }; + + /* Set up two quantization tables using the specified scaling */ + jpeg_add_quant_table(cinfo, 0, std_luminance_quant_tbl, + scale_factor, force_baseline); + jpeg_add_quant_table(cinfo, 1, std_chrominance_quant_tbl, + scale_factor, force_baseline); +} + + +GLOBAL(int) +jpeg_quality_scaling (int quality) +/* Convert a user-specified quality rating to a percentage scaling factor + * for an underlying quantization table, using our recommended scaling curve. + * The input 'quality' factor should be 0 (terrible) to 100 (very good). + */ +{ + /* Safety limit on quality factor. Convert 0 to 1 to avoid zero divide. */ + if (quality <= 0) quality = 1; + if (quality > 100) quality = 100; + + /* The basic table is used as-is (scaling 100) for a quality of 50. + * Qualities 50..100 are converted to scaling percentage 200 - 2*Q; + * note that at Q=100 the scaling is 0, which will cause jpeg_add_quant_table + * to make all the table entries 1 (hence, minimum quantization loss). + * Qualities 1..50 are converted to scaling percentage 5000/Q. + */ + if (quality < 50) + quality = 5000 / quality; + else + quality = 200 - quality*2; + + return quality; +} + + +GLOBAL(void) +jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline) +/* Set or change the 'quality' (quantization) setting, using default tables. + * This is the standard quality-adjusting entry point for typical user + * interfaces; only those who want detailed control over quantization tables + * would use the preceding three routines directly. + */ +{ + /* Convert user 0-100 rating to percentage scaling */ + quality = jpeg_quality_scaling(quality); + + /* Set up standard quality tables */ + jpeg_set_linear_quality(cinfo, quality, force_baseline); +} + + +/* + * Huffman table setup routines + */ + +LOCAL(void) +add_huff_table (j_compress_ptr cinfo, + JHUFF_TBL **htblptr, const UINT8 *bits, const UINT8 *val) +/* Define a Huffman table */ +{ + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + + MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits)); + MEMCOPY((*htblptr)->huffval, val, SIZEOF((*htblptr)->huffval)); + + /* Initialize sent_table FALSE so table will be written to JPEG file. */ + (*htblptr)->sent_table = FALSE; +} + + +LOCAL(void) +std_huff_tables (j_compress_ptr cinfo) +/* Set up the standard Huffman tables (cf. JPEG standard section K.3) */ +/* IMPORTANT: these are only valid for 8-bit data precision! */ +{ + static const UINT8 bits_dc_luminance[17] = + { /* 0-base */ 0, 0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0 }; + static const UINT8 val_dc_luminance[] = + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + + static const UINT8 bits_dc_chrominance[17] = + { /* 0-base */ 0, 0, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }; + static const UINT8 val_dc_chrominance[] = + { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; + + static const UINT8 bits_ac_luminance[17] = + { /* 0-base */ 0, 0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 0x7d }; + static const UINT8 val_ac_luminance[] = + { 0x01, 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, + 0x21, 0x31, 0x41, 0x06, 0x13, 0x51, 0x61, 0x07, + 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xa1, 0x08, + 0x23, 0x42, 0xb1, 0xc1, 0x15, 0x52, 0xd1, 0xf0, + 0x24, 0x33, 0x62, 0x72, 0x82, 0x09, 0x0a, 0x16, + 0x17, 0x18, 0x19, 0x1a, 0x25, 0x26, 0x27, 0x28, + 0x29, 0x2a, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39, + 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, + 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, 0x59, + 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, + 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, + 0x7a, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, + 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, + 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, + 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, + 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, 0xc4, 0xc5, + 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, 0xd3, 0xd4, + 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xe1, 0xe2, + 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, 0xea, + 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, + 0xf9, 0xfa }; + + static const UINT8 bits_ac_chrominance[17] = + { /* 0-base */ 0, 0, 2, 1, 2, 4, 4, 3, 4, 7, 5, 4, 4, 0, 1, 2, 0x77 }; + static const UINT8 val_ac_chrominance[] = + { 0x00, 0x01, 0x02, 0x03, 0x11, 0x04, 0x05, 0x21, + 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71, + 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, + 0xa1, 0xb1, 0xc1, 0x09, 0x23, 0x33, 0x52, 0xf0, + 0x15, 0x62, 0x72, 0xd1, 0x0a, 0x16, 0x24, 0x34, + 0xe1, 0x25, 0xf1, 0x17, 0x18, 0x19, 0x1a, 0x26, + 0x27, 0x28, 0x29, 0x2a, 0x35, 0x36, 0x37, 0x38, + 0x39, 0x3a, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, + 0x49, 0x4a, 0x53, 0x54, 0x55, 0x56, 0x57, 0x58, + 0x59, 0x5a, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, + 0x69, 0x6a, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, + 0x79, 0x7a, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, + 0x88, 0x89, 0x8a, 0x92, 0x93, 0x94, 0x95, 0x96, + 0x97, 0x98, 0x99, 0x9a, 0xa2, 0xa3, 0xa4, 0xa5, + 0xa6, 0xa7, 0xa8, 0xa9, 0xaa, 0xb2, 0xb3, 0xb4, + 0xb5, 0xb6, 0xb7, 0xb8, 0xb9, 0xba, 0xc2, 0xc3, + 0xc4, 0xc5, 0xc6, 0xc7, 0xc8, 0xc9, 0xca, 0xd2, + 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, + 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, 0xe8, 0xe9, + 0xea, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, + 0xf9, 0xfa }; + + add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[0], + bits_dc_luminance, val_dc_luminance); + add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[0], + bits_ac_luminance, val_ac_luminance); + add_huff_table(cinfo, &cinfo->dc_huff_tbl_ptrs[1], + bits_dc_chrominance, val_dc_chrominance); + add_huff_table(cinfo, &cinfo->ac_huff_tbl_ptrs[1], + bits_ac_chrominance, val_ac_chrominance); +} + + +/* + * Default parameter setup for compression. + * + * Applications that don't choose to use this routine must do their + * own setup of all these parameters. Alternately, you can call this + * to establish defaults and then alter parameters selectively. This + * is the recommended approach since, if we add any new parameters, + * your code will still work (they'll be set to reasonable defaults). + */ + +GLOBAL(void) +jpeg_set_defaults (j_compress_ptr cinfo) +{ + int i; + + /* Safety check to ensure start_compress not called yet. */ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* Allocate comp_info array large enough for maximum component count. + * Array is made permanent in case application wants to compress + * multiple images at same param settings. + */ + if (cinfo->comp_info == NULL) + cinfo->comp_info = (jpeg_component_info *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + MAX_COMPONENTS * SIZEOF(jpeg_component_info)); + + /* Initialize everything not dependent on the color space */ + + cinfo->data_precision = BITS_IN_JSAMPLE; + /* Set up two quantization tables using default quality of 75 */ + jpeg_set_quality(cinfo, 75, TRUE); + /* Set up two Huffman tables */ + std_huff_tables(cinfo); + + /* Initialize default arithmetic coding conditioning */ + for (i = 0; i < NUM_ARITH_TBLS; i++) { + cinfo->arith_dc_L[i] = 0; + cinfo->arith_dc_U[i] = 1; + cinfo->arith_ac_K[i] = 5; + } + + /* Default is no multiple-scan output */ + cinfo->scan_info = NULL; + cinfo->num_scans = 0; + + /* Expect normal source image, not raw downsampled data */ + cinfo->raw_data_in = FALSE; + + /* Use Huffman coding, not arithmetic coding, by default */ + cinfo->arith_code = FALSE; + + /* By default, don't do extra passes to optimize entropy coding */ + cinfo->optimize_coding = FALSE; + /* The standard Huffman tables are only valid for 8-bit data precision. + * If the precision is higher, force optimization on so that usable + * tables will be computed. This test can be removed if default tables + * are supplied that are valid for the desired precision. + */ + if (cinfo->data_precision > 8) + cinfo->optimize_coding = TRUE; + + /* By default, use the simpler non-cosited sampling alignment */ + cinfo->CCIR601_sampling = FALSE; + + /* No input smoothing */ + cinfo->smoothing_factor = 0; + + /* DCT algorithm preference */ + cinfo->dct_method = JDCT_DEFAULT; + + /* No restart markers */ + cinfo->restart_interval = 0; + cinfo->restart_in_rows = 0; + + /* Fill in default JFIF marker parameters. Note that whether the marker + * will actually be written is determined by jpeg_set_colorspace. + */ + cinfo->density_unit = 0; /* Pixel size is unknown by default */ + cinfo->X_density = 1; /* Pixel aspect ratio is square by default */ + cinfo->Y_density = 1; + + /* Choose JPEG colorspace based on input space, set defaults accordingly */ + + jpeg_default_colorspace(cinfo); +} + + +/* + * Select an appropriate JPEG colorspace for in_color_space. + */ + +GLOBAL(void) +jpeg_default_colorspace (j_compress_ptr cinfo) +{ + switch (cinfo->in_color_space) { + case JCS_GRAYSCALE: + jpeg_set_colorspace(cinfo, JCS_GRAYSCALE); + break; + case JCS_RGB: + jpeg_set_colorspace(cinfo, JCS_YCbCr); + break; + case JCS_YCbCr: + jpeg_set_colorspace(cinfo, JCS_YCbCr); + break; + case JCS_CMYK: + jpeg_set_colorspace(cinfo, JCS_CMYK); /* By default, no translation */ + break; + case JCS_YCCK: + jpeg_set_colorspace(cinfo, JCS_YCCK); + break; + case JCS_UNKNOWN: + jpeg_set_colorspace(cinfo, JCS_UNKNOWN); + break; + default: + ERREXIT(cinfo, JERR_BAD_IN_COLORSPACE); + } +} + + +/* + * Set the JPEG colorspace, and choose colorspace-dependent default values. + */ + +GLOBAL(void) +jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace) +{ + jpeg_component_info * compptr; + int ci; + +#define SET_COMP(index,id,hsamp,vsamp,quant,dctbl,actbl) \ + (compptr = &cinfo->comp_info[index], \ + compptr->component_id = (id), \ + compptr->h_samp_factor = (hsamp), \ + compptr->v_samp_factor = (vsamp), \ + compptr->quant_tbl_no = (quant), \ + compptr->dc_tbl_no = (dctbl), \ + compptr->ac_tbl_no = (actbl) ) + + /* Safety check to ensure start_compress not called yet. */ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* For all colorspaces, we use Q and Huff tables 0 for luminance components, + * tables 1 for chrominance components. + */ + + cinfo->jpeg_color_space = colorspace; + + cinfo->write_JFIF_header = FALSE; /* No marker for non-JFIF colorspaces */ + cinfo->write_Adobe_marker = FALSE; /* write no Adobe marker by default */ + + switch (colorspace) { + case JCS_GRAYSCALE: + cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */ + cinfo->num_components = 1; + /* JFIF specifies component ID 1 */ + SET_COMP(0, 1, 1,1, 0, 0,0); + break; + case JCS_RGB: + cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag RGB */ + cinfo->num_components = 3; + SET_COMP(0, 0x52 /* 'R' */, 1,1, 0, 0,0); + SET_COMP(1, 0x47 /* 'G' */, 1,1, 0, 0,0); + SET_COMP(2, 0x42 /* 'B' */, 1,1, 0, 0,0); + break; + case JCS_YCbCr: + cinfo->write_JFIF_header = TRUE; /* Write a JFIF marker */ + cinfo->num_components = 3; + /* JFIF specifies component IDs 1,2,3 */ + /* We default to 2x2 subsamples of chrominance */ + SET_COMP(0, 1, 2,2, 0, 0,0); + SET_COMP(1, 2, 1,1, 1, 1,1); + SET_COMP(2, 3, 1,1, 1, 1,1); + break; + case JCS_CMYK: + cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag CMYK */ + cinfo->num_components = 4; + SET_COMP(0, 0x43 /* 'C' */, 1,1, 0, 0,0); + SET_COMP(1, 0x4D /* 'M' */, 1,1, 0, 0,0); + SET_COMP(2, 0x59 /* 'Y' */, 1,1, 0, 0,0); + SET_COMP(3, 0x4B /* 'K' */, 1,1, 0, 0,0); + break; + case JCS_YCCK: + cinfo->write_Adobe_marker = TRUE; /* write Adobe marker to flag YCCK */ + cinfo->num_components = 4; + SET_COMP(0, 1, 2,2, 0, 0,0); + SET_COMP(1, 2, 1,1, 1, 1,1); + SET_COMP(2, 3, 1,1, 1, 1,1); + SET_COMP(3, 4, 2,2, 0, 0,0); + break; + case JCS_UNKNOWN: + cinfo->num_components = cinfo->input_components; + if (cinfo->num_components < 1 || cinfo->num_components > MAX_COMPONENTS) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, + MAX_COMPONENTS); + for (ci = 0; ci < cinfo->num_components; ci++) { + SET_COMP(ci, ci, 1,1, 0, 0,0); + } + break; + default: + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + } +} + + +#ifdef C_PROGRESSIVE_SUPPORTED + +LOCAL(jpeg_scan_info *) +fill_a_scan (jpeg_scan_info * scanptr, int ci, + int Ss, int Se, int Ah, int Al) +/* Support routine: generate one scan for specified component */ +{ + scanptr->comps_in_scan = 1; + scanptr->component_index[0] = ci; + scanptr->Ss = Ss; + scanptr->Se = Se; + scanptr->Ah = Ah; + scanptr->Al = Al; + scanptr++; + return scanptr; +} + +LOCAL(jpeg_scan_info *) +fill_scans (jpeg_scan_info * scanptr, int ncomps, + int Ss, int Se, int Ah, int Al) +/* Support routine: generate one scan for each component */ +{ + int ci; + + for (ci = 0; ci < ncomps; ci++) { + scanptr->comps_in_scan = 1; + scanptr->component_index[0] = ci; + scanptr->Ss = Ss; + scanptr->Se = Se; + scanptr->Ah = Ah; + scanptr->Al = Al; + scanptr++; + } + return scanptr; +} + +LOCAL(jpeg_scan_info *) +fill_dc_scans (jpeg_scan_info * scanptr, int ncomps, int Ah, int Al) +/* Support routine: generate interleaved DC scan if possible, else N scans */ +{ + int ci; + + if (ncomps <= MAX_COMPS_IN_SCAN) { + /* Single interleaved DC scan */ + scanptr->comps_in_scan = ncomps; + for (ci = 0; ci < ncomps; ci++) + scanptr->component_index[ci] = ci; + scanptr->Ss = scanptr->Se = 0; + scanptr->Ah = Ah; + scanptr->Al = Al; + scanptr++; + } else { + /* Noninterleaved DC scan for each component */ + scanptr = fill_scans(scanptr, ncomps, 0, 0, Ah, Al); + } + return scanptr; +} + + +/* + * Create a recommended progressive-JPEG script. + * cinfo->num_components and cinfo->jpeg_color_space must be correct. + */ + +GLOBAL(void) +jpeg_simple_progression (j_compress_ptr cinfo) +{ + int ncomps = cinfo->num_components; + int nscans; + jpeg_scan_info * scanptr; + + /* Safety check to ensure start_compress not called yet. */ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + /* Figure space needed for script. Calculation must match code below! */ + if (ncomps == 3 && cinfo->jpeg_color_space == JCS_YCbCr) { + /* Custom script for YCbCr color images. */ + nscans = 10; + } else { + /* All-purpose script for other color spaces. */ + if (ncomps > MAX_COMPS_IN_SCAN) + nscans = 6 * ncomps; /* 2 DC + 4 AC scans per component */ + else + nscans = 2 + 4 * ncomps; /* 2 DC scans; 4 AC scans per component */ + } + + /* Allocate space for script. */ + /* We use permanent pool just in case application re-uses script. */ + scanptr = (jpeg_scan_info *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + nscans * SIZEOF(jpeg_scan_info)); + cinfo->scan_info = scanptr; + cinfo->num_scans = nscans; + + if (ncomps == 3 && cinfo->jpeg_color_space == JCS_YCbCr) { + /* Custom script for YCbCr color images. */ + /* Initial DC scan */ + scanptr = fill_dc_scans(scanptr, ncomps, 0, 1); + /* Initial AC scan: get some luma data out in a hurry */ + scanptr = fill_a_scan(scanptr, 0, 1, 5, 0, 2); + /* Chroma data is too small to be worth expending many scans on */ + scanptr = fill_a_scan(scanptr, 2, 1, 63, 0, 1); + scanptr = fill_a_scan(scanptr, 1, 1, 63, 0, 1); + /* Complete spectral selection for luma AC */ + scanptr = fill_a_scan(scanptr, 0, 6, 63, 0, 2); + /* Refine next bit of luma AC */ + scanptr = fill_a_scan(scanptr, 0, 1, 63, 2, 1); + /* Finish DC successive approximation */ + scanptr = fill_dc_scans(scanptr, ncomps, 1, 0); + /* Finish AC successive approximation */ + scanptr = fill_a_scan(scanptr, 2, 1, 63, 1, 0); + scanptr = fill_a_scan(scanptr, 1, 1, 63, 1, 0); + /* Luma bottom bit comes last since it's usually largest scan */ + scanptr = fill_a_scan(scanptr, 0, 1, 63, 1, 0); + } else { + /* All-purpose script for other color spaces. */ + /* Successive approximation first pass */ + scanptr = fill_dc_scans(scanptr, ncomps, 0, 1); + scanptr = fill_scans(scanptr, ncomps, 1, 5, 0, 2); + scanptr = fill_scans(scanptr, ncomps, 6, 63, 0, 2); + /* Successive approximation second pass */ + scanptr = fill_scans(scanptr, ncomps, 1, 63, 2, 1); + /* Successive approximation final pass */ + scanptr = fill_dc_scans(scanptr, ncomps, 1, 0); + scanptr = fill_scans(scanptr, ncomps, 1, 63, 1, 0); + } +} + +#endif /* C_PROGRESSIVE_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/jcphuff.c b/windows_libs/jpeg-6a/jcphuff.c new file mode 100644 index 00000000..9ace161c --- /dev/null +++ b/windows_libs/jpeg-6a/jcphuff.c @@ -0,0 +1,829 @@ +/* + * jcphuff.c + * + * Copyright (C) 1995-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains Huffman entropy encoding routines for progressive JPEG. + * + * We do not support output suspension in this module, since the library + * currently does not allow multiple-scan files to be written with output + * suspension. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jchuff.h" /* Declarations shared with jchuff.c */ + +#ifdef C_PROGRESSIVE_SUPPORTED + +/* Expanded entropy encoder object for progressive Huffman encoding. */ + +typedef struct { + struct jpeg_entropy_encoder pub; /* public fields */ + + /* Mode flag: TRUE for optimization, FALSE for actual data output */ + boolean gather_statistics; + + /* Bit-level coding status. + * next_output_byte/free_in_buffer are local copies of cinfo->dest fields. + */ + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + INT32 put_buffer; /* current bit-accumulation buffer */ + int put_bits; /* # of bits now in it */ + j_compress_ptr cinfo; /* link to cinfo (needed for dump_buffer) */ + + /* Coding status for DC components */ + int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ + + /* Coding status for AC components */ + int ac_tbl_no; /* the table number of the single component */ + unsigned int EOBRUN; /* run length of EOBs */ + unsigned int BE; /* # of buffered correction bits before MCU */ + char * bit_buffer; /* buffer for correction bits (1 per char) */ + /* packing correction bits tightly would save some space but cost time... */ + + unsigned int restarts_to_go; /* MCUs left in this restart interval */ + int next_restart_num; /* next restart number to write (0-7) */ + + /* Pointers to derived tables (these workspaces have image lifespan). + * Since any one scan codes only DC or only AC, we only need one set + * of tables, not one for DC and one for AC. + */ + c_derived_tbl * derived_tbls[NUM_HUFF_TBLS]; + + /* Statistics tables for optimization; again, one set is enough */ + long * count_ptrs[NUM_HUFF_TBLS]; +} phuff_entropy_encoder; + +typedef phuff_entropy_encoder * phuff_entropy_ptr; + +/* MAX_CORR_BITS is the number of bits the AC refinement correction-bit + * buffer can hold. Larger sizes may slightly improve compression, but + * 1000 is already well into the realm of overkill. + * The minimum safe size is 64 bits. + */ + +#define MAX_CORR_BITS 1000 /* Max # of correction bits I can buffer */ + +/* IRIGHT_SHIFT is like RIGHT_SHIFT, but works on int rather than INT32. + * We assume that int right shift is unsigned if INT32 right shift is, + * which should be safe. + */ + +#ifdef RIGHT_SHIFT_IS_UNSIGNED +#define ISHIFT_TEMPS int ishift_temp; +#define IRIGHT_SHIFT(x,shft) \ + ((ishift_temp = (x)) < 0 ? \ + (ishift_temp >> (shft)) | ((~0) << (16-(shft))) : \ + (ishift_temp >> (shft))) +#else +#define ISHIFT_TEMPS +#define IRIGHT_SHIFT(x,shft) ((x) >> (shft)) +#endif + +/* Forward declarations */ +METHODDEF(boolean) encode_mcu_DC_first JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(boolean) encode_mcu_AC_first JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(boolean) encode_mcu_DC_refine JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(boolean) encode_mcu_AC_refine JPP((j_compress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(void) finish_pass_phuff JPP((j_compress_ptr cinfo)); +METHODDEF(void) finish_pass_gather_phuff JPP((j_compress_ptr cinfo)); + + +/* + * Initialize for a Huffman-compressed scan using progressive JPEG. + */ + +METHODDEF(void) +start_pass_phuff (j_compress_ptr cinfo, boolean gather_statistics) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + boolean is_DC_band; + int ci, tbl; + jpeg_component_info * compptr; + + entropy->cinfo = cinfo; + entropy->gather_statistics = gather_statistics; + + is_DC_band = (cinfo->Ss == 0); + + /* We assume jcmaster.c already validated the scan parameters. */ + + /* Select execution routines */ + if (cinfo->Ah == 0) { + if (is_DC_band) + entropy->pub.encode_mcu = encode_mcu_DC_first; + else + entropy->pub.encode_mcu = encode_mcu_AC_first; + } else { + if (is_DC_band) + entropy->pub.encode_mcu = encode_mcu_DC_refine; + else { + entropy->pub.encode_mcu = encode_mcu_AC_refine; + /* AC refinement needs a correction bit buffer */ + if (entropy->bit_buffer == NULL) + entropy->bit_buffer = (char *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + MAX_CORR_BITS * SIZEOF(char)); + } + } + if (gather_statistics) + entropy->pub.finish_pass = finish_pass_gather_phuff; + else + entropy->pub.finish_pass = finish_pass_phuff; + + /* Only DC coefficients may be interleaved, so cinfo->comps_in_scan = 1 + * for AC coefficients. + */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Initialize DC predictions to 0 */ + entropy->last_dc_val[ci] = 0; + /* Make sure requested tables are present */ + /* (In gather mode, tables need not be allocated yet) */ + if (is_DC_band) { + if (cinfo->Ah != 0) /* DC refinement needs no table */ + continue; + tbl = compptr->dc_tbl_no; + if (tbl < 0 || tbl >= NUM_HUFF_TBLS || + (cinfo->dc_huff_tbl_ptrs[tbl] == NULL && !gather_statistics)) + ERREXIT1(cinfo,JERR_NO_HUFF_TABLE, tbl); + } else { + entropy->ac_tbl_no = tbl = compptr->ac_tbl_no; + if (tbl < 0 || tbl >= NUM_HUFF_TBLS || + (cinfo->ac_huff_tbl_ptrs[tbl] == NULL && !gather_statistics)) + ERREXIT1(cinfo,JERR_NO_HUFF_TABLE, tbl); + } + if (gather_statistics) { + /* Allocate and zero the statistics tables */ + /* Note that jpeg_gen_optimal_table expects 257 entries in each table! */ + if (entropy->count_ptrs[tbl] == NULL) + entropy->count_ptrs[tbl] = (long *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + 257 * SIZEOF(long)); + MEMZERO(entropy->count_ptrs[tbl], 257 * SIZEOF(long)); + } else { + /* Compute derived values for Huffman tables */ + /* We may do this more than once for a table, but it's not expensive */ + if (is_DC_band) + jpeg_make_c_derived_tbl(cinfo, cinfo->dc_huff_tbl_ptrs[tbl], + & entropy->derived_tbls[tbl]); + else + jpeg_make_c_derived_tbl(cinfo, cinfo->ac_huff_tbl_ptrs[tbl], + & entropy->derived_tbls[tbl]); + } + } + + /* Initialize AC stuff */ + entropy->EOBRUN = 0; + entropy->BE = 0; + + /* Initialize bit buffer to empty */ + entropy->put_buffer = 0; + entropy->put_bits = 0; + + /* Initialize restart stuff */ + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num = 0; +} + + +/* Outputting bytes to the file. + * NB: these must be called only when actually outputting, + * that is, entropy->gather_statistics == FALSE. + */ + +/* Emit a byte */ +#define emit_byte(entropy,val) \ + { *(entropy)->next_output_byte++ = (JOCTET) (val); \ + if (--(entropy)->free_in_buffer == 0) \ + dump_buffer(entropy); } + + +LOCAL(void) +dump_buffer (phuff_entropy_ptr entropy) +/* Empty the output buffer; we do not support suspension in this module. */ +{ + struct jpeg_destination_mgr * dest = entropy->cinfo->dest; + + if (! (*dest->empty_output_buffer) (entropy->cinfo)) + ERREXIT(entropy->cinfo, JERR_CANT_SUSPEND); + /* After a successful buffer dump, must reset buffer pointers */ + entropy->next_output_byte = dest->next_output_byte; + entropy->free_in_buffer = dest->free_in_buffer; +} + + +/* Outputting bits to the file */ + +/* Only the right 24 bits of put_buffer are used; the valid bits are + * left-justified in this part. At most 16 bits can be passed to emit_bits + * in one call, and we never retain more than 7 bits in put_buffer + * between calls, so 24 bits are sufficient. + */ + +INLINE +LOCAL(void) +emit_bits (phuff_entropy_ptr entropy, unsigned int code, int size) +/* Emit some bits, unless we are in gather mode */ +{ + /* This routine is heavily used, so it's worth coding tightly. */ + register INT32 put_buffer = (INT32) code; + register int put_bits = entropy->put_bits; + + /* if size is 0, caller used an invalid Huffman table entry */ + if (size == 0) + ERREXIT(entropy->cinfo, JERR_HUFF_MISSING_CODE); + + if (entropy->gather_statistics) + return; /* do nothing if we're only getting stats */ + + put_buffer &= (((INT32) 1)<put_buffer; /* and merge with old buffer contents */ + + while (put_bits >= 8) { + int c = (int) ((put_buffer >> 16) & 0xFF); + + emit_byte(entropy, c); + if (c == 0xFF) { /* need to stuff a zero byte? */ + emit_byte(entropy, 0); + } + put_buffer <<= 8; + put_bits -= 8; + } + + entropy->put_buffer = put_buffer; /* update variables */ + entropy->put_bits = put_bits; +} + + +LOCAL(void) +flush_bits (phuff_entropy_ptr entropy) +{ + emit_bits(entropy, 0x7F, 7); /* fill any partial byte with ones */ + entropy->put_buffer = 0; /* and reset bit-buffer to empty */ + entropy->put_bits = 0; +} + + +/* + * Emit (or just count) a Huffman symbol. + */ + +INLINE +LOCAL(void) +emit_symbol (phuff_entropy_ptr entropy, int tbl_no, int symbol) +{ + if (entropy->gather_statistics) + entropy->count_ptrs[tbl_no][symbol]++; + else { + c_derived_tbl * tbl = entropy->derived_tbls[tbl_no]; + emit_bits(entropy, tbl->ehufco[symbol], tbl->ehufsi[symbol]); + } +} + + +/* + * Emit bits from a correction bit buffer. + */ + +LOCAL(void) +emit_buffered_bits (phuff_entropy_ptr entropy, char * bufstart, + unsigned int nbits) +{ + if (entropy->gather_statistics) + return; /* no real work */ + + while (nbits > 0) { + emit_bits(entropy, (unsigned int) (*bufstart), 1); + bufstart++; + nbits--; + } +} + + +/* + * Emit any pending EOBRUN symbol. + */ + +LOCAL(void) +emit_eobrun (phuff_entropy_ptr entropy) +{ + register int temp, nbits; + + if (entropy->EOBRUN > 0) { /* if there is any pending EOBRUN */ + temp = entropy->EOBRUN; + nbits = 0; + while ((temp >>= 1)) + nbits++; + + emit_symbol(entropy, entropy->ac_tbl_no, nbits << 4); + if (nbits) + emit_bits(entropy, entropy->EOBRUN, nbits); + + entropy->EOBRUN = 0; + + /* Emit any buffered correction bits */ + emit_buffered_bits(entropy, entropy->bit_buffer, entropy->BE); + entropy->BE = 0; + } +} + + +/* + * Emit a restart marker & resynchronize predictions. + */ + +LOCAL(void) +emit_restart (phuff_entropy_ptr entropy, int restart_num) +{ + int ci; + + emit_eobrun(entropy); + + if (! entropy->gather_statistics) { + flush_bits(entropy); + emit_byte(entropy, 0xFF); + emit_byte(entropy, JPEG_RST0 + restart_num); + } + + if (entropy->cinfo->Ss == 0) { + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < entropy->cinfo->comps_in_scan; ci++) + entropy->last_dc_val[ci] = 0; + } else { + /* Re-initialize all AC-related fields to 0 */ + entropy->EOBRUN = 0; + entropy->BE = 0; + } +} + + +/* + * MCU encoding for DC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(boolean) +encode_mcu_DC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + register int temp, temp2; + register int nbits; + int blkn, ci; + int Al = cinfo->Al; + JBLOCKROW block; + jpeg_component_info * compptr; + ISHIFT_TEMPS + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) + if (entropy->restarts_to_go == 0) + emit_restart(entropy, entropy->next_restart_num); + + /* Encode the MCU data blocks */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + + /* Compute the DC value after the required point transform by Al. + * This is simply an arithmetic right shift. + */ + temp2 = IRIGHT_SHIFT((int) ((*block)[0]), Al); + + /* DC differences are figured on the point-transformed values. */ + temp = temp2 - entropy->last_dc_val[ci]; + entropy->last_dc_val[ci] = temp2; + + /* Encode the DC coefficient difference per section G.1.2.1 */ + temp2 = temp; + if (temp < 0) { + temp = -temp; /* temp is abs value of input */ + /* For a negative input, want temp2 = bitwise complement of abs(input) */ + /* This code assumes we are on a two's complement machine */ + temp2--; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 0; + while (temp) { + nbits++; + temp >>= 1; + } + + /* Count/emit the Huffman-coded symbol for the number of bits */ + emit_symbol(entropy, compptr->dc_tbl_no, nbits); + + /* Emit that number of bits of the value, if positive, */ + /* or the complement of its magnitude, if negative. */ + if (nbits) /* emit_bits rejects calls with size 0 */ + emit_bits(entropy, (unsigned int) temp2, nbits); + } + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * MCU encoding for AC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(boolean) +encode_mcu_AC_first (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + register int temp, temp2; + register int nbits; + register int r, k; + int Se = cinfo->Se; + int Al = cinfo->Al; + JBLOCKROW block; + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) + if (entropy->restarts_to_go == 0) + emit_restart(entropy, entropy->next_restart_num); + + /* Encode the MCU data block */ + block = MCU_data[0]; + + /* Encode the AC coefficients per section G.1.2.2, fig. G.3 */ + + r = 0; /* r = run length of zeros */ + + for (k = cinfo->Ss; k <= Se; k++) { + if ((temp = (*block)[jpeg_natural_order[k]]) == 0) { + r++; + continue; + } + /* We must apply the point transform by Al. For AC coefficients this + * is an integer division with rounding towards 0. To do this portably + * in C, we shift after obtaining the absolute value; so the code is + * interwoven with finding the abs value (temp) and output bits (temp2). + */ + if (temp < 0) { + temp = -temp; /* temp is abs value of input */ + temp >>= Al; /* apply the point transform */ + /* For a negative coef, want temp2 = bitwise complement of abs(coef) */ + temp2 = ~temp; + } else { + temp >>= Al; /* apply the point transform */ + temp2 = temp; + } + /* Watch out for case that nonzero coef is zero after point transform */ + if (temp == 0) { + r++; + continue; + } + + /* Emit any pending EOBRUN */ + if (entropy->EOBRUN > 0) + emit_eobrun(entropy); + /* if run length > 15, must emit special run-length-16 codes (0xF0) */ + while (r > 15) { + emit_symbol(entropy, entropy->ac_tbl_no, 0xF0); + r -= 16; + } + + /* Find the number of bits needed for the magnitude of the coefficient */ + nbits = 1; /* there must be at least one 1 bit */ + while ((temp >>= 1)) + nbits++; + + /* Count/emit Huffman symbol for run length / number of bits */ + emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + nbits); + + /* Emit that number of bits of the value, if positive, */ + /* or the complement of its magnitude, if negative. */ + emit_bits(entropy, (unsigned int) temp2, nbits); + + r = 0; /* reset zero run length */ + } + + if (r > 0) { /* If there are trailing zeroes, */ + entropy->EOBRUN++; /* count an EOB */ + if (entropy->EOBRUN == 0x7FFF) + emit_eobrun(entropy); /* force it out to avoid overflow */ + } + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * MCU encoding for DC successive approximation refinement scan. + * Note: we assume such scans can be multi-component, although the spec + * is not very clear on the point. + */ + +METHODDEF(boolean) +encode_mcu_DC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + register int temp; + int blkn; + int Al = cinfo->Al; + JBLOCKROW block; + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) + if (entropy->restarts_to_go == 0) + emit_restart(entropy, entropy->next_restart_num); + + /* Encode the MCU data blocks */ + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + + /* We simply emit the Al'th bit of the DC coefficient value. */ + temp = (*block)[0]; + emit_bits(entropy, (unsigned int) (temp >> Al), 1); + } + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * MCU encoding for AC successive approximation refinement scan. + */ + +METHODDEF(boolean) +encode_mcu_AC_refine (j_compress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + register int temp; + register int r, k; + int EOB; + char *BR_buffer; + unsigned int BR; + int Se = cinfo->Se; + int Al = cinfo->Al; + JBLOCKROW block; + int absvalues[DCTSIZE2]; + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Emit restart marker if needed */ + if (cinfo->restart_interval) + if (entropy->restarts_to_go == 0) + emit_restart(entropy, entropy->next_restart_num); + + /* Encode the MCU data block */ + block = MCU_data[0]; + + /* It is convenient to make a pre-pass to determine the transformed + * coefficients' absolute values and the EOB position. + */ + EOB = 0; + for (k = cinfo->Ss; k <= Se; k++) { + temp = (*block)[jpeg_natural_order[k]]; + /* We must apply the point transform by Al. For AC coefficients this + * is an integer division with rounding towards 0. To do this portably + * in C, we shift after obtaining the absolute value. + */ + if (temp < 0) + temp = -temp; /* temp is abs value of input */ + temp >>= Al; /* apply the point transform */ + absvalues[k] = temp; /* save abs value for main pass */ + if (temp == 1) + EOB = k; /* EOB = index of last newly-nonzero coef */ + } + + /* Encode the AC coefficients per section G.1.2.3, fig. G.7 */ + + r = 0; /* r = run length of zeros */ + BR = 0; /* BR = count of buffered bits added now */ + BR_buffer = entropy->bit_buffer + entropy->BE; /* Append bits to buffer */ + + for (k = cinfo->Ss; k <= Se; k++) { + if ((temp = absvalues[k]) == 0) { + r++; + continue; + } + + /* Emit any required ZRLs, but not if they can be folded into EOB */ + while (r > 15 && k <= EOB) { + /* emit any pending EOBRUN and the BE correction bits */ + emit_eobrun(entropy); + /* Emit ZRL */ + emit_symbol(entropy, entropy->ac_tbl_no, 0xF0); + r -= 16; + /* Emit buffered correction bits that must be associated with ZRL */ + emit_buffered_bits(entropy, BR_buffer, BR); + BR_buffer = entropy->bit_buffer; /* BE bits are gone now */ + BR = 0; + } + + /* If the coef was previously nonzero, it only needs a correction bit. + * NOTE: a straight translation of the spec's figure G.7 would suggest + * that we also need to test r > 15. But if r > 15, we can only get here + * if k > EOB, which implies that this coefficient is not 1. + */ + if (temp > 1) { + /* The correction bit is the next bit of the absolute value. */ + BR_buffer[BR++] = (char) (temp & 1); + continue; + } + + /* Emit any pending EOBRUN and the BE correction bits */ + emit_eobrun(entropy); + + /* Count/emit Huffman symbol for run length / number of bits */ + emit_symbol(entropy, entropy->ac_tbl_no, (r << 4) + 1); + + /* Emit output bit for newly-nonzero coef */ + temp = ((*block)[jpeg_natural_order[k]] < 0) ? 0 : 1; + emit_bits(entropy, (unsigned int) temp, 1); + + /* Emit buffered correction bits that must be associated with this code */ + emit_buffered_bits(entropy, BR_buffer, BR); + BR_buffer = entropy->bit_buffer; /* BE bits are gone now */ + BR = 0; + r = 0; /* reset zero run length */ + } + + if (r > 0 || BR > 0) { /* If there are trailing zeroes, */ + entropy->EOBRUN++; /* count an EOB */ + entropy->BE += BR; /* concat my correction bits to older ones */ + /* We force out the EOB if we risk either: + * 1. overflow of the EOB counter; + * 2. overflow of the correction bit buffer during the next MCU. + */ + if (entropy->EOBRUN == 0x7FFF || entropy->BE > (MAX_CORR_BITS-DCTSIZE2+1)) + emit_eobrun(entropy); + } + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; + + /* Update restart-interval state too */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) { + entropy->restarts_to_go = cinfo->restart_interval; + entropy->next_restart_num++; + entropy->next_restart_num &= 7; + } + entropy->restarts_to_go--; + } + + return TRUE; +} + + +/* + * Finish up at the end of a Huffman-compressed progressive scan. + */ + +METHODDEF(void) +finish_pass_phuff (j_compress_ptr cinfo) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + + entropy->next_output_byte = cinfo->dest->next_output_byte; + entropy->free_in_buffer = cinfo->dest->free_in_buffer; + + /* Flush out any buffered data */ + emit_eobrun(entropy); + flush_bits(entropy); + + cinfo->dest->next_output_byte = entropy->next_output_byte; + cinfo->dest->free_in_buffer = entropy->free_in_buffer; +} + + +/* + * Finish up a statistics-gathering pass and create the new Huffman tables. + */ + +METHODDEF(void) +finish_pass_gather_phuff (j_compress_ptr cinfo) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + boolean is_DC_band; + int ci, tbl; + jpeg_component_info * compptr; + JHUFF_TBL **htblptr; + boolean did[NUM_HUFF_TBLS]; + + /* Flush out buffered data (all we care about is counting the EOB symbol) */ + emit_eobrun(entropy); + + is_DC_band = (cinfo->Ss == 0); + + /* It's important not to apply jpeg_gen_optimal_table more than once + * per table, because it clobbers the input frequency counts! + */ + MEMZERO(did, SIZEOF(did)); + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + if (is_DC_band) { + if (cinfo->Ah != 0) /* DC refinement needs no table */ + continue; + tbl = compptr->dc_tbl_no; + } else { + tbl = compptr->ac_tbl_no; + } + if (! did[tbl]) { + if (is_DC_band) + htblptr = & cinfo->dc_huff_tbl_ptrs[tbl]; + else + htblptr = & cinfo->ac_huff_tbl_ptrs[tbl]; + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + jpeg_gen_optimal_table(cinfo, *htblptr, entropy->count_ptrs[tbl]); + did[tbl] = TRUE; + } + } +} + + +/* + * Module initialization routine for progressive Huffman entropy encoding. + */ + +GLOBAL(void) +jinit_phuff_encoder (j_compress_ptr cinfo) +{ + phuff_entropy_ptr entropy; + int i; + + entropy = (phuff_entropy_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(phuff_entropy_encoder)); + cinfo->entropy = (struct jpeg_entropy_encoder *) entropy; + entropy->pub.start_pass = start_pass_phuff; + + /* Mark tables unallocated */ + for (i = 0; i < NUM_HUFF_TBLS; i++) { + entropy->derived_tbls[i] = NULL; + entropy->count_ptrs[i] = NULL; + } + entropy->bit_buffer = NULL; /* needed only in AC refinement scan */ +} + +#endif /* C_PROGRESSIVE_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/jcprepct.c b/windows_libs/jpeg-6a/jcprepct.c new file mode 100644 index 00000000..fa93333d --- /dev/null +++ b/windows_libs/jpeg-6a/jcprepct.c @@ -0,0 +1,354 @@ +/* + * jcprepct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the compression preprocessing controller. + * This controller manages the color conversion, downsampling, + * and edge expansion steps. + * + * Most of the complexity here is associated with buffering input rows + * as required by the downsampler. See the comments at the head of + * jcsample.c for the downsampler's needs. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* At present, jcsample.c can request context rows only for smoothing. + * In the future, we might also need context rows for CCIR601 sampling + * or other more-complex downsampling procedures. The code to support + * context rows should be compiled only if needed. + */ +#ifdef INPUT_SMOOTHING_SUPPORTED +#define CONTEXT_ROWS_SUPPORTED +#endif + + +/* + * For the simple (no-context-row) case, we just need to buffer one + * row group's worth of pixels for the downsampling step. At the bottom of + * the image, we pad to a full row group by replicating the last pixel row. + * The downsampler's last output row is then replicated if needed to pad + * out to a full iMCU row. + * + * When providing context rows, we must buffer three row groups' worth of + * pixels. Three row groups are physically allocated, but the row pointer + * arrays are made five row groups high, with the extra pointers above and + * below "wrapping around" to point to the last and first real row groups. + * This allows the downsampler to access the proper context rows. + * At the top and bottom of the image, we create dummy context rows by + * copying the first or last real pixel row. This copying could be avoided + * by pointer hacking as is done in jdmainct.c, but it doesn't seem worth the + * trouble on the compression side. + */ + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_c_prep_controller pub; /* public fields */ + + /* Downsampling input buffer. This buffer holds color-converted data + * until we have enough to do a downsample step. + */ + JSAMPARRAY color_buf[MAX_COMPONENTS]; + + JDIMENSION rows_to_go; /* counts rows remaining in source image */ + int next_buf_row; /* index of next row to store in color_buf */ + +#ifdef CONTEXT_ROWS_SUPPORTED /* only needed for context case */ + int this_row_group; /* starting row index of group to process */ + int next_buf_stop; /* downsample when we reach this index */ +#endif +} my_prep_controller; + +typedef my_prep_controller * my_prep_ptr; + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_prep (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_prep_ptr prep = (my_prep_ptr) cinfo->prep; + + if (pass_mode != JBUF_PASS_THRU) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + + /* Initialize total-height counter for detecting bottom of image */ + prep->rows_to_go = cinfo->image_height; + /* Mark the conversion buffer empty */ + prep->next_buf_row = 0; +#ifdef CONTEXT_ROWS_SUPPORTED + /* Preset additional state variables for context mode. + * These aren't used in non-context mode, so we needn't test which mode. + */ + prep->this_row_group = 0; + /* Set next_buf_stop to stop after two row groups have been read in. */ + prep->next_buf_stop = 2 * cinfo->max_v_samp_factor; +#endif +} + + +/* + * Expand an image vertically from height input_rows to height output_rows, + * by duplicating the bottom row. + */ + +LOCAL(void) +expand_bottom_edge (JSAMPARRAY image_data, JDIMENSION num_cols, + int input_rows, int output_rows) +{ + register int row; + + for (row = input_rows; row < output_rows; row++) { + jcopy_sample_rows(image_data, input_rows-1, image_data, row, + 1, num_cols); + } +} + + +/* + * Process some data in the simple no-context case. + * + * Preprocessor output data is counted in "row groups". A row group + * is defined to be v_samp_factor sample rows of each component. + * Downsampling will produce this much data from each max_v_samp_factor + * input rows. + */ + +METHODDEF(void) +pre_process_data (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail, + JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, + JDIMENSION out_row_groups_avail) +{ + my_prep_ptr prep = (my_prep_ptr) cinfo->prep; + int numrows, ci; + JDIMENSION inrows; + jpeg_component_info * compptr; + + while (*in_row_ctr < in_rows_avail && + *out_row_group_ctr < out_row_groups_avail) { + /* Do color conversion to fill the conversion buffer. */ + inrows = in_rows_avail - *in_row_ctr; + numrows = cinfo->max_v_samp_factor - prep->next_buf_row; + numrows = (int) MIN((JDIMENSION) numrows, inrows); + (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr, + prep->color_buf, + (JDIMENSION) prep->next_buf_row, + numrows); + *in_row_ctr += numrows; + prep->next_buf_row += numrows; + prep->rows_to_go -= numrows; + /* If at bottom of image, pad to fill the conversion buffer. */ + if (prep->rows_to_go == 0 && + prep->next_buf_row < cinfo->max_v_samp_factor) { + for (ci = 0; ci < cinfo->num_components; ci++) { + expand_bottom_edge(prep->color_buf[ci], cinfo->image_width, + prep->next_buf_row, cinfo->max_v_samp_factor); + } + prep->next_buf_row = cinfo->max_v_samp_factor; + } + /* If we've filled the conversion buffer, empty it. */ + if (prep->next_buf_row == cinfo->max_v_samp_factor) { + (*cinfo->downsample->downsample) (cinfo, + prep->color_buf, (JDIMENSION) 0, + output_buf, *out_row_group_ctr); + prep->next_buf_row = 0; + (*out_row_group_ctr)++; + } + /* If at bottom of image, pad the output to a full iMCU height. + * Note we assume the caller is providing a one-iMCU-height output buffer! + */ + if (prep->rows_to_go == 0 && + *out_row_group_ctr < out_row_groups_avail) { + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + expand_bottom_edge(output_buf[ci], + compptr->width_in_blocks * DCTSIZE, + (int) (*out_row_group_ctr * compptr->v_samp_factor), + (int) (out_row_groups_avail * compptr->v_samp_factor)); + } + *out_row_group_ctr = out_row_groups_avail; + break; /* can exit outer loop without test */ + } + } +} + + +#ifdef CONTEXT_ROWS_SUPPORTED + +/* + * Process some data in the context case. + */ + +METHODDEF(void) +pre_process_context (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail, + JSAMPIMAGE output_buf, JDIMENSION *out_row_group_ctr, + JDIMENSION out_row_groups_avail) +{ + my_prep_ptr prep = (my_prep_ptr) cinfo->prep; + int numrows, ci; + int buf_height = cinfo->max_v_samp_factor * 3; + JDIMENSION inrows; + + while (*out_row_group_ctr < out_row_groups_avail) { + if (*in_row_ctr < in_rows_avail) { + /* Do color conversion to fill the conversion buffer. */ + inrows = in_rows_avail - *in_row_ctr; + numrows = prep->next_buf_stop - prep->next_buf_row; + numrows = (int) MIN((JDIMENSION) numrows, inrows); + (*cinfo->cconvert->color_convert) (cinfo, input_buf + *in_row_ctr, + prep->color_buf, + (JDIMENSION) prep->next_buf_row, + numrows); + /* Pad at top of image, if first time through */ + if (prep->rows_to_go == cinfo->image_height) { + for (ci = 0; ci < cinfo->num_components; ci++) { + int row; + for (row = 1; row <= cinfo->max_v_samp_factor; row++) { + jcopy_sample_rows(prep->color_buf[ci], 0, + prep->color_buf[ci], -row, + 1, cinfo->image_width); + } + } + } + *in_row_ctr += numrows; + prep->next_buf_row += numrows; + prep->rows_to_go -= numrows; + } else { + /* Return for more data, unless we are at the bottom of the image. */ + if (prep->rows_to_go != 0) + break; + /* When at bottom of image, pad to fill the conversion buffer. */ + if (prep->next_buf_row < prep->next_buf_stop) { + for (ci = 0; ci < cinfo->num_components; ci++) { + expand_bottom_edge(prep->color_buf[ci], cinfo->image_width, + prep->next_buf_row, prep->next_buf_stop); + } + prep->next_buf_row = prep->next_buf_stop; + } + } + /* If we've gotten enough data, downsample a row group. */ + if (prep->next_buf_row == prep->next_buf_stop) { + (*cinfo->downsample->downsample) (cinfo, + prep->color_buf, + (JDIMENSION) prep->this_row_group, + output_buf, *out_row_group_ctr); + (*out_row_group_ctr)++; + /* Advance pointers with wraparound as necessary. */ + prep->this_row_group += cinfo->max_v_samp_factor; + if (prep->this_row_group >= buf_height) + prep->this_row_group = 0; + if (prep->next_buf_row >= buf_height) + prep->next_buf_row = 0; + prep->next_buf_stop = prep->next_buf_row + cinfo->max_v_samp_factor; + } + } +} + + +/* + * Create the wrapped-around downsampling input buffer needed for context mode. + */ + +LOCAL(void) +create_context_buffer (j_compress_ptr cinfo) +{ + my_prep_ptr prep = (my_prep_ptr) cinfo->prep; + int rgroup_height = cinfo->max_v_samp_factor; + int ci, i; + jpeg_component_info * compptr; + JSAMPARRAY true_buffer, fake_buffer; + + /* Grab enough space for fake row pointers for all the components; + * we need five row groups' worth of pointers for each component. + */ + fake_buffer = (JSAMPARRAY) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (cinfo->num_components * 5 * rgroup_height) * + SIZEOF(JSAMPROW)); + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Allocate the actual buffer space (3 row groups) for this component. + * We make the buffer wide enough to allow the downsampler to edge-expand + * horizontally within the buffer, if it so chooses. + */ + true_buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (((long) compptr->width_in_blocks * DCTSIZE * + cinfo->max_h_samp_factor) / compptr->h_samp_factor), + (JDIMENSION) (3 * rgroup_height)); + /* Copy true buffer row pointers into the middle of the fake row array */ + MEMCOPY(fake_buffer + rgroup_height, true_buffer, + 3 * rgroup_height * SIZEOF(JSAMPROW)); + /* Fill in the above and below wraparound pointers */ + for (i = 0; i < rgroup_height; i++) { + fake_buffer[i] = true_buffer[2 * rgroup_height + i]; + fake_buffer[4 * rgroup_height + i] = true_buffer[i]; + } + prep->color_buf[ci] = fake_buffer + rgroup_height; + fake_buffer += 5 * rgroup_height; /* point to space for next component */ + } +} + +#endif /* CONTEXT_ROWS_SUPPORTED */ + + +/* + * Initialize preprocessing controller. + */ + +GLOBAL(void) +jinit_c_prep_controller (j_compress_ptr cinfo, boolean need_full_buffer) +{ + my_prep_ptr prep; + int ci; + jpeg_component_info * compptr; + + if (need_full_buffer) /* safety check */ + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + + prep = (my_prep_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_prep_controller)); + cinfo->prep = (struct jpeg_c_prep_controller *) prep; + prep->pub.start_pass = start_pass_prep; + + /* Allocate the color conversion buffer. + * We make the buffer wide enough to allow the downsampler to edge-expand + * horizontally within the buffer, if it so chooses. + */ + if (cinfo->downsample->need_context_rows) { + /* Set up to provide context rows */ +#ifdef CONTEXT_ROWS_SUPPORTED + prep->pub.pre_process_data = pre_process_context; + create_context_buffer(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + /* No context, just make it tall enough for one row group */ + prep->pub.pre_process_data = pre_process_data; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + prep->color_buf[ci] = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (((long) compptr->width_in_blocks * DCTSIZE * + cinfo->max_h_samp_factor) / compptr->h_samp_factor), + (JDIMENSION) cinfo->max_v_samp_factor); + } + } +} diff --git a/windows_libs/jpeg-6a/jcsample.c b/windows_libs/jpeg-6a/jcsample.c new file mode 100644 index 00000000..212ec875 --- /dev/null +++ b/windows_libs/jpeg-6a/jcsample.c @@ -0,0 +1,519 @@ +/* + * jcsample.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains downsampling routines. + * + * Downsampling input data is counted in "row groups". A row group + * is defined to be max_v_samp_factor pixel rows of each component, + * from which the downsampler produces v_samp_factor sample rows. + * A single row group is processed in each call to the downsampler module. + * + * The downsampler is responsible for edge-expansion of its output data + * to fill an integral number of DCT blocks horizontally. The source buffer + * may be modified if it is helpful for this purpose (the source buffer is + * allocated wide enough to correspond to the desired output width). + * The caller (the prep controller) is responsible for vertical padding. + * + * The downsampler may request "context rows" by setting need_context_rows + * during startup. In this case, the input arrays will contain at least + * one row group's worth of pixels above and below the passed-in data; + * the caller will create dummy rows at image top and bottom by replicating + * the first or last real pixel row. + * + * An excellent reference for image resampling is + * Digital Image Warping, George Wolberg, 1990. + * Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7. + * + * The downsampling algorithm used here is a simple average of the source + * pixels covered by the output pixel. The hi-falutin sampling literature + * refers to this as a "box filter". In general the characteristics of a box + * filter are not very good, but for the specific cases we normally use (1:1 + * and 2:1 ratios) the box is equivalent to a "triangle filter" which is not + * nearly so bad. If you intend to use other sampling ratios, you'd be well + * advised to improve this code. + * + * A simple input-smoothing capability is provided. This is mainly intended + * for cleaning up color-dithered GIF input files (if you find it inadequate, + * we suggest using an external filtering program such as pnmconvol). When + * enabled, each input pixel P is replaced by a weighted sum of itself and its + * eight neighbors. P's weight is 1-8*SF and each neighbor's weight is SF, + * where SF = (smoothing_factor / 1024). + * Currently, smoothing is only supported for 2h2v sampling factors. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Pointer to routine to downsample a single component */ +typedef JMETHOD(void, downsample1_ptr, + (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data)); + +/* Private subobject */ + +typedef struct { + struct jpeg_downsampler pub; /* public fields */ + + /* Downsampling method pointers, one per component */ + downsample1_ptr methods[MAX_COMPONENTS]; +} my_downsampler; + +typedef my_downsampler * my_downsample_ptr; + + +/* + * Initialize for a downsampling pass. + */ + +METHODDEF(void) +start_pass_downsample (j_compress_ptr cinfo) +{ + /* no work for now */ +} + + +/* + * Expand a component horizontally from width input_cols to width output_cols, + * by duplicating the rightmost samples. + */ + +LOCAL(void) +expand_right_edge (JSAMPARRAY image_data, int num_rows, + JDIMENSION input_cols, JDIMENSION output_cols) +{ + register JSAMPROW ptr; + register JSAMPLE pixval; + register int count; + int row; + int numcols = (int) (output_cols - input_cols); + + if (numcols > 0) { + for (row = 0; row < num_rows; row++) { + ptr = image_data[row] + input_cols; + pixval = ptr[-1]; /* don't need GETJSAMPLE() here */ + for (count = numcols; count > 0; count--) + *ptr++ = pixval; + } + } +} + + +/* + * Do downsampling for a whole row group (all components). + * + * In this version we simply downsample each component independently. + */ + +METHODDEF(void) +sep_downsample (j_compress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_index, + JSAMPIMAGE output_buf, JDIMENSION out_row_group_index) +{ + my_downsample_ptr downsample = (my_downsample_ptr) cinfo->downsample; + int ci; + jpeg_component_info * compptr; + JSAMPARRAY in_ptr, out_ptr; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + in_ptr = input_buf[ci] + in_row_index; + out_ptr = output_buf[ci] + (out_row_group_index * compptr->v_samp_factor); + (*downsample->methods[ci]) (cinfo, compptr, in_ptr, out_ptr); + } +} + + +/* + * Downsample pixel values of a single component. + * One row group is processed per call. + * This version handles arbitrary integral sampling ratios, without smoothing. + * Note that this version is not actually used for customary sampling ratios. + */ + +METHODDEF(void) +int_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int inrow, outrow, h_expand, v_expand, numpix, numpix2, h, v; + JDIMENSION outcol, outcol_h; /* outcol_h == outcol*h_expand */ + JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; + JSAMPROW inptr, outptr; + INT32 outvalue; + + h_expand = cinfo->max_h_samp_factor / compptr->h_samp_factor; + v_expand = cinfo->max_v_samp_factor / compptr->v_samp_factor; + numpix = h_expand * v_expand; + numpix2 = numpix/2; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data, cinfo->max_v_samp_factor, + cinfo->image_width, output_cols * h_expand); + + inrow = 0; + for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { + outptr = output_data[outrow]; + for (outcol = 0, outcol_h = 0; outcol < output_cols; + outcol++, outcol_h += h_expand) { + outvalue = 0; + for (v = 0; v < v_expand; v++) { + inptr = input_data[inrow+v] + outcol_h; + for (h = 0; h < h_expand; h++) { + outvalue += (INT32) GETJSAMPLE(*inptr++); + } + } + *outptr++ = (JSAMPLE) ((outvalue + numpix2) / numpix); + } + inrow += v_expand; + } +} + + +/* + * Downsample pixel values of a single component. + * This version handles the special case of a full-size component, + * without smoothing. + */ + +METHODDEF(void) +fullsize_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + /* Copy the data */ + jcopy_sample_rows(input_data, 0, output_data, 0, + cinfo->max_v_samp_factor, cinfo->image_width); + /* Edge-expand */ + expand_right_edge(output_data, cinfo->max_v_samp_factor, + cinfo->image_width, compptr->width_in_blocks * DCTSIZE); +} + + +/* + * Downsample pixel values of a single component. + * This version handles the common case of 2:1 horizontal and 1:1 vertical, + * without smoothing. + * + * A note about the "bias" calculations: when rounding fractional values to + * integer, we do not want to always round 0.5 up to the next integer. + * If we did that, we'd introduce a noticeable bias towards larger values. + * Instead, this code is arranged so that 0.5 will be rounded up or down at + * alternate pixel locations (a simple ordered dither pattern). + */ + +METHODDEF(void) +h2v1_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int outrow; + JDIMENSION outcol; + JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; + register JSAMPROW inptr, outptr; + register int bias; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data, cinfo->max_v_samp_factor, + cinfo->image_width, output_cols * 2); + + for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { + outptr = output_data[outrow]; + inptr = input_data[outrow]; + bias = 0; /* bias = 0,1,0,1,... for successive samples */ + for (outcol = 0; outcol < output_cols; outcol++) { + *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr) + GETJSAMPLE(inptr[1]) + + bias) >> 1); + bias ^= 1; /* 0=>1, 1=>0 */ + inptr += 2; + } + } +} + + +/* + * Downsample pixel values of a single component. + * This version handles the standard case of 2:1 horizontal and 2:1 vertical, + * without smoothing. + */ + +METHODDEF(void) +h2v2_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int inrow, outrow; + JDIMENSION outcol; + JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; + register JSAMPROW inptr0, inptr1, outptr; + register int bias; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data, cinfo->max_v_samp_factor, + cinfo->image_width, output_cols * 2); + + inrow = 0; + for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { + outptr = output_data[outrow]; + inptr0 = input_data[inrow]; + inptr1 = input_data[inrow+1]; + bias = 1; /* bias = 1,2,1,2,... for successive samples */ + for (outcol = 0; outcol < output_cols; outcol++) { + *outptr++ = (JSAMPLE) ((GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]) + + bias) >> 2); + bias ^= 3; /* 1=>2, 2=>1 */ + inptr0 += 2; inptr1 += 2; + } + inrow += 2; + } +} + + +#ifdef INPUT_SMOOTHING_SUPPORTED + +/* + * Downsample pixel values of a single component. + * This version handles the standard case of 2:1 horizontal and 2:1 vertical, + * with smoothing. One row of context is required. + */ + +METHODDEF(void) +h2v2_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int inrow, outrow; + JDIMENSION colctr; + JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; + register JSAMPROW inptr0, inptr1, above_ptr, below_ptr, outptr; + INT32 membersum, neighsum, memberscale, neighscale; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2, + cinfo->image_width, output_cols * 2); + + /* We don't bother to form the individual "smoothed" input pixel values; + * we can directly compute the output which is the average of the four + * smoothed values. Each of the four member pixels contributes a fraction + * (1-8*SF) to its own smoothed image and a fraction SF to each of the three + * other smoothed pixels, therefore a total fraction (1-5*SF)/4 to the final + * output. The four corner-adjacent neighbor pixels contribute a fraction + * SF to just one smoothed pixel, or SF/4 to the final output; while the + * eight edge-adjacent neighbors contribute SF to each of two smoothed + * pixels, or SF/2 overall. In order to use integer arithmetic, these + * factors are scaled by 2^16 = 65536. + * Also recall that SF = smoothing_factor / 1024. + */ + + memberscale = 16384 - cinfo->smoothing_factor * 80; /* scaled (1-5*SF)/4 */ + neighscale = cinfo->smoothing_factor * 16; /* scaled SF/4 */ + + inrow = 0; + for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { + outptr = output_data[outrow]; + inptr0 = input_data[inrow]; + inptr1 = input_data[inrow+1]; + above_ptr = input_data[inrow-1]; + below_ptr = input_data[inrow+2]; + + /* Special case for first column: pretend column -1 is same as column 0 */ + membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); + neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + + GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + + GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[2]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[2]); + neighsum += neighsum; + neighsum += GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[2]) + + GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[2]); + membersum = membersum * memberscale + neighsum * neighscale; + *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); + inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2; + + for (colctr = output_cols - 2; colctr > 0; colctr--) { + /* sum of pixels directly mapped to this output element */ + membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); + /* sum of edge-neighbor pixels */ + neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + + GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + + GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[2]) + + GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[2]); + /* The edge-neighbors count twice as much as corner-neighbors */ + neighsum += neighsum; + /* Add in the corner-neighbors */ + neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[2]) + + GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[2]); + /* form final output scaled up by 2^16 */ + membersum = membersum * memberscale + neighsum * neighscale; + /* round, descale and output it */ + *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); + inptr0 += 2; inptr1 += 2; above_ptr += 2; below_ptr += 2; + } + + /* Special case for last column */ + membersum = GETJSAMPLE(*inptr0) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(*inptr1) + GETJSAMPLE(inptr1[1]); + neighsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(above_ptr[1]) + + GETJSAMPLE(*below_ptr) + GETJSAMPLE(below_ptr[1]) + + GETJSAMPLE(inptr0[-1]) + GETJSAMPLE(inptr0[1]) + + GETJSAMPLE(inptr1[-1]) + GETJSAMPLE(inptr1[1]); + neighsum += neighsum; + neighsum += GETJSAMPLE(above_ptr[-1]) + GETJSAMPLE(above_ptr[1]) + + GETJSAMPLE(below_ptr[-1]) + GETJSAMPLE(below_ptr[1]); + membersum = membersum * memberscale + neighsum * neighscale; + *outptr = (JSAMPLE) ((membersum + 32768) >> 16); + + inrow += 2; + } +} + + +/* + * Downsample pixel values of a single component. + * This version handles the special case of a full-size component, + * with smoothing. One row of context is required. + */ + +METHODDEF(void) +fullsize_smooth_downsample (j_compress_ptr cinfo, jpeg_component_info *compptr, + JSAMPARRAY input_data, JSAMPARRAY output_data) +{ + int outrow; + JDIMENSION colctr; + JDIMENSION output_cols = compptr->width_in_blocks * DCTSIZE; + register JSAMPROW inptr, above_ptr, below_ptr, outptr; + INT32 membersum, neighsum, memberscale, neighscale; + int colsum, lastcolsum, nextcolsum; + + /* Expand input data enough to let all the output samples be generated + * by the standard loop. Special-casing padded output would be more + * efficient. + */ + expand_right_edge(input_data - 1, cinfo->max_v_samp_factor + 2, + cinfo->image_width, output_cols); + + /* Each of the eight neighbor pixels contributes a fraction SF to the + * smoothed pixel, while the main pixel contributes (1-8*SF). In order + * to use integer arithmetic, these factors are multiplied by 2^16 = 65536. + * Also recall that SF = smoothing_factor / 1024. + */ + + memberscale = 65536L - cinfo->smoothing_factor * 512L; /* scaled 1-8*SF */ + neighscale = cinfo->smoothing_factor * 64; /* scaled SF */ + + for (outrow = 0; outrow < compptr->v_samp_factor; outrow++) { + outptr = output_data[outrow]; + inptr = input_data[outrow]; + above_ptr = input_data[outrow-1]; + below_ptr = input_data[outrow+1]; + + /* Special case for first column */ + colsum = GETJSAMPLE(*above_ptr++) + GETJSAMPLE(*below_ptr++) + + GETJSAMPLE(*inptr); + membersum = GETJSAMPLE(*inptr++); + nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) + + GETJSAMPLE(*inptr); + neighsum = colsum + (colsum - membersum) + nextcolsum; + membersum = membersum * memberscale + neighsum * neighscale; + *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); + lastcolsum = colsum; colsum = nextcolsum; + + for (colctr = output_cols - 2; colctr > 0; colctr--) { + membersum = GETJSAMPLE(*inptr++); + above_ptr++; below_ptr++; + nextcolsum = GETJSAMPLE(*above_ptr) + GETJSAMPLE(*below_ptr) + + GETJSAMPLE(*inptr); + neighsum = lastcolsum + (colsum - membersum) + nextcolsum; + membersum = membersum * memberscale + neighsum * neighscale; + *outptr++ = (JSAMPLE) ((membersum + 32768) >> 16); + lastcolsum = colsum; colsum = nextcolsum; + } + + /* Special case for last column */ + membersum = GETJSAMPLE(*inptr); + neighsum = lastcolsum + (colsum - membersum) + colsum; + membersum = membersum * memberscale + neighsum * neighscale; + *outptr = (JSAMPLE) ((membersum + 32768) >> 16); + + } +} + +#endif /* INPUT_SMOOTHING_SUPPORTED */ + + +/* + * Module initialization routine for downsampling. + * Note that we must select a routine for each component. + */ + +GLOBAL(void) +jinit_downsampler (j_compress_ptr cinfo) +{ + my_downsample_ptr downsample; + int ci; + jpeg_component_info * compptr; + boolean smoothok = TRUE; + + downsample = (my_downsample_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_downsampler)); + cinfo->downsample = (struct jpeg_downsampler *) downsample; + downsample->pub.start_pass = start_pass_downsample; + downsample->pub.downsample = sep_downsample; + downsample->pub.need_context_rows = FALSE; + + if (cinfo->CCIR601_sampling) + ERREXIT(cinfo, JERR_CCIR601_NOTIMPL); + + /* Verify we can handle the sampling factors, and set up method pointers */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (compptr->h_samp_factor == cinfo->max_h_samp_factor && + compptr->v_samp_factor == cinfo->max_v_samp_factor) { +#ifdef INPUT_SMOOTHING_SUPPORTED + if (cinfo->smoothing_factor) { + downsample->methods[ci] = fullsize_smooth_downsample; + downsample->pub.need_context_rows = TRUE; + } else +#endif + downsample->methods[ci] = fullsize_downsample; + } else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor && + compptr->v_samp_factor == cinfo->max_v_samp_factor) { + smoothok = FALSE; + downsample->methods[ci] = h2v1_downsample; + } else if (compptr->h_samp_factor * 2 == cinfo->max_h_samp_factor && + compptr->v_samp_factor * 2 == cinfo->max_v_samp_factor) { +#ifdef INPUT_SMOOTHING_SUPPORTED + if (cinfo->smoothing_factor) { + downsample->methods[ci] = h2v2_smooth_downsample; + downsample->pub.need_context_rows = TRUE; + } else +#endif + downsample->methods[ci] = h2v2_downsample; + } else if ((cinfo->max_h_samp_factor % compptr->h_samp_factor) == 0 && + (cinfo->max_v_samp_factor % compptr->v_samp_factor) == 0) { + smoothok = FALSE; + downsample->methods[ci] = int_downsample; + } else + ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL); + } + +#ifdef INPUT_SMOOTHING_SUPPORTED + if (cinfo->smoothing_factor && !smoothok) + TRACEMS(cinfo, 0, JTRC_SMOOTH_NOTIMPL); +#endif +} diff --git a/windows_libs/jpeg-6a/jctrans.c b/windows_libs/jpeg-6a/jctrans.c new file mode 100644 index 00000000..42960486 --- /dev/null +++ b/windows_libs/jpeg-6a/jctrans.c @@ -0,0 +1,371 @@ +/* + * jctrans.c + * + * Copyright (C) 1995-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains library routines for transcoding compression, + * that is, writing raw DCT coefficient arrays to an output JPEG file. + * The routines in jcapimin.c will also be needed by a transcoder. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Forward declarations */ +LOCAL(void) transencode_master_selection + JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)); +LOCAL(void) transencode_coef_controller + JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays)); + + +/* + * Compression initialization for writing raw-coefficient data. + * Before calling this, all parameters and a data destination must be set up. + * Call jpeg_finish_compress() to actually write the data. + * + * The number of passed virtual arrays must match cinfo->num_components. + * Note that the virtual arrays need not be filled or even realized at + * the time write_coefficients is called; indeed, if the virtual arrays + * were requested from this compression object's memory manager, they + * typically will be realized during this routine and filled afterwards. + */ + +GLOBAL(void) +jpeg_write_coefficients (j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays) +{ + if (cinfo->global_state != CSTATE_START) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Mark all tables to be written */ + jpeg_suppress_tables(cinfo, FALSE); + /* (Re)initialize error mgr and destination modules */ + (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->dest->init_destination) (cinfo); + /* Perform master selection of active modules */ + transencode_master_selection(cinfo, coef_arrays); + /* Wait for jpeg_finish_compress() call */ + cinfo->next_scanline = 0; /* so jpeg_write_marker works */ + cinfo->global_state = CSTATE_WRCOEFS; +} + + +/* + * Initialize the compression object with default parameters, + * then copy from the source object all parameters needed for lossless + * transcoding. Parameters that can be varied without loss (such as + * scan script and Huffman optimization) are left in their default states. + */ + +GLOBAL(void) +jpeg_copy_critical_parameters (j_decompress_ptr srcinfo, + j_compress_ptr dstinfo) +{ + JQUANT_TBL ** qtblptr; + jpeg_component_info *incomp, *outcomp; + JQUANT_TBL *c_quant, *slot_quant; + int tblno, ci, coefi; + + /* Safety check to ensure start_compress not called yet. */ + if (dstinfo->global_state != CSTATE_START) + ERREXIT1(dstinfo, JERR_BAD_STATE, dstinfo->global_state); + /* Copy fundamental image dimensions */ + dstinfo->image_width = srcinfo->image_width; + dstinfo->image_height = srcinfo->image_height; + dstinfo->input_components = srcinfo->num_components; + dstinfo->in_color_space = srcinfo->jpeg_color_space; + /* Initialize all parameters to default values */ + jpeg_set_defaults(dstinfo); + /* jpeg_set_defaults may choose wrong colorspace, eg YCbCr if input is RGB. + * Fix it to get the right header markers for the image colorspace. + */ + jpeg_set_colorspace(dstinfo, srcinfo->jpeg_color_space); + dstinfo->data_precision = srcinfo->data_precision; + dstinfo->CCIR601_sampling = srcinfo->CCIR601_sampling; + /* Copy the source's quantization tables. */ + for (tblno = 0; tblno < NUM_QUANT_TBLS; tblno++) { + if (srcinfo->quant_tbl_ptrs[tblno] != NULL) { + qtblptr = & dstinfo->quant_tbl_ptrs[tblno]; + if (*qtblptr == NULL) + *qtblptr = jpeg_alloc_quant_table((j_common_ptr) dstinfo); + MEMCOPY((*qtblptr)->quantval, + srcinfo->quant_tbl_ptrs[tblno]->quantval, + SIZEOF((*qtblptr)->quantval)); + (*qtblptr)->sent_table = FALSE; + } + } + /* Copy the source's per-component info. + * Note we assume jpeg_set_defaults has allocated the dest comp_info array. + */ + dstinfo->num_components = srcinfo->num_components; + if (dstinfo->num_components < 1 || dstinfo->num_components > MAX_COMPONENTS) + ERREXIT2(dstinfo, JERR_COMPONENT_COUNT, dstinfo->num_components, + MAX_COMPONENTS); + for (ci = 0, incomp = srcinfo->comp_info, outcomp = dstinfo->comp_info; + ci < dstinfo->num_components; ci++, incomp++, outcomp++) { + outcomp->component_id = incomp->component_id; + outcomp->h_samp_factor = incomp->h_samp_factor; + outcomp->v_samp_factor = incomp->v_samp_factor; + outcomp->quant_tbl_no = incomp->quant_tbl_no; + /* Make sure saved quantization table for component matches the qtable + * slot. If not, the input file re-used this qtable slot. + * IJG encoder currently cannot duplicate this. + */ + tblno = outcomp->quant_tbl_no; + if (tblno < 0 || tblno >= NUM_QUANT_TBLS || + srcinfo->quant_tbl_ptrs[tblno] == NULL) + ERREXIT1(dstinfo, JERR_NO_QUANT_TABLE, tblno); + slot_quant = srcinfo->quant_tbl_ptrs[tblno]; + c_quant = incomp->quant_table; + if (c_quant != NULL) { + for (coefi = 0; coefi < DCTSIZE2; coefi++) { + if (c_quant->quantval[coefi] != slot_quant->quantval[coefi]) + ERREXIT1(dstinfo, JERR_MISMATCHED_QUANT_TABLE, tblno); + } + } + /* Note: we do not copy the source's Huffman table assignments; + * instead we rely on jpeg_set_colorspace to have made a suitable choice. + */ + } +} + + +/* + * Master selection of compression modules for transcoding. + * This substitutes for jcinit.c's initialization of the full compressor. + */ + +LOCAL(void) +transencode_master_selection (j_compress_ptr cinfo, + jvirt_barray_ptr * coef_arrays) +{ + /* Although we don't actually use input_components for transcoding, + * jcmaster.c's initial_setup will complain if input_components is 0. + */ + cinfo->input_components = 1; + /* Initialize master control (includes parameter checking/processing) */ + jinit_c_master_control(cinfo, TRUE /* transcode only */); + + /* Entropy encoding: either Huffman or arithmetic coding. */ + if (cinfo->arith_code) { + ERREXIT(cinfo, JERR_ARITH_NOTIMPL); + } else { + if (cinfo->progressive_mode) { +#ifdef C_PROGRESSIVE_SUPPORTED + jinit_phuff_encoder(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else + jinit_huff_encoder(cinfo); + } + + /* We need a special coefficient buffer controller. */ + transencode_coef_controller(cinfo, coef_arrays); + + jinit_marker_writer(cinfo); + + /* We can now tell the memory manager to allocate virtual arrays. */ + (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); + + /* Write the datastream header (SOI) immediately. + * Frame and scan headers are postponed till later. + * This lets application insert special markers after the SOI. + */ + (*cinfo->marker->write_file_header) (cinfo); +} + + +/* + * The rest of this file is a special implementation of the coefficient + * buffer controller. This is similar to jccoefct.c, but it handles only + * output from presupplied virtual arrays. Furthermore, we generate any + * dummy padding blocks on-the-fly rather than expecting them to be present + * in the arrays. + */ + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_c_coef_controller pub; /* public fields */ + + JDIMENSION iMCU_row_num; /* iMCU row # within image */ + JDIMENSION mcu_ctr; /* counts MCUs processed in current row */ + int MCU_vert_offset; /* counts MCU rows within iMCU row */ + int MCU_rows_per_iMCU_row; /* number of such rows needed */ + + /* Virtual block array for each component. */ + jvirt_barray_ptr * whole_image; + + /* Workspace for constructing dummy blocks at right/bottom edges. */ + JBLOCKROW dummy_buffer[C_MAX_BLOCKS_IN_MCU]; +} my_coef_controller; + +typedef my_coef_controller * my_coef_ptr; + + +LOCAL(void) +start_iMCU_row (j_compress_ptr cinfo) +/* Reset within-iMCU-row counters for a new row */ +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + /* In an interleaved scan, an MCU row is the same as an iMCU row. + * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. + * But at the bottom of the image, process only what's left. + */ + if (cinfo->comps_in_scan > 1) { + coef->MCU_rows_per_iMCU_row = 1; + } else { + if (coef->iMCU_row_num < (cinfo->total_iMCU_rows-1)) + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; + else + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; + } + + coef->mcu_ctr = 0; + coef->MCU_vert_offset = 0; +} + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_coef (j_compress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + if (pass_mode != JBUF_CRANK_DEST) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + + coef->iMCU_row_num = 0; + start_iMCU_row(cinfo); +} + + +/* + * Process some data. + * We process the equivalent of one fully interleaved MCU row ("iMCU" row) + * per call, ie, v_samp_factor block rows for each component in the scan. + * The data is obtained from the virtual arrays and fed to the entropy coder. + * Returns TRUE if the iMCU row is completed, FALSE if suspended. + * + * NB: input_buf is ignored; it is likely to be a NULL pointer. + */ + +METHODDEF(boolean) +compress_output (j_compress_ptr cinfo, JSAMPIMAGE input_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + int blkn, ci, xindex, yindex, yoffset, blockcnt; + JDIMENSION start_col; + JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; + JBLOCKROW MCU_buffer[C_MAX_BLOCKS_IN_MCU]; + JBLOCKROW buffer_ptr; + jpeg_component_info *compptr; + + /* Align the virtual buffers for the components used in this scan. */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + buffer[ci] = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], + coef->iMCU_row_num * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + } + + /* Loop to process one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->mcu_ctr; MCU_col_num < cinfo->MCUs_per_row; + MCU_col_num++) { + /* Construct list of pointers to DCT blocks belonging to this MCU */ + blkn = 0; /* index of current DCT block within MCU */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + start_col = MCU_col_num * compptr->MCU_width; + blockcnt = (MCU_col_num < last_MCU_col) ? compptr->MCU_width + : compptr->last_col_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + if (coef->iMCU_row_num < last_iMCU_row || + yindex+yoffset < compptr->last_row_height) { + /* Fill in pointers to real blocks in this row */ + buffer_ptr = buffer[ci][yindex+yoffset] + start_col; + for (xindex = 0; xindex < blockcnt; xindex++) + MCU_buffer[blkn++] = buffer_ptr++; + } else { + /* At bottom of image, need a whole row of dummy blocks */ + xindex = 0; + } + /* Fill in any dummy blocks needed in this row. + * Dummy blocks are filled in the same way as in jccoefct.c: + * all zeroes in the AC entries, DC entries equal to previous + * block's DC value. The init routine has already zeroed the + * AC entries, so we need only set the DC entries correctly. + */ + for (; xindex < compptr->MCU_width; xindex++) { + MCU_buffer[blkn] = coef->dummy_buffer[blkn]; + MCU_buffer[blkn][0][0] = MCU_buffer[blkn-1][0][0]; + blkn++; + } + } + } + /* Try to write the MCU. */ + if (! (*cinfo->entropy->encode_mcu) (cinfo, MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->mcu_ctr = MCU_col_num; + return FALSE; + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->mcu_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + coef->iMCU_row_num++; + start_iMCU_row(cinfo); + return TRUE; +} + + +/* + * Initialize coefficient buffer controller. + * + * Each passed coefficient array must be the right size for that + * coefficient: width_in_blocks wide and height_in_blocks high, + * with unitheight at least v_samp_factor. + */ + +LOCAL(void) +transencode_coef_controller (j_compress_ptr cinfo, + jvirt_barray_ptr * coef_arrays) +{ + my_coef_ptr coef; + JBLOCKROW buffer; + int i; + + coef = (my_coef_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_coef_controller)); + cinfo->coef = (struct jpeg_c_coef_controller *) coef; + coef->pub.start_pass = start_pass_coef; + coef->pub.compress_data = compress_output; + + /* Save pointer to virtual arrays */ + coef->whole_image = coef_arrays; + + /* Allocate and pre-zero space for dummy DCT blocks. */ + buffer = (JBLOCKROW) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); + jzero_far((void FAR *) buffer, C_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); + for (i = 0; i < C_MAX_BLOCKS_IN_MCU; i++) { + coef->dummy_buffer[i] = buffer + i; + } +} diff --git a/windows_libs/jpeg-6a/jdapimin.c b/windows_libs/jpeg-6a/jdapimin.c new file mode 100644 index 00000000..c7021542 --- /dev/null +++ b/windows_libs/jpeg-6a/jdapimin.c @@ -0,0 +1,406 @@ +/* + * jdapimin.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface code for the decompression half + * of the JPEG library. These are the "minimum" API routines that may be + * needed in either the normal full-decompression case or the + * transcoding-only case. + * + * Most of the routines intended to be called directly by an application + * are in this file or in jdapistd.c. But also see jcomapi.c for routines + * shared by compression and decompression, and jdtrans.c for the transcoding + * case. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * Initialization of a JPEG decompression object. + * The error manager must already be set up (in case memory manager fails). + */ + +GLOBAL(void) +jpeg_CreateDecompress (j_decompress_ptr cinfo, int version, size_t structsize) +{ + int i; + + /* Guard against version mismatches between library and caller. */ + cinfo->mem = NULL; /* so jpeg_destroy knows mem mgr not called */ + if (version != JPEG_LIB_VERSION) + ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version); + if (structsize != SIZEOF(struct jpeg_decompress_struct)) + ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, + (int) SIZEOF(struct jpeg_decompress_struct), (int) structsize); + + /* For debugging purposes, zero the whole master structure. + * But error manager pointer is already there, so save and restore it. + */ + { + struct jpeg_error_mgr * err = cinfo->err; + MEMZERO(cinfo, SIZEOF(struct jpeg_decompress_struct)); + cinfo->err = err; + } + cinfo->is_decompressor = TRUE; + + /* Initialize a memory manager instance for this object */ + jinit_memory_mgr((j_common_ptr) cinfo); + + /* Zero out pointers to permanent structures. */ + cinfo->progress = NULL; + cinfo->src = NULL; + + for (i = 0; i < NUM_QUANT_TBLS; i++) + cinfo->quant_tbl_ptrs[i] = NULL; + + for (i = 0; i < NUM_HUFF_TBLS; i++) { + cinfo->dc_huff_tbl_ptrs[i] = NULL; + cinfo->ac_huff_tbl_ptrs[i] = NULL; + } + + /* Initialize marker processor so application can override methods + * for COM, APPn markers before calling jpeg_read_header. + */ + jinit_marker_reader(cinfo); + + /* And initialize the overall input controller. */ + jinit_input_controller(cinfo); + + /* OK, I'm ready */ + cinfo->global_state = DSTATE_START; +} + + +/* + * Destruction of a JPEG decompression object + */ + +GLOBAL(void) +jpeg_destroy_decompress (j_decompress_ptr cinfo) +{ + jpeg_destroy((j_common_ptr) cinfo); /* use common routine */ +} + + +/* + * Abort processing of a JPEG decompression operation, + * but don't destroy the object itself. + */ + +GLOBAL(void) +jpeg_abort_decompress (j_decompress_ptr cinfo) +{ + jpeg_abort((j_common_ptr) cinfo); /* use common routine */ +} + + +/* + * Install a special processing method for COM or APPn markers. + */ + +GLOBAL(void) +jpeg_set_marker_processor (j_decompress_ptr cinfo, int marker_code, + jpeg_marker_parser_method routine) +{ + if (marker_code == JPEG_COM) + cinfo->marker->process_COM = routine; + else if (marker_code >= JPEG_APP0 && marker_code <= JPEG_APP0+15) + cinfo->marker->process_APPn[marker_code-JPEG_APP0] = routine; + else + ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code); +} + + +/* + * Set default decompression parameters. + */ + +LOCAL(void) +default_decompress_parms (j_decompress_ptr cinfo) +{ + /* Guess the input colorspace, and set output colorspace accordingly. */ + /* (Wish JPEG committee had provided a real way to specify this...) */ + /* Note application may override our guesses. */ + switch (cinfo->num_components) { + case 1: + cinfo->jpeg_color_space = JCS_GRAYSCALE; + cinfo->out_color_space = JCS_GRAYSCALE; + break; + + case 3: + if (cinfo->saw_JFIF_marker) { + cinfo->jpeg_color_space = JCS_YCbCr; /* JFIF implies YCbCr */ + } else if (cinfo->saw_Adobe_marker) { + switch (cinfo->Adobe_transform) { + case 0: + cinfo->jpeg_color_space = JCS_RGB; + break; + case 1: + cinfo->jpeg_color_space = JCS_YCbCr; + break; + default: + WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform); + cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */ + break; + } + } else { + /* Saw no special markers, try to guess from the component IDs */ + int cid0 = cinfo->comp_info[0].component_id; + int cid1 = cinfo->comp_info[1].component_id; + int cid2 = cinfo->comp_info[2].component_id; + + if (cid0 == 1 && cid1 == 2 && cid2 == 3) + cinfo->jpeg_color_space = JCS_YCbCr; /* assume JFIF w/out marker */ + else if (cid0 == 82 && cid1 == 71 && cid2 == 66) + cinfo->jpeg_color_space = JCS_RGB; /* ASCII 'R', 'G', 'B' */ + else { + TRACEMS3(cinfo, 1, JTRC_UNKNOWN_IDS, cid0, cid1, cid2); + cinfo->jpeg_color_space = JCS_YCbCr; /* assume it's YCbCr */ + } + } + /* Always guess RGB is proper output colorspace. */ + cinfo->out_color_space = JCS_RGB; + break; + + case 4: + if (cinfo->saw_Adobe_marker) { + switch (cinfo->Adobe_transform) { + case 0: + cinfo->jpeg_color_space = JCS_CMYK; + break; + case 2: + cinfo->jpeg_color_space = JCS_YCCK; + break; + default: + WARNMS1(cinfo, JWRN_ADOBE_XFORM, cinfo->Adobe_transform); + cinfo->jpeg_color_space = JCS_YCCK; /* assume it's YCCK */ + break; + } + } else { + /* No special markers, assume straight CMYK. */ + cinfo->jpeg_color_space = JCS_CMYK; + } + cinfo->out_color_space = JCS_CMYK; + break; + + default: + cinfo->jpeg_color_space = JCS_UNKNOWN; + cinfo->out_color_space = JCS_UNKNOWN; + break; + } + + /* Set defaults for other decompression parameters. */ + cinfo->scale_num = 1; /* 1:1 scaling */ + cinfo->scale_denom = 1; + cinfo->output_gamma = 1.0; + cinfo->buffered_image = FALSE; + cinfo->raw_data_out = FALSE; + cinfo->dct_method = JDCT_DEFAULT; + cinfo->do_fancy_upsampling = TRUE; + cinfo->do_block_smoothing = TRUE; + cinfo->quantize_colors = FALSE; + /* We set these in case application only sets quantize_colors. */ + cinfo->dither_mode = JDITHER_FS; +#ifdef QUANT_2PASS_SUPPORTED + cinfo->two_pass_quantize = TRUE; +#else + cinfo->two_pass_quantize = FALSE; +#endif + cinfo->desired_number_of_colors = 256; + cinfo->colormap = NULL; + /* Initialize for no mode change in buffered-image mode. */ + cinfo->enable_1pass_quant = FALSE; + cinfo->enable_external_quant = FALSE; + cinfo->enable_2pass_quant = FALSE; +} + + +/* + * Decompression startup: read start of JPEG datastream to see what's there. + * Need only initialize JPEG object and supply a data source before calling. + * + * This routine will read as far as the first SOS marker (ie, actual start of + * compressed data), and will save all tables and parameters in the JPEG + * object. It will also initialize the decompression parameters to default + * values, and finally return JPEG_HEADER_OK. On return, the application may + * adjust the decompression parameters and then call jpeg_start_decompress. + * (Or, if the application only wanted to determine the image parameters, + * the data need not be decompressed. In that case, call jpeg_abort or + * jpeg_destroy to release any temporary space.) + * If an abbreviated (tables only) datastream is presented, the routine will + * return JPEG_HEADER_TABLES_ONLY upon reaching EOI. The application may then + * re-use the JPEG object to read the abbreviated image datastream(s). + * It is unnecessary (but OK) to call jpeg_abort in this case. + * The JPEG_SUSPENDED return code only occurs if the data source module + * requests suspension of the decompressor. In this case the application + * should load more source data and then re-call jpeg_read_header to resume + * processing. + * If a non-suspending data source is used and require_image is TRUE, then the + * return code need not be inspected since only JPEG_HEADER_OK is possible. + * + * This routine is now just a front end to jpeg_consume_input, with some + * extra error checking. + */ + +GLOBAL(int) +jpeg_read_header (j_decompress_ptr cinfo, boolean require_image) +{ + int retcode; + + if (cinfo->global_state != DSTATE_START && + cinfo->global_state != DSTATE_INHEADER) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + retcode = jpeg_consume_input(cinfo); + + switch (retcode) { + case JPEG_REACHED_SOS: + retcode = JPEG_HEADER_OK; + break; + case JPEG_REACHED_EOI: + if (require_image) /* Complain if application wanted an image */ + ERREXIT(cinfo, JERR_NO_IMAGE); + /* Reset to start state; it would be safer to require the application to + * call jpeg_abort, but we can't change it now for compatibility reasons. + * A side effect is to free any temporary memory (there shouldn't be any). + */ + jpeg_abort((j_common_ptr) cinfo); /* sets state = DSTATE_START */ + retcode = JPEG_HEADER_TABLES_ONLY; + break; + case JPEG_SUSPENDED: + /* no work */ + break; + } + + return retcode; +} + + +/* + * Consume data in advance of what the decompressor requires. + * This can be called at any time once the decompressor object has + * been created and a data source has been set up. + * + * This routine is essentially a state machine that handles a couple + * of critical state-transition actions, namely initial setup and + * transition from header scanning to ready-for-start_decompress. + * All the actual input is done via the input controller's consume_input + * method. + */ + +GLOBAL(int) +jpeg_consume_input (j_decompress_ptr cinfo) +{ + int retcode = JPEG_SUSPENDED; + + /* NB: every possible DSTATE value should be listed in this switch */ + switch (cinfo->global_state) { + case DSTATE_START: + /* Start-of-datastream actions: reset appropriate modules */ + (*cinfo->inputctl->reset_input_controller) (cinfo); + /* Initialize application's data source module */ + (*cinfo->src->init_source) (cinfo); + cinfo->global_state = DSTATE_INHEADER; + /*FALLTHROUGH*/ + case DSTATE_INHEADER: + retcode = (*cinfo->inputctl->consume_input) (cinfo); + if (retcode == JPEG_REACHED_SOS) { /* Found SOS, prepare to decompress */ + /* Set up default parameters based on header data */ + default_decompress_parms(cinfo); + /* Set global state: ready for start_decompress */ + cinfo->global_state = DSTATE_READY; + } + break; + case DSTATE_READY: + /* Can't advance past first SOS until start_decompress is called */ + retcode = JPEG_REACHED_SOS; + break; + case DSTATE_PRELOAD: + case DSTATE_PRESCAN: + case DSTATE_SCANNING: + case DSTATE_RAW_OK: + case DSTATE_BUFIMAGE: + case DSTATE_BUFPOST: + case DSTATE_STOPPING: + retcode = (*cinfo->inputctl->consume_input) (cinfo); + break; + default: + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + } + return retcode; +} + + +/* + * Have we finished reading the input file? + */ + +GLOBAL(boolean) +jpeg_input_complete (j_decompress_ptr cinfo) +{ + /* Check for valid jpeg object */ + if (cinfo->global_state < DSTATE_START || + cinfo->global_state > DSTATE_STOPPING) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + return cinfo->inputctl->eoi_reached; +} + + +/* + * Is there more than one scan? + */ + +GLOBAL(boolean) +jpeg_has_multiple_scans (j_decompress_ptr cinfo) +{ + /* Only valid after jpeg_read_header completes */ + if (cinfo->global_state < DSTATE_READY || + cinfo->global_state > DSTATE_STOPPING) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + return cinfo->inputctl->has_multiple_scans; +} + + +/* + * Finish JPEG decompression. + * + * This will normally just verify the file trailer and release temp storage. + * + * Returns FALSE if suspended. The return value need be inspected only if + * a suspending data source is used. + */ + +GLOBAL(boolean) +jpeg_finish_decompress (j_decompress_ptr cinfo) +{ + if ((cinfo->global_state == DSTATE_SCANNING || + cinfo->global_state == DSTATE_RAW_OK) && ! cinfo->buffered_image) { + /* Terminate final pass of non-buffered mode */ + if (cinfo->output_scanline < cinfo->output_height) + ERREXIT(cinfo, JERR_TOO_LITTLE_DATA); + (*cinfo->master->finish_output_pass) (cinfo); + cinfo->global_state = DSTATE_STOPPING; + } else if (cinfo->global_state == DSTATE_BUFIMAGE) { + /* Finishing after a buffered-image operation */ + cinfo->global_state = DSTATE_STOPPING; + } else if (cinfo->global_state != DSTATE_STOPPING) { + /* STOPPING = repeat call after a suspension, anything else is error */ + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + } + /* Read until EOI */ + while (! cinfo->inputctl->eoi_reached) { + if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED) + return FALSE; /* Suspend, come back later */ + } + /* Do final cleanup */ + (*cinfo->src->term_source) (cinfo); + /* We can use jpeg_abort to release memory and reset global_state */ + jpeg_abort((j_common_ptr) cinfo); + return TRUE; +} diff --git a/windows_libs/jpeg-6a/jdapistd.c b/windows_libs/jpeg-6a/jdapistd.c new file mode 100644 index 00000000..c8e3fa0c --- /dev/null +++ b/windows_libs/jpeg-6a/jdapistd.c @@ -0,0 +1,275 @@ +/* + * jdapistd.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains application interface code for the decompression half + * of the JPEG library. These are the "standard" API routines that are + * used in the normal full-decompression case. They are not used by a + * transcoding-only application. Note that if an application links in + * jpeg_start_decompress, it will end up linking in the entire decompressor. + * We thus must separate this file from jdapimin.c to avoid linking the + * whole decompression library into a transcoder. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Forward declarations */ +LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo)); + + +/* + * Decompression initialization. + * jpeg_read_header must be completed before calling this. + * + * If a multipass operating mode was selected, this will do all but the + * last pass, and thus may take a great deal of time. + * + * Returns FALSE if suspended. The return value need be inspected only if + * a suspending data source is used. + */ + +GLOBAL(boolean) +jpeg_start_decompress (j_decompress_ptr cinfo) +{ + if (cinfo->global_state == DSTATE_READY) { + /* First call: initialize master control, select active modules */ + jinit_master_decompress(cinfo); + if (cinfo->buffered_image) { + /* No more work here; expecting jpeg_start_output next */ + cinfo->global_state = DSTATE_BUFIMAGE; + return TRUE; + } + cinfo->global_state = DSTATE_PRELOAD; + } + if (cinfo->global_state == DSTATE_PRELOAD) { + /* If file has multiple scans, absorb them all into the coef buffer */ + if (cinfo->inputctl->has_multiple_scans) { +#ifdef D_MULTISCAN_FILES_SUPPORTED + for (;;) { + int retcode; + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + /* Absorb some more input */ + retcode = (*cinfo->inputctl->consume_input) (cinfo); + if (retcode == JPEG_SUSPENDED) + return FALSE; + if (retcode == JPEG_REACHED_EOI) + break; + /* Advance progress counter if appropriate */ + if (cinfo->progress != NULL && + (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) { + if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) { + /* jdmaster underestimated number of scans; ratchet up one scan */ + cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows; + } + } + } +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif /* D_MULTISCAN_FILES_SUPPORTED */ + } + cinfo->output_scan_number = cinfo->input_scan_number; + } else if (cinfo->global_state != DSTATE_PRESCAN) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Perform any dummy output passes, and set up for the final pass */ + return output_pass_setup(cinfo); +} + + +/* + * Set up for an output pass, and perform any dummy pass(es) needed. + * Common subroutine for jpeg_start_decompress and jpeg_start_output. + * Entry: global_state = DSTATE_PRESCAN only if previously suspended. + * Exit: If done, returns TRUE and sets global_state for proper output mode. + * If suspended, returns FALSE and sets global_state = DSTATE_PRESCAN. + */ + +LOCAL(boolean) +output_pass_setup (j_decompress_ptr cinfo) +{ + if (cinfo->global_state != DSTATE_PRESCAN) { + /* First call: do pass setup */ + (*cinfo->master->prepare_for_output_pass) (cinfo); + cinfo->output_scanline = 0; + cinfo->global_state = DSTATE_PRESCAN; + } + /* Loop over any required dummy passes */ + while (cinfo->master->is_dummy_pass) { +#ifdef QUANT_2PASS_SUPPORTED + /* Crank through the dummy pass */ + while (cinfo->output_scanline < cinfo->output_height) { + JDIMENSION last_scanline; + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->output_scanline; + cinfo->progress->pass_limit = (long) cinfo->output_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + /* Process some data */ + last_scanline = cinfo->output_scanline; + (*cinfo->main->process_data) (cinfo, (JSAMPARRAY) NULL, + &cinfo->output_scanline, (JDIMENSION) 0); + if (cinfo->output_scanline == last_scanline) + return FALSE; /* No progress made, must suspend */ + } + /* Finish up dummy pass, and set up for another one */ + (*cinfo->master->finish_output_pass) (cinfo); + (*cinfo->master->prepare_for_output_pass) (cinfo); + cinfo->output_scanline = 0; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif /* QUANT_2PASS_SUPPORTED */ + } + /* Ready for application to drive output pass through + * jpeg_read_scanlines or jpeg_read_raw_data. + */ + cinfo->global_state = cinfo->raw_data_out ? DSTATE_RAW_OK : DSTATE_SCANNING; + return TRUE; +} + + +/* + * Read some scanlines of data from the JPEG decompressor. + * + * The return value will be the number of lines actually read. + * This may be less than the number requested in several cases, + * including bottom of image, data source suspension, and operating + * modes that emit multiple scanlines at a time. + * + * Note: we warn about excess calls to jpeg_read_scanlines() since + * this likely signals an application programmer error. However, + * an oversize buffer (max_lines > scanlines remaining) is not an error. + */ + +GLOBAL(JDIMENSION) +jpeg_read_scanlines (j_decompress_ptr cinfo, JSAMPARRAY scanlines, + JDIMENSION max_lines) +{ + JDIMENSION row_ctr; + + if (cinfo->global_state != DSTATE_SCANNING) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + if (cinfo->output_scanline >= cinfo->output_height) { + WARNMS(cinfo, JWRN_TOO_MUCH_DATA); + return 0; + } + + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->output_scanline; + cinfo->progress->pass_limit = (long) cinfo->output_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + + /* Process some data */ + row_ctr = 0; + (*cinfo->main->process_data) (cinfo, scanlines, &row_ctr, max_lines); + cinfo->output_scanline += row_ctr; + return row_ctr; +} + + +/* + * Alternate entry point to read raw data. + * Processes exactly one iMCU row per call, unless suspended. + */ + +GLOBAL(JDIMENSION) +jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data, + JDIMENSION max_lines) +{ + JDIMENSION lines_per_iMCU_row; + + if (cinfo->global_state != DSTATE_RAW_OK) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + if (cinfo->output_scanline >= cinfo->output_height) { + WARNMS(cinfo, JWRN_TOO_MUCH_DATA); + return 0; + } + + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) { + cinfo->progress->pass_counter = (long) cinfo->output_scanline; + cinfo->progress->pass_limit = (long) cinfo->output_height; + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + } + + /* Verify that at least one iMCU row can be returned. */ + lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size; + if (max_lines < lines_per_iMCU_row) + ERREXIT(cinfo, JERR_BUFFER_SIZE); + + /* Decompress directly into user's buffer. */ + if (! (*cinfo->coef->decompress_data) (cinfo, data)) + return 0; /* suspension forced, can do nothing more */ + + /* OK, we processed one iMCU row. */ + cinfo->output_scanline += lines_per_iMCU_row; + return lines_per_iMCU_row; +} + + +/* Additional entry points for buffered-image mode. */ + +#ifdef D_MULTISCAN_FILES_SUPPORTED + +/* + * Initialize for an output pass in buffered-image mode. + */ + +GLOBAL(boolean) +jpeg_start_output (j_decompress_ptr cinfo, int scan_number) +{ + if (cinfo->global_state != DSTATE_BUFIMAGE && + cinfo->global_state != DSTATE_PRESCAN) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Limit scan number to valid range */ + if (scan_number <= 0) + scan_number = 1; + if (cinfo->inputctl->eoi_reached && + scan_number > cinfo->input_scan_number) + scan_number = cinfo->input_scan_number; + cinfo->output_scan_number = scan_number; + /* Perform any dummy output passes, and set up for the real pass */ + return output_pass_setup(cinfo); +} + + +/* + * Finish up after an output pass in buffered-image mode. + * + * Returns FALSE if suspended. The return value need be inspected only if + * a suspending data source is used. + */ + +GLOBAL(boolean) +jpeg_finish_output (j_decompress_ptr cinfo) +{ + if ((cinfo->global_state == DSTATE_SCANNING || + cinfo->global_state == DSTATE_RAW_OK) && cinfo->buffered_image) { + /* Terminate this pass. */ + /* We do not require the whole pass to have been completed. */ + (*cinfo->master->finish_output_pass) (cinfo); + cinfo->global_state = DSTATE_BUFPOST; + } else if (cinfo->global_state != DSTATE_BUFPOST) { + /* BUFPOST = repeat call after a suspension, anything else is error */ + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + } + /* Read markers looking for SOS or EOI */ + while (cinfo->input_scan_number <= cinfo->output_scan_number && + ! cinfo->inputctl->eoi_reached) { + if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED) + return FALSE; /* Suspend, come back later */ + } + cinfo->global_state = DSTATE_BUFIMAGE; + return TRUE; +} + +#endif /* D_MULTISCAN_FILES_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/jdatadst.c b/windows_libs/jpeg-6a/jdatadst.c new file mode 100644 index 00000000..a8f6fb0e --- /dev/null +++ b/windows_libs/jpeg-6a/jdatadst.c @@ -0,0 +1,151 @@ +/* + * jdatadst.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains compression data destination routines for the case of + * emitting JPEG data to a file (or any stdio stream). While these routines + * are sufficient for most applications, some will want to use a different + * destination manager. + * IMPORTANT: we assume that fwrite() will correctly transcribe an array of + * JOCTETs into 8-bit-wide elements on external storage. If char is wider + * than 8 bits on your machine, you may need to do some tweaking. + */ + +/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jerror.h" + + +/* Expanded data destination object for stdio output */ + +typedef struct { + struct jpeg_destination_mgr pub; /* public fields */ + + FILE * outfile; /* target stream */ + JOCTET * buffer; /* start of buffer */ +} my_destination_mgr; + +typedef my_destination_mgr * my_dest_ptr; + +#define OUTPUT_BUF_SIZE 4096 /* choose an efficiently fwrite'able size */ + + +/* + * Initialize destination --- called by jpeg_start_compress + * before any data is actually written. + */ + +METHODDEF(void) +init_destination (j_compress_ptr cinfo) +{ + my_dest_ptr dest = (my_dest_ptr) cinfo->dest; + + /* Allocate the output buffer --- it will be released when done with image */ + dest->buffer = (JOCTET *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + OUTPUT_BUF_SIZE * SIZEOF(JOCTET)); + + dest->pub.next_output_byte = dest->buffer; + dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; +} + + +/* + * Empty the output buffer --- called whenever buffer fills up. + * + * In typical applications, this should write the entire output buffer + * (ignoring the current state of next_output_byte & free_in_buffer), + * reset the pointer & count to the start of the buffer, and return TRUE + * indicating that the buffer has been dumped. + * + * In applications that need to be able to suspend compression due to output + * overrun, a FALSE return indicates that the buffer cannot be emptied now. + * In this situation, the compressor will return to its caller (possibly with + * an indication that it has not accepted all the supplied scanlines). The + * application should resume compression after it has made more room in the + * output buffer. Note that there are substantial restrictions on the use of + * suspension --- see the documentation. + * + * When suspending, the compressor will back up to a convenient restart point + * (typically the start of the current MCU). next_output_byte & free_in_buffer + * indicate where the restart point will be if the current call returns FALSE. + * Data beyond this point will be regenerated after resumption, so do not + * write it out when emptying the buffer externally. + */ + +METHODDEF(boolean) +empty_output_buffer (j_compress_ptr cinfo) +{ + my_dest_ptr dest = (my_dest_ptr) cinfo->dest; + + if (JFWRITE(dest->outfile, dest->buffer, OUTPUT_BUF_SIZE) != + (size_t) OUTPUT_BUF_SIZE) + ERREXIT(cinfo, JERR_FILE_WRITE); + + dest->pub.next_output_byte = dest->buffer; + dest->pub.free_in_buffer = OUTPUT_BUF_SIZE; + + return TRUE; +} + + +/* + * Terminate destination --- called by jpeg_finish_compress + * after all data has been written. Usually needs to flush buffer. + * + * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding + * application must deal with any cleanup that should happen even + * for error exit. + */ + +METHODDEF(void) +term_destination (j_compress_ptr cinfo) +{ + my_dest_ptr dest = (my_dest_ptr) cinfo->dest; + size_t datacount = OUTPUT_BUF_SIZE - dest->pub.free_in_buffer; + + /* Write any data remaining in the buffer */ + if (datacount > 0) { + if (JFWRITE(dest->outfile, dest->buffer, datacount) != datacount) + ERREXIT(cinfo, JERR_FILE_WRITE); + } + fflush(dest->outfile); + /* Make sure we wrote the output file OK */ + if (ferror(dest->outfile)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * Prepare for output to a stdio stream. + * The caller must have already opened the stream, and is responsible + * for closing it after finishing compression. + */ + +GLOBAL(void) +jpeg_stdio_dest (j_compress_ptr cinfo, FILE * outfile) +{ + my_dest_ptr dest; + + /* The destination object is made permanent so that multiple JPEG images + * can be written to the same file without re-executing jpeg_stdio_dest. + * This makes it dangerous to use this manager and a different destination + * manager serially with the same JPEG object, because their private object + * sizes may be different. Caveat programmer. + */ + if (cinfo->dest == NULL) { /* first time for this JPEG object? */ + cinfo->dest = (struct jpeg_destination_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + SIZEOF(my_destination_mgr)); + } + + dest = (my_dest_ptr) cinfo->dest; + dest->pub.init_destination = init_destination; + dest->pub.empty_output_buffer = empty_output_buffer; + dest->pub.term_destination = term_destination; + dest->outfile = outfile; +} diff --git a/windows_libs/jpeg-6a/jdatasrc.c b/windows_libs/jpeg-6a/jdatasrc.c new file mode 100644 index 00000000..edc752bf --- /dev/null +++ b/windows_libs/jpeg-6a/jdatasrc.c @@ -0,0 +1,212 @@ +/* + * jdatasrc.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains decompression data source routines for the case of + * reading JPEG data from a file (or any stdio stream). While these routines + * are sufficient for most applications, some will want to use a different + * source manager. + * IMPORTANT: we assume that fread() will correctly transcribe an array of + * JOCTETs from 8-bit-wide elements on external storage. If char is wider + * than 8 bits on your machine, you may need to do some tweaking. + */ + +/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jerror.h" + + +/* Expanded data source object for stdio input */ + +typedef struct { + struct jpeg_source_mgr pub; /* public fields */ + + FILE * infile; /* source stream */ + JOCTET * buffer; /* start of buffer */ + boolean start_of_file; /* have we gotten any data yet? */ +} my_source_mgr; + +typedef my_source_mgr * my_src_ptr; + +#define INPUT_BUF_SIZE 4096 /* choose an efficiently fread'able size */ + + +/* + * Initialize source --- called by jpeg_read_header + * before any data is actually read. + */ + +METHODDEF(void) +init_source (j_decompress_ptr cinfo) +{ + my_src_ptr src = (my_src_ptr) cinfo->src; + + /* We reset the empty-input-file flag for each image, + * but we don't clear the input buffer. + * This is correct behavior for reading a series of images from one source. + */ + src->start_of_file = TRUE; +} + + +/* + * Fill the input buffer --- called whenever buffer is emptied. + * + * In typical applications, this should read fresh data into the buffer + * (ignoring the current state of next_input_byte & bytes_in_buffer), + * reset the pointer & count to the start of the buffer, and return TRUE + * indicating that the buffer has been reloaded. It is not necessary to + * fill the buffer entirely, only to obtain at least one more byte. + * + * There is no such thing as an EOF return. If the end of the file has been + * reached, the routine has a choice of ERREXIT() or inserting fake data into + * the buffer. In most cases, generating a warning message and inserting a + * fake EOI marker is the best course of action --- this will allow the + * decompressor to output however much of the image is there. However, + * the resulting error message is misleading if the real problem is an empty + * input file, so we handle that case specially. + * + * In applications that need to be able to suspend compression due to input + * not being available yet, a FALSE return indicates that no more data can be + * obtained right now, but more may be forthcoming later. In this situation, + * the decompressor will return to its caller (with an indication of the + * number of scanlines it has read, if any). The application should resume + * decompression after it has loaded more data into the input buffer. Note + * that there are substantial restrictions on the use of suspension --- see + * the documentation. + * + * When suspending, the decompressor will back up to a convenient restart point + * (typically the start of the current MCU). next_input_byte & bytes_in_buffer + * indicate where the restart point will be if the current call returns FALSE. + * Data beyond this point must be rescanned after resumption, so move it to + * the front of the buffer rather than discarding it. + */ + +METHODDEF(boolean) +fill_input_buffer (j_decompress_ptr cinfo) +{ + my_src_ptr src = (my_src_ptr) cinfo->src; + size_t nbytes; + + nbytes = JFREAD(src->infile, src->buffer, INPUT_BUF_SIZE); + + if (nbytes <= 0) { + if (src->start_of_file) /* Treat empty input file as fatal error */ + ERREXIT(cinfo, JERR_INPUT_EMPTY); + WARNMS(cinfo, JWRN_JPEG_EOF); + /* Insert a fake EOI marker */ + src->buffer[0] = (JOCTET) 0xFF; + src->buffer[1] = (JOCTET) JPEG_EOI; + nbytes = 2; + } + + src->pub.next_input_byte = src->buffer; + src->pub.bytes_in_buffer = nbytes; + src->start_of_file = FALSE; + + return TRUE; +} + + +/* + * Skip data --- used to skip over a potentially large amount of + * uninteresting data (such as an APPn marker). + * + * Writers of suspendable-input applications must note that skip_input_data + * is not granted the right to give a suspension return. If the skip extends + * beyond the data currently in the buffer, the buffer can be marked empty so + * that the next read will cause a fill_input_buffer call that can suspend. + * Arranging for additional bytes to be discarded before reloading the input + * buffer is the application writer's problem. + */ + +METHODDEF(void) +skip_input_data (j_decompress_ptr cinfo, long num_bytes) +{ + my_src_ptr src = (my_src_ptr) cinfo->src; + + /* Just a dumb implementation for now. Could use fseek() except + * it doesn't work on pipes. Not clear that being smart is worth + * any trouble anyway --- large skips are infrequent. + */ + if (num_bytes > 0) { + while (num_bytes > (long) src->pub.bytes_in_buffer) { + num_bytes -= (long) src->pub.bytes_in_buffer; + (void) fill_input_buffer(cinfo); + /* note we assume that fill_input_buffer will never return FALSE, + * so suspension need not be handled. + */ + } + src->pub.next_input_byte += (size_t) num_bytes; + src->pub.bytes_in_buffer -= (size_t) num_bytes; + } +} + + +/* + * An additional method that can be provided by data source modules is the + * resync_to_restart method for error recovery in the presence of RST markers. + * For the moment, this source module just uses the default resync method + * provided by the JPEG library. That method assumes that no backtracking + * is possible. + */ + + +/* + * Terminate source --- called by jpeg_finish_decompress + * after all data has been read. Often a no-op. + * + * NB: *not* called by jpeg_abort or jpeg_destroy; surrounding + * application must deal with any cleanup that should happen even + * for error exit. + */ + +METHODDEF(void) +term_source (j_decompress_ptr cinfo) +{ + /* no work necessary here */ +} + + +/* + * Prepare for input from a stdio stream. + * The caller must have already opened the stream, and is responsible + * for closing it after finishing decompression. + */ + +GLOBAL(void) +jpeg_stdio_src (j_decompress_ptr cinfo, FILE * infile) +{ + my_src_ptr src; + + /* The source object and input buffer are made permanent so that a series + * of JPEG images can be read from the same file by calling jpeg_stdio_src + * only before the first one. (If we discarded the buffer at the end of + * one image, we'd likely lose the start of the next one.) + * This makes it unsafe to use this manager and a different source + * manager serially with the same JPEG object. Caveat programmer. + */ + if (cinfo->src == NULL) { /* first time for this JPEG object? */ + cinfo->src = (struct jpeg_source_mgr *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + SIZEOF(my_source_mgr)); + src = (my_src_ptr) cinfo->src; + src->buffer = (JOCTET *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + INPUT_BUF_SIZE * SIZEOF(JOCTET)); + } + + src = (my_src_ptr) cinfo->src; + src->pub.init_source = init_source; + src->pub.fill_input_buffer = fill_input_buffer; + src->pub.skip_input_data = skip_input_data; + src->pub.resync_to_restart = jpeg_resync_to_restart; /* use default method */ + src->pub.term_source = term_source; + src->infile = infile; + src->pub.bytes_in_buffer = 0; /* forces fill_input_buffer on first read */ + src->pub.next_input_byte = NULL; /* until buffer loaded */ +} diff --git a/windows_libs/jpeg-6a/jdcoefct.c b/windows_libs/jpeg-6a/jdcoefct.c new file mode 100644 index 00000000..c0cd0bd5 --- /dev/null +++ b/windows_libs/jpeg-6a/jdcoefct.c @@ -0,0 +1,735 @@ +/* + * jdcoefct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the coefficient buffer controller for decompression. + * This controller is the top level of the JPEG decompressor proper. + * The coefficient buffer lies between entropy decoding and inverse-DCT steps. + * + * In buffered-image mode, this controller is the interface between + * input-oriented processing and output-oriented processing. + * Also, the input side (only) is used when reading a file for transcoding. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +/* Block smoothing is only applicable for progressive JPEG, so: */ +#ifndef D_PROGRESSIVE_SUPPORTED +#undef BLOCK_SMOOTHING_SUPPORTED +#endif + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_d_coef_controller pub; /* public fields */ + + /* These variables keep track of the current location of the input side. */ + /* cinfo->input_iMCU_row is also used for this. */ + JDIMENSION MCU_ctr; /* counts MCUs processed in current row */ + int MCU_vert_offset; /* counts MCU rows within iMCU row */ + int MCU_rows_per_iMCU_row; /* number of such rows needed */ + + /* The output side's location is represented by cinfo->output_iMCU_row. */ + + /* In single-pass modes, it's sufficient to buffer just one MCU. + * We allocate a workspace of D_MAX_BLOCKS_IN_MCU coefficient blocks, + * and let the entropy decoder write into that workspace each time. + * (On 80x86, the workspace is FAR even though it's not really very big; + * this is to keep the module interfaces unchanged when a large coefficient + * buffer is necessary.) + * In multi-pass modes, this array points to the current MCU's blocks + * within the virtual arrays; it is used only by the input side. + */ + JBLOCKROW MCU_buffer[D_MAX_BLOCKS_IN_MCU]; + +#ifdef D_MULTISCAN_FILES_SUPPORTED + /* In multi-pass modes, we need a virtual block array for each component. */ + jvirt_barray_ptr whole_image[MAX_COMPONENTS]; +#endif + +#ifdef BLOCK_SMOOTHING_SUPPORTED + /* When doing block smoothing, we latch coefficient Al values here */ + int * coef_bits_latch; +#define SAVED_COEFS 6 /* we save coef_bits[0..5] */ +#endif +} my_coef_controller; + +typedef my_coef_controller * my_coef_ptr; + +/* Forward declarations */ +METHODDEF(int) decompress_onepass + JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); +#ifdef D_MULTISCAN_FILES_SUPPORTED +METHODDEF(int) decompress_data + JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); +#endif +#ifdef BLOCK_SMOOTHING_SUPPORTED +LOCAL(boolean) smoothing_ok JPP((j_decompress_ptr cinfo)); +METHODDEF(int) decompress_smooth_data + JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); +#endif + + +LOCAL(void) +start_iMCU_row (j_decompress_ptr cinfo) +/* Reset within-iMCU-row counters for a new row (input side) */ +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + /* In an interleaved scan, an MCU row is the same as an iMCU row. + * In a noninterleaved scan, an iMCU row has v_samp_factor MCU rows. + * But at the bottom of the image, process only what's left. + */ + if (cinfo->comps_in_scan > 1) { + coef->MCU_rows_per_iMCU_row = 1; + } else { + if (cinfo->input_iMCU_row < (cinfo->total_iMCU_rows-1)) + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->v_samp_factor; + else + coef->MCU_rows_per_iMCU_row = cinfo->cur_comp_info[0]->last_row_height; + } + + coef->MCU_ctr = 0; + coef->MCU_vert_offset = 0; +} + + +/* + * Initialize for an input processing pass. + */ + +METHODDEF(void) +start_input_pass (j_decompress_ptr cinfo) +{ + cinfo->input_iMCU_row = 0; + start_iMCU_row(cinfo); +} + + +/* + * Initialize for an output processing pass. + */ + +METHODDEF(void) +start_output_pass (j_decompress_ptr cinfo) +{ +#ifdef BLOCK_SMOOTHING_SUPPORTED + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + + /* If multipass, check to see whether to use block smoothing on this pass */ + if (coef->pub.coef_arrays != NULL) { + if (cinfo->do_block_smoothing && smoothing_ok(cinfo)) + coef->pub.decompress_data = decompress_smooth_data; + else + coef->pub.decompress_data = decompress_data; + } +#endif + cinfo->output_iMCU_row = 0; +} + + +/* + * Decompress and return some data in the single-pass case. + * Always attempts to emit one fully interleaved MCU row ("iMCU" row). + * Input and output must run in lockstep since we have only a one-MCU buffer. + * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. + * + * NB: output_buf contains a plane for each component in image. + * For single pass, this is the same as the components in the scan. + */ + +METHODDEF(int) +decompress_onepass (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + JDIMENSION last_MCU_col = cinfo->MCUs_per_row - 1; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + int blkn, ci, xindex, yindex, yoffset, useful_width; + JSAMPARRAY output_ptr; + JDIMENSION start_col, output_col; + jpeg_component_info *compptr; + inverse_DCT_method_ptr inverse_DCT; + + /* Loop to process as much as one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->MCU_ctr; MCU_col_num <= last_MCU_col; + MCU_col_num++) { + /* Try to fetch an MCU. Entropy decoder expects buffer to be zeroed. */ + jzero_far((void FAR *) coef->MCU_buffer[0], + (size_t) (cinfo->blocks_in_MCU * SIZEOF(JBLOCK))); + if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->MCU_ctr = MCU_col_num; + return JPEG_SUSPENDED; + } + /* Determine where data should go in output_buf and do the IDCT thing. + * We skip dummy blocks at the right and bottom edges (but blkn gets + * incremented past them!). Note the inner loop relies on having + * allocated the MCU_buffer[] blocks sequentially. + */ + blkn = 0; /* index of current DCT block within MCU */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Don't bother to IDCT an uninteresting component. */ + if (! compptr->component_needed) { + blkn += compptr->MCU_blocks; + continue; + } + inverse_DCT = cinfo->idct->inverse_DCT[compptr->component_index]; + useful_width = (MCU_col_num < last_MCU_col) ? compptr->MCU_width + : compptr->last_col_width; + output_ptr = output_buf[ci] + yoffset * compptr->DCT_scaled_size; + start_col = MCU_col_num * compptr->MCU_sample_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + if (cinfo->input_iMCU_row < last_iMCU_row || + yoffset+yindex < compptr->last_row_height) { + output_col = start_col; + for (xindex = 0; xindex < useful_width; xindex++) { + (*inverse_DCT) (cinfo, compptr, + (JCOEFPTR) coef->MCU_buffer[blkn+xindex], + output_ptr, output_col); + output_col += compptr->DCT_scaled_size; + } + } + blkn += compptr->MCU_width; + output_ptr += compptr->DCT_scaled_size; + } + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->MCU_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + cinfo->output_iMCU_row++; + if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) { + start_iMCU_row(cinfo); + return JPEG_ROW_COMPLETED; + } + /* Completed the scan */ + (*cinfo->inputctl->finish_input_pass) (cinfo); + return JPEG_SCAN_COMPLETED; +} + + +/* + * Dummy consume-input routine for single-pass operation. + */ + +METHODDEF(int) +dummy_consume_data (j_decompress_ptr cinfo) +{ + return JPEG_SUSPENDED; /* Always indicate nothing was done */ +} + + +#ifdef D_MULTISCAN_FILES_SUPPORTED + +/* + * Consume input data and store it in the full-image coefficient buffer. + * We read as much as one fully interleaved MCU row ("iMCU" row) per call, + * ie, v_samp_factor block rows for each component in the scan. + * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. + */ + +METHODDEF(int) +consume_data (j_decompress_ptr cinfo) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION MCU_col_num; /* index of current MCU within row */ + int blkn, ci, xindex, yindex, yoffset; + JDIMENSION start_col; + JBLOCKARRAY buffer[MAX_COMPS_IN_SCAN]; + JBLOCKROW buffer_ptr; + jpeg_component_info *compptr; + + /* Align the virtual buffers for the components used in this scan. */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + buffer[ci] = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[compptr->component_index], + cinfo->input_iMCU_row * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, TRUE); + /* Note: entropy decoder expects buffer to be zeroed, + * but this is handled automatically by the memory manager + * because we requested a pre-zeroed array. + */ + } + + /* Loop to process one whole iMCU row */ + for (yoffset = coef->MCU_vert_offset; yoffset < coef->MCU_rows_per_iMCU_row; + yoffset++) { + for (MCU_col_num = coef->MCU_ctr; MCU_col_num < cinfo->MCUs_per_row; + MCU_col_num++) { + /* Construct list of pointers to DCT blocks belonging to this MCU */ + blkn = 0; /* index of current DCT block within MCU */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + start_col = MCU_col_num * compptr->MCU_width; + for (yindex = 0; yindex < compptr->MCU_height; yindex++) { + buffer_ptr = buffer[ci][yindex+yoffset] + start_col; + for (xindex = 0; xindex < compptr->MCU_width; xindex++) { + coef->MCU_buffer[blkn++] = buffer_ptr++; + } + } + } + /* Try to fetch the MCU. */ + if (! (*cinfo->entropy->decode_mcu) (cinfo, coef->MCU_buffer)) { + /* Suspension forced; update state counters and exit */ + coef->MCU_vert_offset = yoffset; + coef->MCU_ctr = MCU_col_num; + return JPEG_SUSPENDED; + } + } + /* Completed an MCU row, but perhaps not an iMCU row */ + coef->MCU_ctr = 0; + } + /* Completed the iMCU row, advance counters for next one */ + if (++(cinfo->input_iMCU_row) < cinfo->total_iMCU_rows) { + start_iMCU_row(cinfo); + return JPEG_ROW_COMPLETED; + } + /* Completed the scan */ + (*cinfo->inputctl->finish_input_pass) (cinfo); + return JPEG_SCAN_COMPLETED; +} + + +/* + * Decompress and return some data in the multi-pass case. + * Always attempts to emit one fully interleaved MCU row ("iMCU" row). + * Return value is JPEG_ROW_COMPLETED, JPEG_SCAN_COMPLETED, or JPEG_SUSPENDED. + * + * NB: output_buf contains a plane for each component in image. + */ + +METHODDEF(int) +decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + JDIMENSION block_num; + int ci, block_row, block_rows; + JBLOCKARRAY buffer; + JBLOCKROW buffer_ptr; + JSAMPARRAY output_ptr; + JDIMENSION output_col; + jpeg_component_info *compptr; + inverse_DCT_method_ptr inverse_DCT; + + /* Force some input to be done if we are getting ahead of the input. */ + while (cinfo->input_scan_number < cinfo->output_scan_number || + (cinfo->input_scan_number == cinfo->output_scan_number && + cinfo->input_iMCU_row <= cinfo->output_iMCU_row)) { + if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED) + return JPEG_SUSPENDED; + } + + /* OK, output from the virtual arrays. */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Don't bother to IDCT an uninteresting component. */ + if (! compptr->component_needed) + continue; + /* Align the virtual buffer for this component. */ + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[ci], + cinfo->output_iMCU_row * compptr->v_samp_factor, + (JDIMENSION) compptr->v_samp_factor, FALSE); + /* Count non-dummy DCT block rows in this iMCU row. */ + if (cinfo->output_iMCU_row < last_iMCU_row) + block_rows = compptr->v_samp_factor; + else { + /* NB: can't use last_row_height here; it is input-side-dependent! */ + block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (block_rows == 0) block_rows = compptr->v_samp_factor; + } + inverse_DCT = cinfo->idct->inverse_DCT[ci]; + output_ptr = output_buf[ci]; + /* Loop over all DCT blocks to be processed. */ + for (block_row = 0; block_row < block_rows; block_row++) { + buffer_ptr = buffer[block_row]; + output_col = 0; + for (block_num = 0; block_num < compptr->width_in_blocks; block_num++) { + (*inverse_DCT) (cinfo, compptr, (JCOEFPTR) buffer_ptr, + output_ptr, output_col); + buffer_ptr++; + output_col += compptr->DCT_scaled_size; + } + output_ptr += compptr->DCT_scaled_size; + } + } + + if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows) + return JPEG_ROW_COMPLETED; + return JPEG_SCAN_COMPLETED; +} + +#endif /* D_MULTISCAN_FILES_SUPPORTED */ + + +#ifdef BLOCK_SMOOTHING_SUPPORTED + +/* + * This code applies interblock smoothing as described by section K.8 + * of the JPEG standard: the first 5 AC coefficients are estimated from + * the DC values of a DCT block and its 8 neighboring blocks. + * We apply smoothing only for progressive JPEG decoding, and only if + * the coefficients it can estimate are not yet known to full precision. + */ + +/* Natural-order array positions of the first 5 zigzag-order coefficients */ +#define Q01_POS 1 +#define Q10_POS 8 +#define Q20_POS 16 +#define Q11_POS 9 +#define Q02_POS 2 + +/* + * Determine whether block smoothing is applicable and safe. + * We also latch the current states of the coef_bits[] entries for the + * AC coefficients; otherwise, if the input side of the decompressor + * advances into a new scan, we might think the coefficients are known + * more accurately than they really are. + */ + +LOCAL(boolean) +smoothing_ok (j_decompress_ptr cinfo) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + boolean smoothing_useful = FALSE; + int ci, coefi; + jpeg_component_info *compptr; + JQUANT_TBL * qtable; + int * coef_bits; + int * coef_bits_latch; + + if (! cinfo->progressive_mode || cinfo->coef_bits == NULL) + return FALSE; + + /* Allocate latch area if not already done */ + if (coef->coef_bits_latch == NULL) + coef->coef_bits_latch = (int *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components * + (SAVED_COEFS * SIZEOF(int))); + coef_bits_latch = coef->coef_bits_latch; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* All components' quantization values must already be latched. */ + if ((qtable = compptr->quant_table) == NULL) + return FALSE; + /* Verify DC & first 5 AC quantizers are nonzero to avoid zero-divide. */ + if (qtable->quantval[0] == 0 || + qtable->quantval[Q01_POS] == 0 || + qtable->quantval[Q10_POS] == 0 || + qtable->quantval[Q20_POS] == 0 || + qtable->quantval[Q11_POS] == 0 || + qtable->quantval[Q02_POS] == 0) + return FALSE; + /* DC values must be at least partly known for all components. */ + coef_bits = cinfo->coef_bits[ci]; + if (coef_bits[0] < 0) + return FALSE; + /* Block smoothing is helpful if some AC coefficients remain inaccurate. */ + for (coefi = 1; coefi <= 5; coefi++) { + coef_bits_latch[coefi] = coef_bits[coefi]; + if (coef_bits[coefi] != 0) + smoothing_useful = TRUE; + } + coef_bits_latch += SAVED_COEFS; + } + + return smoothing_useful; +} + + +/* + * Variant of decompress_data for use when doing block smoothing. + */ + +METHODDEF(int) +decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) +{ + my_coef_ptr coef = (my_coef_ptr) cinfo->coef; + JDIMENSION last_iMCU_row = cinfo->total_iMCU_rows - 1; + JDIMENSION block_num, last_block_column; + int ci, block_row, block_rows, access_rows; + JBLOCKARRAY buffer; + JBLOCKROW buffer_ptr, prev_block_row, next_block_row; + JSAMPARRAY output_ptr; + JDIMENSION output_col; + jpeg_component_info *compptr; + inverse_DCT_method_ptr inverse_DCT; + boolean first_row, last_row; + JBLOCK workspace; + int *coef_bits; + JQUANT_TBL *quanttbl; + INT32 Q00,Q01,Q02,Q10,Q11,Q20, num; + int DC1,DC2,DC3,DC4,DC5,DC6,DC7,DC8,DC9; + int Al, pred; + + /* Force some input to be done if we are getting ahead of the input. */ + while (cinfo->input_scan_number <= cinfo->output_scan_number && + ! cinfo->inputctl->eoi_reached) { + if (cinfo->input_scan_number == cinfo->output_scan_number) { + /* If input is working on current scan, we ordinarily want it to + * have completed the current row. But if input scan is DC, + * we want it to keep one row ahead so that next block row's DC + * values are up to date. + */ + JDIMENSION delta = (cinfo->Ss == 0) ? 1 : 0; + if (cinfo->input_iMCU_row > cinfo->output_iMCU_row+delta) + break; + } + if ((*cinfo->inputctl->consume_input)(cinfo) == JPEG_SUSPENDED) + return JPEG_SUSPENDED; + } + + /* OK, output from the virtual arrays. */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Don't bother to IDCT an uninteresting component. */ + if (! compptr->component_needed) + continue; + /* Count non-dummy DCT block rows in this iMCU row. */ + if (cinfo->output_iMCU_row < last_iMCU_row) { + block_rows = compptr->v_samp_factor; + access_rows = block_rows * 2; /* this and next iMCU row */ + last_row = FALSE; + } else { + /* NB: can't use last_row_height here; it is input-side-dependent! */ + block_rows = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (block_rows == 0) block_rows = compptr->v_samp_factor; + access_rows = block_rows; /* this iMCU row only */ + last_row = TRUE; + } + /* Align the virtual buffer for this component. */ + if (cinfo->output_iMCU_row > 0) { + access_rows += compptr->v_samp_factor; /* prior iMCU row too */ + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[ci], + (cinfo->output_iMCU_row - 1) * compptr->v_samp_factor, + (JDIMENSION) access_rows, FALSE); + buffer += compptr->v_samp_factor; /* point to current iMCU row */ + first_row = FALSE; + } else { + buffer = (*cinfo->mem->access_virt_barray) + ((j_common_ptr) cinfo, coef->whole_image[ci], + (JDIMENSION) 0, (JDIMENSION) access_rows, FALSE); + first_row = TRUE; + } + /* Fetch component-dependent info */ + coef_bits = coef->coef_bits_latch + (ci * SAVED_COEFS); + quanttbl = compptr->quant_table; + Q00 = quanttbl->quantval[0]; + Q01 = quanttbl->quantval[Q01_POS]; + Q10 = quanttbl->quantval[Q10_POS]; + Q20 = quanttbl->quantval[Q20_POS]; + Q11 = quanttbl->quantval[Q11_POS]; + Q02 = quanttbl->quantval[Q02_POS]; + inverse_DCT = cinfo->idct->inverse_DCT[ci]; + output_ptr = output_buf[ci]; + /* Loop over all DCT blocks to be processed. */ + for (block_row = 0; block_row < block_rows; block_row++) { + buffer_ptr = buffer[block_row]; + if (first_row && block_row == 0) + prev_block_row = buffer_ptr; + else + prev_block_row = buffer[block_row-1]; + if (last_row && block_row == block_rows-1) + next_block_row = buffer_ptr; + else + next_block_row = buffer[block_row+1]; + /* We fetch the surrounding DC values using a sliding-register approach. + * Initialize all nine here so as to do the right thing on narrow pics. + */ + DC1 = DC2 = DC3 = (int) prev_block_row[0][0]; + DC4 = DC5 = DC6 = (int) buffer_ptr[0][0]; + DC7 = DC8 = DC9 = (int) next_block_row[0][0]; + output_col = 0; + last_block_column = compptr->width_in_blocks - 1; + for (block_num = 0; block_num <= last_block_column; block_num++) { + /* Fetch current DCT block into workspace so we can modify it. */ + jcopy_block_row(buffer_ptr, (JBLOCKROW) workspace, (JDIMENSION) 1); + /* Update DC values */ + if (block_num < last_block_column) { + DC3 = (int) prev_block_row[1][0]; + DC6 = (int) buffer_ptr[1][0]; + DC9 = (int) next_block_row[1][0]; + } + /* Compute coefficient estimates per K.8. + * An estimate is applied only if coefficient is still zero, + * and is not known to be fully accurate. + */ + /* AC01 */ + if ((Al=coef_bits[1]) != 0 && workspace[1] == 0) { + num = 36 * Q00 * (DC4 - DC6); + if (num >= 0) { + pred = (int) (((Q01<<7) + num) / (Q01<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { + pred = (int) (((Q10<<7) + num) / (Q10<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { + pred = (int) (((Q20<<7) + num) / (Q20<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { + pred = (int) (((Q11<<7) + num) / (Q11<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<= 0) { + pred = (int) (((Q02<<7) + num) / (Q02<<8)); + if (Al > 0 && pred >= (1< 0 && pred >= (1<DCT_scaled_size; + } + output_ptr += compptr->DCT_scaled_size; + } + } + + if (++(cinfo->output_iMCU_row) < cinfo->total_iMCU_rows) + return JPEG_ROW_COMPLETED; + return JPEG_SCAN_COMPLETED; +} + +#endif /* BLOCK_SMOOTHING_SUPPORTED */ + + +/* + * Initialize coefficient buffer controller. + */ + +GLOBAL(void) +jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer) +{ + my_coef_ptr coef; + + coef = (my_coef_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_coef_controller)); + cinfo->coef = (struct jpeg_d_coef_controller *) coef; + coef->pub.start_input_pass = start_input_pass; + coef->pub.start_output_pass = start_output_pass; +#ifdef BLOCK_SMOOTHING_SUPPORTED + coef->coef_bits_latch = NULL; +#endif + + /* Create the coefficient buffer. */ + if (need_full_buffer) { +#ifdef D_MULTISCAN_FILES_SUPPORTED + /* Allocate a full-image virtual array for each component, */ + /* padded to a multiple of samp_factor DCT blocks in each direction. */ + /* Note we ask for a pre-zeroed array. */ + int ci, access_rows; + jpeg_component_info *compptr; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + access_rows = compptr->v_samp_factor; +#ifdef BLOCK_SMOOTHING_SUPPORTED + /* If block smoothing could be used, need a bigger window */ + if (cinfo->progressive_mode) + access_rows *= 3; +#endif + coef->whole_image[ci] = (*cinfo->mem->request_virt_barray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, TRUE, + (JDIMENSION) jround_up((long) compptr->width_in_blocks, + (long) compptr->h_samp_factor), + (JDIMENSION) jround_up((long) compptr->height_in_blocks, + (long) compptr->v_samp_factor), + (JDIMENSION) access_rows); + } + coef->pub.consume_data = consume_data; + coef->pub.decompress_data = decompress_data; + coef->pub.coef_arrays = coef->whole_image; /* link to virtual arrays */ +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + /* We only need a single-MCU buffer. */ + JBLOCKROW buffer; + int i; + + buffer = (JBLOCKROW) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + D_MAX_BLOCKS_IN_MCU * SIZEOF(JBLOCK)); + for (i = 0; i < D_MAX_BLOCKS_IN_MCU; i++) { + coef->MCU_buffer[i] = buffer + i; + } + coef->pub.consume_data = dummy_consume_data; + coef->pub.decompress_data = decompress_onepass; + coef->pub.coef_arrays = NULL; /* flag for no virtual arrays */ + } +} diff --git a/windows_libs/jpeg-6a/jdcolor.c b/windows_libs/jpeg-6a/jdcolor.c new file mode 100644 index 00000000..02694984 --- /dev/null +++ b/windows_libs/jpeg-6a/jdcolor.c @@ -0,0 +1,367 @@ +/* + * jdcolor.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains output colorspace conversion routines. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private subobject */ + +typedef struct { + struct jpeg_color_deconverter pub; /* public fields */ + + /* Private state for YCC->RGB conversion */ + int * Cr_r_tab; /* => table for Cr to R conversion */ + int * Cb_b_tab; /* => table for Cb to B conversion */ + INT32 * Cr_g_tab; /* => table for Cr to G conversion */ + INT32 * Cb_g_tab; /* => table for Cb to G conversion */ +} my_color_deconverter; + +typedef my_color_deconverter * my_cconvert_ptr; + + +/**************** YCbCr -> RGB conversion: most common case **************/ + +/* + * YCbCr is defined per CCIR 601-1, except that Cb and Cr are + * normalized to the range 0..MAXJSAMPLE rather than -0.5 .. 0.5. + * The conversion equations to be implemented are therefore + * R = Y + 1.40200 * Cr + * G = Y - 0.34414 * Cb - 0.71414 * Cr + * B = Y + 1.77200 * Cb + * where Cb and Cr represent the incoming values less CENTERJSAMPLE. + * (These numbers are derived from TIFF 6.0 section 21, dated 3-June-92.) + * + * To avoid floating-point arithmetic, we represent the fractional constants + * as integers scaled up by 2^16 (about 4 digits precision); we have to divide + * the products by 2^16, with appropriate rounding, to get the correct answer. + * Notice that Y, being an integral input, does not contribute any fraction + * so it need not participate in the rounding. + * + * For even more speed, we avoid doing any multiplications in the inner loop + * by precalculating the constants times Cb and Cr for all possible values. + * For 8-bit JSAMPLEs this is very reasonable (only 256 entries per table); + * for 12-bit samples it is still acceptable. It's not very reasonable for + * 16-bit samples, but if you want lossless storage you shouldn't be changing + * colorspace anyway. + * The Cr=>R and Cb=>B values can be rounded to integers in advance; the + * values for the G calculation are left scaled up, since we must add them + * together before rounding. + */ + +#define SCALEBITS 16 /* speediest right-shift on some machines */ +#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) +#define FIX(x) ((INT32) ((x) * (1L<RGB colorspace conversion. + */ + +LOCAL(void) +build_ycc_rgb_table (j_decompress_ptr cinfo) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + int i; + INT32 x; + SHIFT_TEMPS + + cconvert->Cr_r_tab = (int *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(int)); + cconvert->Cb_b_tab = (int *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(int)); + cconvert->Cr_g_tab = (INT32 *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(INT32)); + cconvert->Cb_g_tab = (INT32 *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(INT32)); + + for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { + /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ + /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */ + /* Cr=>R value is nearest int to 1.40200 * x */ + cconvert->Cr_r_tab[i] = (int) + RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS); + /* Cb=>B value is nearest int to 1.77200 * x */ + cconvert->Cb_b_tab[i] = (int) + RIGHT_SHIFT(FIX(1.77200) * x + ONE_HALF, SCALEBITS); + /* Cr=>G value is scaled-up -0.71414 * x */ + cconvert->Cr_g_tab[i] = (- FIX(0.71414)) * x; + /* Cb=>G value is scaled-up -0.34414 * x */ + /* We also add in ONE_HALF so that need not do it in inner loop */ + cconvert->Cb_g_tab[i] = (- FIX(0.34414)) * x + ONE_HALF; + } +} + + +/* + * Convert some rows of samples to the output colorspace. + * + * Note that we change from noninterleaved, one-plane-per-component format + * to interleaved-pixel format. The output buffer is therefore three times + * as wide as the input buffer. + * A starting row offset is provided only for the input buffer. The caller + * can easily adjust the passed output_buf value to accommodate any row + * offset required on that side. + */ + +METHODDEF(void) +ycc_rgb_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int y, cb, cr; + register JSAMPROW outptr; + register JSAMPROW inptr0, inptr1, inptr2; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + /* copy these pointers into registers if possible */ + register JSAMPLE * range_limit = cinfo->sample_range_limit; + register int * Crrtab = cconvert->Cr_r_tab; + register int * Cbbtab = cconvert->Cb_b_tab; + register INT32 * Crgtab = cconvert->Cr_g_tab; + register INT32 * Cbgtab = cconvert->Cb_g_tab; + SHIFT_TEMPS + + while (--num_rows >= 0) { + inptr0 = input_buf[0][input_row]; + inptr1 = input_buf[1][input_row]; + inptr2 = input_buf[2][input_row]; + input_row++; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + y = GETJSAMPLE(inptr0[col]); + cb = GETJSAMPLE(inptr1[col]); + cr = GETJSAMPLE(inptr2[col]); + /* Range-limiting is essential due to noise introduced by DCT losses. */ + outptr[RGB_RED] = range_limit[y + Crrtab[cr]]; + outptr[RGB_GREEN] = range_limit[y + + ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], + SCALEBITS))]; + outptr[RGB_BLUE] = range_limit[y + Cbbtab[cb]]; + outptr += RGB_PIXELSIZE; + } + } +} + + +/**************** Cases other than YCbCr -> RGB **************/ + + +/* + * Color conversion for no colorspace change: just copy the data, + * converting from separate-planes to interleaved representation. + */ + +METHODDEF(void) +null_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + register JSAMPROW inptr, outptr; + register JDIMENSION count; + register int num_components = cinfo->num_components; + JDIMENSION num_cols = cinfo->output_width; + int ci; + + while (--num_rows >= 0) { + for (ci = 0; ci < num_components; ci++) { + inptr = input_buf[ci][input_row]; + outptr = output_buf[0] + ci; + for (count = num_cols; count > 0; count--) { + *outptr = *inptr++; /* needn't bother with GETJSAMPLE() here */ + outptr += num_components; + } + } + input_row++; + output_buf++; + } +} + + +/* + * Color conversion for grayscale: just copy the data. + * This also works for YCbCr -> grayscale conversion, in which + * we just copy the Y (luminance) component and ignore chrominance. + */ + +METHODDEF(void) +grayscale_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + jcopy_sample_rows(input_buf[0], (int) input_row, output_buf, 0, + num_rows, cinfo->output_width); +} + + +/* + * Adobe-style YCCK->CMYK conversion. + * We convert YCbCr to R=1-C, G=1-M, and B=1-Y using the same + * conversion as above, while passing K (black) unchanged. + * We assume build_ycc_rgb_table has been called. + */ + +METHODDEF(void) +ycck_cmyk_convert (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows) +{ + my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; + register int y, cb, cr; + register JSAMPROW outptr; + register JSAMPROW inptr0, inptr1, inptr2, inptr3; + register JDIMENSION col; + JDIMENSION num_cols = cinfo->output_width; + /* copy these pointers into registers if possible */ + register JSAMPLE * range_limit = cinfo->sample_range_limit; + register int * Crrtab = cconvert->Cr_r_tab; + register int * Cbbtab = cconvert->Cb_b_tab; + register INT32 * Crgtab = cconvert->Cr_g_tab; + register INT32 * Cbgtab = cconvert->Cb_g_tab; + SHIFT_TEMPS + + while (--num_rows >= 0) { + inptr0 = input_buf[0][input_row]; + inptr1 = input_buf[1][input_row]; + inptr2 = input_buf[2][input_row]; + inptr3 = input_buf[3][input_row]; + input_row++; + outptr = *output_buf++; + for (col = 0; col < num_cols; col++) { + y = GETJSAMPLE(inptr0[col]); + cb = GETJSAMPLE(inptr1[col]); + cr = GETJSAMPLE(inptr2[col]); + /* Range-limiting is essential due to noise introduced by DCT losses. */ + outptr[0] = range_limit[MAXJSAMPLE - (y + Crrtab[cr])]; /* red */ + outptr[1] = range_limit[MAXJSAMPLE - (y + /* green */ + ((int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], + SCALEBITS)))]; + outptr[2] = range_limit[MAXJSAMPLE - (y + Cbbtab[cb])]; /* blue */ + /* K passes through unchanged */ + outptr[3] = inptr3[col]; /* don't need GETJSAMPLE here */ + outptr += 4; + } + } +} + + +/* + * Empty method for start_pass. + */ + +METHODDEF(void) +start_pass_dcolor (j_decompress_ptr cinfo) +{ + /* no work needed */ +} + + +/* + * Module initialization routine for output colorspace conversion. + */ + +GLOBAL(void) +jinit_color_deconverter (j_decompress_ptr cinfo) +{ + my_cconvert_ptr cconvert; + int ci; + + cconvert = (my_cconvert_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_color_deconverter)); + cinfo->cconvert = (struct jpeg_color_deconverter *) cconvert; + cconvert->pub.start_pass = start_pass_dcolor; + + /* Make sure num_components agrees with jpeg_color_space */ + switch (cinfo->jpeg_color_space) { + case JCS_GRAYSCALE: + if (cinfo->num_components != 1) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + break; + + case JCS_RGB: + case JCS_YCbCr: + if (cinfo->num_components != 3) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + break; + + case JCS_CMYK: + case JCS_YCCK: + if (cinfo->num_components != 4) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + break; + + default: /* JCS_UNKNOWN can be anything */ + if (cinfo->num_components < 1) + ERREXIT(cinfo, JERR_BAD_J_COLORSPACE); + break; + } + + /* Set out_color_components and conversion method based on requested space. + * Also clear the component_needed flags for any unused components, + * so that earlier pipeline stages can avoid useless computation. + */ + + switch (cinfo->out_color_space) { + case JCS_GRAYSCALE: + cinfo->out_color_components = 1; + if (cinfo->jpeg_color_space == JCS_GRAYSCALE || + cinfo->jpeg_color_space == JCS_YCbCr) { + cconvert->pub.color_convert = grayscale_convert; + /* For color->grayscale conversion, only the Y (0) component is needed */ + for (ci = 1; ci < cinfo->num_components; ci++) + cinfo->comp_info[ci].component_needed = FALSE; + } else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_RGB: + cinfo->out_color_components = RGB_PIXELSIZE; + if (cinfo->jpeg_color_space == JCS_YCbCr) { + cconvert->pub.color_convert = ycc_rgb_convert; + build_ycc_rgb_table(cinfo); + } else if (cinfo->jpeg_color_space == JCS_RGB && RGB_PIXELSIZE == 3) { + cconvert->pub.color_convert = null_convert; + } else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + case JCS_CMYK: + cinfo->out_color_components = 4; + if (cinfo->jpeg_color_space == JCS_YCCK) { + cconvert->pub.color_convert = ycck_cmyk_convert; + build_ycc_rgb_table(cinfo); + } else if (cinfo->jpeg_color_space == JCS_CMYK) { + cconvert->pub.color_convert = null_convert; + } else + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + + default: + /* Permit null conversion to same output space */ + if (cinfo->out_color_space == cinfo->jpeg_color_space) { + cinfo->out_color_components = cinfo->num_components; + cconvert->pub.color_convert = null_convert; + } else /* unsupported non-null conversion */ + ERREXIT(cinfo, JERR_CONVERSION_NOTIMPL); + break; + } + + if (cinfo->quantize_colors) + cinfo->output_components = 1; /* single colormapped output component */ + else + cinfo->output_components = cinfo->out_color_components; +} diff --git a/windows_libs/jpeg-6a/jdct.h b/windows_libs/jpeg-6a/jdct.h new file mode 100644 index 00000000..04192a26 --- /dev/null +++ b/windows_libs/jpeg-6a/jdct.h @@ -0,0 +1,176 @@ +/* + * jdct.h + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This include file contains common declarations for the forward and + * inverse DCT modules. These declarations are private to the DCT managers + * (jcdctmgr.c, jddctmgr.c) and the individual DCT algorithms. + * The individual DCT algorithms are kept in separate files to ease + * machine-dependent tuning (e.g., assembly coding). + */ + + +/* + * A forward DCT routine is given a pointer to a work area of type DCTELEM[]; + * the DCT is to be performed in-place in that buffer. Type DCTELEM is int + * for 8-bit samples, INT32 for 12-bit samples. (NOTE: Floating-point DCT + * implementations use an array of type FAST_FLOAT, instead.) + * The DCT inputs are expected to be signed (range +-CENTERJSAMPLE). + * The DCT outputs are returned scaled up by a factor of 8; they therefore + * have a range of +-8K for 8-bit data, +-128K for 12-bit data. This + * convention improves accuracy in integer implementations and saves some + * work in floating-point ones. + * Quantization of the output coefficients is done by jcdctmgr.c. + */ + +#if BITS_IN_JSAMPLE == 8 +typedef int DCTELEM; /* 16 or 32 bits is fine */ +#else +typedef INT32 DCTELEM; /* must have 32 bits */ +#endif + +typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data)); +typedef JMETHOD(void, float_DCT_method_ptr, (FAST_FLOAT * data)); + + +/* + * An inverse DCT routine is given a pointer to the input JBLOCK and a pointer + * to an output sample array. The routine must dequantize the input data as + * well as perform the IDCT; for dequantization, it uses the multiplier table + * pointed to by compptr->dct_table. The output data is to be placed into the + * sample array starting at a specified column. (Any row offset needed will + * be applied to the array pointer before it is passed to the IDCT code.) + * Note that the number of samples emitted by the IDCT routine is + * DCT_scaled_size * DCT_scaled_size. + */ + +/* typedef inverse_DCT_method_ptr is declared in jpegint.h */ + +/* + * Each IDCT routine has its own ideas about the best dct_table element type. + */ + +typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */ +#if BITS_IN_JSAMPLE == 8 +typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */ +#define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */ +#else +typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */ +#define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */ +#endif +typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */ + + +/* + * Each IDCT routine is responsible for range-limiting its results and + * converting them to unsigned form (0..MAXJSAMPLE). The raw outputs could + * be quite far out of range if the input data is corrupt, so a bulletproof + * range-limiting step is required. We use a mask-and-table-lookup method + * to do the combined operations quickly. See the comments with + * prepare_range_limit_table (in jdmaster.c) for more info. + */ + +#define IDCT_range_limit(cinfo) ((cinfo)->sample_range_limit + CENTERJSAMPLE) + +#define RANGE_MASK (MAXJSAMPLE * 4 + 3) /* 2 bits wider than legal samples */ + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_fdct_islow jFDislow +#define jpeg_fdct_ifast jFDifast +#define jpeg_fdct_float jFDfloat +#define jpeg_idct_islow jRDislow +#define jpeg_idct_ifast jRDifast +#define jpeg_idct_float jRDfloat +#define jpeg_idct_4x4 jRD4x4 +#define jpeg_idct_2x2 jRD2x2 +#define jpeg_idct_1x1 jRD1x1 +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + +/* Extern declarations for the forward and inverse DCT routines. */ + +EXTERN(void) jpeg_fdct_islow JPP((DCTELEM * data)); +EXTERN(void) jpeg_fdct_ifast JPP((DCTELEM * data)); +EXTERN(void) jpeg_fdct_float JPP((FAST_FLOAT * data)); + +EXTERN(void) jpeg_idct_islow + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_ifast + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_float + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_4x4 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_2x2 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); +EXTERN(void) jpeg_idct_1x1 + JPP((j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, JSAMPARRAY output_buf, JDIMENSION output_col)); + + +/* + * Macros for handling fixed-point arithmetic; these are used by many + * but not all of the DCT/IDCT modules. + * + * All values are expected to be of type INT32. + * Fractional constants are scaled left by CONST_BITS bits. + * CONST_BITS is defined within each module using these macros, + * and may differ from one module to the next. + */ + +#define ONE ((INT32) 1) +#define CONST_SCALE (ONE << CONST_BITS) + +/* Convert a positive real constant to an integer scaled by CONST_SCALE. + * Caution: some C compilers fail to reduce "FIX(constant)" at compile time, + * thus causing a lot of useless floating-point operations at run time. + */ + +#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5)) + +/* Descale and correctly round an INT32 value that's scaled by N bits. + * We assume RIGHT_SHIFT rounds towards minus infinity, so adding + * the fudge factor is correct for either sign of X. + */ + +#define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n) + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * This macro is used only when the two inputs will actually be no more than + * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a + * full 32x32 multiply. This provides a useful speedup on many machines. + * Unfortunately there is no way to specify a 16x16->32 multiply portably + * in C, but some C compilers will do the right thing if you provide the + * correct combination of casts. + */ + +#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ +#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const))) +#endif +#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ +#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const))) +#endif + +#ifndef MULTIPLY16C16 /* default definition */ +#define MULTIPLY16C16(var,const) ((var) * (const)) +#endif + +/* Same except both inputs are variables. */ + +#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ +#define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2))) +#endif + +#ifndef MULTIPLY16V16 /* default definition */ +#define MULTIPLY16V16(var1,var2) ((var1) * (var2)) +#endif diff --git a/windows_libs/jpeg-6a/jddctmgr.c b/windows_libs/jpeg-6a/jddctmgr.c new file mode 100644 index 00000000..bbf8d0e9 --- /dev/null +++ b/windows_libs/jpeg-6a/jddctmgr.c @@ -0,0 +1,269 @@ +/* + * jddctmgr.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the inverse-DCT management logic. + * This code selects a particular IDCT implementation to be used, + * and it performs related housekeeping chores. No code in this file + * is executed per IDCT step, only during output pass setup. + * + * Note that the IDCT routines are responsible for performing coefficient + * dequantization as well as the IDCT proper. This module sets up the + * dequantization multiplier table needed by the IDCT routine. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + + +/* + * The decompressor input side (jdinput.c) saves away the appropriate + * quantization table for each component at the start of the first scan + * involving that component. (This is necessary in order to correctly + * decode files that reuse Q-table slots.) + * When we are ready to make an output pass, the saved Q-table is converted + * to a multiplier table that will actually be used by the IDCT routine. + * The multiplier table contents are IDCT-method-dependent. To support + * application changes in IDCT method between scans, we can remake the + * multiplier tables if necessary. + * In buffered-image mode, the first output pass may occur before any data + * has been seen for some components, and thus before their Q-tables have + * been saved away. To handle this case, multiplier tables are preset + * to zeroes; the result of the IDCT will be a neutral gray level. + */ + + +/* Private subobject for this module */ + +typedef struct { + struct jpeg_inverse_dct pub; /* public fields */ + + /* This array contains the IDCT method code that each multiplier table + * is currently set up for, or -1 if it's not yet set up. + * The actual multiplier tables are pointed to by dct_table in the + * per-component comp_info structures. + */ + int cur_method[MAX_COMPONENTS]; +} my_idct_controller; + +typedef my_idct_controller * my_idct_ptr; + + +/* Allocated multiplier tables: big enough for any supported variant */ + +typedef union { + ISLOW_MULT_TYPE islow_array[DCTSIZE2]; +#ifdef DCT_IFAST_SUPPORTED + IFAST_MULT_TYPE ifast_array[DCTSIZE2]; +#endif +#ifdef DCT_FLOAT_SUPPORTED + FLOAT_MULT_TYPE float_array[DCTSIZE2]; +#endif +} multiplier_table; + + +/* The current scaled-IDCT routines require ISLOW-style multiplier tables, + * so be sure to compile that code if either ISLOW or SCALING is requested. + */ +#ifdef DCT_ISLOW_SUPPORTED +#define PROVIDE_ISLOW_TABLES +#else +#ifdef IDCT_SCALING_SUPPORTED +#define PROVIDE_ISLOW_TABLES +#endif +#endif + + +/* + * Prepare for an output pass. + * Here we select the proper IDCT routine for each component and build + * a matching multiplier table. + */ + +METHODDEF(void) +start_pass (j_decompress_ptr cinfo) +{ + my_idct_ptr idct = (my_idct_ptr) cinfo->idct; + int ci, i; + jpeg_component_info *compptr; + int method = 0; + inverse_DCT_method_ptr method_ptr = NULL; + JQUANT_TBL * qtbl; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Select the proper IDCT routine for this component's scaling */ + switch (compptr->DCT_scaled_size) { +#ifdef IDCT_SCALING_SUPPORTED + case 1: + method_ptr = jpeg_idct_1x1; + method = JDCT_ISLOW; /* jidctred uses islow-style table */ + break; + case 2: + method_ptr = jpeg_idct_2x2; + method = JDCT_ISLOW; /* jidctred uses islow-style table */ + break; + case 4: + method_ptr = jpeg_idct_4x4; + method = JDCT_ISLOW; /* jidctred uses islow-style table */ + break; +#endif + case DCTSIZE: + switch (cinfo->dct_method) { +#ifdef DCT_ISLOW_SUPPORTED + case JDCT_ISLOW: + method_ptr = jpeg_idct_islow; + method = JDCT_ISLOW; + break; +#endif +#ifdef DCT_IFAST_SUPPORTED + case JDCT_IFAST: + method_ptr = jpeg_idct_ifast; + method = JDCT_IFAST; + break; +#endif +#ifdef DCT_FLOAT_SUPPORTED + case JDCT_FLOAT: + method_ptr = jpeg_idct_float; + method = JDCT_FLOAT; + break; +#endif + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } + break; + default: + ERREXIT1(cinfo, JERR_BAD_DCTSIZE, compptr->DCT_scaled_size); + break; + } + idct->pub.inverse_DCT[ci] = method_ptr; + /* Create multiplier table from quant table. + * However, we can skip this if the component is uninteresting + * or if we already built the table. Also, if no quant table + * has yet been saved for the component, we leave the + * multiplier table all-zero; we'll be reading zeroes from the + * coefficient controller's buffer anyway. + */ + if (! compptr->component_needed || idct->cur_method[ci] == method) + continue; + qtbl = compptr->quant_table; + if (qtbl == NULL) /* happens if no data yet for component */ + continue; + idct->cur_method[ci] = method; + switch (method) { +#ifdef PROVIDE_ISLOW_TABLES + case JDCT_ISLOW: + { + /* For LL&M IDCT method, multipliers are equal to raw quantization + * coefficients, but are stored as ints to ensure access efficiency. + */ + ISLOW_MULT_TYPE * ismtbl = (ISLOW_MULT_TYPE *) compptr->dct_table; + for (i = 0; i < DCTSIZE2; i++) { + ismtbl[i] = (ISLOW_MULT_TYPE) qtbl->quantval[i]; + } + } + break; +#endif +#ifdef DCT_IFAST_SUPPORTED + case JDCT_IFAST: + { + /* For AA&N IDCT method, multipliers are equal to quantization + * coefficients scaled by scalefactor[row]*scalefactor[col], where + * scalefactor[0] = 1 + * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + * For integer operation, the multiplier table is to be scaled by + * IFAST_SCALE_BITS. + */ + IFAST_MULT_TYPE * ifmtbl = (IFAST_MULT_TYPE *) compptr->dct_table; +#define CONST_BITS 14 + static const INT16 aanscales[DCTSIZE2] = { + /* precomputed values scaled up by 14 bits */ + 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, + 22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270, + 21407, 29692, 27969, 25172, 21407, 16819, 11585, 5906, + 19266, 26722, 25172, 22654, 19266, 15137, 10426, 5315, + 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, + 12873, 17855, 16819, 15137, 12873, 10114, 6967, 3552, + 8867, 12299, 11585, 10426, 8867, 6967, 4799, 2446, + 4520, 6270, 5906, 5315, 4520, 3552, 2446, 1247 + }; + SHIFT_TEMPS + + for (i = 0; i < DCTSIZE2; i++) { + ifmtbl[i] = (IFAST_MULT_TYPE) + DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i], + (INT32) aanscales[i]), + CONST_BITS-IFAST_SCALE_BITS); + } + } + break; +#endif +#ifdef DCT_FLOAT_SUPPORTED + case JDCT_FLOAT: + { + /* For float AA&N IDCT method, multipliers are equal to quantization + * coefficients scaled by scalefactor[row]*scalefactor[col], where + * scalefactor[0] = 1 + * scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7 + */ + FLOAT_MULT_TYPE * fmtbl = (FLOAT_MULT_TYPE *) compptr->dct_table; + int row, col; + static const double aanscalefactor[DCTSIZE] = { + 1.0, 1.387039845, 1.306562965, 1.175875602, + 1.0, 0.785694958, 0.541196100, 0.275899379 + }; + + i = 0; + for (row = 0; row < DCTSIZE; row++) { + for (col = 0; col < DCTSIZE; col++) { + fmtbl[i] = (FLOAT_MULT_TYPE) + ((double) qtbl->quantval[i] * + aanscalefactor[row] * aanscalefactor[col]); + i++; + } + } + } + break; +#endif + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } + } +} + + +/* + * Initialize IDCT manager. + */ + +GLOBAL(void) +jinit_inverse_dct (j_decompress_ptr cinfo) +{ + my_idct_ptr idct; + int ci; + jpeg_component_info *compptr; + + idct = (my_idct_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_idct_controller)); + cinfo->idct = (struct jpeg_inverse_dct *) idct; + idct->pub.start_pass = start_pass; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Allocate and pre-zero a multiplier table for each component */ + compptr->dct_table = + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(multiplier_table)); + MEMZERO(compptr->dct_table, SIZEOF(multiplier_table)); + /* Mark multiplier table not yet set up for any method */ + idct->cur_method[ci] = -1; + } +} diff --git a/windows_libs/jpeg-6a/jdhuff.c b/windows_libs/jpeg-6a/jdhuff.c new file mode 100644 index 00000000..5b5544b6 --- /dev/null +++ b/windows_libs/jpeg-6a/jdhuff.c @@ -0,0 +1,574 @@ +/* + * jdhuff.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains Huffman entropy decoding routines. + * + * Much of the complexity here has to do with supporting input suspension. + * If the data source module demands suspension, we want to be able to back + * up to the start of the current MCU. To do this, we copy state variables + * into local working storage, and update them back to the permanent + * storage only upon successful completion of an MCU. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdhuff.h" /* Declarations shared with jdphuff.c */ + + +/* + * Expanded entropy decoder object for Huffman decoding. + * + * The savable_state subrecord contains fields that change within an MCU, + * but must not be updated permanently until we complete the MCU. + */ + +typedef struct { + int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ +} savable_state; + +/* This macro is to work around compilers with missing or broken + * structure assignment. You'll need to fix this code if you have + * such a compiler and you change MAX_COMPS_IN_SCAN. + */ + +#ifndef NO_STRUCT_ASSIGN +#define ASSIGN_STATE(dest,src) ((dest) = (src)) +#else +#if MAX_COMPS_IN_SCAN == 4 +#define ASSIGN_STATE(dest,src) \ + ((dest).last_dc_val[0] = (src).last_dc_val[0], \ + (dest).last_dc_val[1] = (src).last_dc_val[1], \ + (dest).last_dc_val[2] = (src).last_dc_val[2], \ + (dest).last_dc_val[3] = (src).last_dc_val[3]) +#endif +#endif + + +typedef struct { + struct jpeg_entropy_decoder pub; /* public fields */ + + /* These fields are loaded into local variables at start of each MCU. + * In case of suspension, we exit WITHOUT updating them. + */ + bitread_perm_state bitstate; /* Bit buffer at start of MCU */ + savable_state saved; /* Other state at start of MCU */ + + /* These fields are NOT loaded into local working state. */ + unsigned int restarts_to_go; /* MCUs left in this restart interval */ + + /* Pointers to derived tables (these workspaces have image lifespan) */ + d_derived_tbl * dc_derived_tbls[NUM_HUFF_TBLS]; + d_derived_tbl * ac_derived_tbls[NUM_HUFF_TBLS]; +} huff_entropy_decoder; + +typedef huff_entropy_decoder * huff_entropy_ptr; + + +/* + * Initialize for a Huffman-compressed scan. + */ + +METHODDEF(void) +start_pass_huff_decoder (j_decompress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int ci, dctbl, actbl; + jpeg_component_info * compptr; + + /* Check that the scan parameters Ss, Se, Ah/Al are OK for sequential JPEG. + * This ought to be an error condition, but we make it a warning because + * there are some baseline files out there with all zeroes in these bytes. + */ + if (cinfo->Ss != 0 || cinfo->Se != DCTSIZE2-1 || + cinfo->Ah != 0 || cinfo->Al != 0) + WARNMS(cinfo, JWRN_NOT_SEQUENTIAL); + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + dctbl = compptr->dc_tbl_no; + actbl = compptr->ac_tbl_no; + /* Make sure requested tables are present */ + if (dctbl < 0 || dctbl >= NUM_HUFF_TBLS || + cinfo->dc_huff_tbl_ptrs[dctbl] == NULL) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, dctbl); + if (actbl < 0 || actbl >= NUM_HUFF_TBLS || + cinfo->ac_huff_tbl_ptrs[actbl] == NULL) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, actbl); + /* Compute derived values for Huffman tables */ + /* We may do this more than once for a table, but it's not expensive */ + jpeg_make_d_derived_tbl(cinfo, cinfo->dc_huff_tbl_ptrs[dctbl], + & entropy->dc_derived_tbls[dctbl]); + jpeg_make_d_derived_tbl(cinfo, cinfo->ac_huff_tbl_ptrs[actbl], + & entropy->ac_derived_tbls[actbl]); + /* Initialize DC predictions to 0 */ + entropy->saved.last_dc_val[ci] = 0; + } + + /* Initialize bitread state variables */ + entropy->bitstate.bits_left = 0; + entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */ + entropy->bitstate.printed_eod = FALSE; + + /* Initialize restart counter */ + entropy->restarts_to_go = cinfo->restart_interval; +} + + +/* + * Compute the derived values for a Huffman table. + * Note this is also used by jdphuff.c. + */ + +GLOBAL(void) +jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, JHUFF_TBL * htbl, + d_derived_tbl ** pdtbl) +{ + d_derived_tbl *dtbl; + int p, i, l, si; + int lookbits, ctr; + char huffsize[257]; + unsigned int huffcode[257]; + unsigned int code; + + /* Allocate a workspace if we haven't already done so. */ + if (*pdtbl == NULL) + *pdtbl = (d_derived_tbl *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(d_derived_tbl)); + dtbl = *pdtbl; + dtbl->pub = htbl; /* fill in back link */ + + /* Figure C.1: make table of Huffman code length for each symbol */ + /* Note that this is in code-length order. */ + + p = 0; + for (l = 1; l <= 16; l++) { + for (i = 1; i <= (int) htbl->bits[l]; i++) + huffsize[p++] = (char) l; + } + huffsize[p] = 0; + + /* Figure C.2: generate the codes themselves */ + /* Note that this is in code-length order. */ + + code = 0; + si = huffsize[0]; + p = 0; + while (huffsize[p]) { + while (((int) huffsize[p]) == si) { + huffcode[p++] = code; + code++; + } + code <<= 1; + si++; + } + + /* Figure F.15: generate decoding tables for bit-sequential decoding */ + + p = 0; + for (l = 1; l <= 16; l++) { + if (htbl->bits[l]) { + dtbl->valptr[l] = p; /* huffval[] index of 1st symbol of code length l */ + dtbl->mincode[l] = huffcode[p]; /* minimum code of length l */ + p += htbl->bits[l]; + dtbl->maxcode[l] = huffcode[p-1]; /* maximum code of length l */ + } else { + dtbl->maxcode[l] = -1; /* -1 if no codes of this length */ + } + } + dtbl->maxcode[17] = 0xFFFFFL; /* ensures jpeg_huff_decode terminates */ + + /* Compute lookahead tables to speed up decoding. + * First we set all the table entries to 0, indicating "too long"; + * then we iterate through the Huffman codes that are short enough and + * fill in all the entries that correspond to bit sequences starting + * with that code. + */ + + MEMZERO(dtbl->look_nbits, SIZEOF(dtbl->look_nbits)); + + p = 0; + for (l = 1; l <= HUFF_LOOKAHEAD; l++) { + for (i = 1; i <= (int) htbl->bits[l]; i++, p++) { + /* l = current code's length, p = its index in huffcode[] & huffval[]. */ + /* Generate left-justified code followed by all possible bit sequences */ + lookbits = huffcode[p] << (HUFF_LOOKAHEAD-l); + for (ctr = 1 << (HUFF_LOOKAHEAD-l); ctr > 0; ctr--) { + dtbl->look_nbits[lookbits] = l; + dtbl->look_sym[lookbits] = htbl->huffval[p]; + lookbits++; + } + } + } +} + + +/* + * Out-of-line code for bit fetching (shared with jdphuff.c). + * See jdhuff.h for info about usage. + * Note: current values of get_buffer and bits_left are passed as parameters, + * but are returned in the corresponding fields of the state struct. + * + * On most machines MIN_GET_BITS should be 25 to allow the full 32-bit width + * of get_buffer to be used. (On machines with wider words, an even larger + * buffer could be used.) However, on some machines 32-bit shifts are + * quite slow and take time proportional to the number of places shifted. + * (This is true with most PC compilers, for instance.) In this case it may + * be a win to set MIN_GET_BITS to the minimum value of 15. This reduces the + * average shift distance at the cost of more calls to jpeg_fill_bit_buffer. + */ + +#ifdef SLOW_SHIFT_32 +#define MIN_GET_BITS 15 /* minimum allowable value */ +#else +#define MIN_GET_BITS (BIT_BUF_SIZE-7) +#endif + + +GLOBAL(boolean) +jpeg_fill_bit_buffer (bitread_working_state * state, + register bit_buf_type get_buffer, register int bits_left, + int nbits) +/* Load up the bit buffer to a depth of at least nbits */ +{ + /* Copy heavily used state fields into locals (hopefully registers) */ + register const JOCTET * next_input_byte = state->next_input_byte; + register size_t bytes_in_buffer = state->bytes_in_buffer; + register int c; + + /* Attempt to load at least MIN_GET_BITS bits into get_buffer. */ + /* (It is assumed that no request will be for more than that many bits.) */ + + while (bits_left < MIN_GET_BITS) { + /* Attempt to read a byte */ + if (state->unread_marker != 0) + goto no_more_data; /* can't advance past a marker */ + + if (bytes_in_buffer == 0) { + if (! (*state->cinfo->src->fill_input_buffer) (state->cinfo)) + return FALSE; + next_input_byte = state->cinfo->src->next_input_byte; + bytes_in_buffer = state->cinfo->src->bytes_in_buffer; + } + bytes_in_buffer--; + c = GETJOCTET(*next_input_byte++); + + /* If it's 0xFF, check and discard stuffed zero byte */ + if (c == 0xFF) { + do { + if (bytes_in_buffer == 0) { + if (! (*state->cinfo->src->fill_input_buffer) (state->cinfo)) + return FALSE; + next_input_byte = state->cinfo->src->next_input_byte; + bytes_in_buffer = state->cinfo->src->bytes_in_buffer; + } + bytes_in_buffer--; + c = GETJOCTET(*next_input_byte++); + } while (c == 0xFF); + + if (c == 0) { + /* Found FF/00, which represents an FF data byte */ + c = 0xFF; + } else { + /* Oops, it's actually a marker indicating end of compressed data. */ + /* Better put it back for use later */ + state->unread_marker = c; + + no_more_data: + /* There should be enough bits still left in the data segment; */ + /* if so, just break out of the outer while loop. */ + if (bits_left >= nbits) + break; + /* Uh-oh. Report corrupted data to user and stuff zeroes into + * the data stream, so that we can produce some kind of image. + * Note that this code will be repeated for each byte demanded + * for the rest of the segment. We use a nonvolatile flag to ensure + * that only one warning message appears. + */ + if (! *(state->printed_eod_ptr)) { + WARNMS(state->cinfo, JWRN_HIT_MARKER); + *(state->printed_eod_ptr) = TRUE; + } + c = 0; /* insert a zero byte into bit buffer */ + } + } + + /* OK, load c into get_buffer */ + get_buffer = (get_buffer << 8) | c; + bits_left += 8; + } + + /* Unload the local registers */ + state->next_input_byte = next_input_byte; + state->bytes_in_buffer = bytes_in_buffer; + state->get_buffer = get_buffer; + state->bits_left = bits_left; + + return TRUE; +} + + +/* + * Out-of-line code for Huffman code decoding. + * See jdhuff.h for info about usage. + */ + +GLOBAL(int) +jpeg_huff_decode (bitread_working_state * state, + register bit_buf_type get_buffer, register int bits_left, + d_derived_tbl * htbl, int min_bits) +{ + register int l = min_bits; + register INT32 code; + + /* HUFF_DECODE has determined that the code is at least min_bits */ + /* bits long, so fetch that many bits in one swoop. */ + + CHECK_BIT_BUFFER(*state, l, return -1); + code = GET_BITS(l); + + /* Collect the rest of the Huffman code one bit at a time. */ + /* This is per Figure F.16 in the JPEG spec. */ + + while (code > htbl->maxcode[l]) { + code <<= 1; + CHECK_BIT_BUFFER(*state, 1, return -1); + code |= GET_BITS(1); + l++; + } + + /* Unload the local registers */ + state->get_buffer = get_buffer; + state->bits_left = bits_left; + + /* With garbage input we may reach the sentinel value l = 17. */ + + if (l > 16) { + WARNMS(state->cinfo, JWRN_HUFF_BAD_CODE); + return 0; /* fake a zero as the safest result */ + } + + return htbl->pub->huffval[ htbl->valptr[l] + + ((int) (code - htbl->mincode[l])) ]; +} + + +/* + * Figure F.12: extend sign bit. + * On some machines, a shift and add will be faster than a table lookup. + */ + +#ifdef AVOID_TABLES + +#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x)) + +#else + +#define HUFF_EXTEND(x,s) ((x) < extend_test[s] ? (x) + extend_offset[s] : (x)) + +static const int extend_test[16] = /* entry n is 2**(n-1) */ + { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, + 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 }; + +static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */ + { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1, + ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1, + ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1, + ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 }; + +#endif /* AVOID_TABLES */ + + +/* + * Check for a restart marker & resynchronize decoder. + * Returns FALSE if must suspend. + */ + +LOCAL(boolean) +process_restart (j_decompress_ptr cinfo) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + int ci; + + /* Throw away any unused bits remaining in bit buffer; */ + /* include any full bytes in next_marker's count of discarded bytes */ + cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8; + entropy->bitstate.bits_left = 0; + + /* Advance past the RSTn marker */ + if (! (*cinfo->marker->read_restart_marker) (cinfo)) + return FALSE; + + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) + entropy->saved.last_dc_val[ci] = 0; + + /* Reset restart counter */ + entropy->restarts_to_go = cinfo->restart_interval; + + /* Next segment can get another out-of-data warning */ + entropy->bitstate.printed_eod = FALSE; + + return TRUE; +} + + +/* + * Decode and return one MCU's worth of Huffman-compressed coefficients. + * The coefficients are reordered from zigzag order into natural array order, + * but are not dequantized. + * + * The i'th block of the MCU is stored into the block pointed to by + * MCU_data[i]. WE ASSUME THIS AREA HAS BEEN ZEROED BY THE CALLER. + * (Wholesale zeroing is usually a little faster than retail...) + * + * Returns FALSE if data source requested suspension. In that case no + * changes have been made to permanent state. (Exception: some output + * coefficients may already have been assigned. This is harmless for + * this module, since we'll just re-assign them on the next call.) + */ + +METHODDEF(boolean) +decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +{ + huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; + register int s, k, r; + int blkn, ci; + JBLOCKROW block; + BITREAD_STATE_VARS; + savable_state state; + d_derived_tbl * dctbl; + d_derived_tbl * actbl; + jpeg_component_info * compptr; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo,entropy->bitstate); + ASSIGN_STATE(state, entropy->saved); + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + dctbl = entropy->dc_derived_tbls[compptr->dc_tbl_no]; + actbl = entropy->ac_derived_tbls[compptr->ac_tbl_no]; + + /* Decode a single block's worth of coefficients */ + + /* Section F.2.2.1: decode the DC coefficient difference */ + HUFF_DECODE(s, br_state, dctbl, return FALSE, label1); + if (s) { + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + } + + /* Shortcut if component's values are not interesting */ + if (! compptr->component_needed) + goto skip_ACs; + + /* Convert DC difference to actual value, update last_dc_val */ + s += state.last_dc_val[ci]; + state.last_dc_val[ci] = s; + /* Output the DC coefficient (assumes jpeg_natural_order[0] = 0) */ + (*block)[0] = (JCOEF) s; + + /* Do we need to decode the AC coefficients for this component? */ + if (compptr->DCT_scaled_size > 1) { + + /* Section F.2.2.2: decode the AC coefficients */ + /* Since zeroes are skipped, output area must be cleared beforehand */ + for (k = 1; k < DCTSIZE2; k++) { + HUFF_DECODE(s, br_state, actbl, return FALSE, label2); + + r = s >> 4; + s &= 15; + + if (s) { + k += r; + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + /* Output coefficient in natural (dezigzagged) order. + * Note: the extra entries in jpeg_natural_order[] will save us + * if k >= DCTSIZE2, which could happen if the data is corrupted. + */ + (*block)[jpeg_natural_order[k]] = (JCOEF) s; + } else { + if (r != 15) + break; + k += 15; + } + } + + } else { +skip_ACs: + + /* Section F.2.2.2: decode the AC coefficients */ + /* In this path we just discard the values */ + for (k = 1; k < DCTSIZE2; k++) { + HUFF_DECODE(s, br_state, actbl, return FALSE, label3); + + r = s >> 4; + s &= 15; + + if (s) { + k += r; + CHECK_BIT_BUFFER(br_state, s, return FALSE); + DROP_BITS(s); + } else { + if (r != 15) + break; + k += 15; + } + } + + } + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo,entropy->bitstate); + ASSIGN_STATE(entropy->saved, state); + + /* Account for restart interval (no-op if not using restarts) */ + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * Module initialization routine for Huffman entropy decoding. + */ + +GLOBAL(void) +jinit_huff_decoder (j_decompress_ptr cinfo) +{ + huff_entropy_ptr entropy; + int i; + + entropy = (huff_entropy_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(huff_entropy_decoder)); + cinfo->entropy = (struct jpeg_entropy_decoder *) entropy; + entropy->pub.start_pass = start_pass_huff_decoder; + entropy->pub.decode_mcu = decode_mcu; + + /* Mark tables unallocated */ + for (i = 0; i < NUM_HUFF_TBLS; i++) { + entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; + } +} diff --git a/windows_libs/jpeg-6a/jdhuff.h b/windows_libs/jpeg-6a/jdhuff.h new file mode 100644 index 00000000..bcc3ab12 --- /dev/null +++ b/windows_libs/jpeg-6a/jdhuff.h @@ -0,0 +1,202 @@ +/* + * jdhuff.h + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains declarations for Huffman entropy decoding routines + * that are shared between the sequential decoder (jdhuff.c) and the + * progressive decoder (jdphuff.c). No other modules need to see these. + */ + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_make_d_derived_tbl jMkDDerived +#define jpeg_fill_bit_buffer jFilBitBuf +#define jpeg_huff_decode jHufDecode +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* Derived data constructed for each Huffman table */ + +#define HUFF_LOOKAHEAD 8 /* # of bits of lookahead */ + +typedef struct { + /* Basic tables: (element [0] of each array is unused) */ + INT32 mincode[17]; /* smallest code of length k */ + INT32 maxcode[18]; /* largest code of length k (-1 if none) */ + /* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */ + int valptr[17]; /* huffval[] index of 1st symbol of length k */ + + /* Link to public Huffman table (needed only in jpeg_huff_decode) */ + JHUFF_TBL *pub; + + /* Lookahead tables: indexed by the next HUFF_LOOKAHEAD bits of + * the input data stream. If the next Huffman code is no more + * than HUFF_LOOKAHEAD bits long, we can obtain its length and + * the corresponding symbol directly from these tables. + */ + int look_nbits[1< 32 bits on your machine, and shifting/masking longs is + * reasonably fast, making bit_buf_type be long and setting BIT_BUF_SIZE + * appropriately should be a win. Unfortunately we can't do this with + * something like #define BIT_BUF_SIZE (sizeof(bit_buf_type)*8) + * because not all machines measure sizeof in 8-bit bytes. + */ + +typedef struct { /* Bitreading state saved across MCUs */ + bit_buf_type get_buffer; /* current bit-extraction buffer */ + int bits_left; /* # of unused bits in it */ + boolean printed_eod; /* flag to suppress multiple warning msgs */ +} bitread_perm_state; + +typedef struct { /* Bitreading working state within an MCU */ + /* current data source state */ + const JOCTET * next_input_byte; /* => next byte to read from source */ + size_t bytes_in_buffer; /* # of bytes remaining in source buffer */ + int unread_marker; /* nonzero if we have hit a marker */ + /* bit input buffer --- note these values are kept in register variables, + * not in this struct, inside the inner loops. + */ + bit_buf_type get_buffer; /* current bit-extraction buffer */ + int bits_left; /* # of unused bits in it */ + /* pointers needed by jpeg_fill_bit_buffer */ + j_decompress_ptr cinfo; /* back link to decompress master record */ + boolean * printed_eod_ptr; /* => flag in permanent state */ +} bitread_working_state; + +/* Macros to declare and load/save bitread local variables. */ +#define BITREAD_STATE_VARS \ + register bit_buf_type get_buffer; \ + register int bits_left; \ + bitread_working_state br_state + +#define BITREAD_LOAD_STATE(cinfop,permstate) \ + br_state.cinfo = cinfop; \ + br_state.next_input_byte = cinfop->src->next_input_byte; \ + br_state.bytes_in_buffer = cinfop->src->bytes_in_buffer; \ + br_state.unread_marker = cinfop->unread_marker; \ + get_buffer = permstate.get_buffer; \ + bits_left = permstate.bits_left; \ + br_state.printed_eod_ptr = & permstate.printed_eod + +#define BITREAD_SAVE_STATE(cinfop,permstate) \ + cinfop->src->next_input_byte = br_state.next_input_byte; \ + cinfop->src->bytes_in_buffer = br_state.bytes_in_buffer; \ + cinfop->unread_marker = br_state.unread_marker; \ + permstate.get_buffer = get_buffer; \ + permstate.bits_left = bits_left + +/* + * These macros provide the in-line portion of bit fetching. + * Use CHECK_BIT_BUFFER to ensure there are N bits in get_buffer + * before using GET_BITS, PEEK_BITS, or DROP_BITS. + * The variables get_buffer and bits_left are assumed to be locals, + * but the state struct might not be (jpeg_huff_decode needs this). + * CHECK_BIT_BUFFER(state,n,action); + * Ensure there are N bits in get_buffer; if suspend, take action. + * val = GET_BITS(n); + * Fetch next N bits. + * val = PEEK_BITS(n); + * Fetch next N bits without removing them from the buffer. + * DROP_BITS(n); + * Discard next N bits. + * The value N should be a simple variable, not an expression, because it + * is evaluated multiple times. + */ + +#define CHECK_BIT_BUFFER(state,nbits,action) \ + { if (bits_left < (nbits)) { \ + if (! jpeg_fill_bit_buffer(&(state),get_buffer,bits_left,nbits)) \ + { action; } \ + get_buffer = (state).get_buffer; bits_left = (state).bits_left; } } + +#define GET_BITS(nbits) \ + (((int) (get_buffer >> (bits_left -= (nbits)))) & ((1<<(nbits))-1)) + +#define PEEK_BITS(nbits) \ + (((int) (get_buffer >> (bits_left - (nbits)))) & ((1<<(nbits))-1)) + +#define DROP_BITS(nbits) \ + (bits_left -= (nbits)) + +/* Load up the bit buffer to a depth of at least nbits */ +EXTERN(boolean) jpeg_fill_bit_buffer + JPP((bitread_working_state * state, register bit_buf_type get_buffer, + register int bits_left, int nbits)); + + +/* + * Code for extracting next Huffman-coded symbol from input bit stream. + * Again, this is time-critical and we make the main paths be macros. + * + * We use a lookahead table to process codes of up to HUFF_LOOKAHEAD bits + * without looping. Usually, more than 95% of the Huffman codes will be 8 + * or fewer bits long. The few overlength codes are handled with a loop, + * which need not be inline code. + * + * Notes about the HUFF_DECODE macro: + * 1. Near the end of the data segment, we may fail to get enough bits + * for a lookahead. In that case, we do it the hard way. + * 2. If the lookahead table contains no entry, the next code must be + * more than HUFF_LOOKAHEAD bits long. + * 3. jpeg_huff_decode returns -1 if forced to suspend. + */ + +#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \ +{ register int nb, look; \ + if (bits_left < HUFF_LOOKAHEAD) { \ + if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \ + get_buffer = state.get_buffer; bits_left = state.bits_left; \ + if (bits_left < HUFF_LOOKAHEAD) { \ + nb = 1; goto slowlabel; \ + } \ + } \ + look = PEEK_BITS(HUFF_LOOKAHEAD); \ + if ((nb = htbl->look_nbits[look]) != 0) { \ + DROP_BITS(nb); \ + result = htbl->look_sym[look]; \ + } else { \ + nb = HUFF_LOOKAHEAD+1; \ +slowlabel: \ + if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \ + { failaction; } \ + get_buffer = state.get_buffer; bits_left = state.bits_left; \ + } \ +} + +/* Out-of-line case for Huffman code fetching */ +EXTERN(int) jpeg_huff_decode + JPP((bitread_working_state * state, register bit_buf_type get_buffer, + register int bits_left, d_derived_tbl * htbl, int min_bits)); diff --git a/windows_libs/jpeg-6a/jdinput.c b/windows_libs/jpeg-6a/jdinput.c new file mode 100644 index 00000000..a8565c50 --- /dev/null +++ b/windows_libs/jpeg-6a/jdinput.c @@ -0,0 +1,381 @@ +/* + * jdinput.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains input control logic for the JPEG decompressor. + * These routines are concerned with controlling the decompressor's input + * processing (marker reading and coefficient decoding). The actual input + * reading is done in jdmarker.c, jdhuff.c, and jdphuff.c. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private state */ + +typedef struct { + struct jpeg_input_controller pub; /* public fields */ + + boolean inheaders; /* TRUE until first SOS is reached */ +} my_input_controller; + +typedef my_input_controller * my_inputctl_ptr; + + +/* Forward declarations */ +METHODDEF(int) consume_markers JPP((j_decompress_ptr cinfo)); + + +/* + * Routines to calculate various quantities related to the size of the image. + */ + +LOCAL(void) +initial_setup (j_decompress_ptr cinfo) +/* Called once, when first SOS marker is reached */ +{ + int ci; + jpeg_component_info *compptr; + + /* Make sure image isn't bigger than I can handle */ + if ((long) cinfo->image_height > (long) JPEG_MAX_DIMENSION || + (long) cinfo->image_width > (long) JPEG_MAX_DIMENSION) + ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION); + + /* For now, precision must match compiled-in value... */ + if (cinfo->data_precision != BITS_IN_JSAMPLE) + ERREXIT1(cinfo, JERR_BAD_PRECISION, cinfo->data_precision); + + /* Check that number of components won't exceed internal array sizes */ + if (cinfo->num_components > MAX_COMPONENTS) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->num_components, + MAX_COMPONENTS); + + /* Compute maximum sampling factors; check factor validity */ + cinfo->max_h_samp_factor = 1; + cinfo->max_v_samp_factor = 1; + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (compptr->h_samp_factor<=0 || compptr->h_samp_factor>MAX_SAMP_FACTOR || + compptr->v_samp_factor<=0 || compptr->v_samp_factor>MAX_SAMP_FACTOR) + ERREXIT(cinfo, JERR_BAD_SAMPLING); + cinfo->max_h_samp_factor = MAX(cinfo->max_h_samp_factor, + compptr->h_samp_factor); + cinfo->max_v_samp_factor = MAX(cinfo->max_v_samp_factor, + compptr->v_samp_factor); + } + + /* We initialize DCT_scaled_size and min_DCT_scaled_size to DCTSIZE. + * In the full decompressor, this will be overridden by jdmaster.c; + * but in the transcoder, jdmaster.c is not used, so we must do it here. + */ + cinfo->min_DCT_scaled_size = DCTSIZE; + + /* Compute dimensions of components */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + compptr->DCT_scaled_size = DCTSIZE; + /* Size in DCT blocks */ + compptr->width_in_blocks = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, + (long) (cinfo->max_h_samp_factor * DCTSIZE)); + compptr->height_in_blocks = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, + (long) (cinfo->max_v_samp_factor * DCTSIZE)); + /* downsampled_width and downsampled_height will also be overridden by + * jdmaster.c if we are doing full decompression. The transcoder library + * doesn't use these values, but the calling application might. + */ + /* Size in samples */ + compptr->downsampled_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor, + (long) cinfo->max_h_samp_factor); + compptr->downsampled_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * (long) compptr->v_samp_factor, + (long) cinfo->max_v_samp_factor); + /* Mark component needed, until color conversion says otherwise */ + compptr->component_needed = TRUE; + /* Mark no quantization table yet saved for component */ + compptr->quant_table = NULL; + } + + /* Compute number of fully interleaved MCU rows. */ + cinfo->total_iMCU_rows = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, + (long) (cinfo->max_v_samp_factor*DCTSIZE)); + + /* Decide whether file contains multiple scans */ + if (cinfo->comps_in_scan < cinfo->num_components || cinfo->progressive_mode) + cinfo->inputctl->has_multiple_scans = TRUE; + else + cinfo->inputctl->has_multiple_scans = FALSE; +} + + +LOCAL(void) +per_scan_setup (j_decompress_ptr cinfo) +/* Do computations that are needed before processing a JPEG scan */ +/* cinfo->comps_in_scan and cinfo->cur_comp_info[] were set from SOS marker */ +{ + int ci, mcublks, tmp; + jpeg_component_info *compptr; + + if (cinfo->comps_in_scan == 1) { + + /* Noninterleaved (single-component) scan */ + compptr = cinfo->cur_comp_info[0]; + + /* Overall image size in MCUs */ + cinfo->MCUs_per_row = compptr->width_in_blocks; + cinfo->MCU_rows_in_scan = compptr->height_in_blocks; + + /* For noninterleaved scan, always one block per MCU */ + compptr->MCU_width = 1; + compptr->MCU_height = 1; + compptr->MCU_blocks = 1; + compptr->MCU_sample_width = compptr->DCT_scaled_size; + compptr->last_col_width = 1; + /* For noninterleaved scans, it is convenient to define last_row_height + * as the number of block rows present in the last iMCU row. + */ + tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor); + if (tmp == 0) tmp = compptr->v_samp_factor; + compptr->last_row_height = tmp; + + /* Prepare array describing MCU composition */ + cinfo->blocks_in_MCU = 1; + cinfo->MCU_membership[0] = 0; + + } else { + + /* Interleaved (multi-component) scan */ + if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN) + ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan, + MAX_COMPS_IN_SCAN); + + /* Overall image size in MCUs */ + cinfo->MCUs_per_row = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, + (long) (cinfo->max_h_samp_factor*DCTSIZE)); + cinfo->MCU_rows_in_scan = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, + (long) (cinfo->max_v_samp_factor*DCTSIZE)); + + cinfo->blocks_in_MCU = 0; + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Sampling factors give # of blocks of component in each MCU */ + compptr->MCU_width = compptr->h_samp_factor; + compptr->MCU_height = compptr->v_samp_factor; + compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height; + compptr->MCU_sample_width = compptr->MCU_width * compptr->DCT_scaled_size; + /* Figure number of non-dummy blocks in last MCU column & row */ + tmp = (int) (compptr->width_in_blocks % compptr->MCU_width); + if (tmp == 0) tmp = compptr->MCU_width; + compptr->last_col_width = tmp; + tmp = (int) (compptr->height_in_blocks % compptr->MCU_height); + if (tmp == 0) tmp = compptr->MCU_height; + compptr->last_row_height = tmp; + /* Prepare array describing MCU composition */ + mcublks = compptr->MCU_blocks; + if (cinfo->blocks_in_MCU + mcublks > D_MAX_BLOCKS_IN_MCU) + ERREXIT(cinfo, JERR_BAD_MCU_SIZE); + while (mcublks-- > 0) { + cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci; + } + } + + } +} + + +/* + * Save away a copy of the Q-table referenced by each component present + * in the current scan, unless already saved during a prior scan. + * + * In a multiple-scan JPEG file, the encoder could assign different components + * the same Q-table slot number, but change table definitions between scans + * so that each component uses a different Q-table. (The IJG encoder is not + * currently capable of doing this, but other encoders might.) Since we want + * to be able to dequantize all the components at the end of the file, this + * means that we have to save away the table actually used for each component. + * We do this by copying the table at the start of the first scan containing + * the component. + * The JPEG spec prohibits the encoder from changing the contents of a Q-table + * slot between scans of a component using that slot. If the encoder does so + * anyway, this decoder will simply use the Q-table values that were current + * at the start of the first scan for the component. + * + * The decompressor output side looks only at the saved quant tables, + * not at the current Q-table slots. + */ + +LOCAL(void) +latch_quant_tables (j_decompress_ptr cinfo) +{ + int ci, qtblno; + jpeg_component_info *compptr; + JQUANT_TBL * qtbl; + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* No work if we already saved Q-table for this component */ + if (compptr->quant_table != NULL) + continue; + /* Make sure specified quantization table is present */ + qtblno = compptr->quant_tbl_no; + if (qtblno < 0 || qtblno >= NUM_QUANT_TBLS || + cinfo->quant_tbl_ptrs[qtblno] == NULL) + ERREXIT1(cinfo, JERR_NO_QUANT_TABLE, qtblno); + /* OK, save away the quantization table */ + qtbl = (JQUANT_TBL *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(JQUANT_TBL)); + MEMCOPY(qtbl, cinfo->quant_tbl_ptrs[qtblno], SIZEOF(JQUANT_TBL)); + compptr->quant_table = qtbl; + } +} + + +/* + * Initialize the input modules to read a scan of compressed data. + * The first call to this is done by jdmaster.c after initializing + * the entire decompressor (during jpeg_start_decompress). + * Subsequent calls come from consume_markers, below. + */ + +METHODDEF(void) +start_input_pass (j_decompress_ptr cinfo) +{ + per_scan_setup(cinfo); + latch_quant_tables(cinfo); + (*cinfo->entropy->start_pass) (cinfo); + (*cinfo->coef->start_input_pass) (cinfo); + cinfo->inputctl->consume_input = cinfo->coef->consume_data; +} + + +/* + * Finish up after inputting a compressed-data scan. + * This is called by the coefficient controller after it's read all + * the expected data of the scan. + */ + +METHODDEF(void) +finish_input_pass (j_decompress_ptr cinfo) +{ + cinfo->inputctl->consume_input = consume_markers; +} + + +/* + * Read JPEG markers before, between, or after compressed-data scans. + * Change state as necessary when a new scan is reached. + * Return value is JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. + * + * The consume_input method pointer points either here or to the + * coefficient controller's consume_data routine, depending on whether + * we are reading a compressed data segment or inter-segment markers. + */ + +METHODDEF(int) +consume_markers (j_decompress_ptr cinfo) +{ + my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl; + int val; + + if (inputctl->pub.eoi_reached) /* After hitting EOI, read no further */ + return JPEG_REACHED_EOI; + + val = (*cinfo->marker->read_markers) (cinfo); + + switch (val) { + case JPEG_REACHED_SOS: /* Found SOS */ + if (inputctl->inheaders) { /* 1st SOS */ + initial_setup(cinfo); + inputctl->inheaders = FALSE; + /* Note: start_input_pass must be called by jdmaster.c + * before any more input can be consumed. jdapi.c is + * responsible for enforcing this sequencing. + */ + } else { /* 2nd or later SOS marker */ + if (! inputctl->pub.has_multiple_scans) + ERREXIT(cinfo, JERR_EOI_EXPECTED); /* Oops, I wasn't expecting this! */ + start_input_pass(cinfo); + } + break; + case JPEG_REACHED_EOI: /* Found EOI */ + inputctl->pub.eoi_reached = TRUE; + if (inputctl->inheaders) { /* Tables-only datastream, apparently */ + if (cinfo->marker->saw_SOF) + ERREXIT(cinfo, JERR_SOF_NO_SOS); + } else { + /* Prevent infinite loop in coef ctlr's decompress_data routine + * if user set output_scan_number larger than number of scans. + */ + if (cinfo->output_scan_number > cinfo->input_scan_number) + cinfo->output_scan_number = cinfo->input_scan_number; + } + break; + case JPEG_SUSPENDED: + break; + } + + return val; +} + + +/* + * Reset state to begin a fresh datastream. + */ + +METHODDEF(void) +reset_input_controller (j_decompress_ptr cinfo) +{ + my_inputctl_ptr inputctl = (my_inputctl_ptr) cinfo->inputctl; + + inputctl->pub.consume_input = consume_markers; + inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */ + inputctl->pub.eoi_reached = FALSE; + inputctl->inheaders = TRUE; + /* Reset other modules */ + (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo); + (*cinfo->marker->reset_marker_reader) (cinfo); + /* Reset progression state -- would be cleaner if entropy decoder did this */ + cinfo->coef_bits = NULL; +} + + +/* + * Initialize the input controller module. + * This is called only once, when the decompression object is created. + */ + +GLOBAL(void) +jinit_input_controller (j_decompress_ptr cinfo) +{ + my_inputctl_ptr inputctl; + + /* Create subobject in permanent pool */ + inputctl = (my_inputctl_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + SIZEOF(my_input_controller)); + cinfo->inputctl = (struct jpeg_input_controller *) inputctl; + /* Initialize method pointers */ + inputctl->pub.consume_input = consume_markers; + inputctl->pub.reset_input_controller = reset_input_controller; + inputctl->pub.start_input_pass = start_input_pass; + inputctl->pub.finish_input_pass = finish_input_pass; + /* Initialize state: can't use reset_input_controller since we don't + * want to try to reset other modules yet. + */ + inputctl->pub.has_multiple_scans = FALSE; /* "unknown" would be better */ + inputctl->pub.eoi_reached = FALSE; + inputctl->inheaders = TRUE; +} diff --git a/windows_libs/jpeg-6a/jdmainct.c b/windows_libs/jpeg-6a/jdmainct.c new file mode 100644 index 00000000..13c956f5 --- /dev/null +++ b/windows_libs/jpeg-6a/jdmainct.c @@ -0,0 +1,512 @@ +/* + * jdmainct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the main buffer controller for decompression. + * The main buffer lies between the JPEG decompressor proper and the + * post-processor; it holds downsampled data in the JPEG colorspace. + * + * Note that this code is bypassed in raw-data mode, since the application + * supplies the equivalent of the main buffer in that case. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * In the current system design, the main buffer need never be a full-image + * buffer; any full-height buffers will be found inside the coefficient or + * postprocessing controllers. Nonetheless, the main controller is not + * trivial. Its responsibility is to provide context rows for upsampling/ + * rescaling, and doing this in an efficient fashion is a bit tricky. + * + * Postprocessor input data is counted in "row groups". A row group + * is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size) + * sample rows of each component. (We require DCT_scaled_size values to be + * chosen such that these numbers are integers. In practice DCT_scaled_size + * values will likely be powers of two, so we actually have the stronger + * condition that DCT_scaled_size / min_DCT_scaled_size is an integer.) + * Upsampling will typically produce max_v_samp_factor pixel rows from each + * row group (times any additional scale factor that the upsampler is + * applying). + * + * The coefficient controller will deliver data to us one iMCU row at a time; + * each iMCU row contains v_samp_factor * DCT_scaled_size sample rows, or + * exactly min_DCT_scaled_size row groups. (This amount of data corresponds + * to one row of MCUs when the image is fully interleaved.) Note that the + * number of sample rows varies across components, but the number of row + * groups does not. Some garbage sample rows may be included in the last iMCU + * row at the bottom of the image. + * + * Depending on the vertical scaling algorithm used, the upsampler may need + * access to the sample row(s) above and below its current input row group. + * The upsampler is required to set need_context_rows TRUE at global selection + * time if so. When need_context_rows is FALSE, this controller can simply + * obtain one iMCU row at a time from the coefficient controller and dole it + * out as row groups to the postprocessor. + * + * When need_context_rows is TRUE, this controller guarantees that the buffer + * passed to postprocessing contains at least one row group's worth of samples + * above and below the row group(s) being processed. Note that the context + * rows "above" the first passed row group appear at negative row offsets in + * the passed buffer. At the top and bottom of the image, the required + * context rows are manufactured by duplicating the first or last real sample + * row; this avoids having special cases in the upsampling inner loops. + * + * The amount of context is fixed at one row group just because that's a + * convenient number for this controller to work with. The existing + * upsamplers really only need one sample row of context. An upsampler + * supporting arbitrary output rescaling might wish for more than one row + * group of context when shrinking the image; tough, we don't handle that. + * (This is justified by the assumption that downsizing will be handled mostly + * by adjusting the DCT_scaled_size values, so that the actual scale factor at + * the upsample step needn't be much less than one.) + * + * To provide the desired context, we have to retain the last two row groups + * of one iMCU row while reading in the next iMCU row. (The last row group + * can't be processed until we have another row group for its below-context, + * and so we have to save the next-to-last group too for its above-context.) + * We could do this most simply by copying data around in our buffer, but + * that'd be very slow. We can avoid copying any data by creating a rather + * strange pointer structure. Here's how it works. We allocate a workspace + * consisting of M+2 row groups (where M = min_DCT_scaled_size is the number + * of row groups per iMCU row). We create two sets of redundant pointers to + * the workspace. Labeling the physical row groups 0 to M+1, the synthesized + * pointer lists look like this: + * M+1 M-1 + * master pointer --> 0 master pointer --> 0 + * 1 1 + * ... ... + * M-3 M-3 + * M-2 M + * M-1 M+1 + * M M-2 + * M+1 M-1 + * 0 0 + * We read alternate iMCU rows using each master pointer; thus the last two + * row groups of the previous iMCU row remain un-overwritten in the workspace. + * The pointer lists are set up so that the required context rows appear to + * be adjacent to the proper places when we pass the pointer lists to the + * upsampler. + * + * The above pictures describe the normal state of the pointer lists. + * At top and bottom of the image, we diddle the pointer lists to duplicate + * the first or last sample row as necessary (this is cheaper than copying + * sample rows around). + * + * This scheme breaks down if M < 2, ie, min_DCT_scaled_size is 1. In that + * situation each iMCU row provides only one row group so the buffering logic + * must be different (eg, we must read two iMCU rows before we can emit the + * first row group). For now, we simply do not support providing context + * rows when min_DCT_scaled_size is 1. That combination seems unlikely to + * be worth providing --- if someone wants a 1/8th-size preview, they probably + * want it quick and dirty, so a context-free upsampler is sufficient. + */ + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_d_main_controller pub; /* public fields */ + + /* Pointer to allocated workspace (M or M+2 row groups). */ + JSAMPARRAY buffer[MAX_COMPONENTS]; + + boolean buffer_full; /* Have we gotten an iMCU row from decoder? */ + JDIMENSION rowgroup_ctr; /* counts row groups output to postprocessor */ + + /* Remaining fields are only used in the context case. */ + + /* These are the master pointers to the funny-order pointer lists. */ + JSAMPIMAGE xbuffer[2]; /* pointers to weird pointer lists */ + + int whichptr; /* indicates which pointer set is now in use */ + int context_state; /* process_data state machine status */ + JDIMENSION rowgroups_avail; /* row groups available to postprocessor */ + JDIMENSION iMCU_row_ctr; /* counts iMCU rows to detect image top/bot */ +} my_main_controller; + +typedef my_main_controller * my_main_ptr; + +/* context_state values: */ +#define CTX_PREPARE_FOR_IMCU 0 /* need to prepare for MCU row */ +#define CTX_PROCESS_IMCU 1 /* feeding iMCU to postprocessor */ +#define CTX_POSTPONED_ROW 2 /* feeding postponed row group */ + + +/* Forward declarations */ +METHODDEF(void) process_data_simple_main + JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); +METHODDEF(void) process_data_context_main + JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); +#ifdef QUANT_2PASS_SUPPORTED +METHODDEF(void) process_data_crank_post + JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail)); +#endif + + +LOCAL(void) +alloc_funny_pointers (j_decompress_ptr cinfo) +/* Allocate space for the funny pointer lists. + * This is done only once, not once per pass. + */ +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + int ci, rgroup; + int M = cinfo->min_DCT_scaled_size; + jpeg_component_info *compptr; + JSAMPARRAY xbuf; + + /* Get top-level space for component array pointers. + * We alloc both arrays with one call to save a few cycles. + */ + main->xbuffer[0] = (JSAMPIMAGE) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components * 2 * SIZEOF(JSAMPARRAY)); + main->xbuffer[1] = main->xbuffer[0] + cinfo->num_components; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; /* height of a row group of component */ + /* Get space for pointer lists --- M+4 row groups in each list. + * We alloc both pointer lists with one call to save a few cycles. + */ + xbuf = (JSAMPARRAY) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + 2 * (rgroup * (M + 4)) * SIZEOF(JSAMPROW)); + xbuf += rgroup; /* want one row group at negative offsets */ + main->xbuffer[0][ci] = xbuf; + xbuf += rgroup * (M + 4); + main->xbuffer[1][ci] = xbuf; + } +} + + +LOCAL(void) +make_funny_pointers (j_decompress_ptr cinfo) +/* Create the funny pointer lists discussed in the comments above. + * The actual workspace is already allocated (in main->buffer), + * and the space for the pointer lists is allocated too. + * This routine just fills in the curiously ordered lists. + * This will be repeated at the beginning of each pass. + */ +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + int ci, i, rgroup; + int M = cinfo->min_DCT_scaled_size; + jpeg_component_info *compptr; + JSAMPARRAY buf, xbuf0, xbuf1; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; /* height of a row group of component */ + xbuf0 = main->xbuffer[0][ci]; + xbuf1 = main->xbuffer[1][ci]; + /* First copy the workspace pointers as-is */ + buf = main->buffer[ci]; + for (i = 0; i < rgroup * (M + 2); i++) { + xbuf0[i] = xbuf1[i] = buf[i]; + } + /* In the second list, put the last four row groups in swapped order */ + for (i = 0; i < rgroup * 2; i++) { + xbuf1[rgroup*(M-2) + i] = buf[rgroup*M + i]; + xbuf1[rgroup*M + i] = buf[rgroup*(M-2) + i]; + } + /* The wraparound pointers at top and bottom will be filled later + * (see set_wraparound_pointers, below). Initially we want the "above" + * pointers to duplicate the first actual data line. This only needs + * to happen in xbuffer[0]. + */ + for (i = 0; i < rgroup; i++) { + xbuf0[i - rgroup] = xbuf0[0]; + } + } +} + + +LOCAL(void) +set_wraparound_pointers (j_decompress_ptr cinfo) +/* Set up the "wraparound" pointers at top and bottom of the pointer lists. + * This changes the pointer list state from top-of-image to the normal state. + */ +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + int ci, i, rgroup; + int M = cinfo->min_DCT_scaled_size; + jpeg_component_info *compptr; + JSAMPARRAY xbuf0, xbuf1; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; /* height of a row group of component */ + xbuf0 = main->xbuffer[0][ci]; + xbuf1 = main->xbuffer[1][ci]; + for (i = 0; i < rgroup; i++) { + xbuf0[i - rgroup] = xbuf0[rgroup*(M+1) + i]; + xbuf1[i - rgroup] = xbuf1[rgroup*(M+1) + i]; + xbuf0[rgroup*(M+2) + i] = xbuf0[i]; + xbuf1[rgroup*(M+2) + i] = xbuf1[i]; + } + } +} + + +LOCAL(void) +set_bottom_pointers (j_decompress_ptr cinfo) +/* Change the pointer lists to duplicate the last sample row at the bottom + * of the image. whichptr indicates which xbuffer holds the final iMCU row. + * Also sets rowgroups_avail to indicate number of nondummy row groups in row. + */ +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + int ci, i, rgroup, iMCUheight, rows_left; + jpeg_component_info *compptr; + JSAMPARRAY xbuf; + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Count sample rows in one iMCU row and in one row group */ + iMCUheight = compptr->v_samp_factor * compptr->DCT_scaled_size; + rgroup = iMCUheight / cinfo->min_DCT_scaled_size; + /* Count nondummy sample rows remaining for this component */ + rows_left = (int) (compptr->downsampled_height % (JDIMENSION) iMCUheight); + if (rows_left == 0) rows_left = iMCUheight; + /* Count nondummy row groups. Should get same answer for each component, + * so we need only do it once. + */ + if (ci == 0) { + main->rowgroups_avail = (JDIMENSION) ((rows_left-1) / rgroup + 1); + } + /* Duplicate the last real sample row rgroup*2 times; this pads out the + * last partial rowgroup and ensures at least one full rowgroup of context. + */ + xbuf = main->xbuffer[main->whichptr][ci]; + for (i = 0; i < rgroup * 2; i++) { + xbuf[rows_left + i] = xbuf[rows_left-1]; + } + } +} + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + + switch (pass_mode) { + case JBUF_PASS_THRU: + if (cinfo->upsample->need_context_rows) { + main->pub.process_data = process_data_context_main; + make_funny_pointers(cinfo); /* Create the xbuffer[] lists */ + main->whichptr = 0; /* Read first iMCU row into xbuffer[0] */ + main->context_state = CTX_PREPARE_FOR_IMCU; + main->iMCU_row_ctr = 0; + } else { + /* Simple case with no context needed */ + main->pub.process_data = process_data_simple_main; + } + main->buffer_full = FALSE; /* Mark buffer empty */ + main->rowgroup_ctr = 0; + break; +#ifdef QUANT_2PASS_SUPPORTED + case JBUF_CRANK_DEST: + /* For last pass of 2-pass quantization, just crank the postprocessor */ + main->pub.process_data = process_data_crank_post; + break; +#endif + default: + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + break; + } +} + + +/* + * Process some data. + * This handles the simple case where no context is required. + */ + +METHODDEF(void) +process_data_simple_main (j_decompress_ptr cinfo, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + JDIMENSION rowgroups_avail; + + /* Read input data if we haven't filled the main buffer yet */ + if (! main->buffer_full) { + if (! (*cinfo->coef->decompress_data) (cinfo, main->buffer)) + return; /* suspension forced, can do nothing more */ + main->buffer_full = TRUE; /* OK, we have an iMCU row to work with */ + } + + /* There are always min_DCT_scaled_size row groups in an iMCU row. */ + rowgroups_avail = (JDIMENSION) cinfo->min_DCT_scaled_size; + /* Note: at the bottom of the image, we may pass extra garbage row groups + * to the postprocessor. The postprocessor has to check for bottom + * of image anyway (at row resolution), so no point in us doing it too. + */ + + /* Feed the postprocessor */ + (*cinfo->post->post_process_data) (cinfo, main->buffer, + &main->rowgroup_ctr, rowgroups_avail, + output_buf, out_row_ctr, out_rows_avail); + + /* Has postprocessor consumed all the data yet? If so, mark buffer empty */ + if (main->rowgroup_ctr >= rowgroups_avail) { + main->buffer_full = FALSE; + main->rowgroup_ctr = 0; + } +} + + +/* + * Process some data. + * This handles the case where context rows must be provided. + */ + +METHODDEF(void) +process_data_context_main (j_decompress_ptr cinfo, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_main_ptr main = (my_main_ptr) cinfo->main; + + /* Read input data if we haven't filled the main buffer yet */ + if (! main->buffer_full) { + if (! (*cinfo->coef->decompress_data) (cinfo, + main->xbuffer[main->whichptr])) + return; /* suspension forced, can do nothing more */ + main->buffer_full = TRUE; /* OK, we have an iMCU row to work with */ + main->iMCU_row_ctr++; /* count rows received */ + } + + /* Postprocessor typically will not swallow all the input data it is handed + * in one call (due to filling the output buffer first). Must be prepared + * to exit and restart. This switch lets us keep track of how far we got. + * Note that each case falls through to the next on successful completion. + */ + switch (main->context_state) { + case CTX_POSTPONED_ROW: + /* Call postprocessor using previously set pointers for postponed row */ + (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr], + &main->rowgroup_ctr, main->rowgroups_avail, + output_buf, out_row_ctr, out_rows_avail); + if (main->rowgroup_ctr < main->rowgroups_avail) + return; /* Need to suspend */ + main->context_state = CTX_PREPARE_FOR_IMCU; + if (*out_row_ctr >= out_rows_avail) + return; /* Postprocessor exactly filled output buf */ + /*FALLTHROUGH*/ + case CTX_PREPARE_FOR_IMCU: + /* Prepare to process first M-1 row groups of this iMCU row */ + main->rowgroup_ctr = 0; + main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size - 1); + /* Check for bottom of image: if so, tweak pointers to "duplicate" + * the last sample row, and adjust rowgroups_avail to ignore padding rows. + */ + if (main->iMCU_row_ctr == cinfo->total_iMCU_rows) + set_bottom_pointers(cinfo); + main->context_state = CTX_PROCESS_IMCU; + /*FALLTHROUGH*/ + case CTX_PROCESS_IMCU: + /* Call postprocessor using previously set pointers */ + (*cinfo->post->post_process_data) (cinfo, main->xbuffer[main->whichptr], + &main->rowgroup_ctr, main->rowgroups_avail, + output_buf, out_row_ctr, out_rows_avail); + if (main->rowgroup_ctr < main->rowgroups_avail) + return; /* Need to suspend */ + /* After the first iMCU, change wraparound pointers to normal state */ + if (main->iMCU_row_ctr == 1) + set_wraparound_pointers(cinfo); + /* Prepare to load new iMCU row using other xbuffer list */ + main->whichptr ^= 1; /* 0=>1 or 1=>0 */ + main->buffer_full = FALSE; + /* Still need to process last row group of this iMCU row, */ + /* which is saved at index M+1 of the other xbuffer */ + main->rowgroup_ctr = (JDIMENSION) (cinfo->min_DCT_scaled_size + 1); + main->rowgroups_avail = (JDIMENSION) (cinfo->min_DCT_scaled_size + 2); + main->context_state = CTX_POSTPONED_ROW; + } +} + + +/* + * Process some data. + * Final pass of two-pass quantization: just call the postprocessor. + * Source data will be the postprocessor controller's internal buffer. + */ + +#ifdef QUANT_2PASS_SUPPORTED + +METHODDEF(void) +process_data_crank_post (j_decompress_ptr cinfo, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + (*cinfo->post->post_process_data) (cinfo, (JSAMPIMAGE) NULL, + (JDIMENSION *) NULL, (JDIMENSION) 0, + output_buf, out_row_ctr, out_rows_avail); +} + +#endif /* QUANT_2PASS_SUPPORTED */ + + +/* + * Initialize main buffer controller. + */ + +GLOBAL(void) +jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer) +{ + my_main_ptr main; + int ci, rgroup, ngroups; + jpeg_component_info *compptr; + + main = (my_main_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_main_controller)); + cinfo->main = (struct jpeg_d_main_controller *) main; + main->pub.start_pass = start_pass_main; + + if (need_full_buffer) /* shouldn't happen */ + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + + /* Allocate the workspace. + * ngroups is the number of row groups we need. + */ + if (cinfo->upsample->need_context_rows) { + if (cinfo->min_DCT_scaled_size < 2) /* unsupported, see comments above */ + ERREXIT(cinfo, JERR_NOTIMPL); + alloc_funny_pointers(cinfo); /* Alloc space for xbuffer[] lists */ + ngroups = cinfo->min_DCT_scaled_size + 2; + } else { + ngroups = cinfo->min_DCT_scaled_size; + } + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + rgroup = (compptr->v_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; /* height of a row group of component */ + main->buffer[ci] = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + compptr->width_in_blocks * compptr->DCT_scaled_size, + (JDIMENSION) (rgroup * ngroups)); + } +} diff --git a/windows_libs/jpeg-6a/jdmarker.c b/windows_libs/jpeg-6a/jdmarker.c new file mode 100644 index 00000000..b79ec37f --- /dev/null +++ b/windows_libs/jpeg-6a/jdmarker.c @@ -0,0 +1,1055 @@ +/* + * jdmarker.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to decode JPEG datastream markers. + * Most of the complexity arises from our desire to support input + * suspension: if not all of the data for a marker is available, + * we must exit back to the application. On resumption, we reprocess + * the marker. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +typedef enum { /* JPEG marker codes */ + M_SOF0 = 0xc0, + M_SOF1 = 0xc1, + M_SOF2 = 0xc2, + M_SOF3 = 0xc3, + + M_SOF5 = 0xc5, + M_SOF6 = 0xc6, + M_SOF7 = 0xc7, + + M_JPG = 0xc8, + M_SOF9 = 0xc9, + M_SOF10 = 0xca, + M_SOF11 = 0xcb, + + M_SOF13 = 0xcd, + M_SOF14 = 0xce, + M_SOF15 = 0xcf, + + M_DHT = 0xc4, + + M_DAC = 0xcc, + + M_RST0 = 0xd0, + M_RST1 = 0xd1, + M_RST2 = 0xd2, + M_RST3 = 0xd3, + M_RST4 = 0xd4, + M_RST5 = 0xd5, + M_RST6 = 0xd6, + M_RST7 = 0xd7, + + M_SOI = 0xd8, + M_EOI = 0xd9, + M_SOS = 0xda, + M_DQT = 0xdb, + M_DNL = 0xdc, + M_DRI = 0xdd, + M_DHP = 0xde, + M_EXP = 0xdf, + + M_APP0 = 0xe0, + M_APP1 = 0xe1, + M_APP2 = 0xe2, + M_APP3 = 0xe3, + M_APP4 = 0xe4, + M_APP5 = 0xe5, + M_APP6 = 0xe6, + M_APP7 = 0xe7, + M_APP8 = 0xe8, + M_APP9 = 0xe9, + M_APP10 = 0xea, + M_APP11 = 0xeb, + M_APP12 = 0xec, + M_APP13 = 0xed, + M_APP14 = 0xee, + M_APP15 = 0xef, + + M_JPG0 = 0xf0, + M_JPG13 = 0xfd, + M_COM = 0xfe, + + M_TEM = 0x01, + + M_ERROR = 0x100 +} JPEG_MARKER; + + +/* + * Macros for fetching data from the data source module. + * + * At all times, cinfo->src->next_input_byte and ->bytes_in_buffer reflect + * the current restart point; we update them only when we have reached a + * suitable place to restart if a suspension occurs. + */ + +/* Declare and initialize local copies of input pointer/count */ +#define INPUT_VARS(cinfo) \ + struct jpeg_source_mgr * datasrc = (cinfo)->src; \ + const JOCTET * next_input_byte = datasrc->next_input_byte; \ + size_t bytes_in_buffer = datasrc->bytes_in_buffer + +/* Unload the local copies --- do this only at a restart boundary */ +#define INPUT_SYNC(cinfo) \ + ( datasrc->next_input_byte = next_input_byte, \ + datasrc->bytes_in_buffer = bytes_in_buffer ) + +/* Reload the local copies --- seldom used except in MAKE_BYTE_AVAIL */ +#define INPUT_RELOAD(cinfo) \ + ( next_input_byte = datasrc->next_input_byte, \ + bytes_in_buffer = datasrc->bytes_in_buffer ) + +/* Internal macro for INPUT_BYTE and INPUT_2BYTES: make a byte available. + * Note we do *not* do INPUT_SYNC before calling fill_input_buffer, + * but we must reload the local copies after a successful fill. + */ +#define MAKE_BYTE_AVAIL(cinfo,action) \ + if (bytes_in_buffer == 0) { \ + if (! (*datasrc->fill_input_buffer) (cinfo)) \ + { action; } \ + INPUT_RELOAD(cinfo); \ + } \ + bytes_in_buffer-- + +/* Read a byte into variable V. + * If must suspend, take the specified action (typically "return FALSE"). + */ +#define INPUT_BYTE(cinfo,V,action) \ + MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \ + V = GETJOCTET(*next_input_byte++); ) + +/* As above, but read two bytes interpreted as an unsigned 16-bit integer. + * V should be declared unsigned int or perhaps INT32. + */ +#define INPUT_2BYTES(cinfo,V,action) \ + MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \ + V = ((unsigned int) GETJOCTET(*next_input_byte++)) << 8; \ + MAKE_BYTE_AVAIL(cinfo,action); \ + V += GETJOCTET(*next_input_byte++); ) + + +/* + * Routines to process JPEG markers. + * + * Entry condition: JPEG marker itself has been read and its code saved + * in cinfo->unread_marker; input restart point is just after the marker. + * + * Exit: if return TRUE, have read and processed any parameters, and have + * updated the restart point to point after the parameters. + * If return FALSE, was forced to suspend before reaching end of + * marker parameters; restart point has not been moved. Same routine + * will be called again after application supplies more input data. + * + * This approach to suspension assumes that all of a marker's parameters can + * fit into a single input bufferload. This should hold for "normal" + * markers. Some COM/APPn markers might have large parameter segments, + * but we use skip_input_data to get past those, and thereby put the problem + * on the source manager's shoulders. + * + * Note that we don't bother to avoid duplicate trace messages if a + * suspension occurs within marker parameters. Other side effects + * require more care. + */ + + +LOCAL(boolean) +get_soi (j_decompress_ptr cinfo) +/* Process an SOI marker */ +{ + int i; + + TRACEMS(cinfo, 1, JTRC_SOI); + + if (cinfo->marker->saw_SOI) + ERREXIT(cinfo, JERR_SOI_DUPLICATE); + + /* Reset all parameters that are defined to be reset by SOI */ + + for (i = 0; i < NUM_ARITH_TBLS; i++) { + cinfo->arith_dc_L[i] = 0; + cinfo->arith_dc_U[i] = 1; + cinfo->arith_ac_K[i] = 5; + } + cinfo->restart_interval = 0; + + /* Set initial assumptions for colorspace etc */ + + cinfo->jpeg_color_space = JCS_UNKNOWN; + cinfo->CCIR601_sampling = FALSE; /* Assume non-CCIR sampling??? */ + + cinfo->saw_JFIF_marker = FALSE; + cinfo->density_unit = 0; /* set default JFIF APP0 values */ + cinfo->X_density = 1; + cinfo->Y_density = 1; + cinfo->saw_Adobe_marker = FALSE; + cinfo->Adobe_transform = 0; + + cinfo->marker->saw_SOI = TRUE; + + return TRUE; +} + + +LOCAL(boolean) +get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith) +/* Process a SOFn marker */ +{ + INT32 length; + int c, ci; + jpeg_component_info * compptr; + INPUT_VARS(cinfo); + + cinfo->progressive_mode = is_prog; + cinfo->arith_code = is_arith; + + INPUT_2BYTES(cinfo, length, return FALSE); + + INPUT_BYTE(cinfo, cinfo->data_precision, return FALSE); + INPUT_2BYTES(cinfo, cinfo->image_height, return FALSE); + INPUT_2BYTES(cinfo, cinfo->image_width, return FALSE); + INPUT_BYTE(cinfo, cinfo->num_components, return FALSE); + + length -= 8; + + TRACEMS4(cinfo, 1, JTRC_SOF, cinfo->unread_marker, + (int) cinfo->image_width, (int) cinfo->image_height, + cinfo->num_components); + + if (cinfo->marker->saw_SOF) + ERREXIT(cinfo, JERR_SOF_DUPLICATE); + + /* We don't support files in which the image height is initially specified */ + /* as 0 and is later redefined by DNL. As long as we have to check that, */ + /* might as well have a general sanity check. */ + if (cinfo->image_height <= 0 || cinfo->image_width <= 0 + || cinfo->num_components <= 0) + ERREXIT(cinfo, JERR_EMPTY_IMAGE); + + if (length != (cinfo->num_components * 3)) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + if (cinfo->comp_info == NULL) /* do only once, even if suspend */ + cinfo->comp_info = (jpeg_component_info *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components * SIZEOF(jpeg_component_info)); + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + compptr->component_index = ci; + INPUT_BYTE(cinfo, compptr->component_id, return FALSE); + INPUT_BYTE(cinfo, c, return FALSE); + compptr->h_samp_factor = (c >> 4) & 15; + compptr->v_samp_factor = (c ) & 15; + INPUT_BYTE(cinfo, compptr->quant_tbl_no, return FALSE); + + TRACEMS4(cinfo, 1, JTRC_SOF_COMPONENT, + compptr->component_id, compptr->h_samp_factor, + compptr->v_samp_factor, compptr->quant_tbl_no); + } + + cinfo->marker->saw_SOF = TRUE; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(boolean) +get_sos (j_decompress_ptr cinfo) +/* Process a SOS marker */ +{ + INT32 length; + int i, ci, n, c, cc; + jpeg_component_info * compptr; + INPUT_VARS(cinfo); + + if (! cinfo->marker->saw_SOF) + ERREXIT(cinfo, JERR_SOS_NO_SOF); + + INPUT_2BYTES(cinfo, length, return FALSE); + + INPUT_BYTE(cinfo, n, return FALSE); /* Number of components */ + + if (length != (n * 2 + 6) || n < 1 || n > MAX_COMPS_IN_SCAN) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + TRACEMS1(cinfo, 1, JTRC_SOS, n); + + cinfo->comps_in_scan = n; + + /* Collect the component-spec parameters */ + + for (i = 0; i < n; i++) { + INPUT_BYTE(cinfo, cc, return FALSE); + INPUT_BYTE(cinfo, c, return FALSE); + + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + if (cc == compptr->component_id) + goto id_found; + } + + ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc); + + id_found: + + cinfo->cur_comp_info[i] = compptr; + compptr->dc_tbl_no = (c >> 4) & 15; + compptr->ac_tbl_no = (c ) & 15; + + TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc, + compptr->dc_tbl_no, compptr->ac_tbl_no); + } + + /* Collect the additional scan parameters Ss, Se, Ah/Al. */ + INPUT_BYTE(cinfo, c, return FALSE); + cinfo->Ss = c; + INPUT_BYTE(cinfo, c, return FALSE); + cinfo->Se = c; + INPUT_BYTE(cinfo, c, return FALSE); + cinfo->Ah = (c >> 4) & 15; + cinfo->Al = (c ) & 15; + + TRACEMS4(cinfo, 1, JTRC_SOS_PARAMS, cinfo->Ss, cinfo->Se, + cinfo->Ah, cinfo->Al); + + /* Prepare to scan data & restart markers */ + cinfo->marker->next_restart_num = 0; + + /* Count another SOS marker */ + cinfo->input_scan_number++; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +METHODDEF(boolean) +get_app0 (j_decompress_ptr cinfo) +/* Process an APP0 marker */ +{ +#define JFIF_LEN 14 + INT32 length; + UINT8 b[JFIF_LEN]; + int buffp; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + /* See if a JFIF APP0 marker is present */ + + if (length >= JFIF_LEN) { + for (buffp = 0; buffp < JFIF_LEN; buffp++) + INPUT_BYTE(cinfo, b[buffp], return FALSE); + length -= JFIF_LEN; + + if (b[0]==0x4A && b[1]==0x46 && b[2]==0x49 && b[3]==0x46 && b[4]==0) { + /* Found JFIF APP0 marker: check version */ + /* Major version must be 1, anything else signals an incompatible change. + * We used to treat this as an error, but now it's a nonfatal warning, + * because some bozo at Hijaak couldn't read the spec. + * Minor version should be 0..2, but process anyway if newer. + */ + if (b[5] != 1) + WARNMS2(cinfo, JWRN_JFIF_MAJOR, b[5], b[6]); + else if (b[6] > 2) + TRACEMS2(cinfo, 1, JTRC_JFIF_MINOR, b[5], b[6]); + /* Save info */ + cinfo->saw_JFIF_marker = TRUE; + cinfo->density_unit = b[7]; + cinfo->X_density = (b[8] << 8) + b[9]; + cinfo->Y_density = (b[10] << 8) + b[11]; + TRACEMS3(cinfo, 1, JTRC_JFIF, + cinfo->X_density, cinfo->Y_density, cinfo->density_unit); + if (b[12] | b[13]) + TRACEMS2(cinfo, 1, JTRC_JFIF_THUMBNAIL, b[12], b[13]); + if (length != ((INT32) b[12] * (INT32) b[13] * (INT32) 3)) + TRACEMS1(cinfo, 1, JTRC_JFIF_BADTHUMBNAILSIZE, (int) length); + } else { + /* Start of APP0 does not match "JFIF" */ + TRACEMS1(cinfo, 1, JTRC_APP0, (int) length + JFIF_LEN); + } + } else { + /* Too short to be JFIF marker */ + TRACEMS1(cinfo, 1, JTRC_APP0, (int) length); + } + + INPUT_SYNC(cinfo); + if (length > 0) /* skip any remaining data -- could be lots */ + (*cinfo->src->skip_input_data) (cinfo, (long) length); + + return TRUE; +} + + +METHODDEF(boolean) +get_app14 (j_decompress_ptr cinfo) +/* Process an APP14 marker */ +{ +#define ADOBE_LEN 12 + INT32 length; + UINT8 b[ADOBE_LEN]; + int buffp; + unsigned int version, flags0, flags1, transform; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + /* See if an Adobe APP14 marker is present */ + + if (length >= ADOBE_LEN) { + for (buffp = 0; buffp < ADOBE_LEN; buffp++) + INPUT_BYTE(cinfo, b[buffp], return FALSE); + length -= ADOBE_LEN; + + if (b[0]==0x41 && b[1]==0x64 && b[2]==0x6F && b[3]==0x62 && b[4]==0x65) { + /* Found Adobe APP14 marker */ + version = (b[5] << 8) + b[6]; + flags0 = (b[7] << 8) + b[8]; + flags1 = (b[9] << 8) + b[10]; + transform = b[11]; + TRACEMS4(cinfo, 1, JTRC_ADOBE, version, flags0, flags1, transform); + cinfo->saw_Adobe_marker = TRUE; + cinfo->Adobe_transform = (UINT8) transform; + } else { + /* Start of APP14 does not match "Adobe" */ + TRACEMS1(cinfo, 1, JTRC_APP14, (int) length + ADOBE_LEN); + } + } else { + /* Too short to be Adobe marker */ + TRACEMS1(cinfo, 1, JTRC_APP14, (int) length); + } + + INPUT_SYNC(cinfo); + if (length > 0) /* skip any remaining data -- could be lots */ + (*cinfo->src->skip_input_data) (cinfo, (long) length); + + return TRUE; +} + + +LOCAL(boolean) +get_dac (j_decompress_ptr cinfo) +/* Process a DAC marker */ +{ + INT32 length; + int index, val; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + while (length > 0) { + INPUT_BYTE(cinfo, index, return FALSE); + INPUT_BYTE(cinfo, val, return FALSE); + + length -= 2; + + TRACEMS2(cinfo, 1, JTRC_DAC, index, val); + + if (index < 0 || index >= (2*NUM_ARITH_TBLS)) + ERREXIT1(cinfo, JERR_DAC_INDEX, index); + + if (index >= NUM_ARITH_TBLS) { /* define AC table */ + cinfo->arith_ac_K[index-NUM_ARITH_TBLS] = (UINT8) val; + } else { /* define DC table */ + cinfo->arith_dc_L[index] = (UINT8) (val & 0x0F); + cinfo->arith_dc_U[index] = (UINT8) (val >> 4); + if (cinfo->arith_dc_L[index] > cinfo->arith_dc_U[index]) + ERREXIT1(cinfo, JERR_DAC_VALUE, val); + } + } + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(boolean) +get_dht (j_decompress_ptr cinfo) +/* Process a DHT marker */ +{ + INT32 length; + UINT8 bits[17]; + UINT8 huffval[256]; + int i, index, count; + JHUFF_TBL **htblptr; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + while (length > 0) { + INPUT_BYTE(cinfo, index, return FALSE); + + TRACEMS1(cinfo, 1, JTRC_DHT, index); + + bits[0] = 0; + count = 0; + for (i = 1; i <= 16; i++) { + INPUT_BYTE(cinfo, bits[i], return FALSE); + count += bits[i]; + } + + length -= 1 + 16; + + TRACEMS8(cinfo, 2, JTRC_HUFFBITS, + bits[1], bits[2], bits[3], bits[4], + bits[5], bits[6], bits[7], bits[8]); + TRACEMS8(cinfo, 2, JTRC_HUFFBITS, + bits[9], bits[10], bits[11], bits[12], + bits[13], bits[14], bits[15], bits[16]); + + if (count > 256 || ((INT32) count) > length) + ERREXIT(cinfo, JERR_DHT_COUNTS); + + for (i = 0; i < count; i++) + INPUT_BYTE(cinfo, huffval[i], return FALSE); + + length -= count; + + if (index & 0x10) { /* AC table definition */ + index -= 0x10; + htblptr = &cinfo->ac_huff_tbl_ptrs[index]; + } else { /* DC table definition */ + htblptr = &cinfo->dc_huff_tbl_ptrs[index]; + } + + if (index < 0 || index >= NUM_HUFF_TBLS) + ERREXIT1(cinfo, JERR_DHT_INDEX, index); + + if (*htblptr == NULL) + *htblptr = jpeg_alloc_huff_table((j_common_ptr) cinfo); + + MEMCOPY((*htblptr)->bits, bits, SIZEOF((*htblptr)->bits)); + MEMCOPY((*htblptr)->huffval, huffval, SIZEOF((*htblptr)->huffval)); + } + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(boolean) +get_dqt (j_decompress_ptr cinfo) +/* Process a DQT marker */ +{ + INT32 length; + int n, i, prec; + unsigned int tmp; + JQUANT_TBL *quant_ptr; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + length -= 2; + + while (length > 0) { + INPUT_BYTE(cinfo, n, return FALSE); + prec = n >> 4; + n &= 0x0F; + + TRACEMS2(cinfo, 1, JTRC_DQT, n, prec); + + if (n >= NUM_QUANT_TBLS) + ERREXIT1(cinfo, JERR_DQT_INDEX, n); + + if (cinfo->quant_tbl_ptrs[n] == NULL) + cinfo->quant_tbl_ptrs[n] = jpeg_alloc_quant_table((j_common_ptr) cinfo); + quant_ptr = cinfo->quant_tbl_ptrs[n]; + + for (i = 0; i < DCTSIZE2; i++) { + if (prec) + INPUT_2BYTES(cinfo, tmp, return FALSE); + else + INPUT_BYTE(cinfo, tmp, return FALSE); + /* We convert the zigzag-order table to natural array order. */ + quant_ptr->quantval[jpeg_natural_order[i]] = (UINT16) tmp; + } + + if (cinfo->err->trace_level >= 2) { + for (i = 0; i < DCTSIZE2; i += 8) { + TRACEMS8(cinfo, 2, JTRC_QUANTVALS, + quant_ptr->quantval[i], quant_ptr->quantval[i+1], + quant_ptr->quantval[i+2], quant_ptr->quantval[i+3], + quant_ptr->quantval[i+4], quant_ptr->quantval[i+5], + quant_ptr->quantval[i+6], quant_ptr->quantval[i+7]); + } + } + + length -= DCTSIZE2+1; + if (prec) length -= DCTSIZE2; + } + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(boolean) +get_dri (j_decompress_ptr cinfo) +/* Process a DRI marker */ +{ + INT32 length; + unsigned int tmp; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + + if (length != 4) + ERREXIT(cinfo, JERR_BAD_LENGTH); + + INPUT_2BYTES(cinfo, tmp, return FALSE); + + TRACEMS1(cinfo, 1, JTRC_DRI, tmp); + + cinfo->restart_interval = tmp; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +METHODDEF(boolean) +skip_variable (j_decompress_ptr cinfo) +/* Skip over an unknown or uninteresting variable-length marker */ +{ + INT32 length; + INPUT_VARS(cinfo); + + INPUT_2BYTES(cinfo, length, return FALSE); + + TRACEMS2(cinfo, 1, JTRC_MISC_MARKER, cinfo->unread_marker, (int) length); + + INPUT_SYNC(cinfo); /* do before skip_input_data */ + (*cinfo->src->skip_input_data) (cinfo, (long) length - 2L); + + return TRUE; +} + + +/* + * Find the next JPEG marker, save it in cinfo->unread_marker. + * Returns FALSE if had to suspend before reaching a marker; + * in that case cinfo->unread_marker is unchanged. + * + * Note that the result might not be a valid marker code, + * but it will never be 0 or FF. + */ + +LOCAL(boolean) +next_marker (j_decompress_ptr cinfo) +{ + int c; + INPUT_VARS(cinfo); + + for (;;) { + INPUT_BYTE(cinfo, c, return FALSE); + /* Skip any non-FF bytes. + * This may look a bit inefficient, but it will not occur in a valid file. + * We sync after each discarded byte so that a suspending data source + * can discard the byte from its buffer. + */ + while (c != 0xFF) { + cinfo->marker->discarded_bytes++; + INPUT_SYNC(cinfo); + INPUT_BYTE(cinfo, c, return FALSE); + } + /* This loop swallows any duplicate FF bytes. Extra FFs are legal as + * pad bytes, so don't count them in discarded_bytes. We assume there + * will not be so many consecutive FF bytes as to overflow a suspending + * data source's input buffer. + */ + do { + INPUT_BYTE(cinfo, c, return FALSE); + } while (c == 0xFF); + if (c != 0) + break; /* found a valid marker, exit loop */ + /* Reach here if we found a stuffed-zero data sequence (FF/00). + * Discard it and loop back to try again. + */ + cinfo->marker->discarded_bytes += 2; + INPUT_SYNC(cinfo); + } + + if (cinfo->marker->discarded_bytes != 0) { + WARNMS2(cinfo, JWRN_EXTRANEOUS_DATA, cinfo->marker->discarded_bytes, c); + cinfo->marker->discarded_bytes = 0; + } + + cinfo->unread_marker = c; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +LOCAL(boolean) +first_marker (j_decompress_ptr cinfo) +/* Like next_marker, but used to obtain the initial SOI marker. */ +/* For this marker, we do not allow preceding garbage or fill; otherwise, + * we might well scan an entire input file before realizing it ain't JPEG. + * If an application wants to process non-JFIF files, it must seek to the + * SOI before calling the JPEG library. + */ +{ + int c, c2; + INPUT_VARS(cinfo); + + INPUT_BYTE(cinfo, c, return FALSE); + INPUT_BYTE(cinfo, c2, return FALSE); + if (c != 0xFF || c2 != (int) M_SOI) + ERREXIT2(cinfo, JERR_NO_SOI, c, c2); + + cinfo->unread_marker = c2; + + INPUT_SYNC(cinfo); + return TRUE; +} + + +/* + * Read markers until SOS or EOI. + * + * Returns same codes as are defined for jpeg_consume_input: + * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. + */ + +METHODDEF(int) +read_markers (j_decompress_ptr cinfo) +{ + /* Outer loop repeats once for each marker. */ + for (;;) { + /* Collect the marker proper, unless we already did. */ + /* NB: first_marker() enforces the requirement that SOI appear first. */ + if (cinfo->unread_marker == 0) { + if (! cinfo->marker->saw_SOI) { + if (! first_marker(cinfo)) + return JPEG_SUSPENDED; + } else { + if (! next_marker(cinfo)) + return JPEG_SUSPENDED; + } + } + /* At this point cinfo->unread_marker contains the marker code and the + * input point is just past the marker proper, but before any parameters. + * A suspension will cause us to return with this state still true. + */ + switch (cinfo->unread_marker) { + case M_SOI: + if (! get_soi(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_SOF0: /* Baseline */ + case M_SOF1: /* Extended sequential, Huffman */ + if (! get_sof(cinfo, FALSE, FALSE)) + return JPEG_SUSPENDED; + break; + + case M_SOF2: /* Progressive, Huffman */ + if (! get_sof(cinfo, TRUE, FALSE)) + return JPEG_SUSPENDED; + break; + + case M_SOF9: /* Extended sequential, arithmetic */ + if (! get_sof(cinfo, FALSE, TRUE)) + return JPEG_SUSPENDED; + break; + + case M_SOF10: /* Progressive, arithmetic */ + if (! get_sof(cinfo, TRUE, TRUE)) + return JPEG_SUSPENDED; + break; + + /* Currently unsupported SOFn types */ + case M_SOF3: /* Lossless, Huffman */ + case M_SOF5: /* Differential sequential, Huffman */ + case M_SOF6: /* Differential progressive, Huffman */ + case M_SOF7: /* Differential lossless, Huffman */ + case M_JPG: /* Reserved for JPEG extensions */ + case M_SOF11: /* Lossless, arithmetic */ + case M_SOF13: /* Differential sequential, arithmetic */ + case M_SOF14: /* Differential progressive, arithmetic */ + case M_SOF15: /* Differential lossless, arithmetic */ + ERREXIT1(cinfo, JERR_SOF_UNSUPPORTED, cinfo->unread_marker); + break; + + case M_SOS: + if (! get_sos(cinfo)) + return JPEG_SUSPENDED; + cinfo->unread_marker = 0; /* processed the marker */ + return JPEG_REACHED_SOS; + + case M_EOI: + TRACEMS(cinfo, 1, JTRC_EOI); + cinfo->unread_marker = 0; /* processed the marker */ + return JPEG_REACHED_EOI; + + case M_DAC: + if (! get_dac(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_DHT: + if (! get_dht(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_DQT: + if (! get_dqt(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_DRI: + if (! get_dri(cinfo)) + return JPEG_SUSPENDED; + break; + + case M_APP0: + case M_APP1: + case M_APP2: + case M_APP3: + case M_APP4: + case M_APP5: + case M_APP6: + case M_APP7: + case M_APP8: + case M_APP9: + case M_APP10: + case M_APP11: + case M_APP12: + case M_APP13: + case M_APP14: + case M_APP15: + if (! (*cinfo->marker->process_APPn[cinfo->unread_marker - (int) M_APP0]) (cinfo)) + return JPEG_SUSPENDED; + break; + + case M_COM: + if (! (*cinfo->marker->process_COM) (cinfo)) + return JPEG_SUSPENDED; + break; + + case M_RST0: /* these are all parameterless */ + case M_RST1: + case M_RST2: + case M_RST3: + case M_RST4: + case M_RST5: + case M_RST6: + case M_RST7: + case M_TEM: + TRACEMS1(cinfo, 1, JTRC_PARMLESS_MARKER, cinfo->unread_marker); + break; + + case M_DNL: /* Ignore DNL ... perhaps the wrong thing */ + if (! skip_variable(cinfo)) + return JPEG_SUSPENDED; + break; + + default: /* must be DHP, EXP, JPGn, or RESn */ + /* For now, we treat the reserved markers as fatal errors since they are + * likely to be used to signal incompatible JPEG Part 3 extensions. + * Once the JPEG 3 version-number marker is well defined, this code + * ought to change! + */ + ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, cinfo->unread_marker); + break; + } + /* Successfully processed marker, so reset state variable */ + cinfo->unread_marker = 0; + } /* end loop */ +} + + +/* + * Read a restart marker, which is expected to appear next in the datastream; + * if the marker is not there, take appropriate recovery action. + * Returns FALSE if suspension is required. + * + * This is called by the entropy decoder after it has read an appropriate + * number of MCUs. cinfo->unread_marker may be nonzero if the entropy decoder + * has already read a marker from the data source. Under normal conditions + * cinfo->unread_marker will be reset to 0 before returning; if not reset, + * it holds a marker which the decoder will be unable to read past. + */ + +METHODDEF(boolean) +read_restart_marker (j_decompress_ptr cinfo) +{ + /* Obtain a marker unless we already did. */ + /* Note that next_marker will complain if it skips any data. */ + if (cinfo->unread_marker == 0) { + if (! next_marker(cinfo)) + return FALSE; + } + + if (cinfo->unread_marker == + ((int) M_RST0 + cinfo->marker->next_restart_num)) { + /* Normal case --- swallow the marker and let entropy decoder continue */ + TRACEMS1(cinfo, 3, JTRC_RST, cinfo->marker->next_restart_num); + cinfo->unread_marker = 0; + } else { + /* Uh-oh, the restart markers have been messed up. */ + /* Let the data source manager determine how to resync. */ + if (! (*cinfo->src->resync_to_restart) (cinfo, + cinfo->marker->next_restart_num)) + return FALSE; + } + + /* Update next-restart state */ + cinfo->marker->next_restart_num = (cinfo->marker->next_restart_num + 1) & 7; + + return TRUE; +} + + +/* + * This is the default resync_to_restart method for data source managers + * to use if they don't have any better approach. Some data source managers + * may be able to back up, or may have additional knowledge about the data + * which permits a more intelligent recovery strategy; such managers would + * presumably supply their own resync method. + * + * read_restart_marker calls resync_to_restart if it finds a marker other than + * the restart marker it was expecting. (This code is *not* used unless + * a nonzero restart interval has been declared.) cinfo->unread_marker is + * the marker code actually found (might be anything, except 0 or FF). + * The desired restart marker number (0..7) is passed as a parameter. + * This routine is supposed to apply whatever error recovery strategy seems + * appropriate in order to position the input stream to the next data segment. + * Note that cinfo->unread_marker is treated as a marker appearing before + * the current data-source input point; usually it should be reset to zero + * before returning. + * Returns FALSE if suspension is required. + * + * This implementation is substantially constrained by wanting to treat the + * input as a data stream; this means we can't back up. Therefore, we have + * only the following actions to work with: + * 1. Simply discard the marker and let the entropy decoder resume at next + * byte of file. + * 2. Read forward until we find another marker, discarding intervening + * data. (In theory we could look ahead within the current bufferload, + * without having to discard data if we don't find the desired marker. + * This idea is not implemented here, in part because it makes behavior + * dependent on buffer size and chance buffer-boundary positions.) + * 3. Leave the marker unread (by failing to zero cinfo->unread_marker). + * This will cause the entropy decoder to process an empty data segment, + * inserting dummy zeroes, and then we will reprocess the marker. + * + * #2 is appropriate if we think the desired marker lies ahead, while #3 is + * appropriate if the found marker is a future restart marker (indicating + * that we have missed the desired restart marker, probably because it got + * corrupted). + * We apply #2 or #3 if the found marker is a restart marker no more than + * two counts behind or ahead of the expected one. We also apply #2 if the + * found marker is not a legal JPEG marker code (it's certainly bogus data). + * If the found marker is a restart marker more than 2 counts away, we do #1 + * (too much risk that the marker is erroneous; with luck we will be able to + * resync at some future point). + * For any valid non-restart JPEG marker, we apply #3. This keeps us from + * overrunning the end of a scan. An implementation limited to single-scan + * files might find it better to apply #2 for markers other than EOI, since + * any other marker would have to be bogus data in that case. + */ + +GLOBAL(boolean) +jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired) +{ + int marker = cinfo->unread_marker; + int action = 1; + + /* Always put up a warning. */ + WARNMS2(cinfo, JWRN_MUST_RESYNC, marker, desired); + + /* Outer loop handles repeated decision after scanning forward. */ + for (;;) { + if (marker < (int) M_SOF0) + action = 2; /* invalid marker */ + else if (marker < (int) M_RST0 || marker > (int) M_RST7) + action = 3; /* valid non-restart marker */ + else { + if (marker == ((int) M_RST0 + ((desired+1) & 7)) || + marker == ((int) M_RST0 + ((desired+2) & 7))) + action = 3; /* one of the next two expected restarts */ + else if (marker == ((int) M_RST0 + ((desired-1) & 7)) || + marker == ((int) M_RST0 + ((desired-2) & 7))) + action = 2; /* a prior restart, so advance */ + else + action = 1; /* desired restart or too far away */ + } + TRACEMS2(cinfo, 4, JTRC_RECOVERY_ACTION, marker, action); + switch (action) { + case 1: + /* Discard marker and let entropy decoder resume processing. */ + cinfo->unread_marker = 0; + return TRUE; + case 2: + /* Scan to the next marker, and repeat the decision loop. */ + if (! next_marker(cinfo)) + return FALSE; + marker = cinfo->unread_marker; + break; + case 3: + /* Return without advancing past this marker. */ + /* Entropy decoder will be forced to process an empty segment. */ + return TRUE; + } + } /* end loop */ +} + + +/* + * Reset marker processing state to begin a fresh datastream. + */ + +METHODDEF(void) +reset_marker_reader (j_decompress_ptr cinfo) +{ + cinfo->comp_info = NULL; /* until allocated by get_sof */ + cinfo->input_scan_number = 0; /* no SOS seen yet */ + cinfo->unread_marker = 0; /* no pending marker */ + cinfo->marker->saw_SOI = FALSE; /* set internal state too */ + cinfo->marker->saw_SOF = FALSE; + cinfo->marker->discarded_bytes = 0; +} + + +/* + * Initialize the marker reader module. + * This is called only once, when the decompression object is created. + */ + +GLOBAL(void) +jinit_marker_reader (j_decompress_ptr cinfo) +{ + int i; + + /* Create subobject in permanent pool */ + cinfo->marker = (struct jpeg_marker_reader *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_PERMANENT, + SIZEOF(struct jpeg_marker_reader)); + /* Initialize method pointers */ + cinfo->marker->reset_marker_reader = reset_marker_reader; + cinfo->marker->read_markers = read_markers; + cinfo->marker->read_restart_marker = read_restart_marker; + cinfo->marker->process_COM = skip_variable; + for (i = 0; i < 16; i++) + cinfo->marker->process_APPn[i] = skip_variable; + cinfo->marker->process_APPn[0] = get_app0; + cinfo->marker->process_APPn[14] = get_app14; + /* Reset marker processing state */ + reset_marker_reader(cinfo); +} diff --git a/windows_libs/jpeg-6a/jdmaster.c b/windows_libs/jpeg-6a/jdmaster.c new file mode 100644 index 00000000..6f3351e6 --- /dev/null +++ b/windows_libs/jpeg-6a/jdmaster.c @@ -0,0 +1,555 @@ +/* + * jdmaster.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains master control logic for the JPEG decompressor. + * These routines are concerned with selecting the modules to be executed + * and with determining the number of passes and the work to be done in each + * pass. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private state */ + +typedef struct { + struct jpeg_decomp_master pub; /* public fields */ + + int pass_number; /* # of passes completed */ + + boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */ + + /* Saved references to initialized quantizer modules, + * in case we need to switch modes. + */ + struct jpeg_color_quantizer * quantizer_1pass; + struct jpeg_color_quantizer * quantizer_2pass; +} my_decomp_master; + +typedef my_decomp_master * my_master_ptr; + + +/* + * Determine whether merged upsample/color conversion should be used. + * CRUCIAL: this must match the actual capabilities of jdmerge.c! + */ + +LOCAL(boolean) +use_merged_upsample (j_decompress_ptr cinfo) +{ +#ifdef UPSAMPLE_MERGING_SUPPORTED + /* Merging is the equivalent of plain box-filter upsampling */ + if (cinfo->do_fancy_upsampling || cinfo->CCIR601_sampling) + return FALSE; + /* jdmerge.c only supports YCC=>RGB color conversion */ + if (cinfo->jpeg_color_space != JCS_YCbCr || cinfo->num_components != 3 || + cinfo->out_color_space != JCS_RGB || + cinfo->out_color_components != RGB_PIXELSIZE) + return FALSE; + /* and it only handles 2h1v or 2h2v sampling ratios */ + if (cinfo->comp_info[0].h_samp_factor != 2 || + cinfo->comp_info[1].h_samp_factor != 1 || + cinfo->comp_info[2].h_samp_factor != 1 || + cinfo->comp_info[0].v_samp_factor > 2 || + cinfo->comp_info[1].v_samp_factor != 1 || + cinfo->comp_info[2].v_samp_factor != 1) + return FALSE; + /* furthermore, it doesn't work if we've scaled the IDCTs differently */ + if (cinfo->comp_info[0].DCT_scaled_size != cinfo->min_DCT_scaled_size || + cinfo->comp_info[1].DCT_scaled_size != cinfo->min_DCT_scaled_size || + cinfo->comp_info[2].DCT_scaled_size != cinfo->min_DCT_scaled_size) + return FALSE; + /* ??? also need to test for upsample-time rescaling, when & if supported */ + return TRUE; /* by golly, it'll work... */ +#else + return FALSE; +#endif +} + + +/* + * Compute output image dimensions and related values. + * NOTE: this is exported for possible use by application. + * Hence it mustn't do anything that can't be done twice. + * Also note that it may be called before the master module is initialized! + */ + +GLOBAL(void) +jpeg_calc_output_dimensions (j_decompress_ptr cinfo) +/* Do computations that are needed before master selection phase */ +{ + int ci; + jpeg_component_info *compptr; + + /* Prevent application from calling me at wrong times */ + if (cinfo->global_state != DSTATE_READY) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + +#ifdef IDCT_SCALING_SUPPORTED + + /* Compute actual output image dimensions and DCT scaling choices. */ + if (cinfo->scale_num * 8 <= cinfo->scale_denom) { + /* Provide 1/8 scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, 8L); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, 8L); + cinfo->min_DCT_scaled_size = 1; + } else if (cinfo->scale_num * 4 <= cinfo->scale_denom) { + /* Provide 1/4 scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, 4L); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, 4L); + cinfo->min_DCT_scaled_size = 2; + } else if (cinfo->scale_num * 2 <= cinfo->scale_denom) { + /* Provide 1/2 scaling */ + cinfo->output_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width, 2L); + cinfo->output_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height, 2L); + cinfo->min_DCT_scaled_size = 4; + } else { + /* Provide 1/1 scaling */ + cinfo->output_width = cinfo->image_width; + cinfo->output_height = cinfo->image_height; + cinfo->min_DCT_scaled_size = DCTSIZE; + } + /* In selecting the actual DCT scaling for each component, we try to + * scale up the chroma components via IDCT scaling rather than upsampling. + * This saves time if the upsampler gets to use 1:1 scaling. + * Note this code assumes that the supported DCT scalings are powers of 2. + */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + int ssize = cinfo->min_DCT_scaled_size; + while (ssize < DCTSIZE && + (compptr->h_samp_factor * ssize * 2 <= + cinfo->max_h_samp_factor * cinfo->min_DCT_scaled_size) && + (compptr->v_samp_factor * ssize * 2 <= + cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size)) { + ssize = ssize * 2; + } + compptr->DCT_scaled_size = ssize; + } + + /* Recompute downsampled dimensions of components; + * application needs to know these if using raw downsampled data. + */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Size in samples, after IDCT scaling */ + compptr->downsampled_width = (JDIMENSION) + jdiv_round_up((long) cinfo->image_width * + (long) (compptr->h_samp_factor * compptr->DCT_scaled_size), + (long) (cinfo->max_h_samp_factor * DCTSIZE)); + compptr->downsampled_height = (JDIMENSION) + jdiv_round_up((long) cinfo->image_height * + (long) (compptr->v_samp_factor * compptr->DCT_scaled_size), + (long) (cinfo->max_v_samp_factor * DCTSIZE)); + } + +#else /* !IDCT_SCALING_SUPPORTED */ + + /* Hardwire it to "no scaling" */ + cinfo->output_width = cinfo->image_width; + cinfo->output_height = cinfo->image_height; + /* jdinput.c has already initialized DCT_scaled_size to DCTSIZE, + * and has computed unscaled downsampled_width and downsampled_height. + */ + +#endif /* IDCT_SCALING_SUPPORTED */ + + /* Report number of components in selected colorspace. */ + /* Probably this should be in the color conversion module... */ + switch (cinfo->out_color_space) { + case JCS_GRAYSCALE: + cinfo->out_color_components = 1; + break; + case JCS_RGB: +#if RGB_PIXELSIZE != 3 + cinfo->out_color_components = RGB_PIXELSIZE; + break; +#endif /* else share code with YCbCr */ + case JCS_YCbCr: + cinfo->out_color_components = 3; + break; + case JCS_CMYK: + case JCS_YCCK: + cinfo->out_color_components = 4; + break; + default: /* else must be same colorspace as in file */ + cinfo->out_color_components = cinfo->num_components; + break; + } + cinfo->output_components = (cinfo->quantize_colors ? 1 : + cinfo->out_color_components); + + /* See if upsampler will want to emit more than one row at a time */ + if (use_merged_upsample(cinfo)) + cinfo->rec_outbuf_height = cinfo->max_v_samp_factor; + else + cinfo->rec_outbuf_height = 1; +} + + +/* + * Several decompression processes need to range-limit values to the range + * 0..MAXJSAMPLE; the input value may fall somewhat outside this range + * due to noise introduced by quantization, roundoff error, etc. These + * processes are inner loops and need to be as fast as possible. On most + * machines, particularly CPUs with pipelines or instruction prefetch, + * a (subscript-check-less) C table lookup + * x = sample_range_limit[x]; + * is faster than explicit tests + * if (x < 0) x = 0; + * else if (x > MAXJSAMPLE) x = MAXJSAMPLE; + * These processes all use a common table prepared by the routine below. + * + * For most steps we can mathematically guarantee that the initial value + * of x is within MAXJSAMPLE+1 of the legal range, so a table running from + * -(MAXJSAMPLE+1) to 2*MAXJSAMPLE+1 is sufficient. But for the initial + * limiting step (just after the IDCT), a wildly out-of-range value is + * possible if the input data is corrupt. To avoid any chance of indexing + * off the end of memory and getting a bad-pointer trap, we perform the + * post-IDCT limiting thus: + * x = range_limit[x & MASK]; + * where MASK is 2 bits wider than legal sample data, ie 10 bits for 8-bit + * samples. Under normal circumstances this is more than enough range and + * a correct output will be generated; with bogus input data the mask will + * cause wraparound, and we will safely generate a bogus-but-in-range output. + * For the post-IDCT step, we want to convert the data from signed to unsigned + * representation by adding CENTERJSAMPLE at the same time that we limit it. + * So the post-IDCT limiting table ends up looking like this: + * CENTERJSAMPLE,CENTERJSAMPLE+1,...,MAXJSAMPLE, + * MAXJSAMPLE (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times), + * 0 (repeat 2*(MAXJSAMPLE+1)-CENTERJSAMPLE times), + * 0,1,...,CENTERJSAMPLE-1 + * Negative inputs select values from the upper half of the table after + * masking. + * + * We can save some space by overlapping the start of the post-IDCT table + * with the simpler range limiting table. The post-IDCT table begins at + * sample_range_limit + CENTERJSAMPLE. + * + * Note that the table is allocated in near data space on PCs; it's small + * enough and used often enough to justify this. + */ + +LOCAL(void) +prepare_range_limit_table (j_decompress_ptr cinfo) +/* Allocate and fill in the sample_range_limit table */ +{ + JSAMPLE * table; + int i; + + table = (JSAMPLE *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (5 * (MAXJSAMPLE+1) + CENTERJSAMPLE) * SIZEOF(JSAMPLE)); + table += (MAXJSAMPLE+1); /* allow negative subscripts of simple table */ + cinfo->sample_range_limit = table; + /* First segment of "simple" table: limit[x] = 0 for x < 0 */ + MEMZERO(table - (MAXJSAMPLE+1), (MAXJSAMPLE+1) * SIZEOF(JSAMPLE)); + /* Main part of "simple" table: limit[x] = x */ + for (i = 0; i <= MAXJSAMPLE; i++) + table[i] = (JSAMPLE) i; + table += CENTERJSAMPLE; /* Point to where post-IDCT table starts */ + /* End of simple table, rest of first half of post-IDCT table */ + for (i = CENTERJSAMPLE; i < 2*(MAXJSAMPLE+1); i++) + table[i] = MAXJSAMPLE; + /* Second half of post-IDCT table */ + MEMZERO(table + (2 * (MAXJSAMPLE+1)), + (2 * (MAXJSAMPLE+1) - CENTERJSAMPLE) * SIZEOF(JSAMPLE)); + MEMCOPY(table + (4 * (MAXJSAMPLE+1) - CENTERJSAMPLE), + cinfo->sample_range_limit, CENTERJSAMPLE * SIZEOF(JSAMPLE)); +} + + +/* + * Master selection of decompression modules. + * This is done once at jpeg_start_decompress time. We determine + * which modules will be used and give them appropriate initialization calls. + * We also initialize the decompressor input side to begin consuming data. + * + * Since jpeg_read_header has finished, we know what is in the SOF + * and (first) SOS markers. We also have all the application parameter + * settings. + */ + +LOCAL(void) +master_selection (j_decompress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + boolean use_c_buffer; + long samplesperrow; + JDIMENSION jd_samplesperrow; + + /* Initialize dimensions and other stuff */ + jpeg_calc_output_dimensions(cinfo); + prepare_range_limit_table(cinfo); + + /* Width of an output scanline must be representable as JDIMENSION. */ + samplesperrow = (long) cinfo->output_width * (long) cinfo->out_color_components; + jd_samplesperrow = (JDIMENSION) samplesperrow; + if ((long) jd_samplesperrow != samplesperrow) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); + + /* Initialize my private state */ + master->pass_number = 0; + master->using_merged_upsample = use_merged_upsample(cinfo); + + /* Color quantizer selection */ + master->quantizer_1pass = NULL; + master->quantizer_2pass = NULL; + /* No mode changes if not using buffered-image mode. */ + if (! cinfo->quantize_colors || ! cinfo->buffered_image) { + cinfo->enable_1pass_quant = FALSE; + cinfo->enable_external_quant = FALSE; + cinfo->enable_2pass_quant = FALSE; + } + if (cinfo->quantize_colors) { + if (cinfo->raw_data_out) + ERREXIT(cinfo, JERR_NOTIMPL); + /* 2-pass quantizer only works in 3-component color space. */ + if (cinfo->out_color_components != 3) { + cinfo->enable_1pass_quant = TRUE; + cinfo->enable_external_quant = FALSE; + cinfo->enable_2pass_quant = FALSE; + cinfo->colormap = NULL; + } else if (cinfo->colormap != NULL) { + cinfo->enable_external_quant = TRUE; + } else if (cinfo->two_pass_quantize) { + cinfo->enable_2pass_quant = TRUE; + } else { + cinfo->enable_1pass_quant = TRUE; + } + + if (cinfo->enable_1pass_quant) { +#ifdef QUANT_1PASS_SUPPORTED + jinit_1pass_quantizer(cinfo); + master->quantizer_1pass = cinfo->cquantize; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } + + /* We use the 2-pass code to map to external colormaps. */ + if (cinfo->enable_2pass_quant || cinfo->enable_external_quant) { +#ifdef QUANT_2PASS_SUPPORTED + jinit_2pass_quantizer(cinfo); + master->quantizer_2pass = cinfo->cquantize; +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } + /* If both quantizers are initialized, the 2-pass one is left active; + * this is necessary for starting with quantization to an external map. + */ + } + + /* Post-processing: in particular, color conversion first */ + if (! cinfo->raw_data_out) { + if (master->using_merged_upsample) { +#ifdef UPSAMPLE_MERGING_SUPPORTED + jinit_merged_upsampler(cinfo); /* does color conversion too */ +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else { + jinit_color_deconverter(cinfo); + jinit_upsampler(cinfo); + } + jinit_d_post_controller(cinfo, cinfo->enable_2pass_quant); + } + /* Inverse DCT */ + jinit_inverse_dct(cinfo); + /* Entropy decoding: either Huffman or arithmetic coding. */ + if (cinfo->arith_code) { + ERREXIT(cinfo, JERR_ARITH_NOTIMPL); + } else { + if (cinfo->progressive_mode) { +#ifdef D_PROGRESSIVE_SUPPORTED + jinit_phuff_decoder(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else + jinit_huff_decoder(cinfo); + } + + /* Initialize principal buffer controllers. */ + use_c_buffer = cinfo->inputctl->has_multiple_scans || cinfo->buffered_image; + jinit_d_coef_controller(cinfo, use_c_buffer); + + if (! cinfo->raw_data_out) + jinit_d_main_controller(cinfo, FALSE /* never need full buffer here */); + + /* We can now tell the memory manager to allocate virtual arrays. */ + (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); + + /* Initialize input side of decompressor to consume first scan. */ + (*cinfo->inputctl->start_input_pass) (cinfo); + +#ifdef D_MULTISCAN_FILES_SUPPORTED + /* If jpeg_start_decompress will read the whole file, initialize + * progress monitoring appropriately. The input step is counted + * as one pass. + */ + if (cinfo->progress != NULL && ! cinfo->buffered_image && + cinfo->inputctl->has_multiple_scans) { + int nscans; + /* Estimate number of scans to set pass_limit. */ + if (cinfo->progressive_mode) { + /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */ + nscans = 2 + 3 * cinfo->num_components; + } else { + /* For a nonprogressive multiscan file, estimate 1 scan per component. */ + nscans = cinfo->num_components; + } + cinfo->progress->pass_counter = 0L; + cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; + cinfo->progress->completed_passes = 0; + cinfo->progress->total_passes = (cinfo->enable_2pass_quant ? 3 : 2); + /* Count the input pass as done */ + master->pass_number++; + } +#endif /* D_MULTISCAN_FILES_SUPPORTED */ +} + + +/* + * Per-pass setup. + * This is called at the beginning of each output pass. We determine which + * modules will be active during this pass and give them appropriate + * start_pass calls. We also set is_dummy_pass to indicate whether this + * is a "real" output pass or a dummy pass for color quantization. + * (In the latter case, jdapi.c will crank the pass to completion.) + */ + +METHODDEF(void) +prepare_for_output_pass (j_decompress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + if (master->pub.is_dummy_pass) { +#ifdef QUANT_2PASS_SUPPORTED + /* Final pass of 2-pass quantization */ + master->pub.is_dummy_pass = FALSE; + (*cinfo->cquantize->start_pass) (cinfo, FALSE); + (*cinfo->post->start_pass) (cinfo, JBUF_CRANK_DEST); + (*cinfo->main->start_pass) (cinfo, JBUF_CRANK_DEST); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif /* QUANT_2PASS_SUPPORTED */ + } else { + if (cinfo->quantize_colors && cinfo->colormap == NULL) { + /* Select new quantization method */ + if (cinfo->two_pass_quantize && cinfo->enable_2pass_quant) { + cinfo->cquantize = master->quantizer_2pass; + master->pub.is_dummy_pass = TRUE; + } else if (cinfo->enable_1pass_quant) { + cinfo->cquantize = master->quantizer_1pass; + } else { + ERREXIT(cinfo, JERR_MODE_CHANGE); + } + } + (*cinfo->idct->start_pass) (cinfo); + (*cinfo->coef->start_output_pass) (cinfo); + if (! cinfo->raw_data_out) { + if (! master->using_merged_upsample) + (*cinfo->cconvert->start_pass) (cinfo); + (*cinfo->upsample->start_pass) (cinfo); + if (cinfo->quantize_colors) + (*cinfo->cquantize->start_pass) (cinfo, master->pub.is_dummy_pass); + (*cinfo->post->start_pass) (cinfo, + (master->pub.is_dummy_pass ? JBUF_SAVE_AND_PASS : JBUF_PASS_THRU)); + (*cinfo->main->start_pass) (cinfo, JBUF_PASS_THRU); + } + } + + /* Set up progress monitor's pass info if present */ + if (cinfo->progress != NULL) { + cinfo->progress->completed_passes = master->pass_number; + cinfo->progress->total_passes = master->pass_number + + (master->pub.is_dummy_pass ? 2 : 1); + /* In buffered-image mode, we assume one more output pass if EOI not + * yet reached, but no more passes if EOI has been reached. + */ + if (cinfo->buffered_image && ! cinfo->inputctl->eoi_reached) { + cinfo->progress->total_passes += (cinfo->enable_2pass_quant ? 2 : 1); + } + } +} + + +/* + * Finish up at end of an output pass. + */ + +METHODDEF(void) +finish_output_pass (j_decompress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + if (cinfo->quantize_colors) + (*cinfo->cquantize->finish_pass) (cinfo); + master->pass_number++; +} + + +#ifdef D_MULTISCAN_FILES_SUPPORTED + +/* + * Switch to a new external colormap between output passes. + */ + +GLOBAL(void) +jpeg_new_colormap (j_decompress_ptr cinfo) +{ + my_master_ptr master = (my_master_ptr) cinfo->master; + + /* Prevent application from calling me at wrong times */ + if (cinfo->global_state != DSTATE_BUFIMAGE) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + + if (cinfo->quantize_colors && cinfo->enable_external_quant && + cinfo->colormap != NULL) { + /* Select 2-pass quantizer for external colormap use */ + cinfo->cquantize = master->quantizer_2pass; + /* Notify quantizer of colormap change */ + (*cinfo->cquantize->new_color_map) (cinfo); + master->pub.is_dummy_pass = FALSE; /* just in case */ + } else + ERREXIT(cinfo, JERR_MODE_CHANGE); +} + +#endif /* D_MULTISCAN_FILES_SUPPORTED */ + + +/* + * Initialize master decompression control and select active modules. + * This is performed at the start of jpeg_start_decompress. + */ + +GLOBAL(void) +jinit_master_decompress (j_decompress_ptr cinfo) +{ + my_master_ptr master; + + master = (my_master_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_decomp_master)); + cinfo->master = (struct jpeg_decomp_master *) master; + master->pub.prepare_for_output_pass = prepare_for_output_pass; + master->pub.finish_output_pass = finish_output_pass; + + master->pub.is_dummy_pass = FALSE; + + master_selection(cinfo); +} diff --git a/windows_libs/jpeg-6a/jdmerge.c b/windows_libs/jpeg-6a/jdmerge.c new file mode 100644 index 00000000..37444468 --- /dev/null +++ b/windows_libs/jpeg-6a/jdmerge.c @@ -0,0 +1,400 @@ +/* + * jdmerge.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains code for merged upsampling/color conversion. + * + * This file combines functions from jdsample.c and jdcolor.c; + * read those files first to understand what's going on. + * + * When the chroma components are to be upsampled by simple replication + * (ie, box filtering), we can save some work in color conversion by + * calculating all the output pixels corresponding to a pair of chroma + * samples at one time. In the conversion equations + * R = Y + K1 * Cr + * G = Y + K2 * Cb + K3 * Cr + * B = Y + K4 * Cb + * only the Y term varies among the group of pixels corresponding to a pair + * of chroma samples, so the rest of the terms can be calculated just once. + * At typical sampling ratios, this eliminates half or three-quarters of the + * multiplications needed for color conversion. + * + * This file currently provides implementations for the following cases: + * YCbCr => RGB color conversion only. + * Sampling ratios of 2h1v or 2h2v. + * No scaling needed at upsample time. + * Corner-aligned (non-CCIR601) sampling alignment. + * Other special cases could be added, but in most applications these are + * the only common cases. (For uncommon cases we fall back on the more + * general code in jdsample.c and jdcolor.c.) + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +#ifdef UPSAMPLE_MERGING_SUPPORTED + + +/* Private subobject */ + +typedef struct { + struct jpeg_upsampler pub; /* public fields */ + + /* Pointer to routine to do actual upsampling/conversion of one row group */ + JMETHOD(void, upmethod, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, + JSAMPARRAY output_buf)); + + /* Private state for YCC->RGB conversion */ + int * Cr_r_tab; /* => table for Cr to R conversion */ + int * Cb_b_tab; /* => table for Cb to B conversion */ + INT32 * Cr_g_tab; /* => table for Cr to G conversion */ + INT32 * Cb_g_tab; /* => table for Cb to G conversion */ + + /* For 2:1 vertical sampling, we produce two output rows at a time. + * We need a "spare" row buffer to hold the second output row if the + * application provides just a one-row buffer; we also use the spare + * to discard the dummy last row if the image height is odd. + */ + JSAMPROW spare_row; + boolean spare_full; /* T if spare buffer is occupied */ + + JDIMENSION out_row_width; /* samples per output row */ + JDIMENSION rows_to_go; /* counts rows remaining in image */ +} my_upsampler; + +typedef my_upsampler * my_upsample_ptr; + +#define SCALEBITS 16 /* speediest right-shift on some machines */ +#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) +#define FIX(x) ((INT32) ((x) * (1L<RGB colorspace conversion. + * This is taken directly from jdcolor.c; see that file for more info. + */ + +LOCAL(void) +build_ycc_rgb_table (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + int i; + INT32 x; + SHIFT_TEMPS + + upsample->Cr_r_tab = (int *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(int)); + upsample->Cb_b_tab = (int *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(int)); + upsample->Cr_g_tab = (INT32 *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(INT32)); + upsample->Cb_g_tab = (INT32 *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (MAXJSAMPLE+1) * SIZEOF(INT32)); + + for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { + /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ + /* The Cb or Cr value we are thinking of is x = i - CENTERJSAMPLE */ + /* Cr=>R value is nearest int to 1.40200 * x */ + upsample->Cr_r_tab[i] = (int) + RIGHT_SHIFT(FIX(1.40200) * x + ONE_HALF, SCALEBITS); + /* Cb=>B value is nearest int to 1.77200 * x */ + upsample->Cb_b_tab[i] = (int) + RIGHT_SHIFT(FIX(1.77200) * x + ONE_HALF, SCALEBITS); + /* Cr=>G value is scaled-up -0.71414 * x */ + upsample->Cr_g_tab[i] = (- FIX(0.71414)) * x; + /* Cb=>G value is scaled-up -0.34414 * x */ + /* We also add in ONE_HALF so that need not do it in inner loop */ + upsample->Cb_g_tab[i] = (- FIX(0.34414)) * x + ONE_HALF; + } +} + + +/* + * Initialize for an upsampling pass. + */ + +METHODDEF(void) +start_pass_merged_upsample (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + + /* Mark the spare buffer empty */ + upsample->spare_full = FALSE; + /* Initialize total-height counter for detecting bottom of image */ + upsample->rows_to_go = cinfo->output_height; +} + + +/* + * Control routine to do upsampling (and color conversion). + * + * The control routine just handles the row buffering considerations. + */ + +METHODDEF(void) +merged_2v_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +/* 2:1 vertical sampling case: may need a spare row. */ +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + JSAMPROW work_ptrs[2]; + JDIMENSION num_rows; /* number of rows returned to caller */ + + if (upsample->spare_full) { + /* If we have a spare row saved from a previous cycle, just return it. */ + jcopy_sample_rows(& upsample->spare_row, 0, output_buf + *out_row_ctr, 0, + 1, upsample->out_row_width); + num_rows = 1; + upsample->spare_full = FALSE; + } else { + /* Figure number of rows to return to caller. */ + num_rows = 2; + /* Not more than the distance to the end of the image. */ + if (num_rows > upsample->rows_to_go) + num_rows = upsample->rows_to_go; + /* And not more than what the client can accept: */ + out_rows_avail -= *out_row_ctr; + if (num_rows > out_rows_avail) + num_rows = out_rows_avail; + /* Create output pointer array for upsampler. */ + work_ptrs[0] = output_buf[*out_row_ctr]; + if (num_rows > 1) { + work_ptrs[1] = output_buf[*out_row_ctr + 1]; + } else { + work_ptrs[1] = upsample->spare_row; + upsample->spare_full = TRUE; + } + /* Now do the upsampling. */ + (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr, work_ptrs); + } + + /* Adjust counts */ + *out_row_ctr += num_rows; + upsample->rows_to_go -= num_rows; + /* When the buffer is emptied, declare this input row group consumed */ + if (! upsample->spare_full) + (*in_row_group_ctr)++; +} + + +METHODDEF(void) +merged_1v_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +/* 1:1 vertical sampling case: much easier, never need a spare row. */ +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + + /* Just do the upsampling. */ + (*upsample->upmethod) (cinfo, input_buf, *in_row_group_ctr, + output_buf + *out_row_ctr); + /* Adjust counts */ + (*out_row_ctr)++; + (*in_row_group_ctr)++; +} + + +/* + * These are the routines invoked by the control routines to do + * the actual upsampling/conversion. One row group is processed per call. + * + * Note: since we may be writing directly into application-supplied buffers, + * we have to be honest about the output width; we can't assume the buffer + * has been rounded up to an even width. + */ + + +/* + * Upsample and color convert for the case of 2:1 horizontal and 1:1 vertical. + */ + +METHODDEF(void) +h2v1_merged_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, + JSAMPARRAY output_buf) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + register int y, cred, cgreen, cblue; + int cb, cr; + register JSAMPROW outptr; + JSAMPROW inptr0, inptr1, inptr2; + JDIMENSION col; + /* copy these pointers into registers if possible */ + register JSAMPLE * range_limit = cinfo->sample_range_limit; + int * Crrtab = upsample->Cr_r_tab; + int * Cbbtab = upsample->Cb_b_tab; + INT32 * Crgtab = upsample->Cr_g_tab; + INT32 * Cbgtab = upsample->Cb_g_tab; + SHIFT_TEMPS + + inptr0 = input_buf[0][in_row_group_ctr]; + inptr1 = input_buf[1][in_row_group_ctr]; + inptr2 = input_buf[2][in_row_group_ctr]; + outptr = output_buf[0]; + /* Loop for each pair of output pixels */ + for (col = cinfo->output_width >> 1; col > 0; col--) { + /* Do the chroma part of the calculation */ + cb = GETJSAMPLE(*inptr1++); + cr = GETJSAMPLE(*inptr2++); + cred = Crrtab[cr]; + cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); + cblue = Cbbtab[cb]; + /* Fetch 2 Y values and emit 2 pixels */ + y = GETJSAMPLE(*inptr0++); + outptr[RGB_RED] = range_limit[y + cred]; + outptr[RGB_GREEN] = range_limit[y + cgreen]; + outptr[RGB_BLUE] = range_limit[y + cblue]; + outptr += RGB_PIXELSIZE; + y = GETJSAMPLE(*inptr0++); + outptr[RGB_RED] = range_limit[y + cred]; + outptr[RGB_GREEN] = range_limit[y + cgreen]; + outptr[RGB_BLUE] = range_limit[y + cblue]; + outptr += RGB_PIXELSIZE; + } + /* If image width is odd, do the last output column separately */ + if (cinfo->output_width & 1) { + cb = GETJSAMPLE(*inptr1); + cr = GETJSAMPLE(*inptr2); + cred = Crrtab[cr]; + cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); + cblue = Cbbtab[cb]; + y = GETJSAMPLE(*inptr0); + outptr[RGB_RED] = range_limit[y + cred]; + outptr[RGB_GREEN] = range_limit[y + cgreen]; + outptr[RGB_BLUE] = range_limit[y + cblue]; + } +} + + +/* + * Upsample and color convert for the case of 2:1 horizontal and 2:1 vertical. + */ + +METHODDEF(void) +h2v2_merged_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_group_ctr, + JSAMPARRAY output_buf) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + register int y, cred, cgreen, cblue; + int cb, cr; + register JSAMPROW outptr0, outptr1; + JSAMPROW inptr00, inptr01, inptr1, inptr2; + JDIMENSION col; + /* copy these pointers into registers if possible */ + register JSAMPLE * range_limit = cinfo->sample_range_limit; + int * Crrtab = upsample->Cr_r_tab; + int * Cbbtab = upsample->Cb_b_tab; + INT32 * Crgtab = upsample->Cr_g_tab; + INT32 * Cbgtab = upsample->Cb_g_tab; + SHIFT_TEMPS + + inptr00 = input_buf[0][in_row_group_ctr*2]; + inptr01 = input_buf[0][in_row_group_ctr*2 + 1]; + inptr1 = input_buf[1][in_row_group_ctr]; + inptr2 = input_buf[2][in_row_group_ctr]; + outptr0 = output_buf[0]; + outptr1 = output_buf[1]; + /* Loop for each group of output pixels */ + for (col = cinfo->output_width >> 1; col > 0; col--) { + /* Do the chroma part of the calculation */ + cb = GETJSAMPLE(*inptr1++); + cr = GETJSAMPLE(*inptr2++); + cred = Crrtab[cr]; + cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); + cblue = Cbbtab[cb]; + /* Fetch 4 Y values and emit 4 pixels */ + y = GETJSAMPLE(*inptr00++); + outptr0[RGB_RED] = range_limit[y + cred]; + outptr0[RGB_GREEN] = range_limit[y + cgreen]; + outptr0[RGB_BLUE] = range_limit[y + cblue]; + outptr0 += RGB_PIXELSIZE; + y = GETJSAMPLE(*inptr00++); + outptr0[RGB_RED] = range_limit[y + cred]; + outptr0[RGB_GREEN] = range_limit[y + cgreen]; + outptr0[RGB_BLUE] = range_limit[y + cblue]; + outptr0 += RGB_PIXELSIZE; + y = GETJSAMPLE(*inptr01++); + outptr1[RGB_RED] = range_limit[y + cred]; + outptr1[RGB_GREEN] = range_limit[y + cgreen]; + outptr1[RGB_BLUE] = range_limit[y + cblue]; + outptr1 += RGB_PIXELSIZE; + y = GETJSAMPLE(*inptr01++); + outptr1[RGB_RED] = range_limit[y + cred]; + outptr1[RGB_GREEN] = range_limit[y + cgreen]; + outptr1[RGB_BLUE] = range_limit[y + cblue]; + outptr1 += RGB_PIXELSIZE; + } + /* If image width is odd, do the last output column separately */ + if (cinfo->output_width & 1) { + cb = GETJSAMPLE(*inptr1); + cr = GETJSAMPLE(*inptr2); + cred = Crrtab[cr]; + cgreen = (int) RIGHT_SHIFT(Cbgtab[cb] + Crgtab[cr], SCALEBITS); + cblue = Cbbtab[cb]; + y = GETJSAMPLE(*inptr00); + outptr0[RGB_RED] = range_limit[y + cred]; + outptr0[RGB_GREEN] = range_limit[y + cgreen]; + outptr0[RGB_BLUE] = range_limit[y + cblue]; + y = GETJSAMPLE(*inptr01); + outptr1[RGB_RED] = range_limit[y + cred]; + outptr1[RGB_GREEN] = range_limit[y + cgreen]; + outptr1[RGB_BLUE] = range_limit[y + cblue]; + } +} + + +/* + * Module initialization routine for merged upsampling/color conversion. + * + * NB: this is called under the conditions determined by use_merged_upsample() + * in jdmaster.c. That routine MUST correspond to the actual capabilities + * of this module; no safety checks are made here. + */ + +GLOBAL(void) +jinit_merged_upsampler (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample; + + upsample = (my_upsample_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_upsampler)); + cinfo->upsample = (struct jpeg_upsampler *) upsample; + upsample->pub.start_pass = start_pass_merged_upsample; + upsample->pub.need_context_rows = FALSE; + + upsample->out_row_width = cinfo->output_width * cinfo->out_color_components; + + if (cinfo->max_v_samp_factor == 2) { + upsample->pub.upsample = merged_2v_upsample; + upsample->upmethod = h2v2_merged_upsample; + /* Allocate a spare row buffer */ + upsample->spare_row = (JSAMPROW) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (size_t) (upsample->out_row_width * SIZEOF(JSAMPLE))); + } else { + upsample->pub.upsample = merged_1v_upsample; + upsample->upmethod = h2v1_merged_upsample; + /* No spare row needed */ + upsample->spare_row = NULL; + } + + build_ycc_rgb_table(cinfo); +} + +#endif /* UPSAMPLE_MERGING_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/jdphuff.c b/windows_libs/jpeg-6a/jdphuff.c new file mode 100644 index 00000000..f6a89f34 --- /dev/null +++ b/windows_libs/jpeg-6a/jdphuff.c @@ -0,0 +1,642 @@ +/* + * jdphuff.c + * + * Copyright (C) 1995-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains Huffman entropy decoding routines for progressive JPEG. + * + * Much of the complexity here has to do with supporting input suspension. + * If the data source module demands suspension, we want to be able to back + * up to the start of the current MCU. To do this, we copy state variables + * into local working storage, and update them back to the permanent + * storage only upon successful completion of an MCU. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdhuff.h" /* Declarations shared with jdhuff.c */ + + +#ifdef D_PROGRESSIVE_SUPPORTED + +/* + * Expanded entropy decoder object for progressive Huffman decoding. + * + * The savable_state subrecord contains fields that change within an MCU, + * but must not be updated permanently until we complete the MCU. + */ + +typedef struct { + unsigned int EOBRUN; /* remaining EOBs in EOBRUN */ + int last_dc_val[MAX_COMPS_IN_SCAN]; /* last DC coef for each component */ +} savable_state; + +/* This macro is to work around compilers with missing or broken + * structure assignment. You'll need to fix this code if you have + * such a compiler and you change MAX_COMPS_IN_SCAN. + */ + +#ifndef NO_STRUCT_ASSIGN +#define ASSIGN_STATE(dest,src) ((dest) = (src)) +#else +#if MAX_COMPS_IN_SCAN == 4 +#define ASSIGN_STATE(dest,src) \ + ((dest).EOBRUN = (src).EOBRUN, \ + (dest).last_dc_val[0] = (src).last_dc_val[0], \ + (dest).last_dc_val[1] = (src).last_dc_val[1], \ + (dest).last_dc_val[2] = (src).last_dc_val[2], \ + (dest).last_dc_val[3] = (src).last_dc_val[3]) +#endif +#endif + + +typedef struct { + struct jpeg_entropy_decoder pub; /* public fields */ + + /* These fields are loaded into local variables at start of each MCU. + * In case of suspension, we exit WITHOUT updating them. + */ + bitread_perm_state bitstate; /* Bit buffer at start of MCU */ + savable_state saved; /* Other state at start of MCU */ + + /* These fields are NOT loaded into local working state. */ + unsigned int restarts_to_go; /* MCUs left in this restart interval */ + + /* Pointers to derived tables (these workspaces have image lifespan) */ + d_derived_tbl * derived_tbls[NUM_HUFF_TBLS]; + + d_derived_tbl * ac_derived_tbl; /* active table during an AC scan */ +} phuff_entropy_decoder; + +typedef phuff_entropy_decoder * phuff_entropy_ptr; + +/* Forward declarations */ +METHODDEF(boolean) decode_mcu_DC_first JPP((j_decompress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(boolean) decode_mcu_AC_first JPP((j_decompress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(boolean) decode_mcu_DC_refine JPP((j_decompress_ptr cinfo, + JBLOCKROW *MCU_data)); +METHODDEF(boolean) decode_mcu_AC_refine JPP((j_decompress_ptr cinfo, + JBLOCKROW *MCU_data)); + + +/* + * Initialize for a Huffman-compressed scan. + */ + +METHODDEF(void) +start_pass_phuff_decoder (j_decompress_ptr cinfo) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + boolean is_DC_band, bad; + int ci, coefi, tbl; + int *coef_bit_ptr; + jpeg_component_info * compptr; + + is_DC_band = (cinfo->Ss == 0); + + /* Validate scan parameters */ + bad = FALSE; + if (is_DC_band) { + if (cinfo->Se != 0) + bad = TRUE; + } else { + /* need not check Ss/Se < 0 since they came from unsigned bytes */ + if (cinfo->Ss > cinfo->Se || cinfo->Se >= DCTSIZE2) + bad = TRUE; + /* AC scans may have only one component */ + if (cinfo->comps_in_scan != 1) + bad = TRUE; + } + if (cinfo->Ah != 0) { + /* Successive approximation refinement scan: must have Al = Ah-1. */ + if (cinfo->Al != cinfo->Ah-1) + bad = TRUE; + } + if (cinfo->Al > 13) /* need not check for < 0 */ + bad = TRUE; + if (bad) + ERREXIT4(cinfo, JERR_BAD_PROGRESSION, + cinfo->Ss, cinfo->Se, cinfo->Ah, cinfo->Al); + /* Update progression status, and verify that scan order is legal. + * Note that inter-scan inconsistencies are treated as warnings + * not fatal errors ... not clear if this is right way to behave. + */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + int cindex = cinfo->cur_comp_info[ci]->component_index; + coef_bit_ptr = & cinfo->coef_bits[cindex][0]; + if (!is_DC_band && coef_bit_ptr[0] < 0) /* AC without prior DC scan */ + WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, 0); + for (coefi = cinfo->Ss; coefi <= cinfo->Se; coefi++) { + int expected = (coef_bit_ptr[coefi] < 0) ? 0 : coef_bit_ptr[coefi]; + if (cinfo->Ah != expected) + WARNMS2(cinfo, JWRN_BOGUS_PROGRESSION, cindex, coefi); + coef_bit_ptr[coefi] = cinfo->Al; + } + } + + /* Select MCU decoding routine */ + if (cinfo->Ah == 0) { + if (is_DC_band) + entropy->pub.decode_mcu = decode_mcu_DC_first; + else + entropy->pub.decode_mcu = decode_mcu_AC_first; + } else { + if (is_DC_band) + entropy->pub.decode_mcu = decode_mcu_DC_refine; + else + entropy->pub.decode_mcu = decode_mcu_AC_refine; + } + + for (ci = 0; ci < cinfo->comps_in_scan; ci++) { + compptr = cinfo->cur_comp_info[ci]; + /* Make sure requested tables are present, and compute derived tables. + * We may build same derived table more than once, but it's not expensive. + */ + if (is_DC_band) { + if (cinfo->Ah == 0) { /* DC refinement needs no table */ + tbl = compptr->dc_tbl_no; + if (tbl < 0 || tbl >= NUM_HUFF_TBLS || + cinfo->dc_huff_tbl_ptrs[tbl] == NULL) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl); + jpeg_make_d_derived_tbl(cinfo, cinfo->dc_huff_tbl_ptrs[tbl], + & entropy->derived_tbls[tbl]); + } + } else { + tbl = compptr->ac_tbl_no; + if (tbl < 0 || tbl >= NUM_HUFF_TBLS || + cinfo->ac_huff_tbl_ptrs[tbl] == NULL) + ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, tbl); + jpeg_make_d_derived_tbl(cinfo, cinfo->ac_huff_tbl_ptrs[tbl], + & entropy->derived_tbls[tbl]); + /* remember the single active table */ + entropy->ac_derived_tbl = entropy->derived_tbls[tbl]; + } + /* Initialize DC predictions to 0 */ + entropy->saved.last_dc_val[ci] = 0; + } + + /* Initialize bitread state variables */ + entropy->bitstate.bits_left = 0; + entropy->bitstate.get_buffer = 0; /* unnecessary, but keeps Purify quiet */ + entropy->bitstate.printed_eod = FALSE; + + /* Initialize private state variables */ + entropy->saved.EOBRUN = 0; + + /* Initialize restart counter */ + entropy->restarts_to_go = cinfo->restart_interval; +} + + +/* + * Figure F.12: extend sign bit. + * On some machines, a shift and add will be faster than a table lookup. + */ + +#ifdef AVOID_TABLES + +#define HUFF_EXTEND(x,s) ((x) < (1<<((s)-1)) ? (x) + (((-1)<<(s)) + 1) : (x)) + +#else + +#define HUFF_EXTEND(x,s) ((x) < extend_test[s] ? (x) + extend_offset[s] : (x)) + +static const int extend_test[16] = /* entry n is 2**(n-1) */ + { 0, 0x0001, 0x0002, 0x0004, 0x0008, 0x0010, 0x0020, 0x0040, 0x0080, + 0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000 }; + +static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */ + { 0, ((-1)<<1) + 1, ((-1)<<2) + 1, ((-1)<<3) + 1, ((-1)<<4) + 1, + ((-1)<<5) + 1, ((-1)<<6) + 1, ((-1)<<7) + 1, ((-1)<<8) + 1, + ((-1)<<9) + 1, ((-1)<<10) + 1, ((-1)<<11) + 1, ((-1)<<12) + 1, + ((-1)<<13) + 1, ((-1)<<14) + 1, ((-1)<<15) + 1 }; + +#endif /* AVOID_TABLES */ + + +/* + * Check for a restart marker & resynchronize decoder. + * Returns FALSE if must suspend. + */ + +LOCAL(boolean) +process_restart (j_decompress_ptr cinfo) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + int ci; + + /* Throw away any unused bits remaining in bit buffer; */ + /* include any full bytes in next_marker's count of discarded bytes */ + cinfo->marker->discarded_bytes += entropy->bitstate.bits_left / 8; + entropy->bitstate.bits_left = 0; + + /* Advance past the RSTn marker */ + if (! (*cinfo->marker->read_restart_marker) (cinfo)) + return FALSE; + + /* Re-initialize DC predictions to 0 */ + for (ci = 0; ci < cinfo->comps_in_scan; ci++) + entropy->saved.last_dc_val[ci] = 0; + /* Re-init EOB run count, too */ + entropy->saved.EOBRUN = 0; + + /* Reset restart counter */ + entropy->restarts_to_go = cinfo->restart_interval; + + /* Next segment can get another out-of-data warning */ + entropy->bitstate.printed_eod = FALSE; + + return TRUE; +} + + +/* + * Huffman MCU decoding. + * Each of these routines decodes and returns one MCU's worth of + * Huffman-compressed coefficients. + * The coefficients are reordered from zigzag order into natural array order, + * but are not dequantized. + * + * The i'th block of the MCU is stored into the block pointed to by + * MCU_data[i]. WE ASSUME THIS AREA IS INITIALLY ZEROED BY THE CALLER. + * + * We return FALSE if data source requested suspension. In that case no + * changes have been made to permanent state. (Exception: some output + * coefficients may already have been assigned. This is harmless for + * spectral selection, since we'll just re-assign them on the next call. + * Successive approximation AC refinement has to be more careful, however.) + */ + +/* + * MCU decoding for DC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(boolean) +decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + int Al = cinfo->Al; + register int s, r; + int blkn, ci; + JBLOCKROW block; + BITREAD_STATE_VARS; + savable_state state; + d_derived_tbl * tbl; + jpeg_component_info * compptr; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo,entropy->bitstate); + ASSIGN_STATE(state, entropy->saved); + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + ci = cinfo->MCU_membership[blkn]; + compptr = cinfo->cur_comp_info[ci]; + tbl = entropy->derived_tbls[compptr->dc_tbl_no]; + + /* Decode a single block's worth of coefficients */ + + /* Section F.2.2.1: decode the DC coefficient difference */ + HUFF_DECODE(s, br_state, tbl, return FALSE, label1); + if (s) { + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + } + + /* Convert DC difference to actual value, update last_dc_val */ + s += state.last_dc_val[ci]; + state.last_dc_val[ci] = s; + /* Scale and output the DC coefficient (assumes jpeg_natural_order[0]=0) */ + (*block)[0] = (JCOEF) (s << Al); + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo,entropy->bitstate); + ASSIGN_STATE(entropy->saved, state); + + /* Account for restart interval (no-op if not using restarts) */ + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * MCU decoding for AC initial scan (either spectral selection, + * or first pass of successive approximation). + */ + +METHODDEF(boolean) +decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + int Se = cinfo->Se; + int Al = cinfo->Al; + register int s, k, r; + unsigned int EOBRUN; + JBLOCKROW block; + BITREAD_STATE_VARS; + d_derived_tbl * tbl; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* Load up working state. + * We can avoid loading/saving bitread state if in an EOB run. + */ + EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we care about */ + + /* There is always only one block per MCU */ + + if (EOBRUN > 0) /* if it's a band of zeroes... */ + EOBRUN--; /* ...process it now (we do nothing) */ + else { + BITREAD_LOAD_STATE(cinfo,entropy->bitstate); + block = MCU_data[0]; + tbl = entropy->ac_derived_tbl; + + for (k = cinfo->Ss; k <= Se; k++) { + HUFF_DECODE(s, br_state, tbl, return FALSE, label2); + r = s >> 4; + s &= 15; + if (s) { + k += r; + CHECK_BIT_BUFFER(br_state, s, return FALSE); + r = GET_BITS(s); + s = HUFF_EXTEND(r, s); + /* Scale and output coefficient in natural (dezigzagged) order */ + (*block)[jpeg_natural_order[k]] = (JCOEF) (s << Al); + } else { + if (r == 15) { /* ZRL */ + k += 15; /* skip 15 zeroes in band */ + } else { /* EOBr, run length is 2^r + appended bits */ + EOBRUN = 1 << r; + if (r) { /* EOBr, r > 0 */ + CHECK_BIT_BUFFER(br_state, r, return FALSE); + r = GET_BITS(r); + EOBRUN += r; + } + EOBRUN--; /* this band is processed at this moment */ + break; /* force end-of-band */ + } + } + } + + BITREAD_SAVE_STATE(cinfo,entropy->bitstate); + } + + /* Completed MCU, so update state */ + entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we care about */ + + /* Account for restart interval (no-op if not using restarts) */ + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * MCU decoding for DC successive approximation refinement scan. + * Note: we assume such scans can be multi-component, although the spec + * is not very clear on the point. + */ + +METHODDEF(boolean) +decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ + int blkn; + JBLOCKROW block; + BITREAD_STATE_VARS; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo,entropy->bitstate); + + /* Outer loop handles each block in the MCU */ + + for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { + block = MCU_data[blkn]; + + /* Encoded data is simply the next bit of the two's-complement DC value */ + CHECK_BIT_BUFFER(br_state, 1, return FALSE); + if (GET_BITS(1)) + (*block)[0] |= p1; + /* Note: since we use |=, repeating the assignment later is safe */ + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo,entropy->bitstate); + + /* Account for restart interval (no-op if not using restarts) */ + entropy->restarts_to_go--; + + return TRUE; +} + + +/* + * MCU decoding for AC successive approximation refinement scan. + */ + +METHODDEF(boolean) +decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) +{ + phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; + int Se = cinfo->Se; + int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */ + int m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */ + register int s, k, r; + unsigned int EOBRUN; + JBLOCKROW block; + JCOEFPTR thiscoef; + BITREAD_STATE_VARS; + d_derived_tbl * tbl; + int num_newnz; + int newnz_pos[DCTSIZE2]; + + /* Process restart marker if needed; may have to suspend */ + if (cinfo->restart_interval) { + if (entropy->restarts_to_go == 0) + if (! process_restart(cinfo)) + return FALSE; + } + + /* Load up working state */ + BITREAD_LOAD_STATE(cinfo,entropy->bitstate); + EOBRUN = entropy->saved.EOBRUN; /* only part of saved state we care about */ + + /* There is always only one block per MCU */ + block = MCU_data[0]; + tbl = entropy->ac_derived_tbl; + + /* If we are forced to suspend, we must undo the assignments to any newly + * nonzero coefficients in the block, because otherwise we'd get confused + * next time about which coefficients were already nonzero. + * But we need not undo addition of bits to already-nonzero coefficients; + * instead, we can test the current bit position to see if we already did it. + */ + num_newnz = 0; + + /* initialize coefficient loop counter to start of band */ + k = cinfo->Ss; + + if (EOBRUN == 0) { + for (; k <= Se; k++) { + HUFF_DECODE(s, br_state, tbl, goto undoit, label3); + r = s >> 4; + s &= 15; + if (s) { + if (s != 1) /* size of new coef should always be 1 */ + WARNMS(cinfo, JWRN_HUFF_BAD_CODE); + CHECK_BIT_BUFFER(br_state, 1, goto undoit); + if (GET_BITS(1)) + s = p1; /* newly nonzero coef is positive */ + else + s = m1; /* newly nonzero coef is negative */ + } else { + if (r != 15) { + EOBRUN = 1 << r; /* EOBr, run length is 2^r + appended bits */ + if (r) { + CHECK_BIT_BUFFER(br_state, r, goto undoit); + r = GET_BITS(r); + EOBRUN += r; + } + break; /* rest of block is handled by EOB logic */ + } + /* note s = 0 for processing ZRL */ + } + /* Advance over already-nonzero coefs and r still-zero coefs, + * appending correction bits to the nonzeroes. A correction bit is 1 + * if the absolute value of the coefficient must be increased. + */ + do { + thiscoef = *block + jpeg_natural_order[k]; + if (*thiscoef != 0) { + CHECK_BIT_BUFFER(br_state, 1, goto undoit); + if (GET_BITS(1)) { + if ((*thiscoef & p1) == 0) { /* do nothing if already changed it */ + if (*thiscoef >= 0) + *thiscoef += p1; + else + *thiscoef += m1; + } + } + } else { + if (--r < 0) + break; /* reached target zero coefficient */ + } + k++; + } while (k <= Se); + if (s) { + int pos = jpeg_natural_order[k]; + /* Output newly nonzero coefficient */ + (*block)[pos] = (JCOEF) s; + /* Remember its position in case we have to suspend */ + newnz_pos[num_newnz++] = pos; + } + } + } + + if (EOBRUN > 0) { + /* Scan any remaining coefficient positions after the end-of-band + * (the last newly nonzero coefficient, if any). Append a correction + * bit to each already-nonzero coefficient. A correction bit is 1 + * if the absolute value of the coefficient must be increased. + */ + for (; k <= Se; k++) { + thiscoef = *block + jpeg_natural_order[k]; + if (*thiscoef != 0) { + CHECK_BIT_BUFFER(br_state, 1, goto undoit); + if (GET_BITS(1)) { + if ((*thiscoef & p1) == 0) { /* do nothing if already changed it */ + if (*thiscoef >= 0) + *thiscoef += p1; + else + *thiscoef += m1; + } + } + } + } + /* Count one block completed in EOB run */ + EOBRUN--; + } + + /* Completed MCU, so update state */ + BITREAD_SAVE_STATE(cinfo,entropy->bitstate); + entropy->saved.EOBRUN = EOBRUN; /* only part of saved state we care about */ + + /* Account for restart interval (no-op if not using restarts) */ + entropy->restarts_to_go--; + + return TRUE; + +undoit: + /* Re-zero any output coefficients that we made newly nonzero */ + while (num_newnz > 0) + (*block)[newnz_pos[--num_newnz]] = 0; + + return FALSE; +} + + +/* + * Module initialization routine for progressive Huffman entropy decoding. + */ + +GLOBAL(void) +jinit_phuff_decoder (j_decompress_ptr cinfo) +{ + phuff_entropy_ptr entropy; + int *coef_bit_ptr; + int ci, i; + + entropy = (phuff_entropy_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(phuff_entropy_decoder)); + cinfo->entropy = (struct jpeg_entropy_decoder *) entropy; + entropy->pub.start_pass = start_pass_phuff_decoder; + + /* Mark derived tables unallocated */ + for (i = 0; i < NUM_HUFF_TBLS; i++) { + entropy->derived_tbls[i] = NULL; + } + + /* Create progression status table */ + cinfo->coef_bits = (int (*)[DCTSIZE2]) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->num_components*DCTSIZE2*SIZEOF(int)); + coef_bit_ptr = & cinfo->coef_bits[0][0]; + for (ci = 0; ci < cinfo->num_components; ci++) + for (i = 0; i < DCTSIZE2; i++) + *coef_bit_ptr++ = -1; +} + +#endif /* D_PROGRESSIVE_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/jdpostct.c b/windows_libs/jpeg-6a/jdpostct.c new file mode 100644 index 00000000..571563d7 --- /dev/null +++ b/windows_libs/jpeg-6a/jdpostct.c @@ -0,0 +1,290 @@ +/* + * jdpostct.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the decompression postprocessing controller. + * This controller manages the upsampling, color conversion, and color + * quantization/reduction steps; specifically, it controls the buffering + * between upsample/color conversion and color quantization/reduction. + * + * If no color quantization/reduction is required, then this module has no + * work to do, and it just hands off to the upsample/color conversion code. + * An integrated upsample/convert/quantize process would replace this module + * entirely. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Private buffer controller object */ + +typedef struct { + struct jpeg_d_post_controller pub; /* public fields */ + + /* Color quantization source buffer: this holds output data from + * the upsample/color conversion step to be passed to the quantizer. + * For two-pass color quantization, we need a full-image buffer; + * for one-pass operation, a strip buffer is sufficient. + */ + jvirt_sarray_ptr whole_image; /* virtual array, or NULL if one-pass */ + JSAMPARRAY buffer; /* strip buffer, or current strip of virtual */ + JDIMENSION strip_height; /* buffer size in rows */ + /* for two-pass mode only: */ + JDIMENSION starting_row; /* row # of first row in current strip */ + JDIMENSION next_row; /* index of next row to fill/empty in strip */ +} my_post_controller; + +typedef my_post_controller * my_post_ptr; + + +/* Forward declarations */ +METHODDEF(void) post_process_1pass + JPP((j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +#ifdef QUANT_2PASS_SUPPORTED +METHODDEF(void) post_process_prepass + JPP((j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +METHODDEF(void) post_process_2pass + JPP((j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +#endif + + +/* + * Initialize for a processing pass. + */ + +METHODDEF(void) +start_pass_dpost (j_decompress_ptr cinfo, J_BUF_MODE pass_mode) +{ + my_post_ptr post = (my_post_ptr) cinfo->post; + + switch (pass_mode) { + case JBUF_PASS_THRU: + if (cinfo->quantize_colors) { + /* Single-pass processing with color quantization. */ + post->pub.post_process_data = post_process_1pass; + /* We could be doing buffered-image output before starting a 2-pass + * color quantization; in that case, jinit_d_post_controller did not + * allocate a strip buffer. Use the virtual-array buffer as workspace. + */ + if (post->buffer == NULL) { + post->buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, post->whole_image, + (JDIMENSION) 0, post->strip_height, TRUE); + } + } else { + /* For single-pass processing without color quantization, + * I have no work to do; just call the upsampler directly. + */ + post->pub.post_process_data = cinfo->upsample->upsample; + } + break; +#ifdef QUANT_2PASS_SUPPORTED + case JBUF_SAVE_AND_PASS: + /* First pass of 2-pass quantization */ + if (post->whole_image == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + post->pub.post_process_data = post_process_prepass; + break; + case JBUF_CRANK_DEST: + /* Second pass of 2-pass quantization */ + if (post->whole_image == NULL) + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + post->pub.post_process_data = post_process_2pass; + break; +#endif /* QUANT_2PASS_SUPPORTED */ + default: + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); + break; + } + post->starting_row = post->next_row = 0; +} + + +/* + * Process some data in the one-pass (strip buffer) case. + * This is used for color precision reduction as well as one-pass quantization. + */ + +METHODDEF(void) +post_process_1pass (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION num_rows, max_rows; + + /* Fill the buffer, but not more than what we can dump out in one go. */ + /* Note we rely on the upsampler to detect bottom of image. */ + max_rows = out_rows_avail - *out_row_ctr; + if (max_rows > post->strip_height) + max_rows = post->strip_height; + num_rows = 0; + (*cinfo->upsample->upsample) (cinfo, + input_buf, in_row_group_ctr, in_row_groups_avail, + post->buffer, &num_rows, max_rows); + /* Quantize and emit data. */ + (*cinfo->cquantize->color_quantize) (cinfo, + post->buffer, output_buf + *out_row_ctr, (int) num_rows); + *out_row_ctr += num_rows; +} + + +#ifdef QUANT_2PASS_SUPPORTED + +/* + * Process some data in the first pass of 2-pass quantization. + */ + +METHODDEF(void) +post_process_prepass (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION old_next_row, num_rows; + + /* Reposition virtual buffer if at start of strip. */ + if (post->next_row == 0) { + post->buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, post->whole_image, + post->starting_row, post->strip_height, TRUE); + } + + /* Upsample some data (up to a strip height's worth). */ + old_next_row = post->next_row; + (*cinfo->upsample->upsample) (cinfo, + input_buf, in_row_group_ctr, in_row_groups_avail, + post->buffer, &post->next_row, post->strip_height); + + /* Allow quantizer to scan new data. No data is emitted, */ + /* but we advance out_row_ctr so outer loop can tell when we're done. */ + if (post->next_row > old_next_row) { + num_rows = post->next_row - old_next_row; + (*cinfo->cquantize->color_quantize) (cinfo, post->buffer + old_next_row, + (JSAMPARRAY) NULL, (int) num_rows); + *out_row_ctr += num_rows; + } + + /* Advance if we filled the strip. */ + if (post->next_row >= post->strip_height) { + post->starting_row += post->strip_height; + post->next_row = 0; + } +} + + +/* + * Process some data in the second pass of 2-pass quantization. + */ + +METHODDEF(void) +post_process_2pass (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_post_ptr post = (my_post_ptr) cinfo->post; + JDIMENSION num_rows, max_rows; + + /* Reposition virtual buffer if at start of strip. */ + if (post->next_row == 0) { + post->buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, post->whole_image, + post->starting_row, post->strip_height, FALSE); + } + + /* Determine number of rows to emit. */ + num_rows = post->strip_height - post->next_row; /* available in strip */ + max_rows = out_rows_avail - *out_row_ctr; /* available in output area */ + if (num_rows > max_rows) + num_rows = max_rows; + /* We have to check bottom of image here, can't depend on upsampler. */ + max_rows = cinfo->output_height - post->starting_row; + if (num_rows > max_rows) + num_rows = max_rows; + + /* Quantize and emit data. */ + (*cinfo->cquantize->color_quantize) (cinfo, + post->buffer + post->next_row, output_buf + *out_row_ctr, + (int) num_rows); + *out_row_ctr += num_rows; + + /* Advance if we filled the strip. */ + post->next_row += num_rows; + if (post->next_row >= post->strip_height) { + post->starting_row += post->strip_height; + post->next_row = 0; + } +} + +#endif /* QUANT_2PASS_SUPPORTED */ + + +/* + * Initialize postprocessing controller. + */ + +GLOBAL(void) +jinit_d_post_controller (j_decompress_ptr cinfo, boolean need_full_buffer) +{ + my_post_ptr post; + + post = (my_post_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_post_controller)); + cinfo->post = (struct jpeg_d_post_controller *) post; + post->pub.start_pass = start_pass_dpost; + post->whole_image = NULL; /* flag for no virtual arrays */ + post->buffer = NULL; /* flag for no strip buffer */ + + /* Create the quantization buffer, if needed */ + if (cinfo->quantize_colors) { + /* The buffer strip height is max_v_samp_factor, which is typically + * an efficient number of rows for upsampling to return. + * (In the presence of output rescaling, we might want to be smarter?) + */ + post->strip_height = (JDIMENSION) cinfo->max_v_samp_factor; + if (need_full_buffer) { + /* Two-pass color quantization: need full-image storage. */ + /* We round up the number of rows to a multiple of the strip height. */ +#ifdef QUANT_2PASS_SUPPORTED + post->whole_image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + cinfo->output_width * cinfo->out_color_components, + (JDIMENSION) jround_up((long) cinfo->output_height, + (long) post->strip_height), + post->strip_height); +#else + ERREXIT(cinfo, JERR_BAD_BUFFER_MODE); +#endif /* QUANT_2PASS_SUPPORTED */ + } else { + /* One-pass color quantization: just make a strip buffer. */ + post->buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->output_width * cinfo->out_color_components, + post->strip_height); + } + } +} diff --git a/windows_libs/jpeg-6a/jdsample.c b/windows_libs/jpeg-6a/jdsample.c new file mode 100644 index 00000000..80ffefb2 --- /dev/null +++ b/windows_libs/jpeg-6a/jdsample.c @@ -0,0 +1,478 @@ +/* + * jdsample.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains upsampling routines. + * + * Upsampling input data is counted in "row groups". A row group + * is defined to be (v_samp_factor * DCT_scaled_size / min_DCT_scaled_size) + * sample rows of each component. Upsampling will normally produce + * max_v_samp_factor pixel rows from each row group (but this could vary + * if the upsampler is applying a scale factor of its own). + * + * An excellent reference for image resampling is + * Digital Image Warping, George Wolberg, 1990. + * Pub. by IEEE Computer Society Press, Los Alamitos, CA. ISBN 0-8186-8944-7. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Pointer to routine to upsample a single component */ +typedef JMETHOD(void, upsample1_ptr, + (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)); + +/* Private subobject */ + +typedef struct { + struct jpeg_upsampler pub; /* public fields */ + + /* Color conversion buffer. When using separate upsampling and color + * conversion steps, this buffer holds one upsampled row group until it + * has been color converted and output. + * Note: we do not allocate any storage for component(s) which are full-size, + * ie do not need rescaling. The corresponding entry of color_buf[] is + * simply set to point to the input data array, thereby avoiding copying. + */ + JSAMPARRAY color_buf[MAX_COMPONENTS]; + + /* Per-component upsampling method pointers */ + upsample1_ptr methods[MAX_COMPONENTS]; + + int next_row_out; /* counts rows emitted from color_buf */ + JDIMENSION rows_to_go; /* counts rows remaining in image */ + + /* Height of an input row group for each component. */ + int rowgroup_height[MAX_COMPONENTS]; + + /* These arrays save pixel expansion factors so that int_expand need not + * recompute them each time. They are unused for other upsampling methods. + */ + UINT8 h_expand[MAX_COMPONENTS]; + UINT8 v_expand[MAX_COMPONENTS]; +} my_upsampler; + +typedef my_upsampler * my_upsample_ptr; + + +/* + * Initialize for an upsampling pass. + */ + +METHODDEF(void) +start_pass_upsample (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + + /* Mark the conversion buffer empty */ + upsample->next_row_out = cinfo->max_v_samp_factor; + /* Initialize total-height counter for detecting bottom of image */ + upsample->rows_to_go = cinfo->output_height; +} + + +/* + * Control routine to do upsampling (and color conversion). + * + * In this version we upsample each component independently. + * We upsample one row group into the conversion buffer, then apply + * color conversion a row at a time. + */ + +METHODDEF(void) +sep_upsample (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + int ci; + jpeg_component_info * compptr; + JDIMENSION num_rows; + + /* Fill the conversion buffer, if it's empty */ + if (upsample->next_row_out >= cinfo->max_v_samp_factor) { + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Invoke per-component upsample method. Notice we pass a POINTER + * to color_buf[ci], so that fullsize_upsample can change it. + */ + (*upsample->methods[ci]) (cinfo, compptr, + input_buf[ci] + (*in_row_group_ctr * upsample->rowgroup_height[ci]), + upsample->color_buf + ci); + } + upsample->next_row_out = 0; + } + + /* Color-convert and emit rows */ + + /* How many we have in the buffer: */ + num_rows = (JDIMENSION) (cinfo->max_v_samp_factor - upsample->next_row_out); + /* Not more than the distance to the end of the image. Need this test + * in case the image height is not a multiple of max_v_samp_factor: + */ + if (num_rows > upsample->rows_to_go) + num_rows = upsample->rows_to_go; + /* And not more than what the client can accept: */ + out_rows_avail -= *out_row_ctr; + if (num_rows > out_rows_avail) + num_rows = out_rows_avail; + + (*cinfo->cconvert->color_convert) (cinfo, upsample->color_buf, + (JDIMENSION) upsample->next_row_out, + output_buf + *out_row_ctr, + (int) num_rows); + + /* Adjust counts */ + *out_row_ctr += num_rows; + upsample->rows_to_go -= num_rows; + upsample->next_row_out += num_rows; + /* When the buffer is emptied, declare this input row group consumed */ + if (upsample->next_row_out >= cinfo->max_v_samp_factor) + (*in_row_group_ctr)++; +} + + +/* + * These are the routines invoked by sep_upsample to upsample pixel values + * of a single component. One row group is processed per call. + */ + + +/* + * For full-size components, we just make color_buf[ci] point at the + * input buffer, and thus avoid copying any data. Note that this is + * safe only because sep_upsample doesn't declare the input row group + * "consumed" until we are done color converting and emitting it. + */ + +METHODDEF(void) +fullsize_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + *output_data_ptr = input_data; +} + + +/* + * This is a no-op version used for "uninteresting" components. + * These components will not be referenced by color conversion. + */ + +METHODDEF(void) +noop_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + *output_data_ptr = NULL; /* safety check */ +} + + +/* + * This version handles any integral sampling ratios. + * This is not used for typical JPEG files, so it need not be fast. + * Nor, for that matter, is it particularly accurate: the algorithm is + * simple replication of the input pixel onto the corresponding output + * pixels. The hi-falutin sampling literature refers to this as a + * "box filter". A box filter tends to introduce visible artifacts, + * so if you are actually going to use 3:1 or 4:1 sampling ratios + * you would be well advised to improve this code. + */ + +METHODDEF(void) +int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; + register int h; + JSAMPROW outend; + int h_expand, v_expand; + int inrow, outrow; + + h_expand = upsample->h_expand[compptr->component_index]; + v_expand = upsample->v_expand[compptr->component_index]; + + inrow = outrow = 0; + while (outrow < cinfo->max_v_samp_factor) { + /* Generate one output row with proper horizontal expansion */ + inptr = input_data[inrow]; + outptr = output_data[outrow]; + outend = outptr + cinfo->output_width; + while (outptr < outend) { + invalue = *inptr++; /* don't need GETJSAMPLE() here */ + for (h = h_expand; h > 0; h--) { + *outptr++ = invalue; + } + } + /* Generate any additional output rows by duplicating the first one */ + if (v_expand > 1) { + jcopy_sample_rows(output_data, outrow, output_data, outrow+1, + v_expand-1, cinfo->output_width); + } + inrow++; + outrow += v_expand; + } +} + + +/* + * Fast processing for the common case of 2:1 horizontal and 1:1 vertical. + * It's still a box filter. + */ + +METHODDEF(void) +h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; + JSAMPROW outend; + int inrow; + + for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) { + inptr = input_data[inrow]; + outptr = output_data[inrow]; + outend = outptr + cinfo->output_width; + while (outptr < outend) { + invalue = *inptr++; /* don't need GETJSAMPLE() here */ + *outptr++ = invalue; + *outptr++ = invalue; + } + } +} + + +/* + * Fast processing for the common case of 2:1 horizontal and 2:1 vertical. + * It's still a box filter. + */ + +METHODDEF(void) +h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register JSAMPLE invalue; + JSAMPROW outend; + int inrow, outrow; + + inrow = outrow = 0; + while (outrow < cinfo->max_v_samp_factor) { + inptr = input_data[inrow]; + outptr = output_data[outrow]; + outend = outptr + cinfo->output_width; + while (outptr < outend) { + invalue = *inptr++; /* don't need GETJSAMPLE() here */ + *outptr++ = invalue; + *outptr++ = invalue; + } + jcopy_sample_rows(output_data, outrow, output_data, outrow+1, + 1, cinfo->output_width); + inrow++; + outrow += 2; + } +} + + +/* + * Fancy processing for the common case of 2:1 horizontal and 1:1 vertical. + * + * The upsampling algorithm is linear interpolation between pixel centers, + * also known as a "triangle filter". This is a good compromise between + * speed and visual quality. The centers of the output pixels are 1/4 and 3/4 + * of the way between input pixel centers. + * + * A note about the "bias" calculations: when rounding fractional values to + * integer, we do not want to always round 0.5 up to the next integer. + * If we did that, we'd introduce a noticeable bias towards larger values. + * Instead, this code is arranged so that 0.5 will be rounded up or down at + * alternate pixel locations (a simple ordered dither pattern). + */ + +METHODDEF(void) +h2v1_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr, outptr; + register int invalue; + register JDIMENSION colctr; + int inrow; + + for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) { + inptr = input_data[inrow]; + outptr = output_data[inrow]; + /* Special case for first column */ + invalue = GETJSAMPLE(*inptr++); + *outptr++ = (JSAMPLE) invalue; + *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(*inptr) + 2) >> 2); + + for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) { + /* General case: 3/4 * nearer pixel + 1/4 * further pixel */ + invalue = GETJSAMPLE(*inptr++) * 3; + *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(inptr[-2]) + 1) >> 2); + *outptr++ = (JSAMPLE) ((invalue + GETJSAMPLE(*inptr) + 2) >> 2); + } + + /* Special case for last column */ + invalue = GETJSAMPLE(*inptr); + *outptr++ = (JSAMPLE) ((invalue * 3 + GETJSAMPLE(inptr[-1]) + 1) >> 2); + *outptr++ = (JSAMPLE) invalue; + } +} + + +/* + * Fancy processing for the common case of 2:1 horizontal and 2:1 vertical. + * Again a triangle filter; see comments for h2v1 case, above. + * + * It is OK for us to reference the adjacent input rows because we demanded + * context from the main buffer controller (see initialization code). + */ + +METHODDEF(void) +h2v2_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr) +{ + JSAMPARRAY output_data = *output_data_ptr; + register JSAMPROW inptr0, inptr1, outptr; +#if BITS_IN_JSAMPLE == 8 + register int thiscolsum, lastcolsum, nextcolsum; +#else + register INT32 thiscolsum, lastcolsum, nextcolsum; +#endif + register JDIMENSION colctr; + int inrow, outrow, v; + + inrow = outrow = 0; + while (outrow < cinfo->max_v_samp_factor) { + for (v = 0; v < 2; v++) { + /* inptr0 points to nearest input row, inptr1 points to next nearest */ + inptr0 = input_data[inrow]; + if (v == 0) /* next nearest is row above */ + inptr1 = input_data[inrow-1]; + else /* next nearest is row below */ + inptr1 = input_data[inrow+1]; + outptr = output_data[outrow++]; + + /* Special case for first column */ + thiscolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++); + nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++); + *outptr++ = (JSAMPLE) ((thiscolsum * 4 + 8) >> 4); + *outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4); + lastcolsum = thiscolsum; thiscolsum = nextcolsum; + + for (colctr = compptr->downsampled_width - 2; colctr > 0; colctr--) { + /* General case: 3/4 * nearer pixel + 1/4 * further pixel in each */ + /* dimension, thus 9/16, 3/16, 3/16, 1/16 overall */ + nextcolsum = GETJSAMPLE(*inptr0++) * 3 + GETJSAMPLE(*inptr1++); + *outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4); + *outptr++ = (JSAMPLE) ((thiscolsum * 3 + nextcolsum + 7) >> 4); + lastcolsum = thiscolsum; thiscolsum = nextcolsum; + } + + /* Special case for last column */ + *outptr++ = (JSAMPLE) ((thiscolsum * 3 + lastcolsum + 8) >> 4); + *outptr++ = (JSAMPLE) ((thiscolsum * 4 + 7) >> 4); + } + inrow++; + } +} + + +/* + * Module initialization routine for upsampling. + */ + +GLOBAL(void) +jinit_upsampler (j_decompress_ptr cinfo) +{ + my_upsample_ptr upsample; + int ci; + jpeg_component_info * compptr; + boolean need_buffer, do_fancy; + int h_in_group, v_in_group, h_out_group, v_out_group; + + upsample = (my_upsample_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_upsampler)); + cinfo->upsample = (struct jpeg_upsampler *) upsample; + upsample->pub.start_pass = start_pass_upsample; + upsample->pub.upsample = sep_upsample; + upsample->pub.need_context_rows = FALSE; /* until we find out differently */ + + if (cinfo->CCIR601_sampling) /* this isn't supported */ + ERREXIT(cinfo, JERR_CCIR601_NOTIMPL); + + /* jdmainct.c doesn't support context rows when min_DCT_scaled_size = 1, + * so don't ask for it. + */ + do_fancy = cinfo->do_fancy_upsampling && cinfo->min_DCT_scaled_size > 1; + + /* Verify we can handle the sampling factors, select per-component methods, + * and create storage as needed. + */ + for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components; + ci++, compptr++) { + /* Compute size of an "input group" after IDCT scaling. This many samples + * are to be converted to max_h_samp_factor * max_v_samp_factor pixels. + */ + h_in_group = (compptr->h_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; + v_in_group = (compptr->v_samp_factor * compptr->DCT_scaled_size) / + cinfo->min_DCT_scaled_size; + h_out_group = cinfo->max_h_samp_factor; + v_out_group = cinfo->max_v_samp_factor; + upsample->rowgroup_height[ci] = v_in_group; /* save for use later */ + need_buffer = TRUE; + if (! compptr->component_needed) { + /* Don't bother to upsample an uninteresting component. */ + upsample->methods[ci] = noop_upsample; + need_buffer = FALSE; + } else if (h_in_group == h_out_group && v_in_group == v_out_group) { + /* Fullsize components can be processed without any work. */ + upsample->methods[ci] = fullsize_upsample; + need_buffer = FALSE; + } else if (h_in_group * 2 == h_out_group && + v_in_group == v_out_group) { + /* Special cases for 2h1v upsampling */ + if (do_fancy && compptr->downsampled_width > 2) + upsample->methods[ci] = h2v1_fancy_upsample; + else + upsample->methods[ci] = h2v1_upsample; + } else if (h_in_group * 2 == h_out_group && + v_in_group * 2 == v_out_group) { + /* Special cases for 2h2v upsampling */ + if (do_fancy && compptr->downsampled_width > 2) { + upsample->methods[ci] = h2v2_fancy_upsample; + upsample->pub.need_context_rows = TRUE; + } else + upsample->methods[ci] = h2v2_upsample; + } else if ((h_out_group % h_in_group) == 0 && + (v_out_group % v_in_group) == 0) { + /* Generic integral-factors upsampling method */ + upsample->methods[ci] = int_upsample; + upsample->h_expand[ci] = (UINT8) (h_out_group / h_in_group); + upsample->v_expand[ci] = (UINT8) (v_out_group / v_in_group); + } else + ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL); + if (need_buffer) { + upsample->color_buf[ci] = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) jround_up((long) cinfo->output_width, + (long) cinfo->max_h_samp_factor), + (JDIMENSION) cinfo->max_v_samp_factor); + } + } +} diff --git a/windows_libs/jpeg-6a/jdtrans.c b/windows_libs/jpeg-6a/jdtrans.c new file mode 100644 index 00000000..db620bcd --- /dev/null +++ b/windows_libs/jpeg-6a/jdtrans.c @@ -0,0 +1,122 @@ +/* + * jdtrans.c + * + * Copyright (C) 1995-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains library routines for transcoding decompression, + * that is, reading raw DCT coefficient arrays from an input JPEG file. + * The routines in jdapimin.c will also be needed by a transcoder. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* Forward declarations */ +LOCAL(void) transdecode_master_selection JPP((j_decompress_ptr cinfo)); + + +/* + * Read the coefficient arrays from a JPEG file. + * jpeg_read_header must be completed before calling this. + * + * The entire image is read into a set of virtual coefficient-block arrays, + * one per component. The return value is a pointer to the array of + * virtual-array descriptors. These can be manipulated directly via the + * JPEG memory manager, or handed off to jpeg_write_coefficients(). + * To release the memory occupied by the virtual arrays, call + * jpeg_finish_decompress() when done with the data. + * + * Returns NULL if suspended. This case need be checked only if + * a suspending data source is used. + */ + +GLOBAL(jvirt_barray_ptr *) +jpeg_read_coefficients (j_decompress_ptr cinfo) +{ + if (cinfo->global_state == DSTATE_READY) { + /* First call: initialize active modules */ + transdecode_master_selection(cinfo); + cinfo->global_state = DSTATE_RDCOEFS; + } else if (cinfo->global_state != DSTATE_RDCOEFS) + ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state); + /* Absorb whole file into the coef buffer */ + for (;;) { + int retcode; + /* Call progress monitor hook if present */ + if (cinfo->progress != NULL) + (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); + /* Absorb some more input */ + retcode = (*cinfo->inputctl->consume_input) (cinfo); + if (retcode == JPEG_SUSPENDED) + return NULL; + if (retcode == JPEG_REACHED_EOI) + break; + /* Advance progress counter if appropriate */ + if (cinfo->progress != NULL && + (retcode == JPEG_ROW_COMPLETED || retcode == JPEG_REACHED_SOS)) { + if (++cinfo->progress->pass_counter >= cinfo->progress->pass_limit) { + /* startup underestimated number of scans; ratchet up one scan */ + cinfo->progress->pass_limit += (long) cinfo->total_iMCU_rows; + } + } + } + /* Set state so that jpeg_finish_decompress does the right thing */ + cinfo->global_state = DSTATE_STOPPING; + return cinfo->coef->coef_arrays; +} + + +/* + * Master selection of decompression modules for transcoding. + * This substitutes for jdmaster.c's initialization of the full decompressor. + */ + +LOCAL(void) +transdecode_master_selection (j_decompress_ptr cinfo) +{ + /* Entropy decoding: either Huffman or arithmetic coding. */ + if (cinfo->arith_code) { + ERREXIT(cinfo, JERR_ARITH_NOTIMPL); + } else { + if (cinfo->progressive_mode) { +#ifdef D_PROGRESSIVE_SUPPORTED + jinit_phuff_decoder(cinfo); +#else + ERREXIT(cinfo, JERR_NOT_COMPILED); +#endif + } else + jinit_huff_decoder(cinfo); + } + + /* Always get a full-image coefficient buffer. */ + jinit_d_coef_controller(cinfo, TRUE); + + /* We can now tell the memory manager to allocate virtual arrays. */ + (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); + + /* Initialize input side of decompressor to consume first scan. */ + (*cinfo->inputctl->start_input_pass) (cinfo); + + /* Initialize progress monitoring. */ + if (cinfo->progress != NULL) { + int nscans; + /* Estimate number of scans to set pass_limit. */ + if (cinfo->progressive_mode) { + /* Arbitrarily estimate 2 interleaved DC scans + 3 AC scans/component. */ + nscans = 2 + 3 * cinfo->num_components; + } else if (cinfo->inputctl->has_multiple_scans) { + /* For a nonprogressive multiscan file, estimate 1 scan per component. */ + nscans = cinfo->num_components; + } else { + nscans = 1; + } + cinfo->progress->pass_counter = 0L; + cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; + cinfo->progress->completed_passes = 0; + cinfo->progress->total_passes = 1; + } +} diff --git a/windows_libs/jpeg-6a/jerror.c b/windows_libs/jpeg-6a/jerror.c new file mode 100644 index 00000000..8b89e39c --- /dev/null +++ b/windows_libs/jpeg-6a/jerror.c @@ -0,0 +1,228 @@ +/* + * jerror.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains simple error-reporting and trace-message routines. + * These are suitable for Unix-like systems and others where writing to + * stderr is the right thing to do. Many applications will want to replace + * some or all of these routines. + * + * These routines are used by both the compression and decompression code. + */ + +/* this is not a core library module, so it doesn't define JPEG_INTERNALS */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jversion.h" +#include "jerror.h" + +#ifndef EXIT_FAILURE /* define exit() codes if not provided */ +#define EXIT_FAILURE 1 +#endif + + +/* + * Create the message string table. + * We do this from the master message list in jerror.h by re-reading + * jerror.h with a suitable definition for macro JMESSAGE. + * The message table is made an external symbol just in case any applications + * want to refer to it directly. + */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_std_message_table jMsgTable +#endif + +#define JMESSAGE(code,string) string , + +const char * const jpeg_std_message_table[] = { +#include "jerror.h" + NULL +}; + + +/* + * Error exit handler: must not return to caller. + * + * Applications may override this if they want to get control back after + * an error. Typically one would longjmp somewhere instead of exiting. + * The setjmp buffer can be made a private field within an expanded error + * handler object. Note that the info needed to generate an error message + * is stored in the error object, so you can generate the message now or + * later, at your convenience. + * You should make sure that the JPEG object is cleaned up (with jpeg_abort + * or jpeg_destroy) at some point. + */ + +METHODDEF(void) +error_exit (j_common_ptr cinfo) +{ + /* Always display the message */ + (*cinfo->err->output_message) (cinfo); + + /* Let the memory manager delete any temp files before we die */ + jpeg_destroy(cinfo); + + exit(EXIT_FAILURE); +} + + +/* + * Actual output of an error or trace message. + * Applications may override this method to send JPEG messages somewhere + * other than stderr. + */ + +METHODDEF(void) +output_message (j_common_ptr cinfo) +{ + char buffer[JMSG_LENGTH_MAX]; + + /* Create the message */ + (*cinfo->err->format_message) (cinfo, buffer); + + /* Send it to stderr, adding a newline */ + fprintf(stderr, "%s\n", buffer); +} + + +/* + * Decide whether to emit a trace or warning message. + * msg_level is one of: + * -1: recoverable corrupt-data warning, may want to abort. + * 0: important advisory messages (always display to user). + * 1: first level of tracing detail. + * 2,3,...: successively more detailed tracing messages. + * An application might override this method if it wanted to abort on warnings + * or change the policy about which messages to display. + */ + +METHODDEF(void) +emit_message (j_common_ptr cinfo, int msg_level) +{ + struct jpeg_error_mgr * err = cinfo->err; + + if (msg_level < 0) { + /* It's a warning message. Since corrupt files may generate many warnings, + * the policy implemented here is to show only the first warning, + * unless trace_level >= 3. + */ + if (err->num_warnings == 0 || err->trace_level >= 3) + (*err->output_message) (cinfo); + /* Always count warnings in num_warnings. */ + err->num_warnings++; + } else { + /* It's a trace message. Show it if trace_level >= msg_level. */ + if (err->trace_level >= msg_level) + (*err->output_message) (cinfo); + } +} + + +/* + * Format a message string for the most recent JPEG error or message. + * The message is stored into buffer, which should be at least JMSG_LENGTH_MAX + * characters. Note that no '\n' character is added to the string. + * Few applications should need to override this method. + */ + +METHODDEF(void) +format_message (j_common_ptr cinfo, char * buffer) +{ + struct jpeg_error_mgr * err = cinfo->err; + int msg_code = err->msg_code; + const char * msgtext = NULL; + const char * msgptr; + char ch; + boolean isstring; + + /* Look up message string in proper table */ + if (msg_code > 0 && msg_code <= err->last_jpeg_message) { + msgtext = err->jpeg_message_table[msg_code]; + } else if (err->addon_message_table != NULL && + msg_code >= err->first_addon_message && + msg_code <= err->last_addon_message) { + msgtext = err->addon_message_table[msg_code - err->first_addon_message]; + } + + /* Defend against bogus message number */ + if (msgtext == NULL) { + err->msg_parm.i[0] = msg_code; + msgtext = err->jpeg_message_table[0]; + } + + /* Check for string parameter, as indicated by %s in the message text */ + isstring = FALSE; + msgptr = msgtext; + while ((ch = *msgptr++) != '\0') { + if (ch == '%') { + if (*msgptr == 's') isstring = TRUE; + break; + } + } + + /* Format the message into the passed buffer */ + if (isstring) + sprintf(buffer, msgtext, err->msg_parm.s); + else + sprintf(buffer, msgtext, + err->msg_parm.i[0], err->msg_parm.i[1], + err->msg_parm.i[2], err->msg_parm.i[3], + err->msg_parm.i[4], err->msg_parm.i[5], + err->msg_parm.i[6], err->msg_parm.i[7]); +} + + +/* + * Reset error state variables at start of a new image. + * This is called during compression startup to reset trace/error + * processing to default state, without losing any application-specific + * method pointers. An application might possibly want to override + * this method if it has additional error processing state. + */ + +METHODDEF(void) +reset_error_mgr (j_common_ptr cinfo) +{ + cinfo->err->num_warnings = 0; + /* trace_level is not reset since it is an application-supplied parameter */ + cinfo->err->msg_code = 0; /* may be useful as a flag for "no error" */ +} + + +/* + * Fill in the standard error-handling methods in a jpeg_error_mgr object. + * Typical call is: + * struct jpeg_compress_struct cinfo; + * struct jpeg_error_mgr err; + * + * cinfo.err = jpeg_std_error(&err); + * after which the application may override some of the methods. + */ + +GLOBAL(struct jpeg_error_mgr *) +jpeg_std_error (struct jpeg_error_mgr * err) +{ + err->error_exit = error_exit; + err->emit_message = emit_message; + err->output_message = output_message; + err->format_message = format_message; + err->reset_error_mgr = reset_error_mgr; + + err->trace_level = 0; /* default = no tracing */ + err->num_warnings = 0; /* no warnings emitted yet */ + err->msg_code = 0; /* may be useful as a flag for "no error" */ + + /* Initialize message table pointers */ + err->jpeg_message_table = jpeg_std_message_table; + err->last_jpeg_message = (int) JMSG_LASTMSGCODE - 1; + + err->addon_message_table = NULL; + err->first_addon_message = 0; /* for safety */ + err->last_addon_message = 0; + + return err; +} diff --git a/windows_libs/jpeg-6a/jerror.h b/windows_libs/jpeg-6a/jerror.h new file mode 100644 index 00000000..de82c8a1 --- /dev/null +++ b/windows_libs/jpeg-6a/jerror.h @@ -0,0 +1,277 @@ +/* + * jerror.h + * + * Copyright (C) 1994-1995, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the error and message codes for the JPEG library. + * Edit this file to add new codes, or to translate the message strings to + * some other language. + * A set of error-reporting macros are defined too. Some applications using + * the JPEG library may wish to include this file to get the error codes + * and/or the macros. + */ + +/* + * To define the enum list of message codes, include this file without + * defining macro JMESSAGE. To create a message string table, include it + * again with a suitable JMESSAGE definition (see jerror.c for an example). + */ +#ifndef JMESSAGE +#ifndef JERROR_H +/* First time through, define the enum list */ +#define JMAKE_ENUM_LIST +#else +/* Repeated inclusions of this file are no-ops unless JMESSAGE is defined */ +#define JMESSAGE(code,string) +#endif /* JERROR_H */ +#endif /* JMESSAGE */ + +#ifdef JMAKE_ENUM_LIST + +typedef enum { + +#define JMESSAGE(code,string) code , + +#endif /* JMAKE_ENUM_LIST */ + +JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ + +/* For maintenance convenience, list is alphabetical by message code name */ +JMESSAGE(JERR_ARITH_NOTIMPL, + "Sorry, there are legal restrictions on arithmetic coding") +JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") +JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") +JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") +JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") +JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported") +JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") +JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") +JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") +JMESSAGE(JERR_BAD_LIB_VERSION, + "Wrong JPEG library version: library is %d, caller expects %d") +JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") +JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") +JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") +JMESSAGE(JERR_BAD_PROGRESSION, + "Invalid progressive parameters Ss=%d Se=%d Ah=%d Al=%d") +JMESSAGE(JERR_BAD_PROG_SCRIPT, + "Invalid progressive parameters at scan script entry %d") +JMESSAGE(JERR_BAD_SAMPLING, "Bogus sampling factors") +JMESSAGE(JERR_BAD_SCAN_SCRIPT, "Invalid scan script at entry %d") +JMESSAGE(JERR_BAD_STATE, "Improper call to JPEG library in state %d") +JMESSAGE(JERR_BAD_STRUCT_SIZE, + "JPEG parameter struct mismatch: library thinks size is %u, caller expects %u") +JMESSAGE(JERR_BAD_VIRTUAL_ACCESS, "Bogus virtual array access") +JMESSAGE(JERR_BUFFER_SIZE, "Buffer passed to JPEG library is too small") +JMESSAGE(JERR_CANT_SUSPEND, "Suspension not allowed here") +JMESSAGE(JERR_CCIR601_NOTIMPL, "CCIR601 sampling not implemented yet") +JMESSAGE(JERR_COMPONENT_COUNT, "Too many color components: %d, max %d") +JMESSAGE(JERR_CONVERSION_NOTIMPL, "Unsupported color conversion request") +JMESSAGE(JERR_DAC_INDEX, "Bogus DAC index %d") +JMESSAGE(JERR_DAC_VALUE, "Bogus DAC value 0x%x") +JMESSAGE(JERR_DHT_COUNTS, "Bogus DHT counts") +JMESSAGE(JERR_DHT_INDEX, "Bogus DHT index %d") +JMESSAGE(JERR_DQT_INDEX, "Bogus DQT index %d") +JMESSAGE(JERR_EMPTY_IMAGE, "Empty JPEG image (DNL not supported)") +JMESSAGE(JERR_EMS_READ, "Read from EMS failed") +JMESSAGE(JERR_EMS_WRITE, "Write to EMS failed") +JMESSAGE(JERR_EOI_EXPECTED, "Didn't expect more than one scan") +JMESSAGE(JERR_FILE_READ, "Input file read error") +JMESSAGE(JERR_FILE_WRITE, "Output file write error --- out of disk space?") +JMESSAGE(JERR_FRACT_SAMPLE_NOTIMPL, "Fractional sampling not implemented yet") +JMESSAGE(JERR_HUFF_CLEN_OVERFLOW, "Huffman code size table overflow") +JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") +JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") +JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") +JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") +JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, + "Cannot transcode due to multiple use of quantization table %d") +JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") +JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") +JMESSAGE(JERR_NOTIMPL, "Not implemented yet") +JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") +JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") +JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") +JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") +JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") +JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") +JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") +JMESSAGE(JERR_QUANT_COMPONENTS, + "Cannot quantize more than %d color components") +JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") +JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") +JMESSAGE(JERR_SOF_DUPLICATE, "Invalid JPEG file structure: two SOF markers") +JMESSAGE(JERR_SOF_NO_SOS, "Invalid JPEG file structure: missing SOS marker") +JMESSAGE(JERR_SOF_UNSUPPORTED, "Unsupported JPEG process: SOF type 0x%02x") +JMESSAGE(JERR_SOI_DUPLICATE, "Invalid JPEG file structure: two SOI markers") +JMESSAGE(JERR_SOS_NO_SOF, "Invalid JPEG file structure: SOS before SOF") +JMESSAGE(JERR_TFILE_CREATE, "Failed to create temporary file %s") +JMESSAGE(JERR_TFILE_READ, "Read failed on temporary file") +JMESSAGE(JERR_TFILE_SEEK, "Seek failed on temporary file") +JMESSAGE(JERR_TFILE_WRITE, + "Write failed on temporary file --- out of disk space?") +JMESSAGE(JERR_TOO_LITTLE_DATA, "Application transferred too few scanlines") +JMESSAGE(JERR_UNKNOWN_MARKER, "Unsupported marker type 0x%02x") +JMESSAGE(JERR_VIRTUAL_BUG, "Virtual array controller messed up") +JMESSAGE(JERR_WIDTH_OVERFLOW, "Image too wide for this implementation") +JMESSAGE(JERR_XMS_READ, "Read from XMS failed") +JMESSAGE(JERR_XMS_WRITE, "Write to XMS failed") +JMESSAGE(JMSG_COPYRIGHT, JCOPYRIGHT) +JMESSAGE(JMSG_VERSION, JVERSION) +JMESSAGE(JTRC_16BIT_TABLES, + "Caution: quantization tables are too coarse for baseline JPEG") +JMESSAGE(JTRC_ADOBE, + "Adobe APP14 marker: version %d, flags 0x%04x 0x%04x, transform %d") +JMESSAGE(JTRC_APP0, "Unknown APP0 marker (not JFIF), length %u") +JMESSAGE(JTRC_APP14, "Unknown APP14 marker (not Adobe), length %u") +JMESSAGE(JTRC_DAC, "Define Arithmetic Table 0x%02x: 0x%02x") +JMESSAGE(JTRC_DHT, "Define Huffman Table 0x%02x") +JMESSAGE(JTRC_DQT, "Define Quantization Table %d precision %d") +JMESSAGE(JTRC_DRI, "Define Restart Interval %u") +JMESSAGE(JTRC_EMS_CLOSE, "Freed EMS handle %u") +JMESSAGE(JTRC_EMS_OPEN, "Obtained EMS handle %u") +JMESSAGE(JTRC_EOI, "End Of Image") +JMESSAGE(JTRC_HUFFBITS, " %3d %3d %3d %3d %3d %3d %3d %3d") +JMESSAGE(JTRC_JFIF, "JFIF APP0 marker, density %dx%d %d") +JMESSAGE(JTRC_JFIF_BADTHUMBNAILSIZE, + "Warning: thumbnail image size does not match data length %u") +JMESSAGE(JTRC_JFIF_MINOR, "Unknown JFIF minor revision number %d.%02d") +JMESSAGE(JTRC_JFIF_THUMBNAIL, " with %d x %d thumbnail image") +JMESSAGE(JTRC_MISC_MARKER, "Skipping marker 0x%02x, length %u") +JMESSAGE(JTRC_PARMLESS_MARKER, "Unexpected marker 0x%02x") +JMESSAGE(JTRC_QUANTVALS, " %4u %4u %4u %4u %4u %4u %4u %4u") +JMESSAGE(JTRC_QUANT_3_NCOLORS, "Quantizing to %d = %d*%d*%d colors") +JMESSAGE(JTRC_QUANT_NCOLORS, "Quantizing to %d colors") +JMESSAGE(JTRC_QUANT_SELECTED, "Selected %d colors for quantization") +JMESSAGE(JTRC_RECOVERY_ACTION, "At marker 0x%02x, recovery action %d") +JMESSAGE(JTRC_RST, "RST%d") +JMESSAGE(JTRC_SMOOTH_NOTIMPL, + "Smoothing not supported with nonstandard sampling ratios") +JMESSAGE(JTRC_SOF, "Start Of Frame 0x%02x: width=%u, height=%u, components=%d") +JMESSAGE(JTRC_SOF_COMPONENT, " Component %d: %dhx%dv q=%d") +JMESSAGE(JTRC_SOI, "Start of Image") +JMESSAGE(JTRC_SOS, "Start Of Scan: %d components") +JMESSAGE(JTRC_SOS_COMPONENT, " Component %d: dc=%d ac=%d") +JMESSAGE(JTRC_SOS_PARAMS, " Ss=%d, Se=%d, Ah=%d, Al=%d") +JMESSAGE(JTRC_TFILE_CLOSE, "Closed temporary file %s") +JMESSAGE(JTRC_TFILE_OPEN, "Opened temporary file %s") +JMESSAGE(JTRC_UNKNOWN_IDS, + "Unrecognized component IDs %d %d %d, assuming YCbCr") +JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") +JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") +JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") +JMESSAGE(JWRN_BOGUS_PROGRESSION, + "Inconsistent progression sequence for component %d coefficient %d") +JMESSAGE(JWRN_EXTRANEOUS_DATA, + "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") +JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") +JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") +JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") +JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") +JMESSAGE(JWRN_MUST_RESYNC, + "Corrupt JPEG data: found marker 0x%02x instead of RST%d") +JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") +JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") + +#ifdef JMAKE_ENUM_LIST + + JMSG_LASTMSGCODE +} J_MESSAGE_CODE; + +#undef JMAKE_ENUM_LIST +#endif /* JMAKE_ENUM_LIST */ + +/* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ +#undef JMESSAGE + + +#ifndef JERROR_H +#define JERROR_H + +/* Macros to simplify using the error and trace message stuff */ +/* The first parameter is either type of cinfo pointer */ + +/* Fatal errors (print message and exit) */ +#define ERREXIT(cinfo,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT1(cinfo,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT2(cinfo,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT3(cinfo,code,p1,p2,p3) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXIT4(cinfo,code,p1,p2,p3,p4) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (cinfo)->err->msg_parm.i[2] = (p3), \ + (cinfo)->err->msg_parm.i[3] = (p4), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) +#define ERREXITS(cinfo,code,str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (*(cinfo)->err->error_exit) ((j_common_ptr) (cinfo))) + +#define MAKESTMT(stuff) do { stuff } while (0) + +/* Nonfatal errors (we can keep going, but the data is probably corrupt) */ +#define WARNMS(cinfo,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) +#define WARNMS1(cinfo,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) +#define WARNMS2(cinfo,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), -1)) + +/* Informational/debugging messages */ +#define TRACEMS(cinfo,lvl,code) \ + ((cinfo)->err->msg_code = (code), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS1(cinfo,lvl,code,p1) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS2(cinfo,lvl,code,p1,p2) \ + ((cinfo)->err->msg_code = (code), \ + (cinfo)->err->msg_parm.i[0] = (p1), \ + (cinfo)->err->msg_parm.i[1] = (p2), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) +#define TRACEMS3(cinfo,lvl,code,p1,p2,p3) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS4(cinfo,lvl,code,p1,p2,p3,p4) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMS8(cinfo,lvl,code,p1,p2,p3,p4,p5,p6,p7,p8) \ + MAKESTMT(int * _mp = (cinfo)->err->msg_parm.i; \ + _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ + _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ + (cinfo)->err->msg_code = (code); \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) +#define TRACEMSS(cinfo,lvl,code,str) \ + ((cinfo)->err->msg_code = (code), \ + strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ + (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) + +#endif /* JERROR_H */ diff --git a/windows_libs/jpeg-6a/jfdctflt.c b/windows_libs/jpeg-6a/jfdctflt.c new file mode 100644 index 00000000..79d7a007 --- /dev/null +++ b/windows_libs/jpeg-6a/jfdctflt.c @@ -0,0 +1,168 @@ +/* + * jfdctflt.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a floating-point implementation of the + * forward DCT (Discrete Cosine Transform). + * + * This implementation should be more accurate than either of the integer + * DCT implementations. However, it may not give the same results on all + * machines because of differences in roundoff behavior. Speed will depend + * on the hardware's floating point capacity. + * + * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT + * on each column. Direct algorithms are also available, but they are + * much more complex and seem not to be any faster when reduced to code. + * + * This implementation is based on Arai, Agui, and Nakajima's algorithm for + * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in + * Japanese, but the algorithm is described in the Pennebaker & Mitchell + * JPEG textbook (see REFERENCES section in file README). The following code + * is based directly on figure 4-8 in P&M. + * While an 8-point DCT cannot be done in less than 11 multiplies, it is + * possible to arrange the computation so that many of the multiplies are + * simple scalings of the final outputs. These multiplies can then be + * folded into the multiplications or divisions by the JPEG quantization + * table entries. The AA&N method leaves only 5 multiplies and 29 adds + * to be done in the DCT itself. + * The primary disadvantage of this method is that with a fixed-point + * implementation, accuracy is lost due to imprecise representation of the + * scaled quantization values. However, that problem does not arise if + * we use floating point arithmetic. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_FLOAT_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* + * Perform the forward DCT on one block of samples. + */ + +GLOBAL(void) +jpeg_fdct_float (FAST_FLOAT * data) +{ + FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + FAST_FLOAT tmp10, tmp11, tmp12, tmp13; + FAST_FLOAT z1, z2, z3, z4, z5, z11, z13; + FAST_FLOAT *dataptr; + int ctr; + + /* Pass 1: process rows. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[0] + dataptr[7]; + tmp7 = dataptr[0] - dataptr[7]; + tmp1 = dataptr[1] + dataptr[6]; + tmp6 = dataptr[1] - dataptr[6]; + tmp2 = dataptr[2] + dataptr[5]; + tmp5 = dataptr[2] - dataptr[5]; + tmp3 = dataptr[3] + dataptr[4]; + tmp4 = dataptr[3] - dataptr[4]; + + /* Even part */ + + tmp10 = tmp0 + tmp3; /* phase 2 */ + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[0] = tmp10 + tmp11; /* phase 3 */ + dataptr[4] = tmp10 - tmp11; + + z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */ + dataptr[2] = tmp13 + z1; /* phase 5 */ + dataptr[6] = tmp13 - z1; + + /* Odd part */ + + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */ + z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */ + z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */ + z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */ + + z11 = tmp7 + z3; /* phase 5 */ + z13 = tmp7 - z3; + + dataptr[5] = z13 + z2; /* phase 6 */ + dataptr[3] = z13 - z2; + dataptr[1] = z11 + z4; + dataptr[7] = z11 - z4; + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; + tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; + tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; + tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; + tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; + + /* Even part */ + + tmp10 = tmp0 + tmp3; /* phase 2 */ + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */ + dataptr[DCTSIZE*4] = tmp10 - tmp11; + + z1 = (tmp12 + tmp13) * ((FAST_FLOAT) 0.707106781); /* c4 */ + dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */ + dataptr[DCTSIZE*6] = tmp13 - z1; + + /* Odd part */ + + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + z5 = (tmp10 - tmp12) * ((FAST_FLOAT) 0.382683433); /* c6 */ + z2 = ((FAST_FLOAT) 0.541196100) * tmp10 + z5; /* c2-c6 */ + z4 = ((FAST_FLOAT) 1.306562965) * tmp12 + z5; /* c2+c6 */ + z3 = tmp11 * ((FAST_FLOAT) 0.707106781); /* c4 */ + + z11 = tmp7 + z3; /* phase 5 */ + z13 = tmp7 - z3; + + dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */ + dataptr[DCTSIZE*3] = z13 - z2; + dataptr[DCTSIZE*1] = z11 + z4; + dataptr[DCTSIZE*7] = z11 - z4; + + dataptr++; /* advance pointer to next column */ + } +} + +#endif /* DCT_FLOAT_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/jfdctfst.c b/windows_libs/jpeg-6a/jfdctfst.c new file mode 100644 index 00000000..ccb378a3 --- /dev/null +++ b/windows_libs/jpeg-6a/jfdctfst.c @@ -0,0 +1,224 @@ +/* + * jfdctfst.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a fast, not so accurate integer implementation of the + * forward DCT (Discrete Cosine Transform). + * + * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT + * on each column. Direct algorithms are also available, but they are + * much more complex and seem not to be any faster when reduced to code. + * + * This implementation is based on Arai, Agui, and Nakajima's algorithm for + * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in + * Japanese, but the algorithm is described in the Pennebaker & Mitchell + * JPEG textbook (see REFERENCES section in file README). The following code + * is based directly on figure 4-8 in P&M. + * While an 8-point DCT cannot be done in less than 11 multiplies, it is + * possible to arrange the computation so that many of the multiplies are + * simple scalings of the final outputs. These multiplies can then be + * folded into the multiplications or divisions by the JPEG quantization + * table entries. The AA&N method leaves only 5 multiplies and 29 adds + * to be done in the DCT itself. + * The primary disadvantage of this method is that with fixed-point math, + * accuracy is lost due to imprecise representation of the scaled + * quantization values. The smaller the quantization table entry, the less + * precise the scaled value, so this implementation does worse with high- + * quality-setting files than with low-quality ones. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_IFAST_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* Scaling decisions are generally the same as in the LL&M algorithm; + * see jfdctint.c for more details. However, we choose to descale + * (right shift) multiplication products as soon as they are formed, + * rather than carrying additional fractional bits into subsequent additions. + * This compromises accuracy slightly, but it lets us save a few shifts. + * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples) + * everywhere except in the multiplications proper; this saves a good deal + * of work on 16-bit-int machines. + * + * Again to save a few shifts, the intermediate results between pass 1 and + * pass 2 are not upscaled, but are represented only to integral precision. + * + * A final compromise is to represent the multiplicative constants to only + * 8 fractional bits, rather than 13. This saves some shifting work on some + * machines, and may also reduce the cost of multiplication (since there + * are fewer one-bits in the constants). + */ + +#define CONST_BITS 8 + + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 8 +#define FIX_0_382683433 ((INT32) 98) /* FIX(0.382683433) */ +#define FIX_0_541196100 ((INT32) 139) /* FIX(0.541196100) */ +#define FIX_0_707106781 ((INT32) 181) /* FIX(0.707106781) */ +#define FIX_1_306562965 ((INT32) 334) /* FIX(1.306562965) */ +#else +#define FIX_0_382683433 FIX(0.382683433) +#define FIX_0_541196100 FIX(0.541196100) +#define FIX_0_707106781 FIX(0.707106781) +#define FIX_1_306562965 FIX(1.306562965) +#endif + + +/* We can gain a little more speed, with a further compromise in accuracy, + * by omitting the addition in a descaling shift. This yields an incorrectly + * rounded result half the time... + */ + +#ifndef USE_ACCURATE_ROUNDING +#undef DESCALE +#define DESCALE(x,n) RIGHT_SHIFT(x, n) +#endif + + +/* Multiply a DCTELEM variable by an INT32 constant, and immediately + * descale to yield a DCTELEM result. + */ + +#define MULTIPLY(var,const) ((DCTELEM) DESCALE((var) * (const), CONST_BITS)) + + +/* + * Perform the forward DCT on one block of samples. + */ + +GLOBAL(void) +jpeg_fdct_ifast (DCTELEM * data) +{ + DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + DCTELEM tmp10, tmp11, tmp12, tmp13; + DCTELEM z1, z2, z3, z4, z5, z11, z13; + DCTELEM *dataptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[0] + dataptr[7]; + tmp7 = dataptr[0] - dataptr[7]; + tmp1 = dataptr[1] + dataptr[6]; + tmp6 = dataptr[1] - dataptr[6]; + tmp2 = dataptr[2] + dataptr[5]; + tmp5 = dataptr[2] - dataptr[5]; + tmp3 = dataptr[3] + dataptr[4]; + tmp4 = dataptr[3] - dataptr[4]; + + /* Even part */ + + tmp10 = tmp0 + tmp3; /* phase 2 */ + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[0] = tmp10 + tmp11; /* phase 3 */ + dataptr[4] = tmp10 - tmp11; + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */ + dataptr[2] = tmp13 + z1; /* phase 5 */ + dataptr[6] = tmp13 - z1; + + /* Odd part */ + + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */ + z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */ + z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */ + z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */ + + z11 = tmp7 + z3; /* phase 5 */ + z13 = tmp7 - z3; + + dataptr[5] = z13 + z2; /* phase 6 */ + dataptr[3] = z13 - z2; + dataptr[1] = z11 + z4; + dataptr[7] = z11 - z4; + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; + tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; + tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; + tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; + tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; + + /* Even part */ + + tmp10 = tmp0 + tmp3; /* phase 2 */ + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[DCTSIZE*0] = tmp10 + tmp11; /* phase 3 */ + dataptr[DCTSIZE*4] = tmp10 - tmp11; + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_707106781); /* c4 */ + dataptr[DCTSIZE*2] = tmp13 + z1; /* phase 5 */ + dataptr[DCTSIZE*6] = tmp13 - z1; + + /* Odd part */ + + tmp10 = tmp4 + tmp5; /* phase 2 */ + tmp11 = tmp5 + tmp6; + tmp12 = tmp6 + tmp7; + + /* The rotator is modified from fig 4-8 to avoid extra negations. */ + z5 = MULTIPLY(tmp10 - tmp12, FIX_0_382683433); /* c6 */ + z2 = MULTIPLY(tmp10, FIX_0_541196100) + z5; /* c2-c6 */ + z4 = MULTIPLY(tmp12, FIX_1_306562965) + z5; /* c2+c6 */ + z3 = MULTIPLY(tmp11, FIX_0_707106781); /* c4 */ + + z11 = tmp7 + z3; /* phase 5 */ + z13 = tmp7 - z3; + + dataptr[DCTSIZE*5] = z13 + z2; /* phase 6 */ + dataptr[DCTSIZE*3] = z13 - z2; + dataptr[DCTSIZE*1] = z11 + z4; + dataptr[DCTSIZE*7] = z11 - z4; + + dataptr++; /* advance pointer to next column */ + } +} + +#endif /* DCT_IFAST_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/jfdctint.c b/windows_libs/jpeg-6a/jfdctint.c new file mode 100644 index 00000000..0a78b64a --- /dev/null +++ b/windows_libs/jpeg-6a/jfdctint.c @@ -0,0 +1,283 @@ +/* + * jfdctint.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a slow-but-accurate integer implementation of the + * forward DCT (Discrete Cosine Transform). + * + * A 2-D DCT can be done by 1-D DCT on each row followed by 1-D DCT + * on each column. Direct algorithms are also available, but they are + * much more complex and seem not to be any faster when reduced to code. + * + * This implementation is based on an algorithm described in + * C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT + * Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics, + * Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991. + * The primary algorithm described there uses 11 multiplies and 29 adds. + * We use their alternate method with 12 multiplies and 32 adds. + * The advantage of this method is that no data path contains more than one + * multiplication; this allows a very simple and accurate implementation in + * scaled fixed-point arithmetic, with a minimal number of shifts. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_ISLOW_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* + * The poop on this scaling stuff is as follows: + * + * Each 1-D DCT step produces outputs which are a factor of sqrt(N) + * larger than the true DCT outputs. The final outputs are therefore + * a factor of N larger than desired; since N=8 this can be cured by + * a simple right shift at the end of the algorithm. The advantage of + * this arrangement is that we save two multiplications per 1-D DCT, + * because the y0 and y4 outputs need not be divided by sqrt(N). + * In the IJG code, this factor of 8 is removed by the quantization step + * (in jcdctmgr.c), NOT in this module. + * + * We have to do addition and subtraction of the integer inputs, which + * is no problem, and multiplication by fractional constants, which is + * a problem to do in integer arithmetic. We multiply all the constants + * by CONST_SCALE and convert them to integer constants (thus retaining + * CONST_BITS bits of precision in the constants). After doing a + * multiplication we have to divide the product by CONST_SCALE, with proper + * rounding, to produce the correct output. This division can be done + * cheaply as a right shift of CONST_BITS bits. We postpone shifting + * as long as possible so that partial sums can be added together with + * full fractional precision. + * + * The outputs of the first pass are scaled up by PASS1_BITS bits so that + * they are represented to better-than-integral precision. These outputs + * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word + * with the recommended scaling. (For 12-bit sample data, the intermediate + * array is INT32 anyway.) + * + * To avoid overflow of the 32-bit intermediate results in pass 2, we must + * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis + * shows that the values given below are the most effective. + */ + +#if BITS_IN_JSAMPLE == 8 +#define CONST_BITS 13 +#define PASS1_BITS 2 +#else +#define CONST_BITS 13 +#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ +#endif + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 13 +#define FIX_0_298631336 ((INT32) 2446) /* FIX(0.298631336) */ +#define FIX_0_390180644 ((INT32) 3196) /* FIX(0.390180644) */ +#define FIX_0_541196100 ((INT32) 4433) /* FIX(0.541196100) */ +#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */ +#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */ +#define FIX_1_175875602 ((INT32) 9633) /* FIX(1.175875602) */ +#define FIX_1_501321110 ((INT32) 12299) /* FIX(1.501321110) */ +#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */ +#define FIX_1_961570560 ((INT32) 16069) /* FIX(1.961570560) */ +#define FIX_2_053119869 ((INT32) 16819) /* FIX(2.053119869) */ +#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */ +#define FIX_3_072711026 ((INT32) 25172) /* FIX(3.072711026) */ +#else +#define FIX_0_298631336 FIX(0.298631336) +#define FIX_0_390180644 FIX(0.390180644) +#define FIX_0_541196100 FIX(0.541196100) +#define FIX_0_765366865 FIX(0.765366865) +#define FIX_0_899976223 FIX(0.899976223) +#define FIX_1_175875602 FIX(1.175875602) +#define FIX_1_501321110 FIX(1.501321110) +#define FIX_1_847759065 FIX(1.847759065) +#define FIX_1_961570560 FIX(1.961570560) +#define FIX_2_053119869 FIX(2.053119869) +#define FIX_2_562915447 FIX(2.562915447) +#define FIX_3_072711026 FIX(3.072711026) +#endif + + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * For 8-bit samples with the recommended scaling, all the variable + * and constant values involved are no more than 16 bits wide, so a + * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. + * For 12-bit samples, a full 32-bit multiplication will be needed. + */ + +#if BITS_IN_JSAMPLE == 8 +#define MULTIPLY(var,const) MULTIPLY16C16(var,const) +#else +#define MULTIPLY(var,const) ((var) * (const)) +#endif + + +/* + * Perform the forward DCT on one block of samples. + */ + +GLOBAL(void) +jpeg_fdct_islow (DCTELEM * data) +{ + INT32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + INT32 tmp10, tmp11, tmp12, tmp13; + INT32 z1, z2, z3, z4, z5; + DCTELEM *dataptr; + int ctr; + SHIFT_TEMPS + + /* Pass 1: process rows. */ + /* Note results are scaled up by sqrt(8) compared to a true DCT; */ + /* furthermore, we scale the results by 2**PASS1_BITS. */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[0] + dataptr[7]; + tmp7 = dataptr[0] - dataptr[7]; + tmp1 = dataptr[1] + dataptr[6]; + tmp6 = dataptr[1] - dataptr[6]; + tmp2 = dataptr[2] + dataptr[5]; + tmp5 = dataptr[2] - dataptr[5]; + tmp3 = dataptr[3] + dataptr[4]; + tmp4 = dataptr[3] - dataptr[4]; + + /* Even part per LL&M figure 1 --- note that published figure is faulty; + * rotator "sqrt(2)*c1" should be "sqrt(2)*c6". + */ + + tmp10 = tmp0 + tmp3; + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[0] = (DCTELEM) ((tmp10 + tmp11) << PASS1_BITS); + dataptr[4] = (DCTELEM) ((tmp10 - tmp11) << PASS1_BITS); + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); + dataptr[2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), + CONST_BITS-PASS1_BITS); + dataptr[6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), + CONST_BITS-PASS1_BITS); + + /* Odd part per figure 8 --- note paper omits factor of sqrt(2). + * cK represents cos(K*pi/16). + * i0..i3 in the paper are tmp4..tmp7 here. + */ + + z1 = tmp4 + tmp7; + z2 = tmp5 + tmp6; + z3 = tmp4 + tmp6; + z4 = tmp5 + tmp7; + z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ + + tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ + tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ + tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ + tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ + z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ + z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ + z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ + z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ + + z3 += z5; + z4 += z5; + + dataptr[7] = (DCTELEM) DESCALE(tmp4 + z1 + z3, CONST_BITS-PASS1_BITS); + dataptr[5] = (DCTELEM) DESCALE(tmp5 + z2 + z4, CONST_BITS-PASS1_BITS); + dataptr[3] = (DCTELEM) DESCALE(tmp6 + z2 + z3, CONST_BITS-PASS1_BITS); + dataptr[1] = (DCTELEM) DESCALE(tmp7 + z1 + z4, CONST_BITS-PASS1_BITS); + + dataptr += DCTSIZE; /* advance pointer to next row */ + } + + /* Pass 2: process columns. + * We remove the PASS1_BITS scaling, but leave the results scaled up + * by an overall factor of 8. + */ + + dataptr = data; + for (ctr = DCTSIZE-1; ctr >= 0; ctr--) { + tmp0 = dataptr[DCTSIZE*0] + dataptr[DCTSIZE*7]; + tmp7 = dataptr[DCTSIZE*0] - dataptr[DCTSIZE*7]; + tmp1 = dataptr[DCTSIZE*1] + dataptr[DCTSIZE*6]; + tmp6 = dataptr[DCTSIZE*1] - dataptr[DCTSIZE*6]; + tmp2 = dataptr[DCTSIZE*2] + dataptr[DCTSIZE*5]; + tmp5 = dataptr[DCTSIZE*2] - dataptr[DCTSIZE*5]; + tmp3 = dataptr[DCTSIZE*3] + dataptr[DCTSIZE*4]; + tmp4 = dataptr[DCTSIZE*3] - dataptr[DCTSIZE*4]; + + /* Even part per LL&M figure 1 --- note that published figure is faulty; + * rotator "sqrt(2)*c1" should be "sqrt(2)*c6". + */ + + tmp10 = tmp0 + tmp3; + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + dataptr[DCTSIZE*0] = (DCTELEM) DESCALE(tmp10 + tmp11, PASS1_BITS); + dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(tmp10 - tmp11, PASS1_BITS); + + z1 = MULTIPLY(tmp12 + tmp13, FIX_0_541196100); + dataptr[DCTSIZE*2] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp13, FIX_0_765366865), + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 + MULTIPLY(tmp12, - FIX_1_847759065), + CONST_BITS+PASS1_BITS); + + /* Odd part per figure 8 --- note paper omits factor of sqrt(2). + * cK represents cos(K*pi/16). + * i0..i3 in the paper are tmp4..tmp7 here. + */ + + z1 = tmp4 + tmp7; + z2 = tmp5 + tmp6; + z3 = tmp4 + tmp6; + z4 = tmp5 + tmp7; + z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ + + tmp4 = MULTIPLY(tmp4, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ + tmp5 = MULTIPLY(tmp5, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ + tmp6 = MULTIPLY(tmp6, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ + tmp7 = MULTIPLY(tmp7, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ + z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ + z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ + z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ + z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ + + z3 += z5; + z4 += z5; + + dataptr[DCTSIZE*7] = (DCTELEM) DESCALE(tmp4 + z1 + z3, + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*5] = (DCTELEM) DESCALE(tmp5 + z2 + z4, + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*3] = (DCTELEM) DESCALE(tmp6 + z2 + z3, + CONST_BITS+PASS1_BITS); + dataptr[DCTSIZE*1] = (DCTELEM) DESCALE(tmp7 + z1 + z4, + CONST_BITS+PASS1_BITS); + + dataptr++; /* advance pointer to next column */ + } +} + +#endif /* DCT_ISLOW_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/jidctflt.c b/windows_libs/jpeg-6a/jidctflt.c new file mode 100644 index 00000000..1724a0b8 --- /dev/null +++ b/windows_libs/jpeg-6a/jidctflt.c @@ -0,0 +1,241 @@ +/* + * jidctflt.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a floating-point implementation of the + * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine + * must also perform dequantization of the input coefficients. + * + * This implementation should be more accurate than either of the integer + * IDCT implementations. However, it may not give the same results on all + * machines because of differences in roundoff behavior. Speed will depend + * on the hardware's floating point capacity. + * + * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT + * on each row (or vice versa, but it's more convenient to emit a row at + * a time). Direct algorithms are also available, but they are much more + * complex and seem not to be any faster when reduced to code. + * + * This implementation is based on Arai, Agui, and Nakajima's algorithm for + * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in + * Japanese, but the algorithm is described in the Pennebaker & Mitchell + * JPEG textbook (see REFERENCES section in file README). The following code + * is based directly on figure 4-8 in P&M. + * While an 8-point DCT cannot be done in less than 11 multiplies, it is + * possible to arrange the computation so that many of the multiplies are + * simple scalings of the final outputs. These multiplies can then be + * folded into the multiplications or divisions by the JPEG quantization + * table entries. The AA&N method leaves only 5 multiplies and 29 adds + * to be done in the DCT itself. + * The primary disadvantage of this method is that with a fixed-point + * implementation, accuracy is lost due to imprecise representation of the + * scaled quantization values. However, that problem does not arise if + * we use floating point arithmetic. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_FLOAT_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* Dequantize a coefficient by multiplying it by the multiplier-table + * entry; produce a float result. + */ + +#define DEQUANTIZE(coef,quantval) (((FAST_FLOAT) (coef)) * (quantval)) + + +/* + * Perform dequantization and inverse DCT on one block of coefficients. + */ + +GLOBAL(void) +jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + FAST_FLOAT tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + FAST_FLOAT tmp10, tmp11, tmp12, tmp13; + FAST_FLOAT z5, z10, z11, z12, z13; + JCOEFPTR inptr; + FLOAT_MULT_TYPE * quantptr; + FAST_FLOAT * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + FAST_FLOAT workspace[DCTSIZE2]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (FLOAT_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; ctr--) { + /* Due to quantization, we will usually find that many of the input + * coefficients are zero, especially the AC terms. We can exploit this + * by short-circuiting the IDCT calculation for any column in which all + * the AC terms are zero. In that case each output is equal to the + * DC coefficient (with scale factor as needed). + * With typical images and quantization tables, half or more of the + * column DCT calculations can be simplified this way. + */ + + if ((inptr[DCTSIZE*1] | inptr[DCTSIZE*2] | inptr[DCTSIZE*3] | + inptr[DCTSIZE*4] | inptr[DCTSIZE*5] | inptr[DCTSIZE*6] | + inptr[DCTSIZE*7]) == 0) { + /* AC terms all zero */ + FAST_FLOAT dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + wsptr[DCTSIZE*2] = dcval; + wsptr[DCTSIZE*3] = dcval; + wsptr[DCTSIZE*4] = dcval; + wsptr[DCTSIZE*5] = dcval; + wsptr[DCTSIZE*6] = dcval; + wsptr[DCTSIZE*7] = dcval; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + continue; + } + + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp10 = tmp0 + tmp2; /* phase 3 */ + tmp11 = tmp0 - tmp2; + + tmp13 = tmp1 + tmp3; /* phases 5-3 */ + tmp12 = (tmp1 - tmp3) * ((FAST_FLOAT) 1.414213562) - tmp13; /* 2*c4 */ + + tmp0 = tmp10 + tmp13; /* phase 2 */ + tmp3 = tmp10 - tmp13; + tmp1 = tmp11 + tmp12; + tmp2 = tmp11 - tmp12; + + /* Odd part */ + + tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + z13 = tmp6 + tmp5; /* phase 6 */ + z10 = tmp6 - tmp5; + z11 = tmp4 + tmp7; + z12 = tmp4 - tmp7; + + tmp7 = z11 + z13; /* phase 5 */ + tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); /* 2*c4 */ + + z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */ + tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */ + tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */ + + tmp6 = tmp12 - tmp7; /* phase 2 */ + tmp5 = tmp11 - tmp6; + tmp4 = tmp10 + tmp5; + + wsptr[DCTSIZE*0] = tmp0 + tmp7; + wsptr[DCTSIZE*7] = tmp0 - tmp7; + wsptr[DCTSIZE*1] = tmp1 + tmp6; + wsptr[DCTSIZE*6] = tmp1 - tmp6; + wsptr[DCTSIZE*2] = tmp2 + tmp5; + wsptr[DCTSIZE*5] = tmp2 - tmp5; + wsptr[DCTSIZE*4] = tmp3 + tmp4; + wsptr[DCTSIZE*3] = tmp3 - tmp4; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + } + + /* Pass 2: process rows from work array, store into output array. */ + /* Note that we must descale the results by a factor of 8 == 2**3. */ + + wsptr = workspace; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + outptr = output_buf[ctr] + output_col; + /* Rows of zeroes can be exploited in the same way as we did with columns. + * However, the column calculation has created many nonzero AC terms, so + * the simplification applies less often (typically 5% to 10% of the time). + * And testing floats for zero is relatively expensive, so we don't bother. + */ + + /* Even part */ + + tmp10 = wsptr[0] + wsptr[4]; + tmp11 = wsptr[0] - wsptr[4]; + + tmp13 = wsptr[2] + wsptr[6]; + tmp12 = (wsptr[2] - wsptr[6]) * ((FAST_FLOAT) 1.414213562) - tmp13; + + tmp0 = tmp10 + tmp13; + tmp3 = tmp10 - tmp13; + tmp1 = tmp11 + tmp12; + tmp2 = tmp11 - tmp12; + + /* Odd part */ + + z13 = wsptr[5] + wsptr[3]; + z10 = wsptr[5] - wsptr[3]; + z11 = wsptr[1] + wsptr[7]; + z12 = wsptr[1] - wsptr[7]; + + tmp7 = z11 + z13; + tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); + + z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */ + tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */ + tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */ + + tmp6 = tmp12 - tmp7; + tmp5 = tmp11 - tmp6; + tmp4 = tmp10 + tmp5; + + /* Final output stage: scale down by a factor of 8 and range-limit */ + + outptr[0] = range_limit[(int) DESCALE((INT32) (tmp0 + tmp7), 3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) DESCALE((INT32) (tmp0 - tmp7), 3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) DESCALE((INT32) (tmp1 + tmp6), 3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) DESCALE((INT32) (tmp1 - tmp6), 3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) DESCALE((INT32) (tmp2 + tmp5), 3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) DESCALE((INT32) (tmp2 - tmp5), 3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) DESCALE((INT32) (tmp3 + tmp4), 3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) DESCALE((INT32) (tmp3 - tmp4), 3) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + +#endif /* DCT_FLOAT_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/jidctfst.c b/windows_libs/jpeg-6a/jidctfst.c new file mode 100644 index 00000000..c8661ba2 --- /dev/null +++ b/windows_libs/jpeg-6a/jidctfst.c @@ -0,0 +1,367 @@ +/* + * jidctfst.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a fast, not so accurate integer implementation of the + * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine + * must also perform dequantization of the input coefficients. + * + * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT + * on each row (or vice versa, but it's more convenient to emit a row at + * a time). Direct algorithms are also available, but they are much more + * complex and seem not to be any faster when reduced to code. + * + * This implementation is based on Arai, Agui, and Nakajima's algorithm for + * scaled DCT. Their original paper (Trans. IEICE E-71(11):1095) is in + * Japanese, but the algorithm is described in the Pennebaker & Mitchell + * JPEG textbook (see REFERENCES section in file README). The following code + * is based directly on figure 4-8 in P&M. + * While an 8-point DCT cannot be done in less than 11 multiplies, it is + * possible to arrange the computation so that many of the multiplies are + * simple scalings of the final outputs. These multiplies can then be + * folded into the multiplications or divisions by the JPEG quantization + * table entries. The AA&N method leaves only 5 multiplies and 29 adds + * to be done in the DCT itself. + * The primary disadvantage of this method is that with fixed-point math, + * accuracy is lost due to imprecise representation of the scaled + * quantization values. The smaller the quantization table entry, the less + * precise the scaled value, so this implementation does worse with high- + * quality-setting files than with low-quality ones. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_IFAST_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* Scaling decisions are generally the same as in the LL&M algorithm; + * see jidctint.c for more details. However, we choose to descale + * (right shift) multiplication products as soon as they are formed, + * rather than carrying additional fractional bits into subsequent additions. + * This compromises accuracy slightly, but it lets us save a few shifts. + * More importantly, 16-bit arithmetic is then adequate (for 8-bit samples) + * everywhere except in the multiplications proper; this saves a good deal + * of work on 16-bit-int machines. + * + * The dequantized coefficients are not integers because the AA&N scaling + * factors have been incorporated. We represent them scaled up by PASS1_BITS, + * so that the first and second IDCT rounds have the same input scaling. + * For 8-bit JSAMPLEs, we choose IFAST_SCALE_BITS = PASS1_BITS so as to + * avoid a descaling shift; this compromises accuracy rather drastically + * for small quantization table entries, but it saves a lot of shifts. + * For 12-bit JSAMPLEs, there's no hope of using 16x16 multiplies anyway, + * so we use a much larger scaling factor to preserve accuracy. + * + * A final compromise is to represent the multiplicative constants to only + * 8 fractional bits, rather than 13. This saves some shifting work on some + * machines, and may also reduce the cost of multiplication (since there + * are fewer one-bits in the constants). + */ + +#if BITS_IN_JSAMPLE == 8 +#define CONST_BITS 8 +#define PASS1_BITS 2 +#else +#define CONST_BITS 8 +#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ +#endif + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 8 +#define FIX_1_082392200 ((INT32) 277) /* FIX(1.082392200) */ +#define FIX_1_414213562 ((INT32) 362) /* FIX(1.414213562) */ +#define FIX_1_847759065 ((INT32) 473) /* FIX(1.847759065) */ +#define FIX_2_613125930 ((INT32) 669) /* FIX(2.613125930) */ +#else +#define FIX_1_082392200 FIX(1.082392200) +#define FIX_1_414213562 FIX(1.414213562) +#define FIX_1_847759065 FIX(1.847759065) +#define FIX_2_613125930 FIX(2.613125930) +#endif + + +/* We can gain a little more speed, with a further compromise in accuracy, + * by omitting the addition in a descaling shift. This yields an incorrectly + * rounded result half the time... + */ + +#ifndef USE_ACCURATE_ROUNDING +#undef DESCALE +#define DESCALE(x,n) RIGHT_SHIFT(x, n) +#endif + + +/* Multiply a DCTELEM variable by an INT32 constant, and immediately + * descale to yield a DCTELEM result. + */ + +#define MULTIPLY(var,const) ((DCTELEM) DESCALE((var) * (const), CONST_BITS)) + + +/* Dequantize a coefficient by multiplying it by the multiplier-table + * entry; produce a DCTELEM result. For 8-bit data a 16x16->16 + * multiplication will do. For 12-bit data, the multiplier table is + * declared INT32, so a 32-bit multiply will be used. + */ + +#if BITS_IN_JSAMPLE == 8 +#define DEQUANTIZE(coef,quantval) (((IFAST_MULT_TYPE) (coef)) * (quantval)) +#else +#define DEQUANTIZE(coef,quantval) \ + DESCALE((coef)*(quantval), IFAST_SCALE_BITS-PASS1_BITS) +#endif + + +/* Like DESCALE, but applies to a DCTELEM and produces an int. + * We assume that int right shift is unsigned if INT32 right shift is. + */ + +#ifdef RIGHT_SHIFT_IS_UNSIGNED +#define ISHIFT_TEMPS DCTELEM ishift_temp; +#if BITS_IN_JSAMPLE == 8 +#define DCTELEMBITS 16 /* DCTELEM may be 16 or 32 bits */ +#else +#define DCTELEMBITS 32 /* DCTELEM must be 32 bits */ +#endif +#define IRIGHT_SHIFT(x,shft) \ + ((ishift_temp = (x)) < 0 ? \ + (ishift_temp >> (shft)) | ((~((DCTELEM) 0)) << (DCTELEMBITS-(shft))) : \ + (ishift_temp >> (shft))) +#else +#define ISHIFT_TEMPS +#define IRIGHT_SHIFT(x,shft) ((x) >> (shft)) +#endif + +#ifdef USE_ACCURATE_ROUNDING +#define IDESCALE(x,n) ((int) IRIGHT_SHIFT((x) + (1 << ((n)-1)), n)) +#else +#define IDESCALE(x,n) ((int) IRIGHT_SHIFT(x, n)) +#endif + + +/* + * Perform dequantization and inverse DCT on one block of coefficients. + */ + +GLOBAL(void) +jpeg_idct_ifast (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + DCTELEM tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7; + DCTELEM tmp10, tmp11, tmp12, tmp13; + DCTELEM z5, z10, z11, z12, z13; + JCOEFPTR inptr; + IFAST_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[DCTSIZE2]; /* buffers data between passes */ + SHIFT_TEMPS /* for DESCALE */ + ISHIFT_TEMPS /* for IDESCALE */ + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (IFAST_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; ctr--) { + /* Due to quantization, we will usually find that many of the input + * coefficients are zero, especially the AC terms. We can exploit this + * by short-circuiting the IDCT calculation for any column in which all + * the AC terms are zero. In that case each output is equal to the + * DC coefficient (with scale factor as needed). + * With typical images and quantization tables, half or more of the + * column DCT calculations can be simplified this way. + */ + + if ((inptr[DCTSIZE*1] | inptr[DCTSIZE*2] | inptr[DCTSIZE*3] | + inptr[DCTSIZE*4] | inptr[DCTSIZE*5] | inptr[DCTSIZE*6] | + inptr[DCTSIZE*7]) == 0) { + /* AC terms all zero */ + int dcval = (int) DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + wsptr[DCTSIZE*2] = dcval; + wsptr[DCTSIZE*3] = dcval; + wsptr[DCTSIZE*4] = dcval; + wsptr[DCTSIZE*5] = dcval; + wsptr[DCTSIZE*6] = dcval; + wsptr[DCTSIZE*7] = dcval; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + continue; + } + + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp1 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + tmp3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp10 = tmp0 + tmp2; /* phase 3 */ + tmp11 = tmp0 - tmp2; + + tmp13 = tmp1 + tmp3; /* phases 5-3 */ + tmp12 = MULTIPLY(tmp1 - tmp3, FIX_1_414213562) - tmp13; /* 2*c4 */ + + tmp0 = tmp10 + tmp13; /* phase 2 */ + tmp3 = tmp10 - tmp13; + tmp1 = tmp11 + tmp12; + tmp2 = tmp11 - tmp12; + + /* Odd part */ + + tmp4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + tmp5 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp6 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp7 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + + z13 = tmp6 + tmp5; /* phase 6 */ + z10 = tmp6 - tmp5; + z11 = tmp4 + tmp7; + z12 = tmp4 - tmp7; + + tmp7 = z11 + z13; /* phase 5 */ + tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */ + + z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */ + tmp10 = MULTIPLY(z12, FIX_1_082392200) - z5; /* 2*(c2-c6) */ + tmp12 = MULTIPLY(z10, - FIX_2_613125930) + z5; /* -2*(c2+c6) */ + + tmp6 = tmp12 - tmp7; /* phase 2 */ + tmp5 = tmp11 - tmp6; + tmp4 = tmp10 + tmp5; + + wsptr[DCTSIZE*0] = (int) (tmp0 + tmp7); + wsptr[DCTSIZE*7] = (int) (tmp0 - tmp7); + wsptr[DCTSIZE*1] = (int) (tmp1 + tmp6); + wsptr[DCTSIZE*6] = (int) (tmp1 - tmp6); + wsptr[DCTSIZE*2] = (int) (tmp2 + tmp5); + wsptr[DCTSIZE*5] = (int) (tmp2 - tmp5); + wsptr[DCTSIZE*4] = (int) (tmp3 + tmp4); + wsptr[DCTSIZE*3] = (int) (tmp3 - tmp4); + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + } + + /* Pass 2: process rows from work array, store into output array. */ + /* Note that we must descale the results by a factor of 8 == 2**3, */ + /* and also undo the PASS1_BITS scaling. */ + + wsptr = workspace; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + outptr = output_buf[ctr] + output_col; + /* Rows of zeroes can be exploited in the same way as we did with columns. + * However, the column calculation has created many nonzero AC terms, so + * the simplification applies less often (typically 5% to 10% of the time). + * On machines with very fast multiplication, it's possible that the + * test takes more time than it's worth. In that case this section + * may be commented out. + */ + +#ifndef NO_ZERO_ROW_TEST + if ((wsptr[1] | wsptr[2] | wsptr[3] | wsptr[4] | wsptr[5] | wsptr[6] | + wsptr[7]) == 0) { + /* AC terms all zero */ + JSAMPLE dcval = range_limit[IDESCALE(wsptr[0], PASS1_BITS+3) + & RANGE_MASK]; + + outptr[0] = dcval; + outptr[1] = dcval; + outptr[2] = dcval; + outptr[3] = dcval; + outptr[4] = dcval; + outptr[5] = dcval; + outptr[6] = dcval; + outptr[7] = dcval; + + wsptr += DCTSIZE; /* advance pointer to next row */ + continue; + } +#endif + + /* Even part */ + + tmp10 = ((DCTELEM) wsptr[0] + (DCTELEM) wsptr[4]); + tmp11 = ((DCTELEM) wsptr[0] - (DCTELEM) wsptr[4]); + + tmp13 = ((DCTELEM) wsptr[2] + (DCTELEM) wsptr[6]); + tmp12 = MULTIPLY((DCTELEM) wsptr[2] - (DCTELEM) wsptr[6], FIX_1_414213562) + - tmp13; + + tmp0 = tmp10 + tmp13; + tmp3 = tmp10 - tmp13; + tmp1 = tmp11 + tmp12; + tmp2 = tmp11 - tmp12; + + /* Odd part */ + + z13 = (DCTELEM) wsptr[5] + (DCTELEM) wsptr[3]; + z10 = (DCTELEM) wsptr[5] - (DCTELEM) wsptr[3]; + z11 = (DCTELEM) wsptr[1] + (DCTELEM) wsptr[7]; + z12 = (DCTELEM) wsptr[1] - (DCTELEM) wsptr[7]; + + tmp7 = z11 + z13; /* phase 5 */ + tmp11 = MULTIPLY(z11 - z13, FIX_1_414213562); /* 2*c4 */ + + z5 = MULTIPLY(z10 + z12, FIX_1_847759065); /* 2*c2 */ + tmp10 = MULTIPLY(z12, FIX_1_082392200) - z5; /* 2*(c2-c6) */ + tmp12 = MULTIPLY(z10, - FIX_2_613125930) + z5; /* -2*(c2+c6) */ + + tmp6 = tmp12 - tmp7; /* phase 2 */ + tmp5 = tmp11 - tmp6; + tmp4 = tmp10 + tmp5; + + /* Final output stage: scale down by a factor of 8 and range-limit */ + + outptr[0] = range_limit[IDESCALE(tmp0 + tmp7, PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[IDESCALE(tmp0 - tmp7, PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[IDESCALE(tmp1 + tmp6, PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[IDESCALE(tmp1 - tmp6, PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[IDESCALE(tmp2 + tmp5, PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[IDESCALE(tmp2 - tmp5, PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[IDESCALE(tmp3 + tmp4, PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[IDESCALE(tmp3 - tmp4, PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + +#endif /* DCT_IFAST_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/jidctint.c b/windows_libs/jpeg-6a/jidctint.c new file mode 100644 index 00000000..002dac2b --- /dev/null +++ b/windows_libs/jpeg-6a/jidctint.c @@ -0,0 +1,388 @@ +/* + * jidctint.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a slow-but-accurate integer implementation of the + * inverse DCT (Discrete Cosine Transform). In the IJG code, this routine + * must also perform dequantization of the input coefficients. + * + * A 2-D IDCT can be done by 1-D IDCT on each column followed by 1-D IDCT + * on each row (or vice versa, but it's more convenient to emit a row at + * a time). Direct algorithms are also available, but they are much more + * complex and seem not to be any faster when reduced to code. + * + * This implementation is based on an algorithm described in + * C. Loeffler, A. Ligtenberg and G. Moschytz, "Practical Fast 1-D DCT + * Algorithms with 11 Multiplications", Proc. Int'l. Conf. on Acoustics, + * Speech, and Signal Processing 1989 (ICASSP '89), pp. 988-991. + * The primary algorithm described there uses 11 multiplies and 29 adds. + * We use their alternate method with 12 multiplies and 32 adds. + * The advantage of this method is that no data path contains more than one + * multiplication; this allows a very simple and accurate implementation in + * scaled fixed-point arithmetic, with a minimal number of shifts. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef DCT_ISLOW_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* + * The poop on this scaling stuff is as follows: + * + * Each 1-D IDCT step produces outputs which are a factor of sqrt(N) + * larger than the true IDCT outputs. The final outputs are therefore + * a factor of N larger than desired; since N=8 this can be cured by + * a simple right shift at the end of the algorithm. The advantage of + * this arrangement is that we save two multiplications per 1-D IDCT, + * because the y0 and y4 inputs need not be divided by sqrt(N). + * + * We have to do addition and subtraction of the integer inputs, which + * is no problem, and multiplication by fractional constants, which is + * a problem to do in integer arithmetic. We multiply all the constants + * by CONST_SCALE and convert them to integer constants (thus retaining + * CONST_BITS bits of precision in the constants). After doing a + * multiplication we have to divide the product by CONST_SCALE, with proper + * rounding, to produce the correct output. This division can be done + * cheaply as a right shift of CONST_BITS bits. We postpone shifting + * as long as possible so that partial sums can be added together with + * full fractional precision. + * + * The outputs of the first pass are scaled up by PASS1_BITS bits so that + * they are represented to better-than-integral precision. These outputs + * require BITS_IN_JSAMPLE + PASS1_BITS + 3 bits; this fits in a 16-bit word + * with the recommended scaling. (To scale up 12-bit sample data further, an + * intermediate INT32 array would be needed.) + * + * To avoid overflow of the 32-bit intermediate results in pass 2, we must + * have BITS_IN_JSAMPLE + CONST_BITS + PASS1_BITS <= 26. Error analysis + * shows that the values given below are the most effective. + */ + +#if BITS_IN_JSAMPLE == 8 +#define CONST_BITS 13 +#define PASS1_BITS 2 +#else +#define CONST_BITS 13 +#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ +#endif + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 13 +#define FIX_0_298631336 ((INT32) 2446) /* FIX(0.298631336) */ +#define FIX_0_390180644 ((INT32) 3196) /* FIX(0.390180644) */ +#define FIX_0_541196100 ((INT32) 4433) /* FIX(0.541196100) */ +#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */ +#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */ +#define FIX_1_175875602 ((INT32) 9633) /* FIX(1.175875602) */ +#define FIX_1_501321110 ((INT32) 12299) /* FIX(1.501321110) */ +#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */ +#define FIX_1_961570560 ((INT32) 16069) /* FIX(1.961570560) */ +#define FIX_2_053119869 ((INT32) 16819) /* FIX(2.053119869) */ +#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */ +#define FIX_3_072711026 ((INT32) 25172) /* FIX(3.072711026) */ +#else +#define FIX_0_298631336 FIX(0.298631336) +#define FIX_0_390180644 FIX(0.390180644) +#define FIX_0_541196100 FIX(0.541196100) +#define FIX_0_765366865 FIX(0.765366865) +#define FIX_0_899976223 FIX(0.899976223) +#define FIX_1_175875602 FIX(1.175875602) +#define FIX_1_501321110 FIX(1.501321110) +#define FIX_1_847759065 FIX(1.847759065) +#define FIX_1_961570560 FIX(1.961570560) +#define FIX_2_053119869 FIX(2.053119869) +#define FIX_2_562915447 FIX(2.562915447) +#define FIX_3_072711026 FIX(3.072711026) +#endif + + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * For 8-bit samples with the recommended scaling, all the variable + * and constant values involved are no more than 16 bits wide, so a + * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. + * For 12-bit samples, a full 32-bit multiplication will be needed. + */ + +#if BITS_IN_JSAMPLE == 8 +#define MULTIPLY(var,const) MULTIPLY16C16(var,const) +#else +#define MULTIPLY(var,const) ((var) * (const)) +#endif + + +/* Dequantize a coefficient by multiplying it by the multiplier-table + * entry; produce an int result. In this module, both inputs and result + * are 16 bits or less, so either int or short multiply will work. + */ + +#define DEQUANTIZE(coef,quantval) (((ISLOW_MULT_TYPE) (coef)) * (quantval)) + + +/* + * Perform dequantization and inverse DCT on one block of coefficients. + */ + +GLOBAL(void) +jpeg_idct_islow (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp1, tmp2, tmp3; + INT32 tmp10, tmp11, tmp12, tmp13; + INT32 z1, z2, z3, z4, z5; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[DCTSIZE2]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + /* Note results are scaled up by sqrt(8) compared to a true IDCT; */ + /* furthermore, we scale the results by 2**PASS1_BITS. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; ctr--) { + /* Due to quantization, we will usually find that many of the input + * coefficients are zero, especially the AC terms. We can exploit this + * by short-circuiting the IDCT calculation for any column in which all + * the AC terms are zero. In that case each output is equal to the + * DC coefficient (with scale factor as needed). + * With typical images and quantization tables, half or more of the + * column DCT calculations can be simplified this way. + */ + + if ((inptr[DCTSIZE*1] | inptr[DCTSIZE*2] | inptr[DCTSIZE*3] | + inptr[DCTSIZE*4] | inptr[DCTSIZE*5] | inptr[DCTSIZE*6] | + inptr[DCTSIZE*7]) == 0) { + /* AC terms all zero */ + int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + wsptr[DCTSIZE*2] = dcval; + wsptr[DCTSIZE*3] = dcval; + wsptr[DCTSIZE*4] = dcval; + wsptr[DCTSIZE*5] = dcval; + wsptr[DCTSIZE*6] = dcval; + wsptr[DCTSIZE*7] = dcval; + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + continue; + } + + /* Even part: reverse the even part of the forward DCT. */ + /* The rotator is sqrt(2)*c(-6). */ + + z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); + tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065); + tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865); + + z2 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + z3 = DEQUANTIZE(inptr[DCTSIZE*4], quantptr[DCTSIZE*4]); + + tmp0 = (z2 + z3) << CONST_BITS; + tmp1 = (z2 - z3) << CONST_BITS; + + tmp10 = tmp0 + tmp3; + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + /* Odd part per figure 8; the matrix is unitary and hence its + * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. + */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + tmp1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp2 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp3 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + + z1 = tmp0 + tmp3; + z2 = tmp1 + tmp2; + z3 = tmp0 + tmp2; + z4 = tmp1 + tmp3; + z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ + + tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ + tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ + tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ + tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ + z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ + z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ + z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ + z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ + + z3 += z5; + z4 += z5; + + tmp0 += z1 + z3; + tmp1 += z2 + z4; + tmp2 += z2 + z3; + tmp3 += z1 + z4; + + /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ + + wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp3, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*7] = (int) DESCALE(tmp10 - tmp3, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*1] = (int) DESCALE(tmp11 + tmp2, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*6] = (int) DESCALE(tmp11 - tmp2, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*2] = (int) DESCALE(tmp12 + tmp1, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*5] = (int) DESCALE(tmp12 - tmp1, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*3] = (int) DESCALE(tmp13 + tmp0, CONST_BITS-PASS1_BITS); + wsptr[DCTSIZE*4] = (int) DESCALE(tmp13 - tmp0, CONST_BITS-PASS1_BITS); + + inptr++; /* advance pointers to next column */ + quantptr++; + wsptr++; + } + + /* Pass 2: process rows from work array, store into output array. */ + /* Note that we must descale the results by a factor of 8 == 2**3, */ + /* and also undo the PASS1_BITS scaling. */ + + wsptr = workspace; + for (ctr = 0; ctr < DCTSIZE; ctr++) { + outptr = output_buf[ctr] + output_col; + /* Rows of zeroes can be exploited in the same way as we did with columns. + * However, the column calculation has created many nonzero AC terms, so + * the simplification applies less often (typically 5% to 10% of the time). + * On machines with very fast multiplication, it's possible that the + * test takes more time than it's worth. In that case this section + * may be commented out. + */ + +#ifndef NO_ZERO_ROW_TEST + if ((wsptr[1] | wsptr[2] | wsptr[3] | wsptr[4] | wsptr[5] | wsptr[6] | + wsptr[7]) == 0) { + /* AC terms all zero */ + JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3) + & RANGE_MASK]; + + outptr[0] = dcval; + outptr[1] = dcval; + outptr[2] = dcval; + outptr[3] = dcval; + outptr[4] = dcval; + outptr[5] = dcval; + outptr[6] = dcval; + outptr[7] = dcval; + + wsptr += DCTSIZE; /* advance pointer to next row */ + continue; + } +#endif + + /* Even part: reverse the even part of the forward DCT. */ + /* The rotator is sqrt(2)*c(-6). */ + + z2 = (INT32) wsptr[2]; + z3 = (INT32) wsptr[6]; + + z1 = MULTIPLY(z2 + z3, FIX_0_541196100); + tmp2 = z1 + MULTIPLY(z3, - FIX_1_847759065); + tmp3 = z1 + MULTIPLY(z2, FIX_0_765366865); + + tmp0 = ((INT32) wsptr[0] + (INT32) wsptr[4]) << CONST_BITS; + tmp1 = ((INT32) wsptr[0] - (INT32) wsptr[4]) << CONST_BITS; + + tmp10 = tmp0 + tmp3; + tmp13 = tmp0 - tmp3; + tmp11 = tmp1 + tmp2; + tmp12 = tmp1 - tmp2; + + /* Odd part per figure 8; the matrix is unitary and hence its + * transpose is its inverse. i0..i3 are y7,y5,y3,y1 respectively. + */ + + tmp0 = (INT32) wsptr[7]; + tmp1 = (INT32) wsptr[5]; + tmp2 = (INT32) wsptr[3]; + tmp3 = (INT32) wsptr[1]; + + z1 = tmp0 + tmp3; + z2 = tmp1 + tmp2; + z3 = tmp0 + tmp2; + z4 = tmp1 + tmp3; + z5 = MULTIPLY(z3 + z4, FIX_1_175875602); /* sqrt(2) * c3 */ + + tmp0 = MULTIPLY(tmp0, FIX_0_298631336); /* sqrt(2) * (-c1+c3+c5-c7) */ + tmp1 = MULTIPLY(tmp1, FIX_2_053119869); /* sqrt(2) * ( c1+c3-c5+c7) */ + tmp2 = MULTIPLY(tmp2, FIX_3_072711026); /* sqrt(2) * ( c1+c3+c5-c7) */ + tmp3 = MULTIPLY(tmp3, FIX_1_501321110); /* sqrt(2) * ( c1+c3-c5-c7) */ + z1 = MULTIPLY(z1, - FIX_0_899976223); /* sqrt(2) * (c7-c3) */ + z2 = MULTIPLY(z2, - FIX_2_562915447); /* sqrt(2) * (-c1-c3) */ + z3 = MULTIPLY(z3, - FIX_1_961570560); /* sqrt(2) * (-c3-c5) */ + z4 = MULTIPLY(z4, - FIX_0_390180644); /* sqrt(2) * (c5-c3) */ + + z3 += z5; + z4 += z5; + + tmp0 += z1 + z3; + tmp1 += z2 + z4; + tmp2 += z2 + z3; + tmp3 += z1 + z4; + + /* Final output stage: inputs are tmp10..tmp13, tmp0..tmp3 */ + + outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[7] = range_limit[(int) DESCALE(tmp10 - tmp3, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[1] = range_limit[(int) DESCALE(tmp11 + tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[6] = range_limit[(int) DESCALE(tmp11 - tmp2, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[2] = range_limit[(int) DESCALE(tmp12 + tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[5] = range_limit[(int) DESCALE(tmp12 - tmp1, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[3] = range_limit[(int) DESCALE(tmp13 + tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + outptr[4] = range_limit[(int) DESCALE(tmp13 - tmp0, + CONST_BITS+PASS1_BITS+3) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + +#endif /* DCT_ISLOW_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/jidctred.c b/windows_libs/jpeg-6a/jidctred.c new file mode 100644 index 00000000..3ec649c2 --- /dev/null +++ b/windows_libs/jpeg-6a/jidctred.c @@ -0,0 +1,397 @@ +/* + * jidctred.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains inverse-DCT routines that produce reduced-size output: + * either 4x4, 2x2, or 1x1 pixels from an 8x8 DCT block. + * + * The implementation is based on the Loeffler, Ligtenberg and Moschytz (LL&M) + * algorithm used in jidctint.c. We simply replace each 8-to-8 1-D IDCT step + * with an 8-to-4 step that produces the four averages of two adjacent outputs + * (or an 8-to-2 step producing two averages of four outputs, for 2x2 output). + * These steps were derived by computing the corresponding values at the end + * of the normal LL&M code, then simplifying as much as possible. + * + * 1x1 is trivial: just take the DC coefficient divided by 8. + * + * See jidctint.c for additional comments. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jdct.h" /* Private declarations for DCT subsystem */ + +#ifdef IDCT_SCALING_SUPPORTED + + +/* + * This module is specialized to the case DCTSIZE = 8. + */ + +#if DCTSIZE != 8 + Sorry, this code only copes with 8x8 DCTs. /* deliberate syntax err */ +#endif + + +/* Scaling is the same as in jidctint.c. */ + +#if BITS_IN_JSAMPLE == 8 +#define CONST_BITS 13 +#define PASS1_BITS 2 +#else +#define CONST_BITS 13 +#define PASS1_BITS 1 /* lose a little precision to avoid overflow */ +#endif + +/* Some C compilers fail to reduce "FIX(constant)" at compile time, thus + * causing a lot of useless floating-point operations at run time. + * To get around this we use the following pre-calculated constants. + * If you change CONST_BITS you may want to add appropriate values. + * (With a reasonable C compiler, you can just rely on the FIX() macro...) + */ + +#if CONST_BITS == 13 +#define FIX_0_211164243 ((INT32) 1730) /* FIX(0.211164243) */ +#define FIX_0_509795579 ((INT32) 4176) /* FIX(0.509795579) */ +#define FIX_0_601344887 ((INT32) 4926) /* FIX(0.601344887) */ +#define FIX_0_720959822 ((INT32) 5906) /* FIX(0.720959822) */ +#define FIX_0_765366865 ((INT32) 6270) /* FIX(0.765366865) */ +#define FIX_0_850430095 ((INT32) 6967) /* FIX(0.850430095) */ +#define FIX_0_899976223 ((INT32) 7373) /* FIX(0.899976223) */ +#define FIX_1_061594337 ((INT32) 8697) /* FIX(1.061594337) */ +#define FIX_1_272758580 ((INT32) 10426) /* FIX(1.272758580) */ +#define FIX_1_451774981 ((INT32) 11893) /* FIX(1.451774981) */ +#define FIX_1_847759065 ((INT32) 15137) /* FIX(1.847759065) */ +#define FIX_2_172734803 ((INT32) 17799) /* FIX(2.172734803) */ +#define FIX_2_562915447 ((INT32) 20995) /* FIX(2.562915447) */ +#define FIX_3_624509785 ((INT32) 29692) /* FIX(3.624509785) */ +#else +#define FIX_0_211164243 FIX(0.211164243) +#define FIX_0_509795579 FIX(0.509795579) +#define FIX_0_601344887 FIX(0.601344887) +#define FIX_0_720959822 FIX(0.720959822) +#define FIX_0_765366865 FIX(0.765366865) +#define FIX_0_850430095 FIX(0.850430095) +#define FIX_0_899976223 FIX(0.899976223) +#define FIX_1_061594337 FIX(1.061594337) +#define FIX_1_272758580 FIX(1.272758580) +#define FIX_1_451774981 FIX(1.451774981) +#define FIX_1_847759065 FIX(1.847759065) +#define FIX_2_172734803 FIX(2.172734803) +#define FIX_2_562915447 FIX(2.562915447) +#define FIX_3_624509785 FIX(3.624509785) +#endif + + +/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. + * For 8-bit samples with the recommended scaling, all the variable + * and constant values involved are no more than 16 bits wide, so a + * 16x16->32 bit multiply can be used instead of a full 32x32 multiply. + * For 12-bit samples, a full 32-bit multiplication will be needed. + */ + +#if BITS_IN_JSAMPLE == 8 +#define MULTIPLY(var,const) MULTIPLY16C16(var,const) +#else +#define MULTIPLY(var,const) ((var) * (const)) +#endif + + +/* Dequantize a coefficient by multiplying it by the multiplier-table + * entry; produce an int result. In this module, both inputs and result + * are 16 bits or less, so either int or short multiply will work. + */ + +#define DEQUANTIZE(coef,quantval) (((ISLOW_MULT_TYPE) (coef)) * (quantval)) + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a reduced-size 4x4 output block. + */ + +GLOBAL(void) +jpeg_idct_4x4 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp2, tmp10, tmp12; + INT32 z1, z2, z3, z4; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[DCTSIZE*4]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) { + /* Don't bother to process column 4, because second pass won't use it */ + if (ctr == DCTSIZE-4) + continue; + if ((inptr[DCTSIZE*1] | inptr[DCTSIZE*2] | inptr[DCTSIZE*3] | + inptr[DCTSIZE*5] | inptr[DCTSIZE*6] | inptr[DCTSIZE*7]) == 0) { + /* AC terms all zero; we need not examine term 4 for 4x4 output */ + int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + wsptr[DCTSIZE*2] = dcval; + wsptr[DCTSIZE*3] = dcval; + + continue; + } + + /* Even part */ + + tmp0 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp0 <<= (CONST_BITS+1); + + z2 = DEQUANTIZE(inptr[DCTSIZE*2], quantptr[DCTSIZE*2]); + z3 = DEQUANTIZE(inptr[DCTSIZE*6], quantptr[DCTSIZE*6]); + + tmp2 = MULTIPLY(z2, FIX_1_847759065) + MULTIPLY(z3, - FIX_0_765366865); + + tmp10 = tmp0 + tmp2; + tmp12 = tmp0 - tmp2; + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + z2 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + z3 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + z4 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + + tmp0 = MULTIPLY(z1, - FIX_0_211164243) /* sqrt(2) * (c3-c1) */ + + MULTIPLY(z2, FIX_1_451774981) /* sqrt(2) * (c3+c7) */ + + MULTIPLY(z3, - FIX_2_172734803) /* sqrt(2) * (-c1-c5) */ + + MULTIPLY(z4, FIX_1_061594337); /* sqrt(2) * (c5+c7) */ + + tmp2 = MULTIPLY(z1, - FIX_0_509795579) /* sqrt(2) * (c7-c5) */ + + MULTIPLY(z2, - FIX_0_601344887) /* sqrt(2) * (c5-c1) */ + + MULTIPLY(z3, FIX_0_899976223) /* sqrt(2) * (c3-c7) */ + + MULTIPLY(z4, FIX_2_562915447); /* sqrt(2) * (c1+c3) */ + + /* Final output stage */ + + wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp2, CONST_BITS-PASS1_BITS+1); + wsptr[DCTSIZE*3] = (int) DESCALE(tmp10 - tmp2, CONST_BITS-PASS1_BITS+1); + wsptr[DCTSIZE*1] = (int) DESCALE(tmp12 + tmp0, CONST_BITS-PASS1_BITS+1); + wsptr[DCTSIZE*2] = (int) DESCALE(tmp12 - tmp0, CONST_BITS-PASS1_BITS+1); + } + + /* Pass 2: process 4 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 4; ctr++) { + outptr = output_buf[ctr] + output_col; + /* It's not clear whether a zero row test is worthwhile here ... */ + +#ifndef NO_ZERO_ROW_TEST + if ((wsptr[1] | wsptr[2] | wsptr[3] | wsptr[5] | wsptr[6] | + wsptr[7]) == 0) { + /* AC terms all zero */ + JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3) + & RANGE_MASK]; + + outptr[0] = dcval; + outptr[1] = dcval; + outptr[2] = dcval; + outptr[3] = dcval; + + wsptr += DCTSIZE; /* advance pointer to next row */ + continue; + } +#endif + + /* Even part */ + + tmp0 = ((INT32) wsptr[0]) << (CONST_BITS+1); + + tmp2 = MULTIPLY((INT32) wsptr[2], FIX_1_847759065) + + MULTIPLY((INT32) wsptr[6], - FIX_0_765366865); + + tmp10 = tmp0 + tmp2; + tmp12 = tmp0 - tmp2; + + /* Odd part */ + + z1 = (INT32) wsptr[7]; + z2 = (INT32) wsptr[5]; + z3 = (INT32) wsptr[3]; + z4 = (INT32) wsptr[1]; + + tmp0 = MULTIPLY(z1, - FIX_0_211164243) /* sqrt(2) * (c3-c1) */ + + MULTIPLY(z2, FIX_1_451774981) /* sqrt(2) * (c3+c7) */ + + MULTIPLY(z3, - FIX_2_172734803) /* sqrt(2) * (-c1-c5) */ + + MULTIPLY(z4, FIX_1_061594337); /* sqrt(2) * (c5+c7) */ + + tmp2 = MULTIPLY(z1, - FIX_0_509795579) /* sqrt(2) * (c7-c5) */ + + MULTIPLY(z2, - FIX_0_601344887) /* sqrt(2) * (c5-c1) */ + + MULTIPLY(z3, FIX_0_899976223) /* sqrt(2) * (c3-c7) */ + + MULTIPLY(z4, FIX_2_562915447); /* sqrt(2) * (c1+c3) */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp2, + CONST_BITS+PASS1_BITS+3+1) + & RANGE_MASK]; + outptr[3] = range_limit[(int) DESCALE(tmp10 - tmp2, + CONST_BITS+PASS1_BITS+3+1) + & RANGE_MASK]; + outptr[1] = range_limit[(int) DESCALE(tmp12 + tmp0, + CONST_BITS+PASS1_BITS+3+1) + & RANGE_MASK]; + outptr[2] = range_limit[(int) DESCALE(tmp12 - tmp0, + CONST_BITS+PASS1_BITS+3+1) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a reduced-size 2x2 output block. + */ + +GLOBAL(void) +jpeg_idct_2x2 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + INT32 tmp0, tmp10, z1; + JCOEFPTR inptr; + ISLOW_MULT_TYPE * quantptr; + int * wsptr; + JSAMPROW outptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + int ctr; + int workspace[DCTSIZE*2]; /* buffers data between passes */ + SHIFT_TEMPS + + /* Pass 1: process columns from input, store into work array. */ + + inptr = coef_block; + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + wsptr = workspace; + for (ctr = DCTSIZE; ctr > 0; inptr++, quantptr++, wsptr++, ctr--) { + /* Don't bother to process columns 2,4,6 */ + if (ctr == DCTSIZE-2 || ctr == DCTSIZE-4 || ctr == DCTSIZE-6) + continue; + if ((inptr[DCTSIZE*1] | inptr[DCTSIZE*3] | + inptr[DCTSIZE*5] | inptr[DCTSIZE*7]) == 0) { + /* AC terms all zero; we need not examine terms 2,4,6 for 2x2 output */ + int dcval = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]) << PASS1_BITS; + + wsptr[DCTSIZE*0] = dcval; + wsptr[DCTSIZE*1] = dcval; + + continue; + } + + /* Even part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*0], quantptr[DCTSIZE*0]); + tmp10 = z1 << (CONST_BITS+2); + + /* Odd part */ + + z1 = DEQUANTIZE(inptr[DCTSIZE*7], quantptr[DCTSIZE*7]); + tmp0 = MULTIPLY(z1, - FIX_0_720959822); /* sqrt(2) * (c7-c5+c3-c1) */ + z1 = DEQUANTIZE(inptr[DCTSIZE*5], quantptr[DCTSIZE*5]); + tmp0 += MULTIPLY(z1, FIX_0_850430095); /* sqrt(2) * (-c1+c3+c5+c7) */ + z1 = DEQUANTIZE(inptr[DCTSIZE*3], quantptr[DCTSIZE*3]); + tmp0 += MULTIPLY(z1, - FIX_1_272758580); /* sqrt(2) * (-c1+c3-c5-c7) */ + z1 = DEQUANTIZE(inptr[DCTSIZE*1], quantptr[DCTSIZE*1]); + tmp0 += MULTIPLY(z1, FIX_3_624509785); /* sqrt(2) * (c1+c3+c5+c7) */ + + /* Final output stage */ + + wsptr[DCTSIZE*0] = (int) DESCALE(tmp10 + tmp0, CONST_BITS-PASS1_BITS+2); + wsptr[DCTSIZE*1] = (int) DESCALE(tmp10 - tmp0, CONST_BITS-PASS1_BITS+2); + } + + /* Pass 2: process 2 rows from work array, store into output array. */ + + wsptr = workspace; + for (ctr = 0; ctr < 2; ctr++) { + outptr = output_buf[ctr] + output_col; + /* It's not clear whether a zero row test is worthwhile here ... */ + +#ifndef NO_ZERO_ROW_TEST + if ((wsptr[1] | wsptr[3] | wsptr[5] | wsptr[7]) == 0) { + /* AC terms all zero */ + JSAMPLE dcval = range_limit[(int) DESCALE((INT32) wsptr[0], PASS1_BITS+3) + & RANGE_MASK]; + + outptr[0] = dcval; + outptr[1] = dcval; + + wsptr += DCTSIZE; /* advance pointer to next row */ + continue; + } +#endif + + /* Even part */ + + tmp10 = ((INT32) wsptr[0]) << (CONST_BITS+2); + + /* Odd part */ + + tmp0 = MULTIPLY((INT32) wsptr[7], - FIX_0_720959822) /* sqrt(2) * (c7-c5+c3-c1) */ + + MULTIPLY((INT32) wsptr[5], FIX_0_850430095) /* sqrt(2) * (-c1+c3+c5+c7) */ + + MULTIPLY((INT32) wsptr[3], - FIX_1_272758580) /* sqrt(2) * (-c1+c3-c5-c7) */ + + MULTIPLY((INT32) wsptr[1], FIX_3_624509785); /* sqrt(2) * (c1+c3+c5+c7) */ + + /* Final output stage */ + + outptr[0] = range_limit[(int) DESCALE(tmp10 + tmp0, + CONST_BITS+PASS1_BITS+3+2) + & RANGE_MASK]; + outptr[1] = range_limit[(int) DESCALE(tmp10 - tmp0, + CONST_BITS+PASS1_BITS+3+2) + & RANGE_MASK]; + + wsptr += DCTSIZE; /* advance pointer to next row */ + } +} + + +/* + * Perform dequantization and inverse DCT on one block of coefficients, + * producing a reduced-size 1x1 output block. + */ + +GLOBAL(void) +jpeg_idct_1x1 (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col) +{ + int dcval; + ISLOW_MULT_TYPE * quantptr; + JSAMPLE *range_limit = IDCT_range_limit(cinfo); + SHIFT_TEMPS + + /* We hardly need an inverse DCT routine for this: just take the + * average pixel value, which is one-eighth of the DC coefficient. + */ + quantptr = (ISLOW_MULT_TYPE *) compptr->dct_table; + dcval = DEQUANTIZE(coef_block[0], quantptr[0]); + dcval = (int) DESCALE((INT32) dcval, 3); + + output_buf[0][output_col] = range_limit[dcval & RANGE_MASK]; +} + +#endif /* IDCT_SCALING_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/jinclude.h b/windows_libs/jpeg-6a/jinclude.h new file mode 100644 index 00000000..0a4f1514 --- /dev/null +++ b/windows_libs/jpeg-6a/jinclude.h @@ -0,0 +1,91 @@ +/* + * jinclude.h + * + * Copyright (C) 1991-1994, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file exists to provide a single place to fix any problems with + * including the wrong system include files. (Common problems are taken + * care of by the standard jconfig symbols, but on really weird systems + * you may have to edit this file.) + * + * NOTE: this file is NOT intended to be included by applications using the + * JPEG library. Most applications need only include jpeglib.h. + */ + + +/* Include auto-config file to find out which system include files we need. */ + +#include "jconfig.h" /* auto configuration options */ +#define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */ + +/* + * We need the NULL macro and size_t typedef. + * On an ANSI-conforming system it is sufficient to include . + * Otherwise, we get them from or ; we may have to + * pull in as well. + * Note that the core JPEG library does not require ; + * only the default error handler and data source/destination modules do. + * But we must pull it in because of the references to FILE in jpeglib.h. + * You can remove those references if you want to compile without . + */ + +#ifdef HAVE_STDDEF_H +#include +#endif + +#ifdef HAVE_STDLIB_H +#include +#endif + +#ifdef NEED_SYS_TYPES_H +#include +#endif + +#include + +/* + * We need memory copying and zeroing functions, plus strncpy(). + * ANSI and System V implementations declare these in . + * BSD doesn't have the mem() functions, but it does have bcopy()/bzero(). + * Some systems may declare memset and memcpy in . + * + * NOTE: we assume the size parameters to these functions are of type size_t. + * Change the casts in these macros if not! + */ + +#ifdef NEED_BSD_STRINGS + +#include +#define MEMZERO(target,size) bzero((void *)(target), (size_t)(size)) +#define MEMCOPY(dest,src,size) bcopy((const void *)(src), (void *)(dest), (size_t)(size)) + +#else /* not BSD, assume ANSI/SysV string lib */ + +#include +#define MEMZERO(target,size) memset((void *)(target), 0, (size_t)(size)) +#define MEMCOPY(dest,src,size) memcpy((void *)(dest), (const void *)(src), (size_t)(size)) + +#endif + +/* + * In ANSI C, and indeed any rational implementation, size_t is also the + * type returned by sizeof(). However, it seems there are some irrational + * implementations out there, in which sizeof() returns an int even though + * size_t is defined as long or unsigned long. To ensure consistent results + * we always use this SIZEOF() macro in place of using sizeof() directly. + */ + +#define SIZEOF(object) ((size_t) sizeof(object)) + +/* + * The modules that use fread() and fwrite() always invoke them through + * these macros. On some systems you may need to twiddle the argument casts. + * CAUTION: argument order is different from underlying functions! + */ + +#define JFREAD(file,buf,sizeofbuf) \ + ((size_t) fread((void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) +#define JFWRITE(file,buf,sizeofbuf) \ + ((size_t) fwrite((const void *) (buf), (size_t) 1, (size_t) (sizeofbuf), (file))) diff --git a/windows_libs/jpeg-6a/jmemansi.c b/windows_libs/jpeg-6a/jmemansi.c new file mode 100644 index 00000000..2d93e496 --- /dev/null +++ b/windows_libs/jpeg-6a/jmemansi.c @@ -0,0 +1,167 @@ +/* + * jmemansi.c + * + * Copyright (C) 1992-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides a simple generic implementation of the system- + * dependent portion of the JPEG memory manager. This implementation + * assumes that you have the ANSI-standard library routine tmpfile(). + * Also, the problem of determining the amount of memory available + * is shoved onto the user. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ +extern void * malloc JPP((size_t size)); +extern void free JPP((void *ptr)); +#endif + +#ifndef SEEK_SET /* pre-ANSI systems may not define this; */ +#define SEEK_SET 0 /* if not, assume 0 is correct */ +#endif + + +/* + * Memory allocation and freeing are controlled by the regular library + * routines malloc() and free(). + */ + +GLOBAL(void *) +jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * "Large" objects are treated the same as "small" ones. + * NB: although we include FAR keywords in the routine declarations, + * this file won't actually work in 80x86 small/medium model; at least, + * you probably won't be able to process useful-size images in only 64KB. + */ + +GLOBAL(void FAR *) +jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void FAR *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * This routine computes the total memory space available for allocation. + * It's impossible to do this in a portable way; our current solution is + * to make the user tell us (with a default value set at compile time). + * If you can actually get the available space, it's a good idea to subtract + * a slop factor of 5% or so. + */ + +#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ +#define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */ +#endif + +GLOBAL(long) +jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, + long max_bytes_needed, long already_allocated) +{ + return cinfo->mem->max_memory_to_use - already_allocated; +} + + +/* + * Backing store (temporary file) management. + * Backing store objects are only used when the value returned by + * jpeg_mem_available is less than the total space needed. You can dispense + * with these routines if you have plenty of virtual memory; see jmemnobs.c. + */ + + +METHODDEF(void) +read_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (fseek(info->temp_file, file_offset, SEEK_SET)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + if (JFREAD(info->temp_file, buffer_address, byte_count) + != (size_t) byte_count) + ERREXIT(cinfo, JERR_TFILE_READ); +} + + +METHODDEF(void) +write_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (fseek(info->temp_file, file_offset, SEEK_SET)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + if (JFWRITE(info->temp_file, buffer_address, byte_count) + != (size_t) byte_count) + ERREXIT(cinfo, JERR_TFILE_WRITE); +} + + +METHODDEF(void) +close_backing_store (j_common_ptr cinfo, backing_store_ptr info) +{ + fclose(info->temp_file); + /* Since this implementation uses tmpfile() to create the file, + * no explicit file deletion is needed. + */ +} + + +/* + * Initial opening of a backing-store object. + * + * This version uses tmpfile(), which constructs a suitable file name + * behind the scenes. We don't have to use info->temp_name[] at all; + * indeed, we can't even find out the actual name of the temp file. + */ + +GLOBAL(void) +jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + if ((info->temp_file = tmpfile()) == NULL) + ERREXITS(cinfo, JERR_TFILE_CREATE, ""); + info->read_backing_store = read_backing_store; + info->write_backing_store = write_backing_store; + info->close_backing_store = close_backing_store; +} + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. + */ + +GLOBAL(long) +jpeg_mem_init (j_common_ptr cinfo) +{ + return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ +} + +GLOBAL(void) +jpeg_mem_term (j_common_ptr cinfo) +{ + /* no work */ +} diff --git a/windows_libs/jpeg-6a/jmemdos.c b/windows_libs/jpeg-6a/jmemdos.c new file mode 100644 index 00000000..77fb5ad5 --- /dev/null +++ b/windows_libs/jpeg-6a/jmemdos.c @@ -0,0 +1,634 @@ +/* + * jmemdos.c + * + * Copyright (C) 1992-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides an MS-DOS-compatible implementation of the system- + * dependent portion of the JPEG memory manager. Temporary data can be + * stored in extended or expanded memory as well as in regular DOS files. + * + * If you use this file, you must be sure that NEED_FAR_POINTERS is defined + * if you compile in a small-data memory model; it should NOT be defined if + * you use a large-data memory model. This file is not recommended if you + * are using a flat-memory-space 386 environment such as DJGCC or Watcom C. + * Also, this code will NOT work if struct fields are aligned on greater than + * 2-byte boundaries. + * + * Based on code contributed by Ge' Weijers. + */ + +/* + * If you have both extended and expanded memory, you may want to change the + * order in which they are tried in jopen_backing_store. On a 286 machine + * expanded memory is usually faster, since extended memory access involves + * an expensive protected-mode-and-back switch. On 386 and better, extended + * memory is usually faster. As distributed, the code tries extended memory + * first (what? not everyone has a 386? :-). + * + * You can disable use of extended/expanded memory entirely by altering these + * definitions or overriding them from the Makefile (eg, -DEMS_SUPPORTED=0). + */ + +#ifndef XMS_SUPPORTED +#define XMS_SUPPORTED 1 +#endif +#ifndef EMS_SUPPORTED +#define EMS_SUPPORTED 1 +#endif + + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef HAVE_STDLIB_H /* should declare these */ +extern void * malloc JPP((size_t size)); +extern void free JPP((void *ptr)); +extern char * getenv JPP((const char * name)); +#endif + +#ifdef NEED_FAR_POINTERS + +#ifdef __TURBOC__ +/* These definitions work for Borland C (Turbo C) */ +#include /* need farmalloc(), farfree() */ +#define far_malloc(x) farmalloc(x) +#define far_free(x) farfree(x) +#else +/* These definitions work for Microsoft C and compatible compilers */ +#include /* need _fmalloc(), _ffree() */ +#define far_malloc(x) _fmalloc(x) +#define far_free(x) _ffree(x) +#endif + +#else /* not NEED_FAR_POINTERS */ + +#define far_malloc(x) malloc(x) +#define far_free(x) free(x) + +#endif /* NEED_FAR_POINTERS */ + +#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ +#define READ_BINARY "r" +#else +#define READ_BINARY "rb" +#endif + +#if MAX_ALLOC_CHUNK >= 65535L /* make sure jconfig.h got this right */ + MAX_ALLOC_CHUNK should be less than 64K. /* deliberate syntax error */ +#endif + + +/* + * Declarations for assembly-language support routines (see jmemdosa.asm). + * + * The functions are declared "far" as are all their pointer arguments; + * this ensures the assembly source code will work regardless of the + * compiler memory model. We assume "short" is 16 bits, "long" is 32. + */ + +typedef void far * XMSDRIVER; /* actually a pointer to code */ +typedef struct { /* registers for calling XMS driver */ + unsigned short ax, dx, bx; + void far * ds_si; + } XMScontext; +typedef struct { /* registers for calling EMS driver */ + unsigned short ax, dx, bx; + void far * ds_si; + } EMScontext; + +extern short far jdos_open JPP((short far * handle, char far * filename)); +extern short far jdos_close JPP((short handle)); +extern short far jdos_seek JPP((short handle, long offset)); +extern short far jdos_read JPP((short handle, void far * buffer, + unsigned short count)); +extern short far jdos_write JPP((short handle, void far * buffer, + unsigned short count)); +extern void far jxms_getdriver JPP((XMSDRIVER far *)); +extern void far jxms_calldriver JPP((XMSDRIVER, XMScontext far *)); +extern short far jems_available JPP((void)); +extern void far jems_calldriver JPP((EMScontext far *)); + + +/* + * Selection of a file name for a temporary file. + * This is highly system-dependent, and you may want to customize it. + */ + +static int next_file_num; /* to distinguish among several temp files */ + +LOCAL(void) +select_file_name (char * fname) +{ + const char * env; + char * ptr; + FILE * tfile; + + /* Keep generating file names till we find one that's not in use */ + for (;;) { + /* Get temp directory name from environment TMP or TEMP variable; + * if none, use "." + */ + if ((env = (const char *) getenv("TMP")) == NULL) + if ((env = (const char *) getenv("TEMP")) == NULL) + env = "."; + if (*env == '\0') /* null string means "." */ + env = "."; + ptr = fname; /* copy name to fname */ + while (*env != '\0') + *ptr++ = *env++; + if (ptr[-1] != '\\' && ptr[-1] != '/') + *ptr++ = '\\'; /* append backslash if not in env variable */ + /* Append a suitable file name */ + next_file_num++; /* advance counter */ + sprintf(ptr, "JPG%03d.TMP", next_file_num); + /* Probe to see if file name is already in use */ + if ((tfile = fopen(fname, READ_BINARY)) == NULL) + break; + fclose(tfile); /* oops, it's there; close tfile & try again */ + } +} + + +/* + * Near-memory allocation and freeing are controlled by the regular library + * routines malloc() and free(). + */ + +GLOBAL(void *) +jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * "Large" objects are allocated in far memory, if possible + */ + +GLOBAL(void FAR *) +jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void FAR *) far_malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) +{ + far_free(object); +} + + +/* + * This routine computes the total memory space available for allocation. + * It's impossible to do this in a portable way; our current solution is + * to make the user tell us (with a default value set at compile time). + * If you can actually get the available space, it's a good idea to subtract + * a slop factor of 5% or so. + */ + +#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ +#define DEFAULT_MAX_MEM 300000L /* for total usage about 450K */ +#endif + +GLOBAL(long) +jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, + long max_bytes_needed, long already_allocated) +{ + return cinfo->mem->max_memory_to_use - already_allocated; +} + + +/* + * Backing store (temporary file) management. + * Backing store objects are only used when the value returned by + * jpeg_mem_available is less than the total space needed. You can dispense + * with these routines if you have plenty of virtual memory; see jmemnobs.c. + */ + +/* + * For MS-DOS we support three types of backing storage: + * 1. Conventional DOS files. We access these by direct DOS calls rather + * than via the stdio package. This provides a bit better performance, + * but the real reason is that the buffers to be read or written are FAR. + * The stdio library for small-data memory models can't cope with that. + * 2. Extended memory, accessed per the XMS V2.0 specification. + * 3. Expanded memory, accessed per the LIM/EMS 4.0 specification. + * You'll need copies of those specs to make sense of the related code. + * The specs are available by Internet FTP from the SIMTEL archives + * (oak.oakland.edu and its various mirror sites). See files + * pub/msdos/microsoft/xms20.arc and pub/msdos/info/limems41.zip. + */ + + +/* + * Access methods for a DOS file. + */ + + +METHODDEF(void) +read_file_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (jdos_seek(info->handle.file_handle, file_offset)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */ + if (byte_count > 65535L) /* safety check */ + ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); + if (jdos_read(info->handle.file_handle, buffer_address, + (unsigned short) byte_count)) + ERREXIT(cinfo, JERR_TFILE_READ); +} + + +METHODDEF(void) +write_file_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (jdos_seek(info->handle.file_handle, file_offset)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + /* Since MAX_ALLOC_CHUNK is less than 64K, byte_count will be too. */ + if (byte_count > 65535L) /* safety check */ + ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); + if (jdos_write(info->handle.file_handle, buffer_address, + (unsigned short) byte_count)) + ERREXIT(cinfo, JERR_TFILE_WRITE); +} + + +METHODDEF(void) +close_file_store (j_common_ptr cinfo, backing_store_ptr info) +{ + jdos_close(info->handle.file_handle); /* close the file */ + remove(info->temp_name); /* delete the file */ +/* If your system doesn't have remove(), try unlink() instead. + * remove() is the ANSI-standard name for this function, but + * unlink() was more common in pre-ANSI systems. + */ + TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name); +} + + +LOCAL(boolean) +open_file_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + short handle; + + select_file_name(info->temp_name); + if (jdos_open((short far *) & handle, (char far *) info->temp_name)) { + /* might as well exit since jpeg_open_backing_store will fail anyway */ + ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); + return FALSE; + } + info->handle.file_handle = handle; + info->read_backing_store = read_file_store; + info->write_backing_store = write_file_store; + info->close_backing_store = close_file_store; + TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); + return TRUE; /* succeeded */ +} + + +/* + * Access methods for extended memory. + */ + +#if XMS_SUPPORTED + +static XMSDRIVER xms_driver; /* saved address of XMS driver */ + +typedef union { /* either long offset or real-mode pointer */ + long offset; + void far * ptr; + } XMSPTR; + +typedef struct { /* XMS move specification structure */ + long length; + XMSH src_handle; + XMSPTR src; + XMSH dst_handle; + XMSPTR dst; + } XMSspec; + +#define ODD(X) (((X) & 1L) != 0) + + +METHODDEF(void) +read_xms_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + XMScontext ctx; + XMSspec spec; + char endbuffer[2]; + + /* The XMS driver can't cope with an odd length, so handle the last byte + * specially if byte_count is odd. We don't expect this to be common. + */ + + spec.length = byte_count & (~ 1L); + spec.src_handle = info->handle.xms_handle; + spec.src.offset = file_offset; + spec.dst_handle = 0; + spec.dst.ptr = buffer_address; + + ctx.ds_si = (void far *) & spec; + ctx.ax = 0x0b00; /* EMB move */ + jxms_calldriver(xms_driver, (XMScontext far *) & ctx); + if (ctx.ax != 1) + ERREXIT(cinfo, JERR_XMS_READ); + + if (ODD(byte_count)) { + read_xms_store(cinfo, info, (void FAR *) endbuffer, + file_offset + byte_count - 1L, 2L); + ((char FAR *) buffer_address)[byte_count - 1L] = endbuffer[0]; + } +} + + +METHODDEF(void) +write_xms_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + XMScontext ctx; + XMSspec spec; + char endbuffer[2]; + + /* The XMS driver can't cope with an odd length, so handle the last byte + * specially if byte_count is odd. We don't expect this to be common. + */ + + spec.length = byte_count & (~ 1L); + spec.src_handle = 0; + spec.src.ptr = buffer_address; + spec.dst_handle = info->handle.xms_handle; + spec.dst.offset = file_offset; + + ctx.ds_si = (void far *) & spec; + ctx.ax = 0x0b00; /* EMB move */ + jxms_calldriver(xms_driver, (XMScontext far *) & ctx); + if (ctx.ax != 1) + ERREXIT(cinfo, JERR_XMS_WRITE); + + if (ODD(byte_count)) { + read_xms_store(cinfo, info, (void FAR *) endbuffer, + file_offset + byte_count - 1L, 2L); + endbuffer[0] = ((char FAR *) buffer_address)[byte_count - 1L]; + write_xms_store(cinfo, info, (void FAR *) endbuffer, + file_offset + byte_count - 1L, 2L); + } +} + + +METHODDEF(void) +close_xms_store (j_common_ptr cinfo, backing_store_ptr info) +{ + XMScontext ctx; + + ctx.dx = info->handle.xms_handle; + ctx.ax = 0x0a00; + jxms_calldriver(xms_driver, (XMScontext far *) & ctx); + TRACEMS1(cinfo, 1, JTRC_XMS_CLOSE, info->handle.xms_handle); + /* we ignore any error return from the driver */ +} + + +LOCAL(boolean) +open_xms_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + XMScontext ctx; + + /* Get address of XMS driver */ + jxms_getdriver((XMSDRIVER far *) & xms_driver); + if (xms_driver == NULL) + return FALSE; /* no driver to be had */ + + /* Get version number, must be >= 2.00 */ + ctx.ax = 0x0000; + jxms_calldriver(xms_driver, (XMScontext far *) & ctx); + if (ctx.ax < (unsigned short) 0x0200) + return FALSE; + + /* Try to get space (expressed in kilobytes) */ + ctx.dx = (unsigned short) ((total_bytes_needed + 1023L) >> 10); + ctx.ax = 0x0900; + jxms_calldriver(xms_driver, (XMScontext far *) & ctx); + if (ctx.ax != 1) + return FALSE; + + /* Succeeded, save the handle and away we go */ + info->handle.xms_handle = ctx.dx; + info->read_backing_store = read_xms_store; + info->write_backing_store = write_xms_store; + info->close_backing_store = close_xms_store; + TRACEMS1(cinfo, 1, JTRC_XMS_OPEN, ctx.dx); + return TRUE; /* succeeded */ +} + +#endif /* XMS_SUPPORTED */ + + +/* + * Access methods for expanded memory. + */ + +#if EMS_SUPPORTED + +/* The EMS move specification structure requires word and long fields aligned + * at odd byte boundaries. Some compilers will align struct fields at even + * byte boundaries. While it's usually possible to force byte alignment, + * that causes an overall performance penalty and may pose problems in merging + * JPEG into a larger application. Instead we accept some rather dirty code + * here. Note this code would fail if the hardware did not allow odd-byte + * word & long accesses, but all 80x86 CPUs do. + */ + +typedef void far * EMSPTR; + +typedef union { /* EMS move specification structure */ + long length; /* It's easy to access first 4 bytes */ + char bytes[18]; /* Misaligned fields in here! */ + } EMSspec; + +/* Macros for accessing misaligned fields */ +#define FIELD_AT(spec,offset,type) (*((type *) &(spec.bytes[offset]))) +#define SRC_TYPE(spec) FIELD_AT(spec,4,char) +#define SRC_HANDLE(spec) FIELD_AT(spec,5,EMSH) +#define SRC_OFFSET(spec) FIELD_AT(spec,7,unsigned short) +#define SRC_PAGE(spec) FIELD_AT(spec,9,unsigned short) +#define SRC_PTR(spec) FIELD_AT(spec,7,EMSPTR) +#define DST_TYPE(spec) FIELD_AT(spec,11,char) +#define DST_HANDLE(spec) FIELD_AT(spec,12,EMSH) +#define DST_OFFSET(spec) FIELD_AT(spec,14,unsigned short) +#define DST_PAGE(spec) FIELD_AT(spec,16,unsigned short) +#define DST_PTR(spec) FIELD_AT(spec,14,EMSPTR) + +#define EMSPAGESIZE 16384L /* gospel, see the EMS specs */ + +#define HIBYTE(W) (((W) >> 8) & 0xFF) +#define LOBYTE(W) ((W) & 0xFF) + + +METHODDEF(void) +read_ems_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + EMScontext ctx; + EMSspec spec; + + spec.length = byte_count; + SRC_TYPE(spec) = 1; + SRC_HANDLE(spec) = info->handle.ems_handle; + SRC_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE); + SRC_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE); + DST_TYPE(spec) = 0; + DST_HANDLE(spec) = 0; + DST_PTR(spec) = buffer_address; + + ctx.ds_si = (void far *) & spec; + ctx.ax = 0x5700; /* move memory region */ + jems_calldriver((EMScontext far *) & ctx); + if (HIBYTE(ctx.ax) != 0) + ERREXIT(cinfo, JERR_EMS_READ); +} + + +METHODDEF(void) +write_ems_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + EMScontext ctx; + EMSspec spec; + + spec.length = byte_count; + SRC_TYPE(spec) = 0; + SRC_HANDLE(spec) = 0; + SRC_PTR(spec) = buffer_address; + DST_TYPE(spec) = 1; + DST_HANDLE(spec) = info->handle.ems_handle; + DST_PAGE(spec) = (unsigned short) (file_offset / EMSPAGESIZE); + DST_OFFSET(spec) = (unsigned short) (file_offset % EMSPAGESIZE); + + ctx.ds_si = (void far *) & spec; + ctx.ax = 0x5700; /* move memory region */ + jems_calldriver((EMScontext far *) & ctx); + if (HIBYTE(ctx.ax) != 0) + ERREXIT(cinfo, JERR_EMS_WRITE); +} + + +METHODDEF(void) +close_ems_store (j_common_ptr cinfo, backing_store_ptr info) +{ + EMScontext ctx; + + ctx.ax = 0x4500; + ctx.dx = info->handle.ems_handle; + jems_calldriver((EMScontext far *) & ctx); + TRACEMS1(cinfo, 1, JTRC_EMS_CLOSE, info->handle.ems_handle); + /* we ignore any error return from the driver */ +} + + +LOCAL(boolean) +open_ems_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + EMScontext ctx; + + /* Is EMS driver there? */ + if (! jems_available()) + return FALSE; + + /* Get status, make sure EMS is OK */ + ctx.ax = 0x4000; + jems_calldriver((EMScontext far *) & ctx); + if (HIBYTE(ctx.ax) != 0) + return FALSE; + + /* Get version, must be >= 4.0 */ + ctx.ax = 0x4600; + jems_calldriver((EMScontext far *) & ctx); + if (HIBYTE(ctx.ax) != 0 || LOBYTE(ctx.ax) < 0x40) + return FALSE; + + /* Try to allocate requested space */ + ctx.ax = 0x4300; + ctx.bx = (unsigned short) ((total_bytes_needed + EMSPAGESIZE-1L) / EMSPAGESIZE); + jems_calldriver((EMScontext far *) & ctx); + if (HIBYTE(ctx.ax) != 0) + return FALSE; + + /* Succeeded, save the handle and away we go */ + info->handle.ems_handle = ctx.dx; + info->read_backing_store = read_ems_store; + info->write_backing_store = write_ems_store; + info->close_backing_store = close_ems_store; + TRACEMS1(cinfo, 1, JTRC_EMS_OPEN, ctx.dx); + return TRUE; /* succeeded */ +} + +#endif /* EMS_SUPPORTED */ + + +/* + * Initial opening of a backing-store object. + */ + +GLOBAL(void) +jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + /* Try extended memory, then expanded memory, then regular file. */ +#if XMS_SUPPORTED + if (open_xms_store(cinfo, info, total_bytes_needed)) + return; +#endif +#if EMS_SUPPORTED + if (open_ems_store(cinfo, info, total_bytes_needed)) + return; +#endif + if (open_file_store(cinfo, info, total_bytes_needed)) + return; + ERREXITS(cinfo, JERR_TFILE_CREATE, ""); +} + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. + */ + +GLOBAL(long) +jpeg_mem_init (j_common_ptr cinfo) +{ + next_file_num = 0; /* initialize temp file name generator */ + return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ +} + +GLOBAL(void) +jpeg_mem_term (j_common_ptr cinfo) +{ + /* Microsoft C, at least in v6.00A, will not successfully reclaim freed + * blocks of size > 32Kbytes unless we give it a kick in the rear, like so: + */ +#ifdef NEED_FHEAPMIN + _fheapmin(); +#endif +} diff --git a/windows_libs/jpeg-6a/jmemdosa.asm b/windows_libs/jpeg-6a/jmemdosa.asm new file mode 100644 index 00000000..ecd43729 --- /dev/null +++ b/windows_libs/jpeg-6a/jmemdosa.asm @@ -0,0 +1,379 @@ +; +; jmemdosa.asm +; +; Copyright (C) 1992, Thomas G. Lane. +; This file is part of the Independent JPEG Group's software. +; For conditions of distribution and use, see the accompanying README file. +; +; This file contains low-level interface routines to support the MS-DOS +; backing store manager (jmemdos.c). Routines are provided to access disk +; files through direct DOS calls, and to access XMS and EMS drivers. +; +; This file should assemble with Microsoft's MASM or any compatible +; assembler (including Borland's Turbo Assembler). If you haven't got +; a compatible assembler, better fall back to jmemansi.c or jmemname.c. +; +; To minimize dependence on the C compiler's register usage conventions, +; we save and restore all 8086 registers, even though most compilers only +; require SI,DI,DS to be preserved. Also, we use only 16-bit-wide return +; values, which everybody returns in AX. +; +; Based on code contributed by Ge' Weijers. +; + +JMEMDOSA_TXT segment byte public 'CODE' + + assume cs:JMEMDOSA_TXT + + public _jdos_open + public _jdos_close + public _jdos_seek + public _jdos_read + public _jdos_write + public _jxms_getdriver + public _jxms_calldriver + public _jems_available + public _jems_calldriver + +; +; short far jdos_open (short far * handle, char far * filename) +; +; Create and open a temporary file +; +_jdos_open proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov cx,0 ; normal file attributes + lds dx,dword ptr [bp+10] ; get filename pointer + mov ah,3ch ; create file + int 21h + jc open_err ; if failed, return error code + lds bx,dword ptr [bp+6] ; get handle pointer + mov word ptr [bx],ax ; save the handle + xor ax,ax ; return zero for OK +open_err: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jdos_open endp + + +; +; short far jdos_close (short handle) +; +; Close the file handle +; +_jdos_close proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov bx,word ptr [bp+6] ; file handle + mov ah,3eh ; close file + int 21h + jc close_err ; if failed, return error code + xor ax,ax ; return zero for OK +close_err: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jdos_close endp + + +; +; short far jdos_seek (short handle, long offset) +; +; Set file position +; +_jdos_seek proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov bx,word ptr [bp+6] ; file handle + mov dx,word ptr [bp+8] ; LS offset + mov cx,word ptr [bp+10] ; MS offset + mov ax,4200h ; absolute seek + int 21h + jc seek_err ; if failed, return error code + xor ax,ax ; return zero for OK +seek_err: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jdos_seek endp + + +; +; short far jdos_read (short handle, void far * buffer, unsigned short count) +; +; Read from file +; +_jdos_read proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov bx,word ptr [bp+6] ; file handle + lds dx,dword ptr [bp+8] ; buffer address + mov cx,word ptr [bp+12] ; number of bytes + mov ah,3fh ; read file + int 21h + jc read_err ; if failed, return error code + cmp ax,word ptr [bp+12] ; make sure all bytes were read + je read_ok + mov ax,1 ; else return 1 for not OK + jmp short read_err +read_ok: xor ax,ax ; return zero for OK +read_err: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jdos_read endp + + +; +; short far jdos_write (short handle, void far * buffer, unsigned short count) +; +; Write to file +; +_jdos_write proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov bx,word ptr [bp+6] ; file handle + lds dx,dword ptr [bp+8] ; buffer address + mov cx,word ptr [bp+12] ; number of bytes + mov ah,40h ; write file + int 21h + jc write_err ; if failed, return error code + cmp ax,word ptr [bp+12] ; make sure all bytes written + je write_ok + mov ax,1 ; else return 1 for not OK + jmp short write_err +write_ok: xor ax,ax ; return zero for OK +write_err: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jdos_write endp + + +; +; void far jxms_getdriver (XMSDRIVER far *) +; +; Get the address of the XMS driver, or NULL if not available +; +_jxms_getdriver proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov ax,4300h ; call multiplex interrupt with + int 2fh ; a magic cookie, hex 4300 + cmp al,80h ; AL should contain hex 80 + je xmsavail + xor dx,dx ; no XMS driver available + xor ax,ax ; return a nil pointer + jmp short xmsavail_done +xmsavail: mov ax,4310h ; fetch driver address with + int 2fh ; another magic cookie + mov dx,es ; copy address to dx:ax + mov ax,bx +xmsavail_done: les bx,dword ptr [bp+6] ; get pointer to return value + mov word ptr es:[bx],ax + mov word ptr es:[bx+2],dx + pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jxms_getdriver endp + + +; +; void far jxms_calldriver (XMSDRIVER, XMScontext far *) +; +; The XMScontext structure contains values for the AX,DX,BX,SI,DS registers. +; These are loaded, the XMS call is performed, and the new values of the +; AX,DX,BX registers are written back to the context structure. +; +_jxms_calldriver proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + les bx,dword ptr [bp+10] ; get XMScontext pointer + mov ax,word ptr es:[bx] ; load registers + mov dx,word ptr es:[bx+2] + mov si,word ptr es:[bx+6] + mov ds,word ptr es:[bx+8] + mov bx,word ptr es:[bx+4] + call dword ptr [bp+6] ; call the driver + mov cx,bx ; save returned BX for a sec + les bx,dword ptr [bp+10] ; get XMScontext pointer + mov word ptr es:[bx],ax ; put back ax,dx,bx + mov word ptr es:[bx+2],dx + mov word ptr es:[bx+4],cx + pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jxms_calldriver endp + + +; +; short far jems_available (void) +; +; Have we got an EMS driver? (this comes straight from the EMS 4.0 specs) +; +_jems_available proc far + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + mov ax,3567h ; get interrupt vector 67h + int 21h + push cs + pop ds + mov di,000ah ; check offs 10 in returned seg + lea si,ASCII_device_name ; against literal string + mov cx,8 + cld + repe cmpsb + jne no_ems + mov ax,1 ; match, it's there + jmp short avail_done +no_ems: xor ax,ax ; it's not there +avail_done: pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + ret + +ASCII_device_name db "EMMXXXX0" + +_jems_available endp + + +; +; void far jems_calldriver (EMScontext far *) +; +; The EMScontext structure contains values for the AX,DX,BX,SI,DS registers. +; These are loaded, the EMS trap is performed, and the new values of the +; AX,DX,BX registers are written back to the context structure. +; +_jems_calldriver proc far + push bp ; linkage + mov bp,sp + push si ; save all registers for safety + push di + push bx + push cx + push dx + push es + push ds + les bx,dword ptr [bp+6] ; get EMScontext pointer + mov ax,word ptr es:[bx] ; load registers + mov dx,word ptr es:[bx+2] + mov si,word ptr es:[bx+6] + mov ds,word ptr es:[bx+8] + mov bx,word ptr es:[bx+4] + int 67h ; call the EMS driver + mov cx,bx ; save returned BX for a sec + les bx,dword ptr [bp+6] ; get EMScontext pointer + mov word ptr es:[bx],ax ; put back ax,dx,bx + mov word ptr es:[bx+2],dx + mov word ptr es:[bx+4],cx + pop ds ; restore registers and exit + pop es + pop dx + pop cx + pop bx + pop di + pop si + pop bp + ret +_jems_calldriver endp + +JMEMDOSA_TXT ends + + end diff --git a/windows_libs/jpeg-6a/jmemmac.c b/windows_libs/jpeg-6a/jmemmac.c new file mode 100644 index 00000000..41756cb0 --- /dev/null +++ b/windows_libs/jpeg-6a/jmemmac.c @@ -0,0 +1,199 @@ +/* + * jmemmac.c + * + * Copyright (C) 1992-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * jmemmac.c provides an Apple Macintosh implementation of the system- + * dependent portion of the JPEG memory manager. + * + * jmemmac.c uses the Macintosh toolbox routines NewPtr and DisposePtr + * instead of malloc and free. It accurately determines the amount of + * memory available by using CompactMem. Notice that if left to its + * own devices, this code can chew up all available space in the + * application's zone, with the exception of the rather small "slop" + * factor computed in jpeg_mem_available(). The application can ensure + * that more space is left over by reducing max_memory_to_use. + * + * Large images are swapped to disk using temporary files created with + * tmpfile(); that part of the module is the same as in jmemansi.c. + * Metrowerks CodeWarrior's implementation of tmpfile() isn't quite what + * we want: it puts the files in the local directory and makes them + * user-visible -- and only deletes them when the application quits, + * which means they stick around in the event of a crash. + * It would be better to create the temp files in the system's temporary + * items folder. Perhaps someday we'll get around to doing that. + * + * Contributed by Sam Bushell (jsam@iagu.on.net). + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#include /* we use the MacOS memory manager */ + +#ifndef SEEK_SET /* pre-ANSI systems may not define this; */ +#define SEEK_SET 0 /* if not, assume 0 is correct */ +#endif + + +/* + * Memory allocation and freeing are controlled by the MacOS library + * routines NewPtr() and DisposePtr(), which allocate fixed-address + * storage. Unfortunately, the IJG library isn't smart enough to cope + * with relocatable storage. + */ + +GLOBAL(void *) +jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void *) NewPtr(sizeofobject); +} + +GLOBAL(void) +jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) +{ + DisposePtr((Ptr) object); +} + + +/* + * "Large" objects are treated the same as "small" ones. + * NB: we include FAR keywords in the routine declarations simply for + * consistency with the rest of the IJG code; FAR should expand to empty + * on rational architectures like the Mac. + */ + +GLOBAL(void FAR *) +jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void FAR *) NewPtr(sizeofobject); +} + +GLOBAL(void) +jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) +{ + DisposePtr((Ptr) object); +} + + +/* + * This routine computes the total memory space available for allocation. + */ + +GLOBAL(long) +jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, + long max_bytes_needed, long already_allocated) +{ + long limit = cinfo->mem->max_memory_to_use - already_allocated; + long slop, mem; + + /* Don't ask for more than what application has told us we may use */ + if (max_bytes_needed > limit && limit > 0) + max_bytes_needed = limit; + /* Find whether there's a big enough free block in the heap. + * CompactMem tries to create a contiguous block of the requested size, + * and then returns the size of the largest free block (which could be + * much more or much less than we asked for). + * We add some slop to ensure we don't use up all available memory. + */ + slop = max_bytes_needed / 16 + 32768L; + mem = CompactMem(max_bytes_needed + slop) - slop; + if (mem < 0) + mem = 0; /* sigh, couldn't even get the slop */ + /* Don't take more than the application says we can have */ + if (mem > limit && limit > 0) + mem = limit; + return mem; +} + + +/* + * Backing store (temporary file) management. + * Backing store objects are only used when the value returned by + * jpeg_mem_available is less than the total space needed. You can dispense + * with these routines if you have plenty of virtual memory; see jmemnobs.c. + */ + + +METHODDEF(void) +read_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (fseek(info->temp_file, file_offset, SEEK_SET)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + if (JFREAD(info->temp_file, buffer_address, byte_count) + != (size_t) byte_count) + ERREXIT(cinfo, JERR_TFILE_READ); +} + + +METHODDEF(void) +write_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (fseek(info->temp_file, file_offset, SEEK_SET)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + if (JFWRITE(info->temp_file, buffer_address, byte_count) + != (size_t) byte_count) + ERREXIT(cinfo, JERR_TFILE_WRITE); +} + + +METHODDEF(void) +close_backing_store (j_common_ptr cinfo, backing_store_ptr info) +{ + fclose(info->temp_file); + /* Since this implementation uses tmpfile() to create the file, + * no explicit file deletion is needed. + */ +} + + +/* + * Initial opening of a backing-store object. + * + * This version uses tmpfile(), which constructs a suitable file name + * behind the scenes. We don't have to use info->temp_name[] at all; + * indeed, we can't even find out the actual name of the temp file. + */ + +GLOBAL(void) +jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + if ((info->temp_file = tmpfile()) == NULL) + ERREXITS(cinfo, JERR_TFILE_CREATE, ""); + info->read_backing_store = read_backing_store; + info->write_backing_store = write_backing_store; + info->close_backing_store = close_backing_store; +} + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. + */ + +GLOBAL(long) +jpeg_mem_init (j_common_ptr cinfo) +{ + /* max_memory_to_use will be initialized to FreeMem()'s result; + * the calling application might later reduce it, for example + * to leave room to invoke multiple JPEG objects. + * Note that FreeMem returns the total number of free bytes; + * it may not be possible to allocate a single block of this size. + */ + return FreeMem(); +} + +GLOBAL(void) +jpeg_mem_term (j_common_ptr cinfo) +{ + /* no work */ +} diff --git a/windows_libs/jpeg-6a/jmemmgr.c b/windows_libs/jpeg-6a/jmemmgr.c new file mode 100644 index 00000000..5ea19ce1 --- /dev/null +++ b/windows_libs/jpeg-6a/jmemmgr.c @@ -0,0 +1,1115 @@ +/* + * jmemmgr.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains the JPEG system-independent memory management + * routines. This code is usable across a wide variety of machines; most + * of the system dependencies have been isolated in a separate file. + * The major functions provided here are: + * * pool-based allocation and freeing of memory; + * * policy decisions about how to divide available memory among the + * virtual arrays; + * * control logic for swapping virtual arrays between main memory and + * backing storage. + * The separate system-dependent file provides the actual backing-storage + * access code, and it contains the policy decision about how much total + * main memory to use. + * This file is system-dependent in the sense that some of its functions + * are unnecessary in some systems. For example, if there is enough virtual + * memory so that backing storage will never be used, much of the virtual + * array control logic could be removed. (Of course, if you have that much + * memory then you shouldn't care about a little bit of unused code...) + */ + +#define JPEG_INTERNALS +#define AM_MEMORY_MANAGER /* we define jvirt_Xarray_control structs */ +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef NO_GETENV +#ifndef HAVE_STDLIB_H /* should declare getenv() */ +extern char * getenv JPP((const char * name)); +#endif +#endif + + +/* + * Some important notes: + * The allocation routines provided here must never return NULL. + * They should exit to error_exit if unsuccessful. + * + * It's not a good idea to try to merge the sarray and barray routines, + * even though they are textually almost the same, because samples are + * usually stored as bytes while coefficients are shorts or ints. Thus, + * in machines where byte pointers have a different representation from + * word pointers, the resulting machine code could not be the same. + */ + + +/* + * Many machines require storage alignment: longs must start on 4-byte + * boundaries, doubles on 8-byte boundaries, etc. On such machines, malloc() + * always returns pointers that are multiples of the worst-case alignment + * requirement, and we had better do so too. + * There isn't any really portable way to determine the worst-case alignment + * requirement. This module assumes that the alignment requirement is + * multiples of sizeof(ALIGN_TYPE). + * By default, we define ALIGN_TYPE as double. This is necessary on some + * workstations (where doubles really do need 8-byte alignment) and will work + * fine on nearly everything. If your machine has lesser alignment needs, + * you can save a few bytes by making ALIGN_TYPE smaller. + * The only place I know of where this will NOT work is certain Macintosh + * 680x0 compilers that define double as a 10-byte IEEE extended float. + * Doing 10-byte alignment is counterproductive because longwords won't be + * aligned well. Put "#define ALIGN_TYPE long" in jconfig.h if you have + * such a compiler. + */ + +#ifndef ALIGN_TYPE /* so can override from jconfig.h */ +#define ALIGN_TYPE double +#endif + + +/* + * We allocate objects from "pools", where each pool is gotten with a single + * request to jpeg_get_small() or jpeg_get_large(). There is no per-object + * overhead within a pool, except for alignment padding. Each pool has a + * header with a link to the next pool of the same class. + * Small and large pool headers are identical except that the latter's + * link pointer must be FAR on 80x86 machines. + * Notice that the "real" header fields are union'ed with a dummy ALIGN_TYPE + * field. This forces the compiler to make SIZEOF(small_pool_hdr) a multiple + * of the alignment requirement of ALIGN_TYPE. + */ + +typedef union small_pool_struct * small_pool_ptr; + +typedef union small_pool_struct { + struct { + small_pool_ptr next; /* next in list of pools */ + size_t bytes_used; /* how many bytes already used within pool */ + size_t bytes_left; /* bytes still available in this pool */ + } hdr; + ALIGN_TYPE dummy; /* included in union to ensure alignment */ +} small_pool_hdr; + +typedef union large_pool_struct FAR * large_pool_ptr; + +typedef union large_pool_struct { + struct { + large_pool_ptr next; /* next in list of pools */ + size_t bytes_used; /* how many bytes already used within pool */ + size_t bytes_left; /* bytes still available in this pool */ + } hdr; + ALIGN_TYPE dummy; /* included in union to ensure alignment */ +} large_pool_hdr; + + +/* + * Here is the full definition of a memory manager object. + */ + +typedef struct { + struct jpeg_memory_mgr pub; /* public fields */ + + /* Each pool identifier (lifetime class) names a linked list of pools. */ + small_pool_ptr small_list[JPOOL_NUMPOOLS]; + large_pool_ptr large_list[JPOOL_NUMPOOLS]; + + /* Since we only have one lifetime class of virtual arrays, only one + * linked list is necessary (for each datatype). Note that the virtual + * array control blocks being linked together are actually stored somewhere + * in the small-pool list. + */ + jvirt_sarray_ptr virt_sarray_list; + jvirt_barray_ptr virt_barray_list; + + /* This counts total space obtained from jpeg_get_small/large */ + long total_space_allocated; + + /* alloc_sarray and alloc_barray set this value for use by virtual + * array routines. + */ + JDIMENSION last_rowsperchunk; /* from most recent alloc_sarray/barray */ +} my_memory_mgr; + +typedef my_memory_mgr * my_mem_ptr; + + +/* + * The control blocks for virtual arrays. + * Note that these blocks are allocated in the "small" pool area. + * System-dependent info for the associated backing store (if any) is hidden + * inside the backing_store_info struct. + */ + +struct jvirt_sarray_control { + JSAMPARRAY mem_buffer; /* => the in-memory buffer */ + JDIMENSION rows_in_array; /* total virtual array height */ + JDIMENSION samplesperrow; /* width of array (and of memory buffer) */ + JDIMENSION maxaccess; /* max rows accessed by access_virt_sarray */ + JDIMENSION rows_in_mem; /* height of memory buffer */ + JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */ + JDIMENSION cur_start_row; /* first logical row # in the buffer */ + JDIMENSION first_undef_row; /* row # of first uninitialized row */ + boolean pre_zero; /* pre-zero mode requested? */ + boolean dirty; /* do current buffer contents need written? */ + boolean b_s_open; /* is backing-store data valid? */ + jvirt_sarray_ptr next; /* link to next virtual sarray control block */ + backing_store_info b_s_info; /* System-dependent control info */ +}; + +struct jvirt_barray_control { + JBLOCKARRAY mem_buffer; /* => the in-memory buffer */ + JDIMENSION rows_in_array; /* total virtual array height */ + JDIMENSION blocksperrow; /* width of array (and of memory buffer) */ + JDIMENSION maxaccess; /* max rows accessed by access_virt_barray */ + JDIMENSION rows_in_mem; /* height of memory buffer */ + JDIMENSION rowsperchunk; /* allocation chunk size in mem_buffer */ + JDIMENSION cur_start_row; /* first logical row # in the buffer */ + JDIMENSION first_undef_row; /* row # of first uninitialized row */ + boolean pre_zero; /* pre-zero mode requested? */ + boolean dirty; /* do current buffer contents need written? */ + boolean b_s_open; /* is backing-store data valid? */ + jvirt_barray_ptr next; /* link to next virtual barray control block */ + backing_store_info b_s_info; /* System-dependent control info */ +}; + + +#ifdef MEM_STATS /* optional extra stuff for statistics */ + +LOCAL(void) +print_mem_stats (j_common_ptr cinfo, int pool_id) +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + small_pool_ptr shdr_ptr; + large_pool_ptr lhdr_ptr; + + /* Since this is only a debugging stub, we can cheat a little by using + * fprintf directly rather than going through the trace message code. + * This is helpful because message parm array can't handle longs. + */ + fprintf(stderr, "Freeing pool %d, total space = %ld\n", + pool_id, mem->total_space_allocated); + + for (lhdr_ptr = mem->large_list[pool_id]; lhdr_ptr != NULL; + lhdr_ptr = lhdr_ptr->hdr.next) { + fprintf(stderr, " Large chunk used %ld\n", + (long) lhdr_ptr->hdr.bytes_used); + } + + for (shdr_ptr = mem->small_list[pool_id]; shdr_ptr != NULL; + shdr_ptr = shdr_ptr->hdr.next) { + fprintf(stderr, " Small chunk used %ld free %ld\n", + (long) shdr_ptr->hdr.bytes_used, + (long) shdr_ptr->hdr.bytes_left); + } +} + +#endif /* MEM_STATS */ + + +LOCAL(void) +out_of_memory (j_common_ptr cinfo, int which) +/* Report an out-of-memory error and stop execution */ +/* If we compiled MEM_STATS support, report alloc requests before dying */ +{ +#ifdef MEM_STATS + cinfo->err->trace_level = 2; /* force self_destruct to report stats */ +#endif + ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, which); +} + + +/* + * Allocation of "small" objects. + * + * For these, we use pooled storage. When a new pool must be created, + * we try to get enough space for the current request plus a "slop" factor, + * where the slop will be the amount of leftover space in the new pool. + * The speed vs. space tradeoff is largely determined by the slop values. + * A different slop value is provided for each pool class (lifetime), + * and we also distinguish the first pool of a class from later ones. + * NOTE: the values given work fairly well on both 16- and 32-bit-int + * machines, but may be too small if longs are 64 bits or more. + */ + +static const size_t first_pool_slop[JPOOL_NUMPOOLS] = +{ + 1600, /* first PERMANENT pool */ + 16000 /* first IMAGE pool */ +}; + +static const size_t extra_pool_slop[JPOOL_NUMPOOLS] = +{ + 0, /* additional PERMANENT pools */ + 5000 /* additional IMAGE pools */ +}; + +#define MIN_SLOP 50 /* greater than 0 to avoid futile looping */ + + +METHODDEF(void *) +alloc_small (j_common_ptr cinfo, int pool_id, size_t sizeofobject) +/* Allocate a "small" object */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + small_pool_ptr hdr_ptr, prev_hdr_ptr; + char * data_ptr; + size_t odd_bytes, min_request, slop; + + /* Check for unsatisfiable request (do now to ensure no overflow below) */ + if (sizeofobject > (size_t) (MAX_ALLOC_CHUNK-SIZEOF(small_pool_hdr))) + out_of_memory(cinfo, 1); /* request exceeds malloc's ability */ + + /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */ + odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE); + if (odd_bytes > 0) + sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes; + + /* See if space is available in any existing pool */ + if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + prev_hdr_ptr = NULL; + hdr_ptr = mem->small_list[pool_id]; + while (hdr_ptr != NULL) { + if (hdr_ptr->hdr.bytes_left >= sizeofobject) + break; /* found pool with enough space */ + prev_hdr_ptr = hdr_ptr; + hdr_ptr = hdr_ptr->hdr.next; + } + + /* Time to make a new pool? */ + if (hdr_ptr == NULL) { + /* min_request is what we need now, slop is what will be leftover */ + min_request = sizeofobject + SIZEOF(small_pool_hdr); + if (prev_hdr_ptr == NULL) /* first pool in class? */ + slop = first_pool_slop[pool_id]; + else + slop = extra_pool_slop[pool_id]; + /* Don't ask for more than MAX_ALLOC_CHUNK */ + if (slop > (size_t) (MAX_ALLOC_CHUNK-min_request)) + slop = (size_t) (MAX_ALLOC_CHUNK-min_request); + /* Try to get space, if fail reduce slop and try again */ + for (;;) { + hdr_ptr = (small_pool_ptr) jpeg_get_small(cinfo, min_request + slop); + if (hdr_ptr != NULL) + break; + slop /= 2; + if (slop < MIN_SLOP) /* give up when it gets real small */ + out_of_memory(cinfo, 2); /* jpeg_get_small failed */ + } + mem->total_space_allocated += min_request + slop; + /* Success, initialize the new pool header and add to end of list */ + hdr_ptr->hdr.next = NULL; + hdr_ptr->hdr.bytes_used = 0; + hdr_ptr->hdr.bytes_left = sizeofobject + slop; + if (prev_hdr_ptr == NULL) /* first pool in class? */ + mem->small_list[pool_id] = hdr_ptr; + else + prev_hdr_ptr->hdr.next = hdr_ptr; + } + + /* OK, allocate the object from the current pool */ + data_ptr = (char *) (hdr_ptr + 1); /* point to first data byte in pool */ + data_ptr += hdr_ptr->hdr.bytes_used; /* point to place for object */ + hdr_ptr->hdr.bytes_used += sizeofobject; + hdr_ptr->hdr.bytes_left -= sizeofobject; + + return (void *) data_ptr; +} + + +/* + * Allocation of "large" objects. + * + * The external semantics of these are the same as "small" objects, + * except that FAR pointers are used on 80x86. However the pool + * management heuristics are quite different. We assume that each + * request is large enough that it may as well be passed directly to + * jpeg_get_large; the pool management just links everything together + * so that we can free it all on demand. + * Note: the major use of "large" objects is in JSAMPARRAY and JBLOCKARRAY + * structures. The routines that create these structures (see below) + * deliberately bunch rows together to ensure a large request size. + */ + +METHODDEF(void FAR *) +alloc_large (j_common_ptr cinfo, int pool_id, size_t sizeofobject) +/* Allocate a "large" object */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + large_pool_ptr hdr_ptr; + size_t odd_bytes; + + /* Check for unsatisfiable request (do now to ensure no overflow below) */ + if (sizeofobject > (size_t) (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr))) + out_of_memory(cinfo, 3); /* request exceeds malloc's ability */ + + /* Round up the requested size to a multiple of SIZEOF(ALIGN_TYPE) */ + odd_bytes = sizeofobject % SIZEOF(ALIGN_TYPE); + if (odd_bytes > 0) + sizeofobject += SIZEOF(ALIGN_TYPE) - odd_bytes; + + /* Always make a new pool */ + if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + + hdr_ptr = (large_pool_ptr) jpeg_get_large(cinfo, sizeofobject + + SIZEOF(large_pool_hdr)); + if (hdr_ptr == NULL) + out_of_memory(cinfo, 4); /* jpeg_get_large failed */ + mem->total_space_allocated += sizeofobject + SIZEOF(large_pool_hdr); + + /* Success, initialize the new pool header and add to list */ + hdr_ptr->hdr.next = mem->large_list[pool_id]; + /* We maintain space counts in each pool header for statistical purposes, + * even though they are not needed for allocation. + */ + hdr_ptr->hdr.bytes_used = sizeofobject; + hdr_ptr->hdr.bytes_left = 0; + mem->large_list[pool_id] = hdr_ptr; + + return (void FAR *) (hdr_ptr + 1); /* point to first data byte in pool */ +} + + +/* + * Creation of 2-D sample arrays. + * The pointers are in near heap, the samples themselves in FAR heap. + * + * To minimize allocation overhead and to allow I/O of large contiguous + * blocks, we allocate the sample rows in groups of as many rows as possible + * without exceeding MAX_ALLOC_CHUNK total bytes per allocation request. + * NB: the virtual array control routines, later in this file, know about + * this chunking of rows. The rowsperchunk value is left in the mem manager + * object so that it can be saved away if this sarray is the workspace for + * a virtual array. + */ + +METHODDEF(JSAMPARRAY) +alloc_sarray (j_common_ptr cinfo, int pool_id, + JDIMENSION samplesperrow, JDIMENSION numrows) +/* Allocate a 2-D sample array */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + JSAMPARRAY result; + JSAMPROW workspace; + JDIMENSION rowsperchunk, currow, i; + long ltemp; + + /* Calculate max # of rows allowed in one allocation chunk */ + ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) / + ((long) samplesperrow * SIZEOF(JSAMPLE)); + if (ltemp <= 0) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); + if (ltemp < (long) numrows) + rowsperchunk = (JDIMENSION) ltemp; + else + rowsperchunk = numrows; + mem->last_rowsperchunk = rowsperchunk; + + /* Get space for row pointers (small object) */ + result = (JSAMPARRAY) alloc_small(cinfo, pool_id, + (size_t) (numrows * SIZEOF(JSAMPROW))); + + /* Get the rows themselves (large objects) */ + currow = 0; + while (currow < numrows) { + rowsperchunk = MIN(rowsperchunk, numrows - currow); + workspace = (JSAMPROW) alloc_large(cinfo, pool_id, + (size_t) ((size_t) rowsperchunk * (size_t) samplesperrow + * SIZEOF(JSAMPLE))); + for (i = rowsperchunk; i > 0; i--) { + result[currow++] = workspace; + workspace += samplesperrow; + } + } + + return result; +} + + +/* + * Creation of 2-D coefficient-block arrays. + * This is essentially the same as the code for sample arrays, above. + */ + +METHODDEF(JBLOCKARRAY) +alloc_barray (j_common_ptr cinfo, int pool_id, + JDIMENSION blocksperrow, JDIMENSION numrows) +/* Allocate a 2-D coefficient-block array */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + JBLOCKARRAY result; + JBLOCKROW workspace; + JDIMENSION rowsperchunk, currow, i; + long ltemp; + + /* Calculate max # of rows allowed in one allocation chunk */ + ltemp = (MAX_ALLOC_CHUNK-SIZEOF(large_pool_hdr)) / + ((long) blocksperrow * SIZEOF(JBLOCK)); + if (ltemp <= 0) + ERREXIT(cinfo, JERR_WIDTH_OVERFLOW); + if (ltemp < (long) numrows) + rowsperchunk = (JDIMENSION) ltemp; + else + rowsperchunk = numrows; + mem->last_rowsperchunk = rowsperchunk; + + /* Get space for row pointers (small object) */ + result = (JBLOCKARRAY) alloc_small(cinfo, pool_id, + (size_t) (numrows * SIZEOF(JBLOCKROW))); + + /* Get the rows themselves (large objects) */ + currow = 0; + while (currow < numrows) { + rowsperchunk = MIN(rowsperchunk, numrows - currow); + workspace = (JBLOCKROW) alloc_large(cinfo, pool_id, + (size_t) ((size_t) rowsperchunk * (size_t) blocksperrow + * SIZEOF(JBLOCK))); + for (i = rowsperchunk; i > 0; i--) { + result[currow++] = workspace; + workspace += blocksperrow; + } + } + + return result; +} + + +/* + * About virtual array management: + * + * The above "normal" array routines are only used to allocate strip buffers + * (as wide as the image, but just a few rows high). Full-image-sized buffers + * are handled as "virtual" arrays. The array is still accessed a strip at a + * time, but the memory manager must save the whole array for repeated + * accesses. The intended implementation is that there is a strip buffer in + * memory (as high as is possible given the desired memory limit), plus a + * backing file that holds the rest of the array. + * + * The request_virt_array routines are told the total size of the image and + * the maximum number of rows that will be accessed at once. The in-memory + * buffer must be at least as large as the maxaccess value. + * + * The request routines create control blocks but not the in-memory buffers. + * That is postponed until realize_virt_arrays is called. At that time the + * total amount of space needed is known (approximately, anyway), so free + * memory can be divided up fairly. + * + * The access_virt_array routines are responsible for making a specific strip + * area accessible (after reading or writing the backing file, if necessary). + * Note that the access routines are told whether the caller intends to modify + * the accessed strip; during a read-only pass this saves having to rewrite + * data to disk. The access routines are also responsible for pre-zeroing + * any newly accessed rows, if pre-zeroing was requested. + * + * In current usage, the access requests are usually for nonoverlapping + * strips; that is, successive access start_row numbers differ by exactly + * num_rows = maxaccess. This means we can get good performance with simple + * buffer dump/reload logic, by making the in-memory buffer be a multiple + * of the access height; then there will never be accesses across bufferload + * boundaries. The code will still work with overlapping access requests, + * but it doesn't handle bufferload overlaps very efficiently. + */ + + +METHODDEF(jvirt_sarray_ptr) +request_virt_sarray (j_common_ptr cinfo, int pool_id, boolean pre_zero, + JDIMENSION samplesperrow, JDIMENSION numrows, + JDIMENSION maxaccess) +/* Request a virtual 2-D sample array */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + jvirt_sarray_ptr result; + + /* Only IMAGE-lifetime virtual arrays are currently supported */ + if (pool_id != JPOOL_IMAGE) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + + /* get control block */ + result = (jvirt_sarray_ptr) alloc_small(cinfo, pool_id, + SIZEOF(struct jvirt_sarray_control)); + + result->mem_buffer = NULL; /* marks array not yet realized */ + result->rows_in_array = numrows; + result->samplesperrow = samplesperrow; + result->maxaccess = maxaccess; + result->pre_zero = pre_zero; + result->b_s_open = FALSE; /* no associated backing-store object */ + result->next = mem->virt_sarray_list; /* add to list of virtual arrays */ + mem->virt_sarray_list = result; + + return result; +} + + +METHODDEF(jvirt_barray_ptr) +request_virt_barray (j_common_ptr cinfo, int pool_id, boolean pre_zero, + JDIMENSION blocksperrow, JDIMENSION numrows, + JDIMENSION maxaccess) +/* Request a virtual 2-D coefficient-block array */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + jvirt_barray_ptr result; + + /* Only IMAGE-lifetime virtual arrays are currently supported */ + if (pool_id != JPOOL_IMAGE) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + + /* get control block */ + result = (jvirt_barray_ptr) alloc_small(cinfo, pool_id, + SIZEOF(struct jvirt_barray_control)); + + result->mem_buffer = NULL; /* marks array not yet realized */ + result->rows_in_array = numrows; + result->blocksperrow = blocksperrow; + result->maxaccess = maxaccess; + result->pre_zero = pre_zero; + result->b_s_open = FALSE; /* no associated backing-store object */ + result->next = mem->virt_barray_list; /* add to list of virtual arrays */ + mem->virt_barray_list = result; + + return result; +} + + +METHODDEF(void) +realize_virt_arrays (j_common_ptr cinfo) +/* Allocate the in-memory buffers for any unrealized virtual arrays */ +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + long space_per_minheight, maximum_space, avail_mem; + long minheights, max_minheights; + jvirt_sarray_ptr sptr; + jvirt_barray_ptr bptr; + + /* Compute the minimum space needed (maxaccess rows in each buffer) + * and the maximum space needed (full image height in each buffer). + * These may be of use to the system-dependent jpeg_mem_available routine. + */ + space_per_minheight = 0; + maximum_space = 0; + for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { + if (sptr->mem_buffer == NULL) { /* if not realized yet */ + space_per_minheight += (long) sptr->maxaccess * + (long) sptr->samplesperrow * SIZEOF(JSAMPLE); + maximum_space += (long) sptr->rows_in_array * + (long) sptr->samplesperrow * SIZEOF(JSAMPLE); + } + } + for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { + if (bptr->mem_buffer == NULL) { /* if not realized yet */ + space_per_minheight += (long) bptr->maxaccess * + (long) bptr->blocksperrow * SIZEOF(JBLOCK); + maximum_space += (long) bptr->rows_in_array * + (long) bptr->blocksperrow * SIZEOF(JBLOCK); + } + } + + if (space_per_minheight <= 0) + return; /* no unrealized arrays, no work */ + + /* Determine amount of memory to actually use; this is system-dependent. */ + avail_mem = jpeg_mem_available(cinfo, space_per_minheight, maximum_space, + mem->total_space_allocated); + + /* If the maximum space needed is available, make all the buffers full + * height; otherwise parcel it out with the same number of minheights + * in each buffer. + */ + if (avail_mem >= maximum_space) + max_minheights = 1000000000L; + else { + max_minheights = avail_mem / space_per_minheight; + /* If there doesn't seem to be enough space, try to get the minimum + * anyway. This allows a "stub" implementation of jpeg_mem_available(). + */ + if (max_minheights <= 0) + max_minheights = 1; + } + + /* Allocate the in-memory buffers and initialize backing store as needed. */ + + for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { + if (sptr->mem_buffer == NULL) { /* if not realized yet */ + minheights = ((long) sptr->rows_in_array - 1L) / sptr->maxaccess + 1L; + if (minheights <= max_minheights) { + /* This buffer fits in memory */ + sptr->rows_in_mem = sptr->rows_in_array; + } else { + /* It doesn't fit in memory, create backing store. */ + sptr->rows_in_mem = (JDIMENSION) (max_minheights * sptr->maxaccess); + jpeg_open_backing_store(cinfo, & sptr->b_s_info, + (long) sptr->rows_in_array * + (long) sptr->samplesperrow * + (long) SIZEOF(JSAMPLE)); + sptr->b_s_open = TRUE; + } + sptr->mem_buffer = alloc_sarray(cinfo, JPOOL_IMAGE, + sptr->samplesperrow, sptr->rows_in_mem); + sptr->rowsperchunk = mem->last_rowsperchunk; + sptr->cur_start_row = 0; + sptr->first_undef_row = 0; + sptr->dirty = FALSE; + } + } + + for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { + if (bptr->mem_buffer == NULL) { /* if not realized yet */ + minheights = ((long) bptr->rows_in_array - 1L) / bptr->maxaccess + 1L; + if (minheights <= max_minheights) { + /* This buffer fits in memory */ + bptr->rows_in_mem = bptr->rows_in_array; + } else { + /* It doesn't fit in memory, create backing store. */ + bptr->rows_in_mem = (JDIMENSION) (max_minheights * bptr->maxaccess); + jpeg_open_backing_store(cinfo, & bptr->b_s_info, + (long) bptr->rows_in_array * + (long) bptr->blocksperrow * + (long) SIZEOF(JBLOCK)); + bptr->b_s_open = TRUE; + } + bptr->mem_buffer = alloc_barray(cinfo, JPOOL_IMAGE, + bptr->blocksperrow, bptr->rows_in_mem); + bptr->rowsperchunk = mem->last_rowsperchunk; + bptr->cur_start_row = 0; + bptr->first_undef_row = 0; + bptr->dirty = FALSE; + } + } +} + + +LOCAL(void) +do_sarray_io (j_common_ptr cinfo, jvirt_sarray_ptr ptr, boolean writing) +/* Do backing store read or write of a virtual sample array */ +{ + long bytesperrow, file_offset, byte_count, rows, thisrow, i; + + bytesperrow = (long) ptr->samplesperrow * SIZEOF(JSAMPLE); + file_offset = ptr->cur_start_row * bytesperrow; + /* Loop to read or write each allocation chunk in mem_buffer */ + for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) { + /* One chunk, but check for short chunk at end of buffer */ + rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i); + /* Transfer no more than is currently defined */ + thisrow = (long) ptr->cur_start_row + i; + rows = MIN(rows, (long) ptr->first_undef_row - thisrow); + /* Transfer no more than fits in file */ + rows = MIN(rows, (long) ptr->rows_in_array - thisrow); + if (rows <= 0) /* this chunk might be past end of file! */ + break; + byte_count = rows * bytesperrow; + if (writing) + (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info, + (void FAR *) ptr->mem_buffer[i], + file_offset, byte_count); + else + (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info, + (void FAR *) ptr->mem_buffer[i], + file_offset, byte_count); + file_offset += byte_count; + } +} + + +LOCAL(void) +do_barray_io (j_common_ptr cinfo, jvirt_barray_ptr ptr, boolean writing) +/* Do backing store read or write of a virtual coefficient-block array */ +{ + long bytesperrow, file_offset, byte_count, rows, thisrow, i; + + bytesperrow = (long) ptr->blocksperrow * SIZEOF(JBLOCK); + file_offset = ptr->cur_start_row * bytesperrow; + /* Loop to read or write each allocation chunk in mem_buffer */ + for (i = 0; i < (long) ptr->rows_in_mem; i += ptr->rowsperchunk) { + /* One chunk, but check for short chunk at end of buffer */ + rows = MIN((long) ptr->rowsperchunk, (long) ptr->rows_in_mem - i); + /* Transfer no more than is currently defined */ + thisrow = (long) ptr->cur_start_row + i; + rows = MIN(rows, (long) ptr->first_undef_row - thisrow); + /* Transfer no more than fits in file */ + rows = MIN(rows, (long) ptr->rows_in_array - thisrow); + if (rows <= 0) /* this chunk might be past end of file! */ + break; + byte_count = rows * bytesperrow; + if (writing) + (*ptr->b_s_info.write_backing_store) (cinfo, & ptr->b_s_info, + (void FAR *) ptr->mem_buffer[i], + file_offset, byte_count); + else + (*ptr->b_s_info.read_backing_store) (cinfo, & ptr->b_s_info, + (void FAR *) ptr->mem_buffer[i], + file_offset, byte_count); + file_offset += byte_count; + } +} + + +METHODDEF(JSAMPARRAY) +access_virt_sarray (j_common_ptr cinfo, jvirt_sarray_ptr ptr, + JDIMENSION start_row, JDIMENSION num_rows, + boolean writable) +/* Access the part of a virtual sample array starting at start_row */ +/* and extending for num_rows rows. writable is true if */ +/* caller intends to modify the accessed area. */ +{ + JDIMENSION end_row = start_row + num_rows; + JDIMENSION undef_row; + + /* debugging check */ + if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess || + ptr->mem_buffer == NULL) + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + + /* Make the desired part of the virtual array accessible */ + if (start_row < ptr->cur_start_row || + end_row > ptr->cur_start_row+ptr->rows_in_mem) { + if (! ptr->b_s_open) + ERREXIT(cinfo, JERR_VIRTUAL_BUG); + /* Flush old buffer contents if necessary */ + if (ptr->dirty) { + do_sarray_io(cinfo, ptr, TRUE); + ptr->dirty = FALSE; + } + /* Decide what part of virtual array to access. + * Algorithm: if target address > current window, assume forward scan, + * load starting at target address. If target address < current window, + * assume backward scan, load so that target area is top of window. + * Note that when switching from forward write to forward read, will have + * start_row = 0, so the limiting case applies and we load from 0 anyway. + */ + if (start_row > ptr->cur_start_row) { + ptr->cur_start_row = start_row; + } else { + /* use long arithmetic here to avoid overflow & unsigned problems */ + long ltemp; + + ltemp = (long) end_row - (long) ptr->rows_in_mem; + if (ltemp < 0) + ltemp = 0; /* don't fall off front end of file */ + ptr->cur_start_row = (JDIMENSION) ltemp; + } + /* Read in the selected part of the array. + * During the initial write pass, we will do no actual read + * because the selected part is all undefined. + */ + do_sarray_io(cinfo, ptr, FALSE); + } + /* Ensure the accessed part of the array is defined; prezero if needed. + * To improve locality of access, we only prezero the part of the array + * that the caller is about to access, not the entire in-memory array. + */ + if (ptr->first_undef_row < end_row) { + if (ptr->first_undef_row < start_row) { + if (writable) /* writer skipped over a section of array */ + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + undef_row = start_row; /* but reader is allowed to read ahead */ + } else { + undef_row = ptr->first_undef_row; + } + if (writable) + ptr->first_undef_row = end_row; + if (ptr->pre_zero) { + size_t bytesperrow = (size_t) ptr->samplesperrow * SIZEOF(JSAMPLE); + undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */ + end_row -= ptr->cur_start_row; + while (undef_row < end_row) { + jzero_far((void FAR *) ptr->mem_buffer[undef_row], bytesperrow); + undef_row++; + } + } else { + if (! writable) /* reader looking at undefined data */ + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + } + } + /* Flag the buffer dirty if caller will write in it */ + if (writable) + ptr->dirty = TRUE; + /* Return address of proper part of the buffer */ + return ptr->mem_buffer + (start_row - ptr->cur_start_row); +} + + +METHODDEF(JBLOCKARRAY) +access_virt_barray (j_common_ptr cinfo, jvirt_barray_ptr ptr, + JDIMENSION start_row, JDIMENSION num_rows, + boolean writable) +/* Access the part of a virtual block array starting at start_row */ +/* and extending for num_rows rows. writable is true if */ +/* caller intends to modify the accessed area. */ +{ + JDIMENSION end_row = start_row + num_rows; + JDIMENSION undef_row; + + /* debugging check */ + if (end_row > ptr->rows_in_array || num_rows > ptr->maxaccess || + ptr->mem_buffer == NULL) + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + + /* Make the desired part of the virtual array accessible */ + if (start_row < ptr->cur_start_row || + end_row > ptr->cur_start_row+ptr->rows_in_mem) { + if (! ptr->b_s_open) + ERREXIT(cinfo, JERR_VIRTUAL_BUG); + /* Flush old buffer contents if necessary */ + if (ptr->dirty) { + do_barray_io(cinfo, ptr, TRUE); + ptr->dirty = FALSE; + } + /* Decide what part of virtual array to access. + * Algorithm: if target address > current window, assume forward scan, + * load starting at target address. If target address < current window, + * assume backward scan, load so that target area is top of window. + * Note that when switching from forward write to forward read, will have + * start_row = 0, so the limiting case applies and we load from 0 anyway. + */ + if (start_row > ptr->cur_start_row) { + ptr->cur_start_row = start_row; + } else { + /* use long arithmetic here to avoid overflow & unsigned problems */ + long ltemp; + + ltemp = (long) end_row - (long) ptr->rows_in_mem; + if (ltemp < 0) + ltemp = 0; /* don't fall off front end of file */ + ptr->cur_start_row = (JDIMENSION) ltemp; + } + /* Read in the selected part of the array. + * During the initial write pass, we will do no actual read + * because the selected part is all undefined. + */ + do_barray_io(cinfo, ptr, FALSE); + } + /* Ensure the accessed part of the array is defined; prezero if needed. + * To improve locality of access, we only prezero the part of the array + * that the caller is about to access, not the entire in-memory array. + */ + if (ptr->first_undef_row < end_row) { + if (ptr->first_undef_row < start_row) { + if (writable) /* writer skipped over a section of array */ + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + undef_row = start_row; /* but reader is allowed to read ahead */ + } else { + undef_row = ptr->first_undef_row; + } + if (writable) + ptr->first_undef_row = end_row; + if (ptr->pre_zero) { + size_t bytesperrow = (size_t) ptr->blocksperrow * SIZEOF(JBLOCK); + undef_row -= ptr->cur_start_row; /* make indexes relative to buffer */ + end_row -= ptr->cur_start_row; + while (undef_row < end_row) { + jzero_far((void FAR *) ptr->mem_buffer[undef_row], bytesperrow); + undef_row++; + } + } else { + if (! writable) /* reader looking at undefined data */ + ERREXIT(cinfo, JERR_BAD_VIRTUAL_ACCESS); + } + } + /* Flag the buffer dirty if caller will write in it */ + if (writable) + ptr->dirty = TRUE; + /* Return address of proper part of the buffer */ + return ptr->mem_buffer + (start_row - ptr->cur_start_row); +} + + +/* + * Release all objects belonging to a specified pool. + */ + +METHODDEF(void) +free_pool (j_common_ptr cinfo, int pool_id) +{ + my_mem_ptr mem = (my_mem_ptr) cinfo->mem; + small_pool_ptr shdr_ptr; + large_pool_ptr lhdr_ptr; + size_t space_freed; + + if (pool_id < 0 || pool_id >= JPOOL_NUMPOOLS) + ERREXIT1(cinfo, JERR_BAD_POOL_ID, pool_id); /* safety check */ + +#ifdef MEM_STATS + if (cinfo->err->trace_level > 1) + print_mem_stats(cinfo, pool_id); /* print pool's memory usage statistics */ +#endif + + /* If freeing IMAGE pool, close any virtual arrays first */ + if (pool_id == JPOOL_IMAGE) { + jvirt_sarray_ptr sptr; + jvirt_barray_ptr bptr; + + for (sptr = mem->virt_sarray_list; sptr != NULL; sptr = sptr->next) { + if (sptr->b_s_open) { /* there may be no backing store */ + sptr->b_s_open = FALSE; /* prevent recursive close if error */ + (*sptr->b_s_info.close_backing_store) (cinfo, & sptr->b_s_info); + } + } + mem->virt_sarray_list = NULL; + for (bptr = mem->virt_barray_list; bptr != NULL; bptr = bptr->next) { + if (bptr->b_s_open) { /* there may be no backing store */ + bptr->b_s_open = FALSE; /* prevent recursive close if error */ + (*bptr->b_s_info.close_backing_store) (cinfo, & bptr->b_s_info); + } + } + mem->virt_barray_list = NULL; + } + + /* Release large objects */ + lhdr_ptr = mem->large_list[pool_id]; + mem->large_list[pool_id] = NULL; + + while (lhdr_ptr != NULL) { + large_pool_ptr next_lhdr_ptr = lhdr_ptr->hdr.next; + space_freed = lhdr_ptr->hdr.bytes_used + + lhdr_ptr->hdr.bytes_left + + SIZEOF(large_pool_hdr); + jpeg_free_large(cinfo, (void FAR *) lhdr_ptr, space_freed); + mem->total_space_allocated -= space_freed; + lhdr_ptr = next_lhdr_ptr; + } + + /* Release small objects */ + shdr_ptr = mem->small_list[pool_id]; + mem->small_list[pool_id] = NULL; + + while (shdr_ptr != NULL) { + small_pool_ptr next_shdr_ptr = shdr_ptr->hdr.next; + space_freed = shdr_ptr->hdr.bytes_used + + shdr_ptr->hdr.bytes_left + + SIZEOF(small_pool_hdr); + jpeg_free_small(cinfo, (void *) shdr_ptr, space_freed); + mem->total_space_allocated -= space_freed; + shdr_ptr = next_shdr_ptr; + } +} + + +/* + * Close up shop entirely. + * Note that this cannot be called unless cinfo->mem is non-NULL. + */ + +METHODDEF(void) +self_destruct (j_common_ptr cinfo) +{ + int pool; + + /* Close all backing store, release all memory. + * Releasing pools in reverse order might help avoid fragmentation + * with some (brain-damaged) malloc libraries. + */ + for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) { + free_pool(cinfo, pool); + } + + /* Release the memory manager control block too. */ + jpeg_free_small(cinfo, (void *) cinfo->mem, SIZEOF(my_memory_mgr)); + cinfo->mem = NULL; /* ensures I will be called only once */ + + jpeg_mem_term(cinfo); /* system-dependent cleanup */ +} + + +/* + * Memory manager initialization. + * When this is called, only the error manager pointer is valid in cinfo! + */ + +GLOBAL(void) +jinit_memory_mgr (j_common_ptr cinfo) +{ + my_mem_ptr mem; + long max_to_use; + int pool; + size_t test_mac; + + cinfo->mem = NULL; /* for safety if init fails */ + + /* Check for configuration errors. + * SIZEOF(ALIGN_TYPE) should be a power of 2; otherwise, it probably + * doesn't reflect any real hardware alignment requirement. + * The test is a little tricky: for X>0, X and X-1 have no one-bits + * in common if and only if X is a power of 2, ie has only one one-bit. + * Some compilers may give an "unreachable code" warning here; ignore it. + */ + if ((SIZEOF(ALIGN_TYPE) & (SIZEOF(ALIGN_TYPE)-1)) != 0) + ERREXIT(cinfo, JERR_BAD_ALIGN_TYPE); + /* MAX_ALLOC_CHUNK must be representable as type size_t, and must be + * a multiple of SIZEOF(ALIGN_TYPE). + * Again, an "unreachable code" warning may be ignored here. + * But a "constant too large" warning means you need to fix MAX_ALLOC_CHUNK. + */ + test_mac = (size_t) MAX_ALLOC_CHUNK; + if ((long) test_mac != MAX_ALLOC_CHUNK || + (MAX_ALLOC_CHUNK % SIZEOF(ALIGN_TYPE)) != 0) + ERREXIT(cinfo, JERR_BAD_ALLOC_CHUNK); + + max_to_use = jpeg_mem_init(cinfo); /* system-dependent initialization */ + + /* Attempt to allocate memory manager's control block */ + mem = (my_mem_ptr) jpeg_get_small(cinfo, SIZEOF(my_memory_mgr)); + + if (mem == NULL) { + jpeg_mem_term(cinfo); /* system-dependent cleanup */ + ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 0); + } + + /* OK, fill in the method pointers */ + mem->pub.alloc_small = alloc_small; + mem->pub.alloc_large = alloc_large; + mem->pub.alloc_sarray = alloc_sarray; + mem->pub.alloc_barray = alloc_barray; + mem->pub.request_virt_sarray = request_virt_sarray; + mem->pub.request_virt_barray = request_virt_barray; + mem->pub.realize_virt_arrays = realize_virt_arrays; + mem->pub.access_virt_sarray = access_virt_sarray; + mem->pub.access_virt_barray = access_virt_barray; + mem->pub.free_pool = free_pool; + mem->pub.self_destruct = self_destruct; + + /* Initialize working state */ + mem->pub.max_memory_to_use = max_to_use; + + for (pool = JPOOL_NUMPOOLS-1; pool >= JPOOL_PERMANENT; pool--) { + mem->small_list[pool] = NULL; + mem->large_list[pool] = NULL; + } + mem->virt_sarray_list = NULL; + mem->virt_barray_list = NULL; + + mem->total_space_allocated = SIZEOF(my_memory_mgr); + + /* Declare ourselves open for business */ + cinfo->mem = & mem->pub; + + /* Check for an environment variable JPEGMEM; if found, override the + * default max_memory setting from jpeg_mem_init. Note that the + * surrounding application may again override this value. + * If your system doesn't support getenv(), define NO_GETENV to disable + * this feature. + */ +#ifndef NO_GETENV + { char * memenv; + + if ((memenv = getenv("JPEGMEM")) != NULL) { + char ch = 'x'; + + if (sscanf(memenv, "%ld%c", &max_to_use, &ch) > 0) { + if (ch == 'm' || ch == 'M') + max_to_use *= 1000L; + mem->pub.max_memory_to_use = max_to_use * 1000L; + } + } + } +#endif + +} diff --git a/windows_libs/jpeg-6a/jmemname.c b/windows_libs/jpeg-6a/jmemname.c new file mode 100644 index 00000000..d1b57e9e --- /dev/null +++ b/windows_libs/jpeg-6a/jmemname.c @@ -0,0 +1,271 @@ +/* + * jmemname.c + * + * Copyright (C) 1992-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides a generic implementation of the system-dependent + * portion of the JPEG memory manager. This implementation assumes that + * you must explicitly construct a name for each temp file. + * Also, the problem of determining the amount of memory available + * is shoved onto the user. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ +extern void * malloc JPP((size_t size)); +extern void free JPP((void *ptr)); +#endif + +#ifndef SEEK_SET /* pre-ANSI systems may not define this; */ +#define SEEK_SET 0 /* if not, assume 0 is correct */ +#endif + +#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ +#define READ_BINARY "r" +#define RW_BINARY "w+" +#else +#define READ_BINARY "rb" +#define RW_BINARY "w+b" +#endif + + +/* + * Selection of a file name for a temporary file. + * This is system-dependent! + * + * The code as given is suitable for most Unix systems, and it is easily + * modified for most non-Unix systems. Some notes: + * 1. The temp file is created in the directory named by TEMP_DIRECTORY. + * The default value is /usr/tmp, which is the conventional place for + * creating large temp files on Unix. On other systems you'll probably + * want to change the file location. You can do this by editing the + * #define, or (preferred) by defining TEMP_DIRECTORY in jconfig.h. + * + * 2. If you need to change the file name as well as its location, + * you can override the TEMP_FILE_NAME macro. (Note that this is + * actually a printf format string; it must contain %s and %d.) + * Few people should need to do this. + * + * 3. mktemp() is used to ensure that multiple processes running + * simultaneously won't select the same file names. If your system + * doesn't have mktemp(), define NO_MKTEMP to do it the hard way. + * (If you don't have , also define NO_ERRNO_H.) + * + * 4. You probably want to define NEED_SIGNAL_CATCHER so that cjpeg.c/djpeg.c + * will cause the temp files to be removed if you stop the program early. + */ + +#ifndef TEMP_DIRECTORY /* can override from jconfig.h or Makefile */ +#define TEMP_DIRECTORY "/usr/tmp/" /* recommended setting for Unix */ +#endif + +static int next_file_num; /* to distinguish among several temp files */ + +#ifdef NO_MKTEMP + +#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ +#define TEMP_FILE_NAME "%sJPG%03d.TMP" +#endif + +#ifndef NO_ERRNO_H +#include /* to define ENOENT */ +#endif + +/* ANSI C specifies that errno is a macro, but on older systems it's more + * likely to be a plain int variable. And not all versions of errno.h + * bother to declare it, so we have to in order to be most portable. Thus: + */ +#ifndef errno +extern int errno; +#endif + + +LOCAL(void) +select_file_name (char * fname) +{ + FILE * tfile; + + /* Keep generating file names till we find one that's not in use */ + for (;;) { + next_file_num++; /* advance counter */ + sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num); + if ((tfile = fopen(fname, READ_BINARY)) == NULL) { + /* fopen could have failed for a reason other than the file not + * being there; for example, file there but unreadable. + * If isn't available, then we cannot test the cause. + */ +#ifdef ENOENT + if (errno != ENOENT) + continue; +#endif + break; + } + fclose(tfile); /* oops, it's there; close tfile & try again */ + } +} + +#else /* ! NO_MKTEMP */ + +/* Note that mktemp() requires the initial filename to end in six X's */ +#ifndef TEMP_FILE_NAME /* can override from jconfig.h or Makefile */ +#define TEMP_FILE_NAME "%sJPG%dXXXXXX" +#endif + +LOCAL(void) +select_file_name (char * fname) +{ + next_file_num++; /* advance counter */ + sprintf(fname, TEMP_FILE_NAME, TEMP_DIRECTORY, next_file_num); + mktemp(fname); /* make sure file name is unique */ + /* mktemp replaces the trailing XXXXXX with a unique string of characters */ +} + +#endif /* NO_MKTEMP */ + + +/* + * Memory allocation and freeing are controlled by the regular library + * routines malloc() and free(). + */ + +GLOBAL(void *) +jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * "Large" objects are treated the same as "small" ones. + * NB: although we include FAR keywords in the routine declarations, + * this file won't actually work in 80x86 small/medium model; at least, + * you probably won't be able to process useful-size images in only 64KB. + */ + +GLOBAL(void FAR *) +jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void FAR *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * This routine computes the total memory space available for allocation. + * It's impossible to do this in a portable way; our current solution is + * to make the user tell us (with a default value set at compile time). + * If you can actually get the available space, it's a good idea to subtract + * a slop factor of 5% or so. + */ + +#ifndef DEFAULT_MAX_MEM /* so can override from makefile */ +#define DEFAULT_MAX_MEM 1000000L /* default: one megabyte */ +#endif + +GLOBAL(long) +jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, + long max_bytes_needed, long already_allocated) +{ + return cinfo->mem->max_memory_to_use - already_allocated; +} + + +/* + * Backing store (temporary file) management. + * Backing store objects are only used when the value returned by + * jpeg_mem_available is less than the total space needed. You can dispense + * with these routines if you have plenty of virtual memory; see jmemnobs.c. + */ + + +METHODDEF(void) +read_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (fseek(info->temp_file, file_offset, SEEK_SET)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + if (JFREAD(info->temp_file, buffer_address, byte_count) + != (size_t) byte_count) + ERREXIT(cinfo, JERR_TFILE_READ); +} + + +METHODDEF(void) +write_backing_store (j_common_ptr cinfo, backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count) +{ + if (fseek(info->temp_file, file_offset, SEEK_SET)) + ERREXIT(cinfo, JERR_TFILE_SEEK); + if (JFWRITE(info->temp_file, buffer_address, byte_count) + != (size_t) byte_count) + ERREXIT(cinfo, JERR_TFILE_WRITE); +} + + +METHODDEF(void) +close_backing_store (j_common_ptr cinfo, backing_store_ptr info) +{ + fclose(info->temp_file); /* close the file */ + unlink(info->temp_name); /* delete the file */ +/* If your system doesn't have unlink(), use remove() instead. + * remove() is the ANSI-standard name for this function, but if + * your system was ANSI you'd be using jmemansi.c, right? + */ + TRACEMSS(cinfo, 1, JTRC_TFILE_CLOSE, info->temp_name); +} + + +/* + * Initial opening of a backing-store object. + */ + +GLOBAL(void) +jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + select_file_name(info->temp_name); + if ((info->temp_file = fopen(info->temp_name, RW_BINARY)) == NULL) + ERREXITS(cinfo, JERR_TFILE_CREATE, info->temp_name); + info->read_backing_store = read_backing_store; + info->write_backing_store = write_backing_store; + info->close_backing_store = close_backing_store; + TRACEMSS(cinfo, 1, JTRC_TFILE_OPEN, info->temp_name); +} + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. + */ + +GLOBAL(long) +jpeg_mem_init (j_common_ptr cinfo) +{ + next_file_num = 0; /* initialize temp file name generator */ + return DEFAULT_MAX_MEM; /* default for max_memory_to_use */ +} + +GLOBAL(void) +jpeg_mem_term (j_common_ptr cinfo) +{ + /* no work */ +} diff --git a/windows_libs/jpeg-6a/jmemnobs.c b/windows_libs/jpeg-6a/jmemnobs.c new file mode 100644 index 00000000..eb8c3377 --- /dev/null +++ b/windows_libs/jpeg-6a/jmemnobs.c @@ -0,0 +1,109 @@ +/* + * jmemnobs.c + * + * Copyright (C) 1992-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides a really simple implementation of the system- + * dependent portion of the JPEG memory manager. This implementation + * assumes that no backing-store files are needed: all required space + * can be obtained from malloc(). + * This is very portable in the sense that it'll compile on almost anything, + * but you'd better have lots of main memory (or virtual memory) if you want + * to process big images. + * Note that the max_memory_to_use option is ignored by this implementation. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" +#include "jmemsys.h" /* import the system-dependent declarations */ + +#ifndef HAVE_STDLIB_H /* should declare malloc(),free() */ +extern void * malloc JPP((size_t size)); +extern void free JPP((void *ptr)); +#endif + + +/* + * Memory allocation and freeing are controlled by the regular library + * routines malloc() and free(). + */ + +GLOBAL(void *) +jpeg_get_small (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_small (j_common_ptr cinfo, void * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * "Large" objects are treated the same as "small" ones. + * NB: although we include FAR keywords in the routine declarations, + * this file won't actually work in 80x86 small/medium model; at least, + * you probably won't be able to process useful-size images in only 64KB. + */ + +GLOBAL(void FAR *) +jpeg_get_large (j_common_ptr cinfo, size_t sizeofobject) +{ + return (void FAR *) malloc(sizeofobject); +} + +GLOBAL(void) +jpeg_free_large (j_common_ptr cinfo, void FAR * object, size_t sizeofobject) +{ + free(object); +} + + +/* + * This routine computes the total memory space available for allocation. + * Here we always say, "we got all you want bud!" + */ + +GLOBAL(long) +jpeg_mem_available (j_common_ptr cinfo, long min_bytes_needed, + long max_bytes_needed, long already_allocated) +{ + return max_bytes_needed; +} + + +/* + * Backing store (temporary file) management. + * Since jpeg_mem_available always promised the moon, + * this should never be called and we can just error out. + */ + +GLOBAL(void) +jpeg_open_backing_store (j_common_ptr cinfo, backing_store_ptr info, + long total_bytes_needed) +{ + ERREXIT(cinfo, JERR_NO_BACKING_STORE); +} + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. Here, there isn't any. + */ + +GLOBAL(long) +jpeg_mem_init (j_common_ptr cinfo) +{ + return 0; /* just set max_memory_to_use to 0 */ +} + +GLOBAL(void) +jpeg_mem_term (j_common_ptr cinfo) +{ + /* no work */ +} diff --git a/windows_libs/jpeg-6a/jmemsys.h b/windows_libs/jpeg-6a/jmemsys.h new file mode 100644 index 00000000..6d4c7f2a --- /dev/null +++ b/windows_libs/jpeg-6a/jmemsys.h @@ -0,0 +1,183 @@ +/* + * jmemsys.h + * + * Copyright (C) 1992-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This include file defines the interface between the system-independent + * and system-dependent portions of the JPEG memory manager. No other + * modules need include it. (The system-independent portion is jmemmgr.c; + * there are several different versions of the system-dependent portion.) + * + * This file works as-is for the system-dependent memory managers supplied + * in the IJG distribution. You may need to modify it if you write a + * custom memory manager. If system-dependent changes are needed in + * this file, the best method is to #ifdef them based on a configuration + * symbol supplied in jconfig.h, as we have done with USE_MSDOS_MEMMGR. + */ + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_get_small jGetSmall +#define jpeg_free_small jFreeSmall +#define jpeg_get_large jGetLarge +#define jpeg_free_large jFreeLarge +#define jpeg_mem_available jMemAvail +#define jpeg_open_backing_store jOpenBackStore +#define jpeg_mem_init jMemInit +#define jpeg_mem_term jMemTerm +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* + * These two functions are used to allocate and release small chunks of + * memory. (Typically the total amount requested through jpeg_get_small is + * no more than 20K or so; this will be requested in chunks of a few K each.) + * Behavior should be the same as for the standard library functions malloc + * and free; in particular, jpeg_get_small must return NULL on failure. + * On most systems, these ARE malloc and free. jpeg_free_small is passed the + * size of the object being freed, just in case it's needed. + * On an 80x86 machine using small-data memory model, these manage near heap. + */ + +EXTERN(void *) jpeg_get_small JPP((j_common_ptr cinfo, size_t sizeofobject)); +EXTERN(void) jpeg_free_small JPP((j_common_ptr cinfo, void * object, + size_t sizeofobject)); + +/* + * These two functions are used to allocate and release large chunks of + * memory (up to the total free space designated by jpeg_mem_available). + * The interface is the same as above, except that on an 80x86 machine, + * far pointers are used. On most other machines these are identical to + * the jpeg_get/free_small routines; but we keep them separate anyway, + * in case a different allocation strategy is desirable for large chunks. + */ + +EXTERN(void FAR *) jpeg_get_large JPP((j_common_ptr cinfo, + size_t sizeofobject)); +EXTERN(void) jpeg_free_large JPP((j_common_ptr cinfo, void FAR * object, + size_t sizeofobject)); + +/* + * The macro MAX_ALLOC_CHUNK designates the maximum number of bytes that may + * be requested in a single call to jpeg_get_large (and jpeg_get_small for that + * matter, but that case should never come into play). This macro is needed + * to model the 64Kb-segment-size limit of far addressing on 80x86 machines. + * On those machines, we expect that jconfig.h will provide a proper value. + * On machines with 32-bit flat address spaces, any large constant may be used. + * + * NB: jmemmgr.c expects that MAX_ALLOC_CHUNK will be representable as type + * size_t and will be a multiple of sizeof(align_type). + */ + +#ifndef MAX_ALLOC_CHUNK /* may be overridden in jconfig.h */ +#define MAX_ALLOC_CHUNK 1000000000L +#endif + +/* + * This routine computes the total space still available for allocation by + * jpeg_get_large. If more space than this is needed, backing store will be + * used. NOTE: any memory already allocated must not be counted. + * + * There is a minimum space requirement, corresponding to the minimum + * feasible buffer sizes; jmemmgr.c will request that much space even if + * jpeg_mem_available returns zero. The maximum space needed, enough to hold + * all working storage in memory, is also passed in case it is useful. + * Finally, the total space already allocated is passed. If no better + * method is available, cinfo->mem->max_memory_to_use - already_allocated + * is often a suitable calculation. + * + * It is OK for jpeg_mem_available to underestimate the space available + * (that'll just lead to more backing-store access than is really necessary). + * However, an overestimate will lead to failure. Hence it's wise to subtract + * a slop factor from the true available space. 5% should be enough. + * + * On machines with lots of virtual memory, any large constant may be returned. + * Conversely, zero may be returned to always use the minimum amount of memory. + */ + +EXTERN(long) jpeg_mem_available JPP((j_common_ptr cinfo, + long min_bytes_needed, + long max_bytes_needed, + long already_allocated)); + + +/* + * This structure holds whatever state is needed to access a single + * backing-store object. The read/write/close method pointers are called + * by jmemmgr.c to manipulate the backing-store object; all other fields + * are private to the system-dependent backing store routines. + */ + +#define TEMP_NAME_LENGTH 64 /* max length of a temporary file's name */ + +#ifdef USE_MSDOS_MEMMGR /* DOS-specific junk */ + +typedef unsigned short XMSH; /* type of extended-memory handles */ +typedef unsigned short EMSH; /* type of expanded-memory handles */ + +typedef union { + short file_handle; /* DOS file handle if it's a temp file */ + XMSH xms_handle; /* handle if it's a chunk of XMS */ + EMSH ems_handle; /* handle if it's a chunk of EMS */ +} handle_union; + +#endif /* USE_MSDOS_MEMMGR */ + +typedef struct backing_store_struct * backing_store_ptr; + +typedef struct backing_store_struct { + /* Methods for reading/writing/closing this backing-store object */ + JMETHOD(void, read_backing_store, (j_common_ptr cinfo, + backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count)); + JMETHOD(void, write_backing_store, (j_common_ptr cinfo, + backing_store_ptr info, + void FAR * buffer_address, + long file_offset, long byte_count)); + JMETHOD(void, close_backing_store, (j_common_ptr cinfo, + backing_store_ptr info)); + + /* Private fields for system-dependent backing-store management */ +#ifdef USE_MSDOS_MEMMGR + /* For the MS-DOS manager (jmemdos.c), we need: */ + handle_union handle; /* reference to backing-store storage object */ + char temp_name[TEMP_NAME_LENGTH]; /* name if it's a file */ +#else + /* For a typical implementation with temp files, we need: */ + FILE * temp_file; /* stdio reference to temp file */ + char temp_name[TEMP_NAME_LENGTH]; /* name of temp file */ +#endif +} backing_store_info; + +/* + * Initial opening of a backing-store object. This must fill in the + * read/write/close pointers in the object. The read/write routines + * may take an error exit if the specified maximum file size is exceeded. + * (If jpeg_mem_available always returns a large value, this routine can + * just take an error exit.) + */ + +EXTERN(void) jpeg_open_backing_store JPP((j_common_ptr cinfo, + backing_store_ptr info, + long total_bytes_needed)); + + +/* + * These routines take care of any system-dependent initialization and + * cleanup required. jpeg_mem_init will be called before anything is + * allocated (and, therefore, nothing in cinfo is of use except the error + * manager pointer). It should return a suitable default value for + * max_memory_to_use; this may subsequently be overridden by the surrounding + * application. (Note that max_memory_to_use is only important if + * jpeg_mem_available chooses to consult it ... no one else will.) + * jpeg_mem_term may assume that all requested memory has been freed and that + * all opened backing-store objects have been closed. + */ + +EXTERN(long) jpeg_mem_init JPP((j_common_ptr cinfo)); +EXTERN(void) jpeg_mem_term JPP((j_common_ptr cinfo)); diff --git a/windows_libs/jpeg-6a/jmorecfg.h b/windows_libs/jpeg-6a/jmorecfg.h new file mode 100644 index 00000000..e43651b1 --- /dev/null +++ b/windows_libs/jpeg-6a/jmorecfg.h @@ -0,0 +1,362 @@ +/* + * jmorecfg.h + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains additional configuration options that customize the + * JPEG software for special applications or support machine-dependent + * optimizations. Most users will not need to touch this file. + */ + + +/* + * Define BITS_IN_JSAMPLE as either + * 8 for 8-bit sample values (the usual setting) + * 12 for 12-bit sample values + * Only 8 and 12 are legal data precisions for lossy JPEG according to the + * JPEG standard, and the IJG code does not support anything else! + * We do not support run-time selection of data precision, sorry. + */ + +#define BITS_IN_JSAMPLE 8 /* use 8 or 12 */ + + +/* + * Maximum number of components (color channels) allowed in JPEG image. + * To meet the letter of the JPEG spec, set this to 255. However, darn + * few applications need more than 4 channels (maybe 5 for CMYK + alpha + * mask). We recommend 10 as a reasonable compromise; use 4 if you are + * really short on memory. (Each allowed component costs a hundred or so + * bytes of storage, whether actually used in an image or not.) + */ + +#define MAX_COMPONENTS 10 /* maximum number of image components */ + + +/* + * Basic data types. + * You may need to change these if you have a machine with unusual data + * type sizes; for example, "char" not 8 bits, "short" not 16 bits, + * or "long" not 32 bits. We don't care whether "int" is 16 or 32 bits, + * but it had better be at least 16. + */ + +/* Representation of a single sample (pixel element value). + * We frequently allocate large arrays of these, so it's important to keep + * them small. But if you have memory to burn and access to char or short + * arrays is very slow on your hardware, you might want to change these. + */ + +#if BITS_IN_JSAMPLE == 8 +/* JSAMPLE should be the smallest type that will hold the values 0..255. + * You can use a signed char by having GETJSAMPLE mask it with 0xFF. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JSAMPLE; +#ifdef CHAR_IS_UNSIGNED +#define GETJSAMPLE(value) ((int) (value)) +#else +#define GETJSAMPLE(value) ((int) (value) & 0xFF) +#endif /* CHAR_IS_UNSIGNED */ + +#endif /* HAVE_UNSIGNED_CHAR */ + +#define MAXJSAMPLE 255 +#define CENTERJSAMPLE 128 + +#endif /* BITS_IN_JSAMPLE == 8 */ + + +#if BITS_IN_JSAMPLE == 12 +/* JSAMPLE should be the smallest type that will hold the values 0..4095. + * On nearly all machines "short" will do nicely. + */ + +typedef short JSAMPLE; +#define GETJSAMPLE(value) ((int) (value)) + +#define MAXJSAMPLE 4095 +#define CENTERJSAMPLE 2048 + +#endif /* BITS_IN_JSAMPLE == 12 */ + + +/* Representation of a DCT frequency coefficient. + * This should be a signed value of at least 16 bits; "short" is usually OK. + * Again, we allocate large arrays of these, but you can change to int + * if you have memory to burn and "short" is really slow. + */ + +typedef short JCOEF; + + +/* Compressed datastreams are represented as arrays of JOCTET. + * These must be EXACTLY 8 bits wide, at least once they are written to + * external storage. Note that when using the stdio data source/destination + * managers, this is also the data type passed to fread/fwrite. + */ + +#ifdef HAVE_UNSIGNED_CHAR + +typedef unsigned char JOCTET; +#define GETJOCTET(value) (value) + +#else /* not HAVE_UNSIGNED_CHAR */ + +typedef char JOCTET; +#ifdef CHAR_IS_UNSIGNED +#define GETJOCTET(value) (value) +#else +#define GETJOCTET(value) ((value) & 0xFF) +#endif /* CHAR_IS_UNSIGNED */ + +#endif /* HAVE_UNSIGNED_CHAR */ + + +/* These typedefs are used for various table entries and so forth. + * They must be at least as wide as specified; but making them too big + * won't cost a huge amount of memory, so we don't provide special + * extraction code like we did for JSAMPLE. (In other words, these + * typedefs live at a different point on the speed/space tradeoff curve.) + */ + +/* UINT8 must hold at least the values 0..255. */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char UINT8; +#else /* not HAVE_UNSIGNED_CHAR */ +#ifdef CHAR_IS_UNSIGNED +typedef char UINT8; +#else /* not CHAR_IS_UNSIGNED */ +typedef short UINT8; +#endif /* CHAR_IS_UNSIGNED */ +#endif /* HAVE_UNSIGNED_CHAR */ + +/* UINT16 must hold at least the values 0..65535. */ + +#ifdef HAVE_UNSIGNED_SHORT +typedef unsigned short UINT16; +#else /* not HAVE_UNSIGNED_SHORT */ +typedef unsigned int UINT16; +#endif /* HAVE_UNSIGNED_SHORT */ + +/* INT16 must hold at least the values -32768..32767. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT16 */ +typedef short INT16; +#endif + +/* INT32 must hold at least signed 32-bit values. */ + +#ifndef XMD_H /* X11/xmd.h correctly defines INT32 */ +typedef long INT32; +#endif + +/* Datatype used for image dimensions. The JPEG standard only supports + * images up to 64K*64K due to 16-bit fields in SOF markers. Therefore + * "unsigned int" is sufficient on all machines. However, if you need to + * handle larger images and you don't mind deviating from the spec, you + * can change this datatype. + */ + +typedef unsigned int JDIMENSION; + +#define JPEG_MAX_DIMENSION 65500L /* a tad under 64K to prevent overflows */ + + +/* These macros are used in all function definitions and extern declarations. + * You could modify them if you need to change function linkage conventions; + * in particular, you'll need to do that to make the library a Windows DLL. + * Another application is to make all functions global for use with debuggers + * or code profilers that require it. + */ + +/* a function called through method pointers: */ +#define METHODDEF(type) static type +/* a function used only in its module: */ +#define LOCAL(type) static type +/* a function referenced thru EXTERNs: */ +#define GLOBAL(type) type +/* a reference to a GLOBAL function: */ +#define EXTERN(type) extern type + + +/* This macro is used to declare a "method", that is, a function pointer. + * We want to supply prototype parameters if the compiler can cope. + * Note that the arglist parameter must be parenthesized! + * Again, you can customize this if you need special linkage keywords. + */ + +#ifdef HAVE_PROTOTYPES +#define JMETHOD(type,methodname,arglist) type (*methodname) arglist +#else +#define JMETHOD(type,methodname,arglist) type (*methodname) () +#endif + + +/* Here is the pseudo-keyword for declaring pointers that must be "far" + * on 80x86 machines. Most of the specialized coding for 80x86 is handled + * by just saying "FAR *" where such a pointer is needed. In a few places + * explicit coding is needed; see uses of the NEED_FAR_POINTERS symbol. + */ + +#ifdef NEED_FAR_POINTERS +#define FAR far +#else +#define FAR +#endif + + +/* + * On a few systems, type boolean and/or its values FALSE, TRUE may appear + * in standard header files. Or you may have conflicts with application- + * specific header files that you want to include together with these files. + * Defining HAVE_BOOLEAN before including jpeglib.h should make it work. + */ + +#ifndef HAVE_BOOLEAN +typedef int boolean; +#endif +#ifndef FALSE /* in case these macros already exist */ +#define FALSE 0 /* values of boolean */ +#endif +#ifndef TRUE +#define TRUE 1 +#endif + + +/* + * The remaining options affect code selection within the JPEG library, + * but they don't need to be visible to most applications using the library. + * To minimize application namespace pollution, the symbols won't be + * defined unless JPEG_INTERNALS or JPEG_INTERNAL_OPTIONS has been defined. + */ + +#ifdef JPEG_INTERNALS +#define JPEG_INTERNAL_OPTIONS +#endif + +#ifdef JPEG_INTERNAL_OPTIONS + + +/* + * These defines indicate whether to include various optional functions. + * Undefining some of these symbols will produce a smaller but less capable + * library. Note that you can leave certain source files out of the + * compilation/linking process if you've #undef'd the corresponding symbols. + * (You may HAVE to do that if your compiler doesn't like null source files.) + */ + +/* Arithmetic coding is unsupported for legal reasons. Complaints to IBM. */ + +/* Capability options common to encoder and decoder: */ + +#define DCT_ISLOW_SUPPORTED /* slow but accurate integer algorithm */ +#define DCT_IFAST_SUPPORTED /* faster, less accurate integer method */ +#define DCT_FLOAT_SUPPORTED /* floating-point: accurate, fast on fast HW */ + +/* Encoder capability options: */ + +#undef C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ +#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define ENTROPY_OPT_SUPPORTED /* Optimization of entropy coding parms? */ +/* Note: if you selected 12-bit data precision, it is dangerous to turn off + * ENTROPY_OPT_SUPPORTED. The standard Huffman tables are only good for 8-bit + * precision, so jchuff.c normally uses entropy optimization to compute + * usable tables for higher precision. If you don't want to do optimization, + * you'll have to supply different default Huffman tables. + * The exact same statements apply for progressive JPEG: the default tables + * don't work for progressive mode. (This may get fixed, however.) + */ +#define INPUT_SMOOTHING_SUPPORTED /* Input image smoothing option? */ + +/* Decoder capability options: */ + +#undef D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */ +#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */ +#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/ +#define BLOCK_SMOOTHING_SUPPORTED /* Block smoothing? (Progressive only) */ +#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */ +#undef UPSAMPLE_SCALING_SUPPORTED /* Output rescaling at upsample stage? */ +#define UPSAMPLE_MERGING_SUPPORTED /* Fast path for sloppy upsampling? */ +#define QUANT_1PASS_SUPPORTED /* 1-pass color quantization? */ +#define QUANT_2PASS_SUPPORTED /* 2-pass color quantization? */ + +/* more capability options later, no doubt */ + + +/* + * Ordering of RGB data in scanlines passed to or from the application. + * If your application wants to deal with data in the order B,G,R, just + * change these macros. You can also deal with formats such as R,G,B,X + * (one extra byte per pixel) by changing RGB_PIXELSIZE. Note that changing + * the offsets will also change the order in which colormap data is organized. + * RESTRICTIONS: + * 1. The sample applications cjpeg,djpeg do NOT support modified RGB formats. + * 2. These macros only affect RGB<=>YCbCr color conversion, so they are not + * useful if you are using JPEG color spaces other than YCbCr or grayscale. + * 3. The color quantizer modules will not behave desirably if RGB_PIXELSIZE + * is not 3 (they don't understand about dummy color components!). So you + * can't use color quantization if you change that value. + */ + +#define RGB_RED 0 /* Offset of Red in an RGB scanline element */ +#define RGB_GREEN 1 /* Offset of Green */ +#define RGB_BLUE 2 /* Offset of Blue */ +#define RGB_PIXELSIZE 3 /* JSAMPLEs per RGB scanline element */ + + +/* Definitions for speed-related optimizations. */ + + +/* If your compiler supports inline functions, define INLINE + * as the inline keyword; otherwise define it as empty. + */ + +#ifndef INLINE +#ifdef __GNUC__ /* for instance, GNU C knows about inline */ +#define INLINE __inline__ +#endif +#ifndef INLINE +#define INLINE /* default is to define it as empty */ +#endif +#endif + + +/* On some machines (notably 68000 series) "int" is 32 bits, but multiplying + * two 16-bit shorts is faster than multiplying two ints. Define MULTIPLIER + * as short on such a machine. MULTIPLIER must be at least 16 bits wide. + */ + +#ifndef MULTIPLIER +#define MULTIPLIER int /* type for fastest integer multiply */ +#endif + + +/* FAST_FLOAT should be either float or double, whichever is done faster + * by your compiler. (Note that this type is only used in the floating point + * DCT routines, so it only matters if you've defined DCT_FLOAT_SUPPORTED.) + * Typically, float is faster in ANSI C compilers, while double is faster in + * pre-ANSI compilers (because they insist on converting to double anyway). + * The code below therefore chooses float if we have ANSI-style prototypes. + */ + +#ifndef FAST_FLOAT +#ifdef HAVE_PROTOTYPES +#define FAST_FLOAT float +#else +#define FAST_FLOAT double +#endif +#endif + +#endif /* JPEG_INTERNAL_OPTIONS */ diff --git a/windows_libs/jpeg-6a/jpegint.h b/windows_libs/jpeg-6a/jpegint.h new file mode 100644 index 00000000..7ba30c3f --- /dev/null +++ b/windows_libs/jpeg-6a/jpegint.h @@ -0,0 +1,388 @@ +/* + * jpegint.h + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file provides common declarations for the various JPEG modules. + * These declarations are considered internal to the JPEG library; most + * applications using the library shouldn't need to include this file. + */ + + +/* Declarations for both compression & decompression */ + +typedef enum { /* Operating modes for buffer controllers */ + JBUF_PASS_THRU, /* Plain stripwise operation */ + /* Remaining modes require a full-image buffer to have been created */ + JBUF_SAVE_SOURCE, /* Run source subobject only, save output */ + JBUF_CRANK_DEST, /* Run dest subobject only, using saved data */ + JBUF_SAVE_AND_PASS /* Run both subobjects, save output */ +} J_BUF_MODE; + +/* Values of global_state field (jdapi.c has some dependencies on ordering!) */ +#define CSTATE_START 100 /* after create_compress */ +#define CSTATE_SCANNING 101 /* start_compress done, write_scanlines OK */ +#define CSTATE_RAW_OK 102 /* start_compress done, write_raw_data OK */ +#define CSTATE_WRCOEFS 103 /* jpeg_write_coefficients done */ +#define DSTATE_START 200 /* after create_decompress */ +#define DSTATE_INHEADER 201 /* reading header markers, no SOS yet */ +#define DSTATE_READY 202 /* found SOS, ready for start_decompress */ +#define DSTATE_PRELOAD 203 /* reading multiscan file in start_decompress*/ +#define DSTATE_PRESCAN 204 /* performing dummy pass for 2-pass quant */ +#define DSTATE_SCANNING 205 /* start_decompress done, read_scanlines OK */ +#define DSTATE_RAW_OK 206 /* start_decompress done, read_raw_data OK */ +#define DSTATE_BUFIMAGE 207 /* expecting jpeg_start_output */ +#define DSTATE_BUFPOST 208 /* looking for SOS/EOI in jpeg_finish_output */ +#define DSTATE_RDCOEFS 209 /* reading file in jpeg_read_coefficients */ +#define DSTATE_STOPPING 210 /* looking for EOI in jpeg_finish_decompress */ + + +/* Declarations for compression modules */ + +/* Master control module */ +struct jpeg_comp_master { + JMETHOD(void, prepare_for_pass, (j_compress_ptr cinfo)); + JMETHOD(void, pass_startup, (j_compress_ptr cinfo)); + JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); + + /* State variables made visible to other modules */ + boolean call_pass_startup; /* True if pass_startup must be called */ + boolean is_last_pass; /* True during last pass */ +}; + +/* Main buffer control (downsampled-data buffer) */ +struct jpeg_c_main_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, process_data, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail)); +}; + +/* Compression preprocessing (downsampling input buffer control) */ +struct jpeg_c_prep_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, pre_process_data, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, + JDIMENSION *in_row_ctr, + JDIMENSION in_rows_avail, + JSAMPIMAGE output_buf, + JDIMENSION *out_row_group_ctr, + JDIMENSION out_row_groups_avail)); +}; + +/* Coefficient buffer control */ +struct jpeg_c_coef_controller { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(boolean, compress_data, (j_compress_ptr cinfo, + JSAMPIMAGE input_buf)); +}; + +/* Colorspace conversion */ +struct jpeg_color_converter { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + JMETHOD(void, color_convert, (j_compress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPIMAGE output_buf, + JDIMENSION output_row, int num_rows)); +}; + +/* Downsampling */ +struct jpeg_downsampler { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + JMETHOD(void, downsample, (j_compress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION in_row_index, + JSAMPIMAGE output_buf, + JDIMENSION out_row_group_index)); + + boolean need_context_rows; /* TRUE if need rows above & below */ +}; + +/* Forward DCT (also controls coefficient quantization) */ +struct jpeg_forward_dct { + JMETHOD(void, start_pass, (j_compress_ptr cinfo)); + /* perhaps this should be an array??? */ + JMETHOD(void, forward_DCT, (j_compress_ptr cinfo, + jpeg_component_info * compptr, + JSAMPARRAY sample_data, JBLOCKROW coef_blocks, + JDIMENSION start_row, JDIMENSION start_col, + JDIMENSION num_blocks)); +}; + +/* Entropy encoding */ +struct jpeg_entropy_encoder { + JMETHOD(void, start_pass, (j_compress_ptr cinfo, boolean gather_statistics)); + JMETHOD(boolean, encode_mcu, (j_compress_ptr cinfo, JBLOCKROW *MCU_data)); + JMETHOD(void, finish_pass, (j_compress_ptr cinfo)); +}; + +/* Marker writing */ +struct jpeg_marker_writer { + /* write_any_marker is exported for use by applications */ + /* Probably only COM and APPn markers should be written */ + JMETHOD(void, write_any_marker, (j_compress_ptr cinfo, int marker, + const JOCTET *dataptr, unsigned int datalen)); + JMETHOD(void, write_file_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_frame_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_scan_header, (j_compress_ptr cinfo)); + JMETHOD(void, write_file_trailer, (j_compress_ptr cinfo)); + JMETHOD(void, write_tables_only, (j_compress_ptr cinfo)); +}; + + +/* Declarations for decompression modules */ + +/* Master control module */ +struct jpeg_decomp_master { + JMETHOD(void, prepare_for_output_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, finish_output_pass, (j_decompress_ptr cinfo)); + + /* State variables made visible to other modules */ + boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */ +}; + +/* Input control module */ +struct jpeg_input_controller { + JMETHOD(int, consume_input, (j_decompress_ptr cinfo)); + JMETHOD(void, reset_input_controller, (j_decompress_ptr cinfo)); + JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, finish_input_pass, (j_decompress_ptr cinfo)); + + /* State variables made visible to other modules */ + boolean has_multiple_scans; /* True if file has multiple scans */ + boolean eoi_reached; /* True when EOI has been consumed */ +}; + +/* Main buffer control (downsampled-data buffer) */ +struct jpeg_d_main_controller { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, process_data, (j_decompress_ptr cinfo, + JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +}; + +/* Coefficient buffer control */ +struct jpeg_d_coef_controller { + JMETHOD(void, start_input_pass, (j_decompress_ptr cinfo)); + JMETHOD(int, consume_data, (j_decompress_ptr cinfo)); + JMETHOD(void, start_output_pass, (j_decompress_ptr cinfo)); + JMETHOD(int, decompress_data, (j_decompress_ptr cinfo, + JSAMPIMAGE output_buf)); + /* Pointer to array of coefficient virtual arrays, or NULL if none */ + jvirt_barray_ptr *coef_arrays; +}; + +/* Decompression postprocessing (color quantization buffer control) */ +struct jpeg_d_post_controller { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode)); + JMETHOD(void, post_process_data, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, + JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); +}; + +/* Marker reading & parsing */ +struct jpeg_marker_reader { + JMETHOD(void, reset_marker_reader, (j_decompress_ptr cinfo)); + /* Read markers until SOS or EOI. + * Returns same codes as are defined for jpeg_consume_input: + * JPEG_SUSPENDED, JPEG_REACHED_SOS, or JPEG_REACHED_EOI. + */ + JMETHOD(int, read_markers, (j_decompress_ptr cinfo)); + /* Read a restart marker --- exported for use by entropy decoder only */ + jpeg_marker_parser_method read_restart_marker; + /* Application-overridable marker processing methods */ + jpeg_marker_parser_method process_COM; + jpeg_marker_parser_method process_APPn[16]; + + /* State of marker reader --- nominally internal, but applications + * supplying COM or APPn handlers might like to know the state. + */ + boolean saw_SOI; /* found SOI? */ + boolean saw_SOF; /* found SOF? */ + int next_restart_num; /* next restart number expected (0-7) */ + unsigned int discarded_bytes; /* # of bytes skipped looking for a marker */ +}; + +/* Entropy decoding */ +struct jpeg_entropy_decoder { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(boolean, decode_mcu, (j_decompress_ptr cinfo, + JBLOCKROW *MCU_data)); +}; + +/* Inverse DCT (also performs dequantization) */ +typedef JMETHOD(void, inverse_DCT_method_ptr, + (j_decompress_ptr cinfo, jpeg_component_info * compptr, + JCOEFPTR coef_block, + JSAMPARRAY output_buf, JDIMENSION output_col)); + +struct jpeg_inverse_dct { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + /* It is useful to allow each component to have a separate IDCT method. */ + inverse_DCT_method_ptr inverse_DCT[MAX_COMPONENTS]; +}; + +/* Upsampling (note that upsampler must also call color converter) */ +struct jpeg_upsampler { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, upsample, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, + JDIMENSION *in_row_group_ctr, + JDIMENSION in_row_groups_avail, + JSAMPARRAY output_buf, + JDIMENSION *out_row_ctr, + JDIMENSION out_rows_avail)); + + boolean need_context_rows; /* TRUE if need rows above & below */ +}; + +/* Colorspace conversion */ +struct jpeg_color_deconverter { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, color_convert, (j_decompress_ptr cinfo, + JSAMPIMAGE input_buf, JDIMENSION input_row, + JSAMPARRAY output_buf, int num_rows)); +}; + +/* Color quantization or color precision reduction */ +struct jpeg_color_quantizer { + JMETHOD(void, start_pass, (j_decompress_ptr cinfo, boolean is_pre_scan)); + JMETHOD(void, color_quantize, (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, + int num_rows)); + JMETHOD(void, finish_pass, (j_decompress_ptr cinfo)); + JMETHOD(void, new_color_map, (j_decompress_ptr cinfo)); +}; + + +/* Miscellaneous useful macros */ + +#undef MAX +#define MAX(a,b) ((a) > (b) ? (a) : (b)) +#undef MIN +#define MIN(a,b) ((a) < (b) ? (a) : (b)) + + +/* We assume that right shift corresponds to signed division by 2 with + * rounding towards minus infinity. This is correct for typical "arithmetic + * shift" instructions that shift in copies of the sign bit. But some + * C compilers implement >> with an unsigned shift. For these machines you + * must define RIGHT_SHIFT_IS_UNSIGNED. + * RIGHT_SHIFT provides a proper signed right shift of an INT32 quantity. + * It is only applied with constant shift counts. SHIFT_TEMPS must be + * included in the variables of any routine using RIGHT_SHIFT. + */ + +#ifdef RIGHT_SHIFT_IS_UNSIGNED +#define SHIFT_TEMPS INT32 shift_temp; +#define RIGHT_SHIFT(x,shft) \ + ((shift_temp = (x)) < 0 ? \ + (shift_temp >> (shft)) | ((~((INT32) 0)) << (32-(shft))) : \ + (shift_temp >> (shft))) +#else +#define SHIFT_TEMPS +#define RIGHT_SHIFT(x,shft) ((x) >> (shft)) +#endif + + +/* Short forms of external names for systems with brain-damaged linkers. */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jinit_compress_master jICompress +#define jinit_c_master_control jICMaster +#define jinit_c_main_controller jICMainC +#define jinit_c_prep_controller jICPrepC +#define jinit_c_coef_controller jICCoefC +#define jinit_color_converter jICColor +#define jinit_downsampler jIDownsampler +#define jinit_forward_dct jIFDCT +#define jinit_huff_encoder jIHEncoder +#define jinit_phuff_encoder jIPHEncoder +#define jinit_marker_writer jIMWriter +#define jinit_master_decompress jIDMaster +#define jinit_d_main_controller jIDMainC +#define jinit_d_coef_controller jIDCoefC +#define jinit_d_post_controller jIDPostC +#define jinit_input_controller jIInCtlr +#define jinit_marker_reader jIMReader +#define jinit_huff_decoder jIHDecoder +#define jinit_phuff_decoder jIPHDecoder +#define jinit_inverse_dct jIIDCT +#define jinit_upsampler jIUpsampler +#define jinit_color_deconverter jIDColor +#define jinit_1pass_quantizer jI1Quant +#define jinit_2pass_quantizer jI2Quant +#define jinit_merged_upsampler jIMUpsampler +#define jinit_memory_mgr jIMemMgr +#define jdiv_round_up jDivRound +#define jround_up jRound +#define jcopy_sample_rows jCopySamples +#define jcopy_block_row jCopyBlocks +#define jzero_far jZeroFar +#define jpeg_zigzag_order jZIGTable +#define jpeg_natural_order jZAGTable +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* Compression module initialization routines */ +EXTERN(void) jinit_compress_master JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_c_master_control JPP((j_compress_ptr cinfo, + boolean transcode_only)); +EXTERN(void) jinit_c_main_controller JPP((j_compress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_c_prep_controller JPP((j_compress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_c_coef_controller JPP((j_compress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_color_converter JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_downsampler JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_forward_dct JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_huff_encoder JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_phuff_encoder JPP((j_compress_ptr cinfo)); +EXTERN(void) jinit_marker_writer JPP((j_compress_ptr cinfo)); +/* Decompression module initialization routines */ +EXTERN(void) jinit_master_decompress JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_d_main_controller JPP((j_decompress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_d_coef_controller JPP((j_decompress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_d_post_controller JPP((j_decompress_ptr cinfo, + boolean need_full_buffer)); +EXTERN(void) jinit_input_controller JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_marker_reader JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_huff_decoder JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_phuff_decoder JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_inverse_dct JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_upsampler JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_color_deconverter JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_1pass_quantizer JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_2pass_quantizer JPP((j_decompress_ptr cinfo)); +EXTERN(void) jinit_merged_upsampler JPP((j_decompress_ptr cinfo)); +/* Memory manager initialization */ +EXTERN(void) jinit_memory_mgr JPP((j_common_ptr cinfo)); + +/* Utility routines in jutils.c */ +EXTERN(long) jdiv_round_up JPP((long a, long b)); +EXTERN(long) jround_up JPP((long a, long b)); +EXTERN(void) jcopy_sample_rows JPP((JSAMPARRAY input_array, int source_row, + JSAMPARRAY output_array, int dest_row, + int num_rows, JDIMENSION num_cols)); +EXTERN(void) jcopy_block_row JPP((JBLOCKROW input_row, JBLOCKROW output_row, + JDIMENSION num_blocks)); +EXTERN(void) jzero_far JPP((void FAR * target, size_t bytestozero)); +/* Constant tables in jutils.c */ +extern const int jpeg_zigzag_order[]; /* natural coef order to zigzag order */ +extern const int jpeg_natural_order[]; /* zigzag coef order to natural order */ + +/* Suppress undefined-structure complaints if necessary. */ + +#ifdef INCOMPLETE_TYPES_BROKEN +#ifndef AM_MEMORY_MANAGER /* only jmemmgr.c defines these */ +struct jvirt_sarray_control { long dummy; }; +struct jvirt_barray_control { long dummy; }; +#endif +#endif /* INCOMPLETE_TYPES_BROKEN */ diff --git a/windows_libs/jpeg-6a/jpeglib.h b/windows_libs/jpeg-6a/jpeglib.h new file mode 100644 index 00000000..b778e2df --- /dev/null +++ b/windows_libs/jpeg-6a/jpeglib.h @@ -0,0 +1,1055 @@ +/* + * jpeglib.h + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file defines the application interface for the JPEG library. + * Most applications using the library need only include this file, + * and perhaps jerror.h if they want to know the exact error codes. + */ + +#ifndef JPEGLIB_H +#define JPEGLIB_H + +/* + * First we include the configuration files that record how this + * installation of the JPEG library is set up. jconfig.h can be + * generated automatically for many systems. jmorecfg.h contains + * manual configuration options that most people need not worry about. + */ + +#ifndef JCONFIG_INCLUDED /* in case jinclude.h already did */ +#include "jconfig.h" /* widely used configuration options */ +#endif +#include "jmorecfg.h" /* seldom changed options */ + + +/* Version ID for the JPEG library. + * Might be useful for tests like "#if JPEG_LIB_VERSION >= 60". + */ + +#define JPEG_LIB_VERSION 61 /* Version 6a */ + + +/* Various constants determining the sizes of things. + * All of these are specified by the JPEG standard, so don't change them + * if you want to be compatible. + */ + +#define DCTSIZE 8 /* The basic DCT block is 8x8 samples */ +#define DCTSIZE2 64 /* DCTSIZE squared; # of elements in a block */ +#define NUM_QUANT_TBLS 4 /* Quantization tables are numbered 0..3 */ +#define NUM_HUFF_TBLS 4 /* Huffman tables are numbered 0..3 */ +#define NUM_ARITH_TBLS 16 /* Arith-coding tables are numbered 0..15 */ +#define MAX_COMPS_IN_SCAN 4 /* JPEG limit on # of components in one scan */ +#define MAX_SAMP_FACTOR 4 /* JPEG limit on sampling factors */ +/* Unfortunately, some bozo at Adobe saw no reason to be bound by the standard; + * the PostScript DCT filter can emit files with many more than 10 blocks/MCU. + * If you happen to run across such a file, you can up D_MAX_BLOCKS_IN_MCU + * to handle it. We even let you do this from the jconfig.h file. However, + * we strongly discourage changing C_MAX_BLOCKS_IN_MCU; just because Adobe + * sometimes emits noncompliant files doesn't mean you should too. + */ +#define C_MAX_BLOCKS_IN_MCU 10 /* compressor's limit on blocks per MCU */ +#ifndef D_MAX_BLOCKS_IN_MCU +#define D_MAX_BLOCKS_IN_MCU 10 /* decompressor's limit on blocks per MCU */ +#endif + + +/* Data structures for images (arrays of samples and of DCT coefficients). + * On 80x86 machines, the image arrays are too big for near pointers, + * but the pointer arrays can fit in near memory. + */ + +typedef JSAMPLE FAR *JSAMPROW; /* ptr to one image row of pixel samples. */ +typedef JSAMPROW *JSAMPARRAY; /* ptr to some rows (a 2-D sample array) */ +typedef JSAMPARRAY *JSAMPIMAGE; /* a 3-D sample array: top index is color */ + +typedef JCOEF JBLOCK[DCTSIZE2]; /* one block of coefficients */ +typedef JBLOCK FAR *JBLOCKROW; /* pointer to one row of coefficient blocks */ +typedef JBLOCKROW *JBLOCKARRAY; /* a 2-D array of coefficient blocks */ +typedef JBLOCKARRAY *JBLOCKIMAGE; /* a 3-D array of coefficient blocks */ + +typedef JCOEF FAR *JCOEFPTR; /* useful in a couple of places */ + + +/* Types for JPEG compression parameters and working tables. */ + + +/* DCT coefficient quantization tables. */ + +typedef struct { + /* This array gives the coefficient quantizers in natural array order + * (not the zigzag order in which they are stored in a JPEG DQT marker). + * CAUTION: IJG versions prior to v6a kept this array in zigzag order. + */ + UINT16 quantval[DCTSIZE2]; /* quantization step for each coefficient */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JQUANT_TBL; + + +/* Huffman coding tables. */ + +typedef struct { + /* These two fields directly represent the contents of a JPEG DHT marker */ + UINT8 bits[17]; /* bits[k] = # of symbols with codes of */ + /* length k bits; bits[0] is unused */ + UINT8 huffval[256]; /* The symbols, in order of incr code length */ + /* This field is used only during compression. It's initialized FALSE when + * the table is created, and set TRUE when it's been output to the file. + * You could suppress output of a table by setting this to TRUE. + * (See jpeg_suppress_tables for an example.) + */ + boolean sent_table; /* TRUE when table has been output */ +} JHUFF_TBL; + + +/* Basic info about one component (color channel). */ + +typedef struct { + /* These values are fixed over the whole image. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOF marker. */ + int component_id; /* identifier for this component (0..255) */ + int component_index; /* its index in SOF or cinfo->comp_info[] */ + int h_samp_factor; /* horizontal sampling factor (1..4) */ + int v_samp_factor; /* vertical sampling factor (1..4) */ + int quant_tbl_no; /* quantization table selector (0..3) */ + /* These values may vary between scans. */ + /* For compression, they must be supplied by parameter setup; */ + /* for decompression, they are read from the SOS marker. */ + /* The decompressor output side may not use these variables. */ + int dc_tbl_no; /* DC entropy table selector (0..3) */ + int ac_tbl_no; /* AC entropy table selector (0..3) */ + + /* Remaining fields should be treated as private by applications. */ + + /* These values are computed during compression or decompression startup: */ + /* Component's size in DCT blocks. + * Any dummy blocks added to complete an MCU are not counted; therefore + * these values do not depend on whether a scan is interleaved or not. + */ + JDIMENSION width_in_blocks; + JDIMENSION height_in_blocks; + /* Size of a DCT block in samples. Always DCTSIZE for compression. + * For decompression this is the size of the output from one DCT block, + * reflecting any scaling we choose to apply during the IDCT step. + * Values of 1,2,4,8 are likely to be supported. Note that different + * components may receive different IDCT scalings. + */ + int DCT_scaled_size; + /* The downsampled dimensions are the component's actual, unpadded number + * of samples at the main buffer (preprocessing/compression interface), thus + * downsampled_width = ceil(image_width * Hi/Hmax) + * and similarly for height. For decompression, IDCT scaling is included, so + * downsampled_width = ceil(image_width * Hi/Hmax * DCT_scaled_size/DCTSIZE) + */ + JDIMENSION downsampled_width; /* actual width in samples */ + JDIMENSION downsampled_height; /* actual height in samples */ + /* This flag is used only for decompression. In cases where some of the + * components will be ignored (eg grayscale output from YCbCr image), + * we can skip most computations for the unused components. + */ + boolean component_needed; /* do we need the value of this component? */ + + /* These values are computed before starting a scan of the component. */ + /* The decompressor output side may not use these variables. */ + int MCU_width; /* number of blocks per MCU, horizontally */ + int MCU_height; /* number of blocks per MCU, vertically */ + int MCU_blocks; /* MCU_width * MCU_height */ + int MCU_sample_width; /* MCU width in samples, MCU_width*DCT_scaled_size */ + int last_col_width; /* # of non-dummy blocks across in last MCU */ + int last_row_height; /* # of non-dummy blocks down in last MCU */ + + /* Saved quantization table for component; NULL if none yet saved. + * See jdinput.c comments about the need for this information. + * This field is currently used only for decompression. + */ + JQUANT_TBL * quant_table; + + /* Private per-component storage for DCT or IDCT subsystem. */ + void * dct_table; +} jpeg_component_info; + + +/* The script for encoding a multiple-scan file is an array of these: */ + +typedef struct { + int comps_in_scan; /* number of components encoded in this scan */ + int component_index[MAX_COMPS_IN_SCAN]; /* their SOF/comp_info[] indexes */ + int Ss, Se; /* progressive JPEG spectral selection parms */ + int Ah, Al; /* progressive JPEG successive approx. parms */ +} jpeg_scan_info; + + +/* Known color spaces. */ + +typedef enum { + JCS_UNKNOWN, /* error/unspecified */ + JCS_GRAYSCALE, /* monochrome */ + JCS_RGB, /* red/green/blue */ + JCS_YCbCr, /* Y/Cb/Cr (also known as YUV) */ + JCS_CMYK, /* C/M/Y/K */ + JCS_YCCK /* Y/Cb/Cr/K */ +} J_COLOR_SPACE; + +/* DCT/IDCT algorithm options. */ + +typedef enum { + JDCT_ISLOW, /* slow but accurate integer algorithm */ + JDCT_IFAST, /* faster, less accurate integer method */ + JDCT_FLOAT /* floating-point: accurate, fast on fast HW */ +} J_DCT_METHOD; + +#ifndef JDCT_DEFAULT /* may be overridden in jconfig.h */ +#define JDCT_DEFAULT JDCT_ISLOW +#endif +#ifndef JDCT_FASTEST /* may be overridden in jconfig.h */ +#define JDCT_FASTEST JDCT_IFAST +#endif + +/* Dithering options for decompression. */ + +typedef enum { + JDITHER_NONE, /* no dithering */ + JDITHER_ORDERED, /* simple ordered dither */ + JDITHER_FS /* Floyd-Steinberg error diffusion dither */ +} J_DITHER_MODE; + + +/* Common fields between JPEG compression and decompression master structs. */ + +#define jpeg_common_fields \ + struct jpeg_error_mgr * err; /* Error handler module */\ + struct jpeg_memory_mgr * mem; /* Memory manager module */\ + struct jpeg_progress_mgr * progress; /* Progress monitor, or NULL if none */\ + boolean is_decompressor; /* so common code can tell which is which */\ + int global_state /* for checking call sequence validity */ + +/* Routines that are to be used by both halves of the library are declared + * to receive a pointer to this structure. There are no actual instances of + * jpeg_common_struct, only of jpeg_compress_struct and jpeg_decompress_struct. + */ +struct jpeg_common_struct { + jpeg_common_fields; /* Fields common to both master struct types */ + /* Additional fields follow in an actual jpeg_compress_struct or + * jpeg_decompress_struct. All three structs must agree on these + * initial fields! (This would be a lot cleaner in C++.) + */ +}; + +typedef struct jpeg_common_struct * j_common_ptr; +typedef struct jpeg_compress_struct * j_compress_ptr; +typedef struct jpeg_decompress_struct * j_decompress_ptr; + + +/* Master record for a compression instance */ + +struct jpeg_compress_struct { + jpeg_common_fields; /* Fields shared with jpeg_decompress_struct */ + + /* Destination for compressed data */ + struct jpeg_destination_mgr * dest; + + /* Description of source image --- these fields must be filled in by + * outer application before starting compression. in_color_space must + * be correct before you can even call jpeg_set_defaults(). + */ + + JDIMENSION image_width; /* input image width */ + JDIMENSION image_height; /* input image height */ + int input_components; /* # of color components in input image */ + J_COLOR_SPACE in_color_space; /* colorspace of input image */ + + double input_gamma; /* image gamma of input image */ + + /* Compression parameters --- these fields must be set before calling + * jpeg_start_compress(). We recommend calling jpeg_set_defaults() to + * initialize everything to reasonable defaults, then changing anything + * the application specifically wants to change. That way you won't get + * burnt when new parameters are added. Also note that there are several + * helper routines to simplify changing parameters. + */ + + int data_precision; /* bits of precision in image data */ + + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + jpeg_component_info * comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined */ + + JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + int num_scans; /* # of entries in scan_info array */ + const jpeg_scan_info * scan_info; /* script for multi-scan file, or NULL */ + /* The default value of scan_info is NULL, which causes a single-scan + * sequential JPEG file to be emitted. To create a multi-scan file, + * set num_scans and scan_info to point to an array of scan definitions. + */ + + boolean raw_data_in; /* TRUE=caller supplies downsampled data */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + boolean optimize_coding; /* TRUE=optimize entropy encoding parms */ + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + int smoothing_factor; /* 1..100, or 0 for no input smoothing */ + J_DCT_METHOD dct_method; /* DCT algorithm selector */ + + /* The restart interval can be specified in absolute MCUs by setting + * restart_interval, or in MCU rows by setting restart_in_rows + * (in which case the correct restart_interval will be figured + * for each scan). + */ + unsigned int restart_interval; /* MCUs per restart, or 0 for no restart */ + int restart_in_rows; /* if > 0, MCU rows per restart interval */ + + /* Parameters controlling emission of special markers. */ + + boolean write_JFIF_header; /* should a JFIF marker be written? */ + /* These three values are not used by the JPEG code, merely copied */ + /* into the JFIF APP0 marker. density_unit can be 0 for unknown, */ + /* 1 for dots/inch, or 2 for dots/cm. Note that the pixel aspect */ + /* ratio is defined by X_density/Y_density even when density_unit=0. */ + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean write_Adobe_marker; /* should an Adobe marker be written? */ + + /* State variable: index of next scanline to be written to + * jpeg_write_scanlines(). Application may use this to control its + * processing loop, e.g., "while (next_scanline < image_height)". + */ + + JDIMENSION next_scanline; /* 0 .. image_height-1 */ + + /* Remaining fields are known throughout compressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during compression startup + */ + boolean progressive_mode; /* TRUE if scan script uses progressive mode */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + + JDIMENSION total_iMCU_rows; /* # of iMCU rows to be input to coef ctlr */ + /* The coefficient controller receives data in units of MCU rows as defined + * for fully interleaved scans (whether the JPEG file is interleaved or not). + * There are v_samp_factor * DCTSIZE sample rows of each component in an + * "iMCU" (interleaved MCU) row. + */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of DCT blocks per MCU */ + int MCU_membership[C_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th block in an MCU */ + + int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + + /* + * Links to compression subobjects (methods and private variables of modules) + */ + struct jpeg_comp_master * master; + struct jpeg_c_main_controller * main; + struct jpeg_c_prep_controller * prep; + struct jpeg_c_coef_controller * coef; + struct jpeg_marker_writer * marker; + struct jpeg_color_converter * cconvert; + struct jpeg_downsampler * downsample; + struct jpeg_forward_dct * fdct; + struct jpeg_entropy_encoder * entropy; +}; + + +/* Master record for a decompression instance */ + +struct jpeg_decompress_struct { + jpeg_common_fields; /* Fields shared with jpeg_compress_struct */ + + /* Source of compressed data */ + struct jpeg_source_mgr * src; + + /* Basic description of image --- filled in by jpeg_read_header(). */ + /* Application may inspect these values to decide how to process image. */ + + JDIMENSION image_width; /* nominal image width (from SOF marker) */ + JDIMENSION image_height; /* nominal image height */ + int num_components; /* # of color components in JPEG image */ + J_COLOR_SPACE jpeg_color_space; /* colorspace of JPEG image */ + + /* Decompression processing parameters --- these fields must be set before + * calling jpeg_start_decompress(). Note that jpeg_read_header() initializes + * them to default values. + */ + + J_COLOR_SPACE out_color_space; /* colorspace for output */ + + unsigned int scale_num, scale_denom; /* fraction by which to scale image */ + + double output_gamma; /* image gamma wanted in output */ + + boolean buffered_image; /* TRUE=multiple output passes */ + boolean raw_data_out; /* TRUE=downsampled data wanted */ + + J_DCT_METHOD dct_method; /* IDCT algorithm selector */ + boolean do_fancy_upsampling; /* TRUE=apply fancy upsampling */ + boolean do_block_smoothing; /* TRUE=apply interblock smoothing */ + + boolean quantize_colors; /* TRUE=colormapped output wanted */ + /* the following are ignored if not quantize_colors: */ + J_DITHER_MODE dither_mode; /* type of color dithering to use */ + boolean two_pass_quantize; /* TRUE=use two-pass color quantization */ + int desired_number_of_colors; /* max # colors to use in created colormap */ + /* these are significant only in buffered-image mode: */ + boolean enable_1pass_quant; /* enable future use of 1-pass quantizer */ + boolean enable_external_quant;/* enable future use of external colormap */ + boolean enable_2pass_quant; /* enable future use of 2-pass quantizer */ + + /* Description of actual output image that will be returned to application. + * These fields are computed by jpeg_start_decompress(). + * You can also use jpeg_calc_output_dimensions() to determine these values + * in advance of calling jpeg_start_decompress(). + */ + + JDIMENSION output_width; /* scaled image width */ + JDIMENSION output_height; /* scaled image height */ + int out_color_components; /* # of color components in out_color_space */ + int output_components; /* # of color components returned */ + /* output_components is 1 (a colormap index) when quantizing colors; + * otherwise it equals out_color_components. + */ + int rec_outbuf_height; /* min recommended height of scanline buffer */ + /* If the buffer passed to jpeg_read_scanlines() is less than this many rows + * high, space and time will be wasted due to unnecessary data copying. + * Usually rec_outbuf_height will be 1 or 2, at most 4. + */ + + /* When quantizing colors, the output colormap is described by these fields. + * The application can supply a colormap by setting colormap non-NULL before + * calling jpeg_start_decompress; otherwise a colormap is created during + * jpeg_start_decompress or jpeg_start_output. + * The map has out_color_components rows and actual_number_of_colors columns. + */ + int actual_number_of_colors; /* number of entries in use */ + JSAMPARRAY colormap; /* The color map as a 2-D pixel array */ + + /* State variables: these variables indicate the progress of decompression. + * The application may examine these but must not modify them. + */ + + /* Row index of next scanline to be read from jpeg_read_scanlines(). + * Application may use this to control its processing loop, e.g., + * "while (output_scanline < output_height)". + */ + JDIMENSION output_scanline; /* 0 .. output_height-1 */ + + /* Current input scan number and number of iMCU rows completed in scan. + * These indicate the progress of the decompressor input side. + */ + int input_scan_number; /* Number of SOS markers seen so far */ + JDIMENSION input_iMCU_row; /* Number of iMCU rows completed */ + + /* The "output scan number" is the notional scan being displayed by the + * output side. The decompressor will not allow output scan/row number + * to get ahead of input scan/row, but it can fall arbitrarily far behind. + */ + int output_scan_number; /* Nominal scan number being displayed */ + JDIMENSION output_iMCU_row; /* Number of iMCU rows read */ + + /* Current progression status. coef_bits[c][i] indicates the precision + * with which component c's DCT coefficient i (in zigzag order) is known. + * It is -1 when no data has yet been received, otherwise it is the point + * transform (shift) value for the most recent scan of the coefficient + * (thus, 0 at completion of the progression). + * This pointer is NULL when reading a non-progressive file. + */ + int (*coef_bits)[DCTSIZE2]; /* -1 or current Al value for each coef */ + + /* Internal JPEG parameters --- the application usually need not look at + * these fields. Note that the decompressor output side may not use + * any parameters that can change between scans. + */ + + /* Quantization and Huffman tables are carried forward across input + * datastreams when processing abbreviated JPEG datastreams. + */ + + JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS]; + /* ptrs to coefficient quantization tables, or NULL if not defined */ + + JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS]; + JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS]; + /* ptrs to Huffman coding tables, or NULL if not defined */ + + /* These parameters are never carried across datastreams, since they + * are given in SOF/SOS markers or defined to be reset by SOI. + */ + + int data_precision; /* bits of precision in image data */ + + jpeg_component_info * comp_info; + /* comp_info[i] describes component that appears i'th in SOF */ + + boolean progressive_mode; /* TRUE if SOFn specifies progressive mode */ + boolean arith_code; /* TRUE=arithmetic coding, FALSE=Huffman */ + + UINT8 arith_dc_L[NUM_ARITH_TBLS]; /* L values for DC arith-coding tables */ + UINT8 arith_dc_U[NUM_ARITH_TBLS]; /* U values for DC arith-coding tables */ + UINT8 arith_ac_K[NUM_ARITH_TBLS]; /* Kx values for AC arith-coding tables */ + + unsigned int restart_interval; /* MCUs per restart interval, or 0 for no restart */ + + /* These fields record data obtained from optional markers recognized by + * the JPEG library. + */ + boolean saw_JFIF_marker; /* TRUE iff a JFIF APP0 marker was found */ + /* Data copied from JFIF marker: */ + UINT8 density_unit; /* JFIF code for pixel size units */ + UINT16 X_density; /* Horizontal pixel density */ + UINT16 Y_density; /* Vertical pixel density */ + boolean saw_Adobe_marker; /* TRUE iff an Adobe APP14 marker was found */ + UINT8 Adobe_transform; /* Color transform code from Adobe marker */ + + boolean CCIR601_sampling; /* TRUE=first samples are cosited */ + + /* Remaining fields are known throughout decompressor, but generally + * should not be touched by a surrounding application. + */ + + /* + * These fields are computed during decompression startup + */ + int max_h_samp_factor; /* largest h_samp_factor */ + int max_v_samp_factor; /* largest v_samp_factor */ + + int min_DCT_scaled_size; /* smallest DCT_scaled_size of any component */ + + JDIMENSION total_iMCU_rows; /* # of iMCU rows in image */ + /* The coefficient controller's input and output progress is measured in + * units of "iMCU" (interleaved MCU) rows. These are the same as MCU rows + * in fully interleaved JPEG scans, but are used whether the scan is + * interleaved or not. We define an iMCU row as v_samp_factor DCT block + * rows of each component. Therefore, the IDCT output contains + * v_samp_factor*DCT_scaled_size sample rows of a component per iMCU row. + */ + + JSAMPLE * sample_range_limit; /* table for fast range-limiting */ + + /* + * These fields are valid during any one scan. + * They describe the components and MCUs actually appearing in the scan. + * Note that the decompressor output side must not use these fields. + */ + int comps_in_scan; /* # of JPEG components in this scan */ + jpeg_component_info * cur_comp_info[MAX_COMPS_IN_SCAN]; + /* *cur_comp_info[i] describes component that appears i'th in SOS */ + + JDIMENSION MCUs_per_row; /* # of MCUs across the image */ + JDIMENSION MCU_rows_in_scan; /* # of MCU rows in the image */ + + int blocks_in_MCU; /* # of DCT blocks per MCU */ + int MCU_membership[D_MAX_BLOCKS_IN_MCU]; + /* MCU_membership[i] is index in cur_comp_info of component owning */ + /* i'th block in an MCU */ + + int Ss, Se, Ah, Al; /* progressive JPEG parameters for scan */ + + /* This field is shared between entropy decoder and marker parser. + * It is either zero or the code of a JPEG marker that has been + * read from the data source, but has not yet been processed. + */ + int unread_marker; + + /* + * Links to decompression subobjects (methods, private variables of modules) + */ + struct jpeg_decomp_master * master; + struct jpeg_d_main_controller * main; + struct jpeg_d_coef_controller * coef; + struct jpeg_d_post_controller * post; + struct jpeg_input_controller * inputctl; + struct jpeg_marker_reader * marker; + struct jpeg_entropy_decoder * entropy; + struct jpeg_inverse_dct * idct; + struct jpeg_upsampler * upsample; + struct jpeg_color_deconverter * cconvert; + struct jpeg_color_quantizer * cquantize; +}; + + +/* "Object" declarations for JPEG modules that may be supplied or called + * directly by the surrounding application. + * As with all objects in the JPEG library, these structs only define the + * publicly visible methods and state variables of a module. Additional + * private fields may exist after the public ones. + */ + + +/* Error handler object */ + +struct jpeg_error_mgr { + /* Error exit handler: does not return to caller */ + JMETHOD(void, error_exit, (j_common_ptr cinfo)); + /* Conditionally emit a trace or warning message */ + JMETHOD(void, emit_message, (j_common_ptr cinfo, int msg_level)); + /* Routine that actually outputs a trace or error message */ + JMETHOD(void, output_message, (j_common_ptr cinfo)); + /* Format a message string for the most recent JPEG error or message */ + JMETHOD(void, format_message, (j_common_ptr cinfo, char * buffer)); +#define JMSG_LENGTH_MAX 200 /* recommended size of format_message buffer */ + /* Reset error state variables at start of a new image */ + JMETHOD(void, reset_error_mgr, (j_common_ptr cinfo)); + + /* The message ID code and any parameters are saved here. + * A message can have one string parameter or up to 8 int parameters. + */ + int msg_code; +#define JMSG_STR_PARM_MAX 80 + union { + int i[8]; + char s[JMSG_STR_PARM_MAX]; + } msg_parm; + + /* Standard state variables for error facility */ + + int trace_level; /* max msg_level that will be displayed */ + + /* For recoverable corrupt-data errors, we emit a warning message, + * but keep going unless emit_message chooses to abort. emit_message + * should count warnings in num_warnings. The surrounding application + * can check for bad data by seeing if num_warnings is nonzero at the + * end of processing. + */ + long num_warnings; /* number of corrupt-data warnings */ + + /* These fields point to the table(s) of error message strings. + * An application can change the table pointer to switch to a different + * message list (typically, to change the language in which errors are + * reported). Some applications may wish to add additional error codes + * that will be handled by the JPEG library error mechanism; the second + * table pointer is used for this purpose. + * + * First table includes all errors generated by JPEG library itself. + * Error code 0 is reserved for a "no such error string" message. + */ + const char * const * jpeg_message_table; /* Library errors */ + int last_jpeg_message; /* Table contains strings 0..last_jpeg_message */ + /* Second table can be added by application (see cjpeg/djpeg for example). + * It contains strings numbered first_addon_message..last_addon_message. + */ + const char * const * addon_message_table; /* Non-library errors */ + int first_addon_message; /* code for first string in addon table */ + int last_addon_message; /* code for last string in addon table */ +}; + + +/* Progress monitor object */ + +struct jpeg_progress_mgr { + JMETHOD(void, progress_monitor, (j_common_ptr cinfo)); + + long pass_counter; /* work units completed in this pass */ + long pass_limit; /* total number of work units in this pass */ + int completed_passes; /* passes completed so far */ + int total_passes; /* total number of passes expected */ +}; + + +/* Data destination object for compression */ + +struct jpeg_destination_mgr { + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + + JMETHOD(void, init_destination, (j_compress_ptr cinfo)); + JMETHOD(boolean, empty_output_buffer, (j_compress_ptr cinfo)); + JMETHOD(void, term_destination, (j_compress_ptr cinfo)); +}; + + +/* Data source object for decompression */ + +struct jpeg_source_mgr { + const JOCTET * next_input_byte; /* => next byte to read from buffer */ + size_t bytes_in_buffer; /* # of bytes remaining in buffer */ + + JMETHOD(void, init_source, (j_decompress_ptr cinfo)); + JMETHOD(boolean, fill_input_buffer, (j_decompress_ptr cinfo)); + JMETHOD(void, skip_input_data, (j_decompress_ptr cinfo, long num_bytes)); + JMETHOD(boolean, resync_to_restart, (j_decompress_ptr cinfo, int desired)); + JMETHOD(void, term_source, (j_decompress_ptr cinfo)); +}; + + +/* Memory manager object. + * Allocates "small" objects (a few K total), "large" objects (tens of K), + * and "really big" objects (virtual arrays with backing store if needed). + * The memory manager does not allow individual objects to be freed; rather, + * each created object is assigned to a pool, and whole pools can be freed + * at once. This is faster and more convenient than remembering exactly what + * to free, especially where malloc()/free() are not too speedy. + * NB: alloc routines never return NULL. They exit to error_exit if not + * successful. + */ + +#define JPOOL_PERMANENT 0 /* lasts until master record is destroyed */ +#define JPOOL_IMAGE 1 /* lasts until done with image/datastream */ +#define JPOOL_NUMPOOLS 2 + +typedef struct jvirt_sarray_control * jvirt_sarray_ptr; +typedef struct jvirt_barray_control * jvirt_barray_ptr; + + +struct jpeg_memory_mgr { + /* Method pointers */ + JMETHOD(void *, alloc_small, (j_common_ptr cinfo, int pool_id, + size_t sizeofobject)); + JMETHOD(void FAR *, alloc_large, (j_common_ptr cinfo, int pool_id, + size_t sizeofobject)); + JMETHOD(JSAMPARRAY, alloc_sarray, (j_common_ptr cinfo, int pool_id, + JDIMENSION samplesperrow, + JDIMENSION numrows)); + JMETHOD(JBLOCKARRAY, alloc_barray, (j_common_ptr cinfo, int pool_id, + JDIMENSION blocksperrow, + JDIMENSION numrows)); + JMETHOD(jvirt_sarray_ptr, request_virt_sarray, (j_common_ptr cinfo, + int pool_id, + boolean pre_zero, + JDIMENSION samplesperrow, + JDIMENSION numrows, + JDIMENSION maxaccess)); + JMETHOD(jvirt_barray_ptr, request_virt_barray, (j_common_ptr cinfo, + int pool_id, + boolean pre_zero, + JDIMENSION blocksperrow, + JDIMENSION numrows, + JDIMENSION maxaccess)); + JMETHOD(void, realize_virt_arrays, (j_common_ptr cinfo)); + JMETHOD(JSAMPARRAY, access_virt_sarray, (j_common_ptr cinfo, + jvirt_sarray_ptr ptr, + JDIMENSION start_row, + JDIMENSION num_rows, + boolean writable)); + JMETHOD(JBLOCKARRAY, access_virt_barray, (j_common_ptr cinfo, + jvirt_barray_ptr ptr, + JDIMENSION start_row, + JDIMENSION num_rows, + boolean writable)); + JMETHOD(void, free_pool, (j_common_ptr cinfo, int pool_id)); + JMETHOD(void, self_destruct, (j_common_ptr cinfo)); + + /* Limit on memory allocation for this JPEG object. (Note that this is + * merely advisory, not a guaranteed maximum; it only affects the space + * used for virtual-array buffers.) May be changed by outer application + * after creating the JPEG object. + */ + long max_memory_to_use; +}; + + +/* Routine signature for application-supplied marker processing methods. + * Need not pass marker code since it is stored in cinfo->unread_marker. + */ +typedef JMETHOD(boolean, jpeg_marker_parser_method, (j_decompress_ptr cinfo)); + + +/* Declarations for routines called by application. + * The JPP macro hides prototype parameters from compilers that can't cope. + * Note JPP requires double parentheses. + */ + +#ifdef HAVE_PROTOTYPES +#define JPP(arglist) arglist +#else +#define JPP(arglist) () +#endif + + +/* Short forms of external names for systems with brain-damaged linkers. + * We shorten external names to be unique in the first six letters, which + * is good enough for all known systems. + * (If your compiler itself needs names to be unique in less than 15 + * characters, you are out of luck. Get a better compiler.) + */ + +#ifdef NEED_SHORT_EXTERNAL_NAMES +#define jpeg_std_error jStdError +#define jpeg_CreateCompress jCreaCompress +#define jpeg_CreateDecompress jCreaDecompress +#define jpeg_destroy_compress jDestCompress +#define jpeg_destroy_decompress jDestDecompress +#define jpeg_stdio_dest jStdDest +#define jpeg_stdio_src jStdSrc +#define jpeg_set_defaults jSetDefaults +#define jpeg_set_colorspace jSetColorspace +#define jpeg_default_colorspace jDefColorspace +#define jpeg_set_quality jSetQuality +#define jpeg_set_linear_quality jSetLQuality +#define jpeg_add_quant_table jAddQuantTable +#define jpeg_quality_scaling jQualityScaling +#define jpeg_simple_progression jSimProgress +#define jpeg_suppress_tables jSuppressTables +#define jpeg_alloc_quant_table jAlcQTable +#define jpeg_alloc_huff_table jAlcHTable +#define jpeg_start_compress jStrtCompress +#define jpeg_write_scanlines jWrtScanlines +#define jpeg_finish_compress jFinCompress +#define jpeg_write_raw_data jWrtRawData +#define jpeg_write_marker jWrtMarker +#define jpeg_write_tables jWrtTables +#define jpeg_read_header jReadHeader +#define jpeg_start_decompress jStrtDecompress +#define jpeg_read_scanlines jReadScanlines +#define jpeg_finish_decompress jFinDecompress +#define jpeg_read_raw_data jReadRawData +#define jpeg_has_multiple_scans jHasMultScn +#define jpeg_start_output jStrtOutput +#define jpeg_finish_output jFinOutput +#define jpeg_input_complete jInComplete +#define jpeg_new_colormap jNewCMap +#define jpeg_consume_input jConsumeInput +#define jpeg_calc_output_dimensions jCalcDimensions +#define jpeg_set_marker_processor jSetMarker +#define jpeg_read_coefficients jReadCoefs +#define jpeg_write_coefficients jWrtCoefs +#define jpeg_copy_critical_parameters jCopyCrit +#define jpeg_abort_compress jAbrtCompress +#define jpeg_abort_decompress jAbrtDecompress +#define jpeg_abort jAbort +#define jpeg_destroy jDestroy +#define jpeg_resync_to_restart jResyncRestart +#endif /* NEED_SHORT_EXTERNAL_NAMES */ + + +/* Default error-management setup */ +EXTERN(struct jpeg_error_mgr *) jpeg_std_error + JPP((struct jpeg_error_mgr * err)); + +/* Initialization of JPEG compression objects. + * jpeg_create_compress() and jpeg_create_decompress() are the exported + * names that applications should call. These expand to calls on + * jpeg_CreateCompress and jpeg_CreateDecompress with additional information + * passed for version mismatch checking. + * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. + */ +#define jpeg_create_compress(cinfo) \ + jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ + (size_t) sizeof(struct jpeg_compress_struct)) +#define jpeg_create_decompress(cinfo) \ + jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ + (size_t) sizeof(struct jpeg_decompress_struct)) +EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo, + int version, size_t structsize)); +EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo, + int version, size_t structsize)); +/* Destruction of JPEG compression objects */ +EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo)); + +/* Standard data source and destination managers: stdio streams. */ +/* Caller is responsible for opening the file before and closing after. */ +EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile)); +EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile)); + +/* Default parameter setup for compression */ +EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo)); +/* Compression parameter setup aids */ +EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo, + J_COLOR_SPACE colorspace)); +EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality, + boolean force_baseline)); +EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo, + int scale_factor, + boolean force_baseline)); +EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl, + const unsigned int *basic_table, + int scale_factor, + boolean force_baseline)); +EXTERN(int) jpeg_quality_scaling JPP((int quality)); +EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo, + boolean suppress)); +EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo)); +EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo)); + +/* Main entry points for compression */ +EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo, + boolean write_all_tables)); +EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION num_lines)); +EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo)); + +/* Replaces jpeg_write_scanlines when writing raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo, + JSAMPIMAGE data, + JDIMENSION num_lines)); + +/* Write a special marker. See libjpeg.doc concerning safe usage. */ +EXTERN(void) jpeg_write_marker + JPP((j_compress_ptr cinfo, int marker, + const JOCTET * dataptr, unsigned int datalen)); + +/* Alternate compression function: just write an abbreviated table file */ +EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo)); + +/* Decompression startup: read start of JPEG datastream to see what's there */ +EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo, + boolean require_image)); +/* Return value is one of: */ +#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */ +#define JPEG_HEADER_OK 1 /* Found valid image datastream */ +#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream */ +/* If you pass require_image = TRUE (normal case), you need not check for + * a TABLES_ONLY return code; an abbreviated file will cause an error exit. + * JPEG_SUSPENDED is only possible if you use a data source module that can + * give a suspension return (the stdio source module doesn't). + */ + +/* Main entry points for decompression */ +EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo)); +EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo, + JSAMPARRAY scanlines, + JDIMENSION max_lines)); +EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo)); + +/* Replaces jpeg_read_scanlines when reading raw downsampled data. */ +EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo, + JSAMPIMAGE data, + JDIMENSION max_lines)); + +/* Additional entry points for buffered-image mode. */ +EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo)); +EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo, + int scan_number)); +EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo)); +EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo)); +EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo)); +/* Return value is one of: */ +/* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */ +#define JPEG_REACHED_SOS 1 /* Reached start of new scan */ +#define JPEG_REACHED_EOI 2 /* Reached end of image */ +#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */ +#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan */ + +/* Precalculate output dimensions for current decompression parameters. */ +EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo)); + +/* Install a special processing method for COM or APPn markers. */ +EXTERN(void) jpeg_set_marker_processor + JPP((j_decompress_ptr cinfo, int marker_code, + jpeg_marker_parser_method routine)); + +/* Read or write raw DCT coefficients --- useful for lossless transcoding. */ +EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo)); +EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo, + jvirt_barray_ptr * coef_arrays)); +EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo, + j_compress_ptr dstinfo)); + +/* If you choose to abort compression or decompression before completing + * jpeg_finish_(de)compress, then you need to clean up to release memory, + * temporary files, etc. You can just call jpeg_destroy_(de)compress + * if you're done with the JPEG object, but if you want to clean it up and + * reuse it, call this: + */ +EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo)); +EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo)); + +/* Generic versions of jpeg_abort and jpeg_destroy that work on either + * flavor of JPEG object. These may be more convenient in some places. + */ +EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo)); +EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo)); + +/* Default restart-marker-resync procedure for use by data source modules */ +EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo, + int desired)); + + +/* These marker codes are exported since applications and data source modules + * are likely to want to use them. + */ + +#define JPEG_RST0 0xD0 /* RST0 marker code */ +#define JPEG_EOI 0xD9 /* EOI marker code */ +#define JPEG_APP0 0xE0 /* APP0 marker code */ +#define JPEG_COM 0xFE /* COM marker code */ + + +/* If we have a brain-damaged compiler that emits warnings (or worse, errors) + * for structure definitions that are never filled in, keep it quiet by + * supplying dummy definitions for the various substructures. + */ + +#ifdef INCOMPLETE_TYPES_BROKEN +#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */ +struct jvirt_sarray_control { long dummy; }; +struct jvirt_barray_control { long dummy; }; +struct jpeg_comp_master { long dummy; }; +struct jpeg_c_main_controller { long dummy; }; +struct jpeg_c_prep_controller { long dummy; }; +struct jpeg_c_coef_controller { long dummy; }; +struct jpeg_marker_writer { long dummy; }; +struct jpeg_color_converter { long dummy; }; +struct jpeg_downsampler { long dummy; }; +struct jpeg_forward_dct { long dummy; }; +struct jpeg_entropy_encoder { long dummy; }; +struct jpeg_decomp_master { long dummy; }; +struct jpeg_d_main_controller { long dummy; }; +struct jpeg_d_coef_controller { long dummy; }; +struct jpeg_d_post_controller { long dummy; }; +struct jpeg_input_controller { long dummy; }; +struct jpeg_marker_reader { long dummy; }; +struct jpeg_entropy_decoder { long dummy; }; +struct jpeg_inverse_dct { long dummy; }; +struct jpeg_upsampler { long dummy; }; +struct jpeg_color_deconverter { long dummy; }; +struct jpeg_color_quantizer { long dummy; }; +#endif /* JPEG_INTERNALS */ +#endif /* INCOMPLETE_TYPES_BROKEN */ + + +/* + * The JPEG library modules define JPEG_INTERNALS before including this file. + * The internal structure declarations are read only when that is true. + * Applications using the library should not include jpegint.h, but may wish + * to include jerror.h. + */ + +#ifdef JPEG_INTERNALS +#include "jpegint.h" /* fetch private declarations */ +#include "jerror.h" /* fetch error codes too */ +#endif + +#endif /* JPEGLIB_H */ diff --git a/windows_libs/jpeg-6a/jpegtran.1 b/windows_libs/jpeg-6a/jpegtran.1 new file mode 100644 index 00000000..73198845 --- /dev/null +++ b/windows_libs/jpeg-6a/jpegtran.1 @@ -0,0 +1,150 @@ +.TH JPEGTRAN 1 "15 June 1995" +.SH NAME +jpegtran \- lossless transcoding of JPEG files +.SH SYNOPSIS +.B jpegtran +[ +.I options +] +[ +.I filename +] +.LP +.SH DESCRIPTION +.LP +.B jpegtran +translates JPEG files from one variant of JPEG to another, for example +from baseline JPEG to progressive JPEG. The transformation is lossless: +no image degradation occurs, which would not be true if you used +.B djpeg +followed by +.BR cjpeg . +However, you cannot alter the image quality, because that would not be +a lossless operation. +.B jpegtran +reads the named JPEG/JFIF file, or the standard input if no file is +named, and produces a JPEG/JFIF file on the standard output. +.SH OPTIONS +.B jpegtran +accepts a subset of the switches recognized by +.BR cjpeg . +If you specify no switches, you get a plain baseline JPEG output file. +.PP +All switch names may be abbreviated; for example, +.B \-optimize +may be written +.B \-opt +or +.BR \-o . +Upper and lower case are equivalent. +British spellings are also accepted (e.g., +.BR \-optimise ), +though for brevity these are not mentioned below. +.PP +The basic switches are: +.TP +.B \-optimize +Perform optimization of entropy encoding parameters. Without this, default +encoding parameters are used. +.B \-optimize +usually makes the JPEG file a little smaller, but at the price of slower +compression. Note that +.B \-progressive +implies +.BR \-optimize . +.TP +.B \-progressive +Create progressive JPEG file (see below). +.PP +The +.B \-progressive +switch creates a "progressive JPEG" file. In this type of JPEG file, the data +is stored in multiple scans of increasing quality. If the file is being +transmitted over a slow communications link, the decoder can use the first +scan to display a low-quality image very quickly, and can then improve the +display with each subsequent scan. The final image is exactly equivalent to a +standard JPEG file of the same quality setting, and the total file size is +about the same --- often a little smaller. +.B Caution: +progressive JPEG is not yet widely implemented, so many decoders will be +unable to view a progressive JPEG file at all. +.PP +Switches for advanced users: +.TP +.BI \-restart " N" +Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is +attached to the number. +.B \-restart 0 +(the default) means no restart markers. +.TP +.BI \-maxmemory " N" +Set limit for amount of memory to use in processing large images. Value is +in thousands of bytes, or millions of bytes if "M" is attached to the +number. For example, +.B \-max 4m +selects 4000000 bytes. If more space is needed, temporary files will be used. +.TP +.BI \-outfile " name" +Send output image to the named file, not to standard output. +.TP +.B \-verbose +Enable debug printout. More +.BR \-v 's +give more output. Also, version information is printed at startup. +.TP +.B \-debug +Same as +.BR \-verbose . +.PP +The +.B \-restart +option inserts extra markers that allow a JPEG decoder to resynchronize after +a transmission error. Without restart markers, any damage to a compressed +file will usually ruin the image from the point of the error to the end of the +image; with restart markers, the damage is usually confined to the portion of +the image up to the next restart marker. Of course, the restart markers +occupy extra space. We recommend +.B \-restart 1 +for images that will be transmitted across unreliable networks such as Usenet. +.PP +Switches for wizards: +.TP +.BI \-scans " file" +Use the scan script given in the specified text file. +.PP +The "wizard" switches are intended for experimentation with JPEG. If you +don't know what you are doing, \fBdon't use them\fR. These switches are +documented further in the file wizard.doc. +.SH EXAMPLES +.LP +This example converts a baseline JPEG file to progressive form: +.IP +.B jpegtran \-progressive +.I foo.jpg +.B > +.I fooprog.jpg +.SH ENVIRONMENT +.TP +.B JPEGMEM +If this environment variable is set, its value is the default memory limit. +The value is specified as described for the +.B \-maxmemory +switch. +.B JPEGMEM +overrides the default value specified when the program was compiled, and +itself is overridden by an explicit +.BR \-maxmemory . +.SH SEE ALSO +.BR cjpeg (1), +.BR djpeg (1), +.BR rdjpgcom (1), +.BR wrjpgcom (1) +.br +Wallace, Gregory K. "The JPEG Still Picture Compression Standard", +Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44. +.SH AUTHOR +Independent JPEG Group +.SH BUGS +Arithmetic coding is not supported for legal reasons. +.PP +Still not as fast as we'd like. diff --git a/windows_libs/jpeg-6a/jpegtran.c b/windows_libs/jpeg-6a/jpegtran.c new file mode 100644 index 00000000..51901027 --- /dev/null +++ b/windows_libs/jpeg-6a/jpegtran.c @@ -0,0 +1,372 @@ +/* + * jpegtran.c + * + * Copyright (C) 1995-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a command-line user interface for JPEG transcoding. + * It is very similar to cjpeg.c, but provides lossless transcoding between + * different JPEG file formats. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ +#include "jversion.h" /* for version message */ + +#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ +#ifdef __MWERKS__ +#include /* Metrowerks needs this */ +#include /* ... and this */ +#endif +#ifdef THINK_C +#include /* Think declares it here */ +#endif +#endif + + +/* + * Argument-parsing code. + * The switch parser is designed to be useful with DOS-style command line + * syntax, ie, intermixed switches and file names, where only the switches + * to the left of a given file name affect processing of that file. + * The main program in this file doesn't actually use this capability... + */ + + +static const char * progname; /* program name for error messages */ +static char * outfilename; /* for -outfile switch */ + + +LOCAL(void) +usage (void) +/* complain about bad command line */ +{ + fprintf(stderr, "usage: %s [switches] ", progname); +#ifdef TWO_FILE_COMMANDLINE + fprintf(stderr, "inputfile outputfile\n"); +#else + fprintf(stderr, "[inputfile]\n"); +#endif + + fprintf(stderr, "Switches (names may be abbreviated):\n"); +#ifdef ENTROPY_OPT_SUPPORTED + fprintf(stderr, " -optimize Optimize Huffman table (smaller file, but slow compression)\n"); +#endif +#ifdef C_PROGRESSIVE_SUPPORTED + fprintf(stderr, " -progressive Create progressive JPEG file\n"); +#endif + fprintf(stderr, "Switches for advanced users:\n"); + fprintf(stderr, " -restart N Set restart interval in rows, or in blocks with B\n"); + fprintf(stderr, " -maxmemory N Maximum memory to use (in kbytes)\n"); + fprintf(stderr, " -outfile name Specify name for output file\n"); + fprintf(stderr, " -verbose or -debug Emit debug output\n"); + fprintf(stderr, "Switches for wizards:\n"); +#ifdef C_ARITH_CODING_SUPPORTED + fprintf(stderr, " -arithmetic Use arithmetic coding\n"); +#endif +#ifdef C_MULTISCAN_FILES_SUPPORTED + fprintf(stderr, " -scans file Create multi-scan JPEG per script file\n"); +#endif + exit(EXIT_FAILURE); +} + + +LOCAL(int) +parse_switches (j_compress_ptr cinfo, int argc, char **argv, + int last_file_arg_seen, boolean for_real) +/* Parse optional switches. + * Returns argv[] index of first file-name argument (== argc if none). + * Any file names with indexes <= last_file_arg_seen are ignored; + * they have presumably been processed in a previous iteration. + * (Pass 0 for last_file_arg_seen on the first or only iteration.) + * for_real is FALSE on the first (dummy) pass; we may skip any expensive + * processing. + */ +{ + int argn; + char * arg; + boolean simple_progressive; + char * scansarg = NULL; /* saves -scans parm if any */ + + /* Set up default JPEG parameters. */ + simple_progressive = FALSE; + outfilename = NULL; + cinfo->err->trace_level = 0; + + /* Scan command line options, adjust parameters */ + + for (argn = 1; argn < argc; argn++) { + arg = argv[argn]; + if (*arg != '-') { + /* Not a switch, must be a file name argument */ + if (argn <= last_file_arg_seen) { + outfilename = NULL; /* -outfile applies to just one input file */ + continue; /* ignore this name if previously processed */ + } + break; /* else done parsing switches */ + } + arg++; /* advance past switch marker character */ + + if (keymatch(arg, "arithmetic", 1)) { + /* Use arithmetic coding. */ +#ifdef C_ARITH_CODING_SUPPORTED + cinfo->arith_code = TRUE; +#else + fprintf(stderr, "%s: sorry, arithmetic coding not supported\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "debug", 1) || keymatch(arg, "verbose", 1)) { + /* Enable debug printouts. */ + /* On first -d, print version identification */ + static boolean printed_version = FALSE; + + if (! printed_version) { + fprintf(stderr, "Independent JPEG Group's JPEGTRAN, version %s\n%s\n", + JVERSION, JCOPYRIGHT); + printed_version = TRUE; + } + cinfo->err->trace_level++; + + } else if (keymatch(arg, "maxmemory", 3)) { + /* Maximum memory in Kb (or Mb with 'm'). */ + long lval; + char ch = 'x'; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) + usage(); + if (ch == 'm' || ch == 'M') + lval *= 1000L; + cinfo->mem->max_memory_to_use = lval * 1000L; + + } else if (keymatch(arg, "optimize", 1) || keymatch(arg, "optimise", 1)) { + /* Enable entropy parm optimization. */ +#ifdef ENTROPY_OPT_SUPPORTED + cinfo->optimize_coding = TRUE; +#else + fprintf(stderr, "%s: sorry, entropy optimization was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "outfile", 4)) { + /* Set output file name. */ + if (++argn >= argc) /* advance to next argument */ + usage(); + outfilename = argv[argn]; /* save it away for later use */ + + } else if (keymatch(arg, "progressive", 1)) { + /* Select simple progressive mode. */ +#ifdef C_PROGRESSIVE_SUPPORTED + simple_progressive = TRUE; + /* We must postpone execution until num_components is known. */ +#else + fprintf(stderr, "%s: sorry, progressive output was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else if (keymatch(arg, "restart", 1)) { + /* Restart interval in MCU rows (or in MCUs with 'b'). */ + long lval; + char ch = 'x'; + + if (++argn >= argc) /* advance to next argument */ + usage(); + if (sscanf(argv[argn], "%ld%c", &lval, &ch) < 1) + usage(); + if (lval < 0 || lval > 65535L) + usage(); + if (ch == 'b' || ch == 'B') { + cinfo->restart_interval = (unsigned int) lval; + cinfo->restart_in_rows = 0; /* else prior '-restart n' overrides me */ + } else { + cinfo->restart_in_rows = (int) lval; + /* restart_interval will be computed during startup */ + } + + } else if (keymatch(arg, "scans", 2)) { + /* Set scan script. */ +#ifdef C_MULTISCAN_FILES_SUPPORTED + if (++argn >= argc) /* advance to next argument */ + usage(); + scansarg = argv[argn]; + /* We must postpone reading the file in case -progressive appears. */ +#else + fprintf(stderr, "%s: sorry, multi-scan output was not compiled\n", + progname); + exit(EXIT_FAILURE); +#endif + + } else { + usage(); /* bogus switch */ + } + } + + /* Post-switch-scanning cleanup */ + + if (for_real) { + +#ifdef C_PROGRESSIVE_SUPPORTED + if (simple_progressive) /* process -progressive; -scans can override */ + jpeg_simple_progression(cinfo); +#endif + +#ifdef C_MULTISCAN_FILES_SUPPORTED + if (scansarg != NULL) /* process -scans if it was present */ + if (! read_scan_script(cinfo, scansarg)) + usage(); +#endif + } + + return argn; /* return index of next arg (file name) */ +} + + +/* + * The main program. + */ + +int +main (int argc, char **argv) +{ + struct jpeg_decompress_struct srcinfo; + struct jpeg_compress_struct dstinfo; + struct jpeg_error_mgr jsrcerr, jdsterr; +#ifdef PROGRESS_REPORT + struct cdjpeg_progress_mgr progress; +#endif + jvirt_barray_ptr * coef_arrays; + int file_index; + FILE * input_file; + FILE * output_file; + + /* On Mac, fetch a command line. */ +#ifdef USE_CCOMMAND + argc = ccommand(&argv); +#endif + + progname = argv[0]; + if (progname == NULL || progname[0] == 0) + progname = "jpegtran"; /* in case C library doesn't provide it */ + + /* Initialize the JPEG decompression object with default error handling. */ + srcinfo.err = jpeg_std_error(&jsrcerr); + jpeg_create_decompress(&srcinfo); + /* Initialize the JPEG compression object with default error handling. */ + dstinfo.err = jpeg_std_error(&jdsterr); + jpeg_create_compress(&dstinfo); + + /* Now safe to enable signal catcher. + * Note: we assume only the decompression object will have virtual arrays. + */ +#ifdef NEED_SIGNAL_CATCHER + enable_signal_catcher((j_common_ptr) &srcinfo); +#endif + + /* Scan command line to find file names. + * It is convenient to use just one switch-parsing routine, but the switch + * values read here are ignored; we will rescan the switches after opening + * the input file. + */ + + file_index = parse_switches(&dstinfo, argc, argv, 0, FALSE); + jsrcerr.trace_level = jdsterr.trace_level; + srcinfo.mem->max_memory_to_use = dstinfo.mem->max_memory_to_use; + +#ifdef TWO_FILE_COMMANDLINE + /* Must have either -outfile switch or explicit output file name */ + if (outfilename == NULL) { + if (file_index != argc-2) { + fprintf(stderr, "%s: must name one input and one output file\n", + progname); + usage(); + } + outfilename = argv[file_index+1]; + } else { + if (file_index != argc-1) { + fprintf(stderr, "%s: must name one input and one output file\n", + progname); + usage(); + } + } +#else + /* Unix style: expect zero or one file name */ + if (file_index < argc-1) { + fprintf(stderr, "%s: only one input file\n", progname); + usage(); + } +#endif /* TWO_FILE_COMMANDLINE */ + + /* Open the input file. */ + if (file_index < argc) { + if ((input_file = fopen(argv[file_index], READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[file_index]); + exit(EXIT_FAILURE); + } + } else { + /* default input file is stdin */ + input_file = read_stdin(); + } + + /* Open the output file. */ + if (outfilename != NULL) { + if ((output_file = fopen(outfilename, WRITE_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, outfilename); + exit(EXIT_FAILURE); + } + } else { + /* default output file is stdout */ + output_file = write_stdout(); + } + +#ifdef PROGRESS_REPORT + start_progress_monitor((j_common_ptr) &dstinfo, &progress); +#endif + + /* Specify data source for decompression */ + jpeg_stdio_src(&srcinfo, input_file); + + /* Read file header */ + (void) jpeg_read_header(&srcinfo, TRUE); + + /* Read source file as DCT coefficients */ + coef_arrays = jpeg_read_coefficients(&srcinfo); + + /* Initialize destination compression parameters from source values */ + jpeg_copy_critical_parameters(&srcinfo, &dstinfo); + + /* Adjust default compression parameters by re-parsing the options */ + file_index = parse_switches(&dstinfo, argc, argv, 0, TRUE); + + /* Specify data destination for compression */ + jpeg_stdio_dest(&dstinfo, output_file); + + /* Start compressor */ + jpeg_write_coefficients(&dstinfo, coef_arrays); + + /* ought to copy source comments here... */ + + /* Finish compression and release memory */ + jpeg_finish_compress(&dstinfo); + jpeg_destroy_compress(&dstinfo); + (void) jpeg_finish_decompress(&srcinfo); + jpeg_destroy_decompress(&srcinfo); + + /* Close files, if we opened them */ + if (input_file != stdin) + fclose(input_file); + if (output_file != stdout) + fclose(output_file); + +#ifdef PROGRESS_REPORT + end_progress_monitor((j_common_ptr) &dstinfo); +#endif + + /* All done. */ + exit(jsrcerr.num_warnings + jdsterr.num_warnings ?EXIT_WARNING:EXIT_SUCCESS); + return 0; /* suppress no-return-value warnings */ +} diff --git a/windows_libs/jpeg-6a/jquant1.c b/windows_libs/jpeg-6a/jquant1.c new file mode 100644 index 00000000..b2f96aa1 --- /dev/null +++ b/windows_libs/jpeg-6a/jquant1.c @@ -0,0 +1,856 @@ +/* + * jquant1.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains 1-pass color quantization (color mapping) routines. + * These routines provide mapping to a fixed color map using equally spaced + * color values. Optional Floyd-Steinberg or ordered dithering is available. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +#ifdef QUANT_1PASS_SUPPORTED + + +/* + * The main purpose of 1-pass quantization is to provide a fast, if not very + * high quality, colormapped output capability. A 2-pass quantizer usually + * gives better visual quality; however, for quantized grayscale output this + * quantizer is perfectly adequate. Dithering is highly recommended with this + * quantizer, though you can turn it off if you really want to. + * + * In 1-pass quantization the colormap must be chosen in advance of seeing the + * image. We use a map consisting of all combinations of Ncolors[i] color + * values for the i'th component. The Ncolors[] values are chosen so that + * their product, the total number of colors, is no more than that requested. + * (In most cases, the product will be somewhat less.) + * + * Since the colormap is orthogonal, the representative value for each color + * component can be determined without considering the other components; + * then these indexes can be combined into a colormap index by a standard + * N-dimensional-array-subscript calculation. Most of the arithmetic involved + * can be precalculated and stored in the lookup table colorindex[]. + * colorindex[i][j] maps pixel value j in component i to the nearest + * representative value (grid plane) for that component; this index is + * multiplied by the array stride for component i, so that the + * index of the colormap entry closest to a given pixel value is just + * sum( colorindex[component-number][pixel-component-value] ) + * Aside from being fast, this scheme allows for variable spacing between + * representative values with no additional lookup cost. + * + * If gamma correction has been applied in color conversion, it might be wise + * to adjust the color grid spacing so that the representative colors are + * equidistant in linear space. At this writing, gamma correction is not + * implemented by jdcolor, so nothing is done here. + */ + + +/* Declarations for ordered dithering. + * + * We use a standard 16x16 ordered dither array. The basic concept of ordered + * dithering is described in many references, for instance Dale Schumacher's + * chapter II.2 of Graphics Gems II (James Arvo, ed. Academic Press, 1991). + * In place of Schumacher's comparisons against a "threshold" value, we add a + * "dither" value to the input pixel and then round the result to the nearest + * output value. The dither value is equivalent to (0.5 - threshold) times + * the distance between output values. For ordered dithering, we assume that + * the output colors are equally spaced; if not, results will probably be + * worse, since the dither may be too much or too little at a given point. + * + * The normal calculation would be to form pixel value + dither, range-limit + * this to 0..MAXJSAMPLE, and then index into the colorindex table as usual. + * We can skip the separate range-limiting step by extending the colorindex + * table in both directions. + */ + +#define ODITHER_SIZE 16 /* dimension of dither matrix */ +/* NB: if ODITHER_SIZE is not a power of 2, ODITHER_MASK uses will break */ +#define ODITHER_CELLS (ODITHER_SIZE*ODITHER_SIZE) /* # cells in matrix */ +#define ODITHER_MASK (ODITHER_SIZE-1) /* mask for wrapping around counters */ + +typedef int ODITHER_MATRIX[ODITHER_SIZE][ODITHER_SIZE]; +typedef int (*ODITHER_MATRIX_PTR)[ODITHER_SIZE]; + +static const UINT8 base_dither_matrix[ODITHER_SIZE][ODITHER_SIZE] = { + /* Bayer's order-4 dither array. Generated by the code given in + * Stephen Hawley's article "Ordered Dithering" in Graphics Gems I. + * The values in this array must range from 0 to ODITHER_CELLS-1. + */ + { 0,192, 48,240, 12,204, 60,252, 3,195, 51,243, 15,207, 63,255 }, + { 128, 64,176,112,140, 76,188,124,131, 67,179,115,143, 79,191,127 }, + { 32,224, 16,208, 44,236, 28,220, 35,227, 19,211, 47,239, 31,223 }, + { 160, 96,144, 80,172,108,156, 92,163, 99,147, 83,175,111,159, 95 }, + { 8,200, 56,248, 4,196, 52,244, 11,203, 59,251, 7,199, 55,247 }, + { 136, 72,184,120,132, 68,180,116,139, 75,187,123,135, 71,183,119 }, + { 40,232, 24,216, 36,228, 20,212, 43,235, 27,219, 39,231, 23,215 }, + { 168,104,152, 88,164,100,148, 84,171,107,155, 91,167,103,151, 87 }, + { 2,194, 50,242, 14,206, 62,254, 1,193, 49,241, 13,205, 61,253 }, + { 130, 66,178,114,142, 78,190,126,129, 65,177,113,141, 77,189,125 }, + { 34,226, 18,210, 46,238, 30,222, 33,225, 17,209, 45,237, 29,221 }, + { 162, 98,146, 82,174,110,158, 94,161, 97,145, 81,173,109,157, 93 }, + { 10,202, 58,250, 6,198, 54,246, 9,201, 57,249, 5,197, 53,245 }, + { 138, 74,186,122,134, 70,182,118,137, 73,185,121,133, 69,181,117 }, + { 42,234, 26,218, 38,230, 22,214, 41,233, 25,217, 37,229, 21,213 }, + { 170,106,154, 90,166,102,150, 86,169,105,153, 89,165,101,149, 85 } +}; + + +/* Declarations for Floyd-Steinberg dithering. + * + * Errors are accumulated into the array fserrors[], at a resolution of + * 1/16th of a pixel count. The error at a given pixel is propagated + * to its not-yet-processed neighbors using the standard F-S fractions, + * ... (here) 7/16 + * 3/16 5/16 1/16 + * We work left-to-right on even rows, right-to-left on odd rows. + * + * We can get away with a single array (holding one row's worth of errors) + * by using it to store the current row's errors at pixel columns not yet + * processed, but the next row's errors at columns already processed. We + * need only a few extra variables to hold the errors immediately around the + * current column. (If we are lucky, those variables are in registers, but + * even if not, they're probably cheaper to access than array elements are.) + * + * The fserrors[] array is indexed [component#][position]. + * We provide (#columns + 2) entries per component; the extra entry at each + * end saves us from special-casing the first and last pixels. + * + * Note: on a wide image, we might not have enough room in a PC's near data + * segment to hold the error array; so it is allocated with alloc_large. + */ + +#if BITS_IN_JSAMPLE == 8 +typedef INT16 FSERROR; /* 16 bits should be enough */ +typedef int LOCFSERROR; /* use 'int' for calculation temps */ +#else +typedef INT32 FSERROR; /* may need more than 16 bits */ +typedef INT32 LOCFSERROR; /* be sure calculation temps are big enough */ +#endif + +typedef FSERROR FAR *FSERRPTR; /* pointer to error array (in FAR storage!) */ + + +/* Private subobject */ + +#define MAX_Q_COMPS 4 /* max components I can handle */ + +typedef struct { + struct jpeg_color_quantizer pub; /* public fields */ + + /* Initially allocated colormap is saved here */ + JSAMPARRAY sv_colormap; /* The color map as a 2-D pixel array */ + int sv_actual; /* number of entries in use */ + + JSAMPARRAY colorindex; /* Precomputed mapping for speed */ + /* colorindex[i][j] = index of color closest to pixel value j in component i, + * premultiplied as described above. Since colormap indexes must fit into + * JSAMPLEs, the entries of this array will too. + */ + boolean is_padded; /* is the colorindex padded for odither? */ + + int Ncolors[MAX_Q_COMPS]; /* # of values alloced to each component */ + + /* Variables for ordered dithering */ + int row_index; /* cur row's vertical index in dither matrix */ + ODITHER_MATRIX_PTR odither[MAX_Q_COMPS]; /* one dither array per component */ + + /* Variables for Floyd-Steinberg dithering */ + FSERRPTR fserrors[MAX_Q_COMPS]; /* accumulated errors */ + boolean on_odd_row; /* flag to remember which row we are on */ +} my_cquantizer; + +typedef my_cquantizer * my_cquantize_ptr; + + +/* + * Policy-making subroutines for create_colormap and create_colorindex. + * These routines determine the colormap to be used. The rest of the module + * only assumes that the colormap is orthogonal. + * + * * select_ncolors decides how to divvy up the available colors + * among the components. + * * output_value defines the set of representative values for a component. + * * largest_input_value defines the mapping from input values to + * representative values for a component. + * Note that the latter two routines may impose different policies for + * different components, though this is not currently done. + */ + + +LOCAL(int) +select_ncolors (j_decompress_ptr cinfo, int Ncolors[]) +/* Determine allocation of desired colors to components, */ +/* and fill in Ncolors[] array to indicate choice. */ +/* Return value is total number of colors (product of Ncolors[] values). */ +{ + int nc = cinfo->out_color_components; /* number of color components */ + int max_colors = cinfo->desired_number_of_colors; + int total_colors, iroot, i, j; + boolean changed; + long temp; + static const int RGB_order[3] = { RGB_GREEN, RGB_RED, RGB_BLUE }; + + /* We can allocate at least the nc'th root of max_colors per component. */ + /* Compute floor(nc'th root of max_colors). */ + iroot = 1; + do { + iroot++; + temp = iroot; /* set temp = iroot ** nc */ + for (i = 1; i < nc; i++) + temp *= iroot; + } while (temp <= (long) max_colors); /* repeat till iroot exceeds root */ + iroot--; /* now iroot = floor(root) */ + + /* Must have at least 2 color values per component */ + if (iroot < 2) + ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, (int) temp); + + /* Initialize to iroot color values for each component */ + total_colors = 1; + for (i = 0; i < nc; i++) { + Ncolors[i] = iroot; + total_colors *= iroot; + } + /* We may be able to increment the count for one or more components without + * exceeding max_colors, though we know not all can be incremented. + * Sometimes, the first component can be incremented more than once! + * (Example: for 16 colors, we start at 2*2*2, go to 3*2*2, then 4*2*2.) + * In RGB colorspace, try to increment G first, then R, then B. + */ + do { + changed = FALSE; + for (i = 0; i < nc; i++) { + j = (cinfo->out_color_space == JCS_RGB ? RGB_order[i] : i); + /* calculate new total_colors if Ncolors[j] is incremented */ + temp = total_colors / Ncolors[j]; + temp *= Ncolors[j]+1; /* done in long arith to avoid oflo */ + if (temp > (long) max_colors) + break; /* won't fit, done with this pass */ + Ncolors[j]++; /* OK, apply the increment */ + total_colors = (int) temp; + changed = TRUE; + } + } while (changed); + + return total_colors; +} + + +LOCAL(int) +output_value (j_decompress_ptr cinfo, int ci, int j, int maxj) +/* Return j'th output value, where j will range from 0 to maxj */ +/* The output values must fall in 0..MAXJSAMPLE in increasing order */ +{ + /* We always provide values 0 and MAXJSAMPLE for each component; + * any additional values are equally spaced between these limits. + * (Forcing the upper and lower values to the limits ensures that + * dithering can't produce a color outside the selected gamut.) + */ + return (int) (((INT32) j * MAXJSAMPLE + maxj/2) / maxj); +} + + +LOCAL(int) +largest_input_value (j_decompress_ptr cinfo, int ci, int j, int maxj) +/* Return largest input value that should map to j'th output value */ +/* Must have largest(j=0) >= 0, and largest(j=maxj) >= MAXJSAMPLE */ +{ + /* Breakpoints are halfway between values returned by output_value */ + return (int) (((INT32) (2*j + 1) * MAXJSAMPLE + maxj) / (2*maxj)); +} + + +/* + * Create the colormap. + */ + +LOCAL(void) +create_colormap (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + JSAMPARRAY colormap; /* Created colormap */ + int total_colors; /* Number of distinct output colors */ + int i,j,k, nci, blksize, blkdist, ptr, val; + + /* Select number of colors for each component */ + total_colors = select_ncolors(cinfo, cquantize->Ncolors); + + /* Report selected color counts */ + if (cinfo->out_color_components == 3) + TRACEMS4(cinfo, 1, JTRC_QUANT_3_NCOLORS, + total_colors, cquantize->Ncolors[0], + cquantize->Ncolors[1], cquantize->Ncolors[2]); + else + TRACEMS1(cinfo, 1, JTRC_QUANT_NCOLORS, total_colors); + + /* Allocate and fill in the colormap. */ + /* The colors are ordered in the map in standard row-major order, */ + /* i.e. rightmost (highest-indexed) color changes most rapidly. */ + + colormap = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) total_colors, (JDIMENSION) cinfo->out_color_components); + + /* blksize is number of adjacent repeated entries for a component */ + /* blkdist is distance between groups of identical entries for a component */ + blkdist = total_colors; + + for (i = 0; i < cinfo->out_color_components; i++) { + /* fill in colormap entries for i'th color component */ + nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ + blksize = blkdist / nci; + for (j = 0; j < nci; j++) { + /* Compute j'th output value (out of nci) for component */ + val = output_value(cinfo, i, j, nci-1); + /* Fill in all colormap entries that have this value of this component */ + for (ptr = j * blksize; ptr < total_colors; ptr += blkdist) { + /* fill in blksize entries beginning at ptr */ + for (k = 0; k < blksize; k++) + colormap[i][ptr+k] = (JSAMPLE) val; + } + } + blkdist = blksize; /* blksize of this color is blkdist of next */ + } + + /* Save the colormap in private storage, + * where it will survive color quantization mode changes. + */ + cquantize->sv_colormap = colormap; + cquantize->sv_actual = total_colors; +} + + +/* + * Create the color index table. + */ + +LOCAL(void) +create_colorindex (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + JSAMPROW indexptr; + int i,j,k, nci, blksize, val, pad; + + /* For ordered dither, we pad the color index tables by MAXJSAMPLE in + * each direction (input index values can be -MAXJSAMPLE .. 2*MAXJSAMPLE). + * This is not necessary in the other dithering modes. However, we + * flag whether it was done in case user changes dithering mode. + */ + if (cinfo->dither_mode == JDITHER_ORDERED) { + pad = MAXJSAMPLE*2; + cquantize->is_padded = TRUE; + } else { + pad = 0; + cquantize->is_padded = FALSE; + } + + cquantize->colorindex = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (MAXJSAMPLE+1 + pad), + (JDIMENSION) cinfo->out_color_components); + + /* blksize is number of adjacent repeated entries for a component */ + blksize = cquantize->sv_actual; + + for (i = 0; i < cinfo->out_color_components; i++) { + /* fill in colorindex entries for i'th color component */ + nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ + blksize = blksize / nci; + + /* adjust colorindex pointers to provide padding at negative indexes. */ + if (pad) + cquantize->colorindex[i] += MAXJSAMPLE; + + /* in loop, val = index of current output value, */ + /* and k = largest j that maps to current val */ + indexptr = cquantize->colorindex[i]; + val = 0; + k = largest_input_value(cinfo, i, 0, nci-1); + for (j = 0; j <= MAXJSAMPLE; j++) { + while (j > k) /* advance val if past boundary */ + k = largest_input_value(cinfo, i, ++val, nci-1); + /* premultiply so that no multiplication needed in main processing */ + indexptr[j] = (JSAMPLE) (val * blksize); + } + /* Pad at both ends if necessary */ + if (pad) + for (j = 1; j <= MAXJSAMPLE; j++) { + indexptr[-j] = indexptr[0]; + indexptr[MAXJSAMPLE+j] = indexptr[MAXJSAMPLE]; + } + } +} + + +/* + * Create an ordered-dither array for a component having ncolors + * distinct output values. + */ + +LOCAL(ODITHER_MATRIX_PTR) +make_odither_array (j_decompress_ptr cinfo, int ncolors) +{ + ODITHER_MATRIX_PTR odither; + int j,k; + INT32 num,den; + + odither = (ODITHER_MATRIX_PTR) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(ODITHER_MATRIX)); + /* The inter-value distance for this color is MAXJSAMPLE/(ncolors-1). + * Hence the dither value for the matrix cell with fill order f + * (f=0..N-1) should be (N-1-2*f)/(2*N) * MAXJSAMPLE/(ncolors-1). + * On 16-bit-int machine, be careful to avoid overflow. + */ + den = 2 * ODITHER_CELLS * ((INT32) (ncolors - 1)); + for (j = 0; j < ODITHER_SIZE; j++) { + for (k = 0; k < ODITHER_SIZE; k++) { + num = ((INT32) (ODITHER_CELLS-1 - 2*((int)base_dither_matrix[j][k]))) + * MAXJSAMPLE; + /* Ensure round towards zero despite C's lack of consistency + * about rounding negative values in integer division... + */ + odither[j][k] = (int) (num<0 ? -((-num)/den) : num/den); + } + } + return odither; +} + + +/* + * Create the ordered-dither tables. + * Components having the same number of representative colors may + * share a dither table. + */ + +LOCAL(void) +create_odither_tables (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + ODITHER_MATRIX_PTR odither; + int i, j, nci; + + for (i = 0; i < cinfo->out_color_components; i++) { + nci = cquantize->Ncolors[i]; /* # of distinct values for this color */ + odither = NULL; /* search for matching prior component */ + for (j = 0; j < i; j++) { + if (nci == cquantize->Ncolors[j]) { + odither = cquantize->odither[j]; + break; + } + } + if (odither == NULL) /* need a new table? */ + odither = make_odither_array(cinfo, nci); + cquantize->odither[i] = odither; + } +} + + +/* + * Map some rows of pixels to the output colormapped representation. + */ + +METHODDEF(void) +color_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* General case, no dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + JSAMPARRAY colorindex = cquantize->colorindex; + register int pixcode, ci; + register JSAMPROW ptrin, ptrout; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + register int nc = cinfo->out_color_components; + + for (row = 0; row < num_rows; row++) { + ptrin = input_buf[row]; + ptrout = output_buf[row]; + for (col = width; col > 0; col--) { + pixcode = 0; + for (ci = 0; ci < nc; ci++) { + pixcode += GETJSAMPLE(colorindex[ci][GETJSAMPLE(*ptrin++)]); + } + *ptrout++ = (JSAMPLE) pixcode; + } + } +} + + +METHODDEF(void) +color_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* Fast path for out_color_components==3, no dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register int pixcode; + register JSAMPROW ptrin, ptrout; + JSAMPROW colorindex0 = cquantize->colorindex[0]; + JSAMPROW colorindex1 = cquantize->colorindex[1]; + JSAMPROW colorindex2 = cquantize->colorindex[2]; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + ptrin = input_buf[row]; + ptrout = output_buf[row]; + for (col = width; col > 0; col--) { + pixcode = GETJSAMPLE(colorindex0[GETJSAMPLE(*ptrin++)]); + pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*ptrin++)]); + pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*ptrin++)]); + *ptrout++ = (JSAMPLE) pixcode; + } + } +} + + +METHODDEF(void) +quantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* General case, with ordered dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register JSAMPROW input_ptr; + register JSAMPROW output_ptr; + JSAMPROW colorindex_ci; + int * dither; /* points to active row of dither matrix */ + int row_index, col_index; /* current indexes into dither matrix */ + int nc = cinfo->out_color_components; + int ci; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + /* Initialize output values to 0 so can process components separately */ + jzero_far((void FAR *) output_buf[row], + (size_t) (width * SIZEOF(JSAMPLE))); + row_index = cquantize->row_index; + for (ci = 0; ci < nc; ci++) { + input_ptr = input_buf[row] + ci; + output_ptr = output_buf[row]; + colorindex_ci = cquantize->colorindex[ci]; + dither = cquantize->odither[ci][row_index]; + col_index = 0; + + for (col = width; col > 0; col--) { + /* Form pixel value + dither, range-limit to 0..MAXJSAMPLE, + * select output value, accumulate into output code for this pixel. + * Range-limiting need not be done explicitly, as we have extended + * the colorindex table to produce the right answers for out-of-range + * inputs. The maximum dither is +- MAXJSAMPLE; this sets the + * required amount of padding. + */ + *output_ptr += colorindex_ci[GETJSAMPLE(*input_ptr)+dither[col_index]]; + input_ptr += nc; + output_ptr++; + col_index = (col_index + 1) & ODITHER_MASK; + } + } + /* Advance row index for next row */ + row_index = (row_index + 1) & ODITHER_MASK; + cquantize->row_index = row_index; + } +} + + +METHODDEF(void) +quantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* Fast path for out_color_components==3, with ordered dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register int pixcode; + register JSAMPROW input_ptr; + register JSAMPROW output_ptr; + JSAMPROW colorindex0 = cquantize->colorindex[0]; + JSAMPROW colorindex1 = cquantize->colorindex[1]; + JSAMPROW colorindex2 = cquantize->colorindex[2]; + int * dither0; /* points to active row of dither matrix */ + int * dither1; + int * dither2; + int row_index, col_index; /* current indexes into dither matrix */ + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + row_index = cquantize->row_index; + input_ptr = input_buf[row]; + output_ptr = output_buf[row]; + dither0 = cquantize->odither[0][row_index]; + dither1 = cquantize->odither[1][row_index]; + dither2 = cquantize->odither[2][row_index]; + col_index = 0; + + for (col = width; col > 0; col--) { + pixcode = GETJSAMPLE(colorindex0[GETJSAMPLE(*input_ptr++) + + dither0[col_index]]); + pixcode += GETJSAMPLE(colorindex1[GETJSAMPLE(*input_ptr++) + + dither1[col_index]]); + pixcode += GETJSAMPLE(colorindex2[GETJSAMPLE(*input_ptr++) + + dither2[col_index]]); + *output_ptr++ = (JSAMPLE) pixcode; + col_index = (col_index + 1) & ODITHER_MASK; + } + row_index = (row_index + 1) & ODITHER_MASK; + cquantize->row_index = row_index; + } +} + + +METHODDEF(void) +quantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf, + JSAMPARRAY output_buf, int num_rows) +/* General case, with Floyd-Steinberg dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + register LOCFSERROR cur; /* current error or pixel value */ + LOCFSERROR belowerr; /* error for pixel below cur */ + LOCFSERROR bpreverr; /* error for below/prev col */ + LOCFSERROR bnexterr; /* error for below/next col */ + LOCFSERROR delta; + register FSERRPTR errorptr; /* => fserrors[] at column before current */ + register JSAMPROW input_ptr; + register JSAMPROW output_ptr; + JSAMPROW colorindex_ci; + JSAMPROW colormap_ci; + int pixcode; + int nc = cinfo->out_color_components; + int dir; /* 1 for left-to-right, -1 for right-to-left */ + int dirnc; /* dir * nc */ + int ci; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + JSAMPLE *range_limit = cinfo->sample_range_limit; + SHIFT_TEMPS + + for (row = 0; row < num_rows; row++) { + /* Initialize output values to 0 so can process components separately */ + jzero_far((void FAR *) output_buf[row], + (size_t) (width * SIZEOF(JSAMPLE))); + for (ci = 0; ci < nc; ci++) { + input_ptr = input_buf[row] + ci; + output_ptr = output_buf[row]; + if (cquantize->on_odd_row) { + /* work right to left in this row */ + input_ptr += (width-1) * nc; /* so point to rightmost pixel */ + output_ptr += width-1; + dir = -1; + dirnc = -nc; + errorptr = cquantize->fserrors[ci] + (width+1); /* => entry after last column */ + } else { + /* work left to right in this row */ + dir = 1; + dirnc = nc; + errorptr = cquantize->fserrors[ci]; /* => entry before first column */ + } + colorindex_ci = cquantize->colorindex[ci]; + colormap_ci = cquantize->sv_colormap[ci]; + /* Preset error values: no error propagated to first pixel from left */ + cur = 0; + /* and no error propagated to row below yet */ + belowerr = bpreverr = 0; + + for (col = width; col > 0; col--) { + /* cur holds the error propagated from the previous pixel on the + * current line. Add the error propagated from the previous line + * to form the complete error correction term for this pixel, and + * round the error term (which is expressed * 16) to an integer. + * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct + * for either sign of the error value. + * Note: errorptr points to *previous* column's array entry. + */ + cur = RIGHT_SHIFT(cur + errorptr[dir] + 8, 4); + /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE. + * The maximum error is +- MAXJSAMPLE; this sets the required size + * of the range_limit array. + */ + cur += GETJSAMPLE(*input_ptr); + cur = GETJSAMPLE(range_limit[cur]); + /* Select output value, accumulate into output code for this pixel */ + pixcode = GETJSAMPLE(colorindex_ci[cur]); + *output_ptr += (JSAMPLE) pixcode; + /* Compute actual representation error at this pixel */ + /* Note: we can do this even though we don't have the final */ + /* pixel code, because the colormap is orthogonal. */ + cur -= GETJSAMPLE(colormap_ci[pixcode]); + /* Compute error fractions to be propagated to adjacent pixels. + * Add these into the running sums, and simultaneously shift the + * next-line error sums left by 1 column. + */ + bnexterr = cur; + delta = cur * 2; + cur += delta; /* form error * 3 */ + errorptr[0] = (FSERROR) (bpreverr + cur); + cur += delta; /* form error * 5 */ + bpreverr = belowerr + cur; + belowerr = bnexterr; + cur += delta; /* form error * 7 */ + /* At this point cur contains the 7/16 error value to be propagated + * to the next pixel on the current line, and all the errors for the + * next line have been shifted over. We are therefore ready to move on. + */ + input_ptr += dirnc; /* advance input ptr to next column */ + output_ptr += dir; /* advance output ptr to next column */ + errorptr += dir; /* advance errorptr to current column */ + } + /* Post-loop cleanup: we must unload the final error value into the + * final fserrors[] entry. Note we need not unload belowerr because + * it is for the dummy column before or after the actual array. + */ + errorptr[0] = (FSERROR) bpreverr; /* unload prev err into array */ + } + cquantize->on_odd_row = (cquantize->on_odd_row ? FALSE : TRUE); + } +} + + +/* + * Allocate workspace for Floyd-Steinberg errors. + */ + +LOCAL(void) +alloc_fs_workspace (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + size_t arraysize; + int i; + + arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR)); + for (i = 0; i < cinfo->out_color_components; i++) { + cquantize->fserrors[i] = (FSERRPTR) + (*cinfo->mem->alloc_large)((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize); + } +} + + +/* + * Initialize for one-pass color quantization. + */ + +METHODDEF(void) +start_pass_1_quant (j_decompress_ptr cinfo, boolean is_pre_scan) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + size_t arraysize; + int i; + + /* Install my colormap. */ + cinfo->colormap = cquantize->sv_colormap; + cinfo->actual_number_of_colors = cquantize->sv_actual; + + /* Initialize for desired dithering mode. */ + switch (cinfo->dither_mode) { + case JDITHER_NONE: + if (cinfo->out_color_components == 3) + cquantize->pub.color_quantize = color_quantize3; + else + cquantize->pub.color_quantize = color_quantize; + break; + case JDITHER_ORDERED: + if (cinfo->out_color_components == 3) + cquantize->pub.color_quantize = quantize3_ord_dither; + else + cquantize->pub.color_quantize = quantize_ord_dither; + cquantize->row_index = 0; /* initialize state for ordered dither */ + /* If user changed to ordered dither from another mode, + * we must recreate the color index table with padding. + * This will cost extra space, but probably isn't very likely. + */ + if (! cquantize->is_padded) + create_colorindex(cinfo); + /* Create ordered-dither tables if we didn't already. */ + if (cquantize->odither[0] == NULL) + create_odither_tables(cinfo); + break; + case JDITHER_FS: + cquantize->pub.color_quantize = quantize_fs_dither; + cquantize->on_odd_row = FALSE; /* initialize state for F-S dither */ + /* Allocate Floyd-Steinberg workspace if didn't already. */ + if (cquantize->fserrors[0] == NULL) + alloc_fs_workspace(cinfo); + /* Initialize the propagated errors to zero. */ + arraysize = (size_t) ((cinfo->output_width + 2) * SIZEOF(FSERROR)); + for (i = 0; i < cinfo->out_color_components; i++) + jzero_far((void FAR *) cquantize->fserrors[i], arraysize); + break; + default: + ERREXIT(cinfo, JERR_NOT_COMPILED); + break; + } +} + + +/* + * Finish up at the end of the pass. + */ + +METHODDEF(void) +finish_pass_1_quant (j_decompress_ptr cinfo) +{ + /* no work in 1-pass case */ +} + + +/* + * Switch to a new external colormap between output passes. + * Shouldn't get to this module! + */ + +METHODDEF(void) +new_color_map_1_quant (j_decompress_ptr cinfo) +{ + ERREXIT(cinfo, JERR_MODE_CHANGE); +} + + +/* + * Module initialization routine for 1-pass color quantization. + */ + +GLOBAL(void) +jinit_1pass_quantizer (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize; + + cquantize = (my_cquantize_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_cquantizer)); + cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize; + cquantize->pub.start_pass = start_pass_1_quant; + cquantize->pub.finish_pass = finish_pass_1_quant; + cquantize->pub.new_color_map = new_color_map_1_quant; + cquantize->fserrors[0] = NULL; /* Flag FS workspace not allocated */ + cquantize->odither[0] = NULL; /* Also flag odither arrays not allocated */ + + /* Make sure my internal arrays won't overflow */ + if (cinfo->out_color_components > MAX_Q_COMPS) + ERREXIT1(cinfo, JERR_QUANT_COMPONENTS, MAX_Q_COMPS); + /* Make sure colormap indexes can be represented by JSAMPLEs */ + if (cinfo->desired_number_of_colors > (MAXJSAMPLE+1)) + ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXJSAMPLE+1); + + /* Create the colormap and color index table. */ + create_colormap(cinfo); + create_colorindex(cinfo); + + /* Allocate Floyd-Steinberg workspace now if requested. + * We do this now since it is FAR storage and may affect the memory + * manager's space calculations. If the user changes to FS dither + * mode in a later pass, we will allocate the space then, and will + * possibly overrun the max_memory_to_use setting. + */ + if (cinfo->dither_mode == JDITHER_FS) + alloc_fs_workspace(cinfo); +} + +#endif /* QUANT_1PASS_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/jquant2.c b/windows_libs/jpeg-6a/jquant2.c new file mode 100644 index 00000000..af601e33 --- /dev/null +++ b/windows_libs/jpeg-6a/jquant2.c @@ -0,0 +1,1310 @@ +/* + * jquant2.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains 2-pass color quantization (color mapping) routines. + * These routines provide selection of a custom color map for an image, + * followed by mapping of the image to that color map, with optional + * Floyd-Steinberg dithering. + * It is also possible to use just the second pass to map to an arbitrary + * externally-given color map. + * + * Note: ordered dithering is not supported, since there isn't any fast + * way to compute intercolor distances; it's unclear that ordered dither's + * fundamental assumptions even hold with an irregularly spaced color map. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + +#ifdef QUANT_2PASS_SUPPORTED + + +/* + * This module implements the well-known Heckbert paradigm for color + * quantization. Most of the ideas used here can be traced back to + * Heckbert's seminal paper + * Heckbert, Paul. "Color Image Quantization for Frame Buffer Display", + * Proc. SIGGRAPH '82, Computer Graphics v.16 #3 (July 1982), pp 297-304. + * + * In the first pass over the image, we accumulate a histogram showing the + * usage count of each possible color. To keep the histogram to a reasonable + * size, we reduce the precision of the input; typical practice is to retain + * 5 or 6 bits per color, so that 8 or 4 different input values are counted + * in the same histogram cell. + * + * Next, the color-selection step begins with a box representing the whole + * color space, and repeatedly splits the "largest" remaining box until we + * have as many boxes as desired colors. Then the mean color in each + * remaining box becomes one of the possible output colors. + * + * The second pass over the image maps each input pixel to the closest output + * color (optionally after applying a Floyd-Steinberg dithering correction). + * This mapping is logically trivial, but making it go fast enough requires + * considerable care. + * + * Heckbert-style quantizers vary a good deal in their policies for choosing + * the "largest" box and deciding where to cut it. The particular policies + * used here have proved out well in experimental comparisons, but better ones + * may yet be found. + * + * In earlier versions of the IJG code, this module quantized in YCbCr color + * space, processing the raw upsampled data without a color conversion step. + * This allowed the color conversion math to be done only once per colormap + * entry, not once per pixel. However, that optimization precluded other + * useful optimizations (such as merging color conversion with upsampling) + * and it also interfered with desired capabilities such as quantizing to an + * externally-supplied colormap. We have therefore abandoned that approach. + * The present code works in the post-conversion color space, typically RGB. + * + * To improve the visual quality of the results, we actually work in scaled + * RGB space, giving G distances more weight than R, and R in turn more than + * B. To do everything in integer math, we must use integer scale factors. + * The 2/3/1 scale factors used here correspond loosely to the relative + * weights of the colors in the NTSC grayscale equation. + * If you want to use this code to quantize a non-RGB color space, you'll + * probably need to change these scale factors. + */ + +#define R_SCALE 2 /* scale R distances by this much */ +#define G_SCALE 3 /* scale G distances by this much */ +#define B_SCALE 1 /* and B by this much */ + +/* Relabel R/G/B as components 0/1/2, respecting the RGB ordering defined + * in jmorecfg.h. As the code stands, it will do the right thing for R,G,B + * and B,G,R orders. If you define some other weird order in jmorecfg.h, + * you'll get compile errors until you extend this logic. In that case + * you'll probably want to tweak the histogram sizes too. + */ + +#if RGB_RED == 0 +#define C0_SCALE R_SCALE +#endif +#if RGB_BLUE == 0 +#define C0_SCALE B_SCALE +#endif +#if RGB_GREEN == 1 +#define C1_SCALE G_SCALE +#endif +#if RGB_RED == 2 +#define C2_SCALE R_SCALE +#endif +#if RGB_BLUE == 2 +#define C2_SCALE B_SCALE +#endif + + +/* + * First we have the histogram data structure and routines for creating it. + * + * The number of bits of precision can be adjusted by changing these symbols. + * We recommend keeping 6 bits for G and 5 each for R and B. + * If you have plenty of memory and cycles, 6 bits all around gives marginally + * better results; if you are short of memory, 5 bits all around will save + * some space but degrade the results. + * To maintain a fully accurate histogram, we'd need to allocate a "long" + * (preferably unsigned long) for each cell. In practice this is overkill; + * we can get by with 16 bits per cell. Few of the cell counts will overflow, + * and clamping those that do overflow to the maximum value will give close- + * enough results. This reduces the recommended histogram size from 256Kb + * to 128Kb, which is a useful savings on PC-class machines. + * (In the second pass the histogram space is re-used for pixel mapping data; + * in that capacity, each cell must be able to store zero to the number of + * desired colors. 16 bits/cell is plenty for that too.) + * Since the JPEG code is intended to run in small memory model on 80x86 + * machines, we can't just allocate the histogram in one chunk. Instead + * of a true 3-D array, we use a row of pointers to 2-D arrays. Each + * pointer corresponds to a C0 value (typically 2^5 = 32 pointers) and + * each 2-D array has 2^6*2^5 = 2048 or 2^6*2^6 = 4096 entries. Note that + * on 80x86 machines, the pointer row is in near memory but the actual + * arrays are in far memory (same arrangement as we use for image arrays). + */ + +#define MAXNUMCOLORS (MAXJSAMPLE+1) /* maximum size of colormap */ + +/* These will do the right thing for either R,G,B or B,G,R color order, + * but you may not like the results for other color orders. + */ +#define HIST_C0_BITS 5 /* bits of precision in R/B histogram */ +#define HIST_C1_BITS 6 /* bits of precision in G histogram */ +#define HIST_C2_BITS 5 /* bits of precision in B/R histogram */ + +/* Number of elements along histogram axes. */ +#define HIST_C0_ELEMS (1<cquantize; + register JSAMPROW ptr; + register histptr histp; + register hist3d histogram = cquantize->histogram; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + ptr = input_buf[row]; + for (col = width; col > 0; col--) { + /* get pixel value and index into the histogram */ + histp = & histogram[GETJSAMPLE(ptr[0]) >> C0_SHIFT] + [GETJSAMPLE(ptr[1]) >> C1_SHIFT] + [GETJSAMPLE(ptr[2]) >> C2_SHIFT]; + /* increment, check for overflow and undo increment if so. */ + if (++(*histp) <= 0) + (*histp)--; + ptr += 3; + } + } +} + + +/* + * Next we have the really interesting routines: selection of a colormap + * given the completed histogram. + * These routines work with a list of "boxes", each representing a rectangular + * subset of the input color space (to histogram precision). + */ + +typedef struct { + /* The bounds of the box (inclusive); expressed as histogram indexes */ + int c0min, c0max; + int c1min, c1max; + int c2min, c2max; + /* The volume (actually 2-norm) of the box */ + INT32 volume; + /* The number of nonzero histogram cells within this box */ + long colorcount; +} box; + +typedef box * boxptr; + + +LOCAL(boxptr) +find_biggest_color_pop (boxptr boxlist, int numboxes) +/* Find the splittable box with the largest color population */ +/* Returns NULL if no splittable boxes remain */ +{ + register boxptr boxp; + register int i; + register long maxc = 0; + boxptr which = NULL; + + for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { + if (boxp->colorcount > maxc && boxp->volume > 0) { + which = boxp; + maxc = boxp->colorcount; + } + } + return which; +} + + +LOCAL(boxptr) +find_biggest_volume (boxptr boxlist, int numboxes) +/* Find the splittable box with the largest (scaled) volume */ +/* Returns NULL if no splittable boxes remain */ +{ + register boxptr boxp; + register int i; + register INT32 maxv = 0; + boxptr which = NULL; + + for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) { + if (boxp->volume > maxv) { + which = boxp; + maxv = boxp->volume; + } + } + return which; +} + + +LOCAL(void) +update_box (j_decompress_ptr cinfo, boxptr boxp) +/* Shrink the min/max bounds of a box to enclose only nonzero elements, */ +/* and recompute its volume and population */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + histptr histp; + int c0,c1,c2; + int c0min,c0max,c1min,c1max,c2min,c2max; + INT32 dist0,dist1,dist2; + long ccount; + + c0min = boxp->c0min; c0max = boxp->c0max; + c1min = boxp->c1min; c1max = boxp->c1max; + c2min = boxp->c2min; c2max = boxp->c2max; + + if (c0max > c0min) + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c0min = c0min = c0; + goto have_c0min; + } + } + have_c0min: + if (c0max > c0min) + for (c0 = c0max; c0 >= c0min; c0--) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c0max = c0max = c0; + goto have_c0max; + } + } + have_c0max: + if (c1max > c1min) + for (c1 = c1min; c1 <= c1max; c1++) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c1min = c1min = c1; + goto have_c1min; + } + } + have_c1min: + if (c1max > c1min) + for (c1 = c1max; c1 >= c1min; c1--) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) + if (*histp++ != 0) { + boxp->c1max = c1max = c1; + goto have_c1max; + } + } + have_c1max: + if (c2max > c2min) + for (c2 = c2min; c2 <= c2max; c2++) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1min][c2]; + for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) + if (*histp != 0) { + boxp->c2min = c2min = c2; + goto have_c2min; + } + } + have_c2min: + if (c2max > c2min) + for (c2 = c2max; c2 >= c2min; c2--) + for (c0 = c0min; c0 <= c0max; c0++) { + histp = & histogram[c0][c1min][c2]; + for (c1 = c1min; c1 <= c1max; c1++, histp += HIST_C2_ELEMS) + if (*histp != 0) { + boxp->c2max = c2max = c2; + goto have_c2max; + } + } + have_c2max: + + /* Update box volume. + * We use 2-norm rather than real volume here; this biases the method + * against making long narrow boxes, and it has the side benefit that + * a box is splittable iff norm > 0. + * Since the differences are expressed in histogram-cell units, + * we have to shift back to JSAMPLE units to get consistent distances; + * after which, we scale according to the selected distance scale factors. + */ + dist0 = ((c0max - c0min) << C0_SHIFT) * C0_SCALE; + dist1 = ((c1max - c1min) << C1_SHIFT) * C1_SCALE; + dist2 = ((c2max - c2min) << C2_SHIFT) * C2_SCALE; + boxp->volume = dist0*dist0 + dist1*dist1 + dist2*dist2; + + /* Now scan remaining volume of box and compute population */ + ccount = 0; + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++, histp++) + if (*histp != 0) { + ccount++; + } + } + boxp->colorcount = ccount; +} + + +LOCAL(int) +median_cut (j_decompress_ptr cinfo, boxptr boxlist, int numboxes, + int desired_colors) +/* Repeatedly select and split the largest box until we have enough boxes */ +{ + int n,lb; + int c0,c1,c2,cmax; + register boxptr b1,b2; + + while (numboxes < desired_colors) { + /* Select box to split. + * Current algorithm: by population for first half, then by volume. + */ + if (numboxes*2 <= desired_colors) { + b1 = find_biggest_color_pop(boxlist, numboxes); + } else { + b1 = find_biggest_volume(boxlist, numboxes); + } + if (b1 == NULL) /* no splittable boxes left! */ + break; + b2 = &boxlist[numboxes]; /* where new box will go */ + /* Copy the color bounds to the new box. */ + b2->c0max = b1->c0max; b2->c1max = b1->c1max; b2->c2max = b1->c2max; + b2->c0min = b1->c0min; b2->c1min = b1->c1min; b2->c2min = b1->c2min; + /* Choose which axis to split the box on. + * Current algorithm: longest scaled axis. + * See notes in update_box about scaling distances. + */ + c0 = ((b1->c0max - b1->c0min) << C0_SHIFT) * C0_SCALE; + c1 = ((b1->c1max - b1->c1min) << C1_SHIFT) * C1_SCALE; + c2 = ((b1->c2max - b1->c2min) << C2_SHIFT) * C2_SCALE; + /* We want to break any ties in favor of green, then red, blue last. + * This code does the right thing for R,G,B or B,G,R color orders only. + */ +#if RGB_RED == 0 + cmax = c1; n = 1; + if (c0 > cmax) { cmax = c0; n = 0; } + if (c2 > cmax) { n = 2; } +#else + cmax = c1; n = 1; + if (c2 > cmax) { cmax = c2; n = 2; } + if (c0 > cmax) { n = 0; } +#endif + /* Choose split point along selected axis, and update box bounds. + * Current algorithm: split at halfway point. + * (Since the box has been shrunk to minimum volume, + * any split will produce two nonempty subboxes.) + * Note that lb value is max for lower box, so must be < old max. + */ + switch (n) { + case 0: + lb = (b1->c0max + b1->c0min) / 2; + b1->c0max = lb; + b2->c0min = lb+1; + break; + case 1: + lb = (b1->c1max + b1->c1min) / 2; + b1->c1max = lb; + b2->c1min = lb+1; + break; + case 2: + lb = (b1->c2max + b1->c2min) / 2; + b1->c2max = lb; + b2->c2min = lb+1; + break; + } + /* Update stats for boxes */ + update_box(cinfo, b1); + update_box(cinfo, b2); + numboxes++; + } + return numboxes; +} + + +LOCAL(void) +compute_color (j_decompress_ptr cinfo, boxptr boxp, int icolor) +/* Compute representative color for a box, put it in colormap[icolor] */ +{ + /* Current algorithm: mean weighted by pixels (not colors) */ + /* Note it is important to get the rounding correct! */ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + histptr histp; + int c0,c1,c2; + int c0min,c0max,c1min,c1max,c2min,c2max; + long count; + long total = 0; + long c0total = 0; + long c1total = 0; + long c2total = 0; + + c0min = boxp->c0min; c0max = boxp->c0max; + c1min = boxp->c1min; c1max = boxp->c1max; + c2min = boxp->c2min; c2max = boxp->c2max; + + for (c0 = c0min; c0 <= c0max; c0++) + for (c1 = c1min; c1 <= c1max; c1++) { + histp = & histogram[c0][c1][c2min]; + for (c2 = c2min; c2 <= c2max; c2++) { + if ((count = *histp++) != 0) { + total += count; + c0total += ((c0 << C0_SHIFT) + ((1<>1)) * count; + c1total += ((c1 << C1_SHIFT) + ((1<>1)) * count; + c2total += ((c2 << C2_SHIFT) + ((1<>1)) * count; + } + } + } + + cinfo->colormap[0][icolor] = (JSAMPLE) ((c0total + (total>>1)) / total); + cinfo->colormap[1][icolor] = (JSAMPLE) ((c1total + (total>>1)) / total); + cinfo->colormap[2][icolor] = (JSAMPLE) ((c2total + (total>>1)) / total); +} + + +LOCAL(void) +select_colors (j_decompress_ptr cinfo, int desired_colors) +/* Master routine for color selection */ +{ + boxptr boxlist; + int numboxes; + int i; + + /* Allocate workspace for box list */ + boxlist = (boxptr) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, desired_colors * SIZEOF(box)); + /* Initialize one box containing whole space */ + numboxes = 1; + boxlist[0].c0min = 0; + boxlist[0].c0max = MAXJSAMPLE >> C0_SHIFT; + boxlist[0].c1min = 0; + boxlist[0].c1max = MAXJSAMPLE >> C1_SHIFT; + boxlist[0].c2min = 0; + boxlist[0].c2max = MAXJSAMPLE >> C2_SHIFT; + /* Shrink it to actually-used volume and set its statistics */ + update_box(cinfo, & boxlist[0]); + /* Perform median-cut to produce final box list */ + numboxes = median_cut(cinfo, boxlist, numboxes, desired_colors); + /* Compute the representative color for each box, fill colormap */ + for (i = 0; i < numboxes; i++) + compute_color(cinfo, & boxlist[i], i); + cinfo->actual_number_of_colors = numboxes; + TRACEMS1(cinfo, 1, JTRC_QUANT_SELECTED, numboxes); +} + + +/* + * These routines are concerned with the time-critical task of mapping input + * colors to the nearest color in the selected colormap. + * + * We re-use the histogram space as an "inverse color map", essentially a + * cache for the results of nearest-color searches. All colors within a + * histogram cell will be mapped to the same colormap entry, namely the one + * closest to the cell's center. This may not be quite the closest entry to + * the actual input color, but it's almost as good. A zero in the cache + * indicates we haven't found the nearest color for that cell yet; the array + * is cleared to zeroes before starting the mapping pass. When we find the + * nearest color for a cell, its colormap index plus one is recorded in the + * cache for future use. The pass2 scanning routines call fill_inverse_cmap + * when they need to use an unfilled entry in the cache. + * + * Our method of efficiently finding nearest colors is based on the "locally + * sorted search" idea described by Heckbert and on the incremental distance + * calculation described by Spencer W. Thomas in chapter III.1 of Graphics + * Gems II (James Arvo, ed. Academic Press, 1991). Thomas points out that + * the distances from a given colormap entry to each cell of the histogram can + * be computed quickly using an incremental method: the differences between + * distances to adjacent cells themselves differ by a constant. This allows a + * fairly fast implementation of the "brute force" approach of computing the + * distance from every colormap entry to every histogram cell. Unfortunately, + * it needs a work array to hold the best-distance-so-far for each histogram + * cell (because the inner loop has to be over cells, not colormap entries). + * The work array elements have to be INT32s, so the work array would need + * 256Kb at our recommended precision. This is not feasible in DOS machines. + * + * To get around these problems, we apply Thomas' method to compute the + * nearest colors for only the cells within a small subbox of the histogram. + * The work array need be only as big as the subbox, so the memory usage + * problem is solved. Furthermore, we need not fill subboxes that are never + * referenced in pass2; many images use only part of the color gamut, so a + * fair amount of work is saved. An additional advantage of this + * approach is that we can apply Heckbert's locality criterion to quickly + * eliminate colormap entries that are far away from the subbox; typically + * three-fourths of the colormap entries are rejected by Heckbert's criterion, + * and we need not compute their distances to individual cells in the subbox. + * The speed of this approach is heavily influenced by the subbox size: too + * small means too much overhead, too big loses because Heckbert's criterion + * can't eliminate as many colormap entries. Empirically the best subbox + * size seems to be about 1/512th of the histogram (1/8th in each direction). + * + * Thomas' article also describes a refined method which is asymptotically + * faster than the brute-force method, but it is also far more complex and + * cannot efficiently be applied to small subboxes. It is therefore not + * useful for programs intended to be portable to DOS machines. On machines + * with plenty of memory, filling the whole histogram in one shot with Thomas' + * refined method might be faster than the present code --- but then again, + * it might not be any faster, and it's certainly more complicated. + */ + + +/* log2(histogram cells in update box) for each axis; this can be adjusted */ +#define BOX_C0_LOG (HIST_C0_BITS-3) +#define BOX_C1_LOG (HIST_C1_BITS-3) +#define BOX_C2_LOG (HIST_C2_BITS-3) + +#define BOX_C0_ELEMS (1<actual_number_of_colors; + int maxc0, maxc1, maxc2; + int centerc0, centerc1, centerc2; + int i, x, ncolors; + INT32 minmaxdist, min_dist, max_dist, tdist; + INT32 mindist[MAXNUMCOLORS]; /* min distance to colormap entry i */ + + /* Compute true coordinates of update box's upper corner and center. + * Actually we compute the coordinates of the center of the upper-corner + * histogram cell, which are the upper bounds of the volume we care about. + * Note that since ">>" rounds down, the "center" values may be closer to + * min than to max; hence comparisons to them must be "<=", not "<". + */ + maxc0 = minc0 + ((1 << BOX_C0_SHIFT) - (1 << C0_SHIFT)); + centerc0 = (minc0 + maxc0) >> 1; + maxc1 = minc1 + ((1 << BOX_C1_SHIFT) - (1 << C1_SHIFT)); + centerc1 = (minc1 + maxc1) >> 1; + maxc2 = minc2 + ((1 << BOX_C2_SHIFT) - (1 << C2_SHIFT)); + centerc2 = (minc2 + maxc2) >> 1; + + /* For each color in colormap, find: + * 1. its minimum squared-distance to any point in the update box + * (zero if color is within update box); + * 2. its maximum squared-distance to any point in the update box. + * Both of these can be found by considering only the corners of the box. + * We save the minimum distance for each color in mindist[]; + * only the smallest maximum distance is of interest. + */ + minmaxdist = 0x7FFFFFFFL; + + for (i = 0; i < numcolors; i++) { + /* We compute the squared-c0-distance term, then add in the other two. */ + x = GETJSAMPLE(cinfo->colormap[0][i]); + if (x < minc0) { + tdist = (x - minc0) * C0_SCALE; + min_dist = tdist*tdist; + tdist = (x - maxc0) * C0_SCALE; + max_dist = tdist*tdist; + } else if (x > maxc0) { + tdist = (x - maxc0) * C0_SCALE; + min_dist = tdist*tdist; + tdist = (x - minc0) * C0_SCALE; + max_dist = tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + min_dist = 0; + if (x <= centerc0) { + tdist = (x - maxc0) * C0_SCALE; + max_dist = tdist*tdist; + } else { + tdist = (x - minc0) * C0_SCALE; + max_dist = tdist*tdist; + } + } + + x = GETJSAMPLE(cinfo->colormap[1][i]); + if (x < minc1) { + tdist = (x - minc1) * C1_SCALE; + min_dist += tdist*tdist; + tdist = (x - maxc1) * C1_SCALE; + max_dist += tdist*tdist; + } else if (x > maxc1) { + tdist = (x - maxc1) * C1_SCALE; + min_dist += tdist*tdist; + tdist = (x - minc1) * C1_SCALE; + max_dist += tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + if (x <= centerc1) { + tdist = (x - maxc1) * C1_SCALE; + max_dist += tdist*tdist; + } else { + tdist = (x - minc1) * C1_SCALE; + max_dist += tdist*tdist; + } + } + + x = GETJSAMPLE(cinfo->colormap[2][i]); + if (x < minc2) { + tdist = (x - minc2) * C2_SCALE; + min_dist += tdist*tdist; + tdist = (x - maxc2) * C2_SCALE; + max_dist += tdist*tdist; + } else if (x > maxc2) { + tdist = (x - maxc2) * C2_SCALE; + min_dist += tdist*tdist; + tdist = (x - minc2) * C2_SCALE; + max_dist += tdist*tdist; + } else { + /* within cell range so no contribution to min_dist */ + if (x <= centerc2) { + tdist = (x - maxc2) * C2_SCALE; + max_dist += tdist*tdist; + } else { + tdist = (x - minc2) * C2_SCALE; + max_dist += tdist*tdist; + } + } + + mindist[i] = min_dist; /* save away the results */ + if (max_dist < minmaxdist) + minmaxdist = max_dist; + } + + /* Now we know that no cell in the update box is more than minmaxdist + * away from some colormap entry. Therefore, only colors that are + * within minmaxdist of some part of the box need be considered. + */ + ncolors = 0; + for (i = 0; i < numcolors; i++) { + if (mindist[i] <= minmaxdist) + colorlist[ncolors++] = (JSAMPLE) i; + } + return ncolors; +} + + +LOCAL(void) +find_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2, + int numcolors, JSAMPLE colorlist[], JSAMPLE bestcolor[]) +/* Find the closest colormap entry for each cell in the update box, + * given the list of candidate colors prepared by find_nearby_colors. + * Return the indexes of the closest entries in the bestcolor[] array. + * This routine uses Thomas' incremental distance calculation method to + * find the distance from a colormap entry to successive cells in the box. + */ +{ + int ic0, ic1, ic2; + int i, icolor; + register INT32 * bptr; /* pointer into bestdist[] array */ + JSAMPLE * cptr; /* pointer into bestcolor[] array */ + INT32 dist0, dist1; /* initial distance values */ + register INT32 dist2; /* current distance in inner loop */ + INT32 xx0, xx1; /* distance increments */ + register INT32 xx2; + INT32 inc0, inc1, inc2; /* initial values for increments */ + /* This array holds the distance to the nearest-so-far color for each cell */ + INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; + + /* Initialize best-distance for each cell of the update box */ + bptr = bestdist; + for (i = BOX_C0_ELEMS*BOX_C1_ELEMS*BOX_C2_ELEMS-1; i >= 0; i--) + *bptr++ = 0x7FFFFFFFL; + + /* For each color selected by find_nearby_colors, + * compute its distance to the center of each cell in the box. + * If that's less than best-so-far, update best distance and color number. + */ + + /* Nominal steps between cell centers ("x" in Thomas article) */ +#define STEP_C0 ((1 << C0_SHIFT) * C0_SCALE) +#define STEP_C1 ((1 << C1_SHIFT) * C1_SCALE) +#define STEP_C2 ((1 << C2_SHIFT) * C2_SCALE) + + for (i = 0; i < numcolors; i++) { + icolor = GETJSAMPLE(colorlist[i]); + /* Compute (square of) distance from minc0/c1/c2 to this color */ + inc0 = (minc0 - GETJSAMPLE(cinfo->colormap[0][icolor])) * C0_SCALE; + dist0 = inc0*inc0; + inc1 = (minc1 - GETJSAMPLE(cinfo->colormap[1][icolor])) * C1_SCALE; + dist0 += inc1*inc1; + inc2 = (minc2 - GETJSAMPLE(cinfo->colormap[2][icolor])) * C2_SCALE; + dist0 += inc2*inc2; + /* Form the initial difference increments */ + inc0 = inc0 * (2 * STEP_C0) + STEP_C0 * STEP_C0; + inc1 = inc1 * (2 * STEP_C1) + STEP_C1 * STEP_C1; + inc2 = inc2 * (2 * STEP_C2) + STEP_C2 * STEP_C2; + /* Now loop over all cells in box, updating distance per Thomas method */ + bptr = bestdist; + cptr = bestcolor; + xx0 = inc0; + for (ic0 = BOX_C0_ELEMS-1; ic0 >= 0; ic0--) { + dist1 = dist0; + xx1 = inc1; + for (ic1 = BOX_C1_ELEMS-1; ic1 >= 0; ic1--) { + dist2 = dist1; + xx2 = inc2; + for (ic2 = BOX_C2_ELEMS-1; ic2 >= 0; ic2--) { + if (dist2 < *bptr) { + *bptr = dist2; + *cptr = (JSAMPLE) icolor; + } + dist2 += xx2; + xx2 += 2 * STEP_C2 * STEP_C2; + bptr++; + cptr++; + } + dist1 += xx1; + xx1 += 2 * STEP_C1 * STEP_C1; + } + dist0 += xx0; + xx0 += 2 * STEP_C0 * STEP_C0; + } + } +} + + +LOCAL(void) +fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2) +/* Fill the inverse-colormap entries in the update box that contains */ +/* histogram cell c0/c1/c2. (Only that one cell MUST be filled, but */ +/* we can fill as many others as we wish.) */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + int minc0, minc1, minc2; /* lower left corner of update box */ + int ic0, ic1, ic2; + register JSAMPLE * cptr; /* pointer into bestcolor[] array */ + register histptr cachep; /* pointer into main cache array */ + /* This array lists the candidate colormap indexes. */ + JSAMPLE colorlist[MAXNUMCOLORS]; + int numcolors; /* number of candidate colors */ + /* This array holds the actually closest colormap index for each cell. */ + JSAMPLE bestcolor[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS]; + + /* Convert cell coordinates to update box ID */ + c0 >>= BOX_C0_LOG; + c1 >>= BOX_C1_LOG; + c2 >>= BOX_C2_LOG; + + /* Compute true coordinates of update box's origin corner. + * Actually we compute the coordinates of the center of the corner + * histogram cell, which are the lower bounds of the volume we care about. + */ + minc0 = (c0 << BOX_C0_SHIFT) + ((1 << C0_SHIFT) >> 1); + minc1 = (c1 << BOX_C1_SHIFT) + ((1 << C1_SHIFT) >> 1); + minc2 = (c2 << BOX_C2_SHIFT) + ((1 << C2_SHIFT) >> 1); + + /* Determine which colormap entries are close enough to be candidates + * for the nearest entry to some cell in the update box. + */ + numcolors = find_nearby_colors(cinfo, minc0, minc1, minc2, colorlist); + + /* Determine the actually nearest colors. */ + find_best_colors(cinfo, minc0, minc1, minc2, numcolors, colorlist, + bestcolor); + + /* Save the best color numbers (plus 1) in the main cache array */ + c0 <<= BOX_C0_LOG; /* convert ID back to base cell indexes */ + c1 <<= BOX_C1_LOG; + c2 <<= BOX_C2_LOG; + cptr = bestcolor; + for (ic0 = 0; ic0 < BOX_C0_ELEMS; ic0++) { + for (ic1 = 0; ic1 < BOX_C1_ELEMS; ic1++) { + cachep = & histogram[c0+ic0][c1+ic1][c2]; + for (ic2 = 0; ic2 < BOX_C2_ELEMS; ic2++) { + *cachep++ = (histcell) (GETJSAMPLE(*cptr++) + 1); + } + } + } +} + + +/* + * Map some rows of pixels to the output colormapped representation. + */ + +METHODDEF(void) +pass2_no_dither (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) +/* This version performs no dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + register JSAMPROW inptr, outptr; + register histptr cachep; + register int c0, c1, c2; + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + + for (row = 0; row < num_rows; row++) { + inptr = input_buf[row]; + outptr = output_buf[row]; + for (col = width; col > 0; col--) { + /* get pixel value and index into the cache */ + c0 = GETJSAMPLE(*inptr++) >> C0_SHIFT; + c1 = GETJSAMPLE(*inptr++) >> C1_SHIFT; + c2 = GETJSAMPLE(*inptr++) >> C2_SHIFT; + cachep = & histogram[c0][c1][c2]; + /* If we have not seen this color before, find nearest colormap entry */ + /* and update the cache */ + if (*cachep == 0) + fill_inverse_cmap(cinfo, c0,c1,c2); + /* Now emit the colormap index for this cell */ + *outptr++ = (JSAMPLE) (*cachep - 1); + } + } +} + + +METHODDEF(void) +pass2_fs_dither (j_decompress_ptr cinfo, + JSAMPARRAY input_buf, JSAMPARRAY output_buf, int num_rows) +/* This version performs Floyd-Steinberg dithering */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + register LOCFSERROR cur0, cur1, cur2; /* current error or pixel value */ + LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */ + LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */ + register FSERRPTR errorptr; /* => fserrors[] at column before current */ + JSAMPROW inptr; /* => current input pixel */ + JSAMPROW outptr; /* => current output pixel */ + histptr cachep; + int dir; /* +1 or -1 depending on direction */ + int dir3; /* 3*dir, for advancing inptr & errorptr */ + int row; + JDIMENSION col; + JDIMENSION width = cinfo->output_width; + JSAMPLE *range_limit = cinfo->sample_range_limit; + int *error_limit = cquantize->error_limiter; + JSAMPROW colormap0 = cinfo->colormap[0]; + JSAMPROW colormap1 = cinfo->colormap[1]; + JSAMPROW colormap2 = cinfo->colormap[2]; + SHIFT_TEMPS + + for (row = 0; row < num_rows; row++) { + inptr = input_buf[row]; + outptr = output_buf[row]; + if (cquantize->on_odd_row) { + /* work right to left in this row */ + inptr += (width-1) * 3; /* so point to rightmost pixel */ + outptr += width-1; + dir = -1; + dir3 = -3; + errorptr = cquantize->fserrors + (width+1)*3; /* => entry after last column */ + cquantize->on_odd_row = FALSE; /* flip for next time */ + } else { + /* work left to right in this row */ + dir = 1; + dir3 = 3; + errorptr = cquantize->fserrors; /* => entry before first real column */ + cquantize->on_odd_row = TRUE; /* flip for next time */ + } + /* Preset error values: no error propagated to first pixel from left */ + cur0 = cur1 = cur2 = 0; + /* and no error propagated to row below yet */ + belowerr0 = belowerr1 = belowerr2 = 0; + bpreverr0 = bpreverr1 = bpreverr2 = 0; + + for (col = width; col > 0; col--) { + /* curN holds the error propagated from the previous pixel on the + * current line. Add the error propagated from the previous line + * to form the complete error correction term for this pixel, and + * round the error term (which is expressed * 16) to an integer. + * RIGHT_SHIFT rounds towards minus infinity, so adding 8 is correct + * for either sign of the error value. + * Note: errorptr points to *previous* column's array entry. + */ + cur0 = RIGHT_SHIFT(cur0 + errorptr[dir3+0] + 8, 4); + cur1 = RIGHT_SHIFT(cur1 + errorptr[dir3+1] + 8, 4); + cur2 = RIGHT_SHIFT(cur2 + errorptr[dir3+2] + 8, 4); + /* Limit the error using transfer function set by init_error_limit. + * See comments with init_error_limit for rationale. + */ + cur0 = error_limit[cur0]; + cur1 = error_limit[cur1]; + cur2 = error_limit[cur2]; + /* Form pixel value + error, and range-limit to 0..MAXJSAMPLE. + * The maximum error is +- MAXJSAMPLE (or less with error limiting); + * this sets the required size of the range_limit array. + */ + cur0 += GETJSAMPLE(inptr[0]); + cur1 += GETJSAMPLE(inptr[1]); + cur2 += GETJSAMPLE(inptr[2]); + cur0 = GETJSAMPLE(range_limit[cur0]); + cur1 = GETJSAMPLE(range_limit[cur1]); + cur2 = GETJSAMPLE(range_limit[cur2]); + /* Index into the cache with adjusted pixel value */ + cachep = & histogram[cur0>>C0_SHIFT][cur1>>C1_SHIFT][cur2>>C2_SHIFT]; + /* If we have not seen this color before, find nearest colormap */ + /* entry and update the cache */ + if (*cachep == 0) + fill_inverse_cmap(cinfo, cur0>>C0_SHIFT,cur1>>C1_SHIFT,cur2>>C2_SHIFT); + /* Now emit the colormap index for this cell */ + { register int pixcode = *cachep - 1; + *outptr = (JSAMPLE) pixcode; + /* Compute representation error for this pixel */ + cur0 -= GETJSAMPLE(colormap0[pixcode]); + cur1 -= GETJSAMPLE(colormap1[pixcode]); + cur2 -= GETJSAMPLE(colormap2[pixcode]); + } + /* Compute error fractions to be propagated to adjacent pixels. + * Add these into the running sums, and simultaneously shift the + * next-line error sums left by 1 column. + */ + { register LOCFSERROR bnexterr, delta; + + bnexterr = cur0; /* Process component 0 */ + delta = cur0 * 2; + cur0 += delta; /* form error * 3 */ + errorptr[0] = (FSERROR) (bpreverr0 + cur0); + cur0 += delta; /* form error * 5 */ + bpreverr0 = belowerr0 + cur0; + belowerr0 = bnexterr; + cur0 += delta; /* form error * 7 */ + bnexterr = cur1; /* Process component 1 */ + delta = cur1 * 2; + cur1 += delta; /* form error * 3 */ + errorptr[1] = (FSERROR) (bpreverr1 + cur1); + cur1 += delta; /* form error * 5 */ + bpreverr1 = belowerr1 + cur1; + belowerr1 = bnexterr; + cur1 += delta; /* form error * 7 */ + bnexterr = cur2; /* Process component 2 */ + delta = cur2 * 2; + cur2 += delta; /* form error * 3 */ + errorptr[2] = (FSERROR) (bpreverr2 + cur2); + cur2 += delta; /* form error * 5 */ + bpreverr2 = belowerr2 + cur2; + belowerr2 = bnexterr; + cur2 += delta; /* form error * 7 */ + } + /* At this point curN contains the 7/16 error value to be propagated + * to the next pixel on the current line, and all the errors for the + * next line have been shifted over. We are therefore ready to move on. + */ + inptr += dir3; /* Advance pixel pointers to next column */ + outptr += dir; + errorptr += dir3; /* advance errorptr to current column */ + } + /* Post-loop cleanup: we must unload the final error values into the + * final fserrors[] entry. Note we need not unload belowerrN because + * it is for the dummy column before or after the actual array. + */ + errorptr[0] = (FSERROR) bpreverr0; /* unload prev errs into array */ + errorptr[1] = (FSERROR) bpreverr1; + errorptr[2] = (FSERROR) bpreverr2; + } +} + + +/* + * Initialize the error-limiting transfer function (lookup table). + * The raw F-S error computation can potentially compute error values of up to + * +- MAXJSAMPLE. But we want the maximum correction applied to a pixel to be + * much less, otherwise obviously wrong pixels will be created. (Typical + * effects include weird fringes at color-area boundaries, isolated bright + * pixels in a dark area, etc.) The standard advice for avoiding this problem + * is to ensure that the "corners" of the color cube are allocated as output + * colors; then repeated errors in the same direction cannot cause cascading + * error buildup. However, that only prevents the error from getting + * completely out of hand; Aaron Giles reports that error limiting improves + * the results even with corner colors allocated. + * A simple clamping of the error values to about +- MAXJSAMPLE/8 works pretty + * well, but the smoother transfer function used below is even better. Thanks + * to Aaron Giles for this idea. + */ + +LOCAL(void) +init_error_limit (j_decompress_ptr cinfo) +/* Allocate and fill in the error_limiter table */ +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + int * table; + int in, out; + + table = (int *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (MAXJSAMPLE*2+1) * SIZEOF(int)); + table += MAXJSAMPLE; /* so can index -MAXJSAMPLE .. +MAXJSAMPLE */ + cquantize->error_limiter = table; + +#define STEPSIZE ((MAXJSAMPLE+1)/16) + /* Map errors 1:1 up to +- MAXJSAMPLE/16 */ + out = 0; + for (in = 0; in < STEPSIZE; in++, out++) { + table[in] = out; table[-in] = -out; + } + /* Map errors 1:2 up to +- 3*MAXJSAMPLE/16 */ + for (; in < STEPSIZE*3; in++, out += (in&1) ? 0 : 1) { + table[in] = out; table[-in] = -out; + } + /* Clamp the rest to final out value (which is (MAXJSAMPLE+1)/8) */ + for (; in <= MAXJSAMPLE; in++) { + table[in] = out; table[-in] = -out; + } +#undef STEPSIZE +} + + +/* + * Finish up at the end of each pass. + */ + +METHODDEF(void) +finish_pass1 (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + + /* Select the representative colors and fill in cinfo->colormap */ + cinfo->colormap = cquantize->sv_colormap; + select_colors(cinfo, cquantize->desired); + /* Force next pass to zero the color index table */ + cquantize->needs_zeroed = TRUE; +} + + +METHODDEF(void) +finish_pass2 (j_decompress_ptr cinfo) +{ + /* no work */ +} + + +/* + * Initialize for each processing pass. + */ + +METHODDEF(void) +start_pass_2_quant (j_decompress_ptr cinfo, boolean is_pre_scan) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + hist3d histogram = cquantize->histogram; + int i; + + /* Only F-S dithering or no dithering is supported. */ + /* If user asks for ordered dither, give him F-S. */ + if (cinfo->dither_mode != JDITHER_NONE) + cinfo->dither_mode = JDITHER_FS; + + if (is_pre_scan) { + /* Set up method pointers */ + cquantize->pub.color_quantize = prescan_quantize; + cquantize->pub.finish_pass = finish_pass1; + cquantize->needs_zeroed = TRUE; /* Always zero histogram */ + } else { + /* Set up method pointers */ + if (cinfo->dither_mode == JDITHER_FS) + cquantize->pub.color_quantize = pass2_fs_dither; + else + cquantize->pub.color_quantize = pass2_no_dither; + cquantize->pub.finish_pass = finish_pass2; + + /* Make sure color count is acceptable */ + i = cinfo->actual_number_of_colors; + if (i < 1) + ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 1); + if (i > MAXNUMCOLORS) + ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS); + + if (cinfo->dither_mode == JDITHER_FS) { + size_t arraysize = (size_t) ((cinfo->output_width + 2) * + (3 * SIZEOF(FSERROR))); + /* Allocate Floyd-Steinberg workspace if we didn't already. */ + if (cquantize->fserrors == NULL) + cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, arraysize); + /* Initialize the propagated errors to zero. */ + jzero_far((void FAR *) cquantize->fserrors, arraysize); + /* Make the error-limit table if we didn't already. */ + if (cquantize->error_limiter == NULL) + init_error_limit(cinfo); + cquantize->on_odd_row = FALSE; + } + + } + /* Zero the histogram or inverse color map, if necessary */ + if (cquantize->needs_zeroed) { + for (i = 0; i < HIST_C0_ELEMS; i++) { + jzero_far((void FAR *) histogram[i], + HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell)); + } + cquantize->needs_zeroed = FALSE; + } +} + + +/* + * Switch to a new external colormap between output passes. + */ + +METHODDEF(void) +new_color_map_2_quant (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize; + + /* Reset the inverse color map */ + cquantize->needs_zeroed = TRUE; +} + + +/* + * Module initialization routine for 2-pass color quantization. + */ + +GLOBAL(void) +jinit_2pass_quantizer (j_decompress_ptr cinfo) +{ + my_cquantize_ptr cquantize; + int i; + + cquantize = (my_cquantize_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(my_cquantizer)); + cinfo->cquantize = (struct jpeg_color_quantizer *) cquantize; + cquantize->pub.start_pass = start_pass_2_quant; + cquantize->pub.new_color_map = new_color_map_2_quant; + cquantize->fserrors = NULL; /* flag optional arrays not allocated */ + cquantize->error_limiter = NULL; + + /* Make sure jdmaster didn't give me a case I can't handle */ + if (cinfo->out_color_components != 3) + ERREXIT(cinfo, JERR_NOTIMPL); + + /* Allocate the histogram/inverse colormap storage */ + cquantize->histogram = (hist3d) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, HIST_C0_ELEMS * SIZEOF(hist2d)); + for (i = 0; i < HIST_C0_ELEMS; i++) { + cquantize->histogram[i] = (hist2d) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + HIST_C1_ELEMS*HIST_C2_ELEMS * SIZEOF(histcell)); + } + cquantize->needs_zeroed = TRUE; /* histogram is garbage now */ + + /* Allocate storage for the completed colormap, if required. + * We do this now since it is FAR storage and may affect + * the memory manager's space calculations. + */ + if (cinfo->enable_2pass_quant) { + /* Make sure color count is acceptable */ + int desired = cinfo->desired_number_of_colors; + /* Lower bound on # of colors ... somewhat arbitrary as long as > 0 */ + if (desired < 8) + ERREXIT1(cinfo, JERR_QUANT_FEW_COLORS, 8); + /* Make sure colormap indexes can be represented by JSAMPLEs */ + if (desired > MAXNUMCOLORS) + ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, MAXNUMCOLORS); + cquantize->sv_colormap = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo,JPOOL_IMAGE, (JDIMENSION) desired, (JDIMENSION) 3); + cquantize->desired = desired; + } else + cquantize->sv_colormap = NULL; + + /* Only F-S dithering or no dithering is supported. */ + /* If user asks for ordered dither, give him F-S. */ + if (cinfo->dither_mode != JDITHER_NONE) + cinfo->dither_mode = JDITHER_FS; + + /* Allocate Floyd-Steinberg workspace if necessary. + * This isn't really needed until pass 2, but again it is FAR storage. + * Although we will cope with a later change in dither_mode, + * we do not promise to honor max_memory_to_use if dither_mode changes. + */ + if (cinfo->dither_mode == JDITHER_FS) { + cquantize->fserrors = (FSERRPTR) (*cinfo->mem->alloc_large) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (size_t) ((cinfo->output_width + 2) * (3 * SIZEOF(FSERROR)))); + /* Might as well create the error-limiting table too. */ + init_error_limit(cinfo); + } +} + +#endif /* QUANT_2PASS_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/jutils.c b/windows_libs/jpeg-6a/jutils.c new file mode 100644 index 00000000..d18a9555 --- /dev/null +++ b/windows_libs/jpeg-6a/jutils.c @@ -0,0 +1,179 @@ +/* + * jutils.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains tables and miscellaneous utility routines needed + * for both compression and decompression. + * Note we prefix all global names with "j" to minimize conflicts with + * a surrounding application. + */ + +#define JPEG_INTERNALS +#include "jinclude.h" +#include "jpeglib.h" + + +/* + * jpeg_zigzag_order[i] is the zigzag-order position of the i'th element + * of a DCT block read in natural order (left to right, top to bottom). + */ + +#if 0 /* This table is not actually needed in v6a */ + +const int jpeg_zigzag_order[DCTSIZE2] = { + 0, 1, 5, 6, 14, 15, 27, 28, + 2, 4, 7, 13, 16, 26, 29, 42, + 3, 8, 12, 17, 25, 30, 41, 43, + 9, 11, 18, 24, 31, 40, 44, 53, + 10, 19, 23, 32, 39, 45, 52, 54, + 20, 22, 33, 38, 46, 51, 55, 60, + 21, 34, 37, 47, 50, 56, 59, 61, + 35, 36, 48, 49, 57, 58, 62, 63 +}; + +#endif + +/* + * jpeg_natural_order[i] is the natural-order position of the i'th element + * of zigzag order. + * + * When reading corrupted data, the Huffman decoders could attempt + * to reference an entry beyond the end of this array (if the decoded + * zero run length reaches past the end of the block). To prevent + * wild stores without adding an inner-loop test, we put some extra + * "63"s after the real entries. This will cause the extra coefficient + * to be stored in location 63 of the block, not somewhere random. + * The worst case would be a run-length of 15, which means we need 16 + * fake entries. + */ + +const int jpeg_natural_order[DCTSIZE2+16] = { + 0, 1, 8, 16, 9, 2, 3, 10, + 17, 24, 32, 25, 18, 11, 4, 5, + 12, 19, 26, 33, 40, 48, 41, 34, + 27, 20, 13, 6, 7, 14, 21, 28, + 35, 42, 49, 56, 57, 50, 43, 36, + 29, 22, 15, 23, 30, 37, 44, 51, + 58, 59, 52, 45, 38, 31, 39, 46, + 53, 60, 61, 54, 47, 55, 62, 63, + 63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */ + 63, 63, 63, 63, 63, 63, 63, 63 +}; + + +/* + * Arithmetic utilities + */ + +GLOBAL(long) +jdiv_round_up (long a, long b) +/* Compute a/b rounded up to next integer, ie, ceil(a/b) */ +/* Assumes a >= 0, b > 0 */ +{ + return (a + b - 1L) / b; +} + + +GLOBAL(long) +jround_up (long a, long b) +/* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */ +/* Assumes a >= 0, b > 0 */ +{ + a += b - 1L; + return a - (a % b); +} + + +/* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays + * and coefficient-block arrays. This won't work on 80x86 because the arrays + * are FAR and we're assuming a small-pointer memory model. However, some + * DOS compilers provide far-pointer versions of memcpy() and memset() even + * in the small-model libraries. These will be used if USE_FMEM is defined. + * Otherwise, the routines below do it the hard way. (The performance cost + * is not all that great, because these routines aren't very heavily used.) + */ + +#ifndef NEED_FAR_POINTERS /* normal case, same as regular macros */ +#define FMEMCOPY(dest,src,size) MEMCOPY(dest,src,size) +#define FMEMZERO(target,size) MEMZERO(target,size) +#else /* 80x86 case, define if we can */ +#ifdef USE_FMEM +#define FMEMCOPY(dest,src,size) _fmemcpy((void FAR *)(dest), (const void FAR *)(src), (size_t)(size)) +#define FMEMZERO(target,size) _fmemset((void FAR *)(target), 0, (size_t)(size)) +#endif +#endif + + +GLOBAL(void) +jcopy_sample_rows (JSAMPARRAY input_array, int source_row, + JSAMPARRAY output_array, int dest_row, + int num_rows, JDIMENSION num_cols) +/* Copy some rows of samples from one place to another. + * num_rows rows are copied from input_array[source_row++] + * to output_array[dest_row++]; these areas may overlap for duplication. + * The source and destination arrays must be at least as wide as num_cols. + */ +{ + register JSAMPROW inptr, outptr; +#ifdef FMEMCOPY + register size_t count = (size_t) (num_cols * SIZEOF(JSAMPLE)); +#else + register JDIMENSION count; +#endif + register int row; + + input_array += source_row; + output_array += dest_row; + + for (row = num_rows; row > 0; row--) { + inptr = *input_array++; + outptr = *output_array++; +#ifdef FMEMCOPY + FMEMCOPY(outptr, inptr, count); +#else + for (count = num_cols; count > 0; count--) + *outptr++ = *inptr++; /* needn't bother with GETJSAMPLE() here */ +#endif + } +} + + +GLOBAL(void) +jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row, + JDIMENSION num_blocks) +/* Copy a row of coefficient blocks from one place to another. */ +{ +#ifdef FMEMCOPY + FMEMCOPY(output_row, input_row, num_blocks * (DCTSIZE2 * SIZEOF(JCOEF))); +#else + register JCOEFPTR inptr, outptr; + register long count; + + inptr = (JCOEFPTR) input_row; + outptr = (JCOEFPTR) output_row; + for (count = (long) num_blocks * DCTSIZE2; count > 0; count--) { + *outptr++ = *inptr++; + } +#endif +} + + +GLOBAL(void) +jzero_far (void FAR * target, size_t bytestozero) +/* Zero out a chunk of FAR memory. */ +/* This might be sample-array data, block-array data, or alloc_large data. */ +{ +#ifdef FMEMZERO + FMEMZERO(target, bytestozero); +#else + register char FAR * ptr = (char FAR *) target; + register size_t count; + + for (count = bytestozero; count > 0; count--) { + *ptr++ = 0; + } +#endif +} diff --git a/windows_libs/jpeg-6a/jversion.h b/windows_libs/jpeg-6a/jversion.h new file mode 100644 index 00000000..b903be7d --- /dev/null +++ b/windows_libs/jpeg-6a/jversion.h @@ -0,0 +1,14 @@ +/* + * jversion.h + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains software version identification. + */ + + +#define JVERSION "6a 7-Feb-96" + +#define JCOPYRIGHT "Copyright (C) 1996, Thomas G. Lane" diff --git a/windows_libs/jpeg-6a/libjpeg.doc b/windows_libs/jpeg-6a/libjpeg.doc new file mode 100644 index 00000000..b3333a8e --- /dev/null +++ b/windows_libs/jpeg-6a/libjpeg.doc @@ -0,0 +1,2772 @@ +USING THE IJG JPEG LIBRARY + +Copyright (C) 1994-1996, Thomas G. Lane. +This file is part of the Independent JPEG Group's software. +For conditions of distribution and use, see the accompanying README file. + + +This file describes how to use the IJG JPEG library within an application +program. Read it if you want to write a program that uses the library. + +The file example.c provides heavily commented skeleton code for calling the +JPEG library. Also see jpeglib.h (the include file to be used by application +programs) for full details about data structures and function parameter lists. +The library source code, of course, is the ultimate reference. + +Note that there have been *major* changes from the application interface +presented by IJG version 4 and earlier versions. The old design had several +inherent limitations, and it had accumulated a lot of cruft as we added +features while trying to minimize application-interface changes. We have +sacrificed backward compatibility in the version 5 rewrite, but we think the +improvements justify this. + + +TABLE OF CONTENTS +----------------- + +Overview: + Functions provided by the library + Outline of typical usage +Basic library usage: + Data formats + Compression details + Decompression details + Mechanics of usage: include files, linking, etc +Advanced features: + Compression parameter selection + Decompression parameter selection + Special color spaces + Error handling + Compressed data handling (source and destination managers) + I/O suspension + Progressive JPEG support + Buffered-image mode + Abbreviated datastreams and multiple images + Special markers + Raw (downsampled) image data + Really raw data: DCT coefficients + Progress monitoring + Memory management + Library compile-time options + Portability considerations + Notes for MS-DOS implementors + +You should read at least the overview and basic usage sections before trying +to program with the library. The sections on advanced features can be read +if and when you need them. + + +OVERVIEW +======== + +Functions provided by the library +--------------------------------- + +The IJG JPEG library provides C code to read and write JPEG-compressed image +files. The surrounding application program receives or supplies image data a +scanline at a time, using a straightforward uncompressed image format. All +details of color conversion and other preprocessing/postprocessing can be +handled by the library. + +The library includes a substantial amount of code that is not covered by the +JPEG standard but is necessary for typical applications of JPEG. These +functions preprocess the image before JPEG compression or postprocess it after +decompression. They include colorspace conversion, downsampling/upsampling, +and color quantization. The application indirectly selects use of this code +by specifying the format in which it wishes to supply or receive image data. +For example, if colormapped output is requested, then the decompression +library automatically invokes color quantization. + +A wide range of quality vs. speed tradeoffs are possible in JPEG processing, +and even more so in decompression postprocessing. The decompression library +provides multiple implementations that cover most of the useful tradeoffs, +ranging from very-high-quality down to fast-preview operation. On the +compression side we have generally not provided low-quality choices, since +compression is normally less time-critical. It should be understood that the +low-quality modes may not meet the JPEG standard's accuracy requirements; +nonetheless, they are useful for viewers. + +A word about functions *not* provided by the library. We handle a subset of +the ISO JPEG standard; most baseline, extended-sequential, and progressive +JPEG processes are supported. (Our subset includes all features now in common +use.) Unsupported ISO options include: + * Hierarchical storage + * Lossless JPEG + * Arithmetic entropy coding (unsupported for legal reasons) + * DNL marker + * Nonintegral subsampling ratios +We support both 8- and 12-bit data precision, but this is a compile-time +choice rather than a run-time choice; hence it is difficult to use both +precisions in a single application. + +By itself, the library handles only interchange JPEG datastreams --- in +particular the widely used JFIF file format. The library can be used by +surrounding code to process interchange or abbreviated JPEG datastreams that +are embedded in more complex file formats. (For example, this library is +used by the free LIBTIFF library to support JPEG compression in TIFF.) + + +Outline of typical usage +------------------------ + +The rough outline of a JPEG compression operation is: + + Allocate and initialize a JPEG compression object + Specify the destination for the compressed data (eg, a file) + Set parameters for compression, including image size & colorspace + jpeg_start_compress(...); + while (scan lines remain to be written) + jpeg_write_scanlines(...); + jpeg_finish_compress(...); + Release the JPEG compression object + +A JPEG compression object holds parameters and working state for the JPEG +library. We make creation/destruction of the object separate from starting +or finishing compression of an image; the same object can be re-used for a +series of image compression operations. This makes it easy to re-use the +same parameter settings for a sequence of images. Re-use of a JPEG object +also has important implications for processing abbreviated JPEG datastreams, +as discussed later. + +The image data to be compressed is supplied to jpeg_write_scanlines() from +in-memory buffers. If the application is doing file-to-file compression, +reading image data from the source file is the application's responsibility. +The library emits compressed data by calling a "data destination manager", +which typically will write the data into a file; but the application can +provide its own destination manager to do something else. + +Similarly, the rough outline of a JPEG decompression operation is: + + Allocate and initialize a JPEG decompression object + Specify the source of the compressed data (eg, a file) + Call jpeg_read_header() to obtain image info + Set parameters for decompression + jpeg_start_decompress(...); + while (scan lines remain to be read) + jpeg_read_scanlines(...); + jpeg_finish_decompress(...); + Release the JPEG decompression object + +This is comparable to the compression outline except that reading the +datastream header is a separate step. This is helpful because information +about the image's size, colorspace, etc is available when the application +selects decompression parameters. For example, the application can choose an +output scaling ratio that will fit the image into the available screen size. + +The decompression library obtains compressed data by calling a data source +manager, which typically will read the data from a file; but other behaviors +can be obtained with a custom source manager. Decompressed data is delivered +into in-memory buffers passed to jpeg_read_scanlines(). + +It is possible to abort an incomplete compression or decompression operation +by calling jpeg_abort(); or, if you do not need to retain the JPEG object, +simply release it by calling jpeg_destroy(). + +JPEG compression and decompression objects are two separate struct types. +However, they share some common fields, and certain routines such as +jpeg_destroy() can work on either type of object. + +The JPEG library has no static variables: all state is in the compression +or decompression object. Therefore it is possible to process multiple +compression and decompression operations concurrently, using multiple JPEG +objects. + +Both compression and decompression can be done in an incremental memory-to- +memory fashion, if suitable source/destination managers are used. See the +section on "I/O suspension" for more details. + + +BASIC LIBRARY USAGE +=================== + +Data formats +------------ + +Before diving into procedural details, it is helpful to understand the +image data format that the JPEG library expects or returns. + +The standard input image format is a rectangular array of pixels, with each +pixel having the same number of "component" or "sample" values (color +channels). You must specify how many components there are and the colorspace +interpretation of the components. Most applications will use RGB data +(three components per pixel) or grayscale data (one component per pixel). +PLEASE NOTE THAT RGB DATA IS THREE SAMPLES PER PIXEL, GRAYSCALE ONLY ONE. +A remarkable number of people manage to miss this, only to find that their +programs don't work with grayscale JPEG files. + +There is no provision for colormapped input. JPEG files are always full-color +or full grayscale (or sometimes another colorspace such as CMYK). You can +feed in a colormapped image by expanding it to full-color format. However +JPEG often doesn't work very well with source data that has been colormapped, +because of dithering noise. This is discussed in more detail in the JPEG FAQ +and the other references mentioned in the README file. + +Pixels are stored by scanlines, with each scanline running from left to +right. The component values for each pixel are adjacent in the row; for +example, R,G,B,R,G,B,R,G,B,... for 24-bit RGB color. Each scanline is an +array of data type JSAMPLE --- which is typically "unsigned char", unless +you've changed jmorecfg.h. (You can also change the RGB pixel layout, say +to B,G,R order, by modifying jmorecfg.h. But see the restrictions listed in +that file before doing so.) + +A 2-D array of pixels is formed by making a list of pointers to the starts of +scanlines; so the scanlines need not be physically adjacent in memory. Even +if you process just one scanline at a time, you must make a one-element +pointer array to conform to this structure. Pointers to JSAMPLE rows are of +type JSAMPROW, and the pointer to the pointer array is of type JSAMPARRAY. + +The library accepts or supplies one or more complete scanlines per call. +It is not possible to process part of a row at a time. Scanlines are always +processed top-to-bottom. You can process an entire image in one call if you +have it all in memory, but usually it's simplest to process one scanline at +a time. + +For best results, source data values should have the precision specified by +BITS_IN_JSAMPLE (normally 8 bits). For instance, if you choose to compress +data that's only 6 bits/channel, you should left-justify each value in a +byte before passing it to the compressor. If you need to compress data +that has more than 8 bits/channel, compile with BITS_IN_JSAMPLE = 12. +(See "Library compile-time options", later.) + + +The data format returned by the decompressor is the same in all details, +except that colormapped output is supported. (Again, a JPEG file is never +colormapped. But you can ask the decompressor to perform on-the-fly color +quantization to deliver colormapped output.) If you request colormapped +output then the returned data array contains a single JSAMPLE per pixel; +its value is an index into a color map. The color map is represented as +a 2-D JSAMPARRAY in which each row holds the values of one color component, +that is, colormap[i][j] is the value of the i'th color component for pixel +value (map index) j. Note that since the colormap indexes are stored in +JSAMPLEs, the maximum number of colors is limited by the size of JSAMPLE +(ie, at most 256 colors for an 8-bit JPEG library). + + +Compression details +------------------- + +Here we revisit the JPEG compression outline given in the overview. + +1. Allocate and initialize a JPEG compression object. + +A JPEG compression object is a "struct jpeg_compress_struct". (It also has +a bunch of subsidiary structures which are allocated via malloc(), but the +application doesn't control those directly.) This struct can be just a local +variable in the calling routine, if a single routine is going to execute the +whole JPEG compression sequence. Otherwise it can be static or allocated +from malloc(). + +You will also need a structure representing a JPEG error handler. The part +of this that the library cares about is a "struct jpeg_error_mgr". If you +are providing your own error handler, you'll typically want to embed the +jpeg_error_mgr struct in a larger structure; this is discussed later under +"Error handling". For now we'll assume you are just using the default error +handler. The default error handler will print JPEG error/warning messages +on stderr, and it will call exit() if a fatal error occurs. + +You must initialize the error handler structure, store a pointer to it into +the JPEG object's "err" field, and then call jpeg_create_compress() to +initialize the rest of the JPEG object. + +Typical code for this step, if you are using the default error handler, is + + struct jpeg_compress_struct cinfo; + struct jpeg_error_mgr jerr; + ... + cinfo.err = jpeg_std_error(&jerr); + jpeg_create_compress(&cinfo); + +jpeg_create_compress allocates a small amount of memory, so it could fail +if you are out of memory. In that case it will exit via the error handler; +that's why the error handler must be initialized first. + + +2. Specify the destination for the compressed data (eg, a file). + +As previously mentioned, the JPEG library delivers compressed data to a +"data destination" module. The library includes one data destination +module which knows how to write to a stdio stream. You can use your own +destination module if you want to do something else, as discussed later. + +If you use the standard destination module, you must open the target stdio +stream beforehand. Typical code for this step looks like: + + FILE * outfile; + ... + if ((outfile = fopen(filename, "wb")) == NULL) { + fprintf(stderr, "can't open %s\n", filename); + exit(1); + } + jpeg_stdio_dest(&cinfo, outfile); + +where the last line invokes the standard destination module. + +WARNING: it is critical that the binary compressed data be delivered to the +output file unchanged. On non-Unix systems the stdio library may perform +newline translation or otherwise corrupt binary data. To suppress this +behavior, you may need to use a "b" option to fopen (as shown above), or use +setmode() or another routine to put the stdio stream in binary mode. See +cjpeg.c and djpeg.c for code that has been found to work on many systems. + +You can select the data destination after setting other parameters (step 3), +if that's more convenient. You may not change the destination between +calling jpeg_start_compress() and jpeg_finish_compress(). + + +3. Set parameters for compression, including image size & colorspace. + +You must supply information about the source image by setting the following +fields in the JPEG object (cinfo structure): + + image_width Width of image, in pixels + image_height Height of image, in pixels + input_components Number of color channels (samples per pixel) + in_color_space Color space of source image + +The image dimensions are, hopefully, obvious. JPEG supports image dimensions +of 1 to 64K pixels in either direction. The input color space is typically +RGB or grayscale, and input_components is 3 or 1 accordingly. (See "Special +color spaces", later, for more info.) The in_color_space field must be +assigned one of the J_COLOR_SPACE enum constants, typically JCS_RGB or +JCS_GRAYSCALE. + +JPEG has a large number of compression parameters that determine how the +image is encoded. Most applications don't need or want to know about all +these parameters. You can set all the parameters to reasonable defaults by +calling jpeg_set_defaults(); then, if there are particular values you want +to change, you can do so after that. The "Compression parameter selection" +section tells about all the parameters. + +You must set in_color_space correctly before calling jpeg_set_defaults(), +because the defaults depend on the source image colorspace. However the +other three source image parameters need not be valid until you call +jpeg_start_compress(). There's no harm in calling jpeg_set_defaults() more +than once, if that happens to be convenient. + +Typical code for a 24-bit RGB source image is + + cinfo.image_width = Width; /* image width and height, in pixels */ + cinfo.image_height = Height; + cinfo.input_components = 3; /* # of color components per pixel */ + cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ + + jpeg_set_defaults(&cinfo); + /* Make optional parameter settings here */ + + +4. jpeg_start_compress(...); + +After you have established the data destination and set all the necessary +source image info and other parameters, call jpeg_start_compress() to begin +a compression cycle. This will initialize internal state, allocate working +storage, and emit the first few bytes of the JPEG datastream header. + +Typical code: + + jpeg_start_compress(&cinfo, TRUE); + +The "TRUE" parameter ensures that a complete JPEG interchange datastream +will be written. This is appropriate in most cases. If you think you might +want to use an abbreviated datastream, read the section on abbreviated +datastreams, below. + +Once you have called jpeg_start_compress(), you may not alter any JPEG +parameters or other fields of the JPEG object until you have completed +the compression cycle. + + +5. while (scan lines remain to be written) + jpeg_write_scanlines(...); + +Now write all the required image data by calling jpeg_write_scanlines() +one or more times. You can pass one or more scanlines in each call, up +to the total image height. In most applications it is convenient to pass +just one or a few scanlines at a time. The expected format for the passed +data is discussed under "Data formats", above. + +Image data should be written in top-to-bottom scanline order. The JPEG spec +contains some weasel wording about how top and bottom are application-defined +terms (a curious interpretation of the English language...) but if you want +your files to be compatible with everyone else's, you WILL use top-to-bottom +order. If the source data must be read in bottom-to-top order, you can use +the JPEG library's virtual array mechanism to invert the data efficiently. +Examples of this can be found in the sample application cjpeg. + +The library maintains a count of the number of scanlines written so far +in the next_scanline field of the JPEG object. Usually you can just use +this variable as the loop counter, so that the loop test looks like +"while (cinfo.next_scanline < cinfo.image_height)". + +Code for this step depends heavily on the way that you store the source data. +example.c shows the following code for the case of a full-size 2-D source +array containing 3-byte RGB pixels: + + JSAMPROW row_pointer[1]; /* pointer to a single row */ + int row_stride; /* physical row width in buffer */ + + row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */ + + while (cinfo.next_scanline < cinfo.image_height) { + row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride]; + jpeg_write_scanlines(&cinfo, row_pointer, 1); + } + +jpeg_write_scanlines() returns the number of scanlines actually written. +This will normally be equal to the number passed in, so you can usually +ignore the return value. It is different in just two cases: + * If you try to write more scanlines than the declared image height, + the additional scanlines are ignored. + * If you use a suspending data destination manager, output buffer overrun + will cause the compressor to return before accepting all the passed lines. + This feature is discussed under "I/O suspension", below. The normal + stdio destination manager will NOT cause this to happen. +In any case, the return value is the same as the change in the value of +next_scanline. + + +6. jpeg_finish_compress(...); + +After all the image data has been written, call jpeg_finish_compress() to +complete the compression cycle. This step is ESSENTIAL to ensure that the +last bufferload of data is written to the data destination. +jpeg_finish_compress() also releases working memory associated with the JPEG +object. + +Typical code: + + jpeg_finish_compress(&cinfo); + +If using the stdio destination manager, don't forget to close the output +stdio stream if necessary. + +If you have requested a multi-pass operating mode, such as Huffman code +optimization, jpeg_finish_compress() will perform the additional passes using +data buffered by the first pass. In this case jpeg_finish_compress() may take +quite a while to complete. With the default compression parameters, this will +not happen. + +It is an error to call jpeg_finish_compress() before writing the necessary +total number of scanlines. If you wish to abort compression, call +jpeg_abort() as discussed below. + +After completing a compression cycle, you may dispose of the JPEG object +as discussed next, or you may use it to compress another image. In that case +return to step 2, 3, or 4 as appropriate. If you do not change the +destination manager, the new datastream will be written to the same target. +If you do not change any JPEG parameters, the new datastream will be written +with the same parameters as before. Note that you can change the input image +dimensions freely between cycles, but if you change the input colorspace, you +should call jpeg_set_defaults() to adjust for the new colorspace; and then +you'll need to repeat all of step 3. + + +7. Release the JPEG compression object. + +When you are done with a JPEG compression object, destroy it by calling +jpeg_destroy_compress(). This will free all subsidiary memory. Or you can +call jpeg_destroy() which works for either compression or decompression +objects --- this may be more convenient if you are sharing code between +compression and decompression cases. (Actually, these routines are equivalent +except for the declared type of the passed pointer. To avoid gripes from +ANSI C compilers, jpeg_destroy() should be passed a j_common_ptr.) + +If you allocated the jpeg_compress_struct structure from malloc(), freeing +it is your responsibility --- jpeg_destroy() won't. Ditto for the error +handler structure. + +Typical code: + + jpeg_destroy_compress(&cinfo); + + +8. Aborting. + +If you decide to abort a compression cycle before finishing, you can clean up +in either of two ways: + +* If you don't need the JPEG object any more, just call + jpeg_destroy_compress() or jpeg_destroy() to release memory. This is + legitimate at any point after calling jpeg_create_compress() --- in fact, + it's safe even if jpeg_create_compress() fails. + +* If you want to re-use the JPEG object, call jpeg_abort_compress(), or + jpeg_abort() which works on both compression and decompression objects. + This will return the object to an idle state, releasing any working memory. + jpeg_abort() is allowed at any time after successful object creation. + +Note that cleaning up the data destination, if required, is your +responsibility. + + +Decompression details +--------------------- + +Here we revisit the JPEG decompression outline given in the overview. + +1. Allocate and initialize a JPEG decompression object. + +This is just like initialization for compression, as discussed above, +except that the object is a "struct jpeg_decompress_struct" and you +call jpeg_create_decompress(). Error handling is exactly the same. + +Typical code: + + struct jpeg_decompress_struct cinfo; + struct jpeg_error_mgr jerr; + ... + cinfo.err = jpeg_std_error(&jerr); + jpeg_create_decompress(&cinfo); + +(Both here and in the IJG code, we usually use variable name "cinfo" for +both compression and decompression objects.) + + +2. Specify the source of the compressed data (eg, a file). + +As previously mentioned, the JPEG library reads compressed data from a "data +source" module. The library includes one data source module which knows how +to read from a stdio stream. You can use your own source module if you want +to do something else, as discussed later. + +If you use the standard source module, you must open the source stdio stream +beforehand. Typical code for this step looks like: + + FILE * infile; + ... + if ((infile = fopen(filename, "rb")) == NULL) { + fprintf(stderr, "can't open %s\n", filename); + exit(1); + } + jpeg_stdio_src(&cinfo, infile); + +where the last line invokes the standard source module. + +WARNING: it is critical that the binary compressed data be read unchanged. +On non-Unix systems the stdio library may perform newline translation or +otherwise corrupt binary data. To suppress this behavior, you may need to use +a "b" option to fopen (as shown above), or use setmode() or another routine to +put the stdio stream in binary mode. See cjpeg.c and djpeg.c for code that +has been found to work on many systems. + +You may not change the data source between calling jpeg_read_header() and +jpeg_finish_decompress(). If you wish to read a series of JPEG images from +a single source file, you should repeat the jpeg_read_header() to +jpeg_finish_decompress() sequence without reinitializing either the JPEG +object or the data source module; this prevents buffered input data from +being discarded. + + +3. Call jpeg_read_header() to obtain image info. + +Typical code for this step is just + + jpeg_read_header(&cinfo, TRUE); + +This will read the source datastream header markers, up to the beginning +of the compressed data proper. On return, the image dimensions and other +info have been stored in the JPEG object. The application may wish to +consult this information before selecting decompression parameters. + +More complex code is necessary if + * A suspending data source is used --- in that case jpeg_read_header() + may return before it has read all the header data. See "I/O suspension", + below. The normal stdio source manager will NOT cause this to happen. + * Abbreviated JPEG files are to be processed --- see the section on + abbreviated datastreams. Standard applications that deal only in + interchange JPEG files need not be concerned with this case either. + +It is permissible to stop at this point if you just wanted to find out the +image dimensions and other header info for a JPEG file. In that case, +call jpeg_destroy() when you are done with the JPEG object, or call +jpeg_abort() to return it to an idle state before selecting a new data +source and reading another header. + + +4. Set parameters for decompression. + +jpeg_read_header() sets appropriate default decompression parameters based on +the properties of the image (in particular, its colorspace). However, you +may well want to alter these defaults before beginning the decompression. +For example, the default is to produce full color output from a color file. +If you want colormapped output you must ask for it. Other options allow the +returned image to be scaled and allow various speed/quality tradeoffs to be +selected. "Decompression parameter selection", below, gives details. + +If the defaults are appropriate, nothing need be done at this step. + +Note that all default values are set by each call to jpeg_read_header(). +If you reuse a decompression object, you cannot expect your parameter +settings to be preserved across cycles, as you can for compression. +You must set desired parameter values each time. + + +5. jpeg_start_decompress(...); + +Once the parameter values are satisfactory, call jpeg_start_decompress() to +begin decompression. This will initialize internal state, allocate working +memory, and prepare for returning data. + +Typical code is just + + jpeg_start_decompress(&cinfo); + +If you have requested a multi-pass operating mode, such as 2-pass color +quantization, jpeg_start_decompress() will do everything needed before data +output can begin. In this case jpeg_start_decompress() may take quite a while +to complete. With a single-scan (non progressive) JPEG file and default +decompression parameters, this will not happen; jpeg_start_decompress() will +return quickly. + +After this call, the final output image dimensions, including any requested +scaling, are available in the JPEG object; so is the selected colormap, if +colormapped output has been requested. Useful fields include + + output_width image width and height, as scaled + output_height + out_color_components # of color components in out_color_space + output_components # of color components returned per pixel + colormap the selected colormap, if any + actual_number_of_colors number of entries in colormap + +output_components is 1 (a colormap index) when quantizing colors; otherwise it +equals out_color_components. It is the number of JSAMPLE values that will be +emitted per pixel in the output arrays. + +Typically you will need to allocate data buffers to hold the incoming image. +You will need output_width * output_components JSAMPLEs per scanline in your +output buffer, and a total of output_height scanlines will be returned. + +Note: if you are using the JPEG library's internal memory manager to allocate +data buffers (as djpeg does), then the manager's protocol requires that you +request large buffers *before* calling jpeg_start_decompress(). This is a +little tricky since the output_XXX fields are not normally valid then. You +can make them valid by calling jpeg_calc_output_dimensions() after setting the +relevant parameters (scaling, output color space, and quantization flag). + + +6. while (scan lines remain to be read) + jpeg_read_scanlines(...); + +Now you can read the decompressed image data by calling jpeg_read_scanlines() +one or more times. At each call, you pass in the maximum number of scanlines +to be read (ie, the height of your working buffer); jpeg_read_scanlines() +will return up to that many lines. The return value is the number of lines +actually read. The format of the returned data is discussed under "Data +formats", above. Don't forget that grayscale and color JPEGs will return +different data formats! + +Image data is returned in top-to-bottom scanline order. If you must write +out the image in bottom-to-top order, you can use the JPEG library's virtual +array mechanism to invert the data efficiently. Examples of this can be +found in the sample application djpeg. + +The library maintains a count of the number of scanlines returned so far +in the output_scanline field of the JPEG object. Usually you can just use +this variable as the loop counter, so that the loop test looks like +"while (cinfo.output_scanline < cinfo.output_height)". (Note that the test +should NOT be against image_height, unless you never use scaling. The +image_height field is the height of the original unscaled image.) +The return value always equals the change in the value of output_scanline. + +If you don't use a suspending data source, it is safe to assume that +jpeg_read_scanlines() reads at least one scanline per call, until the +bottom of the image has been reached. + +If you use a buffer larger than one scanline, it is NOT safe to assume that +jpeg_read_scanlines() fills it. (The current implementation won't return +more than cinfo.rec_outbuf_height scanlines per call, no matter how large +a buffer you pass.) So you must always provide a loop that calls +jpeg_read_scanlines() repeatedly until the whole image has been read. + + +7. jpeg_finish_decompress(...); + +After all the image data has been read, call jpeg_finish_decompress() to +complete the decompression cycle. This causes working memory associated +with the JPEG object to be released. + +Typical code: + + jpeg_finish_decompress(&cinfo); + +If using the stdio source manager, don't forget to close the source stdio +stream if necessary. + +It is an error to call jpeg_finish_decompress() before reading the correct +total number of scanlines. If you wish to abort compression, call +jpeg_abort() as discussed below. + +After completing a decompression cycle, you may dispose of the JPEG object as +discussed next, or you may use it to decompress another image. In that case +return to step 2 or 3 as appropriate. If you do not change the source +manager, the next image will be read from the same source. + + +8. Release the JPEG decompression object. + +When you are done with a JPEG decompression object, destroy it by calling +jpeg_destroy_decompress() or jpeg_destroy(). The previous discussion of +destroying compression objects applies here too. + +Typical code: + + jpeg_destroy_decompress(&cinfo); + + +9. Aborting. + +You can abort a decompression cycle by calling jpeg_destroy_decompress() or +jpeg_destroy() if you don't need the JPEG object any more, or +jpeg_abort_decompress() or jpeg_abort() if you want to reuse the object. +The previous discussion of aborting compression cycles applies here too. + + +Mechanics of usage: include files, linking, etc +----------------------------------------------- + +Applications using the JPEG library should include the header file jpeglib.h +to obtain declarations of data types and routines. Before including +jpeglib.h, include system headers that define at least the typedefs FILE and +size_t. On ANSI-conforming systems, including is sufficient; on +older Unix systems, you may need to define size_t. + +If the application needs to refer to individual JPEG library error codes, also +include jerror.h to define those symbols. + +jpeglib.h indirectly includes the files jconfig.h and jmorecfg.h. If you are +installing the JPEG header files in a system directory, you will want to +install all four files: jpeglib.h, jerror.h, jconfig.h, jmorecfg.h. + +The most convenient way to include the JPEG code into your executable program +is to prepare a library file ("libjpeg.a", or a corresponding name on non-Unix +machines) and reference it at your link step. If you use only half of the +library (only compression or only decompression), only that much code will be +included from the library, unless your linker is hopelessly brain-damaged. +The supplied makefiles build libjpeg.a automatically (see install.doc). + +On some systems your application may need to set up a signal handler to ensure +that temporary files are deleted if the program is interrupted. This is most +critical if you are on MS-DOS and use the jmemdos.c memory manager back end; +it will try to grab extended memory for temp files, and that space will NOT be +freed automatically. See cjpeg.c or djpeg.c for an example signal handler. + +It may be worth pointing out that the core JPEG library does not actually +require the stdio library: only the default source/destination managers and +error handler need it. You can use the library in a stdio-less environment +if you replace those modules and use jmemnobs.c (or another memory manager of +your own devising). More info about the minimum system library requirements +may be found in jinclude.h. + + +ADVANCED FEATURES +================= + +Compression parameter selection +------------------------------- + +This section describes all the optional parameters you can set for JPEG +compression, as well as the "helper" routines provided to assist in this +task. Proper setting of some parameters requires detailed understanding +of the JPEG standard; if you don't know what a parameter is for, it's best +not to mess with it! See REFERENCES in the README file for pointers to +more info about JPEG. + +It's a good idea to call jpeg_set_defaults() first, even if you plan to set +all the parameters; that way your code is more likely to work with future JPEG +libraries that have additional parameters. For the same reason, we recommend +you use a helper routine where one is provided, in preference to twiddling +cinfo fields directly. + +The helper routines are: + +jpeg_set_defaults (j_compress_ptr cinfo) + This routine sets all JPEG parameters to reasonable defaults, using + only the input image's color space (field in_color_space, which must + already be set in cinfo). Many applications will only need to use + this routine and perhaps jpeg_set_quality(). + +jpeg_set_colorspace (j_compress_ptr cinfo, J_COLOR_SPACE colorspace) + Sets the JPEG file's colorspace (field jpeg_color_space) as specified, + and sets other color-space-dependent parameters appropriately. See + "Special color spaces", below, before using this. A large number of + parameters, including all per-component parameters, are set by this + routine; if you want to twiddle individual parameters you should call + jpeg_set_colorspace() before rather than after. + +jpeg_default_colorspace (j_compress_ptr cinfo) + Selects an appropriate JPEG colorspace based on cinfo->in_color_space, + and calls jpeg_set_colorspace(). This is actually a subroutine of + jpeg_set_defaults(). It's broken out in case you want to change + just the colorspace-dependent JPEG parameters. + +jpeg_set_quality (j_compress_ptr cinfo, int quality, boolean force_baseline) + Constructs JPEG quantization tables appropriate for the indicated + quality setting. The quality value is expressed on the 0..100 scale + recommended by IJG (cjpeg's "-quality" switch uses this routine). + Note that the exact mapping from quality values to tables may change + in future IJG releases as more is learned about DCT quantization. + If the force_baseline parameter is TRUE, then the quantization table + entries are constrained to the range 1..255 for full JPEG baseline + compatibility. In the current implementation, this only makes a + difference for quality settings below 25, and it effectively prevents + very small/low quality files from being generated. The IJG decoder + is capable of reading the non-baseline files generated at low quality + settings when force_baseline is FALSE, but other decoders may not be. + +jpeg_set_linear_quality (j_compress_ptr cinfo, int scale_factor, + boolean force_baseline) + Same as jpeg_set_quality() except that the generated tables are the + sample tables given in the JPEC spec section K.1, multiplied by the + specified scale factor (which is expressed as a percentage; thus + scale_factor = 100 reproduces the spec's tables). Note that larger + scale factors give lower quality. This entry point is useful for + conforming to the Adobe PostScript DCT conventions, but we do not + recommend linear scaling as a user-visible quality scale otherwise. + force_baseline again constrains the computed table entries to 1..255. + +int jpeg_quality_scaling (int quality) + Converts a value on the IJG-recommended quality scale to a linear + scaling percentage. Note that this routine may change or go away + in future releases --- IJG may choose to adopt a scaling method that + can't be expressed as a simple scalar multiplier, in which case the + premise of this routine collapses. Caveat user. + +jpeg_add_quant_table (j_compress_ptr cinfo, int which_tbl, + const unsigned int *basic_table, + int scale_factor, boolean force_baseline) + Allows an arbitrary quantization table to be created. which_tbl + indicates which table slot to fill. basic_table points to an array + of 64 unsigned ints given in normal array order. These values are + multiplied by scale_factor/100 and then clamped to the range 1..65535 + (or to 1..255 if force_baseline is TRUE). + CAUTION: prior to library version 6a, jpeg_add_quant_table expected + the basic table to be given in JPEG zigzag order. If you need to + write code that works with either older or newer versions of this + routine, you must check the library version number. Something like + "#if JPEG_LIB_VERSION >= 61" is the right test. + +jpeg_simple_progression (j_compress_ptr cinfo) + Generates a default scan script for writing a progressive-JPEG file. + This is the recommended method of creating a progressive file, + unless you want to make a custom scan sequence. You must ensure that + the JPEG color space is set correctly before calling this routine. + + +Compression parameters (cinfo fields) include: + +J_DCT_METHOD dct_method + Selects the algorithm used for the DCT step. Choices are: + JDCT_ISLOW: slow but accurate integer algorithm + JDCT_IFAST: faster, less accurate integer method + JDCT_FLOAT: floating-point method + JDCT_DEFAULT: default method (normally JDCT_ISLOW) + JDCT_FASTEST: fastest method (normally JDCT_IFAST) + The FLOAT method is very slightly more accurate than the ISLOW method, + but may give different results on different machines due to varying + roundoff behavior. The integer methods should give the same results + on all machines. On machines with sufficiently fast FP hardware, the + floating-point method may also be the fastest. The IFAST method is + considerably less accurate than the other two; its use is not + recommended if high quality is a concern. JDCT_DEFAULT and + JDCT_FASTEST are macros configurable by each installation. + +J_COLOR_SPACE jpeg_color_space +int num_components + The JPEG color space and corresponding number of components; see + "Special color spaces", below, for more info. We recommend using + jpeg_set_color_space() if you want to change these. + +boolean optimize_coding + TRUE causes the compressor to compute optimal Huffman coding tables + for the image. This requires an extra pass over the data and + therefore costs a good deal of space and time. The default is + FALSE, which tells the compressor to use the supplied or default + Huffman tables. In most cases optimal tables save only a few percent + of file size compared to the default tables. Note that when this is + TRUE, you need not supply Huffman tables at all, and any you do + supply will be overwritten. + +unsigned int restart_interval +int restart_in_rows + To emit restart markers in the JPEG file, set one of these nonzero. + Set restart_interval to specify the exact interval in MCU blocks. + Set restart_in_rows to specify the interval in MCU rows. (If + restart_in_rows is not 0, then restart_interval is set after the + image width in MCUs is computed.) Defaults are zero (no restarts). + +const jpeg_scan_info * scan_info +int num_scans + By default, scan_info is NULL; this causes the compressor to write a + single-scan sequential JPEG file. If not NULL, scan_info points to + an array of scan definition records of length num_scans. The + compressor will then write a JPEG file having one scan for each scan + definition record. This is used to generate noninterleaved or + progressive JPEG files. The library checks that the scan array + defines a valid JPEG scan sequence. (jpeg_simple_progression creates + a suitable scan definition array for progressive JPEG.) This is + discussed further under "Progressive JPEG support". + +int smoothing_factor + If non-zero, the input image is smoothed; the value should be 1 for + minimal smoothing to 100 for maximum smoothing. Consult jcsample.c + for details of the smoothing algorithm. The default is zero. + +boolean write_JFIF_header + If TRUE, a JFIF APP0 marker is emitted. jpeg_set_defaults() and + jpeg_set_colorspace() set this TRUE if a JFIF-legal JPEG color space + (ie, YCbCr or grayscale) is selected, otherwise FALSE. + +UINT8 density_unit +UINT16 X_density +UINT16 Y_density + The resolution information to be written into the JFIF marker; + not used otherwise. density_unit may be 0 for unknown, + 1 for dots/inch, or 2 for dots/cm. The default values are 0,1,1 + indicating square pixels of unknown size. + +boolean write_Adobe_marker + If TRUE, an Adobe APP14 marker is emitted. jpeg_set_defaults() and + jpeg_set_colorspace() set this TRUE if JPEG color space RGB, CMYK, + or YCCK is selected, otherwise FALSE. It is generally a bad idea + to set both write_JFIF_header and write_Adobe_marker. In fact, + you probably shouldn't change the default settings at all --- the + default behavior ensures that the JPEG file's color space can be + recognized by the decoder. + +JQUANT_TBL * quant_tbl_ptrs[NUM_QUANT_TBLS] + Pointers to coefficient quantization tables, one per table slot, + or NULL if no table is defined for a slot. Usually these should + be set via one of the above helper routines; jpeg_add_quant_table() + is general enough to define any quantization table. The other + routines will set up table slot 0 for luminance quality and table + slot 1 for chrominance. + +JHUFF_TBL * dc_huff_tbl_ptrs[NUM_HUFF_TBLS] +JHUFF_TBL * ac_huff_tbl_ptrs[NUM_HUFF_TBLS] + Pointers to Huffman coding tables, one per table slot, or NULL if + no table is defined for a slot. Slots 0 and 1 are filled with the + JPEG sample tables by jpeg_set_defaults(). If you need to allocate + more table structures, jpeg_alloc_huff_table() may be used. + Note that optimal Huffman tables can be computed for an image + by setting optimize_coding, as discussed above; there's seldom + any need to mess with providing your own Huffman tables. + +There are some additional cinfo fields which are not documented here +because you currently can't change them; for example, you can't set +arith_code TRUE because arithmetic coding is unsupported. + + +Per-component parameters are stored in the struct cinfo.comp_info[i] for +component number i. Note that components here refer to components of the +JPEG color space, *not* the source image color space. A suitably large +comp_info[] array is allocated by jpeg_set_defaults(); if you choose not +to use that routine, it's up to you to allocate the array. + +int component_id + The one-byte identifier code to be recorded in the JPEG file for + this component. For the standard color spaces, we recommend you + leave the default values alone. + +int h_samp_factor +int v_samp_factor + Horizontal and vertical sampling factors for the component; must + be 1..4 according to the JPEG standard. Note that larger sampling + factors indicate a higher-resolution component; many people find + this behavior quite unintuitive. The default values are 2,2 for + luminance components and 1,1 for chrominance components, except + for grayscale where 1,1 is used. + +int quant_tbl_no + Quantization table number for component. The default value is + 0 for luminance components and 1 for chrominance components. + +int dc_tbl_no +int ac_tbl_no + DC and AC entropy coding table numbers. The default values are + 0 for luminance components and 1 for chrominance components. + +int component_index + Must equal the component's index in comp_info[]. (Beginning in + release v6, the compressor library will fill this in automatically; + you don't have to.) + + +Decompression parameter selection +--------------------------------- + +Decompression parameter selection is somewhat simpler than compression +parameter selection, since all of the JPEG internal parameters are +recorded in the source file and need not be supplied by the application. +(Unless you are working with abbreviated files, in which case see +"Abbreviated datastreams", below.) Decompression parameters control +the postprocessing done on the image to deliver it in a format suitable +for the application's use. Many of the parameters control speed/quality +tradeoffs, in which faster decompression may be obtained at the price of +a poorer-quality image. The defaults select the highest quality (slowest) +processing. + +The following fields in the JPEG object are set by jpeg_read_header() and +may be useful to the application in choosing decompression parameters: + +JDIMENSION image_width Width and height of image +JDIMENSION image_height +int num_components Number of color components +J_COLOR_SPACE jpeg_color_space Colorspace of image +boolean saw_JFIF_marker TRUE if a JFIF APP0 marker was seen + UINT8 density_unit Resolution data from JFIF marker + UINT16 X_density + UINT16 Y_density +boolean saw_Adobe_marker TRUE if an Adobe APP14 marker was seen + UINT8 Adobe_transform Color transform code from Adobe marker + +The JPEG color space, unfortunately, is something of a guess since the JPEG +standard proper does not provide a way to record it. In practice most files +adhere to the JFIF or Adobe conventions, and the decoder will recognize these +correctly. See "Special color spaces", below, for more info. + + +The decompression parameters that determine the basic properties of the +returned image are: + +J_COLOR_SPACE out_color_space + Output color space. jpeg_read_header() sets an appropriate default + based on jpeg_color_space; typically it will be RGB or grayscale. + The application can change this field to request output in a different + colorspace. For example, set it to JCS_GRAYSCALE to get grayscale + output from a color file. (This is useful for previewing: grayscale + output is faster than full color since the color components need not + be processed.) Note that not all possible color space transforms are + currently implemented; you may need to extend jdcolor.c if you want an + unusual conversion. + +unsigned int scale_num, scale_denom + Scale the image by the fraction scale_num/scale_denom. Default is + 1/1, or no scaling. Currently, the only supported scaling ratios + are 1/1, 1/2, 1/4, and 1/8. (The library design allows for arbitrary + scaling ratios but this is not likely to be implemented any time soon.) + Smaller scaling ratios permit significantly faster decoding since + fewer pixels need be processed and a simpler IDCT method can be used. + +boolean quantize_colors + If set TRUE, colormapped output will be delivered. Default is FALSE, + meaning that full-color output will be delivered. + +The next three parameters are relevant only if quantize_colors is TRUE. + +int desired_number_of_colors + Maximum number of colors to use in generating a library-supplied color + map (the actual number of colors is returned in a different field). + Default 256. Ignored when the application supplies its own color map. + +boolean two_pass_quantize + If TRUE, an extra pass over the image is made to select a custom color + map for the image. This usually looks a lot better than the one-size- + fits-all colormap that is used otherwise. Default is TRUE. Ignored + when the application supplies its own color map. + +J_DITHER_MODE dither_mode + Selects color dithering method. Supported values are: + JDITHER_NONE no dithering: fast, very low quality + JDITHER_ORDERED ordered dither: moderate speed and quality + JDITHER_FS Floyd-Steinberg dither: slow, high quality + Default is JDITHER_FS. (At present, ordered dither is implemented + only in the single-pass, standard-colormap case. If you ask for + ordered dither when two_pass_quantize is TRUE or when you supply + an external color map, you'll get F-S dithering.) + +When quantize_colors is TRUE, the target color map is described by the next +two fields. colormap is set to NULL by jpeg_read_header(). The application +can supply a color map by setting colormap non-NULL and setting +actual_number_of_colors to the map size. Otherwise, jpeg_start_decompress() +selects a suitable color map and sets these two fields itself. +[Implementation restriction: at present, an externally supplied colormap is +only accepted for 3-component output color spaces.] + +JSAMPARRAY colormap + The color map, represented as a 2-D pixel array of out_color_components + rows and actual_number_of_colors columns. Ignored if not quantizing. + CAUTION: if the JPEG library creates its own colormap, the storage + pointed to by this field is released by jpeg_finish_decompress(). + Copy the colormap somewhere else first, if you want to save it. + +int actual_number_of_colors + The number of colors in the color map. + +Additional decompression parameters that the application may set include: + +J_DCT_METHOD dct_method + Selects the algorithm used for the DCT step. Choices are the same + as described above for compression. + +boolean do_fancy_upsampling + If TRUE, do careful upsampling of chroma components. If FALSE, + a faster but sloppier method is used. Default is TRUE. The visual + impact of the sloppier method is often very small. + +boolean do_block_smoothing + If TRUE, interblock smoothing is applied in early stages of decoding + progressive JPEG files; if FALSE, not. Default is TRUE. Early + progression stages look "fuzzy" with smoothing, "blocky" without. + In any case, block smoothing ceases to be applied after the first few + AC coefficients are known to full accuracy, so it is relevant only + when using buffered-image mode for progressive images. + +boolean enable_1pass_quant +boolean enable_external_quant +boolean enable_2pass_quant + These are significant only in buffered-image mode, which is + described in its own section below. + + +The output image dimensions are given by the following fields. These are +computed from the source image dimensions and the decompression parameters +by jpeg_start_decompress(). You can also call jpeg_calc_output_dimensions() +to obtain the values that will result from the current parameter settings. +This can be useful if you are trying to pick a scaling ratio that will get +close to a desired target size. It's also important if you are using the +JPEG library's memory manager to allocate output buffer space, because you +are supposed to request such buffers *before* jpeg_start_decompress(). + +JDIMENSION output_width Actual dimensions of output image. +JDIMENSION output_height +int out_color_components Number of color components in out_color_space. +int output_components Number of color components returned. +int rec_outbuf_height Recommended height of scanline buffer. + +When quantizing colors, output_components is 1, indicating a single color map +index per pixel. Otherwise it equals out_color_components. The output arrays +are required to be output_width * output_components JSAMPLEs wide. + +rec_outbuf_height is the recommended minimum height (in scanlines) of the +buffer passed to jpeg_read_scanlines(). If the buffer is smaller, the +library will still work, but time will be wasted due to unnecessary data +copying. In high-quality modes, rec_outbuf_height is always 1, but some +faster, lower-quality modes set it to larger values (typically 2 to 4). +If you are going to ask for a high-speed processing mode, you may as well +go to the trouble of honoring rec_outbuf_height so as to avoid data copying. + + +Special color spaces +-------------------- + +The JPEG standard itself is "color blind" and doesn't specify any particular +color space. It is customary to convert color data to a luminance/chrominance +color space before compressing, since this permits greater compression. The +existing de-facto JPEG file format standards specify YCbCr or grayscale data +(JFIF), or grayscale, RGB, YCbCr, CMYK, or YCCK (Adobe). For special +applications such as multispectral images, other color spaces can be used, +but it must be understood that such files will be unportable. + +The JPEG library can handle the most common colorspace conversions (namely +RGB <=> YCbCr and CMYK <=> YCCK). It can also deal with data of an unknown +color space, passing it through without conversion. If you deal extensively +with an unusual color space, you can easily extend the library to understand +additional color spaces and perform appropriate conversions. + +For compression, the source data's color space is specified by field +in_color_space. This is transformed to the JPEG file's color space given +by jpeg_color_space. jpeg_set_defaults() chooses a reasonable JPEG color +space depending on in_color_space, but you can override this by calling +jpeg_set_colorspace(). Of course you must select a supported transformation. +jccolor.c currently supports the following transformations: + RGB => YCbCr + RGB => GRAYSCALE + YCbCr => GRAYSCALE + CMYK => YCCK +plus the null transforms: GRAYSCALE => GRAYSCALE, RGB => RGB, +YCbCr => YCbCr, CMYK => CMYK, YCCK => YCCK, and UNKNOWN => UNKNOWN. + +The de-facto file format standards (JFIF and Adobe) specify APPn markers that +indicate the color space of the JPEG file. It is important to ensure that +these are written correctly, or omitted if the JPEG file's color space is not +one of the ones supported by the de-facto standards. jpeg_set_colorspace() +will set the compression parameters to include or omit the APPn markers +properly, so long as it is told the truth about the JPEG color space. +For example, if you are writing some random 3-component color space without +conversion, don't try to fake out the library by setting in_color_space and +jpeg_color_space to JCS_YCbCr; use JCS_UNKNOWN. You may want to write an +APPn marker of your own devising to identify the colorspace --- see "Special +markers", below. + +When told that the color space is UNKNOWN, the library will default to using +luminance-quality compression parameters for all color components. You may +well want to change these parameters. See the source code for +jpeg_set_colorspace(), in jcparam.c, for details. + +For decompression, the JPEG file's color space is given in jpeg_color_space, +and this is transformed to the output color space out_color_space. +jpeg_read_header's setting of jpeg_color_space can be relied on if the file +conforms to JFIF or Adobe conventions, but otherwise it is no better than a +guess. If you know the JPEG file's color space for certain, you can override +jpeg_read_header's guess by setting jpeg_color_space. jpeg_read_header also +selects a default output color space based on (its guess of) jpeg_color_space; +set out_color_space to override this. Again, you must select a supported +transformation. jdcolor.c currently supports + YCbCr => GRAYSCALE + YCbCr => RGB + YCCK => CMYK +as well as the null transforms. + +The two-pass color quantizer, jquant2.c, is specialized to handle RGB data +(it weights distances appropriately for RGB colors). You'll need to modify +the code if you want to use it for non-RGB output color spaces. Note that +jquant2.c is used to map to an application-supplied colormap as well as for +the normal two-pass colormap selection process. + +CAUTION: it appears that Adobe Photoshop writes inverted data in CMYK JPEG +files: 0 represents 100% ink coverage, rather than 0% ink as you'd expect. +This is arguably a bug in Photoshop, but if you need to work with Photoshop +CMYK files, you will have to deal with it in your application. We cannot +"fix" this in the library by inverting the data during the CMYK<=>YCCK +transform, because that would break other applications, notably Ghostscript. +Photoshop versions prior to 3.0 write EPS files containing JPEG-encoded CMYK +data in the same inverted-YCCK representation used in bare JPEG files, but +the surrounding PostScript code performs an inversion using the PS image +operator. I am told that Photoshop 3.0 will write uninverted YCCK in +EPS/JPEG files, and will omit the PS-level inversion. (But the data +polarity used in bare JPEG files will not change in 3.0.) In either case, +the JPEG library must not invert the data itself, or else Ghostscript would +read these EPS files incorrectly. + + +Error handling +-------------- + +When the default error handler is used, any error detected inside the JPEG +routines will cause a message to be printed on stderr, followed by exit(). +You can supply your own error handling routines to override this behavior +and to control the treatment of nonfatal warnings and trace/debug messages. +The file example.c illustrates the most common case, which is to have the +application regain control after an error rather than exiting. + +The JPEG library never writes any message directly; it always goes through +the error handling routines. Three classes of messages are recognized: + * Fatal errors: the library cannot continue. + * Warnings: the library can continue, but the data is corrupt, and a + damaged output image is likely to result. + * Trace/informational messages. These come with a trace level indicating + the importance of the message; you can control the verbosity of the + program by adjusting the maximum trace level that will be displayed. + +You may, if you wish, simply replace the entire JPEG error handling module +(jerror.c) with your own code. However, you can avoid code duplication by +only replacing some of the routines depending on the behavior you need. +This is accomplished by calling jpeg_std_error() as usual, but then overriding +some of the method pointers in the jpeg_error_mgr struct, as illustrated by +example.c. + +All of the error handling routines will receive a pointer to the JPEG object +(a j_common_ptr which points to either a jpeg_compress_struct or a +jpeg_decompress_struct; if you need to tell which, test the is_decompressor +field). This struct includes a pointer to the error manager struct in its +"err" field. Frequently, custom error handler routines will need to access +additional data which is not known to the JPEG library or the standard error +handler. The most convenient way to do this is to embed either the JPEG +object or the jpeg_error_mgr struct in a larger structure that contains +additional fields; then casting the passed pointer provides access to the +additional fields. Again, see example.c for one way to do it. + +The individual methods that you might wish to override are: + +error_exit (j_common_ptr cinfo) + Receives control for a fatal error. Information sufficient to + generate the error message has been stored in cinfo->err; call + output_message to display it. Control must NOT return to the caller; + generally this routine will exit() or longjmp() somewhere. + Typically you would override this routine to get rid of the exit() + default behavior. Note that if you continue processing, you should + clean up the JPEG object with jpeg_abort() or jpeg_destroy(). + +output_message (j_common_ptr cinfo) + Actual output of any JPEG message. Override this to send messages + somewhere other than stderr. Note that this method does not know + how to generate a message, only where to send it. + +format_message (j_common_ptr cinfo, char * buffer) + Constructs a readable error message string based on the error info + stored in cinfo->err. This method is called by output_message. Few + applications should need to override this method. One possible + reason for doing so is to implement dynamic switching of error message + language. + +emit_message (j_common_ptr cinfo, int msg_level) + Decide whether or not to emit a warning or trace message; if so, + calls output_message. The main reason for overriding this method + would be to abort on warnings. msg_level is -1 for warnings, + 0 and up for trace messages. + +Only error_exit() and emit_message() are called from the rest of the JPEG +library; the other two are internal to the error handler. + +The actual message texts are stored in an array of strings which is pointed to +by the field err->jpeg_message_table. The messages are numbered from 0 to +err->last_jpeg_message, and it is these code numbers that are used in the +JPEG library code. You could replace the message texts (for instance, with +messages in French or German) by changing the message table pointer. See +jerror.h for the default texts. CAUTION: this table will almost certainly +change or grow from one library version to the next. + +It may be useful for an application to add its own message texts that are +handled by the same mechanism. The error handler supports a second "add-on" +message table for this purpose. To define an addon table, set the pointer +err->addon_message_table and the message numbers err->first_addon_message and +err->last_addon_message. If you number the addon messages beginning at 1000 +or so, you won't have to worry about conflicts with the library's built-in +messages. See the sample applications cjpeg/djpeg for an example of using +addon messages (the addon messages are defined in cderror.h). + +Actual invocation of the error handler is done via macros defined in jerror.h: + ERREXITn(...) for fatal errors + WARNMSn(...) for corrupt-data warnings + TRACEMSn(...) for trace and informational messages. +These macros store the message code and any additional parameters into the +error handler struct, then invoke the error_exit() or emit_message() method. +The variants of each macro are for varying numbers of additional parameters. +The additional parameters are inserted into the generated message using +standard printf() format codes. + +See jerror.h and jerror.c for further details. + + +Compressed data handling (source and destination managers) +---------------------------------------------------------- + +The JPEG compression library sends its compressed data to a "destination +manager" module. The default destination manager just writes the data to a +stdio stream, but you can provide your own manager to do something else. +Similarly, the decompression library calls a "source manager" to obtain the +compressed data; you can provide your own source manager if you want the data +to come from somewhere other than a stdio stream. + +In both cases, compressed data is processed a bufferload at a time: the +destination or source manager provides a work buffer, and the library invokes +the manager only when the buffer is filled or emptied. (You could define a +one-character buffer to force the manager to be invoked for each byte, but +that would be rather inefficient.) The buffer's size and location are +controlled by the manager, not by the library. For example, if you desired to +decompress a JPEG datastream that was all in memory, you could just make the +buffer pointer and length point to the original data in memory. Then the +buffer-reload procedure would be invoked only if the decompressor ran off the +end of the datastream, which would indicate an erroneous datastream. + +The work buffer is defined as an array of datatype JOCTET, which is generally +"char" or "unsigned char". On a machine where char is not exactly 8 bits +wide, you must define JOCTET as a wider data type and then modify the data +source and destination modules to transcribe the work arrays into 8-bit units +on external storage. + +A data destination manager struct contains a pointer and count defining the +next byte to write in the work buffer and the remaining free space: + + JOCTET * next_output_byte; /* => next byte to write in buffer */ + size_t free_in_buffer; /* # of byte spaces remaining in buffer */ + +The library increments the pointer and decrements the count until the buffer +is filled. The manager's empty_output_buffer method must reset the pointer +and count. The manager is expected to remember the buffer's starting address +and total size in private fields not visible to the library. + +A data destination manager provides three methods: + +init_destination (j_compress_ptr cinfo) + Initialize destination. This is called by jpeg_start_compress() + before any data is actually written. It must initialize + next_output_byte and free_in_buffer. free_in_buffer must be + initialized to a positive value. + +empty_output_buffer (j_compress_ptr cinfo) + This is called whenever the buffer has filled (free_in_buffer + reaches zero). In typical applications, it should write out the + *entire* buffer (use the saved start address and buffer length; + ignore the current state of next_output_byte and free_in_buffer). + Then reset the pointer & count to the start of the buffer, and + return TRUE indicating that the buffer has been dumped. + free_in_buffer must be set to a positive value when TRUE is + returned. A FALSE return should only be used when I/O suspension is + desired (this operating mode is discussed in the next section). + +term_destination (j_compress_ptr cinfo) + Terminate destination --- called by jpeg_finish_compress() after all + data has been written. In most applications, this must flush any + data remaining in the buffer. Use either next_output_byte or + free_in_buffer to determine how much data is in the buffer. + +term_destination() is NOT called by jpeg_abort() or jpeg_destroy(). If you +want the destination manager to be cleaned up during an abort, you must do it +yourself. + +You will also need code to create a jpeg_destination_mgr struct, fill in its +method pointers, and insert a pointer to the struct into the "dest" field of +the JPEG compression object. This can be done in-line in your setup code if +you like, but it's probably cleaner to provide a separate routine similar to +the jpeg_stdio_dest() routine of the supplied destination manager. + +Decompression source managers follow a parallel design, but with some +additional frammishes. The source manager struct contains a pointer and count +defining the next byte to read from the work buffer and the number of bytes +remaining: + + const JOCTET * next_input_byte; /* => next byte to read from buffer */ + size_t bytes_in_buffer; /* # of bytes remaining in buffer */ + +The library increments the pointer and decrements the count until the buffer +is emptied. The manager's fill_input_buffer method must reset the pointer and +count. In most applications, the manager must remember the buffer's starting +address and total size in private fields not visible to the library. + +A data source manager provides five methods: + +init_source (j_decompress_ptr cinfo) + Initialize source. This is called by jpeg_read_header() before any + data is actually read. Unlike init_destination(), it may leave + bytes_in_buffer set to 0 (in which case a fill_input_buffer() call + will occur immediately). + +fill_input_buffer (j_decompress_ptr cinfo) + This is called whenever bytes_in_buffer has reached zero and more + data is wanted. In typical applications, it should read fresh data + into the buffer (ignoring the current state of next_input_byte and + bytes_in_buffer), reset the pointer & count to the start of the + buffer, and return TRUE indicating that the buffer has been reloaded. + It is not necessary to fill the buffer entirely, only to obtain at + least one more byte. bytes_in_buffer MUST be set to a positive value + if TRUE is returned. A FALSE return should only be used when I/O + suspension is desired (this mode is discussed in the next section). + +skip_input_data (j_decompress_ptr cinfo, long num_bytes) + Skip num_bytes worth of data. The buffer pointer and count should + be advanced over num_bytes input bytes, refilling the buffer as + needed. This is used to skip over a potentially large amount of + uninteresting data (such as an APPn marker). In some applications + it may be possible to optimize away the reading of the skipped data, + but it's not clear that being smart is worth much trouble; large + skips are uncommon. bytes_in_buffer may be zero on return. + A zero or negative skip count should be treated as a no-op. + +resync_to_restart (j_decompress_ptr cinfo, int desired) + This routine is called only when the decompressor has failed to find + a restart (RSTn) marker where one is expected. Its mission is to + find a suitable point for resuming decompression. For most + applications, we recommend that you just use the default resync + procedure, jpeg_resync_to_restart(). However, if you are able to back + up in the input data stream, or if you have a-priori knowledge about + the likely location of restart markers, you may be able to do better. + Read the read_restart_marker() and jpeg_resync_to_restart() routines + in jdmarker.c if you think you'd like to implement your own resync + procedure. + +term_source (j_decompress_ptr cinfo) + Terminate source --- called by jpeg_finish_decompress() after all + data has been read. Often a no-op. + +For both fill_input_buffer() and skip_input_data(), there is no such thing +as an EOF return. If the end of the file has been reached, the routine has +a choice of exiting via ERREXIT() or inserting fake data into the buffer. +In most cases, generating a warning message and inserting a fake EOI marker +is the best course of action --- this will allow the decompressor to output +however much of the image is there. In pathological cases, the decompressor +may swallow the EOI and again demand data ... just keep feeding it fake EOIs. +jdatasrc.c illustrates the recommended error recovery behavior. + +term_source() is NOT called by jpeg_abort() or jpeg_destroy(). If you want +the source manager to be cleaned up during an abort, you must do it yourself. + +You will also need code to create a jpeg_source_mgr struct, fill in its method +pointers, and insert a pointer to the struct into the "src" field of the JPEG +decompression object. This can be done in-line in your setup code if you +like, but it's probably cleaner to provide a separate routine similar to the +jpeg_stdio_src() routine of the supplied source manager. + +For more information, consult the stdio source and destination managers +in jdatasrc.c and jdatadst.c. + + +I/O suspension +-------------- + +Some applications need to use the JPEG library as an incremental memory-to- +memory filter: when the compressed data buffer is filled or emptied, they want +control to return to the outer loop, rather than expecting that the buffer can +be emptied or reloaded within the data source/destination manager subroutine. +The library supports this need by providing an "I/O suspension" mode, which we +describe in this section. + +The I/O suspension mode is not a panacea: nothing is guaranteed about the +maximum amount of time spent in any one call to the library, so it will not +eliminate response-time problems in single-threaded applications. If you +need guaranteed response time, we suggest you "bite the bullet" and implement +a real multi-tasking capability. + +To use I/O suspension, cooperation is needed between the calling application +and the data source or destination manager; you will always need a custom +source/destination manager. (Please read the previous section if you haven't +already.) The basic idea is that the empty_output_buffer() or +fill_input_buffer() routine is a no-op, merely returning FALSE to indicate +that it has done nothing. Upon seeing this, the JPEG library suspends +operation and returns to its caller. The surrounding application is +responsible for emptying or refilling the work buffer before calling the +JPEG library again. + +Compression suspension: + +For compression suspension, use an empty_output_buffer() routine that returns +FALSE; typically it will not do anything else. This will cause the +compressor to return to the caller of jpeg_write_scanlines(), with the return +value indicating that not all the supplied scanlines have been accepted. +The application must make more room in the output buffer, adjust the output +buffer pointer/count appropriately, and then call jpeg_write_scanlines() +again, pointing to the first unconsumed scanline. + +When forced to suspend, the compressor will backtrack to a convenient stopping +point (usually the start of the current MCU); it will regenerate some output +data when restarted. Therefore, although empty_output_buffer() is only +called when the buffer is filled, you should NOT write out the entire buffer +after a suspension. Write only the data up to the current position of +next_output_byte/free_in_buffer. The data beyond that point will be +regenerated after resumption. + +Because of the backtracking behavior, a good-size output buffer is essential +for efficiency; you don't want the compressor to suspend often. (In fact, an +overly small buffer could lead to infinite looping, if a single MCU required +more data than would fit in the buffer.) We recommend a buffer of at least +several Kbytes. You may want to insert explicit code to ensure that you don't +call jpeg_write_scanlines() unless there is a reasonable amount of space in +the output buffer; in other words, flush the buffer before trying to compress +more data. + +The compressor does not allow suspension while it is trying to write JPEG +markers at the beginning and end of the file. This means that: + * At the beginning of a compression operation, there must be enough free + space in the output buffer to hold the header markers (typically 600 or + so bytes). The recommended buffer size is bigger than this anyway, so + this is not a problem as long as you start with an empty buffer. However, + this restriction might catch you if you insert large special markers, such + as a JFIF thumbnail image, without flushing the buffer afterwards. + * When you call jpeg_finish_compress(), there must be enough space in the + output buffer to emit any buffered data and the final EOI marker. In the + current implementation, half a dozen bytes should suffice for this, but + for safety's sake we recommend ensuring that at least 100 bytes are free + before calling jpeg_finish_compress(). + +A more significant restriction is that jpeg_finish_compress() cannot suspend. +This means you cannot use suspension with multi-pass operating modes, namely +Huffman code optimization and multiple-scan output. Those modes write the +whole file during jpeg_finish_compress(), which will certainly result in +buffer overrun. (Note that this restriction applies only to compression, +not decompression. The decompressor supports input suspension in all of its +operating modes.) + +Decompression suspension: + +For decompression suspension, use a fill_input_buffer() routine that simply +returns FALSE (except perhaps during error recovery, as discussed below). +This will cause the decompressor to return to its caller with an indication +that suspension has occurred. This can happen at four places: + * jpeg_read_header(): will return JPEG_SUSPENDED. + * jpeg_start_decompress(): will return FALSE, rather than its usual TRUE. + * jpeg_read_scanlines(): will return the number of scanlines already + completed (possibly 0). + * jpeg_finish_decompress(): will return FALSE, rather than its usual TRUE. +The surrounding application must recognize these cases, load more data into +the input buffer, and repeat the call. In the case of jpeg_read_scanlines(), +increment the passed pointers past any scanlines successfully read. + +Just as with compression, the decompressor will typically backtrack to a +convenient restart point before suspending. When fill_input_buffer() is +called, next_input_byte/bytes_in_buffer point to the current restart point, +which is where the decompressor will backtrack to if FALSE is returned. +The data beyond that position must NOT be discarded if you suspend; it needs +to be re-read upon resumption. In most implementations, you'll need to shift +this data down to the start of your work buffer and then load more data after +it. Again, this behavior means that a several-Kbyte work buffer is essential +for decent performance; furthermore, you should load a reasonable amount of +new data before resuming decompression. (If you loaded, say, only one new +byte each time around, you could waste a LOT of cycles.) + +The skip_input_data() source manager routine requires special care in a +suspension scenario. This routine is NOT granted the ability to suspend the +decompressor; it can decrement bytes_in_buffer to zero, but no more. If the +requested skip distance exceeds the amount of data currently in the input +buffer, then skip_input_data() must set bytes_in_buffer to zero and record the +additional skip distance somewhere else. The decompressor will immediately +call fill_input_buffer(), which should return FALSE, which will cause a +suspension return. The surrounding application must then arrange to discard +the recorded number of bytes before it resumes loading the input buffer. +(Yes, this design is rather baroque, but it avoids complexity in the far more +common case where a non-suspending source manager is used.) + +If the input data has been exhausted, we recommend that you emit a warning +and insert dummy EOI markers just as a non-suspending data source manager +would do. This can be handled either in the surrounding application logic or +within fill_input_buffer(); the latter is probably more efficient. If +fill_input_buffer() knows that no more data is available, it can set the +pointer/count to point to a dummy EOI marker and then return TRUE just as +though it had read more data in a non-suspending situation. + +The decompressor does not attempt to suspend within any JPEG marker; it will +backtrack to the start of the marker. Hence the input buffer must be large +enough to hold the longest marker in the file. We recommend at least a 2K +buffer. The buffer would need to be 64K to allow for arbitrary COM or APPn +markers, but the decompressor does not actually try to read these; it just +skips them by calling skip_input_data(). If you provide a special marker +handling routine that does look at such markers, coping with buffer overflow +is your problem. Ordinary JPEG markers should normally not exceed a few +hundred bytes each (DHT tables are typically the longest). For robustness +against damaged marker length counts, you may wish to insert a test in your +application for the case that the input buffer is completely full and yet the +decoder has suspended without consuming any data --- otherwise, if this +situation did occur, it would lead to an endless loop. + +Multiple-buffer management: + +In some applications it is desirable to store the compressed data in a linked +list of buffer areas, so as to avoid data copying. This can be handled by +having empty_output_buffer() or fill_input_buffer() set the pointer and count +to reference the next available buffer; FALSE is returned only if no more +buffers are available. Although seemingly straightforward, there is a +pitfall in this approach: the backtrack that occurs when FALSE is returned +could back up into an earlier buffer. For example, when fill_input_buffer() +is called, the current pointer & count indicate the backtrack restart point. +Since fill_input_buffer() will set the pointer and count to refer to a new +buffer, the restart position must be saved somewhere else. Suppose a second +call to fill_input_buffer() occurs in the same library call, and no +additional input data is available, so fill_input_buffer must return FALSE. +If the JPEG library has not moved the pointer/count forward in the current +buffer, then *the correct restart point is the saved position in the prior +buffer*. Prior buffers may be discarded only after the library establishes +a restart point within a later buffer. Similar remarks apply for output into +a chain of buffers. + +The library will never attempt to backtrack over a skip_input_data() call, +so any skipped data can be permanently discarded. You still have to deal +with the case of skipping not-yet-received data, however. + +It's much simpler to use only a single buffer; when fill_input_buffer() is +called, move any unconsumed data (beyond the current pointer/count) down to +the beginning of this buffer and then load new data into the remaining buffer +space. This approach requires a little more data copying but is far easier +to get right. + + +Progressive JPEG support +------------------------ + +Progressive JPEG rearranges the stored data into a series of scans of +increasing quality. In situations where a JPEG file is transmitted across a +slow communications link, a decoder can generate a low-quality image very +quickly from the first scan, then gradually improve the displayed quality as +more scans are received. The final image after all scans are complete is +identical to that of a regular (sequential) JPEG file of the same quality +setting. Progressive JPEG files are often slightly smaller than equivalent +sequential JPEG files, but the possibility of incremental display is the main +reason for using progressive JPEG. + +The IJG encoder library generates progressive JPEG files when given a +suitable "scan script" defining how to divide the data into scans. +Creation of progressive JPEG files is otherwise transparent to the encoder. +Progressive JPEG files can also be read transparently by the decoder library. +If the decoding application simply uses the library as defined above, it +will receive a final decoded image without any indication that the file was +progressive. Of course, this approach does not allow incremental display. +To perform incremental display, an application needs to use the decoder +library's "buffered-image" mode, in which it receives a decoded image +multiple times. + +Each displayed scan requires about as much work to decode as a full JPEG +image of the same size, so the decoder must be fairly fast in relation to the +data transmission rate in order to make incremental display useful. However, +it is possible to skip displaying the image and simply add the incoming bits +to the decoder's coefficient buffer. This is fast because only Huffman +decoding need be done, not IDCT, upsampling, colorspace conversion, etc. +The IJG decoder library allows the application to switch dynamically between +displaying the image and simply absorbing the incoming bits. A properly +coded application can automatically adapt the number of display passes to +suit the time available as the image is received. Also, a final +higher-quality display cycle can be performed from the buffered data after +the end of the file is reached. + +Progressive compression: + +To create a progressive JPEG file (or a multiple-scan sequential JPEG file), +set the scan_info cinfo field to point to an array of scan descriptors, and +perform compression as usual. Instead of constructing your own scan list, +you can call the jpeg_simple_progression() helper routine to create a +recommended progression sequence; this method should be used by all +applications that don't want to get involved in the nitty-gritty of +progressive scan sequence design. (If you want to provide user control of +scan sequences, you may wish to borrow the scan script reading code found +in rdswitch.c, so that you can read scan script files just like cjpeg's.) +When scan_info is not NULL, the compression library will store DCT'd data +into a buffer array as jpeg_write_scanlines() is called, and will emit all +the requested scans during jpeg_finish_compress(). This implies that +multiple-scan output cannot be created with a suspending data destination +manager, since jpeg_finish_compress() does not support suspension. We +should also note that the compressor currently forces Huffman optimization +mode when creating a progressive JPEG file, because the default Huffman +tables are unsuitable for progressive files. + +Progressive decompression: + +When buffered-image mode is not used, the decoder library will read all of +a multi-scan file during jpeg_start_decompress(), so that it can provide a +final decoded image. (Here "multi-scan" means either progressive or +multi-scan sequential.) This makes multi-scan files transparent to the +decoding application. However, existing applications that used suspending +input with version 5 of the IJG library will need to be modified to check +for a suspension return from jpeg_start_decompress(). + +To perform incremental display, an application must use the library's +buffered-image mode. This is described in the next section. + + +Buffered-image mode +------------------- + +In buffered-image mode, the library stores the partially decoded image in a +coefficient buffer, from which it can be read out as many times as desired. +This mode is typically used for incremental display of progressive JPEG files, +but it can be used with any JPEG file. Each scan of a progressive JPEG file +adds more data (more detail) to the buffered image. The application can +display in lockstep with the source file (one display pass per input scan), +or it can allow input processing to outrun display processing. By making +input and display processing run independently, it is possible for the +application to adapt progressive display to a wide range of data transmission +rates. + +The basic control flow for buffered-image decoding is + + jpeg_create_decompress() + set data source + jpeg_read_header() + set overall decompression parameters + cinfo.buffered_image = TRUE; /* select buffered-image mode */ + jpeg_start_decompress() + for (each output pass) { + adjust output decompression parameters if required + jpeg_start_output() /* start a new output pass */ + for (all scanlines in image) { + jpeg_read_scanlines() + display scanlines + } + jpeg_finish_output() /* terminate output pass */ + } + jpeg_finish_decompress() + jpeg_destroy_decompress() + +This differs from ordinary unbuffered decoding in that there is an additional +level of looping. The application can choose how many output passes to make +and how to display each pass. + +The simplest approach to displaying progressive images is to do one display +pass for each scan appearing in the input file. In this case the outer loop +condition is typically + while (! jpeg_input_complete(&cinfo)) +and the start-output call should read + jpeg_start_output(&cinfo, cinfo.input_scan_number); +The second parameter to jpeg_start_output() indicates which scan of the input +file is to be displayed; the scans are numbered starting at 1 for this +purpose. (You can use a loop counter starting at 1 if you like, but using +the library's input scan counter is easier.) The library automatically reads +data as necessary to complete each requested scan, and jpeg_finish_output() +advances to the next scan or end-of-image marker (hence input_scan_number +will be incremented by the time control arrives back at jpeg_start_output()). +With this technique, data is read from the input file only as needed, and +input and output processing run in lockstep. + +After reading the final scan and reaching the end of the input file, the +buffered image remains available; it can be read additional times by +repeating the jpeg_start_output()/jpeg_read_scanlines()/jpeg_finish_output() +sequence. For example, a useful technique is to use fast one-pass color +quantization for display passes made while the image is arriving, followed by +a final display pass using two-pass quantization for highest quality. This +is done by changing the library parameters before the final output pass. +Changing parameters between passes is discussed in detail below. + +In general the last scan of a progressive file cannot be recognized as such +until after it is read, so a post-input display pass is the best approach if +you want special processing in the final pass. + +When done with the image, be sure to call jpeg_finish_decompress() to release +the buffered image (or just use jpeg_destroy_decompress()). + +If input data arrives faster than it can be displayed, the application can +cause the library to decode input data in advance of what's needed to produce +output. This is done by calling the routine jpeg_consume_input(). +The return value is one of the following: + JPEG_REACHED_SOS: reached an SOS marker (the start of a new scan) + JPEG_REACHED_EOI: reached the EOI marker (end of image) + JPEG_ROW_COMPLETED: completed reading one MCU row of compressed data + JPEG_SCAN_COMPLETED: completed reading last MCU row of current scan + JPEG_SUSPENDED: suspended before completing any of the above +(JPEG_SUSPENDED can occur only if a suspending data source is used.) This +routine can be called at any time after initializing the JPEG object. It +reads some additional data and returns when one of the indicated significant +events occurs. (If called after the EOI marker is reached, it will +immediately return JPEG_REACHED_EOI without attempting to read more data.) + +The library's output processing will automatically call jpeg_consume_input() +whenever the output processing overtakes the input; thus, simple lockstep +display requires no direct calls to jpeg_consume_input(). But by adding +calls to jpeg_consume_input(), you can absorb data in advance of what is +being displayed. This has two benefits: + * You can limit buildup of unprocessed data in your input buffer. + * You can eliminate extra display passes by paying attention to the + state of the library's input processing. + +The first of these benefits only requires interspersing calls to +jpeg_consume_input() with your display operations and any other processing +you may be doing. To avoid wasting cycles due to backtracking, it's best to +call jpeg_consume_input() only after a hundred or so new bytes have arrived. +This is discussed further under "I/O suspension", above. (Note: the JPEG +library currently is not thread-safe. You must not call jpeg_consume_input() +from one thread of control if a different library routine is working on the +same JPEG object in another thread.) + +When input arrives fast enough that more than one new scan is available +before you start a new output pass, you may as well skip the output pass +corresponding to the completed scan. This occurs for free if you pass +cinfo.input_scan_number as the target scan number to jpeg_start_output(). +The input_scan_number field is simply the index of the scan currently being +consumed by the input processor. You can ensure that this is up-to-date by +emptying the input buffer just before calling jpeg_start_output(): call +jpeg_consume_input() repeatedly until it returns JPEG_SUSPENDED or +JPEG_REACHED_EOI. + +The target scan number passed to jpeg_start_output() is saved in the +cinfo.output_scan_number field. The library's output processing calls +jpeg_consume_input() whenever the current input scan number and row within +that scan is less than or equal to the current output scan number and row. +Thus, input processing can "get ahead" of the output processing but is not +allowed to "fall behind". You can achieve several different effects by +manipulating this interlock rule. For example, if you pass a target scan +number greater than the current input scan number, the output processor will +wait until that scan starts to arrive before producing any output. (To avoid +an infinite loop, the target scan number is automatically reset to the last +scan number when the end of image is reached. Thus, if you specify a large +target scan number, the library will just absorb the entire input file and +then perform an output pass. This is effectively the same as what +jpeg_start_decompress() does when you don't select buffered-image mode.) +When you pass a target scan number equal to the current input scan number, +the image is displayed no faster than the current input scan arrives. The +final possibility is to pass a target scan number less than the current input +scan number; this disables the input/output interlock and causes the output +processor to simply display whatever it finds in the image buffer, without +waiting for input. (However, the library will not accept a target scan +number less than one, so you can't avoid waiting for the first scan.) + +When data is arriving faster than the output display processing can advance +through the image, jpeg_consume_input() will store data into the buffered +image beyond the point at which the output processing is reading data out +again. If the input arrives fast enough, it may "wrap around" the buffer to +the point where the input is more than one whole scan ahead of the output. +If the output processing simply proceeds through its display pass without +paying attention to the input, the effect seen on-screen is that the lower +part of the image is one or more scans better in quality than the upper part. +Then, when the next output scan is started, you have a choice of what target +scan number to use. The recommended choice is to use the current input scan +number at that time, which implies that you've skipped the output scans +corresponding to the input scans that were completed while you processed the +previous output scan. In this way, the decoder automatically adapts its +speed to the arriving data, by skipping output scans as necessary to keep up +with the arriving data. + +When using this strategy, you'll want to be sure that you perform a final +output pass after receiving all the data; otherwise your last display may not +be full quality across the whole screen. So the right outer loop logic is +something like this: + do { + absorb any waiting input by calling jpeg_consume_input() + final_pass = jpeg_input_complete(&cinfo); + adjust output decompression parameters if required + jpeg_start_output(&cinfo, cinfo.input_scan_number); + ... + jpeg_finish_output() + } while (! final_pass); +rather than quitting as soon as jpeg_input_complete() returns TRUE. This +arrangement makes it simple to use higher-quality decoding parameters +for the final pass. But if you don't want to use special parameters for +the final pass, the right loop logic is like this: + for (;;) { + absorb any waiting input by calling jpeg_consume_input() + jpeg_start_output(&cinfo, cinfo.input_scan_number); + ... + jpeg_finish_output() + if (jpeg_input_complete(&cinfo) && + cinfo.input_scan_number == cinfo.output_scan_number) + break; + } +In this case you don't need to know in advance whether an output pass is to +be the last one, so it's not necessary to have reached EOF before starting +the final output pass; rather, what you want to test is whether the output +pass was performed in sync with the final input scan. This form of the loop +will avoid an extra output pass whenever the decoder is able (or nearly able) +to keep up with the incoming data. + +When the data transmission speed is high, you might begin a display pass, +then find that much or all of the file has arrived before you can complete +the pass. (You can detect this by noting the JPEG_REACHED_EOI return code +from jpeg_consume_input(), or equivalently by testing jpeg_input_complete().) +In this situation you may wish to abort the current display pass and start a +new one using the newly arrived information. To do so, just call +jpeg_finish_output() and then start a new pass with jpeg_start_output(). + +A variant strategy is to abort and restart display if more than one complete +scan arrives during an output pass; this can be detected by noting +JPEG_REACHED_SOS returns and/or examining cinfo.input_scan_number. This +idea should be employed with caution, however, since the display process +might never get to the bottom of the image before being aborted, resulting +in the lower part of the screen being several passes worse than the upper. +In most cases it's probably best to abort an output pass only if the whole +file has arrived and you want to begin the final output pass immediately. + +When receiving data across a communication link, we recommend always using +the current input scan number for the output target scan number; if a +higher-quality final pass is to be done, it should be started (aborting any +incomplete output pass) as soon as the end of file is received. However, +many other strategies are possible. For example, the application can examine +the parameters of the current input scan and decide whether to display it or +not. If the scan contains only chroma data, one might choose not to use it +as the target scan, expecting that the scan will be small and will arrive +quickly. To skip to the next scan, call jpeg_consume_input() until it +returns JPEG_REACHED_SOS or JPEG_REACHED_EOI. Or just use the next higher +number as the target scan for jpeg_start_output(); but that method doesn't +let you inspect the next scan's parameters before deciding to display it. + + +In buffered-image mode, jpeg_start_decompress() never performs input and +thus never suspends. An application that uses input suspension with +buffered-image mode must be prepared for suspension returns from these +routines: +* jpeg_start_output() performs input only if you request 2-pass quantization + and the target scan isn't fully read yet. (This is discussed below.) +* jpeg_read_scanlines(), as always, returns the number of scanlines that it + was able to produce before suspending. +* jpeg_finish_output() will read any markers following the target scan, + up to the end of the file or the SOS marker that begins another scan. + (But it reads no input if jpeg_consume_input() has already reached the + end of the file or a SOS marker beyond the target output scan.) +* jpeg_finish_decompress() will read until the end of file, and thus can + suspend if the end hasn't already been reached (as can be tested by + calling jpeg_input_complete()). +jpeg_start_output(), jpeg_finish_output(), and jpeg_finish_decompress() +all return TRUE if they completed their tasks, FALSE if they had to suspend. +In the event of a FALSE return, the application must load more input data +and repeat the call. Applications that use non-suspending data sources need +not check the return values of these three routines. + + +It is possible to change decoding parameters between output passes in the +buffered-image mode. The decoder library currently supports only very +limited changes of parameters. ONLY THE FOLLOWING parameter changes are +allowed after jpeg_start_decompress() is called: +* dct_method can be changed before each call to jpeg_start_output(). + For example, one could use a fast DCT method for early scans, changing + to a higher quality method for the final scan. +* dither_mode can be changed before each call to jpeg_start_output(); + of course this has no impact if not using color quantization. Typically + one would use ordered dither for initial passes, then switch to + Floyd-Steinberg dither for the final pass. Caution: changing dither mode + can cause more memory to be allocated by the library. Although the amount + of memory involved is not large (a scanline or so), it may cause the + initial max_memory_to_use specification to be exceeded, which in the worst + case would result in an out-of-memory failure. +* do_block_smoothing can be changed before each call to jpeg_start_output(). + This setting is relevant only when decoding a progressive JPEG image. + During the first DC-only scan, block smoothing provides a very "fuzzy" look + instead of the very "blocky" look seen without it; which is better seems a + matter of personal taste. But block smoothing is nearly always a win + during later stages, especially when decoding a successive-approximation + image: smoothing helps to hide the slight blockiness that otherwise shows + up on smooth gradients until the lowest coefficient bits are sent. +* Color quantization mode can be changed under the rules described below. + You *cannot* change between full-color and quantized output (because that + would alter the required I/O buffer sizes), but you can change which + quantization method is used. + +When generating color-quantized output, changing quantization method is a +very useful way of switching between high-speed and high-quality display. +The library allows you to change among its three quantization methods: +1. Single-pass quantization to a fixed color cube. + Selected by cinfo.two_pass_quantize = FALSE and cinfo.colormap = NULL. +2. Single-pass quantization to an application-supplied colormap. + Selected by setting cinfo.colormap to point to the colormap (the value of + two_pass_quantize is ignored); also set cinfo.actual_number_of_colors. +3. Two-pass quantization to a colormap chosen specifically for the image. + Selected by cinfo.two_pass_quantize = TRUE and cinfo.colormap = NULL. + (This is the default setting selected by jpeg_read_header, but it is + probably NOT what you want for the first pass of progressive display!) +These methods offer successively better quality and lesser speed. However, +only the first method is available for quantizing in non-RGB color spaces. + +IMPORTANT: because the different quantizer methods have very different +working-storage requirements, the library requires you to indicate which +one(s) you intend to use before you call jpeg_start_decompress(). (If we did +not require this, the max_memory_to_use setting would be a complete fiction.) +You do this by setting one or more of these three cinfo fields to TRUE: + enable_1pass_quant Fixed color cube colormap + enable_external_quant Externally-supplied colormap + enable_2pass_quant Two-pass custom colormap +All three are initialized FALSE by jpeg_read_header(). But +jpeg_start_decompress() automatically sets TRUE the one selected by the +current two_pass_quantize and colormap settings, so you only need to set the +enable flags for any other quantization methods you plan to change to later. + +After setting the enable flags correctly at jpeg_start_decompress() time, you +can change to any enabled quantization method by setting two_pass_quantize +and colormap properly just before calling jpeg_start_output(). The following +special rules apply: +1. You must explicitly set cinfo.colormap to NULL when switching to 1-pass + or 2-pass mode from a different mode, or when you want the 2-pass + quantizer to be re-run to generate a new colormap. +2. To switch to an external colormap, or to change to a different external + colormap than was used on the prior pass, you must call + jpeg_new_colormap() after setting cinfo.colormap. +NOTE: if you want to use the same colormap as was used in the prior pass, +you should not do either of these things. This will save some nontrivial +switchover costs. +(These requirements exist because cinfo.colormap will always be non-NULL +after completing a prior output pass, since both the 1-pass and 2-pass +quantizers set it to point to their output colormaps. Thus you have to +do one of these two things to notify the library that something has changed. +Yup, it's a bit klugy, but it's necessary to do it this way for backwards +compatibility.) + +Note that in buffered-image mode, the library generates any requested colormap +during jpeg_start_output(), not during jpeg_start_decompress(). + +When using two-pass quantization, jpeg_start_output() makes a pass over the +buffered image to determine the optimum color map; it therefore may take a +significant amount of time, whereas ordinarily it does little work. The +progress monitor hook is called during this pass, if defined. It is also +important to realize that if the specified target scan number is greater than +or equal to the current input scan number, jpeg_start_output() will attempt +to consume input as it makes this pass. If you use a suspending data source, +you need to check for a FALSE return from jpeg_start_output() under these +conditions. The combination of 2-pass quantization and a not-yet-fully-read +target scan is the only case in which jpeg_start_output() will consume input. + + +Application authors who support buffered-image mode may be tempted to use it +for all JPEG images, even single-scan ones. This will work, but it is +inefficient: there is no need to create an image-sized coefficient buffer for +single-scan images. Requesting buffered-image mode for such an image wastes +memory. Worse, it can cost time on large images, since the buffered data has +to be swapped out or written to a temporary file. If you are concerned about +maximum performance on baseline JPEG files, you should use buffered-image +mode only when the incoming file actually has multiple scans. This can be +tested by calling jpeg_has_multiple_scans(), which will return a correct +result at any time after jpeg_read_header() completes. + +It is also worth noting that when you use jpeg_consume_input() to let input +processing get ahead of output processing, the resulting pattern of access to +the coefficient buffer is quite nonsequential. It's best to use the memory +manager jmemnobs.c if you can (ie, if you have enough real or virtual main +memory). If not, at least make sure that max_memory_to_use is set as high as +possible. If the JPEG memory manager has to use a temporary file, you will +probably see a lot of disk traffic and poor performance. (This could be +improved with additional work on the memory manager, but we haven't gotten +around to it yet.) + +In some applications it may be convenient to use jpeg_consume_input() for all +input processing, including reading the initial markers; that is, you may +wish to call jpeg_consume_input() instead of jpeg_read_header() during +startup. This works, but note that you must check for JPEG_REACHED_SOS and +JPEG_REACHED_EOI return codes as the equivalent of jpeg_read_header's codes. +Once the first SOS marker has been reached, you must call +jpeg_start_decompress() before jpeg_consume_input() will consume more input; +it'll just keep returning JPEG_REACHED_SOS until you do. If you read a +tables-only file this way, jpeg_consume_input() will return JPEG_REACHED_EOI +without ever returning JPEG_REACHED_SOS; be sure to check for this case. +If this happens, the decompressor will not read any more input until you call +jpeg_abort() to reset it. It is OK to call jpeg_consume_input() even when not +using buffered-image mode, but in that case it's basically a no-op after the +initial markers have been read: it will just return JPEG_SUSPENDED. + + +Abbreviated datastreams and multiple images +------------------------------------------- + +A JPEG compression or decompression object can be reused to process multiple +images. This saves a small amount of time per image by eliminating the +"create" and "destroy" operations, but that isn't the real purpose of the +feature. Rather, reuse of an object provides support for abbreviated JPEG +datastreams. Object reuse can also simplify processing a series of images in +a single input or output file. This section explains these features. + +A JPEG file normally contains several hundred bytes worth of quantization +and Huffman tables. In a situation where many images will be stored or +transmitted with identical tables, this may represent an annoying overhead. +The JPEG standard therefore permits tables to be omitted. The standard +defines three classes of JPEG datastreams: + * "Interchange" datastreams contain an image and all tables needed to decode + the image. These are the usual kind of JPEG file. + * "Abbreviated image" datastreams contain an image, but are missing some or + all of the tables needed to decode that image. + * "Abbreviated table specification" (henceforth "tables-only") datastreams + contain only table specifications. +To decode an abbreviated image, it is necessary to load the missing table(s) +into the decoder beforehand. This can be accomplished by reading a separate +tables-only file. A variant scheme uses a series of images in which the first +image is an interchange (complete) datastream, while subsequent ones are +abbreviated and rely on the tables loaded by the first image. It is assumed +that once the decoder has read a table, it will remember that table until a +new definition for the same table number is encountered. + +It is the application designer's responsibility to figure out how to associate +the correct tables with an abbreviated image. While abbreviated datastreams +can be useful in a closed environment, their use is strongly discouraged in +any situation where data exchange with other applications might be needed. +Caveat designer. + +The JPEG library provides support for reading and writing any combination of +tables-only datastreams and abbreviated images. In both compression and +decompression objects, a quantization or Huffman table will be retained for +the lifetime of the object, unless it is overwritten by a new table definition. + + +To create abbreviated image datastreams, it is only necessary to tell the +compressor not to emit some or all of the tables it is using. Each +quantization and Huffman table struct contains a boolean field "sent_table", +which normally is initialized to FALSE. For each table used by the image, the +header-writing process emits the table and sets sent_table = TRUE unless it is +already TRUE. (In normal usage, this prevents outputting the same table +definition multiple times, as would otherwise occur because the chroma +components typically share tables.) Thus, setting this field to TRUE before +calling jpeg_start_compress() will prevent the table from being written at +all. + +If you want to create a "pure" abbreviated image file containing no tables, +just call "jpeg_suppress_tables(&cinfo, TRUE)" after constructing all the +tables. If you want to emit some but not all tables, you'll need to set the +individual sent_table fields directly. + +To create an abbreviated image, you must also call jpeg_start_compress() +with a second parameter of FALSE, not TRUE. Otherwise jpeg_start_compress() +will force all the sent_table fields to FALSE. (This is a safety feature to +prevent abbreviated images from being created accidentally.) + +To create a tables-only file, perform the same parameter setup that you +normally would, but instead of calling jpeg_start_compress() and so on, call +jpeg_write_tables(&cinfo). This will write an abbreviated datastream +containing only SOI, DQT and/or DHT markers, and EOI. All the quantization +and Huffman tables that are currently defined in the compression object will +be emitted unless their sent_tables flag is already TRUE, and then all the +sent_tables flags will be set TRUE. + +A sure-fire way to create matching tables-only and abbreviated image files +is to proceed as follows: + + create JPEG compression object + set JPEG parameters + set destination to tables-only file + jpeg_write_tables(&cinfo); + set destination to image file + jpeg_start_compress(&cinfo, FALSE); + write data... + jpeg_finish_compress(&cinfo); + +Since the JPEG parameters are not altered between writing the table file and +the abbreviated image file, the same tables are sure to be used. Of course, +you can repeat the jpeg_start_compress() ... jpeg_finish_compress() sequence +many times to produce many abbreviated image files matching the table file. + +You cannot suppress output of the computed Huffman tables when Huffman +optimization is selected. (If you could, there'd be no way to decode the +image...) Generally, you don't want to set optimize_coding = TRUE when +you are trying to produce abbreviated files. + +In some cases you might want to compress an image using tables which are +not stored in the application, but are defined in an interchange or +tables-only file readable by the application. This can be done by setting up +a JPEG decompression object to read the specification file, then copying the +tables into your compression object. See jpeg_copy_critical_parameters() +for an example of copying quantization tables. + + +To read abbreviated image files, you simply need to load the proper tables +into the decompression object before trying to read the abbreviated image. +If the proper tables are stored in the application program, you can just +allocate the table structs and fill in their contents directly. More commonly +you'd want to read the tables from a tables-only file. The jpeg_read_header() +call is sufficient to read a tables-only file. You must pass a second +parameter of FALSE to indicate that you do not require an image to be present. +Thus, the typical scenario is + + create JPEG decompression object + set source to tables-only file + jpeg_read_header(&cinfo, FALSE); + set source to abbreviated image file + jpeg_read_header(&cinfo, TRUE); + set decompression parameters + jpeg_start_decompress(&cinfo); + read data... + jpeg_finish_decompress(&cinfo); + +In some cases, you may want to read a file without knowing whether it contains +an image or just tables. In that case, pass FALSE and check the return value +from jpeg_read_header(): it will be JPEG_HEADER_OK if an image was found, +JPEG_HEADER_TABLES_ONLY if only tables were found. (A third return value, +JPEG_SUSPENDED, is possible when using a suspending data source manager.) +Note that jpeg_read_header() will not complain if you read an abbreviated +image for which you haven't loaded the missing tables; the missing-table check +occurs later, in jpeg_start_decompress(). + + +It is possible to read a series of images from a single source file by +repeating the jpeg_read_header() ... jpeg_finish_decompress() sequence, +without releasing/recreating the JPEG object or the data source module. +(If you did reinitialize, any partial bufferload left in the data source +buffer at the end of one image would be discarded, causing you to lose the +start of the next image.) When you use this method, stored tables are +automatically carried forward, so some of the images can be abbreviated images +that depend on tables from earlier images. + +If you intend to write a series of images into a single destination file, +you might want to make a specialized data destination module that doesn't +flush the output buffer at term_destination() time. This would speed things +up by some trifling amount. Of course, you'd need to remember to flush the +buffer after the last image. You can make the later images be abbreviated +ones by passing FALSE to jpeg_start_compress(). + + +Special markers +--------------- + +Some applications may need to insert or extract special data in the JPEG +datastream. The JPEG standard provides marker types "COM" (comment) and +"APP0" through "APP15" (application) to hold application-specific data. +Unfortunately, the use of these markers is not specified by the standard. +COM markers are fairly widely used to hold user-supplied text. The JFIF file +format spec uses APP0 markers with specified initial strings to hold certain +data. Adobe applications use APP14 markers beginning with the string "Adobe" +for miscellaneous data. Other APPn markers are rarely seen, but might +contain almost anything. + +If you wish to store user-supplied text, we recommend you use COM markers +and place readable 7-bit ASCII text in them. Newline conventions are not +standardized --- expect to find LF (Unix style), CR/LF (DOS style), or CR +(Mac style). A robust COM reader should be able to cope with random binary +garbage, including nulls, since some applications generate COM markers +containing non-ASCII junk. (But yours should not be one of them.) + +For program-supplied data, use an APPn marker, and be sure to begin it with an +identifying string so that you can tell whether the marker is actually yours. +It's probably best to avoid using APP0 or APP14 for any private markers. +(NOTE: the upcoming SPIFF standard will use APP8 markers; we recommend you +not use APP8 markers for any private purposes, either.) + +Keep in mind that at most 65533 bytes can be put into one marker, but you +can have as many markers as you like. + +By default, the IJG compression library will write a JFIF APP0 marker if the +selected JPEG colorspace is grayscale or YCbCr, or an Adobe APP14 marker if +the selected colorspace is RGB, CMYK, or YCCK. You can disable this, but +we don't recommend it. The decompression library will recognize JFIF and +Adobe markers and will set the JPEG colorspace properly when one is found. + +You can write special markers immediately following the datastream header by +calling jpeg_write_marker() after jpeg_start_compress() and before the first +call to jpeg_write_scanlines(). When you do this, the markers appear after +the SOI and the JFIF APP0 and Adobe APP14 markers (if written), but before +all else. Specify the marker type parameter as "JPEG_COM" for COM or +"JPEG_APP0 + n" for APPn. (Actually, jpeg_write_marker will let you write +any marker type, but we don't recommend writing any other kinds of marker.) +For example, to write a user comment string pointed to by comment_text: + jpeg_write_marker(cinfo, JPEG_COM, comment_text, strlen(comment_text)); +Or if you prefer to synthesize the marker byte sequence yourself, you can +just cram it straight into the data destination module. + +For decompression, you can supply your own routine to process COM or APPn +markers by calling jpeg_set_marker_processor(). Usually you'd call this +after creating a decompression object and before calling jpeg_read_header(), +because the markers of interest will normally be scanned by jpeg_read_header. +Once you've supplied a routine, it will be used for the life of that +decompression object. A separate routine may be registered for COM and for +each APPn marker code. + +A marker processor routine must have the signature + boolean jpeg_marker_parser_method (j_decompress_ptr cinfo) +Although the marker code is not explicitly passed, the routine can find it +in cinfo->unread_marker. At the time of call, the marker proper has been +read from the data source module. The processor routine is responsible for +reading the marker length word and the remaining parameter bytes, if any. +Return TRUE to indicate success. (FALSE should be returned only if you are +using a suspending data source and it tells you to suspend. See the standard +marker processors in jdmarker.c for appropriate coding methods if you need to +use a suspending data source.) + +If you override the default APP0 or APP14 processors, it is up to you to +recognize JFIF and Adobe markers if you want colorspace recognition to occur +properly. We recommend copying and extending the default processors if you +want to do that. + +A simple example of an external COM processor can be found in djpeg.c. + + +Raw (downsampled) image data +---------------------------- + +Some applications need to supply already-downsampled image data to the JPEG +compressor, or to receive raw downsampled data from the decompressor. The +library supports this requirement by allowing the application to write or +read raw data, bypassing the normal preprocessing or postprocessing steps. +The interface is different from the standard one and is somewhat harder to +use. If your interest is merely in bypassing color conversion, we recommend +that you use the standard interface and simply set jpeg_color_space = +in_color_space (or jpeg_color_space = out_color_space for decompression). +The mechanism described in this section is necessary only to supply or +receive downsampled image data, in which not all components have the same +dimensions. + + +To compress raw data, you must supply the data in the colorspace to be used +in the JPEG file (please read the earlier section on Special color spaces) +and downsampled to the sampling factors specified in the JPEG parameters. +You must supply the data in the format used internally by the JPEG library, +namely a JSAMPIMAGE array. This is an array of pointers to two-dimensional +arrays, each of type JSAMPARRAY. Each 2-D array holds the values for one +color component. This structure is necessary since the components are of +different sizes. If the image dimensions are not a multiple of the MCU size, +you must also pad the data correctly (usually, this is done by replicating +the last column and/or row). The data must be padded to a multiple of a DCT +block in each component: that is, each downsampled row must contain a +multiple of 8 valid samples, and there must be a multiple of 8 sample rows +for each component. (For applications such as conversion of digital TV +images, the standard image size is usually a multiple of the DCT block size, +so that no padding need actually be done.) + +The procedure for compression of raw data is basically the same as normal +compression, except that you call jpeg_write_raw_data() in place of +jpeg_write_scanlines(). Before calling jpeg_start_compress(), you must do +the following: + * Set cinfo->raw_data_in to TRUE. (It is set FALSE by jpeg_set_defaults().) + This notifies the library that you will be supplying raw data. + * Ensure jpeg_color_space is correct --- an explicit jpeg_set_colorspace() + call is a good idea. Note that since color conversion is bypassed, + in_color_space is ignored, except that jpeg_set_defaults() uses it to + choose the default jpeg_color_space setting. + * Ensure the sampling factors, cinfo->comp_info[i].h_samp_factor and + cinfo->comp_info[i].v_samp_factor, are correct. Since these indicate the + dimensions of the data you are supplying, it's wise to set them + explicitly, rather than assuming the library's defaults are what you want. + +To pass raw data to the library, call jpeg_write_raw_data() in place of +jpeg_write_scanlines(). The two routines work similarly except that +jpeg_write_raw_data takes a JSAMPIMAGE data array rather than JSAMPARRAY. +The scanlines count passed to and returned from jpeg_write_raw_data is +measured in terms of the component with the largest v_samp_factor. + +jpeg_write_raw_data() processes one MCU row per call, which is to say +v_samp_factor*DCTSIZE sample rows of each component. The passed num_lines +value must be at least max_v_samp_factor*DCTSIZE, and the return value will +be exactly that amount (or possibly some multiple of that amount, in future +library versions). This is true even on the last call at the bottom of the +image; don't forget to pad your data as necessary. + +The required dimensions of the supplied data can be computed for each +component as + cinfo->comp_info[i].width_in_blocks*DCTSIZE samples per row + cinfo->comp_info[i].height_in_blocks*DCTSIZE rows in image +after jpeg_start_compress() has initialized those fields. If the valid data +is smaller than this, it must be padded appropriately. For some sampling +factors and image sizes, additional dummy DCT blocks are inserted to make +the image a multiple of the MCU dimensions. The library creates such dummy +blocks itself; it does not read them from your supplied data. Therefore you +need never pad by more than DCTSIZE samples. An example may help here. +Assume 2h2v downsampling of YCbCr data, that is + cinfo->comp_info[0].h_samp_factor = 2 for Y + cinfo->comp_info[0].v_samp_factor = 2 + cinfo->comp_info[1].h_samp_factor = 1 for Cb + cinfo->comp_info[1].v_samp_factor = 1 + cinfo->comp_info[2].h_samp_factor = 1 for Cr + cinfo->comp_info[2].v_samp_factor = 1 +and suppose that the nominal image dimensions (cinfo->image_width and +cinfo->image_height) are 101x101 pixels. Then jpeg_start_compress() will +compute downsampled_width = 101 and width_in_blocks = 13 for Y, +downsampled_width = 51 and width_in_blocks = 7 for Cb and Cr (and the same +for the height fields). You must pad the Y data to at least 13*8 = 104 +columns and rows, the Cb/Cr data to at least 7*8 = 56 columns and rows. The +MCU height is max_v_samp_factor = 2 DCT rows so you must pass at least 16 +scanlines on each call to jpeg_write_raw_data(), which is to say 16 actual +sample rows of Y and 8 each of Cb and Cr. A total of 7 MCU rows are needed, +so you must pass a total of 7*16 = 112 "scanlines". The last DCT block row +of Y data is dummy, so it doesn't matter what you pass for it in the data +arrays, but the scanlines count must total up to 112 so that all of the Cb +and Cr data gets passed. + +Output suspension is supported with raw-data compression: if the data +destination module suspends, jpeg_write_raw_data() will return 0. +In this case the same data rows must be passed again on the next call. + + +Decompression with raw data output implies bypassing all postprocessing: +you cannot ask for rescaling or color quantization, for instance. More +seriously, you must deal with the color space and sampling factors present in +the incoming file. If your application only handles, say, 2h1v YCbCr data, +you must check for and fail on other color spaces or other sampling factors. +The library will not convert to a different color space for you. + +To obtain raw data output, set cinfo->raw_data_out = TRUE before +jpeg_start_decompress() (it is set FALSE by jpeg_read_header()). Be sure to +verify that the color space and sampling factors are ones you can handle. +Then call jpeg_read_raw_data() in place of jpeg_read_scanlines(). The +decompression process is otherwise the same as usual. + +jpeg_read_raw_data() returns one MCU row per call, and thus you must pass a +buffer of at least max_v_samp_factor*DCTSIZE scanlines (scanline counting is +the same as for raw-data compression). The buffer you pass must be large +enough to hold the actual data plus padding to DCT-block boundaries. As with +compression, any entirely dummy DCT blocks are not processed so you need not +allocate space for them, but the total scanline count includes them. The +above example of computing buffer dimensions for raw-data compression is +equally valid for decompression. + +Input suspension is supported with raw-data decompression: if the data source +module suspends, jpeg_read_raw_data() will return 0. You can also use +buffered-image mode to read raw data in multiple passes. + + +Really raw data: DCT coefficients +--------------------------------- + +It is possible to read or write the contents of a JPEG file as raw DCT +coefficients. This facility is mainly intended for use in lossless +transcoding between different JPEG file formats. Other possible applications +include lossless cropping of a JPEG image, lossless reassembly of a +multi-strip or multi-tile TIFF/JPEG file into a single JPEG datastream, etc. + +To read the contents of a JPEG file as DCT coefficients, open the file and do +jpeg_read_header() as usual. But instead of calling jpeg_start_decompress() +and jpeg_read_scanlines(), call jpeg_read_coefficients(). This will read the +entire image into a set of virtual coefficient-block arrays, one array per +component. The return value is a pointer to an array of virtual-array +descriptors. Each virtual array can be accessed directly using the JPEG +memory manager's access_virt_barray method (see Memory management, below, +and also read structure.doc's discussion of virtual array handling). Or, +for simple transcoding to a different JPEG file format, the array list can +just be handed directly to jpeg_write_coefficients(). + +When you are done using the virtual arrays, call jpeg_finish_decompress() +to release the array storage and return the decompression object to an idle +state; or just call jpeg_destroy() if you don't need to reuse the object. + +If you use a suspending data source, jpeg_read_coefficients() will return +NULL if it is forced to suspend; a non-NULL return value indicates successful +completion. You need not test for a NULL return value when using a +non-suspending data source. + +Each block in the block arrays contains quantized coefficient values in +normal array order (not JPEG zigzag order). The block arrays contain only +DCT blocks containing real data; any entirely-dummy blocks added to fill out +interleaved MCUs at the right or bottom edges of the image are discarded +during reading and are not stored in the block arrays. (The size of each +block array can be determined from the width_in_blocks and height_in_blocks +fields of the component's comp_info entry.) This is also the data format +expected by jpeg_write_coefficients(). + +To write the contents of a JPEG file as DCT coefficients, you must provide +the DCT coefficients stored in virtual block arrays. You can either pass +block arrays read from an input JPEG file by jpeg_read_coefficients(), or +allocate virtual arrays from the JPEG compression object and fill them +yourself. In either case, jpeg_write_coefficients() is substituted for +jpeg_start_compress() and jpeg_write_scanlines(). Thus the sequence is + * Create compression object + * Set all compression parameters as necessary + * Request virtual arrays if needed + * jpeg_write_coefficients() + * jpeg_finish_compress() + * Destroy or re-use compression object +jpeg_write_coefficients() is passed a pointer to an array of virtual block +array descriptors; the number of arrays is equal to cinfo.num_components. + +The virtual arrays need only have been requested, not realized, before +jpeg_write_coefficients() is called. A side-effect of +jpeg_write_coefficients() is to realize any virtual arrays that have been +requested from the compression object's memory manager. Thus, when obtaining +the virtual arrays from the compression object, you should fill the arrays +after calling jpeg_write_coefficients(). The data is actually written out +when you call jpeg_finish_compress(); jpeg_write_coefficients() only writes +the file header. + +When writing raw DCT coefficients, it is crucial that the JPEG quantization +tables and sampling factors match the way the data was encoded, or the +resulting file will be invalid. For transcoding from an existing JPEG file, +we recommend using jpeg_copy_critical_parameters(). This routine initializes +all the compression parameters to default values (like jpeg_set_defaults()), +then copies the critical information from a source decompression object. +The decompression object should have just been used to read the entire +JPEG input file --- that is, it should be awaiting jpeg_finish_decompress(). + +jpeg_write_coefficients() marks all tables stored in the compression object +as needing to be written to the output file (thus, it acts like +jpeg_start_compress(cinfo, TRUE)). This is for safety's sake, to avoid +emitting abbreviated JPEG files by accident. If you really want to emit an +abbreviated JPEG file, call jpeg_suppress_tables(), or set the tables' +individual sent_table flags, between calling jpeg_write_coefficients() and +jpeg_finish_compress(). + + +Progress monitoring +------------------- + +Some applications may need to regain control from the JPEG library every so +often. The typical use of this feature is to produce a percent-done bar or +other progress display. (For a simple example, see cjpeg.c or djpeg.c.) +Although you do get control back frequently during the data-transferring pass +(the jpeg_read_scanlines or jpeg_write_scanlines loop), any additional passes +will occur inside jpeg_finish_compress or jpeg_start_decompress; those +routines may take a long time to execute, and you don't get control back +until they are done. + +You can define a progress-monitor routine which will be called periodically +by the library. No guarantees are made about how often this call will occur, +so we don't recommend you use it for mouse tracking or anything like that. +At present, a call will occur once per MCU row, scanline, or sample row +group, whichever unit is convenient for the current processing mode; so the +wider the image, the longer the time between calls. During the data +transferring pass, only one call occurs per call of jpeg_read_scanlines or +jpeg_write_scanlines, so don't pass a large number of scanlines at once if +you want fine resolution in the progress count. (If you really need to use +the callback mechanism for time-critical tasks like mouse tracking, you could +insert additional calls inside some of the library's inner loops.) + +To establish a progress-monitor callback, create a struct jpeg_progress_mgr, +fill in its progress_monitor field with a pointer to your callback routine, +and set cinfo->progress to point to the struct. The callback will be called +whenever cinfo->progress is non-NULL. (This pointer is set to NULL by +jpeg_create_compress or jpeg_create_decompress; the library will not change +it thereafter. So if you allocate dynamic storage for the progress struct, +make sure it will live as long as the JPEG object does. Allocating from the +JPEG memory manager with lifetime JPOOL_PERMANENT will work nicely.) You +can use the same callback routine for both compression and decompression. + +The jpeg_progress_mgr struct contains four fields which are set by the library: + long pass_counter; /* work units completed in this pass */ + long pass_limit; /* total number of work units in this pass */ + int completed_passes; /* passes completed so far */ + int total_passes; /* total number of passes expected */ +During any one pass, pass_counter increases from 0 up to (not including) +pass_limit; the step size is usually but not necessarily 1. The pass_limit +value may change from one pass to another. The expected total number of +passes is in total_passes, and the number of passes already completed is in +completed_passes. Thus the fraction of work completed may be estimated as + completed_passes + (pass_counter/pass_limit) + -------------------------------------------- + total_passes +ignoring the fact that the passes may not be equal amounts of work. + +When decompressing, pass_limit can even change within a pass, because it +depends on the number of scans in the JPEG file, which isn't always known in +advance. The computed fraction-of-work-done may jump suddenly (if the library +discovers it has overestimated the number of scans) or even decrease (in the +opposite case). It is not wise to put great faith in the work estimate. + +When using the decompressor's buffered-image mode, the progress monitor work +estimate is likely to be completely unhelpful, because the library has no way +to know how many output passes will be demanded of it. Currently, the library +sets total_passes based on the assumption that there will be one more output +pass if the input file end hasn't yet been read (jpeg_input_complete() isn't +TRUE), but no more output passes if the file end has been reached when the +output pass is started. This means that total_passes will rise as additional +output passes are requested. If you have a way of determining the input file +size, estimating progress based on the fraction of the file that's been read +will probably be more useful than using the library's value. + + +Memory management +----------------- + +This section covers some key facts about the JPEG library's built-in memory +manager. For more info, please read structure.doc's section about the memory +manager, and consult the source code if necessary. + +All memory and temporary file allocation within the library is done via the +memory manager. If necessary, you can replace the "back end" of the memory +manager to control allocation yourself (for example, if you don't want the +library to use malloc() and free() for some reason). + +Some data is allocated "permanently" and will not be freed until the JPEG +object is destroyed. Most data is allocated "per image" and is freed by +jpeg_finish_compress, jpeg_finish_decompress, or jpeg_abort. You can call the +memory manager yourself to allocate structures that will automatically be +freed at these times. Typical code for this is + ptr = (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, size); +Use JPOOL_PERMANENT to get storage that lasts as long as the JPEG object. +Use alloc_large instead of alloc_small for anything bigger than a few Kbytes. +There are also alloc_sarray and alloc_barray routines that automatically +build 2-D sample or block arrays. + +The library's minimum space requirements to process an image depend on the +image's width, but not on its height, because the library ordinarily works +with "strip" buffers that are as wide as the image but just a few rows high. +Some operating modes (eg, two-pass color quantization) require full-image +buffers. Such buffers are treated as "virtual arrays": only the current strip +need be in memory, and the rest can be swapped out to a temporary file. + +If you use the simplest memory manager back end (jmemnobs.c), then no +temporary files are used; virtual arrays are simply malloc()'d. Images bigger +than memory can be processed only if your system supports virtual memory. +The other memory manager back ends support temporary files of various flavors +and thus work in machines without virtual memory. They may also be useful on +Unix machines if you need to process images that exceed available swap space. + +When using temporary files, the library will make the in-memory buffers for +its virtual arrays just big enough to stay within a "maximum memory" setting. +Your application can set this limit by setting cinfo->mem->max_memory_to_use +after creating the JPEG object. (Of course, there is still a minimum size for +the buffers, so the max-memory setting is effective only if it is bigger than +the minimum space needed.) If you allocate any large structures yourself, you +must allocate them before jpeg_start_compress() or jpeg_start_decompress() in +order to have them counted against the max memory limit. Also keep in mind +that space allocated with alloc_small() is ignored, on the assumption that +it's too small to be worth worrying about; so a reasonable safety margin +should be left when setting max_memory_to_use. + +If you use the jmemname.c or jmemdos.c memory manager back end, it is +important to clean up the JPEG object properly to ensure that the temporary +files get deleted. (This is especially crucial with jmemdos.c, where the +"temporary files" may be extended-memory segments; if they are not freed, +DOS will require a reboot to recover the memory.) Thus, with these memory +managers, it's a good idea to provide a signal handler that will trap any +early exit from your program. The handler should call either jpeg_abort() +or jpeg_destroy() for any active JPEG objects. A handler is not needed with +jmemnobs.c, and shouldn't be necessary with jmemansi.c or jmemmac.c either, +since the C library is supposed to take care of deleting files made with +tmpfile(). + + +Library compile-time options +---------------------------- + +A number of compile-time options are available by modifying jmorecfg.h. + +The JPEG standard provides for both the baseline 8-bit DCT process and +a 12-bit DCT process. 12-bit lossy JPEG is supported if you define +BITS_IN_JSAMPLE as 12 rather than 8. Note that this causes JSAMPLE to be +larger than a char, so it affects the surrounding application's image data. +The sample applications cjpeg and djpeg can support 12-bit mode only for PPM +and GIF file formats; you must disable the other file formats to compile a +12-bit cjpeg or djpeg. (install.doc has more information about that.) +At present, a 12-bit library can handle *only* 12-bit images, not both +precisions. (If you need to include both 8- and 12-bit libraries in a single +application, you could probably do it by defining NEED_SHORT_EXTERNAL_NAMES +for just one of the copies. You'd have to access the 8-bit and 12-bit copies +from separate application source files. This is untested ... if you try it, +we'd like to hear whether it works!) + +Note that a 12-bit library always compresses in Huffman optimization mode, +in order to generate valid Huffman tables. This is necessary because our +default Huffman tables only cover 8-bit data. If you need to output 12-bit +files in one pass, you'll have to supply suitable default Huffman tables. + +The maximum number of components (color channels) in the image is determined +by MAX_COMPONENTS. The JPEG standard allows up to 255 components, but we +expect that few applications will need more than four or so. + +On machines with unusual data type sizes, you may be able to improve +performance or reduce memory space by tweaking the various typedefs in +jmorecfg.h. In particular, on some RISC CPUs, access to arrays of "short"s +is quite slow; consider trading memory for speed by making JCOEF, INT16, and +UINT16 be "int" or "unsigned int". UINT8 is also a candidate to become int. +You probably don't want to make JSAMPLE be int unless you have lots of memory +to burn. + +You can reduce the size of the library by compiling out various optional +functions. To do this, undefine xxx_SUPPORTED symbols as necessary. + + +Portability considerations +-------------------------- + +The JPEG library has been written to be extremely portable; the sample +applications cjpeg and djpeg are slightly less so. This section summarizes +the design goals in this area. (If you encounter any bugs that cause the +library to be less portable than is claimed here, we'd appreciate hearing +about them.) + +The code works fine on both ANSI and pre-ANSI C compilers, using any of the +popular system include file setups, and some not-so-popular ones too. See +install.doc for configuration procedures. + +The code is not dependent on the exact sizes of the C data types. As +distributed, we make the assumptions that + char is at least 8 bits wide + short is at least 16 bits wide + int is at least 16 bits wide + long is at least 32 bits wide +(These are the minimum requirements of the ANSI C standard.) Wider types will +work fine, although memory may be used inefficiently if char is much larger +than 8 bits or short is much bigger than 16 bits. The code should work +equally well with 16- or 32-bit ints. + +In a system where these assumptions are not met, you may be able to make the +code work by modifying the typedefs in jmorecfg.h. However, you will probably +have difficulty if int is less than 16 bits wide, since references to plain +int abound in the code. + +char can be either signed or unsigned, although the code runs faster if an +unsigned char type is available. If char is wider than 8 bits, you will need +to redefine JOCTET and/or provide custom data source/destination managers so +that JOCTET represents exactly 8 bits of data on external storage. + +The JPEG library proper does not assume ASCII representation of characters. +But some of the image file I/O modules in cjpeg/djpeg do have ASCII +dependencies in file-header manipulation; so does cjpeg's select_file_type() +routine. + +The JPEG library does not rely heavily on the C library. In particular, C +stdio is used only by the data source/destination modules and the error +handler, all of which are application-replaceable. (cjpeg/djpeg are more +heavily dependent on stdio.) malloc and free are called only from the memory +manager "back end" module, so you can use a different memory allocator by +replacing that one file. + +The code generally assumes that C names must be unique in the first 15 +characters. However, global function names can be made unique in the +first 6 characters by defining NEED_SHORT_EXTERNAL_NAMES. + +More info about porting the code may be gleaned by reading jconfig.doc, +jmorecfg.h, and jinclude.h. + + +Notes for MS-DOS implementors +----------------------------- + +The IJG code is designed to work efficiently in 80x86 "small" or "medium" +memory models (i.e., data pointers are 16 bits unless explicitly declared +"far"; code pointers can be either size). You may be able to use small +model to compile cjpeg or djpeg by itself, but you will probably have to use +medium model for any larger application. This won't make much difference in +performance. You *will* take a noticeable performance hit if you use a +large-data memory model (perhaps 10%-25%), and you should avoid "huge" model +if at all possible. + +The JPEG library typically needs 2Kb-3Kb of stack space. It will also +malloc about 20K-30K of near heap space while executing (and lots of far +heap, but that doesn't count in this calculation). This figure will vary +depending on selected operating mode, and to a lesser extent on image size. +There is also about 5Kb-6Kb of constant data which will be allocated in the +near data segment (about 4Kb of this is the error message table). +Thus you have perhaps 20K available for other modules' static data and near +heap space before you need to go to a larger memory model. The C library's +static data will account for several K of this, but that still leaves a good +deal for your needs. (If you are tight on space, you could reduce the sizes +of the I/O buffers allocated by jdatasrc.c and jdatadst.c, say from 4K to +1K. Another possibility is to move the error message table to far memory; +this should be doable with only localized hacking on jerror.c.) + +About 2K of the near heap space is "permanent" memory that will not be +released until you destroy the JPEG object. This is only an issue if you +save a JPEG object between compression or decompression operations. + +Far data space may also be a tight resource when you are dealing with large +images. The most memory-intensive case is decompression with two-pass color +quantization, or single-pass quantization to an externally supplied color +map. This requires a 128Kb color lookup table plus strip buffers amounting +to about 50 bytes per column for typical sampling ratios (eg, about 32000 +bytes for a 640-pixel-wide image). You may not be able to process wide +images if you have large data structures of your own. + +Of course, all of these concerns vanish if you use a 32-bit flat-memory-model +compiler, such as DJGPP or Watcom C. We highly recommend flat model if you +can use it; the JPEG library is significantly faster in flat model. diff --git a/windows_libs/jpeg-6a/makcjpeg.st b/windows_libs/jpeg-6a/makcjpeg.st new file mode 100644 index 00000000..3b523dbd --- /dev/null +++ b/windows_libs/jpeg-6a/makcjpeg.st @@ -0,0 +1,37 @@ +; Project file for Independent JPEG Group's software +; +; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. +; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de) +; and to Dr. B. Setzepfandt (bernd@gina.uni-muenster.de). +; +; To use this file, rename it to CJPEG.PRJ. +; If you are using Turbo C, change filenames beginning with "PC..." to "TC..." +; Read installation instructions before trying to make the program! +; +; +; * * * Output file * * * +cjpeg.ttp +; +; * * * COMPILER OPTIONS * * * +.C[-P] ; absolute calls +.C[-M] ; and no string merging, folks +.C[-w-cln] ; no "constant is long" warnings +.C[-w-par] ; no "parameter xxxx unused" +.C[-w-rch] ; no "unreachable code" +.C[-wsig] ; warn if significant digits may be lost += +; * * * * List of modules * * * * +PCSTART.O +cjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h) +cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +rdppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +rdgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +rdtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +rdbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +rdrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +LIBJPEG.LIB ; built by LIBJPEG.PRJ +PCFLTLIB.LIB ; floating point library +; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED +PCSTDLIB.LIB ; standard library +PCEXTLIB.LIB ; extended library diff --git a/windows_libs/jpeg-6a/makdjpeg.st b/windows_libs/jpeg-6a/makdjpeg.st new file mode 100644 index 00000000..49d23eac --- /dev/null +++ b/windows_libs/jpeg-6a/makdjpeg.st @@ -0,0 +1,37 @@ +; Project file for Independent JPEG Group's software +; +; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. +; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de) +; and to Dr. B. Setzepfandt (bernd@gina.uni-muenster.de). +; +; To use this file, rename it to DJPEG.PRJ. +; If you are using Turbo C, change filenames beginning with "PC..." to "TC..." +; Read installation instructions before trying to make the program! +; +; +; * * * Output file * * * +djpeg.ttp +; +; * * * COMPILER OPTIONS * * * +.C[-P] ; absolute calls +.C[-M] ; and no string merging, folks +.C[-w-cln] ; no "constant is long" warnings +.C[-w-par] ; no "parameter xxxx unused" +.C[-w-rch] ; no "unreachable code" +.C[-wsig] ; warn if significant digits may be lost += +; * * * * List of modules * * * * +PCSTART.O +djpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h) +cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +rdcolmap.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +wrppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +wrgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +wrtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +wrbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +wrrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +LIBJPEG.LIB ; built by LIBJPEG.PRJ +PCFLTLIB.LIB ; floating point library +; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED +PCSTDLIB.LIB ; standard library +PCEXTLIB.LIB ; extended library diff --git a/windows_libs/jpeg-6a/makefile.ansi b/windows_libs/jpeg-6a/makefile.ansi new file mode 100644 index 00000000..8175ca0e --- /dev/null +++ b/windows_libs/jpeg-6a/makefile.ansi @@ -0,0 +1,210 @@ +# Makefile for Independent JPEG Group's software + +# This makefile is suitable for Unix-like systems with ANSI-capable compilers. +# If you have a non-ANSI compiler, makefile.unix is a better starting point. + +# Read installation instructions before saying "make" !! + +# The name of your C compiler: +CC= cc + +# You may need to adjust these cc options: +CFLAGS= -O +# Generally, we recommend defining any configuration symbols in jconfig.h, +# NOT via -D switches here. + +# Link-time cc options: +LDFLAGS= + +# To link any special libraries, add the necessary -l commands here. +LDLIBS= + +# Put here the object file name for the correct system-dependent memory +# manager file. For Unix this is usually jmemnobs.o, but you may want +# to use jmemansi.o or jmemname.o if you have limited swap space. +SYSDEPMEM= jmemnobs.o + +# miscellaneous OS-dependent stuff +# linker +LN= $(CC) +# file deletion command +RM= rm -f +# library (.a) file creation command +AR= ar rc +# second step in .a creation (use "touch" if not needed) +AR2= ranlib + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c cdjpeg.c rdcolmap.c rdswitch.c \ + rdjpgcom.c wrjpgcom.c rdppm.c wrppm.c rdgif.c wrgif.c rdtarga.c \ + wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makcjpeg.st makdjpeg.st \ + makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ + makefile.vms makvms.opt +CONFIGFILES= jconfig.cfg jconfig.manx jconfig.sas jconfig.st jconfig.bcc \ + jconfig.mc6 jconfig.dj jconfig.wat jconfig.vms +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \ + jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \ + jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \ + jfdctint.o +# decompression library object files +DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \ + jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \ + jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ + jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o +# These objectfiles are included in libjpeg.a +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ + cdjpeg.o +DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ + cdjpeg.o +TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o + + +all: libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom + +libjpeg.a: $(LIBOBJECTS) + $(RM) libjpeg.a + $(AR) libjpeg.a $(LIBOBJECTS) + $(AR2) libjpeg.a + +cjpeg: $(COBJECTS) libjpeg.a + $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS) + +djpeg: $(DOBJECTS) libjpeg.a + $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS) + +jpegtran: $(TROBJECTS) libjpeg.a + $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.a $(LDLIBS) + +rdjpgcom: rdjpgcom.o + $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS) + +wrjpgcom: wrjpgcom.o + $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS) + +jconfig.h: jconfig.doc + echo You must prepare a system-dependent jconfig.h file. + echo Please read the installation directions in install.doc. + exit 1 + +clean: + $(RM) *.o cjpeg djpeg jpegtran libjpeg.a rdjpgcom wrjpgcom + $(RM) core testout* + +test: cjpeg djpeg jpegtran + $(RM) testout* + ./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg + ./djpeg -dct int -gif -outfile testout.gif testorig.jpg + ./cjpeg -dct int -outfile testout.jpg testimg.ppm + ./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg + ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm + ./jpegtran -outfile testoutt.jpg testprog.jpg + cmp testimg.ppm testout.ppm + cmp testimg.gif testout.gif + cmp testimg.jpg testout.jpg + cmp testimg.ppm testoutp.ppm + cmp testimgp.jpg testoutp.jpg + cmp testorig.jpg testoutt.jpg + + +jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h +rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/windows_libs/jpeg-6a/makefile.bcc b/windows_libs/jpeg-6a/makefile.bcc new file mode 100644 index 00000000..4f20bea6 --- /dev/null +++ b/windows_libs/jpeg-6a/makefile.bcc @@ -0,0 +1,279 @@ +# Makefile for Independent JPEG Group's software + +# This makefile is suitable for Borland C on MS-DOS or OS/2. +# It works with Borland C++ for DOS, revision 3.0 or later, +# and has been tested with Borland C++ for OS/2, revision 2.0. +# Thanks to Tom Wright and Ge' Weijers (original DOS) and +# Ken Porter (OS/2) for this file. + +# Read installation instructions before saying "make" !! + +# Are we under DOS or OS/2? +!if !$d(DOS) && !$d(OS2) +!if $d(__OS2__) +OS2=1 +!else +DOS=1 +!endif +!endif + +# The name of your C compiler: +CC= bcc + +# You may need to adjust these cc options: +!if $d(DOS) +CFLAGS= -O2 -mm -w-par -w-stu -w-ccc -w-rch +!else +CFLAGS= -O1 -w-par -w-stu -w-ccc -w-rch +!endif +# -O2 enables full code optimization (for pre-3.0 Borland C++, use -O -G -Z). +# -O2 is buggy in Borland OS/2 C++ revision 2.0, so use -O1 for now. +# -mm selects medium memory model (near data, far code pointers; DOS only!) +# -w-par suppresses warnings about unused function parameters +# -w-stu suppresses warnings about incomplete structures +# -w-ccc suppresses warnings about compile-time-constant conditions +# -w-rch suppresses warnings about unreachable code +# Generally, we recommend defining any configuration symbols in jconfig.h, +# NOT via -D switches here. + +# Link-time cc options: +!if $d(DOS) +LDFLAGS= -mm +# memory model option here must match CFLAGS! +!else +LDFLAGS= +# -lai full-screen app +# -lc case-significant link +!endif + +# Put here the object file name for the correct system-dependent memory +# manager file. +# For DOS, we recommend jmemdos.c and jmemdosa.asm. +# For OS/2, we recommend jmemnobs.c (flat memory!) +# SYSDEPMEMLIB must list the same files with "+" signs for the librarian. +!if $d(DOS) +SYSDEPMEM= jmemdos.obj jmemdosa.obj +SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj +!else +SYSDEPMEM= jmemnobs.obj +SYSDEPMEMLIB= +jmemnobs.obj +!endif + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c cdjpeg.c rdcolmap.c rdswitch.c \ + rdjpgcom.c wrjpgcom.c rdppm.c wrppm.c rdgif.c wrgif.c rdtarga.c \ + wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makcjpeg.st makdjpeg.st \ + makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ + makefile.vms makvms.opt +CONFIGFILES= jconfig.cfg jconfig.manx jconfig.sas jconfig.st jconfig.bcc \ + jconfig.mc6 jconfig.dj jconfig.wat jconfig.vms +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \ + jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \ + jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \ + jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj +# decompression library object files +DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \ + jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \ + jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \ + jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \ + jquant1.obj jquant2.obj jdmerge.obj +# These objectfiles are included in libjpeg.lib +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ + rdswitch.obj cdjpeg.obj +DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ + rdcolmap.obj cdjpeg.obj +TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj + + +all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe + +libjpeg.lib: $(LIBOBJECTS) + - del libjpeg.lib + tlib libjpeg.lib /E /C @&&| ++jcapimin.obj +jcapistd.obj +jctrans.obj +jcparam.obj +jdatadst.obj & ++jcinit.obj +jcmaster.obj +jcmarker.obj +jcmainct.obj +jcprepct.obj & ++jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj +jcphuff.obj & ++jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj +jfdctint.obj +jdapimin.obj & ++jdapistd.obj +jdtrans.obj +jdatasrc.obj +jdmaster.obj +jdinput.obj & ++jdmarker.obj +jdhuff.obj +jdphuff.obj +jdmainct.obj +jdcoefct.obj & ++jdpostct.obj +jddctmgr.obj +jidctfst.obj +jidctflt.obj +jidctint.obj & ++jidctred.obj +jdsample.obj +jdcolor.obj +jquant1.obj +jquant2.obj & ++jdmerge.obj +jcomapi.obj +jutils.obj +jerror.obj +jmemmgr.obj & +$(SYSDEPMEMLIB) +| + +cjpeg.exe: $(COBJECTS) libjpeg.lib + $(CC) $(LDFLAGS) -ecjpeg.exe $(COBJECTS) libjpeg.lib + +djpeg.exe: $(DOBJECTS) libjpeg.lib + $(CC) $(LDFLAGS) -edjpeg.exe $(DOBJECTS) libjpeg.lib + +jpegtran.exe: $(TROBJECTS) libjpeg.lib + $(CC) $(LDFLAGS) -ejpegtran.exe $(TROBJECTS) libjpeg.lib + +rdjpgcom.exe: rdjpgcom.c +!if $d(DOS) + $(CC) -ms -O rdjpgcom.c +!else + $(CC) $(CFLAGS) rdjpgcom.c +!endif + +# On DOS, wrjpgcom needs large model so it can malloc a 64K chunk +wrjpgcom.exe: wrjpgcom.c +!if $d(DOS) + $(CC) -ml -O wrjpgcom.c +!else + $(CC) $(CFLAGS) wrjpgcom.c +!endif + +# This "{}" syntax allows Borland Make to "batch" source files. +# In this way, each run of the compiler can build many modules. +.c.obj: + $(CC) $(CFLAGS) -c{ $<} + +jconfig.h: jconfig.doc + echo You must prepare a system-dependent jconfig.h file. + echo Please read the installation directions in install.doc. + exit 1 + +clean: + - del *.obj + - del libjpeg.lib + - del cjpeg.exe + - del djpeg.exe + - del jpegtran.exe + - del rdjpgcom.exe + - del wrjpgcom.exe + - del testout*.* + +test: cjpeg.exe djpeg.exe jpegtran.exe + - del testout*.* + djpeg -dct int -ppm -outfile testout.ppm testorig.jpg + djpeg -dct int -gif -outfile testout.gif testorig.jpg + cjpeg -dct int -outfile testout.jpg testimg.ppm + djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg + cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm + jpegtran -outfile testoutt.jpg testprog.jpg +!if $d(DOS) + fc /b testimg.ppm testout.ppm + fc /b testimg.gif testout.gif + fc /b testimg.jpg testout.jpg + fc /b testimg.ppm testoutp.ppm + fc /b testimgp.jpg testoutp.jpg + fc /b testorig.jpg testoutt.jpg +!else + echo n > n.tmp + comp testimg.ppm testout.ppm < n.tmp + comp testimg.gif testout.gif < n.tmp + comp testimg.jpg testout.jpg < n.tmp + comp testimg.ppm testoutp.ppm < n.tmp + comp testimgp.jpg testoutp.jpg < n.tmp + comp testorig.jpg testoutt.jpg < n.tmp + del n.tmp +!endif + + +jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h +rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +jmemdosa.obj: jmemdosa.asm + tasm /mx jmemdosa.asm diff --git a/windows_libs/jpeg-6a/makefile.cfg b/windows_libs/jpeg-6a/makefile.cfg new file mode 100644 index 00000000..d3241c6e --- /dev/null +++ b/windows_libs/jpeg-6a/makefile.cfg @@ -0,0 +1,274 @@ +# Makefile for Independent JPEG Group's software + +# makefile.cfg is edited by configure to produce a custom Makefile. + +# Read installation instructions before saying "make" !! + +# For compiling with source and object files in different directories. +srcdir = @srcdir@ +VPATH = @srcdir@ + +# Where to install the programs and man pages. +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = $(exec_prefix)/bin +libdir = $(exec_prefix)/lib +includedir = $(prefix)/include +binprefix = +manprefix = +manext = 1 +mandir = $(prefix)/man/man$(manext) + +# The name of your C compiler: +CC= @CC@ + +# You may need to adjust these cc options: +CFLAGS= @CFLAGS@ @CPPFLAGS@ @INCLUDEFLAGS@ +# Generally, we recommend defining any configuration symbols in jconfig.h, +# NOT via -D switches here. +# However, any special defines for ansi2knr.c may be included here: +ANSI2KNRFLAGS= @ANSI2KNRFLAGS@ + +# Link-time cc options: +LDFLAGS= @LDFLAGS@ + +# To link any special libraries, add the necessary -l commands here. +LDLIBS= @LIBS@ + +# Put here the object file name for the correct system-dependent memory +# manager file. For Unix this is usually jmemnobs.o, but you may want +# to use jmemansi.o or jmemname.o if you have limited swap space. +SYSDEPMEM= @MEMORYMGR@ + +# miscellaneous OS-dependent stuff +SHELL= /bin/sh +# linker +LN= $(CC) +# file deletion command +RM= rm -f +# file rename command +MV= mv +# library (.a) file creation command +AR= ar rc +# second step in .a creation (use "touch" if not needed) +AR2= @RANLIB@ +# installation program +INSTALL= @INSTALL@ +INSTALL_PROGRAM= @INSTALL_PROGRAM@ +INSTALL_DATA= @INSTALL_DATA@ + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c cdjpeg.c rdcolmap.c rdswitch.c \ + rdjpgcom.c wrjpgcom.c rdppm.c wrppm.c rdgif.c wrgif.c rdtarga.c \ + wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makcjpeg.st makdjpeg.st \ + makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ + makefile.vms makvms.opt +CONFIGFILES= jconfig.cfg jconfig.manx jconfig.sas jconfig.st jconfig.bcc \ + jconfig.mc6 jconfig.dj jconfig.wat jconfig.vms +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \ + jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \ + jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \ + jfdctint.o +# decompression library object files +DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \ + jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \ + jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ + jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o +# These objectfiles are included in libjpeg.a +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ + cdjpeg.o +DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ + cdjpeg.o +TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o + + +all: @ANSI2KNR@ libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom + +# This rule causes ansi2knr to be invoked. +@ISANSICOM@.c.o: +@ISANSICOM@ ./ansi2knr $(srcdir)/$*.c T$*.c +@ISANSICOM@ $(CC) $(CFLAGS) -c T$*.c +@ISANSICOM@ $(RM) T$*.c $*.o +@ISANSICOM@ $(MV) T$*.o $*.o + +ansi2knr: ansi2knr.c + $(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c + +libjpeg.a: @ANSI2KNR@ $(LIBOBJECTS) + $(RM) libjpeg.a + $(AR) libjpeg.a $(LIBOBJECTS) + $(AR2) libjpeg.a + +cjpeg: $(COBJECTS) libjpeg.a + $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS) + +djpeg: $(DOBJECTS) libjpeg.a + $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS) + +jpegtran: $(TROBJECTS) libjpeg.a + $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.a $(LDLIBS) + +rdjpgcom: rdjpgcom.o + $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS) + +wrjpgcom: wrjpgcom.o + $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS) + +jconfig.h: jconfig.doc + echo You must prepare a system-dependent jconfig.h file. + echo Please read the installation directions in install.doc. + exit 1 + +install: cjpeg djpeg jpegtran rdjpgcom wrjpgcom + $(INSTALL_PROGRAM) cjpeg $(bindir)/$(binprefix)cjpeg + $(INSTALL_PROGRAM) djpeg $(bindir)/$(binprefix)djpeg + $(INSTALL_PROGRAM) jpegtran $(bindir)/$(binprefix)jpegtran + $(INSTALL_PROGRAM) rdjpgcom $(bindir)/$(binprefix)rdjpgcom + $(INSTALL_PROGRAM) wrjpgcom $(bindir)/$(binprefix)wrjpgcom + $(INSTALL_DATA) $(srcdir)/cjpeg.1 $(mandir)/$(manprefix)cjpeg.$(manext) + $(INSTALL_DATA) $(srcdir)/djpeg.1 $(mandir)/$(manprefix)djpeg.$(manext) + $(INSTALL_DATA) $(srcdir)/jpegtran.1 $(mandir)/$(manprefix)jpegtran.$(manext) + $(INSTALL_DATA) $(srcdir)/rdjpgcom.1 $(mandir)/$(manprefix)rdjpgcom.$(manext) + $(INSTALL_DATA) $(srcdir)/wrjpgcom.1 $(mandir)/$(manprefix)wrjpgcom.$(manext) + +install-lib: libjpeg.a install-headers + $(INSTALL_DATA) libjpeg.a $(libdir)/$(binprefix)libjpeg.a + +install-headers: jconfig.h + $(INSTALL_DATA) jconfig.h $(includedir)/jconfig.h + $(INSTALL_DATA) $(srcdir)/jpeglib.h $(includedir)/jpeglib.h + $(INSTALL_DATA) $(srcdir)/jmorecfg.h $(includedir)/jmorecfg.h + $(INSTALL_DATA) $(srcdir)/jerror.h $(includedir)/jerror.h + +clean: + $(RM) *.o cjpeg djpeg jpegtran libjpeg.a rdjpgcom wrjpgcom + $(RM) ansi2knr core testout* config.log config.status + +distribute: + $(RM) jpegsrc.tar* + tar cvf jpegsrc.tar $(DISTFILES) + compress -v jpegsrc.tar + +test: cjpeg djpeg jpegtran + $(RM) testout* + ./djpeg -dct int -ppm -outfile testout.ppm $(srcdir)/testorig.jpg + ./djpeg -dct int -gif -outfile testout.gif $(srcdir)/testorig.jpg + ./cjpeg -dct int -outfile testout.jpg $(srcdir)/testimg.ppm + ./djpeg -dct int -ppm -outfile testoutp.ppm $(srcdir)/testprog.jpg + ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg $(srcdir)/testimg.ppm + ./jpegtran -outfile testoutt.jpg $(srcdir)/testprog.jpg + cmp $(srcdir)/testimg.ppm testout.ppm + cmp $(srcdir)/testimg.gif testout.gif + cmp $(srcdir)/testimg.jpg testout.jpg + cmp $(srcdir)/testimg.ppm testoutp.ppm + cmp $(srcdir)/testimgp.jpg testoutp.jpg + cmp $(srcdir)/testorig.jpg testoutt.jpg + +check: test + +# GNU Make likes to know which target names are not really files to be made: +.PHONY: all install install-lib install-headers clean distribute test check + + +jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h +rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/windows_libs/jpeg-6a/makefile.dj b/windows_libs/jpeg-6a/makefile.dj new file mode 100644 index 00000000..811fd7d5 --- /dev/null +++ b/windows_libs/jpeg-6a/makefile.dj @@ -0,0 +1,234 @@ +# Makefile for Independent JPEG Group's software + +# This makefile is for DJGPP (Delorie's GNU C port) on MS-DOS. +# Say "make exe" to get stub-style .exe's, or +# "make standalone" to get standalone .exe's. + +# Read installation instructions before saying "make" !! + +# To do "make standalone", you'll need to be sure this points to go32.exe: +GO32= c:/djgpp/bin/go32.exe + +# The name of your C compiler: +CC= gcc + +# You may need to adjust these cc options: +CFLAGS= -O2 -Wall +# Generally, we recommend defining any configuration symbols in jconfig.h, +# NOT via -D switches here. + +# Link-time cc options: +LDFLAGS= + +# To link any special libraries, add the necessary -l commands here. +LDLIBS= + +# Put here the object file name for the correct system-dependent memory +# manager file. For DJGPP this is usually jmemnobs.o, but you could +# use jmemname.o if you want to use named temp files instead of swap space. +SYSDEPMEM= jmemnobs.o + +# miscellaneous OS-dependent stuff +# linker +LN= $(CC) +# file deletion command +RM= del +# library (.a) file creation command +AR= ar rc +# second step in .a creation (use "touch" if not needed) +AR2= ranlib + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c cdjpeg.c rdcolmap.c rdswitch.c \ + rdjpgcom.c wrjpgcom.c rdppm.c wrppm.c rdgif.c wrgif.c rdtarga.c \ + wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makcjpeg.st makdjpeg.st \ + makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ + makefile.vms makvms.opt +CONFIGFILES= jconfig.cfg jconfig.manx jconfig.sas jconfig.st jconfig.bcc \ + jconfig.mc6 jconfig.dj jconfig.wat jconfig.vms +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \ + jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \ + jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \ + jfdctint.o +# decompression library object files +DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \ + jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \ + jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ + jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o +# These objectfiles are included in libjpeg.a +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ + cdjpeg.o +DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ + cdjpeg.o +TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o + + +all: libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom + +libjpeg.a: $(LIBOBJECTS) + $(RM) libjpeg.a + $(AR) libjpeg.a $(LIBOBJECTS) + $(AR2) libjpeg.a + +cjpeg: $(COBJECTS) libjpeg.a + $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS) + +djpeg: $(DOBJECTS) libjpeg.a + $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS) + +jpegtran: $(TROBJECTS) libjpeg.a + $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.a $(LDLIBS) + +rdjpgcom: rdjpgcom.o + $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS) + +wrjpgcom: wrjpgcom.o + $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS) + +exe: cjpeg djpeg jpegtran rdjpgcom wrjpgcom + coff2exe cjpeg + coff2exe djpeg + coff2exe jpegtran + coff2exe rdjpgcom + coff2exe wrjpgcom + +standalone: cjpeg djpeg jpegtran rdjpgcom wrjpgcom + coff2exe -s $(GO32) cjpeg + coff2exe -s $(GO32) djpeg + coff2exe -s $(GO32) jpegtran + coff2exe -s $(GO32) rdjpgcom + coff2exe -s $(GO32) wrjpgcom + +jconfig.h: jconfig.doc + echo You must prepare a system-dependent jconfig.h file. + echo Please read the installation directions in install.doc. + exit 1 + +clean: + $(RM) *.o + $(RM) cjpeg + $(RM) djpeg + $(RM) jpegtran + $(RM) rdjpgcom + $(RM) wrjpgcom + $(RM) libjpeg.a + $(RM) testout*.* + +test: cjpeg djpeg jpegtran + $(RM) testout*.* + go32 djpeg -dct int -ppm -outfile testout.ppm testorig.jpg + go32 djpeg -dct int -gif -outfile testout.gif testorig.jpg + go32 cjpeg -dct int -outfile testout.jpg testimg.ppm + go32 djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg + go32 cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm + go32 jpegtran -outfile testoutt.jpg testprog.jpg + fc /b testimg.ppm testout.ppm + fc /b testimg.gif testout.gif + fc /b testimg.jpg testout.jpg + fc /b testimg.ppm testoutp.ppm + fc /b testimgp.jpg testoutp.jpg + fc /b testorig.jpg testoutt.jpg + + +jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h +rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/windows_libs/jpeg-6a/makefile.manx b/windows_libs/jpeg-6a/makefile.manx new file mode 100644 index 00000000..fa035fce --- /dev/null +++ b/windows_libs/jpeg-6a/makefile.manx @@ -0,0 +1,210 @@ +# Makefile for Independent JPEG Group's software + +# This makefile is for Amiga systems using Manx Aztec C ver 5.x. +# Thanks to D.J. James (djjames@cup.portal.com) for this version. + +# Read installation instructions before saying "make" !! + +# The name of your C compiler: +CC= cc + +# You may need to adjust these cc options: +# Uncomment for generic 68000 code (will work on any Amiga) +ARCHFLAGS= -sn + +# Uncomment for 68020/68030 code (faster, but won't run on 68000 CPU) +#ARCHFLAGS= -c2 + +CFLAGS= -MC -MD $(ARCHFLAGS) -spfam -r4 + +# Link-time cc options: +LDFLAGS= -g + +# To link any special libraries, add the necessary -l commands here. +LDLIBS= -lml -lcl + +# Put here the object file name for the correct system-dependent memory +# manager file. For Amiga we recommend jmemname.o. +SYSDEPMEM= jmemname.o + +# miscellaneous OS-dependent stuff +# linker +LN= ln +# file deletion command +RM= delete quiet +# library (.lib) file creation command +AR= lb + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c cdjpeg.c rdcolmap.c rdswitch.c \ + rdjpgcom.c wrjpgcom.c rdppm.c wrppm.c rdgif.c wrgif.c rdtarga.c \ + wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makcjpeg.st makdjpeg.st \ + makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ + makefile.vms makvms.opt +CONFIGFILES= jconfig.cfg jconfig.manx jconfig.sas jconfig.st jconfig.bcc \ + jconfig.mc6 jconfig.dj jconfig.wat jconfig.vms +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \ + jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \ + jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \ + jfdctint.o +# decompression library object files +DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \ + jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \ + jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ + jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o +# These objectfiles are included in libjpeg.lib +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ + cdjpeg.o +DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ + cdjpeg.o +TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o + + +all: libjpeg.lib cjpeg djpeg jpegtran rdjpgcom wrjpgcom + +libjpeg.lib: $(LIBOBJECTS) + -$(RM) libjpeg.lib + $(AR) libjpeg.lib $(LIBOBJECTS) + +cjpeg: $(COBJECTS) libjpeg.lib + $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.lib $(LDLIBS) + +djpeg: $(DOBJECTS) libjpeg.lib + $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.lib $(LDLIBS) + +jpegtran: $(TROBJECTS) libjpeg.lib + $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.lib $(LDLIBS) + +rdjpgcom: rdjpgcom.o + $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS) + +wrjpgcom: wrjpgcom.o + $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS) + +jconfig.h: jconfig.doc + echo You must prepare a system-dependent jconfig.h file. + echo Please read the installation directions in install.doc. + exit 1 + +clean: + -$(RM) *.o cjpeg djpeg jpegtran libjpeg.lib rdjpgcom wrjpgcom + -$(RM) core testout*.* + +test: cjpeg djpeg jpegtran + -$(RM) testout*.* + djpeg -dct int -ppm -outfile testout.ppm testorig.jpg + djpeg -dct int -gif -outfile testout.gif testorig.jpg + cjpeg -dct int -outfile testout.jpg testimg.ppm + djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg + cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm + jpegtran -outfile testoutt.jpg testprog.jpg + cmp testimg.ppm testout.ppm + cmp testimg.gif testout.gif + cmp testimg.jpg testout.jpg + cmp testimg.ppm testoutp.ppm + cmp testimgp.jpg testoutp.jpg + cmp testorig.jpg testoutt.jpg + + +jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.o: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.o: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.o: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h +rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/windows_libs/jpeg-6a/makefile.mc6 b/windows_libs/jpeg-6a/makefile.mc6 new file mode 100644 index 00000000..a8ab313a --- /dev/null +++ b/windows_libs/jpeg-6a/makefile.mc6 @@ -0,0 +1,233 @@ +# Makefile for Independent JPEG Group's software + +# This makefile is for Microsoft C for MS-DOS, version 6.00A and up. +# Use NMAKE, not Microsoft's brain-damaged MAKE. +# Thanks to Alan Wright and Chris Turner of Olivetti Research Ltd. + +# Read installation instructions before saying "nmake" !! + +# You may need to adjust these compiler options: +CFLAGS = -AM -Oecigt -Gs -W3 +# -AM medium memory model (or use -AS for small model, if you remove features) +# -Oecigt -Gs maximum safe optimisation (-Ol has bugs in MSC 6.00A) +# -W3 warning level 3 +# You might also want to add -G2 if you have an 80286, etc. +# Generally, we recommend defining any configuration symbols in jconfig.h, +# NOT via -D switches here. + +# Put here the object file name for the correct system-dependent memory +# manager file. For DOS, we recommend jmemdos.c and jmemdosa.asm. +# If you change this, you'll need to modify the linker response file +# name list, below, by hand! +SYSDEPMEM= jmemdos.obj jmemdosa.obj + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c cdjpeg.c rdcolmap.c rdswitch.c \ + rdjpgcom.c wrjpgcom.c rdppm.c wrppm.c rdgif.c wrgif.c rdtarga.c \ + wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makcjpeg.st makdjpeg.st \ + makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ + makefile.vms makvms.opt +CONFIGFILES= jconfig.cfg jconfig.manx jconfig.sas jconfig.st jconfig.bcc \ + jconfig.mc6 jconfig.dj jconfig.wat jconfig.vms +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \ + jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \ + jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \ + jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj +# decompression library object files +DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \ + jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \ + jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \ + jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \ + jquant1.obj jquant2.obj jdmerge.obj +# These objectfiles are included in libjpeg.lib +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ + rdswitch.obj cdjpeg.obj +DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ + rdcolmap.obj cdjpeg.obj +TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj + +# need linker response file because file list > 128 chars +RFILE = libjpeg.ans + + +all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe + +libjpeg.lib: $(LIBOBJECTS) $(RFILE) + del libjpeg.lib + lib @$(RFILE) + +# linker response file for building libjpeg.lib +$(RFILE) : makefile + del $(RFILE) + echo libjpeg.lib >$(RFILE) +# silly want-to-create-it prompt: + echo y >>$(RFILE) + echo +jcapimin.obj +jcapistd.obj +jctrans.obj +jcparam.obj & >>$(RFILE) + echo +jdatadst.obj +jcinit.obj +jcmaster.obj +jcmarker.obj & >>$(RFILE) + echo +jcmainct.obj +jcprepct.obj +jccoefct.obj & >>$(RFILE) + echo +jccolor.obj +jcsample.obj +jchuff.obj +jcphuff.obj & >>$(RFILE) + echo +jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj & >>$(RFILE) + echo +jfdctint.obj +jdapimin.obj +jdapistd.obj & >>$(RFILE) + echo +jdtrans.obj +jdatasrc.obj +jdmaster.obj +jdinput.obj & >>$(RFILE) + echo +jdmarker.obj +jdhuff.obj +jdphuff.obj +jdmainct.obj & >>$(RFILE) + echo +jdcoefct.obj +jdpostct.obj +jddctmgr.obj & >>$(RFILE) + echo +jidctfst.obj +jidctflt.obj +jidctint.obj & >>$(RFILE) + echo +jidctred.obj +jdsample.obj +jdcolor.obj +jquant1.obj & >>$(RFILE) + echo +jquant2.obj +jdmerge.obj +jcomapi.obj +jutils.obj & >>$(RFILE) + echo +jerror.obj +jmemmgr.obj +jmemdos.obj +jmemdosa.obj ; >>$(RFILE) + +cjpeg.exe: $(COBJECTS) libjpeg.lib + echo $(COBJECTS) >cjpeg.lst + link /STACK:4096 /EXEPACK @cjpeg.lst, cjpeg.exe, , libjpeg.lib, ; + del cjpeg.lst + +djpeg.exe: $(DOBJECTS) libjpeg.lib + echo $(DOBJECTS) >djpeg.lst + link /STACK:4096 /EXEPACK @djpeg.lst, djpeg.exe, , libjpeg.lib, ; + del djpeg.lst + +jpegtran.exe: $(TROBJECTS) libjpeg.lib + link /STACK:4096 /EXEPACK $(TROBJECTS), jpegtran.exe, , libjpeg.lib, ; + +rdjpgcom.exe: rdjpgcom.c + $(CC) -AS -O -W3 rdjpgcom.c + +# wrjpgcom needs large model so it can malloc a 64K chunk +wrjpgcom.exe: wrjpgcom.c + $(CC) -AL -O -W3 wrjpgcom.c + +jconfig.h: jconfig.doc + echo You must prepare a system-dependent jconfig.h file. + echo Please read the installation directions in install.doc. + exit 1 + +clean: + del *.obj + del libjpeg.lib + del cjpeg.exe + del djpeg.exe + del jpegtran.exe + del rdjpgcom.exe + del wrjpgcom.exe + del testout*.* + +test: cjpeg.exe djpeg.exe jpegtran.exe + del testout*.* + djpeg -dct int -ppm -outfile testout.ppm testorig.jpg + djpeg -dct int -gif -outfile testout.gif testorig.jpg + cjpeg -dct int -outfile testout.jpg testimg.ppm + djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg + cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm + jpegtran -outfile testoutt.jpg testprog.jpg + fc /b testimg.ppm testout.ppm + fc /b testimg.gif testout.gif + fc /b testimg.jpg testout.jpg + fc /b testimg.ppm testoutp.ppm + fc /b testimgp.jpg testoutp.jpg + fc /b testorig.jpg testoutt.jpg + + +jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h +rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +jmemdosa.obj : jmemdosa.asm + masm /mx $*; diff --git a/windows_libs/jpeg-6a/makefile.mms b/windows_libs/jpeg-6a/makefile.mms new file mode 100644 index 00000000..401fe200 --- /dev/null +++ b/windows_libs/jpeg-6a/makefile.mms @@ -0,0 +1,214 @@ +# Makefile for Independent JPEG Group's software + +# This makefile is for use with MMS on Digital VMS systems. +# Thanks to Rick Dyson (dyson@iowasp.physics.uiowa.edu) +# and Tim Bell (tbell@netcom.com) for their help. + +# Read installation instructions before saying "MMS" !! + +# You may need to adjust these cc options: +CFLAGS= $(CFLAGS) /NoDebug /Optimize +# Generally, we recommend defining any configuration symbols in jconfig.h, +# NOT via /Define switches here. +.ifdef ALPHA +OPT= +.else +OPT= ,Sys$Disk:[]MAKVMS.OPT/Option +.endif + +# Put here the object file name for the correct system-dependent memory +# manager file. For Unix this is usually jmemnobs.o, but you may want +# to use jmemansi.o or jmemname.o if you have limited swap space. +SYSDEPMEM= jmemnobs.obj + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c cdjpeg.c rdcolmap.c rdswitch.c \ + rdjpgcom.c wrjpgcom.c rdppm.c wrppm.c rdgif.c wrgif.c rdtarga.c \ + wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makcjpeg.st makdjpeg.st \ + makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ + makefile.vms makvms.opt +CONFIGFILES= jconfig.cfg jconfig.manx jconfig.sas jconfig.st jconfig.bcc \ + jconfig.mc6 jconfig.dj jconfig.wat jconfig.vms +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.obj jcapistd.obj jctrans.obj jcparam.obj jdatadst.obj \ + jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj jcprepct.obj \ + jccoefct.obj jccolor.obj jcsample.obj jchuff.obj jcphuff.obj \ + jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj +# decompression library object files +DLIBOBJECTS= jdapimin.obj jdapistd.obj jdtrans.obj jdatasrc.obj \ + jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdphuff.obj \ + jdmainct.obj jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj \ + jidctflt.obj jidctint.obj jidctred.obj jdsample.obj jdcolor.obj \ + jquant1.obj jquant2.obj jdmerge.obj +# These objectfiles are included in libjpeg.olb +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \ + rdswitch.obj cdjpeg.obj +DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \ + rdcolmap.obj cdjpeg.obj +TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj +# objectfile lists with commas --- what a crock +COBJLIST= cjpeg.obj,rdppm.obj,rdgif.obj,rdtarga.obj,rdrle.obj,rdbmp.obj,\ + rdswitch.obj,cdjpeg.obj +DOBJLIST= djpeg.obj,wrppm.obj,wrgif.obj,wrtarga.obj,wrrle.obj,wrbmp.obj,\ + rdcolmap.obj,cdjpeg.obj +TROBJLIST= jpegtran.obj,rdswitch.obj,cdjpeg.obj +LIBOBJLIST= jcapimin.obj,jcapistd.obj,jctrans.obj,jcparam.obj,jdatadst.obj,\ + jcinit.obj,jcmaster.obj,jcmarker.obj,jcmainct.obj,jcprepct.obj,\ + jccoefct.obj,jccolor.obj,jcsample.obj,jchuff.obj,jcphuff.obj,\ + jcdctmgr.obj,jfdctfst.obj,jfdctflt.obj,jfdctint.obj,jdapimin.obj,\ + jdapistd.obj,jdtrans.obj,jdatasrc.obj,jdmaster.obj,jdinput.obj,\ + jdmarker.obj,jdhuff.obj,jdphuff.obj,jdmainct.obj,jdcoefct.obj,\ + jdpostct.obj,jddctmgr.obj,jidctfst.obj,jidctflt.obj,jidctint.obj,\ + jidctred.obj,jdsample.obj,jdcolor.obj,jquant1.obj,jquant2.obj,\ + jdmerge.obj,jcomapi.obj,jutils.obj,jerror.obj,jmemmgr.obj,$(SYSDEPMEM) + + +.first + @- Define /NoLog Sys Sys$Library + +ALL : libjpeg.olb cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe + @ Continue + +libjpeg.olb : $(LIBOBJECTS) + Library /Create libjpeg.olb $(LIBOBJLIST) + +cjpeg.exe : $(COBJECTS) libjpeg.olb + $(LINK) $(LFLAGS) /Executable = cjpeg.exe $(COBJLIST),libjpeg.olb/Library$(OPT) + +djpeg.exe : $(DOBJECTS) libjpeg.olb + $(LINK) $(LFLAGS) /Executable = djpeg.exe $(DOBJLIST),libjpeg.olb/Library$(OPT) + +jpegtran.exe : $(TROBJECTS) libjpeg.olb + $(LINK) $(LFLAGS) /Executable = jpegtran.exe $(TROBJLIST),libjpeg.olb/Library$(OPT) + +rdjpgcom.exe : rdjpgcom.obj + $(LINK) $(LFLAGS) /Executable = rdjpgcom.exe rdjpgcom.obj$(OPT) + +wrjpgcom.exe : wrjpgcom.obj + $(LINK) $(LFLAGS) /Executable = wrjpgcom.exe wrjpgcom.obj$(OPT) + +jconfig.h : jconfig.vms + @- Copy jconfig.vms jconfig.h + +clean : + @- Set Protection = Owner:RWED *.*;-1 + @- Set Protection = Owner:RWED *.OBJ + - Purge /NoLog /NoConfirm *.* + - Delete /NoLog /NoConfirm *.OBJ; + +test : cjpeg.exe djpeg.exe jpegtran.exe + mcr sys$disk:[]djpeg -dct int -ppm -outfile testout.ppm testorig.jpg + mcr sys$disk:[]djpeg -dct int -gif -outfile testout.gif testorig.jpg + mcr sys$disk:[]cjpeg -dct int -outfile testout.jpg testimg.ppm + mcr sys$disk:[]djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg + mcr sys$disk:[]cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm + mcr sys$disk:[]jpegtran -outfile testoutt.jpg testprog.jpg + - Backup /Compare/Log testimg.ppm testout.ppm + - Backup /Compare/Log testimg.gif testout.gif + - Backup /Compare/Log testimg.jpg testout.jpg + - Backup /Compare/Log testimg.ppm testoutp.ppm + - Backup /Compare/Log testimgp.jpg testoutp.jpg + - Backup /Compare/Log testorig.jpg testoutt.jpg + + +jcapimin.obj : jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.obj : jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.obj : jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.obj : jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.obj : jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.obj : jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.obj : jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.obj : jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.obj : jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.obj : jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.obj : jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.obj : jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.obj : jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.obj : jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.obj : jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.obj : jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.obj : jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.obj : jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.obj : jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.obj : jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.obj : jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.obj : jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.obj : jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.obj : jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.obj : jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.obj : jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.obj : jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.obj : jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.obj : jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.obj : jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.obj : jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.obj : jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.obj : jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.obj : jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.obj : jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.obj : jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.obj : jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.obj : jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.obj : jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.obj : jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.obj : jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.obj : jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.obj : jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.obj : jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.obj : jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.obj : jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.obj : jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.obj : jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.obj : jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.obj : jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.obj : cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.obj : djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.obj : jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +cdjpeg.obj : cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.obj : rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.obj : rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdjpgcom.obj : rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.obj : wrjpgcom.c jinclude.h jconfig.h +rdppm.obj : rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.obj : wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.obj : rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.obj : wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.obj : rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.obj : wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.obj : rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.obj : wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.obj : rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.obj : wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/windows_libs/jpeg-6a/makefile.sas b/windows_libs/jpeg-6a/makefile.sas new file mode 100644 index 00000000..14be5a46 --- /dev/null +++ b/windows_libs/jpeg-6a/makefile.sas @@ -0,0 +1,244 @@ +# Makefile for Independent JPEG Group's software + +# This makefile is for Amiga systems using SAS C 6.0 and up. +# Thanks to Ed Hanway, Mark Rinfret, and Jim Zepeda. + +# Read installation instructions before saying "make" !! + +# The name of your C compiler: +CC= sc + +# You may need to adjust these cc options: +# Uncomment the following lines for generic 680x0 version +ARCHFLAGS= cpu=any +SUFFIX= + +# Uncomment the following lines for 68030-only version +#ARCHFLAGS= cpu=68030 +#SUFFIX=.030 + +CFLAGS= nostackcheck data=near parms=register optimize $(ARCHFLAGS) \ + ignore=104 ignore=304 ignore=306 +# ignore=104 disables warnings for mismatched const qualifiers +# ignore=304 disables warnings for variables being optimized out +# ignore=306 disables warnings for the inlining of functions +# Generally, we recommend defining any configuration symbols in jconfig.h, +# NOT via define switches here. + +# Link-time cc options: +LDFLAGS= SC SD ND BATCH + +# To link any special libraries, add the necessary commands here. +LDLIBS= LIB:scm.lib LIB:sc.lib + +# Put here the object file name for the correct system-dependent memory +# manager file. For Amiga we recommend jmemname.o. +SYSDEPMEM= jmemname.o + +# miscellaneous OS-dependent stuff +# linker +LN= slink +# file deletion command +RM= delete quiet +# library (.lib) file creation command +AR= oml + +# End of configurable options. + + +# source files: JPEG library proper +LIBSOURCES= jcapimin.c jcapistd.c jccoefct.c jccolor.c jcdctmgr.c jchuff.c \ + jcinit.c jcmainct.c jcmarker.c jcmaster.c jcomapi.c jcparam.c \ + jcphuff.c jcprepct.c jcsample.c jctrans.c jdapimin.c jdapistd.c \ + jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c jddctmgr.c jdhuff.c \ + jdinput.c jdmainct.c jdmarker.c jdmaster.c jdmerge.c jdphuff.c \ + jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c jfdctfst.c \ + jfdctint.c jidctflt.c jidctfst.c jidctint.c jidctred.c jquant1.c \ + jquant2.c jutils.c jmemmgr.c +# memmgr back ends: compile only one of these into a working library +SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c +# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom +APPSOURCES= cjpeg.c djpeg.c jpegtran.c cdjpeg.c rdcolmap.c rdswitch.c \ + rdjpgcom.c wrjpgcom.c rdppm.c wrppm.c rdgif.c wrgif.c rdtarga.c \ + wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c +SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES) +# files included by source files +INCLUDES= jchuff.h jdhuff.h jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h \ + jpegint.h jpeglib.h jversion.h cdjpeg.h cderror.h +# documentation, test, and support files +DOCS= README install.doc usage.doc cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \ + wrjpgcom.1 wizard.doc example.c libjpeg.doc structure.doc \ + coderules.doc filelist.doc change.log +MKFILES= configure makefile.cfg makefile.ansi makefile.unix makefile.bcc \ + makefile.mc6 makefile.dj makefile.wat makcjpeg.st makdjpeg.st \ + makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \ + makefile.vms makvms.opt +CONFIGFILES= jconfig.cfg jconfig.manx jconfig.sas jconfig.st jconfig.bcc \ + jconfig.mc6 jconfig.dj jconfig.wat jconfig.vms +OTHERFILES= jconfig.doc ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm +TESTFILES= testorig.jpg testimg.ppm testimg.gif testimg.jpg testprog.jpg \ + testimgp.jpg +DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \ + $(OTHERFILES) $(TESTFILES) +# library object files common to compression and decompression +COMOBJECTS= jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM) +# compression library object files +CLIBOBJECTS= jcapimin.o jcapistd.o jctrans.o jcparam.o jdatadst.o jcinit.o \ + jcmaster.o jcmarker.o jcmainct.o jcprepct.o jccoefct.o jccolor.o \ + jcsample.o jchuff.o jcphuff.o jcdctmgr.o jfdctfst.o jfdctflt.o \ + jfdctint.o +# decompression library object files +DLIBOBJECTS= jdapimin.o jdapistd.o jdtrans.o jdatasrc.o jdmaster.o \ + jdinput.o jdmarker.o jdhuff.o jdphuff.o jdmainct.o jdcoefct.o \ + jdpostct.o jddctmgr.o jidctfst.o jidctflt.o jidctint.o jidctred.o \ + jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o +# These objectfiles are included in libjpeg.lib +LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS) +# object files for sample applications (excluding library files) +COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \ + cdjpeg.o +DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \ + cdjpeg.o +TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o + + +all: libjpeg.lib cjpeg$(SUFFIX) djpeg$(SUFFIX) jpegtran$(SUFFIX) rdjpgcom$(SUFFIX) wrjpgcom$(SUFFIX) + +libjpeg.lib: $(LIBOBJECTS) + -$(RM) libjpeg.lib + $(AR) libjpeg.lib r $(LIBOBJECTS) + +cjpeg$(SUFFIX): $(COBJECTS) libjpeg.lib + $(LN) n.tmp + comp testimg.ppm testout.ppm < n.tmp + comp testimg.gif testout.gif < n.tmp + comp testimg.jpg testout.jpg < n.tmp + comp testimg.ppm testoutp.ppm < n.tmp + comp testimgp.jpg testoutp.jpg < n.tmp + comp testorig.jpg testoutt.jpg < n.tmp + del n.tmp +!endif + + +jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcphuff.obj: jcphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jchuff.h +jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h +jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdphuff.obj: jdphuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdhuff.h +jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h +jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jidctred.obj: jidctred.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h +jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h +jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h +cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h +cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h +wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h +rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h +wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h diff --git a/windows_libs/jpeg-6a/makljpeg.st b/windows_libs/jpeg-6a/makljpeg.st new file mode 100644 index 00000000..435e2341 --- /dev/null +++ b/windows_libs/jpeg-6a/makljpeg.st @@ -0,0 +1,69 @@ +; Project file for Independent JPEG Group's software +; +; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. +; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de) +; and to Dr. B. Setzepfandt (bernd@gina.uni-muenster.de). +; +; To use this file, rename it to LIBJPEG.PRJ. +; Read installation instructions before trying to make the program! +; +; +; * * * Output file * * * +libjpeg.lib +; +; * * * COMPILER OPTIONS * * * +.C[-P] ; absolute calls +.C[-M] ; and no string merging, folks +.C[-w-cln] ; no "constant is long" warnings +.C[-w-par] ; no "parameter xxxx unused" +.C[-w-rch] ; no "unreachable code" +.C[-wsig] ; warn if significant digits may be lost +.L[-J] ; link new Obj-format (so we get a library) += +; * * * * List of modules * * * * +jcapimin.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcapistd.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jccoefct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jccolor.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcdctmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jchuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jchuff.h) +jcinit.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcmainct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcmarker.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcmaster.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcomapi.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcparam.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcphuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jchuff.h) +jcprepct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jcsample.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jctrans.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdapimin.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdapistd.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdatadst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h) +jdatasrc.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h) +jdcoefct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdcolor.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jddctmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jdhuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdhuff.h) +jdinput.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdmainct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdmarker.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdmaster.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdmerge.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdphuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdhuff.h) +jdpostct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdsample.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jdtrans.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jerror.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jversion.h,jerror.h) +jfdctflt.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jfdctfst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jfdctint.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jidctflt.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jidctfst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jidctint.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jidctred.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h) +jquant1.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jquant2.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jutils.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h) +jmemmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h) +jmemansi.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h) diff --git a/windows_libs/jpeg-6a/maktjpeg.st b/windows_libs/jpeg-6a/maktjpeg.st new file mode 100644 index 00000000..48e57e2c --- /dev/null +++ b/windows_libs/jpeg-6a/maktjpeg.st @@ -0,0 +1,30 @@ +; Project file for Independent JPEG Group's software +; +; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C. +; Thanks to Frank Moehle (Frank.Moehle@arbi.informatik.uni-oldenburg.de) +; and to Dr. B. Setzepfandt (bernd@gina.uni-muenster.de). +; +; To use this file, rename it to JPEGTRAN.PRJ. +; If you are using Turbo C, change filenames beginning with "PC..." to "TC..." +; Read installation instructions before trying to make the program! +; +; +; * * * Output file * * * +jpegtran.ttp +; +; * * * COMPILER OPTIONS * * * +.C[-P] ; absolute calls +.C[-M] ; and no string merging, folks +.C[-w-cln] ; no "constant is long" warnings +.C[-w-par] ; no "parameter xxxx unused" +.C[-w-rch] ; no "unreachable code" +.C[-wsig] ; warn if significant digits may be lost += +; * * * * List of modules * * * * +PCSTART.O +jpegtran.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h) +cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h) +LIBJPEG.LIB ; built by LIBJPEG.PRJ +PCSTDLIB.LIB ; standard library +PCEXTLIB.LIB ; extended library diff --git a/windows_libs/jpeg-6a/makvms.opt b/windows_libs/jpeg-6a/makvms.opt new file mode 100644 index 00000000..675e8fe9 --- /dev/null +++ b/windows_libs/jpeg-6a/makvms.opt @@ -0,0 +1,4 @@ +! A pointer to the VAX/VMS C Run-Time Shareable Library. +! This file is needed by makefile.mms and makefile.vms, +! but only for the older VAX C compiler. DEC C does not need it. +Sys$Library:VAXCRTL.EXE /Share diff --git a/windows_libs/jpeg-6a/rdbmp.c b/windows_libs/jpeg-6a/rdbmp.c new file mode 100644 index 00000000..b05fe2ac --- /dev/null +++ b/windows_libs/jpeg-6a/rdbmp.c @@ -0,0 +1,439 @@ +/* + * rdbmp.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to read input images in Microsoft "BMP" + * format (MS Windows 3.x, OS/2 1.x, and OS/2 2.x flavors). + * Currently, only 8-bit and 24-bit images are supported, not 1-bit or + * 4-bit (feeding such low-depth images into JPEG would be silly anyway). + * Also, we don't support RLE-compressed files. + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume input from + * an ordinary stdio stream. They further assume that reading begins + * at the start of the file; start_input may need work if the + * user interface has already read some data (e.g., to determine that + * the file is indeed BMP format). + * + * This code contributed by James Arthur Boucher. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef BMP_SUPPORTED + + +/* Macros to deal with unsigned chars as efficiently as compiler allows */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char U_CHAR; +#define UCH(x) ((int) (x)) +#else /* !HAVE_UNSIGNED_CHAR */ +#ifdef CHAR_IS_UNSIGNED +typedef char U_CHAR; +#define UCH(x) ((int) (x)) +#else +typedef char U_CHAR; +#define UCH(x) ((int) (x) & 0xFF) +#endif +#endif /* HAVE_UNSIGNED_CHAR */ + + +#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) + + +/* Private version of data source object */ + +typedef struct _bmp_source_struct * bmp_source_ptr; + +typedef struct _bmp_source_struct { + struct cjpeg_source_struct pub; /* public fields */ + + j_compress_ptr cinfo; /* back link saves passing separate parm */ + + JSAMPARRAY colormap; /* BMP colormap (converted to my format) */ + + jvirt_sarray_ptr whole_image; /* Needed to reverse row order */ + JDIMENSION source_row; /* Current source row number */ + JDIMENSION row_width; /* Physical width of scanlines in file */ + + int bits_per_pixel; /* remembers 8- or 24-bit format */ +} bmp_source_struct; + + +LOCAL(int) +read_byte (bmp_source_ptr sinfo) +/* Read next byte from BMP file */ +{ + register FILE *infile = sinfo->pub.input_file; + register int c; + + if ((c = getc(infile)) == EOF) + ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); + return c; +} + + +LOCAL(void) +read_colormap (bmp_source_ptr sinfo, int cmaplen, int mapentrysize) +/* Read the colormap from a BMP file */ +{ + int i; + + switch (mapentrysize) { + case 3: + /* BGR format (occurs in OS/2 files) */ + for (i = 0; i < cmaplen; i++) { + sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo); + } + break; + case 4: + /* BGR0 format (occurs in MS Windows files) */ + for (i = 0; i < cmaplen; i++) { + sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo); + (void) read_byte(sinfo); + } + break; + default: + ERREXIT(sinfo->cinfo, JERR_BMP_BADCMAP); + break; + } +} + + +/* + * Read one row of pixels. + * The image has been read into the whole_image array, but is otherwise + * unprocessed. We must read it out in top-to-bottom row order, and if + * it is an 8-bit image, we must expand colormapped pixels to 24bit format. + */ + +METHODDEF(JDIMENSION) +get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 8-bit colormap indexes */ +{ + bmp_source_ptr source = (bmp_source_ptr) sinfo; + register JSAMPARRAY colormap = source->colormap; + JSAMPARRAY image_ptr; + register int t; + register JSAMPROW inptr, outptr; + register JDIMENSION col; + + /* Fetch next row from virtual array */ + source->source_row--; + image_ptr = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->whole_image, + source->source_row, (JDIMENSION) 1, FALSE); + + /* Expand the colormap indexes to real data */ + inptr = image_ptr[0]; + outptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + t = GETJSAMPLE(*inptr++); + *outptr++ = colormap[0][t]; /* can omit GETJSAMPLE() safely */ + *outptr++ = colormap[1][t]; + *outptr++ = colormap[2][t]; + } + + return 1; +} + + +METHODDEF(JDIMENSION) +get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 24-bit pixels */ +{ + bmp_source_ptr source = (bmp_source_ptr) sinfo; + JSAMPARRAY image_ptr; + register JSAMPROW inptr, outptr; + register JDIMENSION col; + + /* Fetch next row from virtual array */ + source->source_row--; + image_ptr = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->whole_image, + source->source_row, (JDIMENSION) 1, FALSE); + + /* Transfer data. Note source values are in BGR order + * (even though Microsoft's own documents say the opposite). + */ + inptr = image_ptr[0]; + outptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + outptr[2] = *inptr++; /* can omit GETJSAMPLE() safely */ + outptr[1] = *inptr++; + outptr[0] = *inptr++; + outptr += 3; + } + + return 1; +} + + +/* + * This method loads the image into whole_image during the first call on + * get_pixel_rows. The get_pixel_rows pointer is then adjusted to call + * get_8bit_row or get_24bit_row on subsequent calls. + */ + +METHODDEF(JDIMENSION) +preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + bmp_source_ptr source = (bmp_source_ptr) sinfo; + register FILE *infile = source->pub.input_file; + register int c; + register JSAMPROW out_ptr; + JSAMPARRAY image_ptr; + JDIMENSION row, col; + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + + /* Read the data into a virtual array in input-file row order. */ + for (row = 0; row < cinfo->image_height; row++) { + if (progress != NULL) { + progress->pub.pass_counter = (long) row; + progress->pub.pass_limit = (long) cinfo->image_height; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } + image_ptr = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->whole_image, + row, (JDIMENSION) 1, TRUE); + out_ptr = image_ptr[0]; + for (col = source->row_width; col > 0; col--) { + /* inline copy of read_byte() for speed */ + if ((c = getc(infile)) == EOF) + ERREXIT(cinfo, JERR_INPUT_EOF); + *out_ptr++ = (JSAMPLE) c; + } + } + if (progress != NULL) + progress->completed_extra_passes++; + + /* Set up to read from the virtual array in top-to-bottom order */ + switch (source->bits_per_pixel) { + case 8: + source->pub.get_pixel_rows = get_8bit_row; + break; + case 24: + source->pub.get_pixel_rows = get_24bit_row; + break; + default: + ERREXIT(cinfo, JERR_BMP_BADDEPTH); + } + source->source_row = cinfo->image_height; + + /* And read the first row */ + return (*source->pub.get_pixel_rows) (cinfo, sinfo); +} + + +/* + * Read the file header; return image size and component count. + */ + +METHODDEF(void) +start_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + bmp_source_ptr source = (bmp_source_ptr) sinfo; + U_CHAR bmpfileheader[14]; + U_CHAR bmpinfoheader[64]; +#define GET_2B(array,offset) ((unsigned int) UCH(array[offset]) + \ + (((unsigned int) UCH(array[offset+1])) << 8)) +#define GET_4B(array,offset) ((INT32) UCH(array[offset]) + \ + (((INT32) UCH(array[offset+1])) << 8) + \ + (((INT32) UCH(array[offset+2])) << 16) + \ + (((INT32) UCH(array[offset+3])) << 24)) + INT32 bfOffBits; + INT32 headerSize; + INT32 biWidth = 0; /* initialize to avoid compiler warning */ + INT32 biHeight = 0; + unsigned int biPlanes; + INT32 biCompression; + INT32 biXPelsPerMeter,biYPelsPerMeter; + INT32 biClrUsed = 0; + int mapentrysize = 0; /* 0 indicates no colormap */ + INT32 bPad; + JDIMENSION row_width; + + /* Read and verify the bitmap file header */ + if (! ReadOK(source->pub.input_file, bmpfileheader, 14)) + ERREXIT(cinfo, JERR_INPUT_EOF); + if (GET_2B(bmpfileheader,0) != 0x4D42) /* 'BM' */ + ERREXIT(cinfo, JERR_BMP_NOT); + bfOffBits = (INT32) GET_4B(bmpfileheader,10); + /* We ignore the remaining fileheader fields */ + + /* The infoheader might be 12 bytes (OS/2 1.x), 40 bytes (Windows), + * or 64 bytes (OS/2 2.x). Check the first 4 bytes to find out which. + */ + if (! ReadOK(source->pub.input_file, bmpinfoheader, 4)) + ERREXIT(cinfo, JERR_INPUT_EOF); + headerSize = (INT32) GET_4B(bmpinfoheader,0); + if (headerSize < 12 || headerSize > 64) + ERREXIT(cinfo, JERR_BMP_BADHEADER); + if (! ReadOK(source->pub.input_file, bmpinfoheader+4, headerSize-4)) + ERREXIT(cinfo, JERR_INPUT_EOF); + + switch ((int) headerSize) { + case 12: + /* Decode OS/2 1.x header (Microsoft calls this a BITMAPCOREHEADER) */ + biWidth = (INT32) GET_2B(bmpinfoheader,4); + biHeight = (INT32) GET_2B(bmpinfoheader,6); + biPlanes = GET_2B(bmpinfoheader,8); + source->bits_per_pixel = (int) GET_2B(bmpinfoheader,10); + + switch (source->bits_per_pixel) { + case 8: /* colormapped image */ + mapentrysize = 3; /* OS/2 uses RGBTRIPLE colormap */ + TRACEMS2(cinfo, 1, JTRC_BMP_OS2_MAPPED, (int) biWidth, (int) biHeight); + break; + case 24: /* RGB image */ + TRACEMS2(cinfo, 1, JTRC_BMP_OS2, (int) biWidth, (int) biHeight); + break; + default: + ERREXIT(cinfo, JERR_BMP_BADDEPTH); + break; + } + if (biPlanes != 1) + ERREXIT(cinfo, JERR_BMP_BADPLANES); + break; + case 40: + case 64: + /* Decode Windows 3.x header (Microsoft calls this a BITMAPINFOHEADER) */ + /* or OS/2 2.x header, which has additional fields that we ignore */ + biWidth = GET_4B(bmpinfoheader,4); + biHeight = GET_4B(bmpinfoheader,8); + biPlanes = GET_2B(bmpinfoheader,12); + source->bits_per_pixel = (int) GET_2B(bmpinfoheader,14); + biCompression = GET_4B(bmpinfoheader,16); + biXPelsPerMeter = GET_4B(bmpinfoheader,24); + biYPelsPerMeter = GET_4B(bmpinfoheader,28); + biClrUsed = GET_4B(bmpinfoheader,32); + /* biSizeImage, biClrImportant fields are ignored */ + + switch (source->bits_per_pixel) { + case 8: /* colormapped image */ + mapentrysize = 4; /* Windows uses RGBQUAD colormap */ + TRACEMS2(cinfo, 1, JTRC_BMP_MAPPED, (int) biWidth, (int) biHeight); + break; + case 24: /* RGB image */ + TRACEMS2(cinfo, 1, JTRC_BMP, (int) biWidth, (int) biHeight); + break; + default: + ERREXIT(cinfo, JERR_BMP_BADDEPTH); + break; + } + if (biPlanes != 1) + ERREXIT(cinfo, JERR_BMP_BADPLANES); + if (biCompression != 0) + ERREXIT(cinfo, JERR_BMP_COMPRESSED); + + if (biXPelsPerMeter > 0 && biYPelsPerMeter > 0) { + /* Set JFIF density parameters from the BMP data */ + cinfo->X_density = (UINT16) (biXPelsPerMeter/100); /* 100 cm per meter */ + cinfo->Y_density = (UINT16) (biYPelsPerMeter/100); + cinfo->density_unit = 2; /* dots/cm */ + } + break; + default: + ERREXIT(cinfo, JERR_BMP_BADHEADER); + break; + } + + /* Compute distance to bitmap data --- will adjust for colormap below */ + bPad = bfOffBits - (headerSize + 14); + + /* Read the colormap, if any */ + if (mapentrysize > 0) { + if (biClrUsed <= 0) + biClrUsed = 256; /* assume it's 256 */ + else if (biClrUsed > 256) + ERREXIT(cinfo, JERR_BMP_BADCMAP); + /* Allocate space to store the colormap */ + source->colormap = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) biClrUsed, (JDIMENSION) 3); + /* and read it from the file */ + read_colormap(source, (int) biClrUsed, mapentrysize); + /* account for size of colormap */ + bPad -= biClrUsed * mapentrysize; + } + + /* Skip any remaining pad bytes */ + if (bPad < 0) /* incorrect bfOffBits value? */ + ERREXIT(cinfo, JERR_BMP_BADHEADER); + while (--bPad >= 0) { + (void) read_byte(source); + } + + /* Compute row width in file, including padding to 4-byte boundary */ + if (source->bits_per_pixel == 24) + row_width = (JDIMENSION) (biWidth * 3); + else + row_width = (JDIMENSION) biWidth; + while ((row_width & 3) != 0) row_width++; + source->row_width = row_width; + + /* Allocate space for inversion array, prepare for preload pass */ + source->whole_image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + row_width, (JDIMENSION) biHeight, (JDIMENSION) 1); + source->pub.get_pixel_rows = preload_image; + if (cinfo->progress != NULL) { + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + progress->total_extra_passes++; /* count file input as separate pass */ + } + + /* Allocate one-row buffer for returned data */ + source->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (biWidth * 3), (JDIMENSION) 1); + source->pub.buffer_height = 1; + + cinfo->in_color_space = JCS_RGB; + cinfo->input_components = 3; + cinfo->data_precision = 8; + cinfo->image_width = (JDIMENSION) biWidth; + cinfo->image_height = (JDIMENSION) biHeight; +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_input_bmp (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + /* no work */ +} + + +/* + * The module selection routine for BMP format input. + */ + +GLOBAL(cjpeg_source_ptr) +jinit_read_bmp (j_compress_ptr cinfo) +{ + bmp_source_ptr source; + + /* Create module interface object */ + source = (bmp_source_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(bmp_source_struct)); + source->cinfo = cinfo; /* make back link for subroutines */ + /* Fill in method ptrs, except get_pixel_rows which start_input sets */ + source->pub.start_input = start_input_bmp; + source->pub.finish_input = finish_input_bmp; + + return (cjpeg_source_ptr) source; +} + +#endif /* BMP_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/rdcolmap.c b/windows_libs/jpeg-6a/rdcolmap.c new file mode 100644 index 00000000..f79458ed --- /dev/null +++ b/windows_libs/jpeg-6a/rdcolmap.c @@ -0,0 +1,253 @@ +/* + * rdcolmap.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file implements djpeg's "-map file" switch. It reads a source image + * and constructs a colormap to be supplied to the JPEG decompressor. + * + * Currently, these file formats are supported for the map file: + * GIF: the contents of the GIF's global colormap are used. + * PPM (either text or raw flavor): the entire file is read and + * each unique pixel value is entered in the map. + * Note that reading a large PPM file will be horrendously slow. + * Typically, a PPM-format map file should contain just one pixel + * of each desired color. Such a file can be extracted from an + * ordinary image PPM file with ppmtomap(1). + * + * Rescaling a PPM that has a maxval unequal to MAXJSAMPLE is not + * currently implemented. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef QUANT_2PASS_SUPPORTED /* otherwise can't quantize to supplied map */ + +/* Portions of this code are based on the PBMPLUS library, which is: +** +** Copyright (C) 1988 by Jef Poskanzer. +** +** Permission to use, copy, modify, and distribute this software and its +** documentation for any purpose and without fee is hereby granted, provided +** that the above copyright notice appear in all copies and that both that +** copyright notice and this permission notice appear in supporting +** documentation. This software is provided "as is" without express or +** implied warranty. +*/ + + +/* + * Add a (potentially) new color to the color map. + */ + +LOCAL(void) +add_map_entry (j_decompress_ptr cinfo, int R, int G, int B) +{ + JSAMPROW colormap0 = cinfo->colormap[0]; + JSAMPROW colormap1 = cinfo->colormap[1]; + JSAMPROW colormap2 = cinfo->colormap[2]; + int ncolors = cinfo->actual_number_of_colors; + int index; + + /* Check for duplicate color. */ + for (index = 0; index < ncolors; index++) { + if (GETJSAMPLE(colormap0[index]) == R && + GETJSAMPLE(colormap1[index]) == G && + GETJSAMPLE(colormap2[index]) == B) + return; /* color is already in map */ + } + + /* Check for map overflow. */ + if (ncolors >= (MAXJSAMPLE+1)) + ERREXIT1(cinfo, JERR_QUANT_MANY_COLORS, (MAXJSAMPLE+1)); + + /* OK, add color to map. */ + colormap0[ncolors] = (JSAMPLE) R; + colormap1[ncolors] = (JSAMPLE) G; + colormap2[ncolors] = (JSAMPLE) B; + cinfo->actual_number_of_colors++; +} + + +/* + * Extract color map from a GIF file. + */ + +LOCAL(void) +read_gif_map (j_decompress_ptr cinfo, FILE * infile) +{ + int header[13]; + int i, colormaplen; + int R, G, B; + + /* Initial 'G' has already been read by read_color_map */ + /* Read the rest of the GIF header and logical screen descriptor */ + for (i = 1; i < 13; i++) { + if ((header[i] = getc(infile)) == EOF) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + } + + /* Verify GIF Header */ + if (header[1] != 'I' || header[2] != 'F') + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + + /* There must be a global color map. */ + if ((header[10] & 0x80) == 0) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + + /* OK, fetch it. */ + colormaplen = 2 << (header[10] & 0x07); + + for (i = 0; i < colormaplen; i++) { + R = getc(infile); + G = getc(infile); + B = getc(infile); + if (R == EOF || G == EOF || B == EOF) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + add_map_entry(cinfo, + R << (BITS_IN_JSAMPLE-8), + G << (BITS_IN_JSAMPLE-8), + B << (BITS_IN_JSAMPLE-8)); + } +} + + +/* Support routines for reading PPM */ + + +LOCAL(int) +pbm_getc (FILE * infile) +/* Read next char, skipping over any comments */ +/* A comment/newline sequence is returned as a newline */ +{ + register int ch; + + ch = getc(infile); + if (ch == '#') { + do { + ch = getc(infile); + } while (ch != '\n' && ch != EOF); + } + return ch; +} + + +LOCAL(unsigned int) +read_pbm_integer (j_decompress_ptr cinfo, FILE * infile) +/* Read an unsigned decimal integer from the PPM file */ +/* Swallows one trailing character after the integer */ +/* Note that on a 16-bit-int machine, only values up to 64k can be read. */ +/* This should not be a problem in practice. */ +{ + register int ch; + register unsigned int val; + + /* Skip any leading whitespace */ + do { + ch = pbm_getc(infile); + if (ch == EOF) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'); + + if (ch < '0' || ch > '9') + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + + val = ch - '0'; + while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') { + val *= 10; + val += ch - '0'; + } + return val; +} + + +/* + * Extract color map from a PPM file. + */ + +LOCAL(void) +read_ppm_map (j_decompress_ptr cinfo, FILE * infile) +{ + int c; + unsigned int w, h, maxval, row, col; + int R, G, B; + + /* Initial 'P' has already been read by read_color_map */ + c = getc(infile); /* save format discriminator for a sec */ + + /* while we fetch the remaining header info */ + w = read_pbm_integer(cinfo, infile); + h = read_pbm_integer(cinfo, infile); + maxval = read_pbm_integer(cinfo, infile); + + if (w <= 0 || h <= 0 || maxval <= 0) /* error check */ + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + + /* For now, we don't support rescaling from an unusual maxval. */ + if (maxval != (unsigned int) MAXJSAMPLE) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + + switch (c) { + case '3': /* it's a text-format PPM file */ + for (row = 0; row < h; row++) { + for (col = 0; col < w; col++) { + R = read_pbm_integer(cinfo, infile); + G = read_pbm_integer(cinfo, infile); + B = read_pbm_integer(cinfo, infile); + add_map_entry(cinfo, R, G, B); + } + } + break; + + case '6': /* it's a raw-format PPM file */ + for (row = 0; row < h; row++) { + for (col = 0; col < w; col++) { + R = pbm_getc(infile); + G = pbm_getc(infile); + B = pbm_getc(infile); + if (R == EOF || G == EOF || B == EOF) + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + add_map_entry(cinfo, R, G, B); + } + } + break; + + default: + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + break; + } +} + + +/* + * Main entry point from djpeg.c. + * Input: opened input file (from file name argument on command line). + * Output: colormap and actual_number_of_colors fields are set in cinfo. + */ + +GLOBAL(void) +read_color_map (j_decompress_ptr cinfo, FILE * infile) +{ + /* Allocate space for a color map of maximum supported size. */ + cinfo->colormap = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) (MAXJSAMPLE+1), (JDIMENSION) 3); + cinfo->actual_number_of_colors = 0; /* initialize map to empty */ + + /* Read first byte to determine file format */ + switch (getc(infile)) { + case 'G': + read_gif_map(cinfo, infile); + break; + case 'P': + read_ppm_map(cinfo, infile); + break; + default: + ERREXIT(cinfo, JERR_BAD_CMAP_FILE); + break; + } +} + +#endif /* QUANT_2PASS_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/rdgif.c b/windows_libs/jpeg-6a/rdgif.c new file mode 100644 index 00000000..0da2515c --- /dev/null +++ b/windows_libs/jpeg-6a/rdgif.c @@ -0,0 +1,683 @@ +/* + * rdgif.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + ************************************************************************** + * WARNING: You will need an LZW patent license from Unisys in order to * + * use this file legally in any commercial or shareware application. * + ************************************************************************** + * + * This file contains routines to read input images in GIF format. + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume input from + * an ordinary stdio stream. They further assume that reading begins + * at the start of the file; input_init may need work if the + * user interface has already read some data (e.g., to determine that + * the file is indeed GIF format). + */ + +/* + * This code is loosely based on giftoppm from the PBMPLUS distribution + * of Feb. 1991. That file contains the following copyright notice: + * +-------------------------------------------------------------------+ + * | Copyright 1990, David Koblas. | + * | Permission to use, copy, modify, and distribute this software | + * | and its documentation for any purpose and without fee is hereby | + * | granted, provided that the above copyright notice appear in all | + * | copies and that both that copyright notice and this permission | + * | notice appear in supporting documentation. This software is | + * | provided "as is" without express or implied warranty. | + * +-------------------------------------------------------------------+ + * + * We are also required to state that + * "The Graphics Interchange Format(c) is the Copyright property of + * CompuServe Incorporated. GIF(sm) is a Service Mark property of + * CompuServe Incorporated." + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef GIF_SUPPORTED + + +#define MAXCOLORMAPSIZE 256 /* max # of colors in a GIF colormap */ +#define NUMCOLORS 3 /* # of colors */ +#define CM_RED 0 /* color component numbers */ +#define CM_GREEN 1 +#define CM_BLUE 2 + +#define MAX_LZW_BITS 12 /* maximum LZW code size */ +#define LZW_TABLE_SIZE (1< table of prefix symbols */ + UINT8 FAR *symbol_tail; /* => table of suffix bytes */ + UINT8 FAR *symbol_stack; /* => stack for symbol expansions */ + UINT8 FAR *sp; /* stack pointer */ + + /* State for interlaced image processing */ + boolean is_interlaced; /* TRUE if have interlaced image */ + jvirt_sarray_ptr interlaced_image; /* full image in interlaced order */ + JDIMENSION cur_row_number; /* need to know actual row number */ + JDIMENSION pass2_offset; /* # of pixel rows in pass 1 */ + JDIMENSION pass3_offset; /* # of pixel rows in passes 1&2 */ + JDIMENSION pass4_offset; /* # of pixel rows in passes 1,2,3 */ +} gif_source_struct; + +typedef gif_source_struct * gif_source_ptr; + + +/* Forward declarations */ +METHODDEF(JDIMENSION) get_pixel_rows + JPP((j_compress_ptr cinfo, cjpeg_source_ptr sinfo)); +METHODDEF(JDIMENSION) load_interlaced_image + JPP((j_compress_ptr cinfo, cjpeg_source_ptr sinfo)); +METHODDEF(JDIMENSION) get_interlaced_row + JPP((j_compress_ptr cinfo, cjpeg_source_ptr sinfo)); + + +LOCAL(int) +ReadByte (gif_source_ptr sinfo) +/* Read next byte from GIF file */ +{ + register FILE * infile = sinfo->pub.input_file; + int c; + + if ((c = getc(infile)) == EOF) + ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); + return c; +} + + +LOCAL(int) +GetDataBlock (gif_source_ptr sinfo, char *buf) +/* Read a GIF data block, which has a leading count byte */ +/* A zero-length block marks the end of a data block sequence */ +{ + int count; + + count = ReadByte(sinfo); + if (count > 0) { + if (! ReadOK(sinfo->pub.input_file, buf, count)) + ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); + } + return count; +} + + +LOCAL(void) +SkipDataBlocks (gif_source_ptr sinfo) +/* Skip a series of data blocks, until a block terminator is found */ +{ + char buf[256]; + + while (GetDataBlock(sinfo, buf) > 0) + /* skip */; +} + + +LOCAL(void) +ReInitLZW (gif_source_ptr sinfo) +/* (Re)initialize LZW state; shared code for startup and Clear processing */ +{ + sinfo->code_size = sinfo->input_code_size + 1; + sinfo->limit_code = sinfo->clear_code << 1; /* 2^code_size */ + sinfo->max_code = sinfo->clear_code + 2; /* first unused code value */ + sinfo->sp = sinfo->symbol_stack; /* init stack to empty */ +} + + +LOCAL(void) +InitLZWCode (gif_source_ptr sinfo) +/* Initialize for a series of LZWReadByte (and hence GetCode) calls */ +{ + /* GetCode initialization */ + sinfo->last_byte = 2; /* make safe to "recopy last two bytes" */ + sinfo->last_bit = 0; /* nothing in the buffer */ + sinfo->cur_bit = 0; /* force buffer load on first call */ + sinfo->out_of_blocks = FALSE; + + /* LZWReadByte initialization: */ + /* compute special code values (note that these do not change later) */ + sinfo->clear_code = 1 << sinfo->input_code_size; + sinfo->end_code = sinfo->clear_code + 1; + sinfo->first_time = TRUE; + ReInitLZW(sinfo); +} + + +LOCAL(int) +GetCode (gif_source_ptr sinfo) +/* Fetch the next code_size bits from the GIF data */ +/* We assume code_size is less than 16 */ +{ + register INT32 accum; + int offs, ret, count; + + while ( (sinfo->cur_bit + sinfo->code_size) > sinfo->last_bit) { + /* Time to reload the buffer */ + if (sinfo->out_of_blocks) { + WARNMS(sinfo->cinfo, JWRN_GIF_NOMOREDATA); + return sinfo->end_code; /* fake something useful */ + } + /* preserve last two bytes of what we have -- assume code_size <= 16 */ + sinfo->code_buf[0] = sinfo->code_buf[sinfo->last_byte-2]; + sinfo->code_buf[1] = sinfo->code_buf[sinfo->last_byte-1]; + /* Load more bytes; set flag if we reach the terminator block */ + if ((count = GetDataBlock(sinfo, &sinfo->code_buf[2])) == 0) { + sinfo->out_of_blocks = TRUE; + WARNMS(sinfo->cinfo, JWRN_GIF_NOMOREDATA); + return sinfo->end_code; /* fake something useful */ + } + /* Reset counters */ + sinfo->cur_bit = (sinfo->cur_bit - sinfo->last_bit) + 16; + sinfo->last_byte = 2 + count; + sinfo->last_bit = sinfo->last_byte * 8; + } + + /* Form up next 24 bits in accum */ + offs = sinfo->cur_bit >> 3; /* byte containing cur_bit */ +#ifdef CHAR_IS_UNSIGNED + accum = sinfo->code_buf[offs+2]; + accum <<= 8; + accum |= sinfo->code_buf[offs+1]; + accum <<= 8; + accum |= sinfo->code_buf[offs]; +#else + accum = sinfo->code_buf[offs+2] & 0xFF; + accum <<= 8; + accum |= sinfo->code_buf[offs+1] & 0xFF; + accum <<= 8; + accum |= sinfo->code_buf[offs] & 0xFF; +#endif + + /* Right-align cur_bit in accum, then mask off desired number of bits */ + accum >>= (sinfo->cur_bit & 7); + ret = ((int) accum) & ((1 << sinfo->code_size) - 1); + + sinfo->cur_bit += sinfo->code_size; + return ret; +} + + +LOCAL(int) +LZWReadByte (gif_source_ptr sinfo) +/* Read an LZW-compressed byte */ +{ + register int code; /* current working code */ + int incode; /* saves actual input code */ + + /* First time, just eat the expected Clear code(s) and return next code, */ + /* which is expected to be a raw byte. */ + if (sinfo->first_time) { + sinfo->first_time = FALSE; + code = sinfo->clear_code; /* enables sharing code with Clear case */ + } else { + + /* If any codes are stacked from a previously read symbol, return them */ + if (sinfo->sp > sinfo->symbol_stack) + return (int) *(-- sinfo->sp); + + /* Time to read a new symbol */ + code = GetCode(sinfo); + + } + + if (code == sinfo->clear_code) { + /* Reinit state, swallow any extra Clear codes, and */ + /* return next code, which is expected to be a raw byte. */ + ReInitLZW(sinfo); + do { + code = GetCode(sinfo); + } while (code == sinfo->clear_code); + if (code > sinfo->clear_code) { /* make sure it is a raw byte */ + WARNMS(sinfo->cinfo, JWRN_GIF_BADDATA); + code = 0; /* use something valid */ + } + /* make firstcode, oldcode valid! */ + sinfo->firstcode = sinfo->oldcode = code; + return code; + } + + if (code == sinfo->end_code) { + /* Skip the rest of the image, unless GetCode already read terminator */ + if (! sinfo->out_of_blocks) { + SkipDataBlocks(sinfo); + sinfo->out_of_blocks = TRUE; + } + /* Complain that there's not enough data */ + WARNMS(sinfo->cinfo, JWRN_GIF_ENDCODE); + /* Pad data with 0's */ + return 0; /* fake something usable */ + } + + /* Got normal raw byte or LZW symbol */ + incode = code; /* save for a moment */ + + if (code >= sinfo->max_code) { /* special case for not-yet-defined symbol */ + /* code == max_code is OK; anything bigger is bad data */ + if (code > sinfo->max_code) { + WARNMS(sinfo->cinfo, JWRN_GIF_BADDATA); + incode = 0; /* prevent creation of loops in symbol table */ + } + /* this symbol will be defined as oldcode/firstcode */ + *(sinfo->sp++) = (UINT8) sinfo->firstcode; + code = sinfo->oldcode; + } + + /* If it's a symbol, expand it into the stack */ + while (code >= sinfo->clear_code) { + *(sinfo->sp++) = sinfo->symbol_tail[code]; /* tail is a byte value */ + code = sinfo->symbol_head[code]; /* head is another LZW symbol */ + } + /* At this point code just represents a raw byte */ + sinfo->firstcode = code; /* save for possible future use */ + + /* If there's room in table, */ + if ((code = sinfo->max_code) < LZW_TABLE_SIZE) { + /* Define a new symbol = prev sym + head of this sym's expansion */ + sinfo->symbol_head[code] = sinfo->oldcode; + sinfo->symbol_tail[code] = (UINT8) sinfo->firstcode; + sinfo->max_code++; + /* Is it time to increase code_size? */ + if ((sinfo->max_code >= sinfo->limit_code) && + (sinfo->code_size < MAX_LZW_BITS)) { + sinfo->code_size++; + sinfo->limit_code <<= 1; /* keep equal to 2^code_size */ + } + } + + sinfo->oldcode = incode; /* save last input symbol for future use */ + return sinfo->firstcode; /* return first byte of symbol's expansion */ +} + + +LOCAL(void) +ReadColorMap (gif_source_ptr sinfo, int cmaplen, JSAMPARRAY cmap) +/* Read a GIF colormap */ +{ + int i; + + for (i = 0; i < cmaplen; i++) { +#if BITS_IN_JSAMPLE == 8 +#define UPSCALE(x) (x) +#else +#define UPSCALE(x) ((x) << (BITS_IN_JSAMPLE-8)) +#endif + cmap[CM_RED][i] = (JSAMPLE) UPSCALE(ReadByte(sinfo)); + cmap[CM_GREEN][i] = (JSAMPLE) UPSCALE(ReadByte(sinfo)); + cmap[CM_BLUE][i] = (JSAMPLE) UPSCALE(ReadByte(sinfo)); + } +} + + +LOCAL(void) +DoExtension (gif_source_ptr sinfo) +/* Process an extension block */ +/* Currently we ignore 'em all */ +{ + int extlabel; + + /* Read extension label byte */ + extlabel = ReadByte(sinfo); + TRACEMS1(sinfo->cinfo, 1, JTRC_GIF_EXTENSION, extlabel); + /* Skip the data block(s) associated with the extension */ + SkipDataBlocks(sinfo); +} + + +/* + * Read the file header; return image size and component count. + */ + +METHODDEF(void) +start_input_gif (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + gif_source_ptr source = (gif_source_ptr) sinfo; + char hdrbuf[10]; /* workspace for reading control blocks */ + unsigned int width, height; /* image dimensions */ + int colormaplen, aspectRatio; + int c; + + /* Allocate space to store the colormap */ + source->colormap = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) MAXCOLORMAPSIZE, (JDIMENSION) NUMCOLORS); + + /* Read and verify GIF Header */ + if (! ReadOK(source->pub.input_file, hdrbuf, 6)) + ERREXIT(cinfo, JERR_GIF_NOT); + if (hdrbuf[0] != 'G' || hdrbuf[1] != 'I' || hdrbuf[2] != 'F') + ERREXIT(cinfo, JERR_GIF_NOT); + /* Check for expected version numbers. + * If unknown version, give warning and try to process anyway; + * this is per recommendation in GIF89a standard. + */ + if ((hdrbuf[3] != '8' || hdrbuf[4] != '7' || hdrbuf[5] != 'a') && + (hdrbuf[3] != '8' || hdrbuf[4] != '9' || hdrbuf[5] != 'a')) + TRACEMS3(cinfo, 1, JTRC_GIF_BADVERSION, hdrbuf[3], hdrbuf[4], hdrbuf[5]); + + /* Read and decipher Logical Screen Descriptor */ + if (! ReadOK(source->pub.input_file, hdrbuf, 7)) + ERREXIT(cinfo, JERR_INPUT_EOF); + width = LM_to_uint(hdrbuf[0],hdrbuf[1]); + height = LM_to_uint(hdrbuf[2],hdrbuf[3]); + colormaplen = 2 << (hdrbuf[4] & 0x07); + /* we ignore the color resolution, sort flag, and background color index */ + aspectRatio = hdrbuf[6] & 0xFF; + if (aspectRatio != 0 && aspectRatio != 49) + TRACEMS(cinfo, 1, JTRC_GIF_NONSQUARE); + + /* Read global colormap if header indicates it is present */ + if (BitSet(hdrbuf[4], COLORMAPFLAG)) + ReadColorMap(source, colormaplen, source->colormap); + + /* Scan until we reach start of desired image. + * We don't currently support skipping images, but could add it easily. + */ + for (;;) { + c = ReadByte(source); + + if (c == ';') /* GIF terminator?? */ + ERREXIT(cinfo, JERR_GIF_IMAGENOTFOUND); + + if (c == '!') { /* Extension */ + DoExtension(source); + continue; + } + + if (c != ',') { /* Not an image separator? */ + WARNMS1(cinfo, JWRN_GIF_CHAR, c); + continue; + } + + /* Read and decipher Local Image Descriptor */ + if (! ReadOK(source->pub.input_file, hdrbuf, 9)) + ERREXIT(cinfo, JERR_INPUT_EOF); + /* we ignore top/left position info, also sort flag */ + width = LM_to_uint(hdrbuf[4],hdrbuf[5]); + height = LM_to_uint(hdrbuf[6],hdrbuf[7]); + source->is_interlaced = BitSet(hdrbuf[8], INTERLACE); + + /* Read local colormap if header indicates it is present */ + /* Note: if we wanted to support skipping images, */ + /* we'd need to skip rather than read colormap for ignored images */ + if (BitSet(hdrbuf[8], COLORMAPFLAG)) { + colormaplen = 2 << (hdrbuf[8] & 0x07); + ReadColorMap(source, colormaplen, source->colormap); + } + + source->input_code_size = ReadByte(source); /* get min-code-size byte */ + if (source->input_code_size < 2 || source->input_code_size >= MAX_LZW_BITS) + ERREXIT1(cinfo, JERR_GIF_CODESIZE, source->input_code_size); + + /* Reached desired image, so break out of loop */ + /* If we wanted to skip this image, */ + /* we'd call SkipDataBlocks and then continue the loop */ + break; + } + + /* Prepare to read selected image: first initialize LZW decompressor */ + source->symbol_head = (UINT16 FAR *) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + LZW_TABLE_SIZE * SIZEOF(UINT16)); + source->symbol_tail = (UINT8 FAR *) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + LZW_TABLE_SIZE * SIZEOF(UINT8)); + source->symbol_stack = (UINT8 FAR *) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + LZW_TABLE_SIZE * SIZEOF(UINT8)); + InitLZWCode(source); + + /* + * If image is interlaced, we read it into a full-size sample array, + * decompressing as we go; then get_interlaced_row selects rows from the + * sample array in the proper order. + */ + if (source->is_interlaced) { + /* We request the virtual array now, but can't access it until virtual + * arrays have been allocated. Hence, the actual work of reading the + * image is postponed until the first call to get_pixel_rows. + */ + source->interlaced_image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + (JDIMENSION) width, (JDIMENSION) height, (JDIMENSION) 1); + if (cinfo->progress != NULL) { + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + progress->total_extra_passes++; /* count file input as separate pass */ + } + source->pub.get_pixel_rows = load_interlaced_image; + } else { + source->pub.get_pixel_rows = get_pixel_rows; + } + + /* Create compressor input buffer. */ + source->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) width * NUMCOLORS, (JDIMENSION) 1); + source->pub.buffer_height = 1; + + /* Return info about the image. */ + cinfo->in_color_space = JCS_RGB; + cinfo->input_components = NUMCOLORS; + cinfo->data_precision = BITS_IN_JSAMPLE; /* we always rescale data to this */ + cinfo->image_width = width; + cinfo->image_height = height; + + TRACEMS3(cinfo, 1, JTRC_GIF, width, height, colormaplen); +} + + +/* + * Read one row of pixels. + * This version is used for noninterlaced GIF images: + * we read directly from the GIF file. + */ + +METHODDEF(JDIMENSION) +get_pixel_rows (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + gif_source_ptr source = (gif_source_ptr) sinfo; + register int c; + register JSAMPROW ptr; + register JDIMENSION col; + register JSAMPARRAY colormap = source->colormap; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + c = LZWReadByte(source); + *ptr++ = colormap[CM_RED][c]; + *ptr++ = colormap[CM_GREEN][c]; + *ptr++ = colormap[CM_BLUE][c]; + } + return 1; +} + + +/* + * Read one row of pixels. + * This version is used for the first call on get_pixel_rows when + * reading an interlaced GIF file: we read the whole image into memory. + */ + +METHODDEF(JDIMENSION) +load_interlaced_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + gif_source_ptr source = (gif_source_ptr) sinfo; + JSAMPARRAY image_ptr; + register JSAMPROW sptr; + register JDIMENSION col; + JDIMENSION row; + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + + /* Read the interlaced image into the virtual array we've created. */ + for (row = 0; row < cinfo->image_height; row++) { + if (progress != NULL) { + progress->pub.pass_counter = (long) row; + progress->pub.pass_limit = (long) cinfo->image_height; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } + image_ptr = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->interlaced_image, + row, (JDIMENSION) 1, TRUE); + sptr = image_ptr[0]; + for (col = cinfo->image_width; col > 0; col--) { + *sptr++ = (JSAMPLE) LZWReadByte(source); + } + } + if (progress != NULL) + progress->completed_extra_passes++; + + /* Replace method pointer so subsequent calls don't come here. */ + source->pub.get_pixel_rows = get_interlaced_row; + /* Initialize for get_interlaced_row, and perform first call on it. */ + source->cur_row_number = 0; + source->pass2_offset = (cinfo->image_height + 7) / 8; + source->pass3_offset = source->pass2_offset + (cinfo->image_height + 3) / 8; + source->pass4_offset = source->pass3_offset + (cinfo->image_height + 1) / 4; + + return get_interlaced_row(cinfo, sinfo); +} + + +/* + * Read one row of pixels. + * This version is used for interlaced GIF images: + * we read from the virtual array. + */ + +METHODDEF(JDIMENSION) +get_interlaced_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + gif_source_ptr source = (gif_source_ptr) sinfo; + JSAMPARRAY image_ptr; + register int c; + register JSAMPROW sptr, ptr; + register JDIMENSION col; + register JSAMPARRAY colormap = source->colormap; + JDIMENSION irow; + + /* Figure out which row of interlaced image is needed, and access it. */ + switch ((int) (source->cur_row_number & 7)) { + case 0: /* first-pass row */ + irow = source->cur_row_number >> 3; + break; + case 4: /* second-pass row */ + irow = (source->cur_row_number >> 3) + source->pass2_offset; + break; + case 2: /* third-pass row */ + case 6: + irow = (source->cur_row_number >> 2) + source->pass3_offset; + break; + default: /* fourth-pass row */ + irow = (source->cur_row_number >> 1) + source->pass4_offset; + break; + } + image_ptr = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->interlaced_image, + irow, (JDIMENSION) 1, FALSE); + /* Scan the row, expand colormap, and output */ + sptr = image_ptr[0]; + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + c = GETJSAMPLE(*sptr++); + *ptr++ = colormap[CM_RED][c]; + *ptr++ = colormap[CM_GREEN][c]; + *ptr++ = colormap[CM_BLUE][c]; + } + source->cur_row_number++; /* for next time */ + return 1; +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_input_gif (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + /* no work */ +} + + +/* + * The module selection routine for GIF format input. + */ + +GLOBAL(cjpeg_source_ptr) +jinit_read_gif (j_compress_ptr cinfo) +{ + gif_source_ptr source; + + /* Create module interface object */ + source = (gif_source_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(gif_source_struct)); + source->cinfo = cinfo; /* make back link for subroutines */ + /* Fill in method ptrs, except get_pixel_rows which start_input sets */ + source->pub.start_input = start_input_gif; + source->pub.finish_input = finish_input_gif; + + return (cjpeg_source_ptr) source; +} + +#endif /* GIF_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/rdjpgcom.1 b/windows_libs/jpeg-6a/rdjpgcom.1 new file mode 100644 index 00000000..0de92bff --- /dev/null +++ b/windows_libs/jpeg-6a/rdjpgcom.1 @@ -0,0 +1,45 @@ +.TH RDJPGCOM 1 "15 June 1995" +.SH NAME +rdjpgcom \- display text comments from a JPEG file +.SH SYNOPSIS +.B rdjpgcom +[ +.B \-verbose +] +[ +.I filename +] +.LP +.SH DESCRIPTION +.LP +.B rdjpgcom +reads the named JPEG/JFIF file, or the standard input if no file is named, +and prints any text comments found in the file on the standard output. +.PP +The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. +Although the standard doesn't actually define what COM blocks are for, they +are widely used to hold user-supplied text strings. This lets you add +annotations, titles, index terms, etc to your JPEG files, and later retrieve +them as text. COM blocks do not interfere with the image stored in the JPEG +file. The maximum size of a COM block is 64K, but you can have as many of +them as you like in one JPEG file. +.SH OPTIONS +.TP +.B \-verbose +Causes +.B rdjpgcom +to also display the JPEG image dimensions. +.PP +Switch names may be abbreviated, and are not case sensitive. +.SH HINTS +.B rdjpgcom +does not depend on the IJG JPEG library. Its source code is intended as an +illustration of the minimum amount of code required to parse a JPEG file +header correctly. +.SH SEE ALSO +.BR cjpeg (1), +.BR djpeg (1), +.BR jpegtran (1), +.BR wrjpgcom (1) +.SH AUTHOR +Independent JPEG Group diff --git a/windows_libs/jpeg-6a/rdjpgcom.c b/windows_libs/jpeg-6a/rdjpgcom.c new file mode 100644 index 00000000..95770ec7 --- /dev/null +++ b/windows_libs/jpeg-6a/rdjpgcom.c @@ -0,0 +1,476 @@ +/* + * rdjpgcom.c + * + * Copyright (C) 1994-1995, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a very simple stand-alone application that displays + * the text in COM (comment) markers in a JFIF file. + * This may be useful as an example of the minimum logic needed to parse + * JPEG markers. + */ + +#define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */ +#include "jinclude.h" /* get auto-config symbols, */ + +#include /* to declare isupper(), tolower() */ +#ifdef USE_SETMODE +#include /* to declare setmode()'s parameter macros */ +/* If you have setmode() but not , just delete this line: */ +#include /* to declare setmode() */ +#endif + +#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ +#ifdef __MWERKS__ +#include /* Metrowerks needs this */ +#include /* ... and this */ +#endif +#ifdef THINK_C +#include /* Think declares it here */ +#endif +#endif + +#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ +#define READ_BINARY "r" +#else +#define READ_BINARY "rb" +#endif + +#ifndef EXIT_FAILURE /* define exit() codes if not provided */ +#define EXIT_FAILURE 1 +#endif +#ifndef EXIT_SUCCESS +#ifdef VMS +#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ +#else +#define EXIT_SUCCESS 0 +#endif +#endif + + +/* + * These macros are used to read the input file. + * To reuse this code in another application, you might need to change these. + */ + +static FILE * infile; /* input JPEG file */ + +/* Return next input byte, or EOF if no more */ +#define NEXTBYTE() getc(infile) + + +/* Error exit handler */ +#define ERREXIT(msg) (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE)) + + +/* Read one byte, testing for EOF */ +static int +read_1_byte (void) +{ + int c; + + c = NEXTBYTE(); + if (c == EOF) + ERREXIT("Premature EOF in JPEG file"); + return c; +} + +/* Read 2 bytes, convert to unsigned int */ +/* All 2-byte quantities in JPEG markers are MSB first */ +static unsigned int +read_2_bytes (void) +{ + int c1, c2; + + c1 = NEXTBYTE(); + if (c1 == EOF) + ERREXIT("Premature EOF in JPEG file"); + c2 = NEXTBYTE(); + if (c2 == EOF) + ERREXIT("Premature EOF in JPEG file"); + return (((unsigned int) c1) << 8) + ((unsigned int) c2); +} + + +/* + * JPEG markers consist of one or more 0xFF bytes, followed by a marker + * code byte (which is not an FF). Here are the marker codes of interest + * in this program. (See jdmarker.c for a more complete list.) + */ + +#define M_SOF0 0xC0 /* Start Of Frame N */ +#define M_SOF1 0xC1 /* N indicates which compression process */ +#define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */ +#define M_SOF3 0xC3 +#define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */ +#define M_SOF6 0xC6 +#define M_SOF7 0xC7 +#define M_SOF9 0xC9 +#define M_SOF10 0xCA +#define M_SOF11 0xCB +#define M_SOF13 0xCD +#define M_SOF14 0xCE +#define M_SOF15 0xCF +#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */ +#define M_EOI 0xD9 /* End Of Image (end of datastream) */ +#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */ +#define M_COM 0xFE /* COMment */ + + +/* + * Find the next JPEG marker and return its marker code. + * We expect at least one FF byte, possibly more if the compressor used FFs + * to pad the file. + * There could also be non-FF garbage between markers. The treatment of such + * garbage is unspecified; we choose to skip over it but emit a warning msg. + * NB: this routine must not be used after seeing SOS marker, since it will + * not deal correctly with FF/00 sequences in the compressed image data... + */ + +static int +next_marker (void) +{ + int c; + int discarded_bytes = 0; + + /* Find 0xFF byte; count and skip any non-FFs. */ + c = read_1_byte(); + while (c != 0xFF) { + discarded_bytes++; + c = read_1_byte(); + } + /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs + * are legal as pad bytes, so don't count them in discarded_bytes. + */ + do { + c = read_1_byte(); + } while (c == 0xFF); + + if (discarded_bytes != 0) { + fprintf(stderr, "Warning: garbage data found in JPEG file\n"); + } + + return c; +} + + +/* + * Read the initial marker, which should be SOI. + * For a JFIF file, the first two bytes of the file should be literally + * 0xFF M_SOI. To be more general, we could use next_marker, but if the + * input file weren't actually JPEG at all, next_marker might read the whole + * file and then return a misleading error message... + */ + +static int +first_marker (void) +{ + int c1, c2; + + c1 = NEXTBYTE(); + c2 = NEXTBYTE(); + if (c1 != 0xFF || c2 != M_SOI) + ERREXIT("Not a JPEG file"); + return c2; +} + + +/* + * Most types of marker are followed by a variable-length parameter segment. + * This routine skips over the parameters for any marker we don't otherwise + * want to process. + * Note that we MUST skip the parameter segment explicitly in order not to + * be fooled by 0xFF bytes that might appear within the parameter segment; + * such bytes do NOT introduce new markers. + */ + +static void +skip_variable (void) +/* Skip over an unknown or uninteresting variable-length marker */ +{ + unsigned int length; + + /* Get the marker parameter length count */ + length = read_2_bytes(); + /* Length includes itself, so must be at least 2 */ + if (length < 2) + ERREXIT("Erroneous JPEG marker length"); + length -= 2; + /* Skip over the remaining bytes */ + while (length > 0) { + (void) read_1_byte(); + length--; + } +} + + +/* + * Process a COM marker. + * We want to print out the marker contents as legible text; + * we must guard against random junk and varying newline representations. + */ + +static void +process_COM (void) +{ + unsigned int length; + int ch; + int lastch = 0; + + /* Get the marker parameter length count */ + length = read_2_bytes(); + /* Length includes itself, so must be at least 2 */ + if (length < 2) + ERREXIT("Erroneous JPEG marker length"); + length -= 2; + + while (length > 0) { + ch = read_1_byte(); + /* Emit the character in a readable form. + * Nonprintables are converted to \nnn form, + * while \ is converted to \\. + * Newlines in CR, CR/LF, or LF form will be printed as one newline. + */ + if (ch == '\r') { + printf("\n"); + } else if (ch == '\n') { + if (lastch != '\r') + printf("\n"); + } else if (ch == '\\') { + printf("\\\\"); + } else if (isprint(ch)) { + putc(ch, stdout); + } else { + printf("\\%03o", ch); + } + lastch = ch; + length--; + } + printf("\n"); +} + + +/* + * Process a SOFn marker. + * This code is only needed if you want to know the image dimensions... + */ + +static void +process_SOFn (int marker) +{ + unsigned int length; + unsigned int image_height, image_width; + int data_precision, num_components; + const char * process; + int ci; + + length = read_2_bytes(); /* usual parameter length count */ + + data_precision = read_1_byte(); + image_height = read_2_bytes(); + image_width = read_2_bytes(); + num_components = read_1_byte(); + + switch (marker) { + case M_SOF0: process = "Baseline"; break; + case M_SOF1: process = "Extended sequential"; break; + case M_SOF2: process = "Progressive"; break; + case M_SOF3: process = "Lossless"; break; + case M_SOF5: process = "Differential sequential"; break; + case M_SOF6: process = "Differential progressive"; break; + case M_SOF7: process = "Differential lossless"; break; + case M_SOF9: process = "Extended sequential, arithmetic coding"; break; + case M_SOF10: process = "Progressive, arithmetic coding"; break; + case M_SOF11: process = "Lossless, arithmetic coding"; break; + case M_SOF13: process = "Differential sequential, arithmetic coding"; break; + case M_SOF14: process = "Differential progressive, arithmetic coding"; break; + case M_SOF15: process = "Differential lossless, arithmetic coding"; break; + default: process = "Unknown"; break; + } + + printf("JPEG image is %uw * %uh, %d color components, %d bits per sample\n", + image_width, image_height, num_components, data_precision); + printf("JPEG process: %s\n", process); + + if (length != (unsigned int) (8 + num_components * 3)) + ERREXIT("Bogus SOF marker length"); + + for (ci = 0; ci < num_components; ci++) { + (void) read_1_byte(); /* Component ID code */ + (void) read_1_byte(); /* H, V sampling factors */ + (void) read_1_byte(); /* Quantization table number */ + } +} + + +/* + * Parse the marker stream until SOS or EOI is seen; + * display any COM markers. + * While the companion program wrjpgcom will always insert COM markers before + * SOFn, other implementations might not, so we scan to SOS before stopping. + * If we were only interested in the image dimensions, we would stop at SOFn. + * (Conversely, if we only cared about COM markers, there would be no need + * for special code to handle SOFn; we could treat it like other markers.) + */ + +static int +scan_JPEG_header (int verbose) +{ + int marker; + + /* Expect SOI at start of file */ + if (first_marker() != M_SOI) + ERREXIT("Expected SOI marker first"); + + /* Scan miscellaneous markers until we reach SOS. */ + for (;;) { + marker = next_marker(); + switch (marker) { + case M_SOF0: /* Baseline */ + case M_SOF1: /* Extended sequential, Huffman */ + case M_SOF2: /* Progressive, Huffman */ + case M_SOF3: /* Lossless, Huffman */ + case M_SOF5: /* Differential sequential, Huffman */ + case M_SOF6: /* Differential progressive, Huffman */ + case M_SOF7: /* Differential lossless, Huffman */ + case M_SOF9: /* Extended sequential, arithmetic */ + case M_SOF10: /* Progressive, arithmetic */ + case M_SOF11: /* Lossless, arithmetic */ + case M_SOF13: /* Differential sequential, arithmetic */ + case M_SOF14: /* Differential progressive, arithmetic */ + case M_SOF15: /* Differential lossless, arithmetic */ + if (verbose) + process_SOFn(marker); + else + skip_variable(); + break; + + case M_SOS: /* stop before hitting compressed data */ + return marker; + + case M_EOI: /* in case it's a tables-only JPEG stream */ + return marker; + + case M_COM: + process_COM(); + break; + + default: /* Anything else just gets skipped */ + skip_variable(); /* we assume it has a parameter count... */ + break; + } + } /* end loop */ +} + + +/* Command line parsing code */ + +static const char * progname; /* program name for error messages */ + + +static void +usage (void) +/* complain about bad command line */ +{ + fprintf(stderr, "rdjpgcom displays any textual comments in a JPEG file.\n"); + + fprintf(stderr, "Usage: %s [switches] [inputfile]\n", progname); + + fprintf(stderr, "Switches (names may be abbreviated):\n"); + fprintf(stderr, " -verbose Also display dimensions of JPEG image\n"); + + exit(EXIT_FAILURE); +} + + +static int +keymatch (char * arg, const char * keyword, int minchars) +/* Case-insensitive matching of (possibly abbreviated) keyword switches. */ +/* keyword is the constant keyword (must be lower case already), */ +/* minchars is length of minimum legal abbreviation. */ +{ + register int ca, ck; + register int nmatched = 0; + + while ((ca = *arg++) != '\0') { + if ((ck = *keyword++) == '\0') + return 0; /* arg longer than keyword, no good */ + if (isupper(ca)) /* force arg to lcase (assume ck is already) */ + ca = tolower(ca); + if (ca != ck) + return 0; /* no good */ + nmatched++; /* count matched characters */ + } + /* reached end of argument; fail if it's too short for unique abbrev */ + if (nmatched < minchars) + return 0; + return 1; /* A-OK */ +} + + +/* + * The main program. + */ + +int +main (int argc, char **argv) +{ + int argn; + char * arg; + int verbose = 0; + + /* On Mac, fetch a command line. */ +#ifdef USE_CCOMMAND + argc = ccommand(&argv); +#endif + + progname = argv[0]; + if (progname == NULL || progname[0] == 0) + progname = "rdjpgcom"; /* in case C library doesn't provide it */ + + /* Parse switches, if any */ + for (argn = 1; argn < argc; argn++) { + arg = argv[argn]; + if (arg[0] != '-') + break; /* not switch, must be file name */ + arg++; /* advance over '-' */ + if (keymatch(arg, "verbose", 1)) { + verbose++; + } else + usage(); + } + + /* Open the input file. */ + /* Unix style: expect zero or one file name */ + if (argn < argc-1) { + fprintf(stderr, "%s: only one input file\n", progname); + usage(); + } + if (argn < argc) { + if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); + exit(EXIT_FAILURE); + } + } else { + /* default input file is stdin */ +#ifdef USE_SETMODE /* need to hack file mode? */ + setmode(fileno(stdin), O_BINARY); +#endif +#ifdef USE_FDOPEN /* need to re-open in binary mode? */ + if ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open stdin\n", progname); + exit(EXIT_FAILURE); + } +#else + infile = stdin; +#endif + } + + /* Scan the JPEG headers. */ + (void) scan_JPEG_header(verbose); + + /* All done. */ + exit(EXIT_SUCCESS); + return 0; /* suppress no-return-value warnings */ +} diff --git a/windows_libs/jpeg-6a/rdppm.c b/windows_libs/jpeg-6a/rdppm.c new file mode 100644 index 00000000..e1c2a928 --- /dev/null +++ b/windows_libs/jpeg-6a/rdppm.c @@ -0,0 +1,450 @@ +/* + * rdppm.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to read input images in PPM/PGM format. + * The extended 2-byte-per-sample raw PPM/PGM formats are supported. + * The PBMPLUS library is NOT required to compile this software + * (but it is highly useful as a set of PPM image manipulation programs). + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume input from + * an ordinary stdio stream. They further assume that reading begins + * at the start of the file; start_input may need work if the + * user interface has already read some data (e.g., to determine that + * the file is indeed PPM format). + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef PPM_SUPPORTED + + +/* Portions of this code are based on the PBMPLUS library, which is: +** +** Copyright (C) 1988 by Jef Poskanzer. +** +** Permission to use, copy, modify, and distribute this software and its +** documentation for any purpose and without fee is hereby granted, provided +** that the above copyright notice appear in all copies and that both that +** copyright notice and this permission notice appear in supporting +** documentation. This software is provided "as is" without express or +** implied warranty. +*/ + + +/* Macros to deal with unsigned chars as efficiently as compiler allows */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char U_CHAR; +#define UCH(x) ((int) (x)) +#else /* !HAVE_UNSIGNED_CHAR */ +#ifdef CHAR_IS_UNSIGNED +typedef char U_CHAR; +#define UCH(x) ((int) (x)) +#else +typedef char U_CHAR; +#define UCH(x) ((int) (x) & 0xFF) +#endif +#endif /* HAVE_UNSIGNED_CHAR */ + + +#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) + + +/* + * On most systems, reading individual bytes with getc() is drastically less + * efficient than buffering a row at a time with fread(). On PCs, we must + * allocate the buffer in near data space, because we are assuming small-data + * memory model, wherein fread() can't reach far memory. If you need to + * process very wide images on a PC, you might have to compile in large-memory + * model, or else replace fread() with a getc() loop --- which will be much + * slower. + */ + + +/* Private version of data source object */ + +typedef struct { + struct cjpeg_source_struct pub; /* public fields */ + + U_CHAR *iobuffer; /* non-FAR pointer to I/O buffer */ + JSAMPROW pixrow; /* FAR pointer to same */ + size_t buffer_width; /* width of I/O buffer */ + JSAMPLE *rescale; /* => maxval-remapping array, or NULL */ +} ppm_source_struct; + +typedef ppm_source_struct * ppm_source_ptr; + + +LOCAL(int) +pbm_getc (FILE * infile) +/* Read next char, skipping over any comments */ +/* A comment/newline sequence is returned as a newline */ +{ + register int ch; + + ch = getc(infile); + if (ch == '#') { + do { + ch = getc(infile); + } while (ch != '\n' && ch != EOF); + } + return ch; +} + + +LOCAL(unsigned int) +read_pbm_integer (j_compress_ptr cinfo, FILE * infile) +/* Read an unsigned decimal integer from the PPM file */ +/* Swallows one trailing character after the integer */ +/* Note that on a 16-bit-int machine, only values up to 64k can be read. */ +/* This should not be a problem in practice. */ +{ + register int ch; + register unsigned int val; + + /* Skip any leading whitespace */ + do { + ch = pbm_getc(infile); + if (ch == EOF) + ERREXIT(cinfo, JERR_INPUT_EOF); + } while (ch == ' ' || ch == '\t' || ch == '\n' || ch == '\r'); + + if (ch < '0' || ch > '9') + ERREXIT(cinfo, JERR_PPM_NONNUMERIC); + + val = ch - '0'; + while ((ch = pbm_getc(infile)) >= '0' && ch <= '9') { + val *= 10; + val += ch - '0'; + } + return val; +} + + +/* + * Read one row of pixels. + * + * We provide several different versions depending on input file format. + * In all cases, input is scaled to the size of JSAMPLE. + * + * A really fast path is provided for reading byte/sample raw files with + * maxval = MAXJSAMPLE, which is the normal case for 8-bit data. + */ + + +METHODDEF(JDIMENSION) +get_text_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading text-format PGM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + FILE * infile = source->pub.input_file; + register JSAMPROW ptr; + register JSAMPLE *rescale = source->rescale; + JDIMENSION col; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + *ptr++ = rescale[read_pbm_integer(cinfo, infile)]; + } + return 1; +} + + +METHODDEF(JDIMENSION) +get_text_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading text-format PPM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + FILE * infile = source->pub.input_file; + register JSAMPROW ptr; + register JSAMPLE *rescale = source->rescale; + JDIMENSION col; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + *ptr++ = rescale[read_pbm_integer(cinfo, infile)]; + *ptr++ = rescale[read_pbm_integer(cinfo, infile)]; + *ptr++ = rescale[read_pbm_integer(cinfo, infile)]; + } + return 1; +} + + +METHODDEF(JDIMENSION) +get_scaled_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading raw-byte-format PGM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + register JSAMPROW ptr; + register U_CHAR * bufferptr; + register JSAMPLE *rescale = source->rescale; + JDIMENSION col; + + if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) + ERREXIT(cinfo, JERR_INPUT_EOF); + ptr = source->pub.buffer[0]; + bufferptr = source->iobuffer; + for (col = cinfo->image_width; col > 0; col--) { + *ptr++ = rescale[UCH(*bufferptr++)]; + } + return 1; +} + + +METHODDEF(JDIMENSION) +get_scaled_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading raw-byte-format PPM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + register JSAMPROW ptr; + register U_CHAR * bufferptr; + register JSAMPLE *rescale = source->rescale; + JDIMENSION col; + + if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) + ERREXIT(cinfo, JERR_INPUT_EOF); + ptr = source->pub.buffer[0]; + bufferptr = source->iobuffer; + for (col = cinfo->image_width; col > 0; col--) { + *ptr++ = rescale[UCH(*bufferptr++)]; + *ptr++ = rescale[UCH(*bufferptr++)]; + *ptr++ = rescale[UCH(*bufferptr++)]; + } + return 1; +} + + +METHODDEF(JDIMENSION) +get_raw_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading raw-byte-format files with maxval = MAXJSAMPLE. + * In this case we just read right into the JSAMPLE buffer! + * Note that same code works for PPM and PGM files. + */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + + if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) + ERREXIT(cinfo, JERR_INPUT_EOF); + return 1; +} + + +METHODDEF(JDIMENSION) +get_word_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading raw-word-format PGM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + register JSAMPROW ptr; + register U_CHAR * bufferptr; + register JSAMPLE *rescale = source->rescale; + JDIMENSION col; + + if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) + ERREXIT(cinfo, JERR_INPUT_EOF); + ptr = source->pub.buffer[0]; + bufferptr = source->iobuffer; + for (col = cinfo->image_width; col > 0; col--) { + register int temp; + temp = UCH(*bufferptr++); + temp |= UCH(*bufferptr++) << 8; + *ptr++ = rescale[temp]; + } + return 1; +} + + +METHODDEF(JDIMENSION) +get_word_rgb_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading raw-word-format PPM files with any maxval */ +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + register JSAMPROW ptr; + register U_CHAR * bufferptr; + register JSAMPLE *rescale = source->rescale; + JDIMENSION col; + + if (! ReadOK(source->pub.input_file, source->iobuffer, source->buffer_width)) + ERREXIT(cinfo, JERR_INPUT_EOF); + ptr = source->pub.buffer[0]; + bufferptr = source->iobuffer; + for (col = cinfo->image_width; col > 0; col--) { + register int temp; + temp = UCH(*bufferptr++); + temp |= UCH(*bufferptr++) << 8; + *ptr++ = rescale[temp]; + temp = UCH(*bufferptr++); + temp |= UCH(*bufferptr++) << 8; + *ptr++ = rescale[temp]; + temp = UCH(*bufferptr++); + temp |= UCH(*bufferptr++) << 8; + *ptr++ = rescale[temp]; + } + return 1; +} + + +/* + * Read the file header; return image size and component count. + */ + +METHODDEF(void) +start_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + ppm_source_ptr source = (ppm_source_ptr) sinfo; + int c; + unsigned int w, h, maxval; + boolean need_iobuffer, use_raw_buffer, need_rescale; + + if (getc(source->pub.input_file) != 'P') + ERREXIT(cinfo, JERR_PPM_NOT); + + c = getc(source->pub.input_file); /* save format discriminator for a sec */ + + /* fetch the remaining header info */ + w = read_pbm_integer(cinfo, source->pub.input_file); + h = read_pbm_integer(cinfo, source->pub.input_file); + maxval = read_pbm_integer(cinfo, source->pub.input_file); + + if (w <= 0 || h <= 0 || maxval <= 0) /* error check */ + ERREXIT(cinfo, JERR_PPM_NOT); + + cinfo->data_precision = BITS_IN_JSAMPLE; /* we always rescale data to this */ + cinfo->image_width = (JDIMENSION) w; + cinfo->image_height = (JDIMENSION) h; + + /* initialize flags to most common settings */ + need_iobuffer = TRUE; /* do we need an I/O buffer? */ + use_raw_buffer = FALSE; /* do we map input buffer onto I/O buffer? */ + need_rescale = TRUE; /* do we need a rescale array? */ + + switch (c) { + case '2': /* it's a text-format PGM file */ + cinfo->input_components = 1; + cinfo->in_color_space = JCS_GRAYSCALE; + TRACEMS2(cinfo, 1, JTRC_PGM_TEXT, w, h); + source->pub.get_pixel_rows = get_text_gray_row; + need_iobuffer = FALSE; + break; + + case '3': /* it's a text-format PPM file */ + cinfo->input_components = 3; + cinfo->in_color_space = JCS_RGB; + TRACEMS2(cinfo, 1, JTRC_PPM_TEXT, w, h); + source->pub.get_pixel_rows = get_text_rgb_row; + need_iobuffer = FALSE; + break; + + case '5': /* it's a raw-format PGM file */ + cinfo->input_components = 1; + cinfo->in_color_space = JCS_GRAYSCALE; + TRACEMS2(cinfo, 1, JTRC_PGM, w, h); + if (maxval > 255) { + source->pub.get_pixel_rows = get_word_gray_row; + } else if (maxval == MAXJSAMPLE && SIZEOF(JSAMPLE) == SIZEOF(U_CHAR)) { + source->pub.get_pixel_rows = get_raw_row; + use_raw_buffer = TRUE; + need_rescale = FALSE; + } else { + source->pub.get_pixel_rows = get_scaled_gray_row; + } + break; + + case '6': /* it's a raw-format PPM file */ + cinfo->input_components = 3; + cinfo->in_color_space = JCS_RGB; + TRACEMS2(cinfo, 1, JTRC_PPM, w, h); + if (maxval > 255) { + source->pub.get_pixel_rows = get_word_rgb_row; + } else if (maxval == MAXJSAMPLE && SIZEOF(JSAMPLE) == SIZEOF(U_CHAR)) { + source->pub.get_pixel_rows = get_raw_row; + use_raw_buffer = TRUE; + need_rescale = FALSE; + } else { + source->pub.get_pixel_rows = get_scaled_rgb_row; + } + break; + + default: + ERREXIT(cinfo, JERR_PPM_NOT); + break; + } + + /* Allocate space for I/O buffer: 1 or 3 bytes or words/pixel. */ + if (need_iobuffer) { + source->buffer_width = (size_t) w * cinfo->input_components * + ((maxval<=255) ? SIZEOF(U_CHAR) : (2*SIZEOF(U_CHAR))); + source->iobuffer = (U_CHAR *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + source->buffer_width); + } + + /* Create compressor input buffer. */ + if (use_raw_buffer) { + /* For unscaled raw-input case, we can just map it onto the I/O buffer. */ + /* Synthesize a JSAMPARRAY pointer structure */ + /* Cast here implies near->far pointer conversion on PCs */ + source->pixrow = (JSAMPROW) source->iobuffer; + source->pub.buffer = & source->pixrow; + source->pub.buffer_height = 1; + } else { + /* Need to translate anyway, so make a separate sample buffer. */ + source->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) w * cinfo->input_components, (JDIMENSION) 1); + source->pub.buffer_height = 1; + } + + /* Compute the rescaling array if required. */ + if (need_rescale) { + INT32 val, half_maxval; + + /* On 16-bit-int machines we have to be careful of maxval = 65535 */ + source->rescale = (JSAMPLE *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (size_t) (((long) maxval + 1L) * SIZEOF(JSAMPLE))); + half_maxval = maxval / 2; + for (val = 0; val <= (INT32) maxval; val++) { + /* The multiplication here must be done in 32 bits to avoid overflow */ + source->rescale[val] = (JSAMPLE) ((val*MAXJSAMPLE + half_maxval)/maxval); + } + } +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_input_ppm (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + /* no work */ +} + + +/* + * The module selection routine for PPM format input. + */ + +GLOBAL(cjpeg_source_ptr) +jinit_read_ppm (j_compress_ptr cinfo) +{ + ppm_source_ptr source; + + /* Create module interface object */ + source = (ppm_source_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(ppm_source_struct)); + /* Fill in method ptrs, except get_pixel_rows which start_input sets */ + source->pub.start_input = start_input_ppm; + source->pub.finish_input = finish_input_ppm; + + return (cjpeg_source_ptr) source; +} + +#endif /* PPM_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/rdrle.c b/windows_libs/jpeg-6a/rdrle.c new file mode 100644 index 00000000..542bc374 --- /dev/null +++ b/windows_libs/jpeg-6a/rdrle.c @@ -0,0 +1,387 @@ +/* + * rdrle.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to read input images in Utah RLE format. + * The Utah Raster Toolkit library is required (version 3.1 or later). + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume input from + * an ordinary stdio stream. They further assume that reading begins + * at the start of the file; start_input may need work if the + * user interface has already read some data (e.g., to determine that + * the file is indeed RLE format). + * + * Based on code contributed by Mike Lijewski, + * with updates from Robert Hutchinson. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef RLE_SUPPORTED + +/* rle.h is provided by the Utah Raster Toolkit. */ + +#include + +/* + * We assume that JSAMPLE has the same representation as rle_pixel, + * to wit, "unsigned char". Hence we can't cope with 12- or 16-bit samples. + */ + +#if BITS_IN_JSAMPLE != 8 + Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ +#endif + +/* + * We support the following types of RLE files: + * + * GRAYSCALE - 8 bits, no colormap + * MAPPEDGRAY - 8 bits, 1 channel colomap + * PSEUDOCOLOR - 8 bits, 3 channel colormap + * TRUECOLOR - 24 bits, 3 channel colormap + * DIRECTCOLOR - 24 bits, no colormap + * + * For now, we ignore any alpha channel in the image. + */ + +typedef enum + { GRAYSCALE, MAPPEDGRAY, PSEUDOCOLOR, TRUECOLOR, DIRECTCOLOR } rle_kind; + + +/* + * Since RLE stores scanlines bottom-to-top, we have to invert the image + * to conform to JPEG's top-to-bottom order. To do this, we read the + * incoming image into a virtual array on the first get_pixel_rows call, + * then fetch the required row from the virtual array on subsequent calls. + */ + +typedef struct _rle_source_struct * rle_source_ptr; + +typedef struct _rle_source_struct { + struct cjpeg_source_struct pub; /* public fields */ + + rle_kind visual; /* actual type of input file */ + jvirt_sarray_ptr image; /* virtual array to hold the image */ + JDIMENSION row; /* current row # in the virtual array */ + rle_hdr header; /* Input file information */ + rle_pixel** rle_row; /* holds a row returned by rle_getrow() */ + +} rle_source_struct; + + +/* + * Read the file header; return image size and component count. + */ + +METHODDEF(void) +start_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + rle_source_ptr source = (rle_source_ptr) sinfo; + JDIMENSION width, height; +#ifdef PROGRESS_REPORT + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; +#endif + + /* Use RLE library routine to get the header info */ + source->header = *rle_hdr_init(NULL); + source->header.rle_file = source->pub.input_file; + switch (rle_get_setup(&(source->header))) { + case RLE_SUCCESS: + /* A-OK */ + break; + case RLE_NOT_RLE: + ERREXIT(cinfo, JERR_RLE_NOT); + break; + case RLE_NO_SPACE: + ERREXIT(cinfo, JERR_RLE_MEM); + break; + case RLE_EMPTY: + ERREXIT(cinfo, JERR_RLE_EMPTY); + break; + case RLE_EOF: + ERREXIT(cinfo, JERR_RLE_EOF); + break; + default: + ERREXIT(cinfo, JERR_RLE_BADERROR); + break; + } + + /* Figure out what we have, set private vars and return values accordingly */ + + width = source->header.xmax - source->header.xmin + 1; + height = source->header.ymax - source->header.ymin + 1; + source->header.xmin = 0; /* realign horizontally */ + source->header.xmax = width-1; + + cinfo->image_width = width; + cinfo->image_height = height; + cinfo->data_precision = 8; /* we can only handle 8 bit data */ + + if (source->header.ncolors == 1 && source->header.ncmap == 0) { + source->visual = GRAYSCALE; + TRACEMS2(cinfo, 1, JTRC_RLE_GRAY, width, height); + } else if (source->header.ncolors == 1 && source->header.ncmap == 1) { + source->visual = MAPPEDGRAY; + TRACEMS3(cinfo, 1, JTRC_RLE_MAPGRAY, width, height, + 1 << source->header.cmaplen); + } else if (source->header.ncolors == 1 && source->header.ncmap == 3) { + source->visual = PSEUDOCOLOR; + TRACEMS3(cinfo, 1, JTRC_RLE_MAPPED, width, height, + 1 << source->header.cmaplen); + } else if (source->header.ncolors == 3 && source->header.ncmap == 3) { + source->visual = TRUECOLOR; + TRACEMS3(cinfo, 1, JTRC_RLE_FULLMAP, width, height, + 1 << source->header.cmaplen); + } else if (source->header.ncolors == 3 && source->header.ncmap == 0) { + source->visual = DIRECTCOLOR; + TRACEMS2(cinfo, 1, JTRC_RLE, width, height); + } else + ERREXIT(cinfo, JERR_RLE_UNSUPPORTED); + + if (source->visual == GRAYSCALE || source->visual == MAPPEDGRAY) { + cinfo->in_color_space = JCS_GRAYSCALE; + cinfo->input_components = 1; + } else { + cinfo->in_color_space = JCS_RGB; + cinfo->input_components = 3; + } + + /* + * A place to hold each scanline while it's converted. + * (GRAYSCALE scanlines don't need converting) + */ + if (source->visual != GRAYSCALE) { + source->rle_row = (rle_pixel**) (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) width, (JDIMENSION) cinfo->input_components); + } + + /* request a virtual array to hold the image */ + source->image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + (JDIMENSION) (width * source->header.ncolors), + (JDIMENSION) height, (JDIMENSION) 1); + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + /* count file input as separate pass */ + progress->total_extra_passes++; + } +#endif + + source->pub.buffer_height = 1; +} + + +/* + * Read one row of pixels. + * Called only after load_image has read the image into the virtual array. + * Used for GRAYSCALE, MAPPEDGRAY, TRUECOLOR, and DIRECTCOLOR images. + */ + +METHODDEF(JDIMENSION) +get_rle_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + rle_source_ptr source = (rle_source_ptr) sinfo; + + source->row--; + source->pub.buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE); + + return 1; +} + +/* + * Read one row of pixels. + * Called only after load_image has read the image into the virtual array. + * Used for PSEUDOCOLOR images. + */ + +METHODDEF(JDIMENSION) +get_pseudocolor_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + rle_source_ptr source = (rle_source_ptr) sinfo; + JSAMPROW src_row, dest_row; + JDIMENSION col; + rle_map *colormap; + int val; + + colormap = source->header.cmap; + dest_row = source->pub.buffer[0]; + source->row--; + src_row = * (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->image, source->row, (JDIMENSION) 1, FALSE); + + for (col = cinfo->image_width; col > 0; col--) { + val = GETJSAMPLE(*src_row++); + *dest_row++ = (JSAMPLE) (colormap[val ] >> 8); + *dest_row++ = (JSAMPLE) (colormap[val + 256] >> 8); + *dest_row++ = (JSAMPLE) (colormap[val + 512] >> 8); + } + + return 1; +} + + +/* + * Load the image into a virtual array. We have to do this because RLE + * files start at the lower left while the JPEG standard has them starting + * in the upper left. This is called the first time we want to get a row + * of input. What we do is load the RLE data into the array and then call + * the appropriate routine to read one row from the array. Before returning, + * we set source->pub.get_pixel_rows so that subsequent calls go straight to + * the appropriate row-reading routine. + */ + +METHODDEF(JDIMENSION) +load_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + rle_source_ptr source = (rle_source_ptr) sinfo; + JDIMENSION row, col; + JSAMPROW scanline, red_ptr, green_ptr, blue_ptr; + rle_pixel **rle_row; + rle_map *colormap; + char channel; +#ifdef PROGRESS_REPORT + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; +#endif + + colormap = source->header.cmap; + rle_row = source->rle_row; + + /* Read the RLE data into our virtual array. + * We assume here that (a) rle_pixel is represented the same as JSAMPLE, + * and (b) we are not on a machine where FAR pointers differ from regular. + */ + RLE_CLR_BIT(source->header, RLE_ALPHA); /* don't read the alpha channel */ + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_limit = cinfo->image_height; + progress->pub.pass_counter = 0; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + + switch (source->visual) { + + case GRAYSCALE: + case PSEUDOCOLOR: + for (row = 0; row < cinfo->image_height; row++) { + rle_row = (rle_pixel **) (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); + rle_getrow(&source->header, rle_row); +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_counter++; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + } + break; + + case MAPPEDGRAY: + case TRUECOLOR: + for (row = 0; row < cinfo->image_height; row++) { + scanline = * (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); + rle_row = source->rle_row; + rle_getrow(&source->header, rle_row); + + for (col = 0; col < cinfo->image_width; col++) { + for (channel = 0; channel < source->header.ncolors; channel++) { + *scanline++ = (JSAMPLE) + (colormap[GETJSAMPLE(rle_row[channel][col]) + 256 * channel] >> 8); + } + } + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_counter++; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + } + break; + + case DIRECTCOLOR: + for (row = 0; row < cinfo->image_height; row++) { + scanline = * (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->image, row, (JDIMENSION) 1, TRUE); + rle_getrow(&source->header, rle_row); + + red_ptr = rle_row[0]; + green_ptr = rle_row[1]; + blue_ptr = rle_row[2]; + + for (col = cinfo->image_width; col > 0; col--) { + *scanline++ = *red_ptr++; + *scanline++ = *green_ptr++; + *scanline++ = *blue_ptr++; + } + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_counter++; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + } + } + +#ifdef PROGRESS_REPORT + if (progress != NULL) + progress->completed_extra_passes++; +#endif + + /* Set up to call proper row-extraction routine in future */ + if (source->visual == PSEUDOCOLOR) { + source->pub.buffer = source->rle_row; + source->pub.get_pixel_rows = get_pseudocolor_row; + } else { + source->pub.get_pixel_rows = get_rle_row; + } + source->row = cinfo->image_height; + + /* And fetch the topmost (bottommost) row */ + return (*source->pub.get_pixel_rows) (cinfo, sinfo); +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_input_rle (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + /* no work */ +} + + +/* + * The module selection routine for RLE format input. + */ + +GLOBAL(cjpeg_source_ptr) +jinit_read_rle (j_compress_ptr cinfo) +{ + rle_source_ptr source; + + /* Create module interface object */ + source = (rle_source_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(rle_source_struct)); + /* Fill in method ptrs */ + source->pub.start_input = start_input_rle; + source->pub.finish_input = finish_input_rle; + source->pub.get_pixel_rows = load_image; + + return (cjpeg_source_ptr) source; +} + +#endif /* RLE_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/rdswitch.c b/windows_libs/jpeg-6a/rdswitch.c new file mode 100644 index 00000000..4f4bb4f5 --- /dev/null +++ b/windows_libs/jpeg-6a/rdswitch.c @@ -0,0 +1,332 @@ +/* + * rdswitch.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to process some of cjpeg's more complicated + * command-line switches. Switches processed here are: + * -qtables file Read quantization tables from text file + * -scans file Read scan script from text file + * -qslots N[,N,...] Set component quantization table selectors + * -sample HxV[,HxV,...] Set component sampling factors + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ +#include /* to declare isdigit(), isspace() */ + + +LOCAL(int) +text_getc (FILE * file) +/* Read next char, skipping over any comments (# to end of line) */ +/* A comment/newline sequence is returned as a newline */ +{ + register int ch; + + ch = getc(file); + if (ch == '#') { + do { + ch = getc(file); + } while (ch != '\n' && ch != EOF); + } + return ch; +} + + +LOCAL(boolean) +read_text_integer (FILE * file, long * result, int * termchar) +/* Read an unsigned decimal integer from a file, store it in result */ +/* Reads one trailing character after the integer; returns it in termchar */ +{ + register int ch; + register long val; + + /* Skip any leading whitespace, detect EOF */ + do { + ch = text_getc(file); + if (ch == EOF) { + *termchar = ch; + return FALSE; + } + } while (isspace(ch)); + + if (! isdigit(ch)) { + *termchar = ch; + return FALSE; + } + + val = ch - '0'; + while ((ch = text_getc(file)) != EOF) { + if (! isdigit(ch)) + break; + val *= 10; + val += ch - '0'; + } + *result = val; + *termchar = ch; + return TRUE; +} + + +GLOBAL(boolean) +read_quant_tables (j_compress_ptr cinfo, char * filename, + int scale_factor, boolean force_baseline) +/* Read a set of quantization tables from the specified file. + * The file is plain ASCII text: decimal numbers with whitespace between. + * Comments preceded by '#' may be included in the file. + * There may be one to NUM_QUANT_TBLS tables in the file, each of 64 values. + * The tables are implicitly numbered 0,1,etc. + * NOTE: does not affect the qslots mapping, which will default to selecting + * table 0 for luminance (or primary) components, 1 for chrominance components. + * You must use -qslots if you want a different component->table mapping. + */ +{ + FILE * fp; + int tblno, i, termchar; + long val; + unsigned int table[DCTSIZE2]; + + if ((fp = fopen(filename, "r")) == NULL) { + fprintf(stderr, "Can't open table file %s\n", filename); + return FALSE; + } + tblno = 0; + + while (read_text_integer(fp, &val, &termchar)) { /* read 1st element of table */ + if (tblno >= NUM_QUANT_TBLS) { + fprintf(stderr, "Too many tables in file %s\n", filename); + fclose(fp); + return FALSE; + } + table[0] = (unsigned int) val; + for (i = 1; i < DCTSIZE2; i++) { + if (! read_text_integer(fp, &val, &termchar)) { + fprintf(stderr, "Invalid table data in file %s\n", filename); + fclose(fp); + return FALSE; + } + table[i] = (unsigned int) val; + } + jpeg_add_quant_table(cinfo, tblno, table, scale_factor, force_baseline); + tblno++; + } + + if (termchar != EOF) { + fprintf(stderr, "Non-numeric data in file %s\n", filename); + fclose(fp); + return FALSE; + } + + fclose(fp); + return TRUE; +} + + +#ifdef C_MULTISCAN_FILES_SUPPORTED + +LOCAL(boolean) +read_scan_integer (FILE * file, long * result, int * termchar) +/* Variant of read_text_integer that always looks for a non-space termchar; + * this simplifies parsing of punctuation in scan scripts. + */ +{ + register int ch; + + if (! read_text_integer(file, result, termchar)) + return FALSE; + ch = *termchar; + while (ch != EOF && isspace(ch)) + ch = text_getc(file); + if (isdigit(ch)) { /* oops, put it back */ + if (ungetc(ch, file) == EOF) + return FALSE; + ch = ' '; + } else { + /* Any separators other than ';' and ':' are ignored; + * this allows user to insert commas, etc, if desired. + */ + if (ch != EOF && ch != ';' && ch != ':') + ch = ' '; + } + *termchar = ch; + return TRUE; +} + + +GLOBAL(boolean) +read_scan_script (j_compress_ptr cinfo, char * filename) +/* Read a scan script from the specified text file. + * Each entry in the file defines one scan to be emitted. + * Entries are separated by semicolons ';'. + * An entry contains one to four component indexes, + * optionally followed by a colon ':' and four progressive-JPEG parameters. + * The component indexes denote which component(s) are to be transmitted + * in the current scan. The first component has index 0. + * Sequential JPEG is used if the progressive-JPEG parameters are omitted. + * The file is free format text: any whitespace may appear between numbers + * and the ':' and ';' punctuation marks. Also, other punctuation (such + * as commas or dashes) can be placed between numbers if desired. + * Comments preceded by '#' may be included in the file. + * Note: we do very little validity checking here; + * jcmaster.c will validate the script parameters. + */ +{ + FILE * fp; + int scanno, ncomps, termchar; + long val; + jpeg_scan_info * scanptr; +#define MAX_SCANS 100 /* quite arbitrary limit */ + jpeg_scan_info scans[MAX_SCANS]; + + if ((fp = fopen(filename, "r")) == NULL) { + fprintf(stderr, "Can't open scan definition file %s\n", filename); + return FALSE; + } + scanptr = scans; + scanno = 0; + + while (read_scan_integer(fp, &val, &termchar)) { + if (scanno >= MAX_SCANS) { + fprintf(stderr, "Too many scans defined in file %s\n", filename); + fclose(fp); + return FALSE; + } + scanptr->component_index[0] = (int) val; + ncomps = 1; + while (termchar == ' ') { + if (ncomps >= MAX_COMPS_IN_SCAN) { + fprintf(stderr, "Too many components in one scan in file %s\n", + filename); + fclose(fp); + return FALSE; + } + if (! read_scan_integer(fp, &val, &termchar)) + goto bogus; + scanptr->component_index[ncomps] = (int) val; + ncomps++; + } + scanptr->comps_in_scan = ncomps; + if (termchar == ':') { + if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ') + goto bogus; + scanptr->Ss = (int) val; + if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ') + goto bogus; + scanptr->Se = (int) val; + if (! read_scan_integer(fp, &val, &termchar) || termchar != ' ') + goto bogus; + scanptr->Ah = (int) val; + if (! read_scan_integer(fp, &val, &termchar)) + goto bogus; + scanptr->Al = (int) val; + } else { + /* set non-progressive parameters */ + scanptr->Ss = 0; + scanptr->Se = DCTSIZE2-1; + scanptr->Ah = 0; + scanptr->Al = 0; + } + if (termchar != ';' && termchar != EOF) { +bogus: + fprintf(stderr, "Invalid scan entry format in file %s\n", filename); + fclose(fp); + return FALSE; + } + scanptr++, scanno++; + } + + if (termchar != EOF) { + fprintf(stderr, "Non-numeric data in file %s\n", filename); + fclose(fp); + return FALSE; + } + + if (scanno > 0) { + /* Stash completed scan list in cinfo structure. + * NOTE: for cjpeg's use, JPOOL_IMAGE is the right lifetime for this data, + * but if you want to compress multiple images you'd want JPOOL_PERMANENT. + */ + scanptr = (jpeg_scan_info *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + scanno * SIZEOF(jpeg_scan_info)); + MEMCOPY(scanptr, scans, scanno * SIZEOF(jpeg_scan_info)); + cinfo->scan_info = scanptr; + cinfo->num_scans = scanno; + } + + fclose(fp); + return TRUE; +} + +#endif /* C_MULTISCAN_FILES_SUPPORTED */ + + +GLOBAL(boolean) +set_quant_slots (j_compress_ptr cinfo, char *arg) +/* Process a quantization-table-selectors parameter string, of the form + * N[,N,...] + * If there are more components than parameters, the last value is replicated. + */ +{ + int val = 0; /* default table # */ + int ci; + char ch; + + for (ci = 0; ci < MAX_COMPONENTS; ci++) { + if (*arg) { + ch = ','; /* if not set by sscanf, will be ',' */ + if (sscanf(arg, "%d%c", &val, &ch) < 1) + return FALSE; + if (ch != ',') /* syntax check */ + return FALSE; + if (val < 0 || val >= NUM_QUANT_TBLS) { + fprintf(stderr, "JPEG quantization tables are numbered 0..%d\n", + NUM_QUANT_TBLS-1); + return FALSE; + } + cinfo->comp_info[ci].quant_tbl_no = val; + while (*arg && *arg++ != ',') /* advance to next segment of arg string */ + ; + } else { + /* reached end of parameter, set remaining components to last table */ + cinfo->comp_info[ci].quant_tbl_no = val; + } + } + return TRUE; +} + + +GLOBAL(boolean) +set_sample_factors (j_compress_ptr cinfo, char *arg) +/* Process a sample-factors parameter string, of the form + * HxV[,HxV,...] + * If there are more components than parameters, "1x1" is assumed for the rest. + */ +{ + int ci, val1, val2; + char ch1, ch2; + + for (ci = 0; ci < MAX_COMPONENTS; ci++) { + if (*arg) { + ch2 = ','; /* if not set by sscanf, will be ',' */ + if (sscanf(arg, "%d%c%d%c", &val1, &ch1, &val2, &ch2) < 3) + return FALSE; + if ((ch1 != 'x' && ch1 != 'X') || ch2 != ',') /* syntax check */ + return FALSE; + if (val1 <= 0 || val1 > 4 || val2 <= 0 || val2 > 4) { + fprintf(stderr, "JPEG sampling factors must be 1..4\n"); + return FALSE; + } + cinfo->comp_info[ci].h_samp_factor = val1; + cinfo->comp_info[ci].v_samp_factor = val2; + while (*arg && *arg++ != ',') /* advance to next segment of arg string */ + ; + } else { + /* reached end of parameter, set remaining components to 1x1 sampling */ + cinfo->comp_info[ci].h_samp_factor = 1; + cinfo->comp_info[ci].v_samp_factor = 1; + } + } + return TRUE; +} diff --git a/windows_libs/jpeg-6a/rdtarga.c b/windows_libs/jpeg-6a/rdtarga.c new file mode 100644 index 00000000..4c2cd267 --- /dev/null +++ b/windows_libs/jpeg-6a/rdtarga.c @@ -0,0 +1,500 @@ +/* + * rdtarga.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to read input images in Targa format. + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume input from + * an ordinary stdio stream. They further assume that reading begins + * at the start of the file; start_input may need work if the + * user interface has already read some data (e.g., to determine that + * the file is indeed Targa format). + * + * Based on code contributed by Lee Daniel Crocker. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef TARGA_SUPPORTED + + +/* Macros to deal with unsigned chars as efficiently as compiler allows */ + +#ifdef HAVE_UNSIGNED_CHAR +typedef unsigned char U_CHAR; +#define UCH(x) ((int) (x)) +#else /* !HAVE_UNSIGNED_CHAR */ +#ifdef CHAR_IS_UNSIGNED +typedef char U_CHAR; +#define UCH(x) ((int) (x)) +#else +typedef char U_CHAR; +#define UCH(x) ((int) (x) & 0xFF) +#endif +#endif /* HAVE_UNSIGNED_CHAR */ + + +#define ReadOK(file,buffer,len) (JFREAD(file,buffer,len) == ((size_t) (len))) + + +/* Private version of data source object */ + +typedef struct _tga_source_struct * tga_source_ptr; + +typedef struct _tga_source_struct { + struct cjpeg_source_struct pub; /* public fields */ + + j_compress_ptr cinfo; /* back link saves passing separate parm */ + + JSAMPARRAY colormap; /* Targa colormap (converted to my format) */ + + jvirt_sarray_ptr whole_image; /* Needed if funny input row order */ + JDIMENSION current_row; /* Current logical row number to read */ + + /* Pointer to routine to extract next Targa pixel from input file */ + JMETHOD(void, read_pixel, (tga_source_ptr sinfo)); + + /* Result of read_pixel is delivered here: */ + U_CHAR tga_pixel[4]; + + int pixel_size; /* Bytes per Targa pixel (1 to 4) */ + + /* State info for reading RLE-coded pixels; both counts must be init to 0 */ + int block_count; /* # of pixels remaining in RLE block */ + int dup_pixel_count; /* # of times to duplicate previous pixel */ + + /* This saves the correct pixel-row-expansion method for preload_image */ + JMETHOD(JDIMENSION, get_pixel_rows, (j_compress_ptr cinfo, + cjpeg_source_ptr sinfo)); +} tga_source_struct; + + +/* For expanding 5-bit pixel values to 8-bit with best rounding */ + +static const UINT8 c5to8bits[32] = { + 0, 8, 16, 25, 33, 41, 49, 58, + 66, 74, 82, 90, 99, 107, 115, 123, + 132, 140, 148, 156, 165, 173, 181, 189, + 197, 206, 214, 222, 230, 239, 247, 255 +}; + + + +LOCAL(int) +read_byte (tga_source_ptr sinfo) +/* Read next byte from Targa file */ +{ + register FILE *infile = sinfo->pub.input_file; + register int c; + + if ((c = getc(infile)) == EOF) + ERREXIT(sinfo->cinfo, JERR_INPUT_EOF); + return c; +} + + +LOCAL(void) +read_colormap (tga_source_ptr sinfo, int cmaplen, int mapentrysize) +/* Read the colormap from a Targa file */ +{ + int i; + + /* Presently only handles 24-bit BGR format */ + if (mapentrysize != 24) + ERREXIT(sinfo->cinfo, JERR_TGA_BADCMAP); + + for (i = 0; i < cmaplen; i++) { + sinfo->colormap[2][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[1][i] = (JSAMPLE) read_byte(sinfo); + sinfo->colormap[0][i] = (JSAMPLE) read_byte(sinfo); + } +} + + +/* + * read_pixel methods: get a single pixel from Targa file into tga_pixel[] + */ + +METHODDEF(void) +read_non_rle_pixel (tga_source_ptr sinfo) +/* Read one Targa pixel from the input file; no RLE expansion */ +{ + register FILE *infile = sinfo->pub.input_file; + register int i; + + for (i = 0; i < sinfo->pixel_size; i++) { + sinfo->tga_pixel[i] = (U_CHAR) getc(infile); + } +} + + +METHODDEF(void) +read_rle_pixel (tga_source_ptr sinfo) +/* Read one Targa pixel from the input file, expanding RLE data as needed */ +{ + register FILE *infile = sinfo->pub.input_file; + register int i; + + /* Duplicate previously read pixel? */ + if (sinfo->dup_pixel_count > 0) { + sinfo->dup_pixel_count--; + return; + } + + /* Time to read RLE block header? */ + if (--sinfo->block_count < 0) { /* decrement pixels remaining in block */ + i = read_byte(sinfo); + if (i & 0x80) { /* Start of duplicate-pixel block? */ + sinfo->dup_pixel_count = i & 0x7F; /* number of dups after this one */ + sinfo->block_count = 0; /* then read new block header */ + } else { + sinfo->block_count = i & 0x7F; /* number of pixels after this one */ + } + } + + /* Read next pixel */ + for (i = 0; i < sinfo->pixel_size; i++) { + sinfo->tga_pixel[i] = (U_CHAR) getc(infile); + } +} + + +/* + * Read one row of pixels. + * + * We provide several different versions depending on input file format. + */ + + +METHODDEF(JDIMENSION) +get_8bit_gray_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 8-bit grayscale pixels */ +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + register JSAMPROW ptr; + register JDIMENSION col; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ + *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]); + } + return 1; +} + +METHODDEF(JDIMENSION) +get_8bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 8-bit colormap indexes */ +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + register int t; + register JSAMPROW ptr; + register JDIMENSION col; + register JSAMPARRAY colormap = source->colormap; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ + t = UCH(source->tga_pixel[0]); + *ptr++ = colormap[0][t]; + *ptr++ = colormap[1][t]; + *ptr++ = colormap[2][t]; + } + return 1; +} + +METHODDEF(JDIMENSION) +get_16bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 16-bit pixels */ +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + register int t; + register JSAMPROW ptr; + register JDIMENSION col; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ + t = UCH(source->tga_pixel[0]); + t += UCH(source->tga_pixel[1]) << 8; + /* We expand 5 bit data to 8 bit sample width. + * The format of the 16-bit (LSB first) input word is + * xRRRRRGGGGGBBBBB + */ + ptr[2] = (JSAMPLE) c5to8bits[t & 0x1F]; + t >>= 5; + ptr[1] = (JSAMPLE) c5to8bits[t & 0x1F]; + t >>= 5; + ptr[0] = (JSAMPLE) c5to8bits[t & 0x1F]; + ptr += 3; + } + return 1; +} + +METHODDEF(JDIMENSION) +get_24bit_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +/* This version is for reading 24-bit pixels */ +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + register JSAMPROW ptr; + register JDIMENSION col; + + ptr = source->pub.buffer[0]; + for (col = cinfo->image_width; col > 0; col--) { + (*source->read_pixel) (source); /* Load next pixel into tga_pixel */ + *ptr++ = (JSAMPLE) UCH(source->tga_pixel[2]); /* change BGR to RGB order */ + *ptr++ = (JSAMPLE) UCH(source->tga_pixel[1]); + *ptr++ = (JSAMPLE) UCH(source->tga_pixel[0]); + } + return 1; +} + +/* + * Targa also defines a 32-bit pixel format with order B,G,R,A. + * We presently ignore the attribute byte, so the code for reading + * these pixels is identical to the 24-bit routine above. + * This works because the actual pixel length is only known to read_pixel. + */ + +#define get_32bit_row get_24bit_row + + +/* + * This method is for re-reading the input data in standard top-down + * row order. The entire image has already been read into whole_image + * with proper conversion of pixel format, but it's in a funny row order. + */ + +METHODDEF(JDIMENSION) +get_memory_row (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + JDIMENSION source_row; + + /* Compute row of source that maps to current_row of normal order */ + /* For now, assume image is bottom-up and not interlaced. */ + /* NEEDS WORK to support interlaced images! */ + source_row = cinfo->image_height - source->current_row - 1; + + /* Fetch that row from virtual array */ + source->pub.buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->whole_image, + source_row, (JDIMENSION) 1, FALSE); + + source->current_row++; + return 1; +} + + +/* + * This method loads the image into whole_image during the first call on + * get_pixel_rows. The get_pixel_rows pointer is then adjusted to call + * get_memory_row on subsequent calls. + */ + +METHODDEF(JDIMENSION) +preload_image (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + JDIMENSION row; + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + + /* Read the data into a virtual array in input-file row order. */ + for (row = 0; row < cinfo->image_height; row++) { + if (progress != NULL) { + progress->pub.pass_counter = (long) row; + progress->pub.pass_limit = (long) cinfo->image_height; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } + source->pub.buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, source->whole_image, row, (JDIMENSION) 1, TRUE); + (*source->get_pixel_rows) (cinfo, sinfo); + } + if (progress != NULL) + progress->completed_extra_passes++; + + /* Set up to read from the virtual array in unscrambled order */ + source->pub.get_pixel_rows = get_memory_row; + source->current_row = 0; + /* And read the first row */ + return get_memory_row(cinfo, sinfo); +} + + +/* + * Read the file header; return image size and component count. + */ + +METHODDEF(void) +start_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + tga_source_ptr source = (tga_source_ptr) sinfo; + U_CHAR targaheader[18]; + int idlen, cmaptype, subtype, flags, interlace_type, components; + unsigned int width, height, maplen; + boolean is_bottom_up; + +#define GET_2B(offset) ((unsigned int) UCH(targaheader[offset]) + \ + (((unsigned int) UCH(targaheader[offset+1])) << 8)) + + if (! ReadOK(source->pub.input_file, targaheader, 18)) + ERREXIT(cinfo, JERR_INPUT_EOF); + + /* Pretend "15-bit" pixels are 16-bit --- we ignore attribute bit anyway */ + if (targaheader[16] == 15) + targaheader[16] = 16; + + idlen = UCH(targaheader[0]); + cmaptype = UCH(targaheader[1]); + subtype = UCH(targaheader[2]); + maplen = GET_2B(5); + width = GET_2B(12); + height = GET_2B(14); + source->pixel_size = UCH(targaheader[16]) >> 3; + flags = UCH(targaheader[17]); /* Image Descriptor byte */ + + is_bottom_up = ((flags & 0x20) == 0); /* bit 5 set => top-down */ + interlace_type = flags >> 6; /* bits 6/7 are interlace code */ + + if (cmaptype > 1 || /* cmaptype must be 0 or 1 */ + source->pixel_size < 1 || source->pixel_size > 4 || + (UCH(targaheader[16]) & 7) != 0 || /* bits/pixel must be multiple of 8 */ + interlace_type != 0) /* currently don't allow interlaced image */ + ERREXIT(cinfo, JERR_TGA_BADPARMS); + + if (subtype > 8) { + /* It's an RLE-coded file */ + source->read_pixel = read_rle_pixel; + source->block_count = source->dup_pixel_count = 0; + subtype -= 8; + } else { + /* Non-RLE file */ + source->read_pixel = read_non_rle_pixel; + } + + /* Now should have subtype 1, 2, or 3 */ + components = 3; /* until proven different */ + cinfo->in_color_space = JCS_RGB; + + switch (subtype) { + case 1: /* Colormapped image */ + if (source->pixel_size == 1 && cmaptype == 1) + source->get_pixel_rows = get_8bit_row; + else + ERREXIT(cinfo, JERR_TGA_BADPARMS); + TRACEMS2(cinfo, 1, JTRC_TGA_MAPPED, width, height); + break; + case 2: /* RGB image */ + switch (source->pixel_size) { + case 2: + source->get_pixel_rows = get_16bit_row; + break; + case 3: + source->get_pixel_rows = get_24bit_row; + break; + case 4: + source->get_pixel_rows = get_32bit_row; + break; + default: + ERREXIT(cinfo, JERR_TGA_BADPARMS); + break; + } + TRACEMS2(cinfo, 1, JTRC_TGA, width, height); + break; + case 3: /* Grayscale image */ + components = 1; + cinfo->in_color_space = JCS_GRAYSCALE; + if (source->pixel_size == 1) + source->get_pixel_rows = get_8bit_gray_row; + else + ERREXIT(cinfo, JERR_TGA_BADPARMS); + TRACEMS2(cinfo, 1, JTRC_TGA_GRAY, width, height); + break; + default: + ERREXIT(cinfo, JERR_TGA_BADPARMS); + break; + } + + if (is_bottom_up) { + /* Create a virtual array to buffer the upside-down image. */ + source->whole_image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + (JDIMENSION) width * components, (JDIMENSION) height, (JDIMENSION) 1); + if (cinfo->progress != NULL) { + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + progress->total_extra_passes++; /* count file input as separate pass */ + } + /* source->pub.buffer will point to the virtual array. */ + source->pub.buffer_height = 1; /* in case anyone looks at it */ + source->pub.get_pixel_rows = preload_image; + } else { + /* Don't need a virtual array, but do need a one-row input buffer. */ + source->whole_image = NULL; + source->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + (JDIMENSION) width * components, (JDIMENSION) 1); + source->pub.buffer_height = 1; + source->pub.get_pixel_rows = source->get_pixel_rows; + } + + while (idlen--) /* Throw away ID field */ + (void) read_byte(source); + + if (maplen > 0) { + if (maplen > 256 || GET_2B(3) != 0) + ERREXIT(cinfo, JERR_TGA_BADCMAP); + /* Allocate space to store the colormap */ + source->colormap = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, (JDIMENSION) maplen, (JDIMENSION) 3); + /* and read it from the file */ + read_colormap(source, (int) maplen, UCH(targaheader[7])); + } else { + if (cmaptype) /* but you promised a cmap! */ + ERREXIT(cinfo, JERR_TGA_BADPARMS); + source->colormap = NULL; + } + + cinfo->input_components = components; + cinfo->data_precision = 8; + cinfo->image_width = width; + cinfo->image_height = height; +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_input_tga (j_compress_ptr cinfo, cjpeg_source_ptr sinfo) +{ + /* no work */ +} + + +/* + * The module selection routine for Targa format input. + */ + +GLOBAL(cjpeg_source_ptr) +jinit_read_targa (j_compress_ptr cinfo) +{ + tga_source_ptr source; + + /* Create module interface object */ + source = (tga_source_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(tga_source_struct)); + source->cinfo = cinfo; /* make back link for subroutines */ + /* Fill in method ptrs, except get_pixel_rows which start_input sets */ + source->pub.start_input = start_input_tga; + source->pub.finish_input = finish_input_tga; + + return (cjpeg_source_ptr) source; +} + +#endif /* TARGA_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/structure.doc b/windows_libs/jpeg-6a/structure.doc new file mode 100644 index 00000000..51c9def7 --- /dev/null +++ b/windows_libs/jpeg-6a/structure.doc @@ -0,0 +1,948 @@ +IJG JPEG LIBRARY: SYSTEM ARCHITECTURE + +Copyright (C) 1991-1995, Thomas G. Lane. +This file is part of the Independent JPEG Group's software. +For conditions of distribution and use, see the accompanying README file. + + +This file provides an overview of the architecture of the IJG JPEG software; +that is, the functions of the various modules in the system and the interfaces +between modules. For more precise details about any data structure or calling +convention, see the include files and comments in the source code. + +We assume that the reader is already somewhat familiar with the JPEG standard. +The README file includes references for learning about JPEG. The file +libjpeg.doc describes the library from the viewpoint of an application +programmer using the library; it's best to read that file before this one. +Also, the file coderules.doc describes the coding style conventions we use. + +In this document, JPEG-specific terminology follows the JPEG standard: + A "component" means a color channel, e.g., Red or Luminance. + A "sample" is a single component value (i.e., one number in the image data). + A "coefficient" is a frequency coefficient (a DCT transform output number). + A "block" is an 8x8 group of samples or coefficients. + An "MCU" (minimum coded unit) is an interleaved set of blocks of size + determined by the sampling factors, or a single block in a + noninterleaved scan. +We do not use the terms "pixel" and "sample" interchangeably. When we say +pixel, we mean an element of the full-size image, while a sample is an element +of the downsampled image. Thus the number of samples may vary across +components while the number of pixels does not. (This terminology is not used +rigorously throughout the code, but it is used in places where confusion would +otherwise result.) + + +*** System features *** + +The IJG distribution contains two parts: + * A subroutine library for JPEG compression and decompression. + * cjpeg/djpeg, two sample applications that use the library to transform + JFIF JPEG files to and from several other image formats. +cjpeg/djpeg are of no great intellectual complexity: they merely add a simple +command-line user interface and I/O routines for several uncompressed image +formats. This document concentrates on the library itself. + +We desire the library to be capable of supporting all JPEG baseline, extended +sequential, and progressive DCT processes. Hierarchical processes are not +supported. + +The library does not support the lossless (spatial) JPEG process. Lossless +JPEG shares little or no code with lossy JPEG, and would normally be used +without the extensive pre- and post-processing provided by this library. +We feel that lossless JPEG is better handled by a separate library. + +Within these limits, any set of compression parameters allowed by the JPEG +spec should be readable for decompression. (We can be more restrictive about +what formats we can generate.) Although the system design allows for all +parameter values, some uncommon settings are not yet implemented and may +never be; nonintegral sampling ratios are the prime example. Furthermore, +we treat 8-bit vs. 12-bit data precision as a compile-time switch, not a +run-time option, because most machines can store 8-bit pixels much more +compactly than 12-bit. + +For legal reasons, JPEG arithmetic coding is not currently supported, but +extending the library to include it would be straightforward. + +By itself, the library handles only interchange JPEG datastreams --- in +particular the widely used JFIF file format. The library can be used by +surrounding code to process interchange or abbreviated JPEG datastreams that +are embedded in more complex file formats. (For example, libtiff uses this +library to implement JPEG compression within the TIFF file format.) + +The library includes a substantial amount of code that is not covered by the +JPEG standard but is necessary for typical applications of JPEG. These +functions preprocess the image before JPEG compression or postprocess it after +decompression. They include colorspace conversion, downsampling/upsampling, +and color quantization. This code can be omitted if not needed. + +A wide range of quality vs. speed tradeoffs are possible in JPEG processing, +and even more so in decompression postprocessing. The decompression library +provides multiple implementations that cover most of the useful tradeoffs, +ranging from very-high-quality down to fast-preview operation. On the +compression side we have generally not provided low-quality choices, since +compression is normally less time-critical. It should be understood that the +low-quality modes may not meet the JPEG standard's accuracy requirements; +nonetheless, they are useful for viewers. + + +*** Portability issues *** + +Portability is an essential requirement for the library. The key portability +issues that show up at the level of system architecture are: + +1. Memory usage. We want the code to be able to run on PC-class machines +with limited memory. Images should therefore be processed sequentially (in +strips), to avoid holding the whole image in memory at once. Where a +full-image buffer is necessary, we should be able to use either virtual memory +or temporary files. + +2. Near/far pointer distinction. To run efficiently on 80x86 machines, the +code should distinguish "small" objects (kept in near data space) from +"large" ones (kept in far data space). This is an annoying restriction, but +fortunately it does not impact code quality for less brain-damaged machines, +and the source code clutter turns out to be minimal with sufficient use of +pointer typedefs. + +3. Data precision. We assume that "char" is at least 8 bits, "short" and +"int" at least 16, "long" at least 32. The code will work fine with larger +data sizes, although memory may be used inefficiently in some cases. However, +the JPEG compressed datastream must ultimately appear on external storage as a +sequence of 8-bit bytes if it is to conform to the standard. This may pose a +problem on machines where char is wider than 8 bits. The library represents +compressed data as an array of values of typedef JOCTET. If no data type +exactly 8 bits wide is available, custom data source and data destination +modules must be written to unpack and pack the chosen JOCTET datatype into +8-bit external representation. + + +*** System overview *** + +The compressor and decompressor are each divided into two main sections: +the JPEG compressor or decompressor proper, and the preprocessing or +postprocessing functions. The interface between these two sections is the +image data that the official JPEG spec regards as its input or output: this +data is in the colorspace to be used for compression, and it is downsampled +to the sampling factors to be used. The preprocessing and postprocessing +steps are responsible for converting a normal image representation to or from +this form. (Those few applications that want to deal with YCbCr downsampled +data can skip the preprocessing or postprocessing step.) + +Looking more closely, the compressor library contains the following main +elements: + + Preprocessing: + * Color space conversion (e.g., RGB to YCbCr). + * Edge expansion and downsampling. Optionally, this step can do simple + smoothing --- this is often helpful for low-quality source data. + JPEG proper: + * MCU assembly, DCT, quantization. + * Entropy coding (sequential or progressive, Huffman or arithmetic). + +In addition to these modules we need overall control, marker generation, +and support code (memory management & error handling). There is also a +module responsible for physically writing the output data --- typically +this is just an interface to fwrite(), but some applications may need to +do something else with the data. + +The decompressor library contains the following main elements: + + JPEG proper: + * Entropy decoding (sequential or progressive, Huffman or arithmetic). + * Dequantization, inverse DCT, MCU disassembly. + Postprocessing: + * Upsampling. Optionally, this step may be able to do more general + rescaling of the image. + * Color space conversion (e.g., YCbCr to RGB). This step may also + provide gamma adjustment [ currently it does not ]. + * Optional color quantization (e.g., reduction to 256 colors). + * Optional color precision reduction (e.g., 24-bit to 15-bit color). + [This feature is not currently implemented.] + +We also need overall control, marker parsing, and a data source module. +The support code (memory management & error handling) can be shared with +the compression half of the library. + +There may be several implementations of each of these elements, particularly +in the decompressor, where a wide range of speed/quality tradeoffs is very +useful. It must be understood that some of the best speedups involve +merging adjacent steps in the pipeline. For example, upsampling, color space +conversion, and color quantization might all be done at once when using a +low-quality ordered-dither technique. The system architecture is designed to +allow such merging where appropriate. + + +Note: it is convenient to regard edge expansion (padding to block boundaries) +as a preprocessing/postprocessing function, even though the JPEG spec includes +it in compression/decompression. We do this because downsampling/upsampling +can be simplified a little if they work on padded data: it's not necessary to +have special cases at the right and bottom edges. Therefore the interface +buffer is always an integral number of blocks wide and high, and we expect +compression preprocessing to pad the source data properly. Padding will occur +only to the next block (8-sample) boundary. In an interleaved-scan situation, +additional dummy blocks may be used to fill out MCUs, but the MCU assembly and +disassembly logic will create or discard these blocks internally. (This is +advantageous for speed reasons, since we avoid DCTing the dummy blocks. +It also permits a small reduction in file size, because the compressor can +choose dummy block contents so as to minimize their size in compressed form. +Finally, it makes the interface buffer specification independent of whether +the file is actually interleaved or not.) Applications that wish to deal +directly with the downsampled data must provide similar buffering and padding +for odd-sized images. + + +*** Poor man's object-oriented programming *** + +It should be clear by now that we have a lot of quasi-independent processing +steps, many of which have several possible behaviors. To avoid cluttering the +code with lots of switch statements, we use a simple form of object-style +programming to separate out the different possibilities. + +For example, two different color quantization algorithms could be implemented +as two separate modules that present the same external interface; at runtime, +the calling code will access the proper module indirectly through an "object". + +We can get the limited features we need while staying within portable C. +The basic tool is a function pointer. An "object" is just a struct +containing one or more function pointer fields, each of which corresponds to +a method name in real object-oriented languages. During initialization we +fill in the function pointers with references to whichever module we have +determined we need to use in this run. Then invocation of the module is done +by indirecting through a function pointer; on most machines this is no more +expensive than a switch statement, which would be the only other way of +making the required run-time choice. The really significant benefit, of +course, is keeping the source code clean and well structured. + +We can also arrange to have private storage that varies between different +implementations of the same kind of object. We do this by making all the +module-specific object structs be separately allocated entities, which will +be accessed via pointers in the master compression or decompression struct. +The "public" fields or methods for a given kind of object are specified by +a commonly known struct. But a module's initialization code can allocate +a larger struct that contains the common struct as its first member, plus +additional private fields. With appropriate pointer casting, the module's +internal functions can access these private fields. (For a simple example, +see jdatadst.c, which implements the external interface specified by struct +jpeg_destination_mgr, but adds extra fields.) + +(Of course this would all be a lot easier if we were using C++, but we are +not yet prepared to assume that everyone has a C++ compiler.) + +An important benefit of this scheme is that it is easy to provide multiple +versions of any method, each tuned to a particular case. While a lot of +precalculation might be done to select an optimal implementation of a method, +the cost per invocation is constant. For example, the upsampling step might +have a "generic" method, plus one or more "hardwired" methods for the most +popular sampling factors; the hardwired methods would be faster because they'd +use straight-line code instead of for-loops. The cost to determine which +method to use is paid only once, at startup, and the selection criteria are +hidden from the callers of the method. + +This plan differs a little bit from usual object-oriented structures, in that +only one instance of each object class will exist during execution. The +reason for having the class structure is that on different runs we may create +different instances (choose to execute different modules). You can think of +the term "method" as denoting the common interface presented by a particular +set of interchangeable functions, and "object" as denoting a group of related +methods, or the total shared interface behavior of a group of modules. + + +*** Overall control structure *** + +We previously mentioned the need for overall control logic in the compression +and decompression libraries. In IJG implementations prior to v5, overall +control was mostly provided by "pipeline control" modules, which proved to be +large, unwieldy, and hard to understand. To improve the situation, the +control logic has been subdivided into multiple modules. The control modules +consist of: + +1. Master control for module selection and initialization. This has two +responsibilities: + + 1A. Startup initialization at the beginning of image processing. + The individual processing modules to be used in this run are selected + and given initialization calls. + + 1B. Per-pass control. This determines how many passes will be performed + and calls each active processing module to configure itself + appropriately at the beginning of each pass. End-of-pass processing, + where necessary, is also invoked from the master control module. + + Method selection is partially distributed, in that a particular processing + module may contain several possible implementations of a particular method, + which it will select among when given its initialization call. The master + control code need only be concerned with decisions that affect more than + one module. + +2. Data buffering control. A separate control module exists for each + inter-processing-step data buffer. This module is responsible for + invoking the processing steps that write or read that data buffer. + +Each buffer controller sees the world as follows: + +input data => processing step A => buffer => processing step B => output data + | | | + ------------------ controller ------------------ + +The controller knows the dataflow requirements of steps A and B: how much data +they want to accept in one chunk and how much they output in one chunk. Its +function is to manage its buffer and call A and B at the proper times. + +A data buffer control module may itself be viewed as a processing step by a +higher-level control module; thus the control modules form a binary tree with +elementary processing steps at the leaves of the tree. + +The control modules are objects. A considerable amount of flexibility can +be had by replacing implementations of a control module. For example: +* Merging of adjacent steps in the pipeline is done by replacing a control + module and its pair of processing-step modules with a single processing- + step module. (Hence the possible merges are determined by the tree of + control modules.) +* In some processing modes, a given interstep buffer need only be a "strip" + buffer large enough to accommodate the desired data chunk sizes. In other + modes, a full-image buffer is needed and several passes are required. + The control module determines which kind of buffer is used and manipulates + virtual array buffers as needed. One or both processing steps may be + unaware of the multi-pass behavior. + +In theory, we might be able to make all of the data buffer controllers +interchangeable and provide just one set of implementations for all. In +practice, each one contains considerable special-case processing for its +particular job. The buffer controller concept should be regarded as an +overall system structuring principle, not as a complete description of the +task performed by any one controller. + + +*** Compression object structure *** + +Here is a sketch of the logical structure of the JPEG compression library: + + |-- Colorspace conversion + |-- Preprocessing controller --| + | |-- Downsampling +Main controller --| + | |-- Forward DCT, quantize + |-- Coefficient controller --| + |-- Entropy encoding + +This sketch also describes the flow of control (subroutine calls) during +typical image data processing. Each of the components shown in the diagram is +an "object" which may have several different implementations available. One +or more source code files contain the actual implementation(s) of each object. + +The objects shown above are: + +* Main controller: buffer controller for the subsampled-data buffer, which + holds the preprocessed input data. This controller invokes preprocessing to + fill the subsampled-data buffer, and JPEG compression to empty it. There is + usually no need for a full-image buffer here; a strip buffer is adequate. + +* Preprocessing controller: buffer controller for the downsampling input data + buffer, which lies between colorspace conversion and downsampling. Note + that a unified conversion/downsampling module would probably replace this + controller entirely. + +* Colorspace conversion: converts application image data into the desired + JPEG color space; also changes the data from pixel-interleaved layout to + separate component planes. Processes one pixel row at a time. + +* Downsampling: performs reduction of chroma components as required. + Optionally may perform pixel-level smoothing as well. Processes a "row + group" at a time, where a row group is defined as Vmax pixel rows of each + component before downsampling, and Vk sample rows afterwards (remember Vk + differs across components). Some downsampling or smoothing algorithms may + require context rows above and below the current row group; the + preprocessing controller is responsible for supplying these rows via proper + buffering. The downsampler is responsible for edge expansion at the right + edge (i.e., extending each sample row to a multiple of 8 samples); but the + preprocessing controller is responsible for vertical edge expansion (i.e., + duplicating the bottom sample row as needed to make a multiple of 8 rows). + +* Coefficient controller: buffer controller for the DCT-coefficient data. + This controller handles MCU assembly, including insertion of dummy DCT + blocks when needed at the right or bottom edge. When performing + Huffman-code optimization or emitting a multiscan JPEG file, this + controller is responsible for buffering the full image. The equivalent of + one fully interleaved MCU row of subsampled data is processed per call, + even when the JPEG file is noninterleaved. + +* Forward DCT and quantization: Perform DCT, quantize, and emit coefficients. + Works on one or more DCT blocks at a time. (Note: the coefficients are now + emitted in normal array order, which the entropy encoder is expected to + convert to zigzag order as necessary. Prior versions of the IJG code did + the conversion to zigzag order within the quantization step.) + +* Entropy encoding: Perform Huffman or arithmetic entropy coding and emit the + coded data to the data destination module. Works on one MCU per call. + For progressive JPEG, the same DCT blocks are fed to the entropy coder + during each pass, and the coder must emit the appropriate subset of + coefficients. + +In addition to the above objects, the compression library includes these +objects: + +* Master control: determines the number of passes required, controls overall + and per-pass initialization of the other modules. + +* Marker writing: generates JPEG markers (except for RSTn, which is emitted + by the entropy encoder when needed). + +* Data destination manager: writes the output JPEG datastream to its final + destination (e.g., a file). The destination manager supplied with the + library knows how to write to a stdio stream; for other behaviors, the + surrounding application may provide its own destination manager. + +* Memory manager: allocates and releases memory, controls virtual arrays + (with backing store management, where required). + +* Error handler: performs formatting and output of error and trace messages; + determines handling of nonfatal errors. The surrounding application may + override some or all of this object's methods to change error handling. + +* Progress monitor: supports output of "percent-done" progress reports. + This object represents an optional callback to the surrounding application: + if wanted, it must be supplied by the application. + +The error handler, destination manager, and progress monitor objects are +defined as separate objects in order to simplify application-specific +customization of the JPEG library. A surrounding application may override +individual methods or supply its own all-new implementation of one of these +objects. The object interfaces for these objects are therefore treated as +part of the application interface of the library, whereas the other objects +are internal to the library. + +The error handler and memory manager are shared by JPEG compression and +decompression; the progress monitor, if used, may be shared as well. + + +*** Decompression object structure *** + +Here is a sketch of the logical structure of the JPEG decompression library: + + |-- Entropy decoding + |-- Coefficient controller --| + | |-- Dequantize, Inverse DCT +Main controller --| + | |-- Upsampling + |-- Postprocessing controller --| |-- Colorspace conversion + |-- Color quantization + |-- Color precision reduction + +As before, this diagram also represents typical control flow. The objects +shown are: + +* Main controller: buffer controller for the subsampled-data buffer, which + holds the output of JPEG decompression proper. This controller's primary + task is to feed the postprocessing procedure. Some upsampling algorithms + may require context rows above and below the current row group; when this + is true, the main controller is responsible for managing its buffer so as + to make context rows available. In the current design, the main buffer is + always a strip buffer; a full-image buffer is never required. + +* Coefficient controller: buffer controller for the DCT-coefficient data. + This controller handles MCU disassembly, including deletion of any dummy + DCT blocks at the right or bottom edge. When reading a multiscan JPEG + file, this controller is responsible for buffering the full image. + (Buffering DCT coefficients, rather than samples, is necessary to support + progressive JPEG.) The equivalent of one fully interleaved MCU row of + subsampled data is processed per call, even when the source JPEG file is + noninterleaved. + +* Entropy decoding: Read coded data from the data source module and perform + Huffman or arithmetic entropy decoding. Works on one MCU per call. + For progressive JPEG decoding, the coefficient controller supplies the prior + coefficients of each MCU (initially all zeroes), which the entropy decoder + modifies in each scan. + +* Dequantization and inverse DCT: like it says. Note that the coefficients + buffered by the coefficient controller have NOT been dequantized; we + merge dequantization and inverse DCT into a single step for speed reasons. + When scaled-down output is asked for, simplified DCT algorithms may be used + that emit only 1x1, 2x2, or 4x4 samples per DCT block, not the full 8x8. + Works on one DCT block at a time. + +* Postprocessing controller: buffer controller for the color quantization + input buffer, when quantization is in use. (Without quantization, this + controller just calls the upsampler.) For two-pass quantization, this + controller is responsible for buffering the full-image data. + +* Upsampling: restores chroma components to full size. (May support more + general output rescaling, too. Note that if undersized DCT outputs have + been emitted by the DCT module, this module must adjust so that properly + sized outputs are created.) Works on one row group at a time. This module + also calls the color conversion module, so its top level is effectively a + buffer controller for the upsampling->color conversion buffer. However, in + all but the highest-quality operating modes, upsampling and color + conversion are likely to be merged into a single step. + +* Colorspace conversion: convert from JPEG color space to output color space, + and change data layout from separate component planes to pixel-interleaved. + Works on one pixel row at a time. + +* Color quantization: reduce the data to colormapped form, using either an + externally specified colormap or an internally generated one. This module + is not used for full-color output. Works on one pixel row at a time; may + require two passes to generate a color map. Note that the output will + always be a single component representing colormap indexes. In the current + design, the output values are JSAMPLEs, so an 8-bit compilation cannot + quantize to more than 256 colors. This is unlikely to be a problem in + practice. + +* Color reduction: this module handles color precision reduction, e.g., + generating 15-bit color (5 bits/primary) from JPEG's 24-bit output. + Not quite clear yet how this should be handled... should we merge it with + colorspace conversion??? + +Note that some high-speed operating modes might condense the entire +postprocessing sequence to a single module (upsample, color convert, and +quantize in one step). + +In addition to the above objects, the decompression library includes these +objects: + +* Master control: determines the number of passes required, controls overall + and per-pass initialization of the other modules. This is subdivided into + input and output control: jdinput.c controls only input-side processing, + while jdmaster.c handles overall initialization and output-side control. + +* Marker reading: decodes JPEG markers (except for RSTn). + +* Data source manager: supplies the input JPEG datastream. The source + manager supplied with the library knows how to read from a stdio stream; + for other behaviors, the surrounding application may provide its own source + manager. + +* Memory manager: same as for compression library. + +* Error handler: same as for compression library. + +* Progress monitor: same as for compression library. + +As with compression, the data source manager, error handler, and progress +monitor are candidates for replacement by a surrounding application. + + +*** Decompression input and output separation *** + +To support efficient incremental display of progressive JPEG files, the +decompressor is divided into two sections that can run independently: + +1. Data input includes marker parsing, entropy decoding, and input into the + coefficient controller's DCT coefficient buffer. Note that this + processing is relatively cheap and fast. + +2. Data output reads from the DCT coefficient buffer and performs the IDCT + and all postprocessing steps. + +For a progressive JPEG file, the data input processing is allowed to get +arbitrarily far ahead of the data output processing. (This occurs only +if the application calls jpeg_consume_input(); otherwise input and output +run in lockstep, since the input section is called only when the output +section needs more data.) In this way the application can avoid making +extra display passes when data is arriving faster than the display pass +can run. Furthermore, it is possible to abort an output pass without +losing anything, since the coefficient buffer is read-only as far as the +output section is concerned. See libjpeg.doc for more detail. + +A full-image coefficient array is only created if the JPEG file has multiple +scans (or if the application specifies buffered-image mode anyway). When +reading a single-scan file, the coefficient controller normally creates only +a one-MCU buffer, so input and output processing must run in lockstep in this +case. jpeg_consume_input() is effectively a no-op in this situation. + +The main impact of dividing the decompressor in this fashion is that we must +be very careful with shared variables in the cinfo data structure. Each +variable that can change during the course of decompression must be +classified as belonging to data input or data output, and each section must +look only at its own variables. For example, the data output section may not +depend on any of the variables that describe the current scan in the JPEG +file, because these may change as the data input section advances into a new +scan. + +The progress monitor is (somewhat arbitrarily) defined to treat input of the +file as one pass when buffered-image mode is not used, and to ignore data +input work completely when buffered-image mode is used. Note that the +library has no reliable way to predict the number of passes when dealing +with a progressive JPEG file, nor can it predict the number of output passes +in buffered-image mode. So the work estimate is inherently bogus anyway. + +No comparable division is currently made in the compression library, because +there isn't any real need for it. + + +*** Data formats *** + +Arrays of pixel sample values use the following data structure: + + typedef something JSAMPLE; a pixel component value, 0..MAXJSAMPLE + typedef JSAMPLE *JSAMPROW; ptr to a row of samples + typedef JSAMPROW *JSAMPARRAY; ptr to a list of rows + typedef JSAMPARRAY *JSAMPIMAGE; ptr to a list of color-component arrays + +The basic element type JSAMPLE will typically be one of unsigned char, +(signed) char, or short. Short will be used if samples wider than 8 bits are +to be supported (this is a compile-time option). Otherwise, unsigned char is +used if possible. If the compiler only supports signed chars, then it is +necessary to mask off the value when reading. Thus, all reads of JSAMPLE +values must be coded as "GETJSAMPLE(value)", where the macro will be defined +as "((value) & 0xFF)" on signed-char machines and "((int) (value))" elsewhere. + +With these conventions, JSAMPLE values can be assumed to be >= 0. This helps +simplify correct rounding during downsampling, etc. The JPEG standard's +specification that sample values run from -128..127 is accommodated by +subtracting 128 just as the sample value is copied into the source array for +the DCT step (this will be an array of signed ints). Similarly, during +decompression the output of the IDCT step will be immediately shifted back to +0..255. (NB: different values are required when 12-bit samples are in use. +The code is written in terms of MAXJSAMPLE and CENTERJSAMPLE, which will be +defined as 255 and 128 respectively in an 8-bit implementation, and as 4095 +and 2048 in a 12-bit implementation.) + +We use a pointer per row, rather than a two-dimensional JSAMPLE array. This +choice costs only a small amount of memory and has several benefits: +* Code using the data structure doesn't need to know the allocated width of + the rows. This simplifies edge expansion/compression, since we can work + in an array that's wider than the logical picture width. +* Indexing doesn't require multiplication; this is a performance win on many + machines. +* Arrays with more than 64K total elements can be supported even on machines + where malloc() cannot allocate chunks larger than 64K. +* The rows forming a component array may be allocated at different times + without extra copying. This trick allows some speedups in smoothing steps + that need access to the previous and next rows. + +Note that each color component is stored in a separate array; we don't use the +traditional layout in which the components of a pixel are stored together. +This simplifies coding of modules that work on each component independently, +because they don't need to know how many components there are. Furthermore, +we can read or write each component to a temporary file independently, which +is helpful when dealing with noninterleaved JPEG files. + +In general, a specific sample value is accessed by code such as + GETJSAMPLE(image[colorcomponent][row][col]) +where col is measured from the image left edge, but row is measured from the +first sample row currently in memory. Either of the first two indexings can +be precomputed by copying the relevant pointer. + + +Since most image-processing applications prefer to work on images in which +the components of a pixel are stored together, the data passed to or from the +surrounding application uses the traditional convention: a single pixel is +represented by N consecutive JSAMPLE values, and an image row is an array of +(# of color components)*(image width) JSAMPLEs. One or more rows of data can +be represented by a pointer of type JSAMPARRAY in this scheme. This scheme is +converted to component-wise storage inside the JPEG library. (Applications +that want to skip JPEG preprocessing or postprocessing will have to contend +with component-wise storage.) + + +Arrays of DCT-coefficient values use the following data structure: + + typedef short JCOEF; a 16-bit signed integer + typedef JCOEF JBLOCK[DCTSIZE2]; an 8x8 block of coefficients + typedef JBLOCK *JBLOCKROW; ptr to one horizontal row of 8x8 blocks + typedef JBLOCKROW *JBLOCKARRAY; ptr to a list of such rows + typedef JBLOCKARRAY *JBLOCKIMAGE; ptr to a list of color component arrays + +The underlying type is at least a 16-bit signed integer; while "short" is big +enough on all machines of interest, on some machines it is preferable to use +"int" for speed reasons, despite the storage cost. Coefficients are grouped +into 8x8 blocks (but we always use #defines DCTSIZE and DCTSIZE2 rather than +"8" and "64"). + +The contents of a coefficient block may be in either "natural" or zigzagged +order, and may be true values or divided by the quantization coefficients, +depending on where the block is in the processing pipeline. In the current +library, coefficient blocks are kept in natural order everywhere; the entropy +codecs zigzag or dezigzag the data as it is written or read. The blocks +contain quantized coefficients everywhere outside the DCT/IDCT subsystems. +(This latter decision may need to be revisited to support variable +quantization a la JPEG Part 3.) + +Notice that the allocation unit is now a row of 8x8 blocks, corresponding to +eight rows of samples. Otherwise the structure is much the same as for +samples, and for the same reasons. + +On machines where malloc() can't handle a request bigger than 64Kb, this data +structure limits us to rows of less than 512 JBLOCKs, or a picture width of +4000+ pixels. This seems an acceptable restriction. + + +On 80x86 machines, the bottom-level pointer types (JSAMPROW and JBLOCKROW) +must be declared as "far" pointers, but the upper levels can be "near" +(implying that the pointer lists are allocated in the DS segment). +We use a #define symbol FAR, which expands to the "far" keyword when +compiling on 80x86 machines and to nothing elsewhere. + + +*** Suspendable processing *** + +In some applications it is desirable to use the JPEG library as an +incremental, memory-to-memory filter. In this situation the data source or +destination may be a limited-size buffer, and we can't rely on being able to +empty or refill the buffer at arbitrary times. Instead the application would +like to have control return from the library at buffer overflow/underrun, and +then resume compression or decompression at a later time. + +This scenario is supported for simple cases. (For anything more complex, we +recommend that the application "bite the bullet" and develop real multitasking +capability.) The libjpeg.doc file goes into more detail about the usage and +limitations of this capability; here we address the implications for library +structure. + +The essence of the problem is that the entropy codec (coder or decoder) must +be prepared to stop at arbitrary times. In turn, the controllers that call +the entropy codec must be able to stop before having produced or consumed all +the data that they normally would handle in one call. That part is reasonably +straightforward: we make the controller call interfaces include "progress +counters" which indicate the number of data chunks successfully processed, and +we require callers to test the counter rather than just assume all of the data +was processed. + +Rather than trying to restart at an arbitrary point, the current Huffman +codecs are designed to restart at the beginning of the current MCU after a +suspension due to buffer overflow/underrun. At the start of each call, the +codec's internal state is loaded from permanent storage (in the JPEG object +structures) into local variables. On successful completion of the MCU, the +permanent state is updated. (This copying is not very expensive, and may even +lead to *improved* performance if the local variables can be registerized.) +If a suspension occurs, the codec simply returns without updating the state, +thus effectively reverting to the start of the MCU. Note that this implies +leaving some data unprocessed in the source/destination buffer (ie, the +compressed partial MCU). The data source/destination module interfaces are +specified so as to make this possible. This also implies that the data buffer +must be large enough to hold a worst-case compressed MCU; a couple thousand +bytes should be enough. + +In a successive-approximation AC refinement scan, the progressive Huffman +decoder has to be able to undo assignments of newly nonzero coefficients if it +suspends before the MCU is complete, since decoding requires distinguishing +previously-zero and previously-nonzero coefficients. This is a bit tedious +but probably won't have much effect on performance. Other variants of Huffman +decoding need not worry about this, since they will just store the same values +again if forced to repeat the MCU. + +This approach would probably not work for an arithmetic codec, since its +modifiable state is quite large and couldn't be copied cheaply. Instead it +would have to suspend and resume exactly at the point of the buffer end. + +The JPEG marker reader is designed to cope with suspension at an arbitrary +point. It does so by backing up to the start of the marker parameter segment, +so the data buffer must be big enough to hold the largest marker of interest. +Again, a couple KB should be adequate. (A special "skip" convention is used +to bypass COM and APPn markers, so these can be larger than the buffer size +without causing problems; otherwise a 64K buffer would be needed in the worst +case.) + +The JPEG marker writer currently does *not* cope with suspension. I feel that +this is not necessary; it is much easier simply to require the application to +ensure there is enough buffer space before starting. (An empty 2K buffer is +more than sufficient for the header markers; and ensuring there are a dozen or +two bytes available before calling jpeg_finish_compress() will suffice for the +trailer.) This would not work for writing multi-scan JPEG files, but +we simply do not intend to support that capability with suspension. + + +*** Memory manager services *** + +The JPEG library's memory manager controls allocation and deallocation of +memory, and it manages large "virtual" data arrays on machines where the +operating system does not provide virtual memory. Note that the same +memory manager serves both compression and decompression operations. + +In all cases, allocated objects are tied to a particular compression or +decompression master record, and they will be released when that master +record is destroyed. + +The memory manager does not provide explicit deallocation of objects. +Instead, objects are created in "pools" of free storage, and a whole pool +can be freed at once. This approach helps prevent storage-leak bugs, and +it speeds up operations whenever malloc/free are slow (as they often are). +The pools can be regarded as lifetime identifiers for objects. Two +pools/lifetimes are defined: + * JPOOL_PERMANENT lasts until master record is destroyed + * JPOOL_IMAGE lasts until done with image (JPEG datastream) +Permanent lifetime is used for parameters and tables that should be carried +across from one datastream to another; this includes all application-visible +parameters. Image lifetime is used for everything else. (A third lifetime, +JPOOL_PASS = one processing pass, was originally planned. However it was +dropped as not being worthwhile. The actual usage patterns are such that the +peak memory usage would be about the same anyway; and having per-pass storage +substantially complicates the virtual memory allocation rules --- see below.) + +The memory manager deals with three kinds of object: +1. "Small" objects. Typically these require no more than 10K-20K total. +2. "Large" objects. These may require tens to hundreds of K depending on + image size. Semantically they behave the same as small objects, but we + distinguish them for two reasons: + * On MS-DOS machines, large objects are referenced by FAR pointers, + small objects by NEAR pointers. + * Pool allocation heuristics may differ for large and small objects. + Note that individual "large" objects cannot exceed the size allowed by + type size_t, which may be 64K or less on some machines. +3. "Virtual" objects. These are large 2-D arrays of JSAMPLEs or JBLOCKs + (typically large enough for the entire image being processed). The + memory manager provides stripwise access to these arrays. On machines + without virtual memory, the rest of the array may be swapped out to a + temporary file. + +(Note: JSAMPARRAY and JBLOCKARRAY data structures are a combination of large +objects for the data proper and small objects for the row pointers. For +convenience and speed, the memory manager provides single routines to create +these structures. Similarly, virtual arrays include a small control block +and a JSAMPARRAY or JBLOCKARRAY working buffer, all created with one call.) + +In the present implementation, virtual arrays are only permitted to have image +lifespan. (Permanent lifespan would not be reasonable, and pass lifespan is +not very useful since a virtual array's raison d'etre is to store data for +multiple passes through the image.) We also expect that only "small" objects +will be given permanent lifespan, though this restriction is not required by +the memory manager. + +In a non-virtual-memory machine, some performance benefit can be gained by +making the in-memory buffers for virtual arrays be as large as possible. +(For small images, the buffers might fit entirely in memory, so blind +swapping would be very wasteful.) The memory manager will adjust the height +of the buffers to fit within a prespecified maximum memory usage. In order +to do this in a reasonably optimal fashion, the manager needs to allocate all +of the virtual arrays at once. Therefore, there isn't a one-step allocation +routine for virtual arrays; instead, there is a "request" routine that simply +allocates the control block, and a "realize" routine (called just once) that +determines space allocation and creates all of the actual buffers. The +realize routine must allow for space occupied by non-virtual large objects. +(We don't bother to factor in the space needed for small objects, on the +grounds that it isn't worth the trouble.) + +To support all this, we establish the following protocol for doing business +with the memory manager: + 1. Modules must request virtual arrays (which may have only image lifespan) + during the initial setup phase, i.e., in their jinit_xxx routines. + 2. All "large" objects (including JSAMPARRAYs and JBLOCKARRAYs) must also be + allocated during initial setup. + 3. realize_virt_arrays will be called at the completion of initial setup. + The above conventions ensure that sufficient information is available + for it to choose a good size for virtual array buffers. +Small objects of any lifespan may be allocated at any time. We expect that +the total space used for small objects will be small enough to be negligible +in the realize_virt_arrays computation. + +In a virtual-memory machine, we simply pretend that the available space is +infinite, thus causing realize_virt_arrays to decide that it can allocate all +the virtual arrays as full-size in-memory buffers. The overhead of the +virtual-array access protocol is very small when no swapping occurs. + +A virtual array can be specified to be "pre-zeroed"; when this flag is set, +never-yet-written sections of the array are set to zero before being made +available to the caller. If this flag is not set, never-written sections +of the array contain garbage. (This feature exists primarily because the +equivalent logic would otherwise be needed in jdcoefct.c for progressive +JPEG mode; we may as well make it available for possible other uses.) + +The first write pass on a virtual array is required to occur in top-to-bottom +order; read passes, as well as any write passes after the first one, may +access the array in any order. This restriction exists partly to simplify +the virtual array control logic, and partly because some file systems may not +support seeking beyond the current end-of-file in a temporary file. The main +implication of this restriction is that rearrangement of rows (such as +converting top-to-bottom data order to bottom-to-top) must be handled while +reading data out of the virtual array, not while putting it in. + + +*** Memory manager internal structure *** + +To isolate system dependencies as much as possible, we have broken the +memory manager into two parts. There is a reasonably system-independent +"front end" (jmemmgr.c) and a "back end" that contains only the code +likely to change across systems. All of the memory management methods +outlined above are implemented by the front end. The back end provides +the following routines for use by the front end (none of these routines +are known to the rest of the JPEG code): + +jpeg_mem_init, jpeg_mem_term system-dependent initialization/shutdown + +jpeg_get_small, jpeg_free_small interface to malloc and free library routines + (or their equivalents) + +jpeg_get_large, jpeg_free_large interface to FAR malloc/free in MSDOS machines; + else usually the same as + jpeg_get_small/jpeg_free_small + +jpeg_mem_available estimate available memory + +jpeg_open_backing_store create a backing-store object + +read_backing_store, manipulate a backing-store object +write_backing_store, +close_backing_store + +On some systems there will be more than one type of backing-store object +(specifically, in MS-DOS a backing store file might be an area of extended +memory as well as a disk file). jpeg_open_backing_store is responsible for +choosing how to implement a given object. The read/write/close routines +are method pointers in the structure that describes a given object; this +lets them be different for different object types. + +It may be necessary to ensure that backing store objects are explicitly +released upon abnormal program termination. For example, MS-DOS won't free +extended memory by itself. To support this, we will expect the main program +or surrounding application to arrange to call self_destruct (typically via +jpeg_destroy) upon abnormal termination. This may require a SIGINT signal +handler or equivalent. We don't want to have the back end module install its +own signal handler, because that would pre-empt the surrounding application's +ability to control signal handling. + +The IJG distribution includes several memory manager back end implementations. +Usually the same back end should be suitable for all applications on a given +system, but it is possible for an application to supply its own back end at +need. + + +*** Implications of DNL marker *** + +Some JPEG files may use a DNL marker to postpone definition of the image +height (this would be useful for a fax-like scanner's output, for instance). +In these files the SOF marker claims the image height is 0, and you only +find out the true image height at the end of the first scan. + +We could read these files as follows: +1. Upon seeing zero image height, replace it by 65535 (the maximum allowed). +2. When the DNL is found, update the image height in the global image + descriptor. +This implies that control modules must avoid making copies of the image +height, and must re-test for termination after each MCU row. This would +be easy enough to do. + +In cases where image-size data structures are allocated, this approach will +result in very inefficient use of virtual memory or much-larger-than-necessary +temporary files. This seems acceptable for something that probably won't be a +mainstream usage. People might have to forgo use of memory-hogging options +(such as two-pass color quantization or noninterleaved JPEG files) if they +want efficient conversion of such files. (One could improve efficiency by +demanding a user-supplied upper bound for the height, less than 65536; in most +cases it could be much less.) + +The standard also permits the SOF marker to overestimate the image height, +with a DNL to give the true, smaller height at the end of the first scan. +This would solve the space problems if the overestimate wasn't too great. +However, it implies that you don't even know whether DNL will be used. + +This leads to a couple of very serious objections: +1. Testing for a DNL marker must occur in the inner loop of the decompressor's + Huffman decoder; this implies a speed penalty whether the feature is used + or not. +2. There is no way to hide the last-minute change in image height from an + application using the decoder. Thus *every* application using the IJG + library would suffer a complexity penalty whether it cared about DNL or + not. +We currently do not support DNL because of these problems. + +A different approach is to insist that DNL-using files be preprocessed by a +separate program that reads ahead to the DNL, then goes back and fixes the SOF +marker. This is a much simpler solution and is probably far more efficient. +Even if one wants piped input, buffering the first scan of the JPEG file needs +a lot smaller temp file than is implied by the maximum-height method. For +this approach we'd simply treat DNL as a no-op in the decompressor (at most, +check that it matches the SOF image height). + +We will not worry about making the compressor capable of outputting DNL. +Something similar to the first scheme above could be applied if anyone ever +wants to make that work. diff --git a/windows_libs/jpeg-6a/testimg.gif b/windows_libs/jpeg-6a/testimg.gif new file mode 100644 index 00000000..ca403618 Binary files /dev/null and b/windows_libs/jpeg-6a/testimg.gif differ diff --git a/windows_libs/jpeg-6a/testimg.jpg b/windows_libs/jpeg-6a/testimg.jpg new file mode 100644 index 00000000..b34ca5d3 Binary files /dev/null and b/windows_libs/jpeg-6a/testimg.jpg differ diff --git a/windows_libs/jpeg-6a/testimg.ppm b/windows_libs/jpeg-6a/testimg.ppm new file mode 100644 index 00000000..9d81ce24 --- /dev/null +++ b/windows_libs/jpeg-6a/testimg.ppm @@ -0,0 +1,4 @@ +P6 +227 149 +255 +0/-0/-10.21/51.51.62/62/83/83/:3-:3-:3-:3-:3-:3-:2/91.91.80-80-91.91.:2/80-80-80-80-80-80-80-80-6.+6.+6.+5-*5-*4,)4,)4,)4,)4,)4,)4,)4,)4,)4,)2-)/*$/,%/,%0-&1.'2/(30)30)63,63,74-85.85.96/:70:7.A:0B<0D>2F@4IA4JB5KC6KC6MD5MD5OC3NB2OC3OC3PD4RE5R?1Y?2b@4nB5}E6‹H8™G9ŖF7¯G:¸G9žE:ÅG;ĮG>ĘG?ËH@ĐE@įFLíCLëDKëEIîCIīBDņ>Bô=Aø;A÷:@ô:?đ×?<ËA7ģ=/ĩ@.ĩ@.´?-´?-ŗ@-˛?-¯@-­@,ĒA,ĻA-ĸB,Ÿ@*›A)˜@*–A,”>-’?/’?/‘>.‘>,=+’<+’<+”?+”?+”=*”=*”=*•>+–?,–@/–?6•>5—=2Ÿ?1ŠB3ŗD3ŧD4ŋD4š?0ĩA2ŦF8žH;‡H9oA2T8*C3&=5295495473271160050-50-72/72/72/61.61-50,50,41,//-.0-//-//-0/-0/-2.-2.-5,-4+,4*+3)*7(+=.1E69P:0U?1^A3jC4xD6„E4’E5œC3§C4¯A4ĩA4ŧB7ĀD:ÄE<ÅF=ÍC@áEIįBIčCIęDHíDGīBDķ@Cö?Cø;A÷:@ô:?đÕ@<Ę@6š>/ĩ@.´?-´?-´?-˛?,°?-¯@-­@,Š@+ĻA-ĄA+Ÿ@*›A)˜@*–A,”>-’?/‘>.‘>.‘>,=+’<+’<+”?+“>*”=*”=*”=*•>+–?,–@/”@5•>5˜>3 >1ĢA3ĩD4ŊC4ŋD5ģA2ˇC6ŦF8œI;…G:l@3S9*B4)>63:6595484382271161.61.72/72/72/61.61-50,50,41,//-.0-//-//-0/-0/-2.-2.-3--5,-4*+3)*5)+<-0C47N8:d>=vEA†JINLšTV¤ajĨl}rŽ‘{ĸ†€Ž…š{„ģouŠ[[QHuOCiOFeOG_PH_RN_[Yfnotƒ‡ˆ”™•™ž—š ”™‘ƒ~ojkY][LVSJXSZVRaXQa/.,/.,0/-10.40-40-51.51.72.72.72.72.92,92,92,92,91.80.7/-7/-7/-7/-80.91/80.80.80.80.80.80.80.80.6.,5-+5-+5-+4,*4,*4,*4,*5-+5-+5-+5-+5-+5-+5-+3.*2-'1.'2/(30)30)41*41*52+63,63,63,74-85.96/96/:7.?8.@:.B<0D>2G?4H@5H@3H@3I@1I@1K?1K?1K?/L@0MA1NB2MA1QA1YB2dC2qC3|C2‡B2’A0˜<- :+§;.¯=2ĩ@6ēD:ŋF=ÅD>ŲCEá@FãBGįBFęDFđCEôADø?Dú;@ų:?õ;@đ=@č@@ÜA=Ņ@;Æ@5ˇ=.ŗ@-ŗ@-˛?,˛?-°?-¯>,­@,Ē?-§@-Ĩ@,ĄA+A,š?*˜@*•@+”>-‘>.‘>.‘>.=+=+=+=+‘>,‘>,’<+’<+“=,“=,”?+•?.•A6–?5š>3Ŗ>2¯A4šC5ŋD5ÁC5ĀD8¸F;ŽI=™J=G;h@4Q:,B5,?74=77<66:4494183072/72/62/62/62/51.52-41,41,21,.0-,1-.0-.0-//-//-0/-2.-5//4..5,-4*+4*+9-/>24I56[97l?9|E@†IDOM˜[`›fv”mˆŒwžƒ}­}‚šu~ˇfm¤TV‰MEvLAkMAeOFcQHcMH^NK\[[eqty…‰ˆ‡Œ†Šˆ…†Š|xzlfiXZ[MVSLZU[ZT`[S`.-+/.,/.,0/-3/,40-40-40-61-61-61-61-81+81+81+81+7/-7/-6.,6.,6.,6.,7/-7/-80.80.80.80.80.80.80.80.5-+5-+5-+4,*4,*4,*3+)3+)6.,6.,6.,6.,6.,6.,6.,4/,30+30)30)41*41*52+52+52+52+52+63,74-85.85.96/96->7-?9-@:.B<0E=2E=2F>1F>1G=1G>/H<.I=/I=/J>.L@0JA0KD2NE4UD4^D3iD2sB1~A/†?-Œ9)”9'9*Ŗ<-Ŧ@3ŗE8¸H<ÁF>ŌDCÚACŪBCâDCįCDėBCķ@C÷?Aú;@ų:?õ;@î>@åA@ÚB=Í@9Â@3ĩ=-°@,°@,°@,¯>,Ž?,Ž?,Ŧ?+Š@-Ļ?,Ŗ@+ @*œ@+˜@*–@)”?*‘>,‘>.‘>.=-=+=+<*<*=+=+<*<*’<+‘>,”>-’?-•A6–?5œ>2Ļ@4˛B6ŧC8ÁC7ÂB7ÂF<ēJ?ŦL@—K>|F:b@4L:.A7-@85>96=77<74:5294183083062/62/62/32.52-21,21,12--2.-2./1./1.00.00.10.10.5106005//5,-4+,6,-:01D22T71c;3qA7{E;‚HD‰RU_l‹i‚ƒs˜}yĢx}ĩowĩ`fĸQR‹LEyL@pL@hPEgQFfLC^GBVMLZ^^fjnquyxx}wz€vwzokoa`bTWYLTTL]WY]V]]V^------.-+/.,0/-10.3/,40-3/,3/,4/+4/+4/+4/+6/)6/)4/,4/,3.+3.+3.+3.+4/,4/,50-50-50-50-50-50-50-50-3.+3.+2-*2-*2-*1,)1,)1,)4/,4/,4/,4/,4/,4/,4/,4/,41,41,41,41,41,52-52-52-52-52-63.63.74/85096196/<5-=6,?8.@9/B:/C;0C;0C;.D:.D:.F:.G;-H<.I=/J>0I@1JG6MH5RG5YF5bE3jD1uB/}>,‚;)‹:)“:*š=,ŖB2ŦF8˛J=ģI?ĖGBÔDCØDBŨEBâBBéAAđ=@ô<>ų:?ø:<ô<>í?>áB>ĶC:ÅA5š?0˛?-Ž?,Ž?,Ž?,­>-Ŧ>-Ŧ>-Ē?-¨>.¤?- ?,ž?+š?,—?+•>*“>*‘>,?.>->->-Ž=,Ž=,Ž=,Ž=,Ž=,Ž=,Ž=,<,>-‘>.?.”B4—A4@1¨@3ļA7ŋC9ÅB8ÄA7žC;ˇH?ĻLCJ@tE;Z>2E9-<5+@93@85?75>63=52<4194083/62/43/43/23.32.12-12-02--2.,2.-2.-2./1./1.00.10.3205105104..2,,4+,7./=/.N5.Y9.e=1n@3sB;yKK€Zeƒg€p—zxĒu{ˇks´_dĻTT”OGƒLBwNAmNBhMAeJA`GBYGFXKKWMPU]cc`fbbia`f\Z`TW[MUXMXXP^YV`WX`WZ,,,,,,.-+.-+/.,0/-3/,3/,2.+2.+3.*3.*3.*3.*5.(5-*3.+3.+2-*1,)1,)2-*3.+3.+3.+3.+3.+3.+3.+3.+3.+3.+2-*2-*2-*2-*1,)1,)1,)0+(3.+3.+3.+3.+3.+3.+3.+3.+41,41,41,41,41,41,41,41,41,52-52-63.74/85085085.;4,<5+=6,>7-@7.A9.A9.A9.C9/C9-E9-F:.G;/H<.J>0HA1JG6IH6NG5VF6\E3dC2n@0v>-{<+‚;)Œ;*”=,œ@1ŖF5ĒJ:´J=ÄH@ĖEAŅFAÖE@ŪCAä@>ė>?ņ:<÷;<ô:;đ<=é@=ÜC=ÍC8ž@2ą>,Ž?,Ģ@,Ē?+Ē?+Ē?-Š>,Š>,¨?,Ĩ>-ĸ?, ?,›>,—?+•>*“>)‘?*>+>->->-Ž=,Ž=,Ž=,<+Ž=,‹<+<+‹<+‹<-Œ=,>/Ž?.”B4—A2 @2ŦB5šC9ÂC:ÅB:ÂA;ēA9ąI@ŖNGNEoG=S?4A;/96-@93A75?74>63<4194083/74/43/43/34/23.23.02-02-.3--3/-3/.3/.3/02/02/11/11/21/32032040/2.-1-,4..8.,G4-O4)X8+`<0e?6mGFyYd‚k…€uŸ||˛w|ŧnuģdh¯[[ĄRMLB~OArL@hI=cH>`HB^ECX@BO;@FBGJDMJJQJJQIIQFKQEOUIVWO^YS`YS`XU++++++,,,---/.,/.,0/-0/-1-*1-*1-*1-*2-)2-)2-)2-)2-*2,,1++1++1++1++2,,2,,1++1++1++1++1++1++1++1++2,,2,,2,,1++1++1++0**0**3--3--3--3--3--3--3--3.+41,41,41,30+30+30+30+30+41,41,52-63.74/74/85085.:3+;4,<5-=6.?6/?6-?6-?7,B8.B8.E8/E9-G;/H<0J>2H@3HE6GF4KE5QD4XC2_B2f?.n=,v=,|:*…9)Œ;*“=.›B2ĸF7ŦF8ģF<ÂF>ÉF>ĐE>ŲD@âC?ę@@đ>>ō::ņ;:ė<<äA<ÖC;ÆD6ĩ@/Ē=)Ē?-Š@-Š@-¨?,¨>.¨>.§=-Ĩ>-Ŗ=. ?.ž?-š?-–?,“>*‘?*>)>+>->-Œ=,Œ=.Œ=.‹<-‹<-‹<-Š=-Š;,‰<,Š.‹=0Œ?/’C2˜B1ĄA1ŽB6ŧC:ÂC<ÄC=ĀC=šFA˛QJĨXRXQsRIWI>CC793@72>71=60:5/94.83/63.43.43.34/13.13..3-.3-.3--3/-3/-3/-3/.3/.3/02/02/00.11/22021/0/-/.,2.-4/,?0+D0)K3)T8-Z<4dFFu]jƒs‰€Ģ…„ž~ƒĮtzÆmpŊce¯VSšLC‚K?qI_FB]DBW?AN;?H:BE>HGDMHGQIGQHJRGNVKUXM^ZOaYNaXO++++++,,,,,,.,-/.,0/-0/-1-*1-*1-*1-*2-)2-)2-)2-*2,,1++1++0**0**1++1++2,,0**0**0**0**0**0**0**0**2,,2,,2,,1++1++0**0**0**2,,2,,2,,2,,2,,2,,2,,2,,3/,30+30+30+30+30+30+30+41,41,52-63.63.74/85085092,:3+;4,<5->5.>5.>5.>5,B8/B8.E8/E8/G:1I=1J>2I?3FC4FC4JB5OA4TA2\@2b>0j<-q<.w9*}8)…8(Œ:,•=/›B4¤B5˛F:ēE;ÁF>ĘG?ÔG@ŪFAįCAîB@í;;ë;;į>;ßB;ŅD:ŋD4¯@-¤>(ĻA-ĻA-Ĩ@,Ĩ@.Ĩ@.¤?-¤?-¤>/ĸ>.Ÿ@.œ?.˜?-•>+‘?*>)>+>->->-Œ=,Œ=.‹<-‹<-Š=-Š=-ˆ<.ˆ<.ˆ<.ˆ/ˆ>1‹?1‘D2–C1ĸB4­C6ēC;ÁD>ÁD>ģEAšPL˛[TĨe\‘f]u_T[UIGMACI?<92?82>71;6094.74-63.43.43.34.24/13./4..3-.3-.3--3/-3/-3/-3/.3/.3/02/02///-00.22022010.0/-0/-3/,8,,;,)C0*K70S<6^IHtbn‡z”ŠļŒÆ„ˆĪz€ĖrxÆikļWWŸID„E=nG^CAY@CV@DP>EKGQRKWUQ^WU`XS_UR^TT^SY_S^[LaZJaZJ,-/,-/,-/,.-------.-+.-+/.,/.,1-*0,)0,)0,)/+(/+(/+*/+*/+*/+*/+*/+*/+*0,+/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*0,+0,+1-,1-,2.-1-,1-,1-,1-,1-,1-,1-,1-,0,)1-*2.+3/,3/,3/,3/,3/,3/,3/,3/,3/,40-51.62/74/80-92,:3-;4.=4/>5.>5.>5.?4.?5,B5-C6.D7/F90G:1F<2G?4H@5J@6P?5T>3X<1^90b6+m9.t8-|8+ƒ9,;/“=0˜?1ž>0§A3­A4ĩC8žE:ĘG=ÔG>ŪE?åC@č@?ęBAæDAÚE>ČD8ˇB1ĒA.ĸB,ĸA.Ą@-ĸ?,ĸ>.Ą=-Ą=-ĸ>. ?/œ<,š=,˜<-•>-“=,=+Ž=*Œ>*‹<+‹<+Š=-‰<,‰<,‰<,ˆ:-‡;-‰=/†3ˆ@2‰A5‹A4‘E5—D4ŖE9ąI>ēG@ģD>ģEA¸MG´ZR¯f_Ŗqf‘sh~rdjj^V^SIQFLLBJF=B>5<8/95,74+63,33+43.34.14-14-02-/1,,1+,1+-2.-2.-2.-2./1./1./1./1.02/02/11/11/11/11/11/40/4+0;/3A32C4/J;6]OOymy‹…Ÿ“ģ”–ΐ•Ųƒ‰ĶtzÆjnˇ_b§Z[”LItHBdA>]>>X?BUAIVLU\U`bbqnn}xv†|rulyoguh_k_W_P]\Hb\Fc]G,-/,-/,-/,-/------.,-.-+/.,.-+0,)0,)/+(/+(/+(/+(.*).*).*).*)/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*/+*0,+0,+0,+1-,1-,1-,1-,1-,1-,1-,1-,1-,1-,0,+0,)1-*2.+3/,3/,2.+2.+2.+2.+2.+2.+3/,40-51.62/80.91.:2/;4.=4/>50>50=4-?4.?4.A4.B5-C6.E80G:2H;3H>5H>5L=6O>6Q=4V;2Z90_7/h70p7.w7-9-‰9.<1–<1›=1ĸ@3§A3ŦB5´D8žE:ÉF<ÔE=ÛD=ßD@āE@ŪFAÔG>ÄF8˛C2ĨB-žB-ŸC.žB-Ÿ@.ž?-ž?-ž?-ž>.ž>.š=,™>,–=-”=,=+>+Œ>*Œ=,‹<+Š=+‰<,‰<,‰<,‡;+‡;-…<-†2†@6‡A7ˆB6“G9—E7ŖG<¯J@¸IB¸GAˇLFŗTNąd\ĒqfŸ~oo|mmseZfZNXMLNAKI=EC7@=4=:188.44,11)23-23-03,/2+/1,.0+.0+.0+/1.-2./1./1./1./1./1./1.02/02/11/11/11/11/11/2015+49-7<23?53H?:^VTxr|Šˆž““š”—ʐ–Ô„‹ĪyÂqy¸kt­hnž\_€XZqSUjRWjT^hZgmfvvr‚tˆ~’‡ƒ•‰~ށv†yr€qfteZeT[ZE`Z@b\D,-/,-/,-/,-/,-/,.-------.-+.-+.-+-,*/+(.*'.*'.*',+),*+,*+,*++)*+)*+)*+)*-+,-+,-+,-+,-+,-+,-+,-+,,*+,*+-+,-+,-+,.,-.,-.,-.,-.,-.,-/-./-./-./-./.,0,+0,+1-,2.-2.-2.-2.-1-,1-,1-,1-,1-,2.-3/.40/51.80.91.:2/;30=31=4/=4/=4/?40?4.A4.A4.C60D71F93G:4H;5J;6K<7N=6P;6S:5V72[6.c60k6.t5,}7/‡9/;0”<0–<1?3 @4ĸ@3¨@3ąC6ēD8ÅE:ÍD:ÕF@×H@ÔIBĖI?žE:ŽC3ĄB.œA.B/œA.œ?.›>-›>-›>-›>/›?0˜<-–=-”<.“=.>-Œ=,‹<+Š=+‰<*‰<*‰<,‡;+‡;-…<-„:-ƒ;-„<0‚<0‚<2‚>3ƒ?4…A8‡C:ˆD9”J=—H; H>ŦKD˛KFŗLG˛SMŽ`V­sgρqŒz‘Ž{‚‰ws€ocqbXcUNRDMN@HI;DD8@@49;.46+/1&01)01)/0*/0*./*./*//-//-//-.0-//-//-//-//-//-//-00.00.00.00.00.00.00.1/26+97+98/4;63HE>_^Yzz|‹š”ą’—ŋ•Į„ŽÃ}‰ģ{‰ļ|‹˛}ŒĢ}ˆšwƒq~‡n}‚n~~o‚~yŽ…ƒ™‹Ą”‘¨˜Ĩ”ˆŠƒ–ƒ|{j{i\hTXX@]Y<_[@-.0-.0-.0-.0-.0-.0.......-+.-+-,*-,*.*'.*'.*'.*),*++)*+)*+)*+)**()*()*(),*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+-+,-+,-+,-+,.,-.,-.,-.,-/-./-./-./+*0,+1-,1-,1-,1-,0,+0,+0,+0,+0,+0,+1-,2.-3/.40/91/:20;31<41=31=31=31=4/>3/>3/@2/@3-A4.C60D71E82F93H94I:5J;6L:6N94Q83T50^72e60o6/x8/‚90Š:/<1”>1™?4›?4›?2Ÿ?1ĨA2ŽB5¸D7ŋE:ĮG>ËH@ĘJAÃI>ļF:ĒB5žA0™@.™A-™A-˜?-—>,—>,™>,™=.—>.•<,”=,“=.=-Ž=,Š=+Š=-‰<,ˆ;)ˆ;)‡;+‡;+„;,„;,ƒ;-€;,;/€<1€<1>5ƒ@7ƒC:‡D<ˆE<”L@–H<žG>§JCŽLIŽQL­]VĒj^§€oĄyšš‚›ƒ†•€z‹xm{jbm]SZJQUFKO@EI:@D6;=057,13(01)/0(./).-(.-).-)/.,0/-/.,/.,/.,/.,/.,..,/.,..,0/-//-0/-//-//-//-//-2-17,:6*83-1961HJ?bfX{€z‹““Ŗ–°Œ•ļƒ˛¯…™˛¤ļ’¨ŗ“¨Ģ¤ŖŒ ž‡ž˜‚™}˜‰œ‹ˆŖ”°š˜ą›”­—‹Ŗ…›„’|k|iXfOSV;ZV9^Z=+/2+/2+/2+/2-.0-.0......------.-+-,*-,*,+),+),+),*+,*+,*++)*+)**()*()*(),*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*+,*++)*+)*+)*,*+-+,-+,.,-.,-/-./-./-./+*0,+0,+0,+0,+0,+/+*.*)/+*/+*/+*/+*0,+1-,3/.40/901:20;31<42=32=31<20<20=20=2.?1.?1.@2/A30B5/C60D63C84D95E:6G96H94K84N50X72_60i70r7/}:1†<1Œ>2>2—@6—?5—?5—?3œ@3ŖC5ĢC6ŗE8ēE;ŊG=žH>šG=°D8ĻA5›?0—@/—@-—@-–?.•>-”=,•<,–=/–=/•<.“;-’0->0-?1.@2/A4.?4.@51@72@93A:4B94C84F74H5/Q51X5/a6/l8-u9.€0‹=1“?5•>5“?5“?4•B4šB4 C4ĨD4ŦB5°D8´E:ąE;ĒB7Ą?4š>1–>0•?.”?+“=,“=,“<+“<+”<.”<.“;-’<-<.;-Š;,‰<,‡;+‡;+†:*†:*…9)ƒ:)ƒ:+9*9-9-€<1<3?6€A8‚C<…F?ˆIBŠICŽJAG>—HCŸNJ§VR§`ZŠpe¤ƒrœ”}–Ąƒ¨Šˆ§ˆƒ „~–~yˆup{jdp\]iSR^JJS@BK:>E5:@29<134,22*1.)/,'/))0**1++2,,1++1++1++1++1++0,+0,+0,+1-,1-,1-,1-,/.,/.,/.,2,.8*75(13+(56&EK1\gGu‚d†“yޛБž”Ÿš‹ž˜Ĩ——´žĸÅĨŠÎ­ĨÉ­Ļʰ§Ëą¤ČŦ—žŸ‹ŗ‘ˆ°˛Ž˛Ž˛ŦŠ„Ą‚€™{wŽrdx]Q_ENR7QQ5SR6,03,03,03,03./1./1./1./1/////////////.,/.,.-+.-+/-..,-.,--+,,*++)*+)**()+)*+)*+)*+)*+)*+)*+)*+)*+)*+)*+)**()*()*())'()'(+)*+)*,*+-+,.,-.,-/-./-./+*/+*/+*/+*/+*.*)-)(,('0,+0,+0,+0,+1-,2.-40/40/:12;23;23<34=32<21<21;10<1/<1/>0/=/.>0->0-?1.>3/=60;60;83<94=:5>93@72C60G4.O4+Y4+d5+n8,x:-;.…;.<4‘<5>3@3A2“B1—A2™@0 >1Ļ@4ĒB7ĒB9Ĩ@6Ÿ>5—=2•?2’?-’?-‘>,=+‘;*‘;*’<-’<-‘;.‘;.Ž;-;-Š;.ˆ:-†:,„;,…9)…9)ƒ:)‚9(‚9*9*~8,~8,€<1€=4€@7B9„E>…IAˆKFŒMFŒIAŽH@˜JFĄSO¨]XŠhbŠ{n¤Žy™œ’§†‰Ŧ‹‚Ēˆ€Ą„™€~‹wxnjxadr[ZhQQ]IITCCL;>D60-?1.=2.=4-=6.;819919:29:2;81?6/C2+J1,T2)^3*g7+o9-u=.z2ĸB6ĄC7žB7™?4–>2”>1”>/“=.=-<,Ž=,Œ=,Œ=.>/Ž<.Ž<.‹2>5€@6‚C:ƒG=…JB‡NE‹OGŒICŽID“PJ˜\Tžg`uiž‡už˜€”Ą…Ē‰‰Ŧ‹ƒ¨‡€Ą„~›zytˆoi}bby]\pUUgOO\HGRAAH8=A388.85.7/,3+)2()2()3)*4*+0*,/+*0*,0**0*,0*,2),2),3*-1+-1+-1+-0,-0,-0,-1+/4)/4*+4-%46!?F%T`8m|Qg‰™tžzĄ~ˆĄzЧ{‘ļ‚›ÄˆŸËŸÉ™žĮÆš˜Á•ŒˇŠ‚­€…Ž‚Œĩ‰„̉ޅ‰Š‚~œxvolƒfZnSJZ?GM3FJ1DF./0+.0+/0+01,01,01,12-21-32.43/43/62/51.41,3/,4/,50-50-4/,3.+2,,1-,0,+0,+.,-.,---/--/,,.++-*).))+.)/.)-/(/.)-/)-.)-.*+.*+/+*/+*-,*.-)--+-.)./*./*------.,-/-./.,0/-2.+2.+2-*4,)5-*6.+8/*:1,:1*;2+=4-=4->50>50>50=4/<3.;2-=2.<1-<1/;0.=/.>0/>0/@1.A0)@2);4*77-39-28.56.:3-?-)F*'L)'S*&Z/(`5,d<0k@0yA0@/†A1‹B3@3“=0“;/’8-“;/“=.”A1•B2”C2’A0‘>.‘;,—;0—:2’;1Œ=0ˆ?0„?/‚?.ƒ>.ˆ@1ˆ?0Š>1Š<0‰;/ˆ:.†:-ƒ;-{9+~@3w<.q7)w>-w>-v;-}?2{;/‚@4‡E9‰I?ˆLA†MB„PC‡NE‘KI—SP”bY‘paŒ}j‰‰q‰–|Šž‚¤‡Ļ‰Ž§Š§Œ‡¤ˆ~Ÿ‚uš{o—uiib„_[zXZsUZnSWeNPWEJK=C?6@93;0.6**3')3'+3'+1&*,*-)+***,*(),'+.(,1(-2'-3(.3(.3(02(00)10)1/*1/*0/)-1++0-(//#5,>5,>5.>5.>5.=4-<3.<3.=2.<1-;0.;0.=/.=/.>0/@1.C0*C0)A2+>4+:6-95,:3-<1-?-+D*)I*(N+'T/)Z5-_:1e>/pA/xA-€A0ˆ@2?4‘=3“:2“;19.‹.Œ@0A1A1ŽA/‘?1•;2•;2<2‹=0†>0ƒ@/?/‚?.…@1†>/‰=0ˆ<.‡;.„;,‚:,€;,x8,x<1s9-n9+s>.s>.r8*u:,}=1ƒA5‰E:‹I=‰K@†NA„PC‡NE‘JH—SR’f]Œwf„†p€“wž„Ĩ†ˆ§ˆ§Š§§Š¤‰Ÿƒwœ}o˜ve’i`‹`Y‚ZY{X\wXZnSSaJNUCFH;C@7<737/-3*+2)*1(+.(*,*+**,+),+),-(,/)-2(02(02(02(02(10)1/*1-*3-*3-*12-12.-0,)--%8:,SXBox]€‹i‡–o†™l†žnˆŖp†¤p„ĨpŠ­w“š‡–ļ„“ŗŒŽ{†Ģx‚¨w‚¨yƒ¨|ƒĻ|‚¤{x’uqˆnh{eYjWMZHEL<@D5;=/12,12,12,12,23-23-43.43.54/54/85085085074/72.61-80-80-7/,6.+4/,3.+2,,1-,1-./-.0.1/-0--/,,.+*/+)./(/1'//)-/)-/)-/)-.*+.*+0,+0,+/.*/.*/.)0/*0/*0/+//-///0./0./0/-/.,1-*2-*6.+70*90+:1*<1+=3*>4+?5,?6-?6-@7.@7.?6/>5.=4-=4-=2.<1-;0.;0.;0.;0.<1/?1.C2+E0+H/+K--L,/K+.I*/E+.A-,@.*A.(E.(M.)X1*b3-g5,j:,o;-w;0=4‡<6Œ<5:4:4Š<2‡=2†>2…?3†A2‰A3ŒB5C5Ž?2=/Œ>1Š>.‡>/…>,†=.ˆ<,‰;.‰<,ˆ:-†:*ƒ;,<)~=+{<+}=1z<1v:/u;/x@1x@1v<.v;-?5‚B8‰F=‹H?‰JA‡KA‡NCŠNF‘JH˜TQ–f\ve‡…n‚‘t{¤ƒ…¨‡ˆĒ‰ĒŒŠŒŽĨ‰ˆŸƒš}y˜xi–ma’e\‹a\†`]‚`[|]UrVPhPFYEBP?:D93:2.3,*/)*,)**(0'(1&*1&*1&*0'*1(+0*.0+//*.-+.,+0+,0)-0(-1(-1)-01/23/..*'**"57*PUAmv[|Ši€k~“j™jƒŸn€ n~ m€Ĩq‡Ŧx¯|‹­zˆĒx„Šv§v§uĻwĻy¤y€ĸ}}›yw‘tp‡mh|cYkUMZHDH9=?299-23-23-34.34.34.45/54/54/650761961:72:72961940940:2/91.91.80-50-4/,4..4..3/03/01/01/20.1..0--/-+.0)02).0*.0*.0*.0*,/+,/+*1-,1-,0/+0/+10+10+10+10,11/1111/010.10.2.+3.+3.*92,92,;2+<3,>4+@6-@6-A7.B8/A8/B90A8/A81@70>5.>5.=2.=2.<1/;0.;0.<1/=20=2.B3.E2.L..R+0V'/U&.P'/I).C/.<1+;2)?2)G0(R/)_.*d/)i9/k;/u<3}<6…;8‰;9Š;7ˆ:6‰>8†@8†B9…B9…C7†B7‡A7‰A5ˆ@1ˆA/‡@.‡@.‡>-ˆ<,ˆ;+‰:+Š8*ˆ9*‡:*ƒ:)<){=(x>(x>*‚>1{7.z7.z<1v;-w=/|A3{@2€B7ƒE:†H=ˆJ?†J@‡MBˆODŠQHŒSJŽ\QŽh[‹tb…g€‹m~–vž|ƒ§ƒ„Ї‡Ē‰‹ĒЋχ‡ ‚ƒš~}˜yq•oi”ifgfŒeg‹gd†e_~_Zw[PhPK^JBP?8D62:/.4*,/(+*%2&&5%(4%(2&(1'(/)+/+,.,-+++*+-*+-(,-(,/',/',/*+-.*+1++0+'.+"88,PUAiqYv„c{Œhyh|–iœl}Ÿmyžkz mĨr‚§t€Ĩq}Ŗp}Ŗp}Ĩs~Ĩv~Ĩx}¤x|Ąx}Ÿzz™wuqn‡je|bWkRN[GDF9?=1:8,45/45/45/560560560761761872872;83<94<94<94<73<73<41<41;30;3083072/61.61.5106216213122011/00./1-.2,04+.4+.4+.2,.2,,2,,2,,3/.3/,3/,3/,21,21,32-32.32032032032051051.61.61-;4.<5/=4-?6-A7.B8/E8/C9/D:1D:1E;2D:1C90B8/@5/@5/>3/>3/=2.=2.=20=20>31>31@51E31M02T,4X)3W(2R)1K,1B30:6-77+:6*B4)M2)X/)^/)f:1j;3s<7z=:‚<:†<;‡;;†::‚;7>8A8B9ƒC:ƒC:…@9„@7‚C2‚C1ƒB0„?/†=.ˆ<.‰:-‹9-‰7+‡8+…9+‚:+~=+x>*v?*x>*9-|/'‚8/„>4w4+s5*}A6}C7E:€G<‚I>ƒJ?„KB†MD‡QG…WJ|aNzjQ€pYu]‚|bƒ†i†“uˆ|ƒŖ~§‚‚Ē…‚Ŧ†Š„Ĩ€{ž}z™wz’pzlxlwŒkumr‰lm„gkd`rX[iRR[HHL=@@4;7,70&5*$6('5''3''1'&.)&+*(++)+-*',('+*)+*)+***,+),+),-)*,#$2*'50*86*BC5UZFfpWn}^tˆeqŠbuex˜iw›ks™htšiwŸkzĸnx lwŸmx nyŖs{Ĩu{Ĩw|Ŗwyžuzœww–tsŽom†hd{_WkPN[GCC7>:195,560560671671782782872872983:94=:5>;6>;6>;6>95>95?74?74>63=52;63:5294194184184395484373243151240/6-06-.6-06-.4..4..4..4/,40-40-40-51.32-32-43.43.43/431542540841850940:5/=60>7/@7.A8/C90D:0G:1H;2F<3F<3F<3F<3E;2C90B71A60@51@51?40>3/>31?42@53?53@72C52I35P16T/6S.5P05J22C52=90<:-=:+C7)I6(Q3)W2)]2+d3,l50v64}77‚87ƒ77‚66~75}:4}<6}>5€?9ƒ@8†?9…A8€B3€C1B1ƒ@0…=/‡;.ˆ:.‡9-…9,ƒ9,‚:,<,|=,y>,x?,|=,‡5*‹2,ĄLE§XQ‹A8|90‚F;€K=yH:zJ<{M>|N?}OBQE‡UJ‚_LrkOosR|uX‡w]yb˜iŸ‹s ”z––z|‹Ŗˆ¨…§‚€¤~{Ÿy~™vƒ‘p…ŽoƒŽp€pp{ŽpwŒms‡kj~bfv\_hSV[GOM>GA3@6*=0';,'9+(6+'3+(/,',-'+.').().(+-(-,*/+*3)*4(*7'*7'(3($<3,E>4IG8QR@]bKgqVjyZn‚]k„\l‰]p‘bq•eo•do—eršfuŸmrœjq›itžnxĸrz¤vyĸvyŸvvštw™vu”rokj…fc|^UlON\ECC7@91;4,671782782782893893983:94:94;:5>;6?<7?<7?<7@;7@;7B:7B:7A96@85=84=84<73<73<73<74<74<74;639529338308/09/.8/080.80.80.61.61-61-61-52-52-63.63.74/74/540540841952:63<94=84@93@70A8/C90D:0G:1H<0I=1I=1J=4J=4J=4I<3F<3D:1B8/A7.A81@70@72?61?61@72@72A83?74@85B86D97G96H96H96H94E80E8/E9-E9+G9,I9*K9+Q7*Z/&d/'n3-z63ƒ98‰;9‹;:‹=;‹A>‡@:‚=6<3:3‚<4ˆ=7‰@7ƒA5B3‚@2ƒ?2ƒ=1„<0;/€/|>/}>/=/†9/1+ĸ<8ÍlfŲ~y­ZTŒC<ˆLAN@tJ(+C&+E$+C&(F5-LC4VQ>[YD`bJgmQiwVj{Wl‚[g‚Wf†WlŽ\o”an”an–bršfsko›jo™irœnw tyĸxxžwu›vs—su—vs’rn‹li„cb{[TmMM]CGH:E<5@707827828938938939:4:94:94;:5<;6?<7@=8@=8@=8A<8A<8C;8C;8C;8B:7?:6>95>95=84>95>95>95>95=85<73:51;30:0.:0.91.91.91/91.91.72.61-61-63.63.63.74/74/74/540651952;83<94?:4B;5B;3A8/B:/C9/E;/H<0I=1J>2J>2K>5K>5J=4J=4F<3E;2C90B8/B92B92A83@72@72A83B94A:4?82@93B;5D=7F=6G<6K<5N;4M6.N6,Q6+Q6+Q7*P9+P9)V6'f6*r6,~;3‰@9•D@›HDŸJGŸLF QJ™LDŽD;…;0„7-…7-Œ91=4ˆ>5‡>7†=6…<5…<5=4}=3z>3x@3vA3x@3z>3<3ƒ:3ˆ73‘31˜(&ŗ=;ė|zũ•’Åhc–G@‰K@xH:nMhV>lX@t[E`L€hPysQ„wUžt\´l^É__ĶV\ŲQ[×T\äouŲzxˆ|Ā~ĩ•€Ģ•}Ŗ’xŸvœŠrœŠt™u•u‘‘u‹’s†‘s‚‘r|‹ny†ju{amoWgbN_TBUE5R/(9/&7.'6/'81):/)=.+A,+F)+H(+K'+H)'TB4YQ9B?:D?;D?;E@8E>8D=7B;5B;5B;5B;5B:7B;5A:4A:4A83A83A83@72@64>71>71>71<71<71;60:5/85.85.74/74/961961961:70<71=82A:2B;1C:1D<1F<2J>2K?3L@2N@3N@5N@7N@7L?6K>5I<3H;2E;2E;2B90A8/@91?80?80?80@93@93<5/MD=M@:K:3T@9R62O0+a<6\3-`5.`4+^/'^/%f6,m=1q=0‰I=G;—I?ŸKAŸF>›>7š=6žD;ĻND¤PE¨VJĢYKĨOB™A5—;0›>6“98‘98Œ65†52†84„?8|@6r>1rB4oA2q=0v:0‚72Œ43’-1š',ČHIčbaÅEDÍWUáyvĢVO†F<„VFmR=i[AibFjeHj`En^D|dLjT’bL˛m]ŅnhÛX]ā;Lį-Eō+Hõ0Lö@YėI\ä[eånrâ{|ۀ}ۃ؉‚ÃvŊwē„xļ†x˛ˆx­Šw¨‹yĨŒxš€o™~m˜xi“oabY„UM{IBxA>u:9:49:49:49:4:;5;<6>=8?>9>=8>=8A>9A>9B?:C@;D?;D?;FA=E@8E>8E>8E>8E>8D=5C<6C<4D;4C:1B92B92B92B92A83A83@93@93>71<71;60;6096/85.74/74/96196/96/:70<71>:1A:0B<0C;0E;/I=1J>0L@2L@2N@3N@3N@5N@7M?6J=4I<3H;2E;2E;2C:1B90@91@91@91@91A:4B92D93I81L/+V.,j76u99{;;…ECƒD?„H@…IA†G>ŽIB™NHĄPLĸOG“D7”B4šB6ŸC8 >3œ7-œ7-Ÿ=0ŖC5›?0™@0 E3¤G6§F6ŽH:ļNE´LM¯HLĨ@D™9;‘98>:ƒ@8x>3o>0zI;…LA„?8„,+’).ŗ9DŌLWÜKNßMMĘ>=Ā@?Đ`\ŗYQ„@5‚TDyaIe[@^]?ihIslOvgJ~dK–cNŧdXÖ_[æUZëANō,Eū%D˙&H˙'I˙.Nų3Nō6UE8[O5cZ9gaAifEnrOz‚]z‰bt†^r‰_p‰_p‹`qŽ`u’dw”dw”dw”fs’ix–rz—xy–x~˜}ƒ„…‡ƒ›…™ƒz’zr‰om„hhd`y[TmMNaERSAVPBUOC8938938939:4;<6<=7?>9@?:@?:@?:C@;C@;C@;C@;D?;D?;FA;FA;FA;E@:E@:E@:G@8F?7JA:I@9H?8G>5F=6E<3F<3E;1D:1D:1D:1D:1D;4D;4D;4C<4?80?80<71;60:5/:5/94.94.96/96/:5/;7.>7/@9/B90C;0E;1F<0I=1K?1M?2M@0NA1M@0P?5M?4L>3K=2I<3H;2E;1D:0C:1C:1A:0A:0?;2@<3@<3D;4UD—I?–LAœNBŦRJžURĖOSÄLKĨ@4B0 @0Ĩ?1Ĩ;.Ŗ7+¤8+§=/ĢE6Ą>+˜7$:'Ĩ>-ŦA/˛C2ļD:§02¯:BšDLŊLRēMR­KL–A>‚71{8/v6,x2*„1-œ37š=GÕGWčM[âFIĪ53Đ:9Ŋ31ČNKÆc]”J?Œ[J}cLj_CgdEtoOpQhJhN°hYäbbõQZôDQö7Iũ1J˙2N˙/M˙*H˙2Oü0K÷1Jõ5Lō4Mđ2Kķ3Lķ7Pō@XīC[îF]íIaëNcęQečUhčVkåSjäRiãOiäNiįNlëPoōSsķVuūh…ņa|å[tÕUlÍYlÉdr¨R]r-2^&'Y0,W:4Q?5B:-:8)>B1LN9VO3aV6e_?heDquT†e~ŒiwˆdxŒiu‹er‹dr‹cvŒeyhzizj€•v„›~Šž… Š’Ŗ—¨–˜Š™–Ļ™‘ĸ’‡˜†zypƒmg~b^wYTmMPcGSXDXUDYVG7827828939:4;<6=>8@?:A@;BA5G=3F<2E;1D:0D:0E;1E;2D;2E<3E<5E<5@91?80=82<71;60:5/:5/:5/96/96-;7.;7,?8.@:.C;0D0K?/M@0M@0M@/M@0O?2O>4L>3K=2J<3G:1E;1D:0D;2D;2B;1@<1@<3A=4B>5F<3S81[*&‰:?žT`ŲTeæUfãUcËJOŸ30–:/‘>0™A3ŽF=ÅIGÕBHÍ>@ąB7§F5ŠB3Ŧ@3¯?3°>3ŗB4´D6˛G5ŠB/Ŗ<)¤;(Š<(Ģ:(Ž6&­3(ļ97ē9=Ŋ7>ŧ7<ŋ^õ@aøCfö@fõ?eõ?gø?hüCm˙Er˙Is˙Ou˙QuūUvōSqįTnåaxÖfvˇWb}15j0/X1*P8,G>/>A.;D/?G/PK._T8g`CokN||`ˆŽr‡‘v}‹qzq|s|szozŠm}Œoƒ’uˆ—z•ŖŠœŠ•ŖŽĻąĄŦ´§ąšŽ°ˇ°Ģĩ­ĄĢĸ” ”ƒ‘‚s„qh|c]tXSlNPdHRZCWYDYZH671671782893:;5<=7?>9@?:BA/K?1M@0M@0NA0O?/O?0O?2N=3N=3J<1I;0G;/D:0D:0D<1D<1B;1@<1A=2A?3B?6K=4\5.w32­LSÛ]iæM_å@Q×6Eˇ&+¨1)7(’:&—<)Ŧ@3ÃD=Ô>?Í;;ą?5¨B4Ē@2­?2˛@5¸C9ŧH;ģJ<Ŧ>/Ē?/¨=+Ļ;)Ē9)°:,ˇ;/ŧ<1ĘFAÎDAĐ>?Đ79Ö7<ŪBEâLNŨROÄC>ÆKCÍTLÔSMŲKJÛ?Bā5>á27Û4.Ú7.Đ1+Ī:4ŋ84ŗ@9ĩ[P–UC{N9‚bI†kP„`F’[F­fTËrdįmhęEKō:Dę9Cį=8@?:@?:C@;DAGB>GD=GD=HC=ID>IE2I=1G=1G=1F<0F<0E;1E;1D;2C:1A:0A:0@91@91=82<71;60;60;7.;7.;7,<8-?9-A;/D0L?/M@0NA0NA0O?/O?/O?2N=3M<2L;1I;0G;/F90C9/C;0B<0B;1@<1@>2A?3B?6N;4m84—FEÄY_ÛWbßCQŪ8FÔ3;Ŋ++­1'Ą8%˜:!—9 ¤;&ļ>.Ã:2ž71§7,ĸ:-Ĩ9-§7,¯:1¸B8ēE;ˇE:Ž>2­?0§<,¤6'Ē6)ļ>0ÃD;ĘG=ž8-Î@6áD?ėBBô=Aķ9>ë27Ū.0Û75âGBčSLåNGÜ=9Ų10ã/2ę67Ų1(ŪŌA>ŌGBŨOMëWWíNRīDMđ:Gö5F÷2Fø.Dû1Gū7Nū8Sũ8Tũ8Vū9W˙;\˙>a˙Ae˙Ckū;eũjũ?mú>nø>oô=mö:j˙Hr˙;a˙?d˙Kn˙Kn÷NmīUoãZnčr‚Âaj˜ILt:8\6-P9+PC2UM:^QAreUˆ|n•‚Ÿ‘ϧŸĄĻŸ–œ˜•ž›ž§¤Ļ¯ŦĻŦ¨ĸ§ŖĻ¨Ŗĩ´°ÂÁŧĖÉĀŅÎÅÕĐĖÕĐÍÔÎÎÕĪŅŅËĪËÆĘŋŊ°˛¯˜Ÿ˜€Œ~m~k`t[WnRVjNS`FV`EX`H560560560560671893:94;:5=<7>=8A>9C@;DAHC?HC?GD=HE>ID>ID>JF=JF=MF2@@4P91r1/¨JKÁSVģ>DŊ06Â03Á//ē1)Š1!Ŗ9#œ=!™;›< Ą=#Ĩ;%¤6%ž6) 8-ĸ6,Ĩ4,­81ˇ@:¸C<˛@6ąB7­A4¨-Ī>-Ų5+á*&í"%ú%+˙*1˙.4í)*į.+á3,ß4,ā3,ã2,é0-į2+Ú2%Ö6&Đ2&Ī7,Å6.Ŋ>7Č`UŌqĻeSVBŠM:ŖWIČf[ßd_įRTčCIõFMí@Dß??Ô@<É@8Æ@7ŅFAãMLīJNô@Kų9Hũ7Hü5Hø3E÷6Gú;Mú8Pü7Rû6Rũ6U˙6X˙9]˙;a˙k˙?m˙@q˙Bt˙BuūBuüBtųBp˙FmúAaūEe˙KjūKk˙Vt˙_zõ]tōj~æp~ĶowŽ^aƒCAg6/hB7sUJye\Œ}vŖ–­ŖĄ˛ŽĢļļļ˛ļšĒ¯ŗ°ˇŊļŊÅŊÁĘĀÃĘÃÂĘÉÆÍÕÎÖŨ×ÛâÚØįŨÛéŨŨæÚÜåØßä×āāÔŪŲĪØĘÅËēēēĸ§Ŗˆ’‡t‚qexb\sW[oS[jM\iK]gL561561561560561671872983<;6=<7@=8B?:DAHE>HE>HE2G=1E=2D;2C:1C:3A:2A:4@93?74<73<71>7/>7/<8/=90>:1A:2C<2D=3H@5I?3L@2MA1NA0P@0O@-O@-L?/L>1M=0L;1J91I81E80C90@9/>:/;;/<<0=>0>?1A?0S8-‡<7Ä\[ĘZYŽ86Ģ.*˛1+Ž.%­2#Ŧ9&ŦB*ĒF,ĻD'ŖA&ŖA&ĸ<#Ÿ9# 9*Ŗ;0Ļ:0Ļ7.­<4ļC<ˇE;°@5Ģ=0¨Dá;=Ö<<Í@9Á>4ļ8,š6.Ä94âHHé@Eđ;Dö:Hú:Iø8G÷;Iû?NūAU˙?Vūi˙>l˙>o˙>pũ>qú@rø@t÷Aq÷Cj˙Mm˙Ss÷Jhë@`ũTs˙g…˙e‚÷]wī_xįh{Üp}Æqx§gg^X{ZQ—~wĒ™’ž°­ÄŧēÆÂÃČĮĖĮĮĪÃÃĪËĘØĖĘØŅĘÚ×ÎßßÔäæÛéęāëíãëīåæōčæôččđäæîáčíāéęŨįäØâŅĘŅÁŋÂĢĢŠ‘–z†xl{hbu_`rXbpVboScmT21/320431651875984984984;:5<;6==5??7AA9CC9EE;EE;HH@HH>HHLC4J@4KA5MC9LB8F=4B90E<5C:5@93?74@85?75<74<42C:5B94A96>95?:7>:7?;8@<9B?:D@7G@6J@4L@0O@-O@+L?,G@.F?/I;0K81M53K65J88F;9B?:6904,Ģ=,­<,ŗ=/ŊC4ÄF8Ā>1ē2&Į9+Ė8*Đ8+Ö8-Û7-â5.é3/î1-ņ.,ô.-ķ0,ņ1,ę5*ã7)Ũ:)Û:(Ü9&Ô3Đ3 Ī8'Æ7'ž6(ÂB5ĪSIČNCĪSKá\Wî]ZđPRí>Cō9?÷?GęAFßCDÕAAČ?9ģ<3ą;/°HH>HH9H?:F=8B;5D:8A96?74?74@85@85=85;62=4/=4/=52<74=96>:9=<:>=9B?:D?9G@6J@4M@0O@-P?+L@*B?,B?.F<0H:1J65I56F35@65@<9:=6;>5@@4E<-J9)^B4€L>ŽQBĢ;- 2#Ą6&Ŗ:'ž7$ž9%Ŗ>*Ą;%§<(Ž?+ŗ@-ļ=,ˇ9*¸6(ĩ7)Ē9)Ĩ:*¤9)Ĩ;+¨>.ĢA1ĢB/Ģ@.Ž?,Ģ:(ą<+ŋE6ÆH9Á?1ŧ8+Ā6)Ë7+Ī7,Đ9.Ņ;-Ô8ˇ;1Ž:-Ē<-Ģ=.ļE5ÆL?ÔNEÜGCã?>ī?Bú?Fū@JøCJ÷CLúDP˙FTũBSų>Sü>X˙Ba˙Fh˙Ciü?ių@jųBpüFvūJz˙K{˙Jz˙HtõKpņQsõ\zų_{ûXwüNqũEkúDlīEiÚKgČ_pąnukLI~t°–‰Ė˛ĨäĶÉėãÜëįæęéîęįōíâķöãųûáú˙âũ˙į˙˙ė˙˙ōū˙öū˙ųûūú÷ũúõü÷ôúõōøīđôëîņčíīæëæŨāÜÖØĘÆÅŗ˛ŽžĄšŽ“Œ‰…ˆƒ•‡‰€†Œ~/.,0/-10.21/43/540762761:94::2<<4>>6@@6BB8CC9DD:IF=IG;JH;LI8MJ7NL7NL7OL9KI:NKBTRS_^fihxmm…lkŠkhƒ`YiYQ\OGRH@KH>GG=EE93>:1=9083-94.;60<92=:3>;4?<5@<3E>4G?4I?3L@0O?0P?/P?-L?,<;&:=(?<+A;-B71A62>42;30=84B;5H94N2.Y,)l/.‡;= FEŖ;0ĸ2$Ÿ1 ¤9'Ĩ<)ž7$ž8"ĸ<&¤;&Ē=)ąA-ļA/š>.ģ<-ž:-ž-­>-­<,˛?-°8(š>.ËL=ËG:ŧ6*ē2&É9.Đ6,Ô6+Ô8,Ö:.Ø:/Ü8.ã6/č3,đ0-ô.+ô.+đ1)į2'Ũ6&Ô8"Ō7!Ũ8$Ü5#Ú9'Ú>/Ķ=.Č6)Å9,ËA7É<5Í>8ŲEAåKIęJJéCCė?AëCCŪCAÕD?ÍB=Â=4ļ:.Ž8*Ģ:*Ŧ;+Ŧ8)ĀD8ÔNEŨIEā@@č>A÷BI˙HPôAGô@IųCOũGTūEUú@Uû?XūA_˙Df˙Ci˙Ck˙Fp˙Iw˙K{˙L|˙Jz˙Fx˙Hw˙KtúNt˙Z|˙a€ũUvņCdûIk˙TvÜ?\ÍI`Ø{…¸||aC;|nŽŽÕŗ§ķÛŅûėåúōđų÷ú÷ôũôėûúë˙˙ę˙˙ė˙˙î˙˙ķ˙˙÷˙˙û˙˙ũü˙ūû˙ũų˙úø˙øö˙õöũķôûđôųđķđįęåßáĶĪΞŊš­Ž¨ĸĨžŖ™Ŗ—ŖĢžžĻ—›Ŗ–/.,/.,0/-10,21-32.54/650880991;;3==5??5AA7BB8CC9HEQPL^]bmlzzz’‚Ą€‚¨€€Ļ{u—rkŠe_{YSmTLdMEZG@PB;2?=1@<1?;/A;-F?/H?.K?/M@/O?0O?/P>0L?/@=*?>,@=.?;/?;2>93=:5:94<94D95M51V-+j)-„28ž8CĢ>CĻ7.Ĩ7(Ĩ:(Ē?-¨?, 9&Ą8#¤;&Ĩ:&Ģ<)ŗ>,š@/Ŋ>/Á=0Å=1Ä>2Ŋ?3ļ=2˛9.Ž8*¯9+°:,˛:,ŗ9*ļ;,š;-ÄB4ËE9Č>3ž1'Ā2(Í9/Ö5+Ø4*Ú6-Û7-Ū7.á6,æ3,ė1*ķ0,ô.+ô/)ī0(ä2&Û4$Ō6 Đ5×2Ú0Ú4$Ü<.Ö=/Đ9.Í=2ŌD:Ä5-Å60Ę;5ØD@âMIåKIŪC?Ö=8Ķ@9ÎA8Į>4žVádtūŸ§ĶŽd92lJ>ĨynĐĨœõÔË˙éã˙ôō˙ũ˙˙ü˙ųķ˙üī˙˙ī˙˙đ˙˙ō˙˙ô˙˙÷˙˙ûũ˙üû˙ũú˙üø˙úø˙ų÷˙ö÷˙õö˙ôøūķ÷öëīėãäÚÕŌÉÆÁēš´ŗ´Ŧą´Š°ļĒļžŗ°¸­Ŧ´Š10,10,0/+0/+10,21,43.54/77/880991;;3==3??5AA7DA8IE:LF:NH:PJ:RK9RM:SL:QK=OJDVTUfdqwx††¨š“ϐƎ‹Ā‡ƒļ{wŠpmšid_[~UPnNJaKGXEBM?=B;7895296/85,85,671783891;;1>5L?6K>5F<3B92=82:946;47<59<5>:1H4-Y2-w78”?DĻ>E§9<Ē;0Ē<+Ģ@.ŦA/Š@-Ĩ<)Ļ;'Ģ>*§8$­:'ĩ<+ŧ=.Á<-Å;.Ę<0Ę=3Å?6ž>3ē:/ˇ7,ˇ7,¸8+ē8+ē8+ģ7+ĮA5ÍC8Å8.Á1&Æ3)Ë7-Ī5+Û4+ß3)á4-â6,ã5,į5+ė1*đ/*õ/,ö/*ō/)ė0'â2#Ų4!Đ5Ī4Ö1Ų/Ø2"Ø6)×9-Ô:0Ö?6ØE=ÖF>Í@7É<5Ë@9ÖKDŲNGŌE>Å;1Å=1Â<0ĀCōBLûIU˙JYũFXúCYûC]û@_ûBd˙El˙Js˙Nz˙O|˙LyūIv˙Jw˙T˙T}ũJqųIm˙St˙VtøNiëD^äF]ęXk˙–ĸ˙ĩŧķžŽHFk.)Ļkc͖ķČÁ˙ãŪ˙ņđ˙üũ˙ũ˙ü÷ūūö˙˙ö˙˙÷˙˙ø˙˙ú˙˙ü˙˙ũũ˙ũú˙üø˙ûø˙ųø˙ø÷˙öø˙õ÷˙ôø˙ôøũņķķéęäÜÚÖŅÍÍĘÃÉÉŋĘĘĀĘÍÂÉĐČžČŋˇÁ¸65143.32.10+10+21,32-43.66.77/880::2<<2>>4@@6B@4JD8ME8OH8RK;TK:TM;SL*F@*G?*H@+IA,IB0IA4HB6HA9G@:K=?ž51§;/Ē<+Ē?-Ē?-Š>,Š>*Ŧ?+°?-Ģ8%˛9(š:+ŋ9-Ã9,Č:.Í:0Ī<4Ë>5Æ;4Â91Á8.Á8.Â9/Â8.Ã6,Å7-ŅC9Đ@7Ã0&Ã,#Đ7/Ö<4Ķ2*ā3,ä2(į2+č3*ę3+í2+đ/*ķ-*ö/*õ.)ņ0)ė1(á4$Ú5"Ņ6 Đ5Ø7#Ų3#Ö3$Õ3&Õ5)Ô8,Ô<1Ö?6ėYQáRJĶHAĖC;ĘE<ĖI?ČE;Ā>1ŧ:*ŧ;(ŧ:*š:)ˇ:(¸:+ŧ>0ŋA3ÁA6Á<3Å<6ĪA=×EEŨGHäIMëLPčBFę@CđCIųKTūNYüJZüF\üF_øA_ųBaũEi˙Jp˙Nw˙Oz˙Nx˙Lv˙Q{˙RyūOvũOt˙Vy˙]{˙SoîD^úTlîQd÷dt˙’ž˙‹•ôƒ‰Į`d§MMĩjgΏŠīŧ¸˙ŪŲ˙īî˙úų˙üūũû˙ũú˙ūû˙˙û˙˙û˙˙ü˙˙ûũ˙ûû˙ûø˙ûø˙üų˙ûú˙ûú˙øú˙öø˙ķ÷ũņķųíīōææįŨÛߨŌÛ×ÎŨÛĪāŪŌßáÖÜãÛĪØĶÅÎÉ<94;8185052+41*41*52+63,74-85.96/;81=:1?<3A>5C?4JB7MC7PG8SJ;WK;UL=UK?SJCSJK]Wcnl‚‚‚Ļ‘•Åš ÚŸĻęĸŠņĄĨīž ë™›å•˜Ũ”•֐‘ʉ‰Ŋ‚ƒązyĄrq‘fc~XVkPN\IGRFCLCBJ??K==G;:@;9:<94?;/C=-E@,F@*FA+EB/EC4CC7BC;AC>@ACBLCANEEOCHNAIL>HI>GDCHAA=2L:.gF7ƒOAI<Ž?2”8)Ĩ>/Š>,Ģ>*Ŧ?+­@,¯@-°?-ą<*ą8'ļ8)Ŋ9*Ã9,Č8-Ė8.Ō91Ô;5Ī:4Í:3Ë81Ë81Ė92Í:2Ė70Ë6/Ķ<5Õ>5Ō91Ė2(Î4*Ø;2Ú<3×3*ä1*é1'ė1*î2)đ1)ō/)ô-(ö,(÷-)ô/)đ1)é3(â5'Ų6%Ō7!Ī7 Ô9%Õ8%Ķ6%Ņ4%Ō4(Ķ7+Ō8.Đ7/ãNGčXPįZSÚQIĖG>ÄD9ŋ@7š>/š<*š<&š<(š:'¸9(ē;*Ā>0ÃA4ÉD;Æ@7É@:ŅFCÕIHÖHGØGJßIKæFHčBDíDIõLSüQZûO]ûL]ûK`öD^÷DaųFfũIl˙Nu˙Ox˙Ox˙Pw÷VxķUvôTvüYx˙]{˙ZwûQkōI`ũWköUgęM^ö^mâKZæTaåTa×XaÁefȃ~å̧˙ÔŅ˙ëč˙ķō˙øų˙ū˙ûü˙ûü˙ûü˙üüūüúũũųúũ÷÷ü÷ô˙ú÷˙ûø˙üû˙ûú˙øø˙ķķũîņúëîđáäéŨŨäŲÕâŲŌæßÕëįÛņíáņņåėķėÛæâÎŲÕ@=6=:3:7074-52+52+52+63,74-74-96/;81=:1?<3@=4B>3JB7MC7RF8VJ:WK;XL?:6@<1A>/C@/CB0BC3BD7?D=>D@CVCIaLRhU\o\br`dobbjd`afXWaJDlG>ƒSE•XF“J7‘@+™>+¨A.Ž@/ŽA-¯@-°A.´A/˛=+°7&ĩ7(ŧ8+Â8+Č8-Í6-Ņ7/Õ81Ø;4Ō72Đ72Đ72Ņ82Ô94Ô94Ķ83Ķ6/ŪA:Õ8/Ņ3*Ö8/Ū=5Ū=5Ú91Ü5,į2)ë0'ī0(ņ0)ô/)÷-)÷,(÷,(÷-)ô/)î2)é4)á5'Ú7&Ô7$Ī8#Î7"Ī8%Î7$Ī6&Đ7)Ō9+Ņ7+Î4*Ë4+ãNGķd\ë`YÕOFÄA7ē;2ĩ9-¸>)¸>'š<&š;%ē9&Ŋ9*Ā2ĘD9ĘA9ÎE?ÕKHĶLIÎGDÍEEÖHGãIIæCDčEHōMSøSZųR\÷O^úOaôH^õG`øGdûIi˙Nr˙Qx˙Ry˙TzđUuīZwų^}ũ^|ųUpõMgųOi˙Yn˙[m˙ctđM^÷TeôO`üUgõL_äR_Ā^_ģvqל˜úÉÅ˙åã˙íë˙ôô˙˙ũü˙˙û˙˙û˙˙û˙ūũũũũüúūųöũøõ˙øõ˙ųö˙úų˙úų˙ööüđđøéėôææëŨŨčÚŲäŲĶčŪÕđčŨųķå˙úėūūōôúöáëęĶŨÜB>5A=4@<3>:1<8/:6-84+73*62)62)73*84+;60>93A<6E>6I@7MC7RF8UI9WJ:XK;ZLA[NHTIMXR`gd|~§’Ę— ãžĒöĨ°˙Ēŗ˙̞˙Ŧ´˙Ŧ˛üĒąųǝķ¨ŦėŠĢ蟡ڙšŌÁątrĄhe’]Z‡XR~XQzYQvVOnMH_C?M?:@?;:B?8>>4@B5BE:?D=:CB>FH?LUDVnQfƒarŽisŽtvx„o€€^lŠ[c’WYžWUĻVMĻM?Ÿ@.œ9$ :$§<(Ŧ=*Ž?,ą@.ŗ@-´?-ļ=,š;,ē6'ž6(Ä6*Ë7-Ņ7-Ö8/Ú91Ú83×84Ø95Ų:6Ø93Ø61Ø61Ú83Ũ:3æC<ā=6Ú70ã@7ū[R˙lc˙]Tį?6å3)í2)ņ2*ô/)ô*&õ(%ø(&ø+(÷-+ķ0,í2+ã1'Ú0#Ô1"Ô4$Ķ:(Ė;&Ę<(Í<)Ī<*Ō:,Ō9+Ō8,Ņ7-Ú@8Ī81ÜGAôc^åXQËB<Å@;ˇ4*ˇ:&ļ<$š<&ē<&Ŋ:(ŋ:+Ä<0Æ>2Į>4ĖC;ŲPJßXRÔOJÃ?:Ā?:ĪHDŪHGâGEæJKīPTņRWīNVíKXņL\ųRføOf÷Ke÷JfüMl˙Qs˙RvũRvôWvîXuõXuû[w˙\x˙Zs˙Wn˙Vk˙buũVg˙\m˙[lņFXôDX˙QeîVeÆfgĒieʏ‹įŌĪ˙ëįũīîüø÷ųũüų˙˙ų˙˙ú˙ūüūũ˙ūü˙ûøūöôūųõ˙û÷˙ųö˙öô˙öö˙õõöč迨ØãÕÔŪĐÍáÖĐņįŪüôįūøč˙üé˙˙ķú˙ųčņđØáāC?6B>3A=4?;2=90;7.:6-95,73*73*73*84+:5/=82@;5D=5H?6LB6QE7TH8VI8WJ9YK>ZMEUJNWQ_eby{¤ŠÉ”â›ĻõŖŽūĢ´˙Ŧĩ˙Žļ˙¯ˇ˙°ˇ˙¯ļü¯´ø¯˛õŠĒëĸŖã˜˜ØŒŠÉ€ģuqŽie c^˜`WŽ`Vˆ]TVPtMIbFCTBAIAAC<<:AB=FEACD?A?@DBEOMRWVdch†quš}ĸ‡}Ÿ’}œ {šĨpФ`uŦYiļVaēQU¸HF°@4Ŧ;)Ŧ<&­='¨8$¨7%Ģ8&Ž9(°8'˛9(ĩ7(¸6(ģ3%Â4(Ę7-Ķ:2Ų<3Ū=5ß<5ß<5á>9ß<7ß<7á>9åB=čC=įB<æA;å@:æB9ä@7Ü8/Õ1(Ø6+ëI>˙[Oņ@6î6,ę+#î)#ø-)˙/-ū,+ö((ú0.õ4/ī61į6.Ū3)Ö2&Ô2%Ī6&Ë:'Č;'Ę<(Í:(Ī9*Đ7)Ņ5)Đ4(Ķ9/Ī5-Ô=6åPJåTQÛLHÍB?ˇ1(ŧ;(ģ=&Ŋ<'ž;'ž9(Ā8(Â:,Ä:/Č>4ËB8ÕOFÜWPŌRIÃD=ŋC;ĖHCÛLHßJFåMLëSRíTWëPVéNVėOZ÷VføUhųSiúRküRm˙Sq˙St˙RuōMmøUt˙\z˙_{˙\v˙UoûRiûReüUf÷Rb˙Zh˙ZhķN^øScūYißS^ļ`_—^Wļ}ŲŠĨîČÅũáŪųééũøõúüųų˙˙ø˙˙÷˙ũúūũ˙˙ũ˙ûû˙÷õũøôūųõūųõūöķ˙÷ö˙õõöęęęÜÛäÖĶŨĐĘßÕĖīåÛüõå˙ųį˙ũé˙˙īú˙øčņîÛáßEA6EA5C?4A=2?;0=9.<8-;7,84+84+73*84+:5/=82?:4C<4G>5JB7ND8RF6TG6WG7YIBZEJpW]‚cs˜r—Ĩz§Ž̞{Ŗ¸vœĀp“ÂcƒĀTnÂG\ĐK\ŅHPÄ<<ē5.¸9*ĩ<'°<%°;'°;)˛:)´;*ˇ<,ģ<-Ā<-Ä<.Ä6*Ë8.Ķ<1Ų?5ßA8á>7ā<3ß:4Ü71Ų4.Ø3-Ū93æA;ėE?éB<ä=5ã<4Û4,Ø4+Û7-Ô2'Ė, Ö6*éG:õK>ō@6ī4-đ-)ö,*ú,,ü,,ø*,đ*)ė/+č2.ã5.Ü4+Ø1(Õ1'Ņ3'Í7(Ë:)Í:(Đ:)Ō;*Ķ:*Ô8+Ô8,Ņ4+Ö<4Õ:5Õ<7åONíYWŲEEÂ3/Ā;,ŋ<(Ā;*ŋ:)Á9)Ā8(Ā8*Ā8,Æ=3ĮA6ĪJAØUKŌRGÆG>ĀD:ĮG>ÖKDØICŨLIäSPåSTâPSâMSåNWōXdöZhũ[pūZrüVnúRlûQl˙QpũGm˙Pv˙Z}˙[{˙VrũTkūWk˙\mûYhøZhûamö`kí]gīfnėfmÉ\_ ]W{OF˜mfÁ˜”ŨēļđÔŅôāß˙õôųų÷ų˙ũų˙˙÷˙ũúūũ˙˙˙˙ũ˙˙øųüųôüųōüųôũøô˙ųö˙øöųîėīäâåÚÖÛĐĘÜŌČîäØũöä˙ûč˙ũį˙˙íúũôęđėŪãßIE9HD8FB6D@4B>3@<1?;0>:/:6-95,95,95,:5/<71>93@;5E>6I@7LD7OF5RE4UE5WG8WI>XMKXNW^Zqpp–€†ēŒ–Ô•ĄéŠõ¨°ųŠąų­ŗũ°ˇ˙ąˇ˙˛š˙´¸˙´¸˙¯ąüĢ­øĨ§ōŸžę—–⌋ׂÍ}yÅumļpgĒf`ž_ZYX„QQuGGcA>Q=5DH8BT=C`@EnCJ€OU–]dĢfxŋkÉnšËo˜ÉiČ`ƒÉWxÆIgÄ;UÆ2HŲAPāEMŅ;<Æ71Ä?0Ŋ@,ą:$­6"­5$Ž5$ŗ5&ļ7(ŧ8+Ã;-Č/Û?0Ü@3Ü@3Ō6*æLBåJEÎ50ßGFķZ\ßIKÕA?Č2ČF9ĪOBÎPDÆH<ŋC7ÁC7ÎH?ŅF?ÕJEÛPKŨROŲMLÚKMÜKPëX`ķ[güaq˙auúXmõOgõMg˙Nk˙Ou˙Ry˙Uw˙TqüTmũ[p˙cu˙jx˙guúboõamídlãflŲhjÎghĩfa^TeG<^UЈÍĢŠåĮÅīÚŲ˙ķķųøöųũüø˙˙÷˙˙û˙˙˙ū˙˙ü˙˙ųúūûöûûķûúõūûö˙ũų˙ûøūôōøíéęßŲŪÔËŨĶÉíæÖ˙øå˙ūč˙˙æ˙˙ëøúīęīčãæßNH:MG9LF8JD6HB6F@4D=3C<2?80>7/=6.=6.=60>71@93?:4C>8EA8KC8NE6QD3RE2VF6VH;ZMGVMR[Whlk‹~‚ąŠ“Î’ŸãšĻîĻŽ÷Нų­°ũ¯ŗũ°ŗ˙°´ū°ŗ˙¯ŗũĢŽû¨Ģø¤§ô ĸīšœé“•âŠŒŲ†…ŅƒÉ{uģmkŦdež_a’Y[„RQsNHbWFY_CQmBLEM˜MTŦU]ŧ[bĘZhŲRpâRußTuŲPlŌJbÍBWĮ8JÅ.?Ô8EãCKæGKØ>>Í>6ĖF:ÃH6ļ?+ˇ>-¸=-ē<-Ŋ>/Ã?0ĘB4ĐD7ÕE:ŲE9ÚB7Û>5Ų;2Ų6-Ų5,Ú3+×3*Ô1*×4-Ú7.Ũ90ß80Ū7/Ũ6.Ü5,Ö/&Ų5+×7+Ī2#Í1"Ō9)Õ>-Ô;)Ø<-æD7øJAũD?ų64õ*-ö*-÷/2÷67í55â30Ú1,×0*×/,Ų0-Ų0+ã81ä91â:1â;2ā<0ß=0Ü?0Ú>1Ņ7+īWLøaZĶ;6Ņ;:æPQÜFHæPQĪ<4Ę:/Æ8,Å9,Ä:-Ä<.Ã;-Ā;,ž:-ž<.ÃA3ĮH9ĮI;ÂD6ž@2ŧ>0ÉF<ĘE<ÎIBÕPI×RMÕNKĶKK×LOéZ`đ^hüfr˙hxü]qōPeķMeũNk˙Vz˙Tx˙RrøTmö]qûhxûjw÷erüetķ_mė`kękrßruÃjfĒd\žla}fVXH9kXJ”|rŊ œŪÂÁîÖÖūîīûõõûûûû˙˙ų˙˙ũū˙˙ū˙˙û˙˙úũ˙ūųûūõûüö˙ūų˙˙ú˙ūú˙ûõ˙÷ōņčáäÜŅáŲĖđé×˙úä˙˙æ˙ūå˙˙ę÷ųëíđįčéáQK=PJ1ÃE6ÃE6ÅF7ÉE8ÎF8ŅG:×G<ÚG=Ö>3Õ;1Ö8/Õ4,Ö3*Ø4+Û4,Ú6-Û81Ũ<4ā=4ß<3Ũ90Ü5-Ü5,Û7-Ō.$Ũ;0Ú=.Í1"Æ-Î7&Ō=)Í:&Ė9'Ô8)â:/ķ=9˙@@˙<>ū37ķ,/ę,.á+*Ø*)Ô+(×/,Ū44ä88é99ī75đ74î73č71ã7-Ü6*×5(Ņ5&Í5(įPE˙mcÛHAČ42×CCĶ>BęVVŲA<Ō>4Ë8.Æ6+Æ:-Æ/Á=.ģ9+ģ<-ž?0ĀA2ŋA2Ŋ@.ŧ=.ģ<-ÃC6ÄD9ČH?ĐPGĶRLĐOIŌNLÕONé^cîagûit˙nz˙duõVjõQi˙Uo˙Wv˙VtúXpņ^pônyöw€íksŪXaņ`mņ`mėboīs}눊ˁ|Ēth™yjskXON:_VGƒqg¯–’ÜĀŋīÕØüéëūôõũûüũū˙úū˙ūũ˙˙ũ˙˙û˙˙ųū˙˙ûų˙õúũö˙˙ú˙˙ú˙˙ø˙ũ÷˙ūöųđįíåÚéáÔôīÜ˙ûå˙ūå˙˙ã˙˙čųúęōôįîđåSM=RL4D=3B;3A:2@93A:4A96@;7A@;CC;IE9MG7OG2RF0UF1UH5WK?RHFXR^jg‚}§‰“Ä’žÚ˜ĸᤧöϧúĢŠüĢŦūŦ­˙­ŽūŦŽûŦŽû¨ŦöĻĒô¤¨ņŖ§đĄ¨î §í¤č›ĸ晞⒚ۋ“Ō†ĘƒÂ„ˆˇƒ¨ˆyšmˆšczŠXiģQ_ĪMYāIRčAIę=Aé=;ã>8ŨC9ÖH:ÎI8ÅF3ÂC0Å@1äTIāG?Ú;7Ø64Ø88Ø:;Ņ98Č74Ā:/ž<.ŋ;.Ā:.Â8+Ã7*Æ4'Æ2&Î4*Đ3*Ņ3(Ô3)Ö3*Ų5,Ũ6.Ü8/Ū=3Û=2Ü;1Û8/Û7-Ú6,Ø4*×3)Õ3&Ķ3%Đ4%Ī6&Ō=)Ņ>*Ę9$Ā2Č:&Ę4%Õ1'į51ú<<˙=@˙7=÷37ę-1á-.Ų--×/.Ü43ã9:é;=đ9=ö26ø03ô01í1/ä1*Ū2(Õ1%Ī3$É1$Ņ=1új_äTLČ95Đ@?Ë:=äRSäJHÜC=Ņ:3É6.Æ8.Å;0Â<0ŋ=/ē;*ŧ?-Ŋ@.ŧ?-ē;*ē;(Ŋ;+ž<,ŧ>0ŧ>2ĀD8ČLBĖPHĘNFĖLIĐNLčaeėaføhr˙o{˙hx÷Zk÷UjūZr˙Ysû]tîaræjtë}€ņ‡‰čwyÚ_dņgtūm|ķeuëlwö‘•ėĸŸÄ”Šĸ|hjUHQSK>PJ>ęDFå@DŲ8=Î65ÍB;ČD8ÉC8ĮA5Æ>2Ã9,Â6)Â2'Æ2(Ë3(Î4*Ķ5,Ø5.Ų4.Û4.Û4,äB7Ũ=1Ų7,Ú6,ß9-ß9-Û5)Õ1%Ø8(Í2 Ę1!Ī9(Î8'Į4"Ę7%ÔC0Č7&Î8*×6,Ū5.æ3/î53ö:9û?>˙LKúHFōBBė>=ę<=į7:å26æ,1ô+1ø)/ô,.ī/.č1+ā4*Ų5)Ķ7(Æ0!Ā.ôdYë]SĪ@:ÔDCË;;ßMMęRQāHEĶ;6É6/Æ8.Æ9/Ã;-ž:+ž<,Á@-ĀA.ģ<)ˇ8%¸9&Ŋ<)ž?.ĩ7)ŗ7+¸>1ÁG:ÅK@ÅIAČIBËJEåa_æ^`ņdjūnwūkuķ]iđXeø]mú^sõbtčdoãlrė~ų‹ö†…éqsøry˙y†õaqāXföˆ‘˙´´ĐŽĸ ›‡]jPDR9QT?jbU›ˆÚĀŋōØŲöāã˙ô÷˙úũ˙ū˙ũü˙ūü˙˙ũ˙˙û˙ūųũû˙úô˙ōōūōų˙ôü˙öûũō˙ũô˙˙ô˙˙ķûõį÷ņáūųå˙ũįūüãūũá˙˙ę˙˙ņũũķüüōXO@WP@WN?UN>TK2G?2H>2F@4GC:GE9JG8NI6RJ5UJ4UJ4VK9XNDULMZTbkhƒ{~§‰Ã‘™×˜ŸįŖ¤öĨĸųĸĸüĄĸü ¤˙ĸ¨˙ŖĢ˙¤­üĄĒõĄŠņĄ¨ėĨ¨íĒŠī­ŠķąŠöŦŠø Šø—§ō’Ąâ–ŸÖĻŖÎļžžš…œ¸gzŋL]ŅERß>Mį;Gį?ß<=ŨEBÉ:4ĘD9ĘF:ē1)ÛJEčJIéCEë>Bč;?æÚ<=Ô<;ĪB;Č?7ĘD;ŅMAÍK>ŋ=0¸6)Ŋ9,ŋ7+Ã6,Č5-Ë2*Ņ/*Ô/+Û2/Ū5.įA5ß9+Ų1$Ũ3&å9+į;-ß8&Õ2Ī2Ė4Ę5!Į4"Į4"Ę4%Í5'Ī5)Ę0&Ī2)Ņ5)Ō6*Ō4(Õ3&×3'Ü4)ā2)æ3.ë52ë33é/2į-2č-4í.5ö-3ö+/ī+,ė/-ę5.ã9,Ų7(Đ4%Ã-Ä3"įXHéYNË;3ßNIÅ41ÚHHáOPÜJJÔC@Ė;6Č80Æ8,Į9+Č<+Å<*Â;(ž9&ŧ;(ģ<)ē=)ē=+ˇ<,´8,ĩ;0š=1ģ?3ģ?3ž@4Ā@5ÄA7ījaõpięc_ômjûqqėadôgm˙py˙lzûhxđdoébiëdjîlnîqoîqoûy{˙}…ųZlücwßbpûŦ¯ļǚ}‘u]rQJY:LR8snZĨ•ˆËˇ°íÕĶ˙îđ˙ö÷˙÷ûũøüüüūū˙˙ū˙˙˙ū˙û˙ūđ˙ôåūéæûęī˙îø˙öü˙ôū˙ķ˙ūņ˙ũņ˙ûî˙úę˙ųæ˙ųã˙ųá˙ųáüúå˙˙õ˙˙û˙˙ûYPAXO@XO@VM>UL=TKĖLAÁC5¸:,ˇ9+š7*ŋ7+Æ6-Ë4-Ņ2.Ø3/á53ä84ä>2á;-Ū6)ß5&á5'á5'Ú5"Ķ4Ņ9$Ë9"Į9%Į:&É<+Ë<,Ė8,Î4*Õ3.Ö5-Ķ7+Ī7)É6&Į4"Ë4!Ī4"Ø2$Ū2&ã0+æ.,æ,-æ,/æ-2č.3ė+.í,-ė0.č2.ā4*Û5'Õ8'Ō9'Õ?.ģ*ÖD5Đ>1ŲF>ëVPÚB?ØBAįUVâRRÜKHÔC>Í=5É9.Č9+Į8(Č;*Ä;(ŋ:'Ŋ<)Ŋ>+ē?-š@/ļ>.˛:,´;0ˇ=0¸>1ē?0Ŋ?1ÁB3ÅC5ëi\ōmdįb[đkfõolčbaņklütx˙q~˙o|öirí]fęY`ņbf÷qpūzxûvw˙x~ųRdū[pä]nöĻŠŠĻ“jŒkZtON_;SZ;us\ŠÖĸöáÜ˙õņ˙úú˙úû˙ûüüüüúūũû˙ūúū˙õ˙úí˙ķá˙éáũæé˙ëķ˙ņø˙ōũ˙ō˙˙ņ˙ũī˙ũí˙úé˙öåûķāúōŨüôßü÷äũúķüüú˙˙ũ\PB[OA[OAYM?XL>WK=VJDã=?å==åAá>CāBč;?ã9<Ü68Ö66Ņ96Ė;6ÕHAÄ;1ž5+ÅA5ÍK>ÆH:ģ=/ˇ8)ē6)ŋ7)Į7,Ī6.×50Ū71æ95é=9×3*×5*Ú6*Ü6*Ũ5*Ũ7)Ú:*×>,Å4!ŋ4š4!š6"ŧ8)Ŋ8)Ŋ3(Ā-%ã@;å>8Ū=3Õ<.Ė9)Č7$Č7"Ė7#Ō7%Õ3$×/&Ų.'Û.*Ü.-Û//Ü./Û,)ß0+ā5-Ü5,Õ3&Đ4%Đ9&Ņ>*ÔA/Â1 įSEŌ;0ÚA;ŪC?čJIđTUíUTįSQãOMŨJCÖC;Ī<2Ę8+Å6&Ä7&Ā7%ŧ7&š:'š<*ˇ>-ĩ=,˛=,°:,ą;/´<.ĩ=/ˇ=.š?0žC4ÃE7Ü\Qęg]äaYđlgöpmįa`ėfgķjqāR^ī^kõhqōemņ`gôeiųqqūxwútu˙nuķJ]øRhä[mņœĄŖœŠa€`UoHOd=W`Aww]­Ĩ’áŅÂ˙îæ˙øņ˙üø˙ūúū˙úû˙üû˙ũû˙ũų˙ûķ˙öč˙îÜūãÚøŪáųáčûåīüčöũëũūėũúé˙úę˙÷æúņāôčØōįÕöëŲøņáūúņũüø˙ūû\PB\PB[OAZN@YM?YM?XL>XL>UI;TH:SG9RF8RF8RF8RF8PF:LE;KGEį=Fã?FÖ:>Ņ?@ŅEDÆA<ē61Å>:ęZYŨABã@Cæ=@ã:=Û89Ķ97Đ<8ÎA8ĪE;Â:.ģ2(Ā/¸9(Ŋ8)Â9)Ë8.Ō:/Ų80ā91č;7ë>8Ø1+Ų2*Ü3,Ũ5,ā5-ß7.Û9.Ö=/É7(Æ:)Á<+ž<,ŋ;.Á;0Å<6Î95ëC@í@<ä@7Ų=1Ī9*Į9%Č:&É;%Ī<(Đ7'Ī1%Ņ1%Ô1(Ö3,Ô1,Ņ/*Ķ2*Ķ5,Ķ7+Đ7)Í5'Ę7%Ė;(Ė>*Ė;(Ī<,ô^PāF<Ō3/Ō.,æ@@ûWX˙us˙ro˙jgö^YįPGÕA7Į5(Ŋ. Ä8'Ā8(ģ8&¸;)ˇ<,ĩ=-˛=,°<-¯;.­<.°.ŧB3ĀF7ËMAß`Wâa[ôpløtræ`aä]aæ]dÖHTįYeķgrôgoöelükpūsvūvvûpsûenņDXôKbåXk뒖 •ƒ_zYQlCSh?\gEy|_°Ē”įÜĘ˙õč˙ųđ˙ûņūūôũ˙÷û˙úų˙úö˙øōüķęûëÚøŪÎķŌĘëĖĪėÎ×îŌāđÖéķÛō÷áöõáûöãüõãõėÛíáŅéŨÍíáŅņčŲüõíü÷ņūųķ\PB\PB[OA[OAZN@YM?YM?YM?WK=VJ@Đ@?ĐIEŋ>8ŗ2,ČC<āUPÜDCáACã?@á>?Ú?=Ô@<ŅD;ĪF<Į=2Ā8*Ŋ5)Ŋ9*ŋ=-ŋ=-Ŋ;+Ŋ<)Â:*Į;*Ī;/Õ;/Û8/ā8/į83é:5æ95ä52ä20æ21į32æ40Ũ2+Ô0'Ë1'Ë7-Č:0Ä7.Á4-Ã40Ė:;Ũ?@ë8;í76ä71Ø5,Ė4&Æ5"Ä7#Å:%Ë=)Ë8&Ė4&Î5'Ô8,Ô:0Ķ9/Đ8-Đ>1Ę;-Å8'Ä7%Æ9'Į<)Į<)Į:(Í>-Í:*Ø>2áC:Ô/-ä::ā24ß56×53Ö;6ŪC>åKCęQIęSHčTHäUGË?0Ä?.ž<,¸=-ˇ>-´?.°?/Ž>0Ŧ<.Ŧ<.Ŧ<.Ŧ=,­<,ą=.ˇA3ēD6ÆLAŪbXâc]đnlôrrå`cå`eį`g÷kvûoz÷kví`hđ_fũlq˙x{˙y|úmsø^jķAWôC]čUh懍Ŗ“ƒg]YtI^uIhwPˆfŗ˛–čâĖ˙úé˙ũí˙ūīũ˙ōû˙ôø˙ôô˙ņíûęäōáØî×ÅčĮģäŧēŪēŋŪŧĮāĀÍâÃØæĖãëĶėîØôņŪ÷ōßķęŲėāŌčÚÍęÜĪīáÖōčßņčáōéâ[OA[OA[OAZN@ZN@YM?YM?YM?XL>XL>WK=VJQI>QI>SK>UL;XM9XM7YL9XM;WK?ULGYSWe^nnjƒut–~}Ĩ„…ą†‰´‡‰šŠ‹Á‹ČŽĪŽŽÔÕĶ”Ķ‹ĘƒˆĀ|¸u|˛ov­ioĢljœ€lˆ“cyŽYvËPoãBdđ7Vö4L÷8Hī@EåFBŨJCÛJEáGGčCJō=Nđ>LäCI×CCĖA>ÎIDē;4°4,ÉI@ÕLFØBAÚ?=Û;;Ú<;Ø@=ÔE?ÍG<ËG:Ā8*Á8(Ā8*ž9(ŧ9'ģ8&Ŋ:(Ā;(Ä;)Ę=,Ō<.×;.Ü8.á6.ä6/č50é32č./é,0î02õ47õ77î45æ21Ú.*×4/Õ62Ņ32Ī/1Ō/4Û6=ę:Dí06î02æ3/Ü3,Ņ5)Ę7'Č9(É<(Æ8$É6$Î6(Ķ:,Ú>2ŨA5ŨA5ØA6ĶG8ÉA1Â;(Ā9&Ã<)Æ=*Å<*Å8&Ė:+Í7)Í0'æC<Û2/ī?Aã/2Ú*,Õ1/Ō5.Õ81Ö90Ō8.Ė5*Æ2&Ā1#ÎE5ÆA2ŧ=.ĩ:*ą9)¯9+Ģ:,Ē:,Ģ;/Ģ=0Ŧ>/Ŧ<.Ģ<+­<,˛>/ĩA2ÉSGāg^āc_ęjiînoæchđjqõoxúq{ũt~ömuîbködn˙rz˙x~˙quúipøWfųAYô@[ęQfá~ƒŦ—†ykmˆ]o‰ZyŠ`—rßŪÂųôŪüúå˙˙īû˙īõ˙īī˙ëįúäÜīŲĐãÍÅŪÁ°Ö­¨ĶĻĒЧ°ĶĢļÔŽŧÖąĮÚēŌßÁāæĖčęÔōíÚōéØîâÔėÛŅęŲĪėÛĶéÚĶæŲŅåØĐ[N>[N>[N>[N>ZM=ZM=ZM=ZM=YLUL=XLNŨAEÔFDČA=ÉHB´:/ą7,ÎOFÉB<Î=8Đ64Ī10Đ51Ķ>8ĪE;ČF9ÃD5ž9(Ã:(Â:*ŋ:'Ŋ8%ž9&ŋ:'Á:&Ä9&Ë:)Ķ:,Ų9+Ũ7+á5+ä3+ę3-ë*+ņ*-ø-3ü/4˙17˙37˙38ũ58ų8;õ8<ō9>ō9Aô9D÷7Fû6Hū5Eô+5ô-2í12ã4/Ų6-Đ8*Î;+Î=,Ë5&Ņ8*Ų;/ß=2â>4ä=4å>5ßA6ŲJ<ĪG7ÉA1Ä<,Â9)Â9'Æ8*Č9)É2'Ķ9/á@8ëD>Ū0/ā..ë46č66Ø3-Õ7.×90×:1Õ;1Ō;0Í:0É;/ÖL?ĖF:ŋ@1´9*°6)Ŧ6(Ģ7*Š8*Ŧ;-­=/Ž>0­=/Ģ<+Ģ<+­<.ą=0ĀKAÚdZŪc^čkiđosęinõrzüvîfp÷oyųryöjsūlv˙w˙v}ųhoųcn÷RbūB[÷ZM=ZM=ZM=ZM=ZM=YLVJ>XL>YN5É83Į/,Å*&Č/*Í:3ĖC9ÃC6ŧ>/Ā;*Ä;)Ã<)Á:'Â;(Ã<)Â;'Ã8%Ä5$Ę7%Ô8)Ų7*Ũ5*á3*å3)ę2*õ33˙58˙8<˙4:˙-2˙(-˙(-ū+1ü-3ö)0ō&1÷)6˙,?˙*Aü 9ķ/ö"0ķ(.í,1æ0/Ú1,Ô3+Ņ5)Đ6*Ô6+Ũ90æ=6ë>7ë:4č71č50â92ßH=×K<ĶE7Ë=/Ä6(Â3%Č6)Ī8-Î4*Ô6-æC<ß82ā21Ō ė89å63Õ1(Ō4)Ō4)Ī5)Î6+Ę6*Č5+Å7+ãYNØRFĘH;ž@2ˇ;/ĩ;.ĩ<1ĩ<1¯9-ą;/ą=0ą=.¯;,­9*­9,Ž:-ą<2ĐYQÜb]ėppôvyîmrõq|ör}˙zƒ˙‰˙y€ôhq÷ep˙q|˙u˙ktø^jöOa˙A^÷8WéG^Ûntē‹™Š„‚žn~šg—hœqĄŠ‚´ē–ČÍ­ÕÜŊĖŲģÁÔ´˛ĖŠ§ÂŸžŧ˜šļ–˛Œą†‰ŗ†ĩ~š„•Ā‹œÂŸÄ‘¨Å™˛ČĄžÎĒÉŌĩÚŲÄæßÍęŪŌéÖĪáĖÉÛÆÃÔÁģÎŊĩȡ°ZM=ZM=ZM=ZM=ZM=ZM=ZM=ZM=XK;XK;XK;YLYM=WMCWLHXNOZPX]Ub`Yia\rjfokŽsp›vq§{uŗƒ~ÁŠƒÉŠƒĮˆŠ~ŧˆy˛ƒr¨†r§ṫlŖ†\„HL¤B9ļA:ÍC@Ū@?č:;ô<>˙DE÷><ķ=<ė>=ę@AëBIęCMëANãALĐ>>Å@9ž?6ˇ>3°,ē7%Á:'Ã<)Â;(Ā9%Â9&Å:'Į:(Ë:'Đ9(Ö6(Ø2$Ú."ā/%ė7.õ=5õ82÷40÷0-ø**û&(û%'û%'û%'û&*÷!)ø".˙'7˙(>˙!;˙6ũ1˙'8ī#,æ#+ã+-Ũ--Ô+(Ō-)Ü41â62č64î66ō65ō12ī./î,,å/,Ü92Ņ:1Ō91ėSKģ"Ä+#ßF>Č.&Í.(Ū<7čE@â:7Ø/*Ú.*â51å<7ß>4Õ<.Ī5)Ë3&Ė5*Í;.Ë;0Å8.ėbXāZOČC:š6,ē:/¸8-ą3'´6*°0%°2&Ž2&¯4%°6'˛:*´<.ŗ=1°:0ēC;Ö\Wėppņsvöx|ûyƒõq|˙|„ũw€út}üs{˙r~˙r}˙mx˙gsü`nôI\˙>\˙>[äAVÔek´•€’Ązƒm}™f~”c‡—j”ŸwžĻ ¨ƒœ¨„’ŖŠŖ|€Ÿvzšqyšo|r vƒ¤u‚­wƒŗy‹¸‘ŧ„“ž†—ž‡œžŒĸŊ§ŧ“¯ŊšžÂ§ĪĖšßĶĮãŌĘÜĮÄÔŋŧĖēļÁ˛ĢšĒĨZM=ZM=ZM=ZM=ZM=ZM=ZM=ZM=XK;XK;XK;YL]P@[OC[NFYNJZPQ\SX_U^_Wfd\tibƒng‘qjxpŦ€yŧ‡€ÄŠÄ€Á~ēťnĸ—q¤Ąu¨šjž™W{=AĒ5+ą5+Â<3Ķ@8Ũ>8č?:ķA=õ=;õ;<ô;@ņ>Bî@IčAIâ@KÚAFĮ<9Ŋ=4ļ<1ą;/Ģ:,Ž:+ŊA5ĐJAÚG@ÜA=Ô63Đ51Õ@9ÍC8ģ9+˛5#Ŋ8'Â;(Ä=*Ä=*Ä;(Æ;(Į:(Ę9(Ī9(Ī6&Ô2%Ú2%ã5*ę8.ī80đ91į1&į/%ę.%ī,&ö+'û+)ū,+˙-.ü*-ú%+ú$.˙'7˙$;˙7˙3ü0õ0ö.9õ3<å*1Û(,Ü.0Ū02Û+.ņ:>ô7=÷4:ö26ö/4ø03ų25ô87Û2-Ú;5×82äE?äE?Î/+Ņ2.Á"Ô51á?:čE@ā=8Ø3-Ų2,Ũ60Ũ:1Ô:.Ī9*É5'Į5(Č9+Ę<0Ę<2Æ9/ícYáXNÉ@8ē4+Â91Ã:0ŋ6,Â9/ŋ5+ž4*Ŋ4*ģ5)¸6)ĩ5(´6(°6)´;0ģB9ĶYTčljīqtöx|ū|„øv€ū|„üyųv~ūu˙s˙p}˙kwüdqũ_nöI]˙>\˙>\éCYĶehŽŽw‰˜oz•bu’\xŽ]cŠ•k˜p‹•p…”mp‡]l‰]h‰\g^k_q•ey›izŸkŦt„ąvЎ|ģ}ŧ“ŧ‚–Ŋ†›ģ‰›ĩ†Ąŗ‹­ļ—žŊ¨ĪÆˇØĮŋÖÁŧĪŧ¸Æˇ´ēŦО¤Ŗ\L<\L<\L<\L<\L<\L<\L<\Lų:Aö=Eī@GæAHŲ@EĪ@BĀ;6¸90ą9+­9*Š8(­9*ģ?3ĪF<ŲD>×96Ų74Ú;7ÜC=ŨOEÎH<ĩ3#ž9(Á:'Ä;)Æ=+É=,Č<+É:)Ė9)Ī7)Ī2#Ķ/#ß4*î=3ô?6ņ91é4+ā4&ß5&â2%å/$ë,$î+%ņ+(ō+(ķ+-đ(+ō&/ø(6ū%:ũ7ü3ø3ô%7ō0;ķ5Aō8Cđ;Dđä,6đ2<ķ/;ö.9ö-7õ.3õ.1ķ/1í42Ü0,â=9Ú64ß;9˙mjåCAŅ/-Î/,Ų:7ß@<āA;Û<6Õ7.Ö5-Ö5+Ō6*Č6'Ã6%Â6'Ä8)Å;.Æ<1Æ<1Å;1ë`YáTMÉ<3ŋ0(Ë;3Ņ>6Î;3Ō=6Ø=8×<7Ô=6Ī<2É;1Ã9.ŧ6*ļ6)š;/ŧ@6ĪTMãgeíorøz~˙ˆû|ƒû|ƒûyûx€˙w˙s˙n}˙gvû`pü[mõG^˙\ėFZÎ`až~ev…Zi„Qh…OmƒRt…X{ˆ]}ˆ^x„\q‚X`zM_Pa…UeYn•`uœg} j~ŖmƒŦr„˛tˆļx‹šy‹šyšz‘ē~”灓ą•Ŧ€›Š†Š­’ēĩĸĮšŽË¸˛Čļ´¸ŦŦĒĄĸ —š[K;[K;[K;[K;[K;[K;[K;[K;ZJ:ZJ:ZJ:[K;[K;\L<\L<\L<]K=]K=]L<^M=^M;^O<^O<^O<^Q@^Q@]OB[OC\NE[NF\OI]OO^P_bTmdY{i^‰pgœ|t­…{ˇˆ{ŗ™…ēĨ…´¯€Ē¸zĄÆxŸŅuœĖcŒČMlÜFRßA@ÕA=ĪE;ĖH;ÍG;ĶE9ŪA:î@Aõ0ÎD:Õ<7Õ31ā;9åA?áD?čSLßUJŋ:+Á9)ž7$Ā7%Ä;)É=,Ę=,Ë9*Î8)Í4&Ō2&Ų2)å9/ņ>7õ>6đ5.ä/&ā6)Ū6)ā4*ã1'į.)ę-)ė*(ė**ę),č',ë'1ō)9ö&<÷!;û=û%Aû6Hä(6į.<˙P\˙`l˙P\ō;åGDÛ=:Ú<9Õ:5Ō80Ņ7-Đ6*Í4&Æ3#ž5#š6$ģ8&ŋ;,Ā9é=9æ?9á@8Ų?5Đ<2Č:.Á9-ģ9,ģ=1ËNHāc_ėnoú|˙„ˆũ~…øy€øy€üy˙x‚˙t‚˙n}ũetų^n÷VhķE\ũ8V˙^N>\O?^NA]OB^PE^OJbNYbQdcTqdZ}le‘xrĸw¨ƒv¤”}§Ŧ†Ģ‰ŠÎ‚žÚw”ál‰ÛXwÚD_ķBTúDPīJPáIHĐE>ËE<ĐF<ŲD>čBBđ@Cõ@GõBHíDGßCDĪA=Â?7ŋ@7ĩ=/Ž:+Ģ:*Ē9)Ž8*ģ;.Ė?6áFAâ=;îBBëAAŪ;6ãJBæXLÕK>Č@2Ā8(ŧ3#Á8(Č<-É:*Ë7)Đ8+Î0%×3)ā8/é;4í:5í60ë0+å,'ã0,ã1-į10ė31ķ25ö37÷48÷6;ė-5ę,6í.=ņ0Cķ-Fö)Gũ+N˙3Rô9Lå3?đ@M˙_l˙lz˙WfõCSõ>Pî3Dí3Aí3>é6<ã99Û83Î4*Į/$Ë2*Į.(Đ72ōYTö\ZōXVÛA?âHFÜB@Ô<7Î70Í6-Ī8-Ī9+Ę7'Â5#š8#ŗ9$ĩ:(¸=-š;,ļ6)ŧ7.Æ=5ÛNGŲEAÎ50Đ1-á>9į@:ã81į51ë20î21ë52į83á:2Ø:/Đ9.Č:.ž6*ē8+ČIBÜ_Yënlû}€˙…‰ũƒõv}öw~üy˙x‚˙sƒ˙k}ũdvų^pôSeôF]ũ8Vū=ZīL]ĀTRz_BWhŅC?ÖEBãEFčBDîAEíCFįDEÚEAËB:ŋ?4ģ?3ą;-Š8(¨9(Ē9)°8*ŧ:-Ę;3čIEé??ë=>å78Ú2/ŪA:îZPôh[ÚPCÉA3ž5%Â6'Į9+Č9+Ë7+Ō8,Ņ0&Ú6-æ;4é;4ę40č/,ę-+ë--ķ49õ3;ø3=ü3=˙1>ū0=ũ1=ų1>õ0Aō1Bô4Kõ5Nõ0Nö-O˙1X˙>_æ3HųO\˙an˙_n˙WfûP`ôDXé8JķAQę:GŨ2:Ō/2Ę2-Â8-Ŋ;+ŧ:*Ä:/Ā2(ŲJBúkcŨLGáPKĪ;9Ī;9āLJÔ@<Ę70Ę7-Î-ą9)¯3'ē:/ĘD;ÖGAØC=Ô72×2.į;7ė:6č2.í2-ō,-ô,,ō./ī31č71â:1Ú<1Ō>2Â6)ē4)ÅB:×XRįjhú|}˙†‰ū€„õv}÷xũz‚˙x‚˙q˙i{ûbtø]oōQc÷I`˙:Xũ?[đO_ēQNqX:Sf8]uEa|InSv†Y{ˆ]~‹`g‚—l€œl}Ÿm|¤o}¨p€Šo‚ĒnƒŠl…ŠlˆĢqˆŽqˆ°r†ŗr„ŗoƒĩp…ˇr‰¸t‹ĩv‰ŦtŽĨwš¨„°´™ČïØĖžÚŅĖÂÂĖĢąÁ›ĄąZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8ZK8[L9[L9\M:\M:]L:^K<`J<^K<_L=^M;_N<^O<^O<^O:_P;`O;aP>aP>aP>aPÉ@8ž>3¸>1¯9+¨7'Š:)­<*´<,Á=1Ī?7ß=:å99ã03â/2ā42Û94æMEülaōh[ŲQCÆÍD>Á63É;7äUQÕF@É91Č8-É:,Č9(Č9(Ä=)ą?'Ļ<&¨;&Ŧ=*Ģ7(Ŧ3(ŧ=4ĶLFÖGAŨE@Û96Ü30é73ė51ë0+ô1-ũ,/˙+-ú./ô1/í4/æ81ß;1Ø>2É9.Ŋ3(Ā;2ĪNHáa^÷yz˙ˆŠ˙ƒ‡ųzû|ƒ˙{†˙x„˙n~ūew÷^põZlëL`õIaü9Wû=YîM]˛JGhQ1Qd6\tDf~Nuˆ[Žc„h†’jˆ—n‰žsˆ¤t„Ļt§r}¨p¨nŠmƒŠl…Šl…¨n‡Ģn…­o…¯o°l€˛k‚ļn…ˇr‡ŗt‡­t§wœŦ…˛ššČƯ×ÎŊŲŌĖģŋʤŦŋ’š­[J8ZK8[J8ZK8[J8ZK8[J8ZK8[J8ZK8[J8[L9\K9\M:]L:]L:^K<^K<^K<^M=^M=^O<^O<\O<`Q>aR=aR?bQ?bQ?aP>aO;bL>hOKgNRbP\cWkjfuv”}|œx—‘z–́•Æ„’Ú}…đuzūlm˙Y[ũDLū/I˙5R˙4Ŋ=0ĩ?1Ŧ;+Š8(­<,´?.ģ@1ĘA7ØC=Ų74á85Ū..â30æ:6Ķ0'Ī5)ëUG˙wjë[PŅC7Ę<0Ë;0É7*Í6+Ô:0Ú70ß82å63į32ę01í12ô36ũ4<ū%6˙#9˙"9˙"9˙!8˙6ũ5ø6ī2î9đ%Bī(Gî&Jņ'M˙3\˙Eh˙bu˙`l÷WcņQ]ōP]īMZâ@MÔ2=Ú=FĖ7;ģ/.Ž/(Ļ5'ĸ;(›?&œ>%Ē9'˛8+ŌVJģ;2Ä?8ž41Ŋ2/ÎC@åWSÕHAČ91Ä6*Å6(Ä5%Æ5$Ã:(ą<(§:&¨7%­9*Ŧ4&¯1%Â?5ÛRJŲIAáHBŪ;6Ū2.ę41í1/ī-+ü22ū,/ũ+.ų+-ķ++í-*æ1*ß4,Ö8,Ņ=1ŋ2(ŧ7.ČIBŲ\Xķww˙‰‹˙‡Šû€…ū†˙}ˆ˙v„˙j|ū_s÷XlöTięD\õD^õ6Uņ:VāLZĨHC^K-Mc5Uo?b}JtŒ\€–g‡˜lˆ›nŠ r‹ĨvŒŦz†ĢwĒr~§m|Ĩi}ĨgĨg‚Ļi‚Ĩk‚¨mƒĢm‚ŦlŽh~°iŗj„ļo‰ļs‰¯rŽŦx™°„­ģ˜ŋÅŠËĘĩËÍÂļŊŞĒē‹—§]K7\K7]K7\K7]K7\K7]K7\K7^L8]L8^L8]L8^L8]L8^L8]L:]J<]K=^L>\L<\L<[N=]P?^SA`SB_R?`P@bQAcRBdQBdNAdLBjMIhKMdPYf[lnk†w{ž€…­‰ˆ˛ƒŠĨ‡Šžˆ Đ‚’ây~đsqújb˙a^ųJWņ>Që:Lî?NīCQę@Kæ9Ę=4Á;0¸:,§6&¯A0­<,Ŧ6(ŋA5ĖF=Ė=5Đ72Ú85Ü71Ū5.Ū6-Ū8*Ũ<*×:'Ķ6%Ų;0đSLōZOŲE9Į8*Í>.ÔB3Ō:-Ô3+đGBá//î5:ķ6=î,7˙BMņ'3ú&2˙)2˙(2ų'ũ"*˙'/ū'/đ&đ)ų+7ę .ė&7ņ-Aį#;˙Xrį-D˙]l˙_iūZcųU\õPWëHMŨ?@Í84Ë>7ÄA7ˇ?1Ļ7&™2!™6#š;'Ÿ<)§8-Ž7/ÂE?ŋ;7Ŋ31Ä64Å54ÔDCÛLHÚKEŅD;Č:0Ä4)Į5(Ë4)Å5*ŧ1š=3Ö_Yésq˙û„†û‡Š˙„Œ˙xˆ˙h}˙_w˙[u˙UoøLføEcņ:Yô;[æ?YÛ]i‹@;VF-L^6YuBg†Mw–]}œcg€ĄjƒĻn‚¨o€§nĻm~Ĩl}Ĩi|¤h}ŖfŖeŖfĨlĻmĢlŦk~­gŽfągƒŗi‡ĩm‹´r°vŽŽ|™´‰§Ŋ™ąÁ¤˛ÁŽĻ˛°˜žz…‹]K7]K7]K7]K7]K7]K7]K7]K7^L8^L8^L8^L8^L8^L8^L8^K:\K;^L>_M?^N>[N=[N=\Q?^RB_SC]QA]OB_OB`NDbPFcOHeNHiMJgNQeS_g_tnny~¨€‡ģ‡ŠÁž•ĘŖ‹ģĢŖšxĶyƒę|{ôvjöi`ø]aķOZėFRōHSøIVõEPī?Jë;Eä9?ā:<Ú::Õ=8Î?7Į>4Ā/Į8(Ę8)Ķ;.Ū;4öJFä01đ6;ö6Aņ.<˙@Nī'4ķ$,÷%(û),ũ+,ü*+ø((ö((÷+,ī$'í%(ę%,ũ;DŲ'đ4CüARØ&6˙ju˙bjūZaüW]ôOSåBC×<8Ņ>6ž8,ŋD5šH6Š>,™/)(’(ž-%°:6ŅTPÎHGÃ54Æ45Ņ==ëWUØGBÖG?ĐA9Į9/Æ3)Ę6,Đ7/Î70Į=3Â91Â5.Ã2-É4.Ņ83Ø?9ŪE=äJ@ŪA8Ú6-Ũ0*į0,ō21û03û03ô02ķ12ô01ķ/0ķ0.î1-į4-ß9-×=1ŋ3$žaP@`P@]P?\O>[O?[RC[QE[QG\OG\OI_PMcQOfTTgUUgUUgV\h]nli†svŖ|ƒē‚ŠËŠÔ˜‘× ŠĘĒ‚´š}ŸĪ€“䄆îvķsjûeg÷S\íGQđFOöHR÷EQōAKî=Eä7=ā7:Ų99Ô<7Í@7ÅA4ž?0ļ>-­>-Ē<+Ģ:,¸B6ĮH?Ā;2ģ0)Ę:2Í6/Đ6.Õ7,Ø8,Ų7(Ų8&Ü9&ā:*Ũ4-Û4.âA9éOCŪH:Č5%Č2#Ų@2â>5õHDč13ō5;ų7@ø4@˙ESø2?đ)0ë#&ė$'ų13õ-/ī''ė&%õ12ë)*ö8:č+1â)1ë3=˙R^ī=K˙[gū^fņV\îOTđMRęEIŨ:;Õ74Ô?9Ā6,Á?2ŧB5ŗ=1Ŧ7-Ĩ3)Ą,#œ' š%Š/*ĮECÂ::ŧ,,Č35×ABô^]Đ?:ŌC;ĐA9Ë=3Ė9/Ô=4Ú@8Û@;Û@<Ø=;Ũ>;ãA?ä>>ā::ã?=ëIDāB9Ũ<4Ų5,Ũ2+į1-đ31õ12ø02ô02ô02ô01ķ/0ķ0.î1-į4-ß9-Ø>2Ā4%ē8+ĩ;0Đ[Tízw˙“’û‡Šúƒ‰ũ~‰˙r‚˙dy˙[t˙Tq˙Nm˙Fgû=_ô=\îEbßTgĸAHp;3SH2Qa<]xEf‡Nr“Zu˜^tš_xžc{Ŗg{ŖgyĸfyĸfyĄcx byŸby a| bz czĸf{¤h{§h{¨e{Ša{Š`}Ģ`Ž`‡˛jŠĩn‹˛s‰Ŧt†Ļw‚žuy“no†lSeYAPM2A>^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^M9^L8`N:aP<`Q>]P?ZN>YOCXPEXOH[QO_UTbXYeX_iYcl\fk^glaildqok‚rtšy~ĩ†Ę…ŒÚŒŽáŽ‡×Ÿ‹Ķ­ŠÄŗ€ŠŊyŽĖ{Ūzō‚w˙sr˙cgųU\ôMTõGPôCMō>Gī-ą=0ŧF:ĖRGĮH?ē5.ē1)Č91Í81Ķ;0Ų=1Û;-Ų6'Ü6&ā8+ā5-Û2+ā=4ėNBãK=Ō:,Ņ8*āB6ß7.đ>:é/0đ16÷4<ü8B˙NZ˙LUũ>Eō38â$&í/1ę,,đ22č**ë/.ō::Ņæ37Ũ,2č9@đEM˙XcķMWØ=CÚADáBFá>AŪ9=Ü89Ø88Ķ97É83Â91Ŋ:2ĀA:ÍNHÖVSĐNNÃC@˛72ļ95ĪKIŲMLãQRīYZęRQņYVÉ51Î>6ŌB9Đ@7Ķ?5ŲB9āC<â@;é?@į8=ė9=ō?Cī:?č58ė>=öMJŪ93Û60Ú3+Ū3,å4.ė30ō21ô01ô02ö/2ö01õ/0õ/.đ0-é4-ā8-Ų?3Â6'ˇ5(ŗ9.ËVOī|y˙“’üˆ‹ũ‰ūz‡ũoücw˙Xq˙Ol˙Fh˙@cû9\ô?^éKdØZh…35g;0WO8WgCa{Kj‰Ps’Yt•\u˜^wbyĄezĸfw dv awŸavž`xŸ`xŸ`{Ÿaz czĸfzŖgz§fz§bz¨`z¨]|Ģ]~­_†˛g‹´nŒŗtŠ­s†Ļu€qtŽii€dQcUDSL8G@^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M;^M9]K5_M5`P9_P;\O>ZN@XOFXQKYPQ`W\g`hnfsshysg{sg}qh}ol}pq†rw—v}Ģz‚Á‡Ō„ŠāŠ‹å“ãŒÚ „ŋžuŸ l‚ŦnqŧvlŌviōsm˙ll˙giū^`ûRWõFMī3Û=1Ú6*Ü4'â6*ā3,â70ä=5åE9âF9ŪB3ŪA2â>2Û0&ę72ė0/ī.1ņ.4ú7?˙PX˙]d˙Z_˙OSá.1ã03ā,-÷EEč66Ü,,Û-.ë>@Ü25Ų37˙bhā=BË*2Ę-4Á&*Õ;=á@EÛ6:Ų37ß9=Ü7;Í/0Ė43Í;;ÕGFŪRSė`cõilôekę^aÄ@>ÆE@å^[øhg˙op˙jjåKK×=;É40Ņ>7×D<ÖC;Õ>5Õ<4Ø:1Ü41î5;ņ-7đ,6ō.8ī,4ë,3ķ9<ūJKß3/Ü3.Ú3+Ü3,ã5.ę40ī4/ō21ô02ö/2÷/1ö.0õ/.đ0-ę3-â7-Ų?3Æ8*´2%˛8-ÃNGī|y˙’‘˙ˆŒ˙‰˙w…úl|øatûTnũHg˙>b˙:_ú6\ķAaāNeÂWap/+_?0[W>^lIe}Mk‰St’\u–_v™_xžcyĄcx buŸ`uŸ`u_vž_wž_xŸ`{ŸazĄbzĸd{Ĩe|Ļd|§`y§^y¨Z{Ē\}Ŧ^€Ŧa…¯g‡Žm‡Ēp…Ĩsƒ r{•nrŠjexe[k^RbU_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N<_N:^L4_N4`N8^O:[N>YOEZSMZTT_ZahbprmzuŒ{u‘{q“zp“vp’qt“rxšt}¨wļzƒÄ~†Ī„‰Ú‹ŒŪ–Ü™ŠÍ›…ļĸƒŖĒ„‘Ģ~yŸl[šQ>ŧMBÔQIâWRëWUņSRņKMí>Cå4:é9<æ9;ā;9Ø=8Ķ@8ĘB6ĀA0ē?/ŗ9,ēA6Ģ5+Ŗ.$žI?Ųg\ŲdZËUI¸<2¸6)Ā3)Î:0Ų;0Ú6,Ū3)ä6-ß1*ä71ã;2Ũ9/Ū>0ãF5äB3ß9+ß1(é4-đ31ī-.í*.ô17˙EJ˙V[˙]b˙\aâ9<ã9<Õ+,ôJKâ89×//Û57Ė()Ė'+øXZŨ>BÕ9=Ņ6:ē#Ä(+Ü<>æAEŨ49Ų,2Ū17Ų05Í(.Ō37äKNöaeûhnųcl÷`iú`løbkÖLLÕNJę\ZęVTįMMãHFĪ42Î3/ŲA<āKDäOHßJCŲ@8×:3×6.Ü.-õ2:û-:ø*7õ'4õ)4ø0:˙>C˙JJā1.Ū3,Ü3,Ũ5,á4-į4/í4/đ3/ô02÷/2ų.1ø-0ö..ņ/-ë2-â7-Ų=1É;-ŗ1$ą7,ēC=ėyv˙˙ˆ˙|ˆ˙qöhxö_rųRlûDc˙9^˙6]ú6\đFcŅN`ĸIMe5+VD0[Y@^lIe|NkˆRt‘[w•_x™`{ždz cvž`s›]rœ\s›\tœ]v^wž_{ŸazĄbyĄbz¤b|§b{Ļ_xĻ[x§YzŠY{ĒZ~Ē_ƒ­e…Ŧk‡Šm‰§s‰Ĩu„s|”ru‰pnlfwe_P=_P=_P=_P=_P=_P=_P=_P=^O<^O<^O<^O<^O<^O<^O<_N:aP6aP6aO9^O<[OA[RK\VV_Zakgvso†}z—‚~Ą|Ĩ}wŖ{uĨxv§syŠs}°x¸{„ŋ~†Ä„‰ÉŽÎ”“Íš“Į •ŊĢ›ĩŧϞɭŠÅĻ”ĒˆmœfJœE2¯A4ļ@4ÂB9ÖHDčNNîJKė?Cë=?é;=ä<;ß=:Ų@8Đ@5Č>1Á=0Ŋ:0ž?6¯4,§1'ģI?ŅcVÖh[ÕeWÃOBē>2ē4)Į7,Ö90Ų5,ß2+į60â0,ã4/â7/Ū7.ā>1åC4ä>0Ū4%æ4*é0+đ3/đ..ī-.ō14ķ78öBEöMRüY^éFKöQWØ37ëFJŨ8<æAEÚ7:Î.0Ņ05äHKŌ7;Đ7:š#%Õ;=Û8;å;>ë˙0=ú*7ü.:˙;E˙CHûABã1/ß4-Ũ4-Ũ5,â4-æ3,í4/ņ40ô02÷/2ų.1ø-0ö..ņ/-ë2-ã7-Ø:/Í>0ĩ1%ą7,˛;5ésq˙ŠŠ˙‡˙v†ūi}ķatķ[p÷PjúCb˙7`˙7aų;_ėLfŋO[~86]=0NF1VX@ZeEcxMj…RrŽ[v”^yša{ždxžas›]p˜Yp™WqšXqšXt›\uœ]y_xŸ`xĄ_yĸ^zĨ^y¤\x¤Yx¤WyĨV{§XŠ_‚Ŧd„Ģh†¨l‡Ĩo†ĸq€šmx‘jq…ij~cbv]_P=_P=_P=_P=_P=_P=_P=_P=^O<^O<^O<^O<^O<^O<^O<_N:cQ9cQ9aP<]P@ZPG\TR_Zaa_mtrŠyx˜€¨ƒ°~~°yy¯yu°wwĩw|žx€Á}…Ä‚ˆÄ…ŠÁŋ—–ž ŧŦ§ģļŦĩžŗąČ¸ĢĐžĻÖÁĸŅģ–ĐŦˆ¯oTŽ\G¤G5¨>0ÂG?āWQīWVņNOé@Cę=?æ<=â=;ß=:×=5Ņ:1É90Á80Á<5š:3¸=5ÁOEĮXMĮ]OŅeXĶcUÂL>ŧ:-Å8.Ō91×4-ß2,į60æ40á2-ā5.ã<3įC7æC4â:-ß3%ę5,æ.&đ0-ī/,đ31ņ54į-.â24įBF÷X]öW\˙ouåDJëHMā@Æ02Ö:=ōHKî9>đ7?ø=Fō7Bč-8ô>J˙]g˙mw˙jr˙cn÷]gú^k˙ao˙]nųYeō\]ãPIâJGÕ74Ō/0Ų54Ō0.Ø95ßD?ãJDâIAŲ@8Ķ6/Ö4/Ü71č66ę'/ü0<ū2=÷+6ų0:˙>Eũ?Aė44â3.ā5.Ū6-ß4,á3*č3,ī4/ô41ö01÷/2ų.1ø-0ø..ō/-ë2-ã7-×9.Ņ?2ļ0%˛6,°61čpo˙‡ˆ˙†Ž˙p‚ücxņ\pôXn÷OiûBb˙9a˙`P@`P@_O?_O?_O?aQAbRB_O?]M=]M=aQAcSCbRB`Q>dS?aP>]P@^QI[QPZSZeapsq‰yxšz|Ĩ~€ą€š}ēxzˇrs´loļtwČv{Ė€ƒĘ‹Æ–—䤞˛°ģŧš´ËÆŗĶ˰ŲĪŦÛΧÜĪŖŨĐŖŲ˜ŲÂ˜Ņ¨ˆ¸€g ^FËzgÖueŊH?×QN÷ccéKLå?Aâ89ä::â:9Ü75Ų61Ö;6Ë81Ā5.ĮB;ģ<3ŋI?ÆXKšOAÎdVŅcTĖXIÅG9Ä:/Í6-Ø7/á6/ã4/ß0-ß2,ā70ä=4ā<0Ũ7)ß5(å7,ä/$ę/&ė/)î1-î20ë40č51â64×79æJNõY]íNS×8=×6<ųX`˙~„˙~†˙ou˙go˙ip˙flõ\aņX[ûZ_˙UZ˙DKü8Bû7Aö2>î+9ė0>ņ=H˙S_˙`i˙gr˙epūbm˙cn˙`oũ]gíSSßF@Ö85Ö41×11×/.Ø31Û94áD=ÜB:Ų?7Ö<4×90Û81ā93æ66đ7<ķ4;ķ4;ö4<õ6;ō59ë33ã1/Ū3,Ū5.ß7.ā5+ä3+é2,ī2,õ20÷12ø03ú/2ų.1ų//ķ0.ė3.å7.ā?5Ė8,ŋ6,¯/&¸;7ŌXW˙˜šū{ƒ˙m€˙e|ø\rđPhôGeüCe˙;dų9`õNlĶRd‰=?P, C;&CG.KM5Y_CZjEcxMqˆZx’bx–`t•\r–Yq˜Yl•Sm–Rn—So˜Tr™Xt›Zuœ]uœ[t›XtWv XwĄWvĸWvĸUuĄTt S{Ĩ[{Ŗ]zž^u—[m‹Ub~MXrCSj>AW0?U/`P@`P@`P@_O?`P@aQAbRB`P@_O?`P@bRBcSCbRB`P@fVG_QF\OG^TSaZad`omkƒvw–wyĸ{}Ž}¸x|šquĩkp´loļnqžuvĐ|~Չ‰Ķ˜˜Î¨§Į¸ļÁÉÅēĶÎąÛ×ĒâÛĨįŪĨæŨĸäÛ¤âØŖÛŅ ÔĮ›Ķŧšģœ€Š}dŋwĘ}m´VJŌa[örpėZ[įKLã?@į=>ë>@į;;â66Û64Ö=8É83Ę?8š6.¸>3ŊK@ļH;Č]MŨo`Ô`QÆH:Ŋ5)Ä0&Ô6-Ü5-Û0)â51å95ä=7ā<3Ü8.Û5)ß4*ã5*ė7.í5+í2+ë0+į0,ã2,á4.Ũ52Ö87Ø>@äJLķW[ú^bü\dū]e˙aiôS[īNVņQY˙_g˙jq˙flõZ`ķNTí4:ņ,5ô*6÷-9ņ'5å!-æ'6í7CūPZ˙Zd˙bl˙dm˙en˙cmũ[hõQZåEEŪ<7Û64Ū63ß55Ü30Ú2/Û62ā>9Û>7Ø;4×:3Û81ß82å95į:6é9;ę7:ë7:î79î79ė65å31ß2,Ü3,Ũ6-ß7,â6,å2+ę1,ō1,õ20÷12÷03ú/2ų.1÷//ķ0.ė3.å7.ß<3Ô=2Â8.ļ1*ˇ74ØZ[˙“ûs}˙fz˙^vųWo÷OiųFfû?bü^QA^QA^QA^QA_RB`SCaTD`SC_RB`SCaTDaTD`SC^PCbUM\QM[QRcYbkdtqm„vu•y{¤y{Ŧy~ļx|ģnsĩei°`g¯jn¸ruÆ}}ׇ„Ũ—”ÛЧØģšĪËĘČÜØŋåá´éäĒíčĻđéĨíå¤įá§âÛ§×ĪĄËܸ¯Š››ƒk¨ƒp§o`œRGē]UŨmi÷uuī__äJLå@DëADė>@č8:â66ß=:Ô;6ÔA:Â70ˇ7,ˇ>3Ž=/ļF8Ûj\ßi[Ų[MĘB6Å2(Ņ4+Ų6-Ų2,Ū52éA>ėGCā=6Õ2)Õ1'Ú2'Ū0%æ4*č1)į.)æ/)ã2,â7/á=4āB9Æ-(Ę43ÜDCđVXú^b÷ZaķS[ņQ[čFQęHSīOYü\f˙mv˙ntôY_ã>Dé.5ô-4û2<ü2>õ+9í'4ö6E˙KW÷ISõPWøW_ū^f˙ck˙`i÷RYéBIŪ97Ū71ã75é<8ë;;æ95á51Ũ60Ũ:3Ų;2×90×90Ü71á83į:6é<8ã99ã99å97į98č88æ74á40Û2+Ú6-Û7-Ū8,â6,į2)ë0)ķ0,÷10õ12õ13ø02÷/1÷//ō0.î3.į6.Ũ90ÜD9Į80ģ4.ĩ/.ä_b˙ƒˆølwūbxūWsúPmūLl˙Cfö:]ķ;_ėIfÔSgDJl;4O>,=<':?(ED/FH0Q\U'B\/E_2Ic6WJ:ZM=\O?^QA]P@^QA_RBaTD`SC`SC`SCaTDaTD`SC_RB\PDZOMZQVbXcjcsqm†vu•xzŖz|­w|´syˇmr´bi¯]dŦagąlržx{ʉ‰ß•‘å¤ĄäļĩáĮÄŲÕŅÎáŨÄįäšëæ¯îę­îčŦéâĢãÛĒÚĶŠËÂĄģļ™ĨĨ›™„“ˆv˜q™rc›bWŗi`Īrmû‹‰õutę[]æLNčCGí@Dėô@?ī=;æ95ā72Ũ82Ú91Ų80Ų80Ü71ã73č96é:7â:7ā;9ã:7æ:8į:6å84ā5.Ú3+Ú6,Û7-Ū8,â6,į2)ë0)ō/+ö0/ô22ô23÷12ö01ö0/ō0.î3.į6.Ü8/āF<É91ž3.ļ,,îfj˙y€øgt˙byũTqūKk˙Gj˙>cō6Yë=^ãQhÄXeˆBBgC7[N;GF1AC-JH3EE-LU6Sc>btLlƒUp‹XnRkPiŽKgIhJh‘Kj“Mk”Pm–To–Wp—Vt›Xs›Uq™So—Pj“MgJeŽHdG`‡D]AWy=Rq8Mi6Lf6Ne7Of8Lf7Oi9Sm>UH8WJ:[N>\O?]P@]P@_RBaTD_RB`SCaTDaTD`SC_RB_RB^QIVMR_Xhnf{tp‰xt—xwĄxzĢy{´syˇjrŗ`g­[cĢ_g°jrģv|ƀ„Γ•āžžä­ŽįģŊæËÉßÔĶØŨÛÎá߯åážæâŧäßšā×ļÚĐĩÎÆąžĩĻ­§›˜šŒŒŽ€‰…yŠ|q‘vk›si¨meēoi扄î~ķsrņedņWYđMNîDEė@@ã:7ā;7äB=ŪE?Ė<3Æ=3ÄB5¯1#Ž0"ĮI;ÜXKÖN@Ė=/Î8*Đ6*Ņ3*Ö42õUU˙khú]XãD>Ü;3ß;2ã80â4-ã2,â1+Ũ0)Ô0'Í/$Æ/$Â0#Å9,Ā4'Á3)Ë:5×CAÛEGÛBGÚ@HāDOëOZōVaōVaú^i˙goķYaáBGę:<í57í38ī28ņ3=÷9C˙HS˙V_ä6?Ũ4;ß6;ëADųJOüIMô;Aé13č51ë95ī<8ō<9ķ;9đ:7é73â70ß;2Ü;1Û:0Ü90ß82ä73č64é75æ:8ä;8æ:8č:9č;7æ95á6/Ü3,Û7-Ü8.ß9-á7*å3)é1)ņ0)ô1-ķ32ņ33ô22ô01ô1/ō0.î3.į6.Ū7/āC:Ę70Ā1-Ā13÷jp˙qzúftû]túPm˙Cf˙=d˙9cõ8^æEdŲZmĢV[wE>dJ=aYFTO;KI4PI6GE.GP3L\8ZlFf|Nm…SmŠRlŒMhJfŽHgHg‘Ii’Lj“Ol•Sn•Vo–Ut™Vs˜Un•Rj’LfKcŒHaŠF_ˆFZBX|?St;Pn8Ok:Rl=Wn@ZqCUo?Vq>WqARE5UH8XK;ZM=[N>\O?^QA`SC`SCaTDaTDaTD`SC`SCbUEaVP^Vcje|yu}yšzyĄxyŠvy°sw´jrŗcj°[cĢ]eŽhpšv~Į‡ŅˆŒĶ™ŨŖĨ❺ãģŋåÆĮãĪÎŪÔĶØ×ÖŅŲ×ËŲÖĮ×ŅÅŌÉĀĖÞŚš´¨ŦŖšŠ‹†x{tyvquleleogŽa[`[ĀsmØyuđ{ü|y˙rpũccöSTđHGīC?ę>:á<6āA;Ņ:1ĶC:ŨTJÂ>2¸6)Ŋ9,Â=.Č?/ĪB1×C5Ö@1Ņ7-Đ2/ęLMú_]ōWSßD?Ų:4Û81ā70æ93į92į92â:1Ú9/Ņ9,Ę8+Ä8)°(¸3"Č@2ĶI>ŌD@Ë;:Ė7;Ī:@Ņ7AâHRíV_đYbõ^g÷`ięU[ÜAEå@>ė?;ņACúGJ˙LT˙QY˙T]˙V^á4:Ú/5Ü/3į7:ô=Aø;?÷48ķ12í42ī95đ86í42ë20ę20į40á4.ã<4ā=4ß<3Ū;2á83ä73č43č43č88į98č88ë99ë97é75â5/Ū3,Û7-Ü8,Ũ:+ß7*ã2(į0(ī0(ō1,ņ42đ43ķ32ķ11ķ1/ņ1.ė3.į6.ā91Ų<3Ė71Á0-Ņ@C˙nuũkuųbqđRiõHf˙;a˙4^˙6bû>däNiĘ\i‹GFjF:]L<]VCXQ>RJ7OG4ID.DJ.GU2Sc>^sHgMj‡OjŠKgŒGgŒFfŽGfHgJi’Nk”Rm”Um”Uq•Uo”Qj‘NgŽKcŒH`‰E_ˆF^†G\‚E[~DWxAVr?Uo@YpB]rG^uG[sCYtAXs@NB2QE5UI9WK;XL\P@^RBaUEbVFbVFaUE_SCaUEfZJh]YngwupŽ|x™{y wxĻvw­pu¯jo¯ahŦ^fŽ_g°emļpxĀ}…͉Ø—Ø™ ÖĄ¨ÖĒąÛ´šßēŋßĀÁŨÃÃÛĮÆØÆÃÔÅÁĐÁģÉŧŗÄģ°Áĩ¨ŧϘ¯–‹œˆ…Œqqqtpopfewhe†nj„_Y•d_›ZTšf`Ųsnđzv˙{w˙ws˙hfüZWūRNõHBæ=6įD=Ø;4ÛG=ę\RÅ;0Ä<0Ŋ7+ž6(Į>.ŅD3ÔB3ÔA1×A3Ō86Ø>>ŨCCÜB@Ö=7Õ81Ø7/Ū7/å:3æ93å:3â;3Û>5ÕA5ŅE8ĖG6Ž-ŧ;%ÍJ8ŅL=Æ=5ģ0+Ā00Ę9>×AJáKTëU`đZeđ]eėYaßLRÔ>@Ī4/Ø7/ā;9ę@@ōCHõDJņBIî?Fâ5;ß26ã36ī8<õ79ø14û/2ü14ī20đ95đ74ė0.č,*į0,æ3.ā3,ä=5ā=4ā=4ā<3ã:5æ95ę65ė65ė57ė57í57î68î66ë54ä2.Ū1+Ū7.Ũ9-Ũ:+ß7*á4&æ1&í1(ņ1,đ42î53ņ42ō21ķ1/ņ1.ė3.į6.â;3Ō4+Ō:5Æ20įUX˙pxųcnōZiįI`ķEf˙8b˙/]˙5b˙BhÜLeąPYj5/^G7XK:UN;[P>VI8M@0JC0@F,AO.K[6Xj@bxGfJhˆIf‹FeŠDc‹BcEeŽHgLh‘Oi‘Rk’Sn’RlPhNd‹JaŠH_ˆF_‡H_‡H_…H_‚H]~G]yF]wH`wKcxOczN]uC[vAZu@JC3MF6QH9TK.ŅE6Ë>-Á2"Ę7'ÛE7ŪE?Ķ97Ė3.Í50Ô;5×=5Ũ<4á=4ä;4ä92Ū5.×4+Ī5)Ę8+Å<,Â?-ÔS>ČG2Ŋ<)ž:-Ã=2Ä;5Â74Â43ÜKNŪMRáPUåTYčY]åVXÜMOĶD@É5+Ņ7+Ø7/Ũ52â24å26æ18æ.6ė4>ė3;ķ5?û9Bũ4>ú+5˙(3˙/9ø-3ų57ų59đ./ë*+é0.č51â5/ã<4ā=4ā=4á=4ä;6į:6ë76î66ė46ë35ė25í34í55ę41ã1-Û0(Ū8,Ũ:+Ũ:+Ū8(ā4&ã3$é3&ė4*î50î52đ42đ3/ō2/ī2,ė4,į6.ä=4Í/&×>9Ė35ųbg˙oy÷[iđNcęC]ųEh˙:e˙0]˙6aöGhÉJ]“CFR,#VI8SL:OH6[O?UI9F?-HF1>B'@J(IU1Sd:_rEe}Ig„JeˆHcˆCa‰BbŠCcEeŽHfMhPiQlPkMfJcŠIaˆG`‡F`‡H`†I^G^F_}G`|Ia{Kd{Mf|Nf~N]xC]z@^{CDB6FD8JF;PG>RH>WI>]M>_O?`Q>aR?`SB_VGbYRgb_ojnso~wq“zt |y¨ywŠppĻggŖ`aĸ\_¤`b­fhĩopĀyzĖ„‚֍‹ß–’įœ™æ žŨĄĄ×ŖŖŲ¤¤ÚĻŖØĨĸ×ĨĄÔ¤ ĶĨžŅŖÍĸšÉĸ™ČŸ–ÙģŽ‚°ƒ|žrn}igld^`fZZkYUrWP}WNŒWO•RI¨ZPĩXPÁZSØkdėyrų‚|˙‹†ųuq˙usí_]ßPLŲEAīZTĖ71Å2*Ä6*Ã7(Ā7'Ã7&Æ9(Ę;+Đ<.Õ?1Ō8.Ö<2×?4Ķ;0Í5(Í3'Ø:/â@5ā90á90Ū7.×7+Ī7)É:*Æ?,ÄA/Â=.Æ@4ËE:ÍG<ĖC;Å<4ģ2,ļ+&Į<7ĐEBŲOLāVSãYVáXRØOIĐC:Ė;*Ķ:(Ü8,â5.č./ė*2đ(3ô'6ú->ú+?û*?ũ)?˙(?˙&?˙$<˙$<˙$8˙'9˙+<ū,9ķ+5í.5č45į;9Ũ84Ũ:3Ū;4ā;5ã:5æ95é73ë54ë35ė46ë54é54į53â5/Ũ5,Û5)Ü8,Û9*Ü9(Ū9&ß8&â7%ã6%æ4&ė5-í4/đ50ņ4.ņ5,í5+ę5*å7,ā90Ø7/Õ:6Û?B˙mw˙bsûSjõIc˙Kjö6[˙6_˙cįNj¯IV^$"D, ?:'HE4PMC/?G/BH&EK%KS.S]8[kDavKd~NdƒJb†F`ˆBa‰@c‹BeFhJlPm‘Ql‘LiŽHgŒGf‹HfŠJe‰Ic…HaƒGdƒJdIbGc~GdJdHe~Ga}C[{<\=_‚B=?4?A6FC[K>]M=`O;`Q<^SA^VIc[Xhcinlyso†tp•vpžtpĸpmĸgfŸaaŸ]^Ą\\¤ed°kjētrÅ}{Ά‚Ų‰ā”Žæ˜“å›–Ųœ˜Õ™Öžš×ž˜Ö—Õœ–Ô›•Ņž–Ņœ”Íœ“Ę›’ĮšÄ“‰ģˆŽ‚xtk|mdif]^f[YiZSoWM{UJŠVKšVK°\RēYRÁXRĶfaāqjãvoí~wũ‡…˙‡…÷usîgdãUSëZUĮ2,Â/%Å7)Ã7&Ā7%Á8&Ä8'Č;*Ī;-Ķ=/Õ9,Õ9,Ķ:,Ō:,Ņ9+Ņ9+Ô8+Ø8,ß;1ā90Ü8.Ö8,Ī9*Č9(Á:&ž9&ž6*Á80Æ=5É@8ĘA9Č?7Å<4Â91ŋ4-Į>6ŅH@ØOGÚQI×NFĖC;Ã7*Ę7%Ķ8$Ũ7)å4,í//ô+3ų)7ũ(:˙+@˙*A˙)A˙&A˙#@˙!<˙=˙:˙:˙ 9˙%;˙);÷-9đ19ę7:å;;Ü94Ü:5Ū;4ā;5ã:5æ95é73ë52ë35ė46ë54č64ä71ß6/Ü5,Ų5)Û9*Û9*Ü9(Ü9&Ū9&ß8%á8%ã6%į5+ę3+ë4,ë5*ë5*ę6(ä7)á7*ß;1Õ4,Ķ54ķTY˙es˙[põGb˙Ih˙Ad˙;`ũ3[ų;aōMmÍLb‰8?S*$A5'69(;<,B@1DA0@?-=B.>G,=CKP'\b_„?b‡B69.:<1??7DA:KB;OE/Ô>/Î6(Ë/"Ú:.Ú8-Ų7,Ö8,Đ:+É:)Â9&ž7$Ŋ5)Ā6,Â8.Ä:0Į=3Ę@6ËA7ĖB8Į:1Ę@6ĪE;ĐF<ŌH>ŅG=Ę@6Å7+Ė6%Ö6&ß7,į4/ņ03ö-5û+9˙*<ü';ü'=û%=ų#;û!:ú7ü7ū6˙8˙6˙$8ũ*;÷2<ņ6=ë8;ä::Ü94Ü:5Ū;4ā;5å95į85é73ë52í36î47í55ę65å61á6/Ü5,Ø4(Ú8)Ų9)Ú9'Û8%Ũ8%Ū7$ā7$á6%á5'â4)ã5*ã6(ã6(á7(Ū6)Û7+Ũ<2Đ1+Ø88˙kr˙]nūPiņ<[˙Hl˙7]˙>eų5[î>bæVqĒ?Qa#(L/);7+07'37&9<)@=*A<(@>)BB&?FXa4s~T€Œdw‡`hSa}La€G`ƒC`…?a‰@cŒ@hŽEjJkMl‘Nn“Mk‘HhHgŒGh‹Kh‹KfˆLd†Je„KdƒJc€FdGf‚Hf‚GeFb€Bc†DeŠEhH25*58-;<4A>7G@:KB;RE.Ņ>.Ë8(Į/!Ō6)Ķ5)Ō4(Ō6)Ņ9+Í<+Č=*Ä;)Ä:-Ä:/Æ90Æ9/Į:1Č;1É<3Ë=3ĶD<ĶE;ĐA9Ë=3Ë<4ĪA7Ī@8Î;1Î5'Ų5)â5.ë31ō/5÷+6ų)7ü):ų&9÷&;÷&;ø'<û&<ũ%:˙$:˙#:˙"7ū#7ú%7ų,;÷5>ō9?č8:ā87Ü94Ü:5Ū;4ā;5å95į85é73ë54î47î47î66ę65æ72á6/Ü5,×5*Ø8*Ø8(Ø8(Ų8&Ú7&Ü7$Ũ6$Ũ6$Û5%Ü6(Ũ7'Ü9(Ü9(Û:(Ų9)×:+×:1Đ3.ëHK˙oy˙VjøD_ø<_˙Ag˙3\˙8bø>cčMlÅOe€0=J C1-11'.6'4=,=B.B@+B<$E>$HE$U\0p~MŸr—¨|ƒ˜mj„W_{J]~E_ƒCa†@bŠAfCkJl‘Lm’Om’Oo”Nl’IiŽIhHiŒLiŒLhŠNg‰Mf…LdƒJdGe‚HgƒHh„If‚Gd‚DgŠHiŽIl‘L-3'36+891<;6B=9G@:MD=QG=SI=SK>UNDZUQa^eigumklkŠjhb`XVˆPP†QQXYš`cĒfj´orÁuxÉ|Ђ…Ö†‡Ų‡ˆØŠ‰Ų‹ŠÖ‹ŒĪ‹ŠĖŠ‰Í‰‡Đ‰…Ņˆ„ŅŠƒŅ‰‚ĐŒ„Ī‹„ȍ…Á†ē†°‡Ĩ~w–m…„Yj€SZnVTc\RZaOZ_HeZDxUB’LD¸TRĐSWÛRYå^dčejãklæuqäunâoh÷~v˙‚{˙‡~ôl`É?2Á8(Ā;(ŋ='ŋ='Ā<'Â;'Å:'Į8(Í7)Ø:/Ų8.Ō8,Ī9+Ė:+É:*Č9)É7(Ī9+Ņ7+Ō8,Ņ7+Ī7*Ė8*Ë<,Ë>-Ę<0É=0Ę<2É;/Č:0Æ8,Å7-Å5*Đ@7Đ@5Í=4É9.Ë80Î;1Í:2Ė5,Đ/%Ų0)ä20ė25ô/8ų-9û+;ü,<ü-?û.?ü/@ü/@ū/A˙/?˙-?˙.@˙)9ü)8÷+7õ0:ņ6=í8=ã77Ü43Ü94Ü:5Ū;6â:7å95į85ę65ė44ņ48ņ48ī56í76æ72á6/Ú6,×5*Ø8*Ö9(Ö9(Ø9&Ø9&Ų8&Ú7&Ų8&Õ8%Õ:&Ö;'Õ=(Ô=(Ô=*Ô=,Ô<.Ņ7/Ú;8˙^e˙aq˙Pi÷<[˙Ai˙4_˙4`û1YôKlÛYq•>NZ%-C),:2/-0)08+7@/:B+<<"A<UH(`[5{…SŖlĒž‹¨žŽĨwo‹[aK^F`„DcˆBeDj“Go”Np•Po“So“So”Nl’IiŽIgŒGiŒLiŒLi‹OhŠNf…Je„IdƒHe„Ig…Ih†Hg…Ge…DiŽIi‘Kl”N+1%.4*470893>:7B=:HA;KD1Î8*Č4&Ę8)Ë<,É:,Č:,É;/É;-Ę:/Č9+Č5+Į5(Ę6,Ī;/Ō>4Ķ?3Ö?6Õ>3Î7.É,#Ō+%Ü-*į02đ39ö1;ú0<ũ0?ũ0?ų0@÷1@÷1@ö0=÷/<÷-9ú,9ú*7ũ/<ų/;õ0:đ3:í6;æ69ß55Ų42Ü94Ũ:5ß:6â:7å95į85ę65ė44ō59ō59đ67í76æ74ß6/Ú6-Ö6*Õ7+Ô8)Ô8)Ô9'Õ8'Õ8%×7'Ô9%Đ9$Î<%Ī=&Ī?'Î@(Î@*Đ?.Ō;0Ņ61ëHI˙fr˙Od˙Hfû7[˙Amũ/]˙7aō4XãPjŧUfm19E(*E697325406906=-3;#38CCja:…TŸŽwŠÁ‡ĩΗ¯Į“’Ž}v”be†Q`‚F`…BcˆBgFm–Jr˜Or—Rq•Up”To”Nl‘KhHf‹Fh‹KiŒLi‹Ni‹Og†Kf…Je„If…IhˆIi‰Hi‡Gf†CjJk“Mn–P(0#+1'/4-350764<85@=8C>8IEų4>ų1>ú0@ø/?ō.<ī/<í/9í07ī-5ī,2ō+2ņ*1õ2:õ3;ō5;ė59å57á55Ū65Ü75Ü86Ũ97ß:6ã:7æ87é77ę67ė46ô5:ô5:ņ7:î87æ74ā70Ú6-Ô6*Ķ7*Ņ8*Đ8*Đ9(Đ9(Đ9&Ņ8(Đ9&Ë9"Č:"Č>$Į?%Č@(Č@*Ė=-Ī;1×96üU\˙^q˙Gc˙?a˙:a˙7gū3bû8`íFdÅNa‰@IS12A64@:<:46?56<7179+4="9CSZ.‚‚Pĸ§qąÅŠ¯ËŽ°Ė’Ļ͒Ž}{™egˆQ_E^ƒ@c‰@iDo•Js™Ps˜Sq•Uo“Sn“NkJgŒGeŠEgŠJh‹Ki‹Ni‹NfˆKd†Id†IeˆHgŠJh‹Ii‰Hf‰Ej’Ll–No™Q&.!(0%-2+13.331764:95<;6GD=DD*ž;'ŧ7$Ā4#ŅB2ãOAäN@ØB4Ë7)Ë7)Đ>/Ę;+É:*Į8(Æ7'Č6'Ę6(Î8*Đ8+Ķ;.Õ;/Õ9-Ō6*Õ7,Ú<1Ũ<2Ü71č88ņ8=÷:Aû9Bú4Aõ/<ō,;ī,:í/;ę19ę38ë48í57ņ56ô36ķ57đ37ī6;í9<é69â45Ũ33ß76ā;9Ũ86Ū97á96ã:7æ87é77ę67ė46ô5:ô5:ņ7:ė89æ95ß82Ø7/Ķ7+Đ8+Í:*Í9+Ė;*Í:*Í:(Í:*Ė;(Å9"Â:"Ã=$Â>%Ã?(Æ?+Ę<.Ī81ß<89?48E26C41=:)>E&FU*bs?›a­ŊąËŒĢɋĻËē„ŽŦz{™ef‡PZ|@^?a‡>hŽCo•Jr˜Or—Rp”Tn’Rn“NjIf‹Fd‰Df‰Ih‹Ki‹Ni‹NfˆKe‡Jd‡GeˆFgŠHh‹Gh‹GeŠDk“Lm—OpšR(0!'/"(-&).(.0-3317839:4==5?@8DE@JLKORYVXeZ\s]^}YX‚[Y‹^]–eeŖnnļwxČØ„…⌌đŠŠė†‡ä‚‚Ü€€Ö‚€Ķƒ‚΀ƒČ„ĮƒƒË„„ΆƒĐˆƒĶ‹„ŌŒ„ĪŠ€ÅŠ€ŧ‰€¯‡}Ÿ€xwozkegf]Xm[Qm[Mi\Lf^Kd_IeaHhaGo_FoP;…UAĨ]OŋaYŅYXŨQTîS[ø\`ųheæYPÔD<Î70Ņ7/×:1Ö=/Ô;+Ī9(Í:&Ī9(Ņ:)Ô8)Ø8*Ü5,Ü5,Đ/%Í3)Ė8,Ę>/Å@/Á@-ž=*ŧ9'Â9)ž0"éWJßK?Ã/#Ņ=1Î2Ü<0Ų7,Ú8-â>4ėC<õBEō9?đ2<ö4?ö2@ņ-;í-:í2=ė7>æ5;ä68å78ë99đ:9ņ78ī77ō;=î<<ę::æ87á85ß74Ü75Ü75Ū97á98ã99æ::é9;ė9<í9<ī8<ô7;ķ6:đ8:í9:į;9ā;5×90Ī7,Ę8+Č9)Į9+Æ:)Į:)Į:(Č;*Į<)Á9#Ä='ž:#ļ4ŧ9%ÉD3Ī?6Ę1,˙^e˙Vg˙Ib˙<\ø1X÷0Yû6cõBiįYoŦFQo33N3,B?6>C<@78@-1L/3K2.A9&DJ(Zn=~š_ž¸w¨Å‚ŦƌŸž‚˜ļ€”˛~‚ nf„RXvBY{?]€>c‡AiDn”Im•Ll”Nk’Ol‘NiŽIfŠDc†Bc†Bf‰Ih‹KfŠLdˆJg‹MhŒNg‹Kf‹HeŠEf‹EjIk“Jq›QržSt U*0")/#).').(-/,130561782;<4>?7AD=HJGOPTSUaXYkZ\u\Z^]‰db”kj¤utē~·‡ß‹ŒéīŒŒđ‰‰ë…„ ؀~Ԁ΂‚Ė…†É†‡Č‡ˆË‰ˆÎ‹ˆĪŒ†Î†ĖŽ…ČŠ€ŧ‰ą†|Ą‚x‘{s€tknlb`e]Re`Me^Kf^Kh]Ki\Ij^Hk_Gn^Ew_G[C’YF­ZLĮVPŪRSõQX˙X_đUSãLEŲ>9Õ60Ų6/Ü90Û9,Ö9(Ķ8&Ņ8&Ņ8(Ô8)×7)Ü6*ß4,Ũ5,Î0'É5)Č9+Æ=-ÄA/Á@-ŋ<*ž9(Ä8)Ë<.äREÜH<Č4(Ė:-Č:,Â4&Ę=,Ë<+Ę;*Ę;*Ë:)Ė9)Î8)Ī6(Ķ7*Ö8,Ų7,×3)Õ1'Ø1(Ū7.į<5øDGņ8>í/9ī/:đ0=î.;ë1<ë6?ä5:Ü36Ø22ß:8îEBøIFøDCķ?>é:7į98å97â96á85ā85á98á98ā87â88å99į9:é9;ė9<í9<î7;ķ6:ō59î68ę88ä;8Ü:5Ķ9/Ë7+Æ8*Ã:*Â:*Ā;*Ā;*Á<)Á<+Á<)Ŋ9$Á?)ģ:%ŗ5š:'Á;/Ę:2Ø<=˙^g˙Pd˙A[ų8Wö6[õ;`ô>dãIeĢ?Lƒ?>_:2G;/:>08>2F<:R>=N0.S8/VK5ciEx[°pÂ}ĄÆšš}šš€šļƒŠxrŽ^YuETp=\{B_@b†@iCm“Hl”Kk“LiMiMgŒGe‰Cc†Bc†DgŠJiŒLhŒNg‹MiOiMiŽKgŒGgŒFfŽEl’Im•LpœQoRt U-1"-1#,/&,.)//-11/34/45-9;0<>1@B7EHAKMLQRWUUaVWi\Yt^]fdŒpn zxˇ…ƒÎ‹ßęŽīŽŒíŠ‰į‡„ßĶ|Ë}ȀƅĮˆˆÆŠŠĘŒŠÉŒŠÉŒˆÅŒ„ŋ‹‚ˇ‰€­†|Ą€v{p€ujpndbi_Vc]M_aL_aKc^Jg\Jl[In\Ho]Gq]EwaIxX?‡S=ŖVDĮXOãUSøOTūMSâ><Ū<7Ũ84Ū71á6/á6.Ũ7+Ú7(Ô7&Ķ8$Ķ8&Õ8'Ø6)Ũ5*ā3,Ũ5,Ë3(Ä6(Â9)Á<+Â?-Â?-Á<+Ā8(Ã5'ÜJ=ÚF:ÕA5Îå84â62ā72ā72ā72á85â96ä;8ä;8á77ä88æ8:č8;ë8<ë8<ë8<ė8;ī58î47ė57į77â:7Ų:4Ī8/Į7,Â8+ŋ:+Ŋ;+ģ<+ģ<+ģ<)ģ<+ģ<)¸9&Ŋ@*ŗ9$ą6$ļ;+ĩ0'Ã40ėPT˙[i˙J`õ:Uđ7Vņ@]īHfįHdÍNa‚89e?6R@2DA09=,57)>6+K9/E-#R=,g]Bˆ_’Ģt—ģ{–Áz–ŋ{”ŗxœ¸…š´…€šm\uKHb5Nh8[xB_}?cƒ@hŒDl’Gj’Ih’JgLfKd‰Dd‡Cc†DeˆFh‹KkŽNkOjŽNiOiOiMhJgHh’Hl”Ko™MsĄVsŖWv¤Y24&04&01)01+12-23.34.46+9;-;>-?A3DF9IJDMONRQWSS]XVd\Zoda~nl”zwŦ„‚ÃŒ‰Ö‘ã”‘ę“ëŽ‹â‰…Ų‚Ė|Ã|ŋ€~Ŋ„‚Á†…Á‰ˆÂŠÃ‹ˆŋ‰…¸‡Ž…}¤…{€vŽyn~rgmmaak^Vi[Pc\J]`K]aJc^Jh[JmZKqZJtZIv[FsWAxR;ŠQ=ĒYFÍ[PãTPđFIņ>AÛ2/Ü5/á51ã60ã5.á5+ā6)Û8)Ö7$Ķ8$Ņ8&Ô9'Ø6)Ü6*ā3,Ú6-Č6)Ŋ8'ŧ7&Ŋ:(ŋ>+Â?-Ã;+Ä8)Æ4'éUIĶ<1Ė8,ŅB4ž5%Ā=+Ā=+Ā8(Ä8'Å9(Į:)Č9)Ë7)Ė6(Í3'Ō6*Ô3)Õ2)Û4,ã:3é>7ė?9ė=:č45ė59ī6;î5;ę2:æ39ä7=â<@ķUVübb˙mj˙idķVQäA<ß63Ũ4/ß61Ū71Ū71ß82á85â96å97æ:8å78æ89č8;é9<ë8<ë8<ë8<ė7<î5:î68ę67å97ß<7Ö<4Ė9/Å9,ž9*ē;*ļ;)ĩ<)ĩ<+´=)ŗ;*ŗ<(ŗ:'ˇ@,­8&­8'ŗ;-Ģ+"Ã54ũ`g˙TdúG\đ-=@-@C.DG4IK>MNFQPNRRRVUSYX]a_lkius›€}˛ˆ†ĮŒŠĶ•’ᔑ␍܋‡Ķ„Ä}ē|ĩ|ŗ~ˇ„ē‡„š‰…ˇŠ„˛†¨z›€xs‡znzrfjm_^j[Ti[PjZKfZJb_Lb_Le^Li\Kn[Lr[Kw\K{ZG~UA†R=›RAļVFÎRHÚG@â88å33Ũ1-ß3/â5/ã5.á3,ß3)Ũ5(Ü9(Ķ8$Đ9$Ī:&Ņ:'Ô8)Ų7*Ũ5,Ø7-Ä;+š:)ĩ6%ˇ8'Ŋ;+Â=.Į;.Į7,Đ90õ\TÖ=5É5+ĪA5¸3$ˇ:(ŧ?+ŋ:)Ã:*Æ:+Č:,Ę;-Ė:-Ī8-Ņ7-Đ3*Ō1)Ö1+Ū71å<7ę>:č;7æ74é75ī;<đë8>č7=ę7;î7;î79ę7:ä::ß=:Ö=7Ë;2Ã;/ē8*ĩ:*ŗ;*¯<)¯<*Ŧ<(Ŧ;)Ŧ;)Ē;(Ŧ=*Ļ8'§9*Ē8-Ŧ/)Ë@C˙hrôM^ķH[íDYåH[ŲO^ÉT]ˇTWœXUdM?OL9LG4JE1FD-?B'=D#>H#KV.\g.==1==3==5;<4;=2;=/?B/@D-CG.FJ3KL:NOAQQIRRHYWJZZN_^\gerqn‰{yĄƒ€ˇ‡…ďŒŅŒĶŠĪŠ…Įƒē~y¯zwĻyvĨ{vŦ|yŽ€|ރ}Ѓ}Ŗx—|t‹zrvksrffm_\j\Sk[NlZLl[Kk[Ki]Mg^Mi]Mj]Mn]Ms^Mz]MZI“`O›VG§N@¸J=Å@7Ī6.Ø1+Ū1+á51á6/â5.â4-ā2)Ū4'Ü6&Ú;(Ņ9$Í;$Ė;&Î;'Ņ:)Õ9*Ų7,Ķ9-Á>,´;(°5#˛5#ģ9)Ä<.É;/Ë7-Ų?7ø[TãIAÎ:0Ė@3¸6&Ŧ3 ĩ<)ŧ9'ŋ7'Ā7'Ã7(Å7)É7*Î7,Ņ7-Ų<3Û:2Ū93å<7ę>:ę=9į85ã41č96ë<9ė::č8:ė>@øPP˙bc˙ppųheâTPĘ=6Ā1+É40Ö;7ß=:ā;7â;5á:2â94á83ã73ä73å55æ66é69é69ę7;ë8<ë8>ę7=č7=é6:ī8<ė89č8:ã;:Ũ>:Ķ>7É<2Ā8ÛTXûepîK\īI]éJ\ÛM[ÉQZ´VV ZRŠ`RPI7HM9NI5H@+;567>O%Lf6lŠTw”\„›e‰šd›fŖk”­t˜°|ƒ•mn}\Q`Cg{HiƒFl‹Gm‘Gj“Gf’GbGcŽGhJlMo’Pn“PlMiŽKjJj’Ls›TsUsSržQržOsĸRwĻUzĢZvĻZuĨ[sŖYRK;RK;RJ=RJ=RJ=RJ=RJ=RK;UNXQ?YR@[TD\UE\UEb[HaZHaYLbYRe][kaiqftuj{zn„|pˆs‹s‰|p„uj{mbre]jc`k`_g_\c_Z^^ZY^YUaZRbZOe[Og[Ki\Kk\Ik\Gm]Fm]Fj^HicMqfTqZJuOB‹WJœ\PŖYLŦZLĨN=ĻE4§<,ą7(Â8-Ņ80Ü41Ũ1-ß6/Ū7.Ū7.Ū7.Ū7.Û7+Ø6)×7)Õ8)Ô8)Ō9)Ō9)Ō9+Ō9+Ô8+Í;,Ŋ;+ļ>-Ž9(Š1 Ģ2!ˇ9*ĀÔH9Â=,ˇ2#ŨPFØJ@ÔF<ÔD;ÚG?ŪG@āC>ā<:ā74æ87ė::ė::į77â64ā93Ü=7ŲF>ĪB9Ä:/ŧ4(ˇ1&š5)ŋ;/Ã?3Ã:0É<3Ō?7Ú?:â=;į;9ė89í9:į7:å8:å8:å99å97å97å95å95ā40á51ä65å76æ89į9:į9:į9;ë;>æ9;ß99Ü=:ÖA=ÍB;ÁA6ˇ?1Š:)Ŗ<+ =*›<(™:&–:%—8&‘8&A0‹<-‡/#‘/&ŧLJämoįloÍVZŊLNĩNOĒQMĸUO›XO—]R•aTŠjSWZ/:M7FTa)~ŽP›°oŸŧyœŊx’ĩs~ah€L\mCYdBT]BHP9?D0:=,@C2<@1:>0]sBgƒHpKo“Kl’Gj’Ii“KgJlPm‘So“Sl“Pm’Mk“Jm–Jm˜IqœLqžMrŸNrĄPtŖRv§UyĒYzĒ^yĻcm™ZbŽOWN?WN?WN?WN?WN?WN?WN?WN?XO@YPAYPA[RC\SD]TE^UF_VGd[JcZIcYMcYOf[Uj_]nbdpdhreltgpvirvirsfmm`gg[_bXY^[VZZRYVOWTKXTIXTH\VH^WGcZKcZIf[Ig\Hi]Gj^Fk_Gh`IcbMngTv\MSFšVMĢVO°RJˇQE¯H9ŦC0Ŧ=,ą9)ž8,Ë80Õ62Ų40Ũ6.Ü8.Ü8.Ü8.Û7-Ú8-Ų7,×7+×7+Õ7+Õ7+Õ7+Ô8+Ô8+Ô8+Î:,ž<.ļ>.Ž9(Ļ1 §2 ˛:)š>.ž<.Æ:-Į4*Ë4)Ō;0ÜE:áOBßQCŨOCÛF?Ø@;Ķ<5Ō;4Ö=7Ú=8Ü86Ũ33į77ë78î79ë78į77å97â=9ÛB:ĘA7ŋ?4¸:,ą6'¯5&˛8)¸=-ŋ@1ÅA4Í@6×@7ß=8ã:7é77ī56ņ7:é6:į6<į7:æ89æ87å95å95ã:5â92ã:3ã:5ä;6ä;8ä;8å99å99ä:;ã;;ß<=Ų?=ĐA;Ä?6ˇ=2Ŧ;-Ĩ;+ =*œ=+—<)–;(’:&“8%Œ:%€9'€8)‰5*<5ŋQP×eeŅ^aˇMMŦNL¤TMYP˜\Q—^S—^S˜_VŒfQ`_/Sg*^r3zO™¯nĨž|™˛pˆ bj‚HauBTe;JX7FP7?H59?158-:^tEgƒHqMp”Ln’Hk”Hk“Lh‘Km‘Qn’Tm”Sm”Qk“Lk”Hl—Hm˜HpJpJp LsĸQuĻTxŠXxŠXx¨^m—Xb‹QY‚H]TE]TE]TE]TE]TE]TE]TE]TE[RC\SD]TE^UF_VG`WHaXIaXGe]Je]Hd[Jd[Le[Qf[Uh]Yh][i]]j^^k__k__i^\f[YbWS_VQZVMWTKUQHRNCQMBSOCWQCXRB^WG^WEaYFc[Fg\Hi^Hk`JhbLbaMngUy_PˆXNĸ[UąVQ˛IE¸E@š@7¸>1ˇ;/¸8+ŧ8+Ã9,É;/Ņ:/Ų8.Û7-Û7-Û9.Ú8-Ų7,Ų7,×7+×7+Õ7+Õ7+Ô8+Ô8+Ô8+Ō9+Í;,Ā>0ļ>.­:(Ŗ2 Ŗ3Ē:&ŗ>,š>.Ä?0Ä8+Å2(Č4*Đ<0ØF9ÜM?âNDŲ:6Ø43Ô20Ö42Û97á=<æ<<é;<í9<î5:ë27é26č58å99á<:Ų@:ž8-ĩ:+ą6'Ž4%­5%°8(ĩ<+ģ=.ČD5ĪC6ÖB8Ü=7â94č64í55ī79ę69é69é69į77į77æ95å95å:3ã:3ä;4ä;6ã<6ã;8â:9á99Ū88Ũ9:Ü<<Ú@>ĶB=Č?9š:1­7+Ĩ7(Ą;,<+™<+”;)“:(9&7%Š9&z6#y6%ˆ9, F=šSOĀWT¸POĢIFĸMHœSL™YP—^S—aW—aW˜_V‹ePsrFzV“Ļn¤š€Ģ‡žŗ{|[[oaXIaXIaXIaXIaXIaXIaXIaXI_VG`WH`WHaXIbYJcZKd[Ld[Je]Hf^Gf^Ig_Lg^Of\Pf\Rf\Sh]Wh]Wh]Wh^Ug]Te[QdZPc[N]YMZVJVRFRNBPL@PM>TN@UO?WQAYTA[VC]XDaZGd]Jf_LfaMdcQleUv\OŠ[QŠb\¸ZXļFDš<:Ã<8Æ;6Ä:0Â8-Ŋ8)ŧ:*ž?.Į?/Ķ9-Ų7,Ú8-Ų9-Ú8-Ø8,Ø8,Õ7+Õ7+Ô8+Ô8+Ô8+Ô8+Ô8+Ō9+Í;,Á?1ļ>.Ŧ9'ĸ3 3ĸ8"Ŧ=)ĩ@.ŧ?-ŋ:+Ã7*Å5*Ë7+Î:.Îî7<ė38é06æ25å58á77Ú65Î61ˇ5(¯7'Ž6&Ŧ7&Ŧ7&Ž9(˛:)ĩ:*ÃA1ĘB4ÔA7Ü?8â;5æ95ë76î87í68ë78ë78ę86ę86č94į:4æ;4â92á:2ß:4ā;7Ū:8Ü:8Û97Ų99Ö<:Õ@<ŌC=ĘA;ģ;2¯6+¤6'ž7(œ;*˜;)”;)’;(:&8$Œ7#‡9%€=*v5#5'™E:ĒPHŦMGŠLGĻQLPJ˜UL”ZO”^R•aV•aV—aWgT‰…_™Šx­ŊŽĻ¸ˆĄts†YN`8/A->3B%:F.=F3;A3:=2:=4<=599-?@2<>39<1<@29B/?L2PbNK:NK:NK:PMTQ@VS@XWC[ZF]\H^]Kb`Qf^QmWJ†[RŦicžc`ÁMMČBCĐ;=Ô89Ķ84Ė70Á9+ē=)ĩC+ŧB+Î;+×7)Ø8*×:+Ų9+Ö9*Ö9*Ô8)Ô8)Ô8)Ô8)Ō9)Ō9)Ō9)Ō9)Í;,Á?1ļ>0Ģ:(Ą6"š4›7 Ŗ=&¯B-ŗ;*ē;,Â:,Į9-Ë8.Î:0Đ<0Ų:4é9<ė4<æ39ã28â38á48â38â25é6<é49į4:į7:ã9<Û76Đ21Ā0(´6(­:(­:(Ģ:(Ģ:(Ģ:(Ŧ9&¯7&¸:+Á;/Î>3Ø?7ā=8ä;8č96ė87î66î66î66í74ę84č:3į:3ä<3á:2ß;2ß<5Ü=7Û=:Ų><×=;Ô>=Ī@<ËB<ÅB:š=5­7-Ŗ5(ž7(š:*–;)“<)‘;*:(Š9&‰8%ˆ7$ƒ8%ƒ@-u4"{3%“G:¤QIĄNFžNGĄWN˜UL’XLZN\N]R”`U—aWhW‰f˜ĨzŠ€Žj]kHDS42@&$2-:&0;*5=.9?3?1;=28;0;?18A.>K1PbÜ87Ô70Į;.ŧ?+ąC*ĩA(Ę;*Ô7(Õ8)Õ9*Ö9*Õ9*Õ9*Ô8)Ô8)Ō9)Ō9)Ō9)Ō9)Ō9)Ō9)Í;,Á?1ĩ=/Ģ<)ĸ9$™6•5›;"§A*˛B.š@/ŋ;,Ã7*Å2(Ë4+Ō;0ß=8ę5:î3<ë6=é8>į:>ä;>ã:=â9<ß58á7:â9>á=>Û=>Ņ96Ã2/ļ0'¯9+Ģ>*Ģ>*Š>*Ē=)Š<(Š:'Ģ8%¯6%š7)Å;0Đ=3Ų<5ß<7ä;8č;7î87ī75ī75î85ë:4é;4į<4ä=4â>5ā?7ŪA:ÚA;ŲA>ÕA?Ņ@=ÍB?Ã?:ģ@8ŗ=3Ē8-Ą5(›5'˜8(•<*‘<(<)Š<(ˆ:&†9'„7%ƒ6$6%}:)t3!~9*—OAŖYNœRG•OE˜VJ•YN[MŽZMŒ[MŽ\Q“_T™`W‘gW~xXyƒ^r|ZU`B;E,/;%0;*0<.3=24<16<2?1:<17:/:>07@-=J0Oa;bxIk‡Lu”Qu™Qt˜NqšNršSpšRršQsœPr›Op™Kn™Jp›LsžOvĄRyĨX{§Zz¨]xĻ]qŸWg”O]ŠEX‚B`‡NY€ISzCg^Og^Og^Og^Og^Og^Og^Og^Og^Og^Og^Oh_Ph_Ph_Ph_Pi`OjaPjbOjbOjbOi`Oi`OiaNiaNiaNh`Kh`Kh`Ih`IhaGhaGhaGf_Le^Kb[I\WDWR?PM:LI8IH6IH6GH6GJ9GK:HL;IMė;Aę@CæAEāBCÜ@AŲ??Í12Đ66Ķ:<Ņ=;É;9ž71ĩ4.­4)Ē<-Ĩ>+Ĩ>+Ĩ@,Ĩ>+¤>(Ļ;'Š:'Ē7%˛7'ŧ8+Å8.Ė70Ô94Ü=9æ>;é:7ė95ė95ë:4é;4č;4å=4â>4āB7ŨC9ÚC<ÕB;ĪA=Ę?<Į=;ŋ>9ą<3Š:/ĸ8+œ6(˜7'”8)‘:):(‹=)‰<*‡<)ƒ:'‚9(€7&6%}6$x3#x5%…B2˜UEWK”PCPD•ZL“YMZN\Q\Q’[T•\U˜[VŽbUkbEV`=JS4=G,6?*2=,4>35?66=68?8=B;CF=EG/;9*78*=>0:<17:/:>06?,=J0N`:awHk‡Lu”Qu™Qt˜Nr›OršSpšPq›OrNqœMp›LošKrNuĄTyĨXĢ`~ŠazĨ]qœUf‘L_‰G]‡E^ˆIb‰PY€ISzCh_Ph_Ph_Ph_Ph_Ph_Ph_Ph_Pg^Oh_Ph_Ph_Ph_Ph_Pi`Qi`QmdUlcTjaRi`Qh_Pg^Og^Mh`MiaNiaLiaLiaLh`Ih`IhaGh`IgaKf_Le^Kb[H\WDUR?PMSQDSPAXLÂYSŲROāDEā::Ü75Õ;3Ę>/ē=)ĩ8"É:)Ī8'Đ9(Ō;*Ō;*Ō;*Ō;*Ō;*Ņ:)Ņ:)Ņ:)Ņ:)Ņ:)Ņ:)Ņ:)Í;,Á;0ļ:.­<,§>+™9#3“7Ÿ?'Ŗ9#°;)Ā>0Æ<1Ė8.Đ7/Ų<5ã?=ė=Bî?DéCEâDCØ@?Ę;7Ā50ģ1.š/,ŧ51ž:6ģ<6ŗ:2Ē8.¤8,Ą:+Ą=-Ÿ>+ ?,Ą@-Ą@-ĄA+Ŗ>*Ļ=*Š;*­:(˛7(š5)ŋ5+É90Ô?9āC>ä=7č;5č;5į<4å<5ä=4á>5Ū@5ÜD9ØD:ŌC;ĘA9Ä?:ŧ;6¸85°93ĸ7-™8(•5'“6'‘:)<*‹:)…8&ˆ=*…<+ƒ<*€<)~:'|8%{6&{6&y1#€8*ŒG8–SC’PB‹L=RE™_S‘WL’YN”[R–]T–]V—\V–YTŒ^QaX;EM(6@8A&>G26BE*;:&78(=>09;069.:>06?,F7GK=IK=AE4KJ6\Q;aE/ƒJ9Āj]Üg`ãUSäFEåA@āA=Õ>5É=0Æ=-Æ4%Ë5&Ė6'Í7(Í7(Î8)Ņ;,Ķ=.Ō<-Ō<-Ō<-Ō<-Ņ;,Ņ;,Ņ;,Î<-ģ2(ļ7.ą;/¨:)š7"”5•7œ9"ŽA-ŗ;+ē6)Á4*Í6/×<7âC?ęHEčDEčEHŨCCÉ:6ģ61´80Ž8.Š4+Ģ9/Š9.¤8. 8-›9,–:+“<+’<+–=+˜=*™>+š?,›@-A, A-Ŗ@-ĸ;*Ĩ:(Ģ7(°6)ļ6+ž8-Ä;3Ė<4Ú=6ā=6â?8âA7âA9ŪB6Ú@6×@5ØH=ŌE;ĮA8ģ;2˛5/Ē3-Ļ1*Ÿ2+™9-’;*‘9+:*‹:)ˆ;)‡;+…<+€9'}8(|9(|9(|9({8'y6&x3$w- ‹A4—OC“MAŽL@‘QE“UJŽRG˜\R˜\R‘UMTL—ZU•XS”WT“gZ]T5IQ*AK(BK,>H/7@+2=-4?14<1HPCZ^PW[JMO:DF.AA'==%:;)>?1;=2:=2;?14=*;H.PbF7>F7=E6@F8>E5>F1HL5MI0U?'Q:ŧsbËcXā_ZëUTįGGâ@>āA=Ø?9Î:0Í9+Î=,Ī=.Ī>-Ī;-Î;+Í9+Í:*Î:,Đ:+Đ:,Đ:+Đ:,Đ:+Đ:,Í;.É?5ÅB:ŧB7Ž=/Ÿ6#–1–1›2¨5#´6(Ã;/ŅA8ŪE?æIDéJFęKHŪCAÛEDĐB>ŧ<3¯9/Š=0Ĩ?1Ÿ=0Ÿ?1œ>2—>0”>/=/Š>.‡@.ˆ?,Ž=*‘;*’<+“=,”?+•>+—>,™>,Ÿ@.Ą=-¤:,¨8,Ŧ8+ą8-ļ:0ŧ9/Ę<2Đ<2Ķ?5ÕA7×C9ÖC9ÔD9ŅE8ĘB6ÃA4š=3°:0Š6/¤5.Ÿ4,™7,’:.Œ=,Š;,ˆ;+†:*„;*ƒ<*<,~;*|;){9)y:)x9(w8'u6'w4$€4'D7˜NC‘K?ŒJ>QD’TIRG“SJ˜XO˜UO—VPœ]X”WRŽSOŠcT]W5Xc9_jBZfBIT66C)4@*0:<19<1<@25>+;H.PbMKD63Å?3ÅA4ÃA3ÁA4ļ;,˛:,Ē8-Ŗ7+ž6+›6,˜7.”:/;/ˆ<,‡;-„;,‚:+€;+€;+<,};+z;*z;,w9*v8)u7(t6)v4&ˆ;1”F<–NBŽJ=ˆH<OB‘SH’RI’OI™TO™SQšVSš]Z“YU[Tl[}X~‰^€‹alxRLX46D#=J.LZ@eqYeoW]eMPU>EI0?C(=@#:<$89';<.8:/9<1=A36?,MK4Ņ>4Ō>4Ō>4Ķ?5Ķ?5Ķ?5Ķ>7Ķ?;ŅB>ËD>ÆF=ÂF<ÃI>ĮM@ÎPDŲSHŨPGâMGäIEäGBâC?āA=ÛB=ÕFBÉD?ē?7Ģ=0Ÿ>.šC0•G3”I6F4ŒE3ˆC3…B1€A0}@.zA.|?-‚:,†8,…9+†:,†:,‡;-‡;+ˆ;+‰:+‹:)Ž8)8*•9,™;/=/ĸ<0Ē:/­8.¯9/°:.°:.°:,¯9+Ž8*¨7)Ĩ7(ž6)›6*•7+’8-‘9/Ž<0ˆ<.…<-ƒ;,9*:*~9*}:*};+|:,z;,y;,w9*s8*q6(r7)u5)ŒD8’H=‘K?ŠH:‡I<‹OD“TK—TL–QL›TP˜QO”SO–\X_Xh^—~j””p…’fu‚WYh?CR+?O*P`B)=A(;='78(:;-79.9<1=A37@-NKB1=I1?G/LG1S>+g=-•ZL­_Sœ>4ž3+ļ?9ØXUķigödeëRUæJNčNPŲIAĶF<Í@6Ë>4Î@6ŌD:ÕG=×G>ÚJAÚJAŨJBŨJBŪKCŪKCāKDāKEëSRčTTãSRÜROØSLØSLÛULāUNāLHáIFãEBâC@äB@âC@äEBāFDŲJFĘE@š>7Ŧ=2Ą?2˜B1’E3G4ŒE3ˆC3‡B3ƒ@0?1~?0z?/|>/€:.ƒ9.ƒ9.ƒ9.ƒ;-ƒ;-ƒ;-ƒ;-9*‚9*…9+‡:*‰:+;-<.“;/›;/ž9-Ÿ9- :,Ą9,ĸ8+ĸ8*ĸ8*Ÿ8)œ8)˜8(”8)9*Œ:,‰:-‡;-„:-‚:,9+€8*}8)}7+|8+{9+z8,y9-x:-v8+q5*o5)q7+t9+ŒH;I<‰I=„I;…K?ŒRF“WM˜XO˜QMœUQ˜RP“VQ’`YˆbWƒg[†zdnrQZi@JY0AR(IZ0Wi?dvNj|VXiEL[:?L.:D)C-B47@-;H.L^8_uFi…Jt“Pt˜Pt˜Nr›Os›TpœQnMmžLpĄPw¨Y|Ēaz¨`rXi“QZƒA\„EaˆIeŒMgŽMgŽKhJfŠLc†PY{IRtBi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QkbSkbSkbSkbSkbSkbSkbSkaUlbYlbYlbYlbVlbVlcRlcRldQldQldQlcRlcTlbVlbXlbXlbXocUnbRkbQlcRlcRkbQg`Pd]M^WGYSCSM?MJ;KH9GE6EB3?B/;H.?H-OC-a=-ƒE:ĢXR´NJž,+˛:9š=;ĶSRōpnūvvņehëX^đ^_ãUQÚPFÔG@ĐC:ŅD=ÔG>ÖGAÖG?ŲHCÚJBÜHDŨJCŪJFŪKDāKGāKGâHHáGIÜHHŲGGÖHD×HDØGBÛFBāBAäABæBAčBBįCBäB@ßA>ÛA?ÛJGĘC?š<6Ž>3ĸ@3˜A0A0C3ŠA2ˆ@1‡?1…=1‚<0€<1=1=1;1;1ƒ:3;1;1€.™9)–9(“:*:+Š;,‡;+„;,‚:+‚:,9+7)~6({5){5){5)z6)x6*x8,w9,s8*p4)o5)r:-v<0‹M@‰K<„J<‚M=…QC‹VH’XM—WN“NI™TO—VR•\Ue\{^PfVF`^GEO->N)?O(J\2_rEk~QexKXj@M_7@Q-6E&7D*=F1=D4:>07;-8:,:;-68-8;0>B47@-9F,I[5[qBeFr‘Ns—Os—Mr›Os›TpœQmœLo Os¤Ux¨\z¨`s [i“Q`ŠHYB^†GeŒMgŽMfJeGgŒGhŒLa„NXzHQsAi`Qi`Qi`Qi`Qi`Qi`Qi`Qi`QkbSkbSkbSkbSkbSkbSkbSkbSlbXlbVlbVlcRlcRldOldOldMldMldMldOldQlcRlcTlbVlbVocUmaSkbSlcTmdUlcTi`Qf_Ob[K^WGXQARLĐB>Í@9ŌC?ŌC=ÔC@ÕD?×CAØD@ŲECÚDCŨADŨADŪDFŨGHßIHāJIãIIåGHįACęADėBEėBEįAAâ@>Û=:Õ=:ÚFFÉ=<š83°;2Ļ@4˜?1‘>0@1ŠG]/AV-7H$1@!6B*=F5PK8MH5ID1DC.@F*DD([B,ˆTG¯\XĢ>AŦ/3ÎINÆ?EĀ;>ģ;<ÄFGØZ[ãefÛY[ĖGHŅJGĐEBÍB?ĐB>ÔFBÔFBĐB>É>7ĪD=ĪD=ŌD@ÔEAÖEBŲECÚDEŨDFŪ?Cß@DŪBEßEEáGGāFFāBCá>?čBDé@Cč>Aį=>ä>>ãA?áC@ßECÖBBÅ98ļ50°;4Ļ?6š>3=/?2ˆ)=C5ã?>â@=â@=ŪC?ĶB?Å>:ļ93Ē70Ÿ:0—=2Ž>3†>2ƒ?2?3=2;3„93†93ˆ81ˆ92…;0„<.„<.ƒ;-;/€:.€:.€:.~:-~:-~:-~:-};/};/};/};/}90}90~80~8.€7.€7.€7.~8,€8,~8,}9,|8-{9-z8,x8,x8,x8.x8.w7-v8-v6,t6+s5*q5+m1'r6,n4)m3(o6+m4)q8-I=…SH…SJ†RGˆRH‹PHQJ”QK•RL“TMTK‰[N‚cQo_HYU:MV7O_;j~YbxQYoHUjCRg@Mb;IY5CR17D&4>#2:#6;'<>0@B5@@6<>358-39-4:.7:/9=/;?.=B,%Q?)kP=XG„NBˆE=“D?ąWV¸TTģQQĀPOĀNMÁMMÂLJÃKJĐTTČHGÂ=>Ä=:ĐB@ĶEAĪB;Į>4ĘD9ÉE9ËF=ÍG>ÔFBØDDÜAEŨAEáBFáCDáCDâDEâDCáFDáFDáFDāEAßD@āB?ßA>āA=āA=āA=ŪC?ÔE?ČC<ē>6Ŧ:0 90”:/Š<0‚<0€A2~@3~>4<3ƒ:3†91ˆ81‰90‡;.…<-„;,„;,ƒ;-‚:,‚:,‚:,9-9-9-9-~:/~:/~:/~:/}90}90}90}90}90}90|90|90|90z:0z:0y9/y9/y9/w9.w9.w8/w8/t8.s7-r6,r6,p6+p6+k1&q7,m4)l3(o6+l3(p7,~H>„RI…SLˆQJ‹PJQL”PM•QN”SOŠOG…SH€[K{ePsiPhkLfqQgxT^tMXnGPf?La:K_:K\:GV7CP4>2;=04:03;05;16<0:A,>D*Q[9^mDkRpŒRp“Sq™RsSsžVxŸ^|ĸexžak‘T`†I]ƒF]ƒF\‚E`†Ia‡Jc‰Le‹NdŠMbˆK`†I^„I]LRtBIk9i`Qi`Qi`QjaRjaRkbSkbSkbSjaRjaRjaRjaRjaRjaRjaRjaRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTnbTqdTo_Pm]Pm_RqeYog\ldYhbVfbWpl`{xi~{jyizubpiVe`JTT(MB.S@/U8(]7*l=3n70u91~;5‡@:’IB›PJĨXP­ZRģ^YēSNˇGEŧB?ČDBŅFCĶD@Ī@:ĐA;ĐC<ŌE>ÔG@ÖGCÚFFÛEFŪDFßCDßCDßCDßCDāDEßEEßECßECŪDBŪDBÜD?ÛC>ÜC=ÜC=ÜC=ÛC>ÖE@ÎE?ÃB<ŗ>5ĸ:1”8-ˆ9,ƒ;-‚@2@1~>2=1ƒ:1†91‡81ˆ:0‡;.„;,„;,„;,‚:,‚:,€:.€:.9-9-~:/~:/~:/~:/~:/~:/}90}90}90}90|90{8/{8/{8/{;1{;1z:0y;0x:/x:/x:/x:/t8.t8.s7-s7-r6,q5+o5*o5*j1&o6+m4)k2'l6*i3'm7+}G=‡PI‡PI‹PJŽQL‘RM’SN”UP‘VPŒWO‡[P~^OtbNoiQorUlwYfwUQeBK_:EY6DU3EV6GV9GT8ER8?I0*7;*:<.<>0;=/9;.6<25=26<26<0:0=@-=C)MW5Zi@f|MlˆNn‘Qq™RuŸUtŸWzĄ`w`n”Wc‰L\‚E\‚E\‚EZ€C_…Ha‡JbˆKdŠMc‰La‡J_…H]ƒH[}JPr@Gi7i`Qi`Qi`QjaRjaRkbSkbSkbSjaRjaRjaRjaRjaRjaRjaRjaRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTnbTrdWoaTm_Rk_SkaWlcZle[jf]jf]xtiˆ„x‘•’Œ~‰‚r}zg`cNOT>DG2FE1HC0F=,L<,VC4P9+R6*V4*Y5)\6+a9/e=1m=1ŠKBSJŽUOļNKŧFDÆABŌDCØFFÔ@>ÕA?ÖB>ÖE@ŲECÚFDÛEDŨEDŪDDßCDßCDŪDDŪDDŨEDŨEBŪFCÛFBÚEAŲD>ØE>×D<×D<ŲD=ØE>ÔD<ĶF?ÉF>ēA8§;1˜8,Œ9+…<-ƒ@0@1~?0=/ƒ:1„:/‡9/ˆ:.„:-„;,„;,ƒ:+‚:,‚:,9-9-9-9-~:/~:/~:/~:/~:/~:/}90|90}90{8/{8/{8/{8/x8.{;1y;0y;0y;0x:/x:/x:/v:/s7-s7-s7-r6,q5+o5*o5*m4)j1&o6+l3(h2&k5)h2&l6*|F<ŠOGŒOJPKRMSN‘VPWPŒZQ‰]R…aUy_PiZGd_IdhO\fKN]@EU8AQ4=M0G2:A/9=,9=.9=.8<-7;-7=36=56;46<2:<1;=/bxIj†Ln‘Qs›TwĄWxĸZ{ĸar˜[e‹N\‚EZ€C\‚E\‚EZ€C_…H`†Ia‡JbˆKa‡J`†I^„G]ƒHY{HNp>Eg5haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlcTrfXth\sg[mcYjaXle]snhzwp~w† ”¨ĨœĢ§œ¨¤™Ŗ‘™–‡z{kcfSOR?GJ7EH5BE2BE2EH5KL0A9,A7+@6*F4(S5*qB8ŒPHŸPK¯IGŋGIĖEIĶBEÖ@BŲ@BÚBAÛCBÚEAÚEAÜDAÜDAŪDDŪDFŪDFŪDFŪDDŨEDŨEDÚDCÚFB×FAÖF>ÔE=ÔE=ĶF=ÔE=ÕF>ÔA:ĶC;ÎE=ÁB9Ž>3ž9-‘;.Š.€=-;/„:-†:-‡;.„:-ƒ;-‚:,‚:,‚:,9+9-9-~:/~:/~:/~:/}:1}:1}:1}:1|91z:1|91y90y90x8/x8/v7.y:1y:1x90v:0v:0u9/u9/t:/r7/q6.q6.p5-o4,n3+n3+m4+j1(m7-j4*h2(j4*f2'j6+}D;NGNHQJTLUOŽWPŠYRƒ[Q{YMv\OkZJ]UBYXDY^HOYA?K3:H/7E.4B+5A+8D.=I3CL7EN9BK6?H5.5<,4:,5<45<56;56;49;0:-;@)GP1Ra:`vGi…Ko’RuVyŖYyŖ[xŸ`n‘W`ƒIZ}C[~D^G^G]€F`ƒIa„Jb…Kb…Ka„J`ƒI_‚H^IW|ILp@Bf6haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlcTkaUndZpf\lcZkd\rmg„|‘Œ§Ŗ ĩąŽÄÁŧÉÆÁÉÄžÅĀēĀšąš˛¨¤œˆ‚rfcTPQ?FI8>E3;D1:F28E38E38C2:B34(P:/e?6€EAĄPOŋX[ĘQVĘCIÕFJ×EFÚFFÛEDŨEBŪDBŨD?ŪCAŪDDŪDFŪDFŪDFÜDCÜDCÜDCÚDCŲEA×FAÕF@ĶF=ŌE<ĐF<ŅG=ÔE=Ô?8Õ@9ĐC:ÆC9ļA7Ĩ=0–=/Œ=.†>/‚?/>.€=-<-ƒ;-„:-…;.‚:,‚:,‚:,‚:,9+:+9-~8,~:/~:/~:/~:/}:1}:1}:1}:1z:1z:1y90y90x8/v7.v7.t8.w8/u9/u9/s9.t8.s9.r8-r8-q6.q6.p5-o4,n3+m4+l3*j4*h2(l6,i3)f2'h4)e1&i5*{B9ŽMG’MH‘PJTLVO‡XNYO|\Qs\Nk[L`WFVSBPSBJQ?@I64@,3<+2;*09(09(2;*5>-9B1G4:F2:C25@/3>-1<,3:33954954928919;.;>-;@*CL/O^7]sDi„Mp“SwŸYyŖYwĄYq˜Yf‰OZ}CX{A\E]€F]€F^G`ƒI`ƒI`ƒI`ƒI`ƒI_‚H^G]€JV{HJn@Ae7haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlbVj`VjaXkdZkg^upjˆ…€Ÿžš°°ŽÃÂĀĶŌĐâáßįæäįãāãŪÚŪÖĶŲÎČÎŧ˛¸Ĩ——‡zym]_YIKL:@E1;D/>J6=H7=F5;C4;>5:;3983880==3C<2N71a84ˆHH¯]_Å`dĘWZÍQSĶNO×MKÛKJŪHGáFDãDAâBBßCDŪDFŪDFŨCEŨCEÜBDÜBBÛCBÚDCØD@ÕD?ĶF?ŌE<ĐF<ĐG=ÔE=Ų@:Ų@:ŅB:ČC:ŧC:Ŧ@4™;/Œ9+‰=/ƒ>.>-€=,<,ƒ;,ƒ;,„<-‚:,‚:,‚:,9+9-9-~8.}9.~:/~:/}:1}:1}:1}:1}:1}:1z:1y:1x90x90w8/t8.s7-r8-t8.s9.r8-q8-r8-p7,p7,p7,o6-o6-n5,n5,m4+l3*k2)i3)g1'k7,h4)e1&h4)b0%f4)zA8MG’MH‘PJŽULˆXNYOxZOr\Nk^N^WGRPAKN=CJ:9B12:+08)17+17-06,/5+/5)08+2:+4<-9D4;F5=H7-.800621622717829;0:<.:?)?H+KY5[qChƒLq“Vwž[wĄYsœVgP^IUx@WzB[~F[~F[~F]€H_‚J_‚J_‚J_‚J^I^I]€H]€JUvIJk@@a6haQhaQhaQibRibRjcSjcSjcSibRibRibRibRibRibRibRibRkbSkbSkbSkbSkbSkbSkbSkbSlcTlcTlcTlcTlcTlcTlcTlbVpg^ng_lgatqj‡„Ą œŧŧēÎĐĪĪĪĪāāāōōōúøųû÷ö÷ķđņėéđâßčĐÆŨÁĩÁĢĸ‘}ub^\GKM7CH2AI2AI4@G5BD7AA7B=9C97?:69<5>?7B71J.+d66QRŗgiÆnmĀ\\ĮZWĐVS×QNÜLKâHHæCDåBCßCFŨDFŨDFŨCEŨCEÜBDÜBBÜBBÜDCŲCB×C?ĶD>ŌE>ĐF<ĐF<ÔE=ÜC=ÛA9ŌB:ĘD;ŋE:°A6œ:-‹5&ŠD69A208+/7*6<247058157247025.06,08-19,6A3:E5=J9>K9-,6..400511606718:/:<.:?+WzB[~FY|DY|D\G_‚J_‚J^I^I^I]€H]€H]LStIHhA?]7icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSjcSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUmdUmdUldWibZgd]vsn“’ޝ¯­ÄÆÅÚÜÛęîīķôöö÷ųüüū˙˙˙˙˙ũ˙ûúü÷ôũōė÷áÔōØĮāĘĩÆļŸĒ ‡ˆ„ibbFEH-DH/CG0FE1GD5F<3C60F42H:9>=9>?:B:7I75cGF’jjœ’č­ŠŌ‹‡ĮtnĀ]XÆSPÕONßJLįFKéFKßEGßIKÚDFÔ;>Ø>@áGIāDGÖ:=Ú@@Ú@@ŲA@ÖB>ÔC>ŅB<ĐA;ŅA9ŪC>ÛA9Ķ@9ĘA9žB8°@5Ÿ:.8*Œ=0‡>/ƒ>.>-€=,<+=*<,:+9-9-~8,~8.|8-|8-|8-|90|90|90|90z:1z:1z:1z:1y=5w<4w;3u:2t91q8/p7.p7.o6-m7-m7-l8-m7-l8-m7-m7-i2+m6/p92o81k4-g2*g2*h3+e0(i7.d2)]-#`0&_/%b2(s>6ŒOJPKˆQJRJ}YMv_QfYITN>DE5>E5:C25@04&DR1WlCh‚Rs”]wž_r›Wk”R[~DXyDTu@Tu@WxCZ{F[|GZ{F^JbƒNbƒN^J\}H_€K`L^~MTsJFd@2I:3L95K<9?:7BA?MHE]RPyjgŖŽ‹Î˛ŽčÅŋ˙×ŅėŗĒ͂|Āc^ĘVVØRSßHMÚADÖDEÕEEØHHÜJKÛEFÕ<>Ö<>ÛACŲ??Ų??ŲA@×A@ÖB>ĶB=ŌA<Ķ@9ÜA<Û@;Ķ@9ËB:ŋC;ąA6 ;1’8-Œ=0‡>/ƒ>.>-€=,<+<,<,:+9-9-~8,}9.|8-|8-|8-|90|90|90|90z:1{;2{;2z;2w<4u<3u:2s:1r90n8.o6-m7-m7-l8-l8-l8-l8-j8-l8-l8-k6.n70o81n91l7/i4,g2*e3*c1(d4*_/%^.$b2(^.$`0&p>5JE‡RL‡XR~XOrVKdRDQJ:>?/:A16A05@03>04<14<15;17:379477577557246116//6./7,.9+1<.4A08E49H58G44E24B1.8/.5..3--2+23+46+8:-9=,7?(DQ3WlEh‚Ut•`wbp˜YgPY|DWxCTu@Tu@VwBYzEYzEYzE[|G_€K_€K\}H[|G^J^J^{MSnKF_A9R4icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSkbSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUmdUmdUneVneVlfZed_y{x—™˜˛ļˇÍŅŌäéėôųüú˙˙û˙˙ü˙˙ũū˙ūūū˙ūü˙˙û˙˙ú˙˙ôūüįúųŨīđŅáåÄŌØ´ŧ𠨃‡‘l`gEQX7DG,DC.JD4LD7KA8I>:C;9SJKia_wvœ’žŗ¯ŲÎČęÜĶūčŨ˙ķé˙äÛđŠŖÃecĩBEĮDIÚRVÛUTŅMKĘDAÍCAÔFE×EFØDDŲCDÖ=?×>@Ø@?Ö@?ÖB@ĶB?ĶB=ÔA:Ų@:Ų@:ŌB:ËE<ĀD<˛B7Ą<2“9.Ž<0‰=0ƒ>/>.=-~<,€=-€=-9-9-~:/}9.}9.|8-{8/{8/}:1}:1{;2{;2{;2{;2z;4x<4t;2q;1r90o9/n8.l8-l6,k7,l8-j8-j8-j8-j8-i9-j8-j8-n91m80m80m80m80i7.f4+c1(d2)a1']-#_0&c4*\-#_0&sD<}PJVP~YQpTI^J?OC7?<-46(2;*0;+1<.2=/4<14<15;17:379479668357257227007/08-.9+0;-2?.6C27E48G48G49F54>33:2/4-,2(/0(13(57*6:)6>'DQ5YmJk„Zw—fwœfl“Z_‡KWxCWuCTr@Tr@VtBXvDYwEYwEZxF]{I_}K]{I]{I_}K^|JZwKPgJAW@3I2icSicSicSicSicSicSicSicSicSicSicSicSicSicSicSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUmdUneVneVneVneVmg[jkfƒ‡ˆŖ§¨šžÁĐÕØåíīķûũõũ˙û˙˙û˙˙ü˙˙üūûũūųūũø˙ū÷˙˙ķøũæôũŪî÷ØæōÎŨéÃÎÚ´ļÁ™ĄĢ†€‡efmLMQ6FH0HJ5KI:HD9D@7OGDj`_‹€¤š™ˇ¯ŦËÆÂŪÛÔęæŨúņč˙ûņ˙÷í˙ŨÕûļąåŽĘcd°@?ÃPKÉTMÉPHÃF@ČGBÔMJÖKHĐ@?Ō>>Ķ??Õ?>ÕA?ÕA?ĶB?ĶB=ĶB=Ö>9Õ@:ŌC=ĖE?ĀE>˛A9ĸ=5•;2Ž<1‰=0ƒ>/>.=/~<,€=-€=-9-9-~:/}9.}9.|8-{8/{8/~;2~;2|<3{;2{;2{;2z;4x<4r90o9/o9/m9.l8-k7,j6+h6+i7,i7,i7,h8,h8,h8,h8,h8,m;2l7/j5-i7.j8/j8/f4+a1'e5+a2(].$a2(b3)Y* a2(yNE\VvWRiNGWC:I<3@:.:;-8<.08)/:*3;.4Đ@?ŅA@ŌC?ŅC?ŅC?ŌC=Ķ?;ŌA<ĐE@ÉE@ŊC>¯@9 >5•=3Ž<1‰<2ƒ=1=0=1~<.=/=/~:/~:/~:/}9.|90{8/{8/{8/|<3|<3|<3{;2z;4y:3y:3w;3n70m80l7/l7/k6.h6-h6-h6-i7.h8.h8.g8.g8.g8.g8.h8.k92h6/f4-g5.i70h70e4-b1*c2+b3+_0(]1(]1(V*!b6-{ULtYRaNHN?8A7.=6,;9-9;.9<139-3;.5;/6<06<07:/58-47.69049238139/39/2:/19.19,.9+.9+/:,0;-3>.6C2:E5Qn>Qn>Qn>Qn>Qn>Sp@Sp@WtD[xH]zJ]zJ_|L_|LZwGRlECU?6D7(6)gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSkbSkbSlcTlcTmdUmdUmdUmdUmdUneVneVofWpgXpgXng]lnmz‚…“š ĢĩˇÄÎĐÜæčí÷ųôū˙õūũö˙üú˙úû˙ųûūķøúíõöčņôãôũęôũčôüåķųßōöÛéėÍØ×šÅÄĨą°’ŽregOMP;GK:FM=GOBKQG{{sŸš”Åž¸ØÎĖßĶĶįÛÛķëéü÷ôđīęüüô˙˙ö˙ũķ˙ųī˙ķę˙įŪ˙×ËØ“ƒ¸eSŖJ:´TFŊWIĩF;ˇ@8ČKEĮC>ĘC?ĖB?ÎC@ÎC>ÎC>ÍD>ÍB=ŅB<ŌC?ÎDAÅD?¸A=Ē=8ž;5•<4Ž;3‰<2ƒ=3=2=1~<0=1=/~:/~:/~:/}9.|90{8/{8/{8/|<3{;2{;2z:1y:3x92w81u91n70l7/l7/j8/i7.i7.h6-g7-g7-g7-f7-f7-f7-f7-f7-f7-h70h6/g5.g5.g6/h70g6/f5.a2*e6.^2)\0'`4+a5,i=4uSJXG@E>6<5/95,;8/8:/57,36+69.5;/7:/69.69.58-57,36+28,19,28.19,19.19,19,19,.9+.9+.9+/:,0;+3>.6A17B2ex\umt’lf‰_RwKBh9KkVsCZwG]zJ^{K_|L_|LVsCNg@ÉD=ČC<ÉB<ŅC?ĐE@ĖEAÂC=ŗ=9Ļ;5œ;5•<6Œ<3‡=4…<5=4<3~<0=1=1~:/~:/~:/}9.|90{8/{8/{8/{;2{;2y:3x92w81v70v70s7/n70j8/j8/j8/j8/h8.h8.h8.g7-f7-f7-f7-d8-d8-d8-f7-g6/h70i81i81h70i81j;3l=5g80k<4b6-a5,oC:xLCtI@nMDC9056.45/8918;247.14+25,58-58-57,46+46+46+46)37)/7(.9)08+.9).9+.9)08)08)19*08)08+/7*08+19,3;.4<-9B1:C0;B0:A1:<.68*24&/3$29'IU?cu[m„gf„bWyTInE?d8Hg;Li;Nk=Nk=Li;Li;Mj
    UrDYvH[xJ]zL^{M\yKQn@G_;6B4+4/#)%gdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSgdSicSjcSjcSjbUlbVlbVmcWmdUmdUmdUleUmfVngWogZnh\oh^mjekormtzƒŠĨŽŗÃĖŅÕßáæîņôüūôũú÷ũųųū÷ú˙ôü˙ōü˙ņü˙îũūđûøīūúņ˙ųī˙úí˙ųé˙ōßīāËŨΡÁ˛›ĸ—|ubb_NXZL]cWmwn|†}ĻŦĸžĀĩÚÕĪîäâüîî˙ôô˙ô÷ūôõ˙ųųûúøûũøü˙úø˙õôüņ÷ũņ˙˙ņ˙ųč˙ôã˙ĖģŊp›QDŠSFĩSH˛C:ĀJ@ÄH@ĮG>ÉF>ČE=ĮD<ÆC;ÆC;ÍG>ĖG>ĮG>ŧC;­>5Ÿ:2—:3‘>6Š=5†=4ƒ=5=4€<3;0;1;1~:/~:/~:1}90|90{8/{8/{8/z:1z:1x92w81v70u6/u6/q6.m80k90j8/j8/i9/i9/i9/h8.g7-f7-g7-f7-f7-f7-f7-f7-f5.j81m;4k:3j92j:0m>4oC8l@5oD;d<2c=2zVJ†dZyWMbLA>:13814927<54:0/5+25,9<336+25*24)03(13(25*46+47,.6),7)/7*-8*/7*/7*/7*/7*19,08+08-/7,/7,/7,08-08+7?09B14*00!''heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjdXldYlcZmeZmeXmfVg`NjeRnkXol]he\feasqr‚†Š“–žĄĢŗļÃČËØŨāęîīö÷ųųûúüūũūūü˙˙úũūöúũōųüņúũōûūķųúōúúōųųíüúëūüįų÷ŪéåĘÕÔļēš›˜˜|qtY_dMbkXr}l„‚‘›´š˛ËĖĮãâŪōîë÷ķōû÷öũųøüø÷˙ūüūūüūūüũ˙úũ˙úũ˙úũ˙úũ˙úúü÷˙˙ú˙ûö˙ę娧 Ŗ`X›D=ĩNEŋMCÂF<ÄD9ĘE<ÎI@ÎKAËH@ĮG<ÆG8ÃH8ŊJ8ŗH8ĻE5šB4‘B5‹C5†B5„B6‚@4‚>3‚<2„:1†91†9191~:1|91{80z7/z7/w7.v6-w7.w7.w8/w8/v7.u6-q5+n3+l7/i81i81h70h70g6/g6/g6/f5.g6/i70i81h70g6/e4-e3,h3-j5/m80k90j:0i;.i=0kA3gB2jI:dH:v_O~k\ŠxjŒoRJ=79.4:04:039/39/39/28.28.17-17-36-06,25,/5+14+/5+/4-.5-/4-.5-/4-/4-/4-/4-05./4-/4-.3,.3,/4-/4-/6.1;23=26@58B79D67B45@03>-4?.DQ=WeN[kQPbHEX<@T8BW6Ic>Ke>Kf=Kf=JeOj?UpGYtK\vO]wP]wRWqNHb?;O6&1+&+.$),heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVidQjhSmjWjk[gg_lll~„“š¨¯ĩ¸ÂÄŅÖŲâįęōķõûüū˙ū˙˙ū˙ūũû˙ūú˙˙úū˙ųûüôøûōöüō÷ũķ÷úņøúīøúí÷úéųûåōõÚßâÃĖĐ¯´¸—‘–vkqUYaI_kUtoŒ˜Š§œŋÁŧĶĶŅįįåķķņ÷÷õûûųüüúûûųūūüūūüūūüūūüūūüūūüūūüû˙ūõ˙˙õ˙˙ū˙˙˙ûú˙íęđŋēÂ~uŸKA¯M@šK>ÂL@ÅK>ÃE9ŧ=4ž?6ÃE9ÄF7ÃJ7ŊL:ŗJ7ĻF6™C2‘C6E7…C7‚B8A7>5‚<4ƒ:3†91„93~92}:2z:1z:1y90x8/v7.v7.u6-v7.t8.t8.t8.r6,o5*m4+l7/i81j81h70i70h70g6/g6/e3,e3,g5.h6/j81j81j81k92k60l71k90k;1k;/j>1j@0iD2gH6kP=gRAufSueŒ…s†ƒrKL<69.39/39/39/28.28.28.17-17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4.05//4..3-.3-.3-.3-/4./6/.80/:21=34@66B66B66B45B16C1CP>P]IR`IIW@AO6BP7EU:Jb@Jd?Ke@Ke>Ic6I5&1-',0$)-heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVmhUkiTmjWjk[kkcwww‘’—§Ŧ˛ŋÆĖŌÜŪėņô÷ü˙ū˙˙ū˙˙˙ū˙˙ū˙ūũû˙ūú˙˙úũūøúûķõøīņ÷ëņ÷ëô÷ėõųëöøęõøåõ÷áîîÔÛÛŋÉĘĢ°ą’“–yuy`kpZt{iˆŸ§œŽĩ­ÍĪĘŪŪÜīīíøøöûûųūūüūūüũũûūūüūūüūūüūūüūūüūūüūūüũ˙ūû˙˙û˙˙˙˙˙˙ûų˙úô˙÷íũŅÆØž”L=ĨRBŠL;§@1ˇG;ĪYMĪUJŧ@4ÄD7ÆH:ÃK=šI;ĒB7?3—@7“E;‰@9„A9A8?6~>5}=4<4}=4z;4x<4w;3w;3u:2t91t91t91r90r90r90r90o9/n8.l6,k5+l7/j81l71j81k60i70i70h6/g5.g5.f5.g6/h70i81k:3k:3l;4j;3i:0h<1k?2jC4iD2fE2fI7lVAjYGujV†m‘Ž{€mEF658-28.28.28.17-17-17-06,17-17-17-06,06,/5+/5+/5+/4./4./4./4./4./4./4./4./4./4..3--2,-2,.3-/4..5.+5-+6.-9//;12>24@46B47D38E3?L:ER>CQ:;I28F->L3DT9J_@Jb@LdBKc?Ia=G`9F_8G`9RkDXpL]uS^vVZqTPgK=T8.A.&1-',0%*.heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZmfVniVljUlkWlm]pqi€‚žĄĻšžÄÄËŅÛåįõúũû˙˙üũ˙üũ˙ūüũüûų˙ūü˙˙û˙ūųûüôõöîîņæéīãįíßíņâđôåņôãņôßōņÜęęĐØØŧĮĮĢ˛ą•ĄĄ‰‘“}“€œž‘Ē­ĸļģ´ĀÅŋÜÜÚééįööôûûųũũû˙˙ũ˙˙ũũũûūūüūūüūūüūūüūūüūūüūūüūūūûûũ˙ū˙˙ū˙÷ōīüķė˙üķ˙ûí˙ôäėÃąšp•P@ĸO?¸XJˇM?ĩE9ĀG<ÁA6ČE;ÅI?ŊG=¯@9Ą<4š=6–A<?;‡@<@:}@;z?9y@9x?8x?8v=4v=4v=4u<3s=3r<2r<2q;1o;0o;0o;0n:/k9.j8-j8-i7.m82n72m61l71l71k60i70i70l:3j92h70f7/f7/f7/h91f:1j?6f>4e=1f>2hC3iE5fG3cG2cJ6hV@i\IskV…‚oŽzpq_9=,47,28.17-17-17-06,06,06,17-17-17-06,06,/5+/5+/5+.3-.3-.3-.3-.3-.3-.3-.3-.3-.3--2,-2,-2,-2,.3--4-*4,)4,*6,+7-.:.1=14@25A36C2:G5N4DXŋ@7ÆC;ÅF?ŋD=ą>;Ļ:7ž:8™>;‘=;Š?<„@=}@=xA6s>6r=5r=5r=5p>5o=4n>4m=3l<2k;1j;1i:0i:0j:0n72p62p62m61m61l71i70i70l;4k:3h91e90e90e90e:1d<2fB6cA5cC4dD5dG5dI6bI3_I2^L6eV?jbMrmW„ƒo„‡r[`L3:(28,28.17-17-17-06,06,06,17-17-17-06,06,/5+/5+/5+.3-.3-.3-.3-.3-.3-.3-.3--2,-2,,1+,1+,1+,1+-2,,3,,6.+5-*4+*4++5,.8-0;-2=/2=-5@/6A05A-1=)1=)5A-8F/=O5@T8FY=H\@J]?I^=K^>K`?TgG[pQcvZauZYkSJ]G6G4&4%$-*$),"'*heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjcYkdZlc\md[meZlfVjgTkjUlnYorasvm…„Ÿ¤¨¸ŋĮÖßäí÷ųû˙˙û˙˙ûü˙ū˙˙˙ū˙ūũû˙˙û˙˙úüüôķõęëíâãįŲŨãÕÜãŅäéĶįėÕéíÖęėÔëëĶčæĪßÚÄĶθĶÎēĖÆļËøĐÉÁ×ŌÎāÛØęæåđīíķōđųų÷ũũûũũûũũû˙˙ũūūüüüúūūüūūüūūüūūüūūüūūüūūü˙ũü˙ûü˙øų˙ūũū˙ũų˙ũô˙øī˙õ÷˙öđ÷į˙˙í˙îÛͧ”¤kXĸ[GĒWE­L;šD:ĀD<ĀE>ŧE?´A>Ē=:ĸ:9š;9•=<?=…?=}@;wB5o?5o?5o@6n?5m>4k<2h<1h<1h<1l<2o83q62p62p62m61l71j81i81h70g80e90e:1d<2e?4f@5dB6^B4aG8cL:dM;cM8`K6]K3]M4]Q9bX?mhRss[€ƒnv{eFO:4=*39-28.28.28.17-17-17-06,17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,-2,,1++0*+0*+0*+0*,1+,3,.5.,6.*4+*4+*4++5,-7,.9+-8*0;+4?/5@/4?.3?+3>-3@,7F/9K3@O8BT:GW¸J=šI>¸I@´G@¯D>Ĩ=:œ:7–=9>:ˆ?9€A:xA:tD:pF:pE5j>5n=6o83r73p62p62n72l71j81i81d8/d90c;1d>3d@4cA5cA5_C5ZE4_NnlUtv^|kcmU2>(6B.3;.39/39/39/28.28.28.17-17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,,1+,1++0**/)*/)+0*,1++2+-4-+5-*4,*4,+5,+5,,6+-7,,6+/:,2=/6A17B27B15@04?.2?-4C.:G3=L5AO8DT:JX?L\BTbI\kTcqZ^mXUbPDRA2>0#/%&/,&,,$**heVheVheVheVheVheVheVheVheVheVheVheVheVheVheVheVjdVjdVjcYkdZlc\md[lfZlfVolYmlWjlWgkZflbr{xŽ˜š¨ą¸ĘĶØãėņøũ˙÷ü˙úû˙ū˙˙˙ū˙úųõ˙˙úũũõøøîđōåéëŨåéØãęØåíÖæėŌéíŌęíŌččÎčæĪčãĪáÚČØĐÃØÎÄŨŌĖęßÛøíë˙ôö˙õų˙õû˙ųüūüũ˙˙ũ˙˙ũūūüūūü˙˙ũ˙˙ũũũûūūüūūüūūüūūüūūüūūüūūü˙ūú˙ũû˙ũûũüúųũüø˙˙õ˙˙ķ˙˙íũúķ˙ûû˙ú˙˙ô˙öæ˙ķß˙ãÍ×­•ŠoY¨WDŽQ@ŦO>¯OAąOB­K@¤C<™<5•>7?6ˆ?8A7{B7uD6qE8qE8p?8q?8s>8q?8q?8q?8q?8p?8sB;qB:o@8m>6l=5j>5m>6o>7o83q73o83m82m82i81h91f:1f;2d>3d@4bB5`C5]A3\@2WB1TG4[S>f^Gi^HbX?ZS9ZS7\W:ZV;XW;kmUsw^u}fUaI&28D03;.4:04:039/39/39/28.28.17-17-17-06,06,/5+/5+/5+-2,-2,-2,-2,-2,-2,-2,-2,,1++0*+0**/)*/)+0*+0*,1++2+)3+*4,+5-+5,,6--7.-7,,6+.8-2<16A39D69D47B46A10;+2?-5B09F22=/x=/t?/sB3tD6r=5r=7t=8s>8u@:u@:t?9q?8sA:q@9q@9q@9p?8n?7o>7o>7k92m82l:3l;4l;4h<3g<3c=2c?3^>1dG9cG9T=-N9(M8'@1WQ;PN7KI0OK2]Y>ieJeaDVU7XX<]`CosZz€fdlU=I1-9#2>*4-1=)2>*9E/BN8IU?O[GVbN]hWYdTLWI/u@8s>8u>9u@:t?9o=6p>7sA:q?8p?8p?8n?7o>7m>6n=6m>6k<4l=5m>6k?6j?6gA6eA5bB5dG9[A2^G7^I8N=+F7$G8%>6!LL4GK2DG,DD*MM1\[?baC`aBYY=dgJsw^sy_X`I:D,/;%7C/6>16<26<26<25;15;15;15;15;15;15;14:04:039/39/39/27127127116016016005/05/.3-.3--2,-2,,1+,1++0*+0**1**1*)0))0))0)*1*+2*,3+.5--4,.5-07/4;39A6?F>BJ?;F8:E57B14?.3?+6B.)r>)s@+tD0vE4q?4n<3q<4tB9sA8o?5qA7xH>n>4m>4m>4k?4l=3j>3l=3j>3g?5gA6gA6gC7eC7cC6`C5^D5bK;UB1ZI7`S@RG3C;&E=(FA+AE,BH.AE*<@%?B%NN2_`AijKaaEnqTvzagmSJO94<%4=(=F38>28>48>48>47=37=37=36<28>48>47=37=37=36<26<26<25:449349349338238238227105/05//4..3--2,,1++0*+0*).().().().().(*/)+0*,1+160/4.,1+,1+/4.6;4=BK:4.8/-4--4-,3,gdUgdUheVheVheVheVifWifWifWifWifWifWifWifWifWifWkeWkeWlcZmd[md]mf\mg[jiWkmXimVjoYjs`hthm|wˆ˜˜ĻŗšŋĘĐĶÜãëđööû˙üũ˙ũ˙ū˙˙ũ˙ūųūūöũũņúûí÷úįô÷âîķÜåíÕâčÎÛāĀ×ÚģÖÖŧŲ×ÂŨ×ĮŪ×ÍåÛŲėāāøėđûđö˙õû˙ųū˙úũ˙ûû˙ûû˙ũü˙ūüūūüūūüūūüūūüūūüūūüūūüūūüūūüūūüūūüūūüūūüūūüũ˙üø˙ūø˙ūû˙ūūūū˙üū˙ú˙˙ų˙˙øū˙úũ˙ųü˙ųų˙ũú˙˙ø˙˙øû˙õüūđ˙˙í˙üé˙ņß˙đŨ˙īÚņŌŊ´z{R>tJ4uH3vI4zM8}P;yL7nA.e7'{M@sD:qB8sD:oC8g;0d8-g=1i?3i?3i?3g?3f>2f>2f>2e?2b@4bB5`C5_C5_C5[D4ZE4WD3XI6OB/\T?oiSc^HMK4IG0IK3>D*?H-@F*48>47=37=37=39?58>48>48>48>48>48>48>47<67<67<66;56;56;55:45:438238216005//4.-2,,1+,1++0*+0**/)*/)+0*,1+-2,-2,05/.3-+0*+0*-2.2718=9;B:@K=@M;@M;=J68E13@,1?(0>'4.:0,6..5.-4-gdUgdUgdUheVheVifWifWifWifWifWifWifWifWifWifWifWkeWldWlcZmd[md]mf\mg[jiWkmXinWiqZgs_drejyt…••Ŗ˛ˇŊČÎŌÛâęīõôųũûü˙ũ˙ū˙˙ũ˙˙ú˙˙ø˙˙ķū˙ņûūë÷úåđõŪæîÖâčĖŲÜŋÕÕšŌĐšÔŅžÚÔČāŲŅęāßôéíūķų˙÷ü˙û˙˙ũ˙˙ū˙˙ūü˙ūú˙ūúūūüūūüūūüūūüūūüūūüūūüūūüūūüūūüūūüūūüūūüūūüūūüũ˙ūú˙˙ú˙˙û˙˙ūūū˙ũū˙üü˙ûü˙ûú˙úø˙ų÷˙ú÷˙ũø˙˙û˙˙ûũ˙úũūųųôî˙ūö˙ũô˙üķ˙ûî˙÷įûæÕéŌĀĪ´Ąļš…”uawVCjI6lI6rM;uP>mF7iB3gB2jE5nI9nJ:oK;oK;eA1cB1cB1cB1cB1cB1bC1`C3]F6\G6\G6ZG6ZG6WH5TG4RG3PH3NH2fdM~~frrZVX@JL4GM3A.:>-;>39?59?58>48>47=37=37=38>48>48>48>48>48>48>48>49>89>89>88=78=78=77<67<66;55:449338227105//4./4.-2.-2.,1-+0,+0,,1--2.-2.,1-,1-,1-,1-.210513764;4;G9=L9@O<@O:8F71?2-9-,6--4,,3+fcTfcTgdUheVheVifWjgXjgXifWifWifWifWifWifWifWifWldWldWlcZmd[md]mf\mg[jiWkmXinWiqZgs_bpcgxr‚””Ŗ˛ˇĀËŅÔŨäëđöõúūûü˙ũ˙ū˙˙ũ˙˙ú˙˙ø˙˙ô˙˙ķ˙˙īúũčō÷āįđÕâčĖ×ÚŊŅŅĩÍË´ÎËēÖĪÅŪ×Ņėâã÷îķ˙öū˙ú˙˙ũ˙˙ū˙˙˙ũū˙úū˙ųū˙úū˙úūūüūūüūūüūūüūūüūūüūūüūūüūūüūūüūūüūūüūūüūūüūūūũū˙ũū˙ũū˙ũ˙ūũ˙üū˙úū˙ų˙˙÷ũũķũũõūũøūũų˙ūüūūū˙ũ˙˙ū˙ūų˙˙ü˙˙ûüûöķ˙øō˙ũô˙ūņ˙ũí˙úé˙ōā÷äĶįŌŋŌģŠšŸŽŸ„srb|]K}^LtUCaD2W:(Y<*[>,X=*`E2`E2`E2_F2`G3`G3`G3]H3\K7\M:\M:YL9XM9UM8RL6QL6NL5QQ9ikS|€gmqXSY?FL2>G,48>48>48>47=37=38>48>48>48>49?59?5:?9:?9:?9:?99>89>89>88=78=78=77<66;55:4493382382/40.3/-2.,1-+0,+0,+0,+0,+0,,1--10.21/32/32/32-4-3?17F3=L7@O:?N7M:MJ9BC3=@5;A7;A7;A7:@6:@6:@69?58>48>48>49?59?5:@6:@6:@6;@:;@:;@::?9:?99>89>89>8:?9:?99>89>88=78=77<67<6495273162/40-2.,1-+/.+/.,0/,0/-10.21.23.23-12+1-+9*/@-6H2;M7=O7A6>A6>A6=@7=@79?59?59?5:@6:@6:B7:B7:B7;@9;@9;@::?8:?99>79>89>7;@:;@9;@:;@9:?9:?8:?9:?98?87=94;4382160/4..3/.3/.21.21,2.,2.+2++2*,4))6%$6)=!2F+8L1;O6;M5;M5;M58J29K3;M5H&DK*FM+EL*PV4PT3KN/HK,TT8bbFccIZZ@[Y@\ZA][B][B[Y@XV=US:SQ8HF1GD1DA0A?0@>1>>2??5>@5;>59?59?59A69A48C58C58C5:B79A69@88@58?79A69@8:B7:A9:B79@8:B7;B:E=8B:8B:7A88@56>14O<>P::L6@R8EW=FY=DX=@T;5H2+<),6+,3++2*ZgM[hN\hP]iQbjSckTglXhkXghVghVifWifWkeWlfXmeZmgYmgYkhYkg[kg\jf]jf[hfZefVhiWglVfo\erajwnzЉœĢ˛ēČŅĐŲāáéėō÷ûøūūųūúú˙øûūķųũīøųë÷øæõôâíėØéæĶåâĪÜ×ÄŌËšĘŋ­Á´¤š­Ąŧ¯ĻÁļ˛ËÁĀÛĐÖæßæûķūũ÷˙ūû˙˙ū˙ūũ˙üũ˙üũ˙üũ˙ūūūūūūūūūūūūūūūūūū˙ūü˙ūü˙ūü˙ūü˙ũú˙üų˙üų˙ũú˙ũų˙ūú˙ūũ˙ũü˙üũ˙ũū˙ū˙˙ū˙˙ũūũûü˙ūũ˙ūû˙üú˙øķøíįōåŨöčßûđę˙úũ˙ü˙˙ũū˙˙ũ˙˙ûũ˙üũ˙ūüũ˙ũū˙ũū˙˙ũ˙˙ūü˙ūõ˙˙î˙ūč˙˙äúöŨũûâäāĮ‹‡lRM0SN0QK+QK+UO/UO/TO1TO1SO2SO2QP4QP4QM2PO3PN5NQ6MO7JP6HM6EM5HQ6EN1BK.?I'BI(FM+JP,KQ-NR/PT1VZ7^bA_bCY\?TWWU>XV=YW>XV=XW;WV:XT9QK3OI3LG4ID1DA2B@3A?3>@5<=59?59?59A67B48C57D37D3:B79A69A68@58@59A69A6:B7:B7:B7:B7:B7;C874>63=40>-3C)9M*BY/Ga1Op;Ln;Li=Fa>BY?F;J@?I>>I9?G8>F7>D8=B;>E>9C;6@74B19I/BV3Pg=XrB^J[}JXuIMhECZ@9O:6G54E2XR6:@6:@69A67B47B46C26C2;C8:B79A69A69A69A6:B7;C8;C8:B7:B7;C8;C8=E:>F;=G<=G?>H=>I9?G8>F7>D8=B;=D=9C;6@74B19I/DX5Ri?[uEZ{FWyFTqEIdA=T:2H3/@.->+6H2@R8L_CReGSgKOcG@W=6I30:/07/-4,YgMZhN\hP^jRblTemVinZjo[mn\lm[mk\mj[nhZnhZoi]oi[liZkhYjfZieZie\ieZig[ghXghVchRajWerao|s{‹ŠŸĻĸ°šÁËÔÔŨäéņôōúüôúøņöđíđįčėŪâãÕÚÛÉŌŅŋĖÉļÉÄąÃžĢŋ¸ĻŧŗĸĘžŽĶŸÜĐÄæŲŅíâāöėí˙ôú˙ų˙˙÷˙˙ú˙˙ü˙ūũ˙ũü˙ûüūüūũū˙˙ūūūūūūūūūūūūūūūūūū˙ūü˙ūüūũûūũû˙ũú˙ũú˙ũú˙ûø˙úöūųõ˙ũü˙ûúũųúūúûūüũ˙ũū˙ū˙˙ũū˙üû˙ũú˙üú˙øķ÷ėæōåŨøęá˙ôî˙úũ˙ü˙˙ũū˙˙ũ˙˙ûũ˙úũ˙ūüũ˙üũ˙ũū˙˙ū˙˙˙ũ˙ūõ˙ũė˙ûãūúß˙üæ˙˙éįâˌˆoRL2TO2TM0UN1TN.UO/VQ3VQ3UQ4SO2ON2NM1PL1NM1NL3KN3LN6KQ7KP9JR:LU:IR5JS6OY7SZ9T[9]c?fnG‚’c’ĻsŸą›Ē’Ązˆ”pr{\\bFLP7KM5LK6KI4LJ5PK5TN8VP:WQ;VP:SN;QL9LI:IG:GE9CE:=>6:@6:@69A67B47B46C26C2;C8;C8:B79A69A6:B7;C8;C8;C8;C8;C8;C8F;=G<=G?=G<=H8>F7=E6=C7=B;:A:7A95?64B19I/BV3Ne;Uo?Tu@RtAPmAE`=9P6-C.+<*+<)1C-jpegfile +or + djpeg [switches] [jpegfile] >imagefile +The programs read the specified input file, or standard input if none is +named. They always write to standard output (with trace/error messages to +standard error). These conventions are handy for piping images between +programs. + +On most non-Unix systems, you say: + cjpeg [switches] imagefile jpegfile +or + djpeg [switches] jpegfile imagefile +i.e., both the input and output files are named on the command line. This +style is a little more foolproof, and it loses no functionality if you don't +have pipes. (You can get this style on Unix too, if you prefer, by defining +TWO_FILE_COMMANDLINE when you compile the programs; see install.doc.) + +You can also say: + cjpeg [switches] -outfile jpegfile imagefile +or + djpeg [switches] -outfile imagefile jpegfile +This syntax works on all systems, so it is useful for scripts. + +The currently supported image file formats are: PPM (PBMPLUS color format), +PGM (PBMPLUS gray-scale format), BMP, GIF, Targa, and RLE (Utah Raster Toolkit +format). (RLE is supported only if the URT library is available.) +cjpeg recognizes the input image format automatically, with the exception +of some Targa-format files. You have to tell djpeg which format to generate. + +JPEG files are in the defacto standard JFIF file format. There are other, +less widely used JPEG-based file formats, but we don't support them. + +All switch names may be abbreviated; for example, -grayscale may be written +-gray or -gr. Most of the "basic" switches can be abbreviated to as little as +one letter. Upper and lower case are equivalent (-GIF is the same as -gif). +British spellings are also accepted (e.g., -greyscale), though for brevity +these are not mentioned below. + + +CJPEG DETAILS + +The basic command line switches for cjpeg are: + + -quality N Scale quantization tables to adjust image quality. + Quality is 0 (worst) to 100 (best); default is 75. + (See below for more info.) + + -grayscale Create monochrome JPEG file from color input. + Be sure to use this switch when compressing a grayscale + GIF file, because cjpeg isn't bright enough to notice + whether a GIF file uses only shades of gray. By + saying -grayscale, you'll get a smaller JPEG file that + takes less time to process. + + -optimize Perform optimization of entropy encoding parameters. + Without this, default encoding parameters are used. + -optimize usually makes the JPEG file a little smaller, + but cjpeg runs somewhat slower and needs much more + memory. Image quality and speed of decompression are + unaffected by -optimize. + + -progressive Create progressive JPEG file (see below). + + -targa Input file is Targa format. Targa files that contain + an "identification" field will not be automatically + recognized by cjpeg; for such files you must specify + -targa to make cjpeg treat the input as Targa format. + For most Targa files, you won't need this switch. + +The -quality switch lets you trade off compressed file size against quality of +the reconstructed image: the higher the quality setting, the larger the JPEG +file, and the closer the output image will be to the original input. Normally +you want to use the lowest quality setting (smallest file) that decompresses +into something visually indistinguishable from the original image. For this +purpose the quality setting should be between 50 and 95; the default of 75 is +often about right. If you see defects at -quality 75, then go up 5 or 10 +counts at a time until you are happy with the output image. (The optimal +setting will vary from one image to another.) + +-quality 100 will generate a quantization table of all 1's, minimizing loss +in the quantization step (but there is still information loss in subsampling, +as well as roundoff error). This setting is mainly of interest for +experimental purposes. Quality values above about 95 are NOT recommended for +normal use; the compressed file size goes up dramatically for hardly any gain +in output image quality. + +In the other direction, quality values below 50 will produce very small files +of low image quality. Settings around 5 to 10 might be useful in preparing an +index of a large image library, for example. Try -quality 2 (or so) for some +amusing Cubist effects. (Note: quality values below about 25 generate 2-byte +quantization tables, which are considered optional in the JPEG standard. +cjpeg emits a warning message when you give such a quality value, because some +other JPEG programs may be unable to decode the resulting file. Use -baseline +if you need to ensure compatibility at low quality values.) + +The -progressive switch creates a "progressive JPEG" file. In this type of +JPEG file, the data is stored in multiple scans of increasing quality. If the +file is being transmitted over a slow communications link, the decoder can use +the first scan to display a low-quality image very quickly, and can then +improve the display with each subsequent scan. The final image is exactly +equivalent to a standard JPEG file of the same quality setting, and the total +file size is about the same --- often a little smaller. CAUTION: progressive +JPEG is not yet widely implemented, so many decoders will be unable to view a +progressive JPEG file at all. + +Switches for advanced users: + + -dct int Use integer DCT method (default). + -dct fast Use fast integer DCT (less accurate). + -dct float Use floating-point DCT method. + The float method is very slightly more accurate than + the int method, but is much slower unless your machine + has very fast floating-point hardware. Also note that + results of the floating-point method may vary slightly + across machines, while the integer methods should give + the same results everywhere. The fast integer method + is much less accurate than the other two. + + -restart N Emit a JPEG restart marker every N MCU rows, or every + N MCU blocks if "B" is attached to the number. + -restart 0 (the default) means no restart markers. + + -smooth N Smooth the input image to eliminate dithering noise. + N, ranging from 1 to 100, indicates the strength of + smoothing. 0 (the default) means no smoothing. + + -maxmemory N Set limit for amount of memory to use in processing + large images. Value is in thousands of bytes, or + millions of bytes if "M" is attached to the number. + For example, -max 4m selects 4000000 bytes. If more + space is needed, temporary files will be used. + + -verbose Enable debug printout. More -v's give more printout. + or -debug Also, version information is printed at startup. + +The -restart option inserts extra markers that allow a JPEG decoder to +resynchronize after a transmission error. Without restart markers, any damage +to a compressed file will usually ruin the image from the point of the error +to the end of the image; with restart markers, the damage is usually confined +to the portion of the image up to the next restart marker. Of course, the +restart markers occupy extra space. We recommend -restart 1 for images that +will be transmitted across unreliable networks such as Usenet. + +The -smooth option filters the input to eliminate fine-scale noise. This is +often useful when converting GIF files to JPEG: a moderate smoothing factor of +10 to 50 gets rid of dithering patterns in the input file, resulting in a +smaller JPEG file and a better-looking image. Too large a smoothing factor +will visibly blur the image, however. + +Switches for wizards: + + -baseline Force a baseline JPEG file to be generated. This + clamps quantization values to 8 bits even at low + quality settings. + + -qtables file Use the quantization tables given in the specified + text file. + + -qslots N[,...] Select which quantization table to use for each color + component. + + -sample HxV[,...] Set JPEG sampling factors for each color component. + + -scans file Use the scan script given in the specified text file. + +The "wizard" switches are intended for experimentation with JPEG. If you +don't know what you are doing, DON'T USE THEM. These switches are documented +further in the file wizard.doc. + + +DJPEG DETAILS + +The basic command line switches for djpeg are: + + -colors N Reduce image to at most N colors. This reduces the + or -quantize N number of colors used in the output image, so that it + can be displayed on a colormapped display or stored in + a colormapped file format. For example, if you have + an 8-bit display, you'd need to reduce to 256 or fewer + colors. (-colors is the recommended name, -quantize + is provided only for backwards compatibility.) + + -fast Select recommended processing options for fast, low + quality output. (The default options are chosen for + highest quality output.) Currently, this is equivalent + to "-dct fast -nosmooth -onepass -dither ordered". + + -grayscale Force gray-scale output even if JPEG file is color. + Useful for viewing on monochrome displays; also, + djpeg runs noticeably faster in this mode. + + -scale M/N Scale the output image by a factor M/N. Currently + the scale factor must be 1/1, 1/2, 1/4, or 1/8. + Scaling is handy if the image is larger than your + screen; also, djpeg runs much faster when scaling + down the output. + + -bmp Select BMP output format (Windows flavor). 8-bit + colormapped format is emitted if -colors or -grayscale + is specified, or if the JPEG file is gray-scale; + otherwise, 24-bit full-color format is emitted. + + -gif Select GIF output format. Since GIF does not support + more than 256 colors, -colors 256 is assumed (unless + you specify a smaller number of colors). If you + specify -fast, the default number of colors is 216. + + -os2 Select BMP output format (OS/2 1.x flavor). 8-bit + colormapped format is emitted if -colors or -grayscale + is specified, or if the JPEG file is gray-scale; + otherwise, 24-bit full-color format is emitted. + + -pnm Select PBMPLUS (PPM/PGM) output format (this is the + default format). PGM is emitted if the JPEG file is + gray-scale or if -grayscale is specified; otherwise + PPM is emitted. + + -rle Select RLE output format. (Requires URT library.) + + -targa Select Targa output format. Gray-scale format is + emitted if the JPEG file is gray-scale or if + -grayscale is specified; otherwise, colormapped format + is emitted if -colors is specified; otherwise, 24-bit + full-color format is emitted. + +Switches for advanced users: + + -dct int Use integer DCT method (default). + -dct fast Use fast integer DCT (less accurate). + -dct float Use floating-point DCT method. + The float method is very slightly more accurate than + the int method, but is much slower unless your machine + has very fast floating-point hardware. Also note that + results of the floating-point method may vary slightly + across machines, while the integer methods should give + the same results everywhere. The fast integer method + is much less accurate than the other two. + + -dither fs Use Floyd-Steinberg dithering in color quantization. + -dither ordered Use ordered dithering in color quantization. + -dither none Do not use dithering in color quantization. + By default, Floyd-Steinberg dithering is applied when + quantizing colors; this is slow but usually produces + the best results. Ordered dither is a compromise + between speed and quality; no dithering is fast but + usually looks awful. Note that these switches have + no effect unless color quantization is being done. + Ordered dither is only available in -onepass mode. + + -map FILE Quantize to the colors used in the specified image + file. This is useful for producing multiple files + with identical color maps, or for forcing a predefined + set of colors to be used. The FILE must be a GIF + or PPM file. This option overrides -colors and + -onepass. + + -nosmooth Use a faster, lower-quality upsampling routine. + + -onepass Use one-pass instead of two-pass color quantization. + The one-pass method is faster and needs less memory, + but it produces a lower-quality image. -onepass is + ignored unless you also say -colors N. Also, + the one-pass method is always used for gray-scale + output (the two-pass method is no improvement then). + + -maxmemory N Set limit for amount of memory to use in processing + large images. Value is in thousands of bytes, or + millions of bytes if "M" is attached to the number. + For example, -max 4m selects 4000000 bytes. If more + space is needed, temporary files will be used. + + -verbose Enable debug printout. More -v's give more printout. + or -debug Also, version information is printed at startup. + + +HINTS FOR CJPEG + +Color GIF files are not the ideal input for JPEG; JPEG is really intended for +compressing full-color (24-bit) images. In particular, don't try to convert +cartoons, line drawings, and other images that have only a few distinct +colors. GIF works great on these, JPEG does not. If you want to convert a +GIF to JPEG, you should experiment with cjpeg's -quality and -smooth options +to get a satisfactory conversion. -smooth 10 or so is often helpful. + +Avoid running an image through a series of JPEG compression/decompression +cycles. Image quality loss will accumulate; after ten or so cycles the image +may be noticeably worse than it was after one cycle. It's best to use a +lossless format while manipulating an image, then convert to JPEG format when +you are ready to file the image away. + +The -optimize option to cjpeg is worth using when you are making a "final" +version for posting or archiving. It's also a win when you are using low +quality settings to make very small JPEG files; the percentage improvement +is often a lot more than it is on larger files. (At present, -optimize +mode is always selected when generating progressive JPEG files.) + + +HINTS FOR DJPEG + +To get a quick preview of an image, use the -grayscale and/or -scale switches. +"-grayscale -scale 1/8" is the fastest case. + +Several options are available that trade off image quality to gain speed. +"-fast" turns on the recommended settings. + +"-dct fast" and/or "-nosmooth" gain speed at a small sacrifice in quality. +When producing a color-quantized image, "-onepass -dither ordered" is fast but +much lower quality than the default behavior. "-dither none" may give +acceptable results in two-pass mode, but is seldom tolerable in one-pass mode. + +If you are fortunate enough to have very fast floating point hardware, +"-dct float" may be even faster than "-dct fast". But on most machines +"-dct float" is slower than "-dct int"; in this case it is not worth using, +because its theoretical accuracy advantage is too small to be significant +in practice. + +Two-pass color quantization requires a good deal of memory; on MS-DOS machines +it may run out of memory even with -maxmemory 0. In that case you can still +decompress, with some loss of image quality, by specifying -onepass for +one-pass quantization. + + +HINTS FOR BOTH PROGRAMS + +If more space is needed than will fit in the available main memory (as +determined by -maxmemory), temporary files will be used. (MS-DOS versions +will try to get extended or expanded memory first.) The temporary files are +often rather large: in typical cases they occupy three bytes per pixel, for +example 3*800*600 = 1.44Mb for an 800x600 image. If you don't have enough +free disk space, leave out -progressive and -optimize (for cjpeg) or specify +-onepass (for djpeg). + +On MS-DOS, the temporary files are created in the directory named by the TMP +or TEMP environment variable, or in the current directory if neither of those +exist. Amiga implementations put the temp files in the directory named by +JPEGTMP:, so be sure to assign JPEGTMP: to a disk partition with adequate free +space. + +The default memory usage limit (-maxmemory) is set when the software is +compiled. If you get an "insufficient memory" error, try specifying a smaller +-maxmemory value, even -maxmemory 0 to use the absolute minimum space. You +may want to recompile with a smaller default value if this happens often. + +On machines that have "environment" variables, you can define the environment +variable JPEGMEM to set the default memory limit. The value is specified as +described for the -maxmemory switch. JPEGMEM overrides the default value +specified when the program was compiled, and itself is overridden by an +explicit -maxmemory switch. + +On MS-DOS machines, -maxmemory is the amount of main (conventional) memory to +use. (Extended or expanded memory is also used if available.) Most +DOS-specific versions of this software do their own memory space estimation +and do not need you to specify -maxmemory. + + +JPEGTRAN + +jpegtran translates JPEG files from one variant of JPEG to another, for +example from baseline JPEG to progressive JPEG or vice versa. The +transformation is lossless: no image degradation occurs, which would not +be true if you used djpeg followed by cjpeg. However, you cannot alter +the image quality, because that would not be a lossless operation. + +jpegtran operates similarly to cjpeg, except that it reads a JPEG file +and writes another JPEG file. + +jpegtran accepts a subset of the switches recognized by cjpeg: + -outfile filename + -optimize + -progressive + -restart N + -scans file + -maxmemory N + -verbose + -debug +See the previous discussion of cjpeg for details about these switches. + +If you specify no switches, you get a plain baseline-JPEG output file. + + +THE COMMENT UTILITIES + +The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. +Although the standard doesn't actually define what COM blocks are for, they +are widely used to hold user-supplied text strings. This lets you add +annotations, titles, index terms, etc to your JPEG files, and later retrieve +them as text. COM blocks do not interfere with the image stored in the JPEG +file. The maximum size of a COM block is 64K, but you can have as many of +them as you like in one JPEG file. + +We provide two utility programs to display COM block contents and add COM +blocks to a JPEG file. + +rdjpgcom searches a JPEG file and prints the contents of any COM blocks on +standard output. The command line syntax is + rdjpgcom [-verbose] [inputfilename] +The switch "-verbose" (or just "-v") causes rdjpgcom to also display the JPEG +image dimensions. If you omit the input file name from the command line, +the JPEG file is read from standard input. (This may not work on some +operating systems, if binary data can't be read from stdin.) + +wrjpgcom adds a COM block, containing text you provide, to a JPEG file. +Ordinarily, the COM block is added after any existing COM blocks, but you +can delete the old COM blocks if you wish. wrjpgcom produces a new JPEG +file; it does not modify the input file. DO NOT try to overwrite the input +file by directing wrjpgcom's output back into it; on most systems this will +just destroy your file. + +The command line syntax for wrjpgcom is similar to cjpeg's. On Unix-like +systems, it is + wrjpgcom [switches] [inputfilename] +The output file is written to standard output. The input file comes from +the named file, or from standard input if no input file is named. + +On most non-Unix systems, the syntax is + wrjpgcom [switches] inputfilename outputfilename +where both input and output file names must be given explicitly. + +wrjpgcom understands three switches: + -replace Delete any existing COM blocks from the file. + -comment "Comment text" Supply new COM text on command line. + -cfile name Read text for new COM block from named file. +(Switch names can be abbreviated.) If you have only one line of comment text +to add, you can provide it on the command line with -comment. The comment +text must be surrounded with quotes so that it is treated as a single +argument. Longer comments can be read from a text file. + +If you give neither -comment nor -cfile, then wrjpgcom will read the comment +text from standard input. (In this case an input image file name MUST be +supplied, so that the source JPEG file comes from somewhere else.) You can +enter multiple lines, up to 64KB worth. Type an end-of-file indicator +(usually control-D or control-Z) to terminate the comment text entry. + +wrjpgcom will not add a COM block if the provided comment string is empty. +Therefore -replace -comment "" can be used to delete all COM blocks from a +file. + +These utility programs do not depend on the IJG JPEG library. In +particular, the source code for rdjpgcom is intended as an illustration of +the minimum amount of code required to parse a JPEG file header correctly. diff --git a/windows_libs/jpeg-6a/wizard.doc b/windows_libs/jpeg-6a/wizard.doc new file mode 100644 index 00000000..54170b22 --- /dev/null +++ b/windows_libs/jpeg-6a/wizard.doc @@ -0,0 +1,211 @@ +Advanced usage instructions for the Independent JPEG Group's JPEG software +========================================================================== + +This file describes cjpeg's "switches for wizards". + +The "wizard" switches are intended for experimentation with JPEG by persons +who are reasonably knowledgeable about the JPEG standard. If you don't know +what you are doing, DON'T USE THESE SWITCHES. You'll likely produce files +with worse image quality and/or poorer compression than you'd get from the +default settings. Furthermore, these switches must be used with caution +when making files intended for general use, because not all JPEG decoders +will support unusual JPEG parameter settings. + + +Quantization Table Adjustment +----------------------------- + +Ordinarily, cjpeg starts with a default set of tables (the same ones given +as examples in the JPEG standard) and scales them up or down according to +the -quality setting. The details of the scaling algorithm can be found in +jcparam.c. At very low quality settings, some quantization table entries +can get scaled up to values exceeding 255. Although 2-byte quantization +values are supported by the IJG software, this feature is not in baseline +JPEG and is not supported by all implementations. If you need to ensure +wide compatibility of low-quality files, you can constrain the scaled +quantization values to no more than 255 by giving the -baseline switch. +Note that use of -baseline will result in poorer quality for the same file +size, since more bits than necessary are expended on higher AC coefficients. + +You can substitute a different set of quantization values by using the +-qtables switch: + + -qtables file Use the quantization tables given in the named file. + +The specified file should be a text file containing decimal quantization +values. The file should contain one to four tables, each of 64 elements. +The tables are implicitly numbered 0,1,etc. in order of appearance. Table +entries appear in normal array order (NOT in the zigzag order in which they +will be stored in the JPEG file). + +Quantization table files are free format, in that arbitrary whitespace can +appear between numbers. Also, comments can be included: a comment starts +with '#' and extends to the end of the line. Here is an example file that +duplicates the default quantization tables: + + # Quantization tables given in JPEG spec, section K.1 + + # This is table 0 (the luminance table): + 16 11 10 16 24 40 51 61 + 12 12 14 19 26 58 60 55 + 14 13 16 24 40 57 69 56 + 14 17 22 29 51 87 80 62 + 18 22 37 56 68 109 103 77 + 24 35 55 64 81 104 113 92 + 49 64 78 87 103 121 120 101 + 72 92 95 98 112 100 103 99 + + # This is table 1 (the chrominance table): + 17 18 24 47 99 99 99 99 + 18 21 26 66 99 99 99 99 + 24 26 56 99 99 99 99 99 + 47 66 99 99 99 99 99 99 + 99 99 99 99 99 99 99 99 + 99 99 99 99 99 99 99 99 + 99 99 99 99 99 99 99 99 + 99 99 99 99 99 99 99 99 + +If the -qtables switch is used without -quality, then the specified tables +are used exactly as-is. If both -qtables and -quality are used, then the +tables taken from the file are scaled in the same fashion that the default +tables would be scaled for that quality setting. If -baseline appears, then +the quantization values are constrained to the range 1-255. + +By default, cjpeg will use quantization table 0 for luminance components and +table 1 for chrominance components. To override this choice, use the -qslots +switch: + + -qslots N[,...] Select which quantization table to use for + each color component. + +The -qslots switch specifies a quantization table number for each color +component, in the order in which the components appear in the JPEG SOF marker. +For example, to create a separate table for each of Y,Cb,Cr, you could +provide a -qtables file that defines three quantization tables and say +"-qslots 0,1,2". If -qslots gives fewer table numbers than there are color +components, then the last table number is repeated as necessary. + + +Sampling Factor Adjustment +-------------------------- + +By default, cjpeg uses 2:1 horizontal and vertical downsampling when +compressing YCbCr data, and no downsampling for all other color spaces. +You can override this default with the -sample switch: + + -sample HxV[,...] Set JPEG sampling factors for each color + component. + +The -sample switch specifies the JPEG sampling factors for each color +component, in the order in which they appear in the JPEG SOF marker. +If you specify fewer HxV pairs than there are components, the remaining +components are set to 1x1 sampling. For example, the default YCbCr setting +is equivalent to "-sample 2x2,1x1,1x1", which can be abbreviated to +"-sample 2x2". + +There are still some JPEG decoders in existence that support only 2x1 +sampling (also called 4:2:2 sampling). Compatibility with such decoders can +be achieved by specifying "-sample 2x1". This is not recommended unless +really necessary, since it increases file size and encoding/decoding time +with very little quality gain. + + +Multiple Scan / Progression Control +----------------------------------- + +By default, cjpeg emits a single-scan sequential JPEG file. The +-progressive switch generates a progressive JPEG file using a default series +of progression parameters. You can create multiple-scan sequential JPEG +files or progressive JPEG files with custom progression parameters by using +the -scans switch: + + -scans file Use the scan sequence given in the named file. + +The specified file should be a text file containing a "scan script". +The script specifies the contents and ordering of the scans to be emitted. +Each entry in the script defines one scan. A scan definition specifies +the components to be included in the scan, and for progressive JPEG it also +specifies the progression parameters Ss,Se,Ah,Al for the scan. Scan +definitions are separated by semicolons (';'). A semicolon after the last +scan definition is optional. + +Each scan definition contains one to four component indexes, optionally +followed by a colon (':') and the four progressive-JPEG parameters. The +component indexes denote which color component(s) are to be transmitted in +the scan. Components are numbered in the order in which they appear in the +JPEG SOF marker, with the first component being numbered 0. (Note that these +indexes are not the "component ID" codes assigned to the components, just +positional indexes.) + +The progression parameters for each scan are: + Ss Zigzag index of first coefficient included in scan + Se Zigzag index of last coefficient included in scan + Ah Zero for first scan of a coefficient, else Al of prior scan + Al Successive approximation low bit position for scan +If the progression parameters are omitted, the values 0,63,0,0 are used, +producing a sequential JPEG file. cjpeg automatically determines whether +the script represents a progressive or sequential file, by observing whether +Ss and Se values other than 0 and 63 appear. (The -progressive switch is +not needed to specify this; in fact, it is ignored when -scans appears.) +The scan script must meet the JPEG restrictions on progression sequences. +(cjpeg checks that the spec's requirements are obeyed.) + +Scan script files are free format, in that arbitrary whitespace can appear +between numbers and around punctuation. Also, comments can be included: a +comment starts with '#' and extends to the end of the line. For additional +legibility, commas or dashes can be placed between values. (Actually, any +single punctuation character other than ':' or ';' can be inserted.) For +example, the following two scan definitions are equivalent: + 0 1 2: 0 63 0 0; + 0,1,2 : 0-63, 0,0 ; + +Here is an example of a scan script that generates a partially interleaved +sequential JPEG file: + + 0; # Y only in first scan + 1 2; # Cb and Cr in second scan + +Here is an example of a progressive scan script using only spectral selection +(no successive approximation): + + # Interleaved DC scan for Y,Cb,Cr: + 0,1,2: 0-0, 0, 0 ; + # AC scans: + 0: 1-2, 0, 0 ; # First two Y AC coefficients + 0: 3-5, 0, 0 ; # Three more + 1: 1-63, 0, 0 ; # All AC coefficients for Cb + 2: 1-63, 0, 0 ; # All AC coefficients for Cr + 0: 6-9, 0, 0 ; # More Y coefficients + 0: 10-63, 0, 0 ; # Remaining Y coefficients + +Here is an example of a successive-approximation script. This is equivalent +to the default script used by "cjpeg -progressive" for YCbCr images: + + # Initial DC scan for Y,Cb,Cr (lowest bit not sent) + 0,1,2: 0-0, 0, 1 ; + # First AC scan: send first 5 Y AC coefficients, minus 2 lowest bits: + 0: 1-5, 0, 2 ; + # Send all Cr,Cb AC coefficients, minus lowest bit: + # (chroma data is usually too small to be worth subdividing further; + # but note we send Cr first since eye is least sensitive to Cb) + 2: 1-63, 0, 1 ; + 1: 1-63, 0, 1 ; + # Send remaining Y AC coefficients, minus 2 lowest bits: + 0: 6-63, 0, 2 ; + # Send next-to-lowest bit of all Y AC coefficients: + 0: 1-63, 2, 1 ; + # At this point we've sent all but the lowest bit of all coefficients. + # Send lowest bit of DC coefficients + 0,1,2: 0-0, 1, 0 ; + # Send lowest bit of AC coefficients + 2: 1-63, 1, 0 ; + 1: 1-63, 1, 0 ; + # Y AC lowest bit scan is last; it's usually the largest scan + 0: 1-63, 1, 0 ; + +It may be worth pointing out that this script is tuned for quality settings +of around 50 to 75. For lower quality settings, you'd probably want to use +a script with fewer stages of successive approximation (otherwise the +initial scans will be really bad). For higher quality settings, you might +want to use more stages of successive approximation (so that the initial +scans are not too large). diff --git a/windows_libs/jpeg-6a/wrbmp.c b/windows_libs/jpeg-6a/wrbmp.c new file mode 100644 index 00000000..3283b0f1 --- /dev/null +++ b/windows_libs/jpeg-6a/wrbmp.c @@ -0,0 +1,442 @@ +/* + * wrbmp.c + * + * Copyright (C) 1994-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write output images in Microsoft "BMP" + * format (MS Windows 3.x and OS/2 1.x flavors). + * Either 8-bit colormapped or 24-bit full-color format can be written. + * No compression is supported. + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume output to + * an ordinary stdio stream. + * + * This code contributed by James Arthur Boucher. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef BMP_SUPPORTED + + +/* + * To support 12-bit JPEG data, we'd have to scale output down to 8 bits. + * This is not yet implemented. + */ + +#if BITS_IN_JSAMPLE != 8 + Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ +#endif + +/* + * Since BMP stores scanlines bottom-to-top, we have to invert the image + * from JPEG's top-to-bottom order. To do this, we save the outgoing data + * in a virtual array during put_pixel_row calls, then actually emit the + * BMP file during finish_output. The virtual array contains one JSAMPLE per + * pixel if the output is grayscale or colormapped, three if it is full color. + */ + +/* Private version of data destination object */ + +typedef struct { + struct djpeg_dest_struct pub; /* public fields */ + + boolean is_os2; /* saves the OS2 format request flag */ + + jvirt_sarray_ptr whole_image; /* needed to reverse row order */ + JDIMENSION data_width; /* JSAMPLEs per row */ + JDIMENSION row_width; /* physical width of one row in the BMP file */ + int pad_bytes; /* number of padding bytes needed per row */ + JDIMENSION cur_output_row; /* next row# to write to virtual array */ +} bmp_dest_struct; + +typedef bmp_dest_struct * bmp_dest_ptr; + + +/* Forward declarations */ +LOCAL(void) write_colormap + JPP((j_decompress_ptr cinfo, bmp_dest_ptr dest, + int map_colors, int map_entry_size)); + + +/* + * Write some pixel data. + * In this module rows_supplied will always be 1. + */ + +METHODDEF(void) +put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +/* This version is for writing 24-bit pixels */ +{ + bmp_dest_ptr dest = (bmp_dest_ptr) dinfo; + JSAMPARRAY image_ptr; + register JSAMPROW inptr, outptr; + register JDIMENSION col; + int pad; + + /* Access next row in virtual array */ + image_ptr = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->whole_image, + dest->cur_output_row, (JDIMENSION) 1, TRUE); + dest->cur_output_row++; + + /* Transfer data. Note destination values must be in BGR order + * (even though Microsoft's own documents say the opposite). + */ + inptr = dest->pub.buffer[0]; + outptr = image_ptr[0]; + for (col = cinfo->output_width; col > 0; col--) { + outptr[2] = *inptr++; /* can omit GETJSAMPLE() safely */ + outptr[1] = *inptr++; + outptr[0] = *inptr++; + outptr += 3; + } + + /* Zero out the pad bytes. */ + pad = dest->pad_bytes; + while (--pad >= 0) + *outptr++ = 0; +} + +METHODDEF(void) +put_gray_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +/* This version is for grayscale OR quantized color output */ +{ + bmp_dest_ptr dest = (bmp_dest_ptr) dinfo; + JSAMPARRAY image_ptr; + register JSAMPROW inptr, outptr; + register JDIMENSION col; + int pad; + + /* Access next row in virtual array */ + image_ptr = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->whole_image, + dest->cur_output_row, (JDIMENSION) 1, TRUE); + dest->cur_output_row++; + + /* Transfer data. */ + inptr = dest->pub.buffer[0]; + outptr = image_ptr[0]; + for (col = cinfo->output_width; col > 0; col--) { + *outptr++ = *inptr++; /* can omit GETJSAMPLE() safely */ + } + + /* Zero out the pad bytes. */ + pad = dest->pad_bytes; + while (--pad >= 0) + *outptr++ = 0; +} + + +/* + * Startup: normally writes the file header. + * In this module we may as well postpone everything until finish_output. + */ + +METHODDEF(void) +start_output_bmp (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + /* no work here */ +} + + +/* + * Finish up at the end of the file. + * + * Here is where we really output the BMP file. + * + * First, routines to write the Windows and OS/2 variants of the file header. + */ + +LOCAL(void) +write_bmp_header (j_decompress_ptr cinfo, bmp_dest_ptr dest) +/* Write a Windows-style BMP file header, including colormap if needed */ +{ + char bmpfileheader[14]; + char bmpinfoheader[40]; +#define PUT_2B(array,offset,value) \ + (array[offset] = (char) ((value) & 0xFF), \ + array[offset+1] = (char) (((value) >> 8) & 0xFF)) +#define PUT_4B(array,offset,value) \ + (array[offset] = (char) ((value) & 0xFF), \ + array[offset+1] = (char) (((value) >> 8) & 0xFF), \ + array[offset+2] = (char) (((value) >> 16) & 0xFF), \ + array[offset+3] = (char) (((value) >> 24) & 0xFF)) + INT32 headersize, bfSize; + int bits_per_pixel, cmap_entries; + + /* Compute colormap size and total file size */ + if (cinfo->out_color_space == JCS_RGB) { + if (cinfo->quantize_colors) { + /* Colormapped RGB */ + bits_per_pixel = 8; + cmap_entries = 256; + } else { + /* Unquantized, full color RGB */ + bits_per_pixel = 24; + cmap_entries = 0; + } + } else { + /* Grayscale output. We need to fake a 256-entry colormap. */ + bits_per_pixel = 8; + cmap_entries = 256; + } + /* File size */ + headersize = 14 + 40 + cmap_entries * 4; /* Header and colormap */ + bfSize = headersize + (INT32) dest->row_width * (INT32) cinfo->output_height; + + /* Set unused fields of header to 0 */ + MEMZERO(bmpfileheader, SIZEOF(bmpfileheader)); + MEMZERO(bmpinfoheader, SIZEOF(bmpinfoheader)); + + /* Fill the file header */ + bmpfileheader[0] = 0x42; /* first 2 bytes are ASCII 'B', 'M' */ + bmpfileheader[1] = 0x4D; + PUT_4B(bmpfileheader, 2, bfSize); /* bfSize */ + /* we leave bfReserved1 & bfReserved2 = 0 */ + PUT_4B(bmpfileheader, 10, headersize); /* bfOffBits */ + + /* Fill the info header (Microsoft calls this a BITMAPINFOHEADER) */ + PUT_2B(bmpinfoheader, 0, 40); /* biSize */ + PUT_4B(bmpinfoheader, 4, cinfo->output_width); /* biWidth */ + PUT_4B(bmpinfoheader, 8, cinfo->output_height); /* biHeight */ + PUT_2B(bmpinfoheader, 12, 1); /* biPlanes - must be 1 */ + PUT_2B(bmpinfoheader, 14, bits_per_pixel); /* biBitCount */ + /* we leave biCompression = 0, for none */ + /* we leave biSizeImage = 0; this is correct for uncompressed data */ + if (cinfo->density_unit == 2) { /* if have density in dots/cm, then */ + PUT_4B(bmpinfoheader, 24, (INT32) (cinfo->X_density*100)); /* XPels/M */ + PUT_4B(bmpinfoheader, 28, (INT32) (cinfo->Y_density*100)); /* XPels/M */ + } + PUT_2B(bmpinfoheader, 32, cmap_entries); /* biClrUsed */ + /* we leave biClrImportant = 0 */ + + if (JFWRITE(dest->pub.output_file, bmpfileheader, 14) != (size_t) 14) + ERREXIT(cinfo, JERR_FILE_WRITE); + if (JFWRITE(dest->pub.output_file, bmpinfoheader, 40) != (size_t) 40) + ERREXIT(cinfo, JERR_FILE_WRITE); + + if (cmap_entries > 0) + write_colormap(cinfo, dest, cmap_entries, 4); +} + + +LOCAL(void) +write_os2_header (j_decompress_ptr cinfo, bmp_dest_ptr dest) +/* Write an OS2-style BMP file header, including colormap if needed */ +{ + char bmpfileheader[14]; + char bmpcoreheader[12]; + INT32 headersize, bfSize; + int bits_per_pixel, cmap_entries; + + /* Compute colormap size and total file size */ + if (cinfo->out_color_space == JCS_RGB) { + if (cinfo->quantize_colors) { + /* Colormapped RGB */ + bits_per_pixel = 8; + cmap_entries = 256; + } else { + /* Unquantized, full color RGB */ + bits_per_pixel = 24; + cmap_entries = 0; + } + } else { + /* Grayscale output. We need to fake a 256-entry colormap. */ + bits_per_pixel = 8; + cmap_entries = 256; + } + /* File size */ + headersize = 14 + 12 + cmap_entries * 3; /* Header and colormap */ + bfSize = headersize + (INT32) dest->row_width * (INT32) cinfo->output_height; + + /* Set unused fields of header to 0 */ + MEMZERO(bmpfileheader, SIZEOF(bmpfileheader)); + MEMZERO(bmpcoreheader, SIZEOF(bmpcoreheader)); + + /* Fill the file header */ + bmpfileheader[0] = 0x42; /* first 2 bytes are ASCII 'B', 'M' */ + bmpfileheader[1] = 0x4D; + PUT_4B(bmpfileheader, 2, bfSize); /* bfSize */ + /* we leave bfReserved1 & bfReserved2 = 0 */ + PUT_4B(bmpfileheader, 10, headersize); /* bfOffBits */ + + /* Fill the info header (Microsoft calls this a BITMAPCOREHEADER) */ + PUT_2B(bmpcoreheader, 0, 12); /* bcSize */ + PUT_2B(bmpcoreheader, 4, cinfo->output_width); /* bcWidth */ + PUT_2B(bmpcoreheader, 6, cinfo->output_height); /* bcHeight */ + PUT_2B(bmpcoreheader, 8, 1); /* bcPlanes - must be 1 */ + PUT_2B(bmpcoreheader, 10, bits_per_pixel); /* bcBitCount */ + + if (JFWRITE(dest->pub.output_file, bmpfileheader, 14) != (size_t) 14) + ERREXIT(cinfo, JERR_FILE_WRITE); + if (JFWRITE(dest->pub.output_file, bmpcoreheader, 12) != (size_t) 12) + ERREXIT(cinfo, JERR_FILE_WRITE); + + if (cmap_entries > 0) + write_colormap(cinfo, dest, cmap_entries, 3); +} + + +/* + * Write the colormap. + * Windows uses BGR0 map entries; OS/2 uses BGR entries. + */ + +LOCAL(void) +write_colormap (j_decompress_ptr cinfo, bmp_dest_ptr dest, + int map_colors, int map_entry_size) +{ + JSAMPARRAY colormap = cinfo->colormap; + int num_colors = cinfo->actual_number_of_colors; + FILE * outfile = dest->pub.output_file; + int i; + + if (colormap != NULL) { + if (cinfo->out_color_components == 3) { + /* Normal case with RGB colormap */ + for (i = 0; i < num_colors; i++) { + putc(GETJSAMPLE(colormap[2][i]), outfile); + putc(GETJSAMPLE(colormap[1][i]), outfile); + putc(GETJSAMPLE(colormap[0][i]), outfile); + if (map_entry_size == 4) + putc(0, outfile); + } + } else { + /* Grayscale colormap (only happens with grayscale quantization) */ + for (i = 0; i < num_colors; i++) { + putc(GETJSAMPLE(colormap[0][i]), outfile); + putc(GETJSAMPLE(colormap[0][i]), outfile); + putc(GETJSAMPLE(colormap[0][i]), outfile); + if (map_entry_size == 4) + putc(0, outfile); + } + } + } else { + /* If no colormap, must be grayscale data. Generate a linear "map". */ + for (i = 0; i < 256; i++) { + putc(i, outfile); + putc(i, outfile); + putc(i, outfile); + if (map_entry_size == 4) + putc(0, outfile); + } + } + /* Pad colormap with zeros to ensure specified number of colormap entries */ + if (i > map_colors) + ERREXIT1(cinfo, JERR_TOO_MANY_COLORS, i); + for (; i < map_colors; i++) { + putc(0, outfile); + putc(0, outfile); + putc(0, outfile); + if (map_entry_size == 4) + putc(0, outfile); + } +} + + +METHODDEF(void) +finish_output_bmp (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + bmp_dest_ptr dest = (bmp_dest_ptr) dinfo; + register FILE * outfile = dest->pub.output_file; + JSAMPARRAY image_ptr; + register JSAMPROW data_ptr; + JDIMENSION row; + register JDIMENSION col; + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + + /* Write the header and colormap */ + if (dest->is_os2) + write_os2_header(cinfo, dest); + else + write_bmp_header(cinfo, dest); + + /* Write the file body from our virtual array */ + for (row = cinfo->output_height; row > 0; row--) { + if (progress != NULL) { + progress->pub.pass_counter = (long) (cinfo->output_height - row); + progress->pub.pass_limit = (long) cinfo->output_height; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } + image_ptr = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->whole_image, row-1, (JDIMENSION) 1, FALSE); + data_ptr = image_ptr[0]; + for (col = dest->row_width; col > 0; col--) { + putc(GETJSAMPLE(*data_ptr), outfile); + data_ptr++; + } + } + if (progress != NULL) + progress->completed_extra_passes++; + + /* Make sure we wrote the output file OK */ + fflush(outfile); + if (ferror(outfile)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * The module selection routine for BMP format output. + */ + +GLOBAL(djpeg_dest_ptr) +jinit_write_bmp (j_decompress_ptr cinfo, boolean is_os2) +{ + bmp_dest_ptr dest; + JDIMENSION row_width; + + /* Create module interface object, fill in method pointers */ + dest = (bmp_dest_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(bmp_dest_struct)); + dest->pub.start_output = start_output_bmp; + dest->pub.finish_output = finish_output_bmp; + dest->is_os2 = is_os2; + + if (cinfo->out_color_space == JCS_GRAYSCALE) { + dest->pub.put_pixel_rows = put_gray_rows; + } else if (cinfo->out_color_space == JCS_RGB) { + if (cinfo->quantize_colors) + dest->pub.put_pixel_rows = put_gray_rows; + else + dest->pub.put_pixel_rows = put_pixel_rows; + } else { + ERREXIT(cinfo, JERR_BMP_COLORSPACE); + } + + /* Calculate output image dimensions so we can allocate space */ + jpeg_calc_output_dimensions(cinfo); + + /* Determine width of rows in the BMP file (padded to 4-byte boundary). */ + row_width = cinfo->output_width * cinfo->output_components; + dest->data_width = row_width; + while ((row_width & 3) != 0) row_width++; + dest->row_width = row_width; + dest->pad_bytes = (int) (row_width - dest->data_width); + + /* Allocate space for inversion array, prepare for write pass */ + dest->whole_image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + row_width, cinfo->output_height, (JDIMENSION) 1); + dest->cur_output_row = 0; + if (cinfo->progress != NULL) { + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; + progress->total_extra_passes++; /* count file input as separate pass */ + } + + /* Create decompressor output buffer. */ + dest->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, row_width, (JDIMENSION) 1); + dest->pub.buffer_height = 1; + + return (djpeg_dest_ptr) dest; +} + +#endif /* BMP_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/wrgif.c b/windows_libs/jpeg-6a/wrgif.c new file mode 100644 index 00000000..85cfaa8b --- /dev/null +++ b/windows_libs/jpeg-6a/wrgif.c @@ -0,0 +1,505 @@ +/* + * wrgif.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + ************************************************************************** + * WARNING: You will need an LZW patent license from Unisys in order to * + * use this file legally in any commercial or shareware application. * + ************************************************************************** + * + * This file contains routines to write output images in GIF format. + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume output to + * an ordinary stdio stream. + */ + +/* + * This code is loosely based on ppmtogif from the PBMPLUS distribution + * of Feb. 1991. That file contains the following copyright notice: + * Based on GIFENCODE by David Rowley . + * Lempel-Ziv compression based on "compress" by Spencer W. Thomas et al. + * Copyright (C) 1989 by Jef Poskanzer. + * Permission to use, copy, modify, and distribute this software and its + * documentation for any purpose and without fee is hereby granted, provided + * that the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation. This software is provided "as is" without express or + * implied warranty. + * + * We are also required to state that + * "The Graphics Interchange Format(c) is the Copyright property of + * CompuServe Incorporated. GIF(sm) is a Service Mark property of + * CompuServe Incorporated." + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef GIF_SUPPORTED + + +#define MAX_LZW_BITS 12 /* maximum LZW code size (4096 symbols) */ + +typedef INT16 code_int; /* must hold -1 .. 2**MAX_LZW_BITS */ + +#define LZW_TABLE_SIZE ((code_int) 1 << MAX_LZW_BITS) + +#define HSIZE 5003 /* hash table size for 80% occupancy */ + +typedef int hash_int; /* must hold -2*HSIZE..2*HSIZE */ + +#define MAXCODE(n_bits) (((code_int) 1 << (n_bits)) - 1) + + +/* + * The LZW hash table consists of two parallel arrays: + * hash_code[i] code of symbol in slot i, or 0 if empty slot + * hash_value[i] symbol's value; undefined if empty slot + * where slot values (i) range from 0 to HSIZE-1. The symbol value is + * its prefix symbol's code concatenated with its suffix character. + * + * Algorithm: use open addressing double hashing (no chaining) on the + * prefix code / suffix character combination. We do a variant of Knuth's + * algorithm D (vol. 3, sec. 6.4) along with G. Knott's relatively-prime + * secondary probe. + * + * The hash_value[] table is allocated from FAR heap space since it would + * use up rather a lot of the near data space in a PC. + */ + +typedef INT32 hash_entry; /* must hold (code_int<<8) | byte */ + +#define HASH_ENTRY(prefix,suffix) ((((hash_entry) (prefix)) << 8) | (suffix)) + + +/* Private version of data destination object */ + +typedef struct { + struct djpeg_dest_struct pub; /* public fields */ + + j_decompress_ptr cinfo; /* back link saves passing separate parm */ + + /* State for packing variable-width codes into a bitstream */ + int n_bits; /* current number of bits/code */ + code_int maxcode; /* maximum code, given n_bits */ + int init_bits; /* initial n_bits ... restored after clear */ + INT32 cur_accum; /* holds bits not yet output */ + int cur_bits; /* # of bits in cur_accum */ + + /* LZW string construction */ + code_int waiting_code; /* symbol not yet output; may be extendable */ + boolean first_byte; /* if TRUE, waiting_code is not valid */ + + /* State for LZW code assignment */ + code_int ClearCode; /* clear code (doesn't change) */ + code_int EOFCode; /* EOF code (ditto) */ + code_int free_code; /* first not-yet-used symbol code */ + + /* LZW hash table */ + code_int *hash_code; /* => hash table of symbol codes */ + hash_entry FAR *hash_value; /* => hash table of symbol values */ + + /* GIF data packet construction buffer */ + int bytesinpkt; /* # of bytes in current packet */ + char packetbuf[256]; /* workspace for accumulating packet */ + +} gif_dest_struct; + +typedef gif_dest_struct * gif_dest_ptr; + + +/* + * Routines to package compressed data bytes into GIF data blocks. + * A data block consists of a count byte (1..255) and that many data bytes. + */ + +LOCAL(void) +flush_packet (gif_dest_ptr dinfo) +/* flush any accumulated data */ +{ + if (dinfo->bytesinpkt > 0) { /* never write zero-length packet */ + dinfo->packetbuf[0] = (char) dinfo->bytesinpkt++; + if (JFWRITE(dinfo->pub.output_file, dinfo->packetbuf, dinfo->bytesinpkt) + != (size_t) dinfo->bytesinpkt) + ERREXIT(dinfo->cinfo, JERR_FILE_WRITE); + dinfo->bytesinpkt = 0; + } +} + + +/* Add a character to current packet; flush to disk if necessary */ +#define CHAR_OUT(dinfo,c) \ + { (dinfo)->packetbuf[++(dinfo)->bytesinpkt] = (char) (c); \ + if ((dinfo)->bytesinpkt >= 255) \ + flush_packet(dinfo); \ + } + + +/* Routine to convert variable-width codes into a byte stream */ + +LOCAL(void) +output (gif_dest_ptr dinfo, code_int code) +/* Emit a code of n_bits bits */ +/* Uses cur_accum and cur_bits to reblock into 8-bit bytes */ +{ + dinfo->cur_accum |= ((INT32) code) << dinfo->cur_bits; + dinfo->cur_bits += dinfo->n_bits; + + while (dinfo->cur_bits >= 8) { + CHAR_OUT(dinfo, dinfo->cur_accum & 0xFF); + dinfo->cur_accum >>= 8; + dinfo->cur_bits -= 8; + } + + /* + * If the next entry is going to be too big for the code size, + * then increase it, if possible. We do this here to ensure + * that it's done in sync with the decoder's codesize increases. + */ + if (dinfo->free_code > dinfo->maxcode) { + dinfo->n_bits++; + if (dinfo->n_bits == MAX_LZW_BITS) + dinfo->maxcode = LZW_TABLE_SIZE; /* free_code will never exceed this */ + else + dinfo->maxcode = MAXCODE(dinfo->n_bits); + } +} + + +/* The LZW algorithm proper */ + + +LOCAL(void) +clear_hash (gif_dest_ptr dinfo) +/* Fill the hash table with empty entries */ +{ + /* It's sufficient to zero hash_code[] */ + MEMZERO(dinfo->hash_code, HSIZE * SIZEOF(code_int)); +} + + +LOCAL(void) +clear_block (gif_dest_ptr dinfo) +/* Reset compressor and issue a Clear code */ +{ + clear_hash(dinfo); /* delete all the symbols */ + dinfo->free_code = dinfo->ClearCode + 2; + output(dinfo, dinfo->ClearCode); /* inform decoder */ + dinfo->n_bits = dinfo->init_bits; /* reset code size */ + dinfo->maxcode = MAXCODE(dinfo->n_bits); +} + + +LOCAL(void) +compress_init (gif_dest_ptr dinfo, int i_bits) +/* Initialize LZW compressor */ +{ + /* init all the state variables */ + dinfo->n_bits = dinfo->init_bits = i_bits; + dinfo->maxcode = MAXCODE(dinfo->n_bits); + dinfo->ClearCode = ((code_int) 1 << (i_bits - 1)); + dinfo->EOFCode = dinfo->ClearCode + 1; + dinfo->free_code = dinfo->ClearCode + 2; + dinfo->first_byte = TRUE; /* no waiting symbol yet */ + /* init output buffering vars */ + dinfo->bytesinpkt = 0; + dinfo->cur_accum = 0; + dinfo->cur_bits = 0; + /* clear hash table */ + clear_hash(dinfo); + /* GIF specifies an initial Clear code */ + output(dinfo, dinfo->ClearCode); +} + + +LOCAL(void) +compress_byte (gif_dest_ptr dinfo, int c) +/* Accept and compress one 8-bit byte */ +{ + register hash_int i; + register hash_int disp; + register hash_entry probe_value; + + if (dinfo->first_byte) { /* need to initialize waiting_code */ + dinfo->waiting_code = c; + dinfo->first_byte = FALSE; + return; + } + + /* Probe hash table to see if a symbol exists for + * waiting_code followed by c. + * If so, replace waiting_code by that symbol and return. + */ + i = ((hash_int) c << (MAX_LZW_BITS-8)) + dinfo->waiting_code; + /* i is less than twice 2**MAX_LZW_BITS, therefore less than twice HSIZE */ + if (i >= HSIZE) + i -= HSIZE; + + probe_value = HASH_ENTRY(dinfo->waiting_code, c); + + if (dinfo->hash_code[i] != 0) { /* is first probed slot empty? */ + if (dinfo->hash_value[i] == probe_value) { + dinfo->waiting_code = dinfo->hash_code[i]; + return; + } + if (i == 0) /* secondary hash (after G. Knott) */ + disp = 1; + else + disp = HSIZE - i; + for (;;) { + i -= disp; + if (i < 0) + i += HSIZE; + if (dinfo->hash_code[i] == 0) + break; /* hit empty slot */ + if (dinfo->hash_value[i] == probe_value) { + dinfo->waiting_code = dinfo->hash_code[i]; + return; + } + } + } + + /* here when hashtable[i] is an empty slot; desired symbol not in table */ + output(dinfo, dinfo->waiting_code); + if (dinfo->free_code < LZW_TABLE_SIZE) { + dinfo->hash_code[i] = dinfo->free_code++; /* add symbol to hashtable */ + dinfo->hash_value[i] = probe_value; + } else + clear_block(dinfo); + dinfo->waiting_code = c; +} + + +LOCAL(void) +compress_term (gif_dest_ptr dinfo) +/* Clean up at end */ +{ + /* Flush out the buffered code */ + if (! dinfo->first_byte) + output(dinfo, dinfo->waiting_code); + /* Send an EOF code */ + output(dinfo, dinfo->EOFCode); + /* Flush the bit-packing buffer */ + if (dinfo->cur_bits > 0) { + CHAR_OUT(dinfo, dinfo->cur_accum & 0xFF); + } + /* Flush the packet buffer */ + flush_packet(dinfo); +} + + +/* GIF header construction */ + + +LOCAL(void) +put_word (gif_dest_ptr dinfo, unsigned int w) +/* Emit a 16-bit word, LSB first */ +{ + putc(w & 0xFF, dinfo->pub.output_file); + putc((w >> 8) & 0xFF, dinfo->pub.output_file); +} + + +LOCAL(void) +put_3bytes (gif_dest_ptr dinfo, int val) +/* Emit 3 copies of same byte value --- handy subr for colormap construction */ +{ + putc(val, dinfo->pub.output_file); + putc(val, dinfo->pub.output_file); + putc(val, dinfo->pub.output_file); +} + + +LOCAL(void) +emit_header (gif_dest_ptr dinfo, int num_colors, JSAMPARRAY colormap) +/* Output the GIF file header, including color map */ +/* If colormap==NULL, synthesize a gray-scale colormap */ +{ + int BitsPerPixel, ColorMapSize, InitCodeSize, FlagByte; + int cshift = dinfo->cinfo->data_precision - 8; + int i; + + if (num_colors > 256) + ERREXIT1(dinfo->cinfo, JERR_TOO_MANY_COLORS, num_colors); + /* Compute bits/pixel and related values */ + BitsPerPixel = 1; + while (num_colors > (1 << BitsPerPixel)) + BitsPerPixel++; + ColorMapSize = 1 << BitsPerPixel; + if (BitsPerPixel <= 1) + InitCodeSize = 2; + else + InitCodeSize = BitsPerPixel; + /* + * Write the GIF header. + * Note that we generate a plain GIF87 header for maximum compatibility. + */ + putc('G', dinfo->pub.output_file); + putc('I', dinfo->pub.output_file); + putc('F', dinfo->pub.output_file); + putc('8', dinfo->pub.output_file); + putc('7', dinfo->pub.output_file); + putc('a', dinfo->pub.output_file); + /* Write the Logical Screen Descriptor */ + put_word(dinfo, (unsigned int) dinfo->cinfo->output_width); + put_word(dinfo, (unsigned int) dinfo->cinfo->output_height); + FlagByte = 0x80; /* Yes, there is a global color table */ + FlagByte |= (BitsPerPixel-1) << 4; /* color resolution */ + FlagByte |= (BitsPerPixel-1); /* size of global color table */ + putc(FlagByte, dinfo->pub.output_file); + putc(0, dinfo->pub.output_file); /* Background color index */ + putc(0, dinfo->pub.output_file); /* Reserved (aspect ratio in GIF89) */ + /* Write the Global Color Map */ + /* If the color map is more than 8 bits precision, */ + /* we reduce it to 8 bits by shifting */ + for (i=0; i < ColorMapSize; i++) { + if (i < num_colors) { + if (colormap != NULL) { + if (dinfo->cinfo->out_color_space == JCS_RGB) { + /* Normal case: RGB color map */ + putc(GETJSAMPLE(colormap[0][i]) >> cshift, dinfo->pub.output_file); + putc(GETJSAMPLE(colormap[1][i]) >> cshift, dinfo->pub.output_file); + putc(GETJSAMPLE(colormap[2][i]) >> cshift, dinfo->pub.output_file); + } else { + /* Grayscale "color map": possible if quantizing grayscale image */ + put_3bytes(dinfo, GETJSAMPLE(colormap[0][i]) >> cshift); + } + } else { + /* Create a gray-scale map of num_colors values, range 0..255 */ + put_3bytes(dinfo, (i * 255 + (num_colors-1)/2) / (num_colors-1)); + } + } else { + /* fill out the map to a power of 2 */ + put_3bytes(dinfo, 0); + } + } + /* Write image separator and Image Descriptor */ + putc(',', dinfo->pub.output_file); /* separator */ + put_word(dinfo, 0); /* left/top offset */ + put_word(dinfo, 0); + put_word(dinfo, (unsigned int) dinfo->cinfo->output_width); /* image size */ + put_word(dinfo, (unsigned int) dinfo->cinfo->output_height); + /* flag byte: not interlaced, no local color map */ + putc(0x00, dinfo->pub.output_file); + /* Write Initial Code Size byte */ + putc(InitCodeSize, dinfo->pub.output_file); + + /* Initialize for LZW compression of image data */ + compress_init(dinfo, InitCodeSize+1); +} + + +/* + * Startup: write the file header. + */ + +METHODDEF(void) +start_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + gif_dest_ptr dest = (gif_dest_ptr) dinfo; + + if (cinfo->quantize_colors) + emit_header(dest, cinfo->actual_number_of_colors, cinfo->colormap); + else + emit_header(dest, 256, (JSAMPARRAY) NULL); +} + + +/* + * Write some pixel data. + * In this module rows_supplied will always be 1. + */ + +METHODDEF(void) +put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + gif_dest_ptr dest = (gif_dest_ptr) dinfo; + register JSAMPROW ptr; + register JDIMENSION col; + + ptr = dest->pub.buffer[0]; + for (col = cinfo->output_width; col > 0; col--) { + compress_byte(dest, GETJSAMPLE(*ptr++)); + } +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_output_gif (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + gif_dest_ptr dest = (gif_dest_ptr) dinfo; + + /* Flush LZW mechanism */ + compress_term(dest); + /* Write a zero-length data block to end the series */ + putc(0, dest->pub.output_file); + /* Write the GIF terminator mark */ + putc(';', dest->pub.output_file); + /* Make sure we wrote the output file OK */ + fflush(dest->pub.output_file); + if (ferror(dest->pub.output_file)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * The module selection routine for GIF format output. + */ + +GLOBAL(djpeg_dest_ptr) +jinit_write_gif (j_decompress_ptr cinfo) +{ + gif_dest_ptr dest; + + /* Create module interface object, fill in method pointers */ + dest = (gif_dest_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(gif_dest_struct)); + dest->cinfo = cinfo; /* make back link for subroutines */ + dest->pub.start_output = start_output_gif; + dest->pub.put_pixel_rows = put_pixel_rows; + dest->pub.finish_output = finish_output_gif; + + if (cinfo->out_color_space != JCS_GRAYSCALE && + cinfo->out_color_space != JCS_RGB) + ERREXIT(cinfo, JERR_GIF_COLORSPACE); + + /* Force quantization if color or if > 8 bits input */ + if (cinfo->out_color_space != JCS_GRAYSCALE || cinfo->data_precision > 8) { + /* Force quantization to at most 256 colors */ + cinfo->quantize_colors = TRUE; + if (cinfo->desired_number_of_colors > 256) + cinfo->desired_number_of_colors = 256; + } + + /* Calculate output image dimensions so we can allocate space */ + jpeg_calc_output_dimensions(cinfo); + + if (cinfo->output_components != 1) /* safety check: just one component? */ + ERREXIT(cinfo, JERR_GIF_BUG); + + /* Create decompressor output buffer. */ + dest->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, cinfo->output_width, (JDIMENSION) 1); + dest->pub.buffer_height = 1; + + /* Allocate space for hash table */ + dest->hash_code = (code_int *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + HSIZE * SIZEOF(code_int)); + dest->hash_value = (hash_entry FAR *) + (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, + HSIZE * SIZEOF(hash_entry)); + + return (djpeg_dest_ptr) dest; +} + +#endif /* GIF_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/wrjpgcom.1 b/windows_libs/jpeg-6a/wrjpgcom.1 new file mode 100644 index 00000000..d419a999 --- /dev/null +++ b/windows_libs/jpeg-6a/wrjpgcom.1 @@ -0,0 +1,103 @@ +.TH WRJPGCOM 1 "15 June 1995" +.SH NAME +wrjpgcom \- insert text comments into a JPEG file +.SH SYNOPSIS +.B wrjpgcom +[ +.B \-replace +] +[ +.BI \-comment " text" +] +[ +.BI \-cfile " name" +] +[ +.I filename +] +.LP +.SH DESCRIPTION +.LP +.B wrjpgcom +reads the named JPEG/JFIF file, or the standard input if no file is named, +and generates a new JPEG/JFIF file on standard output. A comment block is +added to the file. +.PP +The JPEG standard allows "comment" (COM) blocks to occur within a JPEG file. +Although the standard doesn't actually define what COM blocks are for, they +are widely used to hold user-supplied text strings. This lets you add +annotations, titles, index terms, etc to your JPEG files, and later retrieve +them as text. COM blocks do not interfere with the image stored in the JPEG +file. The maximum size of a COM block is 64K, but you can have as many of +them as you like in one JPEG file. +.PP +.B wrjpgcom +adds a COM block, containing text you provide, to a JPEG file. +Ordinarily, the COM block is added after any existing COM blocks; but you +can delete the old COM blocks if you wish. +.SH OPTIONS +Switch names may be abbreviated, and are not case sensitive. +.TP +.B \-replace +Delete any existing COM blocks from the file. +.TP +.BI \-comment " text" +Supply text for new COM block on command line. +.TP +.BI \-cfile " name" +Read text for new COM block from named file. +.PP +If you have only one line of comment text to add, you can provide it on the +command line with +.BR \-comment . +The comment text must be surrounded with quotes so that it is treated as a +single argument. Longer comments can be read from a text file. +.PP +If you give neither +.B \-comment +nor +.BR \-cfile , +then +.B wrjpgcom +will read the comment text from standard input. (In this case an input image +file name MUST be supplied, so that the source JPEG file comes from somewhere +else.) You can enter multiple lines, up to 64KB worth. Type an end-of-file +indicator (usually control-D) to terminate the comment text entry. +.PP +.B wrjpgcom +will not add a COM block if the provided comment string is empty. Therefore +\fB\-replace \-comment ""\fR can be used to delete all COM blocks from a file. +.SH EXAMPLES +.LP +Add a short comment to in.jpg, producing out.jpg: +.IP +.B wrjpgcom \-c +\fI"View of my back yard" in.jpg +.B > +.I out.jpg +.PP +Attach a long comment previously stored in comment.txt: +.IP +.B wrjpgcom +.I in.jpg +.B < +.I comment.txt +.B > +.I out.jpg +.PP +or equivalently +.IP +.B wrjpgcom +.B -cfile +.I comment.txt +.B < +.I in.jpg +.B > +.I out.jpg +.SH SEE ALSO +.BR cjpeg (1), +.BR djpeg (1), +.BR jpegtran (1), +.BR rdjpgcom (1) +.SH AUTHOR +Independent JPEG Group diff --git a/windows_libs/jpeg-6a/wrjpgcom.c b/windows_libs/jpeg-6a/wrjpgcom.c new file mode 100644 index 00000000..3b6411ce --- /dev/null +++ b/windows_libs/jpeg-6a/wrjpgcom.c @@ -0,0 +1,575 @@ +/* + * wrjpgcom.c + * + * Copyright (C) 1994-1995, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains a very simple stand-alone application that inserts + * user-supplied text as a COM (comment) marker in a JFIF file. + * This may be useful as an example of the minimum logic needed to parse + * JPEG markers. + */ + +#define JPEG_CJPEG_DJPEG /* to get the command-line config symbols */ +#include "jinclude.h" /* get auto-config symbols, */ + +#ifndef HAVE_STDLIB_H /* should declare malloc() */ +extern void * malloc (); +#endif +#include /* to declare isupper(), tolower() */ +#ifdef USE_SETMODE +#include /* to declare setmode()'s parameter macros */ +/* If you have setmode() but not , just delete this line: */ +#include /* to declare setmode() */ +#endif + +#ifdef USE_CCOMMAND /* command-line reader for Macintosh */ +#ifdef __MWERKS__ +#include /* Metrowerks needs this */ +#include /* ... and this */ +#endif +#ifdef THINK_C +#include /* Think declares it here */ +#endif +#endif + +#ifdef DONT_USE_B_MODE /* define mode parameters for fopen() */ +#define READ_BINARY "r" +#define WRITE_BINARY "w" +#else +#define READ_BINARY "rb" +#define WRITE_BINARY "wb" +#endif + +#ifndef EXIT_FAILURE /* define exit() codes if not provided */ +#define EXIT_FAILURE 1 +#endif +#ifndef EXIT_SUCCESS +#ifdef VMS +#define EXIT_SUCCESS 1 /* VMS is very nonstandard */ +#else +#define EXIT_SUCCESS 0 +#endif +#endif + +/* Reduce this value if your malloc() can't allocate blocks up to 64K. + * On DOS, compiling in large model is usually a better solution. + */ + +#ifndef MAX_COM_LENGTH +#define MAX_COM_LENGTH 65000 /* must be < 65534 in any case */ +#endif + + +/* + * These macros are used to read the input file and write the output file. + * To reuse this code in another application, you might need to change these. + */ + +static FILE * infile; /* input JPEG file */ + +/* Return next input byte, or EOF if no more */ +#define NEXTBYTE() getc(infile) + +static FILE * outfile; /* output JPEG file */ + +/* Emit an output byte */ +#define PUTBYTE(x) putc((x), outfile) + + +/* Error exit handler */ +#define ERREXIT(msg) (fprintf(stderr, "%s\n", msg), exit(EXIT_FAILURE)) + + +/* Read one byte, testing for EOF */ +static int +read_1_byte (void) +{ + int c; + + c = NEXTBYTE(); + if (c == EOF) + ERREXIT("Premature EOF in JPEG file"); + return c; +} + +/* Read 2 bytes, convert to unsigned int */ +/* All 2-byte quantities in JPEG markers are MSB first */ +static unsigned int +read_2_bytes (void) +{ + int c1, c2; + + c1 = NEXTBYTE(); + if (c1 == EOF) + ERREXIT("Premature EOF in JPEG file"); + c2 = NEXTBYTE(); + if (c2 == EOF) + ERREXIT("Premature EOF in JPEG file"); + return (((unsigned int) c1) << 8) + ((unsigned int) c2); +} + + +/* Routines to write data to output file */ + +static void +write_1_byte (int c) +{ + PUTBYTE(c); +} + +static void +write_2_bytes (unsigned int val) +{ + PUTBYTE((val >> 8) & 0xFF); + PUTBYTE(val & 0xFF); +} + +static void +write_marker (int marker) +{ + PUTBYTE(0xFF); + PUTBYTE(marker); +} + +static void +copy_rest_of_file (void) +{ + int c; + + while ((c = NEXTBYTE()) != EOF) + PUTBYTE(c); +} + + +/* + * JPEG markers consist of one or more 0xFF bytes, followed by a marker + * code byte (which is not an FF). Here are the marker codes of interest + * in this program. (See jdmarker.c for a more complete list.) + */ + +#define M_SOF0 0xC0 /* Start Of Frame N */ +#define M_SOF1 0xC1 /* N indicates which compression process */ +#define M_SOF2 0xC2 /* Only SOF0-SOF2 are now in common use */ +#define M_SOF3 0xC3 +#define M_SOF5 0xC5 /* NB: codes C4 and CC are NOT SOF markers */ +#define M_SOF6 0xC6 +#define M_SOF7 0xC7 +#define M_SOF9 0xC9 +#define M_SOF10 0xCA +#define M_SOF11 0xCB +#define M_SOF13 0xCD +#define M_SOF14 0xCE +#define M_SOF15 0xCF +#define M_SOI 0xD8 /* Start Of Image (beginning of datastream) */ +#define M_EOI 0xD9 /* End Of Image (end of datastream) */ +#define M_SOS 0xDA /* Start Of Scan (begins compressed data) */ +#define M_COM 0xFE /* COMment */ + + +/* + * Find the next JPEG marker and return its marker code. + * We expect at least one FF byte, possibly more if the compressor used FFs + * to pad the file. (Padding FFs will NOT be replicated in the output file.) + * There could also be non-FF garbage between markers. The treatment of such + * garbage is unspecified; we choose to skip over it but emit a warning msg. + * NB: this routine must not be used after seeing SOS marker, since it will + * not deal correctly with FF/00 sequences in the compressed image data... + */ + +static int +next_marker (void) +{ + int c; + int discarded_bytes = 0; + + /* Find 0xFF byte; count and skip any non-FFs. */ + c = read_1_byte(); + while (c != 0xFF) { + discarded_bytes++; + c = read_1_byte(); + } + /* Get marker code byte, swallowing any duplicate FF bytes. Extra FFs + * are legal as pad bytes, so don't count them in discarded_bytes. + */ + do { + c = read_1_byte(); + } while (c == 0xFF); + + if (discarded_bytes != 0) { + fprintf(stderr, "Warning: garbage data found in JPEG file\n"); + } + + return c; +} + + +/* + * Read the initial marker, which should be SOI. + * For a JFIF file, the first two bytes of the file should be literally + * 0xFF M_SOI. To be more general, we could use next_marker, but if the + * input file weren't actually JPEG at all, next_marker might read the whole + * file and then return a misleading error message... + */ + +static int +first_marker (void) +{ + int c1, c2; + + c1 = NEXTBYTE(); + c2 = NEXTBYTE(); + if (c1 != 0xFF || c2 != M_SOI) + ERREXIT("Not a JPEG file"); + return c2; +} + + +/* + * Most types of marker are followed by a variable-length parameter segment. + * This routine skips over the parameters for any marker we don't otherwise + * want to process. + * Note that we MUST skip the parameter segment explicitly in order not to + * be fooled by 0xFF bytes that might appear within the parameter segment; + * such bytes do NOT introduce new markers. + */ + +static void +copy_variable (void) +/* Copy an unknown or uninteresting variable-length marker */ +{ + unsigned int length; + + /* Get the marker parameter length count */ + length = read_2_bytes(); + write_2_bytes(length); + /* Length includes itself, so must be at least 2 */ + if (length < 2) + ERREXIT("Erroneous JPEG marker length"); + length -= 2; + /* Skip over the remaining bytes */ + while (length > 0) { + write_1_byte(read_1_byte()); + length--; + } +} + +static void +skip_variable (void) +/* Skip over an unknown or uninteresting variable-length marker */ +{ + unsigned int length; + + /* Get the marker parameter length count */ + length = read_2_bytes(); + /* Length includes itself, so must be at least 2 */ + if (length < 2) + ERREXIT("Erroneous JPEG marker length"); + length -= 2; + /* Skip over the remaining bytes */ + while (length > 0) { + (void) read_1_byte(); + length--; + } +} + + +/* + * Parse the marker stream until SOFn or EOI is seen; + * copy data to output, but discard COM markers unless keep_COM is true. + */ + +static int +scan_JPEG_header (int keep_COM) +{ + int marker; + + /* Expect SOI at start of file */ + if (first_marker() != M_SOI) + ERREXIT("Expected SOI marker first"); + write_marker(M_SOI); + + /* Scan miscellaneous markers until we reach SOFn. */ + for (;;) { + marker = next_marker(); + switch (marker) { + case M_SOF0: /* Baseline */ + case M_SOF1: /* Extended sequential, Huffman */ + case M_SOF2: /* Progressive, Huffman */ + case M_SOF3: /* Lossless, Huffman */ + case M_SOF5: /* Differential sequential, Huffman */ + case M_SOF6: /* Differential progressive, Huffman */ + case M_SOF7: /* Differential lossless, Huffman */ + case M_SOF9: /* Extended sequential, arithmetic */ + case M_SOF10: /* Progressive, arithmetic */ + case M_SOF11: /* Lossless, arithmetic */ + case M_SOF13: /* Differential sequential, arithmetic */ + case M_SOF14: /* Differential progressive, arithmetic */ + case M_SOF15: /* Differential lossless, arithmetic */ + return marker; + + case M_SOS: /* should not see compressed data before SOF */ + ERREXIT("SOS without prior SOFn"); + break; + + case M_EOI: /* in case it's a tables-only JPEG stream */ + return marker; + + case M_COM: /* Existing COM: conditionally discard */ + if (keep_COM) { + write_marker(marker); + copy_variable(); + } else { + skip_variable(); + } + break; + + default: /* Anything else just gets copied */ + write_marker(marker); + copy_variable(); /* we assume it has a parameter count... */ + break; + } + } /* end loop */ +} + + +/* Command line parsing code */ + +static const char * progname; /* program name for error messages */ + + +static void +usage (void) +/* complain about bad command line */ +{ + fprintf(stderr, "wrjpgcom inserts a textual comment in a JPEG file.\n"); + fprintf(stderr, "You can add to or replace any existing comment(s).\n"); + + fprintf(stderr, "Usage: %s [switches] ", progname); +#ifdef TWO_FILE_COMMANDLINE + fprintf(stderr, "inputfile outputfile\n"); +#else + fprintf(stderr, "[inputfile]\n"); +#endif + + fprintf(stderr, "Switches (names may be abbreviated):\n"); + fprintf(stderr, " -replace Delete any existing comments\n"); + fprintf(stderr, " -comment \"text\" Insert comment with given text\n"); + fprintf(stderr, " -cfile name Read comment from named file\n"); + fprintf(stderr, "Notice that you must put quotes around the comment text\n"); + fprintf(stderr, "when you use -comment.\n"); + fprintf(stderr, "If you do not give either -comment or -cfile on the command line,\n"); + fprintf(stderr, "then the comment text is read from standard input.\n"); + fprintf(stderr, "It can be multiple lines, up to %u characters total.\n", + (unsigned int) MAX_COM_LENGTH); +#ifndef TWO_FILE_COMMANDLINE + fprintf(stderr, "You must specify an input JPEG file name when supplying\n"); + fprintf(stderr, "comment text from standard input.\n"); +#endif + + exit(EXIT_FAILURE); +} + + +static int +keymatch (char * arg, const char * keyword, int minchars) +/* Case-insensitive matching of (possibly abbreviated) keyword switches. */ +/* keyword is the constant keyword (must be lower case already), */ +/* minchars is length of minimum legal abbreviation. */ +{ + register int ca, ck; + register int nmatched = 0; + + while ((ca = *arg++) != '\0') { + if ((ck = *keyword++) == '\0') + return 0; /* arg longer than keyword, no good */ + if (isupper(ca)) /* force arg to lcase (assume ck is already) */ + ca = tolower(ca); + if (ca != ck) + return 0; /* no good */ + nmatched++; /* count matched characters */ + } + /* reached end of argument; fail if it's too short for unique abbrev */ + if (nmatched < minchars) + return 0; + return 1; /* A-OK */ +} + + +/* + * The main program. + */ + +int +main (int argc, char **argv) +{ + int argn; + char * arg; + int keep_COM = 1; + char * comment_arg = NULL; + FILE * comment_file = NULL; + unsigned int comment_length = 0; + int marker; + + /* On Mac, fetch a command line. */ +#ifdef USE_CCOMMAND + argc = ccommand(&argv); +#endif + + progname = argv[0]; + if (progname == NULL || progname[0] == 0) + progname = "wrjpgcom"; /* in case C library doesn't provide it */ + + /* Parse switches, if any */ + for (argn = 1; argn < argc; argn++) { + arg = argv[argn]; + if (arg[0] != '-') + break; /* not switch, must be file name */ + arg++; /* advance over '-' */ + if (keymatch(arg, "replace", 1)) { + keep_COM = 0; + } else if (keymatch(arg, "cfile", 2)) { + if (++argn >= argc) usage(); + if ((comment_file = fopen(argv[argn], "r")) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); + exit(EXIT_FAILURE); + } + } else if (keymatch(arg, "comment", 1)) { + if (++argn >= argc) usage(); + comment_arg = argv[argn]; + /* If the comment text starts with '"', then we are probably running + * under MS-DOG and must parse out the quoted string ourselves. Sigh. + */ + if (comment_arg[0] == '"') { + comment_arg = (char *) malloc((size_t) MAX_COM_LENGTH); + if (comment_arg == NULL) + ERREXIT("Insufficient memory"); + strcpy(comment_arg, argv[argn]+1); + for (;;) { + comment_length = strlen(comment_arg); + if (comment_length > 0 && comment_arg[comment_length-1] == '"') { + comment_arg[comment_length-1] = '\0'; /* zap terminating quote */ + break; + } + if (++argn >= argc) + ERREXIT("Missing ending quote mark"); + strcat(comment_arg, " "); + strcat(comment_arg, argv[argn]); + } + } + comment_length = strlen(comment_arg); + } else + usage(); + } + + /* Cannot use both -comment and -cfile. */ + if (comment_arg != NULL && comment_file != NULL) + usage(); + /* If there is neither -comment nor -cfile, we will read the comment text + * from stdin; in this case there MUST be an input JPEG file name. + */ + if (comment_arg == NULL && comment_file == NULL && argn >= argc) + usage(); + + /* Open the input file. */ + if (argn < argc) { + if ((infile = fopen(argv[argn], READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[argn]); + exit(EXIT_FAILURE); + } + } else { + /* default input file is stdin */ +#ifdef USE_SETMODE /* need to hack file mode? */ + setmode(fileno(stdin), O_BINARY); +#endif +#ifdef USE_FDOPEN /* need to re-open in binary mode? */ + if ((infile = fdopen(fileno(stdin), READ_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open stdin\n", progname); + exit(EXIT_FAILURE); + } +#else + infile = stdin; +#endif + } + + /* Open the output file. */ +#ifdef TWO_FILE_COMMANDLINE + /* Must have explicit output file name */ + if (argn != argc-2) { + fprintf(stderr, "%s: must name one input and one output file\n", + progname); + usage(); + } + if ((outfile = fopen(argv[argn+1], WRITE_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open %s\n", progname, argv[argn+1]); + exit(EXIT_FAILURE); + } +#else + /* Unix style: expect zero or one file name */ + if (argn < argc-1) { + fprintf(stderr, "%s: only one input file\n", progname); + usage(); + } + /* default output file is stdout */ +#ifdef USE_SETMODE /* need to hack file mode? */ + setmode(fileno(stdout), O_BINARY); +#endif +#ifdef USE_FDOPEN /* need to re-open in binary mode? */ + if ((outfile = fdopen(fileno(stdout), WRITE_BINARY)) == NULL) { + fprintf(stderr, "%s: can't open stdout\n", progname); + exit(EXIT_FAILURE); + } +#else + outfile = stdout; +#endif +#endif /* TWO_FILE_COMMANDLINE */ + + /* Collect comment text from comment_file or stdin, if necessary */ + if (comment_arg == NULL) { + FILE * src_file; + int c; + + comment_arg = (char *) malloc((size_t) MAX_COM_LENGTH); + if (comment_arg == NULL) + ERREXIT("Insufficient memory"); + comment_length = 0; + src_file = (comment_file != NULL ? comment_file : stdin); + while ((c = getc(src_file)) != EOF) { + if (comment_length >= (unsigned int) MAX_COM_LENGTH) { + fprintf(stderr, "Comment text may not exceed %u bytes\n", + (unsigned int) MAX_COM_LENGTH); + exit(EXIT_FAILURE); + } + comment_arg[comment_length++] = (char) c; + } + if (comment_file != NULL) + fclose(comment_file); + } + + /* Copy JPEG headers until SOFn marker; + * we will insert the new comment marker just before SOFn. + * This (a) causes the new comment to appear after, rather than before, + * existing comments; and (b) ensures that comments come after any JFIF + * or JFXX markers, as required by the JFIF specification. + */ + marker = scan_JPEG_header(keep_COM); + /* Insert the new COM marker, but only if nonempty text has been supplied */ + if (comment_length > 0) { + write_marker(M_COM); + write_2_bytes(comment_length + 2); + while (comment_length > 0) { + write_1_byte(*comment_arg++); + comment_length--; + } + } + /* Duplicate the remainder of the source file. + * Note that any COM markers occuring after SOF will not be touched. + */ + write_marker(marker); + copy_rest_of_file(); + + /* All done. */ + exit(EXIT_SUCCESS); + return 0; /* suppress no-return-value warnings */ +} diff --git a/windows_libs/jpeg-6a/wrppm.c b/windows_libs/jpeg-6a/wrppm.c new file mode 100644 index 00000000..6c6d9088 --- /dev/null +++ b/windows_libs/jpeg-6a/wrppm.c @@ -0,0 +1,268 @@ +/* + * wrppm.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write output images in PPM/PGM format. + * The extended 2-byte-per-sample raw PPM/PGM formats are supported. + * The PBMPLUS library is NOT required to compile this software + * (but it is highly useful as a set of PPM image manipulation programs). + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume output to + * an ordinary stdio stream. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef PPM_SUPPORTED + + +/* + * For 12-bit JPEG data, we either downscale the values to 8 bits + * (to write standard byte-per-sample PPM/PGM files), or output + * nonstandard word-per-sample PPM/PGM files. Downscaling is done + * if PPM_NORAWWORD is defined (this can be done in the Makefile + * or in jconfig.h). + * (When the core library supports data precision reduction, a cleaner + * implementation will be to ask for that instead.) + */ + +#if BITS_IN_JSAMPLE == 8 +#define PUTPPMSAMPLE(ptr,v) *ptr++ = (char) (v) +#define BYTESPERSAMPLE 1 +#define PPM_MAXVAL 255 +#else +#ifdef PPM_NORAWWORD +#define PUTPPMSAMPLE(ptr,v) *ptr++ = (char) ((v) >> (BITS_IN_JSAMPLE-8)) +#define BYTESPERSAMPLE 1 +#define PPM_MAXVAL 255 +#else +/* The word-per-sample format always puts the LSB first. */ +#define PUTPPMSAMPLE(ptr,v) \ + { register int val_ = v; \ + *ptr++ = (char) (val_ & 0xFF); \ + *ptr++ = (char) ((val_ >> 8) & 0xFF); \ + } +#define BYTESPERSAMPLE 2 +#define PPM_MAXVAL ((1<pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +/* + * This code is used when we have to copy the data and apply a pixel + * format translation. Typically this only happens in 12-bit mode. + */ + +METHODDEF(void) +copy_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; + register char * bufferptr; + register JSAMPROW ptr; + register JDIMENSION col; + + ptr = dest->pub.buffer[0]; + bufferptr = dest->iobuffer; + for (col = dest->samples_per_row; col > 0; col--) { + PUTPPMSAMPLE(bufferptr, GETJSAMPLE(*ptr++)); + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +/* + * Write some pixel data when color quantization is in effect. + * We have to demap the color index values to straight data. + */ + +METHODDEF(void) +put_demapped_rgb (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; + register char * bufferptr; + register int pixval; + register JSAMPROW ptr; + register JSAMPROW color_map0 = cinfo->colormap[0]; + register JSAMPROW color_map1 = cinfo->colormap[1]; + register JSAMPROW color_map2 = cinfo->colormap[2]; + register JDIMENSION col; + + ptr = dest->pub.buffer[0]; + bufferptr = dest->iobuffer; + for (col = cinfo->output_width; col > 0; col--) { + pixval = GETJSAMPLE(*ptr++); + PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map0[pixval])); + PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map1[pixval])); + PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map2[pixval])); + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +METHODDEF(void) +put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; + register char * bufferptr; + register JSAMPROW ptr; + register JSAMPROW color_map = cinfo->colormap[0]; + register JDIMENSION col; + + ptr = dest->pub.buffer[0]; + bufferptr = dest->iobuffer; + for (col = cinfo->output_width; col > 0; col--) { + PUTPPMSAMPLE(bufferptr, GETJSAMPLE(color_map[GETJSAMPLE(*ptr++)])); + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +/* + * Startup: write the file header. + */ + +METHODDEF(void) +start_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + ppm_dest_ptr dest = (ppm_dest_ptr) dinfo; + + /* Emit file header */ + switch (cinfo->out_color_space) { + case JCS_GRAYSCALE: + /* emit header for raw PGM format */ + fprintf(dest->pub.output_file, "P5\n%ld %ld\n%d\n", + (long) cinfo->output_width, (long) cinfo->output_height, + PPM_MAXVAL); + break; + case JCS_RGB: + /* emit header for raw PPM format */ + fprintf(dest->pub.output_file, "P6\n%ld %ld\n%d\n", + (long) cinfo->output_width, (long) cinfo->output_height, + PPM_MAXVAL); + break; + default: + ERREXIT(cinfo, JERR_PPM_COLORSPACE); + } +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_output_ppm (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + /* Make sure we wrote the output file OK */ + fflush(dinfo->output_file); + if (ferror(dinfo->output_file)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * The module selection routine for PPM format output. + */ + +GLOBAL(djpeg_dest_ptr) +jinit_write_ppm (j_decompress_ptr cinfo) +{ + ppm_dest_ptr dest; + + /* Create module interface object, fill in method pointers */ + dest = (ppm_dest_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(ppm_dest_struct)); + dest->pub.start_output = start_output_ppm; + dest->pub.finish_output = finish_output_ppm; + + /* Calculate output image dimensions so we can allocate space */ + jpeg_calc_output_dimensions(cinfo); + + /* Create physical I/O buffer. Note we make this near on a PC. */ + dest->samples_per_row = cinfo->output_width * cinfo->out_color_components; + dest->buffer_width = dest->samples_per_row * (BYTESPERSAMPLE * SIZEOF(char)); + dest->iobuffer = (char *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, dest->buffer_width); + + if (cinfo->quantize_colors || BITS_IN_JSAMPLE != 8 || + SIZEOF(JSAMPLE) != SIZEOF(char)) { + /* When quantizing, we need an output buffer for colormap indexes + * that's separate from the physical I/O buffer. We also need a + * separate buffer if pixel format translation must take place. + */ + dest->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->output_width * cinfo->output_components, (JDIMENSION) 1); + dest->pub.buffer_height = 1; + if (! cinfo->quantize_colors) + dest->pub.put_pixel_rows = copy_pixel_rows; + else if (cinfo->out_color_space == JCS_GRAYSCALE) + dest->pub.put_pixel_rows = put_demapped_gray; + else + dest->pub.put_pixel_rows = put_demapped_rgb; + } else { + /* We will fwrite() directly from decompressor output buffer. */ + /* Synthesize a JSAMPARRAY pointer structure */ + /* Cast here implies near->far pointer conversion on PCs */ + dest->pixrow = (JSAMPROW) dest->iobuffer; + dest->pub.buffer = & dest->pixrow; + dest->pub.buffer_height = 1; + dest->pub.put_pixel_rows = put_pixel_rows; + } + + return (djpeg_dest_ptr) dest; +} + +#endif /* PPM_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/wrrle.c b/windows_libs/jpeg-6a/wrrle.c new file mode 100644 index 00000000..a4e73372 --- /dev/null +++ b/windows_libs/jpeg-6a/wrrle.c @@ -0,0 +1,305 @@ +/* + * wrrle.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write output images in RLE format. + * The Utah Raster Toolkit library is required (version 3.1 or later). + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume output to + * an ordinary stdio stream. + * + * Based on code contributed by Mike Lijewski, + * with updates from Robert Hutchinson. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef RLE_SUPPORTED + +/* rle.h is provided by the Utah Raster Toolkit. */ + +#include + +/* + * We assume that JSAMPLE has the same representation as rle_pixel, + * to wit, "unsigned char". Hence we can't cope with 12- or 16-bit samples. + */ + +#if BITS_IN_JSAMPLE != 8 + Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ +#endif + + +/* + * Since RLE stores scanlines bottom-to-top, we have to invert the image + * from JPEG's top-to-bottom order. To do this, we save the outgoing data + * in a virtual array during put_pixel_row calls, then actually emit the + * RLE file during finish_output. + */ + + +/* + * For now, if we emit an RLE color map then it is always 256 entries long, + * though not all of the entries need be used. + */ + +#define CMAPBITS 8 +#define CMAPLENGTH (1<<(CMAPBITS)) + +typedef struct { + struct djpeg_dest_struct pub; /* public fields */ + + jvirt_sarray_ptr image; /* virtual array to store the output image */ + rle_map *colormap; /* RLE-style color map, or NULL if none */ + rle_pixel **rle_row; /* To pass rows to rle_putrow() */ + +} rle_dest_struct; + +typedef rle_dest_struct * rle_dest_ptr; + +/* Forward declarations */ +METHODDEF(void) rle_put_pixel_rows + JPP((j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied)); + + +/* + * Write the file header. + * + * In this module it's easier to wait till finish_output to write anything. + */ + +METHODDEF(void) +start_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + rle_dest_ptr dest = (rle_dest_ptr) dinfo; + size_t cmapsize; + int i, ci; +#ifdef PROGRESS_REPORT + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; +#endif + + /* + * Make sure the image can be stored in RLE format. + * + * - RLE stores image dimensions as *signed* 16 bit integers. JPEG + * uses unsigned, so we have to check the width. + * + * - Colorspace is expected to be grayscale or RGB. + * + * - The number of channels (components) is expected to be 1 (grayscale/ + * pseudocolor) or 3 (truecolor/directcolor). + * (could be 2 or 4 if using an alpha channel, but we aren't) + */ + + if (cinfo->output_width > 32767 || cinfo->output_height > 32767) + ERREXIT2(cinfo, JERR_RLE_DIMENSIONS, cinfo->output_width, + cinfo->output_height); + + if (cinfo->out_color_space != JCS_GRAYSCALE && + cinfo->out_color_space != JCS_RGB) + ERREXIT(cinfo, JERR_RLE_COLORSPACE); + + if (cinfo->output_components != 1 && cinfo->output_components != 3) + ERREXIT1(cinfo, JERR_RLE_TOOMANYCHANNELS, cinfo->num_components); + + /* Convert colormap, if any, to RLE format. */ + + dest->colormap = NULL; + + if (cinfo->quantize_colors) { + /* Allocate storage for RLE-style cmap, zero any extra entries */ + cmapsize = cinfo->out_color_components * CMAPLENGTH * SIZEOF(rle_map); + dest->colormap = (rle_map *) (*cinfo->mem->alloc_small) + ((j_common_ptr) cinfo, JPOOL_IMAGE, cmapsize); + MEMZERO(dest->colormap, cmapsize); + + /* Save away data in RLE format --- note 8-bit left shift! */ + /* Shifting would need adjustment for JSAMPLEs wider than 8 bits. */ + for (ci = 0; ci < cinfo->out_color_components; ci++) { + for (i = 0; i < cinfo->actual_number_of_colors; i++) { + dest->colormap[ci * CMAPLENGTH + i] = + GETJSAMPLE(cinfo->colormap[ci][i]) << 8; + } + } + } + + /* Set the output buffer to the first row */ + dest->pub.buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->image, (JDIMENSION) 0, (JDIMENSION) 1, TRUE); + dest->pub.buffer_height = 1; + + dest->pub.put_pixel_rows = rle_put_pixel_rows; + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->total_extra_passes++; /* count file writing as separate pass */ + } +#endif +} + + +/* + * Write some pixel data. + * + * This routine just saves the data away in a virtual array. + */ + +METHODDEF(void) +rle_put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + rle_dest_ptr dest = (rle_dest_ptr) dinfo; + + if (cinfo->output_scanline < cinfo->output_height) { + dest->pub.buffer = (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->image, + cinfo->output_scanline, (JDIMENSION) 1, TRUE); + } +} + +/* + * Finish up at the end of the file. + * + * Here is where we really output the RLE file. + */ + +METHODDEF(void) +finish_output_rle (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + rle_dest_ptr dest = (rle_dest_ptr) dinfo; + rle_hdr header; /* Output file information */ + rle_pixel **rle_row, *red, *green, *blue; + JSAMPROW output_row; + char cmapcomment[80]; + int row, col; + int ci; +#ifdef PROGRESS_REPORT + cd_progress_ptr progress = (cd_progress_ptr) cinfo->progress; +#endif + + /* Initialize the header info */ + header = *rle_hdr_init(NULL); + header.rle_file = dest->pub.output_file; + header.xmin = 0; + header.xmax = cinfo->output_width - 1; + header.ymin = 0; + header.ymax = cinfo->output_height - 1; + header.alpha = 0; + header.ncolors = cinfo->output_components; + for (ci = 0; ci < cinfo->output_components; ci++) { + RLE_SET_BIT(header, ci); + } + if (cinfo->quantize_colors) { + header.ncmap = cinfo->out_color_components; + header.cmaplen = CMAPBITS; + header.cmap = dest->colormap; + /* Add a comment to the output image with the true colormap length. */ + sprintf(cmapcomment, "color_map_length=%d", cinfo->actual_number_of_colors); + rle_putcom(cmapcomment, &header); + } + + /* Emit the RLE header and color map (if any) */ + rle_put_setup(&header); + + /* Now output the RLE data from our virtual array. + * We assume here that (a) rle_pixel is represented the same as JSAMPLE, + * and (b) we are not on a machine where FAR pointers differ from regular. + */ + +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_limit = cinfo->output_height; + progress->pub.pass_counter = 0; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + + if (cinfo->output_components == 1) { + for (row = cinfo->output_height-1; row >= 0; row--) { + rle_row = (rle_pixel **) (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->image, + (JDIMENSION) row, (JDIMENSION) 1, FALSE); + rle_putrow(rle_row, (int) cinfo->output_width, &header); +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_counter++; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + } + } else { + for (row = cinfo->output_height-1; row >= 0; row--) { + rle_row = (rle_pixel **) dest->rle_row; + output_row = * (*cinfo->mem->access_virt_sarray) + ((j_common_ptr) cinfo, dest->image, + (JDIMENSION) row, (JDIMENSION) 1, FALSE); + red = rle_row[0]; + green = rle_row[1]; + blue = rle_row[2]; + for (col = cinfo->output_width; col > 0; col--) { + *red++ = GETJSAMPLE(*output_row++); + *green++ = GETJSAMPLE(*output_row++); + *blue++ = GETJSAMPLE(*output_row++); + } + rle_putrow(rle_row, (int) cinfo->output_width, &header); +#ifdef PROGRESS_REPORT + if (progress != NULL) { + progress->pub.pass_counter++; + (*progress->pub.progress_monitor) ((j_common_ptr) cinfo); + } +#endif + } + } + +#ifdef PROGRESS_REPORT + if (progress != NULL) + progress->completed_extra_passes++; +#endif + + /* Emit file trailer */ + rle_puteof(&header); + fflush(dest->pub.output_file); + if (ferror(dest->pub.output_file)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * The module selection routine for RLE format output. + */ + +GLOBAL(djpeg_dest_ptr) +jinit_write_rle (j_decompress_ptr cinfo) +{ + rle_dest_ptr dest; + + /* Create module interface object, fill in method pointers */ + dest = (rle_dest_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(rle_dest_struct)); + dest->pub.start_output = start_output_rle; + dest->pub.finish_output = finish_output_rle; + + /* Calculate output image dimensions so we can allocate space */ + jpeg_calc_output_dimensions(cinfo); + + /* Allocate a work array for output to the RLE library. */ + dest->rle_row = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, + cinfo->output_width, (JDIMENSION) cinfo->output_components); + + /* Allocate a virtual array to hold the image. */ + dest->image = (*cinfo->mem->request_virt_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, FALSE, + (JDIMENSION) (cinfo->output_width * cinfo->output_components), + cinfo->output_height, (JDIMENSION) 1); + + return (djpeg_dest_ptr) dest; +} + +#endif /* RLE_SUPPORTED */ diff --git a/windows_libs/jpeg-6a/wrtarga.c b/windows_libs/jpeg-6a/wrtarga.c new file mode 100644 index 00000000..cf104d2d --- /dev/null +++ b/windows_libs/jpeg-6a/wrtarga.c @@ -0,0 +1,253 @@ +/* + * wrtarga.c + * + * Copyright (C) 1991-1996, Thomas G. Lane. + * This file is part of the Independent JPEG Group's software. + * For conditions of distribution and use, see the accompanying README file. + * + * This file contains routines to write output images in Targa format. + * + * These routines may need modification for non-Unix environments or + * specialized applications. As they stand, they assume output to + * an ordinary stdio stream. + * + * Based on code contributed by Lee Daniel Crocker. + */ + +#include "cdjpeg.h" /* Common decls for cjpeg/djpeg applications */ + +#ifdef TARGA_SUPPORTED + + +/* + * To support 12-bit JPEG data, we'd have to scale output down to 8 bits. + * This is not yet implemented. + */ + +#if BITS_IN_JSAMPLE != 8 + Sorry, this code only copes with 8-bit JSAMPLEs. /* deliberate syntax err */ +#endif + +/* + * The output buffer needs to be writable by fwrite(). On PCs, we must + * allocate the buffer in near data space, because we are assuming small-data + * memory model, wherein fwrite() can't reach far memory. If you need to + * process very wide images on a PC, you might have to compile in large-memory + * model, or else replace fwrite() with a putc() loop --- which will be much + * slower. + */ + + +/* Private version of data destination object */ + +typedef struct { + struct djpeg_dest_struct pub; /* public fields */ + + char *iobuffer; /* physical I/O buffer */ + JDIMENSION buffer_width; /* width of one row */ +} tga_dest_struct; + +typedef tga_dest_struct * tga_dest_ptr; + + +LOCAL(void) +write_header (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, int num_colors) +/* Create and write a Targa header */ +{ + char targaheader[18]; + + /* Set unused fields of header to 0 */ + MEMZERO(targaheader, SIZEOF(targaheader)); + + if (num_colors > 0) { + targaheader[1] = 1; /* color map type 1 */ + targaheader[5] = (char) (num_colors & 0xFF); + targaheader[6] = (char) (num_colors >> 8); + targaheader[7] = 24; /* 24 bits per cmap entry */ + } + + targaheader[12] = (char) (cinfo->output_width & 0xFF); + targaheader[13] = (char) (cinfo->output_width >> 8); + targaheader[14] = (char) (cinfo->output_height & 0xFF); + targaheader[15] = (char) (cinfo->output_height >> 8); + targaheader[17] = 0x20; /* Top-down, non-interlaced */ + + if (cinfo->out_color_space == JCS_GRAYSCALE) { + targaheader[2] = 3; /* image type = uncompressed gray-scale */ + targaheader[16] = 8; /* bits per pixel */ + } else { /* must be RGB */ + if (num_colors > 0) { + targaheader[2] = 1; /* image type = colormapped RGB */ + targaheader[16] = 8; + } else { + targaheader[2] = 2; /* image type = uncompressed RGB */ + targaheader[16] = 24; + } + } + + if (JFWRITE(dinfo->output_file, targaheader, 18) != (size_t) 18) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * Write some pixel data. + * In this module rows_supplied will always be 1. + */ + +METHODDEF(void) +put_pixel_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +/* used for unquantized full-color output */ +{ + tga_dest_ptr dest = (tga_dest_ptr) dinfo; + register JSAMPROW inptr; + register char * outptr; + register JDIMENSION col; + + inptr = dest->pub.buffer[0]; + outptr = dest->iobuffer; + for (col = cinfo->output_width; col > 0; col--) { + outptr[0] = (char) GETJSAMPLE(inptr[2]); /* RGB to BGR order */ + outptr[1] = (char) GETJSAMPLE(inptr[1]); + outptr[2] = (char) GETJSAMPLE(inptr[0]); + inptr += 3, outptr += 3; + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + +METHODDEF(void) +put_gray_rows (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +/* used for grayscale OR quantized color output */ +{ + tga_dest_ptr dest = (tga_dest_ptr) dinfo; + register JSAMPROW inptr; + register char * outptr; + register JDIMENSION col; + + inptr = dest->pub.buffer[0]; + outptr = dest->iobuffer; + for (col = cinfo->output_width; col > 0; col--) { + *outptr++ = (char) GETJSAMPLE(*inptr++); + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +/* + * Write some demapped pixel data when color quantization is in effect. + * For Targa, this is only applied to grayscale data. + */ + +METHODDEF(void) +put_demapped_gray (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo, + JDIMENSION rows_supplied) +{ + tga_dest_ptr dest = (tga_dest_ptr) dinfo; + register JSAMPROW inptr; + register char * outptr; + register JSAMPROW color_map0 = cinfo->colormap[0]; + register JDIMENSION col; + + inptr = dest->pub.buffer[0]; + outptr = dest->iobuffer; + for (col = cinfo->output_width; col > 0; col--) { + *outptr++ = (char) GETJSAMPLE(color_map0[GETJSAMPLE(*inptr++)]); + } + (void) JFWRITE(dest->pub.output_file, dest->iobuffer, dest->buffer_width); +} + + +/* + * Startup: write the file header. + */ + +METHODDEF(void) +start_output_tga (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + tga_dest_ptr dest = (tga_dest_ptr) dinfo; + int num_colors, i; + FILE *outfile; + + if (cinfo->out_color_space == JCS_GRAYSCALE) { + /* Targa doesn't have a mapped grayscale format, so we will */ + /* demap quantized gray output. Never emit a colormap. */ + write_header(cinfo, dinfo, 0); + if (cinfo->quantize_colors) + dest->pub.put_pixel_rows = put_demapped_gray; + else + dest->pub.put_pixel_rows = put_gray_rows; + } else if (cinfo->out_color_space == JCS_RGB) { + if (cinfo->quantize_colors) { + /* We only support 8-bit colormap indexes, so only 256 colors */ + num_colors = cinfo->actual_number_of_colors; + if (num_colors > 256) + ERREXIT1(cinfo, JERR_TOO_MANY_COLORS, num_colors); + write_header(cinfo, dinfo, num_colors); + /* Write the colormap. Note Targa uses BGR byte order */ + outfile = dest->pub.output_file; + for (i = 0; i < num_colors; i++) { + putc(GETJSAMPLE(cinfo->colormap[2][i]), outfile); + putc(GETJSAMPLE(cinfo->colormap[1][i]), outfile); + putc(GETJSAMPLE(cinfo->colormap[0][i]), outfile); + } + dest->pub.put_pixel_rows = put_gray_rows; + } else { + write_header(cinfo, dinfo, 0); + dest->pub.put_pixel_rows = put_pixel_rows; + } + } else { + ERREXIT(cinfo, JERR_TGA_COLORSPACE); + } +} + + +/* + * Finish up at the end of the file. + */ + +METHODDEF(void) +finish_output_tga (j_decompress_ptr cinfo, djpeg_dest_ptr dinfo) +{ + /* Make sure we wrote the output file OK */ + fflush(dinfo->output_file); + if (ferror(dinfo->output_file)) + ERREXIT(cinfo, JERR_FILE_WRITE); +} + + +/* + * The module selection routine for Targa format output. + */ + +GLOBAL(djpeg_dest_ptr) +jinit_write_targa (j_decompress_ptr cinfo) +{ + tga_dest_ptr dest; + + /* Create module interface object, fill in method pointers */ + dest = (tga_dest_ptr) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + SIZEOF(tga_dest_struct)); + dest->pub.start_output = start_output_tga; + dest->pub.finish_output = finish_output_tga; + + /* Calculate output image dimensions so we can allocate space */ + jpeg_calc_output_dimensions(cinfo); + + /* Create I/O buffer. Note we make this near on a PC. */ + dest->buffer_width = cinfo->output_width * cinfo->output_components; + dest->iobuffer = (char *) + (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, + (size_t) (dest->buffer_width * SIZEOF(char))); + + /* Create decompressor output buffer. */ + dest->pub.buffer = (*cinfo->mem->alloc_sarray) + ((j_common_ptr) cinfo, JPOOL_IMAGE, dest->buffer_width, (JDIMENSION) 1); + dest->pub.buffer_height = 1; + + return (djpeg_dest_ptr) dest; +} + +#endif /* TARGA_SUPPORTED */ diff --git a/windows_libs/mssdk/DXReadme.txt b/windows_libs/mssdk/DXReadme.txt new file mode 100644 index 00000000..3ae637f9 --- /dev/null +++ b/windows_libs/mssdk/DXReadme.txt @@ -0,0 +1,979 @@ + +MicrosoftŽ DirectXŽ 8.0 SDK + +This CD is the Microsoft DirectX 8.0 Software Development Kit (SDK). +It contains all DirectX software required to create DirectX 8.0 +compliant applications. Parts of this SDK will also be made +available for download at the Microsoft DirectX developer web page +(http://msdn.microsoft.com/directx). + +Major components include: DirectX 8.0 system components (runtimes); +DirectX 8.0 Application Programing Interface (API) Documentation for +each of the DirectX core areas (written for C++ or Visual Basic +developers); DirectX 8.0 headers & libraries; Sample applications +and source code; miscellaneous tools and utilities. + +After installing, those new to DirectX should start with the +DirectX 8.0 documentation. More seasoned developers may also want +to view the "WHAT'S NEW" section. Professional DirectX developers +should refer to the "KNOWN ISSUES" section prior to raising concerns. + +__________________________________________________________________ + + +Contents: + +- INSTALLATION +- WHAT'S NEW +- CD LAYOUT +- DIRECTX 8.0 SDK RELEASE NOTES AND KNOWN ISSUES +- COMPILER SUPPORT + +__________________________________________________________________ + + +INSTALLATION: + + +ALWAYS UNINSTALL PREVIOUS RELEASES of the DirectX SDK prior to +installing DirectX 8.0 SDK Release (see UnInstall). The directory +structure and file names have changed significantly. Installing on +top of a previous installation will cause you problems. + +On Windows 2000 systems, you must be logged in as administrator to +install the DirectX 8.0 runtimes. + +If you install the BDA cab, the DirectX 8.0 setup program requires +that you restart your system. + +UnInstall: + +To uninstall, use "Add/Remove Programs" from the Control Panel to +uninstall the InstallShield installations. + +__________________________________________________________________ + + +WHAT'S NEW: + + +DirectX Audio (DirectSound & DirectMusic) +========================================= + +DirectX 8.0 audio covers both DirectSound and DirectMusic API's. In +DirectX 8.0, these API's are more closely aligned and tied together. + +There are many new features. They include: + + Effects processing on DirectSound Buffers + DLS2 synthesis + Arbitrary loop points + Release waveforms + Optional Filter per voice + 6-stage envelope + Ramped volume scaling + Time-stamped playback + "Audiopaths": a powerful and easy way to use the DirectMusic DLS2 synthesizer + for sound effects programming. + Submixing of audio prior to 3D processing (by DLS2 synthesizer) + Automatic streaming and ACM compression (ADPCM, etc.) + Composition enhancements + Audio Scripting + +We also think you will want to look at using the DLS2 synthesizer as your +main sound effects engine. The DLS2 synthesizer is accessed primarily through +the DirectMusic API's. Please do not let the word, "Music" mislead you; the +DirectX 8.0 DirectMusic API's have been enhanced *specifically* for sound effects +playback. The new DirectMusic API's that are designed to support sound effects +refer to audiopaths. Please investigate audiopaths; they provide a lot of +cool features for sound effects. For example, if you have multiple sounds +that need to come from the same 3d location, you can pre-mix them (using Audiopaths) +and use only one 3d hardware buffer to play them. + +Parameter Validation: +DirectSound in particular has some greater parameter validation in place +when the DirectSound8 interfaces are used. + +-Waveformats are more tightly parsed +-You can no longer create a DirectSoundBuffer with both CTRL_3D and CTRL_PAN set +-You can no longer create a DirectSoundBuffer with CTRL_3D set and a wave format +with more than 1 channel. I.e. Only mono buffers may be created with CTRL_3D. + +Scripting is very exciting. It puts much of the control over the audio +implementation of the game into the hands of the sound designer. Using +scripts, audio designers can change implementations, make the music 'magically' +interactive, and play different sound effects based on in-game variables. +It also drastically shortens the edit-integrate-listen cycle. This should +result in improved sound effects and music, with much less game-programmer +time required. + +There are sections in the documentation on a new FullDuplex interface and +"Capture effects." These interfaces are not currently supported. + +If you are using DirectPlayVoice, you should use those interfaces. If your +application requires audio capture outside of DirectPlayVoice, +you should use the existing DirectSoundCapture interfaces. + + +Direct3D +======== + +Migration of DirectDraw into Direct3D: + +In DirectX 8.0, DirectDrawŽ is fully integrated into Microsoft Direct3D +to enable drastically simplified application initialization, improved data +allocation and management performance, and reduced memory footprint. +The new Direct3D infrastructure provides the services that are called +at relatively low frequency. These services comprise: + +- Creation of Direct3D +- Creation of resources (textures, vertex buffers etc) +- Display mode selection +- Presentation of rendered images to the display + +New Graphics Features for DirectX 8.0 are: + +Parallel vertex input streams for more flexible mapping to dynamic +application data structures. Programmable vertex processing language +enables programmers to write hardware shaders for: + +- Morphing/tweening animation +- Matrix palette skinning +- User-defined lighting models +- General environment mapping +- Procedural geometry +- Any other developer-defined algorithm + +Programmable Pixel processing language enables programmers to write +hardware shaders for: + +- Per-pixel lighting/bump mapping +- Per-pixel environment mapping +- Any other developer-defined algorithm + +MultiSample Rendering support enables: + +- Full-scene antialiasing +- Multisample effects such as motion blur, depth-of-field, etc. + +Point Sprites enable: + +- High-performance rendering of particle systems + +3-D Volume textures enable: + +- Range-attenuation in per-pixel lighting +- Volume atmospheric effects +- Easy texturing of very complex geometry + +Higher-Order Primitive Support: + +- For enhancing the appearance of 3-D content +- Facilitating mapping of content from major 3-D authoring tools + +Higher-Level Technologies: + +- 3-D content creation tool plugins for export into Direct3D of skinned + meshes using a variety of Direct3D techniques such as, multi-resolution + LOD geometry, and higher order surface data. + +Direct3D Feature Notes: + +No significant API changes are contemplated beyond this point. +All implemented features have been tested individually +to some extent, but they have not been tested in exhaustive combinations +yet. Many features in DirectX 8.0 are awaiting new hardware, however +there is at least one implementation available for each of the features +shipped: + +- Programmable vertex shaders are supported on the host CPU. On CPUs they + will operate with performance comparable to HW implementations and can be + used immediately for DirectX 8.0 prototyping and development. +- Programmable pixel shaders are supported on the host CPU using refrast + only. These can be used for prototyping DirectX 8.0 shaders for use when + hardware ships. +- Parallel DMA data input is supported on refrast and the SW geometry pipeline. +- Point Sprites are supported in refrast, software T&L pipeline, and should + be supported in a prototype DirectX 8.0 driver from at least one hardware + manufacturer. +- Volume Textures are supported in refrast. +- Multisample rendering is supported in refrast and future hardware. +- Higher-Order Primitives are supported in refrast and via D3DX utilities. + +D3DX +==== + +Debug Binaries for D3DX: + +The D3DX library is a static library. However, to help debugging, we also +have a debug only dynamic library of D3DX in DirectX 8.0. To use this, link +with the d3dx8d.lib which is an import lib corresponding to the D3DX8D.DLL. +If you are reporting a bug and sending Microsoft an example that reproduces +that behavior, please make sure the executable is linked to the dynamic debug +library. + +The dynamic debug d3dx8 library is for debugging only and is not intended +for use of shipping applications. D3DX8D.DLL is installed as part of the +DirectX 8.0 SDK setup, not as part of the redistributable runtime setup. +This will not be available as part of future operating systems. + +If apps want to statically link to the debug d3dx8 library they need to +link to d3dx8dt.lib. To statically link to a retail d3dx8 library please +link to d3dx8.lib. + +The D3DX Effect Framework + +The D3DX effect framework allows you to define shading effects using a text +file that describes the various techniques of implementing an effect. For +an example of an effect file see water.sha in the C samples media directory. + + +DirectInput +=========== + +DirectInput for DirectX 8.0 features a major addition, the DirectInput +Mapper. The Mapper makes it possible for applications to code to their +in-game actions, without the effort of figuring out the actions represented +on the device itself. Additionally, the Mapper makes user configuration +of devices much simpler by offering a default configuration UI. + +DIPROP_KEYNAME is supported by the IDirectInputDevice8::GetProperty +method. DIPROP_KEYNAME retrieves the localized key name, in the form +of a DIPROPSTRING, from a DirectInput DIK_* value. + +DIPROP_SCANCODE is supported by the IDirectInputDevice8::GetProperty +method. DIPROP_KEYNAME retrieves the device scancode, in the form of a +DIPROPDWORD, from a DirectInput DIK_* value. + + +DirectPlay +========== + +DirectPlay has been completely rewritten in DirectX 8.0 to provide the +robust scalability required to build high performance, massively +scaleable network games. With version 8.0, DirectPlay also provides +voice communication via the DirectPlay Voice API. + +Note: In these release notes the phrases "DirectPlay4", "DirectPlay4 +interface" or "DirectPlay4 session" are used to mean the IDirectPlay4 +interface or a session hosted using the IDirectPlay4 interface, even +if that interface or session is implemented using the dlls that are +part of DirectX 8.0. "DirectPlay8", "DirectPlay8 interface", and +"DirectPlay8 session" mean the IDirectPlay8... family of interfaces, +or a session hosted using the IDirectPlay8... family of interfaces. + +Since DirectPlay8 has been completely re-written from the ground up, +the DirectPlay8 interfaces are not extensions of the existing +DirectPlay4 interfaces. i.e. the DirectPlay8 interfaces do not +inherit from the DirectPlay4 interfaces in the object oriented sense. + +Also, DirectPlay8 sessions are not network compatible with DirectPlay4 +sessions. + +Note that the DirectPlay4 interfaces are still present in DirectPlay8 +and are still compatible with previous versions of DirectPlay. So games +written for DirectPlay4 will still run on systems with DirectX 8.0 +installed. + +To enable maximum scalability, DirectPlay8 uses a callback model. All +indications from DirectPlay8 are delivered to the application via an +application supplied callback function. Therefore DirectPlay can indicate +multiple events to the application in parallel on different threads. + +Additionally, performance critical operations such as Send and Receive +can be performed without copying data, and without thread switching. + +This programming model allows DirectPlay applications to achieve maximum +possible performance and scalability on both single-processor and +multi-processor hardware. + +DirectPlay8 also adds: + - Better support for NATs, Firewalls, and Proxy Servers + - Application defined payloads on session enumerations and replies + - Revised addressing scheme that is URL ruled based designed to be human + readable and portable + - The use of I/O completion ports in Windows 2000 + - Improved ease of use through the removal of obtuse services, for example + groups within groups + +The DirectPlay Voice interfaces allow you to quickly and easily establish +voice communications over an existing DirectPlay8 or DirectPlay4 session. + +DirectPlay Voice provides the following features: + - Peer to peer, forwarding server, and mixing server voice topologies + - A variety of codecs from 1.2kbit/sec to 64kbit/sec, that can be used + royalty free in DirectPlay Voice. + - Voice detection to automatically trigger voice transmission + - Automatic gain control to automatically adjust the recording volume level + - Adaptive queuing that provides a smooth speech stream with minimum latency + over different and changing network conditions + - Integration with DirectSound & DirectSoundCapture + - Sound Hardware Test wizard + - Support for IDirectPlay8 and IDirectPlay4 transport sessions + +DirectPlay8 still has all the benefits of previous versions of DirectPlay, +including: + - session setup and teardown + - session discovery + - application launching + - player management + - group management + - client/server and peer to peer operation + - peer to peer host migration + - bandwidth throttling protocol + + +DirectShow +========== + +DirectX 8.0 marks the first release that DirectShow has been part of the +core DirectX redistribution. This means that for the first time, +applications using DirectShow need not install a separate redist, and +current DirectX users can now take advantage of DirectShow in their +applications. Adding to the existing capabilities for audio and video +playback and capture that DirectShow provided, this new release also +provides the following new features: + +Windows Media Format Support: Two new filters enable DirectShow applications +to read and write files in Windows Media Format. The ASF Reader filter +reads and parses Windows Media Format files. The ASF File Writer filter +writes Windows Media Format files; it also does the necessary multiplexing +and compressing. + +DirectShow Editing Services (DES): This is a complete API for timeline and +switching services built on top of DirectShow. This API implements the +core of non-linear editing services, and allows for the creation of +composite media from a variable number of source audio and video streams. +By allowing real-time effects and transitions, true "on-the-fly" source +switching, run-time compositing, run-time seeking, and graph management, +DES provides a powerful high-level way to use DirectShow, while +still allowing applications to access lower-level DirectShow functions. +DES replaces cutlists, which are no longer supported. + +New DVD Support: Two new interfaces, IDVDControl2 and IDVDInfo2, greatly expand +the functionality of the DVD Navigator. The new MSWebDVD ActiveXŽ control +makes this functionality available to script-based applications. +New DVD features include: Karaoke multichannel audio support, audio volume +control through IBasicAudio, support for frame stepping and frame-accurate +seeking, simplified access to DVD text information strings, and improved support +for parental management controls. + +DirectX Media Objects: DirectX Media Objects (DMOs) are a new way to write +data-streaming components. Like DirectShow filters, DMOs take input data and use +it to produce output data. However, the application programming interfaces +(APIs) for DMOs are much simpler than the corresponding APIs for DirectShow. As +a result, DMOs are easier to create, test, and use than DirectShow filters. +A wrapper filter is provided to allow DMOs to be used within DirectShow. + +Media Parameters: Media parameters are a new set of APIs that support run-time +changes to an object's properties. They offer precise control over properties +that change rapidly and require both high performance and repeatability. They +enable a property to follow an exact curve, such as a sine wave or +inverse-square curve, in real time. + +New Filters: +- MJPEG Decompressor: Decodes a video stream from motion JPEG to uncompressed video +- MJPEG Compressor: Compresses an uncompressed video stream using + motion JPEG compression. +- Null Renderer: Discards samples without displaying or rendering the sample data. + Applications can use this filter to discard data from a stream. +- Sample Grabber: Retrieves media samples as they move through the filter graph. + Applications can use this filter to obtain poster frames or other media data. + +Dynamic Graph Building: DirectShow applications can now change the graph +while it is still playing. This allows new audio or video streams to be added +to a graph, effects to be inserted in the graph without any visible gap in the +playback, and chains of filters to be paused and run independent of the main graph. + +Push Model Clock Support: This allows for improved synchronization between +audio and video streams. The default audio renderer can now be slaved to +another clock, allowing for applications to deal with timing differences +between clocks on sound cards and capture devices, among other scenarios. + +Graph Edit enhancements: GraphEdit now displays filter registration information +in the Insert Filters dialog and allows you to spy on existing graphs in +external processes (if those processes register their graphs). + + +DirectMusic Producer +==================== + +This version of Producer features many new features to aid in both +authoring and auditioning of DirectMusic content. These features include +authoring support for audio path configurations, which manages pchannel +and synth assignments as well as effects routing, the new DLS level 2 +format (which includes stereo waves, layering of regions, and filtering) +and a new API for scripting, which allows composers and sound designers +to integrate audio content directly into an application. Other major +features include new track types, including a wave track, a script +track, a secondary segment trigger track and a melody track, which +integrates a variable approach with greater control of form. + + +DirectX Control Panel +===================== +Developers can now toggle between DirectX retail and debug system components +through the DirectX Control Panel. + + +Broadcast Driver Architecture +====================== + +Broadcast Driver Architecture (BDA) is a set of Ring 0 and Ring 3 software +components based on the DirectShowŽ architecture for streaming multimedia +broadcast content. BDA is also a specification that defines how custom +components, such as filters for parsing private data, interface with the +rest of the system. Digital-TV applications can use the Ring 3 components +to build filter graphs, implement a single model for tuning across all +network types, automate the storage and retrieval of electronic program +guide information, and capture IP data including ATVEF announcements, +triggers, and packages. + +__________________________________________________________________ + + +CD LAYOUT: + + +The following is a brief description of the directories found with a complete +DirectX 8.0 SDK download. Depending on options specified during +installation, some of these directories can be installed on your hard drive. + +\Bin + High level DirectX applications & tools. + All can be accessed from the Start menu if "Utilities" are installed. + + Note: Japanese systems will require Internet Explorer 5.0 (IE5) for + the DirectX Control Panel to display properly. IE5 can be found at + http://www.microsoft.com/windows/ie/default.htm. + + +\Doc + Contains reference documentation for the DirectX 8.0 APIs. + This Documentation must be viewed with Windows HTMLHelp. + + Note: The HTMLHelp viewer requires a minimum installation of + Internet Explorer 5.0 (IE5). IE5 can be found at + http://www.microsoft.com/windows/ie/default.htm. + +\Essentls + \DMusProd (Direct Music Producer) + - DirectMusic Producer is the authoring tool for Direct Music. It + allows composers and sound designers to use the interactive and + variable resources of DirectMusic along with the consistent sound + performance of DLS. DirectX Audio Scripting can also be authored + and tested within Producer. The DirectMusic Producer setup program + and all files are located here. + +\Extras + \Direct3D + - Skinning exporter tools + \DirectShow + - Contains the DVDBoilerplate. See readme.txt within the directory + for more information. + - Contains additional media that can be used with DirectShow and the + DirectShow Editing Services (DES) interfaces. + \Documentation + - Contains DirectX 7 HTMLHelp Documentation for English and Japanese. + - Also contains DirectX 7 Documentation in Microsoft Word format + (English only). + \GameVoice + - Contains the installer for the English Version of Game Voice Share, + which includes voice communication and game launching functionality. + For more information on Game Voice, visit http://www.gamevoice.com. + \Symbols + - Contains directories of DirectX 8.0 symbol files for + Win2000 and Win9x (retail and debug for each). + +\Include + contains DirectX 8.0 include files for DirectX core components. + +\Lib + contains DirectX 8.0 library files for DirectX core components. + +\License + Text versions of the DirectX SDK and End User License Agreements and + the Redistributable License Agreement. + +\Redist + Redistributable versions of the DirectX 8.0 Runtime. + +\Samples + Contains all sample code and sample binaries. Most samples can be + accessed from the Start menu when installed via the downloaded + InstallShield setup. + +\SDKDev + This directory contains the runtime installs that are installed with + the SDK. They are English only and contain both debug and retail + DirectX 8.0 system components that can be "switched" between retail + and debug without re-installing. For the DirectX 8.0 components, + retail or debug can be switched via the DirectX Control Panel. + + The \retail folder contains the setup that will install non-DirectX 8.0 + retail components while the \debug folder will install all debug + components. Both install DX8 retail and debug components. These are + the only components that can be "switched". + +__________________________________________________________________ + + +DIRECTX 8.0 SDK NOTES AND KNOWN ISSUES + + +DirectX Audio (DirectSound & DirectMusic) +========================================= + +Below are some known issues with DirectMusic and DirectSound in +DirectX 8.0 that you may encounter. + +- ParamEQ and Distortion effects have parameters that are sampling rate + dependent. + Setting these params to a value that is out of range for that sampling + rate will result in: + Distortion: Parameters are 'clipped' at the valid range for the + sampling rate + ParamEQ: If the frequency is greater than can be supported by the + sampling rate, the effect is disabled- In the DirectMusic + 3DAudio sample, there may be some breakup if Doppler is set > 4 +- DirectSound buffers that are created with DSBCAPS_CTRLFX must be at + least 100ms in length. + + +Direct3D +======== + +- All executables compiled against earlier DirectX 8.0 betas must be + recompiled with this version to run. +- Alt-enter in the samples results in texture corruption for some drivers. + Workaround: Get newer drivers. +- The value for MaxPrimitiveCount defines the max number of vertices + as well as the max number of primitives that can be sent to a + DrawIndexedPrimitive or DrawPrimitive call. +- A bug in the Windows2000 kernel causes an issue upon mode-switches for + AGP surfaces locked with the NOSYSLOCK flag. The contents of any such + surface may become inaccessible for the duration of the NOSYSLOCK lock + if a mode-switch happens after the Lock and before the Unlock. This happens + for both DX7 and DX8 applications. The most likely scenario is a DX8 + application running on a driver that supports hardware vertex buffers, + but using software vertex processing (fixed or shader). Under these + scenarios, Direct3D might keep a NOSYSLOCK lock on an AGP vertex buffer. + If the user alt-tabs out of the application or does anything else to cause + a mode-change, the thread writing into the vertex buffer may fault. There + is no known workaround. Microsoft will fix this issue in the next version + of Windows and will attempt to ship a fix in a future Windows2000 + Service Pack. +- A bug in the DX6 and DX7 implementation of + IDirectDraw*::GetDeviceIdentifier causes the DirectDraw runtime to write + four extra bytes past the end of the structure. To work around this issue, + allocate an extra four bytes at the end of your DDDEVICEIDENTIFIER* + structure. This bug does not exist in the IDirect3D8::GetAdapterIdentifier + version. +- The Direct3D8 run-time exhibits the following behvior on all Windows NT + platforms. Run a full-screen Direct3D8 application, press Ctrl-Alt-Del, + press ESC. The desktop will appear, but the display card will still be in + the application's resolution, not the proper desktop resolution. (The user + may alt-tab back to the application at this time.) A fix for this will be + in the next release of DirectX, and the problem will be fixed in the next + version of Windows NT. Developers are urged NOT to try to work-around this + problem nor code their own solutions, since such solutions are very likely + to interact poorly with our own fix. +- Terminating a process with un-released vertex buffers on Win9x DX7 APIs + can cause instability. This is caused by a bug in the automatic per-process + cleanup code in DirectDraw which causes VBs to be leaked permanently (until + reboot) on all Win9x platforms: Windows 95, 98, Millenirum. Applications + should be carefully coded to ensure all Vertex Buffers are correctly released + before exiting the process. +- Applications should be careful when responding to the WM_MOUSEMOVE message. + If the application calls IDirect3DDevice8::SetCursorPosition with a coordinate + that is outside the current display mode size, then the Direct3D run-time may + cause another WM_MOUSEMOVE, which may cause the application to call + IDirect3DDevice8::SetCursorPosition again, resulting in an infinite loop. + The application should either be careful not to call + IDirect3DDevice8::SetCursorPosition with invalid positions, or should never + call IDirect3DDevice8::SetCursorPosition with repeated positions. + One common scenario for generating invalid mouse cursors is to remove the + menu style from a window incorrectly when going full-screen. The SDK sample + applications incorrectly use SetWindowLong to remove the menu bar from the + window before going fullscreen. The correct technique is to call + "hOldMenu = SetMenu(hWnd, NULL)'" before going fullscreen, and then + "SetMenu(hWnd, hOldMenu);" before returning to windowed mode. +- When using the function ValidateDevice on Win9x the return value will be + DD_OK if it is successful. + +Point Sprites: + +- When using the Direct3D software T&L pipeline (device created with + D3DCREATE_SOFTWARE_VERTEXPROCESSING flag set or with + D3DCREATE_MIXED_VERTEXPROCESSING flag and software vertex processing + toggled on), then point sprite support is guaranteed. When using + hardware vertex processing, some older drivers may not support point + sprites, indicated by d3dcaps->MaxPointSize = 0. Upgrading to a DX8 + driver for these parts will enable them. + + To ensure consistent behavior for point sprite support, set + D3DRS_CULLMODE = D3DCULL_NONE + D3DRS_FILLMODE = D3DFILL_SOLID + when rendering point sprites. + +Vertex Shaders: + +- Two vertex shader instructions may produce implementation-specific + results for out-of-range inputs, such as the log of a negative number. + The log, logp and y- component of the lit instruction macro should not + be passed negative values for this reason. + +Driver/Device Specific Issues: + +- The Windows Millennium driver for the ATI Rage 128 fails (draws nothing) + when using vertex shaders which output more than two texture coordinates + per texture coordinate set when the D3DTTFF_PROJECTED bit is not set. + +D3DX +==== + +- This product includes software developed by the University of California, + Berkeley and its contributors D3DX Mesh APIs. +- The ID3DXSkinMesh interfaces currently only support 16-bit mesh. 32-bit + mesh support is not yet implemented. +- All other D3DX Mesh interfaces do support 32-bit meshes even though the + docs say they do not. +- D3XGenerateAdjacency currently ignored the epsilon value and uses 0.0f + as the epsilon. +- In D3DXMatrixPerspectiveFOV, the aspect ratio is x/y instead of y/x. + + +DirectInput +=========== + + - There is a bug in DirectInput which causes the Logitech Wingman Formula wheel to + report pedal data on the wrong axes. + - There are some know issues that can cause mouse behavior to be very sluggish + when debugging using DirectInput. There are two reg files that will + assist with this issue. They are: + Mouse and Keyboard Emulation On.reg + Mouse and Keyboard Emulation Off.reg + "Mouse and Keyboard Emulation On.reg" will force all mouse calls through + dinput emulation, thus making the mouse perform properly inside the debugger. + "Mouse and Keyboard Emulation Off.reg" will turn off force emulation. + Only use these keys on development machines, they are not intended to be + redisted as they are a global setting that effects all Direct Input clients. + - The following devices are supported with device images in this release. + + ACT LABS RS + + ACT LABS Force RS + + Gravis Xterminator Dual Control + + Gravis Blackhawk Digital + + Gravis Gamepad Pro USB + + Gravis Gamepad Pro + + Gravis Eliminator Gamepad Pro + + Gravis Xterminator Digital GamePad + + InterAct/3dfx SV-262A HammerHead Fx + + InterAct Axispad + + InterAct SV-251 Raider Digital + + Logitech WingMan Formula (Yellow) + + Logitech WingMan Extreme Digital 3D + + Logitech WingMan Gamepad Black (USB) + + Logitech Wingman Rally Force USB + + Logitech Wingman Rumblepad + + Microsoft Sidewinder Gamepad Pro + + Microsoft SideWinder Force Feedback Wheel + + Microsoft SideWinder Force Feedback Pro + + Microsoft Sidewinder FF 2 + + Microsoft Sidewinder Dual Strike + + Microsoft Sidewinder Precision 2 + + Microsoft Sidewinder Plug and Play + + Microsoft SideWinder Game Pad + + Microsoft SideWinder Precision Racing Wheel + + Microsoft SideWinder Precision Pro + + Microsoft SideWinder Freestyle Pro + + Microsoft SideWinder 3D Pro + + +DirectPlay +========== + +The following are known issues with DirectPlay in this release that +you may need to work around. + +- Note that the dwTimeoutUntilKeepAlive member of the DPN_CAPS structure + specifies a minimum value. The first keepalive packet may be sent as + much as 30 seconds later than the minimum value specified in this + member. For example, if you set dwTimeoutUntilKeepAlive to 60000 + (60 seconds) the first keepalive packet may be sent anywhere from + 60 to 90 seconds after the last normal packet was sent. +- The "debug output level" slider on the DirectPlay tab of the DirectX + control panel is not functional. For instructions on how to change the + debug output level, see the "dp8log.txt" file in the + [sdkroot]\bin\DXUtils directory. +- To use DirectPlay Voice in full duplex mode, we recommend that you update + to the latest drivers for your audio device. Some older drivers do not + provide reliable full duplex performance. +- If you connect to a location that you have enumerated, the enumeration + will be canceled automatically for you. If you attempt to do a cancel + asynchronous operation on this enum after the connect is completed you + will get back DPNERR_USERCANCEL error code. Be aware that this is the + expected behavior and that you should not exit with an error condition. +- The modem service provider implementation for DirectPlay8 requires + TAPI 2.0 functionality. TAPI 2.0 is available as an installed component + on Windows 98 and later, but not on Windows 95. If your application + requires modem functionality on the Windows 95 platform, the TAPI 2.0 + patch for Windows 95 can be obtained on the Microsoft FTP site + (ftp://ftp.microsoft.com/developr/TAPI/tapi2195.zip) and distributed + with you application. + +Notes on NATs (Network Address Translators): + +- There are many different NAT solutions available, some of which are + different from others. We have attempted to document some of the issues + with various NAT solutions, but is not comprehensive. Please refer to + the DirectX Developer Page at http://msdn.microsoft.com/directx for + further information on these issues. + +DirectPlay Voice codecs via Windows ACM (Audio Compression Manager): + +- DirectPlay Voice uses the following codecs via the Windows ACM: + - Microsoft ADPCM + - Microsoft GSM + - DSP Group Truespeech +- Installation of these codecs with Windows is optional. If they + are not installed, then one or more of the compression types in + DirectPlay Voice will not function. If the application attempts + to use a compression type that is not functional due to a missing + ACM codec, it will receive the DVERR_COMPRESSIONNOTSUPPORTED + return code. +- On Windows 2000, the user can install these codecs through the + Add/Remove Hardware wizard. The user should select + "Add/Troubleshoot a device". When a list of hardware is presented, + the user should select "Add a new device", then on the next + page select "No, I want to select the hardware from a list". + This will bring up a list of hardware. Select "Sound, video, and + game controllers". The "Audio Codecs" item is listed under + "(Standard system devices)". +- On Windows 9x, the user can install these codecs through the + Add New Hardware wizard. When prompted, the user should select + "No, I want to select the hardware from a list". In the list of + device types, codecs are listed under "Sound video and game + controllers". The codecs are listed under two manufacturers. + The ADPCM and GSM codecs are listed under "Microsoft Audio + Codecs" and the Truespeech codec is listed under "DSP Group". + + +DirectShow +========== + +- The GraphEdit Tool (and some of the DirectShow samples) requires MFC42.DLL + to be present on the system. The DirectX SDK Setup does not install this + DLL. This will only be an issue on Windows 95 systems and will require you + to install Microsoft Visual C++ to acquire the DLL. +- Application development using the DirectShow base classes libraries requires + installation of the DirectShow samples. The source code for the base classes + is now included as a sample project, rather than as a separate Classes\Base + directory. You must compile these base classes to generate strmbase.lib and + strmbasd.lib, which are no longer installed as binary files. If you are + linking with strmbase.lib or strmbasd.lib with your own application, be sure + to build and link with the updated DirectX 8 libraries (instead of the older + libraries that are installed with Visual C++ or the Microsoft Platform SDK). +- The samples included with the SDK are configured to compile and link with + the updated libraries, which are generated by building the BaseClasses project. + Further build instructions are provided in: + \samples\Multimedia\DirectShow\readme.txt. +- The header file, along with many other DirectShow-specific header + files, is now located in the DirectShow samples BaseClasses directory, + which includes the BaseClasses source code and header files. You must add + the BaseClasses directory to the beginning of your project's include path + settings in order for Visual C++ to find all of the updated header files. +- To use the Teletext Decoder Fonts that are shipped with DX8, make sure that + the WST_* fonts are installed by examining the \windows\fonts directory. +- There is a known problem with the MP3 decoder filter when used with + Audio Effects DMOs. If you add an audio effect DMO (like WavesReverb, Echo, + or Flange) to an existing MP3 filter graph, the audio could be played back + at double speed. The problem would occur whenever the MP3 decoder is connected + to a downstream audio effect dmo (via the dmo filter wrapper) that offers a + default audio input type which doesn't match the native format of the + uncompressed MP3 stream. For example, if you render a 22kHz MP3 file and + add a DMO Audio effect, the MP3 filter could misinterpret the input type as + being 44kHz when it is actually 22kHz. This would not be a problem for 44kHz + MP3 files. This issue will be fixed in a future release. +- If you have the SDK on CD-ROM, the Extras\DirectShow\Media directory + contains additional media that can be used with DirectShow and the DirectShow + Editing Services (DES) interfaces. We have included DV-encoded AVI videos, + larger MPEG videos, and higher-quality JPEG images. Since the DV files are + very large, you should copy them to your hard disk before playing them to + ensure the best performance. +- Remote graph spying with GraphEdit works only on Windows 2000. +- The DirectShow Editing Services (DES) Color Generator source filter may + generate blue or green components incorrectly if they have small values. + For best results, use solid primary colors or set Blue and Green + components to values of either 0xFF or 0x00. + + +Broadcast Driver Architecture +====================== + +Known issues with Broadcast IP Data Reception under Windows 2000: + +- After rebooting a Windows 2000 system with a BDA receiver card installed, + the BDA NDIS IP NIC is not immediately active. It becomes active only + when an application inserts the BDA IPSink filter into a graph and connects + its input pin. Once activated by connecting the IPSink filter's input pin, + it takes 20 to 30 seconds for the BDA NDIS IP NIC to be assigned an IP + address. The address assigned will be a Net 10 address. Once activated, + the BDA NDIS IP NIC will remain active until the system is rebooted. +- There may be some applications that use the BDA NDIS IP NIC as the default + LAN adapter. These apps will fail if the BDA NDIS IP NIC is active. To + de-activate the BDA NDIS IP NIC, reboot the system and do not run a TV graph + or application. + + +Documentation +============= + +- For proper viewing of the DirectX Documentation, install the docs from + the DirectX 8.0 SDK CD. Specify a full installation, or if you chose a + Custom install, ensure that you've selected Documentation. +- The known issues with the DirectX 8.0 Documentation are written up in a + separate file. You will find these issues listed in the + DirectX8_Doc_Readme.txt file found in the \dxf\doc\DirectX8 + folder. This file is also installed into the \doc\DirectX8 + when DirectX8 Documentation is installed. + + +Samples +======= + +Miscellaneous Issues: + +- Some samples will compile with errors with the UNICODE flag defined. +- Visual C/C++ 5 compatibility in DirectX 8.0 depends on Service Pack 3 + for Visual Studio 97. If you see the following errors: + "fatal error LNK1106: invalid file or disk full: cannot seek to 0x389bc8bf" + "Internal error during Pass1" + then you need to upgrade your Visual C/C++ 5 installation. Service packs + for Visual Studio can be found at http://msdn.microsoft.com/vstudio/sp/vs97. + +Direct3D Samples: + +- There are miscellaneous issues with some display hardware & drivers. + Please let us know of any problems you encounter and specify whether you + believe it is sample or driver related. + +DirectShow Samples: + +- There are several .XTL sample files in the \media folder. These files + demonstrate some of the functionality available in the DirectShow Editing + Services. You can render these files using the XTLTest C++ sample and + the XTLTestVB and DexterVB VisualBasic samples. All provided XTL files + refer to media that ships in the SDK's media directory. Rendering XTL + files is a great way to get an idea of what the new DirectShow Editing + Services APIs make possible. For a simple demo, drag a few of the SDK + media directory's sample .XTL files onto the XTLTestVB sample's client area. +- The DirectShow Visual Basic samples demonstrate more of the DES functionality + than the C++ samples. Be sure to run SlideShowVB and TrimmerVB if you are + interested in DES. You can also use the DexterVB ("Dexter Explorer") + application as an XTL development/test tool. +- The Texture3D sample is known to fail on some systems (referencing + invalid memory), for which you may see an error message. This failure is + in initialization of D3D. We recommend updating your video card drivers + to the most current revision, as that usually resolves the problem. +- The DirectShow IDL files are currently located in the + \include\DShowIDL directory of the SDK for your convenience. +- You will be required to build the \BaseClasses libraries before any sample + that depends on them can be built or executed. Please review the Readme.Txt + file in the DirectShow samples root directory for more information on + building the samples. + + +DirectX for Visual Basic Samples: + +- DBMON.exe is a console application which allows the Visual Basic DirectX + developer to take advantage of extended output that debug installs of + DirectX provide. This application works only under Windows 2000. + To use, execute the application. All debug output will be captured and sent + to the console window. If you are not seeing debug output, ensure that + you have installed the debug version of DirectX, and that you are running + Windows 2000. +- DXVB Messenger Server is the server portion of a client/server instant + messaging application. This sample requires the use of ActiveX Data Object + (ADO) to maintain the data needed. If you are running Windows 9x, you must + have the latest version of ADO installed on your machine to compile or run + this sample. You can install the latest ADO while Visual Basic Professional + is being installed or you can download the latest ADO from the web at: + http://www.microsoft.com/data/ado/. ADO is installed by default with + Visual Basic 6 Enterprise. +- If you are experiencing problems searching for and connecting to sessions + using DirectPlay for VisualBasic, you may need to update your system. + To update, install DCOM98 from: + http://download.microsoft.com/msdownload/dcom/98/x86/en/dcom98.exe + + +Other +===== + +- The DirectDraw "Debug Level" slider in DirectX Control Panel Applet does + not function. Instead use the "Debug Output Level" slider on the Direct3D + tab, this will effect both DDraw and D3D8. Also note that DirectDraw labels + it's debug spew as coming from "Direct3D8". +- The DirectX runtime will not operate on NEC PC98 systems. SDK and Runtime + installations have been intentionally blocked on this system. +- The DirectX 8.0 runtime requires a Pentium compatible CPU for operation. + The DirectX runtime setup will not install on processors that do not report + Pentium compatibility. Some older Cyrix processors, while compatible with + the Pentium instruction set, report as x486 processors, and thus do not + support installation of the DirectX 8.0 run time. +- When installing the DirectX 8.0 runtime from the DirectX SDK you will + notice that the size requirements are inflated from previous DirectX versions. + For example, if you were only to install a DirectX 8.0 runtime from the + DirectX SDK onto a system with low disk space, you would see that at least + 120 MB is required. This is because both the retail and debug runtimes are + included in each of the DirectX SDK runtime installs (this allows developers + to switch between retail and debug without having to re-install). However, + this inflated size is not true of the redistributable runtimes shipped with + the SDK. Redistributable installs will require significantly less disk space. + While this number is dependent on the disk format (Fat16/32 vs. NTFS) we + expect approximately 40 MB of free space is required for uncompression and + installation and approximately 15 MB once installed (and this is only true for + systems with no previous DirectX version installed). The DirectX Setup API + will check for and display error messages when these requirements are not met. +- Windows 95 Japanese Systems will require MS UI Gothic patch for Windows 95 + or Internet Explorer 5.0 (or after) for the DirectX Control Panel to display + properly. MS UI Gothic Patch can be found at + http://www.microsoft.com/JAPAN/win95/msgotupd/default.htm and IE5 (or after) + can be found at http://www.microsoft.com/windows/ie/default.htm. + +__________________________________________________________________ + + +COMPILER SUPPORT + +All DirectX 8.0 SDK samples are developed and compiled with Visual Studio 6.0. +We have provided Visual Studio 6.0 DSP files for your convenience. + +All DirectX 8.0 libraries, with the exception of the DirectShow libraries, should +be compatible with Visual Studio 5.0 SP3 or higher. + +__________________________________________________________________ + + +SPECIAL THANKS + +Marlin Studios + +Textures used in the Billboard sample, tree02S.tga, tree01S.tga & tree35S.tga, +are provided courtesy of Marlin Studios (http://www.marlinstudios.com). +They are provided for use with this sample only and cannot be distributed +with any application without prior written consent. + +Viewpoint Digital, Inc. + +The model used by the Visual Basic AutoParts sample, engine1.x, is provided +courtesy of Viewpoint Digital, Inc. (http://www.viewpoint.com). It is provided +for use with this sample only and cannot be distributed with any application +without prior written consent. V6 Engine Model copyright 1999 Viewpoint +Digital, Inc.. + +3DCAFE and Platinum Pictures + +The model in the Dolphin samples, Dolphin.x, is derived from the model files +(dolphins.zip) provided courtesy of 3DCAFE and Platinum Pictures +(http://www.3dcafe.com/). It is provided for use with this sample only. +For further terms of use please visit the 3DCAFE site or contact 3DCAFE. diff --git a/windows_libs/mssdk/Uninst.isu b/windows_libs/mssdk/Uninst.isu new file mode 100644 index 00000000..c90e6ae6 Binary files /dev/null and b/windows_libs/mssdk/Uninst.isu differ diff --git a/windows_libs/mssdk/doc/DirectXEULAs/DirectX End User EULA.txt b/windows_libs/mssdk/doc/DirectXEULAs/DirectX End User EULA.txt new file mode 100644 index 00000000..0b00fe66 --- /dev/null +++ b/windows_libs/mssdk/doc/DirectXEULAs/DirectX End User EULA.txt @@ -0,0 +1,24 @@ +SUPPLEMENTAL END USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE + +IMPORTANT: READ CAREFULLY - The Microsoft Corporation ("Microsoft") operating system components which you are about to install, including any "online" or electronic documentation ("OS COMPONENTS"), are subject to the terms and conditions of the agreement under which you have validly licensed the applicable Microsoft operating system product identified below (each an "End User License Agreement" or "EULA") and the terms and conditions of this Supplemental EULA. BY INSTALLING, COPYING OR OTHERWISE USING THE OS COMPONENTS, YOU AGREE TO BE BOUND BY THE TERMS AND CONDITIONS OF THE EULA FOR THE APPLICABLE OPERATING SYSTEM PRODUCT IDENTIFIED BELOW AND THIS SUPPLEMENTAL EULA. IF YOU DO NOT AGREE TO THESE TERMS AND CONDITIONS, DO NOT INSTALL, COPY OR USE THE OS COMPONENTS. + +NOTE: IF YOU DO NOT HAVE A VALID EULA FOR EITHER MICROSOFT WINDOWS 95, WINDOWS 98, WINDOWS ME, OR WINDOWS 2000, (each an "OS Product"), YOU ARE NOT AUTHORIZED TO INSTALL, COPY OR OTHERWISE USE THE OS COMPONENTS AND YOU HAVE NO RIGHTS UNDER THIS SUPPLEMENTAL EULA. + +Capitalized terms used in this Supplemental EULA and not otherwise defined herein shall have the meanings assigned to them in the applicable OS Product EULA. + +General. The OS COMPONENTS are provided to you by Microsoft to update, supplement, or replace existing functionality of the applicable OS Product. Microsoft grants you a license to use the OS COMPONENTS under the terms and conditions of the EULA for the applicable OS Product (which is hereby incorporated by reference) and the terms and conditions set forth in this Supplemental EULA, provided that you comply with all such terms and conditions. To the extent that any terms in this Supplemental EULA conflict with terms in the applicable OS Product EULA, the terms of this Supplemental EULA control solely with respect to the OS COMPONENTS. + +Additional Rights and Limitations. + +* If you have multiple validly licensed copies of the applicable OS Product(s), you may reproduce, install and use one copy of the OS COMPONENTS as part of such OS Product on each of your computers running validly licensed copies of such OS Product(s) provided that you use such additional copies of the OS COMPONENTS in accordance with the terms and conditions above. For each validly licensed copy of an applicable OS Product, you also may reproduce one additional copy of the OS COMPONENTS solely for archival purposes or reinstallation of the OS COMPONENTS on the same computer as the OS COMPONENTS were previously installed. Microsoft retains all right, title and interest in and to the OS COMPONENTS. All rights not expressly granted are reserved by Microsoft. + +IF THE OS PRODUCT WAS LICENSED TO YOU BY MICROSOFT OR ANY OF ITS WHOLLY OWNED SUBSIDIARIES, THE LIMITED WARRANTY (IF ANY) INCLUDED IN THE OS PRODUCT EULA APPLIES TO THE OS COMPONENTS PROVIDED THE OS COMPONENTS HAVE BEEN LICENSED BY YOU WITHIN THE TERM OF THE LIMITED WARRANTY IN THE OS PRODUCT EULA. HOWEVER, THIS SUPPLEMENTAL EULA DOES NOT EXTEND THE TIME PERIOD FOR WHICH THE LIMITED WARRANTY IS PROVIDED. + +IF THE OS PRODUCT WAS LICENSED TO YOU BY AN ENTITY OTHER THAN MICROSOFT OR ANY OF ITS WHOLLY OWNED SUBSIDIARIES, MICROSOFT DISCLAIMS ALL WARRANTIES WITH RESPECT TO THE OS COMPONENTS AS FOLLOWS: + +DISCLAIMER OF WARRANTIES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND ITS SUPPLIERS PROVIDE TO YOU THE OS COMPONENTS, AND ANY (IF ANY) SUPPORT SERVICES RELATED TO THE OS COMPONENTS ("SUPPORT SERVICES") AS IS AND WITH ALL FAULTS; AND MICROSOFT AND ITS SUPPLIERS HEREBY DISCLAIM WITH RESPECT TO THE OS COMPONENTS AND SUPPORT SERVICES ALL WARRANTIES AND CONDITIONS, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) WARRANTIES OR CONDITIONS OF OR RELATED TO: TITLE, NON-INFRINGEMENT, MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS OF RESPONSES, RESULTS, LACK OF NEGLIGENCE OR LACK OF WORKMANLIKE EFFORT, QUIET ENJOYMENT, QUIET POSSESSION, AND CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR PERFORMANCE OF THE OS COMPONENTS AND ANY SUPPORT SERVICES REMAINS WITH YOU. + +EXCLUSION OF INCIDENTAL, CONSEQUENTIAL AND CERTAIN OTHER DAMAGES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL MICROSOFT OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR: LOSS OF PROFITS, LOSS OF CONFIDENTIAL OR OTHER INFORMATION, BUSINESS INTERRUPTION, PERSONAL INJURY, LOSS OF PRIVACY, FAILURE TO MEET ANY DUTY (INCLUDING OF GOOD FAITH OR OF REASONABLE CARE), NEGLIGENCE, AND ANY OTHER PECUNIARY OR OTHER LOSS WHATSOEVER) ARISING OUT OF OR IN ANY WAY RELATED TO THE USE OF OR INABILITY TO USE THE OS COMPONENTS OR THE SUPPORT SERVICES, OR THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES, OR OTHERWISE UNDER OR IN CONNECTION WITH ANY PROVISION OF THIS SUPPLEMENTAL EULA, EVEN IN THE EVENT OF THE FAULT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY, BREACH OF CONTRACT OR BREACH OF WARRANTY OF MICROSOFT OR ANY SUPPLIER, AND EVEN IF MICROSOFT OR ANY SUPPLIER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +LIMITATION OF LIABILITY AND REMEDIES. NOTWITHSTANDING ANY DAMAGES THAT YOU MIGHT INCUR FOR ANY REASON WHATSOEVER (INCLUDING, WITHOUT LIMITATION, ALL DAMAGES REFERENCED ABOVE AND ALL DIRECT OR GENERAL DAMAGES), THE ENTIRE LIABILITY OF MICROSOFT AND ANY OF ITS SUPPLIERS UNDER ANY PROVISION OF THIS SUPPLEMENTAL EULA AND YOUR EXCLUSIVE REMEDY FOR ALL OF THE FOREGOING SHALL BE LIMITED TO THE GREATER OF THE AMOUNT ACTUALLY PAID BY YOU FOR THE OS COMPONENTS OR U.S.$5.00. THE FOREGOING LIMITATIONS, EXCLUSIONS AND DISCLAIMERS SHALL APPLY TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EVEN IF ANY REMEDY FAILS ITS ESSENTIAL PURPOSE. + diff --git a/windows_libs/mssdk/doc/DirectXEULAs/DirectX SDK EULA.txt b/windows_libs/mssdk/doc/DirectXEULAs/DirectX SDK EULA.txt new file mode 100644 index 00000000..871450e0 --- /dev/null +++ b/windows_libs/mssdk/doc/DirectXEULAs/DirectX SDK EULA.txt @@ -0,0 +1,59 @@ + +Microsoft DirectX 8.0 Software Development Kit +END-USER LICENSE AGREEMENT FOR MICROSOFT SOFTWARE + +IMPORTANT-READ CAREFULLY: This End-User License Agreement ("EULA") is a legal agreement between you (either an individual or a single entity) and Microsoft Corporation ("Microsoft") for the Microsoft software product identified above, which includes computer software and may include associated media and printed materials, and "online" or electronic documentation ("SOFTWARE PRODUCT). The SOFTWARE PRODUCT provided to you by Microsoft. Any software provided along with the SOFTWARE PRODUCT that is associated with a separate end-user license agreement is licensed to you under the terms of that license agreement. You agree to be bound by the terms of this EULA by installing, copying, downloading, accessing or otherwise using the SOFTWARE PRODUCT. If you do not agree to the terms of this EULA, do not install or use the SOFTWARE PRODUCT. + +SOFTWARE PRODUCT LICENSE + +The SOFTWARE PRODUCT is protected by copyright laws and international copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE PRODUCT is licensed, not sold. + +1.GRANT OF LICENSE. + +Microsoft grants you the following rights provided that you comply with all the terms and conditions of this EULA: + +SOFTWARE PRODUCT. You may install and use the SOFTWARE PRODUCT on up to ten (10) computers, including workstations, terminals or other digital electronic devices ("COMPUTERS"), provided that you are the only individual using the SOFTWARE PRODUCT on each COMPUTER, to design, develop, and test software application products for use with Microsoft operating system products including Windows 2000, Windows 95, Windows 98 and Windows Me and subsequent releases thereto ("Application"). If you are an entity, Microsoft grants you the right to designate one individual within your organization to have the right to use the SOFTWARE PRODUCT in the manner provided above. + +SAMPLE CODE. You may modify the sample source code located in the SOFTWARE PRODUCT's root directory "\DXF\Samples\Multimedia"("Sample Code") to design, develop and test your Application. You may also reproduce and distribute the Sample Code in object code form along with any modifications you make to the Sample Code, provided that you comply with the Distribution Requirements described below. For purposes of this Section, "modifications" shall mean enhancements to the functionality of the Sample Code. + +REDISTRIBUTABLE CODE. Portions of the SOFTWARE PRODUCT are designated as "Redistributable Code". If you choose to distribute the Redistributable Code, you must include the files as specified listed in the SOFTWARE PRODUCTS root directory "\DXF\doc\directxeulas\directx redist.txt". No other modifications, additions, or deletions to the Redistributable Code are permitted without written permission from Microsoft Corporation. Your rights to distribute the Redistributable Code are subject to the Distribution Requirements described below. + +DISTRIBUTION REQUIREMENTS. You may reproduce and distribute an unlimited number of copies of the Sample Code and/or Redistributable Code, (collectively "REDISTRIBUTABLE COMPONENTS")as described above, provided that (a) you distribute the REDISTRIBUTABLE COMPONENTS only as part of, or for use in conjunction with your Application; (b) your Application adds significant and primary functionality to the REDISTRIBUTABLE COMPONENTS; (c) the REDISTRIBUTABLE COMPONENTS only operate in conjunction with Microsoft Windows operating system products including Windows 2000, Windows 95, Windows 98, Windows Me, and subsequent versions thereof, (d) you distribute your Application containing the REDISTRIBUTABLE COMPONENTS pursuant to an End-User License Agreement (which may be "break-the-seal", "click-wrap", or signed), with terms no less protective than those contained herein; (e) you do not permit further redistribution of the REDISTRIBUTABLE COMPONENTS by your end-user customers; (f) you must use the setup utility included with the REDISTRIBUTABLE COMPONENTS to install the Redistributable Code; (g) you do not use Microsoft's name, logo, or trademarks to market your Application; (h) you include all copyright and trademark notices contained in the REDISTRIBUTABLE COMPONENTS; (i) you include a valid copyright notice on your Application; and (j) you agree to indemnify, hold harmless, and defend Microsoft from any against any claims or lawsuits, including attorneys' feeds, that arise or result from the use or distribution of your Application. + +If you distribute the Redistributable Code separately for use with your Application (such as on your web site or as part of an update to your Application), you must include an end user license agreement in the install program for the Redistributable Code in the form of \license\directx end user eula.txt. Contact Microsoft for the applicable royalties due and other licensing terms for all other uses and/or distribution of the REDISTRIBUTABLE COMPONENTS. + +2. COPYRIGHT. + +All title and intellectual property rights in and to the SOFTWARE PRODUCT (including but not limited to any images, photographs, animations, video, audio, music, text and "applets," incorporated into the SOFTWARE PRODUCT), any accompanying printed materials, and any copies of the SOFTWARE PRODUCT, are owned by Microsoft or its suppliers. All title and intellectual property rights in and to the content which may by accessed through use of the SOFTWARE PRODUCT is the property of the respective content owner and may be protected by applicable copyright or other intellectual property laws and treaties . This EULA grants you no rights to use such content. If this SOFTWARE PRODUCT contains documentation which is provided only in electronic form, you may print one copy of such electronic documentation. You may not copy the printed materials accompanying the SOFTWARE PRODUCT. All rights not expressly granted are reserved by Microsoft. + +3. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS. + +a. Limitations on Reverse Engineering, Decompilation and Disassembly. You may not reverse engineer, decompile, or disassemble the SOFTWARE PRODUCT, except and only to the extent that such activity is expressly permitted by applicable law notwithstanding this limitation. + +b. Rental. You may not rent, lease or lend the SOFTWARE PRODUCT. + +c. Support Services. Microsoft may provide you with support services related to the SOFTWARE PRODUCT ("Support Services"). Use of the Support Services is governed by the Microsoft policies and programs described in the user manual, in "on line" documentation and/or other Microsoft-provided materials. Any supplemental software code provided to you as part of the Support Services shall be considered part of the SOFTWARE PRODUCT and subject to the terms and conditions of this EULA. With respect to technical information you provide to Microsoft as part of the Support Services, Microsoft may use such information for its business purposes, including for product support and development. Microsoft will not utilize such technical information in a form that personally identifies you. + +d. Software Transfer. The initial user of the SOFTWARE PRODUCT may make a one-time permanent transfer of this EULA and SOFTWARE PRODUCT only directly to an end-user. This transfer must include all of the SOFTWARE PRODUCT (including all component parts, the media and printed materials, any upgrades, this EULA, and, if applicable, the Certificate of Authenticity). Such transfer may not be by way of consignment or any other indirect transfer. The transferee of such one-time transfer must agree to comply with the terms of this EULA, including the obligation not to further transfer this EULA and SOFTWARE PRODUCT. + +e. Termination. Without prejudice to any other rights, Microsoft may cancel this EULA if you do not abide with the terms and conditions of this EULA, in which case, you must cease all use or distribution and destroy all copies of the SOFTWARE PRODUCT and all of its component parts. + +4. U.S. GOVERNMENT RESTRICTED RIGHTS. +All SOFTWARE PRODUCT provided to the U.S. Government pursuant to solicitations issued on or after December 1, 1995 is provided with the commercial license rights and restrictions described elsewhere herein. All SOFTWARE PRODUCT provided to the U.S. Government pursuant to solicitations issued prior to December 1, 1995 is provided with "Restricted Rights" as provided for in FAR, 48 CFR 52.227-14 (JUNE 1987) or DFAR, 48 CFR 252.227-7013 (OCT 1988), as applicable. The reseller is responsible for ensuring SOFTWARE PRODUCT is marked with the "Restricted Rights Notice" or "Restricted Rights Legend", as required. All rights not expressly granted are reserved. + +5. EXPORT RESTRICTIONS. + You acknowledge that the SOFTWARE PRODUCT is of U.S.-origin. You agree to comply with all applicable international and national laws that apply to these products, including the U.S. Export Administration Regulations, as well as end-user, end-use and country destination restrictions issued by U.S. and other governments. For additional information see http://www.microsoft.com/exporting/. +6. DISCLAIMER OF WARRANTIES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, MICROSOFT AND ITS SUPPLIERS PROVIDE TO YOU THE SOFTWARE PRODUCT AND SUPPORT SERVICES (IF ANY) AS IS AND WITH ALL FAULTS; AND HEREBY DISCLAIM ALL OTHER WARRANTIES AND CONDITIONS, EITHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY (IF ANY) WARRANTIES OR CONDITIONS OF MERCHANTABILITY, OF FITNESS FOR A PARTICULAR PURPOSE, OF LACK OF VIRUSES, OF ACCURACY OR COMPLETENESS OF RESPONSES, OF RESULTS, AND OF LACK OF NEGLIGENCE OR LACK OF WORKMANLIKE EFFORT, ALL WITH REGARD TO THE SOFTWARE PRODUCT, AND THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES. ALSO, THERE IS NO WARRANTY OR CONDITION OF TITLE, QUIET ENJOYMENT, QUIET POSSESSION, AND CORRESPONDENCE TO DESCRIPTION OR NON-INFRINGEMENT WITH REGARD TO THE SOFTWARE PRODUCT. + +7. EXCULSION OF INCIDENTAL, CONSEQUENTIAL AND CERTAIN OTHER DAMAGES. TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, IN NO EVENT SHALL MICROSOFT OR ITS SUPPLIERS BE LIABLE FOR ANY SPECIAL, INCIDENTAL, INDIRECT, OR CONSEQUENTIAL DAMAGES WHATSOEVER (INCLUDING, BUT NOT LIMITED TO, DAMAGES FOR LOSS OF BUSINESS PROFITS OR CONFIDENTIAL OR OTHER INFORMATION, FOR BUSINESS INTERRUPTION, FOR PERSONAL INJURY, FOR LOSS OF PRIVACY, FOR FAILURE TO MEET ANY DUTY (INCLUDING OF GOOD FAITH OR OF REASONABLE CARE), FOR NEGLIGENCE, AND FOR ANY OTHER PECUNIARY OR OTHER LOSS WHATSOEVER) ARISING OUT OF OR IN ANY WAY RELATED TO THE USE OF OR INABILITY TO USE THE SOFTWARE PRODUCT, THE PROVISION OF OR FAILURE TO PROVIDE SUPPORT SERVICES, OR OTHERWISE UNDER OR IN CONNECTION WITH ANY PROVISION OF THIS EULA, EVEN IN THE EVENT OF THE FAULT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY, BREACH OF CONTRACT OR BREACH OF WARRANTY OF MICROSOFT OR ANY SUPPLIER, AND EVEN IF MICROSOFT OR ANY SUPPLIER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +8. LIMITATION OF LIABILITY AND REMEDIES. NOTWITHSTANDING ANY DAMAGES THAT YOU MIGHT INCUR FOR ANY REASON WHATSOEVER (INCLUDING, WITHOUT LIMITATION, ALL DAMAGES REFERENCED ABOVE AND ALL DIRECT OR GENERAL DAMAGES), THE ENTIRE LIABILITY OF MICROSOFT AND ANY OF ITS SUPPLIERS UNDER ANY PROVISION OF THIS EULA AND YOUR EXCLUSIVE REMEDY FOR ALL OF THE FOREGOING SHALL BE LIMITED TO THE GREATER OF THE AMOUNT ACTUALLY PAID BY YOU FOR THE SOFTWARE PRODUCT OR U.S.$5.00. THE FOREGOING LIMITATIONS, EXCLUSIONS AND DISCLAIMERS DESCRIBED ABOVE SHALL APPLY TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, EVEN IF ANY REMEDY FAILS ITS ESSENTIAL PURPOSE. + +9. APPLICABLE LAW. If you acquired this SOFTWARE PRODCUT in the United States, this EULA is governed by the laws of the State of Washington. + +If you acquired this SOFTWARE PRODUCT in Canada, this EULA is governed by the laws of the Province of Ontario, Canada. Each of the parties hereto irrevocably attorns to the jurisdiction of the courts of the Province of Ontario and further agrees to commence any litigation which may arise hereunder in the courts located in the Judicial District of York, Province of Ontario. + +If this product was acquired outside the United States, then local law may apply. +10. QUESTIONS? Should you have any questions concerning this Agreement, or if you desire to contact Microsoft for any reason, please contact the Microsoft subsidiary serving your country, or write: Microsoft Sales Information Center/One Microsoft Way/Redmond, WA 98052-6399. + + diff --git a/windows_libs/mssdk/doc/DirectXEULAs/directx redist.txt b/windows_libs/mssdk/doc/DirectXEULAs/directx redist.txt new file mode 100644 index 00000000..489c14a9 --- /dev/null +++ b/windows_libs/mssdk/doc/DirectXEULAs/directx redist.txt @@ -0,0 +1,19 @@ +DirectX Software Development Kit Redistributable Code +------------------------------------------------------------- +Redistributable Code is identified as all of the files in the following +directory on the DirectX 8.0 SDK CD: + + redist/directx8/ + +All files in the above directory must be included in any distribution of +the DirectX 8.0 Redistributable Code with the exception of the Broadcast +Driver Architecture cab files: + + bda.cab + bdant.cab + +Both of which are considered optional DirectX 8.0 redistributable +components and can be removed from your distribution of the DirectX +8.0 redistributable components. + + diff --git a/windows_libs/mssdk/include/DShow.h b/windows_libs/mssdk/include/DShow.h new file mode 100644 index 00000000..d6f35f80 --- /dev/null +++ b/windows_libs/mssdk/include/DShow.h @@ -0,0 +1,77 @@ +/////////////////////////////////////////////////////////////////////////// +// Copyright (C) 2000 Microsoft Corporation. All Right Reserved. +// +// File: dshow.h +// Content: DirectShow top-level include file +/////////////////////////////////////////////////////////////////////////// + +#ifndef __DSHOW_INCLUDED__ +#define __DSHOW_INCLUDED__ + +/////////////////////////////////////////////////////////////////////////// +// Set up constants & pragmas for the compiler +/////////////////////////////////////////////////////////////////////////// +#ifdef _MSC_VER +// disable some level-4 warnings, use #pragma warning(enable:###) to re-enable +#pragma warning(disable:4100) // warning C4100: unreferenced formal parameter +#pragma warning(disable:4201) // warning C4201: nonstandard extension used : nameless struct/union +#pragma warning(disable:4511) // warning C4511: copy constructor could not be generated +#pragma warning(disable:4512) // warning C4512: assignment operator could not be generated +#pragma warning(disable:4514) // warning C4514: "unreferenced inline function has been removed" + +#if _MSC_VER>=1100 +#define AM_NOVTABLE __declspec(novtable) +#else +#define AM_NOVTABLE +#endif +#endif // MSC_VER + +/////////////////////////////////////////////////////////////////////////// +// Include standard Windows files +/////////////////////////////////////////////////////////////////////////// +#include +#include +#include +#include +#include + +#ifndef NUMELMS + #define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0])) +#endif + +/////////////////////////////////////////////////////////////////////////// +// Include DirectShow include files +/////////////////////////////////////////////////////////////////////////// +#include // Generated IDL header file for streams interfaces +#include // ActiveMovie video interfaces and definitions +#include // ActiveMovie audio interfaces and definitions +#include // generated from control.odl +#include // event code definitions +#include // declaration of type GUIDs and well-known clsids +#include // HRESULT status and error definitions +#include // External device control interface defines +#include // audio filter device error event codes +#include // DVD error event codes + +/////////////////////////////////////////////////////////////////////////// +// Define OLE Automation constants +/////////////////////////////////////////////////////////////////////////// +#ifndef OATRUE +#define OATRUE (-1) +#endif // OATRUE +#ifndef OAFALSE +#define OAFALSE (0) +#endif // OAFALSE + +/////////////////////////////////////////////////////////////////////////// +// Define Win64 interfaces if not already defined +/////////////////////////////////////////////////////////////////////////// + +// InterlockedExchangePointer +#ifndef InterlockedExchangePointer +#define InterlockedExchangePointer(Target, Value) \ + (PVOID)InterlockedExchange((PLONG)(Target), (LONG)(Value)) +#endif + + +#endif // __DSHOW_INCLUDED__ diff --git a/windows_libs/mssdk/include/DShowIDL/amstream.idl b/windows_libs/mssdk/include/DShowIDL/amstream.idl new file mode 100644 index 00000000..031d253d --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/amstream.idl @@ -0,0 +1,338 @@ +//------------------------------------------------------------------------------ +// File: AMStream.idl +// +// Desc: +// +// Copyright (c) 1998 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +import "unknwn.idl"; +import "mmstream.idl"; +import "strmif.idl"; + +cpp_quote("#include ") +cpp_quote("#include ") +cpp_quote("#include ") +cpp_quote("#include ") +cpp_quote("#include ") + + + +interface IAMMultiMediaStream; +interface IAMMediaStream; +interface IMediaStreamFilter; +interface IDirectDraw; +interface IDirectDrawSurface; +interface IAMMediaTypeStream; +interface IAMMediaTypeSample; + +// Flags definitions for IAMMultiMediaStream::Initialize +enum { + AMMSF_NOGRAPHTHREAD = 0x00000001 +}; + +// Flags definitions for AddMediaStream and IAMMediaStream::Initialize +enum { + // Don't add a stream - create a default renderer instead + // for the supplied purpose id + AMMSF_ADDDEFAULTRENDERER = 0x00000001, + AMMSF_CREATEPEER = 0x00000002, + + // If no samples are created when we run or the last sample + // is deleted then terminate this stream + AMMSF_STOPIFNOSAMPLES = 0x00000004, + + // If Update is not called keep going + AMMSF_NOSTALL = 0x00000008 +}; + + +// Flag definitions for OpenFile and OpenMoniker +enum { + AMMSF_RENDERTYPEMASK = 0x00000003, + AMMSF_RENDERTOEXISTING = 0x00000000, + AMMSF_RENDERALLSTREAMS = 0x00000001, + AMMSF_NORENDER = 0x00000002, + + AMMSF_NOCLOCK = 0x00000004, + AMMSF_RUN = 0x00000008 +}; + + +typedef [v1_enum] enum { + Disabled = 0, + ReadData = 1, + RenderData = 2 +} OUTPUT_STATE; + + +[ +object, +uuid(7DB01C96-C0C3-11d0-8FF1-00C04FD9189D), +dual, +helpstring("IDirectShowStream Interface"), +pointer_default(unique) +] +interface IDirectShowStream : IDispatch +{ + [propget, id(1), helpstring("property FileName")] HRESULT FileName([out, retval] BSTR *pVal); + [propput, id(1), helpstring("property FileName")] HRESULT FileName([in] BSTR newVal); + [propget, id(2), helpstring("property Video")] HRESULT Video([out, retval] OUTPUT_STATE *pVal); + [propput, id(2), helpstring("propetry Video")] HRESULT Video([in] OUTPUT_STATE newVal); + [propget, id(3), helpstring("property Audio")] HRESULT Audio([out, retval] OUTPUT_STATE *pVal); + [propput, id(3), helpstring("propetry Audio")] HRESULT Audio([in] OUTPUT_STATE newVal); +}; + + +// IAMMultiMediaStream interface +[ +object, +uuid(BEBE595C-9A6F-11d0-8FDE-00C04FD9189D), +pointer_default(unique) +] +interface IAMMultiMediaStream : IMultiMediaStream +{ + HRESULT Initialize( + [in] STREAM_TYPE StreamType, + [in] DWORD dwFlags, + [in] IGraphBuilder *pFilterGraph); + + HRESULT GetFilterGraph( + [out] IGraphBuilder **ppGraphBuilder); + + HRESULT GetFilter( + [out] IMediaStreamFilter **ppFilter); + + HRESULT AddMediaStream( + [in] IUnknown *pStreamObject, + [in] const MSPID *PurposeId, + [in] DWORD dwFlags, + [out] IMediaStream **ppNewStream); + + HRESULT OpenFile( + [in] LPCWSTR pszFileName, + [in] DWORD dwFlags); + + HRESULT OpenMoniker( + [in] IBindCtx *pCtx, + [in] IMoniker *pMoniker, + [in] DWORD dwFlags); + + HRESULT Render( + [in] DWORD dwFlags); +} + + +// IAMMediaStream interface +[ +object, +uuid(BEBE595D-9A6F-11d0-8FDE-00C04FD9189D), +pointer_default(unique) +] +interface IAMMediaStream : IMediaStream +{ + HRESULT Initialize( + [in] IUnknown *pSourceObject, + [in] DWORD dwFlags, + [in] REFMSPID PurposeId, + [in] const STREAM_TYPE StreamType); + + HRESULT SetState( + [in] FILTER_STATE State); + + HRESULT JoinAMMultiMediaStream( + [in] IAMMultiMediaStream *pAMMultiMediaStream); + + HRESULT JoinFilter( + [in] IMediaStreamFilter *pMediaStreamFilter); + + HRESULT JoinFilterGraph( + [in] IFilterGraph *pFilterGraph); +}; + + + + +// IMediaStreamFilter interface +[ +object, +local, +uuid(BEBE595E-9A6F-11d0-8FDE-00C04FD9189D), +pointer_default(unique) +] +interface IMediaStreamFilter : IBaseFilter +{ + HRESULT AddMediaStream( + [in] IAMMediaStream *pAMMediaStream); + + HRESULT GetMediaStream( + [in] REFMSPID idPurpose, + [out] IMediaStream **ppMediaStream); + + HRESULT EnumMediaStreams( + [in] long Index, + [out] IMediaStream **ppMediaStream); + + HRESULT SupportSeeking( + [in] BOOL bRenderer); + + HRESULT ReferenceTimeToStreamTime( + [in] [out] REFERENCE_TIME *pTime); + + HRESULT GetCurrentStreamTime( + [out] REFERENCE_TIME *pCurrentStreamTime); + + HRESULT WaitUntil( + [in] REFERENCE_TIME WaitStreamTime); + + HRESULT Flush( + [in] BOOL bCancelEOS); + + HRESULT EndOfStream(); +}; + + + +[ +object, +local, +uuid(AB6B4AFC-F6E4-11d0-900D-00C04FD9189D), +pointer_default(unique) +] +interface IDirectDrawMediaSampleAllocator : IUnknown +{ + HRESULT GetDirectDraw(IDirectDraw **ppDirectDraw); +}; + + +[ +object, +local, +uuid(AB6B4AFE-F6E4-11d0-900D-00C04FD9189D), +pointer_default(unique) +] +interface IDirectDrawMediaSample : IUnknown +{ + HRESULT GetSurfaceAndReleaseLock( + [out] IDirectDrawSurface **ppDirectDrawSurface, + [out] RECT * pRect); + HRESULT LockMediaSamplePointer(void); +}; + + + + + + + +[ +object, +local, +uuid(AB6B4AFA-F6E4-11d0-900D-00C04FD9189D), +pointer_default(unique) +] + +interface IAMMediaTypeStream : IMediaStream +{ + HRESULT GetFormat( + [out] AM_MEDIA_TYPE * pMediaType, + [in] DWORD dwFlags); + + HRESULT SetFormat( + [in] AM_MEDIA_TYPE * pMediaType, + [in] DWORD dwFlags); + + HRESULT CreateSample( + [in] long lSampleSize, + [in] BYTE * pbBuffer, + [in] DWORD dwFlags, + [in] IUnknown *pUnkOuter, + [out] IAMMediaTypeSample ** ppAMMediaTypeSample); + + HRESULT GetStreamAllocatorRequirements( + [out] ALLOCATOR_PROPERTIES *pProps); + + HRESULT SetStreamAllocatorRequirements( + [in] ALLOCATOR_PROPERTIES *pProps); +}; + + +[ +object, +local, +uuid(AB6B4AFB-F6E4-11d0-900D-00C04FD9189D), +pointer_default(unique) +] +interface IAMMediaTypeSample : IStreamSample +{ + // + // Unique methods for IAMMediaTypeSample + // + HRESULT SetPointer([in] BYTE *pBuffer, [in] long lSize); + + // + // Mirror of IMediaSample + // + HRESULT GetPointer([out] BYTE ** ppBuffer); + long GetSize(void); + HRESULT GetTime([out] REFERENCE_TIME * pTimeStart, [out] REFERENCE_TIME * pTimeEnd); + HRESULT SetTime([in] REFERENCE_TIME * pTimeStart, [in] REFERENCE_TIME * pTimeEnd); + HRESULT IsSyncPoint(void); + HRESULT SetSyncPoint(BOOL bIsSyncPoint); + HRESULT IsPreroll(void); + HRESULT SetPreroll(BOOL bIsPreroll); + long GetActualDataLength(void); + HRESULT SetActualDataLength(long); + HRESULT GetMediaType(AM_MEDIA_TYPE **ppMediaType); + HRESULT SetMediaType(AM_MEDIA_TYPE *pMediaType); + HRESULT IsDiscontinuity(void); + HRESULT SetDiscontinuity(BOOL bDiscontinuity); + HRESULT GetMediaTime([out] LONGLONG * pTimeStart, [out] LONGLONG * pTimeEnd); + HRESULT SetMediaTime([in] LONGLONG * pTimeStart, [in] LONGLONG * pTimeEnd); +}; + + +[ + uuid(4E6CDE29-C0C4-11d0-8FF1-00C04FD9189D), + version(1.0), + helpstring("DirectShowStream 1.0 Type Library") +] + +library DirectShowStreamLib +{ + importlib("stdole32.tlb"); + importlib("stdole2.tlb"); + + [ + uuid(49c47ce5-9ba4-11d0-8212-00c04fc32c45), + helpstring("DirectShow Multi Media Stream") + ] + coclass AMMultiMediaStream + { + [default] dispinterface IDirectShowStream; + }; +}; + + + +// +// The MIDL compiler wants to produce a CLSID for everything defined in +// our type library, but it also wants to generate huge, fat proxy code +// so we use DEFINE_GUID for all other classes. It has another interesting +// bug in that it defines CLSID_AMMultiMediaStream within a #ifdef __cplusplus +// block, so we need to define it outside of that scope. +// + +cpp_quote("#ifndef __cplusplus") +cpp_quote("EXTERN_C const CLSID CLSID_AMMultiMediaStream;") +cpp_quote("#endif") + +cpp_quote("DEFINE_GUID(CLSID_AMDirectDrawStream, /* 49c47ce4-9ba4-11d0-8212-00c04fc32c45 */") +cpp_quote("0x49c47ce4, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);") +cpp_quote("DEFINE_GUID(CLSID_AMAudioStream, /* 8496e040-af4c-11d0-8212-00c04fc32c45 */") +cpp_quote("0x8496e040, 0xaf4c, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);") +cpp_quote("DEFINE_GUID(CLSID_AMAudioData, /* f2468580-af8a-11d0-8212-00c04fc32c45 */") +cpp_quote("0xf2468580, 0xaf8a, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45);") +cpp_quote("DEFINE_GUID(CLSID_AMMediaTypeStream, /* CF0F2F7C-F7BF-11d0-900D-00C04FD9189D */") +cpp_quote("0xcf0f2f7c, 0xf7bf, 0x11d0, 0x90, 0xd, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);") diff --git a/windows_libs/mssdk/include/DShowIDL/amvpe.idl b/windows_libs/mssdk/include/DShowIDL/amvpe.idl new file mode 100644 index 00000000..a992eded --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/amvpe.idl @@ -0,0 +1,171 @@ +//------------------------------------------------------------------------------ +// File: AMVPE.idl +// +// Desc: +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +import "unknwn.idl"; +import "objidl.idl"; // for IPersist (IFilter's root) + + +/* + * VIDOESIGNALINFO + */ +typedef struct _VIDEOSIGNALINFO +{ + DWORD dwSize; // Size of the structure + DWORD dwVREFHeight; // Specifies the number of lines of data in the vref + BOOL bDoubleClock; // videoport should enable double clocking + BOOL bVACT; // videoport should use an external VACT signal + BOOL bInterlaced; // Indicates that the signal is interlaced + BOOL bHalfline; // Device will write half lines into the frame buffer + BOOL bInvertedPolarity; // Devoce inverts the polarity by default +} AMVIDEOSIGNALINFO; + +typedef struct AMVIDEOSIGNALINFO *LPAMVIDEOSIGNALINFO; + + +interface IVPEConfig; +interface IVPE; + + +/* + * DDVIDEOPORTCONNECT + */ +typedef struct _DDVIDEOPORTCONNECT +{ + DWORD dwSize; // size of the DDVIDEOPORTCONNECT structure + GUID guidTypeID; // Description of video port connection + DWORD dwPortWidth; // Width of the video port + DWORD dwFlags; // Connection flags +} DDVIDEOPORTCONNECT; + +typedef DDVIDEOPORTCONNECT *LPDDVIDEOPORTCONNECT; + + + +/* + * DDPIXELFORMAT + */ +typedef struct _DDPIXELFORMAT +{ + DWORD dwSize; // size of structure + DWORD dwFlags; // pixel format flags + DWORD dwFourCC; // (FOURCC code) + union + { + DWORD dwRGBBitCount; // how many bits per pixel (BD_1,2,4,8,16,24,32) + DWORD dwYUVBitCount; // how many bits per pixel (BD_4,8,16,24,32) + DWORD dwZBufferBitDepth; // how many bits for z buffers (BD_8,16,24,32) + DWORD dwAlphaBitDepth; // how many bits for alpha channels (BD_1,2,4,8) + }; + union + { + DWORD dwRBitMask; // mask for red bit + DWORD dwYBitMask; // mask for Y bits + }; + union + { + DWORD dwGBitMask; // mask for green bits + DWORD dwUBitMask; // mask for U bits + }; + union + { + DWORD dwBBitMask; // mask for blue bits + DWORD dwVBitMask; // mask for V bits + }; + union + { + DWORD dwRGBAlphaBitMask; // mask for alpha channel + DWORD dwYUVAlphaBitMask; // mask for alpha channel + DWORD dwRGBZBitMask; // mask for Z channel + DWORD dwYUVZBitMask; // mask for Z channel + }; +} DDPIXELFORMAT; + +typedef DDPIXELFORMAT * LPDDPIXELFORMAT; + + +[ +object, +uuid(BC29A660-30E3-11d0-9E69-00C04FD7C15B), +pointer_default(unique) +] + +interface IVPEConfig : IUnknown { + + // gets the various connection information structures (guid, portwidth) + // in an array of structures. If the pointer to the array is NULL, first + // parameter returns the total number of formats supported. + HRESULT GetConnectInfo( + [in,out] LPDWORD lpNumConnectInfo, + [out] LPDDVIDEOPORTCONNECT lpddvpConnectInfo + ); + + HRESULT SetConnectInfo( + [in] DDVIDEOPORTCONNECT ddvpConnectInfo + ); + + // gets the various formats supported by the decoder in an array + // of structures. If the pointer to the array is NULL, first parameter + // returns the total number of formats supported. + HRESULT GetVideoFormats( + [in,out] LPDWORD lpNumFormats, + [out] LPDDPIXELFORMAT lpddpfFormats + ); + + // retrives maximum pixels per second rate expected for a given + // format and a given scaling factor. If decoder does not support + // those scaling factors, then it gives the rate and the nearest + // scaling factors. + HRESULT GetMaxPixelRate( + [in] DDPIXELFORMAT ddpfFormat, + [in,out] LPDWORD lpdwZoomHeight, + [in,out] LPDWORD lpdwZoomWidth, + [out] LPDWORD lpdwMaxPixelsPerSecond + ); + + // retrives various properties of the decoder for a given format + HRESULT GetVideoSignalInfo( + [in] DDPIXELFORMAT ddpfFormat, + [out] LPAMVIDEOSIGNALINFO lpAMVideoSignalInfo + ); + + // asks the decoder to ouput in this format. Return value should give + // appropriate error code + HRESULT SetVideoFormat( + [in] DDPIXELFORMAT ddpfFormat + ); + + // asks the decoder to treat even fields like odd fields and visa versa + HRESULT SetInvertPolarity( + ); + + // sets the scaling factors. If decoder does not support these, + // then it sets the values to the nearest factors it can support + HRESULT SetScalingFactors( + [in,out] LPDWORD lpdwZoomHeight, + [in,out] LPDWORD lpdwZoomWidth + ); + + } + + + +[ +object, +uuid(BC29A661-30E3-11d0-9E69-00C04FD7C15B), +pointer_default(unique) +] + +interface IVPE : IUnknown { + HRESULT SetOverlaySurface( +// [in] LPDIRECTDRAWSURFACE lpOverlaySurface, + [in] LPUNKNOWN lpOverlaySurface, + [in] INT iNumBackBuffers + ); + +} diff --git a/windows_libs/mssdk/include/DShowIDL/austream.idl b/windows_libs/mssdk/include/DShowIDL/austream.idl new file mode 100644 index 00000000..3f0207c7 --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/austream.idl @@ -0,0 +1,106 @@ +//------------------------------------------------------------------------------ +// File: AuStream.idl +// +// Desc: +// +// Copyright (c) 1998 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +import "unknwn.idl"; +import "mmstream.idl"; + +cpp_quote("//") +cpp_quote("// The following declarations within the 'if 0' block are dummy typedefs used to make") +cpp_quote("// the ddstream.idl file build. The actual definitions are contained in DDRAW.H") +cpp_quote("//") +cpp_quote("#if 0") +typedef struct tWAVEFORMATEX WAVEFORMATEX; +cpp_quote ("#endif") + +interface IAudioMediaStream; +interface IAudioStreamSample; +interface IMemoryData; +interface IAudioData; + +// IAudioMediaStream + + +[ +object, +local, +uuid(f7537560-a3be-11d0-8212-00c04fc32c45), +pointer_default(unique) +] +interface IAudioMediaStream : IMediaStream +{ + + HRESULT GetFormat( + [out] WAVEFORMATEX *pWaveFormatCurrent + ); + + HRESULT SetFormat( + [in] const WAVEFORMATEX *lpWaveFormat); + + HRESULT CreateSample( + [in] IAudioData *pAudioData, + [in] DWORD dwFlags, + [out] IAudioStreamSample **ppSample + ); +} + +[ +object, +local, +uuid(345fee00-aba5-11d0-8212-00c04fc32c45), +pointer_default(unique) +] +interface IAudioStreamSample : IStreamSample +{ + HRESULT GetAudioData( + [out] IAudioData **ppAudio + ); +} + + +[ +object, +local, +uuid(327fc560-af60-11d0-8212-00c04fc32c45), +pointer_default(unique) +] +interface IMemoryData : IUnknown +{ + HRESULT SetBuffer( + [in] DWORD cbSize, + [in] BYTE *pbData, + [in] DWORD dwFlags + ); + + HRESULT GetInfo( + [out] DWORD *pdwLength, + [out] BYTE **ppbData, + [out] DWORD *pcbActualData + ); + HRESULT SetActual( + [in] DWORD cbDataValid + ); +} + +[ +object, +local, +uuid(54c719c0-af60-11d0-8212-00c04fc32c45), +pointer_default(unique) +] +interface IAudioData : IMemoryData +{ + HRESULT GetFormat( + [out] WAVEFORMATEX *pWaveFormatCurrent + ); + + HRESULT SetFormat( + [in] const WAVEFORMATEX *lpWaveFormat + ); +} + diff --git a/windows_libs/mssdk/include/DShowIDL/axcore.idl b/windows_libs/mssdk/include/DShowIDL/axcore.idl new file mode 100644 index 00000000..8c4e2fc9 --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/axcore.idl @@ -0,0 +1,1277 @@ +//------------------------------------------------------------------------------ +// File: AXCore.idl +// +// Desc: Core streaming interfaces. Other ActiveMovie-only interfaces +// are in AXExtend.idl. +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +// include unknwn.idl and objidl.idl first + + +#define CHARS_IN_GUID 39 // 128 bits, plus { - } punctuation and terminal null + // chars NOT BYTES in the standard representation + // e.g. {D3588AB0-0781-11ce-B03A-0020AF0BA770} + null +cpp_quote("#define CHARS_IN_GUID 39") + + +//===================================================================== +//===================================================================== +// media types & formats +//===================================================================== +//===================================================================== + +// there is a high-level media type (audio, compressed video, +// mpeg video, midi). Within each type, there is a subtype (cinepak, pcm) +// and a length+untyped data block defining the format in a +// type-specific manner. EG for video/cinepak, the data block would be +// a bitmapinfo. +// the contents of the format block is defined by the formattype GUID +// for example FORMAT_VideoInfo, FORMAT_WaveFormatEx. In the future this +// may be a pointer to an object supporting property style interfaces +// in which case the GUID may be something like FORMAT_IUnknown. When +// you are passed a media type you should check the format type, if +// it isn't a type you recognise then don't touch the format block + +typedef struct _AMMediaType { + GUID majortype; + GUID subtype; + BOOL bFixedSizeSamples; + BOOL bTemporalCompression; + ULONG lSampleSize; + GUID formattype; + IUnknown *pUnk; + ULONG cbFormat; + [size_is(cbFormat)] BYTE * pbFormat; +} AM_MEDIA_TYPE; + +//===================================================================== +//===================================================================== +// pin information +//===================================================================== +//===================================================================== + +// is this an input or output pin +typedef enum _PinDirection { + PINDIR_INPUT, + PINDIR_OUTPUT +} PIN_DIRECTION; + +// other types that need defining +#define MAX_PIN_NAME 128 +cpp_quote("#define MAX_PIN_NAME 128") +cpp_quote("#define MAX_FILTER_NAME 128") +#define MAX_FILTER_NAME 128 + + +//===================================================================== +//===================================================================== +// time information +// +// This represents a time (either reference or stream) in 100ns units +// The class library contains a CRefTime helper class +// that supports simple comparison and arithmetic operations +//===================================================================== +//===================================================================== + +typedef LONGLONG REFERENCE_TIME; +typedef double REFTIME; + +// Win32 HANDLEs have to be cast to these as the MIDL compiler doesn't +// like the HANDLE type or in fact anything remotely associated with +// them. If this ever gets ported to a MAC environment then these will +// have to become an alertable synchronisation object that it supports + +typedef DWORD_PTR HSEMAPHORE; +typedef DWORD_PTR HEVENT; + +//===================================================================== +//===================================================================== +// Allocator properties +// +// Used to describe the actual properties of an allocator, +// and used to request properties from an allocator or from an upstream +// filter that could create an allocator. See IMemAllocator and +// IMemInputPin. +//===================================================================== +//===================================================================== +typedef struct _AllocatorProperties { + long cBuffers; // count of buffers at this allocator + long cbBuffer; // size of each buffer, excluding any prefix + + // alignment of the buffer - buffer start will be aligned on a multiple of + // this amount + long cbAlign; + + // prefix amount. Each buffer is immediately preceeded by cbPrefix bytes. + // note that GetPointer points to the beginning of the buffer proper. + // the prefix is aligned, i.e. (GetPointer() - cbPrefix) is aligned on cbAlign. + long cbPrefix; +} ALLOCATOR_PROPERTIES; + + + + + +// forward declarations (in alphabetical order - we were getting duplicates) +interface IAMovieSetup; +interface IEnumFilters; +interface IEnumMediaTypes; +interface IEnumPins; +interface IBaseFilter; +interface IFilterGraph; +interface IMediaFilter; +interface IMediaSample; +interface IMemAllocator; +interface IMemAllocatorCallbackTemp; +interface IMemAllocatorNotifyCallbackTemp; +interface IMemInputPin; +interface IPin; +interface IReferenceClock; + + + +//===================================================================== +//===================================================================== +// Defines IPin interface +// +// interface representing a single, unidirection connection point on a +// filter. A Pin will connect to exactly one other pin on another filter. +// This interface represents the interface other objects can call on +// this pin. The interface between the filter and the pin is private to +// the implementation of a specific filter. +// +// During the connection process, one pin will be instructed to take +// the lead: the connect interface on this pin will be calling, passing +// the IPin* for the other pin. This connecting pin will call the +// ReceiveConnection member function on the other pin, as well as presumably +// other format-enumeration and queryinterface calls to establish whether +// the connection is possible. +//===================================================================== +//===================================================================== + +[ +object, +uuid(56a86891-0ad4-11ce-b03a-0020af0ba770), +pointer_default(unique) +] +interface IPin : IUnknown { + + // initiate a connection to another pin. calls ReceiveConnection on the + // other pin. Verifies that the connection is possible and may reject + // it. + // The mediatype parameter is optional. If it is not null, the pin must + // connect using that media type if possible. The subtype and/or format + // type can be GUID_NULL, meaning that the pin can fill them in as desired. + // This allows an application to partially specify the media type to be + // used for the connection, insisting on eg YUV 422 but leaving details + // (such as the image size) to be negotiated between the pins. + HRESULT Connect( + [in] IPin * pReceivePin, // connect yourself to this pin + [in] const AM_MEDIA_TYPE * pmt // (optional) connect using this type + ); + + // called by a connecting pin to make a connection + HRESULT ReceiveConnection( + [in] IPin * pConnector, + [in] const AM_MEDIA_TYPE *pmt // this is the media type we will exchange + ); + + // break a connection - no params since there is only one connection + // possible on this pin + HRESULT Disconnect(void); + + // Find the pin this pin is connected to (if any) + // The pointer returned is AddRef()d + // Fails if the pin is not connected + HRESULT ConnectedTo( + [out] IPin **pPin + ); + + // Return the media type of a connection if the pin is connected + HRESULT ConnectionMediaType( + [out] AM_MEDIA_TYPE *pmt + ); + + // get information about the pin itself + typedef struct _PinInfo { + IBaseFilter *pFilter; // the filter this pin is on + PIN_DIRECTION dir; // am I an input or output pin? + WCHAR achName[MAX_PIN_NAME]; // the name of this pin within this filter + } PIN_INFO; + + HRESULT QueryPinInfo( + [out] PIN_INFO * pInfo + ); + + // We often want to know the direction. Rather than use the + // relatively expensive QueryPinInfo, use this + HRESULT QueryDirection( + [out] PIN_DIRECTION *pPinDir + ); + + // Get an identifier for the pin (allows connections to be saved). + // The storage will be allocated by the filter using CoTaskMemAlloc + // The caller should free it using CoTaskMemFree + HRESULT QueryId( + [out] LPWSTR * Id + ); + + // will the pin accept the format type, S_OK yes, S_FALSE no + HRESULT QueryAccept( + [in] const AM_MEDIA_TYPE *pmt + ); + + // return an enumerator for this pin's preferred media types + HRESULT EnumMediaTypes( + [out] IEnumMediaTypes **ppEnum + ); + + // return an array of IPin* - the pins that this pin internally connects to + // All pins put in the array must be AddReffed (but no others) + // Errors: "Can't say" - FAIL; not enough slots - return S_FALSE + // Default: return E_NOTIMPL + // The filter graph will interpret E_NOTIMPL as any input pin connects to + // all visible output pins and vise versa. + // apPin can be NULL if nPin==0 (not otherwise). + HRESULT QueryInternalConnections( + [out] IPin* *apPin, // array of IPin* + [in, out] ULONG *nPin // on input, the number of slots + // on output the number of pins + ); + + // notify the pin that no more data is expected until a new run + // command is issued. End of stream should be queued and delivered after + // all queued data is delivered. Pass through if there is no queued data. + // Flush should flush any queued EOS. + // returns S_OK unless there is some error. + // input pins only: output pins will normally return E_UNEXPECTED. + HRESULT EndOfStream(void); + + // Flush + + // Enter flush state: do the following steps (in order) + // -- prevent any more Receives succeeding (set a flushing flag) + // -- discard any queued data + // -- free anyone blocked on Receive in your filter + // -- pass BeginFlush to any downstream pins + HRESULT BeginFlush(void); + + // End flush state: do the following steps in order + // -- ensure no more data will be pushed by your filter + // (sync with thread if you have one, stop it pushing and + // discard any queued data) + // -- re-enable Receive (clear internal flushing flag) + // -- pass EndFlush to any downstream pins + HRESULT EndFlush(void); + + // informational: all data arriving after this call is part of a segment + // from StartTime to StopTime, played at rate. This allows filters that + // process buffers containing more than one sample to clip the rendering + // to within the start and stop times. + // + // A source pin will call a destination pin on this method after completing + // delivery of any previous data, and before any Receive calls for the + // new data + HRESULT NewSegment( + [in] REFERENCE_TIME tStart, + [in] REFERENCE_TIME tStop, + [in] double dRate); +} + +typedef IPin *PPIN; + + +//===================================================================== +//===================================================================== +// Defines IEnumPins interface +// +// interface returned from IBaseFilter::EnumPins(). based on IEnumXXXX +//===================================================================== +//===================================================================== + +[ +object, +uuid(56a86892-0ad4-11ce-b03a-0020af0ba770), +pointer_default(unique) +] +interface IEnumPins : IUnknown { + + HRESULT Next( + [in] ULONG cPins, // place this many pins... + [out, size_is(cPins)] IPin ** ppPins, // ...in this array + [out] ULONG * pcFetched // actual count passed + ); + + HRESULT Skip( + [in] ULONG cPins); + + HRESULT Reset(void); + + HRESULT Clone( + [out] IEnumPins **ppEnum + ); +} + +typedef IEnumPins *PENUMPINS; + + +//===================================================================== +//===================================================================== +// Defines IEnumMediaTypes interface +// +// Enumerates the preferred formats for a pin +//===================================================================== +//===================================================================== + +[ +object, +uuid(89c31040-846b-11ce-97d3-00aa0055595a), +pointer_default(unique) +] +interface IEnumMediaTypes : IUnknown { + + // to call this member function pass in the address of a pointer to a + // media type. The interface will allocate the necessary AM_MEDIA_TYPE + // structures and initialise them with the variable format block + + HRESULT Next( + [in] ULONG cMediaTypes, // place this many types... + [out, size_is(cMediaTypes)] + AM_MEDIA_TYPE ** ppMediaTypes, // ...in this array + [out] ULONG * pcFetched // actual count passed + ); + + HRESULT Skip( + [in] ULONG cMediaTypes); + + HRESULT Reset(void); + + HRESULT Clone( + [out] IEnumMediaTypes **ppEnum + ); +} + +typedef IEnumMediaTypes *PENUMMEDIATYPES; + + + +//======================================================================== +//======================================================================== +// Defines IFilterGraph interface +// +// abstraction representing a graph of filters +// This allows filters to be joined into a graph and operated as a unit. +//======================================================================== +//======================================================================== + +[ +object, +uuid(56a8689f-0ad4-11ce-b03a-0020af0ba770), +pointer_default(unique) +] +interface IFilterGraph : IUnknown { + + //========================================================================== + // Low level filter functions + //========================================================================== + + // Add a filter to the graph and name it with *pName. + // If the name is not unique, The request will fail. + // The Filter graph will call the JoinFilterGraph + // member function of the filter to inform it. + // This must be called before attempting Connect, ConnectDirect or Render + // for pins of the filter. + + HRESULT AddFilter + ( [in] IBaseFilter * pFilter, + [in, string] LPCWSTR pName + ); + + + // Remove a filter from the graph. The filter graph implementation + // will inform the filter that it is being removed. + + HRESULT RemoveFilter + ( [in] IBaseFilter * pFilter + ); + + + // Set *ppEnum to be an enumerator for all filters in the graph. + + HRESULT EnumFilters + ( [out] IEnumFilters **ppEnum + ); + + + // Set *ppFilter to be the filter which was added with the name *pName + // Will fail and set *ppFilter to NULL if the name is not in this graph. + + HRESULT FindFilterByName + ( [in, string] LPCWSTR pName, + [out] IBaseFilter ** ppFilter + ); + + //========================================================================== + // Low level connection functions + //========================================================================== + + // Connect these two pins directly (i.e. without intervening filters) + // the media type is optional, and may be partially specified (that is + // the subtype and/or format type may be GUID_NULL). See IPin::Connect + // for details of the media type parameter. + HRESULT ConnectDirect + ( [in] IPin * ppinOut, // the output pin + [in] IPin * ppinIn, // the input pin + [in, unique] const AM_MEDIA_TYPE* pmt // optional mediatype + ); + + // Break the connection that this pin has and reconnect it to the + // same other pin. + + HRESULT Reconnect + ( [in] IPin * ppin // the pin to disconnect and reconnect + ); + + + + // Disconnect this pin, if connected. Successful no-op if not connected. + + HRESULT Disconnect + ( [in] IPin * ppin + ); + + //========================================================================== + // intelligent connectivity - now in IGraphBuilder, axextend.idl + //========================================================================== + + //========================================================================== + // Whole graph functions + //========================================================================== + + // Once a graph is built, it can behave as a (composite) filter. + // To control this filter, QueryInterface for IMediaFilter. + + // The filtergraph will by default ensure that the graph has a sync source + // when it is made to Run. SetSyncSource(NULL) will prevent that and allow + // all the filters to run unsynchronised until further notice. + // SetDefaultSyncSource will set the default sync source (the same as would + // have been set by default on the first call to Run). + HRESULT SetDefaultSyncSource(void); + +} + +typedef IFilterGraph *PFILTERGRAPH; + + + +//========================================================================== +//========================================================================== +// Defines IEnumFilters interface +// +// enumerator interface returned from IFilterGraph::EnumFilters(). +// based on IEnum pseudo-template +//========================================================================== +//========================================================================== + +[ +object, +uuid(56a86893-0ad4-11ce-b03a-0020af0ba770), +pointer_default(unique) +] +interface IEnumFilters : IUnknown { + + HRESULT Next + ( [in] ULONG cFilters, // place this many filters... + [out] IBaseFilter ** ppFilter, // ...in this array of IBaseFilter* + [out] ULONG * pcFetched // actual count passed returned here + ); + + + HRESULT Skip + ( [in] ULONG cFilters + ); + + + HRESULT Reset(void); + + + HRESULT Clone + ( [out] IEnumFilters **ppEnum + ); +} + +typedef IEnumFilters *PENUMFILTERS; + + +//===================================================================== +//===================================================================== +// Defines IMediaFilter interface +// +// multimedia components that provide time-based data will expose this. +// this interface abstracts an object that processes time-based data streams +// and represents a multimedia device (possibly implemented in software). +// it controls the active/running state of the object and its synchronization +// to other objects in the system. +// +// derived from IPersist so that all filter-type objects in a graph +// can have their class id serialised. +//===================================================================== +//===================================================================== + +[ +object, +uuid(56a86899-0ad4-11ce-b03a-0020af0ba770), +pointer_default(unique) +] +interface IMediaFilter : IPersist { + + // tell the filter to transition to the new state. The state transition + // may not be instantaneous (external mechanical activity may be involved, + // for example). The state functions may return before the state + // transition has completed + + // these functions will return S_OK if the transition is complete, S_FALSE if + // the transition is not complete but no error has occurred, or some error value + // if the transition failed. + HRESULT Stop(void); + HRESULT Pause(void); + + // in order to synchronise independent streams, you must pass a time + // value with the Run command. This is the difference between stream + // time and reference time. That is, it is the amount to be added to + // the IMediaSample timestamp to get the time at which that sample + // should be rendered according to the reference clock. + // If we are starting at the beginning of the stream, it will thus be + // simply the time at which the first sample should appear. If we are + // restarting from Paused mode in midstream, then it will be the total + // time we have been paused added to the initial start time. + + // the filtergraph will provide this information to its filters. If you + // are an app calling the filtergraph, it's ok to pass a start time of + // 0, in which case the filter graph will calculate a soon-as-possible + // time. FilterGraphs will accept 0 meaning ASAP; most filters will not. + + HRESULT Run(REFERENCE_TIME tStart); + + + // possible states that the filter could be in + typedef enum _FilterState { + State_Stopped, // not in use + State_Paused, // holding resources, ready to go + State_Running // actively processing media stream + } FILTER_STATE; + + // find out what state the filter is in. + // If timeout is 0, will return immediately - if a state transition is + // not complete, it will return the state being transitioned into, and + // the return code will be VFW_S_STATE_INTERMEDIATE. if no state + // transition is in progress the state will be returned and the return + // code will be S_OK. + // + // If timeout is non-zero, GetState will not return until the state + // transition is complete, or the timeout expires. + // The timeout is in milliseconds. + // You can also pass in INFINITE as a special value for the timeout, in + // which case it will block indefinitely waiting for the state transition + // to complete. If the timeout expires, the state returned is the + // state we are trying to reach, and the return code will be + // VFW_S_STATE_INTERMEDIATE. If no state transition is in progress + // the routine returns immediately with return code S_OK. + + // + // return State is State_Running, State_Paused or State_Stopped. + // return code is S_OK, or VFW_S_STATE_INTERMEDIATE if state + // transition is not complete or an error value if the method failed. + HRESULT GetState( + [in] DWORD dwMilliSecsTimeout, + [out] FILTER_STATE *State); + + + // tell the filter the reference clock to which it should synchronize + // activity. This is most important to rendering filters and may not + // be of any interest to other filters. + HRESULT SetSyncSource( + [in] IReferenceClock * pClock); + + // get the reference clock currently in use (it may be NULL) + HRESULT GetSyncSource( + [out] IReferenceClock ** pClock); +} + +typedef IMediaFilter *PMEDIAFILTER; + + +//===================================================================== +//===================================================================== +// Defines IBaseFilter interface +// +// all multimedia components will expose this interface +// this interface abstracts an object that has typed input and output +// connections and can be dynamically aggregated. +// +// IMediaFilter supports synchronisation and activity state: IBaseFilter +// is derived from that since all filters need to support IMediaFilter, +// whereas a few objects (plug-in control distributors for example) will +// support IMediaFilter but not IBaseFilter. +// +// IMediaFilter is itself derived from IPersist so that every filter +//supports GetClassID() +//===================================================================== +//===================================================================== + +[ +object, +uuid(56a86895-0ad4-11ce-b03a-0020af0ba770), +pointer_default(unique) +] +interface IBaseFilter : IMediaFilter { + + // enumerate all the pins available on this filter + // allows enumeration of all pins only. + // + HRESULT EnumPins( + [out] IEnumPins ** ppEnum // enum interface returned here + ); + + // Convert the external identifier of a pin to an IPin * + // This pin id is quite different from the pin Name in CreatePin. + // In CreatePin the Name is invented by the caller. In FindPin the Id + // must have come from a previous call to IPin::QueryId. Whether or not + // this operation would cause a pin to be created depends on the filter + // design, but if called twice with the same id it should certainly + // return the same pin both times. + HRESULT FindPin( + [in, string] LPCWSTR Id, + [out] IPin ** ppPin + ); + + // find out information about this filter + typedef struct _FilterInfo { + WCHAR achName[MAX_FILTER_NAME]; // maybe null if not part of graph + IFilterGraph * pGraph; // null if not part of graph + } FILTER_INFO; + + HRESULT QueryFilterInfo( + [out] FILTER_INFO * pInfo + ); + + // notify a filter that it has joined a filter graph. It is permitted to + // refuse. The filter should addref and store this interface for later use + // since it may need to notify events to this interface. A null pointer indicates + // that the filter is no longer part of a graph. + HRESULT JoinFilterGraph( + [in] IFilterGraph * pGraph, + [in, string] LPCWSTR pName + ); + + // return a Vendor information string. Optional - may return E_NOTIMPL. + // memory returned should be freed using CoTaskMemFree + HRESULT QueryVendorInfo( + [out, string] LPWSTR* pVendorInfo + ); +} + +typedef IBaseFilter *PFILTER; + + +//===================================================================== +//===================================================================== +// sync and state management +//===================================================================== +//===================================================================== + + +//===================================================================== +//===================================================================== +// Defines IReferenceClock interface +//===================================================================== +//===================================================================== + +[ + object, + uuid(56a86897-0ad4-11ce-b03a-0020af0ba770), + pointer_default(unique) +] +interface IReferenceClock : IUnknown { + + // get the time now + HRESULT GetTime( + [out] REFERENCE_TIME *pTime + ); + + // ask for an async notification that a time has elapsed + HRESULT AdviseTime( + [in] REFERENCE_TIME baseTime, // base reference time + [in] REFERENCE_TIME streamTime, // stream offset time + [in] HEVENT hEvent, // advise via this event + [out] DWORD_PTR * pdwAdviseCookie // where your cookie goes + ); + + // ask for an async periodic notification that a time has elapsed + HRESULT AdvisePeriodic( + [in] REFERENCE_TIME startTime, // starting at this time + [in] REFERENCE_TIME periodTime, // time between notifications + [in] HSEMAPHORE hSemaphore, // advise via a semaphore + [out] DWORD_PTR * pdwAdviseCookie // where your cookie goes + ); + + // cancel a request for notification + HRESULT Unadvise( + [in] DWORD_PTR dwAdviseCookie); +} + +typedef IReferenceClock *PREFERENCECLOCK; + +//===================================================================== +//===================================================================== +// Defines IReferenceClock2 interface +//===================================================================== +//===================================================================== + +[ + object, + uuid(36b73885-c2c8-11cf-8b46-00805f6cef60), + pointer_default(unique) +] +interface IReferenceClock2 : IReferenceClock { +} + +typedef IReferenceClock2 *PREFERENCECLOCK2; + + +//===================================================================== +//===================================================================== +// Data transport interfaces +//===================================================================== +//===================================================================== + + +//===================================================================== +//===================================================================== +// Defines IMediaSample interface +//===================================================================== +//===================================================================== + +[ + local, + object, + uuid(56a8689a-0ad4-11ce-b03a-0020af0ba770), + pointer_default(unique) +] +interface IMediaSample : IUnknown { + + // get me a read/write pointer to this buffer's memory. I will actually + // want to use sizeUsed bytes. + HRESULT GetPointer([out] BYTE ** ppBuffer); + + // return the size in bytes of the buffer data area + long GetSize(void); + + // get the stream time at which this sample should start and finish. + HRESULT GetTime( + [out] REFERENCE_TIME * pTimeStart, // put time here + [out] REFERENCE_TIME * pTimeEnd + ); + + // Set the stream time at which this sample should start and finish. + // pTimeStart==pTimeEnd==NULL will invalidate the time stamps in + // this sample + HRESULT SetTime( + [in] REFERENCE_TIME * pTimeStart, // put time here + [in] REFERENCE_TIME * pTimeEnd + ); + + // sync-point property. If true, then the beginning of this + // sample is a sync-point. (note that if AM_MEDIA_TYPE.bTemporalCompression + // is false then all samples are sync points). A filter can start + // a stream at any sync point. S_FALSE if not sync-point, S_OK if true. + + HRESULT IsSyncPoint(void); + HRESULT SetSyncPoint(BOOL bIsSyncPoint); + + // preroll property. If true, this sample is for preroll only and + // shouldn't be displayed. + HRESULT IsPreroll(void); + HRESULT SetPreroll(BOOL bIsPreroll); + + long GetActualDataLength(void); + HRESULT SetActualDataLength(long); + + // these allow for limited format changes in band - if no format change + // has been made when you receive a sample GetMediaType will return S_FALSE + + HRESULT GetMediaType(AM_MEDIA_TYPE **ppMediaType); + HRESULT SetMediaType(AM_MEDIA_TYPE *pMediaType); + + // returns S_OK if there is a discontinuity in the data (this frame is + // not a continuation of the previous stream of data + // - there has been a seek or some dropped samples). + HRESULT IsDiscontinuity(void); + // set the discontinuity property - TRUE if this sample is not a + // continuation, but a new sample after a seek or a dropped sample. + HRESULT SetDiscontinuity(BOOL bDiscontinuity); + + // get the media times for this sample + HRESULT GetMediaTime( + [out] LONGLONG * pTimeStart, + [out] LONGLONG * pTimeEnd + ); + + // Set the media times for this sample + // pTimeStart==pTimeEnd==NULL will invalidate the media time stamps in + // this sample + HRESULT SetMediaTime( + [in] LONGLONG * pTimeStart, + [in] LONGLONG * pTimeEnd + ); +} + +typedef IMediaSample *PMEDIASAMPLE; + +// Values for dwFlags for AM_SAMPLE_PROPERTIES +enum tagAM_SAMPLE_PROPERTY_FLAGS + { AM_SAMPLE_SPLICEPOINT = 0x01, /* Is this a splice point + IE can it be decoded + without reference to + previous data */ + AM_SAMPLE_PREROLL = 0x02, /* Is this a preroll sample */ + AM_SAMPLE_DATADISCONTINUITY = 0x04, /* Set if start of new segment */ + AM_SAMPLE_TYPECHANGED = 0x08, /* Has the type changed */ + AM_SAMPLE_TIMEVALID = 0x10, /* Set if time is valid */ + AM_SAMPLE_TIMEDISCONTINUITY = 0x40, /* time gap in data starts after + this sample - pbBuffer can + be NULL + */ + AM_SAMPLE_FLUSH_ON_PAUSE = 0x80, /* For live data - discard + in paused state + */ + AM_SAMPLE_STOPVALID = 0x100, /* Stop time is valid */ + AM_SAMPLE_ENDOFSTREAM = 0x200, /* End of stream after + this data + This is reserved for + kernel streaming and is + not currently used by + ActiveMovie + */ + AM_STREAM_MEDIA = 0, /* Normal data stream id */ + AM_STREAM_CONTROL = 1 /* Control stream id */ + /* > 7FFFFFFF is application + defined stream + */ + }; + +// Media sample generic properties structure +typedef struct tagAM_SAMPLE2_PROPERTIES { + DWORD cbData; // Length of generic data for extensiblity + // Number of bytes INCLUDING this field + DWORD dwTypeSpecificFlags; // Type specific flag data + DWORD dwSampleFlags; // Flags bits defined by AM_SAMPLE_xxx flags + // All undefined bits RESERVED (set to 0, + // leave on copy) + LONG lActual; // Length of data in buffer + REFERENCE_TIME tStart; // Start time if valid + REFERENCE_TIME tStop; // Stop time if valid + DWORD dwStreamId; // Stream 0 is normal media transport + // Stream 1 is control + AM_MEDIA_TYPE *pMediaType; // Copy of media type - INVALID after Release() + BYTE *pbBuffer; // Pointer to buffer - INVALID after Release() + LONG cbBuffer; // Length of buffer +} AM_SAMPLE2_PROPERTIES; + +//===================================================================== +//===================================================================== +// Defines IMediaSample2 interface +//===================================================================== +//===================================================================== + +[ + local, + object, + uuid(36b73884-c2c8-11cf-8b46-00805f6cef60), + pointer_default(unique) +] +interface IMediaSample2 : IMediaSample { + + // Get sample properties + // + // cbProperties - length of generic data to retrieve + // pbProperties - pointer to generic data buffer - can + // be NULL if cbProperties is NULL + // data conforms to AM_SAMPLE_PROPERTIES + // + HRESULT GetProperties( + [in] DWORD cbProperties, + [out, size_is(cbProperties)] BYTE * pbProperties + ); + // Set sample properties + // + // cbProperties - length of generic data to set + // pbProperties - pointer to generic data buffer - can + // be NULL if cbProperties is NULL + // data conforms to AM_SAMPLE_PROPERTIES + // + // + HRESULT SetProperties( + [in] DWORD cbProperties, + [in, size_is(cbProperties)] const BYTE * pbProperties + ); + + + // // Get the clock associated with the sample + // HRESULT GetClock( + // [out] IReferenceClock2 **ppClock + // ); + + // // Get a pointer to the object containing the data + // // + // // riid - IID of interface required on object + // // ppvobject - Pointer to object containing the data + // // + // // Returns + // // S_OK - Got the object + // // E_NOINTERFACE - object does not support this interface + // // if IUnknown is not supported + // // there is no backing object + // // E_NOTIMPL - samples don't have backing objects + // // + // // + // HRESULT GetBackingObject( + // [in] REFIID riid, + // [out] void **ppvObject + // ); +} + +typedef IMediaSample2 *PMEDIASAMPLE2; + + +// flags for dwFlags in IMemAllocator::GetBuffer +// AM_GBF_PREVFRAMESKIPPED is only significant when asking for a buffer from the +// video renderer. It should be TRUE if and only if the previous frame +// was skipped. It affects quality management. +// AM_GBF_NOTASYNCPOINT indicates to the downstream filter (most likely the +// video renderer) that you are not going to fill this buffer with a sync point +// (keyframe) so now would be a bad time to return a buffer with a dynamic +// format change, because you will be unable to switch to the new format without +// waiting for the next sync point, causing some frames to be dropped. +#define AM_GBF_PREVFRAMESKIPPED 1 +#define AM_GBF_NOTASYNCPOINT 2 +cpp_quote("#define AM_GBF_PREVFRAMESKIPPED 1") +cpp_quote("#define AM_GBF_NOTASYNCPOINT 2") + +// This may not be supported by allocators +cpp_quote("#define AM_GBF_NOWAIT 4") + +//===================================================================== +//===================================================================== +// Defines IMemAllocator interface +// +// an allocator of IMediaSample blocks to be used for data transfer between +// pins. Can be provided by input, output or a third party. Release +// the IMediaSample object obtained back to the pool by calling +// IMediaSample::Release. +//===================================================================== +//===================================================================== + +[ + object, + uuid(56a8689c-0ad4-11ce-b03a-0020af0ba770), + pointer_default(unique) +] +interface IMemAllocator : IUnknown { + + // negotiate buffer sizes, buffer count and alignment. pRequest is filled + // in by the caller with the requested values. pActual will be returned + // by the allocator with the closest that the allocator can come to this. + // Cannot be called unless the allocator is decommitted. + // Calls to GetBuffer need not succeed until Commit is called. + HRESULT SetProperties( + [in] ALLOCATOR_PROPERTIES* pRequest, + [out] ALLOCATOR_PROPERTIES* pActual); + + // return the properties actually being used on this allocator + HRESULT GetProperties( + [out] ALLOCATOR_PROPERTIES* pProps); + + + // commit the memory for the agreed buffers + HRESULT Commit(void); + + // release the memory for the agreed buffers. Any threads waiting in + // GetBuffer will return with an error. GetBuffer calls will always fail + // if called before Commit or after Decommit. + HRESULT Decommit(void); + + // get container for a sample. Blocking, synchronous call to get the + // next free buffer (as represented by an IMediaSample interface). + // on return, the time etc properties will be invalid, but the buffer + // pointer and size will be correct. + // Will only succeed if memory is committed. If GetBuffer is blocked + // waiting for a buffer and Decommit is called on another thread, + // GetBuffer will return with an error. + HRESULT GetBuffer( + [out] IMediaSample **ppBuffer, + [in] REFERENCE_TIME * pStartTime, + [in] REFERENCE_TIME * pEndTime, + [in] DWORD dwFlags + ); + + // put a buffer back on the allocators free list. + // this is typically called by the Release() method of the media + // sample when the reference count goes to 0 + // + HRESULT ReleaseBuffer( + [in] IMediaSample *pBuffer + ); +} + +typedef IMemAllocator *PMEMALLOCATOR; + +//===================================================================== +//===================================================================== +// Defines IMemAllocatorCallbackTemp interface +// +// If the allocator supports IMemAllocator2 then callbacks are +// available +// +//===================================================================== +//===================================================================== +[ + object, + uuid(379a0cf0-c1de-11d2-abf5-00a0c905f375), + pointer_default(unique) +] +interface IMemAllocatorCallbackTemp : IMemAllocator { + + // Set notification interface. pNotify can be NULL + HRESULT SetNotify( + [in] IMemAllocatorNotifyCallbackTemp *pNotify); + + // Get current stats + HRESULT GetFreeCount( + [out] LONG *plBuffersFree); +} + +//===================================================================== +//===================================================================== +// Defines IMemAllocatorNotify interface +// +//===================================================================== +//===================================================================== +[ + object, + uuid(92980b30-c1de-11d2-abf5-00a0c905f375), + pointer_default(unique) +] +interface IMemAllocatorNotifyCallbackTemp : IUnknown { + + // Called whenever ReleaseBuffer is called in the allocator + // Note the caller may have acquired locks and this call may + // occur in any context so generally the implementor of this + // call will just set an event or post a message for another + // thread to take action. + HRESULT NotifyRelease(); +} + +//===================================================================== +//===================================================================== +// Defines IMemInputPin interface +// +// basic shared memory transport interface. +//===================================================================== +//===================================================================== + +[ + object, + uuid(56a8689d-0ad4-11ce-b03a-0020af0ba770), + pointer_default(unique) +] +interface IMemInputPin : IUnknown { + + // return the allocator interface that this input pin + // would like the output pin to use + HRESULT GetAllocator( + [out] IMemAllocator ** ppAllocator); + + // tell the input pin which allocator the output pin is actually + // going to use. + // If the readonly flag is set, then all samples from this allocator are + // to be treated as read-only, and should be copied before being modified. + HRESULT NotifyAllocator( + [in] IMemAllocator * pAllocator, + [in] BOOL bReadOnly + ); + + // this method is optional (can return E_NOTIMPL). Output pins are not obliged to call + // this method, nor are they obliged to fulfil the request. Input pins making such a + // request should check the allocator in NotifyAllocator to see if it meets their needs. If + // not, the input pin is responsible for any necessary data copy. + // Zero values will be treated as don't care: so a pin can return an alignment value + // and leave the other values 0. + HRESULT GetAllocatorRequirements( [out] ALLOCATOR_PROPERTIES*pProps); + + // here's the next block of data from the stream. AddRef it if + // you need to hold it beyond the end of the Receive call. + // call pSample->Release when done with it. + // + // This is a blocking synchronous call. Usually no blocking + // will occur but if a filter cannot process the sample immediately + // it may use the caller's thread to wait until it can. + HRESULT Receive( + [in] IMediaSample * pSample); + // Same as Receive but with multiple samples. Useful for + // fragmented streams + HRESULT ReceiveMultiple( + [in, size_is(nSamples)] IMediaSample **pSamples, + [in] long nSamples, + [out] long *nSamplesProcessed); + + // See if Receive might block + // Returns S_OK if it can block, S_FALSE if it can't or some + // failure code (assume it can in this case) + HRESULT ReceiveCanBlock(); +} + +typedef IMemInputPin *PMEMINPUTPIN; + + +//===================================================================== +//===================================================================== +// Defines IAMovieSetup interface +// +// exported by filter to allow it to be self-registering +//===================================================================== +//===================================================================== + +[ +object, +uuid(a3d8cec0-7e5a-11cf-bbc5-00805f6cef20), +pointer_default(unique) +] +interface IAMovieSetup : IUnknown { + + // methods to register and unregister + // filter, etc. + + HRESULT Register( ); + HRESULT Unregister( ); +} + +typedef IAMovieSetup *PAMOVIESETUP; + + +//===================================================================== +//===================================================================== +// Defines IMediaSeeking interface +// +// Controls seeking (time, bytes, frames, fields and samples) +//===================================================================== +//===================================================================== + +typedef enum AM_SEEKING_SeekingFlags +{ + AM_SEEKING_NoPositioning = 0x00, // No change + AM_SEEKING_AbsolutePositioning = 0x01, // Position is supplied and is absolute + AM_SEEKING_RelativePositioning = 0x02, // Position is supplied and is relative + AM_SEEKING_IncrementalPositioning = 0x03, // (Stop) position relative to current + // Useful for seeking when paused (use +1) + AM_SEEKING_PositioningBitsMask = 0x03, // Useful mask + AM_SEEKING_SeekToKeyFrame = 0x04, // Just seek to key frame (performance gain) + AM_SEEKING_ReturnTime = 0x08, // Plug the media time equivalents back into the supplied LONGLONGs + + AM_SEEKING_Segment = 0x10, // At end just do EC_ENDOFSEGMENT, + // don't do EndOfStream + AM_SEEKING_NoFlush = 0x20 // Don't flush +} AM_SEEKING_SEEKING_FLAGS; + +typedef enum AM_SEEKING_SeekingCapabilities +{ + AM_SEEKING_CanSeekAbsolute = 0x001, + AM_SEEKING_CanSeekForwards = 0x002, + AM_SEEKING_CanSeekBackwards = 0x004, + AM_SEEKING_CanGetCurrentPos = 0x008, + AM_SEEKING_CanGetStopPos = 0x010, + AM_SEEKING_CanGetDuration = 0x020, + AM_SEEKING_CanPlayBackwards = 0x040, + AM_SEEKING_CanDoSegments = 0x080, + AM_SEEKING_Source = 0x100 // Doesn't pass thru used to + // count segment ends +} AM_SEEKING_SEEKING_CAPABILITIES; + +[ + object, + uuid(36b73880-c2c8-11cf-8b46-00805f6cef60), + pointer_default(unique) +] +interface IMediaSeeking : IUnknown { + + // Returns the capability flags + HRESULT GetCapabilities( [out] DWORD * pCapabilities ); + + // And's the capabilities flag with the capabilities requested. + // Returns S_OK if all are present, S_FALSE if some are present, E_FAIL if none. + // *pCababilities is always updated with the result of the 'and'ing and can be + // checked in the case of an S_FALSE return code. + HRESULT CheckCapabilities( [in,out] DWORD * pCapabilities ); + + // returns S_OK if mode is supported, S_FALSE otherwise + HRESULT IsFormatSupported([in] const GUID * pFormat); + HRESULT QueryPreferredFormat([out] GUID * pFormat); + + HRESULT GetTimeFormat([out] GUID *pFormat); + // Returns S_OK if *pFormat is the current time format, otherwise S_FALSE + // This may be used instead of the above and will save the copying of the GUID + HRESULT IsUsingTimeFormat([in] const GUID * pFormat); + + // (may return VFE_E_WRONG_STATE if graph is stopped) + HRESULT SetTimeFormat([in] const GUID * pFormat); + + // return current properties + HRESULT GetDuration([out] LONGLONG *pDuration); + HRESULT GetStopPosition([out] LONGLONG *pStop); + HRESULT GetCurrentPosition([out] LONGLONG *pCurrent); + + // Convert time from one format to another. + // We must be able to convert between all of the formats that we say we support. + // (However, we can use intermediate formats (e.g. MEDIA_TIME).) + // If a pointer to a format is null, it implies the currently selected format. + HRESULT ConvertTimeFormat([out] LONGLONG * pTarget, [in] const GUID * pTargetFormat, + [in] LONGLONG Source, [in] const GUID * pSourceFormat ); + + + // Set current and end positions in one operation + // Either pointer may be null, implying no change + HRESULT SetPositions( [in,out] LONGLONG * pCurrent, [in] DWORD dwCurrentFlags + , [in,out] LONGLONG * pStop, [in] DWORD dwStopFlags ); + + // Get CurrentPosition & StopTime + // Either pointer may be null, implying not interested + HRESULT GetPositions( [out] LONGLONG * pCurrent, + [out] LONGLONG * pStop ); + + // Get earliest / latest times to which we can currently seek "efficiently". + // This method is intended to help with graphs where the source filter has + // a very high latency. Seeking within the returned limits should just + // result in a re-pushing of already cached data. Seeking beyond these + // limits may result in extended delays while the data is fetched (e.g. + // across a slow network). + // (NULL pointer is OK, means caller isn't interested.) + HRESULT GetAvailable( [out] LONGLONG * pEarliest, [out] LONGLONG * pLatest ); + + // Rate stuff + HRESULT SetRate([in] double dRate); + HRESULT GetRate([out] double * pdRate); + + // Preroll + HRESULT GetPreroll([out] LONGLONG * pllPreroll); +} + +typedef IMediaSeeking *PMEDIASEEKING; + +// Flags for IMediaEventEx +cpp_quote("enum tagAM_MEDIAEVENT_FLAGS") +cpp_quote("{") +cpp_quote(" AM_MEDIAEVENT_NONOTIFY = 0x01") +cpp_quote("};") diff --git a/windows_libs/mssdk/include/DShowIDL/axextend.idl b/windows_libs/mssdk/include/DShowIDL/axextend.idl new file mode 100644 index 00000000..81097b30 --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/axextend.idl @@ -0,0 +1,4647 @@ +//------------------------------------------------------------------------------ +// File: AXExtend.idl +// +// Desc: Extended streaming interface definitions for the ActiveMovie +// streaming and synchronization architecture. Core streaming +// interfaces are in AXCore.idl, and control interfaces for the +// type library are in Control.odl. +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +// include after unknwn.idl, objidl.idl and axcore.idl + + +// forward declarations - these are the interfaces declared in this file + +interface IEnumRegFilters; +interface IFileSourceFilter; +interface IFileSinkFilter; +interface IFileSinkFilter2; +interface IGraphBuilder; +interface ICaptureGraphBuilder; +interface ICaptureGraphBuilder2; +interface IAMCopyCaptureFileProgress; +interface IFilterMapper; +interface IFilterMapper2; +interface IMediaEventSink; +interface IOverlay; +interface IOverlayNotify; +interface IOverlayNotify2; +interface IQualityControl; +interface ISeekingPassThru; +interface IAMStreamConfig; +interface IAMDevMemoryAllocator; +interface IAMDevMemoryControl; +interface IConfigInterleaving; +interface IConfigAviMux; +interface IAMVideoCompression; +interface IAMVfwCaptureDialogs; +interface IAMVfwCompressDialogs; +interface IAMDroppedFrames; +interface IAMAudioInputMixer; +interface IAMBufferNegotiation; +interface IAMAnalogVideoDecoder; +interface IAMVideoProcAmp; +interface IAMAnalogVideoEncoder; +interface IAMCameraControl; +interface IAMCrossbar; +interface IAMTVTuner; +interface IKsPropertySet; +interface IAMPhysicalPinInfo; +interface IAMExtDevice; +interface IAMExtTransport; +interface IAMTimecodeReader; +interface IAMTimecodeGenerator; +interface IAMTimecodeDisplay; +interface IDrawVideoImage; +interface IDecimateVideoImage; +interface IAMVideoDecimationProperties; +interface IAMPushSource; +interface IAMAudioRendererStats; +interface IAMLatency; +interface IAMGraphStreams; +interface IAMOverlayFX; +interface IAMOpenProgress; +interface IMpeg2Demultiplexer ; +interface IMPEG2StreamIdMap ; +interface IEnumStreamIdMap ; + +//========================================================================== +//========================================================================== +// IEnumRegFilters interface -- enumerates registered filters. +// enumerator interface returned from IFilterMapper::EnumMatchingFilters(). +// based on IEnum pseudo-template +//========================================================================== +//========================================================================== + +typedef struct { + CLSID Clsid; // class id of the filter + LPWSTR Name; // name of filter +} REGFILTER; + +[ +object, +uuid(56a868a4-0ad4-11ce-b03a-0020af0ba770), +pointer_default(unique) +] + +// The point of the mapper is to avoid loading filters. By looking in the +// registry we can reduce the number of filters which must be loaded and tried. +// This enumerator returns descriptors of filters (including the GUIDs that +// CoCreateInstance can instantiate). The filters themselves are not loaded. + +interface IEnumRegFilters : IUnknown { + import "unknwn.idl"; + + // The caller must use CoTaskMemFree to free each REGFILTER* returned + // in the array. + HRESULT Next + ( [in] ULONG cFilters, // place this many filters... + [out] REGFILTER ** apRegFilter, // ...in this array of REGFILTER* + [out] ULONG * pcFetched // actual count passed returned here + ); + + // I can't think why anyone would want to skip, so it's not implemented. + // (anyone who thinks they know what they would be skipping over is probably + // missing some piece of the jigsaw). This ALWAYS returns E_NOTIMPL. + + HRESULT Skip( + [in] ULONG cFilters + ); + + HRESULT Reset(void); + + // No cloning either - also ALWAYS returns E_NOTIMPL. + + HRESULT Clone( + [out] IEnumRegFilters **ppEnum + ); +} + + +typedef IEnumRegFilters *PENUMREGFILTERS; + +//======================================================================== +//======================================================================== +// abstraction representing the registered information about filters. +// This allows properties of filters to be looked up without loading them. +//======================================================================== +//======================================================================== + +[ +object, +uuid(56a868a3-0ad4-11ce-b03a-0020af0ba770), +pointer_default(unique) +] +interface IFilterMapper : IUnknown { + import "unknwn.idl"; + + //========================================================================== + // Registration functions. + // A filter should be registered before any other use. + // The registration can be NON_VOLATILE (i.e. permanent, do once ever) + // or VOLATILE (once per boot of the system). + // UnregisterFilter (obviously) removes the registration. + // The action of any of the other calls on unregistered filters is undefined. + // it will either work or you'll get an error, but I'm not saying which. + //========================================================================== + + // Four predefined values controling the order in which filters are tried + // for intelligent graph building. Intermediate values are legal. + // Any value <=MERIT_DO_NOT_USE will mean that the filter will never + // be tried by the filtergrah to automatically complete a connection. + + enum { MERIT_PREFERRED = 0x800000, + MERIT_NORMAL = 0x600000, + MERIT_UNLIKELY = 0x400000, + MERIT_DO_NOT_USE = 0x200000, + MERIT_SW_COMPRESSOR = 0x100000, + MERIT_HW_COMPRESSOR = 0x100050 + }; + + // Register a filter + + HRESULT RegisterFilter + ( [in] CLSID clsid, // GUID of the filter + [in] LPCWSTR Name, // Descriptive name for the filter + [in] DWORD dwMerit // DO_NOT_USE, UNLIKELY, NORMAL or PREFERRED. + ); + + + // Register an identifiable instance of a filter. This deals with cases + // such as two similar sound cards which are driven by the same driver, + // but we want to choose which oif these cards the sound will come out of. + // This is not needed if there is only one instance of the filter + // (e.g. there is only one sound card in the machine) or if all instances + // of the filter are equivalent. + + // The filter itself must have already been registered // ??? Is that true? + HRESULT RegisterFilterInstance + ( [in] CLSID clsid, // GUID of the filter + [in] LPCWSTR Name, // Descriptive name of instance. + [out] CLSID *MRId // Returned Media Resource Id. A + // locally unique id for this instance + // of this filter + ); + + + HRESULT RegisterPin + ( [in] CLSID Filter, // GUID of filter + [in] LPCWSTR Name, // Name of the pin + [in] BOOL bRendered, // The filter renders this input + [in] BOOL bOutput, // TRUE if this is an Output pin + [in] BOOL bZero, // TRUE if OK for zero instances of pin + // In this case you will have to Create + // a pin to have even one instance + [in] BOOL bMany, // TRUE if OK for many instances of pin + [in] CLSID ConnectsToFilter, // Filter it connects to if it has + // subterranean connection, else NULL + [in] LPCWSTR ConnectsToPin // Name of pin it connects to + // NULL for output pins + ); + + HRESULT RegisterPinType + ( [in] CLSID clsFilter, // GUID of filter + [in] LPCWSTR strName, // Descriptive name of the pin + [in] CLSID clsMajorType, // Major type of the data stream + [in] CLSID clsSubType // Sub type of the data stream + ); + + + HRESULT UnregisterFilter + ( [in] CLSID Filter // GUID of filter + ); + + + HRESULT UnregisterFilterInstance + ( [in] CLSID MRId // Media Resource Id of this instance + ); + + + HRESULT UnregisterPin + ( [in] CLSID Filter, // GUID of filter + [in] LPCWSTR Name // Name of the pin + ); + + + // Set *ppEnum to be an enumerator for filters matching the requirements. + + HRESULT EnumMatchingFilters + ( [out] IEnumRegFilters **ppEnum // enumerator returned + , [in] DWORD dwMerit // at least this merit needed + , [in] BOOL bInputNeeded // need at least one input pin + , [in] CLSID clsInMaj // input major type + , [in] CLSID clsInSub // input sub type + , [in] BOOL bRender // must the input be rendered? + , [in] BOOL bOututNeeded // need at least one output pin + , [in] CLSID clsOutMaj // output major type + , [in] CLSID clsOutSub // output sub type + ); + +} + +// structure used to identify media types a pin handles. Used for +// registration through IFilterMapper and IFilterMapper2 +// +typedef struct +{ + const CLSID * clsMajorType; + const CLSID * clsMinorType; +} REGPINTYPES; + +// describes pin for filter registration. Used for registration +// through IFilterMapper and IFilterMapper2 +// +typedef struct +{ + LPWSTR strName; + + // The filter renders this input + BOOL bRendered; + + // This is an Output pin + BOOL bOutput; + + // OK to have zero instances of pin In this case you will have to + // Create a pin to have even one instance + BOOL bZero; + + // OK to create many instance of pin + BOOL bMany; + + const CLSID * clsConnectsToFilter; + const WCHAR * strConnectsToPin; + + UINT nMediaTypes; + const REGPINTYPES * lpMediaType; +} REGFILTERPINS; + +// mediums (as defined in the Windows NT DDK) for registration with +// IFilterMapper2 +// +typedef struct +{ + CLSID clsMedium; + DWORD dw1; + DWORD dw2; +} REGPINMEDIUM; + +// flags for dwFlags in REFILTERPINS2 +enum +{ + // OK to have zero instances of pin In this case you will have to + // Create a pin to have even one instance + REG_PINFLAG_B_ZERO = 0x1, + + // The filter renders this input + REG_PINFLAG_B_RENDERER = 0x2, + + // OK to create many instance of pin + REG_PINFLAG_B_MANY = 0x4, + + // This is an Output pin + REG_PINFLAG_B_OUTPUT = 0x8 +}; + + +// describes pin for filter registration through IFilterMapper2 +typedef struct +{ + // combination of REG_PINFLAG flags + DWORD dwFlags; + + // number of instances of the pin if known + UINT cInstances; + + UINT nMediaTypes; + [size_is(nMediaTypes)] const REGPINTYPES * lpMediaType; + + UINT nMediums; + [size_is(nMediums)] const REGPINMEDIUM *lpMedium; + + // pin category (for Kernel Streaming pins) as defined in the + // Windows NT DDK + const CLSID *clsPinCategory; + +} REGFILTERPINS2; + +// describes filter for registration through IFilterMapper2 +typedef struct +{ + DWORD dwVersion; // 1 or 2 + DWORD dwMerit; + + /* unnamed union */ + [switch_is(dwVersion)] [switch_type(DWORD)] union + { + [case(1)] + + struct + { + ULONG cPins; + [size_is(cPins)] const REGFILTERPINS *rgPins; + }; + + [case(2)] + + struct + { + ULONG cPins2; + [size_is(cPins2)] const REGFILTERPINS2 *rgPins2; + }; + + [default] + ; + } ; + +} REGFILTER2; + + + +[ +object, +uuid(b79bb0b0-33c1-11d1-abe1-00a0c905f375), +pointer_default(unique) +] +interface IFilterMapper2 : IUnknown { + import "unknwn.idl"; + + // create or rename ActiveMovie category + HRESULT CreateCategory + ( [in] REFCLSID clsidCategory, + [in] DWORD dwCategoryMerit, + [in] LPCWSTR Description + ); + + HRESULT UnregisterFilter + ( [in] const CLSID *pclsidCategory, + [in] const OLECHAR *szInstance, + [in] REFCLSID Filter // GUID of filter + ); + + // Register a filter, pins, and media types under a category. + HRESULT RegisterFilter + ( [in] REFCLSID clsidFilter, // GUID of the filter + [in] LPCWSTR Name, // Descriptive name for the filter + + // ppMoniker can be null. or *ppMoniker can contain the + // moniker where this filter data will be written; + // *ppMoniker will be set to null on return. or *ppMoniker + // can be null in which case the moniker will be returned + // with refcount. + [in, out] IMoniker **ppMoniker, + + // can be null + [in] const CLSID *pclsidCategory, + + // cannot be null + [in] const OLECHAR *szInstance, + + // rest of filter and pin registration + [in] const REGFILTER2 *prf2 + ); + + // Set *ppEnum to be an enumerator for filters matching the + // requirements. + HRESULT EnumMatchingFilters + ( [out] IEnumMoniker **ppEnum // enumerator returned + , [in] DWORD dwFlags // 0 + , [in] BOOL bExactMatch // don't match wildcards + , [in] DWORD dwMerit // at least this merit needed + , [in] BOOL bInputNeeded // need at least one input pin + , [in] DWORD cInputTypes // Number of input types to match + // Any match is OK + , [size_is(cInputTypes*2)] const GUID *pInputTypes // input major+subtype pair array + , [in] const REGPINMEDIUM *pMedIn // input medium + , [in] const CLSID *pPinCategoryIn // input pin category + , [in] BOOL bRender // must the input be rendered? + , [in] BOOL bOutputNeeded // need at least one output pin + , [in] DWORD cOutputTypes // Number of output types to match + // Any match is OK + , [size_is(cOutputTypes*2)] const GUID *pOutputTypes // output major+subtype pair array + , [in] const REGPINMEDIUM *pMedOut // output medium + , [in] const CLSID *pPinCategoryOut // output pin category + ); +} + +[ +object, +uuid(b79bb0b1-33c1-11d1-abe1-00a0c905f375), +pointer_default(unique) +] +interface IFilterMapper3 : IFilterMapper2 { + // new interface to allow creating filters using the mapper's devenum instance + // primarily needed for out-of-proc access to a graph + HRESULT GetICreateDevEnum( [out] ICreateDevEnum **ppEnum ); +} + +//======================================================================== +//======================================================================== +// Defines IQualityControl interface +// +// Defines quality messages and allows a quality manager to install itself +// as the sink for quality messages. +//======================================================================== +//======================================================================== + +typedef enum tagQualityMessageType { + Famine, + Flood +} QualityMessageType; + +typedef struct tagQuality { + QualityMessageType Type; + long Proportion; // milli-units. 1000 = no change + // for Flood: + // What proportion of the media samples currently + // coming through are required in the future. + // 800 means please drop another 20% + // For Famine: + // How much to "keep in" e.g. 800 means send me + // 20% less e.g. by dropping 20% of the samples. + // 1100 would mean "I'm coping, send me more". + REFERENCE_TIME Late; + // How much you need to catch up by + REFERENCE_TIME TimeStamp; + // The stream time when this was generated (probably + // corresponds to the start time on some sample). +} Quality; + +typedef IQualityControl *PQUALITYCONTROL; + + +[ +object, +uuid(56a868a5-0ad4-11ce-b03a-0020af0ba770), +pointer_default(unique) +] +interface IQualityControl : IUnknown { + + // Notify the recipient that a quality change is requested. + // pSelf is the IBaseFilter* of the sender. + // this is sent from a filter + // to (the quality manager or) an upstream peer. + HRESULT Notify + ( [in] IBaseFilter * pSelf, + [in] Quality q + ); + + // Notify the recipient that future quality messages are to be sent + // to iqc. If piqc is NULL then quality messages are to default back to + // the upstream peer. + // This is sent from the quality manager to a filter. + // The recipient should hold piqc as a WEAK reference, + // i.e. do not AddRef it, do not Release it. + HRESULT SetSink + ( [in] IQualityControl * piqc + ); +} + +//===================================================================== +//===================================================================== +// Definitions required for overlay transport +//===================================================================== +//===================================================================== + + +// Used to communicate the colour that the IOverlay client wants the window +// painted in so that it can draw directly to the correct clipping region +// A colour key can be described in two alternate ways, the first is by a +// range of one or more (system) palette indices. The second is by defining +// a colour cube with two RGB values, any of which would be acceptable. +// +// The CK values are consistent with GDI PALETTEINDEX and PALETTERGB macros + + +enum { CK_NOCOLORKEY = 0x0, // No color key is required + CK_INDEX = 0x1, // Index into the current system palette + CK_RGB = 0x2 }; // Color key is an RGB value (or range) + +typedef struct tagCOLORKEY { + + DWORD KeyType; // Explains meaning of the structure + DWORD PaletteIndex; // Palette index if available + COLORREF LowColorValue; // Low colour space RGB value + COLORREF HighColorValue; // Defines the high RGB value + +} COLORKEY; + +// When a filter sets up an advise link it can ask that only certain types +// of notifications be sent, for example just palette changes. While this +// doesn't mean that the other notification call backs won't ever be called +// the IOverlay implementation may use this as an efficiency optimisation + +enum { ADVISE_NONE = 0x0, // No notifications required + ADVISE_CLIPPING = 0x1, // Synchronous clip information + ADVISE_PALETTE = 0x2, // Palette change notifications + ADVISE_COLORKEY = 0x4, // Called when colour key changes + ADVISE_POSITION = 0x8, // Likewise when window moves etc + ADVISE_DISPLAY_CHANGE = 0x10 // Called on WM_DISPLAYCHANGE + }; + +const DWORD ADVISE_ALL = ADVISE_CLIPPING | + ADVISE_PALETTE | + ADVISE_COLORKEY | + ADVISE_POSITION; + +const DWORD ADVISE_ALL2 = ADVISE_ALL | + ADVISE_DISPLAY_CHANGE; + +// This isn't defined when you run IDL + +cpp_quote("#ifndef _WINGDI_") + +typedef struct _RGNDATAHEADER { + DWORD dwSize; + DWORD iType; + DWORD nCount; + DWORD nRgnSize; + RECT rcBound; +} RGNDATAHEADER; + +typedef struct _RGNDATA { + RGNDATAHEADER rdh; + char Buffer[1]; +} RGNDATA; + +cpp_quote("#endif") + + +//===================================================================== +//===================================================================== +// Defines IOverlayNotify interface +// +// This interface gives asynchronous notifications of changes to the +// rendering window - such as changes to the exposed window area +//===================================================================== +//===================================================================== + +[ +object, +local, +uuid(56a868a0-0ad4-11ce-b03a-0020af0ba770), +pointer_default(unique) +] +interface IOverlayNotify : IUnknown { + + // IOverlayNotify methods + + // This notifies the filter of palette changes, the filter should copy + // the array of RGBQUADs if it needs to use them after returning. This + // is not called when the palette is actually changed in the display + // but at a short time after (in sync with WM_PALETTECHANGED messages) + + HRESULT OnPaletteChange( + [in] DWORD dwColors, // Number of colours present + [in] const PALETTEENTRY *pPalette); // Array of palette colours + + // This provides synchronous clip changes so that the client is called + // before the window is moved to freeze the video, and then when the + // window has stabilised it is called again to start playback again. + // If the window rect is all zero then the window is invisible, the + // filter must take a copy of the information if it wants to keep it + + HRESULT OnClipChange( + [in] const RECT *pSourceRect, // Region of video to use + [in] const RECT *pDestinationRect, // Where video goes + [in] const RGNDATA *pRgnData); // Defines clipping information + + HRESULT OnColorKeyChange([in] const COLORKEY *pColorKey); + + // The calls to OnClipChange happen in sync with the window. So it is + // called with an empty clip list before the window moves to freeze + // the video, and then when the window has stabilised it is called + // again with the new clip list. The OnPositionChange callback is for + // overlay cards that don't want the expense of synchronous clipping + // updates and just want to know when the source or destination video + // positions change. They will NOT be called in sync with the window + // but at some point after the window has changed (basicly in time + // with WM_SIZE etc messages received). This is therefore suitable + // for overlay cards that don't inlay their data to the frame buffer + // NOTE the destination is NOT clipped to the visible display area + + HRESULT OnPositionChange([in] const RECT *pSourceRect, + [in] const RECT *pDestinationRect); +} + +typedef IOverlayNotify *POVERLAYNOTIFY; + + +//===================================================================== +//===================================================================== +// Defines IOverlayNotify2 interface +// +// This interface gives asynchronous notifications of changes to the +// rendering window - such as changes to the exposed window area +// This is optionally supported by the advise sink for the purposes +// of accepting OnDisplayChange notification. +//===================================================================== +//===================================================================== + +cpp_quote("#if !defined(HMONITOR_DECLARED) && !defined(HMONITOR) && (WINVER < 0x0500)") +cpp_quote("#define HMONITOR_DECLARED") +cpp_quote("#if 0") +typedef HANDLE HMONITOR; +cpp_quote("#endif") +cpp_quote("DECLARE_HANDLE(HMONITOR);") +cpp_quote("#endif") + +[ +object, +local, +uuid(680EFA10-D535-11D1-87C8-00A0C9223196), +pointer_default(unique) +] +interface IOverlayNotify2 : IOverlayNotify { + + // IOverlayNotify2 methods + + HRESULT OnDisplayChange( // ADVISE_DISPLAY_CHANGE + HMONITOR hMonitor); +} + +typedef IOverlayNotify2 *POVERLAYNOTIFY2; + + +//===================================================================== +//===================================================================== +// Defines IOverlay interface +// +// This interface provides information so that a filter can write direct to +// the frame buffer while placing the video in the correct window position +//===================================================================== +//===================================================================== + +[ +object, +local, +uuid(56a868a1-0ad4-11ce-b03a-0020af0ba770), +pointer_default(unique) +] +interface IOverlay : IUnknown { + + // IOverlay methods + + HRESULT GetPalette( + [out] DWORD *pdwColors, // Number of colours present + [out] PALETTEENTRY **ppPalette); // Where to put palette data + + HRESULT SetPalette( + [in] DWORD dwColors, // Number of colours present + [in] PALETTEENTRY *pPalette); // Colours to use for palette + + // If you change the colour key through SetColorKey then all the advise + // links will receive an OnColorKeyChange callback with the new colour + + HRESULT GetDefaultColorKey([out] COLORKEY *pColorKey); + HRESULT GetColorKey([out] COLORKEY *pColorKey); + HRESULT SetColorKey([in,out] COLORKEY *pColorKey); + HRESULT GetWindowHandle([out] HWND *pHwnd); + + // The IOverlay implementation allocates the memory for the clipping + // rectangles as it can be variable in length. The filter calling + // this method should free the memory when it is finished with it + + HRESULT GetClipList([out] RECT *pSourceRect, + [out] RECT *pDestinationRect, + [out] RGNDATA **ppRgnData); + + // Returns the current video source and destination + + HRESULT GetVideoPosition([out] RECT *pSourceRect, + [out] RECT *pDestinationRect); + + HRESULT Advise( + [in] IOverlayNotify *pOverlayNotify, // Notification interface + [in] DWORD dwInterests); // Callbacks interested in + + HRESULT Unadvise(); // Stop the callbacks now +} + +typedef IOverlay *POVERLAY; + + +//===================================================================== +//===================================================================== +// control related interfaces (others are defined in control.odl) +//===================================================================== +//===================================================================== + + +//===================================================================== +//===================================================================== +// Defines IMediaEventSink interface +// +// Exposed by filtergraph. Called by filters to notify events. Will be +// passed on to application by the IMediaControl event methods. +//===================================================================== +//===================================================================== + +[ + object, + uuid(56a868a2-0ad4-11ce-b03a-0020af0ba770), + pointer_default(unique) +] +interface IMediaEventSink : IUnknown { + + // notify an event. will be queued, but not delivered to + // the application on this thread. + HRESULT Notify( + [in] long EventCode, + [in] LONG_PTR EventParam1, + [in] LONG_PTR EventParam2 + ); +} + +typedef IMediaEventSink *PMEDIAEVENTSINK; + +//===================================================================== +//===================================================================== +// Defines IFileSourceFilter interface +// +// Exposed by source filters to set the file name and media type. +//===================================================================== +//===================================================================== + +[ + object, + uuid(56a868a6-0ad4-11ce-b03a-0020af0ba770), + pointer_default(unique) +] +interface IFileSourceFilter : IUnknown { + + // Load a file and assign it the given media type + HRESULT Load( + [in] LPCOLESTR pszFileName, // Pointer to absolute path of file to open + [in, unique] const AM_MEDIA_TYPE *pmt // Media type of file - can be NULL + ); + // Get the currently loaded file name + HRESULT GetCurFile( + [out] LPOLESTR *ppszFileName, // Pointer to the path for the current file + [out] AM_MEDIA_TYPE *pmt // Pointer to the media type + ); +} + +typedef IFileSourceFilter *PFILTERFILESOURCE; + +//===================================================================== +//===================================================================== +// Defines IFileSinkFilter interface +// +// Exposed by renderers to set the output file name. +//===================================================================== +//===================================================================== + +[ + object, + uuid(a2104830-7c70-11cf-8bce-00aa00a3f1a6), + pointer_default(unique) +] +interface IFileSinkFilter : IUnknown { + + // Output to this file. default is to open the existing file + HRESULT SetFileName( + [in] LPCOLESTR pszFileName, // Pointer to absolute path of output file + [in, unique] const AM_MEDIA_TYPE *pmt // Media type of file - can be NULL + ); + // Get the current file name + HRESULT GetCurFile( + [out] LPOLESTR *ppszFileName, // Pointer to the path for the current file + [out] AM_MEDIA_TYPE *pmt // Pointer to the media type + ); +} + +typedef IFileSinkFilter *PFILTERFILESINK; + +[ + object, + uuid(00855B90-CE1B-11d0-BD4F-00A0C911CE86), + pointer_default(unique) +] +interface IFileSinkFilter2 : IFileSinkFilter { + + HRESULT SetMode( + [in] DWORD dwFlags // AM_FILESINK_FLAGS + ); + + HRESULT GetMode( + [out] DWORD *pdwFlags // AM_FILESINK_FLAGS + ); +} + +typedef IFileSinkFilter2 *PFILESINKFILTER2; + +typedef enum { + + // create a new file + AM_FILE_OVERWRITE = 0x00000001, + +} AM_FILESINK_FLAGS; + + +// +// Intelligent connectivity for filters - an interface supported by +// filter graphs (since it is an extension to IFilterGraph) that supports +// building of graphs by automatic selection and connection of appropriate +// filters + +[ + object, + uuid(56a868a9-0ad4-11ce-b03a-0020af0ba770), + pointer_default(unique) +] +interface IGraphBuilder : IFilterGraph { + // Connect these two pins directly or indirectly, using transform filters + // if necessary. + + HRESULT Connect + ( [in] IPin * ppinOut, // the output pin + [in] IPin * ppinIn // the input pin + ); + + + // Connect this output pin directly or indirectly, using transform filters + // if necessary to something that will render it. + + HRESULT Render + ( [in] IPin * ppinOut // the output pin + ); + + + // Build a filter graph that will render this file using this play list. + // If lpwstrPlayList is NULL then it will use the default play list + // which will typically render the whole file. + + HRESULT RenderFile + ( [in] LPCWSTR lpcwstrFile, + [in, unique] LPCWSTR lpcwstrPlayList + ); + + + // Add to the filter graph a source filter for this file. This would + // be the same source filter that would be added by calling Render. + // This call gives you more control over building + // the rest of the graph, e.g. AddFilter() + // and then Connect the two. + // The IBaseFilter* interface exposed by the source filter is returned + // in ppFilter, addrefed already for you + // The filter will be known by the name lpcwstrFIlterName + // nn this filter graph, + HRESULT AddSourceFilter + ( [in] LPCWSTR lpcwstrFileName, + [in, unique] LPCWSTR lpcwstrFilterName, + [out] IBaseFilter* *ppFilter + ); + + + // If this call is made then trace information will be written to the + // file showing the actions taken in attempting to perform an operation. + HRESULT SetLogFile + ( [in] DWORD_PTR hFile // open file handle e.g. from CreateFile + ); + + + // Request that the graph builder should return as soon as possible from + // its current task. + // Note that it is possible fot the following to occur in the following + // sequence: + // Operation begins; Abort is requested; Operation completes normally. + // This would be normal whenever the quickest way to finish an operation + // was to simply continue to the end. + HRESULT Abort(); + + // Return S_OK if the curent operation is to continue, + // return S_FALSE if the current operation is to be aborted. + // This method can be called as a callback from a filter which is doing + // some operation at the request of the graph. + HRESULT ShouldOperationContinue(); + +} + + +// +// New capture graph builder + +[ + object, + uuid(bf87b6e0-8c27-11d0-b3f0-00aa003761c5), + pointer_default(unique) +] +interface ICaptureGraphBuilder : IUnknown { + + // Use this filtergraph + HRESULT SetFiltergraph( + [in] IGraphBuilder *pfg); + + // what filtergraph are you using? + // *ppfg->Release() when you're done with it + HRESULT GetFiltergraph( + [out] IGraphBuilder **ppfg); + + // creates a rendering section in the filtergraph consisting of a MUX + // of some filetype, and a file writer (and connects them together) + // *ppf->Release() when you're done with it + // *ppSink->Release() when you're done with it + HRESULT SetOutputFileName( + [in] const GUID *pType, // type of file to write, eg. MEDIASUBTYPE_Avi + [in] LPCOLESTR lpstrFile, // filename given to file writer + [out] IBaseFilter **ppf, // returns pointer to the MUX + [out] IFileSinkFilter **ppSink);// queried from file writer + + // Looks for an interface on the filter and on the output pin of the given + // category. (Categories: CAPTURE/PREVIEW/VIDEOPORT/VBI etc. or + // NULL for "don't care". + // It will also look upstream and downstream of + // the pin for the interface, to find interfaces on renderers, MUXES, TV + // Tuners, etc. + // Call *ppint->Release() when you're done with it + [local] HRESULT FindInterface( + [in, unique] const GUID *pCategory, // can be NULL for all pins + [in] IBaseFilter *pf, + [in] REFIID riid, + [out] void **ppint); + [call_as(FindInterface)] HRESULT RemoteFindInterface( + [in, unique] const GUID *pCategory, // can be NULL for all pins + [in] IBaseFilter *pf, + [in] REFIID riid, + [out] IUnknown **ppint); + + // Connects the pin of the given category of the source filter to the + // rendering filter, optionally through another filter (compressor?) + // For a non-NULL category, it will instantiate and connect additional + // required filters upstream too, like TV Tuners and Crossbars. + // If there is only one output pin on the source, use a NULL + // category. You can also have pSource be a pin + HRESULT RenderStream( + [in] const GUID *pCategory, // can be NULL if only one output pin + [in] IUnknown *pSource, // filter or pin + [in] IBaseFilter *pfCompressor, + [in] IBaseFilter *pfRenderer); // can be NULL + + // Sends IAMStreamControl messages to the pin of the desired category, eg. + // "capture" or "preview" + // REFERENCE_TIME=NULL means NOW + // REFERENCE_TIME=MAX_TIME means never, or cancel previous request + // NULL controls all capture filters in the graph - you will get one + // notification for each filter with a pin of that category found + // returns S_FALSE if stop will be signalled before last sample is + // rendered. + // return a FAILURE code if the filter does not support IAMStreamControl + HRESULT ControlStream( + [in] const GUID *pCategory, + [in] IBaseFilter *pFilter, + [in] REFERENCE_TIME *pstart, + [in] REFERENCE_TIME *pstop, + [in] WORD wStartCookie, // high word reserved + [in] WORD wStopCookie); // high word reserved + + // creates a pre-allocated file of a given size in bytes + HRESULT AllocCapFile( + [in] LPCOLESTR lpstr, + [in] DWORDLONG dwlSize); + + // Copies the valid file data out of the old, possibly huge old capture + // file into a shorter new file. + // Return S_FALSE from your progress function to abort capture, S_OK to + // continue + HRESULT CopyCaptureFile( + [in] LPOLESTR lpwstrOld, + [in] LPOLESTR lpwstrNew, + [in] int fAllowEscAbort, // pressing ESC will abort? + [in] IAMCopyCaptureFileProgress *pCallback); // implement this to + // get progress +} + + +// +// Capture graph builder "CopyCapturedFile" progress callback + +[ + object, + uuid(670d1d20-a068-11d0-b3f0-00aa003761c5), + pointer_default(unique) +] +interface IAMCopyCaptureFileProgress : IUnknown { + + // If you support this interface somewhere, this function will be called + // periodically while ICaptureGraphBuilder::CopyCaptureFile is executing + // to let you know the progress + // + // Return S_OK from this function to continue. Return S_FALSE to abort the + // copy + HRESULT Progress( + [in] int iProgress); // a number between 0 and 100 (%) +} + + +// +// Capture graph builder that can deal with a single filter having more than +// one pin of each category... some new devices can capture both audio and +// video, for example +// + +[ + object, + uuid(93E5A4E0-2D50-11d2-ABFA-00A0C9C6E38D), + pointer_default(unique) +] +interface ICaptureGraphBuilder2 : IUnknown { + + // Use this filtergraph + HRESULT SetFiltergraph( + [in] IGraphBuilder *pfg); + + // what filtergraph are you using? + // *ppfg->Release() when you're done with it + HRESULT GetFiltergraph( + [out] IGraphBuilder **ppfg); + + // creates a rendering section in the filtergraph consisting of a MUX + // of some filetype, and a file writer (and connects them together) + // *ppf->Release() when you're done with it + // *ppSink->Release() when you're done with it + HRESULT SetOutputFileName( + [in] const GUID *pType, // GUID of MUX filter to use + [in] LPCOLESTR lpstrFile, // filename given to file writer + [out] IBaseFilter **ppf, // returns pointer to the MUX + [out] IFileSinkFilter **ppSink);// queried from file writer + + // Looks for an interface on the filter and on the output pin of the given + // category and type. (Categories: CAPTURE/PREVIEW/VIDEOPORT/VBI etc. or + // NULL for "don't care". Type: MAJORTYPE_Video/Audio etc or NULL) + // !!! Will some filters have >1 capture pin? ie RGB and MPEG? + // It will also look upstream and downstream of + // the pin for the interface, to find interfaces on renderers, MUXES, TV + // Tuners, etc. + // Call *ppint->Release() when you're done with it + [local] HRESULT FindInterface( + [in] const GUID *pCategory, // can be NULL for all pins + [in] const GUID *pType, // Audio/Video/??? or NULL (don't care) + [in] IBaseFilter *pf, + [in] REFIID riid, + [out] void **ppint); + [call_as(FindInterface)] HRESULT RemoteFindInterface( + [in] const GUID *pCategory, // can be NULL for all pins + [in] const GUID *pType, // Audio/Video/??? or NULL (don't care) + [in] IBaseFilter *pf, + [in] REFIID riid, + [out] IUnknown **ppint); + + // Connects the pin of the given category and type of the source filter to + // the rendering filter, optionally through another filter (compressor?) + // (Type is a Majortype, like Video or Audio) + // For a non-NULL category, it will instantiate and connect additional + // required filters upstream too, like TV Tuners and Crossbars. + // If there is only one output pin on the source, use a NULL category + // and type. You can also have pSource be a pin + HRESULT RenderStream( + [in] const GUID *pCategory, // can be NULL if only one output pin + [in] const GUID *pType, // Major type (Video/Audio/etc) + [in] IUnknown *pSource, // filter or pin + [in] IBaseFilter *pfCompressor, + [in] IBaseFilter *pfRenderer); // can be NULL + + // Sends IAMStreamControl messages to the pin of the desired category, + // (eg. "capture" or "preview") and of the desired type (eg. VIDEO or AUDIO) + // A category MUST be given. If a filter is given, a type must be too. + // REFERENCE_TIME=NULL means NOW + // REFERENCE_TIME=MAX_TIME means never, or cancel previous request + // NULL controls all capture filters in the graph - you will get one + // notification for each filter with a pin of that category found + // returns S_FALSE if stop will be signalled before last sample is + // rendered. + // return a FAILURE code if the filter does not support IAMStreamControl + HRESULT ControlStream( + [in] const GUID *pCategory, + [in] const GUID *pType, // Major type (Video/Audio/etc) + [in] IBaseFilter *pFilter, + [in] REFERENCE_TIME *pstart, + [in] REFERENCE_TIME *pstop, + [in] WORD wStartCookie, // high word reserved + [in] WORD wStopCookie); // high word reserved + + // creates a pre-allocated file of a given size in bytes + HRESULT AllocCapFile( + [in] LPCOLESTR lpstr, + [in] DWORDLONG dwlSize); + + // Copies the valid file data out of the old, possibly huge old capture + // file into a shorter new file. + // Return S_FALSE from your progress function to abort capture, S_OK to + // continue + HRESULT CopyCaptureFile( + [in] LPOLESTR lpwstrOld, + [in] LPOLESTR lpwstrNew, + [in] int fAllowEscAbort, // pressing ESC will abort? + [in] IAMCopyCaptureFileProgress *pCallback); // implement this to + // get progress + // Helper fn to find a certain pin on a filter. + HRESULT FindPin( + [in] IUnknown *pSource, + [in] PIN_DIRECTION pindir, // input or output? + [in] const GUID *pCategory, // what category? (or NULL) + [in] const GUID *pType, // what Major type (or NULL) + [in] BOOL fUnconnected, // must it be unconnected? + [in] int num, // which pin matching this? (0 based) + [out] IPin **ppPin); +} + +enum _AM_RENSDEREXFLAGS { + AM_RENDEREX_RENDERTOEXISTINGRENDERERS = 0x01 // Dont add any renderers +}; + +// +// IFilterGraph2 +// +// New methods on for IFilterGraph and IGraphBuilder will have to go here. +// + +[ + object, + uuid(36b73882-c2c8-11cf-8b46-00805f6cef60), + pointer_default(unique) +] +interface IFilterGraph2: IGraphBuilder { + + // Add a Moniker source moniker + HRESULT AddSourceFilterForMoniker( + [in] IMoniker *pMoniker, + [in] IBindCtx *pCtx, + [in, unique] LPCWSTR lpcwstrFilterName, + [out] IBaseFilter **ppFilter + ); + + // Specify the type for a reconnect + // This is better than Reconnect as sometime the parties to a + // reconnection can't remember what type they'd agreed (!) + HRESULT ReconnectEx + ( [in] IPin * ppin, // the pin to disconnect and reconnect + [in, unique] const AM_MEDIA_TYPE *pmt // the type to reconnect with - can be NULL + ); + + // Render a pin without adding any new renderers + HRESULT RenderEx( [in] IPin *pPinOut, // Pin to render + [in] DWORD dwFlags, // flags + [in, out] DWORD *pvContext // Unused - set to NULL + ); + +#if 0 + // Method looks for a filter which supports the specified interface. If such + // a filter exists, an AddRef()'ed pointer to the requested interface is placed + // in *ppInterface. + // + // *ppInterface will be NULL on return if such a filter could not be found, and + // the method will return E_NOINTERFACE. + // + // pdwIndex is an internal index that is used for obtaining subsequent interfaces. + // *pdwIndex should be initialized to zero. It is set on return to a value that + // allows the implementation of FindFilterInterface to search for further interfaces + // if called again. If no more such interfaces exist, the method will return E_NOINTERFACE. + // + // If pdwIndex is NULL, FindFilterInterface returns an interface only if there is just + // a single filter in the graph that supports the interface. Otherwise it returns + // E_NOINTERFACE. + // + HRESULT FindFilterInterface( [in] REFIID iid, [out] void ** ppInterface, [in,out] LPDWORD pdwIndex ); + + // Tries to obtain the interface from the filter graph itself. If this fails, + // it attempts to find the unique filter that supports the interface. + // On failure the method will return E_NOINTERFACE. On success, it returns + // S_OK and an AddRef()'ed pointer to the requested interface in *ppInterface. + // + HRESULT FindInterface( [in] REFIID iid, [out] void ** ppInterface ); + +#endif +} + +// +// StreamBuilder +// aka Graph building with constraints +// aka convergent graphs +// aka Closed captioning + +[ + object, + local, + uuid(56a868bf-0ad4-11ce-b03a-0020af0ba770), + pointer_default(unique) +] +interface IStreamBuilder : IUnknown { + + // Connect this output pin directly or indirectly, using transform filters + // if necessary to thing(s) that will render it, within this graph + // Move from Initial state to Rendered state. + + HRESULT Render + ( [in] IPin * ppinOut, // the output pin + [in] IGraphBuilder * pGraph // the graph + ); + + // Undo what you did in Render. Return to Initial state. + HRESULT Backout + ( [in] IPin * ppinOut, // the output pin + [in] IGraphBuilder * pGraph // the graph + ); +} + + +// async reader interface - supported by file source filters. Allows +// multiple overlapped reads from different positions + + +[ + object, + uuid(56a868aa-0ad4-11ce-b03a-0020af0ba770), + pointer_default(unique) +] +interface IAsyncReader : IUnknown +{ + // pass in your preferred allocator and your preferred properties. + // method returns the actual allocator to be used. Call GetProperties + // on returned allocator to learn alignment and prefix etc chosen. + // this allocator will be not be committed and decommitted by + // the async reader, only by the consumer. + // Must call this before calling Request. + HRESULT RequestAllocator( + [in] IMemAllocator* pPreferred, + [in] ALLOCATOR_PROPERTIES* pProps, + [out] IMemAllocator ** ppActual); + + // queue a request for data. + // media sample start and stop times contain the requested absolute + // byte position (start inclusive, stop exclusive). + // may fail if sample not obtained from agreed allocator. + // may fail if start/stop position does not match agreed alignment. + // samples allocated from source pin's allocator may fail + // GetPointer until after returning from WaitForNext. + // Stop position must be aligned - this means it may exceed duration. + // on completion, stop position will be corrected to unaligned + // actual data. + HRESULT Request( + [in] IMediaSample* pSample, + [in] DWORD_PTR dwUser); // user context + + // block until the next sample is completed or the timeout occurs. + // timeout (millisecs) may be 0 or INFINITE. Samples may not + // be delivered in order. If there is a read error of any sort, a + // notification will already have been sent by the source filter, + // and HRESULT will be an error. + // If ppSample is not null, then a Request completed with the result + // code returned. + HRESULT WaitForNext( + [in] DWORD dwTimeout, + [out] IMediaSample** ppSample, // completed sample + [out] DWORD_PTR * pdwUser); // user context + + // sync read of data. Sample passed in must have been acquired from + // the agreed allocator. Start and stop position must be aligned. + // equivalent to a Request/WaitForNext pair, but may avoid the + // need for a thread on the source filter. + HRESULT SyncReadAligned( + [in] IMediaSample* pSample); + + + // sync read. works in stopped state as well as run state. + // need not be aligned. Will fail if read is beyond actual total + // length. + HRESULT SyncRead( + [in] LONGLONG llPosition, // absolute file position + [in] LONG lLength, // nr bytes required + [out, size_is(lLength)] + BYTE* pBuffer); // write data here + + // return total length of stream, and currently available length. + // reads for beyond the available length but within the total length will + // normally succeed but may block for a long period. + HRESULT Length( + [out] LONGLONG* pTotal, + [out] LONGLONG* pAvailable); + + // cause all outstanding reads to return, possibly with a failure code + //(VFW_E_TIMEOUT) indicating they were cancelled. + // Between BeginFlush and EndFlush calls, Request calls will fail and + // WaitForNext calls will always complete immediately. + HRESULT BeginFlush(void); + HRESULT EndFlush(void); +} + + +// interface provided by the filtergraph itself to let other objects +// (especially plug-in distributors, but also apps like graphedt) know +// when the graph has changed. +[ + object, + uuid(56a868ab-0ad4-11ce-b03a-0020af0ba770), + pointer_default(unique) +] +interface IGraphVersion : IUnknown +{ + // returns the current graph version number + // this is incremented every time there is a change in the + // set of filters in the graph or in their connections + // + // if this is changed since your last enumeration, then re-enumerate + // the graph + HRESULT QueryVersion(LONG* pVersion); +} + + + + +// +// interface describing an object that uses resources. +// +// implement if: you request resources using IResourceManager. You will +// need to pass your implementation of this pointer as an in param. +// +// use if: you are a resource manager who implements IResourceManager +[ + object, + uuid(56a868ad-0ad4-11ce-b03a-0020af0ba770), + pointer_default(unique) +] +interface IResourceConsumer : IUnknown +{ + // you may acquire the resource specified. + // return values: + // S_OK -- I have successfully acquired it + // S_FALSE -- I will acquire it and call NotifyAcquire afterwards + // VFW_S_NOT_NEEDED: I no longer need the resource + // FAILED(hr)-I tried to acquire it and failed. + + HRESULT + AcquireResource( + [in] LONG idResource); + + + + // Please release the resource. + // return values: + // S_OK -- I have released it (and want it again when available) + // S_FALSE -- I will call NotifyRelease when I have released it + // other something went wrong. + HRESULT + ReleaseResource( + [in] LONG idResource); +} + + + +// interface describing a resource manager that will resolve contention for +// named resources. +// +// implement if: you are a resource manager. The filtergraph will be a resource +// manager, internally delegating to the system wide resource manager +// (when there is one) +// +// use if: you need resources that are limited. Use the resource manager to +// resolve contention by registering the resource with this interface, +// and requesting it from this interface whenever needed. +// +// or use if: you detect focus changes which should affect resource usage. +// Notifying change of focus to the resource manager will cause the resource +// manager to switch contended resources to the objects that have the user's +// focus +[ + object, + uuid(56a868ac-0ad4-11ce-b03a-0020af0ba770), + pointer_default(unique) +] +interface IResourceManager : IUnknown +{ + // tell the manager how many there are of a resource. + // ok if already registered. will take new count. if new count + // is lower, will de-allocate resources to new count. + // + // You get back a token that will be used in further calls. + // + // Passing a count of 0 will eliminate this resource. There is currently + // no defined way to find the id without knowing the count. + // + HRESULT + Register( + [in] LPCWSTR pName, // this named resource + [in] LONG cResource, // has this many instances + [out] LONG* plToken // token placed here on return + ); + + HRESULT + RegisterGroup( + [in] LPCWSTR pName, // this named resource group + [in] LONG cResource, // has this many resources + [in, size_is(cResource)] + LONG* palTokens, // these are the contained resources + [out] LONG* plToken // group resource id put here on return + ); + + // request the use of a given, registered resource. + // possible return values: + // S_OK == yes you can use it now + // S_FALSE == you will be called back when the resource is available + // other - there is an error. + // + // The priority of this request should be affected by the associated + // focus object -- that is, when SetFocus is called for that focus + // object (or a 'related' object) then my request should be put through. + // + // A filter should pass the filter's IUnknown here. The filtergraph + // will match filters to the filtergraph, and will attempt to trace + // filters to common source filters when checking focus objects. + // The Focus object must be valid for the entire lifetime of the request + // -- until you call CancelRequest or NotifyRelease(id, p, FALSE) + HRESULT + RequestResource( + [in] LONG idResource, + [in] IUnknown* pFocusObject, + [in] IResourceConsumer* pConsumer + ); + + + // notify the resource manager that an acquisition attempt completed. + // Call this method after an AcquireResource method returned + // S_FALSE to indicate asynchronous acquisition. + // HR should be S_OK if the resource was successfully acquired, or a + // failure code if the resource could not be acquired. + HRESULT + NotifyAcquire( + [in] LONG idResource, + [in] IResourceConsumer* pConsumer, + [in] HRESULT hr); + + // Notify the resource manager that you have released a resource. Call + // this in response to a ReleaseResource method, or when you have finished + // with the resource. bStillWant should be TRUE if you still want the + // resource when it is next available, or FALSE if you no longer want + // the resource. + HRESULT + NotifyRelease( + [in] LONG idResource, + [in] IResourceConsumer* pConsumer, + [in] BOOL bStillWant); + + // I don't currently have the resource, and I no longer need it. + HRESULT + CancelRequest( + [in] LONG idResource, + [in] IResourceConsumer* pConsumer); + + // Notify the resource manager that a given object has been given the + // user's focus. In ActiveMovie, this will normally be a video renderer + // whose window has received the focus. The filter graph will switch + // contended resources to (in order): + // requests made with this same focus object + // requests whose focus object shares a common source with this + // requests whose focus object shares a common filter graph + // After calling this, you *must* call ReleaseFocus before the IUnknown + // becomes invalid, unless you can guarantee that another SetFocus + // of a different object is done in the meantime. No addref is held. + // + // The resource manager will hold this pointer until replaced or cancelled, + // and will use it to resolve resource contention. It will call + // QueryInterface for IBaseFilter at least and if found will call methods on + // that interface. + HRESULT + SetFocus( + [in] IUnknown* pFocusObject); + + // Sets the focus to NULL if the current focus object is still + // pFocusObject. Call this when + // the focus object is about to be destroyed to ensure that no-one is + // still referencing the object. + HRESULT + ReleaseFocus( + [in] IUnknown* pFocusObject); + + + +// !!! still need +// -- app override (some form of SetPriority) +// -- enumeration and description of resources + +} + + +// +// Interface representing an object that can be notified about state +// and other changes within a filter graph. The filtergraph will call plug-in +// distributors that expose this optional interface so that they can +// respond to appropriate changes. +// +// Implement if: you are a plug-in distributor (your class id is found +// under HKCR\Interface\\Distributor= for some interface). +// +// Use if: you are the filtergraph. +[ + object, + uuid(56a868af-0ad4-11ce-b03a-0020af0ba770), + pointer_default(unique) +] +interface IDistributorNotify : IUnknown +{ + // called when graph is entering stop state. Called before + // filters are stopped. + HRESULT Stop(void); + + // called when graph is entering paused state, before filters are + // notified + HRESULT Pause(void); + + // called when graph is entering running state, before filters are + // notified. tStart is the stream-time offset parameter that will be + // given to each filter's IBaseFilter::Run method. + HRESULT Run(REFERENCE_TIME tStart); + + // called when the graph's clock is changing, with the new clock. Addref + // the clock if you hold it beyond this method. Called before + // the filters are notified. + HRESULT SetSyncSource( + [in] IReferenceClock * pClock); + + // called when the set of filters or their connections has changed. + // Called on every AddFilter, RemoveFilter or ConnectDirect (or anything + // that will lead to one of these). + // You don't need to rebuild your list of interesting filters at this point + // but you should release any refcounts you hold on any filters that + // have been removed. + HRESULT NotifyGraphChange(void); +} + +typedef enum { + AM_STREAM_INFO_START_DEFINED = 0x00000001, + AM_STREAM_INFO_STOP_DEFINED = 0x00000002, + AM_STREAM_INFO_DISCARDING = 0x00000004, + AM_STREAM_INFO_STOP_SEND_EXTRA = 0x00000010 +} AM_STREAM_INFO_FLAGS; + +// Stream information +typedef struct { + REFERENCE_TIME tStart; + REFERENCE_TIME tStop; + DWORD dwStartCookie; + DWORD dwStopCookie; + DWORD dwFlags; +} AM_STREAM_INFO; + +// +// IAMStreamControl +// + +[ + object, + uuid(36b73881-c2c8-11cf-8b46-00805f6cef60), + pointer_default(unique) +] +interface IAMStreamControl : IUnknown +{ + // The REFERENCE_TIME pointers may be null, which + // indicates immediately. If the pointer is non-NULL + // and dwCookie is non-zero, then pins should send + // EC_STREAM_CONTROL_STOPPED / EC_STREAM_CONTROL_STARTED + // with an IPin pointer and the cookie, thus allowing + // apps to tie the events back to their requests. + // If either dwCookies is zero, or the pointer is null, + // then no event is sent. + + // If you have a capture pin hooked up to a MUX input pin and they + // both support IAMStreamControl, you'll want the MUX to signal the + // stop so you know the last frame was written out. In order for the + // MUX to know it's finished, the capture pin will have to send one + // extra sample after it was supposed to stop, so the MUX can trigger + // off that. So you would set bSendExtra to TRUE for the capture pin + // Leave it FALSE in all other cases. + + HRESULT StartAt( [in] const REFERENCE_TIME * ptStart, + [in] DWORD dwCookie ); + HRESULT StopAt( [in] const REFERENCE_TIME * ptStop, + [in] BOOL bSendExtra, + [in] DWORD dwCookie ); + HRESULT GetInfo( [out] AM_STREAM_INFO *pInfo); +} + + + +// +// ISeekingPassThru +// + +[ + object, + uuid(36b73883-c2c8-11cf-8b46-00805f6cef60), + pointer_default(unique) +] +interface ISeekingPassThru : IUnknown +{ + HRESULT Init( [in] BOOL bSupportRendering, + [in] IPin *pPin); +} + + + +// +// IAMStreamConfig - pin interface +// + +// A capture filter or compression filter's output pin +// supports this interface - no matter what data type you produce. + +// This interface can be used to set the output format of a pin (as an +// alternative to connecting the pin using a specific media type). +// After setting an output format, the pin will use that format +// the next time it connects to somebody, so you can just Render that +// pin and get a desired format without using Connect(CMediaType) +// Your pin should do that by ONLY OFFERING the media type set in SetFormat +// in its enumeration of media types, and no others. This will ensure that +// that format is indeed used for connection (or at least offer it first). +// An application interested in enumerating accepted mediatypes may have to +// do so BEFORE calling SetFormat. + +// But this interface's GetStreamCaps function can get more information +// about accepted media types than the traditional way of enumerating a pin's +// media types, so it should typically be used instead. +// GetStreamCaps gets information about the kinds of formats allowed... how +// it can stretch and crop, and the frame rate and data rates allowed (for +// video) + +// VIDEO EXAMPLE +// +// GetStreamCaps returns a whole array of {MediaType, Capabilities}. +// Let's say your capture card supports JPEG anywhere between 160x120 and +// 320x240, and also the size 640x480. Also, say it supports RGB24 at +// resolutions between 160x120 and 320x240 but only multiples of 8. You would +// expose these properties by offering a media type of 320 x 240 JPEG +// (if that is your default or preferred size) coupled with +// capabilities saying minimum 160x120 and maximum 320x240 with granularity of +// 1. The next pair you expose is a media type of 640x480 JPEG coupled with +// capabilities of min 640x480 max 640x480. The third pair is media type +// 320x240 RGB24 with capabilities min 160x120 max 320x240 granularity 8. +// In this way you can expose almost every quirk your card might have. +// An application interested in knowing what compression formats you provide +// can get all the pairs and make a list of all the unique sub types of the +// media types. +// +// If a filter's output pin is connected with a media type that has rcSource +// and rcTarget not empty, it means the filter is being asked to stretch the +// rcSource sub-rectangle of its InputSize (the format of the input pin for +// a compressor, and the largest bitmap a capture filter can generate with +// every pixel unique) into the rcTarget sub-rectangle of its output format. +// For instance, if a video compressor has as input 160x120 RGB, and as output +// 320x240 MPEG with an rcSource of (10,10,20,20) and rcTarget of (0,0,100,100) +// this means the compressor is being asked to take a 10x10 piece of the 160x120 +// RGB bitmap, and make it fill the top 100x100 area of a 320x240 bitmap, +// leaving the rest of the 320x240 bitmap untouched. +// A filter does not have to support this and can fail to connect with a +// media type where rcSource and rcTarget are not empty. +// +// Your output pin is connected to the next filter with a certain media +// type (either directly or using the media type passed by SetFormat), +// and you need to look at the AvgBytesPerSecond field of the format +// of that mediatype to see what data rate you are being asked to compress +// the video to, and use that data rate. Using the number of frames per +// second in AvgTimePerFrame, you can figure out how many bytes each frame +// is supposed to be. You can make it smaller, but NEVER EVER make a bigger +// data rate. For a video compressor, your input pin's media type tells you +// the frame rate (use that AvgTimePerFrame). For a capture filter, the +// output media type tells you, so use that AvgTimePerFrame. +// +// The cropping rectangle described below is the same as the rcSrc of the +// output pin's media type. +// +// The output rectangle described below is the same of the width and height +// of the BITMAPINFOHEADER of the media type of the output pin's media type + + +// AUDIO EXAMPLE +// +// This API can return an array of pairs of (media type, capabilities). +// This can be used to expose all kinds of wierd capabilities. Let's say you +// do any PCM frequency from 11,025 to 44,100 at 8 or 16 bit mono or +// stereo, and you also do 48,000 16bit stereo as a special combination. +// You would expose 3 pairs. The first pair would have Min Freq of 11025 and +// Max Freq of 44100, with MaxChannels=2 and MinBits=8 and MaxBits=8 for the +// capabilites structure, and a media type of anything you like, maybe +// 22kHz, 8bit stereo as a default. +// The 2nd pair would be the same except for MinBits=16 and MaxBits=16 in +// the capabilities structure and the media type could be something like +// 44kHz, 16bit stereo as a default (the media type in the pair should always +// be something legal as described by the capabilities structure... the +// structure tells you how you can change the media type to produce other +// legal media types... for instance changing 44kHz to 29010Hz would be legal, +// but changing bits from 16 to 14 would not be.) +// The 3rd pair would be MinFreq=48000 MaxFreq=48000 MaxChannels=2 +// MinBits=16 and MaxBits=16, and the media type would be 48kHz 16bit stereo. +// You can also use the Granularity elements of the structure (like the example +// for video) if you support values that multiples of n, eg. you could say +// minimum bits per sample 8, max 16, and granularity 8 to describe doing +// either 8 or 16 bit all in one structure +// +// If you support non-PCM formats, the media type returned in GetStreamCaps +// can show which non-PCM formats you support (with a default sample rate, +// bit rate and channels) and the capabilities structure going with that +// media type can describe which other sample rates, bit rates and channels +// you support. + +[ + object, + uuid(C6E13340-30AC-11d0-A18C-00A0C9118956), + pointer_default(unique) +] +interface IAMStreamConfig : IUnknown +{ + + // this is the structure returned by a VIDEO filter + // + typedef struct _VIDEO_STREAM_CONFIG_CAPS { + + GUID guid; // will be MEDIATYPE_Video + + // the logical or of all the AnalogVideoStandard's supported + // typically zero if not supported + ULONG VideoStandard; + + // the inherent size of the incoming signal... taken from the input + // pin for a compressor, or the largest size a capture filter can + // digitize the signal with every pixel still unique + SIZE InputSize; + + // The input of a compressor filter may have to be connected for these + // to be known + + // smallest rcSrc cropping rect allowed + SIZE MinCroppingSize; + // largest rcSrc cropping rect allowed + SIZE MaxCroppingSize; + // granularity of cropping size - eg only widths a multiple of 4 allowed + int CropGranularityX; + int CropGranularityY; + // alignment of cropping rect - eg rect must start on multiple of 4 + int CropAlignX; + int CropAlignY; + + // The input of a compressor filter may have to be connected for these + // to be known + + // smallest bitmap this pin can produce + SIZE MinOutputSize; + // largest bitmap this pin can produce + SIZE MaxOutputSize; + // granularity of output bitmap size + int OutputGranularityX; + int OutputGranularityY; + // !!! what about alignment of rcTarget inside BIH if different? + + // how well can you stretch in the x direction? 0==not at all + // 1=pixel doubling 2=interpolation(2 taps) 3=better interpolation + // etc. + int StretchTapsX; + int StretchTapsY; + // how well can you shrink in the x direction? 0==not at all + // 1=pixel doubling 2=interpolation(2 taps) 3=better interpolation + // etc. + int ShrinkTapsX; + int ShrinkTapsY; + + // CAPTURE filter only - what frame rates are allowed? + LONGLONG MinFrameInterval; + LONGLONG MaxFrameInterval; + + // what data rates can this pin produce? + LONG MinBitsPerSecond; + LONG MaxBitsPerSecond; + } VIDEO_STREAM_CONFIG_CAPS; + + + // this is the structure returned by an AUDIO filter + // + typedef struct _AUDIO_STREAM_CONFIG_CAPS { + + GUID guid; // will be MEDIATYPE_Audio + ULONG MinimumChannels; + ULONG MaximumChannels; + ULONG ChannelsGranularity; + ULONG MinimumBitsPerSample; + ULONG MaximumBitsPerSample; + ULONG BitsPerSampleGranularity; + ULONG MinimumSampleFrequency; + ULONG MaximumSampleFrequency; + ULONG SampleFrequencyGranularity; + } AUDIO_STREAM_CONFIG_CAPS; + + // - only allowed when pin is not streaming, else the call will FAIL + // - If your output pin is not yet connected, and you can + // connect your output pin with this media type, you should + // succeed the call, and start offering it first (enumerate as format#0) + // from GetMediaType so that this format will be used to connect with + // when you do connect to somebody + // - if your output pin is already connected, and you can provide this + // type, reconnect your pin. If the other pin can't accept it, FAIL + // this call and leave your connection alone. + HRESULT SetFormat( + [in] AM_MEDIA_TYPE *pmt); + + // the format it's connected with, or will connect with + // the application is responsible for calling DeleteMediaType(*ppmt); + HRESULT GetFormat( + [out] AM_MEDIA_TYPE **ppmt); + + // how many different Stream Caps structures are there? + // also, how big is the stream caps structure? + HRESULT GetNumberOfCapabilities( + [out] int *piCount, + [out] int *piSize); // pSCC of GetStreamCaps needs to be this big + + // - gets one of the pairs of {Mediatype, Caps} + // - return S_FALSE if iIndex is too high + // - the application is responsible for calling DeleteMediaType(*ppmt); + // - the first thing pSCC points to is a GUID saying MEDIATYPE_Video + // or MEDIATYPE_Audio, so you can tell if you have a pointer to a + // VIDEO_STREAM_CONFIG_CAPS or an AUDIO_STREAM_CONFIG_CAPS structure + // There could potentially be many more possibilities other than video + // or audio. + HRESULT GetStreamCaps( + [in] int iIndex, // 0 to #caps-1 + [out] AM_MEDIA_TYPE **ppmt, + [out] BYTE *pSCC); + +} + + + +// Interface to control interleaving of different streams in one file +[ +object, +uuid(BEE3D220-157B-11d0-BD23-00A0C911CE86), +pointer_default(unique) +] +interface IConfigInterleaving : IUnknown +{ + import "unknwn.idl"; + + typedef enum + { + // uninterleaved - samples written out in the order they + // arrive + INTERLEAVE_NONE, + + // approximate interleaving with less overhead for video + // capture + INTERLEAVE_CAPTURE, + + // full, precise interleaving. slower. + INTERLEAVE_FULL + + } InterleavingMode; + + HRESULT put_Mode( + [in] InterleavingMode mode + ); + + HRESULT get_Mode( + [out] InterleavingMode *pMode + ); + + HRESULT put_Interleaving( + [in] const REFERENCE_TIME *prtInterleave, + [in] const REFERENCE_TIME *prtPreroll + ); + + HRESULT get_Interleaving( + [out] REFERENCE_TIME *prtInterleave, + [out] REFERENCE_TIME *prtPreroll + ); +} + +// Interface to control the AVI mux +[ +object, +uuid(5ACD6AA0-F482-11ce-8B67-00AA00A3F1A6), +pointer_default(unique) +] +interface IConfigAviMux : IUnknown +{ + import "unknwn.idl"; + + // control whether the AVI mux adjusts the frame rate or audio + // sampling rate for drift when the file is closed. -1 to disables + // this behavior. + HRESULT SetMasterStream([in] LONG iStream); + HRESULT GetMasterStream([out] LONG *pStream); + + // control whether the AVI mux writes out an idx1 index chunk for + // compatibility with older AVI players. + HRESULT SetOutputCompatibilityIndex([in] BOOL fOldIndex); + HRESULT GetOutputCompatibilityIndex([out] BOOL *pfOldIndex); +} + + //--------------------------------------------------------------------- + // CompressionCaps enum + //--------------------------------------------------------------------- + + // This tells you which features of IAMVideoCompression are supported + + // CanCrunch means that it can compress video to a specified data rate + // If so, then the output pin's media type will contain that data rate + // in the format's AvgBytesPerSecond field, and that should be used. + + typedef enum + { + CompressionCaps_CanQuality = 0x01, + CompressionCaps_CanCrunch = 0x02, + CompressionCaps_CanKeyFrame = 0x04, + CompressionCaps_CanBFrame = 0x08, + CompressionCaps_CanWindow = 0x10 + } CompressionCaps; + + + + //--------------------------------------------------------------------- + // IAMVideoCompression interface + // + // Control compression parameters - pin interface + //--------------------------------------------------------------------- + + // This interface is implemented by the output pin of a video capture + // filter or video compressor that provides video data + + // You use this interface to control how video is compressed... how + // many keyframes, etc., and to find information like capabilities and + // the description of this compressor + + [ + object, + uuid(C6E13343-30AC-11d0-A18C-00A0C9118956), + pointer_default(unique) + ] + interface IAMVideoCompression : IUnknown + { + // - Only valid if GetInfo's pCapabilities sets + // CompressionCaps_CanKeyFrame + // - KeyFrameRate < 0 means use the compressor default + // - KeyFrames == 0 means only the first frame is a key + HRESULT put_KeyFrameRate ( + [in] long KeyFrameRate); + + HRESULT get_KeyFrameRate ( + [out] long * pKeyFrameRate); + + // - Only valid if GetInfo's pCapabilities sets + // CompressionCaps_CanBFrame + // - If keyframes are every 10, and there are 3 P Frames per key, + // they will be spaced evenly between the key frames and the other + // 6 frames will be B frames + // - PFramesPerKeyFrame < 0 means use the compressor default + HRESULT put_PFramesPerKeyFrame ( + [in] long PFramesPerKeyFrame); + + HRESULT get_PFramesPerKeyFrame ( + [out] long * pPFramesPerKeyFrame); + + // - Only valid if GetInfo's pCapabilities sets + // CompressionCaps_CanQuality + // - Controls image quality + // - If you are compressing to a fixed data rate, a high quality + // means try and use all of the data rate, and a low quality means + // feel free to use much lower than the data rate if you want to. + // - Quality < 0 means use the compressor default + HRESULT put_Quality ( + [in] double Quality); + + HRESULT get_Quality ( + [out] double * pQuality); + + // If you have set a data rate of 100K/sec on a 10fps movie, that + // will normally mean each frame must be <=10K. But a window size + // means every consecutive n frames must average to the data rate, + // but an individual frame (if n > 1) is allowed to exceed the + // frame size suggested by the data rate + HRESULT put_WindowSize ( + [in] DWORDLONG WindowSize); + + HRESULT get_WindowSize ( + [out] DWORDLONG * pWindowSize); + + // - pszVersion might be "Version 2.1.0" + // - pszDescription might be "Danny's awesome video compressor" + // - pcbVersion and pcbDescription will be filled in with the + // required length if they are too short + // - *pCapabilities is a logical OR of some CompressionCaps flags + HRESULT GetInfo( + [out, size_is(*pcbVersion)] WCHAR * pszVersion, + [in,out] int *pcbVersion, + [out, size_is(*pcbDescription)] LPWSTR pszDescription, + [in,out] int *pcbDescription, + [out] long *pDefaultKeyFrameRate, + [out] long *pDefaultPFramesPerKey, + [out] double *pDefaultQuality, + [out] long *pCapabilities //CompressionCaps + ); + + // - this means when this frame number comes along after the graph + // is running, make it a keyframe even if you weren't going to + HRESULT OverrideKeyFrame( + [in] long FrameNumber + ); + + // - Only valid if GetInfo's pCapabilities sets + // CompressionCaps_CanCrunch + // - this means when this frame number comes along after the graph + // is running, make it this many bytes big instead of whatever size + // you were going to make it. + HRESULT OverrideFrameSize( + [in] long FrameNumber, + [in] long Size + ); + + } + + //--------------------------------------------------------------------- + // VfwCaptureDialogs enum + //--------------------------------------------------------------------- + + typedef enum + { + VfwCaptureDialog_Source = 0x01, + VfwCaptureDialog_Format = 0x02, + VfwCaptureDialog_Display = 0x04 + } VfwCaptureDialogs; + + + //--------------------------------------------------------------------- + // VfwCompressDialogs enum + //--------------------------------------------------------------------- + + typedef enum + { + VfwCompressDialog_Config = 0x01, + VfwCompressDialog_About = 0x02, + // returns S_OK if the dialog exists and can be shown, else S_FALSE + VfwCompressDialog_QueryConfig = 0x04, + VfwCompressDialog_QueryAbout = 0x08 + } VfwCompressDialogs; + + + //--------------------------------------------------------------------- + // IAMVfwCaptureDialogs - filter interface + // + // Show a VfW capture driver dialog - SOURCE, FORMAT, or DISPLAY + //--------------------------------------------------------------------- + + // This interface is supported only by Microsoft's Video For Windows + // capture driver Capture Filter. It allows an application to bring up + // one of the 3 driver dialogs that VfW capture drivers have. + + [ + object, + local, + uuid(D8D715A0-6E5E-11D0-B3F0-00AA003761C5), + pointer_default(unique) + ] + interface IAMVfwCaptureDialogs : IUnknown + { + HRESULT HasDialog( + [in] int iDialog // VfwCaptureDialogs enum + ); + + HRESULT ShowDialog( + [in] int iDialog, // VfwCaptureDialogs enum + [in] HWND hwnd + ); + + HRESULT SendDriverMessage( + [in] int iDialog, // VfwCaptureDialogs enum + [in] int uMsg, + [in] long dw1, + [in] long dw2 + ); + + // - iDialog can be one of the VfwCaptureDialogs enums + // - HasDialog returns S_OK if it has the dialog, else S_FALSE + // - ShowDialog can only be called when not streaming or when another + // dialog is not already up + // - SendDriverMessage can send a secret message to the capture driver. + // USE IT AT YOUR OWN RISK! + } + + //--------------------------------------------------------------------- + // IAMVfwCompressDialogs - filter interface + // + // Show a VfW codec driver dialog - CONFIG or ABOUT + //--------------------------------------------------------------------- + + // This interface is supported only by Microsoft's ICM Compressor filter + // (Co). It allows an application to bring up either the Configure or + // About dialogs for the ICM codec that it is currently using. + + [ + object, + local, + uuid(D8D715A3-6E5E-11D0-B3F0-00AA003761C5), + pointer_default(unique) + ] + interface IAMVfwCompressDialogs : IUnknown + { + + // Bring up a dialog for this codec + HRESULT ShowDialog( + [in] int iDialog, // VfwCompressDialogs enum + [in] HWND hwnd + ); + + // Calls ICGetState and gives you the result + HRESULT GetState( + [out, size_is(*pcbState)] LPVOID pState, + [in, out] int *pcbState + ); + + // Calls ICSetState + HRESULT SetState( + [in, size_is(cbState)] LPVOID pState, + [in] int cbState + ); + + // Send a codec specific message + HRESULT SendDriverMessage( + [in] int uMsg, + [in] long dw1, + [in] long dw2 + ); + + // - iDialog can be one of the VfwCaptureDialogs enums + // - ShowDialog can only be called when not streaming or when no other + // dialog is up already + // - an application can call GetState after ShowDialog(CONFIG) to + // see how the compressor was configured and next time the graph + // is used, it can call SetState with the data it saved to return + // the codec to the state configured by the dialog box from last time + // - GetState with a NULL pointer returns the size needed + // - SendDriverMessage can send a secret message to the codec. + // USE IT AT YOUR OWN RISK! + } + + + //--------------------------------------------------------------------- + // IAMDroppedFrames interface + // + // Report status of capture - pin interface + //--------------------------------------------------------------------- + + // A capture filter's video output pin supports this. It reports + // how many frames were not sent (dropped), etc. + + // Every time your filter goes from STOPPED-->PAUSED, you reset all your + // counts to zero. + + // An app may call this all the time while you are capturing to see how + // capturing is going. MAKE SURE you always return as current information + // as possible while you are running. + + // When your capture filter starts running, it starts by sending frame 0, + // then 1, 2, 3, etc. The time stamp of each frame sent should correspond + // to the graph clock's time when the image was digitized. The end time + // is the start time plus the duration of the video frame. + // You should also set the MediaTime of each sample (SetMediaTime) as well. + // This should be the frame number ie (0,1) (1,2) (2,3). + // If a frame is dropped, a downstream filter will be able to tell easily + // not by looking for gaps in the regular time stamps, but by noticing a + // frame number is missing (eg. (1,2) (2,3) (4,5) (5,6) means frame 3 + // was dropped. + + // Using the info provided by this interface, an application can figure out + // the number of frames dropped, the frame rate achieved (the length of + // time the graph was running divided by the number of frames not dropped), + // and the data rate acheived (the length of time the graph was running + // divided by the average frame size). + + // If your filter is running, then paused, and then run again, you need + // to continue to deliver frames as if it was never paused. The first + // frame after the second RUN cannot be time stamped earlier than the last + // frame sent before the pause. + + // Your filter must always increment the MediaTime of each sample sent. + // Never send the same frame # twice, and never go back in time. The + // regular time stamp of a sample can also never go back in time. + + [ + object, + uuid(C6E13344-30AC-11d0-A18C-00A0C9118956), + pointer_default(unique) + ] + interface IAMDroppedFrames : IUnknown + { + // Get the number of dropped frames + HRESULT GetNumDropped( + [out] long * plDropped + + ); + + //Get the number of non-dropped frames + HRESULT GetNumNotDropped( + [out] long * plNotDropped + + ); + + // - plArray points to an array of lSize longs. The filter will + // fill it with the frame number of the first lSize frames dropped. + // A filter may not have bothered to remember as many as you asked + // for, so it will set *plNumCopied to the number of frames it filled + // in. + HRESULT GetDroppedInfo( + [in] long lSize, + [out] long * plArray, + [out] long * plNumCopied + ); + + // - This is the average size of the frames it didn't drop (in bytes) + HRESULT GetAverageFrameSize( + [out] long * plAverageSize + + ); + + } + + + + cpp_quote("#define AMF_AUTOMATICGAIN -1.0") + + //--------------------------------------------------------------------- + // IAMAudioInputMixer interface + // + // Sets the recording levels, pan and EQ for the audio card inputs + //--------------------------------------------------------------------- + + // This interface is implemented by each input pin of an audio capture + // filter, to tell it what level, panning, and EQ to use for each input. + // The name of each pin will reflect the type of input, eg. "Line input 1" + // or "Mic". An application uses the pin names to decide how it wants to + // set the recording levels + + // This interface can also be supported by the audio capture filter itself + // to control to overall record level and panning after the mix + + [ + object, + uuid(54C39221-8380-11d0-B3F0-00AA003761C5), + pointer_default(unique) + ] + interface IAMAudioInputMixer : IUnknown + { + // This interface is only supported by the input pins, not the filter + // If disabled, this channel will not be mixed in as part of the + // recorded signal. + HRESULT put_Enable ( + [in] BOOL fEnable); // TRUE=enable FALSE=disable + + //Is this channel enabled? + HRESULT get_Enable ( + [out] BOOL *pfEnable); + + // When set to mono mode, making a stereo recording of this channel + // will have both channels contain the same data... a mixture of the + // left and right signals + HRESULT put_Mono ( + [in] BOOL fMono); // TRUE=mono FALSE=multi channel + + //all channels combined into a mono signal? + HRESULT get_Mono ( + [out] BOOL *pfMono); + + // !!! WILL CARDS BE ABLE TO BOOST THE GAIN? + //Set the record level for this channel + HRESULT put_MixLevel ( + [in] double Level); // 0 = off, 1 = full (unity?) volume + // AMF_AUTOMATICGAIN, if supported, + // means automatic + + //Get the record level for this channel + HRESULT get_MixLevel ( + [out] double *pLevel); + + // For instance, when panned full left, and you make a stereo recording + // of this channel, you will record a silent right channel. + HRESULT put_Pan ( + [in] double Pan); // -1 = full left, 0 = centre, 1 = right + + //Get the pan for this channel + HRESULT get_Pan ( + [out] double *pPan); + + // Boosts the bass of low volume signals before they are recorded + // to compensate for the fact that your ear has trouble hearing quiet + // bass sounds + HRESULT put_Loudness ( + [in] BOOL fLoudness);// TRUE=on FALSE=off + + HRESULT get_Loudness ( + [out] BOOL *pfLoudness); + + // boosts or cuts the treble of the signal before it's recorded by + // a certain amount of dB + HRESULT put_Treble ( + [in] double Treble); // gain in dB (-ve = attenuate) + + //Get the treble EQ for this channel + HRESULT get_Treble ( + [out] double *pTreble); + + // This is the maximum value allowed in put_Treble. ie 6.0 means + // any value between -6.0 and 6.0 is allowed + HRESULT get_TrebleRange ( + [out] double *pRange); // largest value allowed + + // boosts or cuts the bass of the signal before it's recorded by + // a certain amount of dB + HRESULT put_Bass ( + [in] double Bass); // gain in dB (-ve = attenuate) + + // Get the bass EQ for this channel + HRESULT get_Bass ( + [out] double *pBass); + + // This is the maximum value allowed in put_Bass. ie 6.0 means + // any value between -6.0 and 6.0 is allowed + HRESULT get_BassRange ( + [out] double *pRange); // largest value allowed + + } + + + //--------------------------------------------------------------------- + // IAMBufferNegotiation interface + // + // Tells a pin what kinds of buffers to use when connected + //--------------------------------------------------------------------- + + // This interface can be implemented by any pin that will connect to + // another pin using IMemInputPin. All capture filters should support + // this interface. + + // SuggestAllocatorProperties is a way for an application to get + // in on the buffer negotiation process for a pin. This pin will use + // the numbers given to it by the application as its request to the + // allocator. An application can use a negative number for any element + // in the ALLOCATOR_PROPERTIES to mean "don't care". An application must + // call this function before the pin is connected, or it will be too late + // To ensure that an application gets what it wants, it would be wise to + // call this method on both pins being connected together, so the other + // pin doesn't overrule the application's request. + + // GetAllocatorProperties can only be called after a pin is connected and + // it returns the properties of the current allocator being used + + [ + object, + uuid(56ED71A0-AF5F-11D0-B3F0-00AA003761C5), + pointer_default(unique) + ] + interface IAMBufferNegotiation : IUnknown + { + HRESULT SuggestAllocatorProperties ( + [in] const ALLOCATOR_PROPERTIES *pprop); + + HRESULT GetAllocatorProperties ( + [out] ALLOCATOR_PROPERTIES *pprop); + + } + + + //--------------------------------------------------------------------- + // AnalogVideoStandard enum + //--------------------------------------------------------------------- + + typedef enum tagAnalogVideoStandard + { + AnalogVideo_None = 0x00000000, // This is a digital sensor + AnalogVideo_NTSC_M = 0x00000001, // 75 IRE Setup + AnalogVideo_NTSC_M_J = 0x00000002, // Japan, 0 IRE Setup + AnalogVideo_NTSC_433 = 0x00000004, + + AnalogVideo_PAL_B = 0x00000010, + AnalogVideo_PAL_D = 0x00000020, + AnalogVideo_PAL_G = 0x00000040, + AnalogVideo_PAL_H = 0x00000080, + AnalogVideo_PAL_I = 0x00000100, + AnalogVideo_PAL_M = 0x00000200, + AnalogVideo_PAL_N = 0x00000400, + + AnalogVideo_PAL_60 = 0x00000800, + + AnalogVideo_SECAM_B = 0x00001000, + AnalogVideo_SECAM_D = 0x00002000, + AnalogVideo_SECAM_G = 0x00004000, + AnalogVideo_SECAM_H = 0x00008000, + AnalogVideo_SECAM_K = 0x00010000, + AnalogVideo_SECAM_K1 = 0x00020000, + AnalogVideo_SECAM_L = 0x00040000, + AnalogVideo_SECAM_L1 = 0x00080000, + + AnalogVideo_PAL_N_COMBO // Argentina + = 0x00100000 + } AnalogVideoStandard; + + cpp_quote("#define AnalogVideo_NTSC_Mask 0x00000007") + cpp_quote("#define AnalogVideo_PAL_Mask 0x00100FF0") + cpp_quote("#define AnalogVideo_SECAM_Mask 0x000FF000") + + + //--------------------------------------------------------------------- + // TunerInputType enum + //--------------------------------------------------------------------- + + typedef enum tagTunerInputType + { + TunerInputCable, + TunerInputAntenna + } TunerInputType; + + //--------------------------------------------------------------------- + // VideoCopyProtectionType enum + //--------------------------------------------------------------------- + + typedef enum + { + VideoCopyProtectionMacrovisionBasic, + VideoCopyProtectionMacrovisionCBI + } VideoCopyProtectionType; + + //--------------------------------------------------------------------- + // PhysicalConnectorType enum + //--------------------------------------------------------------------- + + typedef enum tagPhysicalConnectorType + { + PhysConn_Video_Tuner = 1, + PhysConn_Video_Composite, + PhysConn_Video_SVideo, + PhysConn_Video_RGB, + PhysConn_Video_YRYBY, + PhysConn_Video_SerialDigital, + PhysConn_Video_ParallelDigital, + PhysConn_Video_SCSI, + PhysConn_Video_AUX, + PhysConn_Video_1394, + PhysConn_Video_USB, + PhysConn_Video_VideoDecoder, + PhysConn_Video_VideoEncoder, + PhysConn_Video_SCART, + PhysConn_Video_Black, + + + PhysConn_Audio_Tuner = 0x1000, + PhysConn_Audio_Line, + PhysConn_Audio_Mic, + PhysConn_Audio_AESDigital, + PhysConn_Audio_SPDIFDigital, + PhysConn_Audio_SCSI, + PhysConn_Audio_AUX, + PhysConn_Audio_1394, + PhysConn_Audio_USB, + PhysConn_Audio_AudioDecoder, + } PhysicalConnectorType; + + + + + //--------------------------------------------------------------------- + // IAMAnalogVideoDecoder interface + //--------------------------------------------------------------------- + + [ + object, + uuid(C6E13350-30AC-11d0-A18C-00A0C9118956), + pointer_default(unique) + ] + interface IAMAnalogVideoDecoder : IUnknown + { + + //Gets the supported analog video standards (NTSC/M, PAL/B, SECAM/K1... + HRESULT get_AvailableTVFormats( + [out] long *lAnalogVideoStandard + ); + + //Sets or gets the current analog video standard (NTSC/M, PAL/B, SECAM/K1, ... + HRESULT put_TVFormat( + [in] long lAnalogVideoStandard + ); + + // Sets or gets the current analog video standard (NTSC/M, PAL/B, SECAM/K1, ... + HRESULT get_TVFormat( + [out] long * plAnalogVideoStandard + ); + + // True if horizontal sync is locked + HRESULT get_HorizontalLocked ( + [out] long * plLocked); + + // True if connected to a VCR (changes PLL timing) + HRESULT put_VCRHorizontalLocking ( + [in] long lVCRHorizontalLocking); + + HRESULT get_VCRHorizontalLocking ( + [out] long * plVCRHorizontalLocking); + + // Returns the number of lines in the video signal")] + HRESULT get_NumberOfLines ( + [out] long *plNumberOfLines); + + // Enables or disables the output bus + HRESULT put_OutputEnable ( + [in] long lOutputEnable); + + HRESULT get_OutputEnable ( + [out] long *plOutputEnable); + + } + + + //--------------------------------------------------------------------- + // VideoProcAmp Property enum + //--------------------------------------------------------------------- + + typedef enum tagVideoProcAmpProperty + { + VideoProcAmp_Brightness, + VideoProcAmp_Contrast, + VideoProcAmp_Hue, + VideoProcAmp_Saturation, + VideoProcAmp_Sharpness, + VideoProcAmp_Gamma, + VideoProcAmp_ColorEnable, + VideoProcAmp_WhiteBalance, + VideoProcAmp_BacklightCompensation, + VideoProcAmp_Gain + } VideoProcAmpProperty; + + //--------------------------------------------------------------------- + // VideoProcAmp Flags enum + //--------------------------------------------------------------------- + + typedef enum tagVideoProcAmpFlags + { + VideoProcAmp_Flags_Auto = 0x0001, + VideoProcAmp_Flags_Manual = 0x0002 + } VideoProcAmpFlags; + + //--------------------------------------------------------------------- + // IAMVideoProcAmp interface + // + // Adjusts video quality in either the analog or digital domain. + // + //--------------------------------------------------------------------- + + [ + object, + uuid(C6E13360-30AC-11d0-A18C-00A0C9118956), + pointer_default(unique) + ] + interface IAMVideoProcAmp : IUnknown + { + // Returns min, max, step size, and default values + HRESULT GetRange( + [in] long Property, // Which property to query + [out] long * pMin, // Range minimum + [out] long * pMax, // Range maxumum + [out] long * pSteppingDelta,// Step size + [out] long * pDefault, // Default value + [out] long * pCapsFlags // VideoProcAmpFlags + + ); + + // Set a VideoProcAmp property + HRESULT Set( + [in] long Property, // VideoProcAmpProperty + [in] long lValue, // Value to set + [in] long Flags // VideoProcAmp_Flags_* + + ); + + // Get a VideoProcAmp property + HRESULT Get( + [in] long Property, // VideoProcAmpProperty + [out] long * lValue, // Current value + [out] long * Flags // VideoProcAmp_Flags_* + ); + } + + + //--------------------------------------------------------------------- + // CameraControl Property enum + //--------------------------------------------------------------------- + + typedef enum tagCameraControlProperty + { + CameraControl_Pan, + CameraControl_Tilt, + CameraControl_Roll, + CameraControl_Zoom, + CameraControl_Exposure, + CameraControl_Iris, + CameraControl_Focus + } CameraControlProperty; + + //--------------------------------------------------------------------- + // CameraControl Flags enum + //--------------------------------------------------------------------- + + typedef enum tagCameraControlFlags + { + CameraControl_Flags_Auto = 0x0001, + CameraControl_Flags_Manual = 0x0002 + } CameraControlFlags; + + //--------------------------------------------------------------------- + // IAMCameraControl interface + // + // Control of local or remote cameras + //--------------------------------------------------------------------- + + [ + object, + uuid(C6E13370-30AC-11d0-A18C-00A0C9118956), + pointer_default(unique) + ] + interface IAMCameraControl : IUnknown + { + // Returns min, max, step size, and default values + HRESULT GetRange( + [in] long Property, // Which property to query + [out] long * pMin, // Range minimum + [out] long * pMax, // Range maxumum + [out] long * pSteppingDelta,// Step size + [out] long * pDefault, // Default value + [out] long * pCapsFlags // CamaeraControlFlags + + ); + + // Set a CameraControl property + HRESULT Set( + [in] long Property, // CameraControlProperty + [in] long lValue, // Value to set + [in] long Flags // CameraControl_Flags_* + + ); + + // Get a CameraControl property + HRESULT Get( + [in] long Property, // CameraControlProperty + [out] long * lValue, // Current value + [out] long * Flags // CameraControl_Flags_* + ); + } + + //--------------------------------------------------------------------- + // VideoControl Flags enum + //--------------------------------------------------------------------- + + typedef enum tagVideoControlFlags + { + VideoControlFlag_FlipHorizontal = 0x0001, + VideoControlFlag_FlipVertical = 0x0002, + VideoControlFlag_ExternalTriggerEnable = 0x0004, + VideoControlFlag_Trigger = 0x0008 + + } VideoControlFlags; + + //--------------------------------------------------------------------- + // IAMVideoControl interface + // + // Control of horizontal & vertical flip, external trigger, + // and listing available frame rates + //--------------------------------------------------------------------- + + [ + object, + uuid(6a2e0670-28e4-11d0-a18c-00a0c9118956), + pointer_default(unique) + ] + interface IAMVideoControl : IUnknown + { + // What can the underlying hardware do? + HRESULT GetCaps( + [in] IPin * pPin, // the pin to query or control + [out] long * pCapsFlags // VideoControlFlag_* + + ); + + // Set the mode of operation + HRESULT SetMode( + [in] IPin * pPin, // the pin to query or control + [in] long Mode // VideoControlFlag_* + + ); + + // Get the mode of operation + HRESULT GetMode( + [in] IPin * pPin, // the pin to query or control + [out] long * Mode // VideoControlFlag_* + ); + + // Get actual frame rate info for USB and 1394 + // This is only available when streaming + HRESULT GetCurrentActualFrameRate( + [in] IPin * pPin, // the pin to query or control + [out] LONGLONG * ActualFrameRate // 100 nS units + ); + + // Get max available frame rate info for USB and 1394 + // Returns the max frame rate currently available based on bus bandwidth usage + HRESULT GetMaxAvailableFrameRate( + [in] IPin * pPin, // the pin to query or control + [in] long iIndex, // 0 to IAMStreamConfig->GetNumberOfCapabilities-1 + [in] SIZE Dimensions, // width and height + [out] LONGLONG * MaxAvailableFrameRate // 100 nS units + ); + + // Get List of available frame rates + HRESULT GetFrameRateList( + [in] IPin * pPin, // the pin to query or control + [in] long iIndex, // 0 to IAMStreamConfig->GetNumberOfCapabilities-1 + [in] SIZE Dimensions, // width and height + [out] long * ListSize, // Number of elements in the list + [out] LONGLONG ** FrameRates // Array of framerates in 100 nS units + // or NULL to just get ListSize + ); + + } + + + //--------------------------------------------------------------------- + // IAMCrossbar interface + // + // Controls a routing matrix for analog or digital video or audio + //--------------------------------------------------------------------- + + [ + object, + uuid(C6E13380-30AC-11d0-A18C-00A0C9118956), + pointer_default(unique) + ] + interface IAMCrossbar : IUnknown + { + + // How many pins are there? + HRESULT get_PinCounts( + [out] long * OutputPinCount, // count of output pins + [out] long * InputPinCount); // count of input pins + + // True if routing is possible + HRESULT CanRoute ( + [in] long OutputPinIndex, // the output pin + [in] long InputPinIndex); // the input pin + + // Routes an input pin to an output pin + HRESULT Route ( + [in] long OutputPinIndex, // the output pin + [in] long InputPinIndex); // the input pin + + // Returns the input pin connected to a given output pin + HRESULT get_IsRoutedTo ( + [in] long OutputPinIndex, // the output pin + [out] long * InputPinIndex); // the connected input pin + + // Returns a pin which is related to a given pin + // (ie. this audio pin is related to a video pin) + HRESULT get_CrossbarPinInfo ( + [in] BOOL IsInputPin, // TRUE for input pins + [in] long PinIndex, // a pin + [out] long * PinIndexRelated, // Index of related pin + [out] long * PhysicalType); // Physical type of pin + + } + + + //--------------------------------------------------------------------- + // IAMTuner interface + // + // base tuner device + //--------------------------------------------------------------------- + + // predefined subchannel values + typedef enum tagAMTunerSubChannel + { + AMTUNER_SUBCHAN_NO_TUNE = -2, // don't tune + AMTUNER_SUBCHAN_DEFAULT = -1 // use default sub chan + } AMTunerSubChannel; + + // predefined signal strength values + typedef enum tagAMTunerSignalStrength + { + AMTUNER_HASNOSIGNALSTRENGTH = -1, // cannot indicate signal strength + AMTUNER_NOSIGNAL = 0, // no signal available + AMTUNER_SIGNALPRESENT = 1 // signal present + } AMTunerSignalStrength; + + // specifies the mode of operation of the tuner + typedef enum tagAMTunerModeType + { + AMTUNER_MODE_DEFAULT = 0x0000, // default tuner mode + AMTUNER_MODE_TV = 0x0001, // tv + AMTUNER_MODE_FM_RADIO = 0x0002, // fm radio + AMTUNER_MODE_AM_RADIO = 0x0004, // am radio + AMTUNER_MODE_DSS = 0x0008, // dss + } AMTunerModeType; + + // Events reported by IAMTunerNotification + typedef enum tagAMTunerEventType{ + AMTUNER_EVENT_CHANGED = 0x0001, // status changed + } AMTunerEventType; + + interface IAMTunerNotification; + + [ + object, + uuid(211A8761-03AC-11d1-8D13-00AA00BD8339), + pointer_default(unique) + ] + interface IAMTuner : IUnknown + { + // Sets and gets the Channel + HRESULT put_Channel( + [in] long lChannel, + [in] long lVideoSubChannel, + [in] long lAudioSubChannel + ); + HRESULT get_Channel( + [out] long *plChannel, + [out] long *plVideoSubChannel, + [out] long *plAudioSubChannel + ); + + // Gets the minimum and maximum channel available + HRESULT ChannelMinMax( + [out] long *lChannelMin, + [out] long *lChannelMax + ); + + // CountryCode is the same as the international + // long distance telephone dialing prefix + + HRESULT put_CountryCode( + [in] long lCountryCode + ); + HRESULT get_CountryCode( + [out] long *plCountryCode + ); + + HRESULT put_TuningSpace( + [in] long lTuningSpace + ); + HRESULT get_TuningSpace( + [out] long *plTuningSpace + ); + + [local] HRESULT Logon( + [in] HANDLE hCurrentUser + ); + HRESULT Logout(); + + // Signal status for current channel + // signal strength == TUNER_NOSIGNAL, or strength value + HRESULT SignalPresent( + [out] long * plSignalStrength // AMTunerSignalStrength + ); + + // allow multifunction tuner to be switch between modes + HRESULT put_Mode( + [in] AMTunerModeType lMode // AMTunerModeType + ); + HRESULT get_Mode( + [out] AMTunerModeType *plMode // AMTunerModeType + ); + + // retrieve a bitmask of the possible modes + HRESULT GetAvailableModes( + [out] long *plModes // AMTunerModeType + ); + + // allow IAMTuner clients to receive event notification + HRESULT RegisterNotificationCallBack( + [in] IAMTunerNotification *pNotify, + [in] long lEvents // bitmask from AMTunerEventType enumeration + ); + HRESULT UnRegisterNotificationCallBack( + [in] IAMTunerNotification *pNotify + ); + } + + //--------------------------------------------------------------------- + // IAMTunerNotification interface + // + // Provided to IAMTuner if notification callbacks are desired + //--------------------------------------------------------------------- + + [ + object, + uuid(211A8760-03AC-11d1-8D13-00AA00BD8339), + pointer_default(unique) + ] + interface IAMTunerNotification : IUnknown + { + HRESULT OnEvent([in] AMTunerEventType Event); + } + + + //--------------------------------------------------------------------- + // IAMTVTuner interface + // + // Controls an analog TV tuner device + //--------------------------------------------------------------------- + + [ + object, + uuid(211A8766-03AC-11d1-8D13-00AA00BD8339), + pointer_default(unique) + ] + interface IAMTVTuner : IAMTuner + { + // Gets the supported analog video standards (NTSC/M, PAL/B, SECAM/K1, ... + HRESULT get_AvailableTVFormats( + [out] long *lAnalogVideoStandard + ); + + // Gets the current analog video standard (NTSC/M, PAL/B, SECAM/K1, ...) + HRESULT get_TVFormat( + [out] long * plAnalogVideoStandard + ); + + // Scans for a signal on a given channel + // NOTE: this is equivalent to put_Channel(), SignalStrength() + HRESULT AutoTune( + [in] long lChannel, + [out] long * plFoundSignal + ); + + // Saves the fine tuning information for all channels")] + HRESULT StoreAutoTune(); + + // The number of TV sources plugged into the tuner + HRESULT get_NumInputConnections( + [out] long * plNumInputConnections + ); + + // Sets or gets the tuner input type (Cable or Antenna) + HRESULT put_InputType( + [in] long lIndex, + [in] TunerInputType InputType + ); + HRESULT get_InputType( + [in] long lIndex, + [out] TunerInputType * pInputType + ); + + // Sets or gets the tuner input + HRESULT put_ConnectInput( + [in] long lIndex + ); + HRESULT get_ConnectInput( + [out] long *plIndex + ); + + // Gets the video and audio carrier frequencies + HRESULT get_VideoFrequency( + [out] long *lFreq + ); + HRESULT get_AudioFrequency( + [out] long *lFreq + ); + } + + + //--------------------------------------------------------------------- + // IBPCSatelliteTuner interface + // + // An interface supporting Satellite tuning-related functions + //--------------------------------------------------------------------- + [ + object, + local, + uuid(211A8765-03AC-11d1-8D13-00AA00BD8339), + pointer_default(unique) + ] + interface IBPCSatelliteTuner : IAMTuner + { + HRESULT get_DefaultSubChannelTypes( + [out] long *plDefaultVideoType, // Provider-specific service type + [out] long *plDefaultAudioType // Provider-specific service type + ); + + HRESULT put_DefaultSubChannelTypes( + [in] long lDefaultVideoType, // Provider-specific service type + [in] long lDefaultAudioType // Provider-specific service type + ); + + HRESULT IsTapingPermitted(); // S_OK yes, S_FALSE no + } + + + + //--------------------------------------------------------------------- + // IAMTVAudio interface + // + // TV Audio control + //--------------------------------------------------------------------- + + typedef enum tagTVAudioMode + { + AMTVAUDIO_MODE_MONO = 0x0001, // Mono + AMTVAUDIO_MODE_STEREO = 0x0002, // Stereo + AMTVAUDIO_MODE_LANG_A = 0x0010, // Primary language + AMTVAUDIO_MODE_LANG_B = 0x0020, // 2nd avail language + AMTVAUDIO_MODE_LANG_C = 0x0040, // 3rd avail language + } TVAudioMode; + + // Events reported by IAMTVAudioNotification + typedef enum tagAMTVAudioEventType + { + AMTVAUDIO_EVENT_CHANGED = 0x0001, // mode changed + } AMTVAudioEventType; + + interface IAMTVAudioNotification; + + [ + object, + local, + uuid(83EC1C30-23D1-11d1-99E6-00A0C9560266), + pointer_default(unique) + ] + interface IAMTVAudio : IUnknown + { + // retrieve a bitmask of the formats available in the hardware + HRESULT GetHardwareSupportedTVAudioModes( + [out] long *plModes // TVAudioMode + ); + + // retrieve a bitmask of the possible modes + HRESULT GetAvailableTVAudioModes( + [out] long *plModes // TVAudioMode + ); + + HRESULT get_TVAudioMode( + [out] long *plMode // TVAudioMode + ); + HRESULT put_TVAudioMode( + [in] long lMode // TVAudioMode + ); + + // allow IAMTVAudio clients to receive event notification + HRESULT RegisterNotificationCallBack( + [in] IAMTunerNotification *pNotify, + [in] long lEvents // bitmask from AMTVAudioEventType enumeration + ); + HRESULT UnRegisterNotificationCallBack( + IAMTunerNotification *pNotify + ); + } + + //--------------------------------------------------------------------- + // IAMTVAudioNotification interface + // + // Provided to IAMTVAudio clients if notification callbacks are desired + //--------------------------------------------------------------------- + + [ + object, + local, + uuid(83EC1C33-23D1-11d1-99E6-00A0C9560266), + pointer_default(unique) + ] + interface IAMTVAudioNotification : IUnknown + { + HRESULT OnEvent([in] AMTVAudioEventType Event); + } + + + + + //--------------------------------------------------------------------- + // IAMAnalogVideoEncoder interface + //--------------------------------------------------------------------- + + [ + object, + uuid(C6E133B0-30AC-11d0-A18C-00A0C9118956), + pointer_default(unique) + ] + interface IAMAnalogVideoEncoder : IUnknown + { + // Gets the supported analog video standards (NTSC/M, PAL/B, SECAM/K1, ...) + HRESULT get_AvailableTVFormats( + [out] long *lAnalogVideoStandard + ); + + // Sets or gets the current analog video standard (NTSC/M, PAL/B, SECAM/K1, ...) + HRESULT put_TVFormat( + [in] long lAnalogVideoStandard + ); + + HRESULT get_TVFormat( + [out] long * plAnalogVideoStandard + ); + + // Sets or gets the copy protection + HRESULT put_CopyProtection ( + [in] long lVideoCopyProtection); // VideoCopyProtectionType + + HRESULT get_CopyProtection ( + [out] long *lVideoCopyProtection); // VideoCopyProtectionType + + + // Enables and disables close captioning + HRESULT put_CCEnable ( + [in] long lCCEnable); + + HRESULT get_CCEnable ( + [out] long *lCCEnable); + + } + + // used by IKsPropertySet set AMPROPSETID_Pin + typedef enum { + AMPROPERTY_PIN_CATEGORY, + AMPROPERTY_PIN_MEDIUM + } AMPROPERTY_PIN; + + //--------------------------------------------------------------------- + // IKsPropertySet interface + // + // Sets or gets a property identified by a property set GUID and a + // property ID. + // + // Return codes for all 3 methods: + // E_PROP_SET_UNSUPPORTED the property set is not supported + // E_PROP_ID_UNSUPPORTED the property ID is not supported + // for the specified property set + //--------------------------------------------------------------------- + +cpp_quote("#ifndef _IKsPropertySet_") +cpp_quote("#define _IKsPropertySet_") + + //--------------------------------------------------------------------- + // #defines for IKsPropertySet::QuerySupported return result in pTypeSupport + //--------------------------------------------------------------------- + +cpp_quote("#define KSPROPERTY_SUPPORT_GET 1") +cpp_quote("#define KSPROPERTY_SUPPORT_SET 2") + + + [ + object, + uuid(31EFAC30-515C-11d0-A9AA-00AA0061BE93), + pointer_default(unique) + ] + interface IKsPropertySet : IUnknown + { + [local] HRESULT Set( + [in] REFGUID guidPropSet, + [in] DWORD dwPropID, + [in, size_is(cbInstanceData)] LPVOID pInstanceData, + [in] DWORD cbInstanceData, + [in, size_is(cbPropData)] LPVOID pPropData, + [in] DWORD cbPropData); + + [call_as(Set)] HRESULT RemoteSet( + [in] REFGUID guidPropSet, + [in] DWORD dwPropID, + [in, size_is(cbInstanceData)] byte * pInstanceData, + [in] DWORD cbInstanceData, + [in, size_is(cbPropData)] byte * pPropData, + [in] DWORD cbPropData); + + // To get a property, the caller allocates a buffer which the called + // function fills in. To determine necessary buffer size, call Get with + // pPropData=NULL and cbPropData=0. + [local] HRESULT Get( + [in] REFGUID guidPropSet, + [in] DWORD dwPropID, + [in, size_is(cbInstanceData)] LPVOID pInstanceData, + [in] DWORD cbInstanceData, + [out, size_is(cbPropData)] LPVOID pPropData, + [in] DWORD cbPropData, + [out] DWORD * pcbReturned); + + [call_as(Get)] HRESULT RemoteGet( + [in] REFGUID guidPropSet, + [in] DWORD dwPropID, + [in, size_is(cbInstanceData)] byte * pInstanceData, + [in] DWORD cbInstanceData, + [out, size_is(cbPropData)] byte * pPropData, + [in] DWORD cbPropData, + [out] DWORD * pcbReturned); + // QuerySupported must either return E_NOTIMPL or correctly indicate + // if getting or setting the property set and property is supported. + // S_OK indicates the property set and property ID combination is + HRESULT QuerySupported( + [in] REFGUID guidPropSet, + [in] DWORD dwPropID, + [out] DWORD *pTypeSupport); + } +cpp_quote("#endif // _IKsPropertySet_") + +[ +object, +uuid(6025A880-C0D5-11d0-BD4E-00A0C911CE86), +pointer_default(unique) +] +interface IMediaPropertyBag : IPropertyBag +{ + import "ocidl.idl"; + + typedef IMediaPropertyBag *LPMEDIAPROPERTYBAG; + + // return the i'th element in the property bag + HRESULT EnumProperty( + [in] ULONG iProperty, + [in, out] VARIANT * pvarPropertyName, + [in, out] VARIANT * pvarPropertyValue + ); + +} + + +[ +object, +uuid(5738E040-B67F-11d0-BD4D-00A0C911CE86), +pointer_default(unique) +] +interface IPersistMediaPropertyBag : IPersist +{ + import "ocidl.idl"; + import "unknwn.idl"; + + HRESULT InitNew( + void + ); + + HRESULT Load( + [in] IMediaPropertyBag * pPropBag, + [in] IErrorLog * pErrorLog + ); + + HRESULT Save( + [in] IMediaPropertyBag * pPropBag, + [in] BOOL fClearDirty, + [in] BOOL fSaveAllProperties + ); + + + typedef IPersistMediaPropertyBag * LPPERSISTMEDIAPROPERTYBAG; +} + + + //--------------------------------------------------------------------- + // + // Defines IAMPhysicalPinInfo Interface + // + // Returns an enum and string that describes an input pin's physical type. + // + // Implement if: you have physical input pins such as video or audio (like + // on a video capture card or a VCR) + // + // Use if: you want to communicate to a user available physical input pins + // and allow them to select the active one if there is more than one + //--------------------------------------------------------------------- + + +[ + object, + uuid(F938C991-3029-11cf-8C44-00AA006B6814), + pointer_default(unique) + ] +interface IAMPhysicalPinInfo : IUnknown { + + // Returns VFW_E_NO_ACCEPTABLE_TYPES if not a physical pin + HRESULT GetPhysicalType( + [out] long *pType, // the enum representing the Physical Type + [out] LPOLESTR *ppszType // a friendly name + ); +} +typedef IAMPhysicalPinInfo *PAMPHYSICALPININFO; + + //--------------------------------------------------------------------- + // Defines IAMExtDevice Interface + // + // Base interface for external professional devices + // + // Implement if: the filter controls an external device such as a VCR, + // timecode reader/generator, etc. The intent is to build a object from + // this implementation plus another that specifically describes the device, + // such as IAMExtTransport. + // + // Use if: you want to control and external device such as a VCR + // + // See edevdefs.h for the enumerated parameter list + //--------------------------------------------------------------------- + [ + object, + uuid(B5730A90-1A2C-11cf-8C23-00AA006B6814), + pointer_default(unique) + ] + interface IAMExtDevice : IUnknown + { + // General device capabilities property. See edevdefs.h for supported + // values + HRESULT GetCapability( + [in] long Capability, // identify the property + [out] long *pValue, // return value + [out] double *pdblValue // return value + ); + + // Get external device identification string. Usually the model # + // of the device + HRESULT get_ExternalDeviceID( + [out] LPOLESTR *ppszData // ID string + ); + + HRESULT get_ExternalDeviceVersion( + [out] LPOLESTR *ppszData // revision string + ); + + // Controls the external device's power mode + HRESULT put_DevicePower([in] long PowerMode + ); + HRESULT get_DevicePower([out] long *pPowerMode + ); + + // Some devices need to be reset in some way, i.e., rewinding a VCR + // to the beginning of the tape and resetting the counter to zero. + HRESULT Calibrate( + [in] HEVENT hEvent, + [in] long Mode, + [out] long *pStatus // OATRUE is active, OAFALSE is inactive + ); + + // Selects the device's communications port, i.e.,COM1, IEEE1394, etc. + // See edevdefs.h for enums + HRESULT put_DevicePort([in] long DevicePort + ); + HRESULT get_DevicePort([out] long *pDevicePort + ); + +} +typedef IAMExtDevice *PEXTDEVICE; + + //--------------------------------------------------------------------- + // Defines IAMExtTransport Interface + // + // Contains properties and methods that control behavior of an external + // transport device such as a VTR + // + // Implement if: you control such a device. Intended to be agregated + // with IAMExtDevice. + // + // Use if: you want to control such a device + // + // See edevdefs.h for the parameter lists + //--------------------------------------------------------------------- +[ + object, + uuid(A03CD5F0-3045-11cf-8C44-00AA006B6814), + pointer_default(unique) + ] +interface IAMExtTransport : IUnknown { + + // General transport capabilities property. See edevdefs.h for enums + HRESULT GetCapability( + [in] long Capability, // identify the property + [out] long *pValue, // return value + [out] double *pdblValue // return value + ); + + // For disc-based devices: spinning, or not spinning. + // For tape-based device: threaded, unthreaded or ejected + HRESULT put_MediaState([in] long State + ); + HRESULT get_MediaState([out] long *pState // see edevdefs.h + ); + + // Determines state of unit's front panel + HRESULT put_LocalControl([in] long State + ); + HRESULT get_LocalControl([out] long *pState // OATRUE or OAFALSE + ); + + // Transport status such as Play, Stop, etc. More extensive + // than AM states. + HRESULT GetStatus( + [in] long StatusItem, // see edevdefs.h + [out] long *pValue + ); + + // Parameters such as recording speed, servo reference, ballistics, etc. + HRESULT GetTransportBasicParameters( + [in] long Param, + [out] long *pValue, + [out] LPOLESTR *ppszData + ); + + HRESULT SetTransportBasicParameters( + [in] long Param, + [in] long Value, + [in] LPCOLESTR pszData + ); + + // Parameters such as video output mode + HRESULT GetTransportVideoParameters( + [in] long Param, + [out] long *pValue + ); + + HRESULT SetTransportVideoParameters( + [in] long Param, + [in] long Value + ); + + // Parameters such as audio channel enable + HRESULT GetTransportAudioParameters( + [in] long Param, + [out] long *pValue + ); + + HRESULT SetTransportAudioParameters( + [in] long Param, + [in] long Value + ); + + // Mode is the movement of the transport, i.e., Play, Stop, + // Record, Edit, etc. + HRESULT put_Mode([in] long Mode + ); + HRESULT get_Mode([out] long *pMode + ); + + // Rate is for variable speed control of the the device. This + // can be linked to IMediaControl::Rate() in the implementation + // if desired. + HRESULT put_Rate([in] double dblRate + ); + HRESULT get_Rate([out] double *pdblRate + ); + + // This is a lengthy method, that is, it is in effect until canceled or complete and + // requires housekeeping by the filter. It puts transport in play mode and maintains + // fixed relationship between master time reference and transport position. + HRESULT GetChase( + [out] long *pEnabled, // OATRUE | OAFALSE + [out] long *pOffset, // offset in current time format + [out] HEVENT *phEvent // completion notification + ); + HRESULT SetChase( + [in] long Enable, // OATRUE | OAFALSE + [in] long Offset, // offset in current time format + [in] HEVENT hEvent // completion notification + ); + + // Also a lengthy method: temporarily change transport speed (for synchronizing). + HRESULT GetBump( + [out] long *pSpeed, + [out] long *pDuration // in current time format + ); + HRESULT SetBump( + [in] long Speed, + [in] long Duration // in current time format + ); + + // Enable/Disable transport anti-headclog control. + HRESULT get_AntiClogControl([out] long *pEnabled // OATRUE | OAFALSE + ); + HRESULT put_AntiClogControl([in] long Enable // OATRUE | OAFALSE + ); + + // The following group of properties describes edit events. An edit event can be a + // standard insert or assemble edit or a memorized position called a bookmark. + // A NOTE ABOUT EVENTS: as with all lengthy commands, event objects must be created to + // signal completion or error. + + // Intended usage: an edit event is prepared for use by: + // 1. Registering an edit property set and getting an EditID + // 2. Setting the necessary edit properties + // 3. Setting the edit property set active + + // Please see edevdefs.h for properties and values + + // The reference clock's advance is the mechanism that puts an edit in motion (see + // ED_EDIT_REC_INPOINT). + + // Property set methods + HRESULT GetEditPropertySet( + [in] long EditID, + [out] long *pState // ED_SET_ACTIVE | ED_SET_INACTIVE | ED_SET_INVALID + // | ED_SET_EXECUTING + ); + + HRESULT SetEditPropertySet( + [in, out] long *pEditID, + [in] long State // ED_SET_REGISTER | ED_SET_DELETE | ED_SET_ACTIVE | + ); // ED_SET_INACTIVE + + // the following properties define an edit event such as a bookmark, seek point, or + // actual edit + HRESULT GetEditProperty( + [in] long EditID, + [in] long Param, + [out] long *pValue + ); + HRESULT SetEditProperty( + [in] long EditID, + [in] long Param, + [in] long Value + ); + + // Activates a capable transport's edit control (typically used for "on the fly" editing). + HRESULT get_EditStart([out] long *pValue // OATRUE or OAFALSE + ); + HRESULT put_EditStart([in] long Value // OATRUE or OAFALSE + ); +} +typedef IAMExtTransport *PIAMEXTTRANSPORT; + + //--------------------------------------------------------------------- + // Defines IAMTimecodeReader Interface + // + // Contains properties and methods that define behavior of a + // SMPTE/MIDI Timecode Reader. It is expected that this interface + // will be combined (aggregated) with IAMExtTransport to "build" a pro + // VCR. + // + // Implement if: you control such a device + // + // Use if: you want to control such a device + // + // See edevdefs.h for the parameter lists + //===================================================================== + + +// timecode structures +cpp_quote("#if 0") +cpp_quote("/* the following is what MIDL knows how to remote */") +typedef struct tagTIMECODE { + WORD wFrameRate; // will be replaced by AM defs, but see ED_FORMAT_SMPTE for now + WORD wFrameFract; // fractional frame. full scale is always 0x1000 + DWORD dwFrames; +}TIMECODE; +cpp_quote("#else /* 0 */") +cpp_quote("#ifndef TIMECODE_DEFINED") +cpp_quote("#define TIMECODE_DEFINED") +cpp_quote("typedef union _timecode {") +cpp_quote(" struct {") +cpp_quote(" WORD wFrameRate;") +cpp_quote(" WORD wFrameFract;") +cpp_quote(" DWORD dwFrames;") +cpp_quote(" };") +cpp_quote(" DWORDLONG qw;") +cpp_quote(" } TIMECODE;") +cpp_quote("") +cpp_quote("#endif /* TIMECODE_DEFINED */") +cpp_quote("#endif /* 0 */") + +typedef TIMECODE *PTIMECODE; + +typedef struct tagTIMECODE_SAMPLE { + LONGLONG qwTick; // ActiveMovie 100ns timestamp + TIMECODE timecode; // timecode + DWORD dwUser; // timecode user data (aka user bits) + DWORD dwFlags; // timecode flags - see below +} TIMECODE_SAMPLE; +typedef TIMECODE_SAMPLE *PTIMECODE_SAMPLE; + + +[ + object, + uuid(9B496CE1-811B-11cf-8C77-00AA006B6814), + pointer_default(unique) +] +interface IAMTimecodeReader : IUnknown +{ + // Timecode Reader Mode - gets/sets the following properties + // ED_TCR_SOURCE - timecode gen (readback), LTC, VITC, or Control Track + HRESULT GetTCRMode( + [in] long Param, + [out] long *pValue); + HRESULT SetTCRMode( + [in] long Param, + [in] long Value); + + // Select which line of the vertical interval timecode will be read from (if VITC). + // To read VITC on specific multiple lines, the caller would make successive calls to + // put_VITCLine(), once for each line desired. + HRESULT put_VITCLine( + [in] long Line ); // valid lines are 11-20, 0 means autoselect, + // hi bit set means add to list of lines (for + // readers that test across multiple lines) + HRESULT get_VITCLine( + [out] long *pLine ); // hi bit set means multiple lines are used, + // and successive calls will cycle through the + // line numbers (like an enumerator, only simpler) + + // GetTimecode can be used to obtain the most recent timecode value available in the + // stream. The client can use this to monitor the timecode, parse duplicates and + // discontinuities. The source filter supplying the timecode or possibly a down stream + // filter might want to parse for discontinuities or errors since you have to look at + // every sample to do this properly. + // + + HRESULT GetTimecode( + [out] PTIMECODE_SAMPLE pTimecodeSample) ; + +} +typedef IAMTimecodeReader *PIAMTIMECODEREADER; + + //--------------------------------------------------------------------- + //===================================================================== + // Defines IAMTimecodeGenerator Interface + // + // Contains properties and methods that define behavior of an external + // SMPTE/MIDI Timecode Generator. It is expected that this interface + // will be combined (aggregated) with IAMExtTransport to "build" a pro + // VCR. + // + // Implement if: you control such a device + // + // Use if: you want to control such a device + // + // See edevdefs.h for the parameter lists + //--------------------------------------------------------------------- +[ + object, + uuid(9B496CE0-811B-11cf-8C77-00AA006B6814), + pointer_default(unique) + ] +interface IAMTimecodeGenerator : IUnknown { + + // Timecode Generator Mode - gets/sets the following properties (see + // vcrdefss.h for detailed values): + // ED_TCG_TIMECODE_TYPE - LTC, VITC, or MIDI + // ED_TCG_FRAMERATE - 24, 25, 30 drop or 30 nondrop + // ED_TCG_SYNC_SOURCE - what is driving the bitclock + // ED_TCG_REFERENCE_SOURCE - what is driving the count value + HRESULT GetTCGMode( + [in] long Param, + [out] long *pValue); + + HRESULT SetTCGMode( + [in] long Param, + [in] long Value); + + // Select into which line(s) of the vertical interval timecode will be inserted (if VITC). + // Hi bit set means add this line to any previously set lines. + // To generate VITC on specific multiple lines, the caller would make successive calls to + // put_VITCLine(), once for each line desired. + HRESULT put_VITCLine( + [in] long Line // valid lines are 11-20, 0 means autoselect(this setting + ); // is for TC readers that decode from multiple lines) + HRESULT get_VITCLine( + [out] long *pLine + ); + + // Sets timecode and/or userbit value. If generator is running, takes effect + // immediately. If caller wants to set only timecode, set userbit value to -1L (and + // same for setting userbits only) + // + + HRESULT SetTimecode( + [in] PTIMECODE_SAMPLE pTimecodeSample) ; + + + // GetTimecode can be used to obtain the most recent timecode value available in the + // stream. The client can use this to monitor the timecode and verify the generator is + // working properly + // + + HRESULT GetTimecode( + [out] PTIMECODE_SAMPLE pTimecodeSample) ; + +} +typedef IAMTimecodeGenerator *PIAMTIMECODEGENERATOR; + + //--------------------------------------------------------------------- + // Defines IAMTimecodeDisplay Interface + // + // Contains properties and methods that define behavior of an external + // SMPTE/MIDI Timecode Display device (aka "character generator" for + // making "burn-ins" or "window dubs"). It is expected that this interface + // will be combined (aggregated) with IAMExtTransport and the timecode + // interfaces to "build" a pro VCR. + // + // Implement if: you control such a device + // + // Use if: you want to control such a device + // + // See edevdefs.h for the parameter lists + //--------------------------------------------------------------------- +[ + object, + uuid(9B496CE2-811B-11cf-8C77-00AA006B6814), + pointer_default(unique) + ] +interface IAMTimecodeDisplay : IUnknown +{ + // Enable/disable external device's timecode reader's character generator output. Some + // readers have this feature - this is not intended for rendering inside the PC! + HRESULT GetTCDisplayEnable( + [out] long *pState); // OATRUE | OAFALSE + HRESULT SetTCDisplayEnable( + [in] long State); // OATRUE | OAFALSE + // Timecode reader's character generator output + // characteristics (size, position, intensity, etc.). + HRESULT GetTCDisplay( + [in] long Param, + [out] long *pValue); + HRESULT SetTCDisplay( + [in] long Param, + [in] long Value); + + /* Allowable params and values (see edevdefs.h for details): + ED_TCD_SOURCE + ED_TCR | ED_TCG + ED_TCD_SIZE + ED_SMALL | ED_MED | ED_LARGE + ED_TCD_POSITION + ED_TOP | ED_MIDDLE | ED_BOTTOM or'd with + ED_LEFT | ED_CENTER | ED_RIGHT + ED_TCD_INTENSITY + ED_HIGH | ED_LOW + ED_TCD_TRANSPARENCY // set from 0 to 4, 0 being completely opaque + ED_TCD_INVERT // white on black or black on white + OATRUE | OAFALSE + ED_TCD_BORDER // white border for black chars, black border for white letters + OATRUE | OAFALSE + */ +} +typedef IAMTimecodeDisplay *PIAMTIMECODEDISPLAY; + + +[ + object, + uuid(c6545bf0-e76b-11d0-bd52-00a0c911ce86), + pointer_default(unique) +] +interface IAMDevMemoryAllocator : IUnknown +{ + HRESULT GetInfo( + [out] DWORD *pdwcbTotalFree, + [out] DWORD *pdwcbLargestFree, + [out] DWORD *pdwcbTotalMemory, + [out] DWORD *pdwcbMinimumChunk); + + HRESULT CheckMemory( + [in] const BYTE *pBuffer); + + HRESULT Alloc( + [out] BYTE **ppBuffer, + [in, out] DWORD *pdwcbBuffer); + + HRESULT Free( + [in] BYTE *pBuffer); + + HRESULT GetDevMemoryObject( + [out] IUnknown **ppUnkInnner, + [in] IUnknown *pUnkOuter); +} +typedef IAMDevMemoryAllocator *PAMDEVMEMORYALLOCATOR; + + +[ + object, + uuid(c6545bf1-e76b-11d0-bd52-00a0c911ce86), + pointer_default(unique) +] +interface IAMDevMemoryControl : IUnknown +{ + HRESULT QueryWriteSync(); + + HRESULT WriteSync(); + + HRESULT GetDevId( + [out] DWORD *pdwDevId); + +} +typedef IAMDevMemoryControl *PAMDEVMEMORYCONTROL; + +// Flags for IAMStreamSelection::Info +enum _AMSTREAMSELECTINFOFLAGS { + AMSTREAMSELECTINFO_ENABLED = 0x01, // Enable - off for disable + AMSTREAMSELECTINFO_EXCLUSIVE = 0x02 // Turns off the others in the group + // when enabling this one +}; +// Flags for IAMStreamSelection::Enable +enum _AMSTREAMSELECTENABLEFLAGS { + // Currently valid values are : + // 0 - disable all streams in the group containing this stream + // ..._ENABLE - enable only this stream with in the given group + // and disable all others + // ..._ENABLEALL - send out all streams + AMSTREAMSELECTENABLE_ENABLE = 0x01, // Enable + AMSTREAMSELECTENABLE_ENABLEALL = 0x02 // Enable all streams in the group + // containing this stream +}; + +// Control which logical streams are played and find out information about +// them +// Normally supported by a filter +[ + object, + uuid(c1960960-17f5-11d1-abe1-00a0c905f375), + pointer_default(unique) +] +interface IAMStreamSelect : IUnknown +{ + // Returns total count of streams + HRESULT Count( + [out] DWORD *pcStreams); // Count of logical streams + + // Return info for a given stream - S_FALSE if iIndex out of range + // The first steam in each group is the default + HRESULT Info( + [in] long lIndex, // 0-based index + [out] AM_MEDIA_TYPE **ppmt, // Media type - optional + // Use DeleteMediaType to free + [out] DWORD *pdwFlags, // flags - optional + [out] LCID *plcid, // LCID (returns 0 if none) - optional + [out] DWORD *pdwGroup, // Logical group - optional + [out] WCHAR **ppszName, // Name - optional - free with CoTaskMemFree + // optional + [out] IUnknown **ppObject, // Associated object - optional + // Object may change if Enable is + // called on this interface + // - returns NULL if no associated object + // Returns pin or filter for DShow + [out] IUnknown **ppUnk); // Stream specific interface + + // Enable or disable a given stream + HRESULT Enable( + [in] long lIndex, + [in] DWORD dwFlags); +} +typedef IAMStreamSelect *PAMSTREAMSELECT; + +enum _AMRESCTL_RESERVEFLAGS +{ + AMRESCTL_RESERVEFLAGS_RESERVE = 0x00, // Increment reserve count + AMRESCTL_RESERVEFLAGS_UNRESERVE = 0x01 // Decrement reserve count +}; + +// Reserve resources now so that playback can be subsequently +// guaranteed +// +// Normally supported by a filter +// +[ + object, + uuid(8389d2d0-77d7-11d1-abe6-00a0c905f375), + pointer_default(unique), + local +] +interface IAMResourceControl : IUnknown +{ + // The reserve count is incremented/decremented if and only if + // S_OK is returned + // Unreserve once for every Reserve call + HRESULT Reserve( + [in] DWORD dwFlags, // From _AMRESCTL_RESERVEFLAGS enum + [in] PVOID pvReserved // Must be NULL + ); +} + + +// Set clock adjustments - supported by some clocks +[ + object, + uuid(4d5466b0-a49c-11d1-abe8-00a0c905f375), + pointer_default(unique), + local +] +interface IAMClockAdjust : IUnknown +{ + // Set the following delta to clock times + // The clock will add adjust its times by the given delta + HRESULT SetClockDelta( + [in] REFERENCE_TIME rtDelta + ); +}; + +// Filter miscellaneous status flags + +enum _AM_FILTER_MISC_FLAGS { + AM_FILTER_MISC_FLAGS_IS_RENDERER = 0x00000001, /* Will deliver EC_COMPLETE + at end of media */ + AM_FILTER_MISC_FLAGS_IS_SOURCE = 0x00000002 /* Filter sources data */ +}; + +[ + object, + uuid(2dd74950-a890-11d1-abe8-00a0c905f375), + pointer_default(unique), + local +] +interface IAMFilterMiscFlags : IUnknown +{ + // Get miscellaneous property flags + ULONG GetMiscFlags(void); +}; + + +// Video Image drawing interface +[ + object, + local, + uuid(48efb120-ab49-11d2-aed2-00a0c995e8d5), + pointer_default(unique), +] +interface IDrawVideoImage : IUnknown +{ + HRESULT DrawVideoImageBegin(); + + HRESULT DrawVideoImageEnd(); + + HRESULT DrawVideoImageDraw( + [in] HDC hdc, + [in] LPRECT lprcSrc, + [in] LPRECT lprcDst + ); +} + +// +// Video Image decimation interface +// +// The aim of this interface is to enable a video renderer filter to +// control the decimation properties of a video decoder connected to +// the video renderer +// +// This interface should only be supported by decoders that are capable of +// decimating their output image by an arbitary amount. +// +// +[ + object, + local, + uuid(2e5ea3e0-e924-11d2-b6da-00a0c995e8df), + pointer_default(unique), +] +interface IDecimateVideoImage : IUnknown +{ + // + // Informs the decoder that it should decimate its output + // image to the specified width and height. If the decoder can + // decimate to this size it should return S_OK. + // If the decoder can't perform the requested decimation + // or wants to stop performing the decimation that it is + // currently doing it should return E_FAIL. + // + HRESULT SetDecimationImageSize( + [in] long lWidth, + [in] long lHeight); + + // + // Informs the decoder that it should stop decimating its output image + // and resume normal output. + // + HRESULT ResetDecimationImageSize(); +} + +typedef enum _DECIMATION_USAGE { + DECIMATION_LEGACY, // decimate at ovly then video port then crop + DECIMATION_USE_DECODER_ONLY, // decimate image at the decoder only + DECIMATION_USE_VIDEOPORT_ONLY, // decimate at the video port only + DECIMATION_USE_OVERLAY_ONLY, // decimate at the overlay only + DECIMATION_DEFAULT // decimate at decoder then ovly the vide port then crop +} DECIMATION_USAGE; + +[ + object, + local, + uuid(60d32930-13da-11d3-9ec6-c4fcaef5c7be), + pointer_default(unique), +] +interface IAMVideoDecimationProperties: IUnknown +{ + // + // Queries the current usage of the above IDecimateVideoImage + // interface. + // + HRESULT QueryDecimationUsage( + [out] DECIMATION_USAGE* lpUsage); // from DECIMATION_USAGE enum + + // + // Sets the current usage of the above IDecimateVideoImage + // interface. + // + HRESULT SetDecimationUsage( + [in] DECIMATION_USAGE Usage); // from DECIMATION_USAGE enum +} + +//--------------------------------------------------------------------- +// +// IVideoFrameStep interface +// +//--------------------------------------------------------------------- + +[ + object, + uuid(e46a9787-2b71-444d-a4b5-1fab7b708d6a), + pointer_default(unique), +] +interface IVideoFrameStep : IUnknown +{ + // + // Stop(), Pause(), Run() all cancel Step as does any seeking + // request. + // + // The Step() and CancelStep() methods of this interface + // Cancel any previous step. + // + // When stepping is complete EC_STEP_COMPLETE is signalled. + // + // When the filter graph gets EC_STEP_COMPLETE it automatically + // sets the filter graph into paused state and forwards the + // notification to the application + // + // Returns S_OK if stepping initiated. + // + // dwFrames + // 1 means step 1 frame forward + // 0 is invalid + // n (n > 1) means skip n - 1 frames and show the nth + // + // pStepObject + // NULL - default step object (filter) picked + // non-NULL - use this object for stepping + // + HRESULT Step(DWORD dwFrames, [unique] IUnknown *pStepObject); + + // Can step? + // Returns S_OK if it can, S_FALSE if it can't or error code. + // bMultiple - if TRUE return whether can step n > 1 + HRESULT CanStep(long bMultiple, [unique] IUnknown *pStepObject); + + // Cancel stepping + HRESULT CancelStep(); +} + + + + +//--------------------------------------------------------------------- +// +// IAMPushSource interface +// +// Provides a means for source filters to describe information about the +// data that they source, such as whether the data is live or not, and +// what type of clock was used for timestamps. This information may be +// needed by other clocks in the graph in order to provide accurate +// synchronization. Also provides a way to specify an offset value for +// the filter to use when timestamping the streams it sources. Provides +// support for the IAMLatency interface as well. +// +//--------------------------------------------------------------------- + +enum _AM_PUSHSOURCE_FLAGS { + + // + // The default assumption is that the data is from a live source, + // time stamped with the graph clock, and the source does not + // attempt to rate match the data it delivers. + // The following flags can be used to override this assumption. + // + + // capability flags + AM_PUSHSOURCECAPS_INTERNAL_RM = 0x00000001, // source provides internal support for rate matching + AM_PUSHSOURCECAPS_NOT_LIVE = 0x00000002, // don't treat source data as live + AM_PUSHSOURCECAPS_PRIVATE_CLOCK = 0x00000004, // source data timestamped with clock not + // exposed to the graph + + // request flags, set by user via SetPushSourceFlags method + AM_PUSHSOURCEREQS_USE_STREAM_CLOCK = 0x00010000 // source was requested to timestamp + // using a clock that isn't the graph clock +}; + +// +// Used to set a source filter to run in a "live" mode. +// +[ +object, + uuid(F185FE76-E64E-11d2-B76E-00C04FB6BD3D), + pointer_default(unique) +] +interface IAMPushSource : IAMLatency +{ + // used to discover push source's capabilities. + // may be any combination of the AM_PUSHSOURCE_FLAGS flags. + HRESULT GetPushSourceFlags ( + [out] ULONG *pFlags + ); + + // used to set request flags for a push source. + // may be a combination of the AM_PUSHSOURCE_REQS_xxx flags. + HRESULT SetPushSourceFlags ( + [in] ULONG Flags + ); + + // specify an offset for push source time stamps + HRESULT SetStreamOffset ( + [in] REFERENCE_TIME rtOffset + ); + + // retrieve the offset this push source is using + HRESULT GetStreamOffset ( + [out] REFERENCE_TIME *prtOffset + ); + + // retrieve the maximum stream offset this push source thinks it can support + HRESULT GetMaxStreamOffset ( + [out] REFERENCE_TIME *prtMaxOffset + ); + + // allows the filter graph to tell a push source the maximum latency allowed on the graph + // this allows pins like the video capture preview pin to be more efficient with the amount + // of buffering required to support the maximum graph latency + HRESULT SetMaxStreamOffset ( + [in] REFERENCE_TIME rtMaxOffset + ); +}; + + +// ------------------------------------------------------------------------ +// +// IAMDeviceRemoval interface +// +// Implemented by filters to request and receive WM_DEVICECHANGE +// notifications +// +// ------------------------------------------------------------------------ + +[ + object, + uuid(f90a6130-b658-11d2-ae49-0000f8754b99), + pointer_default(unique) +] +interface IAMDeviceRemoval : IUnknown +{ + + HRESULT DeviceInfo( + [out] CLSID *pclsidInterfaceClass, + [out] WCHAR **pwszSymbolicLink); + + HRESULT Reassociate(); + + HRESULT Disassociate(); +} + +// +// for DV +// +typedef struct { + //for 1st 5/6 DIF seq. + DWORD dwDVAAuxSrc; + DWORD dwDVAAuxCtl; + //for 2nd 5/6 DIF seq. + DWORD dwDVAAuxSrc1; + DWORD dwDVAAuxCtl1; + //for video information + DWORD dwDVVAuxSrc; + DWORD dwDVVAuxCtl; + DWORD dwDVReserved[2]; + +} DVINFO, *PDVINFO; + +// ------------------------------------------------------------------------ +// +// IDVEnc interface +// +// Implemented by DV encoder filters to set Encoder format +// +// ------------------------------------------------------------------------ +enum _DVENCODERRESOLUTION { //resolution + DVENCODERRESOLUTION_720x480 = 2012, + DVENCODERRESOLUTION_360x240 = 2013, + DVENCODERRESOLUTION_180x120 = 2014, + DVENCODERRESOLUTION_88x60 = 2015 +}; +enum _DVENCODERVIDEOFORMAT { //PAL/ntsc + DVENCODERVIDEOFORMAT_NTSC = 2000, + DVENCODERVIDEOFORMAT_PAL = 2001 +}; +enum _DVENCODERFORMAT { // dvsd/dvhd/dvsl + DVENCODERFORMAT_DVSD = 2007, + DVENCODERFORMAT_DVHD = 2008, + DVENCODERFORMAT_DVSL = 2009 +}; +[ + object, + uuid(d18e17a0-aacb-11d0-afb0-00aa00b67a42), + pointer_default(unique) +] +interface IDVEnc : IUnknown +{ + + HRESULT get_IFormatResolution ( + [out] int *VideoFormat, //pal or ntsc + [out] int *DVFormat, //dvsd dvhd dvsl + [out] int *Resolution, //720, 360, 180,88 + [in] BYTE fDVInfo, //TRUE: DVINFO structure exist, FALSE: Do not care DVINFO + [out] DVINFO *sDVInfo //NULL if fDVInfo=FALSE, + ); + + HRESULT put_IFormatResolution ( + [in] int VideoFormat, + [in] int DVFormat, + [in] int Resolution, + [in] BYTE fDVInfo, //TRUE: DVINFO structure exist, FALSE: Do not care DVINFO + [in] DVINFO *sDVInfo //NULL if fDVInfo=FALSE, + ); + +} + +// ------------------------------------------------------------------------ +// +// IDVDec interface +// +// Implemented by DV decoder filters to set decoder size +// +// ------------------------------------------------------------------------ +enum _DVDECODERRESOLUTION { + DVDECODERRESOLUTION_720x480 = 1000, + DVDECODERRESOLUTION_360x240 = 1001, + DVDECODERRESOLUTION_180x120 = 1002, + DVDECODERRESOLUTION_88x60 = 1003 +}; +enum _DVRESOLUTION { + DVRESOLUTION_FULL = 1000, + DVRESOLUTION_HALF = 1001, + DVRESOLUTION_QUARTER = 1002, + DVRESOLUTION_DC = 1003 +}; +[ + object, + uuid(b8e8bd60-0bfe-11d0-af91-00aa00b67a42), + pointer_default(unique) +] +interface IIPDVDec : IUnknown +{ + HRESULT get_IPDisplay ( + [out] int *displayPix // The display pixels arrage + ); + + HRESULT put_IPDisplay ( + [in] int displayPix // Change to this display pixel arrage + ) ; +} + +// ------------------------------------------------------------------------ +// +// IDVSplitter interface +// +// Implemented by DV splitter filters +// +// ------------------------------------------------------------------------ +[ + object, + uuid(92a3a302-da7c-4a1f-ba7e-1802bb5d2d02) +] +interface IDVSplitter : IUnknown +{ + HRESULT DiscardAlternateVideoFrames( + [in] int nDiscard + ) ; +} + +// Audio Renderer statistics params for IAMAudioRendererStats interface +enum _AM_AUDIO_RENDERER_STAT_PARAM { + AM_AUDREND_STAT_PARAM_BREAK_COUNT = 1, // audio breaks + AM_AUDREND_STAT_PARAM_SLAVE_MODE, // current slave mode, see AM_AUDREND_SLAVE_MODEs + AM_AUDREND_STAT_PARAM_SILENCE_DUR, // silence inserted due to gaps (ms) + AM_AUDREND_STAT_PARAM_LAST_BUFFER_DUR, // duration of the last buffer received + AM_AUDREND_STAT_PARAM_DISCONTINUITIES, // discontinuities seen since running + AM_AUDREND_STAT_PARAM_SLAVE_RATE, // what rate are we currently slaving at? S_FALSE if not slaving + AM_AUDREND_STAT_PARAM_SLAVE_DROPWRITE_DUR, // for waveOut slaving - data dropped or added to stay in-sync + // dwParam1 - dropped duration(ms) + // dwParam2 - paused duration(ms) + AM_AUDREND_STAT_PARAM_SLAVE_HIGHLOWERROR, // highest & lowest clock differences seen + // dwParam1 - high err + // dwParam2 - low err + AM_AUDREND_STAT_PARAM_SLAVE_LASTHIGHLOWERROR, // last high and low errs seen + // dwParam1 - last high err + // dwParam2 - last low err + AM_AUDREND_STAT_PARAM_SLAVE_ACCUMERROR, // error between master/slave clocks + AM_AUDREND_STAT_PARAM_BUFFERFULLNESS, // percent audio buffer fullness + AM_AUDREND_STAT_PARAM_JITTER // input buffer jitter +}; + +//--------------------------------------------------------------------- +// +// IAMAudioRendererStats interface +// +// Interface to get at statistical information that is optionally stored +// in an audio renderer filter. Supported on the filter interface (although +// this might be better for ksproxy if we define it as a pin interface?) +// +//--------------------------------------------------------------------- + +[ +object, + uuid(22320CB2-D41A-11d2-BF7C-D7CB9DF0BF93), + pointer_default(unique) +] +interface IAMAudioRendererStats : IUnknown +{ + // Get value corresponding to the passed in parameter id + HRESULT GetStatParam( + [in] DWORD dwParam, + [out] DWORD *pdwParam1, + [out] DWORD *pdwParam2 + ); +} + +//--------------------------------------------------------------------- +// +// IAMLatency interface +// +// Allows a filter to report the expected latency associated with a data +// stream flowing from its input to output pin. Supported on output pins. +// +//--------------------------------------------------------------------- + +[ +object, + uuid(62EA93BA-EC62-11d2-B770-00C04FB6BD3D), + pointer_default(unique) +] +interface IAMLatency : IUnknown +{ + HRESULT GetLatency( + [in] REFERENCE_TIME *prtLatency + ); +} + + +enum _AM_INTF_SEARCH_FLAGS { + AM_INTF_SEARCH_INPUT_PIN = 0x00000001, // search input pins + AM_INTF_SEARCH_OUTPUT_PIN = 0x00000002, // search output pins + AM_INTF_SEARCH_FILTER = 0x00000004 // search filters +}; + +//--------------------------------------------------------------------- +// +// IAMGraphStreams interface +// +// Interface used to control or search over connected streams of data +// flow within a filter graph. +// +//--------------------------------------------------------------------- + +[ +object, + uuid(632105FA-072E-11d3-8AF9-00C04FB6BD3D), + pointer_default(unique) +] +interface IAMGraphStreams : IUnknown +{ + // Search upstream from the current pin, for the specified interface. + // dwFlags can be any combination of the AM_INTF_SEARCH_FLAGS, and allows + // control over what objects to search. A value of 0 means to search all. + HRESULT FindUpstreamInterface( + [in] IPin *pPin, + [in] REFIID riid, + [out, iid_is(riid)] void **ppvInterface, + [in] DWORD dwFlags ); + + // Enable or disable the graph's setting of a timestamp offset + // on push sources. + HRESULT SyncUsingStreamOffset( [in] BOOL bUseStreamOffset ); + + // allow an app to set the maximum offset used on push source filters + HRESULT SetMaxGraphLatency( [in] REFERENCE_TIME rtMaxGraphLatency ); +} + + +// +// IAMOverlayFX +// +// This interface is exposed by the overlay mixer filter and allows +// an application to apply various "effects" to the overlay surface +// used by the overlay mixer. +// +// The effects that can be applied are described by the AMOVERLAYFX +// enumeration. +// +enum AMOVERLAYFX { + // Normal (ie. top down, left to right) video + AMOVERFX_NOFX = 0x00000000, + + // Mirror the overlay across the vertical axis + AMOVERFX_MIRRORLEFTRIGHT = 0x00000002, + + // Mirror the overlay across the horizontal axis + AMOVERFX_MIRRORUPDOWN = 0x00000004, + + // Deinterlace the overlay, if possible + AMOVERFX_DEINTERLACE = 0x00000008 +}; + +[ +object, + uuid(62fae250-7e65-4460-bfc9-6398b322073c), + pointer_default(unique) +] +interface IAMOverlayFX : IUnknown +{ + // Use this method to determine what overlay effects are currently available + // for the overlay surface used by the overlay mixer filter. + // + HRESULT QueryOverlayFXCaps( + [out] DWORD *lpdwOverlayFXCaps + ); + + // Use this method to apply a new overlay effect to the overlay surface + // used by the overlay mixer filter. This method can be called while the + // filter graph is running, the effect is applied immediately + // + HRESULT SetOverlayFX( + [in] DWORD dwOverlayFX + ); + + // Use this method to determine what effect (if any) is currently being + // applied to the overlay surface by the overlay mixer filter. + // + HRESULT GetOverlayFX( + [out] DWORD *lpdwOverlayFX + ); +} + + + +// IAMOpenProgress interface provides information about current progress through +// a download + +// NOTE: The following cpp_quote is there to make sure that we do not break the whistler build when this file is +// updated in Whistler as they are using a private copy of op.h which is removed as a result of moving the IAMOpenProgress +// interface into axextend.idl. Html+time has a private copy of op.h in \\index1\src\newnt\inetcore\mshtml\src\time\include\op.h +// which needs to be removed when integrating into Whistler to avoid any future build breaks. +cpp_quote("#define __OP_H__") + +[ +object, +uuid(8E1C39A1-DE53-11cf-AA63-0080C744528D), +pointer_default(unique) +] + +interface IAMOpenProgress : IUnknown +{ + // QueryProgress can be used to query the source filter which supports this interface + // for progress information during a renderfile operation. + HRESULT QueryProgress( + [out] LONGLONG* pllTotal, + [out] LONGLONG* pllCurrent + ); + + // AbortOperation can be used to request an abort of RenderFile operation + // causing it to stop downloading. This methods instructs the exporter of + // the IAMOpenProgress interface to hold up their internal abort flag until + // further notice. + HRESULT AbortOperation( + ); +} + +/*++ + IMpeg2Demultiplexer + + This interface is implemented by the MPEG-2 Demultiplexer filter, + irrespective of program vs. transport stream splitting functionality. +--*/ +[ + object, + local, + uuid (436eee9c-264f-4242-90e1-4e330c107512), + pointer_default(unique) +] +interface IMpeg2Demultiplexer : IUnknown +{ + /*++ + ------------------------------------------------------------------------ + purpose: Creates an output pin of the specified media type. + + pMediaType media type specifier for the new pin + pszPinName pin name; cannot be a duplicate of an existing pin + ppIPin IPin interface pointer to the newly created pin + --*/ + HRESULT + CreateOutputPin ( + [in] AM_MEDIA_TYPE * pMediaType, + [in] LPWSTR pszPinName, + [out] IPin ** ppIPin + ) ; + + /*++ + ------------------------------------------------------------------------ + purpose: Updates the media type of the specified output pin. If no + connection exists, the media type is updated always. If + the pin is connected, the success/failure of the call will + depend on downstream input pin's accetance/rejection of + the specified media type, and subsequent success/failure + of a reconnect. + + pszPinName pin name + pMediaType new media type specifier + --*/ + HRESULT + SetOutputPinMediaType ( + [in] LPWSTR pszPinName, + [in] AM_MEDIA_TYPE * pMediaType + ) ; + + /*++ + ------------------------------------------------------------------------ + purpose: Deletes the specified output pin. + + pszPinName pin name + --*/ + HRESULT + DeleteOutputPin ( + [in] LPWSTR pszPinName + ) ; +} ; + +//--------------------------------------------------------------------- +// IEnumStreamIdMap interface +//--------------------------------------------------------------------- + +cpp_quote("#define MPEG2_PROGRAM_STREAM_MAP 0x00000000") +cpp_quote("#define MPEG2_PROGRAM_ELEMENTARY_STREAM 0x00000001") +cpp_quote("#define MPEG2_PROGRAM_DIRECTORY_PES_PACKET 0x00000002") +cpp_quote("#define MPEG2_PROGRAM_PACK_HEADER 0x00000003") +cpp_quote("#define MPEG2_PROGRAM_PES_STREAM 0x00000004") +cpp_quote("#define MPEG2_PROGRAM_SYSTEM_HEADER 0x00000005") + +cpp_quote("#define SUBSTREAM_FILTER_VAL_NONE 0x10000000") + +typedef struct { + ULONG stream_id ; // mpeg-2 stream_id + DWORD dwMediaSampleContent ; // #define'd above + ULONG ulSubstreamFilterValue ; // filtering value + int iDataOffset ; // offset to elementary stream +} STREAM_ID_MAP ; + +/*++ + Enumerates the StreamIds mapped on a pin +--*/ +[ + object, + local, + uuid (945C1566-6202-46fc-96C7-D87F289C6534), + pointer_default(unique) +] +interface IEnumStreamIdMap : IUnknown +{ + HRESULT + Next ( + [in] ULONG cRequest, + [in, out, size_is (cRequest)] STREAM_ID_MAP * pStreamIdMap, + [out] ULONG * pcReceived + ) ; + + HRESULT + Skip ( + [in] ULONG cRecords + ) ; + + HRESULT + Reset ( + ) ; + + HRESULT + Clone ( + [out] IEnumStreamIdMap ** ppIEnumStreamIdMap + ) ; +} ; + +/*++ + Implemented on the output pin. + + Provides the ability to map/unmap a stream_id to/from an output pin. +--*/ +[ + object, + local, + uuid (D0E04C47-25B8-4369-925A-362A01D95444), + pointer_default(unique) +] +interface IMPEG2StreamIdMap : IUnknown +{ + HRESULT + MapStreamId ( + [in] ULONG ulStreamId, // mpeg-2 stream_id + [in] DWORD MediaSampleContent, // #define'd above IEnumStreamIdMap + [in] ULONG ulSubstreamFilterValue, // filter value + [in] int iDataOffset // elementary stream offset + ) ; + + HRESULT + UnmapStreamId ( + [in] ULONG culStreamId, // number of stream_id's in pulStreamId + [in] ULONG * pulStreamId // array of stream_id's to unmap + ) ; + + HRESULT + EnumStreamIdMap ( + [out] IEnumStreamIdMap ** ppIEnumStreamIdMap + ) ; +} ; diff --git a/windows_libs/mssdk/include/DShowIDL/bdaiface.idl b/windows_libs/mssdk/include/DShowIDL/bdaiface.idl new file mode 100644 index 00000000..5bfa2990 --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/bdaiface.idl @@ -0,0 +1,772 @@ +//------------------------------------------------------------------------------ +// File: BDAIface.idl +// +// Desc: This file defines the Ring 3 BDA interfaces that are common to +// all BDA network and device types. +// +// The interfaces specific to a particular Network Type or filter +// implementation are defined in a separate include file for that +// Network Type or filter implementation. +// +// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +//--------------------------------------------------------------------- +// IUnknown import idl +//--------------------------------------------------------------------- +#ifndef DO_NO_IMPORTS +import "unknwn.idl"; +import "strmif.idl"; +import "BdaTypes.h"; +#endif + +//--------------------------------------------------------------------- +// +// IBDA_NetworkProvider interface +// +// Implemented by a BDA Network Provider +// +// Used by a BDA device filter to register itself with +// a Network Provider and query information about the +// the current tuning request. +// +//--------------------------------------------------------------------- +[ + object, + uuid(fd501041-8ebe-11ce-8183-00aa00577da2), + pointer_default(unique) +] + +interface IBDA_NetworkProvider : IUnknown +{ + + HRESULT + PutSignalSource ( + [in] ULONG ulSignalSource + ); + + + HRESULT + GetSignalSource ( + [in, out] ULONG * pulSignalSource + ); + + HRESULT + GetNetworkType ( + [in, out] GUID * pguidNetworkType + ); + + HRESULT + PutTuningSpace ( + [in] REFGUID guidTuningSpace + ); + + HRESULT + GetTuningSpace ( + [in, out] GUID * pguidTuingSpace + ); + + HRESULT + RegisterDeviceFilter ( + [in] IUnknown * pUnkFilterControl, + [in, out] ULONG * ppvRegisitrationContext + ); + + HRESULT + UnRegisterDeviceFilter ( + [in] ULONG pvRegistrationContext + ); + +} + + +//--------------------------------------------------------------------- +// +// IBDA_EthernetFilter interface +// +// Implemented by a BDA Network Provider +// +// Used by an Ethernet Network Data Sink filter (eg. IPSink) to +// request that the Network Provider make its best effort to tune +// to the stream(s) on which a list of Ethernet multicast addresses +// may be transmitted. +// +// Addresses in the address list are byte aligned in Network order. +// UlcbAddresses will always be an integer multiple of the +// size of an ethernet address. +// +//--------------------------------------------------------------------- +[ + object, + uuid(71985F43-1CA1-11d3-9CC8-00C04F7971E0), + pointer_default(unique) +] + +interface IBDA_EthernetFilter : IUnknown +{ + HRESULT + GetMulticastListSize ( + [in, out] ULONG * pulcbAddresses + ); + + HRESULT + PutMulticastList ( + [in] ULONG ulcbAddresses, + [in, size_is(ulcbAddresses)] BYTE pAddressList [] + ); + + HRESULT + GetMulticastList ( + [in, out] ULONG * pulcbAddresses, + [out, size_is(*pulcbAddresses)] BYTE pAddressList [] + ); + + HRESULT + PutMulticastMode ( + [in] ULONG ulModeMask + ); + + HRESULT + GetMulticastMode ( + [out] ULONG * pulModeMask + ); + +} + + + +//--------------------------------------------------------------------- +// +// IBDA_IPV4Filter interface +// +// Implemented by a BDA Network Provider +// +// Used by an IPv4 Network Data Sink filter to request +// that the Network Provider make its best effort to tune +// to the stream(s) on which a list of IPv4 multicast addresses +// may be transmitted. +// +// Addresses in the address list are byte aligned in Network order. +// UlcbAddresses will always be an integer multiple of the +// size of an IPv4 address. +// +//--------------------------------------------------------------------- +[ + object, + uuid(71985F44-1CA1-11d3-9CC8-00C04F7971E0), + pointer_default(unique) +] + +interface IBDA_IPV4Filter : IUnknown +{ + + HRESULT + GetMulticastListSize ( + [in, out] ULONG * pulcbAddresses + ); + + HRESULT + PutMulticastList ( + [in] ULONG ulcbAddresses, + [in, size_is(ulcbAddresses)] BYTE pAddressList [] + ); + + HRESULT + GetMulticastList ( + [in, out] ULONG * pulcbAddresses, + [out, size_is(*pulcbAddresses)] BYTE pAddressList [] + ); + + HRESULT + PutMulticastMode ( + [in] ULONG ulModeMask + ); + + HRESULT + GetMulticastMode ( + [out] ULONG* pulModeMask + ); +} + + + +//--------------------------------------------------------------------- +// +// IBDA_IPV6Filter interface +// +// Implemented by a BDA Network Provider +// +// Used by an IPv6 Network Data Sink filter to request +// that the Network Provider make its best effort to tune +// to the stream(s) on which a list of IPv6 multicast addresses +// may be transmitted. +// +// Addresses in the address list are byte aligned in Network order. +// UlcbAddresses will always be an integer multiple of the +// size of an IPv6 address. +// +//--------------------------------------------------------------------- +[ + object, + uuid(E1785A74-2A23-4fb3-9245-A8F88017EF33), + pointer_default(unique) +] + +interface IBDA_IPV6Filter : IUnknown +{ + + HRESULT + GetMulticastListSize ( + [in, out] ULONG * pulcbAddresses + ); + + HRESULT + PutMulticastList ( + [in] ULONG ulcbAddresses, + [in, size_is(ulcbAddresses)] BYTE pAddressList [] + ); + + HRESULT + GetMulticastList ( + [in, out] ULONG * pulcbAddresses, + [out, size_is(*pulcbAddresses)] BYTE pAddressList [] + ); + + HRESULT + PutMulticastMode ( + [in] ULONG ulModeMask + ); + + HRESULT + GetMulticastMode ( + [out] ULONG* pulModeMask + ); +} + + + +//--------------------------------------------------------------------- +// +// IBDA_DeviceControl interface +// +// Implemented by a BDA Device Filter +// +// Used by the Network Provider to commit a series of changes +// on a BDA device filter. The device filter validates and +// accumulates all changes requested after StartChanges(). It +// effects the accumulated list of changes when CommitChanges() is +// called. +// +//--------------------------------------------------------------------- +[ + object, + uuid(FD0A5AF3-B41D-11d2-9C95-00C04F7971E0), + pointer_default(unique) +] + +interface IBDA_DeviceControl : IUnknown +{ + HRESULT + StartChanges ( + void + ); + + HRESULT + CheckChanges ( + void + ); + + HRESULT + CommitChanges ( + void + ); + + HRESULT + GetChangeState ( + [in, out] ULONG * pState + ); + +} + + + +//--------------------------------------------------------------------- +// +// IBDA_PinControl interface +// +// Implemented by a BDA Device Filter's Pin +// +// Used by the Network Provider to determine the BDA PinID and +// PinType on a BDA Filter's Pin +// +//--------------------------------------------------------------------- +[ + object, + uuid(0DED49D5-A8B7-4d5d-97A1-12B0C195874D), + pointer_default(unique) +] + +interface IBDA_PinControl : IUnknown +{ + HRESULT + GetPinID ( + [in, out] ULONG * pulPinID + ); + + HRESULT + GetPinType ( + [in, out] ULONG * pulPinType + ); +} + +//--------------------------------------------------------------------- +// +// IBDA_SignalProperties interface +// +// Implemented by a BDA Device Filter +// +// BDA Signal Properties is used by a Network Provider to inform +// a BDA Device Filter about the current tuning request. The +// Network Provider will call the Put functions when the BDA +// device is first registered with the Network Provider and whenever +// the current tuning request is modified. +// +//--------------------------------------------------------------------- +[ + object, + uuid(D2F1644B-B409-11d2-BC69-00A0C9EE9E16), + pointer_default(unique) +] + +interface IBDA_SignalProperties : IUnknown +{ + HRESULT + PutNetworkType ( + [in] REFGUID guidNetworkType + ); + + HRESULT + GetNetworkType ( + [in, out] GUID * pguidNetworkType + ); + + HRESULT + PutSignalSource ( + [in] ULONG ulSignalSource + ); + + HRESULT + GetSignalSource ( + [in, out] ULONG * pulSignalSource + ); + + HRESULT + PutTuningSpace ( + [in] REFGUID guidTuningSpace + ); + + HRESULT + GetTuningSpace ( + [in, out] GUID * pguidTuingSpace + ); +} + + +//--------------------------------------------------------------------- +// +// IBDA_Topology interface +// +// Implemented by a BDA Device Filter +// +// Used by the Network Provider to query a BDA Device Filter's +// possible topologies (template topology) and to configure +// the device with an appropriate topology for the current +// tuning request. It is also used to get an IUnknown to +// a control node which may be used to set specific tuning +// information. +// +//--------------------------------------------------------------------- +[ + object, + uuid(A14EE835-0A23-11d3-9CC7-00C04F7971E0), + pointer_default(unique) +] + +interface IBDA_Topology : IUnknown +{ + HRESULT + GetNodeTypes ( + [in, out] ULONG * pulcNodeTypes, + [in] ULONG ulcNodeTypesMax, + [in, out, size_is (ulcNodeTypesMax)] ULONG rgulNodeTypes[] + ); + + + HRESULT + GetNodeInterfaces ( + [in] ULONG ulNodeType, + [in, out] ULONG * pulcInterfaces, + [in] ULONG ulcInterfacesMax, + [in, out, size_is (ulcInterfacesMax)] GUID * rgguidInterfaces[] + ); + + HRESULT + GetPinTypes ( + [in, out] ULONG * pulcPinTypes, + [in] ULONG ulcPinTypesMax, + [in, out, size_is (ulcPinTypesMax)] ULONG rgulPinTypes[] + ); + + HRESULT + GetTemplateConnections ( + [in, out] ULONG * pulcConnections, + [in] ULONG ulcConnectionsMax, + [in, out, size_is (ulcConnectionsMax)] BDA_TEMPLATE_CONNECTION rgConnections[] + ); + + HRESULT + CreatePin ( + [in] ULONG ulPinType, + [in, out] ULONG * pulPinId + ); + + HRESULT + DeletePin ( + [in] ULONG ulPinId + ); + + HRESULT + SetMediaType ( + [in] ULONG ulPinId, + [in] AM_MEDIA_TYPE * pMediaType + ); + + HRESULT + SetMedium ( + [in] ULONG ulPinId, + [in] REGPINMEDIUM * pMedium + ); + + HRESULT + CreateTopology ( + [in] ULONG ulInputPinId, + [in] ULONG ulOutputPinId + ); + + HRESULT + GetControlNode ( + [in] ULONG ulInputPinId, + [in] ULONG ulOutputPinId, + [in] ULONG ulNodeType, + [in, out] IUnknown ** ppControlNode + ); +} + +//--------------------------------------------------------------------- +// IBDA_VoidTransform interface +//--------------------------------------------------------------------- +[ + object, + uuid(71985F46-1CA1-11d3-9CC8-00C04F7971E0), + pointer_default(unique) +] + +interface IBDA_VoidTransform : IUnknown +{ + HRESULT + Start ( + void + ); + + HRESULT + Stop ( + void + ); + +} + +//--------------------------------------------------------------------- +// IBDA_NullTransform interface +//--------------------------------------------------------------------- +[ + object, + uuid(DDF15B0D-BD25-11d2-9CA0-00C04F7971E0), + pointer_default(unique) +] + +interface IBDA_NullTransform : IUnknown +{ + HRESULT + Start ( + void + ); + + HRESULT + Stop ( + void + ); + +} + +//--------------------------------------------------------------------- +// IBDA_FrequencyFilter interface +//--------------------------------------------------------------------- +[ + object, + uuid(71985F47-1CA1-11d3-9CC8-00C04F7971E0), + pointer_default(unique) +] + +interface IBDA_FrequencyFilter : IUnknown +{ + HRESULT + put_Autotune ( + [in] ULONG * pulTransponder + ); + + HRESULT + put_Frequency ( + [in] ULONG * pulFrequency + ); + + HRESULT + get_Frequency ( + [in, out] ULONG * pulFrequency + ); + + HRESULT + put_Polarity ( + [in] ULONG * pulPolarity + ); + + HRESULT + get_Polarity ( + [in, out] ULONG * pulPolarity + ); + + HRESULT + put_Range ( + [in] ULONG * pulRange + ); + + HRESULT + get_Range ( + [in, out] ULONG * pulRange + ); +} + +//--------------------------------------------------------------------- +// IBDA_AutoDemodulate interface +//--------------------------------------------------------------------- +[ + object, + uuid(DDF15B12-BD25-11d2-9CA0-00C04F7971E0), + pointer_default(unique) +] + +interface IBDA_AutoDemodulate : IUnknown +{ + HRESULT + put_AutoDemodulate ( + void + ); +} + +//--------------------------------------------------------------------- +// IBDA_DigitalDemodulator interface +//--------------------------------------------------------------------- +[ + object, + uuid(EF30F379-985B-4d10-B640-A79D5E04E1E0), + pointer_default(unique) +] + +interface IBDA_DigitalDemodulator : IUnknown +{ + HRESULT + put_ModulationType ( + [in] ModulationType * pModulationType + ); + + HRESULT + get_ModulationType ( + [in, out] ModulationType * pModulationType + ); + + HRESULT + put_InnerFECMethod ( + [in] FECMethod * pFECMethod + ); + + HRESULT + get_InnerFECMethod ( + [in, out] FECMethod * pFECMethod + ); + + HRESULT + put_InnerFECRate ( + [in] BinaryConvolutionCodeRate * pFECRate + ); + + HRESULT + get_InnerFECRate ( + [in, out] BinaryConvolutionCodeRate * pFECRate + ); + + HRESULT + put_OuterFECMethod ( + [in] FECMethod * pFECMethod + ); + + HRESULT + get_OuterFECMethod ( + [in, out] FECMethod * pFECMethod + ); + + HRESULT + put_OuterFECRate ( + [in] BinaryConvolutionCodeRate * pFECRate + ); + + HRESULT + get_OuterFECRate ( + [in, out] BinaryConvolutionCodeRate * pFECRate + ); + + HRESULT + put_SymbolRate ( + [in] ULONG * pSymbolRate + ); + + HRESULT + get_SymbolRate ( + [in, out] ULONG * pSymbolRate + ); + + HRESULT + put_SpectralInversion ( + [in] SpectralInversion * pSpectralInversion + ); + + HRESULT + get_SpectralInversion ( + [in, out] SpectralInversion * pSpectralInversion + ); +} + +typedef enum +{ + KSPROPERTY_IPSINK_MULTICASTLIST, + KSPROPERTY_IPSINK_ADAPTER_DESCRIPTION, + KSPROPERTY_IPSINK_ADAPTER_ADDRESS + +} KSPROPERTY_IPSINK; + + + +//--------------------------------------------------------------------- +// IBDA_IPSinkControl interface +//--------------------------------------------------------------------- + +[ + object, + uuid(3F4DC8E2-4050-11d3-8F4B-00C04F7971E2), + pointer_default(unique) +] + +interface IBDA_IPSinkControl : IUnknown +{ + HRESULT GetMulticastList ( + [in, out] unsigned long *pulcbSize, + [in, out] BYTE **pbBuffer + ); + + + HRESULT GetAdapterIPAddress ( + [in,out] unsigned long *pulcbSize, + [in,out] BYTE **pbBuffer + ); + +} + +// +// mpeg-2 demultiplexer-specific interfaces follow +// + +//--------------------------------------------------------------------- +// IEnumPIDMap interface +//--------------------------------------------------------------------- + +#ifdef REMOVE_THESE +typedef enum { + MEDIA_TRANSPORT_PACKET, // complete TS packet e.g. pass-through mode + MEDIA_ELEMENTARY_STREAM, // PES payloads; audio/video only + MEDIA_MPEG2_PSI, // PAT, PMT, CAT, Private + MEDIA_TRANSPORT_PAYLOAD // gathered TS packet payloads (PES packets, etc...) +} MEDIA_SAMPLE_CONTENT ; + +typedef struct { + ULONG ulPID ; + MEDIA_SAMPLE_CONTENT MediaSampleContent ; +} PID_MAP ; +#endif // REMOVE_THESE + +[ + object, + uuid (afb6c2a2-2c41-11d3-8a60-0000f81e0e4a), + pointer_default(unique) +] +interface IEnumPIDMap : IUnknown +{ + HRESULT + Next ( + [in] ULONG cRequest, + [in, out, size_is (cRequest)] PID_MAP * pPIDMap, + [out] ULONG * pcReceived + ) ; + + HRESULT + Skip ( + [in] ULONG cRecords + ) ; + + HRESULT + Reset ( + ) ; + + HRESULT + Clone ( + [out] IEnumPIDMap ** ppIEnumPIDMap + ) ; +} ; + +//--------------------------------------------------------------------- +// IMPEG2PIDMap interface +//--------------------------------------------------------------------- + +[ + object, + uuid (afb6c2a1-2c41-11d3-8a60-0000f81e0e4a), + pointer_default(unique) +] +interface IMPEG2PIDMap : IUnknown +{ + HRESULT + MapPID ( + [in] ULONG culPID, + [in] ULONG * pulPID, + [in] MEDIA_SAMPLE_CONTENT MediaSampleContent + ) ; + + HRESULT + UnmapPID ( + [in] ULONG culPID, + [in] ULONG * pulPID + ) ; + + HRESULT + EnumPIDMap ( + [out] IEnumPIDMap ** pIEnumPIDMap + ) ; +} ; diff --git a/windows_libs/mssdk/include/DShowIDL/control.odl b/windows_libs/mssdk/include/DShowIDL/control.odl new file mode 100644 index 00000000..8eec365f --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/control.odl @@ -0,0 +1,912 @@ +//==========================================================================; +// +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR +// PURPOSE. +// +// Copyright (c) 1992 - 1999 Microsoft Corporation. All Rights Reserved. +// +//--------------------------------------------------------------------------; + +// Neutral/English language type library for basic Quartz control interfaces + +// the quartz type library defines the basic control interfaces +[ + uuid(56a868b0-0ad4-11ce-b03a-0020af0ba770), + helpstring("ActiveMovie control type library"), + lcid(0x0000), + version(1.0) +] +library QuartzTypeLib +{ + importlib("STDOLE32.TLB"); + + // types are restricted to be automation-compatible + typedef double REFTIME; // ReferenceTime + typedef LONG_PTR OAEVENT; // should be a HANDLE + typedef LONG_PTR OAHWND; // should be an hwnd + + // from strmif.idl + typedef long OAFilterState; + + // collection interface - represents a collection of IUnknowns + // this is used below to collect filter-info objects, registry-filters + // pin-info objects and wrapped media type objects + [ + uuid(56a868b9-0ad4-11ce-b03a-0020af0ba770), + helpstring("Collection"), + odl, + oleautomation, + dual + ] + interface IAMCollection : IDispatch + { + // number of items in collection + [propget] + HRESULT Count( + [out, retval] LONG* plCount); + + // return IUnknown for contained item by index + HRESULT Item( + [in] long lItem, + [out] IUnknown** ppUnk); + + // return IUnknown for an object that implements IEnumVARIANT on + // this collection + [propget] + HRESULT _NewEnum( + [out, retval] IUnknown** ppUnk); + } + + + // core control providing state control + [ + uuid(56a868b1-0ad4-11ce-b03a-0020af0ba770), + helpstring("IMediaControl interface"), + odl, + oleautomation, + dual + ] + interface IMediaControl : IDispatch + { + // methods + HRESULT Run(); + HRESULT Pause(); + HRESULT Stop(); + + //returns the state. same semantics as IMediaFilter::GetState + + HRESULT GetState( + [in] LONG msTimeout, + [out] OAFilterState* pfs); + + // adds and connects filters needed to play the specified file + // (same as IFilterGraph::RenderFile) + HRESULT RenderFile( + [in] BSTR strFilename); + + // adds to the graph the source filter that can read this file, + // and returns an IFilterInfo object for it (actually returns + // an IDispatch for the IFilterInfo object). + HRESULT AddSourceFilter( + [in] BSTR strFilename, + [out] IDispatch**ppUnk); + + // get a collection of IFilterInfo objects representing the + // filters in the graph (returns IDispatch for an object + // that supports IAMCollection + [propget] + HRESULT FilterCollection( + [out, retval] IDispatch** ppUnk); + + // get a collection of IRegFilter objects representing the + // filters available in the registry + [propget] + HRESULT RegFilterCollection( + [out, retval] IDispatch** ppUnk); + + HRESULT StopWhenReady(); + } + + + // provides an event notification scheme passing events + // asynchronously to applications. See also IMediaEventSink in + // strmif.idl and sdk\h\evcodes.h. + // + // this interface behaves as if events are held on a queue. A call to + // IMediaEventSink::Notify will place an event on this queue. Calling + // GetEvent removes the first item off the queue and returns it. Items are + // returned in the order they were queued (there is no priority scheme). + // The event handle is in a signalled state iff the queue is non-empty. + // + // Apps that issue multiple Run calls without always picking up the + // completion events are advised to call GetEvent or WaitForCompletion + // (with a 0 timeout) repeatedly to remove all events from the queue + // when in stopped or paused state before each Run method. + // + // Parameters to events are actually LONG, IUnknown* or BSTR. You need to + // look at evcode.h for details of parameters to a specific event code. + // In order to correctly free resources, always call FreeEventParams + // after receiving an event. + // + + [ + uuid(56a868b6-0ad4-11ce-b03a-0020af0ba770), + helpstring("IMediaEvent interface"), + odl, + oleautomation, + dual + ] + interface IMediaEvent : IDispatch + { + // get back the event handle. This is manual-reset + // (don't - it's reset by the event mechanism) and remains set + // when events are queued, and reset when the queue is empty. + HRESULT GetEventHandle( + [out] OAEVENT * hEvent); + + // remove the next event notification from the head of the queue and + // return it. Waits up to msTimeout millisecs if there are no events. + // if a timeout occurs without any events, this method will return + // E_ABORT, and the value of the event code and other parameters + // is undefined. + // + // If this call returns successfully the caller MUST call + // FreeEventParams(lEventCode, lParam1, lParam2) to release + // resources held inside the event arguments + // + HRESULT GetEvent( + [out] long * lEventCode, + [out] LONG_PTR * lParam1, + [out] LONG_PTR * lParam2, + [in] long msTimeout + ); + + // Calls GetEvent repeatedly discarding events until it finds a + // completion event (EC_COMPLETE, EC_ERRORABORT, or EC_USERABORT). + // The completion event is removed from the queue and returned + // in pEvCode. Note that the object is still in running mode until + // a Pause or Stop call is made. + // If the timeout occurs, *pEvCode will be 0 and E_ABORT will be + // returned. + HRESULT WaitForCompletion( + [in] long msTimeout, + [out] long * pEvCode); + + // cancels any system handling of the specified event code + // and ensures that the events are passed straight to the application + // (via GetEvent) and not handled. A good example of this is + // EC_REPAINT: default handling for this ensures the painting of the + // window and does not get posted to the app. + HRESULT CancelDefaultHandling( + [in] long lEvCode); + + // restore the normal system default handling that may have been + // cancelled by CancelDefaultHandling(). + HRESULT RestoreDefaultHandling( [in] long lEvCode); + + // Free any resources associated with the parameters to an event. + // Event parameters may be LONGs, IUnknown* or BSTR. No action + // is taken with LONGs. IUnknown are passed addrefed and need a + // Release call. BSTR are allocated by the task allocator and will be + // freed by calling the task allocator. + HRESULT FreeEventParams( + [in] long lEvCode, + [in] LONG_PTR lParam1, + [in] LONG_PTR lParam2 + ); + } + + [ + uuid(56a868c0-0ad4-11ce-b03a-0020af0ba770), + helpstring("IMediaEventEx interface"), + odl + ] + interface IMediaEventEx : IMediaEvent + { + + // Register a window to send messages to when events occur + // Parameters: + // + // hwnd - handle of window to notify - + // pass NULL to stop notification + // lMsg - Message id to pass messages with + // lInstanceData - will come back in lParam + // + // The event information must still be retrived by a call + // to GetEvent when the window message is received. + // + // Multiple events may be notified with one window message. + // + HRESULT SetNotifyWindow( + [in] OAHWND hwnd, + [in] long lMsg, + [in] LONG_PTR lInstanceData + ); + + // Turn events notification on or off + // lNoNotify = 0x00 event notification is ON + // lNoNotify = 0x01 event notification is OFF. The + // handle returned by GetEventHandle will be signalled at + // end of stream + HRESULT SetNotifyFlags( + [in] long lNoNotifyFlags + ); + HRESULT GetNotifyFlags( + [out] long *lplNoNotifyFlags + ); + } + + + + + // seek/cueing for positional media + [ + uuid(56a868b2-0ad4-11ce-b03a-0020af0ba770), + helpstring("IMediaPosition interface"), + odl, + oleautomation, + dual + ] + interface IMediaPosition : IDispatch + { + // properties + + [propget] + HRESULT Duration( + [out, retval] REFTIME* plength); + + [propput] + HRESULT CurrentPosition( + [in] REFTIME llTime); + + [propget] + HRESULT CurrentPosition( + [out, retval] REFTIME* pllTime); + + [propget] + HRESULT StopTime( + [out, retval] REFTIME* pllTime); + [propput] + HRESULT StopTime( + [in] REFTIME llTime); + + [propget] + HRESULT PrerollTime( + [out, retval] REFTIME* pllTime); + [propput] + HRESULT PrerollTime( + [in] REFTIME llTime); + + [propput] + HRESULT Rate( + [in] double dRate); + [propget] + HRESULT Rate( + [out, retval] double * pdRate); + + HRESULT CanSeekForward([out, retval] LONG *pCanSeekForward); + HRESULT CanSeekBackward([out, retval] LONG *pCanSeekBackward); + } + + // basic audio-related functionality + [ + uuid(56a868b3-0ad4-11ce-b03a-0020af0ba770), + helpstring("IBasicAudio interface"), + odl, + oleautomation, + dual + ] + interface IBasicAudio : IDispatch + { + // properties + + [propput] + HRESULT Volume( + [in] long lVolume); + [propget] + HRESULT Volume( + [out, retval] long * plVolume); + + [propput] + HRESULT Balance( + [in] long lBalance); + [propget] + HRESULT Balance( + [out, retval] long * plBalance); + } + + // basic window-related functionality + [ + uuid(56a868b4-0ad4-11ce-b03a-0020af0ba770), + helpstring("IVideoWindow interface"), + odl, + oleautomation, + dual + ] + interface IVideoWindow : IDispatch + { + // properties + + // set and get the window title caption + + [propput] + HRESULT Caption([in] BSTR strCaption); + [propget] + HRESULT Caption([out, retval] BSTR *strCaption); + + // change the window styles (as per Win32) + + [propput] + HRESULT WindowStyle([in] long WindowStyle); + [propget] + HRESULT WindowStyle([out, retval] long *WindowStyle); + + // change the extended window styles (as per Win32) + + [propput] + HRESULT WindowStyleEx([in] long WindowStyleEx); + [propget] + HRESULT WindowStyleEx([out, retval] long *WindowStyleEx); + + [propput] + HRESULT AutoShow([in] long AutoShow); + [propget] + HRESULT AutoShow([out, retval] long *AutoShow); + + // change the window state (as per Win32) + + [propput] + HRESULT WindowState([in] long WindowState); + [propget] + HRESULT WindowState([out, retval] long *WindowState); + + // realise the palette in the background + + [propput] + HRESULT BackgroundPalette([in] long BackgroundPalette); + [propget] + HRESULT BackgroundPalette([out, retval] long *pBackgroundPalette); + + // affect the visibility of the window + + [propput] + HRESULT Visible([in] long Visible); + [propget] + HRESULT Visible([out, retval] long *pVisible); + + // change the desktop position of the video window + + [propput] + HRESULT Left([in] long Left); + [propget] + HRESULT Left([out, retval] long *pLeft); + + [propput] + HRESULT Width([in] long Width); + [propget] + HRESULT Width([out, retval] long *pWidth); + + [propput] + HRESULT Top([in] long Top); + [propget] + HRESULT Top([out, retval] long *pTop); + + [propput] + HRESULT Height([in] long Height); + [propget] + HRESULT Height([out, retval] long *pHeight); + + // change the owning window of the video + + [propput] + HRESULT Owner([in] OAHWND Owner); + [propget] + HRESULT Owner([out, retval] OAHWND *Owner); + + // change the window to receive posted messages + + [propput] + HRESULT MessageDrain([in] OAHWND Drain); + [propget] + HRESULT MessageDrain([out, retval] OAHWND *Drain); + + [propget] + HRESULT BorderColor([out, retval] long *Color); + + [propput] + HRESULT BorderColor([in] long Color); + + [propget] + HRESULT FullScreenMode([out, retval] long *FullScreenMode); + + [propput] + HRESULT FullScreenMode([in] long FullScreenMode); + + // methods + + // ask the renderer to grab it's window the foreground + // and optionally also give the window the input focus + HRESULT SetWindowForeground([in] long Focus); + + // owners should pass WM_PALETTECHANGED and WM_SYSCOLORCHANGE + // messages on the filter graph so they can be distributed + // otherwise child renderers never see these messages go by + + HRESULT NotifyOwnerMessage([in] OAHWND hwnd, + [in] long uMsg, + [in] LONG_PTR wParam, + [in] LONG_PTR lParam + ); + + // get and set the window position on the desktop + + HRESULT SetWindowPosition([in] long Left, + [in] long Top, + [in] long Width, + [in] long Height); + + HRESULT GetWindowPosition([out] long *pLeft, + [out] long *pTop, + [out] long *pWidth, + [out] long *pHeight); + + // get the ideal sizes for the video image playback (client) area + + HRESULT GetMinIdealImageSize([out] long *pWidth,[out] long *pHeight); + HRESULT GetMaxIdealImageSize([out] long *pWidth,[out] long *pHeight); + + // get the restored window size when we're maximised or iconic + + HRESULT GetRestorePosition([out] long *pLeft, + [out] long *pTop, + [out] long *pWidth, + [out] long *pHeight); + + // show and hide cursors useful when fullscreen + HRESULT HideCursor([in] long HideCursor); + HRESULT IsCursorHidden([out] long *CursorHidden); + } + + // basic video-related functionality + [ + uuid(56a868b5-0ad4-11ce-b03a-0020af0ba770), + helpstring("IBasicVideo interface"), + odl, + oleautomation, + dual + ] + interface IBasicVideo : IDispatch + { + // properties + + // Video specific (approximate) bit and frame rates + + [propget] + HRESULT AvgTimePerFrame([out, retval] REFTIME *pAvgTimePerFrame); + + [propget] + HRESULT BitRate([out, retval] long *pBitRate); + + [propget] + HRESULT BitErrorRate([out, retval] long *pBitErrorRate); + + // read the native video size + + [propget] + HRESULT VideoWidth([out, retval] long *pVideoWidth); + + [propget] + HRESULT VideoHeight([out, retval] long *pVideoHeight); + + // change the source rectangle for the video + + [propput] + HRESULT SourceLeft([in] long SourceLeft); + [propget] + HRESULT SourceLeft([out, retval] long *pSourceLeft); + + [propput] + HRESULT SourceWidth([in] long SourceWidth); + [propget] + HRESULT SourceWidth([out, retval] long *pSourceWidth); + + [propput] + HRESULT SourceTop([in] long SourceTop); + [propget] + HRESULT SourceTop([out, retval] long *pSourceTop); + + [propput] + HRESULT SourceHeight([in] long SourceHeight); + [propget] + HRESULT SourceHeight([out, retval] long *pSourceHeight); + + // change the destination rectangle for the video + + [propput] + HRESULT DestinationLeft([in] long DestinationLeft); + [propget] + HRESULT DestinationLeft([out, retval] long *pDestinationLeft); + + [propput] + HRESULT DestinationWidth([in] long DestinationWidth); + [propget] + HRESULT DestinationWidth([out, retval] long *pDestinationWidth); + + [propput] + HRESULT DestinationTop([in] long DestinationTop); + [propget] + HRESULT DestinationTop([out, retval] long *pDestinationTop); + + [propput] + HRESULT DestinationHeight([in] long DestinationHeight); + [propget] + HRESULT DestinationHeight([out, retval] long *pDestinationHeight); + + // methods + + // get and set the source rectangle position + + HRESULT SetSourcePosition([in] long Left, + [in] long Top, + [in] long Width, + [in] long Height); + + HRESULT GetSourcePosition([out] long *pLeft, + [out] long *pTop, + [out] long *pWidth, + [out] long *pHeight); + + HRESULT SetDefaultSourcePosition(); + + // get and set the destination rectangle position + + HRESULT SetDestinationPosition([in] long Left, + [in] long Top, + [in] long Width, + [in] long Height); + + HRESULT GetDestinationPosition([out] long *pLeft, + [out] long *pTop, + [out] long *pWidth, + [out] long *pHeight); + + HRESULT SetDefaultDestinationPosition(); + + // get the native video dimensions + + HRESULT GetVideoSize([out] long *pWidth,[out] long *pHeight); + + // get all or some of the current video palette + + HRESULT GetVideoPaletteEntries([in] long StartIndex, + [in] long Entries, + [out] long *pRetrieved, + [out] long *pPalette); + + HRESULT GetCurrentImage([in,out] long *pBufferSize, + [out] long *pDIBImage); + + // are we using a default source or destination + + HRESULT IsUsingDefaultSource(); + HRESULT IsUsingDefaultDestination(); + } + + // interface extension to IBasicVideo to return preferred aspect ratio + [ + uuid(329bb360-f6ea-11d1-9038-00a0c9697298), + helpstring("IBasicVideo2"), + odl + ] + interface IBasicVideo2 : IBasicVideo + { + // This may not match the native video dimensions because of + // non-square pixels or whatever. + // The video may not always be displayed in the preferred + // aspect ratio for performance reasons + + HRESULT GetPreferredAspectRatio([out] long *plAspectX, + [out] long *plAspectY); + } + + // interface returned to a command that has been queued via IQueueCommand + [ + uuid(56a868b8-0ad4-11ce-b03a-0020af0ba770), + helpstring("IDeferredCommand"), + odl + ] + interface IDeferredCommand : IUnknown + { + HRESULT Cancel(); + HRESULT Confidence( + [out] LONG* pConfidence); + HRESULT Postpone( + [in] REFTIME newtime); + // return value is S_OK if completed. phrResult is set to the + // result of the deferred command. + HRESULT GetHResult( + [out] HRESULT* phrResult); + }; + + // queue an IDispatch-based command for execution at a specified time + [ + uuid(56a868b7-0ad4-11ce-b03a-0020af0ba770), + helpstring("IQueueCommand"), + odl + ] + interface IQueueCommand : IUnknown + { + HRESULT InvokeAtStreamTime( + [out] IDeferredCommand** pCmd, + [in] REFTIME time, // at this streamtime + [in] GUID* iid, // call this interface + [in] long dispidMethod, // ..and this method + [in] short wFlags, // method/property + [in] long cArgs, // count of args + [in] VARIANT* pDispParams, // actual args + [in, out] VARIANT* pvarResult, // return value + [out] short* puArgErr // which arg in error + ); + + HRESULT InvokeAtPresentationTime( + [out] IDeferredCommand** pCmd, + [in] REFTIME time, // at this presentation time + [in] GUID* iid, // call this interface + [in] long dispidMethod, // ..and this method + [in] short wFlags, // method/property + [in] long cArgs, // count of args + [in] VARIANT* pDispParams, // actual args + [in, out] VARIANT* pvarResult, // return value + [out] short* puArgErr // which arg in error + ); + + }; + + + + // the filgraph object (CLSID_Filgraph) + [ + uuid(e436ebb3-524f-11ce-9f53-0020af0ba770), + helpstring("Filtergraph type info") + ] + coclass FilgraphManager + { + [default] interface IMediaControl; + interface IMediaEvent; + interface IMediaPosition; + interface IBasicAudio; + interface IBasicVideo; + interface IVideoWindow; + + }; + + + // represents a filter (you can't QI for IBaseFilter from this object) + [ + uuid(56a868ba-0ad4-11ce-b03a-0020af0ba770), + helpstring("FilterInfo"), + odl, + oleautomation, + dual + ] + interface IFilterInfo : IDispatch + { + // find a pin given an id - returns an object supporting + // IPinInfo + HRESULT FindPin( + [in] BSTR strPinID, + [out] IDispatch** ppUnk); + + // filter name + [propget] + HRESULT Name( + [out, retval] BSTR* strName); + + // Vendor info string + [propget] + HRESULT VendorInfo( + [out, retval] BSTR* strVendorInfo); + + // returns the actual filter object (supports IBaseFilter) + [propget] + HRESULT Filter( + [out, retval] IUnknown **ppUnk); + + // returns an IAMCollection object containing the PinInfo objects + // for this filter + [propget] + HRESULT Pins( + [out, retval] IDispatch ** ppUnk); + + // returns -1 if true or 0 if false (OATRUE/FALSE) + [propget] + HRESULT IsFileSource( + [out, retval] LONG * pbIsSource); + + [propget] + HRESULT Filename( + [out, retval] BSTR* pstrFilename); + + [propput] + HRESULT Filename( + [in] BSTR strFilename); + } + + [ + uuid(56a868bb-0ad4-11ce-b03a-0020af0ba770), + helpstring("Registry Filter Info"), + odl, + oleautomation, + dual + ] + interface IRegFilterInfo : IDispatch + { + // get the name of this filter + [propget] + HRESULT Name( + [out, retval] BSTR* strName); + + + // make an instance of this filter, add it to the graph and + // return an IFilterInfo for it. + HRESULT Filter( + [out] IDispatch** ppUnk); + } + + // wrapper for a media type + [ + uuid(56a868bc-0ad4-11ce-b03a-0020af0ba770), + helpstring("Media Type"), + odl, + oleautomation, + dual + ] + interface IMediaTypeInfo : IDispatch + { + // get the major type GUID as a string + [propget] + HRESULT Type( + [out, retval] BSTR* strType); + + // get the subtype GUID as a string + [propget] + HRESULT Subtype( + [out, retval] BSTR* strType); + } + + [ + uuid(56a868bd-0ad4-11ce-b03a-0020af0ba770), + helpstring("Pin Info"), + odl, + oleautomation, + dual + ] + interface IPinInfo : IDispatch + { + // get the pin object (IUnknown for an object that + // supports IPin + [propget] + HRESULT Pin( + [out, retval] IUnknown** ppUnk); + + // get the PinInfo object for the pin we are connected to + [propget] + HRESULT ConnectedTo( + [out, retval] IDispatch** ppUnk); + + // get the media type on this connection - returns an + // object supporting IMediaTypeInfo + [propget] + HRESULT ConnectionMediaType( + [out, retval] IDispatch** ppUnk); + + + // return the FilterInfo object for the filter this pin + // is part of + [propget] + HRESULT FilterInfo( + [out, retval] IDispatch** ppUnk); + + // get the name of this pin + [propget] + HRESULT Name( + [out, retval] BSTR* ppUnk); + + // pin direction + [propget] + HRESULT Direction( + [out, retval] LONG *ppDirection); + + // PinID - can pass to IFilterInfo::FindPin + [propget] + HRESULT PinID( + [out, retval] BSTR* strPinID); + + // collection of preferred media types (IAMCollection) + [propget] + HRESULT MediaTypes( + [out, retval] IDispatch** ppUnk); + + // Connect to the following pin, using other transform + // filters as necessary. pPin can support either IPin or IPinInfo + HRESULT Connect( + [in] IUnknown* pPin); + + // Connect directly to the following pin, not using any intermediate + // filters + HRESULT ConnectDirect( + [in] IUnknown* pPin); + + // Connect directly to the following pin, using the specified + // media type only. pPin is an object that must support either + // IPin or IPinInfo, and pMediaType must support IMediaTypeInfo. + HRESULT ConnectWithType( + [in] IUnknown * pPin, + [in] IDispatch * pMediaType); + + // disconnect this pin and the corresponding connected pin from + // each other. (Calls IPin::Disconnect on both pins). + HRESULT Disconnect(void); + + // render this pin using any necessary transform and rendering filters + HRESULT Render(void); + } + + //-------------------------------------------------------------------- + // + // IAMStats - statistics + // + // Note that the calls using an index are likely to be much faster + //-------------------------------------------------------------------- + + [ + uuid(bc9bcf80-dcd2-11d2-abf6-00a0c905f375), + helpstring("Statistics"), + odl, + oleautomation, + dual + ] + interface IAMStats : IDispatch { + // Reset all stats + HRESULT Reset(); + + // Get number of stats collected + [propget] + HRESULT Count( + [out, retval] LONG* plCount); + + // Pull out a specific value by position + HRESULT GetValueByIndex([in] long lIndex, + [out] BSTR *szName, + [out] long *lCount, + [out] double *dLast, + [out] double *dAverage, + [out] double *dStdDev, + [out] double *dMin, + [out] double *dMax); + + // Pull out a specific value by name + HRESULT GetValueByName([in] BSTR szName, + [out] long *lIndex, + [out] long *lCount, + [out] double *dLast, + [out] double *dAverage, + [out] double *dStdDev, + [out] double *dMin, + [out] double *dMax); + + + // The calls below are for generators of statistics + + // Return the index for a string - optinally create + HRESULT GetIndex([in] BSTR szName, + [in] long lCreate, + [out] long *plIndex); + + // Add a new value + HRESULT AddValue([in] long lIndex, + [in] double dValue); + } +}; diff --git a/windows_libs/mssdk/include/DShowIDL/ddstream.idl b/windows_libs/mssdk/include/DShowIDL/ddstream.idl new file mode 100644 index 00000000..d507b736 --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/ddstream.idl @@ -0,0 +1,86 @@ +//------------------------------------------------------------------------------ +// File: DDStream.idl +// +// Desc: +// +// Copyright (c) 1998 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +import "unknwn.idl"; +import "mmstream.idl"; + +cpp_quote("//") +cpp_quote("// The following declarations within the 'if 0' block are dummy typedefs used to make") +cpp_quote("// the ddstream.idl file build. The actual definitions are contained in DDRAW.H") +cpp_quote("//") +cpp_quote("#if 0") +typedef void * LPDDSURFACEDESC; +typedef struct tDDSURFACEDESC DDSURFACEDESC; +cpp_quote("#endif") +cpp_quote("#include ") + +enum { + DDSFF_PROGRESSIVERENDER = 0x00000001 +}; + +interface IDirectDraw; +interface IDirectDrawSurface; +interface IDirectDrawPalette; + +interface IDirectDrawMediaStream; +interface IDirectDrawStreamSample; + +// IDirectDrawMediaStream +[ +object, +local, +uuid(F4104FCE-9A70-11d0-8FDE-00C04FD9189D), +pointer_default(unique) +] +interface IDirectDrawMediaStream : IMediaStream +{ + HRESULT GetFormat( + [out] DDSURFACEDESC *pDDSDCurrent, + [out] IDirectDrawPalette **ppDirectDrawPalette, + [out] DDSURFACEDESC *pDDSDDesired, + [out] DWORD *pdwFlags); + + HRESULT SetFormat( + [in] const DDSURFACEDESC *pDDSurfaceDesc, + [in] IDirectDrawPalette *pDirectDrawPalette); + + HRESULT GetDirectDraw( + [out] IDirectDraw **ppDirectDraw); + + HRESULT SetDirectDraw( + [in] IDirectDraw *pDirectDraw); + + HRESULT CreateSample( + [in] IDirectDrawSurface *pSurface, + [in] const RECT *pRect, + [in] DWORD dwFlags, + [out]IDirectDrawStreamSample **ppSample); + + HRESULT GetTimePerFrame( + [out] STREAM_TIME *pFrameTime); +}; + + +// IDirectDrawStreamSample +[ +object, +local, +uuid(F4104FCF-9A70-11d0-8FDE-00C04FD9189D), +pointer_default(unique) +] +interface IDirectDrawStreamSample : IStreamSample +{ + HRESULT GetSurface( + [out] IDirectDrawSurface ** ppDirectDrawSurface, + [out] RECT * pRect); + + HRESULT SetRect( + [in] const RECT * pRect); + +}; diff --git a/windows_libs/mssdk/include/DShowIDL/devenum.idl b/windows_libs/mssdk/include/DShowIDL/devenum.idl new file mode 100644 index 00000000..e8f0cd50 --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/devenum.idl @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// File: DevEnum.idl +// +// Desc: IDL source for devenum.dll. This file will be processed by the +// MIDL tool to produce the type library (devenum.tlb) and marshalling +// code. +// +// Copyright (c) 1998 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +cpp_quote("#define CDEF_CLASS_DEFAULT 0x0001") +cpp_quote("#define CDEF_BYPASS_CLASS_MANAGER 0x0002") +//cpp_quote("#define CDEF_CLASS_LEGACY 0x0004") +cpp_quote("#define CDEF_MERIT_ABOVE_DO_NOT_USE 0x0008") + +[ + object, + uuid(29840822-5B84-11D0-BD3B-00A0C911CE86), + pointer_default(unique) +] +interface ICreateDevEnum : IUnknown +{ + import "oaidl.idl"; + + HRESULT CreateClassEnumerator( + [in] REFCLSID clsidDeviceClass, + [out] IEnumMoniker ** ppEnumMoniker, + [in] DWORD dwFlags); +} diff --git a/windows_libs/mssdk/include/DShowIDL/dmodshow.idl b/windows_libs/mssdk/include/DShowIDL/dmodshow.idl new file mode 100644 index 00000000..a6cc3e7f --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/dmodshow.idl @@ -0,0 +1,32 @@ +//------------------------------------------------------------------------------ +// File: DMODShow.idl +// +// Desc: +// +// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +import "unknwn.idl"; +import "objidl.idl"; +import "mediaobj.idl"; + +// 94297043-bd82-4dfd-b0de-8177739c6d20 +cpp_quote("DEFINE_GUID(CLSID_DMOWrapperFilter, 0x94297043,0xbd82,0x4dfd,0xb0,0xde,0x81,0x77,0x73,0x9c,0x6d,0x20);") +// bcd5796c-bd52-4d30-ab76-70f975b89199 +cpp_quote("DEFINE_GUID(CLSID_DMOFilterCategory,0xbcd5796c,0xbd52,0x4d30,0xab,0x76,0x70,0xf9,0x75,0xb8,0x91,0x99);") + + +[ + object, + uuid(52d6f586-9f0f-4824-8fc8-e32ca04930c2), +] +interface IDMOWrapperFilter : IUnknown +{ + // Init is passed in the clsid (so it can call CoCreateInstance) + // and the catgory under which the DMO lives + // Note that catDMO can be CLSID_NULL in which case no special + // category-specific processing will be invoked in the wrapper filter + HRESULT Init(REFCLSID clsidDMO, REFCLSID catDMO); +} + diff --git a/windows_libs/mssdk/include/DShowIDL/dshowasf.idl b/windows_libs/mssdk/include/DShowIDL/dshowasf.idl new file mode 100644 index 00000000..6f2619d7 --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/dshowasf.idl @@ -0,0 +1,59 @@ +//------------------------------------------------------------------------------ +// File: DShowASF.idl +// +// Desc: +// +// Copyright (c) 1992-2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +import "unknwn.idl"; +import "objidl.idl"; +import "strmif.idl"; // for media type and time definitions +import "wmsdkidl.idl"; + +cpp_quote( "EXTERN_GUID( IID_IConfigAsfWriter,0x45086030,0xF7E4,0x486a,0xB5,0x04,0x82,0x6B,0xB5,0x79,0x2A,0x3B );" ) + +interface IConfigAsfWriter; +interface IWMProfile; + +// Interface to control the ASF writer +[ +object, +uuid(45086030-F7E4-486a-B504-826BB5792A3B), +pointer_default(unique) +] +interface IConfigAsfWriter : IUnknown +{ + // + // The user is expected to enumerate profiles using the wmsdk IWMProfileManager + // method and then pass the desired profile index to the ASF Writer filter via this + // method. The filter will then try to configure itself for the selected profile. + // + // NOTE: These 2 XXXProfileId methods are now obsolete because they assume + // version 4.0 WMSDK profiles. To configure the filter for later profile + // versions using a profile index, use the XXXProfile methods which take + // the IWMProfile* directly. + // + HRESULT ConfigureFilterUsingProfileId([in] DWORD dwProfileId); + HRESULT GetCurrentProfileId([out] DWORD *pdwProfileId); + + // + // configure using a pre-defined wmsdk profile guid + // + HRESULT ConfigureFilterUsingProfileGuid([in] REFGUID guidProfile); + HRESULT GetCurrentProfileGuid([out] GUID *pProfileGuid); + + // + // Use these methods when a custom profile setup is preferred + // + HRESULT ConfigureFilterUsingProfile([in] IWMProfile * pProfile); + HRESULT GetCurrentProfile([out] IWMProfile **ppProfile); + + // + // allow app to control whether or not to index file + // + HRESULT SetIndexMode( [in] BOOL bIndexFile ); + HRESULT GetIndexMode( [out] BOOL *pbIndexFile ); +} + diff --git a/windows_libs/mssdk/include/DShowIDL/dvdif.idl b/windows_libs/mssdk/include/DShowIDL/dvdif.idl new file mode 100644 index 00000000..f9eb2b47 --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/dvdif.idl @@ -0,0 +1,2324 @@ +//------------------------------------------------------------------------------ +// File: DVDIf.idl +// +// Desc: DirectShow interfaces to control playback of a DVD filter graph. +// +// Copyright (c) 1992-2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +// forward declarations - these are the interfaces declared in this file + +import "unknwn.idl"; +import "objidl.idl"; + +cpp_quote("#include ") + +interface IDvdControl; +interface IDvdInfo; +interface IDirectDraw; +interface IDirectDrawSurface; +interface IDvdGraphBuilder ; +interface IDDrawExclModeVideo; +interface IDDrawExclModeVideoCallback; +interface IDvdCmd; +interface IDvdState; + + +//========================================================================== +//========================================================================== +// +// typedefs used by IDvdControl and IDvdInfo interfaces. +// +//========================================================================== +//========================================================================== + +typedef enum tagDVD_DOMAIN { + // The DVD_DOMAIN is used to indicate the stat of a DVD player. + DVD_DOMAIN_FirstPlay=1, // doing default initialization of a dvd disc + DVD_DOMAIN_VideoManagerMenu, // displaying menus for whole disc + DVD_DOMAIN_VideoTitleSetMenu, // displaying menus for current title set + DVD_DOMAIN_Title, // displaying current title + DVD_DOMAIN_Stop // player is in stopped state +} DVD_DOMAIN; + +typedef enum tagDVD_MENU_ID { + DVD_MENU_Title = 2, // to choose a title from any VTS in a DVD-Video volume + DVD_MENU_Root = 3, // main menu for a specific VTS + DVD_MENU_Subpicture =4, // to choose subpicture stream in a VTS + DVD_MENU_Audio = 5, // to choose audio stream in a VTS + DVD_MENU_Angle = 6, // to choose angle num in a VTS + DVD_MENU_Chapter = 7 // to choose a chapter in a VTS + // the Root menu always provides a means of getting to to Subpicture, Audio, + // Angle and Chapter menus if they exist. +} DVD_MENU_ID; + +typedef enum tagDVD_DISC_SIDE { + DVD_SIDE_A = 1, + DVD_SIDE_B = 2 +} DVD_DISC_SIDE; + + +typedef enum tagDVD_PREFERRED_DISPLAY_MODE +{ + // DVD_PREFERRED_DISPLAY_MODE is used to indicate the user's + // preferred window aspect ratio and preferred method of converion of + // 16*9 content to a 4*3 window aspect ratio. Pan-scan and letterboxing are + // the two conversion methods. This enum is used to indicate only a preference of + // conversion mechinism since some content can only be converted using one + // of these methods. 4*3 content is converted to a 16*9 window always by using + // "reverse" letterboxing where black bars are added to the right and left + // sides of the display instead of the top and bottom of the display as in the 16*9 + // to 4*3 conversion useing letterboxing. + DISPLAY_CONTENT_DEFAULT = 0, // default to content + DISPLAY_16x9 = 1, // 16x9 display + DISPLAY_4x3_PANSCAN_PREFERRED = 2, // 4x3 display with pan-scan preferrence + DISPLAY_4x3_LETTERBOX_PREFERRED = 3 // 4x3 display with letterbox preferrence + +} DVD_PREFERRED_DISPLAY_MODE; + +typedef WORD DVD_REGISTER; +typedef DVD_REGISTER GPRMARRAY[16]; // DVD-Video 1.0 has 16 16-bit General Parameter Registers +typedef DVD_REGISTER SPRMARRAY[24]; // DVD-Video 1.0 has 24 16-bit System Parameter Registers + + + +// these are only for IDVDInfo1 compatibility and require the DVD-Video 1.0 specification +// Please use the IDVDInfo2's DVD_Title/MenuAttributes, DVD_VideoAttributes, DVD_AudioAttributes, and DVD_SubpictureAttributes +typedef struct tagDVD_ATR +{ + // + // Refer to the DVD-Video 1.0 spec to parse these structures. + // + ULONG ulCAT; // VMG_CAT if this is for a volume; or VTS_CAT + // if this is for a Video Title Set (VTS) + BYTE pbATRI[768];// All stream attributes for menu and title from bytes + // 256 to 1023 of VMGI or VTSI. +} DVD_ATR; +typedef BYTE DVD_VideoATR[2]; // video stream attributes. +typedef BYTE DVD_AudioATR[8]; // audio stream attributes. +typedef BYTE DVD_SubpictureATR[6]; // subpicture stream attributes. + +// DVD1.0 Timecode is BCD encoded in this format: 0xHhMmSsFf, where +// H is tens of hours +// h is hours +// M is tens of minutes +// m is minutes +// S is tens of seconds +// s is seconds +// F is tens of frames +// f is frames +// Note that you must know the frame rate to interperate the frame count as time. +typedef enum tagDVD_FRAMERATE +{ + DVD_FPS_25 =1, // 25 frames per second + DVD_FPS_30NonDrop = 3 // exactly 30 frames per second +} DVD_FRAMERATE; + +cpp_quote("typedef struct tagDVD_TIMECODE") +cpp_quote("{") +cpp_quote(" ULONG Hours1 :4; // Hours") +cpp_quote(" ULONG Hours10 :4; // Tens of Hours ") +cpp_quote("") +cpp_quote(" ULONG Minutes1 :4; // Minutes ") +cpp_quote(" ULONG Minutes10:4; // Tens of Minutes ") +cpp_quote("") +cpp_quote(" ULONG Seconds1 :4; // Seconds ") +cpp_quote(" ULONG Seconds10:4; // Tens of Seconds ") +cpp_quote("") +cpp_quote(" ULONG Frames1 :4; // Frames ") +cpp_quote(" ULONG Frames10 :2; // Tens of Frames ") +cpp_quote("") +cpp_quote(" ULONG FrameRateCode: 2; // use DVD_FRAMERATE to indicate frames/sec and drop/non-drop") +cpp_quote("} DVD_TIMECODE;") + +// +// Newer IDVD2 methods can use the HMSF format instead +// Call SetOption( DVD_HMSF_TimeCodeEvents, TRUE) to return EC_DVD_CURRENT_HMSF_TIME +// instead of EC_DVD_CURRENT_TIME events +// +typedef enum tagDVD_TIMECODE_FLAGS +{ + DVD_TC_FLAG_25fps = 0x00000001, // 25 frames per second + DVD_TC_FLAG_30fps = 0x00000002, // 30 frames per second + DVD_TC_FLAG_DropFrame = 0x00000004, // 29.97 instead of 30 fps + DVD_TC_FLAG_Interpolated = 0x00000008, // timecode may be inaccurate + // remainder of bits are reserved and should not be read +} DVD_TIMECODE_FLAGS; + +// this can be cast to/from a ULONG +typedef struct tagDVD_HMSF_TIMECODE +{ + BYTE bHours; + BYTE bMinutes; + BYTE bSeconds; + BYTE bFrames; +} DVD_HMSF_TIMECODE; + +typedef struct tagDVD_PLAYBACK_LOCATION2 +{ + // + // TitleNum & ChapterNum or TitleNum & TimeCode are sufficient to save + // playback location for One_Sequential_PGC_Titles. + // + ULONG TitleNum; // title number for whole disc (TTN not VTS_TTN) + ULONG ChapterNum; // part-of-title number with title. 0xffffffff if not Once_Sequential_PGC_Title + DVD_HMSF_TIMECODE TimeCode; // use DVD_TIMECODE for current playback time. + ULONG TimeCodeFlags; // union of DVD_TIMECODE_EVENT_FLAGS + +} DVD_PLAYBACK_LOCATION2; + +typedef struct tagDVD_PLAYBACK_LOCATION +{ + // + // TitleNum & ChapterNum or TitleNum & TimeCode are sufficient to save + // playback location for One_Sequential_PGC_Titles. + // + ULONG TitleNum; // title number for whole disc (TTN not VTS_TTN) + ULONG ChapterNum; // part-of-title number with title. 0xffffffff if not Once_Sequential_PGC_Title + ULONG TimeCode; // use DVD_TIMECODE for current playback time. 0xffffffff if not Once_Sequential_PGC_Title + +} DVD_PLAYBACK_LOCATION; + +typedef DWORD VALID_UOP_SOMTHING_OR_OTHER; + +typedef enum { + // + // Annex J User Functions --- + // + UOP_FLAG_Play_Title_Or_AtTime = 0x00000001, // Title_Or_Time_Play + UOP_FLAG_Play_Chapter = 0x00000002, // Chapter_Search_Or_Play + UOP_FLAG_Play_Title = 0x00000004, // Title_Play + UOP_FLAG_Stop = 0x00000008, // Stop + UOP_FLAG_ReturnFromSubMenu = 0x00000010, // GoUp + UOP_FLAG_Play_Chapter_Or_AtTime = 0x00000020, // Time_Or_Chapter_Search + UOP_FLAG_PlayPrev_Or_Replay_Chapter = 0x00000040, // Prev_Or_Top_PG_Search + UOP_FLAG_PlayNext_Chapter = 0x00000080, // Next_PG_Search + UOP_FLAG_Play_Forwards = 0x00000100, // Forward_Scan + UOP_FLAG_Play_Backwards = 0x00000200, // Backward_Scan + UOP_FLAG_ShowMenu_Title = 0x00000400, // Title_Menu_Call + UOP_FLAG_ShowMenu_Root = 0x00000800, // Root_Menu_Call + UOP_FLAG_ShowMenu_SubPic = 0x00001000, // SubPic_Menu_Call + UOP_FLAG_ShowMenu_Audio = 0x00002000, // Audio_Menu_Call + UOP_FLAG_ShowMenu_Angle = 0x00004000, // Angle_Menu_Call + UOP_FLAG_ShowMenu_Chapter = 0x00008000, // Chapter_Menu_Call + UOP_FLAG_Resume = 0x00010000, // Resume + UOP_FLAG_Select_Or_Activate_Button = 0x00020000, // Button_Select_Or_Activate + UOP_FLAG_Still_Off = 0x00040000, // Still_Off + UOP_FLAG_Pause_On = 0x00080000, // Pause_On + UOP_FLAG_Select_Audio_Stream = 0x00100000, // Audio_Stream_Change + UOP_FLAG_Select_SubPic_Stream = 0x00200000, // SubPic_Stream_Change + UOP_FLAG_Select_Angle = 0x00400000, // Angle_Change + UOP_FLAG_Select_Karaoke_Audio_Presentation_Mode = 0x00800000, // Karaoke_Audio_Pres_Mode_Change + UOP_FLAG_Select_Video_Mode_Preference = 0x01000000 // Video_Pres_Mode_Change +} VALID_UOP_FLAG ; + +typedef enum { + DVD_CMD_FLAG_None = 0x00000000, + DVD_CMD_FLAG_Flush = 0x00000001, + DVD_CMD_FLAG_SendEvents = 0x00000002, + DVD_CMD_FLAG_Block = 0x00000004, // block end + DVD_CMD_FLAG_StartWhenRendered = 0x00000008, // command "start" when the first frame is rendered + DVD_CMD_FLAG_EndAfterRendered = 0x00000010, // command "ends" after the last frame is rendered +} DVD_CMD_FLAGS; + +// For IDVDControl2::SetOption flags +typedef enum { + DVD_ResetOnStop = 1, // default TRUE + DVD_NotifyParentalLevelChange = 2, // default FALSE + DVD_HMSF_TimeCodeEvents = 3, // default FALSE (send DVD_CURRENT_TIME events) +} DVD_OPTION_FLAG; + +typedef enum { + DVD_Relative_Upper = 1, + DVD_Relative_Lower = 2, + DVD_Relative_Left = 3, + DVD_Relative_Right = 4 +} DVD_RELATIVE_BUTTON; + +// Parental Level Information +typedef enum tagDVD_PARENTAL_LEVEL +{ + DVD_PARENTAL_LEVEL_8 = 0x8000, + DVD_PARENTAL_LEVEL_7 = 0x4000, + DVD_PARENTAL_LEVEL_6 = 0x2000, + DVD_PARENTAL_LEVEL_5 = 0x1000, + DVD_PARENTAL_LEVEL_4 = 0x0800, + DVD_PARENTAL_LEVEL_3 = 0x0400, + DVD_PARENTAL_LEVEL_2 = 0x0200, + DVD_PARENTAL_LEVEL_1 = 0x0100 +} DVD_PARENTAL_LEVEL; + + +typedef enum tagDVD_AUDIO_LANG_EXT +{ + DVD_AUD_EXT_NotSpecified =0, + DVD_AUD_EXT_Captions =1, + DVD_AUD_EXT_VisuallyImpaired =2, + DVD_AUD_EXT_DirectorComments1 =3, + DVD_AUD_EXT_DirectorComments2 =4, +} DVD_AUDIO_LANG_EXT; + +typedef enum tagDVD_SUBPICTURE_LANG_EXT +{ + DVD_SP_EXT_NotSpecified =0, + DVD_SP_EXT_Caption_Normal =1, + DVD_SP_EXT_Caption_Big =2, + DVD_SP_EXT_Caption_Children =3, + DVD_SP_EXT_CC_Normal =5, + DVD_SP_EXT_CC_Big =6, + DVD_SP_EXT_CC_Children =7, + DVD_SP_EXT_Forced =9, + DVD_SP_EXT_DirectorComments_Normal =13, + DVD_SP_EXT_DirectorComments_Big =14, + DVD_SP_EXT_DirectorComments_Children =15, +} DVD_SUBPICTURE_LANG_EXT; + +typedef enum tagDVD_AUDIO_APPMODE +{ + DVD_AudioMode_None = 0, // no special mode + DVD_AudioMode_Karaoke = 1, + DVD_AudioMode_Surround = 2, + DVD_AudioMode_Other = 3, +} DVD_AUDIO_APPMODE; + +typedef enum tagDVD_AUDIO_FORMAT +{ + DVD_AudioFormat_AC3 = 0, + DVD_AudioFormat_MPEG1 = 1, + DVD_AudioFormat_MPEG1_DRC = 2, // MPEG1 with dynamic range control + DVD_AudioFormat_MPEG2 = 3, + DVD_AudioFormat_MPEG2_DRC = 4, // MPEG2 with dynamic range control + DVD_AudioFormat_LPCM = 5, + DVD_AudioFormat_DTS = 6, + DVD_AudioFormat_SDDS = 7, + DVD_AudioFormat_Other = 8 +} DVD_AUDIO_FORMAT; + +// flags for SelectKaraokeAudioPresentationMode +typedef enum tagDVD_KARAOKE_DOWNMIX +{ + DVD_Mix_0to0 = 0x0001, // unused - reserved for future use + DVD_Mix_1to0 = 0x0002, // unused - reserved for future use + DVD_Mix_2to0 = 0x0004, + DVD_Mix_3to0 = 0x0008, + DVD_Mix_4to0 = 0x0010, + DVD_Mix_Lto0 = 0x0020, // mix auxillary L to channel 0 (left speaker) + DVD_Mix_Rto0 = 0x0040, // mix auxillary R to channel 0 (left speaker) + + DVD_Mix_0to1 = 0x0100, // unused - reserved for future use + DVD_Mix_1to1 = 0x0200, // unused - reserved for future use + DVD_Mix_2to1 = 0x0400, + DVD_Mix_3to1 = 0x0800, + DVD_Mix_4to1 = 0x1000, + DVD_Mix_Lto1 = 0x2000, // mix auxillary L to channel 1 (right speaker) + DVD_Mix_Rto1 = 0x4000, // mix auxillary R to channel 1 (right speaker) +} DVD_KARAOKE_DOWNMIX; + + +typedef struct tagDVD_AudioAttributes +{ + DVD_AUDIO_APPMODE AppMode; + BYTE AppModeData; + DVD_AUDIO_FORMAT AudioFormat; // Use GetKaraokeAttributes() + LCID Language; // 0 if no language is present + DVD_AUDIO_LANG_EXT LanguageExtension; // (captions, if for children etc) + BOOL fHasMultichannelInfo; // multichannel attributes are present (Use GetMultiChannelAudioAttributes()) + DWORD dwFrequency; // in hertz (48k, 96k) + BYTE bQuantization; // resolution (16, 20, 24 bits etc), 0 is unknown + BYTE bNumberOfChannels; // 5.1 AC3 has 6 channels + DWORD dwReserved[2]; +} DVD_AudioAttributes; + +typedef struct tagDVD_MUA_MixingInfo +{ + // surround sound mixing information applied when: + // AppMode = DVD_AudioMode_Surround + // AudioFormat = DVD_AudioFormat_LPCM, + // fHasMultichannelInfo=1 modes are all on + // + BOOL fMixTo0; + BOOL fMixTo1; + + // + BOOL fMix0InPhase; + BOOL fMix1InPhase; + + DWORD dwSpeakerPosition; // see ksmedia.h: SPEAKER_FRONT_LEFT, SPEAKER_FRONT_RIGHT, etc +} DVD_MUA_MixingInfo; + +// The alpha coeff is used to mix to ACH0 and beta is used to mix to ACH1 +// +// In general: +// ACH0 = coeff[0].alpha * value[0] + coeff[1].alpha * value[1] + ... +// ACH1 = coeff[0].beta * value[0] + coeff[1].beta * value[1] + ... +typedef struct tagDVD_MUA_Coeff +{ + double log2_alpha; // actual coeff = 2^alpha + double log2_beta; // actual coeff = 2^beta +} DVD_MUA_Coeff; + +typedef struct tagDVD_MultichannelAudioAttributes +{ + // actual Data for each data stream + DVD_MUA_MixingInfo Info[8]; + DVD_MUA_Coeff Coeff[8]; +} DVD_MultichannelAudioAttributes; + +// bitwise OR of these flags descript the contents of each channel +typedef enum tagDVD_KARAOKE_CONTENTS +{ + DVD_Karaoke_GuideVocal1 = 0x0001, + DVD_Karaoke_GuideVocal2 = 0x0002, + DVD_Karaoke_GuideMelody1 = 0x0004, + DVD_Karaoke_GuideMelody2 = 0x0008, + DVD_Karaoke_GuideMelodyA = 0x0010, + DVD_Karaoke_GuideMelodyB = 0x0020, + DVD_Karaoke_SoundEffectA = 0x0040, + DVD_Karaoke_SoundEffectB = 0x0080 +} DVD_KARAOKE_CONTENTS; + +typedef enum tagDVD_KARAOKE_ASSIGNMENT +{ + DVD_Assignment_reserved0 = 0, + DVD_Assignment_reserved1 = 1, + DVD_Assignment_LR = 2, // left right + DVD_Assignment_LRM = 3, // left right middle + DVD_Assignment_LR1 = 4, // left right audio1 + DVD_Assignment_LRM1 = 5, // left right middle audio1 + DVD_Assignment_LR12 = 6, // left right audio1 audio2 + DVD_Assignment_LRM12 = 7 // left right middle audio1 audio2 +} DVD_KARAOKE_ASSIGNMENT; + +typedef struct tagDVD_KaraokeAttributes +{ + BYTE bVersion; + BOOL fMasterOfCeremoniesInGuideVocal1; + BOOL fDuet; // false = solo + DVD_KARAOKE_ASSIGNMENT ChannelAssignment; + WORD wChannelContents[8]; // logical OR of DVD_KARAOKE_CONTENTS +} DVD_KaraokeAttributes; + +typedef enum tagDVD_VIDEO_COMPRESSION +{ + DVD_VideoCompression_Other = 0, + DVD_VideoCompression_MPEG1 = 1, + DVD_VideoCompression_MPEG2 = 2, +} DVD_VIDEO_COMPRESSION; + +typedef struct tagDVD_VideoAttributes +{ + BOOL fPanscanPermitted; // if a 4x3 display, can be shown as PanScan + BOOL fLetterboxPermitted; // if a 4x3 display, can be shown as Letterbox + ULONG ulAspectX; // 4x3 or 16x9 + ULONG ulAspectY; + ULONG ulFrameRate; // 50hz or 60hz + ULONG ulFrameHeight; // 525 (60hz) or 625 (50hz) + DVD_VIDEO_COMPRESSION Compression;// MPEG1 or MPEG2 + + BOOL fLine21Field1InGOP; // true if there is user data in field 1 of GOP of video stream + BOOL fLine21Field2InGOP; // true if there is user data in field 1 of GOP of video stream + + ULONG ulSourceResolutionX; // X source resolution (352,704, or 720) + ULONG ulSourceResolutionY; // Y source resolution (240,480, 288 or 576) + + BOOL fIsSourceLetterboxed; // subpictures and highlights (e.g. subtitles or menu buttons) are only + // displayed in the active video area and cannot be displayed in the top/bottom 'black' bars + BOOL fIsFilmMode; // for 625/50hz systems, is film mode (true) or camera mode (false) +} DVD_VideoAttributes; + +typedef enum tagDVD_SUBPICTURE_TYPE +{ + DVD_SPType_NotSpecified = 0, + DVD_SPType_Language = 1, + DVD_SPType_Other = 2, +} DVD_SUBPICTURE_TYPE; + +typedef enum tagDVD_SUBPICTURE_CODING +{ + DVD_SPCoding_RunLength = 0, + DVD_SPCoding_Extended = 1, + DVD_SPCoding_Other = 2, +} DVD_SUBPICTURE_CODING; + +typedef struct tagDVD_SubpictureAttributes +{ + DVD_SUBPICTURE_TYPE Type; + DVD_SUBPICTURE_CODING CodingMode; + LCID Language; + DVD_SUBPICTURE_LANG_EXT LanguageExtension; +} DVD_SubpictureAttributes; + +typedef enum tagDVD_TITLE_APPMODE +{ + DVD_AppMode_Not_Specified = 0, // no special mode + DVD_AppMode_Karaoke = 1, + DVD_AppMode_Other = 3, +} DVD_TITLE_APPMODE; + +typedef struct tagDVD_TitleMainAttributes +{ + // for Titles + DVD_TITLE_APPMODE AppMode; + + // Attributes about the 'main' video of the menu or title + DVD_VideoAttributes VideoAttributes; + + ULONG ulNumberOfAudioStreams; + DVD_AudioAttributes AudioAttributes[8]; + // present if the multichannel bit is set in the corresponding stream's audio attributes + DVD_MultichannelAudioAttributes MultichannelAudioAttributes[8]; + + ULONG ulNumberOfSubpictureStreams; + DVD_SubpictureAttributes SubpictureAttributes[32]; +} DVD_TitleAttributes; + +typedef struct tagDVD_MenuAttributes +{ + // for VMG only + BOOL fCompatibleRegion[8]; // indeces 0..7 correspond to regions 1..8 + + // Attributes about the main menu (VMGM or VTSM) + DVD_VideoAttributes VideoAttributes; + + BOOL fAudioPresent; + DVD_AudioAttributes AudioAttributes; + + BOOL fSubpicturePresent; + DVD_SubpictureAttributes SubpictureAttributes; +} DVD_MenuAttributes; + +//========================================================================== +//========================================================================== +// IDvdControl interface -- Basic DVD-Video playback control. +// This modeled after the app control of a player specified in Annex J +// of the DVD Video spec. IDvdInfo can be used to get information useful +// in using IDvdControl +//========================================================================== +//========================================================================== + +[ +object, +uuid(A70EFE61-E2A3-11d0-A9BE-00AA0061BE93), +pointer_default(unique) +] + +interface IDvdControl : IUnknown { + import "unknwn.idl"; + + // TitlePlay + // Start playing the specified title number. + // Title numbers range between 1 and 99. + HRESULT TitlePlay + ( [in] ULONG ulTitle + ); + + // ChapterPlay + // Start playing at the specified chapter (or part-of-title) + // within the specified title. Chapters range from 1 to 999. + HRESULT ChapterPlay + ( [in] ULONG ulTitle, + [in] ULONG ulChapter + ); + + // TimePlay + // Start playing at the specified time within the specified title. + // NOTE: the actual start time will be the closest sync point before + // or equal to the specified frame number. + HRESULT TimePlay + ( [in] ULONG ulTitle, + [in] ULONG bcdTime // use DVD_TIMECODE. Framerate code is ignored. + ); + + // StopForResume + // Stop playback after saving resume information. DVD Navigator transfers to the DVD "Stop State" and + // (same as DVD_DOMAIN_Stop), but filter graph remains in DirectShow's Run state. + HRESULT StopForResume(); + + // GoUp + // Start playback of the program chain currently authored as the "GoUp_PGCN". + HRESULT GoUp(); + + // TimeSearch + // Start playing at the specified time within the current title. + // NOTE: the actual start time will be the closest sync point before + // or equal to the specified frame number. + HRESULT TimeSearch + ( [in] ULONG bcdTime // use DVD_TIMECODE. Framerate code is ignored. + ); + + // ChapterSearch + // Start playing at the specified chapter (or part-of-title) within + // the current title. + HRESULT ChapterSearch + ( [in] ULONG ulChapter + ); + + // PrevPGSearch + // Start playing at the beginning of the previous DVD "program". + // For One-Sequential_PGC_Titles (which includes most titles) a program + // is equivalent to a chapter, otherwise a program is part of a chapter. + HRESULT PrevPGSearch(); + + // TopPGSearch + // Start playing from the beginning of they current program. + HRESULT TopPGSearch(); + + // NextPGSearch + // Start playing from the beginning of the next program. + HRESULT NextPGSearch(); + + // ForwardScan + // Set forward play at the specified speed. + // dwSpeed == 1 is normal play + // dwSpeed < 1 is slow play + // dwSpeed > 1 is fast play + // For dwSpeed != 1, audio and subpicture is muted. + HRESULT ForwardScan + ( [in] double dwSpeed + ); + + // BackwardScan + // Set reverse play at the specified speed. + // dwSpeed == 1 is normal play speed in reverse + // dwSpeed < 1 is slow play in reverse + // dwSpeed > 1 is fast play in reverse + // For reverse play, audio and subpicture are always muted. + HRESULT BackwardScan + ( [in] double dwSpeed + ); + + // MenuCall + // Start playback of the Menu specified by an enum DVD_MENU_ID. + HRESULT MenuCall + ( [in] DVD_MENU_ID MenuID + ); + + // Resume + // Returns to title playback in DVD_DOMAIN_Title. This is typically + // done after MenuCall which puts the DVD Navigator in + // DVD_DOMAIN_VideoTitleSetMenu or DVD_DOMAIN_VideoManagerMenu. + HRESULT Resume(); + + // UpperButtonSelect + // Selects the button above the current button. + // "Selecting" a DVD button simply highlights the button but does + // not "Activate" the button. Selecting is the Windows equivalent + // to tabbing to a button but not pressing the space bar or enter key. + // Activating is the Windows equivalent of pressing the space bar or + // enter key after tabbing to a button. + HRESULT UpperButtonSelect(); + + // LowerButtonSelect + // Selects the button below the current button. + HRESULT LowerButtonSelect(); + + // LeftButtonSelect + // Selects the button to the left of the current button. + HRESULT LeftButtonSelect(); + + // RightButtonSelect + // Selects the button to the right of the current button. + HRESULT RightButtonSelect(); + + // ButtonActivate + // Activates current button. + HRESULT ButtonActivate(); + + // ButtonSelectAndActivate + // Selects and then activates the button specified by the user. + // ulButton is intended to be a number entered by a user corresponding + // to button numbers currently displayed on screen. + // Button numbers range from 1 to 36. + HRESULT ButtonSelectAndActivate + ( [in] ULONG ulButton + ); + + // StillOff + // Releases any current still if there are no available buttons. + // This includes VOBU stills, Cell stills, and PGC stills, whether the + // still is infinite. When buttons are available, stills are released by + // activating a button. Note this does not release a Pause. + HRESULT StillOff(); + + // PauseOn + // Freezes playback and any internal timers. This is similar to + // IMediaControl::Pause() + HRESULT PauseOn(); + + // PauseOff + // Releases a Pause. + HRESULT PauseOff(); + + // MenuLanguageSelect + // Selects the default language for menus. Languages are specified with + // Windows standard LCIDs. LCIDs can be created from ISO-639 codes with + // MAKELCID( MAKELANGID(wISO639LangID ,SUBLANG_DEFAULT ), SORT_DEFAULT ) + // NOTE: MAKELANGID seems to have a bug so 'jp' may have to be used + // instead of 'ja' for the ISO639 code for Japanese. + // MenuLanguageSelect may only called from the DVD Stop state (DVD_DOMAIN_Stop). + HRESULT MenuLanguageSelect + ( [in] LCID Language + ); + + // AudioStreamChange + // Changes the current audio stream. + HRESULT AudioStreamChange + ( [in] ULONG ulAudio + ); + + // SubpictureStreamChange + // Changes the current subpicture stream number to nSubpic, and toggles + // its display. + HRESULT SubpictureStreamChange + ( [in] ULONG ulSubPicture, + [in] BOOL bDisplay + ); + + // AngleChange + // Changes the current angle number. + HRESULT AngleChange + ( [in] ULONG ulAngle + ); + + // ParentalLevelSelect + // Selects the current player parental level between 1 and 8. The + // defined parental levels are listed below : + // + // Level Rating + // ----- ------ + // + // 1 G + // 3 PG + // 4 PG13 + // 6 R + // 7 NC17 + // Higher levels can play lower level content; lower levels cannot play + // higher level content. The DVD Navigator provides no restriction on + // setting the parental level. DVD player application may enforce + // restriction on parental level setting, such as password protection for + // raising the current parental level. Parental Management is disabled in + // the Navigator by default. + // + // Note : To disable parental management, pass 0xffffffff for ulParentalLevel + // If parental management is disabled, then the player will play the + // first PGC in a parental block regardless of parental IDs. + // + HRESULT ParentalLevelSelect + ( [in] ULONG ulParentalLevel + ); + + // ParentalCountrySelect + // Sets the country in which to interpret the the Parental Level. + // The country specified using the Alpha-2 code of the ISO-3166 standard, + // with the addition of 'ZZ' + HRESULT ParentalCountrySelect + ( [in] WORD wCountry + ); + + // KaraokeAudioPresentationModeChange + // Sets the Karaoke audio mode. + // NOTE: This and all other Karoke support is currently not implemented. + HRESULT KaraokeAudioPresentationModeChange + ( [in] ULONG ulMode + ); + + // VideoModePreferrence + // The user can specify the preferred display mode that should + // be used to display content. The parameter is a ULONG that has + // one of the values defined in DVD_PREFERRED_DISPLAY_MODE + HRESULT VideoModePreferrence + ( [in] ULONG ulPreferredDisplayMode + ); + + // SetRoot + // Sets the root directory containing the DVD-Video volume. + // Can only be called from the DVD Stop State (DVD_DOMAIN_Stop). + // If the root directory is not successfully set before + // IMediaControl::Play is called, the first drive starting from c: + // containing a VIDEO_TS directory in the top level directory + // will be used as the root. + HRESULT SetRoot + ( [in] LPCWSTR pszPath + ); + + // MouseActivate + // This is typically called in response to a mouse click. + // The specified point within the display window is to see if it is + // within a current DVD button's highlight rect. If it is, that + // button is first selected, then activated. + // NOTE: DVD Buttons do not all necessarily have highlight rects, + // button rects can overlap, and button rects do not always + // correspond to the visual representation of DVD buttons. + HRESULT MouseActivate // typically called after a mouse click + ( [in] POINT point + ); + + // MouseSelect + // This is typically called in response to a mouse move within the + // display window. + // The specified point within the display window is to see if it is + // within a current DVD button's highlight rect. If it is, that + // button is selected. + // NOTE: DVD Buttons do not all necessarily have highlight rects, + // button rects can overlap, and button rects do not always + // correspond to the visual representation of DVD buttons. + HRESULT MouseSelect // typically called after a mouse move + ( [in] POINT point + ); + + // ChapterPlayAutoStop + // Start playing at the specified chapter within the specified title + // and play the number of chapters specified by the third parameter. + // Chapters range from 1 to 999. + HRESULT ChapterPlayAutoStop + ( [in] ULONG ulTitle, // title number + [in] ULONG ulChapter, // chapter number to start playback + [in] ULONG ulChaptersToPlay // number of chapters to play from the start chapter + ); +} + + + +//========================================================================== +//========================================================================== +// IDvdInfo interface -- allow an app to query for attributes of available +// DVD titles and DVD player status. Also allow for control of a DVD +// player beyond Annex J in the DVD spec. +//========================================================================== +//========================================================================== + +[ +object, +uuid(A70EFE60-E2A3-11d0-A9BE-00AA0061BE93), +pointer_default(unique) +] + +interface IDvdInfo : IUnknown { + import "unknwn.idl"; + + // GetCurrentDomain + // Returns the current DVD Domain of the DVD player. + HRESULT GetCurrentDomain + ( [out] DVD_DOMAIN *pDomain + ); + + // GetCurrentLocation + // Returns information sufficient to restart playback of a video + // from the current playback location in titles that don't explicitly + // disable seeking to the current location. + HRESULT GetCurrentLocation + ( [out] DVD_PLAYBACK_LOCATION *pLocation + ); + + // GetTotalTitleTime + // Return the total playback time for the current title. Only works + // for One_Sequential_PGC_Titles. + HRESULT GetTotalTitleTime + ( [out] ULONG * pulTotalTime // use DVD_TIMECODE. + ); + + // GetCurrentButton + // Indicates the number of currently available buttons and the current + // selected button number. If buttons are not present it returns 0 for + // both pulButtonsAvailable and pulCurrentButton + HRESULT GetCurrentButton + ( [out] ULONG * pulButtonsAvailable, + [out] ULONG * pulCurrentButton + ); + + // GetCurrentAngle + // Indicates the number of currently available angles and the current + // selected angle number. If *pnAnglesAvailable==1, then the current + // video is not multiangle. + HRESULT GetCurrentAngle + ( [out] ULONG * pulAnglesAvailable, + [out] ULONG * pulCurrentAngle + ); + + // GetCurrentAudio + // Indicates the number of currently available audio streams and + // the current selected audio stream number. + // This only work when in DVD_DOMAIN_Title. + HRESULT GetCurrentAudio + ( [out] ULONG * pulStreamsAvailable, + [out] ULONG * pulCurrentStream + ); + + // GetCurrentSubpicture + // Indicates the number of currently available subpicture streams, + // the current selected subpicture stream number, and if the + // subpicture display is currently disabled. Subpicture streams + // authored as Forcedly Activated stream will be displayed even if + // subpicture display has been disabled by the app with + // IDVDControl::SubpictureChangeStream. + // This only work when in DVD_DOMAIN_Title. + HRESULT GetCurrentSubpicture + ( [out] ULONG * pulStreamsAvailable, + [out] ULONG * pulCurrentStream, + [out] BOOL * pIsDisabled + ); + + // GetCurrentUOPS + // Indicates which IDVDControl methods are currently valid. DVD titles + // can enable or disable individual user operations at almost any point + // during playback. + HRESULT GetCurrentUOPS + ( [out] VALID_UOP_SOMTHING_OR_OTHER * pUOP + ); + + // GetAllSPRMs + // Returns the current contents of all System Parameter Registers. + // See DVD-Video spec for use of individual registers. + HRESULT GetAllSPRMs + ( [out] SPRMARRAY * pRegisterArray + ); + + // GetAllGPRMs + // Returns the current contents of all General Parameter Registers. + // Use of GPRMs is title specific. + HRESULT GetAllGPRMs + ( [out] GPRMARRAY * pRegisterArray + ); + + // GetAudioLanguage + // Returns the language of the specified stream within the current + // title. Does not return languages for menus. Sets *pLanguage=0 if + // if the stream does not include language. + // Use GetLocaleInfo(*pLanguage, LOCALE_SENGLANGUAGE, pszString, cbSize) + // to create a human readable string name from the result LCID. + HRESULT GetAudioLanguage + ( [in] ULONG ulStream, + [out] LCID * pLanguage + ); + + // GetSubpictureLanguage + // Returns the language of the specified stream within the current + // title. Does not return languages for menus. Sets *pLanguage=0 if + // if the stream does not include language. + // Use GetLocaleInfo(*pLanguage, LOCALE_SENGLANGUAGE, pszString, cbSize) + // to create a human readable string name from the result LCID. + HRESULT GetSubpictureLanguage + ( [in] ULONG ulStream, + [out] LCID * pLanguage + ); + + // GetTitleAttributes + // Returns attributes of all video, audio, and subpicture + // streams for the specified title including menus. + // If nTitle == 0xffffffff, attributes for the current title are returned. + HRESULT GetTitleAttributes + ( [in] ULONG ulTitle, // requested title number + [out] DVD_ATR * pATR + ); + + // GetVMGAttributes + // Returns attributes of all video, audio, and subpicture + // streams for Video Manager Menus. Some menus, such as the DVD_MENU_Title + // are in a separate group of streams called the VMG (Video Manager) and + // are not associated with any particular title number. + HRESULT GetVMGAttributes + ( [out] DVD_ATR * pATR + ); + + // GetCurrentVideoAttributes + // Returns the video attributes for the current title or menu. + HRESULT GetCurrentVideoAttributes + ( [out] DVD_VideoATR *pATR + ); + + // GetCurrentAudioAttributes + // Returns the video attributes for the stream in the current + // title or menu. + HRESULT GetCurrentAudioAttributes + ( [out] DVD_AudioATR *pATR + ); + + // GetCurrentSubpictureAttributes + // Returns the video attributes for the stream in the current + // title or menu. + HRESULT GetCurrentSubpictureAttributes + ( [out] DVD_SubpictureATR *pATR + ); + + + // GetCurrentVolumeInfo + // Returns current DVD volume info. + HRESULT GetCurrentVolumeInfo + ( [out] ULONG *pulNumOfVol, // number of volumes (disc sides?) in a volume set + [out] ULONG *pulThisVolNum, // volume number for this root directory + [out] DVD_DISC_SIDE *pSide, // current disc side + [out] ULONG *pulNumOfTitles // number of titles available in this volume + ); + + + // GetDVDTextInfo + // Returns the TXTDT_MG structure, which can contain text descriptions for title + // name, volume name, producer name, vocalist name, etc. in various languages. + // refer to Section 4.1.6 and Annex A of the DVD-Video spec. + // If the buffer size passed in is insufficient (for example if cbBufSize==0), + // then E_OUTOFMEMORY is returned, and *pcbActualSize is set to the required size. + HRESULT GetDVDTextInfo + ( [out, size_is(ulBufSize)] BYTE *pTextManager, + [in] ULONG ulBufSize, // buffer size passed in + [out] ULONG *pulActualSize // amount of actual data return + ); + + // GetPlayerParentalLevel + // Returns the current parental level and the current country code + // that has been set in the system registers in player. + // See Table 3.3.4-1 of the DVD-Video spec for the defined parental levels. + // Valid Parental Levels = 1..8 if parental management is enabled + // 0xffffffff if parental management is disabled + // See ISO3166 : Alpha-2 Code for the country codes. + HRESULT GetPlayerParentalLevel + ( [out] ULONG *pulParentalLevel, // current parental level + [out] ULONG *pulCountryCode // current country code + ); + + // GetNumberOfChapters + // Returns the number of chapters that are defined for a + // given title. + HRESULT GetNumberOfChapters + ( [in] ULONG ulTitle, // Title for which number of chapters is requested + [out] ULONG *pulNumberOfChapters // Number of chapters for the specified title + ); + + // GetTitleParentalLevels + // Returns the parental levels that are defined for a + // particular title. pParentalLevels will be combination + // of DVD_PARENTAL_LEVEL_8, DVD_PARENTAL_LEVEL_6, or + // DVD_PARENTAL_LEVEL_1 "OR"ed together + HRESULT GetTitleParentalLevels + ( [in] ULONG ulTitle, // Title for which parental levels are requested + [out] ULONG *pulParentalLevels // Parental levels defined for the title "OR"ed together + ); + + // GetRoot + // Returns the root directory that is set in the player. If a valid root + // has been found, it returns the root string. Otherwise, it returns 0 for + // pcbActualSize indicating that a valid root directory has not been found + // or initialized. + // + // !!! used to return LPTSTR. interface was changed to return + // LPSTR (ansi) for compatibility. COM APIs should pass with + // UNICODE strings only. + // + HRESULT GetRoot + ( [out, size_is(ulBufSize)] LPSTR pRoot, // pointer to buffer to get root string + [in] ULONG ulBufSize, // size of buffer passed in + [out] ULONG *pulActualSize // size of actual data returned + ); +} + +//========================================================================== +//========================================================================== +// IDvdCmd interface -- the IDVDControl2 command sequencing object. +// +// For the IDVDControl2 interface, the application can track the status of +// commands that have been issued to the navigator. Each command is identified +// by an IDvdCmd object. The IDvdCmd object stores the results of the command +// at both the start (when the command has begun processing) and the end after +// it has completed. It also allows the app to synchronize with the processing +// of the command. +// +// The command object also allows the app to uniquely identify and correlate +// completion events (if it prefers to process events in a message loop instead +// of creating another process). +// +// Allows the app to track the status of an issued command to the nav. +//========================================================================== +//========================================================================== + +[ +object, +uuid(5a4a97e4-94ee-4a55-9751-74b5643aa27d), +pointer_default(unique) +] + +interface IDvdCmd : IUnknown { + import "unknwn.idl"; + + // + // WaitForStart + // + // Blocks the application until the command has begun. + // + HRESULT WaitForStart(); + + // + // WaitForEnd + // + // Blocks until the command has completed or has been cancelled. + HRESULT WaitForEnd(); +} + +//========================================================================== +//========================================================================== +// IDvdState interface -- the State state object. +// +// Whenever the application wishes to save or restore a location on the disc, +// it needs to store the DVD state into an object. +// The State object supports the IPersistStream +// +//========================================================================== +//========================================================================== + +[ +object, +uuid(86303d6d-1c4a-4087-ab42-f711167048ef), +pointer_default(unique) +] + +interface IDvdState : IUnknown +{ + // + // GetDiscID + // + // Returns the disc ID from which the bookmark was made. + // + HRESULT GetDiscID + ( [out] ULONGLONG* pullUniqueID ); // 64-bit unique id for the disc + + // + // GetParentalLevel + // + // Returns the state's parental level + // + HRESULT GetParentalLevel + ( [out] ULONG* pulParentalLevel ); +} + +//========================================================================== +//========================================================================== +// IDvdControl2 interface -- Basic DVD-Video playback control. +// This is modeled after the app control of a player specified in Annex J +// of the DVD Video spec. IDvdInfo2 can be used to get information useful +// in using IDvdControl2 +//========================================================================== +//========================================================================== + +[ +object, +uuid(33BC7430-EEC0-11D2-8201-00A0C9D74842), +pointer_default(unique) +] + +interface IDvdControl2 : IUnknown { + import "unknwn.idl"; + + // PlayTitle + // + // Start playing from the beginning of the specified title number. + // Annex J: Title_Play + // Title numbers range between 1 and 99. + HRESULT PlayTitle + ( [in] ULONG ulTitle, + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd + ); + + // PlayChapterInTitle + // + // Start playing from the beginning of the given chapter (or part-of-title) number + // within the specified title number. + // Annex J: PTT_Play + // Title numbers range between 1 and 99. + // Chapters range from 1 to 999. + HRESULT PlayChapterInTitle + ( [in] ULONG ulTitle, + [in] ULONG ulChapter, + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd + ); + + // PlayAtTimeInTitle + // + // Start playing from the specified time within the specified title number. + // NOTE: the actual start time will be the closest sync point before + // or equal to the specified frame number. + // Annex J: Time_Play + // Title numbers range between 1 and 99. + HRESULT PlayAtTimeInTitle + ( [in] ULONG ulTitle, + [in] DVD_HMSF_TIMECODE* pStartTime, + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd + ); + + // Stop + // Stop playback by transferring DVD Navigator to the DVD "Stop State" (same + // as DVD_DOMAIN_Stop), but filter graph remains in DirectShow's Run state. + // Annex J: Stop + HRESULT Stop(); + + // ReturnFromSubmenu + // + // Stop playback of current program chain (PGC) and start playing the PGC + // specified by "GoUp_PGCN".in the PGCI. + // If the GoUp_PGCN value is 0xFFFF the Resume() operation is carried out. + // Annex J: GoUp + HRESULT ReturnFromSubmenu( + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd ); + + // PlayAtTime + // Start playing at the specified time within the current title. + // NOTE: the actual start time will be the closest sync point before + // or equal to the specified frame number. + // Annex J: Time_Search + // The time is in BCD format, passed in as a ULONG. + HRESULT PlayAtTime + ( [in] DVD_HMSF_TIMECODE* pTime, + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd + ); + + // PlayChapter + // Start playing at the specified chapter (or part-of-title) within + // the current title. + // Annex J: PTT_Search + // Chapters range from 1 to 999. + HRESULT PlayChapter + ( [in] ULONG ulChapter, + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd + ); + + // PlayPrevChapter + // Start playing at the beginning of the previous DVD "program". + // For One-Sequential_PGC_Titles (which includes most titles) a program + // is equivalent to a chapter, otherwise a program is part of a chapter. + // Annex J: PrevPG_Search + HRESULT PlayPrevChapter( + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd ); + + // ReplayChapter + // Start playing from the beginning of they current program. + // Annex J: TopPG_Search + HRESULT ReplayChapter( + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd ); + + // PlayNextChapter + // Start playing from the beginning of the next program. + // Annex J: NextPG_Search + HRESULT PlayNextChapter( + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd ); + + // PlayForwards + // Set forward play at the specified speed. + // Annex J: Forward_Scan + // dSpeed == 1 is normal play + // dSpeed < 1 is slow play + // dSpeed > 1 is fast play + // For dSpeed != 1, audio and subpicture is muted. + HRESULT PlayForwards + ( [in] double dSpeed, + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd + ); + + // PlayBackwards + // Set reverse play at the specified speed. + // Annex J: Backward_Scan + // dSpeed == 1 is normal play speed in reverse + // dSpeed < 1 is slow play in reverse + // dSpeed > 1 is fast play in reverse + // For reverse play, audio and subpicture are always muted. + HRESULT PlayBackwards + ( [in] double dSpeed, + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd + ); + + // ShowMenu + // Start playback of the Menu specified by an enum DVD_MENU_ID. + // Annex J: Menu_Call + HRESULT ShowMenu + ( [in] DVD_MENU_ID MenuID, + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd + ); + + // Resume + // Returns to title playback in DVD_DOMAIN_Title. This is typically + // done after MenuCall which puts the DVD Navigator in + // DVD_DOMAIN_VideoTitleSetMenu or DVD_DOMAIN_VideoManagerMenu. + // Annex J: Resume + HRESULT Resume( + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd ); + + // SelectRelativeButton + // Moves the selection highlight above, below, to the left of, or to the right of the + // currently selected. + // "Selecting" a DVD button simply highlights the button but does + // not "Activate" the button. Selecting is the Windows equivalent + // to tabbing to a button but not pressing the space bar or enter key. + // Activating is the Windows equivalent of pressing the space bar or + // enter key after tabbing to a button. + // Annex J: Upper_button_Select, Lower_button_Select, Left_button_Select, Right_button_Select + HRESULT SelectRelativeButton( DVD_RELATIVE_BUTTON buttonDir ); + + // ActivateButton + // Activates current button. + // Annex J: Button_Activate + HRESULT ActivateButton(); + + // SelectButton + // Selects a specific button (with the index from 1 to 36). + // ulButton is intended to be a number entered by a user corresponding + // to button numbers currently displayed on screen. + // Button numbers range from 1 to 36. + HRESULT SelectButton + ( [in] ULONG ulButton + ); + + // SelectAndActivateButton + // Selects and then activates the button specified by the user. + // ulButton is intended to be a number entered by a user corresponding + // to button numbers currently displayed on screen. + // Annex J: Button_Select_And_Activate + // Button numbers range from 1 to 36. + HRESULT SelectAndActivateButton + ( [in] ULONG ulButton + ); + + // StillOff + // Releases any current still if there are no available buttons. + // This includes VOBU stills, Cell stills, and PGC stills, whether the + // still is infinite. When buttons are available, stills are released by + // activating a button. Note this does not release a Pause. + // Annex J: Still_Off + HRESULT StillOff(); + + // Pause + // Freezes / unfreezes playback and any internal timers. This is similar to + // IMediaControl::Pause(), but not the same in effect as IMediaControl::Pause + // puts the filter (all filters, if done to the graph) in paused state. + // Annex J: Pause_On and Pause_Off + // bState is TRUE or FALSE to indicate whether to do Puase_on/Pause_Off according + // to Annex J terminology. + HRESULT Pause + ( [in] BOOL bState + ); + + // SelectAudioStream + // Changes the current audio stream to ulAudio. + // Annex J: Audio_Stream_Change + // Audio stream number ranges between 0 and 7 or DEFAULT_AUDIO_STREAM (15 - default based on default language & language extension) + HRESULT SelectAudioStream + ( [in] ULONG ulAudio, + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd + + ); + + // SelectSubpictureStream + // Changes the current subpicture stream number to ulSubPicture + // Annex J: Sub-picture_Stream_Change (first param) + // Subpicture stream number should be between 0 and 31 or 63. + HRESULT SelectSubpictureStream + ( [in] ULONG ulSubPicture, + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd + + ); + + // SetSubpictureState + // Turns on/off current subpicture stream display. + // Annex J: Sub-picture_Stream_Change (second param) + // Subpicture state is On or Off (TRUE or FALSE) + HRESULT SetSubpictureState + ( [in] BOOL bState, + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd + ); + + // SelectAngle + // Changes the current angle number. + // Annex J: Angle_Change + // Angle number is between 1 and 9. + HRESULT SelectAngle + ( [in] ULONG ulAngle, + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd + ); + + // SelectParentalLevel + // Selects the current player parental level. + // Annex J: Parental_Level_Select + // Parental level ranges between 1 and 8. + // The defined parental levels are listed below : + // + // Level Rating + // ----- ------ + // 1 G + // 3 PG + // 4 PG13 + // 6 R + // 7 NC17 + // Higher levels can play lower level content; lower levels cannot play + // higher level content. The DVD Navigator provides no restriction on + // setting the parental level. DVD player application may enforce + // restriction on parental level setting, such as password protection for + // raising the current parental level. Parental Management is disabled in + // the Navigator by default. + // + // Note : To disable parental management, pass 0xffffffff for ulParentalLevel + // If parental management is disabled, then the player will play the + // first PGC in a parental block regardless of parental IDs. + // + HRESULT SelectParentalLevel + ( [in] ULONG ulParentalLevel + ); + + // SelectParentalCountry + // Sets the country in which to interpret the Parental Level. + // Annex J: Parental_Country_Select + // The country specified using the Alpha-2 code of the ISO-3166 standard, + HRESULT SelectParentalCountry + ( [in] BYTE bCountry[2] + ); + + // SelectKaraokeAudioPresentationMode + // Sets the Karaoke audio mode. + // Annex J: Karaoke_Audio_Presentation_Mode_Change + // NOTE: This and all other Karoke support is currently not implemented. + // Mode represents the audio mixing mode for Karaoke (same info as SPRM11). + // Use a bitwise OR of the bits in DVD_KARAOKE_DOWNMIX + HRESULT SelectKaraokeAudioPresentationMode + ( [in] ULONG ulMode + ); + + // SelectVideoModePreference + // The user can specify the (initial) preferred display mode (aspect ratio) + // (wide / letterbox / pan-scan) that should be used to display content + // (16 : 9). + // Annex J: Video_Presentation_Mode_Change + // The parameter is a ULONG that has one of the values defined in + // DVD_PREFERRED_DISPLAY_MODE + HRESULT SelectVideoModePreference + ( [in] ULONG ulPreferredDisplayMode + ); + + // SetDVDDirectory + // Sets the root directory containing the DVD-Video volume. + // Can only be called from the DVD Stop State (DVD_DOMAIN_Stop). + // If the root directory is not successfully set before + // IMediaControl::Play is called, the first drive starting from c: + // containing a VIDEO_TS directory in the top level directory + // will be used as the root. + HRESULT SetDVDDirectory + ( [in] LPCWSTR pszwPath + ); + + // ActivateAtPosition + // This is typically called in response to a mouse click. + // The specified point within the display window is to see if it is + // within a current DVD button's highlight rect. If it is, that + // button is first selected, then activated. + // NOTE: DVD Buttons do not all necessarily have highlight rects, + // button rects can overlap, and button rects do not always + // correspond to the visual representation of DVD buttons. + HRESULT ActivateAtPosition // typically called after a mouse click + ( [in] POINT point + ); + + // SelectAtPosition + // This is typically called in response to a mouse move within the + // display window. + // The specified point within the display window is to see if it is + // within a current DVD button's highlight rect. If it is, that + // button is selected. + // NOTE: DVD Buttons do not all necessarily have highlight rects, + // button rects can overlap, and button rects do not always + // correspond to the visual representation of DVD buttons. + HRESULT SelectAtPosition // typically called after a mouse move + ( [in] POINT point + ); + + // PlayChaptersAutoStop + // Start playing at the specified chapter within the specified title + // and play the number of chapters specified by the third parameter. + // Then the playback stops by sending an event EC_DVD_CHAPTER_AUTOSTOP. + // Title ranges from 1 to 99. + // Chapter (and number of chapters to play) ranges from 1 to 999. + HRESULT PlayChaptersAutoStop + ( [in] ULONG ulTitle, // title number + [in] ULONG ulChapter, // chapter number to start playback + [in] ULONG ulChaptersToPlay, // number of chapters to play from the start chapter + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd + ); + + // AcceptParentalLevelChange + // + // Application's way of informing the Navigator that the required parental + // level change indicated through a previous event was accepted or rejected + // by the app (and unblock the Navigator). + // + // FALSE - reject the disc's request to change the current parental level. + // TRUE - change the parental level as required by the disc. + HRESULT AcceptParentalLevelChange + ( [in] BOOL bAccept + ); + + // SetOption(flag, true/false ) + // Flags: + // + // DVD_ResetOnStop + // Disable reset of the Navigator's internal state on the + // subsequent IMediaControl::Stop() call(s). + // + // FALSE - Navigator does not reset its state on the subsequent Stop calls + // (play from the current location on next Run call). + // TRUE - (default) Navigator resets its state on the subsequent Stop call + // (play from the first play PGC on the Run call after the Stop). + // + // DVD_NotifyParentalLevelChange + // + // Allows the application to indicate to the Navigator that it wants to control + // parent level change (e.g., through a dialog box) and indicate the acceptance + // or rejection of the new parental level to the Navigator through + // AcceptParentalLevelChange(). + // + // FALSE - disable (default). Always reject request by the disc to change parental level. + // TRUE - enable. Navigator will send the app a 'EC_DVD_PARENTAL_LEVEL_CHANGE' event + // and block until AcceptParentalLevelChange() is called by the app. + // + // DVD_HMSF_TimeCodeEvents + // + // Lets the application specify to the Navigator if it wants to get the new time + // event EC_DVD_CURRENT_HMSF_TIME with the HMSF format rather than the older + // EC_DVD_CURRENT_TIME events. + // + // FALSE - disable (default). Older EC_DVD_CURRENT_TIME events are returned. + // TRUE - enable. Navigator will send the app EC_DVD_CURRENT_HMSF_TIME events. + + HRESULT SetOption + ( [in] DVD_OPTION_FLAG flag, + [in] BOOL fState + ); + + // SetState + // + // The navigator will use the location information in the given state object to restore + // the navigator's position to a specific location on the disc. + // A valid state object is returned by either calling GetState(), or by using + // "CoCreateInstance( CLSID_DVDState, NULL, CLSCTX_INPROC_SERVER, IID_IDvdState, (void **) ppState )" + // to create a state object, followed by pState->IPersist::Load() to read it from memory or disk. + // + HRESULT SetState + ( [in] IDvdState* pState, + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd + + ); + + // PlayPeriodInTitleAutoStop + // + // Start playing from the specified time within the specified title number until the specified end time. + // NOTE: the actual start and end times will be the closest sync points before + // or equal to the specified frame number. + // Annex J: Time_Play for a limited range + // Title numbers range between 1 and 99. + HRESULT PlayPeriodInTitleAutoStop + ( [in] ULONG ulTitle, + [in] DVD_HMSF_TIMECODE* pStartTime, + [in] DVD_HMSF_TIMECODE* pEndTime, + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd + ); + + // SetGPRM + // Sets the current contents of a DVD General Parameter Register. + // Use of GPRMs is title specific. + + HRESULT SetGPRM + ( [in] ULONG ulIndex, + [in] WORD wValue, + [in] DWORD dwFlags, + [out] IDvdCmd** ppCmd + ); + + // SelectDefaultMenuLanguage + // Selects the default language for menus. + // Languages are specified with Windows standard LCIDs. LCIDs can be created + // from ISO-639 codes with + // MAKELCID( MAKELANGID(wISO639LangID ,SUBLANG_DEFAULT ), SORT_DEFAULT ). + // SelectMenuLanguage may only called from the DVD Stop state (DVD_DOMAIN_Stop). + // Annex J: Menu_Language_Select + // + // NOT TRUE ANYMORE: + // NOTE: MAKELANGID seems to have a bug so 'jp' may have to be used + // instead of 'ja' for the ISO639 code for Japanese. + HRESULT SelectDefaultMenuLanguage + ( [in] LCID Language + ); + + // SelectDefaultAudioLanguage + // Selects the default audio language. + // Languages are specified with Windows standard LCIDs. + HRESULT SelectDefaultAudioLanguage + ( [in] LCID Language, + [in] DVD_AUDIO_LANG_EXT audioExtension + ); + + // SelectDefaultSubpictureLanguage + // Selects the default subpicture language. + // Languages are specified with Windows standard LCIDs. + HRESULT SelectDefaultSubpictureLanguage + ( [in] LCID Language, + [in] DVD_SUBPICTURE_LANG_EXT subpictureExtension + ); +} + + +//========================================================================== +//========================================================================== +// IDvdInfo2 interface -- allows an app to query for attributes of available +// DVD titles and DVD player status. Also allows for control of a DVD +// player beyond Annex J in the DVD spec. +//========================================================================== +//========================================================================== + +enum DVD_TextStringType { + // disc structure (0x00..0x0f) + DVD_Struct_Volume = 0x01, + DVD_Struct_Title = 0x02, + DVD_Struct_ParentalID = 0x03, + DVD_Struct_PartOfTitle = 0x04, + DVD_Struct_Cell = 0x05, + // stream (0x10..0x1f) + DVD_Stream_Audio = 0x10, + DVD_Stream_Subpicture = 0x11, + DVD_Stream_Angle = 0x12, + // channel in stream (0x20..0x2f) + DVD_Channel_Audio = 0x20, + + // Application information + // General (0x30..0x37) + DVD_General_Name = 0x30, + DVD_General_Comments = 0x31, + + // Title (0x38..0x3f) + DVD_Title_Series = 0x38, + DVD_Title_Movie = 0x39, + DVD_Title_Video = 0x3a, + DVD_Title_Album = 0x3b, + DVD_Title_Song = 0x3c, + DVD_Title_Other = 0x3f, + + // Title (sub) (0x40..0x47) + DVD_Title_Sub_Series = 0x40, + DVD_Title_Sub_Movie = 0x41, + DVD_Title_Sub_Video = 0x42, + DVD_Title_Sub_Album = 0x43, + DVD_Title_Sub_Song = 0x44, + DVD_Title_Sub_Other = 0x47, + + // Title (original) (0x48..0x4f) + DVD_Title_Orig_Series = 0x48, + DVD_Title_Orig_Movie = 0x49, + DVD_Title_Orig_Video = 0x4a, + DVD_Title_Orig_Album = 0x4b, + DVD_Title_Orig_Song = 0x4c, + DVD_Title_Orig_Other = 0x4f, + + // Other info (0x50..0x57) + DVD_Other_Scene = 0x50, + DVD_Other_Cut = 0x51, + DVD_Other_Take = 0x52, + + // Language 0x58..0x5b + // Work 0x5c..0x6b + // Character 0x6c..0x8f + // Data 0x90..0x93 + // Karaoke 0x94..0x9b + // Category 0x9c..0x9f + // Lyrics 0xa0..0xa3 + // Document 0xa4..0xa7 + // Others 0xa8..0xab + // Reserved 0xac..0xaf + // Admin 0xb0..0xb7 + // more admin 0xb8..0xc0 + // Reserved 0xd0..0xdf + // vendor 0xe0..0xef + // extension 0xf0..0xf7 + // reserved 0xf8..0xff +}; + +enum DVD_TextCharSet { + DVD_CharSet_Unicode = 0, + DVD_CharSet_ISO646 = 1, + DVD_CharSet_JIS_Roman_Kanji = 2, + DVD_CharSet_ISO8859_1 = 3, + DVD_CharSet_ShiftJIS_Kanji_Roman_Katakana = 4 +}; + +cpp_quote ("#define DVD_TITLE_MENU 0x000") +cpp_quote ("#define DVD_STREAM_DATA_CURRENT 0x800") +cpp_quote ("#define DVD_STREAM_DATA_VMGM 0x400") +cpp_quote ("#define DVD_STREAM_DATA_VTSM 0x401") +cpp_quote ("#define DVD_DEFAULT_AUDIO_STREAM 0x0f") + +// DVD Decoder Caps data +typedef struct tagDVD_DECODER_CAPS +{ + DWORD dwSize ; // size of this struct + DWORD dwAudioCaps ; // bits indicating audio support (AC3, DTS, SDDS, LPCM etc.) of decoder + double dFwdMaxRateVideo ; // max data rate for video going forward + double dFwdMaxRateAudio ; // ... .. .. ... audio ... ... + double dFwdMaxRateSP ; // ... .. .. ... SP ... ... + double dBwdMaxRateVideo ; // if smooth reverse is not available, this will be set to 0 + double dBwdMaxRateAudio ; // -- ditto -- + double dBwdMaxRateSP ; // -- ditto -- + DWORD dwRes1 ; // reserved for future expansion + DWORD dwRes2 ; // -- ditto -- + DWORD dwRes3 ; // -- ditto -- + DWORD dwRes4 ; // -- ditto -- +} DVD_DECODER_CAPS ; + +// Bits for decoder's audio format support +cpp_quote ("#define DVD_AUDIO_CAPS_AC3 0x00000001") +cpp_quote ("#define DVD_AUDIO_CAPS_MPEG2 0x00000002") +cpp_quote ("#define DVD_AUDIO_CAPS_LPCM 0x00000004") +cpp_quote ("#define DVD_AUDIO_CAPS_DTS 0x00000008") +cpp_quote ("#define DVD_AUDIO_CAPS_SDDS 0x00000010") + + +[ +object, +uuid(34151510-EEC0-11D2-8201-00A0C9D74842), +pointer_default(unique) +] + +interface IDvdInfo2 : IUnknown { + import "unknwn.idl"; + + // GetCurrentDomain + // Returns the current DVD Domain of the DVD player. + HRESULT GetCurrentDomain + ( [out] DVD_DOMAIN *pDomain + ); + + // GetCurrentLocation + // Returns information sufficient to restart playback of a video + // from the current playback location in titles that don't explicitly + // disable seeking to the current location. + HRESULT GetCurrentLocation + ( [out] DVD_PLAYBACK_LOCATION2 *pLocation + ); + + // GetTotalTitleTime + // Returns the total playback time for the current title. Only works + // for One_Sequential_PGC_Titles. + // THIS SHOULD CHANGE, RIGHT? + HRESULT GetTotalTitleTime + ( [out] DVD_HMSF_TIMECODE* pTotalTime, + [out] ULONG* ulTimeCodeFlags // union of DVD_TIMECODE_FLAGS + ); + + // GetCurrentButton + // Indicates the number of currently available buttons and the current + // selected button number. If buttons are not present it returns 0 for + // both pulButtonsAvailable and pulCurrentButton + HRESULT GetCurrentButton + ( [out] ULONG * pulButtonsAvailable, + [out] ULONG * pulCurrentButton + ); + + // GetCurrentAngle + // Indicates the number of currently available angles and the current + // selected angle number. If *pulAnglesAvailable is returned as 1 then + // the current content is not multiangle. + HRESULT GetCurrentAngle + ( [out] ULONG * pulAnglesAvailable, + [out] ULONG * pulCurrentAngle + ); + + // GetCurrentAudio + // Indicates the number of currently available audio streams and + // the currently selected audio stream number. + // This only works inside the Title domain. + HRESULT GetCurrentAudio + ( [out] ULONG * pulStreamsAvailable, + [out] ULONG * pulCurrentStream + ); + + // GetCurrentSubpicture + // Indicates the number of currently available subpicture streams, + // the currently selected subpicture stream number, and if the + // subpicture display is currently disabled. Subpicture streams + // authored as "Forcedly Activated" stream will be displayed even if + // subpicture display has been disabled by the app with + // IDVDControl::SetSubpictureState. + // This only works inside the Title domain. + HRESULT GetCurrentSubpicture + ( [out] ULONG * pulStreamsAvailable, + [out] ULONG * pulCurrentStream, + [out] BOOL * pbIsDisabled + ); + + // GetCurrentUOPS + // Indicates which IDVDControl methods (Annex J user operations) are + // currently valid. DVD titles can enable or disable individual user + // operations at almost any point during playback. + HRESULT GetCurrentUOPS + ( [out] ULONG * pulUOPs + ); + + // GetAllSPRMs + // Returns the current contents of all DVD System Parameter Registers. + // See DVD-Video spec for use of individual registers. + // WE SHOULD DOC THE SPRMs RATHER THAN ASKING TO REFER TO DVD SPEC. + HRESULT GetAllSPRMs + ( [out] SPRMARRAY * pRegisterArray + ); + + // GetAllGPRMs + // Returns the current contents of all DVD General Parameter Registers. + // Use of GPRMs is title specific. + // WE SHOULD DOC THE GPRMs RATHER THAN ASKING TO REFER TO DVD SPEC. + HRESULT GetAllGPRMs + ( [out] GPRMARRAY * pRegisterArray + ); + + // GetAudioLanguage + // Returns the language of the specified stream within the current title. + // Does not return languages for menus. Returns *pLanguage as 0 if the + // stream does not include language. + // Use Win32 API GetLocaleInfo(*pLanguage, LOCALE_SENGLANGUAGE, pszString, cbSize) + // to create a human readable string name from the returned LCID. + HRESULT GetAudioLanguage + ( [in] ULONG ulStream, + [out] LCID * pLanguage + ); + + // GetSubpictureLanguage + // Returns the language of the specified stream within the current title. + // Does not return languages for menus. Returns *pLanguage=0 as 0 if the + // stream does not include language. + // Use Win32 API GetLocaleInfo(*pLanguage, LOCALE_SENGLANGUAGE, pszString, cbSize) + // to create a human readable string name from the returned LCID. + HRESULT GetSubpictureLanguage + ( [in] ULONG ulStream, + [out] LCID * pLanguage + ); + + // GetTitleAttributes + // Returns attributes of all video, audio, and subpicture streams for the + // specified title including menus. + // If 0xffffffff is specified as ulTitle, attributes for the current title + // are returned. + HRESULT GetTitleAttributes + ( [in] ULONG ulTitle, // requested title number + [out] DVD_MenuAttributes * pMenu, + [out] DVD_TitleAttributes * pTitle + ); + + // GetVMGAttributes + // Returns attributes of all video, audio, and subpicture + // streams for Video Manager Menus. This method suppliments GetTitleAttributes() + // for some menus, such as the Title menu, which are in a separate group of + // streams called the VMG (Video Manager) and are not associated with any + // particular title number. + HRESULT GetVMGAttributes + ( [out] DVD_MenuAttributes* pATR + ); + + // GetCurrentVideoAttributes + // Returns the video attributes for the current title or menu. + // + HRESULT GetCurrentVideoAttributes + ( [out] DVD_VideoAttributes * pATR + ); + + // GetAudioAttributes + // Returns the audio attributes for the specified stream in the current title + // or menu. + HRESULT GetAudioAttributes + ( [in] ULONG ulStream, + [out] DVD_AudioAttributes *pATR + ); + + // GetKaraokeChannelContents + // Returns the karaoke contents of each channel of the specified stream in the current title + // or menu. + HRESULT GetKaraokeAttributes + ( [in] ULONG ulStream, + [out] DVD_KaraokeAttributes* pAttributes + ); + + // GetSubpictureAttributes + // Returns the subpicture attributes for the specified stream in the current + // title or menu. + HRESULT GetSubpictureAttributes + ( [in] ULONG ulStream, + [out] DVD_SubpictureAttributes *pATR + ); + + // GetDVDVolumeInfo + // Returns current DVD volume information. + HRESULT GetDVDVolumeInfo + ( [out] ULONG *pulNumOfVolumes, // number of volumes (disc sides?) in a volume set + [out] ULONG *pulVolume, // volume number for current DVD directory + [out] DVD_DISC_SIDE *pSide, // current disc side + [out] ULONG *pulNumOfTitles // number of titles available in this volume + ); + + // GetDVDTextNumberOfLanguages + // Returns the number of text languages for the current DVD directory. + // Should return some error code if no root directory is found. + HRESULT GetDVDTextNumberOfLanguages + ( [out] ULONG * pulNumOfLangs + ); + + // GetDVDTextLanguageInfo + // Returns the text languages information (number of strings, language code, + // char set) for the specified language index. + // Should return some error code if an invalid text index is specified. + HRESULT GetDVDTextLanguageInfo + ( [in] ULONG ulLangIndex, + [out] ULONG* pulNumOfStrings, + [out] LCID* pLangCode, + [out] enum DVD_TextCharSet * pbCharacterSet + ); + + // GetDVDTextStringAsNative + // Returns the text string as an array of bytes for the specified language + // index.and string index. + // Should return some error code if an invalid text or string index is specified. + // It also just returns the length of the string if pchBuffer is specified as NULL. + HRESULT GetDVDTextStringAsNative + ( [in] ULONG ulLangIndex, + [in] ULONG ulStringIndex, + [out] BYTE* pbBuffer, + [in] ULONG ulMaxBufferSize, + [out] ULONG* pulActualSize, + [out] enum DVD_TextStringType* pType + ); + + // GetDVDTextStringAsUnicode + // Returns the text string in Unicode for the specified language index.and string index. + // Should return some error code if an invalid text or string index is specified. + // It also just returns the length of the string if pchBuffer is specified as NULL. + HRESULT GetDVDTextStringAsUnicode + ( [in] ULONG ulLangIndex, + [in] ULONG ulStringIndex, + [out] WCHAR* pchwBuffer, + [in] ULONG ulMaxBufferSize, + [out] ULONG* pulActualSize, + [out] enum DVD_TextStringType* pType + ); + + // GetPlayerParentalLevel + // Returns the current parental level and the current country code that has + // been set in the system registers in player. + // See Table 3.3.4-1 of the DVD-Video spec for the defined parental levels. + // Valid Parental Levels range from 1 to 8 if parental management is enabled. + // Returns 0xffffffff if parental management is disabled + // See ISO3166 : Alpha-2 Code for the country codes. + HRESULT GetPlayerParentalLevel + ( [out] ULONG *pulParentalLevel, // current parental level + [out] BYTE pbCountryCode[2] // current country code + ); + + // GetNumberOfChapters + // Returns the number of chapters that are defined for a + // given title. + HRESULT GetNumberOfChapters + ( [in] ULONG ulTitle, // Title for which number of chapters is requested + [out] ULONG *pulNumOfChapters // Number of chapters for the specified title + ); + + // GetTitleParentalLevels + // Returns the parental levels that are defined for a particular title. + // pulParentalLevels will be combination of DVD_PARENTAL_LEVEL_8, + // DVD_PARENTAL_LEVEL_6, or DVD_PARENTAL_LEVEL_1 OR-ed together + HRESULT GetTitleParentalLevels + ( [in] ULONG ulTitle, // Title for which parental levels are requested + [out] ULONG *pulParentalLevels // Parental levels defined for the title "OR"ed together + ); + + // GetDVDDirectory + // Returns the root directory that is set in the player. If a valid root + // has been found, it returns the root string. Otherwise, it returns 0 for + // pcbActualSize indicating that a valid root directory has not been found + // or initialized. + // + // !!! used to return LPTSTR. interface was changed to return + // LPSTR (ansi) for compatibility. COM APIs should pass with + // UNICODE strings only. + // + HRESULT GetDVDDirectory + ( [out, size_is(ulMaxSize)] LPWSTR pszwPath, // pointer to buffer to get root string + [in] ULONG ulMaxSize, // size of buffer in WCHARs passed in + [out] ULONG *pulActualSize // size of actual data returned (in WCHARs) + ); + + + // IsAudioStreamEnabled + // + // Determines if the specified audio stream is enabled/disabled in the current PGC. + // + // ulStreamNum - audio stream number to test + // pbEnabled - where to place the result + HRESULT IsAudioStreamEnabled + ( [in] ULONG ulStreamNum, // stream number to test + [out] BOOL *pbEnabled // returned state + ); + + // GetDiscID + // + // If pszwPath is specified as NULL, DVD Navigator will use the current path + // that would be returned by GetDVDDirectory() at this point. + // + // Returns a 64-bit identification number for the specified DVD disc. + HRESULT GetDiscID + ( [in] LPCWSTR pszwPath, // root path (should we rather use const WCHAR*?) + [out] ULONGLONG* pullDiscID // 64-bit unique id for the disc + ) ; + + // GetState + // + // The navigator will create a new state object and save the current location into it. + // The state object can be used to restore the navigator the saved location at a later time. + // A new IDvdState object is created (with a single AddRef) and returned in *pStateData. + // The object must be Released() when the application is finished with it. + // + HRESULT GetState + ( [out] IDvdState **pStateData // returned object + ); + + // + // GetMenuLanguages + // + // Navigator gets all of the menu languages for the VMGM and VTSM domains. + // + HRESULT GetMenuLanguages + ( [out] LCID *pLanguages, // data buffer (NULL returns #languages) + [in] ULONG ulMaxLanguages, // maxiumum number of languages to retrieve + [out] ULONG *pulActualLanguages // actual number of languages retrieved + ); + + // + // GetButtonAtPosition + // + // This is typically called in response to a mouse move within the + // display window. + // It returns the button located at the specified point within the display window. + // If no button is present at that position, then VFW_E_DVD_NO_BUTTON is returned. + // Button indices start at 1. + // + // NOTE: DVD Buttons do not all necessarily have highlight rects, + // button rects can overlap, and button rects do not always + // correspond to the visual representation of DVD buttons. + HRESULT GetButtonAtPosition // typically called after a mouse move + ( [in] POINT point, + [out] ULONG *pulButtonIndex + ); + + // + // GetCmdFromEvent + // + // This method maps an EC_DVD_CMD_BEGIN/COMPLETE/CANCEL event's lParam1 into an AddRef'd + // IDvdCmd pointer. You must Release the returned pointer. NULL is returned if the function + // fails. + // + HRESULT GetCmdFromEvent + ( [in] LONG_PTR lParam1, + [out] IDvdCmd **pCmdObj + ); + + // GetDefaultMenuLanguage + // Returns the default language for menus. + HRESULT GetDefaultMenuLanguage + ( [out] LCID * pLanguage + ); + + // GetDefaultAudioLanguage + // Gets the default audio language. + // Languages are specified with Windows standard LCIDs. + HRESULT GetDefaultAudioLanguage + ( [out] LCID* pLanguage, + [out] DVD_AUDIO_LANG_EXT* pAudioExtension + ); + + // GetDefaultSubpictureLanguage + // Gets the default subpicture language. + // Languages are specified with Windows standard LCIDs. + HRESULT GetDefaultSubpictureLanguage + ( [out] LCID* pLanguage, + [out] DVD_SUBPICTURE_LANG_EXT* pSubpictureExtension + ); + + // + // GetDecoderCaps: + // Retrieves the DVD decoder's details about max data rate for video, audio + // and subpicture (going backward and forward) as well as support for various + // types of audio (AC3, MPEG2, DTS, SDDS, LPCM). + // + HRESULT GetDecoderCaps + ( [out] DVD_DECODER_CAPS *pCaps + ) ; + + // + // GetButtonRect: + // Retrieves the coordinates for a given button number + // + HRESULT GetButtonRect + ( [in] ULONG ulButton, + [out] RECT *pRect + ) ; + + // IsSubpictureStreamEnabled + // + // Determines if the specified subpicture stream is enabled/disabled in the current PGC. + // + // ulStreamNum - Subpicture stream number to test + // pbEnabled - where to place the result + HRESULT IsSubpictureStreamEnabled + ( [in] ULONG ulStreamNum, // stream number to test + [out] BOOL *pbEnabled // returned state + ); +} + + + +//========================================================================== +//========================================================================== +// +// typedefs used by IDvdGraphBuilder interface. +// +//========================================================================== +//========================================================================== + +typedef enum _AM_DVD_GRAPH_FLAGS { + AM_DVD_HWDEC_PREFER = 0x01, // default + AM_DVD_HWDEC_ONLY = 0x02, + AM_DVD_SWDEC_PREFER = 0x04, + AM_DVD_SWDEC_ONLY = 0x08, + AM_DVD_NOVPE = 0x100 +} AM_DVD_GRAPH_FLAGS ; + +typedef enum _AM_DVD_STREAM_FLAGS { + AM_DVD_STREAM_VIDEO = 0x01, + AM_DVD_STREAM_AUDIO = 0x02, + AM_DVD_STREAM_SUBPIC = 0x04 +} AM_DVD_STREAM_FLAGS ; + +typedef struct { + HRESULT hrVPEStatus ; // VPE mixing error code (0 => success) + BOOL bDvdVolInvalid ; // Is specified DVD volume invalid? + BOOL bDvdVolUnknown ; // Is DVD volume to be played not specified/not found? + BOOL bNoLine21In ; // video decoder doesn't produce line21 (CC) data + BOOL bNoLine21Out ; // can't show decoded line21 data as CC on video + int iNumStreams ; // number of DVD streams to render + int iNumStreamsFailed ; // number of streams failed to render + DWORD dwFailedStreamsFlag ; // combination of flags to indicate failed streams +} AM_DVD_RENDERSTATUS ; + + +// +// IDvdGraphBuilder interface to build a filter graph for DVD-Video playback. +// + +[ + object, + local, + uuid(FCC152B6-F372-11d0-8E00-00C04FD7C08B), + pointer_default(unique) +] +interface IDvdGraphBuilder : IUnknown { + + // Returns the IGraphBuilder interface for the filtergraph used by the + // CDvdGraphBuilder object. + // Remember to *ppGB->Release() when you're done with it + HRESULT GetFiltergraph + ( [out] IGraphBuilder **ppGB + ) ; + + // Gets specific interface pointers in the DVD-Video playback graph to + // make DVD-Video playback development easier. + // It helps get the following interfaces to control playback/show CC/ + // position window/control volume etc: + // - IDvdControl, IDvdInfo + // - IAMLine21Decoder + // - IVideoWindow, IBasicVideo + // - IBasicAudio + // This method will return + // a) E_INVALIDARG if ppvIF is invalid + // b) E_NOINTERFACE if riid is an IID we don't know about + // c) VFW_E_DVD_GRAPHNOTREADY if the graph has not been built through + // RenderDvdVideoVolume() yet. + // Remember to *ppvIF->Release() when you're done with it + HRESULT GetDvdInterface + ( [in] REFIID riid, // IID of the interface required + [out] void **ppvIF // returns pointer to the required interface + ) ; + + // Builds a filter graph according to user specs for playing back a + // DVD-Video volume. + // This method returns S_FALSE if + // 1. the graph has been either built, but either + // a) VPE mixing doesn't work (app didn't use AM_DVD_NOVPE flag) + // b) video decoder doesn't produce line21 data + // c) line21 data couldn't be rendered (decoding/mixing problem) + // d) the call specified an invalid volume path or DVD Nav couldn't + // locate any DVD-Video volume to be played. + // 2. some streams didn't render (completely), but the others have + // been rendered so that the volume can be partially played back. + // The status is indicated through the fields of the pStatus (out) + // parameter. + // About 1(a), the app will have enough info to tell the user that the + // video won't be visible unless a TV is connected to the NTSC out + // port of the DVD decoder (presumably HW in this case). + // For case 1(b) & (c), the app "can" put up a warning/informative message + // that closed captioning is not available because of the decoder. + // 1(d) helps an app to ask the user to insert a DVD-Video disc if none + // is specified/available in the drive when playback is started. + // This method builds the graph even if + // - an invalid DVD-Video volume is specified + // - the caller uses lpwszPathName = NULL to make the DVD Nav to locate + // the default volume to be played back, but DVD Nav doesn't find a + // default DVD-Video volume to be played back. + // An app can later specify the volume using IDvdControl::SetRoot() + // method. + // #2 will help the app indicate to the user that some of the streams + // can't be played. + // + // The graph is built using filters based on the dwFlags value (to use + // HW decoders or SW decoders or a mix of them). + // The dwFlags value is one of the values in AM_DVD_GRAPH_FLAGS enum + // type. The default value is AM_DVD_HWDEC_PREFER. None of the + // AM_DVD_HWDEC_xxx or AM_DVD_SWDEC_xxx flags can be mixed. However + // AM_DVD_NOVPE can be OR-ed with any of the AM_DVD_HWDEC_xxx flags. + // + // The method returns S_OK if the playback graph is built successfully + // with all the streams completely rendered and a valid DVD-Video volume + // is specified or a default one has been located. + // + // If the dwFlags specify conflicting options, E_INVALIDARG is returned. + // If the graph building fails, the method returns one of the following + // error codes: + // VFW_E_DVD_RENDERFAIL, VFW_E_DVD_DECNOTENOUGH + // + HRESULT RenderDvdVideoVolume + ( [in] LPCWSTR lpcwszPathName, // Can be NULL too + [in] DWORD dwFlags, // 0 is the default (use max HW) + [out] AM_DVD_RENDERSTATUS *pStatus // returns indications of ANY failure + ) ; +} + + +// +// DDraw Exclusive Mode Video standard COM interface for Overlay Mixer +// +[ + object, + local, + uuid(153ACC21-D83B-11d1-82BF-00A0C9696C8F), + pointer_default(unique) +] +interface IDDrawExclModeVideo : IUnknown { + // set a ddraw object to be used by the overlay mixer. If even one of the pins + // of the ovmixer is connected, then it won't start using the new ddraw obect + // immediately but just cache it. It will start using it the next time, all its + // pins are disconnected. + HRESULT SetDDrawObject([in] IDirectDraw *pDDrawObject); + + // gets the ddraw object currently being used by the overlay mixer. If the app has not + // set any ddraw object and the ovmixer has not yet allocated one, then *ppDDrawObject + // will be set to NULL and *pbUsingExternal will be set TO FALSE. Otherwise *pbUsingExternal + // will be set to TRUE if the ovmixer is currently USING an app given ddraw object and FALSE + // othewise + HRESULT GetDDrawObject([out] IDirectDraw **ppDDrawObject, + [out] BOOL *pbUsingExternal); + + // set a primary surface to be used by the overlay mixer. If even one of the pins + // of the ovmixer is connected, then it won't start using the new primary surface + // immediately but just cache it. It will start using it the next time, all its + // pins are disconnected. + // Also when the ovmixer does start using an app given primary surface, it will delete + // its output pin (and not draw its own colorkey) since the app is expected to do the + // window management and drawing colorkey etc on the primary surface + // This function makes sure that the surface provided exposes IDirectDrawSurface3, and + // is consistent with the ddraw object provided. + HRESULT SetDDrawSurface([in] IDirectDrawSurface *pDDrawSurface); + + // gets the ddraw surface currently being used by the overlay mixer. If the app has not + // set any ddraw surface and the ovmixer has not yet allocated one, then *ppDDrawSurface + // will be set to NULL and *pbUsingExternal will be set to FALSE. Otherwise *pbUsingExternal + // will be set to TRUE if the ovmixer is curretnly USING an app given ddraw surface and FALSE + // otherwise + HRESULT GetDDrawSurface([out] IDirectDrawSurface **ppDDrawSurface, + [out] BOOL *pbUsingExternal); + + // set draw paramters on the ovmixer (src and dest rect). Note that if the mode + // of the ovmixer is set to LETTER_BOX, then the ovmixer might show the video in + // only a subrect of *prcTarget (see IMixerPinConfig for details). + HRESULT SetDrawParameters([in] const RECT * prcSource, + [in] const RECT * prcTarget); + + // gets the current video size and picture aspect ratio of the primary stream of the overlay mixer + // The app should look for the evene EC_VIDEO_SIZE_AR_CHANGED and on its receipt + // call this function again + HRESULT GetNativeVideoProps([out] DWORD *pdwVideoWidth, + [out] DWORD *pdwVideoHeight, + [out] DWORD *pdwPictAspectRatioX, + [out] DWORD *pdwPictAspectRatioY); + + // Set the callback interface - the callback interface will be defined in a later release + // Currently returns E_NOTIMPL + HRESULT SetCallbackInterface([in] IDDrawExclModeVideoCallback *pCallback, + [in] DWORD dwFlags); +} + + +// +// DDraw Exclusive Mode Video callbacks +// + +// enum for flags +enum _AM_OVERLAY_NOTIFY_FLAGS { + AM_OVERLAY_NOTIFY_VISIBLE_CHANGE = 0x00000001, + AM_OVERLAY_NOTIFY_SOURCE_CHANGE = 0x00000002, + AM_OVERLAY_NOTIFY_DEST_CHANGE = 0x00000004 +}; +[ + object, + local, + uuid(913c24a0-20ab-11d2-9038-00a0c9697298), + pointer_default(unique) +] +interface IDDrawExclModeVideoCallback : IUnknown { + + // Called once before UpdateOverlay is called with bBefore == TRUE + // and once after it is called with bBefore == FALSE and otherwise + // identical parameters + HRESULT OnUpdateOverlay( + [in] BOOL bBefore, // After UpdateOverlayCalled? + [in] DWORD dwFlags,// _AM_OVERLAY_NOTIFY enum + [in] BOOL bOldVisible, + [in] const RECT *prcOldSrc, + [in] const RECT *prcOldDest, + [in] BOOL bNewVisible, + [in] const RECT *prcNewSrc, + [in] const RECT *prcNewDest); + + // Called when the surface color key is changed + HRESULT OnUpdateColorKey( + [in] const COLORKEY *pKey, + [in] DWORD dwColor); + + // Called when the video size or aspect ratio changes + HRESULT OnUpdateSize( [in] DWORD dwWidth, // Movie pixel width + [in] DWORD dwHeight, // Movie pixel height + [in] DWORD dwARWidth, // Aspect ratio horizontal + [in] DWORD dwARHeight); // Aspect ratio vertical +} diff --git a/windows_libs/mssdk/include/DShowIDL/dxtrans.idl b/windows_libs/mssdk/include/DShowIDL/dxtrans.idl new file mode 100644 index 00000000..bd7e6705 --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/dxtrans.idl @@ -0,0 +1,1059 @@ +/***************************************************************************** +* DXTrans.idl * +*-------------* +* +* Description: +* This is the IDL file for DirectX installable transform coclass, +* interface, and type definitions. +* +* History: +* 09/02/1999 a-matcal Added IDXTFilterBehavior, IDXTFilter interfaces. +* Added CDXTFilterFactory, CDXTFilterBehavior, +* CDXTFilter coclasses. +* +*----------------------------------------------------------------------------- +* Creation: EWC 07/07/97 +* Copyright Microsoft Corporation 1997-1999 +* All rights reserved. +* +*****************************************************************************/ +cpp_quote("#include ") +cpp_quote("#include ") +cpp_quote("#include ") +cpp_quote("#include ") +cpp_quote("#include ") + +//--- Import base idl +import "oaidl.idl"; +import "ocidl.idl"; +import "servprov.idl"; +import "comcat.idl"; + +// +// Since direct draw does not have an IDL, we'll define DDSURFACEDESC to +// be a void, but include ddraw.h in the header file. This makes MIDL happy. +// +#ifndef DDSURFACEDESC +cpp_quote("#if 0") +cpp_quote("// Bogus definition used to make MIDL compiler happy") +typedef void DDSURFACEDESC; +typedef void D3DRMBOX; +typedef void D3DVECTOR; +typedef void D3DRMMATRIX4D; +typedef void* LPSECURITY_ATTRIBUTES; +cpp_quote("#endif") +#endif +//--- Additional includes + +//--- Export +cpp_quote( "#ifdef _DXTRANSIMPL") +cpp_quote( " #define _DXTRANS_IMPL_EXT _declspec(dllexport)") +cpp_quote( "#else") +cpp_quote( " #define _DXTRANS_IMPL_EXT _declspec(dllimport)") +cpp_quote( "#endif") + +//=== Forward References ==================================================== +interface IDXTransformFactory; +interface IDXTransform; +interface IDXTaskManager; +interface IDXSurfaceFactory; +interface IDXSurface; +interface IDXARGBSurfaceInit; +interface IDXRawSurface; +interface IDXARGBReadPtr; +interface IDXARGBReadWritePtr; +interface IDXDCLock; +interface IDXTScale; +interface IDXLookupTable; +interface IDXTBindHost; +interface IBindHost; +interface IDXTScaleOutput; +interface IDXGradient; + +//=== Constants ============================================================= + +cpp_quote("//") +cpp_quote("// All GUIDs for DXTransform are declared in DXTGUID.C in the SDK include directory") +cpp_quote("//") +cpp_quote("EXTERN_C const GUID DDPF_RGB1;") +cpp_quote("EXTERN_C const GUID DDPF_RGB2;") +cpp_quote("EXTERN_C const GUID DDPF_RGB4;") +cpp_quote("EXTERN_C const GUID DDPF_RGB8;") +cpp_quote("EXTERN_C const GUID DDPF_RGB332;") +cpp_quote("EXTERN_C const GUID DDPF_ARGB4444;") +cpp_quote("EXTERN_C const GUID DDPF_RGB565;") +cpp_quote("EXTERN_C const GUID DDPF_BGR565;") +cpp_quote("EXTERN_C const GUID DDPF_RGB555;") +cpp_quote("EXTERN_C const GUID DDPF_ARGB1555;") +cpp_quote("EXTERN_C const GUID DDPF_RGB24;") +cpp_quote("EXTERN_C const GUID DDPF_BGR24;") +cpp_quote("EXTERN_C const GUID DDPF_RGB32;") +cpp_quote("EXTERN_C const GUID DDPF_BGR32;") +cpp_quote("EXTERN_C const GUID DDPF_ABGR32;") +cpp_quote("EXTERN_C const GUID DDPF_ARGB32;") +cpp_quote("EXTERN_C const GUID DDPF_PMARGB32;") +cpp_quote("EXTERN_C const GUID DDPF_A1;") +cpp_quote("EXTERN_C const GUID DDPF_A2;") +cpp_quote("EXTERN_C const GUID DDPF_A4;") +cpp_quote("EXTERN_C const GUID DDPF_A8;") +cpp_quote("EXTERN_C const GUID DDPF_Z8;") +cpp_quote("EXTERN_C const GUID DDPF_Z16;") +cpp_quote("EXTERN_C const GUID DDPF_Z24;") +cpp_quote("EXTERN_C const GUID DDPF_Z32;") +cpp_quote("//") +cpp_quote("// Component categories") +cpp_quote("//") +cpp_quote("EXTERN_C const GUID CATID_DXImageTransform;") +cpp_quote("EXTERN_C const GUID CATID_DX3DTransform;") +cpp_quote("EXTERN_C const GUID CATID_DXAuthoringTransform;") +cpp_quote("EXTERN_C const GUID CATID_DXSurface;") +cpp_quote("//") +cpp_quote("// Service IDs") +cpp_quote("//") +cpp_quote("EXTERN_C const GUID SID_SDirectDraw;") +cpp_quote("EXTERN_C const GUID SID_SDirect3DRM;") +cpp_quote("#define SID_SDXTaskManager CLSID_DXTaskManager") +cpp_quote("#define SID_SDXSurfaceFactory IID_IDXSurfaceFactory") +cpp_quote("#define SID_SDXTransformFactory IID_IDXTransformFactory") + +//=== Struct & Enum definitions ============================================= + +//=== Interface definitions ================================================= + + +[ + uuid(17B59B2B-9CC8-11d1-9053-00C04FD9189D), + helpstring("IDXBaseObject Interface"), + pointer_default(unique) +] +interface IDXBaseObject : IUnknown +{ + HRESULT GetGenerationId( [out]ULONG *pID); + HRESULT IncrementGenerationId([in] BOOL bRefresh); + HRESULT GetObjectSize( [out] ULONG *pcbSize); +} + +//--- Dimension identifiers +typedef enum DXBNDID +{ + DXB_X = 0, + DXB_Y = 1, + DXB_Z = 2, + DXB_T = 3 +} DXBNDID; + +//--- Bound types +typedef enum DXBNDTYPE +{ + DXBT_DISCRETE, + DXBT_DISCRETE64, + DXBT_CONTINUOUS, + DXBT_CONTINUOUS64 +} DXBNDTYPE; + +//--- Discrete bounds (image & sound) +typedef struct DXDBND +{ + long Min; + long Max; +} DXDBND; +typedef DXDBND DXDBNDS[4]; + +typedef struct DXDBND64 +{ + LONGLONG Min; + LONGLONG Max; +} DXDBND64; +typedef DXDBND64 DXDBNDS64[4]; + +//--- Continuous bounds (geometry) +typedef struct DXCBND +{ + float Min; + float Max; +} DXCBND; +typedef DXCBND DXCBNDS[4]; + +typedef struct DXCBND64 +{ + double Min; + double Max; +} DXCBND64; +typedef DXCBND64 DXCBNDS64[4]; + +//--- Combined space +typedef union DXBNDS switch( DXBNDTYPE eType ) u +{ + case DXBT_DISCRETE: + DXDBND D[4]; + case DXBT_DISCRETE64: + DXDBND64 LD[4]; + case DXBT_CONTINUOUS: + DXCBND C[4]; + case DXBT_CONTINUOUS64: + DXCBND64 LC[4]; +} DXBNDS; + +//--- Discrete 4D vector +typedef long DXDVEC[4]; +typedef LONGLONG DXDVEC64[4]; + +//--- Continous 4D vector +typedef float DXCVEC[4]; +typedef double DXCVEC64[4]; + +//--- Combined space vector +typedef union DXVEC switch( DXBNDTYPE eType ) u +{ + case DXBT_DISCRETE: + long D[4]; + case DXBT_DISCRETE64: + LONGLONG LD[4]; + case DXBT_CONTINUOUS: + float C[4]; + case DXBT_CONTINUOUS64: + double LC[4]; +} DXVEC; + +//--- IDXTransformFactory --------------------------------------------------- +[ + uuid(6A950B2B-A971-11d1-81C8-0000F87557DB), + helpstring("IDXTransformFactory Interface"), + pointer_default(unique) +] +interface IDXTransformFactory : IServiceProvider +{ + HRESULT SetService( [in]REFGUID guidService, + [in]IUnknown *pUnkService, + [in]BOOL bWeakReference); + + HRESULT CreateTransform( [in, size_is(ulNumInputs)]IUnknown** punkInputs, + [in]ULONG ulNumInputs, + [in, size_is(ulNumOutputs)]IUnknown** punkOutputs, + [in]ULONG ulNumOutputs, + [in]IPropertyBag* pInitProps, [in]IErrorLog* pErrLog, + [in]REFCLSID TransCLSID, [in]REFIID TransIID, + [out, iid_is(TransIID)]void** ppTransform ); + + HRESULT InitializeTransform( [in]IDXTransform* pTransform, + [in, size_is(ulNumInputs)]IUnknown** punkInputs, + [in]ULONG ulNumInputs, + [in, size_is(ulNumOutputs)]IUnknown** punkOutputs, + [in]ULONG ulNumOutputs, + [in]IPropertyBag* pInitProps, [in]IErrorLog* pErrLog ); +}; + +//--- IDXTransform ------------------------------------------------- + +typedef enum DXTMISCFLAGS +{ + DXTMF_BLEND_WITH_OUTPUT = ( 1L << 0 ), + DXTMF_DITHER_OUTPUT = ( 1L << 1 ), + DXTMF_OPTION_MASK = (0x0000FFFF), // Low word is settable options + DXTMF_VALID_OPTIONS = (DXTMF_BLEND_WITH_OUTPUT | DXTMF_DITHER_OUTPUT), + // + // Status flags can not be changed by call to SetMiscFlags + // + DXTMF_BLEND_SUPPORTED = ( 1L << 16 ), + DXTMF_DITHER_SUPPORTED = ( 1L << 17 ), + DXTMF_INPLACE_OPERATION = ( 1L << 24 ), + DXTMF_BOUNDS_SUPPORTED = ( 1L << 25 ), + DXTMF_PLACEMENT_SUPPORTED = ( 1L << 26 ), + DXTMF_QUALITY_SUPPORTED = ( 1L << 27 ), + DXTMF_OPAQUE_RESULT = ( 1L << 28 ) +} DXTMISCFLAGS; + + +typedef enum DXINOUTINFOFLAGS +{ + DXINOUTF_OPTIONAL = ( 1L << 0) +} DXINOUTINFOFLAGS; + +[ + uuid(30A5FB78-E11F-11d1-9064-00C04FD9189D), + helpstring("IDXTransform Interface"), + pointer_default(unique) +] +interface IDXTransform : IDXBaseObject +{ + HRESULT Setup( [in, size_is(ulNumInputs)] IUnknown * const * punkInputs, + [in]ULONG ulNumInputs, + [in, size_is(ulNumOutputs)] IUnknown * const * punkOutputs, + [in]ULONG ulNumOutputs, + [in]DWORD dwFlags ); + HRESULT Execute( [in]const GUID* pRequestID, [in]const DXBNDS *pClipBnds, + [in]const DXVEC *pPlacement ); + HRESULT MapBoundsIn2Out( [in] const DXBNDS *pInBounds, + [in]ULONG ulNumInBnds, + [in]ULONG ulOutIndex, + [out]DXBNDS *pOutBounds ); + HRESULT MapBoundsOut2In( [in] ULONG ulOutIndex, + [in] const DXBNDS *pOutBounds, + [in] ULONG ulInIndex, + [out]DXBNDS *pInBounds ); + HRESULT SetMiscFlags( [in] DWORD dwMiscFlags); + HRESULT GetMiscFlags( [out]DWORD * pdwMiscFlags ); + HRESULT GetInOutInfo( [in]BOOL bIsOutput, [in]ULONG ulIndex, + [out]DWORD *pdwFlags, [out, size_is(*pcIDs)] GUID *pIDs, + [in, out] ULONG *pcIDs, + [out] IUnknown **ppUnkCurrentObject); + HRESULT SetQuality( [in] float fQuality ); + HRESULT GetQuality( [out] float * fQuality ); +}; + + +[ + uuid(30A5FB79-E11F-11d1-9064-00C04FD9189D), + helpstring("IDXSurfacePick Interface"), + pointer_default(unique) +] +interface IDXSurfacePick : IUnknown +{ + HRESULT PointPick([in]const DXVEC *pPoint, + [out]ULONG * pulInputSurfaceIndex, + [out]DXVEC *pInputPoint); +} + + +//--- IDXTBindHost --------------------------------------------------- +// This interface is used to set a site-specific bind host for a transform. +// Only transforms that need access to a bind host need to implement this interface. + +// +// For some reason, MIDL does not like IBindHost, so we've declared this interface local +// +[ + uuid(D26BCE55-E9DC-11d1-9066-00C04FD9189D), + helpstring("IDXTBindHost Interface"), + pointer_default(unique), + local +] +interface IDXTBindHost : IUnknown +{ + HRESULT SetBindHost([in] IBindHost * pBindHost); +} + +//--- IDXTaskManager --------------------------------------------------- +// This interface is used to implement a task managment service provider +// to optimize thread usage. + +// Function type prototypes +typedef void (__stdcall DXTASKPROC)(void *pTaskData, BOOL* pbContinueProcessing ); +typedef DXTASKPROC *PFNDXTASKPROC; + +typedef void (__stdcall DXAPCPROC)(DWORD dwData); +typedef DXAPCPROC *PFNDXAPCPROC; + +cpp_quote("#ifdef __cplusplus") +cpp_quote("typedef struct DXTMTASKINFO" ) +cpp_quote("{") +cpp_quote(" PFNDXTASKPROC pfnTaskProc; // Pointer to function to execute") +cpp_quote(" PVOID pTaskData; // Pointer to argument data") +cpp_quote(" PFNDXAPCPROC pfnCompletionAPC; // Pointer to completion APC proc") +cpp_quote(" DWORD dwCompletionData; // Pointer to APC proc data") +cpp_quote(" const GUID* pRequestID; // Used to identify groups of tasks") +cpp_quote("} DXTMTASKINFO;") +cpp_quote("#else") + typedef struct DXTMTASKINFO + { + PVOID pfnTaskProc; // Pointer to function to execute + PVOID pTaskData; // Pointer to argument data + PVOID pfnCompletionAPC; // Pointer to completion APC proc + DWORD dwCompletionData; // Pointer to APC proc data + const GUID* pRequestID; // Used to identify groups of tasks + } DXTMTASKINFO; +cpp_quote("#endif") + +[ + local, + uuid(254DBBC1-F922-11d0-883A-3C8B00C10000), + helpstring("IDXTaskManager Interface"), + pointer_default(unique) +] +interface IDXTaskManager : IUnknown +{ + HRESULT QueryNumProcessors( [out]ULONG* pulNumProc ); + HRESULT SetThreadPoolSize( [in]ULONG ulNumThreads ); + HRESULT GetThreadPoolSize( [out]ULONG* pulNumThreads ); + HRESULT SetConcurrencyLimit( [in]ULONG ulNumThreads ); + HRESULT GetConcurrencyLimit( [out]ULONG* pulNumThreads ); + HRESULT ScheduleTasks( [in]DXTMTASKINFO TaskInfo[], + [in]HANDLE Events[], + [out]DWORD TaskIDs[], + [in]ULONG ulNumTasks, [in]ULONG ulWaitPeriod ); + HRESULT TerminateTasks( [in]DWORD TaskIDs[], [in]ULONG ulCount, + [in]ULONG ulTimeOut ); + HRESULT TerminateRequest( [in]REFIID RequestID, [in]ULONG ulTimeOut ); +}; + +//--- IDXSurfaceFactory --------------------------------------------------- +// +// We want an operator so that we can cast from a DXSAMPLE to a DWORD, so for C++ we will +// define the structure a special way. +// + +cpp_quote("#ifdef __cplusplus") +cpp_quote("/////////////////////////////////////////////////////") +cpp_quote("") +cpp_quote("class DXBASESAMPLE;") +cpp_quote("class DXSAMPLE;") +cpp_quote("class DXPMSAMPLE;") +cpp_quote("") +cpp_quote("/////////////////////////////////////////////////////") +cpp_quote("") +cpp_quote("class DXBASESAMPLE") +cpp_quote("{") +cpp_quote("public:") +cpp_quote(" BYTE Blue;") +cpp_quote(" BYTE Green;") +cpp_quote(" BYTE Red;") +cpp_quote(" BYTE Alpha;") +cpp_quote(" DXBASESAMPLE() {}") +cpp_quote(" DXBASESAMPLE(const BYTE alpha, const BYTE red, const BYTE green, const BYTE blue) :") +cpp_quote(" Alpha(alpha),") +cpp_quote(" Red(red),") +cpp_quote(" Green(green),") +cpp_quote(" Blue(blue) {}") +cpp_quote(" DXBASESAMPLE(const DWORD val) { *this = (*(DXBASESAMPLE *)&val); }") +cpp_quote(" operator DWORD () const {return *((DWORD *)this); }") +cpp_quote(" DWORD operator=(const DWORD val) { return *this = *((DXBASESAMPLE *)&val); }") +cpp_quote("}; // DXBASESAMPLE") +cpp_quote("") +cpp_quote("/////////////////////////////////////////////////////") +cpp_quote("") +cpp_quote("class DXSAMPLE : public DXBASESAMPLE") +cpp_quote("{") +cpp_quote("public:") +cpp_quote(" DXSAMPLE() {}") +cpp_quote(" DXSAMPLE(const BYTE alpha, const BYTE red, const BYTE green, const BYTE blue) :") +cpp_quote(" DXBASESAMPLE(alpha, red, green, blue) {}") +cpp_quote(" DXSAMPLE(const DWORD val) { *this = (*(DXSAMPLE *)&val); }") +cpp_quote(" operator DWORD () const {return *((DWORD *)this); }") +cpp_quote(" DWORD operator=(const DWORD val) { return *this = *((DXSAMPLE *)&val); }") +cpp_quote(" operator DXPMSAMPLE() const;") +cpp_quote("}; // DXSAMPLE") +cpp_quote("") +cpp_quote("/////////////////////////////////////////////////////") +cpp_quote("") +cpp_quote("class DXPMSAMPLE : public DXBASESAMPLE") +cpp_quote("{") +cpp_quote("public:") +cpp_quote(" DXPMSAMPLE() {}") +cpp_quote(" DXPMSAMPLE(const BYTE alpha, const BYTE red, const BYTE green, const BYTE blue) :") +cpp_quote(" DXBASESAMPLE(alpha, red, green, blue) {}") +cpp_quote(" DXPMSAMPLE(const DWORD val) { *this = (*(DXPMSAMPLE *)&val); }") +cpp_quote(" operator DWORD () const {return *((DWORD *)this); }") +cpp_quote(" DWORD operator=(const DWORD val) { return *this = *((DXPMSAMPLE *)&val); }") +cpp_quote(" operator DXSAMPLE() const;") +cpp_quote("}; // DXPMSAMPLE") +cpp_quote("") +cpp_quote("//") +cpp_quote("// The following cast operators are to prevent a direct assignment of a DXSAMPLE to a DXPMSAMPLE") +cpp_quote("//") +cpp_quote("inline DXSAMPLE::operator DXPMSAMPLE() const { return *((DXPMSAMPLE *)this); }") +cpp_quote("inline DXPMSAMPLE::operator DXSAMPLE() const { return *((DXSAMPLE *)this); }") + +cpp_quote("#else // !__cplusplus") +typedef struct DXBASESAMPLE +{ + BYTE Blue; + BYTE Green; + BYTE Red; + BYTE Alpha; +} DXBASESAMPLE; + +typedef struct DXSAMPLE +{ + BYTE Blue; + BYTE Green; + BYTE Red; + BYTE Alpha; +} DXSAMPLE; + +typedef struct DXPMSAMPLE +{ + BYTE Blue; + BYTE Green; + BYTE Red; + BYTE Alpha; +} DXPMSAMPLE; +cpp_quote("#endif // !__cplusplus") + +typedef enum DXRUNTYPE +{ + DXRUNTYPE_CLEAR = 0, // The run is zero Alpha + DXRUNTYPE_OPAQUE = 1, // The run is full Alpha (i.e. 255) + DXRUNTYPE_TRANS = 2, // The run is non-zero Alpha + DXRUNTYPE_UNKNOWN= 3 // The run type is unknown. Caller must inspect. +} DXRUNTYPE; + +const ULONG DX_MAX_RUN_INFO_COUNT = 128; // Defines the maximum number of RUNINFOs in a single row + + +cpp_quote("// Ignore the definition used by MIDL for TLB generation") +cpp_quote("#if 0") + +typedef struct DXRUNINFO +{ + ULONG Bitfields; +} DXRUNINFO; + +cpp_quote("#endif // 0") + +// Emit the C definition to the H file directly, as bit fields are not +// supported by MIDL. + +cpp_quote("typedef struct DXRUNINFO") +cpp_quote("{") +cpp_quote(" ULONG Type : 2; // Type") +cpp_quote(" ULONG Count : 30; // Number of samples in run") +cpp_quote("} DXRUNINFO;") + + +typedef enum DXSFCREATE +{ + DXSF_FORMAT_IS_CLSID = ( 1L << 0 ), + DXSF_NO_LAZY_DDRAW_LOCK = ( 1L << 1 ) +} DXSFCREATE; + +typedef enum DXBLTOPTIONS +{ + DXBOF_DO_OVER = (1L << 0), + DXBOF_DITHER = (1L << 1) +} DXBLTOPTIONS; + + + +[ + uuid(144946F5-C4D4-11d1-81D1-0000F87557DB), + helpstring("IDXSurfaceFactory Interface"), + pointer_default(unique) +] +interface IDXSurfaceFactory : IUnknown +{ + [local] HRESULT CreateSurface([in] IUnknown *pDirectDraw, + [in] const DDSURFACEDESC * pDDSurfaceDesc, + [in] const GUID * pFormatID, + [in] const DXBNDS *pBounds, + [in] DWORD dwFlags, + [in] IUnknown *punkOuter, + [in] REFIID riid, + [out, iid_is( riid )] void ** ppDXSurface); + + HRESULT CreateFromDDSurface([in] IUnknown *pDDrawSurface, + [in] const GUID *pFormatID, + [in] DWORD dwFlags, + [in] IUnknown *punkOuter, + [in] REFIID riid, + [out, iid_is( riid )] void ** ppDXSurface); + + [local] HRESULT LoadImage( + [in] const LPWSTR pszFileName, + [in] IUnknown *pDirectDraw, + [in] const DDSURFACEDESC * pDDSurfaceDesc, + [in] const GUID *pFormatID, + [in] REFIID riid, + [out, iid_is( riid )] void ** ppDXSurface); + + [local] HRESULT LoadImageFromStream([in] IStream *pStream, + [in] IUnknown *pDirectDraw, + [in] const DDSURFACEDESC * pDDSurfaceDesc, + [in] const GUID *pFormatID, + [in] REFIID riid, + [out, iid_is( riid )] void ** ppDXSurface); + + [local] HRESULT CopySurfaceToNewFormat( [in]IDXSurface* pSrc, + [in] IUnknown *pDirectDraw, + [in] const DDSURFACEDESC * pDDSurfaceDesc, + [in] const GUID *pDestFormatID, + [out] IDXSurface** ppNewSurface ); + + [local] HRESULT CreateD3DRMTexture([in] IDXSurface *pSrc, + [in] IUnknown *pDirectDraw, + [in] IUnknown *pD3DRM3, + [in] REFIID riid, + [out, iid_is(riid)] void **ppTexture3); + + HRESULT BitBlt([in] IDXSurface *pDest, + [in] const DXVEC *pPlacement, + [in] IDXSurface *pSrc, + [in] const DXBNDS *pClipBounds, + [in] DWORD dwFlags); +} + + +typedef enum DXSURFMODCOMPOP +{ + DXSURFMOD_COMP_OVER = 0, + DXSURFMOD_COMP_ALPHA_MASK = 1, + DXSURFMOD_COMP_MAX_VALID = 1 +} DXSURFMODCOMPOP; + + +[ + uuid(9EA3B637-C37D-11d1-905E-00C04FD9189D), + helpstring("IDXSurfaceModifier Interface"), + pointer_default(unique) +] +interface IDXSurfaceModifier : IUnknown +{ + HRESULT SetFillColor([in] DXSAMPLE Color); + HRESULT GetFillColor([out] DXSAMPLE *pColor); + HRESULT SetBounds([in] const DXBNDS *pBounds ); // Get supported though IDXSurface interface + HRESULT SetBackground([in] IDXSurface *pSurface); + HRESULT GetBackground([out] IDXSurface **ppSurface); + HRESULT SetCompositeOperation([in] DXSURFMODCOMPOP CompOp); + HRESULT GetCompositeOperation([out] DXSURFMODCOMPOP *pCompOp); + // + // The following methods only apply to the FOREGROUND surface + // + HRESULT SetForeground([in] IDXSurface *pSurface, [in] BOOL bTile, [in] const POINT * pOrigin); + HRESULT GetForeground([out] IDXSurface **ppSurface, [out] BOOL *pbTile, [out] POINT * pOrigin); + HRESULT SetOpacity([in] float Opacity); + HRESULT GetOpacity([out] float *pOpacity); + HRESULT SetLookup( [in]IDXLookupTable * pLookupTable ); + HRESULT GetLookup( [out]IDXLookupTable ** ppLookupTable ); +} + + + +//--- IDXSurface --------------------------------------------------- +typedef enum DXSAMPLEFORMATENUM +{ + DXPF_FLAGSMASK = (0xFFFF0000), // Top word is flags, low word is enum + DXPF_NONPREMULT = (0x00010000), // Flags to be OR'd with pixel formats + DXPF_TRANSPARENCY = (0x00020000), // Color key or one-bit alpha (alpha only 0 or 0xFF) + DXPF_TRANSLUCENCY = (0x00040000), // Alpha can be any value from 0->0xFF + // + // This 3-bit field is used to determine what type of dithering to be used + // + DXPF_2BITERROR = (0x00200000), // 2 bits of error term + DXPF_3BITERROR = (0x00300000), // 3 bits of error term for color (16-bit color) + DXPF_4BITERROR = (0x00400000), // 4 bits of error term (ARGB 4444) + DXPF_5BITERROR = (0x00500000), // 5 bits of error term for color (8-bit color) + DXPF_ERRORMASK = (0x00700000), // Mask of bits used for dithering + + DXPF_NONSTANDARD = (0), // To be used for any surface that is not one of the following formats + // This can be combined with DXPFNONPREMULT if the surface can work + // better in non-premultiplied space. + DXPF_PMARGB32 = (1 | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY), + DXPF_ARGB32 = (2 | DXPF_NONPREMULT | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY), + DXPF_ARGB4444 = (3 | DXPF_NONPREMULT | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY | DXPF_4BITERROR), + DXPF_A8 = (4 | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY), + DXPF_RGB32 = (5), + DXPF_RGB24 = (6), + DXPF_RGB565 = (7 | DXPF_3BITERROR), + DXPF_RGB555 = (8 | DXPF_3BITERROR), + DXPF_RGB8 = (9 | DXPF_5BITERROR), + DXPF_ARGB1555 = (10 | DXPF_TRANSPARENCY | DXPF_3BITERROR), + DXPF_RGB32_CK = (DXPF_RGB32 | DXPF_TRANSPARENCY), + DXPF_RGB24_CK = (DXPF_RGB24 | DXPF_TRANSPARENCY), + DXPF_RGB555_CK = (DXPF_RGB555 | DXPF_TRANSPARENCY), + DXPF_RGB565_CK = (DXPF_RGB565 | DXPF_TRANSPARENCY), + DXPF_RGB8_CK = (DXPF_RGB8 | DXPF_TRANSPARENCY) +} DXSAMPLEFORMATENUM; + + + +typedef enum DXLOCKSURF +{ + DXLOCKF_READ = 0, + DXLOCKF_READWRITE = (1 << 0), + DXLOCKF_EXISTINGINFOONLY = (1 << 1), // If used in conjunction with WANTRUNINFO will prevent creation of a runmap if one does not exist + DXLOCKF_WANTRUNINFO = (1 << 2), + // + // The flags in the high word should be specific to the type of pointer that + // is requested. These flags define ARGB flags. These flags are advisory and + // are not required to be set for ARGB locks. + // + DXLOCKF_NONPREMULT = (1 << 16), // Caller will request non-premultiplied data + DXLOCKF_VALIDFLAGS = (DXLOCKF_READWRITE | DXLOCKF_EXISTINGINFOONLY | DXLOCKF_WANTRUNINFO | DXLOCKF_NONPREMULT) +} DXLOCKSURF; + +typedef enum DXSURFSTATUS +{ + DXSURF_TRANSIENT = (1 << 0), // Data in this surface changes often. + DXSURF_READONLY = (1 << 1), // Surface is read-only + DXSURF_VALIDFLAGS = (DXSURF_TRANSIENT | DXSURF_READONLY) +} DXSURFSTATUS; + +[ + uuid(B39FD73F-E139-11d1-9065-00C04FD9189D), + helpstring("IDXSurface Interface"), + pointer_default(unique) +] +interface IDXSurface : IDXBaseObject +{ + HRESULT GetPixelFormat([out] GUID * pFormatID, [out] DXSAMPLEFORMATENUM *pSampleFormatEnum); + HRESULT GetBounds( [out]DXBNDS *pBounds ); + HRESULT GetStatusFlags([out] DWORD * pdwStatusFlags); + HRESULT SetStatusFlags([in] DWORD dwStatusFlags); + HRESULT LockSurface( [in]const DXBNDS *pBounds, [in]ULONG ulTimeOut, [in]DWORD dwFlags, + [in]REFIID riid, [out, iid_is(riid)] void **ppPointer, + [out]ULONG* pulGenerationId ); + HRESULT GetDirectDrawSurface( [in] REFIID riid, + [out, iid_is(riid)] void ** ppSurface); + HRESULT GetColorKey(DXSAMPLE * pColorKey); // Can return E_NOTIMPL + HRESULT SetColorKey(DXSAMPLE ColorKey); // Set color of 0 to get rid of color key, can return E_NOTIMPL + HRESULT LockSurfaceDC( [in] const DXBNDS *pBounds, [in]ULONG ulTimeOut, [in] DWORD dwFlags, + [out] IDXDCLock **ppDCLock); + HRESULT SetAppData(DWORD_PTR dwAppData); + HRESULT GetAppData(DWORD_PTR *pdwAppData); +} + +//--- IDXSurfaceInit --------------------------------------------------- +[ + uuid(9EA3B639-C37D-11d1-905E-00C04FD9189D), + helpstring("IDXSurfaceInit Interface"), + pointer_default(unique), + local +] +interface IDXSurfaceInit : IUnknown +{ + HRESULT InitSurface([in] IUnknown *pDirectDraw, + [in] const DDSURFACEDESC *pDDSurfaceDesc, + [in] const GUID * pFormatID, + [in] const DXBNDS *pBounds, + [in] DWORD dwFlags); +}; + + +//--- IDXARGBSurfaceInit --------------------------------------------------- +[ + uuid(9EA3B63A-C37D-11d1-905E-00C04FD9189D), + helpstring("IDXARGBSurfaceInit Interface"), + pointer_default(unique), + local +] +interface IDXARGBSurfaceInit : IDXSurfaceInit +{ + HRESULT InitFromDDSurface( [in] IUnknown *pDDrawSurface, + [in] const GUID * pFormatID, + [in] DWORD dwFlags); + HRESULT InitFromRawSurface([in] IDXRawSurface *pRawSurface); +}; + +//--- IDXARGBReadPtr --------------------------------------------------- +typedef struct tagDXNATIVETYPEINFO +{ + BYTE * pCurrentData; + BYTE * pFirstByte; + long lPitch; + DWORD dwColorKey; +} DXNATIVETYPEINFO; + +typedef struct tagDXPACKEDRECTDESC +{ + DXBASESAMPLE *pSamples; + BOOL bPremult; + RECT rect; + long lRowPadding; +} DXPACKEDRECTDESC; + +typedef struct tagDXOVERSAMPLEDESC +{ + POINT p; + DXPMSAMPLE Color; +} DXOVERSAMPLEDESC; + + +[ + uuid(EAAAC2D6-C290-11d1-905D-00C04FD9189D), + helpstring("IDXARGBReadPtr Interface"), + pointer_default(unique), + local +] +interface IDXARGBReadPtr : IUnknown +{ + HRESULT GetSurface( [in]REFIID riid, [out, iid_is( riid )]void ** ppSurface); + DXSAMPLEFORMATENUM GetNativeType( [out]DXNATIVETYPEINFO *pInfo ); + void Move( [in]long cSamples ); + void MoveToRow( [in]ULONG y ); + void MoveToXY( [in]ULONG x, [in]ULONG y); + ULONG MoveAndGetRunInfo( [in]ULONG Row, [out] const DXRUNINFO** ppInfo ); // Returns count of runs + DXSAMPLE * Unpack( [in]DXSAMPLE* pSamples, [in]ULONG cSamples, [in]BOOL bMove ); + DXPMSAMPLE * UnpackPremult( [in]DXPMSAMPLE* pSamples, [in]ULONG cSamples, [in]BOOL bMove ); + void UnpackRect([in] const DXPACKEDRECTDESC * pRectDesc); +}; + + +//--- IDXARGBReadWritePtr --------------------------------------------------- +[ + uuid(EAAAC2D7-C290-11d1-905D-00C04FD9189D), + helpstring("IDXARGBReadWritePtr Interface"), + pointer_default(unique), + local +] +interface IDXARGBReadWritePtr : IDXARGBReadPtr +{ + void PackAndMove( [in]const DXSAMPLE *pSamples, [in]ULONG cSamples ); + void PackPremultAndMove( [in]const DXPMSAMPLE *pSamples, [in]ULONG cSamples ); + void PackRect([in]const DXPACKEDRECTDESC *pRectDesc); + void CopyAndMoveBoth( [in]DXBASESAMPLE *pScratchBuffer, [in]IDXARGBReadPtr *pSrc, + [in]ULONG cSamples, [in]BOOL bIsOpaque ); + void CopyRect( [in] DXBASESAMPLE *pScratchBuffer, + [in] const RECT *pDestRect, [in]IDXARGBReadPtr *pSrc, + [in] const POINT *pSrcOrigin, [in]BOOL bIsOpaque); + void FillAndMove( [in]DXBASESAMPLE *pScratchBuffer, [in]DXPMSAMPLE SampVal, + [in]ULONG cSamples, [in]BOOL bDoOver ); + void FillRect( [in]const RECT *pRect, [in]DXPMSAMPLE SampVal, [in]BOOL bDoOver ); + void OverSample( [in]const DXOVERSAMPLEDESC * pOverDesc); + void OverArrayAndMove([in]DXBASESAMPLE *pScratchBuffer, + [in] const DXPMSAMPLE *pSrc, + [in] ULONG cSamples); +}; + + +[ + uuid(0F619456-CF39-11d1-905E-00C04FD9189D), + helpstring("IDXDCLock Interface"), + pointer_default(unique), + local +] +interface IDXDCLock : IUnknown +{ + HDC GetDC(void); +} + +// +// Generic interface that any transform can support which allows caller to specify the +// desired output bounds. +// +[ + uuid(B2024B50-EE77-11d1-9066-00C04FD9189D), + helpstring("IDXTScaleOutput Interface"), + pointer_default(unique) +] +interface IDXTScaleOutput : IUnknown +{ + HRESULT SetOutputSize([in] const SIZE OutSize, [in] BOOL bMaintainAspect); +}; + + +// +// Simple gradient +// +[ + uuid(B2024B51-EE77-11d1-9066-00C04FD9189D), + helpstring("IDXGradient Interface"), + pointer_default(unique) +] +interface IDXGradient : IDXTScaleOutput +{ + HRESULT SetGradient(DXSAMPLE StartColor, DXSAMPLE EndColor, BOOL bHorizontal); + HRESULT GetOutputSize([out] SIZE *pOutSize); +}; + +//--- IDXTScale -------------------------------------------------------- +// This is the control interface for the simple scale transform +// +[ + uuid(B39FD742-E139-11d1-9065-00C04FD9189D), + helpstring("IDXTScale Interface"), + pointer_default(unique) +] +interface IDXTScale : IUnknown +{ + HRESULT SetScales( [in]float Scales[2] ); + HRESULT GetScales( [out]float Scales[2] ); + HRESULT ScaleFitToSize( [in,out]DXBNDS* pClipBounds, + [in]SIZE FitToSize, [in]BOOL bMaintainAspect ); +}; + + + +//--- IDXEffect ------------------------------------------------- +// This interface is used to generically control transforms that +// are transition effects. +typedef enum DISPIDDXEFFECT +{ + DISPID_DXECAPABILITIES = 10000, // Start at 10000 to avoid conflicts with inhereted interfaces + DISPID_DXEPROGRESS, + DISPID_DXESTEP, + DISPID_DXEDURATION, + DISPID_DXE_NEXT_ID +} DISPIDDXBOUNDEDEFFECT; + +typedef enum DXEFFECTTYPE +{ + DXTET_PERIODIC = (1 << 0), // Result at 1 is same as result at 0 + DXTET_MORPH = (1 << 1) // Transition between 2 inputs (input 0 to input 1) +} DXEFFECTTYPE; + + + + +[ + object, + uuid(E31FB81B-1335-11d1-8189-0000F87557DB), + dual, + helpstring("IDXEffect Interface"), + pointer_default(unique) +] +interface IDXEffect : IDispatch +{ + [propget, id(DISPID_DXECAPABILITIES)] + HRESULT Capabilities([out, retval] long *pVal); + [propget, id(DISPID_DXEPROGRESS)] + HRESULT Progress([out, retval] float *pVal); + [propput, id(DISPID_DXEPROGRESS)] + HRESULT Progress([in] float newVal); + [propget, id(DISPID_DXESTEP)] + HRESULT StepResolution([out, retval] float *pVal); + [propget, id(DISPID_DXEDURATION)] + HRESULT Duration([out, retval] float *pVal); + [propput, id(DISPID_DXEDURATION)] + HRESULT Duration([in] float newVal); +}; + +//--- IDXLookupTable --------------------------------------------- +[ + uuid(01BAFC7F-9E63-11d1-9053-00C04FD9189D), + helpstring("IDXLookupTable Interface"), + pointer_default(unique) +] +interface IDXLookupTable : IDXBaseObject +{ + HRESULT GetTables( [out]BYTE RedLUT[256], + [out]BYTE GreenLUT[256], + [out]BYTE BlueLUT[256], + [out]BYTE AlphaLUT[256] ); + + HRESULT IsChannelIdentity([out] DXBASESAMPLE * pSampleBools); + HRESULT GetIndexValues([in] ULONG Index, [out] DXBASESAMPLE *pSample); + HRESULT ApplyTables([in, out] DXSAMPLE *pSamples, [in] ULONG cSamples); +}; + + + +typedef struct DXRAWSURFACEINFO +{ + BYTE * pFirstByte; + long lPitch; + ULONG Width; + ULONG Height; + const GUID * pPixelFormat; + HDC hdc; + DWORD dwColorKey; // Note: High byte must == 0xFF for color keyed surface. Low 3 bytes are native data type. + DXBASESAMPLE * pPalette; +} DXRAWSURFACEINFO; + +// +// User created objects support IDXRawSurface +// + +[ + uuid(09756C8A-D96A-11d1-9062-00C04FD9189D), + helpstring("IDXRawSurface Interface"), + pointer_default(unique), + local +] +interface IDXRawSurface : IUnknown +{ + HRESULT GetSurfaceInfo(DXRAWSURFACEINFO * pSurfaceInfo); +} + + +//+----------------------------------------------------------------------------- +// +// IHTMLDXTransform +// +//------------------------------------------------------------------------------ + +[ + uuid(30E2AB7D-4FDD-4159-B7EA-DC722BF4ADE5), + helpstring("IHTMLDXTransform Interface"), + pointer_default(unique), + local +] +interface IHTMLDXTransform : IUnknown +{ + HRESULT SetHostUrl(BSTR bstrHostUrl); +} + + +//=== CoClass definitions ================================================= + +[ + uuid(54314D1D-35FE-11d1-81A1-0000F87557DB), + version(1.0), + helpstring("Microsoft DirectX Transform 1.0 Type Library") +] +library DXTRANSLib +{ + importlib("stdole32.tlb"); + importlib("stdole2.tlb"); + + /////////////////////////////// + // DXTransformFactory CoClass + /////////////////////////////// + [ + uuid(D1FE6762-FC48-11D0-883A-3C8B00C10000), + helpstring("DXTransformFactory Class") + ] + coclass DXTransformFactory + { + [default] interface IDXTransformFactory; + interface IDXSurfaceFactory; + }; + + /////////////////////////////// + // DXTaskManager CoClass + /////////////////////////////// + [ + uuid(4CB26C03-FF93-11d0-817E-0000F87557DB), + helpstring("DXTaskManager Class") + ] + coclass DXTaskManager + { + [default] interface IDXTaskManager; + }; + + /////////////////////////////// + // DXTScale CoClass + /////////////////////////////// + [ + uuid(555278E2-05DB-11D1-883A-3C8B00C10000), + helpstring("DXTScale Class") + ] + coclass DXTScale + { + [default] interface IDXTScale; + }; + + /////////////////////////////// + // DXSurface CoClass + /////////////////////////////// + [ + uuid(0E890F83-5F79-11D1-9043-00C04FD9189D), + helpstring("DXSurface Class") + ] + coclass DXSurface + { + [default] interface IDXSurface; + }; + + /////////////////////////////// + // DXSurfaceModifier CoClass + /////////////////////////////// + [ + uuid(3E669F1D-9C23-11d1-9053-00C04FD9189D), + helpstring("DXSurfaceModifier Class") + ] + coclass DXSurfaceModifier + { + [default] interface IDXSurfaceModifier; + }; + + /////////////////////////////// + // DXGradient CoClass + /////////////////////////////// + [ + uuid(C6365470-F667-11d1-9067-00C04FD9189D), + helpstring("DXGradient Class") + ] + coclass DXGradient + { + [default] interface IDXGradient; + }; +}; diff --git a/windows_libs/mssdk/include/DShowIDL/dyngraph.idl b/windows_libs/mssdk/include/DShowIDL/dyngraph.idl new file mode 100644 index 00000000..47a7d521 --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/dyngraph.idl @@ -0,0 +1,318 @@ +//------------------------------------------------------------------------------ +// File: DynGraph.idl +// +// Desc: Dynamic graph interfaces. +// +// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +interface IPinConnection; +interface IPinFlowControl; +interface IGraphConfig; +interface IGraphConfigCallback; + +//-------------------------------------------------------------------- +// +// IPinConnection - supported by input pins +// +//-------------------------------------------------------------------- +[ + local, + object, + uuid(4a9a62d3-27d4-403d-91e9-89f540e55534), + pointer_default(unique) +] +interface IPinConnection : IUnknown { + + // Do you accept this type chane in your current state? + HRESULT DynamicQueryAccept([in] const AM_MEDIA_TYPE *pmt); + + // Set event when EndOfStream receive - do NOT pass it on + // This condition is cancelled by a flush or Stop + HRESULT NotifyEndOfStream([in] HANDLE hNotifyEvent); + + // Are you an 'end pin' + HRESULT IsEndPin(); + + HRESULT DynamicDisconnect(); +}; + +//-------------------------------------------------------------------- +// +// IPinFlowControl - supported by output pins +// +//-------------------------------------------------------------------- +[ + local, + object, + uuid(c56e9858-dbf3-4f6b-8119-384af2060deb), + pointer_default(unique) +] +interface IPinFlowControl : IUnknown { + // Block processing on this pin + HRESULT Block([in] DWORD dwBlockFlags, [in] HANDLE hEvent); +} + +// block flags +enum _AM_PIN_FLOW_CONTROL_BLOCK_FLAGS { + AM_PIN_FLOW_CONTROL_BLOCK = 0x00000001, // 0 means unblock +}; + + +// Reconnect flags +typedef enum _AM_GRAPH_CONFIG_RECONNECT_FLAGS { + AM_GRAPH_CONFIG_RECONNECT_DIRECTCONNECT = 0x00000001, + AM_GRAPH_CONFIG_RECONNECT_CACHE_REMOVED_FILTERS = 0x00000002, + AM_GRAPH_CONFIG_RECONNECT_USE_ONLY_CACHED_FILTERS = 0x00000004 +} AM_GRAPH_CONFIG_RECONNECT_FLAGS; + +// RemoveFilterEx flags +enum _REM_FILTER_FLAGS { + REMFILTERF_LEAVECONNECTED = 0x00000001 +}; + +typedef enum _AM_FILTER_FLAGS { + AM_FILTER_FLAGS_REMOVABLE = 0x00000001 + } AM_FILTER_FLAGS; + + +//-------------------------------------------------------------------- +// +// IGraphConfig +// +//-------------------------------------------------------------------- + +[ + local, + object, + uuid(03A1EB8E-32BF-4245-8502-114D08A9CB88), + pointer_default(unique) +] +interface IGraphConfig : IUnknown { + HRESULT Reconnect([in] IPin *pOutputPin, + [in] IPin *pInputPin, + [in] const AM_MEDIA_TYPE *pmtFirstConnection, + [in] IBaseFilter *pUsingFilter, // can be NULL + [in] HANDLE hAbortEvent, + [in] DWORD dwFlags); + + HRESULT Reconfigure([in] IGraphConfigCallback *pCallback, + [in] PVOID pvContext, + [in] DWORD dwFlags, + [in] HANDLE hAbortEvent); + + + HRESULT AddFilterToCache([in] IBaseFilter *pFilter); + HRESULT EnumCacheFilter([out] IEnumFilters **pEnum); + HRESULT RemoveFilterFromCache([in]IBaseFilter *pFilter); + + // Get the start time associated with the last Run() call + // If the graph is not running returns VFW_E_WRONG_STATE + HRESULT GetStartTime([out] REFERENCE_TIME *prtStart); + + HRESULT PushThroughData( + [in] IPin *pOutputPin, + [in] IPinConnection *pConnection, + [in] HANDLE hEventAbort); + + HRESULT SetFilterFlags([in] IBaseFilter *pFilter, [in] DWORD dwFlags); + HRESULT GetFilterFlags([in] IBaseFilter *pFilter, [out] DWORD *pdwFlags); + + HRESULT RemoveFilterEx( [in] IBaseFilter *pFilter, DWORD Flags ); +} + +//-------------------------------------------------------------------- +// +// IGraphConfigCallback +// +//-------------------------------------------------------------------- + +[ + local, + object, + uuid(ade0fd60-d19d-11d2-abf6-00a0c905f375), + pointer_default(unique) +] +interface IGraphConfigCallback : IUnknown +{ + HRESULT Reconfigure(PVOID pvContext, DWORD dwFlags); +} + +// Filter Chain Definition +// +// Filter chains have the following properties: +// +// - Each filter chain has one or more filters. +// +// - Each filter in a filter chain has at most one connected input pin and one +// connected output pin. For example, filters A, C, D, F, G, H, I, J and K +// (see the diagram below) can be in a filter chain because each one has at +// most one connected input pin and one connected output pin. +// +// - Any filter in a chain is reachable by any other filter in the chain. +// For example, in the filter chain F-G-H, F can reach H by following the F- +// G connection to G and then following the G-H connection to H. Filters F +// and J cannot be in the same filter chain because J is not reachable from +// F. Anotherwords, there no sequence of connected filters between F and J. +// +// - The start filter is the only filter in the filter chain who's input +// pin is not connected to another filter in the chain. For instance, F is +// the start filter in F-G-H because F's input pin is connected to E and E +// is not in the filter chain. G's input pin is connected to F and H's is +// connected to G. Both F and G are in the filter chain. +// +// - The end filter is the only filter in the filter chain who's output pin +// is not connected to another filter in the chain. For example, in the +// filter chain J-K, K is the end filter because K's output pin is +// connected to L. J's output pin is connected to K and K is in the J-K +// filter chain. +// +// +// --->|---| |---|---> +// | C |--->| D | +// |---| |---|--->|---| |---|--->|---| |---| |---| |---| +// | A |--->| B | | E |--->| F |--->| G |--->| H | +// |---| |---|--->|---|------------>|---| |---| |---| |---| +// | I |---> +// --->|---|---> +// +// |---| |---| |---| +// | J |--->| K |--->| L | +// |---| |---| |---| +// +// Example Filter Graph +// +// +// +// IFilterChain Methods Documentation +// +// HRESULT StartChain( [in] IBaseFilter *pStartFilter, [in] IBaseFilter *pEndFilter ); +// +// StartChain() switches all the filters in the chain into the running state +// If one of the filters will not switch to the running state, then all the filters +// in the chain are stopped. This method can only be called if the filter graph is +// running. +// +// Parameters: +// - pStartFilter [in] +// The first filter in the filter chain. Note that this can be the same +// filter as pEndFilter . +// +// - pEndFilter [in] +// The last filter in the filter chain. Note that this can be the same +// filter as pStartFilter. If pEndFilter is NULL then the filter chain extends +// from pStartFilter to the last downstream filter which can be in a filter chain. +// For example, IFilterChain::StartChain( A, NULL ) would start filter A. +// IFilterChain::StartChain( G, NULL ) would start filters G and H. +// IFilterChain::StartChain( C, NULL ) would start filters C and D. Finally, +// IFilterChain::StartChain( E, NULL ) would fail because E cannot be in a +// filter chain (see the Filter Chain Definition section for more information). +// +// Return Value: +// An HRESULT. See the Direct Show SDK and COM SDK documentation for more +// information on interpreting HRESULTs. +// +// +// +// +// HRESULT PauseChain( [in] IBaseFilter *pStartFilter, [in] IBaseFilter *pEndFilter ); +// +// PauseChain() switches all the filters in a chain to the paused state. If it cannot +// switch one of the filtres into the paused state, all the filters in the chain are +// stopped. This method can only be called if the filter graph is paused. +// +// Parameters: +// - pStartFilter [in] +// The first filter in the filter chain. Note that this can be the same +// filter as pEndFilter . +// +// - pEndFilter [in] +// The last filter in the filter chain. Note that this can be the same +// filter as pStartFilter. If pEndFilter is NULL then the filter chain extends +// from pStartFilter to the last downstream filter which can be in a filter chain. +// For example, IFilterChain::StopChain( A, NULL ) would stop filter A. +// IFilterChain::StopChain( G, NULL ) would stop filters G and H. +// IFilterChain::StopChain( C, NULL ) would stop filters C and D. Finally, +// IFilterChain::StopChain( E, NULL ) would fail because E cannot be in a filter +// chain (see the Filter Chain Definition section for more information). +// +// +// Return Value: +// An HRESULT. See the Direct Show SDK and COM SDK documentation for more +// information on interpreting HRESULTs. +// +// +// +// HRESULT StopChain( [in] IBaseFilter *pStartFilter, [in] IBaseFilter *pEndFilter ); +// +// StopChain() switches all the filters in chain to the stopped state. +// +// Parameters: +// - pStartFilter [in] +// The first filter in the filter chain. Note that this can be the same +// filter as pEndFilter . +// +// - pEndFilter [in] +// The last filter in the filter chain. Note that this can be the same +// filter as pStartFilter. If pEndFilter is NULL then the filter chain extends +// from pStartFilter to the last downstream filter which can be in a filter chain. +// For example, IFilterChain::StopChain( A, NULL ) would stop filter A. +// IFilterChain::StopChain( G, NULL ) would stop filters G and H. +// IFilterChain::StopChain( C, NULL ) would stop filters C and D. Finally, +// IFilterChain::StopChain( E, NULL ) would fail because E cannot be in a filter +// chain (see the Filter Chain Definition section for more information). +// +// +// Return Value: +// An HRESULT. See the Direct Show SDK and COM SDK documentation for more +// information on interpreting HRESULTs. +// +// +// +// +// +// HRESULT RemoveChain( [in] IBaseFilter *pStartFilter, [in] IBaseFilter *pEndFilter ); +// +// RemoveChain() removes every filter in a chain from the filter graph. +// The filters can be removed while the graph is running. +// +// Parameters: +// - pStartFilter [in] +// The first filter in the filter chain. Note that this can be the same +// filter as pEndFilter . +// +// - pEndFilter [in] +// The last filter in the filter chain. Note that this can be the same +// filter as pStartFilter. If pEndFilter is NULL then the filter chain +// extends from pStartFilter to the last downstream filter which can be in a +// filter chain. For example, IFilterChain::RemoveChain( A, NULL ) would remove +// filter A from the filter graph. IFilterChain::RemoveChain( G, NULL ) would +// remove filters G and H. IFilterChain::RemoveChain( C, NULL ) would remove +// filters C and D. Finally, IFilterChain::RemoveChain( E, NULL ) would fail +// because E cannot be in a filter chain (see the Filter Chain Definition +// section for more information). +// +// +// Return Value: +// An HRESULT. See the Direct Show SDK and COM SDK documentation for more +// information on interpreting HRESULTs. +// +// +[ + local, + object, + uuid(DCFBDCF6-0DC2-45f5-9AB2-7C330EA09C29), + pointer_default(unique) +] +interface IFilterChain : IUnknown +{ + HRESULT StartChain( [in] IBaseFilter *pStartFilter, [in] IBaseFilter *pEndFilter ); + HRESULT PauseChain( [in] IBaseFilter *pStartFilter, [in] IBaseFilter *pEndFilter ); + HRESULT StopChain( [in] IBaseFilter *pStartFilter, [in] IBaseFilter *pEndFilter ); + HRESULT RemoveChain( [in] IBaseFilter *pStartFilter, [in] IBaseFilter *pEndFilter ); +} + + + + diff --git a/windows_libs/mssdk/include/DShowIDL/iamovie.idl b/windows_libs/mssdk/include/DShowIDL/iamovie.idl new file mode 100644 index 00000000..bc438ea4 --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/iamovie.idl @@ -0,0 +1,144 @@ +//------------------------------------------------------------------------------ +// File: IAMovie.idl +// +// Desc: +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +[ +object, +uuid(359ace10-7688-11cf-8b23-00805f6cef60), +pointer_default(unique) +] +interface IAMovie : IFilterGraph +{ + // IGraphBuilder + // Connect these two pins directly or indirectly, using transform filters + // if necessary. + + HRESULT Connect + ( [in] IPin * ppinOut, // the output pin + [in] IPin * ppinIn // the input pin + ); + + + // Connect this output pin directly or indirectly, using transform filters + // if necessary to something that will render it. + + HRESULT Render + ( [in] IPin * ppinOut // the output pin + ); + + + // IMediaControl methods + HRESULT Run(); + HRESULT Pause(); + HRESULT Stop(); + + //returns the state. same semantics as IMediaFilter::GetState + + HRESULT GetState( + [in] LONG msTimeout, + [out] FILTER_STATE* pfs); + + // adds and connects filters needed to play the specified file + HRESULT RenderFile( + [in] LPCWSTR strFilename); + + // adds to the graph the source filter that can read this file, + // and returns an IFilterInfo object for it + HRESULT AddSourceFilter( + [in] LPCWSTR strFilename, + [out] IBaseFilter ** ppUnk); + + // get back the event handle. This is manual-reset + // (don't - it's reset by the event mechanism) and remains set + // when events are queued, and reset when the queue is empty. + HRESULT GetEventHandle( + [out] HEVENT * hEvent); + + // remove the next event notification from the head of the queue and + // return it. Waits up to msTimeout millisecs if there are no events. + // if a timeout occurs without any events, this method will return + // E_ABORT, and the value of the event code and other parameters + // is undefined. + HRESULT GetEvent( + [out] long * lEventCode, + [out] long * lParam1, + [out] long * lParam2, + [in] long msTimeout + ); + + // Calls GetEvent repeatedly discarding events until it finds a + // completion event (EC_COMPLETE, EC_ERRORABORT, or EC_USERABORT). + // The completion event is removed from the queue and returned + // in pEvCode. Note that the object is still in running mode until + // a Pause or Stop call is made. + // If the timeout occurs, *pEvCode will be 0 and E_ABORT will be + // returned. + HRESULT WaitForCompletion( + [in] long msTimeout, + [out] long * pEvCode); + + // cancels any system handling of the specified event code + // and ensures that the events are passed straight to the application + // (via GetEvent) and not handled. A good example of this is + // EC_REPAINT: default handling for this ensures the painting of the + // window and does not get posted to the app. + HRESULT CancelDefaultHandling( + [in] long lEvCode); + + // restore the normal system default handling that may have been + // cancelled by CancelDefaultHandling(). + HRESULT RestoreDefaultHandling( [in] long lEvCode); + + // properties + HRESULT get_Duration( + [out] REFTIME* plength); + + HRESULT put_CurrentPosition( + [in] REFTIME llTime); + + HRESULT get_CurrentPosition( + [out] REFTIME* pllTime); + + HRESULT get_StopTime( + [out] REFTIME* pllTime); + + HRESULT put_StopTime( + [in] REFTIME llTime); + + HRESULT get_PrerollTime( + [out] REFTIME* pllTime); + HRESULT put_PrerollTime( + [in] REFTIME llTime); + + HRESULT put_Rate( + [in] double dRate); + HRESULT get_Rate( + [out] double * pdRate); + + /* New methods */ + HRESULT RemoveAllFilters(); + HRESULT Play(); + HRESULT PlayFile([in] LPCWSTR strFilename); + HRESULT EnumFiltersByInterface( [in] REFIID riid, [out] IEnumFilters ** ppEnum ); + HRESULT EnumPins( [out] IEnumPins ** ppEnum ); + HRESULT EnumPinsIn( [out] IEnumPins ** ppEnum ); + HRESULT EnumPinsOut( [out] IEnumPins ** ppEnum ); + HRESULT RenderAll(); + HRESULT RenderNewFile( [in] LPCWSTR strFilename); + + // Free any resources associated with the parameters to an event. + // Event parameters may be LONGs, IUnknown* or BSTR. No action + // is taken with LONGs. IUnknown are passed addrefed and need a + // Release call. BSTR are allocated by the task allocator and will be + // freed by calling the task allocator. + HRESULT FreeEventParams( + [in] long lEvCode, + [in] long lParam1, + [in] long lParam2); +} + diff --git a/windows_libs/mssdk/include/DShowIDL/mediaobj.idl b/windows_libs/mssdk/include/DShowIDL/mediaobj.idl new file mode 100644 index 00000000..d80cf2b3 --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/mediaobj.idl @@ -0,0 +1,412 @@ +//------------------------------------------------------------------------------ +// File: MediaObj.idl +// +// Desc: Define the interfaces for DirectX Media Objects. This file will +// be processed by the MIDL tool to produce mediaobj.h and proxy-stub +// code. +// +// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +import "unknwn.idl"; +import "objidl.idl"; + +// DMO_MEDIA_TYPE structure + +cpp_quote("#ifdef __strmif_h__") +cpp_quote("typedef AM_MEDIA_TYPE DMO_MEDIA_TYPE;") +cpp_quote("#else") +typedef struct _DMOMediaType { + GUID majortype; + GUID subtype; + BOOL bFixedSizeSamples; + BOOL bTemporalCompression; + ULONG lSampleSize; + GUID formattype; + IUnknown *pUnk; + ULONG cbFormat; + [size_is(cbFormat)] BYTE * pbFormat; +} DMO_MEDIA_TYPE; +typedef LONGLONG REFERENCE_TIME; +cpp_quote("#endif") + + +// Per-buffer flags that apply to input buffers +enum _DMO_INPUT_DATA_BUFFER_FLAGS { + DMO_INPUT_DATA_BUFFERF_SYNCPOINT = 0x00000001, + DMO_INPUT_DATA_BUFFERF_TIME = 0x00000002, + DMO_INPUT_DATA_BUFFERF_TIMELENGTH = 0x00000004 +}; + +// Per-buffer flags that apply to output buffers. +enum _DMO_OUTPUT_DATA_BUFFER_FLAGS { + DMO_OUTPUT_DATA_BUFFERF_SYNCPOINT = 0x00000001, + DMO_OUTPUT_DATA_BUFFERF_TIME = 0x00000002, + DMO_OUTPUT_DATA_BUFFERF_TIMELENGTH = 0x00000004, + + // + // This flag means the object could have generated more data for this + // output stream, even with no additional input from any input stream, + // but the output buffer did not have sufficient room. + // + DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE = 0x01000000 +}; + +// Flags returned by GetInputStatus() +enum _DMO_INPUT_STATUS_FLAGS { + // + // ACCEPT_DATA indicates that the input stream is ready to accept + // new data via ProcessInput(). + // + DMO_INPUT_STATUSF_ACCEPT_DATA = 0x00000001 +}; + +// Flags returned by GetInputStreamInfo() +enum _DMO_INPUT_STREAM_INFO_FLAGS { + DMO_INPUT_STREAMF_WHOLE_SAMPLES = 0x00000001, + DMO_INPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER = 0x00000002, + DMO_INPUT_STREAMF_FIXED_SAMPLE_SIZE = 0x00000004, + DMO_INPUT_STREAMF_HOLDS_BUFFERS = 0x00000008 +}; + +// Flags returned by GetOutputStreamInfo() +enum _DMO_OUTPUT_STREAM_INFO_FLAGS { + DMO_OUTPUT_STREAMF_WHOLE_SAMPLES = 0x00000001, + DMO_OUTPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER = 0x00000002, + DMO_OUTPUT_STREAMF_FIXED_SAMPLE_SIZE = 0x00000004, + DMO_OUTPUT_STREAMF_DISCARDABLE = 0x00000008, + DMO_OUTPUT_STREAMF_OPTIONAL = 0x00000010 +}; + +// SetType flags +enum _DMO_SET_TYPE_FLAGS { + DMO_SET_TYPEF_TEST_ONLY = 0x00000001,// check but don't set + DMO_SET_TYPEF_CLEAR = 0x00000002 // unset +}; + +// Process Output Flags +enum _DMO_PROCESS_OUTPUT_FLAGS { + DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER = 0x00000001 // Discard +}; + +// Buffer wrapper interface +[ + object, + uuid(59eff8b9-938c-4a26-82f2-95cb84cdc837) +] +interface IMediaBuffer : IUnknown +{ + HRESULT SetLength( + DWORD cbLength + ); + HRESULT GetMaxLength( + [out] DWORD *pcbMaxLength + ); + HRESULT GetBufferAndLength( + [out] BYTE **ppBuffer, // not filled if NULL + [out] DWORD *pcbLength // not filled if NULL + ); +} + +// +// Output buffer info structure: one of these must be passed in for each +// output stream with every ProcessOutput() call +// All [out] fields should be +// assumed undefined if ProcessOutput() failed +// +typedef struct _DMO_OUTPUT_DATA_BUFFER { + + IMediaBuffer *pBuffer; // [in] can be NULL + + // ProcessOutput() must set any appropriate flags and zero out the rest. + DWORD dwStatus; // [out] DMO_OUTPUT_DATA_BUFFERF_XXX (INCOMPLETE, etc.) + + // + // Each of these is valid if the corresponding flag is set in dwStatus + // + REFERENCE_TIME rtTimestamp; // [out] + REFERENCE_TIME rtTimelength; // [out] +} DMO_OUTPUT_DATA_BUFFER, *PDMO_OUTPUT_DATA_BUFFER; + + +// Interface supported by media objects +[ + object, + uuid(d8ad0f58-5494-4102-97c5-ec798e59bcf4) +] +interface IMediaObject : IUnknown +{ + +// +// Stream enumeration +// + HRESULT GetStreamCount( + [out] DWORD *pcInputStreams, + [out] DWORD *pcOutputStreams + ); + HRESULT GetInputStreamInfo( + DWORD dwInputStreamIndex, // 0-based + [out] DWORD *pdwFlags // HOLDS_BUFFERS + ); + HRESULT GetOutputStreamInfo( + DWORD dwOutputStreamIndex, // 0-based + [out] DWORD *pdwFlags // Media object sets to 0 + ); + +// +// Mediatypes +// + // + // GetType - iterate through media types supported by a stream. + // Returns S_FALSE if the type index is out of range ("no more types"). + // + HRESULT GetInputType( + DWORD dwInputStreamIndex, + DWORD dwTypeIndex, // 0-based + [out] DMO_MEDIA_TYPE *pmt + ); + HRESULT GetOutputType( + DWORD dwOutputStreamIndex, + DWORD dwTypeIndex, // 0-based + [out] DMO_MEDIA_TYPE *pmt + ); + + // + // SetType - tell the object the type of data it will work with. + // + HRESULT SetInputType( + DWORD dwInputStreamIndex, + [in] const DMO_MEDIA_TYPE *pmt, + DWORD dwFlags // test only + ); + HRESULT SetOutputType( + DWORD dwOutputStreamIndex, + [in] const DMO_MEDIA_TYPE *pmt, + DWORD dwFlags // test only + ); + + // + // GetCurrentType - get the last mediatype supplied via SetType. + // Returns S_FALSE if SetType has not been called. + // + HRESULT GetInputCurrentType( + DWORD dwInputStreamIndex, + [out] DMO_MEDIA_TYPE *pmt + ); + HRESULT GetOutputCurrentType( + DWORD dwOutputStreamIndex, + [out] DMO_MEDIA_TYPE *pmt + ); + +// +// SizeInfo +// + // + // GetSizeInfo - Get buffer size requirementes of a stream. + // + // If buffer size depends on the media type used, the object should + // base its response on the most recent media type set for this stream. + // If no mediatype has been set, the object may return an error. + // + HRESULT GetInputSizeInfo( + DWORD dwInputStreamIndex, + [out] DWORD *pcbSize, // size of input 'quantum' + [out] DWORD *pcbMaxLookahead, // max total bytes held + [out] DWORD *pcbAlignment // buffer alignment requirement + ); + HRESULT GetOutputSizeInfo( + DWORD dwOutputStreamIndex, + [out] DWORD *pcbSize, // size of output 'quantum' + [out] DWORD *pcbAlignment // buffer alignment requirement + ); + +// +// Latency methods +// + HRESULT GetInputMaxLatency( + DWORD dwInputStreamIndex, + [out] REFERENCE_TIME *prtMaxLatency + ); + HRESULT SetInputMaxLatency( + DWORD dwInputStreamIndex, + REFERENCE_TIME rtMaxLatency + ); + +// +// Streaming / state methods +// + // + // Flush() - discard any buffered data. + // + HRESULT Flush(); + + // + // Send a discontinuity to an input stream. The object will not + // accept any more data on this input stream until the discontinuity + // has been completely processed, which may involve multiple + // ProcessOutput() calls. + // + HRESULT Discontinuity(DWORD dwInputStreamIndex); + + // + // If a streaming object needs to perform any time consuming + // initialization before it can stream data, it should do it inside + // AllocateStreamingResources() rather than during the first process + // call. + // + // This method is NOT guaranteed to be called before streaming + // starts. If it is not called, the object should perform any + // required initialization during a process call. + // + HRESULT AllocateStreamingResources(); + + // Free anything allocated in AllocateStreamingResources(). + HRESULT FreeStreamingResources(); + + // GetInputStatus - the only flag defined right now is ACCEPT_DATA. + HRESULT GetInputStatus( + DWORD dwInputStreamIndex, + [out] DWORD *dwFlags // ACCEPT_DATA + ); + + // + // Pass one new buffer to an input stream + // + HRESULT ProcessInput( + DWORD dwInputStreamIndex, + IMediaBuffer *pBuffer, // must not be NULL + DWORD dwFlags, // DMO_INPUT_DATA_BUFFERF_XXX (syncpoint, etc.) + REFERENCE_TIME rtTimestamp, // valid if flag set + REFERENCE_TIME rtTimelength // valid if flag set + ); + + // + // ProcessOutput() - generate output for current input buffers + // + // Output stream specific status information is returned in the + // dwStatus member of each buffer wrapper structure. + // + HRESULT ProcessOutput( + DWORD dwFlags, // DMO_PROCESS_OUTPUT_FLAGS + DWORD cOutputBufferCount, // # returned by GetStreamCount() + [in,out,size_is(cOutputBufferCount)] + DMO_OUTPUT_DATA_BUFFER *pOutputBuffers, // one per stream + [out] DWORD *pdwStatus // TBD, must be set to 0 + ); + + // Locking - lock if bLock is TRUE, otherwise unlock + HRESULT Lock(LONG bLock); +}; + + +// +// Interface returned by the DMO enumeration API +// +[ +object, +uuid(2c3cd98a-2bfa-4a53-9c27-5249ba64ba0f) +] +interface IEnumDMO : IUnknown { + HRESULT Next( + DWORD cItemsToFetch, + [out, size_is(cItemsToFetch), length_is(*pcItemsFetched)] CLSID *pCLSID, + [out, size_is(cItemsToFetch), length_is(*pcItemsFetched), string] WCHAR **Names, + [out] DWORD *pcItemsFetched + ); + HRESULT Skip( + DWORD cItemsToSkip + ); + HRESULT Reset(void); + HRESULT Clone( + [out] IEnumDMO **ppEnum + ); +} + + +// Flags for IMediaObjectInPlace::Process +enum _DMO_INPLACE_PROCESS_FLAGS { + DMO_INPLACE_NORMAL = 0x00000000, + DMO_INPLACE_ZERO = 0x00000001 +}; + +[ +object, +uuid(651b9ad0-0fc7-4aa9-9538-d89931010741) +] +interface IMediaObjectInPlace : IUnknown { + + // Proces - Given a buffer of size ulSize, put the output + // of the DMO into the same buffer. + HRESULT Process( + [in] ULONG ulSize, + [in,out,size_is(ulSize)] BYTE* pData, + [in] REFERENCE_TIME refTimeStart, + [in] DWORD dwFlags + ); + + // Create a copy of the In-Place Media Object. This allows + // for very fast initialization of a number of In-Place objects + // in a known state. + HRESULT Clone( + [out] IMediaObjectInPlace **ppMediaObject + ); + + // GetLatency - Returns a REFERENCE_TIME value + // (1 tick = 100ns) which corresponds to the latency time + // processing this effect will add to the graph. This assumes + // the effect cost per buffer is a constant. + HRESULT GetLatency( + [out] REFERENCE_TIME *pLatencyTime + ); +} + +// Quality control status flags +enum _DMO_QUALITY_STATUS_FLAGS { + DMO_QUALITY_STATUS_ENABLED = 0x00000001 +}; + +[ +object, +uuid(65abea96-cf36-453f-af8a-705e98f16260) +] +interface IDMOQualityControl : IUnknown { + HRESULT SetNow( + [in] REFERENCE_TIME rtNow + ); + HRESULT SetStatus( + [in] DWORD dwFlags + ); + HRESULT GetStatus( + [out] DWORD *pdwFlags + ); +} + +// Flags for IVideoOutputOptimizations +enum _DMO_VIDEO_OUTPUT_STREAM_FLAGS { + DMO_VOSF_NEEDS_PREVIOUS_SAMPLE = 0x00000001 +}; + +[ +object, +uuid(be8f4f4e-5b16-4d29-b350-7f6b5d9298ac) +] +interface IDMOVideoOutputOptimizations : IUnknown { + HRESULT QueryOperationModePreferences ( + ULONG ulOutputStreamIndex, + DWORD *pdwRequestedCapabilities + ); + HRESULT SetOperationMode ( + ULONG ulOutputStreamIndex, + DWORD dwEnabledFeatures + ); + HRESULT GetCurrentOperationMode ( + ULONG ulOutputStreamIndex, + DWORD *pdwEnabledFeatures + ); + HRESULT GetCurrentSampleRequirements ( + ULONG ulOutputStreamIndex, + DWORD *pdwRequestedFeatures + ); +} + diff --git a/windows_libs/mssdk/include/DShowIDL/medparam.idl b/windows_libs/mssdk/include/DShowIDL/medparam.idl new file mode 100644 index 00000000..17d9c08f --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/medparam.idl @@ -0,0 +1,228 @@ +//------------------------------------------------------------------------------ +// File: MedParam.idl +// +// Desc: Definition of the IMediaParams and associated interfaces. These +// interfaces are designed to allow communication of curve-following +// behaviors for parameters of objects which require dynamic changes +// to their parameters at run time. All changes are specified by +// timestamp and curve type to ensure the parameters can be set +// at sufficient accuracy with predictable behavior on subsequent +// playback of the same curves. +// +// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +import "oaidl.idl"; +import "ocidl.idl"; +import "strmif.idl"; + + +//------------------------------------------------------------------------------ +// Define the semantic type to be used for each parameter. All values passed +// into this interface are 32-bit floats, but the interface can specify that +// the values must be integer, or booleans or enumerated types +//------------------------------------------------------------------------------ +typedef float MP_DATA; // All data is 32-bit floats + +typedef enum _MP_Type { + MPT_INT, // data is signed 23 bit integer (mantissa) + MPT_FLOAT, // data is 32bit IEEE float + MPT_BOOL, // data is true or false (using ANSI C++ definition) + MPT_ENUM, // data is a set (represented by consecutive integers) + MPT_MAX, +} MP_TYPE; + +const MP_DATA MPBOOL_TRUE = 1.0; // Value of true +const MP_DATA MPBOOL_FALSE = 0.0; // Value of false + + +//------------------------------------------------------------------------------ +// Define the types of curves which are supported +//------------------------------------------------------------------------------ +typedef enum _MP_CURVE_TYPE { + MP_CURVE_JUMP = 0x0001, // No interpolation, just jump to next point + MP_CURVE_LINEAR = 0x0002, // Linear interpolation (y follows x from 0.0 to 1.0) + MP_CURVE_SQUARE = 0x0004, // y follow x^2 from 0.0 to 1.0 + MP_CURVE_INVSQUARE = 0x0008, // y follows 1-(x^2) from 0.0 to 1.0 + MP_CURVE_SINE = 0x0010, // y follows sin(x) from -pi/2 to pi/2 +} MP_CURVE_TYPE; + + +//------------------------------------------------------------------------------ +// Capability bits. Used by the object to specify what capabilities it has. +//------------------------------------------------------------------------------ +typedef DWORD MP_CAPS; +// Curve capabilities - If the cap bit is set, that type of curve is supported +const MP_CAPS MP_CAPS_CURVE_JUMP = MP_CURVE_JUMP; +const MP_CAPS MP_CAPS_CURVE_LINEAR = MP_CURVE_LINEAR; +const MP_CAPS MP_CAPS_CURVE_SQUARE = MP_CURVE_SQUARE; +const MP_CAPS MP_CAPS_CURVE_INVSQUARE = MP_CURVE_INVSQUARE; +const MP_CAPS MP_CAPS_CURVE_SINE = MP_CURVE_SINE; + + +//------------------------------------------------------------------------------ +// Structure used to return information about the type and limits of a parameter +//------------------------------------------------------------------------------ +typedef struct _MP_PARAMINFO { + MP_TYPE mpType; // One of MP_TYPE_xxx codes + MP_CAPS mopCaps; // A collection of MP_CAPS flags + + // Minimum and maximum values + MP_DATA mpdMinValue; // minimum legal value + MP_DATA mpdMaxValue; // maximum legal value + MP_DATA mpdNeutralValue; // default or 'center' value + + // Defualt Unit and Label text. These strings will ALWAYS be English + // strings in the UNICODE character set. For international text + // use the GetParamText member function + WCHAR szUnitText[32]; // units of the parameter + WCHAR szLabel[32]; // name of the parameter + +} MP_PARAMINFO; + + +//------------------------------------------------------------------------------ +// Parameter Index types +//------------------------------------------------------------------------------ +typedef DWORD DWORD; +const DWORD DWORD_ALLPARAMS = -1; // Apply this operation to all params + + +//------------------------------------------------------------------------------ +// Defined list of timestamp types +//------------------------------------------------------------------------------ +typedef DWORD MP_TIMEDATA; // Extra data to further define type + +// REFERENCE_TIME (1 tick = 100 nanoseconds, MP_TIMEDATA ignored) +cpp_quote("DEFINE_GUID(GUID_TIME_REFERENCE,") +cpp_quote("0x93ad712b, 0xdaa0, 0x4ffe, 0xbc, 0x81, 0xb0, 0xce, 0x50, 0xf, 0xcd, 0xd9);") + +// Music Time (MP_TIMEDATA = parts/quarter note) +cpp_quote("DEFINE_GUID(GUID_TIME_MUSIC,") +cpp_quote("0x574c49d, 0x5b04, 0x4b15, 0xa5, 0x42, 0xae, 0x28, 0x20, 0x30, 0x11, 0x7b);") + +// Time is measures in samples. MP_TIMEDATA = Samples/sec) +cpp_quote("DEFINE_GUID(GUID_TIME_SAMPLES,") +cpp_quote("0xa8593d05, 0xc43, 0x4984, 0x9a, 0x63, 0x97, 0xaf, 0x9e, 0x2, 0xc4, 0xc0);") + + +//------------------------------------------------------------------------------ +// The value of a given parameter at a specific point in time +//------------------------------------------------------------------------------ +typedef DWORD MP_FLAGS; +const MP_FLAGS MPF_ENVLP_STANDARD = 0x0000; // Use all data provided +const MP_FLAGS MPF_ENVLP_BEGIN_CURRENTVAL = 0x0001; + // Ignore valStart value, use current value as the staring point +const MP_FLAGS MPF_ENVLP_BEGIN_NEUTRALVAL = 0x0002; + // Ignore valStart value, use neutral value as the staring point + +typedef struct _MP_ENVELOPE_SEGMENT { + REFERENCE_TIME rtStart; // Start time in current time format + REFERENCE_TIME rtEnd; // End time in current time format + MP_DATA valStart; // Initial Value + MP_DATA valEnd; // Final Value + MP_CURVE_TYPE iCurve; // One of MP_CURVE_TYPE codes + MP_FLAGS flags; // Special cases +} MP_ENVELOPE_SEGMENT; + +//------------------------------------------------------------------------------ +// Define flags for Punch-in timing +//------------------------------------------------------------------------------ +const MP_FLAGS MPF_PUNCHIN_REFTIME = 0; // Use the reference time as the PI time +const MP_FLAGS MPF_PUNCHIN_NOW = 0x0001; // Punch in at the current clock time +const MP_FLAGS MPF_PUNCHIN_STOPPED = 0x0002; // Return change notifications during + // author time + +//------------------------------------------------------------------------------ +// IMediaParamInfo - Interface used to determine the names, data types and +// units of the parameters which are exposed by the object. This interface +// is used at discovery time, and is not required during run-time since the +// objects parameters are a fixed set and this data can be cached by the +// calling applicaiton +//------------------------------------------------------------------------------ +[ +object, +uuid(6d6cbb60-a223-44aa-842f-a2f06750be6d), +version(1.0) +] +interface IMediaParamInfo : IUnknown +{ + HRESULT GetParamCount ( + [out] DWORD * pdwParams + ); + HRESULT GetParamInfo ( + [in] DWORD dwParamIndex, + [out] MP_PARAMINFO * pInfo + ); + // returns a series of null terminated strings. strings are in the + // following order: + // Param Label, Units Text, 1st Enum Text, 2nd Enum Text, etc... + HRESULT GetParamText ( + [in] DWORD dwParamIndex, // which param to get text for + [out] WCHAR **ppwchText // returns ptr to CoTaskMemAlloc'd string + ); + + // Returns the number of diffrent time formats this object understands + HRESULT GetNumTimeFormats ( + [out] DWORD * pdwNumTimeFormats + ); + + // Returns the GUID for the ith supported time format + HRESULT GetSupportedTimeFormat( + [in] DWORD dwFormatIndex, + [out] GUID *pguidTimeFormat + ); + + // Returns the current time format + HRESULT GetCurrentTimeFormat ( + [out] GUID *pguidTimeFormat, + [out] MP_TIMEDATA *pTimeData + ); +} + +//------------------------------------------------------------------------------ +// IMediaParams - Interfaes used to actually set the media params and the +// envelopes to follow +//------------------------------------------------------------------------------ +[ +object, +uuid(6d6cbb61-a223-44aa-842f-a2f06750be6e), +version(1.0) +] +interface IMediaParams : IUnknown +{ + // Single param Get/Set methods + HRESULT GetParam ( + [in] DWORD dwParamIndex, + [out] MP_DATA *pValue + ); + HRESULT SetParam ( + [in] DWORD dwParamIndex, + [in] MP_DATA value + ); + + // Envelope methods (param change over time) + HRESULT AddEnvelope ( + [in] DWORD dwParamIndex, + [in] DWORD cSegments, + [in] MP_ENVELOPE_SEGMENT * pEnvelopeSegments + ); + + // Flush all of the envelope information for the given paramter between + // the timestamps specified + HRESULT FlushEnvelope ( + [in] DWORD dwParamIndex, + [in] REFERENCE_TIME refTimeStart, + [in] REFERENCE_TIME refTimeEnd + ); + + // Change the time format being used by the object + HRESULT SetTimeFormat ( + [in] GUID guidTimeFormat, + [in] MP_TIMEDATA mpTimeData + ); +} + + + diff --git a/windows_libs/mssdk/include/DShowIDL/mmstream.idl b/windows_libs/mssdk/include/DShowIDL/mmstream.idl new file mode 100644 index 00000000..a574e6cd --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/mmstream.idl @@ -0,0 +1,189 @@ +//------------------------------------------------------------------------------ +// File: MMStream.idl +// +// Desc: MultiMedia streaming interface IDL file. +// +// Copyright (c) 1998 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +import "unknwn.idl"; + +cpp_quote("#define MS_ERROR_CODE(x) MAKE_HRESULT(1, FACILITY_ITF, (x) + 0x400)") +cpp_quote("#define MS_SUCCESS_CODE(x) MAKE_HRESULT(0, FACILITY_ITF, x)") +cpp_quote("#define MS_S_PENDING MS_SUCCESS_CODE(1)") +cpp_quote("#define MS_S_NOUPDATE MS_SUCCESS_CODE(2)") +cpp_quote("#define MS_S_ENDOFSTREAM MS_SUCCESS_CODE(3)") + +cpp_quote("#define MS_E_SAMPLEALLOC MS_ERROR_CODE(1)") +cpp_quote("#define MS_E_PURPOSEID MS_ERROR_CODE(2)") +cpp_quote("#define MS_E_NOSTREAM MS_ERROR_CODE(3)") +cpp_quote("#define MS_E_NOSEEKING MS_ERROR_CODE(4)") +cpp_quote("#define MS_E_INCOMPATIBLE MS_ERROR_CODE(5)") +cpp_quote("#define MS_E_BUSY MS_ERROR_CODE(6)") +cpp_quote("#define MS_E_NOTINIT MS_ERROR_CODE(7)") +cpp_quote("#define MS_E_SOURCEALREADYDEFINED MS_ERROR_CODE(8)") +cpp_quote("#define MS_E_INVALIDSTREAMTYPE MS_ERROR_CODE(9)") +cpp_quote("#define MS_E_NOTRUNNING MS_ERROR_CODE(10)") + +cpp_quote("// {A35FF56A-9FDA-11d0-8FDF-00C04FD9189D}") +cpp_quote("DEFINE_GUID(MSPID_PrimaryVideo, ") +cpp_quote("0xa35ff56a, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);") + +cpp_quote("// {A35FF56B-9FDA-11d0-8FDF-00C04FD9189D}") +cpp_quote("DEFINE_GUID(MSPID_PrimaryAudio,") +cpp_quote("0xa35ff56b, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d);") + +cpp_quote("#if(_WIN32_WINNT < 0x0400)") +typedef void (__stdcall * PAPCFUNC)(DWORD_PTR dwParam); +cpp_quote("#endif") + +typedef LONGLONG STREAM_TIME; + +typedef GUID MSPID; +typedef REFGUID REFMSPID; + +typedef enum { + STREAMTYPE_READ = 0, + STREAMTYPE_WRITE = 1, + STREAMTYPE_TRANSFORM= 2 +} STREAM_TYPE; + +typedef enum { + STREAMSTATE_STOP = 0, + STREAMSTATE_RUN = 1 +} STREAM_STATE; + + +typedef enum { + COMPSTAT_NOUPDATEOK = 0x00000001, + COMPSTAT_WAIT = 0x00000002, + COMPSTAT_ABORT = 0x00000004 +} COMPLETION_STATUS_FLAGS; + +// Flags for GetInformation +enum { + MMSSF_HASCLOCK = 0x00000001, + MMSSF_SUPPORTSEEK = 0x00000002, + MMSSF_ASYNCHRONOUS = 0x00000004 +}; + +// Flags for StreamSample::Update +enum { + SSUPDATE_ASYNC = 0x00000001, + SSUPDATE_CONTINUOUS = 0x00000002 +}; + +interface IMultiMediaStream; +interface IMediaStream; +interface IStreamSample; + +// IMultiMediaStream interface +[ +object, +local, +uuid(B502D1BC-9A57-11d0-8FDE-00C04FD9189D), +pointer_default(unique) +] +interface IMultiMediaStream : IUnknown { + + HRESULT GetInformation( + [out] DWORD *pdwFlags, + [out] STREAM_TYPE *pStreamType); + + HRESULT GetMediaStream( + [in] REFMSPID idPurpose, + [out] IMediaStream **ppMediaStream); + + HRESULT EnumMediaStreams( + [in] long Index, + [out] IMediaStream **ppMediaStream); + + HRESULT GetState( + [out] STREAM_STATE *pCurrentState); + + HRESULT SetState( + [in] STREAM_STATE NewState); + + HRESULT GetTime( + [out] STREAM_TIME *pCurrentTime); + + HRESULT GetDuration( + [out] STREAM_TIME *pDuration); + + HRESULT Seek( + [in] STREAM_TIME SeekTime); + + HRESULT GetEndOfStreamEventHandle( + [out] HANDLE *phEOS); +}; + + +// IMediaStream interface +[ +object, +uuid(B502D1BD-9A57-11d0-8FDE-00C04FD9189D), +pointer_default(unique) +] +interface IMediaStream : IUnknown { + + HRESULT GetMultiMediaStream( + [out] IMultiMediaStream **ppMultiMediaStream); + + HRESULT GetInformation( + [out] MSPID *pPurposeId, + [out] STREAM_TYPE *pType); + + HRESULT SetSameFormat( + [in] IMediaStream *pStreamThatHasDesiredFormat, + [in] DWORD dwFlags); + + HRESULT AllocateSample( + [in] DWORD dwFlags, + [out] IStreamSample **ppSample); + + + HRESULT CreateSharedSample( + [in] IStreamSample *pExistingSample, + [in] DWORD dwFlags, + [out] IStreamSample **ppNewSample); + + HRESULT SendEndOfStream(DWORD dwFlags); +}; + + +// IStreamSample interface +[ +object, +local, +uuid(B502D1BE-9A57-11d0-8FDE-00C04FD9189D), +pointer_default(unique) +] +interface IStreamSample : IUnknown { + + HRESULT GetMediaStream( + [in] IMediaStream **ppMediaStream); + + HRESULT GetSampleTimes( + [out] STREAM_TIME * pStartTime, + [out] STREAM_TIME * pEndTime, + [out] STREAM_TIME * pCurrentTime); + + HRESULT SetSampleTimes( + [in] const STREAM_TIME *pStartTime, + [in] const STREAM_TIME *pEndTime); + + HRESULT Update( + [in] DWORD dwFlags, + [in] HANDLE hEvent, + [in] PAPCFUNC pfnAPC, + [in] DWORD_PTR dwAPCData); + + HRESULT CompletionStatus( + [in] DWORD dwFlags, + [in] DWORD dwMilliseconds); +}; + + + + diff --git a/windows_libs/mssdk/include/DShowIDL/qedit.idl b/windows_libs/mssdk/include/DShowIDL/qedit.idl new file mode 100644 index 00000000..e6707b4a --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/qedit.idl @@ -0,0 +1,1702 @@ +//------------------------------------------------------------------------------ +// File: QEdit.idl +// +// Desc: +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +import "oaidl.idl"; +import "ocidl.idl"; +import "dxtrans.idl"; +import "amstream.idl"; +import "msxml.idl"; + +// +// forward declare +// +interface IAMTimelineGroup; +interface IAMTimelineObj; +interface IAMTimelineEffect; +interface IAMTimelineTrans; +interface IAMTimelineSrc; +interface IAMTimeline; +interface IAMErrorLog; +interface ISampleGrabber; +interface IPropertySetter; + +// used by DEXTER_VALUE's dwInterp var +typedef enum +{ + DEXTERF_JUMP, + DEXTERF_INTERPOLATE +} DEXTERF; + +// used to set values on the property setter +typedef struct +{ + BSTR Name; + DISPID dispID; + LONG nValues; +} DEXTER_PARAM; + +// used to set values on the property setter +typedef struct +{ + VARIANT v; + REFERENCE_TIME rt; + DWORD dwInterp; // one of the DEXTERF_ flags +} DEXTER_VALUE; + +// used by bMethod directly below +enum +{ + DEXTER_AUDIO_JUMP, + DEXTER_AUDIO_INTERPOLATE +}; + +// used to set volumes on the mixer and mixer pins +typedef struct +{ + REFERENCE_TIME rtEnd; //end Time + double dLevel; //end Volume Level + BOOL bMethod; //jump or interpolate +} DEXTER_AUDIO_VOLUMEENVELOPE ; + +// used in IAMTimeline::Get(Set)InsertMode +enum +{ + TIMELINE_INSERT_MODE_INSERT = 1, + TIMELINE_INSERT_MODE_OVERLAY = 2 +}; + +// +// define what main 'things' can be put into the timeline tree. +// these values are used quite a bit with timeline access +// (bitmap mask flags) +typedef enum +{ + TIMELINE_MAJOR_TYPE_COMPOSITE = 1, + TIMELINE_MAJOR_TYPE_TRACK = 2, + TIMELINE_MAJOR_TYPE_SOURCE = 4, + TIMELINE_MAJOR_TYPE_TRANSITION = 8, + TIMELINE_MAJOR_TYPE_EFFECT = 16, + TIMELINE_MAJOR_TYPE_GROUP = 128 +} TIMELINE_MAJOR_TYPE; + +// used in various IAMTimelineXXX "search" functions. Look in this +// file for "SearchDirection" to see where it's used. I didn't want +// to use an enum as an interface param type, so I used a long. Probably +// silly of me. +typedef enum +{ + DEXTERF_BOUNDING = -1, // finds any source whose start <= Time and stop > Time + DEXTERF_EXACTLY_AT = 0, // finds any source that starts exactly at Time + DEXTERF_FORWARDS = 1 // finds any source that starts at or after Time +} DEXTERF_TRACK_SEARCH_FLAGS; + +// right now, the media type in the group contains enough information about +// how we want to recompress. This might not be enough information in the +// future, so we define a structure we can get and set to the group. +// +typedef struct _SCompFmt0 +{ + long nFormatId; + AM_MEDIA_TYPE MediaType; +} SCompFmt0; + +// used in IAMTimelineSrc::Get(Set)StretchMode +// +enum +{ + RESIZEF_STRETCH, + RESIZEF_CROP, + RESIZEF_PRESERVEASPECTRATIO, + RESIZEF_PRESERVEASPECTRATIO_NOLETTERBOX +}; + +// used in IRenderEngine::SetDynamicReconnectLevel +// (bitmap mask flags) +enum +{ + CONNECTF_DYNAMIC_NONE = 0x00000000, + CONNECTF_DYNAMIC_SOURCES = 0x00000001, + CONNECTF_DYNAMIC_EFFECTS = 0x00000002 +}; + +// used in +// IMediaLocator::FindMediaFile +// IRenderEngine::SetSourceNameValidation +// IAMTimeline::ValidateSourceNames +// (bitmap mask flags) +enum +{ + SFN_VALIDATEF_CHECK = 0x00000001, // do a check. Without this set, no check will be done. + SFN_VALIDATEF_POPUP = 0x00000002, // should UI popup show if not found + SFN_VALIDATEF_TELLME = 0x00000004, // warn user about replaced files + SFN_VALIDATEF_REPLACE = 0x00000008, // should it replace names in the tldb if found + SFN_VALIDATEF_USELOCAL = 0x000000010, // use local media preferrably over networked media + SFN_VALIDATEF_NOFIND = 0x000000020, // never find filenames, always use UI popup to find., + // when used, _POPUP must be used as well + SFN_VALIDATEF_IGNOREMUTED = 0x000000040, // ignore muted files in the tldb + SFN_VALIDATEF_END +}; + +// key transitions types +enum +{ + DXTKEY_RGB, + DXTKEY_NONRED, + DXTKEY_LUMINANCE, + DXTKEY_ALPHA, + DXTKEY_HUE +}; + + +//////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////// +// New Property setting Interfaces +//////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////// + +// interface for objects which can save/load IDispatch-able properties +[ + object, + uuid(AE9472BD-B0C3-11D2-8D24-00A0C9441E20), + helpstring("IPropertySetter Interface"), + pointer_default(unique) +] +interface IPropertySetter : IUnknown // IPersist? +{ + // for loading and saving through XML + HRESULT LoadXML([in] IUnknown * pxml); + // !!! doesn't work HRESULT LoadXML([in] IXMLElement * pxml); + HRESULT PrintXML([out] char *pszXML, [in] int cbXML, [out] int *pcbPrinted,[in] int indent); + + // for cloning a portion of the props when splitting the object + //AUTOMATE + HRESULT CloneProps([out] IPropertySetter **ppSetter, + [in] REFERENCE_TIME rtStart, + [in] REFERENCE_TIME rtStop); + + // for loading and saving programmatically + // caller must call this in pre-sorted order, this time must be > all + // previous times + //AUTOMATE + HRESULT AddProp([in] DEXTER_PARAM Param, + [in] DEXTER_VALUE *paValue); + //AUTOMATE + HRESULT GetProps([out] LONG *pcParams, + [out] DEXTER_PARAM **paParam, + [out] DEXTER_VALUE **paValue); + // after calling GetProps, you must call FreeProps to free resources + //AUTOMATE + HRESULT FreeProps([in] LONG cParams, + [in] DEXTER_PARAM *paParam, + [in] DEXTER_VALUE *paValue); + // to empty to property setter, so you can start over again + HRESULT ClearProps(); + + // for persisting + HRESULT SaveToBlob([out] LONG *pcSize, [out] BYTE **ppb); + HRESULT LoadFromBlob([in] LONG cSize, [in] BYTE *pb); + + // to program the object that supports IDispatch with the props + // call with rtNow == -1 to set Static Props when your object instantiates + // errors will be logged, if a log is provided + //AUTOMATE + HRESULT SetProps([in] IUnknown *pTarget, + [in] REFERENCE_TIME rtNow); + +}; + +// supported by our DxtCompositor class, this allows us to draw whatever comes in +// upon only a portion of the output bitmap + +[ + object, + uuid(BB44391E-6ABD-422f-9E2E-385C9DFF51FC), + dual, + helpstring("IDxtCompositor Interface"), + pointer_default(unique) +] +interface IDxtCompositor : IDXEffect +{ + [propget, id(1), helpstring("property OffsetX")] HRESULT OffsetX([out, retval] long *pVal); + [propput, id(1), helpstring("property OffsetX")] HRESULT OffsetX([in] long newVal); + [propget, id(2), helpstring("property OffsetY")] HRESULT OffsetY([out, retval] long *pVal); + [propput, id(2), helpstring("property OffsetY")] HRESULT OffsetY([in] long newVal); + [propget, id(3), helpstring("property Width")] HRESULT Width([out, retval] long *pVal); + [propput, id(3), helpstring("property Width")] HRESULT Width([in] long newVal); + [propget, id(4), helpstring("property Height")] HRESULT Height([out, retval] long *pVal); + [propput, id(4), helpstring("property Height")] HRESULT Height([in] long newVal); + + [propget, id(5), helpstring("property SrcOffsetX")] HRESULT SrcOffsetX([out, retval] long *pVal); + [propput, id(5), helpstring("property SrcOffsetX")] HRESULT SrcOffsetX([in] long newVal); + [propget, id(6), helpstring("property SrcOffsetY")] HRESULT SrcOffsetY([out, retval] long *pVal); + [propput, id(6), helpstring("property SrcOffsetY")] HRESULT SrcOffsetY([in] long newVal); + [propget, id(7), helpstring("property SrcWidth")] HRESULT SrcWidth([out, retval] long *pVal); + [propput, id(7), helpstring("property SrcWidth")] HRESULT SrcWidth([in] long newVal); + [propget, id(8), helpstring("property SrcHeight")] HRESULT SrcHeight([out, retval] long *pVal); + [propput, id(8), helpstring("property SrcHeight")] HRESULT SrcHeight([in] long newVal); +}; + +[ + object, + uuid(4EE9EAD9-DA4D-43d0-9383-06B90C08B12B), + dual, + helpstring("IDxtAlphaSetter Interface"), + pointer_default(unique) +] +interface IDxtAlphaSetter : IDXEffect +{ + // set the alpha to a particular number + [propget, id(1), helpstring("property Alpha")] HRESULT Alpha([out, retval] long *pVal); + [propput, id(1), helpstring("property Alpha")] HRESULT Alpha([in] long newVal); + + // set the alpha to a percentage of it's full value + [propget, id(2), helpstring("property AlphaRamp")] HRESULT AlphaRamp([out, retval] double *pVal); + [propput, id(2), helpstring("property AlphaRamp")] HRESULT AlphaRamp([in] double newVal); +}; + +// Supported by our JPEG DXT, that can do any wipe based on a bitmap +// + +[ + object, + uuid(DE75D011-7A65-11D2-8CEA-00A0C9441E20), + dual, + helpstring("IDxtJpeg Interface"), + pointer_default(unique) +] +interface IDxtJpeg : IDXEffect +{ + [propget, id(1), helpstring("property MaskNum")] HRESULT MaskNum([out, retval] long *); + [propput, id(1), helpstring("property MaskNum")] HRESULT MaskNum([in] long); + [propget, id(2), helpstring("property MaskName")] HRESULT MaskName([out, retval] BSTR *pVal); + [propput, id(2), helpstring("property MaskName")] HRESULT MaskName([in] BSTR newVal); + [propget, id(3), helpstring("property ScaleX")] HRESULT ScaleX([out, retval] double *); + [propput, id(3), helpstring("property ScaleX")] HRESULT ScaleX([in] double); + [propget, id(4), helpstring("property ScaleY")] HRESULT ScaleY([out, retval] double *); + [propput, id(4), helpstring("property ScaleY")] HRESULT ScaleY([in] double); + [propget, id(5), helpstring("property OffsetX")] HRESULT OffsetX([out, retval] long *); + [propput, id(5), helpstring("property OffsetX")] HRESULT OffsetX([in] long); + [propget, id(6), helpstring("property OffsetY")] HRESULT OffsetY([out, retval] long *); + [propput, id(6), helpstring("property OffsetY")] HRESULT OffsetY([in] long); + [propget, id(7), helpstring("property ReplicateX")] HRESULT ReplicateX([out, retval] long *pVal); + [propput, id(7), helpstring("property ReplicateX")] HRESULT ReplicateX([in] long newVal); + [propget, id(8), helpstring("property ReplicateY")] HRESULT ReplicateY([out, retval] long *pVal); + [propput, id(8), helpstring("property ReplicateY")] HRESULT ReplicateY([in] long newVal); + [propget, id(9), helpstring("property BorderColor")] HRESULT BorderColor([out, retval] long *pVal); + [propput, id(9), helpstring("property BorderColor")] HRESULT BorderColor([in] long newVal); + [propget, id(10), helpstring("property BorderWidth")] HRESULT BorderWidth([out, retval] long *pVal); + [propput, id(10), helpstring("property BorderWidth")] HRESULT BorderWidth([in] long newVal); + [propget, id(11), helpstring("property BorderSoftness")] HRESULT BorderSoftness([out, retval] long *pVal); + [propput, id(11), helpstring("property BorderSoftness")] HRESULT BorderSoftness([in] long newVal); + HRESULT ApplyChanges(); + HRESULT LoadDefSettings(); +}; + + // key + [ + object, + uuid(3255de56-38fb-4901-b980-94b438010d7b), + dual, + helpstring("IDxtKey Interface"), + pointer_default(unique) + ] + interface IDxtKey : IDXEffect + { + [propget, id(1), helpstring("property KeyType")] HRESULT KeyType([out, retval] int *); + [propput, id(1), helpstring("property Keytype")] HRESULT KeyType([in] int); + [propget, id(2), helpstring("property Hue")] HRESULT Hue([out, retval] int *); + [propput, id(2), helpstring("property Hue")] HRESULT Hue([in] int ); + [propget, id(3), helpstring("property Luminance")] HRESULT Luminance([out, retval] int *); + [propput, id(3), helpstring("property Luminance")] HRESULT Luminance([in] int ); + [propget, id(4), helpstring("property RGB")] HRESULT RGB([out, retval] DWORD *); + [propput, id(4), helpstring("property RGB")] HRESULT RGB([in] DWORD ); + [propget, id(5), helpstring("property Similarity")] HRESULT Similarity([out,retval] int * ); + [propput, id(5), helpstring("property Similarity")] HRESULT Similarity([in] int ); + [propget, id(6), helpstring("property Invert")] HRESULT Invert([out, retval] BOOL *); + [propput, id(6), helpstring("property Invert")] HRESULT Invert([in] BOOL); + }; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // This little COM interface will look 'around' for the closest + // path match for a given file. If the file already exists, then + // this interface should hardly do anything. If it's not found, + // it will go look for it and if successful, return S_FALSE. If it + // cannot find the file, it will call the hook, if set and return + // it's return code. if the hook is not set, it is in a type of + // error condition. The Dexter-provided MediaLocator will bring up + // a dialog box asking you to browse for your file. Other COM + // objects may do something else. + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +[ + object, + uuid(288581E0-66CE-11d2-918F-00C0DF10D434), + odl, + helpstring("IMediaLocator Interface"), + pointer_default(unique) +] +interface IMediaLocator : IUnknown +{ + // same flags as used by IRenderEngine's SetSourceNameValidation + HRESULT FindMediaFile( BSTR Input, BSTR FilterString, BSTR * pOutput, long Flags ); + HRESULT AddFoundLocation( BSTR DirectoryName ); +}; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // This object provides caching of duration and stream type + // information for files that would produce a directshow source + // filter. It takes too long to figure this out in DShow right + // now, so this is one way around it. The way it works is that + // you first fill out the Filename property, then call and + // ask how many streams it has, or, set the CurrentStream prop + // and then ask for the per-stream properties, StreamType or + // StreamLength. They both reference the CurrentStream prop that + // you set. I also allowed you (for convenience) to just give + // it a IUnknown Filter that represents an IBaseFilter source + // filter that is NOT currently in a graph. It will use that + // instead. When using this, though, you will not get cached + // values. The cached values are stored in the system's ini file + // called DCBC2A70-70D8-4459-BFFA-E0D61DEA3FDF.INI. Nice, huh? :-) + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +[ + object, + uuid(65BD0710-24D2-4ff7-9324-ED2E5D3ABAFA), + odl, + helpstring("IMediaDet Interface"), + pointer_default(unique) +] +interface IMediaDet : IUnknown +{ + [propget, id(1), helpstring("property Filter")] HRESULT Filter([out, retval] IUnknown* *pVal); + [propput, id(1), helpstring("property Filter")] HRESULT Filter([in] IUnknown* newVal); + [propget, id(2), helpstring("property OutputStreams")] HRESULT OutputStreams([out, retval] long *pVal); + [propget, id(3), helpstring("property CurrentStream")] HRESULT CurrentStream([out, retval] long *pVal); + [propput, id(3), helpstring("property CurrentStream")] HRESULT CurrentStream([in] long newVal); + [propget, id(4), helpstring("property StreamType")] HRESULT StreamType([out, retval] GUID *pVal); + [propget, id(5), helpstring("property StreamTypeB")] HRESULT StreamTypeB([out, retval] BSTR *pVal); + [propget, id(6), helpstring("property StreamLength")] HRESULT StreamLength([out, retval] double *pVal); + [propget, id(7), helpstring("property Filename")] HRESULT Filename([out, retval] BSTR *pVal); + [propput, id(7), helpstring("property Filename")] HRESULT Filename([in] BSTR newVal); + [id(8), helpstring("method GetBitmapBits")] HRESULT GetBitmapBits(double StreamTime, long * pBufferSize, char * pBuffer, long Width, long Height); + [id(9), helpstring("method WriteBitmapBits")] HRESULT WriteBitmapBits(double StreamTime, long Width, long Height, BSTR Filename ); + [propget, id(10), helpstring("property StreamMediaType")] HRESULT StreamMediaType([out, retval] AM_MEDIA_TYPE * pVal); + [id(11), helpstring("method GetSampleGrabber")] HRESULT GetSampleGrabber( [out] ISampleGrabber ** ppVal ); + [propget, id(12), helpstring("property FrameRate")] HRESULT FrameRate([out, retval] double *pVal); + [id(13), helpstring("method EnterBitmapGrabMode")] HRESULT EnterBitmapGrabMode( double SeekTime ); +}; + + +// useless interface, don't use it! + +[ + object, + uuid(AE9472BE-B0C3-11D2-8D24-00A0C9441E20), + odl, + helpstring("IGrfCache Interface"), + pointer_default(unique) +] +interface IGrfCache : IDispatch +{ + [id(1), helpstring("method AddFilter")] + HRESULT AddFilter( + IGrfCache * ChainedCache, + LONGLONG ID, + const IBaseFilter * pFilter, + LPCWSTR pName); + + [id(2), helpstring("method ConnectPins")] + HRESULT ConnectPins( + IGrfCache * ChainedCache, + LONGLONG PinID1, + const IPin * pPin1, + LONGLONG PinID2, + const IPin * pPin2); + + [id(3), helpstring("method SetGraph")] + HRESULT SetGraph(const IGraphBuilder * pGraph); + + [id(4), helpstring("method DoConnectionsNow")] + HRESULT DoConnectionsNow(); +}; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // The RenderEngin builds a graph from the timeline and gives + // you some simple positional commands. + // explained methods: + // SetTimelineObject - tell the render engine who to parse + // ConnectEverything - build up a graph based on the timeline + // ScrapIt - throw away graph and everything + // GetFilterGraph - get the graph that's built up, if any + // SetFilterGraph - allows you to preset the graph that's built up. + // cannot call this if there already is a graph. + + // !!! the following methods are unused/not implemented + + // SetInterestRange - discard COM objects and memory outside of this + // range, if possible. Used for scrubbing on a long timeline and + // freeing up resources + // SetRenderRange - pretend like a portion of the timeline IS the timeline + // and don't connect anything in the graph outside of that range. + // Commit - allocate what's necessary and get prepared to run + // Decommit - free anything possible + // GetCaps - find out some info about the render engine + // DoSmartRecompression - connect compressed sources if + // possible + // in the graph, this will RenderPin( ) on every switcher + // rendering pin. + // SetSourceNameValidation - allows you to set some flags which + // determine how source files are found, if they need to be found. + // FilterString is a list of extensions to find for the media + // files (see OPENFILENAME filters) + // pOverride is a media locator you would like to use instead + // of the built in one + // The flags are defined in the struct immediately below. + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +[ + object, + uuid(6BEE3A81-66C9-11d2-918F-00C0DF10D434), + odl, + helpstring("IRenderEngine Interface"), + pointer_default(unique) +] +interface IRenderEngine : IUnknown +{ + HRESULT SetTimelineObject( IAMTimeline * pTimeline ); + HRESULT GetTimelineObject( [out] IAMTimeline ** ppTimeline ); + HRESULT GetFilterGraph( [out] IGraphBuilder ** ppFG ); + HRESULT SetFilterGraph( IGraphBuilder * pFG ); + HRESULT SetInterestRange( REFERENCE_TIME Start, REFERENCE_TIME Stop ); + HRESULT SetInterestRange2( double Start, double Stop ); + HRESULT SetRenderRange( REFERENCE_TIME Start, REFERENCE_TIME Stop ); + HRESULT SetRenderRange2( double Start, double Stop ); + HRESULT GetGroupOutputPin( long Group, [out] IPin ** ppRenderPin ); + HRESULT ScrapIt( ); + HRESULT RenderOutputPins( ); + HRESULT GetVendorString( [out,retval] BSTR * pVendorID ); + HRESULT ConnectFrontEnd( ); + HRESULT SetSourceConnectCallback( IGrfCache * pCallback ); + HRESULT SetDynamicReconnectLevel( long Level ); + HRESULT DoSmartRecompression( ); + HRESULT UseInSmartRecompressionGraph( ); + + HRESULT SetSourceNameValidation( BSTR FilterString, IMediaLocator * pOverride, LONG Flags ); + + // not implemented yet + HRESULT Commit( ); + HRESULT Decommit( ); + HRESULT GetCaps( long Index, long * pReturn ); +}; + +// used for the smart render engine when it needs to find a compressor +[ + object, + uuid(F03FA8DE-879A-4d59-9B2C-26BB1CF83461), + odl, + helpstring("IFindCompressorCB Interface"), + pointer_default(unique) +] +interface IFindCompressorCB : IUnknown +{ + HRESULT GetCompressor( AM_MEDIA_TYPE * pType, AM_MEDIA_TYPE * pCompType, [out] IBaseFilter ** ppFilter ); +} + +[ + object, + uuid(F03FA8CE-879A-4d59-9B2C-26BB1CF83461), + odl, + helpstring("ISmartRenderEngine Interface"), + pointer_default(unique) +] +interface ISmartRenderEngine : IUnknown +{ + HRESULT SetGroupCompressor( long Group, IBaseFilter * pCompressor ); + HRESULT GetGroupCompressor( long Group, IBaseFilter ** pCompressor ); + HRESULT SetFindCompressorCB( IFindCompressorCB * pCallback ); +} + +//////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////// +// TIMELINE TIMELINE TIMELINE TIMELINE TIMELINE TIMELINE +//////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////// + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Every object on the timeline supports at least this interface. + // explained methods: + // Get/SetStartStop - the timeline times at which this object is + // active. Groups and Tracks have start times of zero. + // FixTimes - used by the render engine. Rounds the input times + // to the nearest FPS of the parent Group, for use in setting + // up the big switch. + // GetSubObject - get the sub-object which is associated with this + // timeline object. Each timeline object can carry around a + // pointer to 'something else'. For our Render Engine, this is + // a pointer to a filter that gets put into a graph. + // NOTE: Getting the subobject will FORCE it to load if it's possible + // to force this. If you don't want it to do this, don't call + // this function. + // SetSubObject - see GetSubObject + // SetSubObjectGUID - instead of giving the node a pointer, you can + // instead give it a GUID and see if this works instead. The + // sub-object will attempt to be instantiated when 'necessary' + // which is really when it's asked for with GetSubObject./ + // !!! a better way to do this perhaps? + // GetSubObjectLoaded - ask if the sub-object pointer is set + // Get/SetTimelineType - return the major type which is stored here, + // used by the API user and the render engine. + // Get/SetTimelineSubType - see above + // Get/SetUserID - get and set a number, any number + // GetGenID - every created object has a unique number to it. Used + // by the render engine. + // Get/SetUserName - a storable name, for users of the API + // Get/SetPropertySetter - the object that will set properties for this + // object (it will support IPropertySetter and it is created by + // CPropertySetter) + // Get/SetUserData - gets the persistant data used by the user of + // the API. + // Get/SetMuted - set whether this object should be active or not. + // Setting a parent of other objects off also turns off the + // sub-objects. + // Get/SetLocked - set whether you can edit this object or not. + // Note: the timeline doesn't enforce this, it just stores + // a value for convenience. + // Get/SetDirtyRange - + // RemoveAll - remove this object, and if in the tree already, all it's + // sub objects, including children + // Remove - remove this object, and if in the tree already, all it's + // sub objects, but not kids + // GetTimelineNoRef - called internally by the timeline. + // GetGroupIBelongTo - called internally by the timeline. + // GetEmbedDepth - find out how many tracks we are a part of + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +[ + object, + local, + uuid(78530B77-61F9-11D2-8CAD-00A024580902), + odl, + helpstring("IAMTimelineObj Interface"), + pointer_default(unique) +] +interface IAMTimelineObj : IUnknown +{ + [helpstring("method GetStartStop")] + HRESULT GetStartStop(REFERENCE_TIME * pStart, REFERENCE_TIME * pStop); + [helpstring("method GetStartStop2")] + HRESULT GetStartStop2(REFTIME * pStart, REFTIME * pStop); + [helpstring("method FixTimes")] + HRESULT FixTimes(REFERENCE_TIME * pStart, REFERENCE_TIME * pStop); + [helpstring("method FixTimes2")] + HRESULT FixTimes2(REFTIME * pStart, REFTIME * pStop); + [helpstring("method SetStartStop")] + HRESULT SetStartStop(REFERENCE_TIME Start, REFERENCE_TIME Stop); + [helpstring("method SetStartStop2")] + HRESULT SetStartStop2(REFTIME Start, REFTIME Stop); + [helpstring("method GetPropertySetter")] + HRESULT GetPropertySetter([out,retval] IPropertySetter* *pVal); + [helpstring("method SetPropertySetter")] + HRESULT SetPropertySetter(IPropertySetter* newVal); + [helpstring("method GetSubObject")] + HRESULT GetSubObject([out,retval] IUnknown* *pVal); + [helpstring("method SetSubObject")] + HRESULT SetSubObject(IUnknown* newVal); + [helpstring("method SetSubObjectGUID")] + HRESULT SetSubObjectGUID(GUID newVal); + [helpstring("method SetSubObjectGUIDByBSTR")] + HRESULT SetSubObjectGUIDB(BSTR newVal); + [helpstring("method GetSubObjectGUID")] + HRESULT GetSubObjectGUID(GUID * pVal); + [helpstring("method GetSubObjectGUIDByBSTR")] + HRESULT GetSubObjectGUIDB([out,retval] BSTR * pVal); + [helpstring("method GetSubObjectLoaded")] + HRESULT GetSubObjectLoaded(BOOL * pVal); + [helpstring("method GetTimelineType")] + HRESULT GetTimelineType(TIMELINE_MAJOR_TYPE * pVal); + [helpstring("method SetTimelineType")] + HRESULT SetTimelineType(TIMELINE_MAJOR_TYPE newVal); + [helpstring("method GetUserID")] + HRESULT GetUserID(long * pVal); + [helpstring("method SetUserID")] + HRESULT SetUserID(long newVal); + [helpstring("method GetGenID")] + HRESULT GetGenID( long * pVal ); + [helpstring("method GetUserName")] + HRESULT GetUserName([out,retval] BSTR * pVal); + [helpstring("method SetUserName")] + HRESULT SetUserName(BSTR newVal); + [helpstring("method GetUserData")] + HRESULT GetUserData(BYTE * pData, long * pSize); + [helpstring("method SetUserData")] + HRESULT SetUserData(BYTE * pData, long Size); + [helpstring("method GetMuted")] + HRESULT GetMuted(BOOL * pVal); + [helpstring("method SetMuted")] + HRESULT SetMuted(BOOL newVal); + [helpstring("method GetLocked")] + HRESULT GetLocked(BOOL * pVal); + [helpstring("method SetLocked")] + HRESULT SetLocked(BOOL newVal); + [helpstring("method GetDirtyRange")] + HRESULT GetDirtyRange(REFERENCE_TIME * pStart, REFERENCE_TIME * pStop); + [helpstring("method GetDirtyRange")] + HRESULT GetDirtyRange2(REFTIME * pStart, REFTIME * pStop); + [helpstring("method SetDirtyRange")] + HRESULT SetDirtyRange(REFERENCE_TIME Start, REFERENCE_TIME Stop); + [helpstring("method SetDirtyRange")] + HRESULT SetDirtyRange2(REFTIME Start, REFTIME Stop); + [helpstring("method ClearDirty")] + HRESULT ClearDirty( ); + [helpstring("method Remove")] + HRESULT Remove(); + [helpstring("method RemoveAll")] + HRESULT RemoveAll(); + HRESULT GetTimelineNoRef( IAMTimeline ** ppResult ); + HRESULT GetGroupIBelongTo( [out] IAMTimelineGroup ** ppGroup ); + HRESULT GetEmbedDepth( long * pVal ); +}; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Any object on the timeline that can have an effect put on it + // implements this interface. This includes sources, tracks, and + // compositions. + // explained methods: + // EffectInsBefore - insert an effect at the given priority onto + // this object. The effect's times will be clipped within + // this object's bounds. Use -1 to specify 'at the end' for priority. + // You cannot have two effects at the same priority. + // EffectSwapPriorities - swaparoo two effects. Makes undo easier to + // implement. + // EffectGetCount - get how many effects are applied to this object. + // GetEffect - get the nth effect applied to this object + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +[ + object, + uuid(EAE58537-622E-11d2-8CAD-00A024580902), + odl, + helpstring("IAMTimelineEffectable Interface"), + pointer_default(unique) +] +interface IAMTimelineEffectable : IUnknown +{ + [helpstring("method EffectInsBefore")] + HRESULT EffectInsBefore(IAMTimelineObj * pFX, long priority); + [helpstring("method EffectSwapPriorities")] + HRESULT EffectSwapPriorities(long PriorityA, long PriorityB); + [helpstring("method EffectGetCount")] + HRESULT EffectGetCount(long * pCount); + [helpstring("method GetEffect")] + HRESULT GetEffect([out] IAMTimelineObj ** ppFx, long Which); +}; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Any effect on the timeline will support at least this interface. + // NOTE: The Start/Stop times on this object are RELATIVE to their + // parent's, as are all start/stop times. + // explained methods: + // EffectGetPriority - finds out this effect's priority related to the others. + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +[ + object, + uuid(BCE0C264-622D-11d2-8CAD-00A024580902), + odl, + helpstring("IAMTimelineEffect Interface"), + pointer_default(unique) +] +interface IAMTimelineEffect : IUnknown +{ + [helpstring("method EffectGetPriority")] + HRESULT EffectGetPriority(long * pVal); +}; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Any object on the timeline that can have a transition put on it + // implements this interface + // explained methods: + // TransAdd - add a transition on this object. Multiple trans's on + // the same object cannot overlap in time. Transitions' times + // must lie within the bounds of their parent. + // TransGetCount - get how many transitions are applied to this + // object. + // GetNextTrans - given a time, get the next transition that happens + // on this object after that time. On exit, the input time is + // set to the start time of the transition. + // GetTransAtTime - find a transition forwards or backwards from + // a given spot. See DEXTERF_TRACK_SEARCH_FLAGS enum. + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +[ + object, + uuid(378FA386-622E-11d2-8CAD-00A024580902), + odl, + helpstring("IAMTimelineTransable Interface"), + pointer_default(unique) +] +interface IAMTimelineTransable : IUnknown +{ + [helpstring("method TransAdd")] + HRESULT TransAdd(IAMTimelineObj * pTrans); + [helpstring("method TransGetCount")] + HRESULT TransGetCount(long * pCount); + [helpstring("method GetNextTrans")] + HRESULT GetNextTrans([out] IAMTimelineObj ** ppTrans, REFERENCE_TIME * pInOut); + [helpstring("method GetNextTrans2")] + HRESULT GetNextTrans2([out] IAMTimelineObj ** ppTrans, REFTIME * pInOut); + [helpstring("method GetTransAtTime")] + HRESULT GetTransAtTime( + [out] IAMTimelineObj ** ppObj, + REFERENCE_TIME Time, + long SearchDirection ); + [helpstring("method GetTransAtTime2")] + HRESULT GetTransAtTime2([out] IAMTimelineObj ** ppObj, REFTIME Time, long SearchDirection ); +}; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Any object on the timeline that can be split into two will + // implement this interface. Namely, source, effects, and transitions + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +[ + object, + uuid(A0F840A0-D590-11d2-8D55-00A0C9441E20), + odl, + helpstring("IAMTimelineSplittable Interface"), + pointer_default(unique) +] +interface IAMTimelineSplittable : IUnknown +{ + HRESULT SplitAt(REFERENCE_TIME Time); + HRESULT SplitAt2(REFTIME Time); +}; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Any trans on the timeline will support at least this interface. + // NOTE: The Start/Stop times on this object are RELATIVE to their + // parent's, as are all start/stop times. + // explained methods: + // GetCutPoint - get where this transition should cut from A to B + // if the transition were not applied. + // GetA2B - get if this transition is to go from A->B or B->A. + // GetBackwards - get if this transition should run backwards. + // GetCutsOnly - force no transition, force doing a cut + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +[ + object, + uuid(BCE0C265-622D-11d2-8CAD-00A024580902), + odl, + helpstring("IAMTimelineTrans Interface"), + pointer_default(unique) +] +interface IAMTimelineTrans : IUnknown +{ + [helpstring("method GetCutPoint")] + HRESULT GetCutPoint(REFERENCE_TIME * pTLTime); + [helpstring("method GetCutPoint2")] + HRESULT GetCutPoint2(REFTIME * pTLTime); + [helpstring("method SetCutPoint")] + HRESULT SetCutPoint(REFERENCE_TIME TLTime); + [helpstring("method SetCutPoint2")] + HRESULT SetCutPoint2(REFTIME TLTime); + [helpstring("method GetSwapInputs")] + HRESULT GetSwapInputs( BOOL * pVal ); + [helpstring("method SetSwapInputs")] + HRESULT SetSwapInputs( BOOL pVal ); + [helpstring("method GetCutsOnly")] + HRESULT GetCutsOnly( BOOL * pVal ); + [helpstring("method SetCutsOnly")] + HRESULT SetCutsOnly( BOOL pVal ); +}; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Sources represent any source media object on the timeline. + // They extend an IAMTimelineObj to include media start and stop + // times, a media name (which could represent darned near anything), + // and a StreamNumber, which defines which stream out of a potential + // many this stream represents from a source clip. + // explained methods: + // ModifyStopTime - like calling SetStartStop, but this method just + // adjusts the tail end of the clip. + // FixMediaTimes - called by the render engine to round times to + // this source clip's parent group's FPS. + // SpliceWithNext - if the next clip after this is the same source + // and this's stop time matches next's start time, the two + // will be joined. + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +[ + object, + uuid(78530B79-61F9-11D2-8CAD-00A024580902), + odl, + helpstring("IAMTimelineSrc Interface"), + pointer_default(unique) +] +interface IAMTimelineSrc : IUnknown +{ + [helpstring("method GetMediaTimes")] + HRESULT GetMediaTimes(REFERENCE_TIME * pStart, REFERENCE_TIME * pStop); + [helpstring("method GetMediaTimes2")] + HRESULT GetMediaTimes2(REFTIME * pStart, REFTIME * pStop); + [helpstring("method ModifyStopTime")] + HRESULT ModifyStopTime(REFERENCE_TIME Stop); + [helpstring("method ModifyStopTime2")] + HRESULT ModifyStopTime2(REFTIME Stop); + [helpstring("method FixMediaTimes")] + HRESULT FixMediaTimes(REFERENCE_TIME * pStart, REFERENCE_TIME * pStop); + [helpstring("method FixMediaTimes2")] + HRESULT FixMediaTimes2(REFTIME * pStart, REFTIME * pStop); + [helpstring("method SetMediaTimes")] + HRESULT SetMediaTimes(REFERENCE_TIME Start, REFERENCE_TIME Stop); + [helpstring("method SetMediaTimes2")] + HRESULT SetMediaTimes2(REFTIME Start, REFTIME Stop); + [helpstring("method SetMediaLength")] + HRESULT SetMediaLength(REFERENCE_TIME Length); + [helpstring("method SetMediaLength2")] + HRESULT SetMediaLength2(REFTIME Length); + [helpstring("method GetMediaLength")] + HRESULT GetMediaLength(REFERENCE_TIME * pLength); + [helpstring("method GetMediaLength2")] + HRESULT GetMediaLength2(REFTIME * pLength); + [helpstring("method GetMediaName")] + HRESULT GetMediaName([out,retval] BSTR * pVal); + [helpstring("method SetMediaName")] + HRESULT SetMediaName(BSTR newVal); + [helpstring("method SpliceWithNext")] + HRESULT SpliceWithNext(IAMTimelineObj * pNext); + [helpstring("method GetStreamNumber")] + HRESULT GetStreamNumber(long * pVal); + [helpstring("method SetStreamNumber")] + HRESULT SetStreamNumber(long Val); + HRESULT IsNormalRate( BOOL * pVal ); + + // If a source can't figure out its frames per second, this number + // will be used (eg: Dib sequences). AVI, MPEG, etc. will not need this + // Use 0 fps to prevent a filename like "ski4.jpg" from using a dib seq + [helpstring("method GetDefaultFPS")] + HRESULT GetDefaultFPS(double * pFPS); + [helpstring("method SetDefaultFPS")] + HRESULT SetDefaultFPS(double FPS); + + // !!! This is video specific.. new interface? + // what kind of stretching? Stretch, crop, or preserve aspect ratio? + [helpstring("method GetStretchMode")] + HRESULT GetStretchMode(int * pnStretchMode); + [helpstring("method SetStretchMode")] + HRESULT SetStretchMode(int nStretchMode); +}; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Tracks are things that can contain media in them. You can add + // and remove sources, effects, and transitions from them. Sources + // are added according to the current insert mode of the timeline. + // If in OVERLAY mode, moving or adding a source to a time that's + // already occupied by another source will wipe out any overlapping + // portion of the underlying source. In InsertMode, everything at + // the insert point is moved down in time to make room for the + // new source. + // explained methods: + // SrcAdd - add the source to this track. The source's start/stop + // times must be set up first. + // GetNextSrc - pass a time in at which you wish to find a source + // and it will return the first source which occurs after the + // given time. + // MoveAllSources - bump a bunch of sources a certain direction + // on the track by a given time. + // GetSourcesCount - how many sources are on this track? + // AreYouBlank - do you contain anything at all? + // GetSrcAtTime - find a source at a given time. SearchDirection + // is which way to search. -1 = backwards, 1 = forwards + // MakeSpace - !!! what does this do, anyhow? + // RemoveSlice - !!! what does this do, anyhow? + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +[ + object, + uuid(EAE58538-622E-11d2-8CAD-00A024580902), + odl, + helpstring("IAMTimelineTrack Interface"), + pointer_default(unique) +] +interface IAMTimelineTrack : IUnknown +{ + [helpstring("method SrcAdd")] + HRESULT SrcAdd(IAMTimelineObj * pSource); + [helpstring("method GetNextSrc")] + HRESULT GetNextSrc([out] IAMTimelineObj ** ppSrc, REFERENCE_TIME * pInOut); + [helpstring("method GetNextSrc2")] + HRESULT GetNextSrc2([out] IAMTimelineObj ** ppSrc, REFTIME * pInOut); + [helpstring("method MoveEverythingBy")] + HRESULT MoveEverythingBy( REFERENCE_TIME Start, REFERENCE_TIME MoveBy ); + [helpstring("method MoveEverythingBy2")] + HRESULT MoveEverythingBy2( REFTIME Start, REFTIME MoveBy ); + [helpstring("method GetSourcesCount")] + HRESULT GetSourcesCount( long * pVal ); + [helpstring("method AreYouBlank")] + HRESULT AreYouBlank( long * pVal ); + [helpstring("method GetSrcAtTime")] + HRESULT GetSrcAtTime( + [out] IAMTimelineObj ** ppSrc, + REFERENCE_TIME Time, + long SearchDirection ); + [helpstring("method GetSrcAtTime2")] + HRESULT GetSrcAtTime2([out] IAMTimelineObj ** ppSrc, REFTIME Time, long SearchDirection ); + HRESULT InsertSpace( REFERENCE_TIME rtStart, REFERENCE_TIME rtEnd ); + HRESULT InsertSpace2( REFTIME rtStart, REFTIME rtEnd ); + HRESULT ZeroBetween( REFERENCE_TIME rtStart, REFERENCE_TIME rtEnd ); + HRESULT ZeroBetween2( REFTIME rtStart, REFTIME rtEnd ); + HRESULT GetNextSrcEx(IAMTimelineObj * pLast, [out] IAMTimelineObj **ppNext); +}; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // This virtual track interface is shared by both the compositions + // and tracks (and groups). + // explained methods: + // TrackGetPriority - used by rendering objects which need to know this. + // SetTrackDirty - !!! not sure if this is useful. + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +[ + object, + uuid(A8ED5F80-C2C7-11d2-8D39-00A0C9441E20), + odl, + helpstring("IAMTimelineVirtualTrack Interface"), + pointer_default(unique) +] +interface IAMTimelineVirtualTrack : IUnknown +{ + [helpstring("method TrackGetPriority")] + HRESULT TrackGetPriority(long * pPriority); + [helpstring("method SetTrackDirty")] + HRESULT SetTrackDirty( ); +}; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Compositions are like tracks in the sense that they also + // implement IAMVirtualTrack and you can put transitions and effects + // on them, but they really are the SUM of those tracks that they + // contain. They are "embedded" compositions. They should only contain + // media of one particular type (like all video or all audio), but + // this is not enforced. You can add a composition to another + // composition with VTrackInsBefore, just like you can add a track. + // The very top composition to which all other comps and tracks belong + // is a Group, which supports I-AMTimelineGroup as well as I-AMTimelineComp. + // explained methods: + // VTrackInsBefore - does NOT mean VideoTrack. Means Virtual Track. + // Adds a virtual track to a composition at a given priority. + // use -1 to mean "at the end" + // VTrackSwapPriorities - switch two vtracks around. + // VTrackGetCount - get how many vtracks this comp contains. + // GetVTrack - you get the idea + // GetCountOfType - Get the total number of these objects this comp + // and all it's vtracks (recursively) contains. !!! this may be dead. + // GetRecursiveLayerOfType - given a number, returns a given track. This + // is done recursively. You need to pass in a pointer to the number, + // and it will be modified upon exit to an unknown value. DO NOT + // CALL THE VERSION WITH THE POINTER! + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +[ + object, + uuid(EAE58536-622E-11d2-8CAD-00A024580902), + odl, + helpstring("IAMTimelineComp Interface"), + pointer_default(unique) +] +interface IAMTimelineComp : IUnknown +{ + [helpstring("method VTrackInsBefore")] + HRESULT VTrackInsBefore(IAMTimelineObj * pVirtualTrack, long Priority); + [helpstring("method VTrackSwapPriorities")] + HRESULT VTrackSwapPriorities(long VirtualTrackA, long VirtualTrackB); + [helpstring("method VTrackGetCount")] + HRESULT VTrackGetCount(long * pVal); + [helpstring("method GetVTrack")] + HRESULT GetVTrack([out] IAMTimelineObj ** ppVirtualTrack, long Which); + [helpstring("method GetCountOfType")] + HRESULT GetCountOfType(long * pVal, long * pValWithComps, TIMELINE_MAJOR_TYPE MajorType ); + [helpstring("method GetRecursiveLayerOfType")] + HRESULT GetRecursiveLayerOfType( + [out] IAMTimelineObj ** ppVirtualTrack, + long WhichLayer, + TIMELINE_MAJOR_TYPE Type); + [helpstring("method GetRecursiveLayerOfTypeI (do not call)")] + HRESULT GetRecursiveLayerOfTypeI( + [out] IAMTimelineObj ** ppVirtualTrack, + [in,out] long * pWhichLayer, + TIMELINE_MAJOR_TYPE Type); + HRESULT GetNextVTrack(IAMTimelineObj *pVirtualTrack, [out] IAMTimelineObj **ppNextVirtualTrack); +}; + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // Groups represent the topmost composition in a timeline. Every + // group should contain media of only one major type (like all video). + // The timeline can contain multiple groups, see it's interface for + // this. Each group has a particular "media type" that you can get/set + // which help identify it. Each group has an associated FPS which + // is used by the render engine in setting up the big switch. All + // cuts on the timeline will happen rounded to this nearest FPS for + // this particular group. Each group has a priority which enables + // writing out multiple-stream files with 1 or more streams of the + // same type. (Like a 2 video stream AVI file). + // explained methods: + // SetTimeline - this is called internally when the group is added. + // Do not call this. + // GetTimeline - get the timeline this group belongs to. + // GetPriority - get this group's priority + // Get/SetOutputFPS - explained above + // SetMediaTypeForVB - method for VB. Pass in 0 for video, 1 for audio + // SetRecompFormatFromSource - set the recompress format based on the + // source that's loaded or set in the IAMTimelineSrc + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +[ + object, + uuid(9EED4F00-B8A6-11d2-8023-00C0DF10D434), + odl, + helpstring("IAMTimelineGroup Interface"), + pointer_default(unique) +] +interface IAMTimelineGroup : IUnknown +{ + [helpstring("method SetTimeline")] + HRESULT SetTimeline( IAMTimeline * pTimeline ); + [helpstring("method GetTimeline")] + HRESULT GetTimeline( [out] IAMTimeline ** ppTimeline ); + [helpstring("method GetPriority")] + HRESULT GetPriority( long * pPriority ); + [helpstring("method GetMediaType")] + HRESULT GetMediaType([out] AM_MEDIA_TYPE *); + [helpstring("method SetMediaType")] + HRESULT SetMediaType([in] AM_MEDIA_TYPE *); + [helpstring("method SetOutputFPS")] + HRESULT SetOutputFPS(double FPS); + [helpstring("method GetOutputFPS")] + HRESULT GetOutputFPS(double * pFPS); + [helpstring("method SetGroupName")] + HRESULT SetGroupName( BSTR pGroupName ); + [helpstring("method GetGroupName")] + HRESULT GetGroupName( [out,retval] BSTR * pGroupName ); + // in preview mode, skip frames. In authoring mode, don't + [helpstring("method SetPreviewMode")] + HRESULT SetPreviewMode( BOOL fPreview ); + [helpstring("method GetPreviewMode")] + HRESULT GetPreviewMode( BOOL *pfPreview ); + [helpstring("method SetMediaTypeForVB")] + HRESULT SetMediaTypeForVB([in] long Val ); + // how many frames ahead switch can run + [helpstring("method GetOutputBuffering")] + HRESULT GetOutputBuffering([out] int *pnBuffer ); + [helpstring("method SetOutputBuffering")] + HRESULT SetOutputBuffering([in] int nBuffer ); + + HRESULT SetSmartRecompressFormat( long * pFormat ); + HRESULT GetSmartRecompressFormat( long ** ppFormat ); + HRESULT IsSmartRecompressFormatSet( BOOL * pVal ); + HRESULT IsRecompressFormatDirty( BOOL * pVal ); + HRESULT ClearRecompressFormatDirty( ); + HRESULT SetRecompFormatFromSource( IAMTimelineSrc * pSource ); +}; + + + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + // The main timeline. This is the base object you use to set + // properties of the timeline as a whole, and to create blank + // objects for use within the timeline. You cannot create the + // objects using COM methods, you must go through the timeline to + // create this. That's because certain information is set before + // handing the object back to you. Every object created by the + // timeline will support at LEAST IAMTimelineObj. For any timeline, + // it can have one or more "groups" that it knows about. Each group + // has the capability to hold a complete sub-tree containing media + // that is all of one type. This logical seperation is used for the + // rendering engine, but is not strictly enforced. + // explained methods: + // CreateEmptyNode - pass in a mid type and it will pass back + // an object of the type you requested. + // AddGroup - add a created group to the tree + // RemGroupFromList - make sure timeline no longer knows about this group. + // does NOT do anything to the group itself. Normally the user + // does not want to call this, it's called from the Group's Remove( ) method. + // GetGroup - get a certain group + // GetGroupCount - get how many groups + // ClearAllGroups - clear everything + // GetInsertMode - ask what the insert mode is, overlay or insert + // SetInsertMode - set whether to insert or overlay + // EnableTransitions - turn transitions on or off as a whole + // EnableEffects - same deal. + // SetIntererstRange - discard sub-objects outside of a given + // time range, to save memory/resources + // Get/SetDefaultFPS - set the 'default' FPS for this timeline, + // the RenderEngine reads this information for setting itself up + // by default. + // GetCountOfType - ask for how many of a given thing are in a given + // group. !!! this may be a useless function. + // !!! not implemented + // IsDirty - asks if anything in the timeline needs to be redrawn + // GetDirtyRange - same deal + // ValidateSourceNames - make sure the filenames in the sources + // really exist. Use the same enum flags as the render engine + // uses for SetSourceNameValidation. Source's filenames will be + // changed to those of the found ones in the timeline. + // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + +[ + object, + uuid(78530B74-61F9-11D2-8CAD-00A024580902), + odl, + helpstring("IAMTimeline Interface"), + pointer_default(unique) +] +interface IAMTimeline : IUnknown +{ + [helpstring("method CreateEmptyNode")] + HRESULT CreateEmptyNode([out] IAMTimelineObj ** ppObj, TIMELINE_MAJOR_TYPE Type ); + HRESULT AddGroup( IAMTimelineObj * pGroup ); + HRESULT RemGroupFromList( IAMTimelineObj * pGroup ); + HRESULT GetGroup( [out] IAMTimelineObj ** ppGroup, long WhichGroup ); + HRESULT GetGroupCount( long * pCount ); + HRESULT ClearAllGroups( ); + HRESULT GetInsertMode( long * pMode ); + [helpstring("method SetInsertMode")] + HRESULT SetInsertMode(long Mode); + [helpstring("method EnableTransitions")] + HRESULT EnableTransitions(BOOL fEnabled); + [helpstring("method TransitionsEnabled")] + HRESULT TransitionsEnabled(BOOL * pfEnabled); + [helpstring("method EnableEffects")] + HRESULT EnableEffects(BOOL fEnabled); + [helpstring("method EffectsEnabled")] + HRESULT EffectsEnabled(BOOL * pfEnabled); + [helpstring("method SetInterestRange")] + HRESULT SetInterestRange(REFERENCE_TIME Start, REFERENCE_TIME Stop); + [helpstring("method GetDuration")] + HRESULT GetDuration(REFERENCE_TIME * pDuration); + [helpstring("method GetDuration2")] + HRESULT GetDuration2(double * pDuration); + [helpstring("method SetDefaultFPS")] + HRESULT SetDefaultFPS(double FPS); + [helpstring("method GetDefaultFPS")] + HRESULT GetDefaultFPS(double * pFPS); + [helpstring("method IsDirty")] + HRESULT IsDirty(BOOL * pDirty); + [helpstring("method GetDirtyRange")] + HRESULT GetDirtyRange(REFERENCE_TIME * pStart, REFERENCE_TIME * pStop); + [helpstring("method GetCountOfType")] + HRESULT GetCountOfType(long Group, long * pVal, long * pValWithComps, TIMELINE_MAJOR_TYPE MajorType ); + HRESULT ValidateSourceNames( long ValidateFlags, IMediaLocator * pOverride, LONG_PTR NotifyEventHandle ); + + HRESULT SetDefaultTransition( GUID * pGuid ); + HRESULT GetDefaultTransition( GUID * pGuid ); + HRESULT SetDefaultEffect( GUID * pGuid ); + HRESULT GetDefaultEffect( GUID * pGuid ); + HRESULT SetDefaultTransitionB( BSTR pGuid ); + HRESULT GetDefaultTransitionB( [out,retval] BSTR * pGuid ); + HRESULT SetDefaultEffectB( BSTR pGuid ); + HRESULT GetDefaultEffectB( [out,retval] BSTR * pGuid ); +}; + +//////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////// +// XML STUFF --- XML STUFF --- XML STUFF --- XML STUFF --- XML +//////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////// + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// Xml2Dex - converts back and forth between XML and a dexter project +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +[ + object, + uuid(18C628ED-962A-11D2-8D08-00A0C9441E20), + odl, + helpstring("IXml2Dex Interface"), + pointer_default(unique) +] +interface IXml2Dex : IDispatch +{ + [id(1), helpstring("method CreateGraphFromFile")] + HRESULT CreateGraphFromFile([out] IUnknown ** ppGraph, IUnknown * pTimeline, BSTR Filename); + [id(2), helpstring("method WriteGrfFile")] + HRESULT WriteGrfFile(IUnknown * pGraph, BSTR FileName); + [id(3), helpstring("method WriteXMLFile")] + HRESULT WriteXMLFile(IUnknown * pTimeline, BSTR FileName); + [id(5), helpstring("method ReadXMLFile")] + HRESULT ReadXMLFile(IUnknown *pTimeline, BSTR XMLName); + [id(6), helpstring("method Delete")] + HRESULT Delete(IUnknown *pTimeline, double dStart, double dEnd); + [id(7), helpstring("method WriteXMLPart")] + HRESULT WriteXMLPart(IUnknown * pTimeline, double dStart, double dEnd, BSTR FileName); + [id(8), helpstring("method PasteXMLFile")] + HRESULT PasteXMLFile(IUnknown * pTimeline, double dStart, BSTR FileName); + [id(9), helpstring("method CopyXML")] + HRESULT CopyXML(IUnknown * pTimeline, double dStart, double dEnd); + [id(10), helpstring("method PasteXML")] + HRESULT PasteXML(IUnknown * pTimeline, double dStart); + [id(11), helpstring("method Reset")] + HRESULT Reset( ); + [id(12), helpstring("method ReadXML")] + HRESULT ReadXML(IUnknown *pTimeline, IUnknown *pXML); + [id(13), helpstring("method WriteXML")] + HRESULT WriteXML(IUnknown *pTimeline, BSTR *pbstrXML); +}; + +//////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////// +// USEFUL HELPER INTERFACES +//////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////// + +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ +// IAMErrorLog - an interface that receives error information from +// a timeline or a render engine. +//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + +[ + object, + uuid(E43E73A2-0EFA-11d3-9601-00A0C9441E20), + odl, + helpstring("IAMErrorLog Interface"), + pointer_default(unique) +] +interface IAMErrorLog : IUnknown +{ + [helpstring("method LogError")] HRESULT LogError(long Severity, BSTR pErrorString, long ErrorCode, long hresult, [in] VARIANT * pExtraInfo ); +}; + +[ + object, + uuid(963566DA-BE21-4eaf-88E9-35704F8F52A1), + odl, + helpstring("IAMSetErrorLog Interface"), + pointer_default(unique) +] +interface IAMSetErrorLog : IUnknown +{ + [propget, helpstring("property ErrorLog")] HRESULT ErrorLog([out, retval] IAMErrorLog * *pVal); + [propput, helpstring("property ErrorLog")] HRESULT ErrorLog([in] IAMErrorLog * newVal); +}; + +[ + object, + uuid(0579154A-2B53-4994-B0D0-E773148EFF85), + local, + helpstring("ISampleGrabberCB Interface"), + pointer_default(unique) +] +interface ISampleGrabberCB : IUnknown +{ + HRESULT SampleCB( double SampleTime, IMediaSample * pSample ); + HRESULT BufferCB( double SampleTime, BYTE * pBuffer, long BufferLen ); +} + +[ + object, + uuid(6B652FFF-11FE-4fce-92AD-0266B5D7C78F), + local, + helpstring("ISampleGrabber Interface"), + pointer_default(unique) +] +interface ISampleGrabber: IUnknown +{ + // set this to have the filter immediate stop after + // garnishing a sample + // + HRESULT SetOneShot( BOOL OneShot ); + + // set what media type we connect to. It can be partially + // specified by setting only the major type, OR the major and + // subtype, OR major, subtype, and the formattype. + // + HRESULT SetMediaType( const AM_MEDIA_TYPE * pType ); + + // after something's connected to this filter, find out + // what it is + // + HRESULT GetConnectedMediaType( AM_MEDIA_TYPE * pType ); + + // call this to buffer incoming samples, so the next two methods will work + // If this is not called, the next two methods will return + // E_INVALIDARG + // + HRESULT SetBufferSamples( BOOL BufferThem ); + + // pass in NULL for pBuffer to get out the buffer size you need to + // allocate. This will NOT return a pointer to a compressed dib + // any longer! It will return the IMediaSample's GetPointer buffer. + // + HRESULT GetCurrentBuffer( [in,out] long * pBufferSize, [out] long * pBuffer ); + + // return the currently buffered sample + // + HRESULT GetCurrentSample( [out,retval] IMediaSample ** ppSample ); + + // if this callback is set, then it will be called for + // every sample passing through the filter. Do not take a long time + // in the callback for smooth playback (obviously!) + // + HRESULT SetCallback( ISampleGrabberCB * pCallback, long WhichMethodToCallback ); +}; + +//////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////// +// THE LIBRARY ITSELF +//////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////// + +[ + uuid(78530B68-61F9-11D2-8CAD-00A024580902), + version(1.0), + helpstring("Dexter 1.0 Type Library") +] +library DexterLib +{ + importlib("stdole32.tlb"); + importlib("stdole2.tlb"); + + [ + uuid(78530B75-61F9-11D2-8CAD-00A024580902), + helpstring("AMTimeline Class") + ] + coclass AMTimeline + { + [default] interface IAMTimeline; + interface IPersistStream; + interface IAMSetErrorLog; + }; + + [ + uuid(78530B78-61F9-11D2-8CAD-00A024580902), + helpstring("IAMTimelineObj Class") + ] + coclass AMTimelineObj + { + [default] interface IAMTimelineObj; + }; + + [ + uuid(78530B7A-61F9-11D2-8CAD-00A024580902), + helpstring("IAMTimelineSrc Class") + ] + coclass AMTimelineSrc + { + [default] interface IAMTimelineSrc; + interface IAMTimelineObj; + interface IAMTimelineEffectable; + interface IAMTimelineSplittable; + }; + + [ + uuid(8F6C3C50-897B-11d2-8CFB-00A0C9441E20), + ] + coclass AMTimelineTrack + { + [default] interface IAMTimelineTrack; + interface IAMTimelineObj; + interface IAMTimelineEffectable; + interface IAMTimelineTransable; + interface IAMTimelineVirtualTrack; + interface IAMTimelineSplittable; + }; + + [ + uuid(74D2EC80-6233-11d2-8CAD-00A024580902), + ] + coclass AMTimelineComp + { + [default] interface IAMTimelineComp; + interface IAMTimelineObj; + interface IAMTimelineEffectable; + interface IAMTimelineTransable; + interface IAMTimelineVirtualTrack; + }; + + [ + uuid(F6D371E1-B8A6-11d2-8023-00C0DF10D434), + ] + coclass AMTimelineGroup + { + [default] interface IAMTimelineGroup; + interface IAMTimelineComp; + interface IAMTimelineObj; + }; + + [ + uuid(74D2EC81-6233-11d2-8CAD-00A024580902), + ] + coclass AMTimelineTrans + { + [default] interface IAMTimelineTrans; + interface IAMTimelineObj; + interface IAMTimelineSplittable; + }; + + [ + uuid(74D2EC82-6233-11d2-8CAD-00A024580902), + ] + coclass AMTimelineEffect + { + [default] interface IAMTimelineEffect; + interface IAMTimelineObj; + interface IAMTimelineSplittable; + interface IPropertyBag; + }; + + [ + uuid(64D8A8E0-80A2-11d2-8CF3-00A0C9441E20), + ] + coclass RenderEngine + { + [default] interface IRenderEngine; + interface IAMSetErrorLog; + }; + + [ + uuid(498B0949-BBE9-4072-98BE-6CCAEB79DC6F), + ] + coclass SmartRenderEngine + { + [default] interface IRenderEngine; + interface ISmartRenderEngine; + interface IAMSetErrorLog; + }; + + [ + uuid(036A9790-C153-11d2-9EF7-006008039E37), + ] + coclass AudMixer + { + [default] interface IBaseFilter; + }; + + [ + uuid(18C628EE-962A-11D2-8D08-00A0C9441E20), + helpstring("Xml2Dex Class") + ] + coclass Xml2Dex + { + [default] interface IXml2Dex; + }; + + [ + uuid(CC1101F2-79DC-11D2-8CE6-00A0C9441E20), + helpstring("MediaLocator Class") + ] + coclass MediaLocator + { + [default] interface IMediaLocator; + }; + + [ + uuid(ADF95821-DED7-11d2-ACBE-0080C75E246E), + helpstring("Varying Property Holder") + ] + coclass PropertySetter + { + [default] interface IPropertySetter; + interface IAMSetErrorLog; + }; + + [ + uuid(65BD0711-24D2-4ff7-9324-ED2E5D3ABAFA), + helpstring("MediaDet Class") + ] + coclass MediaDet + { + [default] interface IMediaDet; + }; + + [ + uuid(C1F400A0-3F08-11d3-9F0B-006008039E37), + helpstring("MsGrab Class") + ] + coclass SampleGrabber + { + [default] interface ISampleGrabber; + }; + + // useful for movie maker and other people + [ + uuid(C1F400A4-3F08-11d3-9F0B-006008039E37), + helpstring("NullRenderer Class") + ] + coclass NullRenderer + { + [default] interface IBaseFilter; + }; + + [ + uuid(BB44391D-6ABD-422f-9E2E-385C9DFF51FC), + helpstring("DxtCompositor Class") + ] + coclass DxtCompositor + { + [default] interface IDxtCompositor; + }; + + [ + uuid(506D89AE-909A-44f7-9444-ABD575896E35), + helpstring("DxtAlphaSetter Class") + ] + coclass DxtAlphaSetter + { + [default] interface IDxtAlphaSetter; + }; + + [ + uuid(DE75D012-7A65-11D2-8CEA-00A0C9441E20), + helpstring("SMPTE wipe DXT") + ] + coclass DxtJpeg + { + [default] interface IDxtJpeg; + }; + + [ + uuid(0cfdd070-581a-11d2-9ee6-006008039e37), + ] + coclass ColorSource + { + [default] interface IBaseFilter; + }; + + [ + uuid(C5B19592-145E-11d3-9F04-006008039E37), + helpstring("DxtKey Class") + ] + coclass DxtKey + { + [default] interface IDxtKey; + }; +}; + +// these are some error codes that we can/will return +enum +{ + E_NOTINTREE = 0x80040400, + E_RENDER_ENGINE_IS_BROKEN = 0x80040401, + E_MUST_INIT_RENDERER = 0x80040402, + E_NOTDETERMINED = 0x80040403, + E_NO_TIMELINE = 0x80040404, + S_WARN_OUTPUTRESET = 40404 +}; + +// These codes are given to the app in IAMErrorLog to help identify what went wrong + +// Filename doesn't exist, or DShow doesn't recognize the filetype +// EXTRA - filename +cpp_quote("#define DEX_IDS_BAD_SOURCE_NAME 1400") + +// Filename doesn't exist or contains unknown data +// EXTRA - filename (maybe no codec?) +cpp_quote("#define DEX_IDS_BAD_SOURCE_NAME2 1401") + +// filename was required, but wasn't given +cpp_quote("#define DEX_IDS_MISSING_SOURCE_NAME 1402") + +// cannot parse data provided by this source +// !!! what source? +cpp_quote("#define DEX_IDS_UNKNOWN_SOURCE 1403") + +// unexpected error - some DShow component not installed correctly +cpp_quote("#define DEX_IDS_INSTALL_PROBLEM 1404") + +// Source filter does not accept filenames +// !!! What source? +cpp_quote("#define DEX_IDS_NO_SOURCE_NAMES 1405") + +// The group's mediatype is not supported +// EXTRA - gives you an integer group number +cpp_quote("#define DEX_IDS_BAD_MEDIATYPE 1406") + +// Invalid stream number for a source +// EXTRA - gives the stream number !!! should identify which source! +cpp_quote("#define DEX_IDS_STREAM_NUMBER 1407") + +// You ran out of memory +cpp_quote("#define DEX_IDS_OUTOFMEMORY 1408") + +// One bitmap in a sequence was not the same type as the others +// EXTRA - gives the bitmap name +cpp_quote("#define DEX_IDS_DIBSEQ_NOTALLSAME 1409") + +// Clip's mediatimes are invalid, or DibSeq too short, or a previous error caused this +// !!! Needs to give the clip name +cpp_quote("#define DEX_IDS_CLIPTOOSHORT 1410") + +// Clsid of FX/Transition is not a DirectX Transform +// EXTRA - gives the CLSID +cpp_quote("#define DEX_IDS_INVALID_DXT 1411") + +// Default FX/Transition Clsid is not a DirectX Transform" +// EXTRA - gives the CLSID +cpp_quote("#define DEX_IDS_INVALID_DEFAULT_DXT 1412") + +// Your version of DX doesn't support 3D transforms" +// EXTRA - gives the CLSID of the 3D transform you tried to use +cpp_quote("#define DEX_IDS_NO_3D 1413") + +// This DirectX Transform is not the right kind, or is broken +// EXTRA - gives the CLSID of the broken transform +cpp_quote("#define DEX_IDS_BROKEN_DXT 1414") + +// No such property exists on an object +// EXTRA - gives the name of the property (if given as a string) +cpp_quote("#define DEX_IDS_NO_SUCH_PROPERTY 1415") + +// Illegal value for a property +// EXTRA - gives the VARIANT value that was illegal +cpp_quote("#define DEX_IDS_ILLEGAL_PROPERTY_VAL 1416") + +// Syntax error in XML file at line: +// EXTRA - gives I4 line number, if available +cpp_quote("#define DEX_IDS_INVALID_XML 1417") + +// Can't find filter specified in XML by Category and Instance +// EXTRA - gives friendly name (instance) +cpp_quote("#define DEX_IDS_CANT_FIND_FILTER 1418") + +// Disk error writing XML file +cpp_quote("#define DEX_IDS_DISK_WRITE_ERROR 1419") + +// Clsid not a valid DShow audio effect filter +// EXTRA - gives the CLSID +cpp_quote("#define DEX_IDS_INVALID_AUDIO_FX 1420") + +// Cannot find compressor for smart recompression type +cpp_quote("#define DEX_IDS_CANT_FIND_COMPRESSOR 1421") + + + +// !!! Here go problems hooking up sources or finding codecs + + +// THE FOLLOWING SHOULD NEVER HAPPEN - please call me if they do + +// Unexpected error in parsing the timeline +cpp_quote("#define DEX_IDS_TIMELINE_PARSE 1426") +// Unexpected error building the filtergraph +cpp_quote("#define DEX_IDS_GRAPH_ERROR 1427") +// Unexpected error with the internal grid +cpp_quote("#define DEX_IDS_GRID_ERROR 1428") +// Unexpected error getting an interface +cpp_quote("#define DEX_IDS_INTERFACE_ERROR 1429") + +// these are the enumeration categories for effects +// +cpp_quote("EXTERN_GUID(CLSID_VideoEffects1Category, 0xcc7bfb42, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59);") +cpp_quote("EXTERN_GUID(CLSID_VideoEffects2Category, 0xcc7bfb43, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59);") +cpp_quote("EXTERN_GUID(CLSID_AudioEffects1Category, 0xcc7bfb44, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59);") +cpp_quote("EXTERN_GUID(CLSID_AudioEffects2Category, 0xcc7bfb45, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59);") + diff --git a/windows_libs/mssdk/include/DShowIDL/regbag.idl b/windows_libs/mssdk/include/DShowIDL/regbag.idl new file mode 100644 index 00000000..33983f2c --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/regbag.idl @@ -0,0 +1,43 @@ +//------------------------------------------------------------------------------ +// File: RegBag.idl +// +// Desc: IDL source for RegBag.dll. +// +// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +import "objidl.idl"; +import "oaidl.idl"; +import "ocidl.idl"; + + +//***************************************************************************** +/////////////////////////////////////////////////////////////////////////////// +// +// Custom Factory interface +// since com doesn't support ctors or initialization parameters on std factory interface +// we have a custom creation interface +// +/////////////////////////////////////////////////////////////////////////////// +//***************************************************************************** +/////////////////////////////////////////////////////////////////////////////////////// +[object, + hidden, restricted, + uuid(8A674B48-1F63-11d3-B64C-00C04F79498E), + helpstring("Create property bag backed by registry"), + pointer_default(unique), + local +] +interface ICreatePropBagOnRegKey : IUnknown { + // NOTE: it is up to the caller to set the correct registry access based on the interface + // and methods the caller intends to use + // IPropertyBag2::GetPropertyInfo and CountProperties require both KEY_QUERY_VALUE and KEY_ENUMERATE_SUBKEYS + // IPropertyBagXXX::Read requires KEY_READ + // IPropertyBagXXX::Write requires KEY_WRITE + // also, you must CoTaskMemFree the name string from GetPropertyInfo + // if you write a value of VT_EMPTY or VT_NULL the property will be removed from the bag and the corresponding + // registry info will be deleted. + HRESULT Create([in] HKEY hkey, [in] LPCOLESTR subkey, [in] DWORD ulOptions, [in] DWORD samDesired, REFIID iid, [out] LPVOID *ppBag); +}; + diff --git a/windows_libs/mssdk/include/DShowIDL/strmif.idl b/windows_libs/mssdk/include/DShowIDL/strmif.idl new file mode 100644 index 00000000..0a25e28c --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/strmif.idl @@ -0,0 +1,28 @@ +//------------------------------------------------------------------------------ +// File: StrmIf.idl +// +// Desc: ActiveMovie interface definitions. +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +import "unknwn.idl"; +import "objidl.idl"; // for IPersist (IFilter's root) + +#include "devenum.idl" + +// core interfaces +#include "axcore.idl" + +// extended, ActiveMovie-only interfaces +#include "axextend.idl" + +// ActiveMovie-only sample plug-in distributor interface +#include "IAMovie.idl" + +// application interfaces for DVD +#include "dvdif.idl" + +// Dynamic graph stuff +#include "dyngraph.idl" diff --git a/windows_libs/mssdk/include/DShowIDL/tuner.idl b/windows_libs/mssdk/include/DShowIDL/tuner.idl new file mode 100644 index 00000000..e8da29b8 --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/tuner.idl @@ -0,0 +1,1996 @@ +//------------------------------------------------------------------------------ +// File: Tuner.idl +// +// Desc: +// +// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +cpp_quote("//+-------------------------------------------------------------------------") +cpp_quote("//") +cpp_quote("// Microsoft Windows") +cpp_quote("// Copyright (C) Microsoft Corporation, 1999-2000.") +cpp_quote("//") +cpp_quote("//--------------------------------------------------------------------------") +cpp_quote("#pragma once") + +#include + +#ifndef DO_NO_IMPORTS +import "oaidl.idl"; +import "comcat.idl"; +import "strmif.idl"; +import "bdatypes.h"; +import "regbag.idl"; +#endif + +cpp_quote("#include ") + +interface ITuningSpaceContainer; +interface ITuningSpace; +interface IEnumTuningSpaces; +interface ITuneRequest; +interface ITuner; +interface IScanningTuner; +interface ITunerEvents; +interface IEnumComponentTypes; +interface IComponentTypes; +interface IComponentType; +interface ILanguageComponentType; +interface IEnumComponents; +interface IComponents; +interface IComponent; +interface IMPEG2ComponentType; +interface IMPEG2Component; +interface ILocator; +interface IATSCLocator; +interface IDVBSLocator; +interface IDVBTLocator; + +// tuner.idl: +// interface ITuningSpaceContainer : IDispatch +// interface ITuningSpace : IDispatch +// interface ITuneRequest : IDispatch +// interface IComponentType : IDispatch +// interface ILanguageComponentType : IComponentType +// interface IComponentTypes : IDispatch +// interface IComponent : IDispatch +// interface IComponents : IDispatch +// interface ITVTuningSpace : ITuningSpace +// interface IFMRadioTuningSpace : ITuningSpace +// interface IAMRadioTuningSpace : ITuningSpace +// interface IAnalogTVTuningSpace : ITVTuningSpace +// interface IAnalogTVAudioComponent : IComponent +// interface IAnalogTVDataComponent : IComponent +// interface IChannelTuneRequest : ITuneRequest +// interface IDVBComponent : IComponent +// interface IDVBTuneRequest : ITuneRequest + +// DISPIDs for ITuningSpaces interface +// we don't expect to inherit from this interface and consequently there's +// no chance of collision, thus we'll allow midl to auto assign ids for this one + +// DISPIDs for ITuningSpace interface +enum { +DISPID_TUNER_TS_UNIQUENAME = 1, +DISPID_TUNER_TS_FRIENDLYNAME = 2, +DISPID_TUNER_TS_CLSID = 3, +DISPID_TUNER_TS_NETWORKTYPE = 4, +DISPID_TUNER_TS__NETWORKTYPE = 5, +DISPID_TUNER_TS_CREATETUNEREQUEST = 6, +DISPID_TUNER_TS_ENUMCATEGORYGUIDS = 7, +DISPID_TUNER_TS_ENUMDEVICEMONIKERS = 8, +DISPID_TUNER_TS_DEFAULTPREFERREDCOMPONENTTYPES = 9, +DISPID_TUNER_TS_FREQMAP = 10, +DISPID_TUNER_TS_DEFLOCATOR = 11, +DISPID_TUNER_TS_CLONE = 12, + +// DISPIDs for ITuneRequest interface +DISPID_TUNER_TR_TUNINGSPACE = 1, +DISPID_TUNER_TR_COMPONENTS = 2, +DISPID_TUNER_TR_CLONE = 3, +DISPID_TUNER_TR_LOCATOR = 4, + + +// DISPID for IComponentType interface +DISPID_TUNER_CT_CATEGORY = 1, +DISPID_TUNER_CT_MEDIAMAJORTYPE = 2, +DISPID_TUNER_CT__MEDIAMAJORTYPE = 3, +DISPID_TUNER_CT_MEDIASUBTYPE = 4, +DISPID_TUNER_CT__MEDIASUBTYPE = 5, +DISPID_TUNER_CT_MEDIAFORMATTYPE = 6, +DISPID_TUNER_CT__MEDIAFORMATTYPE = 7, +DISPID_TUNER_CT_MEDIATYPE = 8, +DISPID_TUNER_CT_CLONE = 9, + + +// DISPID for ILanguageComponentType interface +DISPID_TUNER_LCT_LANGID = 100, + +// DISPID for IMPEG2ComponentType interface +DISPID_TUNER_MP2CT_TYPE = 200, + +// DISPID for IATSCComponentType interface +DISPID_TUNER_ATSCCT_FLAGS = 300, + +// DISPID for ILocator interface +DISPID_TUNER_L_CARRFREQ = 1, +DISPID_TUNER_L_INNERFECMETHOD = 2, +DISPID_TUNER_L_INNERFECRATE = 3, +DISPID_TUNER_L_OUTERFECMETHOD = 4, +DISPID_TUNER_L_OUTERFECRATE = 5, +DISPID_TUNER_L_MOD = 6, +DISPID_TUNER_L_SYMRATE = 7, +DISPID_TUNER_L_CLONE = 8, + +// DISPID for IATSCLocator interface +DISPID_TUNER_L_ATSC_PHYS_CHANNEL = 201, +DISPID_TUNER_L_ATSC_TSID = 202, + +// DISPID for IDVBTLocator interface +DISPID_TUNER_L_DVBT_BANDWIDTH = 301, +DISPID_TUNER_L_DVBT_LPINNERFECMETHOD = 302, +DISPID_TUNER_L_DVBT_LPINNERFECRATE = 303, +DISPID_TUNER_L_DVBT_GUARDINTERVAL = 304, +DISPID_TUNER_L_DVBT_HALPHA = 305, +DISPID_TUNER_L_DVBT_TRANSMISSIONMODE = 306, +DISPID_TUNER_L_DVBT_INUSE = 307, + +// DISPID for IDVBSLocator interface +DISPID_TUNER_L_DVBS_POLARISATION = 401, +DISPID_TUNER_L_DVBS_WEST = 402, +DISPID_TUNER_L_DVBS_ORBITAL = 403, +DISPID_TUNER_L_DVBS_AZIMUTH = 404, +DISPID_TUNER_L_DVBS_ELEVATION = 405, + +// DISPID for IDVBCLocator interface + +// DISPIDs for IComponent interface +DISPID_TUNER_C_TYPE = 1, +DISPID_TUNER_C_STATUS = 2, +DISPID_TUNER_C_LANGID = 3, +DISPID_TUNER_C_DESCRIPTION = 4, +DISPID_TUNER_C_CLONE = 5, + +// DISPIDs for IMPEG2Component interface +DISPID_TUNER_C_MP2_PID = 101, +DISPID_TUNER_C_MP2_PCRPID = 102, +DISPID_TUNER_C_MP2_PROGNO = 103, + +// DISPIDs for IDVBTuningSpace interface +DISPID_TUNER_TS_DVB_SYSTEMTYPE = 101, + +// DISPIDs for IAnalogRadioTuningSpace interface +DISPID_TUNER_TS_AR_MINFREQUENCY = 101, +DISPID_TUNER_TS_AR_MAXFREQUENCY = 102, +DISPID_TUNER_TS_AR_STEP = 103, + +// DISPIDs for IAnalogTVTuningSpace interface +DISPID_TUNER_TS_ATV_MINCHANNEL = 101, +DISPID_TUNER_TS_ATV_MAXCHANNEL = 102, +DISPID_TUNER_TS_ATV_INPUTTYPE = 103, +DISPID_TUNER_TS_ATV_COUNTRYCODE = 104, + +// DISPIDs for IATSCTuningSpace interface +DISPID_TUNER_TS_ATSC_MINMINORCHANNEL = 201, +DISPID_TUNER_TS_ATSC_MAXMINORCHANNEL = 202, +DISPID_TUNER_TS_ATSC_MINPHYSCHANNEL = 203, +DISPID_TUNER_TS_ATSC_MAXPHYSCHANNEL = 204, + +// DISPID for IAnalogTVAudioComponent interface +DISPID_CHTUNER_ATVAC_CHANNEL = 101, + +// DISPIDs for IAnalogTVDataComponent interface +DISPID_CHTUNER_ATVDC_SYSTEM = 101, +DISPID_CHTUNER_ATVDC_CONTENT = 102, + +// DISPID for IChannelTuneRequest interface +DISPID_CHTUNER_CTR_CHANNEL = 101, + +// DISPID IATSCChannelTuneRequest +DISPID_CHTUNER_ACTR_MINOR_CHANNEL = 201, + +// DISPIDs for IDVBComponent interface +DISPID_DVBTUNER_DVBC_ATTRIBUTESVALID = 101, +DISPID_DVBTUNER_DVBC_PID = 102, +DISPID_DVBTUNER_DVBC_TAG = 103, +DISPID_DVBTUNER_DVBC_COMPONENTTYPE = 104, + +// DISPIDs for IDVBTuneRequest interface +DISPID_DVBTUNER_ONID = 101, +DISPID_DVBTUNER_TSID = 102, +DISPID_DVBTUNER_SID = 103, + +}; + + +////////////////////////////////////////////////////////////////////////////////////// +// Tuning Space Container +////////////////////////////////////////////////////////////////////////////////////// +// simple read-only collection of tuning spaces for enumerating subsets of the total +// set of system tuning spaces + [ + object, + uuid(901284E4-33FE-4b69-8D63-634A596F3756), + dual, + oleautomation, + nonextensible, + helpstring("Tuning Space Collection Interface"), + pointer_default(unique) + ] + interface ITuningSpaces : IDispatch + { + + [propget, helpstring("Number of items in the collection")] + HRESULT Count( + [out, retval] long *Count + ); + + [propget, id(DISPID_NEWENUM), hidden, restricted] + HRESULT _NewEnum( + [out, retval] IEnumVARIANT** NewEnum + ); + + [id(DISPID_VALUE), + propget, + helpstring("Find the Tuning Space with the specified Index")] + HRESULT Item( + [in] VARIANT varIndex, + [out, retval] ITuningSpace** TuningSpace + ); + + [propget, hidden, restricted, + helpstring("convenience function so C++ apps don't have to unpack VARIANT")] + HRESULT EnumTuningSpaces( + [out, retval] IEnumTuningSpaces** NewEnum + ); + + } + +////////////////////////////////////////////////////////////////////////////////////// +// Tuning Space Container +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + uuid(5B692E84-E2F1-11d2-9493-00C04F72D980), + dual, + oleautomation, + hidden, + nonextensible, + helpstring("Tuning Space Container Interface"), + pointer_default(unique) + ] + interface ITuningSpaceContainer : IDispatch + { + + [propget, helpstring("Number of items in the collection")] + HRESULT Count( + [out, retval] long *Count + ); + + [propget, id(DISPID_NEWENUM), hidden, restricted] + HRESULT _NewEnum( + [out, retval] IEnumVARIANT** NewEnum + ); + + [id(DISPID_VALUE), + propget, + helpstring("Find the Tuning Space with the specified Index")] + HRESULT Item( + [in] VARIANT varIndex, + [out, retval] ITuningSpace** TuningSpace + ); + [id(DISPID_VALUE), + propput, + helpstring("Change the Tuning Space with the specified Index")] + HRESULT Item([in] VARIANT varIndex, [in] ITuningSpace *TuningSpace); + + [helpstring("Returns the collection of Tuning Spaces with the same implementation")] + HRESULT TuningSpacesForCLSID( + [in] BSTR SpaceCLSID, + [out, retval] ITuningSpaces** NewColl + ); + + [hidden, restricted, + helpstring("Convenience Function for enumerating from C")] + HRESULT _TuningSpacesForCLSID( + [in] REFCLSID SpaceCLSID, + [out, retval] ITuningSpaces** NewColl + ); + + [helpstring("Returns the collection of Tuning Spaces matching the name")] + HRESULT TuningSpacesForName( + [in] BSTR Name, + [out, retval] ITuningSpaces** NewColl + ); + + [helpstring("Find Local ID Number of the specified Tuning Space")] + HRESULT FindID( + [in] ITuningSpace *TuningSpace, + [out, retval] long *ID + ); + + + [id(DISPID_ADDITEM), + helpstring("Add a new Tuning Space to the collection. This tuning space will be persisted unless removed")] + HRESULT Add( + [in] ITuningSpace* TuningSpace, + [out, retval] VARIANT* NewIndex + ); + + [propget, hidden, restricted, helpstring("Convenience Function for enumerating collection from C")] + HRESULT EnumTuningSpaces( + [out, retval] IEnumTuningSpaces **ppEnum + ); + + [id(DISPID_REMOVEITEM), + helpstring("Remove a Tuning Space from the collection. this tuning space will be deleted from the registry")] + HRESULT Remove( + [in] VARIANT Index + ); + + [propget, helpstring("Maximum number of items allowed in the collection")] + HRESULT MaxCount( + [out, retval] long *MaxCount + ); + + // we don't allow script to set this, but we do allow c code to change it. + [propput, hidden, restricted, helpstring("Maximum number of items allowed in the collection")] + HRESULT MaxCount( + [in] long MaxCount + ); + + } + +////////////////////////////////////////////////////////////////////////////////////// +// Tuning Space Interfaces +////////////////////////////////////////////////////////////////////////////////////// + +// note: the network type is the clsid of the tuning space implementation + [ + object, + uuid(061C6E30-E622-11d2-9493-00C04F72D980), + dual, + oleautomation, + nonextensible, + helpstring("Tuning Space Interface"), + pointer_default(unique) + ] + interface ITuningSpace : IDispatch + { + [propget, id(DISPID_TUNER_TS_UNIQUENAME), + helpstring("Unique name of the Tuning Space")] + HRESULT UniqueName( + [out, retval] BSTR *Name + ); + + [propput, id(DISPID_TUNER_TS_UNIQUENAME), + helpstring("Unique name of the Tuning Space")] + HRESULT UniqueName( + [in] BSTR Name + ); + + [propget, id(DISPID_TUNER_TS_FRIENDLYNAME), + helpstring("User-friendly name of the Tuning Space")] + HRESULT FriendlyName( + [out, retval] BSTR *Name + ); + + [propput, id(DISPID_TUNER_TS_FRIENDLYNAME), + helpstring("User-friendly name of the Tuning Space")] + HRESULT FriendlyName( + [in] BSTR Name + ); + + [propget, id(DISPID_TUNER_TS_CLSID), + helpstring("Returns the clsid of the tuning space implementation. provides script access to IPersist:GetClassID")] + HRESULT CLSID( + [out, retval] BSTR* SpaceCLSID + ); + + [propget, id(DISPID_TUNER_TS_NETWORKTYPE), + helpstring("Network Type (Network Proivder CLSID)")] + HRESULT NetworkType( + [out, retval] BSTR *NetworkTypeGuid + ); + [propput, id(DISPID_TUNER_TS_NETWORKTYPE), + helpstring("Network Type (Network Proivder CLSID)")] + HRESULT NetworkType( + [in] BSTR NetworkTypeGuid + ); + + [propget, id(DISPID_TUNER_TS__NETWORKTYPE), + helpstring("Network Type (Network Proivder CLSID)"), hidden, restricted] + HRESULT _NetworkType( + [out, retval] GUID* NetworkTypeGuid + ); + [propput, id(DISPID_TUNER_TS__NETWORKTYPE), + helpstring("Network Type (Network Proivder CLSID)"), hidden, restricted] + HRESULT _NetworkType( + [in] REFCLSID NetworkTypeGuid + ); + + [id(DISPID_TUNER_TS_CREATETUNEREQUEST), + helpstring("Create a Tune Request object")] + HRESULT CreateTuneRequest( + [out, retval] ITuneRequest **TuneRequest + ); + + [id(DISPID_TUNER_TS_ENUMCATEGORYGUIDS), hidden, restricted] + HRESULT EnumCategoryGUIDs( + [out, retval] IEnumGUID **ppEnum + ); + + [id(DISPID_TUNER_TS_ENUMDEVICEMONIKERS), hidden, restricted] + HRESULT EnumDeviceMonikers( + [out, retval] IEnumMoniker **ppEnum + ); + + [propget, id(DISPID_TUNER_TS_DEFAULTPREFERREDCOMPONENTTYPES)] + HRESULT DefaultPreferredComponentTypes( + [out, retval] IComponentTypes** ComponentTypes + ); + [propput, id(DISPID_TUNER_TS_DEFAULTPREFERREDCOMPONENTTYPES)] + HRESULT DefaultPreferredComponentTypes( + [in] IComponentTypes* NewComponentTypes + ); + + // the following property is for the network providers to store frequency/channel maps, frequency/transponder maps + // or whatever other mapping from carrier frequencies to frequency identifiers are appropriate for the tuning space + // in question. the bstr is treated as a binary blob. it is expected to contain embedded nulls, and it may be formatted + // internally in whatever fashion the network provider sees fit. + [propget, id(DISPID_TUNER_TS_FREQMAP), hidden, restricted] + HRESULT FrequencyMapping([out, retval] BSTR *pMapping); + [propput, id(DISPID_TUNER_TS_FREQMAP), hidden, restricted] + HRESULT FrequencyMapping(BSTR Mapping); + + // the following property provides a starting point for the initial IScanningTuner after installation + [propget, id(DISPID_TUNER_TS_DEFLOCATOR)] + HRESULT DefaultLocator([out, retval] ILocator **LocatorVal); + [propput, id(DISPID_TUNER_TS_DEFLOCATOR)] + HRESULT DefaultLocator([in]ILocator *LocatorVal); + + HRESULT Clone([out, retval] ITuningSpace **NewTS); + } + +////////////////////////////////////////////////////////////////////////////////////// + [ + hidden, + restricted, + object, + uuid(8B8EB248-FC2B-11d2-9D8C-00C04F72D980), + pointer_default(unique) + ] + interface IEnumTuningSpaces : IUnknown + { + HRESULT Next( + [in] ULONG celt, + [out, size_is(celt), length_is(*pceltFetched)] + ITuningSpace** rgelt, + [out] ULONG* pceltFetched + ); + + HRESULT Skip( + [in] ULONG celt + ); + + HRESULT Reset(void); + + HRESULT Clone( + [out] IEnumTuningSpaces** ppEnum + ); + } + +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + hidden, + nonextensible, + uuid(ADA0B268-3B19-4e5b-ACC4-49F852BE13BA), + pointer_default(unique) + ] + interface IDVBTuningSpace : ITuningSpace + { + [propget, id(DISPID_TUNER_TS_DVB_SYSTEMTYPE), + helpstring("Type of DVB System") + ] + HRESULT SystemType( + [out, retval] DVBSystemType *SysType + ); + [propput, id(DISPID_TUNER_TS_DVB_SYSTEMTYPE), + helpstring("Type of DVB System") + ] + HRESULT SystemType( + [in] DVBSystemType SysType + ); + + } + + +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + hidden, + nonextensible, + uuid(2A6E293C-2595-11d3-B64C-00C04F79498E), + pointer_default(unique) + ] + interface IAnalogTVTuningSpace : ITuningSpace + { + [propget, id(DISPID_TUNER_TS_ATV_MINCHANNEL), + helpstring("Smallest channel number ever provided by this tuning space") + ] + HRESULT MinChannel( + [out, retval] long *MinChannelVal + ); + [propput, id(DISPID_TUNER_TS_ATV_MINCHANNEL), + helpstring("Smallest channel number ever provided by this tuning space") + ] + HRESULT MinChannel( + [in] long NewMinChannelVal + ); + [propget, id(DISPID_TUNER_TS_ATV_MAXCHANNEL), + helpstring("Largest channel number ever provided by this tuning space") + ] + HRESULT MaxChannel( + [out, retval] long *MaxChannelVal + ); + [propput, id(DISPID_TUNER_TS_ATV_MAXCHANNEL), + helpstring("Largest channel number ever provided by this tuning space") + ] + HRESULT MaxChannel( + [in] long NewMaxChannelVal + ); + [propget, id(DISPID_TUNER_TS_ATV_INPUTTYPE), + helpstring("Input type for this tuning space") + ] + HRESULT InputType([out, retval] TunerInputType *InputTypeVal); + [propput, id(DISPID_TUNER_TS_ATV_INPUTTYPE), + helpstring("Input type for this tuning space") + ] + HRESULT InputType([in] TunerInputType NewInputTypeVal); + [propget, id(DISPID_TUNER_TS_ATV_COUNTRYCODE), + helpstring("International dialing prefix for country of physical broadcast source") + ] + HRESULT CountryCode([out, retval] long *CountryCodeVal); + [propput, id(DISPID_TUNER_TS_ATV_COUNTRYCODE), + helpstring("International dialing prefix for country of physical broadcast source") + ] + HRESULT CountryCode([in] long NewCountryCodeVal); + } + +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + hidden, + nonextensible, + uuid(0369B4E2-45B6-11d3-B650-00C04F79498E), + pointer_default(unique) + ] +// note: we inherit ATSC from analog because we need the same properties. +// - the definition of channel is overloaded to be the major channel, +// - input type allows us to distinguish between broadcast and cable frequencies +// which allows us to use the atsc tuning space class for "open cable". +// - country code will allow us to redefine physical channel frequencies +// if any other countries adopt ATSC which may happen in Latin America in particular. + interface IATSCTuningSpace : IAnalogTVTuningSpace + { + [propget, id(DISPID_TUNER_TS_ATSC_MINMINORCHANNEL), + helpstring("Smallest minor channel number ever provided by this tuning space") + ] + HRESULT MinMinorChannel( + [out, retval] long *MinMinorChannelVal + ); + [propput, id(DISPID_TUNER_TS_ATSC_MINMINORCHANNEL), + helpstring("Smallest minor channel number ever provided by this tuning space") + ] + HRESULT MinMinorChannel( + [in] long NewMinMinorChannelVal + ); + [propget, id(DISPID_TUNER_TS_ATSC_MAXMINORCHANNEL), + helpstring("Largest minor channel number ever provided by this tuning space") + ] + HRESULT MaxMinorChannel( + [out, retval] long *MaxMinorChannelVal + ); + [propput, id(DISPID_TUNER_TS_ATSC_MAXMINORCHANNEL), + helpstring("Largest minor channel number ever provided by this tuning space") + ] + HRESULT MaxMinorChannel( + [in] long NewMaxMinorChannelVal + ); + [propget, id(DISPID_TUNER_TS_ATSC_MINPHYSCHANNEL), + helpstring("Smallest physical channel number ever provided by this tuning space") + ] + HRESULT MinPhysicalChannel( + [out, retval] long *MinPhysicalChannelVal + ); + [propput, id(DISPID_TUNER_TS_ATSC_MINPHYSCHANNEL), + helpstring("Smallest physical channel number ever provided by this tuning space") + ] + HRESULT MinPhysicalChannel( + [in] long NewMinPhysicalChannelVal + ); + [propget, id(DISPID_TUNER_TS_ATSC_MAXPHYSCHANNEL), + helpstring("Largest physical channel number ever provided by this tuning space") + ] + HRESULT MaxPhysicalChannel( + [out, retval] long *MaxPhysicalChannelVal + ); + [propput, id(DISPID_TUNER_TS_ATSC_MAXPHYSCHANNEL), + helpstring("Largest physical channel number ever provided by this tuning space") + ] + HRESULT MaxPhysicalChannel( + [in] long NewMaxPhysicalChannelVal + ); + + } + +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + hidden, + nonextensible, + uuid(2A6E293B-2595-11d3-B64C-00C04F79498E), + pointer_default(unique) + ] + interface IAnalogRadioTuningSpace : ITuningSpace { + [propget, id(DISPID_TUNER_TS_AR_MINFREQUENCY), + helpstring("Smallest frequency(khz) ever used by this tuning space") + ] + HRESULT MinFrequency( + [out, retval] long *MinFrequencyVal + ); + [propput, id(DISPID_TUNER_TS_AR_MINFREQUENCY), + helpstring("Smallest frequency(khz) ever used by this tuning space") + ] + HRESULT MinFrequency( + [in] long NewMinFrequencyVal + ); + [propget, id(DISPID_TUNER_TS_AR_MAXFREQUENCY), + helpstring("Largest frequency(khz) ever used by this tuning space") + ] + HRESULT MaxFrequency( + [out, retval] long *MaxFrequencyVal + ); + [propput, id(DISPID_TUNER_TS_AR_MAXFREQUENCY), + helpstring("Largest frequency(khz) ever used by this tuning space") + ] + HRESULT MaxFrequency( + [in] long NewMaxFrequencyVal + ); + [propget, id(DISPID_TUNER_TS_AR_STEP), + helpstring("Default step value(khz) to next frequency for this tuning space") + ] + HRESULT Step( + [out, retval] long *StepVal + ); + [propput, id(DISPID_TUNER_TS_AR_STEP), + helpstring("Default step value(khz) to next frequency for this tuning space") + ] + HRESULT Step( + [in] long NewStepVal + ); + } + + +////////////////////////////////////////////////////////////////////////////////////// +// Tune Request Interfaces +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + nonextensible, + uuid(07DDC146-FC3D-11d2-9D8C-00C04F72D980), + dual, + oleautomation, + helpstring("Tune Request Interface"), + pointer_default(unique) + ] + interface ITuneRequest : IDispatch + { + [propget, id(DISPID_TUNER_TR_TUNINGSPACE), + helpstring("Tuning Space object")] + HRESULT TuningSpace( + [out, retval] ITuningSpace **TuningSpace + ); + [propget, id(DISPID_TUNER_TR_COMPONENTS), + helpstring("Components collection")] + HRESULT Components( + [out, retval] IComponents **Components + ); + [id(DISPID_TUNER_TR_CLONE), + helpstring("Create a new copy of this tune request")] + HRESULT Clone( + [out, retval] ITuneRequest **NewTuneRequest + ); + [propget, id(DISPID_TUNER_TR_LOCATOR), + helpstring("Locator Object")] + HRESULT Locator( + [out, retval] ILocator **Locator + ); + [propput, id(DISPID_TUNER_TR_LOCATOR), + helpstring("Locator Object")] + HRESULT Locator( + [in] ILocator *Locator + ); + } + +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + nonextensible, + uuid(0369B4E0-45B6-11d3-B650-00C04F79498E), + dual, + oleautomation, + helpstring("Channel Tune Request Interface"), + pointer_default(unique) + ] + interface IChannelTuneRequest : ITuneRequest + { + [propget, id(DISPID_CHTUNER_CTR_CHANNEL), + helpstring("Channel")] + HRESULT Channel( + [out, retval] long *Channel + ); + [propput, id(DISPID_CHTUNER_CTR_CHANNEL), + helpstring("Channel")] + HRESULT Channel( + [in] long Channel + ); + } + +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + nonextensible, + uuid(0369B4E1-45B6-11d3-B650-00C04F79498E), + dual, + oleautomation, + helpstring("ATSC Channel Tune Request Interface"), + pointer_default(unique) + ] + interface IATSCChannelTuneRequest : IChannelTuneRequest + { + [propget, id(DISPID_CHTUNER_ACTR_MINOR_CHANNEL), + helpstring("Minor Channel")] + HRESULT MinorChannel( + [out, retval] long *MinorChannel + ); + [propput, id(DISPID_CHTUNER_ACTR_MINOR_CHANNEL), + helpstring("Minor Channel")] + HRESULT MinorChannel( + [in] long MinorChannel + ); + } + +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + nonextensible, + uuid(0D6F567E-A636-42bb-83BA-CE4C1704AFA2), + dual, + oleautomation, + helpstring("DVB Tune Request Interface"), + pointer_default(unique) + ] + interface IDVBTuneRequest : ITuneRequest + { + [propget, id(DISPID_DVBTUNER_ONID), + helpstring("Original Network ID")] + HRESULT ONID( + [out, retval] long *ONID + ); + [propput, id(DISPID_DVBTUNER_ONID), + helpstring("Original Network ID")] + HRESULT ONID( + [in] long ONID + ); + [propget, id(DISPID_DVBTUNER_TSID), + helpstring("Transport Stream ID")] + HRESULT TSID( + [out, retval] long *TSID + ); + [propput, id(DISPID_DVBTUNER_TSID), + helpstring("Transport Stream ID")] + HRESULT TSID( + [in] long TSID + ); + [propget, id(DISPID_DVBTUNER_SID), + helpstring("Service ID")] + HRESULT SID( + [out, retval] long *SID + ); + [propput, id(DISPID_DVBTUNER_SID), + helpstring("Service ID")] + HRESULT SID( + [in] long SID + ); + } + +////////////////////////////////////////////////////////////////////////////////////// +// Tuner Interfaces +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + hidden, + nonextensible, + uuid(28C52640-018A-11d3-9D8E-00C04F72D980), + helpstring("Tuner Interface"), + pointer_default(unique) + ] + interface ITuner : IUnknown + { + [propget, helpstring("Tuning Space object")] + HRESULT TuningSpace( + [out, retval] ITuningSpace **TuningSpace + ); + + [propput, helpstring("Tuning Space object")] + HRESULT TuningSpace( + [in] ITuningSpace *TuningSpace + ); + + [hidden, restricted, helpstring("Returns an enumerator for Tuning Spaces accepted by this tuner")] + HRESULT EnumTuningSpaces( + [out, retval] IEnumTuningSpaces **ppEnum + ); + + [propget, helpstring("Tune Request object")] + HRESULT TuneRequest( + [out, retval] ITuneRequest **TuneRequest + ); + + [propput, helpstring("Tune Request object")] + HRESULT TuneRequest( + [in] ITuneRequest *TuneRequest + ); + + [helpstring("Validate the tuning request without tuning")] + HRESULT Validate( + [in] ITuneRequest *TuneRequest + ); + + [propget, helpstring("Preferred Component Types collection")] + HRESULT PreferredComponentTypes( + [out, retval] IComponentTypes **ComponentTypes + ); + + [propput, helpstring("Preferred Component Types collection")] + HRESULT PreferredComponentTypes( + [in] IComponentTypes *ComponentTypes + ); + + [propget, helpstring("Signal Strength")] + HRESULT SignalStrength( + [out, retval] long *Strength + ); + + [helpstring("Trigger Signal events (interval in milliseconds; 0 turns off trigger)")] + HRESULT TriggerSignalEvents( + [in] long Interval + ); + } + +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + hidden, + nonextensible, + uuid(1DFD0A5C-0284-11d3-9D8E-00C04F72D980), + helpstring("Scanning Tuner Interface"), + pointer_default(unique) + ] + interface IScanningTuner : ITuner + { + [helpstring("Seek to the next valid selection")] + HRESULT SeekUp( + ); + + [helpstring("Seek to the previous valid selection")] + HRESULT SeekDown( + ); + + [helpstring("Scan for valid selections upward")] + HRESULT ScanUp( + [in] long MillisecondsPause + ); + + [helpstring("Scan for valid selections downward")] + HRESULT ScanDown( + [in] long MillisecondsPause + ); + + [helpstring("Enter the device's autoprogram mode")] + HRESULT AutoProgram( + ); + }; + +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + hidden, + nonextensible, + uuid(68481420-0280-11d3-9D8E-00C04F72D980), + helpstring("Tuner Events Interface"), + pointer_default(unique) + ] + interface ITunerEvents : IUnknown + { + [helpstring("Reports a completed (or failed) tune operation")] + HRESULT OnTune( + [in] ITuneRequest **Request, + [in] long *Strength + ); + } + +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + hidden, + nonextensible, + uuid(85E2439E-0E23-11d3-9D8E-00C04F72D980), + helpstring("Signal Events Interface"), + pointer_default(unique) + ] + interface ISignalEvents : IUnknown + { + [helpstring("Reports the signal strength")] + HRESULT OnSignal( + [out] long *Strength + ); + } + +////////////////////////////////////////////////////////////////////////////////////// +// Component Type Interfaces +////////////////////////////////////////////////////////////////////////////////////// + + // Component Category + + [ + object, + hidden, + nonextensible, + uuid(6A340DC0-0311-11d3-9D8E-00C04F72D980), + dual, + oleautomation, + helpstring("Component Type Interface"), + pointer_default(unique) + ] + interface IComponentType : IDispatch + { + [propget, id(DISPID_TUNER_CT_CATEGORY), + helpstring("General category of component")] + HRESULT Category( + [out, retval] ComponentCategory *Category + ); + [propput, id(DISPID_TUNER_CT_CATEGORY), + helpstring("General category of component")] + HRESULT Category( + [in] ComponentCategory Category + ); + + [propget, id(DISPID_TUNER_CT_MEDIAMAJORTYPE), + helpstring("DirectShow MediaType Major Type Guid")] + HRESULT MediaMajorType( + [out, retval] BSTR *MediaMajorType + ); + [propput, id(DISPID_TUNER_CT_MEDIAMAJORTYPE), + helpstring("DirectShow MediaType Major Type Guid")] + HRESULT MediaMajorType( + [in] BSTR MediaMajorType + ); + [propget, id(DISPID_TUNER_CT__MEDIAMAJORTYPE), + helpstring("DirectShow MediaType Major Type Guid"), hidden, restricted] + HRESULT _MediaMajorType( + [out, retval] GUID* MediaMajorTypeGuid + ); + [propput, id(DISPID_TUNER_CT__MEDIAMAJORTYPE), + helpstring("DirectShow MediaType Major Type Guid"), hidden, restricted] + HRESULT _MediaMajorType( + [in] REFCLSID MediaMajorTypeGuid + ); + [propget, id(DISPID_TUNER_CT_MEDIASUBTYPE), + helpstring("DirectShow MediaType Sub Type Guid")] + HRESULT MediaSubType( + [out, retval] BSTR *MediaSubType + ); + [propput, id(DISPID_TUNER_CT_MEDIASUBTYPE), + helpstring("DirectShow MediaType Sub Type Guid")] + HRESULT MediaSubType( + [in] BSTR MediaSubType + ); + [propget, id(DISPID_TUNER_CT__MEDIASUBTYPE), + helpstring("DirectShow MediaType Sub Type Guid"), hidden, restricted] + HRESULT _MediaSubType( + [out, retval] GUID* MediaSubTypeGuid + ); + [propput, id(DISPID_TUNER_CT__MEDIASUBTYPE), + helpstring("DirectShow MediaType Sub Type Guid"), hidden, restricted] + HRESULT _MediaSubType( + [in] REFCLSID MediaSubTypeGuid + ); + [propget, id(DISPID_TUNER_CT_MEDIAFORMATTYPE), + helpstring("DirectShow MediaType Format Guid")] + HRESULT MediaFormatType( + [out, retval] BSTR *MediaFormatType + ); + [propput, id(DISPID_TUNER_CT_MEDIAFORMATTYPE), + helpstring("DirectShow MediaType Format Guid")] + HRESULT MediaFormatType( + [in] BSTR MediaFormatType + ); + [propget, id(DISPID_TUNER_CT__MEDIAFORMATTYPE), + helpstring("DirectShow MediaType Format Guid"), hidden, restricted] + HRESULT _MediaFormatType( + [out, retval] GUID* MediaFormatTypeGuid + ); + [propput, id(DISPID_TUNER_CT__MEDIAFORMATTYPE), + helpstring("DirectShow MediaType Format Guid"), hidden, restricted] + HRESULT _MediaFormatType( + [in] REFCLSID MediaFormatTypeGuid + ); + + [propget, id(DISPID_TUNER_CT_MEDIATYPE), hidden, restricted, + helpstring("DirectShow MediaType Guid, this only retrieves major, sub, format guids not the entire struct")] + HRESULT MediaType( + [out, retval] AM_MEDIA_TYPE *MediaType + ); + [propput, id(DISPID_TUNER_CT_MEDIATYPE), hidden, restricted, + helpstring("DirectShow MediaType Guid, this only retrieves major, sub, format guids not the entire struct")] + HRESULT MediaType( + [in] AM_MEDIA_TYPE *MediaType + ); + + [id(DISPID_TUNER_CT_CLONE), + helpstring("Create a copy of this component type")] + HRESULT Clone( + [out, retval] IComponentType **NewCT + ); + }; + +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + hidden, + nonextensible, + uuid(B874C8BA-0FA2-11d3-9D8E-00C04F72D980), + dual, + oleautomation, + helpstring("Language Component Type Interface"), + pointer_default(unique) + ] + interface ILanguageComponentType : IComponentType + { + [propget, id(DISPID_TUNER_LCT_LANGID), + helpstring("Language Identifier for Substream Content Language")] + HRESULT LangID( + [out, retval] long *LangID + ); + + [propput, id(DISPID_TUNER_LCT_LANGID), + helpstring("Language Identifier for Substream Content Language")] + HRESULT LangID( + [in] long LangID + ); + }; + +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + hidden, + nonextensible, + uuid(2C073D84-B51C-48c9-AA9F-68971E1F6E38), + dual, + oleautomation, + helpstring("MPEG2 Component Type Interface"), + pointer_default(unique) + ] + interface IMPEG2ComponentType : ILanguageComponentType + { + [propget, id(DISPID_TUNER_MP2CT_TYPE), + helpstring("MPEG2 Stream Type")] + HRESULT StreamType( + [out, retval] MPEG2StreamType *MP2StreamType + ); + + [propput, id(DISPID_TUNER_MP2CT_TYPE), + helpstring("MPEG2 Stream Type")] + HRESULT StreamType( + [in] MPEG2StreamType MP2StreamType + ); + }; + +////////////////////////////////////////////////////////////////////////////////////// + + [ + object, + hidden, + nonextensible, + uuid(FC189E4D-7BD4-4125-B3B3-3A76A332CC96), + dual, + oleautomation, + helpstring("ATSC Component Type Interface"), + pointer_default(unique) + ] + interface IATSCComponentType : IMPEG2ComponentType + { + [propget, id(DISPID_TUNER_ATSCCT_FLAGS), + helpstring("ATSC Component Type Flags")] + HRESULT Flags( + [out, retval] long *Flags + ); + + [propput, id(DISPID_TUNER_ATSCCT_FLAGS), + helpstring("ATSC Component Type Flags")] + HRESULT Flags( + [in] long flags + ); + }; + +////////////////////////////////////////////////////////////////////////////////////// + [ + hidden, restricted, + object, + uuid(8A674B4A-1F63-11d3-B64C-00C04F79498E), + pointer_default(unique) + ] + interface IEnumComponentTypes : IUnknown + { + HRESULT Next( + [in] ULONG celt, + [out, size_is(celt), length_is(*pceltFetched)] + IComponentType** rgelt, + [out] ULONG* pceltFetched + ); + + HRESULT Skip( + [in] ULONG celt + ); + + HRESULT Reset(void); + + HRESULT Clone( + [out] IEnumComponentTypes** ppEnum + ); + } + + +////////////////////////////////////////////////////////////////////////////////////// +// Component Type Container +////////////////////////////////////////////////////////////////////////////////////// + + [ + object, + hidden, + nonextensible, + uuid(0DC13D4A-0313-11d3-9D8E-00C04F72D980), + dual, + oleautomation, + helpstring("ComponentType Collection Interface"), + pointer_default(unique) + ] + interface IComponentTypes : IDispatch + { + [propget, helpstring("Number of items in the collection")] + HRESULT Count( + [out, retval] long *Count + ); + + [propget, id(DISPID_NEWENUM), hidden, restricted] + HRESULT _NewEnum( + [out, retval] IEnumVARIANT **ppNewEnum + ); + + [hidden, restricted, helpstring("Convenience Function for Use with C")] + HRESULT EnumComponentTypes( + [out, retval] IEnumComponentTypes **ppNewEnum + ); + + [id(DISPID_VALUE), + propget, + helpstring("Get the ComponentType at the specified index")] + HRESULT Item( + [in] VARIANT Index, + [out, retval] IComponentType **ComponentType + ); + + [id(DISPID_VALUE), + propput, + helpstring("Get the ComponentType at the specified index")] + HRESULT Item( + [in] VARIANT Index, + [in] IComponentType *ComponentType + ); + + [id(DISPID_ADDITEM), + helpstring("Append the ComponentType to the collection")] + HRESULT Add( + [in] IComponentType *ComponentType, + [out, retval] VARIANT *NewIndex + ); + + [id(DISPID_REMOVEITEM), + helpstring("Clear the collection")] + HRESULT Remove( + [in] VARIANT Index + ); + + [helpstring("Copy the collection")] + HRESULT Clone([out, retval] IComponentTypes **NewList); + }; + +////////////////////////////////////////////////////////////////////////////////////// +// Component Interfaces +////////////////////////////////////////////////////////////////////////////////////// + + [ + object, + nonextensible, + uuid(1A5576FC-0E19-11d3-9D8E-00C04F72D980), + dual, + oleautomation, + helpstring("Component Interface"), + pointer_default(unique) + ] + interface IComponent : IDispatch + { + [propget, id(DISPID_TUNER_C_TYPE), + helpstring("Component Type")] + HRESULT Type( + [out, retval] IComponentType** CT + ); + + // only loaders initialize components + [hidden, restricted, propput, id(DISPID_TUNER_C_TYPE), + helpstring("Component Type")] + HRESULT Type( + [in] IComponentType* CT + ); + + // NOTE: this langid is *not* the same as the langid + // in the componenttype(if the componenttype is a languagecomponenttype) + // the langid in the component type is the language of the content this + // component is describing. the following langid in the component is the + // language of the descriptive info in the component object. + [propget, id(DISPID_TUNER_C_LANGID), + helpstring("Language Identifier for Description Language")] + HRESULT DescLangID( + [out, retval] long *LangID + ); + + [propput, id(DISPID_TUNER_C_LANGID), + helpstring("Language Identifier for Description Language")] + HRESULT DescLangID( + [in] long LangID + ); + + [propget, id(DISPID_TUNER_C_STATUS), + helpstring("Component Status")] + HRESULT Status( + [out, retval] ComponentStatus *Status + ); + + [propput, id(DISPID_TUNER_C_STATUS), + helpstring("Component Status")] + HRESULT Status( + [in] ComponentStatus Status + ); + + [propget, id(DISPID_TUNER_C_DESCRIPTION), + helpstring("Component Description")] + HRESULT Description( + [out, retval] BSTR *Description + ); + + // restricted: only loaders will initialize components + [hidden, restricted, propput, id(DISPID_TUNER_C_DESCRIPTION), + helpstring("Component Description")] + HRESULT Description( + [in] BSTR Description + ); + + [id(DISPID_TUNER_C_CLONE), + helpstring("Copy Component")] + HRESULT Clone( + [out, retval] IComponent **NewComponent + ); + + }; + +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + nonextensible, + uuid(1493E353-1EB6-473c-802D-8E6B8EC9D2A9), + dual, + oleautomation, + helpstring("MPEG2 Component Interface"), + pointer_default(unique) + ] + interface IMPEG2Component : IComponent + { + [propget, id(DISPID_TUNER_C_MP2_PID), + helpstring("MPEG2 Packet ID for this Substream")] + HRESULT PID( + [out, retval] long *PID + ); + + [propput, id(DISPID_TUNER_C_MP2_PID), + helpstring("MPEG2 Packet ID for this Substream")] + HRESULT PID( + [in] long PID + ); + [propget, id(DISPID_TUNER_C_MP2_PCRPID), + helpstring("MPEG2 Packet ID for this Substream's Timestamps")] + HRESULT PCRPID( + [out, retval] long *PCRPID + ); + + [propput, id(DISPID_TUNER_C_MP2_PCRPID), + helpstring("MPEG2 Packet ID for this Substream's Timestamps")] + HRESULT PCRPID( + [in] long PCRPID + ); + + // program number provides reverse lookup to PAT + [propget, id(DISPID_TUNER_C_MP2_PROGNO), + helpstring("MPEG2 Program Number")] + HRESULT ProgramNumber( + [out, retval] long *ProgramNumber + ); + + [propput, id(DISPID_TUNER_C_MP2_PROGNO), + helpstring("MPEG2 Program Number")] + HRESULT ProgramNumber( + [in] long ProgramNumber + ); + }; + +////////////////////////////////////////////////////////////////////////////////////// + [ + hidden, restricted, + object, + uuid(2A6E2939-2595-11d3-B64C-00C04F79498E), + pointer_default(unique) + ] + interface IEnumComponents : IUnknown + { + HRESULT Next( + [in] ULONG celt, + [out, size_is(celt), length_is(*pceltFetched)] + IComponent** rgelt, + [out] ULONG* pceltFetched + ); + + HRESULT Skip( + [in] ULONG celt + ); + + HRESULT Reset(void); + + HRESULT Clone( + [out] IEnumComponents** ppEnum + ); + } + + +////////////////////////////////////////////////////////////////////////////////////// +// Component Container +////////////////////////////////////////////////////////////////////////////////////// + + [ + object, + nonextensible, + uuid(FCD01846-0E19-11d3-9D8E-00C04F72D980), + dual, + oleautomation, + helpstring("Component Collection Interface"), + pointer_default(unique) + ] + interface IComponents : IDispatch + { + [propget, helpstring("Number of items in the collection")] + HRESULT Count( + [out, retval] long *Count + ); + + [propget, id(DISPID_NEWENUM), hidden, restricted] + HRESULT _NewEnum( + [out, retval] IEnumVARIANT **ppNewEnum + ); + + [hidden, restricted, helpstring("Convenience Function for Use with C")] + HRESULT EnumComponents( + [out, retval] IEnumComponents **ppNewEnum + ); + + [id(DISPID_VALUE), + propget, + helpstring("Get the Component at the specified index")] + HRESULT Item( + [in] VARIANT Index, + [out, retval] IComponent **ppComponent + ); + + [id(DISPID_ADDITEM), + helpstring("Add the Component to the collection")] + HRESULT Add( + [in] IComponent *Component, + [out, retval] VARIANT *NewIndex + ); + + [id(DISPID_REMOVEITEM), + helpstring("Remove the Component at the specified index")] + HRESULT Remove( + [in] VARIANT Index + ); + + [helpstring("Copy the collection")] + HRESULT Clone([out, retval] IComponents **NewList); + }; + +////////////////////////////////////////////////////////////////////////////////////// +// Component Container +////////////////////////////////////////////////////////////////////////////////////// +// this separates the what(general tune request properties) from the where + + + + [ + object, + nonextensible, + uuid(286D7F89-760C-4F89-80C4-66841D2507AA), + dual, + oleautomation, + helpstring("Generic Locator Information"), + pointer_default(unique) + ] + interface ILocator : IDispatch + { + + [propget, id(DISPID_TUNER_L_CARRFREQ), helpstring("Carrier Frequency(DecaHertz)")] + HRESULT CarrierFrequency( + [out, retval] long* Frequency + ); + [propput, id(DISPID_TUNER_L_CARRFREQ), helpstring("Carrier Frequency(DecaHertz)")] + HRESULT CarrierFrequency( + [in] long Frequency + ); + [propget, id(DISPID_TUNER_L_INNERFECMETHOD), helpstring("Inner Fec Type")] + HRESULT InnerFEC( + [out, retval] FECMethod* FEC + ); + [propput, id(DISPID_TUNER_L_INNERFECMETHOD), helpstring("Inner Fec Type")] + HRESULT InnerFEC( + [in] FECMethod FEC + ); + [propget, id(DISPID_TUNER_L_INNERFECRATE), helpstring("Inner Fec Rate")] + HRESULT InnerFECRate( + [out, retval] BinaryConvolutionCodeRate* FEC + ); + [propput, id(DISPID_TUNER_L_INNERFECRATE), helpstring("Inner Fec Rate")] + HRESULT InnerFECRate( + [in] BinaryConvolutionCodeRate FEC + ); + [propget, id(DISPID_TUNER_L_OUTERFECMETHOD), helpstring("Outer Fec Type")] + HRESULT OuterFEC( + [out, retval] FECMethod* FEC + ); + [propput, id(DISPID_TUNER_L_OUTERFECMETHOD), helpstring("Outer Fec Type")] + HRESULT OuterFEC( + [in] FECMethod FEC + ); + [propget, id(DISPID_TUNER_L_OUTERFECRATE), helpstring("Outer Fec Rate")] + HRESULT OuterFECRate( + [out, retval] BinaryConvolutionCodeRate* FEC + ); + [propput, id(DISPID_TUNER_L_OUTERFECRATE), helpstring("Outer Fec Rate")] + HRESULT OuterFECRate( + [in] BinaryConvolutionCodeRate FEC + ); + [propget, id(DISPID_TUNER_L_MOD), helpstring("Modulation Type")] + HRESULT Modulation( + [out, retval] ModulationType* Modulation + ); + [propput, id(DISPID_TUNER_L_MOD), helpstring("Modulation Type")] + HRESULT Modulation( + [in] ModulationType Modulation + ); + [propget, id(DISPID_TUNER_L_SYMRATE), helpstring("Modulation Symbol Rate")] + HRESULT SymbolRate( + [out, retval] long* Rate + ); + [propput, id(DISPID_TUNER_L_SYMRATE), helpstring("Modulation Symbol Rate")] + HRESULT SymbolRate( + [in] long Rate + ); + [id(DISPID_TUNER_L_CLONE), helpstring("Copy the Locator")] + HRESULT Clone([out, retval] ILocator **NewLocator); + }; + +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + hidden, + nonextensible, + uuid(BF8D986F-8C2B-4131-94D7-4D3D9FCC21EF), + dual, + oleautomation, + helpstring("ATSC Locator Information"), + pointer_default(unique) + ] + interface IATSCLocator : ILocator + { + [propget, id(DISPID_TUNER_L_ATSC_PHYS_CHANNEL), + helpstring("Physical Channel")] + HRESULT PhysicalChannel( + [out, retval] long *PhysicalChannel + ); + [propput, id(DISPID_TUNER_L_ATSC_PHYS_CHANNEL), + helpstring("Physical Channel")] + HRESULT PhysicalChannel( + [in] long PhysicalChannel + ); + [propget, id(DISPID_TUNER_L_ATSC_TSID), + helpstring("Transport Stream ID")] + HRESULT TSID( + [out, retval] long *TSID + ); + [propput, id(DISPID_TUNER_L_ATSC_TSID), + helpstring("Transport Stream ID")] + HRESULT TSID( + [in] long TSID + ); + }; + +////////////////////////////////////////////////////////////////////////////////////// + + [ + object, + hidden, + nonextensible, + uuid(8664DA16-DDA2-42ac-926A-C18F9127C302), + dual, + oleautomation, + helpstring("DVB Terrestrial Locator Information"), + pointer_default(unique) + ] + interface IDVBTLocator : ILocator + { + [propget, id(DISPID_TUNER_L_DVBT_BANDWIDTH), helpstring("Bandwidth")] + HRESULT Bandwidth( + [out, retval] long* BandWidthVal + ); + [propput, id(DISPID_TUNER_L_DVBT_BANDWIDTH), helpstring("Bandwidth")] + HRESULT Bandwidth( + [in] long BandwidthVal + ); + + [propget, id(DISPID_TUNER_L_DVBT_LPINNERFECMETHOD), helpstring("Inner Fec Type for Low Priority Stream")] + HRESULT LPInnerFEC( + [out, retval] FECMethod* FEC + ); + [propput, id(DISPID_TUNER_L_DVBT_LPINNERFECMETHOD), helpstring("Inner Fec Type for Low Priority Stream")] + HRESULT LPInnerFEC( + [in] FECMethod FEC + ); + [propget, id(DISPID_TUNER_L_DVBT_LPINNERFECRATE), helpstring("Inner Fec Rate for Low Priority Stream")] + HRESULT LPInnerFECRate( + [out, retval] BinaryConvolutionCodeRate* FEC + ); + [propput, id(DISPID_TUNER_L_DVBT_LPINNERFECRATE), helpstring("Inner Fec Rate for Low Priority Stream")] + HRESULT LPInnerFECRate( + [in] BinaryConvolutionCodeRate FEC + ); + [propget, id(DISPID_TUNER_L_DVBT_HALPHA), helpstring("Hierarchical Alpha")] + HRESULT HAlpha( + [out, retval] HierarchyAlpha* Alpha + ); + [propput, id(DISPID_TUNER_L_DVBT_HALPHA), helpstring("Hierarchical Alpha")] + HRESULT HAlpha( + [in] HierarchyAlpha Alpha + ); + [propget, id(DISPID_TUNER_L_DVBT_GUARDINTERVAL), helpstring("Guard Interval")] + HRESULT Guard( + [out, retval] GuardInterval* GI + ); + [propput, id(DISPID_TUNER_L_DVBT_GUARDINTERVAL), helpstring("Guard Interval")] + HRESULT Guard( + [in] GuardInterval GI + ); + [propget, id(DISPID_TUNER_L_DVBT_TRANSMISSIONMODE), helpstring("Transmission Mode")] + HRESULT Mode( + [out, retval] TransmissionMode* mode + ); + [propput, id(DISPID_TUNER_L_DVBT_TRANSMISSIONMODE), helpstring("Transmission Mode")] + HRESULT Mode( + [in] TransmissionMode mode + ); + [propget, id(DISPID_TUNER_L_DVBT_INUSE), helpstring("Hierarchical Alpha")] + HRESULT OtherFrequencyInUse( + [out, retval] VARIANT_BOOL* OtherFrequencyInUseVal + ); + [propput, id(DISPID_TUNER_L_DVBT_INUSE), helpstring("Hierarchical Alpha")] + HRESULT OtherFrequencyInUse( + [in] VARIANT_BOOL OtherFrequencyInUseVal + ); + }; + +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + hidden, + nonextensible, + uuid(3D7C353C-0D04-45f1-A742-F97CC1188DC8), + dual, + oleautomation, + helpstring("DVB Satellite Locator Information"), + pointer_default(unique) + ] + interface IDVBSLocator : ILocator + { + + [propget, id(DISPID_TUNER_L_DVBS_POLARISATION), helpstring("Signal Polarisation Type")] + HRESULT SignalPolarisation( + [out, retval] Polarisation* PolarisationVal + ); + [propput, id(DISPID_TUNER_L_DVBS_POLARISATION), helpstring("Signal Polarisation Type")] + HRESULT SignalPolarisation( + [in] Polarisation PolarisationVal + ); + [propget, id(DISPID_TUNER_L_DVBS_WEST), helpstring("VARIANT_TRUE means orbital position specifies west longitude")] + HRESULT WestPosition( + [out, retval] VARIANT_BOOL* WestLongitude + ); + [propput, id(DISPID_TUNER_L_DVBS_WEST), helpstring("VARIANT_TRUE means orbital position specifies west longitude")] + HRESULT WestPosition( + [in] VARIANT_BOOL WestLongitude + ); + [propget, id(DISPID_TUNER_L_DVBS_ORBITAL), helpstring("Longitude in tenths of a degree")] + HRESULT OrbitalPosition( + [out, retval] long* longitude + ); + [propput, id(DISPID_TUNER_L_DVBS_ORBITAL), helpstring("Longitude in tenths of a degree")] + HRESULT OrbitalPosition( + [in] long longitude + ); + [propget, id(DISPID_TUNER_L_DVBS_AZIMUTH), helpstring("Azimuth in tenths of a degree")] + HRESULT Azimuth( + [out, retval] long* Azimuth + ); + [propput, id(DISPID_TUNER_L_DVBS_AZIMUTH), helpstring("Azimuth in tenths of a degree")] + HRESULT Azimuth( + [in] long Azimuth + ); + [propget, id(DISPID_TUNER_L_DVBS_ELEVATION), helpstring("Elevation in tenths of a degree")] + HRESULT Elevation( + [out, retval] long* Elevation + ); + [propput, id(DISPID_TUNER_L_DVBS_ELEVATION), helpstring("Elevation in tenths of a degree")] + HRESULT Elevation( + [in] long Elevation + ); + }; + +////////////////////////////////////////////////////////////////////////////////////// + [ + object, + hidden, + nonextensible, + uuid(6E42F36E-1DD2-43c4-9F78-69D25AE39034), + dual, + oleautomation, + helpstring("DVB Cable Locator Information"), + pointer_default(unique) + ] + interface IDVBCLocator : ILocator + { + }; + +////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////////// +// TYPELIB & CoClasses +////////////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////////////// +[ + uuid(9B085638-018E-11d3-9D8E-00C04F72D980), + version(1.0), + helpstring("Microsoft Tuner 1.0 Type Library") +] +library TunerLib +{ + importlib("stdole2.tlb"); + + // SystemTuningSpaces class + [ + uuid(D02AAC50-027E-11d3-9D8E-00C04F72D980), + helpstring("SystemTuningSpace Class") + ] + coclass SystemTuningSpaces + { + [default] interface ITuningSpaceContainer; + }; + + // NOTE: there is no object factory for this class. the implementation for the underlying + // code is a c++ abstract base class. this coclass is only provided here to + // force vb to expose the base interface to enable polymorphic access to + // derived objects + [ + hidden, restricted, + uuid(5FFDC5E6-B83A-4b55-B6E8-C69E765FE9DB), + helpstring("dummy class to expose base tuning space i/f to VB") + ] + coclass TuningSpace + { + [default] interface ITuningSpace; + }; + + + [ + uuid(A2E30750-6C3D-11d3-B653-00C04F79498E), + helpstring("ATSC Digital Broadcast Tuning Space Class") + ] + coclass ATSCTuningSpace + { + [default] interface IATSCTuningSpace; + }; + + [ + uuid(8A674B4C-1F63-11d3-B64C-00C04F79498E), + helpstring("Analog Radio Tuning Space Class") + ] + coclass AnalogRadioTuningSpace + { + [default] interface IAnalogRadioTuningSpace; + }; + + [ + uuid(8A674B4D-1F63-11d3-B64C-00C04F79498E), + helpstring("Analog TV Tuning Space Class") + ] + coclass AnalogTVTuningSpace + { + [default] interface IAnalogTVTuningSpace; + }; + + [ + uuid(C6B14B32-76AA-4a86-A7AC-5C79AAF58DA7), + helpstring("DVB Tuning Space Class") + ] + coclass DVBTuningSpace + { + [default] interface IDVBTuningSpace; + }; + + + + // ComponentTypes container class + [ + uuid(A1A2B1C4-0E3A-11d3-9D8E-00C04F72D980), + helpstring("Component Types Collection Class") + ] + coclass ComponentTypes + { + [default] interface IComponentTypes; + }; + + // ComponentType class + [ + uuid(823535A0-0318-11d3-9D8E-00C04F72D980), + helpstring("ComponentType Class") + ] + coclass ComponentType + { + [default] interface IComponentType; + }; + + // Language ComponentType class + [ + uuid(1BE49F30-0E1B-11d3-9D8E-00C04F72D980), + helpstring("LanguageComponentType Class") + ] + coclass LanguageComponentType + { + [default] interface ILanguageComponentType; + }; + + // MPEG2 ComponentType class + [ + uuid(418008F3-CF67-4668-9628-10DC52BE1D08), + helpstring("MPEG2ComponentType Class") + ] + coclass MPEG2ComponentType + { + [default] interface IMPEG2ComponentType; + }; + + // ATSC ComponentType class + [ + uuid(A8DCF3D5-0780-4ef4-8A83-2CFFAACB8ACE), + helpstring("ATSCComponentType Class") + ] + coclass ATSCComponentType + { + [default] interface IATSCComponentType; + }; + + // Components class + [ + hidden, restricted, + uuid(809B6661-94C4-49e6-B6EC-3F0F862215AA), + helpstring("Components Collection Class") + ] + coclass Components + { + [default] interface IComponents; + }; + + // Component class + // the components can only be created by network provider/tif. client apps + // retrieve them from a filled-in tune request by either loading a persisted tune + // request that has been filled in by a proper guide store loader or by re-getting + // the current tune request property which will have this filled in by the network + // provider + [ + hidden, restricted, + uuid(59DC47A8-116C-11d3-9D8E-00C04F72D980), + helpstring("Component Class") + ] + coclass Component + { + [default] interface IComponent; + }; + + // MPEG2 Component class + [ + hidden, restricted, + uuid(055CB2D7-2969-45cd-914B-76890722F112), + helpstring("MPEG2 Component Class") + ] + coclass MPEG2Component + { + [default] interface IMPEG2Component; + }; + + + // NOTE: there is no object factory for this class. the implementation for the underlying + // code is a c++ abstract base class. this coclass is only provided here to + // force vb to expose the base interface to enable polymorphic access to + // derived objects + [ + hidden, restricted, + uuid(B46E0D38-AB35-4a06-A137-70576B01B39F), + helpstring("dummy class to expose base tune request i/f to VB") + ] + coclass TuneRequest + { + [default] interface ITuneRequest; + }; + + + // NOTE: the tuning request factories should not be invoked directly. + // instead apps should use ITuningSpace::CreateTuningRequest to obtain a correctly + // initialized tuning request of the appropriate type for that space. + // the object factories are provided to allow generic code to a load a previously persisted + // tune request object. + [ + hidden, + restricted, + uuid(0369B4E5-45B6-11d3-B650-00C04F79498E), + helpstring("Channel Tune Request") + ] + coclass ChannelTuneRequest + { + [default] interface IChannelTuneRequest; + }; + + [ + hidden, + restricted, + uuid(0369B4E6-45B6-11d3-B650-00C04F79498E), + helpstring("ATSC Channel Tune Request") + ] + coclass ATSCChannelTuneRequest + { + [default] interface IATSCChannelTuneRequest; + }; + + + // NOTE: there is no object factory for this class. the implementation for the underlying + // code is a c++ abstract base class. this coclass is only provided here to + // force vb to expose the base interface to enable polymorphic access to + // derived objects + [ + hidden, restricted, + uuid(0888C883-AC4F-4943-B516-2C38D9B34562), + helpstring("dummy class to expose base locator i/f to VB") + ] + coclass Locator + { + [default] interface ILocator; + }; + + // its not intended that client apps actually create locators. the network + // provider in combination with the transport information filter(TIF) are the + // only modules in the system that actually know the correct values for these objects + // however, for testing purposes, its necessary to allow these to be created. + // instead, normally these will simply be passed around opaquely since they're a + // property of the base tune request interface. + [ + uuid(8872FF1B-98FA-4d7a-8D93-C9F1055F85BB), + helpstring("ATSC Locator") + ] + coclass ATSCLocator + { + [default] interface IATSCLocator; + }; + + [ + uuid(9CD64701-BDF3-4d14-8E03-F12983D86664), + helpstring("DVB-Terrestrial Locator") + ] + coclass DVBTLocator + { + [default] interface IDVBTLocator; + }; + + [ + uuid(1DF7D126-4050-47f0-A7CF-4C4CA9241333), + helpstring("DVB-Satellite Locator") + ] + coclass DVBSLocator + { + [default] interface IDVBSLocator; + }; + + [ + uuid(C531D9FD-9685-4028-8B68-6E1232079F1E), + helpstring("DVB-Cable Locator") + ] + coclass DVBCLocator + { + [default] interface ILocator; + }; + + [ + hidden, + restricted, + uuid(15D6504A-5494-499c-886C-973C9E53B9F1), + helpstring("DVB Tune Request") + ] + coclass DVBTuneRequest + { + [default] interface IDVBTuneRequest; + }; + +// Sample tuner class definition: +// +// [ +// uuid(), +// helpstring("My Tuner object") +// ] +// coclass MyTuner +// { +// [default] interface ITuner; +// interface IMyTunerCustomFeatureInterface; +// [default, source] interface ITunerEvents; +// [source] interface ISignalEvents; +// }; + +/////////////////////////////////////////////////////////////////////////////////////// +// utility objects +/////////////////////////////////////////////////////////////////////////////////////// + [ + hidden, restricted, + uuid(8A674B49-1F63-11d3-B64C-00C04F79498E), + helpstring("Create property bag backed by registry") + ] + coclass CreatePropBagOnRegKey + { + interface ICreatePropBagOnRegKey; + }; + +} + +// end of file -- tuner.idl diff --git a/windows_libs/mssdk/include/DShowIDL/videoacc.idl b/windows_libs/mssdk/include/DShowIDL/videoacc.idl new file mode 100644 index 00000000..5927fa18 --- /dev/null +++ b/windows_libs/mssdk/include/DShowIDL/videoacc.idl @@ -0,0 +1,172 @@ +//------------------------------------------------------------------------------ +// File: VideoAcc.idl +// +// Desc: An interface exposed by the overlay mixer to help decode samples +// using hardware video acceleration. +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +import "unknwn.idl"; + +cpp_quote("//") +cpp_quote("// The following declarations within the 'if 0' block are dummy typedefs used to make") +cpp_quote("// the motncomp.idl file build. The actual definitions are contained in ddraw.h and amva.h") +cpp_quote("//") +cpp_quote("#if 0") + +typedef void* LPVOID; +typedef void* LPGUID; +typedef void* LPDIRECTDRAWSURFACE; +typedef void* LPDDPIXELFORMAT; +typedef void* LPAMVAInternalMemInfo; +typedef void AMVAUncompDataInfo; +typedef void* LPAMVACompBufferInfo; +typedef void AMVABUFFERINFO; +typedef void AMVAEndFrameInfo; +typedef void* LPAMVAUncompBufferInfo; +typedef void AMVABeginFrameInfo; +typedef IUnknown* IMediaSample; + +cpp_quote("#endif") +cpp_quote("#include ") +cpp_quote("#include ") + + +[ + local, + object, + uuid(256A6A21-FBAD-11d1-82BF-00A0C9696C8F), + helpstring("IAMVideoAcceleratorNotify Interface"), + pointer_default(unique) +] + +// IAMVideoAcceleratorNotify +interface IAMVideoAcceleratorNotify : IUnknown +{ + // get information necessary to allocate uncompressed data buffers + // which is not part of the mediatype format (like how many buffers to allocate etc) + HRESULT GetUncompSurfacesInfo([in] const GUID *pGuid, [in] [out] LPAMVAUncompBufferInfo pUncompBufferInfo); + + // set information regarding allocated uncompressed data buffers + HRESULT SetUncompSurfacesInfo([in] DWORD dwActualUncompSurfacesAllocated); + + // get information necessary to create video accelerator object. It is the caller's responsibility + // to call CoTaskMemFree() on *ppMiscData + HRESULT GetCreateVideoAcceleratorData([in] const GUID *pGuid, [out] LPDWORD pdwSizeMiscData, [out] LPVOID *ppMiscData); +}; + +[ + local, + object, + uuid(256A6A22-FBAD-11d1-82BF-00A0C9696C8F), + helpstring("IAMVideoAccelerator Interface"), + pointer_default(unique) +] + +// IAMVideoAccelerator +interface IAMVideoAccelerator : IUnknown +{ + // pdwNumGuidsSupported is an IN OUT paramter + // pGuidsSupported is an IN OUT paramter + // if pGuidsSupported is NULL, pdwNumGuidsSupported should return back with the + // number of uncompressed pixel formats supported + // Otherwise pGuidsSupported is an array of *pdwNumGuidsSupported structures + HRESULT GetVideoAcceleratorGUIDs([in] [out] LPDWORD pdwNumGuidsSupported, [in] [out] LPGUID pGuidsSupported); + + // pGuid is an IN parameter + // pdwNumFormatsSupported is an IN OUT paramter + // pFormatsSupported is an IN OUT paramter (caller should make sure to set the size of EACH struct) + // if pFormatsSupported is NULL, pdwNumFormatsSupported should return back with + // the number of uncompressed pixel formats supported + // Otherwise pFormatsSupported is an array of *pdwNumFormatsSupported structures + HRESULT GetUncompFormatsSupported( [in] const GUID *pGuid, [in] [out] LPDWORD pdwNumFormatsSupported, + [in] [out] LPDDPIXELFORMAT pFormatsSupported); + + // pGuid is an IN parameter + // pamvaUncompDataInfo is an IN parameter + // pamvaInternalMemInfo is an IN OUT parameter (caller should make sure to set the size of struct) + // currently only gets info about how much scratch memory will the hal allocate for its private use + HRESULT GetInternalMemInfo([in] const GUID *pGuid, [in] const AMVAUncompDataInfo *pamvaUncompDataInfo, + [in] [out] LPAMVAInternalMemInfo pamvaInternalMemInfo); + + // pGuid is an IN parameter + // pamvaUncompDataInfo is an IN parameter + // pdwNumTypesCompBuffers is an IN OUT paramter + // pamvaCompBufferInfo is an IN OUT paramter (caller should make sure to set the size of EACH struct) + // if pamvaCompBufferInfo is NULL, pdwNumTypesCompBuffers should return back with the number of types of + // compressed buffers + // Otherwise pamvaCompBufferInfo is an array of *pdwNumTypesCompBuffers structures + HRESULT GetCompBufferInfo([in] const GUID *pGuid, [in] const AMVAUncompDataInfo *pamvaUncompDataInfo, + [in] [out] LPDWORD pdwNumTypesCompBuffers, [out] LPAMVACompBufferInfo pamvaCompBufferInfo); + + + // pdwNumTypesCompBuffers is an IN OUT paramter + // pamvaCompBufferInfo is an IN OUT paramter (caller should make sure to set the size of EACH struct) + // if pamvaCompBufferInfo is NULL, pdwNumTypesCompBuffers should return back with the number of types of + // compressed buffers + // Otherwise pamvaCompBufferInfo is an array of *pdwNumTypesCompBuffers structures + // only valid to call this after the pins are connected + HRESULT GetInternalCompBufferInfo([in] [out] LPDWORD pdwNumTypesCompBuffers, [out] LPAMVACompBufferInfo pamvaCompBufferInfo); + + // begin a frame, the pMiscData is passed directly to the hal + // only valid to call this after the pins are connected + // Tells the ovmixer which frame is the destination + // frame. Use indices (valid vales are [0 .. pdwNumSurfacesAllocated-1]) to specify frames + HRESULT BeginFrame([in] const AMVABeginFrameInfo *amvaBeginFrameInfo); + + // end a frame, the pMiscData is passed directly to the hal + // only valid to call this after the pins are connected + HRESULT EndFrame([in] const AMVAEndFrameInfo *pEndFrameInfo); + + // lock and obtain access to a single buffer + // only valid to call this after the pins are connected + // Buffers are identified by type and index within that type + // Specifiying read-only will allow access to busy reference + // frames + // Output (uncompressed) frames use a type index of 0xFFFFFFFF + HRESULT GetBuffer( + [in] DWORD dwTypeIndex, + [in] DWORD dwBufferIndex, + [in] BOOL bReadOnly, + [out] LPVOID *ppBuffer, + [out] LONG *lpStride); + + // unlock a single buffer + // Buffers are identified by type and index within that type + // only valid to call this after the pins are connected + HRESULT ReleaseBuffer([in] DWORD dwTypeIndex, [in] DWORD dwBufferIndex); + + // Perform a decompression operation + // Private data can be passed to and from a driver + // identifiers for the corresponding members of pamvaMacroBlockInfo + // pamvaMacroBlockInfo is an IN parameter which is array (of length dwNumBlocks) of structures + // only valid to call this after the pins are connected + HRESULT Execute( + [in] DWORD dwFunction, + [in] LPVOID lpPrivateInputData, + [in] DWORD cbPrivateInputData, + [in] LPVOID lpPrivateOutputDat, + [in] DWORD cbPrivateOutputData, + [in] DWORD dwNumBuffers, + [in] const AMVABUFFERINFO *pamvaBufferInfo); + + // query the decode status of a particular decompression operation + // dwTypeIndex and dwBufferIndex define the buffer whose status is + // being queried + HRESULT QueryRenderStatus([in] DWORD dwTypeIndex, + [in] DWORD dwBufferIndex, + [in] DWORD dwFlags); + + // display a frame. The mediasample contains the timestamps etc for the frame to be displayed + // this call is a non-blocking call + // only valid to call this after the pins are connected + HRESULT DisplayFrame([in] DWORD dwFlipToIndex, [in] IMediaSample *pMediaSample); +}; + + + + + + diff --git a/windows_libs/mssdk/include/activecf.h b/windows_libs/mssdk/include/activecf.h new file mode 100644 index 00000000..fa9307d9 --- /dev/null +++ b/windows_libs/mssdk/include/activecf.h @@ -0,0 +1,18 @@ +//------------------------------------------------------------------------------ +// File: ActiveCf.h +// +// Desc: Contains the data formats for the transfer of VfW4 filters via the +// clipboard. +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#define CFSTR_VFW_FILTERLIST "Video for Windows 4 Filters" + +typedef struct tagVFW_FILTERLIST{ + UINT cFilters; // number of CLSIDs in aClsId + CLSID aClsId[1]; // ClsId of each filter +} VFW_FILTERLIST; + + diff --git a/windows_libs/mssdk/include/amaudio.h b/windows_libs/mssdk/include/amaudio.h new file mode 100644 index 00000000..2f68b395 --- /dev/null +++ b/windows_libs/mssdk/include/amaudio.h @@ -0,0 +1,54 @@ +//------------------------------------------------------------------------------ +// File: AMAudio.h +// +// Desc: Audio related definitions and interfaces for ActiveMovie. +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __AMAUDIO__ +#define __AMAUDIO__ + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +#include +#include + +// This is the interface the audio renderer supports to give the application +// access to the direct sound object and buffers it is using, to allow the +// application to use things like the 3D features of Direct Sound for the +// soundtrack of a movie being played with Active Movie + +// be nice to our friends in C +#undef INTERFACE +#define INTERFACE IAMDirectSound + +DECLARE_INTERFACE_(IAMDirectSound,IUnknown) +{ + /* IUnknown methods */ + + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /* IAMDirectSound methods */ + + STDMETHOD(GetDirectSoundInterface)(THIS_ LPDIRECTSOUND *lplpds) PURE; + STDMETHOD(GetPrimaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER *lplpdsb) PURE; + STDMETHOD(GetSecondaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER *lplpdsb) PURE; + STDMETHOD(ReleaseDirectSoundInterface)(THIS_ LPDIRECTSOUND lpds) PURE; + STDMETHOD(ReleasePrimaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER lpdsb) PURE; + STDMETHOD(ReleaseSecondaryBufferInterface)(THIS_ LPDIRECTSOUNDBUFFER lpdsb) PURE; + STDMETHOD(SetFocusWindow)(THIS_ HWND, BOOL) PURE ; + STDMETHOD(GetFocusWindow)(THIS_ HWND *, BOOL*) PURE ; +}; + + +#ifdef __cplusplus +} +#endif // __cplusplus +#endif // __AMAUDIO__ + diff --git a/windows_libs/mssdk/include/amparse.h b/windows_libs/mssdk/include/amparse.h new file mode 100644 index 00000000..7cbaf1ca --- /dev/null +++ b/windows_libs/mssdk/include/amparse.h @@ -0,0 +1,38 @@ +//------------------------------------------------------------------------------ +// File: AMParse.h +// +// Desc: Interface to the parser to get current time. This is useful for +// multifile playback. +// +// Copyright (c) 1996 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __AMPARSE__ +#define __AMPARSE__ + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + + +DEFINE_GUID(IID_IAMParse, +0xc47a3420, 0x005c, 0x11d2, 0x90, 0x38, 0x00, 0xa0, 0xc9, 0x69, 0x72, 0x98); + +// +// Parser interface - supported by MPEG-2 splitter filter +// +DECLARE_INTERFACE_(IAMParse, IUnknown) { + STDMETHOD(GetParseTime) (THIS_ + REFERENCE_TIME *prtCurrent + ) PURE; + STDMETHOD(SetParseTime) (THIS_ + REFERENCE_TIME rtCurrent + ) PURE; + STDMETHOD(Flush) (THIS) PURE; +}; + +#ifdef __cplusplus +} +#endif // __cplusplus +#endif // __AMPARSE__ diff --git a/windows_libs/mssdk/include/amstream.h b/windows_libs/mssdk/include/amstream.h new file mode 100644 index 00000000..3e3391f4 --- /dev/null +++ b/windows_libs/mssdk/include/amstream.h @@ -0,0 +1,2295 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0338 */ +/* Compiler settings for amstream.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __amstream_h__ +#define __amstream_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IDirectShowStream_FWD_DEFINED__ +#define __IDirectShowStream_FWD_DEFINED__ +typedef interface IDirectShowStream IDirectShowStream; +#endif /* __IDirectShowStream_FWD_DEFINED__ */ + + +#ifndef __IAMMultiMediaStream_FWD_DEFINED__ +#define __IAMMultiMediaStream_FWD_DEFINED__ +typedef interface IAMMultiMediaStream IAMMultiMediaStream; +#endif /* __IAMMultiMediaStream_FWD_DEFINED__ */ + + +#ifndef __IAMMediaStream_FWD_DEFINED__ +#define __IAMMediaStream_FWD_DEFINED__ +typedef interface IAMMediaStream IAMMediaStream; +#endif /* __IAMMediaStream_FWD_DEFINED__ */ + + +#ifndef __IMediaStreamFilter_FWD_DEFINED__ +#define __IMediaStreamFilter_FWD_DEFINED__ +typedef interface IMediaStreamFilter IMediaStreamFilter; +#endif /* __IMediaStreamFilter_FWD_DEFINED__ */ + + +#ifndef __IDirectDrawMediaSampleAllocator_FWD_DEFINED__ +#define __IDirectDrawMediaSampleAllocator_FWD_DEFINED__ +typedef interface IDirectDrawMediaSampleAllocator IDirectDrawMediaSampleAllocator; +#endif /* __IDirectDrawMediaSampleAllocator_FWD_DEFINED__ */ + + +#ifndef __IDirectDrawMediaSample_FWD_DEFINED__ +#define __IDirectDrawMediaSample_FWD_DEFINED__ +typedef interface IDirectDrawMediaSample IDirectDrawMediaSample; +#endif /* __IDirectDrawMediaSample_FWD_DEFINED__ */ + + +#ifndef __IAMMediaTypeStream_FWD_DEFINED__ +#define __IAMMediaTypeStream_FWD_DEFINED__ +typedef interface IAMMediaTypeStream IAMMediaTypeStream; +#endif /* __IAMMediaTypeStream_FWD_DEFINED__ */ + + +#ifndef __IAMMediaTypeSample_FWD_DEFINED__ +#define __IAMMediaTypeSample_FWD_DEFINED__ +typedef interface IAMMediaTypeSample IAMMediaTypeSample; +#endif /* __IAMMediaTypeSample_FWD_DEFINED__ */ + + +#ifndef __AMMultiMediaStream_FWD_DEFINED__ +#define __AMMultiMediaStream_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class AMMultiMediaStream AMMultiMediaStream; +#else +typedef struct AMMultiMediaStream AMMultiMediaStream; +#endif /* __cplusplus */ + +#endif /* __AMMultiMediaStream_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "unknwn.h" +#include "mmstream.h" +#include "strmif.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_amstream_0000 */ +/* [local] */ + +#include +#include +#include +#include +#include + + + + + + + + +enum __MIDL___MIDL_itf_amstream_0000_0001 + { AMMSF_NOGRAPHTHREAD = 0x1 + } ; + +enum __MIDL___MIDL_itf_amstream_0000_0002 + { AMMSF_ADDDEFAULTRENDERER = 0x1, + AMMSF_CREATEPEER = 0x2, + AMMSF_STOPIFNOSAMPLES = 0x4, + AMMSF_NOSTALL = 0x8 + } ; + +enum __MIDL___MIDL_itf_amstream_0000_0003 + { AMMSF_RENDERTYPEMASK = 0x3, + AMMSF_RENDERTOEXISTING = 0, + AMMSF_RENDERALLSTREAMS = 0x1, + AMMSF_NORENDER = 0x2, + AMMSF_NOCLOCK = 0x4, + AMMSF_RUN = 0x8 + } ; +typedef /* [public][public][public][public][public][v1_enum] */ +enum __MIDL___MIDL_itf_amstream_0000_0004 + { Disabled = 0, + ReadData = 1, + RenderData = 2 + } OUTPUT_STATE; + + + +extern RPC_IF_HANDLE __MIDL_itf_amstream_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_amstream_0000_v0_0_s_ifspec; + +#ifndef __IDirectShowStream_INTERFACE_DEFINED__ +#define __IDirectShowStream_INTERFACE_DEFINED__ + +/* interface IDirectShowStream */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_IDirectShowStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("7DB01C96-C0C3-11d0-8FF1-00C04FD9189D") + IDirectShowStream : public IDispatch + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_FileName( + /* [retval][out] */ BSTR *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_FileName( + /* [in] */ BSTR newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Video( + /* [retval][out] */ OUTPUT_STATE *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Video( + /* [in] */ OUTPUT_STATE newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Audio( + /* [retval][out] */ OUTPUT_STATE *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Audio( + /* [in] */ OUTPUT_STATE newVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDirectShowStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDirectShowStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDirectShowStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDirectShowStream * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IDirectShowStream * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IDirectShowStream * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IDirectShowStream * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IDirectShowStream * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FileName )( + IDirectShowStream * This, + /* [retval][out] */ BSTR *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_FileName )( + IDirectShowStream * This, + /* [in] */ BSTR newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Video )( + IDirectShowStream * This, + /* [retval][out] */ OUTPUT_STATE *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Video )( + IDirectShowStream * This, + /* [in] */ OUTPUT_STATE newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Audio )( + IDirectShowStream * This, + /* [retval][out] */ OUTPUT_STATE *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Audio )( + IDirectShowStream * This, + /* [in] */ OUTPUT_STATE newVal); + + END_INTERFACE + } IDirectShowStreamVtbl; + + interface IDirectShowStream + { + CONST_VTBL struct IDirectShowStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDirectShowStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDirectShowStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDirectShowStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDirectShowStream_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IDirectShowStream_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IDirectShowStream_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IDirectShowStream_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IDirectShowStream_get_FileName(This,pVal) \ + (This)->lpVtbl -> get_FileName(This,pVal) + +#define IDirectShowStream_put_FileName(This,newVal) \ + (This)->lpVtbl -> put_FileName(This,newVal) + +#define IDirectShowStream_get_Video(This,pVal) \ + (This)->lpVtbl -> get_Video(This,pVal) + +#define IDirectShowStream_put_Video(This,newVal) \ + (This)->lpVtbl -> put_Video(This,newVal) + +#define IDirectShowStream_get_Audio(This,pVal) \ + (This)->lpVtbl -> get_Audio(This,pVal) + +#define IDirectShowStream_put_Audio(This,newVal) \ + (This)->lpVtbl -> put_Audio(This,newVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDirectShowStream_get_FileName_Proxy( + IDirectShowStream * This, + /* [retval][out] */ BSTR *pVal); + + +void __RPC_STUB IDirectShowStream_get_FileName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDirectShowStream_put_FileName_Proxy( + IDirectShowStream * This, + /* [in] */ BSTR newVal); + + +void __RPC_STUB IDirectShowStream_put_FileName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDirectShowStream_get_Video_Proxy( + IDirectShowStream * This, + /* [retval][out] */ OUTPUT_STATE *pVal); + + +void __RPC_STUB IDirectShowStream_get_Video_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDirectShowStream_put_Video_Proxy( + IDirectShowStream * This, + /* [in] */ OUTPUT_STATE newVal); + + +void __RPC_STUB IDirectShowStream_put_Video_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDirectShowStream_get_Audio_Proxy( + IDirectShowStream * This, + /* [retval][out] */ OUTPUT_STATE *pVal); + + +void __RPC_STUB IDirectShowStream_get_Audio_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDirectShowStream_put_Audio_Proxy( + IDirectShowStream * This, + /* [in] */ OUTPUT_STATE newVal); + + +void __RPC_STUB IDirectShowStream_put_Audio_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDirectShowStream_INTERFACE_DEFINED__ */ + + +#ifndef __IAMMultiMediaStream_INTERFACE_DEFINED__ +#define __IAMMultiMediaStream_INTERFACE_DEFINED__ + +/* interface IAMMultiMediaStream */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMMultiMediaStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("BEBE595C-9A6F-11d0-8FDE-00C04FD9189D") + IAMMultiMediaStream : public IMultiMediaStream + { + public: + virtual HRESULT STDMETHODCALLTYPE Initialize( + /* [in] */ STREAM_TYPE StreamType, + /* [in] */ DWORD dwFlags, + /* [in] */ IGraphBuilder *pFilterGraph) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFilterGraph( + /* [out] */ IGraphBuilder **ppGraphBuilder) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFilter( + /* [out] */ IMediaStreamFilter **ppFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddMediaStream( + /* [in] */ IUnknown *pStreamObject, + /* [in] */ const MSPID *PurposeId, + /* [in] */ DWORD dwFlags, + /* [out] */ IMediaStream **ppNewStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE OpenFile( + /* [in] */ LPCWSTR pszFileName, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE OpenMoniker( + /* [in] */ IBindCtx *pCtx, + /* [in] */ IMoniker *pMoniker, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE Render( + /* [in] */ DWORD dwFlags) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMMultiMediaStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMMultiMediaStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMMultiMediaStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMMultiMediaStream * This); + + HRESULT ( STDMETHODCALLTYPE *GetInformation )( + IAMMultiMediaStream * This, + /* [out] */ DWORD *pdwFlags, + /* [out] */ STREAM_TYPE *pStreamType); + + HRESULT ( STDMETHODCALLTYPE *GetMediaStream )( + IAMMultiMediaStream * This, + /* [in] */ REFMSPID idPurpose, + /* [out] */ IMediaStream **ppMediaStream); + + HRESULT ( STDMETHODCALLTYPE *EnumMediaStreams )( + IAMMultiMediaStream * This, + /* [in] */ long Index, + /* [out] */ IMediaStream **ppMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetState )( + IAMMultiMediaStream * This, + /* [out] */ STREAM_STATE *pCurrentState); + + HRESULT ( STDMETHODCALLTYPE *SetState )( + IAMMultiMediaStream * This, + /* [in] */ STREAM_STATE NewState); + + HRESULT ( STDMETHODCALLTYPE *GetTime )( + IAMMultiMediaStream * This, + /* [out] */ STREAM_TIME *pCurrentTime); + + HRESULT ( STDMETHODCALLTYPE *GetDuration )( + IAMMultiMediaStream * This, + /* [out] */ STREAM_TIME *pDuration); + + HRESULT ( STDMETHODCALLTYPE *Seek )( + IAMMultiMediaStream * This, + /* [in] */ STREAM_TIME SeekTime); + + HRESULT ( STDMETHODCALLTYPE *GetEndOfStreamEventHandle )( + IAMMultiMediaStream * This, + /* [out] */ HANDLE *phEOS); + + HRESULT ( STDMETHODCALLTYPE *Initialize )( + IAMMultiMediaStream * This, + /* [in] */ STREAM_TYPE StreamType, + /* [in] */ DWORD dwFlags, + /* [in] */ IGraphBuilder *pFilterGraph); + + HRESULT ( STDMETHODCALLTYPE *GetFilterGraph )( + IAMMultiMediaStream * This, + /* [out] */ IGraphBuilder **ppGraphBuilder); + + HRESULT ( STDMETHODCALLTYPE *GetFilter )( + IAMMultiMediaStream * This, + /* [out] */ IMediaStreamFilter **ppFilter); + + HRESULT ( STDMETHODCALLTYPE *AddMediaStream )( + IAMMultiMediaStream * This, + /* [in] */ IUnknown *pStreamObject, + /* [in] */ const MSPID *PurposeId, + /* [in] */ DWORD dwFlags, + /* [out] */ IMediaStream **ppNewStream); + + HRESULT ( STDMETHODCALLTYPE *OpenFile )( + IAMMultiMediaStream * This, + /* [in] */ LPCWSTR pszFileName, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *OpenMoniker )( + IAMMultiMediaStream * This, + /* [in] */ IBindCtx *pCtx, + /* [in] */ IMoniker *pMoniker, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *Render )( + IAMMultiMediaStream * This, + /* [in] */ DWORD dwFlags); + + END_INTERFACE + } IAMMultiMediaStreamVtbl; + + interface IAMMultiMediaStream + { + CONST_VTBL struct IAMMultiMediaStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMMultiMediaStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMMultiMediaStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMMultiMediaStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMMultiMediaStream_GetInformation(This,pdwFlags,pStreamType) \ + (This)->lpVtbl -> GetInformation(This,pdwFlags,pStreamType) + +#define IAMMultiMediaStream_GetMediaStream(This,idPurpose,ppMediaStream) \ + (This)->lpVtbl -> GetMediaStream(This,idPurpose,ppMediaStream) + +#define IAMMultiMediaStream_EnumMediaStreams(This,Index,ppMediaStream) \ + (This)->lpVtbl -> EnumMediaStreams(This,Index,ppMediaStream) + +#define IAMMultiMediaStream_GetState(This,pCurrentState) \ + (This)->lpVtbl -> GetState(This,pCurrentState) + +#define IAMMultiMediaStream_SetState(This,NewState) \ + (This)->lpVtbl -> SetState(This,NewState) + +#define IAMMultiMediaStream_GetTime(This,pCurrentTime) \ + (This)->lpVtbl -> GetTime(This,pCurrentTime) + +#define IAMMultiMediaStream_GetDuration(This,pDuration) \ + (This)->lpVtbl -> GetDuration(This,pDuration) + +#define IAMMultiMediaStream_Seek(This,SeekTime) \ + (This)->lpVtbl -> Seek(This,SeekTime) + +#define IAMMultiMediaStream_GetEndOfStreamEventHandle(This,phEOS) \ + (This)->lpVtbl -> GetEndOfStreamEventHandle(This,phEOS) + + +#define IAMMultiMediaStream_Initialize(This,StreamType,dwFlags,pFilterGraph) \ + (This)->lpVtbl -> Initialize(This,StreamType,dwFlags,pFilterGraph) + +#define IAMMultiMediaStream_GetFilterGraph(This,ppGraphBuilder) \ + (This)->lpVtbl -> GetFilterGraph(This,ppGraphBuilder) + +#define IAMMultiMediaStream_GetFilter(This,ppFilter) \ + (This)->lpVtbl -> GetFilter(This,ppFilter) + +#define IAMMultiMediaStream_AddMediaStream(This,pStreamObject,PurposeId,dwFlags,ppNewStream) \ + (This)->lpVtbl -> AddMediaStream(This,pStreamObject,PurposeId,dwFlags,ppNewStream) + +#define IAMMultiMediaStream_OpenFile(This,pszFileName,dwFlags) \ + (This)->lpVtbl -> OpenFile(This,pszFileName,dwFlags) + +#define IAMMultiMediaStream_OpenMoniker(This,pCtx,pMoniker,dwFlags) \ + (This)->lpVtbl -> OpenMoniker(This,pCtx,pMoniker,dwFlags) + +#define IAMMultiMediaStream_Render(This,dwFlags) \ + (This)->lpVtbl -> Render(This,dwFlags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMMultiMediaStream_Initialize_Proxy( + IAMMultiMediaStream * This, + /* [in] */ STREAM_TYPE StreamType, + /* [in] */ DWORD dwFlags, + /* [in] */ IGraphBuilder *pFilterGraph); + + +void __RPC_STUB IAMMultiMediaStream_Initialize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMultiMediaStream_GetFilterGraph_Proxy( + IAMMultiMediaStream * This, + /* [out] */ IGraphBuilder **ppGraphBuilder); + + +void __RPC_STUB IAMMultiMediaStream_GetFilterGraph_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMultiMediaStream_GetFilter_Proxy( + IAMMultiMediaStream * This, + /* [out] */ IMediaStreamFilter **ppFilter); + + +void __RPC_STUB IAMMultiMediaStream_GetFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMultiMediaStream_AddMediaStream_Proxy( + IAMMultiMediaStream * This, + /* [in] */ IUnknown *pStreamObject, + /* [in] */ const MSPID *PurposeId, + /* [in] */ DWORD dwFlags, + /* [out] */ IMediaStream **ppNewStream); + + +void __RPC_STUB IAMMultiMediaStream_AddMediaStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMultiMediaStream_OpenFile_Proxy( + IAMMultiMediaStream * This, + /* [in] */ LPCWSTR pszFileName, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IAMMultiMediaStream_OpenFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMultiMediaStream_OpenMoniker_Proxy( + IAMMultiMediaStream * This, + /* [in] */ IBindCtx *pCtx, + /* [in] */ IMoniker *pMoniker, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IAMMultiMediaStream_OpenMoniker_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMultiMediaStream_Render_Proxy( + IAMMultiMediaStream * This, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IAMMultiMediaStream_Render_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMMultiMediaStream_INTERFACE_DEFINED__ */ + + +#ifndef __IAMMediaStream_INTERFACE_DEFINED__ +#define __IAMMediaStream_INTERFACE_DEFINED__ + +/* interface IAMMediaStream */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMMediaStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("BEBE595D-9A6F-11d0-8FDE-00C04FD9189D") + IAMMediaStream : public IMediaStream + { + public: + virtual HRESULT STDMETHODCALLTYPE Initialize( + /* [in] */ IUnknown *pSourceObject, + /* [in] */ DWORD dwFlags, + /* [in] */ REFMSPID PurposeId, + /* [in] */ const STREAM_TYPE StreamType) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetState( + /* [in] */ FILTER_STATE State) = 0; + + virtual HRESULT STDMETHODCALLTYPE JoinAMMultiMediaStream( + /* [in] */ IAMMultiMediaStream *pAMMultiMediaStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE JoinFilter( + /* [in] */ IMediaStreamFilter *pMediaStreamFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE JoinFilterGraph( + /* [in] */ IFilterGraph *pFilterGraph) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMMediaStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMMediaStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMMediaStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMMediaStream * This); + + HRESULT ( STDMETHODCALLTYPE *GetMultiMediaStream )( + IAMMediaStream * This, + /* [out] */ IMultiMediaStream **ppMultiMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetInformation )( + IAMMediaStream * This, + /* [out] */ MSPID *pPurposeId, + /* [out] */ STREAM_TYPE *pType); + + HRESULT ( STDMETHODCALLTYPE *SetSameFormat )( + IAMMediaStream * This, + /* [in] */ IMediaStream *pStreamThatHasDesiredFormat, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *AllocateSample )( + IAMMediaStream * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppSample); + + HRESULT ( STDMETHODCALLTYPE *CreateSharedSample )( + IAMMediaStream * This, + /* [in] */ IStreamSample *pExistingSample, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppNewSample); + + HRESULT ( STDMETHODCALLTYPE *SendEndOfStream )( + IAMMediaStream * This, + DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *Initialize )( + IAMMediaStream * This, + /* [in] */ IUnknown *pSourceObject, + /* [in] */ DWORD dwFlags, + /* [in] */ REFMSPID PurposeId, + /* [in] */ const STREAM_TYPE StreamType); + + HRESULT ( STDMETHODCALLTYPE *SetState )( + IAMMediaStream * This, + /* [in] */ FILTER_STATE State); + + HRESULT ( STDMETHODCALLTYPE *JoinAMMultiMediaStream )( + IAMMediaStream * This, + /* [in] */ IAMMultiMediaStream *pAMMultiMediaStream); + + HRESULT ( STDMETHODCALLTYPE *JoinFilter )( + IAMMediaStream * This, + /* [in] */ IMediaStreamFilter *pMediaStreamFilter); + + HRESULT ( STDMETHODCALLTYPE *JoinFilterGraph )( + IAMMediaStream * This, + /* [in] */ IFilterGraph *pFilterGraph); + + END_INTERFACE + } IAMMediaStreamVtbl; + + interface IAMMediaStream + { + CONST_VTBL struct IAMMediaStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMMediaStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMMediaStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMMediaStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMMediaStream_GetMultiMediaStream(This,ppMultiMediaStream) \ + (This)->lpVtbl -> GetMultiMediaStream(This,ppMultiMediaStream) + +#define IAMMediaStream_GetInformation(This,pPurposeId,pType) \ + (This)->lpVtbl -> GetInformation(This,pPurposeId,pType) + +#define IAMMediaStream_SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) \ + (This)->lpVtbl -> SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) + +#define IAMMediaStream_AllocateSample(This,dwFlags,ppSample) \ + (This)->lpVtbl -> AllocateSample(This,dwFlags,ppSample) + +#define IAMMediaStream_CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) \ + (This)->lpVtbl -> CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) + +#define IAMMediaStream_SendEndOfStream(This,dwFlags) \ + (This)->lpVtbl -> SendEndOfStream(This,dwFlags) + + +#define IAMMediaStream_Initialize(This,pSourceObject,dwFlags,PurposeId,StreamType) \ + (This)->lpVtbl -> Initialize(This,pSourceObject,dwFlags,PurposeId,StreamType) + +#define IAMMediaStream_SetState(This,State) \ + (This)->lpVtbl -> SetState(This,State) + +#define IAMMediaStream_JoinAMMultiMediaStream(This,pAMMultiMediaStream) \ + (This)->lpVtbl -> JoinAMMultiMediaStream(This,pAMMultiMediaStream) + +#define IAMMediaStream_JoinFilter(This,pMediaStreamFilter) \ + (This)->lpVtbl -> JoinFilter(This,pMediaStreamFilter) + +#define IAMMediaStream_JoinFilterGraph(This,pFilterGraph) \ + (This)->lpVtbl -> JoinFilterGraph(This,pFilterGraph) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMMediaStream_Initialize_Proxy( + IAMMediaStream * This, + /* [in] */ IUnknown *pSourceObject, + /* [in] */ DWORD dwFlags, + /* [in] */ REFMSPID PurposeId, + /* [in] */ const STREAM_TYPE StreamType); + + +void __RPC_STUB IAMMediaStream_Initialize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaStream_SetState_Proxy( + IAMMediaStream * This, + /* [in] */ FILTER_STATE State); + + +void __RPC_STUB IAMMediaStream_SetState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaStream_JoinAMMultiMediaStream_Proxy( + IAMMediaStream * This, + /* [in] */ IAMMultiMediaStream *pAMMultiMediaStream); + + +void __RPC_STUB IAMMediaStream_JoinAMMultiMediaStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaStream_JoinFilter_Proxy( + IAMMediaStream * This, + /* [in] */ IMediaStreamFilter *pMediaStreamFilter); + + +void __RPC_STUB IAMMediaStream_JoinFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaStream_JoinFilterGraph_Proxy( + IAMMediaStream * This, + /* [in] */ IFilterGraph *pFilterGraph); + + +void __RPC_STUB IAMMediaStream_JoinFilterGraph_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMMediaStream_INTERFACE_DEFINED__ */ + + +#ifndef __IMediaStreamFilter_INTERFACE_DEFINED__ +#define __IMediaStreamFilter_INTERFACE_DEFINED__ + +/* interface IMediaStreamFilter */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IMediaStreamFilter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("BEBE595E-9A6F-11d0-8FDE-00C04FD9189D") + IMediaStreamFilter : public IBaseFilter + { + public: + virtual HRESULT STDMETHODCALLTYPE AddMediaStream( + /* [in] */ IAMMediaStream *pAMMediaStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMediaStream( + /* [in] */ REFMSPID idPurpose, + /* [out] */ IMediaStream **ppMediaStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumMediaStreams( + /* [in] */ long Index, + /* [out] */ IMediaStream **ppMediaStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE SupportSeeking( + /* [in] */ BOOL bRenderer) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReferenceTimeToStreamTime( + /* [out][in] */ REFERENCE_TIME *pTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentStreamTime( + /* [out] */ REFERENCE_TIME *pCurrentStreamTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE WaitUntil( + /* [in] */ REFERENCE_TIME WaitStreamTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE Flush( + /* [in] */ BOOL bCancelEOS) = 0; + + virtual HRESULT STDMETHODCALLTYPE EndOfStream( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaStreamFilterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaStreamFilter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaStreamFilter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaStreamFilter * This); + + HRESULT ( STDMETHODCALLTYPE *GetClassID )( + IMediaStreamFilter * This, + /* [out] */ CLSID *pClassID); + + HRESULT ( STDMETHODCALLTYPE *Stop )( + IMediaStreamFilter * This); + + HRESULT ( STDMETHODCALLTYPE *Pause )( + IMediaStreamFilter * This); + + HRESULT ( STDMETHODCALLTYPE *Run )( + IMediaStreamFilter * This, + REFERENCE_TIME tStart); + + HRESULT ( STDMETHODCALLTYPE *GetState )( + IMediaStreamFilter * This, + /* [in] */ DWORD dwMilliSecsTimeout, + /* [out] */ FILTER_STATE *State); + + HRESULT ( STDMETHODCALLTYPE *SetSyncSource )( + IMediaStreamFilter * This, + /* [in] */ IReferenceClock *pClock); + + HRESULT ( STDMETHODCALLTYPE *GetSyncSource )( + IMediaStreamFilter * This, + /* [out] */ IReferenceClock **pClock); + + HRESULT ( STDMETHODCALLTYPE *EnumPins )( + IMediaStreamFilter * This, + /* [out] */ IEnumPins **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *FindPin )( + IMediaStreamFilter * This, + /* [string][in] */ LPCWSTR Id, + /* [out] */ IPin **ppPin); + + HRESULT ( STDMETHODCALLTYPE *QueryFilterInfo )( + IMediaStreamFilter * This, + /* [out] */ FILTER_INFO *pInfo); + + HRESULT ( STDMETHODCALLTYPE *JoinFilterGraph )( + IMediaStreamFilter * This, + /* [in] */ IFilterGraph *pGraph, + /* [string][in] */ LPCWSTR pName); + + HRESULT ( STDMETHODCALLTYPE *QueryVendorInfo )( + IMediaStreamFilter * This, + /* [string][out] */ LPWSTR *pVendorInfo); + + HRESULT ( STDMETHODCALLTYPE *AddMediaStream )( + IMediaStreamFilter * This, + /* [in] */ IAMMediaStream *pAMMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetMediaStream )( + IMediaStreamFilter * This, + /* [in] */ REFMSPID idPurpose, + /* [out] */ IMediaStream **ppMediaStream); + + HRESULT ( STDMETHODCALLTYPE *EnumMediaStreams )( + IMediaStreamFilter * This, + /* [in] */ long Index, + /* [out] */ IMediaStream **ppMediaStream); + + HRESULT ( STDMETHODCALLTYPE *SupportSeeking )( + IMediaStreamFilter * This, + /* [in] */ BOOL bRenderer); + + HRESULT ( STDMETHODCALLTYPE *ReferenceTimeToStreamTime )( + IMediaStreamFilter * This, + /* [out][in] */ REFERENCE_TIME *pTime); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentStreamTime )( + IMediaStreamFilter * This, + /* [out] */ REFERENCE_TIME *pCurrentStreamTime); + + HRESULT ( STDMETHODCALLTYPE *WaitUntil )( + IMediaStreamFilter * This, + /* [in] */ REFERENCE_TIME WaitStreamTime); + + HRESULT ( STDMETHODCALLTYPE *Flush )( + IMediaStreamFilter * This, + /* [in] */ BOOL bCancelEOS); + + HRESULT ( STDMETHODCALLTYPE *EndOfStream )( + IMediaStreamFilter * This); + + END_INTERFACE + } IMediaStreamFilterVtbl; + + interface IMediaStreamFilter + { + CONST_VTBL struct IMediaStreamFilterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaStreamFilter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaStreamFilter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaStreamFilter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaStreamFilter_GetClassID(This,pClassID) \ + (This)->lpVtbl -> GetClassID(This,pClassID) + + +#define IMediaStreamFilter_Stop(This) \ + (This)->lpVtbl -> Stop(This) + +#define IMediaStreamFilter_Pause(This) \ + (This)->lpVtbl -> Pause(This) + +#define IMediaStreamFilter_Run(This,tStart) \ + (This)->lpVtbl -> Run(This,tStart) + +#define IMediaStreamFilter_GetState(This,dwMilliSecsTimeout,State) \ + (This)->lpVtbl -> GetState(This,dwMilliSecsTimeout,State) + +#define IMediaStreamFilter_SetSyncSource(This,pClock) \ + (This)->lpVtbl -> SetSyncSource(This,pClock) + +#define IMediaStreamFilter_GetSyncSource(This,pClock) \ + (This)->lpVtbl -> GetSyncSource(This,pClock) + + +#define IMediaStreamFilter_EnumPins(This,ppEnum) \ + (This)->lpVtbl -> EnumPins(This,ppEnum) + +#define IMediaStreamFilter_FindPin(This,Id,ppPin) \ + (This)->lpVtbl -> FindPin(This,Id,ppPin) + +#define IMediaStreamFilter_QueryFilterInfo(This,pInfo) \ + (This)->lpVtbl -> QueryFilterInfo(This,pInfo) + +#define IMediaStreamFilter_JoinFilterGraph(This,pGraph,pName) \ + (This)->lpVtbl -> JoinFilterGraph(This,pGraph,pName) + +#define IMediaStreamFilter_QueryVendorInfo(This,pVendorInfo) \ + (This)->lpVtbl -> QueryVendorInfo(This,pVendorInfo) + + +#define IMediaStreamFilter_AddMediaStream(This,pAMMediaStream) \ + (This)->lpVtbl -> AddMediaStream(This,pAMMediaStream) + +#define IMediaStreamFilter_GetMediaStream(This,idPurpose,ppMediaStream) \ + (This)->lpVtbl -> GetMediaStream(This,idPurpose,ppMediaStream) + +#define IMediaStreamFilter_EnumMediaStreams(This,Index,ppMediaStream) \ + (This)->lpVtbl -> EnumMediaStreams(This,Index,ppMediaStream) + +#define IMediaStreamFilter_SupportSeeking(This,bRenderer) \ + (This)->lpVtbl -> SupportSeeking(This,bRenderer) + +#define IMediaStreamFilter_ReferenceTimeToStreamTime(This,pTime) \ + (This)->lpVtbl -> ReferenceTimeToStreamTime(This,pTime) + +#define IMediaStreamFilter_GetCurrentStreamTime(This,pCurrentStreamTime) \ + (This)->lpVtbl -> GetCurrentStreamTime(This,pCurrentStreamTime) + +#define IMediaStreamFilter_WaitUntil(This,WaitStreamTime) \ + (This)->lpVtbl -> WaitUntil(This,WaitStreamTime) + +#define IMediaStreamFilter_Flush(This,bCancelEOS) \ + (This)->lpVtbl -> Flush(This,bCancelEOS) + +#define IMediaStreamFilter_EndOfStream(This) \ + (This)->lpVtbl -> EndOfStream(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_AddMediaStream_Proxy( + IMediaStreamFilter * This, + /* [in] */ IAMMediaStream *pAMMediaStream); + + +void __RPC_STUB IMediaStreamFilter_AddMediaStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_GetMediaStream_Proxy( + IMediaStreamFilter * This, + /* [in] */ REFMSPID idPurpose, + /* [out] */ IMediaStream **ppMediaStream); + + +void __RPC_STUB IMediaStreamFilter_GetMediaStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_EnumMediaStreams_Proxy( + IMediaStreamFilter * This, + /* [in] */ long Index, + /* [out] */ IMediaStream **ppMediaStream); + + +void __RPC_STUB IMediaStreamFilter_EnumMediaStreams_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_SupportSeeking_Proxy( + IMediaStreamFilter * This, + /* [in] */ BOOL bRenderer); + + +void __RPC_STUB IMediaStreamFilter_SupportSeeking_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_ReferenceTimeToStreamTime_Proxy( + IMediaStreamFilter * This, + /* [out][in] */ REFERENCE_TIME *pTime); + + +void __RPC_STUB IMediaStreamFilter_ReferenceTimeToStreamTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_GetCurrentStreamTime_Proxy( + IMediaStreamFilter * This, + /* [out] */ REFERENCE_TIME *pCurrentStreamTime); + + +void __RPC_STUB IMediaStreamFilter_GetCurrentStreamTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_WaitUntil_Proxy( + IMediaStreamFilter * This, + /* [in] */ REFERENCE_TIME WaitStreamTime); + + +void __RPC_STUB IMediaStreamFilter_WaitUntil_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_Flush_Proxy( + IMediaStreamFilter * This, + /* [in] */ BOOL bCancelEOS); + + +void __RPC_STUB IMediaStreamFilter_Flush_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStreamFilter_EndOfStream_Proxy( + IMediaStreamFilter * This); + + +void __RPC_STUB IMediaStreamFilter_EndOfStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaStreamFilter_INTERFACE_DEFINED__ */ + + +#ifndef __IDirectDrawMediaSampleAllocator_INTERFACE_DEFINED__ +#define __IDirectDrawMediaSampleAllocator_INTERFACE_DEFINED__ + +/* interface IDirectDrawMediaSampleAllocator */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IDirectDrawMediaSampleAllocator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("AB6B4AFC-F6E4-11d0-900D-00C04FD9189D") + IDirectDrawMediaSampleAllocator : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDirectDraw( + IDirectDraw **ppDirectDraw) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDirectDrawMediaSampleAllocatorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDirectDrawMediaSampleAllocator * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDirectDrawMediaSampleAllocator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDirectDrawMediaSampleAllocator * This); + + HRESULT ( STDMETHODCALLTYPE *GetDirectDraw )( + IDirectDrawMediaSampleAllocator * This, + IDirectDraw **ppDirectDraw); + + END_INTERFACE + } IDirectDrawMediaSampleAllocatorVtbl; + + interface IDirectDrawMediaSampleAllocator + { + CONST_VTBL struct IDirectDrawMediaSampleAllocatorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDirectDrawMediaSampleAllocator_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDirectDrawMediaSampleAllocator_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDirectDrawMediaSampleAllocator_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDirectDrawMediaSampleAllocator_GetDirectDraw(This,ppDirectDraw) \ + (This)->lpVtbl -> GetDirectDraw(This,ppDirectDraw) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDirectDrawMediaSampleAllocator_GetDirectDraw_Proxy( + IDirectDrawMediaSampleAllocator * This, + IDirectDraw **ppDirectDraw); + + +void __RPC_STUB IDirectDrawMediaSampleAllocator_GetDirectDraw_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDirectDrawMediaSampleAllocator_INTERFACE_DEFINED__ */ + + +#ifndef __IDirectDrawMediaSample_INTERFACE_DEFINED__ +#define __IDirectDrawMediaSample_INTERFACE_DEFINED__ + +/* interface IDirectDrawMediaSample */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IDirectDrawMediaSample; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("AB6B4AFE-F6E4-11d0-900D-00C04FD9189D") + IDirectDrawMediaSample : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetSurfaceAndReleaseLock( + /* [out] */ IDirectDrawSurface **ppDirectDrawSurface, + /* [out] */ RECT *pRect) = 0; + + virtual HRESULT STDMETHODCALLTYPE LockMediaSamplePointer( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDirectDrawMediaSampleVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDirectDrawMediaSample * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDirectDrawMediaSample * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDirectDrawMediaSample * This); + + HRESULT ( STDMETHODCALLTYPE *GetSurfaceAndReleaseLock )( + IDirectDrawMediaSample * This, + /* [out] */ IDirectDrawSurface **ppDirectDrawSurface, + /* [out] */ RECT *pRect); + + HRESULT ( STDMETHODCALLTYPE *LockMediaSamplePointer )( + IDirectDrawMediaSample * This); + + END_INTERFACE + } IDirectDrawMediaSampleVtbl; + + interface IDirectDrawMediaSample + { + CONST_VTBL struct IDirectDrawMediaSampleVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDirectDrawMediaSample_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDirectDrawMediaSample_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDirectDrawMediaSample_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDirectDrawMediaSample_GetSurfaceAndReleaseLock(This,ppDirectDrawSurface,pRect) \ + (This)->lpVtbl -> GetSurfaceAndReleaseLock(This,ppDirectDrawSurface,pRect) + +#define IDirectDrawMediaSample_LockMediaSamplePointer(This) \ + (This)->lpVtbl -> LockMediaSamplePointer(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDirectDrawMediaSample_GetSurfaceAndReleaseLock_Proxy( + IDirectDrawMediaSample * This, + /* [out] */ IDirectDrawSurface **ppDirectDrawSurface, + /* [out] */ RECT *pRect); + + +void __RPC_STUB IDirectDrawMediaSample_GetSurfaceAndReleaseLock_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDirectDrawMediaSample_LockMediaSamplePointer_Proxy( + IDirectDrawMediaSample * This); + + +void __RPC_STUB IDirectDrawMediaSample_LockMediaSamplePointer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDirectDrawMediaSample_INTERFACE_DEFINED__ */ + + +#ifndef __IAMMediaTypeStream_INTERFACE_DEFINED__ +#define __IAMMediaTypeStream_INTERFACE_DEFINED__ + +/* interface IAMMediaTypeStream */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IAMMediaTypeStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("AB6B4AFA-F6E4-11d0-900D-00C04FD9189D") + IAMMediaTypeStream : public IMediaStream + { + public: + virtual HRESULT STDMETHODCALLTYPE GetFormat( + /* [out] */ AM_MEDIA_TYPE *pMediaType, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFormat( + /* [in] */ AM_MEDIA_TYPE *pMediaType, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSample( + /* [in] */ long lSampleSize, + /* [in] */ BYTE *pbBuffer, + /* [in] */ DWORD dwFlags, + /* [in] */ IUnknown *pUnkOuter, + /* [out] */ IAMMediaTypeSample **ppAMMediaTypeSample) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStreamAllocatorRequirements( + /* [out] */ ALLOCATOR_PROPERTIES *pProps) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetStreamAllocatorRequirements( + /* [in] */ ALLOCATOR_PROPERTIES *pProps) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMMediaTypeStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMMediaTypeStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMMediaTypeStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMMediaTypeStream * This); + + HRESULT ( STDMETHODCALLTYPE *GetMultiMediaStream )( + IAMMediaTypeStream * This, + /* [out] */ IMultiMediaStream **ppMultiMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetInformation )( + IAMMediaTypeStream * This, + /* [out] */ MSPID *pPurposeId, + /* [out] */ STREAM_TYPE *pType); + + HRESULT ( STDMETHODCALLTYPE *SetSameFormat )( + IAMMediaTypeStream * This, + /* [in] */ IMediaStream *pStreamThatHasDesiredFormat, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *AllocateSample )( + IAMMediaTypeStream * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppSample); + + HRESULT ( STDMETHODCALLTYPE *CreateSharedSample )( + IAMMediaTypeStream * This, + /* [in] */ IStreamSample *pExistingSample, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppNewSample); + + HRESULT ( STDMETHODCALLTYPE *SendEndOfStream )( + IAMMediaTypeStream * This, + DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetFormat )( + IAMMediaTypeStream * This, + /* [out] */ AM_MEDIA_TYPE *pMediaType, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *SetFormat )( + IAMMediaTypeStream * This, + /* [in] */ AM_MEDIA_TYPE *pMediaType, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *CreateSample )( + IAMMediaTypeStream * This, + /* [in] */ long lSampleSize, + /* [in] */ BYTE *pbBuffer, + /* [in] */ DWORD dwFlags, + /* [in] */ IUnknown *pUnkOuter, + /* [out] */ IAMMediaTypeSample **ppAMMediaTypeSample); + + HRESULT ( STDMETHODCALLTYPE *GetStreamAllocatorRequirements )( + IAMMediaTypeStream * This, + /* [out] */ ALLOCATOR_PROPERTIES *pProps); + + HRESULT ( STDMETHODCALLTYPE *SetStreamAllocatorRequirements )( + IAMMediaTypeStream * This, + /* [in] */ ALLOCATOR_PROPERTIES *pProps); + + END_INTERFACE + } IAMMediaTypeStreamVtbl; + + interface IAMMediaTypeStream + { + CONST_VTBL struct IAMMediaTypeStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMMediaTypeStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMMediaTypeStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMMediaTypeStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMMediaTypeStream_GetMultiMediaStream(This,ppMultiMediaStream) \ + (This)->lpVtbl -> GetMultiMediaStream(This,ppMultiMediaStream) + +#define IAMMediaTypeStream_GetInformation(This,pPurposeId,pType) \ + (This)->lpVtbl -> GetInformation(This,pPurposeId,pType) + +#define IAMMediaTypeStream_SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) \ + (This)->lpVtbl -> SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) + +#define IAMMediaTypeStream_AllocateSample(This,dwFlags,ppSample) \ + (This)->lpVtbl -> AllocateSample(This,dwFlags,ppSample) + +#define IAMMediaTypeStream_CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) \ + (This)->lpVtbl -> CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) + +#define IAMMediaTypeStream_SendEndOfStream(This,dwFlags) \ + (This)->lpVtbl -> SendEndOfStream(This,dwFlags) + + +#define IAMMediaTypeStream_GetFormat(This,pMediaType,dwFlags) \ + (This)->lpVtbl -> GetFormat(This,pMediaType,dwFlags) + +#define IAMMediaTypeStream_SetFormat(This,pMediaType,dwFlags) \ + (This)->lpVtbl -> SetFormat(This,pMediaType,dwFlags) + +#define IAMMediaTypeStream_CreateSample(This,lSampleSize,pbBuffer,dwFlags,pUnkOuter,ppAMMediaTypeSample) \ + (This)->lpVtbl -> CreateSample(This,lSampleSize,pbBuffer,dwFlags,pUnkOuter,ppAMMediaTypeSample) + +#define IAMMediaTypeStream_GetStreamAllocatorRequirements(This,pProps) \ + (This)->lpVtbl -> GetStreamAllocatorRequirements(This,pProps) + +#define IAMMediaTypeStream_SetStreamAllocatorRequirements(This,pProps) \ + (This)->lpVtbl -> SetStreamAllocatorRequirements(This,pProps) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeStream_GetFormat_Proxy( + IAMMediaTypeStream * This, + /* [out] */ AM_MEDIA_TYPE *pMediaType, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IAMMediaTypeStream_GetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeStream_SetFormat_Proxy( + IAMMediaTypeStream * This, + /* [in] */ AM_MEDIA_TYPE *pMediaType, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IAMMediaTypeStream_SetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeStream_CreateSample_Proxy( + IAMMediaTypeStream * This, + /* [in] */ long lSampleSize, + /* [in] */ BYTE *pbBuffer, + /* [in] */ DWORD dwFlags, + /* [in] */ IUnknown *pUnkOuter, + /* [out] */ IAMMediaTypeSample **ppAMMediaTypeSample); + + +void __RPC_STUB IAMMediaTypeStream_CreateSample_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeStream_GetStreamAllocatorRequirements_Proxy( + IAMMediaTypeStream * This, + /* [out] */ ALLOCATOR_PROPERTIES *pProps); + + +void __RPC_STUB IAMMediaTypeStream_GetStreamAllocatorRequirements_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeStream_SetStreamAllocatorRequirements_Proxy( + IAMMediaTypeStream * This, + /* [in] */ ALLOCATOR_PROPERTIES *pProps); + + +void __RPC_STUB IAMMediaTypeStream_SetStreamAllocatorRequirements_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMMediaTypeStream_INTERFACE_DEFINED__ */ + + +#ifndef __IAMMediaTypeSample_INTERFACE_DEFINED__ +#define __IAMMediaTypeSample_INTERFACE_DEFINED__ + +/* interface IAMMediaTypeSample */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IAMMediaTypeSample; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("AB6B4AFB-F6E4-11d0-900D-00C04FD9189D") + IAMMediaTypeSample : public IStreamSample + { + public: + virtual HRESULT STDMETHODCALLTYPE SetPointer( + /* [in] */ BYTE *pBuffer, + /* [in] */ long lSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPointer( + /* [out] */ BYTE **ppBuffer) = 0; + + virtual long STDMETHODCALLTYPE GetSize( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTime( + /* [out] */ REFERENCE_TIME *pTimeStart, + /* [out] */ REFERENCE_TIME *pTimeEnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTime( + /* [in] */ REFERENCE_TIME *pTimeStart, + /* [in] */ REFERENCE_TIME *pTimeEnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsSyncPoint( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSyncPoint( + BOOL bIsSyncPoint) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsPreroll( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPreroll( + BOOL bIsPreroll) = 0; + + virtual long STDMETHODCALLTYPE GetActualDataLength( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetActualDataLength( + long __MIDL_0017) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMediaType( + AM_MEDIA_TYPE **ppMediaType) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMediaType( + AM_MEDIA_TYPE *pMediaType) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsDiscontinuity( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDiscontinuity( + BOOL bDiscontinuity) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMediaTime( + /* [out] */ LONGLONG *pTimeStart, + /* [out] */ LONGLONG *pTimeEnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMediaTime( + /* [in] */ LONGLONG *pTimeStart, + /* [in] */ LONGLONG *pTimeEnd) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMMediaTypeSampleVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMMediaTypeSample * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMMediaTypeSample * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMMediaTypeSample * This); + + HRESULT ( STDMETHODCALLTYPE *GetMediaStream )( + IAMMediaTypeSample * This, + /* [in] */ IMediaStream **ppMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetSampleTimes )( + IAMMediaTypeSample * This, + /* [out] */ STREAM_TIME *pStartTime, + /* [out] */ STREAM_TIME *pEndTime, + /* [out] */ STREAM_TIME *pCurrentTime); + + HRESULT ( STDMETHODCALLTYPE *SetSampleTimes )( + IAMMediaTypeSample * This, + /* [in] */ const STREAM_TIME *pStartTime, + /* [in] */ const STREAM_TIME *pEndTime); + + HRESULT ( STDMETHODCALLTYPE *Update )( + IAMMediaTypeSample * This, + /* [in] */ DWORD dwFlags, + /* [in] */ HANDLE hEvent, + /* [in] */ PAPCFUNC pfnAPC, + /* [in] */ DWORD_PTR dwAPCData); + + HRESULT ( STDMETHODCALLTYPE *CompletionStatus )( + IAMMediaTypeSample * This, + /* [in] */ DWORD dwFlags, + /* [in] */ DWORD dwMilliseconds); + + HRESULT ( STDMETHODCALLTYPE *SetPointer )( + IAMMediaTypeSample * This, + /* [in] */ BYTE *pBuffer, + /* [in] */ long lSize); + + HRESULT ( STDMETHODCALLTYPE *GetPointer )( + IAMMediaTypeSample * This, + /* [out] */ BYTE **ppBuffer); + + long ( STDMETHODCALLTYPE *GetSize )( + IAMMediaTypeSample * This); + + HRESULT ( STDMETHODCALLTYPE *GetTime )( + IAMMediaTypeSample * This, + /* [out] */ REFERENCE_TIME *pTimeStart, + /* [out] */ REFERENCE_TIME *pTimeEnd); + + HRESULT ( STDMETHODCALLTYPE *SetTime )( + IAMMediaTypeSample * This, + /* [in] */ REFERENCE_TIME *pTimeStart, + /* [in] */ REFERENCE_TIME *pTimeEnd); + + HRESULT ( STDMETHODCALLTYPE *IsSyncPoint )( + IAMMediaTypeSample * This); + + HRESULT ( STDMETHODCALLTYPE *SetSyncPoint )( + IAMMediaTypeSample * This, + BOOL bIsSyncPoint); + + HRESULT ( STDMETHODCALLTYPE *IsPreroll )( + IAMMediaTypeSample * This); + + HRESULT ( STDMETHODCALLTYPE *SetPreroll )( + IAMMediaTypeSample * This, + BOOL bIsPreroll); + + long ( STDMETHODCALLTYPE *GetActualDataLength )( + IAMMediaTypeSample * This); + + HRESULT ( STDMETHODCALLTYPE *SetActualDataLength )( + IAMMediaTypeSample * This, + long __MIDL_0017); + + HRESULT ( STDMETHODCALLTYPE *GetMediaType )( + IAMMediaTypeSample * This, + AM_MEDIA_TYPE **ppMediaType); + + HRESULT ( STDMETHODCALLTYPE *SetMediaType )( + IAMMediaTypeSample * This, + AM_MEDIA_TYPE *pMediaType); + + HRESULT ( STDMETHODCALLTYPE *IsDiscontinuity )( + IAMMediaTypeSample * This); + + HRESULT ( STDMETHODCALLTYPE *SetDiscontinuity )( + IAMMediaTypeSample * This, + BOOL bDiscontinuity); + + HRESULT ( STDMETHODCALLTYPE *GetMediaTime )( + IAMMediaTypeSample * This, + /* [out] */ LONGLONG *pTimeStart, + /* [out] */ LONGLONG *pTimeEnd); + + HRESULT ( STDMETHODCALLTYPE *SetMediaTime )( + IAMMediaTypeSample * This, + /* [in] */ LONGLONG *pTimeStart, + /* [in] */ LONGLONG *pTimeEnd); + + END_INTERFACE + } IAMMediaTypeSampleVtbl; + + interface IAMMediaTypeSample + { + CONST_VTBL struct IAMMediaTypeSampleVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMMediaTypeSample_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMMediaTypeSample_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMMediaTypeSample_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMMediaTypeSample_GetMediaStream(This,ppMediaStream) \ + (This)->lpVtbl -> GetMediaStream(This,ppMediaStream) + +#define IAMMediaTypeSample_GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime) \ + (This)->lpVtbl -> GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime) + +#define IAMMediaTypeSample_SetSampleTimes(This,pStartTime,pEndTime) \ + (This)->lpVtbl -> SetSampleTimes(This,pStartTime,pEndTime) + +#define IAMMediaTypeSample_Update(This,dwFlags,hEvent,pfnAPC,dwAPCData) \ + (This)->lpVtbl -> Update(This,dwFlags,hEvent,pfnAPC,dwAPCData) + +#define IAMMediaTypeSample_CompletionStatus(This,dwFlags,dwMilliseconds) \ + (This)->lpVtbl -> CompletionStatus(This,dwFlags,dwMilliseconds) + + +#define IAMMediaTypeSample_SetPointer(This,pBuffer,lSize) \ + (This)->lpVtbl -> SetPointer(This,pBuffer,lSize) + +#define IAMMediaTypeSample_GetPointer(This,ppBuffer) \ + (This)->lpVtbl -> GetPointer(This,ppBuffer) + +#define IAMMediaTypeSample_GetSize(This) \ + (This)->lpVtbl -> GetSize(This) + +#define IAMMediaTypeSample_GetTime(This,pTimeStart,pTimeEnd) \ + (This)->lpVtbl -> GetTime(This,pTimeStart,pTimeEnd) + +#define IAMMediaTypeSample_SetTime(This,pTimeStart,pTimeEnd) \ + (This)->lpVtbl -> SetTime(This,pTimeStart,pTimeEnd) + +#define IAMMediaTypeSample_IsSyncPoint(This) \ + (This)->lpVtbl -> IsSyncPoint(This) + +#define IAMMediaTypeSample_SetSyncPoint(This,bIsSyncPoint) \ + (This)->lpVtbl -> SetSyncPoint(This,bIsSyncPoint) + +#define IAMMediaTypeSample_IsPreroll(This) \ + (This)->lpVtbl -> IsPreroll(This) + +#define IAMMediaTypeSample_SetPreroll(This,bIsPreroll) \ + (This)->lpVtbl -> SetPreroll(This,bIsPreroll) + +#define IAMMediaTypeSample_GetActualDataLength(This) \ + (This)->lpVtbl -> GetActualDataLength(This) + +#define IAMMediaTypeSample_SetActualDataLength(This,__MIDL_0017) \ + (This)->lpVtbl -> SetActualDataLength(This,__MIDL_0017) + +#define IAMMediaTypeSample_GetMediaType(This,ppMediaType) \ + (This)->lpVtbl -> GetMediaType(This,ppMediaType) + +#define IAMMediaTypeSample_SetMediaType(This,pMediaType) \ + (This)->lpVtbl -> SetMediaType(This,pMediaType) + +#define IAMMediaTypeSample_IsDiscontinuity(This) \ + (This)->lpVtbl -> IsDiscontinuity(This) + +#define IAMMediaTypeSample_SetDiscontinuity(This,bDiscontinuity) \ + (This)->lpVtbl -> SetDiscontinuity(This,bDiscontinuity) + +#define IAMMediaTypeSample_GetMediaTime(This,pTimeStart,pTimeEnd) \ + (This)->lpVtbl -> GetMediaTime(This,pTimeStart,pTimeEnd) + +#define IAMMediaTypeSample_SetMediaTime(This,pTimeStart,pTimeEnd) \ + (This)->lpVtbl -> SetMediaTime(This,pTimeStart,pTimeEnd) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_SetPointer_Proxy( + IAMMediaTypeSample * This, + /* [in] */ BYTE *pBuffer, + /* [in] */ long lSize); + + +void __RPC_STUB IAMMediaTypeSample_SetPointer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_GetPointer_Proxy( + IAMMediaTypeSample * This, + /* [out] */ BYTE **ppBuffer); + + +void __RPC_STUB IAMMediaTypeSample_GetPointer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +long STDMETHODCALLTYPE IAMMediaTypeSample_GetSize_Proxy( + IAMMediaTypeSample * This); + + +void __RPC_STUB IAMMediaTypeSample_GetSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_GetTime_Proxy( + IAMMediaTypeSample * This, + /* [out] */ REFERENCE_TIME *pTimeStart, + /* [out] */ REFERENCE_TIME *pTimeEnd); + + +void __RPC_STUB IAMMediaTypeSample_GetTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_SetTime_Proxy( + IAMMediaTypeSample * This, + /* [in] */ REFERENCE_TIME *pTimeStart, + /* [in] */ REFERENCE_TIME *pTimeEnd); + + +void __RPC_STUB IAMMediaTypeSample_SetTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_IsSyncPoint_Proxy( + IAMMediaTypeSample * This); + + +void __RPC_STUB IAMMediaTypeSample_IsSyncPoint_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_SetSyncPoint_Proxy( + IAMMediaTypeSample * This, + BOOL bIsSyncPoint); + + +void __RPC_STUB IAMMediaTypeSample_SetSyncPoint_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_IsPreroll_Proxy( + IAMMediaTypeSample * This); + + +void __RPC_STUB IAMMediaTypeSample_IsPreroll_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_SetPreroll_Proxy( + IAMMediaTypeSample * This, + BOOL bIsPreroll); + + +void __RPC_STUB IAMMediaTypeSample_SetPreroll_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +long STDMETHODCALLTYPE IAMMediaTypeSample_GetActualDataLength_Proxy( + IAMMediaTypeSample * This); + + +void __RPC_STUB IAMMediaTypeSample_GetActualDataLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_SetActualDataLength_Proxy( + IAMMediaTypeSample * This, + long __MIDL_0017); + + +void __RPC_STUB IAMMediaTypeSample_SetActualDataLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_GetMediaType_Proxy( + IAMMediaTypeSample * This, + AM_MEDIA_TYPE **ppMediaType); + + +void __RPC_STUB IAMMediaTypeSample_GetMediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_SetMediaType_Proxy( + IAMMediaTypeSample * This, + AM_MEDIA_TYPE *pMediaType); + + +void __RPC_STUB IAMMediaTypeSample_SetMediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_IsDiscontinuity_Proxy( + IAMMediaTypeSample * This); + + +void __RPC_STUB IAMMediaTypeSample_IsDiscontinuity_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_SetDiscontinuity_Proxy( + IAMMediaTypeSample * This, + BOOL bDiscontinuity); + + +void __RPC_STUB IAMMediaTypeSample_SetDiscontinuity_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_GetMediaTime_Proxy( + IAMMediaTypeSample * This, + /* [out] */ LONGLONG *pTimeStart, + /* [out] */ LONGLONG *pTimeEnd); + + +void __RPC_STUB IAMMediaTypeSample_GetMediaTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMMediaTypeSample_SetMediaTime_Proxy( + IAMMediaTypeSample * This, + /* [in] */ LONGLONG *pTimeStart, + /* [in] */ LONGLONG *pTimeEnd); + + +void __RPC_STUB IAMMediaTypeSample_SetMediaTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMMediaTypeSample_INTERFACE_DEFINED__ */ + + + +#ifndef __DirectShowStreamLib_LIBRARY_DEFINED__ +#define __DirectShowStreamLib_LIBRARY_DEFINED__ + +/* library DirectShowStreamLib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_DirectShowStreamLib; + +EXTERN_C const CLSID CLSID_AMMultiMediaStream; + +#ifdef __cplusplus + +class DECLSPEC_UUID("49c47ce5-9ba4-11d0-8212-00c04fc32c45") +AMMultiMediaStream; +#endif +#endif /* __DirectShowStreamLib_LIBRARY_DEFINED__ */ + +/* interface __MIDL_itf_amstream_0387 */ +/* [local] */ + +#ifndef __cplusplus +EXTERN_C const CLSID CLSID_AMMultiMediaStream; +#endif +DEFINE_GUID(CLSID_AMDirectDrawStream, /* 49c47ce4-9ba4-11d0-8212-00c04fc32c45 */ +0x49c47ce4, 0x9ba4, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45); +DEFINE_GUID(CLSID_AMAudioStream, /* 8496e040-af4c-11d0-8212-00c04fc32c45 */ +0x8496e040, 0xaf4c, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45); +DEFINE_GUID(CLSID_AMAudioData, /* f2468580-af8a-11d0-8212-00c04fc32c45 */ +0xf2468580, 0xaf8a, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45); +DEFINE_GUID(CLSID_AMMediaTypeStream, /* CF0F2F7C-F7BF-11d0-900D-00C04FD9189D */ +0xcf0f2f7c, 0xf7bf, 0x11d0, 0x90, 0xd, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d); + + +extern RPC_IF_HANDLE __MIDL_itf_amstream_0387_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_amstream_0387_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * ); +unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * ); +unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); +void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/amva.h b/windows_libs/mssdk/include/amva.h new file mode 100644 index 00000000..156e98c2 --- /dev/null +++ b/windows_libs/mssdk/include/amva.h @@ -0,0 +1,85 @@ +//------------------------------------------------------------------------------ +// File: AMVA.h +// +// Desc: DirectShowMotionComp include file. +// +// Copyright (c) 1997 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __AMVA_INCLUDED__ +#define __AMVA_INCLUDED__ + +#ifdef __cplusplus +extern "C" { +#endif + + +#define AMVA_TYPEINDEX_OUTPUTFRAME 0xFFFFFFFF + +// Flags for QueryRenderStatus +#define AMVA_QUERYRENDERSTATUSF_READ 0x00000001 // Query for read + // set this bit to 0 + // if query for update + +typedef struct _tag_AMVAUncompBufferInfo +{ + DWORD dwMinNumSurfaces; // IN min number of surfaces to be allocated + DWORD dwMaxNumSurfaces; // IN max number of surfaces to be allocated + DDPIXELFORMAT ddUncompPixelFormat; // IN pixel format of surfaces to be allocated +} AMVAUncompBufferInfo, *LPAMVAUncompBufferInfo; + +typedef struct _tag_AMVAUncompDataInfo +{ + DWORD dwUncompWidth; // [in] width of uncompressed data + DWORD dwUncompHeight; // [in] height of uncompressed data + DDPIXELFORMAT ddUncompPixelFormat; // [in] pixel-format of uncompressed data +} AMVAUncompDataInfo, *LPAMVAUncompDataInfo; + +typedef struct _tag_AMVAInternalMemInfo +{ + DWORD dwScratchMemAlloc; // [out] amount of scratch memory will the hal allocate for its private use +} AMVAInternalMemInfo, *LPAMVAInternalMemInfo; + + +typedef struct _tag_AMVACompBufferInfo +{ + DWORD dwNumCompBuffers; // [out] number of buffers reqd for compressed data + DWORD dwWidthToCreate; // [out] Width of surface to create + DWORD dwHeightToCreate; // [out] Height of surface to create + DWORD dwBytesToAllocate; // [out] Total number of bytes used by each surface + DDSCAPS2 ddCompCaps; // [out] caps to create surfaces to store compressed data + DDPIXELFORMAT ddPixelFormat; // [out] fourcc to create surfaces to store compressed data +} AMVACompBufferInfo, *LPAMVACompBufferInfo; + + +// Note that you are NOT allowed to store any pointer in pMiscData +typedef struct _tag_AMVABeginFrameInfo +{ + DWORD dwDestSurfaceIndex; // IN destination buffer in which to decoding this frame + LPVOID pInputData; // IN pointer to misc data + DWORD dwSizeInputData; // IN size of other misc data to begin frame + LPVOID pOutputData; // OUT pointer to data which the VGA is going to fill + DWORD dwSizeOutputData; // IN size of data which the VGA is going to fill +} AMVABeginFrameInfo, *LPAMVABeginFrameInfo; + +// Note that you are NOT allowed to store any pointer in pMiscData +typedef struct _tag_AMVAEndFrameInfo +{ + DWORD dwSizeMiscData; // [in] size of other misc data to begin frame + LPVOID pMiscData; // [in] pointer to misc data +} AMVAEndFrameInfo, *LPAMVAEndFrameInfo; + +typedef struct _tag_AMVABUFFERINFO +{ + DWORD dwTypeIndex; // [in] Type of buffer + DWORD dwBufferIndex; // [in] Buffer index + DWORD dwDataOffset; // [in] offset of relevant data from the beginning of buffer + DWORD dwDataSize; // [in] size of relevant data +} AMVABUFFERINFO, *LPAMVABUFFERINFO; + +#ifdef __cplusplus +}; +#endif + +#endif // _AMVA_INCLUDED diff --git a/windows_libs/mssdk/include/amvideo.h b/windows_libs/mssdk/include/amvideo.h new file mode 100644 index 00000000..123c12c8 --- /dev/null +++ b/windows_libs/mssdk/include/amvideo.h @@ -0,0 +1,433 @@ +//------------------------------------------------------------------------------ +// File: AMVideo.h +// +// Desc: Video related definitions and interfaces for ActiveMovie. +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __AMVIDEO__ +#define __AMVIDEO__ + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +#include + + +// This is an interface on the video renderer that provides information about +// DirectDraw with respect to its use by the renderer. For example it allows +// an application to get details of the surface and any hardware capabilities +// that are available. It also allows someone to adjust the surfaces that the +// renderer should use and furthermore even set the DirectDraw instance. We +// allow someone to set the DirectDraw instance because DirectDraw can only +// be opened once per process so it helps resolve conflicts. There is some +// duplication in this interface as the hardware/emulated/FOURCCs available +// can all be found through the IDirectDraw interface, this interface allows +// simple access to that information without calling the DirectDraw provider +// itself. The AMDDS prefix is ActiveMovie DirectDraw Switches abbreviated. + +#define AMDDS_NONE 0x00 // No use for DCI/DirectDraw +#define AMDDS_DCIPS 0x01 // Use DCI primary surface +#define AMDDS_PS 0x02 // Use DirectDraw primary +#define AMDDS_RGBOVR 0x04 // RGB overlay surfaces +#define AMDDS_YUVOVR 0x08 // YUV overlay surfaces +#define AMDDS_RGBOFF 0x10 // RGB offscreen surfaces +#define AMDDS_YUVOFF 0x20 // YUV offscreen surfaces +#define AMDDS_RGBFLP 0x40 // RGB flipping surfaces +#define AMDDS_YUVFLP 0x80 // YUV flipping surfaces +#define AMDDS_ALL 0xFF // ALL the previous flags +#define AMDDS_DEFAULT AMDDS_ALL // Use all available surfaces + +#define AMDDS_YUV (AMDDS_YUVOFF | AMDDS_YUVOVR | AMDDS_YUVFLP) +#define AMDDS_RGB (AMDDS_RGBOFF | AMDDS_RGBOVR | AMDDS_RGBFLP) +#define AMDDS_PRIMARY (AMDDS_DCIPS | AMDDS_PS) + +// be nice to our friends in C +#undef INTERFACE +#define INTERFACE IDirectDrawVideo + +DECLARE_INTERFACE_(IDirectDrawVideo, IUnknown) +{ + // IUnknown methods + + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + // IDirectDrawVideo methods + + STDMETHOD(GetSwitches)(THIS_ DWORD *pSwitches) PURE; + STDMETHOD(SetSwitches)(THIS_ DWORD Switches) PURE; + STDMETHOD(GetCaps)(THIS_ DDCAPS *pCaps) PURE; + STDMETHOD(GetEmulatedCaps)(THIS_ DDCAPS *pCaps) PURE; + STDMETHOD(GetSurfaceDesc)(THIS_ DDSURFACEDESC *pSurfaceDesc) PURE; + STDMETHOD(GetFourCCCodes)(THIS_ DWORD *pCount,DWORD *pCodes) PURE; + STDMETHOD(SetDirectDraw)(THIS_ LPDIRECTDRAW pDirectDraw) PURE; + STDMETHOD(GetDirectDraw)(THIS_ LPDIRECTDRAW *ppDirectDraw) PURE; + STDMETHOD(GetSurfaceType)(THIS_ DWORD *pSurfaceType) PURE; + STDMETHOD(SetDefault)(THIS) PURE; + STDMETHOD(UseScanLine)(THIS_ long UseScanLine) PURE; + STDMETHOD(CanUseScanLine)(THIS_ long *UseScanLine) PURE; + STDMETHOD(UseOverlayStretch)(THIS_ long UseOverlayStretch) PURE; + STDMETHOD(CanUseOverlayStretch)(THIS_ long *UseOverlayStretch) PURE; + STDMETHOD(UseWhenFullScreen)(THIS_ long UseWhenFullScreen) PURE; + STDMETHOD(WillUseFullScreen)(THIS_ long *UseWhenFullScreen) PURE; +}; + + +// be nice to our friends in C +#undef INTERFACE +#define INTERFACE IQualProp + +DECLARE_INTERFACE_(IQualProp, IUnknown) +{ + // IUnknown methods + + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + // Compare these with the functions in class CGargle in gargle.h + + STDMETHOD(get_FramesDroppedInRenderer)(THIS_ int *pcFrames) PURE; // Out + STDMETHOD(get_FramesDrawn)(THIS_ int *pcFramesDrawn) PURE; // Out + STDMETHOD(get_AvgFrameRate)(THIS_ int *piAvgFrameRate) PURE; // Out + STDMETHOD(get_Jitter)(THIS_ int *iJitter) PURE; // Out + STDMETHOD(get_AvgSyncOffset)(THIS_ int *piAvg) PURE; // Out + STDMETHOD(get_DevSyncOffset)(THIS_ int *piDev) PURE; // Out +}; + + +// This interface allows an application or plug in distributor to control a +// full screen renderer. The Modex renderer supports this interface. When +// connected a renderer should load the display modes it has available +// The number of modes available can be obtained through CountModes. Then +// information on each individual mode is available by calling GetModeInfo +// and IsModeAvailable. An application may enable and disable any modes +// by calling the SetEnabled flag with OATRUE or OAFALSE (not C/C++ TRUE +// and FALSE values) - the current value may be queried by IsModeEnabled + +// A more generic way of setting the modes enabled that is easier to use +// when writing applications is the clip loss factor. This defines the +// amount of video that can be lost when deciding which display mode to +// use. Assuming the decoder cannot compress the video then playing an +// MPEG file (say 352x288) into a 320x200 display will lose about 25% of +// the image. The clip loss factor specifies the upper range permissible. +// To allow typical MPEG video to be played in 320x200 it defaults to 25% + +// be nice to our friends in C +#undef INTERFACE +#define INTERFACE IFullScreenVideo + +DECLARE_INTERFACE_(IFullScreenVideo, IUnknown) +{ + // IUnknown methods + + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + // IFullScreenVideo methods + + STDMETHOD(CountModes)(THIS_ long *pModes) PURE; + STDMETHOD(GetModeInfo)(THIS_ long Mode,long *pWidth,long *pHeight,long *pDepth) PURE; + STDMETHOD(GetCurrentMode)(THIS_ long *pMode) PURE; + STDMETHOD(IsModeAvailable)(THIS_ long Mode) PURE; + STDMETHOD(IsModeEnabled)(THIS_ long Mode) PURE; + STDMETHOD(SetEnabled)(THIS_ long Mode,long bEnabled) PURE; + STDMETHOD(GetClipFactor)(THIS_ long *pClipFactor) PURE; + STDMETHOD(SetClipFactor)(THIS_ long ClipFactor) PURE; + STDMETHOD(SetMessageDrain)(THIS_ HWND hwnd) PURE; + STDMETHOD(GetMessageDrain)(THIS_ HWND *hwnd) PURE; + STDMETHOD(SetMonitor)(THIS_ long Monitor) PURE; + STDMETHOD(GetMonitor)(THIS_ long *Monitor) PURE; + STDMETHOD(HideOnDeactivate)(THIS_ long Hide) PURE; + STDMETHOD(IsHideOnDeactivate)(THIS) PURE; + STDMETHOD(SetCaption)(THIS_ BSTR strCaption) PURE; + STDMETHOD(GetCaption)(THIS_ BSTR *pstrCaption) PURE; + STDMETHOD(SetDefault)(THIS) PURE; +}; + + +// This adds the accelerator table capabilities in fullscreen. This is being +// added between the original runtime release and the full SDK release. We +// cannot just add the method to IFullScreenVideo as we don't want to force +// applications to have to ship the ActiveMovie support DLLs - this is very +// important to applications that plan on being downloaded over the Internet + +// be nice to our friends in C +#undef INTERFACE +#define INTERFACE IFullScreenVideoEx + +DECLARE_INTERFACE_(IFullScreenVideoEx, IFullScreenVideo) +{ + // IUnknown methods + + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID *ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + // IFullScreenVideo methods + + STDMETHOD(CountModes)(THIS_ long *pModes) PURE; + STDMETHOD(GetModeInfo)(THIS_ long Mode,long *pWidth,long *pHeight,long *pDepth) PURE; + STDMETHOD(GetCurrentMode)(THIS_ long *pMode) PURE; + STDMETHOD(IsModeAvailable)(THIS_ long Mode) PURE; + STDMETHOD(IsModeEnabled)(THIS_ long Mode) PURE; + STDMETHOD(SetEnabled)(THIS_ long Mode,long bEnabled) PURE; + STDMETHOD(GetClipFactor)(THIS_ long *pClipFactor) PURE; + STDMETHOD(SetClipFactor)(THIS_ long ClipFactor) PURE; + STDMETHOD(SetMessageDrain)(THIS_ HWND hwnd) PURE; + STDMETHOD(GetMessageDrain)(THIS_ HWND *hwnd) PURE; + STDMETHOD(SetMonitor)(THIS_ long Monitor) PURE; + STDMETHOD(GetMonitor)(THIS_ long *Monitor) PURE; + STDMETHOD(HideOnDeactivate)(THIS_ long Hide) PURE; + STDMETHOD(IsHideOnDeactivate)(THIS) PURE; + STDMETHOD(SetCaption)(THIS_ BSTR strCaption) PURE; + STDMETHOD(GetCaption)(THIS_ BSTR *pstrCaption) PURE; + STDMETHOD(SetDefault)(THIS) PURE; + + // IFullScreenVideoEx + + STDMETHOD(SetAcceleratorTable)(THIS_ HWND hwnd,HACCEL hAccel) PURE; + STDMETHOD(GetAcceleratorTable)(THIS_ HWND *phwnd,HACCEL *phAccel) PURE; + STDMETHOD(KeepPixelAspectRatio)(THIS_ long KeepAspect) PURE; + STDMETHOD(IsKeepPixelAspectRatio)(THIS_ long *pKeepAspect) PURE; +}; + + +// The SDK base classes contain a base video mixer class. Video mixing in a +// software environment is tricky because we typically have multiple streams +// each sending data at unpredictable times. To work with this we defined a +// pin that is the lead pin, when data arrives on this pin we do a mix. As +// an alternative we may not want to have a lead pin but output samples at +// predefined spaces, like one every 1/15 of a second, this interfaces also +// supports that mode of operations (there is a working video mixer sample) + +// be nice to our friends in C +#undef INTERFACE +#define INTERFACE IBaseVideoMixer + +DECLARE_INTERFACE_(IBaseVideoMixer, IUnknown) +{ + STDMETHOD(SetLeadPin)(THIS_ int iPin) PURE; + STDMETHOD(GetLeadPin)(THIS_ int *piPin) PURE; + STDMETHOD(GetInputPinCount)(THIS_ int *piPinCount) PURE; + STDMETHOD(IsUsingClock)(THIS_ int *pbValue) PURE; + STDMETHOD(SetUsingClock)(THIS_ int bValue) PURE; + STDMETHOD(GetClockPeriod)(THIS_ int *pbValue) PURE; + STDMETHOD(SetClockPeriod)(THIS_ int bValue) PURE; +}; + +#define iPALETTE_COLORS 256 // Maximum colours in palette +#define iEGA_COLORS 16 // Number colours in EGA palette +#define iMASK_COLORS 3 // Maximum three components +#define iTRUECOLOR 16 // Minimum true colour device +#define iRED 0 // Index position for RED mask +#define iGREEN 1 // Index position for GREEN mask +#define iBLUE 2 // Index position for BLUE mask +#define iPALETTE 8 // Maximum colour depth using a palette +#define iMAXBITS 8 // Maximum bits per colour component + + +// Used for true colour images that also have a palette + +typedef struct tag_TRUECOLORINFO { + DWORD dwBitMasks[iMASK_COLORS]; + RGBQUAD bmiColors[iPALETTE_COLORS]; +} TRUECOLORINFO; + + +// The BITMAPINFOHEADER contains all the details about the video stream such +// as the actual image dimensions and their pixel depth. A source filter may +// also request that the sink take only a section of the video by providing a +// clipping rectangle in rcSource. In the worst case where the sink filter +// forgets to check this on connection it will simply render the whole thing +// which isn't a disaster. Ideally a sink filter will check the rcSource and +// if it doesn't support image extraction and the rectangle is not empty then +// it will reject the connection. A filter should use SetRectEmpty to reset a +// rectangle to all zeroes (and IsRectEmpty to later check the rectangle). +// The rcTarget specifies the destination rectangle for the video, for most +// source filters they will set this to all zeroes, a downstream filter may +// request that the video be placed in a particular area of the buffers it +// supplies in which case it will call QueryAccept with a non empty target + +typedef struct tagVIDEOINFOHEADER { + + RECT rcSource; // The bit we really want to use + RECT rcTarget; // Where the video should go + DWORD dwBitRate; // Approximate bit data rate + DWORD dwBitErrorRate; // Bit error rate for this stream + REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units) + + BITMAPINFOHEADER bmiHeader; + +} VIDEOINFOHEADER; + +// make sure the pbmi is initialized before using these macros +#define TRUECOLOR(pbmi) ((TRUECOLORINFO *)(((LPBYTE)&((pbmi)->bmiHeader)) \ + + (pbmi)->bmiHeader.biSize)) +#define COLORS(pbmi) ((RGBQUAD *)(((LPBYTE)&((pbmi)->bmiHeader)) \ + + (pbmi)->bmiHeader.biSize)) +#define BITMASKS(pbmi) ((DWORD *)(((LPBYTE)&((pbmi)->bmiHeader)) \ + + (pbmi)->bmiHeader.biSize)) + +// All the image based filters use this to communicate their media types. It's +// centred principally around the BITMAPINFO. This structure always contains a +// BITMAPINFOHEADER followed by a number of other fields depending on what the +// BITMAPINFOHEADER contains. If it contains details of a palettised format it +// will be followed by one or more RGBQUADs defining the palette. If it holds +// details of a true colour format then it may be followed by a set of three +// DWORD bit masks that specify where the RGB data can be found in the image +// (For more information regarding BITMAPINFOs see the Win32 documentation) + +// The rcSource and rcTarget fields are not for use by filters supplying the +// data. The destination (target) rectangle should be set to all zeroes. The +// source may also be zero filled or set with the dimensions of the video. So +// if the video is 352x288 pixels then set it to (0,0,352,288). These fields +// are mainly used by downstream filters that want to ask the source filter +// to place the image in a different position in an output buffer. So when +// using for example the primary surface the video renderer may ask a filter +// to place the video images in a destination position of (100,100,452,388) +// on the display since that's where the window is positioned on the display + +// !!! WARNING !!! +// DO NOT use this structure unless you are sure that the BITMAPINFOHEADER +// has a normal biSize == sizeof(BITMAPINFOHEADER) ! +// !!! WARNING !!! + +typedef struct tagVIDEOINFO { + + RECT rcSource; // The bit we really want to use + RECT rcTarget; // Where the video should go + DWORD dwBitRate; // Approximate bit data rate + DWORD dwBitErrorRate; // Bit error rate for this stream + REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units) + + BITMAPINFOHEADER bmiHeader; + + union { + RGBQUAD bmiColors[iPALETTE_COLORS]; // Colour palette + DWORD dwBitMasks[iMASK_COLORS]; // True colour masks + TRUECOLORINFO TrueColorInfo; // Both of the above + }; + +} VIDEOINFO; + +// These macros define some standard bitmap format sizes + +#define SIZE_EGA_PALETTE (iEGA_COLORS * sizeof(RGBQUAD)) +#define SIZE_PALETTE (iPALETTE_COLORS * sizeof(RGBQUAD)) +#define SIZE_MASKS (iMASK_COLORS * sizeof(DWORD)) +#define SIZE_PREHEADER (FIELD_OFFSET(VIDEOINFOHEADER,bmiHeader)) +#define SIZE_VIDEOHEADER (sizeof(BITMAPINFOHEADER) + SIZE_PREHEADER) +// !!! for abnormal biSizes +// #define SIZE_VIDEOHEADER(pbmi) ((pbmi)->bmiHeader.biSize + SIZE_PREHEADER) + +// DIBSIZE calculates the number of bytes required by an image + +#define WIDTHBYTES(bits) ((DWORD)(((bits)+31) & (~31)) / 8) +#define DIBWIDTHBYTES(bi) (DWORD)WIDTHBYTES((DWORD)(bi).biWidth * (DWORD)(bi).biBitCount) +#define _DIBSIZE(bi) (DIBWIDTHBYTES(bi) * (DWORD)(bi).biHeight) +#define DIBSIZE(bi) ((bi).biHeight < 0 ? (-1)*(_DIBSIZE(bi)) : _DIBSIZE(bi)) + +// This compares the bit masks between two VIDEOINFOHEADERs + +#define BIT_MASKS_MATCH(pbmi1,pbmi2) \ + (((pbmi1)->dwBitMasks[iRED] == (pbmi2)->dwBitMasks[iRED]) && \ + ((pbmi1)->dwBitMasks[iGREEN] == (pbmi2)->dwBitMasks[iGREEN]) && \ + ((pbmi1)->dwBitMasks[iBLUE] == (pbmi2)->dwBitMasks[iBLUE])) + +// These zero fill different parts of the VIDEOINFOHEADER structure + +// Only use these macros for pbmi's with a normal BITMAPINFOHEADER biSize +#define RESET_MASKS(pbmi) (ZeroMemory((PVOID)(pbmi)->dwBitFields,SIZE_MASKS)) +#define RESET_HEADER(pbmi) (ZeroMemory((PVOID)(pbmi),SIZE_VIDEOHEADER)) +#define RESET_PALETTE(pbmi) (ZeroMemory((PVOID)(pbmi)->bmiColors,SIZE_PALETTE)); + +#if 0 +// !!! This is the right way to do it, but may break existing code +#define RESET_MASKS(pbmi) (ZeroMemory((PVOID)(((LPBYTE)(pbmi)->bmiHeader) + \ + (pbmi)->bmiHeader.biSize,SIZE_MASKS))) +#define RESET_HEADER(pbmi) (ZeroMemory((PVOID)(pbmi), SIZE_PREHEADER + \ + sizeof(BITMAPINFOHEADER))) +#define RESET_PALETTE(pbmi) (ZeroMemory((PVOID)(((LPBYTE)(pbmi)->bmiHeader) + \ + (pbmi)->bmiHeader.biSize,SIZE_PALETTE)) +#endif + +// Other (hopefully) useful bits and bobs + +#define PALETTISED(pbmi) ((pbmi)->bmiHeader.biBitCount <= iPALETTE) +#define PALETTE_ENTRIES(pbmi) ((DWORD) 1 << (pbmi)->bmiHeader.biBitCount) + +// Returns the address of the BITMAPINFOHEADER from the VIDEOINFOHEADER +#define HEADER(pVideoInfo) (&(((VIDEOINFOHEADER *) (pVideoInfo))->bmiHeader)) + + +// MPEG variant - includes a DWORD length followed by the +// video sequence header after the video header. +// +// The sequence header includes the sequence header start code and the +// quantization matrices associated with the first sequence header in the +// stream so is a maximum of 140 bytes long. + +typedef struct tagMPEG1VIDEOINFO { + + VIDEOINFOHEADER hdr; // Compatible with VIDEOINFO + DWORD dwStartTimeCode; // 25-bit Group of pictures time code + // at start of data + DWORD cbSequenceHeader; // Length in bytes of bSequenceHeader + BYTE bSequenceHeader[1]; // Sequence header including + // quantization matrices if any +} MPEG1VIDEOINFO; + +#define MAX_SIZE_MPEG1_SEQUENCE_INFO 140 +#define SIZE_MPEG1VIDEOINFO(pv) (FIELD_OFFSET(MPEG1VIDEOINFO, bSequenceHeader[0]) + (pv)->cbSequenceHeader) +#define MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader) + + +// Analog video variant - Use this when the format is FORMAT_AnalogVideo +// +// rcSource defines the portion of the active video signal to use +// rcTarget defines the destination rectangle +// both of the above are relative to the dwActiveWidth and dwActiveHeight fields +// dwActiveWidth is currently set to 720 for all formats (but could change for HDTV) +// dwActiveHeight is 483 for NTSC and 575 for PAL/SECAM (but could change for HDTV) + +typedef struct tagAnalogVideoInfo { + RECT rcSource; // Width max is 720, height varies w/ TransmissionStd + RECT rcTarget; // Where the video should go + DWORD dwActiveWidth; // Always 720 (CCIR-601 active samples per line) + DWORD dwActiveHeight; // 483 for NTSC, 575 for PAL/SECAM + REFERENCE_TIME AvgTimePerFrame; // Normal ActiveMovie units (100 nS) +} ANALOGVIDEOINFO; + +// +// AM_KSPROPSETID_FrameStep property set definitions +// +typedef enum { + // Step + AM_PROPERTY_FRAMESTEP_STEP = 0x01, + AM_PROPERTY_FRAMESTEP_CANCEL = 0x02, + + // S_OK for these 2 means we can - S_FALSE if we can't + AM_PROPERTY_FRAMESTEP_CANSTEP = 0x03, + AM_PROPERTY_FRAMESTEP_CANSTEPMULTIPLE = 0x04 +} AM_PROPERTY_FRAMESTEP; + +typedef struct _AM_FRAMESTEP_STEP +{ + // 1 means step 1 frame forward + // 0 is invalid + // n (n > 1) means skip n - 1 frames and show the nth + DWORD dwFramesToStep; +} AM_FRAMESTEP_STEP; + +#ifdef __cplusplus +} +#endif // __cplusplus +#endif // __AMVIDEO__ + diff --git a/windows_libs/mssdk/include/atsmedia.h b/windows_libs/mssdk/include/atsmedia.h new file mode 100644 index 00000000..af26b358 --- /dev/null +++ b/windows_libs/mssdk/include/atsmedia.h @@ -0,0 +1,34 @@ +//------------------------------------------------------------------------------ +// File: ATSMedia.h +// +// Desc: Broadcast Driver Architecture Media Definitions for ATSC +// +// Copyright (c) 1996 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#if !defined(_KSMEDIA_) +#error KSMEDIA.H must be included before BDAMEDIA.H +#endif // !defined(_KSMEDIA_) + +#if !defined(_BDAMEDIA_) +#error BDAMEDIA.H must be included before ATSCMEDIA.H +#endif // !defined(_KSMEDIA_) + +#if !defined(_ATSCMEDIA_) +#define _ATSCMEDIA_ + + +//=========================================================================== +// +// ATSC Network Type +// +//=========================================================================== + +#define STATIC_BDANETWORKTYPE_ATSC\ + 0x71985f51, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("71985F51-1CA1-11d3-9CC8-00C04F7971E0", BDANETWORKTYPE_ATSC); +#define BDANETWORKTYPE_ATSC DEFINE_GUIDNAMED(BDANETWORKTYPE_ATSC) + + +#endif // _ATSCMEDIA_ diff --git a/windows_libs/mssdk/include/audevcod.h b/windows_libs/mssdk/include/audevcod.h new file mode 100644 index 00000000..0cdf80da --- /dev/null +++ b/windows_libs/mssdk/include/audevcod.h @@ -0,0 +1,53 @@ +//------------------------------------------------------------------------------ +// File: AudEvCod.h +// +// Desc: List of Audio device error event codes and the expected params. +// +// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + + +#ifndef __AUDEVCOD__ +#define __AUDEVCOD__ + + +#define EC_SND_DEVICE_ERROR_BASE 0x0200 + +typedef enum _tagSND_DEVICE_ERROR { + + SNDDEV_ERROR_Open=1, + SNDDEV_ERROR_Close=2, + SNDDEV_ERROR_GetCaps=3, + SNDDEV_ERROR_PrepareHeader=4, + SNDDEV_ERROR_UnprepareHeader=5, + SNDDEV_ERROR_Reset=6, + SNDDEV_ERROR_Restart=7, + SNDDEV_ERROR_GetPosition=8, + SNDDEV_ERROR_Write=9, + SNDDEV_ERROR_Pause=10, + SNDDEV_ERROR_Stop=11, + SNDDEV_ERROR_Start=12, + SNDDEV_ERROR_AddBuffer=13, + SNDDEV_ERROR_Query=14, + +} SNDDEV_ERR; + + +// Sound device error event codes +// ============================== +// +// All audio device error events are always passed on to the application, and are +// never processed by the filter graph + + +#define EC_SNDDEV_IN_ERROR (EC_SND_DEVICE_ERROR_BASE + 0x00) +#define EC_SNDDEV_OUT_ERROR (EC_SND_DEVICE_ERROR_BASE + 0x01) +// Parameters: ( DWORD, DWORD) +// lParam1 is an enum SND_DEVICE_ERROR which notifies the app how the device was +// being accessed when the failure occurred. +// +// lParam2 is the error returned from the sound device call. +// + +#endif // __AUDEVCOD__ diff --git a/windows_libs/mssdk/include/austream.h b/windows_libs/mssdk/include/austream.h new file mode 100644 index 00000000..51a2cc45 --- /dev/null +++ b/windows_libs/mssdk/include/austream.h @@ -0,0 +1,715 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0338 */ +/* Compiler settings for austream.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __austream_h__ +#define __austream_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IAudioMediaStream_FWD_DEFINED__ +#define __IAudioMediaStream_FWD_DEFINED__ +typedef interface IAudioMediaStream IAudioMediaStream; +#endif /* __IAudioMediaStream_FWD_DEFINED__ */ + + +#ifndef __IAudioStreamSample_FWD_DEFINED__ +#define __IAudioStreamSample_FWD_DEFINED__ +typedef interface IAudioStreamSample IAudioStreamSample; +#endif /* __IAudioStreamSample_FWD_DEFINED__ */ + + +#ifndef __IMemoryData_FWD_DEFINED__ +#define __IMemoryData_FWD_DEFINED__ +typedef interface IMemoryData IMemoryData; +#endif /* __IMemoryData_FWD_DEFINED__ */ + + +#ifndef __IAudioData_FWD_DEFINED__ +#define __IAudioData_FWD_DEFINED__ +typedef interface IAudioData IAudioData; +#endif /* __IAudioData_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "unknwn.h" +#include "mmstream.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_austream_0000 */ +/* [local] */ + +// +// The following declarations within the 'if 0' block are dummy typedefs used to make +// the ddstream.idl file build. The actual definitions are contained in DDRAW.H +// +#if 0 +typedef struct tWAVEFORMATEX WAVEFORMATEX; + +#endif + + + + + + +extern RPC_IF_HANDLE __MIDL_itf_austream_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_austream_0000_v0_0_s_ifspec; + +#ifndef __IAudioMediaStream_INTERFACE_DEFINED__ +#define __IAudioMediaStream_INTERFACE_DEFINED__ + +/* interface IAudioMediaStream */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IAudioMediaStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("f7537560-a3be-11d0-8212-00c04fc32c45") + IAudioMediaStream : public IMediaStream + { + public: + virtual HRESULT STDMETHODCALLTYPE GetFormat( + /* [out] */ WAVEFORMATEX *pWaveFormatCurrent) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFormat( + /* [in] */ const WAVEFORMATEX *lpWaveFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSample( + /* [in] */ IAudioData *pAudioData, + /* [in] */ DWORD dwFlags, + /* [out] */ IAudioStreamSample **ppSample) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAudioMediaStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAudioMediaStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAudioMediaStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAudioMediaStream * This); + + HRESULT ( STDMETHODCALLTYPE *GetMultiMediaStream )( + IAudioMediaStream * This, + /* [out] */ IMultiMediaStream **ppMultiMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetInformation )( + IAudioMediaStream * This, + /* [out] */ MSPID *pPurposeId, + /* [out] */ STREAM_TYPE *pType); + + HRESULT ( STDMETHODCALLTYPE *SetSameFormat )( + IAudioMediaStream * This, + /* [in] */ IMediaStream *pStreamThatHasDesiredFormat, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *AllocateSample )( + IAudioMediaStream * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppSample); + + HRESULT ( STDMETHODCALLTYPE *CreateSharedSample )( + IAudioMediaStream * This, + /* [in] */ IStreamSample *pExistingSample, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppNewSample); + + HRESULT ( STDMETHODCALLTYPE *SendEndOfStream )( + IAudioMediaStream * This, + DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetFormat )( + IAudioMediaStream * This, + /* [out] */ WAVEFORMATEX *pWaveFormatCurrent); + + HRESULT ( STDMETHODCALLTYPE *SetFormat )( + IAudioMediaStream * This, + /* [in] */ const WAVEFORMATEX *lpWaveFormat); + + HRESULT ( STDMETHODCALLTYPE *CreateSample )( + IAudioMediaStream * This, + /* [in] */ IAudioData *pAudioData, + /* [in] */ DWORD dwFlags, + /* [out] */ IAudioStreamSample **ppSample); + + END_INTERFACE + } IAudioMediaStreamVtbl; + + interface IAudioMediaStream + { + CONST_VTBL struct IAudioMediaStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAudioMediaStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAudioMediaStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAudioMediaStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAudioMediaStream_GetMultiMediaStream(This,ppMultiMediaStream) \ + (This)->lpVtbl -> GetMultiMediaStream(This,ppMultiMediaStream) + +#define IAudioMediaStream_GetInformation(This,pPurposeId,pType) \ + (This)->lpVtbl -> GetInformation(This,pPurposeId,pType) + +#define IAudioMediaStream_SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) \ + (This)->lpVtbl -> SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) + +#define IAudioMediaStream_AllocateSample(This,dwFlags,ppSample) \ + (This)->lpVtbl -> AllocateSample(This,dwFlags,ppSample) + +#define IAudioMediaStream_CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) \ + (This)->lpVtbl -> CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) + +#define IAudioMediaStream_SendEndOfStream(This,dwFlags) \ + (This)->lpVtbl -> SendEndOfStream(This,dwFlags) + + +#define IAudioMediaStream_GetFormat(This,pWaveFormatCurrent) \ + (This)->lpVtbl -> GetFormat(This,pWaveFormatCurrent) + +#define IAudioMediaStream_SetFormat(This,lpWaveFormat) \ + (This)->lpVtbl -> SetFormat(This,lpWaveFormat) + +#define IAudioMediaStream_CreateSample(This,pAudioData,dwFlags,ppSample) \ + (This)->lpVtbl -> CreateSample(This,pAudioData,dwFlags,ppSample) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAudioMediaStream_GetFormat_Proxy( + IAudioMediaStream * This, + /* [out] */ WAVEFORMATEX *pWaveFormatCurrent); + + +void __RPC_STUB IAudioMediaStream_GetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAudioMediaStream_SetFormat_Proxy( + IAudioMediaStream * This, + /* [in] */ const WAVEFORMATEX *lpWaveFormat); + + +void __RPC_STUB IAudioMediaStream_SetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAudioMediaStream_CreateSample_Proxy( + IAudioMediaStream * This, + /* [in] */ IAudioData *pAudioData, + /* [in] */ DWORD dwFlags, + /* [out] */ IAudioStreamSample **ppSample); + + +void __RPC_STUB IAudioMediaStream_CreateSample_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAudioMediaStream_INTERFACE_DEFINED__ */ + + +#ifndef __IAudioStreamSample_INTERFACE_DEFINED__ +#define __IAudioStreamSample_INTERFACE_DEFINED__ + +/* interface IAudioStreamSample */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IAudioStreamSample; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("345fee00-aba5-11d0-8212-00c04fc32c45") + IAudioStreamSample : public IStreamSample + { + public: + virtual HRESULT STDMETHODCALLTYPE GetAudioData( + /* [out] */ IAudioData **ppAudio) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAudioStreamSampleVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAudioStreamSample * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAudioStreamSample * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAudioStreamSample * This); + + HRESULT ( STDMETHODCALLTYPE *GetMediaStream )( + IAudioStreamSample * This, + /* [in] */ IMediaStream **ppMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetSampleTimes )( + IAudioStreamSample * This, + /* [out] */ STREAM_TIME *pStartTime, + /* [out] */ STREAM_TIME *pEndTime, + /* [out] */ STREAM_TIME *pCurrentTime); + + HRESULT ( STDMETHODCALLTYPE *SetSampleTimes )( + IAudioStreamSample * This, + /* [in] */ const STREAM_TIME *pStartTime, + /* [in] */ const STREAM_TIME *pEndTime); + + HRESULT ( STDMETHODCALLTYPE *Update )( + IAudioStreamSample * This, + /* [in] */ DWORD dwFlags, + /* [in] */ HANDLE hEvent, + /* [in] */ PAPCFUNC pfnAPC, + /* [in] */ DWORD_PTR dwAPCData); + + HRESULT ( STDMETHODCALLTYPE *CompletionStatus )( + IAudioStreamSample * This, + /* [in] */ DWORD dwFlags, + /* [in] */ DWORD dwMilliseconds); + + HRESULT ( STDMETHODCALLTYPE *GetAudioData )( + IAudioStreamSample * This, + /* [out] */ IAudioData **ppAudio); + + END_INTERFACE + } IAudioStreamSampleVtbl; + + interface IAudioStreamSample + { + CONST_VTBL struct IAudioStreamSampleVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAudioStreamSample_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAudioStreamSample_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAudioStreamSample_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAudioStreamSample_GetMediaStream(This,ppMediaStream) \ + (This)->lpVtbl -> GetMediaStream(This,ppMediaStream) + +#define IAudioStreamSample_GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime) \ + (This)->lpVtbl -> GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime) + +#define IAudioStreamSample_SetSampleTimes(This,pStartTime,pEndTime) \ + (This)->lpVtbl -> SetSampleTimes(This,pStartTime,pEndTime) + +#define IAudioStreamSample_Update(This,dwFlags,hEvent,pfnAPC,dwAPCData) \ + (This)->lpVtbl -> Update(This,dwFlags,hEvent,pfnAPC,dwAPCData) + +#define IAudioStreamSample_CompletionStatus(This,dwFlags,dwMilliseconds) \ + (This)->lpVtbl -> CompletionStatus(This,dwFlags,dwMilliseconds) + + +#define IAudioStreamSample_GetAudioData(This,ppAudio) \ + (This)->lpVtbl -> GetAudioData(This,ppAudio) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAudioStreamSample_GetAudioData_Proxy( + IAudioStreamSample * This, + /* [out] */ IAudioData **ppAudio); + + +void __RPC_STUB IAudioStreamSample_GetAudioData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAudioStreamSample_INTERFACE_DEFINED__ */ + + +#ifndef __IMemoryData_INTERFACE_DEFINED__ +#define __IMemoryData_INTERFACE_DEFINED__ + +/* interface IMemoryData */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IMemoryData; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("327fc560-af60-11d0-8212-00c04fc32c45") + IMemoryData : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetBuffer( + /* [in] */ DWORD cbSize, + /* [in] */ BYTE *pbData, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInfo( + /* [out] */ DWORD *pdwLength, + /* [out] */ BYTE **ppbData, + /* [out] */ DWORD *pcbActualData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetActual( + /* [in] */ DWORD cbDataValid) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMemoryDataVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMemoryData * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMemoryData * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMemoryData * This); + + HRESULT ( STDMETHODCALLTYPE *SetBuffer )( + IMemoryData * This, + /* [in] */ DWORD cbSize, + /* [in] */ BYTE *pbData, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetInfo )( + IMemoryData * This, + /* [out] */ DWORD *pdwLength, + /* [out] */ BYTE **ppbData, + /* [out] */ DWORD *pcbActualData); + + HRESULT ( STDMETHODCALLTYPE *SetActual )( + IMemoryData * This, + /* [in] */ DWORD cbDataValid); + + END_INTERFACE + } IMemoryDataVtbl; + + interface IMemoryData + { + CONST_VTBL struct IMemoryDataVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMemoryData_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMemoryData_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMemoryData_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMemoryData_SetBuffer(This,cbSize,pbData,dwFlags) \ + (This)->lpVtbl -> SetBuffer(This,cbSize,pbData,dwFlags) + +#define IMemoryData_GetInfo(This,pdwLength,ppbData,pcbActualData) \ + (This)->lpVtbl -> GetInfo(This,pdwLength,ppbData,pcbActualData) + +#define IMemoryData_SetActual(This,cbDataValid) \ + (This)->lpVtbl -> SetActual(This,cbDataValid) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMemoryData_SetBuffer_Proxy( + IMemoryData * This, + /* [in] */ DWORD cbSize, + /* [in] */ BYTE *pbData, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IMemoryData_SetBuffer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMemoryData_GetInfo_Proxy( + IMemoryData * This, + /* [out] */ DWORD *pdwLength, + /* [out] */ BYTE **ppbData, + /* [out] */ DWORD *pcbActualData); + + +void __RPC_STUB IMemoryData_GetInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMemoryData_SetActual_Proxy( + IMemoryData * This, + /* [in] */ DWORD cbDataValid); + + +void __RPC_STUB IMemoryData_SetActual_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMemoryData_INTERFACE_DEFINED__ */ + + +#ifndef __IAudioData_INTERFACE_DEFINED__ +#define __IAudioData_INTERFACE_DEFINED__ + +/* interface IAudioData */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IAudioData; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("54c719c0-af60-11d0-8212-00c04fc32c45") + IAudioData : public IMemoryData + { + public: + virtual HRESULT STDMETHODCALLTYPE GetFormat( + /* [out] */ WAVEFORMATEX *pWaveFormatCurrent) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFormat( + /* [in] */ const WAVEFORMATEX *lpWaveFormat) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAudioDataVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAudioData * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAudioData * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAudioData * This); + + HRESULT ( STDMETHODCALLTYPE *SetBuffer )( + IAudioData * This, + /* [in] */ DWORD cbSize, + /* [in] */ BYTE *pbData, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetInfo )( + IAudioData * This, + /* [out] */ DWORD *pdwLength, + /* [out] */ BYTE **ppbData, + /* [out] */ DWORD *pcbActualData); + + HRESULT ( STDMETHODCALLTYPE *SetActual )( + IAudioData * This, + /* [in] */ DWORD cbDataValid); + + HRESULT ( STDMETHODCALLTYPE *GetFormat )( + IAudioData * This, + /* [out] */ WAVEFORMATEX *pWaveFormatCurrent); + + HRESULT ( STDMETHODCALLTYPE *SetFormat )( + IAudioData * This, + /* [in] */ const WAVEFORMATEX *lpWaveFormat); + + END_INTERFACE + } IAudioDataVtbl; + + interface IAudioData + { + CONST_VTBL struct IAudioDataVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAudioData_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAudioData_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAudioData_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAudioData_SetBuffer(This,cbSize,pbData,dwFlags) \ + (This)->lpVtbl -> SetBuffer(This,cbSize,pbData,dwFlags) + +#define IAudioData_GetInfo(This,pdwLength,ppbData,pcbActualData) \ + (This)->lpVtbl -> GetInfo(This,pdwLength,ppbData,pcbActualData) + +#define IAudioData_SetActual(This,cbDataValid) \ + (This)->lpVtbl -> SetActual(This,cbDataValid) + + +#define IAudioData_GetFormat(This,pWaveFormatCurrent) \ + (This)->lpVtbl -> GetFormat(This,pWaveFormatCurrent) + +#define IAudioData_SetFormat(This,lpWaveFormat) \ + (This)->lpVtbl -> SetFormat(This,lpWaveFormat) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAudioData_GetFormat_Proxy( + IAudioData * This, + /* [out] */ WAVEFORMATEX *pWaveFormatCurrent); + + +void __RPC_STUB IAudioData_GetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAudioData_SetFormat_Proxy( + IAudioData * This, + /* [in] */ const WAVEFORMATEX *lpWaveFormat); + + +void __RPC_STUB IAudioData_SetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAudioData_INTERFACE_DEFINED__ */ + + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/aviriff.h b/windows_libs/mssdk/include/aviriff.h new file mode 100644 index 00000000..46f31802 --- /dev/null +++ b/windows_libs/mssdk/include/aviriff.h @@ -0,0 +1,402 @@ +//------------------------------------------------------------------------------ +// File: AVIRIFF.h +// +// Desc: Structures and defines for the RIFF AVI file format extended to +// handle very large/long files. +// +// Copyright (c) 1996 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#pragma warning(disable: 4097 4511 4512 4514 4705) + + +#if !defined AVIRIFF_H +#define AVIRIFF_H + +#if !defined NUMELMS + #define NUMELMS(aa) (sizeof(aa)/sizeof((aa)[0])) +#endif + +// all structures in this file are packed on word boundaries +// +#include + +/* + * heres the general layout of an AVI riff file (new format) + * + * RIFF (3F??????) AVI <- not more than 1 GB in size + * LIST (size) hdrl + * avih (0038) + * LIST (size) strl + * strh (0038) + * strf (????) + * indx (3ff8) <- size may vary, should be sector sized + * LIST (size) strl + * strh (0038) + * strf (????) + * indx (3ff8) <- size may vary, should be sector sized + * LIST (size) odml + * dmlh (????) + * JUNK (size) <- fill to align to sector - 12 + * LIST (7f??????) movi <- aligned on sector - 12 + * 00dc (size) <- sector aligned + * 01wb (size) <- sector aligned + * ix00 (size) <- sector aligned + * idx1 (00??????) <- sector aligned + * RIFF (7F??????) AVIX + * JUNK (size) <- fill to align to sector -12 + * LIST (size) movi + * 00dc (size) <- sector aligned + * RIFF (7F??????) AVIX <- not more than 2GB in size + * JUNK (size) <- fill to align to sector - 12 + * LIST (size) movi + * 00dc (size) <- sector aligned + * + *-===================================================================*/ + +// +// structures for manipulating RIFF headers +// +#define FCC(ch4) ((((DWORD)(ch4) & 0xFF) << 24) | \ + (((DWORD)(ch4) & 0xFF00) << 8) | \ + (((DWORD)(ch4) & 0xFF0000) >> 8) | \ + (((DWORD)(ch4) & 0xFF000000) >> 24)) + +typedef struct _riffchunk { + FOURCC fcc; + DWORD cb; + } RIFFCHUNK, * LPRIFFCHUNK; +typedef struct _rifflist { + FOURCC fcc; + DWORD cb; + FOURCC fccListType; + } RIFFLIST, * LPRIFFLIST; + +#define RIFFROUND(cb) ((cb) + ((cb)&1)) +#define RIFFNEXT(pChunk) (LPRIFFCHUNK)((LPBYTE)(pChunk) \ + + sizeof(RIFFCHUNK) \ + + RIFFROUND(((LPRIFFCHUNK)pChunk)->cb)) + + +// +// ==================== avi header structures =========================== +// + +// main header for the avi file (compatibility header) +// +#define ckidMAINAVIHEADER FCC('avih') +typedef struct _avimainheader { + FOURCC fcc; // 'avih' + DWORD cb; // size of this structure -8 + DWORD dwMicroSecPerFrame; // frame display rate (or 0L) + DWORD dwMaxBytesPerSec; // max. transfer rate + DWORD dwPaddingGranularity; // pad to multiples of this size; normally 2K. + DWORD dwFlags; // the ever-present flags + #define AVIF_HASINDEX 0x00000010 // Index at end of file? + #define AVIF_MUSTUSEINDEX 0x00000020 + #define AVIF_ISINTERLEAVED 0x00000100 + #define AVIF_TRUSTCKTYPE 0x00000800 // Use CKType to find key frames + #define AVIF_WASCAPTUREFILE 0x00010000 + #define AVIF_COPYRIGHTED 0x00020000 + DWORD dwTotalFrames; // # frames in first movi list + DWORD dwInitialFrames; + DWORD dwStreams; + DWORD dwSuggestedBufferSize; + DWORD dwWidth; + DWORD dwHeight; + DWORD dwReserved[4]; + } AVIMAINHEADER; + +#define ckidODML FCC('odml') +#define ckidAVIEXTHEADER FCC('dmlh') +typedef struct _aviextheader { + FOURCC fcc; // 'dmlh' + DWORD cb; // size of this structure -8 + DWORD dwGrandFrames; // total number of frames in the file + DWORD dwFuture[61]; // to be defined later + } AVIEXTHEADER; + +// +// structure of an AVI stream header riff chunk +// +#define ckidSTREAMLIST FCC('strl') + +#ifndef ckidSTREAMHEADER +#define ckidSTREAMHEADER FCC('strh') +#endif +typedef struct _avistreamheader { + FOURCC fcc; // 'strh' + DWORD cb; // size of this structure - 8 + + FOURCC fccType; // stream type codes + + #ifndef streamtypeVIDEO + #define streamtypeVIDEO FCC('vids') + #define streamtypeAUDIO FCC('auds') + #define streamtypeMIDI FCC('mids') + #define streamtypeTEXT FCC('txts') + #endif + + FOURCC fccHandler; + DWORD dwFlags; + #define AVISF_DISABLED 0x00000001 + #define AVISF_VIDEO_PALCHANGES 0x00010000 + + WORD wPriority; + WORD wLanguage; + DWORD dwInitialFrames; + DWORD dwScale; + DWORD dwRate; // dwRate/dwScale is stream tick rate in ticks/sec + DWORD dwStart; + DWORD dwLength; + DWORD dwSuggestedBufferSize; + DWORD dwQuality; + DWORD dwSampleSize; + struct { + short int left; + short int top; + short int right; + short int bottom; + } rcFrame; + } AVISTREAMHEADER; + + +// +// structure of an AVI stream format chunk +// +#ifndef ckidSTREAMFORMAT +#define ckidSTREAMFORMAT FCC('strf') +#endif +// +// avi stream formats are different for each stream type +// +// BITMAPINFOHEADER for video streams +// WAVEFORMATEX or PCMWAVEFORMAT for audio streams +// nothing for text streams +// nothing for midi streams + + +#pragma warning(disable:4200) +// +// structure of old style AVI index +// +#define ckidAVIOLDINDEX FCC('idx1') +typedef struct _avioldindex { + FOURCC fcc; // 'idx1' + DWORD cb; // size of this structure -8 + struct _avioldindex_entry { + DWORD dwChunkId; + DWORD dwFlags; + + #ifndef AVIIF_LIST + #define AVIIF_LIST 0x00000001 + #define AVIIF_KEYFRAME 0x00000010 + #endif + + #define AVIIF_NO_TIME 0x00000100 + #define AVIIF_COMPRESSOR 0x0FFF0000 // unused? + DWORD dwOffset; // offset of riff chunk header for the data + DWORD dwSize; // size of the data (excluding riff header size) + } aIndex[]; // size of this array + } AVIOLDINDEX; + + +// +// ============ structures for timecode in an AVI file ================= +// + +#ifndef TIMECODE_DEFINED +#define TIMECODE_DEFINED + +// defined +// timecode time structure +// +typedef union _timecode { + struct { + WORD wFrameRate; + WORD wFrameFract; + LONG cFrames; + }; + DWORDLONG qw; + } TIMECODE; + +#endif // TIMECODE_DEFINED + +#define TIMECODE_RATE_30DROP 0 // this MUST be zero + +// struct for all the SMPTE timecode info +// +typedef struct _timecodedata { + TIMECODE time; + DWORD dwSMPTEflags; + DWORD dwUser; + } TIMECODEDATA; + +// dwSMPTEflags masks/values +// +#define TIMECODE_SMPTE_BINARY_GROUP 0x07 +#define TIMECODE_SMPTE_COLOR_FRAME 0x08 + +// +// ============ structures for new style AVI indexes ================= +// + +// index type codes +// +#define AVI_INDEX_OF_INDEXES 0x00 +#define AVI_INDEX_OF_CHUNKS 0x01 +#define AVI_INDEX_OF_TIMED_CHUNKS 0x02 +#define AVI_INDEX_OF_SUB_2FIELD 0x03 +#define AVI_INDEX_IS_DATA 0x80 + +// index subtype codes +// +#define AVI_INDEX_SUB_DEFAULT 0x00 + +// INDEX_OF_CHUNKS subtype codes +// +#define AVI_INDEX_SUB_2FIELD 0x01 + +// meta structure of all avi indexes +// +typedef struct _avimetaindex { + FOURCC fcc; + UINT cb; + WORD wLongsPerEntry; + BYTE bIndexSubType; + BYTE bIndexType; + DWORD nEntriesInUse; + DWORD dwChunkId; + DWORD dwReserved[3]; + DWORD adwIndex[]; + } AVIMETAINDEX; + +#define STDINDEXSIZE 0x4000 +#define NUMINDEX(wLongsPerEntry) ((STDINDEXSIZE-32)/4/(wLongsPerEntry)) +#define NUMINDEXFILL(wLongsPerEntry) ((STDINDEXSIZE/4) - NUMINDEX(wLongsPerEntry)) + +// structure of a super index (INDEX_OF_INDEXES) +// +#define ckidAVISUPERINDEX FCC('indx') +typedef struct _avisuperindex { + FOURCC fcc; // 'indx' + UINT cb; // size of this structure + WORD wLongsPerEntry; // ==4 + BYTE bIndexSubType; // ==0 (frame index) or AVI_INDEX_SUB_2FIELD + BYTE bIndexType; // ==AVI_INDEX_OF_INDEXES + DWORD nEntriesInUse; // offset of next unused entry in aIndex + DWORD dwChunkId; // chunk ID of chunks being indexed, (i.e. RGB8) + DWORD dwReserved[3]; // must be 0 + struct _avisuperindex_entry { + DWORDLONG qwOffset; // 64 bit offset to sub index chunk + DWORD dwSize; // 32 bit size of sub index chunk + DWORD dwDuration; // time span of subindex chunk (in stream ticks) + } aIndex[NUMINDEX(4)]; + } AVISUPERINDEX; +#define Valid_SUPERINDEX(pi) (*(DWORD *)(&((pi)->wLongsPerEntry)) == (4 | (AVI_INDEX_OF_INDEXES << 24))) + +// struct of a standard index (AVI_INDEX_OF_CHUNKS) +// +typedef struct _avistdindex_entry { + DWORD dwOffset; // 32 bit offset to data (points to data, not riff header) + DWORD dwSize; // 31 bit size of data (does not include size of riff header), bit 31 is deltaframe bit + } AVISTDINDEX_ENTRY; +#define AVISTDINDEX_DELTAFRAME ( 0x80000000) // Delta frames have the high bit set +#define AVISTDINDEX_SIZEMASK (~0x80000000) + +typedef struct _avistdindex { + FOURCC fcc; // 'indx' or '##ix' + UINT cb; // size of this structure + WORD wLongsPerEntry; // ==2 + BYTE bIndexSubType; // ==0 + BYTE bIndexType; // ==AVI_INDEX_OF_CHUNKS + DWORD nEntriesInUse; // offset of next unused entry in aIndex + DWORD dwChunkId; // chunk ID of chunks being indexed, (i.e. RGB8) + DWORDLONG qwBaseOffset; // base offset that all index intries are relative to + DWORD dwReserved_3; // must be 0 + AVISTDINDEX_ENTRY aIndex[NUMINDEX(2)]; + } AVISTDINDEX; + +// struct of a time variant standard index (AVI_INDEX_OF_TIMED_CHUNKS) +// +typedef struct _avitimedindex_entry { + DWORD dwOffset; // 32 bit offset to data (points to data, not riff header) + DWORD dwSize; // 31 bit size of data (does not include size of riff header) (high bit is deltaframe bit) + DWORD dwDuration; // how much time the chunk should be played (in stream ticks) + } AVITIMEDINDEX_ENTRY; + +typedef struct _avitimedindex { + FOURCC fcc; // 'indx' or '##ix' + UINT cb; // size of this structure + WORD wLongsPerEntry; // ==3 + BYTE bIndexSubType; // ==0 + BYTE bIndexType; // ==AVI_INDEX_OF_TIMED_CHUNKS + DWORD nEntriesInUse; // offset of next unused entry in aIndex + DWORD dwChunkId; // chunk ID of chunks being indexed, (i.e. RGB8) + DWORDLONG qwBaseOffset; // base offset that all index intries are relative to + DWORD dwReserved_3; // must be 0 + AVITIMEDINDEX_ENTRY aIndex[NUMINDEX(3)]; + DWORD adwTrailingFill[NUMINDEXFILL(3)]; // to align struct to correct size + } AVITIMEDINDEX; + +// structure of a timecode stream +// +typedef struct _avitimecodeindex { + FOURCC fcc; // 'indx' or '##ix' + UINT cb; // size of this structure + WORD wLongsPerEntry; // ==4 + BYTE bIndexSubType; // ==0 + BYTE bIndexType; // ==AVI_INDEX_IS_DATA + DWORD nEntriesInUse; // offset of next unused entry in aIndex + DWORD dwChunkId; // 'time' + DWORD dwReserved[3]; // must be 0 + TIMECODEDATA aIndex[NUMINDEX(sizeof(TIMECODEDATA)/sizeof(LONG))]; + } AVITIMECODEINDEX; + +// structure of a timecode discontinuity list (when wLongsPerEntry == 7) +// +typedef struct _avitcdlindex_entry { + DWORD dwTick; // stream tick time that maps to this timecode value + TIMECODE time; + DWORD dwSMPTEflags; + DWORD dwUser; + TCHAR szReelId[12]; + } AVITCDLINDEX_ENTRY; + +typedef struct _avitcdlindex { + FOURCC fcc; // 'indx' or '##ix' + UINT cb; // size of this structure + WORD wLongsPerEntry; // ==7 (must be 4 or more all 'tcdl' indexes + BYTE bIndexSubType; // ==0 + BYTE bIndexType; // ==AVI_INDEX_IS_DATA + DWORD nEntriesInUse; // offset of next unused entry in aIndex + DWORD dwChunkId; // 'tcdl' + DWORD dwReserved[3]; // must be 0 + AVITCDLINDEX_ENTRY aIndex[NUMINDEX(7)]; + DWORD adwTrailingFill[NUMINDEXFILL(7)]; // to align struct to correct size + } AVITCDLINDEX; + +typedef struct _avifieldindex_chunk { + FOURCC fcc; // 'ix##' + DWORD cb; // size of this structure + WORD wLongsPerEntry; // must be 3 (size of each entry in + // aIndex array) + BYTE bIndexSubType; // AVI_INDEX_2FIELD + BYTE bIndexType; // AVI_INDEX_OF_CHUNKS + DWORD nEntriesInUse; // + DWORD dwChunkId; // '##dc' or '##db' + DWORDLONG qwBaseOffset; // offsets in aIndex array are relative to this + DWORD dwReserved3; // must be 0 + struct _avifieldindex_entry { + DWORD dwOffset; + DWORD dwSize; // size of all fields + // (bit 31 set for NON-keyframes) + DWORD dwOffsetField2; // offset to second field + } aIndex[ ]; +} AVIFIELDINDEX, * PAVIFIELDINDEX; + + +#include + +#endif diff --git a/windows_libs/mssdk/include/basetsd.h b/windows_libs/mssdk/include/basetsd.h new file mode 100644 index 00000000..c634a5c9 --- /dev/null +++ b/windows_libs/mssdk/include/basetsd.h @@ -0,0 +1,342 @@ +/*++ + +Copyright (c) 1997-1999 Microsoft Corporation + +Module Name: + + basetsd.h + +Abstract: + + Type definitions for the basic sized types. + +Author: + + Jeff Havens (jhavens) 23-Oct-1997 + +Revision History: + +--*/ + +#ifndef _BASETSD_H_ +#define _BASETSD_H_ + +#if _MSC_VER > 1000 +#pragma once +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +typedef signed char INT8, *PINT8; +typedef signed short INT16, *PINT16; +typedef signed int INT32, *PINT32; +typedef signed __int64 INT64, *PINT64; +typedef unsigned char UINT8, *PUINT8; +typedef unsigned short UINT16, *PUINT16; +typedef unsigned int UINT32, *PUINT32; +typedef unsigned __int64 UINT64, *PUINT64; + +// +// The following types are guaranteed to be signed and 32 bits wide. +// + +typedef signed int LONG32, *PLONG32; + +// +// The following types are guaranteed to be unsigned and 32 bits wide. +// + +typedef unsigned int ULONG32, *PULONG32; +typedef unsigned int DWORD32, *PDWORD32; + +#if !defined(_W64) +#if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 +#define _W64 __w64 +#else +#define _W64 +#endif +#endif + +// +// The INT_PTR is guaranteed to be the same size as a pointer. Its +// size with change with pointer size (32/64). It should be used +// anywhere that a pointer is cast to an integer type. UINT_PTR is +// the unsigned variation. +// +// __int3264 is intrinsic to 64b MIDL but not to old MIDL or to C compiler. +// +#if ( 501 < __midl ) + + typedef [public] __int3264 INT_PTR, *PINT_PTR; + typedef [public] unsigned __int3264 UINT_PTR, *PUINT_PTR; + + typedef [public] __int3264 LONG_PTR, *PLONG_PTR; + typedef [public] unsigned __int3264 ULONG_PTR, *PULONG_PTR; + +#else // midl64 +// old midl and C++ compiler + +#if defined(_WIN64) + typedef __int64 INT_PTR, *PINT_PTR; + typedef unsigned __int64 UINT_PTR, *PUINT_PTR; + + typedef __int64 LONG_PTR, *PLONG_PTR; + typedef unsigned __int64 ULONG_PTR, *PULONG_PTR; + + #define __int3264 __int64 + +#else + typedef _W64 int INT_PTR, *PINT_PTR; + typedef _W64 unsigned int UINT_PTR, *PUINT_PTR; + + typedef _W64 long LONG_PTR, *PLONG_PTR; + typedef _W64 unsigned long ULONG_PTR, *PULONG_PTR; + + #define __int3264 __int32 + +#endif +#endif // midl64 + +// +// HALF_PTR is half the size of a pointer it intended for use with +// within strcuture which contain a pointer and two small fields. +// UHALF_PTR is the unsigned variation. +// + +#ifdef _WIN64 + +#define ADDRESS_TAG_BIT 0x40000000000UI64 + +typedef unsigned __int64 HANDLE_PTR; +typedef unsigned int UHALF_PTR, *PUHALF_PTR; +typedef int HALF_PTR, *PHALF_PTR; + +#pragma warning(disable:4311) // type cast truncation +#if _MSC_VER >= 1200 +#pragma warning(push) +#endif +#pragma warning(disable:4305) // type cast truncation + +#if !defined(__midl) +__inline +unsigned long +HandleToULong( + const void *h + ) +{ + return((unsigned long) h ); +} + +__inline +long +HandleToLong( + const void *h + ) +{ + return((long) h ); +} + +__inline +void * +ULongToHandle( + const unsigned long h + ) +{ + return((void *) (UINT_PTR) h ); +} + + +__inline +void * +LongToHandle( + const long h + ) +{ + return((void *) (INT_PTR) h ); +} + + +__inline +unsigned long +PtrToUlong( + const void *p + ) +{ + return((unsigned long) p ); +} + +__inline +unsigned int +PtrToUint( + const void *p + ) +{ + return((unsigned int) p ); +} + +__inline +unsigned short +PtrToUshort( + const void *p + ) +{ + return((unsigned short) p ); +} + +__inline +long +PtrToLong( + const void *p + ) +{ + return((long) p ); +} + +__inline +int +PtrToInt( + const void *p + ) +{ + return((int) p ); +} + +__inline +short +PtrToShort( + const void *p + ) +{ + return((short) p ); +} + +__inline +void * +IntToPtr( + const int i + ) +// Caution: IntToPtr() sign-extends the int value. +{ + return( (void *)(INT_PTR)i ); +} + +__inline +void * +UIntToPtr( + const unsigned int ui + ) +// Caution: UIntToPtr() zero-extends the unsigned int value. +{ + return( (void *)(UINT_PTR)ui ); +} + +__inline +void * +LongToPtr( + const long l + ) +// Caution: LongToPtr() sign-extends the long value. +{ + return( (void *)(LONG_PTR)l ); +} + +__inline +void * +ULongToPtr( + const unsigned long ul + ) +// Caution: ULongToPtr() zero-extends the unsigned long value. +{ + return( (void *)(ULONG_PTR)ul ); +} + +#endif // !_midl +#if _MSC_VER >= 1200 +#pragma warning(pop) // restore 4305 +#endif +#pragma warning(3:4311) // bump 4311 to a level 3 + +#else // !_WIN64 + +#define ADDRESS_TAG_BIT 0x80000000UL + +typedef unsigned short UHALF_PTR, *PUHALF_PTR; +typedef short HALF_PTR, *PHALF_PTR; +typedef _W64 unsigned long HANDLE_PTR; + +#define HandleToULong( h ) ((ULONG)(ULONG_PTR)(h) ) +#define HandleToLong( h ) ((LONG)(LONG_PTR) (h) ) +#define ULongToHandle( ul ) ((HANDLE)(ULONG_PTR) (ul) ) +#define LongToHandle( h ) ((HANDLE)(LONG_PTR) (h) ) +#define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) ) +#define PtrToLong( p ) ((LONG)(LONG_PTR) (p) ) +#define PtrToUint( p ) ((UINT)(UINT_PTR) (p) ) +#define PtrToInt( p ) ((INT)(INT_PTR) (p) ) +#define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) ) +#define PtrToShort( p ) ((short)(LONG_PTR)(p) ) +#define IntToPtr( i ) ((VOID *)(INT_PTR)((int)i)) +#define UIntToPtr( ui ) ((VOID *)(UINT_PTR)((unsigned int)ui)) +#define LongToPtr( l ) ((VOID *)(LONG_PTR)((long)l)) +#define ULongToPtr( ul ) ((VOID *)(ULONG_PTR)((unsigned long)ul)) + +#endif // !_WIN64 + +#define HandleToUlong(h) HandleToULong(h) +#define UlongToHandle(ul) ULongToHandle(ul) +#define UlongToPtr(ul) ULongToPtr(ul) +#define UintToPtr(ui) UIntToPtr(ui) + +#define MAXUINT_PTR (~((UINT_PTR)0)) +#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1)) +#define MININT_PTR (~MAXINT_PTR) + +#define MAXULONG_PTR (~((ULONG_PTR)0)) +#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1)) +#define MINLONG_PTR (~MAXLONG_PTR) + +#define MAXUHALF_PTR ((UHALF_PTR)~0) +#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1)) +#define MINHALF_PTR (~MAXHALF_PTR) + +// +// SIZE_T used for counts or ranges which need to span the range of +// of a pointer. SSIZE_T is the signed variation. +// + +typedef ULONG_PTR SIZE_T, *PSIZE_T; +typedef LONG_PTR SSIZE_T, *PSSIZE_T; + +// +// Add Windows flavor DWORD_PTR types +// + +typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR; + +// +// The following types are guaranteed to be signed and 64 bits wide. +// + +typedef __int64 LONG64, *PLONG64; + + +// +// The following types are guaranteed to be unsigned and 64 bits wide. +// + +typedef unsigned __int64 ULONG64, *PULONG64; +typedef unsigned __int64 DWORD64, *PDWORD64; + +// +// Thread affinity. +// + +typedef ULONG_PTR KAFFINITY; +typedef KAFFINITY *PKAFFINITY; + +#ifdef __cplusplus +} +#endif + +#endif // _BASETSD_H_ diff --git a/windows_libs/mssdk/include/bdaiface.h b/windows_libs/mssdk/include/bdaiface.h new file mode 100644 index 00000000..24e05be6 --- /dev/null +++ b/windows_libs/mssdk/include/bdaiface.h @@ -0,0 +1,3067 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0338 */ +/* Compiler settings for bdaiface.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __bdaiface_h__ +#define __bdaiface_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IBDA_NetworkProvider_FWD_DEFINED__ +#define __IBDA_NetworkProvider_FWD_DEFINED__ +typedef interface IBDA_NetworkProvider IBDA_NetworkProvider; +#endif /* __IBDA_NetworkProvider_FWD_DEFINED__ */ + + +#ifndef __IBDA_EthernetFilter_FWD_DEFINED__ +#define __IBDA_EthernetFilter_FWD_DEFINED__ +typedef interface IBDA_EthernetFilter IBDA_EthernetFilter; +#endif /* __IBDA_EthernetFilter_FWD_DEFINED__ */ + + +#ifndef __IBDA_IPV4Filter_FWD_DEFINED__ +#define __IBDA_IPV4Filter_FWD_DEFINED__ +typedef interface IBDA_IPV4Filter IBDA_IPV4Filter; +#endif /* __IBDA_IPV4Filter_FWD_DEFINED__ */ + + +#ifndef __IBDA_IPV6Filter_FWD_DEFINED__ +#define __IBDA_IPV6Filter_FWD_DEFINED__ +typedef interface IBDA_IPV6Filter IBDA_IPV6Filter; +#endif /* __IBDA_IPV6Filter_FWD_DEFINED__ */ + + +#ifndef __IBDA_DeviceControl_FWD_DEFINED__ +#define __IBDA_DeviceControl_FWD_DEFINED__ +typedef interface IBDA_DeviceControl IBDA_DeviceControl; +#endif /* __IBDA_DeviceControl_FWD_DEFINED__ */ + + +#ifndef __IBDA_PinControl_FWD_DEFINED__ +#define __IBDA_PinControl_FWD_DEFINED__ +typedef interface IBDA_PinControl IBDA_PinControl; +#endif /* __IBDA_PinControl_FWD_DEFINED__ */ + + +#ifndef __IBDA_SignalProperties_FWD_DEFINED__ +#define __IBDA_SignalProperties_FWD_DEFINED__ +typedef interface IBDA_SignalProperties IBDA_SignalProperties; +#endif /* __IBDA_SignalProperties_FWD_DEFINED__ */ + + +#ifndef __IBDA_Topology_FWD_DEFINED__ +#define __IBDA_Topology_FWD_DEFINED__ +typedef interface IBDA_Topology IBDA_Topology; +#endif /* __IBDA_Topology_FWD_DEFINED__ */ + + +#ifndef __IBDA_VoidTransform_FWD_DEFINED__ +#define __IBDA_VoidTransform_FWD_DEFINED__ +typedef interface IBDA_VoidTransform IBDA_VoidTransform; +#endif /* __IBDA_VoidTransform_FWD_DEFINED__ */ + + +#ifndef __IBDA_NullTransform_FWD_DEFINED__ +#define __IBDA_NullTransform_FWD_DEFINED__ +typedef interface IBDA_NullTransform IBDA_NullTransform; +#endif /* __IBDA_NullTransform_FWD_DEFINED__ */ + + +#ifndef __IBDA_FrequencyFilter_FWD_DEFINED__ +#define __IBDA_FrequencyFilter_FWD_DEFINED__ +typedef interface IBDA_FrequencyFilter IBDA_FrequencyFilter; +#endif /* __IBDA_FrequencyFilter_FWD_DEFINED__ */ + + +#ifndef __IBDA_AutoDemodulate_FWD_DEFINED__ +#define __IBDA_AutoDemodulate_FWD_DEFINED__ +typedef interface IBDA_AutoDemodulate IBDA_AutoDemodulate; +#endif /* __IBDA_AutoDemodulate_FWD_DEFINED__ */ + + +#ifndef __IBDA_DigitalDemodulator_FWD_DEFINED__ +#define __IBDA_DigitalDemodulator_FWD_DEFINED__ +typedef interface IBDA_DigitalDemodulator IBDA_DigitalDemodulator; +#endif /* __IBDA_DigitalDemodulator_FWD_DEFINED__ */ + + +#ifndef __IBDA_IPSinkControl_FWD_DEFINED__ +#define __IBDA_IPSinkControl_FWD_DEFINED__ +typedef interface IBDA_IPSinkControl IBDA_IPSinkControl; +#endif /* __IBDA_IPSinkControl_FWD_DEFINED__ */ + + +#ifndef __IEnumPIDMap_FWD_DEFINED__ +#define __IEnumPIDMap_FWD_DEFINED__ +typedef interface IEnumPIDMap IEnumPIDMap; +#endif /* __IEnumPIDMap_FWD_DEFINED__ */ + + +#ifndef __IMPEG2PIDMap_FWD_DEFINED__ +#define __IMPEG2PIDMap_FWD_DEFINED__ +typedef interface IMPEG2PIDMap IMPEG2PIDMap; +#endif /* __IMPEG2PIDMap_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "unknwn.h" +#include "strmif.h" +#include "BdaTypes.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +#ifndef __IBDA_NetworkProvider_INTERFACE_DEFINED__ +#define __IBDA_NetworkProvider_INTERFACE_DEFINED__ + +/* interface IBDA_NetworkProvider */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IBDA_NetworkProvider; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("fd501041-8ebe-11ce-8183-00aa00577da2") + IBDA_NetworkProvider : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE PutSignalSource( + /* [in] */ ULONG ulSignalSource) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSignalSource( + /* [out][in] */ ULONG *pulSignalSource) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetNetworkType( + /* [out][in] */ GUID *pguidNetworkType) = 0; + + virtual HRESULT STDMETHODCALLTYPE PutTuningSpace( + /* [in] */ REFGUID guidTuningSpace) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTuningSpace( + /* [out][in] */ GUID *pguidTuingSpace) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterDeviceFilter( + /* [in] */ IUnknown *pUnkFilterControl, + /* [out][in] */ ULONG *ppvRegisitrationContext) = 0; + + virtual HRESULT STDMETHODCALLTYPE UnRegisterDeviceFilter( + /* [in] */ ULONG pvRegistrationContext) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBDA_NetworkProviderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBDA_NetworkProvider * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBDA_NetworkProvider * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBDA_NetworkProvider * This); + + HRESULT ( STDMETHODCALLTYPE *PutSignalSource )( + IBDA_NetworkProvider * This, + /* [in] */ ULONG ulSignalSource); + + HRESULT ( STDMETHODCALLTYPE *GetSignalSource )( + IBDA_NetworkProvider * This, + /* [out][in] */ ULONG *pulSignalSource); + + HRESULT ( STDMETHODCALLTYPE *GetNetworkType )( + IBDA_NetworkProvider * This, + /* [out][in] */ GUID *pguidNetworkType); + + HRESULT ( STDMETHODCALLTYPE *PutTuningSpace )( + IBDA_NetworkProvider * This, + /* [in] */ REFGUID guidTuningSpace); + + HRESULT ( STDMETHODCALLTYPE *GetTuningSpace )( + IBDA_NetworkProvider * This, + /* [out][in] */ GUID *pguidTuingSpace); + + HRESULT ( STDMETHODCALLTYPE *RegisterDeviceFilter )( + IBDA_NetworkProvider * This, + /* [in] */ IUnknown *pUnkFilterControl, + /* [out][in] */ ULONG *ppvRegisitrationContext); + + HRESULT ( STDMETHODCALLTYPE *UnRegisterDeviceFilter )( + IBDA_NetworkProvider * This, + /* [in] */ ULONG pvRegistrationContext); + + END_INTERFACE + } IBDA_NetworkProviderVtbl; + + interface IBDA_NetworkProvider + { + CONST_VTBL struct IBDA_NetworkProviderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBDA_NetworkProvider_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBDA_NetworkProvider_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBDA_NetworkProvider_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBDA_NetworkProvider_PutSignalSource(This,ulSignalSource) \ + (This)->lpVtbl -> PutSignalSource(This,ulSignalSource) + +#define IBDA_NetworkProvider_GetSignalSource(This,pulSignalSource) \ + (This)->lpVtbl -> GetSignalSource(This,pulSignalSource) + +#define IBDA_NetworkProvider_GetNetworkType(This,pguidNetworkType) \ + (This)->lpVtbl -> GetNetworkType(This,pguidNetworkType) + +#define IBDA_NetworkProvider_PutTuningSpace(This,guidTuningSpace) \ + (This)->lpVtbl -> PutTuningSpace(This,guidTuningSpace) + +#define IBDA_NetworkProvider_GetTuningSpace(This,pguidTuingSpace) \ + (This)->lpVtbl -> GetTuningSpace(This,pguidTuingSpace) + +#define IBDA_NetworkProvider_RegisterDeviceFilter(This,pUnkFilterControl,ppvRegisitrationContext) \ + (This)->lpVtbl -> RegisterDeviceFilter(This,pUnkFilterControl,ppvRegisitrationContext) + +#define IBDA_NetworkProvider_UnRegisterDeviceFilter(This,pvRegistrationContext) \ + (This)->lpVtbl -> UnRegisterDeviceFilter(This,pvRegistrationContext) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBDA_NetworkProvider_PutSignalSource_Proxy( + IBDA_NetworkProvider * This, + /* [in] */ ULONG ulSignalSource); + + +void __RPC_STUB IBDA_NetworkProvider_PutSignalSource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_NetworkProvider_GetSignalSource_Proxy( + IBDA_NetworkProvider * This, + /* [out][in] */ ULONG *pulSignalSource); + + +void __RPC_STUB IBDA_NetworkProvider_GetSignalSource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_NetworkProvider_GetNetworkType_Proxy( + IBDA_NetworkProvider * This, + /* [out][in] */ GUID *pguidNetworkType); + + +void __RPC_STUB IBDA_NetworkProvider_GetNetworkType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_NetworkProvider_PutTuningSpace_Proxy( + IBDA_NetworkProvider * This, + /* [in] */ REFGUID guidTuningSpace); + + +void __RPC_STUB IBDA_NetworkProvider_PutTuningSpace_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_NetworkProvider_GetTuningSpace_Proxy( + IBDA_NetworkProvider * This, + /* [out][in] */ GUID *pguidTuingSpace); + + +void __RPC_STUB IBDA_NetworkProvider_GetTuningSpace_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_NetworkProvider_RegisterDeviceFilter_Proxy( + IBDA_NetworkProvider * This, + /* [in] */ IUnknown *pUnkFilterControl, + /* [out][in] */ ULONG *ppvRegisitrationContext); + + +void __RPC_STUB IBDA_NetworkProvider_RegisterDeviceFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_NetworkProvider_UnRegisterDeviceFilter_Proxy( + IBDA_NetworkProvider * This, + /* [in] */ ULONG pvRegistrationContext); + + +void __RPC_STUB IBDA_NetworkProvider_UnRegisterDeviceFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBDA_NetworkProvider_INTERFACE_DEFINED__ */ + + +#ifndef __IBDA_EthernetFilter_INTERFACE_DEFINED__ +#define __IBDA_EthernetFilter_INTERFACE_DEFINED__ + +/* interface IBDA_EthernetFilter */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IBDA_EthernetFilter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("71985F43-1CA1-11d3-9CC8-00C04F7971E0") + IBDA_EthernetFilter : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetMulticastListSize( + /* [out][in] */ ULONG *pulcbAddresses) = 0; + + virtual HRESULT STDMETHODCALLTYPE PutMulticastList( + /* [in] */ ULONG ulcbAddresses, + /* [size_is][in] */ BYTE pAddressList[ ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMulticastList( + /* [out][in] */ ULONG *pulcbAddresses, + /* [size_is][out] */ BYTE pAddressList[ ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE PutMulticastMode( + /* [in] */ ULONG ulModeMask) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMulticastMode( + /* [out] */ ULONG *pulModeMask) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBDA_EthernetFilterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBDA_EthernetFilter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBDA_EthernetFilter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBDA_EthernetFilter * This); + + HRESULT ( STDMETHODCALLTYPE *GetMulticastListSize )( + IBDA_EthernetFilter * This, + /* [out][in] */ ULONG *pulcbAddresses); + + HRESULT ( STDMETHODCALLTYPE *PutMulticastList )( + IBDA_EthernetFilter * This, + /* [in] */ ULONG ulcbAddresses, + /* [size_is][in] */ BYTE pAddressList[ ]); + + HRESULT ( STDMETHODCALLTYPE *GetMulticastList )( + IBDA_EthernetFilter * This, + /* [out][in] */ ULONG *pulcbAddresses, + /* [size_is][out] */ BYTE pAddressList[ ]); + + HRESULT ( STDMETHODCALLTYPE *PutMulticastMode )( + IBDA_EthernetFilter * This, + /* [in] */ ULONG ulModeMask); + + HRESULT ( STDMETHODCALLTYPE *GetMulticastMode )( + IBDA_EthernetFilter * This, + /* [out] */ ULONG *pulModeMask); + + END_INTERFACE + } IBDA_EthernetFilterVtbl; + + interface IBDA_EthernetFilter + { + CONST_VTBL struct IBDA_EthernetFilterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBDA_EthernetFilter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBDA_EthernetFilter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBDA_EthernetFilter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBDA_EthernetFilter_GetMulticastListSize(This,pulcbAddresses) \ + (This)->lpVtbl -> GetMulticastListSize(This,pulcbAddresses) + +#define IBDA_EthernetFilter_PutMulticastList(This,ulcbAddresses,pAddressList) \ + (This)->lpVtbl -> PutMulticastList(This,ulcbAddresses,pAddressList) + +#define IBDA_EthernetFilter_GetMulticastList(This,pulcbAddresses,pAddressList) \ + (This)->lpVtbl -> GetMulticastList(This,pulcbAddresses,pAddressList) + +#define IBDA_EthernetFilter_PutMulticastMode(This,ulModeMask) \ + (This)->lpVtbl -> PutMulticastMode(This,ulModeMask) + +#define IBDA_EthernetFilter_GetMulticastMode(This,pulModeMask) \ + (This)->lpVtbl -> GetMulticastMode(This,pulModeMask) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBDA_EthernetFilter_GetMulticastListSize_Proxy( + IBDA_EthernetFilter * This, + /* [out][in] */ ULONG *pulcbAddresses); + + +void __RPC_STUB IBDA_EthernetFilter_GetMulticastListSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_EthernetFilter_PutMulticastList_Proxy( + IBDA_EthernetFilter * This, + /* [in] */ ULONG ulcbAddresses, + /* [size_is][in] */ BYTE pAddressList[ ]); + + +void __RPC_STUB IBDA_EthernetFilter_PutMulticastList_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_EthernetFilter_GetMulticastList_Proxy( + IBDA_EthernetFilter * This, + /* [out][in] */ ULONG *pulcbAddresses, + /* [size_is][out] */ BYTE pAddressList[ ]); + + +void __RPC_STUB IBDA_EthernetFilter_GetMulticastList_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_EthernetFilter_PutMulticastMode_Proxy( + IBDA_EthernetFilter * This, + /* [in] */ ULONG ulModeMask); + + +void __RPC_STUB IBDA_EthernetFilter_PutMulticastMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_EthernetFilter_GetMulticastMode_Proxy( + IBDA_EthernetFilter * This, + /* [out] */ ULONG *pulModeMask); + + +void __RPC_STUB IBDA_EthernetFilter_GetMulticastMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBDA_EthernetFilter_INTERFACE_DEFINED__ */ + + +#ifndef __IBDA_IPV4Filter_INTERFACE_DEFINED__ +#define __IBDA_IPV4Filter_INTERFACE_DEFINED__ + +/* interface IBDA_IPV4Filter */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IBDA_IPV4Filter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("71985F44-1CA1-11d3-9CC8-00C04F7971E0") + IBDA_IPV4Filter : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetMulticastListSize( + /* [out][in] */ ULONG *pulcbAddresses) = 0; + + virtual HRESULT STDMETHODCALLTYPE PutMulticastList( + /* [in] */ ULONG ulcbAddresses, + /* [size_is][in] */ BYTE pAddressList[ ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMulticastList( + /* [out][in] */ ULONG *pulcbAddresses, + /* [size_is][out] */ BYTE pAddressList[ ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE PutMulticastMode( + /* [in] */ ULONG ulModeMask) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMulticastMode( + /* [out] */ ULONG *pulModeMask) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBDA_IPV4FilterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBDA_IPV4Filter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBDA_IPV4Filter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBDA_IPV4Filter * This); + + HRESULT ( STDMETHODCALLTYPE *GetMulticastListSize )( + IBDA_IPV4Filter * This, + /* [out][in] */ ULONG *pulcbAddresses); + + HRESULT ( STDMETHODCALLTYPE *PutMulticastList )( + IBDA_IPV4Filter * This, + /* [in] */ ULONG ulcbAddresses, + /* [size_is][in] */ BYTE pAddressList[ ]); + + HRESULT ( STDMETHODCALLTYPE *GetMulticastList )( + IBDA_IPV4Filter * This, + /* [out][in] */ ULONG *pulcbAddresses, + /* [size_is][out] */ BYTE pAddressList[ ]); + + HRESULT ( STDMETHODCALLTYPE *PutMulticastMode )( + IBDA_IPV4Filter * This, + /* [in] */ ULONG ulModeMask); + + HRESULT ( STDMETHODCALLTYPE *GetMulticastMode )( + IBDA_IPV4Filter * This, + /* [out] */ ULONG *pulModeMask); + + END_INTERFACE + } IBDA_IPV4FilterVtbl; + + interface IBDA_IPV4Filter + { + CONST_VTBL struct IBDA_IPV4FilterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBDA_IPV4Filter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBDA_IPV4Filter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBDA_IPV4Filter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBDA_IPV4Filter_GetMulticastListSize(This,pulcbAddresses) \ + (This)->lpVtbl -> GetMulticastListSize(This,pulcbAddresses) + +#define IBDA_IPV4Filter_PutMulticastList(This,ulcbAddresses,pAddressList) \ + (This)->lpVtbl -> PutMulticastList(This,ulcbAddresses,pAddressList) + +#define IBDA_IPV4Filter_GetMulticastList(This,pulcbAddresses,pAddressList) \ + (This)->lpVtbl -> GetMulticastList(This,pulcbAddresses,pAddressList) + +#define IBDA_IPV4Filter_PutMulticastMode(This,ulModeMask) \ + (This)->lpVtbl -> PutMulticastMode(This,ulModeMask) + +#define IBDA_IPV4Filter_GetMulticastMode(This,pulModeMask) \ + (This)->lpVtbl -> GetMulticastMode(This,pulModeMask) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBDA_IPV4Filter_GetMulticastListSize_Proxy( + IBDA_IPV4Filter * This, + /* [out][in] */ ULONG *pulcbAddresses); + + +void __RPC_STUB IBDA_IPV4Filter_GetMulticastListSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_IPV4Filter_PutMulticastList_Proxy( + IBDA_IPV4Filter * This, + /* [in] */ ULONG ulcbAddresses, + /* [size_is][in] */ BYTE pAddressList[ ]); + + +void __RPC_STUB IBDA_IPV4Filter_PutMulticastList_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_IPV4Filter_GetMulticastList_Proxy( + IBDA_IPV4Filter * This, + /* [out][in] */ ULONG *pulcbAddresses, + /* [size_is][out] */ BYTE pAddressList[ ]); + + +void __RPC_STUB IBDA_IPV4Filter_GetMulticastList_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_IPV4Filter_PutMulticastMode_Proxy( + IBDA_IPV4Filter * This, + /* [in] */ ULONG ulModeMask); + + +void __RPC_STUB IBDA_IPV4Filter_PutMulticastMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_IPV4Filter_GetMulticastMode_Proxy( + IBDA_IPV4Filter * This, + /* [out] */ ULONG *pulModeMask); + + +void __RPC_STUB IBDA_IPV4Filter_GetMulticastMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBDA_IPV4Filter_INTERFACE_DEFINED__ */ + + +#ifndef __IBDA_IPV6Filter_INTERFACE_DEFINED__ +#define __IBDA_IPV6Filter_INTERFACE_DEFINED__ + +/* interface IBDA_IPV6Filter */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IBDA_IPV6Filter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("E1785A74-2A23-4fb3-9245-A8F88017EF33") + IBDA_IPV6Filter : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetMulticastListSize( + /* [out][in] */ ULONG *pulcbAddresses) = 0; + + virtual HRESULT STDMETHODCALLTYPE PutMulticastList( + /* [in] */ ULONG ulcbAddresses, + /* [size_is][in] */ BYTE pAddressList[ ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMulticastList( + /* [out][in] */ ULONG *pulcbAddresses, + /* [size_is][out] */ BYTE pAddressList[ ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE PutMulticastMode( + /* [in] */ ULONG ulModeMask) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMulticastMode( + /* [out] */ ULONG *pulModeMask) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBDA_IPV6FilterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBDA_IPV6Filter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBDA_IPV6Filter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBDA_IPV6Filter * This); + + HRESULT ( STDMETHODCALLTYPE *GetMulticastListSize )( + IBDA_IPV6Filter * This, + /* [out][in] */ ULONG *pulcbAddresses); + + HRESULT ( STDMETHODCALLTYPE *PutMulticastList )( + IBDA_IPV6Filter * This, + /* [in] */ ULONG ulcbAddresses, + /* [size_is][in] */ BYTE pAddressList[ ]); + + HRESULT ( STDMETHODCALLTYPE *GetMulticastList )( + IBDA_IPV6Filter * This, + /* [out][in] */ ULONG *pulcbAddresses, + /* [size_is][out] */ BYTE pAddressList[ ]); + + HRESULT ( STDMETHODCALLTYPE *PutMulticastMode )( + IBDA_IPV6Filter * This, + /* [in] */ ULONG ulModeMask); + + HRESULT ( STDMETHODCALLTYPE *GetMulticastMode )( + IBDA_IPV6Filter * This, + /* [out] */ ULONG *pulModeMask); + + END_INTERFACE + } IBDA_IPV6FilterVtbl; + + interface IBDA_IPV6Filter + { + CONST_VTBL struct IBDA_IPV6FilterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBDA_IPV6Filter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBDA_IPV6Filter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBDA_IPV6Filter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBDA_IPV6Filter_GetMulticastListSize(This,pulcbAddresses) \ + (This)->lpVtbl -> GetMulticastListSize(This,pulcbAddresses) + +#define IBDA_IPV6Filter_PutMulticastList(This,ulcbAddresses,pAddressList) \ + (This)->lpVtbl -> PutMulticastList(This,ulcbAddresses,pAddressList) + +#define IBDA_IPV6Filter_GetMulticastList(This,pulcbAddresses,pAddressList) \ + (This)->lpVtbl -> GetMulticastList(This,pulcbAddresses,pAddressList) + +#define IBDA_IPV6Filter_PutMulticastMode(This,ulModeMask) \ + (This)->lpVtbl -> PutMulticastMode(This,ulModeMask) + +#define IBDA_IPV6Filter_GetMulticastMode(This,pulModeMask) \ + (This)->lpVtbl -> GetMulticastMode(This,pulModeMask) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBDA_IPV6Filter_GetMulticastListSize_Proxy( + IBDA_IPV6Filter * This, + /* [out][in] */ ULONG *pulcbAddresses); + + +void __RPC_STUB IBDA_IPV6Filter_GetMulticastListSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_IPV6Filter_PutMulticastList_Proxy( + IBDA_IPV6Filter * This, + /* [in] */ ULONG ulcbAddresses, + /* [size_is][in] */ BYTE pAddressList[ ]); + + +void __RPC_STUB IBDA_IPV6Filter_PutMulticastList_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_IPV6Filter_GetMulticastList_Proxy( + IBDA_IPV6Filter * This, + /* [out][in] */ ULONG *pulcbAddresses, + /* [size_is][out] */ BYTE pAddressList[ ]); + + +void __RPC_STUB IBDA_IPV6Filter_GetMulticastList_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_IPV6Filter_PutMulticastMode_Proxy( + IBDA_IPV6Filter * This, + /* [in] */ ULONG ulModeMask); + + +void __RPC_STUB IBDA_IPV6Filter_PutMulticastMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_IPV6Filter_GetMulticastMode_Proxy( + IBDA_IPV6Filter * This, + /* [out] */ ULONG *pulModeMask); + + +void __RPC_STUB IBDA_IPV6Filter_GetMulticastMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBDA_IPV6Filter_INTERFACE_DEFINED__ */ + + +#ifndef __IBDA_DeviceControl_INTERFACE_DEFINED__ +#define __IBDA_DeviceControl_INTERFACE_DEFINED__ + +/* interface IBDA_DeviceControl */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IBDA_DeviceControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("FD0A5AF3-B41D-11d2-9C95-00C04F7971E0") + IBDA_DeviceControl : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE StartChanges( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckChanges( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE CommitChanges( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetChangeState( + /* [out][in] */ ULONG *pState) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBDA_DeviceControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBDA_DeviceControl * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBDA_DeviceControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBDA_DeviceControl * This); + + HRESULT ( STDMETHODCALLTYPE *StartChanges )( + IBDA_DeviceControl * This); + + HRESULT ( STDMETHODCALLTYPE *CheckChanges )( + IBDA_DeviceControl * This); + + HRESULT ( STDMETHODCALLTYPE *CommitChanges )( + IBDA_DeviceControl * This); + + HRESULT ( STDMETHODCALLTYPE *GetChangeState )( + IBDA_DeviceControl * This, + /* [out][in] */ ULONG *pState); + + END_INTERFACE + } IBDA_DeviceControlVtbl; + + interface IBDA_DeviceControl + { + CONST_VTBL struct IBDA_DeviceControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBDA_DeviceControl_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBDA_DeviceControl_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBDA_DeviceControl_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBDA_DeviceControl_StartChanges(This) \ + (This)->lpVtbl -> StartChanges(This) + +#define IBDA_DeviceControl_CheckChanges(This) \ + (This)->lpVtbl -> CheckChanges(This) + +#define IBDA_DeviceControl_CommitChanges(This) \ + (This)->lpVtbl -> CommitChanges(This) + +#define IBDA_DeviceControl_GetChangeState(This,pState) \ + (This)->lpVtbl -> GetChangeState(This,pState) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBDA_DeviceControl_StartChanges_Proxy( + IBDA_DeviceControl * This); + + +void __RPC_STUB IBDA_DeviceControl_StartChanges_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_DeviceControl_CheckChanges_Proxy( + IBDA_DeviceControl * This); + + +void __RPC_STUB IBDA_DeviceControl_CheckChanges_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_DeviceControl_CommitChanges_Proxy( + IBDA_DeviceControl * This); + + +void __RPC_STUB IBDA_DeviceControl_CommitChanges_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_DeviceControl_GetChangeState_Proxy( + IBDA_DeviceControl * This, + /* [out][in] */ ULONG *pState); + + +void __RPC_STUB IBDA_DeviceControl_GetChangeState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBDA_DeviceControl_INTERFACE_DEFINED__ */ + + +#ifndef __IBDA_PinControl_INTERFACE_DEFINED__ +#define __IBDA_PinControl_INTERFACE_DEFINED__ + +/* interface IBDA_PinControl */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IBDA_PinControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0DED49D5-A8B7-4d5d-97A1-12B0C195874D") + IBDA_PinControl : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetPinID( + /* [out][in] */ ULONG *pulPinID) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPinType( + /* [out][in] */ ULONG *pulPinType) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBDA_PinControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBDA_PinControl * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBDA_PinControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBDA_PinControl * This); + + HRESULT ( STDMETHODCALLTYPE *GetPinID )( + IBDA_PinControl * This, + /* [out][in] */ ULONG *pulPinID); + + HRESULT ( STDMETHODCALLTYPE *GetPinType )( + IBDA_PinControl * This, + /* [out][in] */ ULONG *pulPinType); + + END_INTERFACE + } IBDA_PinControlVtbl; + + interface IBDA_PinControl + { + CONST_VTBL struct IBDA_PinControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBDA_PinControl_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBDA_PinControl_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBDA_PinControl_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBDA_PinControl_GetPinID(This,pulPinID) \ + (This)->lpVtbl -> GetPinID(This,pulPinID) + +#define IBDA_PinControl_GetPinType(This,pulPinType) \ + (This)->lpVtbl -> GetPinType(This,pulPinType) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBDA_PinControl_GetPinID_Proxy( + IBDA_PinControl * This, + /* [out][in] */ ULONG *pulPinID); + + +void __RPC_STUB IBDA_PinControl_GetPinID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_PinControl_GetPinType_Proxy( + IBDA_PinControl * This, + /* [out][in] */ ULONG *pulPinType); + + +void __RPC_STUB IBDA_PinControl_GetPinType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBDA_PinControl_INTERFACE_DEFINED__ */ + + +#ifndef __IBDA_SignalProperties_INTERFACE_DEFINED__ +#define __IBDA_SignalProperties_INTERFACE_DEFINED__ + +/* interface IBDA_SignalProperties */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IBDA_SignalProperties; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("D2F1644B-B409-11d2-BC69-00A0C9EE9E16") + IBDA_SignalProperties : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE PutNetworkType( + /* [in] */ REFGUID guidNetworkType) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetNetworkType( + /* [out][in] */ GUID *pguidNetworkType) = 0; + + virtual HRESULT STDMETHODCALLTYPE PutSignalSource( + /* [in] */ ULONG ulSignalSource) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSignalSource( + /* [out][in] */ ULONG *pulSignalSource) = 0; + + virtual HRESULT STDMETHODCALLTYPE PutTuningSpace( + /* [in] */ REFGUID guidTuningSpace) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTuningSpace( + /* [out][in] */ GUID *pguidTuingSpace) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBDA_SignalPropertiesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBDA_SignalProperties * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBDA_SignalProperties * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBDA_SignalProperties * This); + + HRESULT ( STDMETHODCALLTYPE *PutNetworkType )( + IBDA_SignalProperties * This, + /* [in] */ REFGUID guidNetworkType); + + HRESULT ( STDMETHODCALLTYPE *GetNetworkType )( + IBDA_SignalProperties * This, + /* [out][in] */ GUID *pguidNetworkType); + + HRESULT ( STDMETHODCALLTYPE *PutSignalSource )( + IBDA_SignalProperties * This, + /* [in] */ ULONG ulSignalSource); + + HRESULT ( STDMETHODCALLTYPE *GetSignalSource )( + IBDA_SignalProperties * This, + /* [out][in] */ ULONG *pulSignalSource); + + HRESULT ( STDMETHODCALLTYPE *PutTuningSpace )( + IBDA_SignalProperties * This, + /* [in] */ REFGUID guidTuningSpace); + + HRESULT ( STDMETHODCALLTYPE *GetTuningSpace )( + IBDA_SignalProperties * This, + /* [out][in] */ GUID *pguidTuingSpace); + + END_INTERFACE + } IBDA_SignalPropertiesVtbl; + + interface IBDA_SignalProperties + { + CONST_VTBL struct IBDA_SignalPropertiesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBDA_SignalProperties_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBDA_SignalProperties_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBDA_SignalProperties_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBDA_SignalProperties_PutNetworkType(This,guidNetworkType) \ + (This)->lpVtbl -> PutNetworkType(This,guidNetworkType) + +#define IBDA_SignalProperties_GetNetworkType(This,pguidNetworkType) \ + (This)->lpVtbl -> GetNetworkType(This,pguidNetworkType) + +#define IBDA_SignalProperties_PutSignalSource(This,ulSignalSource) \ + (This)->lpVtbl -> PutSignalSource(This,ulSignalSource) + +#define IBDA_SignalProperties_GetSignalSource(This,pulSignalSource) \ + (This)->lpVtbl -> GetSignalSource(This,pulSignalSource) + +#define IBDA_SignalProperties_PutTuningSpace(This,guidTuningSpace) \ + (This)->lpVtbl -> PutTuningSpace(This,guidTuningSpace) + +#define IBDA_SignalProperties_GetTuningSpace(This,pguidTuingSpace) \ + (This)->lpVtbl -> GetTuningSpace(This,pguidTuingSpace) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBDA_SignalProperties_PutNetworkType_Proxy( + IBDA_SignalProperties * This, + /* [in] */ REFGUID guidNetworkType); + + +void __RPC_STUB IBDA_SignalProperties_PutNetworkType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_SignalProperties_GetNetworkType_Proxy( + IBDA_SignalProperties * This, + /* [out][in] */ GUID *pguidNetworkType); + + +void __RPC_STUB IBDA_SignalProperties_GetNetworkType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_SignalProperties_PutSignalSource_Proxy( + IBDA_SignalProperties * This, + /* [in] */ ULONG ulSignalSource); + + +void __RPC_STUB IBDA_SignalProperties_PutSignalSource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_SignalProperties_GetSignalSource_Proxy( + IBDA_SignalProperties * This, + /* [out][in] */ ULONG *pulSignalSource); + + +void __RPC_STUB IBDA_SignalProperties_GetSignalSource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_SignalProperties_PutTuningSpace_Proxy( + IBDA_SignalProperties * This, + /* [in] */ REFGUID guidTuningSpace); + + +void __RPC_STUB IBDA_SignalProperties_PutTuningSpace_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_SignalProperties_GetTuningSpace_Proxy( + IBDA_SignalProperties * This, + /* [out][in] */ GUID *pguidTuingSpace); + + +void __RPC_STUB IBDA_SignalProperties_GetTuningSpace_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBDA_SignalProperties_INTERFACE_DEFINED__ */ + + +#ifndef __IBDA_Topology_INTERFACE_DEFINED__ +#define __IBDA_Topology_INTERFACE_DEFINED__ + +/* interface IBDA_Topology */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IBDA_Topology; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A14EE835-0A23-11d3-9CC7-00C04F7971E0") + IBDA_Topology : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetNodeTypes( + /* [out][in] */ ULONG *pulcNodeTypes, + /* [in] */ ULONG ulcNodeTypesMax, + /* [size_is][out][in] */ ULONG rgulNodeTypes[ ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetNodeInterfaces( + /* [in] */ ULONG ulNodeType, + /* [out][in] */ ULONG *pulcInterfaces, + /* [in] */ ULONG ulcInterfacesMax, + /* [size_is][out][in] */ GUID *rgguidInterfaces[ ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPinTypes( + /* [out][in] */ ULONG *pulcPinTypes, + /* [in] */ ULONG ulcPinTypesMax, + /* [size_is][out][in] */ ULONG rgulPinTypes[ ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTemplateConnections( + /* [out][in] */ ULONG *pulcConnections, + /* [in] */ ULONG ulcConnectionsMax, + /* [size_is][out][in] */ BDA_TEMPLATE_CONNECTION rgConnections[ ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreatePin( + /* [in] */ ULONG ulPinType, + /* [out][in] */ ULONG *pulPinId) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeletePin( + /* [in] */ ULONG ulPinId) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMediaType( + /* [in] */ ULONG ulPinId, + /* [in] */ AM_MEDIA_TYPE *pMediaType) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMedium( + /* [in] */ ULONG ulPinId, + /* [in] */ REGPINMEDIUM *pMedium) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateTopology( + /* [in] */ ULONG ulInputPinId, + /* [in] */ ULONG ulOutputPinId) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetControlNode( + /* [in] */ ULONG ulInputPinId, + /* [in] */ ULONG ulOutputPinId, + /* [in] */ ULONG ulNodeType, + /* [out][in] */ IUnknown **ppControlNode) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBDA_TopologyVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBDA_Topology * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBDA_Topology * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBDA_Topology * This); + + HRESULT ( STDMETHODCALLTYPE *GetNodeTypes )( + IBDA_Topology * This, + /* [out][in] */ ULONG *pulcNodeTypes, + /* [in] */ ULONG ulcNodeTypesMax, + /* [size_is][out][in] */ ULONG rgulNodeTypes[ ]); + + HRESULT ( STDMETHODCALLTYPE *GetNodeInterfaces )( + IBDA_Topology * This, + /* [in] */ ULONG ulNodeType, + /* [out][in] */ ULONG *pulcInterfaces, + /* [in] */ ULONG ulcInterfacesMax, + /* [size_is][out][in] */ GUID *rgguidInterfaces[ ]); + + HRESULT ( STDMETHODCALLTYPE *GetPinTypes )( + IBDA_Topology * This, + /* [out][in] */ ULONG *pulcPinTypes, + /* [in] */ ULONG ulcPinTypesMax, + /* [size_is][out][in] */ ULONG rgulPinTypes[ ]); + + HRESULT ( STDMETHODCALLTYPE *GetTemplateConnections )( + IBDA_Topology * This, + /* [out][in] */ ULONG *pulcConnections, + /* [in] */ ULONG ulcConnectionsMax, + /* [size_is][out][in] */ BDA_TEMPLATE_CONNECTION rgConnections[ ]); + + HRESULT ( STDMETHODCALLTYPE *CreatePin )( + IBDA_Topology * This, + /* [in] */ ULONG ulPinType, + /* [out][in] */ ULONG *pulPinId); + + HRESULT ( STDMETHODCALLTYPE *DeletePin )( + IBDA_Topology * This, + /* [in] */ ULONG ulPinId); + + HRESULT ( STDMETHODCALLTYPE *SetMediaType )( + IBDA_Topology * This, + /* [in] */ ULONG ulPinId, + /* [in] */ AM_MEDIA_TYPE *pMediaType); + + HRESULT ( STDMETHODCALLTYPE *SetMedium )( + IBDA_Topology * This, + /* [in] */ ULONG ulPinId, + /* [in] */ REGPINMEDIUM *pMedium); + + HRESULT ( STDMETHODCALLTYPE *CreateTopology )( + IBDA_Topology * This, + /* [in] */ ULONG ulInputPinId, + /* [in] */ ULONG ulOutputPinId); + + HRESULT ( STDMETHODCALLTYPE *GetControlNode )( + IBDA_Topology * This, + /* [in] */ ULONG ulInputPinId, + /* [in] */ ULONG ulOutputPinId, + /* [in] */ ULONG ulNodeType, + /* [out][in] */ IUnknown **ppControlNode); + + END_INTERFACE + } IBDA_TopologyVtbl; + + interface IBDA_Topology + { + CONST_VTBL struct IBDA_TopologyVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBDA_Topology_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBDA_Topology_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBDA_Topology_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBDA_Topology_GetNodeTypes(This,pulcNodeTypes,ulcNodeTypesMax,rgulNodeTypes) \ + (This)->lpVtbl -> GetNodeTypes(This,pulcNodeTypes,ulcNodeTypesMax,rgulNodeTypes) + +#define IBDA_Topology_GetNodeInterfaces(This,ulNodeType,pulcInterfaces,ulcInterfacesMax,rgguidInterfaces) \ + (This)->lpVtbl -> GetNodeInterfaces(This,ulNodeType,pulcInterfaces,ulcInterfacesMax,rgguidInterfaces) + +#define IBDA_Topology_GetPinTypes(This,pulcPinTypes,ulcPinTypesMax,rgulPinTypes) \ + (This)->lpVtbl -> GetPinTypes(This,pulcPinTypes,ulcPinTypesMax,rgulPinTypes) + +#define IBDA_Topology_GetTemplateConnections(This,pulcConnections,ulcConnectionsMax,rgConnections) \ + (This)->lpVtbl -> GetTemplateConnections(This,pulcConnections,ulcConnectionsMax,rgConnections) + +#define IBDA_Topology_CreatePin(This,ulPinType,pulPinId) \ + (This)->lpVtbl -> CreatePin(This,ulPinType,pulPinId) + +#define IBDA_Topology_DeletePin(This,ulPinId) \ + (This)->lpVtbl -> DeletePin(This,ulPinId) + +#define IBDA_Topology_SetMediaType(This,ulPinId,pMediaType) \ + (This)->lpVtbl -> SetMediaType(This,ulPinId,pMediaType) + +#define IBDA_Topology_SetMedium(This,ulPinId,pMedium) \ + (This)->lpVtbl -> SetMedium(This,ulPinId,pMedium) + +#define IBDA_Topology_CreateTopology(This,ulInputPinId,ulOutputPinId) \ + (This)->lpVtbl -> CreateTopology(This,ulInputPinId,ulOutputPinId) + +#define IBDA_Topology_GetControlNode(This,ulInputPinId,ulOutputPinId,ulNodeType,ppControlNode) \ + (This)->lpVtbl -> GetControlNode(This,ulInputPinId,ulOutputPinId,ulNodeType,ppControlNode) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBDA_Topology_GetNodeTypes_Proxy( + IBDA_Topology * This, + /* [out][in] */ ULONG *pulcNodeTypes, + /* [in] */ ULONG ulcNodeTypesMax, + /* [size_is][out][in] */ ULONG rgulNodeTypes[ ]); + + +void __RPC_STUB IBDA_Topology_GetNodeTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_Topology_GetNodeInterfaces_Proxy( + IBDA_Topology * This, + /* [in] */ ULONG ulNodeType, + /* [out][in] */ ULONG *pulcInterfaces, + /* [in] */ ULONG ulcInterfacesMax, + /* [size_is][out][in] */ GUID *rgguidInterfaces[ ]); + + +void __RPC_STUB IBDA_Topology_GetNodeInterfaces_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_Topology_GetPinTypes_Proxy( + IBDA_Topology * This, + /* [out][in] */ ULONG *pulcPinTypes, + /* [in] */ ULONG ulcPinTypesMax, + /* [size_is][out][in] */ ULONG rgulPinTypes[ ]); + + +void __RPC_STUB IBDA_Topology_GetPinTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_Topology_GetTemplateConnections_Proxy( + IBDA_Topology * This, + /* [out][in] */ ULONG *pulcConnections, + /* [in] */ ULONG ulcConnectionsMax, + /* [size_is][out][in] */ BDA_TEMPLATE_CONNECTION rgConnections[ ]); + + +void __RPC_STUB IBDA_Topology_GetTemplateConnections_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_Topology_CreatePin_Proxy( + IBDA_Topology * This, + /* [in] */ ULONG ulPinType, + /* [out][in] */ ULONG *pulPinId); + + +void __RPC_STUB IBDA_Topology_CreatePin_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_Topology_DeletePin_Proxy( + IBDA_Topology * This, + /* [in] */ ULONG ulPinId); + + +void __RPC_STUB IBDA_Topology_DeletePin_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_Topology_SetMediaType_Proxy( + IBDA_Topology * This, + /* [in] */ ULONG ulPinId, + /* [in] */ AM_MEDIA_TYPE *pMediaType); + + +void __RPC_STUB IBDA_Topology_SetMediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_Topology_SetMedium_Proxy( + IBDA_Topology * This, + /* [in] */ ULONG ulPinId, + /* [in] */ REGPINMEDIUM *pMedium); + + +void __RPC_STUB IBDA_Topology_SetMedium_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_Topology_CreateTopology_Proxy( + IBDA_Topology * This, + /* [in] */ ULONG ulInputPinId, + /* [in] */ ULONG ulOutputPinId); + + +void __RPC_STUB IBDA_Topology_CreateTopology_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_Topology_GetControlNode_Proxy( + IBDA_Topology * This, + /* [in] */ ULONG ulInputPinId, + /* [in] */ ULONG ulOutputPinId, + /* [in] */ ULONG ulNodeType, + /* [out][in] */ IUnknown **ppControlNode); + + +void __RPC_STUB IBDA_Topology_GetControlNode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBDA_Topology_INTERFACE_DEFINED__ */ + + +#ifndef __IBDA_VoidTransform_INTERFACE_DEFINED__ +#define __IBDA_VoidTransform_INTERFACE_DEFINED__ + +/* interface IBDA_VoidTransform */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IBDA_VoidTransform; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("71985F46-1CA1-11d3-9CC8-00C04F7971E0") + IBDA_VoidTransform : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Start( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBDA_VoidTransformVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBDA_VoidTransform * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBDA_VoidTransform * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBDA_VoidTransform * This); + + HRESULT ( STDMETHODCALLTYPE *Start )( + IBDA_VoidTransform * This); + + HRESULT ( STDMETHODCALLTYPE *Stop )( + IBDA_VoidTransform * This); + + END_INTERFACE + } IBDA_VoidTransformVtbl; + + interface IBDA_VoidTransform + { + CONST_VTBL struct IBDA_VoidTransformVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBDA_VoidTransform_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBDA_VoidTransform_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBDA_VoidTransform_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBDA_VoidTransform_Start(This) \ + (This)->lpVtbl -> Start(This) + +#define IBDA_VoidTransform_Stop(This) \ + (This)->lpVtbl -> Stop(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBDA_VoidTransform_Start_Proxy( + IBDA_VoidTransform * This); + + +void __RPC_STUB IBDA_VoidTransform_Start_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_VoidTransform_Stop_Proxy( + IBDA_VoidTransform * This); + + +void __RPC_STUB IBDA_VoidTransform_Stop_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBDA_VoidTransform_INTERFACE_DEFINED__ */ + + +#ifndef __IBDA_NullTransform_INTERFACE_DEFINED__ +#define __IBDA_NullTransform_INTERFACE_DEFINED__ + +/* interface IBDA_NullTransform */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IBDA_NullTransform; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("DDF15B0D-BD25-11d2-9CA0-00C04F7971E0") + IBDA_NullTransform : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Start( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBDA_NullTransformVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBDA_NullTransform * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBDA_NullTransform * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBDA_NullTransform * This); + + HRESULT ( STDMETHODCALLTYPE *Start )( + IBDA_NullTransform * This); + + HRESULT ( STDMETHODCALLTYPE *Stop )( + IBDA_NullTransform * This); + + END_INTERFACE + } IBDA_NullTransformVtbl; + + interface IBDA_NullTransform + { + CONST_VTBL struct IBDA_NullTransformVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBDA_NullTransform_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBDA_NullTransform_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBDA_NullTransform_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBDA_NullTransform_Start(This) \ + (This)->lpVtbl -> Start(This) + +#define IBDA_NullTransform_Stop(This) \ + (This)->lpVtbl -> Stop(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBDA_NullTransform_Start_Proxy( + IBDA_NullTransform * This); + + +void __RPC_STUB IBDA_NullTransform_Start_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_NullTransform_Stop_Proxy( + IBDA_NullTransform * This); + + +void __RPC_STUB IBDA_NullTransform_Stop_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBDA_NullTransform_INTERFACE_DEFINED__ */ + + +#ifndef __IBDA_FrequencyFilter_INTERFACE_DEFINED__ +#define __IBDA_FrequencyFilter_INTERFACE_DEFINED__ + +/* interface IBDA_FrequencyFilter */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IBDA_FrequencyFilter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("71985F47-1CA1-11d3-9CC8-00C04F7971E0") + IBDA_FrequencyFilter : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE put_Autotune( + /* [in] */ ULONG *pulTransponder) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_Frequency( + /* [in] */ ULONG *pulFrequency) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Frequency( + /* [out][in] */ ULONG *pulFrequency) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_Polarity( + /* [in] */ ULONG *pulPolarity) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Polarity( + /* [out][in] */ ULONG *pulPolarity) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_Range( + /* [in] */ ULONG *pulRange) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Range( + /* [out][in] */ ULONG *pulRange) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBDA_FrequencyFilterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBDA_FrequencyFilter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBDA_FrequencyFilter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBDA_FrequencyFilter * This); + + HRESULT ( STDMETHODCALLTYPE *put_Autotune )( + IBDA_FrequencyFilter * This, + /* [in] */ ULONG *pulTransponder); + + HRESULT ( STDMETHODCALLTYPE *put_Frequency )( + IBDA_FrequencyFilter * This, + /* [in] */ ULONG *pulFrequency); + + HRESULT ( STDMETHODCALLTYPE *get_Frequency )( + IBDA_FrequencyFilter * This, + /* [out][in] */ ULONG *pulFrequency); + + HRESULT ( STDMETHODCALLTYPE *put_Polarity )( + IBDA_FrequencyFilter * This, + /* [in] */ ULONG *pulPolarity); + + HRESULT ( STDMETHODCALLTYPE *get_Polarity )( + IBDA_FrequencyFilter * This, + /* [out][in] */ ULONG *pulPolarity); + + HRESULT ( STDMETHODCALLTYPE *put_Range )( + IBDA_FrequencyFilter * This, + /* [in] */ ULONG *pulRange); + + HRESULT ( STDMETHODCALLTYPE *get_Range )( + IBDA_FrequencyFilter * This, + /* [out][in] */ ULONG *pulRange); + + END_INTERFACE + } IBDA_FrequencyFilterVtbl; + + interface IBDA_FrequencyFilter + { + CONST_VTBL struct IBDA_FrequencyFilterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBDA_FrequencyFilter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBDA_FrequencyFilter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBDA_FrequencyFilter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBDA_FrequencyFilter_put_Autotune(This,pulTransponder) \ + (This)->lpVtbl -> put_Autotune(This,pulTransponder) + +#define IBDA_FrequencyFilter_put_Frequency(This,pulFrequency) \ + (This)->lpVtbl -> put_Frequency(This,pulFrequency) + +#define IBDA_FrequencyFilter_get_Frequency(This,pulFrequency) \ + (This)->lpVtbl -> get_Frequency(This,pulFrequency) + +#define IBDA_FrequencyFilter_put_Polarity(This,pulPolarity) \ + (This)->lpVtbl -> put_Polarity(This,pulPolarity) + +#define IBDA_FrequencyFilter_get_Polarity(This,pulPolarity) \ + (This)->lpVtbl -> get_Polarity(This,pulPolarity) + +#define IBDA_FrequencyFilter_put_Range(This,pulRange) \ + (This)->lpVtbl -> put_Range(This,pulRange) + +#define IBDA_FrequencyFilter_get_Range(This,pulRange) \ + (This)->lpVtbl -> get_Range(This,pulRange) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBDA_FrequencyFilter_put_Autotune_Proxy( + IBDA_FrequencyFilter * This, + /* [in] */ ULONG *pulTransponder); + + +void __RPC_STUB IBDA_FrequencyFilter_put_Autotune_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_FrequencyFilter_put_Frequency_Proxy( + IBDA_FrequencyFilter * This, + /* [in] */ ULONG *pulFrequency); + + +void __RPC_STUB IBDA_FrequencyFilter_put_Frequency_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_FrequencyFilter_get_Frequency_Proxy( + IBDA_FrequencyFilter * This, + /* [out][in] */ ULONG *pulFrequency); + + +void __RPC_STUB IBDA_FrequencyFilter_get_Frequency_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_FrequencyFilter_put_Polarity_Proxy( + IBDA_FrequencyFilter * This, + /* [in] */ ULONG *pulPolarity); + + +void __RPC_STUB IBDA_FrequencyFilter_put_Polarity_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_FrequencyFilter_get_Polarity_Proxy( + IBDA_FrequencyFilter * This, + /* [out][in] */ ULONG *pulPolarity); + + +void __RPC_STUB IBDA_FrequencyFilter_get_Polarity_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_FrequencyFilter_put_Range_Proxy( + IBDA_FrequencyFilter * This, + /* [in] */ ULONG *pulRange); + + +void __RPC_STUB IBDA_FrequencyFilter_put_Range_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_FrequencyFilter_get_Range_Proxy( + IBDA_FrequencyFilter * This, + /* [out][in] */ ULONG *pulRange); + + +void __RPC_STUB IBDA_FrequencyFilter_get_Range_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBDA_FrequencyFilter_INTERFACE_DEFINED__ */ + + +#ifndef __IBDA_AutoDemodulate_INTERFACE_DEFINED__ +#define __IBDA_AutoDemodulate_INTERFACE_DEFINED__ + +/* interface IBDA_AutoDemodulate */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IBDA_AutoDemodulate; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("DDF15B12-BD25-11d2-9CA0-00C04F7971E0") + IBDA_AutoDemodulate : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE put_AutoDemodulate( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBDA_AutoDemodulateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBDA_AutoDemodulate * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBDA_AutoDemodulate * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBDA_AutoDemodulate * This); + + HRESULT ( STDMETHODCALLTYPE *put_AutoDemodulate )( + IBDA_AutoDemodulate * This); + + END_INTERFACE + } IBDA_AutoDemodulateVtbl; + + interface IBDA_AutoDemodulate + { + CONST_VTBL struct IBDA_AutoDemodulateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBDA_AutoDemodulate_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBDA_AutoDemodulate_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBDA_AutoDemodulate_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBDA_AutoDemodulate_put_AutoDemodulate(This) \ + (This)->lpVtbl -> put_AutoDemodulate(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBDA_AutoDemodulate_put_AutoDemodulate_Proxy( + IBDA_AutoDemodulate * This); + + +void __RPC_STUB IBDA_AutoDemodulate_put_AutoDemodulate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBDA_AutoDemodulate_INTERFACE_DEFINED__ */ + + +#ifndef __IBDA_DigitalDemodulator_INTERFACE_DEFINED__ +#define __IBDA_DigitalDemodulator_INTERFACE_DEFINED__ + +/* interface IBDA_DigitalDemodulator */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IBDA_DigitalDemodulator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("EF30F379-985B-4d10-B640-A79D5E04E1E0") + IBDA_DigitalDemodulator : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE put_ModulationType( + /* [in] */ ModulationType *pModulationType) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_ModulationType( + /* [out][in] */ ModulationType *pModulationType) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_InnerFECMethod( + /* [in] */ FECMethod *pFECMethod) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_InnerFECMethod( + /* [out][in] */ FECMethod *pFECMethod) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_InnerFECRate( + /* [in] */ BinaryConvolutionCodeRate *pFECRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_InnerFECRate( + /* [out][in] */ BinaryConvolutionCodeRate *pFECRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_OuterFECMethod( + /* [in] */ FECMethod *pFECMethod) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_OuterFECMethod( + /* [out][in] */ FECMethod *pFECMethod) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_OuterFECRate( + /* [in] */ BinaryConvolutionCodeRate *pFECRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_OuterFECRate( + /* [out][in] */ BinaryConvolutionCodeRate *pFECRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_SymbolRate( + /* [in] */ ULONG *pSymbolRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_SymbolRate( + /* [out][in] */ ULONG *pSymbolRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_SpectralInversion( + /* [in] */ SpectralInversion *pSpectralInversion) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_SpectralInversion( + /* [out][in] */ SpectralInversion *pSpectralInversion) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBDA_DigitalDemodulatorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBDA_DigitalDemodulator * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBDA_DigitalDemodulator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBDA_DigitalDemodulator * This); + + HRESULT ( STDMETHODCALLTYPE *put_ModulationType )( + IBDA_DigitalDemodulator * This, + /* [in] */ ModulationType *pModulationType); + + HRESULT ( STDMETHODCALLTYPE *get_ModulationType )( + IBDA_DigitalDemodulator * This, + /* [out][in] */ ModulationType *pModulationType); + + HRESULT ( STDMETHODCALLTYPE *put_InnerFECMethod )( + IBDA_DigitalDemodulator * This, + /* [in] */ FECMethod *pFECMethod); + + HRESULT ( STDMETHODCALLTYPE *get_InnerFECMethod )( + IBDA_DigitalDemodulator * This, + /* [out][in] */ FECMethod *pFECMethod); + + HRESULT ( STDMETHODCALLTYPE *put_InnerFECRate )( + IBDA_DigitalDemodulator * This, + /* [in] */ BinaryConvolutionCodeRate *pFECRate); + + HRESULT ( STDMETHODCALLTYPE *get_InnerFECRate )( + IBDA_DigitalDemodulator * This, + /* [out][in] */ BinaryConvolutionCodeRate *pFECRate); + + HRESULT ( STDMETHODCALLTYPE *put_OuterFECMethod )( + IBDA_DigitalDemodulator * This, + /* [in] */ FECMethod *pFECMethod); + + HRESULT ( STDMETHODCALLTYPE *get_OuterFECMethod )( + IBDA_DigitalDemodulator * This, + /* [out][in] */ FECMethod *pFECMethod); + + HRESULT ( STDMETHODCALLTYPE *put_OuterFECRate )( + IBDA_DigitalDemodulator * This, + /* [in] */ BinaryConvolutionCodeRate *pFECRate); + + HRESULT ( STDMETHODCALLTYPE *get_OuterFECRate )( + IBDA_DigitalDemodulator * This, + /* [out][in] */ BinaryConvolutionCodeRate *pFECRate); + + HRESULT ( STDMETHODCALLTYPE *put_SymbolRate )( + IBDA_DigitalDemodulator * This, + /* [in] */ ULONG *pSymbolRate); + + HRESULT ( STDMETHODCALLTYPE *get_SymbolRate )( + IBDA_DigitalDemodulator * This, + /* [out][in] */ ULONG *pSymbolRate); + + HRESULT ( STDMETHODCALLTYPE *put_SpectralInversion )( + IBDA_DigitalDemodulator * This, + /* [in] */ SpectralInversion *pSpectralInversion); + + HRESULT ( STDMETHODCALLTYPE *get_SpectralInversion )( + IBDA_DigitalDemodulator * This, + /* [out][in] */ SpectralInversion *pSpectralInversion); + + END_INTERFACE + } IBDA_DigitalDemodulatorVtbl; + + interface IBDA_DigitalDemodulator + { + CONST_VTBL struct IBDA_DigitalDemodulatorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBDA_DigitalDemodulator_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBDA_DigitalDemodulator_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBDA_DigitalDemodulator_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBDA_DigitalDemodulator_put_ModulationType(This,pModulationType) \ + (This)->lpVtbl -> put_ModulationType(This,pModulationType) + +#define IBDA_DigitalDemodulator_get_ModulationType(This,pModulationType) \ + (This)->lpVtbl -> get_ModulationType(This,pModulationType) + +#define IBDA_DigitalDemodulator_put_InnerFECMethod(This,pFECMethod) \ + (This)->lpVtbl -> put_InnerFECMethod(This,pFECMethod) + +#define IBDA_DigitalDemodulator_get_InnerFECMethod(This,pFECMethod) \ + (This)->lpVtbl -> get_InnerFECMethod(This,pFECMethod) + +#define IBDA_DigitalDemodulator_put_InnerFECRate(This,pFECRate) \ + (This)->lpVtbl -> put_InnerFECRate(This,pFECRate) + +#define IBDA_DigitalDemodulator_get_InnerFECRate(This,pFECRate) \ + (This)->lpVtbl -> get_InnerFECRate(This,pFECRate) + +#define IBDA_DigitalDemodulator_put_OuterFECMethod(This,pFECMethod) \ + (This)->lpVtbl -> put_OuterFECMethod(This,pFECMethod) + +#define IBDA_DigitalDemodulator_get_OuterFECMethod(This,pFECMethod) \ + (This)->lpVtbl -> get_OuterFECMethod(This,pFECMethod) + +#define IBDA_DigitalDemodulator_put_OuterFECRate(This,pFECRate) \ + (This)->lpVtbl -> put_OuterFECRate(This,pFECRate) + +#define IBDA_DigitalDemodulator_get_OuterFECRate(This,pFECRate) \ + (This)->lpVtbl -> get_OuterFECRate(This,pFECRate) + +#define IBDA_DigitalDemodulator_put_SymbolRate(This,pSymbolRate) \ + (This)->lpVtbl -> put_SymbolRate(This,pSymbolRate) + +#define IBDA_DigitalDemodulator_get_SymbolRate(This,pSymbolRate) \ + (This)->lpVtbl -> get_SymbolRate(This,pSymbolRate) + +#define IBDA_DigitalDemodulator_put_SpectralInversion(This,pSpectralInversion) \ + (This)->lpVtbl -> put_SpectralInversion(This,pSpectralInversion) + +#define IBDA_DigitalDemodulator_get_SpectralInversion(This,pSpectralInversion) \ + (This)->lpVtbl -> get_SpectralInversion(This,pSpectralInversion) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBDA_DigitalDemodulator_put_ModulationType_Proxy( + IBDA_DigitalDemodulator * This, + /* [in] */ ModulationType *pModulationType); + + +void __RPC_STUB IBDA_DigitalDemodulator_put_ModulationType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_DigitalDemodulator_get_ModulationType_Proxy( + IBDA_DigitalDemodulator * This, + /* [out][in] */ ModulationType *pModulationType); + + +void __RPC_STUB IBDA_DigitalDemodulator_get_ModulationType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_DigitalDemodulator_put_InnerFECMethod_Proxy( + IBDA_DigitalDemodulator * This, + /* [in] */ FECMethod *pFECMethod); + + +void __RPC_STUB IBDA_DigitalDemodulator_put_InnerFECMethod_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_DigitalDemodulator_get_InnerFECMethod_Proxy( + IBDA_DigitalDemodulator * This, + /* [out][in] */ FECMethod *pFECMethod); + + +void __RPC_STUB IBDA_DigitalDemodulator_get_InnerFECMethod_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_DigitalDemodulator_put_InnerFECRate_Proxy( + IBDA_DigitalDemodulator * This, + /* [in] */ BinaryConvolutionCodeRate *pFECRate); + + +void __RPC_STUB IBDA_DigitalDemodulator_put_InnerFECRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_DigitalDemodulator_get_InnerFECRate_Proxy( + IBDA_DigitalDemodulator * This, + /* [out][in] */ BinaryConvolutionCodeRate *pFECRate); + + +void __RPC_STUB IBDA_DigitalDemodulator_get_InnerFECRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_DigitalDemodulator_put_OuterFECMethod_Proxy( + IBDA_DigitalDemodulator * This, + /* [in] */ FECMethod *pFECMethod); + + +void __RPC_STUB IBDA_DigitalDemodulator_put_OuterFECMethod_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_DigitalDemodulator_get_OuterFECMethod_Proxy( + IBDA_DigitalDemodulator * This, + /* [out][in] */ FECMethod *pFECMethod); + + +void __RPC_STUB IBDA_DigitalDemodulator_get_OuterFECMethod_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_DigitalDemodulator_put_OuterFECRate_Proxy( + IBDA_DigitalDemodulator * This, + /* [in] */ BinaryConvolutionCodeRate *pFECRate); + + +void __RPC_STUB IBDA_DigitalDemodulator_put_OuterFECRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_DigitalDemodulator_get_OuterFECRate_Proxy( + IBDA_DigitalDemodulator * This, + /* [out][in] */ BinaryConvolutionCodeRate *pFECRate); + + +void __RPC_STUB IBDA_DigitalDemodulator_get_OuterFECRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_DigitalDemodulator_put_SymbolRate_Proxy( + IBDA_DigitalDemodulator * This, + /* [in] */ ULONG *pSymbolRate); + + +void __RPC_STUB IBDA_DigitalDemodulator_put_SymbolRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_DigitalDemodulator_get_SymbolRate_Proxy( + IBDA_DigitalDemodulator * This, + /* [out][in] */ ULONG *pSymbolRate); + + +void __RPC_STUB IBDA_DigitalDemodulator_get_SymbolRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_DigitalDemodulator_put_SpectralInversion_Proxy( + IBDA_DigitalDemodulator * This, + /* [in] */ SpectralInversion *pSpectralInversion); + + +void __RPC_STUB IBDA_DigitalDemodulator_put_SpectralInversion_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_DigitalDemodulator_get_SpectralInversion_Proxy( + IBDA_DigitalDemodulator * This, + /* [out][in] */ SpectralInversion *pSpectralInversion); + + +void __RPC_STUB IBDA_DigitalDemodulator_get_SpectralInversion_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBDA_DigitalDemodulator_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_bdaiface_0388 */ +/* [local] */ + +typedef /* [public] */ +enum __MIDL___MIDL_itf_bdaiface_0388_0001 + { KSPROPERTY_IPSINK_MULTICASTLIST = 0, + KSPROPERTY_IPSINK_ADAPTER_DESCRIPTION = KSPROPERTY_IPSINK_MULTICASTLIST + 1, + KSPROPERTY_IPSINK_ADAPTER_ADDRESS = KSPROPERTY_IPSINK_ADAPTER_DESCRIPTION + 1 + } KSPROPERTY_IPSINK; + + + +extern RPC_IF_HANDLE __MIDL_itf_bdaiface_0388_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_bdaiface_0388_v0_0_s_ifspec; + +#ifndef __IBDA_IPSinkControl_INTERFACE_DEFINED__ +#define __IBDA_IPSinkControl_INTERFACE_DEFINED__ + +/* interface IBDA_IPSinkControl */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IBDA_IPSinkControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3F4DC8E2-4050-11d3-8F4B-00C04F7971E2") + IBDA_IPSinkControl : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetMulticastList( + /* [out][in] */ unsigned long *pulcbSize, + /* [out][in] */ BYTE **pbBuffer) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAdapterIPAddress( + /* [out][in] */ unsigned long *pulcbSize, + /* [out][in] */ BYTE **pbBuffer) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBDA_IPSinkControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBDA_IPSinkControl * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBDA_IPSinkControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBDA_IPSinkControl * This); + + HRESULT ( STDMETHODCALLTYPE *GetMulticastList )( + IBDA_IPSinkControl * This, + /* [out][in] */ unsigned long *pulcbSize, + /* [out][in] */ BYTE **pbBuffer); + + HRESULT ( STDMETHODCALLTYPE *GetAdapterIPAddress )( + IBDA_IPSinkControl * This, + /* [out][in] */ unsigned long *pulcbSize, + /* [out][in] */ BYTE **pbBuffer); + + END_INTERFACE + } IBDA_IPSinkControlVtbl; + + interface IBDA_IPSinkControl + { + CONST_VTBL struct IBDA_IPSinkControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBDA_IPSinkControl_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBDA_IPSinkControl_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBDA_IPSinkControl_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBDA_IPSinkControl_GetMulticastList(This,pulcbSize,pbBuffer) \ + (This)->lpVtbl -> GetMulticastList(This,pulcbSize,pbBuffer) + +#define IBDA_IPSinkControl_GetAdapterIPAddress(This,pulcbSize,pbBuffer) \ + (This)->lpVtbl -> GetAdapterIPAddress(This,pulcbSize,pbBuffer) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBDA_IPSinkControl_GetMulticastList_Proxy( + IBDA_IPSinkControl * This, + /* [out][in] */ unsigned long *pulcbSize, + /* [out][in] */ BYTE **pbBuffer); + + +void __RPC_STUB IBDA_IPSinkControl_GetMulticastList_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBDA_IPSinkControl_GetAdapterIPAddress_Proxy( + IBDA_IPSinkControl * This, + /* [out][in] */ unsigned long *pulcbSize, + /* [out][in] */ BYTE **pbBuffer); + + +void __RPC_STUB IBDA_IPSinkControl_GetAdapterIPAddress_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBDA_IPSinkControl_INTERFACE_DEFINED__ */ + + +#ifndef __IEnumPIDMap_INTERFACE_DEFINED__ +#define __IEnumPIDMap_INTERFACE_DEFINED__ + +/* interface IEnumPIDMap */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IEnumPIDMap; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("afb6c2a2-2c41-11d3-8a60-0000f81e0e4a") + IEnumPIDMap : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG cRequest, + /* [size_is][out][in] */ PID_MAP *pPIDMap, + /* [out] */ ULONG *pcReceived) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG cRecords) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IEnumPIDMap **ppIEnumPIDMap) = 0; + + }; + +#else /* C style interface */ + + typedef struct IEnumPIDMapVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IEnumPIDMap * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IEnumPIDMap * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IEnumPIDMap * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IEnumPIDMap * This, + /* [in] */ ULONG cRequest, + /* [size_is][out][in] */ PID_MAP *pPIDMap, + /* [out] */ ULONG *pcReceived); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IEnumPIDMap * This, + /* [in] */ ULONG cRecords); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IEnumPIDMap * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IEnumPIDMap * This, + /* [out] */ IEnumPIDMap **ppIEnumPIDMap); + + END_INTERFACE + } IEnumPIDMapVtbl; + + interface IEnumPIDMap + { + CONST_VTBL struct IEnumPIDMapVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IEnumPIDMap_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IEnumPIDMap_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IEnumPIDMap_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IEnumPIDMap_Next(This,cRequest,pPIDMap,pcReceived) \ + (This)->lpVtbl -> Next(This,cRequest,pPIDMap,pcReceived) + +#define IEnumPIDMap_Skip(This,cRecords) \ + (This)->lpVtbl -> Skip(This,cRecords) + +#define IEnumPIDMap_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IEnumPIDMap_Clone(This,ppIEnumPIDMap) \ + (This)->lpVtbl -> Clone(This,ppIEnumPIDMap) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IEnumPIDMap_Next_Proxy( + IEnumPIDMap * This, + /* [in] */ ULONG cRequest, + /* [size_is][out][in] */ PID_MAP *pPIDMap, + /* [out] */ ULONG *pcReceived); + + +void __RPC_STUB IEnumPIDMap_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumPIDMap_Skip_Proxy( + IEnumPIDMap * This, + /* [in] */ ULONG cRecords); + + +void __RPC_STUB IEnumPIDMap_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumPIDMap_Reset_Proxy( + IEnumPIDMap * This); + + +void __RPC_STUB IEnumPIDMap_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumPIDMap_Clone_Proxy( + IEnumPIDMap * This, + /* [out] */ IEnumPIDMap **ppIEnumPIDMap); + + +void __RPC_STUB IEnumPIDMap_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IEnumPIDMap_INTERFACE_DEFINED__ */ + + +#ifndef __IMPEG2PIDMap_INTERFACE_DEFINED__ +#define __IMPEG2PIDMap_INTERFACE_DEFINED__ + +/* interface IMPEG2PIDMap */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMPEG2PIDMap; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("afb6c2a1-2c41-11d3-8a60-0000f81e0e4a") + IMPEG2PIDMap : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE MapPID( + /* [in] */ ULONG culPID, + /* [in] */ ULONG *pulPID, + /* [in] */ MEDIA_SAMPLE_CONTENT MediaSampleContent) = 0; + + virtual HRESULT STDMETHODCALLTYPE UnmapPID( + /* [in] */ ULONG culPID, + /* [in] */ ULONG *pulPID) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumPIDMap( + /* [out] */ IEnumPIDMap **pIEnumPIDMap) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMPEG2PIDMapVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMPEG2PIDMap * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMPEG2PIDMap * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMPEG2PIDMap * This); + + HRESULT ( STDMETHODCALLTYPE *MapPID )( + IMPEG2PIDMap * This, + /* [in] */ ULONG culPID, + /* [in] */ ULONG *pulPID, + /* [in] */ MEDIA_SAMPLE_CONTENT MediaSampleContent); + + HRESULT ( STDMETHODCALLTYPE *UnmapPID )( + IMPEG2PIDMap * This, + /* [in] */ ULONG culPID, + /* [in] */ ULONG *pulPID); + + HRESULT ( STDMETHODCALLTYPE *EnumPIDMap )( + IMPEG2PIDMap * This, + /* [out] */ IEnumPIDMap **pIEnumPIDMap); + + END_INTERFACE + } IMPEG2PIDMapVtbl; + + interface IMPEG2PIDMap + { + CONST_VTBL struct IMPEG2PIDMapVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMPEG2PIDMap_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMPEG2PIDMap_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMPEG2PIDMap_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMPEG2PIDMap_MapPID(This,culPID,pulPID,MediaSampleContent) \ + (This)->lpVtbl -> MapPID(This,culPID,pulPID,MediaSampleContent) + +#define IMPEG2PIDMap_UnmapPID(This,culPID,pulPID) \ + (This)->lpVtbl -> UnmapPID(This,culPID,pulPID) + +#define IMPEG2PIDMap_EnumPIDMap(This,pIEnumPIDMap) \ + (This)->lpVtbl -> EnumPIDMap(This,pIEnumPIDMap) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMPEG2PIDMap_MapPID_Proxy( + IMPEG2PIDMap * This, + /* [in] */ ULONG culPID, + /* [in] */ ULONG *pulPID, + /* [in] */ MEDIA_SAMPLE_CONTENT MediaSampleContent); + + +void __RPC_STUB IMPEG2PIDMap_MapPID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMPEG2PIDMap_UnmapPID_Proxy( + IMPEG2PIDMap * This, + /* [in] */ ULONG culPID, + /* [in] */ ULONG *pulPID); + + +void __RPC_STUB IMPEG2PIDMap_UnmapPID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMPEG2PIDMap_EnumPIDMap_Proxy( + IMPEG2PIDMap * This, + /* [out] */ IEnumPIDMap **pIEnumPIDMap); + + +void __RPC_STUB IMPEG2PIDMap_EnumPIDMap_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMPEG2PIDMap_INTERFACE_DEFINED__ */ + + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/bdamedia.h b/windows_libs/mssdk/include/bdamedia.h new file mode 100644 index 00000000..01c203ba --- /dev/null +++ b/windows_libs/mssdk/include/bdamedia.h @@ -0,0 +1,1417 @@ +//------------------------------------------------------------------------------ +// File: BDAMedia.h +// +// Desc: Broadcast Driver Architecture Multimedia Definitions. +// +// Copyright (c) 1996 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#if !defined(_KSMEDIA_) +#error KSMEDIA.H must be included before BDAMEDIA.H +#endif // !defined(_KSMEDIA_) + +#if !defined(_BDATYPES_) +#error BDATYPES.H must be included before BDAMEDIA.H +#endif // !defined(_BDATYPES_) + +#if !defined(_BDAMEDIA_) +#define _BDAMEDIA_ + +#if defined(__cplusplus) +extern "C" { +#endif // defined(__cplusplus) + + + +//=========================================================================== +// +// KSProperty Set Structure Definitions for BDA +// +//=========================================================================== + +typedef struct _KSP_BDA_NODE_PIN { + KSPROPERTY Property; + ULONG ulNodeType; + ULONG ulInputPinId; + ULONG ulOutputPinId; +} KSP_BDA_NODE_PIN, *PKSP_BDA_NODE_PIN; + + +typedef struct { + KSP_NODE Property; + ULONG EsPid; +} KSP_NODE_ESPID, *PKSP_NODE_ESPID; + + + +//=========================================================================== +// +// BDA Data Range definitions. Includes specifier definitions. +// +//=========================================================================== + +// Antenna Signal Formats +// + +typedef struct tagKS_DATARANGE_BDA_ANTENNA { + KSDATARANGE DataRange; + + // Antenna specifier can go here if required + // +} KS_DATARANGE_BDA_ANTENNA, *PKS_DATARANGE_BDA_ANTENNA; + + + +// Transport Formats +// + +typedef struct tagBDA_TRANSPORT_INFO { + ULONG ulcbPhyiscalPacket; // Size, in bytes, of a physical packet + // (e.g. Satellite link payload size. + ULONG ulcbPhyiscalFrame; // Size, in bytes, of each physical frame + // 0 indicates no HW requirement + ULONG ulcbPhyiscalFrameAlignment; // Capture buffer alignment in bytes + // 0 and 1 indicate no alignment requirements + REFERENCE_TIME AvgTimePerFrame; // Normal ActiveMovie units (100 nS) + +} BDA_TRANSPORT_INFO, *PBDA_TRANSPORT_INFO; + +typedef struct tagKS_DATARANGE_BDA_TRANSPORT { + KSDATARANGE DataRange; + BDA_TRANSPORT_INFO BdaTransportInfo; + + // Transport specifier can go here if required + // +} KS_DATARANGE_BDA_TRANSPORT, *PKS_DATARANGE_BDA_TRANSPORT; + + + +//=========================================================================== +// +// BDA Stream Format GUIDs +// +//=========================================================================== + +#define STATIC_KSDATAFORMAT_TYPE_BDA_ANTENNA\ + 0x71985f41, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("71985F41-1CA1-11d3-9CC8-00C04F7971E0", KSDATAFORMAT_TYPE_BDA_ANTENNA); +#define KSDATAFORMAT_TYPE_BDA_ANTENNA DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_BDA_ANTENNA) + + +#define STATIC_KSDATAFORMAT_SUBTYPE_BDA_MPEG2_TRANSPORT\ + 0xf4aeb342, 0x0329, 0x4fdd, 0xa8, 0xfd, 0x4a, 0xff, 0x49, 0x26, 0xc9, 0x78 +DEFINE_GUIDSTRUCT("F4AEB342-0329-4fdd-A8FD-4AFF4926C978", KSDATAFORMAT_SUBTYPE_BDA_MPEG2_TRANSPORT); +#define KSDATAFORMAT_SUBTYPE_BDA_MPEG2_TRANSPORT DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_BDA_MPEG2_TRANSPORT) + + +#define STATIC_KSDATAFORMAT_SPECIFIER_BDA_TRANSPORT\ + 0x8deda6fd, 0xac5f, 0x4334, 0x8e, 0xcf, 0xa4, 0xba, 0x8f, 0xa7, 0xd0, 0xf0 +DEFINE_GUIDSTRUCT("8DEDA6FD-AC5F-4334-8ECF-A4BA8FA7D0F0", KSDATAFORMAT_SPECIFIER_BDA_TRANSPORT); +#define KSDATAFORMAT_SPECIFIER_BDA_TRANSPORT DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_BDA_TRANSPORT) + + +#define STATIC_KSDATAFORMAT_TYPE_BDA_IF_SIGNAL\ + 0x61be0b47, 0xa5eb, 0x499b, 0x9a, 0x85, 0x5b, 0x16, 0xc0, 0x7f, 0x12, 0x58 +DEFINE_GUIDSTRUCT("61BE0B47-A5EB-499b-9A85-5B16C07F1258", KSDATAFORMAT_TYPE_BDA_IF_SIGNAL); +#define KSDATAFORMAT_TYPE_BDA_IF_SIGNAL DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_BDA_IF_SIGNAL) + + +#define STATIC_KSDATAFORMAT_TYPE_MPEG2_SECTIONS\ + 0x455f176c, 0x4b06, 0x47ce, 0x9a, 0xef, 0x8c, 0xae, 0xf7, 0x3d, 0xf7, 0xb5 +DEFINE_GUIDSTRUCT("455F176C-4B06-47CE-9AEF-8CAEF73DF7B5", KSDATAFORMAT_TYPE_MPEG2_SECTIONS); +#define KSDATAFORMAT_TYPE_MPEG2_SECTIONS DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MPEG2_SECTIONS) + + +#define STATIC_KSDATAFORMAT_SUBTYPE_ATSC_SI\ + 0xb3c7397c, 0xd303, 0x414d, 0xb3, 0x3c, 0x4e, 0xd2, 0xc9, 0xd2, 0x97, 0x33 +DEFINE_GUIDSTRUCT("B3C7397C-D303-414D-B33C-4ED2C9D29733", KSDATAFORMAT_SUBTYPE_ATSC_SI); +#define KSDATAFORMAT_SUBTYPE_SUBTYPE_ATSC_SI DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_ATSC_SI) + + +#define STATIC_KSDATAFORMAT_SUBTYPE_DVB_SI\ + 0xe9dd31a3, 0x221d, 0x4adb, 0x85, 0x32, 0x9a, 0xf3, 0x9, 0xc1, 0xa4, 0x8 +DEFINE_GUIDSTRUCT("e9dd31a3-221d-4adb-8532-9af309c1a408", KSDATAFORMAT_SUBTYPE_DVB_SI); +#define KSDATAFORMAT_SUBTYPE_SUBTYPE_DVB_SI DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DVB_SI) + + +#define STATIC_KSDATAFORMAT_SUBTYPE_BDA_OPENCABLE_PSIP\ + 0x762e3f66, 0x336f, 0x48d1, 0xbf, 0x83, 0x2b, 0x0, 0x35, 0x2c, 0x11, 0xf0 +DEFINE_GUIDSTRUCT("762E3F66-336F-48d1-BF83-2B00352C11F0", KSDATAFORMAT_SUBTYPE_BDA_OPENCABLE_PSIP); +#define KSDATAFORMAT_SUBTYPE_BDA_OPENCABLE_PSIP DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_BDA_OPENCABLE_PSIP) + +#define STATIC_KSDATAFORMAT_SUBTYPE_BDA_OPENCABLE_OOB_PSIP\ + 0x951727db, 0xd2ce, 0x4528, 0x96, 0xf6, 0x33, 0x1, 0xfa, 0xbb, 0x2d, 0xe0 +DEFINE_GUIDSTRUCT("951727DB-D2CE-4528-96F6-3301FABB2DE0", KSDATAFORMAT_SUBTYPE_BDA_OPENCABLE_OOB_PSIP); +#define KSDATAFORMAT_SUBTYPE_BDA_OPENCABLE_OOB_PSIP DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_BDA_OPENCABLE_OOB_PSIP) + +//=========================================================================== +// +// KSPinName Definitions for BDA +// +//=========================================================================== + +// Pin name for a BDA transport pin +// +// {78216A81-CFA8-493e-9711-36A61C08BD9D} +// +#define STATIC_PINNAME_BDA_TRANSPORT \ + 0x78216a81, 0xcfa8, 0x493e, 0x97, 0x11, 0x36, 0xa6, 0x1c, 0x8, 0xbd, 0x9d +DEFINE_GUIDSTRUCT("78216A81-CFA8-493e-9711-36A61C08BD9D", PINNAME_BDA_TRANSPORT); +#define PINNAME_BDA_TRANSPORT DEFINE_GUIDNAMED(PINNAME_BDA_TRANSPORT) + + +// Pin name for a BDA analog video pin +// +// {5C0C8281-5667-486c-8482-63E31F01A6E9} +// +#define STATIC_PINNAME_BDA_ANALOG_VIDEO \ + 0x5c0c8281, 0x5667, 0x486c, 0x84, 0x82, 0x63, 0xe3, 0x1f, 0x1, 0xa6, 0xe9 +DEFINE_GUIDSTRUCT("5C0C8281-5667-486c-8482-63E31F01A6E9", PINNAME_BDA_ANALOG_VIDEO); +#define PINNAME_BDA_ANALOG_VIDEO DEFINE_GUIDNAMED(PINNAME_BDA_ANALOG_VIDEO) + + +// Pin name for a BDA analog audio pin +// +// {D28A580A-9B1F-4b0c-9C33-9BF0A8EA636B} +// +#define STATIC_PINNAME_BDA_ANALOG_AUDIO \ + 0xd28a580a, 0x9b1f, 0x4b0c, 0x9c, 0x33, 0x9b, 0xf0, 0xa8, 0xea, 0x63, 0x6b +DEFINE_GUIDSTRUCT("D28A580A-9B1F-4b0c-9C33-9BF0A8EA636B", PINNAME_BDA_ANALOG_AUDIO); +#define PINNAME_BDA_ANALOG_AUDIO DEFINE_GUIDNAMED(PINNAME_BDA_ANALOG_AUDIO) + + +// Pin name for a BDA FM Radio pin +// +// {D2855FED-B2D3-4eeb-9BD0-193436A2F890} +// +#define STATIC_PINNAME_BDA_FM_RADIO \ + 0xd2855fed, 0xb2d3, 0x4eeb, 0x9b, 0xd0, 0x19, 0x34, 0x36, 0xa2, 0xf8, 0x90 +DEFINE_GUIDSTRUCT("D2855FED-B2D3-4eeb-9BD0-193436A2F890", PINNAME_BDA_FM_RADIO); +#define PINNAME_BDA_FM_RADIO DEFINE_GUIDNAMED(PINNAME_BDA_FM_RADIO) + + +// Pin name for a BDA Intermediate Frequency pin +// +// {1A9D4A42-F3CD-48a1-9AEA-71DE133CBE14} +// +#define STATIC_PINNAME_BDA_IF_PIN \ + 0x1a9d4a42, 0xf3cd, 0x48a1, 0x9a, 0xea, 0x71, 0xde, 0x13, 0x3c, 0xbe, 0x14 +DEFINE_GUIDSTRUCT("1A9D4A42-F3CD-48a1-9AEA-71DE133CBE14", PINNAME_BDA_IF_PIN); +#define PINNAME_BDA_IF_PIN DEFINE_GUIDNAMED(PINNAME_BDA_IF_PIN) + + +// Pin name for a BDA Open Cable PSIP pin +// +// {297BB104-E5C9-4ACE-B123-95C3CBB24D4F} +// +#define STATIC_PINNAME_BDA_OPENCABLE_PSIP_PIN \ + 0x297bb104, 0xe5c9, 0x4ace, 0xb1, 0x23, 0x95, 0xc3, 0xcb, 0xb2, 0x4d, 0x4f +DEFINE_GUIDSTRUCT("297BB104-E5C9-4ACE-B123-95C3CBB24D4F", PINNAME_BDA_OPENCABLE_PSIP_PIN); +#define PINNAME_BDA_OPENCABLE_PSIP_PIN DEFINE_GUIDNAMED(PINNAME_BDA_OPENCABLE_PSIP_PIN) + + +//=========================================================================== +// +// KSProperty Set Definitions for BDA +// +//=========================================================================== + + +//------------------------------------------------------------ +// +// BDA Network Ethernet Filter Property Set +// +// {71985F43-1CA1-11d3-9CC8-00C04F7971E0} +// +#define STATIC_KSPROPSETID_BdaEthernetFilter \ + 0x71985f43, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("71985F43-1CA1-11d3-9CC8-00C04F7971E0", KSPROPSETID_BdaEthernetFilter); +#define KSPROPSETID_BdaEthernetFilter DEFINE_GUIDNAMED(KSPROPSETID_BdaEthernetFilter) + +typedef enum { + KSPROPERTY_BDA_ETHERNET_FILTER_MULTICAST_LIST_SIZE = 0, + KSPROPERTY_BDA_ETHERNET_FILTER_MULTICAST_LIST, + KSPROPERTY_BDA_ETHERNET_FILTER_MULTICAST_MODE +} KSPROPERTY_BDA_ETHERNET_FILTER; + +#define DEFINE_KSPROPERTY_ITEM_BDA_ETHERNET_FILTER_MULTICAST_LIST_SIZE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_ETHERNET_FILTER_MULTICAST_LIST_SIZE,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(ULONG),\ + FALSE,\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_ETHERNET_FILTER_MULTICAST_LIST(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_ETHERNET_FILTER_MULTICAST_LIST,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(BDA_ETHERNET_ADDRESS_LIST),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_ETHERNET_FILTER_MULTICAST_MODE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_ETHERNET_FILTER_MULTICAST_MODE,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(BDA_MULTICAST_MODE),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + + + +//------------------------------------------------------------ +// +// BDA Network IPv4 Filter Property Set +// +// {71985F44-1CA1-11d3-9CC8-00C04F7971E0} +// +#define STATIC_KSPROPSETID_BdaIPv4Filter \ + 0x71985f44, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("71985F44-1CA1-11d3-9CC8-00C04F7971E0", KSPROPSETID_BdaIPv4Filter); +#define KSPROPSETID_BdaIPv4Filter DEFINE_GUIDNAMED(KSPROPSETID_BdaIPv4Filter) + +typedef enum { + KSPROPERTY_BDA_IPv4_FILTER_MULTICAST_LIST_SIZE = 0, + KSPROPERTY_BDA_IPv4_FILTER_MULTICAST_LIST, + KSPROPERTY_BDA_IPv4_FILTER_MULTICAST_MODE +} KSPROPERTY_BDA_IPv4_FILTER; + +#define DEFINE_KSPROPERTY_ITEM_BDA_IPv4_FILTER_MULTICAST_LIST_SIZE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_IPv4_FILTER_MULTICAST_LIST_SIZE,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(ULONG),\ + FALSE,\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_IPv4_FILTER_MULTICAST_LIST(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_IPv4_FILTER_MULTICAST_LIST,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(BDA_IPv4_ADDRESS_LIST),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_IPv4_FILTER_MULTICAST_MODE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_IPv4_FILTER_MULTICAST_MODE,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(BDA_MULTICAST_MODE),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + + + +//------------------------------------------------------------ +// +// BDA Network IPv6 Filter Property Set +// +// {E1785A74-2A23-4fb3-9245-A8F88017EF33} +// +#define STATIC_KSPROPSETID_BdaIPv6Filter \ + 0xe1785a74, 0x2a23, 0x4fb3, 0x92, 0x45, 0xa8, 0xf8, 0x80, 0x17, 0xef, 0x33 +DEFINE_GUIDSTRUCT("E1785A74-2A23-4fb3-9245-A8F88017EF33", KSPROPSETID_BdaIPv6Filter); +#define KSPROPSETID_BdaIPv6Filter DEFINE_GUIDNAMED(KSPROPSETID_BdaIPv6Filter) + +typedef enum { + KSPROPERTY_BDA_IPv6_FILTER_MULTICAST_LIST_SIZE = 0, + KSPROPERTY_BDA_IPv6_FILTER_MULTICAST_LIST, + KSPROPERTY_BDA_IPv6_FILTER_MULTICAST_MODE +} KSPROPERTY_BDA_IPv6_FILTER; + +#define DEFINE_KSPROPERTY_ITEM_BDA_IPv6_FILTER_MULTICAST_LIST_SIZE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_IPv6_FILTER_MULTICAST_LIST_SIZE,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(ULONG),\ + FALSE,\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_IPv6_FILTER_MULTICAST_LIST(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_IPv6_FILTER_MULTICAST_LIST,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(BDA_IPv6_ADDRESS_LIST),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_IPv6_FILTER_MULTICAST_MODE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_IPv6_FILTER_MULTICAST_MODE,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(BDA_MULTICAST_MODE),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + + + +//------------------------------------------------------------ +// +// +// BDA Signal Property Set +// +// {D2F1644B-B409-11d2-BC69-00A0C9EE9E16} +// +#define STATIC_KSPROPSETID_BdaSignal \ + 0xd2f1644b, 0xb409, 0x11d2, 0xbc, 0x69, 0x0, 0xa0, 0xc9, 0xee, 0x9e, 0x16 +DEFINE_GUIDSTRUCT("D2F1644B-B409-11d2-BC69-00A0C9EE9E16", KSPROPSETID_BdaSignal); +#define KSPROPSETID_BdaSignal DEFINE_GUIDNAMED(KSPROPSETID_BdaSignal) + +typedef enum { + KSPROPERTY_BDA_SIGNAL_SOURCE = 0, + KSPROPERTY_BDA_SIGNAL_TUNING_SPACE, + KSPROPERTY_BDA_SIGNAL_NETWORK_TYPE, + KSPROPERTY_BDA_SIGNAL_STATE +} KSPROPERTY_BDA_SIGNAL; + +#define DEFINE_KSPROPERTY_ITEM_BDA_SIGNAL_SOURCE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_SIGNAL_SOURCE,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(ULONG),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_SIGNAL_TUNING_SPACE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_SIGNAL_TUNING_SPACE,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(GUID),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_SIGNAL_NETWORK_TYPE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_SIGNAL_NETWORK_TYPE,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(GUID),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_SIGNAL_STATE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_SIGNAL_STATE,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(BDA_SIGNAL_STATE),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + + + +//------------------------------------------------------------ +// +// +// BDA Change Sync Method Set +// +// {FD0A5AF3-B41D-11d2-9C95-00C04F7971E0} +// +#define STATIC_KSMETHODSETID_BdaChangeSync \ + 0xfd0a5af3, 0xb41d, 0x11d2, 0x9c, 0x95, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("FD0A5AF3-B41D-11d2-9C95-00C04F7971E0", KSMETHODSETID_BdaChangeSync); +#define KSMETHODSETID_BdaChangeSync DEFINE_GUIDNAMED(KSMETHODSETID_BdaChangeSync) + +typedef enum { + KSMETHOD_BDA_START_CHANGES = 0, + KSMETHOD_BDA_CHECK_CHANGES, + KSMETHOD_BDA_COMMIT_CHANGES, + KSMETHOD_BDA_GET_CHANGE_STATE +} KSMETHOD_BDA_CHANGE_SYNC; + +#define DEFINE_KSMETHOD_ITEM_BDA_START_CHANGES(MethodHandler, SupportHandler)\ + DEFINE_KSMETHOD_ITEM(\ + KSMETHOD_BDA_START_CHANGES,\ + KSMETHOD_TYPE_NONE,\ + (MethodHandler),\ + sizeof(KSMETHOD),\ + 0,\ + SupportHandler) + +#define DEFINE_KSMETHOD_ITEM_BDA_CHECK_CHANGES(MethodHandler, SupportHandler)\ + DEFINE_KSMETHOD_ITEM(\ + KSMETHOD_BDA_CHECK_CHANGES,\ + KSMETHOD_TYPE_NONE,\ + (MethodHandler),\ + sizeof(KSMETHOD),\ + 0,\ + SupportHandler) + +#define DEFINE_KSMETHOD_ITEM_BDA_COMMIT_CHANGES(MethodHandler, SupportHandler)\ + DEFINE_KSMETHOD_ITEM(\ + KSMETHOD_BDA_COMMIT_CHANGES,\ + KSMETHOD_TYPE_NONE,\ + (MethodHandler),\ + sizeof(KSMETHOD),\ + 0,\ + SupportHandler) + +#define DEFINE_KSMETHOD_ITEM_BDA_GET_CHANGE_STATE(MethodHandler, SupportHandler)\ + DEFINE_KSMETHOD_ITEM(\ + KSMETHOD_BDA_GET_CHANGE_STATE,\ + KSMETHOD_TYPE_READ,\ + (MethodHandler),\ + sizeof(KSMETHOD),\ + 0,\ + SupportHandler) + + + +//------------------------------------------------------------ +// +// +// BDA Device Configuration Method Set +// +// {71985F45-1CA1-11d3-9CC8-00C04F7971E0} +// +#define STATIC_KSMETHODSETID_BdaDeviceConfiguration \ + 0x71985f45, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("71985F45-1CA1-11d3-9CC8-00C04F7971E0", KSMETHODSETID_BdaDeviceConfiguration); +#define KSMETHODSETID_BdaDeviceConfiguration DEFINE_GUIDNAMED(KSMETHODSETID_BdaDeviceConfiguration) + +typedef enum { + KSMETHOD_BDA_CREATE_PIN_FACTORY = 0, + KSMETHOD_BDA_DELETE_PIN_FACTORY, + KSMETHOD_BDA_CREATE_TOPOLOGY +} KSMETHOD_BDA_DEVICE_CONFIGURATION; + +#define DEFINE_KSMETHOD_ITEM_BDA_CREATE_PIN_FACTORY(MethodHandler, SupportHandler)\ + DEFINE_KSMETHOD_ITEM(\ + KSMETHOD_BDA_CREATE_PIN_FACTORY,\ + KSMETHOD_TYPE_READ,\ + (MethodHandler),\ + sizeof(KSM_PIN),\ + sizeof(ULONG),\ + SupportHandler) + +#define DEFINE_KSMETHOD_ITEM_BDA_DELETE_PIN_FACTORY(MethodHandler, SupportHandler)\ + DEFINE_KSMETHOD_ITEM(\ + KSMETHOD_BDA_DELETE_PIN_FACTORY,\ + KSMETHOD_TYPE_NONE,\ + (MethodHandler),\ + sizeof(KSM_PIN),\ + 0,\ + SupportHandler) + +#define DEFINE_KSMETHOD_ITEM_BDA_CREATE_TOPOLOGY(MethodHandler, SupportHandler)\ + DEFINE_KSMETHOD_ITEM(\ + KSMETHOD_BDA_CREATE_TOPOLOGY,\ + KSMETHOD_TYPE_WRITE,\ + (MethodHandler),\ + sizeof(KSMETHOD),\ + sizeof(KSMULTIPLE_ITEM),\ + SupportHandler) + + + +//------------------------------------------------------------ +// +// +// BDA Topology Property Set +// +// {A14EE835-0A23-11d3-9CC7-00C04F7971E0} +// +#define STATIC_KSPROPSETID_BdaTopology \ + 0xa14ee835, 0x0a23, 0x11d3, 0x9c, 0xc7, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("A14EE835-0A23-11d3-9CC7-00C04F7971E0", KSPROPSETID_BdaTopology); +#define KSPROPSETID_BdaTopology DEFINE_GUIDNAMED(KSPROPSETID_BdaTopology) + +typedef enum { + KSPROPERTY_BDA_NODE_TYPES, + KSPROPERTY_BDA_PIN_TYPES, + KSPROPERTY_BDA_TEMPLATE_CONNECTIONS, + KSPROPERTY_BDA_NODE_METHODS, + KSPROPERTY_BDA_NODE_PROPERTIES, + KSPROPERTY_BDA_NODE_EVENTS, + KSPROPERTY_BDA_CONTROLLING_PIN_ID, + KSPROPERTY_BDA_NODE_DESCRIPTORS + }KSPROPERTY_BDA_TOPOLOGY; + +#define DEFINE_KSPROPERTY_ITEM_BDA_NODE_TYPES(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_NODE_TYPES,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + 0,\ + FALSE,\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_PIN_TYPES(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_PIN_TYPES,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + 0,\ + FALSE,\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_TEMPLATE_CONNECTIONS(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_TEMPLATE_CONNECTIONS,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof( BDA_TEMPLATE_CONNECTION),\ + FALSE,\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_NODE_METHODS(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_NODE_METHODS,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + 0,\ + FALSE,\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_NODE_PROPERTIES(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_NODE_PROPERTIES,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + 0,\ + FALSE,\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_NODE_EVENTS(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_NODE_EVENTS,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + 0,\ + FALSE,\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_CONTROLLING_PIN_ID(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_CONTROLLING_PIN_ID,\ + (GetHandler),\ + sizeof(KSP_BDA_NODE_PIN),\ + sizeof( ULONG),\ + FALSE,\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_NODE_DESCRIPTORS(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_NODE_DESCRIPTORS,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + 0,\ + FALSE,\ + NULL, 0, NULL, NULL, 0) + + + +//------------------------------------------------------------ +// +// +// BDA Pin Control Property Set +// +// {0DED49D5-A8B7-4d5d-97A1-12B0C195874D} +// +#define STATIC_KSPROPSETID_BdaPinControl \ + 0xded49d5, 0xa8b7, 0x4d5d, 0x97, 0xa1, 0x12, 0xb0, 0xc1, 0x95, 0x87, 0x4d +DEFINE_GUIDSTRUCT("0DED49D5-A8B7-4d5d-97A1-12B0C195874D", KSPROPSETID_BdaPinControl); +#define KSPROPSETID_BdaPinControl DEFINE_GUIDNAMED(KSPROPSETID_BdaPinControl) + +typedef enum { + KSPROPERTY_BDA_PIN_ID = 0, + KSPROPERTY_BDA_PIN_TYPE +} KSPROPERTY_BDA_PIN_CONTROL; + +#define DEFINE_KSPROPERTY_ITEM_BDA_PIN_ID(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_PIN_ID,\ + (GetHandler),\ + sizeof( KSPROPERTY),\ + sizeof( ULONG),\ + FALSE,\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_PIN_TYPE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_PIN_TYPE,\ + (GetHandler),\ + sizeof( KSPROPERTY),\ + sizeof( ULONG),\ + FALSE,\ + NULL, 0, NULL, NULL, 0) + + + +//------------------------------------------------------------ +// +// +// BDA Pin Event Set +// +// {104781CD-50BD-40d5-95FB-087E0E86A591} +// +#define STATIC_KSEVENTSETID_BdaPinEvent \ + 0x104781cd, 0x50bd, 0x40d5, 0x95, 0xfb, 0x08, 0x7e, 0xe, 0x86, 0xa5, 0x91 +DEFINE_GUIDSTRUCT("104781CD-50BD-40d5-95FB-087E0E86A591", KSEVENTSETID_BdaPinEvent); +#define KSEVENTSETID_BdaPinEvent DEFINE_GUIDNAMED(KSEVENTSETID_BdaPinEvent) + +typedef enum { + KSEVENT_BDA_PIN_CONNECTED = 0, + KSEVENT_BDA_PIN_DISCONNECTED +} KSPROPERTY_BDA_PIN_EVENT; + +#define DEFINE_KSEVENT_ITEM_BDA_PIN_CONNECTED(AddHandler, RemoveHandler, SupportHandler)\ + DEFINE_KSEVENT_ITEM(\ + KSEVENT_BDA_PIN_CONNECTED,\ + sizeof( KSEVENTDATA), \ + 0, \ + (AddHandler),\ + (RemoveHandler),\ + (SupportHandler)\ + ) + +#define DEFINE_KSEVENT_ITEM_BDA_PIN_DISCONNECTED(AddHandler, RemoveHandler, SupportHandler)\ + DEFINE_KSEVENT_ITEM(\ + KSEVENT_BDA_PIN_DISCONNECTED,\ + sizeof( KSEVENTDATA), \ + 0, \ + (AddHandler),\ + (RemoveHandler),\ + (SupportHandler)\ + ) + + + +//------------------------------------------------------------ +// +// +// BDA Void Transform Property Set +// +// {71985F46-1CA1-11d3-9CC8-00C04F7971E0} +// +#define STATIC_KSPROPSETID_BdaVoidTransform \ + 0x71985f46, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("71985F46-1CA1-11d3-9CC8-00C04F7971E0", KSPROPSETID_BdaVoidTransform); +#define KSPROPSETID_BdaVoidTransform DEFINE_GUIDNAMED(KSPROPSETID_BdaVoidTransform) + +typedef enum { + KSPROPERTY_BDA_VOID_TRANSFORM_START = 0, + KSPROPERTY_BDA_VOID_TRANSFORM_STOP +} KSPROPERTY_BDA_VOID_TRANSFORM; + +#define DEFINE_KSPROPERTY_ITEM_BDA_VOID_TRANSFORM_START(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_VOID_TRANSFORM_START,\ + FALSE,\ + sizeof(KSPROPERTY),\ + 0,\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_VOID_TRANSFORM_STOP(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_VOID_TRANSFORM_STOP,\ + FALSE,\ + sizeof(KSPROPERTY),\ + 0,\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + + + +//------------------------------------------------------------ +// +// +// BDA Null Transform Property Set +// +// {DDF15B0D-BD25-11d2-9CA0-00C04F7971E0} +// +#define STATIC_KSPROPSETID_BdaNullTransform \ + 0xddf15b0d, 0xbd25, 0x11d2, 0x9c, 0xa0, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("DDF15B0D-BD25-11d2-9CA0-00C04F7971E0", KSPROPSETID_BdaNullTransform); +#define KSPROPSETID_BdaNullTransform DEFINE_GUIDNAMED(KSPROPSETID_BdaNullTransform) + +typedef enum { + KSPROPERTY_BDA_NULL_TRANSFORM_START = 0, + KSPROPERTY_BDA_NULL_TRANSFORM_STOP +} KSPROPERTY_BDA_NULL_TRANSFORM; + +#define DEFINE_KSPROPERTY_ITEM_BDA_NULL_TRANSFORM_START(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_NULL_TRANSFORM_START,\ + FALSE,\ + sizeof(KSPROPERTY),\ + 0,\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_NULL_TRANSFORM_STOP(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_NULL_TRANSFORM_STOP,\ + FALSE,\ + sizeof(KSPROPERTY),\ + 0,\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + + + +//------------------------------------------------------------ +// +// +// BDA Frequency Filter Property Set +// +// {71985F47-1CA1-11d3-9CC8-00C04F7971E0} +// +#define STATIC_KSPROPSETID_BdaFrequencyFilter \ + 0x71985f47, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("71985F47-1CA1-11d3-9CC8-00C04F7971E0", KSPROPSETID_BdaFrequencyFilter); +#define KSPROPSETID_BdaFrequencyFilter DEFINE_GUIDNAMED(KSPROPSETID_BdaFrequencyFilter) + +typedef enum { + KSPROPERTY_BDA_RF_TUNER_FREQUENCY = 0, + KSPROPERTY_BDA_RF_TUNER_POLARITY, + KSPROPERTY_BDA_RF_TUNER_RANGE, + KSPROPERTY_BDA_RF_TUNER_TRANSPONDER +} KSPROPERTY_BDA_FREQUENCY_FILTER; + +#define DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_FREQUENCY(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_RF_TUNER_FREQUENCY,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(ULONG),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_POLARITY(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_RF_TUNER_POLARITY,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(ULONG),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_RANGE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_RF_TUNER_RANGE,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(ULONG),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_RF_TUNER_TRANSPONDER(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_RF_TUNER_TRANSPONDER,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(ULONG),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + + + +//------------------------------------------------------------ +// +// +// BDA Digital Demodulator Property Set +// +// {EF30F379-985B-4d10-B640-A79D5E04E1E0} +// +#define STATIC_KSPROPSETID_BdaDigitalDemodulator \ + 0xef30f379, 0x985b, 0x4d10, 0xb6, 0x40, 0xa7, 0x9d, 0x5e, 0x4, 0xe1, 0xe0 +DEFINE_GUIDSTRUCT("EF30F379-985B-4d10-B640-A79D5E04E1E0", KSPROPSETID_BdaDigitalDemodulator); +#define KSPROPSETID_BdaDigitalDemodulator DEFINE_GUIDNAMED(KSPROPSETID_BdaDigitalDemodulator) + +typedef enum { + KSPROPERTY_BDA_MODULATION_TYPE = 0, + KSPROPERTY_BDA_INNER_FEC_TYPE, + KSPROPERTY_BDA_INNER_FEC_RATE, + KSPROPERTY_BDA_OUTER_FEC_TYPE, + KSPROPERTY_BDA_OUTER_FEC_RATE, + KSPROPERTY_BDA_SYMBOL_RATE, + KSPROPERTY_BDA_SPECTRAL_INVERSION, + +} KSPROPERTY_BDA_DIGITAL_DEMODULATOR; + +#define DEFINE_KSPROPERTY_ITEM_BDA_MODULATION_TYPE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_MODULATION_TYPE,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(ModulationType),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_INNER_FEC_TYPE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_INNER_FEC_TYPE,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(FECMethod),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_INNER_FEC_RATE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_INNER_FEC_RATE,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(BinaryConvolutionCodeRate),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_OUTER_FEC_TYPE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_OUTER_FEC_TYPE,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(FECMethod),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_OUTER_FEC_RATE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_OUTER_FEC_RATE,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(BinaryConvolutionCodeRate),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_SYMBOL_RATE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_SYMBOL_RATE,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(ULONG),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_SPECTRAL_INVERSION(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_SPECTRAL_INVERSION,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(SpectralInversion),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + + + +//------------------------------------------------------------ +// +// +// BDA Autodemodulate Property Set +// +// {DDF15B12-BD25-11d2-9CA0-00C04F7971E0} +// +#define STATIC_KSPROPSETID_BdaAutodemodulate \ + 0xddf15b12, 0xbd25, 0x11d2, 0x9c, 0xa0, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("DDF15B12-BD25-11d2-9CA0-00C04F7971E0", KSPROPSETID_BdaAutodemodulate); +#define KSPROPSETID_BdaAutodemodulate DEFINE_GUIDNAMED(KSPROPSETID_BdaAutodemodulate) + +typedef enum { + KSPROPERTY_BDA_AUTODEMODULATE_START = 0, + KSPROPERTY_BDA_AUTODEMODULATE_STOP +} KSPROPERTY_BDA_AUTODEMODULATE; + +#define DEFINE_KSPROPERTY_ITEM_BDA_AUTODEMODULATE_START(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_AUTODEMODULATE_START,\ + FALSE,\ + sizeof(KSP_NODE),\ + 0,\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_AUTODEMODULATE_STOP(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_AUTODEMODULATE_STOP,\ + FALSE,\ + sizeof(KSP_NODE),\ + 0,\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +//------------------------------------------------------------ +// +// +// BDA PmtProcessor Property Set +// +// {516B99C5-971C-4aaf-B3F3-D9FDA8A15E16} +// + +#define STATIC_KSPROPSETID_BdaPmtProcessor \ + 0x516b99c5, 0x971c, 0x4aaf, 0xb3, 0xf3, 0xd9, 0xfd, 0xa8, 0xa1, 0x5e, 0x16 +DEFINE_GUIDSTRUCT("516B99C5-971C-4aaf-B3F3-D9FDA8A15E16", KSPROPSETID_BdaPmtProcessor); +#define KSPROPSETID_BdaPmtProcessor DEFINE_GUIDNAMED(KSPROPSETID_BdaPmtProcessor) + +typedef enum { + KSPROPERTY_BDA_PMTPROCESSOR_PMT = 0, +} KSPROPERTY_BDA_PMTPROCESSOR; + +#define DEFINE_KSPROPERTY_ITEM_BDA_PMTPROCESSOR_PMT(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_PMTPROCESSOR_PMT,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(BDA_PMT),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + + +//------------------------------------------------------------ +// +// +// BDA Descriptor Property Set +// +// {DE6A1C9E-87DF-48aa-95AA-289B7AA4F49F} +// + +#define STATIC_KSPROPSETID_BdaDescriptor \ + 0xde6a1c9e, 0x87df, 0x48aa, 0x95, 0xaa, 0x28, 0x9b, 0x7a, 0xa4, 0xf4, 0x9f +DEFINE_GUIDSTRUCT("DE6A1C9E-87DF-48aa-95AA-289B7AA4F49F", KSPROPSETID_BdaDescriptor); +#define KSPROPSETID_BdaDescriptor DEFINE_GUIDNAMED(KSPROPSETID_BdaDescriptor) + +typedef enum { + KSPROPERTY_BDA_DESCRIPTOR_CAT_DESC = 0, + KSPROPERTY_BDA_DESCRIPTOR_ES_DESC, + KSPROPERTY_BDA_DESCRIPTOR_PROGRAM_DESC +} KSPROPERTY_BDA_DESCRIPTOR; + +#define DEFINE_KSPROPERTY_ITEM_BDA_DESCRIPTOR_CAT_DESC(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_DESCRIPTOR_CAT_DESC,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(BDA_CAT_DESCRIPTOR),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_DESCRIPTOR_ES_DESC(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_DESCRIPTOR_ES_DESC,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(BDA_ES_DESCRIPTOR),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_DESCRIPTOR_PROGRAM_DESC(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_DESCRIPTOR_PROGRAM_DESC,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(BDA_PROGRAM_DESCRIPTOR),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + + + +//------------------------------------------------------------ +// +// +// BDA EsMap Property Set +// +// {FA14A8B3-6068-48ef-96DD-53010B985A7D} +// +#define STATIC_KSPROPSETID_BdaEsMap \ + 0xfa14a8b3, 0x6068, 0x48ef, 0x96, 0xdd, 0x53, 0x1, 0xb, 0x98, 0x5a, 0x7d +DEFINE_GUIDSTRUCT("FA14A8B3-6068-48ef-96DD-53010B985A7D", KSPROPSETID_BdaEsMap); +#define KSPROPSETID_BdaEsMap DEFINE_GUIDNAMED(KSPROPSETID_BdaEsMap) + +typedef enum { + KSPROPERTY_BDA_ESMAP_EMM_PIDS = 0, + KSPROPERTY_BDA_ESMAP_ECM_PIDS, + KSPROPERTY_BDA_ESMAP_MAP_LIST, + KSPROPERTY_BDA_ESMAP_UPDATE_MAP, + KSPROPERTY_BDA_ESMAP_REMOVE_MAP +} KSPROPERTY_BDA_ESMAP; + +#define DEFINE_KSPROPERTY_ITEM_BDA_ESMAP_EMM_PIDS(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_ESMAP_EMM_PIDS,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + 0,\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_ESMAP_ECM_PIDS(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_ESMAP_ECM_PIDS,\ + (GetHandler),\ + sizeof(KSP_NODE_ESPID),\ + 0,\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_ESMAP_MAP_LIST(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_ESMAP_MAP_LIST,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + 0,\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_ESMAP_UPDATE_MAP(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_ESMAP_UPDATE_MAP,\ + FALSE,\ + sizeof(KSP_NODE),\ + sizeof(BDA_ES_MAP),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_ESMAP_REMOVE_MAP(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_ESMAP_REMOVE_MAP,\ + FALSE,\ + sizeof(KSP_NODE),\ + sizeof(BDA_ES_MAP),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + + +//------------------------------------------------------------ +// +// +// BDA PID Filter Property Set +// +// {D0A67D65-08DF-4fec-8533-E5B550410B85} +// +#define STATIC_KSPROPSETID_BdaPIDFilter \ + 0xd0a67d65, 0x8df, 0x4fec, 0x85, 0x33, 0xe5, 0xb5, 0x50, 0x41, 0xb, 0x85 +DEFINE_GUIDSTRUCT("D0A67D65-08DF-4fec-8533-E5B550410B85", KSPROPSETID_BdaPIDFilter); +#define KSPROPSETID_BdaPIDFilter DEFINE_GUIDNAMED(KSPROPSETID_BdaPIDFilter) + +typedef enum { + KSPROPERTY_BDA_PIDFILTER_MAP_PIDS = 0, + KSPROPERTY_BDA_PIDFILTER_UNMAP_PIDS, + KSPROPERTY_BDA_PIDFILTER_LIST_PIDS +} KSPROPERTY_BDA_PIDFILTER; + +#define DEFINE_KSPROPERTY_ITEM_BDA_PIDFILTER_MAP_PIDS(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_PIDFILTER_MAP_PIDS,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(BDA_PID_MAP),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_PIDFILTER_UNMAP_PIDS(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_PIDFILTER_UNMAP_PIDS,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(BDA_PID_UNMAP),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_PIDFILTER_LIST_PIDS(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_PIDFILTER_LIST_PIDS,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + 0,\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + + + +//------------------------------------------------------------ +// +// +// BDA CA Property Set +// +// {B0693766-5278-4ec6-B9E1-3CE40560EF5A} +// +#define STATIC_KSPROPSETID_BdaCA \ + 0xb0693766, 0x5278, 0x4ec6, 0xb9, 0xe1, 0x3c, 0xe4, 0x5, 0x60, 0xef, 0x5a +DEFINE_GUIDSTRUCT("B0693766-5278-4ec6-B9E1-3CE40560EF5A", KSPROPSETID_BdaCA); +#define KSPROPSETID_BdaCA DEFINE_GUIDNAMED(KSPROPSETID_BdaCA) + +typedef enum { + KSPROPERTY_BDA_ECM_MAP_STATUS = 0, + KSPROPERTY_BDA_CA_MODULE_STATUS, + KSPROPERTY_BDA_CA_SMART_CARD_STATUS, + KSPROPERTY_BDA_CA_MODULE_UI +} KSPROPERTY_BDA_CA; + +#define DEFINE_KSPROPERTY_ITEM_BDA_ECM_MAP_STATUS(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_ECM_MAP_STATUS,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(ULONG),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_CA_MODULE_STATUS(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_CA_MODULE_STATUS,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(ULONG),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_CA_SMART_CARD_STATUS(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_CA_SMART_CARD_STATUS,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(ULONG),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_BDA_CA_MODULE_UI(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_BDA_CA_MODULE_UI,\ + (GetHandler),\ + sizeof(KSP_NODE),\ + sizeof(BDA_CA_MODULE_UI),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + + + +//------------------------------------------------------------ +// +// +// BDA CA Event Set +// +// {488C4CCC-B768-4129-8EB1-B00A071F9068} +// +#define STATIC_KSEVENTSETID_BdaCAEvent \ + 0x488c4ccc, 0xb768, 0x4129, 0x8e, 0xb1, 0xb0, 0xa, 0x7, 0x1f, 0x90, 0x68 +DEFINE_GUIDSTRUCT("488C4CCC-B768-4129-8EB1-B00A071F9068", KSEVENTSETID_BdaCAEvent); +#define KSEVENTSETID_BdaCAEvent DEFINE_GUIDNAMED(KSEVENTSETID_BdaCAEvent) + +typedef enum { + KSEVENT_BDA_ECM_MAP_STATUS_CHANGED = 0, + KSEVENT_BDA_CA_MODULE_STATUS_CHANGED, + KSEVENT_BDA_CA_SMART_CARD_STATUS_CHANGED, + KSEVENT_BDA_CA_MODULE_UI_REQUESTED +} KSPROPERTY_BDA_CA_EVENT; + +#define DEFINE_KSEVENT_BDA_ECM_MAP_STATUS_CHANGED(AddHandler, RemoveHandler, SupportHandler)\ + DEFINE_KSEVENT_ITEM(\ + KSEVENT_BDA_ECM_MAP_STATUS_CHANGED,\ + sizeof( KSEVENTDATA), \ + 0, \ + (AddHandler),\ + (RemoveHandler),\ + (SupportHandler)\ + ) + +#define DEFINE_KSEVENT_BDA_CA_MODULE_STATUS_CHANGED(AddHandler, RemoveHandler, SupportHandler)\ + DEFINE_KSEVENT_ITEM(\ + KSEVENT_BDA_CA_MODULE_STATUS_CHANGED,\ + sizeof( KSEVENTDATA), \ + 0, \ + (AddHandler),\ + (RemoveHandler),\ + (SupportHandler)\ + ) + +#define DEFINE_KSEVENT_BDA_CA_SMART_CARD_STATUS_CHANGED(AddHandler, RemoveHandler, SupportHandler)\ + DEFINE_KSEVENT_ITEM(\ + KSEVENT_BDA_CA_SMART_CARD_STATUS_CHANGED,\ + sizeof( KSEVENTDATA), \ + 0, \ + (AddHandler),\ + (RemoveHandler),\ + (SupportHandler)\ + ) + +#define DEFINE_KSEVENT_BDA_CA_MODULE_UI_REQUESTED(AddHandler, RemoveHandler, SupportHandler)\ + DEFINE_KSEVENT_ITEM(\ + KSEVENT_BDA_CA_MODULE_UI_REQUESTED,\ + sizeof( KSEVENTDATA), \ + 0, \ + (AddHandler),\ + (RemoveHandler),\ + (SupportHandler)\ + ) + + +//=========================================================================== +// +// BDA Filter Categories +// +//=========================================================================== + +#define STATIC_KSCATEGORY_BDA_RECEIVER_COMPONENT \ + 0xFD0A5AF4, 0xB41D, 0x11d2, 0x9c, 0x95, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("FD0A5AF4-B41D-11d2-9C95-00C04F7971E0", KSCATEGORY_BDA_RECEIVER_COMPONENT); +#define KSCATEGORY_BDA_RECEIVER_COMPONENT DEFINE_GUIDNAMED(KSCATEGORY_BDA_RECEIVER_COMPONENT) + + +#define STATIC_KSCATEGORY_BDA_NETWORK_TUNER \ + 0x71985f48, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("71985F48-1CA1-11d3-9CC8-00C04F7971E0", KSCATEGORY_BDA_NETWORK_TUNER); +#define KSCATEGORY_BDA_NETWORK_TUNER DEFINE_GUIDNAMED(KSCATEGORY_BDA_NETWORK_TUNER) + + +#define STATIC_KSCATEGORY_BDA_NETWORK_EPG \ + 0x71985f49, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("71985F49-1CA1-11d3-9CC8-00C04F7971E0", KSCATEGORY_BDA_NETWORK_EPG); +#define KSCATEGORY_BDA_NETWORK_EPG DEFINE_GUIDNAMED(KSCATEGORY_BDA_NETWORK_EPG) + + +#define STATIC_KSCATEGORY_BDA_IP_SINK \ + 0x71985f4aL, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x00, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("71985F4A-1CA1-11d3-9CC8-00C04F7971E0", KSCATEGORY_BDA_IP_SINK); +#define KSCATEGORY_IP_SINK DEFINE_GUIDNAMED(KSCATEGORY_BDA_IP_SINK) + + +#define STATIC_KSCATEGORY_BDA_NETWORK_PROVIDER \ + 0x71985f4b, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("71985F4B-1CA1-11d3-9CC8-00C04F7971E0", KSCATEGORY_BDA_NETWORK_PROVIDER); +#define KSCATEGORY_BDA_NETWORK_PROVIDER DEFINE_GUIDNAMED(KSCATEGORY_BDA_NETWORK_PROVIDER) + +// {A2E3074F-6C3D-11d3-B653-00C04F79498E} +#define STATIC_KSCATEGORY_BDA_TRANSPORT_INFORMATION \ + 0xa2e3074f, 0x6c3d, 0x11d3, 0xb6, 0x53, 0x0, 0xc0, 0x4f, 0x79, 0x49, 0x8e +DEFINE_GUIDSTRUCT("A2E3074F-6C3D-11d3-B653-00C04F79498E", KSCATEGORY_BDA_TRANSPORT_INFORMATION); +#define KSCATEGORY_BDA_TRANSPORT_INFORMATION DEFINE_GUIDNAMED(KSCATEGORY_BDA_TRANSPORT_INFORMATION) + + +//=========================================================================== +// +// BDA Node Categories +// +//=========================================================================== + + +#define STATIC_KSNODE_BDA_RF_TUNER \ + 0x71985f4c, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("71985F4C-1CA1-11d3-9CC8-00C04F7971E0", KSNODE_BDA_RF_TUNER); +#define KSNODE_BDA_RF_TUNER DEFINE_GUIDNAMED(KSNODE_BDA_RF_TUNER) + + +#define STATIC_KSNODE_BDA_QAM_DEMODULATOR \ + 0x71985f4d, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("71985F4D-1CA1-11d3-9CC8-00C04F7971E0", KSNODE_BDA_QAM_DEMODULATOR); +#define KSNODE_BDA_QAM_DEMODULATOR DEFINE_GUIDNAMED(KSNODE_BDA_QAM_DEMODULATOR) + + +#define STATIC_KSNODE_BDA_QPSK_DEMODULATOR \ + 0x6390c905, 0x27c1, 0x4d67, 0xbd, 0xb7, 0x77, 0xc5, 0xd, 0x7, 0x93, 0x0 +DEFINE_GUIDSTRUCT("6390C905-27C1-4d67-BDB7-77C50D079300", KSNODE_BDA_QPSK_DEMODULATOR); +#define KSNODE_BDA_QPSK_DEMODULATOR DEFINE_GUIDNAMED(KSNODE_BDA_QPSK_DEMODULATOR) + + +#define STATIC_KSNODE_BDA_8VSB_DEMODULATOR \ + 0x71985f4f, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("71985F4F-1CA1-11d3-9CC8-00C04F7971E0", KSNODE_BDA_8VSB_DEMODULATOR); +#define KSNODE_BDA_8VSB_DEMODULATOR DEFINE_GUIDNAMED(KSNODE_BDA_8VSB_DEMODULATOR) + + +#define STATIC_KSNODE_BDA_OPENCABLE_POD \ + 0xd83ef8fc, 0xf3b8, 0x45ab, 0x8b, 0x71, 0xec, 0xf7, 0xc3, 0x39, 0xde, 0xb4 +DEFINE_GUIDSTRUCT("D83EF8FC-F3B8-45ab-8B71-ECF7C339DEB4", KSNODE_BDA_OPENCABLE_POD); +#define KSNODE_BDA_OPENCABLE_POD DEFINE_GUIDNAMED(KSNODE_BDA_OPENCABLE_POD) + + +#define STATIC_KSNODE_BDA_PID_FILTER \ + 0xf5412789, 0xb0a0, 0x44e1, 0xae, 0x4f, 0xee, 0x99, 0x9b, 0x1b, 0x7f, 0xbe +DEFINE_GUIDSTRUCT("F5412789-B0A0-44e1-AE4F-EE999B1B7FBE", KSNODE_BDA_PID_FILTER); +#define KSNODE_BDA_PID_FILTER DEFINE_GUIDNAMED(KSNODE_BDA_PID_FILTER) + + +#define STATIC_KSNODE_BDA_IP_SINK \ + 0x71985f4e, 0x1ca1, 0x11d3, 0x9c, 0xc8, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe0 +DEFINE_GUIDSTRUCT("71985F4E-1CA1-11d3-9CC8-00C04F7971E0", KSNODE_BDA_IP_SINK); +#define KSNODE_IP_SINK DEFINE_GUIDNAMED(KSNODE_BDA_IP_SINK) + + +//=========================================================================== +// +// IPSink PINNAME GUID +// +//=========================================================================== + +#define STATIC_PINNAME_IPSINK_INPUT \ + 0x3fdffa70L, 0xac9a, 0x11d2, 0x8f, 0x17, 0x00, 0xc0, 0x4f, 0x79, 0x71, 0xe2 +DEFINE_GUIDSTRUCT("3fdffa70-ac9a-11d2-8f17-00c04f7971e2", PINNAME_IPSINK_INPUT); +#define PINNAME_IPSINK_INPUT DEFINE_GUIDNAMED(PINNAME_IPSINK_INPUT) + + +//=========================================================================== +// +// BDA IPSink Categories/Types +// +//=========================================================================== + + +#define STATIC_KSDATAFORMAT_TYPE_BDA_IP\ + 0xe25f7b8e, 0xcccc, 0x11d2, 0x8f, 0x25, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe2 +DEFINE_GUIDSTRUCT("e25f7b8e-cccc-11d2-8f25-00c04f7971e2", KSDATAFORMAT_TYPE_BDA_IP); +#define KSDATAFORMAT_TYPE_BDA_IP DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_BDA_IP) + +#define STATIC_KSDATAFORMAT_SUBTYPE_BDA_IP\ + 0x5a9a213c, 0xdb08, 0x11d2, 0x8f, 0x32, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe2 +DEFINE_GUIDSTRUCT("5a9a213c-db08-11d2-8f32-00c04f7971e2", KSDATAFORMAT_SUBTYPE_BDA_IP); +#define KSDATAFORMAT_SUBTYPE_BDA_IP DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_BDA_IP) + +#define STATIC_KSDATAFORMAT_SPECIFIER_BDA_IP\ + 0x6b891420, 0xdb09, 0x11d2, 0x8f, 0x32, 0x0, 0xc0, 0x4f, 0x79, 0x71, 0xe2 +DEFINE_GUIDSTRUCT("6B891420-DB09-11d2-8F32-00C04F7971E2", KSDATAFORMAT_SPECIFIER_BDA_IP); +#define KSDATAFORMAT_SPECIFIER_BDA_IP DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_BDA_IP) + + + +#define STATIC_KSDATAFORMAT_TYPE_BDA_IP_CONTROL\ + 0xdadd5799, 0x7d5b, 0x4b63, 0x80, 0xfb, 0xd1, 0x44, 0x2f, 0x26, 0xb6, 0x21 +DEFINE_GUIDSTRUCT("DADD5799-7D5B-4b63-80FB-D1442F26B621", KSDATAFORMAT_TYPE_BDA_IP_CONTROL); +#define KSDATAFORMAT_TYPE_BDA_IP_CONTROL DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_BDA_IP_CONTROL) + +#define STATIC_KSDATAFORMAT_SUBTYPE_BDA_IP_CONTROL\ + 0x499856e8, 0xe85b, 0x48ed, 0x9b, 0xea, 0x41, 0xd, 0xd, 0xd4, 0xef, 0x81 +DEFINE_GUIDSTRUCT("499856E8-E85B-48ed-9BEA-410D0DD4EF81", KSDATAFORMAT_SUBTYPE_BDA_IP_CONTROL); +#define KSDATAFORMAT_SUBTYPE_BDA_IP_CONTROL DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_BDA_IP_CONTROL) + + +//=========================================================================== +// +// MPE PINNAME GUID +// +//=========================================================================== + +#define STATIC_PINNAME_MPE \ + 0xc1b06d73L, 0x1dbb, 0x11d3, 0x8f, 0x46, 0x00, 0xC0, 0x4f, 0x79, 0x71, 0xE2 +DEFINE_GUIDSTRUCT("C1B06D73-1DBB-11d3-8F46-00C04F7971E2", PINNAME_MPE); +#define PINNAME_MPE DEFINE_GUIDNAMED(PINNAME_MPE) + + +///////////////////////////////////////////////////////////// +// +// BDA MPE Categories/Types +// +#define STATIC_KSDATAFORMAT_TYPE_MPE \ + 0x455f176c, 0x4b06, 0x47ce, 0x9a, 0xef, 0x8c, 0xae, 0xf7, 0x3d, 0xf7, 0xb5 +DEFINE_GUIDSTRUCT("455F176C-4B06-47ce-9AEF-8CAEF73DF7B5", KSDATAFORMAT_TYPE_MPE); +#define KSDATAFORMAT_TYPE_MPE DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MPE) + + +#if defined(__cplusplus) +} +#endif // defined(__cplusplus) + +#endif // !defined(_BDAMEDIA_) + diff --git a/windows_libs/mssdk/include/bdatypes.h b/windows_libs/mssdk/include/bdatypes.h new file mode 100644 index 00000000..10dcf910 --- /dev/null +++ b/windows_libs/mssdk/include/bdatypes.h @@ -0,0 +1,585 @@ +//------------------------------------------------------------------------------ +// File: BDATypes.h +// +// Desc: Typedefs and enums needed by both the WDM drivers and the user mode +// COM interfaces. +// +// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef _BDATYPES_ + +#define _BDATYPES_ 1 + +/* Utility Macros */ + +#define MIN_DIMENSION 1 +#define NATURAL 4 +#define CACHE_LINE 128 +#define PAGE 4096 +#define ALIGN( pointer, size) (((ULONG)(pointer) + (ULONG)(size) - 1) & ~((ULONG)(size) - 1)) +#define BDA_STRING_CONST(x) {sizeof(L##x)-2, sizeof(L##x), L##x} + + +#ifdef __midl +#define V1_ENUM [v1_enum] +#else +#define V1_ENUM +#endif + +//=========================================================================== +// +// BDA Topology Structures +// +//=========================================================================== + +typedef struct _BDA_TEMPLATE_CONNECTION +{ + ULONG FromNodeType; + ULONG FromNodePinType; + ULONG ToNodeType; + ULONG ToNodePinType; +}BDA_TEMPLATE_CONNECTION, *PBDA_TEMPLATE_CONNECTION; + + +typedef struct _BDA_TEMPLATE_PIN_JOINT +{ + ULONG uliTemplateConnection; + ULONG ulcInstancesMax; +}BDA_TEMPLATE_PIN_JOINT, *PBDA_TEMPLATE_PIN_JOINT; + + + +//=========================================================================== +// +// BDA Events +// +//=========================================================================== + +// In-band Event IDs +// +typedef enum { + BDA_EVENT_SIGNAL_LOSS = 0, + BDA_EVENT_SIGNAL_LOCK, + BDA_EVENT_DATA_START, + BDA_EVENT_DATA_STOP, + BDA_EVENT_CHANNEL_ACQUIRED, + BDA_EVENT_CHANNEL_LOST, + BDA_EVENT_CHANNEL_SOURCE_CHANGED, + BDA_EVENT_CHANNEL_ACTIVATED, + BDA_EVENT_CHANNEL_DEACTIVATED, + BDA_EVENT_SUBCHANNEL_ACQUIRED, + BDA_EVENT_SUBCHANNEL_LOST, + BDA_EVENT_SUBCHANNEL_SOURCE_CHANGED, + BDA_EVENT_SUBCHANNEL_ACTIVATED, + BDA_EVENT_SUBCHANNEL_DEACTIVATED, + BDA_EVENT_ACCESS_GRANTED, + BDA_EVENT_ACCESS_DENIED, + BDA_EVENT_OFFER_EXTENDED, + BDA_EVENT_PURCHASE_COMPLETED, + BDA_EVENT_SMART_CARD_INSERTED, + BDA_EVENT_SMART_CARD_REMOVED +} BDA_EVENT_ID, *PBDA_EVENT_ID; + + + +//=========================================================================== +// +// KSSTREAM_HEADER extensions for BDA +// +//=========================================================================== + +typedef struct tagKS_BDA_FRAME_INFO { + ULONG ExtendedHeaderSize; // Size of this extended header + DWORD dwFrameFlags; // + ULONG ulEvent; // + ULONG ulChannelNumber; // + ULONG ulSubchannelNumber; // + ULONG ulReason; // +} KS_BDA_FRAME_INFO, *PKS_BDA_FRAME_INFO; + + +//------------------------------------------------------------ +// +// BDA Network Ethernet Filter Property Set +// +// {71985F43-1CA1-11d3-9CC8-00C04F7971E0} +// +typedef struct _BDA_ETHERNET_ADDRESS { + BYTE rgbAddress[6]; +} BDA_ETHERNET_ADDRESS, *PBDA_ETHERNET_ADDRESS; + +typedef struct _BDA_ETHERNET_ADDRESS_LIST { + ULONG ulcAddresses; + BDA_ETHERNET_ADDRESS rgAddressl[MIN_DIMENSION]; +} BDA_ETHERNET_ADDRESS_LIST, * PBDA_ETHERNET_ADDRESS_LIST; + +typedef enum { + BDA_PROMISCUOUS_MULTICAST = 0, + BDA_FILTERED_MULTICAST, + BDA_NO_MULTICAST +} BDA_MULTICAST_MODE, *PBDA_MULTICAST_MODE; + + +//------------------------------------------------------------ +// +// BDA Network IPv4 Filter Property Set +// +// {71985F44-1CA1-11d3-9CC8-00C04F7971E0} +// +typedef struct _BDA_IPv4_ADDRESS { + BYTE rgbAddress[4]; +} BDA_IPv4_ADDRESS, *PBDA_IPv4_ADDRESS; + +typedef struct _BDA_IPv4_ADDRESS_LIST { + ULONG ulcAddresses; + BDA_IPv4_ADDRESS rgAddressl[MIN_DIMENSION]; +} BDA_IPv4_ADDRESS_LIST, * PBDA_IPv4_ADDRESS_LIST; + + +//------------------------------------------------------------ +// +// BDA Network IPv4 Filter Property Set +// +// {E1785A74-2A23-4fb3-9245-A8F88017EF33} +// +typedef struct _BDA_IPv6_ADDRESS { + BYTE rgbAddress[6]; +} BDA_IPv6_ADDRESS, *PBDA_IPv6_ADDRESS; + +typedef struct _BDA_IPv6_ADDRESS_LIST { + ULONG ulcAddresses; + BDA_IPv6_ADDRESS rgAddressl[MIN_DIMENSION]; +} BDA_IPv6_ADDRESS_LIST, * PBDA_IPv6_ADDRESS_LIST; + + +//------------------------------------------------------------ +// +// +// BDA Signal Property Set +// +// {D2F1644B-B409-11d2-BC69-00A0C9EE9E16} +// +typedef enum { + BDA_SIGNAL_UNAVAILABLE = 0, + BDA_SIGNAL_INACTIVE, + BDA_SIGNAL_ACTIVE +} BDA_SIGNAL_STATE, * PBDA_SIGNAL_STATE; + + +//------------------------------------------------------------ +// +// +// BDA Change Sync Method Set +// +// {FD0A5AF3-B41D-11d2-9C95-00C04F7971E0} +// +typedef enum +{ + BDA_CHANGES_COMPLETE = 0, + BDA_CHANGES_PENDING + +} BDA_CHANGE_STATE, * PBDA_CHANGE_STATE; + + +//------------------------------------------------------------ +// +// +// BDA Device Configuration Method Set +// +// {71985F45-1CA1-11d3-9CC8-00C04F7971E0} +// + + +//------------------------------------------------------------ +// +// +// BDA Topology Property Set +// +// {A14EE835-0A23-11d3-9CC7-00C04F7971E0} +// + +typedef struct _BDANODE_DESCRIPTOR +{ + ULONG ulBdaNodeType; // The node type as it is used + // in the BDA template topology + + GUID guidFunction; // GUID from BdaMedia.h describing + // the node's function (e.g. + // KSNODE_BDA_RF_TUNER) + + GUID guidName; // GUID that can be use to look up + // a displayable name for the node. +} BDANODE_DESCRIPTOR, *PBDANODE_DESCRIPTOR; + + +//------------------------------------------------------------ +// +// +// BDA Void Transform Property Set +// +// {71985F46-1CA1-11d3-9CC8-00C04F7971E0} +// + + +//------------------------------------------------------------ +// +// +// BDA Null Transform Property Set +// +// {DDF15B0D-BD25-11d2-9CA0-00C04F7971E0} +// + + +//------------------------------------------------------------ +// +// +// BDA Frequency Filter Property Set +// +// {71985F47-1CA1-11d3-9CC8-00C04F7971E0} +// + + +//------------------------------------------------------------ +// +// +// BDA Autodemodulate Property Set +// +// {DDF15B12-BD25-11d2-9CA0-00C04F7971E0} +// + + +//------------------------------------------------------------ +// +// +// BDA PmtProcessor Property Set +// +// {516B99C5-971C-4aaf-B3F3-D9FDA8A15E16} +// + +typedef struct _BDA_PMT +{ + ULONG ulTableID; + ULONG ulcbSectionLength; + ULONG argbSectionData[MIN_DIMENSION]; +} BDA_PMT, *PBDA_PMT; + +//------------------------------------------------------------ +// +// +// BDA Descriptor Property Set +// +// {DE6A1C9E-87DF-48aa-95AA-289B7AA4F49F} +// + +typedef struct _BDA_CAT_DESCRIPTOR +{ + ULONG ulTag; + ULONG ulcbLength; + ULONG argbData[MIN_DIMENSION]; +} BDA_CAT_DESCRIPTOR, *PBDA_CAT_DESCRIPTOR; + +typedef struct _BDA_ES_DESCRIPTOR +{ + ULONG ulProgramNum; + ULONG ulContentPID; + ULONG ulTag; + ULONG ulcbLength; + ULONG argbData[MIN_DIMENSION]; +} BDA_ES_DESCRIPTOR, *PBDA_ES_DESCRIPTOR; + +typedef struct _BDA_PROGRAM_DESCRIPTOR +{ + ULONG ulProgramNum; + ULONG ulTag; + ULONG ulcbLength; + ULONG argbData[MIN_DIMENSION]; +} BDA_PROGRAM_DESCRIPTOR, *PBDA_PROGRAM_DESCRIPTOR; + + +//------------------------------------------------------------ +// +// +// BDA EsMap Property Set +// +// {FA14A8B3-6068-48ef-96DD-53010B985A7D} +// + +typedef enum +{ + ES_MAP_STATE_GOOD_FLOW = 0, + ES_MAP_STATE_NO_CONTENT, + ES_MAP_STATE_NO_ECM, + ES_MAP_STATE_BAD_MAP +} BDA_ES_MAP_STATE, *PBDA_ES_MAP_STATE; + +typedef struct _BDA_ES_MAP +{ + ULONG ulContentPID; + ULONG ulProgramNum; + ULONG ulStreamType; + BDA_ES_MAP_STATE mapState; +} BDA_ES_MAP, *PBDA_ES_MAP; + + +//------------------------------------------------------------ +// +// +// BDA PID Filter Property Set +// +// {D0A67D65-08DF-4fec-8533-E5B550410B85} +// + +//--------------------------------------------------------------------- +// From IEnumPIDMap interface +//--------------------------------------------------------------------- + +typedef enum { + MEDIA_TRANSPORT_PACKET, // complete TS packet e.g. pass-through mode + MEDIA_ELEMENTARY_STREAM, // PES payloads; audio/video only + MEDIA_MPEG2_PSI, // PAT, PMT, CAT, Private + MEDIA_TRANSPORT_PAYLOAD // gathered TS packet payloads (PES packets, etc...) +} MEDIA_SAMPLE_CONTENT ; + +typedef struct { + ULONG ulPID ; + MEDIA_SAMPLE_CONTENT MediaSampleContent ; +} PID_MAP ; + +typedef struct _BDA_PID_MAP +{ + MEDIA_SAMPLE_CONTENT MediaSampleContent; + ULONG ulcPIDs; + ULONG aulPIDs[MIN_DIMENSION]; +} BDA_PID_MAP, *PBDA_PID_MAP; + +typedef struct _BDA_PID_UNMAP +{ + ULONG ulcPIDs; + ULONG aulPIDs[MIN_DIMENSION]; +} BDA_PID_UNMAP, *PBDA_PID_UNMAP; + + +//------------------------------------------------------------ +// +// +// BDA CA Property Set +// +// {B0693766-5278-4ec6-B9E1-3CE40560EF5A} +// +typedef struct _BDA_CA_MODULE_UI +{ + ULONG ulFormat; + ULONG ulbcDesc; + ULONG ulDesc[MIN_DIMENSION]; +} BDA_CA_MODULE_UI, *PBDA_CA_MODULE_UI; + + +//------------------------------------------------------------ +// +// +// BDA CA Event Set +// +// {488C4CCC-B768-4129-8EB1-B00A071F9068} +// + + + +//============================================================= +// +// +// BDA Tuning Model enumerations +// +// +//============================================================= + +// system type for particular DVB Tuning Space instance +typedef enum DVBSystemType { + DVB_Cable, + DVB_Terrestrial, + DVB_Satellite, +} DVBSystemType; + +//------------------------------------------------------------ +// +// BDA Channel Tune Request + +V1_ENUM enum { + BDA_UNDEFINED_CHANNEL = -1, +}; + + +//------------------------------------------------------------ +// +// BDA Component(substream) +// + +typedef V1_ENUM enum ComponentCategory +{ + CategoryNotSet = -1, + CategoryOther = 0, + CategoryVideo, + CategoryAudio, + CategoryText, + CategoryData, +} ComponentCategory; + +// Component Status +typedef enum ComponentStatus +{ + StatusActive, + StatusInactive, + StatusUnavailable, +} ComponentStatus; + + +//------------------------------------------------------------ +// +// BDA MPEG2 Component Type +// +// from the MPEG2 specification +typedef V1_ENUM enum MPEG2StreamType { + BDA_UNITIALIZED_MPEG2STREAMTYPE = -1, + Reserved1 = 0x0, + ISO_IEC_11172_2_VIDEO = Reserved1 + 1, + ISO_IEC_13818_2_VIDEO = ISO_IEC_11172_2_VIDEO + 1, + ISO_IEC_11172_3_AUDIO = ISO_IEC_13818_2_VIDEO + 1, + ISO_IEC_13818_3_AUDIO = ISO_IEC_11172_3_AUDIO + 1, + ISO_IEC_13818_1_PRIVATE_SECTION = ISO_IEC_13818_3_AUDIO + 1, + ISO_IEC_13818_1_PES = ISO_IEC_13818_1_PRIVATE_SECTION + 1, + ISO_IEC_13522_MHEG = ISO_IEC_13818_1_PES + 1, + ANNEX_A_DSM_CC = ISO_IEC_13522_MHEG + 1, + ITU_T_REC_H_222_1 = ANNEX_A_DSM_CC + 1, + ISO_IEC_13818_6_TYPE_A = ITU_T_REC_H_222_1 + 1, + ISO_IEC_13818_6_TYPE_B = ISO_IEC_13818_6_TYPE_A + 1, + ISO_IEC_13818_6_TYPE_C = ISO_IEC_13818_6_TYPE_B + 1, + ISO_IEC_13818_6_TYPE_D = ISO_IEC_13818_6_TYPE_C + 1, + ISO_IEC_13818_1_AUXILIARY = ISO_IEC_13818_6_TYPE_D + 1, + ISO_IEC_13818_1_RESERVED = ISO_IEC_13818_1_AUXILIARY + 1, + USER_PRIVATE = ISO_IEC_13818_1_RESERVED + 1 +} MPEG2StreamType; + + +//------------------------------------------------------------ +// +// BDA ATSC Component Type +// +// +// ATSC made AC3 Audio a descriptor instead of +// defining a user private stream type. +typedef enum ATSCComponentTypeFlags { + // bit flags for various component type properties + ATSCCT_AC3 = 0x00000001, +} ATSCComponentTypeFlags; + + +//------------------------------------------------------------ +// +// BDA Locators +// + + +typedef V1_ENUM enum BinaryConvolutionCodeRate { + BDA_BCC_RATE_NOT_SET = -1, + BDA_BCC_RATE_NOT_DEFINED = 0, + BDA_BCC_RATE_1_2 = 1, // 1/2 + BDA_BCC_RATE_2_3, // 2/3 + BDA_BCC_RATE_3_4, // 3/4 + BDA_BCC_RATE_3_5, + BDA_BCC_RATE_4_5, + BDA_BCC_RATE_5_6, // 5/6 + BDA_BCC_RATE_5_11, + BDA_BCC_RATE_7_8, // 7/8 + BDA_BCC_RATE_MAX, +} BinaryConvolutionCodeRate; + +typedef V1_ENUM enum FECMethod { + BDA_FEC_METHOD_NOT_SET = -1, + BDA_FEC_METHOD_NOT_DEFINED = 0, + BDA_FEC_VITERBI = 1, // FEC is a Viterbi Binary Convolution. + BDA_FEC_RS_204_188, // The FEC is Reed-Solomon 204/188 (outer FEC) + BDA_FEC_MAX, +} FECMethod; + +typedef V1_ENUM enum ModulationType { + BDA_MOD_NOT_SET = -1, + BDA_MOD_NOT_DEFINED = 0, + BDA_MOD_16QAM = 1, + BDA_MOD_32QAM, + BDA_MOD_64QAM, + BDA_MOD_80QAM, + BDA_MOD_96QAM, + BDA_MOD_112QAM, + BDA_MOD_128QAM, + BDA_MOD_160QAM, + BDA_MOD_192QAM, + BDA_MOD_224QAM, + BDA_MOD_256QAM, + BDA_MOD_320QAM, + BDA_MOD_384QAM, + BDA_MOD_448QAM, + BDA_MOD_512QAM, + BDA_MOD_640QAM, + BDA_MOD_768QAM, + BDA_MOD_896QAM, + BDA_MOD_1024QAM, + BDA_MOD_QPSK, + BDA_MOD_BPSK, + BDA_MOD_OQPSK, + BDA_MOD_8VSB, + BDA_MOD_16VSB, + BDA_MOD_ANALOG_AMPLITUDE, // std am + BDA_MOD_ANALOG_FREQUENCY, // std fm + BDA_MOD_MAX, +} ModulationType; + +typedef V1_ENUM enum SpectralInversion { + BDA_SPECTRAL_INVERSION_NOT_SET = -1, + BDA_SPECTRAL_INVERSION_NOT_DEFINED = 0, + BDA_SPECTRAL_INVERSION_AUTOMATIC = 1, + BDA_SPECTRAL_INVERSION_NORMAL, + BDA_SPECTRAL_INVERSION_INVERTED, + BDA_SPECTRAL_INVERSION_MAX +} SpectralInversion; + +typedef V1_ENUM enum Polarisation { + BDA_POLARISATION_NOT_SET = -1, + BDA_POLARISATION_NOT_DEFINED = 0, + BDA_POLARISATION_LINEAR_H = 1, // Linear horizontal polarisation + BDA_POLARISATION_LINEAR_V, // Linear vertical polarisation + BDA_POLARISATION_CIRCULAR_L, // Circular left polarisation + BDA_POLARISATION_CIRCULAR_R, // Circular right polarisation + BDA_POLARISATION_MAX, +} Polarisation; + +typedef V1_ENUM enum GuardInterval { + BDA_GUARD_NOT_SET = -1, + BDA_GUARD_NOT_DEFINED = 0, + BDA_GUARD_1_32 = 1, // Guard interval is 1/32 + BDA_GUARD_1_16, // Guard interval is 1/16 + BDA_GUARD_1_8, // Guard interval is 1/8 + BDA_GUARD_1_4, // Guard interval is 1/4 + BDA_GUARD_MAX, +} GuardInterval; + +typedef V1_ENUM enum HierarchyAlpha { + BDA_HALPHA_NOT_SET = -1, + BDA_HALPHA_NOT_DEFINED = 0, + BDA_HALPHA_1 = 1, // Hierarchy alpha is 1. + BDA_HALPHA_2, // Hierarchy alpha is 2. + BDA_HALPHA_4, // Hierarchy alpha is 4. + BDA_HALPHA_MAX, +} HierarchyAlpha; + +typedef V1_ENUM enum TransmissionMode { + BDA_XMIT_MODE_NOT_SET = -1, + BDA_XMIT_MODE_NOT_DEFINED = 0, + BDA_XMIT_MODE_2K = 1, // Transmission uses 1705 carriers (use a 2K FFT) + BDA_XMIT_MODE_8K, // Transmission uses 6817 carriers (use an 8K FFT) + BDA_XMIT_MODE_MAX, +} TransmissionMode; + +#endif // not defined _BDATYPES_ + +// end of file -- bdatypes.h diff --git a/windows_libs/mssdk/include/comlite.h b/windows_libs/mssdk/include/comlite.h new file mode 100644 index 00000000..2204d5db --- /dev/null +++ b/windows_libs/mssdk/include/comlite.h @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// File: COMLite.h +// +// Desc: This header file is to provide a migration path for users of +// ActiveMovie betas 1 and 2. +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef _INC_COMLITE_ +#define _INC_COMLITE_ + +#define QzInitialize CoInitialize +#define QzUninitialize CoUninitialize +#define QzFreeUnusedLibraries CoFreeUnusedLibraries + +#define QzGetMalloc CoGetMalloc +#define QzTaskMemAlloc CoTaskMemAlloc +#define QzTaskMemRealloc CoTaskMemRealloc +#define QzTaskMemFree CoTaskMemFree +#define QzCreateFilterObject CoCreateInstance +#define QzCLSIDFromString CLSIDFromString +#define QzStringFromGUID2 StringFromGUID2 + +#endif // _INC_COMLITE_ diff --git a/windows_libs/mssdk/include/control.h b/windows_libs/mssdk/include/control.h new file mode 100644 index 00000000..2af0cb2b --- /dev/null +++ b/windows_libs/mssdk/include/control.h @@ -0,0 +1,5539 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0338 */ +/* Compiler settings for control.odl: + Oicf, W0, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __control_h__ +#define __control_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IAMCollection_FWD_DEFINED__ +#define __IAMCollection_FWD_DEFINED__ +typedef interface IAMCollection IAMCollection; +#endif /* __IAMCollection_FWD_DEFINED__ */ + + +#ifndef __IMediaControl_FWD_DEFINED__ +#define __IMediaControl_FWD_DEFINED__ +typedef interface IMediaControl IMediaControl; +#endif /* __IMediaControl_FWD_DEFINED__ */ + + +#ifndef __IMediaEvent_FWD_DEFINED__ +#define __IMediaEvent_FWD_DEFINED__ +typedef interface IMediaEvent IMediaEvent; +#endif /* __IMediaEvent_FWD_DEFINED__ */ + + +#ifndef __IMediaEventEx_FWD_DEFINED__ +#define __IMediaEventEx_FWD_DEFINED__ +typedef interface IMediaEventEx IMediaEventEx; +#endif /* __IMediaEventEx_FWD_DEFINED__ */ + + +#ifndef __IMediaPosition_FWD_DEFINED__ +#define __IMediaPosition_FWD_DEFINED__ +typedef interface IMediaPosition IMediaPosition; +#endif /* __IMediaPosition_FWD_DEFINED__ */ + + +#ifndef __IBasicAudio_FWD_DEFINED__ +#define __IBasicAudio_FWD_DEFINED__ +typedef interface IBasicAudio IBasicAudio; +#endif /* __IBasicAudio_FWD_DEFINED__ */ + + +#ifndef __IVideoWindow_FWD_DEFINED__ +#define __IVideoWindow_FWD_DEFINED__ +typedef interface IVideoWindow IVideoWindow; +#endif /* __IVideoWindow_FWD_DEFINED__ */ + + +#ifndef __IBasicVideo_FWD_DEFINED__ +#define __IBasicVideo_FWD_DEFINED__ +typedef interface IBasicVideo IBasicVideo; +#endif /* __IBasicVideo_FWD_DEFINED__ */ + + +#ifndef __IBasicVideo2_FWD_DEFINED__ +#define __IBasicVideo2_FWD_DEFINED__ +typedef interface IBasicVideo2 IBasicVideo2; +#endif /* __IBasicVideo2_FWD_DEFINED__ */ + + +#ifndef __IDeferredCommand_FWD_DEFINED__ +#define __IDeferredCommand_FWD_DEFINED__ +typedef interface IDeferredCommand IDeferredCommand; +#endif /* __IDeferredCommand_FWD_DEFINED__ */ + + +#ifndef __IQueueCommand_FWD_DEFINED__ +#define __IQueueCommand_FWD_DEFINED__ +typedef interface IQueueCommand IQueueCommand; +#endif /* __IQueueCommand_FWD_DEFINED__ */ + + +#ifndef __FilgraphManager_FWD_DEFINED__ +#define __FilgraphManager_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class FilgraphManager FilgraphManager; +#else +typedef struct FilgraphManager FilgraphManager; +#endif /* __cplusplus */ + +#endif /* __FilgraphManager_FWD_DEFINED__ */ + + +#ifndef __IFilterInfo_FWD_DEFINED__ +#define __IFilterInfo_FWD_DEFINED__ +typedef interface IFilterInfo IFilterInfo; +#endif /* __IFilterInfo_FWD_DEFINED__ */ + + +#ifndef __IRegFilterInfo_FWD_DEFINED__ +#define __IRegFilterInfo_FWD_DEFINED__ +typedef interface IRegFilterInfo IRegFilterInfo; +#endif /* __IRegFilterInfo_FWD_DEFINED__ */ + + +#ifndef __IMediaTypeInfo_FWD_DEFINED__ +#define __IMediaTypeInfo_FWD_DEFINED__ +typedef interface IMediaTypeInfo IMediaTypeInfo; +#endif /* __IMediaTypeInfo_FWD_DEFINED__ */ + + +#ifndef __IPinInfo_FWD_DEFINED__ +#define __IPinInfo_FWD_DEFINED__ +typedef interface IPinInfo IPinInfo; +#endif /* __IPinInfo_FWD_DEFINED__ */ + + +#ifndef __IAMStats_FWD_DEFINED__ +#define __IAMStats_FWD_DEFINED__ +typedef interface IAMStats IAMStats; +#endif /* __IAMStats_FWD_DEFINED__ */ + + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + + +#ifndef __QuartzTypeLib_LIBRARY_DEFINED__ +#define __QuartzTypeLib_LIBRARY_DEFINED__ + +/* library QuartzTypeLib */ +/* [version][lcid][helpstring][uuid] */ + +typedef double REFTIME; + +typedef LONG_PTR OAEVENT; + +typedef LONG_PTR OAHWND; + +typedef long OAFilterState; + + +DEFINE_GUID(LIBID_QuartzTypeLib,0x56a868b0,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#ifndef __IAMCollection_INTERFACE_DEFINED__ +#define __IAMCollection_INTERFACE_DEFINED__ + +/* interface IAMCollection */ +/* [object][dual][oleautomation][helpstring][uuid] */ + + +DEFINE_GUID(IID_IAMCollection,0x56a868b9,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868b9-0ad4-11ce-b03a-0020af0ba770") + IAMCollection : public IDispatch + { + public: + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Count( + /* [retval][out] */ LONG *plCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE Item( + /* [in] */ long lItem, + /* [out] */ IUnknown **ppUnk) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get__NewEnum( + /* [retval][out] */ IUnknown **ppUnk) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMCollectionVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMCollection * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMCollection * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMCollection * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IAMCollection * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IAMCollection * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IAMCollection * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IAMCollection * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( + IAMCollection * This, + /* [retval][out] */ LONG *plCount); + + HRESULT ( STDMETHODCALLTYPE *Item )( + IAMCollection * This, + /* [in] */ long lItem, + /* [out] */ IUnknown **ppUnk); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( + IAMCollection * This, + /* [retval][out] */ IUnknown **ppUnk); + + END_INTERFACE + } IAMCollectionVtbl; + + interface IAMCollection + { + CONST_VTBL struct IAMCollectionVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMCollection_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMCollection_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMCollection_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMCollection_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IAMCollection_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IAMCollection_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IAMCollection_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IAMCollection_get_Count(This,plCount) \ + (This)->lpVtbl -> get_Count(This,plCount) + +#define IAMCollection_Item(This,lItem,ppUnk) \ + (This)->lpVtbl -> Item(This,lItem,ppUnk) + +#define IAMCollection_get__NewEnum(This,ppUnk) \ + (This)->lpVtbl -> get__NewEnum(This,ppUnk) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IAMCollection_get_Count_Proxy( + IAMCollection * This, + /* [retval][out] */ LONG *plCount); + + +void __RPC_STUB IAMCollection_get_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMCollection_Item_Proxy( + IAMCollection * This, + /* [in] */ long lItem, + /* [out] */ IUnknown **ppUnk); + + +void __RPC_STUB IAMCollection_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IAMCollection_get__NewEnum_Proxy( + IAMCollection * This, + /* [retval][out] */ IUnknown **ppUnk); + + +void __RPC_STUB IAMCollection_get__NewEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMCollection_INTERFACE_DEFINED__ */ + + +#ifndef __IMediaControl_INTERFACE_DEFINED__ +#define __IMediaControl_INTERFACE_DEFINED__ + +/* interface IMediaControl */ +/* [object][dual][oleautomation][helpstring][uuid] */ + + +DEFINE_GUID(IID_IMediaControl,0x56a868b1,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868b1-0ad4-11ce-b03a-0020af0ba770") + IMediaControl : public IDispatch + { + public: + virtual HRESULT STDMETHODCALLTYPE Run( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Pause( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetState( + /* [in] */ LONG msTimeout, + /* [out] */ OAFilterState *pfs) = 0; + + virtual HRESULT STDMETHODCALLTYPE RenderFile( + /* [in] */ BSTR strFilename) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddSourceFilter( + /* [in] */ BSTR strFilename, + /* [out] */ IDispatch **ppUnk) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_FilterCollection( + /* [retval][out] */ IDispatch **ppUnk) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_RegFilterCollection( + /* [retval][out] */ IDispatch **ppUnk) = 0; + + virtual HRESULT STDMETHODCALLTYPE StopWhenReady( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaControl * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaControl * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IMediaControl * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IMediaControl * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IMediaControl * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IMediaControl * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + HRESULT ( STDMETHODCALLTYPE *Run )( + IMediaControl * This); + + HRESULT ( STDMETHODCALLTYPE *Pause )( + IMediaControl * This); + + HRESULT ( STDMETHODCALLTYPE *Stop )( + IMediaControl * This); + + HRESULT ( STDMETHODCALLTYPE *GetState )( + IMediaControl * This, + /* [in] */ LONG msTimeout, + /* [out] */ OAFilterState *pfs); + + HRESULT ( STDMETHODCALLTYPE *RenderFile )( + IMediaControl * This, + /* [in] */ BSTR strFilename); + + HRESULT ( STDMETHODCALLTYPE *AddSourceFilter )( + IMediaControl * This, + /* [in] */ BSTR strFilename, + /* [out] */ IDispatch **ppUnk); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_FilterCollection )( + IMediaControl * This, + /* [retval][out] */ IDispatch **ppUnk); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_RegFilterCollection )( + IMediaControl * This, + /* [retval][out] */ IDispatch **ppUnk); + + HRESULT ( STDMETHODCALLTYPE *StopWhenReady )( + IMediaControl * This); + + END_INTERFACE + } IMediaControlVtbl; + + interface IMediaControl + { + CONST_VTBL struct IMediaControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaControl_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaControl_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaControl_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaControl_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IMediaControl_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IMediaControl_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IMediaControl_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IMediaControl_Run(This) \ + (This)->lpVtbl -> Run(This) + +#define IMediaControl_Pause(This) \ + (This)->lpVtbl -> Pause(This) + +#define IMediaControl_Stop(This) \ + (This)->lpVtbl -> Stop(This) + +#define IMediaControl_GetState(This,msTimeout,pfs) \ + (This)->lpVtbl -> GetState(This,msTimeout,pfs) + +#define IMediaControl_RenderFile(This,strFilename) \ + (This)->lpVtbl -> RenderFile(This,strFilename) + +#define IMediaControl_AddSourceFilter(This,strFilename,ppUnk) \ + (This)->lpVtbl -> AddSourceFilter(This,strFilename,ppUnk) + +#define IMediaControl_get_FilterCollection(This,ppUnk) \ + (This)->lpVtbl -> get_FilterCollection(This,ppUnk) + +#define IMediaControl_get_RegFilterCollection(This,ppUnk) \ + (This)->lpVtbl -> get_RegFilterCollection(This,ppUnk) + +#define IMediaControl_StopWhenReady(This) \ + (This)->lpVtbl -> StopWhenReady(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaControl_Run_Proxy( + IMediaControl * This); + + +void __RPC_STUB IMediaControl_Run_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaControl_Pause_Proxy( + IMediaControl * This); + + +void __RPC_STUB IMediaControl_Pause_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaControl_Stop_Proxy( + IMediaControl * This); + + +void __RPC_STUB IMediaControl_Stop_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaControl_GetState_Proxy( + IMediaControl * This, + /* [in] */ LONG msTimeout, + /* [out] */ OAFilterState *pfs); + + +void __RPC_STUB IMediaControl_GetState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaControl_RenderFile_Proxy( + IMediaControl * This, + /* [in] */ BSTR strFilename); + + +void __RPC_STUB IMediaControl_RenderFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaControl_AddSourceFilter_Proxy( + IMediaControl * This, + /* [in] */ BSTR strFilename, + /* [out] */ IDispatch **ppUnk); + + +void __RPC_STUB IMediaControl_AddSourceFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IMediaControl_get_FilterCollection_Proxy( + IMediaControl * This, + /* [retval][out] */ IDispatch **ppUnk); + + +void __RPC_STUB IMediaControl_get_FilterCollection_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IMediaControl_get_RegFilterCollection_Proxy( + IMediaControl * This, + /* [retval][out] */ IDispatch **ppUnk); + + +void __RPC_STUB IMediaControl_get_RegFilterCollection_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaControl_StopWhenReady_Proxy( + IMediaControl * This); + + +void __RPC_STUB IMediaControl_StopWhenReady_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaControl_INTERFACE_DEFINED__ */ + + +#ifndef __IMediaEvent_INTERFACE_DEFINED__ +#define __IMediaEvent_INTERFACE_DEFINED__ + +/* interface IMediaEvent */ +/* [object][dual][oleautomation][helpstring][uuid] */ + + +DEFINE_GUID(IID_IMediaEvent,0x56a868b6,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868b6-0ad4-11ce-b03a-0020af0ba770") + IMediaEvent : public IDispatch + { + public: + virtual HRESULT STDMETHODCALLTYPE GetEventHandle( + /* [out] */ OAEVENT *hEvent) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetEvent( + /* [out] */ long *lEventCode, + /* [out] */ LONG_PTR *lParam1, + /* [out] */ LONG_PTR *lParam2, + /* [in] */ long msTimeout) = 0; + + virtual HRESULT STDMETHODCALLTYPE WaitForCompletion( + /* [in] */ long msTimeout, + /* [out] */ long *pEvCode) = 0; + + virtual HRESULT STDMETHODCALLTYPE CancelDefaultHandling( + /* [in] */ long lEvCode) = 0; + + virtual HRESULT STDMETHODCALLTYPE RestoreDefaultHandling( + /* [in] */ long lEvCode) = 0; + + virtual HRESULT STDMETHODCALLTYPE FreeEventParams( + /* [in] */ long lEvCode, + /* [in] */ LONG_PTR lParam1, + /* [in] */ LONG_PTR lParam2) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaEventVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaEvent * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaEvent * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaEvent * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IMediaEvent * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IMediaEvent * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IMediaEvent * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IMediaEvent * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + HRESULT ( STDMETHODCALLTYPE *GetEventHandle )( + IMediaEvent * This, + /* [out] */ OAEVENT *hEvent); + + HRESULT ( STDMETHODCALLTYPE *GetEvent )( + IMediaEvent * This, + /* [out] */ long *lEventCode, + /* [out] */ LONG_PTR *lParam1, + /* [out] */ LONG_PTR *lParam2, + /* [in] */ long msTimeout); + + HRESULT ( STDMETHODCALLTYPE *WaitForCompletion )( + IMediaEvent * This, + /* [in] */ long msTimeout, + /* [out] */ long *pEvCode); + + HRESULT ( STDMETHODCALLTYPE *CancelDefaultHandling )( + IMediaEvent * This, + /* [in] */ long lEvCode); + + HRESULT ( STDMETHODCALLTYPE *RestoreDefaultHandling )( + IMediaEvent * This, + /* [in] */ long lEvCode); + + HRESULT ( STDMETHODCALLTYPE *FreeEventParams )( + IMediaEvent * This, + /* [in] */ long lEvCode, + /* [in] */ LONG_PTR lParam1, + /* [in] */ LONG_PTR lParam2); + + END_INTERFACE + } IMediaEventVtbl; + + interface IMediaEvent + { + CONST_VTBL struct IMediaEventVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaEvent_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaEvent_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaEvent_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaEvent_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IMediaEvent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IMediaEvent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IMediaEvent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IMediaEvent_GetEventHandle(This,hEvent) \ + (This)->lpVtbl -> GetEventHandle(This,hEvent) + +#define IMediaEvent_GetEvent(This,lEventCode,lParam1,lParam2,msTimeout) \ + (This)->lpVtbl -> GetEvent(This,lEventCode,lParam1,lParam2,msTimeout) + +#define IMediaEvent_WaitForCompletion(This,msTimeout,pEvCode) \ + (This)->lpVtbl -> WaitForCompletion(This,msTimeout,pEvCode) + +#define IMediaEvent_CancelDefaultHandling(This,lEvCode) \ + (This)->lpVtbl -> CancelDefaultHandling(This,lEvCode) + +#define IMediaEvent_RestoreDefaultHandling(This,lEvCode) \ + (This)->lpVtbl -> RestoreDefaultHandling(This,lEvCode) + +#define IMediaEvent_FreeEventParams(This,lEvCode,lParam1,lParam2) \ + (This)->lpVtbl -> FreeEventParams(This,lEvCode,lParam1,lParam2) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaEvent_GetEventHandle_Proxy( + IMediaEvent * This, + /* [out] */ OAEVENT *hEvent); + + +void __RPC_STUB IMediaEvent_GetEventHandle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaEvent_GetEvent_Proxy( + IMediaEvent * This, + /* [out] */ long *lEventCode, + /* [out] */ LONG_PTR *lParam1, + /* [out] */ LONG_PTR *lParam2, + /* [in] */ long msTimeout); + + +void __RPC_STUB IMediaEvent_GetEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaEvent_WaitForCompletion_Proxy( + IMediaEvent * This, + /* [in] */ long msTimeout, + /* [out] */ long *pEvCode); + + +void __RPC_STUB IMediaEvent_WaitForCompletion_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaEvent_CancelDefaultHandling_Proxy( + IMediaEvent * This, + /* [in] */ long lEvCode); + + +void __RPC_STUB IMediaEvent_CancelDefaultHandling_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaEvent_RestoreDefaultHandling_Proxy( + IMediaEvent * This, + /* [in] */ long lEvCode); + + +void __RPC_STUB IMediaEvent_RestoreDefaultHandling_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaEvent_FreeEventParams_Proxy( + IMediaEvent * This, + /* [in] */ long lEvCode, + /* [in] */ LONG_PTR lParam1, + /* [in] */ LONG_PTR lParam2); + + +void __RPC_STUB IMediaEvent_FreeEventParams_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaEvent_INTERFACE_DEFINED__ */ + + +#ifndef __IMediaEventEx_INTERFACE_DEFINED__ +#define __IMediaEventEx_INTERFACE_DEFINED__ + +/* interface IMediaEventEx */ +/* [object][helpstring][uuid] */ + + +DEFINE_GUID(IID_IMediaEventEx,0x56a868c0,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868c0-0ad4-11ce-b03a-0020af0ba770") + IMediaEventEx : public IMediaEvent + { + public: + virtual HRESULT STDMETHODCALLTYPE SetNotifyWindow( + /* [in] */ OAHWND hwnd, + /* [in] */ long lMsg, + /* [in] */ LONG_PTR lInstanceData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetNotifyFlags( + /* [in] */ long lNoNotifyFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetNotifyFlags( + /* [out] */ long *lplNoNotifyFlags) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaEventExVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaEventEx * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaEventEx * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaEventEx * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IMediaEventEx * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IMediaEventEx * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IMediaEventEx * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IMediaEventEx * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + HRESULT ( STDMETHODCALLTYPE *GetEventHandle )( + IMediaEventEx * This, + /* [out] */ OAEVENT *hEvent); + + HRESULT ( STDMETHODCALLTYPE *GetEvent )( + IMediaEventEx * This, + /* [out] */ long *lEventCode, + /* [out] */ LONG_PTR *lParam1, + /* [out] */ LONG_PTR *lParam2, + /* [in] */ long msTimeout); + + HRESULT ( STDMETHODCALLTYPE *WaitForCompletion )( + IMediaEventEx * This, + /* [in] */ long msTimeout, + /* [out] */ long *pEvCode); + + HRESULT ( STDMETHODCALLTYPE *CancelDefaultHandling )( + IMediaEventEx * This, + /* [in] */ long lEvCode); + + HRESULT ( STDMETHODCALLTYPE *RestoreDefaultHandling )( + IMediaEventEx * This, + /* [in] */ long lEvCode); + + HRESULT ( STDMETHODCALLTYPE *FreeEventParams )( + IMediaEventEx * This, + /* [in] */ long lEvCode, + /* [in] */ LONG_PTR lParam1, + /* [in] */ LONG_PTR lParam2); + + HRESULT ( STDMETHODCALLTYPE *SetNotifyWindow )( + IMediaEventEx * This, + /* [in] */ OAHWND hwnd, + /* [in] */ long lMsg, + /* [in] */ LONG_PTR lInstanceData); + + HRESULT ( STDMETHODCALLTYPE *SetNotifyFlags )( + IMediaEventEx * This, + /* [in] */ long lNoNotifyFlags); + + HRESULT ( STDMETHODCALLTYPE *GetNotifyFlags )( + IMediaEventEx * This, + /* [out] */ long *lplNoNotifyFlags); + + END_INTERFACE + } IMediaEventExVtbl; + + interface IMediaEventEx + { + CONST_VTBL struct IMediaEventExVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaEventEx_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaEventEx_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaEventEx_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaEventEx_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IMediaEventEx_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IMediaEventEx_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IMediaEventEx_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IMediaEventEx_GetEventHandle(This,hEvent) \ + (This)->lpVtbl -> GetEventHandle(This,hEvent) + +#define IMediaEventEx_GetEvent(This,lEventCode,lParam1,lParam2,msTimeout) \ + (This)->lpVtbl -> GetEvent(This,lEventCode,lParam1,lParam2,msTimeout) + +#define IMediaEventEx_WaitForCompletion(This,msTimeout,pEvCode) \ + (This)->lpVtbl -> WaitForCompletion(This,msTimeout,pEvCode) + +#define IMediaEventEx_CancelDefaultHandling(This,lEvCode) \ + (This)->lpVtbl -> CancelDefaultHandling(This,lEvCode) + +#define IMediaEventEx_RestoreDefaultHandling(This,lEvCode) \ + (This)->lpVtbl -> RestoreDefaultHandling(This,lEvCode) + +#define IMediaEventEx_FreeEventParams(This,lEvCode,lParam1,lParam2) \ + (This)->lpVtbl -> FreeEventParams(This,lEvCode,lParam1,lParam2) + + +#define IMediaEventEx_SetNotifyWindow(This,hwnd,lMsg,lInstanceData) \ + (This)->lpVtbl -> SetNotifyWindow(This,hwnd,lMsg,lInstanceData) + +#define IMediaEventEx_SetNotifyFlags(This,lNoNotifyFlags) \ + (This)->lpVtbl -> SetNotifyFlags(This,lNoNotifyFlags) + +#define IMediaEventEx_GetNotifyFlags(This,lplNoNotifyFlags) \ + (This)->lpVtbl -> GetNotifyFlags(This,lplNoNotifyFlags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaEventEx_SetNotifyWindow_Proxy( + IMediaEventEx * This, + /* [in] */ OAHWND hwnd, + /* [in] */ long lMsg, + /* [in] */ LONG_PTR lInstanceData); + + +void __RPC_STUB IMediaEventEx_SetNotifyWindow_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaEventEx_SetNotifyFlags_Proxy( + IMediaEventEx * This, + /* [in] */ long lNoNotifyFlags); + + +void __RPC_STUB IMediaEventEx_SetNotifyFlags_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaEventEx_GetNotifyFlags_Proxy( + IMediaEventEx * This, + /* [out] */ long *lplNoNotifyFlags); + + +void __RPC_STUB IMediaEventEx_GetNotifyFlags_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaEventEx_INTERFACE_DEFINED__ */ + + +#ifndef __IMediaPosition_INTERFACE_DEFINED__ +#define __IMediaPosition_INTERFACE_DEFINED__ + +/* interface IMediaPosition */ +/* [object][dual][oleautomation][helpstring][uuid] */ + + +DEFINE_GUID(IID_IMediaPosition,0x56a868b2,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868b2-0ad4-11ce-b03a-0020af0ba770") + IMediaPosition : public IDispatch + { + public: + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Duration( + /* [retval][out] */ REFTIME *plength) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_CurrentPosition( + /* [in] */ REFTIME llTime) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_CurrentPosition( + /* [retval][out] */ REFTIME *pllTime) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_StopTime( + /* [retval][out] */ REFTIME *pllTime) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_StopTime( + /* [in] */ REFTIME llTime) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PrerollTime( + /* [retval][out] */ REFTIME *pllTime) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_PrerollTime( + /* [in] */ REFTIME llTime) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Rate( + /* [in] */ double dRate) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Rate( + /* [retval][out] */ double *pdRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE CanSeekForward( + /* [retval][out] */ LONG *pCanSeekForward) = 0; + + virtual HRESULT STDMETHODCALLTYPE CanSeekBackward( + /* [retval][out] */ LONG *pCanSeekBackward) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaPositionVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaPosition * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaPosition * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaPosition * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IMediaPosition * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IMediaPosition * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IMediaPosition * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IMediaPosition * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Duration )( + IMediaPosition * This, + /* [retval][out] */ REFTIME *plength); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_CurrentPosition )( + IMediaPosition * This, + /* [in] */ REFTIME llTime); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_CurrentPosition )( + IMediaPosition * This, + /* [retval][out] */ REFTIME *pllTime); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_StopTime )( + IMediaPosition * This, + /* [retval][out] */ REFTIME *pllTime); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_StopTime )( + IMediaPosition * This, + /* [in] */ REFTIME llTime); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PrerollTime )( + IMediaPosition * This, + /* [retval][out] */ REFTIME *pllTime); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_PrerollTime )( + IMediaPosition * This, + /* [in] */ REFTIME llTime); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Rate )( + IMediaPosition * This, + /* [in] */ double dRate); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Rate )( + IMediaPosition * This, + /* [retval][out] */ double *pdRate); + + HRESULT ( STDMETHODCALLTYPE *CanSeekForward )( + IMediaPosition * This, + /* [retval][out] */ LONG *pCanSeekForward); + + HRESULT ( STDMETHODCALLTYPE *CanSeekBackward )( + IMediaPosition * This, + /* [retval][out] */ LONG *pCanSeekBackward); + + END_INTERFACE + } IMediaPositionVtbl; + + interface IMediaPosition + { + CONST_VTBL struct IMediaPositionVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaPosition_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaPosition_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaPosition_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaPosition_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IMediaPosition_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IMediaPosition_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IMediaPosition_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IMediaPosition_get_Duration(This,plength) \ + (This)->lpVtbl -> get_Duration(This,plength) + +#define IMediaPosition_put_CurrentPosition(This,llTime) \ + (This)->lpVtbl -> put_CurrentPosition(This,llTime) + +#define IMediaPosition_get_CurrentPosition(This,pllTime) \ + (This)->lpVtbl -> get_CurrentPosition(This,pllTime) + +#define IMediaPosition_get_StopTime(This,pllTime) \ + (This)->lpVtbl -> get_StopTime(This,pllTime) + +#define IMediaPosition_put_StopTime(This,llTime) \ + (This)->lpVtbl -> put_StopTime(This,llTime) + +#define IMediaPosition_get_PrerollTime(This,pllTime) \ + (This)->lpVtbl -> get_PrerollTime(This,pllTime) + +#define IMediaPosition_put_PrerollTime(This,llTime) \ + (This)->lpVtbl -> put_PrerollTime(This,llTime) + +#define IMediaPosition_put_Rate(This,dRate) \ + (This)->lpVtbl -> put_Rate(This,dRate) + +#define IMediaPosition_get_Rate(This,pdRate) \ + (This)->lpVtbl -> get_Rate(This,pdRate) + +#define IMediaPosition_CanSeekForward(This,pCanSeekForward) \ + (This)->lpVtbl -> CanSeekForward(This,pCanSeekForward) + +#define IMediaPosition_CanSeekBackward(This,pCanSeekBackward) \ + (This)->lpVtbl -> CanSeekBackward(This,pCanSeekBackward) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IMediaPosition_get_Duration_Proxy( + IMediaPosition * This, + /* [retval][out] */ REFTIME *plength); + + +void __RPC_STUB IMediaPosition_get_Duration_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IMediaPosition_put_CurrentPosition_Proxy( + IMediaPosition * This, + /* [in] */ REFTIME llTime); + + +void __RPC_STUB IMediaPosition_put_CurrentPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IMediaPosition_get_CurrentPosition_Proxy( + IMediaPosition * This, + /* [retval][out] */ REFTIME *pllTime); + + +void __RPC_STUB IMediaPosition_get_CurrentPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IMediaPosition_get_StopTime_Proxy( + IMediaPosition * This, + /* [retval][out] */ REFTIME *pllTime); + + +void __RPC_STUB IMediaPosition_get_StopTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IMediaPosition_put_StopTime_Proxy( + IMediaPosition * This, + /* [in] */ REFTIME llTime); + + +void __RPC_STUB IMediaPosition_put_StopTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IMediaPosition_get_PrerollTime_Proxy( + IMediaPosition * This, + /* [retval][out] */ REFTIME *pllTime); + + +void __RPC_STUB IMediaPosition_get_PrerollTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IMediaPosition_put_PrerollTime_Proxy( + IMediaPosition * This, + /* [in] */ REFTIME llTime); + + +void __RPC_STUB IMediaPosition_put_PrerollTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IMediaPosition_put_Rate_Proxy( + IMediaPosition * This, + /* [in] */ double dRate); + + +void __RPC_STUB IMediaPosition_put_Rate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IMediaPosition_get_Rate_Proxy( + IMediaPosition * This, + /* [retval][out] */ double *pdRate); + + +void __RPC_STUB IMediaPosition_get_Rate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaPosition_CanSeekForward_Proxy( + IMediaPosition * This, + /* [retval][out] */ LONG *pCanSeekForward); + + +void __RPC_STUB IMediaPosition_CanSeekForward_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaPosition_CanSeekBackward_Proxy( + IMediaPosition * This, + /* [retval][out] */ LONG *pCanSeekBackward); + + +void __RPC_STUB IMediaPosition_CanSeekBackward_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaPosition_INTERFACE_DEFINED__ */ + + +#ifndef __IBasicAudio_INTERFACE_DEFINED__ +#define __IBasicAudio_INTERFACE_DEFINED__ + +/* interface IBasicAudio */ +/* [object][dual][oleautomation][helpstring][uuid] */ + + +DEFINE_GUID(IID_IBasicAudio,0x56a868b3,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868b3-0ad4-11ce-b03a-0020af0ba770") + IBasicAudio : public IDispatch + { + public: + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Volume( + /* [in] */ long lVolume) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Volume( + /* [retval][out] */ long *plVolume) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Balance( + /* [in] */ long lBalance) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Balance( + /* [retval][out] */ long *plBalance) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBasicAudioVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBasicAudio * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBasicAudio * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBasicAudio * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IBasicAudio * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IBasicAudio * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IBasicAudio * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IBasicAudio * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Volume )( + IBasicAudio * This, + /* [in] */ long lVolume); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Volume )( + IBasicAudio * This, + /* [retval][out] */ long *plVolume); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Balance )( + IBasicAudio * This, + /* [in] */ long lBalance); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Balance )( + IBasicAudio * This, + /* [retval][out] */ long *plBalance); + + END_INTERFACE + } IBasicAudioVtbl; + + interface IBasicAudio + { + CONST_VTBL struct IBasicAudioVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBasicAudio_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBasicAudio_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBasicAudio_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBasicAudio_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IBasicAudio_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IBasicAudio_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IBasicAudio_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IBasicAudio_put_Volume(This,lVolume) \ + (This)->lpVtbl -> put_Volume(This,lVolume) + +#define IBasicAudio_get_Volume(This,plVolume) \ + (This)->lpVtbl -> get_Volume(This,plVolume) + +#define IBasicAudio_put_Balance(This,lBalance) \ + (This)->lpVtbl -> put_Balance(This,lBalance) + +#define IBasicAudio_get_Balance(This,plBalance) \ + (This)->lpVtbl -> get_Balance(This,plBalance) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IBasicAudio_put_Volume_Proxy( + IBasicAudio * This, + /* [in] */ long lVolume); + + +void __RPC_STUB IBasicAudio_put_Volume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IBasicAudio_get_Volume_Proxy( + IBasicAudio * This, + /* [retval][out] */ long *plVolume); + + +void __RPC_STUB IBasicAudio_get_Volume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IBasicAudio_put_Balance_Proxy( + IBasicAudio * This, + /* [in] */ long lBalance); + + +void __RPC_STUB IBasicAudio_put_Balance_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IBasicAudio_get_Balance_Proxy( + IBasicAudio * This, + /* [retval][out] */ long *plBalance); + + +void __RPC_STUB IBasicAudio_get_Balance_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBasicAudio_INTERFACE_DEFINED__ */ + + +#ifndef __IVideoWindow_INTERFACE_DEFINED__ +#define __IVideoWindow_INTERFACE_DEFINED__ + +/* interface IVideoWindow */ +/* [object][dual][oleautomation][helpstring][uuid] */ + + +DEFINE_GUID(IID_IVideoWindow,0x56a868b4,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868b4-0ad4-11ce-b03a-0020af0ba770") + IVideoWindow : public IDispatch + { + public: + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Caption( + /* [in] */ BSTR strCaption) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Caption( + /* [retval][out] */ BSTR *strCaption) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_WindowStyle( + /* [in] */ long WindowStyle) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_WindowStyle( + /* [retval][out] */ long *WindowStyle) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_WindowStyleEx( + /* [in] */ long WindowStyleEx) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_WindowStyleEx( + /* [retval][out] */ long *WindowStyleEx) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_AutoShow( + /* [in] */ long AutoShow) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_AutoShow( + /* [retval][out] */ long *AutoShow) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_WindowState( + /* [in] */ long WindowState) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_WindowState( + /* [retval][out] */ long *WindowState) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_BackgroundPalette( + /* [in] */ long BackgroundPalette) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_BackgroundPalette( + /* [retval][out] */ long *pBackgroundPalette) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Visible( + /* [in] */ long Visible) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Visible( + /* [retval][out] */ long *pVisible) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Left( + /* [in] */ long Left) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Left( + /* [retval][out] */ long *pLeft) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Width( + /* [in] */ long Width) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Width( + /* [retval][out] */ long *pWidth) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Top( + /* [in] */ long Top) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Top( + /* [retval][out] */ long *pTop) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Height( + /* [in] */ long Height) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Height( + /* [retval][out] */ long *pHeight) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Owner( + /* [in] */ OAHWND Owner) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Owner( + /* [retval][out] */ OAHWND *Owner) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_MessageDrain( + /* [in] */ OAHWND Drain) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_MessageDrain( + /* [retval][out] */ OAHWND *Drain) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_BorderColor( + /* [retval][out] */ long *Color) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_BorderColor( + /* [in] */ long Color) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_FullScreenMode( + /* [retval][out] */ long *FullScreenMode) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_FullScreenMode( + /* [in] */ long FullScreenMode) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetWindowForeground( + /* [in] */ long Focus) = 0; + + virtual HRESULT STDMETHODCALLTYPE NotifyOwnerMessage( + /* [in] */ OAHWND hwnd, + /* [in] */ long uMsg, + /* [in] */ LONG_PTR wParam, + /* [in] */ LONG_PTR lParam) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetWindowPosition( + /* [in] */ long Left, + /* [in] */ long Top, + /* [in] */ long Width, + /* [in] */ long Height) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetWindowPosition( + /* [out] */ long *pLeft, + /* [out] */ long *pTop, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMinIdealImageSize( + /* [out] */ long *pWidth, + /* [out] */ long *pHeight) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMaxIdealImageSize( + /* [out] */ long *pWidth, + /* [out] */ long *pHeight) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRestorePosition( + /* [out] */ long *pLeft, + /* [out] */ long *pTop, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight) = 0; + + virtual HRESULT STDMETHODCALLTYPE HideCursor( + /* [in] */ long HideCursor) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsCursorHidden( + /* [out] */ long *CursorHidden) = 0; + + }; + +#else /* C style interface */ + + typedef struct IVideoWindowVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IVideoWindow * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IVideoWindow * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IVideoWindow * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IVideoWindow * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IVideoWindow * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IVideoWindow * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IVideoWindow * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Caption )( + IVideoWindow * This, + /* [in] */ BSTR strCaption); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Caption )( + IVideoWindow * This, + /* [retval][out] */ BSTR *strCaption); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_WindowStyle )( + IVideoWindow * This, + /* [in] */ long WindowStyle); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_WindowStyle )( + IVideoWindow * This, + /* [retval][out] */ long *WindowStyle); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_WindowStyleEx )( + IVideoWindow * This, + /* [in] */ long WindowStyleEx); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_WindowStyleEx )( + IVideoWindow * This, + /* [retval][out] */ long *WindowStyleEx); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_AutoShow )( + IVideoWindow * This, + /* [in] */ long AutoShow); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AutoShow )( + IVideoWindow * This, + /* [retval][out] */ long *AutoShow); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_WindowState )( + IVideoWindow * This, + /* [in] */ long WindowState); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_WindowState )( + IVideoWindow * This, + /* [retval][out] */ long *WindowState); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_BackgroundPalette )( + IVideoWindow * This, + /* [in] */ long BackgroundPalette); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_BackgroundPalette )( + IVideoWindow * This, + /* [retval][out] */ long *pBackgroundPalette); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Visible )( + IVideoWindow * This, + /* [in] */ long Visible); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Visible )( + IVideoWindow * This, + /* [retval][out] */ long *pVisible); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Left )( + IVideoWindow * This, + /* [in] */ long Left); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Left )( + IVideoWindow * This, + /* [retval][out] */ long *pLeft); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Width )( + IVideoWindow * This, + /* [in] */ long Width); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Width )( + IVideoWindow * This, + /* [retval][out] */ long *pWidth); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Top )( + IVideoWindow * This, + /* [in] */ long Top); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Top )( + IVideoWindow * This, + /* [retval][out] */ long *pTop); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Height )( + IVideoWindow * This, + /* [in] */ long Height); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Height )( + IVideoWindow * This, + /* [retval][out] */ long *pHeight); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Owner )( + IVideoWindow * This, + /* [in] */ OAHWND Owner); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Owner )( + IVideoWindow * This, + /* [retval][out] */ OAHWND *Owner); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_MessageDrain )( + IVideoWindow * This, + /* [in] */ OAHWND Drain); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_MessageDrain )( + IVideoWindow * This, + /* [retval][out] */ OAHWND *Drain); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_BorderColor )( + IVideoWindow * This, + /* [retval][out] */ long *Color); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_BorderColor )( + IVideoWindow * This, + /* [in] */ long Color); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_FullScreenMode )( + IVideoWindow * This, + /* [retval][out] */ long *FullScreenMode); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_FullScreenMode )( + IVideoWindow * This, + /* [in] */ long FullScreenMode); + + HRESULT ( STDMETHODCALLTYPE *SetWindowForeground )( + IVideoWindow * This, + /* [in] */ long Focus); + + HRESULT ( STDMETHODCALLTYPE *NotifyOwnerMessage )( + IVideoWindow * This, + /* [in] */ OAHWND hwnd, + /* [in] */ long uMsg, + /* [in] */ LONG_PTR wParam, + /* [in] */ LONG_PTR lParam); + + HRESULT ( STDMETHODCALLTYPE *SetWindowPosition )( + IVideoWindow * This, + /* [in] */ long Left, + /* [in] */ long Top, + /* [in] */ long Width, + /* [in] */ long Height); + + HRESULT ( STDMETHODCALLTYPE *GetWindowPosition )( + IVideoWindow * This, + /* [out] */ long *pLeft, + /* [out] */ long *pTop, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + HRESULT ( STDMETHODCALLTYPE *GetMinIdealImageSize )( + IVideoWindow * This, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + HRESULT ( STDMETHODCALLTYPE *GetMaxIdealImageSize )( + IVideoWindow * This, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + HRESULT ( STDMETHODCALLTYPE *GetRestorePosition )( + IVideoWindow * This, + /* [out] */ long *pLeft, + /* [out] */ long *pTop, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + HRESULT ( STDMETHODCALLTYPE *HideCursor )( + IVideoWindow * This, + /* [in] */ long HideCursor); + + HRESULT ( STDMETHODCALLTYPE *IsCursorHidden )( + IVideoWindow * This, + /* [out] */ long *CursorHidden); + + END_INTERFACE + } IVideoWindowVtbl; + + interface IVideoWindow + { + CONST_VTBL struct IVideoWindowVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IVideoWindow_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IVideoWindow_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IVideoWindow_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IVideoWindow_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IVideoWindow_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IVideoWindow_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IVideoWindow_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IVideoWindow_put_Caption(This,strCaption) \ + (This)->lpVtbl -> put_Caption(This,strCaption) + +#define IVideoWindow_get_Caption(This,strCaption) \ + (This)->lpVtbl -> get_Caption(This,strCaption) + +#define IVideoWindow_put_WindowStyle(This,WindowStyle) \ + (This)->lpVtbl -> put_WindowStyle(This,WindowStyle) + +#define IVideoWindow_get_WindowStyle(This,WindowStyle) \ + (This)->lpVtbl -> get_WindowStyle(This,WindowStyle) + +#define IVideoWindow_put_WindowStyleEx(This,WindowStyleEx) \ + (This)->lpVtbl -> put_WindowStyleEx(This,WindowStyleEx) + +#define IVideoWindow_get_WindowStyleEx(This,WindowStyleEx) \ + (This)->lpVtbl -> get_WindowStyleEx(This,WindowStyleEx) + +#define IVideoWindow_put_AutoShow(This,AutoShow) \ + (This)->lpVtbl -> put_AutoShow(This,AutoShow) + +#define IVideoWindow_get_AutoShow(This,AutoShow) \ + (This)->lpVtbl -> get_AutoShow(This,AutoShow) + +#define IVideoWindow_put_WindowState(This,WindowState) \ + (This)->lpVtbl -> put_WindowState(This,WindowState) + +#define IVideoWindow_get_WindowState(This,WindowState) \ + (This)->lpVtbl -> get_WindowState(This,WindowState) + +#define IVideoWindow_put_BackgroundPalette(This,BackgroundPalette) \ + (This)->lpVtbl -> put_BackgroundPalette(This,BackgroundPalette) + +#define IVideoWindow_get_BackgroundPalette(This,pBackgroundPalette) \ + (This)->lpVtbl -> get_BackgroundPalette(This,pBackgroundPalette) + +#define IVideoWindow_put_Visible(This,Visible) \ + (This)->lpVtbl -> put_Visible(This,Visible) + +#define IVideoWindow_get_Visible(This,pVisible) \ + (This)->lpVtbl -> get_Visible(This,pVisible) + +#define IVideoWindow_put_Left(This,Left) \ + (This)->lpVtbl -> put_Left(This,Left) + +#define IVideoWindow_get_Left(This,pLeft) \ + (This)->lpVtbl -> get_Left(This,pLeft) + +#define IVideoWindow_put_Width(This,Width) \ + (This)->lpVtbl -> put_Width(This,Width) + +#define IVideoWindow_get_Width(This,pWidth) \ + (This)->lpVtbl -> get_Width(This,pWidth) + +#define IVideoWindow_put_Top(This,Top) \ + (This)->lpVtbl -> put_Top(This,Top) + +#define IVideoWindow_get_Top(This,pTop) \ + (This)->lpVtbl -> get_Top(This,pTop) + +#define IVideoWindow_put_Height(This,Height) \ + (This)->lpVtbl -> put_Height(This,Height) + +#define IVideoWindow_get_Height(This,pHeight) \ + (This)->lpVtbl -> get_Height(This,pHeight) + +#define IVideoWindow_put_Owner(This,Owner) \ + (This)->lpVtbl -> put_Owner(This,Owner) + +#define IVideoWindow_get_Owner(This,Owner) \ + (This)->lpVtbl -> get_Owner(This,Owner) + +#define IVideoWindow_put_MessageDrain(This,Drain) \ + (This)->lpVtbl -> put_MessageDrain(This,Drain) + +#define IVideoWindow_get_MessageDrain(This,Drain) \ + (This)->lpVtbl -> get_MessageDrain(This,Drain) + +#define IVideoWindow_get_BorderColor(This,Color) \ + (This)->lpVtbl -> get_BorderColor(This,Color) + +#define IVideoWindow_put_BorderColor(This,Color) \ + (This)->lpVtbl -> put_BorderColor(This,Color) + +#define IVideoWindow_get_FullScreenMode(This,FullScreenMode) \ + (This)->lpVtbl -> get_FullScreenMode(This,FullScreenMode) + +#define IVideoWindow_put_FullScreenMode(This,FullScreenMode) \ + (This)->lpVtbl -> put_FullScreenMode(This,FullScreenMode) + +#define IVideoWindow_SetWindowForeground(This,Focus) \ + (This)->lpVtbl -> SetWindowForeground(This,Focus) + +#define IVideoWindow_NotifyOwnerMessage(This,hwnd,uMsg,wParam,lParam) \ + (This)->lpVtbl -> NotifyOwnerMessage(This,hwnd,uMsg,wParam,lParam) + +#define IVideoWindow_SetWindowPosition(This,Left,Top,Width,Height) \ + (This)->lpVtbl -> SetWindowPosition(This,Left,Top,Width,Height) + +#define IVideoWindow_GetWindowPosition(This,pLeft,pTop,pWidth,pHeight) \ + (This)->lpVtbl -> GetWindowPosition(This,pLeft,pTop,pWidth,pHeight) + +#define IVideoWindow_GetMinIdealImageSize(This,pWidth,pHeight) \ + (This)->lpVtbl -> GetMinIdealImageSize(This,pWidth,pHeight) + +#define IVideoWindow_GetMaxIdealImageSize(This,pWidth,pHeight) \ + (This)->lpVtbl -> GetMaxIdealImageSize(This,pWidth,pHeight) + +#define IVideoWindow_GetRestorePosition(This,pLeft,pTop,pWidth,pHeight) \ + (This)->lpVtbl -> GetRestorePosition(This,pLeft,pTop,pWidth,pHeight) + +#define IVideoWindow_HideCursor(This,HideCursor) \ + (This)->lpVtbl -> HideCursor(This,HideCursor) + +#define IVideoWindow_IsCursorHidden(This,CursorHidden) \ + (This)->lpVtbl -> IsCursorHidden(This,CursorHidden) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IVideoWindow_put_Caption_Proxy( + IVideoWindow * This, + /* [in] */ BSTR strCaption); + + +void __RPC_STUB IVideoWindow_put_Caption_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IVideoWindow_get_Caption_Proxy( + IVideoWindow * This, + /* [retval][out] */ BSTR *strCaption); + + +void __RPC_STUB IVideoWindow_get_Caption_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IVideoWindow_put_WindowStyle_Proxy( + IVideoWindow * This, + /* [in] */ long WindowStyle); + + +void __RPC_STUB IVideoWindow_put_WindowStyle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IVideoWindow_get_WindowStyle_Proxy( + IVideoWindow * This, + /* [retval][out] */ long *WindowStyle); + + +void __RPC_STUB IVideoWindow_get_WindowStyle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IVideoWindow_put_WindowStyleEx_Proxy( + IVideoWindow * This, + /* [in] */ long WindowStyleEx); + + +void __RPC_STUB IVideoWindow_put_WindowStyleEx_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IVideoWindow_get_WindowStyleEx_Proxy( + IVideoWindow * This, + /* [retval][out] */ long *WindowStyleEx); + + +void __RPC_STUB IVideoWindow_get_WindowStyleEx_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IVideoWindow_put_AutoShow_Proxy( + IVideoWindow * This, + /* [in] */ long AutoShow); + + +void __RPC_STUB IVideoWindow_put_AutoShow_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IVideoWindow_get_AutoShow_Proxy( + IVideoWindow * This, + /* [retval][out] */ long *AutoShow); + + +void __RPC_STUB IVideoWindow_get_AutoShow_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IVideoWindow_put_WindowState_Proxy( + IVideoWindow * This, + /* [in] */ long WindowState); + + +void __RPC_STUB IVideoWindow_put_WindowState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IVideoWindow_get_WindowState_Proxy( + IVideoWindow * This, + /* [retval][out] */ long *WindowState); + + +void __RPC_STUB IVideoWindow_get_WindowState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IVideoWindow_put_BackgroundPalette_Proxy( + IVideoWindow * This, + /* [in] */ long BackgroundPalette); + + +void __RPC_STUB IVideoWindow_put_BackgroundPalette_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IVideoWindow_get_BackgroundPalette_Proxy( + IVideoWindow * This, + /* [retval][out] */ long *pBackgroundPalette); + + +void __RPC_STUB IVideoWindow_get_BackgroundPalette_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IVideoWindow_put_Visible_Proxy( + IVideoWindow * This, + /* [in] */ long Visible); + + +void __RPC_STUB IVideoWindow_put_Visible_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IVideoWindow_get_Visible_Proxy( + IVideoWindow * This, + /* [retval][out] */ long *pVisible); + + +void __RPC_STUB IVideoWindow_get_Visible_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IVideoWindow_put_Left_Proxy( + IVideoWindow * This, + /* [in] */ long Left); + + +void __RPC_STUB IVideoWindow_put_Left_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IVideoWindow_get_Left_Proxy( + IVideoWindow * This, + /* [retval][out] */ long *pLeft); + + +void __RPC_STUB IVideoWindow_get_Left_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IVideoWindow_put_Width_Proxy( + IVideoWindow * This, + /* [in] */ long Width); + + +void __RPC_STUB IVideoWindow_put_Width_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IVideoWindow_get_Width_Proxy( + IVideoWindow * This, + /* [retval][out] */ long *pWidth); + + +void __RPC_STUB IVideoWindow_get_Width_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IVideoWindow_put_Top_Proxy( + IVideoWindow * This, + /* [in] */ long Top); + + +void __RPC_STUB IVideoWindow_put_Top_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IVideoWindow_get_Top_Proxy( + IVideoWindow * This, + /* [retval][out] */ long *pTop); + + +void __RPC_STUB IVideoWindow_get_Top_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IVideoWindow_put_Height_Proxy( + IVideoWindow * This, + /* [in] */ long Height); + + +void __RPC_STUB IVideoWindow_put_Height_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IVideoWindow_get_Height_Proxy( + IVideoWindow * This, + /* [retval][out] */ long *pHeight); + + +void __RPC_STUB IVideoWindow_get_Height_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IVideoWindow_put_Owner_Proxy( + IVideoWindow * This, + /* [in] */ OAHWND Owner); + + +void __RPC_STUB IVideoWindow_put_Owner_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IVideoWindow_get_Owner_Proxy( + IVideoWindow * This, + /* [retval][out] */ OAHWND *Owner); + + +void __RPC_STUB IVideoWindow_get_Owner_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IVideoWindow_put_MessageDrain_Proxy( + IVideoWindow * This, + /* [in] */ OAHWND Drain); + + +void __RPC_STUB IVideoWindow_put_MessageDrain_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IVideoWindow_get_MessageDrain_Proxy( + IVideoWindow * This, + /* [retval][out] */ OAHWND *Drain); + + +void __RPC_STUB IVideoWindow_get_MessageDrain_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IVideoWindow_get_BorderColor_Proxy( + IVideoWindow * This, + /* [retval][out] */ long *Color); + + +void __RPC_STUB IVideoWindow_get_BorderColor_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IVideoWindow_put_BorderColor_Proxy( + IVideoWindow * This, + /* [in] */ long Color); + + +void __RPC_STUB IVideoWindow_put_BorderColor_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IVideoWindow_get_FullScreenMode_Proxy( + IVideoWindow * This, + /* [retval][out] */ long *FullScreenMode); + + +void __RPC_STUB IVideoWindow_get_FullScreenMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IVideoWindow_put_FullScreenMode_Proxy( + IVideoWindow * This, + /* [in] */ long FullScreenMode); + + +void __RPC_STUB IVideoWindow_put_FullScreenMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IVideoWindow_SetWindowForeground_Proxy( + IVideoWindow * This, + /* [in] */ long Focus); + + +void __RPC_STUB IVideoWindow_SetWindowForeground_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IVideoWindow_NotifyOwnerMessage_Proxy( + IVideoWindow * This, + /* [in] */ OAHWND hwnd, + /* [in] */ long uMsg, + /* [in] */ LONG_PTR wParam, + /* [in] */ LONG_PTR lParam); + + +void __RPC_STUB IVideoWindow_NotifyOwnerMessage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IVideoWindow_SetWindowPosition_Proxy( + IVideoWindow * This, + /* [in] */ long Left, + /* [in] */ long Top, + /* [in] */ long Width, + /* [in] */ long Height); + + +void __RPC_STUB IVideoWindow_SetWindowPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IVideoWindow_GetWindowPosition_Proxy( + IVideoWindow * This, + /* [out] */ long *pLeft, + /* [out] */ long *pTop, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + +void __RPC_STUB IVideoWindow_GetWindowPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IVideoWindow_GetMinIdealImageSize_Proxy( + IVideoWindow * This, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + +void __RPC_STUB IVideoWindow_GetMinIdealImageSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IVideoWindow_GetMaxIdealImageSize_Proxy( + IVideoWindow * This, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + +void __RPC_STUB IVideoWindow_GetMaxIdealImageSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IVideoWindow_GetRestorePosition_Proxy( + IVideoWindow * This, + /* [out] */ long *pLeft, + /* [out] */ long *pTop, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + +void __RPC_STUB IVideoWindow_GetRestorePosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IVideoWindow_HideCursor_Proxy( + IVideoWindow * This, + /* [in] */ long HideCursor); + + +void __RPC_STUB IVideoWindow_HideCursor_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IVideoWindow_IsCursorHidden_Proxy( + IVideoWindow * This, + /* [out] */ long *CursorHidden); + + +void __RPC_STUB IVideoWindow_IsCursorHidden_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IVideoWindow_INTERFACE_DEFINED__ */ + + +#ifndef __IBasicVideo_INTERFACE_DEFINED__ +#define __IBasicVideo_INTERFACE_DEFINED__ + +/* interface IBasicVideo */ +/* [object][dual][oleautomation][helpstring][uuid] */ + + +DEFINE_GUID(IID_IBasicVideo,0x56a868b5,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868b5-0ad4-11ce-b03a-0020af0ba770") + IBasicVideo : public IDispatch + { + public: + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_AvgTimePerFrame( + /* [retval][out] */ REFTIME *pAvgTimePerFrame) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_BitRate( + /* [retval][out] */ long *pBitRate) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_BitErrorRate( + /* [retval][out] */ long *pBitErrorRate) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_VideoWidth( + /* [retval][out] */ long *pVideoWidth) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_VideoHeight( + /* [retval][out] */ long *pVideoHeight) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_SourceLeft( + /* [in] */ long SourceLeft) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_SourceLeft( + /* [retval][out] */ long *pSourceLeft) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_SourceWidth( + /* [in] */ long SourceWidth) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_SourceWidth( + /* [retval][out] */ long *pSourceWidth) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_SourceTop( + /* [in] */ long SourceTop) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_SourceTop( + /* [retval][out] */ long *pSourceTop) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_SourceHeight( + /* [in] */ long SourceHeight) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_SourceHeight( + /* [retval][out] */ long *pSourceHeight) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_DestinationLeft( + /* [in] */ long DestinationLeft) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_DestinationLeft( + /* [retval][out] */ long *pDestinationLeft) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_DestinationWidth( + /* [in] */ long DestinationWidth) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_DestinationWidth( + /* [retval][out] */ long *pDestinationWidth) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_DestinationTop( + /* [in] */ long DestinationTop) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_DestinationTop( + /* [retval][out] */ long *pDestinationTop) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_DestinationHeight( + /* [in] */ long DestinationHeight) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_DestinationHeight( + /* [retval][out] */ long *pDestinationHeight) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSourcePosition( + /* [in] */ long Left, + /* [in] */ long Top, + /* [in] */ long Width, + /* [in] */ long Height) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSourcePosition( + /* [out] */ long *pLeft, + /* [out] */ long *pTop, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDefaultSourcePosition( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDestinationPosition( + /* [in] */ long Left, + /* [in] */ long Top, + /* [in] */ long Width, + /* [in] */ long Height) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDestinationPosition( + /* [out] */ long *pLeft, + /* [out] */ long *pTop, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDefaultDestinationPosition( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVideoSize( + /* [out] */ long *pWidth, + /* [out] */ long *pHeight) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVideoPaletteEntries( + /* [in] */ long StartIndex, + /* [in] */ long Entries, + /* [out] */ long *pRetrieved, + /* [out] */ long *pPalette) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentImage( + /* [out][in] */ long *pBufferSize, + /* [out] */ long *pDIBImage) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsUsingDefaultSource( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsUsingDefaultDestination( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBasicVideoVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBasicVideo * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBasicVideo * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBasicVideo * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IBasicVideo * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IBasicVideo * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IBasicVideo * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IBasicVideo * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AvgTimePerFrame )( + IBasicVideo * This, + /* [retval][out] */ REFTIME *pAvgTimePerFrame); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_BitRate )( + IBasicVideo * This, + /* [retval][out] */ long *pBitRate); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_BitErrorRate )( + IBasicVideo * This, + /* [retval][out] */ long *pBitErrorRate); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_VideoWidth )( + IBasicVideo * This, + /* [retval][out] */ long *pVideoWidth); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_VideoHeight )( + IBasicVideo * This, + /* [retval][out] */ long *pVideoHeight); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_SourceLeft )( + IBasicVideo * This, + /* [in] */ long SourceLeft); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_SourceLeft )( + IBasicVideo * This, + /* [retval][out] */ long *pSourceLeft); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_SourceWidth )( + IBasicVideo * This, + /* [in] */ long SourceWidth); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_SourceWidth )( + IBasicVideo * This, + /* [retval][out] */ long *pSourceWidth); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_SourceTop )( + IBasicVideo * This, + /* [in] */ long SourceTop); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_SourceTop )( + IBasicVideo * This, + /* [retval][out] */ long *pSourceTop); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_SourceHeight )( + IBasicVideo * This, + /* [in] */ long SourceHeight); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_SourceHeight )( + IBasicVideo * This, + /* [retval][out] */ long *pSourceHeight); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_DestinationLeft )( + IBasicVideo * This, + /* [in] */ long DestinationLeft); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DestinationLeft )( + IBasicVideo * This, + /* [retval][out] */ long *pDestinationLeft); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_DestinationWidth )( + IBasicVideo * This, + /* [in] */ long DestinationWidth); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DestinationWidth )( + IBasicVideo * This, + /* [retval][out] */ long *pDestinationWidth); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_DestinationTop )( + IBasicVideo * This, + /* [in] */ long DestinationTop); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DestinationTop )( + IBasicVideo * This, + /* [retval][out] */ long *pDestinationTop); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_DestinationHeight )( + IBasicVideo * This, + /* [in] */ long DestinationHeight); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DestinationHeight )( + IBasicVideo * This, + /* [retval][out] */ long *pDestinationHeight); + + HRESULT ( STDMETHODCALLTYPE *SetSourcePosition )( + IBasicVideo * This, + /* [in] */ long Left, + /* [in] */ long Top, + /* [in] */ long Width, + /* [in] */ long Height); + + HRESULT ( STDMETHODCALLTYPE *GetSourcePosition )( + IBasicVideo * This, + /* [out] */ long *pLeft, + /* [out] */ long *pTop, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + HRESULT ( STDMETHODCALLTYPE *SetDefaultSourcePosition )( + IBasicVideo * This); + + HRESULT ( STDMETHODCALLTYPE *SetDestinationPosition )( + IBasicVideo * This, + /* [in] */ long Left, + /* [in] */ long Top, + /* [in] */ long Width, + /* [in] */ long Height); + + HRESULT ( STDMETHODCALLTYPE *GetDestinationPosition )( + IBasicVideo * This, + /* [out] */ long *pLeft, + /* [out] */ long *pTop, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + HRESULT ( STDMETHODCALLTYPE *SetDefaultDestinationPosition )( + IBasicVideo * This); + + HRESULT ( STDMETHODCALLTYPE *GetVideoSize )( + IBasicVideo * This, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + HRESULT ( STDMETHODCALLTYPE *GetVideoPaletteEntries )( + IBasicVideo * This, + /* [in] */ long StartIndex, + /* [in] */ long Entries, + /* [out] */ long *pRetrieved, + /* [out] */ long *pPalette); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentImage )( + IBasicVideo * This, + /* [out][in] */ long *pBufferSize, + /* [out] */ long *pDIBImage); + + HRESULT ( STDMETHODCALLTYPE *IsUsingDefaultSource )( + IBasicVideo * This); + + HRESULT ( STDMETHODCALLTYPE *IsUsingDefaultDestination )( + IBasicVideo * This); + + END_INTERFACE + } IBasicVideoVtbl; + + interface IBasicVideo + { + CONST_VTBL struct IBasicVideoVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBasicVideo_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBasicVideo_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBasicVideo_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBasicVideo_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IBasicVideo_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IBasicVideo_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IBasicVideo_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IBasicVideo_get_AvgTimePerFrame(This,pAvgTimePerFrame) \ + (This)->lpVtbl -> get_AvgTimePerFrame(This,pAvgTimePerFrame) + +#define IBasicVideo_get_BitRate(This,pBitRate) \ + (This)->lpVtbl -> get_BitRate(This,pBitRate) + +#define IBasicVideo_get_BitErrorRate(This,pBitErrorRate) \ + (This)->lpVtbl -> get_BitErrorRate(This,pBitErrorRate) + +#define IBasicVideo_get_VideoWidth(This,pVideoWidth) \ + (This)->lpVtbl -> get_VideoWidth(This,pVideoWidth) + +#define IBasicVideo_get_VideoHeight(This,pVideoHeight) \ + (This)->lpVtbl -> get_VideoHeight(This,pVideoHeight) + +#define IBasicVideo_put_SourceLeft(This,SourceLeft) \ + (This)->lpVtbl -> put_SourceLeft(This,SourceLeft) + +#define IBasicVideo_get_SourceLeft(This,pSourceLeft) \ + (This)->lpVtbl -> get_SourceLeft(This,pSourceLeft) + +#define IBasicVideo_put_SourceWidth(This,SourceWidth) \ + (This)->lpVtbl -> put_SourceWidth(This,SourceWidth) + +#define IBasicVideo_get_SourceWidth(This,pSourceWidth) \ + (This)->lpVtbl -> get_SourceWidth(This,pSourceWidth) + +#define IBasicVideo_put_SourceTop(This,SourceTop) \ + (This)->lpVtbl -> put_SourceTop(This,SourceTop) + +#define IBasicVideo_get_SourceTop(This,pSourceTop) \ + (This)->lpVtbl -> get_SourceTop(This,pSourceTop) + +#define IBasicVideo_put_SourceHeight(This,SourceHeight) \ + (This)->lpVtbl -> put_SourceHeight(This,SourceHeight) + +#define IBasicVideo_get_SourceHeight(This,pSourceHeight) \ + (This)->lpVtbl -> get_SourceHeight(This,pSourceHeight) + +#define IBasicVideo_put_DestinationLeft(This,DestinationLeft) \ + (This)->lpVtbl -> put_DestinationLeft(This,DestinationLeft) + +#define IBasicVideo_get_DestinationLeft(This,pDestinationLeft) \ + (This)->lpVtbl -> get_DestinationLeft(This,pDestinationLeft) + +#define IBasicVideo_put_DestinationWidth(This,DestinationWidth) \ + (This)->lpVtbl -> put_DestinationWidth(This,DestinationWidth) + +#define IBasicVideo_get_DestinationWidth(This,pDestinationWidth) \ + (This)->lpVtbl -> get_DestinationWidth(This,pDestinationWidth) + +#define IBasicVideo_put_DestinationTop(This,DestinationTop) \ + (This)->lpVtbl -> put_DestinationTop(This,DestinationTop) + +#define IBasicVideo_get_DestinationTop(This,pDestinationTop) \ + (This)->lpVtbl -> get_DestinationTop(This,pDestinationTop) + +#define IBasicVideo_put_DestinationHeight(This,DestinationHeight) \ + (This)->lpVtbl -> put_DestinationHeight(This,DestinationHeight) + +#define IBasicVideo_get_DestinationHeight(This,pDestinationHeight) \ + (This)->lpVtbl -> get_DestinationHeight(This,pDestinationHeight) + +#define IBasicVideo_SetSourcePosition(This,Left,Top,Width,Height) \ + (This)->lpVtbl -> SetSourcePosition(This,Left,Top,Width,Height) + +#define IBasicVideo_GetSourcePosition(This,pLeft,pTop,pWidth,pHeight) \ + (This)->lpVtbl -> GetSourcePosition(This,pLeft,pTop,pWidth,pHeight) + +#define IBasicVideo_SetDefaultSourcePosition(This) \ + (This)->lpVtbl -> SetDefaultSourcePosition(This) + +#define IBasicVideo_SetDestinationPosition(This,Left,Top,Width,Height) \ + (This)->lpVtbl -> SetDestinationPosition(This,Left,Top,Width,Height) + +#define IBasicVideo_GetDestinationPosition(This,pLeft,pTop,pWidth,pHeight) \ + (This)->lpVtbl -> GetDestinationPosition(This,pLeft,pTop,pWidth,pHeight) + +#define IBasicVideo_SetDefaultDestinationPosition(This) \ + (This)->lpVtbl -> SetDefaultDestinationPosition(This) + +#define IBasicVideo_GetVideoSize(This,pWidth,pHeight) \ + (This)->lpVtbl -> GetVideoSize(This,pWidth,pHeight) + +#define IBasicVideo_GetVideoPaletteEntries(This,StartIndex,Entries,pRetrieved,pPalette) \ + (This)->lpVtbl -> GetVideoPaletteEntries(This,StartIndex,Entries,pRetrieved,pPalette) + +#define IBasicVideo_GetCurrentImage(This,pBufferSize,pDIBImage) \ + (This)->lpVtbl -> GetCurrentImage(This,pBufferSize,pDIBImage) + +#define IBasicVideo_IsUsingDefaultSource(This) \ + (This)->lpVtbl -> IsUsingDefaultSource(This) + +#define IBasicVideo_IsUsingDefaultDestination(This) \ + (This)->lpVtbl -> IsUsingDefaultDestination(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IBasicVideo_get_AvgTimePerFrame_Proxy( + IBasicVideo * This, + /* [retval][out] */ REFTIME *pAvgTimePerFrame); + + +void __RPC_STUB IBasicVideo_get_AvgTimePerFrame_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IBasicVideo_get_BitRate_Proxy( + IBasicVideo * This, + /* [retval][out] */ long *pBitRate); + + +void __RPC_STUB IBasicVideo_get_BitRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IBasicVideo_get_BitErrorRate_Proxy( + IBasicVideo * This, + /* [retval][out] */ long *pBitErrorRate); + + +void __RPC_STUB IBasicVideo_get_BitErrorRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IBasicVideo_get_VideoWidth_Proxy( + IBasicVideo * This, + /* [retval][out] */ long *pVideoWidth); + + +void __RPC_STUB IBasicVideo_get_VideoWidth_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IBasicVideo_get_VideoHeight_Proxy( + IBasicVideo * This, + /* [retval][out] */ long *pVideoHeight); + + +void __RPC_STUB IBasicVideo_get_VideoHeight_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IBasicVideo_put_SourceLeft_Proxy( + IBasicVideo * This, + /* [in] */ long SourceLeft); + + +void __RPC_STUB IBasicVideo_put_SourceLeft_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IBasicVideo_get_SourceLeft_Proxy( + IBasicVideo * This, + /* [retval][out] */ long *pSourceLeft); + + +void __RPC_STUB IBasicVideo_get_SourceLeft_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IBasicVideo_put_SourceWidth_Proxy( + IBasicVideo * This, + /* [in] */ long SourceWidth); + + +void __RPC_STUB IBasicVideo_put_SourceWidth_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IBasicVideo_get_SourceWidth_Proxy( + IBasicVideo * This, + /* [retval][out] */ long *pSourceWidth); + + +void __RPC_STUB IBasicVideo_get_SourceWidth_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IBasicVideo_put_SourceTop_Proxy( + IBasicVideo * This, + /* [in] */ long SourceTop); + + +void __RPC_STUB IBasicVideo_put_SourceTop_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IBasicVideo_get_SourceTop_Proxy( + IBasicVideo * This, + /* [retval][out] */ long *pSourceTop); + + +void __RPC_STUB IBasicVideo_get_SourceTop_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IBasicVideo_put_SourceHeight_Proxy( + IBasicVideo * This, + /* [in] */ long SourceHeight); + + +void __RPC_STUB IBasicVideo_put_SourceHeight_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IBasicVideo_get_SourceHeight_Proxy( + IBasicVideo * This, + /* [retval][out] */ long *pSourceHeight); + + +void __RPC_STUB IBasicVideo_get_SourceHeight_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IBasicVideo_put_DestinationLeft_Proxy( + IBasicVideo * This, + /* [in] */ long DestinationLeft); + + +void __RPC_STUB IBasicVideo_put_DestinationLeft_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IBasicVideo_get_DestinationLeft_Proxy( + IBasicVideo * This, + /* [retval][out] */ long *pDestinationLeft); + + +void __RPC_STUB IBasicVideo_get_DestinationLeft_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IBasicVideo_put_DestinationWidth_Proxy( + IBasicVideo * This, + /* [in] */ long DestinationWidth); + + +void __RPC_STUB IBasicVideo_put_DestinationWidth_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IBasicVideo_get_DestinationWidth_Proxy( + IBasicVideo * This, + /* [retval][out] */ long *pDestinationWidth); + + +void __RPC_STUB IBasicVideo_get_DestinationWidth_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IBasicVideo_put_DestinationTop_Proxy( + IBasicVideo * This, + /* [in] */ long DestinationTop); + + +void __RPC_STUB IBasicVideo_put_DestinationTop_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IBasicVideo_get_DestinationTop_Proxy( + IBasicVideo * This, + /* [retval][out] */ long *pDestinationTop); + + +void __RPC_STUB IBasicVideo_get_DestinationTop_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IBasicVideo_put_DestinationHeight_Proxy( + IBasicVideo * This, + /* [in] */ long DestinationHeight); + + +void __RPC_STUB IBasicVideo_put_DestinationHeight_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IBasicVideo_get_DestinationHeight_Proxy( + IBasicVideo * This, + /* [retval][out] */ long *pDestinationHeight); + + +void __RPC_STUB IBasicVideo_get_DestinationHeight_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBasicVideo_SetSourcePosition_Proxy( + IBasicVideo * This, + /* [in] */ long Left, + /* [in] */ long Top, + /* [in] */ long Width, + /* [in] */ long Height); + + +void __RPC_STUB IBasicVideo_SetSourcePosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBasicVideo_GetSourcePosition_Proxy( + IBasicVideo * This, + /* [out] */ long *pLeft, + /* [out] */ long *pTop, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + +void __RPC_STUB IBasicVideo_GetSourcePosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBasicVideo_SetDefaultSourcePosition_Proxy( + IBasicVideo * This); + + +void __RPC_STUB IBasicVideo_SetDefaultSourcePosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBasicVideo_SetDestinationPosition_Proxy( + IBasicVideo * This, + /* [in] */ long Left, + /* [in] */ long Top, + /* [in] */ long Width, + /* [in] */ long Height); + + +void __RPC_STUB IBasicVideo_SetDestinationPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBasicVideo_GetDestinationPosition_Proxy( + IBasicVideo * This, + /* [out] */ long *pLeft, + /* [out] */ long *pTop, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + +void __RPC_STUB IBasicVideo_GetDestinationPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBasicVideo_SetDefaultDestinationPosition_Proxy( + IBasicVideo * This); + + +void __RPC_STUB IBasicVideo_SetDefaultDestinationPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBasicVideo_GetVideoSize_Proxy( + IBasicVideo * This, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + +void __RPC_STUB IBasicVideo_GetVideoSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBasicVideo_GetVideoPaletteEntries_Proxy( + IBasicVideo * This, + /* [in] */ long StartIndex, + /* [in] */ long Entries, + /* [out] */ long *pRetrieved, + /* [out] */ long *pPalette); + + +void __RPC_STUB IBasicVideo_GetVideoPaletteEntries_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBasicVideo_GetCurrentImage_Proxy( + IBasicVideo * This, + /* [out][in] */ long *pBufferSize, + /* [out] */ long *pDIBImage); + + +void __RPC_STUB IBasicVideo_GetCurrentImage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBasicVideo_IsUsingDefaultSource_Proxy( + IBasicVideo * This); + + +void __RPC_STUB IBasicVideo_IsUsingDefaultSource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBasicVideo_IsUsingDefaultDestination_Proxy( + IBasicVideo * This); + + +void __RPC_STUB IBasicVideo_IsUsingDefaultDestination_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBasicVideo_INTERFACE_DEFINED__ */ + + +#ifndef __IBasicVideo2_INTERFACE_DEFINED__ +#define __IBasicVideo2_INTERFACE_DEFINED__ + +/* interface IBasicVideo2 */ +/* [object][helpstring][uuid] */ + + +DEFINE_GUID(IID_IBasicVideo2,0x329bb360,0xf6ea,0x11d1,0x90,0x38,0x00,0xa0,0xc9,0x69,0x72,0x98); + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("329bb360-f6ea-11d1-9038-00a0c9697298") + IBasicVideo2 : public IBasicVideo + { + public: + virtual HRESULT STDMETHODCALLTYPE GetPreferredAspectRatio( + /* [out] */ long *plAspectX, + /* [out] */ long *plAspectY) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBasicVideo2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBasicVideo2 * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBasicVideo2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBasicVideo2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IBasicVideo2 * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IBasicVideo2 * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IBasicVideo2 * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IBasicVideo2 * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_AvgTimePerFrame )( + IBasicVideo2 * This, + /* [retval][out] */ REFTIME *pAvgTimePerFrame); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_BitRate )( + IBasicVideo2 * This, + /* [retval][out] */ long *pBitRate); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_BitErrorRate )( + IBasicVideo2 * This, + /* [retval][out] */ long *pBitErrorRate); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_VideoWidth )( + IBasicVideo2 * This, + /* [retval][out] */ long *pVideoWidth); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_VideoHeight )( + IBasicVideo2 * This, + /* [retval][out] */ long *pVideoHeight); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_SourceLeft )( + IBasicVideo2 * This, + /* [in] */ long SourceLeft); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_SourceLeft )( + IBasicVideo2 * This, + /* [retval][out] */ long *pSourceLeft); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_SourceWidth )( + IBasicVideo2 * This, + /* [in] */ long SourceWidth); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_SourceWidth )( + IBasicVideo2 * This, + /* [retval][out] */ long *pSourceWidth); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_SourceTop )( + IBasicVideo2 * This, + /* [in] */ long SourceTop); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_SourceTop )( + IBasicVideo2 * This, + /* [retval][out] */ long *pSourceTop); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_SourceHeight )( + IBasicVideo2 * This, + /* [in] */ long SourceHeight); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_SourceHeight )( + IBasicVideo2 * This, + /* [retval][out] */ long *pSourceHeight); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_DestinationLeft )( + IBasicVideo2 * This, + /* [in] */ long DestinationLeft); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DestinationLeft )( + IBasicVideo2 * This, + /* [retval][out] */ long *pDestinationLeft); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_DestinationWidth )( + IBasicVideo2 * This, + /* [in] */ long DestinationWidth); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DestinationWidth )( + IBasicVideo2 * This, + /* [retval][out] */ long *pDestinationWidth); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_DestinationTop )( + IBasicVideo2 * This, + /* [in] */ long DestinationTop); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DestinationTop )( + IBasicVideo2 * This, + /* [retval][out] */ long *pDestinationTop); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_DestinationHeight )( + IBasicVideo2 * This, + /* [in] */ long DestinationHeight); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_DestinationHeight )( + IBasicVideo2 * This, + /* [retval][out] */ long *pDestinationHeight); + + HRESULT ( STDMETHODCALLTYPE *SetSourcePosition )( + IBasicVideo2 * This, + /* [in] */ long Left, + /* [in] */ long Top, + /* [in] */ long Width, + /* [in] */ long Height); + + HRESULT ( STDMETHODCALLTYPE *GetSourcePosition )( + IBasicVideo2 * This, + /* [out] */ long *pLeft, + /* [out] */ long *pTop, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + HRESULT ( STDMETHODCALLTYPE *SetDefaultSourcePosition )( + IBasicVideo2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetDestinationPosition )( + IBasicVideo2 * This, + /* [in] */ long Left, + /* [in] */ long Top, + /* [in] */ long Width, + /* [in] */ long Height); + + HRESULT ( STDMETHODCALLTYPE *GetDestinationPosition )( + IBasicVideo2 * This, + /* [out] */ long *pLeft, + /* [out] */ long *pTop, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + HRESULT ( STDMETHODCALLTYPE *SetDefaultDestinationPosition )( + IBasicVideo2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetVideoSize )( + IBasicVideo2 * This, + /* [out] */ long *pWidth, + /* [out] */ long *pHeight); + + HRESULT ( STDMETHODCALLTYPE *GetVideoPaletteEntries )( + IBasicVideo2 * This, + /* [in] */ long StartIndex, + /* [in] */ long Entries, + /* [out] */ long *pRetrieved, + /* [out] */ long *pPalette); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentImage )( + IBasicVideo2 * This, + /* [out][in] */ long *pBufferSize, + /* [out] */ long *pDIBImage); + + HRESULT ( STDMETHODCALLTYPE *IsUsingDefaultSource )( + IBasicVideo2 * This); + + HRESULT ( STDMETHODCALLTYPE *IsUsingDefaultDestination )( + IBasicVideo2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetPreferredAspectRatio )( + IBasicVideo2 * This, + /* [out] */ long *plAspectX, + /* [out] */ long *plAspectY); + + END_INTERFACE + } IBasicVideo2Vtbl; + + interface IBasicVideo2 + { + CONST_VTBL struct IBasicVideo2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBasicVideo2_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBasicVideo2_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBasicVideo2_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBasicVideo2_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IBasicVideo2_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IBasicVideo2_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IBasicVideo2_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IBasicVideo2_get_AvgTimePerFrame(This,pAvgTimePerFrame) \ + (This)->lpVtbl -> get_AvgTimePerFrame(This,pAvgTimePerFrame) + +#define IBasicVideo2_get_BitRate(This,pBitRate) \ + (This)->lpVtbl -> get_BitRate(This,pBitRate) + +#define IBasicVideo2_get_BitErrorRate(This,pBitErrorRate) \ + (This)->lpVtbl -> get_BitErrorRate(This,pBitErrorRate) + +#define IBasicVideo2_get_VideoWidth(This,pVideoWidth) \ + (This)->lpVtbl -> get_VideoWidth(This,pVideoWidth) + +#define IBasicVideo2_get_VideoHeight(This,pVideoHeight) \ + (This)->lpVtbl -> get_VideoHeight(This,pVideoHeight) + +#define IBasicVideo2_put_SourceLeft(This,SourceLeft) \ + (This)->lpVtbl -> put_SourceLeft(This,SourceLeft) + +#define IBasicVideo2_get_SourceLeft(This,pSourceLeft) \ + (This)->lpVtbl -> get_SourceLeft(This,pSourceLeft) + +#define IBasicVideo2_put_SourceWidth(This,SourceWidth) \ + (This)->lpVtbl -> put_SourceWidth(This,SourceWidth) + +#define IBasicVideo2_get_SourceWidth(This,pSourceWidth) \ + (This)->lpVtbl -> get_SourceWidth(This,pSourceWidth) + +#define IBasicVideo2_put_SourceTop(This,SourceTop) \ + (This)->lpVtbl -> put_SourceTop(This,SourceTop) + +#define IBasicVideo2_get_SourceTop(This,pSourceTop) \ + (This)->lpVtbl -> get_SourceTop(This,pSourceTop) + +#define IBasicVideo2_put_SourceHeight(This,SourceHeight) \ + (This)->lpVtbl -> put_SourceHeight(This,SourceHeight) + +#define IBasicVideo2_get_SourceHeight(This,pSourceHeight) \ + (This)->lpVtbl -> get_SourceHeight(This,pSourceHeight) + +#define IBasicVideo2_put_DestinationLeft(This,DestinationLeft) \ + (This)->lpVtbl -> put_DestinationLeft(This,DestinationLeft) + +#define IBasicVideo2_get_DestinationLeft(This,pDestinationLeft) \ + (This)->lpVtbl -> get_DestinationLeft(This,pDestinationLeft) + +#define IBasicVideo2_put_DestinationWidth(This,DestinationWidth) \ + (This)->lpVtbl -> put_DestinationWidth(This,DestinationWidth) + +#define IBasicVideo2_get_DestinationWidth(This,pDestinationWidth) \ + (This)->lpVtbl -> get_DestinationWidth(This,pDestinationWidth) + +#define IBasicVideo2_put_DestinationTop(This,DestinationTop) \ + (This)->lpVtbl -> put_DestinationTop(This,DestinationTop) + +#define IBasicVideo2_get_DestinationTop(This,pDestinationTop) \ + (This)->lpVtbl -> get_DestinationTop(This,pDestinationTop) + +#define IBasicVideo2_put_DestinationHeight(This,DestinationHeight) \ + (This)->lpVtbl -> put_DestinationHeight(This,DestinationHeight) + +#define IBasicVideo2_get_DestinationHeight(This,pDestinationHeight) \ + (This)->lpVtbl -> get_DestinationHeight(This,pDestinationHeight) + +#define IBasicVideo2_SetSourcePosition(This,Left,Top,Width,Height) \ + (This)->lpVtbl -> SetSourcePosition(This,Left,Top,Width,Height) + +#define IBasicVideo2_GetSourcePosition(This,pLeft,pTop,pWidth,pHeight) \ + (This)->lpVtbl -> GetSourcePosition(This,pLeft,pTop,pWidth,pHeight) + +#define IBasicVideo2_SetDefaultSourcePosition(This) \ + (This)->lpVtbl -> SetDefaultSourcePosition(This) + +#define IBasicVideo2_SetDestinationPosition(This,Left,Top,Width,Height) \ + (This)->lpVtbl -> SetDestinationPosition(This,Left,Top,Width,Height) + +#define IBasicVideo2_GetDestinationPosition(This,pLeft,pTop,pWidth,pHeight) \ + (This)->lpVtbl -> GetDestinationPosition(This,pLeft,pTop,pWidth,pHeight) + +#define IBasicVideo2_SetDefaultDestinationPosition(This) \ + (This)->lpVtbl -> SetDefaultDestinationPosition(This) + +#define IBasicVideo2_GetVideoSize(This,pWidth,pHeight) \ + (This)->lpVtbl -> GetVideoSize(This,pWidth,pHeight) + +#define IBasicVideo2_GetVideoPaletteEntries(This,StartIndex,Entries,pRetrieved,pPalette) \ + (This)->lpVtbl -> GetVideoPaletteEntries(This,StartIndex,Entries,pRetrieved,pPalette) + +#define IBasicVideo2_GetCurrentImage(This,pBufferSize,pDIBImage) \ + (This)->lpVtbl -> GetCurrentImage(This,pBufferSize,pDIBImage) + +#define IBasicVideo2_IsUsingDefaultSource(This) \ + (This)->lpVtbl -> IsUsingDefaultSource(This) + +#define IBasicVideo2_IsUsingDefaultDestination(This) \ + (This)->lpVtbl -> IsUsingDefaultDestination(This) + + +#define IBasicVideo2_GetPreferredAspectRatio(This,plAspectX,plAspectY) \ + (This)->lpVtbl -> GetPreferredAspectRatio(This,plAspectX,plAspectY) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBasicVideo2_GetPreferredAspectRatio_Proxy( + IBasicVideo2 * This, + /* [out] */ long *plAspectX, + /* [out] */ long *plAspectY); + + +void __RPC_STUB IBasicVideo2_GetPreferredAspectRatio_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBasicVideo2_INTERFACE_DEFINED__ */ + + +#ifndef __IDeferredCommand_INTERFACE_DEFINED__ +#define __IDeferredCommand_INTERFACE_DEFINED__ + +/* interface IDeferredCommand */ +/* [object][helpstring][uuid] */ + + +DEFINE_GUID(IID_IDeferredCommand,0x56a868b8,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868b8-0ad4-11ce-b03a-0020af0ba770") + IDeferredCommand : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Cancel( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Confidence( + /* [out] */ LONG *pConfidence) = 0; + + virtual HRESULT STDMETHODCALLTYPE Postpone( + /* [in] */ REFTIME newtime) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetHResult( + /* [out] */ HRESULT *phrResult) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDeferredCommandVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDeferredCommand * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDeferredCommand * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDeferredCommand * This); + + HRESULT ( STDMETHODCALLTYPE *Cancel )( + IDeferredCommand * This); + + HRESULT ( STDMETHODCALLTYPE *Confidence )( + IDeferredCommand * This, + /* [out] */ LONG *pConfidence); + + HRESULT ( STDMETHODCALLTYPE *Postpone )( + IDeferredCommand * This, + /* [in] */ REFTIME newtime); + + HRESULT ( STDMETHODCALLTYPE *GetHResult )( + IDeferredCommand * This, + /* [out] */ HRESULT *phrResult); + + END_INTERFACE + } IDeferredCommandVtbl; + + interface IDeferredCommand + { + CONST_VTBL struct IDeferredCommandVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDeferredCommand_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDeferredCommand_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDeferredCommand_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDeferredCommand_Cancel(This) \ + (This)->lpVtbl -> Cancel(This) + +#define IDeferredCommand_Confidence(This,pConfidence) \ + (This)->lpVtbl -> Confidence(This,pConfidence) + +#define IDeferredCommand_Postpone(This,newtime) \ + (This)->lpVtbl -> Postpone(This,newtime) + +#define IDeferredCommand_GetHResult(This,phrResult) \ + (This)->lpVtbl -> GetHResult(This,phrResult) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDeferredCommand_Cancel_Proxy( + IDeferredCommand * This); + + +void __RPC_STUB IDeferredCommand_Cancel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDeferredCommand_Confidence_Proxy( + IDeferredCommand * This, + /* [out] */ LONG *pConfidence); + + +void __RPC_STUB IDeferredCommand_Confidence_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDeferredCommand_Postpone_Proxy( + IDeferredCommand * This, + /* [in] */ REFTIME newtime); + + +void __RPC_STUB IDeferredCommand_Postpone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDeferredCommand_GetHResult_Proxy( + IDeferredCommand * This, + /* [out] */ HRESULT *phrResult); + + +void __RPC_STUB IDeferredCommand_GetHResult_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDeferredCommand_INTERFACE_DEFINED__ */ + + +#ifndef __IQueueCommand_INTERFACE_DEFINED__ +#define __IQueueCommand_INTERFACE_DEFINED__ + +/* interface IQueueCommand */ +/* [object][helpstring][uuid] */ + + +DEFINE_GUID(IID_IQueueCommand,0x56a868b7,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868b7-0ad4-11ce-b03a-0020af0ba770") + IQueueCommand : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE InvokeAtStreamTime( + /* [out] */ IDeferredCommand **pCmd, + /* [in] */ REFTIME time, + /* [in] */ GUID *iid, + /* [in] */ long dispidMethod, + /* [in] */ short wFlags, + /* [in] */ long cArgs, + /* [in] */ VARIANT *pDispParams, + /* [out][in] */ VARIANT *pvarResult, + /* [out] */ short *puArgErr) = 0; + + virtual HRESULT STDMETHODCALLTYPE InvokeAtPresentationTime( + /* [out] */ IDeferredCommand **pCmd, + /* [in] */ REFTIME time, + /* [in] */ GUID *iid, + /* [in] */ long dispidMethod, + /* [in] */ short wFlags, + /* [in] */ long cArgs, + /* [in] */ VARIANT *pDispParams, + /* [out][in] */ VARIANT *pvarResult, + /* [out] */ short *puArgErr) = 0; + + }; + +#else /* C style interface */ + + typedef struct IQueueCommandVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IQueueCommand * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IQueueCommand * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IQueueCommand * This); + + HRESULT ( STDMETHODCALLTYPE *InvokeAtStreamTime )( + IQueueCommand * This, + /* [out] */ IDeferredCommand **pCmd, + /* [in] */ REFTIME time, + /* [in] */ GUID *iid, + /* [in] */ long dispidMethod, + /* [in] */ short wFlags, + /* [in] */ long cArgs, + /* [in] */ VARIANT *pDispParams, + /* [out][in] */ VARIANT *pvarResult, + /* [out] */ short *puArgErr); + + HRESULT ( STDMETHODCALLTYPE *InvokeAtPresentationTime )( + IQueueCommand * This, + /* [out] */ IDeferredCommand **pCmd, + /* [in] */ REFTIME time, + /* [in] */ GUID *iid, + /* [in] */ long dispidMethod, + /* [in] */ short wFlags, + /* [in] */ long cArgs, + /* [in] */ VARIANT *pDispParams, + /* [out][in] */ VARIANT *pvarResult, + /* [out] */ short *puArgErr); + + END_INTERFACE + } IQueueCommandVtbl; + + interface IQueueCommand + { + CONST_VTBL struct IQueueCommandVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IQueueCommand_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IQueueCommand_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IQueueCommand_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IQueueCommand_InvokeAtStreamTime(This,pCmd,time,iid,dispidMethod,wFlags,cArgs,pDispParams,pvarResult,puArgErr) \ + (This)->lpVtbl -> InvokeAtStreamTime(This,pCmd,time,iid,dispidMethod,wFlags,cArgs,pDispParams,pvarResult,puArgErr) + +#define IQueueCommand_InvokeAtPresentationTime(This,pCmd,time,iid,dispidMethod,wFlags,cArgs,pDispParams,pvarResult,puArgErr) \ + (This)->lpVtbl -> InvokeAtPresentationTime(This,pCmd,time,iid,dispidMethod,wFlags,cArgs,pDispParams,pvarResult,puArgErr) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IQueueCommand_InvokeAtStreamTime_Proxy( + IQueueCommand * This, + /* [out] */ IDeferredCommand **pCmd, + /* [in] */ REFTIME time, + /* [in] */ GUID *iid, + /* [in] */ long dispidMethod, + /* [in] */ short wFlags, + /* [in] */ long cArgs, + /* [in] */ VARIANT *pDispParams, + /* [out][in] */ VARIANT *pvarResult, + /* [out] */ short *puArgErr); + + +void __RPC_STUB IQueueCommand_InvokeAtStreamTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IQueueCommand_InvokeAtPresentationTime_Proxy( + IQueueCommand * This, + /* [out] */ IDeferredCommand **pCmd, + /* [in] */ REFTIME time, + /* [in] */ GUID *iid, + /* [in] */ long dispidMethod, + /* [in] */ short wFlags, + /* [in] */ long cArgs, + /* [in] */ VARIANT *pDispParams, + /* [out][in] */ VARIANT *pvarResult, + /* [out] */ short *puArgErr); + + +void __RPC_STUB IQueueCommand_InvokeAtPresentationTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IQueueCommand_INTERFACE_DEFINED__ */ + + +DEFINE_GUID(CLSID_FilgraphManager,0xe436ebb3,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#ifdef __cplusplus + +class DECLSPEC_UUID("e436ebb3-524f-11ce-9f53-0020af0ba770") +FilgraphManager; +#endif + +#ifndef __IFilterInfo_INTERFACE_DEFINED__ +#define __IFilterInfo_INTERFACE_DEFINED__ + +/* interface IFilterInfo */ +/* [object][dual][oleautomation][helpstring][uuid] */ + + +DEFINE_GUID(IID_IFilterInfo,0x56a868ba,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868ba-0ad4-11ce-b03a-0020af0ba770") + IFilterInfo : public IDispatch + { + public: + virtual HRESULT STDMETHODCALLTYPE FindPin( + /* [in] */ BSTR strPinID, + /* [out] */ IDispatch **ppUnk) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Name( + /* [retval][out] */ BSTR *strName) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_VendorInfo( + /* [retval][out] */ BSTR *strVendorInfo) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Filter( + /* [retval][out] */ IUnknown **ppUnk) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Pins( + /* [retval][out] */ IDispatch **ppUnk) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_IsFileSource( + /* [retval][out] */ LONG *pbIsSource) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Filename( + /* [retval][out] */ BSTR *pstrFilename) = 0; + + virtual /* [propput] */ HRESULT STDMETHODCALLTYPE put_Filename( + /* [in] */ BSTR strFilename) = 0; + + }; + +#else /* C style interface */ + + typedef struct IFilterInfoVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IFilterInfo * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IFilterInfo * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IFilterInfo * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IFilterInfo * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IFilterInfo * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IFilterInfo * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IFilterInfo * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + HRESULT ( STDMETHODCALLTYPE *FindPin )( + IFilterInfo * This, + /* [in] */ BSTR strPinID, + /* [out] */ IDispatch **ppUnk); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( + IFilterInfo * This, + /* [retval][out] */ BSTR *strName); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_VendorInfo )( + IFilterInfo * This, + /* [retval][out] */ BSTR *strVendorInfo); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Filter )( + IFilterInfo * This, + /* [retval][out] */ IUnknown **ppUnk); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Pins )( + IFilterInfo * This, + /* [retval][out] */ IDispatch **ppUnk); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_IsFileSource )( + IFilterInfo * This, + /* [retval][out] */ LONG *pbIsSource); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Filename )( + IFilterInfo * This, + /* [retval][out] */ BSTR *pstrFilename); + + /* [propput] */ HRESULT ( STDMETHODCALLTYPE *put_Filename )( + IFilterInfo * This, + /* [in] */ BSTR strFilename); + + END_INTERFACE + } IFilterInfoVtbl; + + interface IFilterInfo + { + CONST_VTBL struct IFilterInfoVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IFilterInfo_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IFilterInfo_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IFilterInfo_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IFilterInfo_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IFilterInfo_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IFilterInfo_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IFilterInfo_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IFilterInfo_FindPin(This,strPinID,ppUnk) \ + (This)->lpVtbl -> FindPin(This,strPinID,ppUnk) + +#define IFilterInfo_get_Name(This,strName) \ + (This)->lpVtbl -> get_Name(This,strName) + +#define IFilterInfo_get_VendorInfo(This,strVendorInfo) \ + (This)->lpVtbl -> get_VendorInfo(This,strVendorInfo) + +#define IFilterInfo_get_Filter(This,ppUnk) \ + (This)->lpVtbl -> get_Filter(This,ppUnk) + +#define IFilterInfo_get_Pins(This,ppUnk) \ + (This)->lpVtbl -> get_Pins(This,ppUnk) + +#define IFilterInfo_get_IsFileSource(This,pbIsSource) \ + (This)->lpVtbl -> get_IsFileSource(This,pbIsSource) + +#define IFilterInfo_get_Filename(This,pstrFilename) \ + (This)->lpVtbl -> get_Filename(This,pstrFilename) + +#define IFilterInfo_put_Filename(This,strFilename) \ + (This)->lpVtbl -> put_Filename(This,strFilename) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IFilterInfo_FindPin_Proxy( + IFilterInfo * This, + /* [in] */ BSTR strPinID, + /* [out] */ IDispatch **ppUnk); + + +void __RPC_STUB IFilterInfo_FindPin_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IFilterInfo_get_Name_Proxy( + IFilterInfo * This, + /* [retval][out] */ BSTR *strName); + + +void __RPC_STUB IFilterInfo_get_Name_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IFilterInfo_get_VendorInfo_Proxy( + IFilterInfo * This, + /* [retval][out] */ BSTR *strVendorInfo); + + +void __RPC_STUB IFilterInfo_get_VendorInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IFilterInfo_get_Filter_Proxy( + IFilterInfo * This, + /* [retval][out] */ IUnknown **ppUnk); + + +void __RPC_STUB IFilterInfo_get_Filter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IFilterInfo_get_Pins_Proxy( + IFilterInfo * This, + /* [retval][out] */ IDispatch **ppUnk); + + +void __RPC_STUB IFilterInfo_get_Pins_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IFilterInfo_get_IsFileSource_Proxy( + IFilterInfo * This, + /* [retval][out] */ LONG *pbIsSource); + + +void __RPC_STUB IFilterInfo_get_IsFileSource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IFilterInfo_get_Filename_Proxy( + IFilterInfo * This, + /* [retval][out] */ BSTR *pstrFilename); + + +void __RPC_STUB IFilterInfo_get_Filename_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propput] */ HRESULT STDMETHODCALLTYPE IFilterInfo_put_Filename_Proxy( + IFilterInfo * This, + /* [in] */ BSTR strFilename); + + +void __RPC_STUB IFilterInfo_put_Filename_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IFilterInfo_INTERFACE_DEFINED__ */ + + +#ifndef __IRegFilterInfo_INTERFACE_DEFINED__ +#define __IRegFilterInfo_INTERFACE_DEFINED__ + +/* interface IRegFilterInfo */ +/* [object][dual][oleautomation][helpstring][uuid] */ + + +DEFINE_GUID(IID_IRegFilterInfo,0x56a868bb,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868bb-0ad4-11ce-b03a-0020af0ba770") + IRegFilterInfo : public IDispatch + { + public: + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Name( + /* [retval][out] */ BSTR *strName) = 0; + + virtual HRESULT STDMETHODCALLTYPE Filter( + /* [out] */ IDispatch **ppUnk) = 0; + + }; + +#else /* C style interface */ + + typedef struct IRegFilterInfoVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IRegFilterInfo * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IRegFilterInfo * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IRegFilterInfo * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IRegFilterInfo * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IRegFilterInfo * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IRegFilterInfo * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IRegFilterInfo * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( + IRegFilterInfo * This, + /* [retval][out] */ BSTR *strName); + + HRESULT ( STDMETHODCALLTYPE *Filter )( + IRegFilterInfo * This, + /* [out] */ IDispatch **ppUnk); + + END_INTERFACE + } IRegFilterInfoVtbl; + + interface IRegFilterInfo + { + CONST_VTBL struct IRegFilterInfoVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IRegFilterInfo_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IRegFilterInfo_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IRegFilterInfo_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IRegFilterInfo_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IRegFilterInfo_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IRegFilterInfo_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IRegFilterInfo_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IRegFilterInfo_get_Name(This,strName) \ + (This)->lpVtbl -> get_Name(This,strName) + +#define IRegFilterInfo_Filter(This,ppUnk) \ + (This)->lpVtbl -> Filter(This,ppUnk) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IRegFilterInfo_get_Name_Proxy( + IRegFilterInfo * This, + /* [retval][out] */ BSTR *strName); + + +void __RPC_STUB IRegFilterInfo_get_Name_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRegFilterInfo_Filter_Proxy( + IRegFilterInfo * This, + /* [out] */ IDispatch **ppUnk); + + +void __RPC_STUB IRegFilterInfo_Filter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IRegFilterInfo_INTERFACE_DEFINED__ */ + + +#ifndef __IMediaTypeInfo_INTERFACE_DEFINED__ +#define __IMediaTypeInfo_INTERFACE_DEFINED__ + +/* interface IMediaTypeInfo */ +/* [object][dual][oleautomation][helpstring][uuid] */ + + +DEFINE_GUID(IID_IMediaTypeInfo,0x56a868bc,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868bc-0ad4-11ce-b03a-0020af0ba770") + IMediaTypeInfo : public IDispatch + { + public: + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Type( + /* [retval][out] */ BSTR *strType) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Subtype( + /* [retval][out] */ BSTR *strType) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaTypeInfoVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaTypeInfo * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaTypeInfo * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaTypeInfo * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IMediaTypeInfo * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IMediaTypeInfo * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IMediaTypeInfo * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IMediaTypeInfo * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Type )( + IMediaTypeInfo * This, + /* [retval][out] */ BSTR *strType); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Subtype )( + IMediaTypeInfo * This, + /* [retval][out] */ BSTR *strType); + + END_INTERFACE + } IMediaTypeInfoVtbl; + + interface IMediaTypeInfo + { + CONST_VTBL struct IMediaTypeInfoVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaTypeInfo_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaTypeInfo_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaTypeInfo_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaTypeInfo_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IMediaTypeInfo_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IMediaTypeInfo_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IMediaTypeInfo_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IMediaTypeInfo_get_Type(This,strType) \ + (This)->lpVtbl -> get_Type(This,strType) + +#define IMediaTypeInfo_get_Subtype(This,strType) \ + (This)->lpVtbl -> get_Subtype(This,strType) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IMediaTypeInfo_get_Type_Proxy( + IMediaTypeInfo * This, + /* [retval][out] */ BSTR *strType); + + +void __RPC_STUB IMediaTypeInfo_get_Type_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IMediaTypeInfo_get_Subtype_Proxy( + IMediaTypeInfo * This, + /* [retval][out] */ BSTR *strType); + + +void __RPC_STUB IMediaTypeInfo_get_Subtype_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaTypeInfo_INTERFACE_DEFINED__ */ + + +#ifndef __IPinInfo_INTERFACE_DEFINED__ +#define __IPinInfo_INTERFACE_DEFINED__ + +/* interface IPinInfo */ +/* [object][dual][oleautomation][helpstring][uuid] */ + + +DEFINE_GUID(IID_IPinInfo,0x56a868bd,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868bd-0ad4-11ce-b03a-0020af0ba770") + IPinInfo : public IDispatch + { + public: + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Pin( + /* [retval][out] */ IUnknown **ppUnk) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ConnectedTo( + /* [retval][out] */ IDispatch **ppUnk) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ConnectionMediaType( + /* [retval][out] */ IDispatch **ppUnk) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_FilterInfo( + /* [retval][out] */ IDispatch **ppUnk) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Name( + /* [retval][out] */ BSTR *ppUnk) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Direction( + /* [retval][out] */ LONG *ppDirection) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_PinID( + /* [retval][out] */ BSTR *strPinID) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_MediaTypes( + /* [retval][out] */ IDispatch **ppUnk) = 0; + + virtual HRESULT STDMETHODCALLTYPE Connect( + /* [in] */ IUnknown *pPin) = 0; + + virtual HRESULT STDMETHODCALLTYPE ConnectDirect( + /* [in] */ IUnknown *pPin) = 0; + + virtual HRESULT STDMETHODCALLTYPE ConnectWithType( + /* [in] */ IUnknown *pPin, + /* [in] */ IDispatch *pMediaType) = 0; + + virtual HRESULT STDMETHODCALLTYPE Disconnect( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Render( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IPinInfoVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IPinInfo * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IPinInfo * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IPinInfo * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IPinInfo * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IPinInfo * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IPinInfo * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IPinInfo * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Pin )( + IPinInfo * This, + /* [retval][out] */ IUnknown **ppUnk); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ConnectedTo )( + IPinInfo * This, + /* [retval][out] */ IDispatch **ppUnk); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_ConnectionMediaType )( + IPinInfo * This, + /* [retval][out] */ IDispatch **ppUnk); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_FilterInfo )( + IPinInfo * This, + /* [retval][out] */ IDispatch **ppUnk); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Name )( + IPinInfo * This, + /* [retval][out] */ BSTR *ppUnk); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Direction )( + IPinInfo * This, + /* [retval][out] */ LONG *ppDirection); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_PinID )( + IPinInfo * This, + /* [retval][out] */ BSTR *strPinID); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaTypes )( + IPinInfo * This, + /* [retval][out] */ IDispatch **ppUnk); + + HRESULT ( STDMETHODCALLTYPE *Connect )( + IPinInfo * This, + /* [in] */ IUnknown *pPin); + + HRESULT ( STDMETHODCALLTYPE *ConnectDirect )( + IPinInfo * This, + /* [in] */ IUnknown *pPin); + + HRESULT ( STDMETHODCALLTYPE *ConnectWithType )( + IPinInfo * This, + /* [in] */ IUnknown *pPin, + /* [in] */ IDispatch *pMediaType); + + HRESULT ( STDMETHODCALLTYPE *Disconnect )( + IPinInfo * This); + + HRESULT ( STDMETHODCALLTYPE *Render )( + IPinInfo * This); + + END_INTERFACE + } IPinInfoVtbl; + + interface IPinInfo + { + CONST_VTBL struct IPinInfoVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IPinInfo_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IPinInfo_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IPinInfo_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IPinInfo_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IPinInfo_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IPinInfo_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IPinInfo_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IPinInfo_get_Pin(This,ppUnk) \ + (This)->lpVtbl -> get_Pin(This,ppUnk) + +#define IPinInfo_get_ConnectedTo(This,ppUnk) \ + (This)->lpVtbl -> get_ConnectedTo(This,ppUnk) + +#define IPinInfo_get_ConnectionMediaType(This,ppUnk) \ + (This)->lpVtbl -> get_ConnectionMediaType(This,ppUnk) + +#define IPinInfo_get_FilterInfo(This,ppUnk) \ + (This)->lpVtbl -> get_FilterInfo(This,ppUnk) + +#define IPinInfo_get_Name(This,ppUnk) \ + (This)->lpVtbl -> get_Name(This,ppUnk) + +#define IPinInfo_get_Direction(This,ppDirection) \ + (This)->lpVtbl -> get_Direction(This,ppDirection) + +#define IPinInfo_get_PinID(This,strPinID) \ + (This)->lpVtbl -> get_PinID(This,strPinID) + +#define IPinInfo_get_MediaTypes(This,ppUnk) \ + (This)->lpVtbl -> get_MediaTypes(This,ppUnk) + +#define IPinInfo_Connect(This,pPin) \ + (This)->lpVtbl -> Connect(This,pPin) + +#define IPinInfo_ConnectDirect(This,pPin) \ + (This)->lpVtbl -> ConnectDirect(This,pPin) + +#define IPinInfo_ConnectWithType(This,pPin,pMediaType) \ + (This)->lpVtbl -> ConnectWithType(This,pPin,pMediaType) + +#define IPinInfo_Disconnect(This) \ + (This)->lpVtbl -> Disconnect(This) + +#define IPinInfo_Render(This) \ + (This)->lpVtbl -> Render(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IPinInfo_get_Pin_Proxy( + IPinInfo * This, + /* [retval][out] */ IUnknown **ppUnk); + + +void __RPC_STUB IPinInfo_get_Pin_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IPinInfo_get_ConnectedTo_Proxy( + IPinInfo * This, + /* [retval][out] */ IDispatch **ppUnk); + + +void __RPC_STUB IPinInfo_get_ConnectedTo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IPinInfo_get_ConnectionMediaType_Proxy( + IPinInfo * This, + /* [retval][out] */ IDispatch **ppUnk); + + +void __RPC_STUB IPinInfo_get_ConnectionMediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IPinInfo_get_FilterInfo_Proxy( + IPinInfo * This, + /* [retval][out] */ IDispatch **ppUnk); + + +void __RPC_STUB IPinInfo_get_FilterInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IPinInfo_get_Name_Proxy( + IPinInfo * This, + /* [retval][out] */ BSTR *ppUnk); + + +void __RPC_STUB IPinInfo_get_Name_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IPinInfo_get_Direction_Proxy( + IPinInfo * This, + /* [retval][out] */ LONG *ppDirection); + + +void __RPC_STUB IPinInfo_get_Direction_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IPinInfo_get_PinID_Proxy( + IPinInfo * This, + /* [retval][out] */ BSTR *strPinID); + + +void __RPC_STUB IPinInfo_get_PinID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IPinInfo_get_MediaTypes_Proxy( + IPinInfo * This, + /* [retval][out] */ IDispatch **ppUnk); + + +void __RPC_STUB IPinInfo_get_MediaTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPinInfo_Connect_Proxy( + IPinInfo * This, + /* [in] */ IUnknown *pPin); + + +void __RPC_STUB IPinInfo_Connect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPinInfo_ConnectDirect_Proxy( + IPinInfo * This, + /* [in] */ IUnknown *pPin); + + +void __RPC_STUB IPinInfo_ConnectDirect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPinInfo_ConnectWithType_Proxy( + IPinInfo * This, + /* [in] */ IUnknown *pPin, + /* [in] */ IDispatch *pMediaType); + + +void __RPC_STUB IPinInfo_ConnectWithType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPinInfo_Disconnect_Proxy( + IPinInfo * This); + + +void __RPC_STUB IPinInfo_Disconnect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPinInfo_Render_Proxy( + IPinInfo * This); + + +void __RPC_STUB IPinInfo_Render_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IPinInfo_INTERFACE_DEFINED__ */ + + +#ifndef __IAMStats_INTERFACE_DEFINED__ +#define __IAMStats_INTERFACE_DEFINED__ + +/* interface IAMStats */ +/* [object][dual][oleautomation][helpstring][uuid] */ + + +DEFINE_GUID(IID_IAMStats,0xbc9bcf80,0xdcd2,0x11d2,0xab,0xf6,0x00,0xa0,0xc9,0x05,0xf3,0x75); + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("bc9bcf80-dcd2-11d2-abf6-00a0c905f375") + IAMStats : public IDispatch + { + public: + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_Count( + /* [retval][out] */ LONG *plCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetValueByIndex( + /* [in] */ long lIndex, + /* [out] */ BSTR *szName, + /* [out] */ long *lCount, + /* [out] */ double *dLast, + /* [out] */ double *dAverage, + /* [out] */ double *dStdDev, + /* [out] */ double *dMin, + /* [out] */ double *dMax) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetValueByName( + /* [in] */ BSTR szName, + /* [out] */ long *lIndex, + /* [out] */ long *lCount, + /* [out] */ double *dLast, + /* [out] */ double *dAverage, + /* [out] */ double *dStdDev, + /* [out] */ double *dMin, + /* [out] */ double *dMax) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetIndex( + /* [in] */ BSTR szName, + /* [in] */ long lCreate, + /* [out] */ long *plIndex) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddValue( + /* [in] */ long lIndex, + /* [in] */ double dValue) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMStatsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMStats * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMStats * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMStats * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IAMStats * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IAMStats * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IAMStats * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IAMStats * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IAMStats * This); + + /* [propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( + IAMStats * This, + /* [retval][out] */ LONG *plCount); + + HRESULT ( STDMETHODCALLTYPE *GetValueByIndex )( + IAMStats * This, + /* [in] */ long lIndex, + /* [out] */ BSTR *szName, + /* [out] */ long *lCount, + /* [out] */ double *dLast, + /* [out] */ double *dAverage, + /* [out] */ double *dStdDev, + /* [out] */ double *dMin, + /* [out] */ double *dMax); + + HRESULT ( STDMETHODCALLTYPE *GetValueByName )( + IAMStats * This, + /* [in] */ BSTR szName, + /* [out] */ long *lIndex, + /* [out] */ long *lCount, + /* [out] */ double *dLast, + /* [out] */ double *dAverage, + /* [out] */ double *dStdDev, + /* [out] */ double *dMin, + /* [out] */ double *dMax); + + HRESULT ( STDMETHODCALLTYPE *GetIndex )( + IAMStats * This, + /* [in] */ BSTR szName, + /* [in] */ long lCreate, + /* [out] */ long *plIndex); + + HRESULT ( STDMETHODCALLTYPE *AddValue )( + IAMStats * This, + /* [in] */ long lIndex, + /* [in] */ double dValue); + + END_INTERFACE + } IAMStatsVtbl; + + interface IAMStats + { + CONST_VTBL struct IAMStatsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMStats_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMStats_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMStats_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMStats_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IAMStats_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IAMStats_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IAMStats_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IAMStats_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IAMStats_get_Count(This,plCount) \ + (This)->lpVtbl -> get_Count(This,plCount) + +#define IAMStats_GetValueByIndex(This,lIndex,szName,lCount,dLast,dAverage,dStdDev,dMin,dMax) \ + (This)->lpVtbl -> GetValueByIndex(This,lIndex,szName,lCount,dLast,dAverage,dStdDev,dMin,dMax) + +#define IAMStats_GetValueByName(This,szName,lIndex,lCount,dLast,dAverage,dStdDev,dMin,dMax) \ + (This)->lpVtbl -> GetValueByName(This,szName,lIndex,lCount,dLast,dAverage,dStdDev,dMin,dMax) + +#define IAMStats_GetIndex(This,szName,lCreate,plIndex) \ + (This)->lpVtbl -> GetIndex(This,szName,lCreate,plIndex) + +#define IAMStats_AddValue(This,lIndex,dValue) \ + (This)->lpVtbl -> AddValue(This,lIndex,dValue) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMStats_Reset_Proxy( + IAMStats * This); + + +void __RPC_STUB IAMStats_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [propget] */ HRESULT STDMETHODCALLTYPE IAMStats_get_Count_Proxy( + IAMStats * This, + /* [retval][out] */ LONG *plCount); + + +void __RPC_STUB IAMStats_get_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMStats_GetValueByIndex_Proxy( + IAMStats * This, + /* [in] */ long lIndex, + /* [out] */ BSTR *szName, + /* [out] */ long *lCount, + /* [out] */ double *dLast, + /* [out] */ double *dAverage, + /* [out] */ double *dStdDev, + /* [out] */ double *dMin, + /* [out] */ double *dMax); + + +void __RPC_STUB IAMStats_GetValueByIndex_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMStats_GetValueByName_Proxy( + IAMStats * This, + /* [in] */ BSTR szName, + /* [out] */ long *lIndex, + /* [out] */ long *lCount, + /* [out] */ double *dLast, + /* [out] */ double *dAverage, + /* [out] */ double *dStdDev, + /* [out] */ double *dMin, + /* [out] */ double *dMax); + + +void __RPC_STUB IAMStats_GetValueByName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMStats_GetIndex_Proxy( + IAMStats * This, + /* [in] */ BSTR szName, + /* [in] */ long lCreate, + /* [out] */ long *plIndex); + + +void __RPC_STUB IAMStats_GetIndex_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMStats_AddValue_Proxy( + IAMStats * This, + /* [in] */ long lIndex, + /* [in] */ double dValue); + + +void __RPC_STUB IAMStats_AddValue_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMStats_INTERFACE_DEFINED__ */ + +#endif /* __QuartzTypeLib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/d3d.h b/windows_libs/mssdk/include/d3d.h new file mode 100644 index 00000000..8c1815a3 --- /dev/null +++ b/windows_libs/mssdk/include/d3d.h @@ -0,0 +1,1687 @@ +/*==========================================================================; + * + * + * File: d3d.h + * Content: Direct3D include file + * + ****************************************************************************/ + +#ifndef _D3D_H_ +#define _D3D_H_ + +#ifndef DIRECT3D_VERSION +#define DIRECT3D_VERSION 0x0700 +#endif + +// include this file content only if compiling for <=DX7 interfaces +#if(DIRECT3D_VERSION < 0x0800) + + +#include + +#define COM_NO_WINDOWS_H +#include + +#define D3DAPI WINAPI + +/* + * Interface IID's + */ +#if defined( _WIN32 ) && !defined( _NO_COM) +DEFINE_GUID( IID_IDirect3D, 0x3BBA0080,0x2421,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 ); +#if(DIRECT3D_VERSION >= 0x0500) +DEFINE_GUID( IID_IDirect3D2, 0x6aae1ec1,0x662a,0x11d0,0x88,0x9d,0x00,0xaa,0x00,0xbb,0xb7,0x6a); +#endif /* DIRECT3D_VERSION >= 0x0500 */ +#if(DIRECT3D_VERSION >= 0x0600) +DEFINE_GUID( IID_IDirect3D3, 0xbb223240,0xe72b,0x11d0,0xa9,0xb4,0x00,0xaa,0x00,0xc0,0x99,0x3e); +#endif /* DIRECT3D_VERSION >= 0x0600 */ +#if(DIRECT3D_VERSION >= 0x0700) +DEFINE_GUID( IID_IDirect3D7, 0xf5049e77,0x4861,0x11d2,0xa4,0x7,0x0,0xa0,0xc9,0x6,0x29,0xa8); +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +#if(DIRECT3D_VERSION >= 0x0500) +DEFINE_GUID( IID_IDirect3DRampDevice, 0xF2086B20,0x259F,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 ); +DEFINE_GUID( IID_IDirect3DRGBDevice, 0xA4665C60,0x2673,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 ); +DEFINE_GUID( IID_IDirect3DHALDevice, 0x84E63dE0,0x46AA,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E ); +DEFINE_GUID( IID_IDirect3DMMXDevice, 0x881949a1,0xd6f3,0x11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 ); +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#if(DIRECT3D_VERSION >= 0x0600) +DEFINE_GUID( IID_IDirect3DRefDevice, 0x50936643, 0x13e9, 0x11d1, 0x89, 0xaa, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29); +DEFINE_GUID( IID_IDirect3DNullDevice, 0x8767df22, 0xbacc, 0x11d1, 0x89, 0x69, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8); +#endif /* DIRECT3D_VERSION >= 0x0600 */ +#if(DIRECT3D_VERSION >= 0x0700) +DEFINE_GUID( IID_IDirect3DTnLHalDevice, 0xf5049e78, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8); +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +/* + * Internal Guid to distinguish requested MMX from MMX being used as an RGB rasterizer + */ + +DEFINE_GUID( IID_IDirect3DDevice, 0x64108800,0x957d,0X11d0,0x89,0xab,0x00,0xa0,0xc9,0x05,0x41,0x29 ); +#if(DIRECT3D_VERSION >= 0x0500) +DEFINE_GUID( IID_IDirect3DDevice2, 0x93281501, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29); +#endif /* DIRECT3D_VERSION >= 0x0500 */ +#if(DIRECT3D_VERSION >= 0x0600) +DEFINE_GUID( IID_IDirect3DDevice3, 0xb0ab3b60, 0x33d7, 0x11d1, 0xa9, 0x81, 0x0, 0xc0, 0x4f, 0xd7, 0xb1, 0x74); +#endif /* DIRECT3D_VERSION >= 0x0600 */ +#if(DIRECT3D_VERSION >= 0x0700) +DEFINE_GUID( IID_IDirect3DDevice7, 0xf5049e79, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8); +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +DEFINE_GUID( IID_IDirect3DTexture, 0x2CDCD9E0,0x25A0,0x11CF,0xA3,0x1A,0x00,0xAA,0x00,0xB9,0x33,0x56 ); +#if(DIRECT3D_VERSION >= 0x0500) +DEFINE_GUID( IID_IDirect3DTexture2, 0x93281502, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29); +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +DEFINE_GUID( IID_IDirect3DLight, 0x4417C142,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E ); + +DEFINE_GUID( IID_IDirect3DMaterial, 0x4417C144,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E ); +#if(DIRECT3D_VERSION >= 0x0500) +DEFINE_GUID( IID_IDirect3DMaterial2, 0x93281503, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29); +#endif /* DIRECT3D_VERSION >= 0x0500 */ +#if(DIRECT3D_VERSION >= 0x0600) +DEFINE_GUID( IID_IDirect3DMaterial3, 0xca9c46f4, 0xd3c5, 0x11d1, 0xb7, 0x5a, 0x0, 0x60, 0x8, 0x52, 0xb3, 0x12); +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +DEFINE_GUID( IID_IDirect3DExecuteBuffer,0x4417C145,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E ); +DEFINE_GUID( IID_IDirect3DViewport, 0x4417C146,0x33AD,0x11CF,0x81,0x6F,0x00,0x00,0xC0,0x20,0x15,0x6E ); +#if(DIRECT3D_VERSION >= 0x0500) +DEFINE_GUID( IID_IDirect3DViewport2, 0x93281500, 0x8cf8, 0x11d0, 0x89, 0xab, 0x0, 0xa0, 0xc9, 0x5, 0x41, 0x29); +#endif /* DIRECT3D_VERSION >= 0x0500 */ +#if(DIRECT3D_VERSION >= 0x0600) +DEFINE_GUID( IID_IDirect3DViewport3, 0xb0ab3b61, 0x33d7, 0x11d1, 0xa9, 0x81, 0x0, 0xc0, 0x4f, 0xd7, 0xb1, 0x74); +#endif /* DIRECT3D_VERSION >= 0x0600 */ +#if(DIRECT3D_VERSION >= 0x0600) +DEFINE_GUID( IID_IDirect3DVertexBuffer, 0x7a503555, 0x4a83, 0x11d1, 0xa5, 0xdb, 0x0, 0xa0, 0xc9, 0x3, 0x67, 0xf8); +#endif /* DIRECT3D_VERSION >= 0x0600 */ +#if(DIRECT3D_VERSION >= 0x0700) +DEFINE_GUID( IID_IDirect3DVertexBuffer7, 0xf5049e7d, 0x4861, 0x11d2, 0xa4, 0x7, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8); +#endif /* DIRECT3D_VERSION >= 0x0700 */ +#endif + +#ifdef __cplusplus +struct IDirect3D; +struct IDirect3DDevice; +struct IDirect3DLight; +struct IDirect3DMaterial; +struct IDirect3DExecuteBuffer; +struct IDirect3DTexture; +struct IDirect3DViewport; +typedef struct IDirect3D *LPDIRECT3D; +typedef struct IDirect3DDevice *LPDIRECT3DDEVICE; +typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER; +typedef struct IDirect3DLight *LPDIRECT3DLIGHT; +typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL; +typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE; +typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT; + +#if(DIRECT3D_VERSION >= 0x0500) +struct IDirect3D2; +struct IDirect3DDevice2; +struct IDirect3DMaterial2; +struct IDirect3DTexture2; +struct IDirect3DViewport2; +typedef struct IDirect3D2 *LPDIRECT3D2; +typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2; +typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2; +typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2; +typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2; +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#if(DIRECT3D_VERSION >= 0x0600) +struct IDirect3D3; +struct IDirect3DDevice3; +struct IDirect3DMaterial3; +struct IDirect3DViewport3; +struct IDirect3DVertexBuffer; +typedef struct IDirect3D3 *LPDIRECT3D3; +typedef struct IDirect3DDevice3 *LPDIRECT3DDEVICE3; +typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3; +typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3; +typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER; +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +#if(DIRECT3D_VERSION >= 0x0700) +struct IDirect3D7; +struct IDirect3DDevice7; +struct IDirect3DVertexBuffer7; +typedef struct IDirect3D7 *LPDIRECT3D7; +typedef struct IDirect3DDevice7 *LPDIRECT3DDEVICE7; +typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7; +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +#else + +typedef struct IDirect3D *LPDIRECT3D; +typedef struct IDirect3DDevice *LPDIRECT3DDEVICE; +typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER; +typedef struct IDirect3DLight *LPDIRECT3DLIGHT; +typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL; +typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE; +typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT; + +#if(DIRECT3D_VERSION >= 0x0500) +typedef struct IDirect3D2 *LPDIRECT3D2; +typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2; +typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2; +typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2; +typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2; +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#if(DIRECT3D_VERSION >= 0x0600) +typedef struct IDirect3D3 *LPDIRECT3D3; +typedef struct IDirect3DDevice3 *LPDIRECT3DDEVICE3; +typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3; +typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3; +typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER; +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +#if(DIRECT3D_VERSION >= 0x0700) +typedef struct IDirect3D7 *LPDIRECT3D7; +typedef struct IDirect3DDevice7 *LPDIRECT3DDEVICE7; +typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7; +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +#endif + +#include "d3dtypes.h" +#include "d3dcaps.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Direct3D interfaces + */ +#undef INTERFACE +#define INTERFACE IDirect3D + +DECLARE_INTERFACE_(IDirect3D, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3D methods ***/ + STDMETHOD(Initialize)(THIS_ REFCLSID) PURE; + STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK,LPVOID) PURE; + STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT*,IUnknown*) PURE; + STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL*,IUnknown*) PURE; + STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT*,IUnknown*) PURE; + STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH,LPD3DFINDDEVICERESULT) PURE; +}; + +typedef struct IDirect3D *LPDIRECT3D; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3D_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3D_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3D_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3D_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirect3D_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b) +#define IDirect3D_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b) +#define IDirect3D_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b) +#define IDirect3D_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b) +#define IDirect3D_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b) +#else +#define IDirect3D_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3D_AddRef(p) (p)->AddRef() +#define IDirect3D_Release(p) (p)->Release() +#define IDirect3D_Initialize(p,a) (p)->Initialize(a) +#define IDirect3D_EnumDevices(p,a,b) (p)->EnumDevices(a,b) +#define IDirect3D_CreateLight(p,a,b) (p)->CreateLight(a,b) +#define IDirect3D_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b) +#define IDirect3D_CreateViewport(p,a,b) (p)->CreateViewport(a,b) +#define IDirect3D_FindDevice(p,a,b) (p)->FindDevice(a,b) +#endif + +#if(DIRECT3D_VERSION >= 0x0500) +#undef INTERFACE +#define INTERFACE IDirect3D2 + +DECLARE_INTERFACE_(IDirect3D2, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3D2 methods ***/ + STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK,LPVOID) PURE; + STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT*,IUnknown*) PURE; + STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL2*,IUnknown*) PURE; + STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT2*,IUnknown*) PURE; + STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH,LPD3DFINDDEVICERESULT) PURE; + STDMETHOD(CreateDevice)(THIS_ REFCLSID,LPDIRECTDRAWSURFACE,LPDIRECT3DDEVICE2*) PURE; +}; + +typedef struct IDirect3D2 *LPDIRECT3D2; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3D2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3D2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3D2_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3D2_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b) +#define IDirect3D2_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b) +#define IDirect3D2_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b) +#define IDirect3D2_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b) +#define IDirect3D2_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b) +#define IDirect3D2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c) +#else +#define IDirect3D2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3D2_AddRef(p) (p)->AddRef() +#define IDirect3D2_Release(p) (p)->Release() +#define IDirect3D2_EnumDevices(p,a,b) (p)->EnumDevices(a,b) +#define IDirect3D2_CreateLight(p,a,b) (p)->CreateLight(a,b) +#define IDirect3D2_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b) +#define IDirect3D2_CreateViewport(p,a,b) (p)->CreateViewport(a,b) +#define IDirect3D2_FindDevice(p,a,b) (p)->FindDevice(a,b) +#define IDirect3D2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c) +#endif +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#if(DIRECT3D_VERSION >= 0x0600) +#undef INTERFACE +#define INTERFACE IDirect3D3 + +DECLARE_INTERFACE_(IDirect3D3, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3D3 methods ***/ + STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK,LPVOID) PURE; + STDMETHOD(CreateLight)(THIS_ LPDIRECT3DLIGHT*,LPUNKNOWN) PURE; + STDMETHOD(CreateMaterial)(THIS_ LPDIRECT3DMATERIAL3*,LPUNKNOWN) PURE; + STDMETHOD(CreateViewport)(THIS_ LPDIRECT3DVIEWPORT3*,LPUNKNOWN) PURE; + STDMETHOD(FindDevice)(THIS_ LPD3DFINDDEVICESEARCH,LPD3DFINDDEVICERESULT) PURE; + STDMETHOD(CreateDevice)(THIS_ REFCLSID,LPDIRECTDRAWSURFACE4,LPDIRECT3DDEVICE3*,LPUNKNOWN) PURE; + STDMETHOD(CreateVertexBuffer)(THIS_ LPD3DVERTEXBUFFERDESC,LPDIRECT3DVERTEXBUFFER*,DWORD,LPUNKNOWN) PURE; + STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID,LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE; + STDMETHOD(EvictManagedTextures)(THIS) PURE; +}; + +typedef struct IDirect3D3 *LPDIRECT3D3; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3D3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3D3_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3D3_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3D3_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b) +#define IDirect3D3_CreateLight(p,a,b) (p)->lpVtbl->CreateLight(p,a,b) +#define IDirect3D3_CreateMaterial(p,a,b) (p)->lpVtbl->CreateMaterial(p,a,b) +#define IDirect3D3_CreateViewport(p,a,b) (p)->lpVtbl->CreateViewport(p,a,b) +#define IDirect3D3_FindDevice(p,a,b) (p)->lpVtbl->FindDevice(p,a,b) +#define IDirect3D3_CreateDevice(p,a,b,c,d) (p)->lpVtbl->CreateDevice(p,a,b,c,d) +#define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d) +#define IDirect3D3_EnumZBufferFormats(p,a,b,c) (p)->lpVtbl->EnumZBufferFormats(p,a,b,c) +#define IDirect3D3_EvictManagedTextures(p) (p)->lpVtbl->EvictManagedTextures(p) +#else +#define IDirect3D3_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3D3_AddRef(p) (p)->AddRef() +#define IDirect3D3_Release(p) (p)->Release() +#define IDirect3D3_EnumDevices(p,a,b) (p)->EnumDevices(a,b) +#define IDirect3D3_CreateLight(p,a,b) (p)->CreateLight(a,b) +#define IDirect3D3_CreateMaterial(p,a,b) (p)->CreateMaterial(a,b) +#define IDirect3D3_CreateViewport(p,a,b) (p)->CreateViewport(a,b) +#define IDirect3D3_FindDevice(p,a,b) (p)->FindDevice(a,b) +#define IDirect3D3_CreateDevice(p,a,b,c,d) (p)->CreateDevice(a,b,c,d) +#define IDirect3D3_CreateVertexBuffer(p,a,b,c,d) (p)->CreateVertexBuffer(a,b,c,d) +#define IDirect3D3_EnumZBufferFormats(p,a,b,c) (p)->EnumZBufferFormats(a,b,c) +#define IDirect3D3_EvictManagedTextures(p) (p)->EvictManagedTextures() +#endif +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +#if(DIRECT3D_VERSION >= 0x0700) +#undef INTERFACE +#define INTERFACE IDirect3D7 + +DECLARE_INTERFACE_(IDirect3D7, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3D7 methods ***/ + STDMETHOD(EnumDevices)(THIS_ LPD3DENUMDEVICESCALLBACK7,LPVOID) PURE; + STDMETHOD(CreateDevice)(THIS_ REFCLSID,LPDIRECTDRAWSURFACE7,LPDIRECT3DDEVICE7*) PURE; + STDMETHOD(CreateVertexBuffer)(THIS_ LPD3DVERTEXBUFFERDESC,LPDIRECT3DVERTEXBUFFER7*,DWORD) PURE; + STDMETHOD(EnumZBufferFormats)(THIS_ REFCLSID,LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE; + STDMETHOD(EvictManagedTextures)(THIS) PURE; +}; + +typedef struct IDirect3D7 *LPDIRECT3D7; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3D7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3D7_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3D7_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3D7_EnumDevices(p,a,b) (p)->lpVtbl->EnumDevices(p,a,b) +#define IDirect3D7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c) +#define IDirect3D7_CreateVertexBuffer(p,a,b,c) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c) +#define IDirect3D7_EnumZBufferFormats(p,a,b,c) (p)->lpVtbl->EnumZBufferFormats(p,a,b,c) +#define IDirect3D7_EvictManagedTextures(p) (p)->lpVtbl->EvictManagedTextures(p) +#else +#define IDirect3D7_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3D7_AddRef(p) (p)->AddRef() +#define IDirect3D7_Release(p) (p)->Release() +#define IDirect3D7_EnumDevices(p,a,b) (p)->EnumDevices(a,b) +#define IDirect3D7_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c) +#define IDirect3D7_CreateVertexBuffer(p,a,b,c) (p)->CreateVertexBuffer(a,b,c) +#define IDirect3D7_EnumZBufferFormats(p,a,b,c) (p)->EnumZBufferFormats(a,b,c) +#define IDirect3D7_EvictManagedTextures(p) (p)->EvictManagedTextures() +#endif +#endif /* DIRECT3D_VERSION >= 0x0700 */ +/* + * Direct3D Device interfaces + */ +#undef INTERFACE +#define INTERFACE IDirect3DDevice + +DECLARE_INTERFACE_(IDirect3DDevice, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DDevice methods ***/ + STDMETHOD(Initialize)(THIS_ LPDIRECT3D,LPGUID,LPD3DDEVICEDESC) PURE; + STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC,LPD3DDEVICEDESC) PURE; + STDMETHOD(SwapTextureHandles)(THIS_ LPDIRECT3DTEXTURE,LPDIRECT3DTEXTURE) PURE; + STDMETHOD(CreateExecuteBuffer)(THIS_ LPD3DEXECUTEBUFFERDESC,LPDIRECT3DEXECUTEBUFFER*,IUnknown*) PURE; + STDMETHOD(GetStats)(THIS_ LPD3DSTATS) PURE; + STDMETHOD(Execute)(THIS_ LPDIRECT3DEXECUTEBUFFER,LPDIRECT3DVIEWPORT,DWORD) PURE; + STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT) PURE; + STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT) PURE; + STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT,LPDIRECT3DVIEWPORT*,DWORD) PURE; + STDMETHOD(Pick)(THIS_ LPDIRECT3DEXECUTEBUFFER,LPDIRECT3DVIEWPORT,DWORD,LPD3DRECT) PURE; + STDMETHOD(GetPickRecords)(THIS_ LPDWORD,LPD3DPICKRECORD) PURE; + STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK,LPVOID) PURE; + STDMETHOD(CreateMatrix)(THIS_ LPD3DMATRIXHANDLE) PURE; + STDMETHOD(SetMatrix)(THIS_ D3DMATRIXHANDLE,const LPD3DMATRIX) PURE; + STDMETHOD(GetMatrix)(THIS_ D3DMATRIXHANDLE,LPD3DMATRIX) PURE; + STDMETHOD(DeleteMatrix)(THIS_ D3DMATRIXHANDLE) PURE; + STDMETHOD(BeginScene)(THIS) PURE; + STDMETHOD(EndScene)(THIS) PURE; + STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D*) PURE; +}; + +typedef struct IDirect3DDevice *LPDIRECT3DDEVICE; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DDevice_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DDevice_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) +#define IDirect3DDevice_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirect3DDevice_SwapTextureHandles(p,a,b) (p)->lpVtbl->SwapTextureHandles(p,a,b) +#define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->lpVtbl->CreateExecuteBuffer(p,a,b,c) +#define IDirect3DDevice_GetStats(p,a) (p)->lpVtbl->GetStats(p,a) +#define IDirect3DDevice_Execute(p,a,b,c) (p)->lpVtbl->Execute(p,a,b,c) +#define IDirect3DDevice_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a) +#define IDirect3DDevice_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a) +#define IDirect3DDevice_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c) +#define IDirect3DDevice_Pick(p,a,b,c,d) (p)->lpVtbl->Pick(p,a,b,c,d) +#define IDirect3DDevice_GetPickRecords(p,a,b) (p)->lpVtbl->GetPickRecords(p,a,b) +#define IDirect3DDevice_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b) +#define IDirect3DDevice_CreateMatrix(p,a) (p)->lpVtbl->CreateMatrix(p,a) +#define IDirect3DDevice_SetMatrix(p,a,b) (p)->lpVtbl->SetMatrix(p,a,b) +#define IDirect3DDevice_GetMatrix(p,a,b) (p)->lpVtbl->GetMatrix(p,a,b) +#define IDirect3DDevice_DeleteMatrix(p,a) (p)->lpVtbl->DeleteMatrix(p,a) +#define IDirect3DDevice_BeginScene(p) (p)->lpVtbl->BeginScene(p) +#define IDirect3DDevice_EndScene(p) (p)->lpVtbl->EndScene(p) +#define IDirect3DDevice_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a) +#else +#define IDirect3DDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DDevice_AddRef(p) (p)->AddRef() +#define IDirect3DDevice_Release(p) (p)->Release() +#define IDirect3DDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c) +#define IDirect3DDevice_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirect3DDevice_SwapTextureHandles(p,a,b) (p)->SwapTextureHandles(a,b) +#define IDirect3DDevice_CreateExecuteBuffer(p,a,b,c) (p)->CreateExecuteBuffer(a,b,c) +#define IDirect3DDevice_GetStats(p,a) (p)->GetStats(a) +#define IDirect3DDevice_Execute(p,a,b,c) (p)->Execute(a,b,c) +#define IDirect3DDevice_AddViewport(p,a) (p)->AddViewport(a) +#define IDirect3DDevice_DeleteViewport(p,a) (p)->DeleteViewport(a) +#define IDirect3DDevice_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c) +#define IDirect3DDevice_Pick(p,a,b,c,d) (p)->Pick(a,b,c,d) +#define IDirect3DDevice_GetPickRecords(p,a,b) (p)->GetPickRecords(a,b) +#define IDirect3DDevice_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b) +#define IDirect3DDevice_CreateMatrix(p,a) (p)->CreateMatrix(a) +#define IDirect3DDevice_SetMatrix(p,a,b) (p)->SetMatrix(a,b) +#define IDirect3DDevice_GetMatrix(p,a,b) (p)->GetMatrix(a,b) +#define IDirect3DDevice_DeleteMatrix(p,a) (p)->DeleteMatrix(a) +#define IDirect3DDevice_BeginScene(p) (p)->BeginScene() +#define IDirect3DDevice_EndScene(p) (p)->EndScene() +#define IDirect3DDevice_GetDirect3D(p,a) (p)->GetDirect3D(a) +#endif + +#if(DIRECT3D_VERSION >= 0x0500) +#undef INTERFACE +#define INTERFACE IDirect3DDevice2 + +DECLARE_INTERFACE_(IDirect3DDevice2, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DDevice2 methods ***/ + STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC,LPD3DDEVICEDESC) PURE; + STDMETHOD(SwapTextureHandles)(THIS_ LPDIRECT3DTEXTURE2,LPDIRECT3DTEXTURE2) PURE; + STDMETHOD(GetStats)(THIS_ LPD3DSTATS) PURE; + STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT2) PURE; + STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT2) PURE; + STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT2,LPDIRECT3DVIEWPORT2*,DWORD) PURE; + STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMTEXTUREFORMATSCALLBACK,LPVOID) PURE; + STDMETHOD(BeginScene)(THIS) PURE; + STDMETHOD(EndScene)(THIS) PURE; + STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D2*) PURE; + STDMETHOD(SetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT2) PURE; + STDMETHOD(GetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT2 *) PURE; + STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE,DWORD) PURE; + STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE *) PURE; + STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,DWORD) PURE; + STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(Vertex)(THIS_ LPVOID) PURE; + STDMETHOD(Index)(THIS_ WORD) PURE; + STDMETHOD(End)(THIS_ DWORD) PURE; + STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,LPDWORD) PURE; + STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE; + STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE,LPDWORD) PURE; + STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE,DWORD) PURE; + STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE; + STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE; + STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE; + STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,D3DVERTEXTYPE,LPVOID,DWORD,LPWORD,DWORD,DWORD) PURE; + STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE; + STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE; +}; + +typedef struct IDirect3DDevice2 *LPDIRECT3DDEVICE2; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DDevice2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DDevice2_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DDevice2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirect3DDevice2_SwapTextureHandles(p,a,b) (p)->lpVtbl->SwapTextureHandles(p,a,b) +#define IDirect3DDevice2_GetStats(p,a) (p)->lpVtbl->GetStats(p,a) +#define IDirect3DDevice2_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a) +#define IDirect3DDevice2_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a) +#define IDirect3DDevice2_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c) +#define IDirect3DDevice2_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b) +#define IDirect3DDevice2_BeginScene(p) (p)->lpVtbl->BeginScene(p) +#define IDirect3DDevice2_EndScene(p) (p)->lpVtbl->EndScene(p) +#define IDirect3DDevice2_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a) +#define IDirect3DDevice2_SetCurrentViewport(p,a) (p)->lpVtbl->SetCurrentViewport(p,a) +#define IDirect3DDevice2_GetCurrentViewport(p,a) (p)->lpVtbl->GetCurrentViewport(p,a) +#define IDirect3DDevice2_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b) +#define IDirect3DDevice2_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a) +#define IDirect3DDevice2_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c) +#define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e) +#define IDirect3DDevice2_Vertex(p,a) (p)->lpVtbl->Vertex(p,a) +#define IDirect3DDevice2_Index(p,a) (p)->lpVtbl->Index(p,a) +#define IDirect3DDevice2_End(p,a) (p)->lpVtbl->End(p,a) +#define IDirect3DDevice2_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b) +#define IDirect3DDevice2_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b) +#define IDirect3DDevice2_GetLightState(p,a,b) (p)->lpVtbl->GetLightState(p,a,b) +#define IDirect3DDevice2_SetLightState(p,a,b) (p)->lpVtbl->SetLightState(p,a,b) +#define IDirect3DDevice2_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b) +#define IDirect3DDevice2_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b) +#define IDirect3DDevice2_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b) +#define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e) +#define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g) +#define IDirect3DDevice2_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a) +#define IDirect3DDevice2_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a) +#else +#define IDirect3DDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DDevice2_AddRef(p) (p)->AddRef() +#define IDirect3DDevice2_Release(p) (p)->Release() +#define IDirect3DDevice2_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirect3DDevice2_SwapTextureHandles(p,a,b) (p)->SwapTextureHandles(a,b) +#define IDirect3DDevice2_GetStats(p,a) (p)->GetStats(a) +#define IDirect3DDevice2_AddViewport(p,a) (p)->AddViewport(a) +#define IDirect3DDevice2_DeleteViewport(p,a) (p)->DeleteViewport(a) +#define IDirect3DDevice2_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c) +#define IDirect3DDevice2_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b) +#define IDirect3DDevice2_BeginScene(p) (p)->BeginScene() +#define IDirect3DDevice2_EndScene(p) (p)->EndScene() +#define IDirect3DDevice2_GetDirect3D(p,a) (p)->GetDirect3D(a) +#define IDirect3DDevice2_SetCurrentViewport(p,a) (p)->SetCurrentViewport(a) +#define IDirect3DDevice2_GetCurrentViewport(p,a) (p)->GetCurrentViewport(a) +#define IDirect3DDevice2_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b) +#define IDirect3DDevice2_GetRenderTarget(p,a) (p)->GetRenderTarget(a) +#define IDirect3DDevice2_Begin(p,a,b,c) (p)->Begin(a,b,c) +#define IDirect3DDevice2_BeginIndexed(p,a,b,c,d,e) (p)->BeginIndexed(a,b,c,d,e) +#define IDirect3DDevice2_Vertex(p,a) (p)->Vertex(a) +#define IDirect3DDevice2_Index(p,a) (p)->Index(a) +#define IDirect3DDevice2_End(p,a) (p)->End(a) +#define IDirect3DDevice2_GetRenderState(p,a,b) (p)->GetRenderState(a,b) +#define IDirect3DDevice2_SetRenderState(p,a,b) (p)->SetRenderState(a,b) +#define IDirect3DDevice2_GetLightState(p,a,b) (p)->GetLightState(a,b) +#define IDirect3DDevice2_SetLightState(p,a,b) (p)->SetLightState(a,b) +#define IDirect3DDevice2_SetTransform(p,a,b) (p)->SetTransform(a,b) +#define IDirect3DDevice2_GetTransform(p,a,b) (p)->GetTransform(a,b) +#define IDirect3DDevice2_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b) +#define IDirect3DDevice2_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e) +#define IDirect3DDevice2_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g) +#define IDirect3DDevice2_SetClipStatus(p,a) (p)->SetClipStatus(a) +#define IDirect3DDevice2_GetClipStatus(p,a) (p)->GetClipStatus(a) +#endif +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#if(DIRECT3D_VERSION >= 0x0600) +#undef INTERFACE +#define INTERFACE IDirect3DDevice3 + +DECLARE_INTERFACE_(IDirect3DDevice3, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DDevice3 methods ***/ + STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC,LPD3DDEVICEDESC) PURE; + STDMETHOD(GetStats)(THIS_ LPD3DSTATS) PURE; + STDMETHOD(AddViewport)(THIS_ LPDIRECT3DVIEWPORT3) PURE; + STDMETHOD(DeleteViewport)(THIS_ LPDIRECT3DVIEWPORT3) PURE; + STDMETHOD(NextViewport)(THIS_ LPDIRECT3DVIEWPORT3,LPDIRECT3DVIEWPORT3*,DWORD) PURE; + STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE; + STDMETHOD(BeginScene)(THIS) PURE; + STDMETHOD(EndScene)(THIS) PURE; + STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D3*) PURE; + STDMETHOD(SetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT3) PURE; + STDMETHOD(GetCurrentViewport)(THIS_ LPDIRECT3DVIEWPORT3 *) PURE; + STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE4,DWORD) PURE; + STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE4 *) PURE; + STDMETHOD(Begin)(THIS_ D3DPRIMITIVETYPE,DWORD,DWORD) PURE; + STDMETHOD(BeginIndexed)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(Vertex)(THIS_ LPVOID) PURE; + STDMETHOD(Index)(THIS_ WORD) PURE; + STDMETHOD(End)(THIS_ DWORD) PURE; + STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,LPDWORD) PURE; + STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE; + STDMETHOD(GetLightState)(THIS_ D3DLIGHTSTATETYPE,LPDWORD) PURE; + STDMETHOD(SetLightState)(THIS_ D3DLIGHTSTATETYPE,DWORD) PURE; + STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE; + STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE; + STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE; + STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,LPWORD,DWORD,DWORD) PURE; + STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE; + STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE; + STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,DWORD) PURE; + STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,LPWORD,DWORD,DWORD) PURE; + STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER,DWORD,DWORD,DWORD) PURE; + STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER,LPWORD,DWORD,DWORD) PURE; + STDMETHOD(ComputeSphereVisibility)(THIS_ LPD3DVECTOR,LPD3DVALUE,DWORD,DWORD,LPDWORD) PURE; + STDMETHOD(GetTexture)(THIS_ DWORD,LPDIRECT3DTEXTURE2 *) PURE; + STDMETHOD(SetTexture)(THIS_ DWORD,LPDIRECT3DTEXTURE2) PURE; + STDMETHOD(GetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,LPDWORD) PURE; + STDMETHOD(SetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,DWORD) PURE; + STDMETHOD(ValidateDevice)(THIS_ LPDWORD) PURE; +}; + +typedef struct IDirect3DDevice3 *LPDIRECT3DDEVICE3; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DDevice3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DDevice3_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DDevice3_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DDevice3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirect3DDevice3_GetStats(p,a) (p)->lpVtbl->GetStats(p,a) +#define IDirect3DDevice3_AddViewport(p,a) (p)->lpVtbl->AddViewport(p,a) +#define IDirect3DDevice3_DeleteViewport(p,a) (p)->lpVtbl->DeleteViewport(p,a) +#define IDirect3DDevice3_NextViewport(p,a,b,c) (p)->lpVtbl->NextViewport(p,a,b,c) +#define IDirect3DDevice3_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b) +#define IDirect3DDevice3_BeginScene(p) (p)->lpVtbl->BeginScene(p) +#define IDirect3DDevice3_EndScene(p) (p)->lpVtbl->EndScene(p) +#define IDirect3DDevice3_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a) +#define IDirect3DDevice3_SetCurrentViewport(p,a) (p)->lpVtbl->SetCurrentViewport(p,a) +#define IDirect3DDevice3_GetCurrentViewport(p,a) (p)->lpVtbl->GetCurrentViewport(p,a) +#define IDirect3DDevice3_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b) +#define IDirect3DDevice3_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a) +#define IDirect3DDevice3_Begin(p,a,b,c) (p)->lpVtbl->Begin(p,a,b,c) +#define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) (p)->lpVtbl->BeginIndexed(p,a,b,c,d,e) +#define IDirect3DDevice3_Vertex(p,a) (p)->lpVtbl->Vertex(p,a) +#define IDirect3DDevice3_Index(p,a) (p)->lpVtbl->Index(p,a) +#define IDirect3DDevice3_End(p,a) (p)->lpVtbl->End(p,a) +#define IDirect3DDevice3_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b) +#define IDirect3DDevice3_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b) +#define IDirect3DDevice3_GetLightState(p,a,b) (p)->lpVtbl->GetLightState(p,a,b) +#define IDirect3DDevice3_SetLightState(p,a,b) (p)->lpVtbl->SetLightState(p,a,b) +#define IDirect3DDevice3_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b) +#define IDirect3DDevice3_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b) +#define IDirect3DDevice3_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b) +#define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e) +#define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g) +#define IDirect3DDevice3_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a) +#define IDirect3DDevice3_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a) +#define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e) +#define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) +#define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e) +#define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e) +#define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e) +#define IDirect3DDevice3_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b) +#define IDirect3DDevice3_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b) +#define IDirect3DDevice3_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c) +#define IDirect3DDevice3_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c) +#define IDirect3DDevice3_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a) +#else +#define IDirect3DDevice3_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DDevice3_AddRef(p) (p)->AddRef() +#define IDirect3DDevice3_Release(p) (p)->Release() +#define IDirect3DDevice3_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirect3DDevice3_GetStats(p,a) (p)->GetStats(a) +#define IDirect3DDevice3_AddViewport(p,a) (p)->AddViewport(a) +#define IDirect3DDevice3_DeleteViewport(p,a) (p)->DeleteViewport(a) +#define IDirect3DDevice3_NextViewport(p,a,b,c) (p)->NextViewport(a,b,c) +#define IDirect3DDevice3_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b) +#define IDirect3DDevice3_BeginScene(p) (p)->BeginScene() +#define IDirect3DDevice3_EndScene(p) (p)->EndScene() +#define IDirect3DDevice3_GetDirect3D(p,a) (p)->GetDirect3D(a) +#define IDirect3DDevice3_SetCurrentViewport(p,a) (p)->SetCurrentViewport(a) +#define IDirect3DDevice3_GetCurrentViewport(p,a) (p)->GetCurrentViewport(a) +#define IDirect3DDevice3_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b) +#define IDirect3DDevice3_GetRenderTarget(p,a) (p)->GetRenderTarget(a) +#define IDirect3DDevice3_Begin(p,a,b,c) (p)->Begin(a,b,c) +#define IDirect3DDevice3_BeginIndexed(p,a,b,c,d,e) (p)->BeginIndexed(a,b,c,d,e) +#define IDirect3DDevice3_Vertex(p,a) (p)->Vertex(a) +#define IDirect3DDevice3_Index(p,a) (p)->Index(a) +#define IDirect3DDevice3_End(p,a) (p)->End(a) +#define IDirect3DDevice3_GetRenderState(p,a,b) (p)->GetRenderState(a,b) +#define IDirect3DDevice3_SetRenderState(p,a,b) (p)->SetRenderState(a,b) +#define IDirect3DDevice3_GetLightState(p,a,b) (p)->GetLightState(a,b) +#define IDirect3DDevice3_SetLightState(p,a,b) (p)->SetLightState(a,b) +#define IDirect3DDevice3_SetTransform(p,a,b) (p)->SetTransform(a,b) +#define IDirect3DDevice3_GetTransform(p,a,b) (p)->GetTransform(a,b) +#define IDirect3DDevice3_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b) +#define IDirect3DDevice3_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e) +#define IDirect3DDevice3_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g) +#define IDirect3DDevice3_SetClipStatus(p,a) (p)->SetClipStatus(a) +#define IDirect3DDevice3_GetClipStatus(p,a) (p)->GetClipStatus(a) +#define IDirect3DDevice3_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->DrawPrimitiveStrided(a,b,c,d,e) +#define IDirect3DDevice3_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveStrided(a,b,c,d,e,f,g) +#define IDirect3DDevice3_DrawPrimitiveVB(p,a,b,c,d,e) (p)->DrawPrimitiveVB(a,b,c,d,e) +#define IDirect3DDevice3_DrawIndexedPrimitiveVB(p,a,b,c,d,e) (p)->DrawIndexedPrimitiveVB(a,b,c,d,e) +#define IDirect3DDevice3_ComputeSphereVisibility(p,a,b,c,d,e) (p)->ComputeSphereVisibility(a,b,c,d,e) +#define IDirect3DDevice3_GetTexture(p,a,b) (p)->GetTexture(a,b) +#define IDirect3DDevice3_SetTexture(p,a,b) (p)->SetTexture(a,b) +#define IDirect3DDevice3_GetTextureStageState(p,a,b,c) (p)->GetTextureStageState(a,b,c) +#define IDirect3DDevice3_SetTextureStageState(p,a,b,c) (p)->SetTextureStageState(a,b,c) +#define IDirect3DDevice3_ValidateDevice(p,a) (p)->ValidateDevice(a) +#endif +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +#if(DIRECT3D_VERSION >= 0x0700) +#undef INTERFACE +#define INTERFACE IDirect3DDevice7 + +DECLARE_INTERFACE_(IDirect3DDevice7, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DDevice7 methods ***/ + STDMETHOD(GetCaps)(THIS_ LPD3DDEVICEDESC7) PURE; + STDMETHOD(EnumTextureFormats)(THIS_ LPD3DENUMPIXELFORMATSCALLBACK,LPVOID) PURE; + STDMETHOD(BeginScene)(THIS) PURE; + STDMETHOD(EndScene)(THIS) PURE; + STDMETHOD(GetDirect3D)(THIS_ LPDIRECT3D7*) PURE; + STDMETHOD(SetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE7,DWORD) PURE; + STDMETHOD(GetRenderTarget)(THIS_ LPDIRECTDRAWSURFACE7 *) PURE; + STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD,D3DCOLOR,D3DVALUE,DWORD) PURE; + STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE; + STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE; + STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT7) PURE; + STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,LPD3DMATRIX) PURE; + STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT7) PURE; + STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL7) PURE; + STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL7) PURE; + STDMETHOD(SetLight)(THIS_ DWORD,LPD3DLIGHT7) PURE; + STDMETHOD(GetLight)(THIS_ DWORD,LPD3DLIGHT7) PURE; + STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE,DWORD) PURE; + STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE,LPDWORD) PURE; + STDMETHOD(BeginStateBlock)(THIS) PURE; + STDMETHOD(EndStateBlock)(THIS_ LPDWORD) PURE; + STDMETHOD(PreLoad)(THIS_ LPDIRECTDRAWSURFACE7) PURE; + STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,DWORD,LPVOID,DWORD,LPWORD,DWORD,DWORD) PURE; + STDMETHOD(SetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE; + STDMETHOD(GetClipStatus)(THIS_ LPD3DCLIPSTATUS) PURE; + STDMETHOD(DrawPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,DWORD) PURE; + STDMETHOD(DrawIndexedPrimitiveStrided)(THIS_ D3DPRIMITIVETYPE,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,LPWORD,DWORD,DWORD) PURE; + STDMETHOD(DrawPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER7,DWORD,DWORD,DWORD) PURE; + STDMETHOD(DrawIndexedPrimitiveVB)(THIS_ D3DPRIMITIVETYPE,LPDIRECT3DVERTEXBUFFER7,DWORD,DWORD,LPWORD,DWORD,DWORD) PURE; + STDMETHOD(ComputeSphereVisibility)(THIS_ LPD3DVECTOR,LPD3DVALUE,DWORD,DWORD,LPDWORD) PURE; + STDMETHOD(GetTexture)(THIS_ DWORD,LPDIRECTDRAWSURFACE7 *) PURE; + STDMETHOD(SetTexture)(THIS_ DWORD,LPDIRECTDRAWSURFACE7) PURE; + STDMETHOD(GetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,LPDWORD) PURE; + STDMETHOD(SetTextureStageState)(THIS_ DWORD,D3DTEXTURESTAGESTATETYPE,DWORD) PURE; + STDMETHOD(ValidateDevice)(THIS_ LPDWORD) PURE; + STDMETHOD(ApplyStateBlock)(THIS_ DWORD) PURE; + STDMETHOD(CaptureStateBlock)(THIS_ DWORD) PURE; + STDMETHOD(DeleteStateBlock)(THIS_ DWORD) PURE; + STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE,LPDWORD) PURE; + STDMETHOD(Load)(THIS_ LPDIRECTDRAWSURFACE7,LPPOINT,LPDIRECTDRAWSURFACE7,LPRECT,DWORD) PURE; + STDMETHOD(LightEnable)(THIS_ DWORD,BOOL) PURE; + STDMETHOD(GetLightEnable)(THIS_ DWORD,BOOL*) PURE; + STDMETHOD(SetClipPlane)(THIS_ DWORD,D3DVALUE*) PURE; + STDMETHOD(GetClipPlane)(THIS_ DWORD,D3DVALUE*) PURE; + STDMETHOD(GetInfo)(THIS_ DWORD,LPVOID,DWORD) PURE; +}; + +typedef struct IDirect3DDevice7 *LPDIRECT3DDEVICE7; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DDevice7_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DDevice7_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DDevice7_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirect3DDevice7_EnumTextureFormats(p,a,b) (p)->lpVtbl->EnumTextureFormats(p,a,b) +#define IDirect3DDevice7_BeginScene(p) (p)->lpVtbl->BeginScene(p) +#define IDirect3DDevice7_EndScene(p) (p)->lpVtbl->EndScene(p) +#define IDirect3DDevice7_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a) +#define IDirect3DDevice7_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b) +#define IDirect3DDevice7_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a) +#define IDirect3DDevice7_Clear(p,a,b,c,d,e,f) (p)->lpVtbl->Clear(p,a,b,c,d,e,f) +#define IDirect3DDevice7_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b) +#define IDirect3DDevice7_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b) +#define IDirect3DDevice7_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a) +#define IDirect3DDevice7_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b) +#define IDirect3DDevice7_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a) +#define IDirect3DDevice7_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a) +#define IDirect3DDevice7_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a) +#define IDirect3DDevice7_SetLight(p,a,b) (p)->lpVtbl->SetLight(p,a,b) +#define IDirect3DDevice7_GetLight(p,a,b) (p)->lpVtbl->GetLight(p,a,b) +#define IDirect3DDevice7_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b) +#define IDirect3DDevice7_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b) +#define IDirect3DDevice7_BeginStateBlock(p) (p)->lpVtbl->BeginStateBlock(p) +#define IDirect3DDevice7_EndStateBlock(p,a) (p)->lpVtbl->EndStateBlock(p,a) +#define IDirect3DDevice7_PreLoad(p,a) (p)->lpVtbl->PreLoad(p,a) +#define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitive(p,a,b,c,d,e) +#define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e,f,g) +#define IDirect3DDevice7_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a) +#define IDirect3DDevice7_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a) +#define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveStrided(p,a,b,c,d,e) +#define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) +#define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e) (p)->lpVtbl->DrawPrimitiveVB(p,a,b,c,d,e) +#define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) (p)->lpVtbl->DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) +#define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e) (p)->lpVtbl->ComputeSphereVisibility(p,a,b,c,d,e) +#define IDirect3DDevice7_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b) +#define IDirect3DDevice7_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b) +#define IDirect3DDevice7_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c) +#define IDirect3DDevice7_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c) +#define IDirect3DDevice7_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a) +#define IDirect3DDevice7_ApplyStateBlock(p,a) (p)->lpVtbl->ApplyStateBlock(p,a) +#define IDirect3DDevice7_CaptureStateBlock(p,a) (p)->lpVtbl->CaptureStateBlock(p,a) +#define IDirect3DDevice7_DeleteStateBlock(p,a) (p)->lpVtbl->DeleteStateBlock(p,a) +#define IDirect3DDevice7_CreateStateBlock(p,a,b) (p)->lpVtbl->CreateStateBlock(p,a,b) +#define IDirect3DDevice7_Load(p,a,b,c,d,e) (p)->lpVtbl->Load(p,a,b,c,d,e) +#define IDirect3DDevice7_LightEnable(p,a,b) (p)->lpVtbl->LightEnable(p,a,b) +#define IDirect3DDevice7_GetLightEnable(p,a,b) (p)->lpVtbl->GetLightEnable(p,a,b) +#define IDirect3DDevice7_SetClipPlane(p,a,b) (p)->lpVtbl->SetClipPlane(p,a,b) +#define IDirect3DDevice7_GetClipPlane(p,a,b) (p)->lpVtbl->GetClipPlane(p,a,b) +#define IDirect3DDevice7_GetInfo(p,a,b,c) (p)->lpVtbl->GetInfo(p,a,b,c) +#else +#define IDirect3DDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DDevice7_AddRef(p) (p)->AddRef() +#define IDirect3DDevice7_Release(p) (p)->Release() +#define IDirect3DDevice7_GetCaps(p,a) (p)->GetCaps(a) +#define IDirect3DDevice7_EnumTextureFormats(p,a,b) (p)->EnumTextureFormats(a,b) +#define IDirect3DDevice7_BeginScene(p) (p)->BeginScene() +#define IDirect3DDevice7_EndScene(p) (p)->EndScene() +#define IDirect3DDevice7_GetDirect3D(p,a) (p)->GetDirect3D(a) +#define IDirect3DDevice7_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b) +#define IDirect3DDevice7_GetRenderTarget(p,a) (p)->GetRenderTarget(a) +#define IDirect3DDevice7_Clear(p,a,b,c,d,e,f) (p)->Clear(a,b,c,d,e,f) +#define IDirect3DDevice7_SetTransform(p,a,b) (p)->SetTransform(a,b) +#define IDirect3DDevice7_GetTransform(p,a,b) (p)->GetTransform(a,b) +#define IDirect3DDevice7_SetViewport(p,a) (p)->SetViewport(a) +#define IDirect3DDevice7_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b) +#define IDirect3DDevice7_GetViewport(p,a) (p)->GetViewport(a) +#define IDirect3DDevice7_SetMaterial(p,a) (p)->SetMaterial(a) +#define IDirect3DDevice7_GetMaterial(p,a) (p)->GetMaterial(a) +#define IDirect3DDevice7_SetLight(p,a,b) (p)->SetLight(a,b) +#define IDirect3DDevice7_GetLight(p,a,b) (p)->GetLight(a,b) +#define IDirect3DDevice7_SetRenderState(p,a,b) (p)->SetRenderState(a,b) +#define IDirect3DDevice7_GetRenderState(p,a,b) (p)->GetRenderState(a,b) +#define IDirect3DDevice7_BeginStateBlock(p) (p)->BeginStateBlock() +#define IDirect3DDevice7_EndStateBlock(p,a) (p)->EndStateBlock(a) +#define IDirect3DDevice7_PreLoad(p,a) (p)->PreLoad(a) +#define IDirect3DDevice7_DrawPrimitive(p,a,b,c,d,e) (p)->DrawPrimitive(a,b,c,d,e) +#define IDirect3DDevice7_DrawIndexedPrimitive(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitive(a,b,c,d,e,f,g) +#define IDirect3DDevice7_SetClipStatus(p,a) (p)->SetClipStatus(a) +#define IDirect3DDevice7_GetClipStatus(p,a) (p)->GetClipStatus(a) +#define IDirect3DDevice7_DrawPrimitiveStrided(p,a,b,c,d,e) (p)->DrawPrimitiveStrided(a,b,c,d,e) +#define IDirect3DDevice7_DrawIndexedPrimitiveStrided(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveStrided(a,b,c,d,e,f,g) +#define IDirect3DDevice7_DrawPrimitiveVB(p,a,b,c,d,e) (p)->DrawPrimitiveVB(a,b,c,d,e) +#define IDirect3DDevice7_DrawIndexedPrimitiveVB(p,a,b,c,d,e,f,g) (p)->DrawIndexedPrimitiveVB(a,b,c,d,e,f,g) +#define IDirect3DDevice7_ComputeSphereVisibility(p,a,b,c,d,e) (p)->ComputeSphereVisibility(a,b,c,d,e) +#define IDirect3DDevice7_GetTexture(p,a,b) (p)->GetTexture(a,b) +#define IDirect3DDevice7_SetTexture(p,a,b) (p)->SetTexture(a,b) +#define IDirect3DDevice7_GetTextureStageState(p,a,b,c) (p)->GetTextureStageState(a,b,c) +#define IDirect3DDevice7_SetTextureStageState(p,a,b,c) (p)->SetTextureStageState(a,b,c) +#define IDirect3DDevice7_ValidateDevice(p,a) (p)->ValidateDevice(a) +#define IDirect3DDevice7_ApplyStateBlock(p,a) (p)->ApplyStateBlock(a) +#define IDirect3DDevice7_CaptureStateBlock(p,a) (p)->CaptureStateBlock(a) +#define IDirect3DDevice7_DeleteStateBlock(p,a) (p)->DeleteStateBlock(a) +#define IDirect3DDevice7_CreateStateBlock(p,a,b) (p)->CreateStateBlock(a,b) +#define IDirect3DDevice7_Load(p,a,b,c,d,e) (p)->Load(a,b,c,d,e) +#define IDirect3DDevice7_LightEnable(p,a,b) (p)->LightEnable(a,b) +#define IDirect3DDevice7_GetLightEnable(p,a,b) (p)->GetLightEnable(a,b) +#define IDirect3DDevice7_SetClipPlane(p,a,b) (p)->SetClipPlane(a,b) +#define IDirect3DDevice7_GetClipPlane(p,a,b) (p)->GetClipPlane(a,b) +#define IDirect3DDevice7_GetInfo(p,a,b,c) (p)->GetInfo(a,b,c) +#endif +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +/* + * Execute Buffer interface + */ +#undef INTERFACE +#define INTERFACE IDirect3DExecuteBuffer + +DECLARE_INTERFACE_(IDirect3DExecuteBuffer, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DExecuteBuffer methods ***/ + STDMETHOD(Initialize)(THIS_ LPDIRECT3DDEVICE,LPD3DEXECUTEBUFFERDESC) PURE; + STDMETHOD(Lock)(THIS_ LPD3DEXECUTEBUFFERDESC) PURE; + STDMETHOD(Unlock)(THIS) PURE; + STDMETHOD(SetExecuteData)(THIS_ LPD3DEXECUTEDATA) PURE; + STDMETHOD(GetExecuteData)(THIS_ LPD3DEXECUTEDATA) PURE; + STDMETHOD(Validate)(THIS_ LPDWORD,LPD3DVALIDATECALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(Optimize)(THIS_ DWORD) PURE; +}; + +typedef struct IDirect3DExecuteBuffer *LPDIRECT3DEXECUTEBUFFER; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DExecuteBuffer_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DExecuteBuffer_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DExecuteBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirect3DExecuteBuffer_Lock(p,a) (p)->lpVtbl->Lock(p,a) +#define IDirect3DExecuteBuffer_Unlock(p) (p)->lpVtbl->Unlock(p) +#define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->lpVtbl->SetExecuteData(p,a) +#define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->lpVtbl->GetExecuteData(p,a) +#define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->lpVtbl->Validate(p,a,b,c,d) +#define IDirect3DExecuteBuffer_Optimize(p,a) (p)->lpVtbl->Optimize(p,a) +#else +#define IDirect3DExecuteBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DExecuteBuffer_AddRef(p) (p)->AddRef() +#define IDirect3DExecuteBuffer_Release(p) (p)->Release() +#define IDirect3DExecuteBuffer_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirect3DExecuteBuffer_Lock(p,a) (p)->Lock(a) +#define IDirect3DExecuteBuffer_Unlock(p) (p)->Unlock() +#define IDirect3DExecuteBuffer_SetExecuteData(p,a) (p)->SetExecuteData(a) +#define IDirect3DExecuteBuffer_GetExecuteData(p,a) (p)->GetExecuteData(a) +#define IDirect3DExecuteBuffer_Validate(p,a,b,c,d) (p)->Validate(a,b,c,d) +#define IDirect3DExecuteBuffer_Optimize(p,a) (p)->Optimize(a) +#endif + +/* + * Light interfaces + */ +#undef INTERFACE +#define INTERFACE IDirect3DLight + +DECLARE_INTERFACE_(IDirect3DLight, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DLight methods ***/ + STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE; + STDMETHOD(SetLight)(THIS_ LPD3DLIGHT) PURE; + STDMETHOD(GetLight)(THIS_ LPD3DLIGHT) PURE; +}; + +typedef struct IDirect3DLight *LPDIRECT3DLIGHT; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DLight_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DLight_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DLight_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DLight_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirect3DLight_SetLight(p,a) (p)->lpVtbl->SetLight(p,a) +#define IDirect3DLight_GetLight(p,a) (p)->lpVtbl->GetLight(p,a) +#else +#define IDirect3DLight_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DLight_AddRef(p) (p)->AddRef() +#define IDirect3DLight_Release(p) (p)->Release() +#define IDirect3DLight_Initialize(p,a) (p)->Initialize(a) +#define IDirect3DLight_SetLight(p,a) (p)->SetLight(a) +#define IDirect3DLight_GetLight(p,a) (p)->GetLight(a) +#endif + +/* + * Material interfaces + */ +#undef INTERFACE +#define INTERFACE IDirect3DMaterial + +DECLARE_INTERFACE_(IDirect3DMaterial, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DMaterial methods ***/ + STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE; + STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL) PURE; + STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL) PURE; + STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE,LPD3DMATERIALHANDLE) PURE; + STDMETHOD(Reserve)(THIS) PURE; + STDMETHOD(Unreserve)(THIS) PURE; +}; + +typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DMaterial_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DMaterial_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DMaterial_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DMaterial_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirect3DMaterial_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a) +#define IDirect3DMaterial_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a) +#define IDirect3DMaterial_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b) +#define IDirect3DMaterial_Reserve(p) (p)->lpVtbl->Reserve(p) +#define IDirect3DMaterial_Unreserve(p) (p)->lpVtbl->Unreserve(p) +#else +#define IDirect3DMaterial_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DMaterial_AddRef(p) (p)->AddRef() +#define IDirect3DMaterial_Release(p) (p)->Release() +#define IDirect3DMaterial_Initialize(p,a) (p)->Initialize(a) +#define IDirect3DMaterial_SetMaterial(p,a) (p)->SetMaterial(a) +#define IDirect3DMaterial_GetMaterial(p,a) (p)->GetMaterial(a) +#define IDirect3DMaterial_GetHandle(p,a,b) (p)->GetHandle(a,b) +#define IDirect3DMaterial_Reserve(p) (p)->Reserve() +#define IDirect3DMaterial_Unreserve(p) (p)->Unreserve() +#endif + +#if(DIRECT3D_VERSION >= 0x0500) +#undef INTERFACE +#define INTERFACE IDirect3DMaterial2 + +DECLARE_INTERFACE_(IDirect3DMaterial2, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DMaterial2 methods ***/ + STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL) PURE; + STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL) PURE; + STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE2,LPD3DMATERIALHANDLE) PURE; +}; + +typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DMaterial2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DMaterial2_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DMaterial2_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a) +#define IDirect3DMaterial2_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a) +#define IDirect3DMaterial2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b) +#else +#define IDirect3DMaterial2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DMaterial2_AddRef(p) (p)->AddRef() +#define IDirect3DMaterial2_Release(p) (p)->Release() +#define IDirect3DMaterial2_SetMaterial(p,a) (p)->SetMaterial(a) +#define IDirect3DMaterial2_GetMaterial(p,a) (p)->GetMaterial(a) +#define IDirect3DMaterial2_GetHandle(p,a,b) (p)->GetHandle(a,b) +#endif +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#if(DIRECT3D_VERSION >= 0x0600) +#undef INTERFACE +#define INTERFACE IDirect3DMaterial3 + +DECLARE_INTERFACE_(IDirect3DMaterial3, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DMaterial3 methods ***/ + STDMETHOD(SetMaterial)(THIS_ LPD3DMATERIAL) PURE; + STDMETHOD(GetMaterial)(THIS_ LPD3DMATERIAL) PURE; + STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE3,LPD3DMATERIALHANDLE) PURE; +}; + +typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DMaterial3_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DMaterial3_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DMaterial3_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a) +#define IDirect3DMaterial3_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a) +#define IDirect3DMaterial3_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b) +#else +#define IDirect3DMaterial3_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DMaterial3_AddRef(p) (p)->AddRef() +#define IDirect3DMaterial3_Release(p) (p)->Release() +#define IDirect3DMaterial3_SetMaterial(p,a) (p)->SetMaterial(a) +#define IDirect3DMaterial3_GetMaterial(p,a) (p)->GetMaterial(a) +#define IDirect3DMaterial3_GetHandle(p,a,b) (p)->GetHandle(a,b) +#endif +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +/* + * Texture interfaces + */ +#undef INTERFACE +#define INTERFACE IDirect3DTexture + +DECLARE_INTERFACE_(IDirect3DTexture, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DTexture methods ***/ + STDMETHOD(Initialize)(THIS_ LPDIRECT3DDEVICE,LPDIRECTDRAWSURFACE) PURE; + STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE,LPD3DTEXTUREHANDLE) PURE; + STDMETHOD(PaletteChanged)(THIS_ DWORD,DWORD) PURE; + STDMETHOD(Load)(THIS_ LPDIRECT3DTEXTURE) PURE; + STDMETHOD(Unload)(THIS) PURE; +}; + +typedef struct IDirect3DTexture *LPDIRECT3DTEXTURE; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DTexture_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DTexture_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DTexture_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DTexture_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirect3DTexture_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b) +#define IDirect3DTexture_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b) +#define IDirect3DTexture_Load(p,a) (p)->lpVtbl->Load(p,a) +#define IDirect3DTexture_Unload(p) (p)->lpVtbl->Unload(p) +#else +#define IDirect3DTexture_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DTexture_AddRef(p) (p)->AddRef() +#define IDirect3DTexture_Release(p) (p)->Release() +#define IDirect3DTexture_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirect3DTexture_GetHandle(p,a,b) (p)->GetHandle(a,b) +#define IDirect3DTexture_PaletteChanged(p,a,b) (p)->PaletteChanged(a,b) +#define IDirect3DTexture_Load(p,a) (p)->Load(a) +#define IDirect3DTexture_Unload(p) (p)->Unload() +#endif + +#if(DIRECT3D_VERSION >= 0x0500) +#undef INTERFACE +#define INTERFACE IDirect3DTexture2 + +DECLARE_INTERFACE_(IDirect3DTexture2, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DTexture2 methods ***/ + STDMETHOD(GetHandle)(THIS_ LPDIRECT3DDEVICE2,LPD3DTEXTUREHANDLE) PURE; + STDMETHOD(PaletteChanged)(THIS_ DWORD,DWORD) PURE; + STDMETHOD(Load)(THIS_ LPDIRECT3DTEXTURE2) PURE; +}; + +typedef struct IDirect3DTexture2 *LPDIRECT3DTEXTURE2; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DTexture2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DTexture2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DTexture2_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DTexture2_GetHandle(p,a,b) (p)->lpVtbl->GetHandle(p,a,b) +#define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->lpVtbl->PaletteChanged(p,a,b) +#define IDirect3DTexture2_Load(p,a) (p)->lpVtbl->Load(p,a) +#else +#define IDirect3DTexture2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DTexture2_AddRef(p) (p)->AddRef() +#define IDirect3DTexture2_Release(p) (p)->Release() +#define IDirect3DTexture2_GetHandle(p,a,b) (p)->GetHandle(a,b) +#define IDirect3DTexture2_PaletteChanged(p,a,b) (p)->PaletteChanged(a,b) +#define IDirect3DTexture2_Load(p,a) (p)->Load(a) +#endif +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +/* + * Viewport interfaces + */ +#undef INTERFACE +#define INTERFACE IDirect3DViewport + +DECLARE_INTERFACE_(IDirect3DViewport, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DViewport methods ***/ + STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE; + STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT) PURE; + STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT) PURE; + STDMETHOD(TransformVertices)(THIS_ DWORD,LPD3DTRANSFORMDATA,DWORD,LPDWORD) PURE; + STDMETHOD(LightElements)(THIS_ DWORD,LPD3DLIGHTDATA) PURE; + STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE) PURE; + STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE,LPBOOL) PURE; + STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE; + STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE*,LPBOOL) PURE; + STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD) PURE; + STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT) PURE; + STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT) PURE; + STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT,LPDIRECT3DLIGHT*,DWORD) PURE; +}; + +typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DViewport_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DViewport_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DViewport_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DViewport_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirect3DViewport_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a) +#define IDirect3DViewport_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a) +#define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d) +#define IDirect3DViewport_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b) +#define IDirect3DViewport_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a) +#define IDirect3DViewport_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b) +#define IDirect3DViewport_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a) +#define IDirect3DViewport_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b) +#define IDirect3DViewport_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c) +#define IDirect3DViewport_AddLight(p,a) (p)->lpVtbl->AddLight(p,a) +#define IDirect3DViewport_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a) +#define IDirect3DViewport_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c) +#else +#define IDirect3DViewport_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DViewport_AddRef(p) (p)->AddRef() +#define IDirect3DViewport_Release(p) (p)->Release() +#define IDirect3DViewport_Initialize(p,a) (p)->Initialize(a) +#define IDirect3DViewport_GetViewport(p,a) (p)->GetViewport(a) +#define IDirect3DViewport_SetViewport(p,a) (p)->SetViewport(a) +#define IDirect3DViewport_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d) +#define IDirect3DViewport_LightElements(p,a,b) (p)->LightElements(a,b) +#define IDirect3DViewport_SetBackground(p,a) (p)->SetBackground(a) +#define IDirect3DViewport_GetBackground(p,a,b) (p)->GetBackground(a,b) +#define IDirect3DViewport_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a) +#define IDirect3DViewport_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b) +#define IDirect3DViewport_Clear(p,a,b,c) (p)->Clear(a,b,c) +#define IDirect3DViewport_AddLight(p,a) (p)->AddLight(a) +#define IDirect3DViewport_DeleteLight(p,a) (p)->DeleteLight(a) +#define IDirect3DViewport_NextLight(p,a,b,c) (p)->NextLight(a,b,c) +#endif + +#if(DIRECT3D_VERSION >= 0x0500) +#undef INTERFACE +#define INTERFACE IDirect3DViewport2 + +DECLARE_INTERFACE_(IDirect3DViewport2, IDirect3DViewport) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DViewport methods ***/ + STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE; + STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT) PURE; + STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT) PURE; + STDMETHOD(TransformVertices)(THIS_ DWORD,LPD3DTRANSFORMDATA,DWORD,LPDWORD) PURE; + STDMETHOD(LightElements)(THIS_ DWORD,LPD3DLIGHTDATA) PURE; + STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE) PURE; + STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE,LPBOOL) PURE; + STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE; + STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE*,LPBOOL) PURE; + STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD) PURE; + STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT) PURE; + STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT) PURE; + STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT,LPDIRECT3DLIGHT*,DWORD) PURE; + STDMETHOD(GetViewport2)(THIS_ LPD3DVIEWPORT2) PURE; + STDMETHOD(SetViewport2)(THIS_ LPD3DVIEWPORT2) PURE; +}; + +typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DViewport2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DViewport2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DViewport2_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DViewport2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirect3DViewport2_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a) +#define IDirect3DViewport2_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a) +#define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d) +#define IDirect3DViewport2_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b) +#define IDirect3DViewport2_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a) +#define IDirect3DViewport2_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b) +#define IDirect3DViewport2_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a) +#define IDirect3DViewport2_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b) +#define IDirect3DViewport2_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c) +#define IDirect3DViewport2_AddLight(p,a) (p)->lpVtbl->AddLight(p,a) +#define IDirect3DViewport2_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a) +#define IDirect3DViewport2_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c) +#define IDirect3DViewport2_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a) +#define IDirect3DViewport2_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a) +#else +#define IDirect3DViewport2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DViewport2_AddRef(p) (p)->AddRef() +#define IDirect3DViewport2_Release(p) (p)->Release() +#define IDirect3DViewport2_Initialize(p,a) (p)->Initialize(a) +#define IDirect3DViewport2_GetViewport(p,a) (p)->GetViewport(a) +#define IDirect3DViewport2_SetViewport(p,a) (p)->SetViewport(a) +#define IDirect3DViewport2_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d) +#define IDirect3DViewport2_LightElements(p,a,b) (p)->LightElements(a,b) +#define IDirect3DViewport2_SetBackground(p,a) (p)->SetBackground(a) +#define IDirect3DViewport2_GetBackground(p,a,b) (p)->GetBackground(a,b) +#define IDirect3DViewport2_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a) +#define IDirect3DViewport2_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b) +#define IDirect3DViewport2_Clear(p,a,b,c) (p)->Clear(a,b,c) +#define IDirect3DViewport2_AddLight(p,a) (p)->AddLight(a) +#define IDirect3DViewport2_DeleteLight(p,a) (p)->DeleteLight(a) +#define IDirect3DViewport2_NextLight(p,a,b,c) (p)->NextLight(a,b,c) +#define IDirect3DViewport2_GetViewport2(p,a) (p)->GetViewport2(a) +#define IDirect3DViewport2_SetViewport2(p,a) (p)->SetViewport2(a) +#endif +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#if(DIRECT3D_VERSION >= 0x0600) + +#undef INTERFACE +#define INTERFACE IDirect3DViewport3 + +DECLARE_INTERFACE_(IDirect3DViewport3, IDirect3DViewport2) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DViewport2 methods ***/ + STDMETHOD(Initialize)(THIS_ LPDIRECT3D) PURE; + STDMETHOD(GetViewport)(THIS_ LPD3DVIEWPORT) PURE; + STDMETHOD(SetViewport)(THIS_ LPD3DVIEWPORT) PURE; + STDMETHOD(TransformVertices)(THIS_ DWORD,LPD3DTRANSFORMDATA,DWORD,LPDWORD) PURE; + STDMETHOD(LightElements)(THIS_ DWORD,LPD3DLIGHTDATA) PURE; + STDMETHOD(SetBackground)(THIS_ D3DMATERIALHANDLE) PURE; + STDMETHOD(GetBackground)(THIS_ LPD3DMATERIALHANDLE,LPBOOL) PURE; + STDMETHOD(SetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE; + STDMETHOD(GetBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE*,LPBOOL) PURE; + STDMETHOD(Clear)(THIS_ DWORD,LPD3DRECT,DWORD) PURE; + STDMETHOD(AddLight)(THIS_ LPDIRECT3DLIGHT) PURE; + STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DLIGHT) PURE; + STDMETHOD(NextLight)(THIS_ LPDIRECT3DLIGHT,LPDIRECT3DLIGHT*,DWORD) PURE; + STDMETHOD(GetViewport2)(THIS_ LPD3DVIEWPORT2) PURE; + STDMETHOD(SetViewport2)(THIS_ LPD3DVIEWPORT2) PURE; + STDMETHOD(SetBackgroundDepth2)(THIS_ LPDIRECTDRAWSURFACE4) PURE; + STDMETHOD(GetBackgroundDepth2)(THIS_ LPDIRECTDRAWSURFACE4*,LPBOOL) PURE; + STDMETHOD(Clear2)(THIS_ DWORD,LPD3DRECT,DWORD,D3DCOLOR,D3DVALUE,DWORD) PURE; +}; + +typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DViewport3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DViewport3_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DViewport3_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DViewport3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirect3DViewport3_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a) +#define IDirect3DViewport3_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a) +#define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->lpVtbl->TransformVertices(p,a,b,c,d) +#define IDirect3DViewport3_LightElements(p,a,b) (p)->lpVtbl->LightElements(p,a,b) +#define IDirect3DViewport3_SetBackground(p,a) (p)->lpVtbl->SetBackground(p,a) +#define IDirect3DViewport3_GetBackground(p,a,b) (p)->lpVtbl->GetBackground(p,a,b) +#define IDirect3DViewport3_SetBackgroundDepth(p,a) (p)->lpVtbl->SetBackgroundDepth(p,a) +#define IDirect3DViewport3_GetBackgroundDepth(p,a,b) (p)->lpVtbl->GetBackgroundDepth(p,a,b) +#define IDirect3DViewport3_Clear(p,a,b,c) (p)->lpVtbl->Clear(p,a,b,c) +#define IDirect3DViewport3_AddLight(p,a) (p)->lpVtbl->AddLight(p,a) +#define IDirect3DViewport3_DeleteLight(p,a) (p)->lpVtbl->DeleteLight(p,a) +#define IDirect3DViewport3_NextLight(p,a,b,c) (p)->lpVtbl->NextLight(p,a,b,c) +#define IDirect3DViewport3_GetViewport2(p,a) (p)->lpVtbl->GetViewport2(p,a) +#define IDirect3DViewport3_SetViewport2(p,a) (p)->lpVtbl->SetViewport2(p,a) +#define IDirect3DViewport3_SetBackgroundDepth2(p,a) (p)->lpVtbl->SetBackgroundDepth2(p,a) +#define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) (p)->lpVtbl->GetBackgroundDepth2(p,a,b) +#define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) (p)->lpVtbl->Clear2(p,a,b,c,d,e,f) +#else +#define IDirect3DViewport3_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DViewport3_AddRef(p) (p)->AddRef() +#define IDirect3DViewport3_Release(p) (p)->Release() +#define IDirect3DViewport3_Initialize(p,a) (p)->Initialize(a) +#define IDirect3DViewport3_GetViewport(p,a) (p)->GetViewport(a) +#define IDirect3DViewport3_SetViewport(p,a) (p)->SetViewport(a) +#define IDirect3DViewport3_TransformVertices(p,a,b,c,d) (p)->TransformVertices(a,b,c,d) +#define IDirect3DViewport3_LightElements(p,a,b) (p)->LightElements(a,b) +#define IDirect3DViewport3_SetBackground(p,a) (p)->SetBackground(a) +#define IDirect3DViewport3_GetBackground(p,a,b) (p)->GetBackground(a,b) +#define IDirect3DViewport3_SetBackgroundDepth(p,a) (p)->SetBackgroundDepth(a) +#define IDirect3DViewport3_GetBackgroundDepth(p,a,b) (p)->GetBackgroundDepth(a,b) +#define IDirect3DViewport3_Clear(p,a,b,c) (p)->Clear(a,b,c) +#define IDirect3DViewport3_AddLight(p,a) (p)->AddLight(a) +#define IDirect3DViewport3_DeleteLight(p,a) (p)->DeleteLight(a) +#define IDirect3DViewport3_NextLight(p,a,b,c) (p)->NextLight(a,b,c) +#define IDirect3DViewport3_GetViewport2(p,a) (p)->GetViewport2(a) +#define IDirect3DViewport3_SetViewport2(p,a) (p)->SetViewport2(a) +#define IDirect3DViewport3_SetBackgroundDepth2(p,a) (p)->SetBackgroundDepth2(a) +#define IDirect3DViewport3_GetBackgroundDepth2(p,a,b) (p)->GetBackgroundDepth2(a,b) +#define IDirect3DViewport3_Clear2(p,a,b,c,d,e,f) (p)->Clear2(a,b,c,d,e,f) +#endif +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +#if(DIRECT3D_VERSION >= 0x0600) +#undef INTERFACE +#define INTERFACE IDirect3DVertexBuffer + +DECLARE_INTERFACE_(IDirect3DVertexBuffer, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DVertexBuffer methods ***/ + STDMETHOD(Lock)(THIS_ DWORD,LPVOID*,LPDWORD) PURE; + STDMETHOD(Unlock)(THIS) PURE; + STDMETHOD(ProcessVertices)(THIS_ DWORD,DWORD,DWORD,LPDIRECT3DVERTEXBUFFER,DWORD,LPDIRECT3DDEVICE3,DWORD) PURE; + STDMETHOD(GetVertexBufferDesc)(THIS_ LPD3DVERTEXBUFFERDESC) PURE; + STDMETHOD(Optimize)(THIS_ LPDIRECT3DDEVICE3,DWORD) PURE; +}; + +typedef struct IDirect3DVertexBuffer *LPDIRECT3DVERTEXBUFFER; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DVertexBuffer_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DVertexBuffer_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DVertexBuffer_Lock(p,a,b,c) (p)->lpVtbl->Lock(p,a,b,c) +#define IDirect3DVertexBuffer_Unlock(p) (p)->lpVtbl->Unlock(p) +#define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g) +#define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) (p)->lpVtbl->GetVertexBufferDesc(p,a) +#define IDirect3DVertexBuffer_Optimize(p,a,b) (p)->lpVtbl->Optimize(p,a,b) +#else +#define IDirect3DVertexBuffer_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DVertexBuffer_AddRef(p) (p)->AddRef() +#define IDirect3DVertexBuffer_Release(p) (p)->Release() +#define IDirect3DVertexBuffer_Lock(p,a,b,c) (p)->Lock(a,b,c) +#define IDirect3DVertexBuffer_Unlock(p) (p)->Unlock() +#define IDirect3DVertexBuffer_ProcessVertices(p,a,b,c,d,e,f,g) (p)->ProcessVertices(a,b,c,d,e,f,g) +#define IDirect3DVertexBuffer_GetVertexBufferDesc(p,a) (p)->GetVertexBufferDesc(a) +#define IDirect3DVertexBuffer_Optimize(p,a,b) (p)->Optimize(a,b) +#endif +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +#if(DIRECT3D_VERSION >= 0x0700) +#undef INTERFACE +#define INTERFACE IDirect3DVertexBuffer7 + +DECLARE_INTERFACE_(IDirect3DVertexBuffer7, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DVertexBuffer7 methods ***/ + STDMETHOD(Lock)(THIS_ DWORD,LPVOID*,LPDWORD) PURE; + STDMETHOD(Unlock)(THIS) PURE; + STDMETHOD(ProcessVertices)(THIS_ DWORD,DWORD,DWORD,LPDIRECT3DVERTEXBUFFER7,DWORD,LPDIRECT3DDEVICE7,DWORD) PURE; + STDMETHOD(GetVertexBufferDesc)(THIS_ LPD3DVERTEXBUFFERDESC) PURE; + STDMETHOD(Optimize)(THIS_ LPDIRECT3DDEVICE7,DWORD) PURE; + STDMETHOD(ProcessVerticesStrided)(THIS_ DWORD,DWORD,DWORD,LPD3DDRAWPRIMITIVESTRIDEDDATA,DWORD,LPDIRECT3DDEVICE7,DWORD) PURE; +}; + +typedef struct IDirect3DVertexBuffer7 *LPDIRECT3DVERTEXBUFFER7; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DVertexBuffer7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DVertexBuffer7_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DVertexBuffer7_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DVertexBuffer7_Lock(p,a,b,c) (p)->lpVtbl->Lock(p,a,b,c) +#define IDirect3DVertexBuffer7_Unlock(p) (p)->lpVtbl->Unlock(p) +#define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e,f,g) +#define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a) (p)->lpVtbl->GetVertexBufferDesc(p,a) +#define IDirect3DVertexBuffer7_Optimize(p,a,b) (p)->lpVtbl->Optimize(p,a,b) +#define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) (p)->lpVtbl->ProcessVerticesStrided(p,a,b,c,d,e,f,g) +#else +#define IDirect3DVertexBuffer7_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DVertexBuffer7_AddRef(p) (p)->AddRef() +#define IDirect3DVertexBuffer7_Release(p) (p)->Release() +#define IDirect3DVertexBuffer7_Lock(p,a,b,c) (p)->Lock(a,b,c) +#define IDirect3DVertexBuffer7_Unlock(p) (p)->Unlock() +#define IDirect3DVertexBuffer7_ProcessVertices(p,a,b,c,d,e,f,g) (p)->ProcessVertices(a,b,c,d,e,f,g) +#define IDirect3DVertexBuffer7_GetVertexBufferDesc(p,a) (p)->GetVertexBufferDesc(a) +#define IDirect3DVertexBuffer7_Optimize(p,a,b) (p)->Optimize(a,b) +#define IDirect3DVertexBuffer7_ProcessVerticesStrided(p,a,b,c,d,e,f,g) (p)->ProcessVerticesStrided(a,b,c,d,e,f,g) +#endif +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +#if(DIRECT3D_VERSION >= 0x0500) +/**************************************************************************** + * + * Flags for IDirect3DDevice::NextViewport + * + ****************************************************************************/ + +/* + * Return the next viewport + */ +#define D3DNEXT_NEXT 0x00000001l + +/* + * Return the first viewport + */ +#define D3DNEXT_HEAD 0x00000002l + +/* + * Return the last viewport + */ +#define D3DNEXT_TAIL 0x00000004l + + +/**************************************************************************** + * + * Flags for DrawPrimitive/DrawIndexedPrimitive + * Also valid for Begin/BeginIndexed + * Also valid for VertexBuffer::CreateVertexBuffer + ****************************************************************************/ + +/* + * Wait until the device is ready to draw the primitive + * This will cause DP to not return DDERR_WASSTILLDRAWING + */ +#define D3DDP_WAIT 0x00000001l +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#if (DIRECT3D_VERSION == 0x0500) +/* + * Hint that it is acceptable to render the primitive out of order. + */ +#define D3DDP_OUTOFORDER 0x00000002l +#endif + + +#if(DIRECT3D_VERSION >= 0x0500) +/* + * Hint that the primitives have been clipped by the application. + */ +#define D3DDP_DONOTCLIP 0x00000004l + +/* + * Hint that the extents need not be updated. + */ +#define D3DDP_DONOTUPDATEEXTENTS 0x00000008l +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#if(DIRECT3D_VERSION >= 0x0600) + +/* + * Hint that the lighting should not be applied on vertices. + */ + +#define D3DDP_DONOTLIGHT 0x00000010l + +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +/* + * Direct3D Errors + * DirectDraw error codes are used when errors not specified here. + */ +#define D3D_OK DD_OK +#define D3DERR_BADMAJORVERSION MAKE_DDHRESULT(700) +#define D3DERR_BADMINORVERSION MAKE_DDHRESULT(701) + +#if(DIRECT3D_VERSION >= 0x0500) +/* + * An invalid device was requested by the application. + */ +#define D3DERR_INVALID_DEVICE MAKE_DDHRESULT(705) +#define D3DERR_INITFAILED MAKE_DDHRESULT(706) + +/* + * SetRenderTarget attempted on a device that was + * QI'd off the render target. + */ +#define D3DERR_DEVICEAGGREGATED MAKE_DDHRESULT(707) +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#define D3DERR_EXECUTE_CREATE_FAILED MAKE_DDHRESULT(710) +#define D3DERR_EXECUTE_DESTROY_FAILED MAKE_DDHRESULT(711) +#define D3DERR_EXECUTE_LOCK_FAILED MAKE_DDHRESULT(712) +#define D3DERR_EXECUTE_UNLOCK_FAILED MAKE_DDHRESULT(713) +#define D3DERR_EXECUTE_LOCKED MAKE_DDHRESULT(714) +#define D3DERR_EXECUTE_NOT_LOCKED MAKE_DDHRESULT(715) + +#define D3DERR_EXECUTE_FAILED MAKE_DDHRESULT(716) +#define D3DERR_EXECUTE_CLIPPED_FAILED MAKE_DDHRESULT(717) + +#define D3DERR_TEXTURE_NO_SUPPORT MAKE_DDHRESULT(720) +#define D3DERR_TEXTURE_CREATE_FAILED MAKE_DDHRESULT(721) +#define D3DERR_TEXTURE_DESTROY_FAILED MAKE_DDHRESULT(722) +#define D3DERR_TEXTURE_LOCK_FAILED MAKE_DDHRESULT(723) +#define D3DERR_TEXTURE_UNLOCK_FAILED MAKE_DDHRESULT(724) +#define D3DERR_TEXTURE_LOAD_FAILED MAKE_DDHRESULT(725) +#define D3DERR_TEXTURE_SWAP_FAILED MAKE_DDHRESULT(726) +#define D3DERR_TEXTURE_LOCKED MAKE_DDHRESULT(727) +#define D3DERR_TEXTURE_NOT_LOCKED MAKE_DDHRESULT(728) +#define D3DERR_TEXTURE_GETSURF_FAILED MAKE_DDHRESULT(729) + +#define D3DERR_MATRIX_CREATE_FAILED MAKE_DDHRESULT(730) +#define D3DERR_MATRIX_DESTROY_FAILED MAKE_DDHRESULT(731) +#define D3DERR_MATRIX_SETDATA_FAILED MAKE_DDHRESULT(732) +#define D3DERR_MATRIX_GETDATA_FAILED MAKE_DDHRESULT(733) +#define D3DERR_SETVIEWPORTDATA_FAILED MAKE_DDHRESULT(734) + +#if(DIRECT3D_VERSION >= 0x0500) +#define D3DERR_INVALIDCURRENTVIEWPORT MAKE_DDHRESULT(735) +#define D3DERR_INVALIDPRIMITIVETYPE MAKE_DDHRESULT(736) +#define D3DERR_INVALIDVERTEXTYPE MAKE_DDHRESULT(737) +#define D3DERR_TEXTURE_BADSIZE MAKE_DDHRESULT(738) +#define D3DERR_INVALIDRAMPTEXTURE MAKE_DDHRESULT(739) +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#define D3DERR_MATERIAL_CREATE_FAILED MAKE_DDHRESULT(740) +#define D3DERR_MATERIAL_DESTROY_FAILED MAKE_DDHRESULT(741) +#define D3DERR_MATERIAL_SETDATA_FAILED MAKE_DDHRESULT(742) +#define D3DERR_MATERIAL_GETDATA_FAILED MAKE_DDHRESULT(743) + +#if(DIRECT3D_VERSION >= 0x0500) +#define D3DERR_INVALIDPALETTE MAKE_DDHRESULT(744) + +#define D3DERR_ZBUFF_NEEDS_SYSTEMMEMORY MAKE_DDHRESULT(745) +#define D3DERR_ZBUFF_NEEDS_VIDEOMEMORY MAKE_DDHRESULT(746) +#define D3DERR_SURFACENOTINVIDMEM MAKE_DDHRESULT(747) +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#define D3DERR_LIGHT_SET_FAILED MAKE_DDHRESULT(750) +#if(DIRECT3D_VERSION >= 0x0500) +#define D3DERR_LIGHTHASVIEWPORT MAKE_DDHRESULT(751) +#define D3DERR_LIGHTNOTINTHISVIEWPORT MAKE_DDHRESULT(752) +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#define D3DERR_SCENE_IN_SCENE MAKE_DDHRESULT(760) +#define D3DERR_SCENE_NOT_IN_SCENE MAKE_DDHRESULT(761) +#define D3DERR_SCENE_BEGIN_FAILED MAKE_DDHRESULT(762) +#define D3DERR_SCENE_END_FAILED MAKE_DDHRESULT(763) + +#if(DIRECT3D_VERSION >= 0x0500) +#define D3DERR_INBEGIN MAKE_DDHRESULT(770) +#define D3DERR_NOTINBEGIN MAKE_DDHRESULT(771) +#define D3DERR_NOVIEWPORTS MAKE_DDHRESULT(772) +#define D3DERR_VIEWPORTDATANOTSET MAKE_DDHRESULT(773) +#define D3DERR_VIEWPORTHASNODEVICE MAKE_DDHRESULT(774) +#define D3DERR_NOCURRENTVIEWPORT MAKE_DDHRESULT(775) +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#if(DIRECT3D_VERSION >= 0x0600) +#define D3DERR_INVALIDVERTEXFORMAT MAKE_DDHRESULT(2048) + +/* + * Attempted to CreateTexture on a surface that had a color key + */ +#define D3DERR_COLORKEYATTACHED MAKE_DDHRESULT(2050) + +#define D3DERR_VERTEXBUFFEROPTIMIZED MAKE_DDHRESULT(2060) +#define D3DERR_VBUF_CREATE_FAILED MAKE_DDHRESULT(2061) +#define D3DERR_VERTEXBUFFERLOCKED MAKE_DDHRESULT(2062) +#define D3DERR_VERTEXBUFFERUNLOCKFAILED MAKE_DDHRESULT(2063) + +#define D3DERR_ZBUFFER_NOTPRESENT MAKE_DDHRESULT(2070) +#define D3DERR_STENCILBUFFER_NOTPRESENT MAKE_DDHRESULT(2071) + +#define D3DERR_WRONGTEXTUREFORMAT MAKE_DDHRESULT(2072) +#define D3DERR_UNSUPPORTEDCOLOROPERATION MAKE_DDHRESULT(2073) +#define D3DERR_UNSUPPORTEDCOLORARG MAKE_DDHRESULT(2074) +#define D3DERR_UNSUPPORTEDALPHAOPERATION MAKE_DDHRESULT(2075) +#define D3DERR_UNSUPPORTEDALPHAARG MAKE_DDHRESULT(2076) +#define D3DERR_TOOMANYOPERATIONS MAKE_DDHRESULT(2077) +#define D3DERR_CONFLICTINGTEXTUREFILTER MAKE_DDHRESULT(2078) +#define D3DERR_UNSUPPORTEDFACTORVALUE MAKE_DDHRESULT(2079) +#define D3DERR_CONFLICTINGRENDERSTATE MAKE_DDHRESULT(2081) +#define D3DERR_UNSUPPORTEDTEXTUREFILTER MAKE_DDHRESULT(2082) +#define D3DERR_TOOMANYPRIMITIVES MAKE_DDHRESULT(2083) +#define D3DERR_INVALIDMATRIX MAKE_DDHRESULT(2084) +#define D3DERR_TOOMANYVERTICES MAKE_DDHRESULT(2085) +#define D3DERR_CONFLICTINGTEXTUREPALETTE MAKE_DDHRESULT(2086) + +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +#if(DIRECT3D_VERSION >= 0x0700) +#define D3DERR_INVALIDSTATEBLOCK MAKE_DDHRESULT(2100) +#define D3DERR_INBEGINSTATEBLOCK MAKE_DDHRESULT(2101) +#define D3DERR_NOTINBEGINSTATEBLOCK MAKE_DDHRESULT(2102) +#endif /* DIRECT3D_VERSION >= 0x0700 */ + + +#ifdef __cplusplus +}; +#endif + +#endif /* (DIRECT3D_VERSION < 0x0800) */ +#endif /* _D3D_H_ */ + diff --git a/windows_libs/mssdk/include/d3d8.h b/windows_libs/mssdk/include/d3d8.h new file mode 100644 index 00000000..f6511350 --- /dev/null +++ b/windows_libs/mssdk/include/d3d8.h @@ -0,0 +1,1276 @@ +/*==========================================================================; + * + * + * File: d3d8.h + * Content: Direct3D include file + * + ****************************************************************************/ + +#ifndef _D3D8_H_ +#define _D3D8_H_ + +#ifndef DIRECT3D_VERSION +#define DIRECT3D_VERSION 0x0800 +#endif //DIRECT3D_VERSION + +// include this file content only if compiling for DX8 interfaces +#if(DIRECT3D_VERSION >= 0x0800) + + +/* This identifier is passed to Direct3DCreate8 in order to ensure that an + * application was built against the correct header files. This number is + * incremented whenever a header (or other) change would require applications + * to be rebuilt. If the version doesn't match, Direct3DCreate8 will fail. + * (The number itself has no meaning.)*/ + +#define D3D_SDK_VERSION 120 + + +#include + +#define COM_NO_WINDOWS_H +#include + +#include + +#if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500) + #define HMONITOR_DECLARED + DECLARE_HANDLE(HMONITOR); +#endif + +#define D3DAPI WINAPI + +/* + * Interface IID's + */ +#if defined( _WIN32 ) && !defined( _NO_COM) + +/* IID_IDirect3D8 */ +/* {1DD9E8DA-1C77-4d40-B0CF-98FEFDFF9512} */ +DEFINE_GUID(IID_IDirect3D8, 0x1dd9e8da, 0x1c77, 0x4d40, 0xb0, 0xcf, 0x98, 0xfe, 0xfd, 0xff, 0x95, 0x12); + +/* IID_IDirect3DDevice8 */ +/* {7385E5DF-8FE8-41D5-86B6-D7B48547B6CF} */ +DEFINE_GUID(IID_IDirect3DDevice8, 0x7385e5df, 0x8fe8, 0x41d5, 0x86, 0xb6, 0xd7, 0xb4, 0x85, 0x47, 0xb6, 0xcf); + +/* IID_IDirect3DResource8 */ +/* {1B36BB7B-09B7-410a-B445-7D1430D7B33F} */ +DEFINE_GUID(IID_IDirect3DResource8, 0x1b36bb7b, 0x9b7, 0x410a, 0xb4, 0x45, 0x7d, 0x14, 0x30, 0xd7, 0xb3, 0x3f); + +/* IID_IDirect3DBaseTexture8 */ +/* {B4211CFA-51B9-4a9f-AB78-DB99B2BB678E} */ +DEFINE_GUID(IID_IDirect3DBaseTexture8, 0xb4211cfa, 0x51b9, 0x4a9f, 0xab, 0x78, 0xdb, 0x99, 0xb2, 0xbb, 0x67, 0x8e); + +/* IID_IDirect3DTexture8 */ +/* {E4CDD575-2866-4f01-B12E-7EECE1EC9358} */ +DEFINE_GUID(IID_IDirect3DTexture8, 0xe4cdd575, 0x2866, 0x4f01, 0xb1, 0x2e, 0x7e, 0xec, 0xe1, 0xec, 0x93, 0x58); + +/* IID_IDirect3DCubeTexture8 */ +/* {3EE5B968-2ACA-4c34-8BB5-7E0C3D19B750} */ +DEFINE_GUID(IID_IDirect3DCubeTexture8, 0x3ee5b968, 0x2aca, 0x4c34, 0x8b, 0xb5, 0x7e, 0x0c, 0x3d, 0x19, 0xb7, 0x50); + +/* IID_IDirect3DVolumeTexture8 */ +/* {4B8AAAFA-140F-42ba-9131-597EAFAA2EAD} */ +DEFINE_GUID(IID_IDirect3DVolumeTexture8, 0x4b8aaafa, 0x140f, 0x42ba, 0x91, 0x31, 0x59, 0x7e, 0xaf, 0xaa, 0x2e, 0xad); + +/* IID_IDirect3DVertexBuffer8 */ +/* {8AEEEAC7-05F9-44d4-B591-000B0DF1CB95} */ +DEFINE_GUID(IID_IDirect3DVertexBuffer8, 0x8aeeeac7, 0x05f9, 0x44d4, 0xb5, 0x91, 0x00, 0x0b, 0x0d, 0xf1, 0xcb, 0x95); + +/* IID_IDirect3DIndexBuffer8 */ +/* {0E689C9A-053D-44a0-9D92-DB0E3D750F86} */ +DEFINE_GUID(IID_IDirect3DIndexBuffer8, 0x0e689c9a, 0x053d, 0x44a0, 0x9d, 0x92, 0xdb, 0x0e, 0x3d, 0x75, 0x0f, 0x86); + +/* IID_IDirect3DSurface8 */ +/* {B96EEBCA-B326-4ea5-882F-2FF5BAE021DD} */ +DEFINE_GUID(IID_IDirect3DSurface8, 0xb96eebca, 0xb326, 0x4ea5, 0x88, 0x2f, 0x2f, 0xf5, 0xba, 0xe0, 0x21, 0xdd); + +/* IID_IDirect3DVolume8 */ +/* {BD7349F5-14F1-42e4-9C79-972380DB40C0} */ +DEFINE_GUID(IID_IDirect3DVolume8, 0xbd7349f5, 0x14f1, 0x42e4, 0x9c, 0x79, 0x97, 0x23, 0x80, 0xdb, 0x40, 0xc0); + +/* IID_IDirect3DSwapChain8 */ +/* {928C088B-76B9-4C6B-A536-A590853876CD} */ +DEFINE_GUID(IID_IDirect3DSwapChain8, 0x928c088b, 0x76b9, 0x4c6b, 0xa5, 0x36, 0xa5, 0x90, 0x85, 0x38, 0x76, 0xcd); + +#endif + +#ifdef __cplusplus + +interface IDirect3D8; +interface IDirect3DDevice8; + +interface IDirect3DResource8; +interface IDirect3DBaseTexture8; +interface IDirect3DTexture8; +interface IDirect3DVolumeTexture8; +interface IDirect3DCubeTexture8; + +interface IDirect3DVertexBuffer8; +interface IDirect3DIndexBuffer8; + +interface IDirect3DSurface8; +interface IDirect3DVolume8; + +interface IDirect3DSwapChain8; + +#endif + + +typedef interface IDirect3D8 IDirect3D8; +typedef interface IDirect3DDevice8 IDirect3DDevice8; +typedef interface IDirect3DResource8 IDirect3DResource8; +typedef interface IDirect3DBaseTexture8 IDirect3DBaseTexture8; +typedef interface IDirect3DTexture8 IDirect3DTexture8; +typedef interface IDirect3DVolumeTexture8 IDirect3DVolumeTexture8; +typedef interface IDirect3DCubeTexture8 IDirect3DCubeTexture8; +typedef interface IDirect3DVertexBuffer8 IDirect3DVertexBuffer8; +typedef interface IDirect3DIndexBuffer8 IDirect3DIndexBuffer8; +typedef interface IDirect3DSurface8 IDirect3DSurface8; +typedef interface IDirect3DVolume8 IDirect3DVolume8; +typedef interface IDirect3DSwapChain8 IDirect3DSwapChain8; + +#include "d3d8types.h" +#include "d3d8caps.h" + + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * DLL Function for creating a Direct3D8 object. This object supports + * enumeration and allows the creation of Direct3DDevice8 objects. + * Pass the value of the constant D3D_SDK_VERSION to this function, so + * that the run-time can validate that your application was compiled + * against the right headers. + */ + +IDirect3D8 * WINAPI Direct3DCreate8(UINT SDKVersion); + + +/* + * Direct3D interfaces + */ + + + + + + +#undef INTERFACE +#define INTERFACE IDirect3D8 + +DECLARE_INTERFACE_(IDirect3D8, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3D8 methods ***/ + STDMETHOD(RegisterSoftwareDevice)(THIS_ void* pInitializeFunction) PURE; + STDMETHOD_(UINT, GetAdapterCount)(THIS) PURE; + STDMETHOD(GetAdapterIdentifier)(THIS_ UINT Adapter,DWORD Flags,D3DADAPTER_IDENTIFIER8* pIdentifier) PURE; + STDMETHOD_(UINT, GetAdapterModeCount)(THIS_ UINT Adapter) PURE; + STDMETHOD(EnumAdapterModes)(THIS_ UINT Adapter,UINT Mode,D3DDISPLAYMODE* pMode) PURE; + STDMETHOD(GetAdapterDisplayMode)(THIS_ UINT Adapter,D3DDISPLAYMODE* pMode) PURE; + STDMETHOD(CheckDeviceType)(THIS_ UINT Adapter,D3DDEVTYPE CheckType,D3DFORMAT DisplayFormat,D3DFORMAT BackBufferFormat,BOOL Windowed) PURE; + STDMETHOD(CheckDeviceFormat)(THIS_ UINT Adapter,D3DDEVTYPE DeviceType,D3DFORMAT AdapterFormat,DWORD Usage,D3DRESOURCETYPE RType,D3DFORMAT CheckFormat) PURE; + STDMETHOD(CheckDeviceMultiSampleType)(THIS_ UINT Adapter,D3DDEVTYPE DeviceType,D3DFORMAT SurfaceFormat,BOOL Windowed,D3DMULTISAMPLE_TYPE MultiSampleType) PURE; + STDMETHOD(CheckDepthStencilMatch)(THIS_ UINT Adapter,D3DDEVTYPE DeviceType,D3DFORMAT AdapterFormat,D3DFORMAT RenderTargetFormat,D3DFORMAT DepthStencilFormat) PURE; + STDMETHOD(GetDeviceCaps)(THIS_ UINT Adapter,D3DDEVTYPE DeviceType,D3DCAPS8* pCaps) PURE; + STDMETHOD_(HMONITOR, GetAdapterMonitor)(THIS_ UINT Adapter) PURE; + STDMETHOD(CreateDevice)(THIS_ UINT Adapter,D3DDEVTYPE DeviceType,HWND hFocusWindow,DWORD BehaviorFlags,D3DPRESENT_PARAMETERS* pPresentationParameters,IDirect3DDevice8** ppReturnedDeviceInterface) PURE; +}; + +typedef struct IDirect3D8 *LPDIRECT3D8, *PDIRECT3D8; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3D8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3D8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3D8_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3D8_RegisterSoftwareDevice(p,a) (p)->lpVtbl->RegisterSoftwareDevice(p,a) +#define IDirect3D8_GetAdapterCount(p) (p)->lpVtbl->GetAdapterCount(p) +#define IDirect3D8_GetAdapterIdentifier(p,a,b,c) (p)->lpVtbl->GetAdapterIdentifier(p,a,b,c) +#define IDirect3D8_GetAdapterModeCount(p,a) (p)->lpVtbl->GetAdapterModeCount(p,a) +#define IDirect3D8_EnumAdapterModes(p,a,b,c) (p)->lpVtbl->EnumAdapterModes(p,a,b,c) +#define IDirect3D8_GetAdapterDisplayMode(p,a,b) (p)->lpVtbl->GetAdapterDisplayMode(p,a,b) +#define IDirect3D8_CheckDeviceType(p,a,b,c,d,e) (p)->lpVtbl->CheckDeviceType(p,a,b,c,d,e) +#define IDirect3D8_CheckDeviceFormat(p,a,b,c,d,e,f) (p)->lpVtbl->CheckDeviceFormat(p,a,b,c,d,e,f) +#define IDirect3D8_CheckDeviceMultiSampleType(p,a,b,c,d,e) (p)->lpVtbl->CheckDeviceMultiSampleType(p,a,b,c,d,e) +#define IDirect3D8_CheckDepthStencilMatch(p,a,b,c,d,e) (p)->lpVtbl->CheckDepthStencilMatch(p,a,b,c,d,e) +#define IDirect3D8_GetDeviceCaps(p,a,b,c) (p)->lpVtbl->GetDeviceCaps(p,a,b,c) +#define IDirect3D8_GetAdapterMonitor(p,a) (p)->lpVtbl->GetAdapterMonitor(p,a) +#define IDirect3D8_CreateDevice(p,a,b,c,d,e,f) (p)->lpVtbl->CreateDevice(p,a,b,c,d,e,f) +#else +#define IDirect3D8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3D8_AddRef(p) (p)->AddRef() +#define IDirect3D8_Release(p) (p)->Release() +#define IDirect3D8_RegisterSoftwareDevice(p,a) (p)->RegisterSoftwareDevice(a) +#define IDirect3D8_GetAdapterCount(p) (p)->GetAdapterCount() +#define IDirect3D8_GetAdapterIdentifier(p,a,b,c) (p)->GetAdapterIdentifier(a,b,c) +#define IDirect3D8_GetAdapterModeCount(p,a) (p)->GetAdapterModeCount(a) +#define IDirect3D8_EnumAdapterModes(p,a,b,c) (p)->EnumAdapterModes(a,b,c) +#define IDirect3D8_GetAdapterDisplayMode(p,a,b) (p)->GetAdapterDisplayMode(a,b) +#define IDirect3D8_CheckDeviceType(p,a,b,c,d,e) (p)->CheckDeviceType(a,b,c,d,e) +#define IDirect3D8_CheckDeviceFormat(p,a,b,c,d,e,f) (p)->CheckDeviceFormat(a,b,c,d,e,f) +#define IDirect3D8_CheckDeviceMultiSampleType(p,a,b,c,d,e) (p)->CheckDeviceMultiSampleType(a,b,c,d,e) +#define IDirect3D8_CheckDepthStencilMatch(p,a,b,c,d,e) (p)->CheckDepthStencilMatch(a,b,c,d,e) +#define IDirect3D8_GetDeviceCaps(p,a,b,c) (p)->GetDeviceCaps(a,b,c) +#define IDirect3D8_GetAdapterMonitor(p,a) (p)->GetAdapterMonitor(a) +#define IDirect3D8_CreateDevice(p,a,b,c,d,e,f) (p)->CreateDevice(a,b,c,d,e,f) +#endif + + + + + + + + + + + + + + + + + + + +#undef INTERFACE +#define INTERFACE IDirect3DDevice8 + +DECLARE_INTERFACE_(IDirect3DDevice8, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DDevice8 methods ***/ + STDMETHOD(TestCooperativeLevel)(THIS) PURE; + STDMETHOD_(UINT, GetAvailableTextureMem)(THIS) PURE; + STDMETHOD(ResourceManagerDiscardBytes)(THIS_ DWORD Bytes) PURE; + STDMETHOD(GetDirect3D)(THIS_ IDirect3D8** ppD3D8) PURE; + STDMETHOD(GetDeviceCaps)(THIS_ D3DCAPS8* pCaps) PURE; + STDMETHOD(GetDisplayMode)(THIS_ D3DDISPLAYMODE* pMode) PURE; + STDMETHOD(GetCreationParameters)(THIS_ D3DDEVICE_CREATION_PARAMETERS *pParameters) PURE; + STDMETHOD(SetCursorProperties)(THIS_ UINT XHotSpot,UINT YHotSpot,IDirect3DSurface8* pCursorBitmap) PURE; + STDMETHOD_(void, SetCursorPosition)(THIS_ UINT XScreenSpace,UINT YScreenSpace,DWORD Flags) PURE; + STDMETHOD_(BOOL, ShowCursor)(THIS_ BOOL bShow) PURE; + STDMETHOD(CreateAdditionalSwapChain)(THIS_ D3DPRESENT_PARAMETERS* pPresentationParameters,IDirect3DSwapChain8** pSwapChain) PURE; + STDMETHOD(Reset)(THIS_ D3DPRESENT_PARAMETERS* pPresentationParameters) PURE; + STDMETHOD(Present)(THIS_ CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion) PURE; + STDMETHOD(GetBackBuffer)(THIS_ UINT BackBuffer,D3DBACKBUFFER_TYPE Type,IDirect3DSurface8** ppBackBuffer) PURE; + STDMETHOD(GetRasterStatus)(THIS_ D3DRASTER_STATUS* pRasterStatus) PURE; + STDMETHOD_(void, SetGammaRamp)(THIS_ DWORD Flags,CONST D3DGAMMARAMP* pRamp) PURE; + STDMETHOD_(void, GetGammaRamp)(THIS_ D3DGAMMARAMP* pRamp) PURE; + STDMETHOD(CreateTexture)(THIS_ UINT Width,UINT Height,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DTexture8** ppTexture) PURE; + STDMETHOD(CreateVolumeTexture)(THIS_ UINT Width,UINT Height,UINT Depth,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DVolumeTexture8** ppVolumeTexture) PURE; + STDMETHOD(CreateCubeTexture)(THIS_ UINT EdgeLength,UINT Levels,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DCubeTexture8** ppCubeTexture) PURE; + STDMETHOD(CreateVertexBuffer)(THIS_ UINT Length,DWORD Usage,DWORD FVF,D3DPOOL Pool,IDirect3DVertexBuffer8** ppVertexBuffer) PURE; + STDMETHOD(CreateIndexBuffer)(THIS_ UINT Length,DWORD Usage,D3DFORMAT Format,D3DPOOL Pool,IDirect3DIndexBuffer8** ppIndexBuffer) PURE; + STDMETHOD(CreateRenderTarget)(THIS_ UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,BOOL Lockable,IDirect3DSurface8** ppSurface) PURE; + STDMETHOD(CreateDepthStencilSurface)(THIS_ UINT Width,UINT Height,D3DFORMAT Format,D3DMULTISAMPLE_TYPE MultiSample,IDirect3DSurface8** ppSurface) PURE; + STDMETHOD(CreateImageSurface)(THIS_ UINT Width,UINT Height,D3DFORMAT Format,IDirect3DSurface8** ppSurface) PURE; + STDMETHOD(CopyRects)(THIS_ IDirect3DSurface8* pSourceSurface,CONST RECT* pSourceRectsArray,UINT cRects,IDirect3DSurface8* pDestinationSurface,CONST POINT* pDestPointsArray) PURE; + STDMETHOD(UpdateTexture)(THIS_ IDirect3DBaseTexture8* pSourceTexture,IDirect3DBaseTexture8* pDestinationTexture) PURE; + STDMETHOD(GetFrontBuffer)(THIS_ IDirect3DSurface8* pDestSurface) PURE; + STDMETHOD(SetRenderTarget)(THIS_ IDirect3DSurface8* pRenderTarget,IDirect3DSurface8* pNewZStencil) PURE; + STDMETHOD(GetRenderTarget)(THIS_ IDirect3DSurface8** ppRenderTarget) PURE; + STDMETHOD(GetDepthStencilSurface)(THIS_ IDirect3DSurface8** ppZStencilSurface) PURE; + STDMETHOD(BeginScene)(THIS) PURE; + STDMETHOD(EndScene)(THIS) PURE; + STDMETHOD(Clear)(THIS_ DWORD Count,CONST D3DRECT* pRects,DWORD Flags,D3DCOLOR Color,float Z,DWORD Stencil) PURE; + STDMETHOD(SetTransform)(THIS_ D3DTRANSFORMSTATETYPE State,CONST D3DMATRIX* pMatrix) PURE; + STDMETHOD(GetTransform)(THIS_ D3DTRANSFORMSTATETYPE State,D3DMATRIX* pMatrix) PURE; + STDMETHOD(MultiplyTransform)(THIS_ D3DTRANSFORMSTATETYPE,CONST D3DMATRIX*) PURE; + STDMETHOD(SetViewport)(THIS_ CONST D3DVIEWPORT8* pViewport) PURE; + STDMETHOD(GetViewport)(THIS_ D3DVIEWPORT8* pViewport) PURE; + STDMETHOD(SetMaterial)(THIS_ CONST D3DMATERIAL8* pMaterial) PURE; + STDMETHOD(GetMaterial)(THIS_ D3DMATERIAL8* pMaterial) PURE; + STDMETHOD(SetLight)(THIS_ DWORD Index,CONST D3DLIGHT8*) PURE; + STDMETHOD(GetLight)(THIS_ DWORD Index,D3DLIGHT8*) PURE; + STDMETHOD(LightEnable)(THIS_ DWORD Index,BOOL Enable) PURE; + STDMETHOD(GetLightEnable)(THIS_ DWORD Index,BOOL* pEnable) PURE; + STDMETHOD(SetClipPlane)(THIS_ DWORD Index,CONST float* pPlane) PURE; + STDMETHOD(GetClipPlane)(THIS_ DWORD Index,float* pPlane) PURE; + STDMETHOD(SetRenderState)(THIS_ D3DRENDERSTATETYPE State,DWORD Value) PURE; + STDMETHOD(GetRenderState)(THIS_ D3DRENDERSTATETYPE State,DWORD* pValue) PURE; + STDMETHOD(BeginStateBlock)(THIS) PURE; + STDMETHOD(EndStateBlock)(THIS_ DWORD* pToken) PURE; + STDMETHOD(ApplyStateBlock)(THIS_ DWORD Token) PURE; + STDMETHOD(CaptureStateBlock)(THIS_ DWORD Token) PURE; + STDMETHOD(DeleteStateBlock)(THIS_ DWORD Token) PURE; + STDMETHOD(CreateStateBlock)(THIS_ D3DSTATEBLOCKTYPE Type,DWORD* pToken) PURE; + STDMETHOD(SetClipStatus)(THIS_ CONST D3DCLIPSTATUS8* pClipStatus) PURE; + STDMETHOD(GetClipStatus)(THIS_ D3DCLIPSTATUS8* pClipStatus) PURE; + STDMETHOD(GetTexture)(THIS_ DWORD Stage,IDirect3DBaseTexture8** ppTexture) PURE; + STDMETHOD(SetTexture)(THIS_ DWORD Stage,IDirect3DBaseTexture8* pTexture) PURE; + STDMETHOD(GetTextureStageState)(THIS_ DWORD Stage,D3DTEXTURESTAGESTATETYPE Type,DWORD* pValue) PURE; + STDMETHOD(SetTextureStageState)(THIS_ DWORD Stage,D3DTEXTURESTAGESTATETYPE Type,DWORD Value) PURE; + STDMETHOD(ValidateDevice)(THIS_ DWORD* pNumPasses) PURE; + STDMETHOD(GetInfo)(THIS_ DWORD DevInfoID,void* pDevInfoStruct,DWORD DevInfoStructSize) PURE; + STDMETHOD(SetPaletteEntries)(THIS_ UINT PaletteNumber,CONST PALETTEENTRY* pEntries) PURE; + STDMETHOD(GetPaletteEntries)(THIS_ UINT PaletteNumber,PALETTEENTRY* pEntries) PURE; + STDMETHOD(SetCurrentTexturePalette)(THIS_ UINT PaletteNumber) PURE; + STDMETHOD(GetCurrentTexturePalette)(THIS_ UINT *PaletteNumber) PURE; + STDMETHOD(DrawPrimitive)(THIS_ D3DPRIMITIVETYPE PrimitiveType,UINT StartVertex,UINT PrimitiveCount) PURE; + STDMETHOD(DrawIndexedPrimitive)(THIS_ D3DPRIMITIVETYPE,UINT minIndex,UINT NumVertices,UINT startIndex,UINT primCount) PURE; + STDMETHOD(DrawPrimitiveUP)(THIS_ D3DPRIMITIVETYPE PrimitiveType,UINT PrimitiveCount,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride) PURE; + STDMETHOD(DrawIndexedPrimitiveUP)(THIS_ D3DPRIMITIVETYPE PrimitiveType,UINT MinVertexIndex,UINT NumVertexIndices,UINT PrimitiveCount,CONST void* pIndexData,D3DFORMAT IndexDataFormat,CONST void* pVertexStreamZeroData,UINT VertexStreamZeroStride) PURE; + STDMETHOD(ProcessVertices)(THIS_ UINT SrcStartIndex,UINT DestIndex,UINT VertexCount,IDirect3DVertexBuffer8* pDestBuffer,DWORD Flags) PURE; + STDMETHOD(CreateVertexShader)(THIS_ CONST DWORD* pDeclaration,CONST DWORD* pFunction,DWORD* pHandle,DWORD Usage) PURE; + STDMETHOD(SetVertexShader)(THIS_ DWORD Handle) PURE; + STDMETHOD(GetVertexShader)(THIS_ DWORD* pHandle) PURE; + STDMETHOD(DeleteVertexShader)(THIS_ DWORD Handle) PURE; + STDMETHOD(SetVertexShaderConstant)(THIS_ DWORD Register,CONST void* pConstantData,DWORD ConstantCount) PURE; + STDMETHOD(GetVertexShaderConstant)(THIS_ DWORD Register,void* pConstantData,DWORD ConstantCount) PURE; + STDMETHOD(GetVertexShaderDeclaration)(THIS_ DWORD Handle,void* pData,DWORD* pSizeOfData) PURE; + STDMETHOD(GetVertexShaderFunction)(THIS_ DWORD Handle,void* pData,DWORD* pSizeOfData) PURE; + STDMETHOD(SetStreamSource)(THIS_ UINT StreamNumber,IDirect3DVertexBuffer8* pStreamData,UINT Stride) PURE; + STDMETHOD(GetStreamSource)(THIS_ UINT StreamNumber,IDirect3DVertexBuffer8** ppStreamData,UINT* pStride) PURE; + STDMETHOD(SetIndices)(THIS_ IDirect3DIndexBuffer8* pIndexData,UINT BaseVertexIndex) PURE; + STDMETHOD(GetIndices)(THIS_ IDirect3DIndexBuffer8** ppIndexData,UINT* pBaseVertexIndex) PURE; + STDMETHOD(CreatePixelShader)(THIS_ CONST DWORD* pFunction,DWORD* pHandle) PURE; + STDMETHOD(SetPixelShader)(THIS_ DWORD Handle) PURE; + STDMETHOD(GetPixelShader)(THIS_ DWORD* pHandle) PURE; + STDMETHOD(DeletePixelShader)(THIS_ DWORD Handle) PURE; + STDMETHOD(SetPixelShaderConstant)(THIS_ DWORD Register,CONST void* pConstantData,DWORD ConstantCount) PURE; + STDMETHOD(GetPixelShaderConstant)(THIS_ DWORD Register,void* pConstantData,DWORD ConstantCount) PURE; + STDMETHOD(GetPixelShaderFunction)(THIS_ DWORD Handle,void* pData,DWORD* pSizeOfData) PURE; + STDMETHOD(DrawRectPatch)(THIS_ UINT Handle,CONST float* pNumSegs,CONST D3DRECTPATCH_INFO* pRectPatchInfo) PURE; + STDMETHOD(DrawTriPatch)(THIS_ UINT Handle,CONST float* pNumSegs,CONST D3DTRIPATCH_INFO* pTriPatchInfo) PURE; + STDMETHOD(DeletePatch)(THIS_ UINT Handle) PURE; +}; + +typedef struct IDirect3DDevice8 *LPDIRECT3DDEVICE8, *PDIRECT3DDEVICE8; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DDevice8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DDevice8_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DDevice8_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p) +#define IDirect3DDevice8_GetAvailableTextureMem(p) (p)->lpVtbl->GetAvailableTextureMem(p) +#define IDirect3DDevice8_ResourceManagerDiscardBytes(p,a) (p)->lpVtbl->ResourceManagerDiscardBytes(p,a) +#define IDirect3DDevice8_GetDirect3D(p,a) (p)->lpVtbl->GetDirect3D(p,a) +#define IDirect3DDevice8_GetDeviceCaps(p,a) (p)->lpVtbl->GetDeviceCaps(p,a) +#define IDirect3DDevice8_GetDisplayMode(p,a) (p)->lpVtbl->GetDisplayMode(p,a) +#define IDirect3DDevice8_GetCreationParameters(p,a) (p)->lpVtbl->GetCreationParameters(p,a) +#define IDirect3DDevice8_SetCursorProperties(p,a,b,c) (p)->lpVtbl->SetCursorProperties(p,a,b,c) +#define IDirect3DDevice8_SetCursorPosition(p,a,b,c) (p)->lpVtbl->SetCursorPosition(p,a,b,c) +#define IDirect3DDevice8_ShowCursor(p,a) (p)->lpVtbl->ShowCursor(p,a) +#define IDirect3DDevice8_CreateAdditionalSwapChain(p,a,b) (p)->lpVtbl->CreateAdditionalSwapChain(p,a,b) +#define IDirect3DDevice8_Reset(p,a) (p)->lpVtbl->Reset(p,a) +#define IDirect3DDevice8_Present(p,a,b,c,d) (p)->lpVtbl->Present(p,a,b,c,d) +#define IDirect3DDevice8_GetBackBuffer(p,a,b,c) (p)->lpVtbl->GetBackBuffer(p,a,b,c) +#define IDirect3DDevice8_GetRasterStatus(p,a) (p)->lpVtbl->GetRasterStatus(p,a) +#define IDirect3DDevice8_SetGammaRamp(p,a,b) (p)->lpVtbl->SetGammaRamp(p,a,b) +#define IDirect3DDevice8_GetGammaRamp(p,a) (p)->lpVtbl->GetGammaRamp(p,a) +#define IDirect3DDevice8_CreateTexture(p,a,b,c,d,e,f,g) (p)->lpVtbl->CreateTexture(p,a,b,c,d,e,f,g) +#define IDirect3DDevice8_CreateVolumeTexture(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->CreateVolumeTexture(p,a,b,c,d,e,f,g,h) +#define IDirect3DDevice8_CreateCubeTexture(p,a,b,c,d,e,f) (p)->lpVtbl->CreateCubeTexture(p,a,b,c,d,e,f) +#define IDirect3DDevice8_CreateVertexBuffer(p,a,b,c,d,e) (p)->lpVtbl->CreateVertexBuffer(p,a,b,c,d,e) +#define IDirect3DDevice8_CreateIndexBuffer(p,a,b,c,d,e) (p)->lpVtbl->CreateIndexBuffer(p,a,b,c,d,e) +#define IDirect3DDevice8_CreateRenderTarget(p,a,b,c,d,e,f) (p)->lpVtbl->CreateRenderTarget(p,a,b,c,d,e,f) +#define IDirect3DDevice8_CreateDepthStencilSurface(p,a,b,c,d,e) (p)->lpVtbl->CreateDepthStencilSurface(p,a,b,c,d,e) +#define IDirect3DDevice8_CreateImageSurface(p,a,b,c,d) (p)->lpVtbl->CreateImageSurface(p,a,b,c,d) +#define IDirect3DDevice8_CopyRects(p,a,b,c,d,e) (p)->lpVtbl->CopyRects(p,a,b,c,d,e) +#define IDirect3DDevice8_UpdateTexture(p,a,b) (p)->lpVtbl->UpdateTexture(p,a,b) +#define IDirect3DDevice8_GetFrontBuffer(p,a) (p)->lpVtbl->GetFrontBuffer(p,a) +#define IDirect3DDevice8_SetRenderTarget(p,a,b) (p)->lpVtbl->SetRenderTarget(p,a,b) +#define IDirect3DDevice8_GetRenderTarget(p,a) (p)->lpVtbl->GetRenderTarget(p,a) +#define IDirect3DDevice8_GetDepthStencilSurface(p,a) (p)->lpVtbl->GetDepthStencilSurface(p,a) +#define IDirect3DDevice8_BeginScene(p) (p)->lpVtbl->BeginScene(p) +#define IDirect3DDevice8_EndScene(p) (p)->lpVtbl->EndScene(p) +#define IDirect3DDevice8_Clear(p,a,b,c,d,e,f) (p)->lpVtbl->Clear(p,a,b,c,d,e,f) +#define IDirect3DDevice8_SetTransform(p,a,b) (p)->lpVtbl->SetTransform(p,a,b) +#define IDirect3DDevice8_GetTransform(p,a,b) (p)->lpVtbl->GetTransform(p,a,b) +#define IDirect3DDevice8_MultiplyTransform(p,a,b) (p)->lpVtbl->MultiplyTransform(p,a,b) +#define IDirect3DDevice8_SetViewport(p,a) (p)->lpVtbl->SetViewport(p,a) +#define IDirect3DDevice8_GetViewport(p,a) (p)->lpVtbl->GetViewport(p,a) +#define IDirect3DDevice8_SetMaterial(p,a) (p)->lpVtbl->SetMaterial(p,a) +#define IDirect3DDevice8_GetMaterial(p,a) (p)->lpVtbl->GetMaterial(p,a) +#define IDirect3DDevice8_SetLight(p,a,b) (p)->lpVtbl->SetLight(p,a,b) +#define IDirect3DDevice8_GetLight(p,a,b) (p)->lpVtbl->GetLight(p,a,b) +#define IDirect3DDevice8_LightEnable(p,a,b) (p)->lpVtbl->LightEnable(p,a,b) +#define IDirect3DDevice8_GetLightEnable(p,a,b) (p)->lpVtbl->GetLightEnable(p,a,b) +#define IDirect3DDevice8_SetClipPlane(p,a,b) (p)->lpVtbl->SetClipPlane(p,a,b) +#define IDirect3DDevice8_GetClipPlane(p,a,b) (p)->lpVtbl->GetClipPlane(p,a,b) +#define IDirect3DDevice8_SetRenderState(p,a,b) (p)->lpVtbl->SetRenderState(p,a,b) +#define IDirect3DDevice8_GetRenderState(p,a,b) (p)->lpVtbl->GetRenderState(p,a,b) +#define IDirect3DDevice8_BeginStateBlock(p) (p)->lpVtbl->BeginStateBlock(p) +#define IDirect3DDevice8_EndStateBlock(p,a) (p)->lpVtbl->EndStateBlock(p,a) +#define IDirect3DDevice8_ApplyStateBlock(p,a) (p)->lpVtbl->ApplyStateBlock(p,a) +#define IDirect3DDevice8_CaptureStateBlock(p,a) (p)->lpVtbl->CaptureStateBlock(p,a) +#define IDirect3DDevice8_DeleteStateBlock(p,a) (p)->lpVtbl->DeleteStateBlock(p,a) +#define IDirect3DDevice8_CreateStateBlock(p,a,b) (p)->lpVtbl->CreateStateBlock(p,a,b) +#define IDirect3DDevice8_SetClipStatus(p,a) (p)->lpVtbl->SetClipStatus(p,a) +#define IDirect3DDevice8_GetClipStatus(p,a) (p)->lpVtbl->GetClipStatus(p,a) +#define IDirect3DDevice8_GetTexture(p,a,b) (p)->lpVtbl->GetTexture(p,a,b) +#define IDirect3DDevice8_SetTexture(p,a,b) (p)->lpVtbl->SetTexture(p,a,b) +#define IDirect3DDevice8_GetTextureStageState(p,a,b,c) (p)->lpVtbl->GetTextureStageState(p,a,b,c) +#define IDirect3DDevice8_SetTextureStageState(p,a,b,c) (p)->lpVtbl->SetTextureStageState(p,a,b,c) +#define IDirect3DDevice8_ValidateDevice(p,a) (p)->lpVtbl->ValidateDevice(p,a) +#define IDirect3DDevice8_GetInfo(p,a,b,c) (p)->lpVtbl->GetInfo(p,a,b,c) +#define IDirect3DDevice8_SetPaletteEntries(p,a,b) (p)->lpVtbl->SetPaletteEntries(p,a,b) +#define IDirect3DDevice8_GetPaletteEntries(p,a,b) (p)->lpVtbl->GetPaletteEntries(p,a,b) +#define IDirect3DDevice8_SetCurrentTexturePalette(p,a) (p)->lpVtbl->SetCurrentTexturePalette(p,a) +#define IDirect3DDevice8_GetCurrentTexturePalette(p,a) (p)->lpVtbl->GetCurrentTexturePalette(p,a) +#define IDirect3DDevice8_DrawPrimitive(p,a,b,c) (p)->lpVtbl->DrawPrimitive(p,a,b,c) +#define IDirect3DDevice8_DrawIndexedPrimitive(p,a,b,c,d,e) (p)->lpVtbl->DrawIndexedPrimitive(p,a,b,c,d,e) +#define IDirect3DDevice8_DrawPrimitiveUP(p,a,b,c,d) (p)->lpVtbl->DrawPrimitiveUP(p,a,b,c,d) +#define IDirect3DDevice8_DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h) +#define IDirect3DDevice8_ProcessVertices(p,a,b,c,d,e) (p)->lpVtbl->ProcessVertices(p,a,b,c,d,e) +#define IDirect3DDevice8_CreateVertexShader(p,a,b,c,d) (p)->lpVtbl->CreateVertexShader(p,a,b,c,d) +#define IDirect3DDevice8_SetVertexShader(p,a) (p)->lpVtbl->SetVertexShader(p,a) +#define IDirect3DDevice8_GetVertexShader(p,a) (p)->lpVtbl->GetVertexShader(p,a) +#define IDirect3DDevice8_DeleteVertexShader(p,a) (p)->lpVtbl->DeleteVertexShader(p,a) +#define IDirect3DDevice8_SetVertexShaderConstant(p,a,b,c) (p)->lpVtbl->SetVertexShaderConstant(p,a,b,c) +#define IDirect3DDevice8_GetVertexShaderConstant(p,a,b,c) (p)->lpVtbl->GetVertexShaderConstant(p,a,b,c) +#define IDirect3DDevice8_GetVertexShaderDeclaration(p,a,b,c) (p)->lpVtbl->GetVertexShaderDeclaration(p,a,b,c) +#define IDirect3DDevice8_GetVertexShaderFunction(p,a,b,c) (p)->lpVtbl->GetVertexShaderFunction(p,a,b,c) +#define IDirect3DDevice8_SetStreamSource(p,a,b,c) (p)->lpVtbl->SetStreamSource(p,a,b,c) +#define IDirect3DDevice8_GetStreamSource(p,a,b,c) (p)->lpVtbl->GetStreamSource(p,a,b,c) +#define IDirect3DDevice8_SetIndices(p,a,b) (p)->lpVtbl->SetIndices(p,a,b) +#define IDirect3DDevice8_GetIndices(p,a,b) (p)->lpVtbl->GetIndices(p,a,b) +#define IDirect3DDevice8_CreatePixelShader(p,a,b) (p)->lpVtbl->CreatePixelShader(p,a,b) +#define IDirect3DDevice8_SetPixelShader(p,a) (p)->lpVtbl->SetPixelShader(p,a) +#define IDirect3DDevice8_GetPixelShader(p,a) (p)->lpVtbl->GetPixelShader(p,a) +#define IDirect3DDevice8_DeletePixelShader(p,a) (p)->lpVtbl->DeletePixelShader(p,a) +#define IDirect3DDevice8_SetPixelShaderConstant(p,a,b,c) (p)->lpVtbl->SetPixelShaderConstant(p,a,b,c) +#define IDirect3DDevice8_GetPixelShaderConstant(p,a,b,c) (p)->lpVtbl->GetPixelShaderConstant(p,a,b,c) +#define IDirect3DDevice8_GetPixelShaderFunction(p,a,b,c) (p)->lpVtbl->GetPixelShaderFunction(p,a,b,c) +#define IDirect3DDevice8_DrawRectPatch(p,a,b,c) (p)->lpVtbl->DrawRectPatch(p,a,b,c) +#define IDirect3DDevice8_DrawTriPatch(p,a,b,c) (p)->lpVtbl->DrawTriPatch(p,a,b,c) +#define IDirect3DDevice8_DeletePatch(p,a) (p)->lpVtbl->DeletePatch(p,a) +#else +#define IDirect3DDevice8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DDevice8_AddRef(p) (p)->AddRef() +#define IDirect3DDevice8_Release(p) (p)->Release() +#define IDirect3DDevice8_TestCooperativeLevel(p) (p)->TestCooperativeLevel() +#define IDirect3DDevice8_GetAvailableTextureMem(p) (p)->GetAvailableTextureMem() +#define IDirect3DDevice8_ResourceManagerDiscardBytes(p,a) (p)->ResourceManagerDiscardBytes(a) +#define IDirect3DDevice8_GetDirect3D(p,a) (p)->GetDirect3D(a) +#define IDirect3DDevice8_GetDeviceCaps(p,a) (p)->GetDeviceCaps(a) +#define IDirect3DDevice8_GetDisplayMode(p,a) (p)->GetDisplayMode(a) +#define IDirect3DDevice8_GetCreationParameters(p,a) (p)->GetCreationParameters(a) +#define IDirect3DDevice8_SetCursorProperties(p,a,b,c) (p)->SetCursorProperties(a,b,c) +#define IDirect3DDevice8_SetCursorPosition(p,a,b,c) (p)->SetCursorPosition(a,b,c) +#define IDirect3DDevice8_ShowCursor(p,a) (p)->ShowCursor(a) +#define IDirect3DDevice8_CreateAdditionalSwapChain(p,a,b) (p)->CreateAdditionalSwapChain(a,b) +#define IDirect3DDevice8_Reset(p,a) (p)->Reset(a) +#define IDirect3DDevice8_Present(p,a,b,c,d) (p)->Present(a,b,c,d) +#define IDirect3DDevice8_GetBackBuffer(p,a,b,c) (p)->GetBackBuffer(a,b,c) +#define IDirect3DDevice8_GetRasterStatus(p,a) (p)->GetRasterStatus(a) +#define IDirect3DDevice8_SetGammaRamp(p,a,b) (p)->SetGammaRamp(a,b) +#define IDirect3DDevice8_GetGammaRamp(p,a) (p)->GetGammaRamp(a) +#define IDirect3DDevice8_CreateTexture(p,a,b,c,d,e,f,g) (p)->CreateTexture(a,b,c,d,e,f,g) +#define IDirect3DDevice8_CreateVolumeTexture(p,a,b,c,d,e,f,g,h) (p)->CreateVolumeTexture(a,b,c,d,e,f,g,h) +#define IDirect3DDevice8_CreateCubeTexture(p,a,b,c,d,e,f) (p)->CreateCubeTexture(a,b,c,d,e,f) +#define IDirect3DDevice8_CreateVertexBuffer(p,a,b,c,d,e) (p)->CreateVertexBuffer(a,b,c,d,e) +#define IDirect3DDevice8_CreateIndexBuffer(p,a,b,c,d,e) (p)->CreateIndexBuffer(a,b,c,d,e) +#define IDirect3DDevice8_CreateRenderTarget(p,a,b,c,d,e,f) (p)->CreateRenderTarget(a,b,c,d,e,f) +#define IDirect3DDevice8_CreateDepthStencilSurface(p,a,b,c,d,e) (p)->CreateDepthStencilSurface(a,b,c,d,e) +#define IDirect3DDevice8_CreateImageSurface(p,a,b,c,d) (p)->CreateImageSurface(a,b,c,d) +#define IDirect3DDevice8_CopyRects(p,a,b,c,d,e) (p)->CopyRects(a,b,c,d,e) +#define IDirect3DDevice8_UpdateTexture(p,a,b) (p)->UpdateTexture(a,b) +#define IDirect3DDevice8_GetFrontBuffer(p,a) (p)->GetFrontBuffer(a) +#define IDirect3DDevice8_SetRenderTarget(p,a,b) (p)->SetRenderTarget(a,b) +#define IDirect3DDevice8_GetRenderTarget(p,a) (p)->GetRenderTarget(a) +#define IDirect3DDevice8_GetDepthStencilSurface(p,a) (p)->GetDepthStencilSurface(a) +#define IDirect3DDevice8_BeginScene(p) (p)->BeginScene() +#define IDirect3DDevice8_EndScene(p) (p)->EndScene() +#define IDirect3DDevice8_Clear(p,a,b,c,d,e,f) (p)->Clear(a,b,c,d,e,f) +#define IDirect3DDevice8_SetTransform(p,a,b) (p)->SetTransform(a,b) +#define IDirect3DDevice8_GetTransform(p,a,b) (p)->GetTransform(a,b) +#define IDirect3DDevice8_MultiplyTransform(p,a,b) (p)->MultiplyTransform(a,b) +#define IDirect3DDevice8_SetViewport(p,a) (p)->SetViewport(a) +#define IDirect3DDevice8_GetViewport(p,a) (p)->GetViewport(a) +#define IDirect3DDevice8_SetMaterial(p,a) (p)->SetMaterial(a) +#define IDirect3DDevice8_GetMaterial(p,a) (p)->GetMaterial(a) +#define IDirect3DDevice8_SetLight(p,a,b) (p)->SetLight(a,b) +#define IDirect3DDevice8_GetLight(p,a,b) (p)->GetLight(a,b) +#define IDirect3DDevice8_LightEnable(p,a,b) (p)->LightEnable(a,b) +#define IDirect3DDevice8_GetLightEnable(p,a,b) (p)->GetLightEnable(a,b) +#define IDirect3DDevice8_SetClipPlane(p,a,b) (p)->SetClipPlane(a,b) +#define IDirect3DDevice8_GetClipPlane(p,a,b) (p)->GetClipPlane(a,b) +#define IDirect3DDevice8_SetRenderState(p,a,b) (p)->SetRenderState(a,b) +#define IDirect3DDevice8_GetRenderState(p,a,b) (p)->GetRenderState(a,b) +#define IDirect3DDevice8_BeginStateBlock(p) (p)->BeginStateBlock() +#define IDirect3DDevice8_EndStateBlock(p,a) (p)->EndStateBlock(a) +#define IDirect3DDevice8_ApplyStateBlock(p,a) (p)->ApplyStateBlock(a) +#define IDirect3DDevice8_CaptureStateBlock(p,a) (p)->CaptureStateBlock(a) +#define IDirect3DDevice8_DeleteStateBlock(p,a) (p)->DeleteStateBlock(a) +#define IDirect3DDevice8_CreateStateBlock(p,a,b) (p)->CreateStateBlock(a,b) +#define IDirect3DDevice8_SetClipStatus(p,a) (p)->SetClipStatus(a) +#define IDirect3DDevice8_GetClipStatus(p,a) (p)->GetClipStatus(a) +#define IDirect3DDevice8_GetTexture(p,a,b) (p)->GetTexture(a,b) +#define IDirect3DDevice8_SetTexture(p,a,b) (p)->SetTexture(a,b) +#define IDirect3DDevice8_GetTextureStageState(p,a,b,c) (p)->GetTextureStageState(a,b,c) +#define IDirect3DDevice8_SetTextureStageState(p,a,b,c) (p)->SetTextureStageState(a,b,c) +#define IDirect3DDevice8_ValidateDevice(p,a) (p)->ValidateDevice(a) +#define IDirect3DDevice8_GetInfo(p,a,b,c) (p)->GetInfo(a,b,c) +#define IDirect3DDevice8_SetPaletteEntries(p,a,b) (p)->SetPaletteEntries(a,b) +#define IDirect3DDevice8_GetPaletteEntries(p,a,b) (p)->GetPaletteEntries(a,b) +#define IDirect3DDevice8_SetCurrentTexturePalette(p,a) (p)->SetCurrentTexturePalette(a) +#define IDirect3DDevice8_GetCurrentTexturePalette(p,a) (p)->GetCurrentTexturePalette(a) +#define IDirect3DDevice8_DrawPrimitive(p,a,b,c) (p)->DrawPrimitive(a,b,c) +#define IDirect3DDevice8_DrawIndexedPrimitive(p,a,b,c,d,e) (p)->DrawIndexedPrimitive(a,b,c,d,e) +#define IDirect3DDevice8_DrawPrimitiveUP(p,a,b,c,d) (p)->DrawPrimitiveUP(a,b,c,d) +#define IDirect3DDevice8_DrawIndexedPrimitiveUP(p,a,b,c,d,e,f,g,h) (p)->DrawIndexedPrimitiveUP(a,b,c,d,e,f,g,h) +#define IDirect3DDevice8_ProcessVertices(p,a,b,c,d,e) (p)->ProcessVertices(a,b,c,d,e) +#define IDirect3DDevice8_CreateVertexShader(p,a,b,c,d) (p)->CreateVertexShader(a,b,c,d) +#define IDirect3DDevice8_SetVertexShader(p,a) (p)->SetVertexShader(a) +#define IDirect3DDevice8_GetVertexShader(p,a) (p)->GetVertexShader(a) +#define IDirect3DDevice8_DeleteVertexShader(p,a) (p)->DeleteVertexShader(a) +#define IDirect3DDevice8_SetVertexShaderConstant(p,a,b,c) (p)->SetVertexShaderConstant(a,b,c) +#define IDirect3DDevice8_GetVertexShaderConstant(p,a,b,c) (p)->GetVertexShaderConstant(a,b,c) +#define IDirect3DDevice8_GetVertexShaderDeclaration(p,a,b,c) (p)->GetVertexShaderDeclaration(a,b,c) +#define IDirect3DDevice8_GetVertexShaderFunction(p,a,b,c) (p)->GetVertexShaderFunction(a,b,c) +#define IDirect3DDevice8_SetStreamSource(p,a,b,c) (p)->SetStreamSource(a,b,c) +#define IDirect3DDevice8_GetStreamSource(p,a,b,c) (p)->GetStreamSource(a,b,c) +#define IDirect3DDevice8_SetIndices(p,a,b) (p)->SetIndices(a,b) +#define IDirect3DDevice8_GetIndices(p,a,b) (p)->GetIndices(a,b) +#define IDirect3DDevice8_CreatePixelShader(p,a,b) (p)->CreatePixelShader(a,b) +#define IDirect3DDevice8_SetPixelShader(p,a) (p)->SetPixelShader(a) +#define IDirect3DDevice8_GetPixelShader(p,a) (p)->GetPixelShader(a) +#define IDirect3DDevice8_DeletePixelShader(p,a) (p)->DeletePixelShader(a) +#define IDirect3DDevice8_SetPixelShaderConstant(p,a,b,c) (p)->SetPixelShaderConstant(a,b,c) +#define IDirect3DDevice8_GetPixelShaderConstant(p,a,b,c) (p)->GetPixelShaderConstant(a,b,c) +#define IDirect3DDevice8_GetPixelShaderFunction(p,a,b,c) (p)->GetPixelShaderFunction(a,b,c) +#define IDirect3DDevice8_DrawRectPatch(p,a,b,c) (p)->DrawRectPatch(a,b,c) +#define IDirect3DDevice8_DrawTriPatch(p,a,b,c) (p)->DrawTriPatch(a,b,c) +#define IDirect3DDevice8_DeletePatch(p,a) (p)->DeletePatch(a) +#endif + + + +#undef INTERFACE +#define INTERFACE IDirect3DSwapChain8 + +DECLARE_INTERFACE_(IDirect3DSwapChain8, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DSwapChain8 methods ***/ + STDMETHOD(Present)(THIS_ CONST RECT* pSourceRect,CONST RECT* pDestRect,HWND hDestWindowOverride,CONST RGNDATA* pDirtyRegion) PURE; + STDMETHOD(GetBackBuffer)(THIS_ UINT BackBuffer,D3DBACKBUFFER_TYPE Type,IDirect3DSurface8** ppBackBuffer) PURE; +}; + +typedef struct IDirect3DSwapChain8 *LPDIRECT3DSWAPCHAIN8, *PDIRECT3DSWAPCHAIN8; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DSwapChain8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DSwapChain8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DSwapChain8_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DSwapChain8_Present(p,a,b,c,d) (p)->lpVtbl->Present(p,a,b,c,d) +#define IDirect3DSwapChain8_GetBackBuffer(p,a,b,c) (p)->lpVtbl->GetBackBuffer(p,a,b,c) +#else +#define IDirect3DSwapChain8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DSwapChain8_AddRef(p) (p)->AddRef() +#define IDirect3DSwapChain8_Release(p) (p)->Release() +#define IDirect3DSwapChain8_Present(p,a,b,c,d) (p)->Present(a,b,c,d) +#define IDirect3DSwapChain8_GetBackBuffer(p,a,b,c) (p)->GetBackBuffer(a,b,c) +#endif + + + +#undef INTERFACE +#define INTERFACE IDirect3DResource8 + +DECLARE_INTERFACE_(IDirect3DResource8, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DResource8 methods ***/ + STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; + STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; + STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; + STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; + STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE; + STDMETHOD_(DWORD, GetPriority)(THIS) PURE; + STDMETHOD_(void, PreLoad)(THIS) PURE; + STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE; +}; + +typedef struct IDirect3DResource8 *LPDIRECT3DRESOURCE8, *PDIRECT3DRESOURCE8; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DResource8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DResource8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DResource8_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DResource8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) +#define IDirect3DResource8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) +#define IDirect3DResource8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) +#define IDirect3DResource8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) +#define IDirect3DResource8_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) +#define IDirect3DResource8_GetPriority(p) (p)->lpVtbl->GetPriority(p) +#define IDirect3DResource8_PreLoad(p) (p)->lpVtbl->PreLoad(p) +#define IDirect3DResource8_GetType(p) (p)->lpVtbl->GetType(p) +#else +#define IDirect3DResource8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DResource8_AddRef(p) (p)->AddRef() +#define IDirect3DResource8_Release(p) (p)->Release() +#define IDirect3DResource8_GetDevice(p,a) (p)->GetDevice(a) +#define IDirect3DResource8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) +#define IDirect3DResource8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) +#define IDirect3DResource8_FreePrivateData(p,a) (p)->FreePrivateData(a) +#define IDirect3DResource8_SetPriority(p,a) (p)->SetPriority(a) +#define IDirect3DResource8_GetPriority(p) (p)->GetPriority() +#define IDirect3DResource8_PreLoad(p) (p)->PreLoad() +#define IDirect3DResource8_GetType(p) (p)->GetType() +#endif + + + + +#undef INTERFACE +#define INTERFACE IDirect3DBaseTexture8 + +DECLARE_INTERFACE_(IDirect3DBaseTexture8, IDirect3DResource8) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DResource8 methods ***/ + STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; + STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; + STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; + STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; + STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE; + STDMETHOD_(DWORD, GetPriority)(THIS) PURE; + STDMETHOD_(void, PreLoad)(THIS) PURE; + STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE; + STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE; + STDMETHOD_(DWORD, GetLOD)(THIS) PURE; + STDMETHOD_(DWORD, GetLevelCount)(THIS) PURE; +}; + +typedef struct IDirect3DBaseTexture8 *LPDIRECT3DBASETEXTURE8, *PDIRECT3DBASETEXTURE8; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DBaseTexture8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DBaseTexture8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DBaseTexture8_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DBaseTexture8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) +#define IDirect3DBaseTexture8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) +#define IDirect3DBaseTexture8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) +#define IDirect3DBaseTexture8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) +#define IDirect3DBaseTexture8_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) +#define IDirect3DBaseTexture8_GetPriority(p) (p)->lpVtbl->GetPriority(p) +#define IDirect3DBaseTexture8_PreLoad(p) (p)->lpVtbl->PreLoad(p) +#define IDirect3DBaseTexture8_GetType(p) (p)->lpVtbl->GetType(p) +#define IDirect3DBaseTexture8_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a) +#define IDirect3DBaseTexture8_GetLOD(p) (p)->lpVtbl->GetLOD(p) +#define IDirect3DBaseTexture8_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p) +#else +#define IDirect3DBaseTexture8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DBaseTexture8_AddRef(p) (p)->AddRef() +#define IDirect3DBaseTexture8_Release(p) (p)->Release() +#define IDirect3DBaseTexture8_GetDevice(p,a) (p)->GetDevice(a) +#define IDirect3DBaseTexture8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) +#define IDirect3DBaseTexture8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) +#define IDirect3DBaseTexture8_FreePrivateData(p,a) (p)->FreePrivateData(a) +#define IDirect3DBaseTexture8_SetPriority(p,a) (p)->SetPriority(a) +#define IDirect3DBaseTexture8_GetPriority(p) (p)->GetPriority() +#define IDirect3DBaseTexture8_PreLoad(p) (p)->PreLoad() +#define IDirect3DBaseTexture8_GetType(p) (p)->GetType() +#define IDirect3DBaseTexture8_SetLOD(p,a) (p)->SetLOD(a) +#define IDirect3DBaseTexture8_GetLOD(p) (p)->GetLOD() +#define IDirect3DBaseTexture8_GetLevelCount(p) (p)->GetLevelCount() +#endif + + + + + +#undef INTERFACE +#define INTERFACE IDirect3DTexture8 + +DECLARE_INTERFACE_(IDirect3DTexture8, IDirect3DBaseTexture8) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DBaseTexture8 methods ***/ + STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; + STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; + STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; + STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; + STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE; + STDMETHOD_(DWORD, GetPriority)(THIS) PURE; + STDMETHOD_(void, PreLoad)(THIS) PURE; + STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE; + STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE; + STDMETHOD_(DWORD, GetLOD)(THIS) PURE; + STDMETHOD_(DWORD, GetLevelCount)(THIS) PURE; + STDMETHOD(GetLevelDesc)(THIS_ UINT Level,D3DSURFACE_DESC *pDesc) PURE; + STDMETHOD(GetSurfaceLevel)(THIS_ UINT Level,IDirect3DSurface8** ppSurfaceLevel) PURE; + STDMETHOD(LockRect)(THIS_ UINT Level,D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags) PURE; + STDMETHOD(UnlockRect)(THIS_ UINT Level) PURE; + STDMETHOD(AddDirtyRect)(THIS_ CONST RECT* pDirtyRect) PURE; +}; + +typedef struct IDirect3DTexture8 *LPDIRECT3DTEXTURE8, *PDIRECT3DTEXTURE8; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DTexture8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DTexture8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DTexture8_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DTexture8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) +#define IDirect3DTexture8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) +#define IDirect3DTexture8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) +#define IDirect3DTexture8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) +#define IDirect3DTexture8_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) +#define IDirect3DTexture8_GetPriority(p) (p)->lpVtbl->GetPriority(p) +#define IDirect3DTexture8_PreLoad(p) (p)->lpVtbl->PreLoad(p) +#define IDirect3DTexture8_GetType(p) (p)->lpVtbl->GetType(p) +#define IDirect3DTexture8_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a) +#define IDirect3DTexture8_GetLOD(p) (p)->lpVtbl->GetLOD(p) +#define IDirect3DTexture8_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p) +#define IDirect3DTexture8_GetLevelDesc(p,a,b) (p)->lpVtbl->GetLevelDesc(p,a,b) +#define IDirect3DTexture8_GetSurfaceLevel(p,a,b) (p)->lpVtbl->GetSurfaceLevel(p,a,b) +#define IDirect3DTexture8_LockRect(p,a,b,c,d) (p)->lpVtbl->LockRect(p,a,b,c,d) +#define IDirect3DTexture8_UnlockRect(p,a) (p)->lpVtbl->UnlockRect(p,a) +#define IDirect3DTexture8_AddDirtyRect(p,a) (p)->lpVtbl->AddDirtyRect(p,a) +#else +#define IDirect3DTexture8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DTexture8_AddRef(p) (p)->AddRef() +#define IDirect3DTexture8_Release(p) (p)->Release() +#define IDirect3DTexture8_GetDevice(p,a) (p)->GetDevice(a) +#define IDirect3DTexture8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) +#define IDirect3DTexture8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) +#define IDirect3DTexture8_FreePrivateData(p,a) (p)->FreePrivateData(a) +#define IDirect3DTexture8_SetPriority(p,a) (p)->SetPriority(a) +#define IDirect3DTexture8_GetPriority(p) (p)->GetPriority() +#define IDirect3DTexture8_PreLoad(p) (p)->PreLoad() +#define IDirect3DTexture8_GetType(p) (p)->GetType() +#define IDirect3DTexture8_SetLOD(p,a) (p)->SetLOD(a) +#define IDirect3DTexture8_GetLOD(p) (p)->GetLOD() +#define IDirect3DTexture8_GetLevelCount(p) (p)->GetLevelCount() +#define IDirect3DTexture8_GetLevelDesc(p,a,b) (p)->GetLevelDesc(a,b) +#define IDirect3DTexture8_GetSurfaceLevel(p,a,b) (p)->GetSurfaceLevel(a,b) +#define IDirect3DTexture8_LockRect(p,a,b,c,d) (p)->LockRect(a,b,c,d) +#define IDirect3DTexture8_UnlockRect(p,a) (p)->UnlockRect(a) +#define IDirect3DTexture8_AddDirtyRect(p,a) (p)->AddDirtyRect(a) +#endif + + + + + +#undef INTERFACE +#define INTERFACE IDirect3DVolumeTexture8 + +DECLARE_INTERFACE_(IDirect3DVolumeTexture8, IDirect3DBaseTexture8) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DBaseTexture8 methods ***/ + STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; + STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; + STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; + STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; + STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE; + STDMETHOD_(DWORD, GetPriority)(THIS) PURE; + STDMETHOD_(void, PreLoad)(THIS) PURE; + STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE; + STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE; + STDMETHOD_(DWORD, GetLOD)(THIS) PURE; + STDMETHOD_(DWORD, GetLevelCount)(THIS) PURE; + STDMETHOD(GetLevelDesc)(THIS_ UINT Level,D3DVOLUME_DESC *pDesc) PURE; + STDMETHOD(GetVolumeLevel)(THIS_ UINT Level,IDirect3DVolume8** ppVolumeLevel) PURE; + STDMETHOD(LockBox)(THIS_ UINT Level,D3DLOCKED_BOX* pLockedVolume,CONST D3DBOX* pBox,DWORD Flags) PURE; + STDMETHOD(UnlockBox)(THIS_ UINT Level) PURE; + STDMETHOD(AddDirtyBox)(THIS_ CONST D3DBOX* pDirtyBox) PURE; +}; + +typedef struct IDirect3DVolumeTexture8 *LPDIRECT3DVOLUMETEXTURE8, *PDIRECT3DVOLUMETEXTURE8; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DVolumeTexture8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DVolumeTexture8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DVolumeTexture8_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DVolumeTexture8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) +#define IDirect3DVolumeTexture8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) +#define IDirect3DVolumeTexture8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) +#define IDirect3DVolumeTexture8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) +#define IDirect3DVolumeTexture8_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) +#define IDirect3DVolumeTexture8_GetPriority(p) (p)->lpVtbl->GetPriority(p) +#define IDirect3DVolumeTexture8_PreLoad(p) (p)->lpVtbl->PreLoad(p) +#define IDirect3DVolumeTexture8_GetType(p) (p)->lpVtbl->GetType(p) +#define IDirect3DVolumeTexture8_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a) +#define IDirect3DVolumeTexture8_GetLOD(p) (p)->lpVtbl->GetLOD(p) +#define IDirect3DVolumeTexture8_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p) +#define IDirect3DVolumeTexture8_GetLevelDesc(p,a,b) (p)->lpVtbl->GetLevelDesc(p,a,b) +#define IDirect3DVolumeTexture8_GetVolumeLevel(p,a,b) (p)->lpVtbl->GetVolumeLevel(p,a,b) +#define IDirect3DVolumeTexture8_LockBox(p,a,b,c,d) (p)->lpVtbl->LockBox(p,a,b,c,d) +#define IDirect3DVolumeTexture8_UnlockBox(p,a) (p)->lpVtbl->UnlockBox(p,a) +#define IDirect3DVolumeTexture8_AddDirtyBox(p,a) (p)->lpVtbl->AddDirtyBox(p,a) +#else +#define IDirect3DVolumeTexture8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DVolumeTexture8_AddRef(p) (p)->AddRef() +#define IDirect3DVolumeTexture8_Release(p) (p)->Release() +#define IDirect3DVolumeTexture8_GetDevice(p,a) (p)->GetDevice(a) +#define IDirect3DVolumeTexture8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) +#define IDirect3DVolumeTexture8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) +#define IDirect3DVolumeTexture8_FreePrivateData(p,a) (p)->FreePrivateData(a) +#define IDirect3DVolumeTexture8_SetPriority(p,a) (p)->SetPriority(a) +#define IDirect3DVolumeTexture8_GetPriority(p) (p)->GetPriority() +#define IDirect3DVolumeTexture8_PreLoad(p) (p)->PreLoad() +#define IDirect3DVolumeTexture8_GetType(p) (p)->GetType() +#define IDirect3DVolumeTexture8_SetLOD(p,a) (p)->SetLOD(a) +#define IDirect3DVolumeTexture8_GetLOD(p) (p)->GetLOD() +#define IDirect3DVolumeTexture8_GetLevelCount(p) (p)->GetLevelCount() +#define IDirect3DVolumeTexture8_GetLevelDesc(p,a,b) (p)->GetLevelDesc(a,b) +#define IDirect3DVolumeTexture8_GetVolumeLevel(p,a,b) (p)->GetVolumeLevel(a,b) +#define IDirect3DVolumeTexture8_LockBox(p,a,b,c,d) (p)->LockBox(a,b,c,d) +#define IDirect3DVolumeTexture8_UnlockBox(p,a) (p)->UnlockBox(a) +#define IDirect3DVolumeTexture8_AddDirtyBox(p,a) (p)->AddDirtyBox(a) +#endif + + + + + +#undef INTERFACE +#define INTERFACE IDirect3DCubeTexture8 + +DECLARE_INTERFACE_(IDirect3DCubeTexture8, IDirect3DBaseTexture8) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DBaseTexture8 methods ***/ + STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; + STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; + STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; + STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; + STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE; + STDMETHOD_(DWORD, GetPriority)(THIS) PURE; + STDMETHOD_(void, PreLoad)(THIS) PURE; + STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE; + STDMETHOD_(DWORD, SetLOD)(THIS_ DWORD LODNew) PURE; + STDMETHOD_(DWORD, GetLOD)(THIS) PURE; + STDMETHOD_(DWORD, GetLevelCount)(THIS) PURE; + STDMETHOD(GetLevelDesc)(THIS_ UINT Level,D3DSURFACE_DESC *pDesc) PURE; + STDMETHOD(GetCubeMapSurface)(THIS_ D3DCUBEMAP_FACES FaceType,UINT Level,IDirect3DSurface8** ppCubeMapSurface) PURE; + STDMETHOD(LockRect)(THIS_ D3DCUBEMAP_FACES FaceType,UINT Level,D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags) PURE; + STDMETHOD(UnlockRect)(THIS_ D3DCUBEMAP_FACES FaceType,UINT Level) PURE; + STDMETHOD(AddDirtyRect)(THIS_ D3DCUBEMAP_FACES FaceType,CONST RECT* pDirtyRect) PURE; +}; + +typedef struct IDirect3DCubeTexture8 *LPDIRECT3DCUBETEXTURE8, *PDIRECT3DCUBETEXTURE8; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DCubeTexture8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DCubeTexture8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DCubeTexture8_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DCubeTexture8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) +#define IDirect3DCubeTexture8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) +#define IDirect3DCubeTexture8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) +#define IDirect3DCubeTexture8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) +#define IDirect3DCubeTexture8_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) +#define IDirect3DCubeTexture8_GetPriority(p) (p)->lpVtbl->GetPriority(p) +#define IDirect3DCubeTexture8_PreLoad(p) (p)->lpVtbl->PreLoad(p) +#define IDirect3DCubeTexture8_GetType(p) (p)->lpVtbl->GetType(p) +#define IDirect3DCubeTexture8_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a) +#define IDirect3DCubeTexture8_GetLOD(p) (p)->lpVtbl->GetLOD(p) +#define IDirect3DCubeTexture8_GetLevelCount(p) (p)->lpVtbl->GetLevelCount(p) +#define IDirect3DCubeTexture8_GetLevelDesc(p,a,b) (p)->lpVtbl->GetLevelDesc(p,a,b) +#define IDirect3DCubeTexture8_GetCubeMapSurface(p,a,b,c) (p)->lpVtbl->GetCubeMapSurface(p,a,b,c) +#define IDirect3DCubeTexture8_LockRect(p,a,b,c,d,e) (p)->lpVtbl->LockRect(p,a,b,c,d,e) +#define IDirect3DCubeTexture8_UnlockRect(p,a,b) (p)->lpVtbl->UnlockRect(p,a,b) +#define IDirect3DCubeTexture8_AddDirtyRect(p,a,b) (p)->lpVtbl->AddDirtyRect(p,a,b) +#else +#define IDirect3DCubeTexture8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DCubeTexture8_AddRef(p) (p)->AddRef() +#define IDirect3DCubeTexture8_Release(p) (p)->Release() +#define IDirect3DCubeTexture8_GetDevice(p,a) (p)->GetDevice(a) +#define IDirect3DCubeTexture8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) +#define IDirect3DCubeTexture8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) +#define IDirect3DCubeTexture8_FreePrivateData(p,a) (p)->FreePrivateData(a) +#define IDirect3DCubeTexture8_SetPriority(p,a) (p)->SetPriority(a) +#define IDirect3DCubeTexture8_GetPriority(p) (p)->GetPriority() +#define IDirect3DCubeTexture8_PreLoad(p) (p)->PreLoad() +#define IDirect3DCubeTexture8_GetType(p) (p)->GetType() +#define IDirect3DCubeTexture8_SetLOD(p,a) (p)->SetLOD(a) +#define IDirect3DCubeTexture8_GetLOD(p) (p)->GetLOD() +#define IDirect3DCubeTexture8_GetLevelCount(p) (p)->GetLevelCount() +#define IDirect3DCubeTexture8_GetLevelDesc(p,a,b) (p)->GetLevelDesc(a,b) +#define IDirect3DCubeTexture8_GetCubeMapSurface(p,a,b,c) (p)->GetCubeMapSurface(a,b,c) +#define IDirect3DCubeTexture8_LockRect(p,a,b,c,d,e) (p)->LockRect(a,b,c,d,e) +#define IDirect3DCubeTexture8_UnlockRect(p,a,b) (p)->UnlockRect(a,b) +#define IDirect3DCubeTexture8_AddDirtyRect(p,a,b) (p)->AddDirtyRect(a,b) +#endif + + + + +#undef INTERFACE +#define INTERFACE IDirect3DVertexBuffer8 + +DECLARE_INTERFACE_(IDirect3DVertexBuffer8, IDirect3DResource8) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DResource8 methods ***/ + STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; + STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; + STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; + STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; + STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE; + STDMETHOD_(DWORD, GetPriority)(THIS) PURE; + STDMETHOD_(void, PreLoad)(THIS) PURE; + STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE; + STDMETHOD(Lock)(THIS_ UINT OffsetToLock,UINT SizeToLock,BYTE** ppbData,DWORD Flags) PURE; + STDMETHOD(Unlock)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ D3DVERTEXBUFFER_DESC *pDesc) PURE; +}; + +typedef struct IDirect3DVertexBuffer8 *LPDIRECT3DVERTEXBUFFER8, *PDIRECT3DVERTEXBUFFER8; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DVertexBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DVertexBuffer8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DVertexBuffer8_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DVertexBuffer8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) +#define IDirect3DVertexBuffer8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) +#define IDirect3DVertexBuffer8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) +#define IDirect3DVertexBuffer8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) +#define IDirect3DVertexBuffer8_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) +#define IDirect3DVertexBuffer8_GetPriority(p) (p)->lpVtbl->GetPriority(p) +#define IDirect3DVertexBuffer8_PreLoad(p) (p)->lpVtbl->PreLoad(p) +#define IDirect3DVertexBuffer8_GetType(p) (p)->lpVtbl->GetType(p) +#define IDirect3DVertexBuffer8_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) +#define IDirect3DVertexBuffer8_Unlock(p) (p)->lpVtbl->Unlock(p) +#define IDirect3DVertexBuffer8_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a) +#else +#define IDirect3DVertexBuffer8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DVertexBuffer8_AddRef(p) (p)->AddRef() +#define IDirect3DVertexBuffer8_Release(p) (p)->Release() +#define IDirect3DVertexBuffer8_GetDevice(p,a) (p)->GetDevice(a) +#define IDirect3DVertexBuffer8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) +#define IDirect3DVertexBuffer8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) +#define IDirect3DVertexBuffer8_FreePrivateData(p,a) (p)->FreePrivateData(a) +#define IDirect3DVertexBuffer8_SetPriority(p,a) (p)->SetPriority(a) +#define IDirect3DVertexBuffer8_GetPriority(p) (p)->GetPriority() +#define IDirect3DVertexBuffer8_PreLoad(p) (p)->PreLoad() +#define IDirect3DVertexBuffer8_GetType(p) (p)->GetType() +#define IDirect3DVertexBuffer8_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) +#define IDirect3DVertexBuffer8_Unlock(p) (p)->Unlock() +#define IDirect3DVertexBuffer8_GetDesc(p,a) (p)->GetDesc(a) +#endif + + + + +#undef INTERFACE +#define INTERFACE IDirect3DIndexBuffer8 + +DECLARE_INTERFACE_(IDirect3DIndexBuffer8, IDirect3DResource8) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DResource8 methods ***/ + STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; + STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; + STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; + STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; + STDMETHOD_(DWORD, SetPriority)(THIS_ DWORD PriorityNew) PURE; + STDMETHOD_(DWORD, GetPriority)(THIS) PURE; + STDMETHOD_(void, PreLoad)(THIS) PURE; + STDMETHOD_(D3DRESOURCETYPE, GetType)(THIS) PURE; + STDMETHOD(Lock)(THIS_ UINT OffsetToLock,UINT SizeToLock,BYTE** ppbData,DWORD Flags) PURE; + STDMETHOD(Unlock)(THIS) PURE; + STDMETHOD(GetDesc)(THIS_ D3DINDEXBUFFER_DESC *pDesc) PURE; +}; + +typedef struct IDirect3DIndexBuffer8 *LPDIRECT3DINDEXBUFFER8, *PDIRECT3DINDEXBUFFER8; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DIndexBuffer8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DIndexBuffer8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DIndexBuffer8_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DIndexBuffer8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) +#define IDirect3DIndexBuffer8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) +#define IDirect3DIndexBuffer8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) +#define IDirect3DIndexBuffer8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) +#define IDirect3DIndexBuffer8_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) +#define IDirect3DIndexBuffer8_GetPriority(p) (p)->lpVtbl->GetPriority(p) +#define IDirect3DIndexBuffer8_PreLoad(p) (p)->lpVtbl->PreLoad(p) +#define IDirect3DIndexBuffer8_GetType(p) (p)->lpVtbl->GetType(p) +#define IDirect3DIndexBuffer8_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) +#define IDirect3DIndexBuffer8_Unlock(p) (p)->lpVtbl->Unlock(p) +#define IDirect3DIndexBuffer8_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a) +#else +#define IDirect3DIndexBuffer8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DIndexBuffer8_AddRef(p) (p)->AddRef() +#define IDirect3DIndexBuffer8_Release(p) (p)->Release() +#define IDirect3DIndexBuffer8_GetDevice(p,a) (p)->GetDevice(a) +#define IDirect3DIndexBuffer8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) +#define IDirect3DIndexBuffer8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) +#define IDirect3DIndexBuffer8_FreePrivateData(p,a) (p)->FreePrivateData(a) +#define IDirect3DIndexBuffer8_SetPriority(p,a) (p)->SetPriority(a) +#define IDirect3DIndexBuffer8_GetPriority(p) (p)->GetPriority() +#define IDirect3DIndexBuffer8_PreLoad(p) (p)->PreLoad() +#define IDirect3DIndexBuffer8_GetType(p) (p)->GetType() +#define IDirect3DIndexBuffer8_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) +#define IDirect3DIndexBuffer8_Unlock(p) (p)->Unlock() +#define IDirect3DIndexBuffer8_GetDesc(p,a) (p)->GetDesc(a) +#endif + + + + +#undef INTERFACE +#define INTERFACE IDirect3DSurface8 + +DECLARE_INTERFACE_(IDirect3DSurface8, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DSurface8 methods ***/ + STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; + STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; + STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; + STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; + STDMETHOD(GetContainer)(THIS_ REFIID riid,void** ppContainer) PURE; + STDMETHOD(GetDesc)(THIS_ D3DSURFACE_DESC *pDesc) PURE; + STDMETHOD(LockRect)(THIS_ D3DLOCKED_RECT* pLockedRect,CONST RECT* pRect,DWORD Flags) PURE; + STDMETHOD(UnlockRect)(THIS) PURE; +}; + +typedef struct IDirect3DSurface8 *LPDIRECT3DSURFACE8, *PDIRECT3DSURFACE8; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DSurface8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DSurface8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DSurface8_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DSurface8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) +#define IDirect3DSurface8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) +#define IDirect3DSurface8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) +#define IDirect3DSurface8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) +#define IDirect3DSurface8_GetContainer(p,a,b) (p)->lpVtbl->GetContainer(p,a,b) +#define IDirect3DSurface8_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a) +#define IDirect3DSurface8_LockRect(p,a,b,c) (p)->lpVtbl->LockRect(p,a,b,c) +#define IDirect3DSurface8_UnlockRect(p) (p)->lpVtbl->UnlockRect(p) +#else +#define IDirect3DSurface8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DSurface8_AddRef(p) (p)->AddRef() +#define IDirect3DSurface8_Release(p) (p)->Release() +#define IDirect3DSurface8_GetDevice(p,a) (p)->GetDevice(a) +#define IDirect3DSurface8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) +#define IDirect3DSurface8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) +#define IDirect3DSurface8_FreePrivateData(p,a) (p)->FreePrivateData(a) +#define IDirect3DSurface8_GetContainer(p,a,b) (p)->GetContainer(a,b) +#define IDirect3DSurface8_GetDesc(p,a) (p)->GetDesc(a) +#define IDirect3DSurface8_LockRect(p,a,b,c) (p)->LockRect(a,b,c) +#define IDirect3DSurface8_UnlockRect(p) (p)->UnlockRect() +#endif + + + + +#undef INTERFACE +#define INTERFACE IDirect3DVolume8 + +DECLARE_INTERFACE_(IDirect3DVolume8, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, void** ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirect3DVolume8 methods ***/ + STDMETHOD(GetDevice)(THIS_ IDirect3DDevice8** ppDevice) PURE; + STDMETHOD(SetPrivateData)(THIS_ REFGUID refguid,CONST void* pData,DWORD SizeOfData,DWORD Flags) PURE; + STDMETHOD(GetPrivateData)(THIS_ REFGUID refguid,void* pData,DWORD* pSizeOfData) PURE; + STDMETHOD(FreePrivateData)(THIS_ REFGUID refguid) PURE; + STDMETHOD(GetContainer)(THIS_ REFIID riid,void** ppContainer) PURE; + STDMETHOD(GetDesc)(THIS_ D3DVOLUME_DESC *pDesc) PURE; + STDMETHOD(LockBox)(THIS_ D3DLOCKED_BOX * pLockedVolume,CONST D3DBOX* pBox,DWORD Flags) PURE; + STDMETHOD(UnlockBox)(THIS) PURE; +}; + +typedef struct IDirect3DVolume8 *LPDIRECT3DVOLUME8, *PDIRECT3DVOLUME8; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirect3DVolume8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirect3DVolume8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirect3DVolume8_Release(p) (p)->lpVtbl->Release(p) +#define IDirect3DVolume8_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) +#define IDirect3DVolume8_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) +#define IDirect3DVolume8_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) +#define IDirect3DVolume8_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) +#define IDirect3DVolume8_GetContainer(p,a,b) (p)->lpVtbl->GetContainer(p,a,b) +#define IDirect3DVolume8_GetDesc(p,a) (p)->lpVtbl->GetDesc(p,a) +#define IDirect3DVolume8_LockBox(p,a,b,c) (p)->lpVtbl->LockBox(p,a,b,c) +#define IDirect3DVolume8_UnlockBox(p) (p)->lpVtbl->UnlockBox(p) +#else +#define IDirect3DVolume8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirect3DVolume8_AddRef(p) (p)->AddRef() +#define IDirect3DVolume8_Release(p) (p)->Release() +#define IDirect3DVolume8_GetDevice(p,a) (p)->GetDevice(a) +#define IDirect3DVolume8_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) +#define IDirect3DVolume8_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) +#define IDirect3DVolume8_FreePrivateData(p,a) (p)->FreePrivateData(a) +#define IDirect3DVolume8_GetContainer(p,a,b) (p)->GetContainer(a,b) +#define IDirect3DVolume8_GetDesc(p,a) (p)->GetDesc(a) +#define IDirect3DVolume8_LockBox(p,a,b,c) (p)->LockBox(a,b,c) +#define IDirect3DVolume8_UnlockBox(p) (p)->UnlockBox() +#endif + +/**************************************************************************** + * Flags for SetPrivateData method on all D3D8 interfaces + * + * The passed pointer is an IUnknown ptr. The SizeOfData argument to SetPrivateData + * must be set to sizeof(IUnknown*). Direct3D will call AddRef through this + * pointer and Release when the private data is destroyed. The data will be + * destroyed when another SetPrivateData with the same GUID is set, when + * FreePrivateData is called, or when the D3D8 object is freed. + ****************************************************************************/ +#define D3DSPD_IUNKNOWN 0x00000001L + +/**************************************************************************** + * + * Parameter for IDirect3D8 Enum and GetCaps8 functions to get the info for + * the current mode only. + * + ****************************************************************************/ + +#define D3DCURRENT_DISPLAY_MODE 0x00EFFFFFL + +/**************************************************************************** + * + * Flags for IDirect3D8::CreateDevice's BehaviorFlags + * + ****************************************************************************/ + +#define D3DCREATE_FPU_PRESERVE 0x00000002L +#define D3DCREATE_MULTITHREADED 0x00000004L + +#define D3DCREATE_PUREDEVICE 0x00000010L +#define D3DCREATE_SOFTWARE_VERTEXPROCESSING 0x00000020L +#define D3DCREATE_HARDWARE_VERTEXPROCESSING 0x00000040L +#define D3DCREATE_MIXED_VERTEXPROCESSING 0x00000080L + + +/**************************************************************************** + * + * Parameter for IDirect3D8::CreateDevice's iAdapter + * + ****************************************************************************/ + +#define D3DADAPTER_DEFAULT 0 + +/**************************************************************************** + * + * Flags for IDirect3D8::EnumAdapters + * + ****************************************************************************/ + +#define D3DENUM_NO_WHQL_LEVEL 0x00000002L + +/**************************************************************************** + * + * Maximum number of back-buffers supported in DX8 + * + ****************************************************************************/ + +#define D3DPRESENT_BACK_BUFFERS_MAX 3L + +/**************************************************************************** + * + * Flags for IDirect3DDevice8::SetGammaRamp + * + ****************************************************************************/ + +#define D3DSGR_NO_CALIBRATION 0x00000000L +#define D3DSGR_CALIBRATE 0x00000001L + +/**************************************************************************** + * + * Flags for IDirect3DDevice8::SetCursorPosition + * + ****************************************************************************/ + +#define D3DCURSOR_IMMEDIATE_UPDATE 0x00000001L + +/**************************************************************************** + * + * Flags for DrawPrimitive/DrawIndexedPrimitive + * Also valid for Begin/BeginIndexed + * Also valid for VertexBuffer::CreateVertexBuffer + ****************************************************************************/ + + +/* + * DirectDraw error codes + */ +#define _FACD3D 0x876 +#define MAKE_D3DHRESULT( code ) MAKE_HRESULT( 1, _FACD3D, code ) + +/* + * Direct3D Errors + */ +#define D3D_OK S_OK + +#define D3DERR_WRONGTEXTUREFORMAT MAKE_D3DHRESULT(2072) +#define D3DERR_UNSUPPORTEDCOLOROPERATION MAKE_D3DHRESULT(2073) +#define D3DERR_UNSUPPORTEDCOLORARG MAKE_D3DHRESULT(2074) +#define D3DERR_UNSUPPORTEDALPHAOPERATION MAKE_D3DHRESULT(2075) +#define D3DERR_UNSUPPORTEDALPHAARG MAKE_D3DHRESULT(2076) +#define D3DERR_TOOMANYOPERATIONS MAKE_D3DHRESULT(2077) +#define D3DERR_CONFLICTINGTEXTUREFILTER MAKE_D3DHRESULT(2078) +#define D3DERR_UNSUPPORTEDFACTORVALUE MAKE_D3DHRESULT(2079) +#define D3DERR_CONFLICTINGRENDERSTATE MAKE_D3DHRESULT(2081) +#define D3DERR_UNSUPPORTEDTEXTUREFILTER MAKE_D3DHRESULT(2082) +#define D3DERR_CONFLICTINGTEXTUREPALETTE MAKE_D3DHRESULT(2086) +#define D3DERR_DRIVERINTERNALERROR MAKE_D3DHRESULT(2087) + +#define D3DERR_NOTFOUND MAKE_D3DHRESULT(2150) +#define D3DERR_MOREDATA MAKE_D3DHRESULT(2151) +#define D3DERR_DEVICELOST MAKE_D3DHRESULT(2152) +#define D3DERR_DEVICENOTRESET MAKE_D3DHRESULT(2153) +#define D3DERR_NOTAVAILABLE MAKE_D3DHRESULT(2154) +#define D3DERR_OUTOFVIDEOMEMORY MAKE_D3DHRESULT(380) +#define D3DERR_INVALIDDEVICE MAKE_D3DHRESULT(2155) +#define D3DERR_INVALIDCALL MAKE_D3DHRESULT(2156) +#define D3DERR_DRIVERINVALIDCALL MAKE_D3DHRESULT(2157) + +#ifdef __cplusplus +}; +#endif + +#endif /* (DIRECT3D_VERSION >= 0x0800) */ +#endif /* _D3D_H_ */ + diff --git a/windows_libs/mssdk/include/d3d8caps.h b/windows_libs/mssdk/include/d3d8caps.h new file mode 100644 index 00000000..66998932 --- /dev/null +++ b/windows_libs/mssdk/include/d3d8caps.h @@ -0,0 +1,354 @@ +/*==========================================================================; + * + * Copyright (C) 1995-2000 Microsoft Corporation. All Rights Reserved. + * + * File: d3d8caps.h + * Content: Direct3D capabilities include file + * + ***************************************************************************/ + +#ifndef _D3D8CAPS_H +#define _D3D8CAPS_H + +#ifndef DIRECT3D_VERSION +#define DIRECT3D_VERSION 0x0800 +#endif //DIRECT3D_VERSION + +// include this file content only if compiling for DX8 interfaces +#if(DIRECT3D_VERSION >= 0x0800) + +#pragma pack(4) + +typedef struct _D3DCAPS8 +{ + /* Device Info */ + D3DDEVTYPE DeviceType; + UINT AdapterOrdinal; + + /* Caps from DX7 Draw */ + DWORD Caps; + DWORD Caps2; + DWORD Caps3; + DWORD PresentationIntervals; + + /* Cursor Caps */ + DWORD CursorCaps; + + /* 3D Device Caps */ + DWORD DevCaps; + + DWORD PrimitiveMiscCaps; + DWORD RasterCaps; + DWORD ZCmpCaps; + DWORD SrcBlendCaps; + DWORD DestBlendCaps; + DWORD AlphaCmpCaps; + DWORD ShadeCaps; + DWORD TextureCaps; + DWORD TextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DTexture8's + DWORD CubeTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DCubeTexture8's + DWORD VolumeTextureFilterCaps; // D3DPTFILTERCAPS for IDirect3DVolumeTexture8's + DWORD TextureAddressCaps; // D3DPTADDRESSCAPS for IDirect3DTexture8's + DWORD VolumeTextureAddressCaps; // D3DPTADDRESSCAPS for IDirect3DVolumeTexture8's + + DWORD LineCaps; // D3DLINECAPS + + DWORD MaxTextureWidth, MaxTextureHeight; + DWORD MaxVolumeExtent; + + DWORD MaxTextureRepeat; + DWORD MaxTextureAspectRatio; + DWORD MaxAnisotropy; + float MaxVertexW; + + float GuardBandLeft; + float GuardBandTop; + float GuardBandRight; + float GuardBandBottom; + + float ExtentsAdjust; + DWORD StencilCaps; + + DWORD FVFCaps; + DWORD TextureOpCaps; + DWORD MaxTextureBlendStages; + DWORD MaxSimultaneousTextures; + + DWORD VertexProcessingCaps; + DWORD MaxActiveLights; + DWORD MaxUserClipPlanes; + DWORD MaxVertexBlendMatrices; + DWORD MaxVertexBlendMatrixIndex; + + float MaxPointSize; + + DWORD MaxPrimitiveCount; // max number of primitives per DrawPrimitive call + DWORD MaxVertexIndex; + DWORD MaxStreams; + DWORD MaxStreamStride; // max stride for SetStreamSource + + DWORD VertexShaderVersion; + DWORD MaxVertexShaderConst; // number of vertex shader constant registers + + DWORD PixelShaderVersion; + float MaxPixelShaderValue; // max value of pixel shader arithmetic component + +} D3DCAPS8; + +// +// BIT DEFINES FOR D3DCAPS8 DWORD MEMBERS +// + +// +// Caps +// +#define D3DCAPS_READ_SCANLINE 0x00020000L + +// +// Caps2 +// +#define D3DCAPS2_NO2DDURING3DSCENE 0x00000002L +#define D3DCAPS2_FULLSCREENGAMMA 0x00020000L +#define D3DCAPS2_CANRENDERWINDOWED 0x00080000L +#define D3DCAPS2_CANCALIBRATEGAMMA 0x00100000L +#define D3DCAPS2_RESERVED 0x02000000L + +// +// Caps3 +// +#define D3DCAPS3_RESERVED 0x8000001fL + +// +// PresentationIntervals +// +#define D3DPRESENT_INTERVAL_DEFAULT 0x00000000L +#define D3DPRESENT_INTERVAL_ONE 0x00000001L +#define D3DPRESENT_INTERVAL_TWO 0x00000002L +#define D3DPRESENT_INTERVAL_THREE 0x00000004L +#define D3DPRESENT_INTERVAL_FOUR 0x00000008L +#define D3DPRESENT_INTERVAL_IMMEDIATE 0x80000000L + +// +// CursorCaps +// +// Driver supports HW color cursor in at least hi-res modes(height >=400) +#define D3DCURSORCAPS_COLOR 0x00000001L +// Driver supports HW cursor also in low-res modes(height < 400) +#define D3DCURSORCAPS_LOWRES 0x00000002L + +// +// DevCaps +// +#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010L /* Device can use execute buffers from system memory */ +#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020L /* Device can use execute buffers from video memory */ +#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */ +#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080L /* Device can use TL buffers from video memory */ +#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100L /* Device can texture from system memory */ +#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200L /* Device can texture from device memory */ +#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400L /* Device can draw TLVERTEX primitives */ +#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800L /* Device can render without waiting for flip to complete */ +#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000L /* Device can texture from nonlocal video memory */ +#define D3DDEVCAPS_DRAWPRIMITIVES2 0x00002000L /* Device can support DrawPrimitives2 */ +#define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000L /* Device is texturing from separate memory pools */ +#define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000L /* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*/ +#define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000L /* Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also */ +#define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000L /* Device supports a Tex Blt from system memory to non-local vidmem */ +#define D3DDEVCAPS_HWRASTERIZATION 0x00080000L /* Device has HW acceleration for rasterization */ +#define D3DDEVCAPS_PUREDEVICE 0x00100000L /* Device supports D3DCREATE_PUREDEVICE */ +#define D3DDEVCAPS_QUINTICRTPATCHES 0x00200000L /* Device supports quintic Beziers and BSplines */ +#define D3DDEVCAPS_RTPATCHES 0x00400000L /* Device supports Rect and Tri patches */ +#define D3DDEVCAPS_RTPATCHHANDLEZERO 0x00800000L /* Indicates that RT Patches may be drawn efficiently using handle 0 */ +#define D3DDEVCAPS_NPATCHES 0x01000000L /* Device supports N-Patches */ + +// +// PrimitiveMiscCaps +// +#define D3DPMISCCAPS_MASKZ 0x00000002L +#define D3DPMISCCAPS_LINEPATTERNREP 0x00000004L +#define D3DPMISCCAPS_CULLNONE 0x00000010L +#define D3DPMISCCAPS_CULLCW 0x00000020L +#define D3DPMISCCAPS_CULLCCW 0x00000040L +#define D3DPMISCCAPS_COLORWRITEENABLE 0x00000080L +#define D3DPMISCCAPS_CLIPPLANESCALEDPOINTS 0x00000100L /* Device correctly clips scaled points to clip planes */ +#define D3DPMISCCAPS_CLIPTLVERTS 0x00000200L /* device will clip post-transformed vertex primitives */ +#define D3DPMISCCAPS_TSSARGTEMP 0x00000400L /* device supports D3DTA_TEMP for temporary register */ +#define D3DPMISCCAPS_BLENDOP 0x00000800L /* device supports D3DRS_BLENDOP */ + +// +// LineCaps +// +#define D3DLINECAPS_TEXTURE 0x00000001L +#define D3DLINECAPS_ZTEST 0x00000002L +#define D3DLINECAPS_BLEND 0x00000004L +#define D3DLINECAPS_ALPHACMP 0x00000008L +#define D3DLINECAPS_FOG 0x00000010L + +// +// RasterCaps +// +#define D3DPRASTERCAPS_DITHER 0x00000001L +#define D3DPRASTERCAPS_PAT 0x00000008L +#define D3DPRASTERCAPS_ZTEST 0x00000010L +#define D3DPRASTERCAPS_FOGVERTEX 0x00000080L +#define D3DPRASTERCAPS_FOGTABLE 0x00000100L +#define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000L +#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L +#define D3DPRASTERCAPS_ZBIAS 0x00004000L +#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L +#define D3DPRASTERCAPS_FOGRANGE 0x00010000L +#define D3DPRASTERCAPS_ANISOTROPY 0x00020000L +#define D3DPRASTERCAPS_WBUFFER 0x00040000L +#define D3DPRASTERCAPS_WFOG 0x00100000L +#define D3DPRASTERCAPS_ZFOG 0x00200000L +#define D3DPRASTERCAPS_COLORPERSPECTIVE 0x00400000L /* Device iterates colors perspective correct */ +#define D3DPRASTERCAPS_STRETCHBLTMULTISAMPLE 0x00800000L + +// +// ZCmpCaps, AlphaCmpCaps +// +#define D3DPCMPCAPS_NEVER 0x00000001L +#define D3DPCMPCAPS_LESS 0x00000002L +#define D3DPCMPCAPS_EQUAL 0x00000004L +#define D3DPCMPCAPS_LESSEQUAL 0x00000008L +#define D3DPCMPCAPS_GREATER 0x00000010L +#define D3DPCMPCAPS_NOTEQUAL 0x00000020L +#define D3DPCMPCAPS_GREATEREQUAL 0x00000040L +#define D3DPCMPCAPS_ALWAYS 0x00000080L + +// +// SourceBlendCaps, DestBlendCaps +// +#define D3DPBLENDCAPS_ZERO 0x00000001L +#define D3DPBLENDCAPS_ONE 0x00000002L +#define D3DPBLENDCAPS_SRCCOLOR 0x00000004L +#define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008L +#define D3DPBLENDCAPS_SRCALPHA 0x00000010L +#define D3DPBLENDCAPS_INVSRCALPHA 0x00000020L +#define D3DPBLENDCAPS_DESTALPHA 0x00000040L +#define D3DPBLENDCAPS_INVDESTALPHA 0x00000080L +#define D3DPBLENDCAPS_DESTCOLOR 0x00000100L +#define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200L +#define D3DPBLENDCAPS_SRCALPHASAT 0x00000400L +#define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800L +#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000L + +// +// ShadeCaps +// +#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008L +#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200L +#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000L +#define D3DPSHADECAPS_FOGGOURAUD 0x00080000L + +// +// TextureCaps +// +#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L /* Perspective-correct texturing is supported */ +#define D3DPTEXTURECAPS_POW2 0x00000002L /* Power-of-2 texture dimensions are required - applies to non-Cube/Volume textures only. */ +#define D3DPTEXTURECAPS_ALPHA 0x00000004L /* Alpha in texture pixels is supported */ +#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L /* Only square textures are supported */ +#define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L /* Texture indices are not scaled by the texture size prior to interpolation */ +#define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080L /* Device can draw alpha from texture palettes */ +// Device can use non-POW2 textures if: +// 1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage +// 2) D3DRS_WRAP(N) is zero for this texture's coordinates +// 3) mip mapping is not enabled (use magnification filter only) +#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L +#define D3DPTEXTURECAPS_PROJECTED 0x00000400L /* Device can do D3DTTFF_PROJECTED */ +#define D3DPTEXTURECAPS_CUBEMAP 0x00000800L /* Device can do cubemap textures */ +#define D3DPTEXTURECAPS_VOLUMEMAP 0x00002000L /* Device can do volume textures */ +#define D3DPTEXTURECAPS_MIPMAP 0x00004000L /* Device can do mipmapped textures */ +#define D3DPTEXTURECAPS_MIPVOLUMEMAP 0x00008000L /* Device can do mipmapped volume textures */ +#define D3DPTEXTURECAPS_MIPCUBEMAP 0x00010000L /* Device can do mipmapped cube maps */ +#define D3DPTEXTURECAPS_CUBEMAP_POW2 0x00020000L /* Device requires that cubemaps be power-of-2 dimension */ +#define D3DPTEXTURECAPS_VOLUMEMAP_POW2 0x00040000L /* Device requires that volume maps be power-of-2 dimension */ + +// +// TextureFilterCaps +// +#define D3DPTFILTERCAPS_MINFPOINT 0x00000100L /* Min Filter */ +#define D3DPTFILTERCAPS_MINFLINEAR 0x00000200L +#define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400L +#define D3DPTFILTERCAPS_MIPFPOINT 0x00010000L /* Mip Filter */ +#define D3DPTFILTERCAPS_MIPFLINEAR 0x00020000L +#define D3DPTFILTERCAPS_MAGFPOINT 0x01000000L /* Mag Filter */ +#define D3DPTFILTERCAPS_MAGFLINEAR 0x02000000L +#define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000L +#define D3DPTFILTERCAPS_MAGFAFLATCUBIC 0x08000000L +#define D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC 0x10000000L + +// +// TextureAddressCaps +// +#define D3DPTADDRESSCAPS_WRAP 0x00000001L +#define D3DPTADDRESSCAPS_MIRROR 0x00000002L +#define D3DPTADDRESSCAPS_CLAMP 0x00000004L +#define D3DPTADDRESSCAPS_BORDER 0x00000008L +#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010L +#define D3DPTADDRESSCAPS_MIRRORONCE 0x00000020L + +// +// StencilCaps +// +#define D3DSTENCILCAPS_KEEP 0x00000001L +#define D3DSTENCILCAPS_ZERO 0x00000002L +#define D3DSTENCILCAPS_REPLACE 0x00000004L +#define D3DSTENCILCAPS_INCRSAT 0x00000008L +#define D3DSTENCILCAPS_DECRSAT 0x00000010L +#define D3DSTENCILCAPS_INVERT 0x00000020L +#define D3DSTENCILCAPS_INCR 0x00000040L +#define D3DSTENCILCAPS_DECR 0x00000080L + +// +// TextureOpCaps +// +#define D3DTEXOPCAPS_DISABLE 0x00000001L +#define D3DTEXOPCAPS_SELECTARG1 0x00000002L +#define D3DTEXOPCAPS_SELECTARG2 0x00000004L +#define D3DTEXOPCAPS_MODULATE 0x00000008L +#define D3DTEXOPCAPS_MODULATE2X 0x00000010L +#define D3DTEXOPCAPS_MODULATE4X 0x00000020L +#define D3DTEXOPCAPS_ADD 0x00000040L +#define D3DTEXOPCAPS_ADDSIGNED 0x00000080L +#define D3DTEXOPCAPS_ADDSIGNED2X 0x00000100L +#define D3DTEXOPCAPS_SUBTRACT 0x00000200L +#define D3DTEXOPCAPS_ADDSMOOTH 0x00000400L +#define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800L +#define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000L +#define D3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000L +#define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000L +#define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000L +#define D3DTEXOPCAPS_PREMODULATE 0x00010000L +#define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000L +#define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000L +#define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000L +#define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000L +#define D3DTEXOPCAPS_BUMPENVMAP 0x00200000L +#define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000L +#define D3DTEXOPCAPS_DOTPRODUCT3 0x00800000L +#define D3DTEXOPCAPS_MULTIPLYADD 0x01000000L +#define D3DTEXOPCAPS_LERP 0x02000000L + +// +// FVFCaps +// +#define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000ffffL /* mask for texture coordinate count field */ +#define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000L /* Device prefers that vertex elements not be stripped */ +#define D3DFVFCAPS_PSIZE 0x00100000L /* Device can receive point size */ + +// +// VertexProcessingCaps +// +#define D3DVTXPCAPS_TEXGEN 0x00000001L /* device can do texgen */ +#define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002L /* device can do DX7-level colormaterialsource ops */ +#define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008L /* device can do directional lights */ +#define D3DVTXPCAPS_POSITIONALLIGHTS 0x00000010L /* device can do positional lights (includes point and spot) */ +#define D3DVTXPCAPS_LOCALVIEWER 0x00000020L /* device can do local viewer */ +#define D3DVTXPCAPS_TWEENING 0x00000040L /* device can do vertex tweening */ +#define D3DVTXPCAPS_NO_VSDT_UBYTE4 0x00000080L /* device does not support D3DVSDT_UBYTE4 */ + +#pragma pack() + +#endif /* (DIRECT3D_VERSION >= 0x0800) */ +#endif /* _D3D8CAPS_H_ */ + diff --git a/windows_libs/mssdk/include/d3d8types.h b/windows_libs/mssdk/include/d3d8types.h new file mode 100644 index 00000000..6837d6e7 --- /dev/null +++ b/windows_libs/mssdk/include/d3d8types.h @@ -0,0 +1,1600 @@ +/*==========================================================================; + * + * Copyright (C) 1995-2000 Microsoft Corporation. All Rights Reserved. + * + * File: d3d8types.h + * Content: Direct3D capabilities include file + * + ***************************************************************************/ + +#ifndef _D3D8TYPES_H_ +#define _D3D8TYPES_H_ + +#ifndef DIRECT3D_VERSION +#define DIRECT3D_VERSION 0x0800 +#endif //DIRECT3D_VERSION + +// include this file content only if compiling for DX8 interfaces +#if(DIRECT3D_VERSION >= 0x0800) + +#include + +#pragma warning(disable:4201) // anonymous unions warning +#pragma pack(4) + +// D3DCOLOR is equivalent to D3DFMT_A8R8G8B8 +#ifndef D3DCOLOR_DEFINED +typedef DWORD D3DCOLOR; +#define D3DCOLOR_DEFINED +#endif + +// maps unsigned 8 bits/channel to D3DCOLOR +#define D3DCOLOR_ARGB(a,r,g,b) \ + ((D3DCOLOR)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff))) +#define D3DCOLOR_RGBA(r,g,b,a) D3DCOLOR_ARGB(a,r,g,b) +#define D3DCOLOR_XRGB(r,g,b) D3DCOLOR_ARGB(0xff,r,g,b) + +// maps floating point channels (0.f to 1.f range) to D3DCOLOR +#define D3DCOLOR_COLORVALUE(r,g,b,a) \ + D3DCOLOR_RGBA((DWORD)((r)*255.f),(DWORD)((g)*255.f),(DWORD)((b)*255.f),(DWORD)((a)*255.f)) + + +#ifndef D3DVECTOR_DEFINED +typedef struct _D3DVECTOR { + float x; + float y; + float z; +} D3DVECTOR; +#define D3DVECTOR_DEFINED +#endif + +#ifndef D3DCOLORVALUE_DEFINED +typedef struct _D3DCOLORVALUE { + float r; + float g; + float b; + float a; +} D3DCOLORVALUE; +#define D3DCOLORVALUE_DEFINED +#endif + +#ifndef D3DRECT_DEFINED +typedef struct _D3DRECT { + LONG x1; + LONG y1; + LONG x2; + LONG y2; +} D3DRECT; +#define D3DRECT_DEFINED +#endif + +#ifndef D3DMATRIX_DEFINED +typedef struct _D3DMATRIX { + union { + struct { + float _11, _12, _13, _14; + float _21, _22, _23, _24; + float _31, _32, _33, _34; + float _41, _42, _43, _44; + + }; + float m[4][4]; + }; +} D3DMATRIX; +#define D3DMATRIX_DEFINED +#endif + +typedef struct _D3DVIEWPORT8 { + DWORD X; + DWORD Y; /* Viewport Top left */ + DWORD Width; + DWORD Height; /* Viewport Dimensions */ + float MinZ; /* Min/max of clip Volume */ + float MaxZ; +} D3DVIEWPORT8; + +/* + * Values for clip fields. + */ + +// Max number of user clipping planes, supported in D3D. +#define D3DMAXUSERCLIPPLANES 32 + +// These bits could be ORed together to use with D3DRS_CLIPPLANEENABLE +// +#define D3DCLIPPLANE0 (1 << 0) +#define D3DCLIPPLANE1 (1 << 1) +#define D3DCLIPPLANE2 (1 << 2) +#define D3DCLIPPLANE3 (1 << 3) +#define D3DCLIPPLANE4 (1 << 4) +#define D3DCLIPPLANE5 (1 << 5) + +// The following bits are used in the ClipUnion and ClipIntersection +// members of the D3DCLIPSTATUS8 +// + +#define D3DCS_LEFT 0x00000001L +#define D3DCS_RIGHT 0x00000002L +#define D3DCS_TOP 0x00000004L +#define D3DCS_BOTTOM 0x00000008L +#define D3DCS_FRONT 0x00000010L +#define D3DCS_BACK 0x00000020L +#define D3DCS_PLANE0 0x00000040L +#define D3DCS_PLANE1 0x00000080L +#define D3DCS_PLANE2 0x00000100L +#define D3DCS_PLANE3 0x00000200L +#define D3DCS_PLANE4 0x00000400L +#define D3DCS_PLANE5 0x00000800L + +#define D3DCS_ALL D3DCS_LEFT | \ + D3DCS_RIGHT | \ + D3DCS_TOP | \ + D3DCS_BOTTOM | \ + D3DCS_FRONT | \ + D3DCS_BACK | \ + D3DCS_PLANE0 | \ + D3DCS_PLANE1 | \ + D3DCS_PLANE2 | \ + D3DCS_PLANE3 | \ + D3DCS_PLANE4 | \ + D3DCS_PLANE5; + +typedef struct _D3DCLIPSTATUS8 { + DWORD ClipUnion; + DWORD ClipIntersection; +} D3DCLIPSTATUS8; + +typedef struct _D3DMATERIAL8 { + D3DCOLORVALUE Diffuse; /* Diffuse color RGBA */ + D3DCOLORVALUE Ambient; /* Ambient color RGB */ + D3DCOLORVALUE Specular; /* Specular 'shininess' */ + D3DCOLORVALUE Emissive; /* Emissive color RGB */ + float Power; /* Sharpness if specular highlight */ +} D3DMATERIAL8; + +typedef enum _D3DLIGHTTYPE { + D3DLIGHT_POINT = 1, + D3DLIGHT_SPOT = 2, + D3DLIGHT_DIRECTIONAL = 3, + D3DLIGHT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DLIGHTTYPE; + +typedef struct _D3DLIGHT8 { + D3DLIGHTTYPE Type; /* Type of light source */ + D3DCOLORVALUE Diffuse; /* Diffuse color of light */ + D3DCOLORVALUE Specular; /* Specular color of light */ + D3DCOLORVALUE Ambient; /* Ambient color of light */ + D3DVECTOR Position; /* Position in world space */ + D3DVECTOR Direction; /* Direction in world space */ + float Range; /* Cutoff range */ + float Falloff; /* Falloff */ + float Attenuation0; /* Constant attenuation */ + float Attenuation1; /* Linear attenuation */ + float Attenuation2; /* Quadratic attenuation */ + float Theta; /* Inner angle of spotlight cone */ + float Phi; /* Outer angle of spotlight cone */ +} D3DLIGHT8; + +/* + * Options for clearing + */ +#define D3DCLEAR_TARGET 0x00000001l /* Clear target surface */ +#define D3DCLEAR_ZBUFFER 0x00000002l /* Clear target z buffer */ +#define D3DCLEAR_STENCIL 0x00000004l /* Clear stencil planes */ + +/* + * The following defines the rendering states + */ + +typedef enum _D3DSHADEMODE { + D3DSHADE_FLAT = 1, + D3DSHADE_GOURAUD = 2, + D3DSHADE_PHONG = 3, + D3DSHADE_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DSHADEMODE; + +typedef enum _D3DFILLMODE { + D3DFILL_POINT = 1, + D3DFILL_WIREFRAME = 2, + D3DFILL_SOLID = 3, + D3DFILL_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DFILLMODE; + +typedef struct _D3DLINEPATTERN { + WORD wRepeatFactor; + WORD wLinePattern; +} D3DLINEPATTERN; + +typedef enum _D3DBLEND { + D3DBLEND_ZERO = 1, + D3DBLEND_ONE = 2, + D3DBLEND_SRCCOLOR = 3, + D3DBLEND_INVSRCCOLOR = 4, + D3DBLEND_SRCALPHA = 5, + D3DBLEND_INVSRCALPHA = 6, + D3DBLEND_DESTALPHA = 7, + D3DBLEND_INVDESTALPHA = 8, + D3DBLEND_DESTCOLOR = 9, + D3DBLEND_INVDESTCOLOR = 10, + D3DBLEND_SRCALPHASAT = 11, + D3DBLEND_BOTHSRCALPHA = 12, + D3DBLEND_BOTHINVSRCALPHA = 13, + D3DBLEND_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DBLEND; + +typedef enum _D3DBLENDOP { + D3DBLENDOP_ADD = 1, + D3DBLENDOP_SUBTRACT = 2, + D3DBLENDOP_REVSUBTRACT = 3, + D3DBLENDOP_MIN = 4, + D3DBLENDOP_MAX = 5, + D3DBLENDOP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DBLENDOP; + +typedef enum _D3DTEXTUREADDRESS { + D3DTADDRESS_WRAP = 1, + D3DTADDRESS_MIRROR = 2, + D3DTADDRESS_CLAMP = 3, + D3DTADDRESS_BORDER = 4, + D3DTADDRESS_MIRRORONCE = 5, + D3DTADDRESS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DTEXTUREADDRESS; + +typedef enum _D3DCULL { + D3DCULL_NONE = 1, + D3DCULL_CW = 2, + D3DCULL_CCW = 3, + D3DCULL_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DCULL; + +typedef enum _D3DCMPFUNC { + D3DCMP_NEVER = 1, + D3DCMP_LESS = 2, + D3DCMP_EQUAL = 3, + D3DCMP_LESSEQUAL = 4, + D3DCMP_GREATER = 5, + D3DCMP_NOTEQUAL = 6, + D3DCMP_GREATEREQUAL = 7, + D3DCMP_ALWAYS = 8, + D3DCMP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DCMPFUNC; + +typedef enum _D3DSTENCILOP { + D3DSTENCILOP_KEEP = 1, + D3DSTENCILOP_ZERO = 2, + D3DSTENCILOP_REPLACE = 3, + D3DSTENCILOP_INCRSAT = 4, + D3DSTENCILOP_DECRSAT = 5, + D3DSTENCILOP_INVERT = 6, + D3DSTENCILOP_INCR = 7, + D3DSTENCILOP_DECR = 8, + D3DSTENCILOP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DSTENCILOP; + +typedef enum _D3DFOGMODE { + D3DFOG_NONE = 0, + D3DFOG_EXP = 1, + D3DFOG_EXP2 = 2, + D3DFOG_LINEAR = 3, + D3DFOG_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DFOGMODE; + +typedef enum _D3DZBUFFERTYPE { + D3DZB_FALSE = 0, + D3DZB_TRUE = 1, // Z buffering + D3DZB_USEW = 2, // W buffering + D3DZB_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DZBUFFERTYPE; + +// Primitives supported by draw-primitive API +typedef enum _D3DPRIMITIVETYPE { + D3DPT_POINTLIST = 1, + D3DPT_LINELIST = 2, + D3DPT_LINESTRIP = 3, + D3DPT_TRIANGLELIST = 4, + D3DPT_TRIANGLESTRIP = 5, + D3DPT_TRIANGLEFAN = 6, + D3DPT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DPRIMITIVETYPE; + +typedef enum _D3DTRANSFORMSTATETYPE { + D3DTS_VIEW = 2, + D3DTS_PROJECTION = 3, + D3DTS_TEXTURE0 = 16, + D3DTS_TEXTURE1 = 17, + D3DTS_TEXTURE2 = 18, + D3DTS_TEXTURE3 = 19, + D3DTS_TEXTURE4 = 20, + D3DTS_TEXTURE5 = 21, + D3DTS_TEXTURE6 = 22, + D3DTS_TEXTURE7 = 23, + D3DTS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DTRANSFORMSTATETYPE; + +#define D3DTS_WORLDMATRIX(index) (D3DTRANSFORMSTATETYPE)(index + 256) +#define D3DTS_WORLD D3DTS_WORLDMATRIX(0) +#define D3DTS_WORLD1 D3DTS_WORLDMATRIX(1) +#define D3DTS_WORLD2 D3DTS_WORLDMATRIX(2) +#define D3DTS_WORLD3 D3DTS_WORLDMATRIX(3) + +typedef enum _D3DRENDERSTATETYPE { + D3DRS_ZENABLE = 7, /* D3DZBUFFERTYPE (or TRUE/FALSE for legacy) */ + D3DRS_FILLMODE = 8, /* D3DFILL_MODE */ + D3DRS_SHADEMODE = 9, /* D3DSHADEMODE */ + D3DRS_LINEPATTERN = 10, /* D3DLINEPATTERN */ + D3DRS_ZWRITEENABLE = 14, /* TRUE to enable z writes */ + D3DRS_ALPHATESTENABLE = 15, /* TRUE to enable alpha tests */ + D3DRS_LASTPIXEL = 16, /* TRUE for last-pixel on lines */ + D3DRS_SRCBLEND = 19, /* D3DBLEND */ + D3DRS_DESTBLEND = 20, /* D3DBLEND */ + D3DRS_CULLMODE = 22, /* D3DCULL */ + D3DRS_ZFUNC = 23, /* D3DCMPFUNC */ + D3DRS_ALPHAREF = 24, /* D3DFIXED */ + D3DRS_ALPHAFUNC = 25, /* D3DCMPFUNC */ + D3DRS_DITHERENABLE = 26, /* TRUE to enable dithering */ + D3DRS_ALPHABLENDENABLE = 27, /* TRUE to enable alpha blending */ + D3DRS_FOGENABLE = 28, /* TRUE to enable fog blending */ + D3DRS_SPECULARENABLE = 29, /* TRUE to enable specular */ + D3DRS_ZVISIBLE = 30, /* TRUE to enable z checking */ + D3DRS_FOGCOLOR = 34, /* D3DCOLOR */ + D3DRS_FOGTABLEMODE = 35, /* D3DFOGMODE */ + D3DRS_FOGSTART = 36, /* Fog start (for both vertex and pixel fog) */ + D3DRS_FOGEND = 37, /* Fog end */ + D3DRS_FOGDENSITY = 38, /* Fog density */ + D3DRS_EDGEANTIALIAS = 40, /* TRUE to enable edge antialiasing */ + D3DRS_ZBIAS = 47, /* LONG Z bias */ + D3DRS_RANGEFOGENABLE = 48, /* Enables range-based fog */ + D3DRS_STENCILENABLE = 52, /* BOOL enable/disable stenciling */ + D3DRS_STENCILFAIL = 53, /* D3DSTENCILOP to do if stencil test fails */ + D3DRS_STENCILZFAIL = 54, /* D3DSTENCILOP to do if stencil test passes and Z test fails */ + D3DRS_STENCILPASS = 55, /* D3DSTENCILOP to do if both stencil and Z tests pass */ + D3DRS_STENCILFUNC = 56, /* D3DCMPFUNC fn. Stencil Test passes if ((ref & mask) stencilfn (stencil & mask)) is true */ + D3DRS_STENCILREF = 57, /* Reference value used in stencil test */ + D3DRS_STENCILMASK = 58, /* Mask value used in stencil test */ + D3DRS_STENCILWRITEMASK = 59, /* Write mask applied to values written to stencil buffer */ + D3DRS_TEXTUREFACTOR = 60, /* D3DCOLOR used for multi-texture blend */ + D3DRS_WRAP0 = 128, /* wrap for 1st texture coord. set */ + D3DRS_WRAP1 = 129, /* wrap for 2nd texture coord. set */ + D3DRS_WRAP2 = 130, /* wrap for 3rd texture coord. set */ + D3DRS_WRAP3 = 131, /* wrap for 4th texture coord. set */ + D3DRS_WRAP4 = 132, /* wrap for 5th texture coord. set */ + D3DRS_WRAP5 = 133, /* wrap for 6th texture coord. set */ + D3DRS_WRAP6 = 134, /* wrap for 7th texture coord. set */ + D3DRS_WRAP7 = 135, /* wrap for 8th texture coord. set */ + D3DRS_CLIPPING = 136, + D3DRS_LIGHTING = 137, + D3DRS_AMBIENT = 139, + D3DRS_FOGVERTEXMODE = 140, + D3DRS_COLORVERTEX = 141, + D3DRS_LOCALVIEWER = 142, + D3DRS_NORMALIZENORMALS = 143, + D3DRS_DIFFUSEMATERIALSOURCE = 145, + D3DRS_SPECULARMATERIALSOURCE = 146, + D3DRS_AMBIENTMATERIALSOURCE = 147, + D3DRS_EMISSIVEMATERIALSOURCE = 148, + D3DRS_VERTEXBLEND = 151, + D3DRS_CLIPPLANEENABLE = 152, + D3DRS_SOFTWAREVERTEXPROCESSING = 153, + D3DRS_POINTSIZE = 154, /* float point size */ + D3DRS_POINTSIZE_MIN = 155, /* float point size min threshold */ + D3DRS_POINTSPRITEENABLE = 156, /* BOOL point texture coord control */ + D3DRS_POINTSCALEENABLE = 157, /* BOOL point size scale enable */ + D3DRS_POINTSCALE_A = 158, /* float point attenuation A value */ + D3DRS_POINTSCALE_B = 159, /* float point attenuation B value */ + D3DRS_POINTSCALE_C = 160, /* float point attenuation C value */ + D3DRS_MULTISAMPLEANTIALIAS = 161, // BOOL - set to do FSAA with multisample buffer + D3DRS_MULTISAMPLEMASK = 162, // DWORD - per-sample enable/disable + D3DRS_PATCHEDGESTYLE = 163, // Sets whether patch edges will use float style tessellation + D3DRS_PATCHSEGMENTS = 164, // Number of segments per edge when drawing patches + D3DRS_DEBUGMONITORTOKEN = 165, // DEBUG ONLY - token to debug monitor + D3DRS_POINTSIZE_MAX = 166, /* float point size max threshold */ + D3DRS_INDEXEDVERTEXBLENDENABLE = 167, + D3DRS_COLORWRITEENABLE = 168, // per-channel write enable + D3DRS_TWEENFACTOR = 170, // float tween factor + D3DRS_BLENDOP = 171, // D3DBLENDOP setting + + D3DRS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DRENDERSTATETYPE; + +// Values for material source +typedef enum _D3DMATERIALCOLORSOURCE +{ + D3DMCS_MATERIAL = 0, // Color from material is used + D3DMCS_COLOR1 = 1, // Diffuse vertex color is used + D3DMCS_COLOR2 = 2, // Specular vertex color is used + D3DMCS_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum +} D3DMATERIALCOLORSOURCE; + +// Bias to apply to the texture coordinate set to apply a wrap to. +#define D3DRENDERSTATE_WRAPBIAS 128UL + +/* Flags to construct the WRAP render states */ +#define D3DWRAP_U 0x00000001L +#define D3DWRAP_V 0x00000002L +#define D3DWRAP_W 0x00000004L + +/* Flags to construct the WRAP render states for 1D thru 4D texture coordinates */ +#define D3DWRAPCOORD_0 0x00000001L // same as D3DWRAP_U +#define D3DWRAPCOORD_1 0x00000002L // same as D3DWRAP_V +#define D3DWRAPCOORD_2 0x00000004L // same as D3DWRAP_W +#define D3DWRAPCOORD_3 0x00000008L + +/* Flags to construct D3DRS_COLORWRITEENABLE */ +#define D3DCOLORWRITEENABLE_RED (1L<<0) +#define D3DCOLORWRITEENABLE_GREEN (1L<<1) +#define D3DCOLORWRITEENABLE_BLUE (1L<<2) +#define D3DCOLORWRITEENABLE_ALPHA (1L<<3) + +/* + * State enumerants for per-stage texture processing. + */ +typedef enum _D3DTEXTURESTAGESTATETYPE +{ + D3DTSS_COLOROP = 1, /* D3DTEXTUREOP - per-stage blending controls for color channels */ + D3DTSS_COLORARG1 = 2, /* D3DTA_* (texture arg) */ + D3DTSS_COLORARG2 = 3, /* D3DTA_* (texture arg) */ + D3DTSS_ALPHAOP = 4, /* D3DTEXTUREOP - per-stage blending controls for alpha channel */ + D3DTSS_ALPHAARG1 = 5, /* D3DTA_* (texture arg) */ + D3DTSS_ALPHAARG2 = 6, /* D3DTA_* (texture arg) */ + D3DTSS_BUMPENVMAT00 = 7, /* float (bump mapping matrix) */ + D3DTSS_BUMPENVMAT01 = 8, /* float (bump mapping matrix) */ + D3DTSS_BUMPENVMAT10 = 9, /* float (bump mapping matrix) */ + D3DTSS_BUMPENVMAT11 = 10, /* float (bump mapping matrix) */ + D3DTSS_TEXCOORDINDEX = 11, /* identifies which set of texture coordinates index this texture */ + D3DTSS_ADDRESSU = 13, /* D3DTEXTUREADDRESS for U coordinate */ + D3DTSS_ADDRESSV = 14, /* D3DTEXTUREADDRESS for V coordinate */ + D3DTSS_BORDERCOLOR = 15, /* D3DCOLOR */ + D3DTSS_MAGFILTER = 16, /* D3DTEXTUREFILTER filter to use for magnification */ + D3DTSS_MINFILTER = 17, /* D3DTEXTUREFILTER filter to use for minification */ + D3DTSS_MIPFILTER = 18, /* D3DTEXTUREFILTER filter to use between mipmaps during minification */ + D3DTSS_MIPMAPLODBIAS = 19, /* float Mipmap LOD bias */ + D3DTSS_MAXMIPLEVEL = 20, /* DWORD 0..(n-1) LOD index of largest map to use (0 == largest) */ + D3DTSS_MAXANISOTROPY = 21, /* DWORD maximum anisotropy */ + D3DTSS_BUMPENVLSCALE = 22, /* float scale for bump map luminance */ + D3DTSS_BUMPENVLOFFSET = 23, /* float offset for bump map luminance */ + D3DTSS_TEXTURETRANSFORMFLAGS = 24, /* D3DTEXTURETRANSFORMFLAGS controls texture transform */ + D3DTSS_ADDRESSW = 25, /* D3DTEXTUREADDRESS for W coordinate */ + D3DTSS_COLORARG0 = 26, /* D3DTA_* third arg for triadic ops */ + D3DTSS_ALPHAARG0 = 27, /* D3DTA_* third arg for triadic ops */ + D3DTSS_RESULTARG = 28, /* D3DTA_* arg for result (CURRENT or TEMP) */ + D3DTSS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DTEXTURESTAGESTATETYPE; + +// Values, used with D3DTSS_TEXCOORDINDEX, to specify that the vertex data(position +// and normal in the camera space) should be taken as texture coordinates +// Low 16 bits are used to specify texture coordinate index, to take the WRAP mode from +// +#define D3DTSS_TCI_PASSTHRU 0x00000000 +#define D3DTSS_TCI_CAMERASPACENORMAL 0x00010000 +#define D3DTSS_TCI_CAMERASPACEPOSITION 0x00020000 +#define D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR 0x00030000 + +/* + * Enumerations for COLOROP and ALPHAOP texture blending operations set in + * texture processing stage controls in D3DRENDERSTATE. + */ +typedef enum _D3DTEXTUREOP +{ + // Control + D3DTOP_DISABLE = 1, // disables stage + D3DTOP_SELECTARG1 = 2, // the default + D3DTOP_SELECTARG2 = 3, + + // Modulate + D3DTOP_MODULATE = 4, // multiply args together + D3DTOP_MODULATE2X = 5, // multiply and 1 bit + D3DTOP_MODULATE4X = 6, // multiply and 2 bits + + // Add + D3DTOP_ADD = 7, // add arguments together + D3DTOP_ADDSIGNED = 8, // add with -0.5 bias + D3DTOP_ADDSIGNED2X = 9, // as above but left 1 bit + D3DTOP_SUBTRACT = 10, // Arg1 - Arg2, with no saturation + D3DTOP_ADDSMOOTH = 11, // add 2 args, subtract product + // Arg1 + Arg2 - Arg1*Arg2 + // = Arg1 + (1-Arg1)*Arg2 + + // Linear alpha blend: Arg1*(Alpha) + Arg2*(1-Alpha) + D3DTOP_BLENDDIFFUSEALPHA = 12, // iterated alpha + D3DTOP_BLENDTEXTUREALPHA = 13, // texture alpha + D3DTOP_BLENDFACTORALPHA = 14, // alpha from D3DRENDERSTATE_TEXTUREFACTOR + + // Linear alpha blend with pre-multiplied arg1 input: Arg1 + Arg2*(1-Alpha) + D3DTOP_BLENDTEXTUREALPHAPM = 15, // texture alpha + D3DTOP_BLENDCURRENTALPHA = 16, // by alpha of current color + + // Specular mapping + D3DTOP_PREMODULATE = 17, // modulate with next texture before use + D3DTOP_MODULATEALPHA_ADDCOLOR = 18, // Arg1.RGB + Arg1.A*Arg2.RGB + // COLOROP only + D3DTOP_MODULATECOLOR_ADDALPHA = 19, // Arg1.RGB*Arg2.RGB + Arg1.A + // COLOROP only + D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20, // (1-Arg1.A)*Arg2.RGB + Arg1.RGB + // COLOROP only + D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21, // (1-Arg1.RGB)*Arg2.RGB + Arg1.A + // COLOROP only + + // Bump mapping + D3DTOP_BUMPENVMAP = 22, // per pixel env map perturbation + D3DTOP_BUMPENVMAPLUMINANCE = 23, // with luminance channel + + // This can do either diffuse or specular bump mapping with correct input. + // Performs the function (Arg1.R*Arg2.R + Arg1.G*Arg2.G + Arg1.B*Arg2.B) + // where each component has been scaled and offset to make it signed. + // The result is replicated into all four (including alpha) channels. + // This is a valid COLOROP only. + D3DTOP_DOTPRODUCT3 = 24, + + // Triadic ops + D3DTOP_MULTIPLYADD = 25, // Arg0 + Arg1*Arg2 + D3DTOP_LERP = 26, // (Arg0)*Arg1 + (1-Arg0)*Arg2 + + D3DTOP_FORCE_DWORD = 0x7fffffff, +} D3DTEXTUREOP; + +/* + * Values for COLORARG0,1,2, ALPHAARG0,1,2, and RESULTARG texture blending + * operations set in texture processing stage controls in D3DRENDERSTATE. + */ +#define D3DTA_SELECTMASK 0x0000000f // mask for arg selector +#define D3DTA_DIFFUSE 0x00000000 // select diffuse color (read only) +#define D3DTA_CURRENT 0x00000001 // select stage destination register (read/write) +#define D3DTA_TEXTURE 0x00000002 // select texture color (read only) +#define D3DTA_TFACTOR 0x00000003 // select RENDERSTATE_TEXTUREFACTOR (read only) +#define D3DTA_SPECULAR 0x00000004 // select specular color (read only) +#define D3DTA_TEMP 0x00000005 // select temporary register color (read/write) +#define D3DTA_COMPLEMENT 0x00000010 // take 1.0 - x (read modifier) +#define D3DTA_ALPHAREPLICATE 0x00000020 // replicate alpha to color components (read modifier) + +// +// Values for D3DTSS_***FILTER texture stage states +// +typedef enum _D3DTEXTUREFILTERTYPE +{ + D3DTEXF_NONE = 0, // filtering disabled (valid for mip filter only) + D3DTEXF_POINT = 1, // nearest + D3DTEXF_LINEAR = 2, // linear interpolation + D3DTEXF_ANISOTROPIC = 3, // anisotropic + D3DTEXF_FLATCUBIC = 4, // cubic + D3DTEXF_GAUSSIANCUBIC = 5, // different cubic kernel + D3DTEXF_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum +} D3DTEXTUREFILTERTYPE; + +/* Bits for Flags in ProcessVertices call */ + +#define D3DPV_DONOTCOPYDATA (1 << 0) + +//------------------------------------------------------------------- + +// Flexible vertex format bits +// +#define D3DFVF_RESERVED0 0x001 +#define D3DFVF_POSITION_MASK 0x00E +#define D3DFVF_XYZ 0x002 +#define D3DFVF_XYZRHW 0x004 +#define D3DFVF_XYZB1 0x006 +#define D3DFVF_XYZB2 0x008 +#define D3DFVF_XYZB3 0x00a +#define D3DFVF_XYZB4 0x00c +#define D3DFVF_XYZB5 0x00e + +#define D3DFVF_NORMAL 0x010 +#define D3DFVF_PSIZE 0x020 +#define D3DFVF_DIFFUSE 0x040 +#define D3DFVF_SPECULAR 0x080 + +#define D3DFVF_TEXCOUNT_MASK 0xf00 +#define D3DFVF_TEXCOUNT_SHIFT 8 +#define D3DFVF_TEX0 0x000 +#define D3DFVF_TEX1 0x100 +#define D3DFVF_TEX2 0x200 +#define D3DFVF_TEX3 0x300 +#define D3DFVF_TEX4 0x400 +#define D3DFVF_TEX5 0x500 +#define D3DFVF_TEX6 0x600 +#define D3DFVF_TEX7 0x700 +#define D3DFVF_TEX8 0x800 + +#define D3DFVF_LASTBETA_UBYTE4 0x1000 + +#define D3DFVF_RESERVED2 0xE000 // 4 reserved bits + +//--------------------------------------------------------------------- +// Vertex Shaders +// + +/* + +Vertex Shader Declaration + +The declaration portion of a vertex shader defines the static external +interface of the shader. The information in the declaration includes: + +- Assignments of vertex shader input registers to data streams. These +assignments bind a specific vertex register to a single component within a +vertex stream. A vertex stream element is identified by a byte offset +within the stream and a type. The type specifies the arithmetic data type +plus the dimensionality (1, 2, 3, or 4 values). Stream data which is +less than 4 values are always expanded out to 4 values with zero or more +0.F values and one 1.F value. + +- Assignment of vertex shader input registers to implicit data from the +primitive tessellator. This controls the loading of vertex data which is +not loaded from a stream, but rather is generated during primitive +tessellation prior to the vertex shader. + +- Loading data into the constant memory at the time a shader is set as the +current shader. Each token specifies values for one or more contiguous 4 +DWORD constant registers. This allows the shader to update an arbitrary +subset of the constant memory, overwriting the device state (which +contains the current values of the constant memory). Note that these +values can be subsequently overwritten (between DrawPrimitive calls) +during the time a shader is bound to a device via the +SetVertexShaderConstant method. + + +Declaration arrays are single-dimensional arrays of DWORDs composed of +multiple tokens each of which is one or more DWORDs. The single-DWORD +token value 0xFFFFFFFF is a special token used to indicate the end of the +declaration array. The single DWORD token value 0x00000000 is a NOP token +with is ignored during the declaration parsing. Note that 0x00000000 is a +valid value for DWORDs following the first DWORD for multiple word tokens. + +[31:29] TokenType + 0x0 - NOP (requires all DWORD bits to be zero) + 0x1 - stream selector + 0x2 - stream data definition (map to vertex input memory) + 0x3 - vertex input memory from tessellator + 0x4 - constant memory from shader + 0x5 - extension + 0x6 - reserved + 0x7 - end-of-array (requires all DWORD bits to be 1) + +NOP Token (single DWORD token) + [31:29] 0x0 + [28:00] 0x0 + +Stream Selector (single DWORD token) + [31:29] 0x1 + [28] indicates whether this is a tessellator stream + [27:04] 0x0 + [03:00] stream selector (0..15) + +Stream Data Definition (single DWORD token) + Vertex Input Register Load + [31:29] 0x2 + [28] 0x0 + [27:20] 0x0 + [19:16] type (dimensionality and data type) + [15:04] 0x0 + [03:00] vertex register address (0..15) + Data Skip (no register load) + [31:29] 0x2 + [28] 0x1 + [27:20] 0x0 + [19:16] count of DWORDS to skip over (0..15) + [15:00] 0x0 + Vertex Input Memory from Tessellator Data (single DWORD token) + [31:29] 0x3 + [28] indicates whether data is normals or u/v + [27:24] 0x0 + [23:20] vertex register address (0..15) + [19:16] type (dimensionality) + [15:04] 0x0 + [03:00] vertex register address (0..15) + +Constant Memory from Shader (multiple DWORD token) + [31:29] 0x4 + [28:25] count of 4*DWORD constants to load (0..15) + [24:07] 0x0 + [06:00] constant memory address (0..95) + +Extension Token (single or multiple DWORD token) + [31:29] 0x5 + [28:24] count of additional DWORDs in token (0..31) + [23:00] extension-specific information + +End-of-array token (single DWORD token) + [31:29] 0x7 + [28:00] 0x1fffffff + +The stream selector token must be immediately followed by a contiguous set of stream data definition tokens. This token sequence fully defines that stream, including the set of elements within the stream, the order in which the elements appear, the type of each element, and the vertex register into which to load an element. +Streams are allowed to include data which is not loaded into a vertex register, thus allowing data which is not used for this shader to exist in the vertex stream. This skipped data is defined only by a count of DWORDs to skip over, since the type information is irrelevant. +The token sequence: +Stream Select: stream=0 +Stream Data Definition (Load): type=FLOAT3; register=3 +Stream Data Definition (Load): type=FLOAT3; register=4 +Stream Data Definition (Skip): count=2 +Stream Data Definition (Load): type=FLOAT2; register=7 + +defines stream zero to consist of 4 elements, 3 of which are loaded into registers and the fourth skipped over. Register 3 is loaded with the first three DWORDs in each vertex interpreted as FLOAT data. Register 4 is loaded with the 4th, 5th, and 6th DWORDs interpreted as FLOAT data. The next two DWORDs (7th and 8th) are skipped over and not loaded into any vertex input register. Register 7 is loaded with the 9th and 10th DWORDS interpreted as FLOAT data. +Placing of tokens other than NOPs between the Stream Selector and Stream Data Definition tokens is disallowed. + +*/ + +typedef enum _D3DVSD_TOKENTYPE +{ + D3DVSD_TOKEN_NOP = 0, // NOP or extension + D3DVSD_TOKEN_STREAM, // stream selector + D3DVSD_TOKEN_STREAMDATA, // stream data definition (map to vertex input memory) + D3DVSD_TOKEN_TESSELLATOR, // vertex input memory from tessellator + D3DVSD_TOKEN_CONSTMEM, // constant memory from shader + D3DVSD_TOKEN_EXT, // extension + D3DVSD_TOKEN_END = 7, // end-of-array (requires all DWORD bits to be 1) + D3DVSD_FORCE_DWORD = 0x7fffffff,// force 32-bit size enum +} D3DVSD_TOKENTYPE; + +#define D3DVSD_TOKENTYPESHIFT 29 +#define D3DVSD_TOKENTYPEMASK (7 << D3DVSD_TOKENTYPESHIFT) + +#define D3DVSD_STREAMNUMBERSHIFT 0 +#define D3DVSD_STREAMNUMBERMASK (0xF << D3DVSD_STREAMNUMBERSHIFT) + +#define D3DVSD_DATALOADTYPESHIFT 28 +#define D3DVSD_DATALOADTYPEMASK (0x1 << D3DVSD_DATALOADTYPESHIFT) + +#define D3DVSD_DATATYPESHIFT 16 +#define D3DVSD_DATATYPEMASK (0xF << D3DVSD_DATATYPESHIFT) + +#define D3DVSD_SKIPCOUNTSHIFT 16 +#define D3DVSD_SKIPCOUNTMASK (0xF << D3DVSD_SKIPCOUNTSHIFT) + +#define D3DVSD_VERTEXREGSHIFT 0 +#define D3DVSD_VERTEXREGMASK (0x1F << D3DVSD_VERTEXREGSHIFT) + +#define D3DVSD_VERTEXREGINSHIFT 20 +#define D3DVSD_VERTEXREGINMASK (0xF << D3DVSD_VERTEXREGINSHIFT) + +#define D3DVSD_CONSTCOUNTSHIFT 25 +#define D3DVSD_CONSTCOUNTMASK (0xF << D3DVSD_CONSTCOUNTSHIFT) + +#define D3DVSD_CONSTADDRESSSHIFT 0 +#define D3DVSD_CONSTADDRESSMASK (0x7F << D3DVSD_CONSTADDRESSSHIFT) + +#define D3DVSD_CONSTRSSHIFT 16 +#define D3DVSD_CONSTRSMASK (0x1FFF << D3DVSD_CONSTRSSHIFT) + +#define D3DVSD_EXTCOUNTSHIFT 24 +#define D3DVSD_EXTCOUNTMASK (0x1F << D3DVSD_EXTCOUNTSHIFT) + +#define D3DVSD_EXTINFOSHIFT 0 +#define D3DVSD_EXTINFOMASK (0xFFFFFF << D3DVSD_EXTINFOSHIFT) + +#define D3DVSD_MAKETOKENTYPE(tokenType) ((tokenType << D3DVSD_TOKENTYPESHIFT) & D3DVSD_TOKENTYPEMASK) + +// macros for generation of CreateVertexShader Declaration token array + +// Set current stream +// _StreamNumber [0..(MaxStreams-1)] stream to get data from +// +#define D3DVSD_STREAM( _StreamNumber ) \ + (D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_STREAM) | (_StreamNumber)) + +// Set tessellator stream +// +#define D3DVSD_STREAMTESSSHIFT 28 +#define D3DVSD_STREAMTESSMASK (1 << D3DVSD_STREAMTESSSHIFT) +#define D3DVSD_STREAM_TESS( ) \ + (D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_STREAM) | (D3DVSD_STREAMTESSMASK)) + +// bind single vertex register to vertex element from vertex stream +// +// _VertexRegister [0..15] address of the vertex register +// _Type [D3DVSDT_*] dimensionality and arithmetic data type + +#define D3DVSD_REG( _VertexRegister, _Type ) \ + (D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_STREAMDATA) | \ + ((_Type) << D3DVSD_DATATYPESHIFT) | (_VertexRegister)) + +// Skip _DWORDCount DWORDs in vertex +// +#define D3DVSD_SKIP( _DWORDCount ) \ + (D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_STREAMDATA) | 0x10000000 | \ + ((_DWORDCount) << D3DVSD_SKIPCOUNTSHIFT)) + +// load data into vertex shader constant memory +// +// _ConstantAddress [0..95] - address of constant array to begin filling data +// _Count [0..15] - number of constant vectors to load (4 DWORDs each) +// followed by 4*_Count DWORDS of data +// +#define D3DVSD_CONST( _ConstantAddress, _Count ) \ + (D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_CONSTMEM) | \ + ((_Count) << D3DVSD_CONSTCOUNTSHIFT) | (_ConstantAddress)) + +// enable tessellator generated normals +// +// _VertexRegisterIn [0..15] address of vertex register whose input stream +// will be used in normal computation +// _VertexRegisterOut [0..15] address of vertex register to output the normal to +// +#define D3DVSD_TESSNORMAL( _VertexRegisterIn, _VertexRegisterOut ) \ + (D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_TESSELLATOR) | \ + ((_VertexRegisterIn) << D3DVSD_VERTEXREGINSHIFT) | \ + ((0x02) << D3DVSD_DATATYPESHIFT) | (_VertexRegisterOut)) + +// enable tessellator generated surface parameters +// +// _VertexRegister [0..15] address of vertex register to output parameters +// +#define D3DVSD_TESSUV( _VertexRegister ) \ + (D3DVSD_MAKETOKENTYPE(D3DVSD_TOKEN_TESSELLATOR) | 0x10000000 | \ + ((0x01) << D3DVSD_DATATYPESHIFT) | (_VertexRegister)) + +// Generates END token +// +#define D3DVSD_END() 0xFFFFFFFF + +// Generates NOP token +#define D3DVSD_NOP() 0x00000000 + +// bit declarations for _Type fields +#define D3DVSDT_FLOAT1 0x00 // 1D float expanded to (value, 0., 0., 1.) +#define D3DVSDT_FLOAT2 0x01 // 2D float expanded to (value, value, 0., 1.) +#define D3DVSDT_FLOAT3 0x02 // 3D float expanded to (value, value, value, 1.) +#define D3DVSDT_FLOAT4 0x03 // 4D float +#define D3DVSDT_D3DCOLOR 0x04 // 4D packed unsigned bytes mapped to 0. to 1. range + // Input is in D3DCOLOR format (ARGB) expanded to (R, G, B, A) +#define D3DVSDT_UBYTE4 0x05 // 4D unsigned byte +#define D3DVSDT_SHORT2 0x06 // 2D signed short expanded to (value, value, 0., 1.) +#define D3DVSDT_SHORT4 0x07 // 4D signed short + +// assignments of vertex input registers for fixed function vertex shader +// +#define D3DVSDE_POSITION 0 +#define D3DVSDE_BLENDWEIGHT 1 +#define D3DVSDE_BLENDINDICES 2 +#define D3DVSDE_NORMAL 3 +#define D3DVSDE_PSIZE 4 +#define D3DVSDE_DIFFUSE 5 +#define D3DVSDE_SPECULAR 6 +#define D3DVSDE_TEXCOORD0 7 +#define D3DVSDE_TEXCOORD1 8 +#define D3DVSDE_TEXCOORD2 9 +#define D3DVSDE_TEXCOORD3 10 +#define D3DVSDE_TEXCOORD4 11 +#define D3DVSDE_TEXCOORD5 12 +#define D3DVSDE_TEXCOORD6 13 +#define D3DVSDE_TEXCOORD7 14 +#define D3DVSDE_POSITION2 15 +#define D3DVSDE_NORMAL2 16 + +// Maximum supported number of texture coordinate sets +#define D3DDP_MAXTEXCOORD 8 + + +// +// Instruction Token Bit Definitions +// +#define D3DSI_OPCODE_MASK 0x0000FFFF + +typedef enum _D3DSHADER_INSTRUCTION_OPCODE_TYPE +{ + D3DSIO_NOP = 0, // PS/VS + D3DSIO_MOV , // PS/VS + D3DSIO_ADD , // PS/VS + D3DSIO_SUB , // PS + D3DSIO_MAD , // PS/VS + D3DSIO_MUL , // PS/VS + D3DSIO_RCP , // VS + D3DSIO_RSQ , // VS + D3DSIO_DP3 , // PS/VS + D3DSIO_DP4 , // PS/VS + D3DSIO_MIN , // VS + D3DSIO_MAX , // VS + D3DSIO_SLT , // VS + D3DSIO_SGE , // VS + D3DSIO_EXP , // VS + D3DSIO_LOG , // VS + D3DSIO_LIT , // VS + D3DSIO_DST , // VS + D3DSIO_LRP , // PS + D3DSIO_FRC , // VS + D3DSIO_M4x4 , // VS + D3DSIO_M4x3 , // VS + D3DSIO_M3x4 , // VS + D3DSIO_M3x3 , // VS + D3DSIO_M3x2 , // VS + + D3DSIO_TEXCOORD = 64, // PS + D3DSIO_TEXKILL , // PS + D3DSIO_TEX , // PS + D3DSIO_TEXBEM , // PS + D3DSIO_TEXBEML , // PS + D3DSIO_TEXREG2AR , // PS + D3DSIO_TEXREG2GB , // PS + D3DSIO_TEXM3x2PAD , // PS + D3DSIO_TEXM3x2TEX , // PS + D3DSIO_TEXM3x3PAD , // PS + D3DSIO_TEXM3x3TEX , // PS + D3DSIO_TEXM3x3DIFF , // PS + D3DSIO_TEXM3x3SPEC , // PS + D3DSIO_TEXM3x3VSPEC , // PS + D3DSIO_EXPP , // VS + D3DSIO_LOGP , // VS + D3DSIO_CND , // PS + D3DSIO_DEF , // PS + D3DSIO_COMMENT = 0xFFFE, + D3DSIO_END = 0xFFFF, + + D3DSIO_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum +} D3DSHADER_INSTRUCTION_OPCODE_TYPE; + +// +// Co-Issue Instruction Modifier - if set then this instruction is to be +// issued in parallel with the previous instruction(s) for which this bit +// is not set. +// +#define D3DSI_COISSUE 0x40000000 + +// +// Parameter Token Bit Definitions +// +#define D3DSP_REGNUM_MASK 0x00000FFF + +// destination parameter write mask +#define D3DSP_WRITEMASK_0 0x00010000 // Component 0 (X;Red) +#define D3DSP_WRITEMASK_1 0x00020000 // Component 1 (Y;Green) +#define D3DSP_WRITEMASK_2 0x00040000 // Component 2 (Z;Blue) +#define D3DSP_WRITEMASK_3 0x00080000 // Component 3 (W;Alpha) +#define D3DSP_WRITEMASK_ALL 0x000F0000 // All Components + +// destination parameter modifiers +#define D3DSP_DSTMOD_SHIFT 20 +#define D3DSP_DSTMOD_MASK 0x00F00000 + +typedef enum _D3DSHADER_PARAM_DSTMOD_TYPE +{ + D3DSPDM_NONE = 0<>8)&0xFF) +#define D3DSHADER_VERSION_MINOR(_Version) (((_Version)>>0)&0xFF) + +// destination/source parameter register type +#define D3DSI_COMMENTSIZE_SHIFT 16 +#define D3DSI_COMMENTSIZE_MASK 0x7FFF0000 +#define D3DSHADER_COMMENT(_DWordSize) \ + ((((_DWordSize)<= 0x0800) */ +#endif /* _D3D8TYPES(P)_H_ */ + diff --git a/windows_libs/mssdk/include/d3dcaps.h b/windows_libs/mssdk/include/d3dcaps.h new file mode 100644 index 00000000..606d6a64 --- /dev/null +++ b/windows_libs/mssdk/include/d3dcaps.h @@ -0,0 +1,598 @@ +/*==========================================================================; + * + * + * File: d3dcaps.h + * Content: Direct3D capabilities include file + * + ***************************************************************************/ + +#ifndef _D3DCAPS_H +#define _D3DCAPS_H + +/* + * Pull in DirectDraw include file automatically: + */ +#include "ddraw.h" + +#ifndef DIRECT3D_VERSION +#define DIRECT3D_VERSION 0x0700 +#endif + +#pragma pack(4) + +/* Description of capabilities of transform */ + +typedef struct _D3DTRANSFORMCAPS { + DWORD dwSize; + DWORD dwCaps; +} D3DTRANSFORMCAPS, *LPD3DTRANSFORMCAPS; + +#define D3DTRANSFORMCAPS_CLIP 0x00000001L /* Will clip whilst transforming */ + +/* Description of capabilities of lighting */ + +typedef struct _D3DLIGHTINGCAPS { + DWORD dwSize; + DWORD dwCaps; /* Lighting caps */ + DWORD dwLightingModel; /* Lighting model - RGB or mono */ + DWORD dwNumLights; /* Number of lights that can be handled */ +} D3DLIGHTINGCAPS, *LPD3DLIGHTINGCAPS; + +#define D3DLIGHTINGMODEL_RGB 0x00000001L +#define D3DLIGHTINGMODEL_MONO 0x00000002L + +#define D3DLIGHTCAPS_POINT 0x00000001L /* Point lights supported */ +#define D3DLIGHTCAPS_SPOT 0x00000002L /* Spot lights supported */ +#define D3DLIGHTCAPS_DIRECTIONAL 0x00000004L /* Directional lights supported */ +#if(DIRECT3D_VERSION < 0x700) +#define D3DLIGHTCAPS_PARALLELPOINT 0x00000008L /* Parallel point lights supported */ +#endif +#if(DIRECT3D_VERSION < 0x500) +#define D3DLIGHTCAPS_GLSPOT 0x00000010L /* GL syle spot lights supported */ +#endif + +/* Description of capabilities for each primitive type */ + +typedef struct _D3DPrimCaps { + DWORD dwSize; + DWORD dwMiscCaps; /* Capability flags */ + DWORD dwRasterCaps; + DWORD dwZCmpCaps; + DWORD dwSrcBlendCaps; + DWORD dwDestBlendCaps; + DWORD dwAlphaCmpCaps; + DWORD dwShadeCaps; + DWORD dwTextureCaps; + DWORD dwTextureFilterCaps; + DWORD dwTextureBlendCaps; + DWORD dwTextureAddressCaps; + DWORD dwStippleWidth; /* maximum width and height of */ + DWORD dwStippleHeight; /* of supported stipple (up to 32x32) */ +} D3DPRIMCAPS, *LPD3DPRIMCAPS; + +/* D3DPRIMCAPS dwMiscCaps */ + +#define D3DPMISCCAPS_MASKPLANES 0x00000001L +#define D3DPMISCCAPS_MASKZ 0x00000002L +#define D3DPMISCCAPS_LINEPATTERNREP 0x00000004L +#define D3DPMISCCAPS_CONFORMANT 0x00000008L +#define D3DPMISCCAPS_CULLNONE 0x00000010L +#define D3DPMISCCAPS_CULLCW 0x00000020L +#define D3DPMISCCAPS_CULLCCW 0x00000040L + +/* D3DPRIMCAPS dwRasterCaps */ + +#define D3DPRASTERCAPS_DITHER 0x00000001L +#define D3DPRASTERCAPS_ROP2 0x00000002L +#define D3DPRASTERCAPS_XOR 0x00000004L +#define D3DPRASTERCAPS_PAT 0x00000008L +#define D3DPRASTERCAPS_ZTEST 0x00000010L +#define D3DPRASTERCAPS_SUBPIXEL 0x00000020L +#define D3DPRASTERCAPS_SUBPIXELX 0x00000040L +#define D3DPRASTERCAPS_FOGVERTEX 0x00000080L +#define D3DPRASTERCAPS_FOGTABLE 0x00000100L +#define D3DPRASTERCAPS_STIPPLE 0x00000200L +#if(DIRECT3D_VERSION >= 0x0500) +#define D3DPRASTERCAPS_ANTIALIASSORTDEPENDENT 0x00000400L +#define D3DPRASTERCAPS_ANTIALIASSORTINDEPENDENT 0x00000800L +#define D3DPRASTERCAPS_ANTIALIASEDGES 0x00001000L +#define D3DPRASTERCAPS_MIPMAPLODBIAS 0x00002000L +#define D3DPRASTERCAPS_ZBIAS 0x00004000L +#define D3DPRASTERCAPS_ZBUFFERLESSHSR 0x00008000L +#define D3DPRASTERCAPS_FOGRANGE 0x00010000L +#define D3DPRASTERCAPS_ANISOTROPY 0x00020000L +#endif /* DIRECT3D_VERSION >= 0x0500 */ +#if(DIRECT3D_VERSION >= 0x0600) +#define D3DPRASTERCAPS_WBUFFER 0x00040000L +#define D3DPRASTERCAPS_TRANSLUCENTSORTINDEPENDENT 0x00080000L +#define D3DPRASTERCAPS_WFOG 0x00100000L +#define D3DPRASTERCAPS_ZFOG 0x00200000L +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +/* D3DPRIMCAPS dwZCmpCaps, dwAlphaCmpCaps */ + +#define D3DPCMPCAPS_NEVER 0x00000001L +#define D3DPCMPCAPS_LESS 0x00000002L +#define D3DPCMPCAPS_EQUAL 0x00000004L +#define D3DPCMPCAPS_LESSEQUAL 0x00000008L +#define D3DPCMPCAPS_GREATER 0x00000010L +#define D3DPCMPCAPS_NOTEQUAL 0x00000020L +#define D3DPCMPCAPS_GREATEREQUAL 0x00000040L +#define D3DPCMPCAPS_ALWAYS 0x00000080L + +/* D3DPRIMCAPS dwSourceBlendCaps, dwDestBlendCaps */ + +#define D3DPBLENDCAPS_ZERO 0x00000001L +#define D3DPBLENDCAPS_ONE 0x00000002L +#define D3DPBLENDCAPS_SRCCOLOR 0x00000004L +#define D3DPBLENDCAPS_INVSRCCOLOR 0x00000008L +#define D3DPBLENDCAPS_SRCALPHA 0x00000010L +#define D3DPBLENDCAPS_INVSRCALPHA 0x00000020L +#define D3DPBLENDCAPS_DESTALPHA 0x00000040L +#define D3DPBLENDCAPS_INVDESTALPHA 0x00000080L +#define D3DPBLENDCAPS_DESTCOLOR 0x00000100L +#define D3DPBLENDCAPS_INVDESTCOLOR 0x00000200L +#define D3DPBLENDCAPS_SRCALPHASAT 0x00000400L +#define D3DPBLENDCAPS_BOTHSRCALPHA 0x00000800L +#define D3DPBLENDCAPS_BOTHINVSRCALPHA 0x00001000L + +/* D3DPRIMCAPS dwShadeCaps */ + +#define D3DPSHADECAPS_COLORFLATMONO 0x00000001L +#define D3DPSHADECAPS_COLORFLATRGB 0x00000002L +#define D3DPSHADECAPS_COLORGOURAUDMONO 0x00000004L +#define D3DPSHADECAPS_COLORGOURAUDRGB 0x00000008L +#define D3DPSHADECAPS_COLORPHONGMONO 0x00000010L +#define D3DPSHADECAPS_COLORPHONGRGB 0x00000020L + +#define D3DPSHADECAPS_SPECULARFLATMONO 0x00000040L +#define D3DPSHADECAPS_SPECULARFLATRGB 0x00000080L +#define D3DPSHADECAPS_SPECULARGOURAUDMONO 0x00000100L +#define D3DPSHADECAPS_SPECULARGOURAUDRGB 0x00000200L +#define D3DPSHADECAPS_SPECULARPHONGMONO 0x00000400L +#define D3DPSHADECAPS_SPECULARPHONGRGB 0x00000800L + +#define D3DPSHADECAPS_ALPHAFLATBLEND 0x00001000L +#define D3DPSHADECAPS_ALPHAFLATSTIPPLED 0x00002000L +#define D3DPSHADECAPS_ALPHAGOURAUDBLEND 0x00004000L +#define D3DPSHADECAPS_ALPHAGOURAUDSTIPPLED 0x00008000L +#define D3DPSHADECAPS_ALPHAPHONGBLEND 0x00010000L +#define D3DPSHADECAPS_ALPHAPHONGSTIPPLED 0x00020000L + +#define D3DPSHADECAPS_FOGFLAT 0x00040000L +#define D3DPSHADECAPS_FOGGOURAUD 0x00080000L +#define D3DPSHADECAPS_FOGPHONG 0x00100000L + +/* D3DPRIMCAPS dwTextureCaps */ + +/* + * Perspective-correct texturing is supported + */ +#define D3DPTEXTURECAPS_PERSPECTIVE 0x00000001L + +/* + * Power-of-2 texture dimensions are required + */ +#define D3DPTEXTURECAPS_POW2 0x00000002L + +/* + * Alpha in texture pixels is supported + */ +#define D3DPTEXTURECAPS_ALPHA 0x00000004L + +/* + * Color-keyed textures are supported + */ +#define D3DPTEXTURECAPS_TRANSPARENCY 0x00000008L + +/* + * obsolete, see D3DPTADDRESSCAPS_BORDER + */ +#define D3DPTEXTURECAPS_BORDER 0x00000010L + +/* + * Only square textures are supported + */ +#define D3DPTEXTURECAPS_SQUAREONLY 0x00000020L + +#if(DIRECT3D_VERSION >= 0x0600) +/* + * Texture indices are not scaled by the texture size prior + * to interpolation. + */ +#define D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE 0x00000040L + +/* + * Device can draw alpha from texture palettes + */ +#define D3DPTEXTURECAPS_ALPHAPALETTE 0x00000080L + +/* + * Device can use non-POW2 textures if: + * 1) D3DTEXTURE_ADDRESS is set to CLAMP for this texture's stage + * 2) D3DRS_WRAP(N) is zero for this texture's coordinates + * 3) mip mapping is not enabled (use magnification filter only) + */ +#define D3DPTEXTURECAPS_NONPOW2CONDITIONAL 0x00000100L + +#endif /* DIRECT3D_VERSION >= 0x0600 */ +#if(DIRECT3D_VERSION >= 0x0700) + +// 0x00000200L unused + +/* + * Device can divide transformed texture coordinates by the + * COUNTth texture coordinate (can do D3DTTFF_PROJECTED) + */ +#define D3DPTEXTURECAPS_PROJECTED 0x00000400L + +/* + * Device can do cubemap textures + */ +#define D3DPTEXTURECAPS_CUBEMAP 0x00000800L + +#define D3DPTEXTURECAPS_COLORKEYBLEND 0x00001000L +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +/* D3DPRIMCAPS dwTextureFilterCaps */ + +#define D3DPTFILTERCAPS_NEAREST 0x00000001L +#define D3DPTFILTERCAPS_LINEAR 0x00000002L +#define D3DPTFILTERCAPS_MIPNEAREST 0x00000004L +#define D3DPTFILTERCAPS_MIPLINEAR 0x00000008L +#define D3DPTFILTERCAPS_LINEARMIPNEAREST 0x00000010L +#define D3DPTFILTERCAPS_LINEARMIPLINEAR 0x00000020L + +#if(DIRECT3D_VERSION >= 0x0600) +/* Device3 Min Filter */ +#define D3DPTFILTERCAPS_MINFPOINT 0x00000100L +#define D3DPTFILTERCAPS_MINFLINEAR 0x00000200L +#define D3DPTFILTERCAPS_MINFANISOTROPIC 0x00000400L + +/* Device3 Mip Filter */ +#define D3DPTFILTERCAPS_MIPFPOINT 0x00010000L +#define D3DPTFILTERCAPS_MIPFLINEAR 0x00020000L + +/* Device3 Mag Filter */ +#define D3DPTFILTERCAPS_MAGFPOINT 0x01000000L +#define D3DPTFILTERCAPS_MAGFLINEAR 0x02000000L +#define D3DPTFILTERCAPS_MAGFANISOTROPIC 0x04000000L +#define D3DPTFILTERCAPS_MAGFAFLATCUBIC 0x08000000L +#define D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC 0x10000000L +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +/* D3DPRIMCAPS dwTextureBlendCaps */ + +#define D3DPTBLENDCAPS_DECAL 0x00000001L +#define D3DPTBLENDCAPS_MODULATE 0x00000002L +#define D3DPTBLENDCAPS_DECALALPHA 0x00000004L +#define D3DPTBLENDCAPS_MODULATEALPHA 0x00000008L +#define D3DPTBLENDCAPS_DECALMASK 0x00000010L +#define D3DPTBLENDCAPS_MODULATEMASK 0x00000020L +#define D3DPTBLENDCAPS_COPY 0x00000040L +#if(DIRECT3D_VERSION >= 0x0500) +#define D3DPTBLENDCAPS_ADD 0x00000080L +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +/* D3DPRIMCAPS dwTextureAddressCaps */ +#define D3DPTADDRESSCAPS_WRAP 0x00000001L +#define D3DPTADDRESSCAPS_MIRROR 0x00000002L +#define D3DPTADDRESSCAPS_CLAMP 0x00000004L +#if(DIRECT3D_VERSION >= 0x0500) +#define D3DPTADDRESSCAPS_BORDER 0x00000008L +#define D3DPTADDRESSCAPS_INDEPENDENTUV 0x00000010L +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#if(DIRECT3D_VERSION >= 0x0600) + +/* D3DDEVICEDESC dwStencilCaps */ + +#define D3DSTENCILCAPS_KEEP 0x00000001L +#define D3DSTENCILCAPS_ZERO 0x00000002L +#define D3DSTENCILCAPS_REPLACE 0x00000004L +#define D3DSTENCILCAPS_INCRSAT 0x00000008L +#define D3DSTENCILCAPS_DECRSAT 0x00000010L +#define D3DSTENCILCAPS_INVERT 0x00000020L +#define D3DSTENCILCAPS_INCR 0x00000040L +#define D3DSTENCILCAPS_DECR 0x00000080L + +/* D3DDEVICEDESC dwTextureOpCaps */ + +#define D3DTEXOPCAPS_DISABLE 0x00000001L +#define D3DTEXOPCAPS_SELECTARG1 0x00000002L +#define D3DTEXOPCAPS_SELECTARG2 0x00000004L +#define D3DTEXOPCAPS_MODULATE 0x00000008L +#define D3DTEXOPCAPS_MODULATE2X 0x00000010L +#define D3DTEXOPCAPS_MODULATE4X 0x00000020L +#define D3DTEXOPCAPS_ADD 0x00000040L +#define D3DTEXOPCAPS_ADDSIGNED 0x00000080L +#define D3DTEXOPCAPS_ADDSIGNED2X 0x00000100L +#define D3DTEXOPCAPS_SUBTRACT 0x00000200L +#define D3DTEXOPCAPS_ADDSMOOTH 0x00000400L +#define D3DTEXOPCAPS_BLENDDIFFUSEALPHA 0x00000800L +#define D3DTEXOPCAPS_BLENDTEXTUREALPHA 0x00001000L +#define D3DTEXOPCAPS_BLENDFACTORALPHA 0x00002000L +#define D3DTEXOPCAPS_BLENDTEXTUREALPHAPM 0x00004000L +#define D3DTEXOPCAPS_BLENDCURRENTALPHA 0x00008000L +#define D3DTEXOPCAPS_PREMODULATE 0x00010000L +#define D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR 0x00020000L +#define D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA 0x00040000L +#define D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR 0x00080000L +#define D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA 0x00100000L +#define D3DTEXOPCAPS_BUMPENVMAP 0x00200000L +#define D3DTEXOPCAPS_BUMPENVMAPLUMINANCE 0x00400000L +#define D3DTEXOPCAPS_DOTPRODUCT3 0x00800000L + +/* D3DDEVICEDESC dwFVFCaps flags */ + +#define D3DFVFCAPS_TEXCOORDCOUNTMASK 0x0000ffffL /* mask for texture coordinate count field */ +#define D3DFVFCAPS_DONOTSTRIPELEMENTS 0x00080000L /* Device prefers that vertex elements not be stripped */ + +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +/* + * Description for a device. + * This is used to describe a device that is to be created or to query + * the current device. + */ +typedef struct _D3DDeviceDesc { + DWORD dwSize; /* Size of D3DDEVICEDESC structure */ + DWORD dwFlags; /* Indicates which fields have valid data */ + D3DCOLORMODEL dcmColorModel; /* Color model of device */ + DWORD dwDevCaps; /* Capabilities of device */ + D3DTRANSFORMCAPS dtcTransformCaps; /* Capabilities of transform */ + BOOL bClipping; /* Device can do 3D clipping */ + D3DLIGHTINGCAPS dlcLightingCaps; /* Capabilities of lighting */ + D3DPRIMCAPS dpcLineCaps; + D3DPRIMCAPS dpcTriCaps; + DWORD dwDeviceRenderBitDepth; /* One of DDBB_8, 16, etc.. */ + DWORD dwDeviceZBufferBitDepth;/* One of DDBD_16, 32, etc.. */ + DWORD dwMaxBufferSize; /* Maximum execute buffer size */ + DWORD dwMaxVertexCount; /* Maximum vertex count */ +#if(DIRECT3D_VERSION >= 0x0500) + // *** New fields for DX5 *** // + + // Width and height caps are 0 for legacy HALs. + DWORD dwMinTextureWidth, dwMinTextureHeight; + DWORD dwMaxTextureWidth, dwMaxTextureHeight; + DWORD dwMinStippleWidth, dwMaxStippleWidth; + DWORD dwMinStippleHeight, dwMaxStippleHeight; +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#if(DIRECT3D_VERSION >= 0x0600) + // New fields for DX6 + DWORD dwMaxTextureRepeat; + DWORD dwMaxTextureAspectRatio; + DWORD dwMaxAnisotropy; + + // Guard band that the rasterizer can accommodate + // Screen-space vertices inside this space but outside the viewport + // will get clipped properly. + D3DVALUE dvGuardBandLeft; + D3DVALUE dvGuardBandTop; + D3DVALUE dvGuardBandRight; + D3DVALUE dvGuardBandBottom; + + D3DVALUE dvExtentsAdjust; + DWORD dwStencilCaps; + + DWORD dwFVFCaps; + DWORD dwTextureOpCaps; + WORD wMaxTextureBlendStages; + WORD wMaxSimultaneousTextures; +#endif /* DIRECT3D_VERSION >= 0x0600 */ +} D3DDEVICEDESC, *LPD3DDEVICEDESC; + +#if(DIRECT3D_VERSION >= 0x0700) +typedef struct _D3DDeviceDesc7 { + DWORD dwDevCaps; /* Capabilities of device */ + D3DPRIMCAPS dpcLineCaps; + D3DPRIMCAPS dpcTriCaps; + DWORD dwDeviceRenderBitDepth; /* One of DDBB_8, 16, etc.. */ + DWORD dwDeviceZBufferBitDepth;/* One of DDBD_16, 32, etc.. */ + + DWORD dwMinTextureWidth, dwMinTextureHeight; + DWORD dwMaxTextureWidth, dwMaxTextureHeight; + + DWORD dwMaxTextureRepeat; + DWORD dwMaxTextureAspectRatio; + DWORD dwMaxAnisotropy; + + D3DVALUE dvGuardBandLeft; + D3DVALUE dvGuardBandTop; + D3DVALUE dvGuardBandRight; + D3DVALUE dvGuardBandBottom; + + D3DVALUE dvExtentsAdjust; + DWORD dwStencilCaps; + + DWORD dwFVFCaps; + DWORD dwTextureOpCaps; + WORD wMaxTextureBlendStages; + WORD wMaxSimultaneousTextures; + + DWORD dwMaxActiveLights; + D3DVALUE dvMaxVertexW; + GUID deviceGUID; + + WORD wMaxUserClipPlanes; + WORD wMaxVertexBlendMatrices; + + DWORD dwVertexProcessingCaps; + + DWORD dwReserved1; + DWORD dwReserved2; + DWORD dwReserved3; + DWORD dwReserved4; +} D3DDEVICEDESC7, *LPD3DDEVICEDESC7; +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +#define D3DDEVICEDESCSIZE (sizeof(D3DDEVICEDESC)) +#define D3DDEVICEDESC7SIZE (sizeof(D3DDEVICEDESC7)) + +typedef HRESULT (CALLBACK * LPD3DENUMDEVICESCALLBACK)(GUID FAR *lpGuid, LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC, LPD3DDEVICEDESC, LPVOID); + +#if(DIRECT3D_VERSION >= 0x0700) +typedef HRESULT (CALLBACK * LPD3DENUMDEVICESCALLBACK7)(LPSTR lpDeviceDescription, LPSTR lpDeviceName, LPD3DDEVICEDESC7, LPVOID); +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +/* D3DDEVICEDESC dwFlags indicating valid fields */ + +#define D3DDD_COLORMODEL 0x00000001L /* dcmColorModel is valid */ +#define D3DDD_DEVCAPS 0x00000002L /* dwDevCaps is valid */ +#define D3DDD_TRANSFORMCAPS 0x00000004L /* dtcTransformCaps is valid */ +#define D3DDD_LIGHTINGCAPS 0x00000008L /* dlcLightingCaps is valid */ +#define D3DDD_BCLIPPING 0x00000010L /* bClipping is valid */ +#define D3DDD_LINECAPS 0x00000020L /* dpcLineCaps is valid */ +#define D3DDD_TRICAPS 0x00000040L /* dpcTriCaps is valid */ +#define D3DDD_DEVICERENDERBITDEPTH 0x00000080L /* dwDeviceRenderBitDepth is valid */ +#define D3DDD_DEVICEZBUFFERBITDEPTH 0x00000100L /* dwDeviceZBufferBitDepth is valid */ +#define D3DDD_MAXBUFFERSIZE 0x00000200L /* dwMaxBufferSize is valid */ +#define D3DDD_MAXVERTEXCOUNT 0x00000400L /* dwMaxVertexCount is valid */ + +/* D3DDEVICEDESC dwDevCaps flags */ + +#define D3DDEVCAPS_FLOATTLVERTEX 0x00000001L /* Device accepts floating point */ + /* for post-transform vertex data */ +#define D3DDEVCAPS_SORTINCREASINGZ 0x00000002L /* Device needs data sorted for increasing Z */ +#define D3DDEVCAPS_SORTDECREASINGZ 0X00000004L /* Device needs data sorted for decreasing Z */ +#define D3DDEVCAPS_SORTEXACT 0x00000008L /* Device needs data sorted exactly */ + +#define D3DDEVCAPS_EXECUTESYSTEMMEMORY 0x00000010L /* Device can use execute buffers from system memory */ +#define D3DDEVCAPS_EXECUTEVIDEOMEMORY 0x00000020L /* Device can use execute buffers from video memory */ +#define D3DDEVCAPS_TLVERTEXSYSTEMMEMORY 0x00000040L /* Device can use TL buffers from system memory */ +#define D3DDEVCAPS_TLVERTEXVIDEOMEMORY 0x00000080L /* Device can use TL buffers from video memory */ +#define D3DDEVCAPS_TEXTURESYSTEMMEMORY 0x00000100L /* Device can texture from system memory */ +#define D3DDEVCAPS_TEXTUREVIDEOMEMORY 0x00000200L /* Device can texture from device memory */ +#if(DIRECT3D_VERSION >= 0x0500) +#define D3DDEVCAPS_DRAWPRIMTLVERTEX 0x00000400L /* Device can draw TLVERTEX primitives */ +#define D3DDEVCAPS_CANRENDERAFTERFLIP 0x00000800L /* Device can render without waiting for flip to complete */ +#define D3DDEVCAPS_TEXTURENONLOCALVIDMEM 0x00001000L /* Device can texture from nonlocal video memory */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ +#if(DIRECT3D_VERSION >= 0x0600) +#define D3DDEVCAPS_DRAWPRIMITIVES2 0x00002000L /* Device can support DrawPrimitives2 */ +#define D3DDEVCAPS_SEPARATETEXTUREMEMORIES 0x00004000L /* Device is texturing from separate memory pools */ +#define D3DDEVCAPS_DRAWPRIMITIVES2EX 0x00008000L /* Device can support Extended DrawPrimitives2 i.e. DX7 compliant driver*/ +#endif /* DIRECT3D_VERSION >= 0x0600 */ +#if(DIRECT3D_VERSION >= 0x0700) +#define D3DDEVCAPS_HWTRANSFORMANDLIGHT 0x00010000L /* Device can support transformation and lighting in hardware and DRAWPRIMITIVES2EX must be also */ +#define D3DDEVCAPS_CANBLTSYSTONONLOCAL 0x00020000L /* Device supports a Tex Blt from system memory to non-local vidmem */ +#define D3DDEVCAPS_HWRASTERIZATION 0x00080000L /* Device has HW acceleration for rasterization */ + +/* + * These are the flags in the D3DDEVICEDESC7.dwVertexProcessingCaps field + */ + +/* device can do texgen */ +#define D3DVTXPCAPS_TEXGEN 0x00000001L +/* device can do IDirect3DDevice7 colormaterialsource ops */ +#define D3DVTXPCAPS_MATERIALSOURCE7 0x00000002L +/* device can do vertex fog */ +#define D3DVTXPCAPS_VERTEXFOG 0x00000004L +/* device can do directional lights */ +#define D3DVTXPCAPS_DIRECTIONALLIGHTS 0x00000008L +/* device can do positional lights (includes point and spot) */ +#define D3DVTXPCAPS_POSITIONALLIGHTS 0x00000010L +/* device can do local viewer */ +#define D3DVTXPCAPS_LOCALVIEWER 0x00000020L + +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +#define D3DFDS_COLORMODEL 0x00000001L /* Match color model */ +#define D3DFDS_GUID 0x00000002L /* Match guid */ +#define D3DFDS_HARDWARE 0x00000004L /* Match hardware/software */ +#define D3DFDS_TRIANGLES 0x00000008L /* Match in triCaps */ +#define D3DFDS_LINES 0x00000010L /* Match in lineCaps */ +#define D3DFDS_MISCCAPS 0x00000020L /* Match primCaps.dwMiscCaps */ +#define D3DFDS_RASTERCAPS 0x00000040L /* Match primCaps.dwRasterCaps */ +#define D3DFDS_ZCMPCAPS 0x00000080L /* Match primCaps.dwZCmpCaps */ +#define D3DFDS_ALPHACMPCAPS 0x00000100L /* Match primCaps.dwAlphaCmpCaps */ +#define D3DFDS_SRCBLENDCAPS 0x00000200L /* Match primCaps.dwSourceBlendCaps */ +#define D3DFDS_DSTBLENDCAPS 0x00000400L /* Match primCaps.dwDestBlendCaps */ +#define D3DFDS_SHADECAPS 0x00000800L /* Match primCaps.dwShadeCaps */ +#define D3DFDS_TEXTURECAPS 0x00001000L /* Match primCaps.dwTextureCaps */ +#define D3DFDS_TEXTUREFILTERCAPS 0x00002000L /* Match primCaps.dwTextureFilterCaps */ +#define D3DFDS_TEXTUREBLENDCAPS 0x00004000L /* Match primCaps.dwTextureBlendCaps */ +#define D3DFDS_TEXTUREADDRESSCAPS 0x00008000L /* Match primCaps.dwTextureBlendCaps */ + +/* + * FindDevice arguments + */ +typedef struct _D3DFINDDEVICESEARCH { + DWORD dwSize; + DWORD dwFlags; + BOOL bHardware; + D3DCOLORMODEL dcmColorModel; + GUID guid; + DWORD dwCaps; + D3DPRIMCAPS dpcPrimCaps; +} D3DFINDDEVICESEARCH, *LPD3DFINDDEVICESEARCH; + +typedef struct _D3DFINDDEVICERESULT { + DWORD dwSize; + GUID guid; /* guid which matched */ + D3DDEVICEDESC ddHwDesc; /* hardware D3DDEVICEDESC */ + D3DDEVICEDESC ddSwDesc; /* software D3DDEVICEDESC */ +} D3DFINDDEVICERESULT, *LPD3DFINDDEVICERESULT; + +/* + * Description of execute buffer. + */ +typedef struct _D3DExecuteBufferDesc { + DWORD dwSize; /* size of this structure */ + DWORD dwFlags; /* flags indicating which fields are valid */ + DWORD dwCaps; /* capabilities of execute buffer */ + DWORD dwBufferSize; /* size of execute buffer data */ + LPVOID lpData; /* pointer to actual data */ +} D3DEXECUTEBUFFERDESC, *LPD3DEXECUTEBUFFERDESC; + +/* D3DEXECUTEBUFFER dwFlags indicating valid fields */ + +#define D3DDEB_BUFSIZE 0x00000001l /* buffer size valid */ +#define D3DDEB_CAPS 0x00000002l /* caps valid */ +#define D3DDEB_LPDATA 0x00000004l /* lpData valid */ + +/* D3DEXECUTEBUFFER dwCaps */ + +#define D3DDEBCAPS_SYSTEMMEMORY 0x00000001l /* buffer in system memory */ +#define D3DDEBCAPS_VIDEOMEMORY 0x00000002l /* buffer in device memory */ +#define D3DDEBCAPS_MEM (D3DDEBCAPS_SYSTEMMEMORY|D3DDEBCAPS_VIDEOMEMORY) + +#if(DIRECT3D_VERSION < 0x0800) + +#if(DIRECT3D_VERSION >= 0x0700) +typedef struct _D3DDEVINFO_TEXTUREMANAGER { + BOOL bThrashing; /* indicates if thrashing */ + DWORD dwApproxBytesDownloaded; /* Approximate number of bytes downloaded by texture manager */ + DWORD dwNumEvicts; /* number of textures evicted */ + DWORD dwNumVidCreates; /* number of textures created in video memory */ + DWORD dwNumTexturesUsed; /* number of textures used */ + DWORD dwNumUsedTexInVid; /* number of used textures present in video memory */ + DWORD dwWorkingSet; /* number of textures in video memory */ + DWORD dwWorkingSetBytes; /* number of bytes in video memory */ + DWORD dwTotalManaged; /* total number of managed textures */ + DWORD dwTotalBytes; /* total number of bytes of managed textures */ + DWORD dwLastPri; /* priority of last texture evicted */ +} D3DDEVINFO_TEXTUREMANAGER, *LPD3DDEVINFO_TEXTUREMANAGER; + +typedef struct _D3DDEVINFO_TEXTURING { + DWORD dwNumLoads; /* counts Load() API calls */ + DWORD dwApproxBytesLoaded; /* Approximate number bytes loaded via Load() */ + DWORD dwNumPreLoads; /* counts PreLoad() API calls */ + DWORD dwNumSet; /* counts SetTexture() API calls */ + DWORD dwNumCreates; /* counts texture creates */ + DWORD dwNumDestroys; /* counts texture destroys */ + DWORD dwNumSetPriorities; /* counts SetPriority() API calls */ + DWORD dwNumSetLODs; /* counts SetLOD() API calls */ + DWORD dwNumLocks; /* counts number of texture locks */ + DWORD dwNumGetDCs; /* counts number of GetDCs to textures */ +} D3DDEVINFO_TEXTURING, *LPD3DDEVINFO_TEXTURING; +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +#endif //(DIRECT3D_VERSION < 0x0800) + +#pragma pack() + + +#endif /* _D3DCAPS_H_ */ + diff --git a/windows_libs/mssdk/include/d3drm.h b/windows_libs/mssdk/include/d3drm.h new file mode 100644 index 00000000..2438bfe1 --- /dev/null +++ b/windows_libs/mssdk/include/d3drm.h @@ -0,0 +1,342 @@ +/*==========================================================================; + * + * Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved. + * + * File: d3drm.h + * Content: Direct3DRM include file + * + ***************************************************************************/ + +#ifndef __D3DRM_H__ +#define __D3DRM_H__ + +#include "ddraw.h" + +#ifdef __cplusplus +struct IDirect3DRM; +#endif + +typedef struct IDirect3DRM *LPDIRECT3DRM; + +#include "d3drmobj.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +DEFINE_GUID(IID_IDirect3DRM, 0x2bc49361, 0x8327, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRM2, 0x4516ecc8, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(IID_IDirect3DRM3, 0x4516ec83, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3); +WIN_TYPES(IDirect3DRM, DIRECT3DRM); +WIN_TYPES(IDirect3DRM2, DIRECT3DRM2); +WIN_TYPES(IDirect3DRM3, DIRECT3DRM3); + +/* + * Direct3DRM Object Class (for CoCreateInstance()) + */ +DEFINE_GUID(CLSID_CDirect3DRM, 0x4516ec41, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3); + + +/* Create a Direct3DRM API */ +STDAPI Direct3DRMCreate(LPDIRECT3DRM FAR *lplpDirect3DRM); + +#undef INTERFACE +#define INTERFACE IDirect3DRM + +DECLARE_INTERFACE_(IDirect3DRM, IUnknown) +{ + IUNKNOWN_METHODS(PURE); + + STDMETHOD(CreateObject) + (THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE; + STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME *) PURE; + STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE; + STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER *) PURE; + STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE *) PURE; + STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION *) PURE; + STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE; + STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE *) PURE; + STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE; + STDMETHOD(CreateLightRGB) + (THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE; + STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE; + STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE *) PURE; + + /* Create a Windows Device using DirectDraw surfaces */ + STDMETHOD(CreateDeviceFromSurface) + ( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD, + LPDIRECTDRAWSURFACE lpDDSBack, LPDIRECT3DRMDEVICE * + ) PURE; + + /* Create a Windows Device using D3D objects */ + STDMETHOD(CreateDeviceFromD3D) + ( THIS_ LPDIRECT3D lpD3D, LPDIRECT3DDEVICE lpD3DDev, + LPDIRECT3DRMDEVICE * + ) PURE; + + STDMETHOD(CreateDeviceFromClipper) + ( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID, + int width, int height, LPDIRECT3DRMDEVICE *) PURE; + + STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE *) PURE; + + STDMETHOD(CreateShadow) + ( THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT, + D3DVALUE px, D3DVALUE py, D3DVALUE pz, + D3DVALUE nx, D3DVALUE ny, D3DVALUE nz, + LPDIRECT3DRMVISUAL * + ) PURE; + STDMETHOD(CreateViewport) + ( THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD, + DWORD, DWORD, LPDIRECT3DRMVIEWPORT * + ) PURE; + STDMETHOD(CreateWrap) + ( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME, + D3DVALUE ox, D3DVALUE oy, D3DVALUE oz, + D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, + D3DVALUE ux, D3DVALUE uy, D3DVALUE uz, + D3DVALUE ou, D3DVALUE ov, + D3DVALUE su, D3DVALUE sv, + LPDIRECT3DRMWRAP * + ) PURE; + STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE; + STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE *) PURE; + STDMETHOD(LoadTextureFromResource) (THIS_ HRSRC rs, LPDIRECT3DRMTEXTURE *) PURE; + + STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE; + STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE; + STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return) PURE; + STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE; + STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE; + + STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE; + STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE; + + STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE; + + STDMETHOD(Load) + ( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS, + D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURECALLBACK, LPVOID, + LPDIRECT3DRMFRAME + ) PURE; + STDMETHOD(Tick) (THIS_ D3DVALUE) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRM2 + +DECLARE_INTERFACE_(IDirect3DRM2, IUnknown) +{ + IUNKNOWN_METHODS(PURE); + + STDMETHOD(CreateObject) + (THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE; + STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME, LPDIRECT3DRMFRAME2 *) PURE; + STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE; + STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER2 *) PURE; + STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE *) PURE; + STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION *) PURE; + STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET *) PURE; + STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE2 *) PURE; + STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE; + STDMETHOD(CreateLightRGB) + (THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE; + STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL *) PURE; + STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE2 *) PURE; + + /* Create a Windows Device using DirectDraw surfaces */ + STDMETHOD(CreateDeviceFromSurface) + ( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD, + LPDIRECTDRAWSURFACE lpDDSBack, LPDIRECT3DRMDEVICE2 * + ) PURE; + + /* Create a Windows Device using D3D objects */ + STDMETHOD(CreateDeviceFromD3D) + ( THIS_ LPDIRECT3D2 lpD3D, LPDIRECT3DDEVICE2 lpD3DDev, + LPDIRECT3DRMDEVICE2 * + ) PURE; + + STDMETHOD(CreateDeviceFromClipper) + ( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID, + int width, int height, LPDIRECT3DRMDEVICE2 *) PURE; + + STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE2 *) PURE; + + STDMETHOD(CreateShadow) + ( THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMLIGHT, + D3DVALUE px, D3DVALUE py, D3DVALUE pz, + D3DVALUE nx, D3DVALUE ny, D3DVALUE nz, + LPDIRECT3DRMVISUAL * + ) PURE; + STDMETHOD(CreateViewport) + ( THIS_ LPDIRECT3DRMDEVICE, LPDIRECT3DRMFRAME, DWORD, DWORD, + DWORD, DWORD, LPDIRECT3DRMVIEWPORT * + ) PURE; + STDMETHOD(CreateWrap) + ( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME, + D3DVALUE ox, D3DVALUE oy, D3DVALUE oz, + D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, + D3DVALUE ux, D3DVALUE uy, D3DVALUE uz, + D3DVALUE ou, D3DVALUE ov, + D3DVALUE su, D3DVALUE sv, + LPDIRECT3DRMWRAP * + ) PURE; + STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE; + STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE2 *) PURE; + STDMETHOD(LoadTextureFromResource) (THIS_ HMODULE hModule, LPCTSTR strName, LPCTSTR strType, LPDIRECT3DRMTEXTURE2 *) PURE; + + STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE; + STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE; + STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return) PURE; + STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE; + STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE; + + STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE; + STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE; + + STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE; + + STDMETHOD(Load) + ( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS, + D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURECALLBACK, LPVOID, + LPDIRECT3DRMFRAME + ) PURE; + STDMETHOD(Tick) (THIS_ D3DVALUE) PURE; + + STDMETHOD(CreateProgressiveMesh)(THIS_ LPDIRECT3DRMPROGRESSIVEMESH *) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRM3 + +DECLARE_INTERFACE_(IDirect3DRM3, IUnknown) +{ + IUNKNOWN_METHODS(PURE); + + STDMETHOD(CreateObject) + (THIS_ REFCLSID rclsid, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID FAR* ppv) PURE; + STDMETHOD(CreateFrame) (THIS_ LPDIRECT3DRMFRAME3, LPDIRECT3DRMFRAME3 *) PURE; + STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *) PURE; + STDMETHOD(CreateMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER3 *) PURE; + STDMETHOD(CreateFace) (THIS_ LPDIRECT3DRMFACE2 *) PURE; + STDMETHOD(CreateAnimation) (THIS_ LPDIRECT3DRMANIMATION2 *) PURE; + STDMETHOD(CreateAnimationSet)(THIS_ LPDIRECT3DRMANIMATIONSET2 *) PURE; + STDMETHOD(CreateTexture) (THIS_ LPD3DRMIMAGE, LPDIRECT3DRMTEXTURE3 *) PURE; + STDMETHOD(CreateLight) (THIS_ D3DRMLIGHTTYPE, D3DCOLOR, LPDIRECT3DRMLIGHT *) PURE; + STDMETHOD(CreateLightRGB) + (THIS_ D3DRMLIGHTTYPE, D3DVALUE, D3DVALUE, D3DVALUE, LPDIRECT3DRMLIGHT *) PURE; + STDMETHOD(CreateMaterial) (THIS_ D3DVALUE, LPDIRECT3DRMMATERIAL2 *) PURE; + STDMETHOD(CreateDevice) (THIS_ DWORD, DWORD, LPDIRECT3DRMDEVICE3 *) PURE; + + /* Create a Windows Device using DirectDraw surfaces */ + STDMETHOD(CreateDeviceFromSurface) + ( THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD, + LPDIRECTDRAWSURFACE lpDDSBack, DWORD dwFlags, LPDIRECT3DRMDEVICE3 * + ) PURE; + + /* Create a Windows Device using D3D objects */ + STDMETHOD(CreateDeviceFromD3D) + ( THIS_ LPDIRECT3D2 lpD3D, LPDIRECT3DDEVICE2 lpD3DDev, + LPDIRECT3DRMDEVICE3 * + ) PURE; + + STDMETHOD(CreateDeviceFromClipper) + ( THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID, + int width, int height, LPDIRECT3DRMDEVICE3 *) PURE; + + STDMETHOD(CreateTextureFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS, LPDIRECT3DRMTEXTURE3 *) PURE; + + STDMETHOD(CreateShadow) + ( THIS_ LPUNKNOWN, LPDIRECT3DRMLIGHT, + D3DVALUE px, D3DVALUE py, D3DVALUE pz, + D3DVALUE nx, D3DVALUE ny, D3DVALUE nz, + LPDIRECT3DRMSHADOW2 * + ) PURE; + STDMETHOD(CreateViewport) + ( THIS_ LPDIRECT3DRMDEVICE3, LPDIRECT3DRMFRAME3, DWORD, DWORD, + DWORD, DWORD, LPDIRECT3DRMVIEWPORT2 * + ) PURE; + STDMETHOD(CreateWrap) + ( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME3, + D3DVALUE ox, D3DVALUE oy, D3DVALUE oz, + D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, + D3DVALUE ux, D3DVALUE uy, D3DVALUE uz, + D3DVALUE ou, D3DVALUE ov, + D3DVALUE su, D3DVALUE sv, + LPDIRECT3DRMWRAP * + ) PURE; + STDMETHOD(CreateUserVisual) (THIS_ D3DRMUSERVISUALCALLBACK, LPVOID lPArg, LPDIRECT3DRMUSERVISUAL *) PURE; + STDMETHOD(LoadTexture) (THIS_ const char *, LPDIRECT3DRMTEXTURE3 *) PURE; + STDMETHOD(LoadTextureFromResource) (THIS_ HMODULE hModule, LPCTSTR strName, LPCTSTR strType, LPDIRECT3DRMTEXTURE3 *) PURE; + + STDMETHOD(SetSearchPath) (THIS_ LPCSTR) PURE; + STDMETHOD(AddSearchPath) (THIS_ LPCSTR) PURE; + STDMETHOD(GetSearchPath) (THIS_ DWORD *size_return, LPSTR path_return) PURE; + STDMETHOD(SetDefaultTextureColors)(THIS_ DWORD) PURE; + STDMETHOD(SetDefaultTextureShades)(THIS_ DWORD) PURE; + + STDMETHOD(GetDevices) (THIS_ LPDIRECT3DRMDEVICEARRAY *) PURE; + STDMETHOD(GetNamedObject) (THIS_ const char *, LPDIRECT3DRMOBJECT *) PURE; + + STDMETHOD(EnumerateObjects) (THIS_ D3DRMOBJECTCALLBACK, LPVOID) PURE; + + STDMETHOD(Load) + ( THIS_ LPVOID, LPVOID, LPIID *, DWORD, D3DRMLOADOPTIONS, + D3DRMLOADCALLBACK, LPVOID, D3DRMLOADTEXTURE3CALLBACK, LPVOID, + LPDIRECT3DRMFRAME3 + ) PURE; + STDMETHOD(Tick) (THIS_ D3DVALUE) PURE; + + STDMETHOD(CreateProgressiveMesh)(THIS_ LPDIRECT3DRMPROGRESSIVEMESH *) PURE; + + /* Used with IDirect3DRMObject2 */ + STDMETHOD(RegisterClient) (THIS_ REFGUID rguid, LPDWORD lpdwID) PURE; + STDMETHOD(UnregisterClient) (THIS_ REFGUID rguid) PURE; + + STDMETHOD(CreateClippedVisual) (THIS_ LPDIRECT3DRMVISUAL, LPDIRECT3DRMCLIPPEDVISUAL *) PURE; + STDMETHOD(SetOptions) (THIS_ DWORD); + STDMETHOD(GetOptions) (THIS_ LPDWORD); +}; + +#define D3DRM_OK DD_OK +#define D3DRMERR_BADOBJECT MAKE_DDHRESULT(781) +#define D3DRMERR_BADTYPE MAKE_DDHRESULT(782) +#define D3DRMERR_BADALLOC MAKE_DDHRESULT(783) +#define D3DRMERR_FACEUSED MAKE_DDHRESULT(784) +#define D3DRMERR_NOTFOUND MAKE_DDHRESULT(785) +#define D3DRMERR_NOTDONEYET MAKE_DDHRESULT(786) +#define D3DRMERR_FILENOTFOUND MAKE_DDHRESULT(787) +#define D3DRMERR_BADFILE MAKE_DDHRESULT(788) +#define D3DRMERR_BADDEVICE MAKE_DDHRESULT(789) +#define D3DRMERR_BADVALUE MAKE_DDHRESULT(790) +#define D3DRMERR_BADMAJORVERSION MAKE_DDHRESULT(791) +#define D3DRMERR_BADMINORVERSION MAKE_DDHRESULT(792) +#define D3DRMERR_UNABLETOEXECUTE MAKE_DDHRESULT(793) +#define D3DRMERR_LIBRARYNOTFOUND MAKE_DDHRESULT(794) +#define D3DRMERR_INVALIDLIBRARY MAKE_DDHRESULT(795) +#define D3DRMERR_PENDING MAKE_DDHRESULT(796) +#define D3DRMERR_NOTENOUGHDATA MAKE_DDHRESULT(797) +#define D3DRMERR_REQUESTTOOLARGE MAKE_DDHRESULT(798) +#define D3DRMERR_REQUESTTOOSMALL MAKE_DDHRESULT(799) +#define D3DRMERR_CONNECTIONLOST MAKE_DDHRESULT(800) +#define D3DRMERR_LOADABORTED MAKE_DDHRESULT(801) +#define D3DRMERR_NOINTERNET MAKE_DDHRESULT(802) +#define D3DRMERR_BADCACHEFILE MAKE_DDHRESULT(803) +#define D3DRMERR_BOXNOTSET MAKE_DDHRESULT(804) +#define D3DRMERR_BADPMDATA MAKE_DDHRESULT(805) +#define D3DRMERR_CLIENTNOTREGISTERED MAKE_DDHRESULT(806) +#define D3DRMERR_NOTCREATEDFROMDDS MAKE_DDHRESULT(807) +#define D3DRMERR_NOSUCHKEY MAKE_DDHRESULT(808) +#define D3DRMERR_INCOMPATABLEKEY MAKE_DDHRESULT(809) +#define D3DRMERR_ELEMENTINUSE MAKE_DDHRESULT(810) +#define D3DRMERR_TEXTUREFORMATNOTFOUND MAKE_DDHRESULT(811) +#define D3DRMERR_NOTAGGREGATED MAKE_DDHRESULT(812) + +#ifdef __cplusplus +}; +#endif + +#endif /* _D3DRMAPI_H_ */ + + diff --git a/windows_libs/mssdk/include/d3drmdef.h b/windows_libs/mssdk/include/d3drmdef.h new file mode 100644 index 00000000..f3d7048d --- /dev/null +++ b/windows_libs/mssdk/include/d3drmdef.h @@ -0,0 +1,695 @@ +/*==========================================================================; + * + * Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved. + * + * File: d3drm.h + * Content: Direct3DRM include file + * + ***************************************************************************/ + +#ifndef __D3DRMDEFS_H__ +#define __D3DRMDEFS_H__ + +#include +#include "d3dtypes.h" + +#ifdef WIN32 +#define D3DRMAPI __stdcall +#else +#define D3DRMAPI +#endif + +#if defined(__cplusplus) +extern "C" { +#endif + +#ifndef TRUE +#define FALSE 0 +#define TRUE 1 +#endif + +typedef struct _D3DRMVECTOR4D +{ D3DVALUE x, y, z, w; +} D3DRMVECTOR4D, *LPD3DRMVECTOR4D; + +typedef D3DVALUE D3DRMMATRIX4D[4][4]; + +typedef struct _D3DRMQUATERNION +{ D3DVALUE s; + D3DVECTOR v; +} D3DRMQUATERNION, *LPD3DRMQUATERNION; + +typedef struct _D3DRMRAY +{ D3DVECTOR dvDir; + D3DVECTOR dvPos; +} D3DRMRAY, *LPD3DRMRAY; + +typedef struct _D3DRMBOX +{ D3DVECTOR min, max; +} D3DRMBOX, *LPD3DRMBOX; + +typedef void (*D3DRMWRAPCALLBACK) + (LPD3DVECTOR, int* u, int* v, LPD3DVECTOR a, LPD3DVECTOR b, LPVOID); + +typedef enum _D3DRMLIGHTTYPE +{ D3DRMLIGHT_AMBIENT, + D3DRMLIGHT_POINT, + D3DRMLIGHT_SPOT, + D3DRMLIGHT_DIRECTIONAL, + D3DRMLIGHT_PARALLELPOINT +} D3DRMLIGHTTYPE, *LPD3DRMLIGHTTYPE; + +typedef enum _D3DRMSHADEMODE { + D3DRMSHADE_FLAT = 0, + D3DRMSHADE_GOURAUD = 1, + D3DRMSHADE_PHONG = 2, + + D3DRMSHADE_MASK = 7, + D3DRMSHADE_MAX = 8 +} D3DRMSHADEMODE, *LPD3DRMSHADEMODE; + +typedef enum _D3DRMLIGHTMODE { + D3DRMLIGHT_OFF = 0 * D3DRMSHADE_MAX, + D3DRMLIGHT_ON = 1 * D3DRMSHADE_MAX, + + D3DRMLIGHT_MASK = 7 * D3DRMSHADE_MAX, + D3DRMLIGHT_MAX = 8 * D3DRMSHADE_MAX +} D3DRMLIGHTMODE, *LPD3DRMLIGHTMODE; + +typedef enum _D3DRMFILLMODE { + D3DRMFILL_POINTS = 0 * D3DRMLIGHT_MAX, + D3DRMFILL_WIREFRAME = 1 * D3DRMLIGHT_MAX, + D3DRMFILL_SOLID = 2 * D3DRMLIGHT_MAX, + + D3DRMFILL_MASK = 7 * D3DRMLIGHT_MAX, + D3DRMFILL_MAX = 8 * D3DRMLIGHT_MAX +} D3DRMFILLMODE, *LPD3DRMFILLMODE; + +typedef DWORD D3DRMRENDERQUALITY, *LPD3DRMRENDERQUALITY; + +#define D3DRMRENDER_WIREFRAME (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_WIREFRAME) +#define D3DRMRENDER_UNLITFLAT (D3DRMSHADE_FLAT+D3DRMLIGHT_OFF+D3DRMFILL_SOLID) +#define D3DRMRENDER_FLAT (D3DRMSHADE_FLAT+D3DRMLIGHT_ON+D3DRMFILL_SOLID) +#define D3DRMRENDER_GOURAUD (D3DRMSHADE_GOURAUD+D3DRMLIGHT_ON+D3DRMFILL_SOLID) +#define D3DRMRENDER_PHONG (D3DRMSHADE_PHONG+D3DRMLIGHT_ON+D3DRMFILL_SOLID) + +#define D3DRMRENDERMODE_BLENDEDTRANSPARENCY 1 +#define D3DRMRENDERMODE_SORTEDTRANSPARENCY 2 +#define D3DRMRENDERMODE_LIGHTINMODELSPACE 8 +#define D3DRMRENDERMODE_VIEWDEPENDENTSPECULAR 16 +#define D3DRMRENDERMODE_DISABLESORTEDALPHAZWRITE 32 + +typedef enum _D3DRMTEXTUREQUALITY +{ D3DRMTEXTURE_NEAREST, /* choose nearest texel */ + D3DRMTEXTURE_LINEAR, /* interpolate 4 texels */ + D3DRMTEXTURE_MIPNEAREST, /* nearest texel in nearest mipmap */ + D3DRMTEXTURE_MIPLINEAR, /* interpolate 2 texels from 2 mipmaps */ + D3DRMTEXTURE_LINEARMIPNEAREST, /* interpolate 4 texels in nearest mipmap */ + D3DRMTEXTURE_LINEARMIPLINEAR /* interpolate 8 texels from 2 mipmaps */ +} D3DRMTEXTUREQUALITY, *LPD3DRMTEXTUREQUALITY; + +/* + * Texture flags + */ +#define D3DRMTEXTURE_FORCERESIDENT 0x00000001 /* texture should be kept in video memory */ +#define D3DRMTEXTURE_STATIC 0x00000002 /* texture will not change */ +#define D3DRMTEXTURE_DOWNSAMPLEPOINT 0x00000004 /* point filtering should be used when downsampling */ +#define D3DRMTEXTURE_DOWNSAMPLEBILINEAR 0x00000008 /* bilinear filtering should be used when downsampling */ +#define D3DRMTEXTURE_DOWNSAMPLEREDUCEDEPTH 0x00000010 /* reduce bit depth when downsampling */ +#define D3DRMTEXTURE_DOWNSAMPLENONE 0x00000020 /* texture should never be downsampled */ +#define D3DRMTEXTURE_CHANGEDPIXELS 0x00000040 /* pixels have changed */ +#define D3DRMTEXTURE_CHANGEDPALETTE 0x00000080 /* palette has changed */ +#define D3DRMTEXTURE_INVALIDATEONLY 0x00000100 /* dirty regions are invalid */ + +/* + * Shadow flags + */ +#define D3DRMSHADOW_TRUEALPHA 0x00000001 /* shadow should render without artifacts when true alpha is on */ + +typedef enum _D3DRMCOMBINETYPE +{ D3DRMCOMBINE_REPLACE, + D3DRMCOMBINE_BEFORE, + D3DRMCOMBINE_AFTER +} D3DRMCOMBINETYPE, *LPD3DRMCOMBINETYPE; + +typedef D3DCOLORMODEL D3DRMCOLORMODEL, *LPD3DRMCOLORMODEL; + +typedef enum _D3DRMPALETTEFLAGS +{ D3DRMPALETTE_FREE, /* renderer may use this entry freely */ + D3DRMPALETTE_READONLY, /* fixed but may be used by renderer */ + D3DRMPALETTE_RESERVED /* may not be used by renderer */ +} D3DRMPALETTEFLAGS, *LPD3DRMPALETTEFLAGS; + +typedef struct _D3DRMPALETTEENTRY +{ unsigned char red; /* 0 .. 255 */ + unsigned char green; /* 0 .. 255 */ + unsigned char blue; /* 0 .. 255 */ + unsigned char flags; /* one of D3DRMPALETTEFLAGS */ +} D3DRMPALETTEENTRY, *LPD3DRMPALETTEENTRY; + +typedef struct _D3DRMIMAGE +{ int width, height; /* width and height in pixels */ + int aspectx, aspecty; /* aspect ratio for non-square pixels */ + int depth; /* bits per pixel */ + int rgb; /* if false, pixels are indices into a + palette otherwise, pixels encode + RGB values. */ + int bytes_per_line; /* number of bytes of memory for a + scanline. This must be a multiple + of 4. */ + void* buffer1; /* memory to render into (first buffer). */ + void* buffer2; /* second rendering buffer for double + buffering, set to NULL for single + buffering. */ + unsigned long red_mask; + unsigned long green_mask; + unsigned long blue_mask; + unsigned long alpha_mask; /* if rgb is true, these are masks for + the red, green and blue parts of a + pixel. Otherwise, these are masks + for the significant bits of the + red, green and blue elements in the + palette. For instance, most SVGA + displays use 64 intensities of red, + green and blue, so the masks should + all be set to 0xfc. */ + int palette_size; /* number of entries in palette */ + D3DRMPALETTEENTRY* palette; /* description of the palette (only if + rgb is false). Must be (1< /* Use Windows header files */ +#define VIRTUAL +#include "d3drmdef.h" + +#include "d3d.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * The methods for IUnknown + */ +#define IUNKNOWN_METHODS(kind) \ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) kind; \ + STDMETHOD_(ULONG, AddRef) (THIS) kind; \ + STDMETHOD_(ULONG, Release) (THIS) kind + +/* + * The methods for IDirect3DRMObject + */ +#define IDIRECT3DRMOBJECT_METHODS(kind) \ + STDMETHOD(Clone) (THIS_ LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj) kind; \ + STDMETHOD(AddDestroyCallback) (THIS_ D3DRMOBJECTCALLBACK, LPVOID argument) kind; \ + STDMETHOD(DeleteDestroyCallback) (THIS_ D3DRMOBJECTCALLBACK, LPVOID argument) kind; \ + STDMETHOD(SetAppData) (THIS_ DWORD data) kind; \ + STDMETHOD_(DWORD, GetAppData) (THIS) kind; \ + STDMETHOD(SetName) (THIS_ LPCSTR) kind; \ + STDMETHOD(GetName) (THIS_ LPDWORD lpdwSize, LPSTR lpName) kind; \ + STDMETHOD(GetClassName) (THIS_ LPDWORD lpdwSize, LPSTR lpName) kind + + +#define WIN_TYPES(itype, ptype) \ + typedef interface itype FAR *LP##ptype, FAR **LPLP##ptype + +WIN_TYPES(IDirect3DRMObject, DIRECT3DRMOBJECT); +WIN_TYPES(IDirect3DRMObject2, DIRECT3DRMOBJECT2); +WIN_TYPES(IDirect3DRMDevice, DIRECT3DRMDEVICE); +WIN_TYPES(IDirect3DRMDevice2, DIRECT3DRMDEVICE2); +WIN_TYPES(IDirect3DRMDevice3, DIRECT3DRMDEVICE3); +WIN_TYPES(IDirect3DRMViewport, DIRECT3DRMVIEWPORT); +WIN_TYPES(IDirect3DRMViewport2, DIRECT3DRMVIEWPORT2); +WIN_TYPES(IDirect3DRMFrame, DIRECT3DRMFRAME); +WIN_TYPES(IDirect3DRMFrame2, DIRECT3DRMFRAME2); +WIN_TYPES(IDirect3DRMFrame3, DIRECT3DRMFRAME3); +WIN_TYPES(IDirect3DRMVisual, DIRECT3DRMVISUAL); +WIN_TYPES(IDirect3DRMMesh, DIRECT3DRMMESH); +WIN_TYPES(IDirect3DRMMeshBuilder, DIRECT3DRMMESHBUILDER); +WIN_TYPES(IDirect3DRMMeshBuilder2, DIRECT3DRMMESHBUILDER2); +WIN_TYPES(IDirect3DRMMeshBuilder3, DIRECT3DRMMESHBUILDER3); +WIN_TYPES(IDirect3DRMFace, DIRECT3DRMFACE); +WIN_TYPES(IDirect3DRMFace2, DIRECT3DRMFACE2); +WIN_TYPES(IDirect3DRMLight, DIRECT3DRMLIGHT); +WIN_TYPES(IDirect3DRMTexture, DIRECT3DRMTEXTURE); +WIN_TYPES(IDirect3DRMTexture2, DIRECT3DRMTEXTURE2); +WIN_TYPES(IDirect3DRMTexture3, DIRECT3DRMTEXTURE3); +WIN_TYPES(IDirect3DRMWrap, DIRECT3DRMWRAP); +WIN_TYPES(IDirect3DRMMaterial, DIRECT3DRMMATERIAL); +WIN_TYPES(IDirect3DRMMaterial2, DIRECT3DRMMATERIAL2); +WIN_TYPES(IDirect3DRMInterpolator, DIRECT3DRMINTERPOLATOR); +WIN_TYPES(IDirect3DRMAnimation, DIRECT3DRMANIMATION); +WIN_TYPES(IDirect3DRMAnimation2, DIRECT3DRMANIMATION2); +WIN_TYPES(IDirect3DRMAnimationSet, DIRECT3DRMANIMATIONSET); +WIN_TYPES(IDirect3DRMAnimationSet2, DIRECT3DRMANIMATIONSET2); +WIN_TYPES(IDirect3DRMUserVisual, DIRECT3DRMUSERVISUAL); +WIN_TYPES(IDirect3DRMShadow, DIRECT3DRMSHADOW); +WIN_TYPES(IDirect3DRMShadow2, DIRECT3DRMSHADOW2); +WIN_TYPES(IDirect3DRMArray, DIRECT3DRMARRAY); +WIN_TYPES(IDirect3DRMObjectArray, DIRECT3DRMOBJECTARRAY); +WIN_TYPES(IDirect3DRMDeviceArray, DIRECT3DRMDEVICEARRAY); +WIN_TYPES(IDirect3DRMFaceArray, DIRECT3DRMFACEARRAY); +WIN_TYPES(IDirect3DRMViewportArray, DIRECT3DRMVIEWPORTARRAY); +WIN_TYPES(IDirect3DRMFrameArray, DIRECT3DRMFRAMEARRAY); +WIN_TYPES(IDirect3DRMAnimationArray, DIRECT3DRMANIMATIONARRAY); +WIN_TYPES(IDirect3DRMVisualArray, DIRECT3DRMVISUALARRAY); +WIN_TYPES(IDirect3DRMPickedArray, DIRECT3DRMPICKEDARRAY); +WIN_TYPES(IDirect3DRMPicked2Array, DIRECT3DRMPICKED2ARRAY); +WIN_TYPES(IDirect3DRMLightArray, DIRECT3DRMLIGHTARRAY); +WIN_TYPES(IDirect3DRMProgressiveMesh, DIRECT3DRMPROGRESSIVEMESH); +WIN_TYPES(IDirect3DRMClippedVisual, DIRECT3DRMCLIPPEDVISUAL); + +/* + * Direct3DRM Object classes + */ +DEFINE_GUID(CLSID_CDirect3DRMDevice, 0x4fa3568e, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(CLSID_CDirect3DRMViewport, 0x4fa3568f, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(CLSID_CDirect3DRMFrame, 0x4fa35690, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(CLSID_CDirect3DRMMesh, 0x4fa35691, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(CLSID_CDirect3DRMMeshBuilder, 0x4fa35692, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(CLSID_CDirect3DRMFace, 0x4fa35693, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(CLSID_CDirect3DRMLight, 0x4fa35694, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(CLSID_CDirect3DRMTexture, 0x4fa35695, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(CLSID_CDirect3DRMWrap, 0x4fa35696, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(CLSID_CDirect3DRMMaterial, 0x4fa35697, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(CLSID_CDirect3DRMAnimation, 0x4fa35698, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(CLSID_CDirect3DRMAnimationSet, 0x4fa35699, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(CLSID_CDirect3DRMUserVisual, 0x4fa3569a, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(CLSID_CDirect3DRMShadow, 0x4fa3569b, 0x623f, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(CLSID_CDirect3DRMViewportInterpolator, +0xde9eaa1, 0x3b84, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(CLSID_CDirect3DRMFrameInterpolator, +0xde9eaa2, 0x3b84, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(CLSID_CDirect3DRMMeshInterpolator, +0xde9eaa3, 0x3b84, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(CLSID_CDirect3DRMLightInterpolator, +0xde9eaa6, 0x3b84, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(CLSID_CDirect3DRMMaterialInterpolator, +0xde9eaa7, 0x3b84, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(CLSID_CDirect3DRMTextureInterpolator, +0xde9eaa8, 0x3b84, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(CLSID_CDirect3DRMProgressiveMesh, 0x4516ec40, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(CLSID_CDirect3DRMClippedVisual, 0x5434e72d, 0x6d66, 0x11d1, 0xbb, 0xb, 0x0, 0x0, 0xf8, 0x75, 0x86, 0x5a); + + +/* + * Direct3DRM Object interfaces + */ +DEFINE_GUID(IID_IDirect3DRMObject, 0xeb16cb00, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMObject2, 0x4516ec7c, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(IID_IDirect3DRMDevice, 0xe9e19280, 0x6e05, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMDevice2, 0x4516ec78, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(IID_IDirect3DRMDevice3, 0x549f498b, 0xbfeb, 0x11d1, 0x8e, 0xd8, 0x0, 0xa0, 0xc9, 0x67, 0xa4, 0x82); +DEFINE_GUID(IID_IDirect3DRMViewport, 0xeb16cb02, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMViewport2, 0x4a1b1be6, 0xbfed, 0x11d1, 0x8e, 0xd8, 0x0, 0xa0, 0xc9, 0x67, 0xa4, 0x82); +DEFINE_GUID(IID_IDirect3DRMFrame, 0xeb16cb03, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMFrame2, 0xc3dfbd60, 0x3988, 0x11d0, 0x9e, 0xc2, 0x0, 0x0, 0xc0, 0x29, 0x1a, 0xc3); +DEFINE_GUID(IID_IDirect3DRMFrame3, 0xff6b7f70, 0xa40e, 0x11d1, 0x91, 0xf9, 0x0, 0x0, 0xf8, 0x75, 0x8e, 0x66); +DEFINE_GUID(IID_IDirect3DRMVisual, 0xeb16cb04, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMMesh, 0xa3a80d01, 0x6e12, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMMeshBuilder, 0xa3a80d02, 0x6e12, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMMeshBuilder2, 0x4516ec77, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(IID_IDirect3DRMMeshBuilder3, 0x4516ec82, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(IID_IDirect3DRMFace, 0xeb16cb07, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMFace2, 0x4516ec81, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(IID_IDirect3DRMLight, 0xeb16cb08, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMTexture, 0xeb16cb09, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMTexture2, 0x120f30c0, 0x1629, 0x11d0, 0x94, 0x1c, 0x0, 0x80, 0xc8, 0xc, 0xfa, 0x7b); +DEFINE_GUID(IID_IDirect3DRMTexture3, 0xff6b7f73, 0xa40e, 0x11d1, 0x91, 0xf9, 0x0, 0x0, 0xf8, 0x75, 0x8e, 0x66); +DEFINE_GUID(IID_IDirect3DRMWrap, 0xeb16cb0a, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMMaterial, 0xeb16cb0b, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMMaterial2, 0xff6b7f75, 0xa40e, 0x11d1, 0x91, 0xf9, 0x0, 0x0, 0xf8, 0x75, 0x8e, 0x66); +DEFINE_GUID(IID_IDirect3DRMAnimation, 0xeb16cb0d, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMAnimation2, 0xff6b7f77, 0xa40e, 0x11d1, 0x91, 0xf9, 0x0, 0x0, 0xf8, 0x75, 0x8e, 0x66); +DEFINE_GUID(IID_IDirect3DRMAnimationSet, 0xeb16cb0e, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMAnimationSet2, 0xff6b7f79, 0xa40e, 0x11d1, 0x91, 0xf9, 0x0, 0x0, 0xf8, 0x75, 0x8e, 0x66); +DEFINE_GUID(IID_IDirect3DRMObjectArray, 0x242f6bc2, 0x3849, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(IID_IDirect3DRMDeviceArray, 0xeb16cb10, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMViewportArray, 0xeb16cb11, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMFrameArray, 0xeb16cb12, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMVisualArray, 0xeb16cb13, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMLightArray, 0xeb16cb14, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMPickedArray, 0xeb16cb16, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMFaceArray, 0xeb16cb17, 0xd271, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMAnimationArray, +0xd5f1cae0, 0x4bd7, 0x11d1, 0xb9, 0x74, 0x0, 0x60, 0x8, 0x3e, 0x45, 0xf3); +DEFINE_GUID(IID_IDirect3DRMUserVisual, 0x59163de0, 0x6d43, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMShadow, 0xaf359780, 0x6ba3, 0x11cf, 0xac, 0x4a, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); +DEFINE_GUID(IID_IDirect3DRMShadow2, 0x86b44e25, 0x9c82, 0x11d1, 0xbb, 0xb, 0x0, 0xa0, 0xc9, 0x81, 0xa0, 0xa6); +DEFINE_GUID(IID_IDirect3DRMInterpolator, 0x242f6bc1, 0x3849, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(IID_IDirect3DRMProgressiveMesh, 0x4516ec79, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(IID_IDirect3DRMPicked2Array, 0x4516ec7b, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x0, 0x0, 0xc0, 0x78, 0x1b, 0xc3); +DEFINE_GUID(IID_IDirect3DRMClippedVisual, 0x5434e733, 0x6d66, 0x11d1, 0xbb, 0xb, 0x0, 0x0, 0xf8, 0x75, 0x86, 0x5a); + +typedef void (__cdecl *D3DRMOBJECTCALLBACK)(LPDIRECT3DRMOBJECT obj, LPVOID arg); +typedef void (__cdecl *D3DRMFRAMEMOVECALLBACK)(LPDIRECT3DRMFRAME obj, LPVOID arg, D3DVALUE delta); +typedef void (__cdecl *D3DRMFRAME3MOVECALLBACK)(LPDIRECT3DRMFRAME3 obj, LPVOID arg, D3DVALUE delta); +typedef void (__cdecl *D3DRMUPDATECALLBACK)(LPDIRECT3DRMDEVICE obj, LPVOID arg, int, LPD3DRECT); +typedef void (__cdecl *D3DRMDEVICE3UPDATECALLBACK)(LPDIRECT3DRMDEVICE3 obj, LPVOID arg, int, LPD3DRECT); +typedef int (__cdecl *D3DRMUSERVISUALCALLBACK) + ( LPDIRECT3DRMUSERVISUAL obj, LPVOID arg, D3DRMUSERVISUALREASON reason, + LPDIRECT3DRMDEVICE dev, LPDIRECT3DRMVIEWPORT view + ); +typedef HRESULT (__cdecl *D3DRMLOADTEXTURECALLBACK) + (char *tex_name, void *arg, LPDIRECT3DRMTEXTURE *); +typedef HRESULT (__cdecl *D3DRMLOADTEXTURE3CALLBACK) + (char *tex_name, void *arg, LPDIRECT3DRMTEXTURE3 *); +typedef void (__cdecl *D3DRMLOADCALLBACK) + (LPDIRECT3DRMOBJECT object, REFIID objectguid, LPVOID arg); + +typedef HRESULT (__cdecl *D3DRMDOWNSAMPLECALLBACK) + (LPDIRECT3DRMTEXTURE3 lpDirect3DRMTexture, LPVOID pArg, + LPDIRECTDRAWSURFACE pDDSSrc, LPDIRECTDRAWSURFACE pDDSDst); +typedef HRESULT (__cdecl *D3DRMVALIDATIONCALLBACK) + (LPDIRECT3DRMTEXTURE3 lpDirect3DRMTexture, LPVOID pArg, + DWORD dwFlags, DWORD dwcRects, LPRECT pRects); + + +typedef struct _D3DRMPICKDESC +{ + ULONG ulFaceIdx; + LONG lGroupIdx; + D3DVECTOR vPosition; + +} D3DRMPICKDESC, *LPD3DRMPICKDESC; + +typedef struct _D3DRMPICKDESC2 +{ + ULONG ulFaceIdx; + LONG lGroupIdx; + D3DVECTOR dvPosition; + D3DVALUE tu; + D3DVALUE tv; + D3DVECTOR dvNormal; + D3DCOLOR dcColor; + +} D3DRMPICKDESC2, *LPD3DRMPICKDESC2; + +#undef INTERFACE +#define INTERFACE IDirect3DRMObject + +/* + * Base class + */ +DECLARE_INTERFACE_(IDirect3DRMObject, IUnknown) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMObject2 + +DECLARE_INTERFACE_(IDirect3DRMObject2, IUnknown) +{ + IUNKNOWN_METHODS(PURE); + + /* + * IDirect3DRMObject2 methods + */ + STDMETHOD(AddDestroyCallback)(THIS_ D3DRMOBJECTCALLBACK lpFunc, LPVOID pvArg) PURE; + STDMETHOD(Clone)(THIS_ LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj) PURE; \ + STDMETHOD(DeleteDestroyCallback)(THIS_ D3DRMOBJECTCALLBACK lpFunc, LPVOID pvArg) PURE; \ + STDMETHOD(GetClientData)(THIS_ DWORD dwID, LPVOID* lplpvData) PURE; + STDMETHOD(GetDirect3DRM)(THIS_ LPDIRECT3DRM* lplpDirect3DRM) PURE; + STDMETHOD(GetName)(THIS_ LPDWORD lpdwSize, LPSTR lpName) PURE; + STDMETHOD(SetClientData)(THIS_ DWORD dwID, LPVOID lpvData, DWORD dwFlags) PURE; + STDMETHOD(SetName)(THIS_ LPCSTR lpName) PURE; + STDMETHOD(GetAge)(THIS_ DWORD dwFlags, LPDWORD pdwAge) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMVisual + +DECLARE_INTERFACE_(IDirect3DRMVisual, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMDevice + +DECLARE_INTERFACE_(IDirect3DRMDevice, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMDevice methods + */ + STDMETHOD(Init)(THIS_ ULONG width, ULONG height) PURE; + STDMETHOD(InitFromD3D)(THIS_ LPDIRECT3D lpD3D, LPDIRECT3DDEVICE lpD3DDev) PURE; + STDMETHOD(InitFromClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID, int width, int height) PURE; + + STDMETHOD(Update)(THIS) PURE; + STDMETHOD(AddUpdateCallback)(THIS_ D3DRMUPDATECALLBACK, LPVOID arg) PURE; + STDMETHOD(DeleteUpdateCallback)(THIS_ D3DRMUPDATECALLBACK, LPVOID arg) PURE; + STDMETHOD(SetBufferCount)(THIS_ DWORD) PURE; + STDMETHOD_(DWORD, GetBufferCount)(THIS) PURE; + + STDMETHOD(SetDither)(THIS_ BOOL) PURE; + STDMETHOD(SetShades)(THIS_ DWORD) PURE; + STDMETHOD(SetQuality)(THIS_ D3DRMRENDERQUALITY) PURE; + STDMETHOD(SetTextureQuality)(THIS_ D3DRMTEXTUREQUALITY) PURE; + + STDMETHOD(GetViewports)(THIS_ LPDIRECT3DRMVIEWPORTARRAY *return_views) PURE; + + STDMETHOD_(BOOL, GetDither)(THIS) PURE; + STDMETHOD_(DWORD, GetShades)(THIS) PURE; + STDMETHOD_(DWORD, GetHeight)(THIS) PURE; + STDMETHOD_(DWORD, GetWidth)(THIS) PURE; + STDMETHOD_(DWORD, GetTrianglesDrawn)(THIS) PURE; + STDMETHOD_(DWORD, GetWireframeOptions)(THIS) PURE; + STDMETHOD_(D3DRMRENDERQUALITY, GetQuality)(THIS) PURE; + STDMETHOD_(D3DCOLORMODEL, GetColorModel)(THIS) PURE; + STDMETHOD_(D3DRMTEXTUREQUALITY, GetTextureQuality)(THIS) PURE; + STDMETHOD(GetDirect3DDevice)(THIS_ LPDIRECT3DDEVICE *) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMDevice2 + +DECLARE_INTERFACE_(IDirect3DRMDevice2, IDirect3DRMDevice) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMDevice methods + */ + STDMETHOD(Init)(THIS_ ULONG width, ULONG height) PURE; + STDMETHOD(InitFromD3D)(THIS_ LPDIRECT3D lpD3D, LPDIRECT3DDEVICE lpD3DDev) PURE; + STDMETHOD(InitFromClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID, int width, int height) PURE; + + STDMETHOD(Update)(THIS) PURE; + STDMETHOD(AddUpdateCallback)(THIS_ D3DRMUPDATECALLBACK, LPVOID arg) PURE; + STDMETHOD(DeleteUpdateCallback)(THIS_ D3DRMUPDATECALLBACK, LPVOID arg) PURE; + STDMETHOD(SetBufferCount)(THIS_ DWORD) PURE; + STDMETHOD_(DWORD, GetBufferCount)(THIS) PURE; + + STDMETHOD(SetDither)(THIS_ BOOL) PURE; + STDMETHOD(SetShades)(THIS_ DWORD) PURE; + STDMETHOD(SetQuality)(THIS_ D3DRMRENDERQUALITY) PURE; + STDMETHOD(SetTextureQuality)(THIS_ D3DRMTEXTUREQUALITY) PURE; + + STDMETHOD(GetViewports)(THIS_ LPDIRECT3DRMVIEWPORTARRAY *return_views) PURE; + + STDMETHOD_(BOOL, GetDither)(THIS) PURE; + STDMETHOD_(DWORD, GetShades)(THIS) PURE; + STDMETHOD_(DWORD, GetHeight)(THIS) PURE; + STDMETHOD_(DWORD, GetWidth)(THIS) PURE; + STDMETHOD_(DWORD, GetTrianglesDrawn)(THIS) PURE; + STDMETHOD_(DWORD, GetWireframeOptions)(THIS) PURE; + STDMETHOD_(D3DRMRENDERQUALITY, GetQuality)(THIS) PURE; + STDMETHOD_(D3DCOLORMODEL, GetColorModel)(THIS) PURE; + STDMETHOD_(D3DRMTEXTUREQUALITY, GetTextureQuality)(THIS) PURE; + STDMETHOD(GetDirect3DDevice)(THIS_ LPDIRECT3DDEVICE *) PURE; + + /* + * IDirect3DRMDevice2 methods + */ + STDMETHOD(InitFromD3D2)(THIS_ LPDIRECT3D2 lpD3D, LPDIRECT3DDEVICE2 lpD3DDev) PURE; + STDMETHOD(InitFromSurface)(THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD, LPDIRECTDRAWSURFACE lpDDSBack) PURE; + STDMETHOD(SetRenderMode)(THIS_ DWORD dwFlags) PURE; + STDMETHOD_(DWORD, GetRenderMode)(THIS) PURE; + STDMETHOD(GetDirect3DDevice2)(THIS_ LPDIRECT3DDEVICE2 *) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMDevice3 + +DECLARE_INTERFACE_(IDirect3DRMDevice3, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMDevice methods + */ + STDMETHOD(Init)(THIS_ ULONG width, ULONG height) PURE; + STDMETHOD(InitFromD3D)(THIS_ LPDIRECT3D lpD3D, LPDIRECT3DDEVICE lpD3DDev) PURE; + STDMETHOD(InitFromClipper)(THIS_ LPDIRECTDRAWCLIPPER lpDDClipper, LPGUID lpGUID, int width, int height) PURE; + + STDMETHOD(Update)(THIS) PURE; + STDMETHOD(AddUpdateCallback)(THIS_ D3DRMDEVICE3UPDATECALLBACK, LPVOID arg) PURE; + STDMETHOD(DeleteUpdateCallback)(THIS_ D3DRMDEVICE3UPDATECALLBACK, LPVOID arg) PURE; + STDMETHOD(SetBufferCount)(THIS_ DWORD) PURE; + STDMETHOD_(DWORD, GetBufferCount)(THIS) PURE; + + STDMETHOD(SetDither)(THIS_ BOOL) PURE; + STDMETHOD(SetShades)(THIS_ DWORD) PURE; + STDMETHOD(SetQuality)(THIS_ D3DRMRENDERQUALITY) PURE; + STDMETHOD(SetTextureQuality)(THIS_ D3DRMTEXTUREQUALITY) PURE; + + STDMETHOD(GetViewports)(THIS_ LPDIRECT3DRMVIEWPORTARRAY *return_views) PURE; + + STDMETHOD_(BOOL, GetDither)(THIS) PURE; + STDMETHOD_(DWORD, GetShades)(THIS) PURE; + STDMETHOD_(DWORD, GetHeight)(THIS) PURE; + STDMETHOD_(DWORD, GetWidth)(THIS) PURE; + STDMETHOD_(DWORD, GetTrianglesDrawn)(THIS) PURE; + STDMETHOD_(DWORD, GetWireframeOptions)(THIS) PURE; + STDMETHOD_(D3DRMRENDERQUALITY, GetQuality)(THIS) PURE; + STDMETHOD_(D3DCOLORMODEL, GetColorModel)(THIS) PURE; + STDMETHOD_(D3DRMTEXTUREQUALITY, GetTextureQuality)(THIS) PURE; + STDMETHOD(GetDirect3DDevice)(THIS_ LPDIRECT3DDEVICE *) PURE; + + /* + * IDirect3DRMDevice2 methods + */ + STDMETHOD(InitFromD3D2)(THIS_ LPDIRECT3D2 lpD3D, LPDIRECT3DDEVICE2 lpD3DDev) PURE; + STDMETHOD(InitFromSurface)(THIS_ LPGUID lpGUID, LPDIRECTDRAW lpDD, LPDIRECTDRAWSURFACE lpDDSBack, DWORD dwFlags) PURE; + STDMETHOD(SetRenderMode)(THIS_ DWORD dwFlags) PURE; + STDMETHOD_(DWORD, GetRenderMode)(THIS) PURE; + STDMETHOD(GetDirect3DDevice2)(THIS_ LPDIRECT3DDEVICE2 *) PURE; + + /* + * IDirect3DRMDevice3 methods + */ + STDMETHOD(FindPreferredTextureFormat)(THIS_ DWORD dwBitDepths, DWORD dwFlags, LPDDPIXELFORMAT lpDDPF) PURE; + STDMETHOD(RenderStateChange)(THIS_ D3DRENDERSTATETYPE drsType, DWORD dwVal, DWORD dwFlags) PURE; + STDMETHOD(LightStateChange)(THIS_ D3DLIGHTSTATETYPE drsType, DWORD dwVal, DWORD dwFlags) PURE; + STDMETHOD(GetStateChangeOptions)(THIS_ DWORD dwStateClass, DWORD dwStateNum, LPDWORD pdwFlags) PURE; + STDMETHOD(SetStateChangeOptions)(THIS_ DWORD dwStateClass, DWORD dwStateNum, DWORD dwFlags) PURE; +}; + + +#undef INTERFACE +#define INTERFACE IDirect3DRMViewport + +DECLARE_INTERFACE_(IDirect3DRMViewport, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMViewport methods + */ + STDMETHOD(Init) + ( THIS_ LPDIRECT3DRMDEVICE dev, LPDIRECT3DRMFRAME camera, + DWORD xpos, DWORD ypos, DWORD width, DWORD height + ) PURE; + STDMETHOD(Clear)(THIS) PURE; + STDMETHOD(Render)(THIS_ LPDIRECT3DRMFRAME) PURE; + + STDMETHOD(SetFront)(THIS_ D3DVALUE) PURE; + STDMETHOD(SetBack)(THIS_ D3DVALUE) PURE; + STDMETHOD(SetField)(THIS_ D3DVALUE) PURE; + STDMETHOD(SetUniformScaling)(THIS_ BOOL) PURE; + STDMETHOD(SetCamera)(THIS_ LPDIRECT3DRMFRAME) PURE; + STDMETHOD(SetProjection)(THIS_ D3DRMPROJECTIONTYPE) PURE; + STDMETHOD(Transform)(THIS_ D3DRMVECTOR4D *d, D3DVECTOR *s) PURE; + STDMETHOD(InverseTransform)(THIS_ D3DVECTOR *d, D3DRMVECTOR4D *s) PURE; + STDMETHOD(Configure)(THIS_ LONG x, LONG y, DWORD width, DWORD height) PURE; + STDMETHOD(ForceUpdate)(THIS_ DWORD x1, DWORD y1, DWORD x2, DWORD y2) PURE; + STDMETHOD(SetPlane)(THIS_ D3DVALUE left, D3DVALUE right, D3DVALUE bottom, D3DVALUE top) PURE; + + STDMETHOD(GetCamera)(THIS_ LPDIRECT3DRMFRAME *) PURE; + STDMETHOD(GetDevice)(THIS_ LPDIRECT3DRMDEVICE *) PURE; + STDMETHOD(GetPlane)(THIS_ D3DVALUE *left, D3DVALUE *right, D3DVALUE *bottom, D3DVALUE *top) PURE; + STDMETHOD(Pick)(THIS_ LONG x, LONG y, LPDIRECT3DRMPICKEDARRAY *return_visuals) PURE; + + STDMETHOD_(BOOL, GetUniformScaling)(THIS) PURE; + STDMETHOD_(LONG, GetX)(THIS) PURE; + STDMETHOD_(LONG, GetY)(THIS) PURE; + STDMETHOD_(DWORD, GetWidth)(THIS) PURE; + STDMETHOD_(DWORD, GetHeight)(THIS) PURE; + STDMETHOD_(D3DVALUE, GetField)(THIS) PURE; + STDMETHOD_(D3DVALUE, GetBack)(THIS) PURE; + STDMETHOD_(D3DVALUE, GetFront)(THIS) PURE; + STDMETHOD_(D3DRMPROJECTIONTYPE, GetProjection)(THIS) PURE; + STDMETHOD(GetDirect3DViewport)(THIS_ LPDIRECT3DVIEWPORT *) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMViewport2 +DECLARE_INTERFACE_(IDirect3DRMViewport2, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMViewport2 methods + */ + STDMETHOD(Init) + ( THIS_ LPDIRECT3DRMDEVICE3 dev, LPDIRECT3DRMFRAME3 camera, + DWORD xpos, DWORD ypos, DWORD width, DWORD height + ) PURE; + STDMETHOD(Clear)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(Render)(THIS_ LPDIRECT3DRMFRAME3) PURE; + + STDMETHOD(SetFront)(THIS_ D3DVALUE) PURE; + STDMETHOD(SetBack)(THIS_ D3DVALUE) PURE; + STDMETHOD(SetField)(THIS_ D3DVALUE) PURE; + STDMETHOD(SetUniformScaling)(THIS_ BOOL) PURE; + STDMETHOD(SetCamera)(THIS_ LPDIRECT3DRMFRAME3) PURE; + STDMETHOD(SetProjection)(THIS_ D3DRMPROJECTIONTYPE) PURE; + STDMETHOD(Transform)(THIS_ D3DRMVECTOR4D *d, D3DVECTOR *s) PURE; + STDMETHOD(InverseTransform)(THIS_ D3DVECTOR *d, D3DRMVECTOR4D *s) PURE; + STDMETHOD(Configure)(THIS_ LONG x, LONG y, DWORD width, DWORD height) PURE; + STDMETHOD(ForceUpdate)(THIS_ DWORD x1, DWORD y1, DWORD x2, DWORD y2) PURE; + STDMETHOD(SetPlane)(THIS_ D3DVALUE left, D3DVALUE right, D3DVALUE bottom, D3DVALUE top) PURE; + + STDMETHOD(GetCamera)(THIS_ LPDIRECT3DRMFRAME3 *) PURE; + STDMETHOD(GetDevice)(THIS_ LPDIRECT3DRMDEVICE3 *) PURE; + STDMETHOD(GetPlane)(THIS_ D3DVALUE *left, D3DVALUE *right, D3DVALUE *bottom, D3DVALUE *top) PURE; + STDMETHOD(Pick)(THIS_ LONG x, LONG y, LPDIRECT3DRMPICKEDARRAY *return_visuals) PURE; + + STDMETHOD_(BOOL, GetUniformScaling)(THIS) PURE; + STDMETHOD_(LONG, GetX)(THIS) PURE; + STDMETHOD_(LONG, GetY)(THIS) PURE; + STDMETHOD_(DWORD, GetWidth)(THIS) PURE; + STDMETHOD_(DWORD, GetHeight)(THIS) PURE; + STDMETHOD_(D3DVALUE, GetField)(THIS) PURE; + STDMETHOD_(D3DVALUE, GetBack)(THIS) PURE; + STDMETHOD_(D3DVALUE, GetFront)(THIS) PURE; + STDMETHOD_(D3DRMPROJECTIONTYPE, GetProjection)(THIS) PURE; + STDMETHOD(GetDirect3DViewport)(THIS_ LPDIRECT3DVIEWPORT *) PURE; + STDMETHOD(TransformVectors)(THIS_ DWORD dwNumVectors, + LPD3DRMVECTOR4D lpDstVectors, + LPD3DVECTOR lpSrcVectors) PURE; + STDMETHOD(InverseTransformVectors)(THIS_ DWORD dwNumVectors, + LPD3DVECTOR lpDstVectors, + LPD3DRMVECTOR4D lpSrcVectors) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMFrame + +DECLARE_INTERFACE_(IDirect3DRMFrame, IDirect3DRMVisual) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMFrame methods + */ + STDMETHOD(AddChild)(THIS_ LPDIRECT3DRMFRAME child) PURE; + STDMETHOD(AddLight)(THIS_ LPDIRECT3DRMLIGHT) PURE; + STDMETHOD(AddMoveCallback)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg) PURE; + STDMETHOD(AddTransform)(THIS_ D3DRMCOMBINETYPE, D3DRMMATRIX4D) PURE; + STDMETHOD(AddTranslation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(AddScale)(THIS_ D3DRMCOMBINETYPE, D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE; + STDMETHOD(AddRotation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta) PURE; + STDMETHOD(AddVisual)(THIS_ LPDIRECT3DRMVISUAL) PURE; + STDMETHOD(GetChildren)(THIS_ LPDIRECT3DRMFRAMEARRAY *children) PURE; + STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE; + STDMETHOD(GetLights)(THIS_ LPDIRECT3DRMLIGHTARRAY *lights) PURE; + STDMETHOD_(D3DRMMATERIALMODE, GetMaterialMode)(THIS) PURE; + STDMETHOD(GetParent)(THIS_ LPDIRECT3DRMFRAME *) PURE; + STDMETHOD(GetPosition)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR return_position) PURE; + STDMETHOD(GetRotation)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR axis, LPD3DVALUE return_theta) PURE; + STDMETHOD(GetScene)(THIS_ LPDIRECT3DRMFRAME *) PURE; + STDMETHOD_(D3DRMSORTMODE, GetSortMode)(THIS) PURE; + STDMETHOD(GetTexture)(THIS_ LPDIRECT3DRMTEXTURE *) PURE; + STDMETHOD(GetTransform)(THIS_ D3DRMMATRIX4D return_matrix) PURE; + STDMETHOD(GetVelocity)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR return_velocity, BOOL with_rotation) PURE; + STDMETHOD(GetOrientation)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR dir, LPD3DVECTOR up) PURE; + STDMETHOD(GetVisuals)(THIS_ LPDIRECT3DRMVISUALARRAY *visuals) PURE; + STDMETHOD(GetTextureTopology)(THIS_ BOOL *wrap_u, BOOL *wrap_v) PURE; + STDMETHOD(InverseTransform)(THIS_ D3DVECTOR *d, D3DVECTOR *s) PURE; + STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK, LPVOID lpArg)PURE; + STDMETHOD(LookAt)(THIS_ LPDIRECT3DRMFRAME target, LPDIRECT3DRMFRAME reference, D3DRMFRAMECONSTRAINT) PURE; + STDMETHOD(Move)(THIS_ D3DVALUE delta) PURE; + STDMETHOD(DeleteChild)(THIS_ LPDIRECT3DRMFRAME) PURE; + STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DRMLIGHT) PURE; + STDMETHOD(DeleteMoveCallback)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg) PURE; + STDMETHOD(DeleteVisual)(THIS_ LPDIRECT3DRMVISUAL) PURE; + STDMETHOD_(D3DCOLOR, GetSceneBackground)(THIS) PURE; + STDMETHOD(GetSceneBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE *) PURE; + STDMETHOD_(D3DCOLOR, GetSceneFogColor)(THIS) PURE; + STDMETHOD_(BOOL, GetSceneFogEnable)(THIS) PURE; + STDMETHOD_(D3DRMFOGMODE, GetSceneFogMode)(THIS) PURE; + STDMETHOD(GetSceneFogParams)(THIS_ D3DVALUE *return_start, D3DVALUE *return_end, D3DVALUE *return_density) PURE; + STDMETHOD(SetSceneBackground)(THIS_ D3DCOLOR) PURE; + STDMETHOD(SetSceneBackgroundRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE; + STDMETHOD(SetSceneBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE; + STDMETHOD(SetSceneBackgroundImage)(THIS_ LPDIRECT3DRMTEXTURE) PURE; + STDMETHOD(SetSceneFogEnable)(THIS_ BOOL) PURE; + STDMETHOD(SetSceneFogColor)(THIS_ D3DCOLOR) PURE; + STDMETHOD(SetSceneFogMode)(THIS_ D3DRMFOGMODE) PURE; + STDMETHOD(SetSceneFogParams)(THIS_ D3DVALUE start, D3DVALUE end, D3DVALUE density) PURE; + STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE; + STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE; + STDMETHOD_(D3DRMZBUFFERMODE, GetZbufferMode)(THIS) PURE; + STDMETHOD(SetMaterialMode)(THIS_ D3DRMMATERIALMODE) PURE; + STDMETHOD(SetOrientation) + ( THIS_ LPDIRECT3DRMFRAME reference, + D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, + D3DVALUE ux, D3DVALUE uy, D3DVALUE uz + ) PURE; + STDMETHOD(SetPosition)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(SetRotation)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta) PURE; + STDMETHOD(SetSortMode)(THIS_ D3DRMSORTMODE) PURE; + STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE) PURE; + STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE; + STDMETHOD(SetVelocity)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation) PURE; + STDMETHOD(SetZbufferMode)(THIS_ D3DRMZBUFFERMODE) PURE; + STDMETHOD(Transform)(THIS_ D3DVECTOR *d, D3DVECTOR *s) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMFrame2 + +DECLARE_INTERFACE_(IDirect3DRMFrame2, IDirect3DRMFrame) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMFrame methods + */ + STDMETHOD(AddChild)(THIS_ LPDIRECT3DRMFRAME child) PURE; + STDMETHOD(AddLight)(THIS_ LPDIRECT3DRMLIGHT) PURE; + STDMETHOD(AddMoveCallback)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg) PURE; + STDMETHOD(AddTransform)(THIS_ D3DRMCOMBINETYPE, D3DRMMATRIX4D) PURE; + STDMETHOD(AddTranslation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(AddScale)(THIS_ D3DRMCOMBINETYPE, D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE; + STDMETHOD(AddRotation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta) PURE; + STDMETHOD(AddVisual)(THIS_ LPDIRECT3DRMVISUAL) PURE; + STDMETHOD(GetChildren)(THIS_ LPDIRECT3DRMFRAMEARRAY *children) PURE; + STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE; + STDMETHOD(GetLights)(THIS_ LPDIRECT3DRMLIGHTARRAY *lights) PURE; + STDMETHOD_(D3DRMMATERIALMODE, GetMaterialMode)(THIS) PURE; + STDMETHOD(GetParent)(THIS_ LPDIRECT3DRMFRAME *) PURE; + STDMETHOD(GetPosition)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR return_position) PURE; + STDMETHOD(GetRotation)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR axis, LPD3DVALUE return_theta) PURE; + STDMETHOD(GetScene)(THIS_ LPDIRECT3DRMFRAME *) PURE; + STDMETHOD_(D3DRMSORTMODE, GetSortMode)(THIS) PURE; + STDMETHOD(GetTexture)(THIS_ LPDIRECT3DRMTEXTURE *) PURE; + STDMETHOD(GetTransform)(THIS_ D3DRMMATRIX4D return_matrix) PURE; + STDMETHOD(GetVelocity)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR return_velocity, BOOL with_rotation) PURE; + STDMETHOD(GetOrientation)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DVECTOR dir, LPD3DVECTOR up) PURE; + STDMETHOD(GetVisuals)(THIS_ LPDIRECT3DRMVISUALARRAY *visuals) PURE; + STDMETHOD(GetTextureTopology)(THIS_ BOOL *wrap_u, BOOL *wrap_v) PURE; + STDMETHOD(InverseTransform)(THIS_ D3DVECTOR *d, D3DVECTOR *s) PURE; + STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK, LPVOID lpArg)PURE; + STDMETHOD(LookAt)(THIS_ LPDIRECT3DRMFRAME target, LPDIRECT3DRMFRAME reference, D3DRMFRAMECONSTRAINT) PURE; + STDMETHOD(Move)(THIS_ D3DVALUE delta) PURE; + STDMETHOD(DeleteChild)(THIS_ LPDIRECT3DRMFRAME) PURE; + STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DRMLIGHT) PURE; + STDMETHOD(DeleteMoveCallback)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg) PURE; + STDMETHOD(DeleteVisual)(THIS_ LPDIRECT3DRMVISUAL) PURE; + STDMETHOD_(D3DCOLOR, GetSceneBackground)(THIS) PURE; + STDMETHOD(GetSceneBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE *) PURE; + STDMETHOD_(D3DCOLOR, GetSceneFogColor)(THIS) PURE; + STDMETHOD_(BOOL, GetSceneFogEnable)(THIS) PURE; + STDMETHOD_(D3DRMFOGMODE, GetSceneFogMode)(THIS) PURE; + STDMETHOD(GetSceneFogParams)(THIS_ D3DVALUE *return_start, D3DVALUE *return_end, D3DVALUE *return_density) PURE; + STDMETHOD(SetSceneBackground)(THIS_ D3DCOLOR) PURE; + STDMETHOD(SetSceneBackgroundRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE; + STDMETHOD(SetSceneBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE; + STDMETHOD(SetSceneBackgroundImage)(THIS_ LPDIRECT3DRMTEXTURE) PURE; + STDMETHOD(SetSceneFogEnable)(THIS_ BOOL) PURE; + STDMETHOD(SetSceneFogColor)(THIS_ D3DCOLOR) PURE; + STDMETHOD(SetSceneFogMode)(THIS_ D3DRMFOGMODE) PURE; + STDMETHOD(SetSceneFogParams)(THIS_ D3DVALUE start, D3DVALUE end, D3DVALUE density) PURE; + STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE; + STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE; + STDMETHOD_(D3DRMZBUFFERMODE, GetZbufferMode)(THIS) PURE; + STDMETHOD(SetMaterialMode)(THIS_ D3DRMMATERIALMODE) PURE; + STDMETHOD(SetOrientation) + ( THIS_ LPDIRECT3DRMFRAME reference, + D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, + D3DVALUE ux, D3DVALUE uy, D3DVALUE uz + ) PURE; + STDMETHOD(SetPosition)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(SetRotation)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta) PURE; + STDMETHOD(SetSortMode)(THIS_ D3DRMSORTMODE) PURE; + STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE) PURE; + STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE; + STDMETHOD(SetVelocity)(THIS_ LPDIRECT3DRMFRAME reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation) PURE; + STDMETHOD(SetZbufferMode)(THIS_ D3DRMZBUFFERMODE) PURE; + STDMETHOD(Transform)(THIS_ D3DVECTOR *d, D3DVECTOR *s) PURE; + + /* + * IDirect3DRMFrame2 methods + */ + STDMETHOD(AddMoveCallback2)(THIS_ D3DRMFRAMEMOVECALLBACK, VOID *arg, DWORD dwFlags) PURE; + STDMETHOD(GetBox)(THIS_ LPD3DRMBOX) PURE; + STDMETHOD_(BOOL, GetBoxEnable)(THIS) PURE; + STDMETHOD(GetAxes)(THIS_ LPD3DVECTOR dir, LPD3DVECTOR up); + STDMETHOD(GetMaterial)(THIS_ LPDIRECT3DRMMATERIAL *) PURE; + STDMETHOD_(BOOL, GetInheritAxes)(THIS); + STDMETHOD(GetHierarchyBox)(THIS_ LPD3DRMBOX) PURE; + + STDMETHOD(SetBox)(THIS_ LPD3DRMBOX) PURE; + STDMETHOD(SetBoxEnable)(THIS_ BOOL) PURE; + STDMETHOD(SetAxes)(THIS_ D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, + D3DVALUE ux, D3DVALUE uy, D3DVALUE uz); + STDMETHOD(SetInheritAxes)(THIS_ BOOL inherit_from_parent); + STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL) PURE; + STDMETHOD(SetQuaternion)(THIS_ LPDIRECT3DRMFRAME reference, D3DRMQUATERNION *q) PURE; + + STDMETHOD(RayPick)(THIS_ LPDIRECT3DRMFRAME reference, LPD3DRMRAY ray, DWORD dwFlags, LPDIRECT3DRMPICKED2ARRAY *return_visuals) PURE; + STDMETHOD(Save)(THIS_ LPCSTR filename, D3DRMXOFFORMAT d3dFormat, + D3DRMSAVEOPTIONS d3dSaveFlags); +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMFrame3 + +DECLARE_INTERFACE_(IDirect3DRMFrame3, IDirect3DRMVisual) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMFrame3 methods + */ + STDMETHOD(AddChild)(THIS_ LPDIRECT3DRMFRAME3 child) PURE; + STDMETHOD(AddLight)(THIS_ LPDIRECT3DRMLIGHT) PURE; + STDMETHOD(AddMoveCallback)(THIS_ D3DRMFRAME3MOVECALLBACK, VOID *arg, DWORD dwFlags) PURE; + STDMETHOD(AddTransform)(THIS_ D3DRMCOMBINETYPE, D3DRMMATRIX4D) PURE; + STDMETHOD(AddTranslation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(AddScale)(THIS_ D3DRMCOMBINETYPE, D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE; + STDMETHOD(AddRotation)(THIS_ D3DRMCOMBINETYPE, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta) PURE; + STDMETHOD(AddVisual)(THIS_ LPUNKNOWN) PURE; + STDMETHOD(GetChildren)(THIS_ LPDIRECT3DRMFRAMEARRAY *children) PURE; + STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE; + STDMETHOD(GetLights)(THIS_ LPDIRECT3DRMLIGHTARRAY *lights) PURE; + STDMETHOD_(D3DRMMATERIALMODE, GetMaterialMode)(THIS) PURE; + STDMETHOD(GetParent)(THIS_ LPDIRECT3DRMFRAME3 *) PURE; + STDMETHOD(GetPosition)(THIS_ LPDIRECT3DRMFRAME3 reference, LPD3DVECTOR return_position) PURE; + STDMETHOD(GetRotation)(THIS_ LPDIRECT3DRMFRAME3 reference, LPD3DVECTOR axis, LPD3DVALUE return_theta) PURE; + STDMETHOD(GetScene)(THIS_ LPDIRECT3DRMFRAME3 *) PURE; + STDMETHOD_(D3DRMSORTMODE, GetSortMode)(THIS) PURE; + STDMETHOD(GetTexture)(THIS_ LPDIRECT3DRMTEXTURE3 *) PURE; + STDMETHOD(GetTransform)(THIS_ LPDIRECT3DRMFRAME3 reference, + D3DRMMATRIX4D rmMatrix) PURE; + STDMETHOD(GetVelocity)(THIS_ LPDIRECT3DRMFRAME3 reference, LPD3DVECTOR return_velocity, BOOL with_rotation) PURE; + STDMETHOD(GetOrientation)(THIS_ LPDIRECT3DRMFRAME3 reference, LPD3DVECTOR dir, LPD3DVECTOR up) PURE; + STDMETHOD(GetVisuals)(THIS_ LPDWORD lpdwCount, LPUNKNOWN *) PURE; + STDMETHOD(InverseTransform)(THIS_ D3DVECTOR *d, D3DVECTOR *s) PURE; + STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURE3CALLBACK, LPVOID lpArg)PURE; + STDMETHOD(LookAt)(THIS_ LPDIRECT3DRMFRAME3 target, LPDIRECT3DRMFRAME3 reference, D3DRMFRAMECONSTRAINT) PURE; + STDMETHOD(Move)(THIS_ D3DVALUE delta) PURE; + STDMETHOD(DeleteChild)(THIS_ LPDIRECT3DRMFRAME3) PURE; + STDMETHOD(DeleteLight)(THIS_ LPDIRECT3DRMLIGHT) PURE; + STDMETHOD(DeleteMoveCallback)(THIS_ D3DRMFRAME3MOVECALLBACK, VOID *arg) PURE; + STDMETHOD(DeleteVisual)(THIS_ LPUNKNOWN) PURE; + STDMETHOD_(D3DCOLOR, GetSceneBackground)(THIS) PURE; + STDMETHOD(GetSceneBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE *) PURE; + STDMETHOD_(D3DCOLOR, GetSceneFogColor)(THIS) PURE; + STDMETHOD_(BOOL, GetSceneFogEnable)(THIS) PURE; + STDMETHOD_(D3DRMFOGMODE, GetSceneFogMode)(THIS) PURE; + STDMETHOD(GetSceneFogParams)(THIS_ D3DVALUE *return_start, D3DVALUE *return_end, D3DVALUE *return_density) PURE; + STDMETHOD(SetSceneBackground)(THIS_ D3DCOLOR) PURE; + STDMETHOD(SetSceneBackgroundRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE; + STDMETHOD(SetSceneBackgroundDepth)(THIS_ LPDIRECTDRAWSURFACE) PURE; + STDMETHOD(SetSceneBackgroundImage)(THIS_ LPDIRECT3DRMTEXTURE3) PURE; + STDMETHOD(SetSceneFogEnable)(THIS_ BOOL) PURE; + STDMETHOD(SetSceneFogColor)(THIS_ D3DCOLOR) PURE; + STDMETHOD(SetSceneFogMode)(THIS_ D3DRMFOGMODE) PURE; + STDMETHOD(SetSceneFogParams)(THIS_ D3DVALUE start, D3DVALUE end, D3DVALUE density) PURE; + STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE; + STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE; + STDMETHOD_(D3DRMZBUFFERMODE, GetZbufferMode)(THIS) PURE; + STDMETHOD(SetMaterialMode)(THIS_ D3DRMMATERIALMODE) PURE; + STDMETHOD(SetOrientation) + ( THIS_ LPDIRECT3DRMFRAME3 reference, + D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, + D3DVALUE ux, D3DVALUE uy, D3DVALUE uz + ) PURE; + STDMETHOD(SetPosition)(THIS_ LPDIRECT3DRMFRAME3 reference, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(SetRotation)(THIS_ LPDIRECT3DRMFRAME3 reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, D3DVALUE theta) PURE; + STDMETHOD(SetSortMode)(THIS_ D3DRMSORTMODE) PURE; + STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE3) PURE; + STDMETHOD(SetVelocity)(THIS_ LPDIRECT3DRMFRAME3 reference, D3DVALUE x, D3DVALUE y, D3DVALUE z, BOOL with_rotation) PURE; + STDMETHOD(SetZbufferMode)(THIS_ D3DRMZBUFFERMODE) PURE; + STDMETHOD(Transform)(THIS_ D3DVECTOR *d, D3DVECTOR *s) PURE; + STDMETHOD(GetBox)(THIS_ LPD3DRMBOX) PURE; + STDMETHOD_(BOOL, GetBoxEnable)(THIS) PURE; + STDMETHOD(GetAxes)(THIS_ LPD3DVECTOR dir, LPD3DVECTOR up); + STDMETHOD(GetMaterial)(THIS_ LPDIRECT3DRMMATERIAL2 *) PURE; + STDMETHOD_(BOOL, GetInheritAxes)(THIS); + STDMETHOD(GetHierarchyBox)(THIS_ LPD3DRMBOX) PURE; + + STDMETHOD(SetBox)(THIS_ LPD3DRMBOX) PURE; + STDMETHOD(SetBoxEnable)(THIS_ BOOL) PURE; + STDMETHOD(SetAxes)(THIS_ D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, + D3DVALUE ux, D3DVALUE uy, D3DVALUE uz); + STDMETHOD(SetInheritAxes)(THIS_ BOOL inherit_from_parent); + STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL2) PURE; + STDMETHOD(SetQuaternion)(THIS_ LPDIRECT3DRMFRAME3 reference, D3DRMQUATERNION *q) PURE; + + STDMETHOD(RayPick)(THIS_ LPDIRECT3DRMFRAME3 reference, LPD3DRMRAY ray, DWORD dwFlags, LPDIRECT3DRMPICKED2ARRAY *return_visuals) PURE; + STDMETHOD(Save)(THIS_ LPCSTR filename, D3DRMXOFFORMAT d3dFormat, + D3DRMSAVEOPTIONS d3dSaveFlags); + STDMETHOD(TransformVectors)(THIS_ LPDIRECT3DRMFRAME3 reference, + DWORD dwNumVectors, + LPD3DVECTOR lpDstVectors, + LPD3DVECTOR lpSrcVectors) PURE; + STDMETHOD(InverseTransformVectors)(THIS_ LPDIRECT3DRMFRAME3 reference, + DWORD dwNumVectors, + LPD3DVECTOR lpDstVectors, + LPD3DVECTOR lpSrcVectors) PURE; + STDMETHOD(SetTraversalOptions)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(GetTraversalOptions)(THIS_ LPDWORD lpdwFlags) PURE; + STDMETHOD(SetSceneFogMethod)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(GetSceneFogMethod)(THIS_ LPDWORD lpdwFlags) PURE; + STDMETHOD(SetMaterialOverride)(THIS_ LPD3DRMMATERIALOVERRIDE) PURE; + STDMETHOD(GetMaterialOverride)(THIS_ LPD3DRMMATERIALOVERRIDE) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMMesh + +DECLARE_INTERFACE_(IDirect3DRMMesh, IDirect3DRMVisual) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMMesh methods + */ + STDMETHOD(Scale)(THIS_ D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE; + STDMETHOD(Translate)(THIS_ D3DVALUE tx, D3DVALUE ty, D3DVALUE tz) PURE; + STDMETHOD(GetBox)(THIS_ D3DRMBOX *) PURE; + STDMETHOD(AddGroup)(THIS_ unsigned vCount, unsigned fCount, unsigned vPerFace, unsigned *fData, D3DRMGROUPINDEX *returnId) PURE; + STDMETHOD(SetVertices)(THIS_ D3DRMGROUPINDEX id, unsigned index, unsigned count, D3DRMVERTEX *values) PURE; + STDMETHOD(SetGroupColor)(THIS_ D3DRMGROUPINDEX id, D3DCOLOR value) PURE; + STDMETHOD(SetGroupColorRGB)(THIS_ D3DRMGROUPINDEX id, D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE; + STDMETHOD(SetGroupMapping)(THIS_ D3DRMGROUPINDEX id, D3DRMMAPPING value) PURE; + STDMETHOD(SetGroupQuality)(THIS_ D3DRMGROUPINDEX id, D3DRMRENDERQUALITY value) PURE; + STDMETHOD(SetGroupMaterial)(THIS_ D3DRMGROUPINDEX id, LPDIRECT3DRMMATERIAL value) PURE; + STDMETHOD(SetGroupTexture)(THIS_ D3DRMGROUPINDEX id, LPDIRECT3DRMTEXTURE value) PURE; + + STDMETHOD_(unsigned, GetGroupCount)(THIS) PURE; + STDMETHOD(GetGroup)(THIS_ D3DRMGROUPINDEX id, unsigned *vCount, unsigned *fCount, unsigned *vPerFace, DWORD *fDataSize, unsigned *fData) PURE; + STDMETHOD(GetVertices)(THIS_ D3DRMGROUPINDEX id, DWORD index, DWORD count, D3DRMVERTEX *returnPtr) PURE; + STDMETHOD_(D3DCOLOR, GetGroupColor)(THIS_ D3DRMGROUPINDEX id) PURE; + STDMETHOD_(D3DRMMAPPING, GetGroupMapping)(THIS_ D3DRMGROUPINDEX id) PURE; + STDMETHOD_(D3DRMRENDERQUALITY, GetGroupQuality)(THIS_ D3DRMGROUPINDEX id) PURE; + STDMETHOD(GetGroupMaterial)(THIS_ D3DRMGROUPINDEX id, LPDIRECT3DRMMATERIAL *returnPtr) PURE; + STDMETHOD(GetGroupTexture)(THIS_ D3DRMGROUPINDEX id, LPDIRECT3DRMTEXTURE *returnPtr) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMProgressiveMesh + +DECLARE_INTERFACE_(IDirect3DRMProgressiveMesh, IDirect3DRMVisual) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMProgressiveMesh methods + */ + STDMETHOD(Load) (THIS_ LPVOID lpObjLocation, LPVOID lpObjId, + D3DRMLOADOPTIONS dloLoadflags, D3DRMLOADTEXTURECALLBACK lpCallback, + LPVOID lpArg) PURE; + STDMETHOD(GetLoadStatus) (THIS_ LPD3DRMPMESHLOADSTATUS lpStatus) PURE; + STDMETHOD(SetMinRenderDetail) (THIS_ D3DVALUE d3dVal) PURE; + STDMETHOD(Abort) (THIS_ DWORD dwFlags) PURE; + + STDMETHOD(GetFaceDetail) (THIS_ LPDWORD lpdwCount) PURE; + STDMETHOD(GetVertexDetail) (THIS_ LPDWORD lpdwCount) PURE; + STDMETHOD(SetFaceDetail) (THIS_ DWORD dwCount) PURE; + STDMETHOD(SetVertexDetail) (THIS_ DWORD dwCount) PURE; + STDMETHOD(GetFaceDetailRange) (THIS_ LPDWORD lpdwMin, LPDWORD lpdwMax) PURE; + STDMETHOD(GetVertexDetailRange) (THIS_ LPDWORD lpdwMin, LPDWORD lpdwMax) PURE; + STDMETHOD(GetDetail) (THIS_ D3DVALUE *lpdvVal) PURE; + STDMETHOD(SetDetail) (THIS_ D3DVALUE d3dVal) PURE; + + STDMETHOD(RegisterEvents) (THIS_ HANDLE hEvent, DWORD dwFlags, DWORD dwReserved) PURE; + STDMETHOD(CreateMesh) (THIS_ LPDIRECT3DRMMESH *lplpD3DRMMesh) PURE; + STDMETHOD(Duplicate) (THIS_ LPDIRECT3DRMPROGRESSIVEMESH *lplpD3DRMPMesh) PURE; + STDMETHOD(GetBox) (THIS_ LPD3DRMBOX lpBBox) PURE; + STDMETHOD(SetQuality) (THIS_ D3DRMRENDERQUALITY) PURE; + STDMETHOD(GetQuality) (THIS_ LPD3DRMRENDERQUALITY lpdwquality) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMShadow + +DECLARE_INTERFACE_(IDirect3DRMShadow, IDirect3DRMVisual) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMShadow methods + */ + STDMETHOD(Init) + ( THIS_ LPDIRECT3DRMVISUAL visual, LPDIRECT3DRMLIGHT light, + D3DVALUE px, D3DVALUE py, D3DVALUE pz, + D3DVALUE nx, D3DVALUE ny, D3DVALUE nz + ) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMShadow2 + +DECLARE_INTERFACE_(IDirect3DRMShadow2, IDirect3DRMVisual) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMShadow methods + */ + STDMETHOD(Init) + ( THIS_ LPUNKNOWN pUNK, LPDIRECT3DRMLIGHT light, + D3DVALUE px, D3DVALUE py, D3DVALUE pz, + D3DVALUE nx, D3DVALUE ny, D3DVALUE nz + ) PURE; + + /* + * IDirect3DRMShadow2 methods + */ + STDMETHOD(GetVisual)(THIS_ LPDIRECT3DRMVISUAL *) PURE; + STDMETHOD(SetVisual)(THIS_ LPUNKNOWN pUNK, DWORD) PURE; + STDMETHOD(GetLight)(THIS_ LPDIRECT3DRMLIGHT *) PURE; + STDMETHOD(SetLight)(THIS_ LPDIRECT3DRMLIGHT, DWORD) PURE; + STDMETHOD(GetPlane)(THIS_ LPD3DVALUE px, LPD3DVALUE py, LPD3DVALUE pz, + LPD3DVALUE nx, LPD3DVALUE ny, LPD3DVALUE nz) PURE; + STDMETHOD(SetPlane)(THIS_ D3DVALUE px, D3DVALUE py, D3DVALUE pz, + D3DVALUE nx, D3DVALUE ny, D3DVALUE nz, DWORD) PURE; + STDMETHOD(GetOptions)(THIS_ LPDWORD) PURE; + STDMETHOD(SetOptions)(THIS_ DWORD) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMFace + +DECLARE_INTERFACE_(IDirect3DRMFace, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMFace methods + */ + STDMETHOD(AddVertex)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(AddVertexAndNormalIndexed)(THIS_ DWORD vertex, DWORD normal) PURE; + STDMETHOD(SetColorRGB)(THIS_ D3DVALUE, D3DVALUE, D3DVALUE) PURE; + STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE; + STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE) PURE; + STDMETHOD(SetTextureCoordinates)(THIS_ DWORD vertex, D3DVALUE u, D3DVALUE v) PURE; + STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL) PURE; + STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE; + + STDMETHOD(GetVertex)(THIS_ DWORD index, D3DVECTOR *vertex, D3DVECTOR *normal) PURE; + STDMETHOD(GetVertices)(THIS_ DWORD *vertex_count, D3DVECTOR *coords, D3DVECTOR *normals); + STDMETHOD(GetTextureCoordinates)(THIS_ DWORD vertex, D3DVALUE *u, D3DVALUE *v) PURE; + STDMETHOD(GetTextureTopology)(THIS_ BOOL *wrap_u, BOOL *wrap_v) PURE; + STDMETHOD(GetNormal)(THIS_ D3DVECTOR *) PURE; + STDMETHOD(GetTexture)(THIS_ LPDIRECT3DRMTEXTURE *) PURE; + STDMETHOD(GetMaterial)(THIS_ LPDIRECT3DRMMATERIAL *) PURE; + + STDMETHOD_(int, GetVertexCount)(THIS) PURE; + STDMETHOD_(int, GetVertexIndex)(THIS_ DWORD which) PURE; + STDMETHOD_(int, GetTextureCoordinateIndex)(THIS_ DWORD which) PURE; + STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMFace2 + +DECLARE_INTERFACE_(IDirect3DRMFace2, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMFace methods + */ + STDMETHOD(AddVertex)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(AddVertexAndNormalIndexed)(THIS_ DWORD vertex, DWORD normal) PURE; + STDMETHOD(SetColorRGB)(THIS_ D3DVALUE, D3DVALUE, D3DVALUE) PURE; + STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE; + STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE3) PURE; + STDMETHOD(SetTextureCoordinates)(THIS_ DWORD vertex, D3DVALUE u, D3DVALUE v) PURE; + STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL2) PURE; + STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE; + + STDMETHOD(GetVertex)(THIS_ DWORD index, D3DVECTOR *vertex, D3DVECTOR *normal) PURE; + STDMETHOD(GetVertices)(THIS_ DWORD *vertex_count, D3DVECTOR *coords, D3DVECTOR *normals); + STDMETHOD(GetTextureCoordinates)(THIS_ DWORD vertex, D3DVALUE *u, D3DVALUE *v) PURE; + STDMETHOD(GetTextureTopology)(THIS_ BOOL *wrap_u, BOOL *wrap_v) PURE; + STDMETHOD(GetNormal)(THIS_ D3DVECTOR *) PURE; + STDMETHOD(GetTexture)(THIS_ LPDIRECT3DRMTEXTURE3 *) PURE; + STDMETHOD(GetMaterial)(THIS_ LPDIRECT3DRMMATERIAL2 *) PURE; + + STDMETHOD_(int, GetVertexCount)(THIS) PURE; + STDMETHOD_(int, GetVertexIndex)(THIS_ DWORD which) PURE; + STDMETHOD_(int, GetTextureCoordinateIndex)(THIS_ DWORD which) PURE; + STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMMeshBuilder + +DECLARE_INTERFACE_(IDirect3DRMMeshBuilder, IDirect3DRMVisual) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMMeshBuilder methods + */ + STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK, LPVOID lpArg) PURE; + STDMETHOD(Save)(THIS_ const char *filename, D3DRMXOFFORMAT, D3DRMSAVEOPTIONS save) PURE; + STDMETHOD(Scale)(THIS_ D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE; + STDMETHOD(Translate)(THIS_ D3DVALUE tx, D3DVALUE ty, D3DVALUE tz) PURE; + STDMETHOD(SetColorSource)(THIS_ D3DRMCOLORSOURCE) PURE; + STDMETHOD(GetBox)(THIS_ D3DRMBOX *) PURE; + STDMETHOD(GenerateNormals)(THIS) PURE; + STDMETHOD_(D3DRMCOLORSOURCE, GetColorSource)(THIS) PURE; + + STDMETHOD(AddMesh)(THIS_ LPDIRECT3DRMMESH) PURE; + STDMETHOD(AddMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER) PURE; + STDMETHOD(AddFrame)(THIS_ LPDIRECT3DRMFRAME) PURE; + STDMETHOD(AddFace)(THIS_ LPDIRECT3DRMFACE) PURE; + STDMETHOD(AddFaces) + ( THIS_ DWORD vcount, D3DVECTOR *vertices, DWORD ncount, D3DVECTOR *normals, + DWORD *data, LPDIRECT3DRMFACEARRAY* + ) PURE; + STDMETHOD(ReserveSpace)(THIS_ DWORD vertex_Count, DWORD normal_count, DWORD face_count) PURE; + STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE; + STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE; + STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE) PURE; + STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL) PURE; + STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE; + STDMETHOD(SetQuality)(THIS_ D3DRMRENDERQUALITY) PURE; + STDMETHOD(SetPerspective)(THIS_ BOOL) PURE; + STDMETHOD(SetVertex)(THIS_ DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(SetNormal)(THIS_ DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(SetTextureCoordinates)(THIS_ DWORD index, D3DVALUE u, D3DVALUE v) PURE; + STDMETHOD(SetVertexColor)(THIS_ DWORD index, D3DCOLOR) PURE; + STDMETHOD(SetVertexColorRGB)(THIS_ DWORD index, D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE; + + STDMETHOD(GetFaces)(THIS_ LPDIRECT3DRMFACEARRAY*) PURE; + STDMETHOD(GetVertices) + ( THIS_ DWORD *vcount, D3DVECTOR *vertices, DWORD *ncount, D3DVECTOR *normals, DWORD *face_data_size, DWORD *face_data + ) PURE; + STDMETHOD(GetTextureCoordinates)(THIS_ DWORD index, D3DVALUE *u, D3DVALUE *v) PURE; + + STDMETHOD_(int, AddVertex)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD_(int, AddNormal)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(CreateFace)(THIS_ LPDIRECT3DRMFACE*) PURE; + STDMETHOD_(D3DRMRENDERQUALITY, GetQuality)(THIS) PURE; + STDMETHOD_(BOOL, GetPerspective)(THIS) PURE; + STDMETHOD_(int, GetFaceCount)(THIS) PURE; + STDMETHOD_(int, GetVertexCount)(THIS) PURE; + STDMETHOD_(D3DCOLOR, GetVertexColor)(THIS_ DWORD index) PURE; + + STDMETHOD(CreateMesh)(THIS_ LPDIRECT3DRMMESH*) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMMeshBuilder2 + +DECLARE_INTERFACE_(IDirect3DRMMeshBuilder2, IDirect3DRMMeshBuilder) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMMeshBuilder methods + */ + STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK, LPVOID lpArg) PURE; + STDMETHOD(Save)(THIS_ const char *filename, D3DRMXOFFORMAT, D3DRMSAVEOPTIONS save) PURE; + STDMETHOD(Scale)(THIS_ D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE; + STDMETHOD(Translate)(THIS_ D3DVALUE tx, D3DVALUE ty, D3DVALUE tz) PURE; + STDMETHOD(SetColorSource)(THIS_ D3DRMCOLORSOURCE) PURE; + STDMETHOD(GetBox)(THIS_ D3DRMBOX *) PURE; + STDMETHOD(GenerateNormals)(THIS) PURE; + STDMETHOD_(D3DRMCOLORSOURCE, GetColorSource)(THIS) PURE; + + STDMETHOD(AddMesh)(THIS_ LPDIRECT3DRMMESH) PURE; + STDMETHOD(AddMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER) PURE; + STDMETHOD(AddFrame)(THIS_ LPDIRECT3DRMFRAME) PURE; + STDMETHOD(AddFace)(THIS_ LPDIRECT3DRMFACE) PURE; + STDMETHOD(AddFaces) + ( THIS_ DWORD vcount, D3DVECTOR *vertices, DWORD ncount, D3DVECTOR *normals, + DWORD *data, LPDIRECT3DRMFACEARRAY* + ) PURE; + STDMETHOD(ReserveSpace)(THIS_ DWORD vertex_Count, DWORD normal_count, DWORD face_count) PURE; + STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE; + STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE; + STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE) PURE; + STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL) PURE; + STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE; + STDMETHOD(SetQuality)(THIS_ D3DRMRENDERQUALITY) PURE; + STDMETHOD(SetPerspective)(THIS_ BOOL) PURE; + STDMETHOD(SetVertex)(THIS_ DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(SetNormal)(THIS_ DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(SetTextureCoordinates)(THIS_ DWORD index, D3DVALUE u, D3DVALUE v) PURE; + STDMETHOD(SetVertexColor)(THIS_ DWORD index, D3DCOLOR) PURE; + STDMETHOD(SetVertexColorRGB)(THIS_ DWORD index, D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE; + + STDMETHOD(GetFaces)(THIS_ LPDIRECT3DRMFACEARRAY*) PURE; + STDMETHOD(GetVertices) + ( THIS_ DWORD *vcount, D3DVECTOR *vertices, DWORD *ncount, D3DVECTOR *normals, DWORD *face_data_size, DWORD *face_data + ) PURE; + STDMETHOD(GetTextureCoordinates)(THIS_ DWORD index, D3DVALUE *u, D3DVALUE *v) PURE; + + STDMETHOD_(int, AddVertex)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD_(int, AddNormal)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(CreateFace)(THIS_ LPDIRECT3DRMFACE*) PURE; + STDMETHOD_(D3DRMRENDERQUALITY, GetQuality)(THIS) PURE; + STDMETHOD_(BOOL, GetPerspective)(THIS) PURE; + STDMETHOD_(int, GetFaceCount)(THIS) PURE; + STDMETHOD_(int, GetVertexCount)(THIS) PURE; + STDMETHOD_(D3DCOLOR, GetVertexColor)(THIS_ DWORD index) PURE; + + STDMETHOD(CreateMesh)(THIS_ LPDIRECT3DRMMESH*) PURE; + + /* + * IDirect3DRMMeshBuilder2 methods + */ + STDMETHOD(GenerateNormals2)(THIS_ D3DVALUE crease, DWORD dwFlags) PURE; + STDMETHOD(GetFace)(THIS_ DWORD index, LPDIRECT3DRMFACE*) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMMeshBuilder3 + +DECLARE_INTERFACE_(IDirect3DRMMeshBuilder3, IDirect3DRMVisual) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMMeshBuilder3 methods + */ + STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURE3CALLBACK, LPVOID lpArg) PURE; + STDMETHOD(Save)(THIS_ const char *filename, D3DRMXOFFORMAT, D3DRMSAVEOPTIONS save) PURE; + STDMETHOD(Scale)(THIS_ D3DVALUE sx, D3DVALUE sy, D3DVALUE sz) PURE; + STDMETHOD(Translate)(THIS_ D3DVALUE tx, D3DVALUE ty, D3DVALUE tz) PURE; + STDMETHOD(SetColorSource)(THIS_ D3DRMCOLORSOURCE) PURE; + STDMETHOD(GetBox)(THIS_ D3DRMBOX *) PURE; + STDMETHOD(GenerateNormals)(THIS_ D3DVALUE crease, DWORD dwFlags) PURE; + STDMETHOD_(D3DRMCOLORSOURCE, GetColorSource)(THIS) PURE; + + STDMETHOD(AddMesh)(THIS_ LPDIRECT3DRMMESH) PURE; + STDMETHOD(AddMeshBuilder)(THIS_ LPDIRECT3DRMMESHBUILDER3, DWORD dwFlags) PURE; + STDMETHOD(AddFrame)(THIS_ LPDIRECT3DRMFRAME3) PURE; + STDMETHOD(AddFace)(THIS_ LPDIRECT3DRMFACE2) PURE; + STDMETHOD(AddFaces) + ( THIS_ DWORD vcount, D3DVECTOR *vertices, DWORD ncount, D3DVECTOR *normals, + DWORD *data, LPDIRECT3DRMFACEARRAY* + ) PURE; + STDMETHOD(ReserveSpace)(THIS_ DWORD vertex_Count, DWORD normal_count, DWORD face_count) PURE; + STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE; + STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE; + STDMETHOD(SetTexture)(THIS_ LPDIRECT3DRMTEXTURE3) PURE; + STDMETHOD(SetMaterial)(THIS_ LPDIRECT3DRMMATERIAL2) PURE; + STDMETHOD(SetTextureTopology)(THIS_ BOOL wrap_u, BOOL wrap_v) PURE; + STDMETHOD(SetQuality)(THIS_ D3DRMRENDERQUALITY) PURE; + STDMETHOD(SetPerspective)(THIS_ BOOL) PURE; + STDMETHOD(SetVertex)(THIS_ DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(SetNormal)(THIS_ DWORD index, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(SetTextureCoordinates)(THIS_ DWORD index, D3DVALUE u, D3DVALUE v) PURE; + STDMETHOD(SetVertexColor)(THIS_ DWORD index, D3DCOLOR) PURE; + STDMETHOD(SetVertexColorRGB)(THIS_ DWORD index, D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE; + STDMETHOD(GetFaces)(THIS_ LPDIRECT3DRMFACEARRAY*) PURE; + STDMETHOD(GetGeometry) + ( THIS_ DWORD *vcount, D3DVECTOR *vertices, DWORD *ncount, D3DVECTOR *normals, DWORD *face_data_size, DWORD *face_data + ) PURE; + STDMETHOD(GetTextureCoordinates)(THIS_ DWORD index, D3DVALUE *u, D3DVALUE *v) PURE; + STDMETHOD_(int, AddVertex)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD_(int, AddNormal)(THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(CreateFace)(THIS_ LPDIRECT3DRMFACE2 *) PURE; + STDMETHOD_(D3DRMRENDERQUALITY, GetQuality)(THIS) PURE; + STDMETHOD_(BOOL, GetPerspective)(THIS) PURE; + STDMETHOD_(int, GetFaceCount)(THIS) PURE; + STDMETHOD_(int, GetVertexCount)(THIS) PURE; + STDMETHOD_(D3DCOLOR, GetVertexColor)(THIS_ DWORD index) PURE; + STDMETHOD(CreateMesh)(THIS_ LPDIRECT3DRMMESH*) PURE; + STDMETHOD(GetFace)(THIS_ DWORD index, LPDIRECT3DRMFACE2 *) PURE; + STDMETHOD(GetVertex)(THIS_ DWORD dwIndex, LPD3DVECTOR lpVector) PURE; + STDMETHOD(GetNormal)(THIS_ DWORD dwIndex, LPD3DVECTOR lpVector) PURE; + STDMETHOD(DeleteVertices)(THIS_ DWORD dwIndexFirst, DWORD dwCount) PURE; + STDMETHOD(DeleteNormals)(THIS_ DWORD dwIndexFirst, DWORD dwCount) PURE; + STDMETHOD(DeleteFace)(THIS_ LPDIRECT3DRMFACE2) PURE; + STDMETHOD(Empty)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(Optimize)(THIS_ DWORD dwFlags) PURE; + STDMETHOD(AddFacesIndexed)(THIS_ DWORD dwFlags, DWORD *lpdwvIndices, DWORD *dwIndexFirst, DWORD *dwCount) PURE; + STDMETHOD(CreateSubMesh)(THIS_ LPUNKNOWN *) PURE; + STDMETHOD(GetParentMesh)(THIS_ DWORD, LPUNKNOWN *) PURE; + STDMETHOD(GetSubMeshes)(THIS_ LPDWORD lpdwCount, LPUNKNOWN *) PURE; + STDMETHOD(DeleteSubMesh)(THIS_ LPUNKNOWN) PURE; + STDMETHOD(Enable)(THIS_ DWORD) PURE; + STDMETHOD(GetEnable)(THIS_ DWORD *) PURE; + STDMETHOD(AddTriangles)(THIS_ DWORD dwFlags, DWORD dwFormat, + DWORD dwVertexCount, LPVOID lpvData) PURE; + STDMETHOD(SetVertices)(THIS_ DWORD dwIndexFirst, DWORD dwCount, LPD3DVECTOR) PURE; + STDMETHOD(GetVertices)(THIS_ DWORD dwIndexFirst, LPDWORD lpdwCount, LPD3DVECTOR) PURE; + STDMETHOD(SetNormals)(THIS_ DWORD dwIndexFirst, DWORD dwCount, LPD3DVECTOR) PURE; + STDMETHOD(GetNormals)(THIS_ DWORD dwIndexFirst, LPDWORD lpdwCount, LPD3DVECTOR) PURE; + STDMETHOD_(int, GetNormalCount)(THIS) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMLight + +DECLARE_INTERFACE_(IDirect3DRMLight, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMLight methods + */ + STDMETHOD(SetType)(THIS_ D3DRMLIGHTTYPE) PURE; + STDMETHOD(SetColor)(THIS_ D3DCOLOR) PURE; + STDMETHOD(SetColorRGB)(THIS_ D3DVALUE red, D3DVALUE green, D3DVALUE blue) PURE; + STDMETHOD(SetRange)(THIS_ D3DVALUE) PURE; + STDMETHOD(SetUmbra)(THIS_ D3DVALUE) PURE; + STDMETHOD(SetPenumbra)(THIS_ D3DVALUE) PURE; + STDMETHOD(SetConstantAttenuation)(THIS_ D3DVALUE) PURE; + STDMETHOD(SetLinearAttenuation)(THIS_ D3DVALUE) PURE; + STDMETHOD(SetQuadraticAttenuation)(THIS_ D3DVALUE) PURE; + + STDMETHOD_(D3DVALUE, GetRange)(THIS) PURE; + STDMETHOD_(D3DVALUE, GetUmbra)(THIS) PURE; + STDMETHOD_(D3DVALUE, GetPenumbra)(THIS) PURE; + STDMETHOD_(D3DVALUE, GetConstantAttenuation)(THIS) PURE; + STDMETHOD_(D3DVALUE, GetLinearAttenuation)(THIS) PURE; + STDMETHOD_(D3DVALUE, GetQuadraticAttenuation)(THIS) PURE; + STDMETHOD_(D3DCOLOR, GetColor)(THIS) PURE; + STDMETHOD_(D3DRMLIGHTTYPE, GetType)(THIS) PURE; + + STDMETHOD(SetEnableFrame)(THIS_ LPDIRECT3DRMFRAME) PURE; + STDMETHOD(GetEnableFrame)(THIS_ LPDIRECT3DRMFRAME*) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMTexture + +DECLARE_INTERFACE_(IDirect3DRMTexture, IDirect3DRMVisual) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMTexture methods + */ + STDMETHOD(InitFromFile)(THIS_ const char *filename) PURE; + STDMETHOD(InitFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS) PURE; + STDMETHOD(InitFromResource)(THIS_ HRSRC) PURE; + STDMETHOD(Changed)(THIS_ BOOL pixels, BOOL palette) PURE; + + STDMETHOD(SetColors)(THIS_ DWORD) PURE; + STDMETHOD(SetShades)(THIS_ DWORD) PURE; + STDMETHOD(SetDecalSize)(THIS_ D3DVALUE width, D3DVALUE height) PURE; + STDMETHOD(SetDecalOrigin)(THIS_ LONG x, LONG y) PURE; + STDMETHOD(SetDecalScale)(THIS_ DWORD) PURE; + STDMETHOD(SetDecalTransparency)(THIS_ BOOL) PURE; + STDMETHOD(SetDecalTransparentColor)(THIS_ D3DCOLOR) PURE; + + STDMETHOD(GetDecalSize)(THIS_ D3DVALUE *width_return, D3DVALUE *height_return) PURE; + STDMETHOD(GetDecalOrigin)(THIS_ LONG *x_return, LONG *y_return) PURE; + + STDMETHOD_(D3DRMIMAGE *, GetImage)(THIS) PURE; + STDMETHOD_(DWORD, GetShades)(THIS) PURE; + STDMETHOD_(DWORD, GetColors)(THIS) PURE; + STDMETHOD_(DWORD, GetDecalScale)(THIS) PURE; + STDMETHOD_(BOOL, GetDecalTransparency)(THIS) PURE; + STDMETHOD_(D3DCOLOR, GetDecalTransparentColor)(THIS) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMTexture2 + +DECLARE_INTERFACE_(IDirect3DRMTexture2, IDirect3DRMTexture) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMTexture methods + */ + STDMETHOD(InitFromFile)(THIS_ const char *filename) PURE; + STDMETHOD(InitFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS) PURE; + STDMETHOD(InitFromResource)(THIS_ HRSRC) PURE; + STDMETHOD(Changed)(THIS_ BOOL pixels, BOOL palette) PURE; + + STDMETHOD(SetColors)(THIS_ DWORD) PURE; + STDMETHOD(SetShades)(THIS_ DWORD) PURE; + STDMETHOD(SetDecalSize)(THIS_ D3DVALUE width, D3DVALUE height) PURE; + STDMETHOD(SetDecalOrigin)(THIS_ LONG x, LONG y) PURE; + STDMETHOD(SetDecalScale)(THIS_ DWORD) PURE; + STDMETHOD(SetDecalTransparency)(THIS_ BOOL) PURE; + STDMETHOD(SetDecalTransparentColor)(THIS_ D3DCOLOR) PURE; + + STDMETHOD(GetDecalSize)(THIS_ D3DVALUE *width_return, D3DVALUE *height_return) PURE; + STDMETHOD(GetDecalOrigin)(THIS_ LONG *x_return, LONG *y_return) PURE; + + STDMETHOD_(D3DRMIMAGE *, GetImage)(THIS) PURE; + STDMETHOD_(DWORD, GetShades)(THIS) PURE; + STDMETHOD_(DWORD, GetColors)(THIS) PURE; + STDMETHOD_(DWORD, GetDecalScale)(THIS) PURE; + STDMETHOD_(BOOL, GetDecalTransparency)(THIS) PURE; + STDMETHOD_(D3DCOLOR, GetDecalTransparentColor)(THIS) PURE; + + /* + * IDirect3DRMTexture2 methods + */ + STDMETHOD(InitFromImage)(THIS_ LPD3DRMIMAGE) PURE; + STDMETHOD(InitFromResource2)(THIS_ HMODULE hModule, LPCTSTR strName, LPCTSTR strType) PURE; + STDMETHOD(GenerateMIPMap)(THIS_ DWORD) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMTexture3 + +DECLARE_INTERFACE_(IDirect3DRMTexture3, IDirect3DRMVisual) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMTexture3 methods + */ + STDMETHOD(InitFromFile)(THIS_ const char *filename) PURE; + STDMETHOD(InitFromSurface)(THIS_ LPDIRECTDRAWSURFACE lpDDS) PURE; + STDMETHOD(InitFromResource)(THIS_ HRSRC) PURE; + STDMETHOD(Changed)(THIS_ DWORD dwFlags, DWORD dwcRects, LPRECT pRects) PURE; + STDMETHOD(SetColors)(THIS_ DWORD) PURE; + STDMETHOD(SetShades)(THIS_ DWORD) PURE; + STDMETHOD(SetDecalSize)(THIS_ D3DVALUE width, D3DVALUE height) PURE; + STDMETHOD(SetDecalOrigin)(THIS_ LONG x, LONG y) PURE; + STDMETHOD(SetDecalScale)(THIS_ DWORD) PURE; + STDMETHOD(SetDecalTransparency)(THIS_ BOOL) PURE; + STDMETHOD(SetDecalTransparentColor)(THIS_ D3DCOLOR) PURE; + + STDMETHOD(GetDecalSize)(THIS_ D3DVALUE *width_return, D3DVALUE *height_return) PURE; + STDMETHOD(GetDecalOrigin)(THIS_ LONG *x_return, LONG *y_return) PURE; + + STDMETHOD_(D3DRMIMAGE *, GetImage)(THIS) PURE; + STDMETHOD_(DWORD, GetShades)(THIS) PURE; + STDMETHOD_(DWORD, GetColors)(THIS) PURE; + STDMETHOD_(DWORD, GetDecalScale)(THIS) PURE; + STDMETHOD_(BOOL, GetDecalTransparency)(THIS) PURE; + STDMETHOD_(D3DCOLOR, GetDecalTransparentColor)(THIS) PURE; + STDMETHOD(InitFromImage)(THIS_ LPD3DRMIMAGE) PURE; + STDMETHOD(InitFromResource2)(THIS_ HMODULE hModule, LPCTSTR strName, LPCTSTR strType) PURE; + STDMETHOD(GenerateMIPMap)(THIS_ DWORD) PURE; + STDMETHOD(GetSurface)(THIS_ DWORD dwFlags, LPDIRECTDRAWSURFACE* lplpDDS) PURE; + STDMETHOD(SetCacheOptions)(THIS_ LONG lImportance, DWORD dwFlags) PURE; + STDMETHOD(GetCacheOptions)(THIS_ LPLONG lplImportance, LPDWORD lpdwFlags) PURE; + STDMETHOD(SetDownsampleCallback)(THIS_ D3DRMDOWNSAMPLECALLBACK pCallback, LPVOID pArg) PURE; + STDMETHOD(SetValidationCallback)(THIS_ D3DRMVALIDATIONCALLBACK pCallback, LPVOID pArg) PURE; +}; + + +#undef INTERFACE +#define INTERFACE IDirect3DRMWrap + +DECLARE_INTERFACE_(IDirect3DRMWrap, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMWrap methods + */ + STDMETHOD(Init) + ( THIS_ D3DRMWRAPTYPE, LPDIRECT3DRMFRAME ref, + D3DVALUE ox, D3DVALUE oy, D3DVALUE oz, + D3DVALUE dx, D3DVALUE dy, D3DVALUE dz, + D3DVALUE ux, D3DVALUE uy, D3DVALUE uz, + D3DVALUE ou, D3DVALUE ov, + D3DVALUE su, D3DVALUE sv + ) PURE; + STDMETHOD(Apply)(THIS_ LPDIRECT3DRMOBJECT) PURE; + STDMETHOD(ApplyRelative)(THIS_ LPDIRECT3DRMFRAME frame, LPDIRECT3DRMOBJECT) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMMaterial + +DECLARE_INTERFACE_(IDirect3DRMMaterial, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMMaterial methods + */ + STDMETHOD(SetPower)(THIS_ D3DVALUE power) PURE; + STDMETHOD(SetSpecular)(THIS_ D3DVALUE r, D3DVALUE g, D3DVALUE b) PURE; + STDMETHOD(SetEmissive)(THIS_ D3DVALUE r, D3DVALUE g, D3DVALUE b) PURE; + + STDMETHOD_(D3DVALUE, GetPower)(THIS) PURE; + STDMETHOD(GetSpecular)(THIS_ D3DVALUE* r, D3DVALUE* g, D3DVALUE* b) PURE; + STDMETHOD(GetEmissive)(THIS_ D3DVALUE* r, D3DVALUE* g, D3DVALUE* b) PURE; +}; + + +#undef INTERFACE +#define INTERFACE IDirect3DRMMaterial2 + +DECLARE_INTERFACE_(IDirect3DRMMaterial2, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMMaterial2 methods + */ + STDMETHOD(SetPower)(THIS_ D3DVALUE power) PURE; + STDMETHOD(SetSpecular)(THIS_ D3DVALUE r, D3DVALUE g, D3DVALUE b) PURE; + STDMETHOD(SetEmissive)(THIS_ D3DVALUE r, D3DVALUE g, D3DVALUE b) PURE; + STDMETHOD_(D3DVALUE, GetPower)(THIS) PURE; + STDMETHOD(GetSpecular)(THIS_ D3DVALUE* r, D3DVALUE* g, D3DVALUE* b) PURE; + STDMETHOD(GetEmissive)(THIS_ D3DVALUE* r, D3DVALUE* g, D3DVALUE* b) PURE; + STDMETHOD(GetAmbient)(THIS_ D3DVALUE* r, D3DVALUE* g, D3DVALUE* b) PURE; + STDMETHOD(SetAmbient)(THIS_ D3DVALUE r, D3DVALUE g, D3DVALUE b) PURE; +}; + + +#undef INTERFACE +#define INTERFACE IDirect3DRMAnimation + +DECLARE_INTERFACE_(IDirect3DRMAnimation, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMAnimation methods + */ + STDMETHOD(SetOptions)(THIS_ D3DRMANIMATIONOPTIONS flags) PURE; + STDMETHOD(AddRotateKey)(THIS_ D3DVALUE time, D3DRMQUATERNION *q) PURE; + STDMETHOD(AddPositionKey)(THIS_ D3DVALUE time, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(AddScaleKey)(THIS_ D3DVALUE time, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(DeleteKey)(THIS_ D3DVALUE time) PURE; + STDMETHOD(SetFrame)(THIS_ LPDIRECT3DRMFRAME frame) PURE; + STDMETHOD(SetTime)(THIS_ D3DVALUE time) PURE; + + STDMETHOD_(D3DRMANIMATIONOPTIONS, GetOptions)(THIS) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMAnimation2 + +DECLARE_INTERFACE_(IDirect3DRMAnimation2, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMAnimation2 methods + */ + STDMETHOD(SetOptions)(THIS_ D3DRMANIMATIONOPTIONS flags) PURE; + STDMETHOD(AddRotateKey)(THIS_ D3DVALUE time, D3DRMQUATERNION *q) PURE; + STDMETHOD(AddPositionKey)(THIS_ D3DVALUE time, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(AddScaleKey)(THIS_ D3DVALUE time, D3DVALUE x, D3DVALUE y, D3DVALUE z) PURE; + STDMETHOD(DeleteKey)(THIS_ D3DVALUE time) PURE; + STDMETHOD(SetFrame)(THIS_ LPDIRECT3DRMFRAME3 frame) PURE; + STDMETHOD(SetTime)(THIS_ D3DVALUE time) PURE; + + STDMETHOD_(D3DRMANIMATIONOPTIONS, GetOptions)(THIS) PURE; + STDMETHOD(GetFrame)(THIS_ LPDIRECT3DRMFRAME3 *lpD3DFrame) PURE; + STDMETHOD(DeleteKeyByID)(THIS_ DWORD dwID) PURE; + STDMETHOD(AddKey)(THIS_ LPD3DRMANIMATIONKEY lpKey) PURE; + STDMETHOD(ModifyKey)(THIS_ LPD3DRMANIMATIONKEY lpKey) PURE; + STDMETHOD(GetKeys)(THIS_ D3DVALUE dvTimeMin, + D3DVALUE dvTimeMax, LPDWORD lpdwNumKeys, + LPD3DRMANIMATIONKEY lpKey); +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMAnimationSet + +DECLARE_INTERFACE_(IDirect3DRMAnimationSet, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMAnimationSet methods + */ + STDMETHOD(AddAnimation)(THIS_ LPDIRECT3DRMANIMATION aid) PURE; + STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURECALLBACK, LPVOID lpArg, LPDIRECT3DRMFRAME parent)PURE; + STDMETHOD(DeleteAnimation)(THIS_ LPDIRECT3DRMANIMATION aid) PURE; + STDMETHOD(SetTime)(THIS_ D3DVALUE time) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMAnimationSet2 + +DECLARE_INTERFACE_(IDirect3DRMAnimationSet2, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMAnimationSet2 methods + */ + STDMETHOD(AddAnimation)(THIS_ LPDIRECT3DRMANIMATION2 aid) PURE; + STDMETHOD(Load)(THIS_ LPVOID filename, LPVOID name, D3DRMLOADOPTIONS loadflags, D3DRMLOADTEXTURE3CALLBACK, LPVOID lpArg, LPDIRECT3DRMFRAME3 parent)PURE; + STDMETHOD(DeleteAnimation)(THIS_ LPDIRECT3DRMANIMATION2 aid) PURE; + STDMETHOD(SetTime)(THIS_ D3DVALUE time) PURE; + STDMETHOD(GetAnimations)(THIS_ LPDIRECT3DRMANIMATIONARRAY *) PURE; +}; + + +#undef INTERFACE +#define INTERFACE IDirect3DRMUserVisual + +DECLARE_INTERFACE_(IDirect3DRMUserVisual, IDirect3DRMVisual) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMUserVisual methods + */ + STDMETHOD(Init)(THIS_ D3DRMUSERVISUALCALLBACK fn, void *arg) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMArray + +DECLARE_INTERFACE_(IDirect3DRMArray, IUnknown) +{ + IUNKNOWN_METHODS(PURE); + + STDMETHOD_(DWORD, GetSize)(THIS) PURE; + /* No GetElement method as it would get overloaded + * in derived classes, and overloading is + * a no-no in COM + */ +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMObjectArray + +DECLARE_INTERFACE_(IDirect3DRMObjectArray, IDirect3DRMArray) +{ + IUNKNOWN_METHODS(PURE); + + STDMETHOD_(DWORD, GetSize)(THIS) PURE; + STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMOBJECT *) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMDeviceArray + +DECLARE_INTERFACE_(IDirect3DRMDeviceArray, IDirect3DRMArray) +{ + IUNKNOWN_METHODS(PURE); + + STDMETHOD_(DWORD, GetSize)(THIS) PURE; + STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMDEVICE *) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMFrameArray + +DECLARE_INTERFACE_(IDirect3DRMFrameArray, IDirect3DRMArray) +{ + IUNKNOWN_METHODS(PURE); + + STDMETHOD_(DWORD, GetSize)(THIS) PURE; + STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMFRAME *) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMViewportArray + +DECLARE_INTERFACE_(IDirect3DRMViewportArray, IDirect3DRMArray) +{ + IUNKNOWN_METHODS(PURE); + + STDMETHOD_(DWORD, GetSize)(THIS) PURE; + STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMVIEWPORT *) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMVisualArray + +DECLARE_INTERFACE_(IDirect3DRMVisualArray, IDirect3DRMArray) +{ + IUNKNOWN_METHODS(PURE); + + STDMETHOD_(DWORD, GetSize)(THIS) PURE; + STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMVISUAL *) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMAnimationArray + +DECLARE_INTERFACE_(IDirect3DRMAnimationArray, IDirect3DRMArray) +{ + IUNKNOWN_METHODS(PURE); + + STDMETHOD_(DWORD, GetSize)(THIS) PURE; + STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMANIMATION2 *) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMPickedArray + +DECLARE_INTERFACE_(IDirect3DRMPickedArray, IDirect3DRMArray) +{ + IUNKNOWN_METHODS(PURE); + + STDMETHOD_(DWORD, GetSize)(THIS) PURE; + STDMETHOD(GetPick)(THIS_ DWORD index, LPDIRECT3DRMVISUAL *, LPDIRECT3DRMFRAMEARRAY *, LPD3DRMPICKDESC) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMLightArray + +DECLARE_INTERFACE_(IDirect3DRMLightArray, IDirect3DRMArray) +{ + IUNKNOWN_METHODS(PURE); + + STDMETHOD_(DWORD, GetSize)(THIS) PURE; + STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMLIGHT *) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMFaceArray + +DECLARE_INTERFACE_(IDirect3DRMFaceArray, IDirect3DRMArray) +{ + IUNKNOWN_METHODS(PURE); + + STDMETHOD_(DWORD, GetSize)(THIS) PURE; + STDMETHOD(GetElement)(THIS_ DWORD index, LPDIRECT3DRMFACE *) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMPicked2Array + +DECLARE_INTERFACE_(IDirect3DRMPicked2Array, IDirect3DRMArray) +{ + IUNKNOWN_METHODS(PURE); + + STDMETHOD_(DWORD, GetSize)(THIS) PURE; + STDMETHOD(GetPick)(THIS_ DWORD index, LPDIRECT3DRMVISUAL *, LPDIRECT3DRMFRAMEARRAY *, LPD3DRMPICKDESC2) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMInterpolator + +DECLARE_INTERFACE_(IDirect3DRMInterpolator, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMInterpolator methods + */ + STDMETHOD(AttachObject)(THIS_ LPDIRECT3DRMOBJECT) PURE; + STDMETHOD(GetAttachedObjects)(THIS_ LPDIRECT3DRMOBJECTARRAY *) PURE; + STDMETHOD(DetachObject)(THIS_ LPDIRECT3DRMOBJECT) PURE; + STDMETHOD(SetIndex)(THIS_ D3DVALUE) PURE; + STDMETHOD_(D3DVALUE, GetIndex)(THIS) PURE; + STDMETHOD(Interpolate)(THIS_ D3DVALUE, LPDIRECT3DRMOBJECT, D3DRMINTERPOLATIONOPTIONS) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirect3DRMClippedVisual + +DECLARE_INTERFACE_(IDirect3DRMClippedVisual, IDirect3DRMVisual) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMClippedVisual methods + */ + STDMETHOD(Init) (THIS_ LPDIRECT3DRMVISUAL) PURE; + STDMETHOD(AddPlane) (THIS_ LPDIRECT3DRMFRAME3, LPD3DVECTOR, LPD3DVECTOR, DWORD, LPDWORD) PURE; + STDMETHOD(DeletePlane)(THIS_ DWORD, DWORD) PURE; + STDMETHOD(GetPlaneIDs)(THIS_ LPDWORD, LPDWORD, DWORD) PURE; + STDMETHOD(GetPlane) (THIS_ DWORD, LPDIRECT3DRMFRAME3, LPD3DVECTOR, LPD3DVECTOR, DWORD) PURE; + STDMETHOD(SetPlane) (THIS_ DWORD, LPDIRECT3DRMFRAME3, LPD3DVECTOR, LPD3DVECTOR, DWORD) PURE; +}; + +#ifdef __cplusplus +}; +#endif +#endif /* _D3DRMOBJ_H_ */ + diff --git a/windows_libs/mssdk/include/d3drmwin.h b/windows_libs/mssdk/include/d3drmwin.h new file mode 100644 index 00000000..3ed5c9d0 --- /dev/null +++ b/windows_libs/mssdk/include/d3drmwin.h @@ -0,0 +1,50 @@ +/*==========================================================================; + * + * Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved. + * + * File: d3drm.h + * Content: Direct3DRM include file + * + ***************************************************************************/ + +#ifndef __D3DRMWIN_H__ +#define __D3DRMWIN_H__ + +#ifndef WIN32 +#define WIN32 +#endif + +#include "d3drm.h" + +#include "ddraw.h" +#include "d3d.h" + +/* + * GUIDS used by Direct3DRM Windows interface + */ +DEFINE_GUID(IID_IDirect3DRMWinDevice, 0xc5016cc0, 0xd273, 0x11ce, 0xac, 0x48, 0x0, 0x0, 0xc0, 0x38, 0x25, 0xa1); + +WIN_TYPES(IDirect3DRMWinDevice, DIRECT3DRMWINDEVICE); + +#undef INTERFACE +#define INTERFACE IDirect3DRMWinDevice + +DECLARE_INTERFACE_(IDirect3DRMWinDevice, IDirect3DRMObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECT3DRMOBJECT_METHODS(PURE); + + /* + * IDirect3DRMWinDevice methods + */ + + /* Repaint the window with the last frame which was rendered. */ + STDMETHOD(HandlePaint)(THIS_ HDC hdc) PURE; + + /* Respond to a WM_ACTIVATE message. */ + STDMETHOD(HandleActivate)(THIS_ WORD wparam) PURE; +}; + + +#endif + diff --git a/windows_libs/mssdk/include/d3dtypes.h b/windows_libs/mssdk/include/d3dtypes.h new file mode 100644 index 00000000..eb8d4f43 --- /dev/null +++ b/windows_libs/mssdk/include/d3dtypes.h @@ -0,0 +1,2117 @@ +/*==========================================================================; + * + * Copyright (C) 1995-1998 Microsoft Corporation. All Rights Reserved. + * + * File: d3dtypes.h + * Content: Direct3D types include file + * + ***************************************************************************/ + +#ifndef _D3DTYPES_H_ +#define _D3DTYPES_H_ + +#ifndef DIRECT3D_VERSION +#define DIRECT3D_VERSION 0x0700 +#endif + +#if (DIRECT3D_VERSION >= 0x0800) +#pragma message("should not include d3dtypes.h when compiling for DX8 or newer interfaces") +#endif + +#include + +#include +#include "ddraw.h" + +#pragma warning(disable:4201) // anonymous unions warning +#pragma pack(4) + + +/* D3DVALUE is the fundamental Direct3D fractional data type */ + +#define D3DVALP(val, prec) ((float)(val)) +#define D3DVAL(val) ((float)(val)) + +#ifndef DX_SHARED_DEFINES + +/* + * This definition is shared with other DirectX components whose header files + * might already have defined it. Therefore, we don't define this type if + * someone else already has (as indicated by the definition of + * DX_SHARED_DEFINES). We don't set DX_SHARED_DEFINES here as there are + * other types in this header that are also shared. The last of these + * shared defines in this file will set DX_SHARED_DEFINES. + */ +typedef float D3DVALUE, *LPD3DVALUE; + +#endif /* DX_SHARED_DEFINES */ + +#define D3DDivide(a, b) (float)((double) (a) / (double) (b)) +#define D3DMultiply(a, b) ((a) * (b)) + +typedef LONG D3DFIXED; + +#ifndef RGB_MAKE +/* + * Format of CI colors is + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | alpha | color index | fraction | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ +#define CI_GETALPHA(ci) ((ci) >> 24) +#define CI_GETINDEX(ci) (((ci) >> 8) & 0xffff) +#define CI_GETFRACTION(ci) ((ci) & 0xff) +#define CI_ROUNDINDEX(ci) CI_GETINDEX((ci) + 0x80) +#define CI_MASKALPHA(ci) ((ci) & 0xffffff) +#define CI_MAKE(a, i, f) (((a) << 24) | ((i) << 8) | (f)) + +/* + * Format of RGBA colors is + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | alpha | red | green | blue | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ +#define RGBA_GETALPHA(rgb) ((rgb) >> 24) +#define RGBA_GETRED(rgb) (((rgb) >> 16) & 0xff) +#define RGBA_GETGREEN(rgb) (((rgb) >> 8) & 0xff) +#define RGBA_GETBLUE(rgb) ((rgb) & 0xff) +#define RGBA_MAKE(r, g, b, a) ((D3DCOLOR) (((a) << 24) | ((r) << 16) | ((g) << 8) | (b))) + +/* D3DRGB and D3DRGBA may be used as initialisers for D3DCOLORs + * The float values must be in the range 0..1 + */ +#define D3DRGB(r, g, b) \ + (0xff000000L | ( ((long)((r) * 255)) << 16) | (((long)((g) * 255)) << 8) | (long)((b) * 255)) +#define D3DRGBA(r, g, b, a) \ + ( (((long)((a) * 255)) << 24) | (((long)((r) * 255)) << 16) \ + | (((long)((g) * 255)) << 8) | (long)((b) * 255) \ + ) + +/* + * Format of RGB colors is + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + * | ignored | red | green | blue | + * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ + */ +#define RGB_GETRED(rgb) (((rgb) >> 16) & 0xff) +#define RGB_GETGREEN(rgb) (((rgb) >> 8) & 0xff) +#define RGB_GETBLUE(rgb) ((rgb) & 0xff) +#define RGBA_SETALPHA(rgba, x) (((x) << 24) | ((rgba) & 0x00ffffff)) +#define RGB_MAKE(r, g, b) ((D3DCOLOR) (((r) << 16) | ((g) << 8) | (b))) +#define RGBA_TORGB(rgba) ((D3DCOLOR) ((rgba) & 0xffffff)) +#define RGB_TORGBA(rgb) ((D3DCOLOR) ((rgb) | 0xff000000)) + +#endif + +/* + * Flags for Enumerate functions + */ + +/* + * Stop the enumeration + */ +#define D3DENUMRET_CANCEL DDENUMRET_CANCEL + +/* + * Continue the enumeration + */ +#define D3DENUMRET_OK DDENUMRET_OK + +typedef HRESULT (CALLBACK* LPD3DVALIDATECALLBACK)(LPVOID lpUserArg, DWORD dwOffset); +typedef HRESULT (CALLBACK* LPD3DENUMTEXTUREFORMATSCALLBACK)(LPDDSURFACEDESC lpDdsd, LPVOID lpContext); +typedef HRESULT (CALLBACK* LPD3DENUMPIXELFORMATSCALLBACK)(LPDDPIXELFORMAT lpDDPixFmt, LPVOID lpContext); + +#ifndef DX_SHARED_DEFINES + +/* + * This definition is shared with other DirectX components whose header files + * might already have defined it. Therefore, we don't define this type if + * someone else already has (as indicated by the definition of + * DX_SHARED_DEFINES). We don't set DX_SHARED_DEFINES here as there are + * other types in this header that are also shared. The last of these + * shared defines in this file will set DX_SHARED_DEFINES. + */ +#ifndef D3DCOLOR_DEFINED +typedef DWORD D3DCOLOR; +#define D3DCOLOR_DEFINED +#endif +typedef DWORD *LPD3DCOLOR; + +#endif /* DX_SHARED_DEFINES */ + +typedef DWORD D3DMATERIALHANDLE, *LPD3DMATERIALHANDLE; +typedef DWORD D3DTEXTUREHANDLE, *LPD3DTEXTUREHANDLE; +typedef DWORD D3DMATRIXHANDLE, *LPD3DMATRIXHANDLE; + +#ifndef D3DCOLORVALUE_DEFINED +typedef struct _D3DCOLORVALUE { + union { + D3DVALUE r; + D3DVALUE dvR; + }; + union { + D3DVALUE g; + D3DVALUE dvG; + }; + union { + D3DVALUE b; + D3DVALUE dvB; + }; + union { + D3DVALUE a; + D3DVALUE dvA; + }; +} D3DCOLORVALUE; +#define D3DCOLORVALUE_DEFINED +#endif +typedef struct _D3DCOLORVALUE *LPD3DCOLORVALUE; + +#ifndef D3DRECT_DEFINED +typedef struct _D3DRECT { + union { + LONG x1; + LONG lX1; + }; + union { + LONG y1; + LONG lY1; + }; + union { + LONG x2; + LONG lX2; + }; + union { + LONG y2; + LONG lY2; + }; +} D3DRECT; +#define D3DRECT_DEFINED +#endif +typedef struct _D3DRECT *LPD3DRECT; + +#ifndef DX_SHARED_DEFINES + +/* + * This definition is shared with other DirectX components whose header files + * might already have defined it. Therefore, we don't define this type if + * someone else already has (as indicated by the definition of + * DX_SHARED_DEFINES). + */ + +#ifndef D3DVECTOR_DEFINED +typedef struct _D3DVECTOR { + union { + D3DVALUE x; + D3DVALUE dvX; + }; + union { + D3DVALUE y; + D3DVALUE dvY; + }; + union { + D3DVALUE z; + D3DVALUE dvZ; + }; +#if(DIRECT3D_VERSION >= 0x0500) +#if (defined __cplusplus) && (defined D3D_OVERLOADS) + +public: + + // ===================================== + // Constructors + // ===================================== + + _D3DVECTOR() { } + _D3DVECTOR(D3DVALUE f); + _D3DVECTOR(D3DVALUE _x, D3DVALUE _y, D3DVALUE _z); + _D3DVECTOR(const D3DVALUE f[3]); + + // ===================================== + // Access grants + // ===================================== + + const D3DVALUE&operator[](int i) const; + D3DVALUE&operator[](int i); + + // ===================================== + // Assignment operators + // ===================================== + + _D3DVECTOR& operator += (const _D3DVECTOR& v); + _D3DVECTOR& operator -= (const _D3DVECTOR& v); + _D3DVECTOR& operator *= (const _D3DVECTOR& v); + _D3DVECTOR& operator /= (const _D3DVECTOR& v); + _D3DVECTOR& operator *= (D3DVALUE s); + _D3DVECTOR& operator /= (D3DVALUE s); + + // ===================================== + // Unary operators + // ===================================== + + friend _D3DVECTOR operator + (const _D3DVECTOR& v); + friend _D3DVECTOR operator - (const _D3DVECTOR& v); + + + // ===================================== + // Binary operators + // ===================================== + + // Addition and subtraction + friend _D3DVECTOR operator + (const _D3DVECTOR& v1, const _D3DVECTOR& v2); + friend _D3DVECTOR operator - (const _D3DVECTOR& v1, const _D3DVECTOR& v2); + // Scalar multiplication and division + friend _D3DVECTOR operator * (const _D3DVECTOR& v, D3DVALUE s); + friend _D3DVECTOR operator * (D3DVALUE s, const _D3DVECTOR& v); + friend _D3DVECTOR operator / (const _D3DVECTOR& v, D3DVALUE s); + // Memberwise multiplication and division + friend _D3DVECTOR operator * (const _D3DVECTOR& v1, const _D3DVECTOR& v2); + friend _D3DVECTOR operator / (const _D3DVECTOR& v1, const _D3DVECTOR& v2); + + // Vector dominance + friend int operator < (const _D3DVECTOR& v1, const _D3DVECTOR& v2); + friend int operator <= (const _D3DVECTOR& v1, const _D3DVECTOR& v2); + + // Bitwise equality + friend int operator == (const _D3DVECTOR& v1, const _D3DVECTOR& v2); + + // Length-related functions + friend D3DVALUE SquareMagnitude (const _D3DVECTOR& v); + friend D3DVALUE Magnitude (const _D3DVECTOR& v); + + // Returns vector with same direction and unit length + friend _D3DVECTOR Normalize (const _D3DVECTOR& v); + + // Return min/max component of the input vector + friend D3DVALUE Min (const _D3DVECTOR& v); + friend D3DVALUE Max (const _D3DVECTOR& v); + + // Return memberwise min/max of input vectors + friend _D3DVECTOR Minimize (const _D3DVECTOR& v1, const _D3DVECTOR& v2); + friend _D3DVECTOR Maximize (const _D3DVECTOR& v1, const _D3DVECTOR& v2); + + // Dot and cross product + friend D3DVALUE DotProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2); + friend _D3DVECTOR CrossProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2); + +#endif +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DVECTOR; +#define D3DVECTOR_DEFINED +#endif +typedef struct _D3DVECTOR *LPD3DVECTOR; + +/* + * As this is the last of the shared defines to be defined we now set + * D3D_SHARED_DEFINES to flag that fact that this header has defined these + * types. + */ +#define DX_SHARED_DEFINES + +#endif /* DX_SHARED_DEFINES */ + +/* + * Vertex data types supported in an ExecuteBuffer. + */ + +/* + * Homogeneous vertices + */ + +typedef struct _D3DHVERTEX { + DWORD dwFlags; /* Homogeneous clipping flags */ + union { + D3DVALUE hx; + D3DVALUE dvHX; + }; + union { + D3DVALUE hy; + D3DVALUE dvHY; + }; + union { + D3DVALUE hz; + D3DVALUE dvHZ; + }; +} D3DHVERTEX, *LPD3DHVERTEX; + +/* + * Transformed/lit vertices + */ +typedef struct _D3DTLVERTEX { + union { + D3DVALUE sx; /* Screen coordinates */ + D3DVALUE dvSX; + }; + union { + D3DVALUE sy; + D3DVALUE dvSY; + }; + union { + D3DVALUE sz; + D3DVALUE dvSZ; + }; + union { + D3DVALUE rhw; /* Reciprocal of homogeneous w */ + D3DVALUE dvRHW; + }; + union { + D3DCOLOR color; /* Vertex color */ + D3DCOLOR dcColor; + }; + union { + D3DCOLOR specular; /* Specular component of vertex */ + D3DCOLOR dcSpecular; + }; + union { + D3DVALUE tu; /* Texture coordinates */ + D3DVALUE dvTU; + }; + union { + D3DVALUE tv; + D3DVALUE dvTV; + }; +#if(DIRECT3D_VERSION >= 0x0500) +#if (defined __cplusplus) && (defined D3D_OVERLOADS) + _D3DTLVERTEX() { } + _D3DTLVERTEX(const D3DVECTOR& v, float _rhw, + D3DCOLOR _color, D3DCOLOR _specular, + float _tu, float _tv) + { sx = v.x; sy = v.y; sz = v.z; rhw = _rhw; + color = _color; specular = _specular; + tu = _tu; tv = _tv; + } +#endif +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DTLVERTEX, *LPD3DTLVERTEX; + +/* + * Untransformed/lit vertices + */ +typedef struct _D3DLVERTEX { + union { + D3DVALUE x; /* Homogeneous coordinates */ + D3DVALUE dvX; + }; + union { + D3DVALUE y; + D3DVALUE dvY; + }; + union { + D3DVALUE z; + D3DVALUE dvZ; + }; + DWORD dwReserved; + union { + D3DCOLOR color; /* Vertex color */ + D3DCOLOR dcColor; + }; + union { + D3DCOLOR specular; /* Specular component of vertex */ + D3DCOLOR dcSpecular; + }; + union { + D3DVALUE tu; /* Texture coordinates */ + D3DVALUE dvTU; + }; + union { + D3DVALUE tv; + D3DVALUE dvTV; + }; +#if(DIRECT3D_VERSION >= 0x0500) +#if (defined __cplusplus) && (defined D3D_OVERLOADS) + _D3DLVERTEX() { } + _D3DLVERTEX(const D3DVECTOR& v, + D3DCOLOR _color, D3DCOLOR _specular, + float _tu, float _tv) + { x = v.x; y = v.y; z = v.z; dwReserved = 0; + color = _color; specular = _specular; + tu = _tu; tv = _tv; + } +#endif +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DLVERTEX, *LPD3DLVERTEX; + +/* + * Untransformed/unlit vertices + */ + +typedef struct _D3DVERTEX { + union { + D3DVALUE x; /* Homogeneous coordinates */ + D3DVALUE dvX; + }; + union { + D3DVALUE y; + D3DVALUE dvY; + }; + union { + D3DVALUE z; + D3DVALUE dvZ; + }; + union { + D3DVALUE nx; /* Normal */ + D3DVALUE dvNX; + }; + union { + D3DVALUE ny; + D3DVALUE dvNY; + }; + union { + D3DVALUE nz; + D3DVALUE dvNZ; + }; + union { + D3DVALUE tu; /* Texture coordinates */ + D3DVALUE dvTU; + }; + union { + D3DVALUE tv; + D3DVALUE dvTV; + }; +#if(DIRECT3D_VERSION >= 0x0500) +#if (defined __cplusplus) && (defined D3D_OVERLOADS) + _D3DVERTEX() { } + _D3DVERTEX(const D3DVECTOR& v, const D3DVECTOR& n, float _tu, float _tv) + { x = v.x; y = v.y; z = v.z; + nx = n.x; ny = n.y; nz = n.z; + tu = _tu; tv = _tv; + } +#endif +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DVERTEX, *LPD3DVERTEX; + + +/* + * Matrix, viewport, and tranformation structures and definitions. + */ + +#ifndef D3DMATRIX_DEFINED +typedef struct _D3DMATRIX { +#if(DIRECT3D_VERSION >= 0x0500) +#if (defined __cplusplus) && (defined D3D_OVERLOADS) + union { + struct { +#endif + +#endif /* DIRECT3D_VERSION >= 0x0500 */ + D3DVALUE _11, _12, _13, _14; + D3DVALUE _21, _22, _23, _24; + D3DVALUE _31, _32, _33, _34; + D3DVALUE _41, _42, _43, _44; + +#if(DIRECT3D_VERSION >= 0x0500) +#if (defined __cplusplus) && (defined D3D_OVERLOADS) + }; + D3DVALUE m[4][4]; + }; + _D3DMATRIX() { } + _D3DMATRIX( D3DVALUE _m00, D3DVALUE _m01, D3DVALUE _m02, D3DVALUE _m03, + D3DVALUE _m10, D3DVALUE _m11, D3DVALUE _m12, D3DVALUE _m13, + D3DVALUE _m20, D3DVALUE _m21, D3DVALUE _m22, D3DVALUE _m23, + D3DVALUE _m30, D3DVALUE _m31, D3DVALUE _m32, D3DVALUE _m33 + ) + { + m[0][0] = _m00; m[0][1] = _m01; m[0][2] = _m02; m[0][3] = _m03; + m[1][0] = _m10; m[1][1] = _m11; m[1][2] = _m12; m[1][3] = _m13; + m[2][0] = _m20; m[2][1] = _m21; m[2][2] = _m22; m[2][3] = _m23; + m[3][0] = _m30; m[3][1] = _m31; m[3][2] = _m32; m[3][3] = _m33; + } + + D3DVALUE& operator()(int iRow, int iColumn) { return m[iRow][iColumn]; } + const D3DVALUE& operator()(int iRow, int iColumn) const { return m[iRow][iColumn]; } +#if(DIRECT3D_VERSION >= 0x0600) + friend _D3DMATRIX operator* (const _D3DMATRIX&, const _D3DMATRIX&); +#endif /* DIRECT3D_VERSION >= 0x0600 */ +#endif +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DMATRIX; +#define D3DMATRIX_DEFINED +#endif +typedef struct _D3DMATRIX *LPD3DMATRIX; + +#if (defined __cplusplus) && (defined D3D_OVERLOADS) +#include "d3dvec.inl" +#endif + +typedef struct _D3DVIEWPORT { + DWORD dwSize; + DWORD dwX; + DWORD dwY; /* Top left */ + DWORD dwWidth; + DWORD dwHeight; /* Dimensions */ + D3DVALUE dvScaleX; /* Scale homogeneous to screen */ + D3DVALUE dvScaleY; /* Scale homogeneous to screen */ + D3DVALUE dvMaxX; /* Min/max homogeneous x coord */ + D3DVALUE dvMaxY; /* Min/max homogeneous y coord */ + D3DVALUE dvMinZ; + D3DVALUE dvMaxZ; /* Min/max homogeneous z coord */ +} D3DVIEWPORT, *LPD3DVIEWPORT; + +#if(DIRECT3D_VERSION >= 0x0500) +typedef struct _D3DVIEWPORT2 { + DWORD dwSize; + DWORD dwX; + DWORD dwY; /* Viewport Top left */ + DWORD dwWidth; + DWORD dwHeight; /* Viewport Dimensions */ + D3DVALUE dvClipX; /* Top left of clip volume */ + D3DVALUE dvClipY; + D3DVALUE dvClipWidth; /* Clip Volume Dimensions */ + D3DVALUE dvClipHeight; + D3DVALUE dvMinZ; /* Min/max of clip Volume */ + D3DVALUE dvMaxZ; +} D3DVIEWPORT2, *LPD3DVIEWPORT2; +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#if(DIRECT3D_VERSION >= 0x0700) +typedef struct _D3DVIEWPORT7 { + DWORD dwX; + DWORD dwY; /* Viewport Top left */ + DWORD dwWidth; + DWORD dwHeight; /* Viewport Dimensions */ + D3DVALUE dvMinZ; /* Min/max of clip Volume */ + D3DVALUE dvMaxZ; +} D3DVIEWPORT7, *LPD3DVIEWPORT7; +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +/* + * Values for clip fields. + */ + +#if(DIRECT3D_VERSION >= 0x0700) + +// Max number of user clipping planes, supported in D3D. +#define D3DMAXUSERCLIPPLANES 32 + +// These bits could be ORed together to use with D3DRENDERSTATE_CLIPPLANEENABLE +// +#define D3DCLIPPLANE0 (1 << 0) +#define D3DCLIPPLANE1 (1 << 1) +#define D3DCLIPPLANE2 (1 << 2) +#define D3DCLIPPLANE3 (1 << 3) +#define D3DCLIPPLANE4 (1 << 4) +#define D3DCLIPPLANE5 (1 << 5) + +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +#define D3DCLIP_LEFT 0x00000001L +#define D3DCLIP_RIGHT 0x00000002L +#define D3DCLIP_TOP 0x00000004L +#define D3DCLIP_BOTTOM 0x00000008L +#define D3DCLIP_FRONT 0x00000010L +#define D3DCLIP_BACK 0x00000020L +#define D3DCLIP_GEN0 0x00000040L +#define D3DCLIP_GEN1 0x00000080L +#define D3DCLIP_GEN2 0x00000100L +#define D3DCLIP_GEN3 0x00000200L +#define D3DCLIP_GEN4 0x00000400L +#define D3DCLIP_GEN5 0x00000800L + +/* + * Values for d3d status. + */ +#define D3DSTATUS_CLIPUNIONLEFT D3DCLIP_LEFT +#define D3DSTATUS_CLIPUNIONRIGHT D3DCLIP_RIGHT +#define D3DSTATUS_CLIPUNIONTOP D3DCLIP_TOP +#define D3DSTATUS_CLIPUNIONBOTTOM D3DCLIP_BOTTOM +#define D3DSTATUS_CLIPUNIONFRONT D3DCLIP_FRONT +#define D3DSTATUS_CLIPUNIONBACK D3DCLIP_BACK +#define D3DSTATUS_CLIPUNIONGEN0 D3DCLIP_GEN0 +#define D3DSTATUS_CLIPUNIONGEN1 D3DCLIP_GEN1 +#define D3DSTATUS_CLIPUNIONGEN2 D3DCLIP_GEN2 +#define D3DSTATUS_CLIPUNIONGEN3 D3DCLIP_GEN3 +#define D3DSTATUS_CLIPUNIONGEN4 D3DCLIP_GEN4 +#define D3DSTATUS_CLIPUNIONGEN5 D3DCLIP_GEN5 + +#define D3DSTATUS_CLIPINTERSECTIONLEFT 0x00001000L +#define D3DSTATUS_CLIPINTERSECTIONRIGHT 0x00002000L +#define D3DSTATUS_CLIPINTERSECTIONTOP 0x00004000L +#define D3DSTATUS_CLIPINTERSECTIONBOTTOM 0x00008000L +#define D3DSTATUS_CLIPINTERSECTIONFRONT 0x00010000L +#define D3DSTATUS_CLIPINTERSECTIONBACK 0x00020000L +#define D3DSTATUS_CLIPINTERSECTIONGEN0 0x00040000L +#define D3DSTATUS_CLIPINTERSECTIONGEN1 0x00080000L +#define D3DSTATUS_CLIPINTERSECTIONGEN2 0x00100000L +#define D3DSTATUS_CLIPINTERSECTIONGEN3 0x00200000L +#define D3DSTATUS_CLIPINTERSECTIONGEN4 0x00400000L +#define D3DSTATUS_CLIPINTERSECTIONGEN5 0x00800000L +#define D3DSTATUS_ZNOTVISIBLE 0x01000000L +/* Do not use 0x80000000 for any status flags in future as it is reserved */ + +#define D3DSTATUS_CLIPUNIONALL ( \ + D3DSTATUS_CLIPUNIONLEFT | \ + D3DSTATUS_CLIPUNIONRIGHT | \ + D3DSTATUS_CLIPUNIONTOP | \ + D3DSTATUS_CLIPUNIONBOTTOM | \ + D3DSTATUS_CLIPUNIONFRONT | \ + D3DSTATUS_CLIPUNIONBACK | \ + D3DSTATUS_CLIPUNIONGEN0 | \ + D3DSTATUS_CLIPUNIONGEN1 | \ + D3DSTATUS_CLIPUNIONGEN2 | \ + D3DSTATUS_CLIPUNIONGEN3 | \ + D3DSTATUS_CLIPUNIONGEN4 | \ + D3DSTATUS_CLIPUNIONGEN5 \ + ) + +#define D3DSTATUS_CLIPINTERSECTIONALL ( \ + D3DSTATUS_CLIPINTERSECTIONLEFT | \ + D3DSTATUS_CLIPINTERSECTIONRIGHT | \ + D3DSTATUS_CLIPINTERSECTIONTOP | \ + D3DSTATUS_CLIPINTERSECTIONBOTTOM | \ + D3DSTATUS_CLIPINTERSECTIONFRONT | \ + D3DSTATUS_CLIPINTERSECTIONBACK | \ + D3DSTATUS_CLIPINTERSECTIONGEN0 | \ + D3DSTATUS_CLIPINTERSECTIONGEN1 | \ + D3DSTATUS_CLIPINTERSECTIONGEN2 | \ + D3DSTATUS_CLIPINTERSECTIONGEN3 | \ + D3DSTATUS_CLIPINTERSECTIONGEN4 | \ + D3DSTATUS_CLIPINTERSECTIONGEN5 \ + ) + +#define D3DSTATUS_DEFAULT ( \ + D3DSTATUS_CLIPINTERSECTIONALL | \ + D3DSTATUS_ZNOTVISIBLE) + + +/* + * Options for direct transform calls + */ +#define D3DTRANSFORM_CLIPPED 0x00000001l +#define D3DTRANSFORM_UNCLIPPED 0x00000002l + +typedef struct _D3DTRANSFORMDATA { + DWORD dwSize; + LPVOID lpIn; /* Input vertices */ + DWORD dwInSize; /* Stride of input vertices */ + LPVOID lpOut; /* Output vertices */ + DWORD dwOutSize; /* Stride of output vertices */ + LPD3DHVERTEX lpHOut; /* Output homogeneous vertices */ + DWORD dwClip; /* Clipping hint */ + DWORD dwClipIntersection; + DWORD dwClipUnion; /* Union of all clip flags */ + D3DRECT drExtent; /* Extent of transformed vertices */ +} D3DTRANSFORMDATA, *LPD3DTRANSFORMDATA; + +/* + * Structure defining position and direction properties for lighting. + */ +typedef struct _D3DLIGHTINGELEMENT { + D3DVECTOR dvPosition; /* Lightable point in model space */ + D3DVECTOR dvNormal; /* Normalised unit vector */ +} D3DLIGHTINGELEMENT, *LPD3DLIGHTINGELEMENT; + +/* + * Structure defining material properties for lighting. + */ +typedef struct _D3DMATERIAL { + DWORD dwSize; + union { + D3DCOLORVALUE diffuse; /* Diffuse color RGBA */ + D3DCOLORVALUE dcvDiffuse; + }; + union { + D3DCOLORVALUE ambient; /* Ambient color RGB */ + D3DCOLORVALUE dcvAmbient; + }; + union { + D3DCOLORVALUE specular; /* Specular 'shininess' */ + D3DCOLORVALUE dcvSpecular; + }; + union { + D3DCOLORVALUE emissive; /* Emissive color RGB */ + D3DCOLORVALUE dcvEmissive; + }; + union { + D3DVALUE power; /* Sharpness if specular highlight */ + D3DVALUE dvPower; + }; + D3DTEXTUREHANDLE hTexture; /* Handle to texture map */ + DWORD dwRampSize; +} D3DMATERIAL, *LPD3DMATERIAL; + +#if(DIRECT3D_VERSION >= 0x0700) + +typedef struct _D3DMATERIAL7 { + union { + D3DCOLORVALUE diffuse; /* Diffuse color RGBA */ + D3DCOLORVALUE dcvDiffuse; + }; + union { + D3DCOLORVALUE ambient; /* Ambient color RGB */ + D3DCOLORVALUE dcvAmbient; + }; + union { + D3DCOLORVALUE specular; /* Specular 'shininess' */ + D3DCOLORVALUE dcvSpecular; + }; + union { + D3DCOLORVALUE emissive; /* Emissive color RGB */ + D3DCOLORVALUE dcvEmissive; + }; + union { + D3DVALUE power; /* Sharpness if specular highlight */ + D3DVALUE dvPower; + }; +} D3DMATERIAL7, *LPD3DMATERIAL7; + +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +#if(DIRECT3D_VERSION < 0x0800) + +typedef enum _D3DLIGHTTYPE { + D3DLIGHT_POINT = 1, + D3DLIGHT_SPOT = 2, + D3DLIGHT_DIRECTIONAL = 3, +// Note: The following light type (D3DLIGHT_PARALLELPOINT) +// is no longer supported from D3D for DX7 onwards. + D3DLIGHT_PARALLELPOINT = 4, +#if(DIRECT3D_VERSION < 0x0500) // For backward compatible headers + D3DLIGHT_GLSPOT = 5, +#endif + D3DLIGHT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DLIGHTTYPE; + +#else +typedef enum _D3DLIGHTTYPE D3DLIGHTTYPE; +#define D3DLIGHT_PARALLELPOINT (D3DLIGHTTYPE)4 +#define D3DLIGHT_GLSPOT (D3DLIGHTTYPE)5 + +#endif //(DIRECT3D_VERSION < 0x0800) + +/* + * Structure defining a light source and its properties. + */ +typedef struct _D3DLIGHT { + DWORD dwSize; + D3DLIGHTTYPE dltType; /* Type of light source */ + D3DCOLORVALUE dcvColor; /* Color of light */ + D3DVECTOR dvPosition; /* Position in world space */ + D3DVECTOR dvDirection; /* Direction in world space */ + D3DVALUE dvRange; /* Cutoff range */ + D3DVALUE dvFalloff; /* Falloff */ + D3DVALUE dvAttenuation0; /* Constant attenuation */ + D3DVALUE dvAttenuation1; /* Linear attenuation */ + D3DVALUE dvAttenuation2; /* Quadratic attenuation */ + D3DVALUE dvTheta; /* Inner angle of spotlight cone */ + D3DVALUE dvPhi; /* Outer angle of spotlight cone */ +} D3DLIGHT, *LPD3DLIGHT; + +#if(DIRECT3D_VERSION >= 0x0700) + +typedef struct _D3DLIGHT7 { + D3DLIGHTTYPE dltType; /* Type of light source */ + D3DCOLORVALUE dcvDiffuse; /* Diffuse color of light */ + D3DCOLORVALUE dcvSpecular; /* Specular color of light */ + D3DCOLORVALUE dcvAmbient; /* Ambient color of light */ + D3DVECTOR dvPosition; /* Position in world space */ + D3DVECTOR dvDirection; /* Direction in world space */ + D3DVALUE dvRange; /* Cutoff range */ + D3DVALUE dvFalloff; /* Falloff */ + D3DVALUE dvAttenuation0; /* Constant attenuation */ + D3DVALUE dvAttenuation1; /* Linear attenuation */ + D3DVALUE dvAttenuation2; /* Quadratic attenuation */ + D3DVALUE dvTheta; /* Inner angle of spotlight cone */ + D3DVALUE dvPhi; /* Outer angle of spotlight cone */ +} D3DLIGHT7, *LPD3DLIGHT7; + +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +#if(DIRECT3D_VERSION >= 0x0500) +/* + * Structure defining a light source and its properties. + */ + +/* flags bits */ +#define D3DLIGHT_ACTIVE 0x00000001 +#define D3DLIGHT_NO_SPECULAR 0x00000002 +#define D3DLIGHT_ALL (D3DLIGHT_ACTIVE | D3DLIGHT_NO_SPECULAR) + +/* maximum valid light range */ +#define D3DLIGHT_RANGE_MAX ((float)sqrt(FLT_MAX)) + +typedef struct _D3DLIGHT2 { + DWORD dwSize; + D3DLIGHTTYPE dltType; /* Type of light source */ + D3DCOLORVALUE dcvColor; /* Color of light */ + D3DVECTOR dvPosition; /* Position in world space */ + D3DVECTOR dvDirection; /* Direction in world space */ + D3DVALUE dvRange; /* Cutoff range */ + D3DVALUE dvFalloff; /* Falloff */ + D3DVALUE dvAttenuation0; /* Constant attenuation */ + D3DVALUE dvAttenuation1; /* Linear attenuation */ + D3DVALUE dvAttenuation2; /* Quadratic attenuation */ + D3DVALUE dvTheta; /* Inner angle of spotlight cone */ + D3DVALUE dvPhi; /* Outer angle of spotlight cone */ + DWORD dwFlags; +} D3DLIGHT2, *LPD3DLIGHT2; + +#endif /* DIRECT3D_VERSION >= 0x0500 */ +typedef struct _D3DLIGHTDATA { + DWORD dwSize; + LPD3DLIGHTINGELEMENT lpIn; /* Input positions and normals */ + DWORD dwInSize; /* Stride of input elements */ + LPD3DTLVERTEX lpOut; /* Output colors */ + DWORD dwOutSize; /* Stride of output colors */ +} D3DLIGHTDATA, *LPD3DLIGHTDATA; + +#if(DIRECT3D_VERSION >= 0x0500) +/* + * Before DX5, these values were in an enum called + * D3DCOLORMODEL. This was not correct, since they are + * bit flags. A driver can surface either or both flags + * in the dcmColorModel member of D3DDEVICEDESC. + */ +#define D3DCOLOR_MONO 1 +#define D3DCOLOR_RGB 2 + +typedef DWORD D3DCOLORMODEL; +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +/* + * Options for clearing + */ +#define D3DCLEAR_TARGET 0x00000001l /* Clear target surface */ +#define D3DCLEAR_ZBUFFER 0x00000002l /* Clear target z buffer */ +#if(DIRECT3D_VERSION >= 0x0600) +#define D3DCLEAR_STENCIL 0x00000004l /* Clear stencil planes */ +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +/* + * Execute buffers are allocated via Direct3D. These buffers may then + * be filled by the application with instructions to execute along with + * vertex data. + */ + +/* + * Supported op codes for execute instructions. + */ +typedef enum _D3DOPCODE { + D3DOP_POINT = 1, + D3DOP_LINE = 2, + D3DOP_TRIANGLE = 3, + D3DOP_MATRIXLOAD = 4, + D3DOP_MATRIXMULTIPLY = 5, + D3DOP_STATETRANSFORM = 6, + D3DOP_STATELIGHT = 7, + D3DOP_STATERENDER = 8, + D3DOP_PROCESSVERTICES = 9, + D3DOP_TEXTURELOAD = 10, + D3DOP_EXIT = 11, + D3DOP_BRANCHFORWARD = 12, + D3DOP_SPAN = 13, + D3DOP_SETSTATUS = 14, +#if(DIRECT3D_VERSION >= 0x0500) + D3DOP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DOPCODE; + +typedef struct _D3DINSTRUCTION { + BYTE bOpcode; /* Instruction opcode */ + BYTE bSize; /* Size of each instruction data unit */ + WORD wCount; /* Count of instruction data units to follow */ +} D3DINSTRUCTION, *LPD3DINSTRUCTION; + +/* + * Structure for texture loads + */ +typedef struct _D3DTEXTURELOAD { + D3DTEXTUREHANDLE hDestTexture; + D3DTEXTUREHANDLE hSrcTexture; +} D3DTEXTURELOAD, *LPD3DTEXTURELOAD; + +/* + * Structure for picking + */ +typedef struct _D3DPICKRECORD { + BYTE bOpcode; + BYTE bPad; + DWORD dwOffset; + D3DVALUE dvZ; +} D3DPICKRECORD, *LPD3DPICKRECORD; + +/* + * The following defines the rendering states which can be set in the + * execute buffer. + */ + +#if(DIRECT3D_VERSION < 0x0800) + +typedef enum _D3DSHADEMODE { + D3DSHADE_FLAT = 1, + D3DSHADE_GOURAUD = 2, + D3DSHADE_PHONG = 3, +#if(DIRECT3D_VERSION >= 0x0500) + D3DSHADE_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DSHADEMODE; + +typedef enum _D3DFILLMODE { + D3DFILL_POINT = 1, + D3DFILL_WIREFRAME = 2, + D3DFILL_SOLID = 3, +#if(DIRECT3D_VERSION >= 0x0500) + D3DFILL_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DFILLMODE; + +typedef struct _D3DLINEPATTERN { + WORD wRepeatFactor; + WORD wLinePattern; +} D3DLINEPATTERN; + +#endif //(DIRECT3D_VERSION < 0x0800) + +typedef enum _D3DTEXTUREFILTER { + D3DFILTER_NEAREST = 1, + D3DFILTER_LINEAR = 2, + D3DFILTER_MIPNEAREST = 3, + D3DFILTER_MIPLINEAR = 4, + D3DFILTER_LINEARMIPNEAREST = 5, + D3DFILTER_LINEARMIPLINEAR = 6, +#if(DIRECT3D_VERSION >= 0x0500) + D3DFILTER_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DTEXTUREFILTER; + +#if(DIRECT3D_VERSION < 0x0800) + +typedef enum _D3DBLEND { + D3DBLEND_ZERO = 1, + D3DBLEND_ONE = 2, + D3DBLEND_SRCCOLOR = 3, + D3DBLEND_INVSRCCOLOR = 4, + D3DBLEND_SRCALPHA = 5, + D3DBLEND_INVSRCALPHA = 6, + D3DBLEND_DESTALPHA = 7, + D3DBLEND_INVDESTALPHA = 8, + D3DBLEND_DESTCOLOR = 9, + D3DBLEND_INVDESTCOLOR = 10, + D3DBLEND_SRCALPHASAT = 11, + D3DBLEND_BOTHSRCALPHA = 12, + D3DBLEND_BOTHINVSRCALPHA = 13, +#if(DIRECT3D_VERSION >= 0x0500) + D3DBLEND_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DBLEND; + +#endif //(DIRECT3D_VERSION < 0x0800) + +typedef enum _D3DTEXTUREBLEND { + D3DTBLEND_DECAL = 1, + D3DTBLEND_MODULATE = 2, + D3DTBLEND_DECALALPHA = 3, + D3DTBLEND_MODULATEALPHA = 4, + D3DTBLEND_DECALMASK = 5, + D3DTBLEND_MODULATEMASK = 6, + D3DTBLEND_COPY = 7, +#if(DIRECT3D_VERSION >= 0x0500) + D3DTBLEND_ADD = 8, + D3DTBLEND_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DTEXTUREBLEND; + +#if(DIRECT3D_VERSION < 0x0800) + +typedef enum _D3DTEXTUREADDRESS { + D3DTADDRESS_WRAP = 1, + D3DTADDRESS_MIRROR = 2, + D3DTADDRESS_CLAMP = 3, +#if(DIRECT3D_VERSION >= 0x0500) + D3DTADDRESS_BORDER = 4, + D3DTADDRESS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DTEXTUREADDRESS; + +typedef enum _D3DCULL { + D3DCULL_NONE = 1, + D3DCULL_CW = 2, + D3DCULL_CCW = 3, +#if(DIRECT3D_VERSION >= 0x0500) + D3DCULL_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DCULL; + +typedef enum _D3DCMPFUNC { + D3DCMP_NEVER = 1, + D3DCMP_LESS = 2, + D3DCMP_EQUAL = 3, + D3DCMP_LESSEQUAL = 4, + D3DCMP_GREATER = 5, + D3DCMP_NOTEQUAL = 6, + D3DCMP_GREATEREQUAL = 7, + D3DCMP_ALWAYS = 8, +#if(DIRECT3D_VERSION >= 0x0500) + D3DCMP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DCMPFUNC; + +#if(DIRECT3D_VERSION >= 0x0600) +typedef enum _D3DSTENCILOP { + D3DSTENCILOP_KEEP = 1, + D3DSTENCILOP_ZERO = 2, + D3DSTENCILOP_REPLACE = 3, + D3DSTENCILOP_INCRSAT = 4, + D3DSTENCILOP_DECRSAT = 5, + D3DSTENCILOP_INVERT = 6, + D3DSTENCILOP_INCR = 7, + D3DSTENCILOP_DECR = 8, + D3DSTENCILOP_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DSTENCILOP; +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +typedef enum _D3DFOGMODE { + D3DFOG_NONE = 0, + D3DFOG_EXP = 1, + D3DFOG_EXP2 = 2, +#if(DIRECT3D_VERSION >= 0x0500) + D3DFOG_LINEAR = 3, + D3DFOG_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DFOGMODE; + +#if(DIRECT3D_VERSION >= 0x0600) +typedef enum _D3DZBUFFERTYPE { + D3DZB_FALSE = 0, + D3DZB_TRUE = 1, // Z buffering + D3DZB_USEW = 2, // W buffering + D3DZB_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DZBUFFERTYPE; +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +#endif //(DIRECT3D_VERSION < 0x0800) + +#if(DIRECT3D_VERSION >= 0x0500) +typedef enum _D3DANTIALIASMODE { + D3DANTIALIAS_NONE = 0, + D3DANTIALIAS_SORTDEPENDENT = 1, + D3DANTIALIAS_SORTINDEPENDENT = 2, + D3DANTIALIAS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DANTIALIASMODE; + +// Vertex types supported by Direct3D +typedef enum _D3DVERTEXTYPE { + D3DVT_VERTEX = 1, + D3DVT_LVERTEX = 2, + D3DVT_TLVERTEX = 3, + D3DVT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DVERTEXTYPE; + +#if(DIRECT3D_VERSION < 0x0800) + +// Primitives supported by draw-primitive API +typedef enum _D3DPRIMITIVETYPE { + D3DPT_POINTLIST = 1, + D3DPT_LINELIST = 2, + D3DPT_LINESTRIP = 3, + D3DPT_TRIANGLELIST = 4, + D3DPT_TRIANGLESTRIP = 5, + D3DPT_TRIANGLEFAN = 6, + D3DPT_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DPRIMITIVETYPE; + +#endif //(DIRECT3D_VERSION < 0x0800) + +#endif /* DIRECT3D_VERSION >= 0x0500 */ +/* + * Amount to add to a state to generate the override for that state. + */ +#define D3DSTATE_OVERRIDE_BIAS 256 + +/* + * A state which sets the override flag for the specified state type. + */ +#define D3DSTATE_OVERRIDE(type) (D3DRENDERSTATETYPE)(((DWORD) (type) + D3DSTATE_OVERRIDE_BIAS)) + +#if(DIRECT3D_VERSION < 0x0800) + +typedef enum _D3DTRANSFORMSTATETYPE { + D3DTRANSFORMSTATE_WORLD = 1, + D3DTRANSFORMSTATE_VIEW = 2, + D3DTRANSFORMSTATE_PROJECTION = 3, +#if(DIRECT3D_VERSION >= 0x0700) + D3DTRANSFORMSTATE_WORLD1 = 4, // 2nd matrix to blend + D3DTRANSFORMSTATE_WORLD2 = 5, // 3rd matrix to blend + D3DTRANSFORMSTATE_WORLD3 = 6, // 4th matrix to blend + D3DTRANSFORMSTATE_TEXTURE0 = 16, + D3DTRANSFORMSTATE_TEXTURE1 = 17, + D3DTRANSFORMSTATE_TEXTURE2 = 18, + D3DTRANSFORMSTATE_TEXTURE3 = 19, + D3DTRANSFORMSTATE_TEXTURE4 = 20, + D3DTRANSFORMSTATE_TEXTURE5 = 21, + D3DTRANSFORMSTATE_TEXTURE6 = 22, + D3DTRANSFORMSTATE_TEXTURE7 = 23, +#endif /* DIRECT3D_VERSION >= 0x0700 */ +#if(DIRECT3D_VERSION >= 0x0500) + D3DTRANSFORMSTATE_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DTRANSFORMSTATETYPE; + +#else + +// +// legacy transform state names +// +typedef enum _D3DTRANSFORMSTATETYPE D3DTRANSFORMSTATETYPE; +#define D3DTRANSFORMSTATE_WORLD (D3DTRANSFORMSTATETYPE)1 +#define D3DTRANSFORMSTATE_VIEW (D3DTRANSFORMSTATETYPE)2 +#define D3DTRANSFORMSTATE_PROJECTION (D3DTRANSFORMSTATETYPE)3 +#define D3DTRANSFORMSTATE_WORLD1 (D3DTRANSFORMSTATETYPE)4 +#define D3DTRANSFORMSTATE_WORLD2 (D3DTRANSFORMSTATETYPE)5 +#define D3DTRANSFORMSTATE_WORLD3 (D3DTRANSFORMSTATETYPE)6 +#define D3DTRANSFORMSTATE_TEXTURE0 (D3DTRANSFORMSTATETYPE)16 +#define D3DTRANSFORMSTATE_TEXTURE1 (D3DTRANSFORMSTATETYPE)17 +#define D3DTRANSFORMSTATE_TEXTURE2 (D3DTRANSFORMSTATETYPE)18 +#define D3DTRANSFORMSTATE_TEXTURE3 (D3DTRANSFORMSTATETYPE)19 +#define D3DTRANSFORMSTATE_TEXTURE4 (D3DTRANSFORMSTATETYPE)20 +#define D3DTRANSFORMSTATE_TEXTURE5 (D3DTRANSFORMSTATETYPE)21 +#define D3DTRANSFORMSTATE_TEXTURE6 (D3DTRANSFORMSTATETYPE)22 +#define D3DTRANSFORMSTATE_TEXTURE7 (D3DTRANSFORMSTATETYPE)23 + +#endif //(DIRECT3D_VERSION < 0x0800) + +typedef enum _D3DLIGHTSTATETYPE { + D3DLIGHTSTATE_MATERIAL = 1, + D3DLIGHTSTATE_AMBIENT = 2, + D3DLIGHTSTATE_COLORMODEL = 3, + D3DLIGHTSTATE_FOGMODE = 4, + D3DLIGHTSTATE_FOGSTART = 5, + D3DLIGHTSTATE_FOGEND = 6, + D3DLIGHTSTATE_FOGDENSITY = 7, +#if(DIRECT3D_VERSION >= 0x0600) + D3DLIGHTSTATE_COLORVERTEX = 8, +#endif /* DIRECT3D_VERSION >= 0x0600 */ +#if(DIRECT3D_VERSION >= 0x0500) + D3DLIGHTSTATE_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DLIGHTSTATETYPE; + +#if(DIRECT3D_VERSION < 0x0800) + +typedef enum _D3DRENDERSTATETYPE { + D3DRENDERSTATE_ANTIALIAS = 2, /* D3DANTIALIASMODE */ + D3DRENDERSTATE_TEXTUREPERSPECTIVE = 4, /* TRUE for perspective correction */ + D3DRENDERSTATE_ZENABLE = 7, /* D3DZBUFFERTYPE (or TRUE/FALSE for legacy) */ + D3DRENDERSTATE_FILLMODE = 8, /* D3DFILL_MODE */ + D3DRENDERSTATE_SHADEMODE = 9, /* D3DSHADEMODE */ + D3DRENDERSTATE_LINEPATTERN = 10, /* D3DLINEPATTERN */ + D3DRENDERSTATE_ZWRITEENABLE = 14, /* TRUE to enable z writes */ + D3DRENDERSTATE_ALPHATESTENABLE = 15, /* TRUE to enable alpha tests */ + D3DRENDERSTATE_LASTPIXEL = 16, /* TRUE for last-pixel on lines */ + D3DRENDERSTATE_SRCBLEND = 19, /* D3DBLEND */ + D3DRENDERSTATE_DESTBLEND = 20, /* D3DBLEND */ + D3DRENDERSTATE_CULLMODE = 22, /* D3DCULL */ + D3DRENDERSTATE_ZFUNC = 23, /* D3DCMPFUNC */ + D3DRENDERSTATE_ALPHAREF = 24, /* D3DFIXED */ + D3DRENDERSTATE_ALPHAFUNC = 25, /* D3DCMPFUNC */ + D3DRENDERSTATE_DITHERENABLE = 26, /* TRUE to enable dithering */ +#if(DIRECT3D_VERSION >= 0x0500) + D3DRENDERSTATE_ALPHABLENDENABLE = 27, /* TRUE to enable alpha blending */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ + D3DRENDERSTATE_FOGENABLE = 28, /* TRUE to enable fog blending */ + D3DRENDERSTATE_SPECULARENABLE = 29, /* TRUE to enable specular */ + D3DRENDERSTATE_ZVISIBLE = 30, /* TRUE to enable z checking */ + D3DRENDERSTATE_STIPPLEDALPHA = 33, /* TRUE to enable stippled alpha (RGB device only) */ + D3DRENDERSTATE_FOGCOLOR = 34, /* D3DCOLOR */ + D3DRENDERSTATE_FOGTABLEMODE = 35, /* D3DFOGMODE */ +#if(DIRECT3D_VERSION >= 0x0700) + D3DRENDERSTATE_FOGSTART = 36, /* Fog start (for both vertex and pixel fog) */ + D3DRENDERSTATE_FOGEND = 37, /* Fog end */ + D3DRENDERSTATE_FOGDENSITY = 38, /* Fog density */ +#endif /* DIRECT3D_VERSION >= 0x0700 */ +#if(DIRECT3D_VERSION >= 0x0500) + D3DRENDERSTATE_EDGEANTIALIAS = 40, /* TRUE to enable edge antialiasing */ + D3DRENDERSTATE_COLORKEYENABLE = 41, /* TRUE to enable source colorkeyed textures */ + D3DRENDERSTATE_ZBIAS = 47, /* LONG Z bias */ + D3DRENDERSTATE_RANGEFOGENABLE = 48, /* Enables range-based fog */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#if(DIRECT3D_VERSION >= 0x0600) + D3DRENDERSTATE_STENCILENABLE = 52, /* BOOL enable/disable stenciling */ + D3DRENDERSTATE_STENCILFAIL = 53, /* D3DSTENCILOP to do if stencil test fails */ + D3DRENDERSTATE_STENCILZFAIL = 54, /* D3DSTENCILOP to do if stencil test passes and Z test fails */ + D3DRENDERSTATE_STENCILPASS = 55, /* D3DSTENCILOP to do if both stencil and Z tests pass */ + D3DRENDERSTATE_STENCILFUNC = 56, /* D3DCMPFUNC fn. Stencil Test passes if ((ref & mask) stencilfn (stencil & mask)) is true */ + D3DRENDERSTATE_STENCILREF = 57, /* Reference value used in stencil test */ + D3DRENDERSTATE_STENCILMASK = 58, /* Mask value used in stencil test */ + D3DRENDERSTATE_STENCILWRITEMASK = 59, /* Write mask applied to values written to stencil buffer */ + D3DRENDERSTATE_TEXTUREFACTOR = 60, /* D3DCOLOR used for multi-texture blend */ +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +#if(DIRECT3D_VERSION >= 0x0600) + + /* + * 128 values [128, 255] are reserved for texture coordinate wrap flags. + * These are constructed with the D3DWRAP_U and D3DWRAP_V macros. Using + * a flags word preserves forward compatibility with texture coordinates + * that are >2D. + */ + D3DRENDERSTATE_WRAP0 = 128, /* wrap for 1st texture coord. set */ + D3DRENDERSTATE_WRAP1 = 129, /* wrap for 2nd texture coord. set */ + D3DRENDERSTATE_WRAP2 = 130, /* wrap for 3rd texture coord. set */ + D3DRENDERSTATE_WRAP3 = 131, /* wrap for 4th texture coord. set */ + D3DRENDERSTATE_WRAP4 = 132, /* wrap for 5th texture coord. set */ + D3DRENDERSTATE_WRAP5 = 133, /* wrap for 6th texture coord. set */ + D3DRENDERSTATE_WRAP6 = 134, /* wrap for 7th texture coord. set */ + D3DRENDERSTATE_WRAP7 = 135, /* wrap for 8th texture coord. set */ +#endif /* DIRECT3D_VERSION >= 0x0600 */ +#if(DIRECT3D_VERSION >= 0x0700) + D3DRENDERSTATE_CLIPPING = 136, + D3DRENDERSTATE_LIGHTING = 137, + D3DRENDERSTATE_EXTENTS = 138, + D3DRENDERSTATE_AMBIENT = 139, + D3DRENDERSTATE_FOGVERTEXMODE = 140, + D3DRENDERSTATE_COLORVERTEX = 141, + D3DRENDERSTATE_LOCALVIEWER = 142, + D3DRENDERSTATE_NORMALIZENORMALS = 143, + D3DRENDERSTATE_COLORKEYBLENDENABLE = 144, + D3DRENDERSTATE_DIFFUSEMATERIALSOURCE = 145, + D3DRENDERSTATE_SPECULARMATERIALSOURCE = 146, + D3DRENDERSTATE_AMBIENTMATERIALSOURCE = 147, + D3DRENDERSTATE_EMISSIVEMATERIALSOURCE = 148, + D3DRENDERSTATE_VERTEXBLEND = 151, + D3DRENDERSTATE_CLIPPLANEENABLE = 152, + +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +// +// retired renderstates - not supported for DX7 interfaces +// + D3DRENDERSTATE_TEXTUREHANDLE = 1, /* Texture handle for legacy interfaces (Texture,Texture2) */ + D3DRENDERSTATE_TEXTUREADDRESS = 3, /* D3DTEXTUREADDRESS */ + D3DRENDERSTATE_WRAPU = 5, /* TRUE for wrapping in u */ + D3DRENDERSTATE_WRAPV = 6, /* TRUE for wrapping in v */ + D3DRENDERSTATE_MONOENABLE = 11, /* TRUE to enable mono rasterization */ + D3DRENDERSTATE_ROP2 = 12, /* ROP2 */ + D3DRENDERSTATE_PLANEMASK = 13, /* DWORD physical plane mask */ + D3DRENDERSTATE_TEXTUREMAG = 17, /* D3DTEXTUREFILTER */ + D3DRENDERSTATE_TEXTUREMIN = 18, /* D3DTEXTUREFILTER */ + D3DRENDERSTATE_TEXTUREMAPBLEND = 21, /* D3DTEXTUREBLEND */ + D3DRENDERSTATE_SUBPIXEL = 31, /* TRUE to enable subpixel correction */ + D3DRENDERSTATE_SUBPIXELX = 32, /* TRUE to enable correction in X only */ + D3DRENDERSTATE_STIPPLEENABLE = 39, /* TRUE to enable stippling */ +#if(DIRECT3D_VERSION >= 0x0500) + D3DRENDERSTATE_BORDERCOLOR = 43, /* Border color for texturing w/border */ + D3DRENDERSTATE_TEXTUREADDRESSU = 44, /* Texture addressing mode for U coordinate */ + D3DRENDERSTATE_TEXTUREADDRESSV = 45, /* Texture addressing mode for V coordinate */ + D3DRENDERSTATE_MIPMAPLODBIAS = 46, /* D3DVALUE Mipmap LOD bias */ + D3DRENDERSTATE_ANISOTROPY = 49, /* Max. anisotropy. 1 = no anisotropy */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ + D3DRENDERSTATE_FLUSHBATCH = 50, /* Explicit flush for DP batching (DX5 Only) */ +#if(DIRECT3D_VERSION >= 0x0600) + D3DRENDERSTATE_TRANSLUCENTSORTINDEPENDENT=51, /* BOOL enable sort-independent transparency */ +#endif /* DIRECT3D_VERSION >= 0x0600 */ + D3DRENDERSTATE_STIPPLEPATTERN00 = 64, /* Stipple pattern 01... */ + D3DRENDERSTATE_STIPPLEPATTERN01 = 65, + D3DRENDERSTATE_STIPPLEPATTERN02 = 66, + D3DRENDERSTATE_STIPPLEPATTERN03 = 67, + D3DRENDERSTATE_STIPPLEPATTERN04 = 68, + D3DRENDERSTATE_STIPPLEPATTERN05 = 69, + D3DRENDERSTATE_STIPPLEPATTERN06 = 70, + D3DRENDERSTATE_STIPPLEPATTERN07 = 71, + D3DRENDERSTATE_STIPPLEPATTERN08 = 72, + D3DRENDERSTATE_STIPPLEPATTERN09 = 73, + D3DRENDERSTATE_STIPPLEPATTERN10 = 74, + D3DRENDERSTATE_STIPPLEPATTERN11 = 75, + D3DRENDERSTATE_STIPPLEPATTERN12 = 76, + D3DRENDERSTATE_STIPPLEPATTERN13 = 77, + D3DRENDERSTATE_STIPPLEPATTERN14 = 78, + D3DRENDERSTATE_STIPPLEPATTERN15 = 79, + D3DRENDERSTATE_STIPPLEPATTERN16 = 80, + D3DRENDERSTATE_STIPPLEPATTERN17 = 81, + D3DRENDERSTATE_STIPPLEPATTERN18 = 82, + D3DRENDERSTATE_STIPPLEPATTERN19 = 83, + D3DRENDERSTATE_STIPPLEPATTERN20 = 84, + D3DRENDERSTATE_STIPPLEPATTERN21 = 85, + D3DRENDERSTATE_STIPPLEPATTERN22 = 86, + D3DRENDERSTATE_STIPPLEPATTERN23 = 87, + D3DRENDERSTATE_STIPPLEPATTERN24 = 88, + D3DRENDERSTATE_STIPPLEPATTERN25 = 89, + D3DRENDERSTATE_STIPPLEPATTERN26 = 90, + D3DRENDERSTATE_STIPPLEPATTERN27 = 91, + D3DRENDERSTATE_STIPPLEPATTERN28 = 92, + D3DRENDERSTATE_STIPPLEPATTERN29 = 93, + D3DRENDERSTATE_STIPPLEPATTERN30 = 94, + D3DRENDERSTATE_STIPPLEPATTERN31 = 95, + +// +// retired renderstate names - the values are still used under new naming conventions +// + D3DRENDERSTATE_FOGTABLESTART = 36, /* Fog table start */ + D3DRENDERSTATE_FOGTABLEEND = 37, /* Fog table end */ + D3DRENDERSTATE_FOGTABLEDENSITY = 38, /* Fog table density */ + +#if(DIRECT3D_VERSION >= 0x0500) + D3DRENDERSTATE_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +#endif /* DIRECT3D_VERSION >= 0x0500 */ +} D3DRENDERSTATETYPE; + +#else + +typedef enum _D3DRENDERSTATETYPE D3DRENDERSTATETYPE; + +// +// legacy renderstate names +// +#define D3DRENDERSTATE_TEXTUREPERSPECTIVE (D3DRENDERSTATETYPE)4 +#define D3DRENDERSTATE_ZENABLE (D3DRENDERSTATETYPE)7 +#define D3DRENDERSTATE_FILLMODE (D3DRENDERSTATETYPE)8 +#define D3DRENDERSTATE_SHADEMODE (D3DRENDERSTATETYPE)9 +#define D3DRENDERSTATE_LINEPATTERN (D3DRENDERSTATETYPE)10 +#define D3DRENDERSTATE_ZWRITEENABLE (D3DRENDERSTATETYPE)14 +#define D3DRENDERSTATE_ALPHATESTENABLE (D3DRENDERSTATETYPE)15 +#define D3DRENDERSTATE_LASTPIXEL (D3DRENDERSTATETYPE)16 +#define D3DRENDERSTATE_SRCBLEND (D3DRENDERSTATETYPE)19 +#define D3DRENDERSTATE_DESTBLEND (D3DRENDERSTATETYPE)20 +#define D3DRENDERSTATE_CULLMODE (D3DRENDERSTATETYPE)22 +#define D3DRENDERSTATE_ZFUNC (D3DRENDERSTATETYPE)23 +#define D3DRENDERSTATE_ALPHAREF (D3DRENDERSTATETYPE)24 +#define D3DRENDERSTATE_ALPHAFUNC (D3DRENDERSTATETYPE)25 +#define D3DRENDERSTATE_DITHERENABLE (D3DRENDERSTATETYPE)26 +#define D3DRENDERSTATE_ALPHABLENDENABLE (D3DRENDERSTATETYPE)27 +#define D3DRENDERSTATE_FOGENABLE (D3DRENDERSTATETYPE)28 +#define D3DRENDERSTATE_SPECULARENABLE (D3DRENDERSTATETYPE)29 +#define D3DRENDERSTATE_ZVISIBLE (D3DRENDERSTATETYPE)30 +#define D3DRENDERSTATE_STIPPLEDALPHA (D3DRENDERSTATETYPE)33 +#define D3DRENDERSTATE_FOGCOLOR (D3DRENDERSTATETYPE)34 +#define D3DRENDERSTATE_FOGTABLEMODE (D3DRENDERSTATETYPE)35 +#define D3DRENDERSTATE_FOGSTART (D3DRENDERSTATETYPE)36 +#define D3DRENDERSTATE_FOGEND (D3DRENDERSTATETYPE)37 +#define D3DRENDERSTATE_FOGDENSITY (D3DRENDERSTATETYPE)38 +#define D3DRENDERSTATE_EDGEANTIALIAS (D3DRENDERSTATETYPE)40 +#define D3DRENDERSTATE_ZBIAS (D3DRENDERSTATETYPE)47 +#define D3DRENDERSTATE_RANGEFOGENABLE (D3DRENDERSTATETYPE)48 +#define D3DRENDERSTATE_STENCILENABLE (D3DRENDERSTATETYPE)52 +#define D3DRENDERSTATE_STENCILFAIL (D3DRENDERSTATETYPE)53 +#define D3DRENDERSTATE_STENCILZFAIL (D3DRENDERSTATETYPE)54 +#define D3DRENDERSTATE_STENCILPASS (D3DRENDERSTATETYPE)55 +#define D3DRENDERSTATE_STENCILFUNC (D3DRENDERSTATETYPE)56 +#define D3DRENDERSTATE_STENCILREF (D3DRENDERSTATETYPE)57 +#define D3DRENDERSTATE_STENCILMASK (D3DRENDERSTATETYPE)58 +#define D3DRENDERSTATE_STENCILWRITEMASK (D3DRENDERSTATETYPE)59 +#define D3DRENDERSTATE_TEXTUREFACTOR (D3DRENDERSTATETYPE)60 +#define D3DRENDERSTATE_WRAP0 (D3DRENDERSTATETYPE)128 +#define D3DRENDERSTATE_WRAP1 (D3DRENDERSTATETYPE)129 +#define D3DRENDERSTATE_WRAP2 (D3DRENDERSTATETYPE)130 +#define D3DRENDERSTATE_WRAP3 (D3DRENDERSTATETYPE)131 +#define D3DRENDERSTATE_WRAP4 (D3DRENDERSTATETYPE)132 +#define D3DRENDERSTATE_WRAP5 (D3DRENDERSTATETYPE)133 +#define D3DRENDERSTATE_WRAP6 (D3DRENDERSTATETYPE)134 +#define D3DRENDERSTATE_WRAP7 (D3DRENDERSTATETYPE)135 + +#define D3DRENDERSTATE_CLIPPING (D3DRENDERSTATETYPE)136 +#define D3DRENDERSTATE_LIGHTING (D3DRENDERSTATETYPE)137 +#define D3DRENDERSTATE_EXTENTS (D3DRENDERSTATETYPE)138 +#define D3DRENDERSTATE_AMBIENT (D3DRENDERSTATETYPE)139 +#define D3DRENDERSTATE_FOGVERTEXMODE (D3DRENDERSTATETYPE)140 +#define D3DRENDERSTATE_COLORVERTEX (D3DRENDERSTATETYPE)141 +#define D3DRENDERSTATE_LOCALVIEWER (D3DRENDERSTATETYPE)142 +#define D3DRENDERSTATE_NORMALIZENORMALS (D3DRENDERSTATETYPE)143 +#define D3DRENDERSTATE_COLORKEYBLENDENABLE (D3DRENDERSTATETYPE)144 +#define D3DRENDERSTATE_DIFFUSEMATERIALSOURCE (D3DRENDERSTATETYPE)145 +#define D3DRENDERSTATE_SPECULARMATERIALSOURCE (D3DRENDERSTATETYPE)146 +#define D3DRENDERSTATE_AMBIENTMATERIALSOURCE (D3DRENDERSTATETYPE)147 +#define D3DRENDERSTATE_EMISSIVEMATERIALSOURCE (D3DRENDERSTATETYPE)148 +#define D3DRENDERSTATE_VERTEXBLEND (D3DRENDERSTATETYPE)151 +#define D3DRENDERSTATE_CLIPPLANEENABLE (D3DRENDERSTATETYPE)152 + +// +// retired renderstates - not supported for DX7 interfaces +// +#define D3DRENDERSTATE_TEXTUREHANDLE (D3DRENDERSTATETYPE)1 +#define D3DRENDERSTATE_ANTIALIAS (D3DRENDERSTATETYPE)2 +#define D3DRENDERSTATE_TEXTUREADDRESS (D3DRENDERSTATETYPE)3 +#define D3DRENDERSTATE_WRAPU (D3DRENDERSTATETYPE)5 +#define D3DRENDERSTATE_WRAPV (D3DRENDERSTATETYPE)6 +#define D3DRENDERSTATE_MONOENABLE (D3DRENDERSTATETYPE)11 +#define D3DRENDERSTATE_ROP2 (D3DRENDERSTATETYPE)12 +#define D3DRENDERSTATE_PLANEMASK (D3DRENDERSTATETYPE)13 +#define D3DRENDERSTATE_TEXTUREMAG (D3DRENDERSTATETYPE)17 +#define D3DRENDERSTATE_TEXTUREMIN (D3DRENDERSTATETYPE)18 +#define D3DRENDERSTATE_TEXTUREMAPBLEND (D3DRENDERSTATETYPE)21 +#define D3DRENDERSTATE_SUBPIXEL (D3DRENDERSTATETYPE)31 +#define D3DRENDERSTATE_SUBPIXELX (D3DRENDERSTATETYPE)32 +#define D3DRENDERSTATE_STIPPLEENABLE (D3DRENDERSTATETYPE)39 +#define D3DRENDERSTATE_OLDALPHABLENDENABLE (D3DRENDERSTATETYPE)42 +#define D3DRENDERSTATE_BORDERCOLOR (D3DRENDERSTATETYPE)43 +#define D3DRENDERSTATE_TEXTUREADDRESSU (D3DRENDERSTATETYPE)44 +#define D3DRENDERSTATE_TEXTUREADDRESSV (D3DRENDERSTATETYPE)45 +#define D3DRENDERSTATE_MIPMAPLODBIAS (D3DRENDERSTATETYPE)46 +#define D3DRENDERSTATE_ANISOTROPY (D3DRENDERSTATETYPE)49 +#define D3DRENDERSTATE_FLUSHBATCH (D3DRENDERSTATETYPE)50 +#define D3DRENDERSTATE_TRANSLUCENTSORTINDEPENDENT (D3DRENDERSTATETYPE)51 +#define D3DRENDERSTATE_STIPPLEPATTERN00 (D3DRENDERSTATETYPE)64 +#define D3DRENDERSTATE_STIPPLEPATTERN01 (D3DRENDERSTATETYPE)65 +#define D3DRENDERSTATE_STIPPLEPATTERN02 (D3DRENDERSTATETYPE)66 +#define D3DRENDERSTATE_STIPPLEPATTERN03 (D3DRENDERSTATETYPE)67 +#define D3DRENDERSTATE_STIPPLEPATTERN04 (D3DRENDERSTATETYPE)68 +#define D3DRENDERSTATE_STIPPLEPATTERN05 (D3DRENDERSTATETYPE)69 +#define D3DRENDERSTATE_STIPPLEPATTERN06 (D3DRENDERSTATETYPE)70 +#define D3DRENDERSTATE_STIPPLEPATTERN07 (D3DRENDERSTATETYPE)71 +#define D3DRENDERSTATE_STIPPLEPATTERN08 (D3DRENDERSTATETYPE)72 +#define D3DRENDERSTATE_STIPPLEPATTERN09 (D3DRENDERSTATETYPE)73 +#define D3DRENDERSTATE_STIPPLEPATTERN10 (D3DRENDERSTATETYPE)74 +#define D3DRENDERSTATE_STIPPLEPATTERN11 (D3DRENDERSTATETYPE)75 +#define D3DRENDERSTATE_STIPPLEPATTERN12 (D3DRENDERSTATETYPE)76 +#define D3DRENDERSTATE_STIPPLEPATTERN13 (D3DRENDERSTATETYPE)77 +#define D3DRENDERSTATE_STIPPLEPATTERN14 (D3DRENDERSTATETYPE)78 +#define D3DRENDERSTATE_STIPPLEPATTERN15 (D3DRENDERSTATETYPE)79 +#define D3DRENDERSTATE_STIPPLEPATTERN16 (D3DRENDERSTATETYPE)80 +#define D3DRENDERSTATE_STIPPLEPATTERN17 (D3DRENDERSTATETYPE)81 +#define D3DRENDERSTATE_STIPPLEPATTERN18 (D3DRENDERSTATETYPE)82 +#define D3DRENDERSTATE_STIPPLEPATTERN19 (D3DRENDERSTATETYPE)83 +#define D3DRENDERSTATE_STIPPLEPATTERN20 (D3DRENDERSTATETYPE)84 +#define D3DRENDERSTATE_STIPPLEPATTERN21 (D3DRENDERSTATETYPE)85 +#define D3DRENDERSTATE_STIPPLEPATTERN22 (D3DRENDERSTATETYPE)86 +#define D3DRENDERSTATE_STIPPLEPATTERN23 (D3DRENDERSTATETYPE)87 +#define D3DRENDERSTATE_STIPPLEPATTERN24 (D3DRENDERSTATETYPE)88 +#define D3DRENDERSTATE_STIPPLEPATTERN25 (D3DRENDERSTATETYPE)89 +#define D3DRENDERSTATE_STIPPLEPATTERN26 (D3DRENDERSTATETYPE)90 +#define D3DRENDERSTATE_STIPPLEPATTERN27 (D3DRENDERSTATETYPE)91 +#define D3DRENDERSTATE_STIPPLEPATTERN28 (D3DRENDERSTATETYPE)92 +#define D3DRENDERSTATE_STIPPLEPATTERN29 (D3DRENDERSTATETYPE)93 +#define D3DRENDERSTATE_STIPPLEPATTERN30 (D3DRENDERSTATETYPE)94 +#define D3DRENDERSTATE_STIPPLEPATTERN31 (D3DRENDERSTATETYPE)95 + +// +// retired renderstates - not supported for DX8 interfaces +// +#define D3DRENDERSTATE_COLORKEYENABLE (D3DRENDERSTATETYPE)41 +#define D3DRENDERSTATE_COLORKEYBLENDENABLE (D3DRENDERSTATETYPE)144 + +// +// retired renderstate names - the values are still used under new naming conventions +// +#define D3DRENDERSTATE_BLENDENABLE (D3DRENDERSTATETYPE)27 +#define D3DRENDERSTATE_FOGTABLESTART (D3DRENDERSTATETYPE)36 +#define D3DRENDERSTATE_FOGTABLEEND (D3DRENDERSTATETYPE)37 +#define D3DRENDERSTATE_FOGTABLEDENSITY (D3DRENDERSTATETYPE)38 + +#endif //(DIRECT3D_VERSION < 0x0800) + + +#if(DIRECT3D_VERSION < 0x0800) + +// Values for material source +typedef enum _D3DMATERIALCOLORSOURCE +{ + D3DMCS_MATERIAL = 0, // Color from material is used + D3DMCS_COLOR1 = 1, // Diffuse vertex color is used + D3DMCS_COLOR2 = 2, // Specular vertex color is used + D3DMCS_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum +} D3DMATERIALCOLORSOURCE; + + +#if(DIRECT3D_VERSION >= 0x0500) +// For back-compatibility with legacy compilations +#define D3DRENDERSTATE_BLENDENABLE D3DRENDERSTATE_ALPHABLENDENABLE +#endif /* DIRECT3D_VERSION >= 0x0500 */ + +#if(DIRECT3D_VERSION >= 0x0600) + +// Bias to apply to the texture coordinate set to apply a wrap to. +#define D3DRENDERSTATE_WRAPBIAS 128UL + +/* Flags to construct the WRAP render states */ +#define D3DWRAP_U 0x00000001L +#define D3DWRAP_V 0x00000002L + +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +#if(DIRECT3D_VERSION >= 0x0700) + +/* Flags to construct the WRAP render states for 1D thru 4D texture coordinates */ +#define D3DWRAPCOORD_0 0x00000001L // same as D3DWRAP_U +#define D3DWRAPCOORD_1 0x00000002L // same as D3DWRAP_V +#define D3DWRAPCOORD_2 0x00000004L +#define D3DWRAPCOORD_3 0x00000008L + +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +#endif //(DIRECT3D_VERSION < 0x0800) + +#define D3DRENDERSTATE_STIPPLEPATTERN(y) (D3DRENDERSTATE_STIPPLEPATTERN00 + (y)) + +typedef struct _D3DSTATE { + union { +#if(DIRECT3D_VERSION < 0x0800) + D3DTRANSFORMSTATETYPE dtstTransformStateType; +#endif //(DIRECT3D_VERSION < 0x0800) + D3DLIGHTSTATETYPE dlstLightStateType; + D3DRENDERSTATETYPE drstRenderStateType; + }; + union { + DWORD dwArg[1]; + D3DVALUE dvArg[1]; + }; +} D3DSTATE, *LPD3DSTATE; + + +/* + * Operation used to load matrices + * hDstMat = hSrcMat + */ +typedef struct _D3DMATRIXLOAD { + D3DMATRIXHANDLE hDestMatrix; /* Destination matrix */ + D3DMATRIXHANDLE hSrcMatrix; /* Source matrix */ +} D3DMATRIXLOAD, *LPD3DMATRIXLOAD; + +/* + * Operation used to multiply matrices + * hDstMat = hSrcMat1 * hSrcMat2 + */ +typedef struct _D3DMATRIXMULTIPLY { + D3DMATRIXHANDLE hDestMatrix; /* Destination matrix */ + D3DMATRIXHANDLE hSrcMatrix1; /* First source matrix */ + D3DMATRIXHANDLE hSrcMatrix2; /* Second source matrix */ +} D3DMATRIXMULTIPLY, *LPD3DMATRIXMULTIPLY; + +/* + * Operation used to transform and light vertices. + */ +typedef struct _D3DPROCESSVERTICES { + DWORD dwFlags; /* Do we transform or light or just copy? */ + WORD wStart; /* Index to first vertex in source */ + WORD wDest; /* Index to first vertex in local buffer */ + DWORD dwCount; /* Number of vertices to be processed */ + DWORD dwReserved; /* Must be zero */ +} D3DPROCESSVERTICES, *LPD3DPROCESSVERTICES; + +#define D3DPROCESSVERTICES_TRANSFORMLIGHT 0x00000000L +#define D3DPROCESSVERTICES_TRANSFORM 0x00000001L +#define D3DPROCESSVERTICES_COPY 0x00000002L +#define D3DPROCESSVERTICES_OPMASK 0x00000007L + +#define D3DPROCESSVERTICES_UPDATEEXTENTS 0x00000008L +#define D3DPROCESSVERTICES_NOCOLOR 0x00000010L + + +#if(DIRECT3D_VERSION >= 0x0600) + + +#if(DIRECT3D_VERSION < 0x0800) + +/* + * State enumerants for per-stage texture processing. + */ +typedef enum _D3DTEXTURESTAGESTATETYPE +{ + D3DTSS_COLOROP = 1, /* D3DTEXTUREOP - per-stage blending controls for color channels */ + D3DTSS_COLORARG1 = 2, /* D3DTA_* (texture arg) */ + D3DTSS_COLORARG2 = 3, /* D3DTA_* (texture arg) */ + D3DTSS_ALPHAOP = 4, /* D3DTEXTUREOP - per-stage blending controls for alpha channel */ + D3DTSS_ALPHAARG1 = 5, /* D3DTA_* (texture arg) */ + D3DTSS_ALPHAARG2 = 6, /* D3DTA_* (texture arg) */ + D3DTSS_BUMPENVMAT00 = 7, /* D3DVALUE (bump mapping matrix) */ + D3DTSS_BUMPENVMAT01 = 8, /* D3DVALUE (bump mapping matrix) */ + D3DTSS_BUMPENVMAT10 = 9, /* D3DVALUE (bump mapping matrix) */ + D3DTSS_BUMPENVMAT11 = 10, /* D3DVALUE (bump mapping matrix) */ + D3DTSS_TEXCOORDINDEX = 11, /* identifies which set of texture coordinates index this texture */ + D3DTSS_ADDRESS = 12, /* D3DTEXTUREADDRESS for both coordinates */ + D3DTSS_ADDRESSU = 13, /* D3DTEXTUREADDRESS for U coordinate */ + D3DTSS_ADDRESSV = 14, /* D3DTEXTUREADDRESS for V coordinate */ + D3DTSS_BORDERCOLOR = 15, /* D3DCOLOR */ + D3DTSS_MAGFILTER = 16, /* D3DTEXTUREMAGFILTER filter to use for magnification */ + D3DTSS_MINFILTER = 17, /* D3DTEXTUREMINFILTER filter to use for minification */ + D3DTSS_MIPFILTER = 18, /* D3DTEXTUREMIPFILTER filter to use between mipmaps during minification */ + D3DTSS_MIPMAPLODBIAS = 19, /* D3DVALUE Mipmap LOD bias */ + D3DTSS_MAXMIPLEVEL = 20, /* DWORD 0..(n-1) LOD index of largest map to use (0 == largest) */ + D3DTSS_MAXANISOTROPY = 21, /* DWORD maximum anisotropy */ + D3DTSS_BUMPENVLSCALE = 22, /* D3DVALUE scale for bump map luminance */ + D3DTSS_BUMPENVLOFFSET = 23, /* D3DVALUE offset for bump map luminance */ +#if(DIRECT3D_VERSION >= 0x0700) + D3DTSS_TEXTURETRANSFORMFLAGS = 24, /* D3DTEXTURETRANSFORMFLAGS controls texture transform */ +#endif /* DIRECT3D_VERSION >= 0x0700 */ + D3DTSS_FORCE_DWORD = 0x7fffffff, /* force 32-bit size enum */ +} D3DTEXTURESTAGESTATETYPE; + +#if(DIRECT3D_VERSION >= 0x0700) +// Values, used with D3DTSS_TEXCOORDINDEX, to specify that the vertex data(position +// and normal in the camera space) should be taken as texture coordinates +// Low 16 bits are used to specify texture coordinate index, to take the WRAP mode from +// +#define D3DTSS_TCI_PASSTHRU 0x00000000 +#define D3DTSS_TCI_CAMERASPACENORMAL 0x00010000 +#define D3DTSS_TCI_CAMERASPACEPOSITION 0x00020000 +#define D3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR 0x00030000 +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +/* + * Enumerations for COLOROP and ALPHAOP texture blending operations set in + * texture processing stage controls in D3DRENDERSTATE. + */ +typedef enum _D3DTEXTUREOP +{ +// Control + D3DTOP_DISABLE = 1, // disables stage + D3DTOP_SELECTARG1 = 2, // the default + D3DTOP_SELECTARG2 = 3, + +// Modulate + D3DTOP_MODULATE = 4, // multiply args together + D3DTOP_MODULATE2X = 5, // multiply and 1 bit + D3DTOP_MODULATE4X = 6, // multiply and 2 bits + +// Add + D3DTOP_ADD = 7, // add arguments together + D3DTOP_ADDSIGNED = 8, // add with -0.5 bias + D3DTOP_ADDSIGNED2X = 9, // as above but left 1 bit + D3DTOP_SUBTRACT = 10, // Arg1 - Arg2, with no saturation + D3DTOP_ADDSMOOTH = 11, // add 2 args, subtract product + // Arg1 + Arg2 - Arg1*Arg2 + // = Arg1 + (1-Arg1)*Arg2 + +// Linear alpha blend: Arg1*(Alpha) + Arg2*(1-Alpha) + D3DTOP_BLENDDIFFUSEALPHA = 12, // iterated alpha + D3DTOP_BLENDTEXTUREALPHA = 13, // texture alpha + D3DTOP_BLENDFACTORALPHA = 14, // alpha from D3DRENDERSTATE_TEXTUREFACTOR + // Linear alpha blend with pre-multiplied arg1 input: Arg1 + Arg2*(1-Alpha) + D3DTOP_BLENDTEXTUREALPHAPM = 15, // texture alpha + D3DTOP_BLENDCURRENTALPHA = 16, // by alpha of current color + +// Specular mapping + D3DTOP_PREMODULATE = 17, // modulate with next texture before use + D3DTOP_MODULATEALPHA_ADDCOLOR = 18, // Arg1.RGB + Arg1.A*Arg2.RGB + // COLOROP only + D3DTOP_MODULATECOLOR_ADDALPHA = 19, // Arg1.RGB*Arg2.RGB + Arg1.A + // COLOROP only + D3DTOP_MODULATEINVALPHA_ADDCOLOR = 20, // (1-Arg1.A)*Arg2.RGB + Arg1.RGB + // COLOROP only + D3DTOP_MODULATEINVCOLOR_ADDALPHA = 21, // (1-Arg1.RGB)*Arg2.RGB + Arg1.A + // COLOROP only + +// Bump mapping + D3DTOP_BUMPENVMAP = 22, // per pixel env map perturbation + D3DTOP_BUMPENVMAPLUMINANCE = 23, // with luminance channel + // This can do either diffuse or specular bump mapping with correct input. + // Performs the function (Arg1.R*Arg2.R + Arg1.G*Arg2.G + Arg1.B*Arg2.B) + // where each component has been scaled and offset to make it signed. + // The result is replicated into all four (including alpha) channels. + // This is a valid COLOROP only. + D3DTOP_DOTPRODUCT3 = 24, + + D3DTOP_FORCE_DWORD = 0x7fffffff, +} D3DTEXTUREOP; + +/* + * Values for COLORARG1,2 and ALPHAARG1,2 texture blending operations + * set in texture processing stage controls in D3DRENDERSTATE. + */ +#define D3DTA_SELECTMASK 0x0000000f // mask for arg selector +#define D3DTA_DIFFUSE 0x00000000 // select diffuse color +#define D3DTA_CURRENT 0x00000001 // select result of previous stage +#define D3DTA_TEXTURE 0x00000002 // select texture color +#define D3DTA_TFACTOR 0x00000003 // select RENDERSTATE_TEXTUREFACTOR +#if(DIRECT3D_VERSION >= 0x0700) +#define D3DTA_SPECULAR 0x00000004 // select specular color +#endif /* DIRECT3D_VERSION >= 0x0700 */ +#define D3DTA_COMPLEMENT 0x00000010 // take 1.0 - x +#define D3DTA_ALPHAREPLICATE 0x00000020 // replicate alpha to color components + +#endif //(DIRECT3D_VERSION < 0x0800) + +/* + * IDirect3DTexture2 State Filter Types + */ +typedef enum _D3DTEXTUREMAGFILTER +{ + D3DTFG_POINT = 1, // nearest + D3DTFG_LINEAR = 2, // linear interpolation + D3DTFG_FLATCUBIC = 3, // cubic + D3DTFG_GAUSSIANCUBIC = 4, // different cubic kernel + D3DTFG_ANISOTROPIC = 5, // +#if(DIRECT3D_VERSION >= 0x0700) +#endif /* DIRECT3D_VERSION >= 0x0700 */ + D3DTFG_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum +} D3DTEXTUREMAGFILTER; + +typedef enum _D3DTEXTUREMINFILTER +{ + D3DTFN_POINT = 1, // nearest + D3DTFN_LINEAR = 2, // linear interpolation + D3DTFN_ANISOTROPIC = 3, // + D3DTFN_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum +} D3DTEXTUREMINFILTER; + +typedef enum _D3DTEXTUREMIPFILTER +{ + D3DTFP_NONE = 1, // mipmapping disabled (use MAG filter) + D3DTFP_POINT = 2, // nearest + D3DTFP_LINEAR = 3, // linear interpolation + D3DTFP_FORCE_DWORD = 0x7fffffff, // force 32-bit size enum +} D3DTEXTUREMIPFILTER; + +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +/* + * Triangle flags + */ + +/* + * Tri strip and fan flags. + * START loads all three vertices + * EVEN and ODD load just v3 with even or odd culling + * START_FLAT contains a count from 0 to 29 that allows the + * whole strip or fan to be culled in one hit. + * e.g. for a quad len = 1 + */ +#define D3DTRIFLAG_START 0x00000000L +#define D3DTRIFLAG_STARTFLAT(len) (len) /* 0 < len < 30 */ +#define D3DTRIFLAG_ODD 0x0000001eL +#define D3DTRIFLAG_EVEN 0x0000001fL + +/* + * Triangle edge flags + * enable edges for wireframe or antialiasing + */ +#define D3DTRIFLAG_EDGEENABLE1 0x00000100L /* v0-v1 edge */ +#define D3DTRIFLAG_EDGEENABLE2 0x00000200L /* v1-v2 edge */ +#define D3DTRIFLAG_EDGEENABLE3 0x00000400L /* v2-v0 edge */ +#define D3DTRIFLAG_EDGEENABLETRIANGLE \ + (D3DTRIFLAG_EDGEENABLE1 | D3DTRIFLAG_EDGEENABLE2 | D3DTRIFLAG_EDGEENABLE3) + +/* + * Primitive structures and related defines. Vertex offsets are to types + * D3DVERTEX, D3DLVERTEX, or D3DTLVERTEX. + */ + +/* + * Triangle list primitive structure + */ +typedef struct _D3DTRIANGLE { + union { + WORD v1; /* Vertex indices */ + WORD wV1; + }; + union { + WORD v2; + WORD wV2; + }; + union { + WORD v3; + WORD wV3; + }; + WORD wFlags; /* Edge (and other) flags */ +} D3DTRIANGLE, *LPD3DTRIANGLE; + +/* + * Line list structure. + * The instruction count defines the number of line segments. + */ +typedef struct _D3DLINE { + union { + WORD v1; /* Vertex indices */ + WORD wV1; + }; + union { + WORD v2; + WORD wV2; + }; +} D3DLINE, *LPD3DLINE; + +/* + * Span structure + * Spans join a list of points with the same y value. + * If the y value changes, a new span is started. + */ +typedef struct _D3DSPAN { + WORD wCount; /* Number of spans */ + WORD wFirst; /* Index to first vertex */ +} D3DSPAN, *LPD3DSPAN; + +/* + * Point structure + */ +typedef struct _D3DPOINT { + WORD wCount; /* number of points */ + WORD wFirst; /* index to first vertex */ +} D3DPOINT, *LPD3DPOINT; + + +/* + * Forward branch structure. + * Mask is logically anded with the driver status mask + * if the result equals 'value', the branch is taken. + */ +typedef struct _D3DBRANCH { + DWORD dwMask; /* Bitmask against D3D status */ + DWORD dwValue; + BOOL bNegate; /* TRUE to negate comparison */ + DWORD dwOffset; /* How far to branch forward (0 for exit)*/ +} D3DBRANCH, *LPD3DBRANCH; + +/* + * Status used for set status instruction. + * The D3D status is initialised on device creation + * and is modified by all execute calls. + */ +typedef struct _D3DSTATUS { + DWORD dwFlags; /* Do we set extents or status */ + DWORD dwStatus; /* D3D status */ + D3DRECT drExtent; +} D3DSTATUS, *LPD3DSTATUS; + +#define D3DSETSTATUS_STATUS 0x00000001L +#define D3DSETSTATUS_EXTENTS 0x00000002L +#define D3DSETSTATUS_ALL (D3DSETSTATUS_STATUS | D3DSETSTATUS_EXTENTS) + +#if(DIRECT3D_VERSION >= 0x0500) +typedef struct _D3DCLIPSTATUS { + DWORD dwFlags; /* Do we set 2d extents, 3D extents or status */ + DWORD dwStatus; /* Clip status */ + float minx, maxx; /* X extents */ + float miny, maxy; /* Y extents */ + float minz, maxz; /* Z extents */ +} D3DCLIPSTATUS, *LPD3DCLIPSTATUS; + +#define D3DCLIPSTATUS_STATUS 0x00000001L +#define D3DCLIPSTATUS_EXTENTS2 0x00000002L +#define D3DCLIPSTATUS_EXTENTS3 0x00000004L + +#endif /* DIRECT3D_VERSION >= 0x0500 */ +/* + * Statistics structure + */ +typedef struct _D3DSTATS { + DWORD dwSize; + DWORD dwTrianglesDrawn; + DWORD dwLinesDrawn; + DWORD dwPointsDrawn; + DWORD dwSpansDrawn; + DWORD dwVerticesProcessed; +} D3DSTATS, *LPD3DSTATS; + +/* + * Execute options. + * When calling using D3DEXECUTE_UNCLIPPED all the primitives + * inside the buffer must be contained within the viewport. + */ +#define D3DEXECUTE_CLIPPED 0x00000001l +#define D3DEXECUTE_UNCLIPPED 0x00000002l + +typedef struct _D3DEXECUTEDATA { + DWORD dwSize; + DWORD dwVertexOffset; + DWORD dwVertexCount; + DWORD dwInstructionOffset; + DWORD dwInstructionLength; + DWORD dwHVertexOffset; + D3DSTATUS dsStatus; /* Status after execute */ +} D3DEXECUTEDATA, *LPD3DEXECUTEDATA; + +/* + * Palette flags. + * This are or'ed with the peFlags in the PALETTEENTRYs passed to DirectDraw. + */ +#define D3DPAL_FREE 0x00 /* Renderer may use this entry freely */ +#define D3DPAL_READONLY 0x40 /* Renderer may not set this entry */ +#define D3DPAL_RESERVED 0x80 /* Renderer may not use this entry */ + + +#if(DIRECT3D_VERSION >= 0x0600) + +typedef struct _D3DVERTEXBUFFERDESC { + DWORD dwSize; + DWORD dwCaps; + DWORD dwFVF; + DWORD dwNumVertices; +} D3DVERTEXBUFFERDESC, *LPD3DVERTEXBUFFERDESC; + +#define D3DVBCAPS_SYSTEMMEMORY 0x00000800l +#define D3DVBCAPS_WRITEONLY 0x00010000l +#define D3DVBCAPS_OPTIMIZED 0x80000000l +#define D3DVBCAPS_DONOTCLIP 0x00000001l + +/* Vertex Operations for ProcessVertices */ +#define D3DVOP_LIGHT (1 << 10) +#define D3DVOP_TRANSFORM (1 << 0) +#define D3DVOP_CLIP (1 << 2) +#define D3DVOP_EXTENTS (1 << 3) + + +#if(DIRECT3D_VERSION < 0x0800) + +/* The maximum number of vertices user can pass to any d3d + drawing function or to create vertex buffer with +*/ +#define D3DMAXNUMVERTICES ((1<<16) - 1) +/* The maximum number of primitives user can pass to any d3d + drawing function. +*/ +#define D3DMAXNUMPRIMITIVES ((1<<16) - 1) + +#if(DIRECT3D_VERSION >= 0x0700) + +/* Bits for dwFlags in ProcessVertices call */ +#define D3DPV_DONOTCOPYDATA (1 << 0) + +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +#endif //(DIRECT3D_VERSION < 0x0800) + +//------------------------------------------------------------------- + +#if(DIRECT3D_VERSION < 0x0800) + +// Flexible vertex format bits +// +#define D3DFVF_RESERVED0 0x001 +#define D3DFVF_POSITION_MASK 0x00E +#define D3DFVF_XYZ 0x002 +#define D3DFVF_XYZRHW 0x004 +#if(DIRECT3D_VERSION >= 0x0700) +#define D3DFVF_XYZB1 0x006 +#define D3DFVF_XYZB2 0x008 +#define D3DFVF_XYZB3 0x00a +#define D3DFVF_XYZB4 0x00c +#define D3DFVF_XYZB5 0x00e + +#endif /* DIRECT3D_VERSION >= 0x0700 */ +#define D3DFVF_NORMAL 0x010 +#define D3DFVF_RESERVED1 0x020 +#define D3DFVF_DIFFUSE 0x040 +#define D3DFVF_SPECULAR 0x080 + +#define D3DFVF_TEXCOUNT_MASK 0xf00 +#define D3DFVF_TEXCOUNT_SHIFT 8 +#define D3DFVF_TEX0 0x000 +#define D3DFVF_TEX1 0x100 +#define D3DFVF_TEX2 0x200 +#define D3DFVF_TEX3 0x300 +#define D3DFVF_TEX4 0x400 +#define D3DFVF_TEX5 0x500 +#define D3DFVF_TEX6 0x600 +#define D3DFVF_TEX7 0x700 +#define D3DFVF_TEX8 0x800 + +#define D3DFVF_RESERVED2 0xf000 // 4 reserved bits + +#else +#define D3DFVF_RESERVED1 0x020 +#endif //(DIRECT3D_VERSION < 0x0800) + +#define D3DFVF_VERTEX ( D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1 ) +#define D3DFVF_LVERTEX ( D3DFVF_XYZ | D3DFVF_RESERVED1 | D3DFVF_DIFFUSE | \ + D3DFVF_SPECULAR | D3DFVF_TEX1 ) +#define D3DFVF_TLVERTEX ( D3DFVF_XYZRHW | D3DFVF_DIFFUSE | D3DFVF_SPECULAR | \ + D3DFVF_TEX1 ) + + +typedef struct _D3DDP_PTRSTRIDE +{ + LPVOID lpvData; + DWORD dwStride; +} D3DDP_PTRSTRIDE; + +#define D3DDP_MAXTEXCOORD 8 + +typedef struct _D3DDRAWPRIMITIVESTRIDEDDATA +{ + D3DDP_PTRSTRIDE position; + D3DDP_PTRSTRIDE normal; + D3DDP_PTRSTRIDE diffuse; + D3DDP_PTRSTRIDE specular; + D3DDP_PTRSTRIDE textureCoords[D3DDP_MAXTEXCOORD]; +} D3DDRAWPRIMITIVESTRIDEDDATA, *LPD3DDRAWPRIMITIVESTRIDEDDATA; +//--------------------------------------------------------------------- +// ComputeSphereVisibility return values +// +#define D3DVIS_INSIDE_FRUSTUM 0 +#define D3DVIS_INTERSECT_FRUSTUM 1 +#define D3DVIS_OUTSIDE_FRUSTUM 2 +#define D3DVIS_INSIDE_LEFT 0 +#define D3DVIS_INTERSECT_LEFT (1 << 2) +#define D3DVIS_OUTSIDE_LEFT (2 << 2) +#define D3DVIS_INSIDE_RIGHT 0 +#define D3DVIS_INTERSECT_RIGHT (1 << 4) +#define D3DVIS_OUTSIDE_RIGHT (2 << 4) +#define D3DVIS_INSIDE_TOP 0 +#define D3DVIS_INTERSECT_TOP (1 << 6) +#define D3DVIS_OUTSIDE_TOP (2 << 6) +#define D3DVIS_INSIDE_BOTTOM 0 +#define D3DVIS_INTERSECT_BOTTOM (1 << 8) +#define D3DVIS_OUTSIDE_BOTTOM (2 << 8) +#define D3DVIS_INSIDE_NEAR 0 +#define D3DVIS_INTERSECT_NEAR (1 << 10) +#define D3DVIS_OUTSIDE_NEAR (2 << 10) +#define D3DVIS_INSIDE_FAR 0 +#define D3DVIS_INTERSECT_FAR (1 << 12) +#define D3DVIS_OUTSIDE_FAR (2 << 12) + +#define D3DVIS_MASK_FRUSTUM (3 << 0) +#define D3DVIS_MASK_LEFT (3 << 2) +#define D3DVIS_MASK_RIGHT (3 << 4) +#define D3DVIS_MASK_TOP (3 << 6) +#define D3DVIS_MASK_BOTTOM (3 << 8) +#define D3DVIS_MASK_NEAR (3 << 10) +#define D3DVIS_MASK_FAR (3 << 12) + +#endif /* DIRECT3D_VERSION >= 0x0600 */ + +#if(DIRECT3D_VERSION < 0x0800) + +#if(DIRECT3D_VERSION >= 0x0700) + +// To be used with GetInfo() +#define D3DDEVINFOID_TEXTUREMANAGER 1 +#define D3DDEVINFOID_D3DTEXTUREMANAGER 2 +#define D3DDEVINFOID_TEXTURING 3 + +typedef enum _D3DSTATEBLOCKTYPE +{ + D3DSBT_ALL = 1, // capture all state + D3DSBT_PIXELSTATE = 2, // capture pixel state + D3DSBT_VERTEXSTATE = 3, // capture vertex state + D3DSBT_FORCE_DWORD = 0xffffffff +} D3DSTATEBLOCKTYPE; + +// The D3DVERTEXBLENDFLAGS type is used with D3DRENDERSTATE_VERTEXBLEND state. +// +typedef enum _D3DVERTEXBLENDFLAGS +{ + D3DVBLEND_DISABLE = 0, // Disable vertex blending + D3DVBLEND_1WEIGHT = 1, // blend between 2 matrices + D3DVBLEND_2WEIGHTS = 2, // blend between 3 matrices + D3DVBLEND_3WEIGHTS = 3, // blend between 4 matrices +} D3DVERTEXBLENDFLAGS; + +typedef enum _D3DTEXTURETRANSFORMFLAGS { + D3DTTFF_DISABLE = 0, // texture coordinates are passed directly + D3DTTFF_COUNT1 = 1, // rasterizer should expect 1-D texture coords + D3DTTFF_COUNT2 = 2, // rasterizer should expect 2-D texture coords + D3DTTFF_COUNT3 = 3, // rasterizer should expect 3-D texture coords + D3DTTFF_COUNT4 = 4, // rasterizer should expect 4-D texture coords + D3DTTFF_PROJECTED = 256, // texcoords to be divided by COUNTth element + D3DTTFF_FORCE_DWORD = 0x7fffffff, +} D3DTEXTURETRANSFORMFLAGS; + +// Macros to set texture coordinate format bits in the FVF id + +#define D3DFVF_TEXTUREFORMAT2 0 // Two floating point values +#define D3DFVF_TEXTUREFORMAT1 3 // One floating point value +#define D3DFVF_TEXTUREFORMAT3 1 // Three floating point values +#define D3DFVF_TEXTUREFORMAT4 2 // Four floating point values + +#define D3DFVF_TEXCOORDSIZE3(CoordIndex) (D3DFVF_TEXTUREFORMAT3 << (CoordIndex*2 + 16)) +#define D3DFVF_TEXCOORDSIZE2(CoordIndex) (D3DFVF_TEXTUREFORMAT2) +#define D3DFVF_TEXCOORDSIZE4(CoordIndex) (D3DFVF_TEXTUREFORMAT4 << (CoordIndex*2 + 16)) +#define D3DFVF_TEXCOORDSIZE1(CoordIndex) (D3DFVF_TEXTUREFORMAT1 << (CoordIndex*2 + 16)) + + +#endif /* DIRECT3D_VERSION >= 0x0700 */ + +#else +// +// legacy vertex blend names +// +typedef enum _D3DVERTEXBLENDFLAGS D3DVERTEXBLENDFLAGS; +#define D3DVBLEND_DISABLE (D3DVERTEXBLENDFLAGS)0 +#define D3DVBLEND_1WEIGHT (D3DVERTEXBLENDFLAGS)1 +#define D3DVBLEND_2WEIGHTS (D3DVERTEXBLENDFLAGS)2 +#define D3DVBLEND_3WEIGHTS (D3DVERTEXBLENDFLAGS)3 + +#endif //(DIRECT3D_VERSION < 0x0800) + +#pragma pack() +#pragma warning(default:4201) + +#endif /* _D3DTYPES_H_ */ + diff --git a/windows_libs/mssdk/include/d3dvec.inl b/windows_libs/mssdk/include/d3dvec.inl new file mode 100644 index 00000000..1abd5476 --- /dev/null +++ b/windows_libs/mssdk/include/d3dvec.inl @@ -0,0 +1,255 @@ + +/****************************************************************** + * * + * D3DVec.inl * + * * + * Float-valued 3D vector class for Direct3D. * + * * + * Copyright (c) 1996-1998 Microsoft Corp. All rights reserved. * + * * + ******************************************************************/ + +#include + +// ===================================== +// Constructors +// ===================================== + +inline +_D3DVECTOR::_D3DVECTOR(D3DVALUE f) +{ + x = y = z = f; +} + +inline +_D3DVECTOR::_D3DVECTOR(D3DVALUE _x, D3DVALUE _y, D3DVALUE _z) +{ + x = _x; y = _y; z = _z; +} + +inline +_D3DVECTOR::_D3DVECTOR(const D3DVALUE f[3]) +{ + x = f[0]; y = f[1]; z = f[2]; +} + +// ===================================== +// Access grants +// ===================================== + +inline const D3DVALUE& +_D3DVECTOR::operator[](int i) const +{ + return (&x)[i]; +} + +inline D3DVALUE& +_D3DVECTOR::operator[](int i) +{ + return (&x)[i]; +} + + +// ===================================== +// Assignment operators +// ===================================== + +inline _D3DVECTOR& +_D3DVECTOR::operator += (const _D3DVECTOR& v) +{ + x += v.x; y += v.y; z += v.z; + return *this; +} + +inline _D3DVECTOR& +_D3DVECTOR::operator -= (const _D3DVECTOR& v) +{ + x -= v.x; y -= v.y; z -= v.z; + return *this; +} + +inline _D3DVECTOR& +_D3DVECTOR::operator *= (const _D3DVECTOR& v) +{ + x *= v.x; y *= v.y; z *= v.z; + return *this; +} + +inline _D3DVECTOR& +_D3DVECTOR::operator /= (const _D3DVECTOR& v) +{ + x /= v.x; y /= v.y; z /= v.z; + return *this; +} + +inline _D3DVECTOR& +_D3DVECTOR::operator *= (D3DVALUE s) +{ + x *= s; y *= s; z *= s; + return *this; +} + +inline _D3DVECTOR& +_D3DVECTOR::operator /= (D3DVALUE s) +{ + x /= s; y /= s; z /= s; + return *this; +} + +inline _D3DVECTOR +operator + (const _D3DVECTOR& v) +{ + return v; +} + +inline _D3DVECTOR +operator - (const _D3DVECTOR& v) +{ + return _D3DVECTOR(-v.x, -v.y, -v.z); +} + +inline _D3DVECTOR +operator + (const _D3DVECTOR& v1, const _D3DVECTOR& v2) +{ + return _D3DVECTOR(v1.x+v2.x, v1.y+v2.y, v1.z+v2.z); +} + +inline _D3DVECTOR +operator - (const _D3DVECTOR& v1, const _D3DVECTOR& v2) +{ + return _D3DVECTOR(v1.x-v2.x, v1.y-v2.y, v1.z-v2.z); +} + +inline _D3DVECTOR +operator * (const _D3DVECTOR& v1, const _D3DVECTOR& v2) +{ + return _D3DVECTOR(v1.x*v2.x, v1.y*v2.y, v1.z*v2.z); +} + +inline _D3DVECTOR +operator / (const _D3DVECTOR& v1, const _D3DVECTOR& v2) +{ + return _D3DVECTOR(v1.x/v2.x, v1.y/v2.y, v1.z/v2.z); +} + +inline int +operator < (const _D3DVECTOR& v1, const _D3DVECTOR& v2) +{ + return v1[0] < v2[0] && v1[1] < v2[1] && v1[2] < v2[2]; +} + +inline int +operator <= (const _D3DVECTOR& v1, const _D3DVECTOR& v2) +{ + return v1[0] <= v2[0] && v1[1] <= v2[1] && v1[2] <= v2[2]; +} + +inline _D3DVECTOR +operator * (const _D3DVECTOR& v, D3DVALUE s) +{ + return _D3DVECTOR(s*v.x, s*v.y, s*v.z); +} + +inline _D3DVECTOR +operator * (D3DVALUE s, const _D3DVECTOR& v) +{ + return _D3DVECTOR(s*v.x, s*v.y, s*v.z); +} + +inline _D3DVECTOR +operator / (const _D3DVECTOR& v, D3DVALUE s) +{ + return _D3DVECTOR(v.x/s, v.y/s, v.z/s); +} + +inline int +operator == (const _D3DVECTOR& v1, const _D3DVECTOR& v2) +{ + return v1.x==v2.x && v1.y==v2.y && v1.z == v2.z; +} + +inline D3DVALUE +Magnitude (const _D3DVECTOR& v) +{ + return (D3DVALUE) sqrt(SquareMagnitude(v)); +} + +inline D3DVALUE +SquareMagnitude (const _D3DVECTOR& v) +{ + return v.x*v.x + v.y*v.y + v.z*v.z; +} + +inline _D3DVECTOR +Normalize (const _D3DVECTOR& v) +{ + return v / Magnitude(v); +} + +inline D3DVALUE +Min (const _D3DVECTOR& v) +{ + D3DVALUE ret = v.x; + if (v.y < ret) ret = v.y; + if (v.z < ret) ret = v.z; + return ret; +} + +inline D3DVALUE +Max (const _D3DVECTOR& v) +{ + D3DVALUE ret = v.x; + if (ret < v.y) ret = v.y; + if (ret < v.z) ret = v.z; + return ret; +} + +inline _D3DVECTOR +Minimize (const _D3DVECTOR& v1, const _D3DVECTOR& v2) +{ + return _D3DVECTOR( v1[0] < v2[0] ? v1[0] : v2[0], + v1[1] < v2[1] ? v1[1] : v2[1], + v1[2] < v2[2] ? v1[2] : v2[2]); +} + +inline _D3DVECTOR +Maximize (const _D3DVECTOR& v1, const _D3DVECTOR& v2) +{ + return _D3DVECTOR( v1[0] > v2[0] ? v1[0] : v2[0], + v1[1] > v2[1] ? v1[1] : v2[1], + v1[2] > v2[2] ? v1[2] : v2[2]); +} + +inline D3DVALUE +DotProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2) +{ + return v1.x*v2.x + v1.y * v2.y + v1.z*v2.z; +} + +inline _D3DVECTOR +CrossProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2) +{ + _D3DVECTOR result; + + result[0] = v1[1] * v2[2] - v1[2] * v2[1]; + result[1] = v1[2] * v2[0] - v1[0] * v2[2]; + result[2] = v1[0] * v2[1] - v1[1] * v2[0]; + + return result; +} + +inline _D3DMATRIX +operator* (const _D3DMATRIX& a, const _D3DMATRIX& b) +{ + _D3DMATRIX ret; + for (int i=0; i<4; i++) { + for (int j=0; j<4; j++) { + ret(i, j) = 0.0f; + for (int k=0; k<4; k++) { + ret(i, j) += a(i, k) * b(k, j); + } + } + } + return ret; +} + diff --git a/windows_libs/mssdk/include/d3dx.h b/windows_libs/mssdk/include/d3dx.h new file mode 100644 index 00000000..5cff3250 --- /dev/null +++ b/windows_libs/mssdk/include/d3dx.h @@ -0,0 +1,26 @@ +/////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved. +// +// File: d3dx.h +// Content: D3DX utility library +// +/////////////////////////////////////////////////////////////////////////// + +#ifndef __D3DX_H__ +#define __D3DX_H__ + +#ifndef D3DXINLINE +#ifdef __cplusplus +#define D3DXINLINE inline +#else +#define D3DXINLINE _inline +#endif +#endif + +#include "d3dxcore.h" +#include "d3dxmath.h" +#include "d3dxshapes.h" +#include "d3dxsprite.h" + +#endif //__D3DX_H__ diff --git a/windows_libs/mssdk/include/d3dx8.h b/windows_libs/mssdk/include/d3dx8.h new file mode 100644 index 00000000..66af5e29 --- /dev/null +++ b/windows_libs/mssdk/include/d3dx8.h @@ -0,0 +1,36 @@ +/////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved. +// +// File: d3dx8.h +// Content: D3DX utility library +// +/////////////////////////////////////////////////////////////////////////// + +#ifndef __D3DX8_H__ +#define __D3DX8_H__ + +#include +#include + +#ifndef D3DXINLINE +#ifdef __cplusplus +#define D3DXINLINE inline +#else +#define D3DXINLINE _inline +#endif +#endif + +#define D3DX_DEFAULT ULONG_MAX +#define D3DX_DEFAULT_FLOAT FLT_MAX + +#include "d3dx8math.h" +#include "d3dx8core.h" +#include "d3dx8tex.h" +#include "d3dx8mesh.h" +#include "d3dx8shape.h" +#include "d3dx8effect.h" + + +#endif //__D3DX8_H__ + diff --git a/windows_libs/mssdk/include/d3dx8core.h b/windows_libs/mssdk/include/d3dx8core.h new file mode 100644 index 00000000..5428adb4 --- /dev/null +++ b/windows_libs/mssdk/include/d3dx8core.h @@ -0,0 +1,476 @@ +/////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved. +// +// File: d3dx8core.h +// Content: D3DX core types and functions +// +/////////////////////////////////////////////////////////////////////////// + +#include "d3dx8.h" + +#ifndef __D3DX8CORE_H__ +#define __D3DX8CORE_H__ + + +/////////////////////////////////////////////////////////////////////////// +// ID3DXBuffer: +// ------------ +// The buffer object is used to return arbitrary lenght data. +/////////////////////////////////////////////////////////////////////////// + +typedef interface ID3DXBuffer ID3DXBuffer; +typedef interface ID3DXBuffer *LPD3DXBUFFER; + +// {932E6A7E-C68E-45dd-A7BF-53D19C86DB1F} +DEFINE_GUID(IID_ID3DXBuffer, +0x932e6a7e, 0xc68e, 0x45dd, 0xa7, 0xbf, 0x53, 0xd1, 0x9c, 0x86, 0xdb, 0x1f); + +DECLARE_INTERFACE_(ID3DXBuffer, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DXBuffer + STDMETHOD_(LPVOID, GetBufferPointer)(THIS) PURE; + STDMETHOD_(DWORD, GetBufferSize)(THIS) PURE; +}; + + + + + +/////////////////////////////////////////////////////////////////////////// +// ID3DXFont: +// ---------- +// Font objects contain the textures and resources needed to render +// a specific font on a specific device. +// +// Begin - +// Prepartes device for drawing text. This is optional.. if DrawText +// is called outside of Begin/End, it will call Begin and End for you. +// +// DrawText - +// Draws formatted text on a D3D device. Some parameters are +// surprisingly similar to those of GDI's DrawText function. See GDI +// documentation for a detailed description of these parameters. +// +// End - +// Restores device state to how it was when Begin was called. +/////////////////////////////////////////////////////////////////////////// + +typedef interface ID3DXFont ID3DXFont; +typedef interface ID3DXFont *LPD3DXFONT; + + +// {2D501DF7-D253-4414-865F-A6D54A753138} +DEFINE_GUID( IID_ID3DXFont, +0x2d501df7, 0xd253, 0x4414, 0x86, 0x5f, 0xa6, 0xd5, 0x4a, 0x75, 0x31, 0x38); + + +DECLARE_INTERFACE_(ID3DXFont, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DXFont + STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE; + STDMETHOD(GetLogFont)(THIS_ LOGFONT* pLogFont) PURE; + + STDMETHOD(Begin)(THIS) PURE; + + STDMETHOD_(INT, DrawTextA)(THIS_ LPCSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE; + STDMETHOD_(INT, DrawTextW)(THIS_ LPCWSTR pString, INT Count, LPRECT pRect, DWORD Format, D3DCOLOR Color) PURE; + + STDMETHOD(End)(THIS) PURE; +}; + +#ifndef DrawText +#ifdef UNICODE +#define DrawText DrawTextW +#else +#define DrawText DrawTextA +#endif +#endif + + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +HRESULT WINAPI + D3DXCreateFont( + LPDIRECT3DDEVICE8 pDevice, + HFONT hFont, + LPD3DXFONT* ppFont); + + +HRESULT WINAPI + D3DXCreateFontIndirect( + LPDIRECT3DDEVICE8 pDevice, + CONST LOGFONT* pLogFont, + LPD3DXFONT* ppFont); + +#ifdef __cplusplus +} +#endif //__cplusplus + + + + + + + +/////////////////////////////////////////////////////////////////////////// +// ID3DXSprite: +// ------------ +// This object intends to provide an easy way to drawing sprites using D3D. +// +// Begin - +// Prepares device for drawing sprites +// +// Draw, DrawAffine, DrawTransform +// Draws a sprite in screen-space. Before transformation, the sprite is +// the size of SrcRect, with its top-left corner at the origin (0,0). +// The color and alpha channels are modulated by Color. +// +// End - +// Restores device state to how it was when Begin was called. +/////////////////////////////////////////////////////////////////////////// + +typedef interface ID3DXSprite ID3DXSprite; +typedef interface ID3DXSprite *LPD3DXSPRITE; + + +// {E8691849-87B8-4929-9050-1B0542D5538C} +DEFINE_GUID( IID_ID3DXSprite, +0xe8691849, 0x87b8, 0x4929, 0x90, 0x50, 0x1b, 0x5, 0x42, 0xd5, 0x53, 0x8c); + + +DECLARE_INTERFACE_(ID3DXSprite, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DXSprite + STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE; + + STDMETHOD(Begin)(THIS) PURE; + + STDMETHOD(Draw)(THIS_ LPDIRECT3DTEXTURE8 pSrcTexture, + CONST RECT* pSrcRect, CONST D3DXVECTOR2* pScaling, + CONST D3DXVECTOR2* pRotationCenter, FLOAT Rotation, + CONST D3DXVECTOR2* pTranslation, D3DCOLOR Color) PURE; + + STDMETHOD(DrawTransform)(THIS_ LPDIRECT3DTEXTURE8 pSrcTexture, + CONST RECT* pSrcRect, CONST D3DXMATRIX* pTransform, + D3DCOLOR Color) PURE; + + STDMETHOD(End)(THIS) PURE; +}; + + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + + +HRESULT WINAPI + D3DXCreateSprite( + LPDIRECT3DDEVICE8 pDevice, + LPD3DXSPRITE* ppSprite); + +#ifdef __cplusplus +} +#endif //__cplusplus + + + + + +/////////////////////////////////////////////////////////////////////////// +// ID3DXRenderToSurface: +// --------------------- +// This object abstracts rendering to surfaces. These surfaces do not +// necessarily need to be render targets. If they are not, a compatible +// render target is used, and the result copied into surface at end scene. +/////////////////////////////////////////////////////////////////////////// + +typedef struct _D3DXRTS_DESC +{ + UINT Width; + UINT Height; + D3DFORMAT Format; + BOOL DepthStencil; + D3DFORMAT DepthStencilFormat; + +} D3DXRTS_DESC; + + +typedef interface ID3DXRenderToSurface ID3DXRenderToSurface; +typedef interface ID3DXRenderToSurface *LPD3DXRENDERTOSURFACE; + + +// {69CC587C-E40C-458d-B5D3-B029E18EB60A} +DEFINE_GUID( IID_ID3DXRenderToSurface, +0x69cc587c, 0xe40c, 0x458d, 0xb5, 0xd3, 0xb0, 0x29, 0xe1, 0x8e, 0xb6, 0xa); + + +DECLARE_INTERFACE_(ID3DXRenderToSurface, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DXRenderToSurface + STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE; + STDMETHOD(GetDesc)(THIS_ D3DXRTS_DESC* pDesc) PURE; + + STDMETHOD(BeginScene)(THIS_ LPDIRECT3DSURFACE8 pSurface, CONST D3DVIEWPORT8* pViewport) PURE; + STDMETHOD(EndScene)(THIS) PURE; +}; + + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +HRESULT WINAPI + D3DXCreateRenderToSurface( + LPDIRECT3DDEVICE8 pDevice, + UINT Width, + UINT Height, + D3DFORMAT Format, + BOOL DepthStencil, + D3DFORMAT DepthStencilFormat, + LPD3DXRENDERTOSURFACE* ppRenderToSurface); + +#ifdef __cplusplus +} +#endif //__cplusplus + + + +/////////////////////////////////////////////////////////////////////////// +// ID3DXRenderToEnvMap: +// -------------------- +/////////////////////////////////////////////////////////////////////////// + +typedef struct _D3DXRTE_DESC +{ + UINT Size; + D3DFORMAT Format; + BOOL DepthStencil; + D3DFORMAT DepthStencilFormat; +} D3DXRTE_DESC; + + +typedef interface ID3DXRenderToEnvMap ID3DXRenderToEnvMap; +typedef interface ID3DXRenderToEnvMap *LPD3DXRenderToEnvMap; + +// {9F6779E5-60A9-4d8b-AEE4-32770F405DBA} +DEFINE_GUID( IID_ID3DXRenderToEnvMap, +0x9f6779e5, 0x60a9, 0x4d8b, 0xae, 0xe4, 0x32, 0x77, 0xf, 0x40, 0x5d, 0xba); + + +DECLARE_INTERFACE_(ID3DXRenderToEnvMap, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DXRenderToEnvMap + STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE; + STDMETHOD(GetDesc)(THIS_ D3DXRTE_DESC* pDesc) PURE; + + STDMETHOD(BeginCube)(THIS_ + LPDIRECT3DCUBETEXTURE8 pCubeTex) PURE; + + STDMETHOD(BeginSphere)(THIS_ + LPDIRECT3DTEXTURE8 pTex) PURE; + + STDMETHOD(BeginHemisphere)(THIS_ + LPDIRECT3DTEXTURE8 pTexZPos, + LPDIRECT3DTEXTURE8 pTexZNeg) PURE; + + STDMETHOD(BeginParabolic)(THIS_ + LPDIRECT3DTEXTURE8 pTexZPos, + LPDIRECT3DTEXTURE8 pTexZNeg) PURE; + + STDMETHOD(Face)(THIS_ D3DCUBEMAP_FACES Face) PURE; + STDMETHOD(End)(THIS) PURE; +}; + + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +HRESULT WINAPI + D3DXCreateRenderToEnvMap( + LPDIRECT3DDEVICE8 pDevice, + UINT Size, + D3DFORMAT Format, + BOOL DepthStencil, + D3DFORMAT DepthStencilFormat, + LPD3DXRenderToEnvMap* ppRenderToEnvMap); + +#ifdef __cplusplus +} +#endif //__cplusplus + + + +/////////////////////////////////////////////////////////////////////////// +// Shader assemblers: +/////////////////////////////////////////////////////////////////////////// + +//------------------------------------------------------------------------- +// D3DXASM flags: +// -------------- +// +// D3DXASM_DEBUG +// Generate debug info. +// +// D3DXASM_SKIPVALIDATION +// Do not validate the generated code against known capabilities and +// constraints. This option is only recommended when assembling shaders +// you KNOW will work. (ie. have assembled before without this option.) +//------------------------------------------------------------------------- + +#define D3DXASM_DEBUG (1 << 0) +#define D3DXASM_SKIPVALIDATION (1 << 1) + + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +//------------------------------------------------------------------------- +// D3DXAssembleShader: +// ------------------------ +// Assembles an ascii description of a vertex or pixel shader into +// binary form. +// +// Parameters: +// pSrcFile +// Source file name +// pSrcData +// Pointer to source code +// SrcDataLen +// Size of source code, in bytes +// Flags +// D3DXASM_xxx flags +// ppConstants +// Returns an ID3DXBuffer object containing constant declarations. +// ppCompiledShader +// Returns an ID3DXBuffer object containing the object code. +// ppCompilationErrors +// Returns an ID3DXBuffer object containing ascii error messages +//------------------------------------------------------------------------- + +HRESULT WINAPI + D3DXAssembleShaderFromFileA( + LPCSTR pSrcFile, + DWORD Flags, + LPD3DXBUFFER* ppConstants, + LPD3DXBUFFER* ppCompiledShader, + LPD3DXBUFFER* ppCompilationErrors); + +HRESULT WINAPI + D3DXAssembleShaderFromFileW( + LPCWSTR pSrcFile, + DWORD Flags, + LPD3DXBUFFER* ppConstants, + LPD3DXBUFFER* ppCompiledShader, + LPD3DXBUFFER* ppCompilationErrors); + +#ifdef UNICODE +#define D3DXAssembleShaderFromFile D3DXAssembleShaderFromFileW +#else +#define D3DXAssembleShaderFromFile D3DXAssembleShaderFromFileA +#endif + +HRESULT WINAPI + D3DXAssembleShader( + LPCVOID pSrcData, + UINT SrcDataLen, + DWORD Flags, + LPD3DXBUFFER* ppConstants, + LPD3DXBUFFER* ppCompiledShader, + LPD3DXBUFFER* ppCompilationErrors); + + +#ifdef __cplusplus +} +#endif //__cplusplus + + +/////////////////////////////////////////////////////////////////////////// +// Misc APIs: +/////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + + +//------------------------------------------------------------------------- +// D3DXGetFVFVertexSize: +// --------------------- +// Returns the size (in bytes) of a vertex for a given FVF. +//------------------------------------------------------------------------- + +UINT WINAPI + D3DXGetFVFVertexSize(DWORD FVF); + + +//------------------------------------------------------------------------- +// D3DXGetErrorString: +// ------------------ +// Returns the error string for given an hresult. Interprets all D3DX and +// D3D hresults. +// +// Parameters: +// hr +// The error code to be deciphered. +// pBuffer +// Pointer to the buffer to be filled in. +// BufferLen +// Count of characters in buffer. Any error message longer than this +// length will be truncated to fit. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXGetErrorStringA( + HRESULT hr, + LPSTR pBuffer, + UINT BufferLen); + +HRESULT WINAPI + D3DXGetErrorStringW( + HRESULT hr, + LPWSTR pBuffer, + UINT BufferLen); + +#ifdef UNICODE +#define D3DXGetErrorString D3DXGetErrorStringW +#else +#define D3DXGetErrorString D3DXGetErrorStringA +#endif + + + +#ifdef __cplusplus +} +#endif //__cplusplus + + +#endif //__D3DX8CORE_H__ diff --git a/windows_libs/mssdk/include/d3dx8effect.h b/windows_libs/mssdk/include/d3dx8effect.h new file mode 100644 index 00000000..bb8f0c34 --- /dev/null +++ b/windows_libs/mssdk/include/d3dx8effect.h @@ -0,0 +1,236 @@ +/////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved. +// +// File: d3dx8effect.h +// Content: D3DX effect types and functions +// +/////////////////////////////////////////////////////////////////////////// + +#include "d3dx8.h" + +#ifndef __D3DX8EFFECT_H__ +#define __D3DX8EFFECT_H__ + + +typedef enum _D3DXPARAMETERTYPE +{ + D3DXPT_DWORD = 0, + D3DXPT_FLOAT = 1, + D3DXPT_VECTOR = 2, + D3DXPT_MATRIX = 3, + D3DXPT_TEXTURE = 4, + D3DXPT_VERTEXSHADER = 5, + D3DXPT_PIXELSHADER = 6, + D3DXPT_CONSTANT = 7, + D3DXPT_FORCE_DWORD = 0x7fffffff /* force 32-bit size enum */ + +} D3DXPARAMETERTYPE; + + +typedef struct _D3DXEFFECT_DESC +{ + UINT Parameters; + UINT Techniques; + DWORD Usage; + +} D3DXEFFECT_DESC; + + +typedef struct _D3DXPARAMETER_DESC +{ + DWORD Name; + D3DXPARAMETERTYPE Type; + +} D3DXPARAMETER_DESC; + + +typedef struct _D3DXTECHNIQUE_DESC +{ + DWORD Name; + UINT Passes; + +} D3DXTECHNIQUE_DESC; + + +typedef struct _D3DXPASS_DESC +{ + DWORD Name; + +} D3DXPASS_DESC; + + +typedef struct ID3DXEffect *LPD3DXEFFECT; +typedef struct ID3DXTechnique *LPD3DXTECHNIQUE; + + + + +////////////////////////////////////////////////////////////////////////////// +// ID3DXTechnique //////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + +// {A00F378D-AF79-4917-907E-4D635EE63844} +DEFINE_GUID( IID_ID3DXTechnique, +0xa00f378d, 0xaf79, 0x4917, 0x90, 0x7e, 0x4d, 0x63, 0x5e, 0xe6, 0x38, 0x44); + + +DECLARE_INTERFACE_(ID3DXTechnique, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DXTechnique + STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE; + STDMETHOD(GetDesc)(THIS_ D3DXTECHNIQUE_DESC* pDesc) PURE; + STDMETHOD(GetPassDesc)(THIS_ UINT Index, D3DXPASS_DESC* pDesc) PURE; + + STDMETHOD_(BOOL, IsParameterUsed)(THIS_ DWORD dwName) PURE; + + STDMETHOD(Validate)(THIS) PURE; + STDMETHOD(Begin)(THIS_ UINT *pPasses) PURE; + STDMETHOD(Pass)(THIS_ UINT Index) PURE; + STDMETHOD(End)(THIS) PURE; +}; + + +////////////////////////////////////////////////////////////////////////////// +// ID3DXEffect /////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + + +// {281BBDD4-AEDF-4907-8650-E79CDFD45165} +DEFINE_GUID( IID_ID3DXEffect, +0x281bbdd4, 0xaedf, 0x4907, 0x86, 0x50, 0xe7, 0x9c, 0xdf, 0xd4, 0x51, 0x65); + + +DECLARE_INTERFACE_(ID3DXEffect, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DXEffect + STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE; + STDMETHOD(GetDesc)(THIS_ D3DXEFFECT_DESC* pDesc) PURE; + + STDMETHOD(GetParameterDesc)(THIS_ UINT Index, D3DXPARAMETER_DESC* pDesc) PURE; + STDMETHOD(GetTechniqueDesc)(THIS_ UINT Index, D3DXTECHNIQUE_DESC* pDesc) PURE; + + STDMETHOD(SetDword)(THIS_ DWORD Name, DWORD dw) PURE; + STDMETHOD(GetDword)(THIS_ DWORD Name, DWORD* pdw) PURE; + STDMETHOD(SetFloat)(THIS_ DWORD Name, FLOAT f) PURE; + STDMETHOD(GetFloat)(THIS_ DWORD Name, FLOAT* pf) PURE; + STDMETHOD(SetVector)(THIS_ DWORD Name, D3DXVECTOR4* pVector) PURE; + STDMETHOD(GetVector)(THIS_ DWORD Name, D3DXVECTOR4* pVector) PURE; + STDMETHOD(SetMatrix)(THIS_ DWORD Name, D3DXMATRIX* pMatrix) PURE; + STDMETHOD(GetMatrix)(THIS_ DWORD Name, D3DXMATRIX* pMatrix) PURE; + STDMETHOD(SetTexture)(THIS_ DWORD Name, LPDIRECT3DBASETEXTURE8 pTexture) PURE; + STDMETHOD(GetTexture)(THIS_ DWORD Name, LPDIRECT3DBASETEXTURE8 *ppTexture) PURE; + STDMETHOD(SetVertexShader)(THIS_ DWORD Name, DWORD Handle) PURE; + STDMETHOD(GetVertexShader)(THIS_ DWORD Name, DWORD* pHandle) PURE; + STDMETHOD(SetPixelShader)(THIS_ DWORD Name, DWORD Handle) PURE; + STDMETHOD(GetPixelShader)(THIS_ DWORD Name, DWORD* pHandle) PURE; + + STDMETHOD(GetTechnique)(THIS_ UINT Index, LPD3DXTECHNIQUE* ppTechnique) PURE; + STDMETHOD(CloneEffect)(THIS_ LPDIRECT3DDEVICE8 pDevice, DWORD Usage, LPD3DXEFFECT* ppEffect) PURE; +}; + + + +////////////////////////////////////////////////////////////////////////////// +// APIs ////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// + + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + + +//---------------------------------------------------------------------------- +// D3DXCompileEffect: +// ------------------ +// Compiles an ascii effect description into a binary form usable by +// D3DXCreateEffect. +// +// Parameters: +// pSrcFile +// Name of the file containing the ascii effect description +// pSrcData +// Pointer to ascii effect description +// SrcDataSize +// Size of the effect description in bytes +// ppCompiledEffect +// Returns a buffer containing compiled effect. +// ppCompilationErrors +// Returns a buffer containing any error messages which occurred during +// compile. Or NULL if you do not care about the error messages. +// +//---------------------------------------------------------------------------- + +HRESULT WINAPI + D3DXCompileEffectFromFileA( + LPCSTR pSrcFile, + LPD3DXBUFFER* ppCompiledEffect, + LPD3DXBUFFER* ppCompilationErrors); + +HRESULT WINAPI + D3DXCompileEffectFromFileW( + LPCWSTR pSrcFile, + LPD3DXBUFFER* ppCompiledEffect, + LPD3DXBUFFER* ppCompilationErrors); + +#ifdef UNICODE +#define D3DXCompileEffectFromFile D3DXCompileEffectFromFileW +#else +#define D3DXCompileEffectFromFile D3DXCompileEffectFromFileA +#endif + + +HRESULT WINAPI + D3DXCompileEffect( + LPCVOID pSrcData, + UINT SrcDataSize, + LPD3DXBUFFER* ppCompiledEffect, + LPD3DXBUFFER* ppCompilationErrors); + + + +//---------------------------------------------------------------------------- +// D3DXCreateEffect: +// ----------------- +// Creates an effect object, given compiled binary effect data +// +// Parameters: +// pDevice +// Pointer to the device to be used. +// pCompiledEffect +// Pointer to compiled effect data +// CompiledEffectSize +// Size of compiled effect data in bytes +// Usage +// Allows the specification of D3DUSAGE_SOFTWAREPROCESSING +// ppEffect +// Returns the created effect object +//---------------------------------------------------------------------------- + + +HRESULT WINAPI + D3DXCreateEffect( + LPDIRECT3DDEVICE8 pDevice, + LPCVOID pCompiledEffect, + UINT CompiledEffectSize, + DWORD Usage, + LPD3DXEFFECT* ppEffect); + + + +#ifdef __cplusplus +} +#endif //__cplusplus + +#endif //__D3DX8EFFECT_H__ diff --git a/windows_libs/mssdk/include/d3dx8math.h b/windows_libs/mssdk/include/d3dx8math.h new file mode 100644 index 00000000..83ec3308 --- /dev/null +++ b/windows_libs/mssdk/include/d3dx8math.h @@ -0,0 +1,1079 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 1998 Microsoft Corporation. All Rights Reserved. +// +// File: d3dx8math.h +// Content: D3DX math types and functions +// +////////////////////////////////////////////////////////////////////////////// + +#include "d3dx8.h" + +#ifndef __D3DX8MATH_H__ +#define __D3DX8MATH_H__ + +#include +#pragma warning(disable:4201) // anonymous unions warning + + + +typedef struct ID3DXMatrixStack *LPD3DXMATRIXSTACK; + +// {E3357330-CC5E-11d2-A434-00A0C90629A8} +DEFINE_GUID( IID_ID3DXMatrixStack, +0xe3357330, 0xcc5e, 0x11d2, 0xa4, 0x34, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8); + + +//=========================================================================== +// +// General purpose utilities +// +//=========================================================================== +#define D3DX_PI ((FLOAT) 3.141592654f) +#define D3DX_1BYPI ((FLOAT) 0.318309886f) + +#define D3DXToRadian( degree ) ((degree) * (D3DX_PI / 180.0f)) +#define D3DXToDegree( radian ) ((radian) * (180.0f / D3DX_PI)) + + + +//=========================================================================== +// +// Vectors +// +//=========================================================================== + +//-------------------------- +// 2D Vector +//-------------------------- +typedef struct D3DXVECTOR2 +{ +#ifdef __cplusplus +public: + D3DXVECTOR2() {}; + D3DXVECTOR2( CONST FLOAT * ); + D3DXVECTOR2( FLOAT x, FLOAT y ); + + // casting + operator FLOAT* (); + operator CONST FLOAT* () const; + + // assignment operators + D3DXVECTOR2& operator += ( CONST D3DXVECTOR2& ); + D3DXVECTOR2& operator -= ( CONST D3DXVECTOR2& ); + D3DXVECTOR2& operator *= ( FLOAT ); + D3DXVECTOR2& operator /= ( FLOAT ); + + // unary operators + D3DXVECTOR2 operator + () const; + D3DXVECTOR2 operator - () const; + + // binary operators + D3DXVECTOR2 operator + ( CONST D3DXVECTOR2& ) const; + D3DXVECTOR2 operator - ( CONST D3DXVECTOR2& ) const; + D3DXVECTOR2 operator * ( FLOAT ) const; + D3DXVECTOR2 operator / ( FLOAT ) const; + + friend D3DXVECTOR2 operator * ( FLOAT, CONST D3DXVECTOR2& ); + + BOOL operator == ( CONST D3DXVECTOR2& ) const; + BOOL operator != ( CONST D3DXVECTOR2& ) const; + + +public: +#endif //__cplusplus + FLOAT x, y; +} D3DXVECTOR2, *LPD3DXVECTOR2; + + +//-------------------------- +// 3D Vector +//-------------------------- +#ifdef __cplusplus +typedef struct D3DXVECTOR3 : public D3DVECTOR +{ +public: + D3DXVECTOR3() {}; + D3DXVECTOR3( CONST FLOAT * ); + D3DXVECTOR3( CONST D3DVECTOR& ); + D3DXVECTOR3( FLOAT x, FLOAT y, FLOAT z ); + + // casting + operator FLOAT* (); + operator CONST FLOAT* () const; + + // assignment operators + D3DXVECTOR3& operator += ( CONST D3DXVECTOR3& ); + D3DXVECTOR3& operator -= ( CONST D3DXVECTOR3& ); + D3DXVECTOR3& operator *= ( FLOAT ); + D3DXVECTOR3& operator /= ( FLOAT ); + + // unary operators + D3DXVECTOR3 operator + () const; + D3DXVECTOR3 operator - () const; + + // binary operators + D3DXVECTOR3 operator + ( CONST D3DXVECTOR3& ) const; + D3DXVECTOR3 operator - ( CONST D3DXVECTOR3& ) const; + D3DXVECTOR3 operator * ( FLOAT ) const; + D3DXVECTOR3 operator / ( FLOAT ) const; + + friend D3DXVECTOR3 operator * ( FLOAT, CONST struct D3DXVECTOR3& ); + + BOOL operator == ( CONST D3DXVECTOR3& ) const; + BOOL operator != ( CONST D3DXVECTOR3& ) const; + +} D3DXVECTOR3, *LPD3DXVECTOR3; + +#else //!__cplusplus +typedef struct _D3DVECTOR D3DXVECTOR3, *LPD3DXVECTOR3; +#endif //!__cplusplus + + +//-------------------------- +// 4D Vector +//-------------------------- +typedef struct D3DXVECTOR4 +{ +#ifdef __cplusplus +public: + D3DXVECTOR4() {}; + D3DXVECTOR4( CONST FLOAT* ); + D3DXVECTOR4( FLOAT x, FLOAT y, FLOAT z, FLOAT w ); + + // casting + operator FLOAT* (); + operator CONST FLOAT* () const; + + // assignment operators + D3DXVECTOR4& operator += ( CONST D3DXVECTOR4& ); + D3DXVECTOR4& operator -= ( CONST D3DXVECTOR4& ); + D3DXVECTOR4& operator *= ( FLOAT ); + D3DXVECTOR4& operator /= ( FLOAT ); + + // unary operators + D3DXVECTOR4 operator + () const; + D3DXVECTOR4 operator - () const; + + // binary operators + D3DXVECTOR4 operator + ( CONST D3DXVECTOR4& ) const; + D3DXVECTOR4 operator - ( CONST D3DXVECTOR4& ) const; + D3DXVECTOR4 operator * ( FLOAT ) const; + D3DXVECTOR4 operator / ( FLOAT ) const; + + friend D3DXVECTOR4 operator * ( FLOAT, CONST D3DXVECTOR4& ); + + BOOL operator == ( CONST D3DXVECTOR4& ) const; + BOOL operator != ( CONST D3DXVECTOR4& ) const; + +public: +#endif //__cplusplus + FLOAT x, y, z, w; +} D3DXVECTOR4, *LPD3DXVECTOR4; + + +//=========================================================================== +// +// Matrices +// +//=========================================================================== +#ifdef __cplusplus +typedef struct D3DXMATRIX : public D3DMATRIX +{ +public: + D3DXMATRIX() {}; + D3DXMATRIX( CONST FLOAT * ); + D3DXMATRIX( CONST D3DMATRIX& ); + D3DXMATRIX( FLOAT _11, FLOAT _12, FLOAT _13, FLOAT _14, + FLOAT _21, FLOAT _22, FLOAT _23, FLOAT _24, + FLOAT _31, FLOAT _32, FLOAT _33, FLOAT _34, + FLOAT _41, FLOAT _42, FLOAT _43, FLOAT _44 ); + + + // access grants + FLOAT& operator () ( UINT Row, UINT Col ); + FLOAT operator () ( UINT Row, UINT Col ) const; + + // casting operators + operator FLOAT* (); + operator CONST FLOAT* () const; + + // assignment operators + D3DXMATRIX& operator *= ( CONST D3DXMATRIX& ); + D3DXMATRIX& operator += ( CONST D3DXMATRIX& ); + D3DXMATRIX& operator -= ( CONST D3DXMATRIX& ); + D3DXMATRIX& operator *= ( FLOAT ); + D3DXMATRIX& operator /= ( FLOAT ); + + // unary operators + D3DXMATRIX operator + () const; + D3DXMATRIX operator - () const; + + // binary operators + D3DXMATRIX operator * ( CONST D3DXMATRIX& ) const; + D3DXMATRIX operator + ( CONST D3DXMATRIX& ) const; + D3DXMATRIX operator - ( CONST D3DXMATRIX& ) const; + D3DXMATRIX operator * ( FLOAT ) const; + D3DXMATRIX operator / ( FLOAT ) const; + + friend D3DXMATRIX operator * ( FLOAT, CONST D3DXMATRIX& ); + + BOOL operator == ( CONST D3DXMATRIX& ) const; + BOOL operator != ( CONST D3DXMATRIX& ) const; + +} D3DXMATRIX, *LPD3DXMATRIX; + +#else //!__cplusplus +typedef struct _D3DMATRIX D3DXMATRIX, *LPD3DXMATRIX; +#endif //!__cplusplus + + +//=========================================================================== +// +// Quaternions +// +//=========================================================================== +typedef struct D3DXQUATERNION +{ +#ifdef __cplusplus +public: + D3DXQUATERNION() {} + D3DXQUATERNION( CONST FLOAT * ); + D3DXQUATERNION( FLOAT x, FLOAT y, FLOAT z, FLOAT w ); + + // casting + operator FLOAT* (); + operator CONST FLOAT* () const; + + // assignment operators + D3DXQUATERNION& operator += ( CONST D3DXQUATERNION& ); + D3DXQUATERNION& operator -= ( CONST D3DXQUATERNION& ); + D3DXQUATERNION& operator *= ( CONST D3DXQUATERNION& ); + D3DXQUATERNION& operator *= ( FLOAT ); + D3DXQUATERNION& operator /= ( FLOAT ); + + // unary operators + D3DXQUATERNION operator + () const; + D3DXQUATERNION operator - () const; + + // binary operators + D3DXQUATERNION operator + ( CONST D3DXQUATERNION& ) const; + D3DXQUATERNION operator - ( CONST D3DXQUATERNION& ) const; + D3DXQUATERNION operator * ( CONST D3DXQUATERNION& ) const; + D3DXQUATERNION operator * ( FLOAT ) const; + D3DXQUATERNION operator / ( FLOAT ) const; + + friend D3DXQUATERNION operator * (FLOAT, CONST D3DXQUATERNION& ); + + BOOL operator == ( CONST D3DXQUATERNION& ) const; + BOOL operator != ( CONST D3DXQUATERNION& ) const; + +#endif //__cplusplus + FLOAT x, y, z, w; +} D3DXQUATERNION, *LPD3DXQUATERNION; + + +//=========================================================================== +// +// Planes +// +//=========================================================================== +typedef struct D3DXPLANE +{ +#ifdef __cplusplus +public: + D3DXPLANE() {} + D3DXPLANE( CONST FLOAT* ); + D3DXPLANE( FLOAT a, FLOAT b, FLOAT c, FLOAT d ); + + // casting + operator FLOAT* (); + operator CONST FLOAT* () const; + + // unary operators + D3DXPLANE operator + () const; + D3DXPLANE operator - () const; + + // binary operators + BOOL operator == ( CONST D3DXPLANE& ) const; + BOOL operator != ( CONST D3DXPLANE& ) const; + +#endif //__cplusplus + FLOAT a, b, c, d; +} D3DXPLANE, *LPD3DXPLANE; + + +//=========================================================================== +// +// Colors +// +//=========================================================================== + +typedef struct D3DXCOLOR +{ +#ifdef __cplusplus +public: + D3DXCOLOR() {} + D3DXCOLOR( DWORD argb ); + D3DXCOLOR( CONST FLOAT * ); + D3DXCOLOR( CONST D3DCOLORVALUE& ); + D3DXCOLOR( FLOAT r, FLOAT g, FLOAT b, FLOAT a ); + + // casting + operator DWORD () const; + + operator FLOAT* (); + operator CONST FLOAT* () const; + + operator D3DCOLORVALUE* (); + operator CONST D3DCOLORVALUE* () const; + + operator D3DCOLORVALUE& (); + operator CONST D3DCOLORVALUE& () const; + + // assignment operators + D3DXCOLOR& operator += ( CONST D3DXCOLOR& ); + D3DXCOLOR& operator -= ( CONST D3DXCOLOR& ); + D3DXCOLOR& operator *= ( FLOAT ); + D3DXCOLOR& operator /= ( FLOAT ); + + // unary operators + D3DXCOLOR operator + () const; + D3DXCOLOR operator - () const; + + // binary operators + D3DXCOLOR operator + ( CONST D3DXCOLOR& ) const; + D3DXCOLOR operator - ( CONST D3DXCOLOR& ) const; + D3DXCOLOR operator * ( FLOAT ) const; + D3DXCOLOR operator / ( FLOAT ) const; + + friend D3DXCOLOR operator * (FLOAT, CONST D3DXCOLOR& ); + + BOOL operator == ( CONST D3DXCOLOR& ) const; + BOOL operator != ( CONST D3DXCOLOR& ) const; + +#endif //__cplusplus + FLOAT r, g, b, a; +} D3DXCOLOR, *LPD3DXCOLOR; + + + +//=========================================================================== +// +// D3DX math functions: +// +// NOTE: +// * All these functions can take the same object as in and out parameters. +// +// * Out parameters are typically also returned as return values, so that +// the output of one function may be used as a parameter to another. +// +//=========================================================================== + +//-------------------------- +// 2D Vector +//-------------------------- + +// inline + +FLOAT D3DXVec2Length + ( CONST D3DXVECTOR2 *pV ); + +FLOAT D3DXVec2LengthSq + ( CONST D3DXVECTOR2 *pV ); + +FLOAT D3DXVec2Dot + ( CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); + +// Z component of ((x1,y1,0) cross (x2,y2,0)) +FLOAT D3DXVec2CCW + ( CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); + +D3DXVECTOR2* D3DXVec2Add + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); + +D3DXVECTOR2* D3DXVec2Subtract + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); + +// Minimize each component. x = min(x1, x2), y = min(y1, y2) +D3DXVECTOR2* D3DXVec2Minimize + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); + +// Maximize each component. x = max(x1, x2), y = max(y1, y2) +D3DXVECTOR2* D3DXVec2Maximize + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ); + +D3DXVECTOR2* D3DXVec2Scale + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, FLOAT s ); + +// Linear interpolation. V1 + s(V2-V1) +D3DXVECTOR2* D3DXVec2Lerp + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2, + FLOAT s ); + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +D3DXVECTOR2* WINAPI D3DXVec2Normalize + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV ); + +// Hermite interpolation between position V1, tangent T1 (when s == 0) +// and position V2, tangent T2 (when s == 1). +D3DXVECTOR2* WINAPI D3DXVec2Hermite + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pT1, + CONST D3DXVECTOR2 *pV2, CONST D3DXVECTOR2 *pT2, FLOAT s ); + +// CatmullRom interpolation between V1 (when s == 0) and V2 (when s == 1) +D3DXVECTOR2* WINAPI D3DXVec2CatmullRom + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV0, CONST D3DXVECTOR2 *pV1, + CONST D3DXVECTOR2 *pV2, CONST D3DXVECTOR2 *pV3, FLOAT s ); + +// Barycentric coordinates. V1 + f(V2-V1) + g(V3-V1) +D3DXVECTOR2* WINAPI D3DXVec2BaryCentric + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2, + D3DXVECTOR2 *pV3, FLOAT f, FLOAT g); + +// Transform (x, y, 0, 1) by matrix. +D3DXVECTOR4* WINAPI D3DXVec2Transform + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR2 *pV, CONST D3DXMATRIX *pM ); + +// Transform (x, y, 0, 1) by matrix, project result back into w=1. +D3DXVECTOR2* WINAPI D3DXVec2TransformCoord + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, CONST D3DXMATRIX *pM ); + +// Transform (x, y, 0, 0) by matrix. +D3DXVECTOR2* WINAPI D3DXVec2TransformNormal + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, CONST D3DXMATRIX *pM ); + +#ifdef __cplusplus +} +#endif + + +//-------------------------- +// 3D Vector +//-------------------------- + +// inline + +FLOAT D3DXVec3Length + ( CONST D3DXVECTOR3 *pV ); + +FLOAT D3DXVec3LengthSq + ( CONST D3DXVECTOR3 *pV ); + +FLOAT D3DXVec3Dot + ( CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); + +D3DXVECTOR3* D3DXVec3Cross + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); + +D3DXVECTOR3* D3DXVec3Add + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); + +D3DXVECTOR3* D3DXVec3Subtract + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); + +// Minimize each component. x = min(x1, x2), y = min(y1, y2), ... +D3DXVECTOR3* D3DXVec3Minimize + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); + +// Maximize each component. x = max(x1, x2), y = max(y1, y2), ... +D3DXVECTOR3* D3DXVec3Maximize + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ); + +D3DXVECTOR3* D3DXVec3Scale + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, FLOAT s); + +// Linear interpolation. V1 + s(V2-V1) +D3DXVECTOR3* D3DXVec3Lerp + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, + FLOAT s ); + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +D3DXVECTOR3* WINAPI D3DXVec3Normalize + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV ); + +// Hermite interpolation between position V1, tangent T1 (when s == 0) +// and position V2, tangent T2 (when s == 1). +D3DXVECTOR3* WINAPI D3DXVec3Hermite + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pT1, + CONST D3DXVECTOR3 *pV2, CONST D3DXVECTOR3 *pT2, FLOAT s ); + +// CatmullRom interpolation between V1 (when s == 0) and V2 (when s == 1) +D3DXVECTOR3* WINAPI D3DXVec3CatmullRom + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV0, CONST D3DXVECTOR3 *pV1, + CONST D3DXVECTOR3 *pV2, CONST D3DXVECTOR3 *pV3, FLOAT s ); + +// Barycentric coordinates. V1 + f(V2-V1) + g(V3-V1) +D3DXVECTOR3* WINAPI D3DXVec3BaryCentric + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, + CONST D3DXVECTOR3 *pV3, FLOAT f, FLOAT g); + +// Transform (x, y, z, 1) by matrix. +D3DXVECTOR4* WINAPI D3DXVec3Transform + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM ); + +// Transform (x, y, z, 1) by matrix, project result back into w=1. +D3DXVECTOR3* WINAPI D3DXVec3TransformCoord + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM ); + +// Transform (x, y, z, 0) by matrix. If you transforming a normal by a +// non-affine matrix, the matrix you pass to this function should be the +// transpose of the inverse of the matrix you would use to transform a coord. +D3DXVECTOR3* WINAPI D3DXVec3TransformNormal + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DXMATRIX *pM ); + +// Project vector from object space into screen space +D3DXVECTOR3* WINAPI D3DXVec3Project + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DVIEWPORT8 *pViewport, + CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld); + +// Project vector from screen space into object space +D3DXVECTOR3* WINAPI D3DXVec3Unproject + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, CONST D3DVIEWPORT8 *pViewport, + CONST D3DXMATRIX *pProjection, CONST D3DXMATRIX *pView, CONST D3DXMATRIX *pWorld); + +#ifdef __cplusplus +} +#endif + + + +//-------------------------- +// 4D Vector +//-------------------------- + +// inline + +FLOAT D3DXVec4Length + ( CONST D3DXVECTOR4 *pV ); + +FLOAT D3DXVec4LengthSq + ( CONST D3DXVECTOR4 *pV ); + +FLOAT D3DXVec4Dot + ( CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2 ); + +D3DXVECTOR4* D3DXVec4Add + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2); + +D3DXVECTOR4* D3DXVec4Subtract + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2); + +// Minimize each component. x = min(x1, x2), y = min(y1, y2), ... +D3DXVECTOR4* D3DXVec4Minimize + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2); + +// Maximize each component. x = max(x1, x2), y = max(y1, y2), ... +D3DXVECTOR4* D3DXVec4Maximize + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2); + +D3DXVECTOR4* D3DXVec4Scale + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV, FLOAT s); + +// Linear interpolation. V1 + s(V2-V1) +D3DXVECTOR4* D3DXVec4Lerp + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2, + FLOAT s ); + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +// Cross-product in 4 dimensions. +D3DXVECTOR4* WINAPI D3DXVec4Cross + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2, + CONST D3DXVECTOR4 *pV3); + +D3DXVECTOR4* WINAPI D3DXVec4Normalize + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV ); + +// Hermite interpolation between position V1, tangent T1 (when s == 0) +// and position V2, tangent T2 (when s == 1). +D3DXVECTOR4* WINAPI D3DXVec4Hermite + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pT1, + CONST D3DXVECTOR4 *pV2, CONST D3DXVECTOR4 *pT2, FLOAT s ); + +// CatmullRom interpolation between V1 (when s == 0) and V2 (when s == 1) +D3DXVECTOR4* WINAPI D3DXVec4CatmullRom + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV0, CONST D3DXVECTOR4 *pV1, + CONST D3DXVECTOR4 *pV2, CONST D3DXVECTOR4 *pV3, FLOAT s ); + +// Barycentric coordinates. V1 + f(V2-V1) + g(V3-V1) +D3DXVECTOR4* WINAPI D3DXVec4BaryCentric + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2, + CONST D3DXVECTOR4 *pV3, FLOAT f, FLOAT g); + +// Transform vector by matrix. +D3DXVECTOR4* WINAPI D3DXVec4Transform + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV, CONST D3DXMATRIX *pM ); + +#ifdef __cplusplus +} +#endif + + +//-------------------------- +// 4D Matrix +//-------------------------- + +// inline + +D3DXMATRIX* D3DXMatrixIdentity + ( D3DXMATRIX *pOut ); + +BOOL D3DXMatrixIsIdentity + ( CONST D3DXMATRIX *pM ); + + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +FLOAT WINAPI D3DXMatrixfDeterminant + ( CONST D3DXMATRIX *pM ); + +// Matrix multiplication. The result represents the transformation M2 +// followed by the transformation M1. (Out = M1 * M2) +D3DXMATRIX* WINAPI D3DXMatrixMultiply + ( D3DXMATRIX *pOut, CONST D3DXMATRIX *pM1, CONST D3DXMATRIX *pM2 ); + +D3DXMATRIX* WINAPI D3DXMatrixTranspose + ( D3DXMATRIX *pOut, CONST D3DXMATRIX *pM ); + +// Calculate inverse of matrix. Inversion my fail, in which case NULL will +// be returned. The determinant of pM is also returned it pfDeterminant +// is non-NULL. +D3DXMATRIX* WINAPI D3DXMatrixInverse + ( D3DXMATRIX *pOut, FLOAT *pDeterminant, CONST D3DXMATRIX *pM ); + +// Build a matrix which scales by (sx, sy, sz) +D3DXMATRIX* WINAPI D3DXMatrixScaling + ( D3DXMATRIX *pOut, FLOAT sx, FLOAT sy, FLOAT sz ); + +// Build a matrix which translates by (x, y, z) +D3DXMATRIX* WINAPI D3DXMatrixTranslation + ( D3DXMATRIX *pOut, FLOAT x, FLOAT y, FLOAT z ); + +// Build a matrix which rotates around the X axis +D3DXMATRIX* WINAPI D3DXMatrixRotationX + ( D3DXMATRIX *pOut, FLOAT Angle ); + +// Build a matrix which rotates around the Y axis +D3DXMATRIX* WINAPI D3DXMatrixRotationY + ( D3DXMATRIX *pOut, FLOAT Angle ); + +// Build a matrix which rotates around the Z axis +D3DXMATRIX* WINAPI D3DXMatrixRotationZ + ( D3DXMATRIX *pOut, FLOAT Angle ); + +// Build a matrix which rotates around an arbitrary axis +D3DXMATRIX* WINAPI D3DXMatrixRotationAxis + ( D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pV, FLOAT Angle ); + +// Build a matrix from a quaternion +D3DXMATRIX* WINAPI D3DXMatrixRotationQuaternion + ( D3DXMATRIX *pOut, CONST D3DXQUATERNION *pQ); + +// Yaw around the Y axis, a pitch around the X axis, +// and a roll around the Z axis. +D3DXMATRIX* WINAPI D3DXMatrixRotationYawPitchRoll + ( D3DXMATRIX *pOut, FLOAT Yaw, FLOAT Pitch, FLOAT Roll ); + + +// Build transformation matrix. NULL arguments are treated as identity. +// Mout = Msc-1 * Msr-1 * Ms * Msr * Msc * Mrc-1 * Mr * Mrc * Mt +D3DXMATRIX* WINAPI D3DXMatrixTransformation + ( D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pScalingCenter, + CONST D3DXQUATERNION *pScalingRotation, CONST D3DXVECTOR3 *pScaling, + CONST D3DXVECTOR3 *pRotationCenter, CONST D3DXQUATERNION *pRotation, + CONST D3DXVECTOR3 *pTranslation); + +// Build affine transformation matrix. NULL arguments are treated as identity. +// Mout = Ms * Mrc-1 * Mr * Mrc * Mt +D3DXMATRIX* WINAPI D3DXMatrixAffineTransformation + ( D3DXMATRIX *pOut, FLOAT Scaling, CONST D3DXVECTOR3 *pRotationCenter, + CONST D3DXQUATERNION *pRotation, CONST D3DXVECTOR3 *pTranslation); + +// Build a lookat matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixLookAtRH + ( D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pEye, CONST D3DXVECTOR3 *pAt, + CONST D3DXVECTOR3 *pUp ); + +// Build a lookat matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixLookAtLH + ( D3DXMATRIX *pOut, CONST D3DXVECTOR3 *pEye, CONST D3DXVECTOR3 *pAt, + CONST D3DXVECTOR3 *pUp ); + +// Build a perspective projection matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveRH + ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf ); + +// Build a perspective projection matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveLH + ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf ); + +// Build a perspective projection matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveFovRH + ( D3DXMATRIX *pOut, FLOAT fovy, FLOAT Aspect, FLOAT zn, FLOAT zf ); + +// Build a perspective projection matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveFovLH + ( D3DXMATRIX *pOut, FLOAT fovy, FLOAT Aspect, FLOAT zn, FLOAT zf ); + +// Build a perspective projection matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveOffCenterRH + ( D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, + FLOAT zf ); + +// Build a perspective projection matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveOffCenterLH + ( D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, + FLOAT zf ); + +// Build an ortho projection matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixOrthoRH + ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf ); + +// Build an ortho projection matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixOrthoLH + ( D3DXMATRIX *pOut, FLOAT w, FLOAT h, FLOAT zn, FLOAT zf ); + +// Build an ortho projection matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixOrthoOffCenterRH + ( D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, + FLOAT zf ); + +// Build an ortho projection matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixOrthoOffCenterLH + ( D3DXMATRIX *pOut, FLOAT l, FLOAT r, FLOAT b, FLOAT t, FLOAT zn, + FLOAT zf ); + +// Build a matrix which flattens geometry into a plane, as if casting +// a shadow from a light. +D3DXMATRIX* WINAPI D3DXMatrixShadow + ( D3DXMATRIX *pOut, CONST D3DXVECTOR4 *pLight, + CONST D3DXPLANE *pPlane ); + +// Build a matrix which reflects the coordinate system about a plane +D3DXMATRIX* WINAPI D3DXMatrixReflect + ( D3DXMATRIX *pOut, CONST D3DXPLANE *pPlane ); + +#ifdef __cplusplus +} +#endif + + +//-------------------------- +// Quaternion +//-------------------------- + +// inline + +FLOAT D3DXQuaternionLength + ( CONST D3DXQUATERNION *pQ ); + +// Length squared, or "norm" +FLOAT D3DXQuaternionLengthSq + ( CONST D3DXQUATERNION *pQ ); + +FLOAT D3DXQuaternionDot + ( CONST D3DXQUATERNION *pQ1, CONST D3DXQUATERNION *pQ2 ); + +// (0, 0, 0, 1) +D3DXQUATERNION* D3DXQuaternionIdentity + ( D3DXQUATERNION *pOut ); + +BOOL D3DXQuaternionIsIdentity + ( CONST D3DXQUATERNION *pQ ); + +// (-x, -y, -z, w) +D3DXQUATERNION* D3DXQuaternionConjugate + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); + + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +// Compute a quaternin's axis and angle of rotation. Expects unit quaternions. +void WINAPI D3DXQuaternionToAxisAngle + ( CONST D3DXQUATERNION *pQ, D3DXVECTOR3 *pAxis, FLOAT *pAngle ); + +// Build a quaternion from a rotation matrix. +D3DXQUATERNION* WINAPI D3DXQuaternionRotationMatrix + ( D3DXQUATERNION *pOut, CONST D3DXMATRIX *pM); + +// Rotation about arbitrary axis. +D3DXQUATERNION* WINAPI D3DXQuaternionRotationAxis + ( D3DXQUATERNION *pOut, CONST D3DXVECTOR3 *pV, FLOAT Angle ); + +// Yaw around the Y axis, a pitch around the X axis, +// and a roll around the Z axis. +D3DXQUATERNION* WINAPI D3DXQuaternionRotationYawPitchRoll + ( D3DXQUATERNION *pOut, FLOAT Yaw, FLOAT Pitch, FLOAT Roll ); + +// Quaternion multiplication. The result represents the rotation Q2 +// followed by the rotation Q1. (Out = Q2 * Q1) +D3DXQUATERNION* WINAPI D3DXQuaternionMultiply + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1, + CONST D3DXQUATERNION *pQ2 ); + +D3DXQUATERNION* WINAPI D3DXQuaternionNormalize + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); + +// Conjugate and re-norm +D3DXQUATERNION* WINAPI D3DXQuaternionInverse + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); + +// Expects unit quaternions. +// if q = (cos(theta), sin(theta) * v); ln(q) = (0, theta * v) +D3DXQUATERNION* WINAPI D3DXQuaternionLn + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); + +// Expects pure quaternions. (w == 0) w is ignored in calculation. +// if q = (0, theta * v); exp(q) = (cos(theta), sin(theta) * v) +D3DXQUATERNION* WINAPI D3DXQuaternionExp + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ); + +// Spherical linear interpolation between Q1 (s == 0) and Q2 (s == 1). +// Expects unit quaternions. +D3DXQUATERNION* WINAPI D3DXQuaternionSlerp + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1, + CONST D3DXQUATERNION *pQ2, FLOAT t ); + +// Spherical quadrangle interpolation. +// Slerp(Slerp(Q1, Q4, t), Slerp(Q2, Q3, t), 2t(1-t)) +D3DXQUATERNION* WINAPI D3DXQuaternionSquad + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1, + CONST D3DXQUATERNION *pQ2, CONST D3DXQUATERNION *pQ3, + CONST D3DXQUATERNION *pQ4, FLOAT t ); + +// Slerp(Slerp(Q1, Q2, f+g), Slerp(Q1, Q3, f+g), g/(f+g)) +D3DXQUATERNION* WINAPI D3DXQuaternionBaryCentric + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ1, + CONST D3DXQUATERNION *pQ2, CONST D3DXQUATERNION *pQ3, + FLOAT f, FLOAT g ); + +#ifdef __cplusplus +} +#endif + + +//-------------------------- +// Plane +//-------------------------- + +// inline + +// ax + by + cz + dw +FLOAT D3DXPlaneDot + ( CONST D3DXPLANE *pP, CONST D3DXVECTOR4 *pV); + +// ax + by + cz + d +FLOAT D3DXPlaneDotCoord + ( CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV); + +// ax + by + cz +FLOAT D3DXPlaneDotNormal + ( CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV); + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +// Normalize plane (so that |a,b,c| == 1) +D3DXPLANE* WINAPI D3DXPlaneNormalize + ( D3DXPLANE *pOut, CONST D3DXPLANE *pP); + +// Find the intersection between a plane and a line. If the line is +// parallel to the plane, NULL is returned. +D3DXVECTOR3* WINAPI D3DXPlaneIntersectLine + ( D3DXVECTOR3 *pOut, CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV1, + CONST D3DXVECTOR3 *pV2); + +// Construct a plane from a point and a normal +D3DXPLANE* WINAPI D3DXPlaneFromPointNormal + ( D3DXPLANE *pOut, CONST D3DXVECTOR3 *pPoint, CONST D3DXVECTOR3 *pNormal); + +// Construct a plane from 3 points +D3DXPLANE* WINAPI D3DXPlaneFromPoints + ( D3DXPLANE *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, + CONST D3DXVECTOR3 *pV3); + +// Transform a plane by a matrix. The vector (a,b,c) must be normal. +// M must be an affine transform. +D3DXPLANE* WINAPI D3DXPlaneTransform + ( D3DXPLANE *pOut, CONST D3DXPLANE *pP, CONST D3DXMATRIX *pM ); + +#ifdef __cplusplus +} +#endif + + +//-------------------------- +// Color +//-------------------------- + +// inline + +// (1-r, 1-g, 1-b, a) +D3DXCOLOR* D3DXColorNegative + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC); + +D3DXCOLOR* D3DXColorAdd + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2); + +D3DXCOLOR* D3DXColorSubtract + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2); + +D3DXCOLOR* D3DXColorScale + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT s); + +// (r1*r2, g1*g2, b1*b2, a1*a2) +D3DXCOLOR* D3DXColorModulate + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2); + +// Linear interpolation of r,g,b, and a. C1 + s(C2-C1) +D3DXCOLOR* D3DXColorLerp + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2, FLOAT s); + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +// Interpolate r,g,b between desaturated color and color. +// DesaturatedColor + s(Color - DesaturatedColor) +D3DXCOLOR* WINAPI D3DXColorAdjustSaturation + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT s); + +// Interpolate r,g,b between 50% grey and color. Grey + s(Color - Grey) +D3DXCOLOR* WINAPI D3DXColorAdjustContrast + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT c); + +#ifdef __cplusplus +} +#endif + + + + + + +//=========================================================================== +// +// Matrix Stack +// +//=========================================================================== + +DECLARE_INTERFACE_(ID3DXMatrixStack, IUnknown) +{ + // + // IUnknown methods + // + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + // + // ID3DXMatrixStack methods + // + + // Pops the top of the stack, returns the current top + // *after* popping the top. + STDMETHOD(Pop)(THIS) PURE; + + // Pushes the stack by one, duplicating the current matrix. + STDMETHOD(Push)(THIS) PURE; + + // Loads identity in the current matrix. + STDMETHOD(LoadIdentity)(THIS) PURE; + + // Loads the given matrix into the current matrix + STDMETHOD(LoadMatrix)(THIS_ CONST D3DXMATRIX* pM ) PURE; + + // Right-Multiplies the given matrix to the current matrix. + // (transformation is about the current world origin) + STDMETHOD(MultMatrix)(THIS_ CONST D3DXMATRIX* pM ) PURE; + + // Left-Multiplies the given matrix to the current matrix + // (transformation is about the local origin of the object) + STDMETHOD(MultMatrixLocal)(THIS_ CONST D3DXMATRIX* pM ) PURE; + + // Right multiply the current matrix with the computed rotation + // matrix, counterclockwise about the given axis with the given angle. + // (rotation is about the current world origin) + STDMETHOD(RotateAxis) + (THIS_ CONST D3DXVECTOR3* pV, FLOAT Angle) PURE; + + // Left multiply the current matrix with the computed rotation + // matrix, counterclockwise about the given axis with the given angle. + // (rotation is about the local origin of the object) + STDMETHOD(RotateAxisLocal) + (THIS_ CONST D3DXVECTOR3* pV, FLOAT Angle) PURE; + + // Right multiply the current matrix with the computed rotation + // matrix. All angles are counterclockwise. (rotation is about the + // current world origin) + + // The rotation is composed of a yaw around the Y axis, a pitch around + // the X axis, and a roll around the Z axis. + STDMETHOD(RotateYawPitchRoll) + (THIS_ FLOAT Yaw, FLOAT Pitch, FLOAT Roll) PURE; + + // Left multiply the current matrix with the computed rotation + // matrix. All angles are counterclockwise. (rotation is about the + // local origin of the object) + + // The rotation is composed of a yaw around the Y axis, a pitch around + // the X axis, and a roll around the Z axis. + STDMETHOD(RotateYawPitchRollLocal) + (THIS_ FLOAT Yaw, FLOAT Pitch, FLOAT Roll) PURE; + + // Right multiply the current matrix with the computed scale + // matrix. (transformation is about the current world origin) + STDMETHOD(Scale)(THIS_ FLOAT x, FLOAT y, FLOAT z) PURE; + + // Left multiply the current matrix with the computed scale + // matrix. (transformation is about the local origin of the object) + STDMETHOD(ScaleLocal)(THIS_ FLOAT x, FLOAT y, FLOAT z) PURE; + + // Right multiply the current matrix with the computed translation + // matrix. (transformation is about the current world origin) + STDMETHOD(Translate)(THIS_ FLOAT x, FLOAT y, FLOAT z ) PURE; + + // Left multiply the current matrix with the computed translation + // matrix. (transformation is about the local origin of the object) + STDMETHOD(TranslateLocal)(THIS_ FLOAT x, FLOAT y, FLOAT z) PURE; + + // Obtain the current matrix at the top of the stack + STDMETHOD_(D3DXMATRIX*, GetTop)(THIS) PURE; +}; + +#ifdef __cplusplus +extern "C" { +#endif + +HRESULT WINAPI D3DXCreateMatrixStack( DWORD Flags, LPD3DXMATRIXSTACK *ppStack ); + +#ifdef __cplusplus +} +#endif + +#include "d3dx8math.inl" + +#pragma warning(default:4201) + +#endif // __D3DX8MATH_H__ diff --git a/windows_libs/mssdk/include/d3dx8math.inl b/windows_libs/mssdk/include/d3dx8math.inl new file mode 100644 index 00000000..22926e66 --- /dev/null +++ b/windows_libs/mssdk/include/d3dx8math.inl @@ -0,0 +1,1757 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 1998 Microsoft Corporation. All Rights Reserved. +// +// File: d3dx8math.inl +// Content: D3DX math inline functions +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef __D3DX8MATH_INL__ +#define __D3DX8MATH_INL__ + + +//=========================================================================== +// +// Inline Class Methods +// +//=========================================================================== + +#ifdef __cplusplus + +//-------------------------- +// 2D Vector +//-------------------------- + +D3DXINLINE +D3DXVECTOR2::D3DXVECTOR2( CONST FLOAT *pf ) +{ +#ifdef D3DX_DEBUG + if(!pf) + return; +#endif + + x = pf[0]; + y = pf[1]; +} + +D3DXINLINE +D3DXVECTOR2::D3DXVECTOR2( FLOAT fx, FLOAT fy ) +{ + x = fx; + y = fy; +} + +// casting +D3DXINLINE +D3DXVECTOR2::operator FLOAT* () +{ + return (FLOAT *) &x; +} + +D3DXINLINE +D3DXVECTOR2::operator CONST FLOAT* () const +{ + return (CONST FLOAT *) &x; +} + +// assignment operators +D3DXINLINE D3DXVECTOR2& +D3DXVECTOR2::operator += ( CONST D3DXVECTOR2& v ) +{ + x += v.x; + y += v.y; + return *this; +} + +D3DXINLINE D3DXVECTOR2& +D3DXVECTOR2::operator -= ( CONST D3DXVECTOR2& v ) +{ + x -= v.x; + y -= v.y; + return *this; +} + +D3DXINLINE D3DXVECTOR2& +D3DXVECTOR2::operator *= ( FLOAT f ) +{ + x *= f; + y *= f; + return *this; +} + +D3DXINLINE D3DXVECTOR2& +D3DXVECTOR2::operator /= ( FLOAT f ) +{ + FLOAT fInv = 1.0f / f; + x *= fInv; + y *= fInv; + return *this; +} + +// unary operators +D3DXINLINE D3DXVECTOR2 +D3DXVECTOR2::operator + () const +{ + return *this; +} + +D3DXINLINE D3DXVECTOR2 +D3DXVECTOR2::operator - () const +{ + return D3DXVECTOR2(-x, -y); +} + +// binary operators +D3DXINLINE D3DXVECTOR2 +D3DXVECTOR2::operator + ( CONST D3DXVECTOR2& v ) const +{ + return D3DXVECTOR2(x + v.x, y + v.y); +} + +D3DXINLINE D3DXVECTOR2 +D3DXVECTOR2::operator - ( CONST D3DXVECTOR2& v ) const +{ + return D3DXVECTOR2(x - v.x, y - v.y); +} + +D3DXINLINE D3DXVECTOR2 +D3DXVECTOR2::operator * ( FLOAT f ) const +{ + return D3DXVECTOR2(x * f, y * f); +} + +D3DXINLINE D3DXVECTOR2 +D3DXVECTOR2::operator / ( FLOAT f ) const +{ + FLOAT fInv = 1.0f / f; + return D3DXVECTOR2(x * fInv, y * fInv); +} + + +D3DXINLINE D3DXVECTOR2 +operator * ( FLOAT f, CONST D3DXVECTOR2& v ) +{ + return D3DXVECTOR2(f * v.x, f * v.y); +} + +D3DXINLINE BOOL +D3DXVECTOR2::operator == ( CONST D3DXVECTOR2& v ) const +{ + return x == v.x && y == v.y; +} + +D3DXINLINE BOOL +D3DXVECTOR2::operator != ( CONST D3DXVECTOR2& v ) const +{ + return x != v.x || y != v.y; +} + + + + +//-------------------------- +// 3D Vector +//-------------------------- +D3DXINLINE +D3DXVECTOR3::D3DXVECTOR3( CONST FLOAT *pf ) +{ +#ifdef D3DX_DEBUG + if(!pf) + return; +#endif + + x = pf[0]; + y = pf[1]; + z = pf[2]; +} + +D3DXINLINE +D3DXVECTOR3::D3DXVECTOR3( CONST D3DVECTOR& v ) +{ + x = v.x; + y = v.y; + z = v.z; +} + +D3DXINLINE +D3DXVECTOR3::D3DXVECTOR3( FLOAT fx, FLOAT fy, FLOAT fz ) +{ + x = fx; + y = fy; + z = fz; +} + + +// casting +D3DXINLINE +D3DXVECTOR3::operator FLOAT* () +{ + return (FLOAT *) &x; +} + +D3DXINLINE +D3DXVECTOR3::operator CONST FLOAT* () const +{ + return (CONST FLOAT *) &x; +} + + +// assignment operators +D3DXINLINE D3DXVECTOR3& +D3DXVECTOR3::operator += ( CONST D3DXVECTOR3& v ) +{ + x += v.x; + y += v.y; + z += v.z; + return *this; +} + +D3DXINLINE D3DXVECTOR3& +D3DXVECTOR3::operator -= ( CONST D3DXVECTOR3& v ) +{ + x -= v.x; + y -= v.y; + z -= v.z; + return *this; +} + +D3DXINLINE D3DXVECTOR3& +D3DXVECTOR3::operator *= ( FLOAT f ) +{ + x *= f; + y *= f; + z *= f; + return *this; +} + +D3DXINLINE D3DXVECTOR3& +D3DXVECTOR3::operator /= ( FLOAT f ) +{ + FLOAT fInv = 1.0f / f; + x *= fInv; + y *= fInv; + z *= fInv; + return *this; +} + + +// unary operators +D3DXINLINE D3DXVECTOR3 +D3DXVECTOR3::operator + () const +{ + return *this; +} + +D3DXINLINE D3DXVECTOR3 +D3DXVECTOR3::operator - () const +{ + return D3DXVECTOR3(-x, -y, -z); +} + + +// binary operators +D3DXINLINE D3DXVECTOR3 +D3DXVECTOR3::operator + ( CONST D3DXVECTOR3& v ) const +{ + return D3DXVECTOR3(x + v.x, y + v.y, z + v.z); +} + +D3DXINLINE D3DXVECTOR3 +D3DXVECTOR3::operator - ( CONST D3DXVECTOR3& v ) const +{ + return D3DXVECTOR3(x - v.x, y - v.y, z - v.z); +} + +D3DXINLINE D3DXVECTOR3 +D3DXVECTOR3::operator * ( FLOAT f ) const +{ + return D3DXVECTOR3(x * f, y * f, z * f); +} + +D3DXINLINE D3DXVECTOR3 +D3DXVECTOR3::operator / ( FLOAT f ) const +{ + FLOAT fInv = 1.0f / f; + return D3DXVECTOR3(x * fInv, y * fInv, z * fInv); +} + + +D3DXINLINE D3DXVECTOR3 +operator * ( FLOAT f, CONST struct D3DXVECTOR3& v ) +{ + return D3DXVECTOR3(f * v.x, f * v.y, f * v.z); +} + + +D3DXINLINE BOOL +D3DXVECTOR3::operator == ( CONST D3DXVECTOR3& v ) const +{ + return x == v.x && y == v.y && z == v.z; +} + +D3DXINLINE BOOL +D3DXVECTOR3::operator != ( CONST D3DXVECTOR3& v ) const +{ + return x != v.x || y != v.y || z != v.z; +} + + + +//-------------------------- +// 4D Vector +//-------------------------- +D3DXINLINE +D3DXVECTOR4::D3DXVECTOR4( CONST FLOAT *pf ) +{ +#ifdef D3DX_DEBUG + if(!pf) + return; +#endif + + x = pf[0]; + y = pf[1]; + z = pf[2]; + w = pf[3]; +} + +D3DXINLINE +D3DXVECTOR4::D3DXVECTOR4( FLOAT fx, FLOAT fy, FLOAT fz, FLOAT fw ) +{ + x = fx; + y = fy; + z = fz; + w = fw; +} + + +// casting +D3DXINLINE +D3DXVECTOR4::operator FLOAT* () +{ + return (FLOAT *) &x; +} + +D3DXINLINE +D3DXVECTOR4::operator CONST FLOAT* () const +{ + return (CONST FLOAT *) &x; +} + + +// assignment operators +D3DXINLINE D3DXVECTOR4& +D3DXVECTOR4::operator += ( CONST D3DXVECTOR4& v ) +{ + x += v.x; + y += v.y; + z += v.z; + w += v.w; + return *this; +} + +D3DXINLINE D3DXVECTOR4& +D3DXVECTOR4::operator -= ( CONST D3DXVECTOR4& v ) +{ + x -= v.x; + y -= v.y; + z -= v.z; + w -= v.w; + return *this; +} + +D3DXINLINE D3DXVECTOR4& +D3DXVECTOR4::operator *= ( FLOAT f ) +{ + x *= f; + y *= f; + z *= f; + w *= f; + return *this; +} + +D3DXINLINE D3DXVECTOR4& +D3DXVECTOR4::operator /= ( FLOAT f ) +{ + FLOAT fInv = 1.0f / f; + x *= fInv; + y *= fInv; + z *= fInv; + w *= fInv; + return *this; +} + + +// unary operators +D3DXINLINE D3DXVECTOR4 +D3DXVECTOR4::operator + () const +{ + return *this; +} + +D3DXINLINE D3DXVECTOR4 +D3DXVECTOR4::operator - () const +{ + return D3DXVECTOR4(-x, -y, -z, -w); +} + + +// binary operators +D3DXINLINE D3DXVECTOR4 +D3DXVECTOR4::operator + ( CONST D3DXVECTOR4& v ) const +{ + return D3DXVECTOR4(x + v.x, y + v.y, z + v.z, w + v.w); +} + +D3DXINLINE D3DXVECTOR4 +D3DXVECTOR4::operator - ( CONST D3DXVECTOR4& v ) const +{ + return D3DXVECTOR4(x - v.x, y - v.y, z - v.z, w - v.w); +} + +D3DXINLINE D3DXVECTOR4 +D3DXVECTOR4::operator * ( FLOAT f ) const +{ + return D3DXVECTOR4(x * f, y * f, z * f, w * f); +} + +D3DXINLINE D3DXVECTOR4 +D3DXVECTOR4::operator / ( FLOAT f ) const +{ + FLOAT fInv = 1.0f / f; + return D3DXVECTOR4(x * fInv, y * fInv, z * fInv, w * fInv); +} + + +D3DXINLINE D3DXVECTOR4 +operator * ( FLOAT f, CONST D3DXVECTOR4& v ) +{ + return D3DXVECTOR4(f * v.x, f * v.y, f * v.z, f * v.w); +} + + +D3DXINLINE BOOL +D3DXVECTOR4::operator == ( CONST D3DXVECTOR4& v ) const +{ + return x == v.x && y == v.y && z == v.z && w == v.w; +} + +D3DXINLINE BOOL +D3DXVECTOR4::operator != ( CONST D3DXVECTOR4& v ) const +{ + return x != v.x || y != v.y || z != v.z || w != v.w; +} + + +//-------------------------- +// Matrix +//-------------------------- +D3DXINLINE +D3DXMATRIX::D3DXMATRIX( CONST FLOAT* pf ) +{ +#ifdef D3DX_DEBUG + if(!pf) + return; +#endif + + memcpy(&_11, pf, sizeof(D3DXMATRIX)); +} + +D3DXINLINE +D3DXMATRIX::D3DXMATRIX( CONST D3DMATRIX& mat ) +{ + memcpy(&_11, &mat, sizeof(D3DXMATRIX)); +} + +D3DXINLINE +D3DXMATRIX::D3DXMATRIX( FLOAT f11, FLOAT f12, FLOAT f13, FLOAT f14, + FLOAT f21, FLOAT f22, FLOAT f23, FLOAT f24, + FLOAT f31, FLOAT f32, FLOAT f33, FLOAT f34, + FLOAT f41, FLOAT f42, FLOAT f43, FLOAT f44 ) +{ + _11 = f11; _12 = f12; _13 = f13; _14 = f14; + _21 = f21; _22 = f22; _23 = f23; _24 = f24; + _31 = f31; _32 = f32; _33 = f33; _34 = f34; + _41 = f41; _42 = f42; _43 = f43; _44 = f44; +} + + + +// access grants +D3DXINLINE FLOAT& +D3DXMATRIX::operator () ( UINT iRow, UINT iCol ) +{ + return m[iRow][iCol]; +} + +D3DXINLINE FLOAT +D3DXMATRIX::operator () ( UINT iRow, UINT iCol ) const +{ + return m[iRow][iCol]; +} + + +// casting operators +D3DXINLINE +D3DXMATRIX::operator FLOAT* () +{ + return (FLOAT *) &_11; +} + +D3DXINLINE +D3DXMATRIX::operator CONST FLOAT* () const +{ + return (CONST FLOAT *) &_11; +} + + +// assignment operators +D3DXINLINE D3DXMATRIX& +D3DXMATRIX::operator *= ( CONST D3DXMATRIX& mat ) +{ + D3DXMatrixMultiply(this, this, &mat); + return *this; +} + +D3DXINLINE D3DXMATRIX& +D3DXMATRIX::operator += ( CONST D3DXMATRIX& mat ) +{ + _11 += mat._11; _12 += mat._12; _13 += mat._13; _14 += mat._14; + _21 += mat._21; _22 += mat._22; _23 += mat._23; _24 += mat._24; + _31 += mat._31; _32 += mat._32; _33 += mat._33; _34 += mat._34; + _41 += mat._41; _42 += mat._42; _43 += mat._43; _44 += mat._44; + return *this; +} + +D3DXINLINE D3DXMATRIX& +D3DXMATRIX::operator -= ( CONST D3DXMATRIX& mat ) +{ + _11 -= mat._11; _12 -= mat._12; _13 -= mat._13; _14 -= mat._14; + _21 -= mat._21; _22 -= mat._22; _23 -= mat._23; _24 -= mat._24; + _31 -= mat._31; _32 -= mat._32; _33 -= mat._33; _34 -= mat._34; + _41 -= mat._41; _42 -= mat._42; _43 -= mat._43; _44 -= mat._44; + return *this; +} + +D3DXINLINE D3DXMATRIX& +D3DXMATRIX::operator *= ( FLOAT f ) +{ + _11 *= f; _12 *= f; _13 *= f; _14 *= f; + _21 *= f; _22 *= f; _23 *= f; _24 *= f; + _31 *= f; _32 *= f; _33 *= f; _34 *= f; + _41 *= f; _42 *= f; _43 *= f; _44 *= f; + return *this; +} + +D3DXINLINE D3DXMATRIX& +D3DXMATRIX::operator /= ( FLOAT f ) +{ + FLOAT fInv = 1.0f / f; + _11 *= fInv; _12 *= fInv; _13 *= fInv; _14 *= fInv; + _21 *= fInv; _22 *= fInv; _23 *= fInv; _24 *= fInv; + _31 *= fInv; _32 *= fInv; _33 *= fInv; _34 *= fInv; + _41 *= fInv; _42 *= fInv; _43 *= fInv; _44 *= fInv; + return *this; +} + + +// unary operators +D3DXINLINE D3DXMATRIX +D3DXMATRIX::operator + () const +{ + return *this; +} + +D3DXINLINE D3DXMATRIX +D3DXMATRIX::operator - () const +{ + return D3DXMATRIX(-_11, -_12, -_13, -_14, + -_21, -_22, -_23, -_24, + -_31, -_32, -_33, -_34, + -_41, -_42, -_43, -_44); +} + + +// binary operators +D3DXINLINE D3DXMATRIX +D3DXMATRIX::operator * ( CONST D3DXMATRIX& mat ) const +{ + D3DXMATRIX matT; + D3DXMatrixMultiply(&matT, this, &mat); + return matT; +} + +D3DXINLINE D3DXMATRIX +D3DXMATRIX::operator + ( CONST D3DXMATRIX& mat ) const +{ + return D3DXMATRIX(_11 + mat._11, _12 + mat._12, _13 + mat._13, _14 + mat._14, + _21 + mat._21, _22 + mat._22, _23 + mat._23, _24 + mat._24, + _31 + mat._31, _32 + mat._32, _33 + mat._33, _34 + mat._34, + _41 + mat._41, _42 + mat._42, _43 + mat._43, _44 + mat._44); +} + +D3DXINLINE D3DXMATRIX +D3DXMATRIX::operator - ( CONST D3DXMATRIX& mat ) const +{ + return D3DXMATRIX(_11 - mat._11, _12 - mat._12, _13 - mat._13, _14 - mat._14, + _21 - mat._21, _22 - mat._22, _23 - mat._23, _24 - mat._24, + _31 - mat._31, _32 - mat._32, _33 - mat._33, _34 - mat._34, + _41 - mat._41, _42 - mat._42, _43 - mat._43, _44 - mat._44); +} + +D3DXINLINE D3DXMATRIX +D3DXMATRIX::operator * ( FLOAT f ) const +{ + return D3DXMATRIX(_11 * f, _12 * f, _13 * f, _14 * f, + _21 * f, _22 * f, _23 * f, _24 * f, + _31 * f, _32 * f, _33 * f, _34 * f, + _41 * f, _42 * f, _43 * f, _44 * f); +} + +D3DXINLINE D3DXMATRIX +D3DXMATRIX::operator / ( FLOAT f ) const +{ + FLOAT fInv = 1.0f / f; + return D3DXMATRIX(_11 * fInv, _12 * fInv, _13 * fInv, _14 * fInv, + _21 * fInv, _22 * fInv, _23 * fInv, _24 * fInv, + _31 * fInv, _32 * fInv, _33 * fInv, _34 * fInv, + _41 * fInv, _42 * fInv, _43 * fInv, _44 * fInv); +} + + +D3DXINLINE D3DXMATRIX +operator * ( FLOAT f, CONST D3DXMATRIX& mat ) +{ + return D3DXMATRIX(f * mat._11, f * mat._12, f * mat._13, f * mat._14, + f * mat._21, f * mat._22, f * mat._23, f * mat._24, + f * mat._31, f * mat._32, f * mat._33, f * mat._34, + f * mat._41, f * mat._42, f * mat._43, f * mat._44); +} + + +D3DXINLINE BOOL +D3DXMATRIX::operator == ( CONST D3DXMATRIX& mat ) const +{ + return 0 == memcmp(this, &mat, sizeof(D3DXMATRIX)); +} + +D3DXINLINE BOOL +D3DXMATRIX::operator != ( CONST D3DXMATRIX& mat ) const +{ + return 0 != memcmp(this, &mat, sizeof(D3DXMATRIX)); +} + + + +//-------------------------- +// Quaternion +//-------------------------- + +D3DXINLINE +D3DXQUATERNION::D3DXQUATERNION( CONST FLOAT* pf ) +{ +#ifdef D3DX_DEBUG + if(!pf) + return; +#endif + + x = pf[0]; + y = pf[1]; + z = pf[2]; + w = pf[3]; +} + +D3DXINLINE +D3DXQUATERNION::D3DXQUATERNION( FLOAT fx, FLOAT fy, FLOAT fz, FLOAT fw ) +{ + x = fx; + y = fy; + z = fz; + w = fw; +} + + +// casting +D3DXINLINE +D3DXQUATERNION::operator FLOAT* () +{ + return (FLOAT *) &x; +} + +D3DXINLINE +D3DXQUATERNION::operator CONST FLOAT* () const +{ + return (CONST FLOAT *) &x; +} + + +// assignment operators +D3DXINLINE D3DXQUATERNION& +D3DXQUATERNION::operator += ( CONST D3DXQUATERNION& q ) +{ + x += q.x; + y += q.y; + z += q.z; + w += q.w; + return *this; +} + +D3DXINLINE D3DXQUATERNION& +D3DXQUATERNION::operator -= ( CONST D3DXQUATERNION& q ) +{ + x -= q.x; + y -= q.y; + z -= q.z; + w -= q.w; + return *this; +} + +D3DXINLINE D3DXQUATERNION& +D3DXQUATERNION::operator *= ( CONST D3DXQUATERNION& q ) +{ + D3DXQuaternionMultiply(this, this, &q); + return *this; +} + +D3DXINLINE D3DXQUATERNION& +D3DXQUATERNION::operator *= ( FLOAT f ) +{ + x *= f; + y *= f; + z *= f; + w *= f; + return *this; +} + +D3DXINLINE D3DXQUATERNION& +D3DXQUATERNION::operator /= ( FLOAT f ) +{ + FLOAT fInv = 1.0f / f; + x *= fInv; + y *= fInv; + z *= fInv; + w *= fInv; + return *this; +} + + +// unary operators +D3DXINLINE D3DXQUATERNION +D3DXQUATERNION::operator + () const +{ + return *this; +} + +D3DXINLINE D3DXQUATERNION +D3DXQUATERNION::operator - () const +{ + return D3DXQUATERNION(-x, -y, -z, -w); +} + + +// binary operators +D3DXINLINE D3DXQUATERNION +D3DXQUATERNION::operator + ( CONST D3DXQUATERNION& q ) const +{ + return D3DXQUATERNION(x + q.x, y + q.y, z + q.z, w + q.w); +} + +D3DXINLINE D3DXQUATERNION +D3DXQUATERNION::operator - ( CONST D3DXQUATERNION& q ) const +{ + return D3DXQUATERNION(x - q.x, y - q.y, z - q.z, w - q.w); +} + +D3DXINLINE D3DXQUATERNION +D3DXQUATERNION::operator * ( CONST D3DXQUATERNION& q ) const +{ + D3DXQUATERNION qT; + D3DXQuaternionMultiply(&qT, this, &q); + return qT; +} + +D3DXINLINE D3DXQUATERNION +D3DXQUATERNION::operator * ( FLOAT f ) const +{ + return D3DXQUATERNION(x * f, y * f, z * f, w * f); +} + +D3DXINLINE D3DXQUATERNION +D3DXQUATERNION::operator / ( FLOAT f ) const +{ + FLOAT fInv = 1.0f / f; + return D3DXQUATERNION(x * fInv, y * fInv, z * fInv, w * fInv); +} + + +D3DXINLINE D3DXQUATERNION +operator * (FLOAT f, CONST D3DXQUATERNION& q ) +{ + return D3DXQUATERNION(f * q.x, f * q.y, f * q.z, f * q.w); +} + + +D3DXINLINE BOOL +D3DXQUATERNION::operator == ( CONST D3DXQUATERNION& q ) const +{ + return x == q.x && y == q.y && z == q.z && w == q.w; +} + +D3DXINLINE BOOL +D3DXQUATERNION::operator != ( CONST D3DXQUATERNION& q ) const +{ + return x != q.x || y != q.y || z != q.z || w != q.w; +} + + + +//-------------------------- +// Plane +//-------------------------- + +D3DXINLINE +D3DXPLANE::D3DXPLANE( CONST FLOAT* pf ) +{ +#ifdef D3DX_DEBUG + if(!pf) + return; +#endif + + a = pf[0]; + b = pf[1]; + c = pf[2]; + d = pf[3]; +} + +D3DXINLINE +D3DXPLANE::D3DXPLANE( FLOAT fa, FLOAT fb, FLOAT fc, FLOAT fd ) +{ + a = fa; + b = fb; + c = fc; + d = fd; +} + + +// casting +D3DXINLINE +D3DXPLANE::operator FLOAT* () +{ + return (FLOAT *) &a; +} + +D3DXINLINE +D3DXPLANE::operator CONST FLOAT* () const +{ + return (CONST FLOAT *) &a; +} + + +// unary operators +D3DXINLINE D3DXPLANE +D3DXPLANE::operator + () const +{ + return *this; +} + +D3DXINLINE D3DXPLANE +D3DXPLANE::operator - () const +{ + return D3DXPLANE(-a, -b, -c, -d); +} + + +// binary operators +D3DXINLINE BOOL +D3DXPLANE::operator == ( CONST D3DXPLANE& p ) const +{ + return a == p.a && b == p.b && c == p.c && d == p.d; +} + +D3DXINLINE BOOL +D3DXPLANE::operator != ( CONST D3DXPLANE& p ) const +{ + return a != p.a || b != p.b || c != p.c || d != p.d; +} + + + + +//-------------------------- +// Color +//-------------------------- + +D3DXINLINE +D3DXCOLOR::D3DXCOLOR( DWORD dw ) +{ + CONST FLOAT f = 1.0f / 255.0f; + r = f * (FLOAT) (unsigned char) (dw >> 16); + g = f * (FLOAT) (unsigned char) (dw >> 8); + b = f * (FLOAT) (unsigned char) (dw >> 0); + a = f * (FLOAT) (unsigned char) (dw >> 24); +} + +D3DXINLINE +D3DXCOLOR::D3DXCOLOR( CONST FLOAT* pf ) +{ +#ifdef D3DX_DEBUG + if(!pf) + return; +#endif + + r = pf[0]; + g = pf[1]; + b = pf[2]; + a = pf[3]; +} + +D3DXINLINE +D3DXCOLOR::D3DXCOLOR( CONST D3DCOLORVALUE& c ) +{ + r = c.r; + g = c.g; + b = c.b; + a = c.a; +} + +D3DXINLINE +D3DXCOLOR::D3DXCOLOR( FLOAT fr, FLOAT fg, FLOAT fb, FLOAT fa ) +{ + r = fr; + g = fg; + b = fb; + a = fa; +} + + +// casting +D3DXINLINE +D3DXCOLOR::operator DWORD () const +{ + DWORD dwR = r >= 1.0f ? 0xff : r <= 0.0f ? 0x00 : (DWORD) (r * 255.0f + 0.5f); + DWORD dwG = g >= 1.0f ? 0xff : g <= 0.0f ? 0x00 : (DWORD) (g * 255.0f + 0.5f); + DWORD dwB = b >= 1.0f ? 0xff : b <= 0.0f ? 0x00 : (DWORD) (b * 255.0f + 0.5f); + DWORD dwA = a >= 1.0f ? 0xff : a <= 0.0f ? 0x00 : (DWORD) (a * 255.0f + 0.5f); + + return (dwA << 24) | (dwR << 16) | (dwG << 8) | dwB; +} + + +D3DXINLINE +D3DXCOLOR::operator FLOAT * () +{ + return (FLOAT *) &r; +} + +D3DXINLINE +D3DXCOLOR::operator CONST FLOAT * () const +{ + return (CONST FLOAT *) &r; +} + + +D3DXINLINE +D3DXCOLOR::operator D3DCOLORVALUE * () +{ + return (D3DCOLORVALUE *) &r; +} + +D3DXINLINE +D3DXCOLOR::operator CONST D3DCOLORVALUE * () const +{ + return (CONST D3DCOLORVALUE *) &r; +} + + +D3DXINLINE +D3DXCOLOR::operator D3DCOLORVALUE& () +{ + return *((D3DCOLORVALUE *) &r); +} + +D3DXINLINE +D3DXCOLOR::operator CONST D3DCOLORVALUE& () const +{ + return *((CONST D3DCOLORVALUE *) &r); +} + + +// assignment operators +D3DXINLINE D3DXCOLOR& +D3DXCOLOR::operator += ( CONST D3DXCOLOR& c ) +{ + r += c.r; + g += c.g; + b += c.b; + a += c.a; + return *this; +} + +D3DXINLINE D3DXCOLOR& +D3DXCOLOR::operator -= ( CONST D3DXCOLOR& c ) +{ + r -= c.r; + g -= c.g; + b -= c.b; + a -= c.a; + return *this; +} + +D3DXINLINE D3DXCOLOR& +D3DXCOLOR::operator *= ( FLOAT f ) +{ + r *= f; + g *= f; + b *= f; + a *= f; + return *this; +} + +D3DXINLINE D3DXCOLOR& +D3DXCOLOR::operator /= ( FLOAT f ) +{ + FLOAT fInv = 1.0f / f; + r *= fInv; + g *= fInv; + b *= fInv; + a *= fInv; + return *this; +} + + +// unary operators +D3DXINLINE D3DXCOLOR +D3DXCOLOR::operator + () const +{ + return *this; +} + +D3DXINLINE D3DXCOLOR +D3DXCOLOR::operator - () const +{ + return D3DXCOLOR(-r, -g, -b, -a); +} + + +// binary operators +D3DXINLINE D3DXCOLOR +D3DXCOLOR::operator + ( CONST D3DXCOLOR& c ) const +{ + return D3DXCOLOR(r + c.r, g + c.g, b + c.b, a + c.a); +} + +D3DXINLINE D3DXCOLOR +D3DXCOLOR::operator - ( CONST D3DXCOLOR& c ) const +{ + return D3DXCOLOR(r - c.r, g - c.g, b - c.b, a - c.a); +} + +D3DXINLINE D3DXCOLOR +D3DXCOLOR::operator * ( FLOAT f ) const +{ + return D3DXCOLOR(r * f, g * f, b * f, a * f); +} + +D3DXINLINE D3DXCOLOR +D3DXCOLOR::operator / ( FLOAT f ) const +{ + FLOAT fInv = 1.0f / f; + return D3DXCOLOR(r * fInv, g * fInv, b * fInv, a * fInv); +} + + +D3DXINLINE D3DXCOLOR +operator * (FLOAT f, CONST D3DXCOLOR& c ) +{ + return D3DXCOLOR(f * c.r, f * c.g, f * c.b, f * c.a); +} + + +D3DXINLINE BOOL +D3DXCOLOR::operator == ( CONST D3DXCOLOR& c ) const +{ + return r == c.r && g == c.g && b == c.b && a == c.a; +} + +D3DXINLINE BOOL +D3DXCOLOR::operator != ( CONST D3DXCOLOR& c ) const +{ + return r != c.r || g != c.g || b != c.b || a != c.a; +} + + +#endif //__cplusplus + + + +//=========================================================================== +// +// Inline functions +// +//=========================================================================== + + +//-------------------------- +// 2D Vector +//-------------------------- + +D3DXINLINE FLOAT D3DXVec2Length + ( CONST D3DXVECTOR2 *pV ) +{ +#ifdef D3DX_DEBUG + if(!pV) + return 0.0f; +#endif + +#ifdef __cplusplus + return sqrtf(pV->x * pV->x + pV->y * pV->y); +#else + return (FLOAT) sqrt(pV->x * pV->x + pV->y * pV->y); +#endif +} + +D3DXINLINE FLOAT D3DXVec2LengthSq + ( CONST D3DXVECTOR2 *pV ) +{ +#ifdef D3DX_DEBUG + if(!pV) + return 0.0f; +#endif + + return pV->x * pV->x + pV->y * pV->y; +} + +D3DXINLINE FLOAT D3DXVec2Dot + ( CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pV1 || !pV2) + return 0.0f; +#endif + + return pV1->x * pV2->x + pV1->y * pV2->y; +} + +D3DXINLINE FLOAT D3DXVec2CCW + ( CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pV1 || !pV2) + return 0.0f; +#endif + + return pV1->x * pV2->y - pV1->y * pV2->x; +} + +D3DXINLINE D3DXVECTOR2* D3DXVec2Add + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + pV2->x; + pOut->y = pV1->y + pV2->y; + return pOut; +} + +D3DXINLINE D3DXVECTOR2* D3DXVec2Subtract + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x - pV2->x; + pOut->y = pV1->y - pV2->y; + return pOut; +} + +D3DXINLINE D3DXVECTOR2* D3DXVec2Minimize + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x < pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y < pV2->y ? pV1->y : pV2->y; + return pOut; +} + +D3DXINLINE D3DXVECTOR2* D3DXVec2Maximize + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x > pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y > pV2->y ? pV1->y : pV2->y; + return pOut; +} + +D3DXINLINE D3DXVECTOR2* D3DXVec2Scale + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV, FLOAT s ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV) + return NULL; +#endif + + pOut->x = pV->x * s; + pOut->y = pV->y * s; + return pOut; +} + +D3DXINLINE D3DXVECTOR2* D3DXVec2Lerp + ( D3DXVECTOR2 *pOut, CONST D3DXVECTOR2 *pV1, CONST D3DXVECTOR2 *pV2, + FLOAT s ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + s * (pV2->x - pV1->x); + pOut->y = pV1->y + s * (pV2->y - pV1->y); + return pOut; +} + + +//-------------------------- +// 3D Vector +//-------------------------- + +D3DXINLINE FLOAT D3DXVec3Length + ( CONST D3DXVECTOR3 *pV ) +{ +#ifdef D3DX_DEBUG + if(!pV) + return 0.0f; +#endif + +#ifdef __cplusplus + return sqrtf(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z); +#else + return (FLOAT) sqrt(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z); +#endif +} + +D3DXINLINE FLOAT D3DXVec3LengthSq + ( CONST D3DXVECTOR3 *pV ) +{ +#ifdef D3DX_DEBUG + if(!pV) + return 0.0f; +#endif + + return pV->x * pV->x + pV->y * pV->y + pV->z * pV->z; +} + +D3DXINLINE FLOAT D3DXVec3Dot + ( CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pV1 || !pV2) + return 0.0f; +#endif + + return pV1->x * pV2->x + pV1->y * pV2->y + pV1->z * pV2->z; +} + +D3DXINLINE D3DXVECTOR3* D3DXVec3Cross + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) +{ + D3DXVECTOR3 v; + +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + v.x = pV1->y * pV2->z - pV1->z * pV2->y; + v.y = pV1->z * pV2->x - pV1->x * pV2->z; + v.z = pV1->x * pV2->y - pV1->y * pV2->x; + + *pOut = v; + return pOut; +} + +D3DXINLINE D3DXVECTOR3* D3DXVec3Add + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + pV2->x; + pOut->y = pV1->y + pV2->y; + pOut->z = pV1->z + pV2->z; + return pOut; +} + +D3DXINLINE D3DXVECTOR3* D3DXVec3Subtract + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x - pV2->x; + pOut->y = pV1->y - pV2->y; + pOut->z = pV1->z - pV2->z; + return pOut; +} + +D3DXINLINE D3DXVECTOR3* D3DXVec3Minimize + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x < pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y < pV2->y ? pV1->y : pV2->y; + pOut->z = pV1->z < pV2->z ? pV1->z : pV2->z; + return pOut; +} + +D3DXINLINE D3DXVECTOR3* D3DXVec3Maximize + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x > pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y > pV2->y ? pV1->y : pV2->y; + pOut->z = pV1->z > pV2->z ? pV1->z : pV2->z; + return pOut; +} + +D3DXINLINE D3DXVECTOR3* D3DXVec3Scale + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV, FLOAT s) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV) + return NULL; +#endif + + pOut->x = pV->x * s; + pOut->y = pV->y * s; + pOut->z = pV->z * s; + return pOut; +} + +D3DXINLINE D3DXVECTOR3* D3DXVec3Lerp + ( D3DXVECTOR3 *pOut, CONST D3DXVECTOR3 *pV1, CONST D3DXVECTOR3 *pV2, + FLOAT s ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + s * (pV2->x - pV1->x); + pOut->y = pV1->y + s * (pV2->y - pV1->y); + pOut->z = pV1->z + s * (pV2->z - pV1->z); + return pOut; +} + + +//-------------------------- +// 4D Vector +//-------------------------- + +D3DXINLINE FLOAT D3DXVec4Length + ( CONST D3DXVECTOR4 *pV ) +{ +#ifdef D3DX_DEBUG + if(!pV) + return 0.0f; +#endif + +#ifdef __cplusplus + return sqrtf(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z + pV->w * pV->w); +#else + return (FLOAT) sqrt(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z + pV->w * pV->w); +#endif +} + +D3DXINLINE FLOAT D3DXVec4LengthSq + ( CONST D3DXVECTOR4 *pV ) +{ +#ifdef D3DX_DEBUG + if(!pV) + return 0.0f; +#endif + + return pV->x * pV->x + pV->y * pV->y + pV->z * pV->z + pV->w * pV->w; +} + +D3DXINLINE FLOAT D3DXVec4Dot + ( CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pV1 || !pV2) + return 0.0f; +#endif + + return pV1->x * pV2->x + pV1->y * pV2->y + pV1->z * pV2->z + pV1->w * pV2->w; +} + +D3DXINLINE D3DXVECTOR4* D3DXVec4Add + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + pV2->x; + pOut->y = pV1->y + pV2->y; + pOut->z = pV1->z + pV2->z; + pOut->w = pV1->w + pV2->w; + return pOut; +} + +D3DXINLINE D3DXVECTOR4* D3DXVec4Subtract + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x - pV2->x; + pOut->y = pV1->y - pV2->y; + pOut->z = pV1->z - pV2->z; + pOut->w = pV1->w - pV2->w; + return pOut; +} + +D3DXINLINE D3DXVECTOR4* D3DXVec4Minimize + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x < pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y < pV2->y ? pV1->y : pV2->y; + pOut->z = pV1->z < pV2->z ? pV1->z : pV2->z; + pOut->w = pV1->w < pV2->w ? pV1->w : pV2->w; + return pOut; +} + +D3DXINLINE D3DXVECTOR4* D3DXVec4Maximize + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x > pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y > pV2->y ? pV1->y : pV2->y; + pOut->z = pV1->z > pV2->z ? pV1->z : pV2->z; + pOut->w = pV1->w > pV2->w ? pV1->w : pV2->w; + return pOut; +} + +D3DXINLINE D3DXVECTOR4* D3DXVec4Scale + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV, FLOAT s) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV) + return NULL; +#endif + + pOut->x = pV->x * s; + pOut->y = pV->y * s; + pOut->z = pV->z * s; + pOut->w = pV->w * s; + return pOut; +} + +D3DXINLINE D3DXVECTOR4* D3DXVec4Lerp + ( D3DXVECTOR4 *pOut, CONST D3DXVECTOR4 *pV1, CONST D3DXVECTOR4 *pV2, + FLOAT s ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + s * (pV2->x - pV1->x); + pOut->y = pV1->y + s * (pV2->y - pV1->y); + pOut->z = pV1->z + s * (pV2->z - pV1->z); + pOut->w = pV1->w + s * (pV2->w - pV1->w); + return pOut; +} + + +//-------------------------- +// 4D Matrix +//-------------------------- + +D3DXINLINE D3DXMATRIX* D3DXMatrixIdentity + ( D3DXMATRIX *pOut ) +{ +#ifdef D3DX_DEBUG + if(!pOut) + return NULL; +#endif + + pOut->m[0][1] = pOut->m[0][2] = pOut->m[0][3] = + pOut->m[1][0] = pOut->m[1][2] = pOut->m[1][3] = + pOut->m[2][0] = pOut->m[2][1] = pOut->m[2][3] = + pOut->m[3][0] = pOut->m[3][1] = pOut->m[3][2] = 0.0f; + + pOut->m[0][0] = pOut->m[1][1] = pOut->m[2][2] = pOut->m[3][3] = 1.0f; + return pOut; +} + + +D3DXINLINE BOOL D3DXMatrixIsIdentity + ( CONST D3DXMATRIX *pM ) +{ +#ifdef D3DX_DEBUG + if(!pM) + return FALSE; +#endif + + return pM->m[0][0] == 1.0f && pM->m[0][1] == 0.0f && pM->m[0][2] == 0.0f && pM->m[0][3] == 0.0f && + pM->m[1][0] == 0.0f && pM->m[1][1] == 1.0f && pM->m[1][2] == 0.0f && pM->m[1][3] == 0.0f && + pM->m[2][0] == 0.0f && pM->m[2][1] == 0.0f && pM->m[2][2] == 1.0f && pM->m[2][3] == 0.0f && + pM->m[3][0] == 0.0f && pM->m[3][1] == 0.0f && pM->m[3][2] == 0.0f && pM->m[3][3] == 1.0f; +} + + +//-------------------------- +// Quaternion +//-------------------------- + +D3DXINLINE FLOAT D3DXQuaternionLength + ( CONST D3DXQUATERNION *pQ ) +{ +#ifdef D3DX_DEBUG + if(!pQ) + return 0.0f; +#endif + +#ifdef __cplusplus + return sqrtf(pQ->x * pQ->x + pQ->y * pQ->y + pQ->z * pQ->z + pQ->w * pQ->w); +#else + return (FLOAT) sqrt(pQ->x * pQ->x + pQ->y * pQ->y + pQ->z * pQ->z + pQ->w * pQ->w); +#endif +} + +D3DXINLINE FLOAT D3DXQuaternionLengthSq + ( CONST D3DXQUATERNION *pQ ) +{ +#ifdef D3DX_DEBUG + if(!pQ) + return 0.0f; +#endif + + return pQ->x * pQ->x + pQ->y * pQ->y + pQ->z * pQ->z + pQ->w * pQ->w; +} + +D3DXINLINE FLOAT D3DXQuaternionDot + ( CONST D3DXQUATERNION *pQ1, CONST D3DXQUATERNION *pQ2 ) +{ +#ifdef D3DX_DEBUG + if(!pQ1 || !pQ2) + return 0.0f; +#endif + + return pQ1->x * pQ2->x + pQ1->y * pQ2->y + pQ1->z * pQ2->z + pQ1->w * pQ2->w; +} + + +D3DXINLINE D3DXQUATERNION* D3DXQuaternionIdentity + ( D3DXQUATERNION *pOut ) +{ +#ifdef D3DX_DEBUG + if(!pOut) + return NULL; +#endif + + pOut->x = pOut->y = pOut->z = 0.0f; + pOut->w = 1.0f; + return pOut; +} + +D3DXINLINE BOOL D3DXQuaternionIsIdentity + ( CONST D3DXQUATERNION *pQ ) +{ +#ifdef D3DX_DEBUG + if(!pQ) + return FALSE; +#endif + + return pQ->x == 0.0f && pQ->y == 0.0f && pQ->z == 0.0f && pQ->w == 1.0f; +} + + +D3DXINLINE D3DXQUATERNION* D3DXQuaternionConjugate + ( D3DXQUATERNION *pOut, CONST D3DXQUATERNION *pQ ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pQ) + return NULL; +#endif + + pOut->x = -pQ->x; + pOut->y = -pQ->y; + pOut->z = -pQ->z; + pOut->w = pQ->w; + return pOut; +} + + +//-------------------------- +// Plane +//-------------------------- + +D3DXINLINE FLOAT D3DXPlaneDot + ( CONST D3DXPLANE *pP, CONST D3DXVECTOR4 *pV) +{ +#ifdef D3DX_DEBUG + if(!pP || !pV) + return 0.0f; +#endif + + return pP->a * pV->x + pP->b * pV->y + pP->c * pV->z + pP->d * pV->w; +} + +D3DXINLINE FLOAT D3DXPlaneDotCoord + ( CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV) +{ +#ifdef D3DX_DEBUG + if(!pP || !pV) + return 0.0f; +#endif + + return pP->a * pV->x + pP->b * pV->y + pP->c * pV->z + pP->d; +} + +D3DXINLINE FLOAT D3DXPlaneDotNormal + ( CONST D3DXPLANE *pP, CONST D3DXVECTOR3 *pV) +{ +#ifdef D3DX_DEBUG + if(!pP || !pV) + return 0.0f; +#endif + + return pP->a * pV->x + pP->b * pV->y + pP->c * pV->z; +} + + +//-------------------------- +// Color +//-------------------------- + +D3DXINLINE D3DXCOLOR* D3DXColorNegative + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pC) + return NULL; +#endif + + pOut->r = 1.0f - pC->r; + pOut->g = 1.0f - pC->g; + pOut->b = 1.0f - pC->b; + pOut->a = pC->a; + return pOut; +} + +D3DXINLINE D3DXCOLOR* D3DXColorAdd + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pC1 || !pC2) + return NULL; +#endif + + pOut->r = pC1->r + pC2->r; + pOut->g = pC1->g + pC2->g; + pOut->b = pC1->b + pC2->b; + pOut->a = pC1->a + pC2->a; + return pOut; +} + +D3DXINLINE D3DXCOLOR* D3DXColorSubtract + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pC1 || !pC2) + return NULL; +#endif + + pOut->r = pC1->r - pC2->r; + pOut->g = pC1->g - pC2->g; + pOut->b = pC1->b - pC2->b; + pOut->a = pC1->a - pC2->a; + return pOut; +} + +D3DXINLINE D3DXCOLOR* D3DXColorScale + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC, FLOAT s) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pC) + return NULL; +#endif + + pOut->r = pC->r * s; + pOut->g = pC->g * s; + pOut->b = pC->b * s; + pOut->a = pC->a * s; + return pOut; +} + +D3DXINLINE D3DXCOLOR* D3DXColorModulate + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pC1 || !pC2) + return NULL; +#endif + + pOut->r = pC1->r * pC2->r; + pOut->g = pC1->g * pC2->g; + pOut->b = pC1->b * pC2->b; + pOut->a = pC1->a * pC2->a; + return pOut; +} + +D3DXINLINE D3DXCOLOR* D3DXColorLerp + (D3DXCOLOR *pOut, CONST D3DXCOLOR *pC1, CONST D3DXCOLOR *pC2, FLOAT s) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pC1 || !pC2) + return NULL; +#endif + + pOut->r = pC1->r + s * (pC2->r - pC1->r); + pOut->g = pC1->g + s * (pC2->g - pC1->g); + pOut->b = pC1->b + s * (pC2->b - pC1->b); + pOut->a = pC1->a + s * (pC2->a - pC1->a); + return pOut; +} + + +#endif // __D3DX8MATH_INL__ diff --git a/windows_libs/mssdk/include/d3dx8mesh.h b/windows_libs/mssdk/include/d3dx8mesh.h new file mode 100644 index 00000000..d9dad997 --- /dev/null +++ b/windows_libs/mssdk/include/d3dx8mesh.h @@ -0,0 +1,565 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 1998 Microsoft Corporation. All Rights Reserved. +// +// File: d3dx8mesh.h +// Content: D3DX mesh types and functions +// +////////////////////////////////////////////////////////////////////////////// + +#include "d3dx8.h" + +#ifndef __D3DX8MESH_H__ +#define __D3DX8MESH_H__ + +#include "dxfile.h" // defines LPDIRECTXFILEDATA + +// {A69BA991-1F7D-11d3-B929-00C04F68DC23} +DEFINE_GUID(IID_ID3DXBaseMesh, +0xa69ba991, 0x1f7d, 0x11d3, 0xb9, 0x29, 0x0, 0xc0, 0x4f, 0x68, 0xdc, 0x23); + +// {9D84AC46-6B90-49a9-A721-085C7A3E3DAE} +DEFINE_GUID(IID_ID3DXMesh, +0x9d84ac46, 0x6b90, 0x49a9, 0xa7, 0x21, 0x8, 0x5c, 0x7a, 0x3e, 0x3d, 0xae); + +// {15981AA8-1A05-48e3-BBE7-FF5D49654E3F} +DEFINE_GUID(IID_ID3DXPMesh, +0x15981aa8, 0x1a05, 0x48e3, 0xbb, 0xe7, 0xff, 0x5d, 0x49, 0x65, 0x4e, 0x3f); + +// {BC3BBDE2-1F7D-11d3-B929-00C04F68DC23} +DEFINE_GUID(IID_ID3DXSPMesh, +0xbc3bbde2, 0x1f7d, 0x11d3, 0xb9, 0x29, 0x0, 0xc0, 0x4f, 0x68, 0xdc, 0x23); + +// {82A53844-F322-409e-A2E9-992E1104069D} +DEFINE_GUID(IID_ID3DXSkinMesh, +0x82a53844, 0xf322, 0x409e, 0xa2, 0xe9, 0x99, 0x2e, 0x11, 0x4, 0x6, 0x9d); + + +enum _D3DXMESH { + D3DXMESH_32BIT = 0x001, // If set, then use 32 bit indices, if not set use 16 bit indices. 32BIT meshes currently not supported on ID3DXSkinMesh object + D3DXMESH_DONOTCLIP = 0x002, // Use D3DUSAGE_DONOTCLIP for VB & IB. + D3DXMESH_POINTS = 0x004, // Use D3DUSAGE_POINTS for VB & IB. + D3DXMESH_RTPATCHES = 0x008, // Use D3DUSAGE_RTPATCHES for VB & IB. + D3DXMESH_NPATCHES = 0x4000,// Use D3DUSAGE_NPATCHES for VB & IB. + D3DXMESH_VB_SYSTEMMEM = 0x010, // Use D3DPOOL_SYSTEMMEM for VB. Overrides D3DXMESH_MANAGEDVERTEXBUFFER + D3DXMESH_VB_MANAGED = 0x020, // Use D3DPOOL_MANAGED for VB. + D3DXMESH_VB_WRITEONLY = 0x040, // Use D3DUSAGE_WRITEONLY for VB. + D3DXMESH_VB_DYNAMIC = 0x080, // Use D3DUSAGE_DYNAMIC for VB. + D3DXMESH_IB_SYSTEMMEM = 0x100, // Use D3DPOOL_SYSTEMMEM for IB. Overrides D3DXMESH_MANAGEDINDEXBUFFER + D3DXMESH_IB_MANAGED = 0x200, // Use D3DPOOL_MANAGED for IB. + D3DXMESH_IB_WRITEONLY = 0x400, // Use D3DUSAGE_WRITEONLY for IB. + D3DXMESH_IB_DYNAMIC = 0x800, // Use D3DUSAGE_DYNAMIC for IB. + + D3DXMESH_VB_SHARE = 0x1000, // Valid for Clone* calls only, forces cloned mesh/pmesh to share vertex buffer + + D3DXMESH_USEHWONLY = 0x2000, // Valid for ID3DXSkinMesh::ConvertToBlendedMesh + + // Helper options + D3DXMESH_SYSTEMMEM = 0x110, // D3DXMESH_VB_SYSTEMMEM | D3DXMESH_IB_SYSTEMMEM + D3DXMESH_MANAGED = 0x220, // D3DXMESH_VB_MANAGED | D3DXMESH_IB_MANAGED + D3DXMESH_WRITEONLY = 0x440, // D3DXMESH_VB_WRITEONLY | D3DXMESH_IB_WRITEONLY + D3DXMESH_DYNAMIC = 0x880, // D3DXMESH_VB_DYNAMIC | D3DXMESH_IB_DYNAMIC + +}; + +// option field values for specifying min value in D3DXGeneratePMesh and D3DXSimplifyMesh +enum _D3DXMESHSIMP +{ + D3DXMESHSIMP_VERTEX = 0x1, + D3DXMESHSIMP_FACE = 0x2, + +}; + +enum _MAX_FVF_DECL_SIZE +{ + MAX_FVF_DECL_SIZE = 20 +}; + +typedef struct ID3DXBaseMesh *LPD3DXBASEMESH; +typedef struct ID3DXMesh *LPD3DXMESH; +typedef struct ID3DXPMesh *LPD3DXPMESH; +typedef struct ID3DXSPMesh *LPD3DXSPMESH; +typedef struct ID3DXSkinMesh *LPD3DXSKINMESH; + +typedef struct _D3DXATTRIBUTERANGE +{ + DWORD AttribId; + DWORD FaceStart; + DWORD FaceCount; + DWORD VertexStart; + DWORD VertexCount; +} D3DXATTRIBUTERANGE; + +typedef D3DXATTRIBUTERANGE* LPD3DXATTRIBUTERANGE; + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus +struct D3DXMATERIAL +{ + D3DMATERIAL8 MatD3D; + LPSTR pTextureFilename; +}; +typedef struct D3DXMATERIAL *LPD3DXMATERIAL; +#ifdef __cplusplus +} +#endif //__cplusplus + +typedef struct _D3DXATTRIBUTEWEIGHTS +{ + FLOAT Position; + FLOAT Boundary; + FLOAT Normal; + FLOAT Diffuse; + FLOAT Specular; + FLOAT Tex[8]; +} D3DXATTRIBUTEWEIGHTS; + +typedef D3DXATTRIBUTEWEIGHTS* LPD3DXATTRIBUTEWEIGHTS; + +DECLARE_INTERFACE_(ID3DXBaseMesh, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DXBaseMesh + STDMETHOD(DrawSubset)(THIS_ DWORD AttribId) PURE; + STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE; + STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE; + STDMETHOD_(DWORD, GetFVF)(THIS) PURE; + STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE; + STDMETHOD_(DWORD, GetOptions)(THIS) PURE; + STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE; + STDMETHOD(CloneMeshFVF)(THIS_ DWORD Options, + DWORD FVF, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE; + STDMETHOD(CloneMesh)(THIS_ DWORD Options, + CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE; + STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER8* ppVB) PURE; + STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER8* ppIB) PURE; + STDMETHOD(LockVertexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE; + STDMETHOD(UnlockVertexBuffer)(THIS) PURE; + STDMETHOD(LockIndexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE; + STDMETHOD(UnlockIndexBuffer)(THIS) PURE; + STDMETHOD(GetAttributeTable)( + THIS_ D3DXATTRIBUTERANGE *pAttribTable, DWORD* pAttribTableSize) PURE; +}; + +DECLARE_INTERFACE_(ID3DXMesh, ID3DXBaseMesh) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DXBaseMesh + STDMETHOD(DrawSubset)(THIS_ DWORD AttribId) PURE; + STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE; + STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE; + STDMETHOD_(DWORD, GetFVF)(THIS) PURE; + STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE; + STDMETHOD_(DWORD, GetOptions)(THIS) PURE; + STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE; + STDMETHOD(CloneMeshFVF)(THIS_ DWORD Options, + DWORD FVF, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE; + STDMETHOD(CloneMesh)(THIS_ DWORD Options, + CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE; + STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER8* ppVB) PURE; + STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER8* ppIB) PURE; + STDMETHOD(LockVertexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE; + STDMETHOD(UnlockVertexBuffer)(THIS) PURE; + STDMETHOD(LockIndexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE; + STDMETHOD(UnlockIndexBuffer)(THIS) PURE; + STDMETHOD(GetAttributeTable)( + THIS_ D3DXATTRIBUTERANGE *pAttribTable, DWORD* pAttribTableSize) PURE; + + // ID3DXMesh + STDMETHOD(LockAttributeBuffer)(THIS_ DWORD Flags, DWORD** ppData) PURE; + STDMETHOD(UnlockAttributeBuffer)(THIS) PURE; + STDMETHOD(ConvertPointRepsToAdjacency)(THIS_ CONST DWORD* pPRep, DWORD* pAdjacency) PURE; + STDMETHOD(ConvertAdjacencyToPointReps)(THIS_ CONST DWORD* pAdjacency, DWORD* pPRep) PURE; + STDMETHOD(GenerateAdjacency)(THIS_ FLOAT fEpsilon, DWORD* pAdjacency) PURE; + STDMETHOD(Optimize)(THIS_ DWORD Flags, CONST DWORD* pAdjacencyIn, DWORD* pAdjacencyOut, + DWORD* pFaceRemap, LPD3DXBUFFER *ppVertexRemap, + LPD3DXMESH* ppOptMesh) PURE; + STDMETHOD(OptimizeInplace)(THIS_ DWORD Flags, CONST DWORD* pAdjacencyIn, DWORD* pAdjacencyOut, + DWORD* pFaceRemap, LPD3DXBUFFER *ppVertexRemap) PURE; +}; + +DECLARE_INTERFACE_(ID3DXPMesh, ID3DXBaseMesh) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DXBaseMesh + STDMETHOD(DrawSubset)(THIS_ DWORD AttribId) PURE; + STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE; + STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE; + STDMETHOD_(DWORD, GetFVF)(THIS) PURE; + STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE; + STDMETHOD_(DWORD, GetOptions)(THIS) PURE; + STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE; + STDMETHOD(CloneMeshFVF)(THIS_ DWORD Options, + DWORD FVF, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE; + STDMETHOD(CloneMesh)(THIS_ DWORD Options, + CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3DDevice, LPD3DXMESH* ppCloneMesh) PURE; + STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER8* ppVB) PURE; + STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER8* ppIB) PURE; + STDMETHOD(LockVertexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE; + STDMETHOD(UnlockVertexBuffer)(THIS) PURE; + STDMETHOD(LockIndexBuffer)(THIS_ DWORD Flags, BYTE** ppData) PURE; + STDMETHOD(UnlockIndexBuffer)(THIS) PURE; + STDMETHOD(GetAttributeTable)( + THIS_ D3DXATTRIBUTERANGE *pAttribTable, DWORD* pAttribTableSize) PURE; + + // ID3DXPMesh + STDMETHOD(ClonePMeshFVF)(THIS_ DWORD Options, + DWORD FVF, LPDIRECT3DDEVICE8 pD3D, LPD3DXPMESH* ppCloneMesh) PURE; + STDMETHOD(ClonePMesh)(THIS_ DWORD Options, + CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3D, LPD3DXPMESH* ppCloneMesh) PURE; + STDMETHOD(SetNumFaces)(THIS_ DWORD Faces) PURE; + STDMETHOD(SetNumVertices)(THIS_ DWORD Vertices) PURE; + STDMETHOD_(DWORD, GetMaxFaces)(THIS) PURE; + STDMETHOD_(DWORD, GetMinFaces)(THIS) PURE; + STDMETHOD_(DWORD, GetMaxVertices)(THIS) PURE; + STDMETHOD_(DWORD, GetMinVertices)(THIS) PURE; + STDMETHOD(Save)(THIS_ IStream *pStream, LPD3DXMATERIAL pMaterials, DWORD NumMaterials) PURE; + + STDMETHOD(Optimize)(THIS_ DWORD Flags, DWORD* pAdjacencyOut, + DWORD* pFaceRemap, LPD3DXBUFFER *ppVertexRemap, + LPD3DXMESH* ppOptMesh) PURE; + STDMETHOD(GetAdjacency)(THIS_ DWORD* pAdjacency) PURE; +}; + +DECLARE_INTERFACE_(ID3DXSPMesh, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DXSPMesh + STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE; + STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE; + STDMETHOD_(DWORD, GetFVF)(THIS) PURE; + STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE; + STDMETHOD_(DWORD, GetOptions)(THIS) PURE; + STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE; + STDMETHOD(CloneMeshFVF)(THIS_ DWORD Options, + DWORD FVF, LPDIRECT3DDEVICE8 pD3D, DWORD *pAdjacencyOut, DWORD *pVertexRemapOut, LPD3DXMESH* ppCloneMesh) PURE; + STDMETHOD(CloneMesh)(THIS_ DWORD Options, + CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3DDevice, DWORD *pAdjacencyOut, DWORD *pVertexRemapOut, LPD3DXMESH* ppCloneMesh) PURE; + STDMETHOD(ClonePMeshFVF)(THIS_ DWORD Options, + DWORD FVF, LPDIRECT3DDEVICE8 pD3D, DWORD *pVertexRemapOut, LPD3DXPMESH* ppCloneMesh) PURE; + STDMETHOD(ClonePMesh)(THIS_ DWORD Options, + CONST DWORD *pDeclaration, LPDIRECT3DDEVICE8 pD3D, DWORD *pVertexRemapOut, LPD3DXPMESH* ppCloneMesh) PURE; + STDMETHOD(ReduceFaces)(THIS_ DWORD Faces) PURE; + STDMETHOD(ReduceVertices)(THIS_ DWORD Vertices) PURE; + STDMETHOD_(DWORD, GetMaxFaces)(THIS) PURE; + STDMETHOD_(DWORD, GetMaxVertices)(THIS) PURE; +}; + +#define UNUSED16 (0xffff) +#define UNUSED32 (0xffffffff) + +// ID3DXMesh::Optimize options +enum _D3DXMESHOPT { + D3DXMESHOPT_COMPACT = 0x001, + D3DXMESHOPT_ATTRSORT = 0x002, + D3DXMESHOPT_VERTEXCACHE = 0x004, + D3DXMESHOPT_STRIPREORDER = 0x008, + D3DXMESHOPT_IGNOREVERTS = 0x010, // optimize faces only, don't touch vertices + D3DXMESHOPT_SHAREVB = 0x020, +}; + +// Subset of the mesh that has the same attribute and bone combination. +// This subset can be rendered in a single draw call +typedef struct _D3DXBONECOMBINATION +{ + DWORD AttribId; + DWORD FaceStart; + DWORD FaceCount; + DWORD VertexStart; + DWORD VertexCount; + DWORD* BoneId; +} D3DXBONECOMBINATION, *LPD3DXBONECOMBINATION; + +DECLARE_INTERFACE_(ID3DXSkinMesh, IUnknown) +{ + // IUnknown + STDMETHOD(QueryInterface)(THIS_ REFIID iid, LPVOID *ppv) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + // ID3DXMesh + STDMETHOD_(DWORD, GetNumFaces)(THIS) PURE; + STDMETHOD_(DWORD, GetNumVertices)(THIS) PURE; + STDMETHOD_(DWORD, GetFVF)(THIS) PURE; + STDMETHOD(GetDeclaration)(THIS_ DWORD Declaration[MAX_FVF_DECL_SIZE]) PURE; + STDMETHOD_(DWORD, GetOptions)(THIS) PURE; + STDMETHOD(GetDevice)(THIS_ LPDIRECT3DDEVICE8* ppDevice) PURE; + STDMETHOD(GetVertexBuffer)(THIS_ LPDIRECT3DVERTEXBUFFER8* ppVB) PURE; + STDMETHOD(GetIndexBuffer)(THIS_ LPDIRECT3DINDEXBUFFER8* ppIB) PURE; + STDMETHOD(LockVertexBuffer)(THIS_ DWORD flags, BYTE** ppData) PURE; + STDMETHOD(UnlockVertexBuffer)(THIS) PURE; + STDMETHOD(LockIndexBuffer)(THIS_ DWORD flags, BYTE** ppData) PURE; + STDMETHOD(UnlockIndexBuffer)(THIS) PURE; + STDMETHOD(LockAttributeBuffer)(THIS_ DWORD flags, DWORD** ppData) PURE; + STDMETHOD(UnlockAttributeBuffer)(THIS) PURE; + // ID3DXSkinMesh + STDMETHOD_(DWORD, GetNumBones)(THIS) PURE; + STDMETHOD(GetOriginalMesh)(THIS_ LPD3DXMESH* ppMesh) PURE; + STDMETHOD(SetBoneInfluence)(THIS_ DWORD bone, DWORD numInfluences, CONST DWORD* vertices, CONST FLOAT* weights) PURE; + STDMETHOD_(DWORD, GetNumBoneInfluences)(THIS_ DWORD bone) PURE; + STDMETHOD(GetBoneInfluence)(THIS_ DWORD bone, DWORD* vertices, FLOAT* weights) PURE; + STDMETHOD(GetMaxVertexInfluences)(THIS_ DWORD* maxVertexInfluences) PURE; + STDMETHOD(GetMaxFaceInfluences)(THIS_ DWORD* maxFaceInfluences) PURE; + STDMETHOD(ConvertToBlendedMesh)(THIS_ DWORD options, CONST LPDWORD pAdjacencyIn, LPDWORD pAdjacencyOut, + DWORD* pNumBoneCombinations, LPD3DXBUFFER* ppBoneCombinationTable, LPD3DXMESH* ppMesh) PURE; + STDMETHOD(ConvertToIndexedBlendedMesh)(THIS_ DWORD options, + CONST LPDWORD pAdjacencyIn, + DWORD paletteSize, + LPDWORD pAdjacencyOut, + DWORD* pNumBoneCombinations, + LPD3DXBUFFER* ppBoneCombinationTable, + LPD3DXMESH* ppMesh) PURE; + STDMETHOD(GenerateSkinnedMesh)(THIS_ DWORD options, FLOAT minWeight, CONST LPDWORD pAdjacencyIn, LPDWORD pAdjacencyOut, LPD3DXMESH* ppMesh) PURE; + STDMETHOD(UpdateSkinnedMesh)(THIS_ CONST D3DXMATRIX* pBoneTransforms, LPD3DXMESH pMesh) PURE; +}; + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +HRESULT WINAPI + D3DXCreateMesh( + DWORD NumFaces, + DWORD NumVertices, + DWORD Options, + CONST DWORD *pDeclaration, + LPDIRECT3DDEVICE8 pD3D, + LPD3DXMESH* ppMesh); + +HRESULT WINAPI + D3DXCreateMeshFVF( + DWORD NumFaces, + DWORD NumVertices, + DWORD Options, + DWORD FVF, + LPDIRECT3DDEVICE8 pD3D, + LPD3DXMESH* ppMesh); + +HRESULT WINAPI + D3DXCreateSPMesh( + LPD3DXMESH pMesh, + CONST DWORD* pAdjacency, + CONST LPD3DXATTRIBUTEWEIGHTS pVertexAttributeWeights, + CONST FLOAT *pVertexWeights, + LPD3DXSPMESH* ppSMesh); + +// clean a mesh up for simplification, try to make manifold +HRESULT WINAPI + D3DXCleanMesh( + LPD3DXMESH pMeshIn, + CONST DWORD* pAdjacency, + LPD3DXMESH* ppMeshOut); + +HRESULT WINAPI + D3DXValidMesh( + LPD3DXMESH pMeshIn, + CONST DWORD* pAdjacency); + +HRESULT WINAPI + D3DXGeneratePMesh( + LPD3DXMESH pMesh, + CONST DWORD* pAdjacency, + CONST LPD3DXATTRIBUTEWEIGHTS pVertexAttributeWeights, + CONST FLOAT *pVertexWeights, + DWORD MinValue, + DWORD Options, + LPD3DXPMESH* ppPMesh); + +HRESULT WINAPI + D3DXSimplifyMesh( + LPD3DXMESH pMesh, + CONST DWORD* pAdjacency, + CONST LPD3DXATTRIBUTEWEIGHTS pVertexAttributeWeights, + CONST FLOAT *pVertexWeights, + DWORD MinValue, + DWORD Options, + LPD3DXMESH* ppMesh); + +HRESULT WINAPI + D3DXComputeBoundingSphere( + PVOID pPointsFVF, + DWORD NumVertices, + DWORD FVF, + D3DXVECTOR3 *pCenter, + FLOAT *pRadius); + +HRESULT WINAPI + D3DXComputeBoundingBox( + PVOID pPointsFVF, + DWORD NumVertices, + DWORD FVF, + D3DXVECTOR3 *pMin, + D3DXVECTOR3 *pMax); + +HRESULT WINAPI + D3DXComputeNormals( + LPD3DXBASEMESH pMesh); + +HRESULT WINAPI + D3DXCreateBuffer( + DWORD NumBytes, + LPD3DXBUFFER *ppBuffer); + + +HRESULT WINAPI + D3DXLoadMeshFromX( + LPSTR pFilename, + DWORD Options, + LPDIRECT3DDEVICE8 pD3D, + LPD3DXBUFFER *ppAdjacency, + LPD3DXBUFFER *ppMaterials, + PDWORD pNumMaterials, + LPD3DXMESH *ppMesh); + +HRESULT WINAPI + D3DXSaveMeshToX( + LPSTR pFilename, + LPD3DXMESH pMesh, + CONST DWORD* pAdjacency, + CONST LPD3DXMATERIAL pMaterials, + DWORD NumMaterials, + DWORD Format + ); + +HRESULT WINAPI + D3DXCreatePMeshFromStream( + IStream *pStream, + DWORD Options, + LPDIRECT3DDEVICE8 pD3DDevice, + LPD3DXBUFFER *ppMaterials, + DWORD* pNumMaterials, + LPD3DXPMESH *ppPMesh); + +HRESULT WINAPI + D3DXCreateSkinMesh( + DWORD numFaces, + DWORD numVertices, + DWORD numBones, + DWORD options, + CONST DWORD *pDeclaration, + LPDIRECT3DDEVICE8 pD3D, + LPD3DXSKINMESH* ppSkinMesh); + +HRESULT WINAPI + D3DXCreateSkinMeshFVF( + DWORD numFaces, + DWORD numVertices, + DWORD numBones, + DWORD options, + DWORD fvf, + LPDIRECT3DDEVICE8 pD3D, + LPD3DXSKINMESH* ppSkinMesh); + +HRESULT WINAPI + D3DXCreateSkinMeshFromMesh( + LPD3DXMESH pMesh, + DWORD numBones, + LPD3DXSKINMESH* ppSkinMesh); + +HRESULT WINAPI + D3DXLoadMeshFromXof( + LPDIRECTXFILEDATA pXofObjMesh, + DWORD Options, + LPDIRECT3DDEVICE8 pD3DDevice, + LPD3DXBUFFER *ppAdjacency, + LPD3DXBUFFER *ppMaterials, + PDWORD pNumMaterials, + LPD3DXMESH *ppMesh); + +HRESULT WINAPI + D3DXLoadSkinMeshFromXof( + LPDIRECTXFILEDATA pxofobjMesh, + DWORD options, + LPDIRECT3DDEVICE8 pD3D, + LPD3DXBUFFER* ppAdjacency, + LPD3DXBUFFER* ppMaterials, + PDWORD pMatOut, + LPD3DXBUFFER* ppBoneNames, + LPD3DXBUFFER* ppBoneTransforms, + LPD3DXSKINMESH* ppMesh); + +HRESULT WINAPI + D3DXTesselateMesh( + LPD3DXMESH pMeshIn, + CONST DWORD* pAdjacency, + FLOAT NumSegs, + BOOL QuadraticInterpNormals, // if false use linear intrep for normals, if true use quadratic + LPD3DXMESH *ppMeshOut); + +HRESULT WINAPI + D3DXDeclaratorFromFVF( + DWORD FVF, + DWORD Declaration[MAX_FVF_DECL_SIZE]); + +HRESULT WINAPI + D3DXFVFFromDeclarator( + CONST DWORD *pDeclarator, + DWORD *pFVF); + +HRESULT WINAPI + D3DXWeldVertices( + CONST LPD3DXMESH pMesh, + float fEpsilon, + CONST DWORD *rgdwAdjacencyIn, + DWORD *rgdwAdjacencyOut, + DWORD* pFaceRemap, + LPD3DXBUFFER *ppbufVertexRemap); + +HRESULT WINAPI + D3DXIntersect( + LPD3DXBASEMESH pMesh, + CONST D3DXVECTOR3 *pRayPos, + CONST D3DXVECTOR3 *pRayDir, + BOOL *pHit, + DWORD *pFaceIndex, + FLOAT *pU, + FLOAT *pV, + FLOAT *pDist); + +BOOL WINAPI + D3DXSphereBoundProbe( + CONST D3DXVECTOR3 *pvCenter, + FLOAT fRadius, + D3DXVECTOR3 *pvRayPosition, + D3DXVECTOR3 *pvRayDirection); + +BOOL WINAPI + D3DXBoxBoundProbe( + CONST D3DXVECTOR3 *pvMin, + CONST D3DXVECTOR3 *pvMax, + D3DXVECTOR3 *pvRayPosition, + D3DXVECTOR3 *pvRayDirection); + +enum _D3DXERR { + D3DXERR_CANNOTMODIFYINDEXBUFFER = MAKE_DDHRESULT(2900), + D3DXERR_INVALIDMESH = MAKE_DDHRESULT(2901), + D3DXERR_CANNOTATTRSORT = MAKE_DDHRESULT(2902), + D3DXERR_SKINNINGNOTSUPPORTED = MAKE_DDHRESULT(2903), + D3DXERR_TOOMANYINFLUENCES = MAKE_DDHRESULT(2904), + D3DXERR_INVALIDDATA = MAKE_DDHRESULT(2905), +}; + +#ifdef __cplusplus +} +#endif //__cplusplus + +#endif //__D3DX8MESH_H__ + + diff --git a/windows_libs/mssdk/include/d3dx8shape.h b/windows_libs/mssdk/include/d3dx8shape.h new file mode 100644 index 00000000..a1d8e674 --- /dev/null +++ b/windows_libs/mssdk/include/d3dx8shape.h @@ -0,0 +1,218 @@ +/////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved. +// +// File: d3dx8shapes.h +// Content: D3DX simple shapes +// +/////////////////////////////////////////////////////////////////////////// + +#include "d3dx8.h" + +#ifndef __D3DX8SHAPES_H__ +#define __D3DX8SHAPES_H__ + +/////////////////////////////////////////////////////////////////////////// +// Functions: +/////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + + +//------------------------------------------------------------------------- +// D3DXCreatePolygon: +// ------------------ +// Creates a mesh containing an n-sided polygon. The polygon is centered +// at the origin. +// +// Parameters: +// +// pDevice The D3D device with which the mesh is going to be used. +// Length Length of each side. +// Sides Number of sides the polygon has. (Must be >= 3) +// ppMesh The mesh object which will be created +// ppAdjacency Returns a buffer containing adjacency info. Can be NULL. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreatePolygon( + LPDIRECT3DDEVICE8 pDevice, + FLOAT Length, + UINT Sides, + LPD3DXMESH* ppMesh, + LPD3DXBUFFER* ppAdjacency); + + +//------------------------------------------------------------------------- +// D3DXCreateBox: +// -------------- +// Creates a mesh containing an axis-aligned box. The box is centered at +// the origin. +// +// Parameters: +// +// pDevice The D3D device with which the mesh is going to be used. +// Width Width of box (along X-axis) +// Height Height of box (along Y-axis) +// Depth Depth of box (along Z-axis) +// ppMesh The mesh object which will be created +// ppAdjacency Returns a buffer containing adjacency info. Can be NULL. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateBox( + LPDIRECT3DDEVICE8 pDevice, + FLOAT Width, + FLOAT Height, + FLOAT Depth, + LPD3DXMESH* ppMesh, + LPD3DXBUFFER* ppAdjacency); + + +//------------------------------------------------------------------------- +// D3DXCreateCylinder: +// ------------------- +// Creates a mesh containing a cylinder. The generated cylinder is +// centered at the origin, and its axis is aligned with the Z-axis. +// +// Parameters: +// +// pDevice The D3D device with which the mesh is going to be used. +// Radius1 Radius at -Z end (should be >= 0.0f) +// Radius2 Radius at +Z end (should be >= 0.0f) +// Length Length of cylinder (along Z-axis) +// Slices Number of slices about the main axis +// Stacks Number of stacks along the main axis +// ppMesh The mesh object which will be created +// ppAdjacency Returns a buffer containing adjacency info. Can be NULL. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateCylinder( + LPDIRECT3DDEVICE8 pDevice, + FLOAT Radius1, + FLOAT Radius2, + FLOAT Length, + UINT Slices, + UINT Stacks, + LPD3DXMESH* ppMesh, + LPD3DXBUFFER* ppAdjacency); + + +//------------------------------------------------------------------------- +// D3DXCreateSphere: +// ----------------- +// Creates a mesh containing a sphere. The sphere is centered at the +// origin. +// +// Parameters: +// +// pDevice The D3D device with which the mesh is going to be used. +// Radius Radius of the sphere (should be >= 0.0f) +// Slices Number of slices about the main axis +// Stacks Number of stacks along the main axis +// ppMesh The mesh object which will be created +// ppAdjacency Returns a buffer containing adjacency info. Can be NULL. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateSphere( + LPDIRECT3DDEVICE8 pDevice, + FLOAT Radius, + UINT Slices, + UINT Stacks, + LPD3DXMESH* ppMesh, + LPD3DXBUFFER* ppAdjacency); + + +//------------------------------------------------------------------------- +// D3DXCreateTorus: +// ---------------- +// Creates a mesh containing a torus. The generated torus is centered at +// the origin, and its axis is aligned with the Z-axis. +// +// Parameters: +// +// pDevice The D3D device with which the mesh is going to be used. +// InnerRadius Inner radius of the torus (should be >= 0.0f) +// OuterRadius Outer radius of the torue (should be >= 0.0f) +// Sides Number of sides in a cross-section (must be >= 3) +// Rings Number of rings making up the torus (must be >= 3) +// ppMesh The mesh object which will be created +// ppAdjacency Returns a buffer containing adjacency info. Can be NULL. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateTorus( + LPDIRECT3DDEVICE8 pDevice, + FLOAT InnerRadius, + FLOAT OuterRadius, + UINT Sides, + UINT Rings, + LPD3DXMESH* ppMesh, + LPD3DXBUFFER* ppAdjacency); + + +//------------------------------------------------------------------------- +// D3DXCreateTeapot: +// ----------------- +// Creates a mesh containing a teapot. +// +// Parameters: +// +// pDevice The D3D device with which the mesh is going to be used. +// ppMesh The mesh object which will be created +// ppAdjacency Returns a buffer containing adjacency info. Can be NULL. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateTeapot( + LPDIRECT3DDEVICE8 pDevice, + LPD3DXMESH* ppMesh, + LPD3DXBUFFER* ppAdjacency); + + +//------------------------------------------------------------------------- +// D3DXCreateText: +// --------------- +// Creates a mesh containing the specified text using the font associated +// with the device context. +// +// Parameters: +// +// pDevice The D3D device with which the mesh is going to be used. +// hDC Device context, with desired font selected +// pText Text to generate +// Deviation Maximum chordal deviation from true font outlines +// Extrusion Amount to extrude text in -Z direction +// ppMesh The mesh object which will be created +// pGlyphMetrics Address of buffer to receive glyph metric data (or NULL) +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateTextA( + LPDIRECT3DDEVICE8 pDevice, + HDC hDC, + LPCSTR pText, + FLOAT Deviation, + FLOAT Extrusion, + LPD3DXMESH* ppMesh, + LPGLYPHMETRICSFLOAT pGlyphMetrics); + +HRESULT WINAPI + D3DXCreateTextW( + LPDIRECT3DDEVICE8 pDevice, + HDC hDC, + LPCWSTR pText, + FLOAT Deviation, + FLOAT Extrusion, + LPD3DXMESH* ppMesh, + LPGLYPHMETRICSFLOAT pGlyphMetrics); + +#ifdef UNICODE +#define D3DXCreateText D3DXCreateTextW +#else +#define D3DXCreateText D3DXCreateTextA +#endif + + +#ifdef __cplusplus +} +#endif //__cplusplus + +#endif //__D3DX8SHAPES_H__ diff --git a/windows_libs/mssdk/include/d3dx8tex.h b/windows_libs/mssdk/include/d3dx8tex.h new file mode 100644 index 00000000..55703e1c --- /dev/null +++ b/windows_libs/mssdk/include/d3dx8tex.h @@ -0,0 +1,1069 @@ +/////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved. +// +// File: d3dx8tex.h +// Content: D3DX texturing APIs +// +/////////////////////////////////////////////////////////////////////////// + +#include "d3dx8.h" + +#ifndef __D3DX8TEX_H__ +#define __D3DX8TEX_H__ + + +//------------------------------------------------------------------------- +// D3DX_FILTER flags: +// ------------------ +// +// A valid filter must contain one of these values: +// +// D3DX_FILTER_NONE +// No scaling or filtering will take place. Pixels outside the bounds +// of the source image are assumed to be transparent black. +// D3DX_FILTER_POINT +// Each destination pixel is computed by sampling the nearest pixel +// from the source image. +// D3DX_FILTER_LINEAR +// Each destination pixel is computed by linearly interpolating between +// the nearest pixels in the source image. This filter works best +// when the scale on each axis is less than 2. +// D3DX_FILTER_TRIANGLE +// Every pixel in the source image contributes equally to the +// destination image. This is the slowest of all the filters. +// D3DX_FILTER_BOX +// Each pixel is computed by averaging a 2x2(x2) box pixels from +// the source image. Only works when the dimensions of the +// destination are half those of the source. (as with mip maps) +// +// +// And can be OR'd with any of these optional flags: +// +// D3DX_FILTER_MIRROR_U +// Indicates that pixels off the edge of the texture on the U-axis +// should be mirrored, not wraped. +// D3DX_FILTER_MIRROR_V +// Indicates that pixels off the edge of the texture on the V-axis +// should be mirrored, not wraped. +// D3DX_FILTER_MIRROR_W +// Indicates that pixels off the edge of the texture on the W-axis +// should be mirrored, not wraped. +// D3DX_FILTER_MIRROR +// Same as specifying D3DX_FILTER_MIRROR_U, D3DX_FILTER_MIRROR_V, +// and D3DX_FILTER_MIRROR_V +// D3DX_FILTER_DITHER +// Dithers the resulting image. +// +//------------------------------------------------------------------------- + +#define D3DX_FILTER_NONE (1 << 0) +#define D3DX_FILTER_POINT (2 << 0) +#define D3DX_FILTER_LINEAR (3 << 0) +#define D3DX_FILTER_TRIANGLE (4 << 0) +#define D3DX_FILTER_BOX (5 << 0) + +#define D3DX_FILTER_MIRROR_U (1 << 16) +#define D3DX_FILTER_MIRROR_V (2 << 16) +#define D3DX_FILTER_MIRROR_W (4 << 16) +#define D3DX_FILTER_MIRROR (7 << 16) +#define D3DX_FILTER_DITHER (8 << 16) + + +//------------------------------------------------------------------------- +// D3DXIMAGE_INFO: +// --------------- +// This structure is used to return a rough description of what the +// the original contents of an image file looked like. +// +// Width +// Width of original image in pixels +// Height +// Height of original image in pixels +// Depth +// Depth of original image in pixels +// MipLevels +// Number of mip levels in original image +// Format +// D3D format which most closely describes the data in original image +// +//------------------------------------------------------------------------- + + +typedef struct _D3DXIMAGE_INFO +{ + UINT Width; + UINT Height; + UINT Depth; + UINT MipLevels; + D3DFORMAT Format; + +} D3DXIMAGE_INFO; + + + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + + +//------------------------------------------------------------------------- +// D3DXLoadSurfaceFromFile/Resource: +// --------------------------------- +// Load surface from a file or resource +// +// Parameters: +// pDestSurface +// Destination surface, which will receive the image. +// pDestPalette +// Destination palette of 256 colors, or NULL +// pDestRect +// Destination rectangle, or NULL for entire surface +// pSrcFile +// File name of the source image. +// pSrcModule +// Module where resource is located, or NULL for module associated +// with image the os used to create the current process. +// pSrcResource +// Resource name +// pSrcData +// Pointer to file in memory. +// SrcDataSize +// Size in bytes of file in memory. +// pSrcRect +// Source rectangle, or NULL for entire image +// Filter +// D3DX_FILTER flags controlling how the image is filtered. +// Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE. +// ColorKey +// Color to replace with transparent black, or 0 to disable colorkey. +// This is always a 32-bit ARGB color, independent of the source image +// format. Alpha is significant, and should usually be set to FF for +// opaque colorkeys. (ex. Opaque black == 0xff000000) +// pSrcInfo +// Pointer to a D3DXIMAGE_INFO structure to be filled in with the +// description of the data in the source image file, or NULL. +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXLoadSurfaceFromFileA( + LPDIRECT3DSURFACE8 pDestSurface, + CONST PALETTEENTRY* pDestPalette, + CONST RECT* pDestRect, + LPCSTR pSrcFile, + CONST RECT* pSrcRect, + DWORD Filter, + D3DCOLOR ColorKey, + D3DXIMAGE_INFO* pSrcInfo); + +HRESULT WINAPI + D3DXLoadSurfaceFromFileW( + LPDIRECT3DSURFACE8 pDestSurface, + CONST PALETTEENTRY* pDestPalette, + CONST RECT* pDestRect, + LPCWSTR pSrcFile, + CONST RECT* pSrcRect, + DWORD Filter, + D3DCOLOR ColorKey, + D3DXIMAGE_INFO* pSrcInfo); + +#ifdef UNICODE +#define D3DXLoadSurfaceFromFile D3DXLoadSurfaceFromFileW +#else +#define D3DXLoadSurfaceFromFile D3DXLoadSurfaceFromFileA +#endif + + +HRESULT WINAPI + D3DXLoadSurfaceFromResourceA( + LPDIRECT3DSURFACE8 pDestSurface, + CONST PALETTEENTRY* pDestPalette, + CONST RECT* pDestRect, + HMODULE hSrcModule, + LPCSTR pSrcResource, + CONST RECT* pSrcRect, + DWORD Filter, + D3DCOLOR ColorKey, + D3DXIMAGE_INFO* pSrcInfo); + +HRESULT WINAPI + D3DXLoadSurfaceFromResourceW( + LPDIRECT3DSURFACE8 pDestSurface, + CONST PALETTEENTRY* pDestPalette, + CONST RECT* pDestRect, + HMODULE hSrcModule, + LPCWSTR pSrcResource, + CONST RECT* pSrcRect, + DWORD Filter, + D3DCOLOR ColorKey, + D3DXIMAGE_INFO* pSrcInfo); + + +#ifdef UNICODE +#define D3DXLoadSurfaceFromResource D3DXLoadSurfaceFromResourceW +#else +#define D3DXLoadSurfaceFromResource D3DXLoadSurfaceFromResourceA +#endif + + +HRESULT WINAPI + D3DXLoadSurfaceFromFileInMemory( + LPDIRECT3DSURFACE8 pDestSurface, + CONST PALETTEENTRY* pDestPalette, + CONST RECT* pDestRect, + LPCVOID pSrcData, + UINT SrcDataSize, + CONST RECT* pSrcRect, + DWORD Filter, + D3DCOLOR ColorKey, + D3DXIMAGE_INFO* pSrcInfo); + + + +//------------------------------------------------------------------------- +// D3DXLoadSurfaceFromSurface: +// -------------------------- +// Load surface from another surface (with color conversion) +// +// Parameters: +// pDestSurface +// Destination surface, which will receive the image. +// pDestPalette +// Destination palette of 256 colors, or NULL +// pDestRect +// Destination rectangle, or NULL for entire surface +// pSrcSurface +// Source surface +// pSrcPalette +// Source palette of 256 colors, or NULL +// pSrcRect +// Source rectangle, or NULL for entire surface +// Filter +// D3DX_FILTER flags controlling how the image is filtered. +// Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE. +// ColorKey +// Color to replace with transparent black, or 0 to disable colorkey. +// This is always a 32-bit ARGB color, independent of the source image +// format. Alpha is significant, and should usually be set to FF for +// opaque colorkeys. (ex. Opaque black == 0xff000000) +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXLoadSurfaceFromSurface( + LPDIRECT3DSURFACE8 pDestSurface, + CONST PALETTEENTRY* pDestPalette, + CONST RECT* pDestRect, + LPDIRECT3DSURFACE8 pSrcSurface, + CONST PALETTEENTRY* pSrcPalette, + CONST RECT* pSrcRect, + DWORD Filter, + D3DCOLOR ColorKey); + + +//------------------------------------------------------------------------- +// D3DXLoadSurfaceFromMemory: +// ------------------------ +// Load surface from memory. +// +// Parameters: +// pDestSurface +// Destination surface, which will receive the image. +// pDestPalette +// Destination palette of 256 colors, or NULL +// pDestRect +// Destination rectangle, or NULL for entire surface +// pSrcMemory +// Pointer to the top-left corner of the source image in memory +// SrcFormat +// Pixel format of the source image. +// SrcPitch +// Pitch of source image, in bytes. For DXT formats, this number +// should represent the width of one row of cells, in bytes. +// pSrcPalette +// Source palette of 256 colors, or NULL +// pSrcRect +// Source rectangle. +// Filter +// D3DX_FILTER flags controlling how the image is filtered. +// Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE. +// ColorKey +// Color to replace with transparent black, or 0 to disable colorkey. +// This is always a 32-bit ARGB color, independent of the source image +// format. Alpha is significant, and should usually be set to FF for +// opaque colorkeys. (ex. Opaque black == 0xff000000) +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXLoadSurfaceFromMemory( + LPDIRECT3DSURFACE8 pDestSurface, + CONST PALETTEENTRY* pDestPalette, + CONST RECT* pDestRect, + LPCVOID pSrcMemory, + D3DFORMAT SrcFormat, + UINT SrcPitch, + CONST PALETTEENTRY* pSrcPalette, + CONST RECT* pSrcRect, + DWORD Filter, + D3DCOLOR ColorKey); + + + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + + + +//------------------------------------------------------------------------- +// D3DXLoadVolumeFromVolume: +// -------------------------- +// Load volume from another volume (with color conversion) +// +// Parameters: +// pDestVolume +// Destination volume, which will receive the image. +// pDestPalette +// Destination palette of 256 colors, or NULL +// pDestBox +// Destination box, or NULL for entire volume +// pSrcVolume +// Source volume +// pSrcPalette +// Source palette of 256 colors, or NULL +// pSrcBox +// Source box, or NULL for entire volume +// Filter +// D3DX_FILTER flags controlling how the image is filtered. +// Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE. +// ColorKey +// Color to replace with transparent black, or 0 to disable colorkey. +// This is always a 32-bit ARGB color, independent of the source image +// format. Alpha is significant, and should usually be set to FF for +// opaque colorkeys. (ex. Opaque black == 0xff000000) +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXLoadVolumeFromVolume( + LPDIRECT3DVOLUME8 pDestVolume, + CONST PALETTEENTRY* pDestPalette, + CONST D3DBOX* pDestBox, + LPDIRECT3DVOLUME8 pSrcVolume, + CONST PALETTEENTRY* pSrcPalette, + CONST D3DBOX* pSrcBox, + DWORD Filter, + D3DCOLOR ColorKey); + + +//------------------------------------------------------------------------- +// D3DXLoadVolumeFromMemory: +// ------------------------ +// Load volume from memory. +// +// Parameters: +// pDestVolume +// Destination volume, which will receive the image. +// pDestPalette +// Destination palette of 256 colors, or NULL +// pDestBox +// Destination box, or NULL for entire volume +// pSrcMemory +// Pointer to the top-left corner of the source volume in memory +// SrcFormat +// Pixel format of the source volume. +// SrcRowPitch +// Pitch of source image, in bytes. For DXT formats, this number +// should represent the size of one row of cells, in bytes. +// SrcSlicePitch +// Pitch of source image, in bytes. For DXT formats, this number +// should represent the size of one slice of cells, in bytes. +// pSrcPalette +// Source palette of 256 colors, or NULL +// pSrcBox +// Source box. +// Filter +// D3DX_FILTER flags controlling how the image is filtered. +// Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE. +// ColorKey +// Color to replace with transparent black, or 0 to disable colorkey. +// This is always a 32-bit ARGB color, independent of the source image +// format. Alpha is significant, and should usually be set to FF for +// opaque colorkeys. (ex. Opaque black == 0xff000000) +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXLoadVolumeFromMemory( + LPDIRECT3DVOLUME8 pDestVolume, + CONST PALETTEENTRY* pDestPalette, + CONST D3DBOX* pDestBox, + LPCVOID pSrcMemory, + D3DFORMAT SrcFormat, + UINT SrcRowPitch, + UINT SrcSlicePitch, + CONST PALETTEENTRY* pSrcPalette, + CONST D3DBOX* pSrcBox, + DWORD Filter, + D3DCOLOR ColorKey); + + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + + + + +//------------------------------------------------------------------------- +// D3DXCheckTextureRequirements: +// ----------------------------- +// +// Checks texture creation parameters. If parameters are invalid, this +// function returns corrected parameters. +// +// Parameters: +// +// pDevice +// The D3D device to be used +// pWidth +// Desired width in pixels, or NULL. Returns corrected width. +// pHeight +// Desired height in pixels, or NULL. Returns corrected height. +// pNumMipLevels +// Number of desired mipmap levels, or NULL. Returns corrected number. +// Usage +// Texture usage flags +// pFormat +// Desired pixel format, or NULL. Returns corrected format. +// Pool +// Memory pool to be used to create texture +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCheckTextureRequirements( + LPDIRECT3DDEVICE8 pDevice, + UINT* pWidth, + UINT* pHeight, + UINT* pNumMipLevels, + DWORD Usage, + D3DFORMAT* pFormat, + D3DPOOL Pool); + + +//------------------------------------------------------------------------- +// D3DXCreateTexture: +// ------------------ +// Create an empty texture +// +// Parameters: +// +// pDevice +// The D3D device with which the texture is going to be used. +// Width +// width in pixels; must be non-zero +// Height +// height in pixels; must be non-zero +// MipLevels +// number of mip levels desired; if zero or D3DX_DEFAULT, a complete +// mipmap chain will be created. +// Usage +// Texture usage flags +// Format +// Pixel format. +// Pool +// Memory pool to be used to create texture +// ppTexture +// The texture object that will be created +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateTexture( + LPDIRECT3DDEVICE8 pDevice, + UINT Width, + UINT Height, + UINT MipLevels, + DWORD Usage, + D3DFORMAT Format, + D3DPOOL Pool, + LPDIRECT3DTEXTURE8* ppTexture); + + +//------------------------------------------------------------------------- +// D3DXCreateTextureFromFile: +// -------------------------- +// Create a texture object from a file. +// +// Parameters: +// +// pDevice +// The D3D device with which the texture is going to be used. +// pSrcFile +// File name. +// hSrcModule +// Module handle. if NULL, current module will be used. +// pSrcResource +// Resource name in module +// pvSrcData +// Pointer to file in memory. +// SrcDataSize +// Size in bytes of file in memory. +// Width +// Width in pixels; if zero or D3DX_DEFAULT, the width will be taken +// from the file. +// Height +// Height in pixels; if zero of D3DX_DEFAULT, the height will be taken +// from the file. +// MipLevels +// Number of mip levels; if zero or D3DX_DEFAULT, a complete mipmap +// chain will be created. +// Usage +// Texture usage flags +// Format +// Desired pixel format. If D3DFMT_UNKNOWN, the format will be +// taken from the file. +// Pool +// Memory pool to be used to create texture +// Filter +// D3DX_FILTER flags controlling how the image is filtered. +// Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE. +// MipFilter +// D3DX_FILTER flags controlling how each miplevel is filtered. +// Or D3DX_DEFAULT for D3DX_FILTER_BOX, +// ColorKey +// Color to replace with transparent black, or 0 to disable colorkey. +// This is always a 32-bit ARGB color, independent of the source image +// format. Alpha is significant, and should usually be set to FF for +// opaque colorkeys. (ex. Opaque black == 0xff000000) +// pSrcInfo +// Pointer to a D3DXIMAGE_INFO structure to be filled in with the +// description of the data in the source image file, or NULL. +// pPalette +// 256 color palette to be filled in, or NULL +// ppTexture +// The texture object that will be created +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateTextureFromFileA( + LPDIRECT3DDEVICE8 pDevice, + LPCSTR pSrcFile, + LPDIRECT3DTEXTURE8* ppTexture); + +HRESULT WINAPI + D3DXCreateTextureFromFileW( + LPDIRECT3DDEVICE8 pDevice, + LPCWSTR pSrcFile, + LPDIRECT3DTEXTURE8* ppTexture); + +#ifdef UNICODE +#define D3DXCreateTextureFromFile D3DXCreateTextureFromFileW +#else +#define D3DXCreateTextureFromFile D3DXCreateTextureFromFileA +#endif + + +HRESULT WINAPI + D3DXCreateTextureFromResourceA( + LPDIRECT3DDEVICE8 pDevice, + HMODULE hSrcModule, + LPCSTR pSrcResource, + LPDIRECT3DTEXTURE8* ppTexture); + +HRESULT WINAPI + D3DXCreateTextureFromResourceW( + LPDIRECT3DDEVICE8 pDevice, + HMODULE hSrcModule, + LPCWSTR pSrcResource, + LPDIRECT3DTEXTURE8* ppTexture); + +#ifdef UNICODE +#define D3DXCreateTextureFromResource D3DXCreateTextureFromResourceW +#else +#define D3DXCreateTextureFromResource D3DXCreateTextureFromResourceA +#endif + + +HRESULT WINAPI + D3DXCreateTextureFromFileExA( + LPDIRECT3DDEVICE8 pDevice, + LPCSTR pSrcFile, + UINT Width, + UINT Height, + UINT MipLevels, + DWORD Usage, + D3DFORMAT Format, + D3DPOOL Pool, + DWORD Filter, + DWORD MipFilter, + D3DCOLOR ColorKey, + D3DXIMAGE_INFO* pSrcInfo, + PALETTEENTRY* pPalette, + LPDIRECT3DTEXTURE8* ppTexture); + +HRESULT WINAPI + D3DXCreateTextureFromFileExW( + LPDIRECT3DDEVICE8 pDevice, + LPCWSTR pSrcFile, + UINT Width, + UINT Height, + UINT MipLevels, + DWORD Usage, + D3DFORMAT Format, + D3DPOOL Pool, + DWORD Filter, + DWORD MipFilter, + D3DCOLOR ColorKey, + D3DXIMAGE_INFO* pSrcInfo, + PALETTEENTRY* pPalette, + LPDIRECT3DTEXTURE8* ppTexture); + +#ifdef UNICODE +#define D3DXCreateTextureFromFileEx D3DXCreateTextureFromFileExW +#else +#define D3DXCreateTextureFromFileEx D3DXCreateTextureFromFileExA +#endif + + +HRESULT WINAPI + D3DXCreateTextureFromResourceExA( + LPDIRECT3DDEVICE8 pDevice, + HMODULE hSrcModule, + LPCSTR pSrcResource, + UINT Width, + UINT Height, + UINT MipLevels, + DWORD Usage, + D3DFORMAT Format, + D3DPOOL Pool, + DWORD Filter, + DWORD MipFilter, + D3DCOLOR ColorKey, + D3DXIMAGE_INFO* pSrcInfo, + PALETTEENTRY* pPalette, + LPDIRECT3DTEXTURE8* ppTexture); + +HRESULT WINAPI + D3DXCreateTextureFromResourceExW( + LPDIRECT3DDEVICE8 pDevice, + HMODULE hSrcModule, + LPCWSTR pSrcResource, + UINT Width, + UINT Height, + UINT MipLevels, + DWORD Usage, + D3DFORMAT Format, + D3DPOOL Pool, + DWORD Filter, + DWORD MipFilter, + D3DCOLOR ColorKey, + D3DXIMAGE_INFO* pSrcInfo, + PALETTEENTRY* pPalette, + LPDIRECT3DTEXTURE8* ppTexture); + +#ifdef UNICODE +#define D3DXCreateTextureFromResourceEx D3DXCreateTextureFromResourceExW +#else +#define D3DXCreateTextureFromResourceEx D3DXCreateTextureFromResourceExA +#endif + + +HRESULT WINAPI + D3DXCreateTextureFromFileInMemory( + LPDIRECT3DDEVICE8 pDevice, + LPCVOID pSrcData, + UINT SrcDataSize, + LPDIRECT3DTEXTURE8* ppTexture); + + +HRESULT WINAPI + D3DXCreateTextureFromFileInMemoryEx( + LPDIRECT3DDEVICE8 pDevice, + LPCVOID pSrcData, + UINT SrcDataSize, + UINT Width, + UINT Height, + UINT MipLevels, + DWORD Usage, + D3DFORMAT Format, + D3DPOOL Pool, + DWORD Filter, + DWORD MipFilter, + D3DCOLOR ColorKey, + D3DXIMAGE_INFO* pSrcInfo, + PALETTEENTRY* pPalette, + LPDIRECT3DTEXTURE8* ppTexture); + + + +//------------------------------------------------------------------------- +// D3DXFilterTexture: +// ------------------ +// Filters mipmaps levels of a texture. +// +// Parameters: +// pTexture +// The texture object to be filtered +// pPalette +// 256 color palette to be used, or NULL for non-palettized formats +// SrcLevel +// The level whose image is used to generate the subsequent levels. +// Filter +// D3DX_FILTER flags controlling how each miplevel is filtered. +// Or D3DX_DEFAULT for D3DX_FILTER_BOX, +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXFilterTexture( + LPDIRECT3DTEXTURE8 pTexture, + CONST PALETTEENTRY* pPalette, + UINT SrcLevel, + DWORD Filter); + + + + + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + + + + + +//------------------------------------------------------------------------- +// D3DXCheckCubeTextureRequirements: +// --------------------------------- +// +// Checks cube texture creation parameters. If parameters are invalid, +// this function returns corrected parameters. +// +// Parameters: +// +// pDevice +// The D3D device to be used +// pSize +// Desired width and height in pixels, or NULL. Returns corrected size. +// pNumMipLevels +// Number of desired mipmap levels, or NULL. Returns corrected number. +// Usage +// Texture usage flags +// pFormat +// Desired pixel format, or NULL. Returns corrected format. +// Pool +// Memory pool to be used to create texture +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCheckCubeTextureRequirements( + LPDIRECT3DDEVICE8 pDevice, + UINT* pSize, + UINT* pNumMipLevels, + DWORD Usage, + D3DFORMAT* pFormat, + D3DPOOL Pool); + + +//------------------------------------------------------------------------- +// D3DXCreateCubeTexture: +// ---------------------- +// Create an empty cube texture +// +// Parameters: +// +// pDevice +// The D3D device with which the texture is going to be used. +// Size +// width and height in pixels; must be non-zero +// MipLevels +// number of mip levels desired; if zero or D3DX_DEFAULT, a complete +// mipmap chain will be created. +// Usage +// Texture usage flags +// Format +// Pixel format. +// Pool +// Memory pool to be used to create texture +// ppCubeTexture +// The cube texture object that will be created +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateCubeTexture( + LPDIRECT3DDEVICE8 pDevice, + UINT Size, + UINT MipLevels, + DWORD Usage, + D3DFORMAT Format, + D3DPOOL Pool, + LPDIRECT3DCUBETEXTURE8* ppCubeTexture); + + +//------------------------------------------------------------------------- +// D3DXCreateCubeTextureFromFile: +// -------------------------- +// Create a cube texture object from a file. +// +// Parameters: +// +// pDevice +// The D3D device with which the texture is going to be used. +// pSrcFile +// File name. +// pvSrcData +// Pointer to file in memory. +// SrcDataSize +// Size in bytes of file in memory. +// Size +// Width and height in pixels; if zero or D3DX_DEFAULT, the size +// will be taken from the file. +// MipLevels +// Number of mip levels; if zero or D3DX_DEFAULT, a complete mipmap +// chain will be created. +// Format +// Desired pixel format. If D3DFMT_UNKNOWN, the format will be +// taken from the file. +// Filter +// D3DX_FILTER flags controlling how the image is filtered. +// Or D3DX_DEFAULT for D3DX_FILTER_TRIANGLE. +// MipFilter +// D3DX_FILTER flags controlling how each miplevel is filtered. +// Or D3DX_DEFAULT for D3DX_FILTER_BOX, +// ColorKey +// Color to replace with transparent black, or 0 to disable colorkey. +// This is always a 32-bit ARGB color, independent of the source image +// format. Alpha is significant, and should usually be set to FF for +// opaque colorkeys. (ex. Opaque black == 0xff000000) +// pSrcInfo +// Pointer to a D3DXIMAGE_INFO structure to be filled in with the +// description of the data in the source image file, or NULL. +// pPalette +// 256 color palette to be filled in, or NULL +// ppCubeTexture +// The cube texture object that will be created +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateCubeTextureFromFileA( + LPDIRECT3DDEVICE8 pDevice, + LPCSTR pSrcFile, + LPDIRECT3DCUBETEXTURE8* ppCubeTexture); + +HRESULT WINAPI + D3DXCreateCubeTextureFromFileW( + LPDIRECT3DDEVICE8 pDevice, + LPCWSTR pSrcFile, + LPDIRECT3DCUBETEXTURE8* ppCubeTexture); + +#ifdef UNICODE +#define D3DXCreateCubeTextureFromFile D3DXCreateCubeTextureFromFileW +#else +#define D3DXCreateCubeTextureFromFile D3DXCreateCubeTextureFromFileA +#endif + + +HRESULT WINAPI + D3DXCreateCubeTextureFromFileExA( + LPDIRECT3DDEVICE8 pDevice, + LPCSTR pSrcFile, + UINT Size, + UINT MipLevels, + DWORD Usage, + D3DFORMAT Format, + D3DPOOL Pool, + DWORD Filter, + DWORD MipFilter, + D3DCOLOR ColorKey, + D3DXIMAGE_INFO* pSrcInfo, + PALETTEENTRY* pPalette, + LPDIRECT3DCUBETEXTURE8* ppCubeTexture); + +HRESULT WINAPI + D3DXCreateCubeTextureFromFileExW( + LPDIRECT3DDEVICE8 pDevice, + LPCWSTR pSrcFile, + UINT Size, + UINT MipLevels, + DWORD Usage, + D3DFORMAT Format, + D3DPOOL Pool, + DWORD Filter, + DWORD MipFilter, + D3DCOLOR ColorKey, + D3DXIMAGE_INFO* pSrcInfo, + PALETTEENTRY* pPalette, + LPDIRECT3DCUBETEXTURE8* ppCubeTexture); + +#ifdef UNICODE +#define D3DXCreateCubeTextureFromFileEx D3DXCreateCubeTextureFromFileExW +#else +#define D3DXCreateCubeTextureFromFileEx D3DXCreateCubeTextureFromFileExA +#endif + + +HRESULT WINAPI + D3DXCreateCubeTextureFromFileInMemory( + LPDIRECT3DDEVICE8 pDevice, + LPCVOID pSrcData, + UINT SrcDataSize, + LPDIRECT3DCUBETEXTURE8* ppCubeTexture); + + +HRESULT WINAPI + D3DXCreateCubeTextureFromFileInMemoryEx( + LPDIRECT3DDEVICE8 pDevice, + LPCVOID pSrcData, + UINT SrcDataSize, + UINT Size, + UINT MipLevels, + DWORD Usage, + D3DFORMAT Format, + D3DPOOL Pool, + DWORD Filter, + DWORD MipFilter, + D3DCOLOR ColorKey, + D3DXIMAGE_INFO* pSrcInfo, + PALETTEENTRY* pPalette, + LPDIRECT3DCUBETEXTURE8* ppCubeTexture); + + +//------------------------------------------------------------------------- +// D3DXFilterCubeTexture: +// ---------------------- +// Filters mipmaps levels of a cube texture map. +// +// Parameters: +// pCubeTexture +// The cube texture object to be filtered +// pPalette +// 256 color palette to be used, or NULL +// SrcLevel +// The level whose image is used to generate the subsequent levels. +// Filter +// D3DX_FILTER flags controlling how each miplevel is filtered. +// Or D3DX_DEFAULT for D3DX_FILTER_BOX, +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXFilterCubeTexture( + LPDIRECT3DCUBETEXTURE8 pCubeTexture, + CONST PALETTEENTRY* pPalette, + UINT SrcLevel, + DWORD Filter); + + + + +/////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////// + + + + +//------------------------------------------------------------------------- +// D3DXCheckVolumeTextureRequirements: +// ----------------------------------- +// +// Checks volume texture creation parameters. If parameters are invalid, +// this function returns corrected parameters. +// +// Parameters: +// +// pDevice +// The D3D device to be used +// pWidth +// Desired width in pixels, or NULL. Returns corrected size. +// pHeight +// Desired height in pixels, or NULL. Returns corrected size. +// pDepth +// Desired depth in pixels, or NULL. Returns corrected size. +// pNumMipLevels +// Number of desired mipmap levels, or NULL. Returns corrected number. +// pFormat +// Desired pixel format, or NULL. Returns corrected format. +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCheckVolumeTextureRequirements( + LPDIRECT3DDEVICE8 pDevice, + UINT* pWidth, + UINT* pHeight, + UINT* pDepth, + UINT* pNumMipLevels, + DWORD Usage, + D3DFORMAT* pFormat, + D3DPOOL Pool); + + +//------------------------------------------------------------------------- +// D3DXCreateVolumeTexture: +// ---------------------- +// Create an empty volume texture +// +// Parameters: +// +// pDevice +// The D3D device with which the texture is going to be used. +// Width +// width in pixels; must be non-zero +// Height +// height in pixels; must be non-zero +// Depth +// depth in pixels; must be non-zero +// MipLevels +// number of mip levels desired; if zero or D3DX_DEFAULT, a complete +// mipmap chain will be created. +// Format +// pixel format. +// ppVolumeTexture +// The volume texture object that will be created +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateVolumeTexture( + LPDIRECT3DDEVICE8 pDevice, + UINT Width, + UINT Height, + UINT Depth, + UINT MipLevels, + DWORD Usage, + D3DFORMAT Format, + D3DPOOL Pool, + LPDIRECT3DVOLUMETEXTURE8* ppVolumeTexture); + + +//------------------------------------------------------------------------- +// D3DXFilterVolumeTexture: +// ------------------------ +// Filters mipmaps levels of a volume texture map. +// +// Parameters: +// pVolumeTexture +// The volume texture object to be filtered +// pPalette +// 256 color palette to be used, or NULL +// SrcLevel +// The level whose image is used to generate the subsequent levels. +// Filter +// D3DX_FILTER flags controlling how each miplevel is filtered. +// Or D3DX_DEFAULT for D3DX_FILTER_BOX, +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXFilterVolumeTexture( + LPDIRECT3DVOLUMETEXTURE8 pVolumeTexture, + CONST PALETTEENTRY* pPalette, + UINT SrcLevel, + DWORD Filter); + + + +#ifdef __cplusplus +} +#endif //__cplusplus + +#endif //__D3DX8TEX_H__ diff --git a/windows_libs/mssdk/include/d3dxcore.h b/windows_libs/mssdk/include/d3dxcore.h new file mode 100644 index 00000000..c0be0cfe --- /dev/null +++ b/windows_libs/mssdk/include/d3dxcore.h @@ -0,0 +1,1027 @@ +/////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved. +// +// File: d3dxcore.h +// Content: D3DX core types and functions +// +/////////////////////////////////////////////////////////////////////////// + +#ifndef __D3DXCORE_H__ +#define __D3DXCORE_H__ + +#include +#include +#include "d3dxerr.h" + + +typedef struct ID3DXContext *LPD3DXCONTEXT; + +// {9B74ED7A-BBEF-11d2-9F8E-0000F8080835} +DEFINE_GUID(IID_ID3DXContext, + 0x9b74ed7a, 0xbbef, 0x11d2, 0x9f, 0x8e, 0x0, 0x0, 0xf8, 0x8, 0x8, 0x35); + + +/////////////////////////////////////////////////////////////////////////// +// Defines and Enumerators used below: +/////////////////////////////////////////////////////////////////////////// + +//------------------------------------------------------------------------- +// D3DX_DEFAULT: +// --------- +// A predefined value that could be used for any parameter in D3DX APIs or +// member functions that is an enumerant or a handle. The D3DX +// documentation indicates wherever D3DX_DEFAULT may be used, +// and how it will be interpreted in each situation. +//------------------------------------------------------------------------- +#define D3DX_DEFAULT ULONG_MAX + +//------------------------------------------------------------------------- +// D3DX_DEFAULT_FLOAT: +// ------------------ +// Similar to D3DX_DEFAULT, but used for floating point parameters. +// The D3DX documentation indicates wherever D3DX_DEFAULT_FLOAT may be used, +// and how it will be interpreted in each situation. +//------------------------------------------------------------------------- +#define D3DX_DEFAULT_FLOAT FLT_MAX + +//------------------------------------------------------------------------- +// Hardware Acceleration Level: +// --------------------------- +// These constants represent pre-defined hardware acceleration levels, +// and may be used as a default anywhere a (DWORD) deviceIndex is required. +// Each pre-define indicates a different level of hardware acceleration. +// They are an alternative to using explicit deviceIndices retrieved by +// D3DXGetDeviceDescription(). +// +// The only case these pre-defines should be used as device indices is if +// a particular level of acceleration is required, and given more than +// one capable device on the computer, it does not matter which one +// is used. +// +// The method of selection is as follows: If one of the D3DX devices on +// the primary DDraw device supports a requested hardware acceleration +// level, it will be used. Otherwise, the first matching device discovered +// by D3DX will be used. +// +// Of course, it is possible for no match to exist for any of the +// pre-defines on a particular computer. Passing such a value into the +// D3DX apis will simply cause them to fail, reporting that no match +// is available. +// +// D3DX_HWLEVEL_NULL: Null implementation (draws nothing) +// D3DX_HWLEVEL_REFERENCE: Reference implementation (slowest) +// D3DX_HWLEVEL_2D: 2D acceleration only (RGB rasterizer used) +// D3DX_HWLEVEL_RASTER: Rasterization acceleration (likely most useful) +// D3DX_HWLEVEL_TL: Transform and lighting acceleration +// D3DX_DEFAULT: The highest level of acceleration available +// on the primary DDraw device. +//------------------------------------------------------------------------- +#define D3DX_HWLEVEL_NULL (D3DX_DEFAULT - 1) +#define D3DX_HWLEVEL_REFERENCE (D3DX_DEFAULT - 2) +#define D3DX_HWLEVEL_2D (D3DX_DEFAULT - 3) +#define D3DX_HWLEVEL_RASTER (D3DX_DEFAULT - 4) +#define D3DX_HWLEVEL_TL (D3DX_DEFAULT - 5) + +//------------------------------------------------------------------------- +// Surface Class: +// ------------- +// These are the various types of 2D-surfaces classified according to their +// usage. Note that a number of them overlap. e.g. STENCILBUFFERS and +// DEPTHBUFFERS overlap (since in DX7 implementation the stencil and depth +// bits are part of the same pixel format). +// +// Mapping to the DX7 DDPIXELFORMAT concepts: +// ----------------------------------------- +// D3DX_SC_DEPTHBUFFER: All ddpfs which have the DDPF_ZPIXELS or the +// DDPF_ZBUFFER flags set. +// D3DX_SC_STENCILBUFFER: All ddpfs which have the DDPF_STENCILBUFFER +// flag set. +// D3DX_SC_BUMPMAP: All ddpfs which have the DDPF_BUMPLUMINANCE +// or the DDPF_BUMPDUDV flags set. +// D3DX_SC_LUMINANCEMAP: All ddpfs which have the DDPF_BUMPLUMINANCE +// or the DDPF_LUMINANCE flags set. +// D3DX_SC_COLORTEXTURE: All the surfaces that have color information in +// them and can be used for texturing. +// D3DX_SC_COLORRENDERTGT: All the surfaces that contain color +// information and can be used as render targets. +//------------------------------------------------------------------------- +#define D3DX_SC_DEPTHBUFFER 0x01 +#define D3DX_SC_STENCILBUFFER 0x02 +#define D3DX_SC_COLORTEXTURE 0x04 +#define D3DX_SC_BUMPMAP 0x08 +#define D3DX_SC_LUMINANCEMAP 0x10 +#define D3DX_SC_COLORRENDERTGT 0x20 + +//------------------------------------------------------------------------- +// Surface Formats: +// --------------- +// These are the various types of surface formats that can be enumerated, +// there is no DDPIXELFORMAT structure in D3DX, the enums carry the meaning +// (like FOURCCs). +// +// All the surface classes are represented here. +// +//------------------------------------------------------------------------- +typedef enum _D3DX_SURFACEFORMAT +{ + D3DX_SF_UNKNOWN = 0, + D3DX_SF_R8G8B8 = 1, + D3DX_SF_A8R8G8B8 = 2, + D3DX_SF_X8R8G8B8 = 3, + D3DX_SF_R5G6B5 = 4, + D3DX_SF_R5G5B5 = 5, + D3DX_SF_PALETTE4 = 6, + D3DX_SF_PALETTE8 = 7, + D3DX_SF_A1R5G5B5 = 8, + D3DX_SF_X4R4G4B4 = 9, + D3DX_SF_A4R4G4B4 =10, + D3DX_SF_L8 =11, // 8 bit luminance-only + D3DX_SF_A8L8 =12, // 16 bit alpha-luminance + D3DX_SF_U8V8 =13, // 16 bit bump map format + D3DX_SF_U5V5L6 =14, // 16 bit bump map format with luminance + D3DX_SF_U8V8L8 =15, // 24 bit bump map format with luminance + D3DX_SF_UYVY =16, // UYVY format (PC98 compliance) + D3DX_SF_YUY2 =17, // YUY2 format (PC98 compliance) + D3DX_SF_DXT1 =18, // S3 texture compression technique 1 + D3DX_SF_DXT3 =19, // S3 texture compression technique 3 + D3DX_SF_DXT5 =20, // S3 texture compression technique 5 + D3DX_SF_R3G3B2 =21, // 8 bit RGB texture format + D3DX_SF_A8 =22, // 8 bit alpha-only + D3DX_SF_TEXTUREMAX =23, // Last texture format + + D3DX_SF_Z16S0 =256, + D3DX_SF_Z32S0 =257, + D3DX_SF_Z15S1 =258, + D3DX_SF_Z24S8 =259, + D3DX_SF_S1Z15 =260, + D3DX_SF_S8Z24 =261, + D3DX_SF_DEPTHMAX =262, // Last depth format + + D3DX_SF_FORCEMAX = (DWORD)(-1) +} D3DX_SURFACEFORMAT; + +//------------------------------------------------------------------------- +// Filtering types for Texture APIs +// +// ------------- +// These are the various filter types for generation of mip-maps +// +// D3DX_FILTERTYPE +// ----------------------------------------- +// D3DX_FT_POINT: Point sampling only - no filtering +// D3DX_FT_LINEAR: Bi-linear filtering +// +//------------------------------------------------------------------------- +typedef enum _D3DX_FILTERTYPE +{ + D3DX_FT_POINT = 0x01, + D3DX_FT_LINEAR = 0x02, + D3DX_FT_DEFAULT = D3DX_DEFAULT +} D3DX_FILTERTYPE; + +/////////////////////////////////////////////////////////////////////////// +// Structures used below: +/////////////////////////////////////////////////////////////////////////// + +//------------------------------------------------------------------------- +// D3DX_VIDMODEDESC: Display mode description. +// ---------------- +// width: Screen Width +// height: Screen Height +// bpp: Bits per pixel +// refreshRate: Refresh rate +//------------------------------------------------------------------------- +typedef struct _D3DX_VIDMODEDESC +{ + DWORD width; + DWORD height; + DWORD bpp; + DWORD refreshRate; +} D3DX_VIDMODEDESC; + +//------------------------------------------------------------------------- +// D3DX_DEVICEDESC: Description of a device that can do 3D +// --------------- +// deviceIndex: Unique (DWORD) number for the device. +// hwLevel: Level of acceleration afforded. This is one of the +// predefined Device Indices, and exists in this +// structure for informational purposes only. More than +// one device on the system may have the same hwLevel. +// To refer to a particular device with the D3DX apis, +// use the value in the deviceIndex member instead. +// ddGuid: The ddraw GUID +// d3dDeviceGuid: Direct3D Device GUID +// ddDeviceID: DDraw's GetDeviceIdentifier GUID. This GUID is unique to +// a particular driver revision on a particular video card. +// driverDesc: String describing the driver +// monitor: Handle to the video monitor used by this device (multimon +// specific). Devices that use different monitors on a +// multimon system report different values in this field. +// Therefore, to test for a multimon system, an application +// should look for more than one different monitor handle in +// the list of D3DX devices. +// onPrimary: Indicates if this device is on the primary monitor +// (multimon specific). +//------------------------------------------------------------------------- +#define D3DX_DRIVERDESC_LENGTH 256 + +typedef struct _D3DX_DEVICEDESC +{ + DWORD deviceIndex; + DWORD hwLevel; + GUID ddGuid; + GUID d3dDeviceGuid; + GUID ddDeviceID; + char driverDesc[D3DX_DRIVERDESC_LENGTH]; + HMONITOR monitor; + BOOL onPrimary; +} D3DX_DEVICEDESC; + +/////////////////////////////////////////////////////////////////////////// +// APIs: +/////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +//------------------------------------------------------------------------- +// D3DXInitialize: The very first call a D3DX app must make. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXInitialize(); + +//------------------------------------------------------------------------- +// D3DXUninitialize: The very last call a D3DX app must make. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXUninitialize(); + +//------------------------------------------------------------------------- +// D3DXGetDeviceCount: Returns the maximum number of D3DXdevices +// ------------------ available. +// +// D3DXGetDeviceDescription: Lists the 2D and 3D capabilities of the devices. +// ------------------------ Also, the various guids needed by ddraw and d3d. +// +// Params: +// [in] DWORD deviceIndex: Which device? Starts at 0. +// [in] D3DX_DEVICEDESC* pd3dxDevice: Pointer to the D3DX_DEVICEDESC +// structure to be filled in. +//------------------------------------------------------------------------- +DWORD WINAPI + D3DXGetDeviceCount(); + +HRESULT WINAPI + D3DXGetDeviceDescription(DWORD deviceIndex, + D3DX_DEVICEDESC* pd3dxDeviceDesc); + +//------------------------------------------------------------------------- +// D3DXGetMaxNumVideoModes: Returns the maximum number of video-modes . +// ----------------------- +// +// Params: +// [in] DWORD deviceIndex: The device being referred to. +// [in] DWORD flags: If D3DX_GVM_REFRESHRATE is set, then the refresh +// rates are not ignored. +// +// D3DXGetVideoMode: Describes a particular video mode for this device +// ---------------- +// +// Note: These queries will simply give you a list of modes that the +// display adapter tells DirectX that it supports. +// There is no guarantee that D3DXCreateContext(Ex) will succeed +// with all listed video modes. This is a fundamental limitation +// of the current DirectX architecture which D3DX cannot hide in +// any clean way. +// +// Params: +// [in] DWORD deviceIndex: The device being referred to. +// [in] DWORD flags: If D3DX_GVM_REFRESHRATE is set, then the refresh +// rates are returned +// [in] DWORD which: Which VideoMode ? Starts at 0. +// [out] D3DX_VIDMODEDESC* pModeList: Pointer to the D3DX_VIDMODEDESC +// structure that will be filled in. +//------------------------------------------------------------------------- +DWORD WINAPI + D3DXGetMaxNumVideoModes(DWORD deviceIndex, + DWORD flags); + +HRESULT WINAPI + D3DXGetVideoMode(DWORD deviceIndex, + DWORD flags, + DWORD modeIndex, + D3DX_VIDMODEDESC* pModeDesc); + +#define D3DX_GVM_REFRESHRATE 0x00000001 +//------------------------------------------------------------------------- +// D3DXGetMaxSurfaceFormats: Returns the maximum number of surface +// ------------------------ formats supported by the device at that +// video mode. +// +// D3DXGetSurfaceFormat: Describes one of the supported surface formats. +// --------------------- +// +// Params: +// [in] DWORD deviceIndex: The device being referred to. +// [in] D3DX_VIDMODEDESC* pDesc: The display mode at which the supported +// surface formats are requested. If it is +// NULL, the current display mode is +// assumed. +// [in] DWORD surfClassFlags: Required surface classes. Only surface +// formats which support all specified +// surface classes will be returned. +// (Multiple surface classes may be specified +// using bitwise OR.) +// [in] DWORD which: Which surface formats to retrieve. Starts at 0. +// [out] D3DX_SURFACEFORMAT* pFormat: The surface format +//------------------------------------------------------------------------- +DWORD WINAPI + D3DXGetMaxSurfaceFormats(DWORD deviceIndex, + D3DX_VIDMODEDESC* pDesc, + DWORD surfClassFlags); +HRESULT WINAPI + D3DXGetSurfaceFormat(DWORD deviceIndex, + D3DX_VIDMODEDESC* pDesc, + DWORD surfClassFlags, + DWORD surfaceIndex, + D3DX_SURFACEFORMAT* pFormat); + + +//------------------------------------------------------------------------- +// D3DXGetCurrentVideoMode: Retrieves the current video mode for this device. +// ------------------- +// +// Params: +// [in] DWORD deviceIndex: The device being referred to. +// [out] D3DX_VIDMODEDESC* pVidMode: The current video mode +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXGetCurrentVideoMode(DWORD deviceIndex, + D3DX_VIDMODEDESC* pVidMode); + +//------------------------------------------------------------------------- +// D3DXGetDeviceCaps: Lists all the capabilities of a device at a display +// mode. +// ---------------- +// +// Params: +// [in] DWORD deviceIndex: The device being referred to. +// [in] D3DX_VIDMODEDESC* pDesc: If this is NULL, we will return the +// caps at the current display mode of +// the device. +// [out] D3DDEVICEDESC7* pD3DDeviceDesc7: D3D Caps ( NULL to ignore +// parameter) +// [out] DDCAPS7* pDDHalCaps: DDraw HAL Caps (NULL to ignore parameter) +// [out] DDCAPS7* pDDHelCaps: DDraw HEL Caps (NULL to ignore paramter) +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXGetDeviceCaps(DWORD deviceIndex, + D3DX_VIDMODEDESC* pVidMode, + D3DDEVICEDESC7* pD3DCaps, + DDCAPS* pDDHALCaps, + DDCAPS* pDDHELCaps); + +//------------------------------------------------------------------------- +// D3DXCreateContext: Initializes the chosen device. It is the simplest init +// ----------------- function available. Parameters are treated the same +// as the matching subset of parameters in +// D3DXCreateContextEx, documented below. +// Remaining D3DXCreateContextEx parameters that are +// not present in D3DXCreateContext are treated as +// D3DX_DEFAULT. Note that multimon is not supported +// with D3DXCreateContext. +// +// D3DXCreateContextEx: A more advanced function to initialize the device. +// ------------------- Also accepts D3DX_DEFAULT for most of the parameters +// and then will do what D3DXCreateContext did. +// +// Note: Do not expect D3DXCreateContext(Ex) to be fail-safe (as with any +// API). Supported device capablilites should be used as a guide +// for choosing parameter values. Keep in mind that there will +// inevitably be some combinations of parameters that just do not work. +// +// Params: +// [in] DWORD deviceIndex: The device being referred to. +// [in] DWORD flags: The valid flags are D3DX_CONTEXT_FULLSCREEN, and +// D3DX_CONTEXT_OFFSCREEN. These flags cannot both +// be specified. If no flags are specified, the +// context defaults to windowed mode. +// +// [in] HWND hwnd: Device window. See note. +// [in] HWND hwndFocus: Window which receives keyboard messages from +// the device window. The device window should be +// a child of focus window. Useful for multimon +// applications. See note. +// NOTE: +// windowed: +// hwnd must be a valid window. hwndFocus must be NULL or +// D3DX_DEFAULT. +// +// fullscreen: +// Either hwnd or hwndFocus must be a valid window. (Both cannot +// be NULL or D3DX_DEFAULT). If hwnd is NULL or D3DX_DEFAULT, +// a default device window will be created as a child of hwndFocus. +// +// offscreen: +// Both hwnd and hwndFocus must be NULL or D3DX_DEFAULT +// +// [in] DWORD numColorBits: If D3DX_DEFAULT is passed for windowed mode, +// the current desktop's color depth is chosen. +// For full screen mode, D3DX_DEFAULT causes 16 +// bit color to be used. +// [in] DWORD numAlphaBits: If D3DX_DEFAULT is passed, 0 is chosen. +// [in] DWORD numDepthbits: If D3DX_DEFAULT is passed, +// the highest available number of depth bits +// is chosen. See note. +// [in] DWORD numStencilBits: If D3DX_DEFAULT is passed, the highest +// available number of stencil bits is chosen. +// See note. +// +// NOTE: If both numDepthBits and numStencilBits are D3DX_DEFAULT, +// D3DX first picks the highest available number of stencil +// bits. Then, for the chosen number of stencil bits, +// the highest available number of depth bits is chosen. +// If only one of numStencilBits or numDepthBits +// is D3DX_DEFAULT, the highest number of bits available +// for this parameter is chosen out of only the formats +// that support the number of bits requested for the +// fixed parameter. +// +// [in] DWORD numBackBuffers: Number of back buffers, or D3DX_DEFAULT. +// See note. +// +// NOTE: +// windowed: D3DX_DEFAULT means 1. You must specify one back buffer. +// +// fullscreen: D3DX_DEFAULT means 1. Any number of back buffers can be +// specified. +// +// offscreen: D3DX_DEFAULT means 0. You cannot specify additional back +// buffers. +// +// [in] DWORD width: Width, in pixels, or D3DX_DEFAULT. See note. +// [in] DWORD height: Height, in pixels, or D3DX_DEFAULT. See note. +// +// NOTE: +// windowed: If either width or height is D3DX_DEFAULT, both values +// default to the dimensions of the client area of hwnd. +// +// fullscreen: If either width or height is D3DX_DEFAULT, width +// defaults to 640, and height defaults to 480. +// +// offscreen: An error is returned if either width or height is +// D3DX_DEFAULT. +// +// [in] DWORD refreshRate: D3DX_DEFAULT means we let ddraw choose for +// us. Ignored for windowed and offscreen modes. +// [out] LPD3DXCONTEXT* ppCtx: This is the Context object that is used for +// rendering on that device. +// +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateContext(DWORD deviceIndex, + DWORD flags, + HWND hwnd, + DWORD width, + DWORD height, + LPD3DXCONTEXT* ppCtx); + +HRESULT WINAPI + D3DXCreateContextEx(DWORD deviceIndex, + DWORD flags, + HWND hwnd, + HWND hwndFocus, + DWORD numColorBits, + DWORD numAlphaBits, + DWORD numDepthbits, + DWORD numStencilBits, + DWORD numBackBuffers, + DWORD width, + DWORD height, + DWORD refreshRate, + LPD3DXCONTEXT* ppCtx); + +// The D3DXCreateContext(Ex) flags are: +#define D3DX_CONTEXT_FULLSCREEN 0x00000001 +#define D3DX_CONTEXT_OFFSCREEN 0x00000002 + +//------------------------------------------------------------------------- +// D3DXGetErrorString: Prints out the error string given an hresult. Prints +// ------------------ Win32 as well as DX6 error messages besides the D3DX +// messages. +// +// Params: +// [in] HRESULT hr: The error code to be deciphered. +// [in] DWORD strLength: Length of the string passed in. +// [out] LPSTR pStr: The string output. This string of appropriate +// size needs to be passed in. +//------------------------------------------------------------------------- +void WINAPI + D3DXGetErrorString(HRESULT hr, + DWORD strLength, + LPSTR pStr); + +//------------------------------------------------------------------------- +// D3DXMakeDDPixelFormat: Fills in a DDPIXELFORMAT structure based on the +// --------------------- D3DX surface format requested. +// +// Params: +// [in] D3DX_SURFACEFORMAT d3dxFormat: Surface format. +// [out] DDPIXELFORMAT* pddpf: Pixel format matching the given +// surface format. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXMakeDDPixelFormat(D3DX_SURFACEFORMAT d3dxFormat, + DDPIXELFORMAT* pddpf); + +//------------------------------------------------------------------------- +// D3DXMakeSurfaceFormat: Determines the surface format corresponding to +// --------------------- a given DDPIXELFORMAT. +// +// Params: +// [in] DDPIXELFORMAT* pddpf: Pixel format. +// Return Value: +// D3DX_SURFACEFORMAT: Surface format matching the given pixel format. +// D3DX_SF_UNKNOWN if the format is not supported +//------------------------------------------------------------------------- +D3DX_SURFACEFORMAT WINAPI + D3DXMakeSurfaceFormat(DDPIXELFORMAT* pddpf); + +#ifdef __cplusplus +} +#endif //__cplusplus + +/////////////////////////////////////////////////////////////////////////// +// Interfaces: +/////////////////////////////////////////////////////////////////////////// + +//------------------------------------------------------------------------- +// ID3DXContext interface: +// +// This encapsulates all the stuff that the app might +// want to do at initialization time and any global control over d3d and +// ddraw. +//------------------------------------------------------------------------- + + +DECLARE_INTERFACE_(ID3DXContext, IUnknown) +{ + // + // IUnknown methods + // + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + // Get the DDraw and Direct3D objects to call DirectDraw or + // Direct3D Immediate Mode functions. + // If the objects don't exist (because they have not + // been created for some reason) NULL is returned. + // All the objects returned in the following Get* functions + // are addref'ed. It is the application's responsibility to + // release them when no longer needed. + STDMETHOD_(LPDIRECTDRAW7,GetDD)(THIS) PURE; + STDMETHOD_(LPDIRECT3D7,GetD3D)(THIS) PURE; + STDMETHOD_(LPDIRECT3DDEVICE7,GetD3DDevice)(THIS) PURE; + + // Get the various buffers that get created at the init time + // These are addref'ed as well. It is the application's responsibility + // to release them before the app quits or when it needs a resize. + STDMETHOD_(LPDIRECTDRAWSURFACE7,GetPrimary)(THIS) PURE; + STDMETHOD_(LPDIRECTDRAWSURFACE7,GetZBuffer)(THIS) PURE; + STDMETHOD_(LPDIRECTDRAWSURFACE7,GetBackBuffer)(THIS_ DWORD which) PURE; + + // Get the associated window handles + STDMETHOD_(HWND,GetWindow)(THIS) PURE; + STDMETHOD_(HWND,GetFocusWindow)(THIS) PURE; + + // + // Various Get methods, in case the user had specified default + // parameters + // + STDMETHOD(GetDeviceIndex)(THIS_ + LPDWORD pDeviceIndex, + LPDWORD pHwLevel) PURE; + + STDMETHOD_(DWORD, GetNumBackBuffers)(THIS) PURE; + + STDMETHOD(GetNumBits)(THIS_ + LPDWORD pColorBits, + LPDWORD pDepthBits, + LPDWORD pAlphaBits, + LPDWORD pStencilBits) PURE; + + STDMETHOD(GetBufferSize)(THIS_ + LPDWORD pWidth, + LPDWORD pHeight) PURE; + + // Get the flags that were used to create this context + STDMETHOD_(DWORD, GetCreationFlags)(THIS) PURE; + STDMETHOD_(DWORD, GetRefreshRate)(THIS) PURE; + + // Restoring surfaces in case stuff is lost + STDMETHOD(RestoreSurfaces)(THIS) PURE; + + // Resize all the buffers to the new width and height + STDMETHOD(Resize)(THIS_ DWORD width, DWORD height) PURE; + + // Update the frame using a flip or a blit, + // If the D3DX_UPDATE_NOVSYNC flag is set, blit is used if the + // driver cannot flip without waiting for vsync in full-screen mode. + STDMETHOD(UpdateFrame)(THIS_ DWORD flags) PURE; + + // Render a string at the specified coordinates, with the specified + // colour. This is only provided as a convenience for + // debugging/information during development. + // topLeftX and topLeftY represent the location of the top left corner + // of the string, on the render target. + // The coordinate and color parameters each have a range of 0.0-1.0 + STDMETHOD(DrawDebugText)(THIS_ + float topLeftX, + float topLeftY, + D3DCOLOR color, + LPSTR pString) PURE; + + // Clears to the current viewport + // The following are the valid flags: + // D3DCLEAR_TARGET (to clear the render target ) + // D3DCLEAR_ZBUFFER (to clear the depth-buffer ) + // D3DCLEAR_STENCIL (to clear the stencil-buffer ) + STDMETHOD(Clear)(THIS_ DWORD ClearFlags) PURE; + + STDMETHOD(SetClearColor)(THIS_ D3DCOLOR color ) PURE; + STDMETHOD(SetClearDepth)(THIS_ float z) PURE; + STDMETHOD(SetClearStencil)(THIS_ DWORD stencil) PURE; +}; + + +//------------------------------------------------------------------------- +// Flags for Update member function: +// + +// Flag to indicate that blit should be used instead of a flip +// for full-screen rendering. +#define D3DX_UPDATE_NOVSYNC (1<<0) + +/////////////////////////////////////////////////////////////////////////// +// Texturing APIs: +/////////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + +//------------------------------------------------------------------------- +// D3DXCheckTextureRequirements: Return information about texture creation +// ---------------------------- (used by CreateTexture, CreateTextureFromFile +// and CreateCubeMapTexture) +// +// Parameters: +// +// pd3dDevice +// The D3D device with which the texture is going to be used. +// pFlags +// allows specification of D3DX_TEXTURE_NOMIPMAP +// D3DX_TEXTURE_NOMIPMAP may be returned in the case where mipmap creation +// is not supported. +// pWidth +// width in pixels or NULL +// returns corrected width +// pHeight +// height in pixels or NULL +// returns corrected height +// pPixelFormat +// surface format +// returns best match to input format +// +// Notes: 1. Unless the flags is set to specifically prevent creating +// mipmaps, mipmaps are generated all the way till 1x1 surface. +// 2. width, height and pixelformat are altered based on available +// hardware. For example: +// a. Texture dimensions may be required to be powers of 2 +// b. We may require width == height for some devices +// c. If PixelFormat is unavailable, a best fit is made +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCheckTextureRequirements( LPDIRECT3DDEVICE7 pd3dDevice, + LPDWORD pFlags, + LPDWORD pWidth, + LPDWORD pHeight, + D3DX_SURFACEFORMAT* pPixelFormat); + +//------------------------------------------------------------------------- +// D3DXCreateTexture: Create an empty texture object +// ----------------- +// +// Parameters: +// +// pd3dDevice +// The D3D device with which the texture is going to be used. +// pFlags +// allows specification of D3DX_TEXTURE_NOMIPMAP +// D3DX_TEXTURE_NOMIPMAP may be returned in the case where mipmap creation +// is not supported. Additionally, D3DX_TEXTURE_STAGE can be specified +// to indicate which texture stage the texture is for e.g. +// D3D_TEXTURE_STAGE1 indicates that the texture is for use with texture +// stage one. Stage Zero is the default if no TEXTURE_STAGE flags are +// set. +// pWidth +// width in pixels; 0 or NULL is unacceptable +// returns corrected width +// pHeight +// height in pixels; 0 or NULL is unacceptable +// returns corrected height +// pPixelFormat +// surface format. D3DX_DEFAULT is unacceptable. +// returns actual format that was used +// pDDPal +// DDraw palette that is set (if present) on paletted surfaces. +// It is ignored even if it is set, for non-paletted surfaces. +// ppDDSurf +// The ddraw surface that will be created +// pNumMipMaps +// the number of mipmaps actually generated +// +// Notes: See notes for D3DXCheckTextureRequirements. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateTexture( LPDIRECT3DDEVICE7 pd3dDevice, + LPDWORD pFlags, + LPDWORD pWidth, + LPDWORD pHeight, + D3DX_SURFACEFORMAT* pPixelFormat, + LPDIRECTDRAWPALETTE pDDPal, + LPDIRECTDRAWSURFACE7* ppDDSurf, + LPDWORD pNumMipMaps); + +//------------------------------------------------------------------------- +// D3DXCreateCubeMapTexture: Create blank cube-map texture +// ------------------------ +// +// Parameters: +// +// pd3dDevice +// The D3D device with which the texture is going to be used. +// pFlags +// allows specification of D3DX_TEXTURE_NOMIPMAP +// D3DX_TEXTURE_NOMIPMAP may be returned in the case where mipmap creation +// is not supported. Additionally, D3DX_TEXTURE_STAGE can be specified +// to indicate which texture stage the texture is for e.g. +// D3D_TEXTURE_STAGE1 indicates that the texture is for use with texture +// stage one. Stage Zero is the default if no TEXTURE_STAGE flags are +// set. +// cubefaces +// allows specification of which faces of the cube-map to generate. +// D3DX_DEFAULT, 0, and DDSCAPS2_CUBEMAP_ALLFACES all mean +// "create all 6 faces of the cubemap". Any combination of +// DDSCAPS2_CUBEMAP_POSITIVEX, DDSCAPS2_CUBEMAP_NEGATIVEX, +// DDSCAPS2_CUBEMAP_POSITIVEY, DDSCAPS2_CUBEMAP_NEGATIVEY, +// DDSCAPS2_CUBEMAP_POSITIVEZ, or DDSCAPS2_CUBEMAP_NEGATIVEZ, is +// valid. +// colorEmptyFaces +// allows specification of the color to use for the faces that were not +// specified in the cubefaces parameter. +// pWidth +// width in pixels; 0 or NULL is unacceptable +// returns corrected width +// pHeight +// height in pixels; 0 or NULL is unacceptable +// returns corrected height +// pPixelFormat +// surface format. D3DX_DEFAULT is unacceptable. +// returns actual format that was used +// pDDPal +// DDraw palette that is set (if present) on paletted surfaces. +// It is ignored even if it is set, for non-paletted surfaces. +// ppDDSurf +// the ddraw surface that will be created +// pNumMipMaps +// the number of mipmaps generated for a particular face of the +// cubemap. +// +// Notes: See notes for D3DXCheckTextureRequirements. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateCubeMapTexture( LPDIRECT3DDEVICE7 pd3dDevice, + LPDWORD pFlags, + DWORD cubefaces, + D3DCOLOR colorEmptyFaces, + LPDWORD pWidth, + LPDWORD pHeight, + D3DX_SURFACEFORMAT *pPixelFormat, + LPDIRECTDRAWPALETTE pDDPal, + LPDIRECTDRAWSURFACE7* ppDDSurf, + LPDWORD pNumMipMaps); + + +//------------------------------------------------------------------------- +// D3DXCreateTextureFromFile: Create a texture object from a file or from the +// ------------------------- resource. Only BMP and DIB are supported from the +// resource portion of the executable. +// +// Parameters: +// +// pd3dDevice +// The D3D device with which the texture is going to be used. +// pFlags +// allows specification of D3DX_TEXTURE_NOMIPMAP +// D3DX_TEXTURE_NOMIPMAP may be returned in the case where mipmap creation +// is not supported. Additionally, D3DX_TEXTURE_STAGE can be specified +// to indicate which texture stage the texture is for e.g. +// D3D_TEXTURE_STAGE1 indicates that the texture is for use with texture +// stage one. Stage Zero is the default if no TEXTURE_STAGE flags are +// set. +// pWidth +// Width in pixels. If 0 or D3DX_DEFAULT, the width will be taken +// from the file +// returns corrected width +// pHeight +// Height in pixels. If 0 or D3DX_DEFAULT, the height will be taken +// from the file +// returns corrected height +// pPixelFormat +// If D3DX_SF_UNKNOWN is passed in, pixel format closest to the bitmap +// will be chosen +// returns actual format that was used +// pDDPal +// DDraw palette that is set (if present) on paletted surfaces. +// It is ignored even if it is set, for non-paletted surfaces. +// ppDDSurf +// The ddraw surface that will be created. +// pNumMipMaps +// The number of mipmaps generated. +// pSrcName +// File name. BMP, DIB, DDS, are supported. +// +// TGA is supported for the following cases: 16, 24, 32bpp direct color and 8bpp palettized. +// Also, 8, 16bpp grayscale is supported. RLE versions of the above +// TGA formats are also supported. ColorKey and Premultiplied Alpha +// are not currently supported for TGA files. +// returns created format +// +// Notes: See notes for D3DXCheckTextureRequirements. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateTextureFromFile( LPDIRECT3DDEVICE7 pd3dDevice, + LPDWORD pFlags, + LPDWORD pWidth, + LPDWORD pHeight, + D3DX_SURFACEFORMAT* pPixelFormat, + LPDIRECTDRAWPALETTE pDDPal, + LPDIRECTDRAWSURFACE7* ppDDSurf, + LPDWORD pNumMipMaps, + LPSTR pSrcName, + D3DX_FILTERTYPE filterType); + +//------------------------------------------------------------------------- +// D3DXLoadTextureFromFile: Load from a file into a mipmap level. Doing the +// ----------------------- necessary color conversion and rescaling. File +// format support is identical to +// D3DXCreateTextureFromFile's. +// +// pd3dDevice +// The D3D device with which the texture is going to be used. +// pTexture +// a pointer to a DD7Surface which was created with either +// CreateTextureFromFile or CreateTexture. +// mipMapLevel +// indicates mipmap level +// Note: +// 1. Error if mipmap level doesn't exist +// 2. If D3DX_DEFAULT and equal number of mipmap levels exist +// then all the source mip-levels are loaded +// 3. If the source has mipmaps and the dest doesn't, use the top one +// 4. If the dest has miplevels and source doesn't, we expand +// 5. If there are unequal numbers of miplevels, we expand +// pSrcName +// File name. BMP, DIB, DDS, are supported. +// For details on TGA support, refer to the comments for +// D3DXCreateTextureFromFile +// pSrcRect +// the source rectangle or null (whole surface) +// pDestRect +// the destination rectangle or null (whole surface) +// filterType +// filter used for mipmap generation +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXLoadTextureFromFile( LPDIRECT3DDEVICE7 pd3dDevice, + LPDIRECTDRAWSURFACE7 pTexture, + DWORD mipMapLevel, + LPSTR pSrcName, + RECT* pSrcRect, + RECT* pDestRect, + D3DX_FILTERTYPE filterType); + +//------------------------------------------------------------------------- +// D3DXLoadTextureFromSurface: Load from a DDraw Surface into a mipmap level. +// -------------------------- Doing the necessary color conversion. +// +// pd3dDevice +// The D3D device with which the texture is going to be used. +// pTexture +// a pointer to a DD7Surface which was created with either +// CreateTextureFromFile or CreateTexture. +// mipMapLevel +// indicates mipmap level +// Note: +// 1. Error if mipmap level doesn't exist +// 2. If D3DX_DEFAULT and equal number of mipmap levels exist +// then all the source mip-levels are loaded +// 3. If the source has mipmaps and the dest doesn't, use the top one +// 4. If the dest has miplevels and source doesn't, we expand +// 5. If there are unequal numbers of miplevels, we expand +// pSurfaceSrc +// the source surface +// pSrcRect +// the source rectangle or null (whole surface) +// pDestRect +// the destination rectangle or null (whole surface) +// filterType +// filter used for mipmap generation +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXLoadTextureFromSurface( LPDIRECT3DDEVICE7 pd3dDevice, + LPDIRECTDRAWSURFACE7 pTexture, + DWORD mipMapLevel, + LPDIRECTDRAWSURFACE7 pSurfaceSrc, + RECT* pSrcRect, + RECT* pDestRect, + D3DX_FILTERTYPE filterType); + +//------------------------------------------------------------------------- +// D3DXLoadTextureFromMemory: Load a mip level from memory. Doing the necessary +// ------------------------- color conversion. +// +// pd3dDevice +// The D3D device with which the texture is going to be used. +// pTexture +// a pointer to a DD7Surface which was created with either +// CreateTextureFromFile or CreateTexture. +// mipMapLevel +// indicates mipmap level +// Note: +// 1. Error if mipmap level doesn't exist +// 2. If D3DX_DEFAULT and equal number of mipmap levels exist +// then all the source mip-levels are loaded +// 3. If the source has mipmaps and the dest doesn't, use the top one +// 4. If the dest has miplevels and source doesn't, we expand +// 5. If there are unequal numbers of miplevels, we expand +// pMemory +// pointer to source memory from which the texture will be loaded +// pDDPal +// DirectDraw Palette, that the app passes in optionally if the memory is +// supposed to be paletteized. +// srcPixelFormat +// PixelFormat of the source. +// srcPitch +// The pitch of the memory or D3DX_DEFAULT (based on srcPixelFormat) +// pDestRect +// The destination rectangle or null (whole surface) +// filterType +// filter used for mipmap generation +// +// Assumptions: The source (memory) is loaded in full +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXLoadTextureFromMemory( LPDIRECT3DDEVICE7 pd3dDevice, + LPDIRECTDRAWSURFACE7 pTexture, + DWORD mipMapLevel, + LPVOID pMemory, + LPDIRECTDRAWPALETTE pDDPal, + D3DX_SURFACEFORMAT srcPixelFormat, + DWORD srcPitch, + RECT* pDestRect, + D3DX_FILTERTYPE filterType); + +#ifdef __cplusplus +} +#endif //__cplusplus + +//------------------------------------------------------------------------- +// Flags for texture create functions; applies to +// D3DXCreateTexture, D3DXCreateCubeMapTexture and D3DXCreateTextureFromFile. +// + +// Flag to indicate that mipmap generation is not desired. +#define D3DX_TEXTURE_NOMIPMAP (1 << 8) + +// Flags to indicate which texture stage the texture is +// intended for use with. Specifying the stage is necessary at +// texture creation time for HW devices that expose the +// D3DDEVCAPS_SEPARATETEXTUREMEMORIES bit in their D3DDEVICEDESC +// structure. +#define D3DX_TEXTURE_STAGE0 (0) +#define D3DX_TEXTURE_STAGE1 (1) +#define D3DX_TEXTURE_STAGE2 (2) +#define D3DX_TEXTURE_STAGE3 (3) +#define D3DX_TEXTURE_STAGE4 (4) +#define D3DX_TEXTURE_STAGE5 (5) +#define D3DX_TEXTURE_STAGE6 (6) +#define D3DX_TEXTURE_STAGE7 (7) + +// Mask to extract the texture stage value out of the flags to +// the texture create functions. +#define D3DX_TEXTURE_STAGE_MASK (0x7) + +#endif //__D3DXCORE_H__ diff --git a/windows_libs/mssdk/include/d3dxerr.h b/windows_libs/mssdk/include/d3dxerr.h new file mode 100644 index 00000000..f1b4b659 --- /dev/null +++ b/windows_libs/mssdk/include/d3dxerr.h @@ -0,0 +1,407 @@ +//---------------------------------------------------------------------- +// +// d3dxerr.h -- 0xC code definitions for the D3DX API +// +// Copyright (c) 1991-1999, Microsoft Corp. All rights reserved. +// +//---------------------------------------------------------------------- +#ifndef __D3DXERR_H__ +#define __D3DXERR_H__ + +// +// +// Values are 32 bit values layed out as follows: +// +// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 +// +---+-+-+-----------------------+-------------------------------+ +// |Sev|C|R| Facility | Code | +// +---+-+-+-----------------------+-------------------------------+ +// +// where +// +// Sev - is the severity code +// +// 00 - Success +// 01 - Informational +// 10 - Warning +// 11 - Error +// +// C - is the Customer code flag +// +// R - is a reserved bit +// +// Facility - is the facility code +// +// Code - is the facility's status code +// +// +// Define the facility codes +// +#define FACILITY_D3DX 0x877 + + + +// +// MessageId: D3DXERR_NOMEMORY +// +// MessageText: +// +// Out of memory. +// +#define D3DXERR_NOMEMORY ((HRESULT)0xC8770BB8L) + + +// +// MessageId: D3DXERR_NULLPOINTER +// +// MessageText: +// +// A NULL pointer was passed as a parameter. +// +#define D3DXERR_NULLPOINTER ((HRESULT)0xC8770BB9L) + + +// +// MessageId: D3DXERR_INVALIDD3DXDEVICEINDEX +// +// MessageText: +// +// The Device Index passed in is invalid. +// +#define D3DXERR_INVALIDD3DXDEVICEINDEX ((HRESULT)0xC8770BBAL) + + +// +// MessageId: D3DXERR_NODIRECTDRAWAVAILABLE +// +// MessageText: +// +// DirectDraw has not been created. +// +#define D3DXERR_NODIRECTDRAWAVAILABLE ((HRESULT)0xC8770BBBL) + + +// +// MessageId: D3DXERR_NODIRECT3DAVAILABLE +// +// MessageText: +// +// Direct3D has not been created. +// +#define D3DXERR_NODIRECT3DAVAILABLE ((HRESULT)0xC8770BBCL) + + +// +// MessageId: D3DXERR_NODIRECT3DDEVICEAVAILABLE +// +// MessageText: +// +// Direct3D device has not been created. +// +#define D3DXERR_NODIRECT3DDEVICEAVAILABLE ((HRESULT)0xC8770BBDL) + + +// +// MessageId: D3DXERR_NOPRIMARYAVAILABLE +// +// MessageText: +// +// Primary surface has not been created. +// +#define D3DXERR_NOPRIMARYAVAILABLE ((HRESULT)0xC8770BBEL) + + +// +// MessageId: D3DXERR_NOZBUFFERAVAILABLE +// +// MessageText: +// +// Z buffer has not been created. +// +#define D3DXERR_NOZBUFFERAVAILABLE ((HRESULT)0xC8770BBFL) + + +// +// MessageId: D3DXERR_NOBACKBUFFERAVAILABLE +// +// MessageText: +// +// Backbuffer has not been created. +// +#define D3DXERR_NOBACKBUFFERAVAILABLE ((HRESULT)0xC8770BC0L) + + +// +// MessageId: D3DXERR_COULDNTUPDATECAPS +// +// MessageText: +// +// Failed to update caps database after changing display mode. +// +#define D3DXERR_COULDNTUPDATECAPS ((HRESULT)0xC8770BC1L) + + +// +// MessageId: D3DXERR_NOZBUFFER +// +// MessageText: +// +// Could not create Z buffer. +// +#define D3DXERR_NOZBUFFER ((HRESULT)0xC8770BC2L) + + +// +// MessageId: D3DXERR_INVALIDMODE +// +// MessageText: +// +// Display mode is not valid. +// +#define D3DXERR_INVALIDMODE ((HRESULT)0xC8770BC3L) + + +// +// MessageId: D3DXERR_INVALIDPARAMETER +// +// MessageText: +// +// One or more of the parameters passed is invalid. +// +#define D3DXERR_INVALIDPARAMETER ((HRESULT)0xC8770BC4L) + + +// +// MessageId: D3DXERR_INITFAILED +// +// MessageText: +// +// D3DX failed to initialize itself. +// +#define D3DXERR_INITFAILED ((HRESULT)0xC8770BC5L) + + +// +// MessageId: D3DXERR_STARTUPFAILED +// +// MessageText: +// +// D3DX failed to start up. +// +#define D3DXERR_STARTUPFAILED ((HRESULT)0xC8770BC6L) + + +// +// MessageId: D3DXERR_D3DXNOTSTARTEDYET +// +// MessageText: +// +// D3DXInitialize() must be called first. +// +#define D3DXERR_D3DXNOTSTARTEDYET ((HRESULT)0xC8770BC7L) + + +// +// MessageId: D3DXERR_NOTINITIALIZED +// +// MessageText: +// +// D3DX is not initialized yet. +// +#define D3DXERR_NOTINITIALIZED ((HRESULT)0xC8770BC8L) + + +// +// MessageId: D3DXERR_FAILEDDRAWTEXT +// +// MessageText: +// +// Failed to render text to the surface. +// +#define D3DXERR_FAILEDDRAWTEXT ((HRESULT)0xC8770BC9L) + + +// +// MessageId: D3DXERR_BADD3DXCONTEXT +// +// MessageText: +// +// Bad D3DX context. +// +#define D3DXERR_BADD3DXCONTEXT ((HRESULT)0xC8770BCAL) + + +// +// MessageId: D3DXERR_CAPSNOTSUPPORTED +// +// MessageText: +// +// The requested device capabilities are not supported. +// +#define D3DXERR_CAPSNOTSUPPORTED ((HRESULT)0xC8770BCBL) + + +// +// MessageId: D3DXERR_UNSUPPORTEDFILEFORMAT +// +// MessageText: +// +// The image file format is unrecognized. +// +#define D3DXERR_UNSUPPORTEDFILEFORMAT ((HRESULT)0xC8770BCCL) + + +// +// MessageId: D3DXERR_IFLERROR +// +// MessageText: +// +// The image file loading library error. +// +#define D3DXERR_IFLERROR ((HRESULT)0xC8770BCDL) + + +// +// MessageId: D3DXERR_FAILEDGETCAPS +// +// MessageText: +// +// Could not obtain device caps. +// +#define D3DXERR_FAILEDGETCAPS ((HRESULT)0xC8770BCEL) + + +// +// MessageId: D3DXERR_CANNOTRESIZEFULLSCREEN +// +// MessageText: +// +// Resize does not work for full-screen. +// +#define D3DXERR_CANNOTRESIZEFULLSCREEN ((HRESULT)0xC8770BCFL) + + +// +// MessageId: D3DXERR_CANNOTRESIZENONWINDOWED +// +// MessageText: +// +// Resize does not work for non-windowed contexts. +// +#define D3DXERR_CANNOTRESIZENONWINDOWED ((HRESULT)0xC8770BD0L) + + +// +// MessageId: D3DXERR_FRONTBUFFERALREADYEXISTS +// +// MessageText: +// +// Front buffer already exists. +// +#define D3DXERR_FRONTBUFFERALREADYEXISTS ((HRESULT)0xC8770BD1L) + + +// +// MessageId: D3DXERR_FULLSCREENPRIMARYEXISTS +// +// MessageText: +// +// The app is using the primary in full-screen mode. +// +#define D3DXERR_FULLSCREENPRIMARYEXISTS ((HRESULT)0xC8770BD2L) + + +// +// MessageId: D3DXERR_GETDCFAILED +// +// MessageText: +// +// Could not get device context. +// +#define D3DXERR_GETDCFAILED ((HRESULT)0xC8770BD3L) + + +// +// MessageId: D3DXERR_BITBLTFAILED +// +// MessageText: +// +// Could not bitBlt. +// +#define D3DXERR_BITBLTFAILED ((HRESULT)0xC8770BD4L) + + +// +// MessageId: D3DXERR_NOTEXTURE +// +// MessageText: +// +// There is no surface backing up this texture. +// +#define D3DXERR_NOTEXTURE ((HRESULT)0xC8770BD5L) + + +// +// MessageId: D3DXERR_MIPLEVELABSENT +// +// MessageText: +// +// There is no such miplevel for this surface. +// +#define D3DXERR_MIPLEVELABSENT ((HRESULT)0xC8770BD6L) + + +// +// MessageId: D3DXERR_SURFACENOTPALETTED +// +// MessageText: +// +// The surface is not paletted. +// +#define D3DXERR_SURFACENOTPALETTED ((HRESULT)0xC8770BD7L) + + +// +// MessageId: D3DXERR_ENUMFORMATSFAILED +// +// MessageText: +// +// An error occured while enumerating surface formats. +// +#define D3DXERR_ENUMFORMATSFAILED ((HRESULT)0xC8770BD8L) + + +// +// MessageId: D3DXERR_COLORDEPTHTOOLOW +// +// MessageText: +// +// D3DX only supports color depths of 16 bit or greater. +// +#define D3DXERR_COLORDEPTHTOOLOW ((HRESULT)0xC8770BD9L) + + +// +// MessageId: D3DXERR_INVALIDFILEFORMAT +// +// MessageText: +// +// The file format is invalid. +// +#define D3DXERR_INVALIDFILEFORMAT ((HRESULT)0xC8770BDAL) + + +// +// MessageId: D3DXERR_NOMATCHFOUND +// +// MessageText: +// +// No suitable match found. +// +#define D3DXERR_NOMATCHFOUND ((HRESULT)0xC8770BDBL) + + + +#endif //__D3DXERR_H__ + diff --git a/windows_libs/mssdk/include/d3dxmath.h b/windows_libs/mssdk/include/d3dxmath.h new file mode 100644 index 00000000..7a2bd010 --- /dev/null +++ b/windows_libs/mssdk/include/d3dxmath.h @@ -0,0 +1,1085 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 1998 Microsoft Corporation. All Rights Reserved. +// +// File: d3dxmath.h +// Content: D3DX math types and functions +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef __D3DXMATH_H__ +#define __D3DXMATH_H__ + +#include +#include +#include +#include "d3dxerr.h" + +#ifndef D3DXINLINE +#ifdef __cplusplus +#define D3DXINLINE inline +#else +#define D3DXINLINE _inline +#endif +#endif + +#pragma warning(disable:4201) // anonymous unions warning + + + +typedef struct ID3DXMatrixStack *LPD3DXMATRIXSTACK; + +// {E3357330-CC5E-11d2-A434-00A0C90629A8} +DEFINE_GUID( IID_ID3DXMatrixStack, + 0xe3357330, 0xcc5e, 0x11d2, 0xa4, 0x34, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8); + + +//=========================================================================== +// +// General purpose utilities +// +//=========================================================================== +#define D3DX_PI ((float) 3.141592654f) +#define D3DX_1BYPI ((float) 0.318309886f) + +#define D3DXToRadian( degree ) ((degree) * (D3DX_PI / 180.0f)) +#define D3DXToDegree( radian ) ((radian) * (180.0f / D3DX_PI)) + + + +//=========================================================================== +// +// Vectors +// +//=========================================================================== + +//-------------------------- +// 2D Vector +//-------------------------- +typedef struct D3DXVECTOR2 +{ +#ifdef __cplusplus +public: + D3DXVECTOR2() {}; + D3DXVECTOR2( const float * ); + D3DXVECTOR2( float x, float y ); + + // casting + operator float* (); + operator const float* () const; + + // assignment operators + D3DXVECTOR2& operator += ( const D3DXVECTOR2& ); + D3DXVECTOR2& operator -= ( const D3DXVECTOR2& ); + D3DXVECTOR2& operator *= ( float ); + D3DXVECTOR2& operator /= ( float ); + + // unary operators + D3DXVECTOR2 operator + () const; + D3DXVECTOR2 operator - () const; + + // binary operators + D3DXVECTOR2 operator + ( const D3DXVECTOR2& ) const; + D3DXVECTOR2 operator - ( const D3DXVECTOR2& ) const; + D3DXVECTOR2 operator * ( float ) const; + D3DXVECTOR2 operator / ( float ) const; + + friend D3DXVECTOR2 operator * ( float, const D3DXVECTOR2& ); + + BOOL operator == ( const D3DXVECTOR2& ) const; + BOOL operator != ( const D3DXVECTOR2& ) const; + + +public: +#endif //__cplusplus + float x, y; +} D3DXVECTOR2, *LPD3DXVECTOR2; + + +//-------------------------- +// 3D Vector +//-------------------------- +typedef struct D3DXVECTOR3 +{ +#ifdef __cplusplus +public: + D3DXVECTOR3() {}; + D3DXVECTOR3( const float * ); + D3DXVECTOR3( const D3DVECTOR& ); + D3DXVECTOR3( float x, float y, float z ); + + // casting + operator float* (); + operator const float* () const; + + operator D3DVECTOR* (); + operator const D3DVECTOR* () const; + + operator D3DVECTOR& (); + operator const D3DVECTOR& () const; + + // assignment operators + D3DXVECTOR3& operator += ( const D3DXVECTOR3& ); + D3DXVECTOR3& operator -= ( const D3DXVECTOR3& ); + D3DXVECTOR3& operator *= ( float ); + D3DXVECTOR3& operator /= ( float ); + + // unary operators + D3DXVECTOR3 operator + () const; + D3DXVECTOR3 operator - () const; + + // binary operators + D3DXVECTOR3 operator + ( const D3DXVECTOR3& ) const; + D3DXVECTOR3 operator - ( const D3DXVECTOR3& ) const; + D3DXVECTOR3 operator * ( float ) const; + D3DXVECTOR3 operator / ( float ) const; + + friend D3DXVECTOR3 operator * ( float, const struct D3DXVECTOR3& ); + + BOOL operator == ( const D3DXVECTOR3& ) const; + BOOL operator != ( const D3DXVECTOR3& ) const; + +public: +#endif //__cplusplus + float x, y, z; +} D3DXVECTOR3, *LPD3DXVECTOR3; + + +//-------------------------- +// 4D Vector +//-------------------------- +typedef struct D3DXVECTOR4 +{ +#ifdef __cplusplus +public: + D3DXVECTOR4() {}; + D3DXVECTOR4( const float* ); + D3DXVECTOR4( float x, float y, float z, float w ); + + // casting + operator float* (); + operator const float* () const; + + // assignment operators + D3DXVECTOR4& operator += ( const D3DXVECTOR4& ); + D3DXVECTOR4& operator -= ( const D3DXVECTOR4& ); + D3DXVECTOR4& operator *= ( float ); + D3DXVECTOR4& operator /= ( float ); + + // unary operators + D3DXVECTOR4 operator + () const; + D3DXVECTOR4 operator - () const; + + // binary operators + D3DXVECTOR4 operator + ( const D3DXVECTOR4& ) const; + D3DXVECTOR4 operator - ( const D3DXVECTOR4& ) const; + D3DXVECTOR4 operator * ( float ) const; + D3DXVECTOR4 operator / ( float ) const; + + friend D3DXVECTOR4 operator * ( float, const D3DXVECTOR4& ); + + BOOL operator == ( const D3DXVECTOR4& ) const; + BOOL operator != ( const D3DXVECTOR4& ) const; + +public: +#endif //__cplusplus + float x, y, z, w; +} D3DXVECTOR4, *LPD3DXVECTOR4; + + +//=========================================================================== +// +// Matrices +// +//=========================================================================== +typedef struct D3DXMATRIX +{ +#ifdef __cplusplus +public: + D3DXMATRIX() {}; + D3DXMATRIX( const float * ); + D3DXMATRIX( const D3DMATRIX& ); + D3DXMATRIX( float m00, float m01, float m02, float m03, + float m10, float m11, float m12, float m13, + float m20, float m21, float m22, float m23, + float m30, float m31, float m32, float m33 ); + + + // access grants + float& operator () ( UINT iRow, UINT iCol ); + float operator () ( UINT iRow, UINT iCol ) const; + + // casting operators + operator float* (); + operator const float* () const; + + operator D3DMATRIX* (); + operator const D3DMATRIX* () const; + + operator D3DMATRIX& (); + operator const D3DMATRIX& () const; + + // assignment operators + D3DXMATRIX& operator *= ( const D3DXMATRIX& ); + D3DXMATRIX& operator += ( const D3DXMATRIX& ); + D3DXMATRIX& operator -= ( const D3DXMATRIX& ); + D3DXMATRIX& operator *= ( float ); + D3DXMATRIX& operator /= ( float ); + + // unary operators + D3DXMATRIX operator + () const; + D3DXMATRIX operator - () const; + + // binary operators + D3DXMATRIX operator * ( const D3DXMATRIX& ) const; + D3DXMATRIX operator + ( const D3DXMATRIX& ) const; + D3DXMATRIX operator - ( const D3DXMATRIX& ) const; + D3DXMATRIX operator * ( float ) const; + D3DXMATRIX operator / ( float ) const; + + friend D3DXMATRIX operator * ( float, const D3DXMATRIX& ); + + BOOL operator == ( const D3DXMATRIX& ) const; + BOOL operator != ( const D3DXMATRIX& ) const; + + +#endif //__cplusplus + + union + { + float m[4][4]; +#ifdef __cplusplus + struct + { + float m00, m01, m02, m03; + float m10, m11, m12, m13; + float m20, m21, m22, m23; + float m30, m31, m32, m33; + }; +#endif //__cplusplus + }; +} D3DXMATRIX, *LPD3DXMATRIX; + + +//=========================================================================== +// +// Quaternions +// +//=========================================================================== +typedef struct D3DXQUATERNION +{ +#ifdef __cplusplus +public: + D3DXQUATERNION() {} + D3DXQUATERNION( const float * ); + D3DXQUATERNION( float x, float y, float z, float w ); + + // casting + operator float* (); + operator const float* () const; + + // assignment operators + D3DXQUATERNION& operator += ( const D3DXQUATERNION& ); + D3DXQUATERNION& operator -= ( const D3DXQUATERNION& ); + D3DXQUATERNION& operator *= ( const D3DXQUATERNION& ); + D3DXQUATERNION& operator *= ( float ); + D3DXQUATERNION& operator /= ( float ); + + // unary operators + D3DXQUATERNION operator + () const; + D3DXQUATERNION operator - () const; + + // binary operators + D3DXQUATERNION operator + ( const D3DXQUATERNION& ) const; + D3DXQUATERNION operator - ( const D3DXQUATERNION& ) const; + D3DXQUATERNION operator * ( const D3DXQUATERNION& ) const; + D3DXQUATERNION operator * ( float ) const; + D3DXQUATERNION operator / ( float ) const; + + friend D3DXQUATERNION operator * (float, const D3DXQUATERNION& ); + + BOOL operator == ( const D3DXQUATERNION& ) const; + BOOL operator != ( const D3DXQUATERNION& ) const; + +#endif //__cplusplus + float x, y, z, w; +} D3DXQUATERNION, *LPD3DXQUATERNION; + + +//=========================================================================== +// +// Planes +// +//=========================================================================== +typedef struct D3DXPLANE +{ +#ifdef __cplusplus +public: + D3DXPLANE() {} + D3DXPLANE( const float* ); + D3DXPLANE( float a, float b, float c, float d ); + + // casting + operator float* (); + operator const float* () const; + + // unary operators + D3DXPLANE operator + () const; + D3DXPLANE operator - () const; + + // binary operators + BOOL operator == ( const D3DXPLANE& ) const; + BOOL operator != ( const D3DXPLANE& ) const; + +#endif //__cplusplus + float a, b, c, d; +} D3DXPLANE, *LPD3DXPLANE; + + +//=========================================================================== +// +// Colors +// +//=========================================================================== + +typedef struct D3DXCOLOR +{ +#ifdef __cplusplus +public: + D3DXCOLOR() {} + D3DXCOLOR( DWORD argb ); + D3DXCOLOR( const float * ); + D3DXCOLOR( const D3DCOLORVALUE& ); + D3DXCOLOR( float r, float g, float b, float a ); + + // casting + operator DWORD () const; + + operator float* (); + operator const float* () const; + + operator D3DCOLORVALUE* (); + operator const D3DCOLORVALUE* () const; + + operator D3DCOLORVALUE& (); + operator const D3DCOLORVALUE& () const; + + // assignment operators + D3DXCOLOR& operator += ( const D3DXCOLOR& ); + D3DXCOLOR& operator -= ( const D3DXCOLOR& ); + D3DXCOLOR& operator *= ( float ); + D3DXCOLOR& operator /= ( float ); + + // unary operators + D3DXCOLOR operator + () const; + D3DXCOLOR operator - () const; + + // binary operators + D3DXCOLOR operator + ( const D3DXCOLOR& ) const; + D3DXCOLOR operator - ( const D3DXCOLOR& ) const; + D3DXCOLOR operator * ( float ) const; + D3DXCOLOR operator / ( float ) const; + + friend D3DXCOLOR operator * (float, const D3DXCOLOR& ); + + BOOL operator == ( const D3DXCOLOR& ) const; + BOOL operator != ( const D3DXCOLOR& ) const; + +#endif //__cplusplus + FLOAT r, g, b, a; +} D3DXCOLOR, *LPD3DXCOLOR; + + + +//=========================================================================== +// +// D3DX math functions: +// +// NOTE: +// * All these functions can take the same object as in and out parameters. +// +// * Out parameters are typically also returned as return values, so that +// the output of one function may be used as a parameter to another. +// +//=========================================================================== + +//-------------------------- +// 2D Vector +//-------------------------- + +// inline + +float D3DXVec2Length + ( const D3DXVECTOR2 *pV ); + +float D3DXVec2LengthSq + ( const D3DXVECTOR2 *pV ); + +float D3DXVec2Dot + ( const D3DXVECTOR2 *pV1, const D3DXVECTOR2 *pV2 ); + +// Z component of ((x1,y1,0) cross (x2,y2,0)) +float D3DXVec2CCW + ( const D3DXVECTOR2 *pV1, const D3DXVECTOR2 *pV2 ); + +D3DXVECTOR2* D3DXVec2Add + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV1, const D3DXVECTOR2 *pV2 ); + +D3DXVECTOR2* D3DXVec2Subtract + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV1, const D3DXVECTOR2 *pV2 ); + +// Minimize each component. x = min(x1, x2), y = min(y1, y2) +D3DXVECTOR2* D3DXVec2Minimize + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV1, const D3DXVECTOR2 *pV2 ); + +// Maximize each component. x = max(x1, x2), y = max(y1, y2) +D3DXVECTOR2* D3DXVec2Maximize + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV1, const D3DXVECTOR2 *pV2 ); + +D3DXVECTOR2* D3DXVec2Scale + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV, float s ); + +// Linear interpolation. V1 + s(V2-V1) +D3DXVECTOR2* D3DXVec2Lerp + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV1, const D3DXVECTOR2 *pV2, + float s ); + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +D3DXVECTOR2* WINAPI D3DXVec2Normalize + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV ); + +// Hermite interpolation between position V1, tangent T1 (when s == 0) +// and position V2, tangent T2 (when s == 1). +D3DXVECTOR2* WINAPI D3DXVec2Hermite + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV1, const D3DXVECTOR2 *pT1, + const D3DXVECTOR2 *pV2, const D3DXVECTOR2 *pT2, float s ); + +// Barycentric coordinates. V1 + f(V2-V1) + g(V3-V1) +D3DXVECTOR2* WINAPI D3DXVec2BaryCentric + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV1, const D3DXVECTOR2 *pV2, + D3DXVECTOR2 *pV3, float f, float g); + +// Transform (x, y, 0, 1) by matrix. +D3DXVECTOR4* WINAPI D3DXVec2Transform + ( D3DXVECTOR4 *pOut, const D3DXVECTOR2 *pV, const D3DXMATRIX *pM ); + +// Transform (x, y, 0, 1) by matrix, project result back into w=1. +D3DXVECTOR2* WINAPI D3DXVec2TransformCoord + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV, const D3DXMATRIX *pM ); + +// Transform (x, y, 0, 0) by matrix. +D3DXVECTOR2* WINAPI D3DXVec2TransformNormal + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV, const D3DXMATRIX *pM ); + +#ifdef __cplusplus +} +#endif + + +//-------------------------- +// 3D Vector +//-------------------------- + +// inline + +float D3DXVec3Length + ( const D3DXVECTOR3 *pV ); + +float D3DXVec3LengthSq + ( const D3DXVECTOR3 *pV ); + +float D3DXVec3Dot + ( const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pV2 ); + +D3DXVECTOR3* D3DXVec3Cross + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pV2 ); + +D3DXVECTOR3* D3DXVec3Add + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pV2 ); + +D3DXVECTOR3* D3DXVec3Subtract + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pV2 ); + +// Minimize each component. x = min(x1, x2), y = min(y1, y2), ... +D3DXVECTOR3* D3DXVec3Minimize + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pV2 ); + +// Maximize each component. x = max(x1, x2), y = max(y1, y2), ... +D3DXVECTOR3* D3DXVec3Maximize + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pV2 ); + +D3DXVECTOR3* D3DXVec3Scale + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV, float s); + +// Linear interpolation. V1 + s(V2-V1) +D3DXVECTOR3* D3DXVec3Lerp + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pV2, + float s ); + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +D3DXVECTOR3* WINAPI D3DXVec3Normalize + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV ); + +// Hermite interpolation between position V1, tangent T1 (when s == 0) +// and position V2, tangent T2 (when s == 1). +D3DXVECTOR3* WINAPI D3DXVec3Hermite + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pT1, + const D3DXVECTOR3 *pV2, const D3DXVECTOR3 *pT2, float s ); + +// Barycentric coordinates. V1 + f(V2-V1) + g(V3-V1) +D3DXVECTOR3* WINAPI D3DXVec3BaryCentric + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pV2, + const D3DXVECTOR3 *pV3, float f, float g); + +// Transform (x, y, z, 1) by matrix. +D3DXVECTOR4* WINAPI D3DXVec3Transform + ( D3DXVECTOR4 *pOut, const D3DXVECTOR3 *pV, const D3DXMATRIX *pM ); + +// Transform (x, y, z, 1) by matrix, project result back into w=1. +D3DXVECTOR3* WINAPI D3DXVec3TransformCoord + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV, const D3DXMATRIX *pM ); + +// Transform (x, y, z, 0) by matrix. +D3DXVECTOR3* WINAPI D3DXVec3TransformNormal + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV, const D3DXMATRIX *pM ); + +#ifdef __cplusplus +} +#endif + + + +//-------------------------- +// 4D Vector +//-------------------------- + +// inline + +float D3DXVec4Length + ( const D3DXVECTOR4 *pV ); + +float D3DXVec4LengthSq + ( const D3DXVECTOR4 *pV ); + +float D3DXVec4Dot + ( const D3DXVECTOR4 *pV1, const D3DXVECTOR4 *pV2 ); + +D3DXVECTOR4* D3DXVec4Add + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV1, const D3DXVECTOR4 *pV2); + +D3DXVECTOR4* D3DXVec4Subtract + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV1, const D3DXVECTOR4 *pV2); + +// Minimize each component. x = min(x1, x2), y = min(y1, y2), ... +D3DXVECTOR4* D3DXVec4Minimize + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV1, const D3DXVECTOR4 *pV2); + +// Maximize each component. x = max(x1, x2), y = max(y1, y2), ... +D3DXVECTOR4* D3DXVec4Maximize + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV1, const D3DXVECTOR4 *pV2); + +D3DXVECTOR4* D3DXVec4Scale + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV, float s); + +// Linear interpolation. V1 + s(V2-V1) +D3DXVECTOR4* D3DXVec4Lerp + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV1, const D3DXVECTOR4 *pV2, + float s ); + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +// Cross-product in 4 dimensions. +D3DXVECTOR4* WINAPI D3DXVec4Cross + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV1, const D3DXVECTOR4 *pV2, + const D3DXVECTOR4 *pV3); + +D3DXVECTOR4* WINAPI D3DXVec4Normalize + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV ); + +// Hermite interpolation between position V1, tangent T1 (when s == 0) +// and position V2, tangent T2 (when s == 1). +D3DXVECTOR4* WINAPI D3DXVec4Hermite + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV1, const D3DXVECTOR4 *pT1, + const D3DXVECTOR4 *pV2, const D3DXVECTOR4 *pT2, float s ); + +// Barycentric coordinates. V1 + f(V2-V1) + g(V3-V1) +D3DXVECTOR4* WINAPI D3DXVec4BaryCentric + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV1, const D3DXVECTOR4 *pV2, + const D3DXVECTOR4 *pV3, float f, float g); + +// Transform vector by matrix. +D3DXVECTOR4* WINAPI D3DXVec4Transform + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV, const D3DXMATRIX *pM ); + +#ifdef __cplusplus +} +#endif + + +//-------------------------- +// 4D Matrix +//-------------------------- + +// inline + +D3DXMATRIX* D3DXMatrixIdentity + ( D3DXMATRIX *pOut ); + +BOOL D3DXMatrixIsIdentity + ( const D3DXMATRIX *pM ); + + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +float WINAPI D3DXMatrixfDeterminant + ( const D3DXMATRIX *pM ); + +// Matrix multiplication. The result represents the transformation M2 +// followed by the transformation M1. (Out = M1 * M2) +D3DXMATRIX* WINAPI D3DXMatrixMultiply + ( D3DXMATRIX *pOut, const D3DXMATRIX *pM1, const D3DXMATRIX *pM2 ); + +D3DXMATRIX* WINAPI D3DXMatrixTranspose + ( D3DXMATRIX *pOut, const D3DXMATRIX *pM ); + +// Calculate inverse of matrix. Inversion my fail, in which case NULL will +// be returned. The determinant of pM is also returned it pfDeterminant +// is non-NULL. +D3DXMATRIX* WINAPI D3DXMatrixInverse + ( D3DXMATRIX *pOut, float *pfDeterminant, const D3DXMATRIX *pM ); + +// Build a matrix which scales by (sx, sy, sz) +D3DXMATRIX* WINAPI D3DXMatrixScaling + ( D3DXMATRIX *pOut, float sx, float sy, float sz ); + +// Build a matrix which translates by (x, y, z) +D3DXMATRIX* WINAPI D3DXMatrixTranslation + ( D3DXMATRIX *pOut, float x, float y, float z ); + +// Build a matrix which rotates around the X axis +D3DXMATRIX* WINAPI D3DXMatrixRotationX + ( D3DXMATRIX *pOut, float angle ); + +// Build a matrix which rotates around the Y axis +D3DXMATRIX* WINAPI D3DXMatrixRotationY + ( D3DXMATRIX *pOut, float angle ); + +// Build a matrix which rotates around the Z axis +D3DXMATRIX* WINAPI D3DXMatrixRotationZ + ( D3DXMATRIX *pOut, float angle ); + +// Build a matrix which rotates around an arbitrary axis +D3DXMATRIX* WINAPI D3DXMatrixRotationAxis + ( D3DXMATRIX *pOut, const D3DXVECTOR3 *pV, float angle ); + +// Build a matrix from a quaternion +D3DXMATRIX* WINAPI D3DXMatrixRotationQuaternion + ( D3DXMATRIX *pOut, const D3DXQUATERNION *pQ); + +// Yaw around the Y axis, a pitch around the X axis, +// and a roll around the Z axis. +D3DXMATRIX* WINAPI D3DXMatrixRotationYawPitchRoll + ( D3DXMATRIX *pOut, float yaw, float pitch, float roll ); + + +// Build transformation matrix. NULL arguments are treated as identity. +// Mout = Msc-1 * Msr-1 * Ms * Msr * Msc * Mrc-1 * Mr * Mrc * Mt +D3DXMATRIX* WINAPI D3DXMatrixTransformation + ( D3DXMATRIX *pOut, const D3DXVECTOR3 *pScalingCenter, + const D3DXQUATERNION *pScalingRotation, const D3DXVECTOR3 *pScaling, + const D3DXVECTOR3 *pRotationCenter, const D3DXQUATERNION *pRotation, + const D3DXVECTOR3 *pTranslation); + +// Build affine transformation matrix. NULL arguments are treated as identity. +// Mout = Ms * Mrc-1 * Mr * Mrc * Mt +D3DXMATRIX* WINAPI D3DXMatrixAffineTransformation + ( D3DXMATRIX *pOut, float Scaling, const D3DXVECTOR3 *pRotationCenter, + const D3DXQUATERNION *pRotation, const D3DXVECTOR3 *pTranslation); + +// Build a lookat matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixLookAt + ( D3DXMATRIX *pOut, const D3DXVECTOR3 *pEye, const D3DXVECTOR3 *pAt, + const D3DXVECTOR3 *pUp ); + +// Build a lookat matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixLookAtLH + ( D3DXMATRIX *pOut, const D3DXVECTOR3 *pEye, const D3DXVECTOR3 *pAt, + const D3DXVECTOR3 *pUp ); + +// Build a perspective projection matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspective + ( D3DXMATRIX *pOut, float w, float h, float zn, float zf ); + +// Build a perspective projection matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveLH + ( D3DXMATRIX *pOut, float w, float h, float zn, float zf ); + +// Build a perspective projection matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveFov + ( D3DXMATRIX *pOut, float fovy, float aspect, float zn, float zf ); + +// Build a perspective projection matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveFovLH + ( D3DXMATRIX *pOut, float fovy, float aspect, float zn, float zf ); + +// Build a perspective projection matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveOffCenter + ( D3DXMATRIX *pOut, float l, float r, float b, float t, float zn, + float zf ); + +// Build a perspective projection matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixPerspectiveOffCenterLH + ( D3DXMATRIX *pOut, float l, float r, float b, float t, float zn, + float zf ); + +// Build an ortho projection matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixOrtho + ( D3DXMATRIX *pOut, float w, float h, float zn, float zf ); + +// Build an ortho projection matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixOrthoLH + ( D3DXMATRIX *pOut, float w, float h, float zn, float zf ); + +// Build an ortho projection matrix. (right-handed) +D3DXMATRIX* WINAPI D3DXMatrixOrthoOffCenter + ( D3DXMATRIX *pOut, float l, float r, float b, float t, float zn, + float zf ); + +// Build an ortho projection matrix. (left-handed) +D3DXMATRIX* WINAPI D3DXMatrixOrthoOffCenterLH + ( D3DXMATRIX *pOut, float l, float r, float b, float t, float zn, + float zf ); + +// Build a matrix which flattens geometry into a plane, as if casting +// a shadow from a light. +D3DXMATRIX* WINAPI D3DXMatrixShadow + ( D3DXMATRIX *pOut, const D3DXVECTOR4 *pLight, + const D3DXPLANE *pPlane ); + +// Build a matrix which reflects the coordinate system about a plane +D3DXMATRIX* WINAPI D3DXMatrixReflect + ( D3DXMATRIX *pOut, const D3DXPLANE *pPlane ); + +#ifdef __cplusplus +} +#endif + + +//-------------------------- +// Quaternion +//-------------------------- + +// inline + +float D3DXQuaternionLength + ( const D3DXQUATERNION *pQ ); + +// Length squared, or "norm" +float D3DXQuaternionLengthSq + ( const D3DXQUATERNION *pQ ); + +float D3DXQuaternionDot + ( const D3DXQUATERNION *pQ1, const D3DXQUATERNION *pQ2 ); + +// (0, 0, 0, 1) +D3DXQUATERNION* D3DXQuaternionIdentity + ( D3DXQUATERNION *pOut ); + +BOOL D3DXQuaternionIsIdentity + ( const D3DXQUATERNION *pQ ); + +// (-x, -y, -z, w) +D3DXQUATERNION* D3DXQuaternionConjugate + ( D3DXQUATERNION *pOut, const D3DXQUATERNION *pQ ); + + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +// Compute a quaternin's axis and angle of rotation. Expects unit quaternions. +void WINAPI D3DXQuaternionToAxisAngle + ( const D3DXQUATERNION *pQ, D3DXVECTOR3 *pAxis, float *pAngle ); + +// Build a quaternion from a rotation matrix. +D3DXQUATERNION* WINAPI D3DXQuaternionRotationMatrix + ( D3DXQUATERNION *pOut, const D3DXMATRIX *pM); + +// Rotation about arbitrary axis. +D3DXQUATERNION* WINAPI D3DXQuaternionRotationAxis + ( D3DXQUATERNION *pOut, const D3DXVECTOR3 *pV, float angle ); + +// Yaw around the Y axis, a pitch around the X axis, +// and a roll around the Z axis. +D3DXQUATERNION* WINAPI D3DXQuaternionRotationYawPitchRoll + ( D3DXQUATERNION *pOut, float yaw, float pitch, float roll ); + +// Quaternion multiplication. The result represents the rotation Q2 +// followed by the rotation Q1. (Out = Q2 * Q1) +D3DXQUATERNION* WINAPI D3DXQuaternionMultiply + ( D3DXQUATERNION *pOut, const D3DXQUATERNION *pQ1, + const D3DXQUATERNION *pQ2 ); + +D3DXQUATERNION* WINAPI D3DXQuaternionNormalize + ( D3DXQUATERNION *pOut, const D3DXQUATERNION *pQ ); + +// Conjugate and re-norm +D3DXQUATERNION* WINAPI D3DXQuaternionInverse + ( D3DXQUATERNION *pOut, const D3DXQUATERNION *pQ ); + +// Expects unit quaternions. +// if q = (cos(theta), sin(theta) * v); ln(q) = (0, theta * v) +D3DXQUATERNION* WINAPI D3DXQuaternionLn + ( D3DXQUATERNION *pOut, const D3DXQUATERNION *pQ ); + +// Expects pure quaternions. (w == 0) w is ignored in calculation. +// if q = (0, theta * v); exp(q) = (cos(theta), sin(theta) * v) +D3DXQUATERNION* WINAPI D3DXQuaternionExp + ( D3DXQUATERNION *pOut, const D3DXQUATERNION *pQ ); + +// Spherical linear interpolation between Q1 (s == 0) and Q2 (s == 1). +// Expects unit quaternions. +D3DXQUATERNION* WINAPI D3DXQuaternionSlerp + ( D3DXQUATERNION *pOut, const D3DXQUATERNION *pQ1, + const D3DXQUATERNION *pQ2, float t ); + +// Spherical quadrangle interpolation. +// Slerp(Slerp(Q1, Q4, t), Slerp(Q2, Q3, t), 2t(1-t)) +D3DXQUATERNION* WINAPI D3DXQuaternionSquad + ( D3DXQUATERNION *pOut, const D3DXQUATERNION *pQ1, + const D3DXQUATERNION *pQ2, const D3DXQUATERNION *pQ3, + const D3DXQUATERNION *pQ4, float t ); + +// Slerp(Slerp(Q1, Q2, f+g), Slerp(Q1, Q3, f+g), g/(f+g)) +D3DXQUATERNION* WINAPI D3DXQuaternionBaryCentric + ( D3DXQUATERNION *pOut, const D3DXQUATERNION *pQ1, + const D3DXQUATERNION *pQ2, const D3DXQUATERNION *pQ3, + float f, float g ); + +#ifdef __cplusplus +} +#endif + + +//-------------------------- +// Plane +//-------------------------- + +// inline + +// ax + by + cz + dw +float D3DXPlaneDot + ( const D3DXPLANE *pP, const D3DXVECTOR4 *pV); + +// ax + by + cz + d +float D3DXPlaneDotCoord + ( const D3DXPLANE *pP, const D3DXVECTOR3 *pV); + +// ax + by + cz +float D3DXPlaneDotNormal + ( const D3DXPLANE *pP, const D3DXVECTOR3 *pV); + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +// Normalize plane (so that |a,b,c| == 1) +D3DXPLANE* WINAPI D3DXPlaneNormalize + ( D3DXPLANE *pOut, const D3DXPLANE *pP); + +// Find the intersection between a plane and a line. If the line is +// parallel to the plane, NULL is returned. +D3DXVECTOR3* WINAPI D3DXPlaneIntersectLine + ( D3DXVECTOR3 *pOut, const D3DXPLANE *pP, const D3DXVECTOR3 *pV1, + const D3DXVECTOR3 *pV2); + +// Construct a plane from a point and a normal +D3DXPLANE* WINAPI D3DXPlaneFromPointNormal + ( D3DXPLANE *pOut, const D3DXVECTOR3 *pPoint, const D3DXVECTOR3 *pNormal); + +// Construct a plane from 3 points +D3DXPLANE* WINAPI D3DXPlaneFromPoints + ( D3DXPLANE *pOut, const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pV2, + const D3DXVECTOR3 *pV3); + +// Transform a plane by a matrix. The vector (a,b,c) must be normal. +// M must be an affine transform. +D3DXPLANE* WINAPI D3DXPlaneTransform + ( D3DXPLANE *pOut, const D3DXPLANE *pP, const D3DXMATRIX *pM ); + +#ifdef __cplusplus +} +#endif + + +//-------------------------- +// Color +//-------------------------- + +// inline + +// (1-r, 1-g, 1-b, a) +D3DXCOLOR* D3DXColorNegative + (D3DXCOLOR *pOut, const D3DXCOLOR *pC); + +D3DXCOLOR* D3DXColorAdd + (D3DXCOLOR *pOut, const D3DXCOLOR *pC1, const D3DXCOLOR *pC2); + +D3DXCOLOR* D3DXColorSubtract + (D3DXCOLOR *pOut, const D3DXCOLOR *pC1, const D3DXCOLOR *pC2); + +D3DXCOLOR* D3DXColorScale + (D3DXCOLOR *pOut, const D3DXCOLOR *pC, float s); + +// (r1*r2, g1*g2, b1*b2, a1*a2) +D3DXCOLOR* D3DXColorModulate + (D3DXCOLOR *pOut, const D3DXCOLOR *pC1, const D3DXCOLOR *pC2); + +// Linear interpolation of r,g,b, and a. C1 + s(C2-C1) +D3DXCOLOR* D3DXColorLerp + (D3DXCOLOR *pOut, const D3DXCOLOR *pC1, const D3DXCOLOR *pC2, float s); + +// non-inline +#ifdef __cplusplus +extern "C" { +#endif + +// Interpolate r,g,b between desaturated color and color. +// DesaturatedColor + s(Color - DesaturatedColor) +D3DXCOLOR* WINAPI D3DXColorAdjustSaturation + (D3DXCOLOR *pOut, const D3DXCOLOR *pC, float s); + +// Interpolate r,g,b between 50% grey and color. Grey + s(Color - Grey) +D3DXCOLOR* WINAPI D3DXColorAdjustContrast + (D3DXCOLOR *pOut, const D3DXCOLOR *pC, float c); + +#ifdef __cplusplus +} +#endif + + + + + + +//=========================================================================== +// +// Matrix Stack +// +//=========================================================================== + +DECLARE_INTERFACE_(ID3DXMatrixStack, IUnknown) +{ + // + // IUnknown methods + // + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + // + // ID3DXMatrixStack methods + // + + // Pops the top of the stack, returns the current top + // *after* popping the top. + STDMETHOD(Pop)(THIS) PURE; + + // Pushes the stack by one, duplicating the current matrix. + STDMETHOD(Push)(THIS) PURE; + + // Loads identity in the current matrix. + STDMETHOD(LoadIdentity)(THIS) PURE; + + // Loads the given matrix into the current matrix + STDMETHOD(LoadMatrix)(THIS_ const D3DXMATRIX* pM ) PURE; + + // Right-Multiplies the given matrix to the current matrix. + // (transformation is about the current world origin) + STDMETHOD(MultMatrix)(THIS_ const D3DXMATRIX* pM ) PURE; + + // Left-Multiplies the given matrix to the current matrix + // (transformation is about the local origin of the object) + STDMETHOD(MultMatrixLocal)(THIS_ const D3DXMATRIX* pM ) PURE; + + // Right multiply the current matrix with the computed rotation + // matrix, counterclockwise about the given axis with the given angle. + // (rotation is about the current world origin) + STDMETHOD(RotateAxis) + (THIS_ const D3DXVECTOR3* pV, float angle) PURE; + + // Left multiply the current matrix with the computed rotation + // matrix, counterclockwise about the given axis with the given angle. + // (rotation is about the local origin of the object) + STDMETHOD(RotateAxisLocal) + (THIS_ const D3DXVECTOR3* pV, float angle) PURE; + + // Right multiply the current matrix with the computed rotation + // matrix. All angles are counterclockwise. (rotation is about the + // current world origin) + + // The rotation is composed of a yaw around the Y axis, a pitch around + // the X axis, and a roll around the Z axis. + STDMETHOD(RotateYawPitchRoll) + (THIS_ float yaw, float pitch, float roll) PURE; + + // Left multiply the current matrix with the computed rotation + // matrix. All angles are counterclockwise. (rotation is about the + // local origin of the object) + + // The rotation is composed of a yaw around the Y axis, a pitch around + // the X axis, and a roll around the Z axis. + STDMETHOD(RotateYawPitchRollLocal) + (THIS_ float yaw, float pitch, float roll) PURE; + + // Right multiply the current matrix with the computed scale + // matrix. (transformation is about the current world origin) + STDMETHOD(Scale)(THIS_ float x, float y, float z) PURE; + + // Left multiply the current matrix with the computed scale + // matrix. (transformation is about the local origin of the object) + STDMETHOD(ScaleLocal)(THIS_ float x, float y, float z) PURE; + + // Right multiply the current matrix with the computed translation + // matrix. (transformation is about the current world origin) + STDMETHOD(Translate)(THIS_ float x, float y, float z ) PURE; + + // Left multiply the current matrix with the computed translation + // matrix. (transformation is about the local origin of the object) + STDMETHOD(TranslateLocal)(THIS_ float x, float y, float z) PURE; + + // Obtain the current matrix at the top of the stack + STDMETHOD_(D3DXMATRIX*, GetTop)(THIS) PURE; +}; + +#ifdef __cplusplus +extern "C" { +#endif + +HRESULT WINAPI D3DXCreateMatrixStack( DWORD flags, LPD3DXMATRIXSTACK *ppStack ); + +#ifdef __cplusplus +} +#endif + +#include "d3dxmath.inl" + +#pragma warning(default:4201) + +#endif // __D3DXMATH_H__ diff --git a/windows_libs/mssdk/include/d3dxmath.inl b/windows_libs/mssdk/include/d3dxmath.inl new file mode 100644 index 00000000..b0155e50 --- /dev/null +++ b/windows_libs/mssdk/include/d3dxmath.inl @@ -0,0 +1,1809 @@ +////////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 1998 Microsoft Corporation. All Rights Reserved. +// +// File: d3dxmath.inl +// Content: D3DX math inline functions +// +////////////////////////////////////////////////////////////////////////////// + +#ifndef __D3DXMATH_INL__ +#define __D3DXMATH_INL__ + + +//=========================================================================== +// +// Inline Class Methods +// +//=========================================================================== + +#ifdef __cplusplus + +//-------------------------- +// 2D Vector +//-------------------------- + +D3DXINLINE +D3DXVECTOR2::D3DXVECTOR2( const float *pf ) +{ +#ifdef D3DX_DEBUG + if(!pf) + return; +#endif + + x = pf[0]; + y = pf[1]; +} + +D3DXINLINE +D3DXVECTOR2::D3DXVECTOR2( float fx, float fy ) +{ + x = fx; + y = fy; +} + +// casting +D3DXINLINE +D3DXVECTOR2::operator float* () +{ + return (float *) &x; +} + +D3DXINLINE +D3DXVECTOR2::operator const float* () const +{ + return (const float *) &x; +} + +// assignment operators +D3DXINLINE D3DXVECTOR2& +D3DXVECTOR2::operator += ( const D3DXVECTOR2& v ) +{ + x += v.x; + y += v.y; + return *this; +} + +D3DXINLINE D3DXVECTOR2& +D3DXVECTOR2::operator -= ( const D3DXVECTOR2& v ) +{ + x -= v.x; + y -= v.y; + return *this; +} + +D3DXINLINE D3DXVECTOR2& +D3DXVECTOR2::operator *= ( float f ) +{ + x *= f; + y *= f; + return *this; +} + +D3DXINLINE D3DXVECTOR2& +D3DXVECTOR2::operator /= ( float f ) +{ + float fInv = 1.0f / f; + x *= fInv; + y *= fInv; + return *this; +} + +// unary operators +D3DXINLINE D3DXVECTOR2 +D3DXVECTOR2::operator + () const +{ + return *this; +} + +D3DXINLINE D3DXVECTOR2 +D3DXVECTOR2::operator - () const +{ + return D3DXVECTOR2(-x, -y); +} + +// binary operators +D3DXINLINE D3DXVECTOR2 +D3DXVECTOR2::operator + ( const D3DXVECTOR2& v ) const +{ + return D3DXVECTOR2(x + v.x, y + v.y); +} + +D3DXINLINE D3DXVECTOR2 +D3DXVECTOR2::operator - ( const D3DXVECTOR2& v ) const +{ + return D3DXVECTOR2(x - v.x, y - v.y); +} + +D3DXINLINE D3DXVECTOR2 +D3DXVECTOR2::operator * ( float f ) const +{ + return D3DXVECTOR2(x * f, y * f); +} + +D3DXINLINE D3DXVECTOR2 +D3DXVECTOR2::operator / ( float f ) const +{ + float fInv = 1.0f / f; + return D3DXVECTOR2(x * fInv, y * fInv); +} + + +D3DXINLINE D3DXVECTOR2 +operator * ( float f, const D3DXVECTOR2& v ) +{ + return D3DXVECTOR2(f * v.x, f * v.y); +} + +D3DXINLINE BOOL +D3DXVECTOR2::operator == ( const D3DXVECTOR2& v ) const +{ + return x == v.x && y == v.y; +} + +D3DXINLINE BOOL +D3DXVECTOR2::operator != ( const D3DXVECTOR2& v ) const +{ + return x != v.x || y != v.y; +} + + + + +//-------------------------- +// 3D Vector +//-------------------------- +D3DXINLINE +D3DXVECTOR3::D3DXVECTOR3( const float *pf ) +{ +#ifdef D3DX_DEBUG + if(!pf) + return; +#endif + + x = pf[0]; + y = pf[1]; + z = pf[2]; +} + +D3DXINLINE +D3DXVECTOR3::D3DXVECTOR3( const D3DVECTOR& v ) +{ + x = v.x; + y = v.y; + z = v.z; +} + +D3DXINLINE +D3DXVECTOR3::D3DXVECTOR3( float fx, float fy, float fz ) +{ + x = fx; + y = fy; + z = fz; +} + + +// casting +D3DXINLINE +D3DXVECTOR3::operator float* () +{ + return (float *) &x; +} + +D3DXINLINE +D3DXVECTOR3::operator const float* () const +{ + return (const float *) &x; +} + + +D3DXINLINE +D3DXVECTOR3::operator D3DVECTOR* () +{ + return (D3DVECTOR *) &x; +} + +D3DXINLINE +D3DXVECTOR3::operator const D3DVECTOR* () const +{ + return (const D3DVECTOR *) &x; +} + + +D3DXINLINE +D3DXVECTOR3::operator D3DVECTOR& () +{ + return *((D3DVECTOR *) &x); +} + +D3DXINLINE +D3DXVECTOR3::operator const D3DVECTOR& () const +{ + return *((const D3DVECTOR *) &x); +} + + +// assignment operators +D3DXINLINE D3DXVECTOR3& +D3DXVECTOR3::operator += ( const D3DXVECTOR3& v ) +{ + x += v.x; + y += v.y; + z += v.z; + return *this; +} + +D3DXINLINE D3DXVECTOR3& +D3DXVECTOR3::operator -= ( const D3DXVECTOR3& v ) +{ + x -= v.x; + y -= v.y; + z -= v.z; + return *this; +} + +D3DXINLINE D3DXVECTOR3& +D3DXVECTOR3::operator *= ( float f ) +{ + x *= f; + y *= f; + z *= f; + return *this; +} + +D3DXINLINE D3DXVECTOR3& +D3DXVECTOR3::operator /= ( float f ) +{ + float fInv = 1.0f / f; + x *= fInv; + y *= fInv; + z *= fInv; + return *this; +} + + +// unary operators +D3DXINLINE D3DXVECTOR3 +D3DXVECTOR3::operator + () const +{ + return *this; +} + +D3DXINLINE D3DXVECTOR3 +D3DXVECTOR3::operator - () const +{ + return D3DXVECTOR3(-x, -y, -z); +} + + +// binary operators +D3DXINLINE D3DXVECTOR3 +D3DXVECTOR3::operator + ( const D3DXVECTOR3& v ) const +{ + return D3DXVECTOR3(x + v.x, y + v.y, z + v.z); +} + +D3DXINLINE D3DXVECTOR3 +D3DXVECTOR3::operator - ( const D3DXVECTOR3& v ) const +{ + return D3DXVECTOR3(x - v.x, y - v.y, z - v.z); +} + +D3DXINLINE D3DXVECTOR3 +D3DXVECTOR3::operator * ( float f ) const +{ + return D3DXVECTOR3(x * f, y * f, z * f); +} + +D3DXINLINE D3DXVECTOR3 +D3DXVECTOR3::operator / ( float f ) const +{ + float fInv = 1.0f / f; + return D3DXVECTOR3(x * fInv, y * fInv, z * fInv); +} + + +D3DXINLINE D3DXVECTOR3 +operator * ( float f, const struct D3DXVECTOR3& v ) +{ + return D3DXVECTOR3(f * v.x, f * v.y, f * v.z); +} + + +D3DXINLINE BOOL +D3DXVECTOR3::operator == ( const D3DXVECTOR3& v ) const +{ + return x == v.x && y == v.y && z == v.z; +} + +D3DXINLINE BOOL +D3DXVECTOR3::operator != ( const D3DXVECTOR3& v ) const +{ + return x != v.x || y != v.y || z != v.z; +} + + + +//-------------------------- +// 4D Vector +//-------------------------- +D3DXINLINE +D3DXVECTOR4::D3DXVECTOR4( const float *pf ) +{ +#ifdef D3DX_DEBUG + if(!pf) + return; +#endif + + x = pf[0]; + y = pf[1]; + z = pf[2]; + w = pf[3]; +} + +D3DXINLINE +D3DXVECTOR4::D3DXVECTOR4( float fx, float fy, float fz, float fw ) +{ + x = fx; + y = fy; + z = fz; + w = fw; +} + + +// casting +D3DXINLINE +D3DXVECTOR4::operator float* () +{ + return (float *) &x; +} + +D3DXINLINE +D3DXVECTOR4::operator const float* () const +{ + return (const float *) &x; +} + + +// assignment operators +D3DXINLINE D3DXVECTOR4& +D3DXVECTOR4::operator += ( const D3DXVECTOR4& v ) +{ + x += v.x; + y += v.y; + z += v.z; + w += v.w; + return *this; +} + +D3DXINLINE D3DXVECTOR4& +D3DXVECTOR4::operator -= ( const D3DXVECTOR4& v ) +{ + x -= v.x; + y -= v.y; + z -= v.z; + w -= v.w; + return *this; +} + +D3DXINLINE D3DXVECTOR4& +D3DXVECTOR4::operator *= ( float f ) +{ + x *= f; + y *= f; + z *= f; + w *= f; + return *this; +} + +D3DXINLINE D3DXVECTOR4& +D3DXVECTOR4::operator /= ( float f ) +{ + float fInv = 1.0f / f; + x *= fInv; + y *= fInv; + z *= fInv; + w *= fInv; + return *this; +} + + +// unary operators +D3DXINLINE D3DXVECTOR4 +D3DXVECTOR4::operator + () const +{ + return *this; +} + +D3DXINLINE D3DXVECTOR4 +D3DXVECTOR4::operator - () const +{ + return D3DXVECTOR4(-x, -y, -z, -w); +} + + +// binary operators +D3DXINLINE D3DXVECTOR4 +D3DXVECTOR4::operator + ( const D3DXVECTOR4& v ) const +{ + return D3DXVECTOR4(x + v.x, y + v.y, z + v.z, w + v.w); +} + +D3DXINLINE D3DXVECTOR4 +D3DXVECTOR4::operator - ( const D3DXVECTOR4& v ) const +{ + return D3DXVECTOR4(x - v.x, y - v.y, z - v.z, w - v.w); +} + +D3DXINLINE D3DXVECTOR4 +D3DXVECTOR4::operator * ( float f ) const +{ + return D3DXVECTOR4(x * f, y * f, z * f, w * f); +} + +D3DXINLINE D3DXVECTOR4 +D3DXVECTOR4::operator / ( float f ) const +{ + float fInv = 1.0f / f; + return D3DXVECTOR4(x * fInv, y * fInv, z * fInv, w * fInv); +} + + +D3DXINLINE D3DXVECTOR4 +operator * ( float f, const D3DXVECTOR4& v ) +{ + return D3DXVECTOR4(f * v.x, f * v.y, f * v.z, f * v.w); +} + + +D3DXINLINE BOOL +D3DXVECTOR4::operator == ( const D3DXVECTOR4& v ) const +{ + return x == v.x && y == v.y && z == v.z && w == v.w; +} + +D3DXINLINE BOOL +D3DXVECTOR4::operator != ( const D3DXVECTOR4& v ) const +{ + return x != v.x || y != v.y || z != v.z || w != v.w; +} + + +//-------------------------- +// Matrix +//-------------------------- +D3DXINLINE +D3DXMATRIX::D3DXMATRIX( const float* pf ) +{ +#ifdef D3DX_DEBUG + if(!pf) + return; +#endif + + memcpy(&m00, pf, sizeof(D3DXMATRIX)); +} + +D3DXINLINE +D3DXMATRIX::D3DXMATRIX( const D3DMATRIX& mat ) +{ + memcpy(&m00, &mat, sizeof(D3DXMATRIX)); +} + +D3DXINLINE +D3DXMATRIX::D3DXMATRIX( float f00, float f01, float f02, float f03, + float f10, float f11, float f12, float f13, + float f20, float f21, float f22, float f23, + float f30, float f31, float f32, float f33 ) +{ + m00 = f00; m01 = f01; m02 = f02; m03 = f03; + m10 = f10; m11 = f11; m12 = f12; m13 = f13; + m20 = f20; m21 = f21; m22 = f22; m23 = f23; + m30 = f30; m31 = f31; m32 = f32; m33 = f33; +} + + + +// access grants +D3DXINLINE float& +D3DXMATRIX::operator () ( UINT iRow, UINT iCol ) +{ + return m[iRow][iCol]; +} + +D3DXINLINE float +D3DXMATRIX::operator () ( UINT iRow, UINT iCol ) const +{ + return m[iRow][iCol]; +} + + +// casting operators +D3DXINLINE +D3DXMATRIX::operator float* () +{ + return (float *) &m00; +} + +D3DXINLINE +D3DXMATRIX::operator const float* () const +{ + return (const float *) &m00; +} + + +D3DXINLINE +D3DXMATRIX::operator D3DMATRIX* () +{ + return (D3DMATRIX *) &m00; +} + +D3DXINLINE +D3DXMATRIX::operator const D3DMATRIX* () const +{ + return (const D3DMATRIX *) &m00; +} + + +D3DXINLINE +D3DXMATRIX::operator D3DMATRIX& () +{ + return *((D3DMATRIX *) &m00); +} + +D3DXINLINE +D3DXMATRIX::operator const D3DMATRIX& () const +{ + return *((const D3DMATRIX *) &m00); +} + + +// assignment operators +D3DXINLINE D3DXMATRIX& +D3DXMATRIX::operator *= ( const D3DXMATRIX& mat ) +{ + D3DXMatrixMultiply(this, this, &mat); + return *this; +} + +D3DXINLINE D3DXMATRIX& +D3DXMATRIX::operator += ( const D3DXMATRIX& mat ) +{ + m00 += mat.m00; m01 += mat.m01; m02 += mat.m02; m03 += mat.m03; + m10 += mat.m10; m11 += mat.m11; m12 += mat.m12; m13 += mat.m13; + m20 += mat.m20; m21 += mat.m21; m22 += mat.m22; m23 += mat.m23; + m30 += mat.m30; m31 += mat.m31; m32 += mat.m32; m33 += mat.m33; + return *this; +} + +D3DXINLINE D3DXMATRIX& +D3DXMATRIX::operator -= ( const D3DXMATRIX& mat ) +{ + m00 -= mat.m00; m01 -= mat.m01; m02 -= mat.m02; m03 -= mat.m03; + m10 -= mat.m10; m11 -= mat.m11; m12 -= mat.m12; m13 -= mat.m13; + m20 -= mat.m20; m21 -= mat.m21; m22 -= mat.m22; m23 -= mat.m23; + m30 -= mat.m30; m31 -= mat.m31; m32 -= mat.m32; m33 -= mat.m33; + return *this; +} + +D3DXINLINE D3DXMATRIX& +D3DXMATRIX::operator *= ( float f ) +{ + m00 *= f; m01 *= f; m02 *= f; m03 *= f; + m10 *= f; m11 *= f; m12 *= f; m13 *= f; + m20 *= f; m21 *= f; m22 *= f; m23 *= f; + m30 *= f; m31 *= f; m32 *= f; m33 *= f; + return *this; +} + +D3DXINLINE D3DXMATRIX& +D3DXMATRIX::operator /= ( float f ) +{ + float fInv = 1.0f / f; + m00 *= fInv; m01 *= fInv; m02 *= fInv; m03 *= fInv; + m10 *= fInv; m11 *= fInv; m12 *= fInv; m13 *= fInv; + m20 *= fInv; m21 *= fInv; m22 *= fInv; m23 *= fInv; + m30 *= fInv; m31 *= fInv; m32 *= fInv; m33 *= fInv; + return *this; +} + + +// unary operators +D3DXINLINE D3DXMATRIX +D3DXMATRIX::operator + () const +{ + return *this; +} + +D3DXINLINE D3DXMATRIX +D3DXMATRIX::operator - () const +{ + return D3DXMATRIX(-m00, -m01, -m02, -m03, + -m10, -m11, -m12, -m13, + -m20, -m21, -m22, -m23, + -m30, -m31, -m32, -m33); +} + + +// binary operators +D3DXINLINE D3DXMATRIX +D3DXMATRIX::operator * ( const D3DXMATRIX& mat ) const +{ + D3DXMATRIX matT; + D3DXMatrixMultiply(&matT, this, &mat); + return matT; +} + +D3DXINLINE D3DXMATRIX +D3DXMATRIX::operator + ( const D3DXMATRIX& mat ) const +{ + return D3DXMATRIX(m00 + mat.m00, m01 + mat.m01, m02 + mat.m02, m03 + mat.m03, + m10 + mat.m10, m11 + mat.m11, m12 + mat.m12, m13 + mat.m13, + m20 + mat.m20, m21 + mat.m21, m22 + mat.m22, m23 + mat.m23, + m30 + mat.m30, m31 + mat.m31, m32 + mat.m32, m33 + mat.m33); +} + +D3DXINLINE D3DXMATRIX +D3DXMATRIX::operator - ( const D3DXMATRIX& mat ) const +{ + return D3DXMATRIX(m00 - mat.m00, m01 - mat.m01, m02 - mat.m02, m03 - mat.m03, + m10 - mat.m10, m11 - mat.m11, m12 - mat.m12, m13 - mat.m13, + m20 - mat.m20, m21 - mat.m21, m22 - mat.m22, m23 - mat.m23, + m30 - mat.m30, m31 - mat.m31, m32 - mat.m32, m33 - mat.m33); +} + +D3DXINLINE D3DXMATRIX +D3DXMATRIX::operator * ( float f ) const +{ + return D3DXMATRIX(m00 * f, m01 * f, m02 * f, m03 * f, + m10 * f, m11 * f, m12 * f, m13 * f, + m20 * f, m21 * f, m22 * f, m23 * f, + m30 * f, m31 * f, m32 * f, m33 * f); +} + +D3DXINLINE D3DXMATRIX +D3DXMATRIX::operator / ( float f ) const +{ + float fInv = 1.0f / f; + return D3DXMATRIX(m00 * fInv, m01 * fInv, m02 * fInv, m03 * fInv, + m10 * fInv, m11 * fInv, m12 * fInv, m13 * fInv, + m20 * fInv, m21 * fInv, m22 * fInv, m23 * fInv, + m30 * fInv, m31 * fInv, m32 * fInv, m33 * fInv); +} + + +D3DXINLINE D3DXMATRIX +operator * ( float f, const D3DXMATRIX& mat ) +{ + return D3DXMATRIX(f * mat.m00, f * mat.m01, f * mat.m02, f * mat.m03, + f * mat.m10, f * mat.m11, f * mat.m12, f * mat.m13, + f * mat.m20, f * mat.m21, f * mat.m22, f * mat.m23, + f * mat.m30, f * mat.m31, f * mat.m32, f * mat.m33); +} + + +D3DXINLINE BOOL +D3DXMATRIX::operator == ( const D3DXMATRIX& mat ) const +{ + return 0 == memcmp(this, &mat, sizeof(D3DXMATRIX)); +} + +D3DXINLINE BOOL +D3DXMATRIX::operator != ( const D3DXMATRIX& mat ) const +{ + return 0 != memcmp(this, &mat, sizeof(D3DXMATRIX)); +} + + + +//-------------------------- +// Quaternion +//-------------------------- + +D3DXINLINE +D3DXQUATERNION::D3DXQUATERNION( const float* pf ) +{ +#ifdef D3DX_DEBUG + if(!pf) + return; +#endif + + x = pf[0]; + y = pf[1]; + z = pf[2]; + w = pf[3]; +} + +D3DXINLINE +D3DXQUATERNION::D3DXQUATERNION( float fx, float fy, float fz, float fw ) +{ + x = fx; + y = fy; + z = fz; + w = fw; +} + + +// casting +D3DXINLINE +D3DXQUATERNION::operator float* () +{ + return (float *) &x; +} + +D3DXINLINE +D3DXQUATERNION::operator const float* () const +{ + return (const float *) &x; +} + + +// assignment operators +D3DXINLINE D3DXQUATERNION& +D3DXQUATERNION::operator += ( const D3DXQUATERNION& q ) +{ + x += q.x; + y += q.y; + z += q.z; + w += q.w; + return *this; +} + +D3DXINLINE D3DXQUATERNION& +D3DXQUATERNION::operator -= ( const D3DXQUATERNION& q ) +{ + x -= q.x; + y -= q.y; + z -= q.z; + w -= q.w; + return *this; +} + +D3DXINLINE D3DXQUATERNION& +D3DXQUATERNION::operator *= ( const D3DXQUATERNION& q ) +{ + D3DXQuaternionMultiply(this, this, &q); + return *this; +} + +D3DXINLINE D3DXQUATERNION& +D3DXQUATERNION::operator *= ( float f ) +{ + x *= f; + y *= f; + z *= f; + w *= f; + return *this; +} + +D3DXINLINE D3DXQUATERNION& +D3DXQUATERNION::operator /= ( float f ) +{ + float fInv = 1.0f / f; + x *= fInv; + y *= fInv; + z *= fInv; + w *= fInv; + return *this; +} + + +// unary operators +D3DXINLINE D3DXQUATERNION +D3DXQUATERNION::operator + () const +{ + return *this; +} + +D3DXINLINE D3DXQUATERNION +D3DXQUATERNION::operator - () const +{ + return D3DXQUATERNION(-x, -y, -z, -w); +} + + +// binary operators +D3DXINLINE D3DXQUATERNION +D3DXQUATERNION::operator + ( const D3DXQUATERNION& q ) const +{ + return D3DXQUATERNION(x + q.x, y + q.y, z + q.z, w + q.w); +} + +D3DXINLINE D3DXQUATERNION +D3DXQUATERNION::operator - ( const D3DXQUATERNION& q ) const +{ + return D3DXQUATERNION(x - q.x, y - q.y, z - q.z, w - q.w); +} + +D3DXINLINE D3DXQUATERNION +D3DXQUATERNION::operator * ( const D3DXQUATERNION& q ) const +{ + D3DXQUATERNION qT; + D3DXQuaternionMultiply(&qT, this, &q); + return qT; +} + +D3DXINLINE D3DXQUATERNION +D3DXQUATERNION::operator * ( float f ) const +{ + return D3DXQUATERNION(x * f, y * f, z * f, w * f); +} + +D3DXINLINE D3DXQUATERNION +D3DXQUATERNION::operator / ( float f ) const +{ + float fInv = 1.0f / f; + return D3DXQUATERNION(x * fInv, y * fInv, z * fInv, w * fInv); +} + + +D3DXINLINE D3DXQUATERNION +operator * (float f, const D3DXQUATERNION& q ) +{ + return D3DXQUATERNION(f * q.x, f * q.y, f * q.z, f * q.w); +} + + +D3DXINLINE BOOL +D3DXQUATERNION::operator == ( const D3DXQUATERNION& q ) const +{ + return x == q.x && y == q.y && z == q.z && w == q.w; +} + +D3DXINLINE BOOL +D3DXQUATERNION::operator != ( const D3DXQUATERNION& q ) const +{ + return x != q.x || y != q.y || z != q.z || w != q.w; +} + + + +//-------------------------- +// Plane +//-------------------------- + +D3DXINLINE +D3DXPLANE::D3DXPLANE( const float* pf ) +{ +#ifdef D3DX_DEBUG + if(!pf) + return; +#endif + + a = pf[0]; + b = pf[1]; + c = pf[2]; + d = pf[3]; +} + +D3DXINLINE +D3DXPLANE::D3DXPLANE( float fa, float fb, float fc, float fd ) +{ + a = fa; + b = fb; + c = fc; + d = fd; +} + + +// casting +D3DXINLINE +D3DXPLANE::operator float* () +{ + return (float *) &a; +} + +D3DXINLINE +D3DXPLANE::operator const float* () const +{ + return (const float *) &a; +} + + +// unary operators +D3DXINLINE D3DXPLANE +D3DXPLANE::operator + () const +{ + return *this; +} + +D3DXINLINE D3DXPLANE +D3DXPLANE::operator - () const +{ + return D3DXPLANE(-a, -b, -c, -d); +} + + +// binary operators +D3DXINLINE BOOL +D3DXPLANE::operator == ( const D3DXPLANE& p ) const +{ + return a == p.a && b == p.b && c == p.c && d == p.d; +} + +D3DXINLINE BOOL +D3DXPLANE::operator != ( const D3DXPLANE& p ) const +{ + return a != p.a || b != p.b || c != p.c || d != p.d; +} + + + + +//-------------------------- +// Color +//-------------------------- + +D3DXINLINE +D3DXCOLOR::D3DXCOLOR( DWORD dw ) +{ + const float f = 1.0f / 255.0f; + r = f * (float) (unsigned char) (dw >> 16); + g = f * (float) (unsigned char) (dw >> 8); + b = f * (float) (unsigned char) (dw >> 0); + a = f * (float) (unsigned char) (dw >> 24); +} + +D3DXINLINE +D3DXCOLOR::D3DXCOLOR( const float* pf ) +{ +#ifdef D3DX_DEBUG + if(!pf) + return; +#endif + + r = pf[0]; + g = pf[1]; + b = pf[2]; + a = pf[3]; +} + +D3DXINLINE +D3DXCOLOR::D3DXCOLOR( const D3DCOLORVALUE& c ) +{ + r = c.r; + g = c.g; + b = c.b; + a = c.a; +} + +D3DXINLINE +D3DXCOLOR::D3DXCOLOR( float fr, float fg, float fb, float fa ) +{ + r = fr; + g = fg; + b = fb; + a = fa; +} + + +// casting +D3DXINLINE +D3DXCOLOR::operator DWORD () const +{ + DWORD dwR = r >= 1.0f ? 0xff : r <= 0.0f ? 0x00 : (DWORD) (r * 255.0f + 0.5f); + DWORD dwG = g >= 1.0f ? 0xff : g <= 0.0f ? 0x00 : (DWORD) (g * 255.0f + 0.5f); + DWORD dwB = b >= 1.0f ? 0xff : b <= 0.0f ? 0x00 : (DWORD) (b * 255.0f + 0.5f); + DWORD dwA = a >= 1.0f ? 0xff : a <= 0.0f ? 0x00 : (DWORD) (a * 255.0f + 0.5f); + + return (dwA << 24) | (dwR << 16) | (dwG << 8) | dwB; +} + + +D3DXINLINE +D3DXCOLOR::operator float * () +{ + return (float *) &r; +} + +D3DXINLINE +D3DXCOLOR::operator const float * () const +{ + return (const float *) &r; +} + + +D3DXINLINE +D3DXCOLOR::operator D3DCOLORVALUE * () +{ + return (D3DCOLORVALUE *) &r; +} + +D3DXINLINE +D3DXCOLOR::operator const D3DCOLORVALUE * () const +{ + return (const D3DCOLORVALUE *) &r; +} + + +D3DXINLINE +D3DXCOLOR::operator D3DCOLORVALUE& () +{ + return *((D3DCOLORVALUE *) &r); +} + +D3DXINLINE +D3DXCOLOR::operator const D3DCOLORVALUE& () const +{ + return *((const D3DCOLORVALUE *) &r); +} + + +// assignment operators +D3DXINLINE D3DXCOLOR& +D3DXCOLOR::operator += ( const D3DXCOLOR& c ) +{ + r += c.r; + g += c.g; + b += c.b; + a += c.a; + return *this; +} + +D3DXINLINE D3DXCOLOR& +D3DXCOLOR::operator -= ( const D3DXCOLOR& c ) +{ + r -= c.r; + g -= c.g; + b -= c.b; + a -= c.a; + return *this; +} + +D3DXINLINE D3DXCOLOR& +D3DXCOLOR::operator *= ( float f ) +{ + r *= f; + g *= f; + b *= f; + a *= f; + return *this; +} + +D3DXINLINE D3DXCOLOR& +D3DXCOLOR::operator /= ( float f ) +{ + float fInv = 1.0f / f; + r *= fInv; + g *= fInv; + b *= fInv; + a *= fInv; + return *this; +} + + +// unary operators +D3DXINLINE D3DXCOLOR +D3DXCOLOR::operator + () const +{ + return *this; +} + +D3DXINLINE D3DXCOLOR +D3DXCOLOR::operator - () const +{ + return D3DXCOLOR(-r, -g, -b, -a); +} + + +// binary operators +D3DXINLINE D3DXCOLOR +D3DXCOLOR::operator + ( const D3DXCOLOR& c ) const +{ + return D3DXCOLOR(r + c.r, g + c.g, b + c.b, a + c.a); +} + +D3DXINLINE D3DXCOLOR +D3DXCOLOR::operator - ( const D3DXCOLOR& c ) const +{ + return D3DXCOLOR(r - c.r, g - c.g, b - c.b, a - c.a); +} + +D3DXINLINE D3DXCOLOR +D3DXCOLOR::operator * ( float f ) const +{ + return D3DXCOLOR(r * f, g * f, b * f, a * f); +} + +D3DXINLINE D3DXCOLOR +D3DXCOLOR::operator / ( float f ) const +{ + float fInv = 1.0f / f; + return D3DXCOLOR(r * fInv, g * fInv, b * fInv, a * fInv); +} + + +D3DXINLINE D3DXCOLOR +operator * (float f, const D3DXCOLOR& c ) +{ + return D3DXCOLOR(f * c.r, f * c.g, f * c.b, f * c.a); +} + + +D3DXINLINE BOOL +D3DXCOLOR::operator == ( const D3DXCOLOR& c ) const +{ + return r == c.r && g == c.g && b == c.b && a == c.a; +} + +D3DXINLINE BOOL +D3DXCOLOR::operator != ( const D3DXCOLOR& c ) const +{ + return r != c.r || g != c.g || b != c.b || a != c.a; +} + + +#endif //__cplusplus + + + +//=========================================================================== +// +// Inline functions +// +//=========================================================================== + + +//-------------------------- +// 2D Vector +//-------------------------- + +D3DXINLINE float D3DXVec2Length + ( const D3DXVECTOR2 *pV ) +{ +#ifdef D3DX_DEBUG + if(!pV) + return 0.0f; +#endif + +#ifdef __cplusplus + return sqrtf(pV->x * pV->x + pV->y * pV->y); +#else + return (float) sqrt(pV->x * pV->x + pV->y * pV->y); +#endif +} + +D3DXINLINE float D3DXVec2LengthSq + ( const D3DXVECTOR2 *pV ) +{ +#ifdef D3DX_DEBUG + if(!pV) + return 0.0f; +#endif + + return pV->x * pV->x + pV->y * pV->y; +} + +D3DXINLINE float D3DXVec2Dot + ( const D3DXVECTOR2 *pV1, const D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pV1 || !pV2) + return 0.0f; +#endif + + return pV1->x * pV2->x + pV1->y * pV2->y; +} + +D3DXINLINE float D3DXVec2CCW + ( const D3DXVECTOR2 *pV1, const D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pV1 || !pV2) + return 0.0f; +#endif + + return pV1->x * pV2->y - pV1->y * pV2->x; +} + +D3DXINLINE D3DXVECTOR2* D3DXVec2Add + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV1, const D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + pV2->x; + pOut->y = pV1->y + pV2->y; + return pOut; +} + +D3DXINLINE D3DXVECTOR2* D3DXVec2Subtract + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV1, const D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x - pV2->x; + pOut->y = pV1->y - pV2->y; + return pOut; +} + +D3DXINLINE D3DXVECTOR2* D3DXVec2Minimize + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV1, const D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x < pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y < pV2->y ? pV1->y : pV2->y; + return pOut; +} + +D3DXINLINE D3DXVECTOR2* D3DXVec2Maximize + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV1, const D3DXVECTOR2 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x > pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y > pV2->y ? pV1->y : pV2->y; + return pOut; +} + +D3DXINLINE D3DXVECTOR2* D3DXVec2Scale + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV, float s ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV) + return NULL; +#endif + + pOut->x = pV->x * s; + pOut->y = pV->y * s; + return pOut; +} + +D3DXINLINE D3DXVECTOR2* D3DXVec2Lerp + ( D3DXVECTOR2 *pOut, const D3DXVECTOR2 *pV1, const D3DXVECTOR2 *pV2, + float s ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + s * (pV2->x - pV1->x); + pOut->y = pV1->y + s * (pV2->y - pV1->y); + return pOut; +} + + +//-------------------------- +// 3D Vector +//-------------------------- + +D3DXINLINE float D3DXVec3Length + ( const D3DXVECTOR3 *pV ) +{ +#ifdef D3DX_DEBUG + if(!pV) + return 0.0f; +#endif + +#ifdef __cplusplus + return sqrtf(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z); +#else + return (float) sqrt(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z); +#endif +} + +D3DXINLINE float D3DXVec3LengthSq + ( const D3DXVECTOR3 *pV ) +{ +#ifdef D3DX_DEBUG + if(!pV) + return 0.0f; +#endif + + return pV->x * pV->x + pV->y * pV->y + pV->z * pV->z; +} + +D3DXINLINE float D3DXVec3Dot + ( const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pV1 || !pV2) + return 0.0f; +#endif + + return pV1->x * pV2->x + pV1->y * pV2->y + pV1->z * pV2->z; +} + +D3DXINLINE D3DXVECTOR3* D3DXVec3Cross + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pV2 ) +{ + D3DXVECTOR3 v; + +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + v.x = pV1->y * pV2->z - pV1->z * pV2->y; + v.y = pV1->z * pV2->x - pV1->x * pV2->z; + v.z = pV1->x * pV2->y - pV1->y * pV2->x; + + *pOut = v; + return pOut; +} + +D3DXINLINE D3DXVECTOR3* D3DXVec3Add + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + pV2->x; + pOut->y = pV1->y + pV2->y; + pOut->z = pV1->z + pV2->z; + return pOut; +} + +D3DXINLINE D3DXVECTOR3* D3DXVec3Subtract + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x - pV2->x; + pOut->y = pV1->y - pV2->y; + pOut->z = pV1->z - pV2->z; + return pOut; +} + +D3DXINLINE D3DXVECTOR3* D3DXVec3Minimize + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x < pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y < pV2->y ? pV1->y : pV2->y; + pOut->z = pV1->z < pV2->z ? pV1->z : pV2->z; + return pOut; +} + +D3DXINLINE D3DXVECTOR3* D3DXVec3Maximize + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x > pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y > pV2->y ? pV1->y : pV2->y; + pOut->z = pV1->z > pV2->z ? pV1->z : pV2->z; + return pOut; +} + +D3DXINLINE D3DXVECTOR3* D3DXVec3Scale + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV, float s) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV) + return NULL; +#endif + + pOut->x = pV->x * s; + pOut->y = pV->y * s; + pOut->z = pV->z * s; + return pOut; +} + +D3DXINLINE D3DXVECTOR3* D3DXVec3Lerp + ( D3DXVECTOR3 *pOut, const D3DXVECTOR3 *pV1, const D3DXVECTOR3 *pV2, + float s ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + s * (pV2->x - pV1->x); + pOut->y = pV1->y + s * (pV2->y - pV1->y); + pOut->z = pV1->z + s * (pV2->z - pV1->z); + return pOut; +} + + +//-------------------------- +// 4D Vector +//-------------------------- + +D3DXINLINE float D3DXVec4Length + ( const D3DXVECTOR4 *pV ) +{ +#ifdef D3DX_DEBUG + if(!pV) + return 0.0f; +#endif + +#ifdef __cplusplus + return sqrtf(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z + pV->w * pV->w); +#else + return (float) sqrt(pV->x * pV->x + pV->y * pV->y + pV->z * pV->z + pV->w * pV->w); +#endif +} + +D3DXINLINE float D3DXVec4LengthSq + ( const D3DXVECTOR4 *pV ) +{ +#ifdef D3DX_DEBUG + if(!pV) + return 0.0f; +#endif + + return pV->x * pV->x + pV->y * pV->y + pV->z * pV->z + pV->w * pV->w; +} + +D3DXINLINE float D3DXVec4Dot + ( const D3DXVECTOR4 *pV1, const D3DXVECTOR4 *pV2 ) +{ +#ifdef D3DX_DEBUG + if(!pV1 || !pV2) + return 0.0f; +#endif + + return pV1->x * pV2->x + pV1->y * pV2->y + pV1->z * pV2->z + pV1->w * pV2->w; +} + +D3DXINLINE D3DXVECTOR4* D3DXVec4Add + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV1, const D3DXVECTOR4 *pV2) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + pV2->x; + pOut->y = pV1->y + pV2->y; + pOut->z = pV1->z + pV2->z; + pOut->w = pV1->w + pV2->w; + return pOut; +} + +D3DXINLINE D3DXVECTOR4* D3DXVec4Subtract + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV1, const D3DXVECTOR4 *pV2) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x - pV2->x; + pOut->y = pV1->y - pV2->y; + pOut->z = pV1->z - pV2->z; + pOut->w = pV1->w - pV2->w; + return pOut; +} + +D3DXINLINE D3DXVECTOR4* D3DXVec4Minimize + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV1, const D3DXVECTOR4 *pV2) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x < pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y < pV2->y ? pV1->y : pV2->y; + pOut->z = pV1->z < pV2->z ? pV1->z : pV2->z; + pOut->w = pV1->w < pV2->w ? pV1->w : pV2->w; + return pOut; +} + +D3DXINLINE D3DXVECTOR4* D3DXVec4Maximize + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV1, const D3DXVECTOR4 *pV2) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x > pV2->x ? pV1->x : pV2->x; + pOut->y = pV1->y > pV2->y ? pV1->y : pV2->y; + pOut->z = pV1->z > pV2->z ? pV1->z : pV2->z; + pOut->w = pV1->w > pV2->w ? pV1->w : pV2->w; + return pOut; +} + +D3DXINLINE D3DXVECTOR4* D3DXVec4Scale + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV, float s) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV) + return NULL; +#endif + + pOut->x = pV->x * s; + pOut->y = pV->y * s; + pOut->z = pV->z * s; + pOut->w = pV->w * s; + return pOut; +} + +D3DXINLINE D3DXVECTOR4* D3DXVec4Lerp + ( D3DXVECTOR4 *pOut, const D3DXVECTOR4 *pV1, const D3DXVECTOR4 *pV2, + float s ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pV1 || !pV2) + return NULL; +#endif + + pOut->x = pV1->x + s * (pV2->x - pV1->x); + pOut->y = pV1->y + s * (pV2->y - pV1->y); + pOut->z = pV1->z + s * (pV2->z - pV1->z); + pOut->w = pV1->w + s * (pV2->w - pV1->w); + return pOut; +} + + +//-------------------------- +// 4D Matrix +//-------------------------- + +D3DXINLINE D3DXMATRIX* D3DXMatrixIdentity + ( D3DXMATRIX *pOut ) +{ +#ifdef D3DX_DEBUG + if(!pOut) + return NULL; +#endif + + pOut->m[0][1] = pOut->m[0][2] = pOut->m[0][3] = + pOut->m[1][0] = pOut->m[1][2] = pOut->m[1][3] = + pOut->m[2][0] = pOut->m[2][1] = pOut->m[2][3] = + pOut->m[3][0] = pOut->m[3][1] = pOut->m[3][2] = 0.0f; + + pOut->m[0][0] = pOut->m[1][1] = pOut->m[2][2] = pOut->m[3][3] = 1.0f; + return pOut; +} + + +D3DXINLINE BOOL D3DXMatrixIsIdentity + ( const D3DXMATRIX *pM ) +{ +#ifdef D3DX_DEBUG + if(!pM) + return FALSE; +#endif + + return pM->m[0][0] == 1.0f && pM->m[0][1] == 0.0f && pM->m[0][2] == 0.0f && pM->m[0][3] == 0.0f && + pM->m[1][0] == 0.0f && pM->m[1][1] == 1.0f && pM->m[1][2] == 0.0f && pM->m[1][3] == 0.0f && + pM->m[2][0] == 0.0f && pM->m[2][1] == 0.0f && pM->m[2][2] == 1.0f && pM->m[2][3] == 0.0f && + pM->m[3][0] == 0.0f && pM->m[3][1] == 0.0f && pM->m[3][2] == 0.0f && pM->m[3][3] == 1.0f; +} + + +//-------------------------- +// Quaternion +//-------------------------- + +D3DXINLINE float D3DXQuaternionLength + ( const D3DXQUATERNION *pQ ) +{ +#ifdef D3DX_DEBUG + if(!pQ) + return 0.0f; +#endif + +#ifdef __cplusplus + return sqrtf(pQ->x * pQ->x + pQ->y * pQ->y + pQ->z * pQ->z + pQ->w * pQ->w); +#else + return (float) sqrt(pQ->x * pQ->x + pQ->y * pQ->y + pQ->z * pQ->z + pQ->w * pQ->w); +#endif +} + +D3DXINLINE float D3DXQuaternionLengthSq + ( const D3DXQUATERNION *pQ ) +{ +#ifdef D3DX_DEBUG + if(!pQ) + return 0.0f; +#endif + + return pQ->x * pQ->x + pQ->y * pQ->y + pQ->z * pQ->z + pQ->w * pQ->w; +} + +D3DXINLINE float D3DXQuaternionDot + ( const D3DXQUATERNION *pQ1, const D3DXQUATERNION *pQ2 ) +{ +#ifdef D3DX_DEBUG + if(!pQ1 || !pQ2) + return 0.0f; +#endif + + return pQ1->x * pQ2->x + pQ1->y * pQ2->y + pQ1->z * pQ2->z + pQ1->w * pQ2->w; +} + + +D3DXINLINE D3DXQUATERNION* D3DXQuaternionIdentity + ( D3DXQUATERNION *pOut ) +{ +#ifdef D3DX_DEBUG + if(!pOut) + return NULL; +#endif + + pOut->x = pOut->y = pOut->z = 0.0f; + pOut->w = 1.0f; + return pOut; +} + +D3DXINLINE BOOL D3DXQuaternionIsIdentity + ( const D3DXQUATERNION *pQ ) +{ +#ifdef D3DX_DEBUG + if(!pQ) + return FALSE; +#endif + + return pQ->x == 0.0f && pQ->y == 0.0f && pQ->z == 0.0f && pQ->w == 1.0f; +} + + +D3DXINLINE D3DXQUATERNION* D3DXQuaternionConjugate + ( D3DXQUATERNION *pOut, const D3DXQUATERNION *pQ ) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pQ) + return NULL; +#endif + + pOut->x = -pQ->x; + pOut->y = -pQ->y; + pOut->z = -pQ->z; + pOut->w = pQ->w; + return pOut; +} + + +//-------------------------- +// Plane +//-------------------------- + +D3DXINLINE float D3DXPlaneDot + ( const D3DXPLANE *pP, const D3DXVECTOR4 *pV) +{ +#ifdef D3DX_DEBUG + if(!pP || !pV) + return 0.0f; +#endif + + return pP->a * pV->x + pP->b * pV->y + pP->c * pV->z + pP->d * pV->w; +} + +D3DXINLINE float D3DXPlaneDotCoord + ( const D3DXPLANE *pP, const D3DXVECTOR3 *pV) +{ +#ifdef D3DX_DEBUG + if(!pP || !pV) + return 0.0f; +#endif + + return pP->a * pV->x + pP->b * pV->y + pP->c * pV->z + pP->d; +} + +D3DXINLINE float D3DXPlaneDotNormal + ( const D3DXPLANE *pP, const D3DXVECTOR3 *pV) +{ +#ifdef D3DX_DEBUG + if(!pP || !pV) + return 0.0f; +#endif + + return pP->a * pV->x + pP->b * pV->y + pP->c * pV->z; +} + + +//-------------------------- +// Color +//-------------------------- + +D3DXINLINE D3DXCOLOR* D3DXColorNegative + (D3DXCOLOR *pOut, const D3DXCOLOR *pC) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pC) + return NULL; +#endif + + pOut->r = 1.0f - pC->r; + pOut->g = 1.0f - pC->g; + pOut->b = 1.0f - pC->b; + pOut->a = pC->a; + return pOut; +} + +D3DXINLINE D3DXCOLOR* D3DXColorAdd + (D3DXCOLOR *pOut, const D3DXCOLOR *pC1, const D3DXCOLOR *pC2) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pC1 || !pC2) + return NULL; +#endif + + pOut->r = pC1->r + pC2->r; + pOut->g = pC1->g + pC2->g; + pOut->b = pC1->b + pC2->b; + pOut->a = pC1->a + pC2->a; + return pOut; +} + +D3DXINLINE D3DXCOLOR* D3DXColorSubtract + (D3DXCOLOR *pOut, const D3DXCOLOR *pC1, const D3DXCOLOR *pC2) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pC1 || !pC2) + return NULL; +#endif + + pOut->r = pC1->r - pC2->r; + pOut->g = pC1->g - pC2->g; + pOut->b = pC1->b - pC2->b; + pOut->a = pC1->a - pC2->a; + return pOut; +} + +D3DXINLINE D3DXCOLOR* D3DXColorScale + (D3DXCOLOR *pOut, const D3DXCOLOR *pC, float s) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pC) + return NULL; +#endif + + pOut->r = pC->r * s; + pOut->g = pC->g * s; + pOut->b = pC->b * s; + pOut->a = pC->a * s; + return pOut; +} + +D3DXINLINE D3DXCOLOR* D3DXColorModulate + (D3DXCOLOR *pOut, const D3DXCOLOR *pC1, const D3DXCOLOR *pC2) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pC1 || !pC2) + return NULL; +#endif + + pOut->r = pC1->r * pC2->r; + pOut->g = pC1->g * pC2->g; + pOut->b = pC1->b * pC2->b; + pOut->a = pC1->a * pC2->a; + return pOut; +} + +D3DXINLINE D3DXCOLOR* D3DXColorLerp + (D3DXCOLOR *pOut, const D3DXCOLOR *pC1, const D3DXCOLOR *pC2, float s) +{ +#ifdef D3DX_DEBUG + if(!pOut || !pC1 || !pC2) + return NULL; +#endif + + pOut->r = pC1->r + s * (pC2->r - pC1->r); + pOut->g = pC1->g + s * (pC2->g - pC1->g); + pOut->b = pC1->b + s * (pC2->b - pC1->b); + pOut->a = pC1->a + s * (pC2->a - pC1->a); + return pOut; +} + + +#endif // __D3DXMATH_INL__ diff --git a/windows_libs/mssdk/include/d3dxshapes.h b/windows_libs/mssdk/include/d3dxshapes.h new file mode 100644 index 00000000..22dbfe12 --- /dev/null +++ b/windows_libs/mssdk/include/d3dxshapes.h @@ -0,0 +1,209 @@ +/////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved. +// +// File: d3dxshapes.h +// Content: D3DX simple shapes +// +/////////////////////////////////////////////////////////////////////////// + +#ifndef __D3DXSHAPES_H__ +#define __D3DXSHAPES_H__ + +#include +#include +#include "d3dxerr.h" + + +typedef struct ID3DXSimpleShape *LPD3DXSIMPLESHAPE; + +// {CFCD4602-EB7B-11d2-A440-00A0C90629A8} +DEFINE_GUID( IID_ID3DXSimpleShape, +0xcfcd4602, 0xeb7b, 0x11d2, 0xa4, 0x40, 0x0, 0xa0, 0xc9, 0x6, 0x29, 0xa8 ); + + +/////////////////////////////////////////////////////////////////////////// +// Interfaces: +/////////////////////////////////////////////////////////////////////////// + +//------------------------------------------------------------------------- +// ID3DXSimpleShape interface: +//------------------------------------------------------------------------- + +DECLARE_INTERFACE_(ID3DXSimpleShape, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID* ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + // ID3DXSimpleShape methods + STDMETHOD_(LPDIRECT3DVERTEXBUFFER7, GetVB)(THIS) PURE; + STDMETHOD_(DWORD, GetIndices)(THIS_ LPWORD *ppIndices) PURE; + STDMETHOD(Draw)(THIS) PURE; +}; + + + +/////////////////////////////////////////////////////////////////////////// +// Functions: +/////////////////////////////////////////////////////////////////////////// + +#ifdef __cplusplus +extern "C" { +#endif //__cplusplus + + +//------------------------------------------------------------------------- +// D3DXCreatePolygon: Creates an 'n' sided polygon using the device +// ---------------- specified. It returns a vertex buffer that can be used +// for drawing or manipulation by the program later on. +// +// Params: +// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off. +// [in] float sideSize: Length of a side. +// [in] DWORD numTexCoords: The number of texture coordinates desired +// in the vertex-buffer. (Default is 1) +// D3DX_DEFAULT is a valid input. +// [out] IDirect3DVertexBuffer7** ppVB: The output shape interface. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreatePolygon(LPDIRECT3DDEVICE7 pDevice, + float sideSize, + DWORD numSides, + DWORD numTexCoords, + LPD3DXSIMPLESHAPE* ppShape ); + +//------------------------------------------------------------------------- +// D3DXCreateBox: Creates a box (cuboid) of given dimensions using the +// ------------ device. It returns a vertex buffer that can +// be used for drawing or manipulation by the program later on. +// +// Params: +// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off. +// [in] float width: Width of the box (along x-axis) +// [in] float height: Height of the box (along y-axis) +// [in] float depth: Depth of the box (along z-axis) +// [in] DWORD numTexCoords: The number of texture coordinates desired +// in the vertex-buffer. Default is 1. +// D3DX_DEFAULT is a valid input here. +// [out] LPD3DXSIMPLESHAPE* ppShape: The output vertex-buffer. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateBox(LPDIRECT3DDEVICE7 pDevice, + float width, + float height, + float depth, + DWORD numTexCoords, + LPD3DXSIMPLESHAPE* ppShape ); + +//------------------------------------------------------------------------- +// D3DXCreateCylinder: Creates a cylinder of given dimensions using the +// ----------------- device. It returns a vertex buffer that +// can be used for drawing or manipulation by the program +// later on. +// +// Params: +// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off. +// [in] float baseRadius: Base-radius (default is 1.0f, shd be >= 0.0f) +// [in] float topRadius: Top-radius (default is 1.0f, shd be >= 0.0f) +// [in] float height: Height (default is 1.0f, shd be >= 0.0f) +// [in] DWORD numSlices: Number of slices about the main axis. +// (default is 8) D3DX_DEFAULT is a valid input. +// [in] DWORD numStacks: Number of stacks along the main axis. +// (default is 8) D3DX_DEFAULT is a valid input. +// [in] DWORD numTexCoords: The number of texture coordinates desired +// in the vertex-buffer. Default is 1. +// D3DX_DEFAULT is a valid input here. +// [out] LPD3DXSIMPLESHAPE* ppShape: The output shape interface. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateCylinder(LPDIRECT3DDEVICE7 pDevice, + float baseRadius, + float topRadius, + float height, + DWORD numSlices, + DWORD numStacks, + DWORD numTexCoords, + LPD3DXSIMPLESHAPE* ppShape ); + + +//------------------------------------------------------------------------- +// D3DXCreateTorus: Creates a torus of given dimensions using the +// -------------- device specified. It returns a vertex buffer that can +// be used for drawing or manipulation by the program later +// on. It draws a doughnut, centered at (0, 0, 0) whose axis +// is aligned with the z-axis. With the innerRadius used +// as the radius of the cross-section (minor-Radius) and +// the outerRadius used as the radius of the central 'hole'. +// +// Params: +// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off. +// [in] float innerRadius: inner radius (default is 1.0f, shd be >= 0.0f) +// [in] float outerRadius: outer radius (default is 2.0f, shd be >= 0.0f) +// [in] DWORD numSides: Number of sides in the cross-section +// (default is 8). D3DX_DEFAULT is a valid input. +// [in] DWORD numRings: Number of rings making up the torus +// (default is 8) D3DX_DEFAULT is a valid input. +// [in] DWORD numTexCoords: The number of texture coordinates desired +// in the vertex-buffer. Default is 1. +// D3DX_DEFAULT is a valid input here. +// [out] LPD3DXSIMPLESHAPE* ppShape: The output shape interface. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateTorus(LPDIRECT3DDEVICE7 pDevice, + float innerRadius, + float outerRadius, + DWORD numSides, + DWORD numRings, + DWORD numTexCoords, + LPD3DXSIMPLESHAPE* ppShape ); + +//------------------------------------------------------------------------- +// D3DXCreateTeapot: Creates a teapot using the device specified. +// ---------------- It returns a vertex buffer that can be used for +// drawing or manipulation by the program later on. +// +// Params: +// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off. +// [in] DWORD numTexCoords: The number of texture coordinates desired +// in the vertex-buffer. Default is 1. +// D3DX_DEFAULT is a valid input here. +// [out] LPD3DXSIMPLESHAPE* ppShape: The output shape interface. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateTeapot(LPDIRECT3DDEVICE7 pDevice, + DWORD numTexCoords, + LPD3DXSIMPLESHAPE* ppShape); + +//------------------------------------------------------------------------- +// D3DXCreateSphere: Creates a cylinder of given dimensions using the +// ---------------- device specified. +// It returns a vertex buffer that can be used for +// drawing or manipulation by the program later on. +// +// Params: +// [in] LPDIRECT3DDEVICE7 pDevice: The device to create off. +// [in] float radius: radius (default is 1.0f, shd be >= 0.0f) +// [in] float height: Height (default is 1.0f, shd be >= 0.0f) +// [in] DWORD numSlices: Number of slices about the main axis +// (default is 8) D3DX_DEFAULT is a valid input. +// [in] DWORD numStacks: Number of stacks along the main axis +// (default is 8) D3DX_DEFAULT is a valid input. +// [in] DWORD numTexCoords: The number of texture coordinates desired +// in the vertex-buffer. Default is 1. +// D3DX_DEFAULT is a valid input here. +// [out] LPD3DXSIMPLESHAPE* ppShape: The output shape interface. +//------------------------------------------------------------------------- +HRESULT WINAPI + D3DXCreateSphere(LPDIRECT3DDEVICE7 pDevice, + float radius, + DWORD numSlices, + DWORD numStacks, + DWORD numTexCoords, + LPD3DXSIMPLESHAPE* ppShape); + +#ifdef __cplusplus +} +#endif //__cplusplus +#endif //__D3DXSHAPES_H__ diff --git a/windows_libs/mssdk/include/d3dxsprite.h b/windows_libs/mssdk/include/d3dxsprite.h new file mode 100644 index 00000000..26cc0659 --- /dev/null +++ b/windows_libs/mssdk/include/d3dxsprite.h @@ -0,0 +1,321 @@ +/////////////////////////////////////////////////////////////////////////// +// +// Copyright (C) 1999 Microsoft Corporation. All Rights Reserved. +// +// File: d3dxsprite.h +// Content: D3DX sprite helper functions +// +// These functions allow you to use sprites with D3DX. A "sprite" is +// loosely defined as a 2D image that you want to transfer to the +// rendering target. The source image can be a texture created +// with the help of the D3DX texture loader; though advanced users may +// want to create their own. A helper function (PrepareDeviceForSprite) +// is provided to make it easy to set up render states on a device. +// (Again, advanced users can use their own created devices.) +// +// There are two general techniques for sprites; the simpler one just +// specifies a destination rectangle and a rotation anlge. A more +// powerful technique supports rendering to non-rectangular quads. +// +// Both techniques support clipping, alpha, and rotation. More +// details are below. +// +/////////////////////////////////////////////////////////////////////////// + +#ifndef __D3DXSPRITE_H__ +#define __D3DXSPRITE_H__ + +#include +#include +#include "d3dxerr.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +//------------------------------------------------------------------------- +// D3DXPrepareDeviceForSprite: +// +// Call this function to set up all the render states necessary for +// BltSprite/WarpSprite to work correctly. (Advanced users may opt to +// not call this function first; in which case Blt/WarpSprite functions +// will use whatever render/texture states were set up on the device when +// they are called.) +// +// Warning: This function modifies render states and may impact performance +// negatively on some 3D hardware if it is called too often per frame. +// +// Warning: If the render state changes (other than through calls to +// BltSprite or WarpSprite), you will need to call this function again before +// calling BltSprite or WarpSprite. +// +// Details: This function modifies the the rendering first texture stage and +// it modifies some renderstates for the entire device. Here is the exact +// list: +// +// SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE); +// SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); +// SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE); +// SetTextureStageState(0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE); +// SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE); +// SetTextureStageState(0, D3DTSS_MINFILTER, D3DTFN_LINEAR); +// SetTextureStageState(0, D3DTSS_MAGFILTER, D3DTFG_LINEAR); +// +// SetRenderState(D3DRENDERSTATE_SRCBLEND, D3DBLEND_SRCALPHA); +// SetRenderState(D3DRENDERSTATE_DESTBLEND, D3DBLEND_INVSRCALPHA); +// SetRenderState(D3DRENDERSTATE_ALPHABLENDENABLE, TRUE); +// +// Depending on the value of ZEnable parameter, this function will +// will either call +// SetRenderState(D3DRENDERSTATE_ZENABLE, FALSE); +// - or - +// SetRenderState(D3DRENDERSTATE_ZENABLE, TRUE); +// +// Parameters: +// pd3dDevice - a pointer to the d3d device that you wish to prepare +// for use with D3DX Sprite Services +// ZEnable - a flag indicating whether you want the sprites to +// check and update the Z buffer as part of rendering. +// If ZEnable is FALSE, OR you are using +// alpha-blending, then it is necessary to render your +// sprites from back-to-front. +// +//------------------------------------------------------------------------- + +#ifdef __cplusplus +HRESULT WINAPI + D3DXPrepareDeviceForSprite( LPDIRECT3DDEVICE7 pd3dDevice, + BOOL ZEnable = FALSE); +#else +HRESULT WINAPI + D3DXPrepareDeviceForSprite( LPDIRECT3DDEVICE7 pd3dDevice, + BOOL ZEnable); +#endif + + + +//------------------------------------------------------------------------- +// The D3DXDrawBasicSprite() function performs blitting of source images onto +// a 3D rendering device. This function only calls SetTexture on the first +// renderstage with the parameter (pd3dTexture) if that parameter is non-null. +// This function assumes that D3DXPrepareDeviceForSprite has been called on +// the device or that caller has in some other way correctly prepared the +// renderstates. +// +// This function supports scaling, rotations, alpha-blending, and choosing +// a source sub-rect. +// +// Rotation angle is specified in radians. Both rotations and scales +// are applied around the center of the sprite; where the center of the +// sprite is half the width/height of the sprite, plus the offset parameter. +// +// Use the offset parameter if you want the sprite's center to be something +// other than the image center. +// +// The destination point indicates where you would like the center of +// the sprite to draw to. +// +// Parameters: +// pd3dTexture - a pointer to the surface containing the texture +// pd3dDevice - a pointer to the d3d device to render to. It is +// assumed that render states are set up. (See +// D3DXPrepareDeviceForSprite) +// ppointDest - a pointer to the target point for the sprite. The +// components of the vector must be in screen +// space. +// alpha - alpha value to apply to sprite. 1.0 means totally +// opaque; and 0.0 means totally transparent. +// WARNING: If you are using alpha, then you should render +// from back to front in order to avoid rendering +// artifacts. +// angleRad - angle of rotation around the 'center' of the rect +// scale - a uniform scale that is applied to the source rect +// to specify the size of the image that is rendered +// pOffset - offset from the center of the source rect to use as the +// center of rotation +// pSourceRect - a rect that indicates what portion of the source +// source texture to use. If NULL is passed, then the +// entire source is used. If the source texture was +// created via D3DX, then the rect should be specified +// in the coordinates of the original image (so that you +// don't have to worry about stretching/scaling that D3DX +// may have done to make the image work with your current +// 3D Device.) Note that horizontal or vertical mirroring +// may be simply accomplished by swapping the left/right +// or top/bottom fields of this RECT. +//------------------------------------------------------------------------- + +#ifdef __cplusplus +HRESULT WINAPI + D3DXDrawSpriteSimple(LPDIRECTDRAWSURFACE7 pd3dTexture, + LPDIRECT3DDEVICE7 pd3dDevice, + const D3DXVECTOR3 *ppointDest, + float alpha = 1.0f, + float scale = 1.0f, + float angleRad = 0.0f, + const D3DXVECTOR2 *pOffset = NULL, + const RECT *pSourceRect = NULL); +#else +HRESULT WINAPI + D3DXDrawSpriteSimple(LPDIRECTDRAWSURFACE7 pd3dTexture, + LPDIRECT3DDEVICE7 pd3dDevice, + D3DXVECTOR3 *ppointDest, + float alpha, + float scale, + float angleRad, + D3DXVECTOR2 *pOffset, + RECT *pSourceRect); +#endif + +//------------------------------------------------------------------------- +// The D3DXDrawSprite() function transforms source images onto a 3D +// rendering device. It takes a general 4x4 matrix which is use to transform +// the points of a default rect: (left=-.5, top=-.5, right=+.5, bottom=+.5). +// (This default rect was chosen so that it was centered around the origin +// to ease setting up rotations. And it was chosen to have a width/height of one +// to ease setting up scales.) +// +// This function only calls SetTexture on the first +// renderstage with the parameter (pd3dTexture) if that parameter is non-null. +// This function assumes that D3DXPrepareDeviceForSprite has been called on +// the device or that caller has in some other way correctly prepared the +// renderstates. +// +// This function supports alpha-blending, and choosing +// a source sub-rect. (A value of NULL for source sub-rect means the entire +// texture is used.) +// +// Note that if the transformed points have a value for w (the homogenous +// coordinate) that is not 1, then this function will invert it and pass +// that value to D3D as the rhw field of a TLVERTEX. If the value for w is +// zero, then it use 1 as the rhw. +// +// Parameters: +// pd3dTexture - a pointer to the surface containing the texture +// pd3dDevice - a pointer to the d3d device to render to. It is +// assumed that render states are set up. (See +// D3DXPrepareDeviceForSprite) +// pMatrixTransform - 4x4 matrix that specifies the transformation +// that will be applied to the default -.5 to +.5 +// rectangle. +// alpha - alpha value to apply to sprite. 1.0 means totally +// opaque; and 0.0 means totally transparent. +// WARNING: If you are using alpha, then you should render +// from back to front in order to avoid rendering +// artifacts.Furthermore, you should avoid scenarios where +// semi-transparent objects intersect. +// pSourceRect - a rect that indicates what portion of the source +// source texture to use. If NULL is passed, then the +// entire source is used. If the source texture was +// created via D3DX, then the rect should be specified +// in the coordinates of the original image (so that you +// don't have to worry about stretching/scaling that D3DX +// may have done to make the image work with your current +// 3D Device.) Note that mirroring may be simply accomplished +// by swapping the left/right or top/bottom fields of +// this RECT. +// +//------------------------------------------------------------------------- + +#ifdef __cplusplus +HRESULT WINAPI + D3DXDrawSpriteTransform(LPDIRECTDRAWSURFACE7 pd3dTexture, + LPDIRECT3DDEVICE7 pd3dDevice, + const D3DXMATRIX *pMatrixTransform, + float alpha = 1.0f, + const RECT *pSourceRect = NULL); +#else +HRESULT WINAPI + D3DXDrawSpriteTransform(LPDIRECTDRAWSURFACE7 pd3dTexture, + LPDIRECT3DDEVICE7 pd3dDevice, + D3DXMATRIX *pMatrixTransform, + float alpha, + RECT *pSourceRect); +#endif + +//------------------------------------------------------------------------- +// The D3DXBuildSpriteTransform() function is a helper provided which +// creates a matrix corresponding to simple properties. This matrix is +// set up to pass directly to D3DXTransformSprite. +// +// Parameters: +// pMatrix - a pointer to the result matrix +// prectDest - a pointer to the target rectangle for the sprite +// angleRad - angle of rotation around the 'center' of the rect +// pOffset - offset from the center of the source rect to use as the +// center of rotation +// +//------------------------------------------------------------------------- + +#ifdef __cplusplus +void WINAPI + D3DXBuildSpriteTransform(D3DXMATRIX *pMatrix, + const RECT *prectDest, + float angleRad = 0.0f, + const D3DXVECTOR2 *pOffset = NULL); +#else +void WINAPI + D3DXBuildSpriteTransform(D3DXMATRIX *pMatrix, + RECT *prectDest, + float angleRad, + D3DXVECTOR2 *pOffset); +#endif + + +//------------------------------------------------------------------------- +// The D3DXDrawSprite3D() function renders a texture onto a 3D quad. The +// quad ABCD is broken into two triangles ABC and ACD which are rendered +// via DrawPrim. +// +// Parameters: +// pd3dTexture - a pointer to the surface containing the texture +// pd3dDevice - a pointer to the d3d device to render to. It is +// assumed that render states are set up. (See +// D3DXPrepareDeviceForSprite) +// quad - array of 4 points in the following order: +// upper-left, upper-right, lower-right, lower-left. +// If these vectors contain a W, then this function +// will take the reciprocal of that value to pass as +// as the rhw (i.e. reciprocal homogenous w). +// alpha - alpha value to apply to sprite. 1.0 means totally +// opaque; and 0.0 means totally transparent. +// WARNING: If you are using alpha, then you should render +// from back to front in order to avoid rendering +// artifacts.Furthermore, you should avoid scenarios where +// semi-transparent objects intersect. +// pSourceRect - a rect that indicates what portion of the source +// source texture to use. If NULL is passed, then the +// entire source is used. If the source texture was +// created via D3DX, then the rect should be specified +// in the coordinates of the original image (so that you +// don't have to worry about stretching/scaling that D3DX +// may have done to make the image work with your current +// 3D Device.) Note that mirroring may be simply accomplished +// by swapping the left/right or top/bottom fields of +// this RECT. +//------------------------------------------------------------------------- + +#ifdef __cplusplus +HRESULT WINAPI + D3DXDrawSprite3D(LPDIRECTDRAWSURFACE7 pd3dTexture, + LPDIRECT3DDEVICE7 pd3dDevice, + const D3DXVECTOR4 quad[4], + float alpha = 1.0f, + const RECT *pSourceRect = NULL); +#else +HRESULT WINAPI + D3DXDrawSprite3D(LPDIRECTDRAWSURFACE7 pd3dTexture, + LPDIRECT3DDEVICE7 pd3dDevice, + D3DXVECTOR4 quad[4], + float alpha, + RECT *pSourceRect); +#endif + + + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // __D3DXSPRITE_H__ diff --git a/windows_libs/mssdk/include/ddraw.h b/windows_libs/mssdk/include/ddraw.h new file mode 100644 index 00000000..a4c6d77e --- /dev/null +++ b/windows_libs/mssdk/include/ddraw.h @@ -0,0 +1,5668 @@ +/*==========================================================================; + * + * Copyright (C) 1994-1997 Microsoft Corporation. All Rights Reserved. + * + * File: ddraw.h + * Content: DirectDraw include file + * + ***************************************************************************/ + +#ifndef __DDRAW_INCLUDED__ +#define __DDRAW_INCLUDED__ + +//Disable the nameless union warning when building internally +#undef ENABLE_NAMELESS_UNION_PRAGMA +#ifdef DIRECTX_REDIST +#define ENABLE_NAMELESS_UNION_PRAGMA +#endif + +#ifdef ENABLE_NAMELESS_UNION_PRAGMA +#pragma warning(disable:4201) +#endif + +/* + * If you wish an application built against the newest version of DirectDraw + * to run against an older DirectDraw run time then define DIRECTDRAW_VERSION + * to be the earlies version of DirectDraw you wish to run against. For, + * example if you wish an application to run against a DX 3 runtime define + * DIRECTDRAW_VERSION to be 0x0300. + */ +#ifndef DIRECTDRAW_VERSION +#define DIRECTDRAW_VERSION 0x0700 +#endif /* DIRECTDRAW_VERSION */ + +#if defined( _WIN32 ) && !defined( _NO_COM ) +#define COM_NO_WINDOWS_H +#include +#else +#define IUnknown void +#if !defined( NT_BUILD_ENVIRONMENT ) && !defined(WINNT) + #define CO_E_NOTINITIALIZED 0x800401F0L +#endif +#endif + +#define _FACDD 0x876 +#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) + +#ifdef __cplusplus +extern "C" { +#endif + +// +// For compilers that don't support nameless unions, do a +// +// #define NONAMELESSUNION +// +// before #include +// +#ifndef DUMMYUNIONNAMEN +#if defined(__cplusplus) || !defined(NONAMELESSUNION) +#define DUMMYUNIONNAMEN(n) +#else +#define DUMMYUNIONNAMEN(n) u##n +#endif +#endif + +#ifndef MAKEFOURCC + #define MAKEFOURCC(ch0, ch1, ch2, ch3) \ + ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ + ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 )) +#endif //defined(MAKEFOURCC) + +/* + * FOURCC codes for DX compressed-texture pixel formats + */ +#define FOURCC_DXT1 (MAKEFOURCC('D','X','T','1')) +#define FOURCC_DXT2 (MAKEFOURCC('D','X','T','2')) +#define FOURCC_DXT3 (MAKEFOURCC('D','X','T','3')) +#define FOURCC_DXT4 (MAKEFOURCC('D','X','T','4')) +#define FOURCC_DXT5 (MAKEFOURCC('D','X','T','5')) + +/* + * GUIDS used by DirectDraw objects + */ +#if defined( _WIN32 ) && !defined( _NO_COM ) + +DEFINE_GUID( CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35 ); +DEFINE_GUID( CLSID_DirectDraw7, 0x3c305196,0x50db,0x11d3,0x9c,0xfe,0x00,0xc0,0x4f,0xd9,0x30,0xc5 ); +DEFINE_GUID( CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56 ); +DEFINE_GUID( IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 ); +DEFINE_GUID( IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 ); +DEFINE_GUID( IID_IDirectDraw4, 0x9c59509a,0x39bd,0x11d1,0x8c,0x4a,0x00,0xc0,0x4f,0xd9,0x30,0xc5 ); +DEFINE_GUID( IID_IDirectDraw7, 0x15e65ec0,0x3b9c,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b ); +DEFINE_GUID( IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 ); +DEFINE_GUID( IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27 ); +DEFINE_GUID( IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB ); +DEFINE_GUID( IID_IDirectDrawSurface4, 0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B ); +DEFINE_GUID( IID_IDirectDrawSurface7, 0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b ); +DEFINE_GUID( IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 ); +DEFINE_GUID( IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 ); +DEFINE_GUID( IID_IDirectDrawColorControl, 0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 ); +DEFINE_GUID( IID_IDirectDrawGammaControl, 0x69C11C3E,0xB46B,0x11D1,0xAD,0x7A,0x00,0xC0,0x4F,0xC2,0x9B,0x4E ); + +#endif + +/*============================================================================ + * + * DirectDraw Structures + * + * Various structures used to invoke DirectDraw. + * + *==========================================================================*/ + +struct IDirectDraw; +struct IDirectDrawSurface; +struct IDirectDrawPalette; +struct IDirectDrawClipper; + +typedef struct IDirectDraw FAR *LPDIRECTDRAW; +typedef struct IDirectDraw2 FAR *LPDIRECTDRAW2; +typedef struct IDirectDraw4 FAR *LPDIRECTDRAW4; +typedef struct IDirectDraw7 FAR *LPDIRECTDRAW7; +typedef struct IDirectDrawSurface FAR *LPDIRECTDRAWSURFACE; +typedef struct IDirectDrawSurface2 FAR *LPDIRECTDRAWSURFACE2; +typedef struct IDirectDrawSurface3 FAR *LPDIRECTDRAWSURFACE3; +typedef struct IDirectDrawSurface4 FAR *LPDIRECTDRAWSURFACE4; +typedef struct IDirectDrawSurface7 FAR *LPDIRECTDRAWSURFACE7; +typedef struct IDirectDrawPalette FAR *LPDIRECTDRAWPALETTE; +typedef struct IDirectDrawClipper FAR *LPDIRECTDRAWCLIPPER; +typedef struct IDirectDrawColorControl FAR *LPDIRECTDRAWCOLORCONTROL; +typedef struct IDirectDrawGammaControl FAR *LPDIRECTDRAWGAMMACONTROL; + +typedef struct _DDFXROP FAR *LPDDFXROP; +typedef struct _DDSURFACEDESC FAR *LPDDSURFACEDESC; +typedef struct _DDSURFACEDESC2 FAR *LPDDSURFACEDESC2; +typedef struct _DDCOLORCONTROL FAR *LPDDCOLORCONTROL; + +/* + * API's + */ +#if (defined (WIN32) || defined( _WIN32 ) ) && !defined( _NO_COM ) +//#if defined( _WIN32 ) && !defined( _NO_ENUM ) + typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKA)(GUID FAR *, LPSTR, LPSTR, LPVOID); + typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID); + extern HRESULT WINAPI DirectDrawEnumerateW( LPDDENUMCALLBACKW lpCallback, LPVOID lpContext ); + extern HRESULT WINAPI DirectDrawEnumerateA( LPDDENUMCALLBACKA lpCallback, LPVOID lpContext ); + /* + * Protect against old SDKs + */ + #if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500) + #define HMONITOR_DECLARED + DECLARE_HANDLE(HMONITOR); + #endif + typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXA)(GUID FAR *, LPSTR, LPSTR, LPVOID, HMONITOR); + typedef BOOL (FAR PASCAL * LPDDENUMCALLBACKEXW)(GUID FAR *, LPWSTR, LPWSTR, LPVOID, HMONITOR); + extern HRESULT WINAPI DirectDrawEnumerateExW( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags); + extern HRESULT WINAPI DirectDrawEnumerateExA( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags); + typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXA)( LPDDENUMCALLBACKEXA lpCallback, LPVOID lpContext, DWORD dwFlags); + typedef HRESULT (WINAPI * LPDIRECTDRAWENUMERATEEXW)( LPDDENUMCALLBACKEXW lpCallback, LPVOID lpContext, DWORD dwFlags); + + #ifdef UNICODE + typedef LPDDENUMCALLBACKW LPDDENUMCALLBACK; + #define DirectDrawEnumerate DirectDrawEnumerateW + typedef LPDDENUMCALLBACKEXW LPDDENUMCALLBACKEX; + typedef LPDIRECTDRAWENUMERATEEXW LPDIRECTDRAWENUMERATEEX; + #define DirectDrawEnumerateEx DirectDrawEnumerateExW + #else + typedef LPDDENUMCALLBACKA LPDDENUMCALLBACK; + #define DirectDrawEnumerate DirectDrawEnumerateA + typedef LPDDENUMCALLBACKEXA LPDDENUMCALLBACKEX; + typedef LPDIRECTDRAWENUMERATEEXA LPDIRECTDRAWENUMERATEEX; + #define DirectDrawEnumerateEx DirectDrawEnumerateExA + #endif + extern HRESULT WINAPI DirectDrawCreate( GUID FAR *lpGUID, LPDIRECTDRAW FAR *lplpDD, IUnknown FAR *pUnkOuter ); + extern HRESULT WINAPI DirectDrawCreateEx( GUID FAR * lpGuid, LPVOID *lplpDD, REFIID iid,IUnknown FAR *pUnkOuter ); + extern HRESULT WINAPI DirectDrawCreateClipper( DWORD dwFlags, LPDIRECTDRAWCLIPPER FAR *lplpDDClipper, IUnknown FAR *pUnkOuter ); +#endif +/* + * Flags for DirectDrawEnumerateEx + * DirectDrawEnumerateEx supercedes DirectDrawEnumerate. You must use GetProcAddress to + * obtain a function pointer (of type LPDIRECTDRAWENUMERATEEX) to DirectDrawEnumerateEx. + * By default, only the primary display device is enumerated. + * DirectDrawEnumerate is equivalent to DirectDrawEnumerate(,,DDENUM_NONDISPLAYDEVICES) + */ + +/* + * This flag causes enumeration of any GDI display devices which are part of + * the Windows Desktop + */ +#define DDENUM_ATTACHEDSECONDARYDEVICES 0x00000001L + +/* + * This flag causes enumeration of any GDI display devices which are not + * part of the Windows Desktop + */ +#define DDENUM_DETACHEDSECONDARYDEVICES 0x00000002L + +/* + * This flag causes enumeration of non-display devices + */ +#define DDENUM_NONDISPLAYDEVICES 0x00000004L + + +#define REGSTR_KEY_DDHW_DESCRIPTION "Description" +#define REGSTR_KEY_DDHW_DRIVERNAME "DriverName" +#define REGSTR_PATH_DDHW "Hardware\\DirectDrawDrivers" + +#define DDCREATE_HARDWAREONLY 0x00000001l +#define DDCREATE_EMULATIONONLY 0x00000002l + +#if defined(WINNT) || !defined(WIN32) +typedef long HRESULT; +#endif + +//#ifndef WINNT +typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK)(LPDDSURFACEDESC, LPVOID); +typedef HRESULT (FAR PASCAL * LPDDENUMMODESCALLBACK2)(LPDDSURFACEDESC2, LPVOID); +typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK)(LPDIRECTDRAWSURFACE, LPDDSURFACEDESC, LPVOID); +typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK2)(LPDIRECTDRAWSURFACE4, LPDDSURFACEDESC2, LPVOID); +typedef HRESULT (FAR PASCAL * LPDDENUMSURFACESCALLBACK7)(LPDIRECTDRAWSURFACE7, LPDDSURFACEDESC2, LPVOID); +//#endif + +/* + * Generic pixel format with 8-bit RGB and alpha components + */ +typedef struct _DDARGB +{ + BYTE blue; + BYTE green; + BYTE red; + BYTE alpha; +} DDARGB; + +typedef DDARGB FAR *LPDDARGB; + +/* + * This version of the structure remains for backwards source compatibility. + * The DDARGB structure is the one that should be used for all DirectDraw APIs. + */ +typedef struct _DDRGBA +{ + BYTE red; + BYTE green; + BYTE blue; + BYTE alpha; +} DDRGBA; + +typedef DDRGBA FAR *LPDDRGBA; + + +/* + * DDCOLORKEY + */ +typedef struct _DDCOLORKEY +{ + DWORD dwColorSpaceLowValue; // low boundary of color space that is to + // be treated as Color Key, inclusive + DWORD dwColorSpaceHighValue; // high boundary of color space that is + // to be treated as Color Key, inclusive +} DDCOLORKEY; + +typedef DDCOLORKEY FAR* LPDDCOLORKEY; + +/* + * DDBLTFX + * Used to pass override information to the DIRECTDRAWSURFACE callback Blt. + */ +typedef struct _DDBLTFX +{ + DWORD dwSize; // size of structure + DWORD dwDDFX; // FX operations + DWORD dwROP; // Win32 raster operations + DWORD dwDDROP; // Raster operations new for DirectDraw + DWORD dwRotationAngle; // Rotation angle for blt + DWORD dwZBufferOpCode; // ZBuffer compares + DWORD dwZBufferLow; // Low limit of Z buffer + DWORD dwZBufferHigh; // High limit of Z buffer + DWORD dwZBufferBaseDest; // Destination base value + DWORD dwZDestConstBitDepth; // Bit depth used to specify Z constant for destination + union + { + DWORD dwZDestConst; // Constant to use as Z buffer for dest + LPDIRECTDRAWSURFACE lpDDSZBufferDest; // Surface to use as Z buffer for dest + } DUMMYUNIONNAMEN(1); + DWORD dwZSrcConstBitDepth; // Bit depth used to specify Z constant for source + union + { + DWORD dwZSrcConst; // Constant to use as Z buffer for src + LPDIRECTDRAWSURFACE lpDDSZBufferSrc; // Surface to use as Z buffer for src + } DUMMYUNIONNAMEN(2); + DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend + DWORD dwAlphaEdgeBlend; // Alpha for edge blending + DWORD dwReserved; + DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination + union + { + DWORD dwAlphaDestConst; // Constant to use as Alpha Channel + LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as Alpha Channel + } DUMMYUNIONNAMEN(3); + DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source + union + { + DWORD dwAlphaSrcConst; // Constant to use as Alpha Channel + LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as Alpha Channel + } DUMMYUNIONNAMEN(4); + union + { + DWORD dwFillColor; // color in RGB or Palettized + DWORD dwFillDepth; // depth value for z-buffer + DWORD dwFillPixel; // pixel value for RGBA or RGBZ + LPDIRECTDRAWSURFACE lpDDSPattern; // Surface to use as pattern + } DUMMYUNIONNAMEN(5); + DDCOLORKEY ddckDestColorkey; // DestColorkey override + DDCOLORKEY ddckSrcColorkey; // SrcColorkey override +} DDBLTFX; + +typedef DDBLTFX FAR* LPDDBLTFX; + + + +/* + * DDSCAPS + */ +typedef struct _DDSCAPS +{ + DWORD dwCaps; // capabilities of surface wanted +} DDSCAPS; + +typedef DDSCAPS FAR* LPDDSCAPS; + + +/* + * DDOSCAPS + */ +typedef struct _DDOSCAPS +{ + DWORD dwCaps; // capabilities of surface wanted +} DDOSCAPS; + +typedef DDOSCAPS FAR* LPDDOSCAPS; + +/* + * This structure is used internally by DirectDraw. + */ +typedef struct _DDSCAPSEX +{ + DWORD dwCaps2; + DWORD dwCaps3; + union + { + DWORD dwCaps4; + DWORD dwVolumeDepth; + } DUMMYUNIONNAMEN(1); +} DDSCAPSEX, FAR * LPDDSCAPSEX; + +/* + * DDSCAPS2 + */ +typedef struct _DDSCAPS2 +{ + DWORD dwCaps; // capabilities of surface wanted + DWORD dwCaps2; + DWORD dwCaps3; + union + { + DWORD dwCaps4; + DWORD dwVolumeDepth; + } DUMMYUNIONNAMEN(1); +} DDSCAPS2; + +typedef DDSCAPS2 FAR* LPDDSCAPS2; + +/* + * DDCAPS + */ +#define DD_ROP_SPACE (256/32) // space required to store ROP array +/* + * NOTE: Our choosen structure number scheme is to append a single digit to + * the end of the structure giving the version that structure is associated + * with. + */ + +/* + * This structure represents the DDCAPS structure released in DirectDraw 1.0. It is used internally + * by DirectDraw to interpret caps passed into ddraw by drivers written prior to the release of DirectDraw 2.0. + * New applications should use the DDCAPS structure defined below. + */ +typedef struct _DDCAPS_DX1 +{ + DWORD dwSize; // size of the DDDRIVERCAPS structure + DWORD dwCaps; // driver specific capabilities + DWORD dwCaps2; // more driver specific capabilites + DWORD dwCKeyCaps; // color key capabilities of the surface + DWORD dwFXCaps; // driver specific stretching and effects capabilites + DWORD dwFXAlphaCaps; // alpha driver specific capabilities + DWORD dwPalCaps; // palette capabilities + DWORD dwSVCaps; // stereo vision capabilities + DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8 + DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8 + DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8 + DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8 + DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8 + DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8 + DWORD dwZBufferBitDepths; // DDBD_8,16,24,32 + DWORD dwVidMemTotal; // total amount of video memory + DWORD dwVidMemFree; // amount of free video memory + DWORD dwMaxVisibleOverlays; // maximum number of visible overlays + DWORD dwCurrVisibleOverlays; // current number of visible overlays + DWORD dwNumFourCCCodes; // number of four cc codes + DWORD dwAlignBoundarySrc; // source rectangle alignment + DWORD dwAlignSizeSrc; // source rectangle byte size + DWORD dwAlignBoundaryDest; // dest rectangle alignment + DWORD dwAlignSizeDest; // dest rectangle byte size + DWORD dwAlignStrideAlign; // stride alignment + DWORD dwRops[DD_ROP_SPACE]; // ROPS supported + DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities + DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + DWORD dwMinLiveVideoStretch; // OBSOLETE! This field remains for compatability reasons only + DWORD dwMaxLiveVideoStretch; // OBSOLETE! This field remains for compatability reasons only + DWORD dwMinHwCodecStretch; // OBSOLETE! This field remains for compatability reasons only + DWORD dwMaxHwCodecStretch; // OBSOLETE! This field remains for compatability reasons only + DWORD dwReserved1; // reserved + DWORD dwReserved2; // reserved + DWORD dwReserved3; // reserved +} DDCAPS_DX1; + +typedef DDCAPS_DX1 FAR* LPDDCAPS_DX1; + +/* + * This structure is the DDCAPS structure as it was in version 2 and 3 of Direct X. + * It is present for back compatability. + */ +typedef struct _DDCAPS_DX3 +{ + DWORD dwSize; // size of the DDDRIVERCAPS structure + DWORD dwCaps; // driver specific capabilities + DWORD dwCaps2; // more driver specific capabilites + DWORD dwCKeyCaps; // color key capabilities of the surface + DWORD dwFXCaps; // driver specific stretching and effects capabilites + DWORD dwFXAlphaCaps; // alpha driver specific capabilities + DWORD dwPalCaps; // palette capabilities + DWORD dwSVCaps; // stereo vision capabilities + DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8 + DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8 + DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8 + DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8 + DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8 + DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8 + DWORD dwZBufferBitDepths; // DDBD_8,16,24,32 + DWORD dwVidMemTotal; // total amount of video memory + DWORD dwVidMemFree; // amount of free video memory + DWORD dwMaxVisibleOverlays; // maximum number of visible overlays + DWORD dwCurrVisibleOverlays; // current number of visible overlays + DWORD dwNumFourCCCodes; // number of four cc codes + DWORD dwAlignBoundarySrc; // source rectangle alignment + DWORD dwAlignSizeSrc; // source rectangle byte size + DWORD dwAlignBoundaryDest; // dest rectangle alignment + DWORD dwAlignSizeDest; // dest rectangle byte size + DWORD dwAlignStrideAlign; // stride alignment + DWORD dwRops[DD_ROP_SPACE]; // ROPS supported + DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities + DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 + DWORD dwReserved1; // reserved + DWORD dwReserved2; // reserved + DWORD dwReserved3; // reserved + DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts + DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts + DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts + DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts + DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts + DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts + DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts + DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts + DWORD dwSSBCaps; // driver specific capabilities for System->System blts + DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts + DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts + DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts + DWORD dwReserved4; // reserved + DWORD dwReserved5; // reserved + DWORD dwReserved6; // reserved +} DDCAPS_DX3; +typedef DDCAPS_DX3 FAR* LPDDCAPS_DX3; + +/* + * This structure is the DDCAPS structure as it was in version 5 of Direct X. + * It is present for back compatability. + */ +typedef struct _DDCAPS_DX5 +{ +/* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure +/* 4*/ DWORD dwCaps; // driver specific capabilities +/* 8*/ DWORD dwCaps2; // more driver specific capabilites +/* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface +/* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites +/* 14*/ DWORD dwFXAlphaCaps; // alpha driver specific capabilities +/* 18*/ DWORD dwPalCaps; // palette capabilities +/* 1c*/ DWORD dwSVCaps; // stereo vision capabilities +/* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8 +/* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8 +/* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8 +/* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8 +/* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8 +/* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8 +/* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32 +/* 3c*/ DWORD dwVidMemTotal; // total amount of video memory +/* 40*/ DWORD dwVidMemFree; // amount of free video memory +/* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays +/* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays +/* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes +/* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment +/* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size +/* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment +/* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size +/* 60*/ DWORD dwAlignStrideAlign; // stride alignment +/* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported +/* 84*/ DDSCAPS ddsCaps; // DDSCAPS structure has all the general capabilities +/* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* a0*/ DWORD dwReserved1; // reserved +/* a4*/ DWORD dwReserved2; // reserved +/* a8*/ DWORD dwReserved3; // reserved +/* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts +/* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts +/* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts +/* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts +/* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts +/* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts +/* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts +/* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts +/*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts +/*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts +/*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts +/*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts +// Members added for DX5: +/*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports +/*134*/ DWORD dwCurrVideoPorts; // current number of video ports used +/*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts +/*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts +/*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts +/*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts +/*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts +/*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts +} DDCAPS_DX5; +typedef DDCAPS_DX5 FAR* LPDDCAPS_DX5; + +typedef struct _DDCAPS_DX6 +{ +/* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure +/* 4*/ DWORD dwCaps; // driver specific capabilities +/* 8*/ DWORD dwCaps2; // more driver specific capabilites +/* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface +/* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites +/* 14*/ DWORD dwFXAlphaCaps; // alpha caps +/* 18*/ DWORD dwPalCaps; // palette capabilities +/* 1c*/ DWORD dwSVCaps; // stereo vision capabilities +/* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8 +/* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8 +/* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8 +/* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8 +/* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8 +/* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8 +/* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32 +/* 3c*/ DWORD dwVidMemTotal; // total amount of video memory +/* 40*/ DWORD dwVidMemFree; // amount of free video memory +/* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays +/* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays +/* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes +/* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment +/* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size +/* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment +/* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size +/* 60*/ DWORD dwAlignStrideAlign; // stride alignment +/* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported +/* 84*/ DDSCAPS ddsOldCaps; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6 +/* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* a0*/ DWORD dwReserved1; // reserved +/* a4*/ DWORD dwReserved2; // reserved +/* a8*/ DWORD dwReserved3; // reserved +/* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts +/* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts +/* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts +/* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts +/* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts +/* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts +/* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts +/* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts +/*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts +/*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts +/*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts +/*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts +/*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports +/*134*/ DWORD dwCurrVideoPorts; // current number of video ports used +/*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts +/*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts +/*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts +/*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts +/*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts +/*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts +// Members added for DX6 release +/*16c*/ DDSCAPS2 ddsCaps; // Surface Caps +} DDCAPS_DX6; +typedef DDCAPS_DX6 FAR* LPDDCAPS_DX6; + +typedef struct _DDCAPS_DX7 +{ +/* 0*/ DWORD dwSize; // size of the DDDRIVERCAPS structure +/* 4*/ DWORD dwCaps; // driver specific capabilities +/* 8*/ DWORD dwCaps2; // more driver specific capabilites +/* c*/ DWORD dwCKeyCaps; // color key capabilities of the surface +/* 10*/ DWORD dwFXCaps; // driver specific stretching and effects capabilites +/* 14*/ DWORD dwFXAlphaCaps; // alpha driver specific capabilities +/* 18*/ DWORD dwPalCaps; // palette capabilities +/* 1c*/ DWORD dwSVCaps; // stereo vision capabilities +/* 20*/ DWORD dwAlphaBltConstBitDepths; // DDBD_2,4,8 +/* 24*/ DWORD dwAlphaBltPixelBitDepths; // DDBD_1,2,4,8 +/* 28*/ DWORD dwAlphaBltSurfaceBitDepths; // DDBD_1,2,4,8 +/* 2c*/ DWORD dwAlphaOverlayConstBitDepths; // DDBD_2,4,8 +/* 30*/ DWORD dwAlphaOverlayPixelBitDepths; // DDBD_1,2,4,8 +/* 34*/ DWORD dwAlphaOverlaySurfaceBitDepths; // DDBD_1,2,4,8 +/* 38*/ DWORD dwZBufferBitDepths; // DDBD_8,16,24,32 +/* 3c*/ DWORD dwVidMemTotal; // total amount of video memory +/* 40*/ DWORD dwVidMemFree; // amount of free video memory +/* 44*/ DWORD dwMaxVisibleOverlays; // maximum number of visible overlays +/* 48*/ DWORD dwCurrVisibleOverlays; // current number of visible overlays +/* 4c*/ DWORD dwNumFourCCCodes; // number of four cc codes +/* 50*/ DWORD dwAlignBoundarySrc; // source rectangle alignment +/* 54*/ DWORD dwAlignSizeSrc; // source rectangle byte size +/* 58*/ DWORD dwAlignBoundaryDest; // dest rectangle alignment +/* 5c*/ DWORD dwAlignSizeDest; // dest rectangle byte size +/* 60*/ DWORD dwAlignStrideAlign; // stride alignment +/* 64*/ DWORD dwRops[DD_ROP_SPACE]; // ROPS supported +/* 84*/ DDSCAPS ddsOldCaps; // Was DDSCAPS ddsCaps. ddsCaps is of type DDSCAPS2 for DX6 +/* 88*/ DWORD dwMinOverlayStretch; // minimum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* 8c*/ DWORD dwMaxOverlayStretch; // maximum overlay stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* 90*/ DWORD dwMinLiveVideoStretch; // minimum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* 94*/ DWORD dwMaxLiveVideoStretch; // maximum live video stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* 98*/ DWORD dwMinHwCodecStretch; // minimum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* 9c*/ DWORD dwMaxHwCodecStretch; // maximum hardware codec stretch factor multiplied by 1000, eg 1000 == 1.0, 1300 == 1.3 +/* a0*/ DWORD dwReserved1; // reserved +/* a4*/ DWORD dwReserved2; // reserved +/* a8*/ DWORD dwReserved3; // reserved +/* ac*/ DWORD dwSVBCaps; // driver specific capabilities for System->Vmem blts +/* b0*/ DWORD dwSVBCKeyCaps; // driver color key capabilities for System->Vmem blts +/* b4*/ DWORD dwSVBFXCaps; // driver FX capabilities for System->Vmem blts +/* b8*/ DWORD dwSVBRops[DD_ROP_SPACE];// ROPS supported for System->Vmem blts +/* d8*/ DWORD dwVSBCaps; // driver specific capabilities for Vmem->System blts +/* dc*/ DWORD dwVSBCKeyCaps; // driver color key capabilities for Vmem->System blts +/* e0*/ DWORD dwVSBFXCaps; // driver FX capabilities for Vmem->System blts +/* e4*/ DWORD dwVSBRops[DD_ROP_SPACE];// ROPS supported for Vmem->System blts +/*104*/ DWORD dwSSBCaps; // driver specific capabilities for System->System blts +/*108*/ DWORD dwSSBCKeyCaps; // driver color key capabilities for System->System blts +/*10c*/ DWORD dwSSBFXCaps; // driver FX capabilities for System->System blts +/*110*/ DWORD dwSSBRops[DD_ROP_SPACE];// ROPS supported for System->System blts +/*130*/ DWORD dwMaxVideoPorts; // maximum number of usable video ports +/*134*/ DWORD dwCurrVideoPorts; // current number of video ports used +/*138*/ DWORD dwSVBCaps2; // more driver specific capabilities for System->Vmem blts +/*13c*/ DWORD dwNLVBCaps; // driver specific capabilities for non-local->local vidmem blts +/*140*/ DWORD dwNLVBCaps2; // more driver specific capabilities non-local->local vidmem blts +/*144*/ DWORD dwNLVBCKeyCaps; // driver color key capabilities for non-local->local vidmem blts +/*148*/ DWORD dwNLVBFXCaps; // driver FX capabilities for non-local->local blts +/*14c*/ DWORD dwNLVBRops[DD_ROP_SPACE]; // ROPS supported for non-local->local blts +// Members added for DX6 release +/*16c*/ DDSCAPS2 ddsCaps; // Surface Caps +} DDCAPS_DX7; +typedef DDCAPS_DX7 FAR* LPDDCAPS_DX7; + + +#if DIRECTDRAW_VERSION <= 0x300 + typedef DDCAPS_DX3 DDCAPS; +#elif DIRECTDRAW_VERSION <= 0x500 + typedef DDCAPS_DX5 DDCAPS; +#elif DIRECTDRAW_VERSION <= 0x600 + typedef DDCAPS_DX6 DDCAPS; +#else + typedef DDCAPS_DX7 DDCAPS; +#endif + +typedef DDCAPS FAR* LPDDCAPS; + + + +/* + * DDPIXELFORMAT + */ +typedef struct _DDPIXELFORMAT +{ + DWORD dwSize; // size of structure + DWORD dwFlags; // pixel format flags + DWORD dwFourCC; // (FOURCC code) + union + { + DWORD dwRGBBitCount; // how many bits per pixel + DWORD dwYUVBitCount; // how many bits per pixel + DWORD dwZBufferBitDepth; // how many total bits/pixel in z buffer (including any stencil bits) + DWORD dwAlphaBitDepth; // how many bits for alpha channels + DWORD dwLuminanceBitCount; // how many bits per pixel + DWORD dwBumpBitCount; // how many bits per "buxel", total + DWORD dwPrivateFormatBitCount;// Bits per pixel of private driver formats. Only valid in texture + // format list and if DDPF_D3DFORMAT is set + } DUMMYUNIONNAMEN(1); + union + { + DWORD dwRBitMask; // mask for red bit + DWORD dwYBitMask; // mask for Y bits + DWORD dwStencilBitDepth; // how many stencil bits (note: dwZBufferBitDepth-dwStencilBitDepth is total Z-only bits) + DWORD dwLuminanceBitMask; // mask for luminance bits + DWORD dwBumpDuBitMask; // mask for bump map U delta bits + DWORD dwOperations; // DDPF_D3DFORMAT Operations + } DUMMYUNIONNAMEN(2); + union + { + DWORD dwGBitMask; // mask for green bits + DWORD dwUBitMask; // mask for U bits + DWORD dwZBitMask; // mask for Z bits + DWORD dwBumpDvBitMask; // mask for bump map V delta bits + struct + { + WORD wFlipMSTypes; // Multisample methods supported via flip for this D3DFORMAT + WORD wBltMSTypes; // Multisample methods supported via blt for this D3DFORMAT + } MultiSampleCaps; + + } DUMMYUNIONNAMEN(3); + union + { + DWORD dwBBitMask; // mask for blue bits + DWORD dwVBitMask; // mask for V bits + DWORD dwStencilBitMask; // mask for stencil bits + DWORD dwBumpLuminanceBitMask; // mask for luminance in bump map + } DUMMYUNIONNAMEN(4); + union + { + DWORD dwRGBAlphaBitMask; // mask for alpha channel + DWORD dwYUVAlphaBitMask; // mask for alpha channel + DWORD dwLuminanceAlphaBitMask;// mask for alpha channel + DWORD dwRGBZBitMask; // mask for Z channel + DWORD dwYUVZBitMask; // mask for Z channel + } DUMMYUNIONNAMEN(5); +} DDPIXELFORMAT; + +typedef DDPIXELFORMAT FAR* LPDDPIXELFORMAT; + +/* + * DDOVERLAYFX + */ +typedef struct _DDOVERLAYFX +{ + DWORD dwSize; // size of structure + DWORD dwAlphaEdgeBlendBitDepth; // Bit depth used to specify constant for alpha edge blend + DWORD dwAlphaEdgeBlend; // Constant to use as alpha for edge blend + DWORD dwReserved; + DWORD dwAlphaDestConstBitDepth; // Bit depth used to specify alpha constant for destination + union + { + DWORD dwAlphaDestConst; // Constant to use as alpha channel for dest + LPDIRECTDRAWSURFACE lpDDSAlphaDest; // Surface to use as alpha channel for dest + } DUMMYUNIONNAMEN(1); + DWORD dwAlphaSrcConstBitDepth; // Bit depth used to specify alpha constant for source + union + { + DWORD dwAlphaSrcConst; // Constant to use as alpha channel for src + LPDIRECTDRAWSURFACE lpDDSAlphaSrc; // Surface to use as alpha channel for src + } DUMMYUNIONNAMEN(2); + DDCOLORKEY dckDestColorkey; // DestColorkey override + DDCOLORKEY dckSrcColorkey; // DestColorkey override + DWORD dwDDFX; // Overlay FX + DWORD dwFlags; // flags +} DDOVERLAYFX; + +typedef DDOVERLAYFX FAR *LPDDOVERLAYFX; + + +/* + * DDBLTBATCH: BltBatch entry structure + */ +typedef struct _DDBLTBATCH +{ + LPRECT lprDest; + LPDIRECTDRAWSURFACE lpDDSSrc; + LPRECT lprSrc; + DWORD dwFlags; + LPDDBLTFX lpDDBltFx; +} DDBLTBATCH; + +typedef DDBLTBATCH FAR * LPDDBLTBATCH; + + +/* + * DDGAMMARAMP + */ +typedef struct _DDGAMMARAMP +{ + WORD red[256]; + WORD green[256]; + WORD blue[256]; +} DDGAMMARAMP; +typedef DDGAMMARAMP FAR * LPDDGAMMARAMP; + +/* + * This is the structure within which DirectDraw returns data about the current graphics driver and chipset + */ + +#define MAX_DDDEVICEID_STRING 512 + +typedef struct tagDDDEVICEIDENTIFIER +{ + /* + * These elements are for presentation to the user only. They should not be used to identify particular + * drivers, since this is unreliable and many different strings may be associated with the same + * device, and the same driver from different vendors. + */ + char szDriver[MAX_DDDEVICEID_STRING]; + char szDescription[MAX_DDDEVICEID_STRING]; + + /* + * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons + * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic + * drivers. It is recommended that guidDeviceIdentifier is used for this purpose. + * + * This version has the form: + * wProduct = HIWORD(liDriverVersion.HighPart) + * wVersion = LOWORD(liDriverVersion.HighPart) + * wSubVersion = HIWORD(liDriverVersion.LowPart) + * wBuild = LOWORD(liDriverVersion.LowPart) + */ +#ifdef _WIN32 + LARGE_INTEGER liDriverVersion; /* Defined for applications and other 32 bit components */ +#else + DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */ + DWORD dwDriverVersionHighPart; +#endif + + + /* + * These elements can be used to identify particular chipsets. Use with extreme caution. + * dwVendorId Identifies the manufacturer. May be zero if unknown. + * dwDeviceId Identifies the type of chipset. May be zero if unknown. + * dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown. + * dwRevision Identifies the revision level of the chipset. May be zero if unknown. + */ + DWORD dwVendorId; + DWORD dwDeviceId; + DWORD dwSubSysId; + DWORD dwRevision; + + /* + * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the + * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to + * reprofile the graphics subsystem. + * This element can also be used to identify particular problematic drivers. + */ + GUID guidDeviceIdentifier; +} DDDEVICEIDENTIFIER, * LPDDDEVICEIDENTIFIER; + +typedef struct tagDDDEVICEIDENTIFIER2 +{ + /* + * These elements are for presentation to the user only. They should not be used to identify particular + * drivers, since this is unreliable and many different strings may be associated with the same + * device, and the same driver from different vendors. + */ + char szDriver[MAX_DDDEVICEID_STRING]; + char szDescription[MAX_DDDEVICEID_STRING]; + + /* + * This element is the version of the DirectDraw/3D driver. It is legal to do <, > comparisons + * on the whole 64 bits. Caution should be exercised if you use this element to identify problematic + * drivers. It is recommended that guidDeviceIdentifier is used for this purpose. + * + * This version has the form: + * wProduct = HIWORD(liDriverVersion.HighPart) + * wVersion = LOWORD(liDriverVersion.HighPart) + * wSubVersion = HIWORD(liDriverVersion.LowPart) + * wBuild = LOWORD(liDriverVersion.LowPart) + */ +#ifdef _WIN32 + LARGE_INTEGER liDriverVersion; /* Defined for applications and other 32 bit components */ +#else + DWORD dwDriverVersionLowPart; /* Defined for 16 bit driver components */ + DWORD dwDriverVersionHighPart; +#endif + + + /* + * These elements can be used to identify particular chipsets. Use with extreme caution. + * dwVendorId Identifies the manufacturer. May be zero if unknown. + * dwDeviceId Identifies the type of chipset. May be zero if unknown. + * dwSubSysId Identifies the subsystem, typically this means the particular board. May be zero if unknown. + * dwRevision Identifies the revision level of the chipset. May be zero if unknown. + */ + DWORD dwVendorId; + DWORD dwDeviceId; + DWORD dwSubSysId; + DWORD dwRevision; + + /* + * This element can be used to check changes in driver/chipset. This GUID is a unique identifier for the + * driver/chipset pair. Use this element if you wish to track changes to the driver/chipset in order to + * reprofile the graphics subsystem. + * This element can also be used to identify particular problematic drivers. + */ + GUID guidDeviceIdentifier; + + /* + * This element is used to determine the Windows Hardware Quality Lab (WHQL) + * certification level for this driver/device pair. + */ + DWORD dwWHQLLevel; + +} DDDEVICEIDENTIFIER2, * LPDDDEVICEIDENTIFIER2; + +/* + * Flags for the IDirectDraw4::GetDeviceIdentifier method + */ + +/* + * This flag causes GetDeviceIdentifier to return information about the host (typically 2D) adapter in a system equipped + * with a stacked secondary 3D adapter. Such an adapter appears to the application as if it were part of the + * host adapter, but is typically physcially located on a separate card. The stacked secondary's information is + * returned when GetDeviceIdentifier's dwFlags field is zero, since this most accurately reflects the qualities + * of the DirectDraw object involved. + */ +#define DDGDI_GETHOSTIDENTIFIER 0x00000001L + +/* + * Macros for interpretting DDEVICEIDENTIFIER2.dwWHQLLevel + */ +#define GET_WHQL_YEAR( dwWHQLLevel ) \ + ( (dwWHQLLevel) / 0x10000 ) +#define GET_WHQL_MONTH( dwWHQLLevel ) \ + ( ( (dwWHQLLevel) / 0x100 ) & 0x00ff ) +#define GET_WHQL_DAY( dwWHQLLevel ) \ + ( (dwWHQLLevel) & 0xff ) + + +/* + * callbacks + */ +typedef DWORD (FAR PASCAL *LPCLIPPERCALLBACK)(LPDIRECTDRAWCLIPPER lpDDClipper, HWND hWnd, DWORD code, LPVOID lpContext ); +#ifdef STREAMING +typedef DWORD (FAR PASCAL *LPSURFACESTREAMINGCALLBACK)(DWORD); +#endif + + +/* + * INTERACES FOLLOW: + * IDirectDraw + * IDirectDrawClipper + * IDirectDrawPalette + * IDirectDrawSurface + */ + +/* + * IDirectDraw + */ +#if defined( _WIN32 ) && !defined( _NO_COM ) +#undef INTERFACE +#define INTERFACE IDirectDraw +DECLARE_INTERFACE_( IDirectDraw, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDraw methods ***/ + STDMETHOD(Compact)(THIS) PURE; + STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE; + STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE; + STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE; + STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE; + STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE; + STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE; + STDMETHOD(FlipToGDISurface)(THIS) PURE; + STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE; + STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE; + STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE; + STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE; + STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE; + STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE; + STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE; + STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE; + STDMETHOD(RestoreDisplayMode)(THIS) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE; + STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD) PURE; + STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE; +}; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectDraw_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) +#define IDirectDraw_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDraw_Release(p) (p)->lpVtbl->Release(p) +#define IDirectDraw_Compact(p) (p)->lpVtbl->Compact(p) +#define IDirectDraw_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c) +#define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d) +#define IDirectDraw_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c) +#define IDirectDraw_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b) +#define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d) +#define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d) +#define IDirectDraw_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p) +#define IDirectDraw_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b) +#define IDirectDraw_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a) +#define IDirectDraw_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b) +#define IDirectDraw_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a) +#define IDirectDraw_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a) +#define IDirectDraw_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a) +#define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a) +#define IDirectDraw_Initialize(p, a) (p)->lpVtbl->Initialize(p, a) +#define IDirectDraw_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p) +#define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b) +#define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->lpVtbl->SetDisplayMode(p, a, b, c) +#define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b) +#else +#define IDirectDraw_QueryInterface(p, a, b) (p)->QueryInterface(a, b) +#define IDirectDraw_AddRef(p) (p)->AddRef() +#define IDirectDraw_Release(p) (p)->Release() +#define IDirectDraw_Compact(p) (p)->Compact() +#define IDirectDraw_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c) +#define IDirectDraw_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d) +#define IDirectDraw_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c) +#define IDirectDraw_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b) +#define IDirectDraw_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d) +#define IDirectDraw_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d) +#define IDirectDraw_FlipToGDISurface(p) (p)->FlipToGDISurface() +#define IDirectDraw_GetCaps(p, a, b) (p)->GetCaps(a, b) +#define IDirectDraw_GetDisplayMode(p, a) (p)->GetDisplayMode(a) +#define IDirectDraw_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b) +#define IDirectDraw_GetGDISurface(p, a) (p)->GetGDISurface(a) +#define IDirectDraw_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a) +#define IDirectDraw_GetScanLine(p, a) (p)->GetScanLine(a) +#define IDirectDraw_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a) +#define IDirectDraw_Initialize(p, a) (p)->Initialize(a) +#define IDirectDraw_RestoreDisplayMode(p) (p)->RestoreDisplayMode() +#define IDirectDraw_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b) +#define IDirectDraw_SetDisplayMode(p, a, b, c) (p)->SetDisplayMode(a, b, c) +#define IDirectDraw_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b) +#endif + +#endif + +#if defined( _WIN32 ) && !defined( _NO_COM ) +#undef INTERFACE +#define INTERFACE IDirectDraw2 +DECLARE_INTERFACE_( IDirectDraw2, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDraw methods ***/ + STDMETHOD(Compact)(THIS) PURE; + STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE; + STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE; + STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE; + STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE; + STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE; + STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE; + STDMETHOD(FlipToGDISurface)(THIS) PURE; + STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE; + STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE; + STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE; + STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE; + STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE; + STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE; + STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE; + STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE; + STDMETHOD(RestoreDisplayMode)(THIS) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE; + STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE; + STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE; + /*** Added in the v2 interface ***/ + STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE; +}; +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectDraw2_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) +#define IDirectDraw2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDraw2_Release(p) (p)->lpVtbl->Release(p) +#define IDirectDraw2_Compact(p) (p)->lpVtbl->Compact(p) +#define IDirectDraw2_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c) +#define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d) +#define IDirectDraw2_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c) +#define IDirectDraw2_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b) +#define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d) +#define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d) +#define IDirectDraw2_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p) +#define IDirectDraw2_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b) +#define IDirectDraw2_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a) +#define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b) +#define IDirectDraw2_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a) +#define IDirectDraw2_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a) +#define IDirectDraw2_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a) +#define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a) +#define IDirectDraw2_Initialize(p, a) (p)->lpVtbl->Initialize(p, a) +#define IDirectDraw2_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p) +#define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b) +#define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e) +#define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b) +#define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c) +#else +#define IDirectDraw2_QueryInterface(p, a, b) (p)->QueryInterface(a, b) +#define IDirectDraw2_AddRef(p) (p)->AddRef() +#define IDirectDraw2_Release(p) (p)->Release() +#define IDirectDraw2_Compact(p) (p)->Compact() +#define IDirectDraw2_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c) +#define IDirectDraw2_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d) +#define IDirectDraw2_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c) +#define IDirectDraw2_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b) +#define IDirectDraw2_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d) +#define IDirectDraw2_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d) +#define IDirectDraw2_FlipToGDISurface(p) (p)->FlipToGDISurface() +#define IDirectDraw2_GetCaps(p, a, b) (p)->GetCaps(a, b) +#define IDirectDraw2_GetDisplayMode(p, a) (p)->GetDisplayMode(a) +#define IDirectDraw2_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b) +#define IDirectDraw2_GetGDISurface(p, a) (p)->GetGDISurface(a) +#define IDirectDraw2_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a) +#define IDirectDraw2_GetScanLine(p, a) (p)->GetScanLine(a) +#define IDirectDraw2_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a) +#define IDirectDraw2_Initialize(p, a) (p)->Initialize(a) +#define IDirectDraw2_RestoreDisplayMode(p) (p)->RestoreDisplayMode() +#define IDirectDraw2_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b) +#define IDirectDraw2_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e) +#define IDirectDraw2_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b) +#define IDirectDraw2_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c) +#endif + +#endif + +#if defined( _WIN32 ) && !defined( _NO_COM ) +#undef INTERFACE +#define INTERFACE IDirectDraw4 +DECLARE_INTERFACE_( IDirectDraw4, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDraw methods ***/ + STDMETHOD(Compact)(THIS) PURE; + STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE; + STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE; + STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2, LPDIRECTDRAWSURFACE4 FAR *, IUnknown FAR *) PURE; + STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE4, LPDIRECTDRAWSURFACE4 FAR * ) PURE; + STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2 ) PURE; + STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC2, LPVOID,LPDDENUMSURFACESCALLBACK2 ) PURE; + STDMETHOD(FlipToGDISurface)(THIS) PURE; + STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE; + STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC2) PURE; + STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE; + STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE4 FAR *) PURE; + STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE; + STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE; + STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE; + STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE; + STDMETHOD(RestoreDisplayMode)(THIS) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE; + STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE; + STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE; + /*** Added in the v2 interface ***/ + STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2, LPDWORD, LPDWORD) PURE; + /*** Added in the V4 Interface ***/ + STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, LPDIRECTDRAWSURFACE4 *) PURE; + STDMETHOD(RestoreAllSurfaces)(THIS) PURE; + STDMETHOD(TestCooperativeLevel)(THIS) PURE; + STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER, DWORD ) PURE; +}; +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectDraw4_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) +#define IDirectDraw4_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDraw4_Release(p) (p)->lpVtbl->Release(p) +#define IDirectDraw4_Compact(p) (p)->lpVtbl->Compact(p) +#define IDirectDraw4_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c) +#define IDirectDraw4_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d) +#define IDirectDraw4_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c) +#define IDirectDraw4_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b) +#define IDirectDraw4_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d) +#define IDirectDraw4_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d) +#define IDirectDraw4_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p) +#define IDirectDraw4_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b) +#define IDirectDraw4_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a) +#define IDirectDraw4_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b) +#define IDirectDraw4_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a) +#define IDirectDraw4_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a) +#define IDirectDraw4_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a) +#define IDirectDraw4_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a) +#define IDirectDraw4_Initialize(p, a) (p)->lpVtbl->Initialize(p, a) +#define IDirectDraw4_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p) +#define IDirectDraw4_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b) +#define IDirectDraw4_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e) +#define IDirectDraw4_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b) +#define IDirectDraw4_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c) +#define IDirectDraw4_GetSurfaceFromDC(p, a, b) (p)->lpVtbl->GetSurfaceFromDC(p, a, b) +#define IDirectDraw4_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p) +#define IDirectDraw4_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p) +#define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b) +#else +#define IDirectDraw4_QueryInterface(p, a, b) (p)->QueryInterface(a, b) +#define IDirectDraw4_AddRef(p) (p)->AddRef() +#define IDirectDraw4_Release(p) (p)->Release() +#define IDirectDraw4_Compact(p) (p)->Compact() +#define IDirectDraw4_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c) +#define IDirectDraw4_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d) +#define IDirectDraw4_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c) +#define IDirectDraw4_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b) +#define IDirectDraw4_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d) +#define IDirectDraw4_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d) +#define IDirectDraw4_FlipToGDISurface(p) (p)->FlipToGDISurface() +#define IDirectDraw4_GetCaps(p, a, b) (p)->GetCaps(a, b) +#define IDirectDraw4_GetDisplayMode(p, a) (p)->GetDisplayMode(a) +#define IDirectDraw4_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b) +#define IDirectDraw4_GetGDISurface(p, a) (p)->GetGDISurface(a) +#define IDirectDraw4_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a) +#define IDirectDraw4_GetScanLine(p, a) (p)->GetScanLine(a) +#define IDirectDraw4_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a) +#define IDirectDraw4_Initialize(p, a) (p)->Initialize(a) +#define IDirectDraw4_RestoreDisplayMode(p) (p)->RestoreDisplayMode() +#define IDirectDraw4_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b) +#define IDirectDraw4_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e) +#define IDirectDraw4_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b) +#define IDirectDraw4_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c) +#define IDirectDraw4_GetSurfaceFromDC(p, a, b) (p)->GetSurfaceFromDC(a, b) +#define IDirectDraw4_RestoreAllSurfaces(p) (p)->RestoreAllSurfaces() +#define IDirectDraw4_TestCooperativeLevel(p) (p)->TestCooperativeLevel() +#define IDirectDraw4_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b) +#endif + +#endif + +#if defined( _WIN32 ) && !defined( _NO_COM ) +#undef INTERFACE +#define INTERFACE IDirectDraw7 +DECLARE_INTERFACE_( IDirectDraw7, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDraw methods ***/ + STDMETHOD(Compact)(THIS) PURE; + STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE; + STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE; + STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC2, LPDIRECTDRAWSURFACE7 FAR *, IUnknown FAR *) PURE; + STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE7, LPDIRECTDRAWSURFACE7 FAR * ) PURE; + STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC2, LPVOID, LPDDENUMMODESCALLBACK2 ) PURE; + STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC2, LPVOID,LPDDENUMSURFACESCALLBACK7 ) PURE; + STDMETHOD(FlipToGDISurface)(THIS) PURE; + STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE; + STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC2) PURE; + STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE; + STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE7 FAR *) PURE; + STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE; + STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE; + STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE; + STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE; + STDMETHOD(RestoreDisplayMode)(THIS) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE; + STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE; + STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE; + /*** Added in the v2 interface ***/ + STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS2, LPDWORD, LPDWORD) PURE; + /*** Added in the V4 Interface ***/ + STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, LPDIRECTDRAWSURFACE7 *) PURE; + STDMETHOD(RestoreAllSurfaces)(THIS) PURE; + STDMETHOD(TestCooperativeLevel)(THIS) PURE; + STDMETHOD(GetDeviceIdentifier)(THIS_ LPDDDEVICEIDENTIFIER2, DWORD ) PURE; + STDMETHOD(StartModeTest)(THIS_ LPSIZE, DWORD, DWORD ) PURE; + STDMETHOD(EvaluateMode)(THIS_ DWORD, DWORD * ) PURE; +}; +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectDraw7_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) +#define IDirectDraw7_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDraw7_Release(p) (p)->lpVtbl->Release(p) +#define IDirectDraw7_Compact(p) (p)->lpVtbl->Compact(p) +#define IDirectDraw7_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c) +#define IDirectDraw7_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d) +#define IDirectDraw7_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c) +#define IDirectDraw7_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b) +#define IDirectDraw7_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d) +#define IDirectDraw7_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d) +#define IDirectDraw7_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p) +#define IDirectDraw7_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b) +#define IDirectDraw7_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a) +#define IDirectDraw7_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b) +#define IDirectDraw7_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a) +#define IDirectDraw7_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a) +#define IDirectDraw7_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a) +#define IDirectDraw7_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a) +#define IDirectDraw7_Initialize(p, a) (p)->lpVtbl->Initialize(p, a) +#define IDirectDraw7_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p) +#define IDirectDraw7_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b) +#define IDirectDraw7_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e) +#define IDirectDraw7_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b) +#define IDirectDraw7_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c) +#define IDirectDraw7_GetSurfaceFromDC(p, a, b) (p)->lpVtbl->GetSurfaceFromDC(p, a, b) +#define IDirectDraw7_RestoreAllSurfaces(p) (p)->lpVtbl->RestoreAllSurfaces(p) +#define IDirectDraw7_TestCooperativeLevel(p) (p)->lpVtbl->TestCooperativeLevel(p) +#define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->lpVtbl->GetDeviceIdentifier(p,a,b) +#define IDirectDraw7_StartModeTest(p,a,b,c) (p)->lpVtbl->StartModeTest(p,a,b,c) +#define IDirectDraw7_EvaluateMode(p,a,b) (p)->lpVtbl->EvaluateMode(p,a,b) +#else +#define IDirectDraw7_QueryInterface(p, a, b) (p)->QueryInterface(a, b) +#define IDirectDraw7_AddRef(p) (p)->AddRef() +#define IDirectDraw7_Release(p) (p)->Release() +#define IDirectDraw7_Compact(p) (p)->Compact() +#define IDirectDraw7_CreateClipper(p, a, b, c) (p)->CreateClipper(a, b, c) +#define IDirectDraw7_CreatePalette(p, a, b, c, d) (p)->CreatePalette(a, b, c, d) +#define IDirectDraw7_CreateSurface(p, a, b, c) (p)->CreateSurface(a, b, c) +#define IDirectDraw7_DuplicateSurface(p, a, b) (p)->DuplicateSurface(a, b) +#define IDirectDraw7_EnumDisplayModes(p, a, b, c, d) (p)->EnumDisplayModes(a, b, c, d) +#define IDirectDraw7_EnumSurfaces(p, a, b, c, d) (p)->EnumSurfaces(a, b, c, d) +#define IDirectDraw7_FlipToGDISurface(p) (p)->FlipToGDISurface() +#define IDirectDraw7_GetCaps(p, a, b) (p)->GetCaps(a, b) +#define IDirectDraw7_GetDisplayMode(p, a) (p)->GetDisplayMode(a) +#define IDirectDraw7_GetFourCCCodes(p, a, b) (p)->GetFourCCCodes(a, b) +#define IDirectDraw7_GetGDISurface(p, a) (p)->GetGDISurface(a) +#define IDirectDraw7_GetMonitorFrequency(p, a) (p)->GetMonitorFrequency(a) +#define IDirectDraw7_GetScanLine(p, a) (p)->GetScanLine(a) +#define IDirectDraw7_GetVerticalBlankStatus(p, a) (p)->GetVerticalBlankStatus(a) +#define IDirectDraw7_Initialize(p, a) (p)->Initialize(a) +#define IDirectDraw7_RestoreDisplayMode(p) (p)->RestoreDisplayMode() +#define IDirectDraw7_SetCooperativeLevel(p, a, b) (p)->SetCooperativeLevel(a, b) +#define IDirectDraw7_SetDisplayMode(p, a, b, c, d, e) (p)->SetDisplayMode(a, b, c, d, e) +#define IDirectDraw7_WaitForVerticalBlank(p, a, b) (p)->WaitForVerticalBlank(a, b) +#define IDirectDraw7_GetAvailableVidMem(p, a, b, c) (p)->GetAvailableVidMem(a, b, c) +#define IDirectDraw7_GetSurfaceFromDC(p, a, b) (p)->GetSurfaceFromDC(a, b) +#define IDirectDraw7_RestoreAllSurfaces(p) (p)->RestoreAllSurfaces() +#define IDirectDraw7_TestCooperativeLevel(p) (p)->TestCooperativeLevel() +#define IDirectDraw7_GetDeviceIdentifier(p,a,b) (p)->GetDeviceIdentifier(a,b) +#define IDirectDraw7_StartModeTest(p,a,b,c) (p)->lpVtbl->StartModeTest(a,b,c) +#define IDirectDraw7_EvaluateMode(p,a,b) (p)->lpVtbl->EvaluateMode(a,b) +#endif + +#endif + + +/* + * IDirectDrawPalette + */ +#if defined( _WIN32 ) && !defined( _NO_COM ) +#undef INTERFACE +#define INTERFACE IDirectDrawPalette +DECLARE_INTERFACE_( IDirectDrawPalette, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDrawPalette methods ***/ + STDMETHOD(GetCaps)(THIS_ LPDWORD) PURE; + STDMETHOD(GetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD, LPPALETTEENTRY) PURE; + STDMETHOD(SetEntries)(THIS_ DWORD,DWORD,DWORD,LPPALETTEENTRY) PURE; +}; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectDrawPalette_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) +#define IDirectDrawPalette_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawPalette_Release(p) (p)->lpVtbl->Release(p) +#define IDirectDrawPalette_GetCaps(p, a) (p)->lpVtbl->GetCaps(p, a) +#define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->lpVtbl->GetEntries(p, a, b, c, d) +#define IDirectDrawPalette_Initialize(p, a, b, c) (p)->lpVtbl->Initialize(p, a, b, c) +#define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->lpVtbl->SetEntries(p, a, b, c, d) +#else +#define IDirectDrawPalette_QueryInterface(p, a, b) (p)->QueryInterface(a, b) +#define IDirectDrawPalette_AddRef(p) (p)->AddRef() +#define IDirectDrawPalette_Release(p) (p)->Release() +#define IDirectDrawPalette_GetCaps(p, a) (p)->GetCaps(a) +#define IDirectDrawPalette_GetEntries(p, a, b, c, d) (p)->GetEntries(a, b, c, d) +#define IDirectDrawPalette_Initialize(p, a, b, c) (p)->Initialize(a, b, c) +#define IDirectDrawPalette_SetEntries(p, a, b, c, d) (p)->SetEntries(a, b, c, d) +#endif + +#endif + + +/* + * IDirectDrawClipper + */ +#if defined( _WIN32 ) && !defined( _NO_COM ) +#undef INTERFACE +#define INTERFACE IDirectDrawClipper +DECLARE_INTERFACE_( IDirectDrawClipper, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDrawClipper methods ***/ + STDMETHOD(GetClipList)(THIS_ LPRECT, LPRGNDATA, LPDWORD) PURE; + STDMETHOD(GetHWnd)(THIS_ HWND FAR *) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, DWORD) PURE; + STDMETHOD(IsClipListChanged)(THIS_ BOOL FAR *) PURE; + STDMETHOD(SetClipList)(THIS_ LPRGNDATA,DWORD) PURE; + STDMETHOD(SetHWnd)(THIS_ DWORD, HWND ) PURE; +}; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectDrawClipper_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) +#define IDirectDrawClipper_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawClipper_Release(p) (p)->lpVtbl->Release(p) +#define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->lpVtbl->GetClipList(p, a, b, c) +#define IDirectDrawClipper_GetHWnd(p, a) (p)->lpVtbl->GetHWnd(p, a) +#define IDirectDrawClipper_Initialize(p, a, b) (p)->lpVtbl->Initialize(p, a, b) +#define IDirectDrawClipper_IsClipListChanged(p, a) (p)->lpVtbl->IsClipListChanged(p, a) +#define IDirectDrawClipper_SetClipList(p, a, b) (p)->lpVtbl->SetClipList(p, a, b) +#define IDirectDrawClipper_SetHWnd(p, a, b) (p)->lpVtbl->SetHWnd(p, a, b) +#else +#define IDirectDrawClipper_QueryInterface(p, a, b) (p)->QueryInterface(a, b) +#define IDirectDrawClipper_AddRef(p) (p)->AddRef() +#define IDirectDrawClipper_Release(p) (p)->Release() +#define IDirectDrawClipper_GetClipList(p, a, b, c) (p)->GetClipList(a, b, c) +#define IDirectDrawClipper_GetHWnd(p, a) (p)->GetHWnd(a) +#define IDirectDrawClipper_Initialize(p, a, b) (p)->Initialize(a, b) +#define IDirectDrawClipper_IsClipListChanged(p, a) (p)->IsClipListChanged(a) +#define IDirectDrawClipper_SetClipList(p, a, b) (p)->SetClipList(a, b) +#define IDirectDrawClipper_SetHWnd(p, a, b) (p)->SetHWnd(a, b) +#endif + +#endif + +/* + * IDirectDrawSurface and related interfaces + */ +#if defined( _WIN32 ) && !defined( _NO_COM ) +#undef INTERFACE +#define INTERFACE IDirectDrawSurface +DECLARE_INTERFACE_( IDirectDrawSurface, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDrawSurface methods ***/ + STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE) PURE; + STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE; + STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE, LPRECT,DWORD, LPDDBLTFX) PURE; + STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE; + STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE, LPRECT,DWORD) PURE; + STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE) PURE; + STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE; + STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE; + STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE; + STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE FAR *) PURE; + STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE; + STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE; + STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE; + STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; + STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE; + STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE; + STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE; + STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE; + STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE; + STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE; + STDMETHOD(IsLost)(THIS) PURE; + STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE; + STDMETHOD(ReleaseDC)(THIS_ HDC) PURE; + STDMETHOD(Restore)(THIS) PURE; + STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE; + STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; + STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE; + STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE; + STDMETHOD(Unlock)(THIS_ LPVOID) PURE; + STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE,LPRECT,DWORD, LPDDOVERLAYFX) PURE; + STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE; + STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE) PURE; +}; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectDrawSurface_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDrawSurface_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawSurface_Release(p) (p)->lpVtbl->Release(p) +#define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a) +#define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a) +#define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e) +#define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c) +#define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e) +#define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b) +#define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b) +#define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c) +#define IDirectDrawSurface_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b) +#define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b) +#define IDirectDrawSurface_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a) +#define IDirectDrawSurface_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b) +#define IDirectDrawSurface_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a) +#define IDirectDrawSurface_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b) +#define IDirectDrawSurface_GetDC(p,a) (p)->lpVtbl->GetDC(p,a) +#define IDirectDrawSurface_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a) +#define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b) +#define IDirectDrawSurface_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a) +#define IDirectDrawSurface_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a) +#define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a) +#define IDirectDrawSurface_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectDrawSurface_IsLost(p) (p)->lpVtbl->IsLost(p) +#define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) +#define IDirectDrawSurface_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a) +#define IDirectDrawSurface_Restore(p) (p)->lpVtbl->Restore(p) +#define IDirectDrawSurface_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a) +#define IDirectDrawSurface_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b) +#define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b) +#define IDirectDrawSurface_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a) +#define IDirectDrawSurface_Unlock(p,b) (p)->lpVtbl->Unlock(p,b) +#define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e) +#define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a) +#define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b) +#else +#define IDirectDrawSurface_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDrawSurface_AddRef(p) (p)->AddRef() +#define IDirectDrawSurface_Release(p) (p)->Release() +#define IDirectDrawSurface_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a) +#define IDirectDrawSurface_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a) +#define IDirectDrawSurface_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e) +#define IDirectDrawSurface_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c) +#define IDirectDrawSurface_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e) +#define IDirectDrawSurface_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b) +#define IDirectDrawSurface_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b) +#define IDirectDrawSurface_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c) +#define IDirectDrawSurface_Flip(p,a,b) (p)->Flip(a,b) +#define IDirectDrawSurface_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b) +#define IDirectDrawSurface_GetBltStatus(p,a) (p)->GetBltStatus(a) +#define IDirectDrawSurface_GetCaps(p,b) (p)->GetCaps(b) +#define IDirectDrawSurface_GetClipper(p,a) (p)->GetClipper(a) +#define IDirectDrawSurface_GetColorKey(p,a,b) (p)->GetColorKey(a,b) +#define IDirectDrawSurface_GetDC(p,a) (p)->GetDC(a) +#define IDirectDrawSurface_GetFlipStatus(p,a) (p)->GetFlipStatus(a) +#define IDirectDrawSurface_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b) +#define IDirectDrawSurface_GetPalette(p,a) (p)->GetPalette(a) +#define IDirectDrawSurface_GetPixelFormat(p,a) (p)->GetPixelFormat(a) +#define IDirectDrawSurface_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a) +#define IDirectDrawSurface_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectDrawSurface_IsLost(p) (p)->IsLost() +#define IDirectDrawSurface_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) +#define IDirectDrawSurface_ReleaseDC(p,a) (p)->ReleaseDC(a) +#define IDirectDrawSurface_Restore(p) (p)->Restore() +#define IDirectDrawSurface_SetClipper(p,a) (p)->SetClipper(a) +#define IDirectDrawSurface_SetColorKey(p,a,b) (p)->SetColorKey(a,b) +#define IDirectDrawSurface_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b) +#define IDirectDrawSurface_SetPalette(p,a) (p)->SetPalette(a) +#define IDirectDrawSurface_Unlock(p,b) (p)->Unlock(b) +#define IDirectDrawSurface_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e) +#define IDirectDrawSurface_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a) +#define IDirectDrawSurface_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b) +#endif + +/* + * IDirectDrawSurface2 and related interfaces + */ +#undef INTERFACE +#define INTERFACE IDirectDrawSurface2 +DECLARE_INTERFACE_( IDirectDrawSurface2, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDrawSurface methods ***/ + STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE2) PURE; + STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE; + STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE2, LPRECT,DWORD, LPDDBLTFX) PURE; + STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE; + STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE2, LPRECT,DWORD) PURE; + STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE2) PURE; + STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE; + STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE; + STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE2, DWORD) PURE; + STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE2 FAR *) PURE; + STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE; + STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE; + STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE; + STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; + STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE; + STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE; + STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE; + STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE; + STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE; + STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE; + STDMETHOD(IsLost)(THIS) PURE; + STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE; + STDMETHOD(ReleaseDC)(THIS_ HDC) PURE; + STDMETHOD(Restore)(THIS) PURE; + STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE; + STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; + STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE; + STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE; + STDMETHOD(Unlock)(THIS_ LPVOID) PURE; + STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE2,LPRECT,DWORD, LPDDOVERLAYFX) PURE; + STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE; + STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE2) PURE; + /*** Added in the v2 interface ***/ + STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE; + STDMETHOD(PageLock)(THIS_ DWORD) PURE; + STDMETHOD(PageUnlock)(THIS_ DWORD) PURE; +}; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDrawSurface2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawSurface2_Release(p) (p)->lpVtbl->Release(p) +#define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a) +#define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a) +#define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e) +#define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c) +#define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e) +#define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b) +#define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b) +#define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c) +#define IDirectDrawSurface2_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b) +#define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b) +#define IDirectDrawSurface2_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a) +#define IDirectDrawSurface2_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b) +#define IDirectDrawSurface2_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a) +#define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b) +#define IDirectDrawSurface2_GetDC(p,a) (p)->lpVtbl->GetDC(p,a) +#define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a) +#define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b) +#define IDirectDrawSurface2_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a) +#define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a) +#define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a) +#define IDirectDrawSurface2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectDrawSurface2_IsLost(p) (p)->lpVtbl->IsLost(p) +#define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) +#define IDirectDrawSurface2_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a) +#define IDirectDrawSurface2_Restore(p) (p)->lpVtbl->Restore(p) +#define IDirectDrawSurface2_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a) +#define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b) +#define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b) +#define IDirectDrawSurface2_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a) +#define IDirectDrawSurface2_Unlock(p,b) (p)->lpVtbl->Unlock(p,b) +#define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e) +#define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a) +#define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b) +#define IDirectDrawSurface2_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a) +#define IDirectDrawSurface2_PageLock(p,a) (p)->lpVtbl->PageLock(p,a) +#define IDirectDrawSurface2_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a) +#else +#define IDirectDrawSurface2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDrawSurface2_AddRef(p) (p)->AddRef() +#define IDirectDrawSurface2_Release(p) (p)->Release() +#define IDirectDrawSurface2_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a) +#define IDirectDrawSurface2_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a) +#define IDirectDrawSurface2_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e) +#define IDirectDrawSurface2_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c) +#define IDirectDrawSurface2_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e) +#define IDirectDrawSurface2_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b) +#define IDirectDrawSurface2_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b) +#define IDirectDrawSurface2_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c) +#define IDirectDrawSurface2_Flip(p,a,b) (p)->Flip(a,b) +#define IDirectDrawSurface2_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b) +#define IDirectDrawSurface2_GetBltStatus(p,a) (p)->GetBltStatus(a) +#define IDirectDrawSurface2_GetCaps(p,b) (p)->GetCaps(b) +#define IDirectDrawSurface2_GetClipper(p,a) (p)->GetClipper(a) +#define IDirectDrawSurface2_GetColorKey(p,a,b) (p)->GetColorKey(a,b) +#define IDirectDrawSurface2_GetDC(p,a) (p)->GetDC(a) +#define IDirectDrawSurface2_GetFlipStatus(p,a) (p)->GetFlipStatus(a) +#define IDirectDrawSurface2_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b) +#define IDirectDrawSurface2_GetPalette(p,a) (p)->GetPalette(a) +#define IDirectDrawSurface2_GetPixelFormat(p,a) (p)->GetPixelFormat(a) +#define IDirectDrawSurface2_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a) +#define IDirectDrawSurface2_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectDrawSurface2_IsLost(p) (p)->IsLost() +#define IDirectDrawSurface2_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) +#define IDirectDrawSurface2_ReleaseDC(p,a) (p)->ReleaseDC(a) +#define IDirectDrawSurface2_Restore(p) (p)->Restore() +#define IDirectDrawSurface2_SetClipper(p,a) (p)->SetClipper(a) +#define IDirectDrawSurface2_SetColorKey(p,a,b) (p)->SetColorKey(a,b) +#define IDirectDrawSurface2_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b) +#define IDirectDrawSurface2_SetPalette(p,a) (p)->SetPalette(a) +#define IDirectDrawSurface2_Unlock(p,b) (p)->Unlock(b) +#define IDirectDrawSurface2_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e) +#define IDirectDrawSurface2_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a) +#define IDirectDrawSurface2_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b) +#define IDirectDrawSurface2_GetDDInterface(p,a) (p)->GetDDInterface(a) +#define IDirectDrawSurface2_PageLock(p,a) (p)->PageLock(a) +#define IDirectDrawSurface2_PageUnlock(p,a) (p)->PageUnlock(a) +#endif + +/* + * IDirectDrawSurface3 and related interfaces + */ +#undef INTERFACE +#define INTERFACE IDirectDrawSurface3 +DECLARE_INTERFACE_( IDirectDrawSurface3, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDrawSurface methods ***/ + STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE; + STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE; + STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE3, LPRECT,DWORD, LPDDBLTFX) PURE; + STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE; + STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE3, LPRECT,DWORD) PURE; + STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE; + STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE; + STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE; + STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3, DWORD) PURE; + STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3 FAR *) PURE; + STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE; + STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE; + STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE; + STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; + STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE; + STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE; + STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE; + STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE; + STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE; + STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE; + STDMETHOD(IsLost)(THIS) PURE; + STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE; + STDMETHOD(ReleaseDC)(THIS_ HDC) PURE; + STDMETHOD(Restore)(THIS) PURE; + STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE; + STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; + STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE; + STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE; + STDMETHOD(Unlock)(THIS_ LPVOID) PURE; + STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE3,LPRECT,DWORD, LPDDOVERLAYFX) PURE; + STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE; + STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE; + /*** Added in the v2 interface ***/ + STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE; + STDMETHOD(PageLock)(THIS_ DWORD) PURE; + STDMETHOD(PageUnlock)(THIS_ DWORD) PURE; + /*** Added in the V3 interface ***/ + STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC, DWORD) PURE; +}; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDrawSurface3_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawSurface3_Release(p) (p)->lpVtbl->Release(p) +#define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a) +#define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a) +#define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e) +#define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c) +#define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e) +#define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b) +#define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b) +#define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c) +#define IDirectDrawSurface3_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b) +#define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b) +#define IDirectDrawSurface3_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a) +#define IDirectDrawSurface3_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b) +#define IDirectDrawSurface3_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a) +#define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b) +#define IDirectDrawSurface3_GetDC(p,a) (p)->lpVtbl->GetDC(p,a) +#define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a) +#define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b) +#define IDirectDrawSurface3_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a) +#define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a) +#define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a) +#define IDirectDrawSurface3_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectDrawSurface3_IsLost(p) (p)->lpVtbl->IsLost(p) +#define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) +#define IDirectDrawSurface3_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a) +#define IDirectDrawSurface3_Restore(p) (p)->lpVtbl->Restore(p) +#define IDirectDrawSurface3_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a) +#define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b) +#define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b) +#define IDirectDrawSurface3_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a) +#define IDirectDrawSurface3_Unlock(p,b) (p)->lpVtbl->Unlock(p,b) +#define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e) +#define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a) +#define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b) +#define IDirectDrawSurface3_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a) +#define IDirectDrawSurface3_PageLock(p,a) (p)->lpVtbl->PageLock(p,a) +#define IDirectDrawSurface3_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a) +#define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b) +#else +#define IDirectDrawSurface3_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDrawSurface3_AddRef(p) (p)->AddRef() +#define IDirectDrawSurface3_Release(p) (p)->Release() +#define IDirectDrawSurface3_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a) +#define IDirectDrawSurface3_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a) +#define IDirectDrawSurface3_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e) +#define IDirectDrawSurface3_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c) +#define IDirectDrawSurface3_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e) +#define IDirectDrawSurface3_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b) +#define IDirectDrawSurface3_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b) +#define IDirectDrawSurface3_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c) +#define IDirectDrawSurface3_Flip(p,a,b) (p)->Flip(a,b) +#define IDirectDrawSurface3_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b) +#define IDirectDrawSurface3_GetBltStatus(p,a) (p)->GetBltStatus(a) +#define IDirectDrawSurface3_GetCaps(p,b) (p)->GetCaps(b) +#define IDirectDrawSurface3_GetClipper(p,a) (p)->GetClipper(a) +#define IDirectDrawSurface3_GetColorKey(p,a,b) (p)->GetColorKey(a,b) +#define IDirectDrawSurface3_GetDC(p,a) (p)->GetDC(a) +#define IDirectDrawSurface3_GetFlipStatus(p,a) (p)->GetFlipStatus(a) +#define IDirectDrawSurface3_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b) +#define IDirectDrawSurface3_GetPalette(p,a) (p)->GetPalette(a) +#define IDirectDrawSurface3_GetPixelFormat(p,a) (p)->GetPixelFormat(a) +#define IDirectDrawSurface3_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a) +#define IDirectDrawSurface3_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectDrawSurface3_IsLost(p) (p)->IsLost() +#define IDirectDrawSurface3_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) +#define IDirectDrawSurface3_ReleaseDC(p,a) (p)->ReleaseDC(a) +#define IDirectDrawSurface3_Restore(p) (p)->Restore() +#define IDirectDrawSurface3_SetClipper(p,a) (p)->SetClipper(a) +#define IDirectDrawSurface3_SetColorKey(p,a,b) (p)->SetColorKey(a,b) +#define IDirectDrawSurface3_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b) +#define IDirectDrawSurface3_SetPalette(p,a) (p)->SetPalette(a) +#define IDirectDrawSurface3_Unlock(p,b) (p)->Unlock(b) +#define IDirectDrawSurface3_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e) +#define IDirectDrawSurface3_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a) +#define IDirectDrawSurface3_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b) +#define IDirectDrawSurface3_GetDDInterface(p,a) (p)->GetDDInterface(a) +#define IDirectDrawSurface3_PageLock(p,a) (p)->PageLock(a) +#define IDirectDrawSurface3_PageUnlock(p,a) (p)->PageUnlock(a) +#define IDirectDrawSurface3_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b) +#endif + +/* + * IDirectDrawSurface4 and related interfaces + */ +#undef INTERFACE +#define INTERFACE IDirectDrawSurface4 +DECLARE_INTERFACE_( IDirectDrawSurface4, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDrawSurface methods ***/ + STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE4) PURE; + STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE; + STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE4, LPRECT,DWORD, LPDDBLTFX) PURE; + STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE; + STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE4, LPRECT,DWORD) PURE; + STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE4) PURE; + STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK2) PURE; + STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK2) PURE; + STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE4, DWORD) PURE; + STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2, LPDIRECTDRAWSURFACE4 FAR *) PURE; + STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE; + STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2) PURE; + STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE; + STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; + STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE; + STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE; + STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE; + STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE; + STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE; + STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC2) PURE; + STDMETHOD(IsLost)(THIS) PURE; + STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC2,DWORD,HANDLE) PURE; + STDMETHOD(ReleaseDC)(THIS_ HDC) PURE; + STDMETHOD(Restore)(THIS) PURE; + STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE; + STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; + STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE; + STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE; + STDMETHOD(Unlock)(THIS_ LPRECT) PURE; + STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE4,LPRECT,DWORD, LPDDOVERLAYFX) PURE; + STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE; + STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE4) PURE; + /*** Added in the v2 interface ***/ + STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE; + STDMETHOD(PageLock)(THIS_ DWORD) PURE; + STDMETHOD(PageUnlock)(THIS_ DWORD) PURE; + /*** Added in the v3 interface ***/ + STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2, DWORD) PURE; + /*** Added in the v4 interface ***/ + STDMETHOD(SetPrivateData)(THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE; + STDMETHOD(GetPrivateData)(THIS_ REFGUID, LPVOID, LPDWORD) PURE; + STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE; + STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD) PURE; + STDMETHOD(ChangeUniquenessValue)(THIS) PURE; +}; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDrawSurface4_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawSurface4_Release(p) (p)->lpVtbl->Release(p) +#define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a) +#define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a) +#define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e) +#define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c) +#define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e) +#define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b) +#define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b) +#define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c) +#define IDirectDrawSurface4_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b) +#define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b) +#define IDirectDrawSurface4_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a) +#define IDirectDrawSurface4_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b) +#define IDirectDrawSurface4_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a) +#define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b) +#define IDirectDrawSurface4_GetDC(p,a) (p)->lpVtbl->GetDC(p,a) +#define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a) +#define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b) +#define IDirectDrawSurface4_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a) +#define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a) +#define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a) +#define IDirectDrawSurface4_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectDrawSurface4_IsLost(p) (p)->lpVtbl->IsLost(p) +#define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) +#define IDirectDrawSurface4_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a) +#define IDirectDrawSurface4_Restore(p) (p)->lpVtbl->Restore(p) +#define IDirectDrawSurface4_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a) +#define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b) +#define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b) +#define IDirectDrawSurface4_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a) +#define IDirectDrawSurface4_Unlock(p,b) (p)->lpVtbl->Unlock(p,b) +#define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e) +#define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a) +#define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b) +#define IDirectDrawSurface4_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a) +#define IDirectDrawSurface4_PageLock(p,a) (p)->lpVtbl->PageLock(p,a) +#define IDirectDrawSurface4_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a) +#define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b) +#define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) +#define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) +#define IDirectDrawSurface4_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) +#define IDirectDrawSurface4_GetUniquenessValue(p, a) (p)->lpVtbl->GetUniquenessValue(p, a) +#define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p) +#else +#define IDirectDrawSurface4_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDrawSurface4_AddRef(p) (p)->AddRef() +#define IDirectDrawSurface4_Release(p) (p)->Release() +#define IDirectDrawSurface4_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a) +#define IDirectDrawSurface4_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a) +#define IDirectDrawSurface4_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e) +#define IDirectDrawSurface4_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c) +#define IDirectDrawSurface4_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e) +#define IDirectDrawSurface4_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b) +#define IDirectDrawSurface4_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b) +#define IDirectDrawSurface4_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c) +#define IDirectDrawSurface4_Flip(p,a,b) (p)->Flip(a,b) +#define IDirectDrawSurface4_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b) +#define IDirectDrawSurface4_GetBltStatus(p,a) (p)->GetBltStatus(a) +#define IDirectDrawSurface4_GetCaps(p,b) (p)->GetCaps(b) +#define IDirectDrawSurface4_GetClipper(p,a) (p)->GetClipper(a) +#define IDirectDrawSurface4_GetColorKey(p,a,b) (p)->GetColorKey(a,b) +#define IDirectDrawSurface4_GetDC(p,a) (p)->GetDC(a) +#define IDirectDrawSurface4_GetFlipStatus(p,a) (p)->GetFlipStatus(a) +#define IDirectDrawSurface4_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b) +#define IDirectDrawSurface4_GetPalette(p,a) (p)->GetPalette(a) +#define IDirectDrawSurface4_GetPixelFormat(p,a) (p)->GetPixelFormat(a) +#define IDirectDrawSurface4_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a) +#define IDirectDrawSurface4_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectDrawSurface4_IsLost(p) (p)->IsLost() +#define IDirectDrawSurface4_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) +#define IDirectDrawSurface4_ReleaseDC(p,a) (p)->ReleaseDC(a) +#define IDirectDrawSurface4_Restore(p) (p)->Restore() +#define IDirectDrawSurface4_SetClipper(p,a) (p)->SetClipper(a) +#define IDirectDrawSurface4_SetColorKey(p,a,b) (p)->SetColorKey(a,b) +#define IDirectDrawSurface4_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b) +#define IDirectDrawSurface4_SetPalette(p,a) (p)->SetPalette(a) +#define IDirectDrawSurface4_Unlock(p,b) (p)->Unlock(b) +#define IDirectDrawSurface4_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e) +#define IDirectDrawSurface4_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a) +#define IDirectDrawSurface4_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b) +#define IDirectDrawSurface4_GetDDInterface(p,a) (p)->GetDDInterface(a) +#define IDirectDrawSurface4_PageLock(p,a) (p)->PageLock(a) +#define IDirectDrawSurface4_PageUnlock(p,a) (p)->PageUnlock(a) +#define IDirectDrawSurface4_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b) +#define IDirectDrawSurface4_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) +#define IDirectDrawSurface4_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) +#define IDirectDrawSurface4_FreePrivateData(p,a) (p)->FreePrivateData(a) +#define IDirectDrawSurface4_GetUniquenessValue(p, a) (p)->GetUniquenessValue(a) +#define IDirectDrawSurface4_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue() +#endif + +/* + * IDirectDrawSurface7 and related interfaces + */ +#undef INTERFACE +#define INTERFACE IDirectDrawSurface7 +DECLARE_INTERFACE_( IDirectDrawSurface7, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDrawSurface methods ***/ + STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE7) PURE; + STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE; + STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE7, LPRECT,DWORD, LPDDBLTFX) PURE; + STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE; + STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE7, LPRECT,DWORD) PURE; + STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE7) PURE; + STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK7) PURE; + STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK7) PURE; + STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE7, DWORD) PURE; + STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS2, LPDIRECTDRAWSURFACE7 FAR *) PURE; + STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE; + STDMETHOD(GetCaps)(THIS_ LPDDSCAPS2) PURE; + STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE; + STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; + STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE; + STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE; + STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE; + STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE; + STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE; + STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC2) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC2) PURE; + STDMETHOD(IsLost)(THIS) PURE; + STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC2,DWORD,HANDLE) PURE; + STDMETHOD(ReleaseDC)(THIS_ HDC) PURE; + STDMETHOD(Restore)(THIS) PURE; + STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE; + STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; + STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE; + STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE; + STDMETHOD(Unlock)(THIS_ LPRECT) PURE; + STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE7,LPRECT,DWORD, LPDDOVERLAYFX) PURE; + STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE; + STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE7) PURE; + /*** Added in the v2 interface ***/ + STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE; + STDMETHOD(PageLock)(THIS_ DWORD) PURE; + STDMETHOD(PageUnlock)(THIS_ DWORD) PURE; + /*** Added in the v3 interface ***/ + STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC2, DWORD) PURE; + /*** Added in the v4 interface ***/ + STDMETHOD(SetPrivateData)(THIS_ REFGUID, LPVOID, DWORD, DWORD) PURE; + STDMETHOD(GetPrivateData)(THIS_ REFGUID, LPVOID, LPDWORD) PURE; + STDMETHOD(FreePrivateData)(THIS_ REFGUID) PURE; + STDMETHOD(GetUniquenessValue)(THIS_ LPDWORD) PURE; + STDMETHOD(ChangeUniquenessValue)(THIS) PURE; + /*** Moved Texture7 methods here ***/ + STDMETHOD(SetPriority)(THIS_ DWORD) PURE; + STDMETHOD(GetPriority)(THIS_ LPDWORD) PURE; + STDMETHOD(SetLOD)(THIS_ DWORD) PURE; + STDMETHOD(GetLOD)(THIS_ LPDWORD) PURE; +}; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectDrawSurface7_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawSurface7_Release(p) (p)->lpVtbl->Release(p) +#define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->lpVtbl->AddAttachedSurface(p,a) +#define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->lpVtbl->AddOverlayDirtyRect(p,a) +#define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->lpVtbl->Blt(p,a,b,c,d,e) +#define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->lpVtbl->BltBatch(p,a,b,c) +#define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->lpVtbl->BltFast(p,a,b,c,d,e) +#define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->lpVtbl->DeleteAttachedSurface(p,a,b) +#define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->lpVtbl->EnumAttachedSurfaces(p,a,b) +#define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->lpVtbl->EnumOverlayZOrders(p,a,b,c) +#define IDirectDrawSurface7_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b) +#define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->lpVtbl->GetAttachedSurface(p,a,b) +#define IDirectDrawSurface7_GetBltStatus(p,a) (p)->lpVtbl->GetBltStatus(p,a) +#define IDirectDrawSurface7_GetCaps(p,b) (p)->lpVtbl->GetCaps(p,b) +#define IDirectDrawSurface7_GetClipper(p,a) (p)->lpVtbl->GetClipper(p,a) +#define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->lpVtbl->GetColorKey(p,a,b) +#define IDirectDrawSurface7_GetDC(p,a) (p)->lpVtbl->GetDC(p,a) +#define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->lpVtbl->GetFlipStatus(p,a) +#define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->lpVtbl->GetOverlayPosition(p,a,b) +#define IDirectDrawSurface7_GetPalette(p,a) (p)->lpVtbl->GetPalette(p,a) +#define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->lpVtbl->GetPixelFormat(p,a) +#define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->lpVtbl->GetSurfaceDesc(p,a) +#define IDirectDrawSurface7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectDrawSurface7_IsLost(p) (p)->lpVtbl->IsLost(p) +#define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->lpVtbl->Lock(p,a,b,c,d) +#define IDirectDrawSurface7_ReleaseDC(p,a) (p)->lpVtbl->ReleaseDC(p,a) +#define IDirectDrawSurface7_Restore(p) (p)->lpVtbl->Restore(p) +#define IDirectDrawSurface7_SetClipper(p,a) (p)->lpVtbl->SetClipper(p,a) +#define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->lpVtbl->SetColorKey(p,a,b) +#define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->lpVtbl->SetOverlayPosition(p,a,b) +#define IDirectDrawSurface7_SetPalette(p,a) (p)->lpVtbl->SetPalette(p,a) +#define IDirectDrawSurface7_Unlock(p,b) (p)->lpVtbl->Unlock(p,b) +#define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->lpVtbl->UpdateOverlay(p,a,b,c,d,e) +#define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->lpVtbl->UpdateOverlayDisplay(p,a) +#define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->lpVtbl->UpdateOverlayZOrder(p,a,b) +#define IDirectDrawSurface7_GetDDInterface(p,a) (p)->lpVtbl->GetDDInterface(p,a) +#define IDirectDrawSurface7_PageLock(p,a) (p)->lpVtbl->PageLock(p,a) +#define IDirectDrawSurface7_PageUnlock(p,a) (p)->lpVtbl->PageUnlock(p,a) +#define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->lpVtbl->SetSurfaceDesc(p,a,b) +#define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->lpVtbl->SetPrivateData(p,a,b,c,d) +#define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->lpVtbl->GetPrivateData(p,a,b,c) +#define IDirectDrawSurface7_FreePrivateData(p,a) (p)->lpVtbl->FreePrivateData(p,a) +#define IDirectDrawSurface7_GetUniquenessValue(p, a) (p)->lpVtbl->GetUniquenessValue(p, a) +#define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->lpVtbl->ChangeUniquenessValue(p) +#define IDirectDrawSurface7_SetPriority(p,a) (p)->lpVtbl->SetPriority(p,a) +#define IDirectDrawSurface7_GetPriority(p,a) (p)->lpVtbl->GetPriority(p,a) +#define IDirectDrawSurface7_SetLOD(p,a) (p)->lpVtbl->SetLOD(p,a) +#define IDirectDrawSurface7_GetLOD(p,a) (p)->lpVtbl->GetLOD(p,a) +#else +#define IDirectDrawSurface7_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectDrawSurface7_AddRef(p) (p)->AddRef() +#define IDirectDrawSurface7_Release(p) (p)->Release() +#define IDirectDrawSurface7_AddAttachedSurface(p,a) (p)->AddAttachedSurface(a) +#define IDirectDrawSurface7_AddOverlayDirtyRect(p,a) (p)->AddOverlayDirtyRect(a) +#define IDirectDrawSurface7_Blt(p,a,b,c,d,e) (p)->Blt(a,b,c,d,e) +#define IDirectDrawSurface7_BltBatch(p,a,b,c) (p)->BltBatch(a,b,c) +#define IDirectDrawSurface7_BltFast(p,a,b,c,d,e) (p)->BltFast(a,b,c,d,e) +#define IDirectDrawSurface7_DeleteAttachedSurface(p,a,b) (p)->DeleteAttachedSurface(a,b) +#define IDirectDrawSurface7_EnumAttachedSurfaces(p,a,b) (p)->EnumAttachedSurfaces(a,b) +#define IDirectDrawSurface7_EnumOverlayZOrders(p,a,b,c) (p)->EnumOverlayZOrders(a,b,c) +#define IDirectDrawSurface7_Flip(p,a,b) (p)->Flip(a,b) +#define IDirectDrawSurface7_GetAttachedSurface(p,a,b) (p)->GetAttachedSurface(a,b) +#define IDirectDrawSurface7_GetBltStatus(p,a) (p)->GetBltStatus(a) +#define IDirectDrawSurface7_GetCaps(p,b) (p)->GetCaps(b) +#define IDirectDrawSurface7_GetClipper(p,a) (p)->GetClipper(a) +#define IDirectDrawSurface7_GetColorKey(p,a,b) (p)->GetColorKey(a,b) +#define IDirectDrawSurface7_GetDC(p,a) (p)->GetDC(a) +#define IDirectDrawSurface7_GetFlipStatus(p,a) (p)->GetFlipStatus(a) +#define IDirectDrawSurface7_GetOverlayPosition(p,a,b) (p)->GetOverlayPosition(a,b) +#define IDirectDrawSurface7_GetPalette(p,a) (p)->GetPalette(a) +#define IDirectDrawSurface7_GetPixelFormat(p,a) (p)->GetPixelFormat(a) +#define IDirectDrawSurface7_GetSurfaceDesc(p,a) (p)->GetSurfaceDesc(a) +#define IDirectDrawSurface7_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectDrawSurface7_IsLost(p) (p)->IsLost() +#define IDirectDrawSurface7_Lock(p,a,b,c,d) (p)->Lock(a,b,c,d) +#define IDirectDrawSurface7_ReleaseDC(p,a) (p)->ReleaseDC(a) +#define IDirectDrawSurface7_Restore(p) (p)->Restore() +#define IDirectDrawSurface7_SetClipper(p,a) (p)->SetClipper(a) +#define IDirectDrawSurface7_SetColorKey(p,a,b) (p)->SetColorKey(a,b) +#define IDirectDrawSurface7_SetOverlayPosition(p,a,b) (p)->SetOverlayPosition(a,b) +#define IDirectDrawSurface7_SetPalette(p,a) (p)->SetPalette(a) +#define IDirectDrawSurface7_Unlock(p,b) (p)->Unlock(b) +#define IDirectDrawSurface7_UpdateOverlay(p,a,b,c,d,e) (p)->UpdateOverlay(a,b,c,d,e) +#define IDirectDrawSurface7_UpdateOverlayDisplay(p,a) (p)->UpdateOverlayDisplay(a) +#define IDirectDrawSurface7_UpdateOverlayZOrder(p,a,b) (p)->UpdateOverlayZOrder(a,b) +#define IDirectDrawSurface7_GetDDInterface(p,a) (p)->GetDDInterface(a) +#define IDirectDrawSurface7_PageLock(p,a) (p)->PageLock(a) +#define IDirectDrawSurface7_PageUnlock(p,a) (p)->PageUnlock(a) +#define IDirectDrawSurface7_SetSurfaceDesc(p,a,b) (p)->SetSurfaceDesc(a,b) +#define IDirectDrawSurface7_SetPrivateData(p,a,b,c,d) (p)->SetPrivateData(a,b,c,d) +#define IDirectDrawSurface7_GetPrivateData(p,a,b,c) (p)->GetPrivateData(a,b,c) +#define IDirectDrawSurface7_FreePrivateData(p,a) (p)->FreePrivateData(a) +#define IDirectDrawSurface7_GetUniquenessValue(p, a) (p)->GetUniquenessValue(a) +#define IDirectDrawSurface7_ChangeUniquenessValue(p) (p)->ChangeUniquenessValue() +#define IDirectDrawSurface7_SetPriority(p,a) (p)->SetPriority(a) +#define IDirectDrawSurface7_GetPriority(p,a) (p)->GetPriority(a) +#define IDirectDrawSurface7_SetLOD(p,a) (p)->SetLOD(a) +#define IDirectDrawSurface7_GetLOD(p,a) (p)->GetLOD(a) +#endif + + +/* + * IDirectDrawColorControl + */ +#if defined( _WIN32 ) && !defined( _NO_COM ) +#undef INTERFACE +#define INTERFACE IDirectDrawColorControl +DECLARE_INTERFACE_( IDirectDrawColorControl, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDrawColorControl methods ***/ + STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE; + STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE; +}; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectDrawColorControl_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) +#define IDirectDrawColorControl_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawColorControl_Release(p) (p)->lpVtbl->Release(p) +#define IDirectDrawColorControl_GetColorControls(p, a) (p)->lpVtbl->GetColorControls(p, a) +#define IDirectDrawColorControl_SetColorControls(p, a) (p)->lpVtbl->SetColorControls(p, a) +#else +#define IDirectDrawColorControl_QueryInterface(p, a, b) (p)->QueryInterface(a, b) +#define IDirectDrawColorControl_AddRef(p) (p)->AddRef() +#define IDirectDrawColorControl_Release(p) (p)->Release() +#define IDirectDrawColorControl_GetColorControls(p, a) (p)->GetColorControls(a) +#define IDirectDrawColorControl_SetColorControls(p, a) (p)->SetColorControls(a) +#endif + +#endif + + +/* + * IDirectDrawGammaControl + */ +#if defined( _WIN32 ) && !defined( _NO_COM ) +#undef INTERFACE +#define INTERFACE IDirectDrawGammaControl +DECLARE_INTERFACE_( IDirectDrawGammaControl, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDrawGammaControl methods ***/ + STDMETHOD(GetGammaRamp)(THIS_ DWORD, LPDDGAMMARAMP) PURE; + STDMETHOD(SetGammaRamp)(THIS_ DWORD, LPDDGAMMARAMP) PURE; +}; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectDrawGammaControl_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) +#define IDirectDrawGammaControl_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDrawGammaControl_Release(p) (p)->lpVtbl->Release(p) +#define IDirectDrawGammaControl_GetGammaRamp(p, a, b) (p)->lpVtbl->GetGammaRamp(p, a, b) +#define IDirectDrawGammaControl_SetGammaRamp(p, a, b) (p)->lpVtbl->SetGammaRamp(p, a, b) +#else +#define IDirectDrawGammaControl_QueryInterface(p, a, b) (p)->QueryInterface(a, b) +#define IDirectDrawGammaControl_AddRef(p) (p)->AddRef() +#define IDirectDrawGammaControl_Release(p) (p)->Release() +#define IDirectDrawGammaControl_GetGammaRamp(p, a, b) (p)->GetGammaRamp(a, b) +#define IDirectDrawGammaControl_SetGammaRamp(p, a, b) (p)->SetGammaRamp(a, b) +#endif + +#endif + + + +#endif + + +/* + * DDSURFACEDESC + */ +typedef struct _DDSURFACEDESC +{ + DWORD dwSize; // size of the DDSURFACEDESC structure + DWORD dwFlags; // determines what fields are valid + DWORD dwHeight; // height of surface to be created + DWORD dwWidth; // width of input surface + union + { + LONG lPitch; // distance to start of next line (return value only) + DWORD dwLinearSize; // Formless late-allocated optimized surface size + } DUMMYUNIONNAMEN(1); + DWORD dwBackBufferCount; // number of back buffers requested + union + { + DWORD dwMipMapCount; // number of mip-map levels requested + DWORD dwZBufferBitDepth; // depth of Z buffer requested + DWORD dwRefreshRate; // refresh rate (used when display mode is described) + } DUMMYUNIONNAMEN(2); + DWORD dwAlphaBitDepth; // depth of alpha buffer requested + DWORD dwReserved; // reserved + LPVOID lpSurface; // pointer to the associated surface memory + DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use + DDCOLORKEY ddckCKDestBlt; // color key for destination blt use + DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use + DDCOLORKEY ddckCKSrcBlt; // color key for source blt use + DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface + DDSCAPS ddsCaps; // direct draw surface capabilities +} DDSURFACEDESC; + +/* + * DDSURFACEDESC2 + */ +typedef struct _DDSURFACEDESC2 +{ + DWORD dwSize; // size of the DDSURFACEDESC structure + DWORD dwFlags; // determines what fields are valid + DWORD dwHeight; // height of surface to be created + DWORD dwWidth; // width of input surface + union + { + LONG lPitch; // distance to start of next line (return value only) + DWORD dwLinearSize; // Formless late-allocated optimized surface size + } DUMMYUNIONNAMEN(1); + union + { + DWORD dwBackBufferCount; // number of back buffers requested + DWORD dwDepth; // the depth if this is a volume texture + } DUMMYUNIONNAMEN(5); + union + { + DWORD dwMipMapCount; // number of mip-map levels requestde + // dwZBufferBitDepth removed, use ddpfPixelFormat one instead + DWORD dwRefreshRate; // refresh rate (used when display mode is described) + DWORD dwSrcVBHandle; // The source used in VB::Optimize + } DUMMYUNIONNAMEN(2); + DWORD dwAlphaBitDepth; // depth of alpha buffer requested + DWORD dwReserved; // reserved + LPVOID lpSurface; // pointer to the associated surface memory + union + { + DDCOLORKEY ddckCKDestOverlay; // color key for destination overlay use + DWORD dwEmptyFaceColor; // Physical color for empty cubemap faces + } DUMMYUNIONNAMEN(3); + DDCOLORKEY ddckCKDestBlt; // color key for destination blt use + DDCOLORKEY ddckCKSrcOverlay; // color key for source overlay use + DDCOLORKEY ddckCKSrcBlt; // color key for source blt use + union + { + DDPIXELFORMAT ddpfPixelFormat; // pixel format description of the surface + DWORD dwFVF; // vertex format description of vertex buffers + } DUMMYUNIONNAMEN(4); + DDSCAPS2 ddsCaps; // direct draw surface capabilities + DWORD dwTextureStage; // stage in multitexture cascade +} DDSURFACEDESC2; + +/* + * ddsCaps field is valid. + */ +#define DDSD_CAPS 0x00000001l // default + +/* + * dwHeight field is valid. + */ +#define DDSD_HEIGHT 0x00000002l + +/* + * dwWidth field is valid. + */ +#define DDSD_WIDTH 0x00000004l + +/* + * lPitch is valid. + */ +#define DDSD_PITCH 0x00000008l + +/* + * dwBackBufferCount is valid. + */ +#define DDSD_BACKBUFFERCOUNT 0x00000020l + +/* + * dwZBufferBitDepth is valid. (shouldnt be used in DDSURFACEDESC2) + */ +#define DDSD_ZBUFFERBITDEPTH 0x00000040l + +/* + * dwAlphaBitDepth is valid. + */ +#define DDSD_ALPHABITDEPTH 0x00000080l + + +/* + * lpSurface is valid. + */ +#define DDSD_LPSURFACE 0x00000800l + +/* + * ddpfPixelFormat is valid. + */ +#define DDSD_PIXELFORMAT 0x00001000l + +/* + * ddckCKDestOverlay is valid. + */ +#define DDSD_CKDESTOVERLAY 0x00002000l + +/* + * ddckCKDestBlt is valid. + */ +#define DDSD_CKDESTBLT 0x00004000l + +/* + * ddckCKSrcOverlay is valid. + */ +#define DDSD_CKSRCOVERLAY 0x00008000l + +/* + * ddckCKSrcBlt is valid. + */ +#define DDSD_CKSRCBLT 0x00010000l + +/* + * dwMipMapCount is valid. + */ +#define DDSD_MIPMAPCOUNT 0x00020000l + + /* + * dwRefreshRate is valid + */ +#define DDSD_REFRESHRATE 0x00040000l + +/* + * dwLinearSize is valid + */ +#define DDSD_LINEARSIZE 0x00080000l + +/* + * dwTextureStage is valid + */ +#define DDSD_TEXTURESTAGE 0x00100000l +/* + * dwFVF is valid + */ +#define DDSD_FVF 0x00200000l +/* + * dwSrcVBHandle is valid + */ +#define DDSD_SRCVBHANDLE 0x00400000l + +/* + * dwDepth is valid + */ +#define DDSD_DEPTH 0x00800000l + +/* + * All input fields are valid. + */ +#define DDSD_ALL 0x00fff9eel + +/* + * DDOPTSURFACEDESC + */ +typedef struct _DDOPTSURFACEDESC +{ + DWORD dwSize; // size of the DDOPTSURFACEDESC structure + DWORD dwFlags; // determines what fields are valid + DDSCAPS2 ddSCaps; // Common caps like: Memory type + DDOSCAPS ddOSCaps; // Common caps like: Memory type + GUID guid; // Compression technique GUID + DWORD dwCompressionRatio; // Compression ratio +} DDOPTSURFACEDESC; + +/* + * guid field is valid. + */ +#define DDOSD_GUID 0x00000001l + +/* + * dwCompressionRatio field is valid. + */ +#define DDOSD_COMPRESSION_RATIO 0x00000002l + +/* + * ddSCaps field is valid. + */ +#define DDOSD_SCAPS 0x00000004l + +/* + * ddOSCaps field is valid. + */ +#define DDOSD_OSCAPS 0x00000008l + +/* + * All input fields are valid. + */ +#define DDOSD_ALL 0x0000000fl + +/* + * The surface's optimized pixelformat is compressed + */ +#define DDOSDCAPS_OPTCOMPRESSED 0x00000001l + +/* + * The surface's optimized pixelformat is reordered + */ +#define DDOSDCAPS_OPTREORDERED 0x00000002l + +/* + * The opt surface is a monolithic mipmap + */ +#define DDOSDCAPS_MONOLITHICMIPMAP 0x00000004l + +/* + * The valid Surf caps: + * #define DDSCAPS_SYSTEMMEMORY 0x00000800l + * #define DDSCAPS_VIDEOMEMORY 0x00004000l + * #define DDSCAPS_LOCALVIDMEM 0x10000000l + * #define DDSCAPS_NONLOCALVIDMEM 0x20000000l + */ +#define DDOSDCAPS_VALIDSCAPS 0x30004800l + +/* + * The valid OptSurf caps + */ +#define DDOSDCAPS_VALIDOSCAPS 0x00000007l + + +/* + * DDCOLORCONTROL + */ +typedef struct _DDCOLORCONTROL +{ + DWORD dwSize; + DWORD dwFlags; + LONG lBrightness; + LONG lContrast; + LONG lHue; + LONG lSaturation; + LONG lSharpness; + LONG lGamma; + LONG lColorEnable; + DWORD dwReserved1; +} DDCOLORCONTROL; + + +/* + * lBrightness field is valid. + */ +#define DDCOLOR_BRIGHTNESS 0x00000001l + +/* + * lContrast field is valid. + */ +#define DDCOLOR_CONTRAST 0x00000002l + +/* + * lHue field is valid. + */ +#define DDCOLOR_HUE 0x00000004l + +/* + * lSaturation field is valid. + */ +#define DDCOLOR_SATURATION 0x00000008l + +/* + * lSharpness field is valid. + */ +#define DDCOLOR_SHARPNESS 0x00000010l + +/* + * lGamma field is valid. + */ +#define DDCOLOR_GAMMA 0x00000020l + +/* + * lColorEnable field is valid. + */ +#define DDCOLOR_COLORENABLE 0x00000040l + + + +/*============================================================================ + * + * Direct Draw Capability Flags + * + * These flags are used to describe the capabilities of a given Surface. + * All flags are bit flags. + * + *==========================================================================*/ + +/**************************************************************************** + * + * DIRECTDRAWSURFACE CAPABILITY FLAGS + * + ****************************************************************************/ + +/* + * This bit is reserved. It should not be specified. + */ +#define DDSCAPS_RESERVED1 0x00000001l + +/* + * Indicates that this surface contains alpha-only information. + * (To determine if a surface is RGBA/YUVA, the pixel format must be + * interrogated.) + */ +#define DDSCAPS_ALPHA 0x00000002l + +/* + * Indicates that this surface is a backbuffer. It is generally + * set by CreateSurface when the DDSCAPS_FLIP capability bit is set. + * It indicates that this surface is THE back buffer of a surface + * flipping structure. DirectDraw supports N surfaces in a + * surface flipping structure. Only the surface that immediately + * precedeces the DDSCAPS_FRONTBUFFER has this capability bit set. + * The other surfaces are identified as back buffers by the presence + * of the DDSCAPS_FLIP capability, their attachment order, and the + * absence of the DDSCAPS_FRONTBUFFER and DDSCAPS_BACKBUFFER + * capabilities. The bit is sent to CreateSurface when a standalone + * back buffer is being created. This surface could be attached to + * a front buffer and/or back buffers to form a flipping surface + * structure after the CreateSurface call. See AddAttachments for + * a detailed description of the behaviors in this case. + */ +#define DDSCAPS_BACKBUFFER 0x00000004l + +/* + * Indicates a complex surface structure is being described. A + * complex surface structure results in the creation of more than + * one surface. The additional surfaces are attached to the root + * surface. The complex structure can only be destroyed by + * destroying the root. + */ +#define DDSCAPS_COMPLEX 0x00000008l + +/* + * Indicates that this surface is a part of a surface flipping structure. + * When it is passed to CreateSurface the DDSCAPS_FRONTBUFFER and + * DDSCAP_BACKBUFFER bits are not set. They are set by CreateSurface + * on the resulting creations. The dwBackBufferCount field in the + * DDSURFACEDESC structure must be set to at least 1 in order for + * the CreateSurface call to succeed. The DDSCAPS_COMPLEX capability + * must always be set with creating multiple surfaces through CreateSurface. + */ +#define DDSCAPS_FLIP 0x00000010l + +/* + * Indicates that this surface is THE front buffer of a surface flipping + * structure. It is generally set by CreateSurface when the DDSCAPS_FLIP + * capability bit is set. + * If this capability is sent to CreateSurface then a standalonw front buffer + * is created. This surface will not have the DDSCAPS_FLIP capability. + * It can be attached to other back buffers to form a flipping structure. + * See AddAttachments for a detailed description of the behaviors in this + * case. + */ +#define DDSCAPS_FRONTBUFFER 0x00000020l + +/* + * Indicates that this surface is any offscreen surface that is not an overlay, + * texture, zbuffer, front buffer, back buffer, or alpha surface. It is used + * to identify plain vanilla surfaces. + */ +#define DDSCAPS_OFFSCREENPLAIN 0x00000040l + +/* + * Indicates that this surface is an overlay. It may or may not be directly visible + * depending on whether or not it is currently being overlayed onto the primary + * surface. DDSCAPS_VISIBLE can be used to determine whether or not it is being + * overlayed at the moment. + */ +#define DDSCAPS_OVERLAY 0x00000080l + +/* + * Indicates that unique DirectDrawPalette objects can be created and + * attached to this surface. + */ +#define DDSCAPS_PALETTE 0x00000100l + +/* + * Indicates that this surface is the primary surface. The primary + * surface represents what the user is seeing at the moment. + */ +#define DDSCAPS_PRIMARYSURFACE 0x00000200l + + +/* + * This flag used to be DDSCAPS_PRIMARYSURFACELEFT, which is now + * obsolete. + */ +#define DDSCAPS_RESERVED3 0x00000400l +#define DDSCAPS_PRIMARYSURFACELEFT 0x00000000l + +/* + * Indicates that this surface memory was allocated in system memory + */ +#define DDSCAPS_SYSTEMMEMORY 0x00000800l + +/* + * Indicates that this surface can be used as a 3D texture. It does not + * indicate whether or not the surface is being used for that purpose. + */ +#define DDSCAPS_TEXTURE 0x00001000l + +/* + * Indicates that a surface may be a destination for 3D rendering. This + * bit must be set in order to query for a Direct3D Device Interface + * from this surface. + */ +#define DDSCAPS_3DDEVICE 0x00002000l + +/* + * Indicates that this surface exists in video memory. + */ +#define DDSCAPS_VIDEOMEMORY 0x00004000l + +/* + * Indicates that changes made to this surface are immediately visible. + * It is always set for the primary surface and is set for overlays while + * they are being overlayed and texture maps while they are being textured. + */ +#define DDSCAPS_VISIBLE 0x00008000l + +/* + * Indicates that only writes are permitted to the surface. Read accesses + * from the surface may or may not generate a protection fault, but the + * results of a read from this surface will not be meaningful. READ ONLY. + */ +#define DDSCAPS_WRITEONLY 0x00010000l + +/* + * Indicates that this surface is a z buffer. A z buffer does not contain + * displayable information. Instead it contains bit depth information that is + * used to determine which pixels are visible and which are obscured. + */ +#define DDSCAPS_ZBUFFER 0x00020000l + +/* + * Indicates surface will have a DC associated long term + */ +#define DDSCAPS_OWNDC 0x00040000l + +/* + * Indicates surface should be able to receive live video + */ +#define DDSCAPS_LIVEVIDEO 0x00080000l + +/* + * Indicates surface should be able to have a stream decompressed + * to it by the hardware. + */ +#define DDSCAPS_HWCODEC 0x00100000l + +/* + * Surface is a ModeX surface. + * + */ +#define DDSCAPS_MODEX 0x00200000l + +/* + * Indicates surface is one level of a mip-map. This surface will + * be attached to other DDSCAPS_MIPMAP surfaces to form the mip-map. + * This can be done explicitly, by creating a number of surfaces and + * attaching them with AddAttachedSurface or by implicitly by CreateSurface. + * If this bit is set then DDSCAPS_TEXTURE must also be set. + */ +#define DDSCAPS_MIPMAP 0x00400000l + +/* + * This bit is reserved. It should not be specified. + */ +#define DDSCAPS_RESERVED2 0x00800000l + + +/* + * Indicates that memory for the surface is not allocated until the surface + * is loaded (via the Direct3D texture Load() function). + */ +#define DDSCAPS_ALLOCONLOAD 0x04000000l + +/* + * Indicates that the surface will recieve data from a video port. + */ +#define DDSCAPS_VIDEOPORT 0x08000000l + +/* + * Indicates that a video memory surface is resident in true, local video + * memory rather than non-local video memory. If this flag is specified then + * so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with + * DDSCAPS_NONLOCALVIDMEM. + */ +#define DDSCAPS_LOCALVIDMEM 0x10000000l + +/* + * Indicates that a video memory surface is resident in non-local video + * memory rather than true, local video memory. If this flag is specified + * then so must DDSCAPS_VIDEOMEMORY. This flag is mutually exclusive with + * DDSCAPS_LOCALVIDMEM. + */ +#define DDSCAPS_NONLOCALVIDMEM 0x20000000l + +/* + * Indicates that this surface is a standard VGA mode surface, and not a + * ModeX surface. (This flag will never be set in combination with the + * DDSCAPS_MODEX flag). + */ +#define DDSCAPS_STANDARDVGAMODE 0x40000000l + +/* + * Indicates that this surface will be an optimized surface. This flag is + * currently only valid in conjunction with the DDSCAPS_TEXTURE flag. The surface + * will be created without any underlying video memory until loaded. + */ +#define DDSCAPS_OPTIMIZED 0x80000000l + + + +/* + * This bit is reserved + */ +#define DDSCAPS2_RESERVED4 0x00000002L +#define DDSCAPS2_HARDWAREDEINTERLACE 0x00000000L + +/* + * Indicates to the driver that this surface will be locked very frequently + * (for procedural textures, dynamic lightmaps, etc). Surfaces with this cap + * set must also have DDSCAPS_TEXTURE. This cap cannot be used with + * DDSCAPS2_HINTSTATIC and DDSCAPS2_OPAQUE. + */ +#define DDSCAPS2_HINTDYNAMIC 0x00000004L + +/* + * Indicates to the driver that this surface can be re-ordered/retiled on + * load. This operation will not change the size of the texture. It is + * relatively fast and symmetrical, since the application may lock these + * bits (although it will take a performance hit when doing so). Surfaces + * with this cap set must also have DDSCAPS_TEXTURE. This cap cannot be + * used with DDSCAPS2_HINTDYNAMIC and DDSCAPS2_OPAQUE. + */ +#define DDSCAPS2_HINTSTATIC 0x00000008L + +/* + * Indicates that the client would like this texture surface to be managed by the + * DirectDraw/Direct3D runtime. Surfaces with this cap set must also have + * DDSCAPS_TEXTURE set. + */ +#define DDSCAPS2_TEXTUREMANAGE 0x00000010L + +/* + * These bits are reserved for internal use */ +#define DDSCAPS2_RESERVED1 0x00000020L +#define DDSCAPS2_RESERVED2 0x00000040L + +/* + * Indicates to the driver that this surface will never be locked again. + * The driver is free to optimize this surface via retiling and actual compression. + * All calls to Lock() or Blts from this surface will fail. Surfaces with this + * cap set must also have DDSCAPS_TEXTURE. This cap cannot be used with + * DDSCAPS2_HINTDYNAMIC and DDSCAPS2_HINTSTATIC. + */ +#define DDSCAPS2_OPAQUE 0x00000080L + +/* + * Applications should set this bit at CreateSurface time to indicate that they + * intend to use antialiasing. Only valid if DDSCAPS_3DDEVICE is also set. + */ +#define DDSCAPS2_HINTANTIALIASING 0x00000100L + + +/* + * This flag is used at CreateSurface time to indicate that this set of + * surfaces is a cubic environment map + */ +#define DDSCAPS2_CUBEMAP 0x00000200L + +/* + * These flags preform two functions: + * - At CreateSurface time, they define which of the six cube faces are + * required by the application. + * - After creation, each face in the cubemap will have exactly one of these + * bits set. + */ +#define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400L +#define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800L +#define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000L +#define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000L +#define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000L +#define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000L + +/* + * This macro may be used to specify all faces of a cube map at CreateSurface time + */ +#define DDSCAPS2_CUBEMAP_ALLFACES ( DDSCAPS2_CUBEMAP_POSITIVEX |\ + DDSCAPS2_CUBEMAP_NEGATIVEX |\ + DDSCAPS2_CUBEMAP_POSITIVEY |\ + DDSCAPS2_CUBEMAP_NEGATIVEY |\ + DDSCAPS2_CUBEMAP_POSITIVEZ |\ + DDSCAPS2_CUBEMAP_NEGATIVEZ ) + + +/* + * This flag is an additional flag which is present on mipmap sublevels from DX7 onwards + * It enables easier use of GetAttachedSurface rather than EnumAttachedSurfaces for surface + * constructs such as Cube Maps, wherein there are more than one mipmap surface attached + * to the root surface. + * This caps bit is ignored by CreateSurface + */ +#define DDSCAPS2_MIPMAPSUBLEVEL 0x00010000L + +/* This flag indicates that the texture should be managed by D3D only */ +#define DDSCAPS2_D3DTEXTUREMANAGE 0x00020000L + +/* This flag indicates that the managed surface can be safely lost */ +#define DDSCAPS2_DONOTPERSIST 0x00040000L + +/* indicates that this surface is part of a stereo flipping chain */ +#define DDSCAPS2_STEREOSURFACELEFT 0x00080000L + + +/* + * Indicates that the surface is a volume. + * Can be combined with DDSCAPS_MIPMAP to indicate a multi-level volume + */ +#define DDSCAPS2_VOLUME 0x00200000L + +/* + * Indicates that the surface may be locked multiple times by the application. + * This cap cannot be used with DDSCAPS2_OPAQUE. + */ +#define DDSCAPS2_NOTUSERLOCKABLE 0x00400000L + +/* + * Indicates that the vertex buffer data can be used to render points and + * point sprites. + */ +#define DDSCAPS2_POINTS 0x00800000L + +/* + * Indicates that the vertex buffer data can be used to render rt pactches. + */ +#define DDSCAPS2_RTPATCHES 0x01000000L + +/* + * Indicates that the vertex buffer data can be used to render n patches. + */ +#define DDSCAPS2_NPATCHES 0x02000000L + +/* + * This bit is reserved for internal use + */ +#define DDSCAPS2_RESERVED3 0x04000000L + + +/* + * Indicates that the contents of the backbuffer do not have to be preserved + * the contents of the backbuffer after they are presented. + */ +#define DDSCAPS2_DISCARDBACKBUFFER 0x10000000L + +/* + * This is a mask that indicates the set of bits that may be set + * at createsurface time to indicate number of samples per pixel + * when multisampling + */ +#define DDSCAPS3_MULTISAMPLE_MASK 0x0000001FL + + + /**************************************************************************** + * + * DIRECTDRAW DRIVER CAPABILITY FLAGS + * + ****************************************************************************/ + +/* + * Display hardware has 3D acceleration. + */ +#define DDCAPS_3D 0x00000001l + +/* + * Indicates that DirectDraw will support only dest rectangles that are aligned + * on DIRECTDRAWCAPS.dwAlignBoundaryDest boundaries of the surface, respectively. + * READ ONLY. + */ +#define DDCAPS_ALIGNBOUNDARYDEST 0x00000002l + +/* + * Indicates that DirectDraw will support only source rectangles whose sizes in + * BYTEs are DIRECTDRAWCAPS.dwAlignSizeDest multiples, respectively. READ ONLY. + */ +#define DDCAPS_ALIGNSIZEDEST 0x00000004l +/* + * Indicates that DirectDraw will support only source rectangles that are aligned + * on DIRECTDRAWCAPS.dwAlignBoundarySrc boundaries of the surface, respectively. + * READ ONLY. + */ +#define DDCAPS_ALIGNBOUNDARYSRC 0x00000008l + +/* + * Indicates that DirectDraw will support only source rectangles whose sizes in + * BYTEs are DIRECTDRAWCAPS.dwAlignSizeSrc multiples, respectively. READ ONLY. + */ +#define DDCAPS_ALIGNSIZESRC 0x00000010l + +/* + * Indicates that DirectDraw will create video memory surfaces that have a stride + * alignment equal to DIRECTDRAWCAPS.dwAlignStride. READ ONLY. + */ +#define DDCAPS_ALIGNSTRIDE 0x00000020l + +/* + * Display hardware is capable of blt operations. + */ +#define DDCAPS_BLT 0x00000040l + +/* + * Display hardware is capable of asynchronous blt operations. + */ +#define DDCAPS_BLTQUEUE 0x00000080l + +/* + * Display hardware is capable of color space conversions during the blt operation. + */ +#define DDCAPS_BLTFOURCC 0x00000100l + +/* + * Display hardware is capable of stretching during blt operations. + */ +#define DDCAPS_BLTSTRETCH 0x00000200l + +/* + * Display hardware is shared with GDI. + */ +#define DDCAPS_GDI 0x00000400l + +/* + * Display hardware can overlay. + */ +#define DDCAPS_OVERLAY 0x00000800l + +/* + * Set if display hardware supports overlays but can not clip them. + */ +#define DDCAPS_OVERLAYCANTCLIP 0x00001000l + +/* + * Indicates that overlay hardware is capable of color space conversions during + * the overlay operation. + */ +#define DDCAPS_OVERLAYFOURCC 0x00002000l + +/* + * Indicates that stretching can be done by the overlay hardware. + */ +#define DDCAPS_OVERLAYSTRETCH 0x00004000l + +/* + * Indicates that unique DirectDrawPalettes can be created for DirectDrawSurfaces + * other than the primary surface. + */ +#define DDCAPS_PALETTE 0x00008000l + +/* + * Indicates that palette changes can be syncd with the veritcal refresh. + */ +#define DDCAPS_PALETTEVSYNC 0x00010000l + +/* + * Display hardware can return the current scan line. + */ +#define DDCAPS_READSCANLINE 0x00020000l + + +/* + * This flag used to bo DDCAPS_STEREOVIEW, which is now obsolete + */ +#define DDCAPS_RESERVED1 0x00040000l + +/* + * Display hardware is capable of generating a vertical blank interrupt. + */ +#define DDCAPS_VBI 0x00080000l + +/* + * Supports the use of z buffers with blt operations. + */ +#define DDCAPS_ZBLTS 0x00100000l + +/* + * Supports Z Ordering of overlays. + */ +#define DDCAPS_ZOVERLAYS 0x00200000l + +/* + * Supports color key + */ +#define DDCAPS_COLORKEY 0x00400000l + +/* + * Supports alpha surfaces + */ +#define DDCAPS_ALPHA 0x00800000l + +/* + * colorkey is hardware assisted(DDCAPS_COLORKEY will also be set) + */ +#define DDCAPS_COLORKEYHWASSIST 0x01000000l + +/* + * no hardware support at all + */ +#define DDCAPS_NOHARDWARE 0x02000000l + +/* + * Display hardware is capable of color fill with bltter + */ +#define DDCAPS_BLTCOLORFILL 0x04000000l + +/* + * Display hardware is bank switched, and potentially very slow at + * random access to VRAM. + */ +#define DDCAPS_BANKSWITCHED 0x08000000l + +/* + * Display hardware is capable of depth filling Z-buffers with bltter + */ +#define DDCAPS_BLTDEPTHFILL 0x10000000l + +/* + * Display hardware is capable of clipping while bltting. + */ +#define DDCAPS_CANCLIP 0x20000000l + +/* + * Display hardware is capable of clipping while stretch bltting. + */ +#define DDCAPS_CANCLIPSTRETCHED 0x40000000l + +/* + * Display hardware is capable of bltting to or from system memory + */ +#define DDCAPS_CANBLTSYSMEM 0x80000000l + + + /**************************************************************************** + * + * MORE DIRECTDRAW DRIVER CAPABILITY FLAGS (dwCaps2) + * + ****************************************************************************/ + +/* + * Display hardware is certified + */ +#define DDCAPS2_CERTIFIED 0x00000001l + +/* + * Driver cannot interleave 2D operations (lock and blt) to surfaces with + * Direct3D rendering operations between calls to BeginScene() and EndScene() + */ +#define DDCAPS2_NO2DDURING3DSCENE 0x00000002l + +/* + * Display hardware contains a video port + */ +#define DDCAPS2_VIDEOPORT 0x00000004l + +/* + * The overlay can be automatically flipped according to the video port + * VSYNCs, providing automatic doubled buffered display of video port + * data using an overlay + */ +#define DDCAPS2_AUTOFLIPOVERLAY 0x00000008l + +/* + * Overlay can display each field of interlaced data individually while + * it is interleaved in memory without causing jittery artifacts. + */ +#define DDCAPS2_CANBOBINTERLEAVED 0x00000010l + +/* + * Overlay can display each field of interlaced data individually while + * it is not interleaved in memory without causing jittery artifacts. + */ +#define DDCAPS2_CANBOBNONINTERLEAVED 0x00000020l + +/* + * The overlay surface contains color controls (brightness, sharpness, etc.) + */ +#define DDCAPS2_COLORCONTROLOVERLAY 0x00000040l + +/* + * The primary surface contains color controls (gamma, etc.) + */ +#define DDCAPS2_COLORCONTROLPRIMARY 0x00000080l + +/* + * RGBZ -> RGB supported for 16:16 RGB:Z + */ +#define DDCAPS2_CANDROPZ16BIT 0x00000100l + +/* + * Driver supports non-local video memory. + */ +#define DDCAPS2_NONLOCALVIDMEM 0x00000200l + +/* + * Dirver supports non-local video memory but has different capabilities for + * non-local video memory surfaces. If this bit is set then so must + * DDCAPS2_NONLOCALVIDMEM. + */ +#define DDCAPS2_NONLOCALVIDMEMCAPS 0x00000400l + +/* + * Driver neither requires nor prefers surfaces to be pagelocked when performing + * blts involving system memory surfaces + */ +#define DDCAPS2_NOPAGELOCKREQUIRED 0x00000800l + +/* + * Driver can create surfaces which are wider than the primary surface + */ +#define DDCAPS2_WIDESURFACES 0x00001000l + +/* + * Driver supports bob without using a video port by handling the + * DDFLIP_ODD and DDFLIP_EVEN flags specified in Flip. + */ +#define DDCAPS2_CANFLIPODDEVEN 0x00002000l + +/* + * Driver supports bob using hardware + */ +#define DDCAPS2_CANBOBHARDWARE 0x00004000l + +/* + * Driver supports bltting any FOURCC surface to another surface of the same FOURCC + */ +#define DDCAPS2_COPYFOURCC 0x00008000l + + +/* + * Driver supports loadable gamma ramps for the primary surface + */ +#define DDCAPS2_PRIMARYGAMMA 0x00020000l + +/* + * Driver can render in windowed mode. + */ +#define DDCAPS2_CANRENDERWINDOWED 0x00080000l + +/* + * A calibrator is available to adjust the gamma ramp according to the + * physical display properties so that the result will be identical on + * all calibrated systems. + */ +#define DDCAPS2_CANCALIBRATEGAMMA 0x00100000l + +/* + * Indicates that the driver will respond to DDFLIP_INTERVALn flags + */ +#define DDCAPS2_FLIPINTERVAL 0x00200000l + +/* + * Indicates that the driver will respond to DDFLIP_NOVSYNC + */ +#define DDCAPS2_FLIPNOVSYNC 0x00400000l + +/* + * Driver supports management of video memory, if this flag is ON, + * driver manages the texture if requested with DDSCAPS2_TEXTUREMANAGE on + * DirectX manages the texture if this flag is OFF and surface has DDSCAPS2_TEXTUREMANAGE on + */ +#define DDCAPS2_CANMANAGETEXTURE 0x00800000l + +/* + * The Direct3D texture manager uses this cap to decide whether to put managed + * surfaces in non-local video memory. If the cap is set, the texture manager will + * put managed surfaces in non-local vidmem. Drivers that cannot texture from + * local vidmem SHOULD NOT set this cap. + */ +#define DDCAPS2_TEXMANINNONLOCALVIDMEM 0x01000000l + +/* + * Indicates that the driver supports DX7 type of stereo in at least one mode (which may + * not necessarily be the current mode). Applications should use IDirectDraw7 (or higher) + * ::EnumDisplayModes and check the DDSURFACEDESC.ddsCaps.dwCaps2 field for the presence of + * DDSCAPS2_STEREOSURFACELEFT to check if a particular mode supports stereo. The application + * can also use IDirectDraw7(or higher)::GetDisplayMode to check the current mode. + */ +#define DDCAPS2_STEREO 0x02000000L + +/* + * This caps bit is intended for internal DirectDraw use. + * -It is only valid if DDCAPS2_NONLOCALVIDMEMCAPS is set. + * -If this bit is set, then DDCAPS_CANBLTSYSMEM MUST be set by the driver (and + * all the assoicated system memory blt caps must be correct). + * -It implies that the system->video blt caps in DDCAPS also apply to system to + * nonlocal blts. I.e. the dwSVBCaps, dwSVBCKeyCaps, dwSVBFXCaps and dwSVBRops + * members of DDCAPS (DDCORECAPS) are filled in correctly. + * -Any blt from system to nonlocal memory that matches these caps bits will + * be passed to the driver. + * + * NOTE: This is intended to enable the driver itself to do efficient reordering + * of textures. This is NOT meant to imply that hardware can write into AGP memory. + * This operation is not currently supported. + */ +#define DDCAPS2_SYSTONONLOCAL_AS_SYSTOLOCAL 0x04000000L + +/* + * Indicates that the driver can support PUREHAL. + */ +#define DDCAPS2_PUREHAL 0x08000000L + + +/**************************************************************************** + * + * DIRECTDRAW FX ALPHA CAPABILITY FLAGS + * + ****************************************************************************/ + +/* + * Supports alpha blending around the edge of a source color keyed surface. + * For Blt. + */ +#define DDFXALPHACAPS_BLTALPHAEDGEBLEND 0x00000001l + +/* + * Supports alpha information in the pixel format. The bit depth of alpha + * information in the pixel format can be 1,2,4, or 8. The alpha value becomes + * more opaque as the alpha value increases. (0 is transparent.) + * For Blt. + */ +#define DDFXALPHACAPS_BLTALPHAPIXELS 0x00000002l + +/* + * Supports alpha information in the pixel format. The bit depth of alpha + * information in the pixel format can be 1,2,4, or 8. The alpha value + * becomes more transparent as the alpha value increases. (0 is opaque.) + * This flag can only be set if DDCAPS_ALPHA is set. + * For Blt. + */ +#define DDFXALPHACAPS_BLTALPHAPIXELSNEG 0x00000004l + +/* + * Supports alpha only surfaces. The bit depth of an alpha only surface can be + * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases. + * (0 is transparent.) + * For Blt. + */ +#define DDFXALPHACAPS_BLTALPHASURFACES 0x00000008l + +/* + * The depth of the alpha channel data can range can be 1,2,4, or 8. + * The NEG suffix indicates that this alpha channel becomes more transparent + * as the alpha value increases. (0 is opaque.) This flag can only be set if + * DDCAPS_ALPHA is set. + * For Blt. + */ +#define DDFXALPHACAPS_BLTALPHASURFACESNEG 0x00000010l + +/* + * Supports alpha blending around the edge of a source color keyed surface. + * For Overlays. + */ +#define DDFXALPHACAPS_OVERLAYALPHAEDGEBLEND 0x00000020l + +/* + * Supports alpha information in the pixel format. The bit depth of alpha + * information in the pixel format can be 1,2,4, or 8. The alpha value becomes + * more opaque as the alpha value increases. (0 is transparent.) + * For Overlays. + */ +#define DDFXALPHACAPS_OVERLAYALPHAPIXELS 0x00000040l + +/* + * Supports alpha information in the pixel format. The bit depth of alpha + * information in the pixel format can be 1,2,4, or 8. The alpha value + * becomes more transparent as the alpha value increases. (0 is opaque.) + * This flag can only be set if DDCAPS_ALPHA is set. + * For Overlays. + */ +#define DDFXALPHACAPS_OVERLAYALPHAPIXELSNEG 0x00000080l + +/* + * Supports alpha only surfaces. The bit depth of an alpha only surface can be + * 1,2,4, or 8. The alpha value becomes more opaque as the alpha value increases. + * (0 is transparent.) + * For Overlays. + */ +#define DDFXALPHACAPS_OVERLAYALPHASURFACES 0x00000100l + +/* + * The depth of the alpha channel data can range can be 1,2,4, or 8. + * The NEG suffix indicates that this alpha channel becomes more transparent + * as the alpha value increases. (0 is opaque.) This flag can only be set if + * DDCAPS_ALPHA is set. + * For Overlays. + */ +#define DDFXALPHACAPS_OVERLAYALPHASURFACESNEG 0x00000200l + +#if DIRECTDRAW_VERSION < 0x0600 +#endif //DIRECTDRAW_VERSION + + +/**************************************************************************** + * + * DIRECTDRAW FX CAPABILITY FLAGS + * + ****************************************************************************/ + +/* + * Uses arithmetic operations to stretch and shrink surfaces during blt + * rather than pixel doubling techniques. Along the Y axis. + */ +#define DDFXCAPS_BLTARITHSTRETCHY 0x00000020l + +/* + * Uses arithmetic operations to stretch during blt + * rather than pixel doubling techniques. Along the Y axis. Only + * works for x1, x2, etc. + */ +#define DDFXCAPS_BLTARITHSTRETCHYN 0x00000010l + +/* + * Supports mirroring left to right in blt. + */ +#define DDFXCAPS_BLTMIRRORLEFTRIGHT 0x00000040l + +/* + * Supports mirroring top to bottom in blt. + */ +#define DDFXCAPS_BLTMIRRORUPDOWN 0x00000080l + +/* + * Supports arbitrary rotation for blts. + */ +#define DDFXCAPS_BLTROTATION 0x00000100l + +/* + * Supports 90 degree rotations for blts. + */ +#define DDFXCAPS_BLTROTATION90 0x00000200l + +/* + * DirectDraw supports arbitrary shrinking of a surface along the + * x axis (horizontal direction) for blts. + */ +#define DDFXCAPS_BLTSHRINKX 0x00000400l + +/* + * DirectDraw supports integer shrinking (1x,2x,) of a surface + * along the x axis (horizontal direction) for blts. + */ +#define DDFXCAPS_BLTSHRINKXN 0x00000800l + +/* + * DirectDraw supports arbitrary shrinking of a surface along the + * y axis (horizontal direction) for blts. + */ +#define DDFXCAPS_BLTSHRINKY 0x00001000l + +/* + * DirectDraw supports integer shrinking (1x,2x,) of a surface + * along the y axis (vertical direction) for blts. + */ +#define DDFXCAPS_BLTSHRINKYN 0x00002000l + +/* + * DirectDraw supports arbitrary stretching of a surface along the + * x axis (horizontal direction) for blts. + */ +#define DDFXCAPS_BLTSTRETCHX 0x00004000l + +/* + * DirectDraw supports integer stretching (1x,2x,) of a surface + * along the x axis (horizontal direction) for blts. + */ +#define DDFXCAPS_BLTSTRETCHXN 0x00008000l + +/* + * DirectDraw supports arbitrary stretching of a surface along the + * y axis (horizontal direction) for blts. + */ +#define DDFXCAPS_BLTSTRETCHY 0x00010000l + +/* + * DirectDraw supports integer stretching (1x,2x,) of a surface + * along the y axis (vertical direction) for blts. + */ +#define DDFXCAPS_BLTSTRETCHYN 0x00020000l + +/* + * Uses arithmetic operations to stretch and shrink surfaces during + * overlay rather than pixel doubling techniques. Along the Y axis + * for overlays. + */ +#define DDFXCAPS_OVERLAYARITHSTRETCHY 0x00040000l + +/* + * Uses arithmetic operations to stretch surfaces during + * overlay rather than pixel doubling techniques. Along the Y axis + * for overlays. Only works for x1, x2, etc. + */ +#define DDFXCAPS_OVERLAYARITHSTRETCHYN 0x00000008l + +/* + * DirectDraw supports arbitrary shrinking of a surface along the + * x axis (horizontal direction) for overlays. + */ +#define DDFXCAPS_OVERLAYSHRINKX 0x00080000l + +/* + * DirectDraw supports integer shrinking (1x,2x,) of a surface + * along the x axis (horizontal direction) for overlays. + */ +#define DDFXCAPS_OVERLAYSHRINKXN 0x00100000l + +/* + * DirectDraw supports arbitrary shrinking of a surface along the + * y axis (horizontal direction) for overlays. + */ +#define DDFXCAPS_OVERLAYSHRINKY 0x00200000l + +/* + * DirectDraw supports integer shrinking (1x,2x,) of a surface + * along the y axis (vertical direction) for overlays. + */ +#define DDFXCAPS_OVERLAYSHRINKYN 0x00400000l + +/* + * DirectDraw supports arbitrary stretching of a surface along the + * x axis (horizontal direction) for overlays. + */ +#define DDFXCAPS_OVERLAYSTRETCHX 0x00800000l + +/* + * DirectDraw supports integer stretching (1x,2x,) of a surface + * along the x axis (horizontal direction) for overlays. + */ +#define DDFXCAPS_OVERLAYSTRETCHXN 0x01000000l + +/* + * DirectDraw supports arbitrary stretching of a surface along the + * y axis (horizontal direction) for overlays. + */ +#define DDFXCAPS_OVERLAYSTRETCHY 0x02000000l + +/* + * DirectDraw supports integer stretching (1x,2x,) of a surface + * along the y axis (vertical direction) for overlays. + */ +#define DDFXCAPS_OVERLAYSTRETCHYN 0x04000000l + +/* + * DirectDraw supports mirroring of overlays across the vertical axis + */ +#define DDFXCAPS_OVERLAYMIRRORLEFTRIGHT 0x08000000l + +/* + * DirectDraw supports mirroring of overlays across the horizontal axis + */ +#define DDFXCAPS_OVERLAYMIRRORUPDOWN 0x10000000l + +/* + * DirectDraw supports deinterlacing of overlay surfaces + */ +#define DDFXCAPS_OVERLAYDEINTERLACE 0x20000000l + +/* + * Driver can do alpha blending for blits. + */ +#define DDFXCAPS_BLTALPHA 0x00000001l + + +/* + * Driver can do surface-reconstruction filtering for warped blits. + */ +#define DDFXCAPS_BLTFILTER DDFXCAPS_BLTARITHSTRETCHY + +/* + * Driver can do alpha blending for overlays. + */ +#define DDFXCAPS_OVERLAYALPHA 0x00000004l + + +/* + * Driver can do surface-reconstruction filtering for warped overlays. + */ +#define DDFXCAPS_OVERLAYFILTER DDFXCAPS_OVERLAYARITHSTRETCHY + +/**************************************************************************** + * + * DIRECTDRAW STEREO VIEW CAPABILITIES + * + ****************************************************************************/ + +/* + * This flag used to be DDSVCAPS_ENIGMA, which is now obsolete + */ + +#define DDSVCAPS_RESERVED1 0x00000001l + +/* + * This flag used to be DDSVCAPS_FLICKER, which is now obsolete + */ +#define DDSVCAPS_RESERVED2 0x00000002l + +/* + * This flag used to be DDSVCAPS_REDBLUE, which is now obsolete + */ +#define DDSVCAPS_RESERVED3 0x00000004l + +/* + * This flag used to be DDSVCAPS_SPLIT, which is now obsolete + */ +#define DDSVCAPS_RESERVED4 0x00000008l + +/* + * The stereo view is accomplished with switching technology + */ + +#define DDSVCAPS_STEREOSEQUENTIAL 0x00000010L + + + + +/**************************************************************************** + * + * DIRECTDRAWPALETTE CAPABILITIES + * + ****************************************************************************/ + +/* + * Index is 4 bits. There are sixteen color entries in the palette table. + */ +#define DDPCAPS_4BIT 0x00000001l + +/* + * Index is onto a 8 bit color index. This field is only valid with the + * DDPCAPS_1BIT, DDPCAPS_2BIT or DDPCAPS_4BIT capability and the target + * surface is in 8bpp. Each color entry is one byte long and is an index + * into destination surface's 8bpp palette. + */ +#define DDPCAPS_8BITENTRIES 0x00000002l + +/* + * Index is 8 bits. There are 256 color entries in the palette table. + */ +#define DDPCAPS_8BIT 0x00000004l + +/* + * Indicates that this DIRECTDRAWPALETTE should use the palette color array + * passed into the lpDDColorArray parameter to initialize the DIRECTDRAWPALETTE + * object. + * This flag is obsolete. DirectDraw always initializes the color array from + * the lpDDColorArray parameter. The definition remains for source-level + * compatibility. + */ +#define DDPCAPS_INITIALIZE 0x00000000l + +/* + * This palette is the one attached to the primary surface. Changing this + * table has immediate effect on the display unless DDPSETPAL_VSYNC is specified + * and supported. + */ +#define DDPCAPS_PRIMARYSURFACE 0x00000010l + +/* + * This palette is the one attached to the primary surface left. Changing + * this table has immediate effect on the display for the left eye unless + * DDPSETPAL_VSYNC is specified and supported. + */ +#define DDPCAPS_PRIMARYSURFACELEFT 0x00000020l + +/* + * This palette can have all 256 entries defined + */ +#define DDPCAPS_ALLOW256 0x00000040l + +/* + * This palette can have modifications to it synced with the monitors + * refresh rate. + */ +#define DDPCAPS_VSYNC 0x00000080l + +/* + * Index is 1 bit. There are two color entries in the palette table. + */ +#define DDPCAPS_1BIT 0x00000100l + +/* + * Index is 2 bit. There are four color entries in the palette table. + */ +#define DDPCAPS_2BIT 0x00000200l + +/* + * The peFlags member of PALETTEENTRY denotes an 8 bit alpha value + */ +#define DDPCAPS_ALPHA 0x00000400l + + +/**************************************************************************** + * + * DIRECTDRAWPALETTE SETENTRY CONSTANTS + * + ****************************************************************************/ + + +/**************************************************************************** + * + * DIRECTDRAWPALETTE GETENTRY CONSTANTS + * + ****************************************************************************/ + +/* 0 is the only legal value */ + +/**************************************************************************** + * + * DIRECTDRAWSURFACE SETPRIVATEDATA CONSTANTS + * + ****************************************************************************/ + +/* + * The passed pointer is an IUnknown ptr. The cbData argument to SetPrivateData + * must be set to sizeof(IUnknown*). DirectDraw will call AddRef through this + * pointer and Release when the private data is destroyed. This includes when + * the surface or palette is destroyed before such priovate data is destroyed. + */ +#define DDSPD_IUNKNOWNPOINTER 0x00000001L + +/* + * Private data is only valid for the current state of the object, + * as determined by the uniqueness value. + */ +#define DDSPD_VOLATILE 0x00000002L + + +/**************************************************************************** + * + * DIRECTDRAWSURFACE SETPALETTE CONSTANTS + * + ****************************************************************************/ + + +/**************************************************************************** + * + * DIRECTDRAW BITDEPTH CONSTANTS + * + * NOTE: These are only used to indicate supported bit depths. These + * are flags only, they are not to be used as an actual bit depth. The + * absolute numbers 1, 2, 4, 8, 16, 24 and 32 are used to indicate actual + * bit depths in a surface or for changing the display mode. + * + ****************************************************************************/ + +/* + * 1 bit per pixel. + */ +#define DDBD_1 0x00004000l + +/* + * 2 bits per pixel. + */ +#define DDBD_2 0x00002000l + +/* + * 4 bits per pixel. + */ +#define DDBD_4 0x00001000l + +/* + * 8 bits per pixel. + */ +#define DDBD_8 0x00000800l + +/* + * 16 bits per pixel. + */ +#define DDBD_16 0x00000400l + +/* + * 24 bits per pixel. + */ +#define DDBD_24 0X00000200l + +/* + * 32 bits per pixel. + */ +#define DDBD_32 0x00000100l + +/**************************************************************************** + * + * DIRECTDRAWSURFACE SET/GET COLOR KEY FLAGS + * + ****************************************************************************/ + +/* + * Set if the structure contains a color space. Not set if the structure + * contains a single color key. + */ +#define DDCKEY_COLORSPACE 0x00000001l + +/* + * Set if the structure specifies a color key or color space which is to be + * used as a destination color key for blt operations. + */ +#define DDCKEY_DESTBLT 0x00000002l + +/* + * Set if the structure specifies a color key or color space which is to be + * used as a destination color key for overlay operations. + */ +#define DDCKEY_DESTOVERLAY 0x00000004l + +/* + * Set if the structure specifies a color key or color space which is to be + * used as a source color key for blt operations. + */ +#define DDCKEY_SRCBLT 0x00000008l + +/* + * Set if the structure specifies a color key or color space which is to be + * used as a source color key for overlay operations. + */ +#define DDCKEY_SRCOVERLAY 0x00000010l + + +/**************************************************************************** + * + * DIRECTDRAW COLOR KEY CAPABILITY FLAGS + * + ****************************************************************************/ + +/* + * Supports transparent blting using a color key to identify the replaceable + * bits of the destination surface for RGB colors. + */ +#define DDCKEYCAPS_DESTBLT 0x00000001l + +/* + * Supports transparent blting using a color space to identify the replaceable + * bits of the destination surface for RGB colors. + */ +#define DDCKEYCAPS_DESTBLTCLRSPACE 0x00000002l + +/* + * Supports transparent blting using a color space to identify the replaceable + * bits of the destination surface for YUV colors. + */ +#define DDCKEYCAPS_DESTBLTCLRSPACEYUV 0x00000004l + +/* + * Supports transparent blting using a color key to identify the replaceable + * bits of the destination surface for YUV colors. + */ +#define DDCKEYCAPS_DESTBLTYUV 0x00000008l + +/* + * Supports overlaying using colorkeying of the replaceable bits of the surface + * being overlayed for RGB colors. + */ +#define DDCKEYCAPS_DESTOVERLAY 0x00000010l + +/* + * Supports a color space as the color key for the destination for RGB colors. + */ +#define DDCKEYCAPS_DESTOVERLAYCLRSPACE 0x00000020l + +/* + * Supports a color space as the color key for the destination for YUV colors. + */ +#define DDCKEYCAPS_DESTOVERLAYCLRSPACEYUV 0x00000040l + +/* + * Supports only one active destination color key value for visible overlay + * surfaces. + */ +#define DDCKEYCAPS_DESTOVERLAYONEACTIVE 0x00000080l + +/* + * Supports overlaying using colorkeying of the replaceable bits of the + * surface being overlayed for YUV colors. + */ +#define DDCKEYCAPS_DESTOVERLAYYUV 0x00000100l + +/* + * Supports transparent blting using the color key for the source with + * this surface for RGB colors. + */ +#define DDCKEYCAPS_SRCBLT 0x00000200l + +/* + * Supports transparent blting using a color space for the source with + * this surface for RGB colors. + */ +#define DDCKEYCAPS_SRCBLTCLRSPACE 0x00000400l + +/* + * Supports transparent blting using a color space for the source with + * this surface for YUV colors. + */ +#define DDCKEYCAPS_SRCBLTCLRSPACEYUV 0x00000800l + +/* + * Supports transparent blting using the color key for the source with + * this surface for YUV colors. + */ +#define DDCKEYCAPS_SRCBLTYUV 0x00001000l + +/* + * Supports overlays using the color key for the source with this + * overlay surface for RGB colors. + */ +#define DDCKEYCAPS_SRCOVERLAY 0x00002000l + +/* + * Supports overlays using a color space as the source color key for + * the overlay surface for RGB colors. + */ +#define DDCKEYCAPS_SRCOVERLAYCLRSPACE 0x00004000l + +/* + * Supports overlays using a color space as the source color key for + * the overlay surface for YUV colors. + */ +#define DDCKEYCAPS_SRCOVERLAYCLRSPACEYUV 0x00008000l + +/* + * Supports only one active source color key value for visible + * overlay surfaces. + */ +#define DDCKEYCAPS_SRCOVERLAYONEACTIVE 0x00010000l + +/* + * Supports overlays using the color key for the source with this + * overlay surface for YUV colors. + */ +#define DDCKEYCAPS_SRCOVERLAYYUV 0x00020000l + +/* + * there are no bandwidth trade-offs for using colorkey with an overlay + */ +#define DDCKEYCAPS_NOCOSTOVERLAY 0x00040000l + + +/**************************************************************************** + * + * DIRECTDRAW PIXELFORMAT FLAGS + * + ****************************************************************************/ + +/* + * The surface has alpha channel information in the pixel format. + */ +#define DDPF_ALPHAPIXELS 0x00000001l + +/* + * The pixel format contains alpha only information + */ +#define DDPF_ALPHA 0x00000002l + +/* + * The FourCC code is valid. + */ +#define DDPF_FOURCC 0x00000004l + +/* + * The surface is 4-bit color indexed. + */ +#define DDPF_PALETTEINDEXED4 0x00000008l + +/* + * The surface is indexed into a palette which stores indices + * into the destination surface's 8-bit palette. + */ +#define DDPF_PALETTEINDEXEDTO8 0x00000010l + +/* + * The surface is 8-bit color indexed. + */ +#define DDPF_PALETTEINDEXED8 0x00000020l + +/* + * The RGB data in the pixel format structure is valid. + */ +#define DDPF_RGB 0x00000040l + +/* + * The surface will accept pixel data in the format specified + * and compress it during the write. + */ +#define DDPF_COMPRESSED 0x00000080l + +/* + * The surface will accept RGB data and translate it during + * the write to YUV data. The format of the data to be written + * will be contained in the pixel format structure. The DDPF_RGB + * flag will be set. + */ +#define DDPF_RGBTOYUV 0x00000100l + +/* + * pixel format is YUV - YUV data in pixel format struct is valid + */ +#define DDPF_YUV 0x00000200l + +/* + * pixel format is a z buffer only surface + */ +#define DDPF_ZBUFFER 0x00000400l + +/* + * The surface is 1-bit color indexed. + */ +#define DDPF_PALETTEINDEXED1 0x00000800l + +/* + * The surface is 2-bit color indexed. + */ +#define DDPF_PALETTEINDEXED2 0x00001000l + +/* + * The surface contains Z information in the pixels + */ +#define DDPF_ZPIXELS 0x00002000l + +/* + * The surface contains stencil information along with Z + */ +#define DDPF_STENCILBUFFER 0x00004000l + +/* + * Premultiplied alpha format -- the color components have been + * premultiplied by the alpha component. + */ +#define DDPF_ALPHAPREMULT 0x00008000l + + +/* + * Luminance data in the pixel format is valid. + * Use this flag for luminance-only or luminance+alpha surfaces, + * the bit depth is then ddpf.dwLuminanceBitCount. + */ +#define DDPF_LUMINANCE 0x00020000l + +/* + * Luminance data in the pixel format is valid. + * Use this flag when hanging luminance off bumpmap surfaces, + * the bit mask for the luminance portion of the pixel is then + * ddpf.dwBumpLuminanceBitMask + */ +#define DDPF_BUMPLUMINANCE 0x00040000l + +/* + * Bump map dUdV data in the pixel format is valid. + */ +#define DDPF_BUMPDUDV 0x00080000l + + +/*=========================================================================== + * + * + * DIRECTDRAW CALLBACK FLAGS + * + * + *==========================================================================*/ + +/**************************************************************************** + * + * DIRECTDRAW ENUMSURFACES FLAGS + * + ****************************************************************************/ + +/* + * Enumerate all of the surfaces that meet the search criterion. + */ +#define DDENUMSURFACES_ALL 0x00000001l + +/* + * A search hit is a surface that matches the surface description. + */ +#define DDENUMSURFACES_MATCH 0x00000002l + +/* + * A search hit is a surface that does not match the surface description. + */ +#define DDENUMSURFACES_NOMATCH 0x00000004l + +/* + * Enumerate the first surface that can be created which meets the search criterion. + */ +#define DDENUMSURFACES_CANBECREATED 0x00000008l + +/* + * Enumerate the surfaces that already exist that meet the search criterion. + */ +#define DDENUMSURFACES_DOESEXIST 0x00000010l + + +/**************************************************************************** + * + * DIRECTDRAW SETDISPLAYMODE FLAGS + * + ****************************************************************************/ + +/* + * The desired mode is a standard VGA mode + */ +#define DDSDM_STANDARDVGAMODE 0x00000001l + + +/**************************************************************************** + * + * DIRECTDRAW ENUMDISPLAYMODES FLAGS + * + ****************************************************************************/ + +/* + * Enumerate Modes with different refresh rates. EnumDisplayModes guarantees + * that a particular mode will be enumerated only once. This flag specifies whether + * the refresh rate is taken into account when determining if a mode is unique. + */ +#define DDEDM_REFRESHRATES 0x00000001l + +/* + * Enumerate VGA modes. Specify this flag if you wish to enumerate supported VGA + * modes such as mode 0x13 in addition to the usual ModeX modes (which are always + * enumerated if the application has previously called SetCooperativeLevel with the + * DDSCL_ALLOWMODEX flag set). + */ +#define DDEDM_STANDARDVGAMODES 0x00000002L + + +/**************************************************************************** + * + * DIRECTDRAW SETCOOPERATIVELEVEL FLAGS + * + ****************************************************************************/ + +/* + * Exclusive mode owner will be responsible for the entire primary surface. + * GDI can be ignored. used with DD + */ +#define DDSCL_FULLSCREEN 0x00000001l + +/* + * allow CTRL_ALT_DEL to work while in fullscreen exclusive mode + */ +#define DDSCL_ALLOWREBOOT 0x00000002l + +/* + * prevents DDRAW from modifying the application window. + * prevents DDRAW from minimize/restore the application window on activation. + */ +#define DDSCL_NOWINDOWCHANGES 0x00000004l + +/* + * app wants to work as a regular Windows application + */ +#define DDSCL_NORMAL 0x00000008l + +/* + * app wants exclusive access + */ +#define DDSCL_EXCLUSIVE 0x00000010l + + +/* + * app can deal with non-windows display modes + */ +#define DDSCL_ALLOWMODEX 0x00000040l + +/* + * this window will receive the focus messages + */ +#define DDSCL_SETFOCUSWINDOW 0x00000080l + +/* + * this window is associated with the DDRAW object and will + * cover the screen in fullscreen mode + */ +#define DDSCL_SETDEVICEWINDOW 0x00000100l + +/* + * app wants DDRAW to create a window to be associated with the + * DDRAW object + */ +#define DDSCL_CREATEDEVICEWINDOW 0x00000200l + +/* + * App explicitly asks DDRAW/D3D to be multithread safe. This makes D3D + * take the global crtisec more frequently. + */ +#define DDSCL_MULTITHREADED 0x00000400l + +/* + * App specifies that it would like to keep the FPU set up for optimal Direct3D + * performance (single precision and exceptions disabled) so Direct3D + * does not need to explicitly set the FPU each time. This is assumed by + * default in DirectX 7. See also DDSCL_FPUPRESERVE + */ +#define DDSCL_FPUSETUP 0x00000800l + +/* + * App specifies that it needs either double precision FPU or FPU exceptions + * enabled. This makes Direct3D explicitly set the FPU state eah time it is + * called. Setting the flag will reduce Direct3D performance. The flag is + * assumed by default in DirectX 6 and earlier. See also DDSCL_FPUSETUP + */ +#define DDSCL_FPUPRESERVE 0x00001000l + + +/**************************************************************************** + * + * DIRECTDRAW BLT FLAGS + * + ****************************************************************************/ + +/* + * Use the alpha information in the pixel format or the alpha channel surface + * attached to the destination surface as the alpha channel for this blt. + */ +#define DDBLT_ALPHADEST 0x00000001l + +/* + * Use the dwConstAlphaDest field in the DDBLTFX structure as the alpha channel + * for the destination surface for this blt. + */ +#define DDBLT_ALPHADESTCONSTOVERRIDE 0x00000002l + +/* + * The NEG suffix indicates that the destination surface becomes more + * transparent as the alpha value increases. (0 is opaque) + */ +#define DDBLT_ALPHADESTNEG 0x00000004l + +/* + * Use the lpDDSAlphaDest field in the DDBLTFX structure as the alpha + * channel for the destination for this blt. + */ +#define DDBLT_ALPHADESTSURFACEOVERRIDE 0x00000008l + +/* + * Use the dwAlphaEdgeBlend field in the DDBLTFX structure as the alpha channel + * for the edges of the image that border the color key colors. + */ +#define DDBLT_ALPHAEDGEBLEND 0x00000010l + +/* + * Use the alpha information in the pixel format or the alpha channel surface + * attached to the source surface as the alpha channel for this blt. + */ +#define DDBLT_ALPHASRC 0x00000020l + +/* + * Use the dwConstAlphaSrc field in the DDBLTFX structure as the alpha channel + * for the source for this blt. + */ +#define DDBLT_ALPHASRCCONSTOVERRIDE 0x00000040l + +/* + * The NEG suffix indicates that the source surface becomes more transparent + * as the alpha value increases. (0 is opaque) + */ +#define DDBLT_ALPHASRCNEG 0x00000080l + +/* + * Use the lpDDSAlphaSrc field in the DDBLTFX structure as the alpha channel + * for the source for this blt. + */ +#define DDBLT_ALPHASRCSURFACEOVERRIDE 0x00000100l + +/* + * Do this blt asynchronously through the FIFO in the order received. If + * there is no room in the hardware FIFO fail the call. + */ +#define DDBLT_ASYNC 0x00000200l + +/* + * Uses the dwFillColor field in the DDBLTFX structure as the RGB color + * to fill the destination rectangle on the destination surface with. + */ +#define DDBLT_COLORFILL 0x00000400l + +/* + * Uses the dwDDFX field in the DDBLTFX structure to specify the effects + * to use for the blt. + */ +#define DDBLT_DDFX 0x00000800l + +/* + * Uses the dwDDROPS field in the DDBLTFX structure to specify the ROPS + * that are not part of the Win32 API. + */ +#define DDBLT_DDROPS 0x00001000l + +/* + * Use the color key associated with the destination surface. + */ +#define DDBLT_KEYDEST 0x00002000l + +/* + * Use the dckDestColorkey field in the DDBLTFX structure as the color key + * for the destination surface. + */ +#define DDBLT_KEYDESTOVERRIDE 0x00004000l + +/* + * Use the color key associated with the source surface. + */ +#define DDBLT_KEYSRC 0x00008000l + +/* + * Use the dckSrcColorkey field in the DDBLTFX structure as the color key + * for the source surface. + */ +#define DDBLT_KEYSRCOVERRIDE 0x00010000l + +/* + * Use the dwROP field in the DDBLTFX structure for the raster operation + * for this blt. These ROPs are the same as the ones defined in the Win32 API. + */ +#define DDBLT_ROP 0x00020000l + +/* + * Use the dwRotationAngle field in the DDBLTFX structure as the angle + * (specified in 1/100th of a degree) to rotate the surface. + */ +#define DDBLT_ROTATIONANGLE 0x00040000l + +/* + * Z-buffered blt using the z-buffers attached to the source and destination + * surfaces and the dwZBufferOpCode field in the DDBLTFX structure as the + * z-buffer opcode. + */ +#define DDBLT_ZBUFFER 0x00080000l + +/* + * Z-buffered blt using the dwConstDest Zfield and the dwZBufferOpCode field + * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively + * for the destination. + */ +#define DDBLT_ZBUFFERDESTCONSTOVERRIDE 0x00100000l + +/* + * Z-buffered blt using the lpDDSDestZBuffer field and the dwZBufferOpCode + * field in the DDBLTFX structure as the z-buffer and z-buffer opcode + * respectively for the destination. + */ +#define DDBLT_ZBUFFERDESTOVERRIDE 0x00200000l + +/* + * Z-buffered blt using the dwConstSrcZ field and the dwZBufferOpCode field + * in the DDBLTFX structure as the z-buffer and z-buffer opcode respectively + * for the source. + */ +#define DDBLT_ZBUFFERSRCCONSTOVERRIDE 0x00400000l + +/* + * Z-buffered blt using the lpDDSSrcZBuffer field and the dwZBufferOpCode + * field in the DDBLTFX structure as the z-buffer and z-buffer opcode + * respectively for the source. + */ +#define DDBLT_ZBUFFERSRCOVERRIDE 0x00800000l + +/* + * wait until the device is ready to handle the blt + * this will cause blt to not return DDERR_WASSTILLDRAWING + */ +#define DDBLT_WAIT 0x01000000l + +/* + * Uses the dwFillDepth field in the DDBLTFX structure as the depth value + * to fill the destination rectangle on the destination Z-buffer surface + * with. + */ +#define DDBLT_DEPTHFILL 0x02000000l + + +/* + * wait until the device is ready to handle the blt + * this will cause blt to not return DDERR_WASSTILLDRAWING + */ +#define DDBLT_DONOTWAIT 0x08000000l + +/* + * These flags indicate a presentation blt (i.e. a blt + * that moves surface contents from an offscreen back buffer to the primary + * surface). The driver is not allowed to "queue" more than three such blts. + * The "end" of the presentation blt is indicated, since the + * blt may be clipped, in which case the runtime will call the driver with + * several blts. All blts (even if not clipped) are tagged with DDBLT_PRESENTATION + * and the last (even if not clipped) additionally with DDBLT_LAST_PRESENTATION. + * Thus the true rule is that the driver must not schedule a DDBLT_PRESENTATION + * blt if there are 3 or more DDBLT_PRESENTLAST blts in the hardware pipe. + * If there are such blts in the pipe, the driver should return DDERR_WASSTILLDRAWING + * until the oldest queued DDBLT_LAST_PRESENTATION blts has been retired (i.e. the + * pixels have been actually written to the primary surface). Once the oldest blt + * has been retired, the driver is free to schedule the current blt. + * The goal is to provide a mechanism whereby the device's hardware queue never + * gets more than 3 frames ahead of the frames being generated by the application. + * When excessive queueing occurs, applications become unusable because the application + * visibly lags user input, and such problems make windowed interactive applications impossible. + * Some drivers may not have sufficient knowledge of their hardware's FIFO to know + * when a certain blt has been retired. Such drivers should code cautiously, and + * simply not allow any frames to be queued at all. DDBLT_LAST_PRESENTATION should cause + * such drivers to return DDERR_WASSTILLDRAWING until the accelerator is completely + * finished- exactly as if the application had called Lock on the source surface + * before calling Blt. + * In other words, the driver is allowed and encouraged to + * generate as much latency as it can, but never more than 3 frames worth. + * Implementation detail: Drivers should count blts against the SOURCE surface, not + * against the primary surface. This enables multiple parallel windowed application + * to function more optimally. + * This flag is passed only to DX8 or higher drivers. + * + * APPLICATIONS DO NOT SET THESE FLAGS. THEY ARE SET BY THE DIRECTDRAW RUNTIME. + * + */ +#define DDBLT_PRESENTATION 0x10000000l +#define DDBLT_LAST_PRESENTATION 0x20000000l + + + +/**************************************************************************** + * + * BLTFAST FLAGS + * + ****************************************************************************/ + +#define DDBLTFAST_NOCOLORKEY 0x00000000 +#define DDBLTFAST_SRCCOLORKEY 0x00000001 +#define DDBLTFAST_DESTCOLORKEY 0x00000002 +#define DDBLTFAST_WAIT 0x00000010 +#define DDBLTFAST_DONOTWAIT 0x00000020 + +/**************************************************************************** + * + * FLIP FLAGS + * + ****************************************************************************/ + +#define DDFLIP_WAIT 0x00000001L + +/* + * Indicates that the target surface contains the even field of video data. + * This flag is only valid with an overlay surface. + */ +#define DDFLIP_EVEN 0x00000002L + +/* + * Indicates that the target surface contains the odd field of video data. + * This flag is only valid with an overlay surface. + */ +#define DDFLIP_ODD 0x00000004L + +/* + * Causes DirectDraw to perform the physical flip immediately and return + * to the application. Typically, what was the front buffer but is now the back + * buffer will still be visible (depending on timing) until the next vertical + * retrace. Subsequent operations involving the two flipped surfaces will + * not check to see if the physical flip has finished (i.e. will not return + * DDERR_WASSTILLDRAWING for that reason (but may for other reasons)). + * This allows an application to perform Flips at a higher frequency than the + * monitor refresh rate, but may introduce visible artifacts. + * Only effective if DDCAPS2_FLIPNOVSYNC is set. If that bit is not set, + * DDFLIP_NOVSYNC has no effect. + */ +#define DDFLIP_NOVSYNC 0x00000008L + + +/* + * Flip Interval Flags. These flags indicate how many vertical retraces to wait between + * each flip. The default is one. DirectDraw will return DDERR_WASSTILLDRAWING for each + * surface involved in the flip until the specified number of vertical retraces has + * ocurred. Only effective if DDCAPS2_FLIPINTERVAL is set. If that bit is not set, + * DDFLIP_INTERVALn has no effect. + */ + +/* + * DirectDraw will flip on every other vertical sync + */ +#define DDFLIP_INTERVAL2 0x02000000L + + +/* + * DirectDraw will flip on every third vertical sync + */ +#define DDFLIP_INTERVAL3 0x03000000L + + +/* + * DirectDraw will flip on every fourth vertical sync + */ +#define DDFLIP_INTERVAL4 0x04000000L + +/* + * DirectDraw will flip and display a main stereo surface + */ +#define DDFLIP_STEREO 0x00000010L + +/* + * On IDirectDrawSurface7 and higher interfaces, the default is DDFLIP_WAIT. If you wish + * to override the default and use time when the accelerator is busy (as denoted by + * the DDERR_WASSTILLDRAWING return code) then use DDFLIP_DONOTWAIT. + */ +#define DDFLIP_DONOTWAIT 0x00000020L + + +/**************************************************************************** + * + * DIRECTDRAW SURFACE OVERLAY FLAGS + * + ****************************************************************************/ + +/* + * Use the alpha information in the pixel format or the alpha channel surface + * attached to the destination surface as the alpha channel for the + * destination overlay. + */ +#define DDOVER_ALPHADEST 0x00000001l + +/* + * Use the dwConstAlphaDest field in the DDOVERLAYFX structure as the + * destination alpha channel for this overlay. + */ +#define DDOVER_ALPHADESTCONSTOVERRIDE 0x00000002l + +/* + * The NEG suffix indicates that the destination surface becomes more + * transparent as the alpha value increases. + */ +#define DDOVER_ALPHADESTNEG 0x00000004l + +/* + * Use the lpDDSAlphaDest field in the DDOVERLAYFX structure as the alpha + * channel destination for this overlay. + */ +#define DDOVER_ALPHADESTSURFACEOVERRIDE 0x00000008l + +/* + * Use the dwAlphaEdgeBlend field in the DDOVERLAYFX structure as the alpha + * channel for the edges of the image that border the color key colors. + */ +#define DDOVER_ALPHAEDGEBLEND 0x00000010l + +/* + * Use the alpha information in the pixel format or the alpha channel surface + * attached to the source surface as the source alpha channel for this overlay. + */ +#define DDOVER_ALPHASRC 0x00000020l + +/* + * Use the dwConstAlphaSrc field in the DDOVERLAYFX structure as the source + * alpha channel for this overlay. + */ +#define DDOVER_ALPHASRCCONSTOVERRIDE 0x00000040l + +/* + * The NEG suffix indicates that the source surface becomes more transparent + * as the alpha value increases. + */ +#define DDOVER_ALPHASRCNEG 0x00000080l + +/* + * Use the lpDDSAlphaSrc field in the DDOVERLAYFX structure as the alpha channel + * source for this overlay. + */ +#define DDOVER_ALPHASRCSURFACEOVERRIDE 0x00000100l + +/* + * Turn this overlay off. + */ +#define DDOVER_HIDE 0x00000200l + +/* + * Use the color key associated with the destination surface. + */ +#define DDOVER_KEYDEST 0x00000400l + +/* + * Use the dckDestColorkey field in the DDOVERLAYFX structure as the color key + * for the destination surface + */ +#define DDOVER_KEYDESTOVERRIDE 0x00000800l + +/* + * Use the color key associated with the source surface. + */ +#define DDOVER_KEYSRC 0x00001000l + +/* + * Use the dckSrcColorkey field in the DDOVERLAYFX structure as the color key + * for the source surface. + */ +#define DDOVER_KEYSRCOVERRIDE 0x00002000l + +/* + * Turn this overlay on. + */ +#define DDOVER_SHOW 0x00004000l + +/* + * Add a dirty rect to an emulated overlayed surface. + */ +#define DDOVER_ADDDIRTYRECT 0x00008000l + +/* + * Redraw all dirty rects on an emulated overlayed surface. + */ +#define DDOVER_REFRESHDIRTYRECTS 0x00010000l + +/* + * Redraw the entire surface on an emulated overlayed surface. + */ +#define DDOVER_REFRESHALL 0x00020000l + + +/* + * Use the overlay FX flags to define special overlay FX + */ +#define DDOVER_DDFX 0x00080000l + +/* + * Autoflip the overlay when ever the video port autoflips + */ +#define DDOVER_AUTOFLIP 0x00100000l + +/* + * Display each field of video port data individually without + * causing any jittery artifacts + */ +#define DDOVER_BOB 0x00200000l + +/* + * Indicates that bob/weave decisions should not be overridden by other + * interfaces. + */ +#define DDOVER_OVERRIDEBOBWEAVE 0x00400000l + +/* + * Indicates that the surface memory is composed of interleaved fields. + */ +#define DDOVER_INTERLEAVED 0x00800000l + +/* + * Indicates that bob will be performed using hardware rather than + * software or emulated. + */ +#define DDOVER_BOBHARDWARE 0x01000000l + +/* + * Indicates that overlay FX structure contains valid ARGB scaling factors. + */ +#define DDOVER_ARGBSCALEFACTORS 0x02000000l + +/* + * Indicates that ARGB scaling factors can be degraded to fit driver capabilities. + */ +#define DDOVER_DEGRADEARGBSCALING 0x04000000l + + +/**************************************************************************** + * + * DIRECTDRAWSURFACE LOCK FLAGS + * + ****************************************************************************/ + +/* + * The default. Set to indicate that Lock should return a valid memory pointer + * to the top of the specified rectangle. If no rectangle is specified then a + * pointer to the top of the surface is returned. + */ +#define DDLOCK_SURFACEMEMORYPTR 0x00000000L // default + +/* + * Set to indicate that Lock should wait until it can obtain a valid memory + * pointer before returning. If this bit is set, Lock will never return + * DDERR_WASSTILLDRAWING. + */ +#define DDLOCK_WAIT 0x00000001L + +/* + * Set if an event handle is being passed to Lock. Lock will trigger the event + * when it can return the surface memory pointer requested. + */ +#define DDLOCK_EVENT 0x00000002L + +/* + * Indicates that the surface being locked will only be read from. + */ +#define DDLOCK_READONLY 0x00000010L + +/* + * Indicates that the surface being locked will only be written to + */ +#define DDLOCK_WRITEONLY 0x00000020L + + +/* + * Indicates that a system wide lock should not be taken when this surface + * is locked. This has several advantages (cursor responsiveness, ability + * to call more Windows functions, easier debugging) when locking video + * memory surfaces. However, an application specifying this flag must + * comply with a number of conditions documented in the help file. + * Furthermore, this flag cannot be specified when locking the primary. + */ +#define DDLOCK_NOSYSLOCK 0x00000800L + +/* + * Used only with Direct3D Vertex Buffer Locks. Indicates that no vertices + * that were referred to in Draw*PrimtiveVB calls since the start of the + * frame (or the last lock without this flag) will be modified during the + * lock. This can be useful when one is only appending data to the vertex + * buffer + */ +#define DDLOCK_NOOVERWRITE 0x00001000L + +/* + * Indicates that no assumptions will be made about the contents of the + * surface or vertex buffer during this lock. + * This enables two things: + * - Direct3D or the driver may provide an alternative memory + * area as the vertex buffer. This is useful when one plans to clear the + * contents of the vertex buffer and fill in new data. + * - Drivers sometimes store surface data in a re-ordered format. + * When the application locks the surface, the driver is forced to un-re-order + * the surface data before allowing the application to see the surface contents. + * This flag is a hint to the driver that it can skip the un-re-ordering process + * since the application plans to overwrite every single pixel in the surface + * or locked rectangle (and so erase any un-re-ordered pixels anyway). + * Applications should always set this flag when they intend to overwrite the entire + * surface or locked rectangle. + */ +#define DDLOCK_DISCARDCONTENTS 0x00002000L + /* + * DDLOCK_OKTOSWAP is an older, less informative name for DDLOCK_DISCARDCONTENTS + */ +#define DDLOCK_OKTOSWAP 0x00002000L + +/* + * On IDirectDrawSurface7 and higher interfaces, the default is DDLOCK_WAIT. If you wish + * to override the default and use time when the accelerator is busy (as denoted by + * the DDERR_WASSTILLDRAWING return code) then use DDLOCK_DONOTWAIT. + */ +#define DDLOCK_DONOTWAIT 0x00004000L + + + +/**************************************************************************** + * + * DIRECTDRAWSURFACE PAGELOCK FLAGS + * + ****************************************************************************/ + +/* + * No flags defined at present + */ + + +/**************************************************************************** + * + * DIRECTDRAWSURFACE PAGEUNLOCK FLAGS + * + ****************************************************************************/ + +/* + * No flags defined at present + */ + + +/**************************************************************************** + * + * DIRECTDRAWSURFACE BLT FX FLAGS + * + ****************************************************************************/ + +/* + * If stretching, use arithmetic stretching along the Y axis for this blt. + */ +#define DDBLTFX_ARITHSTRETCHY 0x00000001l + +/* + * Do this blt mirroring the surface left to right. Spin the + * surface around its y-axis. + */ +#define DDBLTFX_MIRRORLEFTRIGHT 0x00000002l + +/* + * Do this blt mirroring the surface up and down. Spin the surface + * around its x-axis. + */ +#define DDBLTFX_MIRRORUPDOWN 0x00000004l + +/* + * Schedule this blt to avoid tearing. + */ +#define DDBLTFX_NOTEARING 0x00000008l + +/* + * Do this blt rotating the surface one hundred and eighty degrees. + */ +#define DDBLTFX_ROTATE180 0x00000010l + +/* + * Do this blt rotating the surface two hundred and seventy degrees. + */ +#define DDBLTFX_ROTATE270 0x00000020l + +/* + * Do this blt rotating the surface ninety degrees. + */ +#define DDBLTFX_ROTATE90 0x00000040l + +/* + * Do this z blt using dwZBufferLow and dwZBufferHigh as range values + * specified to limit the bits copied from the source surface. + */ +#define DDBLTFX_ZBUFFERRANGE 0x00000080l + +/* + * Do this z blt adding the dwZBufferBaseDest to each of the sources z values + * before comparing it with the desting z values. + */ +#define DDBLTFX_ZBUFFERBASEDEST 0x00000100l + +/**************************************************************************** + * + * DIRECTDRAWSURFACE OVERLAY FX FLAGS + * + ****************************************************************************/ + +/* + * If stretching, use arithmetic stretching along the Y axis for this overlay. + */ +#define DDOVERFX_ARITHSTRETCHY 0x00000001l + +/* + * Mirror the overlay across the vertical axis + */ +#define DDOVERFX_MIRRORLEFTRIGHT 0x00000002l + +/* + * Mirror the overlay across the horizontal axis + */ +#define DDOVERFX_MIRRORUPDOWN 0x00000004l + +/* + * Deinterlace the overlay, if possible + */ +#define DDOVERFX_DEINTERLACE 0x00000008l + + +/**************************************************************************** + * + * DIRECTDRAW WAITFORVERTICALBLANK FLAGS + * + ****************************************************************************/ + +/* + * return when the vertical blank interval begins + */ +#define DDWAITVB_BLOCKBEGIN 0x00000001l + +/* + * set up an event to trigger when the vertical blank begins + */ +#define DDWAITVB_BLOCKBEGINEVENT 0x00000002l + +/* + * return when the vertical blank interval ends and display begins + */ +#define DDWAITVB_BLOCKEND 0x00000004l + +/**************************************************************************** + * + * DIRECTDRAW GETFLIPSTATUS FLAGS + * + ****************************************************************************/ + +/* + * is it OK to flip now? + */ +#define DDGFS_CANFLIP 0x00000001l + +/* + * is the last flip finished? + */ +#define DDGFS_ISFLIPDONE 0x00000002l + +/**************************************************************************** + * + * DIRECTDRAW GETBLTSTATUS FLAGS + * + ****************************************************************************/ + +/* + * is it OK to blt now? + */ +#define DDGBS_CANBLT 0x00000001l + +/* + * is the blt to the surface finished? + */ +#define DDGBS_ISBLTDONE 0x00000002l + + +/**************************************************************************** + * + * DIRECTDRAW ENUMOVERLAYZORDER FLAGS + * + ****************************************************************************/ + +/* + * Enumerate overlays back to front. + */ +#define DDENUMOVERLAYZ_BACKTOFRONT 0x00000000l + +/* + * Enumerate overlays front to back + */ +#define DDENUMOVERLAYZ_FRONTTOBACK 0x00000001l + +/**************************************************************************** + * + * DIRECTDRAW UPDATEOVERLAYZORDER FLAGS + * + ****************************************************************************/ + +/* + * Send overlay to front + */ +#define DDOVERZ_SENDTOFRONT 0x00000000l + +/* + * Send overlay to back + */ +#define DDOVERZ_SENDTOBACK 0x00000001l + +/* + * Move Overlay forward + */ +#define DDOVERZ_MOVEFORWARD 0x00000002l + +/* + * Move Overlay backward + */ +#define DDOVERZ_MOVEBACKWARD 0x00000003l + +/* + * Move Overlay in front of relative surface + */ +#define DDOVERZ_INSERTINFRONTOF 0x00000004l + +/* + * Move Overlay in back of relative surface + */ +#define DDOVERZ_INSERTINBACKOF 0x00000005l + + +/**************************************************************************** + * + * DIRECTDRAW SETGAMMARAMP FLAGS + * + ****************************************************************************/ + +/* + * Request calibrator to adjust the gamma ramp according to the physical + * properties of the display so that the result should appear identical + * on all systems. + */ +#define DDSGR_CALIBRATE 0x00000001L + + +/**************************************************************************** + * + * DIRECTDRAW STARTMODETEST FLAGS + * + ****************************************************************************/ + +/* + * Indicates that the mode being tested has passed + */ +#define DDSMT_ISTESTREQUIRED 0x00000001L + + +/**************************************************************************** + * + * DIRECTDRAW EVALUATEMODE FLAGS + * + ****************************************************************************/ + +/* + * Indicates that the mode being tested has passed + */ +#define DDEM_MODEPASSED 0x00000001L + +/* + * Indicates that the mode being tested has failed + */ +#define DDEM_MODEFAILED 0x00000002L + + +/*=========================================================================== + * + * + * DIRECTDRAW RETURN CODES + * + * The return values from DirectDraw Commands and Surface that return an HRESULT + * are codes from DirectDraw concerning the results of the action + * requested by DirectDraw. + * + *==========================================================================*/ + +/* + * Status is OK + * + * Issued by: DirectDraw Commands and all callbacks + */ +#define DD_OK 0 +#define DD_FALSE S_FALSE + +/**************************************************************************** + * + * DIRECTDRAW ENUMCALLBACK RETURN VALUES + * + * EnumCallback returns are used to control the flow of the DIRECTDRAW and + * DIRECTDRAWSURFACE object enumerations. They can only be returned by + * enumeration callback routines. + * + ****************************************************************************/ + +/* + * stop the enumeration + */ +#define DDENUMRET_CANCEL 0 + +/* + * continue the enumeration + */ +#define DDENUMRET_OK 1 + +/**************************************************************************** + * + * DIRECTDRAW ERRORS + * + * Errors are represented by negative values and cannot be combined. + * + ****************************************************************************/ + +/* + * This object is already initialized + */ +#define DDERR_ALREADYINITIALIZED MAKE_DDHRESULT( 5 ) + +/* + * This surface can not be attached to the requested surface. + */ +#define DDERR_CANNOTATTACHSURFACE MAKE_DDHRESULT( 10 ) + +/* + * This surface can not be detached from the requested surface. + */ +#define DDERR_CANNOTDETACHSURFACE MAKE_DDHRESULT( 20 ) + +/* + * Support is currently not available. + */ +#define DDERR_CURRENTLYNOTAVAIL MAKE_DDHRESULT( 40 ) + +/* + * An exception was encountered while performing the requested operation + */ +#define DDERR_EXCEPTION MAKE_DDHRESULT( 55 ) + +/* + * Generic failure. + */ +#define DDERR_GENERIC E_FAIL + +/* + * Height of rectangle provided is not a multiple of reqd alignment + */ +#define DDERR_HEIGHTALIGN MAKE_DDHRESULT( 90 ) + +/* + * Unable to match primary surface creation request with existing + * primary surface. + */ +#define DDERR_INCOMPATIBLEPRIMARY MAKE_DDHRESULT( 95 ) + +/* + * One or more of the caps bits passed to the callback are incorrect. + */ +#define DDERR_INVALIDCAPS MAKE_DDHRESULT( 100 ) + +/* + * DirectDraw does not support provided Cliplist. + */ +#define DDERR_INVALIDCLIPLIST MAKE_DDHRESULT( 110 ) + +/* + * DirectDraw does not support the requested mode + */ +#define DDERR_INVALIDMODE MAKE_DDHRESULT( 120 ) + +/* + * DirectDraw received a pointer that was an invalid DIRECTDRAW object. + */ +#define DDERR_INVALIDOBJECT MAKE_DDHRESULT( 130 ) + +/* + * One or more of the parameters passed to the callback function are + * incorrect. + */ +#define DDERR_INVALIDPARAMS E_INVALIDARG + +/* + * pixel format was invalid as specified + */ +#define DDERR_INVALIDPIXELFORMAT MAKE_DDHRESULT( 145 ) + +/* + * Rectangle provided was invalid. + */ +#define DDERR_INVALIDRECT MAKE_DDHRESULT( 150 ) + +/* + * Operation could not be carried out because one or more surfaces are locked + */ +#define DDERR_LOCKEDSURFACES MAKE_DDHRESULT( 160 ) + +/* + * There is no 3D present. + */ +#define DDERR_NO3D MAKE_DDHRESULT( 170 ) + +/* + * Operation could not be carried out because there is no alpha accleration + * hardware present or available. + */ +#define DDERR_NOALPHAHW MAKE_DDHRESULT( 180 ) + +/* + * Operation could not be carried out because there is no stereo + * hardware present or available. + */ +#define DDERR_NOSTEREOHARDWARE MAKE_DDHRESULT( 181 ) + +/* + * Operation could not be carried out because there is no hardware + * present which supports stereo surfaces + */ +#define DDERR_NOSURFACELEFT MAKE_DDHRESULT( 182 ) + + + +/* + * no clip list available + */ +#define DDERR_NOCLIPLIST MAKE_DDHRESULT( 205 ) + +/* + * Operation could not be carried out because there is no color conversion + * hardware present or available. + */ +#define DDERR_NOCOLORCONVHW MAKE_DDHRESULT( 210 ) + +/* + * Create function called without DirectDraw object method SetCooperativeLevel + * being called. + */ +#define DDERR_NOCOOPERATIVELEVELSET MAKE_DDHRESULT( 212 ) + +/* + * Surface doesn't currently have a color key + */ +#define DDERR_NOCOLORKEY MAKE_DDHRESULT( 215 ) + +/* + * Operation could not be carried out because there is no hardware support + * of the dest color key. + */ +#define DDERR_NOCOLORKEYHW MAKE_DDHRESULT( 220 ) + +/* + * No DirectDraw support possible with current display driver + */ +#define DDERR_NODIRECTDRAWSUPPORT MAKE_DDHRESULT( 222 ) + +/* + * Operation requires the application to have exclusive mode but the + * application does not have exclusive mode. + */ +#define DDERR_NOEXCLUSIVEMODE MAKE_DDHRESULT( 225 ) + +/* + * Flipping visible surfaces is not supported. + */ +#define DDERR_NOFLIPHW MAKE_DDHRESULT( 230 ) + +/* + * There is no GDI present. + */ +#define DDERR_NOGDI MAKE_DDHRESULT( 240 ) + +/* + * Operation could not be carried out because there is no hardware present + * or available. + */ +#define DDERR_NOMIRRORHW MAKE_DDHRESULT( 250 ) + +/* + * Requested item was not found + */ +#define DDERR_NOTFOUND MAKE_DDHRESULT( 255 ) + +/* + * Operation could not be carried out because there is no overlay hardware + * present or available. + */ +#define DDERR_NOOVERLAYHW MAKE_DDHRESULT( 260 ) + +/* + * Operation could not be carried out because the source and destination + * rectangles are on the same surface and overlap each other. + */ +#define DDERR_OVERLAPPINGRECTS MAKE_DDHRESULT( 270 ) + +/* + * Operation could not be carried out because there is no appropriate raster + * op hardware present or available. + */ +#define DDERR_NORASTEROPHW MAKE_DDHRESULT( 280 ) + +/* + * Operation could not be carried out because there is no rotation hardware + * present or available. + */ +#define DDERR_NOROTATIONHW MAKE_DDHRESULT( 290 ) + +/* + * Operation could not be carried out because there is no hardware support + * for stretching + */ +#define DDERR_NOSTRETCHHW MAKE_DDHRESULT( 310 ) + +/* + * DirectDrawSurface is not in 4 bit color palette and the requested operation + * requires 4 bit color palette. + */ +#define DDERR_NOT4BITCOLOR MAKE_DDHRESULT( 316 ) + +/* + * DirectDrawSurface is not in 4 bit color index palette and the requested + * operation requires 4 bit color index palette. + */ +#define DDERR_NOT4BITCOLORINDEX MAKE_DDHRESULT( 317 ) + +/* + * DirectDraw Surface is not in 8 bit color mode and the requested operation + * requires 8 bit color. + */ +#define DDERR_NOT8BITCOLOR MAKE_DDHRESULT( 320 ) + +/* + * Operation could not be carried out because there is no texture mapping + * hardware present or available. + */ +#define DDERR_NOTEXTUREHW MAKE_DDHRESULT( 330 ) + +/* + * Operation could not be carried out because there is no hardware support + * for vertical blank synchronized operations. + */ +#define DDERR_NOVSYNCHW MAKE_DDHRESULT( 335 ) + +/* + * Operation could not be carried out because there is no hardware support + * for zbuffer blting. + */ +#define DDERR_NOZBUFFERHW MAKE_DDHRESULT( 340 ) + +/* + * Overlay surfaces could not be z layered based on their BltOrder because + * the hardware does not support z layering of overlays. + */ +#define DDERR_NOZOVERLAYHW MAKE_DDHRESULT( 350 ) + +/* + * The hardware needed for the requested operation has already been + * allocated. + */ +#define DDERR_OUTOFCAPS MAKE_DDHRESULT( 360 ) + +/* + * DirectDraw does not have enough memory to perform the operation. + */ +#define DDERR_OUTOFMEMORY E_OUTOFMEMORY + +/* + * DirectDraw does not have enough memory to perform the operation. + */ +#define DDERR_OUTOFVIDEOMEMORY MAKE_DDHRESULT( 380 ) + +/* + * hardware does not support clipped overlays + */ +#define DDERR_OVERLAYCANTCLIP MAKE_DDHRESULT( 382 ) + +/* + * Can only have ony color key active at one time for overlays + */ +#define DDERR_OVERLAYCOLORKEYONLYONEACTIVE MAKE_DDHRESULT( 384 ) + +/* + * Access to this palette is being refused because the palette is already + * locked by another thread. + */ +#define DDERR_PALETTEBUSY MAKE_DDHRESULT( 387 ) + +/* + * No src color key specified for this operation. + */ +#define DDERR_COLORKEYNOTSET MAKE_DDHRESULT( 400 ) + +/* + * This surface is already attached to the surface it is being attached to. + */ +#define DDERR_SURFACEALREADYATTACHED MAKE_DDHRESULT( 410 ) + +/* + * This surface is already a dependency of the surface it is being made a + * dependency of. + */ +#define DDERR_SURFACEALREADYDEPENDENT MAKE_DDHRESULT( 420 ) + +/* + * Access to this surface is being refused because the surface is already + * locked by another thread. + */ +#define DDERR_SURFACEBUSY MAKE_DDHRESULT( 430 ) + +/* + * Access to this surface is being refused because no driver exists + * which can supply a pointer to the surface. + * This is most likely to happen when attempting to lock the primary + * surface when no DCI provider is present. + * Will also happen on attempts to lock an optimized surface. + */ +#define DDERR_CANTLOCKSURFACE MAKE_DDHRESULT( 435 ) + +/* + * Access to Surface refused because Surface is obscured. + */ +#define DDERR_SURFACEISOBSCURED MAKE_DDHRESULT( 440 ) + +/* + * Access to this surface is being refused because the surface is gone. + * The DIRECTDRAWSURFACE object representing this surface should + * have Restore called on it. + */ +#define DDERR_SURFACELOST MAKE_DDHRESULT( 450 ) + +/* + * The requested surface is not attached. + */ +#define DDERR_SURFACENOTATTACHED MAKE_DDHRESULT( 460 ) + +/* + * Height requested by DirectDraw is too large. + */ +#define DDERR_TOOBIGHEIGHT MAKE_DDHRESULT( 470 ) + +/* + * Size requested by DirectDraw is too large -- The individual height and + * width are OK. + */ +#define DDERR_TOOBIGSIZE MAKE_DDHRESULT( 480 ) + +/* + * Width requested by DirectDraw is too large. + */ +#define DDERR_TOOBIGWIDTH MAKE_DDHRESULT( 490 ) + +/* + * Action not supported. + */ +#define DDERR_UNSUPPORTED E_NOTIMPL + +/* + * Pixel format requested is unsupported by DirectDraw + */ +#define DDERR_UNSUPPORTEDFORMAT MAKE_DDHRESULT( 510 ) + +/* + * Bitmask in the pixel format requested is unsupported by DirectDraw + */ +#define DDERR_UNSUPPORTEDMASK MAKE_DDHRESULT( 520 ) + +/* + * The specified stream contains invalid data + */ +#define DDERR_INVALIDSTREAM MAKE_DDHRESULT( 521 ) + +/* + * vertical blank is in progress + */ +#define DDERR_VERTICALBLANKINPROGRESS MAKE_DDHRESULT( 537 ) + +/* + * Informs DirectDraw that the previous Blt which is transfering information + * to or from this Surface is incomplete. + */ +#define DDERR_WASSTILLDRAWING MAKE_DDHRESULT( 540 ) + + +/* + * The specified surface type requires specification of the COMPLEX flag + */ +#define DDERR_DDSCAPSCOMPLEXREQUIRED MAKE_DDHRESULT( 542 ) + + +/* + * Rectangle provided was not horizontally aligned on reqd. boundary + */ +#define DDERR_XALIGN MAKE_DDHRESULT( 560 ) + +/* + * The GUID passed to DirectDrawCreate is not a valid DirectDraw driver + * identifier. + */ +#define DDERR_INVALIDDIRECTDRAWGUID MAKE_DDHRESULT( 561 ) + +/* + * A DirectDraw object representing this driver has already been created + * for this process. + */ +#define DDERR_DIRECTDRAWALREADYCREATED MAKE_DDHRESULT( 562 ) + +/* + * A hardware only DirectDraw object creation was attempted but the driver + * did not support any hardware. + */ +#define DDERR_NODIRECTDRAWHW MAKE_DDHRESULT( 563 ) + +/* + * this process already has created a primary surface + */ +#define DDERR_PRIMARYSURFACEALREADYEXISTS MAKE_DDHRESULT( 564 ) + +/* + * software emulation not available. + */ +#define DDERR_NOEMULATION MAKE_DDHRESULT( 565 ) + +/* + * region passed to Clipper::GetClipList is too small. + */ +#define DDERR_REGIONTOOSMALL MAKE_DDHRESULT( 566 ) + +/* + * an attempt was made to set a clip list for a clipper objec that + * is already monitoring an hwnd. + */ +#define DDERR_CLIPPERISUSINGHWND MAKE_DDHRESULT( 567 ) + +/* + * No clipper object attached to surface object + */ +#define DDERR_NOCLIPPERATTACHED MAKE_DDHRESULT( 568 ) + +/* + * Clipper notification requires an HWND or + * no HWND has previously been set as the CooperativeLevel HWND. + */ +#define DDERR_NOHWND MAKE_DDHRESULT( 569 ) + +/* + * HWND used by DirectDraw CooperativeLevel has been subclassed, + * this prevents DirectDraw from restoring state. + */ +#define DDERR_HWNDSUBCLASSED MAKE_DDHRESULT( 570 ) + +/* + * The CooperativeLevel HWND has already been set. + * It can not be reset while the process has surfaces or palettes created. + */ +#define DDERR_HWNDALREADYSET MAKE_DDHRESULT( 571 ) + +/* + * No palette object attached to this surface. + */ +#define DDERR_NOPALETTEATTACHED MAKE_DDHRESULT( 572 ) + +/* + * No hardware support for 16 or 256 color palettes. + */ +#define DDERR_NOPALETTEHW MAKE_DDHRESULT( 573 ) + +/* + * If a clipper object is attached to the source surface passed into a + * BltFast call. + */ +#define DDERR_BLTFASTCANTCLIP MAKE_DDHRESULT( 574 ) + +/* + * No blter. + */ +#define DDERR_NOBLTHW MAKE_DDHRESULT( 575 ) + +/* + * No DirectDraw ROP hardware. + */ +#define DDERR_NODDROPSHW MAKE_DDHRESULT( 576 ) + +/* + * returned when GetOverlayPosition is called on a hidden overlay + */ +#define DDERR_OVERLAYNOTVISIBLE MAKE_DDHRESULT( 577 ) + +/* + * returned when GetOverlayPosition is called on a overlay that UpdateOverlay + * has never been called on to establish a destionation. + */ +#define DDERR_NOOVERLAYDEST MAKE_DDHRESULT( 578 ) + +/* + * returned when the position of the overlay on the destionation is no longer + * legal for that destionation. + */ +#define DDERR_INVALIDPOSITION MAKE_DDHRESULT( 579 ) + +/* + * returned when an overlay member is called for a non-overlay surface + */ +#define DDERR_NOTAOVERLAYSURFACE MAKE_DDHRESULT( 580 ) + +/* + * An attempt was made to set the cooperative level when it was already + * set to exclusive. + */ +#define DDERR_EXCLUSIVEMODEALREADYSET MAKE_DDHRESULT( 581 ) + +/* + * An attempt has been made to flip a surface that is not flippable. + */ +#define DDERR_NOTFLIPPABLE MAKE_DDHRESULT( 582 ) + +/* + * Can't duplicate primary & 3D surfaces, or surfaces that are implicitly + * created. + */ +#define DDERR_CANTDUPLICATE MAKE_DDHRESULT( 583 ) + +/* + * Surface was not locked. An attempt to unlock a surface that was not + * locked at all, or by this process, has been attempted. + */ +#define DDERR_NOTLOCKED MAKE_DDHRESULT( 584 ) + +/* + * Windows can not create any more DCs, or a DC was requested for a paltte-indexed + * surface when the surface had no palette AND the display mode was not palette-indexed + * (in this case DirectDraw cannot select a proper palette into the DC) + */ +#define DDERR_CANTCREATEDC MAKE_DDHRESULT( 585 ) + +/* + * No DC was ever created for this surface. + */ +#define DDERR_NODC MAKE_DDHRESULT( 586 ) + +/* + * This surface can not be restored because it was created in a different + * mode. + */ +#define DDERR_WRONGMODE MAKE_DDHRESULT( 587 ) + +/* + * This surface can not be restored because it is an implicitly created + * surface. + */ +#define DDERR_IMPLICITLYCREATED MAKE_DDHRESULT( 588 ) + +/* + * The surface being used is not a palette-based surface + */ +#define DDERR_NOTPALETTIZED MAKE_DDHRESULT( 589 ) + + +/* + * The display is currently in an unsupported mode + */ +#define DDERR_UNSUPPORTEDMODE MAKE_DDHRESULT( 590 ) + +/* + * Operation could not be carried out because there is no mip-map + * texture mapping hardware present or available. + */ +#define DDERR_NOMIPMAPHW MAKE_DDHRESULT( 591 ) + +/* + * The requested action could not be performed because the surface was of + * the wrong type. + */ +#define DDERR_INVALIDSURFACETYPE MAKE_DDHRESULT( 592 ) + + +/* + * Device does not support optimized surfaces, therefore no video memory optimized surfaces + */ +#define DDERR_NOOPTIMIZEHW MAKE_DDHRESULT( 600 ) + +/* + * Surface is an optimized surface, but has not yet been allocated any memory + */ +#define DDERR_NOTLOADED MAKE_DDHRESULT( 601 ) + +/* + * Attempt was made to create or set a device window without first setting + * the focus window + */ +#define DDERR_NOFOCUSWINDOW MAKE_DDHRESULT( 602 ) + +/* + * Attempt was made to set a palette on a mipmap sublevel + */ +#define DDERR_NOTONMIPMAPSUBLEVEL MAKE_DDHRESULT( 603 ) + +/* + * A DC has already been returned for this surface. Only one DC can be + * retrieved per surface. + */ +#define DDERR_DCALREADYCREATED MAKE_DDHRESULT( 620 ) + +/* + * An attempt was made to allocate non-local video memory from a device + * that does not support non-local video memory. + */ +#define DDERR_NONONLOCALVIDMEM MAKE_DDHRESULT( 630 ) + +/* + * The attempt to page lock a surface failed. + */ +#define DDERR_CANTPAGELOCK MAKE_DDHRESULT( 640 ) + + +/* + * The attempt to page unlock a surface failed. + */ +#define DDERR_CANTPAGEUNLOCK MAKE_DDHRESULT( 660 ) + +/* + * An attempt was made to page unlock a surface with no outstanding page locks. + */ +#define DDERR_NOTPAGELOCKED MAKE_DDHRESULT( 680 ) + +/* + * There is more data available than the specified buffer size could hold + */ +#define DDERR_MOREDATA MAKE_DDHRESULT( 690 ) + +/* + * The data has expired and is therefore no longer valid. + */ +#define DDERR_EXPIRED MAKE_DDHRESULT( 691 ) + +/* + * The mode test has finished executing. + */ +#define DDERR_TESTFINISHED MAKE_DDHRESULT( 692 ) + +/* + * The mode test has switched to a new mode. + */ +#define DDERR_NEWMODE MAKE_DDHRESULT( 693 ) + +/* + * D3D has not yet been initialized. + */ +#define DDERR_D3DNOTINITIALIZED MAKE_DDHRESULT( 694 ) + +/* + * The video port is not active + */ +#define DDERR_VIDEONOTACTIVE MAKE_DDHRESULT( 695 ) + +/* + * The monitor does not have EDID data. + */ +#define DDERR_NOMONITORINFORMATION MAKE_DDHRESULT( 696 ) + +/* + * The driver does not enumerate display mode refresh rates. + */ +#define DDERR_NODRIVERSUPPORT MAKE_DDHRESULT( 697 ) + +/* + * Surfaces created by one direct draw device cannot be used directly by + * another direct draw device. + */ +#define DDERR_DEVICEDOESNTOWNSURFACE MAKE_DDHRESULT( 699 ) + + + +/* + * An attempt was made to invoke an interface member of a DirectDraw object + * created by CoCreateInstance() before it was initialized. + */ +#define DDERR_NOTINITIALIZED CO_E_NOTINITIALIZED + + +/* Alpha bit depth constants */ + + +#ifdef __cplusplus +}; +#endif + +#ifdef ENABLE_NAMELESS_UNION_PRAGMA +#pragma warning(default:4201) +#endif + +#endif //__DDRAW_INCLUDED__ + + diff --git a/windows_libs/mssdk/include/ddrawex.h b/windows_libs/mssdk/include/ddrawex.h new file mode 100644 index 00000000..e2b180ba --- /dev/null +++ b/windows_libs/mssdk/include/ddrawex.h @@ -0,0 +1,218 @@ +//********************************************************************* +//* Microsoft Windows ** +//* Copyright(c) Microsoft Corp., 1995-1997 ** +//********************************************************************* +// +// DDRAWEX.H +// +// Header file for DirectDrawEx functionality + +#ifndef __DDRAWEXH__ +#define __DDRAWEXH__ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +// {4FD2A832-86C8-11d0-8FCA-00C04FD9189D} +DEFINE_GUID(CLSID_DirectDrawFactory, +0x4fd2a832, 0x86c8, 0x11d0, 0x8f, 0xca, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d); + +DEFINE_GUID(IID_IDirectDrawFactory, +0x4fd2a833, 0x86c8, 0x11d0, 0x8f, 0xca, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d); + +#ifndef DIRECTDRAW_VERSION + +//Functionality supported by DDrawex but not DX3 +#define DDSD_LPSURFACE 0x00000800l + +DEFINE_GUID( IID_IDirectDrawSurface3, +0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB ); + +typedef struct IDirectDrawSurface3 FAR *LPDIRECTDRAWSURFACE3; + +#undef INTERFACE +#define INTERFACE IDirectDrawSurface3 +DECLARE_INTERFACE_( IDirectDrawSurface3, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDrawSurface methods ***/ + STDMETHOD(AddAttachedSurface)(THIS_ LPDIRECTDRAWSURFACE3) PURE; + STDMETHOD(AddOverlayDirtyRect)(THIS_ LPRECT) PURE; + STDMETHOD(Blt)(THIS_ LPRECT,LPDIRECTDRAWSURFACE3, LPRECT,DWORD, LPDDBLTFX) PURE; + STDMETHOD(BltBatch)(THIS_ LPDDBLTBATCH, DWORD, DWORD ) PURE; + STDMETHOD(BltFast)(THIS_ DWORD,DWORD,LPDIRECTDRAWSURFACE3, LPRECT,DWORD) PURE; + STDMETHOD(DeleteAttachedSurface)(THIS_ DWORD,LPDIRECTDRAWSURFACE3) PURE; + STDMETHOD(EnumAttachedSurfaces)(THIS_ LPVOID,LPDDENUMSURFACESCALLBACK) PURE; + STDMETHOD(EnumOverlayZOrders)(THIS_ DWORD,LPVOID,LPDDENUMSURFACESCALLBACK) PURE; + STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE3, DWORD) PURE; + STDMETHOD(GetAttachedSurface)(THIS_ LPDDSCAPS, LPDIRECTDRAWSURFACE3 FAR *) PURE; + STDMETHOD(GetBltStatus)(THIS_ DWORD) PURE; + STDMETHOD(GetCaps)(THIS_ LPDDSCAPS) PURE; + STDMETHOD(GetClipper)(THIS_ LPDIRECTDRAWCLIPPER FAR*) PURE; + STDMETHOD(GetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; + STDMETHOD(GetDC)(THIS_ HDC FAR *) PURE; + STDMETHOD(GetFlipStatus)(THIS_ DWORD) PURE; + STDMETHOD(GetOverlayPosition)(THIS_ LPLONG, LPLONG ) PURE; + STDMETHOD(GetPalette)(THIS_ LPDIRECTDRAWPALETTE FAR*) PURE; + STDMETHOD(GetPixelFormat)(THIS_ LPDDPIXELFORMAT) PURE; + STDMETHOD(GetSurfaceDesc)(THIS_ LPDDSURFACEDESC) PURE; + STDMETHOD(Initialize)(THIS_ LPDIRECTDRAW, LPDDSURFACEDESC) PURE; + STDMETHOD(IsLost)(THIS) PURE; + STDMETHOD(Lock)(THIS_ LPRECT,LPDDSURFACEDESC,DWORD,HANDLE) PURE; + STDMETHOD(ReleaseDC)(THIS_ HDC) PURE; + STDMETHOD(Restore)(THIS) PURE; + STDMETHOD(SetClipper)(THIS_ LPDIRECTDRAWCLIPPER) PURE; + STDMETHOD(SetColorKey)(THIS_ DWORD, LPDDCOLORKEY) PURE; + STDMETHOD(SetOverlayPosition)(THIS_ LONG, LONG ) PURE; + STDMETHOD(SetPalette)(THIS_ LPDIRECTDRAWPALETTE) PURE; + STDMETHOD(Unlock)(THIS_ LPVOID) PURE; + STDMETHOD(UpdateOverlay)(THIS_ LPRECT, LPDIRECTDRAWSURFACE3,LPRECT,DWORD, LPDDOVERLAYFX) PURE; + STDMETHOD(UpdateOverlayDisplay)(THIS_ DWORD) PURE; + STDMETHOD(UpdateOverlayZOrder)(THIS_ DWORD, LPDIRECTDRAWSURFACE3) PURE; + /*** Added in the v2 interface ***/ + STDMETHOD(GetDDInterface)(THIS_ LPVOID FAR *) PURE; + STDMETHOD(PageLock)(THIS_ DWORD) PURE; + STDMETHOD(PageUnlock)(THIS_ DWORD) PURE; + /*** Added in the v3 interface ***/ + STDMETHOD(SetSurfaceDesc)(THIS_ LPDDSURFACEDESC, DWORD ) PURE; +}; +#endif + + + + +#define DDSCAPS_DATAEXCHANGE (DDSCAPS_SYSTEMMEMORY|DDSCAPS_VIDEOMEMORY) + +#undef INTERFACE +#define INTERFACE IDirectDrawFactory + +DECLARE_INTERFACE_(IDirectDrawFactory, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDrawFactory methods ***/ + STDMETHOD(CreateDirectDraw) (THIS_ GUID * pGUID, HWND hWnd, DWORD dwCoopLevelFlags, DWORD dwReserved, IUnknown *pUnkOuter, IDirectDraw **ppDirectDraw) PURE; + STDMETHOD(DirectDrawEnumerate) (THIS_ LPDDENUMCALLBACK lpCallback, LPVOID lpContext) PURE; +}; + + + +// {618F8AD4-8B7A-11d0-8FCC-00C04FD9189D} +DEFINE_GUID(IID_IDirectDraw3, +0x618f8ad4, 0x8b7a, 0x11d0, 0x8f, 0xcc, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d); + +typedef struct IDirectDraw3 FAR *LPDIRECTDRAW3; + +#undef INTERFACE +#define INTERFACE IDirectDraw3 + +DECLARE_INTERFACE_(IDirectDraw3, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDraw methods ***/ + STDMETHOD(Compact)(THIS) PURE; + STDMETHOD(CreateClipper)(THIS_ DWORD, LPDIRECTDRAWCLIPPER FAR*, IUnknown FAR * ) PURE; + STDMETHOD(CreatePalette)(THIS_ DWORD, LPPALETTEENTRY, LPDIRECTDRAWPALETTE FAR*, IUnknown FAR * ) PURE; + STDMETHOD(CreateSurface)(THIS_ LPDDSURFACEDESC, LPDIRECTDRAWSURFACE FAR *, IUnknown FAR *) PURE; + STDMETHOD(DuplicateSurface)( THIS_ LPDIRECTDRAWSURFACE, LPDIRECTDRAWSURFACE FAR * ) PURE; + STDMETHOD(EnumDisplayModes)( THIS_ DWORD, LPDDSURFACEDESC, LPVOID, LPDDENUMMODESCALLBACK ) PURE; + STDMETHOD(EnumSurfaces)(THIS_ DWORD, LPDDSURFACEDESC, LPVOID,LPDDENUMSURFACESCALLBACK ) PURE; + STDMETHOD(FlipToGDISurface)(THIS) PURE; + STDMETHOD(GetCaps)( THIS_ LPDDCAPS, LPDDCAPS) PURE; + STDMETHOD(GetDisplayMode)( THIS_ LPDDSURFACEDESC) PURE; + STDMETHOD(GetFourCCCodes)(THIS_ LPDWORD, LPDWORD ) PURE; + STDMETHOD(GetGDISurface)(THIS_ LPDIRECTDRAWSURFACE FAR *) PURE; + STDMETHOD(GetMonitorFrequency)(THIS_ LPDWORD) PURE; + STDMETHOD(GetScanLine)(THIS_ LPDWORD) PURE; + STDMETHOD(GetVerticalBlankStatus)(THIS_ LPBOOL ) PURE; + STDMETHOD(Initialize)(THIS_ GUID FAR *) PURE; + STDMETHOD(RestoreDisplayMode)(THIS) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND, DWORD) PURE; + STDMETHOD(SetDisplayMode)(THIS_ DWORD, DWORD,DWORD, DWORD, DWORD) PURE; + STDMETHOD(WaitForVerticalBlank)(THIS_ DWORD, HANDLE ) PURE; + /*** Added in the v2 interface ***/ + STDMETHOD(GetAvailableVidMem)(THIS_ LPDDSCAPS, LPDWORD, LPDWORD) PURE; + /*** IDirectDraw3 methods ***/ + STDMETHOD(GetSurfaceFromDC) (THIS_ HDC, IDirectDrawSurface **) PURE; +}; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectDraw3_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) +#define IDirectDraw3_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectDraw3_Release(p) (p)->lpVtbl->Release(p) +#define IDirectDraw3_Compact(p) (p)->lpVtbl->Compact(p) +#define IDirectDraw3_CreateClipper(p, a, b, c) (p)->lpVtbl->CreateClipper(p, a, b, c) +#define IDirectDraw3_CreatePalette(p, a, b, c, d) (p)->lpVtbl->CreatePalette(p, a, b, c, d) +#define IDirectDraw3_CreateSurface(p, a, b, c) (p)->lpVtbl->CreateSurface(p, a, b, c) +#define IDirectDraw3_DuplicateSurface(p, a, b) (p)->lpVtbl->DuplicateSurface(p, a, b) +#define IDirectDraw3_EnumDisplayModes(p, a, b, c, d) (p)->lpVtbl->EnumDisplayModes(p, a, b, c, d) +#define IDirectDraw3_EnumSurfaces(p, a, b, c, d) (p)->lpVtbl->EnumSurfaces(p, a, b, c, d) +#define IDirectDraw3_FlipToGDISurface(p) (p)->lpVtbl->FlipToGDISurface(p) +#define IDirectDraw3_GetCaps(p, a, b) (p)->lpVtbl->GetCaps(p, a, b) +#define IDirectDraw3_GetDisplayMode(p, a) (p)->lpVtbl->GetDisplayMode(p, a) +#define IDirectDraw3_GetFourCCCodes(p, a, b) (p)->lpVtbl->GetFourCCCodes(p, a, b) +#define IDirectDraw3_GetGDISurface(p, a) (p)->lpVtbl->GetGDISurface(p, a) +#define IDirectDraw3_GetMonitorFrequency(p, a) (p)->lpVtbl->GetMonitorFrequency(p, a) +#define IDirectDraw3_GetScanLine(p, a) (p)->lpVtbl->GetScanLine(p, a) +#define IDirectDraw3_GetVerticalBlankStatus(p, a) (p)->lpVtbl->GetVerticalBlankStatus(p, a) +#define IDirectDraw3_Initialize(p, a) (p)->lpVtbl->Initialize(p, a) +#define IDirectDraw3_RestoreDisplayMode(p) (p)->lpVtbl->RestoreDisplayMode(p) +#define IDirectDraw3_SetCooperativeLevel(p, a, b) (p)->lpVtbl->SetCooperativeLevel(p, a, b) +#define IDirectDraw3_SetDisplayMode(p, a, b, c, d, e) (p)->lpVtbl->SetDisplayMode(p, a, b, c, d, e) +#define IDirectDraw3_WaitForVerticalBlank(p, a, b) (p)->lpVtbl->WaitForVerticalBlank(p, a, b) +#define IDirectDraw3_GetAvailableVidMem(p, a, b, c) (p)->lpVtbl->GetAvailableVidMem(p, a, b, c) +#define IDirectDraw3_GetSurfaceFromDC(p, a, b) (p)->lpVtbl->GetSurfaceFromDC(p, a, b) +#endif + + + +/*=========================================================================== + * + * + * DIRECTDRAWEX RETURN CODES + * + * The return values from DirectDrawEx Commands and Surface that return an + * HRESULT are codes from DirectDrawEx concerning the results of the action + * requested by DirectDrawEx. + * + *==========================================================================*/ + +/* + * An attempt was made to load ddraw.dll + */ +#define DDERR_LOADFAILED MAKE_DDHRESULT( 901 ) + +/* + * Unable to determine module/os version number + */ +#define DDERR_BADVERSIONINFO MAKE_DDHRESULT( 902 ) + +/* + * Unable to determine address of ddraw.dll exported symbol (DirectDrawCreate or + * DirectDrawEnumerate). + */ +#define DDERR_BADPROCADDRESS MAKE_DDHRESULT( 903 ) + +/* + * Legacy usage: do not use QI() to create D3D device objects from surface objects. + * Use IDirect3D2::CreateDevice() + */ +#define DDERR_LEGACYUSAGE MAKE_DDHRESULT( 904 ) + +#ifdef __cplusplus +} +#endif + + +#endif // __DDRAWEXH__ diff --git a/windows_libs/mssdk/include/ddstream.h b/windows_libs/mssdk/include/ddstream.h new file mode 100644 index 00000000..4c2960fa --- /dev/null +++ b/windows_libs/mssdk/include/ddstream.h @@ -0,0 +1,533 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0338 */ +/* Compiler settings for ddstream.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __ddstream_h__ +#define __ddstream_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IDirectDrawMediaStream_FWD_DEFINED__ +#define __IDirectDrawMediaStream_FWD_DEFINED__ +typedef interface IDirectDrawMediaStream IDirectDrawMediaStream; +#endif /* __IDirectDrawMediaStream_FWD_DEFINED__ */ + + +#ifndef __IDirectDrawStreamSample_FWD_DEFINED__ +#define __IDirectDrawStreamSample_FWD_DEFINED__ +typedef interface IDirectDrawStreamSample IDirectDrawStreamSample; +#endif /* __IDirectDrawStreamSample_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "unknwn.h" +#include "mmstream.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_ddstream_0000 */ +/* [local] */ + +// +// The following declarations within the 'if 0' block are dummy typedefs used to make +// the ddstream.idl file build. The actual definitions are contained in DDRAW.H +// +#if 0 +typedef void *LPDDSURFACEDESC; + +typedef struct tDDSURFACEDESC DDSURFACEDESC; + +#endif +#include + +enum __MIDL___MIDL_itf_ddstream_0000_0001 + { DDSFF_PROGRESSIVERENDER = 0x1 + } ; + + + + + + + +extern RPC_IF_HANDLE __MIDL_itf_ddstream_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_ddstream_0000_v0_0_s_ifspec; + +#ifndef __IDirectDrawMediaStream_INTERFACE_DEFINED__ +#define __IDirectDrawMediaStream_INTERFACE_DEFINED__ + +/* interface IDirectDrawMediaStream */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IDirectDrawMediaStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("F4104FCE-9A70-11d0-8FDE-00C04FD9189D") + IDirectDrawMediaStream : public IMediaStream + { + public: + virtual HRESULT STDMETHODCALLTYPE GetFormat( + /* [out] */ DDSURFACEDESC *pDDSDCurrent, + /* [out] */ IDirectDrawPalette **ppDirectDrawPalette, + /* [out] */ DDSURFACEDESC *pDDSDDesired, + /* [out] */ DWORD *pdwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFormat( + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ IDirectDrawPalette *pDirectDrawPalette) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDirectDraw( + /* [out] */ IDirectDraw **ppDirectDraw) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDirectDraw( + /* [in] */ IDirectDraw *pDirectDraw) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSample( + /* [in] */ IDirectDrawSurface *pSurface, + /* [in] */ const RECT *pRect, + /* [in] */ DWORD dwFlags, + /* [out] */ IDirectDrawStreamSample **ppSample) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTimePerFrame( + /* [out] */ STREAM_TIME *pFrameTime) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDirectDrawMediaStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDirectDrawMediaStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDirectDrawMediaStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDirectDrawMediaStream * This); + + HRESULT ( STDMETHODCALLTYPE *GetMultiMediaStream )( + IDirectDrawMediaStream * This, + /* [out] */ IMultiMediaStream **ppMultiMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetInformation )( + IDirectDrawMediaStream * This, + /* [out] */ MSPID *pPurposeId, + /* [out] */ STREAM_TYPE *pType); + + HRESULT ( STDMETHODCALLTYPE *SetSameFormat )( + IDirectDrawMediaStream * This, + /* [in] */ IMediaStream *pStreamThatHasDesiredFormat, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *AllocateSample )( + IDirectDrawMediaStream * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppSample); + + HRESULT ( STDMETHODCALLTYPE *CreateSharedSample )( + IDirectDrawMediaStream * This, + /* [in] */ IStreamSample *pExistingSample, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppNewSample); + + HRESULT ( STDMETHODCALLTYPE *SendEndOfStream )( + IDirectDrawMediaStream * This, + DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetFormat )( + IDirectDrawMediaStream * This, + /* [out] */ DDSURFACEDESC *pDDSDCurrent, + /* [out] */ IDirectDrawPalette **ppDirectDrawPalette, + /* [out] */ DDSURFACEDESC *pDDSDDesired, + /* [out] */ DWORD *pdwFlags); + + HRESULT ( STDMETHODCALLTYPE *SetFormat )( + IDirectDrawMediaStream * This, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ IDirectDrawPalette *pDirectDrawPalette); + + HRESULT ( STDMETHODCALLTYPE *GetDirectDraw )( + IDirectDrawMediaStream * This, + /* [out] */ IDirectDraw **ppDirectDraw); + + HRESULT ( STDMETHODCALLTYPE *SetDirectDraw )( + IDirectDrawMediaStream * This, + /* [in] */ IDirectDraw *pDirectDraw); + + HRESULT ( STDMETHODCALLTYPE *CreateSample )( + IDirectDrawMediaStream * This, + /* [in] */ IDirectDrawSurface *pSurface, + /* [in] */ const RECT *pRect, + /* [in] */ DWORD dwFlags, + /* [out] */ IDirectDrawStreamSample **ppSample); + + HRESULT ( STDMETHODCALLTYPE *GetTimePerFrame )( + IDirectDrawMediaStream * This, + /* [out] */ STREAM_TIME *pFrameTime); + + END_INTERFACE + } IDirectDrawMediaStreamVtbl; + + interface IDirectDrawMediaStream + { + CONST_VTBL struct IDirectDrawMediaStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDirectDrawMediaStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDirectDrawMediaStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDirectDrawMediaStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDirectDrawMediaStream_GetMultiMediaStream(This,ppMultiMediaStream) \ + (This)->lpVtbl -> GetMultiMediaStream(This,ppMultiMediaStream) + +#define IDirectDrawMediaStream_GetInformation(This,pPurposeId,pType) \ + (This)->lpVtbl -> GetInformation(This,pPurposeId,pType) + +#define IDirectDrawMediaStream_SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) \ + (This)->lpVtbl -> SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) + +#define IDirectDrawMediaStream_AllocateSample(This,dwFlags,ppSample) \ + (This)->lpVtbl -> AllocateSample(This,dwFlags,ppSample) + +#define IDirectDrawMediaStream_CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) \ + (This)->lpVtbl -> CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) + +#define IDirectDrawMediaStream_SendEndOfStream(This,dwFlags) \ + (This)->lpVtbl -> SendEndOfStream(This,dwFlags) + + +#define IDirectDrawMediaStream_GetFormat(This,pDDSDCurrent,ppDirectDrawPalette,pDDSDDesired,pdwFlags) \ + (This)->lpVtbl -> GetFormat(This,pDDSDCurrent,ppDirectDrawPalette,pDDSDDesired,pdwFlags) + +#define IDirectDrawMediaStream_SetFormat(This,pDDSurfaceDesc,pDirectDrawPalette) \ + (This)->lpVtbl -> SetFormat(This,pDDSurfaceDesc,pDirectDrawPalette) + +#define IDirectDrawMediaStream_GetDirectDraw(This,ppDirectDraw) \ + (This)->lpVtbl -> GetDirectDraw(This,ppDirectDraw) + +#define IDirectDrawMediaStream_SetDirectDraw(This,pDirectDraw) \ + (This)->lpVtbl -> SetDirectDraw(This,pDirectDraw) + +#define IDirectDrawMediaStream_CreateSample(This,pSurface,pRect,dwFlags,ppSample) \ + (This)->lpVtbl -> CreateSample(This,pSurface,pRect,dwFlags,ppSample) + +#define IDirectDrawMediaStream_GetTimePerFrame(This,pFrameTime) \ + (This)->lpVtbl -> GetTimePerFrame(This,pFrameTime) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_GetFormat_Proxy( + IDirectDrawMediaStream * This, + /* [out] */ DDSURFACEDESC *pDDSDCurrent, + /* [out] */ IDirectDrawPalette **ppDirectDrawPalette, + /* [out] */ DDSURFACEDESC *pDDSDDesired, + /* [out] */ DWORD *pdwFlags); + + +void __RPC_STUB IDirectDrawMediaStream_GetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_SetFormat_Proxy( + IDirectDrawMediaStream * This, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ IDirectDrawPalette *pDirectDrawPalette); + + +void __RPC_STUB IDirectDrawMediaStream_SetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_GetDirectDraw_Proxy( + IDirectDrawMediaStream * This, + /* [out] */ IDirectDraw **ppDirectDraw); + + +void __RPC_STUB IDirectDrawMediaStream_GetDirectDraw_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_SetDirectDraw_Proxy( + IDirectDrawMediaStream * This, + /* [in] */ IDirectDraw *pDirectDraw); + + +void __RPC_STUB IDirectDrawMediaStream_SetDirectDraw_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_CreateSample_Proxy( + IDirectDrawMediaStream * This, + /* [in] */ IDirectDrawSurface *pSurface, + /* [in] */ const RECT *pRect, + /* [in] */ DWORD dwFlags, + /* [out] */ IDirectDrawStreamSample **ppSample); + + +void __RPC_STUB IDirectDrawMediaStream_CreateSample_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDirectDrawMediaStream_GetTimePerFrame_Proxy( + IDirectDrawMediaStream * This, + /* [out] */ STREAM_TIME *pFrameTime); + + +void __RPC_STUB IDirectDrawMediaStream_GetTimePerFrame_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDirectDrawMediaStream_INTERFACE_DEFINED__ */ + + +#ifndef __IDirectDrawStreamSample_INTERFACE_DEFINED__ +#define __IDirectDrawStreamSample_INTERFACE_DEFINED__ + +/* interface IDirectDrawStreamSample */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IDirectDrawStreamSample; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("F4104FCF-9A70-11d0-8FDE-00C04FD9189D") + IDirectDrawStreamSample : public IStreamSample + { + public: + virtual HRESULT STDMETHODCALLTYPE GetSurface( + /* [out] */ IDirectDrawSurface **ppDirectDrawSurface, + /* [out] */ RECT *pRect) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetRect( + /* [in] */ const RECT *pRect) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDirectDrawStreamSampleVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDirectDrawStreamSample * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDirectDrawStreamSample * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDirectDrawStreamSample * This); + + HRESULT ( STDMETHODCALLTYPE *GetMediaStream )( + IDirectDrawStreamSample * This, + /* [in] */ IMediaStream **ppMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetSampleTimes )( + IDirectDrawStreamSample * This, + /* [out] */ STREAM_TIME *pStartTime, + /* [out] */ STREAM_TIME *pEndTime, + /* [out] */ STREAM_TIME *pCurrentTime); + + HRESULT ( STDMETHODCALLTYPE *SetSampleTimes )( + IDirectDrawStreamSample * This, + /* [in] */ const STREAM_TIME *pStartTime, + /* [in] */ const STREAM_TIME *pEndTime); + + HRESULT ( STDMETHODCALLTYPE *Update )( + IDirectDrawStreamSample * This, + /* [in] */ DWORD dwFlags, + /* [in] */ HANDLE hEvent, + /* [in] */ PAPCFUNC pfnAPC, + /* [in] */ DWORD_PTR dwAPCData); + + HRESULT ( STDMETHODCALLTYPE *CompletionStatus )( + IDirectDrawStreamSample * This, + /* [in] */ DWORD dwFlags, + /* [in] */ DWORD dwMilliseconds); + + HRESULT ( STDMETHODCALLTYPE *GetSurface )( + IDirectDrawStreamSample * This, + /* [out] */ IDirectDrawSurface **ppDirectDrawSurface, + /* [out] */ RECT *pRect); + + HRESULT ( STDMETHODCALLTYPE *SetRect )( + IDirectDrawStreamSample * This, + /* [in] */ const RECT *pRect); + + END_INTERFACE + } IDirectDrawStreamSampleVtbl; + + interface IDirectDrawStreamSample + { + CONST_VTBL struct IDirectDrawStreamSampleVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDirectDrawStreamSample_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDirectDrawStreamSample_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDirectDrawStreamSample_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDirectDrawStreamSample_GetMediaStream(This,ppMediaStream) \ + (This)->lpVtbl -> GetMediaStream(This,ppMediaStream) + +#define IDirectDrawStreamSample_GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime) \ + (This)->lpVtbl -> GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime) + +#define IDirectDrawStreamSample_SetSampleTimes(This,pStartTime,pEndTime) \ + (This)->lpVtbl -> SetSampleTimes(This,pStartTime,pEndTime) + +#define IDirectDrawStreamSample_Update(This,dwFlags,hEvent,pfnAPC,dwAPCData) \ + (This)->lpVtbl -> Update(This,dwFlags,hEvent,pfnAPC,dwAPCData) + +#define IDirectDrawStreamSample_CompletionStatus(This,dwFlags,dwMilliseconds) \ + (This)->lpVtbl -> CompletionStatus(This,dwFlags,dwMilliseconds) + + +#define IDirectDrawStreamSample_GetSurface(This,ppDirectDrawSurface,pRect) \ + (This)->lpVtbl -> GetSurface(This,ppDirectDrawSurface,pRect) + +#define IDirectDrawStreamSample_SetRect(This,pRect) \ + (This)->lpVtbl -> SetRect(This,pRect) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDirectDrawStreamSample_GetSurface_Proxy( + IDirectDrawStreamSample * This, + /* [out] */ IDirectDrawSurface **ppDirectDrawSurface, + /* [out] */ RECT *pRect); + + +void __RPC_STUB IDirectDrawStreamSample_GetSurface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDirectDrawStreamSample_SetRect_Proxy( + IDirectDrawStreamSample * This, + /* [in] */ const RECT *pRect); + + +void __RPC_STUB IDirectDrawStreamSample_SetRect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDirectDrawStreamSample_INTERFACE_DEFINED__ */ + + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/dinput.h b/windows_libs/mssdk/include/dinput.h new file mode 100644 index 00000000..9b17bff9 --- /dev/null +++ b/windows_libs/mssdk/include/dinput.h @@ -0,0 +1,4387 @@ +/**************************************************************************** + * + * Copyright (C) 1996-2000 Microsoft Corporation. All Rights Reserved. + * + * File: dinput.h + * Content: DirectInput include file + * + ****************************************************************************/ + +#ifndef __DINPUT_INCLUDED__ +#define __DINPUT_INCLUDED__ + +#ifndef DIJ_RINGZERO + +#ifdef _WIN32 +#define COM_NO_WINDOWS_H +#include +#endif + +#endif /* DIJ_RINGZERO */ + +#ifdef __cplusplus +extern "C" { +#endif + + + + + +/* + * To build applications for older versions of DirectInput + * + * #define DIRECTINPUT_VERSION [ 0x0300 | 0x0500 | 0x0700 ] + * + * before #include . By default, #include + * will produce a DirectX 8-compatible header file. + * + */ + +#define DIRECTINPUT_HEADER_VERSION 0x0800 +#ifndef DIRECTINPUT_VERSION +#define DIRECTINPUT_VERSION DIRECTINPUT_HEADER_VERSION +#endif + +#ifndef DIJ_RINGZERO + +/**************************************************************************** + * + * Class IDs + * + ****************************************************************************/ + +DEFINE_GUID(CLSID_DirectInput, 0x25E609E0,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(CLSID_DirectInputDevice, 0x25E609E1,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); + +DEFINE_GUID(CLSID_DirectInput8, 0x25E609E4,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(CLSID_DirectInputDevice8,0x25E609E5,0xB259,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); + +/**************************************************************************** + * + * Interfaces + * + ****************************************************************************/ + +DEFINE_GUID(IID_IDirectInputA, 0x89521360,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInputW, 0x89521361,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInput2A, 0x5944E662,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInput2W, 0x5944E663,0xAA8A,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInput7A, 0x9A4CB684,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE); +DEFINE_GUID(IID_IDirectInput7W, 0x9A4CB685,0x236D,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE); +DEFINE_GUID(IID_IDirectInput8A, 0xBF798030,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00); +DEFINE_GUID(IID_IDirectInput8W, 0xBF798031,0x483A,0x4DA2,0xAA,0x99,0x5D,0x64,0xED,0x36,0x97,0x00); +DEFINE_GUID(IID_IDirectInputDeviceA, 0x5944E680,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInputDeviceW, 0x5944E681,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInputDevice2A,0x5944E682,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInputDevice2W,0x5944E683,0xC92E,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInputDevice7A,0x57D7C6BC,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE); +DEFINE_GUID(IID_IDirectInputDevice7W,0x57D7C6BD,0x2356,0x11D3,0x8E,0x9D,0x00,0xC0,0x4F,0x68,0x44,0xAE); +DEFINE_GUID(IID_IDirectInputDevice8A,0x54D41080,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79); +DEFINE_GUID(IID_IDirectInputDevice8W,0x54D41081,0xDC15,0x4833,0xA4,0x1B,0x74,0x8F,0x73,0xA3,0x81,0x79); +DEFINE_GUID(IID_IDirectInputEffect, 0xE7E1F7C0,0x88D2,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); + +/**************************************************************************** + * + * Predefined object types + * + ****************************************************************************/ + +DEFINE_GUID(GUID_XAxis, 0xA36D02E0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_YAxis, 0xA36D02E1,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_ZAxis, 0xA36D02E2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_RxAxis, 0xA36D02F4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_RyAxis, 0xA36D02F5,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_RzAxis, 0xA36D02E3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_Slider, 0xA36D02E4,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); + +DEFINE_GUID(GUID_Button, 0xA36D02F0,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_Key, 0x55728220,0xD33C,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); + +DEFINE_GUID(GUID_POV, 0xA36D02F2,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); + +DEFINE_GUID(GUID_Unknown, 0xA36D02F3,0xC9F3,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); + +/**************************************************************************** + * + * Predefined product GUIDs + * + ****************************************************************************/ + +DEFINE_GUID(GUID_SysMouse, 0x6F1D2B60,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_SysKeyboard,0x6F1D2B61,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_Joystick ,0x6F1D2B70,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_SysMouseEm, 0x6F1D2B80,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_SysMouseEm2,0x6F1D2B81,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_SysKeyboardEm, 0x6F1D2B82,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_SysKeyboardEm2,0x6F1D2B83,0xD5A0,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); + +/**************************************************************************** + * + * Predefined force feedback effects + * + ****************************************************************************/ + +DEFINE_GUID(GUID_ConstantForce, 0x13541C20,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_RampForce, 0x13541C21,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_Square, 0x13541C22,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_Sine, 0x13541C23,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_Triangle, 0x13541C24,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_SawtoothUp, 0x13541C25,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_SawtoothDown, 0x13541C26,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_Spring, 0x13541C27,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_Damper, 0x13541C28,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_Inertia, 0x13541C29,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_Friction, 0x13541C2A,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(GUID_CustomForce, 0x13541C2B,0x8E33,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); + +#endif /* DIJ_RINGZERO */ + +/**************************************************************************** + * + * Interfaces and Structures... + * + ****************************************************************************/ + +#if(DIRECTINPUT_VERSION >= 0x0500) + +/**************************************************************************** + * + * IDirectInputEffect + * + ****************************************************************************/ + +#define DIEFT_ALL 0x00000000 + +#define DIEFT_CONSTANTFORCE 0x00000001 +#define DIEFT_RAMPFORCE 0x00000002 +#define DIEFT_PERIODIC 0x00000003 +#define DIEFT_CONDITION 0x00000004 +#define DIEFT_CUSTOMFORCE 0x00000005 +#define DIEFT_HARDWARE 0x000000FF +#define DIEFT_FFATTACK 0x00000200 +#define DIEFT_FFFADE 0x00000400 +#define DIEFT_SATURATION 0x00000800 +#define DIEFT_POSNEGCOEFFICIENTS 0x00001000 +#define DIEFT_POSNEGSATURATION 0x00002000 +#define DIEFT_DEADBAND 0x00004000 +#define DIEFT_STARTDELAY 0x00008000 +#define DIEFT_GETTYPE(n) LOBYTE(n) + +#define DI_DEGREES 100 +#define DI_FFNOMINALMAX 10000 +#define DI_SECONDS 1000000 + +typedef struct DICONSTANTFORCE { + LONG lMagnitude; +} DICONSTANTFORCE, *LPDICONSTANTFORCE; +typedef const DICONSTANTFORCE *LPCDICONSTANTFORCE; + +typedef struct DIRAMPFORCE { + LONG lStart; + LONG lEnd; +} DIRAMPFORCE, *LPDIRAMPFORCE; +typedef const DIRAMPFORCE *LPCDIRAMPFORCE; + +typedef struct DIPERIODIC { + DWORD dwMagnitude; + LONG lOffset; + DWORD dwPhase; + DWORD dwPeriod; +} DIPERIODIC, *LPDIPERIODIC; +typedef const DIPERIODIC *LPCDIPERIODIC; + +typedef struct DICONDITION { + LONG lOffset; + LONG lPositiveCoefficient; + LONG lNegativeCoefficient; + DWORD dwPositiveSaturation; + DWORD dwNegativeSaturation; + LONG lDeadBand; +} DICONDITION, *LPDICONDITION; +typedef const DICONDITION *LPCDICONDITION; + +typedef struct DICUSTOMFORCE { + DWORD cChannels; + DWORD dwSamplePeriod; + DWORD cSamples; + LPLONG rglForceData; +} DICUSTOMFORCE, *LPDICUSTOMFORCE; +typedef const DICUSTOMFORCE *LPCDICUSTOMFORCE; + + +typedef struct DIENVELOPE { + DWORD dwSize; /* sizeof(DIENVELOPE) */ + DWORD dwAttackLevel; + DWORD dwAttackTime; /* Microseconds */ + DWORD dwFadeLevel; + DWORD dwFadeTime; /* Microseconds */ +} DIENVELOPE, *LPDIENVELOPE; +typedef const DIENVELOPE *LPCDIENVELOPE; + + +/* This structure is defined for DirectX 5.0 compatibility */ +typedef struct DIEFFECT_DX5 { + DWORD dwSize; /* sizeof(DIEFFECT_DX5) */ + DWORD dwFlags; /* DIEFF_* */ + DWORD dwDuration; /* Microseconds */ + DWORD dwSamplePeriod; /* Microseconds */ + DWORD dwGain; + DWORD dwTriggerButton; /* or DIEB_NOTRIGGER */ + DWORD dwTriggerRepeatInterval; /* Microseconds */ + DWORD cAxes; /* Number of axes */ + LPDWORD rgdwAxes; /* Array of axes */ + LPLONG rglDirection; /* Array of directions */ + LPDIENVELOPE lpEnvelope; /* Optional */ + DWORD cbTypeSpecificParams; /* Size of params */ + LPVOID lpvTypeSpecificParams; /* Pointer to params */ +} DIEFFECT_DX5, *LPDIEFFECT_DX5; +typedef const DIEFFECT_DX5 *LPCDIEFFECT_DX5; + +typedef struct DIEFFECT { + DWORD dwSize; /* sizeof(DIEFFECT) */ + DWORD dwFlags; /* DIEFF_* */ + DWORD dwDuration; /* Microseconds */ + DWORD dwSamplePeriod; /* Microseconds */ + DWORD dwGain; + DWORD dwTriggerButton; /* or DIEB_NOTRIGGER */ + DWORD dwTriggerRepeatInterval; /* Microseconds */ + DWORD cAxes; /* Number of axes */ + LPDWORD rgdwAxes; /* Array of axes */ + LPLONG rglDirection; /* Array of directions */ + LPDIENVELOPE lpEnvelope; /* Optional */ + DWORD cbTypeSpecificParams; /* Size of params */ + LPVOID lpvTypeSpecificParams; /* Pointer to params */ +#if(DIRECTINPUT_VERSION >= 0x0600) + DWORD dwStartDelay; /* Microseconds */ +#endif /* DIRECTINPUT_VERSION >= 0x0600 */ +} DIEFFECT, *LPDIEFFECT; +typedef DIEFFECT DIEFFECT_DX6; +typedef LPDIEFFECT LPDIEFFECT_DX6; +typedef const DIEFFECT *LPCDIEFFECT; + + +#if(DIRECTINPUT_VERSION >= 0x0700) +#ifndef DIJ_RINGZERO +typedef struct DIFILEEFFECT{ + DWORD dwSize; + GUID GuidEffect; + LPCDIEFFECT lpDiEffect; + CHAR szFriendlyName[MAX_PATH]; +}DIFILEEFFECT, *LPDIFILEEFFECT; +typedef const DIFILEEFFECT *LPCDIFILEEFFECT; +typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSINFILECALLBACK)(LPCDIFILEEFFECT , LPVOID); +#endif /* DIJ_RINGZERO */ +#endif /* DIRECTINPUT_VERSION >= 0x0700 */ + +#define DIEFF_OBJECTIDS 0x00000001 +#define DIEFF_OBJECTOFFSETS 0x00000002 +#define DIEFF_CARTESIAN 0x00000010 +#define DIEFF_POLAR 0x00000020 +#define DIEFF_SPHERICAL 0x00000040 + +#define DIEP_DURATION 0x00000001 +#define DIEP_SAMPLEPERIOD 0x00000002 +#define DIEP_GAIN 0x00000004 +#define DIEP_TRIGGERBUTTON 0x00000008 +#define DIEP_TRIGGERREPEATINTERVAL 0x00000010 +#define DIEP_AXES 0x00000020 +#define DIEP_DIRECTION 0x00000040 +#define DIEP_ENVELOPE 0x00000080 +#define DIEP_TYPESPECIFICPARAMS 0x00000100 +#if(DIRECTINPUT_VERSION >= 0x0600) +#define DIEP_STARTDELAY 0x00000200 +#define DIEP_ALLPARAMS_DX5 0x000001FF +#define DIEP_ALLPARAMS 0x000003FF +#else /* DIRECTINPUT_VERSION < 0x0600 */ +#define DIEP_ALLPARAMS 0x000001FF +#endif /* DIRECTINPUT_VERSION < 0x0600 */ +#define DIEP_START 0x20000000 +#define DIEP_NORESTART 0x40000000 +#define DIEP_NODOWNLOAD 0x80000000 +#define DIEB_NOTRIGGER 0xFFFFFFFF + +#define DIES_SOLO 0x00000001 +#define DIES_NODOWNLOAD 0x80000000 + +#define DIEGES_PLAYING 0x00000001 +#define DIEGES_EMULATED 0x00000002 + +typedef struct DIEFFESCAPE { + DWORD dwSize; + DWORD dwCommand; + LPVOID lpvInBuffer; + DWORD cbInBuffer; + LPVOID lpvOutBuffer; + DWORD cbOutBuffer; +} DIEFFESCAPE, *LPDIEFFESCAPE; + +#ifndef DIJ_RINGZERO + +#undef INTERFACE +#define INTERFACE IDirectInputEffect + +DECLARE_INTERFACE_(IDirectInputEffect, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInputEffect methods ***/ + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE; + STDMETHOD(GetEffectGuid)(THIS_ LPGUID) PURE; + STDMETHOD(GetParameters)(THIS_ LPDIEFFECT,DWORD) PURE; + STDMETHOD(SetParameters)(THIS_ LPCDIEFFECT,DWORD) PURE; + STDMETHOD(Start)(THIS_ DWORD,DWORD) PURE; + STDMETHOD(Stop)(THIS) PURE; + STDMETHOD(GetEffectStatus)(THIS_ LPDWORD) PURE; + STDMETHOD(Download)(THIS) PURE; + STDMETHOD(Unload)(THIS) PURE; + STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE; +}; + +typedef struct IDirectInputEffect *LPDIRECTINPUTEFFECT; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectInputEffect_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectInputEffect_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectInputEffect_Release(p) (p)->lpVtbl->Release(p) +#define IDirectInputEffect_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) +#define IDirectInputEffect_GetEffectGuid(p,a) (p)->lpVtbl->GetEffectGuid(p,a) +#define IDirectInputEffect_GetParameters(p,a,b) (p)->lpVtbl->GetParameters(p,a,b) +#define IDirectInputEffect_SetParameters(p,a,b) (p)->lpVtbl->SetParameters(p,a,b) +#define IDirectInputEffect_Start(p,a,b) (p)->lpVtbl->Start(p,a,b) +#define IDirectInputEffect_Stop(p) (p)->lpVtbl->Stop(p) +#define IDirectInputEffect_GetEffectStatus(p,a) (p)->lpVtbl->GetEffectStatus(p,a) +#define IDirectInputEffect_Download(p) (p)->lpVtbl->Download(p) +#define IDirectInputEffect_Unload(p) (p)->lpVtbl->Unload(p) +#define IDirectInputEffect_Escape(p,a) (p)->lpVtbl->Escape(p,a) +#else +#define IDirectInputEffect_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectInputEffect_AddRef(p) (p)->AddRef() +#define IDirectInputEffect_Release(p) (p)->Release() +#define IDirectInputEffect_Initialize(p,a,b,c) (p)->Initialize(a,b,c) +#define IDirectInputEffect_GetEffectGuid(p,a) (p)->GetEffectGuid(a) +#define IDirectInputEffect_GetParameters(p,a,b) (p)->GetParameters(a,b) +#define IDirectInputEffect_SetParameters(p,a,b) (p)->SetParameters(a,b) +#define IDirectInputEffect_Start(p,a,b) (p)->Start(a,b) +#define IDirectInputEffect_Stop(p) (p)->Stop() +#define IDirectInputEffect_GetEffectStatus(p,a) (p)->GetEffectStatus(a) +#define IDirectInputEffect_Download(p) (p)->Download() +#define IDirectInputEffect_Unload(p) (p)->Unload() +#define IDirectInputEffect_Escape(p,a) (p)->Escape(a) +#endif + +#endif /* DIJ_RINGZERO */ + +#endif /* DIRECTINPUT_VERSION >= 0x0500 */ + +/**************************************************************************** + * + * IDirectInputDevice + * + ****************************************************************************/ + +#if DIRECTINPUT_VERSION <= 0x700 +#define DIDEVTYPE_DEVICE 1 +#define DIDEVTYPE_MOUSE 2 +#define DIDEVTYPE_KEYBOARD 3 +#define DIDEVTYPE_JOYSTICK 4 + +#else +#define DI8DEVCLASS_ALL 0 +#define DI8DEVCLASS_DEVICE 1 +#define DI8DEVCLASS_POINTER 2 +#define DI8DEVCLASS_KEYBOARD 3 +#define DI8DEVCLASS_GAMECTRL 4 + +#define DI8DEVTYPE_DEVICE 0x11 +#define DI8DEVTYPE_MOUSE 0x12 +#define DI8DEVTYPE_KEYBOARD 0x13 +#define DI8DEVTYPE_JOYSTICK 0x14 +#define DI8DEVTYPE_GAMEPAD 0x15 +#define DI8DEVTYPE_DRIVING 0x16 +#define DI8DEVTYPE_FLIGHT 0x17 +#define DI8DEVTYPE_1STPERSON 0x18 +#define DI8DEVTYPE_DEVICECTRL 0x19 +#define DI8DEVTYPE_SCREENPOINTER 0x1A +#define DI8DEVTYPE_REMOTE 0x1B +#define DI8DEVTYPE_SUPPLEMENTAL 0x1C +#endif /* DIRECTINPUT_VERSION <= 0x700 */ + +#define DIDEVTYPE_HID 0x00010000 + +#if DIRECTINPUT_VERSION <= 0x700 +#define DIDEVTYPEMOUSE_UNKNOWN 1 +#define DIDEVTYPEMOUSE_TRADITIONAL 2 +#define DIDEVTYPEMOUSE_FINGERSTICK 3 +#define DIDEVTYPEMOUSE_TOUCHPAD 4 +#define DIDEVTYPEMOUSE_TRACKBALL 5 + +#define DIDEVTYPEKEYBOARD_UNKNOWN 0 +#define DIDEVTYPEKEYBOARD_PCXT 1 +#define DIDEVTYPEKEYBOARD_OLIVETTI 2 +#define DIDEVTYPEKEYBOARD_PCAT 3 +#define DIDEVTYPEKEYBOARD_PCENH 4 +#define DIDEVTYPEKEYBOARD_NOKIA1050 5 +#define DIDEVTYPEKEYBOARD_NOKIA9140 6 +#define DIDEVTYPEKEYBOARD_NEC98 7 +#define DIDEVTYPEKEYBOARD_NEC98LAPTOP 8 +#define DIDEVTYPEKEYBOARD_NEC98106 9 +#define DIDEVTYPEKEYBOARD_JAPAN106 10 +#define DIDEVTYPEKEYBOARD_JAPANAX 11 +#define DIDEVTYPEKEYBOARD_J3100 12 + +#define DIDEVTYPEJOYSTICK_UNKNOWN 1 +#define DIDEVTYPEJOYSTICK_TRADITIONAL 2 +#define DIDEVTYPEJOYSTICK_FLIGHTSTICK 3 +#define DIDEVTYPEJOYSTICK_GAMEPAD 4 +#define DIDEVTYPEJOYSTICK_RUDDER 5 +#define DIDEVTYPEJOYSTICK_WHEEL 6 +#define DIDEVTYPEJOYSTICK_HEADTRACKER 7 + +#else +#define DI8DEVTYPEMOUSE_UNKNOWN 1 +#define DI8DEVTYPEMOUSE_TRADITIONAL 2 +#define DI8DEVTYPEMOUSE_FINGERSTICK 3 +#define DI8DEVTYPEMOUSE_TOUCHPAD 4 +#define DI8DEVTYPEMOUSE_TRACKBALL 5 +#define DI8DEVTYPEMOUSE_ABSOLUTE 6 + +#define DI8DEVTYPEKEYBOARD_UNKNOWN 0 +#define DI8DEVTYPEKEYBOARD_PCXT 1 +#define DI8DEVTYPEKEYBOARD_OLIVETTI 2 +#define DI8DEVTYPEKEYBOARD_PCAT 3 +#define DI8DEVTYPEKEYBOARD_PCENH 4 +#define DI8DEVTYPEKEYBOARD_NOKIA1050 5 +#define DI8DEVTYPEKEYBOARD_NOKIA9140 6 +#define DI8DEVTYPEKEYBOARD_NEC98 7 +#define DI8DEVTYPEKEYBOARD_NEC98LAPTOP 8 +#define DI8DEVTYPEKEYBOARD_NEC98106 9 +#define DI8DEVTYPEKEYBOARD_JAPAN106 10 +#define DI8DEVTYPEKEYBOARD_JAPANAX 11 +#define DI8DEVTYPEKEYBOARD_J3100 12 + +#define DI8DEVTYPE_LIMITEDGAMESUBTYPE 1 + +#define DI8DEVTYPEJOYSTICK_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE +#define DI8DEVTYPEJOYSTICK_STANDARD 2 + +#define DI8DEVTYPEGAMEPAD_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE +#define DI8DEVTYPEGAMEPAD_STANDARD 2 +#define DI8DEVTYPEGAMEPAD_TILT 3 + +#define DI8DEVTYPEDRIVING_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE +#define DI8DEVTYPEDRIVING_COMBINEDPEDALS 2 +#define DI8DEVTYPEDRIVING_DUALPEDALS 3 +#define DI8DEVTYPEDRIVING_THREEPEDALS 4 +#define DI8DEVTYPEDRIVING_HANDHELD 5 + +#define DI8DEVTYPEFLIGHT_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE +#define DI8DEVTYPEFLIGHT_STICK 2 +#define DI8DEVTYPEFLIGHT_YOKE 3 +#define DI8DEVTYPEFLIGHT_RC 4 + +#define DI8DEVTYPE1STPERSON_LIMITED DI8DEVTYPE_LIMITEDGAMESUBTYPE +#define DI8DEVTYPE1STPERSON_UNKNOWN 2 +#define DI8DEVTYPE1STPERSON_SIXDOF 3 +#define DI8DEVTYPE1STPERSON_SHOOTER 4 + +#define DI8DEVTYPESCREENPTR_UNKNOWN 2 +#define DI8DEVTYPESCREENPTR_LIGHTGUN 3 +#define DI8DEVTYPESCREENPTR_LIGHTPEN 4 +#define DI8DEVTYPESCREENPTR_TOUCH 5 + +#define DI8DEVTYPEREMOTE_UNKNOWN 2 + +#define DI8DEVTYPEDEVICECTRL_UNKNOWN 2 +#define DI8DEVTYPEDEVICECTRL_COMMSSELECTION 3 +#define DI8DEVTYPEDEVICECTRL_COMMSSELECTION_HARDWIRED 4 + +#define DI8DEVTYPESUPPLEMENTAL_UNKNOWN 2 +#define DI8DEVTYPESUPPLEMENTAL_2NDHANDCONTROLLER 3 +#define DI8DEVTYPESUPPLEMENTAL_HEADTRACKER 4 +#define DI8DEVTYPESUPPLEMENTAL_HANDTRACKER 5 +#define DI8DEVTYPESUPPLEMENTAL_SHIFTSTICKGATE 6 +#define DI8DEVTYPESUPPLEMENTAL_SHIFTER 7 +#define DI8DEVTYPESUPPLEMENTAL_THROTTLE 8 +#define DI8DEVTYPESUPPLEMENTAL_SPLITTHROTTLE 9 +#define DI8DEVTYPESUPPLEMENTAL_COMBINEDPEDALS 10 +#define DI8DEVTYPESUPPLEMENTAL_DUALPEDALS 11 +#define DI8DEVTYPESUPPLEMENTAL_THREEPEDALS 12 +#define DI8DEVTYPESUPPLEMENTAL_RUDDERPEDALS 13 +#endif /* DIRECTINPUT_VERSION <= 0x700 */ + +#define GET_DIDEVICE_TYPE(dwDevType) LOBYTE(dwDevType) +#define GET_DIDEVICE_SUBTYPE(dwDevType) HIBYTE(dwDevType) + +#if(DIRECTINPUT_VERSION >= 0x0500) +/* This structure is defined for DirectX 3.0 compatibility */ +typedef struct DIDEVCAPS_DX3 { + DWORD dwSize; + DWORD dwFlags; + DWORD dwDevType; + DWORD dwAxes; + DWORD dwButtons; + DWORD dwPOVs; +} DIDEVCAPS_DX3, *LPDIDEVCAPS_DX3; +#endif /* DIRECTINPUT_VERSION >= 0x0500 */ + +typedef struct DIDEVCAPS { + DWORD dwSize; + DWORD dwFlags; + DWORD dwDevType; + DWORD dwAxes; + DWORD dwButtons; + DWORD dwPOVs; +#if(DIRECTINPUT_VERSION >= 0x0500) + DWORD dwFFSamplePeriod; + DWORD dwFFMinTimeResolution; + DWORD dwFirmwareRevision; + DWORD dwHardwareRevision; + DWORD dwFFDriverVersion; +#endif /* DIRECTINPUT_VERSION >= 0x0500 */ +} DIDEVCAPS, *LPDIDEVCAPS; + +#define DIDC_ATTACHED 0x00000001 +#define DIDC_POLLEDDEVICE 0x00000002 +#define DIDC_EMULATED 0x00000004 +#define DIDC_POLLEDDATAFORMAT 0x00000008 +#if(DIRECTINPUT_VERSION >= 0x0500) +#define DIDC_FORCEFEEDBACK 0x00000100 +#define DIDC_FFATTACK 0x00000200 +#define DIDC_FFFADE 0x00000400 +#define DIDC_SATURATION 0x00000800 +#define DIDC_POSNEGCOEFFICIENTS 0x00001000 +#define DIDC_POSNEGSATURATION 0x00002000 +#define DIDC_DEADBAND 0x00004000 +#endif /* DIRECTINPUT_VERSION >= 0x0500 */ +#define DIDC_STARTDELAY 0x00008000 +#if(DIRECTINPUT_VERSION >= 0x050a) +#define DIDC_ALIAS 0x00010000 +#define DIDC_PHANTOM 0x00020000 +#endif /* DIRECTINPUT_VERSION >= 0x050a */ +#if(DIRECTINPUT_VERSION >= 0x0800) +#define DIDC_HIDDEN 0x00040000 +#endif /* DIRECTINPUT_VERSION >= 0x0800 */ + +#define DIDFT_ALL 0x00000000 + +#define DIDFT_RELAXIS 0x00000001 +#define DIDFT_ABSAXIS 0x00000002 +#define DIDFT_AXIS 0x00000003 + +#define DIDFT_PSHBUTTON 0x00000004 +#define DIDFT_TGLBUTTON 0x00000008 +#define DIDFT_BUTTON 0x0000000C + +#define DIDFT_POV 0x00000010 +#define DIDFT_COLLECTION 0x00000040 +#define DIDFT_NODATA 0x00000080 + +#define DIDFT_ANYINSTANCE 0x00FFFF00 +#define DIDFT_INSTANCEMASK DIDFT_ANYINSTANCE +#define DIDFT_MAKEINSTANCE(n) ((WORD)(n) << 8) +#define DIDFT_GETTYPE(n) LOBYTE(n) +#define DIDFT_GETINSTANCE(n) LOWORD((n) >> 8) +#define DIDFT_FFACTUATOR 0x01000000 +#define DIDFT_FFEFFECTTRIGGER 0x02000000 +#if(DIRECTINPUT_VERSION >= 0x050a) +#define DIDFT_OUTPUT 0x10000000 +#define DIDFT_VENDORDEFINED 0x04000000 +#define DIDFT_ALIAS 0x08000000 +#endif /* DIRECTINPUT_VERSION >= 0x050a */ + +#define DIDFT_ENUMCOLLECTION(n) ((WORD)(n) << 8) +#define DIDFT_NOCOLLECTION 0x00FFFF00 + +#ifndef DIJ_RINGZERO + +typedef struct _DIOBJECTDATAFORMAT { + const GUID *pguid; + DWORD dwOfs; + DWORD dwType; + DWORD dwFlags; +} DIOBJECTDATAFORMAT, *LPDIOBJECTDATAFORMAT; +typedef const DIOBJECTDATAFORMAT *LPCDIOBJECTDATAFORMAT; + +typedef struct _DIDATAFORMAT { + DWORD dwSize; + DWORD dwObjSize; + DWORD dwFlags; + DWORD dwDataSize; + DWORD dwNumObjs; + LPDIOBJECTDATAFORMAT rgodf; +} DIDATAFORMAT, *LPDIDATAFORMAT; +typedef const DIDATAFORMAT *LPCDIDATAFORMAT; + +#define DIDF_ABSAXIS 0x00000001 +#define DIDF_RELAXIS 0x00000002 + +#ifdef __cplusplus +extern "C" { +#endif +extern const DIDATAFORMAT c_dfDIMouse; + +#if(DIRECTINPUT_VERSION >= 0x0700) +extern const DIDATAFORMAT c_dfDIMouse2; +#endif /* DIRECTINPUT_VERSION >= 0x0700 */ + +extern const DIDATAFORMAT c_dfDIKeyboard; + +#if(DIRECTINPUT_VERSION >= 0x0500) +extern const DIDATAFORMAT c_dfDIJoystick; +extern const DIDATAFORMAT c_dfDIJoystick2; +#endif /* DIRECTINPUT_VERSION >= 0x0500 */ + +#ifdef __cplusplus +}; +#endif + + +#if DIRECTINPUT_VERSION > 0x0700 + +typedef struct _DIACTIONA { + UINT_PTR uAppData; + DWORD dwSemantic; + OPTIONAL DWORD dwFlags; + OPTIONAL union { + LPCSTR lptszActionName; + UINT uResIdString; + }; + OPTIONAL GUID guidInstance; + OPTIONAL DWORD dwObjID; + OPTIONAL DWORD dwHow; +} DIACTIONA, *LPDIACTIONA ; +typedef struct _DIACTIONW { + UINT_PTR uAppData; + DWORD dwSemantic; + OPTIONAL DWORD dwFlags; + OPTIONAL union { + LPCWSTR lptszActionName; + UINT uResIdString; + }; + OPTIONAL GUID guidInstance; + OPTIONAL DWORD dwObjID; + OPTIONAL DWORD dwHow; +} DIACTIONW, *LPDIACTIONW ; +#ifdef UNICODE +typedef DIACTIONW DIACTION; +typedef LPDIACTIONW LPDIACTION; +#else +typedef DIACTIONA DIACTION; +typedef LPDIACTIONA LPDIACTION; +#endif // UNICODE + +typedef const DIACTIONA *LPCDIACTIONA; +typedef const DIACTIONW *LPCDIACTIONW; +#ifdef UNICODE +typedef DIACTIONW DIACTION; +typedef LPCDIACTIONW LPCDIACTION; +#else +typedef DIACTIONA DIACTION; +typedef LPCDIACTIONA LPCDIACTION; +#endif // UNICODE +typedef const DIACTION *LPCDIACTION; + + +#define DIA_FORCEFEEDBACK 0x00000001 +#define DIA_APPMAPPED 0x00000002 +#define DIA_APPNOMAP 0x00000004 +#define DIA_NORANGE 0x00000008 +#define DIA_APPFIXED 0x00000010 + +#define DIAH_UNMAPPED 0x00000000 +#define DIAH_USERCONFIG 0x00000001 +#define DIAH_APPREQUESTED 0x00000002 +#define DIAH_HWAPP 0x00000004 +#define DIAH_HWDEFAULT 0x00000008 +#define DIAH_DEFAULT 0x00000020 +#define DIAH_ERROR 0x80000000 + +typedef struct _DIACTIONFORMATA { + DWORD dwSize; + DWORD dwActionSize; + DWORD dwDataSize; + DWORD dwNumActions; + LPDIACTIONA rgoAction; + GUID guidActionMap; + DWORD dwGenre; + DWORD dwBufferSize; + OPTIONAL LONG lAxisMin; + OPTIONAL LONG lAxisMax; + OPTIONAL HINSTANCE hInstString; + FILETIME ftTimeStamp; + DWORD dwCRC; + CHAR tszActionMap[MAX_PATH]; +} DIACTIONFORMATA, *LPDIACTIONFORMATA; +typedef struct _DIACTIONFORMATW { + DWORD dwSize; + DWORD dwActionSize; + DWORD dwDataSize; + DWORD dwNumActions; + LPDIACTIONW rgoAction; + GUID guidActionMap; + DWORD dwGenre; + DWORD dwBufferSize; + OPTIONAL LONG lAxisMin; + OPTIONAL LONG lAxisMax; + OPTIONAL HINSTANCE hInstString; + FILETIME ftTimeStamp; + DWORD dwCRC; + WCHAR tszActionMap[MAX_PATH]; +} DIACTIONFORMATW, *LPDIACTIONFORMATW; +#ifdef UNICODE +typedef DIACTIONFORMATW DIACTIONFORMAT; +typedef LPDIACTIONFORMATW LPDIACTIONFORMAT; +#else +typedef DIACTIONFORMATA DIACTIONFORMAT; +typedef LPDIACTIONFORMATA LPDIACTIONFORMAT; +#endif // UNICODE +typedef const DIACTIONFORMATA *LPCDIACTIONFORMATA; +typedef const DIACTIONFORMATW *LPCDIACTIONFORMATW; +#ifdef UNICODE +typedef DIACTIONFORMATW DIACTIONFORMAT; +typedef LPCDIACTIONFORMATW LPCDIACTIONFORMAT; +#else +typedef DIACTIONFORMATA DIACTIONFORMAT; +typedef LPCDIACTIONFORMATA LPCDIACTIONFORMAT; +#endif // UNICODE +typedef const DIACTIONFORMAT *LPCDIACTIONFORMAT; + +#define DIAFTS_NEWDEVICELOW 0xFFFFFFFF +#define DIAFTS_NEWDEVICEHIGH 0xFFFFFFFF +#define DIAFTS_UNUSEDDEVICELOW 0x00000000 +#define DIAFTS_UNUSEDDEVICEHIGH 0x00000000 + +#define DIDBAM_DEFAULT 0x00000000 +#define DIDBAM_PRESERVE 0x00000001 +#define DIDBAM_INITIALIZE 0x00000002 +#define DIDBAM_HWDEFAULTS 0x00000004 + +#define DIDSAM_DEFAULT 0x00000000 +#define DIDSAM_NOUSER 0x00000001 +#define DIDSAM_FORCESAVE 0x00000002 + +#define DICD_DEFAULT 0x00000000 +#define DICD_EDIT 0x00000001 + +/* + * The following definition is normally defined in d3dtypes.h + */ +#ifndef D3DCOLOR_DEFINED +typedef DWORD D3DCOLOR; +#define D3DCOLOR_DEFINED +#endif + +typedef struct _DICOLORSET{ + DWORD dwSize; + D3DCOLOR cTextFore; + D3DCOLOR cTextHighlight; + D3DCOLOR cCalloutLine; + D3DCOLOR cCalloutHighlight; + D3DCOLOR cBorder; + D3DCOLOR cControlFill; + D3DCOLOR cHighlightFill; + D3DCOLOR cAreaFill; +} DICOLORSET, *LPDICOLORSET; +typedef const DICOLORSET *LPCDICOLORSET; + + +typedef struct _DICONFIGUREDEVICESPARAMSA{ + DWORD dwSize; + DWORD dwcUsers; + LPSTR lptszUserNames; + DWORD dwcFormats; + LPDIACTIONFORMATA lprgFormats; + HWND hwnd; + DICOLORSET dics; + IUnknown FAR * lpUnkDDSTarget; +} DICONFIGUREDEVICESPARAMSA, *LPDICONFIGUREDEVICESPARAMSA; +typedef struct _DICONFIGUREDEVICESPARAMSW{ + DWORD dwSize; + DWORD dwcUsers; + LPWSTR lptszUserNames; + DWORD dwcFormats; + LPDIACTIONFORMATW lprgFormats; + HWND hwnd; + DICOLORSET dics; + IUnknown FAR * lpUnkDDSTarget; +} DICONFIGUREDEVICESPARAMSW, *LPDICONFIGUREDEVICESPARAMSW; +#ifdef UNICODE +typedef DICONFIGUREDEVICESPARAMSW DICONFIGUREDEVICESPARAMS; +typedef LPDICONFIGUREDEVICESPARAMSW LPDICONFIGUREDEVICESPARAMS; +#else +typedef DICONFIGUREDEVICESPARAMSA DICONFIGUREDEVICESPARAMS; +typedef LPDICONFIGUREDEVICESPARAMSA LPDICONFIGUREDEVICESPARAMS; +#endif // UNICODE +typedef const DICONFIGUREDEVICESPARAMSA *LPCDICONFIGUREDEVICESPARAMSA; +typedef const DICONFIGUREDEVICESPARAMSW *LPCDICONFIGUREDEVICESPARAMSW; +#ifdef UNICODE +typedef DICONFIGUREDEVICESPARAMSW DICONFIGUREDEVICESPARAMS; +typedef LPCDICONFIGUREDEVICESPARAMSW LPCDICONFIGUREDEVICESPARAMS; +#else +typedef DICONFIGUREDEVICESPARAMSA DICONFIGUREDEVICESPARAMS; +typedef LPCDICONFIGUREDEVICESPARAMSA LPCDICONFIGUREDEVICESPARAMS; +#endif // UNICODE +typedef const DICONFIGUREDEVICESPARAMS *LPCDICONFIGUREDEVICESPARAMS; + + +#define DIDIFT_CONFIGURATION 0x00000001 +#define DIDIFT_OVERLAY 0x00000002 + +#define DIDAL_CENTERED 0x00000000 +#define DIDAL_LEFTALIGNED 0x00000001 +#define DIDAL_RIGHTALIGNED 0x00000002 +#define DIDAL_MIDDLE 0x00000000 +#define DIDAL_TOPALIGNED 0x00000004 +#define DIDAL_BOTTOMALIGNED 0x00000008 + +typedef struct _DIDEVICEIMAGEINFOA { + CHAR tszImagePath[MAX_PATH]; + DWORD dwFlags; + // These are valid if DIDIFT_OVERLAY is present in dwFlags. + DWORD dwViewID; + RECT rcOverlay; + DWORD dwObjID; + DWORD dwcValidPts; + POINT rgptCalloutLine[5]; + RECT rcCalloutRect; + DWORD dwTextAlign; +} DIDEVICEIMAGEINFOA, *LPDIDEVICEIMAGEINFOA; +typedef struct _DIDEVICEIMAGEINFOW { + WCHAR tszImagePath[MAX_PATH]; + DWORD dwFlags; + // These are valid if DIDIFT_OVERLAY is present in dwFlags. + DWORD dwViewID; + RECT rcOverlay; + DWORD dwObjID; + DWORD dwcValidPts; + POINT rgptCalloutLine[5]; + RECT rcCalloutRect; + DWORD dwTextAlign; +} DIDEVICEIMAGEINFOW, *LPDIDEVICEIMAGEINFOW; +#ifdef UNICODE +typedef DIDEVICEIMAGEINFOW DIDEVICEIMAGEINFO; +typedef LPDIDEVICEIMAGEINFOW LPDIDEVICEIMAGEINFO; +#else +typedef DIDEVICEIMAGEINFOA DIDEVICEIMAGEINFO; +typedef LPDIDEVICEIMAGEINFOA LPDIDEVICEIMAGEINFO; +#endif // UNICODE +typedef const DIDEVICEIMAGEINFOA *LPCDIDEVICEIMAGEINFOA; +typedef const DIDEVICEIMAGEINFOW *LPCDIDEVICEIMAGEINFOW; +#ifdef UNICODE +typedef DIDEVICEIMAGEINFOW DIDEVICEIMAGEINFO; +typedef LPCDIDEVICEIMAGEINFOW LPCDIDEVICEIMAGEINFO; +#else +typedef DIDEVICEIMAGEINFOA DIDEVICEIMAGEINFO; +typedef LPCDIDEVICEIMAGEINFOA LPCDIDEVICEIMAGEINFO; +#endif // UNICODE +typedef const DIDEVICEIMAGEINFO *LPCDIDEVICEIMAGEINFO; + +typedef struct _DIDEVICEIMAGEINFOHEADERA { + DWORD dwSize; + DWORD dwSizeImageInfo; + DWORD dwcViews; + DWORD dwcButtons; + DWORD dwcAxes; + DWORD dwcPOVs; + DWORD dwBufferSize; + DWORD dwBufferUsed; + LPDIDEVICEIMAGEINFOA lprgImageInfoArray; +} DIDEVICEIMAGEINFOHEADERA, *LPDIDEVICEIMAGEINFOHEADERA; +typedef struct _DIDEVICEIMAGEINFOHEADERW { + DWORD dwSize; + DWORD dwSizeImageInfo; + DWORD dwcViews; + DWORD dwcButtons; + DWORD dwcAxes; + DWORD dwcPOVs; + DWORD dwBufferSize; + DWORD dwBufferUsed; + LPDIDEVICEIMAGEINFOW lprgImageInfoArray; +} DIDEVICEIMAGEINFOHEADERW, *LPDIDEVICEIMAGEINFOHEADERW; +#ifdef UNICODE +typedef DIDEVICEIMAGEINFOHEADERW DIDEVICEIMAGEINFOHEADER; +typedef LPDIDEVICEIMAGEINFOHEADERW LPDIDEVICEIMAGEINFOHEADER; +#else +typedef DIDEVICEIMAGEINFOHEADERA DIDEVICEIMAGEINFOHEADER; +typedef LPDIDEVICEIMAGEINFOHEADERA LPDIDEVICEIMAGEINFOHEADER; +#endif // UNICODE +typedef const DIDEVICEIMAGEINFOHEADERA *LPCDIDEVICEIMAGEINFOHEADERA; +typedef const DIDEVICEIMAGEINFOHEADERW *LPCDIDEVICEIMAGEINFOHEADERW; +#ifdef UNICODE +typedef DIDEVICEIMAGEINFOHEADERW DIDEVICEIMAGEINFOHEADER; +typedef LPCDIDEVICEIMAGEINFOHEADERW LPCDIDEVICEIMAGEINFOHEADER; +#else +typedef DIDEVICEIMAGEINFOHEADERA DIDEVICEIMAGEINFOHEADER; +typedef LPCDIDEVICEIMAGEINFOHEADERA LPCDIDEVICEIMAGEINFOHEADER; +#endif // UNICODE +typedef const DIDEVICEIMAGEINFOHEADER *LPCDIDEVICEIMAGEINFOHEADER; + +#endif /* DIRECTINPUT_VERSION > 0x0700 */ + +#if(DIRECTINPUT_VERSION >= 0x0500) +/* These structures are defined for DirectX 3.0 compatibility */ + +typedef struct DIDEVICEOBJECTINSTANCE_DX3A { + DWORD dwSize; + GUID guidType; + DWORD dwOfs; + DWORD dwType; + DWORD dwFlags; + CHAR tszName[MAX_PATH]; +} DIDEVICEOBJECTINSTANCE_DX3A, *LPDIDEVICEOBJECTINSTANCE_DX3A; +typedef struct DIDEVICEOBJECTINSTANCE_DX3W { + DWORD dwSize; + GUID guidType; + DWORD dwOfs; + DWORD dwType; + DWORD dwFlags; + WCHAR tszName[MAX_PATH]; +} DIDEVICEOBJECTINSTANCE_DX3W, *LPDIDEVICEOBJECTINSTANCE_DX3W; +#ifdef UNICODE +typedef DIDEVICEOBJECTINSTANCE_DX3W DIDEVICEOBJECTINSTANCE_DX3; +typedef LPDIDEVICEOBJECTINSTANCE_DX3W LPDIDEVICEOBJECTINSTANCE_DX3; +#else +typedef DIDEVICEOBJECTINSTANCE_DX3A DIDEVICEOBJECTINSTANCE_DX3; +typedef LPDIDEVICEOBJECTINSTANCE_DX3A LPDIDEVICEOBJECTINSTANCE_DX3; +#endif // UNICODE +typedef const DIDEVICEOBJECTINSTANCE_DX3A *LPCDIDEVICEOBJECTINSTANCE_DX3A; +typedef const DIDEVICEOBJECTINSTANCE_DX3W *LPCDIDEVICEOBJECTINSTANCE_DX3W; +typedef const DIDEVICEOBJECTINSTANCE_DX3 *LPCDIDEVICEOBJECTINSTANCE_DX3; +#endif /* DIRECTINPUT_VERSION >= 0x0500 */ + +typedef struct DIDEVICEOBJECTINSTANCEA { + DWORD dwSize; + GUID guidType; + DWORD dwOfs; + DWORD dwType; + DWORD dwFlags; + CHAR tszName[MAX_PATH]; +#if(DIRECTINPUT_VERSION >= 0x0500) + DWORD dwFFMaxForce; + DWORD dwFFForceResolution; + WORD wCollectionNumber; + WORD wDesignatorIndex; + WORD wUsagePage; + WORD wUsage; + DWORD dwDimension; + WORD wExponent; + WORD wReportId; +#endif /* DIRECTINPUT_VERSION >= 0x0500 */ +} DIDEVICEOBJECTINSTANCEA, *LPDIDEVICEOBJECTINSTANCEA; +typedef struct DIDEVICEOBJECTINSTANCEW { + DWORD dwSize; + GUID guidType; + DWORD dwOfs; + DWORD dwType; + DWORD dwFlags; + WCHAR tszName[MAX_PATH]; +#if(DIRECTINPUT_VERSION >= 0x0500) + DWORD dwFFMaxForce; + DWORD dwFFForceResolution; + WORD wCollectionNumber; + WORD wDesignatorIndex; + WORD wUsagePage; + WORD wUsage; + DWORD dwDimension; + WORD wExponent; + WORD wReportId; +#endif /* DIRECTINPUT_VERSION >= 0x0500 */ +} DIDEVICEOBJECTINSTANCEW, *LPDIDEVICEOBJECTINSTANCEW; +#ifdef UNICODE +typedef DIDEVICEOBJECTINSTANCEW DIDEVICEOBJECTINSTANCE; +typedef LPDIDEVICEOBJECTINSTANCEW LPDIDEVICEOBJECTINSTANCE; +#else +typedef DIDEVICEOBJECTINSTANCEA DIDEVICEOBJECTINSTANCE; +typedef LPDIDEVICEOBJECTINSTANCEA LPDIDEVICEOBJECTINSTANCE; +#endif // UNICODE +typedef const DIDEVICEOBJECTINSTANCEA *LPCDIDEVICEOBJECTINSTANCEA; +typedef const DIDEVICEOBJECTINSTANCEW *LPCDIDEVICEOBJECTINSTANCEW; +typedef const DIDEVICEOBJECTINSTANCE *LPCDIDEVICEOBJECTINSTANCE; + +typedef BOOL (FAR PASCAL * LPDIENUMDEVICEOBJECTSCALLBACKA)(LPCDIDEVICEOBJECTINSTANCEA, LPVOID); +typedef BOOL (FAR PASCAL * LPDIENUMDEVICEOBJECTSCALLBACKW)(LPCDIDEVICEOBJECTINSTANCEW, LPVOID); +#ifdef UNICODE +#define LPDIENUMDEVICEOBJECTSCALLBACK LPDIENUMDEVICEOBJECTSCALLBACKW +#else +#define LPDIENUMDEVICEOBJECTSCALLBACK LPDIENUMDEVICEOBJECTSCALLBACKA +#endif // !UNICODE + +#if(DIRECTINPUT_VERSION >= 0x0500) +#define DIDOI_FFACTUATOR 0x00000001 +#define DIDOI_FFEFFECTTRIGGER 0x00000002 +#define DIDOI_POLLED 0x00008000 +#define DIDOI_ASPECTPOSITION 0x00000100 +#define DIDOI_ASPECTVELOCITY 0x00000200 +#define DIDOI_ASPECTACCEL 0x00000300 +#define DIDOI_ASPECTFORCE 0x00000400 +#define DIDOI_ASPECTMASK 0x00000F00 +#endif /* DIRECTINPUT_VERSION >= 0x0500 */ +#if(DIRECTINPUT_VERSION >= 0x050a) +#define DIDOI_GUIDISUSAGE 0x00010000 +#endif /* DIRECTINPUT_VERSION >= 0x050a */ + +typedef struct DIPROPHEADER { + DWORD dwSize; + DWORD dwHeaderSize; + DWORD dwObj; + DWORD dwHow; +} DIPROPHEADER, *LPDIPROPHEADER; +typedef const DIPROPHEADER *LPCDIPROPHEADER; + +#define DIPH_DEVICE 0 +#define DIPH_BYOFFSET 1 +#define DIPH_BYID 2 +#if(DIRECTINPUT_VERSION >= 0x050a) +#define DIPH_BYUSAGE 3 + +#define DIMAKEUSAGEDWORD(UsagePage, Usage) \ + (DWORD)MAKELONG(Usage, UsagePage) +#endif /* DIRECTINPUT_VERSION >= 0x050a */ + +typedef struct DIPROPDWORD { + DIPROPHEADER diph; + DWORD dwData; +} DIPROPDWORD, *LPDIPROPDWORD; +typedef const DIPROPDWORD *LPCDIPROPDWORD; + +#if(DIRECTINPUT_VERSION >= 0x0800) +typedef struct DIPROPPOINTER { + DIPROPHEADER diph; + UINT_PTR uData; +} DIPROPPOINTER, *LPDIPROPPOINTER; +typedef const DIPROPPOINTER *LPCDIPROPPOINTER; +#endif /* DIRECTINPUT_VERSION >= 0x0800 */ + +typedef struct DIPROPRANGE { + DIPROPHEADER diph; + LONG lMin; + LONG lMax; +} DIPROPRANGE, *LPDIPROPRANGE; +typedef const DIPROPRANGE *LPCDIPROPRANGE; + +#define DIPROPRANGE_NOMIN ((LONG)0x80000000) +#define DIPROPRANGE_NOMAX ((LONG)0x7FFFFFFF) + +#if(DIRECTINPUT_VERSION >= 0x050a) +typedef struct DIPROPCAL { + DIPROPHEADER diph; + LONG lMin; + LONG lCenter; + LONG lMax; +} DIPROPCAL, *LPDIPROPCAL; +typedef const DIPROPCAL *LPCDIPROPCAL; + +typedef struct DIPROPGUIDANDPATH { + DIPROPHEADER diph; + GUID guidClass; + WCHAR wszPath[MAX_PATH]; +} DIPROPGUIDANDPATH, *LPDIPROPGUIDANDPATH; +typedef const DIPROPGUIDANDPATH *LPCDIPROPGUIDANDPATH; + +typedef struct DIPROPSTRING { + DIPROPHEADER diph; + WCHAR wsz[MAX_PATH]; +} DIPROPSTRING, *LPDIPROPSTRING; +typedef const DIPROPSTRING *LPCDIPROPSTRING; + +#endif /* DIRECTINPUT_VERSION >= 0x050a */ + +#if(DIRECTINPUT_VERSION >= 0x0800) +#define MAXCPOINTSNUM 8 + +typedef struct _CPOINT +{ + LONG lP; // raw value + DWORD dwLog; // logical_value / max_logical_value * 10000 +} CPOINT, *PCPOINT; + +typedef struct DIPROPCPOINTS { + DIPROPHEADER diph; + DWORD dwCPointsNum; + CPOINT cp[MAXCPOINTSNUM]; +} DIPROPCPOINTS, *LPDIPROPCPOINTS; +typedef const DIPROPCPOINTS *LPCDIPROPCPOINTS; +#endif /* DIRECTINPUT_VERSION >= 0x0800 */ + + +#ifdef __cplusplus +#define MAKEDIPROP(prop) (*(const GUID *)(prop)) +#else +#define MAKEDIPROP(prop) ((REFGUID)(prop)) +#endif + +#define DIPROP_BUFFERSIZE MAKEDIPROP(1) + +#define DIPROP_AXISMODE MAKEDIPROP(2) + +#define DIPROPAXISMODE_ABS 0 +#define DIPROPAXISMODE_REL 1 + +#define DIPROP_GRANULARITY MAKEDIPROP(3) + +#define DIPROP_RANGE MAKEDIPROP(4) + +#define DIPROP_DEADZONE MAKEDIPROP(5) + +#define DIPROP_SATURATION MAKEDIPROP(6) + +#define DIPROP_FFGAIN MAKEDIPROP(7) + +#define DIPROP_FFLOAD MAKEDIPROP(8) + +#define DIPROP_AUTOCENTER MAKEDIPROP(9) + +#define DIPROPAUTOCENTER_OFF 0 +#define DIPROPAUTOCENTER_ON 1 + +#define DIPROP_CALIBRATIONMODE MAKEDIPROP(10) + +#define DIPROPCALIBRATIONMODE_COOKED 0 +#define DIPROPCALIBRATIONMODE_RAW 1 + +#if(DIRECTINPUT_VERSION >= 0x050a) +#define DIPROP_CALIBRATION MAKEDIPROP(11) + +#define DIPROP_GUIDANDPATH MAKEDIPROP(12) + +#define DIPROP_INSTANCENAME MAKEDIPROP(13) + +#define DIPROP_PRODUCTNAME MAKEDIPROP(14) +#endif /* DIRECTINPUT_VERSION >= 0x050a */ + +#if(DIRECTINPUT_VERSION >= 0x05b2) +#define DIPROP_JOYSTICKID MAKEDIPROP(15) + +#define DIPROP_GETPORTDISPLAYNAME MAKEDIPROP(16) + +#endif /* DIRECTINPUT_VERSION >= 0x05b2 */ + +#if(DIRECTINPUT_VERSION >= 0x0700) +#define DIPROP_PHYSICALRANGE MAKEDIPROP(18) + +#define DIPROP_LOGICALRANGE MAKEDIPROP(19) +#endif /* DIRECTINPUT_VERSION >= 0x0700 */ + +#if(DIRECTINPUT_VERSION >= 0x0800) +#define DIPROP_KEYNAME MAKEDIPROP(20) + +#define DIPROP_CPOINTS MAKEDIPROP(21) + +#define DIPROP_APPDATA MAKEDIPROP(22) + +#define DIPROP_SCANCODE MAKEDIPROP(23) + +#define DIPROP_VIDPID MAKEDIPROP(24) + +#define DIPROP_USERNAME MAKEDIPROP(25) + +#define DIPROP_TYPENAME MAKEDIPROP(26) +#endif /* DIRECTINPUT_VERSION >= 0x0800 */ + + +typedef struct DIDEVICEOBJECTDATA_DX3 { + DWORD dwOfs; + DWORD dwData; + DWORD dwTimeStamp; + DWORD dwSequence; +} DIDEVICEOBJECTDATA_DX3, *LPDIDEVICEOBJECTDATA_DX3; +typedef const DIDEVICEOBJECTDATA_DX3 *LPCDIDEVICEOBJECTDATA_DX; + +typedef struct DIDEVICEOBJECTDATA { + DWORD dwOfs; + DWORD dwData; + DWORD dwTimeStamp; + DWORD dwSequence; +#if(DIRECTINPUT_VERSION >= 0x0800) + UINT_PTR uAppData; +#endif /* DIRECTINPUT_VERSION >= 0x0800 */ +} DIDEVICEOBJECTDATA, *LPDIDEVICEOBJECTDATA; +typedef const DIDEVICEOBJECTDATA *LPCDIDEVICEOBJECTDATA; + +#define DIGDD_PEEK 0x00000001 + +#define DISEQUENCE_COMPARE(dwSequence1, cmp, dwSequence2) \ + ((int)((dwSequence1) - (dwSequence2)) cmp 0) +#define DISCL_EXCLUSIVE 0x00000001 +#define DISCL_NONEXCLUSIVE 0x00000002 +#define DISCL_FOREGROUND 0x00000004 +#define DISCL_BACKGROUND 0x00000008 +#define DISCL_NOWINKEY 0x00000010 + +#if(DIRECTINPUT_VERSION >= 0x0500) +/* These structures are defined for DirectX 3.0 compatibility */ + +typedef struct DIDEVICEINSTANCE_DX3A { + DWORD dwSize; + GUID guidInstance; + GUID guidProduct; + DWORD dwDevType; + CHAR tszInstanceName[MAX_PATH]; + CHAR tszProductName[MAX_PATH]; +} DIDEVICEINSTANCE_DX3A, *LPDIDEVICEINSTANCE_DX3A; +typedef struct DIDEVICEINSTANCE_DX3W { + DWORD dwSize; + GUID guidInstance; + GUID guidProduct; + DWORD dwDevType; + WCHAR tszInstanceName[MAX_PATH]; + WCHAR tszProductName[MAX_PATH]; +} DIDEVICEINSTANCE_DX3W, *LPDIDEVICEINSTANCE_DX3W; +#ifdef UNICODE +typedef DIDEVICEINSTANCE_DX3W DIDEVICEINSTANCE_DX3; +typedef LPDIDEVICEINSTANCE_DX3W LPDIDEVICEINSTANCE_DX3; +#else +typedef DIDEVICEINSTANCE_DX3A DIDEVICEINSTANCE_DX3; +typedef LPDIDEVICEINSTANCE_DX3A LPDIDEVICEINSTANCE_DX3; +#endif // UNICODE +typedef const DIDEVICEINSTANCE_DX3A *LPCDIDEVICEINSTANCE_DX3A; +typedef const DIDEVICEINSTANCE_DX3W *LPCDIDEVICEINSTANCE_DX3W; +typedef const DIDEVICEINSTANCE_DX3 *LPCDIDEVICEINSTANCE_DX3; +#endif /* DIRECTINPUT_VERSION >= 0x0500 */ + +typedef struct DIDEVICEINSTANCEA { + DWORD dwSize; + GUID guidInstance; + GUID guidProduct; + DWORD dwDevType; + CHAR tszInstanceName[MAX_PATH]; + CHAR tszProductName[MAX_PATH]; +#if(DIRECTINPUT_VERSION >= 0x0500) + GUID guidFFDriver; + WORD wUsagePage; + WORD wUsage; +#endif /* DIRECTINPUT_VERSION >= 0x0500 */ +} DIDEVICEINSTANCEA, *LPDIDEVICEINSTANCEA; +typedef struct DIDEVICEINSTANCEW { + DWORD dwSize; + GUID guidInstance; + GUID guidProduct; + DWORD dwDevType; + WCHAR tszInstanceName[MAX_PATH]; + WCHAR tszProductName[MAX_PATH]; +#if(DIRECTINPUT_VERSION >= 0x0500) + GUID guidFFDriver; + WORD wUsagePage; + WORD wUsage; +#endif /* DIRECTINPUT_VERSION >= 0x0500 */ +} DIDEVICEINSTANCEW, *LPDIDEVICEINSTANCEW; +#ifdef UNICODE +typedef DIDEVICEINSTANCEW DIDEVICEINSTANCE; +typedef LPDIDEVICEINSTANCEW LPDIDEVICEINSTANCE; +#else +typedef DIDEVICEINSTANCEA DIDEVICEINSTANCE; +typedef LPDIDEVICEINSTANCEA LPDIDEVICEINSTANCE; +#endif // UNICODE + +typedef const DIDEVICEINSTANCEA *LPCDIDEVICEINSTANCEA; +typedef const DIDEVICEINSTANCEW *LPCDIDEVICEINSTANCEW; +#ifdef UNICODE +typedef DIDEVICEINSTANCEW DIDEVICEINSTANCE; +typedef LPCDIDEVICEINSTANCEW LPCDIDEVICEINSTANCE; +#else +typedef DIDEVICEINSTANCEA DIDEVICEINSTANCE; +typedef LPCDIDEVICEINSTANCEA LPCDIDEVICEINSTANCE; +#endif // UNICODE +typedef const DIDEVICEINSTANCE *LPCDIDEVICEINSTANCE; + +#undef INTERFACE +#define INTERFACE IDirectInputDeviceW + +DECLARE_INTERFACE_(IDirectInputDeviceW, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInputDeviceW methods ***/ + STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE; + STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE; + STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE; + STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE; + STDMETHOD(Acquire)(THIS) PURE; + STDMETHOD(Unacquire)(THIS) PURE; + STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE; + STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE; + STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE; + STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE; + STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE; + STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE; +}; + +typedef struct IDirectInputDeviceW *LPDIRECTINPUTDEVICEW; + +#undef INTERFACE +#define INTERFACE IDirectInputDeviceA + +DECLARE_INTERFACE_(IDirectInputDeviceA, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInputDeviceA methods ***/ + STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE; + STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE; + STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE; + STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE; + STDMETHOD(Acquire)(THIS) PURE; + STDMETHOD(Unacquire)(THIS) PURE; + STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE; + STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE; + STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE; + STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE; + STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE; + STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE; +}; + +typedef struct IDirectInputDeviceA *LPDIRECTINPUTDEVICEA; + +#ifdef UNICODE +#define IID_IDirectInputDevice IID_IDirectInputDeviceW +#define IDirectInputDevice IDirectInputDeviceW +#define IDirectInputDeviceVtbl IDirectInputDeviceWVtbl +#else +#define IID_IDirectInputDevice IID_IDirectInputDeviceA +#define IDirectInputDevice IDirectInputDeviceA +#define IDirectInputDeviceVtbl IDirectInputDeviceAVtbl +#endif +typedef struct IDirectInputDevice *LPDIRECTINPUTDEVICE; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectInputDevice_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectInputDevice_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectInputDevice_Release(p) (p)->lpVtbl->Release(p) +#define IDirectInputDevice_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a) +#define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c) +#define IDirectInputDevice_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b) +#define IDirectInputDevice_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b) +#define IDirectInputDevice_Acquire(p) (p)->lpVtbl->Acquire(p) +#define IDirectInputDevice_Unacquire(p) (p)->lpVtbl->Unacquire(p) +#define IDirectInputDevice_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b) +#define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d) +#define IDirectInputDevice_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a) +#define IDirectInputDevice_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a) +#define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) +#define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c) +#define IDirectInputDevice_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a) +#define IDirectInputDevice_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b) +#define IDirectInputDevice_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) +#else +#define IDirectInputDevice_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectInputDevice_AddRef(p) (p)->AddRef() +#define IDirectInputDevice_Release(p) (p)->Release() +#define IDirectInputDevice_GetCapabilities(p,a) (p)->GetCapabilities(a) +#define IDirectInputDevice_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c) +#define IDirectInputDevice_GetProperty(p,a,b) (p)->GetProperty(a,b) +#define IDirectInputDevice_SetProperty(p,a,b) (p)->SetProperty(a,b) +#define IDirectInputDevice_Acquire(p) (p)->Acquire() +#define IDirectInputDevice_Unacquire(p) (p)->Unacquire() +#define IDirectInputDevice_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b) +#define IDirectInputDevice_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d) +#define IDirectInputDevice_SetDataFormat(p,a) (p)->SetDataFormat(a) +#define IDirectInputDevice_SetEventNotification(p,a) (p)->SetEventNotification(a) +#define IDirectInputDevice_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) +#define IDirectInputDevice_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c) +#define IDirectInputDevice_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a) +#define IDirectInputDevice_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b) +#define IDirectInputDevice_Initialize(p,a,b,c) (p)->Initialize(a,b,c) +#endif + +#endif /* DIJ_RINGZERO */ + + +#if(DIRECTINPUT_VERSION >= 0x0500) + +#define DISFFC_RESET 0x00000001 +#define DISFFC_STOPALL 0x00000002 +#define DISFFC_PAUSE 0x00000004 +#define DISFFC_CONTINUE 0x00000008 +#define DISFFC_SETACTUATORSON 0x00000010 +#define DISFFC_SETACTUATORSOFF 0x00000020 + +#define DIGFFS_EMPTY 0x00000001 +#define DIGFFS_STOPPED 0x00000002 +#define DIGFFS_PAUSED 0x00000004 +#define DIGFFS_ACTUATORSON 0x00000010 +#define DIGFFS_ACTUATORSOFF 0x00000020 +#define DIGFFS_POWERON 0x00000040 +#define DIGFFS_POWEROFF 0x00000080 +#define DIGFFS_SAFETYSWITCHON 0x00000100 +#define DIGFFS_SAFETYSWITCHOFF 0x00000200 +#define DIGFFS_USERFFSWITCHON 0x00000400 +#define DIGFFS_USERFFSWITCHOFF 0x00000800 +#define DIGFFS_DEVICELOST 0x80000000 + +#ifndef DIJ_RINGZERO + +typedef struct DIEFFECTINFOA { + DWORD dwSize; + GUID guid; + DWORD dwEffType; + DWORD dwStaticParams; + DWORD dwDynamicParams; + CHAR tszName[MAX_PATH]; +} DIEFFECTINFOA, *LPDIEFFECTINFOA; +typedef struct DIEFFECTINFOW { + DWORD dwSize; + GUID guid; + DWORD dwEffType; + DWORD dwStaticParams; + DWORD dwDynamicParams; + WCHAR tszName[MAX_PATH]; +} DIEFFECTINFOW, *LPDIEFFECTINFOW; +#ifdef UNICODE +typedef DIEFFECTINFOW DIEFFECTINFO; +typedef LPDIEFFECTINFOW LPDIEFFECTINFO; +#else +typedef DIEFFECTINFOA DIEFFECTINFO; +typedef LPDIEFFECTINFOA LPDIEFFECTINFO; +#endif // UNICODE +typedef const DIEFFECTINFOA *LPCDIEFFECTINFOA; +typedef const DIEFFECTINFOW *LPCDIEFFECTINFOW; +typedef const DIEFFECTINFO *LPCDIEFFECTINFO; + +#define DISDD_CONTINUE 0x00000001 + +typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSCALLBACKA)(LPCDIEFFECTINFOA, LPVOID); +typedef BOOL (FAR PASCAL * LPDIENUMEFFECTSCALLBACKW)(LPCDIEFFECTINFOW, LPVOID); +#ifdef UNICODE +#define LPDIENUMEFFECTSCALLBACK LPDIENUMEFFECTSCALLBACKW +#else +#define LPDIENUMEFFECTSCALLBACK LPDIENUMEFFECTSCALLBACKA +#endif // !UNICODE +typedef BOOL (FAR PASCAL * LPDIENUMCREATEDEFFECTOBJECTSCALLBACK)(LPDIRECTINPUTEFFECT, LPVOID); + +#undef INTERFACE +#define INTERFACE IDirectInputDevice2W + +DECLARE_INTERFACE_(IDirectInputDevice2W, IDirectInputDeviceW) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInputDeviceW methods ***/ + STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE; + STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE; + STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE; + STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE; + STDMETHOD(Acquire)(THIS) PURE; + STDMETHOD(Unacquire)(THIS) PURE; + STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE; + STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE; + STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE; + STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE; + STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE; + STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE; + + /*** IDirectInputDevice2W methods ***/ + STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE; + STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,LPVOID,DWORD) PURE; + STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW,REFGUID) PURE; + STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE; + STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE; + STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE; + STDMETHOD(Poll)(THIS) PURE; + STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE; +}; + +typedef struct IDirectInputDevice2W *LPDIRECTINPUTDEVICE2W; + +#undef INTERFACE +#define INTERFACE IDirectInputDevice2A + +DECLARE_INTERFACE_(IDirectInputDevice2A, IDirectInputDeviceA) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInputDeviceA methods ***/ + STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE; + STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE; + STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE; + STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE; + STDMETHOD(Acquire)(THIS) PURE; + STDMETHOD(Unacquire)(THIS) PURE; + STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE; + STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE; + STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE; + STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE; + STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE; + STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE; + + /*** IDirectInputDevice2A methods ***/ + STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE; + STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,LPVOID,DWORD) PURE; + STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA,REFGUID) PURE; + STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE; + STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE; + STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE; + STDMETHOD(Poll)(THIS) PURE; + STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE; +}; + +typedef struct IDirectInputDevice2A *LPDIRECTINPUTDEVICE2A; + +#ifdef UNICODE +#define IID_IDirectInputDevice2 IID_IDirectInputDevice2W +#define IDirectInputDevice2 IDirectInputDevice2W +#define IDirectInputDevice2Vtbl IDirectInputDevice2WVtbl +#else +#define IID_IDirectInputDevice2 IID_IDirectInputDevice2A +#define IDirectInputDevice2 IDirectInputDevice2A +#define IDirectInputDevice2Vtbl IDirectInputDevice2AVtbl +#endif +typedef struct IDirectInputDevice2 *LPDIRECTINPUTDEVICE2; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectInputDevice2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectInputDevice2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectInputDevice2_Release(p) (p)->lpVtbl->Release(p) +#define IDirectInputDevice2_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a) +#define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c) +#define IDirectInputDevice2_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b) +#define IDirectInputDevice2_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b) +#define IDirectInputDevice2_Acquire(p) (p)->lpVtbl->Acquire(p) +#define IDirectInputDevice2_Unacquire(p) (p)->lpVtbl->Unacquire(p) +#define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b) +#define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d) +#define IDirectInputDevice2_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a) +#define IDirectInputDevice2_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a) +#define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) +#define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c) +#define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a) +#define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b) +#define IDirectInputDevice2_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) +#define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d) +#define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c) +#define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b) +#define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a) +#define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a) +#define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c) +#define IDirectInputDevice2_Escape(p,a) (p)->lpVtbl->Escape(p,a) +#define IDirectInputDevice2_Poll(p) (p)->lpVtbl->Poll(p) +#define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d) +#else +#define IDirectInputDevice2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectInputDevice2_AddRef(p) (p)->AddRef() +#define IDirectInputDevice2_Release(p) (p)->Release() +#define IDirectInputDevice2_GetCapabilities(p,a) (p)->GetCapabilities(a) +#define IDirectInputDevice2_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c) +#define IDirectInputDevice2_GetProperty(p,a,b) (p)->GetProperty(a,b) +#define IDirectInputDevice2_SetProperty(p,a,b) (p)->SetProperty(a,b) +#define IDirectInputDevice2_Acquire(p) (p)->Acquire() +#define IDirectInputDevice2_Unacquire(p) (p)->Unacquire() +#define IDirectInputDevice2_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b) +#define IDirectInputDevice2_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d) +#define IDirectInputDevice2_SetDataFormat(p,a) (p)->SetDataFormat(a) +#define IDirectInputDevice2_SetEventNotification(p,a) (p)->SetEventNotification(a) +#define IDirectInputDevice2_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) +#define IDirectInputDevice2_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c) +#define IDirectInputDevice2_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a) +#define IDirectInputDevice2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b) +#define IDirectInputDevice2_Initialize(p,a,b,c) (p)->Initialize(a,b,c) +#define IDirectInputDevice2_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d) +#define IDirectInputDevice2_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c) +#define IDirectInputDevice2_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b) +#define IDirectInputDevice2_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a) +#define IDirectInputDevice2_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a) +#define IDirectInputDevice2_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c) +#define IDirectInputDevice2_Escape(p,a) (p)->Escape(a) +#define IDirectInputDevice2_Poll(p) (p)->Poll() +#define IDirectInputDevice2_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d) +#endif + +#endif /* DIJ_RINGZERO */ + +#endif /* DIRECTINPUT_VERSION >= 0x0500 */ + +#if(DIRECTINPUT_VERSION >= 0x0700) +#define DIFEF_DEFAULT 0x00000000 +#define DIFEF_INCLUDENONSTANDARD 0x00000001 +#define DIFEF_MODIFYIFNEEDED 0x00000010 + +#ifndef DIJ_RINGZERO + +#undef INTERFACE +#define INTERFACE IDirectInputDevice7W + +DECLARE_INTERFACE_(IDirectInputDevice7W, IDirectInputDevice2W) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInputDevice2W methods ***/ + STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE; + STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE; + STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE; + STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE; + STDMETHOD(Acquire)(THIS) PURE; + STDMETHOD(Unacquire)(THIS) PURE; + STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE; + STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE; + STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE; + STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE; + STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE; + STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE; + STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE; + STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,LPVOID,DWORD) PURE; + STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW,REFGUID) PURE; + STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE; + STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE; + STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE; + STDMETHOD(Poll)(THIS) PURE; + STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE; + + /*** IDirectInputDevice7W methods ***/ + STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE; +}; + +typedef struct IDirectInputDevice7W *LPDIRECTINPUTDEVICE7W; + +#undef INTERFACE +#define INTERFACE IDirectInputDevice7A + +DECLARE_INTERFACE_(IDirectInputDevice7A, IDirectInputDevice2A) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInputDevice2A methods ***/ + STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE; + STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE; + STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE; + STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE; + STDMETHOD(Acquire)(THIS) PURE; + STDMETHOD(Unacquire)(THIS) PURE; + STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE; + STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE; + STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE; + STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE; + STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE; + STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE; + STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE; + STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,LPVOID,DWORD) PURE; + STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA,REFGUID) PURE; + STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE; + STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE; + STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE; + STDMETHOD(Poll)(THIS) PURE; + STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE; + + /*** IDirectInputDevice7A methods ***/ + STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE; +}; + +typedef struct IDirectInputDevice7A *LPDIRECTINPUTDEVICE7A; + +#ifdef UNICODE +#define IID_IDirectInputDevice7 IID_IDirectInputDevice7W +#define IDirectInputDevice7 IDirectInputDevice7W +#define IDirectInputDevice7Vtbl IDirectInputDevice7WVtbl +#else +#define IID_IDirectInputDevice7 IID_IDirectInputDevice7A +#define IDirectInputDevice7 IDirectInputDevice7A +#define IDirectInputDevice7Vtbl IDirectInputDevice7AVtbl +#endif +typedef struct IDirectInputDevice7 *LPDIRECTINPUTDEVICE7; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectInputDevice7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectInputDevice7_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectInputDevice7_Release(p) (p)->lpVtbl->Release(p) +#define IDirectInputDevice7_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a) +#define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c) +#define IDirectInputDevice7_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b) +#define IDirectInputDevice7_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b) +#define IDirectInputDevice7_Acquire(p) (p)->lpVtbl->Acquire(p) +#define IDirectInputDevice7_Unacquire(p) (p)->lpVtbl->Unacquire(p) +#define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b) +#define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d) +#define IDirectInputDevice7_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a) +#define IDirectInputDevice7_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a) +#define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) +#define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c) +#define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a) +#define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b) +#define IDirectInputDevice7_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) +#define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d) +#define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c) +#define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b) +#define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a) +#define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a) +#define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c) +#define IDirectInputDevice7_Escape(p,a) (p)->lpVtbl->Escape(p,a) +#define IDirectInputDevice7_Poll(p) (p)->lpVtbl->Poll(p) +#define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d) +#define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d) +#define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d) +#else +#define IDirectInputDevice7_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectInputDevice7_AddRef(p) (p)->AddRef() +#define IDirectInputDevice7_Release(p) (p)->Release() +#define IDirectInputDevice7_GetCapabilities(p,a) (p)->GetCapabilities(a) +#define IDirectInputDevice7_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c) +#define IDirectInputDevice7_GetProperty(p,a,b) (p)->GetProperty(a,b) +#define IDirectInputDevice7_SetProperty(p,a,b) (p)->SetProperty(a,b) +#define IDirectInputDevice7_Acquire(p) (p)->Acquire() +#define IDirectInputDevice7_Unacquire(p) (p)->Unacquire() +#define IDirectInputDevice7_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b) +#define IDirectInputDevice7_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d) +#define IDirectInputDevice7_SetDataFormat(p,a) (p)->SetDataFormat(a) +#define IDirectInputDevice7_SetEventNotification(p,a) (p)->SetEventNotification(a) +#define IDirectInputDevice7_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) +#define IDirectInputDevice7_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c) +#define IDirectInputDevice7_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a) +#define IDirectInputDevice7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b) +#define IDirectInputDevice7_Initialize(p,a,b,c) (p)->Initialize(a,b,c) +#define IDirectInputDevice7_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d) +#define IDirectInputDevice7_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c) +#define IDirectInputDevice7_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b) +#define IDirectInputDevice7_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a) +#define IDirectInputDevice7_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a) +#define IDirectInputDevice7_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c) +#define IDirectInputDevice7_Escape(p,a) (p)->Escape(a) +#define IDirectInputDevice7_Poll(p) (p)->Poll() +#define IDirectInputDevice7_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d) +#define IDirectInputDevice7_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d) +#define IDirectInputDevice7_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d) +#endif + +#endif /* DIJ_RINGZERO */ + +#endif /* DIRECTINPUT_VERSION >= 0x0700 */ + +#if(DIRECTINPUT_VERSION >= 0x0800) + +#ifndef DIJ_RINGZERO + +#undef INTERFACE +#define INTERFACE IDirectInputDevice8W + +DECLARE_INTERFACE_(IDirectInputDevice8W, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInputDevice8W methods ***/ + STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE; + STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKW,LPVOID,DWORD) PURE; + STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE; + STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE; + STDMETHOD(Acquire)(THIS) PURE; + STDMETHOD(Unacquire)(THIS) PURE; + STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE; + STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE; + STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE; + STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEW,DWORD,DWORD) PURE; + STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEW) PURE; + STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE; + STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE; + STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKW,LPVOID,DWORD) PURE; + STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOW,REFGUID) PURE; + STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE; + STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE; + STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE; + STDMETHOD(Poll)(THIS) PURE; + STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE; + STDMETHOD(EnumEffectsInFile)(THIS_ LPCWSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(WriteEffectToFile)(THIS_ LPCWSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE; + STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATW,LPCWSTR,DWORD) PURE; + STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATW,LPCWSTR,DWORD) PURE; + STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERW) PURE; +}; + +typedef struct IDirectInputDevice8W *LPDIRECTINPUTDEVICE8W; + +#undef INTERFACE +#define INTERFACE IDirectInputDevice8A + +DECLARE_INTERFACE_(IDirectInputDevice8A, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInputDevice8A methods ***/ + STDMETHOD(GetCapabilities)(THIS_ LPDIDEVCAPS) PURE; + STDMETHOD(EnumObjects)(THIS_ LPDIENUMDEVICEOBJECTSCALLBACKA,LPVOID,DWORD) PURE; + STDMETHOD(GetProperty)(THIS_ REFGUID,LPDIPROPHEADER) PURE; + STDMETHOD(SetProperty)(THIS_ REFGUID,LPCDIPROPHEADER) PURE; + STDMETHOD(Acquire)(THIS) PURE; + STDMETHOD(Unacquire)(THIS) PURE; + STDMETHOD(GetDeviceState)(THIS_ DWORD,LPVOID) PURE; + STDMETHOD(GetDeviceData)(THIS_ DWORD,LPDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE; + STDMETHOD(SetDataFormat)(THIS_ LPCDIDATAFORMAT) PURE; + STDMETHOD(SetEventNotification)(THIS_ HANDLE) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(GetObjectInfo)(THIS_ LPDIDEVICEOBJECTINSTANCEA,DWORD,DWORD) PURE; + STDMETHOD(GetDeviceInfo)(THIS_ LPDIDEVICEINSTANCEA) PURE; + STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD,REFGUID) PURE; + STDMETHOD(CreateEffect)(THIS_ REFGUID,LPCDIEFFECT,LPDIRECTINPUTEFFECT *,LPUNKNOWN) PURE; + STDMETHOD(EnumEffects)(THIS_ LPDIENUMEFFECTSCALLBACKA,LPVOID,DWORD) PURE; + STDMETHOD(GetEffectInfo)(THIS_ LPDIEFFECTINFOA,REFGUID) PURE; + STDMETHOD(GetForceFeedbackState)(THIS_ LPDWORD) PURE; + STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD) PURE; + STDMETHOD(EnumCreatedEffectObjects)(THIS_ LPDIENUMCREATEDEFFECTOBJECTSCALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(Escape)(THIS_ LPDIEFFESCAPE) PURE; + STDMETHOD(Poll)(THIS) PURE; + STDMETHOD(SendDeviceData)(THIS_ DWORD,LPCDIDEVICEOBJECTDATA,LPDWORD,DWORD) PURE; + STDMETHOD(EnumEffectsInFile)(THIS_ LPCSTR,LPDIENUMEFFECTSINFILECALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(WriteEffectToFile)(THIS_ LPCSTR,DWORD,LPDIFILEEFFECT,DWORD) PURE; + STDMETHOD(BuildActionMap)(THIS_ LPDIACTIONFORMATA,LPCSTR,DWORD) PURE; + STDMETHOD(SetActionMap)(THIS_ LPDIACTIONFORMATA,LPCSTR,DWORD) PURE; + STDMETHOD(GetImageInfo)(THIS_ LPDIDEVICEIMAGEINFOHEADERA) PURE; +}; + +typedef struct IDirectInputDevice8A *LPDIRECTINPUTDEVICE8A; + +#ifdef UNICODE +#define IID_IDirectInputDevice8 IID_IDirectInputDevice8W +#define IDirectInputDevice8 IDirectInputDevice8W +#define IDirectInputDevice8Vtbl IDirectInputDevice8WVtbl +#else +#define IID_IDirectInputDevice8 IID_IDirectInputDevice8A +#define IDirectInputDevice8 IDirectInputDevice8A +#define IDirectInputDevice8Vtbl IDirectInputDevice8AVtbl +#endif +typedef struct IDirectInputDevice8 *LPDIRECTINPUTDEVICE8; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectInputDevice8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectInputDevice8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectInputDevice8_Release(p) (p)->lpVtbl->Release(p) +#define IDirectInputDevice8_GetCapabilities(p,a) (p)->lpVtbl->GetCapabilities(p,a) +#define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->lpVtbl->EnumObjects(p,a,b,c) +#define IDirectInputDevice8_GetProperty(p,a,b) (p)->lpVtbl->GetProperty(p,a,b) +#define IDirectInputDevice8_SetProperty(p,a,b) (p)->lpVtbl->SetProperty(p,a,b) +#define IDirectInputDevice8_Acquire(p) (p)->lpVtbl->Acquire(p) +#define IDirectInputDevice8_Unacquire(p) (p)->lpVtbl->Unacquire(p) +#define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->lpVtbl->GetDeviceState(p,a,b) +#define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->lpVtbl->GetDeviceData(p,a,b,c,d) +#define IDirectInputDevice8_SetDataFormat(p,a) (p)->lpVtbl->SetDataFormat(p,a) +#define IDirectInputDevice8_SetEventNotification(p,a) (p)->lpVtbl->SetEventNotification(p,a) +#define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) +#define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->lpVtbl->GetObjectInfo(p,a,b,c) +#define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->lpVtbl->GetDeviceInfo(p,a) +#define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b) +#define IDirectInputDevice8_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) +#define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->lpVtbl->CreateEffect(p,a,b,c,d) +#define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->lpVtbl->EnumEffects(p,a,b,c) +#define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->lpVtbl->GetEffectInfo(p,a,b) +#define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->lpVtbl->GetForceFeedbackState(p,a) +#define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->lpVtbl->SendForceFeedbackCommand(p,a) +#define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->lpVtbl->EnumCreatedEffectObjects(p,a,b,c) +#define IDirectInputDevice8_Escape(p,a) (p)->lpVtbl->Escape(p,a) +#define IDirectInputDevice8_Poll(p) (p)->lpVtbl->Poll(p) +#define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->lpVtbl->SendDeviceData(p,a,b,c,d) +#define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->lpVtbl->EnumEffectsInFile(p,a,b,c,d) +#define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->lpVtbl->WriteEffectToFile(p,a,b,c,d) +#define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->lpVtbl->BuildActionMap(p,a,b,c) +#define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->lpVtbl->SetActionMap(p,a,b,c) +#define IDirectInputDevice8_GetImageInfo(p,a) (p)->lpVtbl->GetImageInfo(p,a) +#else +#define IDirectInputDevice8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectInputDevice8_AddRef(p) (p)->AddRef() +#define IDirectInputDevice8_Release(p) (p)->Release() +#define IDirectInputDevice8_GetCapabilities(p,a) (p)->GetCapabilities(a) +#define IDirectInputDevice8_EnumObjects(p,a,b,c) (p)->EnumObjects(a,b,c) +#define IDirectInputDevice8_GetProperty(p,a,b) (p)->GetProperty(a,b) +#define IDirectInputDevice8_SetProperty(p,a,b) (p)->SetProperty(a,b) +#define IDirectInputDevice8_Acquire(p) (p)->Acquire() +#define IDirectInputDevice8_Unacquire(p) (p)->Unacquire() +#define IDirectInputDevice8_GetDeviceState(p,a,b) (p)->GetDeviceState(a,b) +#define IDirectInputDevice8_GetDeviceData(p,a,b,c,d) (p)->GetDeviceData(a,b,c,d) +#define IDirectInputDevice8_SetDataFormat(p,a) (p)->SetDataFormat(a) +#define IDirectInputDevice8_SetEventNotification(p,a) (p)->SetEventNotification(a) +#define IDirectInputDevice8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) +#define IDirectInputDevice8_GetObjectInfo(p,a,b,c) (p)->GetObjectInfo(a,b,c) +#define IDirectInputDevice8_GetDeviceInfo(p,a) (p)->GetDeviceInfo(a) +#define IDirectInputDevice8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b) +#define IDirectInputDevice8_Initialize(p,a,b,c) (p)->Initialize(a,b,c) +#define IDirectInputDevice8_CreateEffect(p,a,b,c,d) (p)->CreateEffect(a,b,c,d) +#define IDirectInputDevice8_EnumEffects(p,a,b,c) (p)->EnumEffects(a,b,c) +#define IDirectInputDevice8_GetEffectInfo(p,a,b) (p)->GetEffectInfo(a,b) +#define IDirectInputDevice8_GetForceFeedbackState(p,a) (p)->GetForceFeedbackState(a) +#define IDirectInputDevice8_SendForceFeedbackCommand(p,a) (p)->SendForceFeedbackCommand(a) +#define IDirectInputDevice8_EnumCreatedEffectObjects(p,a,b,c) (p)->EnumCreatedEffectObjects(a,b,c) +#define IDirectInputDevice8_Escape(p,a) (p)->Escape(a) +#define IDirectInputDevice8_Poll(p) (p)->Poll() +#define IDirectInputDevice8_SendDeviceData(p,a,b,c,d) (p)->SendDeviceData(a,b,c,d) +#define IDirectInputDevice8_EnumEffectsInFile(p,a,b,c,d) (p)->EnumEffectsInFile(a,b,c,d) +#define IDirectInputDevice8_WriteEffectToFile(p,a,b,c,d) (p)->WriteEffectToFile(a,b,c,d) +#define IDirectInputDevice8_BuildActionMap(p,a,b,c) (p)->BuildActionMap(a,b,c) +#define IDirectInputDevice8_SetActionMap(p,a,b,c) (p)->SetActionMap(a,b,c) +#define IDirectInputDevice8_GetImageInfo(p,a) (p)->GetImageInfo(a) +#endif + +#endif /* DIJ_RINGZERO */ + +#endif /* DIRECTINPUT_VERSION >= 0x0800 */ + +/**************************************************************************** + * + * Mouse + * + ****************************************************************************/ + +#ifndef DIJ_RINGZERO + +typedef struct _DIMOUSESTATE { + LONG lX; + LONG lY; + LONG lZ; + BYTE rgbButtons[4]; +} DIMOUSESTATE, *LPDIMOUSESTATE; + +#if DIRECTINPUT_VERSION >= 0x0700 +typedef struct _DIMOUSESTATE2 { + LONG lX; + LONG lY; + LONG lZ; + BYTE rgbButtons[8]; +} DIMOUSESTATE2, *LPDIMOUSESTATE2; +#endif + + +#define DIMOFS_X FIELD_OFFSET(DIMOUSESTATE, lX) +#define DIMOFS_Y FIELD_OFFSET(DIMOUSESTATE, lY) +#define DIMOFS_Z FIELD_OFFSET(DIMOUSESTATE, lZ) +#define DIMOFS_BUTTON0 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 0) +#define DIMOFS_BUTTON1 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 1) +#define DIMOFS_BUTTON2 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 2) +#define DIMOFS_BUTTON3 (FIELD_OFFSET(DIMOUSESTATE, rgbButtons) + 3) +#if (DIRECTINPUT_VERSION >= 0x0700) +#define DIMOFS_BUTTON4 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 4) +#define DIMOFS_BUTTON5 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 5) +#define DIMOFS_BUTTON6 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 6) +#define DIMOFS_BUTTON7 (FIELD_OFFSET(DIMOUSESTATE2, rgbButtons) + 7) +#endif +#endif /* DIJ_RINGZERO */ + +/**************************************************************************** + * + * Keyboard + * + ****************************************************************************/ + +#ifndef DIJ_RINGZERO + +/**************************************************************************** + * + * DirectInput keyboard scan codes + * + ****************************************************************************/ +#define DIK_ESCAPE 0x01 +#define DIK_1 0x02 +#define DIK_2 0x03 +#define DIK_3 0x04 +#define DIK_4 0x05 +#define DIK_5 0x06 +#define DIK_6 0x07 +#define DIK_7 0x08 +#define DIK_8 0x09 +#define DIK_9 0x0A +#define DIK_0 0x0B +#define DIK_MINUS 0x0C /* - on main keyboard */ +#define DIK_EQUALS 0x0D +#define DIK_BACK 0x0E /* backspace */ +#define DIK_TAB 0x0F +#define DIK_Q 0x10 +#define DIK_W 0x11 +#define DIK_E 0x12 +#define DIK_R 0x13 +#define DIK_T 0x14 +#define DIK_Y 0x15 +#define DIK_U 0x16 +#define DIK_I 0x17 +#define DIK_O 0x18 +#define DIK_P 0x19 +#define DIK_LBRACKET 0x1A +#define DIK_RBRACKET 0x1B +#define DIK_RETURN 0x1C /* Enter on main keyboard */ +#define DIK_LCONTROL 0x1D +#define DIK_A 0x1E +#define DIK_S 0x1F +#define DIK_D 0x20 +#define DIK_F 0x21 +#define DIK_G 0x22 +#define DIK_H 0x23 +#define DIK_J 0x24 +#define DIK_K 0x25 +#define DIK_L 0x26 +#define DIK_SEMICOLON 0x27 +#define DIK_APOSTROPHE 0x28 +#define DIK_GRAVE 0x29 /* accent grave */ +#define DIK_LSHIFT 0x2A +#define DIK_BACKSLASH 0x2B +#define DIK_Z 0x2C +#define DIK_X 0x2D +#define DIK_C 0x2E +#define DIK_V 0x2F +#define DIK_B 0x30 +#define DIK_N 0x31 +#define DIK_M 0x32 +#define DIK_COMMA 0x33 +#define DIK_PERIOD 0x34 /* . on main keyboard */ +#define DIK_SLASH 0x35 /* / on main keyboard */ +#define DIK_RSHIFT 0x36 +#define DIK_MULTIPLY 0x37 /* * on numeric keypad */ +#define DIK_LMENU 0x38 /* left Alt */ +#define DIK_SPACE 0x39 +#define DIK_CAPITAL 0x3A +#define DIK_F1 0x3B +#define DIK_F2 0x3C +#define DIK_F3 0x3D +#define DIK_F4 0x3E +#define DIK_F5 0x3F +#define DIK_F6 0x40 +#define DIK_F7 0x41 +#define DIK_F8 0x42 +#define DIK_F9 0x43 +#define DIK_F10 0x44 +#define DIK_NUMLOCK 0x45 +#define DIK_SCROLL 0x46 /* Scroll Lock */ +#define DIK_NUMPAD7 0x47 +#define DIK_NUMPAD8 0x48 +#define DIK_NUMPAD9 0x49 +#define DIK_SUBTRACT 0x4A /* - on numeric keypad */ +#define DIK_NUMPAD4 0x4B +#define DIK_NUMPAD5 0x4C +#define DIK_NUMPAD6 0x4D +#define DIK_ADD 0x4E /* + on numeric keypad */ +#define DIK_NUMPAD1 0x4F +#define DIK_NUMPAD2 0x50 +#define DIK_NUMPAD3 0x51 +#define DIK_NUMPAD0 0x52 +#define DIK_DECIMAL 0x53 /* . on numeric keypad */ +#define DIK_OEM_102 0x56 /* < > | on UK/Germany keyboards */ +#define DIK_F11 0x57 +#define DIK_F12 0x58 +#define DIK_F13 0x64 /* (NEC PC98) */ +#define DIK_F14 0x65 /* (NEC PC98) */ +#define DIK_F15 0x66 /* (NEC PC98) */ +#define DIK_KANA 0x70 /* (Japanese keyboard) */ +#define DIK_ABNT_C1 0x73 /* / ? on Portugese (Brazilian) keyboards */ +#define DIK_CONVERT 0x79 /* (Japanese keyboard) */ +#define DIK_NOCONVERT 0x7B /* (Japanese keyboard) */ +#define DIK_YEN 0x7D /* (Japanese keyboard) */ +#define DIK_ABNT_C2 0x7E /* Numpad . on Portugese (Brazilian) keyboards */ +#define DIK_NUMPADEQUALS 0x8D /* = on numeric keypad (NEC PC98) */ +#define DIK_PREVTRACK 0x90 /* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */ +#define DIK_AT 0x91 /* (NEC PC98) */ +#define DIK_COLON 0x92 /* (NEC PC98) */ +#define DIK_UNDERLINE 0x93 /* (NEC PC98) */ +#define DIK_KANJI 0x94 /* (Japanese keyboard) */ +#define DIK_STOP 0x95 /* (NEC PC98) */ +#define DIK_AX 0x96 /* (Japan AX) */ +#define DIK_UNLABELED 0x97 /* (J3100) */ +#define DIK_NEXTTRACK 0x99 /* Next Track */ +#define DIK_NUMPADENTER 0x9C /* Enter on numeric keypad */ +#define DIK_RCONTROL 0x9D +#define DIK_MUTE 0xA0 /* Mute */ +#define DIK_CALCULATOR 0xA1 /* Calculator */ +#define DIK_PLAYPAUSE 0xA2 /* Play / Pause */ +#define DIK_MEDIASTOP 0xA4 /* Media Stop */ +#define DIK_VOLUMEDOWN 0xAE /* Volume - */ +#define DIK_VOLUMEUP 0xB0 /* Volume + */ +#define DIK_WEBHOME 0xB2 /* Web home */ +#define DIK_NUMPADCOMMA 0xB3 /* , on numeric keypad (NEC PC98) */ +#define DIK_DIVIDE 0xB5 /* / on numeric keypad */ +#define DIK_SYSRQ 0xB7 +#define DIK_RMENU 0xB8 /* right Alt */ +#define DIK_PAUSE 0xC5 /* Pause */ +#define DIK_HOME 0xC7 /* Home on arrow keypad */ +#define DIK_UP 0xC8 /* UpArrow on arrow keypad */ +#define DIK_PRIOR 0xC9 /* PgUp on arrow keypad */ +#define DIK_LEFT 0xCB /* LeftArrow on arrow keypad */ +#define DIK_RIGHT 0xCD /* RightArrow on arrow keypad */ +#define DIK_END 0xCF /* End on arrow keypad */ +#define DIK_DOWN 0xD0 /* DownArrow on arrow keypad */ +#define DIK_NEXT 0xD1 /* PgDn on arrow keypad */ +#define DIK_INSERT 0xD2 /* Insert on arrow keypad */ +#define DIK_DELETE 0xD3 /* Delete on arrow keypad */ +#define DIK_LWIN 0xDB /* Left Windows key */ +#define DIK_RWIN 0xDC /* Right Windows key */ +#define DIK_APPS 0xDD /* AppMenu key */ +#define DIK_POWER 0xDE /* System Power */ +#define DIK_SLEEP 0xDF /* System Sleep */ +#define DIK_WAKE 0xE3 /* System Wake */ +#define DIK_WEBSEARCH 0xE5 /* Web Search */ +#define DIK_WEBFAVORITES 0xE6 /* Web Favorites */ +#define DIK_WEBREFRESH 0xE7 /* Web Refresh */ +#define DIK_WEBSTOP 0xE8 /* Web Stop */ +#define DIK_WEBFORWARD 0xE9 /* Web Forward */ +#define DIK_WEBBACK 0xEA /* Web Back */ +#define DIK_MYCOMPUTER 0xEB /* My Computer */ +#define DIK_MAIL 0xEC /* Mail */ +#define DIK_MEDIASELECT 0xED /* Media Select */ + +/* + * Alternate names for keys, to facilitate transition from DOS. + */ +#define DIK_BACKSPACE DIK_BACK /* backspace */ +#define DIK_NUMPADSTAR DIK_MULTIPLY /* * on numeric keypad */ +#define DIK_LALT DIK_LMENU /* left Alt */ +#define DIK_CAPSLOCK DIK_CAPITAL /* CapsLock */ +#define DIK_NUMPADMINUS DIK_SUBTRACT /* - on numeric keypad */ +#define DIK_NUMPADPLUS DIK_ADD /* + on numeric keypad */ +#define DIK_NUMPADPERIOD DIK_DECIMAL /* . on numeric keypad */ +#define DIK_NUMPADSLASH DIK_DIVIDE /* / on numeric keypad */ +#define DIK_RALT DIK_RMENU /* right Alt */ +#define DIK_UPARROW DIK_UP /* UpArrow on arrow keypad */ +#define DIK_PGUP DIK_PRIOR /* PgUp on arrow keypad */ +#define DIK_LEFTARROW DIK_LEFT /* LeftArrow on arrow keypad */ +#define DIK_RIGHTARROW DIK_RIGHT /* RightArrow on arrow keypad */ +#define DIK_DOWNARROW DIK_DOWN /* DownArrow on arrow keypad */ +#define DIK_PGDN DIK_NEXT /* PgDn on arrow keypad */ + +/* + * Alternate names for keys originally not used on US keyboards. + */ +#define DIK_CIRCUMFLEX DIK_PREVTRACK /* Japanese keyboard */ + +#endif /* DIJ_RINGZERO */ + +/**************************************************************************** + * + * Joystick + * + ****************************************************************************/ + +#ifndef DIJ_RINGZERO + +typedef struct DIJOYSTATE { + LONG lX; /* x-axis position */ + LONG lY; /* y-axis position */ + LONG lZ; /* z-axis position */ + LONG lRx; /* x-axis rotation */ + LONG lRy; /* y-axis rotation */ + LONG lRz; /* z-axis rotation */ + LONG rglSlider[2]; /* extra axes positions */ + DWORD rgdwPOV[4]; /* POV directions */ + BYTE rgbButtons[32]; /* 32 buttons */ +} DIJOYSTATE, *LPDIJOYSTATE; + +typedef struct DIJOYSTATE2 { + LONG lX; /* x-axis position */ + LONG lY; /* y-axis position */ + LONG lZ; /* z-axis position */ + LONG lRx; /* x-axis rotation */ + LONG lRy; /* y-axis rotation */ + LONG lRz; /* z-axis rotation */ + LONG rglSlider[2]; /* extra axes positions */ + DWORD rgdwPOV[4]; /* POV directions */ + BYTE rgbButtons[128]; /* 128 buttons */ + LONG lVX; /* x-axis velocity */ + LONG lVY; /* y-axis velocity */ + LONG lVZ; /* z-axis velocity */ + LONG lVRx; /* x-axis angular velocity */ + LONG lVRy; /* y-axis angular velocity */ + LONG lVRz; /* z-axis angular velocity */ + LONG rglVSlider[2]; /* extra axes velocities */ + LONG lAX; /* x-axis acceleration */ + LONG lAY; /* y-axis acceleration */ + LONG lAZ; /* z-axis acceleration */ + LONG lARx; /* x-axis angular acceleration */ + LONG lARy; /* y-axis angular acceleration */ + LONG lARz; /* z-axis angular acceleration */ + LONG rglASlider[2]; /* extra axes accelerations */ + LONG lFX; /* x-axis force */ + LONG lFY; /* y-axis force */ + LONG lFZ; /* z-axis force */ + LONG lFRx; /* x-axis torque */ + LONG lFRy; /* y-axis torque */ + LONG lFRz; /* z-axis torque */ + LONG rglFSlider[2]; /* extra axes forces */ +} DIJOYSTATE2, *LPDIJOYSTATE2; + +#define DIJOFS_X FIELD_OFFSET(DIJOYSTATE, lX) +#define DIJOFS_Y FIELD_OFFSET(DIJOYSTATE, lY) +#define DIJOFS_Z FIELD_OFFSET(DIJOYSTATE, lZ) +#define DIJOFS_RX FIELD_OFFSET(DIJOYSTATE, lRx) +#define DIJOFS_RY FIELD_OFFSET(DIJOYSTATE, lRy) +#define DIJOFS_RZ FIELD_OFFSET(DIJOYSTATE, lRz) +#define DIJOFS_SLIDER(n) (FIELD_OFFSET(DIJOYSTATE, rglSlider) + \ + (n) * sizeof(LONG)) +#define DIJOFS_POV(n) (FIELD_OFFSET(DIJOYSTATE, rgdwPOV) + \ + (n) * sizeof(DWORD)) +#define DIJOFS_BUTTON(n) (FIELD_OFFSET(DIJOYSTATE, rgbButtons) + (n)) +#define DIJOFS_BUTTON0 DIJOFS_BUTTON(0) +#define DIJOFS_BUTTON1 DIJOFS_BUTTON(1) +#define DIJOFS_BUTTON2 DIJOFS_BUTTON(2) +#define DIJOFS_BUTTON3 DIJOFS_BUTTON(3) +#define DIJOFS_BUTTON4 DIJOFS_BUTTON(4) +#define DIJOFS_BUTTON5 DIJOFS_BUTTON(5) +#define DIJOFS_BUTTON6 DIJOFS_BUTTON(6) +#define DIJOFS_BUTTON7 DIJOFS_BUTTON(7) +#define DIJOFS_BUTTON8 DIJOFS_BUTTON(8) +#define DIJOFS_BUTTON9 DIJOFS_BUTTON(9) +#define DIJOFS_BUTTON10 DIJOFS_BUTTON(10) +#define DIJOFS_BUTTON11 DIJOFS_BUTTON(11) +#define DIJOFS_BUTTON12 DIJOFS_BUTTON(12) +#define DIJOFS_BUTTON13 DIJOFS_BUTTON(13) +#define DIJOFS_BUTTON14 DIJOFS_BUTTON(14) +#define DIJOFS_BUTTON15 DIJOFS_BUTTON(15) +#define DIJOFS_BUTTON16 DIJOFS_BUTTON(16) +#define DIJOFS_BUTTON17 DIJOFS_BUTTON(17) +#define DIJOFS_BUTTON18 DIJOFS_BUTTON(18) +#define DIJOFS_BUTTON19 DIJOFS_BUTTON(19) +#define DIJOFS_BUTTON20 DIJOFS_BUTTON(20) +#define DIJOFS_BUTTON21 DIJOFS_BUTTON(21) +#define DIJOFS_BUTTON22 DIJOFS_BUTTON(22) +#define DIJOFS_BUTTON23 DIJOFS_BUTTON(23) +#define DIJOFS_BUTTON24 DIJOFS_BUTTON(24) +#define DIJOFS_BUTTON25 DIJOFS_BUTTON(25) +#define DIJOFS_BUTTON26 DIJOFS_BUTTON(26) +#define DIJOFS_BUTTON27 DIJOFS_BUTTON(27) +#define DIJOFS_BUTTON28 DIJOFS_BUTTON(28) +#define DIJOFS_BUTTON29 DIJOFS_BUTTON(29) +#define DIJOFS_BUTTON30 DIJOFS_BUTTON(30) +#define DIJOFS_BUTTON31 DIJOFS_BUTTON(31) + + +#endif /* DIJ_RINGZERO */ + +/**************************************************************************** + * + * IDirectInput + * + ****************************************************************************/ + +#ifndef DIJ_RINGZERO + +#define DIENUM_STOP 0 +#define DIENUM_CONTINUE 1 + +typedef BOOL (FAR PASCAL * LPDIENUMDEVICESCALLBACKA)(LPCDIDEVICEINSTANCEA, LPVOID); +typedef BOOL (FAR PASCAL * LPDIENUMDEVICESCALLBACKW)(LPCDIDEVICEINSTANCEW, LPVOID); +#ifdef UNICODE +#define LPDIENUMDEVICESCALLBACK LPDIENUMDEVICESCALLBACKW +#else +#define LPDIENUMDEVICESCALLBACK LPDIENUMDEVICESCALLBACKA +#endif // !UNICODE +typedef BOOL (FAR PASCAL * LPDICONFIGUREDEVICESCALLBACK)(IUnknown FAR *, LPVOID); + +#define DIEDFL_ALLDEVICES 0x00000000 +#define DIEDFL_ATTACHEDONLY 0x00000001 +#if(DIRECTINPUT_VERSION >= 0x0500) +#define DIEDFL_FORCEFEEDBACK 0x00000100 +#endif /* DIRECTINPUT_VERSION >= 0x0500 */ +#if(DIRECTINPUT_VERSION >= 0x050a) +#define DIEDFL_INCLUDEALIASES 0x00010000 +#define DIEDFL_INCLUDEPHANTOMS 0x00020000 +#endif /* DIRECTINPUT_VERSION >= 0x050a */ +#if(DIRECTINPUT_VERSION >= 0x0800) +#define DIEDFL_INCLUDEHIDDEN 0x00040000 +#endif /* DIRECTINPUT_VERSION >= 0x0800 */ + + +#if(DIRECTINPUT_VERSION >= 0x0800) +typedef BOOL (FAR PASCAL * LPDIENUMDEVICESBYSEMANTICSCBA)(LPCDIDEVICEINSTANCEA, LPDIRECTINPUTDEVICE8A, DWORD, DWORD, LPVOID); +typedef BOOL (FAR PASCAL * LPDIENUMDEVICESBYSEMANTICSCBW)(LPCDIDEVICEINSTANCEW, LPDIRECTINPUTDEVICE8W, DWORD, DWORD, LPVOID); +#ifdef UNICODE +#define LPDIENUMDEVICESBYSEMANTICSCB LPDIENUMDEVICESBYSEMANTICSCBW +#else +#define LPDIENUMDEVICESBYSEMANTICSCB LPDIENUMDEVICESBYSEMANTICSCBA +#endif // !UNICODE +#endif /* DIRECTINPUT_VERSION >= 0x0800 */ + +#if(DIRECTINPUT_VERSION >= 0x0800) +#define DIEDBS_MAPPEDPRI1 0x00000001 +#define DIEDBS_MAPPEDPRI2 0x00000002 +#define DIEDBS_RECENTDEVICE 0x00000010 +#define DIEDBS_NEWDEVICE 0x00000020 +#endif /* DIRECTINPUT_VERSION >= 0x0800 */ + +#if(DIRECTINPUT_VERSION >= 0x0800) +#define DIEDBSFL_ATTACHEDONLY 0x00000000 +#define DIEDBSFL_THISUSER 0x00000010 +#define DIEDBSFL_FORCEFEEDBACK DIEDFL_FORCEFEEDBACK +#define DIEDBSFL_AVAILABLEDEVICES 0x00001000 +#define DIEDBSFL_MULTIMICEKEYBOARDS 0x00002000 +#define DIEDBSFL_NONGAMINGDEVICES 0x00004000 +#define DIEDBSFL_VALID 0x00007110 +#endif /* DIRECTINPUT_VERSION >= 0x0800 */ + +#undef INTERFACE +#define INTERFACE IDirectInputW + +DECLARE_INTERFACE_(IDirectInputW, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInputW methods ***/ + STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEW *,LPUNKNOWN) PURE; + STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKW,LPVOID,DWORD) PURE; + STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE; + STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE; +}; + +typedef struct IDirectInputW *LPDIRECTINPUTW; + +#undef INTERFACE +#define INTERFACE IDirectInputA + +DECLARE_INTERFACE_(IDirectInputA, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInputA methods ***/ + STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEA *,LPUNKNOWN) PURE; + STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKA,LPVOID,DWORD) PURE; + STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE; + STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE; +}; + +typedef struct IDirectInputA *LPDIRECTINPUTA; + +#ifdef UNICODE +#define IID_IDirectInput IID_IDirectInputW +#define IDirectInput IDirectInputW +#define IDirectInputVtbl IDirectInputWVtbl +#else +#define IID_IDirectInput IID_IDirectInputA +#define IDirectInput IDirectInputA +#define IDirectInputVtbl IDirectInputAVtbl +#endif +typedef struct IDirectInput *LPDIRECTINPUT; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectInput_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectInput_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectInput_Release(p) (p)->lpVtbl->Release(p) +#define IDirectInput_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c) +#define IDirectInput_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d) +#define IDirectInput_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a) +#define IDirectInput_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b) +#define IDirectInput_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#else +#define IDirectInput_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectInput_AddRef(p) (p)->AddRef() +#define IDirectInput_Release(p) (p)->Release() +#define IDirectInput_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c) +#define IDirectInput_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d) +#define IDirectInput_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a) +#define IDirectInput_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b) +#define IDirectInput_Initialize(p,a,b) (p)->Initialize(a,b) +#endif + +#undef INTERFACE +#define INTERFACE IDirectInput2W + +DECLARE_INTERFACE_(IDirectInput2W, IDirectInputW) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInputW methods ***/ + STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEW *,LPUNKNOWN) PURE; + STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKW,LPVOID,DWORD) PURE; + STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE; + STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE; + + /*** IDirectInput2W methods ***/ + STDMETHOD(FindDevice)(THIS_ REFGUID,LPCWSTR,LPGUID) PURE; +}; + +typedef struct IDirectInput2W *LPDIRECTINPUT2W; + +#undef INTERFACE +#define INTERFACE IDirectInput2A + +DECLARE_INTERFACE_(IDirectInput2A, IDirectInputA) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInputA methods ***/ + STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEA *,LPUNKNOWN) PURE; + STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKA,LPVOID,DWORD) PURE; + STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE; + STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE; + + /*** IDirectInput2A methods ***/ + STDMETHOD(FindDevice)(THIS_ REFGUID,LPCSTR,LPGUID) PURE; +}; + +typedef struct IDirectInput2A *LPDIRECTINPUT2A; + +#ifdef UNICODE +#define IID_IDirectInput2 IID_IDirectInput2W +#define IDirectInput2 IDirectInput2W +#define IDirectInput2Vtbl IDirectInput2WVtbl +#else +#define IID_IDirectInput2 IID_IDirectInput2A +#define IDirectInput2 IDirectInput2A +#define IDirectInput2Vtbl IDirectInput2AVtbl +#endif +typedef struct IDirectInput2 *LPDIRECTINPUT2; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectInput2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectInput2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectInput2_Release(p) (p)->lpVtbl->Release(p) +#define IDirectInput2_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c) +#define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d) +#define IDirectInput2_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a) +#define IDirectInput2_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b) +#define IDirectInput2_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectInput2_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c) +#else +#define IDirectInput2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectInput2_AddRef(p) (p)->AddRef() +#define IDirectInput2_Release(p) (p)->Release() +#define IDirectInput2_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c) +#define IDirectInput2_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d) +#define IDirectInput2_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a) +#define IDirectInput2_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b) +#define IDirectInput2_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectInput2_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c) +#endif + + +#undef INTERFACE +#define INTERFACE IDirectInput7W + +DECLARE_INTERFACE_(IDirectInput7W, IDirectInput2W) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInput2W methods ***/ + STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEW *,LPUNKNOWN) PURE; + STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKW,LPVOID,DWORD) PURE; + STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE; + STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE; + STDMETHOD(FindDevice)(THIS_ REFGUID,LPCWSTR,LPGUID) PURE; + + /*** IDirectInput7W methods ***/ + STDMETHOD(CreateDeviceEx)(THIS_ REFGUID,REFIID,LPVOID *,LPUNKNOWN) PURE; +}; + +typedef struct IDirectInput7W *LPDIRECTINPUT7W; + +#undef INTERFACE +#define INTERFACE IDirectInput7A + +DECLARE_INTERFACE_(IDirectInput7A, IDirectInput2A) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInput2A methods ***/ + STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICEA *,LPUNKNOWN) PURE; + STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKA,LPVOID,DWORD) PURE; + STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE; + STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE; + STDMETHOD(FindDevice)(THIS_ REFGUID,LPCSTR,LPGUID) PURE; + + /*** IDirectInput7A methods ***/ + STDMETHOD(CreateDeviceEx)(THIS_ REFGUID,REFIID,LPVOID *,LPUNKNOWN) PURE; +}; + +typedef struct IDirectInput7A *LPDIRECTINPUT7A; + +#ifdef UNICODE +#define IID_IDirectInput7 IID_IDirectInput7W +#define IDirectInput7 IDirectInput7W +#define IDirectInput7Vtbl IDirectInput7WVtbl +#else +#define IID_IDirectInput7 IID_IDirectInput7A +#define IDirectInput7 IDirectInput7A +#define IDirectInput7Vtbl IDirectInput7AVtbl +#endif +typedef struct IDirectInput7 *LPDIRECTINPUT7; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectInput7_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectInput7_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectInput7_Release(p) (p)->lpVtbl->Release(p) +#define IDirectInput7_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c) +#define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d) +#define IDirectInput7_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a) +#define IDirectInput7_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b) +#define IDirectInput7_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectInput7_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c) +#define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->lpVtbl->CreateDeviceEx(p,a,b,c,d) +#else +#define IDirectInput7_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectInput7_AddRef(p) (p)->AddRef() +#define IDirectInput7_Release(p) (p)->Release() +#define IDirectInput7_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c) +#define IDirectInput7_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d) +#define IDirectInput7_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a) +#define IDirectInput7_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b) +#define IDirectInput7_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectInput7_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c) +#define IDirectInput7_CreateDeviceEx(p,a,b,c,d) (p)->CreateDeviceEx(a,b,c,d) +#endif + +#if(DIRECTINPUT_VERSION >= 0x0800) +#undef INTERFACE +#define INTERFACE IDirectInput8W + +DECLARE_INTERFACE_(IDirectInput8W, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInput8W methods ***/ + STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICE8W *,LPUNKNOWN) PURE; + STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKW,LPVOID,DWORD) PURE; + STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE; + STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE; + STDMETHOD(FindDevice)(THIS_ REFGUID,LPCWSTR,LPGUID) PURE; + STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCWSTR,LPDIACTIONFORMATW,LPDIENUMDEVICESBYSEMANTICSCBW,LPVOID,DWORD) PURE; + STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK,LPDICONFIGUREDEVICESPARAMSW,DWORD,LPVOID) PURE; +}; + +typedef struct IDirectInput8W *LPDIRECTINPUT8W; + +#undef INTERFACE +#define INTERFACE IDirectInput8A + +DECLARE_INTERFACE_(IDirectInput8A, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInput8A methods ***/ + STDMETHOD(CreateDevice)(THIS_ REFGUID,LPDIRECTINPUTDEVICE8A *,LPUNKNOWN) PURE; + STDMETHOD(EnumDevices)(THIS_ DWORD,LPDIENUMDEVICESCALLBACKA,LPVOID,DWORD) PURE; + STDMETHOD(GetDeviceStatus)(THIS_ REFGUID) PURE; + STDMETHOD(RunControlPanel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(Initialize)(THIS_ HINSTANCE,DWORD) PURE; + STDMETHOD(FindDevice)(THIS_ REFGUID,LPCSTR,LPGUID) PURE; + STDMETHOD(EnumDevicesBySemantics)(THIS_ LPCSTR,LPDIACTIONFORMATA,LPDIENUMDEVICESBYSEMANTICSCBA,LPVOID,DWORD) PURE; + STDMETHOD(ConfigureDevices)(THIS_ LPDICONFIGUREDEVICESCALLBACK,LPDICONFIGUREDEVICESPARAMSA,DWORD,LPVOID) PURE; +}; + +typedef struct IDirectInput8A *LPDIRECTINPUT8A; + +#ifdef UNICODE +#define IID_IDirectInput8 IID_IDirectInput8W +#define IDirectInput8 IDirectInput8W +#define IDirectInput8Vtbl IDirectInput8WVtbl +#else +#define IID_IDirectInput8 IID_IDirectInput8A +#define IDirectInput8 IDirectInput8A +#define IDirectInput8Vtbl IDirectInput8AVtbl +#endif +typedef struct IDirectInput8 *LPDIRECTINPUT8; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectInput8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectInput8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectInput8_Release(p) (p)->lpVtbl->Release(p) +#define IDirectInput8_CreateDevice(p,a,b,c) (p)->lpVtbl->CreateDevice(p,a,b,c) +#define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->lpVtbl->EnumDevices(p,a,b,c,d) +#define IDirectInput8_GetDeviceStatus(p,a) (p)->lpVtbl->GetDeviceStatus(p,a) +#define IDirectInput8_RunControlPanel(p,a,b) (p)->lpVtbl->RunControlPanel(p,a,b) +#define IDirectInput8_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectInput8_FindDevice(p,a,b,c) (p)->lpVtbl->FindDevice(p,a,b,c) +#define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->lpVtbl->EnumDevicesBySemantics(p,a,b,c,d,e) +#define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->lpVtbl->ConfigureDevices(p,a,b,c,d) +#else +#define IDirectInput8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectInput8_AddRef(p) (p)->AddRef() +#define IDirectInput8_Release(p) (p)->Release() +#define IDirectInput8_CreateDevice(p,a,b,c) (p)->CreateDevice(a,b,c) +#define IDirectInput8_EnumDevices(p,a,b,c,d) (p)->EnumDevices(a,b,c,d) +#define IDirectInput8_GetDeviceStatus(p,a) (p)->GetDeviceStatus(a) +#define IDirectInput8_RunControlPanel(p,a,b) (p)->RunControlPanel(a,b) +#define IDirectInput8_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectInput8_FindDevice(p,a,b,c) (p)->FindDevice(a,b,c) +#define IDirectInput8_EnumDevicesBySemantics(p,a,b,c,d,e) (p)->EnumDevicesBySemantics(a,b,c,d,e) +#define IDirectInput8_ConfigureDevices(p,a,b,c,d) (p)->ConfigureDevices(a,b,c,d) +#endif +#endif /* DIRECTINPUT_VERSION >= 0x0800 */ + +#if DIRECTINPUT_VERSION > 0x0700 + +extern HRESULT WINAPI DirectInput8Create(HINSTANCE hinst, DWORD dwVersion, REFIID riidltf, LPVOID *ppvOut, LPUNKNOWN punkOuter); + +#else +extern HRESULT WINAPI DirectInputCreateA(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTA *ppDI, LPUNKNOWN punkOuter); +extern HRESULT WINAPI DirectInputCreateW(HINSTANCE hinst, DWORD dwVersion, LPDIRECTINPUTW *ppDI, LPUNKNOWN punkOuter); +#ifdef UNICODE +#define DirectInputCreate DirectInputCreateW +#else +#define DirectInputCreate DirectInputCreateA +#endif // !UNICODE + +extern HRESULT WINAPI DirectInputCreateEx(HINSTANCE hinst, DWORD dwVersion, REFIID riidltf, LPVOID *ppvOut, LPUNKNOWN punkOuter); + +#endif /* DIRECTINPUT_VERSION > 0x700 */ + +#endif /* DIJ_RINGZERO */ + + +/**************************************************************************** + * + * Return Codes + * + ****************************************************************************/ + +/* + * The operation completed successfully. + */ +#define DI_OK S_OK + +/* + * The device exists but is not currently attached. + */ +#define DI_NOTATTACHED S_FALSE + +/* + * The device buffer overflowed. Some input was lost. + */ +#define DI_BUFFEROVERFLOW S_FALSE + +/* + * The change in device properties had no effect. + */ +#define DI_PROPNOEFFECT S_FALSE + +/* + * The operation had no effect. + */ +#define DI_NOEFFECT S_FALSE + +/* + * The device is a polled device. As a result, device buffering + * will not collect any data and event notifications will not be + * signalled until GetDeviceState is called. + */ +#define DI_POLLEDDEVICE ((HRESULT)0x00000002L) + +/* + * The parameters of the effect were successfully updated by + * IDirectInputEffect::SetParameters, but the effect was not + * downloaded because the device is not exclusively acquired + * or because the DIEP_NODOWNLOAD flag was passed. + */ +#define DI_DOWNLOADSKIPPED ((HRESULT)0x00000003L) + +/* + * The parameters of the effect were successfully updated by + * IDirectInputEffect::SetParameters, but in order to change + * the parameters, the effect needed to be restarted. + */ +#define DI_EFFECTRESTARTED ((HRESULT)0x00000004L) + +/* + * The parameters of the effect were successfully updated by + * IDirectInputEffect::SetParameters, but some of them were + * beyond the capabilities of the device and were truncated. + */ +#define DI_TRUNCATED ((HRESULT)0x00000008L) + +/* + * The settings have been successfully applied but could not be + * persisted. + */ +#define DI_SETTINGSNOTSAVED ((HRESULT)0x0000000BL) + +/* + * Equal to DI_EFFECTRESTARTED | DI_TRUNCATED. + */ +#define DI_TRUNCATEDANDRESTARTED ((HRESULT)0x0000000CL) + +/* + * A SUCCESS code indicating that settings cannot be modified. + */ +#define DI_WRITEPROTECT ((HRESULT)0x00000013L) + +/* + * The application requires a newer version of DirectInput. + */ +#define DIERR_OLDDIRECTINPUTVERSION \ + MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_OLD_WIN_VERSION) + +/* + * The application was written for an unsupported prerelease version + * of DirectInput. + */ +#define DIERR_BETADIRECTINPUTVERSION \ + MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_RMODE_APP) + +/* + * The object could not be created due to an incompatible driver version + * or mismatched or incomplete driver components. + */ +#define DIERR_BADDRIVERVER \ + MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BAD_DRIVER_LEVEL) + +/* + * The device or device instance or effect is not registered with DirectInput. + */ +#define DIERR_DEVICENOTREG REGDB_E_CLASSNOTREG + +/* + * The requested object does not exist. + */ +#define DIERR_NOTFOUND \ + MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND) + +/* + * The requested object does not exist. + */ +#define DIERR_OBJECTNOTFOUND \ + MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_FILE_NOT_FOUND) + +/* + * An invalid parameter was passed to the returning function, + * or the object was not in a state that admitted the function + * to be called. + */ +#define DIERR_INVALIDPARAM E_INVALIDARG + +/* + * The specified interface is not supported by the object + */ +#define DIERR_NOINTERFACE E_NOINTERFACE + +/* + * An undetermined error occured inside the DInput subsystem + */ +#define DIERR_GENERIC E_FAIL + +/* + * The DInput subsystem couldn't allocate sufficient memory to complete the + * caller's request. + */ +#define DIERR_OUTOFMEMORY E_OUTOFMEMORY + +/* + * The function called is not supported at this time + */ +#define DIERR_UNSUPPORTED E_NOTIMPL + +/* + * This object has not been initialized + */ +#define DIERR_NOTINITIALIZED \ + MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NOT_READY) + +/* + * This object is already initialized + */ +#define DIERR_ALREADYINITIALIZED \ + MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_ALREADY_INITIALIZED) + +/* + * This object does not support aggregation + */ +#define DIERR_NOAGGREGATION CLASS_E_NOAGGREGATION + +/* + * Another app has a higher priority level, preventing this call from + * succeeding. + */ +#define DIERR_OTHERAPPHASPRIO E_ACCESSDENIED + +/* + * Access to the device has been lost. It must be re-acquired. + */ +#define DIERR_INPUTLOST \ + MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_READ_FAULT) + +/* + * The operation cannot be performed while the device is acquired. + */ +#define DIERR_ACQUIRED \ + MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_BUSY) + +/* + * The operation cannot be performed unless the device is acquired. + */ +#define DIERR_NOTACQUIRED \ + MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_INVALID_ACCESS) + +/* + * The specified property cannot be changed. + */ +#define DIERR_READONLY E_ACCESSDENIED + +/* + * The device already has an event notification associated with it. + */ +#define DIERR_HANDLEEXISTS E_ACCESSDENIED + +/* + * Data is not yet available. + */ +#ifndef E_PENDING +#define E_PENDING 0x8000000AL +#endif + +/* + * Unable to IDirectInputJoyConfig_Acquire because the user + * does not have sufficient privileges to change the joystick + * configuration. + */ +#define DIERR_INSUFFICIENTPRIVS 0x80040200L + +/* + * The device is full. + */ +#define DIERR_DEVICEFULL 0x80040201L + +/* + * Not all the requested information fit into the buffer. + */ +#define DIERR_MOREDATA 0x80040202L + +/* + * The effect is not downloaded. + */ +#define DIERR_NOTDOWNLOADED 0x80040203L + +/* + * The device cannot be reinitialized because there are still effects + * attached to it. + */ +#define DIERR_HASEFFECTS 0x80040204L + +/* + * The operation cannot be performed unless the device is acquired + * in DISCL_EXCLUSIVE mode. + */ +#define DIERR_NOTEXCLUSIVEACQUIRED 0x80040205L + +/* + * The effect could not be downloaded because essential information + * is missing. For example, no axes have been associated with the + * effect, or no type-specific information has been created. + */ +#define DIERR_INCOMPLETEEFFECT 0x80040206L + +/* + * Attempted to read buffered device data from a device that is + * not buffered. + */ +#define DIERR_NOTBUFFERED 0x80040207L + +/* + * An attempt was made to modify parameters of an effect while it is + * playing. Not all hardware devices support altering the parameters + * of an effect while it is playing. + */ +#define DIERR_EFFECTPLAYING 0x80040208L + +/* + * The operation could not be completed because the device is not + * plugged in. + */ +#define DIERR_UNPLUGGED 0x80040209L + +/* + * SendDeviceData failed because more information was requested + * to be sent than can be sent to the device. Some devices have + * restrictions on how much data can be sent to them. (For example, + * there might be a limit on the number of buttons that can be + * pressed at once.) + */ +#define DIERR_REPORTFULL 0x8004020AL + + +/* + * A mapper file function failed because reading or writing the user or IHV + * settings file failed. + */ +#define DIERR_MAPFILEFAIL 0x8004020BL + + +/*--- DINPUT Mapper Definitions: New for Dx8 ---*/ + + +/*--- Keyboard + Physical Keyboard Device ---*/ + +#define DIKEYBOARD_ESCAPE 0x81000401 +#define DIKEYBOARD_1 0x81000402 +#define DIKEYBOARD_2 0x81000403 +#define DIKEYBOARD_3 0x81000404 +#define DIKEYBOARD_4 0x81000405 +#define DIKEYBOARD_5 0x81000406 +#define DIKEYBOARD_6 0x81000407 +#define DIKEYBOARD_7 0x81000408 +#define DIKEYBOARD_8 0x81000409 +#define DIKEYBOARD_9 0x8100040A +#define DIKEYBOARD_0 0x8100040B +#define DIKEYBOARD_MINUS 0x8100040C /* - on main keyboard */ +#define DIKEYBOARD_EQUALS 0x8100040D +#define DIKEYBOARD_BACK 0x8100040E /* backspace */ +#define DIKEYBOARD_TAB 0x8100040F +#define DIKEYBOARD_Q 0x81000410 +#define DIKEYBOARD_W 0x81000411 +#define DIKEYBOARD_E 0x81000412 +#define DIKEYBOARD_R 0x81000413 +#define DIKEYBOARD_T 0x81000414 +#define DIKEYBOARD_Y 0x81000415 +#define DIKEYBOARD_U 0x81000416 +#define DIKEYBOARD_I 0x81000417 +#define DIKEYBOARD_O 0x81000418 +#define DIKEYBOARD_P 0x81000419 +#define DIKEYBOARD_LBRACKET 0x8100041A +#define DIKEYBOARD_RBRACKET 0x8100041B +#define DIKEYBOARD_RETURN 0x8100041C /* Enter on main keyboard */ +#define DIKEYBOARD_LCONTROL 0x8100041D +#define DIKEYBOARD_A 0x8100041E +#define DIKEYBOARD_S 0x8100041F +#define DIKEYBOARD_D 0x81000420 +#define DIKEYBOARD_F 0x81000421 +#define DIKEYBOARD_G 0x81000422 +#define DIKEYBOARD_H 0x81000423 +#define DIKEYBOARD_J 0x81000424 +#define DIKEYBOARD_K 0x81000425 +#define DIKEYBOARD_L 0x81000426 +#define DIKEYBOARD_SEMICOLON 0x81000427 +#define DIKEYBOARD_APOSTROPHE 0x81000428 +#define DIKEYBOARD_GRAVE 0x81000429 /* accent grave */ +#define DIKEYBOARD_LSHIFT 0x8100042A +#define DIKEYBOARD_BACKSLASH 0x8100042B +#define DIKEYBOARD_Z 0x8100042C +#define DIKEYBOARD_X 0x8100042D +#define DIKEYBOARD_C 0x8100042E +#define DIKEYBOARD_V 0x8100042F +#define DIKEYBOARD_B 0x81000430 +#define DIKEYBOARD_N 0x81000431 +#define DIKEYBOARD_M 0x81000432 +#define DIKEYBOARD_COMMA 0x81000433 +#define DIKEYBOARD_PERIOD 0x81000434 /* . on main keyboard */ +#define DIKEYBOARD_SLASH 0x81000435 /* / on main keyboard */ +#define DIKEYBOARD_RSHIFT 0x81000436 +#define DIKEYBOARD_MULTIPLY 0x81000437 /* * on numeric keypad */ +#define DIKEYBOARD_LMENU 0x81000438 /* left Alt */ +#define DIKEYBOARD_SPACE 0x81000439 +#define DIKEYBOARD_CAPITAL 0x8100043A +#define DIKEYBOARD_F1 0x8100043B +#define DIKEYBOARD_F2 0x8100043C +#define DIKEYBOARD_F3 0x8100043D +#define DIKEYBOARD_F4 0x8100043E +#define DIKEYBOARD_F5 0x8100043F +#define DIKEYBOARD_F6 0x81000440 +#define DIKEYBOARD_F7 0x81000441 +#define DIKEYBOARD_F8 0x81000442 +#define DIKEYBOARD_F9 0x81000443 +#define DIKEYBOARD_F10 0x81000444 +#define DIKEYBOARD_NUMLOCK 0x81000445 +#define DIKEYBOARD_SCROLL 0x81000446 /* Scroll Lock */ +#define DIKEYBOARD_NUMPAD7 0x81000447 +#define DIKEYBOARD_NUMPAD8 0x81000448 +#define DIKEYBOARD_NUMPAD9 0x81000449 +#define DIKEYBOARD_SUBTRACT 0x8100044A /* - on numeric keypad */ +#define DIKEYBOARD_NUMPAD4 0x8100044B +#define DIKEYBOARD_NUMPAD5 0x8100044C +#define DIKEYBOARD_NUMPAD6 0x8100044D +#define DIKEYBOARD_ADD 0x8100044E /* + on numeric keypad */ +#define DIKEYBOARD_NUMPAD1 0x8100044F +#define DIKEYBOARD_NUMPAD2 0x81000450 +#define DIKEYBOARD_NUMPAD3 0x81000451 +#define DIKEYBOARD_NUMPAD0 0x81000452 +#define DIKEYBOARD_DECIMAL 0x81000453 /* . on numeric keypad */ +#define DIKEYBOARD_OEM_102 0x81000456 /* < > | on UK/Germany keyboards */ +#define DIKEYBOARD_F11 0x81000457 +#define DIKEYBOARD_F12 0x81000458 +#define DIKEYBOARD_F13 0x81000464 /* (NEC PC98) */ +#define DIKEYBOARD_F14 0x81000465 /* (NEC PC98) */ +#define DIKEYBOARD_F15 0x81000466 /* (NEC PC98) */ +#define DIKEYBOARD_KANA 0x81000470 /* (Japanese keyboard) */ +#define DIKEYBOARD_ABNT_C1 0x81000473 /* / ? on Portugese (Brazilian) keyboards */ +#define DIKEYBOARD_CONVERT 0x81000479 /* (Japanese keyboard) */ +#define DIKEYBOARD_NOCONVERT 0x8100047B /* (Japanese keyboard) */ +#define DIKEYBOARD_YEN 0x8100047D /* (Japanese keyboard) */ +#define DIKEYBOARD_ABNT_C2 0x8100047E /* Numpad . on Portugese (Brazilian) keyboards */ +#define DIKEYBOARD_NUMPADEQUALS 0x8100048D /* = on numeric keypad (NEC PC98) */ +#define DIKEYBOARD_PREVTRACK 0x81000490 /* Previous Track (DIK_CIRCUMFLEX on Japanese keyboard) */ +#define DIKEYBOARD_AT 0x81000491 /* (NEC PC98) */ +#define DIKEYBOARD_COLON 0x81000492 /* (NEC PC98) */ +#define DIKEYBOARD_UNDERLINE 0x81000493 /* (NEC PC98) */ +#define DIKEYBOARD_KANJI 0x81000494 /* (Japanese keyboard) */ +#define DIKEYBOARD_STOP 0x81000495 /* (NEC PC98) */ +#define DIKEYBOARD_AX 0x81000496 /* (Japan AX) */ +#define DIKEYBOARD_UNLABELED 0x81000497 /* (J3100) */ +#define DIKEYBOARD_NEXTTRACK 0x81000499 /* Next Track */ +#define DIKEYBOARD_NUMPADENTER 0x8100049C /* Enter on numeric keypad */ +#define DIKEYBOARD_RCONTROL 0x8100049D +#define DIKEYBOARD_MUTE 0x810004A0 /* Mute */ +#define DIKEYBOARD_CALCULATOR 0x810004A1 /* Calculator */ +#define DIKEYBOARD_PLAYPAUSE 0x810004A2 /* Play / Pause */ +#define DIKEYBOARD_MEDIASTOP 0x810004A4 /* Media Stop */ +#define DIKEYBOARD_VOLUMEDOWN 0x810004AE /* Volume - */ +#define DIKEYBOARD_VOLUMEUP 0x810004B0 /* Volume + */ +#define DIKEYBOARD_WEBHOME 0x810004B2 /* Web home */ +#define DIKEYBOARD_NUMPADCOMMA 0x810004B3 /* , on numeric keypad (NEC PC98) */ +#define DIKEYBOARD_DIVIDE 0x810004B5 /* / on numeric keypad */ +#define DIKEYBOARD_SYSRQ 0x810004B7 +#define DIKEYBOARD_RMENU 0x810004B8 /* right Alt */ +#define DIKEYBOARD_PAUSE 0x810004C5 /* Pause */ +#define DIKEYBOARD_HOME 0x810004C7 /* Home on arrow keypad */ +#define DIKEYBOARD_UP 0x810004C8 /* UpArrow on arrow keypad */ +#define DIKEYBOARD_PRIOR 0x810004C9 /* PgUp on arrow keypad */ +#define DIKEYBOARD_LEFT 0x810004CB /* LeftArrow on arrow keypad */ +#define DIKEYBOARD_RIGHT 0x810004CD /* RightArrow on arrow keypad */ +#define DIKEYBOARD_END 0x810004CF /* End on arrow keypad */ +#define DIKEYBOARD_DOWN 0x810004D0 /* DownArrow on arrow keypad */ +#define DIKEYBOARD_NEXT 0x810004D1 /* PgDn on arrow keypad */ +#define DIKEYBOARD_INSERT 0x810004D2 /* Insert on arrow keypad */ +#define DIKEYBOARD_DELETE 0x810004D3 /* Delete on arrow keypad */ +#define DIKEYBOARD_LWIN 0x810004DB /* Left Windows key */ +#define DIKEYBOARD_RWIN 0x810004DC /* Right Windows key */ +#define DIKEYBOARD_APPS 0x810004DD /* AppMenu key */ +#define DIKEYBOARD_POWER 0x810004DE /* System Power */ +#define DIKEYBOARD_SLEEP 0x810004DF /* System Sleep */ +#define DIKEYBOARD_WAKE 0x810004E3 /* System Wake */ +#define DIKEYBOARD_WEBSEARCH 0x810004E5 /* Web Search */ +#define DIKEYBOARD_WEBFAVORITES 0x810004E6 /* Web Favorites */ +#define DIKEYBOARD_WEBREFRESH 0x810004E7 /* Web Refresh */ +#define DIKEYBOARD_WEBSTOP 0x810004E8 /* Web Stop */ +#define DIKEYBOARD_WEBFORWARD 0x810004E9 /* Web Forward */ +#define DIKEYBOARD_WEBBACK 0x810004EA /* Web Back */ +#define DIKEYBOARD_MYCOMPUTER 0x810004EB /* My Computer */ +#define DIKEYBOARD_MAIL 0x810004EC /* Mail */ +#define DIKEYBOARD_MEDIASELECT 0x810004ED /* Media Select */ + + +/*--- MOUSE + Physical Mouse Device ---*/ + +#define DIMOUSE_XAXISAB (0x82000200 |DIMOFS_X ) /* X Axis-absolute: Some mice natively report absolute coordinates */ +#define DIMOUSE_YAXISAB (0x82000200 |DIMOFS_Y ) /* Y Axis-absolute: Some mice natively report absolute coordinates */ +#define DIMOUSE_XAXIS (0x82000300 |DIMOFS_X ) /* X Axis */ +#define DIMOUSE_YAXIS (0x82000300 |DIMOFS_Y ) /* Y Axis */ +#define DIMOUSE_WHEEL (0x82000300 |DIMOFS_Z ) /* Z Axis */ +#define DIMOUSE_BUTTON0 (0x82000400 |DIMOFS_BUTTON0) /* Button 0 */ +#define DIMOUSE_BUTTON1 (0x82000400 |DIMOFS_BUTTON1) /* Button 1 */ +#define DIMOUSE_BUTTON2 (0x82000400 |DIMOFS_BUTTON2) /* Button 2 */ +#define DIMOUSE_BUTTON3 (0x82000400 |DIMOFS_BUTTON3) /* Button 3 */ +#define DIMOUSE_BUTTON4 (0x82000400 |DIMOFS_BUTTON4) /* Button 4 */ +#define DIMOUSE_BUTTON5 (0x82000400 |DIMOFS_BUTTON5) /* Button 5 */ +#define DIMOUSE_BUTTON6 (0x82000400 |DIMOFS_BUTTON6) /* Button 6 */ +#define DIMOUSE_BUTTON7 (0x82000400 |DIMOFS_BUTTON7) /* Button 7 */ + + +/*--- VOICE + Physical Dplay Voice Device ---*/ + +#define DIVOICE_CHANNEL1 0x83000401 +#define DIVOICE_CHANNEL2 0x83000402 +#define DIVOICE_CHANNEL3 0x83000403 +#define DIVOICE_CHANNEL4 0x83000404 +#define DIVOICE_CHANNEL5 0x83000405 +#define DIVOICE_CHANNEL6 0x83000406 +#define DIVOICE_CHANNEL7 0x83000407 +#define DIVOICE_CHANNEL8 0x83000408 +#define DIVOICE_TEAM 0x83000409 +#define DIVOICE_ALL 0x8300040A +#define DIVOICE_RECORDMUTE 0x8300040B +#define DIVOICE_PLAYBACKMUTE 0x8300040C +#define DIVOICE_TRANSMIT 0x8300040D + +#define DIVOICE_VOICECOMMAND 0x83000410 + + +/*--- Driving Simulator - Racing + Vehicle control is primary objective ---*/ +#define DIVIRTUAL_DRIVING_RACE 0x01000000 +#define DIAXIS_DRIVINGR_STEER 0x01008A01 /* Steering */ +#define DIAXIS_DRIVINGR_ACCELERATE 0x01039202 /* Accelerate */ +#define DIAXIS_DRIVINGR_BRAKE 0x01041203 /* Brake-Axis */ +#define DIBUTTON_DRIVINGR_SHIFTUP 0x01000C01 /* Shift to next higher gear */ +#define DIBUTTON_DRIVINGR_SHIFTDOWN 0x01000C02 /* Shift to next lower gear */ +#define DIBUTTON_DRIVINGR_VIEW 0x01001C03 /* Cycle through view options */ +#define DIBUTTON_DRIVINGR_MENU 0x010004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIAXIS_DRIVINGR_ACCEL_AND_BRAKE 0x01014A04 /* Some devices combine accelerate and brake in a single axis */ +#define DIHATSWITCH_DRIVINGR_GLANCE 0x01004601 /* Look around */ +#define DIBUTTON_DRIVINGR_BRAKE 0x01004C04 /* Brake-button */ +#define DIBUTTON_DRIVINGR_DASHBOARD 0x01004405 /* Select next dashboard option */ +#define DIBUTTON_DRIVINGR_AIDS 0x01004406 /* Driver correction aids */ +#define DIBUTTON_DRIVINGR_MAP 0x01004407 /* Display Driving Map */ +#define DIBUTTON_DRIVINGR_BOOST 0x01004408 /* Turbo Boost */ +#define DIBUTTON_DRIVINGR_PIT 0x01004409 /* Pit stop notification */ +#define DIBUTTON_DRIVINGR_ACCELERATE_LINK 0x0103D4E0 /* Fallback Accelerate button */ +#define DIBUTTON_DRIVINGR_STEER_LEFT_LINK 0x0100CCE4 /* Fallback Steer Left button */ +#define DIBUTTON_DRIVINGR_STEER_RIGHT_LINK 0x0100CCEC /* Fallback Steer Right button */ +#define DIBUTTON_DRIVINGR_GLANCE_LEFT_LINK 0x0107C4E4 /* Fallback Glance Left button */ +#define DIBUTTON_DRIVINGR_GLANCE_RIGHT_LINK 0x0107C4EC /* Fallback Glance Right button */ +#define DIBUTTON_DRIVINGR_DEVICE 0x010044FE /* Show input device and controls */ +#define DIBUTTON_DRIVINGR_PAUSE 0x010044FC /* Start / Pause / Restart game */ + +/*--- Driving Simulator - Combat + Combat from within a vehicle is primary objective ---*/ +#define DIVIRTUAL_DRIVING_COMBAT 0x02000000 +#define DIAXIS_DRIVINGC_STEER 0x02008A01 /* Steering */ +#define DIAXIS_DRIVINGC_ACCELERATE 0x02039202 /* Accelerate */ +#define DIAXIS_DRIVINGC_BRAKE 0x02041203 /* Brake-axis */ +#define DIBUTTON_DRIVINGC_FIRE 0x02000C01 /* Fire */ +#define DIBUTTON_DRIVINGC_WEAPONS 0x02000C02 /* Select next weapon */ +#define DIBUTTON_DRIVINGC_TARGET 0x02000C03 /* Select next available target */ +#define DIBUTTON_DRIVINGC_MENU 0x020004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIAXIS_DRIVINGC_ACCEL_AND_BRAKE 0x02014A04 /* Some devices combine accelerate and brake in a single axis */ +#define DIHATSWITCH_DRIVINGC_GLANCE 0x02004601 /* Look around */ +#define DIBUTTON_DRIVINGC_SHIFTUP 0x02004C04 /* Shift to next higher gear */ +#define DIBUTTON_DRIVINGC_SHIFTDOWN 0x02004C05 /* Shift to next lower gear */ +#define DIBUTTON_DRIVINGC_DASHBOARD 0x02004406 /* Select next dashboard option */ +#define DIBUTTON_DRIVINGC_AIDS 0x02004407 /* Driver correction aids */ +#define DIBUTTON_DRIVINGC_BRAKE 0x02004C08 /* Brake-button */ +#define DIBUTTON_DRIVINGC_FIRESECONDARY 0x02004C09 /* Alternative fire button */ +#define DIBUTTON_DRIVINGC_ACCELERATE_LINK 0x0203D4E0 /* Fallback Accelerate button */ +#define DIBUTTON_DRIVINGC_STEER_LEFT_LINK 0x0200CCE4 /* Fallback Steer Left button */ +#define DIBUTTON_DRIVINGC_STEER_RIGHT_LINK 0x0200CCEC /* Fallback Steer Right button */ +#define DIBUTTON_DRIVINGC_GLANCE_LEFT_LINK 0x0207C4E4 /* Fallback Glance Left button */ +#define DIBUTTON_DRIVINGC_GLANCE_RIGHT_LINK 0x0207C4EC /* Fallback Glance Right button */ +#define DIBUTTON_DRIVINGC_DEVICE 0x020044FE /* Show input device and controls */ +#define DIBUTTON_DRIVINGC_PAUSE 0x020044FC /* Start / Pause / Restart game */ + +/*--- Driving Simulator - Tank + Combat from withing a tank is primary objective ---*/ +#define DIVIRTUAL_DRIVING_TANK 0x03000000 +#define DIAXIS_DRIVINGT_STEER 0x03008A01 /* Turn tank left / right */ +#define DIAXIS_DRIVINGT_BARREL 0x03010202 /* Raise / lower barrel */ +#define DIAXIS_DRIVINGT_ACCELERATE 0x03039203 /* Accelerate */ +#define DIAXIS_DRIVINGT_ROTATE 0x03020204 /* Turn barrel left / right */ +#define DIBUTTON_DRIVINGT_FIRE 0x03000C01 /* Fire */ +#define DIBUTTON_DRIVINGT_WEAPONS 0x03000C02 /* Select next weapon */ +#define DIBUTTON_DRIVINGT_TARGET 0x03000C03 /* Selects next available target */ +#define DIBUTTON_DRIVINGT_MENU 0x030004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_DRIVINGT_GLANCE 0x03004601 /* Look around */ +#define DIAXIS_DRIVINGT_BRAKE 0x03045205 /* Brake-axis */ +#define DIAXIS_DRIVINGT_ACCEL_AND_BRAKE 0x03014A06 /* Some devices combine accelerate and brake in a single axis */ +#define DIBUTTON_DRIVINGT_VIEW 0x03005C04 /* Cycle through view options */ +#define DIBUTTON_DRIVINGT_DASHBOARD 0x03005C05 /* Select next dashboard option */ +#define DIBUTTON_DRIVINGT_BRAKE 0x03004C06 /* Brake-button */ +#define DIBUTTON_DRIVINGT_FIRESECONDARY 0x03004C07 /* Alternative fire button */ +#define DIBUTTON_DRIVINGT_ACCELERATE_LINK 0x0303D4E0 /* Fallback Accelerate button */ +#define DIBUTTON_DRIVINGT_STEER_LEFT_LINK 0x0300CCE4 /* Fallback Steer Left button */ +#define DIBUTTON_DRIVINGT_STEER_RIGHT_LINK 0x0300CCEC /* Fallback Steer Right button */ +#define DIBUTTON_DRIVINGT_BARREL_UP_LINK 0x030144E0 /* Fallback Barrel up button */ +#define DIBUTTON_DRIVINGT_BARREL_DOWN_LINK 0x030144E8 /* Fallback Barrel down button */ +#define DIBUTTON_DRIVINGT_ROTATE_LEFT_LINK 0x030244E4 /* Fallback Rotate left button */ +#define DIBUTTON_DRIVINGT_ROTATE_RIGHT_LINK 0x030244EC /* Fallback Rotate right button */ +#define DIBUTTON_DRIVINGT_GLANCE_LEFT_LINK 0x0307C4E4 /* Fallback Glance Left button */ +#define DIBUTTON_DRIVINGT_GLANCE_RIGHT_LINK 0x0307C4EC /* Fallback Glance Right button */ +#define DIBUTTON_DRIVINGT_DEVICE 0x030044FE /* Show input device and controls */ +#define DIBUTTON_DRIVINGT_PAUSE 0x030044FC /* Start / Pause / Restart game */ + +/*--- Flight Simulator - Civilian + Plane control is the primary objective ---*/ +#define DIVIRTUAL_FLYING_CIVILIAN 0x04000000 +#define DIAXIS_FLYINGC_BANK 0x04008A01 /* Roll ship left / right */ +#define DIAXIS_FLYINGC_PITCH 0x04010A02 /* Nose up / down */ +#define DIAXIS_FLYINGC_THROTTLE 0x04039203 /* Throttle */ +#define DIBUTTON_FLYINGC_VIEW 0x04002401 /* Cycle through view options */ +#define DIBUTTON_FLYINGC_DISPLAY 0x04002402 /* Select next dashboard / heads up display option */ +#define DIBUTTON_FLYINGC_GEAR 0x04002C03 /* Gear up / down */ +#define DIBUTTON_FLYINGC_MENU 0x040004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_FLYINGC_GLANCE 0x04004601 /* Look around */ +#define DIAXIS_FLYINGC_BRAKE 0x04046A04 /* Apply Brake */ +#define DIAXIS_FLYINGC_RUDDER 0x04025205 /* Yaw ship left/right */ +#define DIAXIS_FLYINGC_FLAPS 0x04055A06 /* Flaps */ +#define DIBUTTON_FLYINGC_FLAPSUP 0x04006404 /* Increment stepping up until fully retracted */ +#define DIBUTTON_FLYINGC_FLAPSDOWN 0x04006405 /* Decrement stepping down until fully extended */ +#define DIBUTTON_FLYINGC_BRAKE_LINK 0x04046CE0 /* Fallback brake button */ +#define DIBUTTON_FLYINGC_FASTER_LINK 0x0403D4E0 /* Fallback throttle up button */ +#define DIBUTTON_FLYINGC_SLOWER_LINK 0x0403D4E8 /* Fallback throttle down button */ +#define DIBUTTON_FLYINGC_GLANCE_LEFT_LINK 0x0407C4E4 /* Fallback Glance Left button */ +#define DIBUTTON_FLYINGC_GLANCE_RIGHT_LINK 0x0407C4EC /* Fallback Glance Right button */ +#define DIBUTTON_FLYINGC_GLANCE_UP_LINK 0x0407C4E0 /* Fallback Glance Up button */ +#define DIBUTTON_FLYINGC_GLANCE_DOWN_LINK 0x0407C4E8 /* Fallback Glance Down button */ +#define DIBUTTON_FLYINGC_DEVICE 0x040044FE /* Show input device and controls */ +#define DIBUTTON_FLYINGC_PAUSE 0x040044FC /* Start / Pause / Restart game */ + +/*--- Flight Simulator - Military + Aerial combat is the primary objective ---*/ +#define DIVIRTUAL_FLYING_MILITARY 0x05000000 +#define DIAXIS_FLYINGM_BANK 0x05008A01 /* Bank - Roll ship left / right */ +#define DIAXIS_FLYINGM_PITCH 0x05010A02 /* Pitch - Nose up / down */ +#define DIAXIS_FLYINGM_THROTTLE 0x05039203 /* Throttle - faster / slower */ +#define DIBUTTON_FLYINGM_FIRE 0x05000C01 /* Fire */ +#define DIBUTTON_FLYINGM_WEAPONS 0x05000C02 /* Select next weapon */ +#define DIBUTTON_FLYINGM_TARGET 0x05000C03 /* Selects next available target */ +#define DIBUTTON_FLYINGM_MENU 0x050004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_FLYINGM_GLANCE 0x05004601 /* Look around */ +#define DIBUTTON_FLYINGM_COUNTER 0x05005C04 /* Activate counter measures */ +#define DIAXIS_FLYINGM_RUDDER 0x05024A04 /* Rudder - Yaw ship left/right */ +#define DIAXIS_FLYINGM_BRAKE 0x05046205 /* Brake-axis */ +#define DIBUTTON_FLYINGM_VIEW 0x05006405 /* Cycle through view options */ +#define DIBUTTON_FLYINGM_DISPLAY 0x05006406 /* Select next dashboard option */ +#define DIAXIS_FLYINGM_FLAPS 0x05055206 /* Flaps */ +#define DIBUTTON_FLYINGM_FLAPSUP 0x05005407 /* Increment stepping up until fully retracted */ +#define DIBUTTON_FLYINGM_FLAPSDOWN 0x05005408 /* Decrement stepping down until fully extended */ +#define DIBUTTON_FLYINGM_FIRESECONDARY 0x05004C09 /* Alternative fire button */ +#define DIBUTTON_FLYINGM_GEAR 0x0500640A /* Gear up / down */ +#define DIBUTTON_FLYINGM_BRAKE_LINK 0x050464E0 /* Fallback brake button */ +#define DIBUTTON_FLYINGM_FASTER_LINK 0x0503D4E0 /* Fallback throttle up button */ +#define DIBUTTON_FLYINGM_SLOWER_LINK 0x0503D4E8 /* Fallback throttle down button */ +#define DIBUTTON_FLYINGM_GLANCE_LEFT_LINK 0x0507C4E4 /* Fallback Glance Left button */ +#define DIBUTTON_FLYINGM_GLANCE_RIGHT_LINK 0x0507C4EC /* Fallback Glance Right button */ +#define DIBUTTON_FLYINGM_GLANCE_UP_LINK 0x0507C4E0 /* Fallback Glance Up button */ +#define DIBUTTON_FLYINGM_GLANCE_DOWN_LINK 0x0507C4E8 /* Fallback Glance Down button */ +#define DIBUTTON_FLYINGM_DEVICE 0x050044FE /* Show input device and controls */ +#define DIBUTTON_FLYINGM_PAUSE 0x050044FC /* Start / Pause / Restart game */ + +/*--- Flight Simulator - Combat Helicopter + Combat from helicopter is primary objective ---*/ +#define DIVIRTUAL_FLYING_HELICOPTER 0x06000000 +#define DIAXIS_FLYINGH_BANK 0x06008A01 /* Bank - Roll ship left / right */ +#define DIAXIS_FLYINGH_PITCH 0x06010A02 /* Pitch - Nose up / down */ +#define DIAXIS_FLYINGH_COLLECTIVE 0x06018A03 /* Collective - Blade pitch/power */ +#define DIBUTTON_FLYINGH_FIRE 0x06001401 /* Fire */ +#define DIBUTTON_FLYINGH_WEAPONS 0x06001402 /* Select next weapon */ +#define DIBUTTON_FLYINGH_TARGET 0x06001403 /* Selects next available target */ +#define DIBUTTON_FLYINGH_MENU 0x060004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_FLYINGH_GLANCE 0x06004601 /* Look around */ +#define DIAXIS_FLYINGH_TORQUE 0x06025A04 /* Torque - Rotate ship around left / right axis */ +#define DIAXIS_FLYINGH_THROTTLE 0x0603DA05 /* Throttle */ +#define DIBUTTON_FLYINGH_COUNTER 0x06005404 /* Activate counter measures */ +#define DIBUTTON_FLYINGH_VIEW 0x06006405 /* Cycle through view options */ +#define DIBUTTON_FLYINGH_GEAR 0x06006406 /* Gear up / down */ +#define DIBUTTON_FLYINGH_FIRESECONDARY 0x06004C07 /* Alternative fire button */ +#define DIBUTTON_FLYINGH_FASTER_LINK 0x0603DCE0 /* Fallback throttle up button */ +#define DIBUTTON_FLYINGH_SLOWER_LINK 0x0603DCE8 /* Fallback throttle down button */ +#define DIBUTTON_FLYINGH_GLANCE_LEFT_LINK 0x0607C4E4 /* Fallback Glance Left button */ +#define DIBUTTON_FLYINGH_GLANCE_RIGHT_LINK 0x0607C4EC /* Fallback Glance Right button */ +#define DIBUTTON_FLYINGH_GLANCE_UP_LINK 0x0607C4E0 /* Fallback Glance Up button */ +#define DIBUTTON_FLYINGH_GLANCE_DOWN_LINK 0x0607C4E8 /* Fallback Glance Down button */ +#define DIBUTTON_FLYINGH_DEVICE 0x060044FE /* Show input device and controls */ +#define DIBUTTON_FLYINGH_PAUSE 0x060044FC /* Start / Pause / Restart game */ + +/*--- Space Simulator - Combat + Space Simulator with weapons ---*/ +#define DIVIRTUAL_SPACESIM 0x07000000 +#define DIAXIS_SPACESIM_LATERAL 0x07008201 /* Move ship left / right */ +#define DIAXIS_SPACESIM_MOVE 0x07010202 /* Move ship forward/backward */ +#define DIAXIS_SPACESIM_THROTTLE 0x07038203 /* Throttle - Engine speed */ +#define DIBUTTON_SPACESIM_FIRE 0x07000401 /* Fire */ +#define DIBUTTON_SPACESIM_WEAPONS 0x07000402 /* Select next weapon */ +#define DIBUTTON_SPACESIM_TARGET 0x07000403 /* Selects next available target */ +#define DIBUTTON_SPACESIM_MENU 0x070004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_SPACESIM_GLANCE 0x07004601 /* Look around */ +#define DIAXIS_SPACESIM_CLIMB 0x0701C204 /* Climb - Pitch ship up/down */ +#define DIAXIS_SPACESIM_ROTATE 0x07024205 /* Rotate - Turn ship left/right */ +#define DIBUTTON_SPACESIM_VIEW 0x07004404 /* Cycle through view options */ +#define DIBUTTON_SPACESIM_DISPLAY 0x07004405 /* Select next dashboard / heads up display option */ +#define DIBUTTON_SPACESIM_RAISE 0x07004406 /* Raise ship while maintaining current pitch */ +#define DIBUTTON_SPACESIM_LOWER 0x07004407 /* Lower ship while maintaining current pitch */ +#define DIBUTTON_SPACESIM_GEAR 0x07004408 /* Gear up / down */ +#define DIBUTTON_SPACESIM_FIRESECONDARY 0x07004409 /* Alternative fire button */ +#define DIBUTTON_SPACESIM_LEFT_LINK 0x0700C4E4 /* Fallback move left button */ +#define DIBUTTON_SPACESIM_RIGHT_LINK 0x0700C4EC /* Fallback move right button */ +#define DIBUTTON_SPACESIM_FORWARD_LINK 0x070144E0 /* Fallback move forward button */ +#define DIBUTTON_SPACESIM_BACKWARD_LINK 0x070144E8 /* Fallback move backwards button */ +#define DIBUTTON_SPACESIM_FASTER_LINK 0x0703C4E0 /* Fallback throttle up button */ +#define DIBUTTON_SPACESIM_SLOWER_LINK 0x0703C4E8 /* Fallback throttle down button */ +#define DIBUTTON_SPACESIM_TURN_LEFT_LINK 0x070244E4 /* Fallback turn left button */ +#define DIBUTTON_SPACESIM_TURN_RIGHT_LINK 0x070244EC /* Fallback turn right button */ +#define DIBUTTON_SPACESIM_GLANCE_LEFT_LINK 0x0707C4E4 /* Fallback Glance Left button */ +#define DIBUTTON_SPACESIM_GLANCE_RIGHT_LINK 0x0707C4EC /* Fallback Glance Right button */ +#define DIBUTTON_SPACESIM_GLANCE_UP_LINK 0x0707C4E0 /* Fallback Glance Up button */ +#define DIBUTTON_SPACESIM_GLANCE_DOWN_LINK 0x0707C4E8 /* Fallback Glance Down button */ +#define DIBUTTON_SPACESIM_DEVICE 0x070044FE /* Show input device and controls */ +#define DIBUTTON_SPACESIM_PAUSE 0x070044FC /* Start / Pause / Restart game */ + +/*--- Fighting - First Person + Hand to Hand combat is primary objective ---*/ +#define DIVIRTUAL_FIGHTING_HAND2HAND 0x08000000 +#define DIAXIS_FIGHTINGH_LATERAL 0x08008201 /* Sidestep left/right */ +#define DIAXIS_FIGHTINGH_MOVE 0x08010202 /* Move forward/backward */ +#define DIBUTTON_FIGHTINGH_PUNCH 0x08000401 /* Punch */ +#define DIBUTTON_FIGHTINGH_KICK 0x08000402 /* Kick */ +#define DIBUTTON_FIGHTINGH_BLOCK 0x08000403 /* Block */ +#define DIBUTTON_FIGHTINGH_CROUCH 0x08000404 /* Crouch */ +#define DIBUTTON_FIGHTINGH_JUMP 0x08000405 /* Jump */ +#define DIBUTTON_FIGHTINGH_SPECIAL1 0x08000406 /* Apply first special move */ +#define DIBUTTON_FIGHTINGH_SPECIAL2 0x08000407 /* Apply second special move */ +#define DIBUTTON_FIGHTINGH_MENU 0x080004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIBUTTON_FIGHTINGH_SELECT 0x08004408 /* Select special move */ +#define DIHATSWITCH_FIGHTINGH_SLIDE 0x08004601 /* Look around */ +#define DIBUTTON_FIGHTINGH_DISPLAY 0x08004409 /* Shows next on-screen display option */ +#define DIAXIS_FIGHTINGH_ROTATE 0x08024203 /* Rotate - Turn body left/right */ +#define DIBUTTON_FIGHTINGH_DODGE 0x0800440A /* Dodge */ +#define DIBUTTON_FIGHTINGH_LEFT_LINK 0x0800C4E4 /* Fallback left sidestep button */ +#define DIBUTTON_FIGHTINGH_RIGHT_LINK 0x0800C4EC /* Fallback right sidestep button */ +#define DIBUTTON_FIGHTINGH_FORWARD_LINK 0x080144E0 /* Fallback forward button */ +#define DIBUTTON_FIGHTINGH_BACKWARD_LINK 0x080144E8 /* Fallback backward button */ +#define DIBUTTON_FIGHTINGH_DEVICE 0x080044FE /* Show input device and controls */ +#define DIBUTTON_FIGHTINGH_PAUSE 0x080044FC /* Start / Pause / Restart game */ + +/*--- Fighting - First Person Shooting + Navigation and combat are primary objectives ---*/ +#define DIVIRTUAL_FIGHTING_FPS 0x09000000 +#define DIAXIS_FPS_ROTATE 0x09008201 /* Rotate character left/right */ +#define DIAXIS_FPS_MOVE 0x09010202 /* Move forward/backward */ +#define DIBUTTON_FPS_FIRE 0x09000401 /* Fire */ +#define DIBUTTON_FPS_WEAPONS 0x09000402 /* Select next weapon */ +#define DIBUTTON_FPS_APPLY 0x09000403 /* Use item */ +#define DIBUTTON_FPS_SELECT 0x09000404 /* Select next inventory item */ +#define DIBUTTON_FPS_CROUCH 0x09000405 /* Crouch/ climb down/ swim down */ +#define DIBUTTON_FPS_JUMP 0x09000406 /* Jump/ climb up/ swim up */ +#define DIAXIS_FPS_LOOKUPDOWN 0x09018203 /* Look up / down */ +#define DIBUTTON_FPS_STRAFE 0x09000407 /* Enable strafing while active */ +#define DIBUTTON_FPS_MENU 0x090004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_FPS_GLANCE 0x09004601 /* Look around */ +#define DIBUTTON_FPS_DISPLAY 0x09004408 /* Shows next on-screen display option/ map */ +#define DIAXIS_FPS_SIDESTEP 0x09024204 /* Sidestep */ +#define DIBUTTON_FPS_DODGE 0x09004409 /* Dodge */ +#define DIBUTTON_FPS_GLANCEL 0x0900440A /* Glance Left */ +#define DIBUTTON_FPS_GLANCER 0x0900440B /* Glance Right */ +#define DIBUTTON_FPS_FIRESECONDARY 0x0900440C /* Alternative fire button */ +#define DIBUTTON_FPS_ROTATE_LEFT_LINK 0x0900C4E4 /* Fallback rotate left button */ +#define DIBUTTON_FPS_ROTATE_RIGHT_LINK 0x0900C4EC /* Fallback rotate right button */ +#define DIBUTTON_FPS_FORWARD_LINK 0x090144E0 /* Fallback forward button */ +#define DIBUTTON_FPS_BACKWARD_LINK 0x090144E8 /* Fallback backward button */ +#define DIBUTTON_FPS_GLANCE_UP_LINK 0x0901C4E0 /* Fallback look up button */ +#define DIBUTTON_FPS_GLANCE_DOWN_LINK 0x0901C4E8 /* Fallback look down button */ +#define DIBUTTON_FPS_DEVICE 0x090044FE /* Show input device and controls */ +#define DIBUTTON_FPS_PAUSE 0x090044FC /* Start / Pause / Restart game */ + +/*--- Fighting - Third Person action + Perspective of camera is behind the main character ---*/ +#define DIVIRTUAL_FIGHTING_THIRDPERSON 0x0A000000 +#define DIAXIS_TPS_TURN 0x0A020201 /* Turn left/right */ +#define DIAXIS_TPS_MOVE 0x0A010202 /* Move forward/backward */ +#define DIBUTTON_TPS_RUN 0x0A000401 /* Run or walk toggle switch */ +#define DIBUTTON_TPS_ACTION 0x0A000402 /* Action Button */ +#define DIBUTTON_TPS_SELECT 0x0A000403 /* Select next weapon */ +#define DIBUTTON_TPS_USE 0x0A000404 /* Use inventory item currently selected */ +#define DIBUTTON_TPS_JUMP 0x0A000405 /* Character Jumps */ +#define DIBUTTON_TPS_MENU 0x0A0004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_TPS_GLANCE 0x0A004601 /* Look around */ +#define DIBUTTON_TPS_VIEW 0x0A004406 /* Select camera view */ +#define DIBUTTON_TPS_STEPLEFT 0x0A004407 /* Character takes a left step */ +#define DIBUTTON_TPS_STEPRIGHT 0x0A004408 /* Character takes a right step */ +#define DIAXIS_TPS_STEP 0x0A00C203 /* Character steps left/right */ +#define DIBUTTON_TPS_DODGE 0x0A004409 /* Character dodges or ducks */ +#define DIBUTTON_TPS_INVENTORY 0x0A00440A /* Cycle through inventory */ +#define DIBUTTON_TPS_TURN_LEFT_LINK 0x0A0244E4 /* Fallback turn left button */ +#define DIBUTTON_TPS_TURN_RIGHT_LINK 0x0A0244EC /* Fallback turn right button */ +#define DIBUTTON_TPS_FORWARD_LINK 0x0A0144E0 /* Fallback forward button */ +#define DIBUTTON_TPS_BACKWARD_LINK 0x0A0144E8 /* Fallback backward button */ +#define DIBUTTON_TPS_GLANCE_UP_LINK 0x0A07C4E0 /* Fallback look up button */ +#define DIBUTTON_TPS_GLANCE_DOWN_LINK 0x0A07C4E8 /* Fallback look down button */ +#define DIBUTTON_TPS_GLANCE_LEFT_LINK 0x0A07C4E4 /* Fallback glance up button */ +#define DIBUTTON_TPS_GLANCE_RIGHT_LINK 0x0A07C4EC /* Fallback glance right button */ +#define DIBUTTON_TPS_DEVICE 0x0A0044FE /* Show input device and controls */ +#define DIBUTTON_TPS_PAUSE 0x0A0044FC /* Start / Pause / Restart game */ + +/*--- Strategy - Role Playing + Navigation and problem solving are primary actions ---*/ +#define DIVIRTUAL_STRATEGY_ROLEPLAYING 0x0B000000 +#define DIAXIS_STRATEGYR_LATERAL 0x0B008201 /* sidestep - left/right */ +#define DIAXIS_STRATEGYR_MOVE 0x0B010202 /* move forward/backward */ +#define DIBUTTON_STRATEGYR_GET 0x0B000401 /* Acquire item */ +#define DIBUTTON_STRATEGYR_APPLY 0x0B000402 /* Use selected item */ +#define DIBUTTON_STRATEGYR_SELECT 0x0B000403 /* Select nextitem */ +#define DIBUTTON_STRATEGYR_ATTACK 0x0B000404 /* Attack */ +#define DIBUTTON_STRATEGYR_CAST 0x0B000405 /* Cast Spell */ +#define DIBUTTON_STRATEGYR_CROUCH 0x0B000406 /* Crouch */ +#define DIBUTTON_STRATEGYR_JUMP 0x0B000407 /* Jump */ +#define DIBUTTON_STRATEGYR_MENU 0x0B0004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_STRATEGYR_GLANCE 0x0B004601 /* Look around */ +#define DIBUTTON_STRATEGYR_MAP 0x0B004408 /* Cycle through map options */ +#define DIBUTTON_STRATEGYR_DISPLAY 0x0B004409 /* Shows next on-screen display option */ +#define DIAXIS_STRATEGYR_ROTATE 0x0B024203 /* Turn body left/right */ +#define DIBUTTON_STRATEGYR_LEFT_LINK 0x0B00C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_STRATEGYR_RIGHT_LINK 0x0B00C4EC /* Fallback sidestep right button */ +#define DIBUTTON_STRATEGYR_FORWARD_LINK 0x0B0144E0 /* Fallback move forward button */ +#define DIBUTTON_STRATEGYR_BACK_LINK 0x0B0144E8 /* Fallback move backward button */ +#define DIBUTTON_STRATEGYR_ROTATE_LEFT_LINK 0x0B0244E4 /* Fallback turn body left button */ +#define DIBUTTON_STRATEGYR_ROTATE_RIGHT_LINK 0x0B0244EC /* Fallback turn body right button */ +#define DIBUTTON_STRATEGYR_DEVICE 0x0B0044FE /* Show input device and controls */ +#define DIBUTTON_STRATEGYR_PAUSE 0x0B0044FC /* Start / Pause / Restart game */ + +/*--- Strategy - Turn based + Navigation and problem solving are primary actions ---*/ +#define DIVIRTUAL_STRATEGY_TURN 0x0C000000 +#define DIAXIS_STRATEGYT_LATERAL 0x0C008201 /* Sidestep left/right */ +#define DIAXIS_STRATEGYT_MOVE 0x0C010202 /* Move forward/backwards */ +#define DIBUTTON_STRATEGYT_SELECT 0x0C000401 /* Select unit or object */ +#define DIBUTTON_STRATEGYT_INSTRUCT 0x0C000402 /* Cycle through instructions */ +#define DIBUTTON_STRATEGYT_APPLY 0x0C000403 /* Apply selected instruction */ +#define DIBUTTON_STRATEGYT_TEAM 0x0C000404 /* Select next team / cycle through all */ +#define DIBUTTON_STRATEGYT_TURN 0x0C000405 /* Indicate turn over */ +#define DIBUTTON_STRATEGYT_MENU 0x0C0004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIBUTTON_STRATEGYT_ZOOM 0x0C004406 /* Zoom - in / out */ +#define DIBUTTON_STRATEGYT_MAP 0x0C004407 /* cycle through map options */ +#define DIBUTTON_STRATEGYT_DISPLAY 0x0C004408 /* shows next on-screen display options */ +#define DIBUTTON_STRATEGYT_LEFT_LINK 0x0C00C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_STRATEGYT_RIGHT_LINK 0x0C00C4EC /* Fallback sidestep right button */ +#define DIBUTTON_STRATEGYT_FORWARD_LINK 0x0C0144E0 /* Fallback move forward button */ +#define DIBUTTON_STRATEGYT_BACK_LINK 0x0C0144E8 /* Fallback move back button */ +#define DIBUTTON_STRATEGYT_DEVICE 0x0C0044FE /* Show input device and controls */ +#define DIBUTTON_STRATEGYT_PAUSE 0x0C0044FC /* Start / Pause / Restart game */ + +/*--- Sports - Hunting + Hunting ---*/ +#define DIVIRTUAL_SPORTS_HUNTING 0x0D000000 +#define DIAXIS_HUNTING_LATERAL 0x0D008201 /* sidestep left/right */ +#define DIAXIS_HUNTING_MOVE 0x0D010202 /* move forward/backwards */ +#define DIBUTTON_HUNTING_FIRE 0x0D000401 /* Fire selected weapon */ +#define DIBUTTON_HUNTING_AIM 0x0D000402 /* Select aim/move */ +#define DIBUTTON_HUNTING_WEAPON 0x0D000403 /* Select next weapon */ +#define DIBUTTON_HUNTING_BINOCULAR 0x0D000404 /* Look through Binoculars */ +#define DIBUTTON_HUNTING_CALL 0x0D000405 /* Make animal call */ +#define DIBUTTON_HUNTING_MAP 0x0D000406 /* View Map */ +#define DIBUTTON_HUNTING_SPECIAL 0x0D000407 /* Special game operation */ +#define DIBUTTON_HUNTING_MENU 0x0D0004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_HUNTING_GLANCE 0x0D004601 /* Look around */ +#define DIBUTTON_HUNTING_DISPLAY 0x0D004408 /* show next on-screen display option */ +#define DIAXIS_HUNTING_ROTATE 0x0D024203 /* Turn body left/right */ +#define DIBUTTON_HUNTING_CROUCH 0x0D004409 /* Crouch/ Climb / Swim down */ +#define DIBUTTON_HUNTING_JUMP 0x0D00440A /* Jump/ Climb up / Swim up */ +#define DIBUTTON_HUNTING_FIRESECONDARY 0x0D00440B /* Alternative fire button */ +#define DIBUTTON_HUNTING_LEFT_LINK 0x0D00C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_HUNTING_RIGHT_LINK 0x0D00C4EC /* Fallback sidestep right button */ +#define DIBUTTON_HUNTING_FORWARD_LINK 0x0D0144E0 /* Fallback move forward button */ +#define DIBUTTON_HUNTING_BACK_LINK 0x0D0144E8 /* Fallback move back button */ +#define DIBUTTON_HUNTING_ROTATE_LEFT_LINK 0x0D0244E4 /* Fallback turn body left button */ +#define DIBUTTON_HUNTING_ROTATE_RIGHT_LINK 0x0D0244EC /* Fallback turn body right button */ +#define DIBUTTON_HUNTING_DEVICE 0x0D0044FE /* Show input device and controls */ +#define DIBUTTON_HUNTING_PAUSE 0x0D0044FC /* Start / Pause / Restart game */ + +/*--- Sports - Fishing + Catching Fish is primary objective ---*/ +#define DIVIRTUAL_SPORTS_FISHING 0x0E000000 +#define DIAXIS_FISHING_LATERAL 0x0E008201 /* sidestep left/right */ +#define DIAXIS_FISHING_MOVE 0x0E010202 /* move forward/backwards */ +#define DIBUTTON_FISHING_CAST 0x0E000401 /* Cast line */ +#define DIBUTTON_FISHING_TYPE 0x0E000402 /* Select cast type */ +#define DIBUTTON_FISHING_BINOCULAR 0x0E000403 /* Look through Binocular */ +#define DIBUTTON_FISHING_BAIT 0x0E000404 /* Select type of Bait */ +#define DIBUTTON_FISHING_MAP 0x0E000405 /* View Map */ +#define DIBUTTON_FISHING_MENU 0x0E0004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_FISHING_GLANCE 0x0E004601 /* Look around */ +#define DIBUTTON_FISHING_DISPLAY 0x0E004406 /* Show next on-screen display option */ +#define DIAXIS_FISHING_ROTATE 0x0E024203 /* Turn character left / right */ +#define DIBUTTON_FISHING_CROUCH 0x0E004407 /* Crouch/ Climb / Swim down */ +#define DIBUTTON_FISHING_JUMP 0x0E004408 /* Jump/ Climb up / Swim up */ +#define DIBUTTON_FISHING_LEFT_LINK 0x0E00C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_FISHING_RIGHT_LINK 0x0E00C4EC /* Fallback sidestep right button */ +#define DIBUTTON_FISHING_FORWARD_LINK 0x0E0144E0 /* Fallback move forward button */ +#define DIBUTTON_FISHING_BACK_LINK 0x0E0144E8 /* Fallback move back button */ +#define DIBUTTON_FISHING_ROTATE_LEFT_LINK 0x0E0244E4 /* Fallback turn body left button */ +#define DIBUTTON_FISHING_ROTATE_RIGHT_LINK 0x0E0244EC /* Fallback turn body right button */ +#define DIBUTTON_FISHING_DEVICE 0x0E0044FE /* Show input device and controls */ +#define DIBUTTON_FISHING_PAUSE 0x0E0044FC /* Start / Pause / Restart game */ + +/*--- Sports - Baseball - Batting + Batter control is primary objective ---*/ +#define DIVIRTUAL_SPORTS_BASEBALL_BAT 0x0F000000 +#define DIAXIS_BASEBALLB_LATERAL 0x0F008201 /* Aim left / right */ +#define DIAXIS_BASEBALLB_MOVE 0x0F010202 /* Aim up / down */ +#define DIBUTTON_BASEBALLB_SELECT 0x0F000401 /* cycle through swing options */ +#define DIBUTTON_BASEBALLB_NORMAL 0x0F000402 /* normal swing */ +#define DIBUTTON_BASEBALLB_POWER 0x0F000403 /* swing for the fence */ +#define DIBUTTON_BASEBALLB_BUNT 0x0F000404 /* bunt */ +#define DIBUTTON_BASEBALLB_STEAL 0x0F000405 /* Base runner attempts to steal a base */ +#define DIBUTTON_BASEBALLB_BURST 0x0F000406 /* Base runner invokes burst of speed */ +#define DIBUTTON_BASEBALLB_SLIDE 0x0F000407 /* Base runner slides into base */ +#define DIBUTTON_BASEBALLB_CONTACT 0x0F000408 /* Contact swing */ +#define DIBUTTON_BASEBALLB_MENU 0x0F0004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIBUTTON_BASEBALLB_NOSTEAL 0x0F004409 /* Base runner goes back to a base */ +#define DIBUTTON_BASEBALLB_BOX 0x0F00440A /* Enter or exit batting box */ +#define DIBUTTON_BASEBALLB_LEFT_LINK 0x0F00C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_BASEBALLB_RIGHT_LINK 0x0F00C4EC /* Fallback sidestep right button */ +#define DIBUTTON_BASEBALLB_FORWARD_LINK 0x0F0144E0 /* Fallback move forward button */ +#define DIBUTTON_BASEBALLB_BACK_LINK 0x0F0144E8 /* Fallback move back button */ +#define DIBUTTON_BASEBALLB_DEVICE 0x0F0044FE /* Show input device and controls */ +#define DIBUTTON_BASEBALLB_PAUSE 0x0F0044FC /* Start / Pause / Restart game */ + +/*--- Sports - Baseball - Pitching + Pitcher control is primary objective ---*/ +#define DIVIRTUAL_SPORTS_BASEBALL_PITCH 0x10000000 +#define DIAXIS_BASEBALLP_LATERAL 0x10008201 /* Aim left / right */ +#define DIAXIS_BASEBALLP_MOVE 0x10010202 /* Aim up / down */ +#define DIBUTTON_BASEBALLP_SELECT 0x10000401 /* cycle through pitch selections */ +#define DIBUTTON_BASEBALLP_PITCH 0x10000402 /* throw pitch */ +#define DIBUTTON_BASEBALLP_BASE 0x10000403 /* select base to throw to */ +#define DIBUTTON_BASEBALLP_THROW 0x10000404 /* throw to base */ +#define DIBUTTON_BASEBALLP_FAKE 0x10000405 /* Fake a throw to a base */ +#define DIBUTTON_BASEBALLP_MENU 0x100004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIBUTTON_BASEBALLP_WALK 0x10004406 /* Throw intentional walk / pitch out */ +#define DIBUTTON_BASEBALLP_LOOK 0x10004407 /* Look at runners on bases */ +#define DIBUTTON_BASEBALLP_LEFT_LINK 0x1000C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_BASEBALLP_RIGHT_LINK 0x1000C4EC /* Fallback sidestep right button */ +#define DIBUTTON_BASEBALLP_FORWARD_LINK 0x100144E0 /* Fallback move forward button */ +#define DIBUTTON_BASEBALLP_BACK_LINK 0x100144E8 /* Fallback move back button */ +#define DIBUTTON_BASEBALLP_DEVICE 0x100044FE /* Show input device and controls */ +#define DIBUTTON_BASEBALLP_PAUSE 0x100044FC /* Start / Pause / Restart game */ + +/*--- Sports - Baseball - Fielding + Fielder control is primary objective ---*/ +#define DIVIRTUAL_SPORTS_BASEBALL_FIELD 0x11000000 +#define DIAXIS_BASEBALLF_LATERAL 0x11008201 /* Aim left / right */ +#define DIAXIS_BASEBALLF_MOVE 0x11010202 /* Aim up / down */ +#define DIBUTTON_BASEBALLF_NEAREST 0x11000401 /* Switch to fielder nearest to the ball */ +#define DIBUTTON_BASEBALLF_THROW1 0x11000402 /* Make conservative throw */ +#define DIBUTTON_BASEBALLF_THROW2 0x11000403 /* Make aggressive throw */ +#define DIBUTTON_BASEBALLF_BURST 0x11000404 /* Invoke burst of speed */ +#define DIBUTTON_BASEBALLF_JUMP 0x11000405 /* Jump to catch ball */ +#define DIBUTTON_BASEBALLF_DIVE 0x11000406 /* Dive to catch ball */ +#define DIBUTTON_BASEBALLF_MENU 0x110004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIBUTTON_BASEBALLF_SHIFTIN 0x11004407 /* Shift the infield positioning */ +#define DIBUTTON_BASEBALLF_SHIFTOUT 0x11004408 /* Shift the outfield positioning */ +#define DIBUTTON_BASEBALLF_AIM_LEFT_LINK 0x1100C4E4 /* Fallback aim left button */ +#define DIBUTTON_BASEBALLF_AIM_RIGHT_LINK 0x1100C4EC /* Fallback aim right button */ +#define DIBUTTON_BASEBALLF_FORWARD_LINK 0x110144E0 /* Fallback move forward button */ +#define DIBUTTON_BASEBALLF_BACK_LINK 0x110144E8 /* Fallback move back button */ +#define DIBUTTON_BASEBALLF_DEVICE 0x110044FE /* Show input device and controls */ +#define DIBUTTON_BASEBALLF_PAUSE 0x110044FC /* Start / Pause / Restart game */ + +/*--- Sports - Basketball - Offense + Offense ---*/ +#define DIVIRTUAL_SPORTS_BASKETBALL_OFFENSE 0x12000000 +#define DIAXIS_BBALLO_LATERAL 0x12008201 /* left / right */ +#define DIAXIS_BBALLO_MOVE 0x12010202 /* up / down */ +#define DIBUTTON_BBALLO_SHOOT 0x12000401 /* shoot basket */ +#define DIBUTTON_BBALLO_DUNK 0x12000402 /* dunk basket */ +#define DIBUTTON_BBALLO_PASS 0x12000403 /* throw pass */ +#define DIBUTTON_BBALLO_FAKE 0x12000404 /* fake shot or pass */ +#define DIBUTTON_BBALLO_SPECIAL 0x12000405 /* apply special move */ +#define DIBUTTON_BBALLO_PLAYER 0x12000406 /* select next player */ +#define DIBUTTON_BBALLO_BURST 0x12000407 /* invoke burst */ +#define DIBUTTON_BBALLO_CALL 0x12000408 /* call for ball / pass to me */ +#define DIBUTTON_BBALLO_MENU 0x120004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_BBALLO_GLANCE 0x12004601 /* scroll view */ +#define DIBUTTON_BBALLO_SCREEN 0x12004409 /* Call for screen */ +#define DIBUTTON_BBALLO_PLAY 0x1200440A /* Call for specific offensive play */ +#define DIBUTTON_BBALLO_JAB 0x1200440B /* Initiate fake drive to basket */ +#define DIBUTTON_BBALLO_POST 0x1200440C /* Perform post move */ +#define DIBUTTON_BBALLO_TIMEOUT 0x1200440D /* Time Out */ +#define DIBUTTON_BBALLO_SUBSTITUTE 0x1200440E /* substitute one player for another */ +#define DIBUTTON_BBALLO_LEFT_LINK 0x1200C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_BBALLO_RIGHT_LINK 0x1200C4EC /* Fallback sidestep right button */ +#define DIBUTTON_BBALLO_FORWARD_LINK 0x120144E0 /* Fallback move forward button */ +#define DIBUTTON_BBALLO_BACK_LINK 0x120144E8 /* Fallback move back button */ +#define DIBUTTON_BBALLO_DEVICE 0x120044FE /* Show input device and controls */ +#define DIBUTTON_BBALLO_PAUSE 0x120044FC /* Start / Pause / Restart game */ + +/*--- Sports - Basketball - Defense + Defense ---*/ +#define DIVIRTUAL_SPORTS_BASKETBALL_DEFENSE 0x13000000 +#define DIAXIS_BBALLD_LATERAL 0x13008201 /* left / right */ +#define DIAXIS_BBALLD_MOVE 0x13010202 /* up / down */ +#define DIBUTTON_BBALLD_JUMP 0x13000401 /* jump to block shot */ +#define DIBUTTON_BBALLD_STEAL 0x13000402 /* attempt to steal ball */ +#define DIBUTTON_BBALLD_FAKE 0x13000403 /* fake block or steal */ +#define DIBUTTON_BBALLD_SPECIAL 0x13000404 /* apply special move */ +#define DIBUTTON_BBALLD_PLAYER 0x13000405 /* select next player */ +#define DIBUTTON_BBALLD_BURST 0x13000406 /* invoke burst */ +#define DIBUTTON_BBALLD_PLAY 0x13000407 /* call for specific defensive play */ +#define DIBUTTON_BBALLD_MENU 0x130004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_BBALLD_GLANCE 0x13004601 /* scroll view */ +#define DIBUTTON_BBALLD_TIMEOUT 0x13004408 /* Time Out */ +#define DIBUTTON_BBALLD_SUBSTITUTE 0x13004409 /* substitute one player for another */ +#define DIBUTTON_BBALLD_LEFT_LINK 0x1300C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_BBALLD_RIGHT_LINK 0x1300C4EC /* Fallback sidestep right button */ +#define DIBUTTON_BBALLD_FORWARD_LINK 0x130144E0 /* Fallback move forward button */ +#define DIBUTTON_BBALLD_BACK_LINK 0x130144E8 /* Fallback move back button */ +#define DIBUTTON_BBALLD_DEVICE 0x130044FE /* Show input device and controls */ +#define DIBUTTON_BBALLD_PAUSE 0x130044FC /* Start / Pause / Restart game */ + +/*--- Sports - Football - Play + Play selection ---*/ +#define DIVIRTUAL_SPORTS_FOOTBALL_FIELD 0x14000000 +#define DIBUTTON_FOOTBALLP_PLAY 0x14000401 /* cycle through available plays */ +#define DIBUTTON_FOOTBALLP_SELECT 0x14000402 /* select play */ +#define DIBUTTON_FOOTBALLP_HELP 0x14000403 /* Bring up pop-up help */ +#define DIBUTTON_FOOTBALLP_MENU 0x140004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIBUTTON_FOOTBALLP_DEVICE 0x140044FE /* Show input device and controls */ +#define DIBUTTON_FOOTBALLP_PAUSE 0x140044FC /* Start / Pause / Restart game */ + +/*--- Sports - Football - QB + Offense: Quarterback / Kicker ---*/ +#define DIVIRTUAL_SPORTS_FOOTBALL_QBCK 0x15000000 +#define DIAXIS_FOOTBALLQ_LATERAL 0x15008201 /* Move / Aim: left / right */ +#define DIAXIS_FOOTBALLQ_MOVE 0x15010202 /* Move / Aim: up / down */ +#define DIBUTTON_FOOTBALLQ_SELECT 0x15000401 /* Select */ +#define DIBUTTON_FOOTBALLQ_SNAP 0x15000402 /* snap ball - start play */ +#define DIBUTTON_FOOTBALLQ_JUMP 0x15000403 /* jump over defender */ +#define DIBUTTON_FOOTBALLQ_SLIDE 0x15000404 /* Dive/Slide */ +#define DIBUTTON_FOOTBALLQ_PASS 0x15000405 /* throws pass to receiver */ +#define DIBUTTON_FOOTBALLQ_FAKE 0x15000406 /* pump fake pass or fake kick */ +#define DIBUTTON_FOOTBALLQ_MENU 0x150004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIBUTTON_FOOTBALLQ_FAKESNAP 0x15004407 /* Fake snap */ +#define DIBUTTON_FOOTBALLQ_MOTION 0x15004408 /* Send receivers in motion */ +#define DIBUTTON_FOOTBALLQ_AUDIBLE 0x15004409 /* Change offensive play at line of scrimmage */ +#define DIBUTTON_FOOTBALLQ_LEFT_LINK 0x1500C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_FOOTBALLQ_RIGHT_LINK 0x1500C4EC /* Fallback sidestep right button */ +#define DIBUTTON_FOOTBALLQ_FORWARD_LINK 0x150144E0 /* Fallback move forward button */ +#define DIBUTTON_FOOTBALLQ_BACK_LINK 0x150144E8 /* Fallback move back button */ +#define DIBUTTON_FOOTBALLQ_DEVICE 0x150044FE /* Show input device and controls */ +#define DIBUTTON_FOOTBALLQ_PAUSE 0x150044FC /* Start / Pause / Restart game */ + +/*--- Sports - Football - Offense + Offense - Runner ---*/ +#define DIVIRTUAL_SPORTS_FOOTBALL_OFFENSE 0x16000000 +#define DIAXIS_FOOTBALLO_LATERAL 0x16008201 /* Move / Aim: left / right */ +#define DIAXIS_FOOTBALLO_MOVE 0x16010202 /* Move / Aim: up / down */ +#define DIBUTTON_FOOTBALLO_JUMP 0x16000401 /* jump or hurdle over defender */ +#define DIBUTTON_FOOTBALLO_LEFTARM 0x16000402 /* holds out left arm */ +#define DIBUTTON_FOOTBALLO_RIGHTARM 0x16000403 /* holds out right arm */ +#define DIBUTTON_FOOTBALLO_THROW 0x16000404 /* throw pass or lateral ball to another runner */ +#define DIBUTTON_FOOTBALLO_SPIN 0x16000405 /* Spin to avoid defenders */ +#define DIBUTTON_FOOTBALLO_MENU 0x160004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIBUTTON_FOOTBALLO_JUKE 0x16004406 /* Use special move to avoid defenders */ +#define DIBUTTON_FOOTBALLO_SHOULDER 0x16004407 /* Lower shoulder to run over defenders */ +#define DIBUTTON_FOOTBALLO_TURBO 0x16004408 /* Speed burst past defenders */ +#define DIBUTTON_FOOTBALLO_DIVE 0x16004409 /* Dive over defenders */ +#define DIBUTTON_FOOTBALLO_ZOOM 0x1600440A /* Zoom view in / out */ +#define DIBUTTON_FOOTBALLO_SUBSTITUTE 0x1600440B /* substitute one player for another */ +#define DIBUTTON_FOOTBALLO_LEFT_LINK 0x1600C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_FOOTBALLO_RIGHT_LINK 0x1600C4EC /* Fallback sidestep right button */ +#define DIBUTTON_FOOTBALLO_FORWARD_LINK 0x160144E0 /* Fallback move forward button */ +#define DIBUTTON_FOOTBALLO_BACK_LINK 0x160144E8 /* Fallback move back button */ +#define DIBUTTON_FOOTBALLO_DEVICE 0x160044FE /* Show input device and controls */ +#define DIBUTTON_FOOTBALLO_PAUSE 0x160044FC /* Start / Pause / Restart game */ + +/*--- Sports - Football - Defense + Defense ---*/ +#define DIVIRTUAL_SPORTS_FOOTBALL_DEFENSE 0x17000000 +#define DIAXIS_FOOTBALLD_LATERAL 0x17008201 /* Move / Aim: left / right */ +#define DIAXIS_FOOTBALLD_MOVE 0x17010202 /* Move / Aim: up / down */ +#define DIBUTTON_FOOTBALLD_PLAY 0x17000401 /* cycle through available plays */ +#define DIBUTTON_FOOTBALLD_SELECT 0x17000402 /* select player closest to the ball */ +#define DIBUTTON_FOOTBALLD_JUMP 0x17000403 /* jump to intercept or block */ +#define DIBUTTON_FOOTBALLD_TACKLE 0x17000404 /* tackler runner */ +#define DIBUTTON_FOOTBALLD_FAKE 0x17000405 /* hold down to fake tackle or intercept */ +#define DIBUTTON_FOOTBALLD_SUPERTACKLE 0x17000406 /* Initiate special tackle */ +#define DIBUTTON_FOOTBALLD_MENU 0x170004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIBUTTON_FOOTBALLD_SPIN 0x17004407 /* Spin to beat offensive line */ +#define DIBUTTON_FOOTBALLD_SWIM 0x17004408 /* Swim to beat the offensive line */ +#define DIBUTTON_FOOTBALLD_BULLRUSH 0x17004409 /* Bull rush the offensive line */ +#define DIBUTTON_FOOTBALLD_RIP 0x1700440A /* Rip the offensive line */ +#define DIBUTTON_FOOTBALLD_AUDIBLE 0x1700440B /* Change defensive play at the line of scrimmage */ +#define DIBUTTON_FOOTBALLD_ZOOM 0x1700440C /* Zoom view in / out */ +#define DIBUTTON_FOOTBALLD_SUBSTITUTE 0x1700440D /* substitute one player for another */ +#define DIBUTTON_FOOTBALLD_LEFT_LINK 0x1700C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_FOOTBALLD_RIGHT_LINK 0x1700C4EC /* Fallback sidestep right button */ +#define DIBUTTON_FOOTBALLD_FORWARD_LINK 0x170144E0 /* Fallback move forward button */ +#define DIBUTTON_FOOTBALLD_BACK_LINK 0x170144E8 /* Fallback move back button */ +#define DIBUTTON_FOOTBALLD_DEVICE 0x170044FE /* Show input device and controls */ +#define DIBUTTON_FOOTBALLD_PAUSE 0x170044FC /* Start / Pause / Restart game */ + +/*--- Sports - Golf + ---*/ +#define DIVIRTUAL_SPORTS_GOLF 0x18000000 +#define DIAXIS_GOLF_LATERAL 0x18008201 /* Move / Aim: left / right */ +#define DIAXIS_GOLF_MOVE 0x18010202 /* Move / Aim: up / down */ +#define DIBUTTON_GOLF_SWING 0x18000401 /* swing club */ +#define DIBUTTON_GOLF_SELECT 0x18000402 /* cycle between: club / swing strength / ball arc / ball spin */ +#define DIBUTTON_GOLF_UP 0x18000403 /* increase selection */ +#define DIBUTTON_GOLF_DOWN 0x18000404 /* decrease selection */ +#define DIBUTTON_GOLF_TERRAIN 0x18000405 /* shows terrain detail */ +#define DIBUTTON_GOLF_FLYBY 0x18000406 /* view the hole via a flyby */ +#define DIBUTTON_GOLF_MENU 0x180004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_GOLF_SCROLL 0x18004601 /* scroll view */ +#define DIBUTTON_GOLF_ZOOM 0x18004407 /* Zoom view in / out */ +#define DIBUTTON_GOLF_TIMEOUT 0x18004408 /* Call for time out */ +#define DIBUTTON_GOLF_SUBSTITUTE 0x18004409 /* substitute one player for another */ +#define DIBUTTON_GOLF_LEFT_LINK 0x1800C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_GOLF_RIGHT_LINK 0x1800C4EC /* Fallback sidestep right button */ +#define DIBUTTON_GOLF_FORWARD_LINK 0x180144E0 /* Fallback move forward button */ +#define DIBUTTON_GOLF_BACK_LINK 0x180144E8 /* Fallback move back button */ +#define DIBUTTON_GOLF_DEVICE 0x180044FE /* Show input device and controls */ +#define DIBUTTON_GOLF_PAUSE 0x180044FC /* Start / Pause / Restart game */ + +/*--- Sports - Hockey - Offense + Offense ---*/ +#define DIVIRTUAL_SPORTS_HOCKEY_OFFENSE 0x19000000 +#define DIAXIS_HOCKEYO_LATERAL 0x19008201 /* Move / Aim: left / right */ +#define DIAXIS_HOCKEYO_MOVE 0x19010202 /* Move / Aim: up / down */ +#define DIBUTTON_HOCKEYO_SHOOT 0x19000401 /* Shoot */ +#define DIBUTTON_HOCKEYO_PASS 0x19000402 /* pass the puck */ +#define DIBUTTON_HOCKEYO_BURST 0x19000403 /* invoke speed burst */ +#define DIBUTTON_HOCKEYO_SPECIAL 0x19000404 /* invoke special move */ +#define DIBUTTON_HOCKEYO_FAKE 0x19000405 /* hold down to fake pass or kick */ +#define DIBUTTON_HOCKEYO_MENU 0x190004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_HOCKEYO_SCROLL 0x19004601 /* scroll view */ +#define DIBUTTON_HOCKEYO_ZOOM 0x19004406 /* Zoom view in / out */ +#define DIBUTTON_HOCKEYO_STRATEGY 0x19004407 /* Invoke coaching menu for strategy help */ +#define DIBUTTON_HOCKEYO_TIMEOUT 0x19004408 /* Call for time out */ +#define DIBUTTON_HOCKEYO_SUBSTITUTE 0x19004409 /* substitute one player for another */ +#define DIBUTTON_HOCKEYO_LEFT_LINK 0x1900C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_HOCKEYO_RIGHT_LINK 0x1900C4EC /* Fallback sidestep right button */ +#define DIBUTTON_HOCKEYO_FORWARD_LINK 0x190144E0 /* Fallback move forward button */ +#define DIBUTTON_HOCKEYO_BACK_LINK 0x190144E8 /* Fallback move back button */ +#define DIBUTTON_HOCKEYO_DEVICE 0x190044FE /* Show input device and controls */ +#define DIBUTTON_HOCKEYO_PAUSE 0x190044FC /* Start / Pause / Restart game */ + +/*--- Sports - Hockey - Defense + Defense ---*/ +#define DIVIRTUAL_SPORTS_HOCKEY_DEFENSE 0x1A000000 +#define DIAXIS_HOCKEYD_LATERAL 0x1A008201 /* Move / Aim: left / right */ +#define DIAXIS_HOCKEYD_MOVE 0x1A010202 /* Move / Aim: up / down */ +#define DIBUTTON_HOCKEYD_PLAYER 0x1A000401 /* control player closest to the puck */ +#define DIBUTTON_HOCKEYD_STEAL 0x1A000402 /* attempt steal */ +#define DIBUTTON_HOCKEYD_BURST 0x1A000403 /* speed burst or body check */ +#define DIBUTTON_HOCKEYD_BLOCK 0x1A000404 /* block puck */ +#define DIBUTTON_HOCKEYD_FAKE 0x1A000405 /* hold down to fake tackle or intercept */ +#define DIBUTTON_HOCKEYD_MENU 0x1A0004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_HOCKEYD_SCROLL 0x1A004601 /* scroll view */ +#define DIBUTTON_HOCKEYD_ZOOM 0x1A004406 /* Zoom view in / out */ +#define DIBUTTON_HOCKEYD_STRATEGY 0x1A004407 /* Invoke coaching menu for strategy help */ +#define DIBUTTON_HOCKEYD_TIMEOUT 0x1A004408 /* Call for time out */ +#define DIBUTTON_HOCKEYD_SUBSTITUTE 0x1A004409 /* substitute one player for another */ +#define DIBUTTON_HOCKEYD_LEFT_LINK 0x1A00C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_HOCKEYD_RIGHT_LINK 0x1A00C4EC /* Fallback sidestep right button */ +#define DIBUTTON_HOCKEYD_FORWARD_LINK 0x1A0144E0 /* Fallback move forward button */ +#define DIBUTTON_HOCKEYD_BACK_LINK 0x1A0144E8 /* Fallback move back button */ +#define DIBUTTON_HOCKEYD_DEVICE 0x1A0044FE /* Show input device and controls */ +#define DIBUTTON_HOCKEYD_PAUSE 0x1A0044FC /* Start / Pause / Restart game */ + +/*--- Sports - Hockey - Goalie + Goal tending ---*/ +#define DIVIRTUAL_SPORTS_HOCKEY_GOALIE 0x1B000000 +#define DIAXIS_HOCKEYG_LATERAL 0x1B008201 /* Move / Aim: left / right */ +#define DIAXIS_HOCKEYG_MOVE 0x1B010202 /* Move / Aim: up / down */ +#define DIBUTTON_HOCKEYG_PASS 0x1B000401 /* pass puck */ +#define DIBUTTON_HOCKEYG_POKE 0x1B000402 /* poke / check / hack */ +#define DIBUTTON_HOCKEYG_STEAL 0x1B000403 /* attempt steal */ +#define DIBUTTON_HOCKEYG_BLOCK 0x1B000404 /* block puck */ +#define DIBUTTON_HOCKEYG_MENU 0x1B0004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_HOCKEYG_SCROLL 0x1B004601 /* scroll view */ +#define DIBUTTON_HOCKEYG_ZOOM 0x1B004405 /* Zoom view in / out */ +#define DIBUTTON_HOCKEYG_STRATEGY 0x1B004406 /* Invoke coaching menu for strategy help */ +#define DIBUTTON_HOCKEYG_TIMEOUT 0x1B004407 /* Call for time out */ +#define DIBUTTON_HOCKEYG_SUBSTITUTE 0x1B004408 /* substitute one player for another */ +#define DIBUTTON_HOCKEYG_LEFT_LINK 0x1B00C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_HOCKEYG_RIGHT_LINK 0x1B00C4EC /* Fallback sidestep right button */ +#define DIBUTTON_HOCKEYG_FORWARD_LINK 0x1B0144E0 /* Fallback move forward button */ +#define DIBUTTON_HOCKEYG_BACK_LINK 0x1B0144E8 /* Fallback move back button */ +#define DIBUTTON_HOCKEYG_DEVICE 0x1B0044FE /* Show input device and controls */ +#define DIBUTTON_HOCKEYG_PAUSE 0x1B0044FC /* Start / Pause / Restart game */ + +/*--- Sports - Mountain Biking + ---*/ +#define DIVIRTUAL_SPORTS_BIKING_MOUNTAIN 0x1C000000 +#define DIAXIS_BIKINGM_TURN 0x1C008201 /* left / right */ +#define DIAXIS_BIKINGM_PEDAL 0x1C010202 /* Pedal faster / slower / brake */ +#define DIBUTTON_BIKINGM_JUMP 0x1C000401 /* jump over obstacle */ +#define DIBUTTON_BIKINGM_CAMERA 0x1C000402 /* switch camera view */ +#define DIBUTTON_BIKINGM_SPECIAL1 0x1C000403 /* perform first special move */ +#define DIBUTTON_BIKINGM_SELECT 0x1C000404 /* Select */ +#define DIBUTTON_BIKINGM_SPECIAL2 0x1C000405 /* perform second special move */ +#define DIBUTTON_BIKINGM_MENU 0x1C0004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_BIKINGM_SCROLL 0x1C004601 /* scroll view */ +#define DIBUTTON_BIKINGM_ZOOM 0x1C004406 /* Zoom view in / out */ +#define DIAXIS_BIKINGM_BRAKE 0x1C044203 /* Brake axis */ +#define DIBUTTON_BIKINGM_LEFT_LINK 0x1C00C4E4 /* Fallback turn left button */ +#define DIBUTTON_BIKINGM_RIGHT_LINK 0x1C00C4EC /* Fallback turn right button */ +#define DIBUTTON_BIKINGM_FASTER_LINK 0x1C0144E0 /* Fallback pedal faster button */ +#define DIBUTTON_BIKINGM_SLOWER_LINK 0x1C0144E8 /* Fallback pedal slower button */ +#define DIBUTTON_BIKINGM_BRAKE_BUTTON_LINK 0x1C0444E8 /* Fallback brake button */ +#define DIBUTTON_BIKINGM_DEVICE 0x1C0044FE /* Show input device and controls */ +#define DIBUTTON_BIKINGM_PAUSE 0x1C0044FC /* Start / Pause / Restart game */ + +/*--- Sports: Skiing / Snowboarding / Skateboarding + ---*/ +#define DIVIRTUAL_SPORTS_SKIING 0x1D000000 +#define DIAXIS_SKIING_TURN 0x1D008201 /* left / right */ +#define DIAXIS_SKIING_SPEED 0x1D010202 /* faster / slower */ +#define DIBUTTON_SKIING_JUMP 0x1D000401 /* Jump */ +#define DIBUTTON_SKIING_CROUCH 0x1D000402 /* crouch down */ +#define DIBUTTON_SKIING_CAMERA 0x1D000403 /* switch camera view */ +#define DIBUTTON_SKIING_SPECIAL1 0x1D000404 /* perform first special move */ +#define DIBUTTON_SKIING_SELECT 0x1D000405 /* Select */ +#define DIBUTTON_SKIING_SPECIAL2 0x1D000406 /* perform second special move */ +#define DIBUTTON_SKIING_MENU 0x1D0004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_SKIING_GLANCE 0x1D004601 /* scroll view */ +#define DIBUTTON_SKIING_ZOOM 0x1D004407 /* Zoom view in / out */ +#define DIBUTTON_SKIING_LEFT_LINK 0x1D00C4E4 /* Fallback turn left button */ +#define DIBUTTON_SKIING_RIGHT_LINK 0x1D00C4EC /* Fallback turn right button */ +#define DIBUTTON_SKIING_FASTER_LINK 0x1D0144E0 /* Fallback increase speed button */ +#define DIBUTTON_SKIING_SLOWER_LINK 0x1D0144E8 /* Fallback decrease speed button */ +#define DIBUTTON_SKIING_DEVICE 0x1D0044FE /* Show input device and controls */ +#define DIBUTTON_SKIING_PAUSE 0x1D0044FC /* Start / Pause / Restart game */ + +/*--- Sports - Soccer - Offense + Offense ---*/ +#define DIVIRTUAL_SPORTS_SOCCER_OFFENSE 0x1E000000 +#define DIAXIS_SOCCERO_LATERAL 0x1E008201 /* Move / Aim: left / right */ +#define DIAXIS_SOCCERO_MOVE 0x1E010202 /* Move / Aim: up / down */ +#define DIAXIS_SOCCERO_BEND 0x1E018203 /* Bend to soccer shot/pass */ +#define DIBUTTON_SOCCERO_SHOOT 0x1E000401 /* Shoot the ball */ +#define DIBUTTON_SOCCERO_PASS 0x1E000402 /* Pass */ +#define DIBUTTON_SOCCERO_FAKE 0x1E000403 /* Fake */ +#define DIBUTTON_SOCCERO_PLAYER 0x1E000404 /* Select next player */ +#define DIBUTTON_SOCCERO_SPECIAL1 0x1E000405 /* Apply special move */ +#define DIBUTTON_SOCCERO_SELECT 0x1E000406 /* Select special move */ +#define DIBUTTON_SOCCERO_MENU 0x1E0004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_SOCCERO_GLANCE 0x1E004601 /* scroll view */ +#define DIBUTTON_SOCCERO_SUBSTITUTE 0x1E004407 /* Substitute one player for another */ +#define DIBUTTON_SOCCERO_SHOOTLOW 0x1E004408 /* Shoot the ball low */ +#define DIBUTTON_SOCCERO_SHOOTHIGH 0x1E004409 /* Shoot the ball high */ +#define DIBUTTON_SOCCERO_PASSTHRU 0x1E00440A /* Make a thru pass */ +#define DIBUTTON_SOCCERO_SPRINT 0x1E00440B /* Sprint / turbo boost */ +#define DIBUTTON_SOCCERO_CONTROL 0x1E00440C /* Obtain control of the ball */ +#define DIBUTTON_SOCCERO_HEAD 0x1E00440D /* Attempt to head the ball */ +#define DIBUTTON_SOCCERO_LEFT_LINK 0x1E00C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_SOCCERO_RIGHT_LINK 0x1E00C4EC /* Fallback sidestep right button */ +#define DIBUTTON_SOCCERO_FORWARD_LINK 0x1E0144E0 /* Fallback move forward button */ +#define DIBUTTON_SOCCERO_BACK_LINK 0x1E0144E8 /* Fallback move back button */ +#define DIBUTTON_SOCCERO_DEVICE 0x1E0044FE /* Show input device and controls */ +#define DIBUTTON_SOCCERO_PAUSE 0x1E0044FC /* Start / Pause / Restart game */ + +/*--- Sports - Soccer - Defense + Defense ---*/ +#define DIVIRTUAL_SPORTS_SOCCER_DEFENSE 0x1F000000 +#define DIAXIS_SOCCERD_LATERAL 0x1F008201 /* Move / Aim: left / right */ +#define DIAXIS_SOCCERD_MOVE 0x1F010202 /* Move / Aim: up / down */ +#define DIBUTTON_SOCCERD_BLOCK 0x1F000401 /* Attempt to block shot */ +#define DIBUTTON_SOCCERD_STEAL 0x1F000402 /* Attempt to steal ball */ +#define DIBUTTON_SOCCERD_FAKE 0x1F000403 /* Fake a block or a steal */ +#define DIBUTTON_SOCCERD_PLAYER 0x1F000404 /* Select next player */ +#define DIBUTTON_SOCCERD_SPECIAL 0x1F000405 /* Apply special move */ +#define DIBUTTON_SOCCERD_SELECT 0x1F000406 /* Select special move */ +#define DIBUTTON_SOCCERD_SLIDE 0x1F000407 /* Attempt a slide tackle */ +#define DIBUTTON_SOCCERD_MENU 0x1F0004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_SOCCERD_GLANCE 0x1F004601 /* scroll view */ +#define DIBUTTON_SOCCERD_FOUL 0x1F004408 /* Initiate a foul / hard-foul */ +#define DIBUTTON_SOCCERD_HEAD 0x1F004409 /* Attempt a Header */ +#define DIBUTTON_SOCCERD_CLEAR 0x1F00440A /* Attempt to clear the ball down the field */ +#define DIBUTTON_SOCCERD_GOALIECHARGE 0x1F00440B /* Make the goalie charge out of the box */ +#define DIBUTTON_SOCCERD_SUBSTITUTE 0x1F00440C /* Substitute one player for another */ +#define DIBUTTON_SOCCERD_LEFT_LINK 0x1F00C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_SOCCERD_RIGHT_LINK 0x1F00C4EC /* Fallback sidestep right button */ +#define DIBUTTON_SOCCERD_FORWARD_LINK 0x1F0144E0 /* Fallback move forward button */ +#define DIBUTTON_SOCCERD_BACK_LINK 0x1F0144E8 /* Fallback move back button */ +#define DIBUTTON_SOCCERD_DEVICE 0x1F0044FE /* Show input device and controls */ +#define DIBUTTON_SOCCERD_PAUSE 0x1F0044FC /* Start / Pause / Restart game */ + +/*--- Sports - Racquet + Tennis - Table-Tennis - Squash ---*/ +#define DIVIRTUAL_SPORTS_RACQUET 0x20000000 +#define DIAXIS_RACQUET_LATERAL 0x20008201 /* Move / Aim: left / right */ +#define DIAXIS_RACQUET_MOVE 0x20010202 /* Move / Aim: up / down */ +#define DIBUTTON_RACQUET_SWING 0x20000401 /* Swing racquet */ +#define DIBUTTON_RACQUET_BACKSWING 0x20000402 /* Swing backhand */ +#define DIBUTTON_RACQUET_SMASH 0x20000403 /* Smash shot */ +#define DIBUTTON_RACQUET_SPECIAL 0x20000404 /* Special shot */ +#define DIBUTTON_RACQUET_SELECT 0x20000405 /* Select special shot */ +#define DIBUTTON_RACQUET_MENU 0x200004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_RACQUET_GLANCE 0x20004601 /* scroll view */ +#define DIBUTTON_RACQUET_TIMEOUT 0x20004406 /* Call for time out */ +#define DIBUTTON_RACQUET_SUBSTITUTE 0x20004407 /* Substitute one player for another */ +#define DIBUTTON_RACQUET_LEFT_LINK 0x2000C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_RACQUET_RIGHT_LINK 0x2000C4EC /* Fallback sidestep right button */ +#define DIBUTTON_RACQUET_FORWARD_LINK 0x200144E0 /* Fallback move forward button */ +#define DIBUTTON_RACQUET_BACK_LINK 0x200144E8 /* Fallback move back button */ +#define DIBUTTON_RACQUET_DEVICE 0x200044FE /* Show input device and controls */ +#define DIBUTTON_RACQUET_PAUSE 0x200044FC /* Start / Pause / Restart game */ + +/*--- Arcade- 2D + Side to Side movement ---*/ +#define DIVIRTUAL_ARCADE_SIDE2SIDE 0x21000000 +#define DIAXIS_ARCADES_LATERAL 0x21008201 /* left / right */ +#define DIAXIS_ARCADES_MOVE 0x21010202 /* up / down */ +#define DIBUTTON_ARCADES_THROW 0x21000401 /* throw object */ +#define DIBUTTON_ARCADES_CARRY 0x21000402 /* carry object */ +#define DIBUTTON_ARCADES_ATTACK 0x21000403 /* attack */ +#define DIBUTTON_ARCADES_SPECIAL 0x21000404 /* apply special move */ +#define DIBUTTON_ARCADES_SELECT 0x21000405 /* select special move */ +#define DIBUTTON_ARCADES_MENU 0x210004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_ARCADES_VIEW 0x21004601 /* scroll view left / right / up / down */ +#define DIBUTTON_ARCADES_LEFT_LINK 0x2100C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_ARCADES_RIGHT_LINK 0x2100C4EC /* Fallback sidestep right button */ +#define DIBUTTON_ARCADES_FORWARD_LINK 0x210144E0 /* Fallback move forward button */ +#define DIBUTTON_ARCADES_BACK_LINK 0x210144E8 /* Fallback move back button */ +#define DIBUTTON_ARCADES_VIEW_UP_LINK 0x2107C4E0 /* Fallback scroll view up button */ +#define DIBUTTON_ARCADES_VIEW_DOWN_LINK 0x2107C4E8 /* Fallback scroll view down button */ +#define DIBUTTON_ARCADES_VIEW_LEFT_LINK 0x2107C4E4 /* Fallback scroll view left button */ +#define DIBUTTON_ARCADES_VIEW_RIGHT_LINK 0x2107C4EC /* Fallback scroll view right button */ +#define DIBUTTON_ARCADES_DEVICE 0x210044FE /* Show input device and controls */ +#define DIBUTTON_ARCADES_PAUSE 0x210044FC /* Start / Pause / Restart game */ + +/*--- Arcade - Platform Game + Character moves around on screen ---*/ +#define DIVIRTUAL_ARCADE_PLATFORM 0x22000000 +#define DIAXIS_ARCADEP_LATERAL 0x22008201 /* Left / right */ +#define DIAXIS_ARCADEP_MOVE 0x22010202 /* Up / down */ +#define DIBUTTON_ARCADEP_JUMP 0x22000401 /* Jump */ +#define DIBUTTON_ARCADEP_FIRE 0x22000402 /* Fire */ +#define DIBUTTON_ARCADEP_CROUCH 0x22000403 /* Crouch */ +#define DIBUTTON_ARCADEP_SPECIAL 0x22000404 /* Apply special move */ +#define DIBUTTON_ARCADEP_SELECT 0x22000405 /* Select special move */ +#define DIBUTTON_ARCADEP_MENU 0x220004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_ARCADEP_VIEW 0x22004601 /* Scroll view */ +#define DIBUTTON_ARCADEP_FIRESECONDARY 0x22004406 /* Alternative fire button */ +#define DIBUTTON_ARCADEP_LEFT_LINK 0x2200C4E4 /* Fallback sidestep left button */ +#define DIBUTTON_ARCADEP_RIGHT_LINK 0x2200C4EC /* Fallback sidestep right button */ +#define DIBUTTON_ARCADEP_FORWARD_LINK 0x220144E0 /* Fallback move forward button */ +#define DIBUTTON_ARCADEP_BACK_LINK 0x220144E8 /* Fallback move back button */ +#define DIBUTTON_ARCADEP_VIEW_UP_LINK 0x2207C4E0 /* Fallback scroll view up button */ +#define DIBUTTON_ARCADEP_VIEW_DOWN_LINK 0x2207C4E8 /* Fallback scroll view down button */ +#define DIBUTTON_ARCADEP_VIEW_LEFT_LINK 0x2207C4E4 /* Fallback scroll view left button */ +#define DIBUTTON_ARCADEP_VIEW_RIGHT_LINK 0x2207C4EC /* Fallback scroll view right button */ +#define DIBUTTON_ARCADEP_DEVICE 0x220044FE /* Show input device and controls */ +#define DIBUTTON_ARCADEP_PAUSE 0x220044FC /* Start / Pause / Restart game */ + +/*--- CAD - 2D Object Control + Controls to select and move objects in 2D ---*/ +#define DIVIRTUAL_CAD_2DCONTROL 0x23000000 +#define DIAXIS_2DCONTROL_LATERAL 0x23008201 /* Move view left / right */ +#define DIAXIS_2DCONTROL_MOVE 0x23010202 /* Move view up / down */ +#define DIAXIS_2DCONTROL_INOUT 0x23018203 /* Zoom - in / out */ +#define DIBUTTON_2DCONTROL_SELECT 0x23000401 /* Select Object */ +#define DIBUTTON_2DCONTROL_SPECIAL1 0x23000402 /* Do first special operation */ +#define DIBUTTON_2DCONTROL_SPECIAL 0x23000403 /* Select special operation */ +#define DIBUTTON_2DCONTROL_SPECIAL2 0x23000404 /* Do second special operation */ +#define DIBUTTON_2DCONTROL_MENU 0x230004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_2DCONTROL_HATSWITCH 0x23004601 /* Hat switch */ +#define DIAXIS_2DCONTROL_ROTATEZ 0x23024204 /* Rotate view clockwise / counterclockwise */ +#define DIBUTTON_2DCONTROL_DISPLAY 0x23004405 /* Shows next on-screen display options */ +#define DIBUTTON_2DCONTROL_DEVICE 0x230044FE /* Show input device and controls */ +#define DIBUTTON_2DCONTROL_PAUSE 0x230044FC /* Start / Pause / Restart game */ + +/*--- CAD - 3D object control + Controls to select and move objects within a 3D environment ---*/ +#define DIVIRTUAL_CAD_3DCONTROL 0x24000000 +#define DIAXIS_3DCONTROL_LATERAL 0x24008201 /* Move view left / right */ +#define DIAXIS_3DCONTROL_MOVE 0x24010202 /* Move view up / down */ +#define DIAXIS_3DCONTROL_INOUT 0x24018203 /* Zoom - in / out */ +#define DIBUTTON_3DCONTROL_SELECT 0x24000401 /* Select Object */ +#define DIBUTTON_3DCONTROL_SPECIAL1 0x24000402 /* Do first special operation */ +#define DIBUTTON_3DCONTROL_SPECIAL 0x24000403 /* Select special operation */ +#define DIBUTTON_3DCONTROL_SPECIAL2 0x24000404 /* Do second special operation */ +#define DIBUTTON_3DCONTROL_MENU 0x240004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_3DCONTROL_HATSWITCH 0x24004601 /* Hat switch */ +#define DIAXIS_3DCONTROL_ROTATEX 0x24034204 /* Rotate view forward or up / backward or down */ +#define DIAXIS_3DCONTROL_ROTATEY 0x2402C205 /* Rotate view clockwise / counterclockwise */ +#define DIAXIS_3DCONTROL_ROTATEZ 0x24024206 /* Rotate view left / right */ +#define DIBUTTON_3DCONTROL_DISPLAY 0x24004405 /* Show next on-screen display options */ +#define DIBUTTON_3DCONTROL_DEVICE 0x240044FE /* Show input device and controls */ +#define DIBUTTON_3DCONTROL_PAUSE 0x240044FC /* Start / Pause / Restart game */ + +/*--- CAD - 3D Navigation - Fly through + Controls for 3D modeling ---*/ +#define DIVIRTUAL_CAD_FLYBY 0x25000000 +#define DIAXIS_CADF_LATERAL 0x25008201 /* move view left / right */ +#define DIAXIS_CADF_MOVE 0x25010202 /* move view up / down */ +#define DIAXIS_CADF_INOUT 0x25018203 /* in / out */ +#define DIBUTTON_CADF_SELECT 0x25000401 /* Select Object */ +#define DIBUTTON_CADF_SPECIAL1 0x25000402 /* do first special operation */ +#define DIBUTTON_CADF_SPECIAL 0x25000403 /* Select special operation */ +#define DIBUTTON_CADF_SPECIAL2 0x25000404 /* do second special operation */ +#define DIBUTTON_CADF_MENU 0x250004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_CADF_HATSWITCH 0x25004601 /* Hat switch */ +#define DIAXIS_CADF_ROTATEX 0x25034204 /* Rotate view forward or up / backward or down */ +#define DIAXIS_CADF_ROTATEY 0x2502C205 /* Rotate view clockwise / counterclockwise */ +#define DIAXIS_CADF_ROTATEZ 0x25024206 /* Rotate view left / right */ +#define DIBUTTON_CADF_DISPLAY 0x25004405 /* shows next on-screen display options */ +#define DIBUTTON_CADF_DEVICE 0x250044FE /* Show input device and controls */ +#define DIBUTTON_CADF_PAUSE 0x250044FC /* Start / Pause / Restart game */ + +/*--- CAD - 3D Model Control + Controls for 3D modeling ---*/ +#define DIVIRTUAL_CAD_MODEL 0x26000000 +#define DIAXIS_CADM_LATERAL 0x26008201 /* move view left / right */ +#define DIAXIS_CADM_MOVE 0x26010202 /* move view up / down */ +#define DIAXIS_CADM_INOUT 0x26018203 /* in / out */ +#define DIBUTTON_CADM_SELECT 0x26000401 /* Select Object */ +#define DIBUTTON_CADM_SPECIAL1 0x26000402 /* do first special operation */ +#define DIBUTTON_CADM_SPECIAL 0x26000403 /* Select special operation */ +#define DIBUTTON_CADM_SPECIAL2 0x26000404 /* do second special operation */ +#define DIBUTTON_CADM_MENU 0x260004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIHATSWITCH_CADM_HATSWITCH 0x26004601 /* Hat switch */ +#define DIAXIS_CADM_ROTATEX 0x26034204 /* Rotate view forward or up / backward or down */ +#define DIAXIS_CADM_ROTATEY 0x2602C205 /* Rotate view clockwise / counterclockwise */ +#define DIAXIS_CADM_ROTATEZ 0x26024206 /* Rotate view left / right */ +#define DIBUTTON_CADM_DISPLAY 0x26004405 /* shows next on-screen display options */ +#define DIBUTTON_CADM_DEVICE 0x260044FE /* Show input device and controls */ +#define DIBUTTON_CADM_PAUSE 0x260044FC /* Start / Pause / Restart game */ + +/*--- Control - Media Equipment + Remote ---*/ +#define DIVIRTUAL_REMOTE_CONTROL 0x27000000 +#define DIAXIS_REMOTE_SLIDER 0x27050201 /* Slider for adjustment: volume / color / bass / etc */ +#define DIBUTTON_REMOTE_MUTE 0x27000401 /* Set volume on current device to zero */ +#define DIBUTTON_REMOTE_SELECT 0x27000402 /* Next/previous: channel/ track / chapter / picture / station */ +#define DIBUTTON_REMOTE_PLAY 0x27002403 /* Start or pause entertainment on current device */ +#define DIBUTTON_REMOTE_CUE 0x27002404 /* Move through current media */ +#define DIBUTTON_REMOTE_REVIEW 0x27002405 /* Move through current media */ +#define DIBUTTON_REMOTE_CHANGE 0x27002406 /* Select next device */ +#define DIBUTTON_REMOTE_RECORD 0x27002407 /* Start recording the current media */ +#define DIBUTTON_REMOTE_MENU 0x270004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIAXIS_REMOTE_SLIDER2 0x27054202 /* Slider for adjustment: volume */ +#define DIBUTTON_REMOTE_TV 0x27005C08 /* Select TV */ +#define DIBUTTON_REMOTE_CABLE 0x27005C09 /* Select cable box */ +#define DIBUTTON_REMOTE_CD 0x27005C0A /* Select CD player */ +#define DIBUTTON_REMOTE_VCR 0x27005C0B /* Select VCR */ +#define DIBUTTON_REMOTE_TUNER 0x27005C0C /* Select tuner */ +#define DIBUTTON_REMOTE_DVD 0x27005C0D /* Select DVD player */ +#define DIBUTTON_REMOTE_ADJUST 0x27005C0E /* Enter device adjustment menu */ +#define DIBUTTON_REMOTE_DIGIT0 0x2700540F /* Digit 0 */ +#define DIBUTTON_REMOTE_DIGIT1 0x27005410 /* Digit 1 */ +#define DIBUTTON_REMOTE_DIGIT2 0x27005411 /* Digit 2 */ +#define DIBUTTON_REMOTE_DIGIT3 0x27005412 /* Digit 3 */ +#define DIBUTTON_REMOTE_DIGIT4 0x27005413 /* Digit 4 */ +#define DIBUTTON_REMOTE_DIGIT5 0x27005414 /* Digit 5 */ +#define DIBUTTON_REMOTE_DIGIT6 0x27005415 /* Digit 6 */ +#define DIBUTTON_REMOTE_DIGIT7 0x27005416 /* Digit 7 */ +#define DIBUTTON_REMOTE_DIGIT8 0x27005417 /* Digit 8 */ +#define DIBUTTON_REMOTE_DIGIT9 0x27005418 /* Digit 9 */ +#define DIBUTTON_REMOTE_DEVICE 0x270044FE /* Show input device and controls */ +#define DIBUTTON_REMOTE_PAUSE 0x270044FC /* Start / Pause / Restart game */ + +/*--- Control- Web + Help or Browser ---*/ +#define DIVIRTUAL_BROWSER_CONTROL 0x28000000 +#define DIAXIS_BROWSER_LATERAL 0x28008201 /* Move on screen pointer */ +#define DIAXIS_BROWSER_MOVE 0x28010202 /* Move on screen pointer */ +#define DIBUTTON_BROWSER_SELECT 0x28000401 /* Select current item */ +#define DIAXIS_BROWSER_VIEW 0x28018203 /* Move view up/down */ +#define DIBUTTON_BROWSER_REFRESH 0x28000402 /* Refresh */ +#define DIBUTTON_BROWSER_MENU 0x280004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIBUTTON_BROWSER_SEARCH 0x28004403 /* Use search tool */ +#define DIBUTTON_BROWSER_STOP 0x28004404 /* Cease current update */ +#define DIBUTTON_BROWSER_HOME 0x28004405 /* Go directly to "home" location */ +#define DIBUTTON_BROWSER_FAVORITES 0x28004406 /* Mark current site as favorite */ +#define DIBUTTON_BROWSER_NEXT 0x28004407 /* Select Next page */ +#define DIBUTTON_BROWSER_PREVIOUS 0x28004408 /* Select Previous page */ +#define DIBUTTON_BROWSER_HISTORY 0x28004409 /* Show/Hide History */ +#define DIBUTTON_BROWSER_PRINT 0x2800440A /* Print current page */ +#define DIBUTTON_BROWSER_DEVICE 0x280044FE /* Show input device and controls */ +#define DIBUTTON_BROWSER_PAUSE 0x280044FC /* Start / Pause / Restart game */ + +/*--- Driving Simulator - Giant Walking Robot + Walking tank with weapons ---*/ +#define DIVIRTUAL_DRIVING_MECHA 0x29000000 +#define DIAXIS_MECHA_STEER 0x29008201 /* Turns mecha left/right */ +#define DIAXIS_MECHA_TORSO 0x29010202 /* Tilts torso forward/backward */ +#define DIAXIS_MECHA_ROTATE 0x29020203 /* Turns torso left/right */ +#define DIAXIS_MECHA_THROTTLE 0x29038204 /* Engine Speed */ +#define DIBUTTON_MECHA_FIRE 0x29000401 /* Fire */ +#define DIBUTTON_MECHA_WEAPONS 0x29000402 /* Select next weapon group */ +#define DIBUTTON_MECHA_TARGET 0x29000403 /* Select closest enemy available target */ +#define DIBUTTON_MECHA_REVERSE 0x29000404 /* Toggles throttle in/out of reverse */ +#define DIBUTTON_MECHA_ZOOM 0x29000405 /* Zoom in/out targeting reticule */ +#define DIBUTTON_MECHA_JUMP 0x29000406 /* Fires jump jets */ +#define DIBUTTON_MECHA_MENU 0x290004FD /* Show menu options */ +/*--- Priority 2 controls ---*/ + +#define DIBUTTON_MECHA_CENTER 0x29004407 /* Center torso to legs */ +#define DIHATSWITCH_MECHA_GLANCE 0x29004601 /* Look around */ +#define DIBUTTON_MECHA_VIEW 0x29004408 /* Cycle through view options */ +#define DIBUTTON_MECHA_FIRESECONDARY 0x29004409 /* Alternative fire button */ +#define DIBUTTON_MECHA_LEFT_LINK 0x2900C4E4 /* Fallback steer left button */ +#define DIBUTTON_MECHA_RIGHT_LINK 0x2900C4EC /* Fallback steer right button */ +#define DIBUTTON_MECHA_FORWARD_LINK 0x290144E0 /* Fallback tilt torso forward button */ +#define DIBUTTON_MECHA_BACK_LINK 0x290144E8 /* Fallback tilt toroso backward button */ +#define DIBUTTON_MECHA_ROTATE_LEFT_LINK 0x290244E4 /* Fallback rotate toroso right button */ +#define DIBUTTON_MECHA_ROTATE_RIGHT_LINK 0x290244EC /* Fallback rotate torso left button */ +#define DIBUTTON_MECHA_FASTER_LINK 0x2903C4E0 /* Fallback increase engine speed */ +#define DIBUTTON_MECHA_SLOWER_LINK 0x2903C4E8 /* Fallback decrease engine speed */ +#define DIBUTTON_MECHA_DEVICE 0x290044FE /* Show input device and controls */ +#define DIBUTTON_MECHA_PAUSE 0x290044FC /* Start / Pause / Restart game */ + +/* + * "ANY" semantics can be used as a last resort to get mappings for actions + * that match nothing in the chosen virtual genre. These semantics will be + * mapped at a lower priority that virtual genre semantics. Also, hardware + * vendors will not be able to provide sensible mappings for these unless + * they provide application specific mappings. + */ +#define DIAXIS_ANY_X_1 0xFF00C201 +#define DIAXIS_ANY_X_2 0xFF00C202 +#define DIAXIS_ANY_Y_1 0xFF014201 +#define DIAXIS_ANY_Y_2 0xFF014202 +#define DIAXIS_ANY_Z_1 0xFF01C201 +#define DIAXIS_ANY_Z_2 0xFF01C202 +#define DIAXIS_ANY_R_1 0xFF024201 +#define DIAXIS_ANY_R_2 0xFF024202 +#define DIAXIS_ANY_U_1 0xFF02C201 +#define DIAXIS_ANY_U_2 0xFF02C202 +#define DIAXIS_ANY_V_1 0xFF034201 +#define DIAXIS_ANY_V_2 0xFF034202 +#define DIAXIS_ANY_A_1 0xFF03C201 +#define DIAXIS_ANY_A_2 0xFF03C202 +#define DIAXIS_ANY_B_1 0xFF044201 +#define DIAXIS_ANY_B_2 0xFF044202 +#define DIAXIS_ANY_C_1 0xFF04C201 +#define DIAXIS_ANY_C_2 0xFF04C202 +#define DIAXIS_ANY_S_1 0xFF054201 +#define DIAXIS_ANY_S_2 0xFF054202 + +#define DIAXIS_ANY_1 0xFF004201 +#define DIAXIS_ANY_2 0xFF004202 +#define DIAXIS_ANY_3 0xFF004203 +#define DIAXIS_ANY_4 0xFF004204 + +#define DIPOV_ANY_1 0xFF004601 +#define DIPOV_ANY_2 0xFF004602 +#define DIPOV_ANY_3 0xFF004603 +#define DIPOV_ANY_4 0xFF004604 + +#define DIBUTTON_ANY(instance) ( 0xFF004400 | instance ) + + +#ifdef __cplusplus +}; +#endif + +#endif /* __DINPUT_INCLUDED__ */ + +/**************************************************************************** + * + * Definitions for non-IDirectInput (VJoyD) features defined more recently + * than the current sdk files + * + ****************************************************************************/ + +#ifdef _INC_MMSYSTEM +#ifndef MMNOJOY + +#ifndef __VJOYDX_INCLUDED__ +#define __VJOYDX_INCLUDED__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * Flag to indicate that the dwReserved2 field of the JOYINFOEX structure + * contains mini-driver specific data to be passed by VJoyD to the mini- + * driver instead of doing a poll. + */ +#define JOY_PASSDRIVERDATA 0x10000000l + +/* + * Informs the joystick driver that the configuration has been changed + * and should be reloaded from the registery. + * dwFlags is reserved and should be set to zero + */ +WINMMAPI MMRESULT WINAPI joyConfigChanged( DWORD dwFlags ); + + +/* + * Hardware Setting indicating that the device is a headtracker + */ +#define JOY_HWS_ISHEADTRACKER 0x02000000l + +/* + * Hardware Setting indicating that the VxD is used to replace + * the standard analog polling + */ +#define JOY_HWS_ISGAMEPORTDRIVER 0x04000000l + +/* + * Hardware Setting indicating that the driver needs a standard + * gameport in order to communicate with the device. + */ +#define JOY_HWS_ISANALOGPORTDRIVER 0x08000000l + +/* + * Hardware Setting indicating that VJoyD should not load this + * driver, it will be loaded externally and will register with + * VJoyD of it's own accord. + */ +#define JOY_HWS_AUTOLOAD 0x10000000l + +/* + * Hardware Setting indicating that the driver acquires any + * resources needed without needing a devnode through VJoyD. + */ +#define JOY_HWS_NODEVNODE 0x20000000l + + +/* + * Hardware Setting indicating that the device is a gameport bus + */ +#define JOY_HWS_ISGAMEPORTBUS 0x80000000l +#define JOY_HWS_GAMEPORTBUSBUSY 0x00000001l + +/* + * Usage Setting indicating that the settings are volatile and + * should be removed if still present on a reboot. + */ +#define JOY_US_VOLATILE 0x00000008L + +#ifdef __cplusplus +}; +#endif + +#endif /* __VJOYDX_INCLUDED__ */ + +#endif /* not MMNOJOY */ +#endif /* _INC_MMSYSTEM */ + +/**************************************************************************** + * + * Definitions for non-IDirectInput (VJoyD) features defined more recently + * than the current ddk files + * + ****************************************************************************/ + +#ifndef DIJ_RINGZERO + +#ifdef _INC_MMDDK +#ifndef MMNOJOYDEV + +#ifndef __VJOYDXD_INCLUDED__ +#define __VJOYDXD_INCLUDED__ +/* + * Poll type in which the do_other field of the JOYOEMPOLLDATA + * structure contains mini-driver specific data passed from an app. + */ +#define JOY_OEMPOLL_PASSDRIVERDATA 7 + +#endif /* __VJOYDXD_INCLUDED__ */ + +#endif /* not MMNOJOYDEV */ +#endif /* _INC_MMDDK */ + +#endif /* DIJ_RINGZERO */ + diff --git a/windows_libs/mssdk/include/dinputd.h b/windows_libs/mssdk/include/dinputd.h new file mode 100644 index 00000000..6b832b55 --- /dev/null +++ b/windows_libs/mssdk/include/dinputd.h @@ -0,0 +1,739 @@ +/**************************************************************************** + * + * Copyright (C) 1995-2000 Microsoft Corporation. All Rights Reserved. + * + * File: dinputd.h + * Content: DirectInput include file for device driver implementors + * + ****************************************************************************/ +#ifndef __DINPUTD_INCLUDED__ +#define __DINPUTD_INCLUDED__ + +#ifndef DIRECTINPUT_VERSION +#define DIRECTINPUT_VERSION 0x0800 +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/**************************************************************************** + * + * Interfaces + * + ****************************************************************************/ + +#ifndef DIJ_RINGZERO + +DEFINE_GUID(IID_IDirectInputEffectDriver, 0x02538130,0x898F,0x11D0,0x9A,0xD0,0x00,0xA0,0xC9,0xA0,0x6E,0x35); +DEFINE_GUID(IID_IDirectInputJoyConfig, 0x1DE12AB1,0xC9F5,0x11CF,0xBF,0xC7,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(IID_IDirectInputPIDDriver, 0xEEC6993A,0xB3FD,0x11D2,0xA9,0x16,0x00,0xC0,0x4F,0xB9,0x86,0x38); + +DEFINE_GUID(IID_IDirectInputJoyConfig8, 0xeb0d7dfa,0x1990,0x4f27,0xb4,0xd6,0xed,0xf2,0xee,0xc4,0xa4,0x4c); + +#endif /* DIJ_RINGZERO */ + + +/**************************************************************************** + * + * IDirectInputEffectDriver + * + ****************************************************************************/ + +typedef struct DIOBJECTATTRIBUTES { + DWORD dwFlags; + WORD wUsagePage; + WORD wUsage; +} DIOBJECTATTRIBUTES, *LPDIOBJECTATTRIBUTES; +typedef const DIOBJECTATTRIBUTES *LPCDIOBJECTATTRIBUTES; + +typedef struct DIFFOBJECTATTRIBUTES { + DWORD dwFFMaxForce; + DWORD dwFFForceResolution; +} DIFFOBJECTATTRIBUTES, *LPDIFFOBJECTATTRIBUTES; +typedef const DIFFOBJECTATTRIBUTES *LPCDIFFOBJECTATTRIBUTES; + +typedef struct DIOBJECTCALIBRATION { + LONG lMin; + LONG lCenter; + LONG lMax; +} DIOBJECTCALIBRATION, *LPDIOBJECTCALIBRATION; +typedef const DIOBJECTCALIBRATION *LPCDIOBJECTCALIBRATION; + +typedef struct DIEFFECTATTRIBUTES { + DWORD dwEffectId; + DWORD dwEffType; + DWORD dwStaticParams; + DWORD dwDynamicParams; + DWORD dwCoords; +} DIEFFECTATTRIBUTES, *LPDIEFFECTATTRIBUTES; +typedef const DIEFFECTATTRIBUTES *LPCDIEFFECTATTRIBUTES; + +typedef struct DIFFDEVICEATTRIBUTES { + DWORD dwFlags; + DWORD dwFFSamplePeriod; + DWORD dwFFMinTimeResolution; +} DIFFDEVICEATTRIBUTES, *LPDIFFDEVICEATTRIBUTES; +typedef const DIFFDEVICEATTRIBUTES *LPCDIFFDEVICEATTRIBUTES; + +typedef struct DIDRIVERVERSIONS { + DWORD dwSize; + DWORD dwFirmwareRevision; + DWORD dwHardwareRevision; + DWORD dwFFDriverVersion; +} DIDRIVERVERSIONS, *LPDIDRIVERVERSIONS; +typedef const DIDRIVERVERSIONS *LPCDIDRIVERVERSIONS; + +typedef struct DIDEVICESTATE { + DWORD dwSize; + DWORD dwState; + DWORD dwLoad; +} DIDEVICESTATE, *LPDIDEVICESTATE; + +#define DEV_STS_EFFECT_RUNNING DIEGES_PLAYING + +#ifndef DIJ_RINGZERO + +typedef struct DIHIDFFINITINFO { + DWORD dwSize; + LPWSTR pwszDeviceInterface; + GUID GuidInstance; +} DIHIDFFINITINFO, *LPDIHIDFFINITINFO; + +#undef INTERFACE +#define INTERFACE IDirectInputEffectDriver + +DECLARE_INTERFACE_(IDirectInputEffectDriver, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInputEffectDriver methods ***/ + STDMETHOD(DeviceID)(THIS_ DWORD,DWORD,DWORD,DWORD,LPVOID) PURE; + STDMETHOD(GetVersions)(THIS_ LPDIDRIVERVERSIONS) PURE; + STDMETHOD(Escape)(THIS_ DWORD,DWORD,LPDIEFFESCAPE) PURE; + STDMETHOD(SetGain)(THIS_ DWORD,DWORD) PURE; + STDMETHOD(SendForceFeedbackCommand)(THIS_ DWORD,DWORD) PURE; + STDMETHOD(GetForceFeedbackState)(THIS_ DWORD,LPDIDEVICESTATE) PURE; + STDMETHOD(DownloadEffect)(THIS_ DWORD,DWORD,LPDWORD,LPCDIEFFECT,DWORD) PURE; + STDMETHOD(DestroyEffect)(THIS_ DWORD,DWORD) PURE; + STDMETHOD(StartEffect)(THIS_ DWORD,DWORD,DWORD,DWORD) PURE; + STDMETHOD(StopEffect)(THIS_ DWORD,DWORD) PURE; + STDMETHOD(GetEffectStatus)(THIS_ DWORD,DWORD,LPDWORD) PURE; +}; + +typedef struct IDirectInputEffectDriver *LPDIRECTINPUTEFFECTDRIVER; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectInputEffectDriver_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectInputEffectDriver_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectInputEffectDriver_Release(p) (p)->lpVtbl->Release(p) +#define IDirectInputEffectDriver_DeviceID(p,a,b,c,d,e) (p)->lpVtbl->DeviceID(p,a,b,c,d,e) +#define IDirectInputEffectDriver_GetVersions(p,a) (p)->lpVtbl->GetVersions(p,a) +#define IDirectInputEffectDriver_Escape(p,a,b,c) (p)->lpVtbl->Escape(p,a,b,c) +#define IDirectInputEffectDriver_SetGain(p,a,b) (p)->lpVtbl->SetGain(p,a,b) +#define IDirectInputEffectDriver_SendForceFeedbackCommand(p,a,b) (p)->lpVtbl->SendForceFeedbackCommand(p,a,b) +#define IDirectInputEffectDriver_GetForceFeedbackState(p,a,b) (p)->lpVtbl->GetForceFeedbackState(p,a,b) +#define IDirectInputEffectDriver_DownloadEffect(p,a,b,c,d,e) (p)->lpVtbl->DownloadEffect(p,a,b,c,d,e) +#define IDirectInputEffectDriver_DestroyEffect(p,a,b) (p)->lpVtbl->DestroyEffect(p,a,b) +#define IDirectInputEffectDriver_StartEffect(p,a,b,c,d) (p)->lpVtbl->StartEffect(p,a,b,c,d) +#define IDirectInputEffectDriver_StopEffect(p,a,b) (p)->lpVtbl->StopEffect(p,a,b) +#define IDirectInputEffectDriver_GetEffectStatus(p,a,b,c) (p)->lpVtbl->GetEffectStatus(p,a,b,c) +#else +#define IDirectInputEffectDriver_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectInputEffectDriver_AddRef(p) (p)->AddRef() +#define IDirectInputEffectDriver_Release(p) (p)->Release() +#define IDirectInputEffectDriver_DeviceID(p,a,b,c,d,e) (p)->DeviceID(a,b,c,d,e) +#define IDirectInputEffectDriver_GetVersions(p,a) (p)->GetVersions(a) +#define IDirectInputEffectDriver_Escape(p,a,b,c) (p)->Escape(a,b,c) +#define IDirectInputEffectDriver_SetGain(p,a,b) (p)->SetGain(a,b) +#define IDirectInputEffectDriver_SendForceFeedbackCommand(p,a,b) (p)->SendForceFeedbackCommand(a,b) +#define IDirectInputEffectDriver_GetForceFeedbackState(p,a,b) (p)->GetForceFeedbackState(a,b) +#define IDirectInputEffectDriver_DownloadEffect(p,a,b,c,d,e) (p)->DownloadEffect(a,b,c,d,e) +#define IDirectInputEffectDriver_DestroyEffect(p,a,b) (p)->DestroyEffect(a,b) +#define IDirectInputEffectDriver_StartEffect(p,a,b,c,d) (p)->StartEffect(a,b,c,d) +#define IDirectInputEffectDriver_StopEffect(p,a,b) (p)->StopEffect(a,b) +#define IDirectInputEffectDriver_GetEffectStatus(p,a,b,c) (p)->GetEffectStatus(a,b,c) +#endif + + +#endif /* DIJ_RINGZERO */ + + +/**************************************************************************** + * + * IDirectInputJoyConfig + * + ****************************************************************************/ + +/**************************************************************************** + * + * Definitions copied from the DDK + * + ****************************************************************************/ + +#ifndef JOY_HW_NONE + +/* pre-defined joystick types */ +#define JOY_HW_NONE 0 +#define JOY_HW_CUSTOM 1 +#define JOY_HW_2A_2B_GENERIC 2 +#define JOY_HW_2A_4B_GENERIC 3 +#define JOY_HW_2B_GAMEPAD 4 +#define JOY_HW_2B_FLIGHTYOKE 5 +#define JOY_HW_2B_FLIGHTYOKETHROTTLE 6 +#define JOY_HW_3A_2B_GENERIC 7 +#define JOY_HW_3A_4B_GENERIC 8 +#define JOY_HW_4B_GAMEPAD 9 +#define JOY_HW_4B_FLIGHTYOKE 10 +#define JOY_HW_4B_FLIGHTYOKETHROTTLE 11 +#define JOY_HW_TWO_2A_2B_WITH_Y 12 +#define JOY_HW_LASTENTRY 13 + + +/* calibration flags */ +#define JOY_ISCAL_XY 0x00000001l /* XY are calibrated */ +#define JOY_ISCAL_Z 0x00000002l /* Z is calibrated */ +#define JOY_ISCAL_R 0x00000004l /* R is calibrated */ +#define JOY_ISCAL_U 0x00000008l /* U is calibrated */ +#define JOY_ISCAL_V 0x00000010l /* V is calibrated */ +#define JOY_ISCAL_POV 0x00000020l /* POV is calibrated */ + +/* point of view constants */ +#define JOY_POV_NUMDIRS 4 +#define JOY_POVVAL_FORWARD 0 +#define JOY_POVVAL_BACKWARD 1 +#define JOY_POVVAL_LEFT 2 +#define JOY_POVVAL_RIGHT 3 + +/* Specific settings for joystick hardware */ +#define JOY_HWS_HASZ 0x00000001l /* has Z info? */ +#define JOY_HWS_HASPOV 0x00000002l /* point of view hat present */ +#define JOY_HWS_POVISBUTTONCOMBOS 0x00000004l /* pov done through combo of buttons */ +#define JOY_HWS_POVISPOLL 0x00000008l /* pov done through polling */ +#define JOY_HWS_ISYOKE 0x00000010l /* joystick is a flight yoke */ +#define JOY_HWS_ISGAMEPAD 0x00000020l /* joystick is a game pad */ +#define JOY_HWS_ISCARCTRL 0x00000040l /* joystick is a car controller */ +/* X defaults to J1 X axis */ +#define JOY_HWS_XISJ1Y 0x00000080l /* X is on J1 Y axis */ +#define JOY_HWS_XISJ2X 0x00000100l /* X is on J2 X axis */ +#define JOY_HWS_XISJ2Y 0x00000200l /* X is on J2 Y axis */ +/* Y defaults to J1 Y axis */ +#define JOY_HWS_YISJ1X 0x00000400l /* Y is on J1 X axis */ +#define JOY_HWS_YISJ2X 0x00000800l /* Y is on J2 X axis */ +#define JOY_HWS_YISJ2Y 0x00001000l /* Y is on J2 Y axis */ +/* Z defaults to J2 Y axis */ +#define JOY_HWS_ZISJ1X 0x00002000l /* Z is on J1 X axis */ +#define JOY_HWS_ZISJ1Y 0x00004000l /* Z is on J1 Y axis */ +#define JOY_HWS_ZISJ2X 0x00008000l /* Z is on J2 X axis */ +/* POV defaults to J2 Y axis, if it is not button based */ +#define JOY_HWS_POVISJ1X 0x00010000l /* pov done through J1 X axis */ +#define JOY_HWS_POVISJ1Y 0x00020000l /* pov done through J1 Y axis */ +#define JOY_HWS_POVISJ2X 0x00040000l /* pov done through J2 X axis */ +/* R defaults to J2 X axis */ +#define JOY_HWS_HASR 0x00080000l /* has R (4th axis) info */ +#define JOY_HWS_RISJ1X 0x00100000l /* R done through J1 X axis */ +#define JOY_HWS_RISJ1Y 0x00200000l /* R done through J1 Y axis */ +#define JOY_HWS_RISJ2Y 0x00400000l /* R done through J2 X axis */ +/* U & V for future hardware */ +#define JOY_HWS_HASU 0x00800000l /* has U (5th axis) info */ +#define JOY_HWS_HASV 0x01000000l /* has V (6th axis) info */ + +/* Usage settings */ +#define JOY_US_HASRUDDER 0x00000001l /* joystick configured with rudder */ +#define JOY_US_PRESENT 0x00000002l /* is joystick actually present? */ +#define JOY_US_ISOEM 0x00000004l /* joystick is an OEM defined type */ + +/* reserved for future use -> as link to next possible dword */ +#define JOY_US_RESERVED 0x80000000l /* reserved */ + + +/* Settings for TypeInfo Flags1 */ +#define JOYTYPE_ZEROGAMEENUMOEMDATA 0x00000001l /* Zero GameEnum's OEM data field */ +#define JOYTYPE_NOAUTODETECTGAMEPORT 0x00000002l /* Device does not support Autodetect gameport*/ +#define JOYTYPE_NOHIDDIRECT 0x00000004l /* Do not use HID directly for this device */ +#define JOYTYPE_DEFAULTPROPSHEET 0x80000000l /* CPL overrides custom property sheet */ + +/* Settings for TypeInfo Flags2 */ +#define JOYTYPE_DEVICEHIDE 0x00010000l /* Hide unclassified devices */ +#define JOYTYPE_MOUSEHIDE 0x00020000l /* Hide mice */ +#define JOYTYPE_KEYBHIDE 0x00040000l /* Hide keyboards */ +#define JOYTYPE_GAMEHIDE 0x00080000l /* Hide game controllers */ +#define JOYTYPE_HIDEACTIVE 0x00100000l /* Hide flags are active */ +#define JOYTYPE_INFOMASK 0x00E00000l /* Mask for type specific info */ +#define JOYTYPE_INFODEFAULT 0x00000000l /* Use default axis mappings */ +#define JOYTYPE_INFOYYPEDALS 0x00200000l /* Use Y as a combined pedals axis */ +#define JOYTYPE_INFOZYPEDALS 0x00400000l /* Use Z for accelerate, Y for brake */ +#define JOYTYPE_INFOYRPEDALS 0x00600000l /* Use Y for accelerate, R for brake */ +#define JOYTYPE_INFOZRPEDALS 0x00800000l /* Use Z for accelerate, R for brake */ +#define JOYTYPE_INFOZISSLIDER 0x00200000l /* Use Z as a slider */ +#define JOYTYPE_INFOZISZ 0x00400000l /* Use Z as Z axis */ + +/* struct for storing x,y, z, and rudder values */ +typedef struct joypos_tag { + DWORD dwX; + DWORD dwY; + DWORD dwZ; + DWORD dwR; + DWORD dwU; + DWORD dwV; +} JOYPOS, FAR *LPJOYPOS; + +/* struct for storing ranges */ +typedef struct joyrange_tag { + JOYPOS jpMin; + JOYPOS jpMax; + JOYPOS jpCenter; +} JOYRANGE,FAR *LPJOYRANGE; + +/* + * dwTimeout - value at which to timeout joystick polling + * jrvRanges - range of values app wants returned for axes + * jpDeadZone - area around center to be considered + * as "dead". specified as a percentage + * (0-100). Only X & Y handled by system driver + */ +typedef struct joyreguservalues_tag { + DWORD dwTimeOut; + JOYRANGE jrvRanges; + JOYPOS jpDeadZone; +} JOYREGUSERVALUES, FAR *LPJOYREGUSERVALUES; + +typedef struct joyreghwsettings_tag { + DWORD dwFlags; + DWORD dwNumButtons; +} JOYREGHWSETTINGS, FAR *LPJOYHWSETTINGS; + +/* range of values returned by the hardware (filled in by calibration) */ +/* + * jrvHardware - values returned by hardware + * dwPOVValues - POV values returned by hardware + * dwCalFlags - what has been calibrated + */ +typedef struct joyreghwvalues_tag { + JOYRANGE jrvHardware; + DWORD dwPOVValues[JOY_POV_NUMDIRS]; + DWORD dwCalFlags; +} JOYREGHWVALUES, FAR *LPJOYREGHWVALUES; + +/* hardware configuration */ +/* + * hws - hardware settings + * dwUsageSettings - usage settings + * hwv - values returned by hardware + * dwType - type of joystick + * dwReserved - reserved for OEM drivers + */ +typedef struct joyreghwconfig_tag { + JOYREGHWSETTINGS hws; + DWORD dwUsageSettings; + JOYREGHWVALUES hwv; + DWORD dwType; + DWORD dwReserved; +} JOYREGHWCONFIG, FAR *LPJOYREGHWCONFIG; + +/* joystick calibration info structure */ +typedef struct joycalibrate_tag { + UINT wXbase; + UINT wXdelta; + UINT wYbase; + UINT wYdelta; + UINT wZbase; + UINT wZdelta; +} JOYCALIBRATE; +typedef JOYCALIBRATE FAR *LPJOYCALIBRATE; + +#endif + +#ifndef DIJ_RINGZERO + +#define MAX_JOYSTRING 256 +typedef BOOL (FAR PASCAL * LPDIJOYTYPECALLBACK)(LPCWSTR, LPVOID); + +#ifndef MAX_JOYSTICKOEMVXDNAME +#define MAX_JOYSTICKOEMVXDNAME 260 +#endif + +#define DITC_REGHWSETTINGS 0x00000001 +#define DITC_CLSIDCONFIG 0x00000002 +#define DITC_DISPLAYNAME 0x00000004 +#define DITC_CALLOUT 0x00000008 +#define DITC_HARDWAREID 0x00000010 +#define DITC_FLAGS1 0x00000020 +#define DITC_FLAGS2 0x00000040 +#define DITC_MAPFILE 0x00000080 + + + +/* This structure is defined for DirectX 5.0 compatibility */ + +typedef struct DIJOYTYPEINFO_DX5 { + DWORD dwSize; + JOYREGHWSETTINGS hws; + CLSID clsidConfig; + WCHAR wszDisplayName[MAX_JOYSTRING]; + WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME]; +} DIJOYTYPEINFO_DX5, *LPDIJOYTYPEINFO_DX5; +typedef const DIJOYTYPEINFO_DX5 *LPCDIJOYTYPEINFO_DX5; + +/* This structure is defined for DirectX 6.1 compatibility */ +typedef struct DIJOYTYPEINFO_DX6 { + DWORD dwSize; + JOYREGHWSETTINGS hws; + CLSID clsidConfig; + WCHAR wszDisplayName[MAX_JOYSTRING]; + WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME]; + WCHAR wszHardwareId[MAX_JOYSTRING]; + DWORD dwFlags1; +} DIJOYTYPEINFO_DX6, *LPDIJOYTYPEINFO_DX6; +typedef const DIJOYTYPEINFO_DX6 *LPCDIJOYTYPEINFO_DX6; + +typedef struct DIJOYTYPEINFO { + DWORD dwSize; + JOYREGHWSETTINGS hws; + CLSID clsidConfig; + WCHAR wszDisplayName[MAX_JOYSTRING]; + WCHAR wszCallout[MAX_JOYSTICKOEMVXDNAME]; +#if(DIRECTINPUT_VERSION >= 0x05b2) + WCHAR wszHardwareId[MAX_JOYSTRING]; + DWORD dwFlags1; +#if(DIRECTINPUT_VERSION >= 0x0800) + DWORD dwFlags2; + WCHAR wszMapFile[MAX_JOYSTRING]; +#endif /* DIRECTINPUT_VERSION >= 0x0800 */ +#endif /* DIRECTINPUT_VERSION >= 0x05b2 */ +} DIJOYTYPEINFO, *LPDIJOYTYPEINFO; +typedef const DIJOYTYPEINFO *LPCDIJOYTYPEINFO; +#define DIJC_GUIDINSTANCE 0x00000001 +#define DIJC_REGHWCONFIGTYPE 0x00000002 +#define DIJC_GAIN 0x00000004 +#define DIJC_CALLOUT 0x00000008 +#define DIJC_WDMGAMEPORT 0x00000010 + +/* This structure is defined for DirectX 5.0 compatibility */ + +typedef struct DIJOYCONFIG_DX5 { + DWORD dwSize; + GUID guidInstance; + JOYREGHWCONFIG hwc; + DWORD dwGain; + WCHAR wszType[MAX_JOYSTRING]; + WCHAR wszCallout[MAX_JOYSTRING]; +} DIJOYCONFIG_DX5, *LPDIJOYCONFIG_DX5; +typedef const DIJOYCONFIG_DX5 *LPCDIJOYCONFIG_DX5; + +typedef struct DIJOYCONFIG { + DWORD dwSize; + GUID guidInstance; + JOYREGHWCONFIG hwc; + DWORD dwGain; + WCHAR wszType[MAX_JOYSTRING]; + WCHAR wszCallout[MAX_JOYSTRING]; +#if(DIRECTINPUT_VERSION >= 0x05b2) + GUID guidGameport; +#endif /* DIRECTINPUT_VERSION >= 0x05b2 */ + } DIJOYCONFIG, *LPDIJOYCONFIG; +typedef const DIJOYCONFIG *LPCDIJOYCONFIG; + + +#define DIJU_USERVALUES 0x00000001 +#define DIJU_GLOBALDRIVER 0x00000002 +#define DIJU_GAMEPORTEMULATOR 0x00000004 + +typedef struct DIJOYUSERVALUES { + DWORD dwSize; + JOYREGUSERVALUES ruv; + WCHAR wszGlobalDriver[MAX_JOYSTRING]; + WCHAR wszGameportEmulator[MAX_JOYSTRING]; +} DIJOYUSERVALUES, *LPDIJOYUSERVALUES; +typedef const DIJOYUSERVALUES *LPCDIJOYUSERVALUES; + +DEFINE_GUID(GUID_KeyboardClass, 0x4D36E96B,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18); +DEFINE_GUID(GUID_MediaClass, 0x4D36E96C,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18); +DEFINE_GUID(GUID_MouseClass, 0x4D36E96F,0xE325,0x11CE,0xBF,0xC1,0x08,0x00,0x2B,0xE1,0x03,0x18); +DEFINE_GUID(GUID_HIDClass, 0x745A17A0,0x74D3,0x11D0,0xB6,0xFE,0x00,0xA0,0xC9,0x0F,0x57,0xDA); + +#undef INTERFACE +#define INTERFACE IDirectInputJoyConfig + +DECLARE_INTERFACE_(IDirectInputJoyConfig, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInputJoyConfig methods ***/ + STDMETHOD(Acquire)(THIS) PURE; + STDMETHOD(Unacquire)(THIS) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(SendNotify)(THIS) PURE; + STDMETHOD(EnumTypes)(THIS_ LPDIJOYTYPECALLBACK,LPVOID) PURE; + STDMETHOD(GetTypeInfo)(THIS_ LPCWSTR,LPDIJOYTYPEINFO,DWORD) PURE; + STDMETHOD(SetTypeInfo)(THIS_ LPCWSTR,LPCDIJOYTYPEINFO,DWORD) PURE; + STDMETHOD(DeleteType)(THIS_ LPCWSTR) PURE; + STDMETHOD(GetConfig)(THIS_ UINT,LPDIJOYCONFIG,DWORD) PURE; + STDMETHOD(SetConfig)(THIS_ UINT,LPCDIJOYCONFIG,DWORD) PURE; + STDMETHOD(DeleteConfig)(THIS_ UINT) PURE; + STDMETHOD(GetUserValues)(THIS_ LPDIJOYUSERVALUES,DWORD) PURE; + STDMETHOD(SetUserValues)(THIS_ LPCDIJOYUSERVALUES,DWORD) PURE; + STDMETHOD(AddNewHardware)(THIS_ HWND,REFGUID) PURE; + STDMETHOD(OpenTypeKey)(THIS_ LPCWSTR,DWORD,PHKEY) PURE; + STDMETHOD(OpenConfigKey)(THIS_ UINT,DWORD,PHKEY) PURE; +}; + +typedef struct IDirectInputJoyConfig *LPDIRECTINPUTJOYCONFIG; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectInputJoyConfig_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectInputJoyConfig_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectInputJoyConfig_Release(p) (p)->lpVtbl->Release(p) +#define IDirectInputJoyConfig_Acquire(p) (p)->lpVtbl->Acquire(p) +#define IDirectInputJoyConfig_Unacquire(p) (p)->lpVtbl->Unacquire(p) +#define IDirectInputJoyConfig_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) +#define IDirectInputJoyConfig_SendNotify(p) (p)->lpVtbl->SendNotify(p) +#define IDirectInputJoyConfig_EnumTypes(p,a,b) (p)->lpVtbl->EnumTypes(p,a,b) +#define IDirectInputJoyConfig_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c) +#define IDirectInputJoyConfig_SetTypeInfo(p,a,b,c) (p)->lpVtbl->SetTypeInfo(p,a,b,c) +#define IDirectInputJoyConfig_DeleteType(p,a) (p)->lpVtbl->DeleteType(p,a) +#define IDirectInputJoyConfig_GetConfig(p,a,b,c) (p)->lpVtbl->GetConfig(p,a,b,c) +#define IDirectInputJoyConfig_SetConfig(p,a,b,c) (p)->lpVtbl->SetConfig(p,a,b,c) +#define IDirectInputJoyConfig_DeleteConfig(p,a) (p)->lpVtbl->DeleteConfig(p,a) +#define IDirectInputJoyConfig_GetUserValues(p,a,b) (p)->lpVtbl->GetUserValues(p,a,b) +#define IDirectInputJoyConfig_SetUserValues(p,a,b) (p)->lpVtbl->SetUserValues(p,a,b) +#define IDirectInputJoyConfig_AddNewHardware(p,a,b) (p)->lpVtbl->AddNewHardware(p,a,b) +#define IDirectInputJoyConfig_OpenTypeKey(p,a,b,c) (p)->lpVtbl->OpenTypeKey(p,a,b,c) +#define IDirectInputJoyConfig_OpenConfigKey(p,a,b,c) (p)->lpVtbl->OpenConfigKey(p,a,b,c) +#else +#define IDirectInputJoyConfig_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectInputJoyConfig_AddRef(p) (p)->AddRef() +#define IDirectInputJoyConfig_Release(p) (p)->Release() +#define IDirectInputJoyConfig_Acquire(p) (p)->Acquire() +#define IDirectInputJoyConfig_Unacquire(p) (p)->Unacquire() +#define IDirectInputJoyConfig_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) +#define IDirectInputJoyConfig_SendNotify(p) (p)->SendNotify() +#define IDirectInputJoyConfig_EnumTypes(p,a,b) (p)->EnumTypes(a,b) +#define IDirectInputJoyConfig_GetTypeInfo(p,a,b,c) (p)->GetTypeInfo(a,b,c) +#define IDirectInputJoyConfig_SetTypeInfo(p,a,b,c) (p)->SetTypeInfo(a,b,c) +#define IDirectInputJoyConfig_DeleteType(p,a) (p)->DeleteType(a) +#define IDirectInputJoyConfig_GetConfig(p,a,b,c) (p)->GetConfig(a,b,c) +#define IDirectInputJoyConfig_SetConfig(p,a,b,c) (p)->SetConfig(a,b,c) +#define IDirectInputJoyConfig_DeleteConfig(p,a) (p)->DeleteConfig(a) +#define IDirectInputJoyConfig_GetUserValues(p,a,b) (p)->GetUserValues(a,b) +#define IDirectInputJoyConfig_SetUserValues(p,a,b) (p)->SetUserValues(a,b) +#define IDirectInputJoyConfig_AddNewHardware(p,a,b) (p)->AddNewHardware(a,b) +#define IDirectInputJoyConfig_OpenTypeKey(p,a,b,c) (p)->OpenTypeKey(a,b,c) +#define IDirectInputJoyConfig_OpenConfigKey(p,a,b,c) (p)->OpenConfigKey(a,b,c) +#endif + +#endif /* DIJ_RINGZERO */ + +#if(DIRECTINPUT_VERSION >= 0x0800) + +#ifndef DIJ_RINGZERO + +#undef INTERFACE +#define INTERFACE IDirectInputJoyConfig8 + +DECLARE_INTERFACE_(IDirectInputJoyConfig8, IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + + /*** IDirectInputJoyConfig8 methods ***/ + STDMETHOD(Acquire)(THIS) PURE; + STDMETHOD(Unacquire)(THIS) PURE; + STDMETHOD(SetCooperativeLevel)(THIS_ HWND,DWORD) PURE; + STDMETHOD(SendNotify)(THIS) PURE; + STDMETHOD(EnumTypes)(THIS_ LPDIJOYTYPECALLBACK,LPVOID) PURE; + STDMETHOD(GetTypeInfo)(THIS_ LPCWSTR,LPDIJOYTYPEINFO,DWORD) PURE; + STDMETHOD(SetTypeInfo)(THIS_ LPCWSTR,LPCDIJOYTYPEINFO,DWORD,LPWSTR) PURE; + STDMETHOD(DeleteType)(THIS_ LPCWSTR) PURE; + STDMETHOD(GetConfig)(THIS_ UINT,LPDIJOYCONFIG,DWORD) PURE; + STDMETHOD(SetConfig)(THIS_ UINT,LPCDIJOYCONFIG,DWORD) PURE; + STDMETHOD(DeleteConfig)(THIS_ UINT) PURE; + STDMETHOD(GetUserValues)(THIS_ LPDIJOYUSERVALUES,DWORD) PURE; + STDMETHOD(SetUserValues)(THIS_ LPCDIJOYUSERVALUES,DWORD) PURE; + STDMETHOD(AddNewHardware)(THIS_ HWND,REFGUID) PURE; + STDMETHOD(OpenTypeKey)(THIS_ LPCWSTR,DWORD,PHKEY) PURE; + STDMETHOD(OpenAppStatusKey)(THIS_ PHKEY) PURE; +}; + +typedef struct IDirectInputJoyConfig8 *LPDIRECTINPUTJOYCONFIG8; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectInputJoyConfig8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectInputJoyConfig8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectInputJoyConfig8_Release(p) (p)->lpVtbl->Release(p) +#define IDirectInputJoyConfig8_Acquire(p) (p)->lpVtbl->Acquire(p) +#define IDirectInputJoyConfig8_Unacquire(p) (p)->lpVtbl->Unacquire(p) +#define IDirectInputJoyConfig8_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) +#define IDirectInputJoyConfig8_SendNotify(p) (p)->lpVtbl->SendNotify(p) +#define IDirectInputJoyConfig8_EnumTypes(p,a,b) (p)->lpVtbl->EnumTypes(p,a,b) +#define IDirectInputJoyConfig8_GetTypeInfo(p,a,b,c) (p)->lpVtbl->GetTypeInfo(p,a,b,c) +#define IDirectInputJoyConfig8_SetTypeInfo(p,a,b,c,d) (p)->lpVtbl->SetTypeInfo(p,a,b,c,d) +#define IDirectInputJoyConfig8_DeleteType(p,a) (p)->lpVtbl->DeleteType(p,a) +#define IDirectInputJoyConfig8_GetConfig(p,a,b,c) (p)->lpVtbl->GetConfig(p,a,b,c) +#define IDirectInputJoyConfig8_SetConfig(p,a,b,c) (p)->lpVtbl->SetConfig(p,a,b,c) +#define IDirectInputJoyConfig8_DeleteConfig(p,a) (p)->lpVtbl->DeleteConfig(p,a) +#define IDirectInputJoyConfig8_GetUserValues(p,a,b) (p)->lpVtbl->GetUserValues(p,a,b) +#define IDirectInputJoyConfig8_SetUserValues(p,a,b) (p)->lpVtbl->SetUserValues(p,a,b) +#define IDirectInputJoyConfig8_AddNewHardware(p,a,b) (p)->lpVtbl->AddNewHardware(p,a,b) +#define IDirectInputJoyConfig8_OpenTypeKey(p,a,b,c) (p)->lpVtbl->OpenTypeKey(p,a,b,c) +#define IDirectInputJoyConfig8_OpenAppStatusKey(p,a) (p)->lpVtbl->OpenAppStatusKey(p,a) +#else +#define IDirectInputJoyConfig8_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectInputJoyConfig8_AddRef(p) (p)->AddRef() +#define IDirectInputJoyConfig8_Release(p) (p)->Release() +#define IDirectInputJoyConfig8_Acquire(p) (p)->Acquire() +#define IDirectInputJoyConfig8_Unacquire(p) (p)->Unacquire() +#define IDirectInputJoyConfig8_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) +#define IDirectInputJoyConfig8_SendNotify(p) (p)->SendNotify() +#define IDirectInputJoyConfig8_EnumTypes(p,a,b) (p)->EnumTypes(a,b) +#define IDirectInputJoyConfig8_GetTypeInfo(p,a,b,c) (p)->GetTypeInfo(a,b,c) +#define IDirectInputJoyConfig8_SetTypeInfo(p,a,b,c,d) (p)->SetTypeInfo(a,b,c,d) +#define IDirectInputJoyConfig8_DeleteType(p,a) (p)->DeleteType(a) +#define IDirectInputJoyConfig8_GetConfig(p,a,b,c) (p)->GetConfig(a,b,c) +#define IDirectInputJoyConfig8_SetConfig(p,a,b,c) (p)->SetConfig(a,b,c) +#define IDirectInputJoyConfig8_DeleteConfig(p,a) (p)->DeleteConfig(a) +#define IDirectInputJoyConfig8_GetUserValues(p,a,b) (p)->GetUserValues(a,b) +#define IDirectInputJoyConfig8_SetUserValues(p,a,b) (p)->SetUserValues(a,b) +#define IDirectInputJoyConfig8_AddNewHardware(p,a,b) (p)->AddNewHardware(a,b) +#define IDirectInputJoyConfig8_OpenTypeKey(p,a,b,c) (p)->OpenTypeKey(a,b,c) +#define IDirectInputJoyConfig8_OpenAppStatusKey(p,a) (p)->OpenAppStatusKey(a) +#endif + +#endif /* DIJ_RINGZERO */ + +/**************************************************************************** + * + * Notification Messages + * + ****************************************************************************/ + +/* RegisterWindowMessage with this to get DirectInput notification messages */ +#define DIRECTINPUT_NOTIFICATION_MSGSTRINGA "DIRECTINPUT_NOTIFICATION_MSGSTRING" +#define DIRECTINPUT_NOTIFICATION_MSGSTRINGW L"DIRECTINPUT_NOTIFICATION_MSGSTRING" + +#ifdef UNICODE +#define DIRECTINPUT_NOTIFICATION_MSGSTRING DIRECTINPUT_NOTIFICATION_MSGSTRINGW +#else +#define DIRECTINPUT_NOTIFICATION_MSGSTRING DIRECTINPUT_NOTIFICATION_MSGSTRINGA +#endif + +#define DIMSGWP_NEWAPPSTART 0x00000001 +#define DIMSGWP_DX8APPSTART 0x00000002 +#define DIMSGWP_DX8MAPPERAPPSTART 0x00000003 + +#endif /* DIRECTINPUT_VERSION >= 0x0800 */ + +#define DIRECTINPUT_REGSTR_KEY_LASTAPPA "MostRecentApplication" +#define DIRECTINPUT_REGSTR_KEY_LASTMAPAPPA "MostRecentMapperApplication" +#define DIRECTINPUT_REGSTR_VAL_VERSIONA "Version" +#define DIRECTINPUT_REGSTR_VAL_NAMEA "Name" +#define DIRECTINPUT_REGSTR_VAL_IDA "Id" +#define DIRECTINPUT_REGSTR_VAL_MAPPERA "UsesMapper" +#define DIRECTINPUT_REGSTR_VAL_LASTSTARTA "MostRecentStart" + +#define DIRECTINPUT_REGSTR_KEY_LASTAPPW L"MostRecentApplication" +#define DIRECTINPUT_REGSTR_KEY_LASTMAPAPPW L"MostRecentMapperApplication" +#define DIRECTINPUT_REGSTR_VAL_VERSIONW L"Version" +#define DIRECTINPUT_REGSTR_VAL_NAMEW L"Name" +#define DIRECTINPUT_REGSTR_VAL_IDW L"Id" +#define DIRECTINPUT_REGSTR_VAL_MAPPERW L"UsesMapper" +#define DIRECTINPUT_REGSTR_VAL_LASTSTARTW L"MostRecentStart" + +#ifdef UNICODE +#define DIRECTINPUT_REGSTR_KEY_LASTAPP DIRECTINPUT_REGSTR_KEY_LASTAPPW +#define DIRECTINPUT_REGSTR_KEY_LASTMAPAPP DIRECTINPUT_REGSTR_KEY_LASTMAPAPPW +#define DIRECTINPUT_REGSTR_VAL_VERSION DIRECTINPUT_REGSTR_VAL_VERSIONW +#define DIRECTINPUT_REGSTR_VAL_NAME DIRECTINPUT_REGSTR_VAL_NAMEW +#define DIRECTINPUT_REGSTR_VAL_ID DIRECTINPUT_REGSTR_VAL_IDW +#define DIRECTINPUT_REGSTR_VAL_MAPPER DIRECTINPUT_REGSTR_VAL_MAPPERW +#define DIRECTINPUT_REGSTR_VAL_LASTSTART DIRECTINPUT_REGSTR_VAL_LASTSTARTW +#else +#define DIRECTINPUT_REGSTR_KEY_LASTAPP DIRECTINPUT_REGSTR_KEY_LASTAPPA +#define DIRECTINPUT_REGSTR_KEY_LASTMAPAPP DIRECTINPUT_REGSTR_KEY_LASTMAPAPPA +#define DIRECTINPUT_REGSTR_VAL_VERSION DIRECTINPUT_REGSTR_VAL_VERSIONA +#define DIRECTINPUT_REGSTR_VAL_NAME DIRECTINPUT_REGSTR_VAL_NAMEA +#define DIRECTINPUT_REGSTR_VAL_ID DIRECTINPUT_REGSTR_VAL_IDA +#define DIRECTINPUT_REGSTR_VAL_MAPPER DIRECTINPUT_REGSTR_VAL_MAPPERA +#define DIRECTINPUT_REGSTR_VAL_LASTSTART DIRECTINPUT_REGSTR_VAL_LASTSTARTA +#endif + + +/**************************************************************************** + * + * Return Codes + * + ****************************************************************************/ + +#define DIERR_NOMOREITEMS \ + MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIN32, ERROR_NO_MORE_ITEMS) + +/* + * Device driver-specific codes. + */ + +#define DIERR_DRIVERFIRST 0x80040300L +#define DIERR_DRIVERLAST 0x800403FFL + +/* + * Unless the specific driver has been precisely identified, no meaning + * should be attributed to these values other than that the driver + * originated the error. However, to illustrate the types of error that + * may be causing the failure, the PID force feedback driver distributed + * with DirectX 7 could return the following errors: + * + * DIERR_DRIVERFIRST + 1 + * The requested usage was not found. + * DIERR_DRIVERFIRST + 2 + * The parameter block couldn't be downloaded to the device. + * DIERR_DRIVERFIRST + 3 + * PID initialization failed. + * DIERR_DRIVERFIRST + 4 + * The provided values couldn't be scaled. + */ + + +/* + * Device installer errors. + */ + +/* + * Registry entry or DLL for class installer invalid + * or class installer not found. + */ +#define DIERR_INVALIDCLASSINSTALLER 0x80040400L + +/* + * The user cancelled the install operation. + */ +#define DIERR_CANCELLED 0x80040401L + +/* + * The INF file for the selected device could not be + * found or is invalid or is damaged. + */ +#define DIERR_BADINF 0x80040402L + +/**************************************************************************** + * + * Map files + * + ****************************************************************************/ + +/* + * Delete particular data from default map file. + */ +#define DIDIFT_DELETE 0x01000000 + +#ifdef __cplusplus +}; +#endif + +#endif /* __DINPUTD_INCLUDED__ */ diff --git a/windows_libs/mssdk/include/dls1.h b/windows_libs/mssdk/include/dls1.h new file mode 100644 index 00000000..fc88a317 --- /dev/null +++ b/windows_libs/mssdk/include/dls1.h @@ -0,0 +1,267 @@ +/*==========================================================================; +// +// dls1.h +// +// +// Description: +// +// Interface defines and structures for the Instrument Collection Form +// RIFF DLS. +// +// +// Written by Sonic Foundry 1996. Released for public use. +// +//=========================================================================*/ + +#ifndef _INC_DLS1 +#define _INC_DLS1 + +/*////////////////////////////////////////////////////////////////////////// +// +// +// Layout of an instrument collection: +// +// +// RIFF [] 'DLS ' [dlid,colh,INSTLIST,WAVEPOOL,INFOLIST] +// +// INSTLIST +// LIST [] 'lins' +// LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST] +// LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST] +// LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST] +// +// RGNLIST +// LIST [] 'lrgn' +// LIST [] 'rgn ' [rgnh,wsmp,wlnk,ARTLIST] +// LIST [] 'rgn ' [rgnh,wsmp,wlnk,ARTLIST] +// LIST [] 'rgn ' [rgnh,wsmp,wlnk,ARTLIST] +// +// ARTLIST +// LIST [] 'lart' +// 'art1' level 1 Articulation connection graph +// 'art2' level 2 Articulation connection graph +// '3rd1' Possible 3rd party articulation structure 1 +// '3rd2' Possible 3rd party articulation structure 2 .... and so on +// +// WAVEPOOL +// ptbl [] [pool table] +// LIST [] 'wvpl' +// [path], +// [path], +// LIST [] 'wave' [dlid,RIFFWAVE] +// LIST [] 'wave' [dlid,RIFFWAVE] +// LIST [] 'wave' [dlid,RIFFWAVE] +// LIST [] 'wave' [dlid,RIFFWAVE] +// LIST [] 'wave' [dlid,RIFFWAVE] +// +// INFOLIST +// LIST [] 'INFO' +// 'icmt' 'One of those crazy comments.' +// 'icop' 'Copyright (C) 1996 Sonic Foundry' +// +/////////////////////////////////////////////////////////////////////////*/ + + +/*///////////////////////////////////////////////////////////////////////// +// FOURCC's used in the DLS file +/////////////////////////////////////////////////////////////////////////*/ + +#define FOURCC_DLS mmioFOURCC('D','L','S',' ') +#define FOURCC_DLID mmioFOURCC('d','l','i','d') +#define FOURCC_COLH mmioFOURCC('c','o','l','h') +#define FOURCC_WVPL mmioFOURCC('w','v','p','l') +#define FOURCC_PTBL mmioFOURCC('p','t','b','l') +#define FOURCC_PATH mmioFOURCC('p','a','t','h') +#define FOURCC_wave mmioFOURCC('w','a','v','e') +#define FOURCC_LINS mmioFOURCC('l','i','n','s') +#define FOURCC_INS mmioFOURCC('i','n','s',' ') +#define FOURCC_INSH mmioFOURCC('i','n','s','h') +#define FOURCC_LRGN mmioFOURCC('l','r','g','n') +#define FOURCC_RGN mmioFOURCC('r','g','n',' ') +#define FOURCC_RGNH mmioFOURCC('r','g','n','h') +#define FOURCC_LART mmioFOURCC('l','a','r','t') +#define FOURCC_ART1 mmioFOURCC('a','r','t','1') +#define FOURCC_WLNK mmioFOURCC('w','l','n','k') +#define FOURCC_WSMP mmioFOURCC('w','s','m','p') +#define FOURCC_VERS mmioFOURCC('v','e','r','s') + +/*///////////////////////////////////////////////////////////////////////// +// Articulation connection graph definitions +/////////////////////////////////////////////////////////////////////////*/ + +/* Generic Sources */ +#define CONN_SRC_NONE 0x0000 +#define CONN_SRC_LFO 0x0001 +#define CONN_SRC_KEYONVELOCITY 0x0002 +#define CONN_SRC_KEYNUMBER 0x0003 +#define CONN_SRC_EG1 0x0004 +#define CONN_SRC_EG2 0x0005 +#define CONN_SRC_PITCHWHEEL 0x0006 + +/* Midi Controllers 0-127 */ +#define CONN_SRC_CC1 0x0081 +#define CONN_SRC_CC7 0x0087 +#define CONN_SRC_CC10 0x008a +#define CONN_SRC_CC11 0x008b + +/* Generic Destinations */ +#define CONN_DST_NONE 0x0000 +#define CONN_DST_ATTENUATION 0x0001 +#define CONN_DST_PITCH 0x0003 +#define CONN_DST_PAN 0x0004 + +/* LFO Destinations */ +#define CONN_DST_LFO_FREQUENCY 0x0104 +#define CONN_DST_LFO_STARTDELAY 0x0105 + +/* EG1 Destinations */ +#define CONN_DST_EG1_ATTACKTIME 0x0206 +#define CONN_DST_EG1_DECAYTIME 0x0207 +#define CONN_DST_EG1_RELEASETIME 0x0209 +#define CONN_DST_EG1_SUSTAINLEVEL 0x020a + +/* EG2 Destinations */ +#define CONN_DST_EG2_ATTACKTIME 0x030a +#define CONN_DST_EG2_DECAYTIME 0x030b +#define CONN_DST_EG2_RELEASETIME 0x030d +#define CONN_DST_EG2_SUSTAINLEVEL 0x030e + +#define CONN_TRN_NONE 0x0000 +#define CONN_TRN_CONCAVE 0x0001 + +typedef struct _DLSID { + ULONG ulData1; + USHORT usData2; + USHORT usData3; + BYTE abData4[8]; +} DLSID, FAR *LPDLSID; + +typedef struct _DLSVERSION { + DWORD dwVersionMS; + DWORD dwVersionLS; +}DLSVERSION, FAR *LPDLSVERSION; + + +typedef struct _CONNECTION { + USHORT usSource; + USHORT usControl; + USHORT usDestination; + USHORT usTransform; + LONG lScale; + }CONNECTION, FAR *LPCONNECTION; + + +/* Level 1 Articulation Data */ + +typedef struct _CONNECTIONLIST { + ULONG cbSize; /* size of the connection list structure */ + ULONG cConnections; /* count of connections in the list */ + } CONNECTIONLIST, FAR *LPCONNECTIONLIST; + + + +/*///////////////////////////////////////////////////////////////////////// +// Generic type defines for regions and instruments +/////////////////////////////////////////////////////////////////////////*/ + +typedef struct _RGNRANGE { + USHORT usLow; + USHORT usHigh; +}RGNRANGE, FAR * LPRGNRANGE; + +#define F_INSTRUMENT_DRUMS 0x80000000 + +typedef struct _MIDILOCALE { + ULONG ulBank; + ULONG ulInstrument; +}MIDILOCALE, FAR *LPMIDILOCALE; + +/*///////////////////////////////////////////////////////////////////////// +// Header structures found in an DLS file for collection, instruments, and +// regions. +/////////////////////////////////////////////////////////////////////////*/ + +#define F_RGN_OPTION_SELFNONEXCLUSIVE 0x0001 + +typedef struct _RGNHEADER { + RGNRANGE RangeKey; /* Key range */ + RGNRANGE RangeVelocity; /* Velocity Range */ + USHORT fusOptions; /* Synthesis options for this range */ + USHORT usKeyGroup; /* Key grouping for non simultaneous play */ + /* 0 = no group, 1 up is group */ + /* for Level 1 only groups 1-15 are allowed */ +}RGNHEADER, FAR *LPRGNHEADER; + +typedef struct _INSTHEADER { + ULONG cRegions; /* Count of regions in this instrument */ + MIDILOCALE Locale; /* Intended MIDI locale of this instrument */ +}INSTHEADER, FAR *LPINSTHEADER; + +typedef struct _DLSHEADER { + ULONG cInstruments; /* Count of instruments in the collection */ +}DLSHEADER, FAR *LPDLSHEADER; + +/*//////////////////////////////////////////////////////////////////////////// +// definitions for the Wave link structure +////////////////////////////////////////////////////////////////////////////*/ + +/* **** For level 1 only WAVELINK_CHANNEL_MONO is valid **** */ +/* ulChannel allows for up to 32 channels of audio with each bit position */ +/* specifiying a channel of playback */ + +#define WAVELINK_CHANNEL_LEFT 0x0001l +#define WAVELINK_CHANNEL_RIGHT 0x0002l + +#define F_WAVELINK_PHASE_MASTER 0x0001 + +typedef struct _WAVELINK { /* any paths or links are stored right after struct */ + USHORT fusOptions; /* options flags for this wave */ + USHORT usPhaseGroup; /* Phase grouping for locking channels */ + ULONG ulChannel; /* channel placement */ + ULONG ulTableIndex; /* index into the wave pool table, 0 based */ +}WAVELINK, FAR *LPWAVELINK; + +#define POOL_CUE_NULL 0xffffffffl + +typedef struct _POOLCUE { + ULONG ulOffset; /* Offset to the entry in the list */ +}POOLCUE, FAR *LPPOOLCUE; + +typedef struct _POOLTABLE { + ULONG cbSize; /* size of the pool table structure */ + ULONG cCues; /* count of cues in the list */ + } POOLTABLE, FAR *LPPOOLTABLE; + +/*//////////////////////////////////////////////////////////////////////////// +// Structures for the "wsmp" chunk +////////////////////////////////////////////////////////////////////////////*/ + +#define F_WSMP_NO_TRUNCATION 0x0001l +#define F_WSMP_NO_COMPRESSION 0x0002l + + +typedef struct _rwsmp { + ULONG cbSize; + USHORT usUnityNote; /* MIDI Unity Playback Note */ + SHORT sFineTune; /* Fine Tune in log tuning */ + LONG lAttenuation; /* Overall Attenuation to be applied to data */ + ULONG fulOptions; /* Flag options */ + ULONG cSampleLoops; /* Count of Sample loops, 0 loops is one shot */ + } WSMPL, FAR *LPWSMPL; + + +/* This loop type is a normal forward playing loop which is continually */ +/* played until the envelope reaches an off threshold in the release */ +/* portion of the volume envelope */ + +#define WLOOP_TYPE_FORWARD 0 + +typedef struct _rloop { + ULONG cbSize; + ULONG ulType; /* Loop Type */ + ULONG ulStart; /* Start of loop in samples */ + ULONG ulLength; /* Length of loop in samples */ +} WLOOP, FAR *LPWLOOP; + +#endif /*_INC_DLS1 */ + diff --git a/windows_libs/mssdk/include/dls2.h b/windows_libs/mssdk/include/dls2.h new file mode 100644 index 00000000..30cec23a --- /dev/null +++ b/windows_libs/mssdk/include/dls2.h @@ -0,0 +1,130 @@ +/* + + dls2.h + + Description: + + Interface defines and structures for the DLS2 extensions of DLS. + + + Written by Microsoft 1998. Released for public use. + +*/ + +#ifndef _INC_DLS2 +#define _INC_DLS2 + +/* + FOURCC's used in the DLS2 file, in addition to DLS1 chunks +*/ + +#define FOURCC_RGN2 mmioFOURCC('r','g','n','2') +#define FOURCC_LAR2 mmioFOURCC('l','a','r','2') +#define FOURCC_ART2 mmioFOURCC('a','r','t','2') +#define FOURCC_CDL mmioFOURCC('c','d','l',' ') +#define FOURCC_DLID mmioFOURCC('d','l','i','d') + +/* + Articulation connection graph definitions. These are in addition to + the definitions in the DLS1 header. +*/ + +/* Generic Sources (in addition to DLS1 sources. */ +#define CONN_SRC_POLYPRESSURE 0x0007 /* Polyphonic Pressure */ +#define CONN_SRC_CHANNELPRESSURE 0x0008 /* Channel Pressure */ +#define CONN_SRC_VIBRATO 0x0009 /* Vibrato LFO */ +#define CONN_SRC_MONOPRESSURE 0x000a /* MIDI Mono pressure */ + + +/* Midi Controllers */ +#define CONN_SRC_CC91 0x00db /* Reverb Send */ +#define CONN_SRC_CC93 0x00dd /* Chorus Send */ + + +/* Generic Destinations */ +#define CONN_DST_GAIN 0x0001 /* Same as CONN_DST_ ATTENUATION, but more appropriate terminology. */ +#define CONN_DST_KEYNUMBER 0x0005 /* Key Number Generator */ + +/* Audio Channel Output Destinations */ +#define CONN_DST_LEFT 0x0010 /* Left Channel Send */ +#define CONN_DST_RIGHT 0x0011 /* Right Channel Send */ +#define CONN_DST_CENTER 0x0012 /* Center Channel Send */ +#define CONN_DST_LEFTREAR 0x0013 /* Left Rear Channel Send */ +#define CONN_DST_RIGHTREAR 0x0014 /* Right Rear Channel Send */ +#define CONN_DST_LFE_CHANNEL 0x0015 /* LFE Channel Send */ +#define CONN_DST_CHORUS 0x0080 /* Chorus Send */ +#define CONN_DST_REVERB 0x0081 /* Reverb Send */ + +/* Vibrato LFO Destinations */ +#define CONN_DST_VIB_FREQUENCY 0x0114 /* Vibrato Frequency */ +#define CONN_DST_VIB_STARTDELAY 0x0115 /* Vibrato Start Delay */ + +/* EG1 Destinations */ +#define CONN_DST_EG1_DELAYTIME 0x020B /* EG1 Delay Time */ +#define CONN_DST_EG1_HOLDTIME 0x020C /* EG1 Hold Time */ +#define CONN_DST_EG1_SHUTDOWNTIME 0x020D /* EG1 Shutdown Time */ + + +/* EG2 Destinations */ +#define CONN_DST_EG2_DELAYTIME 0x030F /* EG2 Delay Time */ +#define CONN_DST_EG2_HOLDTIME 0x0310 /* EG2 Hold Time */ + + +/* Filter Destinations */ +#define CONN_DST_FILTER_CUTOFF 0x0500 /* Filter Cutoff Frequency */ +#define CONN_DST_FILTER_Q 0x0501 /* Filter Resonance */ + + +/* Transforms */ +#define CONN_TRN_CONVEX 0x0002 /* Convex Transform */ +#define CONN_TRN_SWITCH 0x0003 /* Switch Transform */ + + +/* Conditional chunk operators */ + #define DLS_CDL_AND 0x0001 /* X = X & Y */ + #define DLS_CDL_OR 0x0002 /* X = X | Y */ + #define DLS_CDL_XOR 0x0003 /* X = X ^ Y */ + #define DLS_CDL_ADD 0x0004 /* X = X + Y */ + #define DLS_CDL_SUBTRACT 0x0005 /* X = X - Y */ + #define DLS_CDL_MULTIPLY 0x0006 /* X = X * Y */ + #define DLS_CDL_DIVIDE 0x0007 /* X = X / Y */ + #define DLS_CDL_LOGICAL_AND 0x0008 /* X = X && Y */ + #define DLS_CDL_LOGICAL_OR 0x0009 /* X = X || Y */ + #define DLS_CDL_LT 0x000A /* X = (X < Y) */ + #define DLS_CDL_LE 0x000B /* X = (X <= Y) */ + #define DLS_CDL_GT 0x000C /* X = (X > Y) */ + #define DLS_CDL_GE 0x000D /* X = (X >= Y) */ + #define DLS_CDL_EQ 0x000E /* X = (X == Y) */ + #define DLS_CDL_NOT 0x000F /* X = !X */ + #define DLS_CDL_CONST 0x0010 /* 32-bit constant */ + #define DLS_CDL_QUERY 0x0011 /* 32-bit value returned from query */ + #define DLS_CDL_QUERYSUPPORTED 0x0012 /* Test to see if query is supported by synth */ + +/* + Loop and release +*/ + +#define WLOOP_TYPE_RELEASE 1 + +/* + WaveLink chunk +*/ + +#define F_WAVELINK_MULTICHANNEL 0x0002 + + +/* + DLSID queries for +*/ + +DEFINE_GUID(DLSID_GMInHardware, 0x178f2f24, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); +DEFINE_GUID(DLSID_GSInHardware, 0x178f2f25, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); +DEFINE_GUID(DLSID_XGInHardware, 0x178f2f26, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); +DEFINE_GUID(DLSID_SupportsDLS1, 0x178f2f27, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); +DEFINE_GUID(DLSID_SupportsDLS2, 0xf14599e5, 0x4689, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6); +DEFINE_GUID(DLSID_SampleMemorySize, 0x178f2f28, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); +DEFINE_GUID(DLSID_ManufacturersID, 0xb03e1181, 0x8095, 0x11d2, 0xa1, 0xef, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8); +DEFINE_GUID(DLSID_ProductID, 0xb03e1182, 0x8095, 0x11d2, 0xa1, 0xef, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8); +DEFINE_GUID(DLSID_SamplePlaybackRate, 0x2a91f713, 0xa4bf, 0x11d2, 0xbb, 0xdf, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8); + +#endif /* _INC_DLS2 */ diff --git a/windows_libs/mssdk/include/dmdls.h b/windows_libs/mssdk/include/dmdls.h new file mode 100644 index 00000000..974e2866 --- /dev/null +++ b/windows_libs/mssdk/include/dmdls.h @@ -0,0 +1,199 @@ +/************************************************************************ +* * +* dmdls.h -- DLS download definitions for DirectMusic API's * +* * +* Copyright (c) 1998-1999 Microsoft Corporation * +* * +************************************************************************/ + +#ifndef _DMDLS_ +#define _DMDLS_ + +#include "dls1.h" + +typedef long PCENT; /* Pitch cents */ +typedef long GCENT; /* Gain cents */ +typedef long TCENT; /* Time cents */ +typedef long PERCENT; /* Per.. cent! */ + +typedef LONGLONG REFERENCE_TIME; +typedef REFERENCE_TIME *LPREFERENCE_TIME; + +#ifndef MAKE_FOURCC +#define MAKEFOURCC(ch0, ch1, ch2, ch3) \ + ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \ + ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 )) + + +typedef DWORD FOURCC; /* a four character code */ +#endif + +typedef struct _DMUS_DOWNLOADINFO +{ + DWORD dwDLType; /* Instrument or Wave */ + DWORD dwDLId; /* Unique identifier to tag this download. */ + DWORD dwNumOffsetTableEntries; /* Number of index in the offset address table. */ + DWORD cbSize; /* Total size of this memory chunk. */ +} DMUS_DOWNLOADINFO; + +#define DMUS_DOWNLOADINFO_INSTRUMENT 1 +#define DMUS_DOWNLOADINFO_WAVE 2 +#define DMUS_DOWNLOADINFO_INSTRUMENT2 3 /* New version for better DLS2 support. */ + +/* Support for oneshot and streaming wave data + */ +#define DMUS_DOWNLOADINFO_WAVEARTICULATION 4 /* Wave articulation data */ +#define DMUS_DOWNLOADINFO_STREAMINGWAVE 5 /* One chunk of a streaming */ +#define DMUS_DOWNLOADINFO_ONESHOTWAVE 6 + +#define DMUS_DEFAULT_SIZE_OFFSETTABLE 1 + +/* Flags for DMUS_INSTRUMENT's ulFlags member */ + +#define DMUS_INSTRUMENT_GM_INSTRUMENT (1 << 0) + +typedef struct _DMUS_OFFSETTABLE +{ + ULONG ulOffsetTable[DMUS_DEFAULT_SIZE_OFFSETTABLE]; +} DMUS_OFFSETTABLE; + +typedef struct _DMUS_INSTRUMENT +{ + ULONG ulPatch; + ULONG ulFirstRegionIdx; + ULONG ulGlobalArtIdx; /* If zero the instrument does not have an articulation */ + ULONG ulFirstExtCkIdx; /* If zero no 3rd party entenstion chunks associated with the instrument */ + ULONG ulCopyrightIdx; /* If zero no Copyright information associated with the instrument */ + ULONG ulFlags; +} DMUS_INSTRUMENT; + +typedef struct _DMUS_REGION +{ + RGNRANGE RangeKey; + RGNRANGE RangeVelocity; + USHORT fusOptions; + USHORT usKeyGroup; + ULONG ulRegionArtIdx; /* If zero the region does not have an articulation */ + ULONG ulNextRegionIdx; /* If zero no more regions */ + ULONG ulFirstExtCkIdx; /* If zero no 3rd party entenstion chunks associated with the region */ + WAVELINK WaveLink; + WSMPL WSMP; /* If WSMP.cSampleLoops > 1 then a WLOOP is included */ + WLOOP WLOOP[1]; +} DMUS_REGION; + +typedef struct _DMUS_LFOPARAMS +{ + PCENT pcFrequency; + TCENT tcDelay; + GCENT gcVolumeScale; + PCENT pcPitchScale; + GCENT gcMWToVolume; + PCENT pcMWToPitch; +} DMUS_LFOPARAMS; + +typedef struct _DMUS_VEGPARAMS +{ + TCENT tcAttack; + TCENT tcDecay; + PERCENT ptSustain; + TCENT tcRelease; + TCENT tcVel2Attack; + TCENT tcKey2Decay; +} DMUS_VEGPARAMS; + +typedef struct _DMUS_PEGPARAMS +{ + TCENT tcAttack; + TCENT tcDecay; + PERCENT ptSustain; + TCENT tcRelease; + TCENT tcVel2Attack; + TCENT tcKey2Decay; + PCENT pcRange; +} DMUS_PEGPARAMS; + +typedef struct _DMUS_MSCPARAMS +{ + PERCENT ptDefaultPan; +} DMUS_MSCPARAMS; + +typedef struct _DMUS_ARTICPARAMS +{ + DMUS_LFOPARAMS LFO; + DMUS_VEGPARAMS VolEG; + DMUS_PEGPARAMS PitchEG; + DMUS_MSCPARAMS Misc; +} DMUS_ARTICPARAMS; + +typedef struct _DMUS_ARTICULATION /* Articulation chunk for DMUS_DOWNLOADINFO_INSTRUMENT format. */ +{ + ULONG ulArt1Idx; /* DLS Level 1 articulation chunk */ + ULONG ulFirstExtCkIdx; /* 3rd party extenstion chunks associated with the articulation */ +} DMUS_ARTICULATION; + +typedef struct _DMUS_ARTICULATION2 /* Articulation chunk for DMUS_DOWNLOADINFO_INSTRUMENT2 format. */ +{ + ULONG ulArtIdx; /* DLS Level 1/2 articulation chunk */ + ULONG ulFirstExtCkIdx; /* 3rd party extenstion chunks associated with the articulation */ + ULONG ulNextArtIdx; /* Additional articulation chunks */ +} DMUS_ARTICULATION2; + +#define DMUS_MIN_DATA_SIZE 4 +/* The actual number is determined by cbSize of struct _DMUS_EXTENSIONCHUNK */ + +typedef struct _DMUS_EXTENSIONCHUNK +{ + ULONG cbSize; /* Size of extension chunk */ + ULONG ulNextExtCkIdx; /* If zero no more 3rd party entenstion chunks */ + FOURCC ExtCkID; + BYTE byExtCk[DMUS_MIN_DATA_SIZE]; /* The actual number that follows is determined by cbSize */ +} DMUS_EXTENSIONCHUNK; + +/* The actual number is determined by cbSize of struct _DMUS_COPYRIGHT */ + +typedef struct _DMUS_COPYRIGHT +{ + ULONG cbSize; /* Size of copyright information */ + BYTE byCopyright[DMUS_MIN_DATA_SIZE]; /* The actual number that follows is determined by cbSize */ +} DMUS_COPYRIGHT; + +typedef struct _DMUS_WAVEDATA +{ + ULONG cbSize; + BYTE byData[DMUS_MIN_DATA_SIZE]; +} DMUS_WAVEDATA; + +typedef struct _DMUS_WAVE +{ + ULONG ulFirstExtCkIdx; /* If zero no 3rd party entenstion chunks associated with the wave */ + ULONG ulCopyrightIdx; /* If zero no Copyright information associated with the wave */ + ULONG ulWaveDataIdx; /* Location of actual wave data. */ + WAVEFORMATEX WaveformatEx; +} DMUS_WAVE; + +typedef struct _DMUS_NOTERANGE *LPDMUS_NOTERANGE; +typedef struct _DMUS_NOTERANGE +{ + DWORD dwLowNote; /* Sets the low note for the range of MIDI note events to which the instrument responds.*/ + DWORD dwHighNote; /* Sets the high note for the range of MIDI note events to which the instrument responds.*/ +} DMUS_NOTERANGE; + +typedef struct _DMUS_WAVEARTDL +{ + ULONG ulDownloadIdIdx; /* Download ID's of each buffer */ + ULONG ulBus; /* Playback bus */ + ULONG ulBuffers; /* Buffers */ + ULONG ulMasterDLId; /* Download ID of master voice of slave group */ + USHORT usOptions; /* Same as DLS2 region options */ +} DMUS_WAVEARTDL, + *LPDMUS_WAVEARTDL; + +typedef struct _DMUS_WAVEDL +{ + ULONG cbWaveData; /* Bytes of wave data */ +} DMUS_WAVEDL, + *LPDMUS_WAVEDL; + +#endif + + diff --git a/windows_libs/mssdk/include/dmerror.h b/windows_libs/mssdk/include/dmerror.h new file mode 100644 index 00000000..1097aa82 --- /dev/null +++ b/windows_libs/mssdk/include/dmerror.h @@ -0,0 +1,843 @@ +/************************************************************************ +* * +* dmerror.h -- Error code returned by DirectMusic API's * +* * +* Copyright (c) 1998-1999 Microsoft Corporation +* * +************************************************************************/ + +#ifndef _DMERROR_ +#define _DMERROR_ + +#define FACILITY_DIRECTMUSIC 0x878 /* Shared with DirectSound */ +#define DMUS_ERRBASE 0x1000 /* Make error codes human readable in hex */ + +#ifndef MAKE_HRESULT +#define MAKE_HRESULT(sev,fac,code) \ + ((HRESULT) (((unsigned long)(sev)<<31) | ((unsigned long)(fac)<<16) | ((unsigned long)(code))) ) +#endif + +#define MAKE_DMHRESULTSUCCESS(code) MAKE_HRESULT(0, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code))) +#define MAKE_DMHRESULTERROR(code) MAKE_HRESULT(1, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code))) + +/* DMUS_S_PARTIALLOAD + * + * The object could only load partially. This can happen if some components are + * not registered properly, such as embedded tracks and tools. This can also happen + * if some content is missing. For example, if a segment uses a DLS collection that + * is not in the loader's current search directory. + */ +#define DMUS_S_PARTIALLOAD MAKE_DMHRESULTSUCCESS(0x091) + +/* DMUS_S_PARTIALDOWNLOAD + * + * Return value from IDirectMusicBand::Download() which indicates that + * some of the instruments safely downloaded, but others failed. This usually + * occurs when some instruments are on PChannels not supported by the performance + * or port. + */ +#define DMUS_S_PARTIALDOWNLOAD MAKE_DMHRESULTSUCCESS(0x092) + +/* DMUS_S_REQUEUE + * + * Return value from IDirectMusicTool::ProcessPMsg() which indicates to the + * performance that it should cue the PMsg again automatically. + */ +#define DMUS_S_REQUEUE MAKE_DMHRESULTSUCCESS(0x200) + +/* DMUS_S_FREE + * + * Return value from IDirectMusicTool::ProcessPMsg() which indicates to the + * performance that it should free the PMsg automatically. + */ +#define DMUS_S_FREE MAKE_DMHRESULTSUCCESS(0x201) + +/* DMUS_S_END + * + * Return value from IDirectMusicTrack::Play() which indicates to the + * segment that the track has no more data after mtEnd. + */ +#define DMUS_S_END MAKE_DMHRESULTSUCCESS(0x202) + +/* DMUS_S_STRING_TRUNCATED + * + * Returned string has been truncated to fit the buffer size. + */ +#define DMUS_S_STRING_TRUNCATED MAKE_DMHRESULTSUCCESS(0x210) + +/* DMUS_S_LAST_TOOL + * + * Returned from IDirectMusicGraph::StampPMsg(), this indicates that the PMsg + * is already stamped with the last tool in the graph. The returned PMsg's + * tool pointer is now NULL. + */ +#define DMUS_S_LAST_TOOL MAKE_DMHRESULTSUCCESS(0x211) + +/* DMUS_S_OVER_CHORD + * + * Returned from IDirectMusicPerformance::MusicToMIDI(), this indicates + * that no note has been calculated because the music value has the note + * at a position higher than the top note of the chord. This applies only + * to DMUS_PLAYMODE_NORMALCHORD play mode. This success code indicates + * that the caller should not do anything with the note. It is not meant + * to be played against this chord. + */ +#define DMUS_S_OVER_CHORD MAKE_DMHRESULTSUCCESS(0x212) + +/* DMUS_S_UP_OCTAVE + * + * Returned from IDirectMusicPerformance::MIDIToMusic(), and + * IDirectMusicPerformance::MusicToMIDI(), this indicates + * that the note conversion generated a note value that is below 0, + * so it has been bumped up one or more octaves to be in the proper + * MIDI range of 0 through 127. + * Note that this is valid for MIDIToMusic() when using play modes + * DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of + * which store MIDI values in wMusicValue. With MusicToMIDI(), it is + * valid for all play modes. + * Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code. + */ +#define DMUS_S_UP_OCTAVE MAKE_DMHRESULTSUCCESS(0x213) + +/* DMUS_S_DOWN_OCTAVE + * + * Returned from IDirectMusicPerformance::MIDIToMusic(), and + * IDirectMusicPerformance::MusicToMIDI(), this indicates + * that the note conversion generated a note value that is above 127, + * so it has been bumped down one or more octaves to be in the proper + * MIDI range of 0 through 127. + * Note that this is valid for MIDIToMusic() when using play modes + * DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of + * which store MIDI values in wMusicValue. With MusicToMIDI(), it is + * valid for all play modes. + * Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code. + */ +#define DMUS_S_DOWN_OCTAVE MAKE_DMHRESULTSUCCESS(0x214) + +/* DMUS_S_NOBUFFERCONTROL + * + * Although the audio output from the port will be routed to the + * same device as the given DirectSound buffer, buffer controls + * such as pan and volume will not affect the output. + * + */ +#define DMUS_S_NOBUFFERCONTROL MAKE_DMHRESULTSUCCESS(0x215) + +/* DMUS_S_GARBAGE_COLLECTED + * + * The requested operation was not performed because during CollectGarbage + * the loader determined that the object had been released. + */ +#define DMUS_S_GARBAGE_COLLECTED MAKE_DMHRESULTSUCCESS(0x216) + +/* DMUS_E_DRIVER_FAILED + * + * An unexpected error was returned from a device driver, indicating + * possible failure of the driver or hardware. + */ +#define DMUS_E_DRIVER_FAILED MAKE_DMHRESULTERROR(0x0101) + +/* DMUS_E_PORTS_OPEN + * + * The requested operation cannot be performed while there are + * instantiated ports in any process in the system. + */ +#define DMUS_E_PORTS_OPEN MAKE_DMHRESULTERROR(0x0102) + +/* DMUS_E_DEVICE_IN_USE + * + * The requested device is already in use (possibly by a non-DirectMusic + * client) and cannot be opened again. + */ +#define DMUS_E_DEVICE_IN_USE MAKE_DMHRESULTERROR(0x0103) + +/* DMUS_E_INSUFFICIENTBUFFER + * + * Buffer is not large enough for requested operation. + */ +#define DMUS_E_INSUFFICIENTBUFFER MAKE_DMHRESULTERROR(0x0104) + +/* DMUS_E_BUFFERNOTSET + * + * No buffer was prepared for the download data. + */ +#define DMUS_E_BUFFERNOTSET MAKE_DMHRESULTERROR(0x0105) + +/* DMUS_E_BUFFERNOTAVAILABLE + * + * Download failed due to inability to access or create download buffer. + */ +#define DMUS_E_BUFFERNOTAVAILABLE MAKE_DMHRESULTERROR(0x0106) + +/* DMUS_E_NOTADLSCOL + * + * Error parsing DLS collection. File is corrupt. + */ +#define DMUS_E_NOTADLSCOL MAKE_DMHRESULTERROR(0x0108) + +/* DMUS_E_INVALIDOFFSET + * + * Wave chunks in DLS collection file are at incorrect offsets. + */ +#define DMUS_E_INVALIDOFFSET MAKE_DMHRESULTERROR(0x0109) + +/* DMUS_E_ALREADY_LOADED + * + * Second attempt to load a DLS collection that is currently open. + */ +#define DMUS_E_ALREADY_LOADED MAKE_DMHRESULTERROR(0x0111) + +/* DMUS_E_INVALIDPOS + * + * Error reading wave data from DLS collection. Indicates bad file. + */ +#define DMUS_E_INVALIDPOS MAKE_DMHRESULTERROR(0x0113) + +/* DMUS_E_INVALIDPATCH + * + * There is no instrument in the collection that matches patch number. + */ +#define DMUS_E_INVALIDPATCH MAKE_DMHRESULTERROR(0x0114) + +/* DMUS_E_CANNOTSEEK + * + * The IStream* doesn't support Seek(). + */ +#define DMUS_E_CANNOTSEEK MAKE_DMHRESULTERROR(0x0115) + +/* DMUS_E_CANNOTWRITE + * + * The IStream* doesn't support Write(). + */ +#define DMUS_E_CANNOTWRITE MAKE_DMHRESULTERROR(0x0116) + +/* DMUS_E_CHUNKNOTFOUND + * + * The RIFF parser doesn't contain a required chunk while parsing file. + */ +#define DMUS_E_CHUNKNOTFOUND MAKE_DMHRESULTERROR(0x0117) + +/* DMUS_E_INVALID_DOWNLOADID + * + * Invalid download id was used in the process of creating a download buffer. + */ +#define DMUS_E_INVALID_DOWNLOADID MAKE_DMHRESULTERROR(0x0119) + +/* DMUS_E_NOT_DOWNLOADED_TO_PORT + * + * Tried to unload an object that was not downloaded or previously unloaded. + */ +#define DMUS_E_NOT_DOWNLOADED_TO_PORT MAKE_DMHRESULTERROR(0x0120) + +/* DMUS_E_ALREADY_DOWNLOADED + * + * Buffer was already downloaded to synth. + */ +#define DMUS_E_ALREADY_DOWNLOADED MAKE_DMHRESULTERROR(0x0121) + +/* DMUS_E_UNKNOWN_PROPERTY + * + * The specified property item was not recognized by the target object. + */ +#define DMUS_E_UNKNOWN_PROPERTY MAKE_DMHRESULTERROR(0x0122) + +/* DMUS_E_SET_UNSUPPORTED + * + * The specified property item may not be set on the target object. + */ +#define DMUS_E_SET_UNSUPPORTED MAKE_DMHRESULTERROR(0x0123) + +/* DMUS_E_GET_UNSUPPORTED + * + * The specified property item may not be retrieved from the target object. + */ +#define DMUS_E_GET_UNSUPPORTED MAKE_DMHRESULTERROR(0x0124) + +/* DMUS_E_NOTMONO + * + * Wave chunk has more than one interleaved channel. DLS format requires MONO. + */ +#define DMUS_E_NOTMONO MAKE_DMHRESULTERROR(0x0125) + +/* DMUS_E_BADARTICULATION + * + * Invalid articulation chunk in DLS collection. + */ +#define DMUS_E_BADARTICULATION MAKE_DMHRESULTERROR(0x0126) + +/* DMUS_E_BADINSTRUMENT + * + * Invalid instrument chunk in DLS collection. + */ +#define DMUS_E_BADINSTRUMENT MAKE_DMHRESULTERROR(0x0127) + +/* DMUS_E_BADWAVELINK + * + * Wavelink chunk in DLS collection points to invalid wave. + */ +#define DMUS_E_BADWAVELINK MAKE_DMHRESULTERROR(0x0128) + +/* DMUS_E_NOARTICULATION + * + * Articulation missing from instrument in DLS collection. + */ +#define DMUS_E_NOARTICULATION MAKE_DMHRESULTERROR(0x0129) + +/* DMUS_E_NOTPCM + * + * Downoaded DLS wave is not in PCM format. +*/ +#define DMUS_E_NOTPCM MAKE_DMHRESULTERROR(0x012A) + +/* DMUS_E_BADWAVE + * + * Bad wave chunk in DLS collection + */ +#define DMUS_E_BADWAVE MAKE_DMHRESULTERROR(0x012B) + +/* DMUS_E_BADOFFSETTABLE + * + * Offset Table for download buffer has errors. + */ +#define DMUS_E_BADOFFSETTABLE MAKE_DMHRESULTERROR(0x012C) + +/* DMUS_E_UNKNOWNDOWNLOAD + * + * Attempted to download unknown data type. + */ +#define DMUS_E_UNKNOWNDOWNLOAD MAKE_DMHRESULTERROR(0x012D) + +/* DMUS_E_NOSYNTHSINK + * + * The operation could not be completed because no sink was connected to + * the synthesizer. + */ +#define DMUS_E_NOSYNTHSINK MAKE_DMHRESULTERROR(0x012E) + +/* DMUS_E_ALREADYOPEN + * + * An attempt was made to open the software synthesizer while it was already + * open. + * ASSERT? + */ +#define DMUS_E_ALREADYOPEN MAKE_DMHRESULTERROR(0x012F) + +/* DMUS_E_ALREADYCLOSE + * + * An attempt was made to close the software synthesizer while it was already + * open. + * ASSERT? + */ +#define DMUS_E_ALREADYCLOSED MAKE_DMHRESULTERROR(0x0130) + +/* DMUS_E_SYNTHNOTCONFIGURED + * + * The operation could not be completed because the software synth has not + * yet been fully configured. + * ASSERT? + */ +#define DMUS_E_SYNTHNOTCONFIGURED MAKE_DMHRESULTERROR(0x0131) + +/* DMUS_E_SYNTHACTIVE + * + * The operation cannot be carried out while the synthesizer is active. + */ +#define DMUS_E_SYNTHACTIVE MAKE_DMHRESULTERROR(0x0132) + +/* DMUS_E_CANNOTREAD + * + * An error occurred while attempting to read from the IStream* object. + */ +#define DMUS_E_CANNOTREAD MAKE_DMHRESULTERROR(0x0133) + +/* DMUS_E_DMUSIC_RELEASED + * + * The operation cannot be performed because the final instance of the + * DirectMusic object was released. Ports cannot be used after final + * release of the DirectMusic object. + */ +#define DMUS_E_DMUSIC_RELEASED MAKE_DMHRESULTERROR(0x0134) + +/* DMUS_E_BUFFER_EMPTY + * + * There was no data in the referenced buffer. + */ +#define DMUS_E_BUFFER_EMPTY MAKE_DMHRESULTERROR(0x0135) + +/* DMUS_E_BUFFER_FULL + * + * There is insufficient space to insert the given event into the buffer. + */ +#define DMUS_E_BUFFER_FULL MAKE_DMHRESULTERROR(0x0136) + +/* DMUS_E_PORT_NOT_CAPTURE + * + * The given operation could not be carried out because the port is a + * capture port. + */ +#define DMUS_E_PORT_NOT_CAPTURE MAKE_DMHRESULTERROR(0x0137) + +/* DMUS_E_PORT_NOT_RENDER + * + * The given operation could not be carried out because the port is a + * render port. + */ +#define DMUS_E_PORT_NOT_RENDER MAKE_DMHRESULTERROR(0x0138) + +/* DMUS_E_DSOUND_NOT_SET + * + * The port could not be created because no DirectSound has been specified. + * Specify a DirectSound interface via the IDirectMusic::SetDirectSound + * method; pass NULL to have DirectMusic manage usage of DirectSound. + */ +#define DMUS_E_DSOUND_NOT_SET MAKE_DMHRESULTERROR(0x0139) + +/* DMUS_E_ALREADY_ACTIVATED + * + * The operation cannot be carried out while the port is active. + */ +#define DMUS_E_ALREADY_ACTIVATED MAKE_DMHRESULTERROR(0x013A) + +/* DMUS_E_INVALIDBUFFER + * + * Invalid DirectSound buffer was handed to port. + */ +#define DMUS_E_INVALIDBUFFER MAKE_DMHRESULTERROR(0x013B) + +/* DMUS_E_WAVEFORMATNOTSUPPORTED + * + * Invalid buffer format was handed to the synth sink. + */ +#define DMUS_E_WAVEFORMATNOTSUPPORTED MAKE_DMHRESULTERROR(0x013C) + +/* DMUS_E_SYNTHINACTIVE + * + * The operation cannot be carried out while the synthesizer is inactive. + */ +#define DMUS_E_SYNTHINACTIVE MAKE_DMHRESULTERROR(0x013D) + +/* DMUS_E_DSOUND_ALREADY_SET + * + * IDirectMusic::SetDirectSound has already been called. It may not be + * changed while in use. + */ +#define DMUS_E_DSOUND_ALREADY_SET MAKE_DMHRESULTERROR(0x013E) + +/* DMUS_E_INVALID_EVENT + * + * The given event is invalid (either it is not a valid MIDI message + * or it makes use of running status). The event cannot be packed + * into the buffer. + */ +#define DMUS_E_INVALID_EVENT MAKE_DMHRESULTERROR(0x013F) + +/* DMUS_E_UNSUPPORTED_STREAM + * + * The IStream* object does not contain data supported by the loading object. + */ +#define DMUS_E_UNSUPPORTED_STREAM MAKE_DMHRESULTERROR(0x0150) + +/* DMUS_E_ALREADY_INITED + * + * The object has already been initialized. + */ +#define DMUS_E_ALREADY_INITED MAKE_DMHRESULTERROR(0x0151) + +/* DMUS_E_INVALID_BAND + * + * The file does not contain a valid band. + */ +#define DMUS_E_INVALID_BAND MAKE_DMHRESULTERROR(0x0152) + +/* DMUS_E_TRACK_HDR_NOT_FIRST_CK + * + * The IStream* object's data does not have a track header as the first chunk, + * and therefore can not be read by the segment object. + */ +#define DMUS_E_TRACK_HDR_NOT_FIRST_CK MAKE_DMHRESULTERROR(0x0155) + +/* DMUS_E_TOOL_HDR_NOT_FIRST_CK + * + * The IStream* object's data does not have a tool header as the first chunk, + * and therefore can not be read by the graph object. + */ +#define DMUS_E_TOOL_HDR_NOT_FIRST_CK MAKE_DMHRESULTERROR(0x0156) + +/* DMUS_E_INVALID_TRACK_HDR + * + * The IStream* object's data contains an invalid track header (ckid is 0 and + * fccType is NULL,) and therefore can not be read by the segment object. + */ +#define DMUS_E_INVALID_TRACK_HDR MAKE_DMHRESULTERROR(0x0157) + +/* DMUS_E_INVALID_TOOL_HDR + * + * The IStream* object's data contains an invalid tool header (ckid is 0 and + * fccType is NULL,) and therefore can not be read by the graph object. + */ +#define DMUS_E_INVALID_TOOL_HDR MAKE_DMHRESULTERROR(0x0158) + +/* DMUS_E_ALL_TOOLS_FAILED + * + * The graph object was unable to load all tools from the IStream* object data. + * This may be due to errors in the stream, or the tools being incorrectly + * registered on the client. + */ +#define DMUS_E_ALL_TOOLS_FAILED MAKE_DMHRESULTERROR(0x0159) + +/* DMUS_E_ALL_TRACKS_FAILED + * + * The segment object was unable to load all tracks from the IStream* object data. + * This may be due to errors in the stream, or the tracks being incorrectly + * registered on the client. + */ +#define DMUS_E_ALL_TRACKS_FAILED MAKE_DMHRESULTERROR(0x0160) + +/* DMUS_E_NOT_FOUND + * + * The requested item was not contained by the object. + */ +#define DMUS_E_NOT_FOUND MAKE_DMHRESULTERROR(0x0161) + +/* DMUS_E_NOT_INIT + * + * A required object is not initialized or failed to initialize. + */ +#define DMUS_E_NOT_INIT MAKE_DMHRESULTERROR(0x0162) + +/* DMUS_E_TYPE_DISABLED + * + * The requested parameter type is currently disabled. Parameter types may + * be enabled and disabled by certain calls to SetParam(). + */ +#define DMUS_E_TYPE_DISABLED MAKE_DMHRESULTERROR(0x0163) + +/* DMUS_E_TYPE_UNSUPPORTED + * + * The requested parameter type is not supported on the object. + */ +#define DMUS_E_TYPE_UNSUPPORTED MAKE_DMHRESULTERROR(0x0164) + +/* DMUS_E_TIME_PAST + * + * The time is in the past, and the operation can not succeed. + */ +#define DMUS_E_TIME_PAST MAKE_DMHRESULTERROR(0x0165) + +/* DMUS_E_TRACK_NOT_FOUND + * + * The requested track is not contained by the segment. + */ +#define DMUS_E_TRACK_NOT_FOUND MAKE_DMHRESULTERROR(0x0166) + +/* DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT + * + * The track does not support clock time playback or getparam. + */ +#define DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT MAKE_DMHRESULTERROR(0x0167) + +/* DMUS_E_NO_MASTER_CLOCK + * + * There is no master clock in the performance. Be sure to call + * IDirectMusicPerformance::Init(). + */ +#define DMUS_E_NO_MASTER_CLOCK MAKE_DMHRESULTERROR(0x0170) + +/* DMUS_E_LOADER_NOCLASSID + * + * The class id field is required and missing in the DMUS_OBJECTDESC. + */ +#define DMUS_E_LOADER_NOCLASSID MAKE_DMHRESULTERROR(0x0180) + +/* DMUS_E_LOADER_BADPATH + * + * The requested file path is invalid. + */ +#define DMUS_E_LOADER_BADPATH MAKE_DMHRESULTERROR(0x0181) + +/* DMUS_E_LOADER_FAILEDOPEN + * + * File open failed - either file doesn't exist or is locked. + */ +#define DMUS_E_LOADER_FAILEDOPEN MAKE_DMHRESULTERROR(0x0182) + +/* DMUS_E_LOADER_FORMATNOTSUPPORTED + * + * Search data type is not supported. + */ +#define DMUS_E_LOADER_FORMATNOTSUPPORTED MAKE_DMHRESULTERROR(0x0183) + +/* DMUS_E_LOADER_FAILEDCREATE + * + * Unable to find or create object. + */ +#define DMUS_E_LOADER_FAILEDCREATE MAKE_DMHRESULTERROR(0x0184) + +/* DMUS_E_LOADER_OBJECTNOTFOUND + * + * Object was not found. + */ +#define DMUS_E_LOADER_OBJECTNOTFOUND MAKE_DMHRESULTERROR(0x0185) + +/* DMUS_E_LOADER_NOFILENAME + * + * The file name is missing from the DMUS_OBJECTDESC. + */ +#define DMUS_E_LOADER_NOFILENAME MAKE_DMHRESULTERROR(0x0186) + +/* DMUS_E_INVALIDFILE + * + * The file requested is not a valid file. + */ +#define DMUS_E_INVALIDFILE MAKE_DMHRESULTERROR(0x0200) + +/* DMUS_E_ALREADY_EXISTS + * + * The tool is already contained in the graph. Create a new instance. + */ +#define DMUS_E_ALREADY_EXISTS MAKE_DMHRESULTERROR(0x0201) + +/* DMUS_E_OUT_OF_RANGE + * + * Value is out of range, for instance the requested length is longer than + * the segment. + */ +#define DMUS_E_OUT_OF_RANGE MAKE_DMHRESULTERROR(0x0202) + +/* DMUS_E_SEGMENT_INIT_FAILED + * + * Segment initialization failed, most likely due to a critical memory situation. + */ +#define DMUS_E_SEGMENT_INIT_FAILED MAKE_DMHRESULTERROR(0x0203) + +/* DMUS_E_ALREADY_SENT + * + * The DMUS_PMSG has already been sent to the performance object via + * IDirectMusicPerformance::SendPMsg(). + */ +#define DMUS_E_ALREADY_SENT MAKE_DMHRESULTERROR(0x0204) + +/* DMUS_E_CANNOT_FREE + * + * The DMUS_PMSG was either not allocated by the performance via + * IDirectMusicPerformance::AllocPMsg(), or it was already freed via + * IDirectMusicPerformance::FreePMsg(). + */ +#define DMUS_E_CANNOT_FREE MAKE_DMHRESULTERROR(0x0205) + +/* DMUS_E_CANNOT_OPEN_PORT + * + * The default system port could not be opened. + */ +#define DMUS_E_CANNOT_OPEN_PORT MAKE_DMHRESULTERROR(0x0206) + +/* DMUS_E_CANNOT_CONVERT + * + * A call to MIDIToMusic() or MusicToMIDI() resulted in an error because + * the requested conversion could not happen. This usually occurs when the + * provided DMUS_CHORD_KEY structure has an invalid chord or scale pattern. + */ +#define DMUS_E_CANNOT_CONVERT MAKE_DMHRESULTERROR(0x0207) +/* misspelling in previous versions of DirectX preserved for backward compatibility */ +#define DMUS_E_CONNOT_CONVERT DMUS_E_CANNOT_CONVERT + +/* DMUS_E_DESCEND_CHUNK_FAIL + * + * DMUS_E_DESCEND_CHUNK_FAIL is returned when the end of the file + * was reached before the desired chunk was found. + */ +#define DMUS_E_DESCEND_CHUNK_FAIL MAKE_DMHRESULTERROR(0x0210) + +/* DMUS_E_NOT_LOADED + * + * An attempt to use this object failed because it first needs to + * be loaded. + */ +#define DMUS_E_NOT_LOADED MAKE_DMHRESULTERROR(0x0211) + +/* DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE + * + * The activeX scripting engine for the script's language is not compatible with + * DirectMusic. + * + */ +#define DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE MAKE_DMHRESULTERROR(0x0213) + +/* DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE + * + * A varient was used that had a type that is not supported by DirectMusic. + * + */ +#define DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE MAKE_DMHRESULTERROR(0x0214) + +/* DMUS_E_SCRIPT_ERROR_IN_SCRIPT + * + * An error was encountered while parsing or executing the script. + * The pErrorInfo parameter (if supplied) was filled with information about the error. + */ +#define DMUS_E_SCRIPT_ERROR_IN_SCRIPT MAKE_DMHRESULTERROR(0x0215) + +/* DMUS_E_SCRIPT_CANTLOAD_OLEAUT32 + * + * Loading of oleaut32.dll failed. VBScript and other activeX scripting languages + * require use of oleaut32.dll. On platforms where oleaut32.dll is not present, only + * the DirectMusicScript language, which doesn't require oleaut32.dll can be used. + */ +#define DMUS_E_SCRIPT_CANTLOAD_OLEAUT32 MAKE_DMHRESULTERROR(0x0216) + +/* DMUS_E_SCRIPT_LOADSCRIPT_ERROR + * + * An error occured while parsing a script loaded using LoadScript. The script that + * was loaded contains an error. + */ +#define DMUS_E_SCRIPT_LOADSCRIPT_ERROR MAKE_DMHRESULTERROR(0x0217) + +/* DMUS_E_SCRIPT_INVALID_FILE + * + * The script file is invalid. + */ +#define DMUS_E_SCRIPT_INVALID_FILE MAKE_DMHRESULTERROR(0x0218) + +/* DMUS_E_INVALID_SCRIPTTRACK + * + * The file contains an invalid script track. + */ +#define DMUS_E_INVALID_SCRIPTTRACK MAKE_DMHRESULTERROR(0x0219) + +/* DMUS_E_SCRIPT_VARIABLE_NOT_FOUND + * + * The script does not contain a variable with the specified name. + */ +#define DMUS_E_SCRIPT_VARIABLE_NOT_FOUND MAKE_DMHRESULTERROR(0x021A) + +/* DMUS_E_SCRIPT_ROUTINE_NOT_FOUND + * + * The script does not contain a routine with the specified name. + */ +#define DMUS_E_SCRIPT_ROUTINE_NOT_FOUND MAKE_DMHRESULTERROR(0x021B) + +/* DMUS_E_SCRIPT_CONTENT_READONLY + * + * Scripts variables for content referenced or embedded in a script cannot be set. + */ +#define DMUS_E_SCRIPT_CONTENT_READONLY MAKE_DMHRESULTERROR(0x021C) + +/* DMUS_E_SCRIPT_NOT_A_REFERENCE + * + * Attempt was made to set a script's variable by reference to a value that was + * not an object type. + */ +#define DMUS_E_SCRIPT_NOT_A_REFERENCE MAKE_DMHRESULTERROR(0x021D) + +/* DMUS_E_SCRIPT_VALUE_NOT_SUPPORTED + * + * Attempt was made to set a script's variable by value to an object that does + * not support a default value property. + */ +#define DMUS_E_SCRIPT_VALUE_NOT_SUPPORTED MAKE_DMHRESULTERROR(0x021E) + +/* DMUS_E_INVALID_SEGMENTTRIGGERTRACK + * + * The file contains an invalid segment trigger track. + */ +#define DMUS_E_INVALID_SEGMENTTRIGGERTRACK MAKE_DMHRESULTERROR(0x0220) + +/* DMUS_E_INVALID_LYRICSTRACK + * + * The file contains an invalid lyrics track. + */ +#define DMUS_E_INVALID_LYRICSTRACK MAKE_DMHRESULTERROR(0x0221) + +/* DMUS_E_INVALID_PARAMCONTROLTRACK + * + * The file contains an invalid parameter control track. + */ +#define DMUS_E_INVALID_PARAMCONTROLTRACK MAKE_DMHRESULTERROR(0x0222) + +/* DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR + * + * A script written in AudioVBScript could not be read because it contained a statement that + * is not allowed by the AudioVBScript language. + */ +#define DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR MAKE_DMHRESULTERROR(0x0223) + +/* DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR + * + * A script routine written in AudioVBScript failed because an invalid operation occurred. For example, + * adding the number 3 to a segment object would produce this error. So would attempting to call a routine + * that doesn't exist. + */ +#define DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR MAKE_DMHRESULTERROR(0x0224) + +/* DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE + * + * A script routine written in AudioVBScript failed because a function outside of a script failed to complete. + * For example, a call to PlaySegment that fails to play because of low memory would return this error. + */ +#define DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE MAKE_DMHRESULTERROR(0x0225) + +/* DMUS_E_AUDIOPATHS_NOT_VALID + * + * The Performance has set up some PChannels using the AssignPChannel command, which + * makes it not capable of supporting audio paths. + */ +#define DMUS_E_AUDIOPATHS_NOT_VALID MAKE_DMHRESULTERROR(0x0226) + +/* DMUS_E_AUDIOPATHS_IN_USE + * + * This is the inverse of the previous error. + * The Performance has set up some audio paths, which makes is incompatible + * with the calls to allocate pchannels, etc. + */ +#define DMUS_E_AUDIOPATHS_IN_USE MAKE_DMHRESULTERROR(0x0227) + +/* DMUS_E_NO_AUDIOPATH_CONFIG + * + * A segment or song was asked for its embedded audio path configuration, + * but there isn't any. + */ +#define DMUS_E_NO_AUDIOPATH_CONFIG MAKE_DMHRESULTERROR(0x0228) + +/* DMUS_E_AUDIOPATH_INACTIVE + * + * An audiopath is inactive, perhaps because closedown was called. + */ +#define DMUS_E_AUDIOPATH_INACTIVE MAKE_DMHRESULTERROR(0x0229) + +/* DMUS_E_AUDIOPATH_NOBUFFER + * + * An audiopath failed to create because a requested buffer could not be created. + */ +#define DMUS_E_AUDIOPATH_NOBUFFER MAKE_DMHRESULTERROR(0x022A) + +/* DMUS_E_AUDIOPATH_NOPORT + * + * An audiopath could not be used for playback because it lacked port assignments. + */ +#define DMUS_E_AUDIOPATH_NOPORT MAKE_DMHRESULTERROR(0x022B) + +/* DMUS_E_NO_AUDIOPATH + * + * Attempt was made to play segment in audiopath mode and there was no audiopath. + */ +#define DMUS_E_NO_AUDIOPATH MAKE_DMHRESULTERROR(0x022C) + +/* DMUS_E_INVALIDCHUNK + * + * Invalid data was found in a RIFF file chunk. + */ +#define DMUS_E_INVALIDCHUNK MAKE_DMHRESULTERROR(0x022D) + +/* DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER + * + * Attempt was made to create an audiopath that sends to a global effects buffer which did not exist. + */ +#define DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER MAKE_DMHRESULTERROR(0x022E) + +/* DMUS_E_INVALID_CONTAINER_OBJECT + * + * The file does not contain a valid container object. + */ +#define DMUS_E_INVALID_CONTAINER_OBJECT MAKE_DMHRESULTERROR(0x022F) + +#endif diff --git a/windows_libs/mssdk/include/dmksctrl.h b/windows_libs/mssdk/include/dmksctrl.h new file mode 100644 index 00000000..e0cf392c --- /dev/null +++ b/windows_libs/mssdk/include/dmksctrl.h @@ -0,0 +1,167 @@ +/************************************************************************ +* * +* dmksctrl.h -- Definition of IKsControl * +* * +* Copyright (c) 1998-1999 Microsoft Corporation +* * +* * +* This header file contains the definition of IKsControl, which * +* duplicates definitions from ks.h and ksproxy.h. Your code should * +* include ks.h and ksproxy.h directly if you have them (they are * +* provided in the Windows 98 DDK and will be in the Windows NT 5 * +* SDK). * +* * +************************************************************************/ + +#ifndef _DMKSCTRL_ +#define _DMKSCTRL_ + +#if _MSC_VER >= 1200 +#pragma warning(push) +#endif +#pragma warning(disable:4201) /* Disable warnings on anonymous unions */ + +#include + +#include + +#if !defined(_NTRTL_) + #ifndef DEFINE_GUIDEX + #define DEFINE_GUIDEX(name) EXTERN_C const CDECL GUID name + #endif /* !defined(DEFINE_GUIDEX) */ + + #ifndef STATICGUIDOF + #define STATICGUIDOF(guid) STATIC_##guid + #endif /* !defined(STATICGUIDOF) */ +#endif /* !defined(_NTRTL_) */ + +#ifndef STATIC_IID_IKsControl +#define STATIC_IID_IKsControl\ + 0x28F54685L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +#endif /* STATIC_IID_IKsControl */ + +/* + * Warning: This will prevent the rest of ks.h from being pulled in if ks.h is + * included after dmksctrl.h. Make sure you do not include both headers in + * the same source file. + */ +#ifndef _KS_ +#define _KS_ + +#if (defined(_MSC_EXTENSIONS) || defined(__cplusplus)) && !defined(CINTERFACE) +typedef struct { + union { + struct { + GUID Set; + ULONG Id; + ULONG Flags; + }; + LONGLONG Alignment; + }; +} KSIDENTIFIER, *PKSIDENTIFIER; +#else +typedef struct { + union { + struct { + GUID Set; + ULONG Id; + ULONG Flags; + } Data; + LONGLONG Alignment; + }; +} KSIDENTIFIER, *PKSIDENTIFIER; +#endif + +typedef KSIDENTIFIER KSPROPERTY, *PKSPROPERTY, KSMETHOD, *PKSMETHOD, KSEVENT, *PKSEVENT; + +#define KSMETHOD_TYPE_NONE 0x00000000 +#define KSMETHOD_TYPE_READ 0x00000001 +#define KSMETHOD_TYPE_WRITE 0x00000002 +#define KSMETHOD_TYPE_MODIFY 0x00000003 +#define KSMETHOD_TYPE_SOURCE 0x00000004 + +#define KSMETHOD_TYPE_SEND 0x00000001 +#define KSMETHOD_TYPE_SETSUPPORT 0x00000100 +#define KSMETHOD_TYPE_BASICSUPPORT 0x00000200 + +#define KSPROPERTY_TYPE_GET 0x00000001 +#define KSPROPERTY_TYPE_SET 0x00000002 +#define KSPROPERTY_TYPE_SETSUPPORT 0x00000100 +#define KSPROPERTY_TYPE_BASICSUPPORT 0x00000200 +#define KSPROPERTY_TYPE_RELATIONS 0x00000400 +#define KSPROPERTY_TYPE_SERIALIZESET 0x00000800 +#define KSPROPERTY_TYPE_UNSERIALIZESET 0x00001000 +#define KSPROPERTY_TYPE_SERIALIZERAW 0x00002000 +#define KSPROPERTY_TYPE_UNSERIALIZERAW 0x00004000 +#define KSPROPERTY_TYPE_SERIALIZESIZE 0x00008000 +#define KSPROPERTY_TYPE_DEFAULTVALUES 0x00010000 + +#define KSPROPERTY_TYPE_TOPOLOGY 0x10000000 +#endif /* _KS_ */ + +#ifndef _IKsControl_ +#define _IKsControl_ + +#ifdef DECLARE_INTERFACE_ + + +#undef INTERFACE +#define INTERFACE IKsControl +DECLARE_INTERFACE_(IKsControl, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /*IKsControl*/ + STDMETHOD(KsProperty)( + THIS_ + IN PKSPROPERTY Property, + IN ULONG PropertyLength, + IN OUT LPVOID PropertyData, + IN ULONG DataLength, + OUT ULONG* BytesReturned + ) PURE; + STDMETHOD(KsMethod)( + THIS_ + IN PKSMETHOD Method, + IN ULONG MethodLength, + IN OUT LPVOID MethodData, + IN ULONG DataLength, + OUT ULONG* BytesReturned + ) PURE; + STDMETHOD(KsEvent)( + THIS_ + IN PKSEVENT Event OPTIONAL, + IN ULONG EventLength, + IN OUT LPVOID EventData, + IN ULONG DataLength, + OUT ULONG* BytesReturned + ) PURE; +}; + +#endif /* DECLARE_INTERFACE_ */ +#endif /* _IKsControl_ */ + +#include + +DEFINE_GUID(IID_IKsControl, 0x28F54685, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96); + +/* These formats are in ksmedia.h + */ +#ifndef _KSMEDIA_ + +DEFINE_GUID(KSDATAFORMAT_SUBTYPE_MIDI, 0x1D262760L, 0xE957, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00); +DEFINE_GUID(KSDATAFORMAT_SUBTYPE_DIRECTMUSIC, 0x1a82f8bc, 0x3f8b, 0x11d2, 0xb7, 0x74, 0x00, 0x60, 0x08, 0x33, 0x16, 0xc1); + +#endif + +#if _MSC_VER >= 1200 +#pragma warning(pop) +#endif + +#endif /* _DMKSCTRL */ + + + diff --git a/windows_libs/mssdk/include/dmo.h b/windows_libs/mssdk/include/dmo.h new file mode 100644 index 00000000..de4cff06 --- /dev/null +++ b/windows_libs/mssdk/include/dmo.h @@ -0,0 +1,29 @@ +//------------------------------------------------------------------------------ +// File: DMO.h +// +// Desc: Headers needed by almost all DMOs. +// +// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __DMO_H__ +#define __DMO_H__ + + +#include "mediaerr.h" + +// When using ATL we get collisions on Lock so in this case rename +// IMediaObject::Lock to IMediaObject::DMOLock + +#ifdef FIX_LOCK_NAME +#define Lock DMOLock +#endif +#include "mediaobj.h" +#ifdef FIX_LOCK_NAME +#undef Lock +#endif +#include "dmoreg.h" +#include "dmort.h" + +#endif //__DMO_H__ diff --git a/windows_libs/mssdk/include/dmodshow.h b/windows_libs/mssdk/include/dmodshow.h new file mode 100644 index 00000000..71bba9ad --- /dev/null +++ b/windows_libs/mssdk/include/dmodshow.h @@ -0,0 +1,176 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0338 */ +/* Compiler settings for dmodshow.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __dmodshow_h__ +#define __dmodshow_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IDMOWrapperFilter_FWD_DEFINED__ +#define __IDMOWrapperFilter_FWD_DEFINED__ +typedef interface IDMOWrapperFilter IDMOWrapperFilter; +#endif /* __IDMOWrapperFilter_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "unknwn.h" +#include "objidl.h" +#include "mediaobj.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_dmodshow_0000 */ +/* [local] */ + +DEFINE_GUID(CLSID_DMOWrapperFilter, 0x94297043,0xbd82,0x4dfd,0xb0,0xde,0x81,0x77,0x73,0x9c,0x6d,0x20); +DEFINE_GUID(CLSID_DMOFilterCategory,0xbcd5796c,0xbd52,0x4d30,0xab,0x76,0x70,0xf9,0x75,0xb8,0x91,0x99); + + +extern RPC_IF_HANDLE __MIDL_itf_dmodshow_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dmodshow_0000_v0_0_s_ifspec; + +#ifndef __IDMOWrapperFilter_INTERFACE_DEFINED__ +#define __IDMOWrapperFilter_INTERFACE_DEFINED__ + +/* interface IDMOWrapperFilter */ +/* [uuid][object] */ + + +EXTERN_C const IID IID_IDMOWrapperFilter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("52d6f586-9f0f-4824-8fc8-e32ca04930c2") + IDMOWrapperFilter : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Init( + REFCLSID clsidDMO, + REFCLSID catDMO) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDMOWrapperFilterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDMOWrapperFilter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDMOWrapperFilter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDMOWrapperFilter * This); + + HRESULT ( STDMETHODCALLTYPE *Init )( + IDMOWrapperFilter * This, + REFCLSID clsidDMO, + REFCLSID catDMO); + + END_INTERFACE + } IDMOWrapperFilterVtbl; + + interface IDMOWrapperFilter + { + CONST_VTBL struct IDMOWrapperFilterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDMOWrapperFilter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDMOWrapperFilter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDMOWrapperFilter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDMOWrapperFilter_Init(This,clsidDMO,catDMO) \ + (This)->lpVtbl -> Init(This,clsidDMO,catDMO) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDMOWrapperFilter_Init_Proxy( + IDMOWrapperFilter * This, + REFCLSID clsidDMO, + REFCLSID catDMO); + + +void __RPC_STUB IDMOWrapperFilter_Init_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDMOWrapperFilter_INTERFACE_DEFINED__ */ + + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/dmoimpl.h b/windows_libs/mssdk/include/dmoimpl.h new file mode 100644 index 00000000..2960438c --- /dev/null +++ b/windows_libs/mssdk/include/dmoimpl.h @@ -0,0 +1,631 @@ +//------------------------------------------------------------------------------ +// File: DMOImpl.h +// +// Desc: Classes to implement a DMO. +// +// Copyright (c) 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef _dmoimpl_h_ +#define _dmoimpl_h_ + +#ifdef _DEBUG +#include +#endif + +// Class to implement a DMO +// +// +// Assumes the number of input and output streams is fixed +// (these are template parameters) +// +// Provides following services: +// +// Basic parameter checking and locking +// Fully implements : +// GetStreamCount +// SetInputType +// SetOutputType +// GetCurrentInputType +// GetCurrentOutputType +// +// Checks if all types are set before streaming +// Automatically calls AllocateStreamingResources before streaming +// if it's not been called already +// Prevents streaming until the types on all non-optional streams +// have been set +// +// +// Derived class implements the following methods : +// +/* + HRESULT InternalGetInputStreamInfo(DWORD dwInputStreamIndex, DWORD *pdwFlags); + HRESULT InternalGetOutputStreamInfo(DWORD dwOutputStreamIndex, DWORD *pdwFlags); + HRESULT InternalCheckInputType(DWORD dwInputStreamIndex, const DMO_MEDIA_TYPE *pmt); + HRESULT InternalCheckOutputType(DWORD dwOutputStreamIndex, const DMO_MEDIA_TYPE *pmt); + HRESULT InternalGetInputType(DWORD dwInputStreamIndex, DWORD dwTypeIndex, + DMO_MEDIA_TYPE *pmt); + HRESULT InternalGetOutputType(DWORD dwOutputStreamIndex, DWORD dwTypeIndex, + DMO_MEDIA_TYPE *pmt); + HRESULT InternalGetInputSizeInfo(DWORD dwInputStreamIndex, DWORD *pcbSize, + DWORD *pcbMaxLookahead, DWORD *pcbAlignment); + HRESULT InternalGetOutputSizeInfo(DWORD dwOutputStreamIndex, DWORD *pcbSize, + DWORD *pcbAlignment); + HRESULT InternalGetInputMaxLatency(DWORD dwInputStreamIndex, REFERENCE_TIME *prtMaxLatency); + HRESULT InternalSetInputMaxLatency(DWORD dwInputStreamIndex, REFERENCE_TIME rtMaxLatency); + HRESULT InternalFlush(); + HRESULT InternalDiscontinuity(DWORD dwInputStreamIndex); + HRESULT InternalAllocateStreamingResources(); + HRESULT InternalFreeStreamingResources(); + HRESULT InternalProcessInput(DWORD dwInputStreamIndex, IMediaBuffer *pBuffer, + DWORD dwFlags, REFERENCE_TIME rtTimestamp, + REFERENCE_TIME rtTimelength); + HRESULT InternalProcessOutput(DWORD dwFlags, DWORD cOutputBufferCount, + DMO_OUTPUT_DATA_BUFFER *pOutputBuffers, + DWORD *pdwStatus); + HRESULT InternalAcceptingInput(DWORD dwInputStreamIndex); + void Lock(); + void Unlock(); + + Notes: + The derived class is meant to do most work to initialize streaming + in AllocateStreamingResources rather than when types are set. + + This centralizes the work to one + clear place based on the types set for all streams. + + The derived class implements locking. + + The derived class implements the IUnknown methods + + Usage example (1 input and 1 output) : + class CMyDMO : public IMediaObjectImpl, + ... +*/ + + +#define INTERNAL_CALL(_T_, _X_) \ + static_cast<_T_ *>(this)->Internal##_X_ + +template +class IMediaObjectImpl : public IMediaObject +{ +private: + // Member variables + struct { + DWORD fTypeSet:1; + DWORD fIncomplete:1; + DMO_MEDIA_TYPE CurrentMediaType; + } m_InputInfo[NUMBEROFINPUTS], m_OutputInfo[NUMBEROFOUTPUTS]; + + bool m_fTypesSet; + bool m_fFlushed; + bool m_fResourcesAllocated; + +protected: + + // Helpers + bool InputTypeSet(DWORD ulInputStreamIndex) const + { + _ASSERTE(ulInputStreamIndex < NUMBEROFINPUTS); + return 0 != m_InputInfo[ulInputStreamIndex].fTypeSet; + } + + bool OutputTypeSet(DWORD ulOutputStreamIndex) const + { + _ASSERTE(ulOutputStreamIndex < NUMBEROFOUTPUTS); + return 0 != m_OutputInfo[ulOutputStreamIndex].fTypeSet; + } + const DMO_MEDIA_TYPE *InputType(DWORD ulInputStreamIndex) + { + if (!InputTypeSet(ulInputStreamIndex)) { + return NULL; + } + return &m_InputInfo[ulInputStreamIndex].CurrentMediaType; + } + const DMO_MEDIA_TYPE *OutputType(DWORD ulOutputStreamIndex) + { + if (!OutputTypeSet(ulOutputStreamIndex)) { + return NULL; + } + return &m_OutputInfo[ulOutputStreamIndex].CurrentMediaType; + } + + + class LockIt + { + public: + LockIt(_DERIVED_ *p) : m_p(p) + { + static_cast<_DERIVED_ *>(m_p)->Lock(); + } + ~LockIt() + { + static_cast<_DERIVED_ *>(m_p)->Unlock(); + } + _DERIVED_ *const m_p; + }; + + bool CheckTypesSet() + { + m_fTypesSet = false; + DWORD dw; + for (dw = 0; dw < NUMBEROFINPUTS; dw++) { + if (!InputTypeSet(dw)) { + return false; + } + } + for (dw = 0; dw < NUMBEROFOUTPUTS; dw++) { + if (!OutputTypeSet(dw)) { + // Check if it's optional + DWORD dwFlags; +#ifdef _DEBUG + dwFlags = 0xFFFFFFFF; +#endif + INTERNAL_CALL(_DERIVED_, GetOutputStreamInfo)(dw, &dwFlags); + _ASSERTE(0 == (dwFlags & ~(DMO_OUTPUT_STREAMF_WHOLE_SAMPLES | + DMO_OUTPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER | + DMO_OUTPUT_STREAMF_FIXED_SAMPLE_SIZE | + DMO_OUTPUT_STREAMF_DISCARDABLE | + DMO_OUTPUT_STREAMF_OPTIONAL))); + if (!(dwFlags & DMO_OUTPUT_STREAMF_OPTIONAL)) { + return false; + } + } + } + m_fTypesSet = true; + return true; + } + + + IMediaObjectImpl() : + m_fTypesSet(false), + m_fFlushed(true), + m_fResourcesAllocated(false) + { + ZeroMemory(&m_InputInfo, sizeof(m_InputInfo)); + ZeroMemory(&m_OutputInfo, sizeof(m_OutputInfo)); + } + + virtual ~IMediaObjectImpl() { + DWORD dwCurrentType; + + for (dwCurrentType = 0; dwCurrentType < NUMBEROFINPUTS; dwCurrentType++) { + if(InputTypeSet(dwCurrentType)) { + MoFreeMediaType(&m_InputInfo[dwCurrentType].CurrentMediaType); + } + } + + for (dwCurrentType = 0; dwCurrentType < NUMBEROFOUTPUTS; dwCurrentType++) { + if(OutputTypeSet(dwCurrentType)) { + MoFreeMediaType(&m_OutputInfo[dwCurrentType].CurrentMediaType); + } + } + } + + + // IMediaObject methods + + + // + // IMediaObject methods + // + STDMETHODIMP GetStreamCount(unsigned long *pulNumberOfInputStreams, unsigned long *pulNumberOfOutputStreams) + { + LockIt lck(static_cast<_DERIVED_ *>(this)); + if (pulNumberOfInputStreams == NULL || + pulNumberOfOutputStreams == NULL) { + return E_POINTER; + } + *pulNumberOfInputStreams = NUMBEROFINPUTS; + *pulNumberOfOutputStreams = NUMBEROFOUTPUTS; + return S_OK; + } + STDMETHODIMP GetInputStreamInfo(ULONG ulStreamIndex, DWORD *pdwFlags) + { + LockIt lck(static_cast<_DERIVED_ *>(this)); + if (ulStreamIndex >= NUMBEROFINPUTS) { + return DMO_E_INVALIDSTREAMINDEX; + } + if (pdwFlags == NULL) { + return E_POINTER; + } + HRESULT hr = INTERNAL_CALL(_DERIVED_, GetInputStreamInfo)(ulStreamIndex, pdwFlags); + _ASSERTE(0 == (*pdwFlags & ~(DMO_INPUT_STREAMF_WHOLE_SAMPLES | + DMO_INPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER | + DMO_INPUT_STREAMF_FIXED_SAMPLE_SIZE | + DMO_INPUT_STREAMF_HOLDS_BUFFERS))); + return hr; + } + STDMETHODIMP GetOutputStreamInfo(ULONG ulStreamIndex, DWORD *pdwFlags) + { + LockIt lck(static_cast<_DERIVED_ *>(this)); + if (ulStreamIndex >= NUMBEROFOUTPUTS) { + return DMO_E_INVALIDSTREAMINDEX; + } + if (pdwFlags == NULL) { + return E_POINTER; + } + HRESULT hr = INTERNAL_CALL(_DERIVED_, GetOutputStreamInfo)(ulStreamIndex, pdwFlags); + _ASSERTE(0 == (*pdwFlags & ~(DMO_OUTPUT_STREAMF_WHOLE_SAMPLES | + DMO_OUTPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER | + DMO_OUTPUT_STREAMF_FIXED_SAMPLE_SIZE | + DMO_OUTPUT_STREAMF_DISCARDABLE | + DMO_OUTPUT_STREAMF_OPTIONAL))); + return hr; + } + STDMETHODIMP GetInputType(ULONG ulStreamIndex, ULONG ulTypeIndex, DMO_MEDIA_TYPE *pmt) { + if (ulStreamIndex >= NUMBEROFINPUTS) { + return DMO_E_INVALIDSTREAMINDEX; + } + LockIt lck(static_cast<_DERIVED_ *>(this)); + return INTERNAL_CALL(_DERIVED_, GetInputType)(ulStreamIndex, ulTypeIndex, pmt); + } + STDMETHODIMP GetOutputType(ULONG ulStreamIndex, ULONG ulTypeIndex, DMO_MEDIA_TYPE *pmt) { + if (ulStreamIndex >= NUMBEROFOUTPUTS) { + return DMO_E_INVALIDSTREAMINDEX; + } + LockIt lck(static_cast<_DERIVED_ *>(this)); + return INTERNAL_CALL(_DERIVED_, GetOutputType)(ulStreamIndex, ulTypeIndex, pmt); + } + STDMETHODIMP GetInputCurrentType(ULONG ulStreamIndex, DMO_MEDIA_TYPE *pmt) { + if (ulStreamIndex >= NUMBEROFINPUTS) { + return DMO_E_INVALIDSTREAMINDEX; + } + if (NULL == pmt) { + return E_POINTER; + } + LockIt lck(static_cast<_DERIVED_ *>(this)); + if (InputTypeSet(ulStreamIndex)) + return MoCopyMediaType(pmt, + &m_InputInfo[ulStreamIndex].CurrentMediaType); + else + return DMO_E_TYPE_NOT_SET; + } + STDMETHODIMP GetOutputCurrentType(ULONG ulStreamIndex, DMO_MEDIA_TYPE *pmt) { + if (ulStreamIndex >= NUMBEROFOUTPUTS) { + return DMO_E_INVALIDSTREAMINDEX; + } + if (NULL == pmt) { + return E_POINTER; + } + LockIt lck(static_cast<_DERIVED_ *>(this)); + if (OutputTypeSet(ulStreamIndex)) + return MoCopyMediaType(pmt, + &m_OutputInfo[ulStreamIndex].CurrentMediaType); + else + return DMO_E_TYPE_NOT_SET; + } + STDMETHODIMP GetInputSizeInfo(ULONG ulStreamIndex, ULONG *pulSize, ULONG *pcbMaxLookahead, ULONG *pulAlignment) { + if (ulStreamIndex >= NUMBEROFINPUTS) { + return DMO_E_INVALIDSTREAMINDEX; + } + if (NULL == pulSize || NULL == pulAlignment || + NULL == pcbMaxLookahead) { + return E_POINTER; + } + LockIt lck(static_cast<_DERIVED_ *>(this)); + if (!InputTypeSet(ulStreamIndex)) { + return DMO_E_TYPE_NOT_SET; + } + return INTERNAL_CALL(_DERIVED_, GetInputSizeInfo)(ulStreamIndex, pulSize, pcbMaxLookahead, pulAlignment); + } + STDMETHODIMP GetOutputSizeInfo(ULONG ulStreamIndex, ULONG *pulSize, ULONG *pulAlignment) { + if (ulStreamIndex >= NUMBEROFOUTPUTS) { + return DMO_E_INVALIDSTREAMINDEX; + } + if (NULL == pulSize || NULL == pulAlignment) { + return E_POINTER; + } + LockIt lck(static_cast<_DERIVED_ *>(this)); + if (!m_fTypesSet || !OutputTypeSet(ulStreamIndex)) { + return DMO_E_TYPE_NOT_SET; + } + return INTERNAL_CALL(_DERIVED_, GetOutputSizeInfo)(ulStreamIndex, pulSize, pulAlignment); + } + STDMETHODIMP SetInputType(ULONG ulStreamIndex, const DMO_MEDIA_TYPE *pmt, DWORD dwFlags) { + if (ulStreamIndex >= NUMBEROFINPUTS) { + return DMO_E_INVALIDSTREAMINDEX; + } + if (dwFlags & ~ (DMO_SET_TYPEF_CLEAR | DMO_SET_TYPEF_TEST_ONLY)) { + return E_INVALIDARG; + } + + LockIt lck(static_cast<_DERIVED_ *>(this)); + + if (dwFlags & DMO_SET_TYPEF_CLEAR) { + MoFreeMediaType(&m_InputInfo[ulStreamIndex].CurrentMediaType); + m_InputInfo[ulStreamIndex].fTypeSet = FALSE; + if (!CheckTypesSet()) { + Flush(); + FreeStreamingResources(); + } + return NOERROR; + } + if (NULL == pmt) { + return E_POINTER; + } + HRESULT hr = INTERNAL_CALL(_DERIVED_, CheckInputType)(ulStreamIndex, pmt); + if (FAILED(hr)) + return hr; + + if (dwFlags & DMO_SET_TYPEF_TEST_ONLY) { + return NOERROR; + } + + + // actually set the type + DMO_MEDIA_TYPE mtTemp; + if (S_OK == MoCopyMediaType(&mtTemp, pmt)) { + // Free any previous mediatype + if (InputTypeSet(ulStreamIndex)) { + MoFreeMediaType(&m_InputInfo[ulStreamIndex].CurrentMediaType); + } + m_InputInfo[ulStreamIndex].CurrentMediaType = mtTemp; + m_InputInfo[ulStreamIndex].fTypeSet = TRUE; + CheckTypesSet(); + } else { + return E_OUTOFMEMORY; + } + + return NOERROR; + } + + STDMETHODIMP SetOutputType(ULONG ulStreamIndex, const DMO_MEDIA_TYPE *pmt, DWORD dwFlags) { + if (ulStreamIndex >= NUMBEROFOUTPUTS) { + return DMO_E_INVALIDSTREAMINDEX; + } + if (dwFlags & ~ (DMO_SET_TYPEF_CLEAR | DMO_SET_TYPEF_TEST_ONLY)) { + return E_INVALIDARG; + } + + LockIt lck(static_cast<_DERIVED_ *>(this)); + + if (dwFlags & DMO_SET_TYPEF_CLEAR) { + MoFreeMediaType(&m_OutputInfo[ulStreamIndex].CurrentMediaType); + m_OutputInfo[ulStreamIndex].fTypeSet = FALSE; + if (!CheckTypesSet()) { + Flush(); + FreeStreamingResources(); + } + return NOERROR; + } + if (NULL == pmt) { + return E_POINTER; + } + HRESULT hr = INTERNAL_CALL(_DERIVED_, CheckOutputType)(ulStreamIndex, pmt); + if (FAILED(hr)) { + return hr; + } + + if (dwFlags & DMO_SET_TYPEF_TEST_ONLY) { + return NOERROR; + } + + + // actually set the type + DMO_MEDIA_TYPE mtTemp; + if (S_OK == MoCopyMediaType(&mtTemp, pmt)) { + // Free any previous mediatype + if (OutputTypeSet(ulStreamIndex)) { + MoFreeMediaType(&m_OutputInfo[ulStreamIndex].CurrentMediaType); + } + m_OutputInfo[ulStreamIndex].CurrentMediaType = mtTemp; + m_OutputInfo[ulStreamIndex].fTypeSet = TRUE; + CheckTypesSet(); + } else { + return E_OUTOFMEMORY; + } + + return NOERROR; + } + STDMETHODIMP GetInputStatus( + ULONG ulStreamIndex, + DWORD *pdwStatus + ) { + if (ulStreamIndex >= NUMBEROFINPUTS) { + return DMO_E_INVALIDSTREAMINDEX; + } + if (NULL == pdwStatus) { + return E_POINTER; + } + *pdwStatus = 0; + + LockIt lck(static_cast<_DERIVED_ *>(this)); + + if (!m_fTypesSet) { + return DMO_E_TYPE_NOT_SET; + } + + if (INTERNAL_CALL(_DERIVED_, AcceptingInput)(ulStreamIndex) == S_OK) { + *pdwStatus |= DMO_INPUT_STATUSF_ACCEPT_DATA; + } + return NOERROR; + } + STDMETHODIMP GetInputMaxLatency(unsigned long ulStreamIndex, REFERENCE_TIME *prtLatency) { + + if (prtLatency == NULL) { + return E_POINTER; + } + if (ulStreamIndex >= NUMBEROFINPUTS) { + return DMO_E_INVALIDSTREAMINDEX; + } + + LockIt lck(static_cast<_DERIVED_ *>(this)); + + return INTERNAL_CALL(_DERIVED_, GetInputMaxLatency)(ulStreamIndex, prtLatency); + } + STDMETHODIMP SetInputMaxLatency(unsigned long ulStreamIndex, REFERENCE_TIME rtLatency) { + if (ulStreamIndex >= NUMBEROFINPUTS) { + return DMO_E_INVALIDSTREAMINDEX; + } + + LockIt lck(static_cast<_DERIVED_ *>(this)); + + return INTERNAL_CALL(_DERIVED_, SetInputMaxLatency)(ulStreamIndex, rtLatency); + } + STDMETHODIMP Discontinuity(ULONG ulStreamIndex) { + if (ulStreamIndex >= NUMBEROFINPUTS) { + return DMO_E_INVALIDSTREAMINDEX; + } + + LockIt lck(static_cast<_DERIVED_ *>(this)); + + if (!m_fTypesSet) { + return DMO_E_TYPE_NOT_SET; + } + + if (S_OK != INTERNAL_CALL(_DERIVED_, AcceptingInput)(ulStreamIndex)) { + return DMO_E_NOTACCEPTING; + } + + return INTERNAL_CALL(_DERIVED_, Discontinuity)(ulStreamIndex); + } + + STDMETHODIMP Flush() + { + LockIt lck(static_cast<_DERIVED_ *>(this)); + + if (!m_fTypesSet) { + return S_OK; + } + if (m_fFlushed) { + return S_OK; + } + HRESULT hr = INTERNAL_CALL(_DERIVED_, Flush)(); + m_fFlushed = true; + return hr; + } + + STDMETHODIMP AllocateStreamingResources() { + LockIt lck(static_cast<_DERIVED_ *>(this)); + if (!m_fTypesSet) { + return DMO_E_TYPE_NOT_SET; + } + if (m_fResourcesAllocated) { + return S_OK; + } + HRESULT hr = INTERNAL_CALL(_DERIVED_, AllocateStreamingResources)(); + if (SUCCEEDED(hr)) { + m_fResourcesAllocated = true; + } + return hr; + } + STDMETHODIMP FreeStreamingResources() + { + LockIt lck(static_cast<_DERIVED_ *>(this)); + if (m_fResourcesAllocated) { + m_fResourcesAllocated = false; + INTERNAL_CALL(_DERIVED_, Flush)(); + return INTERNAL_CALL(_DERIVED_, FreeStreamingResources)(); + } + return S_OK; + } + + // + // Processing methods - public entry points + // + STDMETHODIMP ProcessInput( + DWORD ulStreamIndex, + IMediaBuffer *pBuffer, // [in], must not be NULL + DWORD dwFlags, // [in] - discontinuity, timestamp, etc. + REFERENCE_TIME rtTimestamp, // [in], valid if flag set + REFERENCE_TIME rtTimelength // [in], valid if flag set + ) { + if (!pBuffer) { + return E_POINTER; + } + if (ulStreamIndex >= NUMBEROFINPUTS) { + return DMO_E_INVALIDSTREAMINDEX; + } + if (dwFlags & ~(DMO_INPUT_DATA_BUFFERF_SYNCPOINT | + DMO_INPUT_DATA_BUFFERF_TIME | + DMO_INPUT_DATA_BUFFERF_TIMELENGTH)) { + return E_INVALIDARG; + } + + LockIt lck(static_cast<_DERIVED_ *>(this)); + + // Make sure all streams have media types set and resources are allocated + HRESULT hr = AllocateStreamingResources(); + if (FAILED(hr)) { + return hr; + } + if (INTERNAL_CALL(_DERIVED_, AcceptingInput)(ulStreamIndex) != S_OK) { + return DMO_E_NOTACCEPTING; + } + + m_fFlushed = false; + + return INTERNAL_CALL(_DERIVED_, ProcessInput)( + ulStreamIndex, + pBuffer, + dwFlags, + rtTimestamp, + rtTimelength); + } + + STDMETHODIMP ProcessOutput( + DWORD dwFlags, + DWORD ulOutputBufferCount, + DMO_OUTPUT_DATA_BUFFER *pOutputBuffers, + DWORD *pdwStatus) + { + if (pdwStatus == NULL) { + return E_POINTER; + } + + + if (ulOutputBufferCount != NUMBEROFOUTPUTS || (dwFlags & ~DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER)) { + return E_INVALIDARG; + } + + if (NUMBEROFOUTPUTS != 0 && pOutputBuffers == NULL) { + return E_POINTER; + } + + *pdwStatus = 0; + + LockIt lck(static_cast<_DERIVED_ *>(this)); + + HRESULT hr = AllocateStreamingResources(); + if (FAILED(hr)) { + return hr; + } + + for (DWORD dw = 0; dw < NUMBEROFOUTPUTS; dw++) { + pOutputBuffers[dw].dwStatus = 0; + } + + hr = INTERNAL_CALL(_DERIVED_, ProcessOutput)( + dwFlags, + ulOutputBufferCount, + pOutputBuffers, + pdwStatus); + + // remember the DMO's incomplete status + for (dw = 0; dw < NUMBEROFOUTPUTS; dw++) { + if (pOutputBuffers[dw].dwStatus & DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE) { + m_OutputInfo[dw].fIncomplete = TRUE; + } else { + m_OutputInfo[dw].fIncomplete = FALSE; + } + } + + return hr; + } + + STDMETHODIMP DMOLock(LONG lLock) + { + if (lLock) { + static_cast<_DERIVED_ *>(this)->Lock(); + } else { + static_cast<_DERIVED_ *>(this)->Unlock(); + } + return S_OK; + } +}; + +#endif // _dmoimpl_h_ + diff --git a/windows_libs/mssdk/include/dmoreg.h b/windows_libs/mssdk/include/dmoreg.h new file mode 100644 index 00000000..7a872078 --- /dev/null +++ b/windows_libs/mssdk/include/dmoreg.h @@ -0,0 +1,110 @@ +//------------------------------------------------------------------------------ +// File: DMOReg.h +// +// Desc: +// +// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __DMOREG_H__ +#define __DMOREG_H__ + +#include "mediaobj.h" + + +// 57f2db8b-e6bb-4513-9d43-dcd2a6593125 +DEFINE_GUID(DMOCATEGORY_AUDIO_DECODER, 0x57f2db8b,0xe6bb,0x4513,0x9d,0x43,0xdc,0xd2,0xa6,0x59,0x31,0x25); +// 33D9A761-90C8-11d0-BD43-00A0C911CE86 +DEFINE_GUID(DMOCATEGORY_AUDIO_ENCODER, 0x33D9A761,0x90C8,0x11d0,0xBD,0x43,0x00,0xA0,0xC9,0x11,0xCE,0x86); +// 4a69b442-28be-4991-969c-b500adf5d8a8 +DEFINE_GUID(DMOCATEGORY_VIDEO_DECODER, 0x4a69b442,0x28be,0x4991,0x96,0x9c,0xb5,0x00,0xad,0xf5,0xd8,0xa8); +// 33D9A760-90C8-11d0-BD43-00A0C911CE86 +DEFINE_GUID(DMOCATEGORY_VIDEO_ENCODER, 0x33D9A760,0x90C8,0x11d0,0xBD,0x43,0x00,0xA0,0xC9,0x11,0xCE,0x86); +// f3602b3f-0592-48df-a4cd-674721e7ebeb +DEFINE_GUID(DMOCATEGORY_AUDIO_EFFECT, 0xf3602b3f,0x0592,0x48df,0xa4,0xcd,0x67,0x47,0x21,0xe7,0xeb,0xeb); +// d990ee14-776c-4723-be46-3da2f56f10b9 +DEFINE_GUID(DMOCATEGORY_VIDEO_EFFECT, 0xd990ee14,0x776c,0x4723,0xbe,0x46,0x3d,0xa2,0xf5,0x6f,0x10,0xb9); +// f665aaba-3e09-4920-aa5f-219811148f09 +DEFINE_GUID(DMOCATEGORY_AUDIO_CAPTURE_EFFECT, 0xf665aaba,0x3e09,0x4920,0xaa,0x5f,0x21,0x98,0x11,0x14,0x8f,0x09); + +// Acoustic Echo Canceller {BF963D80-C559-11D0-8A2B-00A0C9255AC1} +// Matches KSNODETYPE_ACOUSTIC_ECHO_CANCEL in ksmedia.h +DEFINE_GUID(DMOCATEGORY_ACOUSTIC_ECHO_CANCEL, 0xBF963D80L, 0xC559, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1); + +// Noise Supression {E07F903F-62FD-4e60-8CDD-DEA7236665B5} +// Matches KSNODETYPE_AUDIO_NOISE_SUPPRESS in post Windows ME DDK's ksmedia.h +DEFINE_GUID(DMOCATEGORY_AUDIO_NOISE_SUPPRESS, 0xe07f903f, 0x62fd, 0x4e60, 0x8c, 0xdd, 0xde, 0xa7, 0x23, 0x66, 0x65, 0xb5); + +// Automatic Gain Control {E88C9BA0-C557-11D0-8A2B-00A0C9255AC1} +// Matches KSNODETYPE_AGC in ksmedia.h +DEFINE_GUID(DMOCATEGORY_AGC, 0xE88C9BA0L, 0xC557, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1); + +typedef struct _DMO_PARTIAL_MEDIATYPE { + GUID type; + GUID subtype; +} DMO_PARTIAL_MEDIATYPE, *PDMO_PARTIAL_MEDIATYPE; + +enum DMO_REGISTER_FLAGS { + DMO_REGISTERF_IS_KEYED = 0x00000001 +}; + +enum DMO_ENUM_FLAGS { + DMO_ENUMF_INCLUDE_KEYED = 0x00000001 +}; + +STDAPI DMORegister( + LPCWSTR szName, + REFCLSID clsidDMO, + REFGUID guidCategory, + DWORD dwFlags, // DMO_REGISTERF_XXX + // + // Register all mediatypes supported by the object. This carries no + // information about which combinations of input/output types would + // actually work. + // + DWORD cInTypes, + const DMO_PARTIAL_MEDIATYPE *pInTypes, + DWORD cOutTypes, + const DMO_PARTIAL_MEDIATYPE *pOutTypes +); + +STDAPI DMOUnregister( + REFCLSID clsidDMO, + REFGUID guidCategory // optional - GUID_NULL means unregister from all +); + +STDAPI DMOEnum( + REFGUID guidCategory, // GUID_NULL for "all" + DWORD dwFlags, // DMO_ENUMF_XXX + // + // Enumerate only objects that support at least one of the specified input types + // and at least one of the specified output types. If no input types are specified, + // enumerate objects regardless of what input types they support. Same for + // output types. + // + DWORD cInTypes, + const DMO_PARTIAL_MEDIATYPE *pInTypes, // can be NULL only of ulInTypes = 0 + DWORD cOutTypes, + const DMO_PARTIAL_MEDIATYPE *pOutTypes, // can be NULL only of ulOutTypes = 0 + // + // Output parameter - this receives a pointer to the DMO CLSID enumerator + // + IEnumDMO **ppEnum +); + +STDAPI DMOGetTypes( + REFCLSID clsidDMO, + unsigned long ulInputTypesRequested, + unsigned long *pulInputTypesSupplied, + DMO_PARTIAL_MEDIATYPE *pInputTypes, + unsigned long ulOutputTypesRequested, + unsigned long *pulOutputTypesSupplied, + DMO_PARTIAL_MEDIATYPE *pOutputTypes +); + +STDAPI DMOGetName( + REFCLSID clsidDMO, + WCHAR szName[80] +); +#endif //__DMOREG_H__ diff --git a/windows_libs/mssdk/include/dmort.h b/windows_libs/mssdk/include/dmort.h new file mode 100644 index 00000000..a4e1f55f --- /dev/null +++ b/windows_libs/mssdk/include/dmort.h @@ -0,0 +1,75 @@ +//------------------------------------------------------------------------------ +// File: DMORt.h +// +// Desc: Miscellaneous runtime support for DirectShow Media Objects +// +// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __DMORT_H__ +#define __DMORT_H__ + +// +// Mediatype helpers. MoInitMediaType() goes with MoFreeMediaType(), +// MoCreateMediaType() goes with MoDeleteMediaType() - don't mix ! +// + + + +// +// Takes a pointer to an already allocated DMO_MEDIA_TYPE structure, allocates +// a format block of cbFormat bytes, and sets appropriate members of +// DMO_MEDIA_TYPE to point to the newly allocated format block. Also +// initializes the IUnknown pointer inside DMO_MEDIA_TYPE to NULL. +// +// The format block allocated by MoInitMediaType must be freed by calling +// MoFreeMediaType(). +// +STDAPI MoInitMediaType(DMO_MEDIA_TYPE *pmt, DWORD cbFormat); + +// +// Frees the format block and releases any IUnknown, but does not free the +// DMO_MEDIA_TYPE structure itself. Input parameter must point to an +// DMO_MEDIA_TYPE structure previously initialized by MoInitMediaType(). +// +STDAPI MoFreeMediaType(DMO_MEDIA_TYPE *pmt); + +// +// Copies the DMO_MEDIA_TYPE members. Also duplicates the format block and +// the IUnknown pointer. Both parameters must point to valid DMO_MEDIA_TYPE +// structures. Target structure must be later freed using MoFreeMediaType(). +// +STDAPI MoCopyMediaType(DMO_MEDIA_TYPE *pmtDest, const DMO_MEDIA_TYPE *pmtSrc); + + + +// +// Allocates a new DMO_MEDIA_TYPE structure and initializes it just like +// MoInitMediaType. I.e., this function allocates both the format block +// and the DMO_MEDIA_TYPE structure itself. Pointer to DMO_MEDIA_TYPE is +// returned as *ppmt. +// +// DMO_MEDIA_TYPE structures allocated by MoCreateMediaType() must be freed +// by calling MoDeleteMediaType(). +// +STDAPI MoCreateMediaType(DMO_MEDIA_TYPE **ppmt, DWORD cbFormat); + +// +// Frees any format block, releases any IUnknown, and deletes the +// DMO_MEDIA_TYPE structure itself. The input parameter must point to an +// DMO_MEDIA_TYPE structure previously allocated by MoCreateMediaType(). +// +STDAPI MoDeleteMediaType(DMO_MEDIA_TYPE *pmt); + +// +// Allocates a new DMO_MEDIA_TYPE structure and copies pmtSrc into it like +// MoCopyMediaType. I.e., this function allocates a new DMO_MEDIA_TYPE struct +// as well as a new format block for the target mediatype. Trager mediatype +// must later be freed using MoDeleteMediaType(). +// +STDAPI MoDuplicateMediaType(DMO_MEDIA_TYPE **ppmtDest, const DMO_MEDIA_TYPE *pmtSrc); + + + +#endif //__DMORT_H__ diff --git a/windows_libs/mssdk/include/dmplugin.h b/windows_libs/mssdk/include/dmplugin.h new file mode 100644 index 00000000..821ef7d6 --- /dev/null +++ b/windows_libs/mssdk/include/dmplugin.h @@ -0,0 +1,281 @@ +/************************************************************************ +* * +* dmplugin.h -- This module contains the API for plugins for the * +* DirectMusic performance layer * +* * +* Copyright (c) 1998-1999 Microsoft Corporation * +* * +************************************************************************/ + +#ifndef _DMPLUGIN_ +#define _DMPLUGIN_ + +#include + +#define COM_NO_WINDOWS_H +#include + +#include +#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +interface IDirectMusicTrack; +interface IDirectMusicTool; +interface IDirectMusicTool8; +interface IDirectMusicTrack8; +interface IDirectMusicPerformance; +interface IDirectMusicPerformance8; +interface IDirectMusicSegment; +interface IDirectMusicSegment8; +interface IDirectMusicSegmentState; +interface IDirectMusicSegmentState8; +interface IDirectMusicGraph; +#ifndef __cplusplus +typedef interface IDirectMusicTrack IDirectMusicTrack; +typedef interface IDirectMusicTool IDirectMusicTool; +typedef interface IDirectMusicTool8 IDirectMusicTool8; +typedef interface IDirectMusicTrack8 IDirectMusicTrack8; +typedef interface IDirectMusicPerformance IDirectMusicPerformance; +typedef interface IDirectMusicPerformance8 IDirectMusicPerformance8; +typedef interface IDirectMusicSegment IDirectMusicSegment; +typedef interface IDirectMusicSegment8 IDirectMusicSegment8; +typedef interface IDirectMusicSegmentState IDirectMusicSegmentState; +typedef interface IDirectMusicSegmentState8 IDirectMusicSegmentState8; +typedef interface IDirectMusicGraph IDirectMusicGraph; +#endif + +typedef struct _DMUS_PMSG DMUS_PMSG; +typedef long MUSIC_TIME; + +/* Registry location for tools */ +#define DMUS_REGSTR_PATH_TOOLS "Software\\Microsoft\\DirectMusic\\Tools" + +/*//////////////////////////////////////////////////////////////////// +// IDirectMusicTool */ +#undef INTERFACE +#define INTERFACE IDirectMusicTool +DECLARE_INTERFACE_(IDirectMusicTool, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicTool */ + STDMETHOD(Init) (THIS_ IDirectMusicGraph* pGraph) PURE; + STDMETHOD(GetMsgDeliveryType) (THIS_ DWORD* pdwDeliveryType ) PURE; + STDMETHOD(GetMediaTypeArraySize)(THIS_ DWORD* pdwNumElements ) PURE; + STDMETHOD(GetMediaTypes) (THIS_ DWORD** padwMediaTypes, + DWORD dwNumElements) PURE; + STDMETHOD(ProcessPMsg) (THIS_ IDirectMusicPerformance* pPerf, + DMUS_PMSG* pPMSG) PURE; + STDMETHOD(Flush) (THIS_ IDirectMusicPerformance* pPerf, + DMUS_PMSG* pPMSG, + REFERENCE_TIME rtTime) PURE; +}; + +/*//////////////////////////////////////////////////////////////////// +// IDirectMusicTool8 */ +#undef INTERFACE +#define INTERFACE IDirectMusicTool8 +DECLARE_INTERFACE_(IDirectMusicTool8, IDirectMusicTool) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicTool */ + STDMETHOD(Init) (THIS_ IDirectMusicGraph* pGraph) PURE; + STDMETHOD(GetMsgDeliveryType) (THIS_ DWORD* pdwDeliveryType ) PURE; + STDMETHOD(GetMediaTypeArraySize)(THIS_ DWORD* pdwNumElements ) PURE; + STDMETHOD(GetMediaTypes) (THIS_ DWORD** padwMediaTypes, + DWORD dwNumElements) PURE; + STDMETHOD(ProcessPMsg) (THIS_ IDirectMusicPerformance* pPerf, + DMUS_PMSG* pPMSG) PURE; + STDMETHOD(Flush) (THIS_ IDirectMusicPerformance* pPerf, + DMUS_PMSG* pPMSG, + REFERENCE_TIME rtTime) PURE; + /* IDirectMusicTool8 */ + STDMETHOD(Clone) (THIS_ IDirectMusicTool ** ppTool) PURE; +}; + + +/* The following flags are sent in the IDirectMusicTrack::Play() method */ +/* inside the dwFlags parameter */ +typedef enum enumDMUS_TRACKF_FLAGS +{ + DMUS_TRACKF_SEEK = 1, /* set on a seek */ + DMUS_TRACKF_LOOP = 2, /* set on a loop (repeat) */ + DMUS_TRACKF_START = 4, /* set on first call to Play */ + DMUS_TRACKF_FLUSH = 8, /* set when this call is in response to a flush on the perfomance */ + DMUS_TRACKF_DIRTY = 0x10, /* set when the track should consider any cached values from a previous call to GetParam to be invalidated */ + /* The following flags are DX8 only. */ + DMUS_TRACKF_NOTIFY_OFF = 0x20, /* tells track not to send notifications. */ + DMUS_TRACKF_PLAY_OFF = 0x40, /* tells track not to play anything (but can still send notifications.) */ + DMUS_TRACKF_LOOPEND = 0x80, /* set when the end of range is also a loop end. */ + DMUS_TRACKF_STOP = 0x100, /* set when the end of range is also end of playing this segment. */ + DMUS_TRACKF_RECOMPOSE = 0x200, /* set to indicate the track should compose. */ + DMUS_TRACKF_CLOCK = 0x400, /* set when time parameters are in reference (clock) time. Only valid for PlayEx(). */ +} DMUS_TRACKF_FLAGS; + +/* The following flags are sent in the IDirectMusicTrack8::GetParamEx() and SetParamEx() methods */ +/* inside the dwFlags parameter */ +#define DMUS_TRACK_PARAMF_CLOCK 0x01 /* set when the time is measured is in reference (clock) time */ + +/*//////////////////////////////////////////////////////////////////// +// IDirectMusicTrack */ +#undef INTERFACE +#define INTERFACE IDirectMusicTrack +DECLARE_INTERFACE_(IDirectMusicTrack, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicTrack */ + STDMETHOD(Init) (THIS_ IDirectMusicSegment* pSegment) PURE; + STDMETHOD(InitPlay) (THIS_ IDirectMusicSegmentState* pSegmentState, + IDirectMusicPerformance* pPerformance, + void** ppStateData, + DWORD dwVirtualTrackID, + DWORD dwFlags) PURE; + STDMETHOD(EndPlay) (THIS_ void* pStateData) PURE; + STDMETHOD(Play) (THIS_ void* pStateData, + MUSIC_TIME mtStart, + MUSIC_TIME mtEnd, + MUSIC_TIME mtOffset, + DWORD dwFlags, + IDirectMusicPerformance* pPerf, + IDirectMusicSegmentState* pSegSt, + DWORD dwVirtualID) PURE; + STDMETHOD(GetParam) (THIS_ REFGUID rguidType, + MUSIC_TIME mtTime, + MUSIC_TIME* pmtNext, + void* pParam) PURE; + STDMETHOD(SetParam) (THIS_ REFGUID rguidType, + MUSIC_TIME mtTime, + void* pParam) PURE; + STDMETHOD(IsParamSupported) (THIS_ REFGUID rguidType) PURE; + STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(RemoveNotificationType) (THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(Clone) (THIS_ MUSIC_TIME mtStart, + MUSIC_TIME mtEnd, + IDirectMusicTrack** ppTrack) PURE; +}; + +/*//////////////////////////////////////////////////////////////////// +// IDirectMusicTrack8 */ +#undef INTERFACE +#define INTERFACE IDirectMusicTrack8 +DECLARE_INTERFACE_(IDirectMusicTrack8, IDirectMusicTrack) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicTrack */ + STDMETHOD(Init) (THIS_ IDirectMusicSegment* pSegment) PURE; + STDMETHOD(InitPlay) (THIS_ IDirectMusicSegmentState* pSegmentState, + IDirectMusicPerformance* pPerformance, + void** ppStateData, + DWORD dwVirtualTrackID, + DWORD dwFlags) PURE; + STDMETHOD(EndPlay) (THIS_ void* pStateData) PURE; + STDMETHOD(Play) (THIS_ void* pStateData, + MUSIC_TIME mtStart, + MUSIC_TIME mtEnd, + MUSIC_TIME mtOffset, + DWORD dwFlags, + IDirectMusicPerformance* pPerf, + IDirectMusicSegmentState* pSegSt, + DWORD dwVirtualID) PURE; + STDMETHOD(GetParam) (THIS_ REFGUID rguidType, + MUSIC_TIME mtTime, + MUSIC_TIME* pmtNext, + void* pParam) PURE; + STDMETHOD(SetParam) (THIS_ REFGUID rguidType, + MUSIC_TIME mtTime, + void* pParam) PURE; + STDMETHOD(IsParamSupported) (THIS_ REFGUID rguidType) PURE; + STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(RemoveNotificationType) (THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(Clone) (THIS_ MUSIC_TIME mtStart, + MUSIC_TIME mtEnd, + IDirectMusicTrack** ppTrack) PURE; + /* IDirectMusicTrack8 */ + STDMETHOD(PlayEx) (THIS_ void* pStateData, + REFERENCE_TIME rtStart, + REFERENCE_TIME rtEnd, + REFERENCE_TIME rtOffset, + DWORD dwFlags, + IDirectMusicPerformance* pPerf, + IDirectMusicSegmentState* pSegSt, + DWORD dwVirtualID) PURE; + STDMETHOD(GetParamEx) (THIS_ REFGUID rguidType, /* Command type. */ + REFERENCE_TIME rtTime, /* Time, in ref time if dwFlags == DMUS_TRACK_PARAMF_CLOCK. Otherwise, music time. */ + REFERENCE_TIME* prtNext, /* Time of next parameter, relative to rtTime, in music or clock time units. */ + void* pParam, /* Pointer to the parameter data. */ + void * pStateData, /* State data for track instance. */ + DWORD dwFlags) PURE; /* Control flags. */ + STDMETHOD(SetParamEx) (THIS_ REFGUID rguidType, + REFERENCE_TIME rtTime, + void* pParam, /* Pointer to the parameter data. */ + void * pStateData, /* State data for track instance. */ + DWORD dwFlags) PURE; /* Control flags. */ + STDMETHOD(Compose) (THIS_ IUnknown* pContext, /* Context for composition (song or segment) */ + DWORD dwTrackGroup, + IDirectMusicTrack** ppResultTrack) PURE; + STDMETHOD(Join) (THIS_ IDirectMusicTrack* pNewTrack, + MUSIC_TIME mtJoin, + IUnknown* pContext, /* Context for joining (song or segment) */ + DWORD dwTrackGroup, + IDirectMusicTrack** ppResultTrack) PURE; +}; + +/* CLSID's */ +DEFINE_GUID(CLSID_DirectMusicTempoTrack,0xd2ac2885, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicSeqTrack,0xd2ac2886, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicSysExTrack,0xd2ac2887, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicTimeSigTrack,0xd2ac2888, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicChordTrack,0xd2ac288b, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicCommandTrack,0xd2ac288c, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicStyleTrack,0xd2ac288d, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicMotifTrack,0xd2ac288e, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicSignPostTrack,0xf17e8672, 0xc3b4, 0x11d1, 0x87, 0xb, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicBandTrack,0xd2ac2894, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicChordMapTrack,0xd2ac2896, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicMuteTrack,0xd2ac2898, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* New CLSID's for DX8 */ +DEFINE_GUID(CLSID_DirectMusicScriptTrack,0x4108fa85, 0x3586, 0x11d3, 0x8b, 0xd7, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6); /* {4108FA85-3586-11d3-8BD7-00600893B1B6} */ +DEFINE_GUID(CLSID_DirectMusicMarkerTrack,0x55a8fd00, 0x4288, 0x11d3, 0x9b, 0xd1, 0x8a, 0xd, 0x61, 0xc8, 0x88, 0x35); +DEFINE_GUID(CLSID_DirectMusicSegmentTriggerTrack, 0xbae4d665, 0x4ea1, 0x11d3, 0x8b, 0xda, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6); /* {BAE4D665-4EA1-11d3-8BDA-00600893B1B6} */ +DEFINE_GUID(CLSID_DirectMusicLyricsTrack, 0x995c1cf5, 0x54ff, 0x11d3, 0x8b, 0xda, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6); /* {995C1CF5-54FF-11d3-8BDA-00600893B1B6} */ +DEFINE_GUID(CLSID_DirectMusicParamControlTrack, 0x4be0537b, 0x5c19, 0x11d3, 0x8b, 0xdc, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6); /* {4BE0537B-5C19-11d3-8BDC-00600893B1B6} */ +DEFINE_GUID(CLSID_DirectMusicMelodyFormulationTrack, 0xb0684266, 0xb57f, 0x11d2, 0x97, 0xf9, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58); +DEFINE_GUID(CLSID_DirectMusicWaveTrack,0xeed36461, 0x9ea5, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74); + +/* IID's */ +DEFINE_GUID(IID_IDirectMusicTrack, 0xf96029a1, 0x4282, 0x11d2, 0x87, 0x17, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(IID_IDirectMusicTool,0xd2ac28ba, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Interface IDs for DX8 */ +/* changed interfaces (GUID only) */ +DEFINE_GUID(IID_IDirectMusicTool8, 0xe674303, 0x3b05, 0x11d3, 0x9b, 0xd1, 0xf9, 0xe7, 0xf0, 0xa0, 0x15, 0x36); +DEFINE_GUID(IID_IDirectMusicTrack8, 0xe674304, 0x3b05, 0x11d3, 0x9b, 0xd1, 0xf9, 0xe7, 0xf0, 0xa0, 0x15, 0x36); + +#ifdef __cplusplus +}; /* extern "C" */ +#endif + +#include + +#endif /* #ifndef _DMPLUGIN_ */ diff --git a/windows_libs/mssdk/include/dmusbuff.h b/windows_libs/mssdk/include/dmusbuff.h new file mode 100644 index 00000000..54884538 --- /dev/null +++ b/windows_libs/mssdk/include/dmusbuff.h @@ -0,0 +1,41 @@ +/*************************************************************************** +* * +* DMusBuff.h -- This module defines the buffer format for DirectMusic * +* Shared file between user mode and kernel mode components * +* * +* Copyright (c) 1998, Microsoft Corp. All rights reserved. * +* * +***************************************************************************/ + +#ifndef _DMusBuff_ +#define _DMusBuff_ + +/* Format of DirectMusic events in a buffer + * + * A buffer contains 1 or more events, each with the following header. + * Immediately following the header is the event data. The header+data + * size is rounded to the nearest quadword (8 bytes). + */ + +#include /* Do not pad at end - that's where the data is */ +typedef struct _DMUS_EVENTHEADER *LPDMUS_EVENTHEADER; +typedef struct _DMUS_EVENTHEADER +{ + DWORD cbEvent; /* Unrounded bytes in event */ + DWORD dwChannelGroup; /* Channel group of event */ + REFERENCE_TIME rtDelta; /* Delta from start time of entire buffer */ + DWORD dwFlags; /* Flags DMUS_EVENT_xxx */ +} DMUS_EVENTHEADER; +#include + +#define DMUS_EVENT_STRUCTURED 0x00000001 /* Unstructured data (SysEx, etc.) */ + +/* The number of bytes to allocate for an event with 'cb' data bytes. + */ +#define QWORD_ALIGN(x) (((x) + 7) & ~7) +#define DMUS_EVENT_SIZE(cb) QWORD_ALIGN(sizeof(DMUS_EVENTHEADER) + cb) + + +#endif /* _DMusBuff_ */ + + diff --git a/windows_libs/mssdk/include/dmusicc.h b/windows_libs/mssdk/include/dmusicc.h new file mode 100644 index 00000000..9e6dc072 --- /dev/null +++ b/windows_libs/mssdk/include/dmusicc.h @@ -0,0 +1,783 @@ +/************************************************************************ +* * +* dmusicc.h -- This module defines the DirectMusic core API's * +* * +* Copyright (c) 1998-1999 Microsoft Corporation +* * +************************************************************************/ + +#ifndef _DMUSICC_ +#define _DMUSICC_ + +#include + +#define COM_NO_WINDOWS_H +#include + +#include + +#include "dls1.h" +#include "dmerror.h" +#include "dmdls.h" +#include "dsound.h" +#include "dmusbuff.h" + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef ULONGLONG SAMPLE_TIME; +typedef ULONGLONG SAMPLE_POSITION; +typedef SAMPLE_TIME *LPSAMPLE_TIME; + +#define DMUS_MAX_DESCRIPTION 128 +#define DMUS_MAX_DRIVER 128 + +typedef struct _DMUS_BUFFERDESC *LPDMUS_BUFFERDESC; +typedef struct _DMUS_BUFFERDESC +{ + DWORD dwSize; + DWORD dwFlags; + GUID guidBufferFormat; + DWORD cbBuffer; +} DMUS_BUFFERDESC; + +/* DMUS_EFFECT_ flags are used in the dwEffectFlags fields of both DMUS_PORTCAPS + * and DMUS_PORTPARAMS. + */ +#define DMUS_EFFECT_NONE 0x00000000 +#define DMUS_EFFECT_REVERB 0x00000001 +#define DMUS_EFFECT_CHORUS 0x00000002 + +/* For DMUS_PORTCAPS dwClass + */ +#define DMUS_PC_INPUTCLASS (0) +#define DMUS_PC_OUTPUTCLASS (1) + +/* For DMUS_PORTCAPS dwFlags + */ +#define DMUS_PC_DLS (0x00000001) // Supports DLS downloading and DLS level 1. +#define DMUS_PC_EXTERNAL (0x00000002) // External MIDI module. +#define DMUS_PC_SOFTWARESYNTH (0x00000004) // Software synthesizer. +#define DMUS_PC_MEMORYSIZEFIXED (0x00000008) // Memory size is fixed. +#define DMUS_PC_GMINHARDWARE (0x00000010) // GM sound set is built in, no need to download. +#define DMUS_PC_GSINHARDWARE (0x00000020) // GS sound set is built in. +#define DMUS_PC_XGINHARDWARE (0x00000040) // XG sound set is built in. +#define DMUS_PC_DIRECTSOUND (0x00000080) // Connects to DirectSound via a DSound buffer. +#define DMUS_PC_SHAREABLE (0x00000100) // Synth can be actively shared by multiple apps at once. +#define DMUS_PC_DLS2 (0x00000200) // Supports DLS2 instruments. +#define DMUS_PC_AUDIOPATH (0x00000400) // Multiple outputs can be connected to DirectSound for audiopaths. +#define DMUS_PC_WAVE (0x00000800) // Supports streaming and one shot waves. + +#define DMUS_PC_SYSTEMMEMORY (0x7FFFFFFF) // Sample memory is system memory. + + +typedef struct _DMUS_PORTCAPS +{ + DWORD dwSize; + DWORD dwFlags; + GUID guidPort; + DWORD dwClass; + DWORD dwType; + DWORD dwMemorySize; + DWORD dwMaxChannelGroups; + DWORD dwMaxVoices; + DWORD dwMaxAudioChannels; + DWORD dwEffectFlags; + WCHAR wszDescription[DMUS_MAX_DESCRIPTION]; +} DMUS_PORTCAPS; + +typedef DMUS_PORTCAPS *LPDMUS_PORTCAPS; + +/* Values for DMUS_PORTCAPS dwType. This field indicates the underlying + * driver type of the port. + */ +#define DMUS_PORT_WINMM_DRIVER (0) +#define DMUS_PORT_USER_MODE_SYNTH (1) +#define DMUS_PORT_KERNEL_MODE (2) + +/* These flags (set in dwValidParams) indicate which other members of the */ +/* DMUS_PORTPARAMS are valid. */ +/* */ +#define DMUS_PORTPARAMS_VOICES 0x00000001 +#define DMUS_PORTPARAMS_CHANNELGROUPS 0x00000002 +#define DMUS_PORTPARAMS_AUDIOCHANNELS 0x00000004 +#define DMUS_PORTPARAMS_SAMPLERATE 0x00000008 +#define DMUS_PORTPARAMS_EFFECTS 0x00000020 +#define DMUS_PORTPARAMS_SHARE 0x00000040 +#define DMUS_PORTPARAMS_FEATURES 0x00000080 /* DirectX 8.0 and above */ + +typedef struct _DMUS_PORTPARAMS +{ + DWORD dwSize; + DWORD dwValidParams; + DWORD dwVoices; + DWORD dwChannelGroups; + DWORD dwAudioChannels; + DWORD dwSampleRate; + DWORD dwEffectFlags; + BOOL fShare; +} DMUS_PORTPARAMS7; + +typedef struct _DMUS_PORTPARAMS8 +{ + DWORD dwSize; + DWORD dwValidParams; + DWORD dwVoices; + DWORD dwChannelGroups; + DWORD dwAudioChannels; + DWORD dwSampleRate; + DWORD dwEffectFlags; + BOOL fShare; + DWORD dwFeatures; +} DMUS_PORTPARAMS8; + +#define DMUS_PORT_FEATURE_AUDIOPATH 0x00000001 /* Supports audiopath connection to DSound buffers. */ +#define DMUS_PORT_FEATURE_STREAMING 0x00000002 /* Supports streaming waves through the synth. */ + + +typedef DMUS_PORTPARAMS8 DMUS_PORTPARAMS; +typedef DMUS_PORTPARAMS *LPDMUS_PORTPARAMS; + +typedef struct _DMUS_SYNTHSTATS *LPDMUS_SYNTHSTATS; +typedef struct _DMUS_SYNTHSTATS8 *LPDMUS_SYNTHSTATS8; +typedef struct _DMUS_SYNTHSTATS +{ + DWORD dwSize; /* Size in bytes of the structure */ + DWORD dwValidStats; /* Flags indicating which fields below are valid. */ + DWORD dwVoices; /* Average number of voices playing. */ + DWORD dwTotalCPU; /* Total CPU usage as percent * 100. */ + DWORD dwCPUPerVoice; /* CPU per voice as percent * 100. */ + DWORD dwLostNotes; /* Number of notes lost in 1 second. */ + DWORD dwFreeMemory; /* Free memory in bytes */ + long lPeakVolume; /* Decibel level * 100. */ +} DMUS_SYNTHSTATS; + +typedef struct _DMUS_SYNTHSTATS8 +{ + DWORD dwSize; /* Size in bytes of the structure */ + DWORD dwValidStats; /* Flags indicating which fields below are valid. */ + DWORD dwVoices; /* Average number of voices playing. */ + DWORD dwTotalCPU; /* Total CPU usage as percent * 100. */ + DWORD dwCPUPerVoice; /* CPU per voice as percent * 100. */ + DWORD dwLostNotes; /* Number of notes lost in 1 second. */ + DWORD dwFreeMemory; /* Free memory in bytes */ + long lPeakVolume; /* Decibel level * 100. */ + DWORD dwSynthMemUse; /* Memory used by synth wave data */ +} DMUS_SYNTHSTATS8; + +#define DMUS_SYNTHSTATS_VOICES (1 << 0) +#define DMUS_SYNTHSTATS_TOTAL_CPU (1 << 1) +#define DMUS_SYNTHSTATS_CPU_PER_VOICE (1 << 2) +#define DMUS_SYNTHSTATS_LOST_NOTES (1 << 3) +#define DMUS_SYNTHSTATS_PEAK_VOLUME (1 << 4) +#define DMUS_SYNTHSTATS_FREE_MEMORY (1 << 5) + +#define DMUS_SYNTHSTATS_SYSTEMMEMORY DMUS_PC_SYSTEMMEMORY + +typedef struct _DMUS_WAVES_REVERB_PARAMS +{ + float fInGain; /* Input gain in dB (to avoid output overflows) */ + float fReverbMix; /* Reverb mix in dB. 0dB means 100% wet reverb (no direct signal) + Negative values gives less wet signal. + The coeficients are calculated so that the overall output level stays + (approximately) constant regardless of the ammount of reverb mix. */ + float fReverbTime; /* The reverb decay time, in milliseconds. */ + float fHighFreqRTRatio; /* The ratio of the high frequencies to the global reverb time. + Unless very 'splashy-bright' reverbs are wanted, this should be set to + a value < 1.0. + For example if dRevTime==1000ms and dHighFreqRTRatio=0.1 than the + decay time for high frequencies will be 100ms.*/ + +} DMUS_WAVES_REVERB_PARAMS; + +/* Note: Default values for Reverb are: + fInGain = 0.0dB (no change in level) + fReverbMix = -10.0dB (a reasonable reverb mix) + fReverbTime = 1000.0ms (one second global reverb time) + fHighFreqRTRatio = 0.001 (the ratio of the high frequencies to the global reverb time) +*/ + +typedef enum +{ + DMUS_CLOCK_SYSTEM = 0, + DMUS_CLOCK_WAVE = 1 +} DMUS_CLOCKTYPE; + +#define DMUS_CLOCKF_GLOBAL 0x00000001 + +typedef struct _DMUS_CLOCKINFO7 *LPDMUS_CLOCKINFO7; +typedef struct _DMUS_CLOCKINFO7 +{ + DWORD dwSize; + DMUS_CLOCKTYPE ctType; + GUID guidClock; /* Identifies this time source */ + WCHAR wszDescription[DMUS_MAX_DESCRIPTION]; +} DMUS_CLOCKINFO7; + +typedef struct _DMUS_CLOCKINFO8 *LPDMUS_CLOCKINFO8; +typedef struct _DMUS_CLOCKINFO8 +{ + DWORD dwSize; + DMUS_CLOCKTYPE ctType; + GUID guidClock; /* Identifies this time source */ + WCHAR wszDescription[DMUS_MAX_DESCRIPTION]; + DWORD dwFlags; +} DMUS_CLOCKINFO8; + +typedef DMUS_CLOCKINFO8 DMUS_CLOCKINFO; +typedef DMUS_CLOCKINFO *LPDMUS_CLOCKINFO; + +/* Default bus identifiers + * + * The first 17 are direct mappings to the destinations defined in both + * the MMA DLS Level 2 specification and the Microsoft Multi-Channel audio + * specification. + */ +#define DSBUSID_FIRST_SPKR_LOC 0 +#define DSBUSID_FRONT_LEFT 0 +#define DSBUSID_LEFT 0 /* Front left is also just left */ +#define DSBUSID_FRONT_RIGHT 1 +#define DSBUSID_RIGHT 1 /* Ditto front right */ +#define DSBUSID_FRONT_CENTER 2 +#define DSBUSID_LOW_FREQUENCY 3 +#define DSBUSID_BACK_LEFT 4 +#define DSBUSID_BACK_RIGHT 5 +#define DSBUSID_FRONT_LEFT_OF_CENTER 6 +#define DSBUSID_FRONT_RIGHT_OF_CENTER 7 +#define DSBUSID_BACK_CENTER 8 +#define DSBUSID_SIDE_LEFT 9 +#define DSBUSID_SIDE_RIGHT 10 +#define DSBUSID_TOP_CENTER 11 +#define DSBUSID_TOP_FRONT_LEFT 12 +#define DSBUSID_TOP_FRONT_CENTER 13 +#define DSBUSID_TOP_FRONT_RIGHT 14 +#define DSBUSID_TOP_BACK_LEFT 15 +#define DSBUSID_TOP_BACK_CENTER 16 +#define DSBUSID_TOP_BACK_RIGHT 17 +#define DSBUSID_LAST_SPKR_LOC 17 + +#define DSBUSID_IS_SPKR_LOC(id) ( ((id) >= DSBUSID_FIRST_SPKR_LOC) && ((id) <= DSBUSID_LAST_SPKR_LOC) ) + +/* These bus identifiers are for the standard DLS effect sends + */ +#define DSBUSID_REVERB_SEND 64 +#define DSBUSID_CHORUS_SEND 65 + +/* Dynamic bus identifiers start here. See the documentation for how + * synthesizers map the output of voices to static and dynamic + * bus identifiers. + */ +#define DSBUSID_DYNAMIC_0 512 + +/* Null bus, used to identify busses that have no function mapping. +*/ +#define DSBUSID_NULL 0xFFFFFFFF + +interface IDirectMusic; +interface IDirectMusic8; +interface IDirectMusicBuffer; +interface IDirectMusicPort; +interface IDirectMusicThru; +interface IReferenceClock; + +#ifndef __cplusplus + +typedef interface IDirectMusic IDirectMusic; +typedef interface IDirectMusic8 IDirectMusic8; +typedef interface IDirectMusicPort IDirectMusicPort; +typedef interface IDirectMusicBuffer IDirectMusicBuffer; +typedef interface IDirectMusicThru IDirectMusicThru; +typedef interface IReferenceClock IReferenceClock; + +#endif /* C++ */ + +typedef IDirectMusic *LPDIRECTMUSIC; +typedef IDirectMusic8 *LPDIRECTMUSIC8; +typedef IDirectMusicPort *LPDIRECTMUSICPORT; +typedef IDirectMusicBuffer *LPDIRECTMUSICBUFFER; + +#undef INTERFACE +#define INTERFACE IDirectMusic +DECLARE_INTERFACE_(IDirectMusic, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusic */ + STDMETHOD(EnumPort) (THIS_ DWORD dwIndex, + LPDMUS_PORTCAPS pPortCaps) PURE; + STDMETHOD(CreateMusicBuffer) (THIS_ LPDMUS_BUFFERDESC pBufferDesc, + LPDIRECTMUSICBUFFER *ppBuffer, + LPUNKNOWN pUnkOuter) PURE; + STDMETHOD(CreatePort) (THIS_ REFCLSID rclsidPort, + LPDMUS_PORTPARAMS pPortParams, + LPDIRECTMUSICPORT *ppPort, + LPUNKNOWN pUnkOuter) PURE; + STDMETHOD(EnumMasterClock) (THIS_ DWORD dwIndex, + LPDMUS_CLOCKINFO lpClockInfo) PURE; + STDMETHOD(GetMasterClock) (THIS_ LPGUID pguidClock, + IReferenceClock **ppReferenceClock) PURE; + STDMETHOD(SetMasterClock) (THIS_ REFGUID rguidClock) PURE; + STDMETHOD(Activate) (THIS_ BOOL fEnable) PURE; + STDMETHOD(GetDefaultPort) (THIS_ LPGUID pguidPort) PURE; + STDMETHOD(SetDirectSound) (THIS_ LPDIRECTSOUND pDirectSound, + HWND hWnd) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirectMusic8 +DECLARE_INTERFACE_(IDirectMusic8, IDirectMusic) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusic */ + STDMETHOD(EnumPort) (THIS_ DWORD dwIndex, + LPDMUS_PORTCAPS pPortCaps) PURE; + STDMETHOD(CreateMusicBuffer) (THIS_ LPDMUS_BUFFERDESC pBufferDesc, + LPDIRECTMUSICBUFFER *ppBuffer, + LPUNKNOWN pUnkOuter) PURE; + STDMETHOD(CreatePort) (THIS_ REFCLSID rclsidPort, + LPDMUS_PORTPARAMS pPortParams, + LPDIRECTMUSICPORT *ppPort, + LPUNKNOWN pUnkOuter) PURE; + STDMETHOD(EnumMasterClock) (THIS_ DWORD dwIndex, + LPDMUS_CLOCKINFO lpClockInfo) PURE; + STDMETHOD(GetMasterClock) (THIS_ LPGUID pguidClock, + IReferenceClock **ppReferenceClock) PURE; + STDMETHOD(SetMasterClock) (THIS_ REFGUID rguidClock) PURE; + STDMETHOD(Activate) (THIS_ BOOL fEnable) PURE; + STDMETHOD(GetDefaultPort) (THIS_ LPGUID pguidPort) PURE; + STDMETHOD(SetDirectSound) (THIS_ LPDIRECTSOUND pDirectSound, + HWND hWnd) PURE; + /* IDirectMusic8 */ + STDMETHOD(SetExternalMasterClock) + (THIS_ IReferenceClock *pClock) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirectMusicBuffer +DECLARE_INTERFACE_(IDirectMusicBuffer, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicBuffer */ + STDMETHOD(Flush) (THIS) PURE; + STDMETHOD(TotalTime) (THIS_ LPREFERENCE_TIME prtTime) PURE; + + STDMETHOD(PackStructured) (THIS_ REFERENCE_TIME rt, + DWORD dwChannelGroup, + DWORD dwChannelMessage) PURE; + + STDMETHOD(PackUnstructured) (THIS_ REFERENCE_TIME rt, + DWORD dwChannelGroup, + DWORD cb, + LPBYTE lpb) PURE; + + STDMETHOD(ResetReadPtr) (THIS) PURE; + STDMETHOD(GetNextEvent) (THIS_ LPREFERENCE_TIME prt, + LPDWORD pdwChannelGroup, + LPDWORD pdwLength, + LPBYTE *ppData) PURE; + + STDMETHOD(GetRawBufferPtr) (THIS_ LPBYTE *ppData) PURE; + STDMETHOD(GetStartTime) (THIS_ LPREFERENCE_TIME prt) PURE; + STDMETHOD(GetUsedBytes) (THIS_ LPDWORD pcb) PURE; + STDMETHOD(GetMaxBytes) (THIS_ LPDWORD pcb) PURE; + STDMETHOD(GetBufferFormat) (THIS_ LPGUID pGuidFormat) PURE; + + STDMETHOD(SetStartTime) (THIS_ REFERENCE_TIME rt) PURE; + STDMETHOD(SetUsedBytes) (THIS_ DWORD cb) PURE; +}; + +typedef IDirectMusicBuffer IDirectMusicBuffer8; +typedef IDirectMusicBuffer8 *LPDIRECTMUSICBUFFER8; + +#undef INTERFACE +#define INTERFACE IDirectMusicInstrument +DECLARE_INTERFACE_(IDirectMusicInstrument, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicInstrument */ + STDMETHOD(GetPatch) (THIS_ DWORD* pdwPatch) PURE; + STDMETHOD(SetPatch) (THIS_ DWORD dwPatch) PURE; +}; + +typedef IDirectMusicInstrument IDirectMusicInstrument8; +typedef IDirectMusicInstrument8 *LPDIRECTMUSICINSTRUMENT8; + +#undef INTERFACE +#define INTERFACE IDirectMusicDownloadedInstrument +DECLARE_INTERFACE_(IDirectMusicDownloadedInstrument, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicDownloadedInstrument */ + /* None at this time */ +}; + +typedef IDirectMusicDownloadedInstrument IDirectMusicDownloadedInstrument8; +typedef IDirectMusicDownloadedInstrument8 *LPDIRECTMUSICDOWNLOADEDINSTRUMENT8; + +#undef INTERFACE +#define INTERFACE IDirectMusicCollection +DECLARE_INTERFACE_(IDirectMusicCollection, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicCollection */ + STDMETHOD(GetInstrument) (THIS_ DWORD dwPatch, + IDirectMusicInstrument** ppInstrument) PURE; + STDMETHOD(EnumInstrument) (THIS_ DWORD dwIndex, + DWORD* pdwPatch, + LPWSTR pwszName, + DWORD dwNameLen) PURE; +}; + +typedef IDirectMusicCollection IDirectMusicCollection8; +typedef IDirectMusicCollection8 *LPDIRECTMUSICCOLLECTION8; + +#undef INTERFACE +#define INTERFACE IDirectMusicDownload +DECLARE_INTERFACE_(IDirectMusicDownload , IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicDownload */ + STDMETHOD(GetBuffer) (THIS_ void** ppvBuffer, + DWORD* pdwSize) PURE; +}; + +typedef IDirectMusicDownload IDirectMusicDownload8; +typedef IDirectMusicDownload8 *LPDIRECTMUSICDOWNLOAD8; + +#undef INTERFACE +#define INTERFACE IDirectMusicPortDownload +DECLARE_INTERFACE_(IDirectMusicPortDownload, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicPortDownload */ + STDMETHOD(GetBuffer) (THIS_ DWORD dwDLId, + IDirectMusicDownload** ppIDMDownload) PURE; + STDMETHOD(AllocateBuffer) (THIS_ DWORD dwSize, + IDirectMusicDownload** ppIDMDownload) PURE; + STDMETHOD(GetDLId) (THIS_ DWORD* pdwStartDLId, + DWORD dwCount) PURE; + STDMETHOD(GetAppend) (THIS_ DWORD* pdwAppend) PURE; + STDMETHOD(Download) (THIS_ IDirectMusicDownload* pIDMDownload) PURE; + STDMETHOD(Unload) (THIS_ IDirectMusicDownload* pIDMDownload) PURE; +}; + +typedef IDirectMusicPortDownload IDirectMusicPortDownload8; +typedef IDirectMusicPortDownload8 *LPDIRECTMUSICPORTDOWNLOAD8; + +/* Standard values for voice priorities. Numerically higher priorities are higher in priority. + * These priorities are used to set the voice priority for all voices on a channel. They are + * used in the dwPriority parameter of IDirectMusicPort::GetPriority and returned in the + * lpwPriority parameter of pdwPriority. + * + * These priorities are shared with DirectSound. + */ + +#ifndef _DIRECTAUDIO_PRIORITIES_DEFINED_ +#define _DIRECTAUDIO_PRIORITIES_DEFINED_ + +#define DAUD_CRITICAL_VOICE_PRIORITY (0xF0000000) +#define DAUD_HIGH_VOICE_PRIORITY (0xC0000000) +#define DAUD_STANDARD_VOICE_PRIORITY (0x80000000) +#define DAUD_LOW_VOICE_PRIORITY (0x40000000) +#define DAUD_PERSIST_VOICE_PRIORITY (0x10000000) + +/* These are the default priorities assigned if not overridden. By default priorities are + * equal across channel groups (e.g. channel 5 on channel group 1 has the same priority as + * channel 5 on channel group 2). + * + * In accordance with DLS level 1, channel 10 has the highest priority, followed by 1 through 16 + * except for 10. + */ +#define DAUD_CHAN1_VOICE_PRIORITY_OFFSET (0x0000000E) +#define DAUD_CHAN2_VOICE_PRIORITY_OFFSET (0x0000000D) +#define DAUD_CHAN3_VOICE_PRIORITY_OFFSET (0x0000000C) +#define DAUD_CHAN4_VOICE_PRIORITY_OFFSET (0x0000000B) +#define DAUD_CHAN5_VOICE_PRIORITY_OFFSET (0x0000000A) +#define DAUD_CHAN6_VOICE_PRIORITY_OFFSET (0x00000009) +#define DAUD_CHAN7_VOICE_PRIORITY_OFFSET (0x00000008) +#define DAUD_CHAN8_VOICE_PRIORITY_OFFSET (0x00000007) +#define DAUD_CHAN9_VOICE_PRIORITY_OFFSET (0x00000006) +#define DAUD_CHAN10_VOICE_PRIORITY_OFFSET (0x0000000F) +#define DAUD_CHAN11_VOICE_PRIORITY_OFFSET (0x00000005) +#define DAUD_CHAN12_VOICE_PRIORITY_OFFSET (0x00000004) +#define DAUD_CHAN13_VOICE_PRIORITY_OFFSET (0x00000003) +#define DAUD_CHAN14_VOICE_PRIORITY_OFFSET (0x00000002) +#define DAUD_CHAN15_VOICE_PRIORITY_OFFSET (0x00000001) +#define DAUD_CHAN16_VOICE_PRIORITY_OFFSET (0x00000000) + + +#define DAUD_CHAN1_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN1_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN2_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN2_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN3_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN3_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN4_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN4_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN5_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN5_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN6_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN6_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN7_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN7_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN8_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN8_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN9_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN9_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN10_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN10_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN11_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN11_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN12_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN12_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN13_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN13_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN14_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN14_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN15_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN15_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN16_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN16_VOICE_PRIORITY_OFFSET) + +#endif /* _DIRECTAUDIO_PRIORITIES_DEFINED_ */ + + +#undef INTERFACE +#define INTERFACE IDirectMusicPort +DECLARE_INTERFACE_(IDirectMusicPort, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicPort */ + /* */ + STDMETHOD(PlayBuffer) (THIS_ LPDIRECTMUSICBUFFER pBuffer) PURE; + STDMETHOD(SetReadNotificationHandle) (THIS_ HANDLE hEvent) PURE; + STDMETHOD(Read) (THIS_ LPDIRECTMUSICBUFFER pBuffer) PURE; + STDMETHOD(DownloadInstrument) (THIS_ IDirectMusicInstrument *pInstrument, + IDirectMusicDownloadedInstrument **ppDownloadedInstrument, + DMUS_NOTERANGE *pNoteRanges, + DWORD dwNumNoteRanges) PURE; + STDMETHOD(UnloadInstrument) (THIS_ IDirectMusicDownloadedInstrument *pDownloadedInstrument) PURE; + STDMETHOD(GetLatencyClock) (THIS_ IReferenceClock **ppClock) PURE; + STDMETHOD(GetRunningStats) (THIS_ LPDMUS_SYNTHSTATS pStats) PURE; + STDMETHOD(Compact) (THIS) PURE; + STDMETHOD(GetCaps) (THIS_ LPDMUS_PORTCAPS pPortCaps) PURE; + STDMETHOD(DeviceIoControl) (THIS_ DWORD dwIoControlCode, + LPVOID lpInBuffer, + DWORD nInBufferSize, + LPVOID lpOutBuffer, + DWORD nOutBufferSize, + LPDWORD lpBytesReturned, + LPOVERLAPPED lpOverlapped) PURE; + STDMETHOD(SetNumChannelGroups) (THIS_ DWORD dwChannelGroups) PURE; + STDMETHOD(GetNumChannelGroups) (THIS_ LPDWORD pdwChannelGroups) PURE; + STDMETHOD(Activate) (THIS_ BOOL fActive) PURE; + STDMETHOD(SetChannelPriority) (THIS_ DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority) PURE; + STDMETHOD(GetChannelPriority) (THIS_ DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority) PURE; + STDMETHOD(SetDirectSound) (THIS_ LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer) PURE; + STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD pdwBufferSize) PURE; +}; + +typedef IDirectMusicPort IDirectMusicPort8; +typedef IDirectMusicPort8 *LPDIRECTMUSICPORT8; + +#undef INTERFACE +#define INTERFACE IDirectMusicThru +DECLARE_INTERFACE_(IDirectMusicThru, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicThru + */ + STDMETHOD(ThruChannel) (THIS_ DWORD dwSourceChannelGroup, + DWORD dwSourceChannel, + DWORD dwDestinationChannelGroup, + DWORD dwDestinationChannel, + LPDIRECTMUSICPORT pDestinationPort) PURE; +}; + +typedef IDirectMusicThru IDirectMusicThru8; +typedef IDirectMusicThru8 *LPDIRECTMUSICTHRU8; + +#ifndef __IReferenceClock_INTERFACE_DEFINED__ +#define __IReferenceClock_INTERFACE_DEFINED__ + +DEFINE_GUID(IID_IReferenceClock,0x56a86897,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +#undef INTERFACE +#define INTERFACE IReferenceClock +DECLARE_INTERFACE_(IReferenceClock, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IReferenceClock */ + /* */ + + /* get the time now */ + STDMETHOD(GetTime) (THIS_ REFERENCE_TIME *pTime) PURE; + + /* ask for an async notification that a time has elapsed */ + STDMETHOD(AdviseTime) (THIS_ REFERENCE_TIME baseTime, /* base time */ + REFERENCE_TIME streamTime, /* stream offset time */ + HANDLE hEvent, /* advise via this event */ + DWORD * pdwAdviseCookie) PURE; /* where your cookie goes */ + + /* ask for an async periodic notification that a time has elapsed */ + STDMETHOD(AdvisePeriodic) (THIS_ REFERENCE_TIME startTime, /* starting at this time */ + REFERENCE_TIME periodTime, /* time between notifications */ + HANDLE hSemaphore, /* advise via a semaphore */ + DWORD * pdwAdviseCookie) PURE; /* where your cookie goes */ + + /* cancel a request for notification */ + STDMETHOD(Unadvise) (THIS_ DWORD dwAdviseCookie) PURE; +}; + +#endif /* __IReferenceClock_INTERFACE_DEFINED__ */ + +DEFINE_GUID(CLSID_DirectMusic,0x636b9f10,0x0c7d,0x11d1,0x95,0xb2,0x00,0x20,0xaf,0xdc,0x74,0x21); +DEFINE_GUID(CLSID_DirectMusicCollection,0x480ff4b0, 0x28b2, 0x11d1, 0xbe, 0xf7, 0x0, 0xc0, 0x4f, 0xbf, 0x8f, 0xef); +DEFINE_GUID(CLSID_DirectMusicSynth,0x58C2B4D0,0x46E7,0x11D1,0x89,0xAC,0x00,0xA0,0xC9,0x05,0x41,0x29); + +DEFINE_GUID(IID_IDirectMusic,0x6536115a,0x7b2d,0x11d2,0xba,0x18,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(IID_IDirectMusicBuffer,0xd2ac2878, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(IID_IDirectMusicPort, 0x08f2d8c9,0x37c2,0x11d2,0xb9,0xf9,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(IID_IDirectMusicThru, 0xced153e7, 0x3606, 0x11d2, 0xb9, 0xf9, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); +DEFINE_GUID(IID_IDirectMusicPortDownload,0xd2ac287a, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(IID_IDirectMusicDownload,0xd2ac287b, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(IID_IDirectMusicCollection,0xd2ac287c, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(IID_IDirectMusicInstrument,0xd2ac287d, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(IID_IDirectMusicDownloadedInstrument,0xd2ac287e, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + + +/* Alternate interface ID for IID_IDirectMusic, available in DX7 release and after. */ +DEFINE_GUID(IID_IDirectMusic2,0x6fc2cae1, 0xbc78, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6); + +DEFINE_GUID(IID_IDirectMusic8,0x2d3629f7,0x813d,0x4939,0x85,0x08,0xf0,0x5c,0x6b,0x75,0xfd,0x97); + +#define IID_IDirectMusicThru8 IID_IDirectMusicThru +#define IID_IDirectMusicPortDownload8 IID_IDirectMusicPortDownload +#define IID_IDirectMusicDownload8 IID_IDirectMusicDownload +#define IID_IDirectMusicCollection8 IID_IDirectMusicCollection +#define IID_IDirectMusicInstrument8 IID_IDirectMusicInstrument +#define IID_IDirectMusicDownloadedInstrument8 IID_IDirectMusicDownloadedInstrument +#define IID_IDirectMusicPort8 IID_IDirectMusicPort + + +/* Property Query GUID_DMUS_PROP_GM_Hardware - Local GM set, no need to download + * Property Query GUID_DMUS_PROP_GS_Hardware - Local GS set, no need to download + * Property Query GUID_DMUS_PROP_XG_Hardware - Local XG set, no need to download + * Property Query GUID_DMUS_PROP_DLS1 - Support DLS level 1 + * Property Query GUID_DMUS_PROP_INSTRUMENT2 - Support new INSTRUMENT2 download format + * Property Query GUID_DMUS_PROP_XG_Capable - Support minimum requirements of XG + * Property Query GUID_DMUS_PROP_GS_Capable - Support minimum requirements of GS + * Property Query GUID_DMUS_PROP_SynthSink_DSOUND - Synthsink talks to DSound + * Property Query GUID_DMUS_PROP_SynthSink_WAVE - Synthsink talks to Wave device + * + * Item 0: Supported + * Returns a DWORD which is non-zero if the feature is supported + */ +DEFINE_GUID(GUID_DMUS_PROP_GM_Hardware, 0x178f2f24, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); +DEFINE_GUID(GUID_DMUS_PROP_GS_Hardware, 0x178f2f25, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); +DEFINE_GUID(GUID_DMUS_PROP_XG_Hardware, 0x178f2f26, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); +DEFINE_GUID(GUID_DMUS_PROP_XG_Capable, 0x6496aba1, 0x61b0, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6); +DEFINE_GUID(GUID_DMUS_PROP_GS_Capable, 0x6496aba2, 0x61b0, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6); +DEFINE_GUID(GUID_DMUS_PROP_DLS1, 0x178f2f27, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); +DEFINE_GUID(GUID_DMUS_PROP_DLS2, 0xf14599e5, 0x4689, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6); +DEFINE_GUID(GUID_DMUS_PROP_INSTRUMENT2, 0x865fd372, 0x9f67, 0x11d2, 0x87, 0x2a, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(GUID_DMUS_PROP_SynthSink_DSOUND,0xaa97844, 0xc877, 0x11d1, 0x87, 0xc, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(GUID_DMUS_PROP_SynthSink_WAVE,0xaa97845, 0xc877, 0x11d1, 0x87, 0xc, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(GUID_DMUS_PROP_SampleMemorySize, 0x178f2f28, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); +DEFINE_GUID(GUID_DMUS_PROP_SamplePlaybackRate, 0x2a91f713, 0xa4bf, 0x11d2, 0xbb, 0xdf, 0x0, 0x60, 0x8, 0x33, 0xdb, 0xd8); + +/* Property Get/Set GUID_DMUS_PROP_WriteLatency + * + * Item 0: Synth buffer write latency, in milliseconds + * Get/Set SynthSink latency, the average time after the play head that the next buffer gets written. + */ +DEFINE_GUID(GUID_DMUS_PROP_WriteLatency,0x268a0fa0, 0x60f2, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6); + +/* Property Get/Set GUID_DMUS_PROP_WritePeriod + * + * Item 0: Synth buffer write period, in milliseconds + * Get/Set SynthSink buffer write period, time span between successive writes. + */ +DEFINE_GUID(GUID_DMUS_PROP_WritePeriod,0x268a0fa1, 0x60f2, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6); + +/* Property Get GUID_DMUS_PROP_MemorySize + * + * Item 0: Memory size + * Returns a DWORD containing the total number of bytes of sample RAM + */ +DEFINE_GUID(GUID_DMUS_PROP_MemorySize, 0x178f2f28, 0xc364, 0x11d1, 0xa7, 0x60, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); + +/* Property Set GUID_DMUS_PROP_WavesReverb + * + * Item 0: DMUS_WAVES_REVERB structure + * Sets reverb parameters + */ +DEFINE_GUID(GUID_DMUS_PROP_WavesReverb,0x4cb5622, 0x32e5, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6); + +/* Property Set GUID_DMUS_PROP_Effects + * + * Item 0: DWORD with effects flags. + * Get/Set effects bits, same as dwEffectFlags in DMUS_PORTPARAMS and DMUS_PORTCAPS: + * DMUS_EFFECT_NONE + * DMUS_EFFECT_REVERB + * DMUS_EFFECT_CHORUS + */ +DEFINE_GUID(GUID_DMUS_PROP_Effects, 0xcda8d611, 0x684a, 0x11d2, 0x87, 0x1e, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Property Set GUID_DMUS_PROP_LegacyCaps + * + * Item 0: The MIDINCAPS or MIDIOUTCAPS which describes the port's underlying WinMM device. This property is only supported + * by ports which wrap WinMM devices. + */ + +DEFINE_GUID(GUID_DMUS_PROP_LegacyCaps,0xcfa7cdc2, 0x00a1, 0x11d2, 0xaa, 0xd5, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); + +/* Property Set GUID_DMUS_PROP_Volume + * + * Item 0: A long which contains an offset, in 1/100 dB, to be added to the final volume + * + */ +DEFINE_GUID(GUID_DMUS_PROP_Volume, 0xfedfae25L, 0xe46e, 0x11d1, 0xaa, 0xce, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); + +/* Min and Max values for setting volume with GUID_DMUS_PROP_Volume */ + +#define DMUS_VOLUME_MAX 2000 /* +20 dB */ +#define DMUS_VOLUME_MIN -20000 /* -200 dB */ + +#ifdef __cplusplus +}; /* extern "C" */ +#endif + +#include + +#endif /* #ifndef _DMUSICC_ */ diff --git a/windows_libs/mssdk/include/dmusicf.h b/windows_libs/mssdk/include/dmusicf.h new file mode 100644 index 00000000..10908a9b --- /dev/null +++ b/windows_libs/mssdk/include/dmusicf.h @@ -0,0 +1,2373 @@ +/************************************************************************ +* * +* dmusicf.h -- This module defines the DirectMusic file formats * +* * +* Copyright (c) 1998-1999 Microsoft Corporation +* * +************************************************************************/ + +#ifndef _DMUSICF_ +#define _DMUSICF_ + + +#include + +#define COM_NO_WINDOWS_H +#include + +#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +interface IDirectMusicCollection; +#ifndef __cplusplus +typedef interface IDirectMusicCollection IDirectMusicCollection; +#endif + +/* Common chunks */ + +#define DMUS_FOURCC_GUID_CHUNK mmioFOURCC('g','u','i','d') +#define DMUS_FOURCC_INFO_LIST mmioFOURCC('I','N','F','O') +#define DMUS_FOURCC_UNFO_LIST mmioFOURCC('U','N','F','O') +#define DMUS_FOURCC_UNAM_CHUNK mmioFOURCC('U','N','A','M') +#define DMUS_FOURCC_UART_CHUNK mmioFOURCC('U','A','R','T') +#define DMUS_FOURCC_UCOP_CHUNK mmioFOURCC('U','C','O','P') +#define DMUS_FOURCC_USBJ_CHUNK mmioFOURCC('U','S','B','J') +#define DMUS_FOURCC_UCMT_CHUNK mmioFOURCC('U','C','M','T') +#define DMUS_FOURCC_CATEGORY_CHUNK mmioFOURCC('c','a','t','g') +#define DMUS_FOURCC_VERSION_CHUNK mmioFOURCC('v','e','r','s') + +/* The following structures are used by the Tracks, and are the packed structures */ +/* that are passed to the Tracks inside the IStream. */ + + +typedef struct _DMUS_IO_SEQ_ITEM +{ + MUSIC_TIME mtTime; + MUSIC_TIME mtDuration; + DWORD dwPChannel; + short nOffset; + BYTE bStatus; + BYTE bByte1; + BYTE bByte2; +} DMUS_IO_SEQ_ITEM; + + +typedef struct _DMUS_IO_CURVE_ITEM +{ + MUSIC_TIME mtStart; + MUSIC_TIME mtDuration; + MUSIC_TIME mtResetDuration; + DWORD dwPChannel; + short nOffset; + short nStartValue; + short nEndValue; + short nResetValue; + BYTE bType; + BYTE bCurveShape; + BYTE bCCData; + BYTE bFlags; + /* Following was added for DX8. */ + WORD wParamType; /* RPN or NRPN parameter number. */ + WORD wMergeIndex; /* Allows multiple parameters to be merged (pitchbend, volume, and expression.) */ +} DMUS_IO_CURVE_ITEM; + + +typedef struct _DMUS_IO_TEMPO_ITEM +{ + MUSIC_TIME lTime; + double dblTempo; +} DMUS_IO_TEMPO_ITEM; + + +typedef struct _DMUS_IO_SYSEX_ITEM +{ + MUSIC_TIME mtTime; + DWORD dwPChannel; + DWORD dwSysExLength; +} DMUS_IO_SYSEX_ITEM; + +typedef DMUS_CHORD_KEY DMUS_CHORD_PARAM; /* DMUS_CHORD_KEY defined in dmusici.h */ + +typedef struct _DMUS_RHYTHM_PARAM +{ + DMUS_TIMESIGNATURE TimeSig; + DWORD dwRhythmPattern; +} DMUS_RHYTHM_PARAM; + +typedef struct _DMUS_TEMPO_PARAM +{ + MUSIC_TIME mtTime; + double dblTempo; +} DMUS_TEMPO_PARAM; + + +typedef struct _DMUS_MUTE_PARAM +{ + DWORD dwPChannel; + DWORD dwPChannelMap; + BOOL fMute; +} DMUS_MUTE_PARAM; + +/* Style chunks */ + +#define DMUS_FOURCC_STYLE_FORM mmioFOURCC('D','M','S','T') +#define DMUS_FOURCC_STYLE_CHUNK mmioFOURCC('s','t','y','h') +#define DMUS_FOURCC_PART_LIST mmioFOURCC('p','a','r','t') +#define DMUS_FOURCC_PART_CHUNK mmioFOURCC('p','r','t','h') +#define DMUS_FOURCC_NOTE_CHUNK mmioFOURCC('n','o','t','e') +#define DMUS_FOURCC_CURVE_CHUNK mmioFOURCC('c','r','v','e') +#define DMUS_FOURCC_MARKER_CHUNK mmioFOURCC('m','r','k','r') +#define DMUS_FOURCC_RESOLUTION_CHUNK mmioFOURCC('r','s','l','n') +#define DMUS_FOURCC_ANTICIPATION_CHUNK mmioFOURCC('a','n','p','n') +#define DMUS_FOURCC_PATTERN_LIST mmioFOURCC('p','t','t','n') +#define DMUS_FOURCC_PATTERN_CHUNK mmioFOURCC('p','t','n','h') +#define DMUS_FOURCC_RHYTHM_CHUNK mmioFOURCC('r','h','t','m') +#define DMUS_FOURCC_PARTREF_LIST mmioFOURCC('p','r','e','f') +#define DMUS_FOURCC_PARTREF_CHUNK mmioFOURCC('p','r','f','c') +#define DMUS_FOURCC_STYLE_PERS_REF_LIST mmioFOURCC('p','r','r','f') +#define DMUS_FOURCC_MOTIFSETTINGS_CHUNK mmioFOURCC('m','t','f','s') + +/* Flags used by variations: these make up the DWORDs in dwVariationChoices. */ + +/* These flags determine the types of chords supported by a given variation in DirectMusic */ +/* mode. The first seven flags (bits 1-7) are set if the variation supports major chords */ +/* rooted in scale positions, so, e.g., if bits 1, 2, and 4 are set, the variation */ +/* supports major chords rooted in the tonic, second, and fourth scale positions. The */ +/* next seven flags serve the same purpose, but for minor chords, and the following seven */ +/* flags serve the same purpose for chords that are not major or minor (e.g., SUS 4 */ +/* chords). Bits 22, 23, and 24 are set if the variation supports chords rooted in the */ +/* scale, chords rooted sharp of scale tones, and chords rooted flat of scale tones, */ +/* respectively. For example, to support a C# minor chord in the scale of C Major, */ +/* bits 8 (for tonic minor) and 24 (for sharp) need to be set. Bits 25, 26, an 27 handle */ +/* chords that are triads, 6th or 7th chords, and chords with extensions, respectively. */ +/* bits 28 and 29 handle chords that are followed by tonic and dominant chords, */ +/* respectively. */ +#define DMUS_VARIATIONF_MAJOR 0x0000007F /* Seven positions in the scale - major chords. */ +#define DMUS_VARIATIONF_MINOR 0x00003F80 /* Seven positions in the scale - minor chords. */ +#define DMUS_VARIATIONF_OTHER 0x001FC000 /* Seven positions in the scale - other chords. */ +#define DMUS_VARIATIONF_ROOT_SCALE 0x00200000 /* Handles chord roots in the scale. */ +#define DMUS_VARIATIONF_ROOT_FLAT 0x00400000 /* Handles flat chord roots (based on scale notes). */ +#define DMUS_VARIATIONF_ROOT_SHARP 0x00800000 /* Handles sharp chord roots (based on scale notes). */ +#define DMUS_VARIATIONF_TYPE_TRIAD 0x01000000 /* Handles simple chords - triads. */ +#define DMUS_VARIATIONF_TYPE_6AND7 0x02000000 /* Handles simple chords - 6 and 7. */ +#define DMUS_VARIATIONF_TYPE_COMPLEX 0x04000000 /* Handles complex chords. */ +#define DMUS_VARIATIONF_DEST_TO1 0x08000000 /* Handles transitions to 1 chord. */ +#define DMUS_VARIATIONF_DEST_TO5 0x10000000 /* Handles transitions to 5 chord. */ +#define DMUS_VARIATIONF_DEST_OTHER 0x40000000 /* Handles transitions to chords other than 1 . */ + +/* legacy mask for variation modes */ +#define DMUS_VARIATIONF_MODES 0xE0000000 +/* Bits 29 and 31 of the variation flags are the Mode bits. If both are 0, it's IMA. */ +/* If bit 29 is 1, it's Direct Music. */ +#define DMUS_VARIATIONF_MODES_EX (0x20000000 | 0x80000000) +#define DMUS_VARIATIONF_IMA25_MODE 0x00000000 +#define DMUS_VARIATIONF_DMUS_MODE 0x20000000 + +/* Set this if the part uses marker events */ +#define DMUS_PARTF_USE_MARKERS 0x1 +/* Set this if the part is allowed to switch only on chord-aligned markers */ +#define DMUS_PARTF_ALIGN_CHORDS 0x2 + +/* These specify if the marker event signals whether to stop a variation or start a +pattern/variation (or both), and whether new variations must align with a chord */ +#define DMUS_MARKERF_START 0x1 +#define DMUS_MARKERF_STOP 0x2 +#define DMUS_MARKERF_CHORD_ALIGN 0x4 + +/* if this flag is set, variation settings in a playing pattern-based track's state data will +persist in the track after it stops playing */ +#define DMUS_PATTERNF_PERSIST_CONTROL 0x1 + +/* These specify possible values for DMUS_IO_PARTREF.bRandomVariation + all but DMUS_VARIATIONT_SEQUENTIAL and DMUS_VARIATIONT_RANDOM are dx8. */ +typedef enum enumDMUS_VARIATIONT_TYPES +{ + DMUS_VARIATIONT_SEQUENTIAL = 0, /* Play sequential starting with variation 1. */ + DMUS_VARIATIONT_RANDOM = 1, /* Play randomly. */ + DMUS_VARIATIONT_RANDOM_START = 2, /* Play sequential starting with a random variation. */ + DMUS_VARIATIONT_NO_REPEAT = 3, /* Play randomly, but don't play the same variation twice. */ + DMUS_VARIATIONT_RANDOM_ROW = 4 /* Play randomly as a row: don't repeat any variation until all have played. */ +} DMUS_VARIATIONT_TYPES; + +#pragma pack(2) + +typedef struct _DMUS_IO_TIMESIG +{ + /* Time signatures define how many beats per measure, which note receives */ + /* the beat, and the grid resolution. */ + BYTE bBeatsPerMeasure; /* beats per measure (top of time sig) */ + BYTE bBeat; /* what note receives the beat (bottom of time sig.) */ + /* we can assume that 0 means 256th note */ + WORD wGridsPerBeat; /* grids per beat */ +} DMUS_IO_TIMESIG; + +typedef struct _DMUS_IO_STYLE +{ + DMUS_IO_TIMESIG timeSig; /* Styles have a default Time Signature */ + double dblTempo; +} DMUS_IO_STYLE; + +typedef struct _DMUS_IO_VERSION +{ + DWORD dwVersionMS; /* Version # high-order 32 bits */ + DWORD dwVersionLS; /* Version # low-order 32 bits */ +} DMUS_IO_VERSION; + +typedef struct _DMUS_IO_PATTERN +{ + DMUS_IO_TIMESIG timeSig; /* Patterns can override the Style's Time sig. */ + BYTE bGrooveBottom; /* bottom of groove range */ + BYTE bGrooveTop; /* top of groove range */ + WORD wEmbellishment; /* Fill, Break, Intro, End, Normal, Motif */ + WORD wNbrMeasures; /* length in measures */ + BYTE bDestGrooveBottom; /* bottom of groove range for next pattern */ + BYTE bDestGrooveTop; /* top of groove range for next pattern */ + DWORD dwFlags; /* various flags */ +} DMUS_IO_PATTERN; + +typedef struct _DMUS_IO_STYLEPART +{ + DMUS_IO_TIMESIG timeSig; /* can override pattern's */ + DWORD dwVariationChoices[32]; /* MOAW choice bitfield */ + GUID guidPartID; /* identifies the part */ + WORD wNbrMeasures; /* length of the Part */ + BYTE bPlayModeFlags; /* see PLAYMODE flags */ + BYTE bInvertUpper; /* inversion upper limit */ + BYTE bInvertLower; /* inversion lower limit */ + BYTE bPad[3]; /* for DWORD alignment */ + DWORD dwFlags; /* various flags */ +} DMUS_IO_STYLEPART; + +typedef struct _DMUS_IO_PARTREF +{ + GUID guidPartID; /* unique ID for matching up with parts */ + WORD wLogicalPartID; /* corresponds to port/device/midi channel OBSOLETE */ + BYTE bVariationLockID; /* parts with the same ID lock variations. */ + /* high bit is used to identify master Part */ + BYTE bSubChordLevel; /* tells which sub chord level this part wants */ + BYTE bPriority; /* 256 priority levels. Parts with lower priority */ + /* aren't played first when a device runs out of */ + /* notes */ + BYTE bRandomVariation; /* when set, matching variations play in random order */ + /* when clear, matching variations play sequentially */ + WORD wPad; /* not used */ + DWORD dwPChannel; /* replaces wLogicalPartID */ +} DMUS_IO_PARTREF; + +typedef struct _DMUS_IO_STYLENOTE +{ + MUSIC_TIME mtGridStart; /* when this note occurs */ + DWORD dwVariation; /* variation bits */ + MUSIC_TIME mtDuration; /* how long this note lasts */ + short nTimeOffset; /* offset from mtGridStart */ + WORD wMusicValue; /* Position in scale. */ + BYTE bVelocity; /* Note velocity. */ + BYTE bTimeRange; /* Range to randomize start time. */ + BYTE bDurRange; /* Range to randomize duration. */ + BYTE bVelRange; /* Range to randomize velocity. */ + BYTE bInversionID; /* Identifies inversion group to which this note belongs */ + BYTE bPlayModeFlags; /* Can override part */ + /* Following exists only under DX8 and on */ + BYTE bNoteFlags; /* values from DMUS_NOTEF_FLAGS */ +} DMUS_IO_STYLENOTE; + +typedef struct _DMUS_IO_STYLECURVE +{ + MUSIC_TIME mtGridStart; /* when this curve occurs */ + DWORD dwVariation; /* variation bits */ + MUSIC_TIME mtDuration; /* how long this curve lasts */ + MUSIC_TIME mtResetDuration;/* how long after the end of the curve to reset the curve */ + short nTimeOffset; /* offset from mtGridStart */ + short nStartValue; /* curve's start value */ + short nEndValue; /* curve's end value */ + short nResetValue; /* the value to which to reset the curve */ + BYTE bEventType; /* type of curve */ + BYTE bCurveShape; /* shape of curve */ + BYTE bCCData; /* CC# */ + BYTE bFlags; /* Bit 1=TRUE means to send nResetValue. Otherwise, don't. + Other bits are reserved. */ + /* Following was added for DX8. */ + WORD wParamType; /* RPN or NRPN parameter number. */ + WORD wMergeIndex; /* Allows multiple parameters to be merged (pitchbend, volume, and expression.) */ +} DMUS_IO_STYLECURVE; + +typedef struct _DMUS_IO_STYLEMARKER +{ + MUSIC_TIME mtGridStart; /* when this marker occurs */ + DWORD dwVariation; /* variation bits */ + WORD wMarkerFlags; /* how the marker is used */ +} DMUS_IO_STYLEMARKER; + +typedef struct _DMUS_IO_STYLERESOLUTION +{ + DWORD dwVariation; /* variation bits */ + WORD wMusicValue; /* Position in scale. */ + BYTE bInversionID; /* Identifies inversion group to which this note belongs */ + BYTE bPlayModeFlags; /* Can override part */ +} DMUS_IO_STYLERESOLUTION; + +typedef struct _DMUS_IO_STYLE_ANTICIPATION +{ + MUSIC_TIME mtGridStart; /* when this anticipation occurs */ + DWORD dwVariation; /* variation bits */ + short nTimeOffset; /* offset from mtGridStart */ + BYTE bTimeRange; /* Range to randomize start time. */ +} DMUS_IO_STYLE_ANTICIPATION; + +typedef struct _DMUS_IO_MOTIFSETTINGS +{ + DWORD dwRepeats; /* Number of repeats. By default, 0. */ + MUSIC_TIME mtPlayStart; /* Start of playback. By default, 0. */ + MUSIC_TIME mtLoopStart; /* Start of looping portion. By default, 0. */ + MUSIC_TIME mtLoopEnd; /* End of loop. Must be greater than mtLoopStart. Or, 0, indicating loop full motif. */ + DWORD dwResolution; /* Default resolution. */ +} DMUS_IO_MOTIFSETTINGS; + +#pragma pack() + + +/* +RIFF +( + 'DMST' // Style + // Style header chunk + // Every Style has a GUID + [] // Name, author, copyright info., comments + [] // version chunk + ... // Array of parts in the Style, used by patterns + ... // Array of patterns in the Style + ... // Array of bands in the Style + []...// Optional array of chord map references in the Style +) + + // + styh + ( + + ) + + // + guid + ( + + ) + + // + vers + ( + + ) + + // + LIST + ( + 'part' + // Part header chunk + [] // Name, author, copyright info., comments + [] // Optional chunk containing an array of notes in Part + [] // Optional chunk containing an array of curves in Part + [] // Optional chunk containing an array of markers in Part + [] // Optional chunk containing an array of variation resolutions in Part + [] // Optional chunk containing an array of resolution anticipations in Part + ) + + // + prth + ( + + ) + + // + 'note' + ( + // sizeof DMUS_IO_STYLENOTE:DWORD + ... + ) + + // + 'crve' + ( + // sizeof DMUS_IO_STYLECURVE:DWORD + ... + ) + + // + 'mrkr' + ( + // sizeof DMUS_IO_STYLEMARKER:DWORD + ... + ) + + // + 'rsln' + ( + // sizeof DMUS_IO_STYLERESOLUTION:DWORD + ... + ) + + // + 'anpn' + ( + // sizeof DMUS_IO_STYLE_ANTICIPATION:DWORD + ... + ) + + // + LIST + ( + 'pttn' + // Pattern header chunk + // Chunk containing an array of rhythms for chord matching + [] // Name, author, copyright info., comments + [] // Motif settings chunk + [] // Optional band to be associated with the pattern (for motifs) + ... // Array of part reference id's + ) + + // + ptnh + ( + + ) + + // + 'rhtm' + ( + // DWORD's representing rhythms for chord matching based on number + // of measures in the pattern + ) + + + // pref-list + LIST + ( + 'pref' + // part ref chunk + ) + + // + prfc + ( + + ) + + // + mtfs + ( + + ) + + // + LIST + ( + 'prrf' + ... // Array of Chordmap references + ) +*/ + +/* Pattern chunk, for use in Pattern tracks */ + +#define DMUS_FOURCC_PATTERN_FORM mmioFOURCC('D','M','P','T') + +/* +RIFF +( + 'DMPT' // Pattern + // Style header chunk + // The pattern, in single pattern format (includes DMUS_FOURCC_PART_LIST chunks) +) +*/ + + +/* Chord and command file formats */ + +/* These specify possible values for DMUS_IO_COMMAND.bRepeatMode (dx8) */ +typedef enum enumDMUS_PATTERNT_TYPES +{ + DMUS_PATTERNT_RANDOM = 0, /* Play randomly. (dx7 behavior) */ + DMUS_PATTERNT_REPEAT = 1, /* Repeat last pattern. */ + DMUS_PATTERNT_SEQUENTIAL = 2, /* Play sequential starting with first matching pattern. */ + DMUS_PATTERNT_RANDOM_START = 3, /* Play sequential starting with a random pattern. */ + DMUS_PATTERNT_NO_REPEAT = 4, /* Play randomly, but don't play the same pattern twice. */ + DMUS_PATTERNT_RANDOM_ROW = 5 /* Play randomly as a row: don't repeat any pattern until all have played. */ +} DMUS_PATTERNT_TYPES; + +#define DMUS_FOURCC_CHORDTRACK_LIST mmioFOURCC('c','o','r','d') +#define DMUS_FOURCC_CHORDTRACKHEADER_CHUNK mmioFOURCC('c','r','d','h') +#define DMUS_FOURCC_CHORDTRACKBODY_CHUNK mmioFOURCC('c','r','d','b') + +#define DMUS_FOURCC_COMMANDTRACK_CHUNK mmioFOURCC('c','m','n','d') + +typedef struct _DMUS_IO_CHORD +{ + WCHAR wszName[16]; /* Name of the chord */ + MUSIC_TIME mtTime; /* Time of this chord */ + WORD wMeasure; /* Measure this falls on */ + BYTE bBeat; /* Beat this falls on */ + BYTE bFlags; /* Various flags */ +} DMUS_IO_CHORD; + +typedef struct _DMUS_IO_SUBCHORD +{ + DWORD dwChordPattern; /* Notes in the subchord */ + DWORD dwScalePattern; /* Notes in the scale */ + DWORD dwInversionPoints; /* Where inversions can occur */ + DWORD dwLevels; /* Which levels are supported by this subchord */ + BYTE bChordRoot; /* Root of the subchord */ + BYTE bScaleRoot; /* Root of the scale */ +} DMUS_IO_SUBCHORD; + +typedef struct _DMUS_IO_COMMAND +{ + MUSIC_TIME mtTime; /* Time of this command */ + WORD wMeasure; /* Measure this falls on */ + BYTE bBeat; /* Beat this falls on */ + BYTE bCommand; /* Command type (see #defines below) */ + BYTE bGrooveLevel; /* Groove level (0 if command is not a groove) */ + BYTE bGrooveRange; /* Groove range */ + BYTE bRepeatMode; /* Used to control selection of patterns with same groove level */ +} DMUS_IO_COMMAND; + + +/* + + // + LIST + ( + 'cord' + + // Chord body chunk + ) + + // + crdh + ( + // Scale: dword (upper 8 bits for root, lower 24 for scale) + ) + + // + crdb + ( + // sizeof DMUS_IO_CHORD:dword + + // # of DMUS_IO_SUBCHORDS:dword + // sizeof DMUS_IO_SUBCHORDS:dword + // a number of + ) + + + // + 'cmnd' + ( + //sizeof DMUS_IO_COMMAND: DWORD + ... + ) + +*/ + +/* File io for DirectMusic Tool and ToolGraph objects +*/ + +/* RIFF ids: */ + +#define DMUS_FOURCC_TOOLGRAPH_FORM mmioFOURCC('D','M','T','G') +#define DMUS_FOURCC_TOOL_LIST mmioFOURCC('t','o','l','l') +#define DMUS_FOURCC_TOOL_FORM mmioFOURCC('D','M','T','L') +#define DMUS_FOURCC_TOOL_CHUNK mmioFOURCC('t','o','l','h') + +/* io structures: */ + +typedef struct _DMUS_IO_TOOL_HEADER +{ + GUID guidClassID; /* Class id of tool. */ + long lIndex; /* Position in graph. */ + DWORD cPChannels; /* Number of items in channels array. */ + FOURCC ckid; /* chunk ID of tool's data chunk if 0 fccType valid. */ + FOURCC fccType; /* list type if NULL ckid valid. */ + DWORD dwPChannels[1]; /* Array of PChannels, size determined by cPChannels. */ +} DMUS_IO_TOOL_HEADER; + +/* +RIFF +( + 'DMTG' // DirectMusic ToolGraph chunk + [] // GUID for ToolGraph + [] // Optional version info + [] // Name, author, copyright info., comments + // List of Tools +) + + // + 'guid' + ( + + ) + + // + vers + ( + + ) + + // + LIST + ( + 'toll' // Array of tools + ... // Each tool is encapsulated in a RIFF chunk + ) + +// Tools are embedded in a graph. Theoretically, they can be saved as individual files too. +RIFF +( + 'DMTL' + + [] // Tool data. Must be a RIFF readable chunk. +) + + // // Tool header chunk + ( + 'tolh' + // Tool header + ) +*/ + +/* The AudioPath file carries everything for describing a specific audio path, + including Tool Graph and Buffer Descriptor. + This can even be used for configuring a complete performance. +*/ + +#define DMUS_FOURCC_AUDIOPATH_FORM mmioFOURCC('D','M','A','P') + +/* +RIFF +( + 'DMAP' // DirectMusic AudioPath chunk + [] // GUID for this Audio Path configuration + [] // Optional version info + [] // Name, author, copyright info., comments + [] // Optional ToolGraph + [] // Optional list of port configurations + []...// Optional array of Dsound buffer descriptors +) +*/ + +#define DMUS_FOURCC_PORTCONFIGS_LIST mmioFOURCC('p','c','s','l') +#define DMUS_FOURCC_PORTCONFIG_LIST mmioFOURCC('p','c','f','l') +#define DMUS_FOURCC_PORTCONFIG_ITEM mmioFOURCC('p','c','f','h') +#define DMUS_FOURCC_PORTPARAMS_ITEM mmioFOURCC('p','p','r','h') +#define DMUS_FOURCC_DSBUFFER_LIST mmioFOURCC('d','b','f','l') +#define DMUS_FOURCC_DSBUFFATTR_ITEM mmioFOURCC('d','d','a','h') +#define DMUS_FOURCC_PCHANNELS_LIST mmioFOURCC('p','c','h','l') +#define DMUS_FOURCC_PCHANNELS_ITEM mmioFOURCC('p','c','h','h') + +typedef struct _DMUS_IO_PORTCONFIG_HEADER +{ + GUID guidPort; /* GUID of requested port. */ + DWORD dwPChannelBase; /* PChannel that this should start on. */ + DWORD dwPChannelCount; /* How many channels. */ + DWORD dwFlags; /* Various flags. */ +} DMUS_IO_PORTCONFIG_HEADER; + +#define DMUS_PORTCONFIGF_DRUMSON10 1 /* This port configured for drums on channel 10. */ +#define DMUS_PORTCONFIGF_USEDEFAULT 2 /* Use the default port. */ + +/* Each portconfig has one or more pchannel to buffer mappings. Each buffer + is identified by a guid. Each pchannel can map to one or more buffers. + This is defined with one or more DMUS_IO_PCHANNELTOBUFFER_HEADER + structures. Each defines a range of PChannels and the set of buffers + that they connect to. +*/ + +typedef struct _DMUS_IO_PCHANNELTOBUFFER_HEADER +{ + DWORD dwPChannelBase; /* PChannel that this should start on. */ + DWORD dwPChannelCount; /* How many PChannels. */ + DWORD dwBufferCount; /* How many buffers do these connect to. */ + DWORD dwFlags; /* Various flags. Currently reserved for future use. Must be 0. */ +} DMUS_IO_PCHANNELTOBUFFER_HEADER; + +/* Each buffer is represented by an DSBC form. This is wrapped by the + DMUS_IO_BUFFER_ATTRIBUTES_HEADER which identifies how to use the + buffer. In particular, it indicates whether this gets dynamically duplicated + or all references to this should share the same instance. + To resolve references, the unique GUID of the buffer is also stored + in this structure. +*/ + +typedef struct _DMUS_IO_BUFFER_ATTRIBUTES_HEADER +{ + GUID guidBufferID; /* Each buffer config has a unique ID. */ + DWORD dwFlags; /* Various flags. */ +} DMUS_IO_BUFFER_ATTRIBUTES_HEADER; + +/* DMUS_IO_BUFFER_ATTRIBUTES_HEADER.dwFlags: */ +#define DMUS_BUFFERF_SHARED 1 /* Share this with other audio paths, instead of creating unique copies. */ +#define DMUS_BUFFERF_DEFINED 2 /* Use one of the standard predefined buffers (see GUID_Buffer... in dmusici.h.) */ +#define DMUS_BUFFERF_MIXIN 8 /* This is a mixin buffer. */ + +/* + +LIST +( + 'pcsl' // Array of port configurations + ... // One or more port configurations, each in a list chunk +) + +LIST +( + 'pcfl' // List container for one port configuration. + // Portconfig header chunk. + // Port params, to be used to create the port. + []...// Optional array of Dsound buffer descriptors + [] // Optional list of pchannel to buffer assignments + +) + + // // Port config header chunk + ( + 'pcfh' + // Port config header + ) + + // // Port params header chunk + ( + 'pprh' + // Port params header + ) + +LIST +( + 'pchl' // List container for one or more pchannel to buffer assignments. + ... // One or more pchannel to buffer assignment headers and data. + + // + ( + 'pchh' + // Description of PChannels + ... // Array of GUIDs defining the buffers they all connect to. + ) +) + +LIST +( + 'dbfl' // List container for one buffer and buffer attributes header. + // Buffer attributes header. + [] // Buffer configuration. Not required when header uses a predefined buffer type. + + // + ( + 'ddah' + // Buffer attributes. + ) +) +*/ + +/* File io for DirectMusic Band Track object */ + + +/* RIFF ids: */ +#define DMUS_FOURCC_BANDTRACK_FORM mmioFOURCC('D','M','B','T') +#define DMUS_FOURCC_BANDTRACK_CHUNK mmioFOURCC('b','d','t','h') +#define DMUS_FOURCC_BANDS_LIST mmioFOURCC('l','b','d','l') +#define DMUS_FOURCC_BAND_LIST mmioFOURCC('l','b','n','d') +#define DMUS_FOURCC_BANDITEM_CHUNK mmioFOURCC('b','d','i','h') +#define DMUS_FOURCC_BANDITEM_CHUNK2 mmioFOURCC('b','d','2','h') + +/* io structures */ +typedef struct _DMUS_IO_BAND_TRACK_HEADER +{ + BOOL bAutoDownload; /* Determines if Auto-Download is enabled. */ +} DMUS_IO_BAND_TRACK_HEADER; + +typedef struct _DMUS_IO_BAND_ITEM_HEADER +{ + MUSIC_TIME lBandTime; /* Position in track list. */ +} DMUS_IO_BAND_ITEM_HEADER; + +typedef struct _DMUS_IO_BAND_ITEM_HEADER2 +{ + MUSIC_TIME lBandTimeLogical; /* Position in track list. Time in the music with which band change is associated. */ + MUSIC_TIME lBandTimePhysical; /* Precise time band change will take effect. Should be close to logical time. */ +} DMUS_IO_BAND_ITEM_HEADER2; + +/* +RIFF +( + 'DMBT' // DirectMusic Band Track form-type + [] // Band track header + [] // GUID for band track + [] // Optional version info + [] // Name, author, copyright info., comments + // List of Band items +) + + // + 'bdth' + ( + + ) + + // + 'guid' + ( + + ) + + // + vers + ( + + ) + + // + LIST + ( + 'lbdl' + ... // Array of bands, each encapsulated in a list chunk + ) + + // + LIST + ( + 'lbnd' + or // bdih is a legacy format. bd2h is preferred for new content. + // Band + ) + + // or // band item header + ( + or // Band item header + ) +*/ + + +/* File io for DirectMusic Band object +*/ + +/* RIFF ids: */ + +#define DMUS_FOURCC_BAND_FORM mmioFOURCC('D','M','B','D') +#define DMUS_FOURCC_INSTRUMENTS_LIST mmioFOURCC('l','b','i','l') +#define DMUS_FOURCC_INSTRUMENT_LIST mmioFOURCC('l','b','i','n') +#define DMUS_FOURCC_INSTRUMENT_CHUNK mmioFOURCC('b','i','n','s') + +/* Flags for DMUS_IO_INSTRUMENT + */ +#define DMUS_IO_INST_PATCH (1 << 0) /* dwPatch is valid. */ +#define DMUS_IO_INST_BANKSELECT (1 << 1) /* dwPatch contains a valid Bank Select MSB and LSB part */ +#define DMUS_IO_INST_ASSIGN_PATCH (1 << 3) /* dwAssignPatch is valid */ +#define DMUS_IO_INST_NOTERANGES (1 << 4) /* dwNoteRanges is valid */ +#define DMUS_IO_INST_PAN (1 << 5) /* bPan is valid */ +#define DMUS_IO_INST_VOLUME (1 << 6 ) /* bVolume is valid */ +#define DMUS_IO_INST_TRANSPOSE (1 << 7) /* nTranspose is valid */ +#define DMUS_IO_INST_GM (1 << 8) /* Instrument is from GM collection */ +#define DMUS_IO_INST_GS (1 << 9) /* Instrument is from GS collection */ +#define DMUS_IO_INST_XG (1 << 10) /* Instrument is from XG collection */ +#define DMUS_IO_INST_CHANNEL_PRIORITY (1 << 11) /* dwChannelPriority is valid */ +#define DMUS_IO_INST_USE_DEFAULT_GM_SET (1 << 12) /* Always use the default GM set for this patch, */ + /* don't rely on the synth caps stating GM or GS in hardware. */ +#define DMUS_IO_INST_PITCHBENDRANGE (1 << 13) /* nPitchBendRange is valid */ + +/* io structures */ +typedef struct _DMUS_IO_INSTRUMENT +{ + DWORD dwPatch; /* MSB, LSB and Program change to define instrument */ + DWORD dwAssignPatch; /* MSB, LSB and Program change to assign to instrument when downloading */ + DWORD dwNoteRanges[4]; /* 128 bits; one for each MIDI note instrument needs to able to play */ + DWORD dwPChannel; /* PChannel instrument plays on */ + DWORD dwFlags; /* DMUS_IO_INST_ flags */ + BYTE bPan; /* Pan for instrument */ + BYTE bVolume; /* Volume for instrument */ + short nTranspose; /* Number of semitones to transpose notes */ + DWORD dwChannelPriority; /* Channel priority */ + short nPitchBendRange; /* Number of semitones shifted by pitch bend */ +} DMUS_IO_INSTRUMENT; + +/* +// bands can be embedded in other forms +RIFF +( + 'DMBD' // DirectMusic Band chunk + [] // GUID for band + [] // Optional version info + [] // Name, author, copyright info., comments + // List of Instruments +) + + // + 'guid' + ( + + ) + + // + vers + ( + + ) + + // + LIST + ( + 'lbil' // Array of instruments + ... // Each instrument is encapsulated in a list + ) + + // + LIST + ( + 'lbin' + + [] // Optional reference to DLS Collection file. + ) + + // // Instrument chunk + ( + 'bins' + // Instrument header + ) +*/ + +/* This RIFF id and io struct have been added to allow wave files (and the wave object) to + differentiate between streaming and one-shot waves, and to give a prefetch for streaming + waves */ + +#define DMUS_FOURCC_WAVEHEADER_CHUNK mmioFOURCC('w','a','v','h') + +typedef struct _DMUS_IO_WAVE_HEADER +{ + REFERENCE_TIME rtReadAhead; /* How far ahead in the stream wave data will be read (in REFERENCE_TIME). Ignored for one-shot waves. */ + DWORD dwFlags; /* Various flags, including whether this is a streaming wave and whether it can be invalidated. */ +} DMUS_IO_WAVE_HEADER; + + +/* File io for Wave track */ + +/* RIFF ids: */ + +#define DMUS_FOURCC_WAVETRACK_LIST mmioFOURCC('w','a','v','t') +#define DMUS_FOURCC_WAVETRACK_CHUNK mmioFOURCC('w','a','t','h') +#define DMUS_FOURCC_WAVEPART_LIST mmioFOURCC('w','a','v','p') +#define DMUS_FOURCC_WAVEPART_CHUNK mmioFOURCC('w','a','p','h') +#define DMUS_FOURCC_WAVEITEM_LIST mmioFOURCC('w','a','v','i') +#define DMUS_FOURCC_WAVE_LIST mmioFOURCC('w','a','v','e') +#define DMUS_FOURCC_WAVEITEM_CHUNK mmioFOURCC('w','a','i','h') + +/* This flag is included in DMUS_IO_WAVE_TRACK_HEADER.dwFlags. If set, the track will get its + variations from a pattern track, via GetParam(GUID_Variations). */ +#define DMUS_WAVETRACKF_SYNC_VAR 0x1 +/* This is also included in DMUS_IO_WAVE_TRACK_HEADER.dwFlags. If set, variation control + information will persist from one playback instance to the next.*/ +#define DMUS_WAVETRACKF_PERSIST_CONTROL 0x2 + +typedef struct _DMUS_IO_WAVE_TRACK_HEADER +{ + long lVolume; /* Gain, in 1/100th of dB, to be applied to all waves. Note: All gain values should be negative. */ + DWORD dwFlags; /* Flags, including whether this track syncs to a pattern track for its variations. */ +} DMUS_IO_WAVE_TRACK_HEADER; + +typedef struct _DMUS_IO_WAVE_PART_HEADER +{ + long lVolume; /* Gain, in 1/100th of dB, to be applied to all waves in wave part. Note: All gain values should be negative. */ + DWORD dwVariations; /* Variation mask for which of 32 variations */ + DWORD dwPChannel; /* PChannel */ + DWORD dwLockToPart; /* Part ID to lock to. */ + DWORD dwFlags; /* Flags, including stuff for managing how variations are chosen (in low-order nibble) */ + DWORD dwIndex; /* Index for distinguishing multiple parts on the same PChannel*/ +} DMUS_IO_WAVE_PART_HEADER; + +typedef struct _DMUS_IO_WAVE_ITEM_HEADER +{ + long lVolume; /* Gain, in 1/100th of dB. Note: All gain values should be negative. */ + long lPitch; /* Pitch offset in 1/100th of a semitone. */ + DWORD dwVariations; /* Variation flags for which of 32 variations this wave belongs to. */ + REFERENCE_TIME rtTime; /* Start time, in REFERENCE_TIME, if clock time track, or MUSIC_TIME for music time track. */ + REFERENCE_TIME rtStartOffset; /* Distance into wave to start playback, in reference time units. */ + REFERENCE_TIME rtReserved; /* Reserved field. */ + REFERENCE_TIME rtDuration; /* Duration, in REFERENCE_TIME or MUSIC_TIME, depending on track timing format. */ + MUSIC_TIME mtLogicalTime; /* If in music track format, this indicates the musical boundary where this belongs. Otherwise, ignored. */ + DWORD dwLoopStart; /* Start point for a looping wave. */ + DWORD dwLoopEnd; /* End point for a looping wave. */ + DWORD dwFlags; /* Various flags, including whether this is a streaming wave and whether it can be invalidated. */ +} DMUS_IO_WAVE_ITEM_HEADER; + +/* +LIST +{ + 'wavt' // Wave track chunk + // Wave track header + ... // Array of Wave Parts +} + // + 'wath' + { + + } + + // + LIST + { + 'wavp' + // Wave Part Header + // List of wave items + } + + // + 'waph' + { + + } + + // + LIST + { + 'wavi' + ... // Array of waves; each wave is encapsulated in a list + } + + // + LIST + { + 'wave' + // Wave item header + // Reference to wave object + } + + // + 'waih' + { + + } + +*/ + +/* File io for DirectMusic Container file. This embeds a set of related files. And, + in turn, it can be embedded within a segment or script file. +*/ + +#define DMUS_FOURCC_CONTAINER_FORM mmioFOURCC('D','M','C','N') +#define DMUS_FOURCC_CONTAINER_CHUNK mmioFOURCC('c','o','n','h') +#define DMUS_FOURCC_CONTAINED_ALIAS_CHUNK mmioFOURCC('c','o','b','a') +#define DMUS_FOURCC_CONTAINED_OBJECT_CHUNK mmioFOURCC('c','o','b','h') +#define DMUS_FOURCC_CONTAINED_OBJECTS_LIST mmioFOURCC('c','o','s','l') +#define DMUS_FOURCC_CONTAINED_OBJECT_LIST mmioFOURCC('c','o','b','l') + +typedef struct _DMUS_IO_CONTAINER_HEADER +{ + DWORD dwFlags; /* Flags. */ +} DMUS_IO_CONTAINER_HEADER; + +#define DMUS_CONTAINER_NOLOADS (1 << 1) /* Contained items are not loaded when the container is loaded. + Entries will be created in the loader (via SetObject) but + the actual objects will not be created until they are + specifically loaded at a later time. */ + +typedef struct _DMUS_IO_CONTAINED_OBJECT_HEADER +{ + GUID guidClassID; /* Class id of object. */ + DWORD dwFlags; /* Flags, for example DMUS_CONTAINED_OBJF_KEEP. */ + FOURCC ckid; /* chunk ID of track's data chunk if 0 fccType valid. */ + FOURCC fccType; /* list type if NULL ckid valid */ + /* Note that LIST:DMRF may be used for ckid and fccType in order to reference an + object instead of embedding it within the container. */ +} DMUS_IO_CONTAINED_OBJECT_HEADER; + +#define DMUS_CONTAINED_OBJF_KEEP 1 /* Keep the object cached in the loader after the container is released. */ + +/* +RIFF +( + 'DMCN' // DirectMusic Container chunk + // Container header chunk + [] // GUID for container + [] // Optional version info + [] // Name, author, copyright info., comments + // List of objects. +) + + // + 'conh' + ( + + ) + + // + 'guid' + ( + + ) + + // + vers + ( + + ) + + LIST + ( + 'cosl' // Array of embedded objects. + ... // Each object is encapsulated in a LIST chunk + ) + + // // Encapsulates one object + LIST + ( + 'cobl' + [] // Alias. An alternative name by which this object is known + // within the container. + // Required header, includes CLASS ID for object. + [] or // Object data of the type specified in . + // If DMRF, it is a reference of where to find the object. + // Otherwise, it could be any RIFF readable chunk in the + // exact same format as a file. The object will load + // itself from this data. + ) + + // + 'coba' + ( + // Alias, stored as NULL terminated string of WCHARs + ) + + // + 'cobh' + ( + + ) +*/ + +/* File io for DirectMusic Segment object */ + +/* RIFF ids: */ + +#define DMUS_FOURCC_SEGMENT_FORM mmioFOURCC('D','M','S','G') +#define DMUS_FOURCC_SEGMENT_CHUNK mmioFOURCC('s','e','g','h') +#define DMUS_FOURCC_TRACK_LIST mmioFOURCC('t','r','k','l') +#define DMUS_FOURCC_TRACK_FORM mmioFOURCC('D','M','T','K') +#define DMUS_FOURCC_TRACK_CHUNK mmioFOURCC('t','r','k','h') +#define DMUS_FOURCC_TRACK_EXTRAS_CHUNK mmioFOURCC('t','r','k','x') + +/* io structures:*/ + +typedef struct _DMUS_IO_SEGMENT_HEADER +{ + DWORD dwRepeats; /* Number of repeats. By default, 0. */ + MUSIC_TIME mtLength; /* Length, in music time. */ + MUSIC_TIME mtPlayStart; /* Start of playback. By default, 0. */ + MUSIC_TIME mtLoopStart; /* Start of looping portion. By default, 0. */ + MUSIC_TIME mtLoopEnd; /* End of loop. Must be greater than dwPlayStart. Or, 0, indicating loop full segment. */ + DWORD dwResolution; /* Default resolution. */ + /* Following added for DX8: */ + REFERENCE_TIME rtLength; /* Length, in reference time (overrides music time length.) */ + DWORD dwFlags; + DWORD dwReserved; /* Reserved. */ +} DMUS_IO_SEGMENT_HEADER; + +#define DMUS_SEGIOF_REFLENGTH 1 /* Use the time in rtLength for the segment length. */ + +typedef struct _DMUS_IO_TRACK_HEADER +{ + GUID guidClassID; /* Class id of track. */ + DWORD dwPosition; /* Position in track list. */ + DWORD dwGroup; /* Group bits for track. */ + FOURCC ckid; /* chunk ID of track's data chunk. */ + FOURCC fccType; /* list type if ckid is RIFF or LIST */ +} DMUS_IO_TRACK_HEADER; + +/* Additional parameters for the track header chunk, introduced in DX8 and + on, are stored in a separate chunk. */ + +typedef struct _DMUS_IO_TRACK_EXTRAS_HEADER +{ + DWORD dwFlags; /* DX8 Added flags for control tracks. */ + DWORD dwPriority; /* Priority for composition. */ +} DMUS_IO_TRACK_EXTRAS_HEADER; + +/* +RIFF +( + 'DMSG' // DirectMusic Segment chunk + // Segment header chunk + [] // GUID for segment + [] // Optional version info + [] // Name, author, copyright info., comments + [] // Optional container of objects embedded in file. Must precede tracklist. + // List of Tracks + [] // Optional ToolGraph + [] // Optional Audio Path +) + + // + 'segh' + ( + + ) + + // + 'guid' + ( + + ) + + // + vers + ( + + ) + + // + LIST + ( + 'trkl' // Array of tracks + ... // Each track is encapsulated in a RIFF chunk + ) + + // // Tracks can be embedded in a segment or stored as separate files. + RIFF + ( + 'DMTK' + + [] // Optional track flags. + [] // Optional GUID for track object instance (not to be confused with Class id in track header) + [] // Optional version info + [] // Optional name, author, copyright info., comments + [] // Track data. Must be a RIFF readable chunk. + ) + + // // Track header chunk + ( + 'trkh' + // Track header + ) + + // // Track flags chunk + ( + 'trkx' + // DX8 Track flags header + ) +*/ + +/* File io for DirectMusic Song object */ +/* Note: Song file format is not supported in DX8. */ + +/* RIFF ids: */ + +#define DMUS_FOURCC_SONG_FORM mmioFOURCC('D','M','S','O') /* Entire song. */ +#define DMUS_FOURCC_SONG_CHUNK mmioFOURCC('s','n','g','h') /* Song header info. */ +#define DMUS_FOURCC_SONGSEGMENTS_LIST mmioFOURCC('s','e','g','l') /* List of embedded segments. */ +#define DMUS_FOURCC_SONGSEGMENT_LIST mmioFOURCC('s','s','g','l') /* Container for a segment or segment reference. */ +#define DMUS_FOURCC_TOOLGRAPHS_LIST mmioFOURCC('t','l','g','l') /* List of embedded tool graphs. */ +#define DMUS_FOURCC_SEGREFS_LIST mmioFOURCC('s','r','s','l') /* List of segment references. */ +#define DMUS_FOURCC_SEGREF_LIST mmioFOURCC('s','g','r','l') /* Container for a segment reference. */ +#define DMUS_FOURCC_SEGREF_CHUNK mmioFOURCC('s','g','r','h') /* Segment reference header. */ +#define DMUS_FOURCC_SEGTRANS_CHUNK mmioFOURCC('s','t','r','h') /* Set of transitions to this segment. */ +#define DMUS_FOURCC_TRACKREFS_LIST mmioFOURCC('t','r','s','l') /* Set of track references within the segment reference. */ +#define DMUS_FOURCC_TRACKREF_LIST mmioFOURCC('t','k','r','l') /* Container for a track reference. */ +#define DMUS_FOURCC_TRACKREF_CHUNK mmioFOURCC('t','k','r','h') /* Track reference header. */ + +/* io structures:*/ + +typedef struct _DMUS_IO_SONG_HEADER +{ + DWORD dwFlags; + DWORD dwStartSegID; /* Id of the segment that starts playback. */ +} DMUS_IO_SONG_HEADER; + +typedef struct _DMUS_IO_SEGREF_HEADER +{ + DWORD dwID; /* Each has a unique ID. Must be less than DMUS_SONG_MAXSEGID. */ + DWORD dwSegmentID; /* Optional segment to link to. */ + DWORD dwToolGraphID; /* Optional tool graph to use for processing. */ + DWORD dwFlags; /* Various control flags. Currently reserved for future use. Must be 0. */ + DWORD dwNextPlayID; /* ID of next segment, to chain segments into a song. */ +} DMUS_IO_SEGREF_HEADER; + + +typedef struct _DMUS_IO_TRACKREF_HEADER +{ + DWORD dwSegmentID; /* Which segment to find this in. */ + DWORD dwFlags; /* Reference control flags. */ +} DMUS_IO_TRACKREF_HEADER; + +/* Transition definition chunk defines a transition, using an optional transition template + segment. +*/ + +typedef struct _DMUS_IO_TRANSITION_DEF +{ + DWORD dwSegmentID; /* Segment the transition goes to. */ + DWORD dwTransitionID; /* Template segment to use for the transition. */ + DWORD dwPlayFlags; /* Flags to use for transition. */ +} DMUS_IO_TRANSITION_DEF; + +#define DMUS_SONG_MAXSEGID 0x7FFFFFFF /* Segment ids can not go higher than this. */ +#define DMUS_SONG_ANYSEG 0x80000000 /* Special ID to indicate any segment. */ +#define DMUS_SONG_NOSEG 0xFFFFFFFF /* Special ID to indicate no segment. */ +#define DMUS_SONG_NOFROMSEG 0x80000001 /* Special ID for dwSegmentID to indicate transition from nothing (or outside the song) into this segment. */ + +/* +RIFF +( + 'DMSO' // DirectMusic Song chunk + // Song header chunk + [] // GUID for song + [] // Optional version info + [] // Name, author, copyright info., comments + [] // Optional container of objects embedded in file. Must precede segment list. + // List of Segments + [] // Optional list of ToolGraphs + [] // Optional Audio Path - to be shared by all segments in song. + // List of segment references. +) + + // + 'sngh' + ( + + ) + + // + LIST + ( + 'segl' // Array of segments + ... // Each segment is wrapped in this. + ) + + // + LIST + ( + 'ssgl' // Segment container. + [DMSG-form] // Each segment is either a full embedded segment RIFF form. + [DMRF-list] // Or a reference to an external segment. + ) + + // + LIST + ( + 'tlgl' // Array of toolgraphs + ... // Each toolgraph is a full RIFF form. + ) + + // + LIST + ( + 'srsl' // Array of segment references + ... // Each segment reference is contained in a RIFF list. + ) + + // // Segment reference container. + LIST + ( + 'sgrl' + // Segment reference header chunk. + // Segment header chunk. Defines the segment. + // Name, author, etc. Primarily for name, though, which is required for Song->GetSegment(). + [] // Segment transition chunk. Defines how to do transitions from other segments. + [] // List of track references, to create a segment from tracks in multiple segments. + ) + + // // Segment reference header chunk + ( + 'sgrh' + // Segment reference header + ) + + // // Segment transition chunk. + ( + 'strh' + // Default transition. + ... // Additional transitions. + ) + + // // Array of track references + ( + 'trsl' + ... // Each track reference is multiple chunks in a tkrl list. + ) + + // // Track reference container + ( + 'tkrl' + // Track reference header chunk. + // Normal track header chunk. + [] // Optional track flags. + ) + + // // Track reference header chunk + ( + 'tkrh' + // Track reference header + ) +*/ + +/* File io for DirectMusic reference chunk. + This is used to embed a reference to an object. +*/ + +/* RIFF ids: */ + +#define DMUS_FOURCC_REF_LIST mmioFOURCC('D','M','R','F') +#define DMUS_FOURCC_REF_CHUNK mmioFOURCC('r','e','f','h') +#define DMUS_FOURCC_DATE_CHUNK mmioFOURCC('d','a','t','e') +#define DMUS_FOURCC_NAME_CHUNK mmioFOURCC('n','a','m','e') +#define DMUS_FOURCC_FILE_CHUNK mmioFOURCC('f','i','l','e') + +typedef struct _DMUS_IO_REFERENCE +{ + GUID guidClassID; /* Class id is always required. */ + DWORD dwValidData; /* Flags. */ +} DMUS_IO_REFERENCE; + +/* +LIST +( + 'DMRF' // DirectMusic Reference chunk + // Reference header chunk + [] // Optional object GUID. + [] // Optional file date. + [] // Optional name. + [] // Optional file name. + [] // Optional category name. + [] // Optional version info. +) + + // + 'refh' + ( + + ) + + // + 'guid' + ( + + ) + + // + date + ( + + ) + + // + name + ( + // Name, stored as NULL terminated string of WCHARs + ) + + // + file + ( + // File name, stored as NULL terminated string of WCHARs + ) + + // + catg + ( + // Category name, stored as NULL terminated string of WCHARs + ) + + // + vers + ( + + ) +*/ + +/* Chord Maps */ + +/* runtime chunks */ +#define DMUS_FOURCC_CHORDMAP_FORM mmioFOURCC('D','M','P','R') +#define DMUS_FOURCC_IOCHORDMAP_CHUNK mmioFOURCC('p','e','r','h') +#define DMUS_FOURCC_SUBCHORD_CHUNK mmioFOURCC('c','h','d','t') +#define DMUS_FOURCC_CHORDENTRY_CHUNK mmioFOURCC('c','h','e','h') +#define DMUS_FOURCC_SUBCHORDID_CHUNK mmioFOURCC('s','b','c','n') +#define DMUS_FOURCC_IONEXTCHORD_CHUNK mmioFOURCC('n','c','r','d') +#define DMUS_FOURCC_NEXTCHORDSEQ_CHUNK mmioFOURCC('n','c','s','q') +#define DMUS_FOURCC_IOSIGNPOST_CHUNK mmioFOURCC('s','p','s','h') +#define DMUS_FOURCC_CHORDNAME_CHUNK mmioFOURCC('I','N','A','M') + +/* runtime list chunks */ +#define DMUS_FOURCC_CHORDENTRY_LIST mmioFOURCC('c','h','o','e') +#define DMUS_FOURCC_CHORDMAP_LIST mmioFOURCC('c','m','a','p') +#define DMUS_FOURCC_CHORD_LIST mmioFOURCC('c','h','r','d') +#define DMUS_FOURCC_CHORDPALETTE_LIST mmioFOURCC('c','h','p','l') +#define DMUS_FOURCC_CADENCE_LIST mmioFOURCC('c','a','d','e') +#define DMUS_FOURCC_SIGNPOSTITEM_LIST mmioFOURCC('s','p','s','t') + +#define DMUS_FOURCC_SIGNPOST_LIST mmioFOURCC('s','p','s','q') + +/* values for dwChord field of DMUS_IO_PERS_SIGNPOST */ +/* DMUS_SIGNPOSTF_ flags are also used in templates (DMUS_IO_SIGNPOST) */ +#define DMUS_SIGNPOSTF_A 1 +#define DMUS_SIGNPOSTF_B 2 +#define DMUS_SIGNPOSTF_C 4 +#define DMUS_SIGNPOSTF_D 8 +#define DMUS_SIGNPOSTF_E 0x10 +#define DMUS_SIGNPOSTF_F 0x20 +#define DMUS_SIGNPOSTF_LETTER (DMUS_SIGNPOSTF_A | DMUS_SIGNPOSTF_B | DMUS_SIGNPOSTF_C | DMUS_SIGNPOSTF_D | DMUS_SIGNPOSTF_E | DMUS_SIGNPOSTF_F) +#define DMUS_SIGNPOSTF_1 0x100 +#define DMUS_SIGNPOSTF_2 0x200 +#define DMUS_SIGNPOSTF_3 0x400 +#define DMUS_SIGNPOSTF_4 0x800 +#define DMUS_SIGNPOSTF_5 0x1000 +#define DMUS_SIGNPOSTF_6 0x2000 +#define DMUS_SIGNPOSTF_7 0x4000 +#define DMUS_SIGNPOSTF_ROOT (DMUS_SIGNPOSTF_1 | DMUS_SIGNPOSTF_2 | DMUS_SIGNPOSTF_3 | DMUS_SIGNPOSTF_4 | DMUS_SIGNPOSTF_5 | DMUS_SIGNPOSTF_6 | DMUS_SIGNPOSTF_7) +#define DMUS_SIGNPOSTF_CADENCE 0x8000 + +/* values for dwFlags field of DMUS_IO_CHORDMAP */ +#define DMUS_CHORDMAPF_VERSION8 1 /* Chordmap is version 8 or above. */ + +/* values for dwChord field of DMUS_IO_PERS_SIGNPOST */ +#define DMUS_SPOSTCADENCEF_1 2 /* Use the first cadence chord. */ +#define DMUS_SPOSTCADENCEF_2 4 /* Use the second cadence chord. */ + +/* run time data structs */ +typedef struct _DMUS_IO_CHORDMAP +{ + WCHAR wszLoadName[20]; + DWORD dwScalePattern; + DWORD dwFlags; /* Various flags. Only lower 16 bits are significant. */ +} DMUS_IO_CHORDMAP; + +typedef struct _DMUS_IO_CHORDMAP_SUBCHORD +{ + DWORD dwChordPattern; + DWORD dwScalePattern; + DWORD dwInvertPattern; + BYTE bChordRoot; + BYTE bScaleRoot; + WORD wCFlags; + DWORD dwLevels; /* parts or which subchord levels this chord supports */ +} DMUS_IO_CHORDMAP_SUBCHORD; + +/* Legacy name... */ +typedef DMUS_IO_CHORDMAP_SUBCHORD DMUS_IO_PERS_SUBCHORD; + +typedef struct _DMUS_IO_CHORDENTRY +{ + DWORD dwFlags; + WORD wConnectionID; /* replaces runtime "pointer to this" */ +} DMUS_IO_CHORDENTRY; + +typedef struct _DMUS_IO_NEXTCHORD +{ + DWORD dwFlags; + WORD nWeight; + WORD wMinBeats; + WORD wMaxBeats; + WORD wConnectionID; /* points to an ioChordEntry */ +} DMUS_IO_NEXTCHORD; + +typedef struct _DMUS_IO_CHORDMAP_SIGNPOST +{ + DWORD dwChords; /* 1bit per group */ + DWORD dwFlags; +} DMUS_IO_CHORDMAP_SIGNPOST; + +/* Legacy name... */ +typedef DMUS_IO_CHORDMAP_SIGNPOST DMUS_IO_PERS_SIGNPOST; + +/* +RIFF +( + 'DMPR' + // Chord map header chunk + [] // guid chunk + [] // version chunk (two DWORDS) + [] // Unfo chunk + // subchord database + // chord palette + // chord map + // signpost list + ) + + ::= LIST('cmap' ) + + ::= LIST('choe' + // chord entry data + // chord definition + // connecting(next) chords + ) + + ::= LIST('chrd' + // name of chord in wide char format + // list of subchords composing chord + ) + + ::= LIST('chpl' + ... // chord definition + ) + + ::== LIST('spsq' ... ) + + ::= LIST('spst' + + + [] + ) + + ::= LIST('cade' ...) + + ::= perh() + + ::= chdt( + ... ) + + ::= cheh() + + ::= sbcn( ...) + + ::= ncsq( + ...) + + ::= spsh() + +*/ + +/* File io for DirectMusic Script object */ + +/* RIFF ids: */ + +#define DMUS_FOURCC_SCRIPT_FORM mmioFOURCC('D','M','S','C') +#define DMUS_FOURCC_SCRIPT_CHUNK mmioFOURCC('s','c','h','d') +#define DMUS_FOURCC_SCRIPTVERSION_CHUNK mmioFOURCC('s','c','v','e') +#define DMUS_FOURCC_SCRIPTLANGUAGE_CHUNK mmioFOURCC('s','c','l','a') +#define DMUS_FOURCC_SCRIPTSOURCE_CHUNK mmioFOURCC('s','c','s','r') + +/* io structures:*/ + +typedef struct _DMUS_IO_SCRIPT_HEADER +{ + DWORD dwFlags; /* DMUS_SCRIPTIOF_ flags */ +} DMUS_IO_SCRIPT_HEADER; + +#define DMUS_SCRIPTIOF_LOAD_ALL_CONTENT (1 << 0) + /* If set, when the script loads it will also load all the content in its container. */ +#define DMUS_SCRIPTIOF_DOWNLOAD_ALL_SEGMENTS (1 << 1) + /* If set and LOAD_ALL_CONTENT is also set, when the script initializes it will also download all the segments in its container. + If set and LOAD_ALL_CONTENT is not set, when the script calls segment.Load on a segment then the segment will also be downloaded. + If not set, the script must manually download and unload by calling segment.DownloadSoundData and segment.UnloadSoundData. */ + +/* +RIFF +( + 'DMSC' // DirectMusic Script chunk + // Script header chunk + [] // GUID for script + [] // Optional version info + [] // Name, author, copyright info., comments + // Version of DirectMusic this script was authored to run against + // Container of content referenced by the script. + // ActiveX scripting language in which the script is written + or // The script's source code. + // If scsr-ck, the source is embedding in the chunk. + // If DMRF, it is a reference of where to find a text file with the source. + // Class id (guidClassID in DMUS_IO_REFERENCE) must be GUID_NULL because + // this text file is not a DirectMusic object in its own right. +) + + // + 'schd' + ( + + ) + + // + 'guid' + ( + + ) + + // + vers + ( + + ) + + // + scve + ( + + ) + + 'scla' + ( + // Language name, stored as NULL terminated string of WCHARs + ) + + 'scsr' + ( + // Source code, stored as NULL terminated string of WCHARs + ) +*/ + +/* Signpost tracks */ + +#define DMUS_FOURCC_SIGNPOST_TRACK_CHUNK mmioFOURCC( 's', 'g', 'n', 'p' ) + + +typedef struct _DMUS_IO_SIGNPOST +{ + MUSIC_TIME mtTime; + DWORD dwChords; + WORD wMeasure; +} DMUS_IO_SIGNPOST; + +/* + + // + 'sgnp' + ( + //sizeof DMUS_IO_SIGNPOST: DWORD + ... + ) + +*/ + +#define DMUS_FOURCC_MUTE_CHUNK mmioFOURCC('m','u','t','e') + +typedef struct _DMUS_IO_MUTE +{ + MUSIC_TIME mtTime; + DWORD dwPChannel; + DWORD dwPChannelMap; +} DMUS_IO_MUTE; + +/* + + // + 'mute' + ( + //sizeof DMUS_IO_MUTE:DWORD + ... + ) + + +*/ + +/* Used for both style and chord map tracks */ + +#define DMUS_FOURCC_TIME_STAMP_CHUNK mmioFOURCC('s', 't', 'm', 'p') + +/* Style tracks */ + +#define DMUS_FOURCC_STYLE_TRACK_LIST mmioFOURCC('s', 't', 't', 'r') +#define DMUS_FOURCC_STYLE_REF_LIST mmioFOURCC('s', 't', 'r', 'f') + +/* + + // + LIST('sttr' + ( + ... // Array of Style references + ) + + // + LIST('strf' + ( + + + ) + + // + 'stmp' + ( + // time:DWORD + ) + +*/ + +/* Chord map tracks */ + +#define DMUS_FOURCC_PERS_TRACK_LIST mmioFOURCC('p', 'f', 't', 'r') +#define DMUS_FOURCC_PERS_REF_LIST mmioFOURCC('p', 'f', 'r', 'f') + +/* + + // + LIST('pftr' + ( + ... // Array of Chord map references + ) + + // + LIST('pfrf' + ( + + + ) + + // + 'stmp' + ( + // time:DWORD + ) + +*/ + +#define DMUS_FOURCC_TEMPO_TRACK mmioFOURCC('t','e','t','r') + +/* + // tempo array + 'tetr' + ( + // sizeof DMUS_IO_TEMPO_ITEM: DWORD + ... + ) + */ + +#define DMUS_FOURCC_SEQ_TRACK mmioFOURCC('s','e','q','t') +#define DMUS_FOURCC_SEQ_LIST mmioFOURCC('e','v','t','l') +#define DMUS_FOURCC_CURVE_LIST mmioFOURCC('c','u','r','l') + +/* + // sequence track + 'seqt' + ( + // sequence array + 'evtl' + ( + // sizeof DMUS_IO_SEQ_ITEM: DWORD + ... + ) + // curve array + 'curl' + ( + // sizeof DMUS_IO_CURVE_ITEM: DWORD + ... + ) + ) +*/ + +#define DMUS_FOURCC_SYSEX_TRACK mmioFOURCC('s','y','e','x') + +/* + // sysex track + 'syex' + ( + { + + ... // Array of bytes, length defined in the DMUS_IO_SYSEXITEM structure + }... + ) +*/ + +#define DMUS_FOURCC_TIMESIGNATURE_TRACK mmioFOURCC('t','i','m','s') + +typedef struct _DMUS_IO_TIMESIGNATURE_ITEM +{ + MUSIC_TIME lTime; + BYTE bBeatsPerMeasure; /* beats per measure (top of time sig) */ + BYTE bBeat; /* what note receives the beat (bottom of time sig.) */ + /* we can assume that 0 means 256th note */ + WORD wGridsPerBeat; /* grids per beat */ +} DMUS_IO_TIMESIGNATURE_ITEM; + +/* DX6 time signature track + + 'tims' + ( + // size of DMUS_IO_TIMESIGNATURE_ITEM : DWORD + ... + ) +*/ + +/* DX8 Time signature track. The track has been updated from DX7 to support a list of + RIFF chunks. This will allow the time signature track to expand in the future. +*/ + +#define DMUS_FOURCC_TIMESIGTRACK_LIST mmioFOURCC('T','I','M','S') +#define DMUS_FOURCC_TIMESIG_CHUNK DMUS_FOURCC_TIMESIGNATURE_TRACK + +/* +LIST +( + 'TIMS' // Time Signature Track list-type + // Chunk containing an array of time signatures +) + + 'tims' + ( + // size of DMUS_IO_TIMESIGNATURE_ITEM : DWORD + ... + ) + +*/ + +/* DX8 Marker track. This is used to store valid start points and other + flow control parameters that may come later. For example, if we want + to implement more sophisticated looping and branching constructs, they + would live in this track. +*/ + +#define DMUS_FOURCC_MARKERTRACK_LIST mmioFOURCC('M','A','R','K') +#define DMUS_FOURCC_VALIDSTART_CHUNK mmioFOURCC('v','a','l','s') +#define DMUS_FOURCC_PLAYMARKER_CHUNK mmioFOURCC('p','l','a','y') + +/* io structures */ +typedef struct _DMUS_IO_VALID_START +{ + MUSIC_TIME mtTime; /* Time of a legal start. */ +} DMUS_IO_VALID_START; + +typedef struct _DMUS_IO_PLAY_MARKER +{ + MUSIC_TIME mtTime; /* Time of a next legal play point marker. */ +} DMUS_IO_PLAY_MARKER; + +/* +LIST +( + 'MARK' // Marker Track list-type + [] // Chunk containing an array of start points + [] // Chunk containing an array of play start markers +) + + 'vals' + ( + // size of DMUS_IO_VALID_START : DWORD + ... + ) + + 'play' + ( + // size of DMUS_IO_PLAY_MARKER : DWORD + ... + ) + +*/ + +/* segment trigger tracks */ + +/* RIFF ids: */ +#define DMUS_FOURCC_SEGTRACK_LIST mmioFOURCC('s','e','g','t') +#define DMUS_FOURCC_SEGTRACK_CHUNK mmioFOURCC('s','g','t','h') +#define DMUS_FOURCC_SEGMENTS_LIST mmioFOURCC('l','s','g','l') +#define DMUS_FOURCC_SEGMENT_LIST mmioFOURCC('l','s','e','g') +#define DMUS_FOURCC_SEGMENTITEM_CHUNK mmioFOURCC('s','g','i','h') +#define DMUS_FOURCC_SEGMENTITEMNAME_CHUNK mmioFOURCC('s','n','a','m') + +/* io structures */ +typedef struct _DMUS_IO_SEGMENT_TRACK_HEADER +{ + DWORD dwFlags; /* Reserved leave as 0. */ +} DMUS_IO_SEGMENT_TRACK_HEADER; + +typedef struct _DMUS_IO_SEGMENT_ITEM_HEADER +{ + MUSIC_TIME lTimeLogical; /* Position in track list. Time in the music with which the event is associated. */ + MUSIC_TIME lTimePhysical; /* Precise time event will be triggered. Should be close to logical time. */ + DWORD dwPlayFlags; /* Flags for PlaySegment(). */ + DWORD dwFlags; /* Flags. */ +} DMUS_IO_SEGMENT_ITEM_HEADER; + +/* values for dwflags field of DMUS_IO_SEGMENT_ITEM_HEADER */ +#define DMUS_SEGMENTTRACKF_MOTIF 1 /* interpret DMRF as link to style, and use snam as the name of a motif within the style */ + +/* +LIST +( + 'segt' // DirectMusic Segment Trigger Track form-type + [] // Segment track header + // List of Segment Lists +) + + // + 'sgth' + ( + + ) + + // + LIST + ( + 'lsgl' // Array of segments + ... // Each segment is encapsulated in a list (that way it can still be riff parsed.) + ) + + // + LIST + ( + 'lseg' + + // Link to a segment or style file. + [] // Name field. Used with DMUS_SEGMENTTRACKF_MOTIF flag. + ) + + // // segment item header + ( + // Segment item header + ) + + // + ( + // Name, stored as NULL terminated string of WCHARs + ) +*/ + +/* Script track. */ + +/* RIFF ids: */ +#define DMUS_FOURCC_SCRIPTTRACK_LIST mmioFOURCC('s','c','r','t') +#define DMUS_FOURCC_SCRIPTTRACKEVENTS_LIST mmioFOURCC('s','c','r','l') +#define DMUS_FOURCC_SCRIPTTRACKEVENT_LIST mmioFOURCC('s','c','r','e') +#define DMUS_FOURCC_SCRIPTTRACKEVENTHEADER_CHUNK mmioFOURCC('s','c','r','h') +#define DMUS_FOURCC_SCRIPTTRACKEVENTNAME_CHUNK mmioFOURCC('s','c','r','n') + +/* Flags for DMUS_IO_SCRIPTTRACK_TIMING + */ +#define DMUS_IO_SCRIPTTRACKF_PREPARE (1 << 0) /* Fire event in advance of time stamp, at Prepare time. This is the default because it leaves the script time to change the music happening at the target time. */ +#define DMUS_IO_SCRIPTTRACKF_QUEUE (1 << 1) /* Fire event just before time stamp, at Queue time. */ +#define DMUS_IO_SCRIPTTRACKF_ATTIME (1 << 2) /* Fire event right at the time stamp. */ + +typedef struct _DMUS_IO_SCRIPTTRACK_EVENTHEADER +{ + DWORD dwFlags; /* various bits (see DMUS_IO_SCRIPTTRACKF_*) */ + MUSIC_TIME lTimeLogical; /* Position in track list. Time in the music with which the event is associated. */ + MUSIC_TIME lTimePhysical; /* Precise time event will be triggered. Should be close to logical time. */ +} DMUS_IO_SCRIPTTRACK_EVENTHEADER; + +/* + // Script Track + + // + LIST + ( + // List of script events + ) + + // + LIST + ( + ... // Array of event descriptions + ) + + // + LIST + ( + // Event header chunk + + // Routine name + ) + + 'scrh' + ( + + ) + + 'scrn' + ( + // Name, stored as NULL terminated string of WCHARs + ) +*/ + +/* Lyrics/Notification track. */ + +/* RIFF ids: */ +#define DMUS_FOURCC_LYRICSTRACK_LIST mmioFOURCC('l','y','r','t') +#define DMUS_FOURCC_LYRICSTRACKEVENTS_LIST mmioFOURCC('l','y','r','l') +#define DMUS_FOURCC_LYRICSTRACKEVENT_LIST mmioFOURCC('l','y','r','e') +#define DMUS_FOURCC_LYRICSTRACKEVENTHEADER_CHUNK mmioFOURCC('l','y','r','h') +#define DMUS_FOURCC_LYRICSTRACKEVENTTEXT_CHUNK mmioFOURCC('l','y','r','n') + +typedef struct _DMUS_IO_LYRICSTRACK_EVENTHEADER +{ + DWORD dwFlags; /* Reserved leave as 0. */ + DWORD dwTimingFlags; /* Combination DMUS_PMSGF_TOOL_* flags. Determines the precise timing of when the notification happens. Invalid with the flag DMUS_PMSGF_REFTIME, DMUS_PMSGF_MUSICTIME, DMUS_PMSGF_TOOL_FLUSH, or DMUS_PMSGF_LOCKTOREFTIME. */ + MUSIC_TIME lTimeLogical; /* Position in track list. Time in the music with which the event is associated. */ + MUSIC_TIME lTimePhysical; /* Precise time event will be triggered. Should be close to logical time. */ +} DMUS_IO_LYRICSTRACK_EVENTHEADER; + +/* + // Lyrics/Notification Track + + // + LIST + ( + // List of notification events + ) + + // + LIST + ( + ... // Array of event descriptions + ) + + // + LIST + ( + // Event header chunk + // Notification text + ) + + 'lyrh' + ( + + ) + + 'lyrn' + ( + // Name, stored as NULL terminated string of WCHARs + ) +*/ + +/* Parameter control track */ + +/* RIFF ids: */ +#define DMUS_FOURCC_PARAMCONTROLTRACK_TRACK_LIST mmioFOURCC('p','r','m','t') +#define DMUS_FOURCC_PARAMCONTROLTRACK_OBJECT_LIST mmioFOURCC('p','r','o','l') +#define DMUS_FOURCC_PARAMCONTROLTRACK_OBJECT_CHUNK mmioFOURCC('p','r','o','h') +#define DMUS_FOURCC_PARAMCONTROLTRACK_PARAM_LIST mmioFOURCC('p','r','p','l') +#define DMUS_FOURCC_PARAMCONTROLTRACK_PARAM_CHUNK mmioFOURCC('p','r','p','h') +#define DMUS_FOURCC_PARAMCONTROLTRACK_CURVES_CHUNK mmioFOURCC('p','r','c','c') + +typedef struct _DMUS_IO_PARAMCONTROLTRACK_OBJECTHEADER +{ + DWORD dwFlags; /* Reserved. Must be zero. */ + GUID guidTimeFormat; /* Time format to set the object to. Must be GUID_TIME_REFERNCE or GUID_TIME_MUSIC from medparam.h. */ + /* Path for finding the object. These fields correspond to the first five parameters of IDirectMusicSegmentState::GetObjectInPath. */ + DWORD dwPChannel; + DWORD dwStage; + DWORD dwBuffer; + GUID guidObject; + DWORD dwIndex; +} DMUS_IO_PARAMCONTROLTRACK_OBJECTHEADER; + +typedef struct _DMUS_IO_PARAMCONTROLTRACK_PARAMHEADER +{ + DWORD dwFlags; /* Reserved. Must be zero. */ + DWORD dwIndex; /* Index number of the parameter on the object */ +} DMUS_IO_PARAMCONTROLTRACK_PARAMHEADER; + +typedef struct _DMUS_IO_PARAMCONTROLTRACK_CURVEINFO +{ + MUSIC_TIME mtStartTime; + MUSIC_TIME mtEndTime; + float fltStartValue; + float fltEndValue; + DWORD dwCurveType; /* One of the items from the MP_CURVE_TYPE enum in medparam.h */ + DWORD dwFlags; /* A combination of the MPF_ENVLP_* constants in medparam.h */ +} DMUS_IO_PARAMCONTROLTRACK_CURVEINFO; + +/* + // + LIST + ( + ... // one for each object + ) + + // + LIST + ( + // object header chunk + ... // one for each parameter + ) + + // + proh + ( + + ) + + // + LIST + ( + // parameter header chunk + // chunk containing an array of curves + ) + + // + prph + ( + + ) + + // + prcc + ( + // sizeof DMUS_IO_PARAMCONTROLTRACK_CURVEINFO:DWORD + ... // curves, sorted in order of mtTime + ) +*/ + +/* Melody formulation track */ +/* Note: Melody formulation file format is not supported in DX8. */ + +typedef DMUS_CONNECTION_RULE DMUS_IO_CONNECTION_RULE; /* defined in dmusici.h */ + +typedef DMUS_MELODY_FRAGMENT DMUS_IO_MELODY_FRAGMENT; /* defined in dmusici.h */ + +#define DMUS_FOURCC_MELODYFORM_TRACK_LIST mmioFOURCC( 'm', 'f', 'r', 'm' ) +#define DMUS_FOURCC_MELODYFORM_HEADER_CHUNK mmioFOURCC( 'm', 'l', 'f', 'h' ) +#define DMUS_FOURCC_MELODYFORM_BODY_CHUNK mmioFOURCC( 'm', 'l', 'f', 'b' ) + +typedef struct _DMUS_IO_MELFORM +{ + DWORD dwPlaymode; /* NOT CURRENTLY USED - MUST BE 0 */ +} DMUS_IO_MELFORM; + + +/* + // + LIST + ( + 'mfrm' + // Melody formulation header chunk + // Melody formulation body chunk + ) + + // + 'mlfb' + ( + + ) + + // + 'mlfb' + ( + //sizeof DMUS_IO_MELODY_FRAGMENT: DWORD + ... + ) + +*/ + +#if (DIRECTSOUND_VERSION >= 0x0800) + +/* DirectSoundBufferConfig FX Map */ + +/* RIFF ids: */ + +#define DMUS_FOURCC_DSBC_FORM mmioFOURCC('D','S','B','C') +#define DMUS_FOURCC_DSBD_CHUNK mmioFOURCC('d','s','b','d') +#define DMUS_FOURCC_BSID_CHUNK mmioFOURCC('b','s','i','d') +#define DMUS_FOURCC_DS3D_CHUNK mmioFOURCC('d','s','3','d') +#define DMUS_FOURCC_DSBC_LIST mmioFOURCC('f','x','l','s') +#define DMUS_FOURCC_DSFX_FORM mmioFOURCC('D','S','F','X') +#define DMUS_FOURCC_DSFX_CHUNK mmioFOURCC('f','x','h','r') +#define DMUS_FOURCC_DSFX_DATA mmioFOURCC('d','a','t','a') + +/* io structures */ + +typedef struct _DSOUND_IO_DSBUFFERDESC +{ + DWORD dwFlags; /* DirectSound buffer creation flags */ + WORD nChannels; /* No. of channels (rest of buffer format is determined by owning sink) */ + LONG lVolume; /* Initial pan; only used if CTRLVOLUME is specified */ + LONG lPan; /* Initial pan; only used if CTRLPAN is specified */ + DWORD dwReserved; /* Reserved - must be 0 */ +} DSOUND_IO_DSBUFFERDESC; + +typedef struct _DSOUND_IO_DSBUSID +{ + DWORD busid[1]; /* Array size determined from chunk size */ +} DSOUND_IO_DSBUSID; + +typedef struct _DSOUND_IO_3D +{ + GUID guid3DAlgorithm; /* GUID identifying the 3D algorithm to use (defined in dsound.h) */ + DS3DBUFFER ds3d; /* Initial 3D parameters */ +} DSOUND_IO_3D; + +typedef struct _DSOUND_IO_DXDMO_HEADER +{ + DWORD dwEffectFlags; /* Effect creation flags - equivalent to DSEFFECTDESC::dwFlags */ + GUID guidDSFXClass; /* GUID identifying the effect to use - corresponds to a COM CLSID */ + GUID guidReserved; /* Reserved - must be the null GUID */ + GUID guidSendBuffer; /* GUID identifying the buffer to send to if this is a send effect */ + DWORD dwReserved; /* Reserved - must be 0 */ +} DSOUND_IO_DXDMO_HEADER; + +typedef struct _DSOUND_IO_DXDMO_DATA +{ + DWORD data[1]; /* Array size determined by the DMO involved */ +} DSOUND_IO_DXDMO_DATA; + +/* +RIFF +( + 'DSBC' // DirectSoundBufferConfig chunk + [] // GUID identifier for this DirectSoundBufferConfig + [] // Optional version info + [] // Name, author, copyright info., comments + // DirectSound Buffer descriptor chunk + [] // Optional bus id array + [] // Optional 3d Parameters + [] // Optional list of FX descriptors +) + + // + 'guid' + ( + + ) + + // + 'vers' + ( + + ) + + // + 'dsbd' + ( + // Creation parameters and initial settings for the buffer + ) + + // + 'bsid' + ( + // The size of DSOUND_IO_DSBUSID is determined by the chunk size + ) + + // + 'ds3d' + ( + // Initial 3D buffer parameters: position, etc. + ) + + // + LIST + ( + 'fxls' // Array of DMO creation parameter blocks + ... // Each DMO is encapsulated in a RIFF chunk + ) + +// // DMOs can be embedded in a buffer configuration or stored as separate files +RIFF +( + 'DSFX' + // FX header chunk + [] // FX initial settings chunk +) + + // + 'fxhr' + ( + + ) + + // + 'data' + ( + // Opaque data block used by the DMO to load itself. + // For our standard included DMOs, this is simply the structure accepted by + // the DMO's SetAllParameters() method - e.g. struct DSFXChorus for Chorus. + ) +*/ + +#endif + +#ifdef __cplusplus +}; /* extern "C" */ +#endif + +#include + +#endif /* #ifndef _DMUSICF_ */ diff --git a/windows_libs/mssdk/include/dmusici.h b/windows_libs/mssdk/include/dmusici.h new file mode 100644 index 00000000..000232c9 --- /dev/null +++ b/windows_libs/mssdk/include/dmusici.h @@ -0,0 +1,1961 @@ +/************************************************************************ +* * +* dmusici.h -- This module contains the API for the * +* DirectMusic performance layer * +* * +* Copyright (c) 1998-1999 Microsoft Corporation +* * +************************************************************************/ + +#ifndef _DMUSICI_ +#define _DMUSICI_ + +#include + +#define COM_NO_WINDOWS_H +#include + +#include +#include +/* plugin (track and tool) interfaces. This #include will eventually go away. */ +#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef WORD TRANSITION_TYPE; +typedef __int64 REFERENCE_TIME; +typedef long MUSIC_TIME; + +#define MT_MIN 0x80000000 /* Minimum music time value. */ +#define MT_MAX 0x7FFFFFFF /* Maximum music time value. */ + +#define DMUS_PPQ 768 /* parts per quarter note */ + +interface IDirectMusicTrack; +interface IDirectMusicPerformance; +interface IDirectMusicPerformance8; +interface IDirectMusicTool; +interface IDirectMusicSegment; +interface IDirectMusicSegment8; +interface IDirectMusicSegmentState; +interface IDirectMusicSegmentState8; +interface IDirectMusicGraph; +interface IDirectMusicBuffer; +interface IDirectMusicInstrument; +interface IDirectMusicDownloadedInstrument; +interface IDirectMusicBand; +interface IDirectMusicChordMap; +interface IDirectMusicLoader; +interface IDirectMusicLoader8; +interface IDirectMusicScript; +interface IDirectMusicObject; +interface IDirectMusicStyle8; +interface IDirectMusicPatternTrack; +interface IDirectMusicContainer; +interface IDirectMusicTool8; +interface IDirectMusicTrack8; +interface IDirectMusicSong; +interface IDirectMusicAudioPath; +#ifndef __cplusplus +typedef interface IDirectMusicTrack IDirectMusicTrack; +typedef interface IDirectMusicPerformance IDirectMusicPerformance; +typedef interface IDirectMusicPerformance8 IDirectMusicPerformance8; +typedef interface IDirectMusicTool IDirectMusicTool; +typedef interface IDirectMusicSegment IDirectMusicSegment; +typedef interface IDirectMusicSegment8 IDirectMusicSegment8; +typedef interface IDirectMusicSegmentState IDirectMusicSegmentState; +typedef interface IDirectMusicSegmentState8 IDirectMusicSegmentState8; +typedef interface IDirectMusicGraph IDirectMusicGraph; +typedef interface IDirectMusicBuffer IDirectMusicBuffer; +typedef interface IDirectMusicInstrument IDirectMusicInstrument; +typedef interface IDirectMusicDownloadedInstrument IDirectMusicDownloadedInstrument; +typedef interface IDirectMusicBand IDirectMusicBand; +typedef interface IDirectMusicChordMap IDirectMusicChordMap; +typedef interface IDirectMusicObject IDirectMusicObject; +typedef interface IDirectMusicLoader IDirectMusicLoader; +typedef interface IDirectMusicLoader8 IDirectMusicLoader8; +typedef interface IDirectMusicScript IDirectMusicScript; +typedef interface IDirectMusicStyle8 IDirectMusicStyle8; +typedef interface IDirectMusicPatternTrack IDirectMusicPatternTrack; +typedef interface IDirectMusicContainer IDirectMusicContainer; +typedef interface IDirectMusicTool8 IDirectMusicTool8; +typedef interface IDirectMusicTrack8 IDirectMusicTrack8; +typedef interface IDirectMusicSong IDirectMusicSong; +typedef interface IDirectMusicAudioPath IDirectMusicAudioPath; +#endif + +typedef enum enumDMUS_STYLET_TYPES +{ + DMUS_STYLET_PATTERN = 0, + DMUS_STYLET_MOTIF = 1, + DMUS_STYLET_FRAGMENT = 2, +} DMUS_STYLET_TYPES; + + +typedef enum enumDMUS_COMMANDT_TYPES +{ + DMUS_COMMANDT_GROOVE = 0, + DMUS_COMMANDT_FILL = 1, + DMUS_COMMANDT_INTRO = 2, + DMUS_COMMANDT_BREAK = 3, + DMUS_COMMANDT_END = 4, + DMUS_COMMANDT_ENDANDINTRO = 5 +} DMUS_COMMANDT_TYPES; + +typedef enum enumDMUS_SHAPET_TYPES +{ + DMUS_SHAPET_FALLING = 0, + DMUS_SHAPET_LEVEL = 1, + DMUS_SHAPET_LOOPABLE = 2, + DMUS_SHAPET_LOUD = 3, + DMUS_SHAPET_QUIET = 4, + DMUS_SHAPET_PEAKING = 5, + DMUS_SHAPET_RANDOM = 6, + DMUS_SHAPET_RISING = 7, + DMUS_SHAPET_SONG = 8 +} DMUS_SHAPET_TYPES; + +typedef enum enumDMUS_COMPOSEF_FLAGS +{ + DMUS_COMPOSEF_NONE = 0, + DMUS_COMPOSEF_ALIGN = 0x1, + DMUS_COMPOSEF_OVERLAP = 0x2, + DMUS_COMPOSEF_IMMEDIATE = 0x4, + DMUS_COMPOSEF_GRID = 0x8, + DMUS_COMPOSEF_BEAT = 0x10, + DMUS_COMPOSEF_MEASURE = 0x20, + DMUS_COMPOSEF_AFTERPREPARETIME = 0x40, + DMUS_COMPOSEF_VALID_START_BEAT = 0x80, /* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur on any beat. */ + DMUS_COMPOSEF_VALID_START_GRID = 0x100, /* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur on any grid. */ + DMUS_COMPOSEF_VALID_START_TICK = 0x200, /* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur any time. */ + DMUS_COMPOSEF_SEGMENTEND = 0x400, /* Play the transition at the end of the current segment. */ + DMUS_COMPOSEF_MARKER = 0x800, /* Play the transition at the next marker in the current segment. */ + DMUS_COMPOSEF_MODULATE = 0x1000, + DMUS_COMPOSEF_LONG = 0x2000, + DMUS_COMPOSEF_ENTIRE_TRANSITION = 0x4000, /* play the entire transition pattern */ + DMUS_COMPOSEF_1BAR_TRANSITION = 0x8000, /* play one bar of the transition pattern */ + DMUS_COMPOSEF_ENTIRE_ADDITION = 0x10000, /* play the additional pattern in its entirety */ + DMUS_COMPOSEF_1BAR_ADDITION = 0x20000, /* play one bar of the additional pattern */ + DMUS_COMPOSEF_VALID_START_MEASURE = 0x40000, /* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur on any bar. */ + DMUS_COMPOSEF_DEFAULT = 0x80000, /* Use segment's default boundary */ + DMUS_COMPOSEF_NOINVALIDATE = 0x100000, /* Play without invalidating the currently playing segment(s) */ + DMUS_COMPOSEF_USE_AUDIOPATH = 0x200000 /* Uses the audio paths that are embedded in the segments */ +} DMUS_COMPOSEF_FLAGS; + +#define DMUS_PMSG_PART \ + DWORD dwSize; \ + REFERENCE_TIME rtTime; /* real time (in 100 nanosecond increments) */ \ + MUSIC_TIME mtTime; /* music time */ \ + DWORD dwFlags; /* various bits (see DMUS_PMSGF_FLAGS enumeration) */ \ + DWORD dwPChannel; /* Performance Channel. The Performance can */ \ + /* use this to determine the port/channel. */ \ + DWORD dwVirtualTrackID; /* virtual track ID */ \ + IDirectMusicTool* pTool; /* tool interface pointer */ \ + IDirectMusicGraph* pGraph; /* tool graph interface pointer */ \ + DWORD dwType; /* PMSG type (see DMUS_PMSGT_TYPES defines) */ \ + DWORD dwVoiceID; /* unique voice id which allows synthesizers to */ \ + /* identify a specific event. For DirectX 6.0, */ \ + /* this field should always be 0. */ \ + DWORD dwGroupID; /* Track group id */ \ + IUnknown* punkUser; /* user com pointer, auto released upon PMSG free */ + +/* every DMUS_PMSG is based off of this structure. The Performance needs + to access these members consistently in every PMSG that goes through it. */ +typedef struct _DMUS_PMSG +{ + /* begin DMUS_PMSG_PART */ + DMUS_PMSG_PART + /* end DMUS_PMSG_PART */ + +} DMUS_PMSG; + +#define DMUS_PCHANNEL_BROADCAST_PERFORMANCE 0xFFFFFFFF /* PMsg is sent on all PChannels of the performance. */ +#define DMUS_PCHANNEL_BROADCAST_AUDIOPATH 0xFFFFFFFE /* PMsg is sent on all PChannels of the audio path. */ +#define DMUS_PCHANNEL_BROADCAST_SEGMENT 0xFFFFFFFD /* PMsg is sent on all PChannels of the segment. */ +#define DMUS_PCHANNEL_BROADCAST_GROUPS 0xFFFFFFFC /* A duplicate PMsg is for each Channels Groups in the performance. */ + +/* The DMUS_PATH constants are used in conjunction with GetObjectInPath to find a requested + interface at a particular stage in the audio path. +*/ +#define DMUS_PATH_SEGMENT 0x1000 /* Get the segment itself (from a segment state.) */ +#define DMUS_PATH_SEGMENT_TRACK 0x1100 /* Look in Track List of Segment. */ +#define DMUS_PATH_SEGMENT_GRAPH 0x1200 /* Get the segment's tool graph. */ +#define DMUS_PATH_SEGMENT_TOOL 0x1300 /* Look in Tool Graph of Segment. */ +#define DMUS_PATH_AUDIOPATH 0x2000 /* Get the audiopath itself (from a segment state.) */ +#define DMUS_PATH_AUDIOPATH_GRAPH 0x2200 /* Get the audiopath's tool graph. */ +#define DMUS_PATH_AUDIOPATH_TOOL 0x2300 /* Look in Tool Graph of Audio Path. */ +#define DMUS_PATH_PERFORMANCE 0x3000 /* Access the performance. */ +#define DMUS_PATH_PERFORMANCE_GRAPH 0x3200 /* Get the performance's tool graph. */ +#define DMUS_PATH_PERFORMANCE_TOOL 0x3300 /* Look in Tool Graph of Performance. */ +#define DMUS_PATH_PORT 0x4000 /* Access the synth. */ +#define DMUS_PATH_BUFFER 0x6000 /* Look in DirectSoundBuffer. */ +#define DMUS_PATH_BUFFER_DMO 0x6100 /* Access a DMO in the buffer. */ +#define DMUS_PATH_MIXIN_BUFFER 0x7000 /* Look in a global mixin buffer. */ +#define DMUS_PATH_MIXIN_BUFFER_DMO 0x7100 /* Access a DMO in a global mixin buffer. */ +#define DMUS_PATH_PRIMARY_BUFFER 0x8000 /* Access the primary buffer. */ + +/* To ignore PChannels when calling GetObjectInPath(), use the DMUS_PCHANNEL_ALL constant. */ +#define DMUS_PCHANNEL_ALL 0xFFFFFFFB + +/* The DMUS_APATH types are used in conjunction with CreateStandardAudioPath to + build default path types. _SHARED_ means the same buffer is shared across multiple + instantiations of the audiopath type. _DYNAMIC_ means a unique buffer is created + every time. +*/ + +#define DMUS_APATH_SHARED_STEREOPLUSREVERB 1 /* A standard music set up with stereo outs and reverb. */ +#define DMUS_APATH_DYNAMIC_3D 6 /* An audio path with one dynamic bus from the synth feeding to a dynamic 3d buffer. Does not send to env reverb. */ +#define DMUS_APATH_DYNAMIC_MONO 7 /* An audio path with one dynamic bus from the synth feeding to a dynamic mono buffer. */ +#define DMUS_APATH_DYNAMIC_STEREO 8 /* An audio path with two dynamic buses from the synth feeding to a dynamic stereo buffer. */ + +typedef struct _DMUS_AUDIOPARAMS +{ + DWORD dwSize; /* Size of this structure. */ + BOOL fInitNow; /* If true, the sink and synth are created immediately and results returned in this structure. */ + DWORD dwValidData; /* Flags indicating which fields below are valid. */ + DWORD dwFeatures; /* Required DMUS_AUDIOF features. */ + DWORD dwVoices; /* Required number of voices. */ + DWORD dwSampleRate; /* Sample rate of synths and sink. */ + CLSID clsidDefaultSynth; /* Class ID of default synthesizer. */ +} DMUS_AUDIOPARAMS; + +/* dwFeatures flags. These indicate which features are required for the audio environment. */ +#define DMUS_AUDIOF_3D 0x1 /* Require 3D buffers. */ +#define DMUS_AUDIOF_ENVIRON 0x2 /* Require environmental modeling. */ +#define DMUS_AUDIOF_EAX 0x4 /* Require use of EAX effects. */ +#define DMUS_AUDIOF_DMOS 0x8 /* Require use of additional DMOs. */ +#define DMUS_AUDIOF_STREAMING 0x10 /* Require support for streaming waves. */ +#define DMUS_AUDIOF_BUFFERS 0x20 /* Require support for multiple buffers (all above cases need this.) */ +#define DMUS_AUDIOF_ALL 0x3F /* Requires everything. */ + +/* dwValidData flags. These indicate which fields in DMUS_AUDIOPARAMS have been filled in. If fInitNow is set, these also return what was allocated. */ +#define DMUS_AUDIOPARAMS_FEATURES 0x00000001 +#define DMUS_AUDIOPARAMS_VOICES 0x00000002 +#define DMUS_AUDIOPARAMS_SAMPLERATE 0x00000004 +#define DMUS_AUDIOPARAMS_DEFAULTSYNTH 0x00000008 + +/* DMUS_PMSGF_FLAGS fill the DMUS_PMSG's dwFlags member */ +typedef enum enumDMUS_PMSGF_FLAGS +{ + DMUS_PMSGF_REFTIME = 1, /* if rtTime is valid */ + DMUS_PMSGF_MUSICTIME = 2, /* if mtTime is valid */ + DMUS_PMSGF_TOOL_IMMEDIATE = 4, /* if PMSG should be processed immediately */ + DMUS_PMSGF_TOOL_QUEUE = 8, /* if PMSG should be processed a little early, at Queue time */ + DMUS_PMSGF_TOOL_ATTIME = 0x10, /* if PMSG should be processed at the time stamp */ + DMUS_PMSGF_TOOL_FLUSH = 0x20, /* if PMSG is being flushed */ + DMUS_PMSGF_LOCKTOREFTIME = 0x40, /* if rtTime can not be overriden by a tempo change. */ + DMUS_PMSGF_DX8 = 0x80 /* if the message has DX8 or later extensions. */ + /* The values of DMUS_TIME_RESOLVE_FLAGS may also be used inside the */ + /* DMUS_PMSG's dwFlags member. */ +} DMUS_PMSGF_FLAGS; + +/* DMUS_PMSGT_TYPES fill the DMUS_PMSG's dwType member */ +typedef enum enumDMUS_PMSGT_TYPES +{ + DMUS_PMSGT_MIDI = 0, /* MIDI short message */ + DMUS_PMSGT_NOTE = 1, /* Interactive Music Note */ + DMUS_PMSGT_SYSEX = 2, /* MIDI long message (system exclusive message) */ + DMUS_PMSGT_NOTIFICATION = 3, /* Notification message */ + DMUS_PMSGT_TEMPO = 4, /* Tempo message */ + DMUS_PMSGT_CURVE = 5, /* Control change / pitch bend, etc. curve */ + DMUS_PMSGT_TIMESIG = 6, /* Time signature */ + DMUS_PMSGT_PATCH = 7, /* Patch changes */ + DMUS_PMSGT_TRANSPOSE = 8, /* Transposition messages */ + DMUS_PMSGT_CHANNEL_PRIORITY = 9, /* Channel priority */ + DMUS_PMSGT_STOP = 10, /* Stop message */ + DMUS_PMSGT_DIRTY = 11, /* Tells Tools that cache GetParam() info to refresh */ + DMUS_PMSGT_WAVE = 12, /* Carries control information for playing a wave. */ + DMUS_PMSGT_LYRIC = 13, /* Lyric message from lyric track. */ + DMUS_PMSGT_SCRIPTLYRIC = 14, /* Lyric message sent by a script with the Trace function. */ + DMUS_PMSGT_USER = 255 /* User message */ +} DMUS_PMSGT_TYPES; + +/* DMUS_SEGF_FLAGS correspond to IDirectMusicPerformance::PlaySegment, and other API */ +typedef enum enumDMUS_SEGF_FLAGS +{ + DMUS_SEGF_REFTIME = 1<<6, /* 0x40 Time parameter is in reference time */ + DMUS_SEGF_SECONDARY = 1<<7, /* 0x80 Secondary segment */ + DMUS_SEGF_QUEUE = 1<<8, /* 0x100 Queue at the end of the primary segment queue (primary only) */ + DMUS_SEGF_CONTROL = 1<<9, /* 0x200 Play as a control track (secondary segments only) */ + DMUS_SEGF_AFTERPREPARETIME = 1<<10, /* 0x400 Play after the prepare time (See IDirectMusicPerformance::GetPrepareTime) */ + DMUS_SEGF_GRID = 1<<11, /* 0x800 Play on grid boundary */ + DMUS_SEGF_BEAT = 1<<12, /* 0x1000 Play on beat boundary */ + DMUS_SEGF_MEASURE = 1<<13, /* 0x2000 Play on measure boundary */ + DMUS_SEGF_DEFAULT = 1<<14, /* 0x4000 Use segment's default boundary */ + DMUS_SEGF_NOINVALIDATE = 1<<15, /* 0x8000 Play without invalidating the currently playing segment(s) */ + DMUS_SEGF_ALIGN = 1<<16, /* 0x10000 Align segment with requested boundary, but switch at first valid point */ + DMUS_SEGF_VALID_START_BEAT = 1<<17, /* 0x20000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur on any beat. */ + DMUS_SEGF_VALID_START_GRID = 1<<18, /* 0x40000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur on any grid. */ + DMUS_SEGF_VALID_START_TICK = 1<<19, /* 0x80000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur any time. */ + DMUS_SEGF_AUTOTRANSITION = 1<<20, /* 0x100000 Compose and play a transition segment, using either the transition template or transition embedded in song. */ + DMUS_SEGF_AFTERQUEUETIME = 1<<21, /* 0x200000 Make sure to play after the queue time. This is default for primary segments */ + DMUS_SEGF_AFTERLATENCYTIME = 1<<22, /* 0x400000 Make sure to play after the latency time. This is true for all segments, so this is a nop */ + DMUS_SEGF_SEGMENTEND = 1<<23, /* 0x800000 Play at the next end of segment. */ + DMUS_SEGF_MARKER = 1<<24, /* 0x1000000 Play at next marker in the primary segment. If there are no markers, default to any other resolution requests. */ + DMUS_SEGF_TIMESIG_ALWAYS = 1<<25, /* 0x2000000 Even if there is no primary segment, align start time with current time signature. */ + DMUS_SEGF_USE_AUDIOPATH = 1<<26, /* 0x4000000 Uses the audio path that is embedded in the segment or song. */ + DMUS_SEGF_VALID_START_MEASURE = 1<<27 /* 0x8000000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur on any bar. */ +} DMUS_SEGF_FLAGS; + +#define DMUS_SEG_REPEAT_INFINITE 0xFFFFFFFF /* For IDirectMusicSegment::SetRepeat*/ +#define DMUS_SEG_ALLTRACKS 0x80000000 /* For IDirectMusicSegment::SetParam() and SetTrackConfig() - selects all tracks instead on nth index. */ +#define DMUS_SEG_ANYTRACK 0x80000000 /* For IDirectMusicSegment::GetParam() - checks each track until it finds one that returns data (not DMUS_E_NOT_FOUND.) */ + + +/* DMUS_TIME_RESOLVE_FLAGS correspond to IDirectMusicPerformance::GetResolvedTime, and can */ +/* also be used interchangeably with the corresponding DMUS_SEGF_FLAGS, since their values */ +/* are intentionally the same */ +typedef enum enumDMUS_TIME_RESOLVE_FLAGS +{ + DMUS_TIME_RESOLVE_AFTERPREPARETIME = DMUS_SEGF_AFTERPREPARETIME, + DMUS_TIME_RESOLVE_AFTERQUEUETIME = DMUS_SEGF_AFTERQUEUETIME, + DMUS_TIME_RESOLVE_AFTERLATENCYTIME = DMUS_SEGF_AFTERLATENCYTIME, + DMUS_TIME_RESOLVE_GRID = DMUS_SEGF_GRID, + DMUS_TIME_RESOLVE_BEAT = DMUS_SEGF_BEAT, + DMUS_TIME_RESOLVE_MEASURE = DMUS_SEGF_MEASURE, + DMUS_TIME_RESOLVE_MARKER = DMUS_SEGF_MARKER, + DMUS_TIME_RESOLVE_SEGMENTEND = DMUS_SEGF_SEGMENTEND, +} DMUS_TIME_RESOLVE_FLAGS; + +/* The following flags are sent inside the DMUS_CHORD_KEY.dwFlags parameter */ +typedef enum enumDMUS_CHORDKEYF_FLAGS +{ + DMUS_CHORDKEYF_SILENT = 1, /* is the chord silent? */ +} DMUS_CHORDKEYF_FLAGS; + +#define DMUS_MAXSUBCHORD 8 + +typedef struct _DMUS_SUBCHORD +{ + DWORD dwChordPattern; /* Notes in the subchord */ + DWORD dwScalePattern; /* Notes in the scale */ + DWORD dwInversionPoints; /* Where inversions can occur */ + DWORD dwLevels; /* Which levels are supported by this subchord */ + BYTE bChordRoot; /* Root of the subchord */ + BYTE bScaleRoot; /* Root of the scale */ +} DMUS_SUBCHORD; + +typedef struct _DMUS_CHORD_KEY +{ + WCHAR wszName[16]; /* Name of the chord */ + WORD wMeasure; /* Measure this falls on */ + BYTE bBeat; /* Beat this falls on */ + BYTE bSubChordCount; /* Number of chords in the list of subchords */ + DMUS_SUBCHORD SubChordList[DMUS_MAXSUBCHORD]; /* List of sub chords */ + DWORD dwScale; /* Scale underlying the entire chord */ + BYTE bKey; /* Key underlying the entire chord */ + BYTE bFlags; /* Miscelaneous flags */ +} DMUS_CHORD_KEY; + +/* DMUS_NOTE_PMSG */ +typedef struct _DMUS_NOTE_PMSG +{ + /* begin DMUS_PMSG_PART */ + DMUS_PMSG_PART + /* end DMUS_PMSG_PART */ + + MUSIC_TIME mtDuration; /* duration */ + WORD wMusicValue; /* Description of note in chord and key. */ + WORD wMeasure; /* Measure in which this note occurs */ + short nOffset; /* Offset from grid at which this note occurs */ + BYTE bBeat; /* Beat (in measure) at which this note occurs */ + BYTE bGrid; /* Grid offset from beat at which this note occurs */ + BYTE bVelocity; /* Note velocity */ + BYTE bFlags; /* see DMUS_NOTEF_FLAGS */ + BYTE bTimeRange; /* Range to randomize time. */ + BYTE bDurRange; /* Range to randomize duration. */ + BYTE bVelRange; /* Range to randomize velocity. */ + BYTE bPlayModeFlags; /* Play mode */ + BYTE bSubChordLevel; /* Which subchord level this note uses. */ + BYTE bMidiValue; /* The MIDI note value, converted from wMusicValue */ + char cTranspose; /* Transposition to add to midi note value after converted from wMusicValue. */ +} DMUS_NOTE_PMSG; + +typedef enum enumDMUS_NOTEF_FLAGS +{ + DMUS_NOTEF_NOTEON = 1, /* Set if this is a MIDI Note On. Otherwise, it is MIDI Note Off */ + /* DX8 flags: */ + DMUS_NOTEF_NOINVALIDATE = 2, /* Don't invalidate this note off. */ + DMUS_NOTEF_NOINVALIDATE_INSCALE = 4,/* Don't invalidate if still within the scale. */ + DMUS_NOTEF_NOINVALIDATE_INCHORD = 8,/* Don't invalidate if still within the chord. */ + DMUS_NOTEF_REGENERATE = 0x10, /* Regenerate the note on an invalidate. */ +} DMUS_NOTEF_FLAGS; + +/* The DMUS_PLAYMODE_FLAGS are used to determine how to convert wMusicValue + into the appropriate bMidiValue. +*/ + +typedef enum enumDMUS_PLAYMODE_FLAGS +{ + DMUS_PLAYMODE_KEY_ROOT = 1, /* Transpose on top of the key root. */ + DMUS_PLAYMODE_CHORD_ROOT = 2, /* Transpose on top of the chord root. */ + DMUS_PLAYMODE_SCALE_INTERVALS = 4, /* Use scale intervals from scale pattern. */ + DMUS_PLAYMODE_CHORD_INTERVALS = 8, /* Use chord intervals from chord pattern. */ + DMUS_PLAYMODE_NONE = 16, /* No mode. Indicates the parent part's mode should be used. */ +} DMUS_PLAYMODE_FLAGS; + +/* The following are playback modes that can be created by combining the DMUS_PLAYMODE_FLAGS + in various ways: +*/ + +/* Fixed. wMusicValue holds final MIDI note value. This is used for drums, sound effects, and sequenced + notes that should not be transposed by the chord or scale. +*/ +#define DMUS_PLAYMODE_FIXED 0 +/* In fixed to key, the musicvalue is again a fixed MIDI value, but it + is transposed on top of the key root. +*/ +#define DMUS_PLAYMODE_FIXEDTOKEY DMUS_PLAYMODE_KEY_ROOT +/* In fixed to chord, the musicvalue is also a fixed MIDI value, but it + is transposed on top of the chord root. +*/ +#define DMUS_PLAYMODE_FIXEDTOCHORD DMUS_PLAYMODE_CHORD_ROOT +/* In Pedalpoint, the key root is used and the notes only track the intervals in + the scale. The chord root and intervals are completely ignored. This is useful + for melodic lines that play relative to the key root. +*/ +#define DMUS_PLAYMODE_PEDALPOINT (DMUS_PLAYMODE_KEY_ROOT | DMUS_PLAYMODE_SCALE_INTERVALS) +/* In the Melodic mode, the chord root is used but the notes only track the intervals in + the scale. The key root and chord intervals are completely ignored. This is useful + for melodic lines that play relative to the chord root. +*/ +#define DMUS_PLAYMODE_MELODIC (DMUS_PLAYMODE_CHORD_ROOT | DMUS_PLAYMODE_SCALE_INTERVALS) +/* Normal chord mode is the prevalent playback mode. + The notes track the intervals in the chord, which is based on the chord root. + If there is a scale component to the MusicValue, the additional intervals + are pulled from the scale and added. + If the chord does not have an interval to match the chord component of + the MusicValue, the note is silent. +*/ +#define DMUS_PLAYMODE_NORMALCHORD (DMUS_PLAYMODE_CHORD_ROOT | DMUS_PLAYMODE_CHORD_INTERVALS) +/* If it is desirable to play a note that is above the top of the chord, the + always play mode (known as "purpleized" in a former life) finds a position + for the note by using intervals from the scale. Essentially, this mode is + a combination of the Normal and Melodic playback modes, where a failure + in Normal causes a second try in Melodic mode. +*/ +#define DMUS_PLAYMODE_ALWAYSPLAY (DMUS_PLAYMODE_MELODIC | DMUS_PLAYMODE_NORMALCHORD) + +/* These playmodes are new for dx8. */ +/* In PedalpointChord, the key root is used and the notes only track the intervals in + the chord. The chord root and scale intervals are completely ignored. This is useful + for chordal lines that play relative to the key root. +*/ +#define DMUS_PLAYMODE_PEDALPOINTCHORD (DMUS_PLAYMODE_KEY_ROOT | DMUS_PLAYMODE_CHORD_INTERVALS) + +/* For completeness, here's a mode that tries for pedalpointchord, but if it fails + uses scale intervals +*/ +#define DMUS_PLAYMODE_PEDALPOINTALWAYS (DMUS_PLAYMODE_PEDALPOINT | DMUS_PLAYMODE_PEDALPOINTCHORD) + + +/* Legacy names for modes... */ +#define DMUS_PLAYMODE_PURPLEIZED DMUS_PLAYMODE_ALWAYSPLAY +#define DMUS_PLAYMODE_SCALE_ROOT DMUS_PLAYMODE_KEY_ROOT +#define DMUS_PLAYMODE_FIXEDTOSCALE DMUS_PLAYMODE_FIXEDTOKEY + + +/* DMUS_MIDI_PMSG */ +typedef struct _DMUS_MIDI_PMSG +{ + /* begin DMUS_PMSG_PART */ + DMUS_PMSG_PART + /* end DMUS_PMSG_PART */ + + BYTE bStatus; + BYTE bByte1; + BYTE bByte2; + BYTE bPad[1]; +} DMUS_MIDI_PMSG; + +/* DMUS_PATCH_PMSG */ +typedef struct _DMUS_PATCH_PMSG +{ + /* begin DMUS_PMSG_PART */ + DMUS_PMSG_PART + /* end DMUS_PMSG_PART */ + + BYTE byInstrument; + BYTE byMSB; + BYTE byLSB; + BYTE byPad[1]; +} DMUS_PATCH_PMSG; + +/* DMUS_TRANSPOSE_PMSG */ +typedef struct _DMUS_TRANSPOSE_PMSG +{ + /* begin DMUS_PMSG_PART */ + DMUS_PMSG_PART + /* end DMUS_PMSG_PART */ + + short nTranspose; + /* Following exists only under DX8 and on (check dwFlags for DMUS_PMSGF_DX8) */ + WORD wMergeIndex; /* Allows multiple parameters to be merged (pitchbend, volume, and expression.)*/ +} DMUS_TRANSPOSE_PMSG; + +/* DMUS_CHANNEL_PRIORITY_PMSG */ +typedef struct _DMUS_CHANNEL_PRIORITY_PMSG +{ + /* begin DMUS_PMSG_PART */ + DMUS_PMSG_PART + /* end DMUS_PMSG_PART */ + + DWORD dwChannelPriority; +} DMUS_CHANNEL_PRIORITY_PMSG; + +/* DMUS_TEMPO_PMSG */ +typedef struct _DMUS_TEMPO_PMSG +{ + /* begin DMUS_PMSG_PART */ + DMUS_PMSG_PART + /* end DMUS_PMSG_PART */ + + double dblTempo; /* the tempo */ +} DMUS_TEMPO_PMSG; + +#define DMUS_TEMPO_MAX 1000 +#define DMUS_TEMPO_MIN 1 + +#define DMUS_MASTERTEMPO_MAX 100.0f +#define DMUS_MASTERTEMPO_MIN 0.01f + +/* DMUS_SYSEX_PMSG */ +typedef struct _DMUS_SYSEX_PMSG +{ + /* begin DMUS_PMSG_PART */ + DMUS_PMSG_PART + /* end DMUS_PMSG_PART */ + + DWORD dwLen; /* length of the data */ + BYTE abData[1]; /* array of data, length equal to dwLen */ +} DMUS_SYSEX_PMSG; + +/* DMUS_CURVE_PMSG */ +typedef struct _DMUS_CURVE_PMSG +{ + /* begin DMUS_PMSG_PART */ + DMUS_PMSG_PART + /* end DMUS_PMSG_PART */ + + MUSIC_TIME mtDuration; /* how long this curve lasts */ + MUSIC_TIME mtOriginalStart; /* must be set to either zero when this PMSG is created or to the original mtTime of the curve */ + MUSIC_TIME mtResetDuration; /* how long after the curve is finished to allow a flush or + invalidation to reset to the reset value, nResetValue */ + short nStartValue; /* curve's start value */ + short nEndValue; /* curve's end value */ + short nResetValue; /* curve's reset value, set when a flush or invalidation + occurs within mtDuration + mtResetDuration */ + WORD wMeasure; /* Measure in which this curve occurs */ + short nOffset; /* Offset from grid at which this curve occurs */ + BYTE bBeat; /* Beat (in measure) at which this curve occurs */ + BYTE bGrid; /* Grid offset from beat at which this curve occurs */ + BYTE bType; /* type of curve */ + BYTE bCurveShape; /* shape of curve */ + BYTE bCCData; /* CC# if this is a control change type */ + BYTE bFlags; /* Curve reset and start from current value flags. */ + /* Following exists only under DX8 and on (check dwFlags for DMUS_PMSGF_DX8) */ + WORD wParamType; /* RPN or NRPN parameter number. */ + WORD wMergeIndex; /* Allows multiple parameters to be merged (pitchbend, volume, and expression.)*/ +} DMUS_CURVE_PMSG; + +typedef enum enumDMUS_CURVE_FLAGS +{ + DMUS_CURVE_RESET = 1, /* When set, the nResetValue must be sent when the + time is reached or an invalidate occurs because + of a transition. If not set, the curve stays + permanently stuck at the new value. */ + DMUS_CURVE_START_FROM_CURRENT = 2/* Ignore Start, start the curve at the current value. + This only works for volume, expression, and pitchbend. */ +} DMUS_CURVE_FLAGS; + + +#define DMUS_CURVE_RESET 1 + +/* Curve shapes */ +enum +{ + DMUS_CURVES_LINEAR = 0, + DMUS_CURVES_INSTANT = 1, + DMUS_CURVES_EXP = 2, + DMUS_CURVES_LOG = 3, + DMUS_CURVES_SINE = 4 +}; +/* curve types */ +#define DMUS_CURVET_PBCURVE 0x03 /* Pitch bend curve. */ +#define DMUS_CURVET_CCCURVE 0x04 /* Control change curve. */ +#define DMUS_CURVET_MATCURVE 0x05 /* Mono aftertouch curve. */ +#define DMUS_CURVET_PATCURVE 0x06 /* Poly aftertouch curve. */ +#define DMUS_CURVET_RPNCURVE 0x07 /* RPN curve with curve type in wParamType. */ +#define DMUS_CURVET_NRPNCURVE 0x08 /* NRPN curve with curve type in wParamType. */ + +/* DMUS_TIMESIG_PMSG */ +typedef struct _DMUS_TIMESIG_PMSG +{ + /* begin DMUS_PMSG_PART */ + DMUS_PMSG_PART + /* end DMUS_PMSG_PART */ + + /* Time signatures define how many beats per measure, which note receives */ + /* the beat, and the grid resolution. */ + BYTE bBeatsPerMeasure; /* beats per measure (top of time sig) */ + BYTE bBeat; /* what note receives the beat (bottom of time sig.) */ + /* we can assume that 0 means 256th note */ + WORD wGridsPerBeat; /* grids per beat */ +} DMUS_TIMESIG_PMSG; + + + +/* notification type values */ +/* The following correspond to GUID_NOTIFICATION_SEGMENT */ +#define DMUS_NOTIFICATION_SEGSTART 0 +#define DMUS_NOTIFICATION_SEGEND 1 +#define DMUS_NOTIFICATION_SEGALMOSTEND 2 +#define DMUS_NOTIFICATION_SEGLOOP 3 +#define DMUS_NOTIFICATION_SEGABORT 4 +/* The following correspond to GUID_NOTIFICATION_PERFORMANCE */ +#define DMUS_NOTIFICATION_MUSICSTARTED 0 +#define DMUS_NOTIFICATION_MUSICSTOPPED 1 +#define DMUS_NOTIFICATION_MUSICALMOSTEND 2 +/* The following corresponds to GUID_NOTIFICATION_MEASUREANDBEAT */ +#define DMUS_NOTIFICATION_MEASUREBEAT 0 +/* The following corresponds to GUID_NOTIFICATION_CHORD */ +#define DMUS_NOTIFICATION_CHORD 0 +/* The following correspond to GUID_NOTIFICATION_COMMAND */ +#define DMUS_NOTIFICATION_GROOVE 0 +#define DMUS_NOTIFICATION_EMBELLISHMENT 1 +/* The following corresponds to GUID_NOTIFICATION_RECOMPOSE */ +#define DMUS_NOTIFICATION_RECOMPOSE 0 + +/* DMUS_NOTIFICATION_PMSG */ +typedef struct _DMUS_NOTIFICATION_PMSG +{ + /* begin DMUS_PMSG_PART */ + DMUS_PMSG_PART + /* end DMUS_PMSG_PART */ + + GUID guidNotificationType; + DWORD dwNotificationOption; + DWORD dwField1; + DWORD dwField2; +} DMUS_NOTIFICATION_PMSG; + +/* DMUS_WAVE_PMSG */ +typedef struct _DMUS_WAVE_PMSG +{ + /* begin DMUS_PMSG_PART */ + DMUS_PMSG_PART + /* end DMUS_PMSG_PART */ + + REFERENCE_TIME rtStartOffset; /* How far into the wave to start, in reference time units only. */ + REFERENCE_TIME rtDuration; /* Duration of the wave, in either reference time or music time. */ + long lOffset; /* Offset from actual time to logical time, in music or ref time. */ + long lVolume; /* Initial volume, in 100ths of a dB. */ + long lPitch; /* Initial pitch, in 100ths of a semitone. */ + BYTE bFlags; /* Flags, including DMUS_WAVEF_OFF... */ +} DMUS_WAVE_PMSG; + +#define DMUS_WAVEF_OFF 1 /* If wave is playing and this is the off message. */ +#define DMUS_WAVEF_STREAMING 2 /* If wave is streaming. */ +#define DMUS_WAVEF_NOINVALIDATE 4 /* Don't invalidate this wave. */ + +/* DMUS_LYRIC_PMSG */ +typedef struct _DMUS_LYRIC_PMSG +{ + /* begin DMUS_PMSG_PART */ + DMUS_PMSG_PART + /* end DMUS_PMSG_PART */ + + WCHAR wszString[1]; /* null-terminated Unicode lyric string (structure is actually larger than size 1) */ +} DMUS_LYRIC_PMSG; + +#define DMUS_MAX_NAME 64 /* Maximum object name length. */ +#define DMUS_MAX_CATEGORY 64 /* Maximum object category name length. */ +#define DMUS_MAX_FILENAME MAX_PATH + +typedef struct _DMUS_VERSION { + DWORD dwVersionMS; + DWORD dwVersionLS; +}DMUS_VERSION, FAR *LPDMUS_VERSION; + +/* Time Signature structure, used by IDirectMusicStyle */ +/* Also used as a parameter for GetParam() and SetParam */ +typedef struct _DMUS_TIMESIGNATURE +{ + MUSIC_TIME mtTime; + BYTE bBeatsPerMeasure; /* beats per measure (top of time sig) */ + BYTE bBeat; /* what note receives the beat (bottom of time sig.) */ + /* we can assume that 0 means 256th note */ + WORD wGridsPerBeat; /* grids per beat */ +} DMUS_TIMESIGNATURE; + +typedef struct _DMUS_VALID_START_PARAM +{ + MUSIC_TIME mtTime; /* Time of the first legal start + point after (or including) the requested time. + This is a returned value. + Time format is the relative offset from requested time. */ +} DMUS_VALID_START_PARAM; + +typedef struct _DMUS_PLAY_MARKER_PARAM +{ + MUSIC_TIME mtTime; /* Time of the first legal segment play + marker before (or including) the requested time. + This is a returned value. + Time format is the relative offset from requested time. */ +} DMUS_PLAY_MARKER_PARAM; + +/* The DMUSOBJECTDESC structure is used to communicate everything you could */ +/* possibly use to describe a DirectMusic object. */ + +typedef struct _DMUS_OBJECTDESC +{ + DWORD dwSize; /* Size of this structure. */ + DWORD dwValidData; /* Flags indicating which fields below are valid. */ + GUID guidObject; /* Unique ID for this object. */ + GUID guidClass; /* GUID for the class of object. */ + FILETIME ftDate; /* Last edited date of object. */ + DMUS_VERSION vVersion; /* Version. */ + WCHAR wszName[DMUS_MAX_NAME]; /* Name of object. */ + WCHAR wszCategory[DMUS_MAX_CATEGORY]; /* Category for object (optional). */ + WCHAR wszFileName[DMUS_MAX_FILENAME]; /* File path. */ + LONGLONG llMemLength; /* Size of Memory data. */ + LPBYTE pbMemData; /* Memory pointer for data. */ + IStream * pStream; /* Stream with data. */ +} DMUS_OBJECTDESC; + +typedef DMUS_OBJECTDESC *LPDMUS_OBJECTDESC; + +/* Flags for dwValidData. When set, a flag indicates that the */ +/* corresponding field in DMUSOBJECTDESC holds valid data. */ + +#define DMUS_OBJ_OBJECT (1 << 0) /* Object GUID is valid. */ +#define DMUS_OBJ_CLASS (1 << 1) /* Class GUID is valid. */ +#define DMUS_OBJ_NAME (1 << 2) /* Name is valid. */ +#define DMUS_OBJ_CATEGORY (1 << 3) /* Category is valid. */ +#define DMUS_OBJ_FILENAME (1 << 4) /* File path is valid. */ +#define DMUS_OBJ_FULLPATH (1 << 5) /* Path is full path. */ +#define DMUS_OBJ_URL (1 << 6) /* Path is URL. */ +#define DMUS_OBJ_VERSION (1 << 7) /* Version is valid. */ +#define DMUS_OBJ_DATE (1 << 8) /* Date is valid. */ +#define DMUS_OBJ_LOADED (1 << 9) /* Object is currently loaded in memory. */ +#define DMUS_OBJ_MEMORY (1 << 10) /* Object is pointed to by pbMemData. */ +#define DMUS_OBJ_STREAM (1 << 11) /* Object is stored in pStream. */ + +/* The DMUS_SCRIPT_ERRORINFO structure describes an error that occurred in a script. + It is returned by methods in IDirectMusicScript. */ +typedef struct _DMUS_SCRIPT_ERRORINFO +{ + DWORD dwSize; /* Size of this structure. */ + HRESULT hr; + ULONG ulLineNumber; + LONG ichCharPosition; + WCHAR wszSourceFile[DMUS_MAX_FILENAME]; + WCHAR wszSourceComponent[DMUS_MAX_FILENAME]; + WCHAR wszDescription[DMUS_MAX_FILENAME]; + WCHAR wszSourceLineText[DMUS_MAX_FILENAME]; +} DMUS_SCRIPT_ERRORINFO; + +/* Track configuration flags, used with IDirectMusicSegment8::SetTrackConfig() */ + +#define DMUS_TRACKCONFIG_OVERRIDE_ALL 1 /* This track should get parameters from this segment before controlling and primary tracks. */ +#define DMUS_TRACKCONFIG_OVERRIDE_PRIMARY 2 /* This track should get parameters from this segment before the primary segment tracks. */ +#define DMUS_TRACKCONFIG_FALLBACK 4 /* This track should get parameters from this segment if the primary and controlling segments don't succeed. */ +#define DMUS_TRACKCONFIG_CONTROL_ENABLED 8 /* GetParam() enabled for this track. */ +#define DMUS_TRACKCONFIG_PLAY_ENABLED 0x10 /* Play() enabled for this track. */ +#define DMUS_TRACKCONFIG_NOTIFICATION_ENABLED 0x20 /* Notifications enabled for this track. */ +#define DMUS_TRACKCONFIG_PLAY_CLOCKTIME 0x40 /* This track plays in clock time, not music time. */ +#define DMUS_TRACKCONFIG_PLAY_COMPOSE 0x80 /* This track should regenerate data each time it starts playing. */ +#define DMUS_TRACKCONFIG_LOOP_COMPOSE 0x100 /* This track should regenerate data each time it repeats. */ +#define DMUS_TRACKCONFIG_COMPOSING 0x200 /* This track is used to compose other tracks. */ +#define DMUS_TRACKCONFIG_CONTROL_PLAY 0x10000 /* This track, when played in a controlling segment, overrides playback of primary segment tracks. */ +#define DMUS_TRACKCONFIG_CONTROL_NOTIFICATION 0x20000 /* This track, when played in a controlling segment, overrides notification of primary segment tracks. */ +/* Additional track config flags for composing transitions */ +#define DMUS_TRACKCONFIG_TRANS1_FROMSEGSTART 0x400 /* Get track info from start of From segment */ +#define DMUS_TRACKCONFIG_TRANS1_FROMSEGCURRENT 0x800 /* Get track info from current place in From segment */ +#define DMUS_TRACKCONFIG_TRANS1_TOSEGSTART 0x1000 /* Get track info from start of To segment */ +#define DMUS_TRACKCONFIG_DEFAULT (DMUS_TRACKCONFIG_CONTROL_ENABLED | DMUS_TRACKCONFIG_PLAY_ENABLED | DMUS_TRACKCONFIG_NOTIFICATION_ENABLED) + +/* #defines for melody fragments */ +/* Note: Melody formulation is not supported in DX8. */ + +#define DMUS_MAX_FRAGMENTLABEL 20 + +#define DMUS_FRAGMENTF_USE_REPEAT 0x1 +#define DMUS_FRAGMENTF_REJECT_REPEAT (0x1 << 1) +#define DMUS_FRAGMENTF_USE_LABEL (0x1 << 2) + +#define DMUS_CONNECTIONF_INTERVALS (0x1 << 1) /* Use transition intervals */ +#define DMUS_CONNECTIONF_OVERLAP (0x1 << 2) /* Use overlapping notes for transitions */ + +/* Get/SetParam structs for commands */ +/* PARAM structures, used by GetParam() and SetParam() */ +typedef struct _DMUS_COMMAND_PARAM +{ + BYTE bCommand; + BYTE bGrooveLevel; + BYTE bGrooveRange; + BYTE bRepeatMode; +} DMUS_COMMAND_PARAM; + +typedef struct _DMUS_COMMAND_PARAM_2 +{ + MUSIC_TIME mtTime; + BYTE bCommand; + BYTE bGrooveLevel; + BYTE bGrooveRange; + BYTE bRepeatMode; +} DMUS_COMMAND_PARAM_2; + +/* Get/SetParam structs for melody fragments */ +/* Note: Melody formulation is not supported in DX8. */ +typedef struct _DMUS_CONNECTION_RULE +{ + DWORD dwFlags; /* DMUS_CONNECTIONF_ flags */ + DWORD dwIntervals; /* Legal transition intervals (first 24 bits; two-octave range) */ +} DMUS_CONNECTION_RULE; + +typedef struct _DMUS_MELODY_FRAGMENT +{ + MUSIC_TIME mtTime; + DWORD dwID; /* This fragment's ID */ + WCHAR wszVariationLabel[DMUS_MAX_FRAGMENTLABEL]; /* Each style translates this into a set of variations (held in part ref) */ + DWORD dwVariationFlags; /* A set of variations */ + DWORD dwRepeatFragmentID; /* ID of a fragment to repeat */ + DWORD dwFragmentFlags; /* DMUS_FRAGMENTF_ flags */ + DWORD dwPlayModeFlags; /* NOT CURRENTLY USED - MUST BE 0 */ + DWORD dwTransposeIntervals; /* Legal transposition intervals (first 24 bits; two-octave range) */ + DMUS_COMMAND_PARAM Command; + DMUS_CONNECTION_RULE ConnectionArc; +} DMUS_MELODY_FRAGMENT; + +typedef IDirectMusicObject __RPC_FAR *LPDMUS_OBJECT; +typedef IDirectMusicLoader __RPC_FAR *LPDMUS_LOADER; +typedef IDirectMusicBand __RPC_FAR *LPDMUS_BAND; + +#define DMUSB_LOADED (1 << 0) /* Set when band has been loaded */ +#define DMUSB_DEFAULT (1 << 1) /* Set when band is default band for a style */ + +/*//////////////////////////////////////////////////////////////////// +// IDirectMusicBand */ +#undef INTERFACE +#define INTERFACE IDirectMusicBand +DECLARE_INTERFACE_(IDirectMusicBand, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicBand */ + STDMETHOD(CreateSegment) (THIS_ IDirectMusicSegment** ppSegment) PURE; + STDMETHOD(Download) (THIS_ IDirectMusicPerformance* pPerformance) PURE; + STDMETHOD(Unload) (THIS_ IDirectMusicPerformance* pPerformance) PURE; +}; + +typedef IDirectMusicBand IDirectMusicBand8; + +/*//////////////////////////////////////////////////////////////////// +// IDirectMusicObject */ +#undef INTERFACE +#define INTERFACE IDirectMusicObject +DECLARE_INTERFACE_(IDirectMusicObject, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicObject */ + STDMETHOD(GetDescriptor) (THIS_ LPDMUS_OBJECTDESC pDesc) PURE; + STDMETHOD(SetDescriptor) (THIS_ LPDMUS_OBJECTDESC pDesc) PURE; + STDMETHOD(ParseDescriptor) (THIS_ LPSTREAM pStream, + LPDMUS_OBJECTDESC pDesc) PURE; +}; + +typedef IDirectMusicObject IDirectMusicObject8; + +/*//////////////////////////////////////////////////////////////////// +// IDirectMusicLoader */ +#undef INTERFACE +#define INTERFACE IDirectMusicLoader +DECLARE_INTERFACE_(IDirectMusicLoader, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicLoader */ + STDMETHOD(GetObject) (THIS_ LPDMUS_OBJECTDESC pDesc, + REFIID riid, + LPVOID FAR *ppv) PURE; + STDMETHOD(SetObject) (THIS_ LPDMUS_OBJECTDESC pDesc) PURE; + STDMETHOD(SetSearchDirectory) (THIS_ REFGUID rguidClass, + WCHAR *pwzPath, + BOOL fClear) PURE; + STDMETHOD(ScanDirectory) (THIS_ REFGUID rguidClass, + WCHAR *pwzFileExtension, + WCHAR *pwzScanFileName) PURE; + STDMETHOD(CacheObject) (THIS_ IDirectMusicObject * pObject) PURE; + STDMETHOD(ReleaseObject) (THIS_ IDirectMusicObject * pObject) PURE; + STDMETHOD(ClearCache) (THIS_ REFGUID rguidClass) PURE; + STDMETHOD(EnableCache) (THIS_ REFGUID rguidClass, + BOOL fEnable) PURE; + STDMETHOD(EnumObject) (THIS_ REFGUID rguidClass, + DWORD dwIndex, + LPDMUS_OBJECTDESC pDesc) PURE; +}; + +/*//////////////////////////////////////////////////////////////////// +// IDirectMusicLoader8 */ +#undef INTERFACE +#define INTERFACE IDirectMusicLoader8 +DECLARE_INTERFACE_(IDirectMusicLoader8, IDirectMusicLoader) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicLoader */ + STDMETHOD(GetObject) (THIS_ LPDMUS_OBJECTDESC pDesc, + REFIID riid, + LPVOID FAR *ppv) PURE; + STDMETHOD(SetObject) (THIS_ LPDMUS_OBJECTDESC pDesc) PURE; + STDMETHOD(SetSearchDirectory) (THIS_ REFGUID rguidClass, + WCHAR *pwzPath, + BOOL fClear) PURE; + STDMETHOD(ScanDirectory) (THIS_ REFGUID rguidClass, + WCHAR *pwzFileExtension, + WCHAR *pwzScanFileName) PURE; + STDMETHOD(CacheObject) (THIS_ IDirectMusicObject * pObject) PURE; + STDMETHOD(ReleaseObject) (THIS_ IDirectMusicObject * pObject) PURE; + STDMETHOD(ClearCache) (THIS_ REFGUID rguidClass) PURE; + STDMETHOD(EnableCache) (THIS_ REFGUID rguidClass, + BOOL fEnable) PURE; + STDMETHOD(EnumObject) (THIS_ REFGUID rguidClass, + DWORD dwIndex, + LPDMUS_OBJECTDESC pDesc) PURE; + + /* IDirectMusicLoader8 */ + STDMETHOD_(void, CollectGarbage) (THIS) PURE; + STDMETHOD(ReleaseObjectByUnknown) (THIS_ IUnknown *pObject) PURE; + STDMETHOD(LoadObjectFromFile) (THIS_ REFGUID rguidClassID, + REFIID iidInterfaceID, + WCHAR *pwzFilePath, + void ** ppObject) PURE; +}; + +/* Stream object supports IDirectMusicGetLoader interface to access loader while file parsing. */ + +#undef INTERFACE +#define INTERFACE IDirectMusicGetLoader +DECLARE_INTERFACE_(IDirectMusicGetLoader, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicGetLoader */ + STDMETHOD(GetLoader) (THIS_ IDirectMusicLoader ** ppLoader) PURE; +}; + +typedef IDirectMusicGetLoader IDirectMusicGetLoader8; + +/*//////////////////////////////////////////////////////////////////// +// IDirectMusicSegment */ +#undef INTERFACE +#define INTERFACE IDirectMusicSegment +DECLARE_INTERFACE_(IDirectMusicSegment, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicSegment */ + STDMETHOD(GetLength) (THIS_ MUSIC_TIME* pmtLength) PURE; + STDMETHOD(SetLength) (THIS_ MUSIC_TIME mtLength) PURE; + STDMETHOD(GetRepeats) (THIS_ DWORD* pdwRepeats) PURE; + STDMETHOD(SetRepeats) (THIS_ DWORD dwRepeats) PURE; + STDMETHOD(GetDefaultResolution) (THIS_ DWORD* pdwResolution) PURE; + STDMETHOD(SetDefaultResolution) (THIS_ DWORD dwResolution) PURE; + STDMETHOD(GetTrack) (THIS_ REFGUID rguidType, + DWORD dwGroupBits, + DWORD dwIndex, + IDirectMusicTrack** ppTrack) PURE; + STDMETHOD(GetTrackGroup) (THIS_ IDirectMusicTrack* pTrack, + DWORD* pdwGroupBits) PURE; + STDMETHOD(InsertTrack) (THIS_ IDirectMusicTrack* pTrack, + DWORD dwGroupBits) PURE; + STDMETHOD(RemoveTrack) (THIS_ IDirectMusicTrack* pTrack) PURE; + STDMETHOD(InitPlay) (THIS_ IDirectMusicSegmentState** ppSegState, + IDirectMusicPerformance* pPerformance, + DWORD dwFlags) PURE; + STDMETHOD(GetGraph) (THIS_ IDirectMusicGraph** ppGraph) PURE; + STDMETHOD(SetGraph) (THIS_ IDirectMusicGraph* pGraph) PURE; + STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(RemoveNotificationType) (THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(GetParam) (THIS_ REFGUID rguidType, + DWORD dwGroupBits, + DWORD dwIndex, + MUSIC_TIME mtTime, + MUSIC_TIME* pmtNext, + void* pParam) PURE; + STDMETHOD(SetParam) (THIS_ REFGUID rguidType, + DWORD dwGroupBits, + DWORD dwIndex, + MUSIC_TIME mtTime, + void* pParam) PURE; + STDMETHOD(Clone) (THIS_ MUSIC_TIME mtStart, + MUSIC_TIME mtEnd, + IDirectMusicSegment** ppSegment) PURE; + STDMETHOD(SetStartPoint) (THIS_ MUSIC_TIME mtStart) PURE; + STDMETHOD(GetStartPoint) (THIS_ MUSIC_TIME* pmtStart) PURE; + STDMETHOD(SetLoopPoints) (THIS_ MUSIC_TIME mtStart, + MUSIC_TIME mtEnd) PURE; + STDMETHOD(GetLoopPoints) (THIS_ MUSIC_TIME* pmtStart, + MUSIC_TIME* pmtEnd) PURE; + STDMETHOD(SetPChannelsUsed) (THIS_ DWORD dwNumPChannels, + DWORD* paPChannels) PURE; +}; + +/*//////////////////////////////////////////////////////////////////// +// IDirectMusicSegment8 */ +#undef INTERFACE +#define INTERFACE IDirectMusicSegment8 +DECLARE_INTERFACE_(IDirectMusicSegment8, IDirectMusicSegment) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicSegment */ + STDMETHOD(GetLength) (THIS_ MUSIC_TIME* pmtLength) PURE; + STDMETHOD(SetLength) (THIS_ MUSIC_TIME mtLength) PURE; + STDMETHOD(GetRepeats) (THIS_ DWORD* pdwRepeats) PURE; + STDMETHOD(SetRepeats) (THIS_ DWORD dwRepeats) PURE; + STDMETHOD(GetDefaultResolution) (THIS_ DWORD* pdwResolution) PURE; + STDMETHOD(SetDefaultResolution) (THIS_ DWORD dwResolution) PURE; + STDMETHOD(GetTrack) (THIS_ REFGUID rguidType, + DWORD dwGroupBits, + DWORD dwIndex, + IDirectMusicTrack** ppTrack) PURE; + STDMETHOD(GetTrackGroup) (THIS_ IDirectMusicTrack* pTrack, + DWORD* pdwGroupBits) PURE; + STDMETHOD(InsertTrack) (THIS_ IDirectMusicTrack* pTrack, + DWORD dwGroupBits) PURE; + STDMETHOD(RemoveTrack) (THIS_ IDirectMusicTrack* pTrack) PURE; + STDMETHOD(InitPlay) (THIS_ IDirectMusicSegmentState** ppSegState, + IDirectMusicPerformance* pPerformance, + DWORD dwFlags) PURE; + STDMETHOD(GetGraph) (THIS_ IDirectMusicGraph** ppGraph) PURE; + STDMETHOD(SetGraph) (THIS_ IDirectMusicGraph* pGraph) PURE; + STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(RemoveNotificationType) (THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(GetParam) (THIS_ REFGUID rguidType, + DWORD dwGroupBits, + DWORD dwIndex, + MUSIC_TIME mtTime, + MUSIC_TIME* pmtNext, + void* pParam) PURE; + STDMETHOD(SetParam) (THIS_ REFGUID rguidType, + DWORD dwGroupBits, + DWORD dwIndex, + MUSIC_TIME mtTime, + void* pParam) PURE; + STDMETHOD(Clone) (THIS_ MUSIC_TIME mtStart, + MUSIC_TIME mtEnd, + IDirectMusicSegment** ppSegment) PURE; + STDMETHOD(SetStartPoint) (THIS_ MUSIC_TIME mtStart) PURE; + STDMETHOD(GetStartPoint) (THIS_ MUSIC_TIME* pmtStart) PURE; + STDMETHOD(SetLoopPoints) (THIS_ MUSIC_TIME mtStart, + MUSIC_TIME mtEnd) PURE; + STDMETHOD(GetLoopPoints) (THIS_ MUSIC_TIME* pmtStart, + MUSIC_TIME* pmtEnd) PURE; + STDMETHOD(SetPChannelsUsed) (THIS_ DWORD dwNumPChannels, + DWORD* paPChannels) PURE; + /* IDirectMusicSegment8 */ + STDMETHOD(SetTrackConfig) (THIS_ REFGUID rguidTrackClassID, /* Class ID of the type of track on which to set the configuration flags. */ + DWORD dwGroupBits, /* Group bits. */ + DWORD dwIndex, /* Nth track (or DMUS_SEG_ALLTRACKS) that matches class id and group id. */ + DWORD dwFlagsOn, /* DMUS_TRACKCONFIG_ flags to enable. */ + DWORD dwFlagsOff) PURE; /* DMUS_TRACKCONFIG_ flags to disable. */ + STDMETHOD(GetAudioPathConfig) (THIS_ IUnknown ** ppAudioPathConfig) PURE; + STDMETHOD(Compose) (THIS_ MUSIC_TIME mtTime, + IDirectMusicSegment* pFromSegment, + IDirectMusicSegment* pToSegment, + IDirectMusicSegment** ppComposedSegment) PURE; + STDMETHOD(Download) (THIS_ IUnknown *pAudioPath) PURE; + STDMETHOD(Unload) (THIS_ IUnknown *pAudioPath) PURE; +}; + +/*///////////////////////////////////////////////////////////////////// +// IDirectMusicSegmentState */ +#undef INTERFACE +#define INTERFACE IDirectMusicSegmentState +DECLARE_INTERFACE_(IDirectMusicSegmentState, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicSegmentState */ + STDMETHOD(GetRepeats) (THIS_ DWORD* pdwRepeats) PURE; + STDMETHOD(GetSegment ) (THIS_ IDirectMusicSegment** ppSegment) PURE; + STDMETHOD(GetStartTime) (THIS_ MUSIC_TIME* pmtStart) PURE; + STDMETHOD(GetSeek) (THIS_ MUSIC_TIME* pmtSeek) PURE; + STDMETHOD(GetStartPoint) (THIS_ MUSIC_TIME* pmtStart) PURE; +}; + +/*///////////////////////////////////////////////////////////////////// +// IDirectMusicSegmentState8 */ +#undef INTERFACE +#define INTERFACE IDirectMusicSegmentState8 +DECLARE_INTERFACE_(IDirectMusicSegmentState8, IDirectMusicSegmentState) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicSegmentState */ + STDMETHOD(GetRepeats) (THIS_ DWORD* pdwRepeats) PURE; + STDMETHOD(GetSegment ) (THIS_ IDirectMusicSegment** ppSegment) PURE; + STDMETHOD(GetStartTime) (THIS_ MUSIC_TIME* pmtStart) PURE; + STDMETHOD(GetSeek) (THIS_ MUSIC_TIME* pmtSeek) PURE; + STDMETHOD(GetStartPoint) (THIS_ MUSIC_TIME* pmtStart) PURE; + + /* IDirectMusicSegmentState8 */ + STDMETHOD(SetTrackConfig) (THIS_ REFGUID rguidTrackClassID, /* Class ID of the type of track on which to set the configuration flags. */ + DWORD dwGroupBits, /* Group bits. */ + DWORD dwIndex, /* Nth track (or DMUS_SEG_ALLTRACKS) that matches class id and group id. */ + DWORD dwFlagsOn, /* DMUS_TRACKCONFIG_ flags to enable. */ + DWORD dwFlagsOff) PURE; /* DMUS_TRACKCONFIG_ flags to disable. */ + STDMETHOD(GetObjectInPath) (THIS_ DWORD dwPChannel, /* PChannel to search. */ + DWORD dwStage, /* Which stage in the path. */ + DWORD dwBuffer, /* Which buffer to address, if more than one. */ + REFGUID guidObject, /* ClassID of object. */ + DWORD dwIndex, /* Which object of that class. */ + REFGUID iidInterface,/* Requested COM interface. */ + void ** ppObject) PURE; /* Pointer to interface. */ +}; + +/*//////////////////////////////////////////////////////////////////// +// IDirectMusicAudioPath */ +#undef INTERFACE +#define INTERFACE IDirectMusicAudioPath +DECLARE_INTERFACE_(IDirectMusicAudioPath, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicAudioPath */ + STDMETHOD(GetObjectInPath) (THIS_ DWORD dwPChannel, /* PChannel to search. */ + DWORD dwStage, /* Which stage in the path. */ + DWORD dwBuffer, /* Which buffer to address, if more than one. */ + REFGUID guidObject, /* ClassID of object. */ + DWORD dwIndex, /* Which object of that class. */ + REFGUID iidInterface,/* Requested COM interface. */ + void ** ppObject) PURE; /* Pointer to interface. */ + STDMETHOD(Activate) (THIS_ BOOL fActivate) PURE;/* True to activate, False to deactivate. */ + STDMETHOD(SetVolume) (THIS_ long lVolume, /* Gain, in 100ths of a dB. This must be negative (0 represents full volume.) */ + DWORD dwDuration) PURE;/* Duration of volume ramp in milliseconds. Note that 0 is more efficient. */ + STDMETHOD(ConvertPChannel) (THIS_ DWORD dwPChannelIn, /* Pchannel of source. */ + DWORD *pdwPChannelOut) PURE; /* Equivalent pchannel on performance. */ +}; + +typedef IDirectMusicAudioPath IDirectMusicAudioPath8; + +/*//////////////////////////////////////////////////////////////////// +// IDirectMusicPerformance */ +#undef INTERFACE +#define INTERFACE IDirectMusicPerformance +DECLARE_INTERFACE_(IDirectMusicPerformance, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicPerformance */ + STDMETHOD(Init) (THIS_ IDirectMusic** ppDirectMusic, + LPDIRECTSOUND pDirectSound, + HWND hWnd) PURE; + STDMETHOD(PlaySegment) (THIS_ IDirectMusicSegment* pSegment, + DWORD dwFlags, + __int64 i64StartTime, + IDirectMusicSegmentState** ppSegmentState) PURE; + STDMETHOD(Stop) (THIS_ IDirectMusicSegment* pSegment, + IDirectMusicSegmentState* pSegmentState, + MUSIC_TIME mtTime, + DWORD dwFlags) PURE; + STDMETHOD(GetSegmentState) (THIS_ IDirectMusicSegmentState** ppSegmentState, + MUSIC_TIME mtTime) PURE; + STDMETHOD(SetPrepareTime) (THIS_ DWORD dwMilliSeconds) PURE; + STDMETHOD(GetPrepareTime) (THIS_ DWORD* pdwMilliSeconds) PURE; + STDMETHOD(SetBumperLength) (THIS_ DWORD dwMilliSeconds) PURE; + STDMETHOD(GetBumperLength) (THIS_ DWORD* pdwMilliSeconds) PURE; + STDMETHOD(SendPMsg) (THIS_ DMUS_PMSG* pPMSG) PURE; + STDMETHOD(MusicToReferenceTime) (THIS_ MUSIC_TIME mtTime, + REFERENCE_TIME* prtTime) PURE; + STDMETHOD(ReferenceToMusicTime) (THIS_ REFERENCE_TIME rtTime, + MUSIC_TIME* pmtTime) PURE; + STDMETHOD(IsPlaying) (THIS_ IDirectMusicSegment* pSegment, + IDirectMusicSegmentState* pSegState) PURE; + STDMETHOD(GetTime) (THIS_ REFERENCE_TIME* prtNow, + MUSIC_TIME* pmtNow) PURE; + STDMETHOD(AllocPMsg) (THIS_ ULONG cb, + DMUS_PMSG** ppPMSG) PURE; + STDMETHOD(FreePMsg) (THIS_ DMUS_PMSG* pPMSG) PURE; + STDMETHOD(GetGraph) (THIS_ IDirectMusicGraph** ppGraph) PURE; + STDMETHOD(SetGraph) (THIS_ IDirectMusicGraph* pGraph) PURE; + STDMETHOD(SetNotificationHandle)(THIS_ HANDLE hNotification, + REFERENCE_TIME rtMinimum) PURE; + STDMETHOD(GetNotificationPMsg) (THIS_ DMUS_NOTIFICATION_PMSG** ppNotificationPMsg) PURE; + STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(RemoveNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(AddPort) (THIS_ IDirectMusicPort* pPort) PURE; + STDMETHOD(RemovePort) (THIS_ IDirectMusicPort* pPort ) PURE; + STDMETHOD(AssignPChannelBlock) (THIS_ DWORD dwBlockNum, + IDirectMusicPort* pPort, + DWORD dwGroup ) PURE; + STDMETHOD(AssignPChannel) (THIS_ DWORD dwPChannel, + IDirectMusicPort* pPort, + DWORD dwGroup, + DWORD dwMChannel ) PURE; + STDMETHOD(PChannelInfo) (THIS_ DWORD dwPChannel, + IDirectMusicPort** ppPort, + DWORD* pdwGroup, + DWORD* pdwMChannel ) PURE; + STDMETHOD(DownloadInstrument) (THIS_ IDirectMusicInstrument* pInst, + DWORD dwPChannel, + IDirectMusicDownloadedInstrument** ppDownInst, + DMUS_NOTERANGE* pNoteRanges, + DWORD dwNumNoteRanges, + IDirectMusicPort** ppPort, + DWORD* pdwGroup, + DWORD* pdwMChannel ) PURE; + STDMETHOD(Invalidate) (THIS_ MUSIC_TIME mtTime, + DWORD dwFlags) PURE; + STDMETHOD(GetParam) (THIS_ REFGUID rguidType, + DWORD dwGroupBits, + DWORD dwIndex, + MUSIC_TIME mtTime, + MUSIC_TIME* pmtNext, + void* pParam) PURE; + STDMETHOD(SetParam) (THIS_ REFGUID rguidType, + DWORD dwGroupBits, + DWORD dwIndex, + MUSIC_TIME mtTime, + void* pParam) PURE; + STDMETHOD(GetGlobalParam) (THIS_ REFGUID rguidType, + void* pParam, + DWORD dwSize) PURE; + STDMETHOD(SetGlobalParam) (THIS_ REFGUID rguidType, + void* pParam, + DWORD dwSize) PURE; + STDMETHOD(GetLatencyTime) (THIS_ REFERENCE_TIME* prtTime) PURE; + STDMETHOD(GetQueueTime) (THIS_ REFERENCE_TIME* prtTime) PURE; + STDMETHOD(AdjustTime) (THIS_ REFERENCE_TIME rtAmount) PURE; + STDMETHOD(CloseDown) (THIS) PURE; + STDMETHOD(GetResolvedTime) (THIS_ REFERENCE_TIME rtTime, + REFERENCE_TIME* prtResolved, + DWORD dwTimeResolveFlags) PURE; + STDMETHOD(MIDIToMusic) (THIS_ BYTE bMIDIValue, + DMUS_CHORD_KEY* pChord, + BYTE bPlayMode, + BYTE bChordLevel, + WORD *pwMusicValue) PURE; + STDMETHOD(MusicToMIDI) (THIS_ WORD wMusicValue, + DMUS_CHORD_KEY* pChord, + BYTE bPlayMode, + BYTE bChordLevel, + BYTE *pbMIDIValue) PURE; + STDMETHOD(TimeToRhythm) (THIS_ MUSIC_TIME mtTime, + DMUS_TIMESIGNATURE *pTimeSig, + WORD *pwMeasure, + BYTE *pbBeat, + BYTE *pbGrid, + short *pnOffset) PURE; + STDMETHOD(RhythmToTime) (THIS_ WORD wMeasure, + BYTE bBeat, + BYTE bGrid, + short nOffset, + DMUS_TIMESIGNATURE *pTimeSig, + MUSIC_TIME *pmtTime) PURE; +}; + +/*//////////////////////////////////////////////////////////////////// +// IDirectMusicPerformance8 */ +#undef INTERFACE +#define INTERFACE IDirectMusicPerformance8 +DECLARE_INTERFACE_(IDirectMusicPerformance8, IDirectMusicPerformance) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicPerformance */ + STDMETHOD(Init) (THIS_ IDirectMusic** ppDirectMusic, + LPDIRECTSOUND pDirectSound, + HWND hWnd) PURE; + STDMETHOD(PlaySegment) (THIS_ IDirectMusicSegment* pSegment, + DWORD dwFlags, + __int64 i64StartTime, + IDirectMusicSegmentState** ppSegmentState) PURE; + STDMETHOD(Stop) (THIS_ IDirectMusicSegment* pSegment, + IDirectMusicSegmentState* pSegmentState, + MUSIC_TIME mtTime, + DWORD dwFlags) PURE; + STDMETHOD(GetSegmentState) (THIS_ IDirectMusicSegmentState** ppSegmentState, + MUSIC_TIME mtTime) PURE; + STDMETHOD(SetPrepareTime) (THIS_ DWORD dwMilliSeconds) PURE; + STDMETHOD(GetPrepareTime) (THIS_ DWORD* pdwMilliSeconds) PURE; + STDMETHOD(SetBumperLength) (THIS_ DWORD dwMilliSeconds) PURE; + STDMETHOD(GetBumperLength) (THIS_ DWORD* pdwMilliSeconds) PURE; + STDMETHOD(SendPMsg) (THIS_ DMUS_PMSG* pPMSG) PURE; + STDMETHOD(MusicToReferenceTime) (THIS_ MUSIC_TIME mtTime, + REFERENCE_TIME* prtTime) PURE; + STDMETHOD(ReferenceToMusicTime) (THIS_ REFERENCE_TIME rtTime, + MUSIC_TIME* pmtTime) PURE; + STDMETHOD(IsPlaying) (THIS_ IDirectMusicSegment* pSegment, + IDirectMusicSegmentState* pSegState) PURE; + STDMETHOD(GetTime) (THIS_ REFERENCE_TIME* prtNow, + MUSIC_TIME* pmtNow) PURE; + STDMETHOD(AllocPMsg) (THIS_ ULONG cb, + DMUS_PMSG** ppPMSG) PURE; + STDMETHOD(FreePMsg) (THIS_ DMUS_PMSG* pPMSG) PURE; + STDMETHOD(GetGraph) (THIS_ IDirectMusicGraph** ppGraph) PURE; + STDMETHOD(SetGraph) (THIS_ IDirectMusicGraph* pGraph) PURE; + STDMETHOD(SetNotificationHandle)(THIS_ HANDLE hNotification, + REFERENCE_TIME rtMinimum) PURE; + STDMETHOD(GetNotificationPMsg) (THIS_ DMUS_NOTIFICATION_PMSG** ppNotificationPMsg) PURE; + STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(RemoveNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(AddPort) (THIS_ IDirectMusicPort* pPort) PURE; + STDMETHOD(RemovePort) (THIS_ IDirectMusicPort* pPort ) PURE; + STDMETHOD(AssignPChannelBlock) (THIS_ DWORD dwBlockNum, + IDirectMusicPort* pPort, + DWORD dwGroup ) PURE; + STDMETHOD(AssignPChannel) (THIS_ DWORD dwPChannel, + IDirectMusicPort* pPort, + DWORD dwGroup, + DWORD dwMChannel ) PURE; + STDMETHOD(PChannelInfo) (THIS_ DWORD dwPChannel, + IDirectMusicPort** ppPort, + DWORD* pdwGroup, + DWORD* pdwMChannel ) PURE; + STDMETHOD(DownloadInstrument) (THIS_ IDirectMusicInstrument* pInst, + DWORD dwPChannel, + IDirectMusicDownloadedInstrument** ppDownInst, + DMUS_NOTERANGE* pNoteRanges, + DWORD dwNumNoteRanges, + IDirectMusicPort** ppPort, + DWORD* pdwGroup, + DWORD* pdwMChannel ) PURE; + STDMETHOD(Invalidate) (THIS_ MUSIC_TIME mtTime, + DWORD dwFlags) PURE; + STDMETHOD(GetParam) (THIS_ REFGUID rguidType, + DWORD dwGroupBits, + DWORD dwIndex, + MUSIC_TIME mtTime, + MUSIC_TIME* pmtNext, + void* pParam) PURE; + STDMETHOD(SetParam) (THIS_ REFGUID rguidType, + DWORD dwGroupBits, + DWORD dwIndex, + MUSIC_TIME mtTime, + void* pParam) PURE; + STDMETHOD(GetGlobalParam) (THIS_ REFGUID rguidType, + void* pParam, + DWORD dwSize) PURE; + STDMETHOD(SetGlobalParam) (THIS_ REFGUID rguidType, + void* pParam, + DWORD dwSize) PURE; + STDMETHOD(GetLatencyTime) (THIS_ REFERENCE_TIME* prtTime) PURE; + STDMETHOD(GetQueueTime) (THIS_ REFERENCE_TIME* prtTime) PURE; + STDMETHOD(AdjustTime) (THIS_ REFERENCE_TIME rtAmount) PURE; + STDMETHOD(CloseDown) (THIS) PURE; + STDMETHOD(GetResolvedTime) (THIS_ REFERENCE_TIME rtTime, + REFERENCE_TIME* prtResolved, + DWORD dwTimeResolveFlags) PURE; + STDMETHOD(MIDIToMusic) (THIS_ BYTE bMIDIValue, + DMUS_CHORD_KEY* pChord, + BYTE bPlayMode, + BYTE bChordLevel, + WORD *pwMusicValue) PURE; + STDMETHOD(MusicToMIDI) (THIS_ WORD wMusicValue, + DMUS_CHORD_KEY* pChord, + BYTE bPlayMode, + BYTE bChordLevel, + BYTE *pbMIDIValue) PURE; + STDMETHOD(TimeToRhythm) (THIS_ MUSIC_TIME mtTime, + DMUS_TIMESIGNATURE *pTimeSig, + WORD *pwMeasure, + BYTE *pbBeat, + BYTE *pbGrid, + short *pnOffset) PURE; + STDMETHOD(RhythmToTime) (THIS_ WORD wMeasure, + BYTE bBeat, + BYTE bGrid, + short nOffset, + DMUS_TIMESIGNATURE *pTimeSig, + MUSIC_TIME *pmtTime) PURE; + /* IDirectMusicPerformance8 */ + STDMETHOD(InitAudio) (THIS_ IDirectMusic** ppDirectMusic, /* Optional DMusic pointer. */ + IDirectSound** ppDirectSound, /* Optional DSound pointer. */ + HWND hWnd, /* HWND for DSound. */ + DWORD dwDefaultPathType, /* Requested default audio path type, also optional. */ + DWORD dwPChannelCount, /* Number of PChannels, if default audio path to be created. */ + DWORD dwFlags, /* DMUS_AUDIOF flags, if no pParams structure. */ + DMUS_AUDIOPARAMS *pParams) PURE; /* Optional initialization structure, defining required voices, buffers, etc. */ + STDMETHOD(PlaySegmentEx) (THIS_ IUnknown* pSource, /* Segment to play. Alternately, could be an IDirectMusicSong (not supported in DX8.) */ + WCHAR *pwzSegmentName, /* If song, which segment in the song (not supported in DX8.) */ + IUnknown* pTransition, /* Optional template segment to compose transition with. */ + DWORD dwFlags, /* DMUS_SEGF_ flags. */ + __int64 i64StartTime, /* Time to start playback. */ + IDirectMusicSegmentState** ppSegmentState, /* Returned Segment State. */ + IUnknown *pFrom, /* Optional segmentstate or audiopath to replace. */ + IUnknown *pAudioPath) PURE; /* Optional audioPath to play on. */ + STDMETHOD(StopEx) (THIS_ IUnknown *pObjectToStop, /* Segstate, AudioPath, Segment, or Song. */ + __int64 i64StopTime, + DWORD dwFlags) PURE; + STDMETHOD(ClonePMsg) (THIS_ DMUS_PMSG* pSourcePMSG, + DMUS_PMSG** ppCopyPMSG) PURE; + STDMETHOD(CreateAudioPath) (THIS_ IUnknown *pSourceConfig, /* Source configuration, from AudioPathConfig file. */ + BOOL fActivate, /* TRUE to activate on creation. */ + IDirectMusicAudioPath **ppNewPath) PURE; /* Returns created audiopath. */ + STDMETHOD(CreateStandardAudioPath)(THIS_ DWORD dwType, /* Type of path to create. */ + DWORD dwPChannelCount, /* How many PChannels to allocate for it. */ + BOOL fActivate, /* TRUE to activate on creation. */ + IDirectMusicAudioPath **ppNewPath) PURE; /* Returns created audiopath. */ + STDMETHOD(SetDefaultAudioPath) (THIS_ IDirectMusicAudioPath *pAudioPath) PURE; + STDMETHOD(GetDefaultAudioPath) (THIS_ IDirectMusicAudioPath **ppAudioPath) PURE; + STDMETHOD(GetParamEx) (THIS_ REFGUID rguidType, /* GetParam command ID. */ + DWORD dwTrackID, /* Virtual track ID of caller. */ + DWORD dwGroupBits, /* Group bits of caller. */ + DWORD dwIndex, /* Index to Nth parameter. */ + MUSIC_TIME mtTime, /* Time of requested parameter. */ + MUSIC_TIME* pmtNext, /* Returned delta to next parameter. */ + void* pParam) PURE; /* Data structure to fill with parameter. */ +}; + + + +/*//////////////////////////////////////////////////////////////////// +// IDirectMusicGraph */ +#undef INTERFACE +#define INTERFACE IDirectMusicGraph +DECLARE_INTERFACE_(IDirectMusicGraph, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicGraph */ + STDMETHOD(StampPMsg) (THIS_ DMUS_PMSG* pPMSG) PURE; + STDMETHOD(InsertTool) (THIS_ IDirectMusicTool* pTool, + DWORD* pdwPChannels, + DWORD cPChannels, + LONG lIndex) PURE; + STDMETHOD(GetTool) (THIS_ DWORD dwIndex, + IDirectMusicTool** ppTool) PURE; + STDMETHOD(RemoveTool) (THIS_ IDirectMusicTool* pTool) PURE; +}; + +typedef IDirectMusicGraph IDirectMusicGraph8; + + +/*///////////////////////////////////////////////////////////////////// +// IDirectMusicStyle */ +#undef INTERFACE +#define INTERFACE IDirectMusicStyle +DECLARE_INTERFACE_(IDirectMusicStyle, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicStyle */ + STDMETHOD(GetBand) (THIS_ WCHAR* pwszName, + IDirectMusicBand** ppBand) PURE; + STDMETHOD(EnumBand) (THIS_ DWORD dwIndex, + WCHAR *pwszName) PURE; + STDMETHOD(GetDefaultBand) (THIS_ IDirectMusicBand** ppBand) PURE; + STDMETHOD(EnumMotif) (THIS_ DWORD dwIndex, + WCHAR* pwszName) PURE; + STDMETHOD(GetMotif) (THIS_ WCHAR* pwszName, + IDirectMusicSegment** ppSegment) PURE; + STDMETHOD(GetDefaultChordMap) (THIS_ IDirectMusicChordMap** ppChordMap) PURE; + STDMETHOD(EnumChordMap) (THIS_ DWORD dwIndex, + WCHAR *pwszName) PURE; + STDMETHOD(GetChordMap) (THIS_ WCHAR* pwszName, + IDirectMusicChordMap** ppChordMap) PURE; + STDMETHOD(GetTimeSignature) (THIS_ DMUS_TIMESIGNATURE* pTimeSig) PURE; + STDMETHOD(GetEmbellishmentLength) (THIS_ DWORD dwType, + DWORD dwLevel, + DWORD* pdwMin, + DWORD* pdwMax) PURE; + STDMETHOD(GetTempo) (THIS_ double* pTempo) PURE; +}; + +/*///////////////////////////////////////////////////////////////////// +// IDirectMusicStyle8 */ +#undef INTERFACE +#define INTERFACE IDirectMusicStyle8 +DECLARE_INTERFACE_(IDirectMusicStyle8, IDirectMusicStyle) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicStyle */ + STDMETHOD(GetBand) (THIS_ WCHAR* pwszName, + IDirectMusicBand** ppBand) PURE; + STDMETHOD(EnumBand) (THIS_ DWORD dwIndex, + WCHAR *pwszName) PURE; + STDMETHOD(GetDefaultBand) (THIS_ IDirectMusicBand** ppBand) PURE; + STDMETHOD(EnumMotif) (THIS_ DWORD dwIndex, + WCHAR* pwszName) PURE; + STDMETHOD(GetMotif) (THIS_ WCHAR* pwszName, + IDirectMusicSegment** ppSegment) PURE; + STDMETHOD(GetDefaultChordMap) (THIS_ IDirectMusicChordMap** ppChordMap) PURE; + STDMETHOD(EnumChordMap) (THIS_ DWORD dwIndex, + WCHAR *pwszName) PURE; + STDMETHOD(GetChordMap) (THIS_ WCHAR* pwszName, + IDirectMusicChordMap** ppChordMap) PURE; + STDMETHOD(GetTimeSignature) (THIS_ DMUS_TIMESIGNATURE* pTimeSig) PURE; + STDMETHOD(GetEmbellishmentLength) (THIS_ DWORD dwType, + DWORD dwLevel, + DWORD* pdwMin, + DWORD* pdwMax) PURE; + STDMETHOD(GetTempo) (THIS_ double* pTempo) PURE; + + /* IDirectMusicStyle8 */ + STDMETHOD(EnumPattern) (THIS_ DWORD dwIndex, + DWORD dwPatternType, + WCHAR* pwszName) PURE; +}; + +/*///////////////////////////////////////////////////////////////////// +// IDirectMusicChordMap */ +#undef INTERFACE +#define INTERFACE IDirectMusicChordMap +DECLARE_INTERFACE_(IDirectMusicChordMap, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicChordMap */ + STDMETHOD(GetScale) (THIS_ DWORD* pdwScale) PURE; +}; + +typedef IDirectMusicChordMap IDirectMusicChordMap8; + +/*///////////////////////////////////////////////////////////////////// +// IDirectMusicComposer */ +#undef INTERFACE +#define INTERFACE IDirectMusicComposer +DECLARE_INTERFACE_(IDirectMusicComposer, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicComposer */ + STDMETHOD(ComposeSegmentFromTemplate) (THIS_ IDirectMusicStyle* pStyle, + IDirectMusicSegment* pTemplate, + WORD wActivity, + IDirectMusicChordMap* pChordMap, + IDirectMusicSegment** ppSegment) PURE; + STDMETHOD(ComposeSegmentFromShape) (THIS_ IDirectMusicStyle* pStyle, + WORD wNumMeasures, + WORD wShape, + WORD wActivity, + BOOL fIntro, + BOOL fEnd, + IDirectMusicChordMap* pChordMap, + IDirectMusicSegment** ppSegment ) PURE; + STDMETHOD(ComposeTransition) (THIS_ IDirectMusicSegment* pFromSeg, + IDirectMusicSegment* pToSeg, + MUSIC_TIME mtTime, + WORD wCommand, + DWORD dwFlags, + IDirectMusicChordMap* pChordMap, + IDirectMusicSegment** ppTransSeg) PURE; + STDMETHOD(AutoTransition) (THIS_ IDirectMusicPerformance* pPerformance, + IDirectMusicSegment* pToSeg, + WORD wCommand, + DWORD dwFlags, + IDirectMusicChordMap* pChordMap, + IDirectMusicSegment** ppTransSeg, + IDirectMusicSegmentState** ppToSegState, + IDirectMusicSegmentState** ppTransSegState) PURE; + STDMETHOD(ComposeTemplateFromShape) (THIS_ WORD wNumMeasures, + WORD wShape, + BOOL fIntro, + BOOL fEnd, + WORD wEndLength, + IDirectMusicSegment** ppTemplate) PURE; + STDMETHOD(ChangeChordMap) (THIS_ IDirectMusicSegment* pSegment, + BOOL fTrackScale, + IDirectMusicChordMap* pChordMap) PURE; +}; + +typedef IDirectMusicComposer IDirectMusicComposer8; + +/*///////////////////////////////////////////////////////////////////// +// IDirectMusicPatternTrack */ + +#undef INTERFACE +#define INTERFACE IDirectMusicPatternTrack +DECLARE_INTERFACE_(IDirectMusicPatternTrack, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicPatternTrack */ + STDMETHOD(CreateSegment) (THIS_ IDirectMusicStyle* pStyle, + IDirectMusicSegment** ppSegment) PURE; + STDMETHOD(SetVariation) (THIS_ IDirectMusicSegmentState* pSegState, + DWORD dwVariationFlags, + DWORD dwPart) PURE; + STDMETHOD(SetPatternByName) (THIS_ IDirectMusicSegmentState* pSegState, + WCHAR* wszName, + IDirectMusicStyle* pStyle, + DWORD dwPatternType, + DWORD* pdwLength) PURE; +}; + +typedef IDirectMusicPatternTrack IDirectMusicPatternTrack8; + +/*///////////////////////////////////////////////////////////////////// +// IDirectMusicScript */ + +#undef INTERFACE +#define INTERFACE IDirectMusicScript +DECLARE_INTERFACE_(IDirectMusicScript, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicScript */ + STDMETHOD(Init) (THIS_ IDirectMusicPerformance *pPerformance, + DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; + STDMETHOD(CallRoutine) (THIS_ WCHAR *pwszRoutineName, + DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; + STDMETHOD(SetVariableVariant) (THIS_ WCHAR *pwszVariableName, + VARIANT varValue, + BOOL fSetRef, + DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; + STDMETHOD(GetVariableVariant) (THIS_ WCHAR *pwszVariableName, + VARIANT *pvarValue, + DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; + STDMETHOD(SetVariableNumber) (THIS_ WCHAR *pwszVariableName, + LONG lValue, + DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; + STDMETHOD(GetVariableNumber) (THIS_ WCHAR *pwszVariableName, + LONG *plValue, + DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; + STDMETHOD(SetVariableObject) (THIS_ WCHAR *pwszVariableName, + IUnknown *punkValue, + DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; + STDMETHOD(GetVariableObject) (THIS_ WCHAR *pwszVariableName, + REFIID riid, + LPVOID FAR *ppv, + DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; + STDMETHOD(EnumRoutine) (THIS_ DWORD dwIndex, + WCHAR *pwszName) PURE; + STDMETHOD(EnumVariable) (THIS_ DWORD dwIndex, + WCHAR *pwszName) PURE; +}; + +typedef IDirectMusicScript IDirectMusicScript8; + +/*///////////////////////////////////////////////////////////////////// +// IDirectMusicContainer */ + +#undef INTERFACE +#define INTERFACE IDirectMusicContainer +DECLARE_INTERFACE_(IDirectMusicContainer, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicContainer */ + STDMETHOD(EnumObject) (THIS_ REFGUID rguidClass, + DWORD dwIndex, + LPDMUS_OBJECTDESC pDesc, + WCHAR *pwszAlias) PURE; +}; + +typedef IDirectMusicContainer IDirectMusicContainer8; + +/*///////////////////////////////////////////////////////////////////// +// IDirectMusicSong */ +/* Note: Songs are not supported in DX8. */ + +#undef INTERFACE +#define INTERFACE IDirectMusicSong +DECLARE_INTERFACE_(IDirectMusicSong, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicSong */ + STDMETHOD(Compose) (THIS) PURE; + STDMETHOD(GetParam) (THIS_ REFGUID rguidType, + DWORD dwGroupBits, + DWORD dwIndex, + MUSIC_TIME mtTime, + MUSIC_TIME* pmtNext, + void* pParam) PURE; + STDMETHOD(GetSegment) (THIS_ WCHAR *pwzName, /* Retrieve a specific segment by name. */ + IDirectMusicSegment **ppSegment) PURE; /* Returned segment. */ + STDMETHOD(GetAudioPathConfig) (THIS_ IUnknown ** ppAudioPathConfig) PURE; /* Retrieve embedded audiopath configuration. */ + STDMETHOD(Download) (THIS_ IUnknown *pAudioPath) PURE; /* Download entire song to ports on performance or audiopath. */ + STDMETHOD(Unload) (THIS_ IUnknown *pAudioPath) PURE; /* Unload entire song from port on performance or audiopath. */ + STDMETHOD(EnumSegment) (THIS_ DWORD dwIndex, /* Nth segment to retrieve. */ + IDirectMusicSegment **ppSegment) PURE; /* Pointer to segment. */ +}; + +typedef IDirectMusicSong IDirectMusicSong8; + +/* CLSID's */ +DEFINE_GUID(CLSID_DirectMusicPerformance,0xd2ac2881, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicSegment,0xd2ac2882, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicSegmentState,0xd2ac2883, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicGraph,0xd2ac2884, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicStyle,0xd2ac288a, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicChordMap,0xd2ac288f, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicComposer,0xd2ac2890, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicLoader,0xd2ac2892, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicBand,0x79ba9e00, 0xb6ee, 0x11d1, 0x86, 0xbe, 0x0, 0xc0, 0x4f, 0xbf, 0x8f, 0xef); + +/* New CLSID's for DX8 */ +DEFINE_GUID(CLSID_DirectMusicPatternTrack,0xd2ac2897, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(CLSID_DirectMusicScript,0x810b5013, 0xe88d, 0x11d2, 0x8b, 0xc1, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6); /* {810B5013-E88D-11d2-8BC1-00600893B1B6} */ +DEFINE_GUID(CLSID_DirectMusicContainer,0x9301e380, 0x1f22, 0x11d3, 0x82, 0x26, 0xd2, 0xfa, 0x76, 0x25, 0x5d, 0x47); +DEFINE_GUID(CLSID_DirectSoundWave,0x8a667154, 0xf9cb, 0x11d2, 0xad, 0x8a, 0x0, 0x60, 0xb0, 0x57, 0x5a, 0xbc); +/* Note: Songs are not supported in DX8. */ +DEFINE_GUID(CLSID_DirectMusicSong, 0xaed5f0a5, 0xd972, 0x483d, 0xa3, 0x84, 0x64, 0x9d, 0xfe, 0xb9, 0xc1, 0x81); +DEFINE_GUID(CLSID_DirectMusicAudioPathConfig,0xee0b9ca0, 0xa81e, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74); + +/* Special GUID for all object types. This is used by the loader. */ +DEFINE_GUID(GUID_DirectMusicAllTypes,0xd2ac2893, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Notification guids */ +DEFINE_GUID(GUID_NOTIFICATION_SEGMENT,0xd2ac2899, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(GUID_NOTIFICATION_PERFORMANCE,0x81f75bc5, 0x4e5d, 0x11d2, 0xbc, 0xc7, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb); +DEFINE_GUID(GUID_NOTIFICATION_MEASUREANDBEAT,0xd2ac289a, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(GUID_NOTIFICATION_CHORD,0xd2ac289b, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(GUID_NOTIFICATION_COMMAND,0xd2ac289c, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(GUID_NOTIFICATION_RECOMPOSE, 0xd348372b, 0x945b, 0x45ae, 0xa5, 0x22, 0x45, 0xf, 0x12, 0x5b, 0x84, 0xa5); + +/* Track param type guids */ +/* Use to get/set a DMUS_COMMAND_PARAM param in the Command track */ +DEFINE_GUID(GUID_CommandParam,0xd2ac289d, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Use to get a DMUS_COMMAND_PARAM_2 param in the Command track */ +DEFINE_GUID(GUID_CommandParam2, 0x28f97ef7, 0x9538, 0x11d2, 0x97, 0xa9, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58); + +/* Use to get/set a DMUS_COMMAND_PARAM_2 param to be used as the command following all commands in +the Command track (this information can't be saved) */ +DEFINE_GUID(GUID_CommandParamNext, 0x472afe7a, 0x281b, 0x11d3, 0x81, 0x7d, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58); + +/* Use to get/set a DMUS_CHORD_PARAM param in the Chord track */ +DEFINE_GUID(GUID_ChordParam,0xd2ac289e, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Use to get a DMUS_RHYTHM_PARAM param in the Chord track */ +DEFINE_GUID(GUID_RhythmParam,0xd2ac289f, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Use to get/set an IDirectMusicStyle param in the Style track */ +DEFINE_GUID(GUID_IDirectMusicStyle,0xd2ac28a1, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Use to get a DMUS_TIMESIGNATURE param in the Style and TimeSig tracks */ +DEFINE_GUID(GUID_TimeSignature,0xd2ac28a4, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Use to get/set a DMUS_TEMPO_PARAM param in the Tempo track */ +DEFINE_GUID(GUID_TempoParam,0xd2ac28a5, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Use to get the next valid point in a segment at which it may start */ +DEFINE_GUID(GUID_Valid_Start_Time,0x7f6b1760, 0x1fdb, 0x11d3, 0x82, 0x26, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0); + +/* Use to get the next point in the currently playing primary segment at which a new segment may start */ +DEFINE_GUID(GUID_Play_Marker,0xd8761a41, 0x801a, 0x11d3, 0x9b, 0xd1, 0xda, 0xf7, 0xe1, 0xc3, 0xd8, 0x34); + +/* Use to get (GetParam) or add (SetParam) bands in the Band track */ +DEFINE_GUID(GUID_BandParam,0x2bb1938, 0xcb8b, 0x11d2, 0x8b, 0xb9, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xb6); +typedef struct _DMUS_BAND_PARAM +{ + MUSIC_TIME mtTimePhysical; /* Note: If this is a clock-time track, then this field is interpreted in the track's internal time format, which is the number of milliseconds after the beginning of playback. */ + IDirectMusicBand *pBand; +} DMUS_BAND_PARAM; + +/* Obsolete -- doesn't distinguish physical and logical time. Use GUID_BandParam instead. */ +DEFINE_GUID(GUID_IDirectMusicBand,0xd2ac28ac, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Use to get/set an IDirectMusicChordMap param in the ChordMap track */ +DEFINE_GUID(GUID_IDirectMusicChordMap,0xd2ac28ad, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Use to get/set a DMUS_MUTE_PARAM param in the Mute track */ +DEFINE_GUID(GUID_MuteParam,0xd2ac28af, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* These guids are used in IDirectMusicSegment::SetParam to tell the band track to perform various actions. + Some of these guids (where noted) also apply to wave tracks. + */ +/* Download bands/waves for the IDirectMusicSegment */ +DEFINE_GUID(GUID_Download,0xd2ac28a7, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Unload bands/waves for the IDirectMusicSegment */ +DEFINE_GUID(GUID_Unload,0xd2ac28a8, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Connect segment's bands to an IDirectMusicCollection */ +DEFINE_GUID(GUID_ConnectToDLSCollection, 0x1db1ae6b, 0xe92e, 0x11d1, 0xa8, 0xc5, 0x0, 0xc0, 0x4f, 0xa3, 0x72, 0x6e); + +/* Enable/disable autodownloading of bands/waves */ +DEFINE_GUID(GUID_Enable_Auto_Download,0xd2ac28a9, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(GUID_Disable_Auto_Download,0xd2ac28aa, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Clear all bands */ +DEFINE_GUID(GUID_Clear_All_Bands,0xd2ac28ab, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Set segment to manage all program changes, bank selects, etc. for simple playback of a standard MIDI file */ +DEFINE_GUID(GUID_StandardMIDIFile, 0x6621075, 0xe92e, 0x11d1, 0xa8, 0xc5, 0x0, 0xc0, 0x4f, 0xa3, 0x72, 0x6e); +/* For compatibility with beta releases... */ +#define GUID_IgnoreBankSelectForGM GUID_StandardMIDIFile + +/* Disable/enable param guids. Use these in SetParam calls to disable or enable sending + * specific PMsg types. + */ +DEFINE_GUID(GUID_DisableTimeSig, 0x45fc707b, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb); +DEFINE_GUID(GUID_EnableTimeSig, 0x45fc707c, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb); +DEFINE_GUID(GUID_DisableTempo, 0x45fc707d, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb); +DEFINE_GUID(GUID_EnableTempo, 0x45fc707e, 0x1db4, 0x11d2, 0xbc, 0xac, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb); + +/* Used in SetParam calls for pattern-based tracks. A nonzero value seeds the random number +generator for variation selection; a value of zero reverts to the default behavior of +getting the seed from the system clock. +*/ +DEFINE_GUID(GUID_SeedVariations, 0x65b76fa5, 0xff37, 0x11d2, 0x81, 0x4e, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58); + +/* Used to get/set melody fragments (pParam points to a DMUS_MELODY_FRAGMENT) */ +/* Note: Melody formulation is not supported in DX8. */ +DEFINE_GUID(GUID_MelodyFragment, 0xb291c7f2, 0xb616, 0x11d2, 0x97, 0xfa, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58); + +/* Used to clear all melody fragments */ +/* Note: Melody formulation is not supported in DX8. */ +DEFINE_GUID(GUID_Clear_All_MelodyFragments, 0x8509fee6, 0xb617, 0x11d2, 0x97, 0xfa, 0x0, 0xc0, 0x4f, 0xa3, 0x6e, 0x58); + +/* Used to get the variations currently in effect across PChannels */ +DEFINE_GUID(GUID_Variations, 0x11f72cce, 0x26e6, 0x4ecd, 0xaf, 0x2e, 0xd6, 0x68, 0xe6, 0x67, 0x7, 0xd8); +typedef struct _DMUS_VARIATIONS_PARAM +{ + DWORD dwPChannelsUsed; /* number of PChannels in use */ + DWORD* padwPChannels; /* array of PChannels in use */ + DWORD* padwVariations; /* array of variations in effect for each PChannel */ +} DMUS_VARIATIONS_PARAM; + +/* Download bands/waves for the IDirectMusicSegment, passed an IDirectMusicAudioPath instead of an IDirectMusicPerformance */ +DEFINE_GUID(GUID_DownloadToAudioPath,0x9f2c0341, 0xc5c4, 0x11d3, 0x9b, 0xd1, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0); + +/* Unload bands/waves for the IDirectMusicSegment, passed an IDirectMusicAudioPath instead of an IDirectMusicPerformance */ +DEFINE_GUID(GUID_UnloadFromAudioPath,0x9f2c0342, 0xc5c4, 0x11d3, 0x9b, 0xd1, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0); + + +/* Global data guids */ +DEFINE_GUID(GUID_PerfMasterTempo,0xd2ac28b0, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(GUID_PerfMasterVolume,0xd2ac28b1, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(GUID_PerfMasterGrooveLevel,0xd2ac28b2, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(GUID_PerfAutoDownload, 0xfb09565b, 0x3631, 0x11d2, 0xbc, 0xb8, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb); + +/* GUID for default GM/GS dls collection. */ +DEFINE_GUID(GUID_DefaultGMCollection, 0xf17e8673, 0xc3b4, 0x11d1, 0x87, 0xb, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* GUID to define default synth, placed in AudioPath configuration file. */ +DEFINE_GUID(GUID_Synth_Default,0x26bb9432, 0x45fe, 0x48d3, 0xa3, 0x75, 0x24, 0x72, 0xc5, 0xe3, 0xe7, 0x86); + +/* GUIDs to define default buffer configurations to place in AudioPath configuration file. */ +DEFINE_GUID(GUID_Buffer_Reverb,0x186cc541, 0xdb29, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74); +DEFINE_GUID(GUID_Buffer_EnvReverb,0x186cc542, 0xdb29, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74); +DEFINE_GUID(GUID_Buffer_Stereo,0x186cc545, 0xdb29, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74); +DEFINE_GUID(GUID_Buffer_3D_Dry,0x186cc546, 0xdb29, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74); +DEFINE_GUID(GUID_Buffer_Mono,0x186cc547, 0xdb29, 0x11d3, 0x9b, 0xd1, 0x0, 0x80, 0xc7, 0x15, 0xa, 0x74); + +/* IID's */ +DEFINE_GUID(IID_IDirectMusicLoader, 0x2ffaaca2, 0x5dca, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6); +DEFINE_GUID(IID_IDirectMusicGetLoader,0x68a04844, 0xd13d, 0x11d1, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6); +DEFINE_GUID(IID_IDirectMusicObject,0xd2ac28b5, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(IID_IDirectMusicSegment, 0xf96029a2, 0x4282, 0x11d2, 0x87, 0x17, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(IID_IDirectMusicSegmentState, 0xa3afdcc7, 0xd3ee, 0x11d1, 0xbc, 0x8d, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb); +DEFINE_GUID(IID_IDirectMusicPerformance,0x7d43d03, 0x6523, 0x11d2, 0x87, 0x1d, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(IID_IDirectMusicGraph,0x2befc277, 0x5497, 0x11d2, 0xbc, 0xcb, 0x0, 0xa0, 0xc9, 0x22, 0xe6, 0xeb); +DEFINE_GUID(IID_IDirectMusicStyle,0xd2ac28bd, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(IID_IDirectMusicChordMap,0xd2ac28be, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(IID_IDirectMusicComposer,0xd2ac28bf, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); +DEFINE_GUID(IID_IDirectMusicBand,0xd2ac28c0, 0xb39b, 0x11d1, 0x87, 0x4, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Alternate interface IDs, available in DX7 release and after. */ +DEFINE_GUID(IID_IDirectMusicPerformance2,0x6fc2cae0, 0xbc78, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6); +DEFINE_GUID(IID_IDirectMusicSegment2, 0xd38894d1, 0xc052, 0x11d2, 0x87, 0x2f, 0x0, 0x60, 0x8, 0x93, 0xb1, 0xbd); + +/* Interface IDs for DX8 */ +/* changed interfaces (GUID only) */ +DEFINE_GUID(IID_IDirectMusicLoader8, 0x19e7c08c, 0xa44, 0x4e6a, 0xa1, 0x16, 0x59, 0x5a, 0x7c, 0xd5, 0xde, 0x8c); +DEFINE_GUID(IID_IDirectMusicPerformance8, 0x679c4137, 0xc62e, 0x4147, 0xb2, 0xb4, 0x9d, 0x56, 0x9a, 0xcb, 0x25, 0x4c); +DEFINE_GUID(IID_IDirectMusicSegment8,0xc6784488, 0x41a3, 0x418f, 0xaa, 0x15, 0xb3, 0x50, 0x93, 0xba, 0x42, 0xd4); +DEFINE_GUID(IID_IDirectMusicSegmentState8, 0xa50e4730, 0xae4, 0x48a7, 0x98, 0x39, 0xbc, 0x4, 0xbf, 0xe0, 0x77, 0x72); +DEFINE_GUID(IID_IDirectMusicStyle8, 0xfd24ad8a, 0xa260, 0x453d, 0xbf, 0x50, 0x6f, 0x93, 0x84, 0xf7, 0x9, 0x85); +/* new interfaces (GUID + alias) */ +DEFINE_GUID(IID_IDirectMusicPatternTrack, 0x51c22e10, 0xb49f, 0x46fc, 0xbe, 0xc2, 0xe6, 0x28, 0x8f, 0xb9, 0xed, 0xe6); +#define IID_IDirectMusicPatternTrack8 IID_IDirectMusicPatternTrack +DEFINE_GUID(IID_IDirectMusicScript, 0x2252373a, 0x5814, 0x489b, 0x82, 0x9, 0x31, 0xfe, 0xde, 0xba, 0xf1, 0x37); /* {2252373A-5814-489b-8209-31FEDEBAF137} */ +#define IID_IDirectMusicScript8 IID_IDirectMusicScript +DEFINE_GUID(IID_IDirectMusicContainer, 0x9301e386, 0x1f22, 0x11d3, 0x82, 0x26, 0xd2, 0xfa, 0x76, 0x25, 0x5d, 0x47); +#define IID_IDirectMusicContainer8 IID_IDirectMusicContainer +/* Note: Songs are not supported in DX8. */ +DEFINE_GUID(IID_IDirectMusicSong, 0xa862b2ec, 0x3676, 0x4982, 0x85, 0xa, 0x78, 0x42, 0x77, 0x5e, 0x1d, 0x86); +#define IID_IDirectMusicSong8 IID_IDirectMusicSong +DEFINE_GUID(IID_IDirectMusicAudioPath,0xc87631f5, 0x23be, 0x4986, 0x88, 0x36, 0x5, 0x83, 0x2f, 0xcc, 0x48, 0xf9); +#define IID_IDirectMusicAudioPath8 IID_IDirectMusicAudioPath +/* unchanged interfaces (alias only) */ +#define IID_IDirectMusicGetLoader8 IID_IDirectMusicGetLoader +#define IID_IDirectMusicChordMap8 IID_IDirectMusicChordMap +#define IID_IDirectMusicGraph8 IID_IDirectMusicGraph +#define IID_IDirectMusicBand8 IID_IDirectMusicBand +#define IID_IDirectMusicObject8 IID_IDirectMusicObject +#define IID_IDirectMusicComposer8 IID_IDirectMusicComposer + + +#ifdef __cplusplus +}; /* extern "C" */ +#endif + +#include + +#endif /* #ifndef _DMUSICI_ */ diff --git a/windows_libs/mssdk/include/dmusics.h b/windows_libs/mssdk/include/dmusics.h new file mode 100644 index 00000000..cda65d28 --- /dev/null +++ b/windows_libs/mssdk/include/dmusics.h @@ -0,0 +1,193 @@ +/************************************************************************ +* * +* dmusics.h -- Definitions for created a DirectMusic software synth * +* * +* Copyright (c) 1998-1999 Microsoft Corporation +* * +************************************************************************/ + +#ifndef _DMUSICS_ +#define _DMUSICS_ + +#include "dmusicc.h" + +/* Software synths are enumerated from under this registry key. + */ +#define REGSTR_PATH_SOFTWARESYNTHS "Software\\Microsoft\\DirectMusic\\SoftwareSynths" + +interface IDirectMusicSynth; +interface IDirectMusicSynthSink; + +#ifndef __cplusplus +typedef interface IDirectMusicSynth IDirectMusicSynth; +typedef interface IDirectMusicSynthSink IDirectMusicSynthSink; +#endif + +#ifndef _DMUS_VOICE_STATE_DEFINED +#define _DMUS_VOICE_STATE_DEFINED + +typedef struct _DMUS_VOICE_STATE +{ + BOOL bExists; + SAMPLE_POSITION spPosition; +} DMUS_VOICE_STATE; + +#endif /* _DMUS_VOICE_STATE_DEFINED */ + +/* IDirectMusicSynth::Refresh + * + * This is the last buffer of the stream. It may be a partial block. + */ +#define REFRESH_F_LASTBUFFER 0x00000001 + +#undef INTERFACE +#define INTERFACE IDirectMusicSynth +DECLARE_INTERFACE_(IDirectMusicSynth, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicSynth */ + STDMETHOD(Open) (THIS_ LPDMUS_PORTPARAMS pPortParams) PURE; + STDMETHOD(Close) (THIS) PURE; + STDMETHOD(SetNumChannelGroups) (THIS_ DWORD dwGroups) PURE; + STDMETHOD(Download) (THIS_ LPHANDLE phDownload, + LPVOID pvData, + LPBOOL pbFree ) PURE; + STDMETHOD(Unload) (THIS_ HANDLE hDownload, + HRESULT ( CALLBACK *lpFreeHandle)(HANDLE,HANDLE), + HANDLE hUserData ) PURE; + STDMETHOD(PlayBuffer) (THIS_ REFERENCE_TIME rt, + LPBYTE pbBuffer, + DWORD cbBuffer) PURE; + STDMETHOD(GetRunningStats) (THIS_ LPDMUS_SYNTHSTATS pStats) PURE; + STDMETHOD(GetPortCaps) (THIS_ LPDMUS_PORTCAPS pCaps) PURE; + STDMETHOD(SetMasterClock) (THIS_ IReferenceClock *pClock) PURE; + STDMETHOD(GetLatencyClock) (THIS_ IReferenceClock **ppClock) PURE; + STDMETHOD(Activate) (THIS_ BOOL fEnable) PURE; + STDMETHOD(SetSynthSink) (THIS_ IDirectMusicSynthSink *pSynthSink) PURE; + STDMETHOD(Render) (THIS_ short *pBuffer, + DWORD dwLength, + LONGLONG llPosition) PURE; + STDMETHOD(SetChannelPriority) (THIS_ DWORD dwChannelGroup, + DWORD dwChannel, + DWORD dwPriority) PURE; + STDMETHOD(GetChannelPriority) (THIS_ DWORD dwChannelGroup, + DWORD dwChannel, + LPDWORD pdwPriority) PURE; + STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pWaveFormatEx, + LPDWORD pdwWaveFormatExSize) PURE; + STDMETHOD(GetAppend) (THIS_ DWORD* pdwAppend) PURE; +}; + +#undef INTERFACE + +#define INTERFACE IDirectMusicSynth8 +DECLARE_INTERFACE_(IDirectMusicSynth8, IDirectMusicSynth) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicSynth */ + STDMETHOD(Open) (THIS_ LPDMUS_PORTPARAMS pPortParams) PURE; + STDMETHOD(Close) (THIS) PURE; + STDMETHOD(SetNumChannelGroups) (THIS_ DWORD dwGroups) PURE; + STDMETHOD(Download) (THIS_ LPHANDLE phDownload, + LPVOID pvData, + LPBOOL pbFree ) PURE; + STDMETHOD(Unload) (THIS_ HANDLE hDownload, + HRESULT ( CALLBACK *lpFreeHandle)(HANDLE,HANDLE), + HANDLE hUserData ) PURE; + STDMETHOD(PlayBuffer) (THIS_ REFERENCE_TIME rt, + LPBYTE pbBuffer, + DWORD cbBuffer) PURE; + STDMETHOD(GetRunningStats) (THIS_ LPDMUS_SYNTHSTATS pStats) PURE; + STDMETHOD(GetPortCaps) (THIS_ LPDMUS_PORTCAPS pCaps) PURE; + STDMETHOD(SetMasterClock) (THIS_ IReferenceClock *pClock) PURE; + STDMETHOD(GetLatencyClock) (THIS_ IReferenceClock **ppClock) PURE; + STDMETHOD(Activate) (THIS_ BOOL fEnable) PURE; + STDMETHOD(SetSynthSink) (THIS_ IDirectMusicSynthSink *pSynthSink) PURE; + STDMETHOD(Render) (THIS_ short *pBuffer, + DWORD dwLength, + LONGLONG llPosition) PURE; + STDMETHOD(SetChannelPriority) (THIS_ DWORD dwChannelGroup, + DWORD dwChannel, + DWORD dwPriority) PURE; + STDMETHOD(GetChannelPriority) (THIS_ DWORD dwChannelGroup, + DWORD dwChannel, + LPDWORD pdwPriority) PURE; + STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pWaveFormatEx, + LPDWORD pdwWaveFormatExSize) PURE; + STDMETHOD(GetAppend) (THIS_ DWORD* pdwAppend) PURE; + + /* IDirectMusicSynth8 */ + STDMETHOD(PlayVoice) (THIS_ REFERENCE_TIME rt, + DWORD dwVoiceId, + DWORD dwChannelGroup, + DWORD dwChannel, + DWORD dwDLId, + long prPitch, /* PREL not defined here */ + long vrVolume, /* VREL not defined here */ + SAMPLE_TIME stVoiceStart, + SAMPLE_TIME stLoopStart, + SAMPLE_TIME stLoopEnd) PURE; + + STDMETHOD(StopVoice) (THIS_ REFERENCE_TIME rt, + DWORD dwVoiceId ) PURE; + + STDMETHOD(GetVoiceState) (THIS_ DWORD dwVoice[], + DWORD cbVoice, + DMUS_VOICE_STATE dwVoiceState[] ) PURE; + STDMETHOD(Refresh) (THIS_ DWORD dwDownloadID, + DWORD dwFlags) PURE; + STDMETHOD(AssignChannelToBuses) (THIS_ DWORD dwChannelGroup, + DWORD dwChannel, + LPDWORD pdwBuses, + DWORD cBuses) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirectMusicSynthSink +DECLARE_INTERFACE_(IDirectMusicSynthSink, IUnknown) +{ + /* IUnknown */ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectMusicSynthSink */ + STDMETHOD(Init) (THIS_ IDirectMusicSynth *pSynth) PURE; + STDMETHOD(SetMasterClock) (THIS_ IReferenceClock *pClock) PURE; + STDMETHOD(GetLatencyClock) (THIS_ IReferenceClock **ppClock) PURE; + STDMETHOD(Activate) (THIS_ BOOL fEnable) PURE; + STDMETHOD(SampleToRefTime) (THIS_ LONGLONG llSampleTime, + REFERENCE_TIME *prfTime) PURE; + STDMETHOD(RefTimeToSample) (THIS_ REFERENCE_TIME rfTime, + LONGLONG *pllSampleTime) PURE; + STDMETHOD(SetDirectSound) (THIS_ LPDIRECTSOUND pDirectSound, + LPDIRECTSOUNDBUFFER pDirectSoundBuffer) PURE; + STDMETHOD(GetDesiredBufferSize) (THIS_ LPDWORD pdwBufferSizeInSamples) PURE; +}; + +DEFINE_GUID(IID_IDirectMusicSynth, 0x9823661, 0x5c85, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6); +DEFINE_GUID(IID_IDirectMusicSynth8,0x53cab625, 0x2711, 0x4c9f, 0x9d, 0xe7, 0x1b, 0x7f, 0x92, 0x5f, 0x6f, 0xc8); +DEFINE_GUID(IID_IDirectMusicSynthSink,0x9823663, 0x5c85, 0x11d2, 0xaf, 0xa6, 0x0, 0xaa, 0x0, 0x24, 0xd8, 0xb6); + +/* Property Set GUID_DMUS_PROP_SetSynthSink + * + * Item 0: An IUnknown on which the port can QueryInterface for a user-mode synth sink. + */ +DEFINE_GUID(GUID_DMUS_PROP_SetSynthSink,0x0a3a5ba5, 0x37b6, 0x11d2, 0xb9, 0xf9, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); + +/* Property Set GUID_DMUS_PROP_SinkUsesDSound + * + * Item 0: A DWORD boolean indicating whether or not the sink requires an IDirectSound interface. The + * default is FALSE if this property item is not implemented by the sink. + */ +DEFINE_GUID(GUID_DMUS_PROP_SinkUsesDSound, 0xbe208857, 0x8952, 0x11d2, 0xba, 0x1c, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12); + +#endif diff --git a/windows_libs/mssdk/include/dpaddr.h b/windows_libs/mssdk/include/dpaddr.h new file mode 100644 index 00000000..fec74012 --- /dev/null +++ b/windows_libs/mssdk/include/dpaddr.h @@ -0,0 +1,368 @@ +/*==========================================================================; + * + * Copyright (C) 2000 Microsoft Corporation. All Rights Reserved. + * + * File: dpaddr.h + * Content: DirectPlayAddress include file + ***************************************************************************/ + +#ifndef __DIRECTPLAYADDRESS__ +#define __DIRECTPLAYADDRESS__ + +#include // for DECLARE_INTERFACE and HRESULT + +#ifdef __cplusplus +extern "C" { +#endif + +#include "dplay8.h" + +/**************************************************************************** + * + * DirectPlay8Address CLSIDs + * + ****************************************************************************/ + +// {934A9523-A3CA-4bc5-ADA0-D6D95D979421} +DEFINE_GUID(CLSID_DirectPlay8Address, +0x934a9523, 0xa3ca, 0x4bc5, 0xad, 0xa0, 0xd6, 0xd9, 0x5d, 0x97, 0x94, 0x21); + +/**************************************************************************** + * + * DirectPlay8Address Interface IIDs + * + ****************************************************************************/ + + +// {83783300-4063-4c8a-9DB3-82830A7FEB31} +DEFINE_GUID(IID_IDirectPlay8Address, +0x83783300, 0x4063, 0x4c8a, 0x9d, 0xb3, 0x82, 0x83, 0xa, 0x7f, 0xeb, 0x31); + +// {E5A0E990-2BAD-430b-87DA-A142CF75DE58} +DEFINE_GUID(IID_IDirectPlay8AddressIP, +0xe5a0e990, 0x2bad, 0x430b, 0x87, 0xda, 0xa1, 0x42, 0xcf, 0x75, 0xde, 0x58); + + +/**************************************************************************** + * + * DirectPlay8Address Interface Pointer definitions + * + ****************************************************************************/ + + +typedef struct IDirectPlay8Address *PDIRECTPLAY8ADDRESS, *LPDIRECTPLAY8ADDRESS; +typedef struct IDirectPlay8AddressIP *PDIRECTPLAY8ADDRESSIP, *LPDIRECTPLAY8ADDRESSIP; + +/**************************************************************************** + * + * DirectPlay8Address Forward Declarations For External Types + * + ****************************************************************************/ + +typedef struct sockaddr SOCKADDR; + +/**************************************************************************** + * + * DirectPlay8Address Constants + * + ****************************************************************************/ +// +// Asynchronous operation flags +// +#define DPNA_DATATYPE_STRING 0x00000001 +#define DPNA_DATATYPE_DWORD 0x00000002 +#define DPNA_DATATYPE_GUID 0x00000003 +#define DPNA_DATATYPE_BINARY 0x00000004 +#define DPNA_DATATYPE_STRING_ANSI 0x00000005 + +#define DPNA_DPNSVR_PORT 6073 + +#define DPNA_INDEX_INVALID 0xFFFFFFFF + +/**************************************************************************** + * + * DirectPlay8Address Address Elements + * + ****************************************************************************/ + +#define DPNA_SEPARATOR_KEYVALUE L'=' +#define DPNA_SEPARATOR_USERDATA L'#' +#define DPNA_SEPARATOR_COMPONENT L';' +#define DPNA_ESCAPECHAR L'%' + +// Header +#define DPNA_HEADER L"x-directplay:/" + +// key names for address components +#define DPNA_KEY_APPLICATION_INSTANCE L"applicationinstance" +#define DPNA_KEY_BAUD L"baud" +#define DPNA_KEY_DEVICE L"device" +#define DPNA_KEY_FLOWCONTROL L"flowcontrol" +#define DPNA_KEY_HOSTNAME L"hostname" +#define DPNA_KEY_PARITY L"parity" +#define DPNA_KEY_PHONENUMBER L"phonenumber" +#define DPNA_KEY_PORT L"port" +#define DPNA_KEY_PROGRAM L"program" +#define DPNA_KEY_PROVIDER L"provider" +#define DPNA_KEY_STOPBITS L"stopbits" + +// values for baud rate +#define DPNA_BAUD_RATE_9600 9600 +#define DPNA_BAUD_RATE_14400 14400 +#define DPNA_BAUD_RATE_19200 19200 +#define DPNA_BAUD_RATE_38400 38400 +#define DPNA_BAUD_RATE_56000 56000 +#define DPNA_BAUD_RATE_57600 57600 +#define DPNA_BAUD_RATE_115200 115200 + +// values for stop bits +#define DPNA_STOP_BITS_ONE L"1" +#define DPNA_STOP_BITS_ONE_FIVE L"1.5" +#define DPNA_STOP_BITS_TWO L"2" + +// values for parity +#define DPNA_PARITY_NONE L"NONE" +#define DPNA_PARITY_EVEN L"EVEN" +#define DPNA_PARITY_ODD L"ODD" +#define DPNA_PARITY_MARK L"MARK" +#define DPNA_PARITY_SPACE L"SPACE" + +// values for flow control +#define DPNA_FLOW_CONTROL_NONE L"NONE" +#define DPNA_FLOW_CONTROL_XONXOFF L"XONXOFF" +#define DPNA_FLOW_CONTROL_RTS L"RTS" +#define DPNA_FLOW_CONTROL_DTR L"DTR" +#define DPNA_FLOW_CONTROL_RTSDTR L"RTSDTR" + +// Shortcut values +// +// These can be used instead of the corresponding CLSID_DP8SP_XXXX guids +// +#define DPNA_VALUE_TCPIPPROVIDER L"IP" +#define DPNA_VALUE_IPXPROVIDER L"IPX" +#define DPNA_VALUE_MODEMPROVIDER L"MODEM" +#define DPNA_VALUE_SERIALPROVIDER L"SERIAL" + + +//// ANSI DEFINITIONS + +// Header +#define DPNA_HEADER_A "x-directplay:/" +#define DPNA_SEPARATOR_KEYVALUE_A '=' +#define DPNA_SEPARATOR_USERDATA_A '#' +#define DPNA_SEPARATOR_COMPONENT_A ';' +#define DPNA_ESCAPECHAR_A '%' + +// key names for address components +#define DPNA_KEY_APPLICATION_INSTANCE_A "applicationinstance" +#define DPNA_KEY_BAUD_A "baud" +#define DPNA_KEY_DEVICE_A "device" +#define DPNA_KEY_FLOWCONTROL_A "flowcontrol" +#define DPNA_KEY_HOSTNAME_A "hostname" +#define DPNA_KEY_PARITY_A "parity" +#define DPNA_KEY_PHONENUMBER_A "phonenumber" +#define DPNA_KEY_PORT_A "port" +#define DPNA_KEY_PROGRAM_A "program" +#define DPNA_KEY_PROVIDER_A "provider" +#define DPNA_KEY_STOPBITS_A "stopbits" + +// values for stop bits +#define DPNA_STOP_BITS_ONE_A "1" +#define DPNA_STOP_BITS_ONE_FIVE_A "1.5" +#define DPNA_STOP_BITS_TWO_A "2" + +// values for parity +#define DPNA_PARITY_NONE_A "NONE" +#define DPNA_PARITY_EVEN_A "EVEN" +#define DPNA_PARITY_ODD_A "ODD" +#define DPNA_PARITY_MARK_A "MARK" +#define DPNA_PARITY_SPACE_A "SPACE" + +// values for flow control +#define DPNA_FLOW_CONTROL_NONE_A "NONE" +#define DPNA_FLOW_CONTROL_XONXOFF_A "XONXOFF" +#define DPNA_FLOW_CONTROL_RTS_A "RTS" +#define DPNA_FLOW_CONTROL_DTR_A "DTR" +#define DPNA_FLOW_CONTROL_RTSDTR_A "RTSDTR" + +// Shortcut values +// +// These can be used instead of the corresponding CLSID_DP8SP_XXXX guids +// +#define DPNA_VALUE_TCPIPPROVIDER_A "IP" +#define DPNA_VALUE_IPXPROVIDER_A "IPX" +#define DPNA_VALUE_MODEMPROVIDER_A "MODEM" +#define DPNA_VALUE_SERIALPROVIDER_A "SERIAL" + +/**************************************************************************** + * + * DirectPlay8Address Functions + * + ****************************************************************************/ + +HRESULT WINAPI DirectPlay8AddressCreate( const GUID * pcIID, void **ppvInterface, IUnknown *pUnknown); + +/**************************************************************************** + * + * DirectPlay8Address Application Interfaces + * + ****************************************************************************/ + +// +// COM definition for IDirectPlay8Address Generic Interface +// +#undef INTERFACE // External COM Implementation +#define INTERFACE IDirectPlay8Address +DECLARE_INTERFACE_(IDirectPlay8Address,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectPlay8Address methods ***/ + + STDMETHOD(BuildFromURLW)(THIS_ WCHAR *pwszSourceURL ) PURE; + STDMETHOD(BuildFromURLA)(THIS_ CHAR *pszSourceURL ) PURE; + STDMETHOD(Duplicate)(THIS_ PDIRECTPLAY8ADDRESS *ppdpaNewAddress ) PURE; + STDMETHOD(SetEqual)(THIS_ PDIRECTPLAY8ADDRESS pdpaAddress ) PURE; + STDMETHOD(IsEqual)(THIS_ PDIRECTPLAY8ADDRESS pdpaAddress ) PURE; + STDMETHOD(Clear)(THIS ) PURE; + STDMETHOD(GetURLW)(THIS_ WCHAR *pwszURL, PDWORD pdwNumChars ) PURE; + STDMETHOD(GetURLA)(THIS_ CHAR *pszURL, PDWORD pdwNumChars) PURE; + STDMETHOD(GetSP)(THIS_ GUID *pguidSP ) PURE; + STDMETHOD(GetUserData)(THIS_ void *pvUserData, PDWORD pdwBufferSize) PURE; + STDMETHOD(SetSP)(THIS_ const GUID * const pguidSP ) PURE; + STDMETHOD(SetUserData)(THIS_ const void * const pvUserData, const DWORD dwDataSize) PURE; + STDMETHOD(GetNumComponents)(THIS_ PDWORD pdwNumComponents ) PURE; + STDMETHOD(GetComponentByName)(THIS_ const WCHAR * const pwszName, void *pvBuffer, PDWORD pdwBufferSize, PDWORD pdwDataType ) PURE; + STDMETHOD(GetComponentByIndex)(THIS_ const DWORD dwComponentID, WCHAR * pwszName, PDWORD pdwNameLen, void *pvBuffer, PDWORD pdwBufferSize, PDWORD pdwDataType ) PURE; + STDMETHOD(AddComponent)(THIS_ const WCHAR * const pwszName, const void * const lpvData, const DWORD dwDataSize, const DWORD dwDataType ) PURE; + STDMETHOD(GetDevice)(THIS_ GUID * ) PURE; + STDMETHOD(SetDevice)(THIS_ const GUID * const) PURE; + STDMETHOD(BuildFromDPADDRESS)( THIS_ LPVOID pvAddress, DWORD dwDataSize ) PURE; +}; + +// +// COM definition for IDirectPlay8AddressIP Generic Interface +// +#undef INTERFACE // External COM Implementation +#define INTERFACE IDirectPlay8AddressIP +DECLARE_INTERFACE_(IDirectPlay8AddressIP,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID, PVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /*** IDirectPlay8AddressIP methods ***/ + + // Constructs a IDirectPlay8 TCP Address from a SOCKADDR structure + STDMETHOD(BuildFromSockAddr)(THIS_ const SOCKADDR * const ) PURE; + + // Constructs a TCP Address from a string (hostname) and port + STDMETHOD(BuildAddress)(THIS_ const WCHAR * const wszAddress, const USHORT usPort ) PURE; + + // Builds a local TCP Address + STDMETHOD(BuildLocalAddress)(THIS_ const GUID * const pguidAdapter, const USHORT usPort ) PURE; + + // Gets the address from the structure in SOCKADR format + STDMETHOD(GetSockAddress)(THIS_ SOCKADDR *, PDWORD ) PURE; + + // Gets the local afddress + STDMETHOD(GetLocalAddress)(THIS_ GUID *pguidAdapter, USHORT *pusPort ) PURE; + + // Gets the remote address + STDMETHOD(GetAddress)(THIS_ WCHAR *wszAddress, PDWORD pdwAddressLength, USHORT *psPort ) PURE; + +}; + + + +/**************************************************************************** + * + * IDirectPlay8 application interface macros + * + ****************************************************************************/ + +#if !defined(__cplusplus) || defined(CINTERFACE) + +#define IDirectPlay8Address_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectPlay8Address_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectPlay8Address_Release(p) (p)->lpVtbl->Release(p) +#define IDirectPlay8Address_BuildFromURLW(p,a) (p)->lpVtbl->BuildFromURLW(p,a) +#define IDirectPlay8Address_BuildFromURLA(p,a) (p)->lpVtbl->BuildFromURLA(p,a) +#define IDirectPlay8Address_Duplicate(p,a) (p)->lpVtbl->Duplicate(p,a) +#define IDirectPlay8Address_SetEqual(p,a) (p)->lpVtbl->SetEqual(p,a) +#define IDirectPlay8Address_IsEqual(p,a) (p)->lpVtbl->IsEqual(p,a) +#define IDirectPlay8Address_Clear(p) (p)->lpVtbl->Clear(p) +#define IDirectPlay8Address_GetURLW(p,a,b) (p)->lpVtbl->GetURLW(p,a,b) +#define IDirectPlay8Address_GetURLA(p,a,b) (p)->lpVtbl->GetURLA(p,a,b) +#define IDirectPlay8Address_GetSP(p,a) (p)->lpVtbl->GetSP(p,a) +#define IDirectPlay8Address_GetUserData(p,a,b) (p)->lpVtbl->GetUserData(p,a,b) +#define IDirectPlay8Address_SetSP(p,a) (p)->lpVtbl->SetSP(p,a) +#define IDirectPlay8Address_SetUserData(p,a,b) (p)->lpVtbl->SetUserData(p,a,b) +#define IDirectPlay8Address_GetNumComponents(p,a) (p)->lpVtbl->GetNumComponents(p,a) +#define IDirectPlay8Address_GetComponentByName(p,a,b,c,d) (p)->lpVtbl->GetComponentByName(p,a,b,c,d) +#define IDirectPlay8Address_GetComponentByIndex(p,a,b,c,d,e,f) (p)->lpVtbl->GetComponentByIndex(p,a,b,c,d,e,f) +#define IDirectPlay8Address_AddComponent(p,a,b,c,d) (p)->lpVtbl->AddComponent(p,a,b,c,d) +#define IDirectPlay8Address_SetDevice(p,a) (p)->lpVtbl->SetDevice(p,a) +#define IDirectPlay8Address_GetDevice(p,a) (p)->lpVtbl->GetDevice(p,a) +#define IDirectPlay8Address_BuildFromDirectPlay4Address(p,a,b) (p)->lpVtbl->BuildFromDirectPlay4Address(p,a,b) + +#define IDirectPlay8AddressIP_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectPlay8AddressIP_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectPlay8AddressIP_Release(p) (p)->lpVtbl->Release(p) +#define IDirectPlay8AddressIP_BuildFromSockAddr(p,a) (p)->lpVtbl->BuildFromSockAddr(p,a) +#define IDirectPlay8AddressIP_BuildAddress(p,a,b) (p)->lpVtbl->BuildAddress(p,a,b) +#define IDirectPlay8AddressIP_BuildLocalAddress(p,a,b) (p)->lpVtbl->BuildLocalAddress(p,a,b) +#define IDirectPlay8AddressIP_GetSockAddress(p,a,b) (p)->lpVtbl->GetSockAddress(p,a,b) +#define IDirectPlay8AddressIP_GetLocalAddress(p,a,b) (p)->lpVtbl->GetLocalAddress(p,a,b) +#define IDirectPlay8AddressIP_GetAddress(p,a,b,c) (p)->lpVtbl->GetAddress(p,a,b,c) + + +#else /* C++ */ + +#define IDirectPlay8Address_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectPlay8Address_AddRef(p) (p)->AddRef() +#define IDirectPlay8Address_Release(p) (p)->Release() +#define IDirectPlay8Address_BuildFromURLW(p,a) (p)->BuildFromURLW(a) +#define IDirectPlay8Address_BuildFromURLA(p,a) (p)->BuildFromURLA(a) +#define IDirectPlay8Address_Duplicate(p,a) (p)->Duplicate(a) +#define IDirectPlay8Address_SetEqual(p,a) (p)->SetEqual(a) +#define IDirectPlay8Address_IsEqual(p,a) (p)->IsEqual(a) +#define IDirectPlay8Address_Clear(p) (p)->Clear() +#define IDirectPlay8Address_GetURLW(p,a,b) (p)->GetURLW(a,b) +#define IDirectPlay8Address_GetURLA(p,a,b) (p)->GetURLA(a,b) +#define IDirectPlay8Address_GetSP(p,a) (p)->GetSP(a) +#define IDirectPlay8Address_GetUserData(p,a,b) (p)->GetUserData(a,b) +#define IDirectPlay8Address_SetSP(p,a) (p)->SetSP(a) +#define IDirectPlay8Address_SetUserData(p,a,b) (p)->SetUserData(a,b) +#define IDirectPlay8Address_GetNumComponents(p,a) (p)->GetNumComponents(a) +#define IDirectPlay8Address_GetComponentByName(p,a,b,c,d) (p)->GetComponentByName(a,b,c,d) +#define IDirectPlay8Address_GetComponentByIndex(p,a,b,c,d,e,f) (p)->GetComponentByIndex(a,b,c,d,e,f) +#define IDirectPlay8Address_AddComponent(p,a,b,c,d) (p)->AddComponent(a,b,c,d) +#define IDirectPlay8Address_SetDevice(p,a) (p)->SetDevice(a) +#define IDirectPlay8Address_GetDevice(p,a) (p)->GetDevice(a) +#define IDirectPlay8Address_BuildFromDirectPlay4Address(p,a,b) (p)->BuildFromDirectPlay4Address(a,b) + +#define IDirectPlay8AddressIP_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectPlay8AddressIP_AddRef(p) (p)->AddRef() +#define IDirectPlay8AddressIP_Release(p) (p)->Release() +#define IDirectPlay8AddressIP_BuildFromSockAddr(p,a) (p)->BuildFromSockAddr(a) +#define IDirectPlay8AddressIP_BuildAddress(p,a,b) (p)->BuildAddress(a,b) +#define IDirectPlay8AddressIP_BuildLocalAddress(p,a,b) (p)->BuildLocalAddress(a,b) +#define IDirectPlay8AddressIP_GetSockAddress(p,a,b) (p)->GetSockAddress(a,b) +#define IDirectPlay8AddressIP_GetLocalAddress(p,a,b) (p)->GetLocalAddress(a,b) +#define IDirectPlay8AddressIP_GetAddress(p,a,b,c) (p)->GetAddress(a,b,c) + + +#endif + + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/dplay.h b/windows_libs/mssdk/include/dplay.h new file mode 100644 index 00000000..8ffe3c6d --- /dev/null +++ b/windows_libs/mssdk/include/dplay.h @@ -0,0 +1,2146 @@ +/*==========================================================================; + * + * Copyright (C) 1994-1997 Microsoft Corporation. All Rights Reserved. + * + * File: dplay.h + * Content: DirectPlay include file + * + ***************************************************************************/ + +#ifndef __DPLAY_INCLUDED__ +#define __DPLAY_INCLUDED__ + +#include // for DECLARE_INTERFACE and HRESULT + +/* avoid warnings in MSVC at Level4 */ +#pragma warning(disable:4201) + + +/* + * Some types + */ + +#ifndef _WIN64 +#define DWORD_PTR DWORD +#endif + +typedef LPVOID (*LPRGLPVOID)[]; +typedef LPRGLPVOID PRGPVOID, LPRGPVOID, PRGLPVOID, PAPVOID, LPAPVOID, PALPVOID, LPALPVOID; + +#define VOL volatile +typedef VOID *VOL LPVOIDV; + + +#define _FACDP 0x877 +#define MAKE_DPHRESULT( code ) MAKE_HRESULT( 1, _FACDP, code ) + +#ifdef __cplusplus +extern "C" { +#endif + +/* + * GUIDS used by DirectPlay objects + */ +DEFINE_GUID(IID_IDirectPlay2, 0x2b74f7c0, 0x9154, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3); +DEFINE_GUID(IID_IDirectPlay2A,0x9d460580, 0xa822, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82); + +DEFINE_GUID(IID_IDirectPlay3, 0x133efe40, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb); +DEFINE_GUID(IID_IDirectPlay3A,0x133efe41, 0x32dc, 0x11d0, 0x9c, 0xfb, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb); + +DEFINE_GUID(IID_IDirectPlay4, 0xab1c530, 0x4745, 0x11d1, 0xa7, 0xa1, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc); +DEFINE_GUID(IID_IDirectPlay4A,0xab1c531, 0x4745, 0x11d1, 0xa7, 0xa1, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc); + +// {D1EB6D20-8923-11d0-9D97-00A0C90A43CB} +DEFINE_GUID(CLSID_DirectPlay,0xd1eb6d20, 0x8923, 0x11d0, 0x9d, 0x97, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb); + +/* + * GUIDS used by Service Providers shipped with DirectPlay + * Use these to identify Service Provider returned by EnumConnections + */ + +// GUID for IPX service provider +// {685BC400-9D2C-11cf-A9CD-00AA006886E3} +DEFINE_GUID(DPSPGUID_IPX, +0x685bc400, 0x9d2c, 0x11cf, 0xa9, 0xcd, 0x0, 0xaa, 0x0, 0x68, 0x86, 0xe3); + +// GUID for TCP/IP service provider +// 36E95EE0-8577-11cf-960C-0080C7534E82 +DEFINE_GUID(DPSPGUID_TCPIP, +0x36E95EE0, 0x8577, 0x11cf, 0x96, 0xc, 0x0, 0x80, 0xc7, 0x53, 0x4e, 0x82); + +// GUID for Serial service provider +// {0F1D6860-88D9-11cf-9C4E-00A0C905425E} +DEFINE_GUID(DPSPGUID_SERIAL, +0xf1d6860, 0x88d9, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +// GUID for Modem service provider +// {44EAA760-CB68-11cf-9C4E-00A0C905425E} +DEFINE_GUID(DPSPGUID_MODEM, +0x44eaa760, 0xcb68, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +/**************************************************************************** + * + * DirectPlay Structures + * + * Various structures used to invoke DirectPlay. + * + ****************************************************************************/ + +#ifndef IDIRECTPLAY2_OR_GREATER +typedef struct IDirectPlay FAR *LPDIRECTPLAY; +#else +typedef struct IUnknown FAR *LPDIRECTPLAY; +#endif + +typedef struct IDirectPlay2 FAR *LPDIRECTPLAY2; +typedef struct IDirectPlay2 FAR *LPDIRECTPLAY2A; +typedef struct IDirectPlay2 IDirectPlay2A; + +typedef struct IDirectPlay3 FAR *LPDIRECTPLAY3; +typedef struct IDirectPlay3 FAR *LPDIRECTPLAY3A; +typedef struct IDirectPlay3 IDirectPlay3A; + +typedef struct IDirectPlay4 FAR *LPDIRECTPLAY4; +typedef struct IDirectPlay4 FAR *LPDIRECTPLAY4A; +typedef struct IDirectPlay4 IDirectPlay4A; + +/* + * DPID + * DirectPlay player and group ID + */ +typedef DWORD DPID, FAR *LPDPID; + +/* + * DPID that system messages come from + */ +#define DPID_SYSMSG 0 + +/* + * DPID representing all players in the session + */ +#define DPID_ALLPLAYERS 0 + +/* + * DPID representing the server player + */ +#define DPID_SERVERPLAYER 1 + + +/* + * DPID representing the maxiumum ID in the range of DPID's reserved for + * use by DirectPlay. + */ +#define DPID_RESERVEDRANGE 100 + +/* + * The player ID is unknown (used with e.g. DPSESSION_NOMESSAGEID) + */ +#define DPID_UNKNOWN 0xFFFFFFFF + +/* + * DPCAPS + * Used to obtain the capabilities of a DirectPlay object + */ +typedef struct +{ + DWORD dwSize; // Size of structure, in bytes + DWORD dwFlags; // DPCAPS_xxx flags + DWORD dwMaxBufferSize; // Maximum message size, in bytes, for this service provider + DWORD dwMaxQueueSize; // Obsolete. + DWORD dwMaxPlayers; // Maximum players/groups (local + remote) + DWORD dwHundredBaud; // Bandwidth in 100 bits per second units; + // i.e. 24 is 2400, 96 is 9600, etc. + DWORD dwLatency; // Estimated latency; 0 = unknown + DWORD dwMaxLocalPlayers; // Maximum # of locally created players allowed + DWORD dwHeaderLength; // Maximum header length, in bytes, on messages + // added by the service provider + DWORD dwTimeout; // Service provider's suggested timeout value + // This is how long DirectPlay will wait for + // responses to system messages +} DPCAPS, FAR *LPDPCAPS; + +/* + * This DirectPlay object is the session host. If the host exits the + * session, another application will become the host and receive a + * DPSYS_HOST system message. + */ +#define DPCAPS_ISHOST 0x00000002 + +/* + * The service provider bound to this DirectPlay object can optimize + * group messaging. + */ +#define DPCAPS_GROUPOPTIMIZED 0x00000008 + +/* + * The service provider bound to this DirectPlay object can optimize + * keep alives (see DPSESSION_KEEPALIVE) + */ +#define DPCAPS_KEEPALIVEOPTIMIZED 0x00000010 + +/* + * The service provider bound to this DirectPlay object can optimize + * guaranteed message delivery. + */ +#define DPCAPS_GUARANTEEDOPTIMIZED 0x00000020 + +/* + * This DirectPlay object supports guaranteed message delivery. + */ +#define DPCAPS_GUARANTEEDSUPPORTED 0x00000040 + +/* + * This DirectPlay object supports digital signing of messages. + */ +#define DPCAPS_SIGNINGSUPPORTED 0x00000080 + +/* + * This DirectPlay object supports encryption of messages. + */ +#define DPCAPS_ENCRYPTIONSUPPORTED 0x00000100 + +/* + * This DirectPlay player was created on this machine + */ +#define DPPLAYERCAPS_LOCAL 0x00000800 + +/* + * Current Open settings supports all forms of Cancel + */ +#define DPCAPS_ASYNCCANCELSUPPORTED 0x00001000 + +/* + * Current Open settings supports CancelAll, but not Cancel + */ +#define DPCAPS_ASYNCCANCELALLSUPPORTED 0x00002000 + +/* + * Current Open settings supports Send Timeouts for sends + */ +#define DPCAPS_SENDTIMEOUTSUPPORTED 0x00004000 + +/* + * Current Open settings supports send priority + */ +#define DPCAPS_SENDPRIORITYSUPPORTED 0x00008000 + +/* + * Current Open settings supports DPSEND_ASYNC flag + */ +#define DPCAPS_ASYNCSUPPORTED 0x00010000 + + +/* + * DPSESSIONDESC2 + * Used to describe the properties of a DirectPlay + * session instance + */ +typedef struct +{ + DWORD dwSize; // Size of structure + DWORD dwFlags; // DPSESSION_xxx flags + GUID guidInstance; // ID for the session instance + GUID guidApplication; // GUID of the DirectPlay application. + // GUID_NULL for all applications. + DWORD dwMaxPlayers; // Maximum # players allowed in session + DWORD dwCurrentPlayers; // Current # players in session (read only) + union + { // Name of the session + LPWSTR lpszSessionName; // Unicode + LPSTR lpszSessionNameA; // ANSI + }; + union + { // Password of the session (optional) + LPWSTR lpszPassword; // Unicode + LPSTR lpszPasswordA; // ANSI + }; + DWORD_PTR dwReserved1; // Reserved for future MS use. + DWORD_PTR dwReserved2; + DWORD_PTR dwUser1; // For use by the application + DWORD_PTR dwUser2; + DWORD_PTR dwUser3; + DWORD_PTR dwUser4; +} DPSESSIONDESC2, FAR *LPDPSESSIONDESC2; + +typedef DPSESSIONDESC2 * VOL LPDPSESSIONDESC2_V; + +/* + * LPCDPSESSIONDESC2 + * A constant pointer to DPSESSIONDESC2 + */ +typedef const DPSESSIONDESC2 FAR *LPCDPSESSIONDESC2; + +/* + * Applications cannot create new players in this session. + */ +#define DPSESSION_NEWPLAYERSDISABLED 0x00000001 + +/* + * If the DirectPlay object that created the session, the host, + * quits, then the host will attempt to migrate to another + * DirectPlay object so that new players can continue to be created + * and new applications can join the session. + */ +#define DPSESSION_MIGRATEHOST 0x00000004 + +/* + * This flag tells DirectPlay not to set the idPlayerTo and idPlayerFrom + * fields in player messages. This cuts two DWORD's off the message + * overhead. + */ +#define DPSESSION_NOMESSAGEID 0x00000008 + + +/* + * This flag tells DirectPlay to not allow any new applications to + * join the session. Applications already in the session can still + * create new players. + */ +#define DPSESSION_JOINDISABLED 0x00000020 + +/* + * This flag tells DirectPlay to detect when remote players + * exit abnormally (e.g. their computer or modem gets unplugged) + */ +#define DPSESSION_KEEPALIVE 0x00000040 + +/* + * This flag tells DirectPlay not to send a message to all players + * when a players remote data changes + */ +#define DPSESSION_NODATAMESSAGES 0x00000080 + +/* + * This flag indicates that the session belongs to a secure server + * and needs user authentication + */ +#define DPSESSION_SECURESERVER 0x00000100 + +/* + * This flag indicates that the session is private and requirs a password + * for EnumSessions as well as Open. + */ +#define DPSESSION_PRIVATE 0x00000200 + +/* + * This flag indicates that the session requires a password for joining. + */ +#define DPSESSION_PASSWORDREQUIRED 0x00000400 + +/* + * This flag tells DirectPlay to route all messages through the server + */ +#define DPSESSION_MULTICASTSERVER 0x00000800 + +/* + * This flag tells DirectPlay to only download information about the + * DPPLAYER_SERVERPLAYER. + */ +#define DPSESSION_CLIENTSERVER 0x00001000 + +/* + * This flag tells DirectPlay to use the protocol built into dplay + * for reliability and statistics all the time. When this bit is + * set, only other sessions with this bit set can join or be joined. + */ +#define DPSESSION_DIRECTPLAYPROTOCOL 0x00002000 + +/* + * This flag tells DirectPlay that preserving order of received + * packets is not important, when using reliable delivery. This + * will allow messages to be indicated out of order if preceding + * messages have not yet arrived. Otherwise DPLAY will wait for + * earlier messages before delivering later reliable messages. + */ +#define DPSESSION_NOPRESERVEORDER 0x00004000 + + +/* + * This flag tells DirectPlay to optimize communication for latency + */ +#define DPSESSION_OPTIMIZELATENCY 0x00008000 + +/* + * This flag allows lobby launched games that aren't voice enabled + * to get voice capabilities. + */ +#define DPSESSION_ALLOWVOICERETRO 0x00010000 + +/* + * This flag supresses transmission of session desc changes. + * DPSESSION_NODATAMESSAGES was supposed to do that, but SetSessionDesc + * was ignoring the flag and some apps depended on the broken behavior, this + * flag allows applications to get the right behaviour without breaking apps depending + * on old broken behavior. + */ +#define DPSESSION_NOSESSIONDESCMESSAGES 0x00020000 + +/* + * DPNAME + * Used to hold the name of a DirectPlay entity + * like a player or a group + */ +typedef struct +{ + DWORD dwSize; // Size of structure + DWORD dwFlags; // Not used. Must be zero. + union + { // The short or friendly name + LPWSTR lpszShortName; // Unicode + LPSTR lpszShortNameA; // ANSI + }; + union + { // The long or formal name + LPWSTR lpszLongName; // Unicode + LPSTR lpszLongNameA; // ANSI + }; + +} DPNAME, FAR *LPDPNAME; + +/* + * LPCDPNAME + * A constant pointer to DPNAME + */ +typedef const DPNAME FAR *LPCDPNAME; + +/* + * DPCREDENTIALS + * Used to hold the user name and password of a DirectPlay user + */ +typedef struct +{ + DWORD dwSize; // Size of structure + DWORD dwFlags; // Not used. Must be zero. + union + { // User name of the account + LPWSTR lpszUsername; // Unicode + LPSTR lpszUsernameA; // ANSI + }; + union + { // Password of the account + LPWSTR lpszPassword; // Unicode + LPSTR lpszPasswordA; // ANSI + }; + union + { // Domain name of the account + LPWSTR lpszDomain; // Unicode + LPSTR lpszDomainA; // ANSI + }; +} DPCREDENTIALS, FAR *LPDPCREDENTIALS; + +typedef const DPCREDENTIALS FAR *LPCDPCREDENTIALS; + +/* + * DPSECURITYDESC + * Used to describe the security properties of a DirectPlay + * session instance + */ +typedef struct +{ + DWORD dwSize; // Size of structure + DWORD dwFlags; // Not used. Must be zero. + union + { // SSPI provider name + LPWSTR lpszSSPIProvider; // Unicode + LPSTR lpszSSPIProviderA; // ANSI + }; + union + { // CAPI provider name + LPWSTR lpszCAPIProvider; // Unicode + LPSTR lpszCAPIProviderA; // ANSI + }; + DWORD dwCAPIProviderType; // Crypto Service Provider type + DWORD dwEncryptionAlgorithm; // Encryption Algorithm type +} DPSECURITYDESC, FAR *LPDPSECURITYDESC; + +typedef const DPSECURITYDESC FAR *LPCDPSECURITYDESC; + +/* + * DPACCOUNTDESC + * Used to describe a user membership account + */ +typedef struct +{ + DWORD dwSize; // Size of structure + DWORD dwFlags; // Not used. Must be zero. + union + { // Account identifier + LPWSTR lpszAccountID; // Unicode + LPSTR lpszAccountIDA; // ANSI + }; +} DPACCOUNTDESC, FAR *LPDPACCOUNTDESC; + +typedef const DPACCOUNTDESC FAR *LPCDPACCOUNTDESC; + +/* + * LPCGUID + * A constant pointer to a guid + */ +typedef const GUID FAR *LPCGUID; + +/* + * DPLCONNECTION + * Used to hold all in the informaion needed to connect + * an application to a session or create a session + */ +typedef struct +{ + DWORD dwSize; // Size of this structure + DWORD dwFlags; // Flags specific to this structure + LPDPSESSIONDESC2 lpSessionDesc; // Pointer to session desc to use on connect + LPDPNAME lpPlayerName; // Pointer to Player name structure + GUID guidSP; // GUID of the DPlay SP to use + LPVOID lpAddress; // Address for service provider + DWORD dwAddressSize; // Size of address data +} DPLCONNECTION, FAR *LPDPLCONNECTION; + +/* + * LPCDPLCONNECTION + * A constant pointer to DPLCONNECTION + */ +typedef const DPLCONNECTION FAR *LPCDPLCONNECTION; + +/* + * DPCHAT + * Used to hold the a DirectPlay chat message + */ +typedef struct +{ + DWORD dwSize; + DWORD dwFlags; + union + { // Message string + LPWSTR lpszMessage; // Unicode + LPSTR lpszMessageA; // ANSI + }; +} DPCHAT, FAR * LPDPCHAT; + +/* + * SGBUFFER + * Scatter Gather Buffer used for SendEx + */ +typedef struct +{ + UINT len; // length of buffer data + PUCHAR pData; // pointer to buffer data +} SGBUFFER, *PSGBUFFER, FAR *LPSGBUFFER; + + +/**************************************************************************** + * + * Prototypes for DirectPlay callback functions + * + ****************************************************************************/ + +/* + * Callback for IDirectPlay2::EnumSessions + */ +typedef BOOL (FAR PASCAL * LPDPENUMSESSIONSCALLBACK2)( + LPCDPSESSIONDESC2 lpThisSD, + LPDWORD lpdwTimeOut, + DWORD dwFlags, + LPVOID lpContext ); + +/* + * This flag is set on the EnumSessions callback dwFlags parameter when + * the time out has occurred. There will be no session data for this + * callback. If *lpdwTimeOut is set to a non-zero value and the + * EnumSessionsCallback function returns TRUE then EnumSessions will + * continue waiting until the next timeout occurs. Timeouts are in + * milliseconds. + */ +#define DPESC_TIMEDOUT 0x00000001 + + +/* + * Callback for IDirectPlay2::EnumPlayers + * IDirectPlay2::EnumGroups + * IDirectPlay2::EnumGroupPlayers + */ +typedef BOOL (FAR PASCAL *LPDPENUMPLAYERSCALLBACK2)( + DPID dpId, + DWORD dwPlayerType, + LPCDPNAME lpName, + DWORD dwFlags, + LPVOID lpContext ); + + +/* + * Unicode callback for DirectPlayEnumerate + * This callback prototype will be used if compiling + * for Unicode strings + */ +typedef BOOL (FAR PASCAL * LPDPENUMDPCALLBACK)( + LPGUID lpguidSP, + LPWSTR lpSPName, + DWORD dwMajorVersion, + DWORD dwMinorVersion, + LPVOID lpContext); + +/* + * ANSI callback for DirectPlayEnumerate + * This callback prototype will be used if compiling + * for ANSI strings + */ +typedef BOOL (FAR PASCAL * LPDPENUMDPCALLBACKA)( + LPGUID lpguidSP, + LPSTR lpSPName, + DWORD dwMajorVersion, + DWORD dwMinorVersion, + LPVOID lpContext); + +/* + * Callback for IDirectPlay3(A)::EnumConnections + */ +typedef BOOL (FAR PASCAL * LPDPENUMCONNECTIONSCALLBACK)( + LPCGUID lpguidSP, + LPVOID lpConnection, + DWORD dwConnectionSize, + LPCDPNAME lpName, + DWORD dwFlags, + LPVOID lpContext); + + +/* + * API's + */ + +#ifdef UNICODE +#define DirectPlayEnumerate DirectPlayEnumerateW +#else +#define DirectPlayEnumerate DirectPlayEnumerateA +#endif // UNICODE + +extern HRESULT WINAPI DirectPlayEnumerateA( LPDPENUMDPCALLBACKA, LPVOID ); +extern HRESULT WINAPI DirectPlayEnumerateW( LPDPENUMDPCALLBACK, LPVOID ); +extern HRESULT WINAPI DirectPlayCreate( LPGUID lpGUID, LPDIRECTPLAY *lplpDP, IUnknown *pUnk); + +/**************************************************************************** + * + * IDirectPlay2 (and IDirectPlay2A) Interface + * + ****************************************************************************/ + +#undef INTERFACE +#define INTERFACE IDirectPlay2 +DECLARE_INTERFACE_( IDirectPlay2, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectPlay2 methods ***/ + STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE; + STDMETHOD(Close) (THIS) PURE; + STDMETHOD(CreateGroup) (THIS_ LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPDPNAME,HANDLE,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE; + STDMETHOD(DestroyGroup) (THIS_ DPID) PURE; + STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE; + STDMETHOD(EnumGroupPlayers) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; + STDMETHOD(EnumGroups) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; + STDMETHOD(EnumPlayers) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; + STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC2,DWORD,LPDPENUMSESSIONSCALLBACK2,LPVOID,DWORD) PURE; + STDMETHOD(GetCaps) (THIS_ LPDPCAPS,DWORD) PURE; + STDMETHOD(GetGroupData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE; + STDMETHOD(GetGroupName) (THIS_ DPID,LPVOID,LPDWORD) PURE; + STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE; + STDMETHOD(GetPlayerAddress) (THIS_ DPID,LPVOID,LPDWORD) PURE; + STDMETHOD(GetPlayerCaps) (THIS_ DPID,LPDPCAPS,DWORD) PURE; + STDMETHOD(GetPlayerData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE; + STDMETHOD(GetPlayerName) (THIS_ DPID,LPVOID,LPDWORD) PURE; + STDMETHOD(GetSessionDesc) (THIS_ LPVOID,LPDWORD) PURE; + STDMETHOD(Initialize) (THIS_ LPGUID) PURE; + STDMETHOD(Open) (THIS_ LPDPSESSIONDESC2,DWORD) PURE; + STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE; + STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE; + STDMETHOD(SetGroupData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(SetGroupName) (THIS_ DPID,LPDPNAME,DWORD) PURE; + STDMETHOD(SetPlayerData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(SetPlayerName) (THIS_ DPID,LPDPNAME,DWORD) PURE; + STDMETHOD(SetSessionDesc) (THIS_ LPDPSESSIONDESC2,DWORD) PURE; +}; + +/**************************************************************************** + * + * IDirectPlay2 interface macros + * + ****************************************************************************/ + +#if !defined(__cplusplus) || defined(CINTERFACE) + +#define IDirectPlay2_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectPlay2_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectPlay2_Release(p) (p)->lpVtbl->Release(p) +#define IDirectPlay2_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b) +#define IDirectPlay2_Close(p) (p)->lpVtbl->Close(p) +#define IDirectPlay2_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e) +#define IDirectPlay2_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f) +#define IDirectPlay2_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b) +#define IDirectPlay2_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a) +#define IDirectPlay2_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a) +#define IDirectPlay2_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e) +#define IDirectPlay2_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d) +#define IDirectPlay2_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d) +#define IDirectPlay2_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e) +#define IDirectPlay2_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirectPlay2_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b) +#define IDirectPlay2_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d) +#define IDirectPlay2_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c) +#define IDirectPlay2_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c) +#define IDirectPlay2_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c) +#define IDirectPlay2_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d) +#define IDirectPlay2_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c) +#define IDirectPlay2_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b) +#define IDirectPlay2_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirectPlay2_Open(p,a,b) (p)->lpVtbl->Open(p,a,b) +#define IDirectPlay2_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e) +#define IDirectPlay2_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e) +#define IDirectPlay2_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d) +#define IDirectPlay2_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c) +#define IDirectPlay2_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d) +#define IDirectPlay2_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c) +#define IDirectPlay2_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b) + +#else /* C++ */ + +#define IDirectPlay2_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectPlay2_AddRef(p) (p)->AddRef() +#define IDirectPlay2_Release(p) (p)->Release() +#define IDirectPlay2_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b) +#define IDirectPlay2_Close(p) (p)->Close() +#define IDirectPlay2_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e) +#define IDirectPlay2_CreatePlayer(p,a,b,c,d,e,f) (p)->CreatePlayer(a,b,c,d,e,f) +#define IDirectPlay2_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b) +#define IDirectPlay2_DestroyGroup(p,a) (p)->DestroyGroup(a) +#define IDirectPlay2_DestroyPlayer(p,a) (p)->DestroyPlayer(a) +#define IDirectPlay2_EnumGroupPlayers(p,a,b,c,d,e) (p)->EnumGroupPlayers(a,b,c,d,e) +#define IDirectPlay2_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d) +#define IDirectPlay2_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d) +#define IDirectPlay2_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e) +#define IDirectPlay2_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirectPlay2_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b) +#define IDirectPlay2_GetGroupData(p,a,b,c,d) (p)->GetGroupData(a,b,c,d) +#define IDirectPlay2_GetGroupName(p,a,b,c) (p)->GetGroupName(a,b,c) +#define IDirectPlay2_GetPlayerAddress(p,a,b,c) (p)->GetPlayerAddress(a,b,c) +#define IDirectPlay2_GetPlayerCaps(p,a,b,c) (p)->GetPlayerCaps(a,b,c) +#define IDirectPlay2_GetPlayerData(p,a,b,c,d) (p)->GetPlayerData(a,b,c,d) +#define IDirectPlay2_GetPlayerName(p,a,b,c) (p)->GetPlayerName(a,b,c) +#define IDirectPlay2_GetSessionDesc(p,a,b) (p)->GetSessionDesc(a,b) +#define IDirectPlay2_Initialize(p,a) (p)->Initialize(a) +#define IDirectPlay2_Open(p,a,b) (p)->Open(a,b) +#define IDirectPlay2_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e) +#define IDirectPlay2_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e) +#define IDirectPlay2_SetGroupData(p,a,b,c,d) (p)->SetGroupData(a,b,c,d) +#define IDirectPlay2_SetGroupName(p,a,b,c) (p)->SetGroupName(a,b,c) +#define IDirectPlay2_SetPlayerData(p,a,b,c,d) (p)->SetPlayerData(a,b,c,d) +#define IDirectPlay2_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c) +#define IDirectPlay2_SetSessionDesc(p,a,b) (p)->SetSessionDesc(a,b) + +#endif + +/**************************************************************************** + * + * IDirectPlay3 (and IDirectPlay3A) Interface + * + ****************************************************************************/ + +#undef INTERFACE +#define INTERFACE IDirectPlay3 +DECLARE_INTERFACE_( IDirectPlay3, IDirectPlay2 ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectPlay2 methods ***/ + STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE; + STDMETHOD(Close) (THIS) PURE; + STDMETHOD(CreateGroup) (THIS_ LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPDPNAME,HANDLE,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE; + STDMETHOD(DestroyGroup) (THIS_ DPID) PURE; + STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE; + STDMETHOD(EnumGroupPlayers) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; + STDMETHOD(EnumGroups) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; + STDMETHOD(EnumPlayers) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; + STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC2,DWORD,LPDPENUMSESSIONSCALLBACK2,LPVOID,DWORD) PURE; + STDMETHOD(GetCaps) (THIS_ LPDPCAPS,DWORD) PURE; + STDMETHOD(GetGroupData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE; + STDMETHOD(GetGroupName) (THIS_ DPID,LPVOID,LPDWORD) PURE; + STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE; + STDMETHOD(GetPlayerAddress) (THIS_ DPID,LPVOID,LPDWORD) PURE; + STDMETHOD(GetPlayerCaps) (THIS_ DPID,LPDPCAPS,DWORD) PURE; + STDMETHOD(GetPlayerData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE; + STDMETHOD(GetPlayerName) (THIS_ DPID,LPVOID,LPDWORD) PURE; + STDMETHOD(GetSessionDesc) (THIS_ LPVOID,LPDWORD) PURE; + STDMETHOD(Initialize) (THIS_ LPGUID) PURE; + STDMETHOD(Open) (THIS_ LPDPSESSIONDESC2,DWORD) PURE; + STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE; + STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE; + STDMETHOD(SetGroupData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(SetGroupName) (THIS_ DPID,LPDPNAME,DWORD) PURE; + STDMETHOD(SetPlayerData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(SetPlayerName) (THIS_ DPID,LPDPNAME,DWORD) PURE; + STDMETHOD(SetSessionDesc) (THIS_ LPDPSESSIONDESC2,DWORD) PURE; + /*** IDirectPlay3 methods ***/ + STDMETHOD(AddGroupToGroup) (THIS_ DPID, DPID) PURE; + STDMETHOD(CreateGroupInGroup) (THIS_ DPID,LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(DeleteGroupFromGroup) (THIS_ DPID,DPID) PURE; + STDMETHOD(EnumConnections) (THIS_ LPCGUID,LPDPENUMCONNECTIONSCALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(EnumGroupsInGroup) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; + STDMETHOD(GetGroupConnectionSettings)(THIS_ DWORD, DPID, LPVOID, LPDWORD) PURE; + STDMETHOD(InitializeConnection) (THIS_ LPVOID,DWORD) PURE; + STDMETHOD(SecureOpen) (THIS_ LPCDPSESSIONDESC2,DWORD,LPCDPSECURITYDESC,LPCDPCREDENTIALS) PURE; + STDMETHOD(SendChatMessage) (THIS_ DPID,DPID,DWORD,LPDPCHAT) PURE; + STDMETHOD(SetGroupConnectionSettings)(THIS_ DWORD,DPID,LPDPLCONNECTION) PURE; + STDMETHOD(StartSession) (THIS_ DWORD,DPID) PURE; + STDMETHOD(GetGroupFlags) (THIS_ DPID,LPDWORD) PURE; + STDMETHOD(GetGroupParent) (THIS_ DPID,LPDPID) PURE; + STDMETHOD(GetPlayerAccount) (THIS_ DPID, DWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(GetPlayerFlags) (THIS_ DPID,LPDWORD) PURE; +}; + +/**************************************************************************** + * + * IDirectPlay3 interface macros + * + ****************************************************************************/ + +#if !defined(__cplusplus) || defined(CINTERFACE) + +#define IDirectPlay3_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectPlay3_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectPlay3_Release(p) (p)->lpVtbl->Release(p) +#define IDirectPlay3_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b) +#define IDirectPlay3_Close(p) (p)->lpVtbl->Close(p) +#define IDirectPlay3_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e) +#define IDirectPlay3_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f) +#define IDirectPlay3_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b) +#define IDirectPlay3_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a) +#define IDirectPlay3_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a) +#define IDirectPlay3_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e) +#define IDirectPlay3_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d) +#define IDirectPlay3_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d) +#define IDirectPlay3_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e) +#define IDirectPlay3_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirectPlay3_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b) +#define IDirectPlay3_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d) +#define IDirectPlay3_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c) +#define IDirectPlay3_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c) +#define IDirectPlay3_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c) +#define IDirectPlay3_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d) +#define IDirectPlay3_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c) +#define IDirectPlay3_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b) +#define IDirectPlay3_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirectPlay3_Open(p,a,b) (p)->lpVtbl->Open(p,a,b) +#define IDirectPlay3_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e) +#define IDirectPlay3_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e) +#define IDirectPlay3_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d) +#define IDirectPlay3_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c) +#define IDirectPlay3_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d) +#define IDirectPlay3_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c) +#define IDirectPlay3_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b) +#define IDirectPlay3_AddGroupToGroup(p,a,b) (p)->lpVtbl->AddGroupToGroup(p,a,b) +#define IDirectPlay3_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->lpVtbl->CreateGroupInGroup(p,a,b,c,d,e,f) +#define IDirectPlay3_DeleteGroupFromGroup(p,a,b) (p)->lpVtbl->DeleteGroupFromGroup(p,a,b) +#define IDirectPlay3_EnumConnections(p,a,b,c,d) (p)->lpVtbl->EnumConnections(p,a,b,c,d) +#define IDirectPlay3_EnumGroupsInGroup(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupsInGroup(p,a,b,c,d,e) +#define IDirectPlay3_GetGroupConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetGroupConnectionSettings(p,a,b,c,d) +#define IDirectPlay3_InitializeConnection(p,a,b) (p)->lpVtbl->InitializeConnection(p,a,b) +#define IDirectPlay3_SecureOpen(p,a,b,c,d) (p)->lpVtbl->SecureOpen(p,a,b,c,d) +#define IDirectPlay3_SendChatMessage(p,a,b,c,d) (p)->lpVtbl->SendChatMessage(p,a,b,c,d) +#define IDirectPlay3_SetGroupConnectionSettings(p,a,b,c) (p)->lpVtbl->SetGroupConnectionSettings(p,a,b,c) +#define IDirectPlay3_StartSession(p,a,b) (p)->lpVtbl->StartSession(p,a,b) +#define IDirectPlay3_GetGroupFlags(p,a,b) (p)->lpVtbl->GetGroupFlags(p,a,b) +#define IDirectPlay3_GetGroupParent(p,a,b) (p)->lpVtbl->GetGroupParent(p,a,b) +#define IDirectPlay3_GetPlayerAccount(p,a,b,c,d) (p)->lpVtbl->GetPlayerAccount(p,a,b,c,d) +#define IDirectPlay3_GetPlayerFlags(p,a,b) (p)->lpVtbl->GetPlayerFlags(p,a,b) + +#else /* C++ */ + +#define IDirectPlay3_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectPlay3_AddRef(p) (p)->AddRef() +#define IDirectPlay3_Release(p) (p)->Release() +#define IDirectPlay3_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b) +#define IDirectPlay3_Close(p) (p)->Close() +#define IDirectPlay3_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e) +#define IDirectPlay3_CreatePlayer(p,a,b,c,d,e,f) (p)->CreatePlayer(a,b,c,d,e,f) +#define IDirectPlay3_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b) +#define IDirectPlay3_DestroyGroup(p,a) (p)->DestroyGroup(a) +#define IDirectPlay3_DestroyPlayer(p,a) (p)->DestroyPlayer(a) +#define IDirectPlay3_EnumGroupPlayers(p,a,b,c,d,e) (p)->EnumGroupPlayers(a,b,c,d,e) +#define IDirectPlay3_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d) +#define IDirectPlay3_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d) +#define IDirectPlay3_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e) +#define IDirectPlay3_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirectPlay3_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b) +#define IDirectPlay3_GetGroupData(p,a,b,c,d) (p)->GetGroupData(a,b,c,d) +#define IDirectPlay3_GetGroupName(p,a,b,c) (p)->GetGroupName(a,b,c) +#define IDirectPlay3_GetPlayerAddress(p,a,b,c) (p)->GetPlayerAddress(a,b,c) +#define IDirectPlay3_GetPlayerCaps(p,a,b,c) (p)->GetPlayerCaps(a,b,c) +#define IDirectPlay3_GetPlayerData(p,a,b,c,d) (p)->GetPlayerData(a,b,c,d) +#define IDirectPlay3_GetPlayerName(p,a,b,c) (p)->GetPlayerName(a,b,c) +#define IDirectPlay3_GetSessionDesc(p,a,b) (p)->GetSessionDesc(a,b) +#define IDirectPlay3_Initialize(p,a) (p)->Initialize(a) +#define IDirectPlay3_Open(p,a,b) (p)->Open(a,b) +#define IDirectPlay3_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e) +#define IDirectPlay3_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e) +#define IDirectPlay3_SetGroupData(p,a,b,c,d) (p)->SetGroupData(a,b,c,d) +#define IDirectPlay3_SetGroupName(p,a,b,c) (p)->SetGroupName(a,b,c) +#define IDirectPlay3_SetPlayerData(p,a,b,c,d) (p)->SetPlayerData(a,b,c,d) +#define IDirectPlay3_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c) +#define IDirectPlay3_SetSessionDesc(p,a,b) (p)->SetSessionDesc(a,b) +#define IDirectPlay3_AddGroupToGroup(p,a,b) (p)->AddGroupToGroup(a,b) +#define IDirectPlay3_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->CreateGroupInGroup(a,b,c,d,e,f) +#define IDirectPlay3_DeleteGroupFromGroup(p,a,b) (p)->DeleteGroupFromGroup(a,b) +#define IDirectPlay3_EnumConnections(p,a,b,c,d) (p)->EnumConnections(a,b,c,d) +#define IDirectPlay3_EnumGroupsInGroup(p,a,b,c,d,e) (p)->EnumGroupsInGroup(a,b,c,d,e) +#define IDirectPlay3_GetGroupConnectionSettings(p,a,b,c,d) (p)->GetGroupConnectionSettings(a,b,c,d) +#define IDirectPlay3_InitializeConnection(p,a,b) (p)->InitializeConnection(a,b) +#define IDirectPlay3_SecureOpen(p,a,b,c,d) (p)->SecureOpen(a,b,c,d) +#define IDirectPlay3_SendChatMessage(p,a,b,c,d) (p)->SendChatMessage(a,b,c,d) +#define IDirectPlay3_SetGroupConnectionSettings(p,a,b,c) (p)->SetGroupConnectionSettings(a,b,c) +#define IDirectPlay3_StartSession(p,a,b) (p)->StartSession(a,b) +#define IDirectPlay3_GetGroupFlags(p,a,b) (p)->GetGroupFlags(a,b) +#define IDirectPlay3_GetGroupParent(p,a,b) (p)->GetGroupParent(a,b) +#define IDirectPlay3_GetPlayerAccount(p,a,b,c,d) (p)->GetPlayerAccount(a,b,c,d) +#define IDirectPlay3_GetPlayerFlags(p,a,b) (p)->GetPlayerFlags(a,b) + +#endif + +/**************************************************************************** + * + * IDirectPlay4 (and IDirectPlay4A) Interface + * + ****************************************************************************/ + +#undef INTERFACE +#define INTERFACE IDirectPlay4 +DECLARE_INTERFACE_( IDirectPlay4, IDirectPlay3 ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectPlay2 methods ***/ + STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE; + STDMETHOD(Close) (THIS) PURE; + STDMETHOD(CreateGroup) (THIS_ LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPDPNAME,HANDLE,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE; + STDMETHOD(DestroyGroup) (THIS_ DPID) PURE; + STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE; + STDMETHOD(EnumGroupPlayers) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; + STDMETHOD(EnumGroups) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; + STDMETHOD(EnumPlayers) (THIS_ LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; + STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC2,DWORD,LPDPENUMSESSIONSCALLBACK2,LPVOID,DWORD) PURE; + STDMETHOD(GetCaps) (THIS_ LPDPCAPS,DWORD) PURE; + STDMETHOD(GetGroupData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE; + STDMETHOD(GetGroupName) (THIS_ DPID,LPVOID,LPDWORD) PURE; + STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE; + STDMETHOD(GetPlayerAddress) (THIS_ DPID,LPVOID,LPDWORD) PURE; + STDMETHOD(GetPlayerCaps) (THIS_ DPID,LPDPCAPS,DWORD) PURE; + STDMETHOD(GetPlayerData) (THIS_ DPID,LPVOID,LPDWORD,DWORD) PURE; + STDMETHOD(GetPlayerName) (THIS_ DPID,LPVOID,LPDWORD) PURE; + STDMETHOD(GetSessionDesc) (THIS_ LPVOID,LPDWORD) PURE; + STDMETHOD(Initialize) (THIS_ LPGUID) PURE; + STDMETHOD(Open) (THIS_ LPDPSESSIONDESC2,DWORD) PURE; + STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE; + STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE; + STDMETHOD(SetGroupData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(SetGroupName) (THIS_ DPID,LPDPNAME,DWORD) PURE; + STDMETHOD(SetPlayerData) (THIS_ DPID,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(SetPlayerName) (THIS_ DPID,LPDPNAME,DWORD) PURE; + STDMETHOD(SetSessionDesc) (THIS_ LPDPSESSIONDESC2,DWORD) PURE; + /*** IDirectPlay3 methods ***/ + STDMETHOD(AddGroupToGroup) (THIS_ DPID, DPID) PURE; + STDMETHOD(CreateGroupInGroup) (THIS_ DPID,LPDPID,LPDPNAME,LPVOID,DWORD,DWORD) PURE; + STDMETHOD(DeleteGroupFromGroup) (THIS_ DPID,DPID) PURE; + STDMETHOD(EnumConnections) (THIS_ LPCGUID,LPDPENUMCONNECTIONSCALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(EnumGroupsInGroup) (THIS_ DPID,LPGUID,LPDPENUMPLAYERSCALLBACK2,LPVOID,DWORD) PURE; + STDMETHOD(GetGroupConnectionSettings)(THIS_ DWORD, DPID, LPVOID, LPDWORD) PURE; + STDMETHOD(InitializeConnection) (THIS_ LPVOID,DWORD) PURE; + STDMETHOD(SecureOpen) (THIS_ LPCDPSESSIONDESC2,DWORD,LPCDPSECURITYDESC,LPCDPCREDENTIALS) PURE; + STDMETHOD(SendChatMessage) (THIS_ DPID,DPID,DWORD,LPDPCHAT) PURE; + STDMETHOD(SetGroupConnectionSettings)(THIS_ DWORD,DPID,LPDPLCONNECTION) PURE; + STDMETHOD(StartSession) (THIS_ DWORD,DPID) PURE; + STDMETHOD(GetGroupFlags) (THIS_ DPID,LPDWORD) PURE; + STDMETHOD(GetGroupParent) (THIS_ DPID,LPDPID) PURE; + STDMETHOD(GetPlayerAccount) (THIS_ DPID, DWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(GetPlayerFlags) (THIS_ DPID,LPDWORD) PURE; + /*** IDirectPlay4 methods ***/ + STDMETHOD(GetGroupOwner) (THIS_ DPID, LPDPID) PURE; + STDMETHOD(SetGroupOwner) (THIS_ DPID, DPID) PURE; + STDMETHOD(SendEx) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD, DWORD, DWORD, LPVOID, DWORD_PTR *) PURE; + STDMETHOD(GetMessageQueue) (THIS_ DPID, DPID, DWORD, LPDWORD, LPDWORD) PURE; + STDMETHOD(CancelMessage) (THIS_ DWORD, DWORD) PURE; + STDMETHOD(CancelPriority) (THIS_ DWORD, DWORD, DWORD) PURE; +}; + +/**************************************************************************** + * + * IDirectPlayX interface macros (for IDirectPlay4 and beyond) + * + ****************************************************************************/ + +#if !defined(__cplusplus) || defined(CINTERFACE) + +#define IDirectPlayX_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectPlayX_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectPlayX_Release(p) (p)->lpVtbl->Release(p) +#define IDirectPlayX_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b) +#define IDirectPlayX_CancelMessage(p,a,b) (p)->lpVtbl->CancelMessage(p,a,b) +#define IDirectPlayX_CancelPriority(p,a,b,c) (p)->lpVtbl->CancelPriority(p,a,b,c) +#define IDirectPlayX_Close(p) (p)->lpVtbl->Close(p) +#define IDirectPlayX_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e) +#define IDirectPlayX_CreatePlayer(p,a,b,c,d,e,f) (p)->lpVtbl->CreatePlayer(p,a,b,c,d,e,f) +#define IDirectPlayX_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b) +#define IDirectPlayX_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a) +#define IDirectPlayX_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a) +#define IDirectPlayX_EnumGroupPlayers(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d,e) +#define IDirectPlayX_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d) +#define IDirectPlayX_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d) +#define IDirectPlayX_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e) +#define IDirectPlayX_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirectPlayX_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b) +#define IDirectPlayX_GetMessageQueue(p,a,b,c,d,e) (p)->lpVtbl->GetMessageQueue(p,a,b,c,d,e) +#define IDirectPlayX_GetGroupData(p,a,b,c,d) (p)->lpVtbl->GetGroupData(p,a,b,c,d) +#define IDirectPlayX_GetGroupName(p,a,b,c) (p)->lpVtbl->GetGroupName(p,a,b,c) +#define IDirectPlayX_GetPlayerAddress(p,a,b,c) (p)->lpVtbl->GetPlayerAddress(p,a,b,c) +#define IDirectPlayX_GetPlayerCaps(p,a,b,c) (p)->lpVtbl->GetPlayerCaps(p,a,b,c) +#define IDirectPlayX_GetPlayerData(p,a,b,c,d) (p)->lpVtbl->GetPlayerData(p,a,b,c,d) +#define IDirectPlayX_GetPlayerName(p,a,b,c) (p)->lpVtbl->GetPlayerName(p,a,b,c) +#define IDirectPlayX_GetSessionDesc(p,a,b) (p)->lpVtbl->GetSessionDesc(p,a,b) +#define IDirectPlayX_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirectPlayX_Open(p,a,b) (p)->lpVtbl->Open(p,a,b) +#define IDirectPlayX_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e) +#define IDirectPlayX_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e) +#define IDirectPlayX_SendEx(p,a,b,c,d,e,f,g,h,i) (p)->lpVtbl->SendEx(p,a,b,c,d,e,f,g,h,i) +#define IDirectPlayX_SetGroupData(p,a,b,c,d) (p)->lpVtbl->SetGroupData(p,a,b,c,d) +#define IDirectPlayX_SetGroupName(p,a,b,c) (p)->lpVtbl->SetGroupName(p,a,b,c) +#define IDirectPlayX_SetPlayerData(p,a,b,c,d) (p)->lpVtbl->SetPlayerData(p,a,b,c,d) +#define IDirectPlayX_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c) +#define IDirectPlayX_SetSessionDesc(p,a,b) (p)->lpVtbl->SetSessionDesc(p,a,b) +#define IDirectPlayX_AddGroupToGroup(p,a,b) (p)->lpVtbl->AddGroupToGroup(p,a,b) +#define IDirectPlayX_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->lpVtbl->CreateGroupInGroup(p,a,b,c,d,e,f) +#define IDirectPlayX_DeleteGroupFromGroup(p,a,b) (p)->lpVtbl->DeleteGroupFromGroup(p,a,b) +#define IDirectPlayX_EnumConnections(p,a,b,c,d) (p)->lpVtbl->EnumConnections(p,a,b,c,d) +#define IDirectPlayX_EnumGroupsInGroup(p,a,b,c,d,e) (p)->lpVtbl->EnumGroupsInGroup(p,a,b,c,d,e) +#define IDirectPlayX_GetGroupConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetGroupConnectionSettings(p,a,b,c,d) +#define IDirectPlayX_InitializeConnection(p,a,b) (p)->lpVtbl->InitializeConnection(p,a,b) +#define IDirectPlayX_SecureOpen(p,a,b,c,d) (p)->lpVtbl->SecureOpen(p,a,b,c,d) +#define IDirectPlayX_SendChatMessage(p,a,b,c,d) (p)->lpVtbl->SendChatMessage(p,a,b,c,d) +#define IDirectPlayX_SetGroupConnectionSettings(p,a,b,c) (p)->lpVtbl->SetGroupConnectionSettings(p,a,b,c) +#define IDirectPlayX_StartSession(p,a,b) (p)->lpVtbl->StartSession(p,a,b) +#define IDirectPlayX_GetGroupFlags(p,a,b) (p)->lpVtbl->GetGroupFlags(p,a,b) +#define IDirectPlayX_GetGroupParent(p,a,b) (p)->lpVtbl->GetGroupParent(p,a,b) +#define IDirectPlayX_GetPlayerAccount(p,a,b,c,d) (p)->lpVtbl->GetPlayerAccount(p,a,b,c,d) +#define IDirectPlayX_GetPlayerFlags(p,a,b) (p)->lpVtbl->GetPlayerFlags(p,a,b) +#define IDirectPlayX_GetGroupOwner(p,a,b) (p)->lpVtbl->GetGroupOwner(p,a,b) +#define IDirectPlayX_SetGroupOwner(p,a,b) (p)->lpVtbl->SetGroupOwner(p,a,b) + +#else /* C++ */ + +#define IDirectPlayX_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectPlayX_AddRef(p) (p)->AddRef() +#define IDirectPlayX_Release(p) (p)->Release() +#define IDirectPlayX_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b) +#define IDirectPlayX_CancelMessage(p,a,b) (p)->CancelMessage(a,b) +#define IDirectPlayX_CancelPriority(p,a,b,c) (p)->CancelPriority(a,b,c) +#define IDirectPlayX_Close(p) (p)->Close() +#define IDirectPlayX_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e) +#define IDirectPlayX_CreatePlayer(p,a,b,c,d,e,f) (p)->CreatePlayer(a,b,c,d,e,f) +#define IDirectPlayX_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b) +#define IDirectPlayX_DestroyGroup(p,a) (p)->DestroyGroup(a) +#define IDirectPlayX_DestroyPlayer(p,a) (p)->DestroyPlayer(a) +#define IDirectPlayX_EnumGroupPlayers(p,a,b,c,d,e) (p)->EnumGroupPlayers(a,b,c,d,e) +#define IDirectPlayX_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d) +#define IDirectPlayX_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d) +#define IDirectPlayX_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e) +#define IDirectPlayX_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirectPlayX_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b) +#define IDirectPlayX_GetMessageQueue(p,a,b,c,d,e) (p)->GetMessageQueue(a,b,c,d,e) +#define IDirectPlayX_GetGroupData(p,a,b,c,d) (p)->GetGroupData(a,b,c,d) +#define IDirectPlayX_GetGroupName(p,a,b,c) (p)->GetGroupName(a,b,c) +#define IDirectPlayX_GetPlayerAddress(p,a,b,c) (p)->GetPlayerAddress(a,b,c) +#define IDirectPlayX_GetPlayerCaps(p,a,b,c) (p)->GetPlayerCaps(a,b,c) +#define IDirectPlayX_GetPlayerData(p,a,b,c,d) (p)->GetPlayerData(a,b,c,d) +#define IDirectPlayX_GetPlayerName(p,a,b,c) (p)->GetPlayerName(a,b,c) +#define IDirectPlayX_GetSessionDesc(p,a,b) (p)->GetSessionDesc(a,b) +#define IDirectPlayX_Initialize(p,a) (p)->Initialize(a) +#define IDirectPlayX_Open(p,a,b) (p)->Open(a,b) +#define IDirectPlayX_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e) +#define IDirectPlayX_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e) +#define IDirectPlayX_SendEx(p,a,b,c,d,e,f,g,h,i) (p)->SendEx(a,b,c,d,e,f,g,h,i) +#define IDirectPlayX_SetGroupData(p,a,b,c,d) (p)->SetGroupData(a,b,c,d) +#define IDirectPlayX_SetGroupName(p,a,b,c) (p)->SetGroupName(a,b,c) +#define IDirectPlayX_SetPlayerData(p,a,b,c,d) (p)->SetPlayerData(a,b,c,d) +#define IDirectPlayX_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c) +#define IDirectPlayX_SetSessionDesc(p,a,b) (p)->SetSessionDesc(a,b) +#define IDirectPlayX_AddGroupToGroup(p,a,b) (p)->AddGroupToGroup(a,b) +#define IDirectPlayX_CreateGroupInGroup(p,a,b,c,d,e,f) (p)->CreateGroupInGroup(a,b,c,d,e,f) +#define IDirectPlayX_DeleteGroupFromGroup(p,a,b) (p)->DeleteGroupFromGroup(a,b) +#define IDirectPlayX_EnumConnections(p,a,b,c,d) (p)->EnumConnections(a,b,c,d) +#define IDirectPlayX_EnumGroupsInGroup(p,a,b,c,d,e) (p)->EnumGroupsInGroup(a,b,c,d,e) +#define IDirectPlayX_GetGroupConnectionSettings(p,a,b,c,d) (p)->GetGroupConnectionSettings(a,b,c,d) +#define IDirectPlayX_InitializeConnection(p,a,b) (p)->InitializeConnection(a,b) +#define IDirectPlayX_SecureOpen(p,a,b,c,d) (p)->SecureOpen(a,b,c,d) +#define IDirectPlayX_SendChatMessage(p,a,b,c,d) (p)->SendChatMessage(a,b,c,d) +#define IDirectPlayX_SetGroupConnectionSettings(p,a,b,c) (p)->SetGroupConnectionSettings(a,b,c) +#define IDirectPlayX_StartSession(p,a,b) (p)->StartSession(a,b) +#define IDirectPlayX_GetGroupFlags(p,a,b) (p)->GetGroupFlags(a,b) +#define IDirectPlayX_GetGroupParent(p,a,b) (p)->GetGroupParent(a,b) +#define IDirectPlayX_GetPlayerAccount(p,a,b,c,d) (p)->GetPlayerAccount(a,b,c,d) +#define IDirectPlayX_GetPlayerFlags(p,a,b) (p)->GetPlayerFlags(a,b) +#define IDirectPlayX_GetGroupOwner(p,a,b) (p)->GetGroupOwner(a,b) +#define IDirectPlayX_SetGroupOwner(p,a,b) (p)->SetGroupOwner(a,b) + +#endif + +/**************************************************************************** + * + * EnumConnections API flags + * + ****************************************************************************/ + +/* + * Enumerate Service Providers + */ +#define DPCONNECTION_DIRECTPLAY 0x00000001 + +/* + * Enumerate Lobby Providers + */ +#define DPCONNECTION_DIRECTPLAYLOBBY 0x00000002 + + +/**************************************************************************** + * + * EnumPlayers API flags + * + ****************************************************************************/ + +/* + * Enumerate all players in the current session + */ +#define DPENUMPLAYERS_ALL 0x00000000 +#define DPENUMGROUPS_ALL DPENUMPLAYERS_ALL + + +/* + * Enumerate only local (created by this application) players + * or groups + */ +#define DPENUMPLAYERS_LOCAL 0x00000008 +#define DPENUMGROUPS_LOCAL DPENUMPLAYERS_LOCAL + +/* + * Enumerate only remote (non-local) players + * or groups + */ +#define DPENUMPLAYERS_REMOTE 0x00000010 +#define DPENUMGROUPS_REMOTE DPENUMPLAYERS_REMOTE + +/* + * Enumerate groups along with the players + */ +#define DPENUMPLAYERS_GROUP 0x00000020 + +/* + * Enumerate players or groups in another session + * (must supply lpguidInstance) + */ +#define DPENUMPLAYERS_SESSION 0x00000080 +#define DPENUMGROUPS_SESSION DPENUMPLAYERS_SESSION + +/* + * Enumerate server players + */ +#define DPENUMPLAYERS_SERVERPLAYER 0x00000100 + +/* + * Enumerate spectator players + */ +#define DPENUMPLAYERS_SPECTATOR 0x00000200 + +/* + * Enumerate shortcut groups + */ +#define DPENUMGROUPS_SHORTCUT 0x00000400 + +/* + * Enumerate staging area groups + */ +#define DPENUMGROUPS_STAGINGAREA 0x00000800 + +/* + * Enumerate hidden groups + */ +#define DPENUMGROUPS_HIDDEN 0x00001000 + +/* + * Enumerate the group's owner + */ +#define DPENUMPLAYERS_OWNER 0x00002000 + + +/**************************************************************************** + * + * CreatePlayer API flags + * + ****************************************************************************/ + +/* + * This flag indicates that this player should be designated + * the server player. The app should specify this at CreatePlayer. + */ +#define DPPLAYER_SERVERPLAYER DPENUMPLAYERS_SERVERPLAYER + +/* + * This flag indicates that this player should be designated + * a spectator. The app should specify this at CreatePlayer. + */ +#define DPPLAYER_SPECTATOR DPENUMPLAYERS_SPECTATOR + +/* + * This flag indicates that this player was created locally. + * (returned from GetPlayerFlags) + */ +#define DPPLAYER_LOCAL DPENUMPLAYERS_LOCAL + +/* + * This flag indicates that this player is the group's owner + * (Only returned in EnumGroupPlayers) + */ +#define DPPLAYER_OWNER DPENUMPLAYERS_OWNER + +/**************************************************************************** + * + * CreateGroup API flags + * + ****************************************************************************/ + + +/* + * This flag indicates that the StartSession can be called on the group. + * The app should specify this at CreateGroup, or CreateGroupInGroup. + */ +#define DPGROUP_STAGINGAREA DPENUMGROUPS_STAGINGAREA + +/* + * This flag indicates that this group was created locally. + * (returned from GetGroupFlags) + */ +#define DPGROUP_LOCAL DPENUMGROUPS_LOCAL + +/* + * This flag indicates that this group was created hidden. + */ +#define DPGROUP_HIDDEN DPENUMGROUPS_HIDDEN + + +/**************************************************************************** + * + * EnumSessions API flags + * + ****************************************************************************/ + +/* + * Enumerate sessions which can be joined + */ +#define DPENUMSESSIONS_AVAILABLE 0x00000001 + +/* + * Enumerate all sessions even if they can't be joined. + */ +#define DPENUMSESSIONS_ALL 0x00000002 + + +/* + * Start an asynchronous enum sessions + */ + #define DPENUMSESSIONS_ASYNC 0x00000010 + +/* + * Stop an asynchronous enum sessions + */ + #define DPENUMSESSIONS_STOPASYNC 0x00000020 + +/* + * Enumerate sessions even if they require a password + */ + #define DPENUMSESSIONS_PASSWORDREQUIRED 0x00000040 + +/* + * Return status about progress of enumeration instead of + * showing any status dialogs. + */ + #define DPENUMSESSIONS_RETURNSTATUS 0x00000080 + +/**************************************************************************** + * + * GetCaps and GetPlayerCaps API flags + * + ****************************************************************************/ + +/* + * The latency returned should be for guaranteed message sending. + * Default is non-guaranteed messaging. + */ +#define DPGETCAPS_GUARANTEED 0x00000001 + + +/**************************************************************************** + * + * GetGroupData, GetPlayerData API flags + * Remote and local Group/Player data is maintained separately. + * Default is DPGET_REMOTE. + * + ****************************************************************************/ + +/* + * Get the remote data (set by any DirectPlay object in + * the session using DPSET_REMOTE) + */ +#define DPGET_REMOTE 0x00000000 + +/* + * Get the local data (set by this DirectPlay object + * using DPSET_LOCAL) + */ +#define DPGET_LOCAL 0x00000001 + + +/**************************************************************************** + * + * Open API flags + * + ****************************************************************************/ + +/* + * Join the session that is described by the DPSESSIONDESC2 structure + */ +#define DPOPEN_JOIN 0x00000001 + +/* + * Create a new session as described by the DPSESSIONDESC2 structure + */ +#define DPOPEN_CREATE 0x00000002 + +/* + * Return status about progress of open instead of showing + * any status dialogs. + */ + #define DPOPEN_RETURNSTATUS DPENUMSESSIONS_RETURNSTATUS + + +/**************************************************************************** + * + * DPLCONNECTION flags + * + ****************************************************************************/ + +/* + * This application should create a new session as + * described by the DPSESIONDESC structure + */ +#define DPLCONNECTION_CREATESESSION DPOPEN_CREATE + +/* + * This application should join the session described by + * the DPSESIONDESC structure with the lpAddress data + */ +#define DPLCONNECTION_JOINSESSION DPOPEN_JOIN + +/**************************************************************************** + * + * Receive API flags + * Default is DPRECEIVE_ALL + * + ****************************************************************************/ + +/* + * Get the first message in the queue + */ +#define DPRECEIVE_ALL 0x00000001 + +/* + * Get the first message in the queue directed to a specific player + */ +#define DPRECEIVE_TOPLAYER 0x00000002 + +/* + * Get the first message in the queue from a specific player + */ +#define DPRECEIVE_FROMPLAYER 0x00000004 + +/* + * Get the message but don't remove it from the queue + */ +#define DPRECEIVE_PEEK 0x00000008 + + +/**************************************************************************** + * + * Send API flags + * + ****************************************************************************/ + +/* + * Send the message using a guaranteed send method. + * Default is non-guaranteed. + */ +#define DPSEND_GUARANTEED 0x00000001 + + +/* + * This flag is obsolete. It is ignored by DirectPlay + */ +#define DPSEND_HIGHPRIORITY 0x00000002 + +/* + * This flag is obsolete. It is ignored by DirectPlay + */ +#define DPSEND_OPENSTREAM 0x00000008 + +/* + * This flag is obsolete. It is ignored by DirectPlay + */ +#define DPSEND_CLOSESTREAM 0x00000010 + +/* + * Send the message digitally signed to ensure authenticity. + */ +#define DPSEND_SIGNED 0x00000020 + +/* + * Send the message with encryption to ensure privacy. + */ +#define DPSEND_ENCRYPTED 0x00000040 + +/* + * The message is a lobby system message + */ +#define DPSEND_LOBBYSYSTEMMESSAGE 0x00000080 + + +/* + * Send message asynchronously, must check caps + * before using this flag. It is always provided + * if the protocol flag is set. + */ +#define DPSEND_ASYNC 0x00000200 + +/* + * When an message is completed, don't tell me. + * by default the application is notified with a system message. + */ +#define DPSEND_NOSENDCOMPLETEMSG 0x00000400 + + +/* + * Maximum priority for sends available to applications + */ +#define DPSEND_MAX_PRI 0x0000FFFF +#define DPSEND_MAX_PRIORITY DPSEND_MAX_PRI + + +/**************************************************************************** + * + * SetGroupData, SetGroupName, SetPlayerData, SetPlayerName, + * SetSessionDesc API flags. + * Default is DPSET_REMOTE. + * + ****************************************************************************/ + +/* + * Propagate the data to all players in the session + */ +#define DPSET_REMOTE 0x00000000 + +/* + * Do not propagate the data to other players + */ +#define DPSET_LOCAL 0x00000001 + +/* + * Used with DPSET_REMOTE, use guaranteed message send to + * propagate the data + */ +#define DPSET_GUARANTEED 0x00000002 + +/**************************************************************************** + * + * GetMessageQueue API flags. + * Default is DPMESSAGEQUEUE_SEND + * + ****************************************************************************/ + +/* + * Get Send Queue - requires Service Provider Support + */ +#define DPMESSAGEQUEUE_SEND 0x00000001 + +/* + * Get Receive Queue + */ +#define DPMESSAGEQUEUE_RECEIVE 0x00000002 + + +/**************************************************************************** + * + * Connect API flags + * + ****************************************************************************/ + + +/* + * Start an asynchronous connect which returns status codes + */ +#define DPCONNECT_RETURNSTATUS (DPENUMSESSIONS_RETURNSTATUS) + + +/**************************************************************************** + * + * DirectPlay system messages and message data structures + * + * All system message come 'From' player DPID_SYSMSG. To determine what type + * of message it is, cast the lpData from Receive to DPMSG_GENERIC and check + * the dwType member against one of the following DPSYS_xxx constants. Once + * a match is found, cast the lpData to the corresponding of the DPMSG_xxx + * structures to access the data of the message. + * + ****************************************************************************/ + +/* + * A new player or group has been created in the session + * Use DPMSG_CREATEPLAYERORGROUP. Check dwPlayerType to see if it + * is a player or a group. + */ +#define DPSYS_CREATEPLAYERORGROUP 0x0003 + +/* + * A player has been deleted from the session + * Use DPMSG_DESTROYPLAYERORGROUP + */ +#define DPSYS_DESTROYPLAYERORGROUP 0x0005 + +/* + * A player has been added to a group + * Use DPMSG_ADDPLAYERTOGROUP + */ +#define DPSYS_ADDPLAYERTOGROUP 0x0007 + +/* + * A player has been removed from a group + * Use DPMSG_DELETEPLAYERFROMGROUP + */ +#define DPSYS_DELETEPLAYERFROMGROUP 0x0021 + +/* + * This DirectPlay object lost its connection with all the + * other players in the session. + * Use DPMSG_SESSIONLOST. + */ +#define DPSYS_SESSIONLOST 0x0031 + +/* + * The current host has left the session. + * This DirectPlay object is now the host. + * Use DPMSG_HOST. + */ +#define DPSYS_HOST 0x0101 + +/* + * The remote data associated with a player or + * group has changed. Check dwPlayerType to see + * if it is a player or a group + * Use DPMSG_SETPLAYERORGROUPDATA + */ +#define DPSYS_SETPLAYERORGROUPDATA 0x0102 + +/* + * The name of a player or group has changed. + * Check dwPlayerType to see if it is a player + * or a group. + * Use DPMSG_SETPLAYERORGROUPNAME + */ +#define DPSYS_SETPLAYERORGROUPNAME 0x0103 + +/* + * The session description has changed. + * Use DPMSG_SETSESSIONDESC + */ +#define DPSYS_SETSESSIONDESC 0x0104 + +/* + * A group has been added to a group + * Use DPMSG_ADDGROUPTOGROUP + */ +#define DPSYS_ADDGROUPTOGROUP 0x0105 + +/* + * A group has been removed from a group + * Use DPMSG_DELETEGROUPFROMGROUP + */ +#define DPSYS_DELETEGROUPFROMGROUP 0x0106 + +/* + * A secure player-player message has arrived. + * Use DPMSG_SECUREMESSAGE + */ +#define DPSYS_SECUREMESSAGE 0x0107 + +/* + * Start a new session. + * Use DPMSG_STARTSESSION + */ +#define DPSYS_STARTSESSION 0x0108 + +/* + * A chat message has arrived + * Use DPMSG_CHAT + */ +#define DPSYS_CHAT 0x0109 + +/* + * The owner of a group has changed + * Use DPMSG_SETGROUPOWNER + */ +#define DPSYS_SETGROUPOWNER 0x010A + +/* + * An async send has finished, failed or been cancelled + * Use DPMSG_SENDCOMPLETE + */ +#define DPSYS_SENDCOMPLETE 0x010d + + +/* + * Used in the dwPlayerType field to indicate if it applies to a group + * or a player + */ +#define DPPLAYERTYPE_GROUP 0x00000000 +#define DPPLAYERTYPE_PLAYER 0x00000001 + + +/* + * DPMSG_GENERIC + * Generic message structure used to identify the message type. + */ +typedef struct +{ + DWORD dwType; // Message type +} DPMSG_GENERIC, FAR *LPDPMSG_GENERIC; + +/* + * DPMSG_CREATEPLAYERORGROUP + * System message generated when a new player or group + * created in the session with information about it. + */ +typedef struct +{ + DWORD dwType; // Message type + DWORD dwPlayerType; // Is it a player or group + DPID dpId; // ID of the player or group + DWORD dwCurrentPlayers; // current # players & groups in session + LPVOID lpData; // pointer to remote data + DWORD dwDataSize; // size of remote data + DPNAME dpnName; // structure with name info + // the following fields are only available when using + // the IDirectPlay3 interface or greater + DPID dpIdParent; // id of parent group + DWORD dwFlags; // player or group flags +} DPMSG_CREATEPLAYERORGROUP, FAR *LPDPMSG_CREATEPLAYERORGROUP; + +/* + * DPMSG_DESTROYPLAYERORGROUP + * System message generated when a player or group is being + * destroyed in the session with information about it. + */ +typedef struct +{ + DWORD dwType; // Message type + DWORD dwPlayerType; // Is it a player or group + DPID dpId; // player ID being deleted + LPVOID lpLocalData; // copy of players local data + DWORD dwLocalDataSize; // sizeof local data + LPVOID lpRemoteData; // copy of players remote data + DWORD dwRemoteDataSize; // sizeof remote data + // the following fields are only available when using + // the IDirectPlay3 interface or greater + DPNAME dpnName; // structure with name info + DPID dpIdParent; // id of parent group + DWORD dwFlags; // player or group flags +} DPMSG_DESTROYPLAYERORGROUP, FAR *LPDPMSG_DESTROYPLAYERORGROUP; + +/* + * DPMSG_ADDPLAYERTOGROUP + * System message generated when a player is being added + * to a group. + */ +typedef struct +{ + DWORD dwType; // Message type + DPID dpIdGroup; // group ID being added to + DPID dpIdPlayer; // player ID being added +} DPMSG_ADDPLAYERTOGROUP, FAR *LPDPMSG_ADDPLAYERTOGROUP; + +/* + * DPMSG_DELETEPLAYERFROMGROUP + * System message generated when a player is being + * removed from a group + */ +typedef DPMSG_ADDPLAYERTOGROUP DPMSG_DELETEPLAYERFROMGROUP; +typedef DPMSG_DELETEPLAYERFROMGROUP FAR *LPDPMSG_DELETEPLAYERFROMGROUP; + +/* + * DPMSG_ADDGROUPTOGROUP + * System message generated when a group is being added + * to a group. + */ +typedef struct +{ + DWORD dwType; // Message type + DPID dpIdParentGroup; // group ID being added to + DPID dpIdGroup; // group ID being added +} DPMSG_ADDGROUPTOGROUP, FAR *LPDPMSG_ADDGROUPTOGROUP; + +/* + * DPMSG_DELETEGROUPFROMGROUP + * System message generated when a GROUP is being + * removed from a group + */ +typedef DPMSG_ADDGROUPTOGROUP DPMSG_DELETEGROUPFROMGROUP; +typedef DPMSG_DELETEGROUPFROMGROUP FAR *LPDPMSG_DELETEGROUPFROMGROUP; + +/* + * DPMSG_SETPLAYERORGROUPDATA + * System message generated when remote data for a player or + * group has changed. + */ +typedef struct +{ + DWORD dwType; // Message type + DWORD dwPlayerType; // Is it a player or group + DPID dpId; // ID of player or group + LPVOID lpData; // pointer to remote data + DWORD dwDataSize; // size of remote data +} DPMSG_SETPLAYERORGROUPDATA, FAR *LPDPMSG_SETPLAYERORGROUPDATA; + +/* + * DPMSG_SETPLAYERORGROUPNAME + * System message generated when the name of a player or + * group has changed. + */ +typedef struct +{ + DWORD dwType; // Message type + DWORD dwPlayerType; // Is it a player or group + DPID dpId; // ID of player or group + DPNAME dpnName; // structure with new name info +} DPMSG_SETPLAYERORGROUPNAME, FAR *LPDPMSG_SETPLAYERORGROUPNAME; + +/* + * DPMSG_SETSESSIONDESC + * System message generated when session desc has changed + */ +typedef struct +{ + DWORD dwType; // Message type + DPSESSIONDESC2 dpDesc; // Session desc +} DPMSG_SETSESSIONDESC, FAR *LPDPMSG_SETSESSIONDESC; + +/* + * DPMSG_HOST + * System message generated when the host has migrated to this + * DirectPlay object. + * + */ +typedef DPMSG_GENERIC DPMSG_HOST; +typedef DPMSG_HOST FAR *LPDPMSG_HOST; + +/* + * DPMSG_SESSIONLOST + * System message generated when the connection to the session is lost. + * + */ +typedef DPMSG_GENERIC DPMSG_SESSIONLOST; +typedef DPMSG_SESSIONLOST FAR *LPDPMSG_SESSIONLOST; + +/* + * DPMSG_SECUREMESSAGE + * System message generated when a player requests a secure send + */ +typedef struct +{ + DWORD dwType; // Message Type + DWORD dwFlags; // Signed/Encrypted + DPID dpIdFrom; // ID of Sending Player + LPVOID lpData; // Player message + DWORD dwDataSize; // Size of player message +} DPMSG_SECUREMESSAGE, FAR *LPDPMSG_SECUREMESSAGE; + +/* + * DPMSG_STARTSESSION + * System message containing all information required to + * start a new session + */ +typedef struct +{ + DWORD dwType; // Message type + LPDPLCONNECTION lpConn; // DPLCONNECTION structure +} DPMSG_STARTSESSION, FAR *LPDPMSG_STARTSESSION; + +/* + * DPMSG_CHAT + * System message containing a chat message + */ +typedef struct +{ + DWORD dwType; // Message type + DWORD dwFlags; // Message flags + DPID idFromPlayer; // ID of the Sending Player + DPID idToPlayer; // ID of the To Player + DPID idToGroup; // ID of the To Group + LPDPCHAT lpChat; // Pointer to a structure containing the chat message +} DPMSG_CHAT, FAR *LPDPMSG_CHAT; + +/* + * DPMSG_SETGROUPOWNER + * System message generated when the owner of a group has changed + */ +typedef struct +{ + DWORD dwType; // Message type + DPID idGroup; // ID of the group + DPID idNewOwner; // ID of the player that is the new owner + DPID idOldOwner; // ID of the player that used to be the owner +} DPMSG_SETGROUPOWNER, FAR *LPDPMSG_SETGROUPOWNER; + +/* + * DPMSG_SENDCOMPLETE + * System message generated when finished with an Async Send message + * + * NOTE SENDPARMS has an overlay for DPMSG_SENDCOMPLETE, don't + * change this message w/o changing SENDPARMS. + */ +typedef struct +{ + DWORD dwType; + DPID idFrom; + DPID idTo; + DWORD dwFlags; + DWORD dwPriority; + DWORD dwTimeout; + LPVOID lpvContext; + DWORD dwMsgID; + HRESULT hr; + DWORD dwSendTime; +} DPMSG_SENDCOMPLETE, *LPDPMSG_SENDCOMPLETE; + +/**************************************************************************** + * + * DIRECTPLAY ERRORS + * + * Errors are represented by negative values and cannot be combined. + * + ****************************************************************************/ +#define DP_OK S_OK +#define DPERR_ALREADYINITIALIZED MAKE_DPHRESULT( 5 ) +#define DPERR_ACCESSDENIED MAKE_DPHRESULT( 10 ) +#define DPERR_ACTIVEPLAYERS MAKE_DPHRESULT( 20 ) +#define DPERR_BUFFERTOOSMALL MAKE_DPHRESULT( 30 ) +#define DPERR_CANTADDPLAYER MAKE_DPHRESULT( 40 ) +#define DPERR_CANTCREATEGROUP MAKE_DPHRESULT( 50 ) +#define DPERR_CANTCREATEPLAYER MAKE_DPHRESULT( 60 ) +#define DPERR_CANTCREATESESSION MAKE_DPHRESULT( 70 ) +#define DPERR_CAPSNOTAVAILABLEYET MAKE_DPHRESULT( 80 ) +#define DPERR_EXCEPTION MAKE_DPHRESULT( 90 ) +#define DPERR_GENERIC E_FAIL +#define DPERR_INVALIDFLAGS MAKE_DPHRESULT( 120 ) +#define DPERR_INVALIDOBJECT MAKE_DPHRESULT( 130 ) +#define DPERR_INVALIDPARAM E_INVALIDARG +#define DPERR_INVALIDPARAMS DPERR_INVALIDPARAM +#define DPERR_INVALIDPLAYER MAKE_DPHRESULT( 150 ) +#define DPERR_INVALIDGROUP MAKE_DPHRESULT( 155 ) +#define DPERR_NOCAPS MAKE_DPHRESULT( 160 ) +#define DPERR_NOCONNECTION MAKE_DPHRESULT( 170 ) +#define DPERR_NOMEMORY E_OUTOFMEMORY +#define DPERR_OUTOFMEMORY DPERR_NOMEMORY +#define DPERR_NOMESSAGES MAKE_DPHRESULT( 190 ) +#define DPERR_NONAMESERVERFOUND MAKE_DPHRESULT( 200 ) +#define DPERR_NOPLAYERS MAKE_DPHRESULT( 210 ) +#define DPERR_NOSESSIONS MAKE_DPHRESULT( 220 ) +#define DPERR_PENDING E_PENDING +#define DPERR_SENDTOOBIG MAKE_DPHRESULT( 230 ) +#define DPERR_TIMEOUT MAKE_DPHRESULT( 240 ) +#define DPERR_UNAVAILABLE MAKE_DPHRESULT( 250 ) +#define DPERR_UNSUPPORTED E_NOTIMPL +#define DPERR_BUSY MAKE_DPHRESULT( 270 ) +#define DPERR_USERCANCEL MAKE_DPHRESULT( 280 ) +#define DPERR_NOINTERFACE E_NOINTERFACE +#define DPERR_CANNOTCREATESERVER MAKE_DPHRESULT( 290 ) +#define DPERR_PLAYERLOST MAKE_DPHRESULT( 300 ) +#define DPERR_SESSIONLOST MAKE_DPHRESULT( 310 ) +#define DPERR_UNINITIALIZED MAKE_DPHRESULT( 320 ) +#define DPERR_NONEWPLAYERS MAKE_DPHRESULT( 330 ) +#define DPERR_INVALIDPASSWORD MAKE_DPHRESULT( 340 ) +#define DPERR_CONNECTING MAKE_DPHRESULT( 350 ) +#define DPERR_CONNECTIONLOST MAKE_DPHRESULT( 360 ) +#define DPERR_UNKNOWNMESSAGE MAKE_DPHRESULT( 370 ) +#define DPERR_CANCELFAILED MAKE_DPHRESULT( 380 ) +#define DPERR_INVALIDPRIORITY MAKE_DPHRESULT( 390 ) +#define DPERR_NOTHANDLED MAKE_DPHRESULT( 400 ) +#define DPERR_CANCELLED MAKE_DPHRESULT( 410 ) +#define DPERR_ABORTED MAKE_DPHRESULT( 420 ) + + +#define DPERR_BUFFERTOOLARGE MAKE_DPHRESULT( 1000 ) +#define DPERR_CANTCREATEPROCESS MAKE_DPHRESULT( 1010 ) +#define DPERR_APPNOTSTARTED MAKE_DPHRESULT( 1020 ) +#define DPERR_INVALIDINTERFACE MAKE_DPHRESULT( 1030 ) +#define DPERR_NOSERVICEPROVIDER MAKE_DPHRESULT( 1040 ) +#define DPERR_UNKNOWNAPPLICATION MAKE_DPHRESULT( 1050 ) +#define DPERR_NOTLOBBIED MAKE_DPHRESULT( 1070 ) +#define DPERR_SERVICEPROVIDERLOADED MAKE_DPHRESULT( 1080 ) +#define DPERR_ALREADYREGISTERED MAKE_DPHRESULT( 1090 ) +#define DPERR_NOTREGISTERED MAKE_DPHRESULT( 1100 ) + +// +// Security related errors +// +#define DPERR_AUTHENTICATIONFAILED MAKE_DPHRESULT( 2000 ) +#define DPERR_CANTLOADSSPI MAKE_DPHRESULT( 2010 ) +#define DPERR_ENCRYPTIONFAILED MAKE_DPHRESULT( 2020 ) +#define DPERR_SIGNFAILED MAKE_DPHRESULT( 2030 ) +#define DPERR_CANTLOADSECURITYPACKAGE MAKE_DPHRESULT( 2040 ) +#define DPERR_ENCRYPTIONNOTSUPPORTED MAKE_DPHRESULT( 2050 ) +#define DPERR_CANTLOADCAPI MAKE_DPHRESULT( 2060 ) +#define DPERR_NOTLOGGEDIN MAKE_DPHRESULT( 2070 ) +#define DPERR_LOGONDENIED MAKE_DPHRESULT( 2080 ) + + +/**************************************************************************** + * + * dplay 1.0 obsolete structures + interfaces + * Included for compatibility only. New apps should + * use IDirectPlay2 + * + ****************************************************************************/ + +// define this to ignore obsolete interfaces and constants +#ifndef IDIRECTPLAY2_OR_GREATER + +#define DPOPEN_OPENSESSION DPOPEN_JOIN +#define DPOPEN_CREATESESSION DPOPEN_CREATE + +#define DPENUMSESSIONS_PREVIOUS 0x00000004 + +#define DPENUMPLAYERS_PREVIOUS 0x00000004 + +#define DPSEND_GUARANTEE DPSEND_GUARANTEED +#define DPSEND_TRYONCE 0x00000004 + +#define DPCAPS_NAMESERVICE 0x00000001 +#define DPCAPS_NAMESERVER DPCAPS_ISHOST +#define DPCAPS_GUARANTEED 0x00000004 + +#define DPLONGNAMELEN 52 +#define DPSHORTNAMELEN 20 +#define DPSESSIONNAMELEN 32 +#define DPPASSWORDLEN 16 +#define DPUSERRESERVED 16 + +#define DPSYS_ADDPLAYER 0x0003 +#define DPSYS_DELETEPLAYER 0x0005 + +#define DPSYS_DELETEGROUP 0x0020 +#define DPSYS_DELETEPLAYERFROMGRP 0x0021 +#define DPSYS_CONNECT 0x484b + +typedef struct +{ + DWORD dwType; + DWORD dwPlayerType; + DPID dpId; + char szLongName[DPLONGNAMELEN]; + char szShortName[DPSHORTNAMELEN]; + DWORD dwCurrentPlayers; +} DPMSG_ADDPLAYER; + +typedef DPMSG_ADDPLAYER DPMSG_ADDGROUP; + +typedef struct +{ + DWORD dwType; + DPID dpIdGroup; + DPID dpIdPlayer; +} DPMSG_GROUPADD; + +typedef DPMSG_GROUPADD DPMSG_GROUPDELETE; +typedef struct +{ + DWORD dwType; + DPID dpId; +} DPMSG_DELETEPLAYER; + +typedef BOOL (PASCAL *LPDPENUMPLAYERSCALLBACK)( + DPID dpId, + LPSTR lpFriendlyName, + LPSTR lpFormalName, + DWORD dwFlags, + LPVOID lpContext ); + +typedef struct +{ + DWORD dwSize; + GUID guidSession; + DWORD_PTR dwSession; + DWORD dwMaxPlayers; + DWORD dwCurrentPlayers; + DWORD dwFlags; + char szSessionName[DPSESSIONNAMELEN]; + char szUserField[DPUSERRESERVED]; + DWORD_PTR dwReserved1; + char szPassword[DPPASSWORDLEN]; + DWORD_PTR dwReserved2; + DWORD_PTR dwUser1; + DWORD_PTR dwUser2; + DWORD_PTR dwUser3; + DWORD_PTR dwUser4; +} DPSESSIONDESC,*LPDPSESSIONDESC; + +typedef BOOL (PASCAL * LPDPENUMSESSIONSCALLBACK)( + LPDPSESSIONDESC lpDPSessionDesc, + LPVOID lpContext, + LPDWORD lpdwTimeOut, + DWORD dwFlags); + +/* + * IDirectPlay + */ +#undef INTERFACE +#define INTERFACE IDirectPlay +DECLARE_INTERFACE_( IDirectPlay, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectPlay methods ***/ + STDMETHOD(AddPlayerToGroup) (THIS_ DPID, DPID) PURE; + STDMETHOD(Close) (THIS) PURE; + STDMETHOD(CreatePlayer) (THIS_ LPDPID,LPSTR,LPSTR,LPHANDLE) PURE; + STDMETHOD(CreateGroup) (THIS_ LPDPID,LPSTR,LPSTR) PURE; + STDMETHOD(DeletePlayerFromGroup)(THIS_ DPID,DPID) PURE; + STDMETHOD(DestroyPlayer) (THIS_ DPID) PURE; + STDMETHOD(DestroyGroup) (THIS_ DPID) PURE; + STDMETHOD(EnableNewPlayers) (THIS_ BOOL) PURE; + STDMETHOD(EnumGroupPlayers) (THIS_ DPID, LPDPENUMPLAYERSCALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(EnumGroups) (THIS_ DWORD, LPDPENUMPLAYERSCALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(EnumPlayers) (THIS_ DWORD, LPDPENUMPLAYERSCALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(EnumSessions) (THIS_ LPDPSESSIONDESC,DWORD,LPDPENUMSESSIONSCALLBACK,LPVOID,DWORD) PURE; + STDMETHOD(GetCaps) (THIS_ LPDPCAPS) PURE; + STDMETHOD(GetMessageCount) (THIS_ DPID, LPDWORD) PURE; + STDMETHOD(GetPlayerCaps) (THIS_ DPID, LPDPCAPS) PURE; + STDMETHOD(GetPlayerName) (THIS_ DPID,LPSTR,LPDWORD,LPSTR,LPDWORD) PURE; + STDMETHOD(Initialize) (THIS_ LPGUID) PURE; + STDMETHOD(Open) (THIS_ LPDPSESSIONDESC) PURE; + STDMETHOD(Receive) (THIS_ LPDPID,LPDPID,DWORD,LPVOID,LPDWORD) PURE; + STDMETHOD(SaveSession) (THIS_ LPSTR) PURE; + STDMETHOD(Send) (THIS_ DPID, DPID, DWORD, LPVOID, DWORD) PURE; + STDMETHOD(SetPlayerName) (THIS_ DPID,LPSTR,LPSTR) PURE; +}; + +/**************************************************************************** + * + * IDirectPlay interface macros + * + ****************************************************************************/ + +#if !defined(__cplusplus) || defined(CINTERFACE) + +#define IDirectPlay_AddPlayerToGroup(p,a,b) (p)->lpVtbl->AddPlayerToGroup(p,a,b) +#define IDirectPlay_Close(p) (p)->lpVtbl->Close(p) +#define IDirectPlay_CreateGroup(p,a,b,c) (p)->lpVtbl->CreateGroup(p,a,b,c) +#define IDirectPlay_CreatePlayer(p,a,b,c,d) (p)->lpVtbl->CreatePlayer(p,a,b,c,d) +#define IDirectPlay_DeletePlayerFromGroup(p,a,b) (p)->lpVtbl->DeletePlayerFromGroup(p,a,b) +#define IDirectPlay_DestroyGroup(p,a) (p)->lpVtbl->DestroyGroup(p,a) +#define IDirectPlay_DestroyPlayer(p,a) (p)->lpVtbl->DestroyPlayer(p,a) +#define IDirectPlay_EnableNewPlayers(p,a) (p)->lpVtbl->EnableNewPlayers(p,a) +#define IDirectPlay_EnumGroupPlayers(p,a,b,c,d) (p)->lpVtbl->EnumGroupPlayers(p,a,b,c,d) +#define IDirectPlay_EnumGroups(p,a,b,c,d) (p)->lpVtbl->EnumGroups(p,a,b,c,d) +#define IDirectPlay_EnumPlayers(p,a,b,c,d) (p)->lpVtbl->EnumPlayers(p,a,b,c,d) +#define IDirectPlay_EnumSessions(p,a,b,c,d,e) (p)->lpVtbl->EnumSessions(p,a,b,c,d,e) +#define IDirectPlay_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectPlay_GetMessageCount(p,a,b) (p)->lpVtbl->GetMessageCount(p,a,b) +#define IDirectPlay_GetPlayerCaps(p,a,b) (p)->lpVtbl->GetPlayerCaps(p,a,b) +#define IDirectPlay_GetPlayerName(p,a,b,c,d,e) (p)->lpVtbl->GetPlayerName(p,a,b,c,d,e) +#define IDirectPlay_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#define IDirectPlay_Open(p,a) (p)->lpVtbl->Open(p,a) +#define IDirectPlay_Receive(p,a,b,c,d,e) (p)->lpVtbl->Receive(p,a,b,c,d,e) +#define IDirectPlay_SaveSession(p,a) (p)->lpVtbl->SaveSession(p,a) +#define IDirectPlay_Send(p,a,b,c,d,e) (p)->lpVtbl->Send(p,a,b,c,d,e) +#define IDirectPlay_SetPlayerName(p,a,b,c) (p)->lpVtbl->SetPlayerName(p,a,b,c) + +#else /* C++ */ + +#define IDirectPlay_AddPlayerToGroup(p,a,b) (p)->AddPlayerToGroup(a,b) +#define IDirectPlay_Close(p) (p)->Close() +#define IDirectPlay_CreateGroup(p,a,b,c) (p)->CreateGroup(a,b,c) +#define IDirectPlay_CreatePlayer(p,a,b,c,d) (p)->CreatePlayer(a,b,c,d) +#define IDirectPlay_DeletePlayerFromGroup(p,a,b) (p)->DeletePlayerFromGroup(a,b) +#define IDirectPlay_DestroyGroup(p,a) (p)->DestroyGroup(a) +#define IDirectPlay_DestroyPlayer(p,a) (p)->DestroyPlayer(a) +#define IDirectPlay_EnableNewPlayers(p,a) (p)->EnableNewPlayers(a) +#define IDirectPlay_EnumGroupPlayers(p,a,b,c,d) (p)->EnumGroupPlayers(a,b,c,d) +#define IDirectPlay_EnumGroups(p,a,b,c,d) (p)->EnumGroups(a,b,c,d) +#define IDirectPlay_EnumPlayers(p,a,b,c,d) (p)->EnumPlayers(a,b,c,d) +#define IDirectPlay_EnumSessions(p,a,b,c,d,e) (p)->EnumSessions(a,b,c,d,e) +#define IDirectPlay_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectPlay_GetMessageCount(p,a,b) (p)->GetMessageCount(a,b) +#define IDirectPlay_GetPlayerCaps(p,a,b) (p)->GetPlayerCaps(a,b) +#define IDirectPlay_GetPlayerName(p,a,b,c,d,e) (p)->GetPlayerName(a,b,c,d,e) +#define IDirectPlay_Initialize(p,a) (p)->Initialize(a) +#define IDirectPlay_Open(p,a) (p)->Open(a) +#define IDirectPlay_Receive(p,a,b,c,d,e) (p)->Receive(a,b,c,d,e) +#define IDirectPlay_SaveSession(p,a) (p)->SaveSession(a) +#define IDirectPlay_Send(p,a,b,c,d,e) (p)->Send(a,b,c,d,e) +#define IDirectPlay_SetPlayerName(p,a,b,c) (p)->SetPlayerName(a,b,c) + +#endif + +DEFINE_GUID(IID_IDirectPlay, 0x5454e9a0, 0xdb65, 0x11ce, 0x92, 0x1c, 0x00, 0xaa, 0x00, 0x6c, 0x49, 0x72); + +#endif // IDIRECTPLAY2_OR_GREATER + +/**************************************************************************** + * + * IDirectPlay macros (included regardless of IDIRECTPLAY2_OR_GREATER flag) + * + ****************************************************************************/ + +#if !defined(__cplusplus) || defined(CINTERFACE) + +#define IDirectPlay_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectPlay_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectPlay_Release(p) (p)->lpVtbl->Release(p) + +#else + +#define IDirectPlay_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectPlay_AddRef(p) (p)->AddRef() +#define IDirectPlay_Release(p) (p)->Release() + +#endif // IDirectPlay interface macros + +#ifdef __cplusplus +}; +#endif + +#pragma warning(default:4201) + +#endif + diff --git a/windows_libs/mssdk/include/dplay8.h b/windows_libs/mssdk/include/dplay8.h new file mode 100644 index 00000000..731b6508 --- /dev/null +++ b/windows_libs/mssdk/include/dplay8.h @@ -0,0 +1,1183 @@ +/*==========================================================================; + * + * Copyright (C) 1998-2000 Microsoft Corporation. All Rights Reserved. + * + * File: DPlay8.h + * Content: DirectPlay8 include file + * + ***************************************************************************/ + +#ifndef __DIRECTPLAY8_H__ +#define __DIRECTPLAY8_H__ + +#include // for DECLARE_INTERFACE and HRESULT + +#include "dpaddr.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +/**************************************************************************** + * + * DirectPlay8 CLSIDs + * + ****************************************************************************/ + +// {743F1DC6-5ABA-429f-8BDF-C54D03253DC2} +DEFINE_GUID(CLSID_DirectPlay8Client, +0x743f1dc6, 0x5aba, 0x429f, 0x8b, 0xdf, 0xc5, 0x4d, 0x3, 0x25, 0x3d, 0xc2); + +// {286F484D-375E-4458-A272-B138E2F80A6A} +DEFINE_GUID(CLSID_DirectPlay8Peer, +0x286f484d, 0x375e, 0x4458, 0xa2, 0x72, 0xb1, 0x38, 0xe2, 0xf8, 0xa, 0x6a); + +// {DA825E1B-6830-43d7-835D-0B5AD82956A2} +DEFINE_GUID(CLSID_DirectPlay8Server, +0xda825e1b, 0x6830, 0x43d7, 0x83, 0x5d, 0xb, 0x5a, 0xd8, 0x29, 0x56, 0xa2); + + +/**************************************************************************** + * + * DirectPlay8 Interface IIDs + * + ****************************************************************************/ + +// {5102DACD-241B-11d3-AEA7-006097B01411} +DEFINE_GUID(IID_IDirectPlay8Client, +0x5102dacd, 0x241b, 0x11d3, 0xae, 0xa7, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11); + +// {5102DACF-241B-11d3-AEA7-006097B01411} +DEFINE_GUID(IID_IDirectPlay8Peer, +0x5102dacf, 0x241b, 0x11d3, 0xae, 0xa7, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11); + +// {5102DACE-241B-11d3-AEA7-006097B01411} +DEFINE_GUID(IID_IDirectPlay8Server, +0x5102dace, 0x241b, 0x11d3, 0xae, 0xa7, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11); + +/**************************************************************************** + * + * DirectPlay8 Service Provider GUIDs + * + ****************************************************************************/ + +// {53934290-628D-11D2-AE0F-006097B01411} +DEFINE_GUID(CLSID_DP8SP_IPX, 0x53934290, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11); + +// {6D4A3650-628D-11D2-AE0F-006097B01411} +DEFINE_GUID(CLSID_DP8SP_MODEM, 0x6d4a3650, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11); + +// {743B5D60-628D-11D2-AE0F-006097B01411} +DEFINE_GUID(CLSID_DP8SP_SERIAL, 0x743b5d60, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11); + +// {EBFE7BA0-628D-11D2-AE0F-006097B01411} +DEFINE_GUID(CLSID_DP8SP_TCPIP, 0xebfe7ba0, 0x628d, 0x11d2, 0xae, 0xf, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11); + +/**************************************************************************** + * + * DirectPlay8 Interface Pointer definitions + * + ****************************************************************************/ + +typedef struct IDirectPlay8Peer *PDIRECTPLAY8PEER; +typedef struct IDirectPlay8Server *PDIRECTPLAY8SERVER; +typedef struct IDirectPlay8Client *PDIRECTPLAY8CLIENT; + + +/**************************************************************************** + * + * DirectPlay8 Forward Declarations For External Types + * + ****************************************************************************/ + +typedef struct IDirectPlay8LobbiedApplication *PDNLOBBIEDAPPLICATION; +typedef struct IDirectPlay8Address IDirectPlay8Address; + +/**************************************************************************** + * + * DirectPlay8 Callback Functions + * + ****************************************************************************/ + +// +// Callback Function Type Definition +// +typedef HRESULT (WINAPI *PFNDPNMESSAGEHANDLER)(PVOID,DWORD,PVOID); + +/**************************************************************************** + * + * DirectPlay8 Datatypes (Non-Structure / Non-Message) + * + ****************************************************************************/ + +// +// Player IDs. Used to uniquely identify a player in a session +// +typedef DWORD DPNID, *PDPNID; + +// +// Used as identifiers for operations +// +typedef DWORD DPNHANDLE, *PDPNHANDLE; + +/**************************************************************************** + * + * DirectPlay8 Message Identifiers + * + ****************************************************************************/ + +#define DPN_MSGID_OFFSET 0xFFFF0000 +#define DPN_MSGID_ADD_PLAYER_TO_GROUP ( DPN_MSGID_OFFSET | 0x0001 ) +#define DPN_MSGID_APPLICATION_DESC ( DPN_MSGID_OFFSET | 0x0002 ) +#define DPN_MSGID_ASYNC_OP_COMPLETE ( DPN_MSGID_OFFSET | 0x0003 ) +#define DPN_MSGID_CLIENT_INFO ( DPN_MSGID_OFFSET | 0x0004 ) +#define DPN_MSGID_CONNECT_COMPLETE ( DPN_MSGID_OFFSET | 0x0005 ) +#define DPN_MSGID_CREATE_GROUP ( DPN_MSGID_OFFSET | 0x0006 ) +#define DPN_MSGID_CREATE_PLAYER ( DPN_MSGID_OFFSET | 0x0007 ) +#define DPN_MSGID_DESTROY_GROUP ( DPN_MSGID_OFFSET | 0x0008 ) +#define DPN_MSGID_DESTROY_PLAYER ( DPN_MSGID_OFFSET | 0x0009 ) +#define DPN_MSGID_ENUM_HOSTS_QUERY ( DPN_MSGID_OFFSET | 0x000a ) +#define DPN_MSGID_ENUM_HOSTS_RESPONSE ( DPN_MSGID_OFFSET | 0x000b ) +#define DPN_MSGID_GROUP_INFO ( DPN_MSGID_OFFSET | 0x000c ) +#define DPN_MSGID_HOST_MIGRATE ( DPN_MSGID_OFFSET | 0x000d ) +#define DPN_MSGID_INDICATE_CONNECT ( DPN_MSGID_OFFSET | 0x000e ) +#define DPN_MSGID_INDICATED_CONNECT_ABORTED ( DPN_MSGID_OFFSET | 0x000f ) +#define DPN_MSGID_PEER_INFO ( DPN_MSGID_OFFSET | 0x0010 ) +#define DPN_MSGID_RECEIVE ( DPN_MSGID_OFFSET | 0x0011 ) +#define DPN_MSGID_REMOVE_PLAYER_FROM_GROUP ( DPN_MSGID_OFFSET | 0x0012 ) +#define DPN_MSGID_RETURN_BUFFER ( DPN_MSGID_OFFSET | 0x0013 ) +#define DPN_MSGID_SEND_COMPLETE ( DPN_MSGID_OFFSET | 0x0014 ) +#define DPN_MSGID_SERVER_INFO ( DPN_MSGID_OFFSET | 0x0015 ) +#define DPN_MSGID_TERMINATE_SESSION ( DPN_MSGID_OFFSET | 0x0016 ) + +/**************************************************************************** + * + * DirectPlay8 Constants + * + ****************************************************************************/ + +#define DPNID_ALL_PLAYERS_GROUP 0 + +// +// DESTROY_GROUP reasons +// +#define DPNDESTROYGROUPREASON_NORMAL 0x0001 +#define DPNDESTROYGROUPREASON_AUTODESTRUCTED 0x0002 +#define DPNDESTROYGROUPREASON_SESSIONTERMINATED 0x0003 + +// +// DESTROY_PLAYER reasons +// +#define DPNDESTROYPLAYERREASON_NORMAL 0x0001 +#define DPNDESTROYPLAYERREASON_CONNECTIONLOST 0x0002 +#define DPNDESTROYPLAYERREASON_SESSIONTERMINATED 0x0003 +#define DPNDESTROYPLAYERREASON_HOSTDESTROYEDPLAYER 0x0004 + +/**************************************************************************** + * + * DirectPlay8 Flags + * + ****************************************************************************/ + +// +// Asynchronous operation flags (For Async Ops) +// +#define DPNOP_SYNC 0x80000000 + +// +// Add player to group flags (For AddPlayerToGroup) +// +#define DPNADDPLAYERTOGROUP_SYNC DPNOP_SYNC + +// +// Cancel flags +// +#define DPNCANCEL_CONNECT 0x0001 +#define DPNCANCEL_ENUM 0x0002 +#define DPNCANCEL_SEND 0x0004 +#define DPNCANCEL_ALL_OPERATIONS 0x8000 + +// +// Connect flags (For Connect) +// +#define DPNCONNECT_SYNC DPNOP_SYNC +#define DPNCONNECT_OKTOQUERYFORADDRESSING 0x0001 + +// +// Create group flags (For CreateGroup) +// +#define DPNCREATEGROUP_SYNC DPNOP_SYNC + +// +// Destroy group flags (For DestroyGroup) +// +#define DPNDESTROYGROUP_SYNC DPNOP_SYNC + +// +// Enumerate clients and groups flags (For EnumPlayersAndGroups) +// +#define DPNENUM_PLAYERS 0x0001 +#define DPNENUM_GROUPS 0x0010 + +// +// Enum hosts flags (For EnumHosts) +// +#define DPNENUMHOSTS_SYNC DPNOP_SYNC +#define DPNENUMHOSTS_OKTOQUERYFORADDRESSING 0x0001 +#define DPNENUMHOSTS_NOBROADCASTFALLBACK 0x0002 + +// +// Enum service provider flags (For EnumSP) +// +#define DPNENUMSERVICEPROVIDERS_ALL 0x0001 + +// +// Get send queue info flags (For GetSendQueueInfo) +// +#define DPNGETSENDQUEUEINFO_PRIORITY_NORMAL 0x0001 +#define DPNGETSENDQUEUEINFO_PRIORITY_HIGH 0x0002 +#define DPNGETSENDQUEUEINFO_PRIORITY_LOW 0x0004 + +// +// Group information flags (For Group Info) +// +#define DPNGROUP_AUTODESTRUCT 0x0001 + +// +// Host flags (For Host) +// +#define DPNHOST_OKTOQUERYFORADDRESSING 0x0001 + +// +// Set info +// +#define DPNINFO_NAME 0x0001 +#define DPNINFO_DATA 0x0002 + +// +// Initialize flags (For Initialize) +// +#define DPNINITIALIZE_DISABLEPARAMVAL 0x0001 + +// +// Register Lobby flags +// +#define DPNLOBBY_REGISTER 0x0001 +#define DPNLOBBY_UNREGISTER 0x0002 + +// +// Player information flags (For Player Info / Player Messages) +// +#define DPNPLAYER_LOCAL 0x0002 +#define DPNPLAYER_HOST 0x0004 + +// +// Remove player from group flags (For RemovePlayerFromGroup) +// +#define DPNREMOVEPLAYERFROMGROUP_SYNC DPNOP_SYNC + +// +// Send flags (For Send/SendTo) +// +#define DPNSEND_SYNC DPNOP_SYNC +#define DPNSEND_NOCOPY 0x0001 +#define DPNSEND_NOCOMPLETE 0x0002 +#define DPNSEND_COMPLETEONPROCESS 0x0004 +#define DPNSEND_GUARANTEED 0x0008 +#define DPNSEND_NONSEQUENTIAL 0x0010 +#define DPNSEND_NOLOOPBACK 0x0020 +#define DPNSEND_PRIORITY_LOW 0x0040 +#define DPNSEND_PRIORITY_HIGH 0x0080 + +// +// Session Flags (for DPN_APPLICATION_DESC) +// +#define DPNSESSION_CLIENT_SERVER 0x0001 +#define DPNSESSION_MIGRATE_HOST 0x0004 +#define DPNSESSION_NODPNSVR 0x0040 +#define DPNSESSION_REQUIREPASSWORD 0x0080 + +// +// Set client info flags (For SetClientInfo) +// +#define DPNSETCLIENTINFO_SYNC DPNOP_SYNC + +// +// Set group info flags (For SetGroupInfo) +// +#define DPNSETGROUPINFO_SYNC DPNOP_SYNC + +// +// Set peer info flags (For SetPeerInfo) +// +#define DPNSETPEERINFO_SYNC DPNOP_SYNC + +// +// Set server info flags (For SetServerInfo) +// +#define DPNSETSERVERINFO_SYNC DPNOP_SYNC + +// +// SP capabilities flags +// +#define DPNSPCAPS_SUPPORTSDPNSRV 0x0001 +#define DPNSPCAPS_SUPPORTSBROADCAST 0x0002 +#define DPNSPCAPS_SUPPORTSALLADAPTERS 0x0004 + +/**************************************************************************** + * + * DirectPlay8 Structures (Non-Message) + * + ****************************************************************************/ + +// +// Application description +// +typedef struct _DPN_APPLICATION_DESC +{ + DWORD dwSize; // Size of this structure + DWORD dwFlags; // Flags (DPNSESSION_...) + GUID guidInstance; // Instance GUID + GUID guidApplication; // Application GUID + DWORD dwMaxPlayers; // Maximum # of players allowed (0=no limit) + DWORD dwCurrentPlayers; // Current # of players allowed + WCHAR *pwszSessionName; // Name of the session + WCHAR *pwszPassword; // Password for the session + PVOID pvReservedData; + DWORD dwReservedDataSize; + PVOID pvApplicationReservedData; + DWORD dwApplicationReservedDataSize; +} DPN_APPLICATION_DESC, *PDPN_APPLICATION_DESC; + +// +// Generic Buffer Description +// +typedef struct _BUFFERDESC +{ + DWORD dwBufferSize; + BYTE * UNALIGNED pBufferData; +} BUFFERDESC, DPN_BUFFER_DESC, *PDPN_BUFFER_DESC; + +typedef BUFFERDESC FAR * PBUFFERDESC; + +// +// DirectPlay8 capabilities +// +typedef struct _DPN_CAPS +{ + DWORD dwSize; // Size of this structure + DWORD dwFlags; // Flags + DWORD dwConnectTimeout; // ms before a connect request times out + DWORD dwConnectRetries; // # of times to attempt the connection + DWORD dwTimeoutUntilKeepAlive; // ms of inactivity before a keep alive is sent +} DPN_CAPS, *PDPN_CAPS; + +// Connection Statistics information + +typedef struct _DPN_CONNECTION_INFO +{ + DWORD dwSize; + DWORD dwRoundTripLatencyMS; + DWORD dwThroughputBPS; + DWORD dwPeakThroughputBPS; + + DWORD dwBytesSentGuaranteed; + DWORD dwPacketsSentGuaranteed; + DWORD dwBytesSentNonGuaranteed; + DWORD dwPacketsSentNonGuaranteed; + + DWORD dwBytesRetried; // Guaranteed only + DWORD dwPacketsRetried; // Guaranteed only + DWORD dwBytesDropped; // Non Guaranteed only + DWORD dwPacketsDropped; // Non Guaranteed only + + DWORD dwMessagesTransmittedHighPriority; + DWORD dwMessagesTimedOutHighPriority; + DWORD dwMessagesTransmittedNormalPriority; + DWORD dwMessagesTimedOutNormalPriority; + DWORD dwMessagesTransmittedLowPriority; + DWORD dwMessagesTimedOutLowPriority; + + DWORD dwBytesReceivedGuaranteed; + DWORD dwPacketsReceivedGuaranteed; + DWORD dwBytesReceivedNonGuaranteed; + DWORD dwPacketsReceivedNonGuaranteed; + DWORD dwMessagesReceived; + +} DPN_CONNECTION_INFO, *PDPN_CONNECTION_INFO; + +// +// Group information strucutre +// +typedef struct _DPN_GROUP_INFO +{ + DWORD dwSize; // size of this structure + DWORD dwInfoFlags; // information contained + PWSTR pwszName; // Unicode Name + PVOID pvData; // data block + DWORD dwDataSize; // size in BYTES of data block + DWORD dwGroupFlags; // group flags (DPNGROUP_...) +} DPN_GROUP_INFO, *PDPN_GROUP_INFO; + +// +// Player information structure +// +typedef struct _DPN_PLAYER_INFO +{ + DWORD dwSize; // size of this structure + DWORD dwInfoFlags; // information contained + PWSTR pwszName; // Unicode Name + PVOID pvData; // data block + DWORD dwDataSize; // size in BYTES of data block + DWORD dwPlayerFlags; // player flags (DPNPLAYER_...) +} DPN_PLAYER_INFO, *PDPN_PLAYER_INFO; + +typedef struct _DPN_SECURITY_CREDENTIALS DPN_SECURITY_CREDENTIALS, *PDPN_SECURITY_CREDENTIALS; +typedef struct _DPN_SECURITY_DESC DPN_SECURITY_DESC, *PDPN_SECURITY_DESC; + +// +// Service provider & adapter enumeration structure +// +typedef struct _DPN_SERVICE_PROVIDER_INFO +{ + DWORD dwFlags; + GUID guid; // SP Guid + WCHAR *pwszName; // Friendly Name + PVOID pvReserved; + DWORD dwReserved; +} DPN_SERVICE_PROVIDER_INFO, *PDPN_SERVICE_PROVIDER_INFO; + +// +// Service provider caps structure +// +typedef struct _DPN_SP_CAPS +{ + DWORD dwSize; // Size of this structure + DWORD dwFlags; // Flags ((DPNSPCAPS_...) + DWORD dwNumThreads; // # of worker threads to use + DWORD dwDefaultEnumCount; // default # of enum requests + DWORD dwDefaultEnumRetryInterval; // default ms between enum requests + DWORD dwDefaultEnumTimeout; // default enum timeout + DWORD dwMaxEnumPayloadSize; // maximum size in bytes for enum payload data + DWORD dwBuffersPerThread; // number of receive buffers per thread + DWORD dwSystemBufferSize; // amount of buffering to do in addition to posted receive buffers +} DPN_SP_CAPS, *PDPN_SP_CAPS; + + +/**************************************************************************** + * + * IDirectPlay8 message handler call back structures + * + ****************************************************************************/ + +// +// Add player to group strucutre for message handler +// (DPN_MSGID_ADD_PLAYER_TO_GROUP) +// +typedef struct _DPNMSG_ADD_PLAYER_TO_GROUP +{ + DWORD dwSize; // Size of this structure + DPNID dpnidGroup; // DPNID of group + PVOID pvGroupContext; // Group context value + DPNID dpnidPlayer; // DPNID of added player + PVOID pvPlayerContext; // Player context value +} DPNMSG_ADD_PLAYER_TO_GROUP, *PDPNMSG_ADD_PLAYER_TO_GROUP; + +// +// Async operation completion structure for message handler +// (DPN_MSGID_ASYNC_OP_COMPLETE) +// +typedef struct _DPNMSG_ASYNC_OP_COMPLETE +{ + DWORD dwSize; // Size of this structure + DPNHANDLE hAsyncOp; // DirectPlay8 async operation handle + PVOID pvUserContext; // User context supplied + HRESULT hResultCode; // HRESULT of operation +} DPNMSG_ASYNC_OP_COMPLETE, *PDPNMSG_ASYNC_OP_COMPLETE; + +// +// Client info structure for message handler +// (DPN_MSGID_CLIENT_INFO) +// +typedef struct _DPNMSG_CLIENT_INFO +{ + DWORD dwSize; // Size of this structure + DPNID dpnidClient; // DPNID of client + PVOID pvPlayerContext; // Player context value +} DPNMSG_CLIENT_INFO, *PDPNMSG_CLIENT_INFO; + +// +// Connect complete structure for message handler +// (DPN_MSGID_CONNECT_COMPLETE) +// +typedef struct _DPNMSG_CONNECT_COMPLETE +{ + DWORD dwSize; // Size of this structure + DPNHANDLE hAsyncOp; // DirectPlay8 Async operation handle + PVOID pvUserContext; // User context supplied at Connect + HRESULT hResultCode; // HRESULT of connection attempt + PVOID pvApplicationReplyData; // Connection reply data from Host/Server + DWORD dwApplicationReplyDataSize; // Size (in bytes) of pvApplicationReplyData +} DPNMSG_CONNECT_COMPLETE, *PDPNMSG_CONNECT_COMPLETE; + +// +// Create group structure for message handler +// (DPN_MSGID_CREATE_GROUP) +// +typedef struct _DPNMSG_CREATE_GROUP +{ + DWORD dwSize; // Size of this structure + DPNID dpnidGroup; // DPNID of new group + DPNID dpnidOwner; // Owner of newgroup + PVOID pvGroupContext; // Group context value +} DPNMSG_CREATE_GROUP, *PDPNMSG_CREATE_GROUP; + +// +// Create player structure for message handler +// (DPN_MSGID_CREATE_PLAYER) +// +typedef struct _DPNMSG_CREATE_PLAYER +{ + DWORD dwSize; // Size of this structure + DPNID dpnidPlayer; // DPNID of new player + PVOID pvPlayerContext; // Player context value +} DPNMSG_CREATE_PLAYER, *PDPNMSG_CREATE_PLAYER; + +// +// Destroy group structure for message handler +// (DPN_MSGID_DESTROY_GROUP) +// +typedef struct _DPNMSG_DESTROY_GROUP +{ + DWORD dwSize; // Size of this structure + DPNID dpnidGroup; // DPNID of destroyed group + PVOID pvGroupContext; // Group context value + DWORD dwReason; // Information only +} DPNMSG_DESTROY_GROUP, *PDPNMSG_DESTROY_GROUP; + +// +// Destroy player structure for message handler +// (DPN_MSGID_DESTROY_PLAYER) +// +typedef struct _DPNMSG_DESTROY_PLAYER +{ + DWORD dwSize; // Size of this structure + DPNID dpnidPlayer; // DPNID of leaving player + PVOID pvPlayerContext; // Player context value + DWORD dwReason; // Information only +} DPNMSG_DESTROY_PLAYER, *PDPNMSG_DESTROY_PLAYER; + +// +// Enumeration request received structure for message handler +// (DPN_MSGID_ENUM_HOSTS_QUERY) +// +typedef struct _DPNMSG_ENUM_HOSTS_QUERY +{ + DWORD dwSize; // Size of this structure. + IDirectPlay8Address *pAddressSender; // Address of client who sent the request + IDirectPlay8Address *pAddressDevice; // Address of device request was received on + PVOID pvReceivedData; // Request data (set on client) + DWORD dwReceivedDataSize; // Request data size (set on client) + DWORD dwMaxResponseDataSize; // Max allowable size of enum response + PVOID pvResponseData; // Optional query repsonse (user set) + DWORD dwResponseDataSize; // Optional query response size (user set) + PVOID pvResponseContext; // Optional query response context (user set) +} DPNMSG_ENUM_HOSTS_QUERY, *PDPNMSG_ENUM_HOSTS_QUERY; + +// +// Enumeration response received structure for message handler +// (DPN_MSGID_ENUM_HOSTS_RESPONSE) +// +typedef struct _DPNMSG_ENUM_HOSTS_RESPONSE +{ + DWORD dwSize; // Size of this structure + IDirectPlay8Address *pAddressSender; // Address of host who responded + IDirectPlay8Address *pAddressDevice; // Device response was received on + const DPN_APPLICATION_DESC *pApplicationDescription; // Application description for the session + PVOID pvResponseData; // Optional response data (set on host) + DWORD dwResponseDataSize; // Optional response data size (set on host) + PVOID pvUserContext; // Context value supplied for enumeration + DWORD dwRoundTripLatencyMS; // Round trip latency in MS +} DPNMSG_ENUM_HOSTS_RESPONSE, *PDPNMSG_ENUM_HOSTS_RESPONSE; + +// +// Group info structure for message handler +// (DPN_MSGID_GROUP_INFO) +// +typedef struct _DPNMSG_GROUP_INFO +{ + DWORD dwSize; // Size of this structure + DPNID dpnidGroup; // DPNID of group + PVOID pvGroupContext; // Group context value +} DPNMSG_GROUP_INFO, *PDPNMSG_GROUP_INFO; + +// +// Migrate host structure for message handler +// (DPN_MSGID_HOST_MIGRATE) +// +typedef struct _DPNMSG_HOST_MIGRATE +{ + DWORD dwSize; // Size of this structure + DPNID dpnidNewHost; // DPNID of new Host player + PVOID pvPlayerContext; // Player context value +} DPNMSG_HOST_MIGRATE, *PDPNMSG_HOST_MIGRATE; + +// +// Indicate connect structure for message handler +// (DPN_MSGID_INDICATE_CONNECT) +// +typedef struct _DPNMSG_INDICATE_CONNECT +{ + DWORD dwSize; // Size of this structure + PVOID pvUserConnectData; // Connecting player data + DWORD dwUserConnectDataSize; // Size (in bytes) of pvUserConnectData + PVOID pvReplyData; // Connection reply data + DWORD dwReplyDataSize; // Size (in bytes) of pvReplyData + PVOID pvReplyContext; // Buffer context for pvReplyData + PVOID pvPlayerContext; // Player context preset + IDirectPlay8Address *pAddressPlayer;// Address of connecting player + IDirectPlay8Address *pAddressDevice;// Address of device receiving connect attempt +} DPNMSG_INDICATE_CONNECT, *PDPNMSG_INDICATE_CONNECT; + +// +// Indicated connect aborted structure for message handler +// (DPN_MSGID_INDICATED_CONNECT_ABORTED) +// +typedef struct _DPNMSG_INDICATED_CONNECT_ABORTED +{ + DWORD dwSize; // Size of this structure + PVOID pvPlayerContext; // Player context preset from DPNMSG_INDICATE_CONNECT +} DPNMSG_INDICATED_CONNECT_ABORTED, *PDPNMSG_INDICATED_CONNECT_ABORTED; + +// +// Peer info structure for message handler +// (DPN_MSGID_PEER_INFO) +// +typedef struct _DPNMSG_PEER_INFO +{ + DWORD dwSize; // Size of this structure + DPNID dpnidPeer; // DPNID of peer + PVOID pvPlayerContext; // Player context value +} DPNMSG_PEER_INFO, *PDPNMSG_PEER_INFO; + +// +// Receive structure for message handler +// (DPN_MSGID_RECEIVE) +// +typedef struct _DPNMSG_RECEIVE +{ + DWORD dwSize; // Size of this structure + DPNID dpnidSender; // DPNID of sending player + PVOID pvPlayerContext; // Player context value of sending player + PBYTE pReceiveData; // Received data + DWORD dwReceiveDataSize; // Size (in bytes) of pReceiveData + DPNHANDLE hBufferHandle; // Buffer handle for pReceiveData +} DPNMSG_RECEIVE, *PDPNMSG_RECEIVE; + +// +// Remove player from group structure for message handler +// (DPN_MSGID_REMOVE_PLAYER_FROM_GROUP) +// +typedef struct _DPNMSG_REMOVE_PLAYER_FROM_GROUP +{ + DWORD dwSize; // Size of this structure + DPNID dpnidGroup; // DPNID of group + PVOID pvGroupContext; // Group context value + DPNID dpnidPlayer; // DPNID of deleted player + PVOID pvPlayerContext; // Player context value +} DPNMSG_REMOVE_PLAYER_FROM_GROUP, *PDPNMSG_REMOVE_PLAYER_FROM_GROUP; + +// +// Returned buffer structure for message handler +// (DPN_MSGID_RETURN_BUFFER) +// +typedef struct _DPNMSG_RETURN_BUFFER +{ + DWORD dwSize; // Size of this structure + HRESULT hResultCode; // Return value of operation + PVOID pvBuffer; // Buffer being returned + PVOID pvUserContext; // Context associated with buffer +} DPNMSG_RETURN_BUFFER, *PDPNMSG_RETURN_BUFFER; + +// +// Send complete structure for message handler +// (DPN_MSGID_SEND_COMPLETE) +// +typedef struct _DPNMSG_SEND_COMPLETE +{ + DWORD dwSize; // Size of this structure + DPNHANDLE hAsyncOp; // DirectPlay8 Async operation handle + PVOID pvUserContext; // User context supplied at Send/SendTo + HRESULT hResultCode; // HRESULT of send + DWORD dwSendTime; // Send time in ms +} DPNMSG_SEND_COMPLETE, *PDPNMSG_SEND_COMPLETE; + +// +// Server info structure for message handler +// (DPN_MSGID_SERVER_INFO) +// +typedef struct _DPNMSG_SERVER_INFO +{ + DWORD dwSize; // Size of this structure + DPNID dpnidServer; // DPNID of server + PVOID pvPlayerContext; // Player context value +} DPNMSG_SERVER_INFO, *PDPNMSG_SERVER_INFO; + +// +// Terminated session structure for message handler +// (DPN_MSGID_TERMINATE_SESSION) +// +typedef struct _DPNMSG_TERMINATE_SESSION +{ + DWORD dwSize; // Size of this structure + HRESULT hResultCode; // Reason + PVOID pvTerminateData; // Data passed from Host/Server + DWORD dwTerminateDataSize;// Size (in bytes) of pvTerminateData +} DPNMSG_TERMINATE_SESSION, *PDPNMSG_TERMINATE_SESSION; + + +/**************************************************************************** + * + * DirectPlay8 Functions + * + ****************************************************************************/ + +extern HRESULT WINAPI DirectPlay8Create( const GUID * pcIID, void **ppvInterface, IUnknown *pUnknown); + +/**************************************************************************** + * + * DirectPlay8 Application Interfaces + * + ****************************************************************************/ + +// +// COM definition for DirectPlay8 Client interface +// +#undef INTERFACE // External COM Implementation +#define INTERFACE IDirectPlay8Client +DECLARE_INTERFACE_(IDirectPlay8Client,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectPlay8Client methods ***/ + STDMETHOD(Initialize) (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE; + STDMETHOD(EnumServiceProviders) (THIS_ const GUID *const pguidServiceProvider, const GUID *const pguidApplication, DPN_SERVICE_PROVIDER_INFO *const pSPInfoBuffer, PDWORD const pcbEnumData, PDWORD const pcReturned, const DWORD dwFlags) PURE; + STDMETHOD(EnumHosts) (THIS_ PDPN_APPLICATION_DESC const pApplicationDesc,IDirectPlay8Address *const pAddrHost,IDirectPlay8Address *const pDeviceInfo,PVOID const pUserEnumData,const DWORD dwUserEnumDataSize,const DWORD dwEnumCount,const DWORD dwRetryInterval,const DWORD dwTimeOut,PVOID const pvUserContext,DPNHANDLE *const pAsyncHandle,const DWORD dwFlags) PURE; + STDMETHOD(CancelAsyncOperation) (THIS_ const DPNHANDLE hAsyncHandle, const DWORD dwFlags) PURE; + STDMETHOD(Connect) (THIS_ const DPN_APPLICATION_DESC *const pdnAppDesc,IDirectPlay8Address *const pHostAddr,IDirectPlay8Address *const pDeviceInfo,const DPN_SECURITY_DESC *const pdnSecurity,const DPN_SECURITY_CREDENTIALS *const pdnCredentials,const void *const pvUserConnectData,const DWORD dwUserConnectDataSize,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE; + STDMETHOD(Send) (THIS_ const DPN_BUFFER_DESC *const prgBufferDesc,const DWORD cBufferDesc,const DWORD dwTimeOut,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE; + STDMETHOD(GetSendQueueInfo) (THIS_ DWORD *const pdwNumMsgs, DWORD *const pdwNumBytes, const DWORD dwFlags) PURE; + STDMETHOD(GetApplicationDesc) (THIS_ DPN_APPLICATION_DESC *const pAppDescBuffer, DWORD *const pcbDataSize, const DWORD dwFlags) PURE; + STDMETHOD(SetClientInfo) (THIS_ const DPN_PLAYER_INFO *const pdpnPlayerInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE; + STDMETHOD(GetServerInfo) (THIS_ DPN_PLAYER_INFO *const pdpnPlayerInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE; + STDMETHOD(GetServerAddress) (THIS_ IDirectPlay8Address **const pAddress,const DWORD dwFlags) PURE; + STDMETHOD(Close) (THIS_ const DWORD dwFlags) PURE; + STDMETHOD(ReturnBuffer) (THIS_ const DPNHANDLE hBufferHandle,const DWORD dwFlags) PURE; + STDMETHOD(GetCaps) (THIS_ DPN_CAPS *const pdpCaps,const DWORD dwFlags) PURE; + STDMETHOD(SetCaps) (THIS_ const DPN_CAPS *const pdpCaps, const DWORD dwFlags) PURE; + STDMETHOD(SetSPCaps) (THIS_ const GUID * const pguidSP, const DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags ) PURE; + STDMETHOD(GetSPCaps) (THIS_ const GUID * const pguidSP,DPN_SP_CAPS *const pdpspCaps,const DWORD dwFlags) PURE; + STDMETHOD(GetConnectionInfo) (THIS_ DPN_CONNECTION_INFO *const pdpConnectionInfo,const DWORD dwFlags) PURE; + STDMETHOD(RegisterLobby) (THIS_ const DPNHANDLE dpnHandle, IDirectPlay8LobbiedApplication *const pIDP8LobbiedApplication,const DWORD dwFlags) PURE; +}; + +// +// COM definition for DirectPlay8 Server interface +// +#undef INTERFACE // External COM Implementation +#define INTERFACE IDirectPlay8Server +DECLARE_INTERFACE_(IDirectPlay8Server,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectPlay8Server methods ***/ + STDMETHOD(Initialize) (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE; + STDMETHOD(EnumServiceProviders) (THIS_ const GUID *const pguidServiceProvider,const GUID *const pguidApplication,DPN_SERVICE_PROVIDER_INFO *const pSPInfoBuffer,PDWORD const pcbEnumData,PDWORD const pcReturned,const DWORD dwFlags) PURE; + STDMETHOD(CancelAsyncOperation) (THIS_ const DPNHANDLE hAsyncHandle,const DWORD dwFlags) PURE; + STDMETHOD(GetSendQueueInfo) (THIS_ const DPNID dpnid,DWORD *const pdwNumMsgs, DWORD *const pdwNumBytes, const DWORD dwFlags) PURE; + STDMETHOD(GetApplicationDesc) (THIS_ DPN_APPLICATION_DESC *const pAppDescBuffer, DWORD *const pcbDataSize, const DWORD dwFlags) PURE; + STDMETHOD(SetServerInfo) (THIS_ const DPN_PLAYER_INFO *const pdpnPlayerInfo,PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE; + STDMETHOD(GetClientInfo) (THIS_ const DPNID dpnid,DPN_PLAYER_INFO *const pdpnPlayerInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE; + STDMETHOD(GetClientAddress) (THIS_ const DPNID dpnid,IDirectPlay8Address **const pAddress,const DWORD dwFlags) PURE; + STDMETHOD(GetLocalHostAddresses) (THIS_ IDirectPlay8Address **const prgpAddress,DWORD *const pcAddress,const DWORD dwFlags) PURE; + STDMETHOD(SetApplicationDesc) (THIS_ const DPN_APPLICATION_DESC *const pad, const DWORD dwFlags) PURE; + STDMETHOD(Host) (THIS_ const DPN_APPLICATION_DESC *const pdnAppDesc,IDirectPlay8Address **const prgpDeviceInfo,const DWORD cDeviceInfo,const DPN_SECURITY_DESC *const pdnSecurity,const DPN_SECURITY_CREDENTIALS *const pdnCredentials,void *const pvPlayerContext,const DWORD dwFlags) PURE; + STDMETHOD(SendTo) (THIS_ const DPNID dpnid,const DPN_BUFFER_DESC *const prgBufferDesc,const DWORD cBufferDesc,const DWORD dwTimeOut,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE; + STDMETHOD(CreateGroup) (THIS_ const DPN_GROUP_INFO *const pdpnGroupInfo,void *const pvGroupContext,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE; + STDMETHOD(DestroyGroup) (THIS_ const DPNID idGroup, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE; + STDMETHOD(AddPlayerToGroup) (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE; + STDMETHOD(RemovePlayerFromGroup) (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE; + STDMETHOD(SetGroupInfo) (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE; + STDMETHOD(GetGroupInfo) (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE; + STDMETHOD(EnumPlayersAndGroups) (THIS_ DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE; + STDMETHOD(EnumGroupMembers) (THIS_ const DPNID dpnid, DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE; + STDMETHOD(Close) (THIS_ const DWORD dwFlags) PURE; + STDMETHOD(DestroyClient) (THIS_ const DPNID dpnidClient, const void *const pvDestroyData, const DWORD dwDestroyDataSize, const DWORD dwFlags) PURE; + STDMETHOD(ReturnBuffer) (THIS_ const DPNHANDLE hBufferHandle,const DWORD dwFlags) PURE; + STDMETHOD(GetPlayerContext) (THIS_ const DPNID dpnid,PVOID *const ppvPlayerContext,const DWORD dwFlags) PURE; + STDMETHOD(GetGroupContext) (THIS_ const DPNID dpnid,PVOID *const ppvGroupContext,const DWORD dwFlags) PURE; + STDMETHOD(GetCaps) (THIS_ DPN_CAPS *const pdpCaps,const DWORD dwFlags) PURE; + STDMETHOD(SetCaps) (THIS_ const DPN_CAPS *const pdpCaps, const DWORD dwFlags) PURE; + STDMETHOD(SetSPCaps) (THIS_ const GUID * const pguidSP, const DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags ) PURE; + STDMETHOD(GetSPCaps) (THIS_ const GUID * const pguidSP, DPN_SP_CAPS *const pdpspCaps,const DWORD dwFlags) PURE; + STDMETHOD(GetConnectionInfo) (THIS_ const DPNID dpnid, DPN_CONNECTION_INFO *const pdpConnectionInfo,const DWORD dwFlags) PURE; + STDMETHOD(RegisterLobby) (THIS_ const DPNHANDLE dpnHandle, IDirectPlay8LobbiedApplication *const pIDP8LobbiedApplication,const DWORD dwFlags) PURE; +}; + +// +// COM definition for DirectPlay8 Peer interface +// +#undef INTERFACE // External COM Implementation +#define INTERFACE IDirectPlay8Peer +DECLARE_INTERFACE_(IDirectPlay8Peer,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectPlay8Peer methods ***/ + STDMETHOD(Initialize) (THIS_ PVOID const pvUserContext, const PFNDPNMESSAGEHANDLER pfn, const DWORD dwFlags) PURE; + STDMETHOD(EnumServiceProviders) (THIS_ const GUID *const pguidServiceProvider, const GUID *const pguidApplication, DPN_SERVICE_PROVIDER_INFO *const pSPInfoBuffer, DWORD *const pcbEnumData, DWORD *const pcReturned, const DWORD dwFlags) PURE; + STDMETHOD(CancelAsyncOperation) (THIS_ const DPNHANDLE hAsyncHandle, const DWORD dwFlags) PURE; + STDMETHOD(Connect) (THIS_ const DPN_APPLICATION_DESC *const pdnAppDesc,IDirectPlay8Address *const pHostAddr,IDirectPlay8Address *const pDeviceInfo,const DPN_SECURITY_DESC *const pdnSecurity,const DPN_SECURITY_CREDENTIALS *const pdnCredentials,const void *const pvUserConnectData,const DWORD dwUserConnectDataSize,void *const pvPlayerContext,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE; + STDMETHOD(SendTo) (THIS_ const DPNID dpnid,const DPN_BUFFER_DESC *const prgBufferDesc,const DWORD cBufferDesc,const DWORD dwTimeOut,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE; + STDMETHOD(GetSendQueueInfo) (THIS_ const DPNID dpnid, DWORD *const pdwNumMsgs, DWORD *const pdwNumBytes, const DWORD dwFlags) PURE; + STDMETHOD(Host) (THIS_ const DPN_APPLICATION_DESC *const pdnAppDesc,IDirectPlay8Address **const prgpDeviceInfo,const DWORD cDeviceInfo,const DPN_SECURITY_DESC *const pdnSecurity,const DPN_SECURITY_CREDENTIALS *const pdnCredentials,void *const pvPlayerContext,const DWORD dwFlags) PURE; + STDMETHOD(GetApplicationDesc) (THIS_ DPN_APPLICATION_DESC *const pAppDescBuffer, DWORD *const pcbDataSize, const DWORD dwFlags) PURE; + STDMETHOD(SetApplicationDesc) (THIS_ const DPN_APPLICATION_DESC *const pad, const DWORD dwFlags) PURE; + STDMETHOD(CreateGroup) (THIS_ const DPN_GROUP_INFO *const pdpnGroupInfo,void *const pvGroupContext,void *const pvAsyncContext,DPNHANDLE *const phAsyncHandle,const DWORD dwFlags) PURE; + STDMETHOD(DestroyGroup) (THIS_ const DPNID idGroup, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE; + STDMETHOD(AddPlayerToGroup) (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE; + STDMETHOD(RemovePlayerFromGroup) (THIS_ const DPNID idGroup, const DPNID idClient, PVOID const pvAsyncContext, DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE; + STDMETHOD(SetGroupInfo) (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE; + STDMETHOD(GetGroupInfo) (THIS_ const DPNID dpnid,DPN_GROUP_INFO *const pdpnGroupInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE; + STDMETHOD(EnumPlayersAndGroups) (THIS_ DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE; + STDMETHOD(EnumGroupMembers) (THIS_ const DPNID dpnid, DPNID *const prgdpnid, DWORD *const pcdpnid, const DWORD dwFlags) PURE; + STDMETHOD(SetPeerInfo) (THIS_ const DPN_PLAYER_INFO *const pdpnPlayerInfo,PVOID const pvAsyncContext,DPNHANDLE *const phAsyncHandle, const DWORD dwFlags) PURE; + STDMETHOD(GetPeerInfo) (THIS_ const DPNID dpnid,DPN_PLAYER_INFO *const pdpnPlayerInfo,DWORD *const pdwSize,const DWORD dwFlags) PURE; + STDMETHOD(GetPeerAddress) (THIS_ const DPNID dpnid,IDirectPlay8Address **const pAddress,const DWORD dwFlags) PURE; + STDMETHOD(GetLocalHostAddresses) (THIS_ IDirectPlay8Address **const prgpAddress,DWORD *const pcAddress,const DWORD dwFlags) PURE; + STDMETHOD(Close) (THIS_ const DWORD dwFlags) PURE; + STDMETHOD(EnumHosts) (THIS_ PDPN_APPLICATION_DESC const pApplicationDesc,IDirectPlay8Address *const pAddrHost,IDirectPlay8Address *const pDeviceInfo,PVOID const pUserEnumData,const DWORD dwUserEnumDataSize,const DWORD dwEnumCount,const DWORD dwRetryInterval,const DWORD dwTimeOut,PVOID const pvUserContext,DPNHANDLE *const pAsyncHandle,const DWORD dwFlags) PURE; + STDMETHOD(DestroyPeer) (THIS_ const DPNID dpnidClient, const void *const pvDestroyData, const DWORD dwDestroyDataSize, const DWORD dwFlags) PURE; + STDMETHOD(ReturnBuffer) (THIS_ const DPNHANDLE hBufferHandle,const DWORD dwFlags) PURE; + STDMETHOD(GetPlayerContext) (THIS_ const DPNID dpnid,PVOID *const ppvPlayerContext,const DWORD dwFlags) PURE; + STDMETHOD(GetGroupContext) (THIS_ const DPNID dpnid,PVOID *const ppvGroupContext,const DWORD dwFlags) PURE; + STDMETHOD(GetCaps) (THIS_ DPN_CAPS *const pdpCaps,const DWORD dwFlags) PURE; + STDMETHOD(SetCaps) (THIS_ const DPN_CAPS *const pdpCaps, const DWORD dwFlags) PURE; + STDMETHOD(SetSPCaps) (THIS_ const GUID * const pguidSP, const DPN_SP_CAPS *const pdpspCaps, const DWORD dwFlags ) PURE; + STDMETHOD(GetSPCaps) (THIS_ const GUID * const pguidSP, DPN_SP_CAPS *const pdpspCaps,const DWORD dwFlags) PURE; + STDMETHOD(GetConnectionInfo) (THIS_ const DPNID dpnid, DPN_CONNECTION_INFO *const pdpConnectionInfo,const DWORD dwFlags) PURE; + STDMETHOD(RegisterLobby) (THIS_ const DPNHANDLE dpnHandle, IDirectPlay8LobbiedApplication *const pIDP8LobbiedApplication,const DWORD dwFlags) PURE; + STDMETHOD(TerminateSession) (THIS_ void *const pvTerminateData,const DWORD dwTerminateDataSize,const DWORD dwFlags) PURE; +}; + + +/**************************************************************************** + * + * IDirectPlay8 application interface macros + * + ****************************************************************************/ + +#if !defined(__cplusplus) || defined(CINTERFACE) + +#define IDirectPlay8Client_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectPlay8Client_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectPlay8Client_Release(p) (p)->lpVtbl->Release(p) +#define IDirectPlay8Client_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) +#define IDirectPlay8Client_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f) +#define IDirectPlay8Client_EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k) (p)->lpVtbl->EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k) +#define IDirectPlay8Client_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b) +#define IDirectPlay8Client_Connect(p,a,b,c,d,e,f,g,h,i,j) (p)->lpVtbl->Connect(p,a,b,c,d,e,f,g,h,i,j) +#define IDirectPlay8Client_Send(p,a,b,c,d,e,f) (p)->lpVtbl->Send(p,a,b,c,d,e,f) +#define IDirectPlay8Client_GetSendQueueInfo(p,a,b,c) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c) +#define IDirectPlay8Client_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c) +#define IDirectPlay8Client_SetClientInfo(p,a,b,c,d) (p)->lpVtbl->SetClientInfo(p,a,b,c,d) +#define IDirectPlay8Client_GetServerInfo(p,a,b,c) (p)->lpVtbl->GetServerInfo(p,a,b,c) +#define IDirectPlay8Client_GetServerAddress(p,a,b) (p)->lpVtbl->GetServerAddress(p,a,b) +#define IDirectPlay8Client_Close(p,a) (p)->lpVtbl->Close(p,a) +#define IDirectPlay8Client_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b) +#define IDirectPlay8Client_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirectPlay8Client_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b) +#define IDirectPlay8Client_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c) +#define IDirectPlay8Client_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c) +#define IDirectPlay8Client_GetConnectionInfo(p,a,b) (p)->lpVtbl->GetConnectionInfo(p,a,b) +#define IDirectPlay8Client_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c) + +#define IDirectPlay8Server_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectPlay8Server_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectPlay8Server_Release(p) (p)->lpVtbl->Release(p) +#define IDirectPlay8Server_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) +#define IDirectPlay8Server_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f) +#define IDirectPlay8Server_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b) +#define IDirectPlay8Server_GetSendQueueInfo(p,a,b,c,d) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c,d) +#define IDirectPlay8Server_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c) +#define IDirectPlay8Server_SetServerInfo(p,a,b,c,d) (p)->lpVtbl->SetServerInfo(p,a,b,c,d) +#define IDirectPlay8Server_GetClientInfo(p,a,b,c,d) (p)->lpVtbl->GetClientInfo(p,a,b,c,d) +#define IDirectPlay8Server_GetClientAddress(p,a,b,c) (p)->lpVtbl->GetClientAddress(p,a,b,c) +#define IDirectPlay8Server_GetLocalHostAddresses(p,a,b,c) (p)->lpVtbl->GetLocalHostAddresses(p,a,b,c) +#define IDirectPlay8Server_SetApplicationDesc(p,a,b) (p)->lpVtbl->SetApplicationDesc(p,a,b) +#define IDirectPlay8Server_Host(p,a,b,c,d,e,f,g) (p)->lpVtbl->Host(p,a,b,c,d,e,f,g) +#define IDirectPlay8Server_SendTo(p,a,b,c,d,e,f,g) (p)->lpVtbl->SendTo(p,a,b,c,d,e,f,g) +#define IDirectPlay8Server_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e) +#define IDirectPlay8Server_DestroyGroup(p,a,b,c,d) (p)->lpVtbl->DestroyGroup(p,a,b,c,d) +#define IDirectPlay8Server_AddPlayerToGroup(p,a,b,c,d,e) (p)->lpVtbl->AddPlayerToGroup(p,a,b,c,d,e) +#define IDirectPlay8Server_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->lpVtbl->RemovePlayerFromGroup(p,a,b,c,d,e) +#define IDirectPlay8Server_SetGroupInfo(p,a,b,c,d,e) (p)->lpVtbl->SetGroupInfo(p,a,b,c,d,e) +#define IDirectPlay8Server_GetGroupInfo(p,a,b,c,d) (p)->lpVtbl->GetGroupInfo(p,a,b,c,d) +#define IDirectPlay8Server_EnumPlayersAndGroups(p,a,b,c) (p)->lpVtbl->EnumPlayersAndGroups(p,a,b,c) +#define IDirectPlay8Server_EnumGroupMembers(p,a,b,c,d) (p)->lpVtbl->EnumGroupMembers(p,a,b,c,d) +#define IDirectPlay8Server_Close(p,a) (p)->lpVtbl->Close(p,a) +#define IDirectPlay8Server_DestroyClient(p,a,b,c,d) (p)->lpVtbl->DestroyClient(p,a,b,c,d) +#define IDirectPlay8Server_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b) +#define IDirectPlay8Server_GetPlayerContext(p,a,b,c) (p)->lpVtbl->GetPlayerContext(p,a,b,c) +#define IDirectPlay8Server_GetGroupContext(p,a,b,c) (p)->lpVtbl->GetGroupContext(p,a,b,c) +#define IDirectPlay8Server_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirectPlay8Server_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b) +#define IDirectPlay8Server_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c) +#define IDirectPlay8Server_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c) +#define IDirectPlay8Server_GetConnectionInfo(p,a,b,c) (p)->lpVtbl->GetConnectionInfo(p,a,b,c) +#define IDirectPlay8Server_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c) + +#define IDirectPlay8Peer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectPlay8Peer_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectPlay8Peer_Release(p) (p)->lpVtbl->Release(p) +#define IDirectPlay8Peer_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) +#define IDirectPlay8Peer_EnumServiceProviders(p,a,b,c,d,e,f) (p)->lpVtbl->EnumServiceProviders(p,a,b,c,d,e,f) +#define IDirectPlay8Peer_EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k) (p)->lpVtbl->EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k) + +#define IDirectPlay8Peer_CancelAsyncOperation(p,a,b) (p)->lpVtbl->CancelAsyncOperation(p,a,b) +#define IDirectPlay8Peer_Connect(p,a,b,c,d,e,f,g,h,i,j,k) (p)->lpVtbl->Connect(p,a,b,c,d,e,f,g,h,i,j,k) +#define IDirectPlay8Peer_SendTo(p,a,b,c,d,e,f,g) (p)->lpVtbl->SendTo(p,a,b,c,d,e,f,g) +#define IDirectPlay8Peer_GetSendQueueInfo(p,a,b,c,d) (p)->lpVtbl->GetSendQueueInfo(p,a,b,c,d) +#define IDirectPlay8Peer_Host(p,a,b,c,d,e,f,g) (p)->lpVtbl->Host(p,a,b,c,d,e,f,g) +#define IDirectPlay8Peer_GetApplicationDesc(p,a,b,c) (p)->lpVtbl->GetApplicationDesc(p,a,b,c) +#define IDirectPlay8Peer_SetApplicationDesc(p,a,b) (p)->lpVtbl->SetApplicationDesc(p,a,b) +#define IDirectPlay8Peer_CreateGroup(p,a,b,c,d,e) (p)->lpVtbl->CreateGroup(p,a,b,c,d,e) +#define IDirectPlay8Peer_DestroyGroup(p,a,b,c,d) (p)->lpVtbl->DestroyGroup(p,a,b,c,d) +#define IDirectPlay8Peer_AddPlayerToGroup(p,a,b,c,d,e) (p)->lpVtbl->AddPlayerToGroup(p,a,b,c,d,e) +#define IDirectPlay8Peer_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->lpVtbl->RemovePlayerFromGroup(p,a,b,c,d,e) +#define IDirectPlay8Peer_SetGroupInfo(p,a,b,c,d,e) (p)->lpVtbl->SetGroupInfo(p,a,b,c,d,e) +#define IDirectPlay8Peer_GetGroupInfo(p,a,b,c,d) (p)->lpVtbl->GetGroupInfo(p,a,b,c,d) +#define IDirectPlay8Peer_EnumPlayersAndGroups(p,a,b,c) (p)->lpVtbl->EnumPlayersAndGroups(p,a,b,c) +#define IDirectPlay8Peer_EnumGroupMembers(p,a,b,c,d) (p)->lpVtbl->EnumGroupMembers(p,a,b,c,d) +#define IDirectPlay8Peer_SetPeerInfo(p,a,b,c,d) (p)->lpVtbl->SetPeerInfo(p,a,b,c,d) +#define IDirectPlay8Peer_GetPeerInfo(p,a,b,c,d) (p)->lpVtbl->GetPeerInfo(p,a,b,c,d) +#define IDirectPlay8Peer_GetPeerAddress(p,a,b,c) (p)->lpVtbl->GetPeerAddress(p,a,b,c) +#define IDirectPlay8Peer_GetLocalHostAddresses(p,a,b,c) (p)->lpVtbl->GetLocalHostAddresses(p,a,b,c) +#define IDirectPlay8Peer_Close(p,a) (p)->lpVtbl->Close(p,a) +#define IDirectPlay8Peer_EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k) (p)->lpVtbl->EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k) +#define IDirectPlay8Peer_DestroyPeer(p,a,b,c,d) (p)->lpVtbl->DestroyPeer(p,a,b,c,d) +#define IDirectPlay8Peer_ReturnBuffer(p,a,b) (p)->lpVtbl->ReturnBuffer(p,a,b) +#define IDirectPlay8Peer_GetPlayerContext(p,a,b,c) (p)->lpVtbl->GetPlayerContext(p,a,b,c) +#define IDirectPlay8Peer_GetGroupContext(p,a,b,c) (p)->lpVtbl->GetGroupContext(p,a,b,c) +#define IDirectPlay8Peer_GetCaps(p,a,b) (p)->lpVtbl->GetCaps(p,a,b) +#define IDirectPlay8Peer_SetCaps(p,a,b) (p)->lpVtbl->SetCaps(p,a,b) +#define IDirectPlay8Peer_SetSPCaps(p,a,b,c) (p)->lpVtbl->SetSPCaps(p,a,b,c) +#define IDirectPlay8Peer_GetSPCaps(p,a,b,c) (p)->lpVtbl->GetSPCaps(p,a,b,c) +#define IDirectPlay8Peer_GetConnectionInfo(p,a,b,c) (p)->lpVtbl->GetConnectionInfo(p,a,b,c) +#define IDirectPlay8Peer_RegisterLobby(p,a,b,c) (p)->lpVtbl->RegisterLobby(p,a,b,c) +#define IDirectPlay8Peer_TerminateSession(p,a,b,c) (p)->lpVtbl->TerminateSession(p,a,b,c) + +#else /* C++ */ + +#define IDirectPlay8Client_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectPlay8Client_AddRef(p) (p)->AddRef() +#define IDirectPlay8Client_Release(p) (p)->Release() +#define IDirectPlay8Client_Initialize(p,a,b,c) (p)->Initialize(a,b,c) +#define IDirectPlay8Client_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f) +#define IDirectPlay8Client_EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k) (p)->EnumHosts(a,b,c,d,e,f,g,h,i,j,k) +#define IDirectPlay8Client_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b) +#define IDirectPlay8Client_Connect(p,a,b,c,d,e,f,g,h,i,j) (p)->Connect(a,b,c,d,e,f,g,h,i,j) +#define IDirectPlay8Client_Send(p,a,b,c,d,e,f) (p)->Send(a,b,c,d,e,f) +#define IDirectPlay8Client_GetSendQueueInfo(p,a,b,c) (p)->GetSendQueueInfo(a,b,c) +#define IDirectPlay8Client_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c) +#define IDirectPlay8Client_SetClientInfo(p,a,b,c,d) (p)->SetClientInfo(a,b,c,d) +#define IDirectPlay8Client_GetServerInfo(p,a,b,c) (p)->GetServerInfo(a,b,c) +#define IDirectPlay8Client_GetServerAddress(p,a,b) (p)->GetServerAddress(a,b) +#define IDirectPlay8Client_Close(p,a) (p)->Close(a) +#define IDirectPlay8Client_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b) +#define IDirectPlay8Client_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirectPlay8Client_SetCaps(p,a,b) (p)->SetCaps(a,b) +#define IDirectPlay8Client_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c) +#define IDirectPlay8Client_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c) +#define IDirectPlay8Client_GetConnectionInfo(p,a,b) (p)->GetConnectionInfo(a,b) +#define IDirectPlay8Client_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c) + +#define IDirectPlay8Server_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectPlay8Server_AddRef(p) (p)->AddRef() +#define IDirectPlay8Server_Release(p) (p)->Release() +#define IDirectPlay8Server_Initialize(p,a,b,c) (p)->Initialize(a,b,c) +#define IDirectPlay8Server_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f) +#define IDirectPlay8Server_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b) +#define IDirectPlay8Server_GetSendQueueInfo(p,a,b,c,d) (p)->GetSendQueueInfo(a,b,c,d) +#define IDirectPlay8Server_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c) +#define IDirectPlay8Server_SetServerInfo(p,a,b,c,d) (p)->SetServerInfo(a,b,c,d) +#define IDirectPlay8Server_GetClientInfo(p,a,b,c,d) (p)->GetClientInfo(a,b,c,d) +#define IDirectPlay8Server_GetClientAddress(p,a,b,c) (p)->GetClientAddress(a,b,c) +#define IDirectPlay8Server_GetLocalHostAddresses(p,a,b,c) (p)->GetLocalHostAddresses(a,b,c) +#define IDirectPlay8Server_SetApplicationDesc(p,a,b) (p)->SetApplicationDesc(a,b) +#define IDirectPlay8Server_Host(p,a,b,c,d,e,f,g) (p)->Host(a,b,c,d,e,f,g) +#define IDirectPlay8Server_SendTo(p,a,b,c,d,e,f,g) (p)->SendTo(a,b,c,d,e,f,g) +#define IDirectPlay8Server_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e) +#define IDirectPlay8Server_DestroyGroup(p,a,b,c,d) (p)->DestroyGroup(a,b,c,d) +#define IDirectPlay8Server_AddPlayerToGroup(p,a,b,c,d,e) (p)->AddPlayerToGroup(a,b,c,d,e) +#define IDirectPlay8Server_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->RemovePlayerFromGroup(a,b,c,d,e) +#define IDirectPlay8Server_SetGroupInfo(p,a,b,c,d,e) (p)->SetGroupInfo(a,b,c,d,e) +#define IDirectPlay8Server_GetGroupInfo(p,a,b,c,d) (p)->GetGroupInfo(a,b,c,d) +#define IDirectPlay8Server_EnumPlayersAndGroups(p,a,b,c) (p)->EnumPlayersAndGroups(a,b,c) +#define IDirectPlay8Server_EnumGroupMembers(p,a,b,c,d) (p)->EnumGroupMembers(a,b,c,d) +#define IDirectPlay8Server_Close(p,a) (p)->Close(a) +#define IDirectPlay8Server_DestroyClient(p,a,b,c,d) (p)->DestroyClient(a,b,c,d) +#define IDirectPlay8Server_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b) +#define IDirectPlay8Server_GetPlayerContext(p,a,b,c) (p)->GetPlayerContext(a,b,c) +#define IDirectPlay8Server_GetGroupContext(p,a,b,c) (p)->GetGroupContext(a,b,c) +#define IDirectPlay8Server_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirectPlay8Server_SetCaps(p,a,b) (p)->SetCaps(a,b) +#define IDirectPlay8Server_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c) +#define IDirectPlay8Server_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c) +#define IDirectPlay8Server_GetConnectionInfo(p,a,b,c) (p)->GetConnectionInfo(a,b,c) +#define IDirectPlay8Server_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c) + +#define IDirectPlay8Peer_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectPlay8Peer_AddRef(p) (p)->AddRef() +#define IDirectPlay8Peer_Release(p) (p)->Release() +#define IDirectPlay8Peer_Initialize(p,a,b,c) (p)->Initialize(a,b,c) +#define IDirectPlay8Peer_EnumServiceProviders(p,a,b,c,d,e,f) (p)->EnumServiceProviders(a,b,c,d,e,f) +#define IDirectPlay8Peer_EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k) (p)->EnumHosts(a,b,c,d,e,f,g,h,i,j,k) +#define IDirectPlay8Peer_CancelAsyncOperation(p,a,b) (p)->CancelAsyncOperation(a,b) +#define IDirectPlay8Peer_Connect(p,a,b,c,d,e,f,g,h,i,j,k) (p)->Connect(a,b,c,d,e,f,g,h,i,j,k) +#define IDirectPlay8Peer_SendTo(p,a,b,c,d,e,f,g) (p)->SendTo(a,b,c,d,e,f,g) +#define IDirectPlay8Peer_GetSendQueueInfo(p,a,b,c,d) (p)->GetSendQueueInfo(a,b,c,d) +#define IDirectPlay8Peer_Host(p,a,b,c,d,e,f,g) (p)->Host(a,b,c,d,e,f,g) +#define IDirectPlay8Peer_GetApplicationDesc(p,a,b,c) (p)->GetApplicationDesc(a,b,c) +#define IDirectPlay8Peer_SetApplicationDesc(p,a,b) (p)->SetApplicationDesc(a,b) +#define IDirectPlay8Peer_CreateGroup(p,a,b,c,d,e) (p)->CreateGroup(a,b,c,d,e) +#define IDirectPlay8Peer_DestroyGroup(p,a,b,c,d) (p)->DestroyGroup(a,b,c,d) +#define IDirectPlay8Peer_AddPlayerToGroup(p,a,b,c,d,e) (p)->AddPlayerToGroup(a,b,c,d,e) +#define IDirectPlay8Peer_RemovePlayerFromGroup(p,a,b,c,d,e) (p)->RemovePlayerFromGroup(a,b,c,d,e) +#define IDirectPlay8Peer_SetGroupInfo(p,a,b,c,d,e) (p)->SetGroupInfo(a,b,c,d,e) +#define IDirectPlay8Peer_GetGroupInfo(p,a,b,c,d) (p)->GetGroupInfo(a,b,c,d) +#define IDirectPlay8Peer_EnumPlayersAndGroups(p,a,b,c) (p)->EnumPlayersAndGroups(a,b,c) +#define IDirectPlay8Peer_EnumGroupMembers(p,a,b,c,d) (p)->EnumGroupMembers(a,b,c,d) +#define IDirectPlay8Peer_SetPeerInfo(p,a,b,c,d) (p)->SetPeerInfo(a,b,c,d) +#define IDirectPlay8Peer_GetPeerInfo(p,a,b,c,d) (p)->GetPeerInfo(a,b,c,d) +#define IDirectPlay8Peer_GetPeerAddress(p,a,b,c) (p)->GetPeerAddress(a,b,c) +#define IDirectPlay8Peer_GetLocalHostAddresses(p,a,b,c) (p)->GetLocalHostAddresses(a,b,c) +#define IDirectPlay8Peer_Close(p,a) (p)->Close(a) +#define IDirectPlay8Peer_EnumHosts(p,a,b,c,d,e,f,g,h,i,j,k) (p)->EnumHosts(a,b,c,d,e,f,g,h,i,j,k) +#define IDirectPlay8Peer_DestroyPeer(p,a,b,c,d) (p)->DestroyPeer(a,b,c,d) +#define IDirectPlay8Peer_ReturnBuffer(p,a,b) (p)->ReturnBuffer(a,b) +#define IDirectPlay8Peer_GetPlayerContext(p,a,b,c) (p)->GetPlayerContext(a,b,c) +#define IDirectPlay8Peer_GetGroupContext(p,a,b,c) (p)->GetGroupContext(a,b,c) +#define IDirectPlay8Peer_GetCaps(p,a,b) (p)->GetCaps(a,b) +#define IDirectPlay8Peer_SetCaps(p,a,b) (p)->SetCaps(a,b) +#define IDirectPlay8Peer_SetSPCaps(p,a,b,c) (p)->SetSPCaps(a,b,c) +#define IDirectPlay8Peer_GetSPCaps(p,a,b,c) (p)->GetSPCaps(a,b,c) +#define IDirectPlay8Peer_GetConnectionInfo(p,a,b,c) (p)->GetConnectionInfo(a,b,c) +#define IDirectPlay8Peer_RegisterLobby(p,a,b,c) (p)->RegisterLobby(a,b,c) +#define IDirectPlay8Peer_TerminateSession(p,a,b,c) (p)->TerminateSession(a,b,c) + +#endif + +/**************************************************************************** + * + * DIRECTPLAY8 ERRORS + * + * Errors are represented by negative values and cannot be combined. + * + ****************************************************************************/ + +#define _DPN_FACILITY_CODE 0x015 +#define _DPNHRESULT_BASE 0x8000 +#define MAKE_DPNHRESULT( code ) MAKE_HRESULT( 1, _DPN_FACILITY_CODE, ( code + _DPNHRESULT_BASE ) ) + +#define DPN_OK S_OK + +#define DPNSUCCESS_EQUAL MAKE_HRESULT( 0, _DPN_FACILITY_CODE, ( 0x5 + _DPNHRESULT_BASE ) ) +#define DPNSUCCESS_NOTEQUAL MAKE_HRESULT( 0, _DPN_FACILITY_CODE, (0x0A + _DPNHRESULT_BASE ) ) +#define DPNSUCCESS_PENDING MAKE_HRESULT( 0, _DPN_FACILITY_CODE, (0x0e + _DPNHRESULT_BASE ) ) + +#define DPNERR_ABORTED MAKE_DPNHRESULT( 0x30 ) +#define DPNERR_ADDRESSING MAKE_DPNHRESULT( 0x40 ) +#define DPNERR_ALREADYCLOSING MAKE_DPNHRESULT( 0x50 ) +#define DPNERR_ALREADYCONNECTED MAKE_DPNHRESULT( 0x60 ) +#define DPNERR_ALREADYDISCONNECTING MAKE_DPNHRESULT( 0x70 ) +#define DPNERR_ALREADYINITIALIZED MAKE_DPNHRESULT( 0x80 ) +#define DPNERR_ALREADYREGISTERED MAKE_DPNHRESULT( 0x90 ) +#define DPNERR_BUFFERTOOSMALL MAKE_DPNHRESULT( 0x100 ) +#define DPNERR_CANNOTCANCEL MAKE_DPNHRESULT( 0x110 ) +#define DPNERR_CANTCREATEGROUP MAKE_DPNHRESULT( 0x120 ) +#define DPNERR_CANTCREATEPLAYER MAKE_DPNHRESULT( 0x130 ) +#define DPNERR_CANTLAUNCHAPPLICATION MAKE_DPNHRESULT( 0x140 ) +#define DPNERR_CONNECTING MAKE_DPNHRESULT( 0x150 ) +#define DPNERR_CONNECTIONLOST MAKE_DPNHRESULT( 0x160 ) +#define DPNERR_CONVERSION MAKE_DPNHRESULT( 0x170 ) +#define DPNERR_DATATOOLARGE MAKE_DPNHRESULT( 0x175 ) +#define DPNERR_DOESNOTEXIST MAKE_DPNHRESULT( 0x180 ) +#define DPNERR_DUPLICATECOMMAND MAKE_DPNHRESULT( 0x190 ) +#define DPNERR_ENDPOINTNOTRECEIVING MAKE_DPNHRESULT( 0x200 ) +#define DPNERR_ENUMQUERYTOOLARGE MAKE_DPNHRESULT( 0x210 ) +#define DPNERR_ENUMRESPONSETOOLARGE MAKE_DPNHRESULT( 0x220 ) +#define DPNERR_EXCEPTION MAKE_DPNHRESULT( 0x230 ) +#define DPNERR_GENERIC E_FAIL +#define DPNERR_GROUPNOTEMPTY MAKE_DPNHRESULT( 0x240 ) +#define DPNERR_HOSTING MAKE_DPNHRESULT( 0x250 ) +#define DPNERR_HOSTREJECTEDCONNECTION MAKE_DPNHRESULT( 0x260 ) +#define DPNERR_HOSTTERMINATEDSESSION MAKE_DPNHRESULT( 0x270 ) +#define DPNERR_INCOMPLETEADDRESS MAKE_DPNHRESULT( 0x280 ) +#define DPNERR_INVALIDADDRESSFORMAT MAKE_DPNHRESULT( 0x290 ) +#define DPNERR_INVALIDAPPLICATION MAKE_DPNHRESULT( 0x300 ) +#define DPNERR_INVALIDCOMMAND MAKE_DPNHRESULT( 0x310 ) +#define DPNERR_INVALIDDEVICEADDRESS MAKE_DPNHRESULT( 0x320 ) +#define DPNERR_INVALIDENDPOINT MAKE_DPNHRESULT( 0x330 ) +#define DPNERR_INVALIDFLAGS MAKE_DPNHRESULT( 0x340 ) +#define DPNERR_INVALIDGROUP MAKE_DPNHRESULT( 0x350 ) +#define DPNERR_INVALIDHANDLE MAKE_DPNHRESULT( 0x360 ) +#define DPNERR_INVALIDHOSTADDRESS MAKE_DPNHRESULT( 0x370 ) +#define DPNERR_INVALIDINSTANCE MAKE_DPNHRESULT( 0x380 ) +#define DPNERR_INVALIDINTERFACE MAKE_DPNHRESULT( 0x390 ) +#define DPNERR_INVALIDOBJECT MAKE_DPNHRESULT( 0x400 ) +#define DPNERR_INVALIDPARAM E_INVALIDARG +#define DPNERR_INVALIDPASSWORD MAKE_DPNHRESULT( 0x410 ) +#define DPNERR_INVALIDPLAYER MAKE_DPNHRESULT( 0x420 ) +#define DPNERR_INVALIDPOINTER E_POINTER +#define DPNERR_INVALIDPRIORITY MAKE_DPNHRESULT( 0x430 ) +#define DPNERR_INVALIDSTRING MAKE_DPNHRESULT( 0x440 ) +#define DPNERR_INVALIDURL MAKE_DPNHRESULT( 0x450 ) +#define DPNERR_INVALIDVERSION MAKE_DPNHRESULT( 0x460 ) +#define DPNERR_NOCAPS MAKE_DPNHRESULT( 0x470 ) +#define DPNERR_NOCONNECTION MAKE_DPNHRESULT( 0x480 ) +#define DPNERR_NOHOSTPLAYER MAKE_DPNHRESULT( 0x490 ) +#define DPNERR_NOINTERFACE E_NOINTERFACE +#define DPNERR_NOMOREADDRESSCOMPONENTS MAKE_DPNHRESULT( 0x500 ) +#define DPNERR_NORESPONSE MAKE_DPNHRESULT( 0x510 ) +#define DPNERR_NOTALLOWED MAKE_DPNHRESULT( 0x520 ) +#define DPNERR_NOTHOST MAKE_DPNHRESULT( 0x530 ) +#define DPNERR_NOTREADY MAKE_DPNHRESULT( 0x540 ) +#define DPNERR_NOTREGISTERED MAKE_DPNHRESULT( 0x550 ) +#define DPNERR_OUTOFMEMORY E_OUTOFMEMORY +#define DPNERR_PENDING DPNSUCCESS_PENDING +#define DPNERR_PLAYERALREADYINGROUP MAKE_DPNHRESULT( 0x560 ) +#define DPNERR_PLAYERLOST MAKE_DPNHRESULT( 0x570 ) +#define DPNERR_PLAYERNOTINGROUP MAKE_DPNHRESULT( 0x580 ) +#define DPNERR_PLAYERNOTREACHABLE MAKE_DPNHRESULT( 0x590 ) +#define DPNERR_SENDTOOLARGE MAKE_DPNHRESULT( 0x600 ) +#define DPNERR_SESSIONFULL MAKE_DPNHRESULT( 0x610 ) +#define DPNERR_TABLEFULL MAKE_DPNHRESULT( 0x620 ) +#define DPNERR_TIMEDOUT MAKE_DPNHRESULT( 0x630 ) +#define DPNERR_UNINITIALIZED MAKE_DPNHRESULT( 0x640 ) +#define DPNERR_UNSUPPORTED E_NOTIMPL +#define DPNERR_USERCANCEL MAKE_DPNHRESULT( 0x650 ) + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/windows_libs/mssdk/include/dplobby.h b/windows_libs/mssdk/include/dplobby.h new file mode 100644 index 00000000..c91d3238 --- /dev/null +++ b/windows_libs/mssdk/include/dplobby.h @@ -0,0 +1,853 @@ +/*==========================================================================; + * + * Copyright (C) 1996-1997 Microsoft Corporation. All Rights Reserved. + * + * File: dplobby.h + * Content: DirectPlayLobby include file + ***************************************************************************/ +#ifndef __DPLOBBY_INCLUDED__ +#define __DPLOBBY_INCLUDED__ + +#include "dplay.h" + +/* avoid warnings at Level 4 */ +#pragma warning(disable:4201) + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* + * GUIDS used by DirectPlay objects + */ + +/* {AF465C71-9588-11cf-A020-00AA006157AC} */ +DEFINE_GUID(IID_IDirectPlayLobby, 0xaf465c71, 0x9588, 0x11cf, 0xa0, 0x20, 0x0, 0xaa, 0x0, 0x61, 0x57, 0xac); +/* {26C66A70-B367-11cf-A024-00AA006157AC} */ +DEFINE_GUID(IID_IDirectPlayLobbyA, 0x26c66a70, 0xb367, 0x11cf, 0xa0, 0x24, 0x0, 0xaa, 0x0, 0x61, 0x57, 0xac); +/* {0194C220-A303-11d0-9C4F-00A0C905425E} */ +DEFINE_GUID(IID_IDirectPlayLobby2, 0x194c220, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); +/* {1BB4AF80-A303-11d0-9C4F-00A0C905425E} */ +DEFINE_GUID(IID_IDirectPlayLobby2A, 0x1bb4af80, 0xa303, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); +/* {2DB72490-652C-11d1-A7A8-0000F803ABFC} */ +DEFINE_GUID(IID_IDirectPlayLobby3, 0x2db72490, 0x652c, 0x11d1, 0xa7, 0xa8, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc); +/* {2DB72491-652C-11d1-A7A8-0000F803ABFC} */ +DEFINE_GUID(IID_IDirectPlayLobby3A, 0x2db72491, 0x652c, 0x11d1, 0xa7, 0xa8, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc); +/* {2FE8F810-B2A5-11d0-A787-0000F803ABFC} */ +DEFINE_GUID(CLSID_DirectPlayLobby, 0x2fe8f810, 0xb2a5, 0x11d0, 0xa7, 0x87, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc); + + +/**************************************************************************** + * + * IDirectPlayLobby Structures + * + * Various structures used to invoke DirectPlayLobby. + * + ****************************************************************************/ + +typedef struct IDirectPlayLobby FAR *LPDIRECTPLAYLOBBY; +typedef struct IDirectPlayLobby FAR *LPDIRECTPLAYLOBBYA; +typedef struct IDirectPlayLobby IDirectPlayLobbyA; + +typedef struct IDirectPlayLobby2 FAR *LPDIRECTPLAYLOBBY2; +typedef struct IDirectPlayLobby2 FAR *LPDIRECTPLAYLOBBY2A; +typedef struct IDirectPlayLobby2 IDirectPlayLobby2A; + +typedef struct IDirectPlayLobby3 FAR *LPDIRECTPLAYLOBBY3; +typedef struct IDirectPlayLobby3 FAR *LPDIRECTPLAYLOBBY3A; +typedef struct IDirectPlayLobby3 IDirectPlayLobby3A; + + +/* + * DPLAPPINFO + * Used to hold information about a registered DirectPlay + * application + */ +typedef struct DPLAPPINFO +{ + DWORD dwSize; // Size of this structure + GUID guidApplication; // GUID of the Application + union + { + LPSTR lpszAppNameA; // Pointer to the Application Name + LPWSTR lpszAppName; + }; + +} DPLAPPINFO, FAR *LPDPLAPPINFO; + +/* + * LPCDPLAPPINFO + * A constant pointer to DPLAPPINFO + */ +typedef const DPLAPPINFO FAR *LPCDPLAPPINFO; + +/* + * DPCOMPOUNDADDRESSELEMENT + * + * An array of these is passed to CreateCompoundAddresses() + */ +typedef struct DPCOMPOUNDADDRESSELEMENT +{ + GUID guidDataType; + DWORD dwDataSize; + LPVOID lpData; +} DPCOMPOUNDADDRESSELEMENT, FAR *LPDPCOMPOUNDADDRESSELEMENT; + +/* + * LPCDPCOMPOUNDADDRESSELEMENT + * A constant pointer to DPCOMPOUNDADDRESSELEMENT + */ +typedef const DPCOMPOUNDADDRESSELEMENT FAR *LPCDPCOMPOUNDADDRESSELEMENT; + +/* + * LPDPAPPLICATIONDESC + * Used to register a DirectPlay application + */ +typedef struct DPAPPLICATIONDESC +{ + DWORD dwSize; + DWORD dwFlags; + union + { + LPSTR lpszApplicationNameA; + LPWSTR lpszApplicationName; + }; + GUID guidApplication; + union + { + LPSTR lpszFilenameA; + LPWSTR lpszFilename; + }; + union + { + LPSTR lpszCommandLineA; + LPWSTR lpszCommandLine; + }; + union + { + LPSTR lpszPathA; + LPWSTR lpszPath; + }; + union + { + LPSTR lpszCurrentDirectoryA; + LPWSTR lpszCurrentDirectory; + }; + LPSTR lpszDescriptionA; + LPWSTR lpszDescriptionW; +} DPAPPLICATIONDESC, *LPDPAPPLICATIONDESC; + +/* + * LPDPAPPLICATIONDESC2 + * Used to register a DirectPlay application + */ +typedef struct DPAPPLICATIONDESC2 +{ + DWORD dwSize; + DWORD dwFlags; + union + { + LPSTR lpszApplicationNameA; + LPWSTR lpszApplicationName; + }; + GUID guidApplication; + union + { + LPSTR lpszFilenameA; + LPWSTR lpszFilename; + }; + union + { + LPSTR lpszCommandLineA; + LPWSTR lpszCommandLine; + }; + union + { + LPSTR lpszPathA; + LPWSTR lpszPath; + }; + union + { + LPSTR lpszCurrentDirectoryA; + LPWSTR lpszCurrentDirectory; + }; + LPSTR lpszDescriptionA; + LPWSTR lpszDescriptionW; + union + { + LPSTR lpszAppLauncherNameA; + LPWSTR lpszAppLauncherName; + }; +} DPAPPLICATIONDESC2, *LPDPAPPLICATIONDESC2; + + +/**************************************************************************** + * + * Enumeration Method Callback Prototypes + * + ****************************************************************************/ + +/* + * Callback for EnumAddress() + */ +typedef BOOL (FAR PASCAL *LPDPENUMADDRESSCALLBACK)( + REFGUID guidDataType, + DWORD dwDataSize, + LPCVOID lpData, + LPVOID lpContext); + +/* + * Callback for EnumAddressTypes() + */ +typedef BOOL (FAR PASCAL *LPDPLENUMADDRESSTYPESCALLBACK)( + REFGUID guidDataType, + LPVOID lpContext, + DWORD dwFlags); + +/* + * Callback for EnumLocalApplications() + */ +typedef BOOL (FAR PASCAL * LPDPLENUMLOCALAPPLICATIONSCALLBACK)( + LPCDPLAPPINFO lpAppInfo, + LPVOID lpContext, + DWORD dwFlags); + + +/**************************************************************************** + * + * DirectPlayLobby API Prototypes + * + ****************************************************************************/ +#ifdef UNICODE +#define DirectPlayLobbyCreate DirectPlayLobbyCreateW +#else +#define DirectPlayLobbyCreate DirectPlayLobbyCreateA +#endif /* UNICODE */ + +extern HRESULT WINAPI DirectPlayLobbyCreateW(LPGUID, LPDIRECTPLAYLOBBY *, IUnknown *, LPVOID, DWORD ); +extern HRESULT WINAPI DirectPlayLobbyCreateA(LPGUID, LPDIRECTPLAYLOBBYA *, IUnknown *, LPVOID, DWORD ); + + +/**************************************************************************** + * + * IDirectPlayLobby (and IDirectPlayLobbyA) Interface + * + ****************************************************************************/ +#undef INTERFACE +#define INTERFACE IDirectPlayLobby +DECLARE_INTERFACE_( IDirectPlayLobby, IUnknown ) +{ + /* IUnknown Methods */ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectPlayLobby Methods */ + STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE; + STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE; + STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE; + STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE; + STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE; + STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE; + STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE; + STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE; + +}; + +/**************************************************************************** + * + * IDirectPlayLobby2 (and IDirectPlayLobby2A) Interface + * + ****************************************************************************/ +#undef INTERFACE +#define INTERFACE IDirectPlayLobby2 +DECLARE_INTERFACE_( IDirectPlayLobby2, IDirectPlayLobby ) +{ + /* IUnknown Methods */ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectPlayLobby Methods */ + STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE; + STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE; + STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE; + STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE; + STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE; + STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE; + STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE; + STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE; + + /* IDirectPlayLobby2 Methods */ + STDMETHOD(CreateCompoundAddress)(THIS_ LPCDPCOMPOUNDADDRESSELEMENT,DWORD,LPVOID,LPDWORD) PURE; +}; + +/**************************************************************************** + * + * IDirectPlayLobby3 (and IDirectPlayLobby3A) Interface + * + ****************************************************************************/ +#undef INTERFACE +#define INTERFACE IDirectPlayLobby3 +DECLARE_INTERFACE_( IDirectPlayLobby3, IDirectPlayLobby ) +{ + /* IUnknown Methods */ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + /* IDirectPlayLobby Methods */ + STDMETHOD(Connect) (THIS_ DWORD, LPDIRECTPLAY2 *, IUnknown FAR *) PURE; + STDMETHOD(CreateAddress) (THIS_ REFGUID, REFGUID, LPCVOID, DWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(EnumAddress) (THIS_ LPDPENUMADDRESSCALLBACK, LPCVOID, DWORD, LPVOID) PURE; + STDMETHOD(EnumAddressTypes) (THIS_ LPDPLENUMADDRESSTYPESCALLBACK, REFGUID, LPVOID, DWORD) PURE; + STDMETHOD(EnumLocalApplications)(THIS_ LPDPLENUMLOCALAPPLICATIONSCALLBACK, LPVOID, DWORD) PURE; + STDMETHOD(GetConnectionSettings)(THIS_ DWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(ReceiveLobbyMessage) (THIS_ DWORD, DWORD, LPDWORD, LPVOID, LPDWORD) PURE; + STDMETHOD(RunApplication) (THIS_ DWORD, LPDWORD, LPDPLCONNECTION, HANDLE) PURE; + STDMETHOD(SendLobbyMessage) (THIS_ DWORD, DWORD, LPVOID, DWORD) PURE; + STDMETHOD(SetConnectionSettings)(THIS_ DWORD, DWORD, LPDPLCONNECTION) PURE; + STDMETHOD(SetLobbyMessageEvent) (THIS_ DWORD, DWORD, HANDLE) PURE; + + /* IDirectPlayLobby2 Methods */ + STDMETHOD(CreateCompoundAddress)(THIS_ LPCDPCOMPOUNDADDRESSELEMENT,DWORD,LPVOID,LPDWORD) PURE; + + /* IDirectPlayLobby3 Methods */ + STDMETHOD(ConnectEx) (THIS_ DWORD, REFIID, LPVOID *, IUnknown FAR *) PURE; + STDMETHOD(RegisterApplication) (THIS_ DWORD, LPVOID) PURE; + STDMETHOD(UnregisterApplication)(THIS_ DWORD, REFGUID) PURE; + STDMETHOD(WaitForConnectionSettings)(THIS_ DWORD) PURE; +}; + +/**************************************************************************** + * + * IDirectPlayLobby interface macros + * + ****************************************************************************/ + +#if !defined(__cplusplus) || defined(CINTERFACE) + +#define IDirectPlayLobby_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectPlayLobby_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectPlayLobby_Release(p) (p)->lpVtbl->Release(p) +#define IDirectPlayLobby_Connect(p,a,b,c) (p)->lpVtbl->Connect(p,a,b,c) +#define IDirectPlayLobby_ConnectEx(p,a,b,c,d) (p)->lpVtbl->ConnectEx(p,a,b,c,d) +#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) (p)->lpVtbl->CreateAddress(p,a,b,c,d,e,f) +#define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d) (p)->lpVtbl->CreateCompoundAddress(p,a,b,c,d) +#define IDirectPlayLobby_EnumAddress(p,a,b,c,d) (p)->lpVtbl->EnumAddress(p,a,b,c,d) +#define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) (p)->lpVtbl->EnumAddressTypes(p,a,b,c,d) +#define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) (p)->lpVtbl->EnumLocalApplications(p,a,b,c) +#define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) (p)->lpVtbl->GetConnectionSettings(p,a,b,c) +#define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) (p)->lpVtbl->ReceiveLobbyMessage(p,a,b,c,d,e) +#define IDirectPlayLobby_RegisterApplication(p,a,b) (p)->lpVtbl->RegisterApplication(p,a,b) +#define IDirectPlayLobby_RunApplication(p,a,b,c,d) (p)->lpVtbl->RunApplication(p,a,b,c,d) +#define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) (p)->lpVtbl->SendLobbyMessage(p,a,b,c,d) +#define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c) +#define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) (p)->lpVtbl->SetLobbyMessageEvent(p,a,b,c) +#define IDirectPlayLobby_UnregisterApplication(p,a,b) (p)->lpVtbl->UnregisterApplication(p,a,b) +#define IDirectPlayLobby_WaitForConnectionSettings(p,a) (p)->lpVtbl->WaitForConnectionSettings(p,a) + +#else /* C++ */ + +#define IDirectPlayLobby_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectPlayLobby_AddRef(p) (p)->AddRef() +#define IDirectPlayLobby_Release(p) (p)->Release() +#define IDirectPlayLobby_Connect(p,a,b,c) (p)->Connect(a,b,c) +#define IDirectPlayLobby_ConnectEx(p,a,b,c,d) (p)->ConnectEx(a,b,c,d) +#define IDirectPlayLobby_CreateAddress(p,a,b,c,d,e,f) (p)->CreateAddress(a,b,c,d,e,f) +#define IDirectPlayLobby_CreateCompoundAddress(p,a,b,c,d) (p)->CreateCompoundAddress(a,b,c,d) +#define IDirectPlayLobby_EnumAddress(p,a,b,c,d) (p)->EnumAddress(a,b,c,d) +#define IDirectPlayLobby_EnumAddressTypes(p,a,b,c,d) (p)->EnumAddressTypes(a,b,c,d) +#define IDirectPlayLobby_EnumLocalApplications(p,a,b,c) (p)->EnumLocalApplications(a,b,c) +#define IDirectPlayLobby_GetConnectionSettings(p,a,b,c) (p)->GetConnectionSettings(a,b,c) +#define IDirectPlayLobby_ReceiveLobbyMessage(p,a,b,c,d,e) (p)->ReceiveLobbyMessage(a,b,c,d,e) +#define IDirectPlayLobby_RegisterApplication(p,a,b) (p)->RegisterApplication(a,b) +#define IDirectPlayLobby_RunApplication(p,a,b,c,d) (p)->RunApplication(a,b,c,d) +#define IDirectPlayLobby_SendLobbyMessage(p,a,b,c,d) (p)->SendLobbyMessage(a,b,c,d) +#define IDirectPlayLobby_SetConnectionSettings(p,a,b,c) (p)->SetConnectionSettings(a,b,c) +#define IDirectPlayLobby_SetLobbyMessageEvent(p,a,b,c) (p)->SetLobbyMessageEvent(a,b,c) +#define IDirectPlayLobby_UnregisterApplication(p,a,b) (p)->UnregisterApplication(a,b) +#define IDirectPlayLobby_WaitForConnectionSettings(p,a) (p)->WaitForConnectionSettings(a) + +#endif + +/**************************************************************************** + * + * DirectPlayLobby Flags + * + ****************************************************************************/ + +/* + * This flag is used by IDirectPlayLobby->WaitForConnectionSettings to + * cancel a current wait that is in progress. + */ +#define DPLWAIT_CANCEL 0x00000001 + + +/* + * This is a message flag used by ReceiveLobbyMessage. It can be + * returned in the dwMessageFlags parameter to indicate a message from + * the system. + */ +#define DPLMSG_SYSTEM 0x00000001 + +/* + * This is a message flag used by ReceiveLobbyMessage and SendLobbyMessage. + * It is used to indicate that the message is a standard lobby message. + * DPLMSG_SETPROPERTY, DPLMSG_SETPROPERTYRESPONSE, DPLMSG_GETPROPERTY, + * DPLMSG_GETPROPERTYRESPONSE + */ +#define DPLMSG_STANDARD 0x00000002 + +/* + * Lobbyable Application registration flags + */ + +/* + * Applications registered with this flag will not show up when + * applications are enumerated in the lobby. This application + * will only be able to be launched by a lobby client that already + * knows about the application. + */ +#define DPLAPP_NOENUM 0x80000000 + +/* + * Applications registered with this flag want voice to automatically + * be enabled for their application. All players will be launched into + * an 'n'-way voice conference when the application is started. The + * user will be able to enable this flag for existing non-voice + * directplay applications. + */ +#define DPLAPP_AUTOVOICE 0x00000001 + +/* + * Applications that do their own voice conferencing should register with + * this flag to avoid allowing the user to enable other voice chat + * capabilites during the same session. This is to avoid users forcing + * the DPLAPP_AUTOVOICE flag for the application. + */ +#define DPLAPP_SELFVOICE 0x00000002 + +/**************************************************************************** + * + * DirectPlayLobby messages and message data structures + * + * All system messages have a dwMessageFlags value of DPLMSG_SYSTEM returned + * from a call to ReceiveLobbyMessage. + * + * All standard messages have a dwMessageFlags value of DPLMSG_STANDARD returned + * from a call to ReceiveLobbyMessage. + * + ****************************************************************************/ + +/* + * DPLMSG_GENERIC + * Generic message structure used to identify the message type. + */ +typedef struct _DPLMSG_GENERIC +{ + DWORD dwType; // Message type +} DPLMSG_GENERIC, FAR *LPDPLMSG_GENERIC; + +/* + * DPLMSG_SYSTEMMESSAGE + * Generic message format for all system messages -- + * DPLSYS_CONNECTIONSETTINGSREAD, DPLSYS_DPLYCONNECTSUCCEEDED, + * DPLSYS_DPLAYCONNECTFAILED, DPLSYS_APPTERMINATED, DPLSYS_NEWCONNECTIONSETTINGS + */ +typedef struct _DPLMSG_SYSTEMMESSAGE +{ + DWORD dwType; // Message type + GUID guidInstance; // Instance GUID of the dplay session the message corresponds to +} DPLMSG_SYSTEMMESSAGE, FAR *LPDPLMSG_SYSTEMMESSAGE; + +/* + * DPLMSG_SETPROPERTY + * Standard message sent by an application to a lobby to set a + * property + */ +typedef struct _DPLMSG_SETPROPERTY +{ + DWORD dwType; // Message type + DWORD dwRequestID; // Request ID (DPL_NOCONFIRMATION if no confirmation desired) + GUID guidPlayer; // Player GUID + GUID guidPropertyTag; // Property GUID + DWORD dwDataSize; // Size of data + DWORD dwPropertyData[1]; // Buffer containing data +} DPLMSG_SETPROPERTY, FAR *LPDPLMSG_SETPROPERTY; + +#define DPL_NOCONFIRMATION 0 + +/* + * DPLMSG_SETPROPERTYRESPONSE + * Standard message returned by a lobby to confirm a + * DPLMSG_SETPROPERTY message. + */ +typedef struct _DPLMSG_SETPROPERTYRESPONSE +{ + DWORD dwType; // Message type + DWORD dwRequestID; // Request ID + GUID guidPlayer; // Player GUID + GUID guidPropertyTag; // Property GUID + HRESULT hr; // Return Code +} DPLMSG_SETPROPERTYRESPONSE, FAR *LPDPLMSG_SETPROPERTYRESPONSE; + +/* + * DPLMSG_GETPROPERTY + * Standard message sent by an application to a lobby to request + * the current value of a property + */ +typedef struct _DPLMSG_GETPROPERTY +{ + DWORD dwType; // Message type + DWORD dwRequestID; // Request ID + GUID guidPlayer; // Player GUID + GUID guidPropertyTag; // Property GUID +} DPLMSG_GETPROPERTY, FAR *LPDPLMSG_GETPROPERTY; + +/* + * DPLMSG_GETPROPERTYRESPONSE + * Standard message returned by a lobby in response to a + * DPLMSG_GETPROPERTY message. + */ +typedef struct _DPLMSG_GETPROPERTYRESPONSE +{ + DWORD dwType; // Message type + DWORD dwRequestID; // Request ID + GUID guidPlayer; // Player GUID + GUID guidPropertyTag; // Property GUID + HRESULT hr; // Return Code + DWORD dwDataSize; // Size of data + DWORD dwPropertyData[1]; // Buffer containing data +} DPLMSG_GETPROPERTYRESPONSE, FAR *LPDPLMSG_GETPROPERTYRESPONSE; + +/* + * DPLMSG_NEWSESSIONHOST + * Standard message returned by a lobby in response to a + * the session host migrating to a new client + */ +typedef struct _DPLMSG_NEWSESSIONHOST +{ + DWORD dwType; // Message type + GUID guidInstance; // GUID Instance of the session +} DPLMSG_NEWSESSIONHOST, FAR *LPDPLMSG_NEWSESSIONHOST; + + +/****************************************** + * + * DirectPlay Lobby message dwType values + * + *****************************************/ + +/* + * The application has read the connection settings. + * It is now O.K. for the lobby client to release + * its IDirectPlayLobby interface. + */ +#define DPLSYS_CONNECTIONSETTINGSREAD 0x00000001 + +/* + * The application's call to DirectPlayConnect failed + */ +#define DPLSYS_DPLAYCONNECTFAILED 0x00000002 + +/* + * The application has created a DirectPlay session. + */ +#define DPLSYS_DPLAYCONNECTSUCCEEDED 0x00000003 + +/* + * The application has terminated. + */ +#define DPLSYS_APPTERMINATED 0x00000004 + +/* + * The message is a DPLMSG_SETPROPERTY message. + */ +#define DPLSYS_SETPROPERTY 0x00000005 + +/* + * The message is a DPLMSG_SETPROPERTYRESPONSE message. + */ +#define DPLSYS_SETPROPERTYRESPONSE 0x00000006 + +/* + * The message is a DPLMSG_GETPROPERTY message. + */ +#define DPLSYS_GETPROPERTY 0x00000007 + +/* + * The message is a DPLMSG_GETPROPERTYRESPONSE message. + */ +#define DPLSYS_GETPROPERTYRESPONSE 0x00000008 + +/* + * The message is a DPLMSG_NEWSESSIONHOST message. + */ +#define DPLSYS_NEWSESSIONHOST 0x00000009 + +/* + * New connection settings are available. + */ +#define DPLSYS_NEWCONNECTIONSETTINGS 0x0000000A + +/* + * The Lobby Client has released the DirectPlayLobby Interface + */ +#define DPLSYS_LOBBYCLIENTRELEASE 0x0000000B + +/**************************************************************************** + * + * DirectPlay defined property GUIDs and associated data structures + * + ****************************************************************************/ + +/* + * DPLPROPERTY_MessagesSupported + * + * Request whether the lobby supports standard. Lobby with respond with either + * TRUE or FALSE or may not respond at all. + * + * Property data is a single BOOL with TRUE or FALSE + */ +// {762CCDA1-D916-11d0-BA39-00C04FD7ED67} +DEFINE_GUID(DPLPROPERTY_MessagesSupported, +0x762ccda1, 0xd916, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67); + +/* + * DPLPROPERTY_LobbyGuid + * + * Request the GUID that identifies the lobby software that the application + * is communicating with. + * + * Property data is a single GUID. + */ +// {F56920A0-D218-11d0-BA39-00C04FD7ED67} +DEFINE_GUID(DPLPROPERTY_LobbyGuid, +0xf56920a0, 0xd218, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67); + +/* + * DPLPROPERTY_PlayerGuid + * + * Request the GUID that identifies the player on this machine for sending + * property data back to the lobby. + * + * Property data is the DPLDATA_PLAYERDATA structure + */ +// {B4319322-D20D-11d0-BA39-00C04FD7ED67} +DEFINE_GUID(DPLPROPERTY_PlayerGuid, +0xb4319322, 0xd20d, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67); + +/* + * DPLDATA_PLAYERGUID + * + * Data structure to hold the GUID of the player and player creation flags + * from the lobby. + */ +typedef struct _DPLDATA_PLAYERGUID +{ + GUID guidPlayer; + DWORD dwPlayerFlags; +} DPLDATA_PLAYERGUID, FAR *LPDPLDATA_PLAYERGUID; + +/* + * DPLPROPERTY_PlayerScore + * + * Used to send an array of long integers to the lobby indicating the + * score of a player. + * + * Property data is the DPLDATA_PLAYERSCORE structure. + */ +// {48784000-D219-11d0-BA39-00C04FD7ED67} +DEFINE_GUID(DPLPROPERTY_PlayerScore, +0x48784000, 0xd219, 0x11d0, 0xba, 0x39, 0x0, 0xc0, 0x4f, 0xd7, 0xed, 0x67); + +/* + * DPLDATA_PLAYERSCORE + * + * Data structure to hold an array of long integers representing a player score. + * Application must allocate enough memory to hold all the scores. + */ +typedef struct _DPLDATA_PLAYERSCORE +{ + DWORD dwScoreCount; + LONG Score[1]; +} DPLDATA_PLAYERSCORE, FAR *LPDPLDATA_PLAYERSCORE; + +/**************************************************************************** + * + * DirectPlay Address ID's + * + ****************************************************************************/ + +/* DirectPlay Address + * + * A DirectPlay address consists of multiple chunks of data, each tagged + * with a GUID signifying the type of data in the chunk. The chunk also + * has a length so that unknown chunk types can be skipped. + * + * The EnumAddress() function is used to parse these address data chunks. + */ + +/* + * DPADDRESS + * + * Header for block of address data elements + */ +typedef struct _DPADDRESS +{ + GUID guidDataType; + DWORD dwDataSize; +} DPADDRESS; + +typedef DPADDRESS FAR *LPDPADDRESS; + +/* + * DPAID_TotalSize + * + * Chunk is a DWORD containing size of entire DPADDRESS structure + */ + +// {1318F560-912C-11d0-9DAA-00A0C90A43CB} +DEFINE_GUID(DPAID_TotalSize, +0x1318f560, 0x912c, 0x11d0, 0x9d, 0xaa, 0x0, 0xa0, 0xc9, 0xa, 0x43, 0xcb); + +/* + * DPAID_ServiceProvider + * + * Chunk is a GUID describing the service provider that created the chunk. + * All addresses must contain this chunk. + */ + +// {07D916C0-E0AF-11cf-9C4E-00A0C905425E} +DEFINE_GUID(DPAID_ServiceProvider, +0x7d916c0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +/* + * DPAID_LobbyProvider + * + * Chunk is a GUID describing the lobby provider that created the chunk. + * All addresses must contain this chunk. + */ + +// {59B95640-9667-11d0-A77D-0000F803ABFC} +DEFINE_GUID(DPAID_LobbyProvider, +0x59b95640, 0x9667, 0x11d0, 0xa7, 0x7d, 0x0, 0x0, 0xf8, 0x3, 0xab, 0xfc); + +/* + * DPAID_Phone and DPAID_PhoneW + * + * Chunk is a string containing a phone number (i.e. "1-800-555-1212") + * in ANSI or UNICODE format + */ + +// {78EC89A0-E0AF-11cf-9C4E-00A0C905425E} +DEFINE_GUID(DPAID_Phone, +0x78ec89a0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +// {BA5A7A70-9DBF-11d0-9CC1-00A0C905425E} +DEFINE_GUID(DPAID_PhoneW, +0xba5a7a70, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +/* + * DPAID_Modem and DPAID_ModemW + * + * Chunk is a string containing a modem name registered with TAPI + * in ANSI or UNICODE format + */ + +// {F6DCC200-A2FE-11d0-9C4F-00A0C905425E} +DEFINE_GUID(DPAID_Modem, +0xf6dcc200, 0xa2fe, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +// {01FD92E0-A2FF-11d0-9C4F-00A0C905425E} +DEFINE_GUID(DPAID_ModemW, +0x1fd92e0, 0xa2ff, 0x11d0, 0x9c, 0x4f, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +/* + * DPAID_Inet and DPAID_InetW + * + * Chunk is a string containing a TCP/IP host name or an IP address + * (i.e. "dplay.microsoft.com" or "137.55.100.173") in ANSI or UNICODE format + */ + +// {C4A54DA0-E0AF-11cf-9C4E-00A0C905425E} +DEFINE_GUID(DPAID_INet, +0xc4a54da0, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +// {E63232A0-9DBF-11d0-9CC1-00A0C905425E} +DEFINE_GUID(DPAID_INetW, +0xe63232a0, 0x9dbf, 0x11d0, 0x9c, 0xc1, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +/* + * DPAID_InetPort + * + * Chunk is the port number used for creating the apps TCP and UDP sockets. + * WORD value (i.e. 47624). + */ + +// {E4524541-8EA5-11d1-8A96-006097B01411} +DEFINE_GUID(DPAID_INetPort, +0xe4524541, 0x8ea5, 0x11d1, 0x8a, 0x96, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11); + +#ifdef BIGMESSAGEDEFENSE +#endif + +/* + * DPCOMPORTADDRESS + * + * Used to specify com port settings. The constants that define baud rate, + * stop bits and parity are defined in WINBASE.H. The constants for flow + * control are given below. + */ + +#define DPCPA_NOFLOW 0 // no flow control +#define DPCPA_XONXOFFFLOW 1 // software flow control +#define DPCPA_RTSFLOW 2 // hardware flow control with RTS +#define DPCPA_DTRFLOW 3 // hardware flow control with DTR +#define DPCPA_RTSDTRFLOW 4 // hardware flow control with RTS and DTR + +typedef struct _DPCOMPORTADDRESS +{ + DWORD dwComPort; // COM port to use (1-4) + DWORD dwBaudRate; // baud rate (100-256k) + DWORD dwStopBits; // no. stop bits (1-2) + DWORD dwParity; // parity (none, odd, even, mark) + DWORD dwFlowControl; // flow control (none, xon/xoff, rts, dtr) +} DPCOMPORTADDRESS; + +typedef DPCOMPORTADDRESS FAR *LPDPCOMPORTADDRESS; + +/* + * DPAID_ComPort + * + * Chunk contains a DPCOMPORTADDRESS structure defining the serial port. + */ + +// {F2F0CE00-E0AF-11cf-9C4E-00A0C905425E} +DEFINE_GUID(DPAID_ComPort, +0xf2f0ce00, 0xe0af, 0x11cf, 0x9c, 0x4e, 0x0, 0xa0, 0xc9, 0x5, 0x42, 0x5e); + +/**************************************************************************** + * + * dplobby 1.0 obsolete definitions + * Included for compatibility only. + * + ****************************************************************************/ +#define DPLAD_SYSTEM DPLMSG_SYSTEM + + +#ifdef __cplusplus +}; +#endif /* __cplusplus */ + +#pragma warning(default:4201) + +#endif /* __DPLOBBY_INCLUDED__ */ + diff --git a/windows_libs/mssdk/include/dplobby8.h b/windows_libs/mssdk/include/dplobby8.h new file mode 100644 index 00000000..52493978 --- /dev/null +++ b/windows_libs/mssdk/include/dplobby8.h @@ -0,0 +1,401 @@ +/*========================================================================== + * + * Copyright (C) 2000 Microsoft Corporation. All Rights Reserved. + * + * File: DPLobby.h + * Content: DirectPlay8 Lobby Include File + * + ***************************************************************************/ + +#ifndef __DPLOBBY_H__ +#define __DPLOBBY_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/**************************************************************************** + * + * DirectPlay8Lobby CLSIDs + * + ****************************************************************************/ + +// {667955AD-6B3B-43ca-B949-BC69B5BAFF7F} +DEFINE_GUID(CLSID_DirectPlay8LobbiedApplication, +0x667955ad, 0x6b3b, 0x43ca, 0xb9, 0x49, 0xbc, 0x69, 0xb5, 0xba, 0xff, 0x7f); + +// {3B2B6775-70B6-45af-8DEA-A209C69559F3} +DEFINE_GUID(CLSID_DirectPlay8LobbyClient, +0x3b2b6775, 0x70b6, 0x45af, 0x8d, 0xea, 0xa2, 0x9, 0xc6, 0x95, 0x59, 0xf3); + +/**************************************************************************** + * + * DirectPlay8Lobby Interface IIDs + * + ****************************************************************************/ + +// {819074A3-016C-11d3-AE14-006097B01411} +DEFINE_GUID(IID_IDirectPlay8LobbiedApplication, +0x819074a3, 0x16c, 0x11d3, 0xae, 0x14, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11); + +// {819074A2-016C-11d3-AE14-006097B01411} +DEFINE_GUID(IID_IDirectPlay8LobbyClient, +0x819074a2, 0x16c, 0x11d3, 0xae, 0x14, 0x0, 0x60, 0x97, 0xb0, 0x14, 0x11); + +/**************************************************************************** + * + * DirectPlay8Lobby Interface Pointer + * + ****************************************************************************/ + +typedef struct IDirectPlay8LobbiedApplication *PDIRECTPLAY8LOBBIEDAPPLICATION; +typedef struct IDirectPlay8LobbyClient *PDIRECTPLAY8LOBBYCLIENT; + +/**************************************************************************** + * + * DirectPlay8 Lobby Message IDs + * + ****************************************************************************/ + +#define DPL_MSGID_LOBBY 0x8000 +#define DPL_MSGID_RECEIVE (0x0001 | DPL_MSGID_LOBBY) +#define DPL_MSGID_CONNECT (0x0002 | DPL_MSGID_LOBBY) +#define DPL_MSGID_DISCONNECT (0x0003 | DPL_MSGID_LOBBY) +#define DPL_MSGID_SESSION_STATUS (0x0004 | DPL_MSGID_LOBBY) +#define DPL_MSGID_CONNECTION_SETTINGS (0x0005 | DPL_MSGID_LOBBY) + +/**************************************************************************** + * + * DirectPlay8Lobby Constants + * + ****************************************************************************/ + +// +// Specifies that operation should be performed on all open connections +// +#define DPLHANDLE_ALLCONNECTIONS 0xFFFFFFFF + +// +// The associated game session has suceeded in connecting / hosting +// +#define DPLSESSION_CONNECTED 0x0001 + +// The associated game session failed connecting / hosting +// +#define DPLSESSION_COULDNOTCONNECT 0x0002 + +// +// The associated game session has disconnected +// +#define DPLSESSION_DISCONNECTED 0x0003 + +// +// The associated game session has terminated +// +#define DPLSESSION_TERMINATED 0x0004 + +// +// The associated game session's host has migrated +// +#define DPLSESSION_HOSTMIGRATED 0x0005 + +// +// The associated game session's host has migrated to the local client +// +#define DPLSESSION_HOSTMIGRATEDHERE 0x0006 + + +/**************************************************************************** + * + * DirectPlay8 Lobby Flags + * + ****************************************************************************/ + +// +// Do not automatically make the lobby app unavailable when a connection is established +// +#define DPLAVAILABLE_ALLOWMULTIPLECONNECT 0x0001 + +// +// Launch a new instance of the application to connect to +// +#define DPLCONNECT_LAUNCHNEW 0x0001 + +// +// Launch a new instance of the application if one is not waiting +// +#define DPLCONNECT_LAUNCHNOTFOUND 0x0002 + +// +// When starting the associated game session, start it as a host +// +#define DPLCONNECTSETTINGS_HOST 0x0001 + +// +// Disable parameter validation +// +#define DPLINITIALIZE_DISABLEPARAMVAL 0x0001 + +/**************************************************************************** + * + * DirectPlay8Lobby Structures (Non-Message) + * + ****************************************************************************/ + +// +// Information on a registered game +// +typedef struct _DPL_APPLICATION_INFO { + GUID guidApplication; // GUID of the application + PWSTR pwszApplicationName; // Name of the application + DWORD dwNumRunning; // # of instances of this application running + DWORD dwNumWaiting; // # of instances of this application waiting + DWORD dwFlags; // Flags +} DPL_APPLICATION_INFO, *PDPL_APPLICATION_INFO; + +// +// Settings to be used for connecting / hosting a game session +// +typedef struct _DPL_CONNECTION_SETTINGS { + DWORD dwSize; // Size of this structure + DWORD dwFlags; // Connection settings flags (DPLCONNECTSETTINGS_...) + DPN_APPLICATION_DESC dpnAppDesc; // Application desc for the associated DirectPlay session + IDirectPlay8Address *pdp8HostAddress; // Address of host to connect to + IDirectPlay8Address **ppdp8DeviceAddresses; // Address of device to connect from / host on + DWORD cNumDeviceAddresses; // # of addresses specified in ppdp8DeviceAddresses + PWSTR pwszPlayerName; // Name to give the player +} DPL_CONNECTION_SETTINGS, *PDPL_CONNECTION_SETTINGS; + +// +// Information for performing a lobby connect +// (ConnectApplication) +// +typedef struct _DPL_CONNECT_INFO { + DWORD dwSize; // Size of this structure + DWORD dwFlags; // Flags (DPLCONNECT_...) + GUID guidApplication; // GUID of application to launch + PDPL_CONNECTION_SETTINGS pdplConnectionSettings; + // Settings application should use + PVOID pvLobbyConnectData; // User defined data block + DWORD dwLobbyConnectDataSize; + // Size of user defined data block +} DPL_CONNECT_INFO, *PDPL_CONNECT_INFO; + +// +// Information for registering an application +// (RegisterApplication) +// +typedef struct _DPL_PROGRAM_DESC { + DWORD dwSize; + DWORD dwFlags; + GUID guidApplication; // Application GUID + PWSTR pwszApplicationName; // Unicode application name + PWSTR pwszCommandLine; // Unicode command line arguments + PWSTR pwszCurrentDirectory; // Unicode current directory + PWSTR pwszDescription; // Unicode application description + PWSTR pwszExecutableFilename; // Unicode filename of application executable + PWSTR pwszExecutablePath; // Unicode path of application executable + PWSTR pwszLauncherFilename; // Unicode filename of launcher executable + PWSTR pwszLauncherPath; // Unicode path of launcher executable +} DPL_PROGRAM_DESC, *PDPL_PROGRAM_DESC; + +/**************************************************************************** + * + * DirectPlay8 Lobby Message Structures + * + ****************************************************************************/ + +// +// A connection was established +// (DPL_MSGID_CONNECT) +// +typedef struct _DPL_MESSAGE_CONNECT +{ + DWORD dwSize; // Size of this structure + DPNHANDLE hConnectId; // Handle of new connection + PDPL_CONNECTION_SETTINGS pdplConnectionSettings; // Connection settings for this connection + PVOID pvLobbyConnectData; // User defined lobby data block + DWORD dwLobbyConnectDataSize; // Size of user defined lobby data block + PVOID pvConnectionContext; // Context value for this connection (user set) +} DPL_MESSAGE_CONNECT, *PDPL_MESSAGE_CONNECT; + +// +// Connection settings have been updated +// (DPL_MSGID_CONNECTION_SETTINGS) +// +typedef struct _DPL_MESSAGE_CONNECTION_SETTINGS +{ + DWORD dwSize; // Size of this structure + DPNHANDLE hSender; // Handle of the connection for these settings + PDPL_CONNECTION_SETTINGS pdplConnectionSettings; // Connection settings + PVOID pvConnectionContext; // Context value for this connection +} DPL_MESSAGE_CONNECTION_SETTINGS, *PDPL_MESSAGE_CONNECTION_SETTINGS; + +// +// A connection has been disconnected +// (DPL_MSGID_DISCONNECT) +// +typedef struct _DPL_MESSAGE_DISCONNECT +{ + DWORD dwSize; // Size of this structure + DPNHANDLE hDisconnectId; // Handle of the connection that was terminated + HRESULT hrReason; // Reason the connection was broken + PVOID pvConnectionContext; // Context value for this connection +} DPL_MESSAGE_DISCONNECT, *PDPL_MESSAGE_DISCONNECT; + +// +// Data was received through a connection +// (DPL_MSGID_RECEIVE) +// +typedef struct _DPL_MESSAGE_RECEIVE +{ + DWORD dwSize; // Size of this structure + DPNHANDLE hSender; // Handle of the connection that is from + BYTE *pBuffer; // Contents of the message + DWORD dwBufferSize; // Size of the message context + PVOID pvConnectionContext; // Context value for this connection +} DPL_MESSAGE_RECEIVE, *PDPL_MESSAGE_RECEIVE; + +// +// Current status of the associated connection +// (DPL_MSGID_SESSION_STATUS) +// +typedef struct _DPL_MESSAGE_SESSION_STATUS +{ + DWORD dwSize; // Size of this structure + DPNHANDLE hSender; // Handle of the connection that this is from + DWORD dwStatus; // Status (DPLSESSION_...) + PVOID pvConnectionContext; // Context value for this connection +} DPL_MESSAGE_SESSION_STATUS, *PDPL_MESSAGE_SESSION_STATUS; + +/**************************************************************************** + * + * DirectPlay8Lobby Create + * + ****************************************************************************/ + +extern HRESULT WINAPI DirectPlay8LobbyCreate( const GUID * pcIID, void **ppvInterface, IUnknown *pUnknown); + +/**************************************************************************** + * + * DirectPlay8 Functions + * + ****************************************************************************/ + +// +// COM definition for DirectPlayLobbyClient +// +#undef INTERFACE // External COM Implementation +#define INTERFACE IDirectPlay8LobbyClient +DECLARE_INTERFACE_(IDirectPlay8LobbyClient,IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + // IDirectPlayLobbyClient methods + STDMETHOD(Initialize) (THIS_ const PVOID pvUserContext,const PFNDPNMESSAGEHANDLER pfn,const DWORD dwFlags) PURE; + STDMETHOD(EnumLocalPrograms) (THIS_ GUID *const pGuidApplication,BYTE *const pEnumData,DWORD *const pdwEnumData,DWORD *const pdwItems, const DWORD dwFlags) PURE; + STDMETHOD(ConnectApplication) (THIS_ DPL_CONNECT_INFO *const pdplConnectionInfo,const PVOID pvConnectionContext,DPNHANDLE *const hApplication,const DWORD dwTimeOut,const DWORD dwFlags) PURE; + STDMETHOD(Send) (THIS_ const DPNHANDLE hConnection,BYTE *const pBuffer,const DWORD pBufferSize,const DWORD dwFlags) PURE; + STDMETHOD(ReleaseApplication) (THIS_ const DPNHANDLE hConnection, const DWORD dwFlags ) PURE; + STDMETHOD(Close) (THIS_ const DWORD dwFlags ) PURE; + STDMETHOD(GetConnectionSettings) (THIS_ const DPNHANDLE hConnection, DPL_CONNECTION_SETTINGS * const pdplSessionInfo, DWORD *pdwInfoSize, const DWORD dwFlags ) PURE; + STDMETHOD(SetConnectionSettings) (THIS_ const DPNHANDLE hConnection, const DPL_CONNECTION_SETTINGS * const pdplSessionInfo, const DWORD dwFlags ) PURE; +}; + + +// +// COM definition for DirectPlayLobbiedApplication +// +#undef INTERFACE // External COM Implementation +#define INTERFACE IDirectPlay8LobbiedApplication +DECLARE_INTERFACE_(IDirectPlay8LobbiedApplication,IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID riid,LPVOID *ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + // IDirectPlayLobbiedApplication methods + STDMETHOD(Initialize) (THIS_ const PVOID pvUserContext,const PFNDPNMESSAGEHANDLER pfn,DPNHANDLE * const pdpnhConnection, const DWORD dwFlags) PURE; + STDMETHOD(RegisterProgram) (THIS_ PDPL_PROGRAM_DESC pdplProgramDesc,const DWORD dwFlags) PURE; + STDMETHOD(UnRegisterProgram) (THIS_ GUID *pguidApplication,const DWORD dwFlags) PURE; + STDMETHOD(Send) (THIS_ const DPNHANDLE hConnection,BYTE *const pBuffer,const DWORD pBufferSize,const DWORD dwFlags) PURE; + STDMETHOD(SetAppAvailable) (THIS_ const BOOL fAvailable, const DWORD dwFlags ) PURE; + STDMETHOD(UpdateStatus) (THIS_ const DPNHANDLE hConnection, const DWORD dwStatus, const DWORD dwFlags ) PURE; + STDMETHOD(Close) (THIS_ const DWORD dwFlags ) PURE; + STDMETHOD(GetConnectionSettings) (THIS_ const DPNHANDLE hConnection, DPL_CONNECTION_SETTINGS * const pdplSessionInfo, DWORD *pdwInfoSize, const DWORD dwFlags ) PURE; + STDMETHOD(SetConnectionSettings) (THIS_ const DPNHANDLE hConnection, const DPL_CONNECTION_SETTINGS * const pdplSessionInfo, const DWORD dwFlags ) PURE; +}; + + +/**************************************************************************** + * + * DirectPlayLobby Interface Macros + * + ****************************************************************************/ + +#if !defined(__cplusplus) || defined(CINTERFACE) + +#define IDirectPlay8LobbyClient_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectPlay8LobbyClient_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectPlay8LobbyClient_Release(p) (p)->lpVtbl->Release(p) +#define IDirectPlay8LobbyClient_Initialize(p,a,b,c) (p)->lpVtbl->Initialize(p,a,b,c) +#define IDirectPlay8LobbyClient_EnumLocalPrograms(p,a,b,c,d,e) (p)->lpVtbl->EnumLocalPrograms(p,a,b,c,d,e) +#define IDirectPlay8LobbyClient_ConnectApplication(p,a,b,c,d,e) (p)->lpVtbl->ConnectApplication(p,a,b,c,d,e) +#define IDirectPlay8LobbyClient_Send(p,a,b,c,d) (p)->lpVtbl->Send(p,a,b,c,d) +#define IDirectPlay8LobbyClient_ReleaseApplication(p,a,b) (p)->lpVtbl->ReleaseApplication(p,a,b) +#define IDirectPlay8LobbyClient_Close(p,a) (p)->lpVtbl->Close(p,a) +#define IDirectPlay8LobbyClient_GetConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetConnectionSettings(p,a,b,c,d) +#define IDirectPlay8LobbyClient_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c) + +#define IDirectPlay8LobbiedApplication_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectPlay8LobbiedApplication_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectPlay8LobbiedApplication_Release(p) (p)->lpVtbl->Release(p) +#define IDirectPlay8LobbiedApplication_Initialize(p,a,b,c,d) (p)->lpVtbl->Initialize(p,a,b,c,d) +#define IDirectPlay8LobbiedApplication_RegisterProgram(p,a,b) (p)->lpVtbl->RegisterProgram(p,a,b) +#define IDirectPlay8LobbiedApplication_UnRegisterProgram(p,a,b) (p)->lpVtbl->UnRegisterProgram(p,a,b) +#define IDirectPlay8LobbiedApplication_Send(p,a,b,c,d) (p)->lpVtbl->Send(p,a,b,c,d) +#define IDirectPlay8LobbiedApplication_SetAppAvailable(p,a,b) (p)->lpVtbl->SetAppAvailable(p,a,b) +#define IDirectPlay8LobbiedApplication_UpdateStatus(p,a,b,c) (p)->lpVtbl->UpdateStatus(p,a,b,c) +#define IDirectPlay8LobbiedApplication_Close(p,a) (p)->lpVtbl->Close(p,a) +#define IDirectPlay8LobbiedApplication_GetConnectionSettings(p,a,b,c,d) (p)->lpVtbl->GetConnectionSettings(p,a,b,c,d) +#define IDirectPlay8LobbiedApplication_SetConnectionSettings(p,a,b,c) (p)->lpVtbl->SetConnectionSettings(p,a,b,c) + +#else /* C++ */ + +#define IDirectPlay8LobbyClient_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectPlay8LobbyClient_AddRef(p) (p)->AddRef() +#define IDirectPlay8LobbyClient_Release(p) (p)->Release() +#define IDirectPlay8LobbyClient_Initialize(p,a,b,c) (p)->Initialize(a,b,c) +#define IDirectPlay8LobbyClient_EnumLocalPrograms(p,a,b,c,d,e) (p)->EnumLocalPrograms(a,b,c,d,e) +#define IDirectPlay8LobbyClient_ConnectApplication(p,a,b,c,d,e) (p)->ConnectApplication(a,b,c,d,e) +#define IDirectPlay8LobbyClient_Send(p,a,b,c,d) (p)->Send(a,b,c,d) +#define IDirectPlay8LobbyClient_ReleaseApplication(p,a,b) (p)->ReleaseApplication(a,b) +#define IDirectPlay8LobbyClient_Close(p,a) (p)->Close(a) +#define IDirectPlay8LobbyClient_GetConnectionSettings(p,a,b,c,d) (p)->GetConnectionSettings(a,b,c,d) +#define IDirectPlay8LobbyClient_SetConnectionSettings(p,a,b,c) (p)->SetConnectionSettings(a,b,c) + +#define IDirectPlay8LobbiedApplication_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectPlay8LobbiedApplication_AddRef(p) (p)->AddRef() +#define IDirectPlay8LobbiedApplication_Release(p) (p)->Release() +#define IDirectPlay8LobbiedApplication_Initialize(p,a,b,c,d) (p)->Initialize(a,b,c,d) +#define IDirectPlay8LobbiedApplication_RegisterProgram(p,a,b) (p)->RegisterProgram(a,b) +#define IDirectPlay8LobbiedApplication_UnRegisterProgram(p,a,b) (p)->UnRegisterProgram(a,b) +#define IDirectPlay8LobbiedApplication_Send(p,a,b,c,d) (p)->Send(a,b,c,d) +#define IDirectPlay8LobbiedApplication_SetAppAvailable(p,a,b) (p)->SetAppAvailable(a,b) +#define IDirectPlay8LobbiedApplication_UpdateStatus(p,a,b,c) (p)->UpdateStatus(a,b,c) +#define IDirectPlay8LobbiedApplication_Close(p,a) (p)->Close(a) +#define IDirectPlay8LobbiedApplication_GetConnectionSettings(p,a,b,c,d) (p)->GetConnectionSettings(a,b,c,d) +#define IDirectPlay8LobbiedApplication_SetConnectionSettings(p,a,b,c) (p)->SetConnectionSettings(a,b,c) + +#endif + +#ifdef __cplusplus +} +#endif + +#endif // __DPLOBBY_H__ + diff --git a/windows_libs/mssdk/include/dsetup.h b/windows_libs/mssdk/include/dsetup.h new file mode 100644 index 00000000..d2087cfb --- /dev/null +++ b/windows_libs/mssdk/include/dsetup.h @@ -0,0 +1,310 @@ +/*========================================================================== + * + * Copyright (C) 1995-1997 Microsoft Corporation. All Rights Reserved. + * + * File: dsetup.h + * Content: DirectXSetup, error codes and flags + ***************************************************************************/ + +#ifndef __DSETUP_H__ +#define __DSETUP_H__ + +#include // windows stuff + +#ifdef _WIN32 +#define COM_NO_WINDOWS_H +#include +#else +#endif + + +#ifdef __cplusplus +extern "C" { +#endif + +#define FOURCC_VERS mmioFOURCC('v','e','r','s') + +// DSETUP Error Codes, must remain compatible with previous setup. +#define DSETUPERR_SUCCESS_RESTART 1 +#define DSETUPERR_SUCCESS 0 +#define DSETUPERR_BADWINDOWSVERSION -1 +#define DSETUPERR_SOURCEFILENOTFOUND -2 +#define DSETUPERR_BADSOURCESIZE -3 +#define DSETUPERR_BADSOURCETIME -4 +#define DSETUPERR_NOCOPY -5 +#define DSETUPERR_OUTOFDISKSPACE -6 +#define DSETUPERR_CANTFINDINF -7 +#define DSETUPERR_CANTFINDDIR -8 +#define DSETUPERR_INTERNAL -9 +#define DSETUPERR_NTWITHNO3D -10 /* REM: obsolete, you'll never see this */ +#define DSETUPERR_UNKNOWNOS -11 +#define DSETUPERR_USERHITCANCEL -12 +#define DSETUPERR_NOTPREINSTALLEDONNT -13 +#define DSETUPERR_NEWERVERSION -14 +#define DSETUPERR_NOTADMIN -15 +#define DSETUPERR_UNSUPPORTEDPROCESSOR -16 + +// DSETUP flags. DirectX 5.0 apps should use these flags only. +#define DSETUP_DDRAWDRV 0x00000008 /* install DirectDraw Drivers */ +#define DSETUP_DSOUNDDRV 0x00000010 /* install DirectSound Drivers */ +#define DSETUP_DXCORE 0x00010000 /* install DirectX runtime */ +#define DSETUP_DIRECTX (DSETUP_DXCORE|DSETUP_DDRAWDRV|DSETUP_DSOUNDDRV) +#define DSETUP_TESTINSTALL 0x00020000 /* just test install, don't do anything */ +#define DSETUP_USEROLDERFLAG 0x02000000 /* enable return DSETUPERR_NEWERVERSION */ +// Bug #22730 + // #define DSETUP_NTINSTALL 0x00080000 /* install on Win2K platform */ + +// These OBSOLETE flags are here for compatibility with pre-DX5 apps only. +// They are present to allow DX3 apps to be recompiled with DX5 and still work. +// DO NOT USE THEM for DX5. They will go away in future DX releases. +#define DSETUP_DDRAW 0x00000001 /* OBSOLETE. install DirectDraw */ +#define DSETUP_DSOUND 0x00000002 /* OBSOLETE. install DirectSound */ +#define DSETUP_DPLAY 0x00000004 /* OBSOLETE. install DirectPlay */ +#define DSETUP_DPLAYSP 0x00000020 /* OBSOLETE. install DirectPlay Providers */ +#define DSETUP_DVIDEO 0x00000040 /* OBSOLETE. install DirectVideo */ +#define DSETUP_D3D 0x00000200 /* OBSOLETE. install Direct3D */ +#define DSETUP_DINPUT 0x00000800 /* OBSOLETE. install DirectInput */ +#define DSETUP_DIRECTXSETUP 0x00001000 /* OBSOLETE. install DirectXSetup DLL's */ +#define DSETUP_NOUI 0x00002000 /* OBSOLETE. install DirectX with NO UI */ +#define DSETUP_PROMPTFORDRIVERS 0x10000000 /* OBSOLETE. prompt when replacing display/audio drivers */ +#define DSETUP_RESTOREDRIVERS 0x20000000 /* OBSOLETE. restore display/audio drivers */ + + + +//****************************************************************** +// DirectX Setup Callback mechanism +//****************************************************************** + +// DSETUP Message Info Codes, passed to callback as Reason parameter. +#define DSETUP_CB_MSG_NOMESSAGE 0 +#define DSETUP_CB_MSG_CANTINSTALL_UNKNOWNOS 1 +#define DSETUP_CB_MSG_CANTINSTALL_NT 2 +#define DSETUP_CB_MSG_CANTINSTALL_BETA 3 +#define DSETUP_CB_MSG_CANTINSTALL_NOTWIN32 4 +#define DSETUP_CB_MSG_CANTINSTALL_WRONGLANGUAGE 5 +#define DSETUP_CB_MSG_CANTINSTALL_WRONGPLATFORM 6 +#define DSETUP_CB_MSG_PREINSTALL_NT 7 +#define DSETUP_CB_MSG_NOTPREINSTALLEDONNT 8 +#define DSETUP_CB_MSG_SETUP_INIT_FAILED 9 +#define DSETUP_CB_MSG_INTERNAL_ERROR 10 +#define DSETUP_CB_MSG_CHECK_DRIVER_UPGRADE 11 +#define DSETUP_CB_MSG_OUTOFDISKSPACE 12 +#define DSETUP_CB_MSG_BEGIN_INSTALL 13 +#define DSETUP_CB_MSG_BEGIN_INSTALL_RUNTIME 14 +#define DSETUP_CB_MSG_BEGIN_INSTALL_DRIVERS 15 +#define DSETUP_CB_MSG_BEGIN_RESTORE_DRIVERS 16 +#define DSETUP_CB_MSG_FILECOPYERROR 17 + + +#define DSETUP_CB_UPGRADE_TYPE_MASK 0x000F +#define DSETUP_CB_UPGRADE_KEEP 0x0001 +#define DSETUP_CB_UPGRADE_SAFE 0x0002 +#define DSETUP_CB_UPGRADE_FORCE 0x0004 +#define DSETUP_CB_UPGRADE_UNKNOWN 0x0008 + +#define DSETUP_CB_UPGRADE_HASWARNINGS 0x0100 +#define DSETUP_CB_UPGRADE_CANTBACKUP 0x0200 + +#define DSETUP_CB_UPGRADE_DEVICE_ACTIVE 0x0800 + +#define DSETUP_CB_UPGRADE_DEVICE_DISPLAY 0x1000 +#define DSETUP_CB_UPGRADE_DEVICE_MEDIA 0x2000 + + +typedef struct _DSETUP_CB_UPGRADEINFO +{ + DWORD UpgradeFlags; +} DSETUP_CB_UPGRADEINFO; + +typedef struct _DSETUP_CB_FILECOPYERROR +{ + DWORD dwError; +} DSETUP_CB_FILECOPYERROR; + + +#ifdef _WIN32 +// +// Data Structures +// +#ifndef UNICODE_ONLY + +typedef struct _DIRECTXREGISTERAPPA { + DWORD dwSize; + DWORD dwFlags; + LPSTR lpszApplicationName; + LPGUID lpGUID; + LPSTR lpszFilename; + LPSTR lpszCommandLine; + LPSTR lpszPath; + LPSTR lpszCurrentDirectory; +} DIRECTXREGISTERAPPA, *PDIRECTXREGISTERAPPA, *LPDIRECTXREGISTERAPPA; + +typedef struct _DIRECTXREGISTERAPP2A { + DWORD dwSize; + DWORD dwFlags; + LPSTR lpszApplicationName; + LPGUID lpGUID; + LPSTR lpszFilename; + LPSTR lpszCommandLine; + LPSTR lpszPath; + LPSTR lpszCurrentDirectory; + LPSTR lpszLauncherName; +} DIRECTXREGISTERAPP2A, *PDIRECTXREGISTERAPP2A, *LPDIRECTXREGISTERAPP2A; + +#endif //!UNICODE_ONLY +#ifndef ANSI_ONLY + +typedef struct _DIRECTXREGISTERAPPW { + DWORD dwSize; + DWORD dwFlags; + LPWSTR lpszApplicationName; + LPGUID lpGUID; + LPWSTR lpszFilename; + LPWSTR lpszCommandLine; + LPWSTR lpszPath; + LPWSTR lpszCurrentDirectory; +} DIRECTXREGISTERAPPW, *PDIRECTXREGISTERAPPW, *LPDIRECTXREGISTERAPPW; + +typedef struct _DIRECTXREGISTERAPP2W { + DWORD dwSize; + DWORD dwFlags; + LPWSTR lpszApplicationName; + LPGUID lpGUID; + LPWSTR lpszFilename; + LPWSTR lpszCommandLine; + LPWSTR lpszPath; + LPWSTR lpszCurrentDirectory; + LPWSTR lpszLauncherName; +} DIRECTXREGISTERAPP2W, *PDIRECTXREGISTERAPP2W, *LPDIRECTXREGISTERAPP2W; +#endif //!ANSI_ONLY +#ifdef UNICODE +typedef DIRECTXREGISTERAPPW DIRECTXREGISTERAPP; +typedef PDIRECTXREGISTERAPPW PDIRECTXREGISTERAPP; +typedef LPDIRECTXREGISTERAPPW LPDIRECTXREGISTERAPP; +typedef DIRECTXREGISTERAPP2W DIRECTXREGISTERAPP2; +typedef PDIRECTXREGISTERAPP2W PDIRECTXREGISTERAPP2; +typedef LPDIRECTXREGISTERAPP2W LPDIRECTXREGISTERAPP2; +#else +typedef DIRECTXREGISTERAPPA DIRECTXREGISTERAPP; +typedef PDIRECTXREGISTERAPPA PDIRECTXREGISTERAPP; +typedef LPDIRECTXREGISTERAPPA LPDIRECTXREGISTERAPP; +typedef DIRECTXREGISTERAPP2A DIRECTXREGISTERAPP2; +typedef PDIRECTXREGISTERAPP2A PDIRECTXREGISTERAPP2; +typedef LPDIRECTXREGISTERAPP2A LPDIRECTXREGISTERAPP2; +#endif // UNICODE + + +// +// API +// + +#ifndef UNICODE_ONLY +INT +WINAPI +DirectXSetupA( + HWND hWnd, + LPSTR lpszRootPath, + DWORD dwFlags + ); +#endif //!UNICODE_ONLY +#ifndef ANSI_ONLY +INT +WINAPI +DirectXSetupW( + HWND hWnd, + LPWSTR lpszRootPath, + DWORD dwFlags + ); +#endif //!ANSI_ONLY +#ifdef UNICODE +#define DirectXSetup DirectXSetupW +#else +#define DirectXSetup DirectXSetupA +#endif // !UNICODE + + +#ifndef UNICODE_ONLY +INT +WINAPI +DirectXDeviceDriverSetupA( + HWND hWnd, + LPSTR lpszDriverClass, + LPSTR lpszDriverPath, + DWORD dwFlags + ); +#endif //!UNICODE_ONLY +#ifndef ANSI_ONLY +INT +WINAPI +DirectXDeviceDriverSetupW( + HWND hWnd, + LPWSTR lpszDriverClass, + LPWSTR lpszDriverPath, + DWORD dwFlags + ); +#endif //!ANSI_ONLY +#ifdef UNICODE +#define DirectXDeviceDriverSetup DirectXDeviceDriverSetupW +#else +#define DirectXDeviceDriverSetup DirectXDeviceDriverSetupA +#endif // !UNICODE + +#ifndef UNICODE_ONLY +INT +WINAPI +DirectXRegisterApplicationA( + HWND hWnd, + LPVOID lpDXRegApp + ); +#endif //!UNICODE_ONLY +#ifndef ANSI_ONLY +INT +WINAPI +DirectXRegisterApplicationW( + HWND hWnd, + LPVOID lpDXRegApp + ); +#endif //!ANSI_ONLY +#ifdef UNICODE +#define DirectXRegisterApplication DirectXRegisterApplicationW +#else +#define DirectXRegisterApplication DirectXRegisterApplicationA +#endif // !UNICODE + +INT +WINAPI +DirectXUnRegisterApplication( + HWND hWnd, + LPGUID lpGUID + ); + +// +// Function Pointers +// +#ifdef UNICODE +typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPWSTR, DWORD); +typedef INT (WINAPI * LPDIRECTXDEVICEDRIVERSETUP)(HWND, LPWSTR, LPSTR, DWORD); +typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPVOID); +#else +typedef INT (WINAPI * LPDIRECTXSETUP)(HWND, LPSTR, DWORD); +typedef INT (WINAPI * LPDIRECTXDEVICEDRIVERSETUP)(HWND, LPSTR, LPSTR, DWORD); +typedef INT (WINAPI * LPDIRECTXREGISTERAPPLICATION)(HWND, LPVOID); +#endif // UNICODE + +typedef DWORD (FAR PASCAL * DSETUP_CALLBACK)(DWORD Reason, + DWORD MsgType, /* Same as flags to MessageBox */ + LPSTR szMessage, + LPSTR szName, + void *pInfo); + +INT WINAPI DirectXSetupSetCallback(DSETUP_CALLBACK Callback); +INT WINAPI DirectXSetupGetVersion(DWORD *lpdwVersion, DWORD *lpdwMinorVersion); + +#endif // WIN32 + + +#ifdef __cplusplus +}; +#endif + +#endif diff --git a/windows_libs/mssdk/include/dshowasf.h b/windows_libs/mssdk/include/dshowasf.h new file mode 100644 index 00000000..14d19487 --- /dev/null +++ b/windows_libs/mssdk/include/dshowasf.h @@ -0,0 +1,329 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0338 */ +/* Compiler settings for dshowasf.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __dshowasf_h__ +#define __dshowasf_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IConfigAsfWriter_FWD_DEFINED__ +#define __IConfigAsfWriter_FWD_DEFINED__ +typedef interface IConfigAsfWriter IConfigAsfWriter; +#endif /* __IConfigAsfWriter_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "unknwn.h" +#include "objidl.h" +#include "strmif.h" +#include "wmsdkidl.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_dshowasf_0000 */ +/* [local] */ + +EXTERN_GUID( IID_IConfigAsfWriter,0x45086030,0xF7E4,0x486a,0xB5,0x04,0x82,0x6B,0xB5,0x79,0x2A,0x3B ); + + + + +extern RPC_IF_HANDLE __MIDL_itf_dshowasf_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dshowasf_0000_v0_0_s_ifspec; + +#ifndef __IConfigAsfWriter_INTERFACE_DEFINED__ +#define __IConfigAsfWriter_INTERFACE_DEFINED__ + +/* interface IConfigAsfWriter */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IConfigAsfWriter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("45086030-F7E4-486a-B504-826BB5792A3B") + IConfigAsfWriter : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE ConfigureFilterUsingProfileId( + /* [in] */ DWORD dwProfileId) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentProfileId( + /* [out] */ DWORD *pdwProfileId) = 0; + + virtual HRESULT STDMETHODCALLTYPE ConfigureFilterUsingProfileGuid( + /* [in] */ REFGUID guidProfile) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentProfileGuid( + /* [out] */ GUID *pProfileGuid) = 0; + + virtual HRESULT STDMETHODCALLTYPE ConfigureFilterUsingProfile( + /* [in] */ IWMProfile *pProfile) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentProfile( + /* [out] */ IWMProfile **ppProfile) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetIndexMode( + /* [in] */ BOOL bIndexFile) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetIndexMode( + /* [out] */ BOOL *pbIndexFile) = 0; + + }; + +#else /* C style interface */ + + typedef struct IConfigAsfWriterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IConfigAsfWriter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IConfigAsfWriter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IConfigAsfWriter * This); + + HRESULT ( STDMETHODCALLTYPE *ConfigureFilterUsingProfileId )( + IConfigAsfWriter * This, + /* [in] */ DWORD dwProfileId); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentProfileId )( + IConfigAsfWriter * This, + /* [out] */ DWORD *pdwProfileId); + + HRESULT ( STDMETHODCALLTYPE *ConfigureFilterUsingProfileGuid )( + IConfigAsfWriter * This, + /* [in] */ REFGUID guidProfile); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentProfileGuid )( + IConfigAsfWriter * This, + /* [out] */ GUID *pProfileGuid); + + HRESULT ( STDMETHODCALLTYPE *ConfigureFilterUsingProfile )( + IConfigAsfWriter * This, + /* [in] */ IWMProfile *pProfile); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentProfile )( + IConfigAsfWriter * This, + /* [out] */ IWMProfile **ppProfile); + + HRESULT ( STDMETHODCALLTYPE *SetIndexMode )( + IConfigAsfWriter * This, + /* [in] */ BOOL bIndexFile); + + HRESULT ( STDMETHODCALLTYPE *GetIndexMode )( + IConfigAsfWriter * This, + /* [out] */ BOOL *pbIndexFile); + + END_INTERFACE + } IConfigAsfWriterVtbl; + + interface IConfigAsfWriter + { + CONST_VTBL struct IConfigAsfWriterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IConfigAsfWriter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IConfigAsfWriter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IConfigAsfWriter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IConfigAsfWriter_ConfigureFilterUsingProfileId(This,dwProfileId) \ + (This)->lpVtbl -> ConfigureFilterUsingProfileId(This,dwProfileId) + +#define IConfigAsfWriter_GetCurrentProfileId(This,pdwProfileId) \ + (This)->lpVtbl -> GetCurrentProfileId(This,pdwProfileId) + +#define IConfigAsfWriter_ConfigureFilterUsingProfileGuid(This,guidProfile) \ + (This)->lpVtbl -> ConfigureFilterUsingProfileGuid(This,guidProfile) + +#define IConfigAsfWriter_GetCurrentProfileGuid(This,pProfileGuid) \ + (This)->lpVtbl -> GetCurrentProfileGuid(This,pProfileGuid) + +#define IConfigAsfWriter_ConfigureFilterUsingProfile(This,pProfile) \ + (This)->lpVtbl -> ConfigureFilterUsingProfile(This,pProfile) + +#define IConfigAsfWriter_GetCurrentProfile(This,ppProfile) \ + (This)->lpVtbl -> GetCurrentProfile(This,ppProfile) + +#define IConfigAsfWriter_SetIndexMode(This,bIndexFile) \ + (This)->lpVtbl -> SetIndexMode(This,bIndexFile) + +#define IConfigAsfWriter_GetIndexMode(This,pbIndexFile) \ + (This)->lpVtbl -> GetIndexMode(This,pbIndexFile) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IConfigAsfWriter_ConfigureFilterUsingProfileId_Proxy( + IConfigAsfWriter * This, + /* [in] */ DWORD dwProfileId); + + +void __RPC_STUB IConfigAsfWriter_ConfigureFilterUsingProfileId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IConfigAsfWriter_GetCurrentProfileId_Proxy( + IConfigAsfWriter * This, + /* [out] */ DWORD *pdwProfileId); + + +void __RPC_STUB IConfigAsfWriter_GetCurrentProfileId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IConfigAsfWriter_ConfigureFilterUsingProfileGuid_Proxy( + IConfigAsfWriter * This, + /* [in] */ REFGUID guidProfile); + + +void __RPC_STUB IConfigAsfWriter_ConfigureFilterUsingProfileGuid_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IConfigAsfWriter_GetCurrentProfileGuid_Proxy( + IConfigAsfWriter * This, + /* [out] */ GUID *pProfileGuid); + + +void __RPC_STUB IConfigAsfWriter_GetCurrentProfileGuid_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IConfigAsfWriter_ConfigureFilterUsingProfile_Proxy( + IConfigAsfWriter * This, + /* [in] */ IWMProfile *pProfile); + + +void __RPC_STUB IConfigAsfWriter_ConfigureFilterUsingProfile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IConfigAsfWriter_GetCurrentProfile_Proxy( + IConfigAsfWriter * This, + /* [out] */ IWMProfile **ppProfile); + + +void __RPC_STUB IConfigAsfWriter_GetCurrentProfile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IConfigAsfWriter_SetIndexMode_Proxy( + IConfigAsfWriter * This, + /* [in] */ BOOL bIndexFile); + + +void __RPC_STUB IConfigAsfWriter_SetIndexMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IConfigAsfWriter_GetIndexMode_Proxy( + IConfigAsfWriter * This, + /* [out] */ BOOL *pbIndexFile); + + +void __RPC_STUB IConfigAsfWriter_GetIndexMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IConfigAsfWriter_INTERFACE_DEFINED__ */ + + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/dsound.h b/windows_libs/mssdk/include/dsound.h new file mode 100644 index 00000000..d98a6eac --- /dev/null +++ b/windows_libs/mssdk/include/dsound.h @@ -0,0 +1,2345 @@ +/*==========================================================================; + * + * Copyright (C) 1995-2000 Microsoft Corporation. All Rights Reserved. + * + * File: dsound.h + * Content: DirectSound include file + * + **************************************************************************/ + +#define COM_NO_WINDOWS_H +#include +#include + +#ifndef DIRECTSOUND_VERSION +#define DIRECTSOUND_VERSION 0x0800 /* Version 8.0 */ +#endif + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +#ifndef __DSOUND_INCLUDED__ +#define __DSOUND_INCLUDED__ + +/* Type definitions shared with Direct3D */ + +#ifndef DX_SHARED_DEFINES + +typedef float D3DVALUE, *LPD3DVALUE; + +#ifndef D3DCOLOR_DEFINED +typedef DWORD D3DCOLOR; +#define D3DCOLOR_DEFINED +#endif + +#ifndef LPD3DCOLOR_DEFINED +typedef DWORD *LPD3DCOLOR; +#define LPD3DCOLOR_DEFINED +#endif + +#ifndef D3DVECTOR_DEFINED +typedef struct _D3DVECTOR { + float x; + float y; + float z; +} D3DVECTOR; +#define D3DVECTOR_DEFINED +#endif + +#ifndef LPD3DVECTOR_DEFINED +typedef D3DVECTOR *LPD3DVECTOR; +#define LPD3DVECTOR_DEFINED +#endif + +#define DX_SHARED_DEFINES +#endif // DX_SHARED_DEFINES + +#define _FACDS 0x878 /* DirectSound's facility code */ +#define MAKE_DSHRESULT(code) MAKE_HRESULT(1, _FACDS, code) + +// DirectSound Component GUID {47D4D946-62E8-11CF-93BC-444553540000} +DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0); + +// DirectSound 8.0 Component GUID {3901CC3F-84B5-4FA4-BA35-AA8172B8A09B} +DEFINE_GUID(CLSID_DirectSound8, 0x3901cc3f, 0x84b5, 0x4fa4, 0xba, 0x35, 0xaa, 0x81, 0x72, 0xb8, 0xa0, 0x9b); + +// DirectSound Capture Component GUID {B0210780-89CD-11D0-AF08-00A0C925CD16} +DEFINE_GUID(CLSID_DirectSoundCapture, 0xb0210780, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16); + +// DirectSound 8.0 Capture Component GUID {E4BCAC13-7F99-4908-9A8E-74E3BF24B6E1} +DEFINE_GUID(CLSID_DirectSoundCapture8, 0xe4bcac13, 0x7f99, 0x4908, 0x9a, 0x8e, 0x74, 0xe3, 0xbf, 0x24, 0xb6, 0xe1); + +// DirectSound Full Duplex Component GUID {FEA4300C-7959-4147-B26A-2377B9E7A91D} +DEFINE_GUID(CLSID_DirectSoundFullDuplex, 0xfea4300c, 0x7959, 0x4147, 0xb2, 0x6a, 0x23, 0x77, 0xb9, 0xe7, 0xa9, 0x1d); + + +// DirectSound default playback device GUID {DEF00000-9C6D-47ED-AAF1-4DDA8F2B5C03} +DEFINE_GUID(DSDEVID_DefaultPlayback, 0xdef00000, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03); + +// DirectSound default capture device GUID {DEF00001-9C6D-47ED-AAF1-4DDA8F2B5C03} +DEFINE_GUID(DSDEVID_DefaultCapture, 0xdef00001, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03); + +// DirectSound default device for voice playback {DEF00002-9C6D-47ED-AAF1-4DDA8F2B5C03} +DEFINE_GUID(DSDEVID_DefaultVoicePlayback, 0xdef00002, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03); + +// DirectSound default device for voice capture {DEF00003-9C6D-47ED-AAF1-4DDA8F2B5C03} +DEFINE_GUID(DSDEVID_DefaultVoiceCapture, 0xdef00003, 0x9c6d, 0x47ed, 0xaa, 0xf1, 0x4d, 0xda, 0x8f, 0x2b, 0x5c, 0x03); + + +// +// Forward declarations for interfaces. +// 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined +// + +#ifdef __cplusplus +struct IDirectSound; +struct IDirectSoundBuffer; +struct IDirectSound3DListener; +struct IDirectSound3DBuffer; +struct IDirectSoundCapture; +struct IDirectSoundCaptureBuffer; +struct IDirectSoundNotify; +#endif // __cplusplus + + +// +// DirectSound 8.0 interfaces. +// + +#if DIRECTSOUND_VERSION >= 0x0800 + +#ifdef __cplusplus +struct IDirectSound8; +struct IDirectSoundBuffer8; +struct IDirectSoundCaptureBuffer8; +struct IDirectSoundFXGargle; +struct IDirectSoundFXChorus; +struct IDirectSoundFXFlanger; +struct IDirectSoundFXEcho; +struct IDirectSoundFXDistortion; +struct IDirectSoundFXCompressor; +struct IDirectSoundFXParamEq; +struct IDirectSoundFXWavesReverb; +struct IDirectSoundFXI3DL2Reverb; +struct IDirectSoundCaptureFXAec; +struct IDirectSoundCaptureFXNoiseSuppress; +struct IDirectSoundFullDuplex; +#endif // __cplusplus + +// IDirectSound8, IDirectSoundBuffer8 and IDirectSoundCaptureBuffer8 are the +// only DirectSound 7.0 interfaces with changed functionality in version 8.0. +// The other level 8 interfaces as equivalent to their level 7 counterparts: + +#define IDirectSoundCapture8 IDirectSoundCapture +#define IDirectSound3DListener8 IDirectSound3DListener +#define IDirectSound3DBuffer8 IDirectSound3DBuffer +#define IDirectSoundNotify8 IDirectSoundNotify +#define IDirectSoundFXGargle8 IDirectSoundFXGargle +#define IDirectSoundFXChorus8 IDirectSoundFXChorus +#define IDirectSoundFXFlanger8 IDirectSoundFXFlanger +#define IDirectSoundFXEcho8 IDirectSoundFXEcho +#define IDirectSoundFXDistortion8 IDirectSoundFXDistortion +#define IDirectSoundFXCompressor8 IDirectSoundFXCompressor +#define IDirectSoundFXParamEq8 IDirectSoundFXParamEq +#define IDirectSoundFXWavesReverb8 IDirectSoundFXWavesReverb +#define IDirectSoundFXI3DL2Reverb8 IDirectSoundFXI3DL2Reverb +#define IDirectSoundCaptureFXAec8 IDirectSoundCaptureFXAec +#define IDirectSoundCaptureFXNoiseSuppress8 IDirectSoundCaptureFXNoiseSuppress +#define IDirectSoundFullDuplex8 IDirectSoundFullDuplex + +#endif // DIRECTSOUND_VERSION >= 0x0800 + + +typedef struct IDirectSound *LPDIRECTSOUND; +typedef struct IDirectSoundBuffer *LPDIRECTSOUNDBUFFER; +typedef struct IDirectSound3DListener *LPDIRECTSOUND3DLISTENER; +typedef struct IDirectSound3DBuffer *LPDIRECTSOUND3DBUFFER; +typedef struct IDirectSoundCapture *LPDIRECTSOUNDCAPTURE; +typedef struct IDirectSoundCaptureBuffer *LPDIRECTSOUNDCAPTUREBUFFER; +typedef struct IDirectSoundNotify *LPDIRECTSOUNDNOTIFY; + + +#if DIRECTSOUND_VERSION >= 0x0800 +typedef struct IDirectSoundFXGargle *LPDIRECTSOUNDFXGARGLE; +typedef struct IDirectSoundFXChorus *LPDIRECTSOUNDFXCHORUS; +typedef struct IDirectSoundFXFlanger *LPDIRECTSOUNDFXFLANGER; +typedef struct IDirectSoundFXEcho *LPDIRECTSOUNDFXECHO; +typedef struct IDirectSoundFXDistortion *LPDIRECTSOUNDFXDISTORTION; +typedef struct IDirectSoundFXCompressor *LPDIRECTSOUNDFXCOMPRESSOR; +typedef struct IDirectSoundFXParamEq *LPDIRECTSOUNDFXPARAMEQ; +typedef struct IDirectSoundFXWavesReverb *LPDIRECTSOUNDFXWAVESREVERB; +typedef struct IDirectSoundFXI3DL2Reverb *LPDIRECTSOUNDFXI3DL2REVERB; +typedef struct IDirectSoundCaptureFXAec *LPDIRECTSOUNDCAPTUREFXAEC; +typedef struct IDirectSoundCaptureFXNoiseSuppress *LPDIRECTSOUNDCAPTUREFXNOISESUPPRESS; +typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX; + +typedef struct IDirectSound8 *LPDIRECTSOUND8; +typedef struct IDirectSoundBuffer8 *LPDIRECTSOUNDBUFFER8; +typedef struct IDirectSound3DListener8 *LPDIRECTSOUND3DLISTENER8; +typedef struct IDirectSound3DBuffer8 *LPDIRECTSOUND3DBUFFER8; +typedef struct IDirectSoundCapture8 *LPDIRECTSOUNDCAPTURE8; +typedef struct IDirectSoundCaptureBuffer8 *LPDIRECTSOUNDCAPTUREBUFFER8; +typedef struct IDirectSoundNotify8 *LPDIRECTSOUNDNOTIFY8; +typedef struct IDirectSoundFXGargle8 *LPDIRECTSOUNDFXGARGLE8; +typedef struct IDirectSoundFXChorus8 *LPDIRECTSOUNDFXCHORUS8; +typedef struct IDirectSoundFXFlanger8 *LPDIRECTSOUNDFXFLANGER8; +typedef struct IDirectSoundFXEcho8 *LPDIRECTSOUNDFXECHO8; +typedef struct IDirectSoundFXDistortion8 *LPDIRECTSOUNDFXDISTORTION8; +typedef struct IDirectSoundFXCompressor8 *LPDIRECTSOUNDFXCOMPRESSOR8; +typedef struct IDirectSoundFXParamEq8 *LPDIRECTSOUNDFXPARAMEQ8; +typedef struct IDirectSoundFXWavesReverb8 *LPDIRECTSOUNDFXWAVESREVERB8; +typedef struct IDirectSoundFXI3DL2Reverb8 *LPDIRECTSOUNDFXI3DL2REVERB8; +typedef struct IDirectSoundCaptureFXAec8 *LPDIRECTSOUNDCAPTUREFXAEC8; +typedef struct IDirectSoundCaptureFXNoiseSuppress8 *LPDIRECTSOUNDCAPTUREFXNOISESUPPRESS8; +typedef struct IDirectSoundFullDuplex8 *LPDIRECTSOUNDFULLDUPLEX8; + +#endif // DIRECTSOUND_VERSION >= 0x0800 + +// +// IID definitions for the unchanged DirectSound 8.0 interfaces +// + +#if DIRECTSOUND_VERSION >= 0x0800 +#define IID_IDirectSoundCapture8 IID_IDirectSoundCapture +#define IID_IDirectSound3DListener8 IID_IDirectSound3DListener +#define IID_IDirectSound3DBuffer8 IID_IDirectSound3DBuffer +#define IID_IDirectSoundNotify8 IID_IDirectSoundNotify +#define IID_IDirectSoundFXGargle8 IID_IDirectSoundFXGargle +#define IID_IDirectSoundFXChorus8 IID_IDirectSoundFXChorus +#define IID_IDirectSoundFXFlanger8 IID_IDirectSoundFXFlanger +#define IID_IDirectSoundFXEcho8 IID_IDirectSoundFXEcho +#define IID_IDirectSoundFXDistortion8 IID_IDirectSoundFXDistortion +#define IID_IDirectSoundFXCompressor8 IID_IDirectSoundFXCompressor +#define IID_IDirectSoundFXParamEq8 IID_IDirectSoundFXParamEq +#define IID_IDirectSoundFXWavesReverb8 IID_IDirectSoundFXWavesReverb +#define IID_IDirectSoundFXI3DL2Reverb8 IID_IDirectSoundFXI3DL2Reverb +#define IID_IDirectSoundCaptureFXAec8 IID_IDirectSoundCaptureFXAec +#define IID_IDirectSoundCaptureFXNoiseSuppress8 IID_IDirectSoundCaptureFXNoiseSuppress +#define IID_IDirectSoundFullDuplex8 IID_IDirectSoundFullDuplex +#endif // DIRECTSOUND_VERSION >= 0x0800 + +// +// Compatibility typedefs +// + +#ifndef _LPCWAVEFORMATEX_DEFINED +#define _LPCWAVEFORMATEX_DEFINED +typedef const WAVEFORMATEX *LPCWAVEFORMATEX; +#endif // _LPCWAVEFORMATEX_DEFINED + +#ifndef __LPCGUID_DEFINED__ +#define __LPCGUID_DEFINED__ +typedef const GUID *LPCGUID; +#endif // __LPCGUID_DEFINED__ + +typedef LPDIRECTSOUND *LPLPDIRECTSOUND; +typedef LPDIRECTSOUNDBUFFER *LPLPDIRECTSOUNDBUFFER; +typedef LPDIRECTSOUND3DLISTENER *LPLPDIRECTSOUND3DLISTENER; +typedef LPDIRECTSOUND3DBUFFER *LPLPDIRECTSOUND3DBUFFER; +typedef LPDIRECTSOUNDCAPTURE *LPLPDIRECTSOUNDCAPTURE; +typedef LPDIRECTSOUNDCAPTUREBUFFER *LPLPDIRECTSOUNDCAPTUREBUFFER; +typedef LPDIRECTSOUNDNOTIFY *LPLPDIRECTSOUNDNOTIFY; + +#if DIRECTSOUND_VERSION >= 0x0800 +typedef LPDIRECTSOUND8 *LPLPDIRECTSOUND8; +typedef LPDIRECTSOUNDBUFFER8 *LPLPDIRECTSOUNDBUFFER8; +typedef LPDIRECTSOUNDCAPTURE8 *LPLPDIRECTSOUNDCAPTURE8; +typedef LPDIRECTSOUNDCAPTUREBUFFER8 *LPLPDIRECTSOUNDCAPTUREBUFFER8; +#endif // DIRECTSOUND_VERSION >= 0x0800 + +// +// Structures +// + +typedef struct _DSCAPS +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwMinSecondarySampleRate; + DWORD dwMaxSecondarySampleRate; + DWORD dwPrimaryBuffers; + DWORD dwMaxHwMixingAllBuffers; + DWORD dwMaxHwMixingStaticBuffers; + DWORD dwMaxHwMixingStreamingBuffers; + DWORD dwFreeHwMixingAllBuffers; + DWORD dwFreeHwMixingStaticBuffers; + DWORD dwFreeHwMixingStreamingBuffers; + DWORD dwMaxHw3DAllBuffers; + DWORD dwMaxHw3DStaticBuffers; + DWORD dwMaxHw3DStreamingBuffers; + DWORD dwFreeHw3DAllBuffers; + DWORD dwFreeHw3DStaticBuffers; + DWORD dwFreeHw3DStreamingBuffers; + DWORD dwTotalHwMemBytes; + DWORD dwFreeHwMemBytes; + DWORD dwMaxContigFreeHwMemBytes; + DWORD dwUnlockTransferRateHwBuffers; + DWORD dwPlayCpuOverheadSwBuffers; + DWORD dwReserved1; + DWORD dwReserved2; +} DSCAPS, *LPDSCAPS; + +typedef const DSCAPS *LPCDSCAPS; + +typedef struct _DSBCAPS +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwBufferBytes; + DWORD dwUnlockTransferRate; + DWORD dwPlayCpuOverhead; +} DSBCAPS, *LPDSBCAPS; + +typedef const DSBCAPS *LPCDSBCAPS; + +#if DIRECTSOUND_VERSION >= 0x0800 + + typedef struct _DSEFFECTDESC + { + DWORD dwSize; + DWORD dwFlags; + GUID guidDSFXClass; + DWORD dwReserved1; + DWORD dwReserved2; + } DSEFFECTDESC, *LPDSEFFECTDESC; + typedef const DSEFFECTDESC *LPCDSEFFECTDESC; + + #define DSFX_LOCHARDWARE 0x00000001 + #define DSFX_LOCSOFTWARE 0x00000002 + + enum + { + DSFXR_PRESENT, // 0 + DSFXR_LOCHARDWARE, // 1 + DSFXR_LOCSOFTWARE, // 2 + DSFXR_UNALLOCATED, // 3 + DSFXR_FAILED, // 4 + DSFXR_UNKNOWN, // 5 + DSFXR_SENDLOOP // 6 + }; + + typedef struct _DSCEFFECTDESC + { + DWORD dwSize; + DWORD dwFlags; + GUID guidDSCFXClass; + GUID guidDSCFXInstance; + DWORD dwReserved1; + DWORD dwReserved2; + } DSCEFFECTDESC, *LPDSCEFFECTDESC; + typedef const DSCEFFECTDESC *LPCDSCEFFECTDESC; + + #define DSCFX_LOCHARDWARE 0x00000001 + #define DSCFX_LOCSOFTWARE 0x00000002 + + #define DSCFXR_LOCHARDWARE 0x00000010 + #define DSCFXR_LOCSOFTWARE 0x00000020 + #define DSCFXR_UNALLOCATED 0x00000040 + #define DSCFXR_FAILED 0x00000080 + #define DSCFXR_UNKNOWN 0x00000100 + +#endif // DIRECTSOUND_VERSION >= 0x0800 + +typedef struct _DSBUFFERDESC +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwBufferBytes; + DWORD dwReserved; + LPWAVEFORMATEX lpwfxFormat; +#if DIRECTSOUND_VERSION >= 0x0700 + GUID guid3DAlgorithm; +#endif +} DSBUFFERDESC, *LPDSBUFFERDESC; + +typedef const DSBUFFERDESC *LPCDSBUFFERDESC; + +// Older version of this structure: + +typedef struct _DSBUFFERDESC1 +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwBufferBytes; + DWORD dwReserved; + LPWAVEFORMATEX lpwfxFormat; +} DSBUFFERDESC1, *LPDSBUFFERDESC1; + +typedef const DSBUFFERDESC1 *LPCDSBUFFERDESC1; + +typedef struct _DS3DBUFFER +{ + DWORD dwSize; + D3DVECTOR vPosition; + D3DVECTOR vVelocity; + DWORD dwInsideConeAngle; + DWORD dwOutsideConeAngle; + D3DVECTOR vConeOrientation; + LONG lConeOutsideVolume; + D3DVALUE flMinDistance; + D3DVALUE flMaxDistance; + DWORD dwMode; +} DS3DBUFFER, *LPDS3DBUFFER; + +typedef const DS3DBUFFER *LPCDS3DBUFFER; + +typedef struct _DS3DLISTENER +{ + DWORD dwSize; + D3DVECTOR vPosition; + D3DVECTOR vVelocity; + D3DVECTOR vOrientFront; + D3DVECTOR vOrientTop; + D3DVALUE flDistanceFactor; + D3DVALUE flRolloffFactor; + D3DVALUE flDopplerFactor; +} DS3DLISTENER, *LPDS3DLISTENER; + +typedef const DS3DLISTENER *LPCDS3DLISTENER; + +typedef struct _DSCCAPS +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwFormats; + DWORD dwChannels; +} DSCCAPS, *LPDSCCAPS; + +typedef const DSCCAPS *LPCDSCCAPS; + +typedef struct _DSCBUFFERDESC1 +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwBufferBytes; + DWORD dwReserved; + LPWAVEFORMATEX lpwfxFormat; +} DSCBUFFERDESC1, *LPDSCBUFFERDESC1; + +typedef struct _DSCBUFFERDESC +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwBufferBytes; + DWORD dwReserved; + LPWAVEFORMATEX lpwfxFormat; +#if DIRECTSOUND_VERSION >= 0x0800 + DWORD dwFXCount; + LPDSCEFFECTDESC lpDSCFXDesc; +#endif +} DSCBUFFERDESC, *LPDSCBUFFERDESC; + +typedef const DSCBUFFERDESC *LPCDSCBUFFERDESC; + +typedef struct _DSCBCAPS +{ + DWORD dwSize; + DWORD dwFlags; + DWORD dwBufferBytes; + DWORD dwReserved; +} DSCBCAPS, *LPDSCBCAPS; + +typedef const DSCBCAPS *LPCDSCBCAPS; + +typedef struct _DSBPOSITIONNOTIFY +{ + DWORD dwOffset; + HANDLE hEventNotify; +} DSBPOSITIONNOTIFY, *LPDSBPOSITIONNOTIFY; + +typedef const DSBPOSITIONNOTIFY *LPCDSBPOSITIONNOTIFY; + +// +// DirectSound API +// + +typedef BOOL (CALLBACK *LPDSENUMCALLBACKA)(LPGUID, LPCSTR, LPCSTR, LPVOID); +typedef BOOL (CALLBACK *LPDSENUMCALLBACKW)(LPGUID, LPCWSTR, LPCWSTR, LPVOID); + +extern HRESULT WINAPI DirectSoundCreate(LPCGUID pcGuidDevice, LPDIRECTSOUND *ppDS, LPUNKNOWN pUnkOuter); +extern HRESULT WINAPI DirectSoundEnumerateA(LPDSENUMCALLBACKA pDSEnumCallback, LPVOID pContext); +extern HRESULT WINAPI DirectSoundEnumerateW(LPDSENUMCALLBACKW pDSEnumCallback, LPVOID pContext); + +extern HRESULT WINAPI DirectSoundCaptureCreate(LPCGUID pcGuidDevice, LPDIRECTSOUNDCAPTURE *ppDSC, LPUNKNOWN pUnkOuter); +extern HRESULT WINAPI DirectSoundCaptureEnumerateA(LPDSENUMCALLBACKA pDSEnumCallback, LPVOID pContext); +extern HRESULT WINAPI DirectSoundCaptureEnumerateW(LPDSENUMCALLBACKW pDSEnumCallback, LPVOID pContext); + +#if DIRECTSOUND_VERSION >= 0x0800 +extern HRESULT WINAPI DirectSoundCreate8(LPCGUID pcGuidDevice, LPDIRECTSOUND8 *ppDS8, LPUNKNOWN pUnkOuter); +extern HRESULT WINAPI DirectSoundCaptureCreate8(LPCGUID pcGuidDevice, LPDIRECTSOUNDCAPTURE8 *ppDSC8, LPUNKNOWN pUnkOuter); +extern HRESULT WINAPI DirectSoundFullDuplexCreate(LPCGUID pcGuidCaptureDevice, LPCGUID pcGuidRenderDevice, + LPCDSCBUFFERDESC pcDSCBufferDesc, LPCDSBUFFERDESC pcDSBufferDesc, HWND hWnd, + DWORD dwLevel, LPDIRECTSOUNDFULLDUPLEX* ppDSFD, LPDIRECTSOUNDCAPTUREBUFFER8 *ppDSCBuffer8, + LPDIRECTSOUNDBUFFER8 *ppDSBuffer8, LPUNKNOWN pUnkOuter); +#define DirectSoundFullDuplexCreate8 DirectSoundFullDuplexCreate + +extern HRESULT WINAPI GetDeviceID(LPCGUID pGuidSrc, LPGUID pGuidDest); +#endif // DIRECTSOUND_VERSION >= 0x0800 + +#ifdef UNICODE +#define LPDSENUMCALLBACK LPDSENUMCALLBACKW +#define DirectSoundEnumerate DirectSoundEnumerateW +#define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateW +#else // UNICODE +#define LPDSENUMCALLBACK LPDSENUMCALLBACKA +#define DirectSoundEnumerate DirectSoundEnumerateA +#define DirectSoundCaptureEnumerate DirectSoundCaptureEnumerateA +#endif // UNICODE + +// +// IUnknown +// + +#if !defined(__cplusplus) || defined(CINTERFACE) +#ifndef IUnknown_QueryInterface +#define IUnknown_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#endif // IUnknown_QueryInterface +#ifndef IUnknown_AddRef +#define IUnknown_AddRef(p) (p)->lpVtbl->AddRef(p) +#endif // IUnknown_AddRef +#ifndef IUnknown_Release +#define IUnknown_Release(p) (p)->lpVtbl->Release(p) +#endif // IUnknown_Release +#else // !defined(__cplusplus) || defined(CINTERFACE) +#ifndef IUnknown_QueryInterface +#define IUnknown_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#endif // IUnknown_QueryInterface +#ifndef IUnknown_AddRef +#define IUnknown_AddRef(p) (p)->AddRef() +#endif // IUnknown_AddRef +#ifndef IUnknown_Release +#define IUnknown_Release(p) (p)->Release() +#endif // IUnknown_Release +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +#ifndef __IReferenceClock_INTERFACE_DEFINED__ +#define __IReferenceClock_INTERFACE_DEFINED__ + +typedef LONGLONG REFERENCE_TIME; +typedef REFERENCE_TIME *LPREFERENCE_TIME; + +DEFINE_GUID(IID_IReferenceClock, 0x56a86897, 0x0ad4, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); + +#undef INTERFACE +#define INTERFACE IReferenceClock + +DECLARE_INTERFACE_(IReferenceClock, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IReferenceClock methods + STDMETHOD(GetTime) (THIS_ REFERENCE_TIME *pTime) PURE; + STDMETHOD(AdviseTime) (THIS_ REFERENCE_TIME rtBaseTime, REFERENCE_TIME rtStreamTime, + HANDLE hEvent, LPDWORD pdwAdviseCookie) PURE; + STDMETHOD(AdvisePeriodic) (THIS_ REFERENCE_TIME rtStartTime, REFERENCE_TIME rtPeriodTime, + HANDLE hSemaphore, LPDWORD pdwAdviseCookie) PURE; + STDMETHOD(Unadvise) (THIS_ DWORD dwAdviseCookie) PURE; +}; + +#endif // __IReferenceClock_INTERFACE_DEFINED__ + +#ifndef IReferenceClock_QueryInterface + +#define IReferenceClock_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IReferenceClock_AddRef(p) IUnknown_AddRef(p) +#define IReferenceClock_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IReferenceClock_GetTime(p,a) (p)->lpVtbl->GetTime(p,a) +#define IReferenceClock_AdviseTime(p,a,b,c,d) (p)->lpVtbl->AdviseTime(p,a,b,c,d) +#define IReferenceClock_AdvisePeriodic(p,a,b,c,d) (p)->lpVtbl->AdvisePeriodic(p,a,b,c,d) +#define IReferenceClock_Unadvise(p,a) (p)->lpVtbl->Unadvise(p,a) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IReferenceClock_GetTime(p,a) (p)->GetTime(a) +#define IReferenceClock_AdviseTime(p,a,b,c,d) (p)->AdviseTime(a,b,c,d) +#define IReferenceClock_AdvisePeriodic(p,a,b,c,d) (p)->AdvisePeriodic(a,b,c,d) +#define IReferenceClock_Unadvise(p,a) (p)->Unadvise(a) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +#endif // IReferenceClock_QueryInterface + +// +// IDirectSound +// + +DEFINE_GUID(IID_IDirectSound, 0x279AFA83, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60); + +#undef INTERFACE +#define INTERFACE IDirectSound + +DECLARE_INTERFACE_(IDirectSound, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSound methods + STDMETHOD(CreateSoundBuffer) (THIS_ LPCDSBUFFERDESC pcDSBufferDesc, LPDIRECTSOUNDBUFFER *ppDSBuffer, LPUNKNOWN pUnkOuter) PURE; + STDMETHOD(GetCaps) (THIS_ LPDSCAPS pDSCaps) PURE; + STDMETHOD(DuplicateSoundBuffer) (THIS_ LPDIRECTSOUNDBUFFER pDSBufferOriginal, LPDIRECTSOUNDBUFFER *ppDSBufferDuplicate) PURE; + STDMETHOD(SetCooperativeLevel) (THIS_ HWND hwnd, DWORD dwLevel) PURE; + STDMETHOD(Compact) (THIS) PURE; + STDMETHOD(GetSpeakerConfig) (THIS_ LPDWORD pdwSpeakerConfig) PURE; + STDMETHOD(SetSpeakerConfig) (THIS_ DWORD dwSpeakerConfig) PURE; + STDMETHOD(Initialize) (THIS_ LPCGUID pcGuidDevice) PURE; +}; + +#define IDirectSound_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSound_AddRef(p) IUnknown_AddRef(p) +#define IDirectSound_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->lpVtbl->CreateSoundBuffer(p,a,b,c) +#define IDirectSound_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->lpVtbl->DuplicateSoundBuffer(p,a,b) +#define IDirectSound_SetCooperativeLevel(p,a,b) (p)->lpVtbl->SetCooperativeLevel(p,a,b) +#define IDirectSound_Compact(p) (p)->lpVtbl->Compact(p) +#define IDirectSound_GetSpeakerConfig(p,a) (p)->lpVtbl->GetSpeakerConfig(p,a) +#define IDirectSound_SetSpeakerConfig(p,b) (p)->lpVtbl->SetSpeakerConfig(p,b) +#define IDirectSound_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSound_CreateSoundBuffer(p,a,b,c) (p)->CreateSoundBuffer(a,b,c) +#define IDirectSound_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectSound_DuplicateSoundBuffer(p,a,b) (p)->DuplicateSoundBuffer(a,b) +#define IDirectSound_SetCooperativeLevel(p,a,b) (p)->SetCooperativeLevel(a,b) +#define IDirectSound_Compact(p) (p)->Compact() +#define IDirectSound_GetSpeakerConfig(p,a) (p)->GetSpeakerConfig(a) +#define IDirectSound_SetSpeakerConfig(p,b) (p)->SetSpeakerConfig(b) +#define IDirectSound_Initialize(p,a) (p)->Initialize(a) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +#if DIRECTSOUND_VERSION >= 0x0800 + +// +// IDirectSound8 +// + +DEFINE_GUID(IID_IDirectSound8, 0xC50A7E93, 0xF395, 0x4834, 0x9E, 0xF6, 0x7F, 0xA9, 0x9D, 0xE5, 0x09, 0x66); + +#undef INTERFACE +#define INTERFACE IDirectSound8 + +DECLARE_INTERFACE_(IDirectSound8, IDirectSound) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSound methods + STDMETHOD(CreateSoundBuffer) (THIS_ LPCDSBUFFERDESC pcDSBufferDesc, LPDIRECTSOUNDBUFFER *ppDSBuffer, LPUNKNOWN pUnkOuter) PURE; + STDMETHOD(GetCaps) (THIS_ LPDSCAPS pDSCaps) PURE; + STDMETHOD(DuplicateSoundBuffer) (THIS_ LPDIRECTSOUNDBUFFER pDSBufferOriginal, LPDIRECTSOUNDBUFFER *ppDSBufferDuplicate) PURE; + STDMETHOD(SetCooperativeLevel) (THIS_ HWND hwnd, DWORD dwLevel) PURE; + STDMETHOD(Compact) (THIS) PURE; + STDMETHOD(GetSpeakerConfig) (THIS_ LPDWORD pdwSpeakerConfig) PURE; + STDMETHOD(SetSpeakerConfig) (THIS_ DWORD dwSpeakerConfig) PURE; + STDMETHOD(Initialize) (THIS_ LPCGUID pcGuidDevice) PURE; + + // IDirectSound8 methods + STDMETHOD(VerifyCertification) (THIS_ LPDWORD pdwCertified) PURE; +}; + +#define IDirectSound8_QueryInterface(p,a,b) IDirectSound_QueryInterface(p,a,b) +#define IDirectSound8_AddRef(p) IDirectSound_AddRef(p) +#define IDirectSound8_Release(p) IDirectSound_Release(p) +#define IDirectSound8_CreateSoundBuffer(p,a,b,c) IDirectSound_CreateSoundBuffer(p,a,b,c) +#define IDirectSound8_GetCaps(p,a) IDirectSound_GetCaps(p,a) +#define IDirectSound8_DuplicateSoundBuffer(p,a,b) IDirectSound_DuplicateSoundBuffer(p,a,b) +#define IDirectSound8_SetCooperativeLevel(p,a,b) IDirectSound_SetCooperativeLevel(p,a,b) +#define IDirectSound8_Compact(p) IDirectSound_Compact(p) +#define IDirectSound8_GetSpeakerConfig(p,a) IDirectSound_GetSpeakerConfig(p,a) +#define IDirectSound8_SetSpeakerConfig(p,a) IDirectSound_SetSpeakerConfig(p,a) +#define IDirectSound8_Initialize(p,a) IDirectSound_Initialize(p,a) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSound8_VerifyCertification(p,a) (p)->lpVtbl->VerifyCertification(p,a) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSound8_VerifyCertification(p,a) (p)->VerifyCertification(a) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +#endif // DIRECTSOUND_VERSION >= 0x0800 + +// +// IDirectSoundBuffer +// + +DEFINE_GUID(IID_IDirectSoundBuffer, 0x279AFA85, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60); + +#undef INTERFACE +#define INTERFACE IDirectSoundBuffer + +DECLARE_INTERFACE_(IDirectSoundBuffer, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundBuffer methods + STDMETHOD(GetCaps) (THIS_ LPDSBCAPS pDSBufferCaps) PURE; + STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD pdwCurrentPlayCursor, LPDWORD pdwCurrentWriteCursor) PURE; + STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE; + STDMETHOD(GetVolume) (THIS_ LPLONG plVolume) PURE; + STDMETHOD(GetPan) (THIS_ LPLONG plPan) PURE; + STDMETHOD(GetFrequency) (THIS_ LPDWORD pdwFrequency) PURE; + STDMETHOD(GetStatus) (THIS_ LPDWORD pdwStatus) PURE; + STDMETHOD(Initialize) (THIS_ LPDIRECTSOUND pDirectSound, LPCDSBUFFERDESC pcDSBufferDesc) PURE; + STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, + LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE; + STDMETHOD(Play) (THIS_ DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags) PURE; + STDMETHOD(SetCurrentPosition) (THIS_ DWORD dwNewPosition) PURE; + STDMETHOD(SetFormat) (THIS_ LPCWAVEFORMATEX pcfxFormat) PURE; + STDMETHOD(SetVolume) (THIS_ LONG lVolume) PURE; + STDMETHOD(SetPan) (THIS_ LONG lPan) PURE; + STDMETHOD(SetFrequency) (THIS_ DWORD dwFrequency) PURE; + STDMETHOD(Stop) (THIS) PURE; + STDMETHOD(Unlock) (THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE; + STDMETHOD(Restore) (THIS) PURE; +}; + +#define IDirectSoundBuffer_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundBuffer_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundBuffer_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b) +#define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c) +#define IDirectSoundBuffer_GetVolume(p,a) (p)->lpVtbl->GetVolume(p,a) +#define IDirectSoundBuffer_GetPan(p,a) (p)->lpVtbl->GetPan(p,a) +#define IDirectSoundBuffer_GetFrequency(p,a) (p)->lpVtbl->GetFrequency(p,a) +#define IDirectSoundBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a) +#define IDirectSoundBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g) +#define IDirectSoundBuffer_Play(p,a,b,c) (p)->lpVtbl->Play(p,a,b,c) +#define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->lpVtbl->SetCurrentPosition(p,a) +#define IDirectSoundBuffer_SetFormat(p,a) (p)->lpVtbl->SetFormat(p,a) +#define IDirectSoundBuffer_SetVolume(p,a) (p)->lpVtbl->SetVolume(p,a) +#define IDirectSoundBuffer_SetPan(p,a) (p)->lpVtbl->SetPan(p,a) +#define IDirectSoundBuffer_SetFrequency(p,a) (p)->lpVtbl->SetFrequency(p,a) +#define IDirectSoundBuffer_Stop(p) (p)->lpVtbl->Stop(p) +#define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d) +#define IDirectSoundBuffer_Restore(p) (p)->lpVtbl->Restore(p) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundBuffer_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectSoundBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b) +#define IDirectSoundBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c) +#define IDirectSoundBuffer_GetVolume(p,a) (p)->GetVolume(a) +#define IDirectSoundBuffer_GetPan(p,a) (p)->GetPan(a) +#define IDirectSoundBuffer_GetFrequency(p,a) (p)->GetFrequency(a) +#define IDirectSoundBuffer_GetStatus(p,a) (p)->GetStatus(a) +#define IDirectSoundBuffer_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g) +#define IDirectSoundBuffer_Play(p,a,b,c) (p)->Play(a,b,c) +#define IDirectSoundBuffer_SetCurrentPosition(p,a) (p)->SetCurrentPosition(a) +#define IDirectSoundBuffer_SetFormat(p,a) (p)->SetFormat(a) +#define IDirectSoundBuffer_SetVolume(p,a) (p)->SetVolume(a) +#define IDirectSoundBuffer_SetPan(p,a) (p)->SetPan(a) +#define IDirectSoundBuffer_SetFrequency(p,a) (p)->SetFrequency(a) +#define IDirectSoundBuffer_Stop(p) (p)->Stop() +#define IDirectSoundBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d) +#define IDirectSoundBuffer_Restore(p) (p)->Restore() +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +#if DIRECTSOUND_VERSION >= 0x0800 + +// +// IDirectSoundBuffer8 +// + +DEFINE_GUID(IID_IDirectSoundBuffer8, 0x6825a449, 0x7524, 0x4d82, 0x92, 0x0f, 0x50, 0xe3, 0x6a, 0xb3, 0xab, 0x1e); + +#undef INTERFACE +#define INTERFACE IDirectSoundBuffer8 + +DECLARE_INTERFACE_(IDirectSoundBuffer8, IDirectSoundBuffer) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundBuffer methods + STDMETHOD(GetCaps) (THIS_ LPDSBCAPS pDSBufferCaps) PURE; + STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD pdwCurrentPlayCursor, LPDWORD pdwCurrentWriteCursor) PURE; + STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE; + STDMETHOD(GetVolume) (THIS_ LPLONG plVolume) PURE; + STDMETHOD(GetPan) (THIS_ LPLONG plPan) PURE; + STDMETHOD(GetFrequency) (THIS_ LPDWORD pdwFrequency) PURE; + STDMETHOD(GetStatus) (THIS_ LPDWORD pdwStatus) PURE; + STDMETHOD(Initialize) (THIS_ LPDIRECTSOUND pDirectSound, LPCDSBUFFERDESC pcDSBufferDesc) PURE; + STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, + LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE; + STDMETHOD(Play) (THIS_ DWORD dwReserved1, DWORD dwPriority, DWORD dwFlags) PURE; + STDMETHOD(SetCurrentPosition) (THIS_ DWORD dwNewPosition) PURE; + STDMETHOD(SetFormat) (THIS_ LPCWAVEFORMATEX pcfxFormat) PURE; + STDMETHOD(SetVolume) (THIS_ LONG lVolume) PURE; + STDMETHOD(SetPan) (THIS_ LONG lPan) PURE; + STDMETHOD(SetFrequency) (THIS_ DWORD dwFrequency) PURE; + STDMETHOD(Stop) (THIS) PURE; + STDMETHOD(Unlock) (THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE; + STDMETHOD(Restore) (THIS) PURE; + + // IDirectSoundBuffer8 methods + STDMETHOD(SetFX) (THIS_ DWORD dwEffectsCount, LPDSEFFECTDESC pDSFXDesc, LPDWORD pdwResultCodes) PURE; + STDMETHOD(AcquireResources) (THIS_ DWORD dwFlags, DWORD dwEffectsCount, LPDWORD pdwResultCodes) PURE; + STDMETHOD(GetObjectInPath) (THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE; +}; + +// Special GUID meaning "select all objects" for use in GetObjectInPath() +DEFINE_GUID(GUID_All_Objects, 0xaa114de5, 0xc262, 0x4169, 0xa1, 0xc8, 0x23, 0xd6, 0x98, 0xcc, 0x73, 0xb5); + +#define IDirectSoundBuffer8_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundBuffer8_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundBuffer8_Release(p) IUnknown_Release(p) + +#define IDirectSoundBuffer8_GetCaps(p,a) IDirectSoundBuffer_GetCaps(p,a) +#define IDirectSoundBuffer8_GetCurrentPosition(p,a,b) IDirectSoundBuffer_GetCurrentPosition(p,a,b) +#define IDirectSoundBuffer8_GetFormat(p,a,b,c) IDirectSoundBuffer_GetFormat(p,a,b,c) +#define IDirectSoundBuffer8_GetVolume(p,a) IDirectSoundBuffer_GetVolume(p,a) +#define IDirectSoundBuffer8_GetPan(p,a) IDirectSoundBuffer_GetPan(p,a) +#define IDirectSoundBuffer8_GetFrequency(p,a) IDirectSoundBuffer_GetFrequency(p,a) +#define IDirectSoundBuffer8_GetStatus(p,a) IDirectSoundBuffer_GetStatus(p,a) +#define IDirectSoundBuffer8_Initialize(p,a,b) IDirectSoundBuffer_Initialize(p,a,b) +#define IDirectSoundBuffer8_Lock(p,a,b,c,d,e,f,g) IDirectSoundBuffer_Lock(p,a,b,c,d,e,f,g) +#define IDirectSoundBuffer8_Play(p,a,b,c) IDirectSoundBuffer_Play(p,a,b,c) +#define IDirectSoundBuffer8_SetCurrentPosition(p,a) IDirectSoundBuffer_SetCurrentPosition(p,a) +#define IDirectSoundBuffer8_SetFormat(p,a) IDirectSoundBuffer_SetFormat(p,a) +#define IDirectSoundBuffer8_SetVolume(p,a) IDirectSoundBuffer_SetVolume(p,a) +#define IDirectSoundBuffer8_SetPan(p,a) IDirectSoundBuffer_SetPan(p,a) +#define IDirectSoundBuffer8_SetFrequency(p,a) IDirectSoundBuffer_SetFrequency(p,a) +#define IDirectSoundBuffer8_Stop(p) IDirectSoundBuffer_Stop(p) +#define IDirectSoundBuffer8_Unlock(p,a,b,c,d) IDirectSoundBuffer_Unlock(p,a,b,c,d) +#define IDirectSoundBuffer8_Restore(p) IDirectSoundBuffer_Restore(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->lpVtbl->SetFX(p,a,b,c) +#define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->lpVtbl->AcquireResources(p,a,b,c) +#define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundBuffer8_SetFX(p,a,b,c) (p)->SetFX(a,b,c) +#define IDirectSoundBuffer8_AcquireResources(p,a,b,c) (p)->AcquireResources(a,b,c) +#define IDirectSoundBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +#endif // DIRECTSOUND_VERSION >= 0x0800 + +// +// IDirectSound3DListener +// + +DEFINE_GUID(IID_IDirectSound3DListener, 0x279AFA84, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60); + +#undef INTERFACE +#define INTERFACE IDirectSound3DListener + +DECLARE_INTERFACE_(IDirectSound3DListener, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSound3DListener methods + STDMETHOD(GetAllParameters) (THIS_ LPDS3DLISTENER pListener) PURE; + STDMETHOD(GetDistanceFactor) (THIS_ D3DVALUE* pflDistanceFactor) PURE; + STDMETHOD(GetDopplerFactor) (THIS_ D3DVALUE* pflDopplerFactor) PURE; + STDMETHOD(GetOrientation) (THIS_ D3DVECTOR* pvOrientFront, D3DVECTOR* pvOrientTop) PURE; + STDMETHOD(GetPosition) (THIS_ D3DVECTOR* pvPosition) PURE; + STDMETHOD(GetRolloffFactor) (THIS_ D3DVALUE* pflRolloffFactor) PURE; + STDMETHOD(GetVelocity) (THIS_ D3DVECTOR* pvVelocity) PURE; + STDMETHOD(SetAllParameters) (THIS_ LPCDS3DLISTENER pcListener, DWORD dwApply) PURE; + STDMETHOD(SetDistanceFactor) (THIS_ D3DVALUE flDistanceFactor, DWORD dwApply) PURE; + STDMETHOD(SetDopplerFactor) (THIS_ D3DVALUE flDopplerFactor, DWORD dwApply) PURE; + STDMETHOD(SetOrientation) (THIS_ D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront, + D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop, DWORD dwApply) PURE; + STDMETHOD(SetPosition) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; + STDMETHOD(SetRolloffFactor) (THIS_ D3DVALUE flRolloffFactor, DWORD dwApply) PURE; + STDMETHOD(SetVelocity) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; + STDMETHOD(CommitDeferredSettings) (THIS) PURE; +}; + +#define IDirectSound3DListener_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSound3DListener_AddRef(p) IUnknown_AddRef(p) +#define IDirectSound3DListener_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSound3DListener_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) +#define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->lpVtbl->GetDistanceFactor(p,a) +#define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->lpVtbl->GetDopplerFactor(p,a) +#define IDirectSound3DListener_GetOrientation(p,a,b) (p)->lpVtbl->GetOrientation(p,a,b) +#define IDirectSound3DListener_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a) +#define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->lpVtbl->GetRolloffFactor(p,a) +#define IDirectSound3DListener_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a) +#define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b) +#define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->lpVtbl->SetDistanceFactor(p,a,b) +#define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->lpVtbl->SetDopplerFactor(p,a,b) +#define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->lpVtbl->SetOrientation(p,a,b,c,d,e,f,g) +#define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d) +#define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->lpVtbl->SetRolloffFactor(p,a,b) +#define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d) +#define IDirectSound3DListener_CommitDeferredSettings(p) (p)->lpVtbl->CommitDeferredSettings(p) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSound3DListener_GetAllParameters(p,a) (p)->GetAllParameters(a) +#define IDirectSound3DListener_GetDistanceFactor(p,a) (p)->GetDistanceFactor(a) +#define IDirectSound3DListener_GetDopplerFactor(p,a) (p)->GetDopplerFactor(a) +#define IDirectSound3DListener_GetOrientation(p,a,b) (p)->GetOrientation(a,b) +#define IDirectSound3DListener_GetPosition(p,a) (p)->GetPosition(a) +#define IDirectSound3DListener_GetRolloffFactor(p,a) (p)->GetRolloffFactor(a) +#define IDirectSound3DListener_GetVelocity(p,a) (p)->GetVelocity(a) +#define IDirectSound3DListener_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b) +#define IDirectSound3DListener_SetDistanceFactor(p,a,b) (p)->SetDistanceFactor(a,b) +#define IDirectSound3DListener_SetDopplerFactor(p,a,b) (p)->SetDopplerFactor(a,b) +#define IDirectSound3DListener_SetOrientation(p,a,b,c,d,e,f,g) (p)->SetOrientation(a,b,c,d,e,f,g) +#define IDirectSound3DListener_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d) +#define IDirectSound3DListener_SetRolloffFactor(p,a,b) (p)->SetRolloffFactor(a,b) +#define IDirectSound3DListener_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d) +#define IDirectSound3DListener_CommitDeferredSettings(p) (p)->CommitDeferredSettings() +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +// +// IDirectSound3DBuffer +// + +DEFINE_GUID(IID_IDirectSound3DBuffer, 0x279AFA86, 0x4981, 0x11CE, 0xA5, 0x21, 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60); + +#undef INTERFACE +#define INTERFACE IDirectSound3DBuffer + +DECLARE_INTERFACE_(IDirectSound3DBuffer, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSound3DBuffer methods + STDMETHOD(GetAllParameters) (THIS_ LPDS3DBUFFER pDs3dBuffer) PURE; + STDMETHOD(GetConeAngles) (THIS_ LPDWORD pdwInsideConeAngle, LPDWORD pdwOutsideConeAngle) PURE; + STDMETHOD(GetConeOrientation) (THIS_ D3DVECTOR* pvOrientation) PURE; + STDMETHOD(GetConeOutsideVolume) (THIS_ LPLONG plConeOutsideVolume) PURE; + STDMETHOD(GetMaxDistance) (THIS_ D3DVALUE* pflMaxDistance) PURE; + STDMETHOD(GetMinDistance) (THIS_ D3DVALUE* pflMinDistance) PURE; + STDMETHOD(GetMode) (THIS_ LPDWORD pdwMode) PURE; + STDMETHOD(GetPosition) (THIS_ D3DVECTOR* pvPosition) PURE; + STDMETHOD(GetVelocity) (THIS_ D3DVECTOR* pvVelocity) PURE; + STDMETHOD(SetAllParameters) (THIS_ LPCDS3DBUFFER pcDs3dBuffer, DWORD dwApply) PURE; + STDMETHOD(SetConeAngles) (THIS_ DWORD dwInsideConeAngle, DWORD dwOutsideConeAngle, DWORD dwApply) PURE; + STDMETHOD(SetConeOrientation) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; + STDMETHOD(SetConeOutsideVolume) (THIS_ LONG lConeOutsideVolume, DWORD dwApply) PURE; + STDMETHOD(SetMaxDistance) (THIS_ D3DVALUE flMaxDistance, DWORD dwApply) PURE; + STDMETHOD(SetMinDistance) (THIS_ D3DVALUE flMinDistance, DWORD dwApply) PURE; + STDMETHOD(SetMode) (THIS_ DWORD dwMode, DWORD dwApply) PURE; + STDMETHOD(SetPosition) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; + STDMETHOD(SetVelocity) (THIS_ D3DVALUE x, D3DVALUE y, D3DVALUE z, DWORD dwApply) PURE; +}; + +#define IDirectSound3DBuffer_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSound3DBuffer_AddRef(p) IUnknown_AddRef(p) +#define IDirectSound3DBuffer_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) +#define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->lpVtbl->GetConeAngles(p,a,b) +#define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->lpVtbl->GetConeOrientation(p,a) +#define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->lpVtbl->GetConeOutsideVolume(p,a) +#define IDirectSound3DBuffer_GetPosition(p,a) (p)->lpVtbl->GetPosition(p,a) +#define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->lpVtbl->GetMinDistance(p,a) +#define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->lpVtbl->GetMaxDistance(p,a) +#define IDirectSound3DBuffer_GetMode(p,a) (p)->lpVtbl->GetMode(p,a) +#define IDirectSound3DBuffer_GetVelocity(p,a) (p)->lpVtbl->GetVelocity(p,a) +#define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->lpVtbl->SetAllParameters(p,a,b) +#define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->lpVtbl->SetConeAngles(p,a,b,c) +#define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->lpVtbl->SetConeOrientation(p,a,b,c,d) +#define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->lpVtbl->SetConeOutsideVolume(p,a,b) +#define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->lpVtbl->SetPosition(p,a,b,c,d) +#define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->lpVtbl->SetMinDistance(p,a,b) +#define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->lpVtbl->SetMaxDistance(p,a,b) +#define IDirectSound3DBuffer_SetMode(p,a,b) (p)->lpVtbl->SetMode(p,a,b) +#define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->lpVtbl->SetVelocity(p,a,b,c,d) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSound3DBuffer_GetAllParameters(p,a) (p)->GetAllParameters(a) +#define IDirectSound3DBuffer_GetConeAngles(p,a,b) (p)->GetConeAngles(a,b) +#define IDirectSound3DBuffer_GetConeOrientation(p,a) (p)->GetConeOrientation(a) +#define IDirectSound3DBuffer_GetConeOutsideVolume(p,a) (p)->GetConeOutsideVolume(a) +#define IDirectSound3DBuffer_GetPosition(p,a) (p)->GetPosition(a) +#define IDirectSound3DBuffer_GetMinDistance(p,a) (p)->GetMinDistance(a) +#define IDirectSound3DBuffer_GetMaxDistance(p,a) (p)->GetMaxDistance(a) +#define IDirectSound3DBuffer_GetMode(p,a) (p)->GetMode(a) +#define IDirectSound3DBuffer_GetVelocity(p,a) (p)->GetVelocity(a) +#define IDirectSound3DBuffer_SetAllParameters(p,a,b) (p)->SetAllParameters(a,b) +#define IDirectSound3DBuffer_SetConeAngles(p,a,b,c) (p)->SetConeAngles(a,b,c) +#define IDirectSound3DBuffer_SetConeOrientation(p,a,b,c,d) (p)->SetConeOrientation(a,b,c,d) +#define IDirectSound3DBuffer_SetConeOutsideVolume(p,a,b) (p)->SetConeOutsideVolume(a,b) +#define IDirectSound3DBuffer_SetPosition(p,a,b,c,d) (p)->SetPosition(a,b,c,d) +#define IDirectSound3DBuffer_SetMinDistance(p,a,b) (p)->SetMinDistance(a,b) +#define IDirectSound3DBuffer_SetMaxDistance(p,a,b) (p)->SetMaxDistance(a,b) +#define IDirectSound3DBuffer_SetMode(p,a,b) (p)->SetMode(a,b) +#define IDirectSound3DBuffer_SetVelocity(p,a,b,c,d) (p)->SetVelocity(a,b,c,d) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +// +// IDirectSoundCapture +// + +DEFINE_GUID(IID_IDirectSoundCapture, 0xb0210781, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16); + +#undef INTERFACE +#define INTERFACE IDirectSoundCapture + +DECLARE_INTERFACE_(IDirectSoundCapture, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundCapture methods + STDMETHOD(CreateCaptureBuffer) (THIS_ LPCDSCBUFFERDESC pcDSCBufferDesc, LPDIRECTSOUNDCAPTUREBUFFER *ppDSCBuffer, LPUNKNOWN pUnkOuter) PURE; + STDMETHOD(GetCaps) (THIS_ LPDSCCAPS pDSCCaps) PURE; + STDMETHOD(Initialize) (THIS_ LPCGUID pcGuidDevice) PURE; +}; + +#define IDirectSoundCapture_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundCapture_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundCapture_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->lpVtbl->CreateCaptureBuffer(p,a,b,c) +#define IDirectSoundCapture_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectSoundCapture_Initialize(p,a) (p)->lpVtbl->Initialize(p,a) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundCapture_CreateCaptureBuffer(p,a,b,c) (p)->CreateCaptureBuffer(a,b,c) +#define IDirectSoundCapture_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectSoundCapture_Initialize(p,a) (p)->Initialize(a) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +// +// IDirectSoundCaptureBuffer +// + +DEFINE_GUID(IID_IDirectSoundCaptureBuffer, 0xb0210782, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16); + +#undef INTERFACE +#define INTERFACE IDirectSoundCaptureBuffer + +DECLARE_INTERFACE_(IDirectSoundCaptureBuffer, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundCaptureBuffer methods + STDMETHOD(GetCaps) (THIS_ LPDSCBCAPS pDSCBCaps) PURE; + STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD pdwCapturePosition, LPDWORD pdwReadPosition) PURE; + STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE; + STDMETHOD(GetStatus) (THIS_ LPDWORD pdwStatus) PURE; + STDMETHOD(Initialize) (THIS_ LPDIRECTSOUNDCAPTURE pDirectSoundCapture, LPCDSCBUFFERDESC pcDSCBufferDesc) PURE; + STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, + LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE; + STDMETHOD(Start) (THIS_ DWORD dwFlags) PURE; + STDMETHOD(Stop) (THIS) PURE; + STDMETHOD(Unlock) (THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE; +}; + +#define IDirectSoundCaptureBuffer_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundCaptureBuffer_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundCaptureBuffer_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->lpVtbl->GetCurrentPosition(p,a,b) +#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c) +#define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->lpVtbl->GetStatus(p,a) +#define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->lpVtbl->Initialize(p,a,b) +#define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->lpVtbl->Lock(p,a,b,c,d,e,f,g) +#define IDirectSoundCaptureBuffer_Start(p,a) (p)->lpVtbl->Start(p,a) +#define IDirectSoundCaptureBuffer_Stop(p) (p)->lpVtbl->Stop(p) +#define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->lpVtbl->Unlock(p,a,b,c,d) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundCaptureBuffer_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) (p)->GetCurrentPosition(a,b) +#define IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) (p)->GetFormat(a,b,c) +#define IDirectSoundCaptureBuffer_GetStatus(p,a) (p)->GetStatus(a) +#define IDirectSoundCaptureBuffer_Initialize(p,a,b) (p)->Initialize(a,b) +#define IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) (p)->Lock(a,b,c,d,e,f,g) +#define IDirectSoundCaptureBuffer_Start(p,a) (p)->Start(a) +#define IDirectSoundCaptureBuffer_Stop(p) (p)->Stop() +#define IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) (p)->Unlock(a,b,c,d) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + + +#if DIRECTSOUND_VERSION >= 0x0800 + +// +// IDirectSoundCaptureBuffer8 +// + +DEFINE_GUID(IID_IDirectSoundCaptureBuffer8, 0x990df4, 0xdbb, 0x4872, 0x83, 0x3e, 0x6d, 0x30, 0x3e, 0x80, 0xae, 0xb6); + +#undef INTERFACE +#define INTERFACE IDirectSoundCaptureBuffer8 + +DECLARE_INTERFACE_(IDirectSoundCaptureBuffer8, IDirectSoundCaptureBuffer) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundCaptureBuffer methods + STDMETHOD(GetCaps) (THIS_ LPDSCBCAPS pDSCBCaps) PURE; + STDMETHOD(GetCurrentPosition) (THIS_ LPDWORD pdwCapturePosition, LPDWORD pdwReadPosition) PURE; + STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pwfxFormat, DWORD dwSizeAllocated, LPDWORD pdwSizeWritten) PURE; + STDMETHOD(GetStatus) (THIS_ LPDWORD pdwStatus) PURE; + STDMETHOD(Initialize) (THIS_ LPDIRECTSOUNDCAPTURE pDirectSoundCapture, LPCDSCBUFFERDESC pcDSCBufferDesc) PURE; + STDMETHOD(Lock) (THIS_ DWORD dwOffset, DWORD dwBytes, LPVOID *ppvAudioPtr1, LPDWORD pdwAudioBytes1, + LPVOID *ppvAudioPtr2, LPDWORD pdwAudioBytes2, DWORD dwFlags) PURE; + STDMETHOD(Start) (THIS_ DWORD dwFlags) PURE; + STDMETHOD(Stop) (THIS) PURE; + STDMETHOD(Unlock) (THIS_ LPVOID pvAudioPtr1, DWORD dwAudioBytes1, LPVOID pvAudioPtr2, DWORD dwAudioBytes2) PURE; + + // IDirectSoundCaptureBuffer8 methods + STDMETHOD(GetObjectInPath) (THIS_ REFGUID rguidObject, DWORD dwIndex, REFGUID rguidInterface, LPVOID *ppObject) PURE; + STDMETHOD(GetFXStatus) (DWORD dwFXCount, LPDWORD pdwFXStatus) PURE; +}; + +#define IDirectSoundCaptureBuffer8_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundCaptureBuffer8_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundCaptureBuffer8_Release(p) IUnknown_Release(p) + +#define IDirectSoundCaptureBuffer8_GetCaps(p,a) IDirectSoundCaptureBuffer_GetCaps(p,a) +#define IDirectSoundCaptureBuffer8_GetCurrentPosition(p,a,b) IDirectSoundCaptureBuffer_GetCurrentPosition(p,a,b) +#define IDirectSoundCaptureBuffer8_GetFormat(p,a,b,c) IDirectSoundCaptureBuffer_GetFormat(p,a,b,c) +#define IDirectSoundCaptureBuffer8_GetStatus(p,a) IDirectSoundCaptureBuffer_GetStatus(p,a) +#define IDirectSoundCaptureBuffer8_Initialize(p,a,b) IDirectSoundCaptureBuffer_Initialize(p,a,b) +#define IDirectSoundCaptureBuffer8_Lock(p,a,b,c,d,e,f,g) IDirectSoundCaptureBuffer_Lock(p,a,b,c,d,e,f,g) +#define IDirectSoundCaptureBuffer8_Start(p,a) IDirectSoundCaptureBuffer_Start(p,a) +#define IDirectSoundCaptureBuffer8_Stop(p) IDirectSoundCaptureBuffer_Stop(p)) +#define IDirectSoundCaptureBuffer8_Unlock(p,a,b,c,d) IDirectSoundCaptureBuffer_Unlock(p,a,b,c,d) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d) +#define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->lpVtbl->GetFXStatus(p,a,b) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundCaptureBuffer8_GetObjectInPath(p,a,b,c,d) (p)->GetObjectInPath(a,b,c,d) +#define IDirectSoundCaptureBuffer8_GetFXStatus(p,a,b) (p)->GetFXStatus(a,b) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +#endif // DIRECTSOUND_VERSION >= 0x0800 + +// +// IDirectSoundNotify +// + +DEFINE_GUID(IID_IDirectSoundNotify, 0xb0210783, 0x89cd, 0x11d0, 0xaf, 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16); + +#undef INTERFACE +#define INTERFACE IDirectSoundNotify + +DECLARE_INTERFACE_(IDirectSoundNotify, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundNotify methods + STDMETHOD(SetNotificationPositions) (THIS_ DWORD dwPositionNotifies, LPCDSBPOSITIONNOTIFY pcPositionNotifies) PURE; +}; + +#define IDirectSoundNotify_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundNotify_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundNotify_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->lpVtbl->SetNotificationPositions(p,a,b) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundNotify_SetNotificationPositions(p,a,b) (p)->SetNotificationPositions(a,b) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +// +// IKsPropertySet +// + +#ifndef _IKsPropertySet_ +#define _IKsPropertySet_ + +#ifdef __cplusplus +// 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined +struct IKsPropertySet; +#endif // __cplusplus + +typedef struct IKsPropertySet *LPKSPROPERTYSET; + +#define KSPROPERTY_SUPPORT_GET 0x00000001 +#define KSPROPERTY_SUPPORT_SET 0x00000002 + +DEFINE_GUID(IID_IKsPropertySet, 0x31efac30, 0x515c, 0x11d0, 0xa9, 0xaa, 0x00, 0xaa, 0x00, 0x61, 0xbe, 0x93); + +#undef INTERFACE +#define INTERFACE IKsPropertySet + +DECLARE_INTERFACE_(IKsPropertySet, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IKsPropertySet methods + STDMETHOD(Get) (THIS_ REFGUID rguidPropSet, ULONG ulId, LPVOID pInstanceData, ULONG ulInstanceLength, + LPVOID pPropertyData, ULONG ulDataLength, PULONG pulBytesReturned) PURE; + STDMETHOD(Set) (THIS_ REFGUID rguidPropSet, ULONG ulId, LPVOID pInstanceData, ULONG ulInstanceLength, + LPVOID pPropertyData, ULONG ulDataLength) PURE; + STDMETHOD(QuerySupport) (THIS_ REFGUID rguidPropSet, ULONG ulId, PULONG pulTypeSupport) PURE; +}; + +#define IKsPropertySet_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IKsPropertySet_AddRef(p) IUnknown_AddRef(p) +#define IKsPropertySet_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->lpVtbl->Get(p,a,b,c,d,e,f,g) +#define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->lpVtbl->Set(p,a,b,c,d,e,f) +#define IKsPropertySet_QuerySupport(p,a,b,c) (p)->lpVtbl->QuerySupport(p,a,b,c) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IKsPropertySet_Get(p,a,b,c,d,e,f,g) (p)->Get(a,b,c,d,e,f,g) +#define IKsPropertySet_Set(p,a,b,c,d,e,f) (p)->Set(a,b,c,d,e,f) +#define IKsPropertySet_QuerySupport(p,a,b,c) (p)->QuerySupport(a,b,c) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +#endif // _IKsPropertySet_ + +#if DIRECTSOUND_VERSION >= 0x0800 + +// +// IDirectSoundFXGargle +// + +DEFINE_GUID(IID_IDirectSoundFXGargle, 0xd616f352, 0xd622, 0x11ce, 0xaa, 0xc5, 0x00, 0x20, 0xaf, 0x0b, 0x99, 0xa3); + +typedef struct _DSFXGargle +{ + DWORD dwRateHz; // Rate of modulation in hz + DWORD dwWaveShape; // DSFXGARGLE_WAVE_xxx +} DSFXGargle, *LPDSFXGargle; + +#define DSFXGARGLE_WAVE_TRIANGLE 0 +#define DSFXGARGLE_WAVE_SQUARE 1 + +typedef const DSFXGargle *LPCDSFXGargle; + +#define DSFXGARGLE_RATEHZ_MIN 1 +#define DSFXGARGLE_RATEHZ_MAX 1000 + +#undef INTERFACE +#define INTERFACE IDirectSoundFXGargle + +DECLARE_INTERFACE_(IDirectSoundFXGargle, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundFXGargle methods + STDMETHOD(SetAllParameters) (THIS_ LPCDSFXGargle pcDsFxGargle) PURE; + STDMETHOD(GetAllParameters) (THIS_ LPDSFXGargle pDsFxGargle) PURE; +}; + +#define IDirectSoundFXGargle_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundFXGargle_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundFXGargle_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXGargle_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) +#define IDirectSoundFXGargle_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXGargle_SetAllParameters(p,a) (p)->SetAllParameters(a) +#define IDirectSoundFXGargle_GetAllParameters(p,a) (p)->GetAllParameters(a) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +// +// IDirectSoundFXChorus +// + +DEFINE_GUID(IID_IDirectSoundFXChorus, 0x880842e3, 0x145f, 0x43e6, 0xa9, 0x34, 0xa7, 0x18, 0x06, 0xe5, 0x05, 0x47); + +typedef struct _DSFXChorus +{ + FLOAT fWetDryMix; + FLOAT fDepth; + FLOAT fFeedback; + FLOAT fFrequency; + LONG lWaveform; // LFO shape; DSFXCHORUS_WAVE_xxx + FLOAT fDelay; + LONG lPhase; +} DSFXChorus, *LPDSFXChorus; + +typedef const DSFXChorus *LPCDSFXChorus; + +#define DSFXCHORUS_WAVE_TRIANGLE 0 +#define DSFXCHORUS_WAVE_SIN 1 + +#define DSFXCHORUS_WETDRYMIX_MIN 0.0f +#define DSFXCHORUS_WETDRYMIX_MAX 100.0f +#define DSFXCHORUS_DEPTH_MIN 0.0f +#define DSFXCHORUS_DEPTH_MAX 100.0f +#define DSFXCHORUS_FEEDBACK_MIN -99.0f +#define DSFXCHORUS_FEEDBACK_MAX 99.0f +#define DSFXCHORUS_FREQUENCY_MIN 0.0f +#define DSFXCHORUS_FREQUENCY_MAX 10.0f +#define DSFXCHORUS_DELAY_MIN 0.0f +#define DSFXCHORUS_DELAY_MAX 20.0f +#define DSFXCHORUS_PHASE_MIN 0 +#define DSFXCHORUS_PHASE_MAX 4 + +#define DSFXCHORUS_PHASE_NEG_180 0 +#define DSFXCHORUS_PHASE_NEG_90 1 +#define DSFXCHORUS_PHASE_ZERO 2 +#define DSFXCHORUS_PHASE_90 3 +#define DSFXCHORUS_PHASE_180 4 + +#undef INTERFACE +#define INTERFACE IDirectSoundFXChorus + +DECLARE_INTERFACE_(IDirectSoundFXChorus, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundFXChorus methods + STDMETHOD(SetAllParameters) (THIS_ LPCDSFXChorus pcDsFxChorus) PURE; + STDMETHOD(GetAllParameters) (THIS_ LPDSFXChorus pDsFxChorus) PURE; +}; + +#define IDirectSoundFXChorus_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundFXChorus_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundFXChorus_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXChorus_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) +#define IDirectSoundFXChorus_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXChorus_SetAllParameters(p,a) (p)->SetAllParameters(a) +#define IDirectSoundFXChorus_GetAllParameters(p,a) (p)->GetAllParameters(a) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +// +// IDirectSoundFXFlanger +// + +DEFINE_GUID(IID_IDirectSoundFXFlanger, 0x903e9878, 0x2c92, 0x4072, 0x9b, 0x2c, 0xea, 0x68, 0xf5, 0x39, 0x67, 0x83); + +typedef struct _DSFXFlanger +{ + FLOAT fWetDryMix; + FLOAT fDepth; + FLOAT fFeedback; + FLOAT fFrequency; + LONG lWaveform; + FLOAT fDelay; + LONG lPhase; +} DSFXFlanger, *LPDSFXFlanger; + +typedef const DSFXFlanger *LPCDSFXFlanger; + +#define DSFXFLANGER_WAVE_TRIANGLE 0 +#define DSFXFLANGER_WAVE_SIN 1 + +#define DSFXFLANGER_WETDRYMIX_MIN 0.0f +#define DSFXFLANGER_WETDRYMIX_MAX 100.0f +#define DSFXFLANGER_FREQUENCY_MIN 0.0f +#define DSFXFLANGER_FREQUENCY_MAX 10.0f +#define DSFXFLANGER_DEPTH_MIN 0.0f +#define DSFXFLANGER_DEPTH_MAX 100.0f +#define DSFXFLANGER_PHASE_MIN 0 +#define DSFXFLANGER_PHASE_MAX 4 +#define DSFXFLANGER_FEEDBACK_MIN -99.0f +#define DSFXFLANGER_FEEDBACK_MAX 99.0f +#define DSFXFLANGER_DELAY_MIN 0.0f +#define DSFXFLANGER_DELAY_MAX 4.0f + +#define DSFXFLANGER_PHASE_NEG_180 0 +#define DSFXFLANGER_PHASE_NEG_90 1 +#define DSFXFLANGER_PHASE_ZERO 2 +#define DSFXFLANGER_PHASE_90 3 +#define DSFXFLANGER_PHASE_180 4 + +#undef INTERFACE +#define INTERFACE IDirectSoundFXFlanger + +DECLARE_INTERFACE_(IDirectSoundFXFlanger, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundFXFlanger methods + STDMETHOD(SetAllParameters) (THIS_ LPCDSFXFlanger pcDsFxFlanger) PURE; + STDMETHOD(GetAllParameters) (THIS_ LPDSFXFlanger pDsFxFlanger) PURE; +}; + +#define IDirectSoundFXFlanger_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundFXFlanger_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundFXFlanger_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXFlanger_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) +#define IDirectSoundFXFlanger_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXFlanger_SetAllParameters(p,a) (p)->SetAllParameters(a) +#define IDirectSoundFXFlanger_GetAllParameters(p,a) (p)->GetAllParameters(a) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +// +// IDirectSoundFXEcho +// + +DEFINE_GUID(IID_IDirectSoundFXEcho, 0x8bd28edf, 0x50db, 0x4e92, 0xa2, 0xbd, 0x44, 0x54, 0x88, 0xd1, 0xed, 0x42); + +typedef struct _DSFXEcho +{ + FLOAT fWetDryMix; + FLOAT fFeedback; + FLOAT fLeftDelay; + FLOAT fRightDelay; + LONG lPanDelay; +} DSFXEcho, *LPDSFXEcho; + +typedef const DSFXEcho *LPCDSFXEcho; + +#define DSFXECHO_WETDRYMIX_MIN 0.0f +#define DSFXECHO_WETDRYMIX_MAX 100.0f +#define DSFXECHO_FEEDBACK_MIN 0.0f +#define DSFXECHO_FEEDBACK_MAX 100.0f +#define DSFXECHO_LEFTDELAY_MIN 1.0f +#define DSFXECHO_LEFTDELAY_MAX 2000.0f +#define DSFXECHO_RIGHTDELAY_MIN 1.0f +#define DSFXECHO_RIGHTDELAY_MAX 2000.0f +#define DSFXECHO_PANDELAY_MIN 0 +#define DSFXECHO_PANDELAY_MAX 1 + +#undef INTERFACE +#define INTERFACE IDirectSoundFXEcho + +DECLARE_INTERFACE_(IDirectSoundFXEcho, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundFXEcho methods + STDMETHOD(SetAllParameters) (THIS_ LPCDSFXEcho pcDsFxEcho) PURE; + STDMETHOD(GetAllParameters) (THIS_ LPDSFXEcho pDsFxEcho) PURE; +}; + +#define IDirectSoundFXEcho_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundFXEcho_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundFXEcho_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXEcho_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) +#define IDirectSoundFXEcho_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXEcho_SetAllParameters(p,a) (p)->SetAllParameters(a) +#define IDirectSoundFXEcho_GetAllParameters(p,a) (p)->GetAllParameters(a) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +// +// IDirectSoundFXDistortion +// + +DEFINE_GUID(IID_IDirectSoundFXDistortion, 0x8ecf4326, 0x455f, 0x4d8b, 0xbd, 0xa9, 0x8d, 0x5d, 0x3e, 0x9e, 0x3e, 0x0b); + +typedef struct _DSFXDistortion +{ + FLOAT fGain; + FLOAT fEdge; + FLOAT fPostEQCenterFrequency; + FLOAT fPostEQBandwidth; + FLOAT fPreLowpassCutoff; +} DSFXDistortion, *LPDSFXDistortion; + +typedef const DSFXDistortion *LPCDSFXDistortion; + +#define DSFXDISTORTION_GAIN_MIN -60.0f +#define DSFXDISTORTION_GAIN_MAX 0.0f +#define DSFXDISTORTION_EDGE_MIN 0.0f +#define DSFXDISTORTION_EDGE_MAX 100.0f +#define DSFXDISTORTION_POSTEQCENTERFREQUENCY_MIN 100.0f +#define DSFXDISTORTION_POSTEQCENTERFREQUENCY_MAX 8000.0f +#define DSFXDISTORTION_POSTEQBANDWIDTH_MIN 100.0f +#define DSFXDISTORTION_POSTEQBANDWIDTH_MAX 8000.0f +#define DSFXDISTORTION_PRELOWPASSCUTOFF_MIN 100.0f +#define DSFXDISTORTION_PRELOWPASSCUTOFF_MAX 8000.0f + +#undef INTERFACE +#define INTERFACE IDirectSoundFXDistortion + +DECLARE_INTERFACE_(IDirectSoundFXDistortion, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundFXDistortion methods + STDMETHOD(SetAllParameters) (THIS_ LPCDSFXDistortion pcDsFxDistortion) PURE; + STDMETHOD(GetAllParameters) (THIS_ LPDSFXDistortion pDsFxDistortion) PURE; +}; + +#define IDirectSoundFXDistortion_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundFXDistortion_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundFXDistortion_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXDistortion_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) +#define IDirectSoundFXDistortion_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXDistortion_SetAllParameters(p,a) (p)->SetAllParameters(a) +#define IDirectSoundFXDistortion_GetAllParameters(p,a) (p)->GetAllParameters(a) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +// +// IDirectSoundFXCompressor +// + +DEFINE_GUID(IID_IDirectSoundFXCompressor, 0x4bbd1154, 0x62f6, 0x4e2c, 0xa1, 0x5c, 0xd3, 0xb6, 0xc4, 0x17, 0xf7, 0xa0); + +typedef struct _DSFXCompressor +{ + FLOAT fGain; + FLOAT fAttack; + FLOAT fRelease; + FLOAT fThreshold; + FLOAT fRatio; + FLOAT fPredelay; +} DSFXCompressor, *LPDSFXCompressor; + +typedef const DSFXCompressor *LPCDSFXCompressor; + +#define DSFXCOMPRESSOR_GAIN_MIN -60.0f +#define DSFXCOMPRESSOR_GAIN_MAX 60.0f +#define DSFXCOMPRESSOR_ATTACK_MIN 0.01f +#define DSFXCOMPRESSOR_ATTACK_MAX 500.0f +#define DSFXCOMPRESSOR_RELEASE_MIN 50.0f +#define DSFXCOMPRESSOR_RELEASE_MAX 3000.0f +#define DSFXCOMPRESSOR_THRESHOLD_MIN -60.0f +#define DSFXCOMPRESSOR_THRESHOLD_MAX 0.0f +#define DSFXCOMPRESSOR_RATIO_MIN 1.0f +#define DSFXCOMPRESSOR_RATIO_MAX 100.0f +#define DSFXCOMPRESSOR_PREDELAY_MIN 0.0f +#define DSFXCOMPRESSOR_PREDELAY_MAX 4.0f + +#undef INTERFACE +#define INTERFACE IDirectSoundFXCompressor + +DECLARE_INTERFACE_(IDirectSoundFXCompressor, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundFXCompressor methods + STDMETHOD(SetAllParameters) (THIS_ LPCDSFXCompressor pcDsFxCompressor) PURE; + STDMETHOD(GetAllParameters) (THIS_ LPDSFXCompressor pDsFxCompressor) PURE; +}; + +#define IDirectSoundFXCompressor_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundFXCompressor_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundFXCompressor_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXCompressor_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) +#define IDirectSoundFXCompressor_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXCompressor_SetAllParameters(p,a) (p)->SetAllParameters(a) +#define IDirectSoundFXCompressor_GetAllParameters(p,a) (p)->GetAllParameters(a) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +// +// IDirectSoundFXParamEq +// + +DEFINE_GUID(IID_IDirectSoundFXParamEq, 0xc03ca9fe, 0xfe90, 0x4204, 0x80, 0x78, 0x82, 0x33, 0x4c, 0xd1, 0x77, 0xda); + +typedef struct _DSFXParamEq +{ + FLOAT fCenter; + FLOAT fBandwidth; + FLOAT fGain; +} DSFXParamEq, *LPDSFXParamEq; + +typedef const DSFXParamEq *LPCDSFXParamEq; + +#define DSFXPARAMEQ_CENTER_MIN 80.0f +#define DSFXPARAMEQ_CENTER_MAX 16000.0f +#define DSFXPARAMEQ_BANDWIDTH_MIN 1.0f +#define DSFXPARAMEQ_BANDWIDTH_MAX 36.0f +#define DSFXPARAMEQ_GAIN_MIN -15.0f +#define DSFXPARAMEQ_GAIN_MAX 15.0f + +#undef INTERFACE +#define INTERFACE IDirectSoundFXParamEq + +DECLARE_INTERFACE_(IDirectSoundFXParamEq, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundFXParamEq methods + STDMETHOD(SetAllParameters) (THIS_ LPCDSFXParamEq pcDsFxParamEq) PURE; + STDMETHOD(GetAllParameters) (THIS_ LPDSFXParamEq pDsFxParamEq) PURE; +}; + +#define IDirectSoundFXParamEq_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundFXParamEq_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundFXParamEq_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXParamEq_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) +#define IDirectSoundFXParamEq_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXParamEq_SetAllParameters(p,a) (p)->SetAllParameters(a) +#define IDirectSoundFXParamEq_GetAllParameters(p,a) (p)->GetAllParameters(a) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + + +// +// IDirectSoundFXI3DL2Reverb +// + +DEFINE_GUID(IID_IDirectSoundFXI3DL2Reverb, 0x4b166a6a, 0x0d66, 0x43f3, 0x80, 0xe3, 0xee, 0x62, 0x80, 0xde, 0xe1, 0xa4); + +typedef struct _DSFXI3DL2Reverb +{ + LONG lRoom; // [-10000, 0] default: -1000 mB + LONG lRoomHF; // [-10000, 0] default: 0 mB + FLOAT flRoomRolloffFactor; // [0.0, 10.0] default: 0.0 + FLOAT flDecayTime; // [0.1, 20.0] default: 1.49s + FLOAT flDecayHFRatio; // [0.1, 2.0] default: 0.83 + LONG lReflections; // [-10000, 1000] default: -2602 mB + FLOAT flReflectionsDelay; // [0.0, 0.3] default: 0.007 s + LONG lReverb; // [-10000, 2000] default: 200 mB + FLOAT flReverbDelay; // [0.0, 0.1] default: 0.011 s + FLOAT flDiffusion; // [0.0, 100.0] default: 100.0 % + FLOAT flDensity; // [0.0, 100.0] default: 100.0 % + FLOAT flHFReference; // [20.0, 20000.0] default: 5000.0 Hz +} DSFXI3DL2Reverb, *LPDSFXI3DL2Reverb; + +typedef const DSFXI3DL2Reverb *LPCDSFXI3DL2Reverb; + +#define DSFX_I3DL2REVERB_ROOM_MIN (-10000) +#define DSFX_I3DL2REVERB_ROOM_MAX 0 +#define DSFX_I3DL2REVERB_ROOM_DEFAULT (-1000) + +#define DSFX_I3DL2REVERB_ROOMHF_MIN (-10000) +#define DSFX_I3DL2REVERB_ROOMHF_MAX 0 +#define DSFX_I3DL2REVERB_ROOMHF_DEFAULT (-100) + +#define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MIN 0.0f +#define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_MAX 10.0f +#define DSFX_I3DL2REVERB_ROOMROLLOFFFACTOR_DEFAULT 0.0f + +#define DSFX_I3DL2REVERB_DECAYTIME_MIN 0.1f +#define DSFX_I3DL2REVERB_DECAYTIME_MAX 20.0f +#define DSFX_I3DL2REVERB_DECAYTIME_DEFAULT 1.49f + +#define DSFX_I3DL2REVERB_DECAYHFRATIO_MIN 0.1f +#define DSFX_I3DL2REVERB_DECAYHFRATIO_MAX 2.0f +#define DSFX_I3DL2REVERB_DECAYHFRATIO_DEFAULT 0.83f + +#define DSFX_I3DL2REVERB_REFLECTIONS_MIN (-10000) +#define DSFX_I3DL2REVERB_REFLECTIONS_MAX 1000 +#define DSFX_I3DL2REVERB_REFLECTIONS_DEFAULT (-2602) + +#define DSFX_I3DL2REVERB_REFLECTIONSDELAY_MIN 0.0f +#define DSFX_I3DL2REVERB_REFLECTIONSDELAY_MAX 0.3f +#define DSFX_I3DL2REVERB_REFLECTIONSDELAY_DEFAULT 0.007f + +#define DSFX_I3DL2REVERB_REVERB_MIN (-10000) +#define DSFX_I3DL2REVERB_REVERB_MAX 2000 +#define DSFX_I3DL2REVERB_REVERB_DEFAULT (200) + +#define DSFX_I3DL2REVERB_REVERBDELAY_MIN 0.0f +#define DSFX_I3DL2REVERB_REVERBDELAY_MAX 0.1f +#define DSFX_I3DL2REVERB_REVERBDELAY_DEFAULT 0.011f + +#define DSFX_I3DL2REVERB_DIFFUSION_MIN 0.0f +#define DSFX_I3DL2REVERB_DIFFUSION_MAX 100.0f +#define DSFX_I3DL2REVERB_DIFFUSION_DEFAULT 100.0f + +#define DSFX_I3DL2REVERB_DENSITY_MIN 0.0f +#define DSFX_I3DL2REVERB_DENSITY_MAX 100.0f +#define DSFX_I3DL2REVERB_DENSITY_DEFAULT 100.0f + +#define DSFX_I3DL2REVERB_HFREFERENCE_MIN 20.0f +#define DSFX_I3DL2REVERB_HFREFERENCE_MAX 20000.0f +#define DSFX_I3DL2REVERB_HFREFERENCE_DEFAULT 5000.0f + +#define DSFX_I3DL2REVERB_QUALITY_MIN 0 +#define DSFX_I3DL2REVERB_QUALITY_MAX 3 +#define DSFX_I3DL2REVERB_QUALITY_DEFAULT 2 + +#undef INTERFACE +#define INTERFACE IDirectSoundFXI3DL2Reverb + +DECLARE_INTERFACE_(IDirectSoundFXI3DL2Reverb, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundFXI3DL2Reverb methods + STDMETHOD(SetAllParameters) (THIS_ LPCDSFXI3DL2Reverb pcDsFxI3DL2Reverb) PURE; + STDMETHOD(GetAllParameters) (THIS_ LPDSFXI3DL2Reverb pDsFxI3DL2Reverb) PURE; + STDMETHOD(SetPreset) (THIS_ DWORD dwPreset) PURE; + STDMETHOD(GetPreset) (THIS_ LPDWORD pdwPreset) PURE; + STDMETHOD(SetQuality) (THIS_ LONG lQuality) PURE; + STDMETHOD(GetQuality) (THIS_ LONG *plQuality) PURE; +}; + +#define IDirectSoundFXI3DL2Reverb_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundFXI3DL2Reverb_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundFXI3DL2Reverb_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXI3DL2Reverb_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) +#define IDirectSoundFXI3DL2Reverb_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) +#define IDirectSoundFXI3DL2Reverb_SetPreset(p,a) (p)->lpVtbl->SetPreset(p,a) +#define IDirectSoundFXI3DL2Reverb_GetPreset(p,a) (p)->lpVtbl->GetPreset(p,a) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXI3DL2Reverb_SetAllParameters(p,a) (p)->SetAllParameters(a) +#define IDirectSoundFXI3DL2Reverb_GetAllParameters(p,a) (p)->GetAllParameters(a) +#define IDirectSoundFXI3DL2Reverb_SetPreset(p,a) (p)->SetPreset(a) +#define IDirectSoundFXI3DL2Reverb_GetPreset(p,a) (p)->GetPreset(a) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + + +// +// IDirectSoundFXWavesReverb +// + +DEFINE_GUID(IID_IDirectSoundFXWavesReverb,0x46858c3a,0x0dc6,0x45e3,0xb7,0x60,0xd4,0xee,0xf1,0x6c,0xb3,0x25); + +typedef struct _DSFXWavesReverb +{ + FLOAT fInGain; // [-96.0,0.0] default: 0.0 dB + FLOAT fReverbMix; // [-96.0,0.0] default: 0.0 db + FLOAT fReverbTime; // [0.001,3000.0] default: 1000.0 ms + FLOAT fHighFreqRTRatio; // [0.001,0.999] default: 0.001 +} DSFXWavesReverb, *LPDSFXWavesReverb; + +typedef const DSFXWavesReverb *LPCDSFXWavesReverb; + +#define DSFX_WAVESREVERB_INGAIN_MIN -96.0f +#define DSFX_WAVESREVERB_INGAIN_MAX 0.0f +#define DSFX_WAVESREVERB_INGAIN_DEFAULT 0.0f +#define DSFX_WAVESREVERB_REVERBMIX_MIN -96.0f +#define DSFX_WAVESREVERB_REVERBMIX_MAX 0.0f +#define DSFX_WAVESREVERB_REVERBMIX_DEFAULT 0.0f +#define DSFX_WAVESREVERB_REVERBTIME_MIN 0.001f +#define DSFX_WAVESREVERB_REVERBTIME_MAX 3000.0f +#define DSFX_WAVESREVERB_REVERBTIME_DEFAULT 1000.0f +#define DSFX_WAVESREVERB_HIGHFREQRTRATIO_MIN 0.001f +#define DSFX_WAVESREVERB_HIGHFREQRTRATIO_MAX 0.999f +#define DSFX_WAVESREVERB_HIGHFREQRTRATIO_DEFAULT 0.001f + +#undef INTERFACE +#define INTERFACE IDirectSoundFXWavesReverb + +DECLARE_INTERFACE_(IDirectSoundFXWavesReverb, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundFXWavesReverb methods + STDMETHOD(SetAllParameters) (THIS_ LPCDSFXWavesReverb pcDsFxWavesReverb) PURE; + STDMETHOD(GetAllParameters) (THIS_ LPDSFXWavesReverb pDsFxWavesReverb) PURE; +}; + +#define IDirectSoundFXWavesReverb_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundFXWavesReverb_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundFXWavesReverb_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXWavesReverb_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) +#define IDirectSoundFXWavesReverb_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFXWavesReverb_SetAllParameters(p,a) (p)->SetAllParameters(a) +#define IDirectSoundFXWavesReverb_GetAllParameters(p,a) (p)->GetAllParameters(a) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +// +// IDirectSoundCaptureFXAec +// + +DEFINE_GUID(IID_IDirectSoundCaptureFXAec, 0x174d3eb9, 0x6696, 0x4fac, 0xa4, 0x6c, 0xa0, 0xac, 0x7b, 0xc9, 0xe2, 0xf); + +typedef struct _DSCFXAec +{ + BOOL fEnable; + BOOL fReset; +} DSCFXAec, *LPDSCFXAec; + +typedef const DSCFXAec *LPCDSCFXAec; + +#undef INTERFACE +#define INTERFACE IDirectSoundCaptureFXAec + +DECLARE_INTERFACE_(IDirectSoundCaptureFXAec, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundCaptureFXAec methods + STDMETHOD(SetAllParameters) (THIS_ LPCDSCFXAec pDscFxAec) PURE; + STDMETHOD(GetAllParameters) (THIS_ LPDSCFXAec pDscFxAec) PURE; +}; + +#define IDirectSoundCaptureFXAec_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundCaptureFXAec_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundCaptureFXAec_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundCaptureFXAec_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) +#define IDirectSoundCaptureFXAec_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundCaptureFXAec_SetAllParameters(p,a) (p)->SetAllParameters(a) +#define IDirectSoundCaptureFXAec_GetAllParameters(p,a) (p)->GetAllParameters(a) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + + +// +// IDirectSoundCaptureFXNoiseSuppress +// + +DEFINE_GUID(IID_IDirectSoundCaptureFXNoiseSuppress, 0xed311e41, 0xfbae, 0x4175, 0x96, 0x25, 0xcd, 0x8, 0x54, 0xf6, 0x93, 0xca); + +typedef struct _DSCFXNoiseSuppress +{ + BOOL fEnable; + BOOL fReset; +} DSCFXNoiseSuppress, *LPDSCFXNoiseSuppress; + +typedef const DSCFXNoiseSuppress *LPCDSCFXNoiseSuppress; + +#undef INTERFACE +#define INTERFACE IDirectSoundCaptureFXNoiseSuppress + +DECLARE_INTERFACE_(IDirectSoundCaptureFXNoiseSuppress, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundCaptureFXNoiseSuppress methods + STDMETHOD(SetAllParameters) (THIS_ LPCDSCFXNoiseSuppress pcDscFxNoiseSuppress) PURE; + STDMETHOD(GetAllParameters) (THIS_ LPDSCFXNoiseSuppress pDscFxNoiseSuppress) PURE; +}; + +#define IDirectSoundCaptureFXNoiseSuppress_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundCaptureFXNoiseSuppress_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundCaptureFXNoiseSuppress_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundCaptureFXNoiseSuppress_SetAllParameters(p,a) (p)->lpVtbl->SetAllParameters(p,a) +#define IDirectSoundCaptureFXNoiseSuppress_GetAllParameters(p,a) (p)->lpVtbl->GetAllParameters(p,a) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundCaptureFXNoiseSuppress_SetAllParameters(p,a) (p)->SetAllParameters(a) +#define IDirectSoundCaptureFXNoiseSuppress_GetAllParameters(p,a) (p)->GetAllParameters(a) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + + +// +// IDirectSoundFullDuplex +// + +#ifndef _IDirectSoundFullDuplex_ +#define _IDirectSoundFullDuplex_ + +#ifdef __cplusplus +// 'struct' not 'class' per the way DECLARE_INTERFACE_ is defined +struct IDirectSoundFullDuplex; +#endif // __cplusplus + +typedef struct IDirectSoundFullDuplex *LPDIRECTSOUNDFULLDUPLEX; + +DEFINE_GUID(IID_IDirectSoundFullDuplex, 0xedcb4c7a, 0xdaab, 0x4216, 0xa4, 0x2e, 0x6c, 0x50, 0x59, 0x6d, 0xdc, 0x1d); + +#undef INTERFACE +#define INTERFACE IDirectSoundFullDuplex + +DECLARE_INTERFACE_(IDirectSoundFullDuplex, IUnknown) +{ + // IUnknown methods + STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID *) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + + // IDirectSoundFullDuplex methods + STDMETHOD(Initialize) (THIS_ LPCGUID pCaptureGuid, LPCGUID pRenderGuid, LPCDSCBUFFERDESC lpDscBufferDesc, LPCDSBUFFERDESC lpDsBufferDesc, HWND hWnd, DWORD dwLevel, LPLPDIRECTSOUNDCAPTUREBUFFER8 lplpDirectSoundCaptureBuffer8, LPLPDIRECTSOUNDBUFFER8 lplpDirectSoundBuffer8) PURE; +}; + +#define IDirectSoundFullDuplex_QueryInterface(p,a,b) IUnknown_QueryInterface(p,a,b) +#define IDirectSoundFullDuplex_AddRef(p) IUnknown_AddRef(p) +#define IDirectSoundFullDuplex_Release(p) IUnknown_Release(p) + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Initialize(p,a,b,c,d,e,f,g,h) +#else // !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectSoundFullDuplex_Initialize(p,a,b,c,d,e,f,g,h) (p)->Initialize(a,b,c,d,e,f,g,h) +#endif // !defined(__cplusplus) || defined(CINTERFACE) + +#endif // _IDirectSoundFullDuplex_ + +#endif // DIRECTSOUND_VERSION >= 0x0800 + +// +// Return Codes +// + +// The function completed successfully +#define DS_OK S_OK + +// The call succeeded, but we had to substitute the 3D algorithm +#define DS_NO_VIRTUALIZATION MAKE_HRESULT(0, _FACDS, 10) + +// The call succeeded, but not all of the optional effects were obtained. +#define DS_INCOMPLETE MAKE_HRESULT(0, _FACDS, 20) + +// The call failed because resources (such as a priority level) +// were already being used by another caller +#define DSERR_ALLOCATED MAKE_DSHRESULT(10) + +// The control (vol, pan, etc.) requested by the caller is not available +#define DSERR_CONTROLUNAVAIL MAKE_DSHRESULT(30) + +// An invalid parameter was passed to the returning function +#define DSERR_INVALIDPARAM E_INVALIDARG + +// This call is not valid for the current state of this object +#define DSERR_INVALIDCALL MAKE_DSHRESULT(50) + +// An undetermined error occurred inside the DirectSound subsystem +#define DSERR_GENERIC E_FAIL + +// The caller does not have the priority level required for the function to +// succeed +#define DSERR_PRIOLEVELNEEDED MAKE_DSHRESULT(70) + +// Not enough free memory is available to complete the operation +#define DSERR_OUTOFMEMORY E_OUTOFMEMORY + +// The specified WAVE format is not supported +#define DSERR_BADFORMAT MAKE_DSHRESULT(100) + +// The function called is not supported at this time +#define DSERR_UNSUPPORTED E_NOTIMPL + +// No sound driver is available for use +#define DSERR_NODRIVER MAKE_DSHRESULT(120) + +// This object is already initialized +#define DSERR_ALREADYINITIALIZED MAKE_DSHRESULT(130) + +// This object does not support aggregation +#define DSERR_NOAGGREGATION CLASS_E_NOAGGREGATION + +// The buffer memory has been lost, and must be restored +#define DSERR_BUFFERLOST MAKE_DSHRESULT(150) + +// Another app has a higher priority level, preventing this call from +// succeeding +#define DSERR_OTHERAPPHASPRIO MAKE_DSHRESULT(160) + +// This object has not been initialized +#define DSERR_UNINITIALIZED MAKE_DSHRESULT(170) + +// The requested COM interface is not available +#define DSERR_NOINTERFACE E_NOINTERFACE + +// Access is denied +#define DSERR_ACCESSDENIED E_ACCESSDENIED + +// Tried to create a DSBCAPS_CTRLFX buffer shorter than DSBSIZE_FX_MIN milliseconds +#define DSERR_BUFFERTOOSMALL MAKE_DSHRESULT(180) + +// Attempt to use DirectSound 8 functionality on an older DirectSound object +#define DSERR_DS8_REQUIRED MAKE_DSHRESULT(190) + +// A circular loop of send effects was detected +#define DSERR_SENDLOOP MAKE_DSHRESULT(200) + +// The GUID specified in an audiopath file does not match a valid MIXIN buffer +#define DSERR_BADSENDBUFFERGUID MAKE_DSHRESULT(210) + +// The object requested was not found (numerically equal to DMUS_E_NOT_FOUND) +#define DSERR_OBJECTNOTFOUND MAKE_DSHRESULT(4449) + +// +// Flags +// + +#define DSCAPS_PRIMARYMONO 0x00000001 +#define DSCAPS_PRIMARYSTEREO 0x00000002 +#define DSCAPS_PRIMARY8BIT 0x00000004 +#define DSCAPS_PRIMARY16BIT 0x00000008 +#define DSCAPS_CONTINUOUSRATE 0x00000010 +#define DSCAPS_EMULDRIVER 0x00000020 +#define DSCAPS_CERTIFIED 0x00000040 +#define DSCAPS_SECONDARYMONO 0x00000100 +#define DSCAPS_SECONDARYSTEREO 0x00000200 +#define DSCAPS_SECONDARY8BIT 0x00000400 +#define DSCAPS_SECONDARY16BIT 0x00000800 + +#define DSSCL_NORMAL 0x00000001 +#define DSSCL_PRIORITY 0x00000002 +#define DSSCL_EXCLUSIVE 0x00000003 +#define DSSCL_WRITEPRIMARY 0x00000004 + +#define DSSPEAKER_HEADPHONE 0x00000001 +#define DSSPEAKER_MONO 0x00000002 +#define DSSPEAKER_QUAD 0x00000003 +#define DSSPEAKER_STEREO 0x00000004 +#define DSSPEAKER_SURROUND 0x00000005 +#define DSSPEAKER_5POINT1 0x00000006 + +#define DSSPEAKER_GEOMETRY_MIN 0x00000005 // 5 degrees +#define DSSPEAKER_GEOMETRY_NARROW 0x0000000A // 10 degrees +#define DSSPEAKER_GEOMETRY_WIDE 0x00000014 // 20 degrees +#define DSSPEAKER_GEOMETRY_MAX 0x000000B4 // 180 degrees + +#define DSSPEAKER_COMBINED(c, g) ((DWORD)(((BYTE)(c)) | ((DWORD)((BYTE)(g))) << 16)) +#define DSSPEAKER_CONFIG(a) ((BYTE)(a)) +#define DSSPEAKER_GEOMETRY(a) ((BYTE)(((DWORD)(a) >> 16) & 0x00FF)) + +#define DSBCAPS_PRIMARYBUFFER 0x00000001 +#define DSBCAPS_STATIC 0x00000002 +#define DSBCAPS_LOCHARDWARE 0x00000004 +#define DSBCAPS_LOCSOFTWARE 0x00000008 +#define DSBCAPS_CTRL3D 0x00000010 +#define DSBCAPS_CTRLFREQUENCY 0x00000020 +#define DSBCAPS_CTRLPAN 0x00000040 +#define DSBCAPS_CTRLVOLUME 0x00000080 +#define DSBCAPS_CTRLPOSITIONNOTIFY 0x00000100 +#define DSBCAPS_CTRLFX 0x00000200 +#define DSBCAPS_STICKYFOCUS 0x00004000 +#define DSBCAPS_GLOBALFOCUS 0x00008000 +#define DSBCAPS_GETCURRENTPOSITION2 0x00010000 +#define DSBCAPS_MUTE3DATMAXDISTANCE 0x00020000 +#define DSBCAPS_LOCDEFER 0x00040000 + +#define DSBPLAY_LOOPING 0x00000001 +#define DSBPLAY_LOCHARDWARE 0x00000002 +#define DSBPLAY_LOCSOFTWARE 0x00000004 +#define DSBPLAY_TERMINATEBY_TIME 0x00000008 +#define DSBPLAY_TERMINATEBY_DISTANCE 0x000000010 +#define DSBPLAY_TERMINATEBY_PRIORITY 0x000000020 + +#define DSBSTATUS_PLAYING 0x00000001 +#define DSBSTATUS_BUFFERLOST 0x00000002 +#define DSBSTATUS_LOOPING 0x00000004 +#define DSBSTATUS_LOCHARDWARE 0x00000008 +#define DSBSTATUS_LOCSOFTWARE 0x00000010 +#define DSBSTATUS_TERMINATED 0x00000020 + +#define DSBLOCK_FROMWRITECURSOR 0x00000001 +#define DSBLOCK_ENTIREBUFFER 0x00000002 + +#define DSBFREQUENCY_MIN 100 +#define DSBFREQUENCY_MAX 100000 +#define DSBFREQUENCY_ORIGINAL 0 + +#define DSBPAN_LEFT -10000 +#define DSBPAN_CENTER 0 +#define DSBPAN_RIGHT 10000 + +#define DSBVOLUME_MIN -10000 +#define DSBVOLUME_MAX 0 + +#define DSBSIZE_MIN 4 +#define DSBSIZE_MAX 0x0FFFFFFF +#define DSBSIZE_FX_MIN 150 // NOTE: Milliseconds, not bytes + +#define DS3DMODE_NORMAL 0x00000000 +#define DS3DMODE_HEADRELATIVE 0x00000001 +#define DS3DMODE_DISABLE 0x00000002 + +#define DS3D_IMMEDIATE 0x00000000 +#define DS3D_DEFERRED 0x00000001 + +#define DS3D_MINDISTANCEFACTOR FLT_MIN +#define DS3D_MAXDISTANCEFACTOR FLT_MAX +#define DS3D_DEFAULTDISTANCEFACTOR 1.0f + +#define DS3D_MINROLLOFFFACTOR 0.0f +#define DS3D_MAXROLLOFFFACTOR 10.0f +#define DS3D_DEFAULTROLLOFFFACTOR 1.0f + +#define DS3D_MINDOPPLERFACTOR 0.0f +#define DS3D_MAXDOPPLERFACTOR 10.0f +#define DS3D_DEFAULTDOPPLERFACTOR 1.0f + +#define DS3D_DEFAULTMINDISTANCE 1.0f +#define DS3D_DEFAULTMAXDISTANCE 1000000000.0f + +#define DS3D_MINCONEANGLE 0 +#define DS3D_MAXCONEANGLE 360 +#define DS3D_DEFAULTCONEANGLE 360 + +#define DS3D_DEFAULTCONEOUTSIDEVOLUME DSBVOLUME_MAX + +// IDirectSoundCapture attributes + +#define DSCCAPS_EMULDRIVER DSCAPS_EMULDRIVER +#define DSCCAPS_CERTIFIED DSCAPS_CERTIFIED + +// IDirectSoundCaptureBuffer attributes + +#define DSCBCAPS_WAVEMAPPED 0x80000000 + +#if DIRECTSOUND_VERSION >= 0x0800 +#define DSCBCAPS_CTRLFX 0x00000200 +#endif + + +#define DSCBLOCK_ENTIREBUFFER 0x00000001 + +#define DSCBSTATUS_CAPTURING 0x00000001 +#define DSCBSTATUS_LOOPING 0x00000002 + +#define DSCBSTART_LOOPING 0x00000001 + +#define DSBPN_OFFSETSTOP 0xFFFFFFFF + +#define DS_CERTIFIED 0x00000000 +#define DS_UNCERTIFIED 0x00000001 + +// Dsound SYSTEM resource constants +// Matches the KSAUDIO_CPU_RESOURCES_xxx_HOST_CPU values defined +// in ksmedia.h. +#define DS_SYSTEM_RESOURCES_NO_HOST_RESOURCES 0x00000000 +#define DS_SYSTEM_RESOURCES_ALL_HOST_RESOURCES 0x7FFFFFFF +#define DS_SYSTEM_RESOURCES_UNDEFINED 0x80000000 + + +// +// I3DL2 Material Presets +// + +enum +{ + DSFX_I3DL2_MATERIAL_PRESET_SINGLEWINDOW, + DSFX_I3DL2_MATERIAL_PRESET_DOUBLEWINDOW, + DSFX_I3DL2_MATERIAL_PRESET_THINDOOR, + DSFX_I3DL2_MATERIAL_PRESET_THICKDOOR, + DSFX_I3DL2_MATERIAL_PRESET_WOODWALL, + DSFX_I3DL2_MATERIAL_PRESET_BRICKWALL, + DSFX_I3DL2_MATERIAL_PRESET_STONEWALL, + DSFX_I3DL2_MATERIAL_PRESET_CURTAIN +}; + +#define I3DL2_MATERIAL_PRESET_SINGLEWINDOW -2800,0.71f +#define I3DL2_MATERIAL_PRESET_DOUBLEWINDOW -5000,0.40f +#define I3DL2_MATERIAL_PRESET_THINDOOR -1800,0.66f +#define I3DL2_MATERIAL_PRESET_THICKDOOR -4400,0.64f +#define I3DL2_MATERIAL_PRESET_WOODWALL -4000,0.50f +#define I3DL2_MATERIAL_PRESET_BRICKWALL -5000,0.60f +#define I3DL2_MATERIAL_PRESET_STONEWALL -6000,0.68f +#define I3DL2_MATERIAL_PRESET_CURTAIN -1200,0.15f + + +enum +{ + DSFX_I3DL2_ENVIRONMENT_PRESET_DEFAULT, + DSFX_I3DL2_ENVIRONMENT_PRESET_GENERIC, + DSFX_I3DL2_ENVIRONMENT_PRESET_PADDEDCELL, + DSFX_I3DL2_ENVIRONMENT_PRESET_ROOM, + DSFX_I3DL2_ENVIRONMENT_PRESET_BATHROOM, + DSFX_I3DL2_ENVIRONMENT_PRESET_LIVINGROOM, + DSFX_I3DL2_ENVIRONMENT_PRESET_STONEROOM, + DSFX_I3DL2_ENVIRONMENT_PRESET_AUDITORIUM, + DSFX_I3DL2_ENVIRONMENT_PRESET_CONCERTHALL, + DSFX_I3DL2_ENVIRONMENT_PRESET_CAVE, + DSFX_I3DL2_ENVIRONMENT_PRESET_ARENA, + DSFX_I3DL2_ENVIRONMENT_PRESET_HANGAR, + DSFX_I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY, + DSFX_I3DL2_ENVIRONMENT_PRESET_HALLWAY, + DSFX_I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR, + DSFX_I3DL2_ENVIRONMENT_PRESET_ALLEY, + DSFX_I3DL2_ENVIRONMENT_PRESET_FOREST, + DSFX_I3DL2_ENVIRONMENT_PRESET_CITY, + DSFX_I3DL2_ENVIRONMENT_PRESET_MOUNTAINS, + DSFX_I3DL2_ENVIRONMENT_PRESET_QUARRY, + DSFX_I3DL2_ENVIRONMENT_PRESET_PLAIN, + DSFX_I3DL2_ENVIRONMENT_PRESET_PARKINGLOT, + DSFX_I3DL2_ENVIRONMENT_PRESET_SEWERPIPE, + DSFX_I3DL2_ENVIRONMENT_PRESET_UNDERWATER, + DSFX_I3DL2_ENVIRONMENT_PRESET_SMALLROOM, + DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM, + DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEROOM, + DSFX_I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL, + DSFX_I3DL2_ENVIRONMENT_PRESET_LARGEHALL, + DSFX_I3DL2_ENVIRONMENT_PRESET_PLATE +}; + +// +// I3DL2 Reverberation Presets Values +// + +#define I3DL2_ENVIRONMENT_PRESET_DEFAULT -1000, -100, 0.0f, 1.49f, 0.83f, -2602, 0.007f, 200, 0.011f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_GENERIC -1000, -100, 0.0f, 1.49f, 0.83f, -2602, 0.007f, 200, 0.011f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_PADDEDCELL -1000,-6000, 0.0f, 0.17f, 0.10f, -1204, 0.001f, 207, 0.002f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_ROOM -1000, -454, 0.0f, 0.40f, 0.83f, -1646, 0.002f, 53, 0.003f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_BATHROOM -1000,-1200, 0.0f, 1.49f, 0.54f, -370, 0.007f, 1030, 0.011f, 100.0f, 60.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_LIVINGROOM -1000,-6000, 0.0f, 0.50f, 0.10f, -1376, 0.003f, -1104, 0.004f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_STONEROOM -1000, -300, 0.0f, 2.31f, 0.64f, -711, 0.012f, 83, 0.017f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_AUDITORIUM -1000, -476, 0.0f, 4.32f, 0.59f, -789, 0.020f, -289, 0.030f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_CONCERTHALL -1000, -500, 0.0f, 3.92f, 0.70f, -1230, 0.020f, -2, 0.029f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_CAVE -1000, 0, 0.0f, 2.91f, 1.30f, -602, 0.015f, -302, 0.022f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_ARENA -1000, -698, 0.0f, 7.24f, 0.33f, -1166, 0.020f, 16, 0.030f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_HANGAR -1000,-1000, 0.0f,10.05f, 0.23f, -602, 0.020f, 198, 0.030f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_CARPETEDHALLWAY -1000,-4000, 0.0f, 0.30f, 0.10f, -1831, 0.002f, -1630, 0.030f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_HALLWAY -1000, -300, 0.0f, 1.49f, 0.59f, -1219, 0.007f, 441, 0.011f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_STONECORRIDOR -1000, -237, 0.0f, 2.70f, 0.79f, -1214, 0.013f, 395, 0.020f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_ALLEY -1000, -270, 0.0f, 1.49f, 0.86f, -1204, 0.007f, -4, 0.011f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_FOREST -1000,-3300, 0.0f, 1.49f, 0.54f, -2560, 0.162f, -613, 0.088f, 79.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_CITY -1000, -800, 0.0f, 1.49f, 0.67f, -2273, 0.007f, -2217, 0.011f, 50.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_MOUNTAINS -1000,-2500, 0.0f, 1.49f, 0.21f, -2780, 0.300f, -2014, 0.100f, 27.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_QUARRY -1000,-1000, 0.0f, 1.49f, 0.83f,-10000, 0.061f, 500, 0.025f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_PLAIN -1000,-2000, 0.0f, 1.49f, 0.50f, -2466, 0.179f, -2514, 0.100f, 21.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_PARKINGLOT -1000, 0, 0.0f, 1.65f, 1.50f, -1363, 0.008f, -1153, 0.012f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_SEWERPIPE -1000,-1000, 0.0f, 2.81f, 0.14f, 429, 0.014f, 648, 0.021f, 80.0f, 60.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_UNDERWATER -1000,-4000, 0.0f, 1.49f, 0.10f, -449, 0.007f, 1700, 0.011f, 100.0f, 100.0f, 5000.0f + +// +// Examples simulating 'musical' reverb presets +// +// Name Decay time Description +// Small Room 1.1s A small size room with a length of 5m or so. +// Medium Room 1.3s A medium size room with a length of 10m or so. +// Large Room 1.5s A large size room suitable for live performances. +// Medium Hall 1.8s A medium size concert hall. +// Large Hall 1.8s A large size concert hall suitable for a full orchestra. +// Plate 1.3s A plate reverb simulation. +// + +#define I3DL2_ENVIRONMENT_PRESET_SMALLROOM -1000, -600, 0.0f, 1.10f, 0.83f, -400, 0.005f, 500, 0.010f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_MEDIUMROOM -1000, -600, 0.0f, 1.30f, 0.83f, -1000, 0.010f, -200, 0.020f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_LARGEROOM -1000, -600, 0.0f, 1.50f, 0.83f, -1600, 0.020f, -1000, 0.040f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_MEDIUMHALL -1000, -600, 0.0f, 1.80f, 0.70f, -1300, 0.015f, -800, 0.030f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_LARGEHALL -1000, -600, 0.0f, 1.80f, 0.70f, -2000, 0.030f, -1400, 0.060f, 100.0f, 100.0f, 5000.0f +#define I3DL2_ENVIRONMENT_PRESET_PLATE -1000, -200, 0.0f, 1.30f, 0.90f, 0, 0.002f, 0, 0.010f, 100.0f, 75.0f, 5000.0f + +// +// DirectSound3D Algorithms +// + +// Default DirectSound3D algorithm {00000000-0000-0000-0000-000000000000} +#define DS3DALG_DEFAULT GUID_NULL + +// No virtualization (Pan3D) {C241333F-1C1B-11d2-94F5-00C04FC28ACA} +DEFINE_GUID(DS3DALG_NO_VIRTUALIZATION, 0xc241333f, 0x1c1b, 0x11d2, 0x94, 0xf5, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca); + +// High-quality HRTF algorithm {C2413340-1C1B-11d2-94F5-00C04FC28ACA} +DEFINE_GUID(DS3DALG_HRTF_FULL, 0xc2413340, 0x1c1b, 0x11d2, 0x94, 0xf5, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca); + +// Lower-quality HRTF algorithm {C2413342-1C1B-11d2-94F5-00C04FC28ACA} +DEFINE_GUID(DS3DALG_HRTF_LIGHT, 0xc2413342, 0x1c1b, 0x11d2, 0x94, 0xf5, 0x0, 0xc0, 0x4f, 0xc2, 0x8a, 0xca); + + +#if DIRECTSOUND_VERSION >= 0x0800 + +// +// DirectSound Internal Effect Algorithms +// + + +// Gargle {DAFD8210-5711-4B91-9FE3-F75B7AE279BF} +DEFINE_GUID(GUID_DSFX_STANDARD_GARGLE, 0xdafd8210, 0x5711, 0x4b91, 0x9f, 0xe3, 0xf7, 0x5b, 0x7a, 0xe2, 0x79, 0xbf); + +// Chorus {EFE6629C-81F7-4281-BD91-C9D604A95AF6} +DEFINE_GUID(GUID_DSFX_STANDARD_CHORUS, 0xefe6629c, 0x81f7, 0x4281, 0xbd, 0x91, 0xc9, 0xd6, 0x04, 0xa9, 0x5a, 0xf6); + +// Flanger {EFCA3D92-DFD8-4672-A603-7420894BAD98} +DEFINE_GUID(GUID_DSFX_STANDARD_FLANGER, 0xefca3d92, 0xdfd8, 0x4672, 0xa6, 0x03, 0x74, 0x20, 0x89, 0x4b, 0xad, 0x98); + +// Echo/Delay {EF3E932C-D40B-4F51-8CCF-3F98F1B29D5D} +DEFINE_GUID(GUID_DSFX_STANDARD_ECHO, 0xef3e932c, 0xd40b, 0x4f51, 0x8c, 0xcf, 0x3f, 0x98, 0xf1, 0xb2, 0x9d, 0x5d); + +// Distortion {EF114C90-CD1D-484E-96E5-09CFAF912A21} +DEFINE_GUID(GUID_DSFX_STANDARD_DISTORTION, 0xef114c90, 0xcd1d, 0x484e, 0x96, 0xe5, 0x09, 0xcf, 0xaf, 0x91, 0x2a, 0x21); + +// Compressor/Limiter {EF011F79-4000-406D-87AF-BFFB3FC39D57} +DEFINE_GUID(GUID_DSFX_STANDARD_COMPRESSOR, 0xef011f79, 0x4000, 0x406d, 0x87, 0xaf, 0xbf, 0xfb, 0x3f, 0xc3, 0x9d, 0x57); + +// Parametric Equalization {120CED89-3BF4-4173-A132-3CB406CF3231} +DEFINE_GUID(GUID_DSFX_STANDARD_PARAMEQ, 0x120ced89, 0x3bf4, 0x4173, 0xa1, 0x32, 0x3c, 0xb4, 0x06, 0xcf, 0x32, 0x31); + + +// I3DL2 Environmental Reverberation: Reverb (Listener) Effect {EF985E71-D5C7-42D4-BA4D-2D073E2E96F4} +DEFINE_GUID(GUID_DSFX_STANDARD_I3DL2REVERB, 0xef985e71, 0xd5c7, 0x42d4, 0xba, 0x4d, 0x2d, 0x07, 0x3e, 0x2e, 0x96, 0xf4); + +// Waves Reverberation {87FC0268-9A55-4360-95AA-004A1D9DE26C} +DEFINE_GUID(GUID_DSFX_WAVES_REVERB, 0x87fc0268, 0x9a55, 0x4360, 0x95, 0xaa, 0x00, 0x4a, 0x1d, 0x9d, 0xe2, 0x6c); + +// +// DirectSound Capture Effect Algorithms +// + + +// Acoustic Echo Canceller {BF963D80-C559-11D0-8A2B-00A0C9255AC1} +// Matches KSNODETYPE_ACOUSTIC_ECHO_CANCEL in ksmedia.h +DEFINE_GUID(GUID_DSCFX_CLASS_AEC, 0xBF963D80L, 0xC559, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1); + +// Microsoft AEC {CDEBB919-379A-488a-8765-F53CFD36DE40} +DEFINE_GUID(GUID_DSCFX_MS_AEC, 0xcdebb919, 0x379a, 0x488a, 0x87, 0x65, 0xf5, 0x3c, 0xfd, 0x36, 0xde, 0x40); + +// System AEC {1C22C56D-9879-4f5b-A389-27996DDC2810} +DEFINE_GUID(GUID_DSCFX_SYSTEM_AEC, 0x1c22c56d, 0x9879, 0x4f5b, 0xa3, 0x89, 0x27, 0x99, 0x6d, 0xdc, 0x28, 0x10); + +// Noise Supression {E07F903F-62FD-4e60-8CDD-DEA7236665B5} +// Matches KSNODETYPE_NOISE_SUPPRESS in post Windows ME DDK's ksmedia.h +DEFINE_GUID(GUID_DSCFX_CLASS_NS, 0xe07f903f, 0x62fd, 0x4e60, 0x8c, 0xdd, 0xde, 0xa7, 0x23, 0x66, 0x65, 0xb5); + +// Microsoft Noise Suppresion {11C5C73B-66E9-4ba1-A0BA-E814C6EED92D} +DEFINE_GUID(GUID_DSCFX_MS_NS, 0x11c5c73b, 0x66e9, 0x4ba1, 0xa0, 0xba, 0xe8, 0x14, 0xc6, 0xee, 0xd9, 0x2d); + +// System Noise Suppresion {5AB0882E-7274-4516-877D-4EEE99BA4FD0} +DEFINE_GUID(GUID_DSCFX_SYSTEM_NS, 0x5ab0882e, 0x7274, 0x4516, 0x87, 0x7d, 0x4e, 0xee, 0x99, 0xba, 0x4f, 0xd0); + + +#endif // DIRECTSOUND_VERSION >= 0x0800 + +#endif // __DSOUND_INCLUDED__ + + + +#ifdef __cplusplus +}; +#endif // __cplusplus + + diff --git a/windows_libs/mssdk/include/dv.h b/windows_libs/mssdk/include/dv.h new file mode 100644 index 00000000..d991efa8 --- /dev/null +++ b/windows_libs/mssdk/include/dv.h @@ -0,0 +1,58 @@ +//------------------------------------------------------------------------------ +// File: DV.h +// +// Desc: DV typedefs and defines. +// +// Copyright (c) 1997 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef _DV_H_ +#define _DV_H_ + +#define DV_DVSD_NTSC_FRAMESIZE 120000L +#define DV_DVSD_PAL_FRAMESIZE 144000L + +#define DV_SMCHN 0x0000e000 +#define DV_AUDIOMODE 0x00000f00 +#define DV_AUDIOSMP 0x38000000 + +#define DV_AUDIOQU 0x07000000 +#define DV_NTSCPAL 0x00200000 +#define DV_STYPE 0x001f0000 + + +//There are NTSC or PAL DV camcorders +#define DV_NTSC 0 +#define DV_PAL 1 +//DV camcorder can output sd/hd/sl +#define DV_SD 0x00 +#define DV_HD 0x01 +#define DV_SL 0x02 +//user can choice 12 bits or 16 bits audio from DV camcorder +#define DV_CAP_AUD16Bits 0x00 +#define DV_CAP_AUD12Bits 0x01 + +#define SIZE_DVINFO 0x20 + +typedef struct Tag_DVAudInfo +{ + BYTE bAudStyle[2]; + //LSB 6 bits for starting DIF sequence number + //MSB 2 bits: 0 for mon. 1: stereo in one 5/6 DIF sequences, 2: stereo audio in both 5/6 DIF sequences + //example: 0x00: mon, audio in first 5/6 DIF sequence + // 0x05: mon, audio in 2nd 5 DIF sequence + // 0x15: stereo, audio only in 2nd 5 DIF sequence + // 0x10: stereo, audio only in 1st 5/6 DIF sequence + // 0x20: stereo, left ch in 1st 5/6 DIF sequence, right ch in 2nd 5/6 DIF sequence + // 0x26: stereo, rightch in 1st 6 DIF sequence, left ch in 2nd 6 DIF sequence + BYTE bAudQu[2]; //qbits, only support 12, 16, + + BYTE bNumAudPin; //how many pin(language) + WORD wAvgSamplesPerPinPerFrm[2]; //samples size for one audio pin in one frame(which has 10 or 12 DIF sequence) + WORD wBlkMode; //45 for NTSC, 54 for PAL + WORD wDIFMode; //5 for NTSC, 6 for PAL + WORD wBlkDiv; //15 for NTSC, 18 for PAL +} DVAudInfo; + +#endif // _DV_H_ diff --git a/windows_libs/mssdk/include/dvdevcod.h b/windows_libs/mssdk/include/dvdevcod.h new file mode 100644 index 00000000..bde6703c --- /dev/null +++ b/windows_libs/mssdk/include/dvdevcod.h @@ -0,0 +1,334 @@ +//------------------------------------------------------------------------------ +// File: DVDevCod.h +// +// Desc: List of standard DVD-Video event codes and the expected params. +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#define EC_DVDBASE 0x0100 + +#ifndef EXCLUDE_DVDEVCODE_ENUMS + +typedef enum _tagDVD_ERROR { + DVD_ERROR_Unexpected=1, // Something unexpected happened, perhaps content + // is incorrectly authored. Playback is stopped. + DVD_ERROR_CopyProtectFail=2, // Key exchange for DVD copy protection failed. + // Playback is stopped. + DVD_ERROR_InvalidDVD1_0Disc=3, // DVD-Video disc is incorrectly authored for v1.0 + // of spec. Playback is stopped. + DVD_ERROR_InvalidDiscRegion=4, // The Disc cannot be played because the disc is not + // authored to play in system region. + // The region mismatch may be fixable by + // changing the system region with dvdrgn.exe + DVD_ERROR_LowParentalLevel=5, // Player parental level is lower than the lowest parental + // level available in the DVD content. Playback is stopped. + DVD_ERROR_MacrovisionFail=6, // Macrovision Distribution Failed. + // Playback is stopped. + DVD_ERROR_IncompatibleSystemAndDecoderRegions=7, + // No discs can be played because the system region + // does not match the decoder region. + DVD_ERROR_IncompatibleDiscAndDecoderRegions=8 + // The disc cannot be played because the disc is + // not authored to be played in the decoder's region +} DVD_ERROR; + +typedef enum _tagDVD_WARNING { + DVD_WARNING_InvalidDVD1_0Disc=1,// DVD-Video disc is incorrectly authored. Playback + // can continue, but unexpected behavior may occur. + DVD_WARNING_FormatNotSupported=2,// A decoder would not support the current format. Playback + // of a stream (audio, video of SP) may not function. + DVD_WARNING_IllegalNavCommand=3,// The internal DVD navigation command processor attempted to + // process an illegal command. + DVD_WARNING_Open = 4, // File Open Failed + DVD_WARNING_Seek = 5, // File Seek Failed + DVD_WARNING_Read = 6 // File Read Failed +} DVD_WARNING; + +#endif + +// DVD-Video event codes +// ====================== +// +// All DVD-Video event are always passed on to the application, and are +// never processed by the filter graph + + +#define EC_DVD_DOMAIN_CHANGE (EC_DVDBASE + 0x01) +// Parameters: ( DWORD, void ) +// lParam1 is enum DVD_DOMAIN, and indicates the player's new domain +// +// Raised from following domains: all +// +// Signaled when ever the DVD player changes domains. + + +#define EC_DVD_TITLE_CHANGE (EC_DVDBASE + 0x02) +// Parameters: ( DWORD, void ) +// lParam1 is the new title number. +// +// Raised from following domains: DVD_DOMAIN_Title +// +// Indicates when the current title number changes. Title numbers +// range 1 to 99. This indicates the TTN, which is the title number +// with respect to the whole disc, not the VTS_TTN which is the title +// number with respect to just a current VTS. + + +#define EC_DVD_CHAPTER_START (EC_DVDBASE + 0x03) +// Parameters: ( DWORD, void ) +// lParam1 is the new chapter number (which is the program number for +// One_Sequential_PGC_Titles). +// +// Raised from following domains: DVD_DOMAIN_Title +// +// Signales that DVD player started playback of a new program in the Title +// domain. This is only signaled for One_Sequential_PGC_Titles. + + +#define EC_DVD_AUDIO_STREAM_CHANGE (EC_DVDBASE + 0x04) +// Parameters: ( DWORD, void ) +// lParam1 is the new user audio stream number. +// +// Raised from following domains: all +// +// Signaled when ever the current user audio stream number changes for the main +// title. This can be changed automatically with a navigation command on disc +// as well as through IDVDAnnexJ. +// Audio stream numbers range from 0 to 7. Stream 0xffffffff +// indicates that no stream is selected. + +#define EC_DVD_SUBPICTURE_STREAM_CHANGE (EC_DVDBASE + 0x05) +// Parameters: ( DWORD, void ) +// lParam1 is the new user subpicture stream number. +// +// Raised from following domains: all +// +// Signaled when ever the current user subpicture stream number changes for the main +// title. This can be changed automatically with a navigation command on disc +// as well as through IDVDAnnexJ. +// Subpicture stream numbers range from 0 to 31. Stream 0xffffffff +// indicates that no stream is selected. + +#define EC_DVD_ANGLE_CHANGE (EC_DVDBASE + 0x06) +// Parameters: ( DWORD, DWORD ) +// lParam1 is the number of available angles. +// lParam2 is the current user angle number. +// +// Raised from following domains: all +// +// Signaled when ever either +// a) the number of available angles changes, or +// b) the current user angle number changes. +// Current angle number can be changed automatically with navigation command +// on disc as well as through IDVDAnnexJ. +// When the number of available angles is 1, the current video is not multiangle. +// Angle numbers range from 1 to 9. + + +#define EC_DVD_BUTTON_CHANGE (EC_DVDBASE + 0x07) +// Parameters: ( DWORD, DWORD ) +// lParam1 is the number of available buttons. +// lParam2 is the current selected button number. +// +// Raised from following domains: all +// +// Signaled when ever either +// a) the number of available buttons changes, or +// b) the current selected button number changes. +// The current selected button can be changed automatically with navigation +// commands on disc as well as through IDVDAnnexJ. +// Button numbers range from 1 to 36. Selected button number 0 implies that +// no button is selected. Note that these button numbers enumerate all +// available button numbers, and do not always correspond to button numbers +// used for IDVDAnnexJ::ButtonSelectAndActivate since only a subset of buttons +// may be activated with ButtonSelectAndActivate. + + +#define EC_DVD_VALID_UOPS_CHANGE (EC_DVDBASE + 0x08) +// Parameters: ( DWORD, void ) +// lParam1 is a VALID_UOP_SOMTHING_OR_OTHER bit-field stuct which indicates +// which IDVDAnnexJ commands are explicitly disable by the DVD disc. +// +// Raised from following domains: all +// +// Signaled when ever the available set of IDVDAnnexJ methods changes. This +// only indicates which operations are explicited disabled by the content on +// the DVD disc, and does not guarentee that it is valid to call methods +// which are not disabled. For example, if no buttons are currently present, +// IDVDAnnexJ::ButtonActivate() won't work, even though the buttons are not +// explicitly disabled. + + +#define EC_DVD_STILL_ON (EC_DVDBASE + 0x09) +// Parameters: ( BOOL, DWORD ) +// lParam1 == 0 --> buttons are available, so StillOff won't work +// lParam1 == 1 --> no buttons available, so StillOff will work +// lParam2 indicates the number of seconds the still will last, with 0xffffffff +// indicating an infinite still (wait till button or StillOff selected). +// +// Raised from following domains: all +// +// Signaled at the beginning of any still: PGC still, Cell Still, or VOBU Still. +// Note that all combinations of buttons and still are possible (buttons on with +// still on, buttons on with still off, button off with still on, button off +// with still off). + +#define EC_DVD_STILL_OFF (EC_DVDBASE + 0x0a) +// Parameters: ( void, void ) +// +// Indicating that any still that is currently active +// has been released. +// +// Raised from following domains: all +// +// Signaled at the end of any still: PGC still, Cell Still, or VOBU Still. +// + +#define EC_DVD_CURRENT_TIME (EC_DVDBASE + 0x0b) +// Parameters: ( DWORD, BOOL ) +// lParam1 is a DVD_TIMECODE which indicates the current +// playback time code in a BCD HH:MM:SS:FF format. +// lParam2 == 0 --> time code is 25 frames/sec +// lParam2 == 1 --> time code is 30 frames/sec (non-drop). +// lParam2 == 2 --> time code is invalid (current playback time +// cannot be determined for current title) +// +// Raised from following domains: DVD_DOMAIN_Title +// +// Signaled at the beginning of every VOBU, which occurs every .4 to 1.0 sec. +// This is only signaled for One_Sequential_PGC_Titles. + + +#define EC_DVD_ERROR (EC_DVDBASE + 0x0c) +// Parameters: ( DWORD, void) +// lParam1 is an enum DVD_ERROR which notifies the app of some error condition. +// +// Raised from following domains: all +// + +#define EC_DVD_WARNING (EC_DVDBASE + 0x0d) +// Parameters: ( DWORD, void) +// lParam1 is an enum DVD_WARNING which notifies the app of some warning condition. +// +// Raised from following domains: all +// + +#define EC_DVD_CHAPTER_AUTOSTOP (EC_DVDBASE + 0x0e) +// Parameters: (BOOL, void) +// lParam1 is a BOOL which indicates the reason for the cancellation of ChapterPlayAutoStop +// lParam1 == 0 indicates successful completion of ChapterPlayAutoStop +// lParam1 == 1 indicates that ChapterPlayAutoStop is being cancelled as a result of another +// IDVDControl call or the end of content has been reached & no more chapters +// can be played. +// Indicating that playback is stopped as a result of a call +// to IDVDControl::ChapterPlayAutoStop() +// +// Raised from following domains : DVD_DOMAIN_TITLE +// + +#define EC_DVD_NO_FP_PGC (EC_DVDBASE + 0x0f) +// Parameters : (void, void) +// +// Raised from the following domains : FP_DOM +// +// Indicates that the DVD disc does not have a FP_PGC (First Play Program Chain) +// and the DVD Navigator will not automatically load any PGC and start playback. +// + +#define EC_DVD_PLAYBACK_RATE_CHANGE (EC_DVDBASE + 0x10) +// Parameters : (LONG, void) +// lParam1 is a LONG indicating the new playback rate. +// lParam1 < 0 indicates reverse playback mode. +// lParam1 > 0 indicates forward playback mode +// Value of lParam1 is the actual playback rate multiplied by 10000. +// i.e. lParam1 = rate * 10000 +// +// Raised from the following domains : TT_DOM +// +// Indicates that a rate change in playback has been initiated and the parameter +// lParam1 indicates the new playback rate that is being used. +// + +#define EC_DVD_PARENTAL_LEVEL_CHANGE (EC_DVDBASE + 0x11) +// Parameters : (LONG, void) +// lParam1 is a LONG indicating the new parental level. +// +// Raised from the following domains : VMGM_DOM +// +// Indicates that an authored Nav command has changed the parental level +// setting in the player. +// + +#define EC_DVD_PLAYBACK_STOPPED (EC_DVDBASE + 0x12) +// Parameters : (void, void) +// +// Raised from the following domains : All Domains +// +// Indicates that playback has been stopped as the Navigator has completed +// playback of the pgc and did not find any other branching instruction for +// subsequent playback. +// + +#define EC_DVD_ANGLES_AVAILABLE (EC_DVDBASE + 0x13) +// Parameters : (BOOL, void) +// lParam1 == 0 indicates that playback is not in an angle block and angles are +// not available +// lParam1 == 1 indicates that an angle block is being played back and angle changes +// can be performed. +// +// Indicates whether an angle block is being played and if angle changes can be +// performed. However, angle changes are not restricted to angle blocks and the +// manifestation of the angle change can be seen only in an angle block. + +#define EC_DVD_PLAYPERIOD_AUTOSTOP (EC_DVDBASE + 0x14) +// Parameters: (void, void) +// Sent when the PlayPeriodInTitle completes or is cancelled +// +// Raised from following domains : DVD_DOMAIN_TITLE +// + +#define EC_DVD_BUTTON_AUTO_ACTIVATED (EC_DVDBASE + 0x15) +// Parameters: (DWORD button, void) +// Sent when a button is automatically activated +// +// Raised from following domains : DVD_DOMAIN_MENU +// + +#define EC_DVD_CMD_START (EC_DVDBASE + 0x16) +// Parameters: (CmdID, HRESULT) +// Sent when a command begins +// + +#define EC_DVD_CMD_END (EC_DVDBASE + 0x17) +// Parameters: (CmdID, HRESULT) +// Sent when a command completes +// + +#define EC_DVD_DISC_EJECTED (EC_DVDBASE + 0x18) +// Parameters: none +// Sent when the nav detects that a disc was ejected and stops the playback +// The app does not need to take any action to stop the playback. +// + +#define EC_DVD_DISC_INSERTED (EC_DVDBASE + 0x19) +// Parameters: none +// Sent when the nav detects that a disc was inserted and the nav begins playback +// The app does not need to take any action to start the playback. +// + +#define EC_DVD_CURRENT_HMSF_TIME (EC_DVDBASE + 0x1a) +// Parameters: ( ULONG, ULONG ) +// lParam2 contains a union of the DVD_TIMECODE_FLAGS +// lParam1 contains a DVD_HMSF_TIMECODE. Assign lParam1 to a ULONG then cast the +// ULONG as a DVD_HMSF_TIMECODE to use its values. +// +// Raised from following domains: DVD_DOMAIN_Title +// +// Signaled at the beginning of every VOBU, which occurs every .4 to 1.0 sec. + +#define EC_DVD_KARAOKE_MODE (EC_DVDBASE + 0x1b) +// Parameters: ( BOOL, reserved ) +// lParam1 is either TRUE (a karaoke track is being played) or FALSE (no karaoke data is being played). +// diff --git a/windows_libs/mssdk/include/dvdmedia.h b/windows_libs/mssdk/include/dvdmedia.h new file mode 100644 index 00000000..603277ca --- /dev/null +++ b/windows_libs/mssdk/include/dvdmedia.h @@ -0,0 +1,403 @@ +//------------------------------------------------------------------------------ +// File: DVDMedia.h +// +// Desc: Contains typedefs and defines necessary for user mode (ring 3) DVD +// filters and applications. +// +// This should be included in the DirectShow SDK for user mode filters. +// The types defined here should be kept in synch with ksmedia.h WDM +// DDK for kernel mode filters. +// +// Copyright (c) 1997 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __DVDMEDIA_H__ +#define __DVDMEDIA_H__ + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// ----------------------------------------------------------------------- +// AC-3 definition for the AM_KSPROPSETID_AC3 property set +// ----------------------------------------------------------------------- + +typedef enum { + AM_PROPERTY_AC3_ERROR_CONCEALMENT = 1, + AM_PROPERTY_AC3_ALTERNATE_AUDIO = 2, + AM_PROPERTY_AC3_DOWNMIX = 3, + AM_PROPERTY_AC3_BIT_STREAM_MODE = 4, + AM_PROPERTY_AC3_DIALOGUE_LEVEL = 5, + AM_PROPERTY_AC3_LANGUAGE_CODE = 6, + AM_PROPERTY_AC3_ROOM_TYPE = 7 +} AM_PROPERTY_AC3; + +typedef struct { + BOOL fRepeatPreviousBlock; + BOOL fErrorInCurrentBlock; +} AM_AC3_ERROR_CONCEALMENT, *PAM_AC3_ERROR_CONCEALMENT; + +typedef struct { + BOOL fStereo; + ULONG DualMode; +} AM_AC3_ALTERNATE_AUDIO, *PAM_AC3_ALTERNATE_AUDIO; + +#define AM_AC3_ALTERNATE_AUDIO_1 1 +#define AM_AC3_ALTERNATE_AUDIO_2 2 +#define AM_AC3_ALTERNATE_AUDIO_BOTH 3 + +typedef struct { + BOOL fDownMix; + BOOL fDolbySurround; +} AM_AC3_DOWNMIX, *PAM_AC3_DOWNMIX; + +typedef struct { + LONG BitStreamMode; +} AM_AC3_BIT_STREAM_MODE, *PAM_AC3_BIT_STREAM_MODE; + +#define AM_AC3_SERVICE_MAIN_AUDIO 0 +#define AM_AC3_SERVICE_NO_DIALOG 1 +#define AM_AC3_SERVICE_VISUALLY_IMPAIRED 2 +#define AM_AC3_SERVICE_HEARING_IMPAIRED 3 +#define AM_AC3_SERVICE_DIALOG_ONLY 4 +#define AM_AC3_SERVICE_COMMENTARY 5 +#define AM_AC3_SERVICE_EMERGENCY_FLASH 6 +#define AM_AC3_SERVICE_VOICE_OVER 7 + +typedef struct { + ULONG DialogueLevel; +} AM_AC3_DIALOGUE_LEVEL, *PAM_AC3_DIALOGUE_LEVEL; + +typedef struct { + BOOL fLargeRoom; +} AM_AC3_ROOM_TYPE, *PAM_AC3_ROOM_TYPE; + + +// ----------------------------------------------------------------------- +// subpicture definition for the AM_KSPROPSETID_DvdSubPic property set +// ----------------------------------------------------------------------- + +typedef enum { + AM_PROPERTY_DVDSUBPIC_PALETTE = 0, + AM_PROPERTY_DVDSUBPIC_HLI = 1, + AM_PROPERTY_DVDSUBPIC_COMPOSIT_ON = 2 // TRUE for subpicture is displayed +} AM_PROPERTY_DVDSUBPIC; + +typedef struct _AM_DVD_YUV { + UCHAR Reserved; + UCHAR Y; + UCHAR U; + UCHAR V; +} AM_DVD_YUV, *PAM_DVD_YUV; + +typedef struct _AM_PROPERTY_SPPAL { + AM_DVD_YUV sppal[16]; +} AM_PROPERTY_SPPAL, *PAM_PROPERTY_SPPAL; + +typedef struct _AM_COLCON { + UCHAR emph1col:4; + UCHAR emph2col:4; + UCHAR backcol:4; + UCHAR patcol:4; + UCHAR emph1con:4; + UCHAR emph2con:4; + UCHAR backcon:4; + UCHAR patcon:4; + +} AM_COLCON, *PAM_COLCON; + +typedef struct _AM_PROPERTY_SPHLI { + USHORT HLISS; // + USHORT Reserved; + ULONG StartPTM; // start presentation time in x/90000 + ULONG EndPTM; // end PTM in x/90000 + USHORT StartX; + USHORT StartY; + USHORT StopX; + USHORT StopY; + AM_COLCON ColCon; // color contrast description (4 bytes as given in HLI) +} AM_PROPERTY_SPHLI, *PAM_PROPERTY_SPHLI; + +typedef BOOL AM_PROPERTY_COMPOSIT_ON, *PAM_PROPERTY_COMPOSIT_ON; + + + +// ----------------------------------------------------------------------- +// copy protection definitions +// ----------------------------------------------------------------------- + +// AM_UseNewCSSKey for the dwTypeSpecificFlags in IMediaSample2 to indicate +// the exact point in a stream after which to start applying a new CSS key. +// This is typically sent on an empty media sample just before attempting +// to renegotiate a CSS key. +#define AM_UseNewCSSKey 0x1 + +// +// AM_KSPROPSETID_CopyProt property set definitions +// +typedef enum { + AM_PROPERTY_DVDCOPY_CHLG_KEY = 0x01, + AM_PROPERTY_DVDCOPY_DVD_KEY1 = 0x02, + AM_PROPERTY_DVDCOPY_DEC_KEY2 = 0x03, + AM_PROPERTY_DVDCOPY_TITLE_KEY = 0x04, + AM_PROPERTY_COPY_MACROVISION = 0x05, + AM_PROPERTY_DVDCOPY_REGION = 0x06, + AM_PROPERTY_DVDCOPY_SET_COPY_STATE = 0x07, + AM_PROPERTY_DVDCOPY_DISC_KEY = 0x80 +} AM_PROPERTY_DVDCOPYPROT; + +typedef struct _AM_DVDCOPY_CHLGKEY { + BYTE ChlgKey[10]; + BYTE Reserved[2]; +} AM_DVDCOPY_CHLGKEY, *PAM_DVDCOPY_CHLGKEY; + +typedef struct _AM_DVDCOPY_BUSKEY { + BYTE BusKey[5]; + BYTE Reserved[1]; +} AM_DVDCOPY_BUSKEY, *PAM_DVDCOPY_BUSKEY; + +typedef struct _AM_DVDCOPY_DISCKEY { + BYTE DiscKey[2048]; +} AM_DVDCOPY_DISCKEY, *PAM_DVDCOPY_DISCKEY; + +typedef struct AM_DVDCOPY_TITLEKEY { + ULONG KeyFlags; + ULONG Reserved1[2]; + UCHAR TitleKey[6]; + UCHAR Reserved2[2]; +} AM_DVDCOPY_TITLEKEY, *PAM_DVDCOPY_TITLEKEY; + +typedef struct _AM_COPY_MACROVISION { + ULONG MACROVISIONLevel; +} AM_COPY_MACROVISION, *PAM_COPY_MACROVISION; + +typedef struct AM_DVDCOPY_SET_COPY_STATE { + ULONG DVDCopyState; +} AM_DVDCOPY_SET_COPY_STATE, *PAM_DVDCOPY_SET_COPY_STATE; + +typedef enum { + AM_DVDCOPYSTATE_INITIALIZE = 0, + AM_DVDCOPYSTATE_INITIALIZE_TITLE = 1, // indicates we are starting a title + // key copy protection sequence + AM_DVDCOPYSTATE_AUTHENTICATION_NOT_REQUIRED = 2, + AM_DVDCOPYSTATE_AUTHENTICATION_REQUIRED = 3, + AM_DVDCOPYSTATE_DONE = 4 +} AM_DVDCOPYSTATE; + +typedef enum { + AM_MACROVISION_DISABLED = 0, + AM_MACROVISION_LEVEL1 = 1, + AM_MACROVISION_LEVEL2 = 2, + AM_MACROVISION_LEVEL3 = 3 +} AM_COPY_MACROVISION_LEVEL, *PAM_COPY_MACROVISION_LEVEL; + + +// CSS region stucture +typedef struct _DVD_REGION { + UCHAR CopySystem; + UCHAR RegionData; + UCHAR SystemRegion; + UCHAR Reserved; +} DVD_REGION, *PDVD_REGION; + +// +// CGMS Copy Protection Flags +// + +#define AM_DVD_CGMS_RESERVED_MASK 0x00000078 + +#define AM_DVD_CGMS_COPY_PROTECT_MASK 0x00000018 +#define AM_DVD_CGMS_COPY_PERMITTED 0x00000000 +#define AM_DVD_CGMS_COPY_ONCE 0x00000010 +#define AM_DVD_CGMS_NO_COPY 0x00000018 + +#define AM_DVD_COPYRIGHT_MASK 0x00000040 +#define AM_DVD_NOT_COPYRIGHTED 0x00000000 +#define AM_DVD_COPYRIGHTED 0x00000040 + +#define AM_DVD_SECTOR_PROTECT_MASK 0x00000020 +#define AM_DVD_SECTOR_NOT_PROTECTED 0x00000000 +#define AM_DVD_SECTOR_PROTECTED 0x00000020 + + +// ----------------------------------------------------------------------- +// video format blocks +// ----------------------------------------------------------------------- + +enum AM_MPEG2Level { + AM_MPEG2Level_Low = 1, + AM_MPEG2Level_Main = 2, + AM_MPEG2Level_High1440 = 3, + AM_MPEG2Level_High = 4 +}; + +enum AM_MPEG2Profile { + AM_MPEG2Profile_Simple = 1, + AM_MPEG2Profile_Main = 2, + AM_MPEG2Profile_SNRScalable = 3, + AM_MPEG2Profile_SpatiallyScalable = 4, + AM_MPEG2Profile_High = 5 +}; + +#define AMINTERLACE_IsInterlaced 0x00000001 // if 0, other interlace bits are irrelevent +#define AMINTERLACE_1FieldPerSample 0x00000002 // else 2 fields per media sample +#define AMINTERLACE_Field1First 0x00000004 // else Field 2 is first; top field in PAL is field 1, top field in NTSC is field 2? +#define AMINTERLACE_UNUSED 0x00000008 // +#define AMINTERLACE_FieldPatternMask 0x00000030 // use this mask with AMINTERLACE_FieldPat* +#define AMINTERLACE_FieldPatField1Only 0x00000000 // stream never contains a Field2 +#define AMINTERLACE_FieldPatField2Only 0x00000010 // stream never contains a Field1 +#define AMINTERLACE_FieldPatBothRegular 0x00000020 // There will be a Field2 for every Field1 (required for Weave?) +#define AMINTERLACE_FieldPatBothIrregular 0x00000030 // Random pattern of Field1s and Field2s +#define AMINTERLACE_DisplayModeMask 0x000000c0 +#define AMINTERLACE_DisplayModeBobOnly 0x00000000 +#define AMINTERLACE_DisplayModeWeaveOnly 0x00000040 +#define AMINTERLACE_DisplayModeBobOrWeave 0x00000080 + +#define AMCOPYPROTECT_RestrictDuplication 0x00000001 // duplication of this stream should be restricted + +#define AMMPEG2_DoPanScan 0x00000001 //if set, the MPEG-2 video decoder should crop output image + // based on pan-scan vectors in picture_display_extension + // and change the picture aspect ratio accordingly. +#define AMMPEG2_DVDLine21Field1 0x00000002 //if set, the MPEG-2 decoder must be able to produce an output + // pin for DVD style closed caption data found in GOP layer of field 1 +#define AMMPEG2_DVDLine21Field2 0x00000004 //if set, the MPEG-2 decoder must be able to produce an output + // pin for DVD style closed caption data found in GOP layer of field 2 +#define AMMPEG2_SourceIsLetterboxed 0x00000008 //if set, indicates that black bars have been encoded in the top + // and bottom of the video. +#define AMMPEG2_FilmCameraMode 0x00000010 //if set, indicates "film mode" used for 625/50 content. If cleared, + // indicates that "camera mode" was used. +#define AMMPEG2_LetterboxAnalogOut 0x00000020 //if set and this stream is sent to an analog output, it should + // be letterboxed. Streams sent to VGA should be letterboxed only by renderers. + + +typedef struct tagVIDEOINFOHEADER2 { + RECT rcSource; + RECT rcTarget; + DWORD dwBitRate; + DWORD dwBitErrorRate; + REFERENCE_TIME AvgTimePerFrame; + DWORD dwInterlaceFlags; // use AMINTERLACE_* defines. Reject connection if undefined bits are not 0 + DWORD dwCopyProtectFlags; // use AMCOPYPROTECT_* defines. Reject connection if undefined bits are not 0 + DWORD dwPictAspectRatioX; // X dimension of picture aspect ratio, e.g. 16 for 16x9 display + DWORD dwPictAspectRatioY; // Y dimension of picture aspect ratio, e.g. 9 for 16x9 display + DWORD dwReserved1; // must be 0; reject connection otherwise + DWORD dwReserved2; // must be 0; reject connection otherwise + BITMAPINFOHEADER bmiHeader; +} VIDEOINFOHEADER2; + +typedef struct tagMPEG2VIDEOINFO { + VIDEOINFOHEADER2 hdr; + DWORD dwStartTimeCode; // ?? not used for DVD ?? + DWORD cbSequenceHeader; // is 0 for DVD (no sequence header) + DWORD dwProfile; // use enum MPEG2Profile + DWORD dwLevel; // use enum MPEG2Level + DWORD dwFlags; // use AMMPEG2_* defines. Reject connection if undefined bits are not 0 + DWORD dwSequenceHeader[1]; // DWORD instead of Byte for alignment purposes + // For MPEG-2, if a sequence_header is included, the sequence_extension + // should also be included +} MPEG2VIDEOINFO; + +#define SIZE_MPEG2VIDEOINFO(pv) (FIELD_OFFSET(MPEG2VIDEOINFO, dwSequenceHeader[0]) + (pv)->cbSequenceHeader) + +// do not use +#define MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader) + +// use this macro instead, the previous only works for MPEG1VIDEOINFO structures +#define MPEG2_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->dwSequenceHeader) + + +//=================================================================================== +// flags for dwTypeSpecificFlags in AM_SAMPLE2_PROPERTIES which define type specific +// data in IMediaSample2 +//=================================================================================== + +#define AM_VIDEO_FLAG_FIELD_MASK 0x0003L // use this mask to check whether the sample is field1 or field2 or frame +#define AM_VIDEO_FLAG_INTERLEAVED_FRAME 0x0000L // the sample is a frame (remember to use AM_VIDEO_FLAG_FIELD_MASK when using this) +#define AM_VIDEO_FLAG_FIELD1 0x0001L // the sample is field1 (remember to use AM_VIDEO_FLAG_FIELD_MASK when using this) +#define AM_VIDEO_FLAG_FIELD2 0x0002L // the sample is the field2 (remember to use AM_VIDEO_FLAG_FIELD_MASK when using this) +#define AM_VIDEO_FLAG_FIELD1FIRST 0x0004L // if set means display field1 first, else display field2 first. + // this bit is irrelavant for 1FieldPerSample mode +#define AM_VIDEO_FLAG_WEAVE 0x0008L // if set use bob display mode else weave +#define AM_VIDEO_FLAG_IPB_MASK 0x0030L // use this mask to check whether the sample is I, P or B +#define AM_VIDEO_FLAG_I_SAMPLE 0x0000L // I Sample (remember to use AM_VIDEO_FLAG_IPB_MASK when using this) +#define AM_VIDEO_FLAG_P_SAMPLE 0x0010L // P Sample (remember to use AM_VIDEO_FLAG_IPB_MASK when using this) +#define AM_VIDEO_FLAG_B_SAMPLE 0x0020L // B Sample (remember to use AM_VIDEO_FLAG_IPB_MASK when using this) +#define AM_VIDEO_FLAG_REPEAT_FIELD 0x0040L // if set means display the field which has been displayed first again after displaying + // both fields first. This bit is irrelavant for 1FieldPerSample mode + +// ----------------------------------------------------------------------- +// AM_KSPROPSETID_DvdKaraoke property set definitions +// ----------------------------------------------------------------------- + +typedef struct tagAM_DvdKaraokeData +{ + DWORD dwDownmix; // bitwise OR of AM_DvdKaraoke_Downmix flags + DWORD dwSpeakerAssignment; // AM_DvdKaraoke_SpeakerAssignment +} AM_DvdKaraokeData; + +typedef enum { + AM_PROPERTY_DVDKARAOKE_ENABLE = 0, // BOOL + AM_PROPERTY_DVDKARAOKE_DATA = 1, +} AM_PROPERTY_DVDKARAOKE; + +// ----------------------------------------------------------------------- +// AM_KSPROPSETID_TSRateChange property set definitions for time stamp +// rate changes. +// ----------------------------------------------------------------------- + +typedef enum { + AM_RATE_SimpleRateChange = 1, // rw, use AM_SimpleRateChange + AM_RATE_ExactRateChange = 2, // rw, use AM_ExactRateChange + AM_RATE_MaxFullDataRate = 3, // r, use AM_MaxFullDataRate + AM_RATE_Step = 4 // w, use AM_Step +} AM_PROPERTY_TS_RATE_CHANGE; + +// ------------------------------------------------------------------- +// AM_KSPROPSETID_DVD_RateChange property set definitions for new DVD +// rate change scheme. +// ------------------------------------------------------------------- + +typedef enum { + AM_RATE_ChangeRate = 1, // w, use AM_DVD_ChangeRate + AM_RATE_FullDataRateMax = 2, // r, use AM_MaxFullDataRate + AM_RATE_ReverseDecode = 3, // r, use LONG + AM_RATE_DecoderPosition = 4, // r, use AM_DVD_DecoderPosition + AM_RATE_DecoderVersion = 5 // r, use LONG +} AM_PROPERTY_DVD_RATE_CHANGE; + +typedef struct { + // this is the simplest mechanism to set a time stamp rate change on + // a filter (simplest for the person setting the rate change, harder + // for the filter doing the rate change). + REFERENCE_TIME StartTime; //stream time at which to start this rate + LONG Rate; //new rate * 10000 (decimal) +} AM_SimpleRateChange; + +typedef struct { + REFERENCE_TIME OutputZeroTime; //input TS that maps to zero output TS + LONG Rate; //new rate * 10000 (decimal) +} AM_ExactRateChange; + +typedef LONG AM_MaxFullDataRate; //rate * 10000 (decimal) + +typedef DWORD AM_Step; // number of frame to step + +// New rate change property set, structs. enums etc. +typedef struct { + REFERENCE_TIME StartInTime; // stream time (input) at which to start decoding at this rate + REFERENCE_TIME StartOutTime; // reference time (output) at which to start showing at this rate + LONG Rate; // new rate * 10000 (decimal) +} AM_DVD_ChangeRate ; + +typedef LONGLONG AM_DVD_DecoderPosition ; + +typedef enum { + DVD_DIR_FORWARD = 0, + DVD_DIR_BACKWARD = 1 +} DVD_PLAY_DIRECTION ; + +#ifdef __cplusplus +} +#endif // __cplusplus +#endif // __DVDMEDIA_H__ diff --git a/windows_libs/mssdk/include/dvoice.h b/windows_libs/mssdk/include/dvoice.h new file mode 100644 index 00000000..c8689a44 --- /dev/null +++ b/windows_libs/mssdk/include/dvoice.h @@ -0,0 +1,850 @@ +/*==========================================================================; + * + * Copyright (C) 1999 Microsoft Corporation. All Rights Reserved. + * + * File: dpvoice.h + * Content: DirectPlayVoice include file + ***************************************************************************/ + +#ifndef __DVOICE__ +#define __DVOICE__ + +#include // for DECLARE_INTERFACE and HRESULT +#include +#include +#include +#include "dsound.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/**************************************************************************** + * + * DirectPlayVoice CLSIDs + * + ****************************************************************************/ + + +// {B9F3EB85-B781-4ac1-8D90-93A05EE37D7D} +DEFINE_GUID(CLSID_DirectPlayVoiceClient, +0xb9f3eb85, 0xb781, 0x4ac1, 0x8d, 0x90, 0x93, 0xa0, 0x5e, 0xe3, 0x7d, 0x7d); + +// {D3F5B8E6-9B78-4a4c-94EA-CA2397B663D3} +DEFINE_GUID(CLSID_DirectPlayVoiceServer, +0xd3f5b8e6, 0x9b78, 0x4a4c, 0x94, 0xea, 0xca, 0x23, 0x97, 0xb6, 0x63, 0xd3); + +// {0F0F094B-B01C-4091-A14D-DD0CD807711A} +DEFINE_GUID(CLSID_DirectPlayVoiceTest, +0xf0f094b, 0xb01c, 0x4091, 0xa1, 0x4d, 0xdd, 0xc, 0xd8, 0x7, 0x71, 0x1a); + +/**************************************************************************** + * + * DirectPlayVoice Interface IIDs + * + ****************************************************************************/ + + +// {1DFDC8EA-BCF7-41d6-B295-AB64B3B23306} +DEFINE_GUID(IID_IDirectPlayVoiceClient, +0x1dfdc8ea, 0xbcf7, 0x41d6, 0xb2, 0x95, 0xab, 0x64, 0xb3, 0xb2, 0x33, 0x6); + +// {FAA1C173-0468-43b6-8A2A-EA8A4F2076C9} +DEFINE_GUID(IID_IDirectPlayVoiceServer, +0xfaa1c173, 0x468, 0x43b6, 0x8a, 0x2a, 0xea, 0x8a, 0x4f, 0x20, 0x76, 0xc9); + +// {D26AF734-208B-41da-8224-E0CE79810BE1} +DEFINE_GUID(IID_IDirectPlayVoiceTest, +0xd26af734, 0x208b, 0x41da, 0x82, 0x24, 0xe0, 0xce, 0x79, 0x81, 0xb, 0xe1); + +/**************************************************************************** + * + * DirectPlayVoice Compression Type GUIDs + * + ****************************************************************************/ + +// MS-ADPCM 32.8 kbit/s +// +// {699B52C1-A885-46a8-A308-97172419ADC7} +DEFINE_GUID(DPVCTGUID_ADPCM, +0x699b52c1, 0xa885, 0x46a8, 0xa3, 0x8, 0x97, 0x17, 0x24, 0x19, 0xad, 0xc7); + +// Microsoft GSM 6.10 13 kbit/s +// +// {24768C60-5A0D-11d3-9BE4-525400D985E7} +DEFINE_GUID(DPVCTGUID_GSM, +0x24768c60, 0x5a0d, 0x11d3, 0x9b, 0xe4, 0x52, 0x54, 0x0, 0xd9, 0x85, 0xe7); + +// MS-PCM 64 kbit/s +// +// {8DE12FD4-7CB3-48ce-A7E8-9C47A22E8AC5} +DEFINE_GUID(DPVCTGUID_NONE, +0x8de12fd4, 0x7cb3, 0x48ce, 0xa7, 0xe8, 0x9c, 0x47, 0xa2, 0x2e, 0x8a, 0xc5); + +// Voxware SC03 3.2kbit/s +// +// {7D82A29B-2242-4f82-8F39-5D1153DF3E41} +DEFINE_GUID(DPVCTGUID_SC03, +0x7d82a29b, 0x2242, 0x4f82, 0x8f, 0x39, 0x5d, 0x11, 0x53, 0xdf, 0x3e, 0x41); + +// Voxware SC06 6.4kbit/s +// +// {53DEF900-7168-4633-B47F-D143916A13C7} +DEFINE_GUID(DPVCTGUID_SC06, +0x53def900, 0x7168, 0x4633, 0xb4, 0x7f, 0xd1, 0x43, 0x91, 0x6a, 0x13, 0xc7); + +// TrueSpeech(TM) 8.6 kbit/s +// +// {D7954361-5A0B-11d3-9BE4-525400D985E7} +DEFINE_GUID(DPVCTGUID_TRUESPEECH, +0xd7954361, 0x5a0b, 0x11d3, 0x9b, 0xe4, 0x52, 0x54, 0x0, 0xd9, 0x85, 0xe7); + +// Voxware VR12 1.4kbit/s +// +// {FE44A9FE-8ED4-48bf-9D66-1B1ADFF9FF6D} +DEFINE_GUID(DPVCTGUID_VR12, +0xfe44a9fe, 0x8ed4, 0x48bf, 0x9d, 0x66, 0x1b, 0x1a, 0xdf, 0xf9, 0xff, 0x6d); + +// Define the default compression type +#define DPVCTGUID_DEFAULT DPVCTGUID_SC03 + +/**************************************************************************** + * + * DirectPlayVoice Interface Pointer definitions + * + ****************************************************************************/ + +typedef struct IDirectPlayVoiceClient FAR *LPDIRECTPLAYVOICECLIENT, *PDIRECTPLAYVOICECLIENT; +typedef struct IDirectPlayVoiceServer FAR *LPDIRECTPLAYVOICESERVER, *PDIRECTPLAYVOICESERVER; +typedef struct IDirectPlayVoiceTest FAR *LPDIRECTPLAYVOICETEST, *PDIRECTPLAYVOICETEST; + +/**************************************************************************** + * + * DirectPlayVoice Callback Functions + * + ****************************************************************************/ +typedef HRESULT (FAR PASCAL *PDVMESSAGEHANDLER)( + PVOID pvUserContext, + DWORD dwMessageType, + LPVOID lpMessage +); + +typedef PDVMESSAGEHANDLER LPDVMESSAGEHANDLER; + +/**************************************************************************** + * + * DirectPlayVoice Datatypes (Non-Structure / Non-Message) + * + ****************************************************************************/ + +typedef DWORD DVID, *LPDVID, *PDVID; + +/**************************************************************************** + * + * DirectPlayVoice Message Types + * + ****************************************************************************/ + +#define DVMSGID_BASE 0x0000 + +#define DVMSGID_MINBASE (DVMSGID_CREATEVOICEPLAYER) +#define DVMSGID_CREATEVOICEPLAYER (DVMSGID_BASE+0x0001) +#define DVMSGID_DELETEVOICEPLAYER (DVMSGID_BASE+0x0002) +#define DVMSGID_SESSIONLOST (DVMSGID_BASE+0x0003) +#define DVMSGID_PLAYERVOICESTART (DVMSGID_BASE+0x0004) +#define DVMSGID_PLAYERVOICESTOP (DVMSGID_BASE+0x0005) +#define DVMSGID_RECORDSTART (DVMSGID_BASE+0x0006) +#define DVMSGID_RECORDSTOP (DVMSGID_BASE+0x0007) +#define DVMSGID_CONNECTRESULT (DVMSGID_BASE+0x0008) +#define DVMSGID_DISCONNECTRESULT (DVMSGID_BASE+0x0009) +#define DVMSGID_INPUTLEVEL (DVMSGID_BASE+0x000A) +#define DVMSGID_OUTPUTLEVEL (DVMSGID_BASE+0x000B) +#define DVMSGID_HOSTMIGRATED (DVMSGID_BASE+0x000C) +#define DVMSGID_SETTARGETS (DVMSGID_BASE+0x000D) +#define DVMSGID_PLAYEROUTPUTLEVEL (DVMSGID_BASE+0x000E) +#define DVMSGID_LOSTFOCUS (DVMSGID_BASE+0x0010) +#define DVMSGID_GAINFOCUS (DVMSGID_BASE+0x0011) +#define DVMSGID_LOCALHOSTSETUP (DVMSGID_BASE+0x0012) +#define DVMSGID_MAXBASE (DVMSGID_LOCALHOSTSETUP) + +/**************************************************************************** + * + * DirectPlayVoice Constants + * + ****************************************************************************/ + +// +// Buffer Aggresiveness Value Ranges +// +#define DVBUFFERAGGRESSIVENESS_MIN 0x00000001 +#define DVBUFFERAGGRESSIVENESS_MAX 0x00000064 +#define DVBUFFERAGGRESSIVENESS_DEFAULT 0x00000000 + +// +// Buffer Quality Value Ranges +// +#define DVBUFFERQUALITY_MIN 0x00000001 +#define DVBUFFERQUALITY_MAX 0x00000064 +#define DVBUFFERQUALITY_DEFAULT 0x00000000 + +#define DVID_SYS 0 + +// +// Used to identify the session host in client/server +// +#define DVID_SERVERPLAYER 1 + +// +// Used to target all players +// +#define DVID_ALLPLAYERS 0 + +// +// Used to identify the main buffer +// +#define DVID_REMAINING 0xFFFFFFFF + +// +// Input level range +// +#define DVINPUTLEVEL_MIN 0x00000000 +#define DVINPUTLEVEL_MAX 0x00000063 // 99 decimal + +#define DVNOTIFYPERIOD_MINPERIOD 20 + + +#define DVPLAYBACKVOLUME_DEFAULT DSBVOLUME_MAX + +#define DVRECORDVOLUME_LAST 0x00000001 + + +// +// Use the default value +// +#define DVTHRESHOLD_DEFAULT 0xFFFFFFFF + +// +// Threshold Ranges +// +#define DVTHRESHOLD_MIN 0x00000000 +#define DVTHRESHOLD_MAX 0x00000063 // 99 decimal + +// +// Threshold field is not used +// +#define DVTHRESHOLD_UNUSED 0xFFFFFFFE + +// +// Session Types +// +#define DVSESSIONTYPE_PEER 0x00000001 +#define DVSESSIONTYPE_MIXING 0x00000002 +#define DVSESSIONTYPE_FORWARDING 0x00000003 +#define DVSESSIONTYPE_ECHO 0x00000004 + +/**************************************************************************** + * + * DirectPlayVoice Flags + * + ****************************************************************************/ + + +// +// Enable automatic adjustment of the recording volume +// +#define DVCLIENTCONFIG_AUTORECORDVOLUME 0x00000008 + +// +// Enable automatic voice activation +// +#define DVCLIENTCONFIG_AUTOVOICEACTIVATED 0x00000020 + +// +// Enable echo suppression +// +#define DVCLIENTCONFIG_ECHOSUPPRESSION 0x08000000 + +// +// Voice Activation manual mode +// +#define DVCLIENTCONFIG_MANUALVOICEACTIVATED 0x00000004 + +// +// Only playback voices that have buffers created for them +// +#define DVCLIENTCONFIG_MUTEGLOBAL 0x00000010 + +// +// Mute the playback +// +#define DVCLIENTCONFIG_PLAYBACKMUTE 0x00000002 + +// +// Mute the recording +// +#define DVCLIENTCONFIG_RECORDMUTE 0x00000001 + +// +// Complete the operation before returning +// +#define DVFLAGS_SYNC 0x00000001 + +// +// Just check to see if wizard has been run, and if so what it's results were +// +#define DVFLAGS_QUERYONLY 0x00000002 + +// +// Shutdown the voice session without migrating the host +// +#define DVFLAGS_NOHOSTMIGRATE 0x00000008 + +// +// Allow the back button to be enabled in the wizard +// +#define DVFLAGS_ALLOWBACK 0x00000010 + +// +// Disable host migration in the voice session +// +#define DVSESSION_NOHOSTMIGRATION 0x00000001 + +// +// Server controlled targetting +// +#define DVSESSION_SERVERCONTROLTARGET 0x00000002 + +// +// Use DirectSound Normal Mode instead of priority +// +#define DVSOUNDCONFIG_NORMALMODE 0x00000001 + +// +// Automatically select the microphone +// +#define DVSOUNDCONFIG_AUTOSELECT 0x00000002 + +// +// Run in half duplex mode +// +#define DVSOUNDCONFIG_HALFDUPLEX 0x00000004 + +// +// No volume controls are available for the recording device +// +#define DVSOUNDCONFIG_NORECVOLAVAILABLE 0x00000010 + +// +// Disable capture sharing +// +#define DVSOUNDCONFIG_NOFOCUS 0x20000000 + +// +// Set system conversion quality to high +// +#define DVSOUNDCONFIG_SETCONVERSIONQUALITY 0x00000008 + +// +// Enable strict focus mode +// +#define DVSOUNDCONFIG_STRICTFOCUS 0x40000000 + +// +// Player is in half duplex mode +// +#define DVPLAYERCAPS_HALFDUPLEX 0x00000001 + +// +// Specifies that player is the local player +// +#define DVPLAYERCAPS_LOCAL 0x00000002 + + +/**************************************************************************** + * + * DirectPlayVoice Structures (Non-Message) + * + ****************************************************************************/ + + +// +// DirectPlayVoice Caps +// (GetCaps / SetCaps) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + DWORD dwFlags; // Caps flags +} DVCAPS, *LPDVCAPS, *PDVCAPS; + +// +// DirectPlayVoice Client Configuration +// (Connect / GetClientConfig) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + DWORD dwFlags; // Flags for client config (DVCLIENTCONFIG_...) + LONG lRecordVolume; // Recording volume + LONG lPlaybackVolume; // Playback volume + DWORD dwThreshold; // Voice Activation Threshold + DWORD dwBufferQuality; // Buffer quality + DWORD dwBufferAggressiveness; // Buffer aggressiveness + DWORD dwNotifyPeriod; // Period of notification messages (ms) +} DVCLIENTCONFIG, *LPDVCLIENTCONFIG, *PDVCLIENTCONFIG; + +// +// DirectPlayVoice Compression Type Information +// (GetCompressionTypes) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + GUID guidType; // GUID that identifies this compression type + LPWSTR lpszName; // String name of this compression type + LPWSTR lpszDescription; // Description for this compression type + DWORD dwFlags; // Flags for this compression type + DWORD dwMaxBitsPerSecond; // Maximum # of bit/s this compression type uses +} DVCOMPRESSIONINFO, *LPDVCOMPRESSIONINFO, *PDVCOMPRESSIONINFO; + +// +// DirectPlayVoice Session Description +// (Host / GetSessionDesc) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + DWORD dwFlags; // Session flags (DVSESSION_...) + DWORD dwSessionType; // Session type (DVSESSIONTYPE_...) + GUID guidCT; // Compression Type to use + DWORD dwBufferQuality; // Buffer quality + DWORD dwBufferAggressiveness; // Buffer aggresiveness +} DVSESSIONDESC, *LPDVSESSIONDESC, *PDVSESSIONDESC; + +// +// DirectPlayVoice Client Sound Device Configuration +// (Connect / GetSoundDeviceConfig) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + DWORD dwFlags; // Flags for sound config (DVSOUNDCONFIG_...) + GUID guidPlaybackDevice; // GUID of the playback device to use + LPDIRECTSOUND lpdsPlaybackDevice; // DirectSound Object to use (optional) + GUID guidCaptureDevice; // GUID of the capture device to use + LPDIRECTSOUNDCAPTURE lpdsCaptureDevice; // DirectSoundCapture Object to use (optional) + HWND hwndAppWindow; // HWND of your application's top-level window + LPDIRECTSOUNDBUFFER lpdsMainBuffer; // DirectSoundBuffer to use for playback (optional) + DWORD dwMainBufferFlags; // Flags to pass to Play() on the main buffer + DWORD dwMainBufferPriority; // Priority to set when calling Play() on the main buffer +} DVSOUNDDEVICECONFIG, *LPDVSOUNDDEVICECONFIG, *PDVSOUNDDEVICECONFIG; + +/**************************************************************************** + * + * DirectPlayVoice message handler call back structures + * + ****************************************************************************/ + +// +// Result of the Connect() call. (If it wasn't called Async) +// (DVMSGID_CONNECTRESULT) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + HRESULT hrResult; // Result of the Connect() call +} DVMSG_CONNECTRESULT, *LPDVMSG_CONNECTRESULT, *PDVMSG_CONNECTRESULT; + +// +// A new player has entered the voice session +// (DVMSGID_CREATEVOICEPLAYER) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + DVID dvidPlayer; // DVID of the player who joined + DWORD dwFlags; // Player flags (DVPLAYERCAPS_...) + PVOID pvPlayerContext; // Context value for this player (user set) +} DVMSG_CREATEVOICEPLAYER, *LPDVMSG_CREATEVOICEPLAYER, *PDVMSG_CREATEVOICEPLAYER; + +// +// A player has left the voice session +// (DVMSGID_DELETEVOICEPLAYER) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + DVID dvidPlayer; // DVID of the player who left + PVOID pvPlayerContext; // Context value for the player +} DVMSG_DELETEVOICEPLAYER, *LPDVMSG_DELETEVOICEPLAYER, *PDVMSG_DELETEVOICEPLAYER; + +// +// Result of the Disconnect() call. (If it wasn't called Async) +// (DVMSGID_DISCONNECTRESULT) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + HRESULT hrResult; // Result of the Disconnect() call +} DVMSG_DISCONNECTRESULT, *LPDVMSG_DISCONNECTRESULT, *PDVMSG_DISCONNECTRESULT; + +// +// The voice session host has migrated. +// (DVMSGID_HOSTMIGRATED) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + DVID dvidNewHostID; // DVID of the player who is now the host + LPDIRECTPLAYVOICESERVER pdvServerInterface; + // Pointer to the new host object (if local player is now host) +} DVMSG_HOSTMIGRATED, *LPDVMSG_HOSTMIGRATED, *PDVMSG_HOSTMIGRATED; + +// +// The current input level / recording volume on the local machine +// (DVMSGID_INPUTLEVEL) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + DWORD dwPeakLevel; // Current peak level of the audio + LONG lRecordVolume; // Current recording volume + PVOID pvLocalPlayerContext; // Context value for the local player +} DVMSG_INPUTLEVEL, *LPDVMSG_INPUTLEVEL, *PDVMSG_INPUTLEVEL; + +// +// The local client is about to become the new host +// (DVMSGID_LOCALHOSTSETUP) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + PVOID pvContext; // Context value to be passed to Initialize() of new host object + PDVMESSAGEHANDLER pMessageHandler; // Message handler to be used by new host object +} DVMSG_LOCALHOSTSETUP, *LPDVMSG_LOCALHOSTSETUP, *PDVMSG_LOCALHOSTSETUP; + +// +// The current output level for the combined output of all incoming streams. +// (DVMSGID_OUTPUTLEVEL) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + DWORD dwPeakLevel; // Current peak level of the output + LONG lOutputVolume; // Current playback volume + PVOID pvLocalPlayerContext; // Context value for the local player +} DVMSG_OUTPUTLEVEL, *LPDVMSG_OUTPUTLEVEL, *PDVMSG_OUTPUTLEVEL; + +// +// The current peak level of an individual player's incoming audio stream as it is +// being played back. +// (DVMSGID_PLAYEROUTPUTLEVEL) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + DVID dvidSourcePlayerID; // DVID of the player + DWORD dwPeakLevel; // Peak level of the player's stream + PVOID pvPlayerContext; // Context value for the player +} DVMSG_PLAYEROUTPUTLEVEL, *LPDVMSG_PLAYEROUTPUTLEVEL, *PDVMSG_PLAYEROUTPUTLEVEL; + +// +// An audio stream from the specified player has started playing back on the local client. +// (DVMSGID_PLAYERVOICESTART). +// +typedef struct +{ + DWORD dwSize; // Size of this structure + DVID dvidSourcePlayerID; // DVID of the Player + PVOID pvPlayerContext; // Context value for this player +} DVMSG_PLAYERVOICESTART, *LPDVMSG_PLAYERVOICESTART, *PDVMSG_PLAYERVOICESTART; + +// +// The audio stream from the specified player has stopped playing back on the local client. +// (DVMSGID_PLAYERVOICESTOP) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + DVID dvidSourcePlayerID; // DVID of the player + PVOID pvPlayerContext; // Context value for this player +} DVMSG_PLAYERVOICESTOP, *LPDVMSG_PLAYERVOICESTOP, *PDVMSG_PLAYERVOICESTOP; + +// +// Transmission has started on the local machine +// (DVMSGID_RECORDSTART) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + DWORD dwPeakLevel; // Peak level that caused transmission to start + PVOID pvLocalPlayerContext; // Context value for the local player +} DVMSG_RECORDSTART, *LPDVMSG_RECORDSTART, *PDVMSG_RECORDSTART; + +// +// Transmission has stopped on the local machine +// (DVMSGID_RECORDSTOP) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + DWORD dwPeakLevel; // Peak level that caused transmission to stop + PVOID pvLocalPlayerContext; // Context value for the local player +} DVMSG_RECORDSTOP, *LPDVMSG_RECORDSTOP, *PDVMSG_RECORDSTOP; + +// +// The voice session has been lost +// (DVMSGID_SESSIONLOST) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + HRESULT hrResult; // Reason the session was disconnected +} DVMSG_SESSIONLOST, *LPDVMSG_SESSIONLOST, *PDVMSG_SESSIONLOST; + +// +// The target list has been updated for the local client +// (DVMSGID_SETTARGETS) +// +typedef struct +{ + DWORD dwSize; // Size of this structure + DWORD dwNumTargets; // # of targets + PDVID pdvidTargets; // An array of DVIDs specifying the current targets +} DVMSG_SETTARGETS, *LPDVMSG_SETTARGETS, *PDVMSG_SETTARGETS; + + +/**************************************************************************** + * + * DirectPlayVoice Functions + * + ****************************************************************************/ + +extern HRESULT WINAPI DirectPlayVoiceCreate( const GUID * pcIID, void **ppvInterface, IUnknown *pUnknown); + +/**************************************************************************** + * + * DirectPlay8 Application Interfaces + * + ****************************************************************************/ + +#undef INTERFACE +#define INTERFACE IDirectPlayVoiceClient +DECLARE_INTERFACE_( IDirectPlayVoiceClient, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, PVOID *ppvObj) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectPlayVoiceClient methods ***/ + STDMETHOD_(HRESULT, Initialize) (THIS_ LPUNKNOWN, PDVMESSAGEHANDLER, PVOID, PDWORD, DWORD ) PURE; + STDMETHOD_(HRESULT, Connect) (THIS_ PDVSOUNDDEVICECONFIG, PDVCLIENTCONFIG, DWORD ) PURE; + STDMETHOD_(HRESULT, Disconnect) (THIS_ DWORD ) PURE; + STDMETHOD_(HRESULT, GetSessionDesc)(THIS_ PDVSESSIONDESC ) PURE; + STDMETHOD_(HRESULT, GetClientConfig)(THIS_ PDVCLIENTCONFIG ) PURE; + STDMETHOD_(HRESULT, SetClientConfig)(THIS_ PDVCLIENTCONFIG ) PURE; + STDMETHOD_(HRESULT, GetCaps) (THIS_ PDVCAPS ) PURE; + STDMETHOD_(HRESULT, GetCompressionTypes)( THIS_ PVOID, PDWORD, PDWORD, DWORD ) PURE; + STDMETHOD_(HRESULT, SetTransmitTargets)( THIS_ PDVID, DWORD, DWORD ) PURE; + STDMETHOD_(HRESULT, GetTransmitTargets)( THIS_ PDVID, PDWORD, DWORD ) PURE; + STDMETHOD_(HRESULT, Create3DSoundBuffer)( THIS_ DVID, LPDIRECTSOUNDBUFFER, DWORD, DWORD, LPDIRECTSOUND3DBUFFER * ) PURE; + STDMETHOD_(HRESULT, Delete3DSoundBuffer)( THIS_ DVID, LPDIRECTSOUND3DBUFFER * ) PURE; + STDMETHOD_(HRESULT, SetNotifyMask)( THIS_ PDWORD, DWORD ) PURE; + STDMETHOD_(HRESULT, GetSoundDeviceConfig)( THIS_ PDVSOUNDDEVICECONFIG, PDWORD ) PURE; +}; + + +#undef INTERFACE +#define INTERFACE IDirectPlayVoiceServer +DECLARE_INTERFACE_( IDirectPlayVoiceServer, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectPlayVoiceServer methods ***/ + STDMETHOD_(HRESULT, Initialize) (THIS_ LPUNKNOWN, PDVMESSAGEHANDLER, PVOID, LPDWORD, DWORD ) PURE; + STDMETHOD_(HRESULT, StartSession) (THIS_ PDVSESSIONDESC, DWORD ) PURE; + STDMETHOD_(HRESULT, StopSession) (THIS_ DWORD ) PURE; + STDMETHOD_(HRESULT, GetSessionDesc)(THIS_ PDVSESSIONDESC ) PURE; + STDMETHOD_(HRESULT, SetSessionDesc)(THIS_ PDVSESSIONDESC ) PURE; + STDMETHOD_(HRESULT, GetCaps) (THIS_ PDVCAPS ) PURE; + STDMETHOD_(HRESULT, GetCompressionTypes)( THIS_ PVOID, PDWORD, PDWORD, DWORD ) PURE; + STDMETHOD_(HRESULT, SetTransmitTargets)( THIS_ DVID, PDVID, DWORD, DWORD ) PURE; + STDMETHOD_(HRESULT, GetTransmitTargets)( THIS_ DVID, PDVID, PDWORD, DWORD ) PURE; + STDMETHOD_(HRESULT, SetNotifyMask)( THIS_ PDWORD, DWORD ) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirectPlayVoiceTest +DECLARE_INTERFACE_( IDirectPlayVoiceTest, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, PVOID * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectPlayVoiceTest methods ***/ + STDMETHOD_(HRESULT, CheckAudioSetup) (THIS_ const GUID *, const GUID * , HWND, DWORD ) PURE; +}; + +#if !defined(__cplusplus) || defined(CINTERFACE) + +#define IDirectPlayVoiceClient_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectPlayVoiceClient_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectPlayVoiceClient_Release(p) (p)->lpVtbl->Release(p) + +#define IDirectPlayVoiceClient_Initialize(p,a,b,c,d,e) (p)->lpVtbl->Initialize(p,a,b,c,d,e) +#define IDirectPlayVoiceClient_Connect(p,a,b,c) (p)->lpVtbl->Connect(p,a,b,c) +#define IDirectPlayVoiceClient_Disconnect(p,a) (p)->lpVtbl->Disconnect(p,a) +#define IDirectPlayVoiceClient_GetSessionDesc(p,a) (p)->lpVtbl->GetSessionDesc(p,a) +#define IDirectPlayVoiceClient_GetClientConfig(p,a) (p)->lpVtbl->GetClientConfig(p,a) +#define IDirectPlayVoiceClient_SetClientConfig(p,a) (p)->lpVtbl->SetClientConfig(p,a) +#define IDirectPlayVoiceClient_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectPlayVoiceClient_GetCompressionTypes(p,a,b,c,d) (p)->lpVtbl->GetCompressionTypes(p,a,b,c,d) +#define IDirectPlayVoiceClient_SetTransmitTargets(p,a,b,c) (p)->lpVtbl->SetTransmitTargets(p,a,b,c) +#define IDirectPlayVoiceClient_GetTransmitTargets(p,a,b,c) (p)->lpVtbl->GetTransmitTargets(p,a,b,c) +#define IDirectPlayVoiceClient_Create3DSoundBuffer(p,a,b,c,d,e) (p)->lpVtbl->Create3DSoundBuffer(p,a,b,c,d,e) +#define IDirectPlayVoiceClient_Delete3DSoundBuffer(p,a,b) (p)->lpVtbl->Delete3DSoundBuffer(p,a,b) +#define IDirectPlayVoiceClient_SetNotifyMask(p,a,b) (p)->lpVtbl->SetNotifyMask(p,a,b) +#define IDirectPlayVoiceClient_GetSoundDeviceConfig(p,a,b) (p)->lpVtbl->GetSoundDeviceConfig(p,a,b) + +#define IDirectPlayVoiceServer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectPlayVoiceServer_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectPlayVoiceServer_Release(p) (p)->lpVtbl->Release(p) + +#define IDirectPlayVoiceServer_Initialize(p,a,b,c,d,e) (p)->lpVtbl->Initialize(p,a,b,c,d,e) +#define IDirectPlayVoiceServer_StartSession(p,a,b) (p)->lpVtbl->StartSession(p,a,b) +#define IDirectPlayVoiceServer_StopSession(p,a) (p)->lpVtbl->StopSession(p,a) +#define IDirectPlayVoiceServer_GetSessionDesc(p,a) (p)->lpVtbl->GetSessionDesc(p,a) +#define IDirectPlayVoiceServer_SetSessionDesc(p,a) (p)->lpVtbl->SetSessionDesc(p,a) +#define IDirectPlayVoiceServer_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectPlayVoiceServer_GetCompressionTypes(p,a,b,c,d) (p)->lpVtbl->GetCompressionTypes(p,a,b,c,d) +#define IDirectPlayVoiceServer_SetTransmitTargets(p,a,b,c,d) (p)->lpVtbl->SetTransmitTargets(p,a,b,c,d) +#define IDirectPlayVoiceServer_GetTransmitTargets(p,a,b,c,d) (p)->lpVtbl->GetTransmitTargets(p,a,b,c,d) +#define IDirectPlayVoiceServer_SetNotifyMask(p,a,b) (p)->lpVtbl->SetNotifyMask(p,a,b) +#define IDirectPlayVoiceTest_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectPlayVoiceTest_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectPlayVoiceTest_Release(p) (p)->lpVtbl->Release(p) +#define IDirectPlayVoiceTest_CheckAudioSetup(p,a,b,c,d) (p)->lpVtbl->CheckAudioSetup(p,a,b,c,d) + + +#else /* C++ */ + +#define IDirectPlayVoiceClient_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectPlayVoiceClient_AddRef(p) (p)->AddRef() +#define IDirectPlayVoiceClient_Release(p) (p)->Release() + +#define IDirectPlayVoiceClient_Initialize(p,a,b,c,d,e) (p)->Initialize(a,b,c,d,e) +#define IDirectPlayVoiceClient_Connect(p,a,b,c) (p)->Connect(a,b,c) +#define IDirectPlayVoiceClient_Disconnect(p,a) (p)->Disconnect(a) +#define IDirectPlayVoiceClient_GetSessionDesc(p,a) (p)->GetSessionDesc(a) +#define IDirectPlayVoiceClient_GetClientConfig(p,a) (p)->GetClientConfig(a) +#define IDirectPlayVoiceClient_SetClientConfig(p,a) (p)->SetClientConfig(a) +#define IDirectPlayVoiceClient_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectPlayVoiceClient_GetCompressionTypes(p,a,b,c,d) (p)->GetCompressionTypes(a,b,c,d) +#define IDirectPlayVoiceClient_SetTransmitTargets(p,a,b,c) (p)->SetTransmitTargets(a,b,c) +#define IDirectPlayVoiceClient_GetTransmitTargets(p,a,b,c) (p)->GetTransmitTargets(a,b,c) +#define IDirectPlayVoiceClient_Create3DSoundBuffer(p,a,b,c,d,e) (p)->Create3DSoundBuffer(a,b,c,d,e) +#define IDirectPlayVoiceClient_Delete3DSoundBuffer(p,a,b) (p)->Delete3DSoundBuffer(a,b) +#define IDirectPlayVoiceClient_SetNotifyMask(p,a,b) (p)->SetNotifyMask(a,b) +#define IDirectPlayVoiceClient_GetSoundDeviceConfig(p,a,b) (p)->GetSoundDeviceConfig(a,b) + +#define IDirectPlayVoiceServer_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectPlayVoiceServer_AddRef(p) (p)->AddRef() +#define IDirectPlayVoiceServer_Release(p) (p)->Release() + +#define IDirectPlayVoiceServer_Initialize(p,a,b,c,d,e) (p)->Initialize(a,b,c,d,e) +#define IDirectPlayVoiceServer_StartSession(p,a,b) (p)->StartSession(a,b) +#define IDirectPlayVoiceServer_StopSession(p,a) (p)->StopSession(a) +#define IDirectPlayVoiceServer_GetSessionDesc(p,a) (p)->GetSessionDesc(a) +#define IDirectPlayVoiceServer_SetSessionDesc(p,a) (p)->SetSessionDesc(a) +#define IDirectPlayVoiceServer_GetCaps(p,a) (p)->GetCaps(a) +#define IDirectPlayVoiceServer_GetCompressionTypes(p,a,b,c,d) (p)->GetCompressionTypes(a,b,c,d) +#define IDirectPlayVoiceServer_SetTransmitTargets(p,a,b,c,d) (p)->SetTransmitTargets(a,b,c,d) +#define IDirectPlayVoiceServer_GetTransmitTargets(p,a,b,c,d) (p)->GetTransmitTargets(a,b,c,d) +#define IDirectPlayVoiceServer_SetNotifyMask(p,a,b) (p)->SetNotifyMask(a,b) + +#define IDirectPlayVoiceTest_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IDirectPlayVoiceTest_AddRef(p) (p)->AddRef() +#define IDirectPlayVoiceTest_Release(p) (p)->Release() +#define IDirectPlayVoiceTest_CheckAudioSetup(p,a,b,c,d) (p)->CheckAudioSetup(a,b,c,d) + + +#endif + + +/**************************************************************************** + * + * DIRECTPLAYVOICE ERRORS + * + * Errors are represented by negative values and cannot be combined. + * + ****************************************************************************/ + +#define _FACDPV 0x15 +#define MAKE_DVHRESULT( code ) MAKE_HRESULT( 1, _FACDPV, code ) + +#define DV_OK S_OK +#define DV_FULLDUPLEX MAKE_HRESULT( 0, _FACDPV, 0x0005 ) +#define DV_HALFDUPLEX MAKE_HRESULT( 0, _FACDPV, 0x000A ) +#define DV_PENDING MAKE_HRESULT( 0, _FACDPV, 0x0010 ) + +#define DVERR_BUFFERTOOSMALL MAKE_DVHRESULT( 0x001E ) +#define DVERR_EXCEPTION MAKE_DVHRESULT( 0x004A ) +#define DVERR_GENERIC E_FAIL +#define DVERR_INVALIDFLAGS MAKE_DVHRESULT( 0x0078 ) +#define DVERR_INVALIDOBJECT MAKE_DVHRESULT( 0x0082 ) +#define DVERR_INVALIDPARAM E_INVALIDARG +#define DVERR_INVALIDPLAYER MAKE_DVHRESULT( 0x0087 ) +#define DVERR_INVALIDGROUP MAKE_DVHRESULT( 0x0091 ) +#define DVERR_INVALIDHANDLE MAKE_DVHRESULT( 0x0096 ) +#define DVERR_OUTOFMEMORY E_OUTOFMEMORY +#define DVERR_PENDING DV_PENDING +#define DVERR_NOTSUPPORTED E_NOTIMPL +#define DVERR_NOINTERFACE E_NOINTERFACE +#define DVERR_SESSIONLOST MAKE_DVHRESULT( 0x012C ) +#define DVERR_NOVOICESESSION MAKE_DVHRESULT( 0x012E ) +#define DVERR_CONNECTIONLOST MAKE_DVHRESULT( 0x0168 ) +#define DVERR_NOTINITIALIZED MAKE_DVHRESULT( 0x0169 ) +#define DVERR_CONNECTED MAKE_DVHRESULT( 0x016A ) +#define DVERR_NOTCONNECTED MAKE_DVHRESULT( 0x016B ) +#define DVERR_CONNECTABORTING MAKE_DVHRESULT( 0x016E ) +#define DVERR_NOTALLOWED MAKE_DVHRESULT( 0x016F ) +#define DVERR_INVALIDTARGET MAKE_DVHRESULT( 0x0170 ) +#define DVERR_TRANSPORTNOTHOST MAKE_DVHRESULT( 0x0171 ) +#define DVERR_COMPRESSIONNOTSUPPORTED MAKE_DVHRESULT( 0x0172 ) +#define DVERR_ALREADYPENDING MAKE_DVHRESULT( 0x0173 ) +#define DVERR_SOUNDINITFAILURE MAKE_DVHRESULT( 0x0174 ) +#define DVERR_TIMEOUT MAKE_DVHRESULT( 0x0175 ) +#define DVERR_CONNECTABORTED MAKE_DVHRESULT( 0x0176 ) +#define DVERR_NO3DSOUND MAKE_DVHRESULT( 0x0177 ) +#define DVERR_ALREADYBUFFERED MAKE_DVHRESULT( 0x0178 ) +#define DVERR_NOTBUFFERED MAKE_DVHRESULT( 0x0179 ) +#define DVERR_HOSTING MAKE_DVHRESULT( 0x017A ) +#define DVERR_NOTHOSTING MAKE_DVHRESULT( 0x017B ) +#define DVERR_INVALIDDEVICE MAKE_DVHRESULT( 0x017C ) +#define DVERR_RECORDSYSTEMERROR MAKE_DVHRESULT( 0x017D ) +#define DVERR_PLAYBACKSYSTEMERROR MAKE_DVHRESULT( 0x017E ) +#define DVERR_SENDERROR MAKE_DVHRESULT( 0x017F ) +#define DVERR_USERCANCEL MAKE_DVHRESULT( 0x0180 ) +#define DVERR_RUNSETUP MAKE_DVHRESULT( 0x0183 ) +#define DVERR_INCOMPATIBLEVERSION MAKE_DVHRESULT( 0x0184 ) +#define DVERR_INITIALIZED MAKE_DVHRESULT( 0x0187 ) +#define DVERR_INVALIDPOINTER E_POINTER +#define DVERR_NOTRANSPORT MAKE_DVHRESULT( 0x0188 ) +#define DVERR_NOCALLBACK MAKE_DVHRESULT( 0x0189 ) +#define DVERR_TRANSPORTNOTINIT MAKE_DVHRESULT( 0x018A ) +#define DVERR_TRANSPORTNOSESSION MAKE_DVHRESULT( 0x018B ) +#define DVERR_TRANSPORTNOPLAYER MAKE_DVHRESULT( 0x018C ) +#define DVERR_USERBACK MAKE_DVHRESULT( 0x018D ) +#define DVERR_NORECVOLAVAILABLE MAKE_DVHRESULT( 0x018E ) +#define DVERR_INVALIDBUFFER MAKE_DVHRESULT( 0x018F ) +#define DVERR_LOCKEDBUFFER MAKE_DVHRESULT( 0x0190 ) + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/dvp.h b/windows_libs/mssdk/include/dvp.h new file mode 100644 index 00000000..72ba057c --- /dev/null +++ b/windows_libs/mssdk/include/dvp.h @@ -0,0 +1,916 @@ +/*==========================================================================; + * + * Copyright (C) 1996-1997 Microsoft Corporation. All Rights Reserved. + * + * File: dvp.h + * Content: DirectDrawVideoPort include file + * + ***************************************************************************/ + +#ifndef __DVP_INCLUDED__ +#define __DVP_INCLUDED__ + +/* + * GUIDS used by DirectDrawVideoPort objects + */ +#if defined( _WIN32 ) && (!defined( _NO_COM ) || defined( DEFINE_GUID )) +DEFINE_GUID( IID_IDDVideoPortContainer, 0x6C142760,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 ); +DEFINE_GUID( IID_IDirectDrawVideoPort, 0xB36D93E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 ); + +DEFINE_GUID( DDVPTYPE_E_HREFH_VREFH, 0x54F39980L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8); +DEFINE_GUID( DDVPTYPE_E_HREFH_VREFL, 0x92783220L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8); +DEFINE_GUID( DDVPTYPE_E_HREFL_VREFH, 0xA07A02E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8); +DEFINE_GUID( DDVPTYPE_E_HREFL_VREFL, 0xE09C77E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8); +DEFINE_GUID( DDVPTYPE_CCIR656, 0xFCA326A0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8); +DEFINE_GUID( DDVPTYPE_BROOKTREE, 0x1352A560L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8); +DEFINE_GUID( DDVPTYPE_PHILIPS, 0x332CF160L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8); +#endif + +#ifndef GUID_DEFS_ONLY + +#if defined( _WIN32 ) && !defined( _NO_COM ) +#define COM_NO_WINDOWS_H +#include +#else +#define IUnknown void +#endif + +/* + * These definitions are required to allow polymorphic structure members (i.e. those + * that are referred to both as DWORDs and as pointers) to resolve into a type + * of correct size to hold the largest of those two types (i.e. pointer) on 64 bit + * systems. For 32 bit environments, ULONG_PTR resolves to a DWORD. + */ +#ifndef MAXULONG_PTR +#define ULONG_PTR DWORD +#endif //MAXULONG_PTR + +#ifdef __cplusplus +extern "C" { +#endif + +/*============================================================================ + * + * DirectDraw Structures + * + * Various structures used to invoke DirectDraw. + * + *==========================================================================*/ + +struct IDirectDraw; +struct IDirectDrawSurface; +struct IDirectDrawPalette; +struct IDirectDrawClipper; + +typedef struct IDDVideoPortContainer FAR *LPDDVIDEOPORTCONTAINER; +typedef struct IDirectDrawVideoPort FAR *LPDIRECTDRAWVIDEOPORT; + +typedef struct _DDVIDEOPORTCONNECT FAR *LPDDVIDEOPORTCONNECT; +typedef struct _DDVIDEOPORTCAPS FAR *LPDDVIDEOPORTCAPS; +typedef struct _DDVIDEOPORTDESC FAR *LPDDVIDEOPORTDESC; +typedef struct _DDVIDEOPORTINFO FAR *LPDDVIDEOPORTINFO; +typedef struct _DDVIDEOPORTBANDWIDTH FAR *LPDDVIDEOPORTBANDWIDTH; +typedef struct _DDVIDEOPORTSTATUS FAR *LPDDVIDEOPORTSTATUS; + +typedef struct IDDVideoPortContainerVtbl DDVIDEOPORTCONTAINERCALLBACKS; +typedef struct IDirectDrawVideoPortVtbl DIRECTDRAWVIDEOPORTCALLBACKS; + + +/* + * API's + */ +typedef HRESULT (FAR PASCAL * LPDDENUMVIDEOCALLBACK)(LPDDVIDEOPORTCAPS, LPVOID); + + +/* + * INTERACES FOLLOW: + * IDirectDrawVideoPort + * IVideoPort + */ + +/* + * IDirectDrawVideoPortContainer + */ +#if defined( _WIN32 ) && !defined( _NO_COM ) +#undef INTERFACE +#define INTERFACE IDDVideoPortContainer +DECLARE_INTERFACE_( IDDVideoPortContainer, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IDirectDrawVideoPort methods ***/ + STDMETHOD(CreateVideoPort)(THIS_ DWORD, LPDDVIDEOPORTDESC, LPDIRECTDRAWVIDEOPORT FAR *, IUnknown FAR *) PURE; + STDMETHOD(EnumVideoPorts)(THIS_ DWORD, LPDDVIDEOPORTCAPS, LPVOID,LPDDENUMVIDEOCALLBACK ) PURE; + STDMETHOD(GetVideoPortConnectInfo)(THIS_ DWORD, LPDWORD, LPDDVIDEOPORTCONNECT ) PURE; + STDMETHOD(QueryVideoPortStatus)(THIS_ DWORD, LPDDVIDEOPORTSTATUS ) PURE; +}; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IVideoPortContainer_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) +#define IVideoPortContainer_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IVideoPortContainer_Release(p) (p)->lpVtbl->Release(p) +#define IVideoPortContainer_CreateVideoPort(p, a, b, c, d) (p)->lpVtbl->CreateVideoPort(p, a, b, c, d) +#define IVideoPortContainer_EnumVideoPorts(p, a, b, c, d) (p)->lpVtbl->EnumVideoPorts(p, a, b, c, d) +#define IVideoPortContainer_GetVideoPortConnectInfo(p, a, b, c) (p)->lpVtbl->GetVideoPortConnectInfo(p, a, b, c) +#define IVideoPortContainer_QueryVideoPortStatus(p, a, b) (p)->lpVtbl->QueryVideoPortStatus(p, a, b) +#else +#define IVideoPortContainer_QueryInterface(p, a, b) (p)->QueryInterface(a, b) +#define IVideoPortContainer_AddRef(p) (p)->AddRef() +#define IVideoPortContainer_Release(p) (p)->Release() +#define IVideoPortContainer_CreateVideoPort(p, a, b, c, d) (p)->CreateVideoPort(a, b, c, d) +#define IVideoPortContainer_EnumVideoPorts(p, a, b, c, d) (p)->EnumVideoPorts(a, b, c, d) +#define IVideoPortContainer_GetVideoPortConnectInfo(p, a, b, c) (p)->GetVideoPortConnectInfo(a, b, c) +#define IVideoPortContainer_QueryVideoPortStatus(p, a, b) (p)->QueryVideoPortStatus(a, b) +#endif + +#endif + + +/* + * IDirectDrawVideoPort + */ +#if defined( _WIN32 ) && !defined( _NO_COM ) +#undef INTERFACE +#define INTERFACE IDirectDrawVideoPort +DECLARE_INTERFACE_( IDirectDrawVideoPort, IUnknown ) +{ + /*** IUnknown methods ***/ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE; + STDMETHOD_(ULONG,AddRef) (THIS) PURE; + STDMETHOD_(ULONG,Release) (THIS) PURE; + /*** IVideoPort methods ***/ + STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE; + STDMETHOD(GetBandwidthInfo)(THIS_ LPDDPIXELFORMAT, DWORD, DWORD, DWORD, LPDDVIDEOPORTBANDWIDTH) PURE; + STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE; + STDMETHOD(GetInputFormats)(THIS_ LPDWORD, LPDDPIXELFORMAT, DWORD) PURE; + STDMETHOD(GetOutputFormats)(THIS_ LPDDPIXELFORMAT, LPDWORD, LPDDPIXELFORMAT, DWORD) PURE; + STDMETHOD(GetFieldPolarity)(THIS_ LPBOOL) PURE; + STDMETHOD(GetVideoLine)(THIS_ LPDWORD) PURE; + STDMETHOD(GetVideoSignalStatus)(THIS_ LPDWORD) PURE; + STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE; + STDMETHOD(SetTargetSurface)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE; + STDMETHOD(StartVideo)(THIS_ LPDDVIDEOPORTINFO) PURE; + STDMETHOD(StopVideo)(THIS) PURE; + STDMETHOD(UpdateVideo)(THIS_ LPDDVIDEOPORTINFO) PURE; + STDMETHOD(WaitForSync)(THIS_ DWORD, DWORD, DWORD) PURE; +}; + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IVideoPort_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IVideoPort_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IVideoPort_Release(p) (p)->lpVtbl->Release(p) +#define IVideoPort_SetTargetSurface(p,a,b) (p)->lpVtbl->SetTargetSurface(p,a,b) +#define IVideoPort_Flip(p,a,b) (p)->lpVtbl->Flip(p,a,b) +#define IVideoPort_GetBandwidthInfo(p,a,b,c,d,e) (p)->lpVtbl->GetBandwidthInfo(p,a,b,c,d,e) +#define IVideoPort_GetColorControls(p,a) (p)->lpVtbl->GetColorControls(p,a) +#define IVideoPort_GetInputFormats(p,a,b,c) (p)->lpVtbl->GetInputFormats(p,a,b,c) +#define IVideoPort_GetOutputFormats(p,a,b,c,d) (p)->lpVtbl->GetOutputFormats(p,a,b,c,d) +#define IVideoPort_GetFieldPolarity(p,a) (p)->lpVtbl->GetFieldPolarity(p,a) +#define IVideoPort_GetVideoLine(p,a) (p)->lpVtbl->GetVideoLine(p,a) +#define IVideoPort_GetVideoSignalStatus(p,a) (p)->lpVtbl->GetVideoSignalStatus(p,a) +#define IVideoPort_SetColorControls(p,a) (p)->lpVtbl->SetColorControls(p,a) +#define IVideoPort_StartVideo(p,a) (p)->lpVtbl->StartVideo(p,a) +#define IVideoPort_StopVideo(p) (p)->lpVtbl->StopVideo(p) +#define IVideoPort_UpdateVideo(p,a) (p)->lpVtbl->UpdateVideo(p,a) +#define IVideoPort_WaitForSync(p,a,b,c) (p)->lpVtbl->WaitForSync(p,a,b,c) +#else +#define IVideoPort_QueryInterface(p,a,b) (p)->QueryInterface(a,b) +#define IVideoPort_AddRef(p) (p)->AddRef() +#define IVideoPort_Release(p) (p)->Release() +#define IVideoPort_SetTargetSurface(p,a,b) (p)->SetTargetSurface(a,b) +#define IVideoPort_Flip(p,a,b) (p)->Flip(a,b) +#define IVideoPort_GetBandwidthInfo(p,a,b,c,d,e) (p)->GetBandwidthInfo(a,b,c,d,e) +#define IVideoPort_GetColorControls(p,a) (p)->GetColorControls(a) +#define IVideoPort_GetInputFormats(p,a,b,c) (p)->GetInputFormats(a,b,c) +#define IVideoPort_GetOutputFormats(p,a,b,c,d) (p)->GetOutputFormats(a,b,c,d) +#define IVideoPort_GetFieldPolarity(p,a) (p)->GetFieldPolarity(a) +#define IVideoPort_GetVideoLine(p,a) (p)->GetVideoLine(a) +#define IVideoPort_GetVideoSignalStatus(p,a) (p)->GetVideoSignalStatus(a) +#define IVideoPort_SetColorControls(p,a) (p)->SetColorControls(a) +#define IVideoPort_StartVideo(p,a) (p)->StartVideo(a) +#define IVideoPort_StopVideo(p) (p)->StopVideo() +#define IVideoPort_UpdateVideo(p,a) (p)->UpdateVideo(a) +#define IVideoPort_WaitForSync(p,a,b,c) (p)->WaitForSync(a,b,c) +#endif + +#endif + + +/* + * DDVIDEOPORTCONNECT + */ +typedef struct _DDVIDEOPORTCONNECT +{ + DWORD dwSize; // size of the DDVIDEOPORTCONNECT structure + DWORD dwPortWidth; // Width of the video port + GUID guidTypeID; // Description of video port connection + DWORD dwFlags; // Connection flags + ULONG_PTR dwReserved1; // Reserved, set to zero. +} DDVIDEOPORTCONNECT; + + +/* + * DDVIDEOPORTCAPS + */ +typedef struct _DDVIDEOPORTCAPS +{ + DWORD dwSize; // size of the DDVIDEOPORTCAPS structure + DWORD dwFlags; // indicates which fields contain data + DWORD dwMaxWidth; // max width of the video port field + DWORD dwMaxVBIWidth; // max width of the VBI data + DWORD dwMaxHeight; // max height of the video port field + DWORD dwVideoPortID; // Video port ID (0 - (dwMaxVideoPorts -1)) + DWORD dwCaps; // Video port capabilities + DWORD dwFX; // More video port capabilities + DWORD dwNumAutoFlipSurfaces; // Max number of autoflippable surfaces allowed + DWORD dwAlignVideoPortBoundary; // Byte restriction of placement within the surface + DWORD dwAlignVideoPortPrescaleWidth;// Byte restriction of width after prescaling + DWORD dwAlignVideoPortCropBoundary; // Byte restriction of left cropping + DWORD dwAlignVideoPortCropWidth; // Byte restriction of cropping width + DWORD dwPreshrinkXStep; // Width can be shrunk in steps of 1/x + DWORD dwPreshrinkYStep; // Height can be shrunk in steps of 1/x + DWORD dwNumVBIAutoFlipSurfaces; // Max number of VBI autoflippable surfaces allowed + DWORD dwNumPreferredAutoflip; // Optimal number of autoflippable surfaces for hardware + WORD wNumFilterTapsX; // Number of taps the prescaler uses in the X direction (0 - no prescale, 1 - replication, etc.) + WORD wNumFilterTapsY; // Number of taps the prescaler uses in the Y direction (0 - no prescale, 1 - replication, etc.) +} DDVIDEOPORTCAPS; + +/* + * The dwMaxWidth and dwMaxVBIWidth members are valid + */ +#define DDVPD_WIDTH 0x00000001l + +/* + * The dwMaxHeight member is valid + */ +#define DDVPD_HEIGHT 0x00000002l + +/* + * The dwVideoPortID member is valid + */ +#define DDVPD_ID 0x00000004l + +/* + * The dwCaps member is valid + */ +#define DDVPD_CAPS 0x00000008l + +/* + * The dwFX member is valid + */ +#define DDVPD_FX 0x00000010l + +/* + * The dwNumAutoFlipSurfaces member is valid + */ +#define DDVPD_AUTOFLIP 0x00000020l + +/* + * All of the alignment members are valid + */ +#define DDVPD_ALIGN 0x00000040l + +/* + * The dwNumPreferredAutoflip member is valid + */ +#define DDVPD_PREFERREDAUTOFLIP 0x00000080l + +/* + * The wNumFilterTapsX and wNumFilterTapsY fields are valid + */ +#define DDVPD_FILTERQUALITY 0x00000100l + +/* + * DDVIDEOPORTDESC + */ +typedef struct _DDVIDEOPORTDESC +{ + DWORD dwSize; // size of the DDVIDEOPORTDESC structure + DWORD dwFieldWidth; // width of the video port field + DWORD dwVBIWidth; // width of the VBI data + DWORD dwFieldHeight; // height of the video port field + DWORD dwMicrosecondsPerField; // Microseconds per video field + DWORD dwMaxPixelsPerSecond; // Maximum pixel rate per second + DWORD dwVideoPortID; // Video port ID (0 - (dwMaxVideoPorts -1)) + DWORD dwReserved1; // Reserved for future use - set to zero (struct padding) + DDVIDEOPORTCONNECT VideoPortType; // Description of video port connection + ULONG_PTR dwReserved2; // Reserved for future use - set to zero + ULONG_PTR dwReserved3; // Reserved for future use - set to zero +} DDVIDEOPORTDESC; + + +/* + * DDVIDEOPORTINFO + */ +typedef struct _DDVIDEOPORTINFO +{ + DWORD dwSize; // Size of the structure + DWORD dwOriginX; // Placement of the video data within the surface. + DWORD dwOriginY; // Placement of the video data within the surface. + DWORD dwVPFlags; // Video port options + RECT rCrop; // Cropping rectangle (optional). + DWORD dwPrescaleWidth; // Determines pre-scaling/zooming in the X direction (optional). + DWORD dwPrescaleHeight; // Determines pre-scaling/zooming in the Y direction (optional). + LPDDPIXELFORMAT lpddpfInputFormat; // Video format written to the video port + LPDDPIXELFORMAT lpddpfVBIInputFormat; // Input format of the VBI data + LPDDPIXELFORMAT lpddpfVBIOutputFormat;// Output format of the data + DWORD dwVBIHeight; // Specifies the number of lines of data within the vertical blanking interval. + ULONG_PTR dwReserved1; // Reserved for future use - set to zero + ULONG_PTR dwReserved2; // Reserved for future use - set to zero +} DDVIDEOPORTINFO; + + +/* + * DDVIDEOPORTBANDWIDTH + */ +typedef struct _DDVIDEOPORTBANDWIDTH +{ + DWORD dwSize; // Size of the structure + DWORD dwCaps; + DWORD dwOverlay; // Zoom factor at which overlay is supported + DWORD dwColorkey; // Zoom factor at which overlay w/ colorkey is supported + DWORD dwYInterpolate; // Zoom factor at which overlay w/ Y interpolation is supported + DWORD dwYInterpAndColorkey; // Zoom factor at which ovelray w/ Y interpolation and colorkeying is supported + ULONG_PTR dwReserved1; // Reserved for future use - set to zero + ULONG_PTR dwReserved2; // Reserved for future use - set to zero +} DDVIDEOPORTBANDWIDTH; + + +/* + * DDVIDEOPORTSTATUS + */ +typedef struct _DDVIDEOPORTSTATUS +{ + DWORD dwSize; // Size of the structure + BOOL bInUse; // TRUE if video port is currently being used + DWORD dwFlags; // Currently not used + DWORD dwReserved1; // Reserved for future use + DDVIDEOPORTCONNECT VideoPortType; // Information about the connection + ULONG_PTR dwReserved2; // Reserved for future use + ULONG_PTR dwReserved3; // Reserved for future use +} DDVIDEOPORTSTATUS; + +/*============================================================================ + * + * Video Port Flags + * + * All flags are bit flags. + * + *==========================================================================*/ + +/**************************************************************************** + * + * VIDEOPORT DDVIDEOPORTCONNECT FLAGS + * + ****************************************************************************/ + +/* + * When this is set by the driver and passed to the client, this + * indicates that the video port is capable of double clocking the data. + * When this is set by the client, this indicates that the video port + * should enable double clocking. This flag is only valid with external + * syncs. + */ +#define DDVPCONNECT_DOUBLECLOCK 0x00000001l + +/* + * When this is set by the driver and passed to the client, this + * indicates that the video port is capable of using an external VACT + * signal. When this is set by the client, this indicates that the + * video port should use the external VACT signal. + */ +#define DDVPCONNECT_VACT 0x00000002l + +/* + * When this is set by the driver and passed to the client, this + * indicates that the video port is capable of treating even fields + * like odd fields and visa versa. When this is set by the client, + * this indicates that the video port should treat even fields like odd + * fields. + */ +#define DDVPCONNECT_INVERTPOLARITY 0x00000004l + +/* + * Indicates that any data written to the video port during the VREF + * period will not be written into the frame buffer. This flag is read only. + */ +#define DDVPCONNECT_DISCARDSVREFDATA 0x00000008l + +/* + * When this is set be the driver and passed to the client, this + * indicates that the device will write half lines into the frame buffer + * if half lines are provided by the decoder. If this is set by the client, + * this indicates that the decoder will be supplying half lines. + */ +#define DDVPCONNECT_HALFLINE 0x00000010l + +/* + * Indicates that the signal is interlaced. This flag is only + * set by the client. + */ +#define DDVPCONNECT_INTERLACED 0x00000020l + +/* + * Indicates that video port is shareable and that this video port + * will use the even fields. This flag is only set by the client. + */ +#define DDVPCONNECT_SHAREEVEN 0x00000040l + +/* + * Indicates that video port is shareable and that this video port + * will use the odd fields. This flag is only set by the client. + */ +#define DDVPCONNECT_SHAREODD 0x00000080l + +/**************************************************************************** + * + * VIDEOPORT DDVIDEOPORTDESC CAPS + * + ****************************************************************************/ + +/* + * Flip can be performed automatically to avoid tearing. + */ +#define DDVPCAPS_AUTOFLIP 0x00000001l + +/* + * Supports interlaced video + */ +#define DDVPCAPS_INTERLACED 0x00000002l + +/* + * Supports non-interlaced video + */ +#define DDVPCAPS_NONINTERLACED 0x00000004l + +/* + * Indicates that the device can return whether the current field + * of an interlaced signal is even or odd. + */ +#define DDVPCAPS_READBACKFIELD 0x00000008l + +/* + * Indicates that the device can return the current line of video + * being written into the frame buffer. + */ +#define DDVPCAPS_READBACKLINE 0x00000010l + +/* + * Allows two gen-locked video streams to share a single video port, + * where one stream uses the even fields and the other uses the odd + * fields. Separate parameters (including address, scaling, + * cropping, etc.) are maintained for both fields.) + */ +#define DDVPCAPS_SHAREABLE 0x00000020l + +/* + * Even fields of video can be automatically discarded. + */ +#define DDVPCAPS_SKIPEVENFIELDS 0x00000040l + +/* + * Odd fields of video can be automatically discarded. + */ +#define DDVPCAPS_SKIPODDFIELDS 0x00000080l + +/* + * Indicates that the device is capable of driving the graphics + * VSYNC with the video port VSYNC. + */ +#define DDVPCAPS_SYNCMASTER 0x00000100l + +/* + * Indicates that data within the vertical blanking interval can + * be written to a different surface. + */ +#define DDVPCAPS_VBISURFACE 0x00000200l + +/* + * Indicates that the video port can perform color operations + * on the incoming data before it is written to the frame buffer. + */ +#define DDVPCAPS_COLORCONTROL 0x00000400l + +/* + * Indicates that the video port can accept VBI data in a different + * width or format than the regular video data. + */ +#define DDVPCAPS_OVERSAMPLEDVBI 0x00000800l + +/* + * Indicates that the video port can write data directly to system memory + */ +#define DDVPCAPS_SYSTEMMEMORY 0x00001000l + +/* + * Indicates that the VBI and video portions of the video stream can + * be controlled by an independent processes. + */ +#define DDVPCAPS_VBIANDVIDEOINDEPENDENT 0x00002000l + +/* + * Indicates that the video port contains high quality hardware + * de-interlacing hardware that should be used instead of the + * bob/weave algorithms. + */ +#define DDVPCAPS_HARDWAREDEINTERLACE 0x00004000l + + +/**************************************************************************** + * + * VIDEOPORT DDVIDEOPORTDESC FX + * + ****************************************************************************/ + +/* + * Limited cropping is available to crop out the vertical interval data. + */ +#define DDVPFX_CROPTOPDATA 0x00000001l + +/* + * Incoming data can be cropped in the X direction before it is written + * to the surface. + */ +#define DDVPFX_CROPX 0x00000002l + +/* + * Incoming data can be cropped in the Y direction before it is written + * to the surface. + */ +#define DDVPFX_CROPY 0x00000004l + +/* + * Supports interleaving interlaced fields in memory. + */ +#define DDVPFX_INTERLEAVE 0x00000008l + +/* + * Supports mirroring left to right as the video data is written + * into the frame buffer. + */ +#define DDVPFX_MIRRORLEFTRIGHT 0x00000010l + +/* + * Supports mirroring top to bottom as the video data is written + * into the frame buffer. + */ +#define DDVPFX_MIRRORUPDOWN 0x00000020l + +/* + * Data can be arbitrarily shrunk in the X direction before it + * is written to the surface. + */ +#define DDVPFX_PRESHRINKX 0x00000040l + +/* + * Data can be arbitrarily shrunk in the Y direction before it + * is written to the surface. + */ +#define DDVPFX_PRESHRINKY 0x00000080l + +/* + * Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the X + * direction before it is written to the surface. + */ +#define DDVPFX_PRESHRINKXB 0x00000100l + +/* + * Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the Y + * direction before it is written to the surface. + */ +#define DDVPFX_PRESHRINKYB 0x00000200l + +/* + * Data can be shrunk in increments of 1/x in the X direction + * (where X is specified in the DDVIDEOPORTCAPS.dwPreshrinkXStep) + * before it is written to the surface. + */ +#define DDVPFX_PRESHRINKXS 0x00000400l + +/* + * Data can be shrunk in increments of 1/x in the Y direction + * (where X is specified in the DDVIDEOPORTCAPS.dwPreshrinkYStep) + * before it is written to the surface. + */ +#define DDVPFX_PRESHRINKYS 0x00000800l + +/* + * Data can be arbitrarily stretched in the X direction before + * it is written to the surface. + */ +#define DDVPFX_PRESTRETCHX 0x00001000l + +/* + * Data can be arbitrarily stretched in the Y direction before + * it is written to the surface. + */ +#define DDVPFX_PRESTRETCHY 0x00002000l + +/* + * Data can be integer stretched in the X direction before it is + * written to the surface. + */ +#define DDVPFX_PRESTRETCHXN 0x00004000l + +/* + * Data can be integer stretched in the Y direction before it is + * written to the surface. + */ +#define DDVPFX_PRESTRETCHYN 0x00008000l + +/* + * Indicates that data within the vertical blanking interval can + * be converted independently of the remaining video data. + */ +#define DDVPFX_VBICONVERT 0x00010000l + +/* + * Indicates that scaling can be disabled for data within the + * vertical blanking interval. + */ +#define DDVPFX_VBINOSCALE 0x00020000l + +/* + * Indicates that the video data can ignore the left and right + * cropping coordinates when cropping oversampled VBI data. + */ +#define DDVPFX_IGNOREVBIXCROP 0x00040000l + +/* + * Indicates that interleaving can be disabled for data within the + * vertical blanking interval. + */ +#define DDVPFX_VBINOINTERLEAVE 0x00080000l + + +/**************************************************************************** + * + * VIDEOPORT DDVIDEOPORTINFO FLAGS + * + ****************************************************************************/ + +/* + * Perform automatic flipping. Auto-flipping is performed between + * the overlay surface that was attached to the video port using + * IDirectDrawVideoPort::AttachSurface and the overlay surfaces that + * are attached to the surface via the IDirectDrawSurface::AttachSurface + * method. The flip order is the order in which the overlay surfaces + * were. attached. + */ +#define DDVP_AUTOFLIP 0x00000001l + +/* + * Perform conversion using the ddpfOutputFormat information. + */ +#define DDVP_CONVERT 0x00000002l + +/* + * Perform cropping using the specified rectangle. + */ +#define DDVP_CROP 0x00000004l + +/* + * Indicates that interlaced fields should be interleaved in memory. + */ +#define DDVP_INTERLEAVE 0x00000008l + +/* + * Indicates that the data should be mirrored left to right as it's + * written into the frame buffer. + */ +#define DDVP_MIRRORLEFTRIGHT 0x00000010l + +/* + * Indicates that the data should be mirrored top to bottom as it's + * written into the frame buffer. + */ +#define DDVP_MIRRORUPDOWN 0x00000020l + +/* + * Perform pre-scaling/zooming based on the pre-scale parameters. + */ +#define DDVP_PRESCALE 0x00000040l + +/* + * Ignore input of even fields. + */ +#define DDVP_SKIPEVENFIELDS 0x00000080l + +/* + * Ignore input of odd fields. + */ +#define DDVP_SKIPODDFIELDS 0x00000100l + +/* + * Drive the graphics VSYNCs using the video port VYSNCs. + */ +#define DDVP_SYNCMASTER 0x00000200l + +/* + * The ddpfVBIOutputFormatFormat member contains data that should be used + * to convert the data within the vertical blanking interval. + */ +#define DDVP_VBICONVERT 0x00000400l + +/* + * Indicates that data within the vertical blanking interval + * should not be scaled. + */ +#define DDVP_VBINOSCALE 0x00000800l + +/* + * Indicates that these bob/weave decisions should not be + * overriden by other interfaces. + */ +#define DDVP_OVERRIDEBOBWEAVE 0x00001000l + +/* + * Indicates that the video data should ignore the left and right + * cropping coordinates when cropping the VBI data. + */ +#define DDVP_IGNOREVBIXCROP 0x00002000l + +/* + * Indicates that interleaving can be disabled for data within the + * vertical blanking interval. + */ +#define DDVP_VBINOINTERLEAVE 0x00004000l + +/* + * Indicates that the video port should use the hardware + * de-interlacing hardware. + */ +#define DDVP_HARDWAREDEINTERLACE 0x00008000l + +/**************************************************************************** + * + * DIRIRECTDRAWVIDEOPORT GETINPUTFORMAT/GETOUTPUTFORMAT FLAGS + * + ****************************************************************************/ + +/* + * Return formats for the video data + */ +#define DDVPFORMAT_VIDEO 0x00000001l + +/* + * Return formats for the VBI data + */ +#define DDVPFORMAT_VBI 0x00000002l + +/**************************************************************************** + * + * DIRIRECTDRAWVIDEOPORT SETTARGETSURFACE FLAGS + * + ****************************************************************************/ + +/* + * Surface should receive video data (and VBI data if a surface + * is not explicitly attached for that purpose) + */ +#define DDVPTARGET_VIDEO 0x00000001l + +/* + * Surface should receive VBI data + */ +#define DDVPTARGET_VBI 0x00000002l + + +/**************************************************************************** + * + * DIRIRECTDRAWVIDEOPORT WAITFORSYNC FLAGS + * + ****************************************************************************/ + +/* + * Waits until the beginning of the next VSYNC + */ +#define DDVPWAIT_BEGIN 0x00000001l + +/* + * Waits until the end of the next/current VSYNC + */ +#define DDVPWAIT_END 0x00000002l + +/* + * Waits until the beginning of the specified line + */ +#define DDVPWAIT_LINE 0x00000003l + +/**************************************************************************** + * + * DIRECTDRAWVIDEOPORT FLIP FLAGS + * + ****************************************************************************/ + +/* + * Flips the normal video surface + */ +#define DDVPFLIP_VIDEO 0x00000001l + +/* + * Flips the VBI surface + */ +#define DDVPFLIP_VBI 0x00000002l + +/**************************************************************************** + * + * DIRIRECTDRAWVIDEOPORT GETVIDEOSIGNALSTATUS VALUES + * + ****************************************************************************/ + +/* + * No video signal is present at the video port + */ +#define DDVPSQ_NOSIGNAL 0x00000001l + +/* + * A valid video signal is present at the video port + */ +#define DDVPSQ_SIGNALOK 0x00000002l + +/**************************************************************************** + * + * VIDEOPORTBANDWIDTH Flags + * + ****************************************************************************/ + +/* + * The specified height/width refer to the size of the video port data + * written into memory, after prescaling has occured. + */ +#define DDVPB_VIDEOPORT 0x00000001l + +/* + * The specified height/width refer to the source size of the overlay. + */ +#define DDVPB_OVERLAY 0x00000002l + +/* + * This is a query for the device to return which caps this device requires. + */ +#define DDVPB_TYPE 0x00000004l + +/**************************************************************************** + * + * VIDEOPORTBANDWIDTH Caps + * + ****************************************************************************/ + +/* + * The bandwidth for this device is dependant on the overlay source size. + */ +#define DDVPBCAPS_SOURCE 0x00000001l + +/* + * The bandwidth for this device is dependant on the overlay destination + * size. + */ +#define DDVPBCAPS_DESTINATION 0x00000002l + +/**************************************************************************** + * + * DDVIDEOPORTCONTAINER CreateVideoPort flags + * + ****************************************************************************/ + +/* + * The process only wants to control the VBI portion of the video stream. + */ +#define DDVPCREATE_VBIONLY 0x00000001l + +/* + * The process only wants to control the non-VBI (video) portion of + * the video stream. + */ +#define DDVPCREATE_VIDEOONLY 0x00000002l + +/**************************************************************************** + * + * DDVIDEOPORTSTATUS flags + * + ****************************************************************************/ + +/* + * The video port interface is only controlling the VBI portion of the + * video stream + */ +#define DDVPSTATUS_VBIONLY 0x00000001l + +/* + * The video port interface is only controlling the video portion of the + * video stream + */ +#define DDVPSTATUS_VIDEOONLY 0x00000002l + + +#ifdef __cplusplus +}; +#endif + +#endif // GUID_DEFS_ONLY + +#endif + diff --git a/windows_libs/mssdk/include/dx7todx8.h b/windows_libs/mssdk/include/dx7todx8.h new file mode 100644 index 00000000..de925254 --- /dev/null +++ b/windows_libs/mssdk/include/dx7todx8.h @@ -0,0 +1,98 @@ +/*==========================================================================; + * + * Copyright (C) 2000 Microsoft Corporation. All Rights Reserved. + * + * File: dx7todx8.h + * Content: DX7 to DX8 Direct3D aliases to aid porting DX7 apps to DX8 + * + ***************************************************************************/ + +#ifndef _DX7TODX8_H_ + +/////////////////////////////////////////////////////////////////////////////// +// +// d3d8types.h +// +/////////////////////////////////////////////////////////////////////////////// + +#define D3DTRANSFORMSTATE_WORLD D3DTS_WORLD +#define D3DTRANSFORMSTATE_VIEW D3DTS_VIEW +#define D3DTRANSFORMSTATE_PROJECTION D3DTS_PROJECTION +#define D3DTRANSFORMSTATE_WORLD1 D3DTS_WORLD1 +#define D3DTRANSFORMSTATE_WORLD2 D3DTS_WORLD2 +#define D3DTRANSFORMSTATE_WORLD3 D3DTS_WORLD3 +#define D3DTRANSFORMSTATE_TEXTURE0 D3DTS_TEXTURE0 +#define D3DTRANSFORMSTATE_TEXTURE1 D3DTS_TEXTURE1 +#define D3DTRANSFORMSTATE_TEXTURE2 D3DTS_TEXTURE2 +#define D3DTRANSFORMSTATE_TEXTURE3 D3DTS_TEXTURE3 +#define D3DTRANSFORMSTATE_TEXTURE4 D3DTS_TEXTURE4 +#define D3DTRANSFORMSTATE_TEXTURE5 D3DTS_TEXTURE5 +#define D3DTRANSFORMSTATE_TEXTURE6 D3DTS_TEXTURE6 +#define D3DTRANSFORMSTATE_TEXTURE7 D3DTS_TEXTURE7 +#define D3DTRANSFORMSTATE_FORCE_DWORD D3DTS_FORCE_DWORD + +#define D3DRENDERSTATE_ZENABLE D3DRS_ZENABLE +#define D3DRENDERSTATE_FILLMODE D3DRS_FILLMODE +#define D3DRENDERSTATE_SHADEMODE D3DRS_SHADEMODE +#define D3DRENDERSTATE_LINEPATTERN D3DRS_LINEPATTERN +#define D3DRENDERSTATE_ZWRITEENABLE D3DRS_ZWRITEENABLE +#define D3DRENDERSTATE_ALPHATESTENABLE D3DRS_ALPHATESTENABLE +#define D3DRENDERSTATE_LASTPIXEL D3DRS_LASTPIXEL +#define D3DRENDERSTATE_SRCBLEND D3DRS_SRCBLEND +#define D3DRENDERSTATE_DESTBLEND D3DRS_DESTBLEND +#define D3DRENDERSTATE_CULLMODE D3DRS_CULLMODE +#define D3DRENDERSTATE_ZFUNC D3DRS_ZFUNC +#define D3DRENDERSTATE_ALPHAREF D3DRS_ALPHAREF +#define D3DRENDERSTATE_ALPHAFUNC D3DRS_ALPHAFUNC +#define D3DRENDERSTATE_DITHERENABLE D3DRS_DITHERENABLE +#define D3DRENDERSTATE_ALPHABLENDENABLE D3DRS_ALPHABLENDENABLE +#define D3DRENDERSTATE_FOGENABLE D3DRS_FOGENABLE +#define D3DRENDERSTATE_SPECULARENABLE D3DRS_SPECULARENABLE +#define D3DRENDERSTATE_ZVISIBLE D3DRS_ZVISIBLE +#define D3DRENDERSTATE_FOGCOLOR D3DRS_FOGCOLOR +#define D3DRENDERSTATE_FOGTABLEMODE D3DRS_FOGTABLEMODE +#define D3DRENDERSTATE_FOGSTART D3DRS_FOGSTART +#define D3DRENDERSTATE_FOGEND D3DRS_FOGEND +#define D3DRENDERSTATE_FOGDENSITY D3DRS_FOGDENSITY +#define D3DRENDERSTATE_EDGEANTIALIAS D3DRS_EDGEANTIALIAS +#define D3DRENDERSTATE_ZBIAS D3DRS_ZBIAS +#define D3DRENDERSTATE_RANGEFOGENABLE D3DRS_RANGEFOGENABLE +#define D3DRENDERSTATE_STENCILENABLE D3DRS_STENCILENABLE +#define D3DRENDERSTATE_STENCILFAIL D3DRS_STENCILFAIL +#define D3DRENDERSTATE_STENCILZFAIL D3DRS_STENCILZFAIL +#define D3DRENDERSTATE_STENCILPASS D3DRS_STENCILPASS +#define D3DRENDERSTATE_STENCILFUNC D3DRS_STENCILFUNC +#define D3DRENDERSTATE_STENCILREF D3DRS_STENCILREF +#define D3DRENDERSTATE_STENCILMASK D3DRS_STENCILMASK +#define D3DRENDERSTATE_STENCILWRITEMASK D3DRS_STENCILWRITEMASK +#define D3DRENDERSTATE_TEXTUREFACTOR D3DRS_TEXTUREFACTOR +#define D3DRENDERSTATE_WRAP0 D3DRS_WRAP0 +#define D3DRENDERSTATE_WRAP1 D3DRS_WRAP1 +#define D3DRENDERSTATE_WRAP2 D3DRS_WRAP2 +#define D3DRENDERSTATE_WRAP3 D3DRS_WRAP3 +#define D3DRENDERSTATE_WRAP4 D3DRS_WRAP4 +#define D3DRENDERSTATE_WRAP5 D3DRS_WRAP5 +#define D3DRENDERSTATE_WRAP6 D3DRS_WRAP6 +#define D3DRENDERSTATE_WRAP7 D3DRS_WRAP7 +#define D3DRENDERSTATE_CLIPPING D3DRS_CLIPPING +#define D3DRENDERSTATE_LIGHTING D3DRS_LIGHTING +#define D3DRENDERSTATE_EXTENTS D3DRS_EXTENTS +#define D3DRENDERSTATE_AMBIENT D3DRS_AMBIENT +#define D3DRENDERSTATE_FOGVERTEXMODE D3DRS_FOGVERTEXMODE +#define D3DRENDERSTATE_COLORVERTEX D3DRS_COLORVERTEX +#define D3DRENDERSTATE_LOCALVIEWER D3DRS_LOCALVIEWER +#define D3DRENDERSTATE_NORMALIZENORMALS D3DRS_NORMALIZENORMALS +#define D3DRENDERSTATE_DIFFUSEMATERIALSOURCE D3DRS_DIFFUSEMATERIALSOURCE +#define D3DRENDERSTATE_SPECULARMATERIALSOURCE D3DRS_SPECULARMATERIALSOURCE +#define D3DRENDERSTATE_AMBIENTMATERIALSOURCE D3DRS_AMBIENTMATERIALSOURCE +#define D3DRENDERSTATE_EMISSIVEMATERIALSOURCE D3DRS_EMISSIVEMATERIALSOURCE +#define D3DRENDERSTATE_VERTEXBLEND D3DRS_VERTEXBLEND +#define D3DRENDERSTATE_CLIPPLANEENABLE D3DRS_CLIPPLANEENABLE + +#define RGBA_MAKE D3DCOLOR_RGBA +#define RGB_MAKE D3DCOLOR_XRGB +#define D3DRGBA D3DCOLOR_COLORVALUE +#define D3DRGB(_r,_g,_b) D3DCOLOR_COLORVALUE(_r,_g,_b,1.f) + +#define _DX7TODX8_H_ +#endif //_DX7TODX8_H_ diff --git a/windows_libs/mssdk/include/dxerr8.h b/windows_libs/mssdk/include/dxerr8.h new file mode 100644 index 00000000..3f4a3b7a --- /dev/null +++ b/windows_libs/mssdk/include/dxerr8.h @@ -0,0 +1,74 @@ +/*==========================================================================; + * + * + * File: dxerr8.h + * Content: DirectX Error Library Include File + * + ****************************************************************************/ + +#ifndef _DXERR8_H_ +#define _DXERR8_H_ + + +// +// DXGetErrorString8 +// +// Desc: Converts an DirectX HRESULT to a string +// +// Args: HRESULT hr Can be any error code from +// DPLAY D3D8 D3DX8 DMUSIC DSOUND +// +// Return: Converted string +// +const char* __stdcall DXGetErrorString8A(HRESULT hr); +const WCHAR* __stdcall DXGetErrorString8W(HRESULT hr); + +#ifdef UNICODE + #define DXGetErrorString8 DXGetErrorString8W +#else + #define DXGetErrorString8 DXGetErrorString8A +#endif + + +// +// DXTrace +// +// Desc: Outputs a formatted error message to the debug stream +// +// Args: CHAR* strFile The current file, typically passed in using the +// __FILE__ macro. +// DWORD dwLine The current line number, typically passed in using the +// __LINE__ macro. +// HRESULT hr An HRESULT that will be traced to the debug stream. +// CHAR* strMsg A string that will be traced to the debug stream (may be NULL) +// BOOL bPopMsgBox If TRUE, then a message box will popup also containing the passed info. +// +// Return: The hr that was passed in. +// +HRESULT __stdcall DXTraceA( char* strFile, DWORD dwLine, HRESULT hr, char* strMsg, BOOL bPopMsgBox = FALSE ); +HRESULT __stdcall DXTraceW( char* strFile, DWORD dwLine, HRESULT hr, WCHAR* strMsg, BOOL bPopMsgBox = FALSE ); + +#ifdef UNICODE + #define DXTrace DXTraceW +#else + #define DXTrace DXTraceA +#endif + + +// +// Helper macros +// +#if defined(DEBUG) | defined(_DEBUG) + #define DXTRACE_MSG(str) DXTrace( __FILE__, (DWORD)__LINE__, 0, str, FALSE ) + #define DXTRACE_ERR(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, TRUE ) + #define DXTRACE_ERR_NOMSGBOX(str,hr) DXTrace( __FILE__, (DWORD)__LINE__, hr, str, FALSE ) +#else + #define DXTRACE_MSG(str) (0L) + #define DXTRACE_ERR(str,hr) (hr) + #define DXTRACE_ERR_NOMSGBOX(str,hr) (hr) +#endif + + +#endif + + diff --git a/windows_libs/mssdk/include/dxfile.h b/windows_libs/mssdk/include/dxfile.h new file mode 100644 index 00000000..8b5995a5 --- /dev/null +++ b/windows_libs/mssdk/include/dxfile.h @@ -0,0 +1,240 @@ +/*************************************************************************** + * + * Copyright (C) 1998-1999 Microsoft Corporation. All Rights Reserved. + * + * File: dxfile.h + * + * Content: DirectX File public header file + * + ***************************************************************************/ + +#ifndef __DXFILE_H__ +#define __DXFILE_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef DWORD DXFILEFORMAT; + +#define DXFILEFORMAT_BINARY 0 +#define DXFILEFORMAT_TEXT 1 +#define DXFILEFORMAT_COMPRESSED 2 + +typedef DWORD DXFILELOADOPTIONS; + +#define DXFILELOAD_FROMFILE 0x00L +#define DXFILELOAD_FROMRESOURCE 0x01L +#define DXFILELOAD_FROMMEMORY 0x02L +#define DXFILELOAD_FROMSTREAM 0x04L +#define DXFILELOAD_FROMURL 0x08L + +typedef struct _DXFILELOADRESOURCE { + HMODULE hModule; + LPCTSTR lpName; + LPCTSTR lpType; +}DXFILELOADRESOURCE, *LPDXFILELOADRESOURCE; + +typedef struct _DXFILELOADMEMORY { + LPVOID lpMemory; + DWORD dSize; +}DXFILELOADMEMORY, *LPDXFILELOADMEMORY; + +/* + * DirectX File object types. + */ + +#ifndef WIN_TYPES +#define WIN_TYPES(itype, ptype) typedef interface itype *LP##ptype, **LPLP##ptype +#endif + +WIN_TYPES(IDirectXFile, DIRECTXFILE); +WIN_TYPES(IDirectXFileEnumObject, DIRECTXFILEENUMOBJECT); +WIN_TYPES(IDirectXFileSaveObject, DIRECTXFILESAVEOBJECT); +WIN_TYPES(IDirectXFileObject, DIRECTXFILEOBJECT); +WIN_TYPES(IDirectXFileData, DIRECTXFILEDATA); +WIN_TYPES(IDirectXFileDataReference, DIRECTXFILEDATAREFERENCE); +WIN_TYPES(IDirectXFileBinary, DIRECTXFILEBINARY); + +/* + * API for creating IDirectXFile interface. + */ + +STDAPI DirectXFileCreate(LPDIRECTXFILE *lplpDirectXFile); + +/* + * The methods for IUnknown + */ + +#define IUNKNOWN_METHODS(kind) \ + STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID *ppvObj) kind; \ + STDMETHOD_(ULONG, AddRef) (THIS) kind; \ + STDMETHOD_(ULONG, Release) (THIS) kind + +/* + * The methods for IDirectXFileObject + */ + +#define IDIRECTXFILEOBJECT_METHODS(kind) \ + STDMETHOD(GetName) (THIS_ LPSTR, LPDWORD) kind; \ + STDMETHOD(GetId) (THIS_ LPGUID) kind + +/* + * DirectX File interfaces. + */ + +#undef INTERFACE +#define INTERFACE IDirectXFile + +DECLARE_INTERFACE_(IDirectXFile, IUnknown) +{ + IUNKNOWN_METHODS(PURE); + STDMETHOD(CreateEnumObject) (THIS_ LPVOID, DXFILELOADOPTIONS, + LPDIRECTXFILEENUMOBJECT *) PURE; + STDMETHOD(CreateSaveObject) (THIS_ LPCSTR, DXFILEFORMAT, + LPDIRECTXFILESAVEOBJECT *) PURE; + STDMETHOD(RegisterTemplates) (THIS_ LPVOID, DWORD) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirectXFileEnumObject + +DECLARE_INTERFACE_(IDirectXFileEnumObject, IUnknown) +{ + IUNKNOWN_METHODS(PURE); + STDMETHOD(GetNextDataObject) (THIS_ LPDIRECTXFILEDATA *) PURE; + STDMETHOD(GetDataObjectById) (THIS_ REFGUID, LPDIRECTXFILEDATA *) PURE; + STDMETHOD(GetDataObjectByName) (THIS_ LPCSTR, LPDIRECTXFILEDATA *) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirectXFileSaveObject + +DECLARE_INTERFACE_(IDirectXFileSaveObject, IUnknown) +{ + IUNKNOWN_METHODS(PURE); + STDMETHOD(SaveTemplates) (THIS_ DWORD, const GUID **) PURE; + STDMETHOD(CreateDataObject) (THIS_ REFGUID, LPCSTR, const GUID *, + DWORD, LPVOID, LPDIRECTXFILEDATA *) PURE; + STDMETHOD(SaveData) (THIS_ LPDIRECTXFILEDATA) PURE; +}; + + +#undef INTERFACE +#define INTERFACE IDirectXFileObject + +DECLARE_INTERFACE_(IDirectXFileObject, IUnknown) +{ + IUNKNOWN_METHODS(PURE); + IDIRECTXFILEOBJECT_METHODS(PURE); +}; + +#undef INTERFACE +#define INTERFACE IDirectXFileData + +DECLARE_INTERFACE_(IDirectXFileData, IDirectXFileObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECTXFILEOBJECT_METHODS(PURE); + + STDMETHOD(GetData) (THIS_ LPCSTR, DWORD *, void **) PURE; + STDMETHOD(GetType) (THIS_ const GUID **) PURE; + STDMETHOD(GetNextObject) (THIS_ LPDIRECTXFILEOBJECT *) PURE; + STDMETHOD(AddDataObject) (THIS_ LPDIRECTXFILEDATA) PURE; + STDMETHOD(AddDataReference) (THIS_ LPCSTR, const GUID *) PURE; + STDMETHOD(AddBinaryObject) (THIS_ LPCSTR, const GUID *, LPCSTR, LPVOID, DWORD) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirectXFileDataReference + +DECLARE_INTERFACE_(IDirectXFileDataReference, IDirectXFileObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECTXFILEOBJECT_METHODS(PURE); + + STDMETHOD(Resolve) (THIS_ LPDIRECTXFILEDATA *) PURE; +}; + +#undef INTERFACE +#define INTERFACE IDirectXFileBinary + +DECLARE_INTERFACE_(IDirectXFileBinary, IDirectXFileObject) +{ + IUNKNOWN_METHODS(PURE); + IDIRECTXFILEOBJECT_METHODS(PURE); + + STDMETHOD(GetSize) (THIS_ DWORD *) PURE; + STDMETHOD(GetMimeType) (THIS_ LPCSTR *) PURE; + STDMETHOD(Read) (THIS_ LPVOID, DWORD, LPDWORD) PURE; +}; + +/* + * DirectXFile Object Class Id (for CoCreateInstance()) + */ + +DEFINE_GUID(CLSID_CDirectXFile, 0x4516ec43, 0x8f20, 0x11d0, 0x9b, 0x6d, 0x00, 0x00, 0xc0, 0x78, 0x1b, 0xc3); + +/* + * DirectX File Interface GUIDs. + */ + +DEFINE_GUID(IID_IDirectXFile, 0x3d82ab40, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); +DEFINE_GUID(IID_IDirectXFileEnumObject, 0x3d82ab41, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); +DEFINE_GUID(IID_IDirectXFileSaveObject, 0x3d82ab42, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); +DEFINE_GUID(IID_IDirectXFileObject, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); +DEFINE_GUID(IID_IDirectXFileData, 0x3d82ab44, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); +DEFINE_GUID(IID_IDirectXFileDataReference, 0x3d82ab45, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); +DEFINE_GUID(IID_IDirectXFileBinary, 0x3d82ab46, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* + * DirectX File Header template's GUID. + */ + +DEFINE_GUID(TID_DXFILEHeader, 0x3d82ab43, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + + +/* + * DirectX File errors. + */ + +#define _FACDD 0x876 +#define MAKE_DDHRESULT( code ) MAKE_HRESULT( 1, _FACDD, code ) + +#define DXFILE_OK 0 + +#define DXFILEERR_BADOBJECT MAKE_DDHRESULT(850) +#define DXFILEERR_BADVALUE MAKE_DDHRESULT(851) +#define DXFILEERR_BADTYPE MAKE_DDHRESULT(852) +#define DXFILEERR_BADSTREAMHANDLE MAKE_DDHRESULT(853) +#define DXFILEERR_BADALLOC MAKE_DDHRESULT(854) +#define DXFILEERR_NOTFOUND MAKE_DDHRESULT(855) +#define DXFILEERR_NOTDONEYET MAKE_DDHRESULT(856) +#define DXFILEERR_FILENOTFOUND MAKE_DDHRESULT(857) +#define DXFILEERR_RESOURCENOTFOUND MAKE_DDHRESULT(858) +#define DXFILEERR_URLNOTFOUND MAKE_DDHRESULT(859) +#define DXFILEERR_BADRESOURCE MAKE_DDHRESULT(860) +#define DXFILEERR_BADFILETYPE MAKE_DDHRESULT(861) +#define DXFILEERR_BADFILEVERSION MAKE_DDHRESULT(862) +#define DXFILEERR_BADFILEFLOATSIZE MAKE_DDHRESULT(863) +#define DXFILEERR_BADFILECOMPRESSIONTYPE MAKE_DDHRESULT(864) +#define DXFILEERR_BADFILE MAKE_DDHRESULT(865) +#define DXFILEERR_PARSEERROR MAKE_DDHRESULT(866) +#define DXFILEERR_NOTEMPLATE MAKE_DDHRESULT(867) +#define DXFILEERR_BADARRAYSIZE MAKE_DDHRESULT(868) +#define DXFILEERR_BADDATAREFERENCE MAKE_DDHRESULT(869) +#define DXFILEERR_INTERNALERROR MAKE_DDHRESULT(870) +#define DXFILEERR_NOMOREOBJECTS MAKE_DDHRESULT(871) +#define DXFILEERR_BADINTRINSICS MAKE_DDHRESULT(872) +#define DXFILEERR_NOMORESTREAMHANDLES MAKE_DDHRESULT(873) +#define DXFILEERR_NOMOREDATA MAKE_DDHRESULT(874) +#define DXFILEERR_BADCACHEFILE MAKE_DDHRESULT(875) +#define DXFILEERR_NOINTERNET MAKE_DDHRESULT(876) + + +#ifdef __cplusplus +}; +#endif + +#endif /* _DXFILE_H_ */ + \ No newline at end of file diff --git a/windows_libs/mssdk/include/dxsdk.inc b/windows_libs/mssdk/include/dxsdk.inc new file mode 100644 index 00000000..be042404 --- /dev/null +++ b/windows_libs/mssdk/include/dxsdk.inc @@ -0,0 +1,131 @@ +!IFDEF BORLAND +cc = bcc32 +rc = brc32 +link = ilink32 +bldlib = tlib +cflags = -c -3 -j1 -X -Vd -I$(INCLUDE) +rcflags = -r -fo +linkflags = -n -V4.0 -aa +!IFDEF main +linkflags = $(linkflags) -ap +borobjs=c0x32.obj +!ELSE +linkflags = $(linkflags) -Tpe +borobjs=c0w32.obj +!ENDIF +linkflags = $(linkflags) -j$(LIB) -L$(LIB) +libflags=$(OBJ_DIR)\$(proj).lib +outobj = -o +commas =, +outexe= +borlib=+ +deflibs = import32.lib cw32mti.lib ole2w32.lib +!IFDEF MFC +cflags =$(cflags) -VF -w-hid -w-par -w-aus -w-inl -w-inq -WM -Vd /D_NO_VCL;_RTLDLL;_AFXDLL;_X86_;_WINDOWS;_MSC_VER=1100;WIN32; +!IFDEF NODEBUG +deflibs = bfc42.lib bfcs42.lib $(deflibs) +!ELSE +deflibs = BFC42D.lib BFCS42D.lib bfcd42d.lib bfco42d.lib bfcn42d.lib $(deflibs) +!ENDIF +!ENDIF + +d3dframe=..\..\lib\borland\d3dframe.lib + +!IFDEF nodebug +cdebug = -Od +linkdebug = /x +cflags = $(cflags) /DNDEBUG; +!ELSE +cdebug = -Od -v -y +linkdebug = /v +cflags = $(cflags) /DDEBUG; +!ENDIF + +!ELSE +!IFDEF WATCOM +cc = cl +rc = rc +link = link +bldlib = lib +deflibs = kernel32.lib gdi32.lib user32.lib advapi32.lib gdi32.lib comdlg32.lib winspool.lib shell32.lib winmm.lib comctl32.lib ole32.lib oleaut32.lib +cflags = -c /D "WIN32" /D "_WINDOWS" +!IFDEF NODEBUG +cflags =$(cflags) /D "NDEBUG" +cdebug = -Ox +linkdebug = +!IFDEF MFC +cflags =$(cflags) /MD /D "_AFXDLL" +!ELSE +cflags =$(cflags) /ML +!ENDIF +!ELSE +cflags =$(cflags) /D "DEBUG" +cdebug = -Z7 -Ox +linkdebug = -map -debug:full +!IFDEF MFC +cflags =$(cflags) /MDd /D "_AFXDLL" +!ELSE +cflags =$(cflags) /MLd +!ENDIF +!ENDIF +rcflags = -r -fo +linkflags = /INCREMENTAL:NO /NOLOGO +!IFDEF main +linkflags = $(linkflags) /SUBSYSTEM:CONSOLE +!ELSE +linkflags = $(linkflags) /SUBSYSTEM:WINDOWS +!ENDIF +libflags=/OUT:$(OBJ_DIR)\$(proj).lib +outobj = -Fo +commas= +outexe=-out: +borobjs= +borlib= +d3dframe=..\..\lib\watcom\d3dframe.lib + +!ELSE +cc = cl +rc = rc +link = link +bldlib = lib +deflibs = kernel32.lib gdi32.lib user32.lib advapi32.lib gdi32.lib comdlg32.lib winspool.lib shell32.lib winmm.lib comctl32.lib ole32.lib oleaut32.lib +cflags = -c /D "WIN32" /D "_WINDOWS" +linkflags= +!IFDEF NODEBUG +cflags =$(cflags) /D "NDEBUG" +cdebug = -Ox +linkdebug = /RELEASE +!IFDEF MFC +cflags =$(cflags) /MD /D "_AFXDLL" +!ELSE +cflags =$(cflags) /ML +!ENDIF +!ELSE +cflags = $(cflags) /D "DEBUG" +cdebug = -Z7 -Ox +linkdebug = -map -debug:full -debugtype:cv +!IFDEF MFC +cflags =$(cflags) /MDd /D "_AFXDLL" +!ELSE +linkflags = $(linkflags) /NODEFAULTLIB:LIBC +cflags =$(cflags) /MLd +!ENDIF +!ENDIF +cflags =$(cflags) +rcflags = -r -fo +linkflags = $(linkflags) /INCREMENTAL:NO /PDB:NONE /NOLOGO +!IFDEF main +linkflags = $(linkflags) /SUBSYSTEM:CONSOLE +!ELSE +linkflags = $(linkflags) /SUBSYSTEM:WINDOWS +!ENDIF +libflags=/OUT:$(OBJ_DIR)\$(proj).lib /SUBSYSTEM:WINDOWS +outobj = -Fo +commas= +outexe=-out: +borobjs= +borlib= +d3dframe=..\..\lib\d3dframe.lib + +!ENDIF +!ENDIF diff --git a/windows_libs/mssdk/include/dxtrans.h b/windows_libs/mssdk/include/dxtrans.h new file mode 100644 index 00000000..68693c5b --- /dev/null +++ b/windows_libs/mssdk/include/dxtrans.h @@ -0,0 +1,4974 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0334 */ +/* Compiler settings for dxtrans.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __dxtrans_h__ +#define __dxtrans_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IDXBaseObject_FWD_DEFINED__ +#define __IDXBaseObject_FWD_DEFINED__ +typedef interface IDXBaseObject IDXBaseObject; +#endif /* __IDXBaseObject_FWD_DEFINED__ */ + + +#ifndef __IDXTransformFactory_FWD_DEFINED__ +#define __IDXTransformFactory_FWD_DEFINED__ +typedef interface IDXTransformFactory IDXTransformFactory; +#endif /* __IDXTransformFactory_FWD_DEFINED__ */ + + +#ifndef __IDXTransform_FWD_DEFINED__ +#define __IDXTransform_FWD_DEFINED__ +typedef interface IDXTransform IDXTransform; +#endif /* __IDXTransform_FWD_DEFINED__ */ + + +#ifndef __IDXSurfacePick_FWD_DEFINED__ +#define __IDXSurfacePick_FWD_DEFINED__ +typedef interface IDXSurfacePick IDXSurfacePick; +#endif /* __IDXSurfacePick_FWD_DEFINED__ */ + + +#ifndef __IDXTBindHost_FWD_DEFINED__ +#define __IDXTBindHost_FWD_DEFINED__ +typedef interface IDXTBindHost IDXTBindHost; +#endif /* __IDXTBindHost_FWD_DEFINED__ */ + + +#ifndef __IDXTaskManager_FWD_DEFINED__ +#define __IDXTaskManager_FWD_DEFINED__ +typedef interface IDXTaskManager IDXTaskManager; +#endif /* __IDXTaskManager_FWD_DEFINED__ */ + + +#ifndef __IDXSurfaceFactory_FWD_DEFINED__ +#define __IDXSurfaceFactory_FWD_DEFINED__ +typedef interface IDXSurfaceFactory IDXSurfaceFactory; +#endif /* __IDXSurfaceFactory_FWD_DEFINED__ */ + + +#ifndef __IDXSurfaceModifier_FWD_DEFINED__ +#define __IDXSurfaceModifier_FWD_DEFINED__ +typedef interface IDXSurfaceModifier IDXSurfaceModifier; +#endif /* __IDXSurfaceModifier_FWD_DEFINED__ */ + + +#ifndef __IDXSurface_FWD_DEFINED__ +#define __IDXSurface_FWD_DEFINED__ +typedef interface IDXSurface IDXSurface; +#endif /* __IDXSurface_FWD_DEFINED__ */ + + +#ifndef __IDXSurfaceInit_FWD_DEFINED__ +#define __IDXSurfaceInit_FWD_DEFINED__ +typedef interface IDXSurfaceInit IDXSurfaceInit; +#endif /* __IDXSurfaceInit_FWD_DEFINED__ */ + + +#ifndef __IDXARGBSurfaceInit_FWD_DEFINED__ +#define __IDXARGBSurfaceInit_FWD_DEFINED__ +typedef interface IDXARGBSurfaceInit IDXARGBSurfaceInit; +#endif /* __IDXARGBSurfaceInit_FWD_DEFINED__ */ + + +#ifndef __IDXARGBReadPtr_FWD_DEFINED__ +#define __IDXARGBReadPtr_FWD_DEFINED__ +typedef interface IDXARGBReadPtr IDXARGBReadPtr; +#endif /* __IDXARGBReadPtr_FWD_DEFINED__ */ + + +#ifndef __IDXARGBReadWritePtr_FWD_DEFINED__ +#define __IDXARGBReadWritePtr_FWD_DEFINED__ +typedef interface IDXARGBReadWritePtr IDXARGBReadWritePtr; +#endif /* __IDXARGBReadWritePtr_FWD_DEFINED__ */ + + +#ifndef __IDXDCLock_FWD_DEFINED__ +#define __IDXDCLock_FWD_DEFINED__ +typedef interface IDXDCLock IDXDCLock; +#endif /* __IDXDCLock_FWD_DEFINED__ */ + + +#ifndef __IDXTScaleOutput_FWD_DEFINED__ +#define __IDXTScaleOutput_FWD_DEFINED__ +typedef interface IDXTScaleOutput IDXTScaleOutput; +#endif /* __IDXTScaleOutput_FWD_DEFINED__ */ + + +#ifndef __IDXGradient_FWD_DEFINED__ +#define __IDXGradient_FWD_DEFINED__ +typedef interface IDXGradient IDXGradient; +#endif /* __IDXGradient_FWD_DEFINED__ */ + + +#ifndef __IDXTScale_FWD_DEFINED__ +#define __IDXTScale_FWD_DEFINED__ +typedef interface IDXTScale IDXTScale; +#endif /* __IDXTScale_FWD_DEFINED__ */ + + +#ifndef __IDXEffect_FWD_DEFINED__ +#define __IDXEffect_FWD_DEFINED__ +typedef interface IDXEffect IDXEffect; +#endif /* __IDXEffect_FWD_DEFINED__ */ + + +#ifndef __IDXLookupTable_FWD_DEFINED__ +#define __IDXLookupTable_FWD_DEFINED__ +typedef interface IDXLookupTable IDXLookupTable; +#endif /* __IDXLookupTable_FWD_DEFINED__ */ + + +#ifndef __IDXRawSurface_FWD_DEFINED__ +#define __IDXRawSurface_FWD_DEFINED__ +typedef interface IDXRawSurface IDXRawSurface; +#endif /* __IDXRawSurface_FWD_DEFINED__ */ + + +#ifndef __IHTMLDXTransform_FWD_DEFINED__ +#define __IHTMLDXTransform_FWD_DEFINED__ +typedef interface IHTMLDXTransform IHTMLDXTransform; +#endif /* __IHTMLDXTransform_FWD_DEFINED__ */ + + +#ifndef __DXTransformFactory_FWD_DEFINED__ +#define __DXTransformFactory_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DXTransformFactory DXTransformFactory; +#else +typedef struct DXTransformFactory DXTransformFactory; +#endif /* __cplusplus */ + +#endif /* __DXTransformFactory_FWD_DEFINED__ */ + + +#ifndef __DXTaskManager_FWD_DEFINED__ +#define __DXTaskManager_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DXTaskManager DXTaskManager; +#else +typedef struct DXTaskManager DXTaskManager; +#endif /* __cplusplus */ + +#endif /* __DXTaskManager_FWD_DEFINED__ */ + + +#ifndef __DXTScale_FWD_DEFINED__ +#define __DXTScale_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DXTScale DXTScale; +#else +typedef struct DXTScale DXTScale; +#endif /* __cplusplus */ + +#endif /* __DXTScale_FWD_DEFINED__ */ + + +#ifndef __DXSurface_FWD_DEFINED__ +#define __DXSurface_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DXSurface DXSurface; +#else +typedef struct DXSurface DXSurface; +#endif /* __cplusplus */ + +#endif /* __DXSurface_FWD_DEFINED__ */ + + +#ifndef __DXSurfaceModifier_FWD_DEFINED__ +#define __DXSurfaceModifier_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DXSurfaceModifier DXSurfaceModifier; +#else +typedef struct DXSurfaceModifier DXSurfaceModifier; +#endif /* __cplusplus */ + +#endif /* __DXSurfaceModifier_FWD_DEFINED__ */ + + +#ifndef __DXGradient_FWD_DEFINED__ +#define __DXGradient_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DXGradient DXGradient; +#else +typedef struct DXGradient DXGradient; +#endif /* __cplusplus */ + +#endif /* __DXGradient_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "comcat.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_dxtrans_0000 */ +/* [local] */ + +#include +#include +#include +#include +#include +#if 0 +// Bogus definition used to make MIDL compiler happy +typedef void DDSURFACEDESC; + +typedef void D3DRMBOX; + +typedef void D3DVECTOR; + +typedef void D3DRMMATRIX4D; + +typedef void *LPSECURITY_ATTRIBUTES; + +#endif +#ifdef _DXTRANSIMPL + #define _DXTRANS_IMPL_EXT _declspec(dllexport) +#else + #define _DXTRANS_IMPL_EXT _declspec(dllimport) +#endif + + + + + + + + + + + + + + + + +// +// All GUIDs for DXTransform are declared in DXTGUID.C in the SDK include directory +// +EXTERN_C const GUID DDPF_RGB1; +EXTERN_C const GUID DDPF_RGB2; +EXTERN_C const GUID DDPF_RGB4; +EXTERN_C const GUID DDPF_RGB8; +EXTERN_C const GUID DDPF_RGB332; +EXTERN_C const GUID DDPF_ARGB4444; +EXTERN_C const GUID DDPF_RGB565; +EXTERN_C const GUID DDPF_BGR565; +EXTERN_C const GUID DDPF_RGB555; +EXTERN_C const GUID DDPF_ARGB1555; +EXTERN_C const GUID DDPF_RGB24; +EXTERN_C const GUID DDPF_BGR24; +EXTERN_C const GUID DDPF_RGB32; +EXTERN_C const GUID DDPF_BGR32; +EXTERN_C const GUID DDPF_ABGR32; +EXTERN_C const GUID DDPF_ARGB32; +EXTERN_C const GUID DDPF_PMARGB32; +EXTERN_C const GUID DDPF_A1; +EXTERN_C const GUID DDPF_A2; +EXTERN_C const GUID DDPF_A4; +EXTERN_C const GUID DDPF_A8; +EXTERN_C const GUID DDPF_Z8; +EXTERN_C const GUID DDPF_Z16; +EXTERN_C const GUID DDPF_Z24; +EXTERN_C const GUID DDPF_Z32; +// +// Component categories +// +EXTERN_C const GUID CATID_DXImageTransform; +EXTERN_C const GUID CATID_DX3DTransform; +EXTERN_C const GUID CATID_DXAuthoringTransform; +EXTERN_C const GUID CATID_DXSurface; +// +// Service IDs +// +EXTERN_C const GUID SID_SDirectDraw; +EXTERN_C const GUID SID_SDirect3DRM; +#define SID_SDXTaskManager CLSID_DXTaskManager +#define SID_SDXSurfaceFactory IID_IDXSurfaceFactory +#define SID_SDXTransformFactory IID_IDXTransformFactory + + +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0000_v0_0_s_ifspec; + +#ifndef __IDXBaseObject_INTERFACE_DEFINED__ +#define __IDXBaseObject_INTERFACE_DEFINED__ + +/* interface IDXBaseObject */ +/* [object][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXBaseObject; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("17B59B2B-9CC8-11d1-9053-00C04FD9189D") + IDXBaseObject : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetGenerationId( + /* [out] */ ULONG *pID) = 0; + + virtual HRESULT STDMETHODCALLTYPE IncrementGenerationId( + /* [in] */ BOOL bRefresh) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetObjectSize( + /* [out] */ ULONG *pcbSize) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXBaseObjectVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXBaseObject * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXBaseObject * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXBaseObject * This); + + HRESULT ( STDMETHODCALLTYPE *GetGenerationId )( + IDXBaseObject * This, + /* [out] */ ULONG *pID); + + HRESULT ( STDMETHODCALLTYPE *IncrementGenerationId )( + IDXBaseObject * This, + /* [in] */ BOOL bRefresh); + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + IDXBaseObject * This, + /* [out] */ ULONG *pcbSize); + + END_INTERFACE + } IDXBaseObjectVtbl; + + interface IDXBaseObject + { + CONST_VTBL struct IDXBaseObjectVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXBaseObject_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXBaseObject_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXBaseObject_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXBaseObject_GetGenerationId(This,pID) \ + (This)->lpVtbl -> GetGenerationId(This,pID) + +#define IDXBaseObject_IncrementGenerationId(This,bRefresh) \ + (This)->lpVtbl -> IncrementGenerationId(This,bRefresh) + +#define IDXBaseObject_GetObjectSize(This,pcbSize) \ + (This)->lpVtbl -> GetObjectSize(This,pcbSize) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDXBaseObject_GetGenerationId_Proxy( + IDXBaseObject * This, + /* [out] */ ULONG *pID); + + +void __RPC_STUB IDXBaseObject_GetGenerationId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXBaseObject_IncrementGenerationId_Proxy( + IDXBaseObject * This, + /* [in] */ BOOL bRefresh); + + +void __RPC_STUB IDXBaseObject_IncrementGenerationId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXBaseObject_GetObjectSize_Proxy( + IDXBaseObject * This, + /* [out] */ ULONG *pcbSize); + + +void __RPC_STUB IDXBaseObject_GetObjectSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXBaseObject_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxtrans_0253 */ +/* [local] */ + +typedef +enum DXBNDID + { DXB_X = 0, + DXB_Y = 1, + DXB_Z = 2, + DXB_T = 3 + } DXBNDID; + +typedef +enum DXBNDTYPE + { DXBT_DISCRETE = 0, + DXBT_DISCRETE64 = DXBT_DISCRETE + 1, + DXBT_CONTINUOUS = DXBT_DISCRETE64 + 1, + DXBT_CONTINUOUS64 = DXBT_CONTINUOUS + 1 + } DXBNDTYPE; + +typedef struct DXDBND + { + long Min; + long Max; + } DXDBND; + +typedef DXDBND DXDBNDS[ 4 ]; + +typedef struct DXDBND64 + { + LONGLONG Min; + LONGLONG Max; + } DXDBND64; + +typedef DXDBND64 DXDBNDS64[ 4 ]; + +typedef struct DXCBND + { + float Min; + float Max; + } DXCBND; + +typedef DXCBND DXCBNDS[ 4 ]; + +typedef struct DXCBND64 + { + double Min; + double Max; + } DXCBND64; + +typedef DXCBND64 DXCBNDS64[ 4 ]; + +typedef struct DXBNDS + { + DXBNDTYPE eType; + /* [switch_is] */ /* [switch_type] */ union __MIDL___MIDL_itf_dxtrans_0253_0001 + { + /* [case()] */ DXDBND D[ 4 ]; + /* [case()] */ DXDBND64 LD[ 4 ]; + /* [case()] */ DXCBND C[ 4 ]; + /* [case()] */ DXCBND64 LC[ 4 ]; + } u; + } DXBNDS; + +typedef long DXDVEC[ 4 ]; + +typedef LONGLONG DXDVEC64[ 4 ]; + +typedef float DXCVEC[ 4 ]; + +typedef double DXCVEC64[ 4 ]; + +typedef struct DXVEC + { + DXBNDTYPE eType; + /* [switch_is] */ /* [switch_type] */ union __MIDL___MIDL_itf_dxtrans_0253_0002 + { + /* [case()] */ long D[ 4 ]; + /* [case()] */ LONGLONG LD[ 4 ]; + /* [case()] */ float C[ 4 ]; + /* [case()] */ double LC[ 4 ]; + } u; + } DXVEC; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0253_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0253_v0_0_s_ifspec; + +#ifndef __IDXTransformFactory_INTERFACE_DEFINED__ +#define __IDXTransformFactory_INTERFACE_DEFINED__ + +/* interface IDXTransformFactory */ +/* [object][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXTransformFactory; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6A950B2B-A971-11d1-81C8-0000F87557DB") + IDXTransformFactory : public IServiceProvider + { + public: + virtual HRESULT STDMETHODCALLTYPE SetService( + /* [in] */ REFGUID guidService, + /* [in] */ IUnknown *pUnkService, + /* [in] */ BOOL bWeakReference) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateTransform( + /* [size_is][in] */ IUnknown **punkInputs, + /* [in] */ ULONG ulNumInputs, + /* [size_is][in] */ IUnknown **punkOutputs, + /* [in] */ ULONG ulNumOutputs, + /* [in] */ IPropertyBag *pInitProps, + /* [in] */ IErrorLog *pErrLog, + /* [in] */ REFCLSID TransCLSID, + /* [in] */ REFIID TransIID, + /* [iid_is][out] */ void **ppTransform) = 0; + + virtual HRESULT STDMETHODCALLTYPE InitializeTransform( + /* [in] */ IDXTransform *pTransform, + /* [size_is][in] */ IUnknown **punkInputs, + /* [in] */ ULONG ulNumInputs, + /* [size_is][in] */ IUnknown **punkOutputs, + /* [in] */ ULONG ulNumOutputs, + /* [in] */ IPropertyBag *pInitProps, + /* [in] */ IErrorLog *pErrLog) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXTransformFactoryVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXTransformFactory * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXTransformFactory * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXTransformFactory * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *QueryService )( + IDXTransformFactory * This, + /* [in] */ REFGUID guidService, + /* [in] */ REFIID riid, + /* [out] */ void **ppvObject); + + HRESULT ( STDMETHODCALLTYPE *SetService )( + IDXTransformFactory * This, + /* [in] */ REFGUID guidService, + /* [in] */ IUnknown *pUnkService, + /* [in] */ BOOL bWeakReference); + + HRESULT ( STDMETHODCALLTYPE *CreateTransform )( + IDXTransformFactory * This, + /* [size_is][in] */ IUnknown **punkInputs, + /* [in] */ ULONG ulNumInputs, + /* [size_is][in] */ IUnknown **punkOutputs, + /* [in] */ ULONG ulNumOutputs, + /* [in] */ IPropertyBag *pInitProps, + /* [in] */ IErrorLog *pErrLog, + /* [in] */ REFCLSID TransCLSID, + /* [in] */ REFIID TransIID, + /* [iid_is][out] */ void **ppTransform); + + HRESULT ( STDMETHODCALLTYPE *InitializeTransform )( + IDXTransformFactory * This, + /* [in] */ IDXTransform *pTransform, + /* [size_is][in] */ IUnknown **punkInputs, + /* [in] */ ULONG ulNumInputs, + /* [size_is][in] */ IUnknown **punkOutputs, + /* [in] */ ULONG ulNumOutputs, + /* [in] */ IPropertyBag *pInitProps, + /* [in] */ IErrorLog *pErrLog); + + END_INTERFACE + } IDXTransformFactoryVtbl; + + interface IDXTransformFactory + { + CONST_VTBL struct IDXTransformFactoryVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXTransformFactory_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXTransformFactory_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXTransformFactory_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXTransformFactory_QueryService(This,guidService,riid,ppvObject) \ + (This)->lpVtbl -> QueryService(This,guidService,riid,ppvObject) + + +#define IDXTransformFactory_SetService(This,guidService,pUnkService,bWeakReference) \ + (This)->lpVtbl -> SetService(This,guidService,pUnkService,bWeakReference) + +#define IDXTransformFactory_CreateTransform(This,punkInputs,ulNumInputs,punkOutputs,ulNumOutputs,pInitProps,pErrLog,TransCLSID,TransIID,ppTransform) \ + (This)->lpVtbl -> CreateTransform(This,punkInputs,ulNumInputs,punkOutputs,ulNumOutputs,pInitProps,pErrLog,TransCLSID,TransIID,ppTransform) + +#define IDXTransformFactory_InitializeTransform(This,pTransform,punkInputs,ulNumInputs,punkOutputs,ulNumOutputs,pInitProps,pErrLog) \ + (This)->lpVtbl -> InitializeTransform(This,pTransform,punkInputs,ulNumInputs,punkOutputs,ulNumOutputs,pInitProps,pErrLog) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDXTransformFactory_SetService_Proxy( + IDXTransformFactory * This, + /* [in] */ REFGUID guidService, + /* [in] */ IUnknown *pUnkService, + /* [in] */ BOOL bWeakReference); + + +void __RPC_STUB IDXTransformFactory_SetService_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTransformFactory_CreateTransform_Proxy( + IDXTransformFactory * This, + /* [size_is][in] */ IUnknown **punkInputs, + /* [in] */ ULONG ulNumInputs, + /* [size_is][in] */ IUnknown **punkOutputs, + /* [in] */ ULONG ulNumOutputs, + /* [in] */ IPropertyBag *pInitProps, + /* [in] */ IErrorLog *pErrLog, + /* [in] */ REFCLSID TransCLSID, + /* [in] */ REFIID TransIID, + /* [iid_is][out] */ void **ppTransform); + + +void __RPC_STUB IDXTransformFactory_CreateTransform_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTransformFactory_InitializeTransform_Proxy( + IDXTransformFactory * This, + /* [in] */ IDXTransform *pTransform, + /* [size_is][in] */ IUnknown **punkInputs, + /* [in] */ ULONG ulNumInputs, + /* [size_is][in] */ IUnknown **punkOutputs, + /* [in] */ ULONG ulNumOutputs, + /* [in] */ IPropertyBag *pInitProps, + /* [in] */ IErrorLog *pErrLog); + + +void __RPC_STUB IDXTransformFactory_InitializeTransform_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXTransformFactory_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxtrans_0254 */ +/* [local] */ + +typedef +enum DXTMISCFLAGS + { DXTMF_BLEND_WITH_OUTPUT = 1L << 0, + DXTMF_DITHER_OUTPUT = 1L << 1, + DXTMF_OPTION_MASK = 0xffff, + DXTMF_VALID_OPTIONS = DXTMF_BLEND_WITH_OUTPUT | DXTMF_DITHER_OUTPUT, + DXTMF_BLEND_SUPPORTED = 1L << 16, + DXTMF_DITHER_SUPPORTED = 1L << 17, + DXTMF_INPLACE_OPERATION = 1L << 24, + DXTMF_BOUNDS_SUPPORTED = 1L << 25, + DXTMF_PLACEMENT_SUPPORTED = 1L << 26, + DXTMF_QUALITY_SUPPORTED = 1L << 27, + DXTMF_OPAQUE_RESULT = 1L << 28 + } DXTMISCFLAGS; + +typedef +enum DXINOUTINFOFLAGS + { DXINOUTF_OPTIONAL = 1L << 0 + } DXINOUTINFOFLAGS; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0254_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0254_v0_0_s_ifspec; + +#ifndef __IDXTransform_INTERFACE_DEFINED__ +#define __IDXTransform_INTERFACE_DEFINED__ + +/* interface IDXTransform */ +/* [object][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXTransform; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("30A5FB78-E11F-11d1-9064-00C04FD9189D") + IDXTransform : public IDXBaseObject + { + public: + virtual HRESULT STDMETHODCALLTYPE Setup( + /* [size_is][in] */ IUnknown *const *punkInputs, + /* [in] */ ULONG ulNumInputs, + /* [size_is][in] */ IUnknown *const *punkOutputs, + /* [in] */ ULONG ulNumOutputs, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE Execute( + /* [in] */ const GUID *pRequestID, + /* [in] */ const DXBNDS *pClipBnds, + /* [in] */ const DXVEC *pPlacement) = 0; + + virtual HRESULT STDMETHODCALLTYPE MapBoundsIn2Out( + /* [in] */ const DXBNDS *pInBounds, + /* [in] */ ULONG ulNumInBnds, + /* [in] */ ULONG ulOutIndex, + /* [out] */ DXBNDS *pOutBounds) = 0; + + virtual HRESULT STDMETHODCALLTYPE MapBoundsOut2In( + /* [in] */ ULONG ulOutIndex, + /* [in] */ const DXBNDS *pOutBounds, + /* [in] */ ULONG ulInIndex, + /* [out] */ DXBNDS *pInBounds) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMiscFlags( + /* [in] */ DWORD dwMiscFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMiscFlags( + /* [out] */ DWORD *pdwMiscFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInOutInfo( + /* [in] */ BOOL bIsOutput, + /* [in] */ ULONG ulIndex, + /* [out] */ DWORD *pdwFlags, + /* [size_is][out] */ GUID *pIDs, + /* [out][in] */ ULONG *pcIDs, + /* [out] */ IUnknown **ppUnkCurrentObject) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetQuality( + /* [in] */ float fQuality) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetQuality( + /* [out] */ float *fQuality) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXTransformVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXTransform * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXTransform * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXTransform * This); + + HRESULT ( STDMETHODCALLTYPE *GetGenerationId )( + IDXTransform * This, + /* [out] */ ULONG *pID); + + HRESULT ( STDMETHODCALLTYPE *IncrementGenerationId )( + IDXTransform * This, + /* [in] */ BOOL bRefresh); + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + IDXTransform * This, + /* [out] */ ULONG *pcbSize); + + HRESULT ( STDMETHODCALLTYPE *Setup )( + IDXTransform * This, + /* [size_is][in] */ IUnknown *const *punkInputs, + /* [in] */ ULONG ulNumInputs, + /* [size_is][in] */ IUnknown *const *punkOutputs, + /* [in] */ ULONG ulNumOutputs, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *Execute )( + IDXTransform * This, + /* [in] */ const GUID *pRequestID, + /* [in] */ const DXBNDS *pClipBnds, + /* [in] */ const DXVEC *pPlacement); + + HRESULT ( STDMETHODCALLTYPE *MapBoundsIn2Out )( + IDXTransform * This, + /* [in] */ const DXBNDS *pInBounds, + /* [in] */ ULONG ulNumInBnds, + /* [in] */ ULONG ulOutIndex, + /* [out] */ DXBNDS *pOutBounds); + + HRESULT ( STDMETHODCALLTYPE *MapBoundsOut2In )( + IDXTransform * This, + /* [in] */ ULONG ulOutIndex, + /* [in] */ const DXBNDS *pOutBounds, + /* [in] */ ULONG ulInIndex, + /* [out] */ DXBNDS *pInBounds); + + HRESULT ( STDMETHODCALLTYPE *SetMiscFlags )( + IDXTransform * This, + /* [in] */ DWORD dwMiscFlags); + + HRESULT ( STDMETHODCALLTYPE *GetMiscFlags )( + IDXTransform * This, + /* [out] */ DWORD *pdwMiscFlags); + + HRESULT ( STDMETHODCALLTYPE *GetInOutInfo )( + IDXTransform * This, + /* [in] */ BOOL bIsOutput, + /* [in] */ ULONG ulIndex, + /* [out] */ DWORD *pdwFlags, + /* [size_is][out] */ GUID *pIDs, + /* [out][in] */ ULONG *pcIDs, + /* [out] */ IUnknown **ppUnkCurrentObject); + + HRESULT ( STDMETHODCALLTYPE *SetQuality )( + IDXTransform * This, + /* [in] */ float fQuality); + + HRESULT ( STDMETHODCALLTYPE *GetQuality )( + IDXTransform * This, + /* [out] */ float *fQuality); + + END_INTERFACE + } IDXTransformVtbl; + + interface IDXTransform + { + CONST_VTBL struct IDXTransformVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXTransform_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXTransform_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXTransform_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXTransform_GetGenerationId(This,pID) \ + (This)->lpVtbl -> GetGenerationId(This,pID) + +#define IDXTransform_IncrementGenerationId(This,bRefresh) \ + (This)->lpVtbl -> IncrementGenerationId(This,bRefresh) + +#define IDXTransform_GetObjectSize(This,pcbSize) \ + (This)->lpVtbl -> GetObjectSize(This,pcbSize) + + +#define IDXTransform_Setup(This,punkInputs,ulNumInputs,punkOutputs,ulNumOutputs,dwFlags) \ + (This)->lpVtbl -> Setup(This,punkInputs,ulNumInputs,punkOutputs,ulNumOutputs,dwFlags) + +#define IDXTransform_Execute(This,pRequestID,pClipBnds,pPlacement) \ + (This)->lpVtbl -> Execute(This,pRequestID,pClipBnds,pPlacement) + +#define IDXTransform_MapBoundsIn2Out(This,pInBounds,ulNumInBnds,ulOutIndex,pOutBounds) \ + (This)->lpVtbl -> MapBoundsIn2Out(This,pInBounds,ulNumInBnds,ulOutIndex,pOutBounds) + +#define IDXTransform_MapBoundsOut2In(This,ulOutIndex,pOutBounds,ulInIndex,pInBounds) \ + (This)->lpVtbl -> MapBoundsOut2In(This,ulOutIndex,pOutBounds,ulInIndex,pInBounds) + +#define IDXTransform_SetMiscFlags(This,dwMiscFlags) \ + (This)->lpVtbl -> SetMiscFlags(This,dwMiscFlags) + +#define IDXTransform_GetMiscFlags(This,pdwMiscFlags) \ + (This)->lpVtbl -> GetMiscFlags(This,pdwMiscFlags) + +#define IDXTransform_GetInOutInfo(This,bIsOutput,ulIndex,pdwFlags,pIDs,pcIDs,ppUnkCurrentObject) \ + (This)->lpVtbl -> GetInOutInfo(This,bIsOutput,ulIndex,pdwFlags,pIDs,pcIDs,ppUnkCurrentObject) + +#define IDXTransform_SetQuality(This,fQuality) \ + (This)->lpVtbl -> SetQuality(This,fQuality) + +#define IDXTransform_GetQuality(This,fQuality) \ + (This)->lpVtbl -> GetQuality(This,fQuality) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDXTransform_Setup_Proxy( + IDXTransform * This, + /* [size_is][in] */ IUnknown *const *punkInputs, + /* [in] */ ULONG ulNumInputs, + /* [size_is][in] */ IUnknown *const *punkOutputs, + /* [in] */ ULONG ulNumOutputs, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IDXTransform_Setup_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTransform_Execute_Proxy( + IDXTransform * This, + /* [in] */ const GUID *pRequestID, + /* [in] */ const DXBNDS *pClipBnds, + /* [in] */ const DXVEC *pPlacement); + + +void __RPC_STUB IDXTransform_Execute_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTransform_MapBoundsIn2Out_Proxy( + IDXTransform * This, + /* [in] */ const DXBNDS *pInBounds, + /* [in] */ ULONG ulNumInBnds, + /* [in] */ ULONG ulOutIndex, + /* [out] */ DXBNDS *pOutBounds); + + +void __RPC_STUB IDXTransform_MapBoundsIn2Out_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTransform_MapBoundsOut2In_Proxy( + IDXTransform * This, + /* [in] */ ULONG ulOutIndex, + /* [in] */ const DXBNDS *pOutBounds, + /* [in] */ ULONG ulInIndex, + /* [out] */ DXBNDS *pInBounds); + + +void __RPC_STUB IDXTransform_MapBoundsOut2In_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTransform_SetMiscFlags_Proxy( + IDXTransform * This, + /* [in] */ DWORD dwMiscFlags); + + +void __RPC_STUB IDXTransform_SetMiscFlags_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTransform_GetMiscFlags_Proxy( + IDXTransform * This, + /* [out] */ DWORD *pdwMiscFlags); + + +void __RPC_STUB IDXTransform_GetMiscFlags_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTransform_GetInOutInfo_Proxy( + IDXTransform * This, + /* [in] */ BOOL bIsOutput, + /* [in] */ ULONG ulIndex, + /* [out] */ DWORD *pdwFlags, + /* [size_is][out] */ GUID *pIDs, + /* [out][in] */ ULONG *pcIDs, + /* [out] */ IUnknown **ppUnkCurrentObject); + + +void __RPC_STUB IDXTransform_GetInOutInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTransform_SetQuality_Proxy( + IDXTransform * This, + /* [in] */ float fQuality); + + +void __RPC_STUB IDXTransform_SetQuality_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTransform_GetQuality_Proxy( + IDXTransform * This, + /* [out] */ float *fQuality); + + +void __RPC_STUB IDXTransform_GetQuality_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXTransform_INTERFACE_DEFINED__ */ + + +#ifndef __IDXSurfacePick_INTERFACE_DEFINED__ +#define __IDXSurfacePick_INTERFACE_DEFINED__ + +/* interface IDXSurfacePick */ +/* [object][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXSurfacePick; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("30A5FB79-E11F-11d1-9064-00C04FD9189D") + IDXSurfacePick : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE PointPick( + /* [in] */ const DXVEC *pPoint, + /* [out] */ ULONG *pulInputSurfaceIndex, + /* [out] */ DXVEC *pInputPoint) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXSurfacePickVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXSurfacePick * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXSurfacePick * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXSurfacePick * This); + + HRESULT ( STDMETHODCALLTYPE *PointPick )( + IDXSurfacePick * This, + /* [in] */ const DXVEC *pPoint, + /* [out] */ ULONG *pulInputSurfaceIndex, + /* [out] */ DXVEC *pInputPoint); + + END_INTERFACE + } IDXSurfacePickVtbl; + + interface IDXSurfacePick + { + CONST_VTBL struct IDXSurfacePickVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXSurfacePick_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXSurfacePick_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXSurfacePick_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXSurfacePick_PointPick(This,pPoint,pulInputSurfaceIndex,pInputPoint) \ + (This)->lpVtbl -> PointPick(This,pPoint,pulInputSurfaceIndex,pInputPoint) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDXSurfacePick_PointPick_Proxy( + IDXSurfacePick * This, + /* [in] */ const DXVEC *pPoint, + /* [out] */ ULONG *pulInputSurfaceIndex, + /* [out] */ DXVEC *pInputPoint); + + +void __RPC_STUB IDXSurfacePick_PointPick_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXSurfacePick_INTERFACE_DEFINED__ */ + + +#ifndef __IDXTBindHost_INTERFACE_DEFINED__ +#define __IDXTBindHost_INTERFACE_DEFINED__ + +/* interface IDXTBindHost */ +/* [object][local][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXTBindHost; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("D26BCE55-E9DC-11d1-9066-00C04FD9189D") + IDXTBindHost : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetBindHost( + /* [in] */ IBindHost *pBindHost) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXTBindHostVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXTBindHost * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXTBindHost * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXTBindHost * This); + + HRESULT ( STDMETHODCALLTYPE *SetBindHost )( + IDXTBindHost * This, + /* [in] */ IBindHost *pBindHost); + + END_INTERFACE + } IDXTBindHostVtbl; + + interface IDXTBindHost + { + CONST_VTBL struct IDXTBindHostVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXTBindHost_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXTBindHost_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXTBindHost_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXTBindHost_SetBindHost(This,pBindHost) \ + (This)->lpVtbl -> SetBindHost(This,pBindHost) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDXTBindHost_SetBindHost_Proxy( + IDXTBindHost * This, + /* [in] */ IBindHost *pBindHost); + + +void __RPC_STUB IDXTBindHost_SetBindHost_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXTBindHost_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxtrans_0257 */ +/* [local] */ + +typedef void __stdcall __stdcall DXTASKPROC( + void *pTaskData, + BOOL *pbContinueProcessing); + +typedef DXTASKPROC *PFNDXTASKPROC; + +typedef void __stdcall __stdcall DXAPCPROC( + DWORD dwData); + +typedef DXAPCPROC *PFNDXAPCPROC; + +#ifdef __cplusplus +typedef struct DXTMTASKINFO +{ + PFNDXTASKPROC pfnTaskProc; // Pointer to function to execute + PVOID pTaskData; // Pointer to argument data + PFNDXAPCPROC pfnCompletionAPC; // Pointer to completion APC proc + DWORD dwCompletionData; // Pointer to APC proc data + const GUID* pRequestID; // Used to identify groups of tasks +} DXTMTASKINFO; +#else +typedef struct DXTMTASKINFO + { + PVOID pfnTaskProc; + PVOID pTaskData; + PVOID pfnCompletionAPC; + DWORD dwCompletionData; + const GUID *pRequestID; + } DXTMTASKINFO; + +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0257_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0257_v0_0_s_ifspec; + +#ifndef __IDXTaskManager_INTERFACE_DEFINED__ +#define __IDXTaskManager_INTERFACE_DEFINED__ + +/* interface IDXTaskManager */ +/* [object][unique][helpstring][uuid][local] */ + + +EXTERN_C const IID IID_IDXTaskManager; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("254DBBC1-F922-11d0-883A-3C8B00C10000") + IDXTaskManager : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE QueryNumProcessors( + /* [out] */ ULONG *pulNumProc) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetThreadPoolSize( + /* [in] */ ULONG ulNumThreads) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetThreadPoolSize( + /* [out] */ ULONG *pulNumThreads) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetConcurrencyLimit( + /* [in] */ ULONG ulNumThreads) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetConcurrencyLimit( + /* [out] */ ULONG *pulNumThreads) = 0; + + virtual HRESULT STDMETHODCALLTYPE ScheduleTasks( + /* [in] */ DXTMTASKINFO TaskInfo[ ], + /* [in] */ HANDLE Events[ ], + /* [out] */ DWORD TaskIDs[ ], + /* [in] */ ULONG ulNumTasks, + /* [in] */ ULONG ulWaitPeriod) = 0; + + virtual HRESULT STDMETHODCALLTYPE TerminateTasks( + /* [in] */ DWORD TaskIDs[ ], + /* [in] */ ULONG ulCount, + /* [in] */ ULONG ulTimeOut) = 0; + + virtual HRESULT STDMETHODCALLTYPE TerminateRequest( + /* [in] */ REFIID RequestID, + /* [in] */ ULONG ulTimeOut) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXTaskManagerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXTaskManager * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXTaskManager * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXTaskManager * This); + + HRESULT ( STDMETHODCALLTYPE *QueryNumProcessors )( + IDXTaskManager * This, + /* [out] */ ULONG *pulNumProc); + + HRESULT ( STDMETHODCALLTYPE *SetThreadPoolSize )( + IDXTaskManager * This, + /* [in] */ ULONG ulNumThreads); + + HRESULT ( STDMETHODCALLTYPE *GetThreadPoolSize )( + IDXTaskManager * This, + /* [out] */ ULONG *pulNumThreads); + + HRESULT ( STDMETHODCALLTYPE *SetConcurrencyLimit )( + IDXTaskManager * This, + /* [in] */ ULONG ulNumThreads); + + HRESULT ( STDMETHODCALLTYPE *GetConcurrencyLimit )( + IDXTaskManager * This, + /* [out] */ ULONG *pulNumThreads); + + HRESULT ( STDMETHODCALLTYPE *ScheduleTasks )( + IDXTaskManager * This, + /* [in] */ DXTMTASKINFO TaskInfo[ ], + /* [in] */ HANDLE Events[ ], + /* [out] */ DWORD TaskIDs[ ], + /* [in] */ ULONG ulNumTasks, + /* [in] */ ULONG ulWaitPeriod); + + HRESULT ( STDMETHODCALLTYPE *TerminateTasks )( + IDXTaskManager * This, + /* [in] */ DWORD TaskIDs[ ], + /* [in] */ ULONG ulCount, + /* [in] */ ULONG ulTimeOut); + + HRESULT ( STDMETHODCALLTYPE *TerminateRequest )( + IDXTaskManager * This, + /* [in] */ REFIID RequestID, + /* [in] */ ULONG ulTimeOut); + + END_INTERFACE + } IDXTaskManagerVtbl; + + interface IDXTaskManager + { + CONST_VTBL struct IDXTaskManagerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXTaskManager_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXTaskManager_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXTaskManager_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXTaskManager_QueryNumProcessors(This,pulNumProc) \ + (This)->lpVtbl -> QueryNumProcessors(This,pulNumProc) + +#define IDXTaskManager_SetThreadPoolSize(This,ulNumThreads) \ + (This)->lpVtbl -> SetThreadPoolSize(This,ulNumThreads) + +#define IDXTaskManager_GetThreadPoolSize(This,pulNumThreads) \ + (This)->lpVtbl -> GetThreadPoolSize(This,pulNumThreads) + +#define IDXTaskManager_SetConcurrencyLimit(This,ulNumThreads) \ + (This)->lpVtbl -> SetConcurrencyLimit(This,ulNumThreads) + +#define IDXTaskManager_GetConcurrencyLimit(This,pulNumThreads) \ + (This)->lpVtbl -> GetConcurrencyLimit(This,pulNumThreads) + +#define IDXTaskManager_ScheduleTasks(This,TaskInfo,Events,TaskIDs,ulNumTasks,ulWaitPeriod) \ + (This)->lpVtbl -> ScheduleTasks(This,TaskInfo,Events,TaskIDs,ulNumTasks,ulWaitPeriod) + +#define IDXTaskManager_TerminateTasks(This,TaskIDs,ulCount,ulTimeOut) \ + (This)->lpVtbl -> TerminateTasks(This,TaskIDs,ulCount,ulTimeOut) + +#define IDXTaskManager_TerminateRequest(This,RequestID,ulTimeOut) \ + (This)->lpVtbl -> TerminateRequest(This,RequestID,ulTimeOut) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDXTaskManager_QueryNumProcessors_Proxy( + IDXTaskManager * This, + /* [out] */ ULONG *pulNumProc); + + +void __RPC_STUB IDXTaskManager_QueryNumProcessors_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTaskManager_SetThreadPoolSize_Proxy( + IDXTaskManager * This, + /* [in] */ ULONG ulNumThreads); + + +void __RPC_STUB IDXTaskManager_SetThreadPoolSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTaskManager_GetThreadPoolSize_Proxy( + IDXTaskManager * This, + /* [out] */ ULONG *pulNumThreads); + + +void __RPC_STUB IDXTaskManager_GetThreadPoolSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTaskManager_SetConcurrencyLimit_Proxy( + IDXTaskManager * This, + /* [in] */ ULONG ulNumThreads); + + +void __RPC_STUB IDXTaskManager_SetConcurrencyLimit_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTaskManager_GetConcurrencyLimit_Proxy( + IDXTaskManager * This, + /* [out] */ ULONG *pulNumThreads); + + +void __RPC_STUB IDXTaskManager_GetConcurrencyLimit_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTaskManager_ScheduleTasks_Proxy( + IDXTaskManager * This, + /* [in] */ DXTMTASKINFO TaskInfo[ ], + /* [in] */ HANDLE Events[ ], + /* [out] */ DWORD TaskIDs[ ], + /* [in] */ ULONG ulNumTasks, + /* [in] */ ULONG ulWaitPeriod); + + +void __RPC_STUB IDXTaskManager_ScheduleTasks_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTaskManager_TerminateTasks_Proxy( + IDXTaskManager * This, + /* [in] */ DWORD TaskIDs[ ], + /* [in] */ ULONG ulCount, + /* [in] */ ULONG ulTimeOut); + + +void __RPC_STUB IDXTaskManager_TerminateTasks_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTaskManager_TerminateRequest_Proxy( + IDXTaskManager * This, + /* [in] */ REFIID RequestID, + /* [in] */ ULONG ulTimeOut); + + +void __RPC_STUB IDXTaskManager_TerminateRequest_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXTaskManager_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxtrans_0258 */ +/* [local] */ + +#ifdef __cplusplus +///////////////////////////////////////////////////// + +class DXBASESAMPLE; +class DXSAMPLE; +class DXPMSAMPLE; + +///////////////////////////////////////////////////// + +class DXBASESAMPLE +{ +public: + BYTE Blue; + BYTE Green; + BYTE Red; + BYTE Alpha; + DXBASESAMPLE() {} + DXBASESAMPLE(const BYTE alpha, const BYTE red, const BYTE green, const BYTE blue) : + Alpha(alpha), + Red(red), + Green(green), + Blue(blue) {} + DXBASESAMPLE(const DWORD val) { *this = (*(DXBASESAMPLE *)&val); } + operator DWORD () const {return *((DWORD *)this); } + DWORD operator=(const DWORD val) { return *this = *((DXBASESAMPLE *)&val); } +}; // DXBASESAMPLE + +///////////////////////////////////////////////////// + +class DXSAMPLE : public DXBASESAMPLE +{ +public: + DXSAMPLE() {} + DXSAMPLE(const BYTE alpha, const BYTE red, const BYTE green, const BYTE blue) : + DXBASESAMPLE(alpha, red, green, blue) {} + DXSAMPLE(const DWORD val) { *this = (*(DXSAMPLE *)&val); } + operator DWORD () const {return *((DWORD *)this); } + DWORD operator=(const DWORD val) { return *this = *((DXSAMPLE *)&val); } + operator DXPMSAMPLE() const; +}; // DXSAMPLE + +///////////////////////////////////////////////////// + +class DXPMSAMPLE : public DXBASESAMPLE +{ +public: + DXPMSAMPLE() {} + DXPMSAMPLE(const BYTE alpha, const BYTE red, const BYTE green, const BYTE blue) : + DXBASESAMPLE(alpha, red, green, blue) {} + DXPMSAMPLE(const DWORD val) { *this = (*(DXPMSAMPLE *)&val); } + operator DWORD () const {return *((DWORD *)this); } + DWORD operator=(const DWORD val) { return *this = *((DXPMSAMPLE *)&val); } + operator DXSAMPLE() const; +}; // DXPMSAMPLE + +// +// The following cast operators are to prevent a direct assignment of a DXSAMPLE to a DXPMSAMPLE +// +inline DXSAMPLE::operator DXPMSAMPLE() const { return *((DXPMSAMPLE *)this); } +inline DXPMSAMPLE::operator DXSAMPLE() const { return *((DXSAMPLE *)this); } +#else // !__cplusplus +typedef struct DXBASESAMPLE + { + BYTE Blue; + BYTE Green; + BYTE Red; + BYTE Alpha; + } DXBASESAMPLE; + +typedef struct DXSAMPLE + { + BYTE Blue; + BYTE Green; + BYTE Red; + BYTE Alpha; + } DXSAMPLE; + +typedef struct DXPMSAMPLE + { + BYTE Blue; + BYTE Green; + BYTE Red; + BYTE Alpha; + } DXPMSAMPLE; + +#endif // !__cplusplus +typedef +enum DXRUNTYPE + { DXRUNTYPE_CLEAR = 0, + DXRUNTYPE_OPAQUE = 1, + DXRUNTYPE_TRANS = 2, + DXRUNTYPE_UNKNOWN = 3 + } DXRUNTYPE; + +#define DX_MAX_RUN_INFO_COUNT ( 128 ) + +// Ignore the definition used by MIDL for TLB generation +#if 0 +typedef struct DXRUNINFO + { + ULONG Bitfields; + } DXRUNINFO; + +#endif // 0 +typedef struct DXRUNINFO +{ + ULONG Type : 2; // Type + ULONG Count : 30; // Number of samples in run +} DXRUNINFO; +typedef +enum DXSFCREATE + { DXSF_FORMAT_IS_CLSID = 1L << 0, + DXSF_NO_LAZY_DDRAW_LOCK = 1L << 1 + } DXSFCREATE; + +typedef +enum DXBLTOPTIONS + { DXBOF_DO_OVER = 1L << 0, + DXBOF_DITHER = 1L << 1 + } DXBLTOPTIONS; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0258_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0258_v0_0_s_ifspec; + +#ifndef __IDXSurfaceFactory_INTERFACE_DEFINED__ +#define __IDXSurfaceFactory_INTERFACE_DEFINED__ + +/* interface IDXSurfaceFactory */ +/* [object][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXSurfaceFactory; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("144946F5-C4D4-11d1-81D1-0000F87557DB") + IDXSurfaceFactory : public IUnknown + { + public: + virtual /* [local] */ HRESULT STDMETHODCALLTYPE CreateSurface( + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ const GUID *pFormatID, + /* [in] */ const DXBNDS *pBounds, + /* [in] */ DWORD dwFlags, + /* [in] */ IUnknown *punkOuter, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppDXSurface) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateFromDDSurface( + /* [in] */ IUnknown *pDDrawSurface, + /* [in] */ const GUID *pFormatID, + /* [in] */ DWORD dwFlags, + /* [in] */ IUnknown *punkOuter, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppDXSurface) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE LoadImage( + /* [in] */ const LPWSTR pszFileName, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ const GUID *pFormatID, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppDXSurface) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE LoadImageFromStream( + /* [in] */ IStream *pStream, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ const GUID *pFormatID, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppDXSurface) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE CopySurfaceToNewFormat( + /* [in] */ IDXSurface *pSrc, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ const GUID *pDestFormatID, + /* [out] */ IDXSurface **ppNewSurface) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE CreateD3DRMTexture( + /* [in] */ IDXSurface *pSrc, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ IUnknown *pD3DRM3, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppTexture3) = 0; + + virtual HRESULT STDMETHODCALLTYPE BitBlt( + /* [in] */ IDXSurface *pDest, + /* [in] */ const DXVEC *pPlacement, + /* [in] */ IDXSurface *pSrc, + /* [in] */ const DXBNDS *pClipBounds, + /* [in] */ DWORD dwFlags) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXSurfaceFactoryVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXSurfaceFactory * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXSurfaceFactory * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXSurfaceFactory * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *CreateSurface )( + IDXSurfaceFactory * This, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ const GUID *pFormatID, + /* [in] */ const DXBNDS *pBounds, + /* [in] */ DWORD dwFlags, + /* [in] */ IUnknown *punkOuter, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppDXSurface); + + HRESULT ( STDMETHODCALLTYPE *CreateFromDDSurface )( + IDXSurfaceFactory * This, + /* [in] */ IUnknown *pDDrawSurface, + /* [in] */ const GUID *pFormatID, + /* [in] */ DWORD dwFlags, + /* [in] */ IUnknown *punkOuter, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppDXSurface); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *LoadImage )( + IDXSurfaceFactory * This, + /* [in] */ const LPWSTR pszFileName, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ const GUID *pFormatID, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppDXSurface); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *LoadImageFromStream )( + IDXSurfaceFactory * This, + /* [in] */ IStream *pStream, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ const GUID *pFormatID, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppDXSurface); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *CopySurfaceToNewFormat )( + IDXSurfaceFactory * This, + /* [in] */ IDXSurface *pSrc, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ const GUID *pDestFormatID, + /* [out] */ IDXSurface **ppNewSurface); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *CreateD3DRMTexture )( + IDXSurfaceFactory * This, + /* [in] */ IDXSurface *pSrc, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ IUnknown *pD3DRM3, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppTexture3); + + HRESULT ( STDMETHODCALLTYPE *BitBlt )( + IDXSurfaceFactory * This, + /* [in] */ IDXSurface *pDest, + /* [in] */ const DXVEC *pPlacement, + /* [in] */ IDXSurface *pSrc, + /* [in] */ const DXBNDS *pClipBounds, + /* [in] */ DWORD dwFlags); + + END_INTERFACE + } IDXSurfaceFactoryVtbl; + + interface IDXSurfaceFactory + { + CONST_VTBL struct IDXSurfaceFactoryVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXSurfaceFactory_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXSurfaceFactory_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXSurfaceFactory_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXSurfaceFactory_CreateSurface(This,pDirectDraw,pDDSurfaceDesc,pFormatID,pBounds,dwFlags,punkOuter,riid,ppDXSurface) \ + (This)->lpVtbl -> CreateSurface(This,pDirectDraw,pDDSurfaceDesc,pFormatID,pBounds,dwFlags,punkOuter,riid,ppDXSurface) + +#define IDXSurfaceFactory_CreateFromDDSurface(This,pDDrawSurface,pFormatID,dwFlags,punkOuter,riid,ppDXSurface) \ + (This)->lpVtbl -> CreateFromDDSurface(This,pDDrawSurface,pFormatID,dwFlags,punkOuter,riid,ppDXSurface) + +#define IDXSurfaceFactory_LoadImage(This,pszFileName,pDirectDraw,pDDSurfaceDesc,pFormatID,riid,ppDXSurface) \ + (This)->lpVtbl -> LoadImage(This,pszFileName,pDirectDraw,pDDSurfaceDesc,pFormatID,riid,ppDXSurface) + +#define IDXSurfaceFactory_LoadImageFromStream(This,pStream,pDirectDraw,pDDSurfaceDesc,pFormatID,riid,ppDXSurface) \ + (This)->lpVtbl -> LoadImageFromStream(This,pStream,pDirectDraw,pDDSurfaceDesc,pFormatID,riid,ppDXSurface) + +#define IDXSurfaceFactory_CopySurfaceToNewFormat(This,pSrc,pDirectDraw,pDDSurfaceDesc,pDestFormatID,ppNewSurface) \ + (This)->lpVtbl -> CopySurfaceToNewFormat(This,pSrc,pDirectDraw,pDDSurfaceDesc,pDestFormatID,ppNewSurface) + +#define IDXSurfaceFactory_CreateD3DRMTexture(This,pSrc,pDirectDraw,pD3DRM3,riid,ppTexture3) \ + (This)->lpVtbl -> CreateD3DRMTexture(This,pSrc,pDirectDraw,pD3DRM3,riid,ppTexture3) + +#define IDXSurfaceFactory_BitBlt(This,pDest,pPlacement,pSrc,pClipBounds,dwFlags) \ + (This)->lpVtbl -> BitBlt(This,pDest,pPlacement,pSrc,pClipBounds,dwFlags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [local] */ HRESULT STDMETHODCALLTYPE IDXSurfaceFactory_CreateSurface_Proxy( + IDXSurfaceFactory * This, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ const GUID *pFormatID, + /* [in] */ const DXBNDS *pBounds, + /* [in] */ DWORD dwFlags, + /* [in] */ IUnknown *punkOuter, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppDXSurface); + + +void __RPC_STUB IDXSurfaceFactory_CreateSurface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurfaceFactory_CreateFromDDSurface_Proxy( + IDXSurfaceFactory * This, + /* [in] */ IUnknown *pDDrawSurface, + /* [in] */ const GUID *pFormatID, + /* [in] */ DWORD dwFlags, + /* [in] */ IUnknown *punkOuter, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppDXSurface); + + +void __RPC_STUB IDXSurfaceFactory_CreateFromDDSurface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE IDXSurfaceFactory_LoadImage_Proxy( + IDXSurfaceFactory * This, + /* [in] */ const LPWSTR pszFileName, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ const GUID *pFormatID, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppDXSurface); + + +void __RPC_STUB IDXSurfaceFactory_LoadImage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE IDXSurfaceFactory_LoadImageFromStream_Proxy( + IDXSurfaceFactory * This, + /* [in] */ IStream *pStream, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ const GUID *pFormatID, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppDXSurface); + + +void __RPC_STUB IDXSurfaceFactory_LoadImageFromStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE IDXSurfaceFactory_CopySurfaceToNewFormat_Proxy( + IDXSurfaceFactory * This, + /* [in] */ IDXSurface *pSrc, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ const GUID *pDestFormatID, + /* [out] */ IDXSurface **ppNewSurface); + + +void __RPC_STUB IDXSurfaceFactory_CopySurfaceToNewFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE IDXSurfaceFactory_CreateD3DRMTexture_Proxy( + IDXSurfaceFactory * This, + /* [in] */ IDXSurface *pSrc, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ IUnknown *pD3DRM3, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppTexture3); + + +void __RPC_STUB IDXSurfaceFactory_CreateD3DRMTexture_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurfaceFactory_BitBlt_Proxy( + IDXSurfaceFactory * This, + /* [in] */ IDXSurface *pDest, + /* [in] */ const DXVEC *pPlacement, + /* [in] */ IDXSurface *pSrc, + /* [in] */ const DXBNDS *pClipBounds, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IDXSurfaceFactory_BitBlt_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXSurfaceFactory_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxtrans_0259 */ +/* [local] */ + +typedef +enum DXSURFMODCOMPOP + { DXSURFMOD_COMP_OVER = 0, + DXSURFMOD_COMP_ALPHA_MASK = 1, + DXSURFMOD_COMP_MAX_VALID = 1 + } DXSURFMODCOMPOP; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0259_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0259_v0_0_s_ifspec; + +#ifndef __IDXSurfaceModifier_INTERFACE_DEFINED__ +#define __IDXSurfaceModifier_INTERFACE_DEFINED__ + +/* interface IDXSurfaceModifier */ +/* [object][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXSurfaceModifier; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9EA3B637-C37D-11d1-905E-00C04FD9189D") + IDXSurfaceModifier : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetFillColor( + /* [in] */ DXSAMPLE Color) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFillColor( + /* [out] */ DXSAMPLE *pColor) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBounds( + /* [in] */ const DXBNDS *pBounds) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBackground( + /* [in] */ IDXSurface *pSurface) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetBackground( + /* [out] */ IDXSurface **ppSurface) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetCompositeOperation( + /* [in] */ DXSURFMODCOMPOP CompOp) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCompositeOperation( + /* [out] */ DXSURFMODCOMPOP *pCompOp) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetForeground( + /* [in] */ IDXSurface *pSurface, + /* [in] */ BOOL bTile, + /* [in] */ const POINT *pOrigin) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetForeground( + /* [out] */ IDXSurface **ppSurface, + /* [out] */ BOOL *pbTile, + /* [out] */ POINT *pOrigin) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOpacity( + /* [in] */ float Opacity) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetOpacity( + /* [out] */ float *pOpacity) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetLookup( + /* [in] */ IDXLookupTable *pLookupTable) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetLookup( + /* [out] */ IDXLookupTable **ppLookupTable) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXSurfaceModifierVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXSurfaceModifier * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXSurfaceModifier * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXSurfaceModifier * This); + + HRESULT ( STDMETHODCALLTYPE *SetFillColor )( + IDXSurfaceModifier * This, + /* [in] */ DXSAMPLE Color); + + HRESULT ( STDMETHODCALLTYPE *GetFillColor )( + IDXSurfaceModifier * This, + /* [out] */ DXSAMPLE *pColor); + + HRESULT ( STDMETHODCALLTYPE *SetBounds )( + IDXSurfaceModifier * This, + /* [in] */ const DXBNDS *pBounds); + + HRESULT ( STDMETHODCALLTYPE *SetBackground )( + IDXSurfaceModifier * This, + /* [in] */ IDXSurface *pSurface); + + HRESULT ( STDMETHODCALLTYPE *GetBackground )( + IDXSurfaceModifier * This, + /* [out] */ IDXSurface **ppSurface); + + HRESULT ( STDMETHODCALLTYPE *SetCompositeOperation )( + IDXSurfaceModifier * This, + /* [in] */ DXSURFMODCOMPOP CompOp); + + HRESULT ( STDMETHODCALLTYPE *GetCompositeOperation )( + IDXSurfaceModifier * This, + /* [out] */ DXSURFMODCOMPOP *pCompOp); + + HRESULT ( STDMETHODCALLTYPE *SetForeground )( + IDXSurfaceModifier * This, + /* [in] */ IDXSurface *pSurface, + /* [in] */ BOOL bTile, + /* [in] */ const POINT *pOrigin); + + HRESULT ( STDMETHODCALLTYPE *GetForeground )( + IDXSurfaceModifier * This, + /* [out] */ IDXSurface **ppSurface, + /* [out] */ BOOL *pbTile, + /* [out] */ POINT *pOrigin); + + HRESULT ( STDMETHODCALLTYPE *SetOpacity )( + IDXSurfaceModifier * This, + /* [in] */ float Opacity); + + HRESULT ( STDMETHODCALLTYPE *GetOpacity )( + IDXSurfaceModifier * This, + /* [out] */ float *pOpacity); + + HRESULT ( STDMETHODCALLTYPE *SetLookup )( + IDXSurfaceModifier * This, + /* [in] */ IDXLookupTable *pLookupTable); + + HRESULT ( STDMETHODCALLTYPE *GetLookup )( + IDXSurfaceModifier * This, + /* [out] */ IDXLookupTable **ppLookupTable); + + END_INTERFACE + } IDXSurfaceModifierVtbl; + + interface IDXSurfaceModifier + { + CONST_VTBL struct IDXSurfaceModifierVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXSurfaceModifier_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXSurfaceModifier_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXSurfaceModifier_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXSurfaceModifier_SetFillColor(This,Color) \ + (This)->lpVtbl -> SetFillColor(This,Color) + +#define IDXSurfaceModifier_GetFillColor(This,pColor) \ + (This)->lpVtbl -> GetFillColor(This,pColor) + +#define IDXSurfaceModifier_SetBounds(This,pBounds) \ + (This)->lpVtbl -> SetBounds(This,pBounds) + +#define IDXSurfaceModifier_SetBackground(This,pSurface) \ + (This)->lpVtbl -> SetBackground(This,pSurface) + +#define IDXSurfaceModifier_GetBackground(This,ppSurface) \ + (This)->lpVtbl -> GetBackground(This,ppSurface) + +#define IDXSurfaceModifier_SetCompositeOperation(This,CompOp) \ + (This)->lpVtbl -> SetCompositeOperation(This,CompOp) + +#define IDXSurfaceModifier_GetCompositeOperation(This,pCompOp) \ + (This)->lpVtbl -> GetCompositeOperation(This,pCompOp) + +#define IDXSurfaceModifier_SetForeground(This,pSurface,bTile,pOrigin) \ + (This)->lpVtbl -> SetForeground(This,pSurface,bTile,pOrigin) + +#define IDXSurfaceModifier_GetForeground(This,ppSurface,pbTile,pOrigin) \ + (This)->lpVtbl -> GetForeground(This,ppSurface,pbTile,pOrigin) + +#define IDXSurfaceModifier_SetOpacity(This,Opacity) \ + (This)->lpVtbl -> SetOpacity(This,Opacity) + +#define IDXSurfaceModifier_GetOpacity(This,pOpacity) \ + (This)->lpVtbl -> GetOpacity(This,pOpacity) + +#define IDXSurfaceModifier_SetLookup(This,pLookupTable) \ + (This)->lpVtbl -> SetLookup(This,pLookupTable) + +#define IDXSurfaceModifier_GetLookup(This,ppLookupTable) \ + (This)->lpVtbl -> GetLookup(This,ppLookupTable) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDXSurfaceModifier_SetFillColor_Proxy( + IDXSurfaceModifier * This, + /* [in] */ DXSAMPLE Color); + + +void __RPC_STUB IDXSurfaceModifier_SetFillColor_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurfaceModifier_GetFillColor_Proxy( + IDXSurfaceModifier * This, + /* [out] */ DXSAMPLE *pColor); + + +void __RPC_STUB IDXSurfaceModifier_GetFillColor_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurfaceModifier_SetBounds_Proxy( + IDXSurfaceModifier * This, + /* [in] */ const DXBNDS *pBounds); + + +void __RPC_STUB IDXSurfaceModifier_SetBounds_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurfaceModifier_SetBackground_Proxy( + IDXSurfaceModifier * This, + /* [in] */ IDXSurface *pSurface); + + +void __RPC_STUB IDXSurfaceModifier_SetBackground_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurfaceModifier_GetBackground_Proxy( + IDXSurfaceModifier * This, + /* [out] */ IDXSurface **ppSurface); + + +void __RPC_STUB IDXSurfaceModifier_GetBackground_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurfaceModifier_SetCompositeOperation_Proxy( + IDXSurfaceModifier * This, + /* [in] */ DXSURFMODCOMPOP CompOp); + + +void __RPC_STUB IDXSurfaceModifier_SetCompositeOperation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurfaceModifier_GetCompositeOperation_Proxy( + IDXSurfaceModifier * This, + /* [out] */ DXSURFMODCOMPOP *pCompOp); + + +void __RPC_STUB IDXSurfaceModifier_GetCompositeOperation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurfaceModifier_SetForeground_Proxy( + IDXSurfaceModifier * This, + /* [in] */ IDXSurface *pSurface, + /* [in] */ BOOL bTile, + /* [in] */ const POINT *pOrigin); + + +void __RPC_STUB IDXSurfaceModifier_SetForeground_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurfaceModifier_GetForeground_Proxy( + IDXSurfaceModifier * This, + /* [out] */ IDXSurface **ppSurface, + /* [out] */ BOOL *pbTile, + /* [out] */ POINT *pOrigin); + + +void __RPC_STUB IDXSurfaceModifier_GetForeground_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurfaceModifier_SetOpacity_Proxy( + IDXSurfaceModifier * This, + /* [in] */ float Opacity); + + +void __RPC_STUB IDXSurfaceModifier_SetOpacity_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurfaceModifier_GetOpacity_Proxy( + IDXSurfaceModifier * This, + /* [out] */ float *pOpacity); + + +void __RPC_STUB IDXSurfaceModifier_GetOpacity_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurfaceModifier_SetLookup_Proxy( + IDXSurfaceModifier * This, + /* [in] */ IDXLookupTable *pLookupTable); + + +void __RPC_STUB IDXSurfaceModifier_SetLookup_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurfaceModifier_GetLookup_Proxy( + IDXSurfaceModifier * This, + /* [out] */ IDXLookupTable **ppLookupTable); + + +void __RPC_STUB IDXSurfaceModifier_GetLookup_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXSurfaceModifier_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxtrans_0260 */ +/* [local] */ + +typedef +enum DXSAMPLEFORMATENUM + { DXPF_FLAGSMASK = 0xffff0000, + DXPF_NONPREMULT = 0x10000, + DXPF_TRANSPARENCY = 0x20000, + DXPF_TRANSLUCENCY = 0x40000, + DXPF_2BITERROR = 0x200000, + DXPF_3BITERROR = 0x300000, + DXPF_4BITERROR = 0x400000, + DXPF_5BITERROR = 0x500000, + DXPF_ERRORMASK = 0x700000, + DXPF_NONSTANDARD = 0, + DXPF_PMARGB32 = 1 | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY, + DXPF_ARGB32 = 2 | DXPF_NONPREMULT | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY, + DXPF_ARGB4444 = 3 | DXPF_NONPREMULT | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY | DXPF_4BITERROR, + DXPF_A8 = 4 | DXPF_TRANSPARENCY | DXPF_TRANSLUCENCY, + DXPF_RGB32 = 5, + DXPF_RGB24 = 6, + DXPF_RGB565 = 7 | DXPF_3BITERROR, + DXPF_RGB555 = 8 | DXPF_3BITERROR, + DXPF_RGB8 = 9 | DXPF_5BITERROR, + DXPF_ARGB1555 = 10 | DXPF_TRANSPARENCY | DXPF_3BITERROR, + DXPF_RGB32_CK = DXPF_RGB32 | DXPF_TRANSPARENCY, + DXPF_RGB24_CK = DXPF_RGB24 | DXPF_TRANSPARENCY, + DXPF_RGB555_CK = DXPF_RGB555 | DXPF_TRANSPARENCY, + DXPF_RGB565_CK = DXPF_RGB565 | DXPF_TRANSPARENCY, + DXPF_RGB8_CK = DXPF_RGB8 | DXPF_TRANSPARENCY + } DXSAMPLEFORMATENUM; + +typedef +enum DXLOCKSURF + { DXLOCKF_READ = 0, + DXLOCKF_READWRITE = 1 << 0, + DXLOCKF_EXISTINGINFOONLY = 1 << 1, + DXLOCKF_WANTRUNINFO = 1 << 2, + DXLOCKF_NONPREMULT = 1 << 16, + DXLOCKF_VALIDFLAGS = DXLOCKF_READWRITE | DXLOCKF_EXISTINGINFOONLY | DXLOCKF_WANTRUNINFO | DXLOCKF_NONPREMULT + } DXLOCKSURF; + +typedef +enum DXSURFSTATUS + { DXSURF_TRANSIENT = 1 << 0, + DXSURF_READONLY = 1 << 1, + DXSURF_VALIDFLAGS = DXSURF_TRANSIENT | DXSURF_READONLY + } DXSURFSTATUS; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0260_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0260_v0_0_s_ifspec; + +#ifndef __IDXSurface_INTERFACE_DEFINED__ +#define __IDXSurface_INTERFACE_DEFINED__ + +/* interface IDXSurface */ +/* [object][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXSurface; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B39FD73F-E139-11d1-9065-00C04FD9189D") + IDXSurface : public IDXBaseObject + { + public: + virtual HRESULT STDMETHODCALLTYPE GetPixelFormat( + /* [out] */ GUID *pFormatID, + /* [out] */ DXSAMPLEFORMATENUM *pSampleFormatEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetBounds( + /* [out] */ DXBNDS *pBounds) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStatusFlags( + /* [out] */ DWORD *pdwStatusFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetStatusFlags( + /* [in] */ DWORD dwStatusFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE LockSurface( + /* [in] */ const DXBNDS *pBounds, + /* [in] */ ULONG ulTimeOut, + /* [in] */ DWORD dwFlags, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppPointer, + /* [out] */ ULONG *pulGenerationId) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDirectDrawSurface( + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppSurface) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetColorKey( + DXSAMPLE *pColorKey) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetColorKey( + DXSAMPLE ColorKey) = 0; + + virtual HRESULT STDMETHODCALLTYPE LockSurfaceDC( + /* [in] */ const DXBNDS *pBounds, + /* [in] */ ULONG ulTimeOut, + /* [in] */ DWORD dwFlags, + /* [out] */ IDXDCLock **ppDCLock) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetAppData( + DWORD_PTR dwAppData) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAppData( + DWORD_PTR *pdwAppData) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXSurfaceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXSurface * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXSurface * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXSurface * This); + + HRESULT ( STDMETHODCALLTYPE *GetGenerationId )( + IDXSurface * This, + /* [out] */ ULONG *pID); + + HRESULT ( STDMETHODCALLTYPE *IncrementGenerationId )( + IDXSurface * This, + /* [in] */ BOOL bRefresh); + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + IDXSurface * This, + /* [out] */ ULONG *pcbSize); + + HRESULT ( STDMETHODCALLTYPE *GetPixelFormat )( + IDXSurface * This, + /* [out] */ GUID *pFormatID, + /* [out] */ DXSAMPLEFORMATENUM *pSampleFormatEnum); + + HRESULT ( STDMETHODCALLTYPE *GetBounds )( + IDXSurface * This, + /* [out] */ DXBNDS *pBounds); + + HRESULT ( STDMETHODCALLTYPE *GetStatusFlags )( + IDXSurface * This, + /* [out] */ DWORD *pdwStatusFlags); + + HRESULT ( STDMETHODCALLTYPE *SetStatusFlags )( + IDXSurface * This, + /* [in] */ DWORD dwStatusFlags); + + HRESULT ( STDMETHODCALLTYPE *LockSurface )( + IDXSurface * This, + /* [in] */ const DXBNDS *pBounds, + /* [in] */ ULONG ulTimeOut, + /* [in] */ DWORD dwFlags, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppPointer, + /* [out] */ ULONG *pulGenerationId); + + HRESULT ( STDMETHODCALLTYPE *GetDirectDrawSurface )( + IDXSurface * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppSurface); + + HRESULT ( STDMETHODCALLTYPE *GetColorKey )( + IDXSurface * This, + DXSAMPLE *pColorKey); + + HRESULT ( STDMETHODCALLTYPE *SetColorKey )( + IDXSurface * This, + DXSAMPLE ColorKey); + + HRESULT ( STDMETHODCALLTYPE *LockSurfaceDC )( + IDXSurface * This, + /* [in] */ const DXBNDS *pBounds, + /* [in] */ ULONG ulTimeOut, + /* [in] */ DWORD dwFlags, + /* [out] */ IDXDCLock **ppDCLock); + + HRESULT ( STDMETHODCALLTYPE *SetAppData )( + IDXSurface * This, + DWORD_PTR dwAppData); + + HRESULT ( STDMETHODCALLTYPE *GetAppData )( + IDXSurface * This, + DWORD_PTR *pdwAppData); + + END_INTERFACE + } IDXSurfaceVtbl; + + interface IDXSurface + { + CONST_VTBL struct IDXSurfaceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXSurface_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXSurface_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXSurface_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXSurface_GetGenerationId(This,pID) \ + (This)->lpVtbl -> GetGenerationId(This,pID) + +#define IDXSurface_IncrementGenerationId(This,bRefresh) \ + (This)->lpVtbl -> IncrementGenerationId(This,bRefresh) + +#define IDXSurface_GetObjectSize(This,pcbSize) \ + (This)->lpVtbl -> GetObjectSize(This,pcbSize) + + +#define IDXSurface_GetPixelFormat(This,pFormatID,pSampleFormatEnum) \ + (This)->lpVtbl -> GetPixelFormat(This,pFormatID,pSampleFormatEnum) + +#define IDXSurface_GetBounds(This,pBounds) \ + (This)->lpVtbl -> GetBounds(This,pBounds) + +#define IDXSurface_GetStatusFlags(This,pdwStatusFlags) \ + (This)->lpVtbl -> GetStatusFlags(This,pdwStatusFlags) + +#define IDXSurface_SetStatusFlags(This,dwStatusFlags) \ + (This)->lpVtbl -> SetStatusFlags(This,dwStatusFlags) + +#define IDXSurface_LockSurface(This,pBounds,ulTimeOut,dwFlags,riid,ppPointer,pulGenerationId) \ + (This)->lpVtbl -> LockSurface(This,pBounds,ulTimeOut,dwFlags,riid,ppPointer,pulGenerationId) + +#define IDXSurface_GetDirectDrawSurface(This,riid,ppSurface) \ + (This)->lpVtbl -> GetDirectDrawSurface(This,riid,ppSurface) + +#define IDXSurface_GetColorKey(This,pColorKey) \ + (This)->lpVtbl -> GetColorKey(This,pColorKey) + +#define IDXSurface_SetColorKey(This,ColorKey) \ + (This)->lpVtbl -> SetColorKey(This,ColorKey) + +#define IDXSurface_LockSurfaceDC(This,pBounds,ulTimeOut,dwFlags,ppDCLock) \ + (This)->lpVtbl -> LockSurfaceDC(This,pBounds,ulTimeOut,dwFlags,ppDCLock) + +#define IDXSurface_SetAppData(This,dwAppData) \ + (This)->lpVtbl -> SetAppData(This,dwAppData) + +#define IDXSurface_GetAppData(This,pdwAppData) \ + (This)->lpVtbl -> GetAppData(This,pdwAppData) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDXSurface_GetPixelFormat_Proxy( + IDXSurface * This, + /* [out] */ GUID *pFormatID, + /* [out] */ DXSAMPLEFORMATENUM *pSampleFormatEnum); + + +void __RPC_STUB IDXSurface_GetPixelFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurface_GetBounds_Proxy( + IDXSurface * This, + /* [out] */ DXBNDS *pBounds); + + +void __RPC_STUB IDXSurface_GetBounds_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurface_GetStatusFlags_Proxy( + IDXSurface * This, + /* [out] */ DWORD *pdwStatusFlags); + + +void __RPC_STUB IDXSurface_GetStatusFlags_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurface_SetStatusFlags_Proxy( + IDXSurface * This, + /* [in] */ DWORD dwStatusFlags); + + +void __RPC_STUB IDXSurface_SetStatusFlags_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurface_LockSurface_Proxy( + IDXSurface * This, + /* [in] */ const DXBNDS *pBounds, + /* [in] */ ULONG ulTimeOut, + /* [in] */ DWORD dwFlags, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppPointer, + /* [out] */ ULONG *pulGenerationId); + + +void __RPC_STUB IDXSurface_LockSurface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurface_GetDirectDrawSurface_Proxy( + IDXSurface * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppSurface); + + +void __RPC_STUB IDXSurface_GetDirectDrawSurface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurface_GetColorKey_Proxy( + IDXSurface * This, + DXSAMPLE *pColorKey); + + +void __RPC_STUB IDXSurface_GetColorKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurface_SetColorKey_Proxy( + IDXSurface * This, + DXSAMPLE ColorKey); + + +void __RPC_STUB IDXSurface_SetColorKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurface_LockSurfaceDC_Proxy( + IDXSurface * This, + /* [in] */ const DXBNDS *pBounds, + /* [in] */ ULONG ulTimeOut, + /* [in] */ DWORD dwFlags, + /* [out] */ IDXDCLock **ppDCLock); + + +void __RPC_STUB IDXSurface_LockSurfaceDC_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurface_SetAppData_Proxy( + IDXSurface * This, + DWORD_PTR dwAppData); + + +void __RPC_STUB IDXSurface_SetAppData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXSurface_GetAppData_Proxy( + IDXSurface * This, + DWORD_PTR *pdwAppData); + + +void __RPC_STUB IDXSurface_GetAppData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXSurface_INTERFACE_DEFINED__ */ + + +#ifndef __IDXSurfaceInit_INTERFACE_DEFINED__ +#define __IDXSurfaceInit_INTERFACE_DEFINED__ + +/* interface IDXSurfaceInit */ +/* [object][local][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXSurfaceInit; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9EA3B639-C37D-11d1-905E-00C04FD9189D") + IDXSurfaceInit : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE InitSurface( + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ const GUID *pFormatID, + /* [in] */ const DXBNDS *pBounds, + /* [in] */ DWORD dwFlags) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXSurfaceInitVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXSurfaceInit * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXSurfaceInit * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXSurfaceInit * This); + + HRESULT ( STDMETHODCALLTYPE *InitSurface )( + IDXSurfaceInit * This, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ const GUID *pFormatID, + /* [in] */ const DXBNDS *pBounds, + /* [in] */ DWORD dwFlags); + + END_INTERFACE + } IDXSurfaceInitVtbl; + + interface IDXSurfaceInit + { + CONST_VTBL struct IDXSurfaceInitVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXSurfaceInit_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXSurfaceInit_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXSurfaceInit_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXSurfaceInit_InitSurface(This,pDirectDraw,pDDSurfaceDesc,pFormatID,pBounds,dwFlags) \ + (This)->lpVtbl -> InitSurface(This,pDirectDraw,pDDSurfaceDesc,pFormatID,pBounds,dwFlags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDXSurfaceInit_InitSurface_Proxy( + IDXSurfaceInit * This, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ const GUID *pFormatID, + /* [in] */ const DXBNDS *pBounds, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IDXSurfaceInit_InitSurface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXSurfaceInit_INTERFACE_DEFINED__ */ + + +#ifndef __IDXARGBSurfaceInit_INTERFACE_DEFINED__ +#define __IDXARGBSurfaceInit_INTERFACE_DEFINED__ + +/* interface IDXARGBSurfaceInit */ +/* [object][local][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXARGBSurfaceInit; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9EA3B63A-C37D-11d1-905E-00C04FD9189D") + IDXARGBSurfaceInit : public IDXSurfaceInit + { + public: + virtual HRESULT STDMETHODCALLTYPE InitFromDDSurface( + /* [in] */ IUnknown *pDDrawSurface, + /* [in] */ const GUID *pFormatID, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE InitFromRawSurface( + /* [in] */ IDXRawSurface *pRawSurface) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXARGBSurfaceInitVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXARGBSurfaceInit * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXARGBSurfaceInit * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXARGBSurfaceInit * This); + + HRESULT ( STDMETHODCALLTYPE *InitSurface )( + IDXARGBSurfaceInit * This, + /* [in] */ IUnknown *pDirectDraw, + /* [in] */ const DDSURFACEDESC *pDDSurfaceDesc, + /* [in] */ const GUID *pFormatID, + /* [in] */ const DXBNDS *pBounds, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *InitFromDDSurface )( + IDXARGBSurfaceInit * This, + /* [in] */ IUnknown *pDDrawSurface, + /* [in] */ const GUID *pFormatID, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *InitFromRawSurface )( + IDXARGBSurfaceInit * This, + /* [in] */ IDXRawSurface *pRawSurface); + + END_INTERFACE + } IDXARGBSurfaceInitVtbl; + + interface IDXARGBSurfaceInit + { + CONST_VTBL struct IDXARGBSurfaceInitVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXARGBSurfaceInit_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXARGBSurfaceInit_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXARGBSurfaceInit_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXARGBSurfaceInit_InitSurface(This,pDirectDraw,pDDSurfaceDesc,pFormatID,pBounds,dwFlags) \ + (This)->lpVtbl -> InitSurface(This,pDirectDraw,pDDSurfaceDesc,pFormatID,pBounds,dwFlags) + + +#define IDXARGBSurfaceInit_InitFromDDSurface(This,pDDrawSurface,pFormatID,dwFlags) \ + (This)->lpVtbl -> InitFromDDSurface(This,pDDrawSurface,pFormatID,dwFlags) + +#define IDXARGBSurfaceInit_InitFromRawSurface(This,pRawSurface) \ + (This)->lpVtbl -> InitFromRawSurface(This,pRawSurface) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDXARGBSurfaceInit_InitFromDDSurface_Proxy( + IDXARGBSurfaceInit * This, + /* [in] */ IUnknown *pDDrawSurface, + /* [in] */ const GUID *pFormatID, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IDXARGBSurfaceInit_InitFromDDSurface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXARGBSurfaceInit_InitFromRawSurface_Proxy( + IDXARGBSurfaceInit * This, + /* [in] */ IDXRawSurface *pRawSurface); + + +void __RPC_STUB IDXARGBSurfaceInit_InitFromRawSurface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXARGBSurfaceInit_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxtrans_0263 */ +/* [local] */ + +typedef struct tagDXNATIVETYPEINFO + { + BYTE *pCurrentData; + BYTE *pFirstByte; + long lPitch; + DWORD dwColorKey; + } DXNATIVETYPEINFO; + +typedef struct tagDXPACKEDRECTDESC + { + DXBASESAMPLE *pSamples; + BOOL bPremult; + RECT rect; + long lRowPadding; + } DXPACKEDRECTDESC; + +typedef struct tagDXOVERSAMPLEDESC + { + POINT p; + DXPMSAMPLE Color; + } DXOVERSAMPLEDESC; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0263_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0263_v0_0_s_ifspec; + +#ifndef __IDXARGBReadPtr_INTERFACE_DEFINED__ +#define __IDXARGBReadPtr_INTERFACE_DEFINED__ + +/* interface IDXARGBReadPtr */ +/* [object][local][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXARGBReadPtr; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("EAAAC2D6-C290-11d1-905D-00C04FD9189D") + IDXARGBReadPtr : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetSurface( + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppSurface) = 0; + + virtual DXSAMPLEFORMATENUM STDMETHODCALLTYPE GetNativeType( + /* [out] */ DXNATIVETYPEINFO *pInfo) = 0; + + virtual void STDMETHODCALLTYPE Move( + /* [in] */ long cSamples) = 0; + + virtual void STDMETHODCALLTYPE MoveToRow( + /* [in] */ ULONG y) = 0; + + virtual void STDMETHODCALLTYPE MoveToXY( + /* [in] */ ULONG x, + /* [in] */ ULONG y) = 0; + + virtual ULONG STDMETHODCALLTYPE MoveAndGetRunInfo( + /* [in] */ ULONG Row, + /* [out] */ const DXRUNINFO **ppInfo) = 0; + + virtual DXSAMPLE *STDMETHODCALLTYPE Unpack( + /* [in] */ DXSAMPLE *pSamples, + /* [in] */ ULONG cSamples, + /* [in] */ BOOL bMove) = 0; + + virtual DXPMSAMPLE *STDMETHODCALLTYPE UnpackPremult( + /* [in] */ DXPMSAMPLE *pSamples, + /* [in] */ ULONG cSamples, + /* [in] */ BOOL bMove) = 0; + + virtual void STDMETHODCALLTYPE UnpackRect( + /* [in] */ const DXPACKEDRECTDESC *pRectDesc) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXARGBReadPtrVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXARGBReadPtr * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXARGBReadPtr * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXARGBReadPtr * This); + + HRESULT ( STDMETHODCALLTYPE *GetSurface )( + IDXARGBReadPtr * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppSurface); + + DXSAMPLEFORMATENUM ( STDMETHODCALLTYPE *GetNativeType )( + IDXARGBReadPtr * This, + /* [out] */ DXNATIVETYPEINFO *pInfo); + + void ( STDMETHODCALLTYPE *Move )( + IDXARGBReadPtr * This, + /* [in] */ long cSamples); + + void ( STDMETHODCALLTYPE *MoveToRow )( + IDXARGBReadPtr * This, + /* [in] */ ULONG y); + + void ( STDMETHODCALLTYPE *MoveToXY )( + IDXARGBReadPtr * This, + /* [in] */ ULONG x, + /* [in] */ ULONG y); + + ULONG ( STDMETHODCALLTYPE *MoveAndGetRunInfo )( + IDXARGBReadPtr * This, + /* [in] */ ULONG Row, + /* [out] */ const DXRUNINFO **ppInfo); + + DXSAMPLE *( STDMETHODCALLTYPE *Unpack )( + IDXARGBReadPtr * This, + /* [in] */ DXSAMPLE *pSamples, + /* [in] */ ULONG cSamples, + /* [in] */ BOOL bMove); + + DXPMSAMPLE *( STDMETHODCALLTYPE *UnpackPremult )( + IDXARGBReadPtr * This, + /* [in] */ DXPMSAMPLE *pSamples, + /* [in] */ ULONG cSamples, + /* [in] */ BOOL bMove); + + void ( STDMETHODCALLTYPE *UnpackRect )( + IDXARGBReadPtr * This, + /* [in] */ const DXPACKEDRECTDESC *pRectDesc); + + END_INTERFACE + } IDXARGBReadPtrVtbl; + + interface IDXARGBReadPtr + { + CONST_VTBL struct IDXARGBReadPtrVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXARGBReadPtr_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXARGBReadPtr_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXARGBReadPtr_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXARGBReadPtr_GetSurface(This,riid,ppSurface) \ + (This)->lpVtbl -> GetSurface(This,riid,ppSurface) + +#define IDXARGBReadPtr_GetNativeType(This,pInfo) \ + (This)->lpVtbl -> GetNativeType(This,pInfo) + +#define IDXARGBReadPtr_Move(This,cSamples) \ + (This)->lpVtbl -> Move(This,cSamples) + +#define IDXARGBReadPtr_MoveToRow(This,y) \ + (This)->lpVtbl -> MoveToRow(This,y) + +#define IDXARGBReadPtr_MoveToXY(This,x,y) \ + (This)->lpVtbl -> MoveToXY(This,x,y) + +#define IDXARGBReadPtr_MoveAndGetRunInfo(This,Row,ppInfo) \ + (This)->lpVtbl -> MoveAndGetRunInfo(This,Row,ppInfo) + +#define IDXARGBReadPtr_Unpack(This,pSamples,cSamples,bMove) \ + (This)->lpVtbl -> Unpack(This,pSamples,cSamples,bMove) + +#define IDXARGBReadPtr_UnpackPremult(This,pSamples,cSamples,bMove) \ + (This)->lpVtbl -> UnpackPremult(This,pSamples,cSamples,bMove) + +#define IDXARGBReadPtr_UnpackRect(This,pRectDesc) \ + (This)->lpVtbl -> UnpackRect(This,pRectDesc) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDXARGBReadPtr_GetSurface_Proxy( + IDXARGBReadPtr * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppSurface); + + +void __RPC_STUB IDXARGBReadPtr_GetSurface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +DXSAMPLEFORMATENUM STDMETHODCALLTYPE IDXARGBReadPtr_GetNativeType_Proxy( + IDXARGBReadPtr * This, + /* [out] */ DXNATIVETYPEINFO *pInfo); + + +void __RPC_STUB IDXARGBReadPtr_GetNativeType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +void STDMETHODCALLTYPE IDXARGBReadPtr_Move_Proxy( + IDXARGBReadPtr * This, + /* [in] */ long cSamples); + + +void __RPC_STUB IDXARGBReadPtr_Move_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +void STDMETHODCALLTYPE IDXARGBReadPtr_MoveToRow_Proxy( + IDXARGBReadPtr * This, + /* [in] */ ULONG y); + + +void __RPC_STUB IDXARGBReadPtr_MoveToRow_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +void STDMETHODCALLTYPE IDXARGBReadPtr_MoveToXY_Proxy( + IDXARGBReadPtr * This, + /* [in] */ ULONG x, + /* [in] */ ULONG y); + + +void __RPC_STUB IDXARGBReadPtr_MoveToXY_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +ULONG STDMETHODCALLTYPE IDXARGBReadPtr_MoveAndGetRunInfo_Proxy( + IDXARGBReadPtr * This, + /* [in] */ ULONG Row, + /* [out] */ const DXRUNINFO **ppInfo); + + +void __RPC_STUB IDXARGBReadPtr_MoveAndGetRunInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +DXSAMPLE *STDMETHODCALLTYPE IDXARGBReadPtr_Unpack_Proxy( + IDXARGBReadPtr * This, + /* [in] */ DXSAMPLE *pSamples, + /* [in] */ ULONG cSamples, + /* [in] */ BOOL bMove); + + +void __RPC_STUB IDXARGBReadPtr_Unpack_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +DXPMSAMPLE *STDMETHODCALLTYPE IDXARGBReadPtr_UnpackPremult_Proxy( + IDXARGBReadPtr * This, + /* [in] */ DXPMSAMPLE *pSamples, + /* [in] */ ULONG cSamples, + /* [in] */ BOOL bMove); + + +void __RPC_STUB IDXARGBReadPtr_UnpackPremult_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +void STDMETHODCALLTYPE IDXARGBReadPtr_UnpackRect_Proxy( + IDXARGBReadPtr * This, + /* [in] */ const DXPACKEDRECTDESC *pRectDesc); + + +void __RPC_STUB IDXARGBReadPtr_UnpackRect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXARGBReadPtr_INTERFACE_DEFINED__ */ + + +#ifndef __IDXARGBReadWritePtr_INTERFACE_DEFINED__ +#define __IDXARGBReadWritePtr_INTERFACE_DEFINED__ + +/* interface IDXARGBReadWritePtr */ +/* [object][local][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXARGBReadWritePtr; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("EAAAC2D7-C290-11d1-905D-00C04FD9189D") + IDXARGBReadWritePtr : public IDXARGBReadPtr + { + public: + virtual void STDMETHODCALLTYPE PackAndMove( + /* [in] */ const DXSAMPLE *pSamples, + /* [in] */ ULONG cSamples) = 0; + + virtual void STDMETHODCALLTYPE PackPremultAndMove( + /* [in] */ const DXPMSAMPLE *pSamples, + /* [in] */ ULONG cSamples) = 0; + + virtual void STDMETHODCALLTYPE PackRect( + /* [in] */ const DXPACKEDRECTDESC *pRectDesc) = 0; + + virtual void STDMETHODCALLTYPE CopyAndMoveBoth( + /* [in] */ DXBASESAMPLE *pScratchBuffer, + /* [in] */ IDXARGBReadPtr *pSrc, + /* [in] */ ULONG cSamples, + /* [in] */ BOOL bIsOpaque) = 0; + + virtual void STDMETHODCALLTYPE CopyRect( + /* [in] */ DXBASESAMPLE *pScratchBuffer, + /* [in] */ const RECT *pDestRect, + /* [in] */ IDXARGBReadPtr *pSrc, + /* [in] */ const POINT *pSrcOrigin, + /* [in] */ BOOL bIsOpaque) = 0; + + virtual void STDMETHODCALLTYPE FillAndMove( + /* [in] */ DXBASESAMPLE *pScratchBuffer, + /* [in] */ DXPMSAMPLE SampVal, + /* [in] */ ULONG cSamples, + /* [in] */ BOOL bDoOver) = 0; + + virtual void STDMETHODCALLTYPE FillRect( + /* [in] */ const RECT *pRect, + /* [in] */ DXPMSAMPLE SampVal, + /* [in] */ BOOL bDoOver) = 0; + + virtual void STDMETHODCALLTYPE OverSample( + /* [in] */ const DXOVERSAMPLEDESC *pOverDesc) = 0; + + virtual void STDMETHODCALLTYPE OverArrayAndMove( + /* [in] */ DXBASESAMPLE *pScratchBuffer, + /* [in] */ const DXPMSAMPLE *pSrc, + /* [in] */ ULONG cSamples) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXARGBReadWritePtrVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXARGBReadWritePtr * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXARGBReadWritePtr * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXARGBReadWritePtr * This); + + HRESULT ( STDMETHODCALLTYPE *GetSurface )( + IDXARGBReadWritePtr * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppSurface); + + DXSAMPLEFORMATENUM ( STDMETHODCALLTYPE *GetNativeType )( + IDXARGBReadWritePtr * This, + /* [out] */ DXNATIVETYPEINFO *pInfo); + + void ( STDMETHODCALLTYPE *Move )( + IDXARGBReadWritePtr * This, + /* [in] */ long cSamples); + + void ( STDMETHODCALLTYPE *MoveToRow )( + IDXARGBReadWritePtr * This, + /* [in] */ ULONG y); + + void ( STDMETHODCALLTYPE *MoveToXY )( + IDXARGBReadWritePtr * This, + /* [in] */ ULONG x, + /* [in] */ ULONG y); + + ULONG ( STDMETHODCALLTYPE *MoveAndGetRunInfo )( + IDXARGBReadWritePtr * This, + /* [in] */ ULONG Row, + /* [out] */ const DXRUNINFO **ppInfo); + + DXSAMPLE *( STDMETHODCALLTYPE *Unpack )( + IDXARGBReadWritePtr * This, + /* [in] */ DXSAMPLE *pSamples, + /* [in] */ ULONG cSamples, + /* [in] */ BOOL bMove); + + DXPMSAMPLE *( STDMETHODCALLTYPE *UnpackPremult )( + IDXARGBReadWritePtr * This, + /* [in] */ DXPMSAMPLE *pSamples, + /* [in] */ ULONG cSamples, + /* [in] */ BOOL bMove); + + void ( STDMETHODCALLTYPE *UnpackRect )( + IDXARGBReadWritePtr * This, + /* [in] */ const DXPACKEDRECTDESC *pRectDesc); + + void ( STDMETHODCALLTYPE *PackAndMove )( + IDXARGBReadWritePtr * This, + /* [in] */ const DXSAMPLE *pSamples, + /* [in] */ ULONG cSamples); + + void ( STDMETHODCALLTYPE *PackPremultAndMove )( + IDXARGBReadWritePtr * This, + /* [in] */ const DXPMSAMPLE *pSamples, + /* [in] */ ULONG cSamples); + + void ( STDMETHODCALLTYPE *PackRect )( + IDXARGBReadWritePtr * This, + /* [in] */ const DXPACKEDRECTDESC *pRectDesc); + + void ( STDMETHODCALLTYPE *CopyAndMoveBoth )( + IDXARGBReadWritePtr * This, + /* [in] */ DXBASESAMPLE *pScratchBuffer, + /* [in] */ IDXARGBReadPtr *pSrc, + /* [in] */ ULONG cSamples, + /* [in] */ BOOL bIsOpaque); + + void ( STDMETHODCALLTYPE *CopyRect )( + IDXARGBReadWritePtr * This, + /* [in] */ DXBASESAMPLE *pScratchBuffer, + /* [in] */ const RECT *pDestRect, + /* [in] */ IDXARGBReadPtr *pSrc, + /* [in] */ const POINT *pSrcOrigin, + /* [in] */ BOOL bIsOpaque); + + void ( STDMETHODCALLTYPE *FillAndMove )( + IDXARGBReadWritePtr * This, + /* [in] */ DXBASESAMPLE *pScratchBuffer, + /* [in] */ DXPMSAMPLE SampVal, + /* [in] */ ULONG cSamples, + /* [in] */ BOOL bDoOver); + + void ( STDMETHODCALLTYPE *FillRect )( + IDXARGBReadWritePtr * This, + /* [in] */ const RECT *pRect, + /* [in] */ DXPMSAMPLE SampVal, + /* [in] */ BOOL bDoOver); + + void ( STDMETHODCALLTYPE *OverSample )( + IDXARGBReadWritePtr * This, + /* [in] */ const DXOVERSAMPLEDESC *pOverDesc); + + void ( STDMETHODCALLTYPE *OverArrayAndMove )( + IDXARGBReadWritePtr * This, + /* [in] */ DXBASESAMPLE *pScratchBuffer, + /* [in] */ const DXPMSAMPLE *pSrc, + /* [in] */ ULONG cSamples); + + END_INTERFACE + } IDXARGBReadWritePtrVtbl; + + interface IDXARGBReadWritePtr + { + CONST_VTBL struct IDXARGBReadWritePtrVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXARGBReadWritePtr_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXARGBReadWritePtr_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXARGBReadWritePtr_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXARGBReadWritePtr_GetSurface(This,riid,ppSurface) \ + (This)->lpVtbl -> GetSurface(This,riid,ppSurface) + +#define IDXARGBReadWritePtr_GetNativeType(This,pInfo) \ + (This)->lpVtbl -> GetNativeType(This,pInfo) + +#define IDXARGBReadWritePtr_Move(This,cSamples) \ + (This)->lpVtbl -> Move(This,cSamples) + +#define IDXARGBReadWritePtr_MoveToRow(This,y) \ + (This)->lpVtbl -> MoveToRow(This,y) + +#define IDXARGBReadWritePtr_MoveToXY(This,x,y) \ + (This)->lpVtbl -> MoveToXY(This,x,y) + +#define IDXARGBReadWritePtr_MoveAndGetRunInfo(This,Row,ppInfo) \ + (This)->lpVtbl -> MoveAndGetRunInfo(This,Row,ppInfo) + +#define IDXARGBReadWritePtr_Unpack(This,pSamples,cSamples,bMove) \ + (This)->lpVtbl -> Unpack(This,pSamples,cSamples,bMove) + +#define IDXARGBReadWritePtr_UnpackPremult(This,pSamples,cSamples,bMove) \ + (This)->lpVtbl -> UnpackPremult(This,pSamples,cSamples,bMove) + +#define IDXARGBReadWritePtr_UnpackRect(This,pRectDesc) \ + (This)->lpVtbl -> UnpackRect(This,pRectDesc) + + +#define IDXARGBReadWritePtr_PackAndMove(This,pSamples,cSamples) \ + (This)->lpVtbl -> PackAndMove(This,pSamples,cSamples) + +#define IDXARGBReadWritePtr_PackPremultAndMove(This,pSamples,cSamples) \ + (This)->lpVtbl -> PackPremultAndMove(This,pSamples,cSamples) + +#define IDXARGBReadWritePtr_PackRect(This,pRectDesc) \ + (This)->lpVtbl -> PackRect(This,pRectDesc) + +#define IDXARGBReadWritePtr_CopyAndMoveBoth(This,pScratchBuffer,pSrc,cSamples,bIsOpaque) \ + (This)->lpVtbl -> CopyAndMoveBoth(This,pScratchBuffer,pSrc,cSamples,bIsOpaque) + +#define IDXARGBReadWritePtr_CopyRect(This,pScratchBuffer,pDestRect,pSrc,pSrcOrigin,bIsOpaque) \ + (This)->lpVtbl -> CopyRect(This,pScratchBuffer,pDestRect,pSrc,pSrcOrigin,bIsOpaque) + +#define IDXARGBReadWritePtr_FillAndMove(This,pScratchBuffer,SampVal,cSamples,bDoOver) \ + (This)->lpVtbl -> FillAndMove(This,pScratchBuffer,SampVal,cSamples,bDoOver) + +#define IDXARGBReadWritePtr_FillRect(This,pRect,SampVal,bDoOver) \ + (This)->lpVtbl -> FillRect(This,pRect,SampVal,bDoOver) + +#define IDXARGBReadWritePtr_OverSample(This,pOverDesc) \ + (This)->lpVtbl -> OverSample(This,pOverDesc) + +#define IDXARGBReadWritePtr_OverArrayAndMove(This,pScratchBuffer,pSrc,cSamples) \ + (This)->lpVtbl -> OverArrayAndMove(This,pScratchBuffer,pSrc,cSamples) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +void STDMETHODCALLTYPE IDXARGBReadWritePtr_PackAndMove_Proxy( + IDXARGBReadWritePtr * This, + /* [in] */ const DXSAMPLE *pSamples, + /* [in] */ ULONG cSamples); + + +void __RPC_STUB IDXARGBReadWritePtr_PackAndMove_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +void STDMETHODCALLTYPE IDXARGBReadWritePtr_PackPremultAndMove_Proxy( + IDXARGBReadWritePtr * This, + /* [in] */ const DXPMSAMPLE *pSamples, + /* [in] */ ULONG cSamples); + + +void __RPC_STUB IDXARGBReadWritePtr_PackPremultAndMove_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +void STDMETHODCALLTYPE IDXARGBReadWritePtr_PackRect_Proxy( + IDXARGBReadWritePtr * This, + /* [in] */ const DXPACKEDRECTDESC *pRectDesc); + + +void __RPC_STUB IDXARGBReadWritePtr_PackRect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +void STDMETHODCALLTYPE IDXARGBReadWritePtr_CopyAndMoveBoth_Proxy( + IDXARGBReadWritePtr * This, + /* [in] */ DXBASESAMPLE *pScratchBuffer, + /* [in] */ IDXARGBReadPtr *pSrc, + /* [in] */ ULONG cSamples, + /* [in] */ BOOL bIsOpaque); + + +void __RPC_STUB IDXARGBReadWritePtr_CopyAndMoveBoth_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +void STDMETHODCALLTYPE IDXARGBReadWritePtr_CopyRect_Proxy( + IDXARGBReadWritePtr * This, + /* [in] */ DXBASESAMPLE *pScratchBuffer, + /* [in] */ const RECT *pDestRect, + /* [in] */ IDXARGBReadPtr *pSrc, + /* [in] */ const POINT *pSrcOrigin, + /* [in] */ BOOL bIsOpaque); + + +void __RPC_STUB IDXARGBReadWritePtr_CopyRect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +void STDMETHODCALLTYPE IDXARGBReadWritePtr_FillAndMove_Proxy( + IDXARGBReadWritePtr * This, + /* [in] */ DXBASESAMPLE *pScratchBuffer, + /* [in] */ DXPMSAMPLE SampVal, + /* [in] */ ULONG cSamples, + /* [in] */ BOOL bDoOver); + + +void __RPC_STUB IDXARGBReadWritePtr_FillAndMove_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +void STDMETHODCALLTYPE IDXARGBReadWritePtr_FillRect_Proxy( + IDXARGBReadWritePtr * This, + /* [in] */ const RECT *pRect, + /* [in] */ DXPMSAMPLE SampVal, + /* [in] */ BOOL bDoOver); + + +void __RPC_STUB IDXARGBReadWritePtr_FillRect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +void STDMETHODCALLTYPE IDXARGBReadWritePtr_OverSample_Proxy( + IDXARGBReadWritePtr * This, + /* [in] */ const DXOVERSAMPLEDESC *pOverDesc); + + +void __RPC_STUB IDXARGBReadWritePtr_OverSample_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +void STDMETHODCALLTYPE IDXARGBReadWritePtr_OverArrayAndMove_Proxy( + IDXARGBReadWritePtr * This, + /* [in] */ DXBASESAMPLE *pScratchBuffer, + /* [in] */ const DXPMSAMPLE *pSrc, + /* [in] */ ULONG cSamples); + + +void __RPC_STUB IDXARGBReadWritePtr_OverArrayAndMove_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXARGBReadWritePtr_INTERFACE_DEFINED__ */ + + +#ifndef __IDXDCLock_INTERFACE_DEFINED__ +#define __IDXDCLock_INTERFACE_DEFINED__ + +/* interface IDXDCLock */ +/* [object][local][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXDCLock; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0F619456-CF39-11d1-905E-00C04FD9189D") + IDXDCLock : public IUnknown + { + public: + virtual HDC STDMETHODCALLTYPE GetDC( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXDCLockVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXDCLock * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXDCLock * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXDCLock * This); + + HDC ( STDMETHODCALLTYPE *GetDC )( + IDXDCLock * This); + + END_INTERFACE + } IDXDCLockVtbl; + + interface IDXDCLock + { + CONST_VTBL struct IDXDCLockVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXDCLock_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXDCLock_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXDCLock_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXDCLock_GetDC(This) \ + (This)->lpVtbl -> GetDC(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HDC STDMETHODCALLTYPE IDXDCLock_GetDC_Proxy( + IDXDCLock * This); + + +void __RPC_STUB IDXDCLock_GetDC_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXDCLock_INTERFACE_DEFINED__ */ + + +#ifndef __IDXTScaleOutput_INTERFACE_DEFINED__ +#define __IDXTScaleOutput_INTERFACE_DEFINED__ + +/* interface IDXTScaleOutput */ +/* [object][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXTScaleOutput; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B2024B50-EE77-11d1-9066-00C04FD9189D") + IDXTScaleOutput : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetOutputSize( + /* [in] */ const SIZE OutSize, + /* [in] */ BOOL bMaintainAspect) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXTScaleOutputVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXTScaleOutput * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXTScaleOutput * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXTScaleOutput * This); + + HRESULT ( STDMETHODCALLTYPE *SetOutputSize )( + IDXTScaleOutput * This, + /* [in] */ const SIZE OutSize, + /* [in] */ BOOL bMaintainAspect); + + END_INTERFACE + } IDXTScaleOutputVtbl; + + interface IDXTScaleOutput + { + CONST_VTBL struct IDXTScaleOutputVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXTScaleOutput_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXTScaleOutput_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXTScaleOutput_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXTScaleOutput_SetOutputSize(This,OutSize,bMaintainAspect) \ + (This)->lpVtbl -> SetOutputSize(This,OutSize,bMaintainAspect) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDXTScaleOutput_SetOutputSize_Proxy( + IDXTScaleOutput * This, + /* [in] */ const SIZE OutSize, + /* [in] */ BOOL bMaintainAspect); + + +void __RPC_STUB IDXTScaleOutput_SetOutputSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXTScaleOutput_INTERFACE_DEFINED__ */ + + +#ifndef __IDXGradient_INTERFACE_DEFINED__ +#define __IDXGradient_INTERFACE_DEFINED__ + +/* interface IDXGradient */ +/* [object][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXGradient; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B2024B51-EE77-11d1-9066-00C04FD9189D") + IDXGradient : public IDXTScaleOutput + { + public: + virtual HRESULT STDMETHODCALLTYPE SetGradient( + DXSAMPLE StartColor, + DXSAMPLE EndColor, + BOOL bHorizontal) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetOutputSize( + /* [out] */ SIZE *pOutSize) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXGradientVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXGradient * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXGradient * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXGradient * This); + + HRESULT ( STDMETHODCALLTYPE *SetOutputSize )( + IDXGradient * This, + /* [in] */ const SIZE OutSize, + /* [in] */ BOOL bMaintainAspect); + + HRESULT ( STDMETHODCALLTYPE *SetGradient )( + IDXGradient * This, + DXSAMPLE StartColor, + DXSAMPLE EndColor, + BOOL bHorizontal); + + HRESULT ( STDMETHODCALLTYPE *GetOutputSize )( + IDXGradient * This, + /* [out] */ SIZE *pOutSize); + + END_INTERFACE + } IDXGradientVtbl; + + interface IDXGradient + { + CONST_VTBL struct IDXGradientVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXGradient_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXGradient_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXGradient_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXGradient_SetOutputSize(This,OutSize,bMaintainAspect) \ + (This)->lpVtbl -> SetOutputSize(This,OutSize,bMaintainAspect) + + +#define IDXGradient_SetGradient(This,StartColor,EndColor,bHorizontal) \ + (This)->lpVtbl -> SetGradient(This,StartColor,EndColor,bHorizontal) + +#define IDXGradient_GetOutputSize(This,pOutSize) \ + (This)->lpVtbl -> GetOutputSize(This,pOutSize) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDXGradient_SetGradient_Proxy( + IDXGradient * This, + DXSAMPLE StartColor, + DXSAMPLE EndColor, + BOOL bHorizontal); + + +void __RPC_STUB IDXGradient_SetGradient_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXGradient_GetOutputSize_Proxy( + IDXGradient * This, + /* [out] */ SIZE *pOutSize); + + +void __RPC_STUB IDXGradient_GetOutputSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXGradient_INTERFACE_DEFINED__ */ + + +#ifndef __IDXTScale_INTERFACE_DEFINED__ +#define __IDXTScale_INTERFACE_DEFINED__ + +/* interface IDXTScale */ +/* [object][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXTScale; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B39FD742-E139-11d1-9065-00C04FD9189D") + IDXTScale : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetScales( + /* [in] */ float Scales[ 2 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetScales( + /* [out] */ float Scales[ 2 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE ScaleFitToSize( + /* [out][in] */ DXBNDS *pClipBounds, + /* [in] */ SIZE FitToSize, + /* [in] */ BOOL bMaintainAspect) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXTScaleVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXTScale * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXTScale * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXTScale * This); + + HRESULT ( STDMETHODCALLTYPE *SetScales )( + IDXTScale * This, + /* [in] */ float Scales[ 2 ]); + + HRESULT ( STDMETHODCALLTYPE *GetScales )( + IDXTScale * This, + /* [out] */ float Scales[ 2 ]); + + HRESULT ( STDMETHODCALLTYPE *ScaleFitToSize )( + IDXTScale * This, + /* [out][in] */ DXBNDS *pClipBounds, + /* [in] */ SIZE FitToSize, + /* [in] */ BOOL bMaintainAspect); + + END_INTERFACE + } IDXTScaleVtbl; + + interface IDXTScale + { + CONST_VTBL struct IDXTScaleVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXTScale_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXTScale_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXTScale_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXTScale_SetScales(This,Scales) \ + (This)->lpVtbl -> SetScales(This,Scales) + +#define IDXTScale_GetScales(This,Scales) \ + (This)->lpVtbl -> GetScales(This,Scales) + +#define IDXTScale_ScaleFitToSize(This,pClipBounds,FitToSize,bMaintainAspect) \ + (This)->lpVtbl -> ScaleFitToSize(This,pClipBounds,FitToSize,bMaintainAspect) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDXTScale_SetScales_Proxy( + IDXTScale * This, + /* [in] */ float Scales[ 2 ]); + + +void __RPC_STUB IDXTScale_SetScales_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTScale_GetScales_Proxy( + IDXTScale * This, + /* [out] */ float Scales[ 2 ]); + + +void __RPC_STUB IDXTScale_GetScales_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXTScale_ScaleFitToSize_Proxy( + IDXTScale * This, + /* [out][in] */ DXBNDS *pClipBounds, + /* [in] */ SIZE FitToSize, + /* [in] */ BOOL bMaintainAspect); + + +void __RPC_STUB IDXTScale_ScaleFitToSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXTScale_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxtrans_0269 */ +/* [local] */ + +typedef +enum DISPIDDXEFFECT + { DISPID_DXECAPABILITIES = 10000, + DISPID_DXEPROGRESS = DISPID_DXECAPABILITIES + 1, + DISPID_DXESTEP = DISPID_DXEPROGRESS + 1, + DISPID_DXEDURATION = DISPID_DXESTEP + 1, + DISPID_DXE_NEXT_ID = DISPID_DXEDURATION + 1 + } DISPIDDXBOUNDEDEFFECT; + +typedef +enum DXEFFECTTYPE + { DXTET_PERIODIC = 1 << 0, + DXTET_MORPH = 1 << 1 + } DXEFFECTTYPE; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0269_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0269_v0_0_s_ifspec; + +#ifndef __IDXEffect_INTERFACE_DEFINED__ +#define __IDXEffect_INTERFACE_DEFINED__ + +/* interface IDXEffect */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_IDXEffect; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("E31FB81B-1335-11d1-8189-0000F87557DB") + IDXEffect : public IDispatch + { + public: + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Capabilities( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Progress( + /* [retval][out] */ float *pVal) = 0; + + virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_Progress( + /* [in] */ float newVal) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_StepResolution( + /* [retval][out] */ float *pVal) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_Duration( + /* [retval][out] */ float *pVal) = 0; + + virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_Duration( + /* [in] */ float newVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXEffectVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXEffect * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXEffect * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXEffect * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IDXEffect * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IDXEffect * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IDXEffect * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IDXEffect * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Capabilities )( + IDXEffect * This, + /* [retval][out] */ long *pVal); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Progress )( + IDXEffect * This, + /* [retval][out] */ float *pVal); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Progress )( + IDXEffect * This, + /* [in] */ float newVal); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StepResolution )( + IDXEffect * This, + /* [retval][out] */ float *pVal); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Duration )( + IDXEffect * This, + /* [retval][out] */ float *pVal); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Duration )( + IDXEffect * This, + /* [in] */ float newVal); + + END_INTERFACE + } IDXEffectVtbl; + + interface IDXEffect + { + CONST_VTBL struct IDXEffectVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXEffect_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXEffect_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXEffect_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXEffect_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IDXEffect_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IDXEffect_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IDXEffect_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IDXEffect_get_Capabilities(This,pVal) \ + (This)->lpVtbl -> get_Capabilities(This,pVal) + +#define IDXEffect_get_Progress(This,pVal) \ + (This)->lpVtbl -> get_Progress(This,pVal) + +#define IDXEffect_put_Progress(This,newVal) \ + (This)->lpVtbl -> put_Progress(This,newVal) + +#define IDXEffect_get_StepResolution(This,pVal) \ + (This)->lpVtbl -> get_StepResolution(This,pVal) + +#define IDXEffect_get_Duration(This,pVal) \ + (This)->lpVtbl -> get_Duration(This,pVal) + +#define IDXEffect_put_Duration(This,newVal) \ + (This)->lpVtbl -> put_Duration(This,newVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE IDXEffect_get_Capabilities_Proxy( + IDXEffect * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IDXEffect_get_Capabilities_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE IDXEffect_get_Progress_Proxy( + IDXEffect * This, + /* [retval][out] */ float *pVal); + + +void __RPC_STUB IDXEffect_get_Progress_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propput] */ HRESULT STDMETHODCALLTYPE IDXEffect_put_Progress_Proxy( + IDXEffect * This, + /* [in] */ float newVal); + + +void __RPC_STUB IDXEffect_put_Progress_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE IDXEffect_get_StepResolution_Proxy( + IDXEffect * This, + /* [retval][out] */ float *pVal); + + +void __RPC_STUB IDXEffect_get_StepResolution_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE IDXEffect_get_Duration_Proxy( + IDXEffect * This, + /* [retval][out] */ float *pVal); + + +void __RPC_STUB IDXEffect_get_Duration_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propput] */ HRESULT STDMETHODCALLTYPE IDXEffect_put_Duration_Proxy( + IDXEffect * This, + /* [in] */ float newVal); + + +void __RPC_STUB IDXEffect_put_Duration_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXEffect_INTERFACE_DEFINED__ */ + + +#ifndef __IDXLookupTable_INTERFACE_DEFINED__ +#define __IDXLookupTable_INTERFACE_DEFINED__ + +/* interface IDXLookupTable */ +/* [object][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXLookupTable; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("01BAFC7F-9E63-11d1-9053-00C04FD9189D") + IDXLookupTable : public IDXBaseObject + { + public: + virtual HRESULT STDMETHODCALLTYPE GetTables( + /* [out] */ BYTE RedLUT[ 256 ], + /* [out] */ BYTE GreenLUT[ 256 ], + /* [out] */ BYTE BlueLUT[ 256 ], + /* [out] */ BYTE AlphaLUT[ 256 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsChannelIdentity( + /* [out] */ DXBASESAMPLE *pSampleBools) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetIndexValues( + /* [in] */ ULONG Index, + /* [out] */ DXBASESAMPLE *pSample) = 0; + + virtual HRESULT STDMETHODCALLTYPE ApplyTables( + /* [out][in] */ DXSAMPLE *pSamples, + /* [in] */ ULONG cSamples) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXLookupTableVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXLookupTable * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXLookupTable * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXLookupTable * This); + + HRESULT ( STDMETHODCALLTYPE *GetGenerationId )( + IDXLookupTable * This, + /* [out] */ ULONG *pID); + + HRESULT ( STDMETHODCALLTYPE *IncrementGenerationId )( + IDXLookupTable * This, + /* [in] */ BOOL bRefresh); + + HRESULT ( STDMETHODCALLTYPE *GetObjectSize )( + IDXLookupTable * This, + /* [out] */ ULONG *pcbSize); + + HRESULT ( STDMETHODCALLTYPE *GetTables )( + IDXLookupTable * This, + /* [out] */ BYTE RedLUT[ 256 ], + /* [out] */ BYTE GreenLUT[ 256 ], + /* [out] */ BYTE BlueLUT[ 256 ], + /* [out] */ BYTE AlphaLUT[ 256 ]); + + HRESULT ( STDMETHODCALLTYPE *IsChannelIdentity )( + IDXLookupTable * This, + /* [out] */ DXBASESAMPLE *pSampleBools); + + HRESULT ( STDMETHODCALLTYPE *GetIndexValues )( + IDXLookupTable * This, + /* [in] */ ULONG Index, + /* [out] */ DXBASESAMPLE *pSample); + + HRESULT ( STDMETHODCALLTYPE *ApplyTables )( + IDXLookupTable * This, + /* [out][in] */ DXSAMPLE *pSamples, + /* [in] */ ULONG cSamples); + + END_INTERFACE + } IDXLookupTableVtbl; + + interface IDXLookupTable + { + CONST_VTBL struct IDXLookupTableVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXLookupTable_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXLookupTable_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXLookupTable_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXLookupTable_GetGenerationId(This,pID) \ + (This)->lpVtbl -> GetGenerationId(This,pID) + +#define IDXLookupTable_IncrementGenerationId(This,bRefresh) \ + (This)->lpVtbl -> IncrementGenerationId(This,bRefresh) + +#define IDXLookupTable_GetObjectSize(This,pcbSize) \ + (This)->lpVtbl -> GetObjectSize(This,pcbSize) + + +#define IDXLookupTable_GetTables(This,RedLUT,GreenLUT,BlueLUT,AlphaLUT) \ + (This)->lpVtbl -> GetTables(This,RedLUT,GreenLUT,BlueLUT,AlphaLUT) + +#define IDXLookupTable_IsChannelIdentity(This,pSampleBools) \ + (This)->lpVtbl -> IsChannelIdentity(This,pSampleBools) + +#define IDXLookupTable_GetIndexValues(This,Index,pSample) \ + (This)->lpVtbl -> GetIndexValues(This,Index,pSample) + +#define IDXLookupTable_ApplyTables(This,pSamples,cSamples) \ + (This)->lpVtbl -> ApplyTables(This,pSamples,cSamples) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDXLookupTable_GetTables_Proxy( + IDXLookupTable * This, + /* [out] */ BYTE RedLUT[ 256 ], + /* [out] */ BYTE GreenLUT[ 256 ], + /* [out] */ BYTE BlueLUT[ 256 ], + /* [out] */ BYTE AlphaLUT[ 256 ]); + + +void __RPC_STUB IDXLookupTable_GetTables_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXLookupTable_IsChannelIdentity_Proxy( + IDXLookupTable * This, + /* [out] */ DXBASESAMPLE *pSampleBools); + + +void __RPC_STUB IDXLookupTable_IsChannelIdentity_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXLookupTable_GetIndexValues_Proxy( + IDXLookupTable * This, + /* [in] */ ULONG Index, + /* [out] */ DXBASESAMPLE *pSample); + + +void __RPC_STUB IDXLookupTable_GetIndexValues_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDXLookupTable_ApplyTables_Proxy( + IDXLookupTable * This, + /* [out][in] */ DXSAMPLE *pSamples, + /* [in] */ ULONG cSamples); + + +void __RPC_STUB IDXLookupTable_ApplyTables_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXLookupTable_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_dxtrans_0271 */ +/* [local] */ + +typedef struct DXRAWSURFACEINFO + { + BYTE *pFirstByte; + long lPitch; + ULONG Width; + ULONG Height; + const GUID *pPixelFormat; + HDC hdc; + DWORD dwColorKey; + DXBASESAMPLE *pPalette; + } DXRAWSURFACEINFO; + + + +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0271_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_dxtrans_0271_v0_0_s_ifspec; + +#ifndef __IDXRawSurface_INTERFACE_DEFINED__ +#define __IDXRawSurface_INTERFACE_DEFINED__ + +/* interface IDXRawSurface */ +/* [object][local][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IDXRawSurface; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("09756C8A-D96A-11d1-9062-00C04FD9189D") + IDXRawSurface : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetSurfaceInfo( + DXRAWSURFACEINFO *pSurfaceInfo) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDXRawSurfaceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDXRawSurface * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDXRawSurface * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDXRawSurface * This); + + HRESULT ( STDMETHODCALLTYPE *GetSurfaceInfo )( + IDXRawSurface * This, + DXRAWSURFACEINFO *pSurfaceInfo); + + END_INTERFACE + } IDXRawSurfaceVtbl; + + interface IDXRawSurface + { + CONST_VTBL struct IDXRawSurfaceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDXRawSurface_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDXRawSurface_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDXRawSurface_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDXRawSurface_GetSurfaceInfo(This,pSurfaceInfo) \ + (This)->lpVtbl -> GetSurfaceInfo(This,pSurfaceInfo) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDXRawSurface_GetSurfaceInfo_Proxy( + IDXRawSurface * This, + DXRAWSURFACEINFO *pSurfaceInfo); + + +void __RPC_STUB IDXRawSurface_GetSurfaceInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDXRawSurface_INTERFACE_DEFINED__ */ + + +#ifndef __IHTMLDXTransform_INTERFACE_DEFINED__ +#define __IHTMLDXTransform_INTERFACE_DEFINED__ + +/* interface IHTMLDXTransform */ +/* [object][local][unique][helpstring][uuid] */ + + +EXTERN_C const IID IID_IHTMLDXTransform; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("30E2AB7D-4FDD-4159-B7EA-DC722BF4ADE5") + IHTMLDXTransform : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetHostUrl( + BSTR bstrHostUrl) = 0; + + }; + +#else /* C style interface */ + + typedef struct IHTMLDXTransformVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IHTMLDXTransform * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IHTMLDXTransform * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IHTMLDXTransform * This); + + HRESULT ( STDMETHODCALLTYPE *SetHostUrl )( + IHTMLDXTransform * This, + BSTR bstrHostUrl); + + END_INTERFACE + } IHTMLDXTransformVtbl; + + interface IHTMLDXTransform + { + CONST_VTBL struct IHTMLDXTransformVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IHTMLDXTransform_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IHTMLDXTransform_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IHTMLDXTransform_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IHTMLDXTransform_SetHostUrl(This,bstrHostUrl) \ + (This)->lpVtbl -> SetHostUrl(This,bstrHostUrl) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IHTMLDXTransform_SetHostUrl_Proxy( + IHTMLDXTransform * This, + BSTR bstrHostUrl); + + +void __RPC_STUB IHTMLDXTransform_SetHostUrl_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IHTMLDXTransform_INTERFACE_DEFINED__ */ + + + +#ifndef __DXTRANSLib_LIBRARY_DEFINED__ +#define __DXTRANSLib_LIBRARY_DEFINED__ + +/* library DXTRANSLib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_DXTRANSLib; + +EXTERN_C const CLSID CLSID_DXTransformFactory; + +#ifdef __cplusplus + +class DECLSPEC_UUID("D1FE6762-FC48-11D0-883A-3C8B00C10000") +DXTransformFactory; +#endif + +EXTERN_C const CLSID CLSID_DXTaskManager; + +#ifdef __cplusplus + +class DECLSPEC_UUID("4CB26C03-FF93-11d0-817E-0000F87557DB") +DXTaskManager; +#endif + +EXTERN_C const CLSID CLSID_DXTScale; + +#ifdef __cplusplus + +class DECLSPEC_UUID("555278E2-05DB-11D1-883A-3C8B00C10000") +DXTScale; +#endif + +EXTERN_C const CLSID CLSID_DXSurface; + +#ifdef __cplusplus + +class DECLSPEC_UUID("0E890F83-5F79-11D1-9043-00C04FD9189D") +DXSurface; +#endif + +EXTERN_C const CLSID CLSID_DXSurfaceModifier; + +#ifdef __cplusplus + +class DECLSPEC_UUID("3E669F1D-9C23-11d1-9053-00C04FD9189D") +DXSurfaceModifier; +#endif + +EXTERN_C const CLSID CLSID_DXGradient; + +#ifdef __cplusplus + +class DECLSPEC_UUID("C6365470-F667-11d1-9067-00C04FD9189D") +DXGradient; +#endif +#endif /* __DXTRANSLib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/dxva.h b/windows_libs/mssdk/include/dxva.h new file mode 100644 index 00000000..c8877f9d --- /dev/null +++ b/windows_libs/mssdk/include/dxva.h @@ -0,0 +1,653 @@ +//------------------------------------------------------------------------------ +// File: DXVA.h +// +// Desc: DirectX Video Acceleration header file. +// +// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __DIRECTX_VA__ +#define __DIRECTX_VA__ + +#ifdef __cplusplus +extern "C" { +#endif + +DEFINE_GUID(DXVA_ModeNone, 0x1b81be00, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(DXVA_ModeH261_A, 0x1b81be01, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(DXVA_ModeH261_B, 0x1b81be02, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(DXVA_ModeH263_A, 0x1b81be03, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(DXVA_ModeH263_B, 0x1b81be04, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(DXVA_ModeH263_C, 0x1b81be05, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(DXVA_ModeH263_D, 0x1b81be06, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(DXVA_ModeH263_E, 0x1b81be07, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(DXVA_ModeH263_F, 0x1b81be08, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(DXVA_ModeMPEG1_A, 0x1b81be09, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(DXVA_ModeMPEG2_A, 0x1b81be0A, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(DXVA_ModeMPEG2_B, 0x1b81be0B, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(DXVA_ModeMPEG2_C, 0x1b81be0C, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(DXVA_ModeMPEG2_D, 0x1b81be0D, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); + +DEFINE_GUID(DXVA_NoEncrypt, 0x1b81beD0, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); +DEFINE_GUID(DXVA_EncryptProt1, 0x1b81beD1, 0xa0c7,0x11d3,0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); + +#define DXVA_RESTRICTED_MODE_UNRESTRICTED 0xFFFF +#define DXVA_RESTRICTED_MODE_H261_A 1 +#define DXVA_RESTRICTED_MODE_H261_B 2 +#define DXVA_RESTRICTED_MODE_H263_A 3 +#define DXVA_RESTRICTED_MODE_H263_B 4 +#define DXVA_RESTRICTED_MODE_H263_C 5 +#define DXVA_RESTRICTED_MODE_H263_D 6 +#define DXVA_RESTRICTED_MODE_H263_E 7 +#define DXVA_RESTRICTED_MODE_H263_F 8 +#define DXVA_RESTRICTED_MODE_MPEG1_A 9 +#define DXVA_RESTRICTED_MODE_MPEG2_A 0xA +#define DXVA_RESTRICTED_MODE_MPEG2_B 0xB +#define DXVA_RESTRICTED_MODE_MPEG2_C 0xC +#define DXVA_RESTRICTED_MODE_MPEG2_D 0xD + +#define DXVA_COMPBUFFER_TYPE_THAT_IS_NOT_USED 0 +#define DXVA_PICTURE_DECODE_BUFFER 1 +#define DXVA_MACROBLOCK_CONTROL_BUFFER 2 +#define DXVA_RESIDUAL_DIFFERENCE_BUFFER 3 +#define DXVA_DEBLOCKING_CONTROL_BUFFER 4 +#define DXVA_INVERSE_QUANTIZATION_MATRIX_BUFFER 5 +#define DXVA_SLICE_CONTROL_BUFFER 6 +#define DXVA_BITSTREAM_DATA_BUFFER 7 +#define DXVA_AYUV_BUFFER 8 +#define DXVA_IA44_SURFACE_BUFFER 9 +#define DXVA_DPXD_SURFACE_BUFFER 10 +#define DXVA_HIGHLIGHT_BUFFER 11 +#define DXVA_DCCMD_SURFACE_BUFFER 12 +#define DXVA_ALPHA_BLEND_COMBINATION_BUFFER 13 +#define DXVA_PICTURE_RESAMPLE_BUFFER 14 +#define DXVA_READ_BACK_BUFFER 15 + +#define DXVA_NUM_TYPES_COMP_BUFFERS 16 + +/* values for bDXVA_Func */ +#define DXVA_PICTURE_DECODING_FUNCTION 1 +#define DXVA_ALPHA_BLEND_DATA_LOAD_FUNCTION 2 +#define DXVA_ALPHA_BLEND_COMBINATION_FUNCTION 3 +#define DXVA_PICTURE_RESAMPLE_FUNCTION 4 + +/* values returned from Execute command in absence of read-back */ +#define DXVA_EXECUTE_RETURN_OK 0 +#define DXVA_EXECUTE_RETURN_DATA_ERROR_MINOR 1 +#define DXVA_EXECUTE_RETURN_DATA_ERROR_SIGNIF 2 +#define DXVA_EXECUTE_RETURN_DATA_ERROR_SEVERE 3 +#define DXVA_EXECUTE_RETURN_OTHER_ERROR_SEVERE 4 + + +#pragma pack(push, BeforeDXVApacking, 1) + + +typedef struct _DXVA_ConnectMode { + GUID guidMode; + WORD wRestrictedMode; +} DXVA_ConnectMode, *LPDXVA_ConnectMode; + + +typedef DWORD DXVA_ConfigQueryOrReplyFunc, *LPDXVA_ConfigQueryOrReplyFunc; + +#define DXVA_QUERYORREPLYFUNCFLAG_DECODER_PROBE_QUERY 0xFFFFF1 +#define DXVA_QUERYORREPLYFUNCFLAG_DECODER_LOCK_QUERY 0xFFFFF5 +#define DXVA_QUERYORREPLYFUNCFLAG_ACCEL_PROBE_OK_COPY 0xFFFFF8 +#define DXVA_QUERYORREPLYFUNCFLAG_ACCEL_PROBE_OK_PLUS 0xFFFFF9 +#define DXVA_QUERYORREPLYFUNCFLAG_ACCEL_LOCK_OK_COPY 0xFFFFFC +#define DXVA_QUERYORREPLYFUNCFLAG_ACCEL_PROBE_FALSE_PLUS 0xFFFFFB +#define DXVA_QUERYORREPLYFUNCFLAG_ACCEL_LOCK_FALSE_PLUS 0xFFFFFF + +#define readDXVA_QueryOrReplyFuncFlag(ptr) ((*(ptr)) >> 8) + +#define readDXVA_QueryOrReplyFuncFlag_ACCEL(ptr) (((*(ptr)) >> 11) & 1) +#define readDXVA_QueryOrReplyFuncFlag_LOCK(ptr) (((*(ptr)) >> 10) & 1) +#define readDXVA_QueryOrReplyFuncFlag_BAD(ptr) (((*(ptr)) >> 9) & 1) +#define readDXVA_QueryOrReplyFuncFlag_PLUS(ptr) (((*(ptr)) >> 8) & 1) + +#define readDXVA_QueryOrReplyFuncFunc(ptr) ((*(ptr)) & 0xFF) + +#define writeDXVA_QueryOrReplyFunc(ptr, flg, fnc) ((*(ptr)) = ((flg) << 8) | (fnc)) + +#define setDXVA_QueryOrReplyFuncFlag(ptr, flg) ((*(ptr)) |= ((flg) << 8)) +#define setDXVA_QueryOrReplyFuncFunc(ptr, fnc) ((*(ptr)) |= (fnc)); + +typedef DWORD DXVA_EncryptProtocolFunc, *LPDXVA_EncryptProtocolFunc; + +#define DXVA_ENCRYPTPROTOCOLFUNCFLAG_HOST 0xFFFF00 +#define DXVA_ENCRYPTPROTOCOLFUNCFLAG_ACCEL 0xFFFF08 + +#define readDXVA_EncryptProtocolFuncFlag(ptr) ((*(ptr)) >> 8) +#define readDXVA_EncryptProtocolFuncFlag_ACCEL(ptr) (((*(ptr)) >> 11) & 1) + +#define readDXVA_EncryptProtocolFuncFunc(ptr) ((*(ptr)) & 0xFF) + +#define writeDXVA_EncryptProtocolFunc(ptr, flg, fnc) ((*(ptr)) = ((flg) << 8) | (fnc)) + +#define setDXVA_EncryptProtocolFuncFlag(ptr, flg) ((*(ptr)) |= ((flg) << 8)) +#define setDXVA_EncryptProtocolFuncFunc(ptr, fnc) ((*(ptr)) |= (fnc)); + +typedef struct _DXVA_EncryptProtocolHeader { + DXVA_EncryptProtocolFunc dwFunction; + DWORD ReservedBits[3]; + GUID guidEncryptProtocol; +} DXVA_EncryptProtocolHeader, *LPDXVA_EncryptProtocolHeader; + +typedef struct _DXVA_ConfigPictureDecode { + + // Operation Indicated + DXVA_ConfigQueryOrReplyFunc dwFunction; + + // Alignment + DWORD dwReservedBits[3]; + + // Encryption GUIDs + GUID guidConfigBitstreamEncryption; + GUID guidConfigMBcontrolEncryption; + GUID guidConfigResidDiffEncryption; + + // Bitstream Processing Indicator + BYTE bConfigBitstreamRaw; + + // Macroblock Control Config + BYTE bConfigMBcontrolRasterOrder; + + // Host Resid Diff Config + BYTE bConfigResidDiffHost; + BYTE bConfigSpatialResid8; + BYTE bConfigResid8Subtraction; + BYTE bConfigSpatialHost8or9Clipping; + BYTE bConfigSpatialResidInterleaved; + BYTE bConfigIntraResidUnsigned; + + // Accelerator Resid Diff Config + BYTE bConfigResidDiffAccelerator; + BYTE bConfigHostInverseScan; + BYTE bConfigSpecificIDCT; + BYTE bConfig4GroupedCoefs; +} DXVA_ConfigPictureDecode, *LPDXVA_ConfigPictureDecode; + + +/* Picture Decoding Parameters */ + +typedef struct _DXVA_PictureParameters { + + WORD wDecodedPictureIndex; + WORD wDeblockedPictureIndex; + + WORD wForwardRefPictureIndex; + WORD wBackwardRefPictureIndex; + + WORD wPicWidthInMBminus1; + WORD wPicHeightInMBminus1; + + BYTE bMacroblockWidthMinus1; + BYTE bMacroblockHeightMinus1; + + BYTE bBlockWidthMinus1; + BYTE bBlockHeightMinus1; + + BYTE bBPPminus1; + + BYTE bPicStructure; + BYTE bSecondField; + BYTE bPicIntra; + BYTE bPicBackwardPrediction; + + BYTE bBidirectionalAveragingMode; + BYTE bMVprecisionAndChromaRelation; + BYTE bChromaFormat; + + BYTE bPicScanFixed; + BYTE bPicScanMethod; + BYTE bPicReadbackRequests; + + BYTE bRcontrol; + BYTE bPicSpatialResid8; + BYTE bPicOverflowBlocks; + BYTE bPicExtrapolation; + + BYTE bPicDeblocked; + BYTE bPicDeblockConfined; + BYTE bPic4MVallowed; + BYTE bPicOBMC; + BYTE bPicBinPB; + BYTE bMV_RPS; + + BYTE bReservedBits; + + WORD wBitstreamFcodes; + WORD wBitstreamPCEelements; + BYTE bBitstreamConcealmentNeed; + BYTE bBitstreamConcealmentMethod; + +} DXVA_PictureParameters, *LPDXVA_PictureParameters; + + +/* Picture Resampling */ + +typedef struct _DXVA_PicResample { + + WORD wPicResampleSourcePicIndex; + WORD wPicResampleDestPicIndex; + + WORD wPicResampleRcontrol; + BYTE bPicResampleExtrapWidth; + BYTE bPicResampleExtrapHeight; + + DWORD dwPicResampleSourceWidth; + DWORD dwPicResampleSourceHeight; + + DWORD dwPicResampleDestWidth; + DWORD dwPicResampleDestHeight; + + DWORD dwPicResampleFullDestWidth; + DWORD dwPicResampleFullDestHeight; + +} DXVA_PicResample, *LPDXVA_PicResample; + + +#define DXVA_CHROMA_FORMAT_420 1 +#define DXVA_CHROMA_FORMAT_422 2 +#define DXVA_CHROMA_FORMAT_444 3 + +#define DXVA_PICTURE_STRUCTURE_TOP_FIELD 1 +#define DXVA_PICTURE_STRUCTURE_BOTTOM_FIELD 2 +#define DXVA_PICTURE_STRUCTURE_FRAME 3 + +#define DXVA_BIDIRECTIONAL_AVERAGING_MPEG2_ROUND 0 +#define DXVA_BIDIRECTIONAL_AVERAGING_H263_TRUNC 1 + +#define DXVA_MV_PRECISION_AND_CHROMA_RELATION_MPEG2 0 +#define DXVA_MV_PRECISION_AND_CHROMA_RELATION_H263 1 +#define DXVA_MV_PRECISION_AND_CHROMA_RELATION_H261 2 + +#define DXVA_SCAN_METHOD_ZIG_ZAG 0 +#define DXVA_SCAN_METHOD_ALTERNATE_VERTICAL 1 +#define DXVA_SCAN_METHOD_ALTERNATE_HORIZONTAL 2 +#define DXVA_SCAN_METHOD_ARBITRARY 3 + +#define DXVA_BITSTREAM_CONCEALMENT_NEED_UNLIKELY 0 +#define DXVA_BITSTREAM_CONCEALMENT_NEED_MILD 1 +#define DXVA_BITSTREAM_CONCEALMENT_NEED_LIKELY 2 +#define DXVA_BITSTREAM_CONCEALMENT_NEED_SEVERE 3 + +#define DXVA_BITSTREAM_CONCEALMENT_METHOD_UNSPECIFIED 0 +#define DXVA_BITSTREAM_CONCEALMENT_METHOD_INTRA 1 +#define DXVA_BITSTREAM_CONCEALMENT_METHOD_FORWARD 2 +#define DXVA_BITSTREAM_CONCEALMENT_METHOD_BACKWARD 3 + + +/* Buffer Description Data */ + +typedef struct _DXVA_BufferDescription { + DWORD dwTypeIndex; + DWORD dwBufferIndex; + DWORD dwDataOffset; + DWORD dwDataSize; + DWORD dwFirstMBaddress; + DWORD dwNumMBsInBuffer; + DWORD dwWidth; + DWORD dwHeight; + DWORD dwStride; + DWORD dwReservedBits; +} DXVA_BufferDescription, *LPDXVA_BufferDescription; + + +/* Off-Host IDCT Coefficient Data Structures */ + +typedef struct _DXVA_TCoef4Group { + BYTE TCoefIDX[4]; + SHORT TCoefValue[4]; +} DXVA_TCoef4Group, *LPDXVA_TCoef4Group; + +typedef struct _DXVA_TCoefSingle { + WORD wIndexWithEOB; + SHORT TCoefValue; +} DXVA_TCoefSingle, *LPDXVA_TCoefSingle; + +/* Macros for Reading EOB and Index Values */ + +#define readDXVA_TCoefSingleIDX(ptr) ((ptr)->wIndexWithEOB >> 1) +#define readDXVA_TCoefSingleEOB(ptr) ((ptr)->wIndexWithEOB & 1) + +/* Macro for Writing EOB and Index Values */ + +#define writeDXVA_TCoefSingleIndexWithEOB(ptr, idx, eob) ((ptr)->wIndexWithEOB = ((idx) << 1) | (eob)) +#define setDXVA_TCoefSingleIDX(ptr, idx) ((ptr)->wIndexWithEOB |= ((idx) << 1)) +#define setDXVA_TCoefSingleEOB(ptr) ((ptr)->wIndexWithEOB |= 1) + +/* Spatial-Domain Residual Difference Blocks */ + +#define DXVA_USUAL_BLOCK_WIDTH 8 +#define DXVA_USUAL_BLOCK_HEIGHT 8 +#define DXVA_USUAL_BLOCK_SIZE (DXVA_USUAL_BLOCK_WIDTH * DXVA_USUAL_BLOCK_HEIGHT) + +typedef SHORT DXVA_Sample16[DXVA_USUAL_BLOCK_SIZE]; +typedef signed char DXVA_Sample8 [DXVA_USUAL_BLOCK_SIZE]; + +/* Deblocking Filter Control Structure */ + +typedef BYTE DXVA_DeblockingEdgeControl; + +typedef DXVA_DeblockingEdgeControl * LPDXVA_DeblockingEdgeControl; + +/* Macros for Reading STRENGTH and FilterOn */ + +#define readDXVA_EdgeFilterStrength(ptr) ((*(ptr)) >> 1) +#define readDXVA_EdgeFilterOn(ptr) ((*(ptr)) & 1) + +/* Macro for Writing STRENGTH and FilterOn */ + +#define writeDXVA_DeblockingEdgeControl(ptr, str, fon) ((*(ptr)) = ((str) << 1) | (fon)) +#define setDXVA_EdgeFilterStrength(ptr, str) ((*(ptr)) |= ((str) << 1)) +#define setDXVA_EdgeFilterOn(ptr) ((*(ptr)) |= 1) + + +/* Macroblock Control Command Data Structures */ + +typedef struct _DXVA_MVvalue { + SHORT horz, vert; +} DXVA_MVvalue, *LPDXVA_MVvalue; + + +/* Inverse Quantization Matrices */ + +typedef struct _DXVA_QmatrixData { + BYTE bNewQmatrix[4]; /* intra Y, inter Y, intra chroma, inter chroma */ + WORD Qmatrix[4][DXVA_USUAL_BLOCK_WIDTH * DXVA_USUAL_BLOCK_HEIGHT]; +} DXVA_QmatrixData, *LPDXVA_QmatrixData; + + +/* Slice Control Buffer Data */ + +typedef struct _DXVA_SliceInfo { + WORD wHorizontalPosition; + WORD wVerticalPosition; + DWORD dwSliceBitsInBuffer; + DWORD dwSliceDataLocation; + BYTE bStartCodeBitOffset; + BYTE bReservedBits; + WORD wMBbitOffset; + WORD wNumberMBsInSlice; + WORD wQuantizerScaleCode; + WORD wBadSliceChopping; +} DXVA_SliceInfo, *LPDXVA_SliceInfo; + + +#define DXVA_NumMV_OBMC_off_BinPBwith4MV_off 4 +#define DXVA_NumMV_OBMC_off_BinPBwith4MV_on (4+1) +#define DXVA_NumMV_OBMC_on__BinPB_off (10) +#define DXVA_NumMV_OBMC_on__BinPB_on (11) /* not current standards */ + +#define DXVA_NumBlocksPerMB_420 (4+2+0) +#define DXVA_NumBlocksPerMB_422 (4+2+2) +#define DXVA_NumBlocksPerMB_444 (4+4+4) + +/* Basic form for I pictures */ +/* Host Residual Differences */ +typedef struct _DXVA_MBctrl_I_HostResidDiff_1 { + WORD wMBaddress; + WORD wMBtype; + DWORD dwMB_SNL; + WORD wPatternCode; + WORD wPC_Overflow; /* zero if not overflow format */ + DWORD dwReservedBits2; +} DXVA_MBctrl_I_HostResidDiff_1; + +/* Basic form for I pictures */ +/* Off-Host IDCT, 4:2:0 sampling */ +typedef struct _DXVA_MBctrl_I_OffHostIDCT_1 { + WORD wMBaddress; + WORD wMBtype; + DWORD dwMB_SNL; + WORD wPatternCode; + BYTE bNumCoef[DXVA_NumBlocksPerMB_420]; +} DXVA_MBctrl_I_OffHostIDCT_1; + +/* Basic form for P and B pictures */ +/* Should also be used for concealment MVs in MPEG-2 I pictures */ +/* Without OBMC, without BinPB and 4MV together, without MV RPS */ +/* Host Residual Differences */ +typedef struct _DXVA_MBctrl_P_HostResidDiff_1 { + WORD wMBaddress; + WORD wMBtype; + DWORD dwMB_SNL; + WORD wPatternCode; + WORD wPC_Overflow; /* zero if not overflow format */ + DWORD dwReservedBits2; + DXVA_MVvalue MVector[DXVA_NumMV_OBMC_off_BinPBwith4MV_off]; +} DXVA_MBctrl_P_HostResidDiff_1; + +/* Basic form for P and B pictures */ +/* Without OBMC, without BinPB and 4MV together, without MV RPS */ +/* Off-Host IDCT, 4:2:0 sampling */ +typedef struct _DXVA_MBctrl_P_OffHostIDCT_1 { + WORD wMBaddress; + WORD wMBtype; + DWORD dwMB_SNL; + WORD wPatternCode; + BYTE bNumCoef[DXVA_NumBlocksPerMB_420]; + DXVA_MVvalue MVector[DXVA_NumMV_OBMC_off_BinPBwith4MV_off]; +} DXVA_MBctrl_P_OffHostIDCT_1; + +/* How to load alpha blending graphic data */ +typedef struct _DXVA_ConfigAlphaLoad { + + // Operation Indicated + DXVA_ConfigQueryOrReplyFunc dwFunction; + + // Alignment + DWORD dwReservedBits[3]; + + BYTE bConfigDataType; +} DXVA_ConfigAlphaLoad, *LPDXVA_ConfigAlphaLoad; + +#define DXVA_CONFIG_DATA_TYPE_IA44 0 +#define DXVA_CONFIG_DATA_TYPE_AI44 1 +#define DXVA_CONFIG_DATA_TYPE_DPXD 2 +#define DXVA_CONFIG_DATA_TYPE_AYUV 3 + + +/* How to combine alpha blending graphic data */ +typedef struct _DXVA_ConfigAlphaCombine { + + // Operation Indicated + DXVA_ConfigQueryOrReplyFunc dwFunction; + + // Alignment + DWORD dwReservedBits[3]; + + BYTE bConfigBlendType; + BYTE bConfigPictureResizing; + BYTE bConfigOnlyUsePicDestRectArea; + BYTE bConfigGraphicResizing; + BYTE bConfigWholePlaneAlpha; + +} DXVA_ConfigAlphaCombine, *LPDXVA_ConfigAlphaCombine; + +#define DXVA_CONFIG_BLEND_TYPE_FRONT_BUFFER 0 +#define DXVA_CONFIG_BLEND_TYPE_BACK_HARDWARE 1 + + +/* AYUV sample for 16-entry YUV palette or graphic surface */ + +typedef struct _DXVA_AYUVsample { + BYTE bSampleAlpha8, bY_Value, bCbValue, bCrValue; +} DXVA_AYUVsample, *LPDXVA_AYUVsample; + +/* Macros for IA44 alpha blending surface samples */ + +typedef BYTE DXVA_IA44sample, *LPDXVA_IA44sample; + +#define readDXVA_IA44index(ptr) (((*(ptr)) & 0xF0) >> 4) +#define readDXVA_IA44alpha(ptr) ((*(ptr)) & 0x0F) + +#define writeDXVA_IA44(ptr, idx, alpha) ((*(ptr)) = (((idx) << 4) | (alpha))) + +#define setDXVA_IA44index(ptr, idx) ((*(ptr)) |= ((idx) << 4)) +#define setDXVA_IA44alpha(ptr, alpha) ((*(ptr)) |= (alpha)) + +/* Macros for AI44 alpha blending surface samples */ + +typedef BYTE DXVA_AI44sample, *LPDXVA_AI44sample; + +#define readDXVA_AI44index(ptr) ((*(ptr)) & 0x0F) +#define readDXVA_AI44alpha(ptr) (((*(ptr)) & 0xF0) >> 4) + +#define writeDXVA_AI44(ptr, idx, alpha) ((*(ptr)) = (((alpha) << 4) | (idx))) + +#define setDXVA_AI44index(ptr, idx) ((*(ptr)) |= (idx)) +#define setDXVA_AI44alpha(ptr, alpha) ((*(ptr)) |= ((alpha) << 4)) + + +/* Highlight data structure */ + +typedef struct _DXVA_Highlight { + WORD wHighlightActive; + WORD wHighlightIndices; + WORD wHighlightAlphas; + RECT HighlightRect; +} DXVA_Highlight, *LPDXVA_Highlight; + +typedef BYTE DXVA_DPXD, *LPDXVA_DPXD; +typedef WORD DXVA_DCCMD, *LPDXVA_DCCMD; + +/* Alpha blend combination */ + +typedef struct _DXVA_BlendCombination { + WORD wPictureSourceIndex; + WORD wBlendedDestinationIndex; + RECT PictureSourceRect16thPel; + RECT PictureDestinationRect; + RECT GraphicSourceRect; + RECT GraphicDestinationRect; + WORD wBlendDelay; + BYTE bBlendOn; + BYTE bWholePlaneAlpha; + DXVA_AYUVsample OutsideYUVcolor; +} DXVA_BlendCombination, *LPDXVA_BlendCombination; + + +/* Encryption Protocol #1 Data Structure */ + +#define DXVA_MAX_URIsize 1024 + +typedef struct _DXVA_EncryptProt1Data_Sign512_Accel512 { + DXVA_EncryptProtocolHeader header; + + DWORD dwSigningModulusSize; /* equal to 64 */ + BYTE SigningModulusValue[64]; + DWORD dwSigningExponentSize; /* equal to 64 */ + BYTE SigningExponentValue[64]; + + DWORD dwAccelModulusSize; /* equal to 64 */ + BYTE AccelModulusValue[64]; + DWORD dwAccelExponentSize; /* equal to 64 */ + BYTE AccelExponentValue[64]; + + DWORD dwEncryptionFrequency; + + DWORD dwURIsize; + WCHAR URIstring[DXVA_MAX_URIsize]; + + BYTE Signature[64]; +} DXVA_EncryptProt1Data_Sign512_Accel512, + *LPDXVA_EncryptProt1Data_Sign512_Accel512; + + +#pragma pack(push, 16) + + +typedef DXVA_MBctrl_I_HostResidDiff_1 * + LPDXVA_MBctrl_I_HostResidDiff_1; + +typedef DXVA_MBctrl_I_OffHostIDCT_1 * + LPDXVA_MBctrl_I_OffHostIDCT_1; + +typedef DXVA_MBctrl_P_HostResidDiff_1 * + LPDXVA_MBctrl_P_HostResidDiff_1; + +typedef DXVA_MBctrl_P_OffHostIDCT_1 * + LPDXVA_MBctrl_P_OffHostIDCT_1; + + +#pragma pack(pop) + +/* + * Other forms of pictures are constructed in the obvious way + * from the above by adjusting the number of residual difference + * blocks, the number of motion vectors per macroblock, etc. + */ + +#define readDXVA_MBskipsFollowing(ptr) (((ptr)->dwMB_SNL & 0xFF000000) >> 24) +#define readDXVA_MBdataLocation(ptr) (((ptr)->dwMB_SNL & 0x00FFFFFF)) + +#define writeDXVA_MB_SNL(ptr, skips, dloc) ((ptr)->dwMB_SNL = (((skips) << 24) | (dloc))) +#define setDXVA_MBskipsFollowing(ptr, skips) ((ptr)->dwMB_SNL |= ((skips) << 24)) +#define setDXVA_MBdataLocation(ptr, dloc) ((ptr)->dwMB_SNL |= (dloc)) + +#define readDXVA_MvertFieldSel_3(ptr) (((ptr)->wMBtype & 0x8000) >> 15) +#define readDXVA_MvertFieldSel_2(ptr) (((ptr)->wMBtype & 0x4000) >> 14) +#define readDXVA_MvertFieldSel_1(ptr) (((ptr)->wMBtype & 0x2000) >> 13) +#define readDXVA_MvertFieldSel_0(ptr) (((ptr)->wMBtype & 0x1000) >> 12) +#define readDXVA_ReservedBits(ptr) (((ptr)->wMBtype & 0x0800) >> 11) +#define readDXVA_HostResidDiff(ptr) (((ptr)->wMBtype & 0x0400) >> 10) +#define readDXVA_MotionType(ptr) (((ptr)->wMBtype & 0x0300) >> 8) +#define readDXVA_MBscanMethod(ptr) (((ptr)->wMBtype & 0x00C0) >> 6) +#define readDXVA_FieldResidual(ptr) (((ptr)->wMBtype & 0x0020) >> 5) +#define readDXVA_H261LoopFilter(ptr) (((ptr)->wMBtype & 0x0010) >> 4) +#define readDXVA_Motion4MV(ptr) (((ptr)->wMBtype & 0x0008) >> 3) +#define readDXVA_MotionBackward(ptr) (((ptr)->wMBtype & 0x0004) >> 2) +#define readDXVA_MotionForward(ptr) (((ptr)->wMBtype & 0x0002) >> 1) +#define readDXVA_IntraMacroblock(ptr) (((ptr)->wMBtype & 0x0001)) + +#define setDXVA_MvertFieldSel_3(ptr) ((ptr)->wMBtype |= 0x8000) +#define setDXVA_MvertFieldSel_2(ptr) ((ptr)->wMBtype |= 0x4000) +#define setDXVA_MvertFieldSel_1(ptr) ((ptr)->wMBtype |= 0x2000) +#define setDXVA_MvertFieldSel_0(ptr) ((ptr)->wMBtype |= 0x1000) +#define setDXVA_ReservedBits(ptr) ((ptr)->wMBtype |= 0x0800) +#define setDXVA_HostResidDiff(ptr) ((ptr)->wMBtype |= 0x0400) +#define setDXVA_MotionType(ptr, value) ((ptr)->wMBtype |= ((value) << 8)) +#define setDXVA_MBscanMethod(ptr, value) ((ptr)->wMBtype |= ((value) << 6)) +#define setDXVA_FieldResidual(ptr) ((ptr)->wMBtype |= 0x0020) +#define setDXVA_H261LoopFilter(ptr) ((ptr)->wMBtype |= 0x0010) +#define setDXVA_Motion4MV(ptr) ((ptr)->wMBtype |= 0x0008) +#define setDXVA_MotionBackward(ptr) ((ptr)->wMBtype |= 0x0004) +#define setDXVA_MotionForward(ptr) ((ptr)->wMBtype |= 0x0002) +#define setDXVA_IntraMacroblock(ptr) ((ptr)->wMBtype |= 0x0001) + +#define readDXVA_Y___0coded(ptr) (((ptr)->wPatternCode & 0x0800) >> 11) +#define readDXVA_Y___1coded(ptr) (((ptr)->wPatternCode & 0x0400) >> 10) +#define readDXVA_Y___2coded(ptr) (((ptr)->wPatternCode & 0x0200) >> 9) +#define readDXVA_Y___3coded(ptr) (((ptr)->wPatternCode & 0x0100) >> 8) +#define readDXVA_Cb__4coded(ptr) (((ptr)->wPatternCode & 0x0080) >> 7) +#define readDXVA_Cr__5coded(ptr) (((ptr)->wPatternCode & 0x0040) >> 6) +#define readDXVA_Cb__6coded(ptr) (((ptr)->wPatternCode & 0x0020) >> 5) +#define readDXVA_Cr__7coded(ptr) (((ptr)->wPatternCode & 0x0010) >> 4) +#define readDXVA_Cb__8coded(ptr) (((ptr)->wPatternCode & 0x0008) >> 3) +#define readDXVA_Cb__9coded(ptr) (((ptr)->wPatternCode & 0x0004) >> 2) +#define readDXVA_Cr_10coded(ptr) (((ptr)->wPatternCode & 0x0002) >> 1) +#define readDXVA_Cr_11coded(ptr) (((ptr)->wPatternCode & 0x0001)) + +#define readDXVA_Y___0oflow(ptr) (((ptr)->wPC_Overflow & 0x0800) >> 11) +#define readDXVA_Y___1oflow(ptr) (((ptr)->wPC_Overflow & 0x0400) >> 10) +#define readDXVA_Y___2oflow(ptr) (((ptr)->wPC_Overflow & 0x0200) >> 9) +#define readDXVA_Y___3oflow(ptr) (((ptr)->wPC_Overflow & 0x0100) >> 8) +#define readDXVA_Cb__4oflow(ptr) (((ptr)->wPC_Overflow & 0x0080) >> 7) +#define readDXVA_Cr__5oflow(ptr) (((ptr)->wPC_Overflow & 0x0040) >> 6) +#define readDXVA_Cb__6oflow(ptr) (((ptr)->wPC_Overflow & 0x0020) >> 5) +#define readDXVA_Cr__7oflow(ptr) (((ptr)->wPC_Overflow & 0x0010) >> 4) +#define readDXVA_Cb__8oflow(ptr) (((ptr)->wPC_Overflow & 0x0008) >> 3) +#define readDXVA_Cb__9oflow(ptr) (((ptr)->wPC_Overflow & 0x0004) >> 2) +#define readDXVA_Cr_10oflow(ptr) (((ptr)->wPC_Overflow & 0x0002) >> 1) +#define readDXVA_Cr_11oflow(ptr) (((ptr)->wPC_Overflow & 0x0001)) + +#pragma pack(pop, BeforeDXVApacking) + +#ifdef __cplusplus +} +#endif + +#endif /* __DIRECTX_VA__ */ diff --git a/windows_libs/mssdk/include/edevdefs.h b/windows_libs/mssdk/include/edevdefs.h new file mode 100644 index 00000000..769e6492 --- /dev/null +++ b/windows_libs/mssdk/include/edevdefs.h @@ -0,0 +1,531 @@ +//------------------------------------------------------------------------------ +// File: EDevDefs.h +// +// Desc: External Device (such as a VCR) control interface parameter and +// value definitions. +// +// Note: new constants added: ED_BASE+800L -> ED_BASE+811L +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __EDEVDEFS__ +#define __EDEVDEFS__ + + +#define ED_BASE 0x1000L + +// this is used to tell the device communications object which +// physical communications port to use. +#define DEV_PORT_SIM 1 +#define DEV_PORT_COM1 2 // standard serial ports +#define DEV_PORT_COM2 3 +#define DEV_PORT_COM3 4 +#define DEV_PORT_COM4 5 +#define DEV_PORT_DIAQ 6 // Diaquest driver +#define DEV_PORT_ARTI 7 // ARTI driver +#define DEV_PORT_1394 8 // IEEE 1394 Bus +#define DEV_PORT_USB 9 // Universal Serial Bus +#define DEV_PORT_MIN DEV_PORT_SIM +#define DEV_PORT_MAX DEV_PORT_USB + + +// IAMExtDevice Capability Items: unless otherwise specified, these items return +// OATRUE or OAFALSE. All return values are in pdwValue unless otherwise specified: + +#define ED_DEVCAP_CAN_RECORD ED_BASE+1L +#define ED_DEVCAP_CAN_RECORD_STROBE ED_BASE+2L // for multitrack devices: + // switches currently recording tracks off + // and selected non-recording tracks into record +#define ED_DEVCAP_HAS_AUDIO ED_BASE+3L +#define ED_DEVCAP_HAS_VIDEO ED_BASE+4L +#define ED_DEVCAP_USES_FILES ED_BASE+5L +#define ED_DEVCAP_CAN_SAVE ED_BASE+6L + +#define ED_DEVCAP_DEVICE_TYPE ED_BASE+7L // returns one of the following: +#define ED_DEVTYPE_VCR ED_BASE+8L +#define ED_DEVTYPE_LASERDISK ED_BASE+9L +#define ED_DEVTYPE_ATR ED_BASE+10L +#define ED_DEVTYPE_DDR ED_BASE+11L +#define ED_DEVTYPE_ROUTER ED_BASE+12L +#define ED_DEVTYPE_KEYER ED_BASE+13L +#define ED_DEVTYPE_MIXER_VIDEO ED_BASE+14L +#define ED_DEVTYPE_DVE ED_BASE+15L +#define ED_DEVTYPE_WIPEGEN ED_BASE+16L +#define ED_DEVTYPE_MIXER_AUDIO ED_BASE+17L +#define ED_DEVTYPE_CG ED_BASE+18L +#define ED_DEVTYPE_TBC ED_BASE+19L +#define ED_DEVTYPE_TCG ED_BASE+20L +#define ED_DEVTYPE_GPI ED_BASE+21L +#define ED_DEVTYPE_JOYSTICK ED_BASE+22L +#define ED_DEVTYPE_KEYBOARD ED_BASE+23L + +// returns mfr-specific ID from external device. +#define ED_DEVCAP_EXTERNAL_DEVICE_ID ED_BASE+24L + +#define ED_DEVCAP_TIMECODE_READ ED_BASE+25L +#define ED_DEVCAP_TIMECODE_WRITE ED_BASE+26L +// used for seekable non-timecode enabled devices +#define ED_DEVCAP_CTLTRK_READ ED_BASE+27L +// used for seekable non-timecode enabled devices +#define ED_DEVCAP_INDEX_READ ED_BASE+28L + +// returns device preroll time in current time format +#define ED_DEVCAP_PREROLL ED_BASE+29L +// returns device postroll time in current time format +#define ED_DEVCAP_POSTROLL ED_BASE+30L + +// returns indication of device’s synchronization accuracy. +#define ED_DEVCAP_SYNC_ACCURACY ED_BASE+31L // returns one of the following: +#define ED_SYNCACC_PRECISE ED_BASE+32L +#define ED_SYNCACC_FRAME ED_BASE+33L +#define ED_SYNCACC_ROUGH ED_BASE+34L + +// returns device’s normal framerate. +#define ED_DEVCAP_NORMAL_RATE ED_BASE+35L // returns one of the following: +#define ED_RATE_24 ED_BASE+36L +#define ED_RATE_25 ED_BASE+37L +#define ED_RATE_2997 ED_BASE+38L +#define ED_RATE_30 ED_BASE+39L + +#define ED_DEVCAP_CAN_PREVIEW ED_BASE+40L +#define ED_DEVCAP_CAN_MONITOR_SOURCES ED_BASE+41L + +// indicates implementation allows testing of methods/parameters by +// setting the hi bit of a parm that makes sense - see individual methods +// for details. +#define ED_DEVCAP_CAN_TEST ED_BASE+42L + +// indicates device accepts video as an input. +#define ED_DEVCAP_VIDEO_INPUTS ED_BASE+43L + +// indicates device accepts audio as an input. +#define ED_DEVCAP_AUDIO_INPUTS ED_BASE+44L + +#define ED_DEVCAP_NEEDS_CALIBRATING ED_BASE+45L + +#define ED_DEVCAP_SEEK_TYPE ED_BASE+46L // returns one of the following: +#define ED_SEEK_PERFECT ED_BASE+47L // indicates device can execute seek + // within 1 video frames without signal + // break (like a DDR) +#define ED_SEEK_FAST ED_BASE+48L // indicates device can move pretty quick + // with short break in signal +#define ED_SEEK_SLOW ED_BASE+49L // seeks like a tape transport + +#define ED_POWER_ON ED_BASE+50L +#define ED_POWER_OFF ED_BASE+51L +#define ED_POWER_STANDBY ED_BASE+52L + +#define ED_ACTIVE ED_BASE+53L +#define ED_INACTIVE ED_BASE+54L +#define ED_ALL ED_BASE+55L +#define ED_TEST ED_BASE+56L + +// IAMExtTransport Capability Items: unless otherwise specified, these items return +// OATRUE or OAFALSE. All return values are in pdwValue unless otherwise specified: + +#define ED_TRANSCAP_CAN_EJECT ED_BASE+100L +#define ED_TRANSCAP_CAN_BUMP_PLAY ED_BASE+101L // variable speed for synchronizing +#define ED_TRANSCAP_CAN_PLAY_BACKWARDS ED_BASE+102L // servo locked for use during an edit +#define ED_TRANSCAP_CAN_SET_EE ED_BASE+103L // show device’s input on its output +#define ED_TRANSCAP_CAN_SET_PB ED_BASE+104L // show media playback on device’s output +#define ED_TRANSCAP_CAN_DELAY_VIDEO_IN ED_BASE+105L // transport can do delayed-in video edits +#define ED_TRANSCAP_CAN_DELAY_VIDEO_OUT ED_BASE+106L // transport can do delayed-out video edits +#define ED_TRANSCAP_CAN_DELAY_AUDIO_IN ED_BASE+107L // transport can do delayed-in audio edits +#define ED_TRANSCAP_CAN_DELAY_AUDIO_OUT ED_BASE+108L // transport can do delayed-out audio edits +#define ED_TRANSCAP_FWD_VARIABLE_MAX ED_BASE+109L // max forward speed (multiple of play speed) + // in pdblValue +#define ED_TRANSCAP_FWD_VARIABLE_MIN ED_BASE+800L // min forward speed (multiple of play speed) + // in pdblValue +#define ED_TRANSCAP_REV_VARIABLE_MAX ED_BASE+110L // max reverse speed (multiple of play speed) in + // pdblValue +#define ED_TRANSCAP_REV_VARIABLE_MIN ED_BASE+801L // min reverse speed (multiple of play speed) + // in pdblValue +#define ED_TRANSCAP_FWD_SHUTTLE_MAX ED_BASE+802L // max forward speed in Shuttle mode (multiple + // of play speed) in pdblValue +#define ED_TRANSCAP_FWD_SHUTTLE_MIN ED_BASE+803L // min forward speed in Shuttle mode (multiple + // of play speed) in pdblValue +#define ED_TRANSCAP_REV_SHUTTLE_MAX ED_BASE+804L // max reverse speed in Shuttle mode (multiple + // of play speed) in pdblValue +#define ED_TRANSCAP_REV_SHUTTLE_MIN ED_BASE+805L // min reverse speed in Shuttle mode (multiple + // of play speed) in pdblValue +#define ED_TRANSCAP_NUM_AUDIO_TRACKS ED_BASE+111L // returns number of audio tracks +#define ED_TRANSCAP_LTC_TRACK ED_BASE+112L // returns track number of LTC timecode track. + // ED_ALL means no dedicated timecode track +#define ED_TRANSCAP_NEEDS_TBC ED_BASE+113L // device’s output not stable +#define ED_TRANSCAP_NEEDS_CUEING ED_BASE+114L // device must be cued prior to performing edit +#define ED_TRANSCAP_CAN_INSERT ED_BASE+115L +#define ED_TRANSCAP_CAN_ASSEMBLE ED_BASE+116L +#define ED_TRANSCAP_FIELD_STEP ED_BASE+117L // device responds to Frame Advance command by + // advancing one field +#define ED_TRANSCAP_CLOCK_INC_RATE ED_BASE+118L // VISCA command - keep for compatibility +#define ED_TRANSCAP_CAN_DETECT_LENGTH ED_BASE+119L +#define ED_TRANSCAP_CAN_FREEZE ED_BASE+120L +#define ED_TRANSCAP_HAS_TUNER ED_BASE+121L +#define ED_TRANSCAP_HAS_TIMER ED_BASE+122L +#define ED_TRANSCAP_HAS_CLOCK ED_BASE+123L +#define ED_TRANSCAP_MULTIPLE_EDITS ED_BASE+806L // OATRUE means device/filter can support + // multiple edit events +#define ED_TRANSCAP_IS_MASTER ED_BASE+807L // OATRUE means device is the master clock + // for synchronizing (this sets timecode-to- + // reference clock offset for editing) +#define ED_TRANSCAP_HAS_DT ED_BASE+814L // OATRUE means device has Dynamic Tracking + +// IAMExtTransport Media States +#define ED_MEDIA_SPIN_UP ED_BASE+130L +#define ED_MEDIA_SPIN_DOWN ED_BASE+131L +#define ED_MEDIA_UNLOAD ED_BASE+132L + +// IAMExtTransport Modes +#define ED_MODE_PLAY ED_BASE+200L +#define ED_MODE_STOP ED_BASE+201L +#define ED_MODE_FREEZE ED_BASE+202L // really "pause" +#define ED_MODE_THAW ED_BASE+203L +#define ED_MODE_FF ED_BASE+204L +#define ED_MODE_REW ED_BASE+205L +#define ED_MODE_RECORD ED_BASE+206L +#define ED_MODE_RECORD_STROBE ED_BASE+207L +#define ED_MODE_RECORD_FREEZE ED_BASE+808L // never "put", only "get" +#define ED_MODE_STEP ED_BASE+208L // same as "jog" +#define ED_MODE_STEP_FWD ED_BASE+208L // same as ED_MODE_STEP +#define ED_MODE_STEP_REV ED_BASE+809L +#define ED_MODE_SHUTTLE ED_BASE+209L +#define ED_MODE_EDIT_CUE ED_BASE+210L +#define ED_MODE_VAR_SPEED ED_BASE+211L +#define ED_MODE_PERFORM ED_BASE+212L // returned status only +#define ED_MODE_LINK_ON ED_BASE+280L +#define ED_MODE_LINK_OFF ED_BASE+281L +#define ED_MODE_NOTIFY_ENABLE ED_BASE+810L +#define ED_MODE_NOTIFY_DISABLE ED_BASE+811L +#define ED_MODE_SHOT_SEARCH ED_BASE+812L + +// IAMTimecodeReader/Generator/Display defines +// +// Timecode Generator Mode params and values: +// +#define ED_TCG_TIMECODE_TYPE ED_BASE+400L // can be one of the following: +#define ED_TCG_SMPTE_LTC ED_BASE+401L +#define ED_TCG_SMPTE_VITC ED_BASE+402L +#define ED_TCG_MIDI_QF ED_BASE+403L +#define ED_TCG_MIDI_FULL ED_BASE+404L + +#define ED_TCG_FRAMERATE ED_BASE+405L // can be one of the following: +#define ED_FORMAT_SMPTE_30 ED_BASE+406L +#define ED_FORMAT_SMPTE_30DROP ED_BASE+407L +#define ED_FORMAT_SMPTE_25 ED_BASE+408L +#define ED_FORMAT_SMPTE_24 ED_BASE+409L + +#define ED_TCG_SYNC_SOURCE ED_BASE+410L // can be one of the following: +#define ED_TCG_VIDEO ED_BASE+411L +#define ED_TCG_READER ED_BASE+412L +#define ED_TCG_FREE ED_BASE+413L + +#define ED_TCG_REFERENCE_SOURCE ED_BASE+414L // can have one these values: + // ED_TCG_FREE || ED_TCG_READER + // (for regen/jamsync) + +// TimeCodeReader Mode params and values: +#define ED_TCR_SOURCE ED_BASE+416L // can be one of the following: +// ED_TCG (already defined) +#define ED_TCR_LTC ED_BASE+417L +#define ED_TCR_VITC ED_BASE+418L +#define ED_TCR_CT ED_BASE+419L // Control Track +#define ED_TCR_FTC ED_BASE+420L // File TimeCode - for file-based devices + // that wish they were transports +// ED_MODE_NOTIFY_ENABLE can be OATRUE or OAFALSE (defined in transport mode +// section of this file). +#define ED_TCR_LAST_VALUE ED_BASE+421L // for notification mode - + // successive calls to GetTimecode + // return the last read value +// TimeCode Display Mode params and values: +// +#define ED_TCD_SOURCE ED_BASE+422L // can be one of the following: +#define ED_TCR ED_BASE+423L +#define ED_TCG ED_BASE+424L + +#define ED_TCD_SIZE ED_BASE+425L // can be one of the following: +#define ED_SMALL ED_BASE+426L +#define ED_MED ED_BASE+427L +#define ED_LARGE ED_BASE+428L + +#define ED_TCD_POSITION ED_BASE+429L // can be one of the following: +#define ED_TOP 0x0001 +#define ED_MIDDLE 0x0002 +#define ED_BOTTOM 0x0004 // or’d with +#define ED_LEFT 0x0100 +#define ED_CENTER 0x0200 +#define ED_RIGHT 0x0400 + +#define ED_TCD_INTENSITY ED_BASE+436L // can be one of the following: +#define ED_HIGH ED_BASE+437L +#define ED_LOW ED_BASE+438L + +#define ED_TCD_TRANSPARENCY ED_BASE+439L // 0-4, 0 is opaque + +#define ED_TCD_INVERT ED_BASE+440L // OATRUE=black on white + // OAFALSE=white on black +// IAMExtTransport defines +// +// Transport status, params and values +// + +// IAMExtTransport Status items and and values: +#define ED_MODE ED_BASE+500L // see ED_MODE_xxx values above +#define ED_ERROR ED_BASE+501L +#define ED_LOCAL ED_BASE+502L +#define ED_RECORD_INHIBIT ED_BASE+503L +#define ED_SERVO_LOCK ED_BASE+504L +#define ED_MEDIA_PRESENT ED_BASE+505L +#define ED_MEDIA_LENGTH ED_BASE+506L +#define ED_MEDIA_SIZE ED_BASE+507L +#define ED_MEDIA_TRACK_COUNT ED_BASE+508L +#define ED_MEDIA_TRACK_LENGTH ED_BASE+509L +#define ED_MEDIA_SIDE ED_BASE+510L + +#define ED_MEDIA_TYPE ED_BASE+511L // can be one of the following: +#define ED_MEDIA_VHS ED_BASE+512L +#define ED_MEDIA_SVHS ED_BASE+513L +#define ED_MEDIA_HI8 ED_BASE+514L +#define ED_MEDIA_UMATIC ED_BASE+515L +#define ED_MEDIA_DVC ED_BASE+516L +#define ED_MEDIA_1_INCH ED_BASE+517L +#define ED_MEDIA_D1 ED_BASE+518L +#define ED_MEDIA_D2 ED_BASE+519L +#define ED_MEDIA_D3 ED_BASE+520L +#define ED_MEDIA_D5 ED_BASE+521L +#define ED_MEDIA_DBETA ED_BASE+522L +#define ED_MEDIA_BETA ED_BASE+523L +#define ED_MEDIA_8MM ED_BASE+524L +#define ED_MEDIA_DDR ED_BASE+525L +#define ED_MEDIA_SX ED_BASE+813L +#define ED_MEDIA_OTHER ED_BASE+526L +#define ED_MEDIA_CLV ED_BASE+527L +#define ED_MEDIA_CAV ED_BASE+528L +#define ED_MEDIA_POSITION ED_BASE+529L + +#define ED_LINK_MODE ED_BASE+530L // OATRUE if transport controls + // are linked to graph's RUN, + // STOP, and PAUSE methods + +// IAMExtTransport Basic Parms +#define ED_TRANSBASIC_TIME_FORMAT ED_BASE+540L // can be one of the following: +#define ED_FORMAT_MILLISECONDS ED_BASE+541L +#define ED_FORMAT_FRAMES ED_BASE+542L +#define ED_FORMAT_REFERENCE_TIME ED_BASE+543L + +#define ED_FORMAT_HMSF ED_BASE+547L +#define ED_FORMAT_TMSF ED_BASE+548L + +#define ED_TRANSBASIC_TIME_REFERENCE ED_BASE+549L // can be one of the following: +#define ED_TIMEREF_TIMECODE ED_BASE+550L +#define ED_TIMEREF_CONTROL_TRACK ED_BASE+551L +#define ED_TIMEREF_INDEX ED_BASE+552L + +#define ED_TRANSBASIC_SUPERIMPOSE ED_BASE+553L // enable/disable onscreen display +#define ED_TRANSBASIC_END_STOP_ACTION ED_BASE+554L // can be one of: ED_MODE_STOP | + // ED_MODE_REWIND | ED_MODE_FREEZE +#define ED_TRANSBASIC_RECORD_FORMAT ED_BASE+555L // can be one of the following: +#define ED_RECORD_FORMAT_SP ED_BASE+556L +#define ED_RECORD_FORMAT_LP ED_BASE+557L +#define ED_RECORD_FORMAT_EP ED_BASE+558L + +#define ED_TRANSBASIC_STEP_COUNT ED_BASE+559L +#define ED_TRANSBASIC_STEP_UNIT ED_BASE+560L // can be one of the following: +#define ED_STEP_FIELD ED_BASE+561L +#define ED_STEP_FRAME ED_BASE+562L +#define ED_STEP_3_2 ED_BASE+563L + +#define ED_TRANSBASIC_PREROLL ED_BASE+564L +#define ED_TRANSBASIC_RECPREROLL ED_BASE+565L +#define ED_TRANSBASIC_POSTROLL ED_BASE+566L +#define ED_TRANSBASIC_EDIT_DELAY ED_BASE+567L +#define ED_TRANSBASIC_PLAYTC_DELAY ED_BASE+568L +#define ED_TRANSBASIC_RECTC_DELAY ED_BASE+569L +#define ED_TRANSBASIC_EDIT_FIELD ED_BASE+570L +#define ED_TRANSBASIC_FRAME_SERVO ED_BASE+571L +#define ED_TRANSBASIC_CF_SERVO ED_BASE+572L +#define ED_TRANSBASIC_SERVO_REF ED_BASE+573L // can be one of the following: +#define ED_REF_EXTERNAL ED_BASE+574L +#define ED_REF_INPUT ED_BASE+575L +#define ED_REF_INTERNAL ED_BASE+576L +#define ED_REF_AUTO ED_BASE+577L + +#define ED_TRANSBASIC_WARN_GL ED_BASE+578L +#define ED_TRANSBASIC_SET_TRACKING ED_BASE+579L // can be one of the following: +#define ED_TRACKING_PLUS ED_BASE+580L +#define ED_TRACKING_MINUS ED_BASE+581L +#define ED_TRACKING_RESET ED_BASE+582L + +#define ED_TRANSBASIC_SET_FREEZE_TIMEOUT ED_BASE+583L +#define ED_TRANSBASIC_VOLUME_NAME ED_BASE+584L +#define ED_TRANSBASIC_BALLISTIC_1 ED_BASE+585L // space for proprietary data +#define ED_TRANSBASIC_BALLISTIC_2 ED_BASE+586L +#define ED_TRANSBASIC_BALLISTIC_3 ED_BASE+587L +#define ED_TRANSBASIC_BALLISTIC_4 ED_BASE+588L +#define ED_TRANSBASIC_BALLISTIC_5 ED_BASE+589L +#define ED_TRANSBASIC_BALLISTIC_6 ED_BASE+590L +#define ED_TRANSBASIC_BALLISTIC_7 ED_BASE+591L +#define ED_TRANSBASIC_BALLISTIC_8 ED_BASE+592L +#define ED_TRANSBASIC_BALLISTIC_9 ED_BASE+593L +#define ED_TRANSBASIC_BALLISTIC_10 ED_BASE+594L +#define ED_TRANSBASIC_BALLISTIC_11 ED_BASE+595L +#define ED_TRANSBASIC_BALLISTIC_12 ED_BASE+596L +#define ED_TRANSBASIC_BALLISTIC_13 ED_BASE+597L +#define ED_TRANSBASIC_BALLISTIC_14 ED_BASE+598L +#define ED_TRANSBASIC_BALLISTIC_15 ED_BASE+599L +#define ED_TRANSBASIC_BALLISTIC_16 ED_BASE+600L +#define ED_TRANSBASIC_BALLISTIC_17 ED_BASE+601L +#define ED_TRANSBASIC_BALLISTIC_18 ED_BASE+602L +#define ED_TRANSBASIC_BALLISTIC_19 ED_BASE+603L +#define ED_TRANSBASIC_BALLISTIC_20 ED_BASE+604L + +// consumer VCR items +#define ED_TRANSBASIC_SETCLOCK ED_BASE+605L +#define ED_TRANSBASIC_SET_COUNTER_FORMAT ED_BASE+606L // uses time format flags +#define ED_TRANSBASIC_SET_COUNTER_VALUE ED_BASE+607L + +#define ED_TRANSBASIC_SETTUNER_CH_UP ED_BASE+608L +#define ED_TRANSBASIC_SETTUNER_CH_DN ED_BASE+609L +#define ED_TRANSBASIC_SETTUNER_SK_UP ED_BASE+610L +#define ED_TRANSBASIC_SETTUNER_SK_DN ED_BASE+611L +#define ED_TRANSBASIC_SETTUNER_CH ED_BASE+612L +#define ED_TRANSBASIC_SETTUNER_NUM ED_BASE+613L + +#define ED_TRANSBASIC_SETTIMER_EVENT ED_BASE+614L +#define ED_TRANSBASIC_SETTIMER_STARTDAY ED_BASE+615L +#define ED_TRANSBASIC_SETTIMER_STARTTIME ED_BASE+616L +#define ED_TRANSBASIC_SETTIMER_STOPDAY ED_BASE+617L +#define ED_TRANSBASIC_SETTIMER_STOPTIME ED_BASE+618L + +// IAMExtTransport video parameters +#define ED_TRANSVIDEO_SET_OUTPUT ED_BASE+630L // can be one of the following: +#define ED_E2E ED_BASE+631L +#define ED_PLAYBACK ED_BASE+632L +#define ED_OFF ED_BASE+633L + +#define ED_TRANSVIDEO_SET_SOURCE ED_BASE+634L + +// IAMExtTransport audio parameters +#define ED_TRANSAUDIO_ENABLE_OUTPUT ED_BASE+640L // can be the following: +#define ED_AUDIO_ALL 0x10000000 // or any of the following OR'd together +#define ED_AUDIO_1 0x0000001L +#define ED_AUDIO_2 0x0000002L +#define ED_AUDIO_3 0x0000004L +#define ED_AUDIO_4 0x0000008L +#define ED_AUDIO_5 0x0000010L +#define ED_AUDIO_6 0x0000020L +#define ED_AUDIO_7 0x0000040L +#define ED_AUDIO_8 0x0000080L +#define ED_AUDIO_9 0x0000100L +#define ED_AUDIO_10 0x0000200L +#define ED_AUDIO_11 0x0000400L +#define ED_AUDIO_12 0x0000800L +#define ED_AUDIO_13 0x0001000L +#define ED_AUDIO_14 0x0002000L +#define ED_AUDIO_15 0x0004000L +#define ED_AUDIO_16 0x0008000L +#define ED_AUDIO_17 0x0010000L +#define ED_AUDIO_18 0x0020000L +#define ED_AUDIO_19 0x0040000L +#define ED_AUDIO_20 0x0080000L +#define ED_AUDIO_21 0x0100000L +#define ED_AUDIO_22 0x0200000L +#define ED_AUDIO_23 0x0400000L +#define ED_AUDIO_24 0x0800000L +#define ED_VIDEO 0x2000000L // for Edit props below + +#define ED_TRANSAUDIO_ENABLE_RECORD ED_BASE+642L +#define ED_TRANSAUDIO_ENABLE_SELSYNC ED_BASE+643L +#define ED_TRANSAUDIO_SET_SOURCE ED_BASE+644L +#define ED_TRANSAUDIO_SET_MONITOR ED_BASE+645L + + +// Edit Property Set-related defs + +// The following values reflect (and control) the state of an +// edit property set +#define ED_INVALID ED_BASE+652L +#define ED_EXECUTING ED_BASE+653L +#define ED_REGISTER ED_BASE+654L +#define ED_DELETE ED_BASE+655L + +// Edit property set parameters and values +#define ED_EDIT_HEVENT ED_BASE+656L // event handle to signal event + // completion +#define ED_EDIT_TEST ED_BASE+657L // returns OAFALSE if filter thinks + // edit can be done, OATRUE if not +#define ED_EDIT_IMMEDIATE ED_BASE+658L // OATRUE means start put the + // device into edit mode (editing + // "on the fly") immediately upon + // execution of Mode(ED_MODE_EDIT_CUE) +#define ED_EDIT_MODE ED_BASE+659L +// can be one of the following values: +#define ED_EDIT_MODE_ASSEMBLE ED_BASE+660L +#define ED_EDIT_MODE_INSERT ED_BASE+661L +#define ED_EDIT_MODE_CRASH_RECORD ED_BASE+662L +#define ED_EDIT_MODE_BOOKMARK_TIME ED_BASE+663L // these two are for +#define ED_EDIT_MODE_BOOKMARK_CHAPTER ED_BASE+664L // laserdisks + +#define ED_EDIT_MASTER ED_BASE+666L // OATRUE causes device + // not to synchronize + +#define ED_EDIT_TRACK ED_BASE+667L +// can be one of the following possible OR'd values: +// ED_VIDEO, ED_AUDIO_1 thru ED_AUDIO_24 (or ED_AUDIO_ALL) + +#define ED_EDIT_SRC_INPOINT ED_BASE+668L // in current time format +#define ED_EDIT_SRC_OUTPOINT ED_BASE+669L // in current time format +#define ED_EDIT_REC_INPOINT ED_BASE+670L // in current time format +#define ED_EDIT_REC_OUTPOINT ED_BASE+671L // in current time format + +#define ED_EDIT_REHEARSE_MODE ED_BASE+672L +// can be one of the following possible values: +#define ED_EDIT_BVB ED_BASE+673L // means rehearse the edit with + // "black-video-black" +#define ED_EDIT_VBV ED_BASE+674L +#define ED_EDIT_VVV ED_BASE+675L +#define ED_EDIT_PERFORM ED_BASE+676L // means perform the edit with no + // rehearsal. + +// Set this property to OATRUE to kill the edit if in progress +#define ED_EDIT_ABORT ED_BASE+677L +// how long to wait for edit to complete +#define ED_EDIT_TIMEOUT ED_BASE+678L // in current time format + +// This property causes the device to seek to a point specified by +// ED_EDIT_SEEK_MODE (see below). NOTE: Only one event at a time can seek. +#define ED_EDIT_SEEK ED_BASE+679L // OATRUE means do it now. +#define ED_EDIT_SEEK_MODE ED_BASE+680L +//possible values: +#define ED_EDIT_SEEK_EDIT_IN ED_BASE+681L // seek to edit's inpoint +#define ED_EDIT_SEEK_EDIT_OUT ED_BASE+682L // seek to edit's outpoint +#define ED_EDIT_SEEK_PREROLL ED_BASE+683L // seek to edit's + // inpoint-preroll +#define ED_EDIT_SEEK_PREROLL_CT ED_BASE+684L // seek to preroll point + // using control track (used for tapes with + // discontinuoustimecode before edit point: seek + // to inpoint using timecode, then backup to + // preroll point using control track) +#define ED_EDIT_SEEK_BOOKMARK ED_BASE+685L // seek to bookmark (just like + // timecode search) +// This property is used for multiple-VCR systems where each machine must +// cue to a different location relative to the graph's reference clock. The +// basic idea is that an edit event is setup with an ED_EDIT_OFFSET property +// that tells the VCR what offset to maintain between it's timecode (converted +// to reference clock units) and the reference clock. +#define ED_EDIT_OFFSET ED_BASE+686L // in current time format + +#define ED_EDIT_PREREAD ED_BASE+815L // OATRUE means device supports + // pre-read (recorder can also be + // player + +// +// Some error codes: +// +// device could be in local mode +#define ED_ERR_DEVICE_NOT_READY ED_BASE+700L + +#endif // __EDEVDEFS__ + +// eof edevdefs.h diff --git a/windows_libs/mssdk/include/errors.h b/windows_libs/mssdk/include/errors.h new file mode 100644 index 00000000..2c6812f2 --- /dev/null +++ b/windows_libs/mssdk/include/errors.h @@ -0,0 +1,47 @@ +//------------------------------------------------------------------------------ +// File: Errors.h +// +// Desc: ActiveMovie error defines. +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __ERRORS__ +#define __ERRORS__ + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +#ifndef _AMOVIE_ +#define AMOVIEAPI DECLSPEC_IMPORT +#else +#define AMOVIEAPI +#endif + +// codes 0-01ff are reserved for OLE +#define VFW_FIRST_CODE 0x200 +#define MAX_ERROR_TEXT_LEN 160 + +#include // includes all message definitions + +typedef BOOL (WINAPI* AMGETERRORTEXTPROCA)(HRESULT, char *, DWORD); +typedef BOOL (WINAPI* AMGETERRORTEXTPROCW)(HRESULT, WCHAR *, DWORD); + +AMOVIEAPI DWORD WINAPI AMGetErrorTextA( HRESULT hr , char *pbuffer , DWORD MaxLen); +AMOVIEAPI DWORD WINAPI AMGetErrorTextW( HRESULT hr , WCHAR *pbuffer , DWORD MaxLen); + + +#ifdef UNICODE +#define AMGetErrorText AMGetErrorTextW +typedef AMGETERRORTEXTPROCW AMGETERRORTEXTPROC; +#else +#define AMGetErrorText AMGetErrorTextA +typedef AMGETERRORTEXTPROCA AMGETERRORTEXTPROC; +#endif + +#ifdef __cplusplus +} +#endif // __cplusplus +#endif // __ERRORS__ diff --git a/windows_libs/mssdk/include/evcode.h b/windows_libs/mssdk/include/evcode.h new file mode 100644 index 00000000..4d63daf4 --- /dev/null +++ b/windows_libs/mssdk/include/evcode.h @@ -0,0 +1,342 @@ +//------------------------------------------------------------------------------ +// File: EvCode.h +// +// Desc: List of standard Quartz event codes and the expected params. +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +// Event codes are broken into two groups +// -- system event codes +// -- extension event codes +// All system event codes are below EC_USER + +#define EC_SYSTEMBASE 0x00 +#define EC_USER 0x8000 + +// System-defined event codes +// ========================== +// +// There are three types of system-defined event codes: +// +// 1. Those which are always passed through to the application +// (To be collected by calls to GetEvent or within WaitForCompletion.) +// (e.g. EC_ERRORABORT, EC_USERABORT.) +// +// 2. Those which are pure internal and will never be passed to +// the application. (e.g. EC_SHUTDOWN) +// +// 3. Those which have default handling. Default handing implies that +// the event is not passed to the application. However, default +// handling may be canceled by calling +// IMediaEvent::CancelDefaultHandling. If the default handling is +// cancelled in this way, then the message will be delivered to the +// application and the application must action it appropriately. +// Default handling can be restored by calling RestoreDefaultHandling. +// +// We will refer to these events as application, internal and defaulted +// events respectively. +// +// System-defined events may have interface pointers, BSTR's, etc passed +// as parameters. It is therefore essential that, for any message +// retrieved using GetEvent, a matching call to FreeEventParams is made +// to ensure that relevant interfaces are released and storage freed. +// Failure to call FreeEventParams will result in memory leaks, if not +// worse. +// +// Filters sending these messages to the filter graph should not AddRef() +// any interfaces that they may pass as parameters. The filter graph +// manager will AddRef them if required. E.g. if the event is to be queued +// for the application or queued to a worker thread. + +// Each event listed below is immediately followed by a parameter list +// detailing the types of the parameters associated with the message, +// and an indication of whether the message is an application, internal +// or defaulted message. This is then followed by a short description. +// The use of "void" in the parameter list implies that the parameter is not +// used. Such parameters should be zero. + +// Other defined EC_ regions: +// DVD event codes 0x0100 - 0x0150 (dvdevcod.h) +// audio device event codes 0x0200 - 0x0250 (audevcod.h) +// WindowsMedia SDK-originated events 0x0251 - 0x0300 (see below) + +#define EC_COMPLETE 0x01 +// ( HRESULT, void ) : defaulted (special) +// Signals the completed playback of a stream within the graph. This message +// is sent by renderers when they receive end-of-stream. The default handling +// of this message results in a _SINGLE_ EC_COMPLETE being sent to the +// application when ALL of the individual renderers have signaled EC_COMPLETE +// to the filter graph. If the default handing is canceled, the application +// will see all of the individual EC_COMPLETEs. + + +#define EC_USERABORT 0x02 +// ( void, void ) : application +// In some sense, the user has requested that playback be terminated. +// This message is typically sent by renderers that render into a +// window if the user closes the window into which it was rendering. +// It is up to the application to decide if playback should actually +// be stopped. + + +#define EC_ERRORABORT 0x03 +// ( HRESULT, void ) : application +// Operation aborted because of error + + +#define EC_TIME 0x04 +// ( DWORD, DWORD ) : application +// The requested reference time occurred. (This event is currently not used). +// lParam1 is low dword of ref time, lParam2 is high dword of reftime. + + +#define EC_REPAINT 0x05 +// ( IPin * (could be NULL), void ) : defaulted +// A repaint is required - lParam1 contains the (IPin *) that needs the data +// to be sent again. Default handling is: if the output pin which the IPin is +// attached to supports the IMediaEventSink interface then it will be called +// with the EC_REPAINT first. If that fails then normal repaint processing is +// done by the filter graph. + + +// Stream error notifications +#define EC_STREAM_ERROR_STOPPED 0x06 +#define EC_STREAM_ERROR_STILLPLAYING 0x07 +// ( HRESULT, DWORD ) : application +// lParam 1 is major code, lParam2 is minor code, either may be zero. + + +#define EC_ERROR_STILLPLAYING 0x08 +// ( HRESULT, void ) : application +// The filter graph manager may issue Run's to the graph asynchronously. +// If such a Run fails, EC_ERROR_STILLPLAYING is issued to notify the +// application of the failure. The state of the underlying filters +// at such a time will be indeterminate - they will all have been asked +// to run, but some are almost certainly not. + + +#define EC_PALETTE_CHANGED 0x09 +// ( void, void ) : application +// notify application that the video palette has changed + + +#define EC_VIDEO_SIZE_CHANGED 0x0A +// ( DWORD, void ) : application +// Sent by video renderers. +// Notifies the application that the native video size has changed. +// LOWORD of the DWORD is the new width, HIWORD is the new height. + + +#define EC_QUALITY_CHANGE 0x0B +// ( void, void ) : application +// Notify application that playback degradation has occurred + + +#define EC_SHUTTING_DOWN 0x0C +// ( void, void ) : internal +// This message is sent by the filter graph manager to any plug-in +// distributors which support IMediaEventSink to notify them that +// the filter graph is starting to shutdown. + + +#define EC_CLOCK_CHANGED 0x0D +// ( void, void ) : application +// Notify application that the clock has changed. +// (i.e. SetSyncSource has been called on the filter graph and has been +// distributed successfully to the filters in the graph.) + + +#define EC_PAUSED 0x0E +// ( HRESULT, void ) : application +// Notify application the previous pause request has completed + + +#define EC_OPENING_FILE 0x10 +#define EC_BUFFERING_DATA 0x11 +// ( BOOL, void ) : application +// lParam1 == 1 --> starting to open file or buffer data +// lParam1 == 0 --> not opening or buffering any more +// (This event does not appear to be used by ActiveMovie.) + + +#define EC_FULLSCREEN_LOST 0x12 +// ( void, IBaseFilter * ) : application +// Sent by full screen renderers when switched away from full screen. +// IBaseFilter may be NULL. + + +#define EC_ACTIVATE 0x13 +// ( BOOL, IBaseFilter * ) : internal +// Sent by video renderers when they lose or gain activation. +// lParam1 is set to 1 if gained or 0 if lost +// lParam2 is the IBaseFilter* for the filter that is sending the message +// Used for sound follows focus and full-screen switching + + +#define EC_NEED_RESTART 0x14 +// ( void, void ) : defaulted +// Sent by renderers when they regain a resource (e.g. audio renderer). +// Causes a restart by Pause/put_Current/Run (if running). + + +#define EC_WINDOW_DESTROYED 0x15 +// ( IBaseFilter *, void ) : internal +// Sent by video renderers when the window has been destroyed. Handled +// by the filter graph / distributor telling the resource manager. +// lParam1 is the IBaseFilter* of the filter whose window is being destroyed + + +#define EC_DISPLAY_CHANGED 0x16 +// ( IPin *, void ) : internal +// Sent by renderers when they detect a display change. the filter graph +// will arrange for the graph to be stopped and the pin send in lParam1 +// to be reconnected. by being reconnected it allows a renderer to reset +// and connect with a more appropriate format for the new display mode +// lParam1 contains an (IPin *) that should be reconnected by the graph + + +#define EC_STARVATION 0x17 +// ( void, void ) : defaulted +// Sent by a filter when it detects starvation. Default handling (only when +// running) is for the graph to be paused until all filters enter the +// paused state and then run. Normally this would be sent by a parser or source +// filter when too little data is arriving. + + +#define EC_OLE_EVENT 0x18 +// ( BSTR, BSTR ) : application +// Sent by a filter to pass a text string to the application. +// Conventionally, the first string is a type, and the second a parameter. + + +#define EC_NOTIFY_WINDOW 0x19 +// ( HWND, void ) : internal +// Pass the window handle around during pin connection. + +#define EC_STREAM_CONTROL_STOPPED 0x1A +// ( IPin * pSender, DWORD dwCookie ) +// Notification that an earlier call to IAMStreamControl::StopAt +// has now take effect. Calls to the method can be marked +// with a cookie which is passed back in the second parameter, +// allowing applications to easily tie together request +// and completion notifications. +// +// NB: IPin will point to the pin that actioned the Stop. This +// may not be the pin that the StopAt was sent to. + +#define EC_STREAM_CONTROL_STARTED 0x1B +// ( IPin * pSender, DWORD dwCookie ) +// Notification that an earlier call to IAMStreamControl::StartAt +// has now take effect. Calls to the method can be marked +// with a cookie which is passed back in the second parameter, +// allowing applications to easily tie together request +// and completion notifications. +// +// NB: IPin will point to the pin that actioned the Start. This +// may not be the pin that the StartAt was sent to. + +#define EC_END_OF_SEGMENT 0x1C +// +// ( const REFERENCE_TIME *pStreamTimeAtEndOfSegment, DWORD dwSegmentNumber ) +// +// pStreamTimeAtEndOfSegment +// pointer to the accumulated stream clock +// time since the start of the segment - this is directly computable +// as the sum of the previous and current segment durations (Stop - Start) +// and the rate applied to each segment +// The source add this time to the time within each segment to get +// a total elapsed time +// +// dwSegmentNumber +// Segment number - starts at 0 +// +// Notifies that a segment end has been reached when the +// AM_SEEKING_Segment flags was set for IMediaSeeking::SetPositions +// Passes in an IMediaSeeking interface to allow the next segment +// to be defined by the application + +#define EC_SEGMENT_STARTED 0x1D +// +// ( const REFERENCE_TIME *pStreamTimeAtStartOfSegment, DWORD dwSegmentNumber) +// +// pStreamTimeAtStartOfSegment +// pointer to the accumulated stream clock +// time since the start of the segment - this is directly computable +// as the sum of the previous segment durations (Stop - Start) +// and the rate applied to each segment +// +// dwSegmentNumber +// Segment number - starts at 0 +// +// Notifies that a new segment has been started. +// This is sent synchronously by any entity that will issue +// EC_END_OF_SEGMENT when a new segment is started +// (See IMediaSeeking::SetPositions - AM_SEEKING_Segment flag) +// It is used to compute how many EC_END_OF_SEGMENT notifications +// to expect at the end of a segment and as a consitency check + +#define EC_LENGTH_CHANGED 0x1E +// (void, void) +// sent to indicate that the length of the "file" has changed + +#define EC_DEVICE_LOST 0x1f +// (IUnknown, 0) +// +// request window notification when the device is available again +// (through WM_DEVICECHANGED messages registered with +// RegisterDeviceNotification; see IAMDeviceRemoval interface) + +#define EC_STEP_COMPLETE 0x24 +// (BOOL bCacelled, void) +// Step request complete +// if bCancelled is TRUE the step was cancelled. This can happen +// if the application issued some control request or because there +// was a mode change etc etc + + +#define EC_SKIP_FRAMES 0x25 +// ( nFramesToSkip, void ) : internal +// Get the filter graph to seek accuratley. + +#define EC_TIMECODE_AVAILABLE 0x30 +// Sent by filter supporting timecode +// Param1 has a pointer to the sending object +// Param2 has the device ID of the sending object + +#define EC_EXTDEVICE_MODE_CHANGE 0x31 +// Sent by filter supporting IAMExtDevice +// Param1 has the new mode +// Param2 has the device ID of the sending object + +#define EC_GRAPH_CHANGED 0x50 +// Sent by filter to notify interesting graph changes + +#define EC_CLOCK_UNSET 0x51 +// ( void, void ) : application +// Used to notify the filter graph to unset the current graph clock. +// Has the affect of forcing the filter graph to reestablish the graph clock +// on the next Pause/Run (note that this is only used by ksproxy, when the pin +// of a clock providing filter is disconnected) + + +//------------------------------------------ +// +// WindowsMedia SDK filter-specific events: +// +#define EC_WMT_EVENT_BASE 0x0251 +// +#define EC_WMT_INDEX_EVENT EC_WMT_EVENT_BASE +// WindowsMedia SDK-originated file indexing status, sent by WMSDK-based filters +// +// lParam1 is one of the enum WMT_STATUS messages listed below, sent by the WindowsMedia SDK +// lParam2 is specific to the lParam event +// +// the following WMT_STATUS messages are sent for this event: +// WMT_STARTED - lParam2 is 0 +// WMT_CLOSED - lParam2 is 0 +// WMT_INDEX_PROGRESS - lParam2 is a DWORD containing the progress percent complete +// +// end WMSDK-originated events +//----------------------------------------- diff --git a/windows_libs/mssdk/include/il21dec.h b/windows_libs/mssdk/include/il21dec.h new file mode 100644 index 00000000..5270256c --- /dev/null +++ b/windows_libs/mssdk/include/il21dec.h @@ -0,0 +1,112 @@ +//------------------------------------------------------------------------------ +// File: IL21Dec.h +// +// Desc: Line 21 Decoder related definitions and interfaces for ActiveMovie. +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __IL21DEC__ +#define __IL21DEC__ + + +// +// Some enum data types used as line 21 decoder params by the interface +// +typedef enum _AM_LINE21_CCLEVEL { // should we use TC1, TC2 in stead? + AM_L21_CCLEVEL_TC2 = 0 +} AM_LINE21_CCLEVEL, *PAM_LINE21_CCLEVEL ; + +typedef enum _AM_LINE21_CCSERVICE { + AM_L21_CCSERVICE_None = 0, + AM_L21_CCSERVICE_Caption1, + AM_L21_CCSERVICE_Caption2, + AM_L21_CCSERVICE_Text1, + AM_L21_CCSERVICE_Text2, + AM_L21_CCSERVICE_XDS, + AM_L21_CCSERVICE_DefChannel = 10, + AM_L21_CCSERVICE_Invalid +} AM_LINE21_CCSERVICE, *PAM_LINE21_CCSERVICE ; + +typedef enum _AM_LINE21_CCSTATE { + AM_L21_CCSTATE_Off = 0, + AM_L21_CCSTATE_On +} AM_LINE21_CCSTATE, *PAM_LINE21_CCSTATE ; + +typedef enum _AM_LINE21_CCSTYLE { + AM_L21_CCSTYLE_None = 0, + AM_L21_CCSTYLE_PopOn, + AM_L21_CCSTYLE_PaintOn, + AM_L21_CCSTYLE_RollUp +} AM_LINE21_CCSTYLE, *PAM_LINE21_CCSTYLE ; + +typedef enum _AM_LINE21_DRAWBGMODE { + AM_L21_DRAWBGMODE_Opaque, + AM_L21_DRAWBGMODE_Transparent +} AM_LINE21_DRAWBGMODE, *PAM_LINE21_DRAWBGMODE ; + + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// +// Line 21 Decoder standard COM interface +// +DECLARE_INTERFACE_(IAMLine21Decoder, IUnknown) +{ + public: + // + // Decoder options to be used by apps + // + + // What is the decoder's level + STDMETHOD(GetDecoderLevel)(THIS_ AM_LINE21_CCLEVEL *lpLevel) PURE ; + // supported level value is AM_L21Level_TC2 only + // skipping the SetDecoderLevel( ) + + // Which of the services is being currently used + STDMETHOD(GetCurrentService)(THIS_ AM_LINE21_CCSERVICE *lpService) PURE ; + STDMETHOD(SetCurrentService)(THIS_ AM_LINE21_CCSERVICE Service) PURE ; + // supported service values are AM_L21Service_Caption1, + // AM_L21Service_Caption2, AM_L21Service_Text1, AM_L21Service_Text2, + // AM_L21Service_XDS, AM_L21Service_None) + + // Query/Set the service state (On/Off) + // supported state values are AM_L21State_On and AM_L21State_Off + STDMETHOD(GetServiceState)(THIS_ AM_LINE21_CCSTATE *lpState) PURE ; + STDMETHOD(SetServiceState)(THIS_ AM_LINE21_CCSTATE State) PURE ; + + // + // Output options to be used by downstream filters + // + + // What size, bitdepth etc should the output video be + STDMETHOD(GetOutputFormat)(THIS_ LPBITMAPINFOHEADER lpbmih) PURE ; + // GetOutputFormat() method, if successful, returns + // 1. S_FALSE if no output format has so far been defined by downstream filters + // 2. S_OK if an output format has already been defined by downstream filters + STDMETHOD(SetOutputFormat)(THIS_ LPBITMAPINFO lpbmi) PURE ; + + // Specify physical color to be used in colorkeying the background + // for overlay mixing + STDMETHOD(GetBackgroundColor)(THIS_ DWORD *pdwPhysColor) PURE ; + STDMETHOD(SetBackgroundColor)(THIS_ DWORD dwPhysColor) PURE ; + + // Specify if whole output bitmap should be redrawn for each sample + STDMETHOD(GetRedrawAlways)(THIS_ LPBOOL lpbOption) PURE ; + STDMETHOD(SetRedrawAlways)(THIS_ BOOL bOption) PURE ; + + // Specify if the caption text background should be opaque/transparent + STDMETHOD(GetDrawBackgroundMode)(THIS_ AM_LINE21_DRAWBGMODE *lpMode) PURE ; + STDMETHOD(SetDrawBackgroundMode)(THIS_ AM_LINE21_DRAWBGMODE Mode) PURE ; + // supported mode values are AM_L21_DrawBGMode_Opaque and + // AM_L21_DrawBGMode_Transparent + +} ; + +#ifdef __cplusplus +} +#endif // __cplusplus +#endif // __IL21DEC__ diff --git a/windows_libs/mssdk/include/ks.h b/windows_libs/mssdk/include/ks.h new file mode 100644 index 00000000..8331c582 --- /dev/null +++ b/windows_libs/mssdk/include/ks.h @@ -0,0 +1,5633 @@ +/*++ + +Copyright (C) Microsoft Corporation, 1996 - 1999 + +Module Name: + + ks.h + +Abstract: + + Windows Driver Model/Connection and Streaming Architecture (WDM-CSA) + core definitions. + +--*/ + +#if !defined(_KS_) +#define _KS_ + +#if defined(__TCS__) +#define _KS_NO_ANONYMOUS_STRUCTURES_ 1 +#endif + +#if !defined(_NTRTL_) + #ifndef DEFINE_GUIDEX + #define DEFINE_GUIDEX(name) EXTERN_C const CDECL GUID name + #endif // !defined(DEFINE_GUIDEX) + + #ifndef STATICGUIDOF + #define STATICGUIDOF(guid) STATIC_##guid + #endif // !defined(STATICGUIDOF) +#endif // !defined(_NTRTL_) + +#ifndef SIZEOF_ARRAY + #define SIZEOF_ARRAY(ar) (sizeof(ar)/sizeof((ar)[0])) +#endif // !defined(SIZEOF_ARRAY) + +#if defined(__cplusplus) && _MSC_VER >= 1100 +#define DEFINE_GUIDSTRUCT(g, n) struct __declspec(uuid(g)) n +#define DEFINE_GUIDNAMED(n) __uuidof(struct n) +#else // !defined(__cplusplus) +#define DEFINE_GUIDSTRUCT(g, n) DEFINE_GUIDEX(n) +#define DEFINE_GUIDNAMED(n) n +#endif // !defined(__cplusplus) + +//=========================================================================== + +#define STATIC_GUID_NULL \ + 0x00000000L, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + +DEFINE_GUIDSTRUCT("00000000-0000-0000-0000-000000000000", GUID_NULL); +#define GUID_NULL DEFINE_GUIDNAMED(GUID_NULL) + +//=========================================================================== + +#define IOCTL_KS_PROPERTY CTL_CODE(FILE_DEVICE_KS, 0x000, METHOD_NEITHER, FILE_ANY_ACCESS) +#define IOCTL_KS_ENABLE_EVENT CTL_CODE(FILE_DEVICE_KS, 0x001, METHOD_NEITHER, FILE_ANY_ACCESS) +#define IOCTL_KS_DISABLE_EVENT CTL_CODE(FILE_DEVICE_KS, 0x002, METHOD_NEITHER, FILE_ANY_ACCESS) +#define IOCTL_KS_METHOD CTL_CODE(FILE_DEVICE_KS, 0x003, METHOD_NEITHER, FILE_ANY_ACCESS) +#define IOCTL_KS_WRITE_STREAM CTL_CODE(FILE_DEVICE_KS, 0x004, METHOD_NEITHER, FILE_WRITE_ACCESS) +#define IOCTL_KS_READ_STREAM CTL_CODE(FILE_DEVICE_KS, 0x005, METHOD_NEITHER, FILE_READ_ACCESS) +#define IOCTL_KS_RESET_STATE CTL_CODE(FILE_DEVICE_KS, 0x006, METHOD_NEITHER, FILE_ANY_ACCESS) + +//=========================================================================== + +typedef enum { + KSRESET_BEGIN, + KSRESET_END +} KSRESET; + +typedef enum { + KSSTATE_STOP, + KSSTATE_ACQUIRE, + KSSTATE_PAUSE, + KSSTATE_RUN +} KSSTATE, *PKSSTATE; + +#define KSPRIORITY_LOW 0x00000001 +#define KSPRIORITY_NORMAL 0x40000000 +#define KSPRIORITY_HIGH 0x80000000 +#define KSPRIORITY_EXCLUSIVE 0xFFFFFFFF + +typedef struct { + ULONG PriorityClass; + ULONG PrioritySubClass; +} KSPRIORITY, *PKSPRIORITY; + +typedef struct { + union { +#if defined( _KS_NO_ANONYMOUS_STRUCTURES_ ) + struct _IDENTIFIER { +#else + struct { +#endif + GUID Set; + ULONG Id; + ULONG Flags; + }; + LONGLONG Alignment; + }; +} KSIDENTIFIER, *PKSIDENTIFIER; + +typedef KSIDENTIFIER KSPROPERTY, *PKSPROPERTY, KSMETHOD, *PKSMETHOD, KSEVENT, *PKSEVENT; + +#define KSMETHOD_TYPE_NONE 0x00000000 +#define KSMETHOD_TYPE_READ 0x00000001 +#define KSMETHOD_TYPE_WRITE 0x00000002 +#define KSMETHOD_TYPE_MODIFY 0x00000003 +#define KSMETHOD_TYPE_SOURCE 0x00000004 + +#define KSMETHOD_TYPE_SEND 0x00000001 +#define KSMETHOD_TYPE_SETSUPPORT 0x00000100 +#define KSMETHOD_TYPE_BASICSUPPORT 0x00000200 + +#define KSMETHOD_TYPE_TOPOLOGY 0x10000000 + +#define KSPROPERTY_TYPE_GET 0x00000001 +#define KSPROPERTY_TYPE_SET 0x00000002 +#define KSPROPERTY_TYPE_SETSUPPORT 0x00000100 +#define KSPROPERTY_TYPE_BASICSUPPORT 0x00000200 +#define KSPROPERTY_TYPE_RELATIONS 0x00000400 +#define KSPROPERTY_TYPE_SERIALIZESET 0x00000800 +#define KSPROPERTY_TYPE_UNSERIALIZESET 0x00001000 +#define KSPROPERTY_TYPE_SERIALIZERAW 0x00002000 +#define KSPROPERTY_TYPE_UNSERIALIZERAW 0x00004000 +#define KSPROPERTY_TYPE_SERIALIZESIZE 0x00008000 +#define KSPROPERTY_TYPE_DEFAULTVALUES 0x00010000 + +#define KSPROPERTY_TYPE_TOPOLOGY 0x10000000 + +typedef struct { + KSPROPERTY Property; + ULONG NodeId; + ULONG Reserved; +} KSP_NODE, *PKSP_NODE; + +typedef struct { + KSMETHOD Method; + ULONG NodeId; + ULONG Reserved; +} KSM_NODE, *PKSM_NODE; + +typedef struct { + KSEVENT Event; + ULONG NodeId; + ULONG Reserved; +} KSE_NODE, *PKSE_NODE; + +#define STATIC_KSPROPTYPESETID_General \ + 0x97E99BA0L, 0xBDEA, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("97E99BA0-BDEA-11CF-A5D6-28DB04C10000", KSPROPTYPESETID_General); +#define KSPROPTYPESETID_General DEFINE_GUIDNAMED(KSPROPTYPESETID_General) + +#if defined(_NTDDK_) && !defined(__wtypes_h__) +enum VARENUM { + VT_EMPTY = 0, + VT_NULL = 1, + VT_I2 = 2, + VT_I4 = 3, + VT_R4 = 4, + VT_R8 = 5, + VT_CY = 6, + VT_DATE = 7, + VT_BSTR = 8, + VT_DISPATCH = 9, + VT_ERROR = 10, + VT_BOOL = 11, + VT_VARIANT = 12, + VT_UNKNOWN = 13, + VT_DECIMAL = 14, + VT_I1 = 16, + VT_UI1 = 17, + VT_UI2 = 18, + VT_UI4 = 19, + VT_I8 = 20, + VT_UI8 = 21, + VT_INT = 22, + VT_UINT = 23, + VT_VOID = 24, + VT_HRESULT = 25, + VT_PTR = 26, + VT_SAFEARRAY = 27, + VT_CARRAY = 28, + VT_USERDEFINED = 29, + VT_LPSTR = 30, + VT_LPWSTR = 31, + VT_FILETIME = 64, + VT_BLOB = 65, + VT_STREAM = 66, + VT_STORAGE = 67, + VT_STREAMED_OBJECT = 68, + VT_STORED_OBJECT = 69, + VT_BLOB_OBJECT = 70, + VT_CF = 71, + VT_CLSID = 72, + VT_VECTOR = 0x1000, + VT_ARRAY = 0x2000, + VT_BYREF = 0x4000, + VT_RESERVED = 0x8000, + VT_ILLEGAL = 0xffff, + VT_ILLEGALMASKED = 0xfff, + VT_TYPEMASK = 0xfff +}; +#endif // _NTDDK_ && !__wtypes_h__ + +typedef struct { + ULONG Size; + ULONG Count; +} KSMULTIPLE_ITEM, *PKSMULTIPLE_ITEM; + +typedef struct { + ULONG AccessFlags; + ULONG DescriptionSize; + KSIDENTIFIER PropTypeSet; + ULONG MembersListCount; + ULONG Reserved; +} KSPROPERTY_DESCRIPTION, *PKSPROPERTY_DESCRIPTION; + +#define KSPROPERTY_MEMBER_RANGES 0x00000001 +#define KSPROPERTY_MEMBER_STEPPEDRANGES 0x00000002 +#define KSPROPERTY_MEMBER_VALUES 0x00000003 + +#define KSPROPERTY_MEMBER_FLAG_DEFAULT 0x00000001 + +typedef struct { + ULONG MembersFlags; + ULONG MembersSize; + ULONG MembersCount; + ULONG Flags; +} KSPROPERTY_MEMBERSHEADER, *PKSPROPERTY_MEMBERSHEADER; + +typedef union { +#if defined( _KS_NO_ANONYMOUS_STRUCTURES_ ) + struct _SIGNED { +#else + struct { +#endif + LONG SignedMinimum; + LONG SignedMaximum; + }; +#if defined( _KS_NO_ANONYMOUS_STRUCTURES_ ) + struct _UNSIGNED { +#else + struct { +#endif + ULONG UnsignedMinimum; + ULONG UnsignedMaximum; + }; +} KSPROPERTY_BOUNDS_LONG, *PKSPROPERTY_BOUNDS_LONG; + +typedef union { +#if defined( _KS_NO_ANONYMOUS_STRUCTURES_ ) + struct _SIGNED64 { +#else + struct { +#endif + LONGLONG SignedMinimum; + LONGLONG SignedMaximum; + }; +#if defined( _KS_NO_ANONYMOUS_STRUCTURES_ ) + struct _UNSIGNED64 { +#else + struct { +#endif +#if defined(_NTDDK_) + ULONGLONG UnsignedMinimum; + ULONGLONG UnsignedMaximum; +#else // !_NTDDK_ + DWORDLONG UnsignedMinimum; + DWORDLONG UnsignedMaximum; +#endif // !_NTDDK_ + }; +} KSPROPERTY_BOUNDS_LONGLONG, *PKSPROPERTY_BOUNDS_LONGLONG; + +typedef struct { + ULONG SteppingDelta; + ULONG Reserved; + KSPROPERTY_BOUNDS_LONG Bounds; +} KSPROPERTY_STEPPING_LONG, *PKSPROPERTY_STEPPING_LONG; + +typedef struct { +#if defined(_NTDDK_) + ULONGLONG SteppingDelta; +#else // !_NTDDK_ + DWORDLONG SteppingDelta; +#endif // !_NTDDK_ + KSPROPERTY_BOUNDS_LONGLONG Bounds; +} KSPROPERTY_STEPPING_LONGLONG, *PKSPROPERTY_STEPPING_LONGLONG; + +//=========================================================================== + +#if defined(_NTDDK_) +// +// Structure forward declarations. +// +typedef struct _KSDEVICE_DESCRIPTOR +KSDEVICE_DESCRIPTOR, *PKSDEVICE_DESCRIPTOR; +typedef struct _KSDEVICE_DISPATCH +KSDEVICE_DISPATCH, *PKSDEVICE_DISPATCH; +typedef struct _KSDEVICE +KSDEVICE, *PKSDEVICE; +typedef struct _KSFILTERFACTORY +KSFILTERFACTORY, *PKSFILTERFACTORY; +typedef struct _KSFILTER_DESCRIPTOR +KSFILTER_DESCRIPTOR, *PKSFILTER_DESCRIPTOR; +typedef struct _KSFILTER_DISPATCH +KSFILTER_DISPATCH, *PKSFILTER_DISPATCH; +typedef struct _KSFILTER +KSFILTER, *PKSFILTER; +typedef struct _KSPIN_DESCRIPTOR_EX +KSPIN_DESCRIPTOR_EX, *PKSPIN_DESCRIPTOR_EX; +typedef struct _KSPIN_DISPATCH +KSPIN_DISPATCH, *PKSPIN_DISPATCH; +typedef struct _KSCLOCK_DISPATCH +KSCLOCK_DISPATCH, *PKSCLOCK_DISPATCH; +typedef struct _KSALLOCATOR_DISPATCH +KSALLOCATOR_DISPATCH, *PKSALLOCATOR_DISPATCH; +typedef struct _KSPIN +KSPIN, *PKSPIN; +typedef struct _KSNODE_DESCRIPTOR +KSNODE_DESCRIPTOR, *PKSNODE_DESCRIPTOR; +typedef struct _KSSTREAM_POINTER_OFFSET +KSSTREAM_POINTER_OFFSET, *PKSSTREAM_POINTER_OFFSET; +typedef struct _KSSTREAM_POINTER +KSSTREAM_POINTER, *PKSSTREAM_POINTER; +typedef struct _KSMAPPING +KSMAPPING, *PKSMAPPING; +typedef struct _KSPROCESSPIN +KSPROCESSPIN, *PKSPROCESSPIN; +typedef struct _KSPROCESSPIN_INDEXENTRY +KSPROCESSPIN_INDEXENTRY, *PKSPROCESSPIN_INDEXENTRY; +#endif // _NTDDK_ + +typedef PVOID PKSWORKER; + +typedef struct { + ULONG NotificationType; + union { + struct { + HANDLE Event; + ULONG_PTR Reserved[2]; + } EventHandle; + struct { + HANDLE Semaphore; + ULONG Reserved; + LONG Adjustment; + } SemaphoreHandle; +#if defined(_NTDDK_) + struct { + PVOID Event; + KPRIORITY Increment; + ULONG_PTR Reserved; + } EventObject; + struct { + PVOID Semaphore; + KPRIORITY Increment; + LONG Adjustment; + } SemaphoreObject; + struct { + PKDPC Dpc; + ULONG ReferenceCount; + ULONG_PTR Reserved; + } Dpc; + struct { + PWORK_QUEUE_ITEM WorkQueueItem; + WORK_QUEUE_TYPE WorkQueueType; + ULONG_PTR Reserved; + } WorkItem; + struct { + PWORK_QUEUE_ITEM WorkQueueItem; + PKSWORKER KsWorkerObject; + ULONG_PTR Reserved; + } KsWorkItem; +// @@BEGIN_DDKSPLIT + struct { + PKSFILTER Filter; + ULONG_PTR Reserved[2]; + } KsFilterProcessing; + struct { + PKSPIN Pin; + ULONG_PTR Reserved[2]; + } KsPinProcessing; +// @@END_DDKSPLIT +#endif // defined(_NTDDK_) + struct { + PVOID Unused; + LONG_PTR Alignment[2]; + } Alignment; + }; +} KSEVENTDATA, *PKSEVENTDATA; + +#define KSEVENTF_EVENT_HANDLE 0x00000001 +#define KSEVENTF_SEMAPHORE_HANDLE 0x00000002 +#if defined(_NTDDK_) +#define KSEVENTF_EVENT_OBJECT 0x00000004 +#define KSEVENTF_SEMAPHORE_OBJECT 0x00000008 +#define KSEVENTF_DPC 0x00000010 +#define KSEVENTF_WORKITEM 0x00000020 +#define KSEVENTF_KSWORKITEM 0x00000080 +// @@BEGIN_DDKSPLIT +#define KSEVENTF_KSFILTERPROCESSING 0x00000100 +#define KSEVENTF_KSPINPROCESSING 0x00000200 +// @@END_DDKSPLIT +#endif // defined(_NTDDK_) + +#define KSEVENT_TYPE_ENABLE 0x00000001 +#define KSEVENT_TYPE_ONESHOT 0x00000002 +#define KSEVENT_TYPE_ENABLEBUFFERED 0x00000004 +#define KSEVENT_TYPE_SETSUPPORT 0x00000100 +#define KSEVENT_TYPE_BASICSUPPORT 0x00000200 +#define KSEVENT_TYPE_QUERYBUFFER 0x00000400 + +#define KSEVENT_TYPE_TOPOLOGY 0x10000000 + +typedef struct { + KSEVENT Event; + PKSEVENTDATA EventData; + PVOID Reserved; +} KSQUERYBUFFER, *PKSQUERYBUFFER; + +typedef struct { + ULONG Size; + ULONG Flags; + union { + HANDLE ObjectHandle; + PVOID ObjectPointer; + }; + PVOID Reserved; + KSEVENT Event; + KSEVENTDATA EventData; +} KSRELATIVEEVENT; + +#define KSRELATIVEEVENT_FLAG_HANDLE 0x00000001 +#define KSRELATIVEEVENT_FLAG_POINTER 0x00000002 + +//=========================================================================== + +typedef struct { + KSEVENTDATA EventData; + LONGLONG MarkTime; +} KSEVENT_TIME_MARK, *PKSEVENT_TIME_MARK; + +typedef struct { + KSEVENTDATA EventData; + LONGLONG TimeBase; + LONGLONG Interval; +} KSEVENT_TIME_INTERVAL, *PKSEVENT_TIME_INTERVAL; + +typedef struct { + LONGLONG TimeBase; + LONGLONG Interval; +} KSINTERVAL, *PKSINTERVAL; + +//=========================================================================== + +#define STATIC_KSPROPSETID_General\ + 0x1464EDA5L, 0x6A8F, 0x11D1, 0x9A, 0xA7, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("1464EDA5-6A8F-11D1-9AA7-00A0C9223196", KSPROPSETID_General); +#define KSPROPSETID_General DEFINE_GUIDNAMED(KSPROPSETID_General) + +typedef enum { + KSPROPERTY_GENERAL_COMPONENTID +} KSPROPERTY_GENERAL; + +typedef struct { + GUID Manufacturer; + GUID Product; + GUID Component; + GUID Name; + ULONG Version; + ULONG Revision; +} KSCOMPONENTID, *PKSCOMPONENTID; + +#define DEFINE_KSPROPERTY_ITEM_GENERAL_COMPONENTID(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_GENERAL_COMPONENTID,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(KSCOMPONENTID),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define STATIC_KSMETHODSETID_StreamIo\ + 0x65D003CAL, 0x1523, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("65D003CA-1523-11D2-B27A-00A0C9223196", KSMETHODSETID_StreamIo); +#define KSMETHODSETID_StreamIo DEFINE_GUIDNAMED(KSMETHODSETID_StreamIo) + +typedef enum { + KSMETHOD_STREAMIO_READ, + KSMETHOD_STREAMIO_WRITE +} KSMETHOD_STREAMIO; + +#define DEFINE_KSMETHOD_ITEM_STREAMIO_READ(Handler)\ + DEFINE_KSMETHOD_ITEM(\ + KSMETHOD_STREAMIO_READ,\ + KSMETHOD_TYPE_WRITE,\ + (Handler),\ + sizeof(KSMETHOD),\ + 0,\ + NULL) + +#define DEFINE_KSMETHOD_ITEM_STREAMIO_WRITE(Handler)\ + DEFINE_KSMETHOD_ITEM(\ + KSMETHOD_STREAMIO_WRITE,\ + KSMETHOD_TYPE_READ,\ + (Handler),\ + sizeof(KSMETHOD),\ + 0,\ + NULL) + +#define STATIC_KSPROPSETID_MediaSeeking\ + 0xEE904F0CL, 0xD09B, 0x11D0, 0xAB, 0xE9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("EE904F0C-D09B-11D0-ABE9-00A0C9223196", KSPROPSETID_MediaSeeking); +#define KSPROPSETID_MediaSeeking DEFINE_GUIDNAMED(KSPROPSETID_MediaSeeking) + +typedef enum { + KSPROPERTY_MEDIASEEKING_CAPABILITIES, + KSPROPERTY_MEDIASEEKING_FORMATS, + KSPROPERTY_MEDIASEEKING_TIMEFORMAT, + KSPROPERTY_MEDIASEEKING_POSITION, + KSPROPERTY_MEDIASEEKING_STOPPOSITION, + KSPROPERTY_MEDIASEEKING_POSITIONS, + KSPROPERTY_MEDIASEEKING_DURATION, + KSPROPERTY_MEDIASEEKING_AVAILABLE, + KSPROPERTY_MEDIASEEKING_PREROLL, + KSPROPERTY_MEDIASEEKING_CONVERTTIMEFORMAT +} KSPROPERTY_MEDIASEEKING; + +typedef enum { + KS_SEEKING_NoPositioning, + KS_SEEKING_AbsolutePositioning, + KS_SEEKING_RelativePositioning, + KS_SEEKING_IncrementalPositioning, + KS_SEEKING_PositioningBitsMask = 0x3, + KS_SEEKING_SeekToKeyFrame, + KS_SEEKING_ReturnTime = 0x8 +} KS_SEEKING_FLAGS; + +typedef enum { + KS_SEEKING_CanSeekAbsolute = 0x1, + KS_SEEKING_CanSeekForwards = 0x2, + KS_SEEKING_CanSeekBackwards = 0x4, + KS_SEEKING_CanGetCurrentPos = 0x8, + KS_SEEKING_CanGetStopPos = 0x10, + KS_SEEKING_CanGetDuration = 0x20, + KS_SEEKING_CanPlayBackwards = 0x40 +} KS_SEEKING_CAPABILITIES; + +typedef struct { + LONGLONG Current; + LONGLONG Stop; + KS_SEEKING_FLAGS CurrentFlags; + KS_SEEKING_FLAGS StopFlags; +} KSPROPERTY_POSITIONS, *PKSPROPERTY_POSITIONS; + +typedef struct { + LONGLONG Earliest; + LONGLONG Latest; +} KSPROPERTY_MEDIAAVAILABLE, *PKSPROPERTY_MEDIAAVAILABLE; + +typedef struct { + KSPROPERTY Property; + GUID SourceFormat; + GUID TargetFormat; + LONGLONG Time; +} KSP_TIMEFORMAT, *PKSP_TIMEFORMAT; + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_CAPABILITIES(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_MEDIASEEKING_CAPABILITIES,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(KS_SEEKING_CAPABILITIES),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_FORMATS(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_MEDIASEEKING_FORMATS,\ + (Handler),\ + sizeof(KSPROPERTY),\ + 0,\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_TIMEFORMAT(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_MEDIASEEKING_TIMEFORMAT,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(GUID),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_POSITION(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_MEDIASEEKING_POSITION,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(LONGLONG),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_STOPPOSITION(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_MEDIASEEKING_STOPPOSITION,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(LONGLONG),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_POSITIONS(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_MEDIASEEKING_POSITIONS,\ + NULL,\ + sizeof(KSPROPERTY),\ + sizeof(KSPROPERTY_POSITIONS),\ + (Handler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_DURATION(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_MEDIASEEKING_DURATION,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(LONGLONG),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_AVAILABLE(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_MEDIASEEKING_AVAILABLE,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(KSPROPERTY_MEDIAAVAILABLE),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_PREROLL(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_MEDIASEEKING_PREROLL,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(LONGLONG),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_MEDIASEEKING_CONVERTTIMEFORMAT(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_MEDIASEEKING_CONVERTTIMEFORMAT,\ + (Handler),\ + sizeof(KSP_TIMEFORMAT),\ + sizeof(LONGLONG),\ + NULL, NULL, 0, NULL, NULL, 0) + +//=========================================================================== + +#define STATIC_KSPROPSETID_Topology\ + 0x720D4AC0L, 0x7533, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("720D4AC0-7533-11D0-A5D6-28DB04C10000", KSPROPSETID_Topology); +#define KSPROPSETID_Topology DEFINE_GUIDNAMED(KSPROPSETID_Topology) + +typedef enum { + KSPROPERTY_TOPOLOGY_CATEGORIES, + KSPROPERTY_TOPOLOGY_NODES, + KSPROPERTY_TOPOLOGY_CONNECTIONS, + KSPROPERTY_TOPOLOGY_NAME +} KSPROPERTY_TOPOLOGY; + +#define DEFINE_KSPROPERTY_ITEM_TOPOLOGY_CATEGORIES(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_TOPOLOGY_CATEGORIES,\ + (Handler),\ + sizeof(KSPROPERTY),\ + 0,\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_TOPOLOGY_NODES(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_TOPOLOGY_NODES,\ + (Handler),\ + sizeof(KSPROPERTY),\ + 0,\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_TOPOLOGY_CONNECTIONS(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_TOPOLOGY_CONNECTIONS,\ + (Handler),\ + sizeof(KSPROPERTY),\ + 0,\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_TOPOLOGY_NAME(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_TOPOLOGY_NAME,\ + (Handler),\ + sizeof(KSP_NODE),\ + 0,\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_TOPOLOGYSET(TopologySet, Handler)\ +DEFINE_KSPROPERTY_TABLE(TopologySet) {\ + DEFINE_KSPROPERTY_ITEM_TOPOLOGY_CATEGORIES(Handler),\ + DEFINE_KSPROPERTY_ITEM_TOPOLOGY_NODES(Handler),\ + DEFINE_KSPROPERTY_ITEM_TOPOLOGY_CONNECTIONS(Handler),\ + DEFINE_KSPROPERTY_ITEM_TOPOLOGY_NAME(Handler)\ +} + +//============================================================================= + +// +// properties used by graph manager to talk to particular filters +// +#if defined(_NTDDK_) + +#define STATIC_KSPROPSETID_GM \ + 0xAF627536L, 0xE719, 0x11D2, 0x8A, 0x1D, 0x00, 0x60, 0x97, 0xD2, 0xDF, 0x5D +DEFINE_GUIDSTRUCT("AF627536-E719-11D2-8A1D-006097D2DF5D", KSPROPSETID_GM); +#define KSPROPSETID_GM DEFINE_GUIDNAMED(KSPROPSETID_GM) + +typedef VOID (*PFNKSGRAPHMANAGER_NOTIFY)(IN PFILE_OBJECT GraphManager, + IN ULONG EventId, + IN PVOID Filter, + IN PVOID Pin, + IN PVOID Frame, + IN ULONG Duration); + +typedef struct KSGRAPHMANAGER_FUNCTIONTABLE { + PFNKSGRAPHMANAGER_NOTIFY NotifyEvent; +} KSGRAPHMANAGER_FUNCTIONTABLE, PKSGRAPHMANAGER_FUNCTIONTABLE; + +typedef struct _KSPROPERTY_GRAPHMANAGER_INTERFACE { + PFILE_OBJECT GraphManager; + KSGRAPHMANAGER_FUNCTIONTABLE FunctionTable; +} KSPROPERTY_GRAPHMANAGER_INTERFACE, *PKSPROPERTY_GRAPHMANAGER_INTERFACE; + + +// +// Commands +// +typedef enum { + KSPROPERTY_GM_GRAPHMANAGER, + KSPROPERTY_GM_TIMESTAMP_CLOCK, + KSPROPERTY_GM_RATEMATCH, + KSPROPERTY_GM_RENDER_CLOCK, +} KSPROPERTY_GM; + +#endif + +//=========================================================================== + + +#define STATIC_KSCATEGORY_BRIDGE \ + 0x085AFF00L, 0x62CE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("085AFF00-62CE-11CF-A5D6-28DB04C10000", KSCATEGORY_BRIDGE); +#define KSCATEGORY_BRIDGE DEFINE_GUIDNAMED(KSCATEGORY_BRIDGE) + +#define STATIC_KSCATEGORY_CAPTURE \ + 0x65E8773DL, 0x8F56, 0x11D0, 0xA3, 0xB9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("65E8773D-8F56-11D0-A3B9-00A0C9223196", KSCATEGORY_CAPTURE); +#define KSCATEGORY_CAPTURE DEFINE_GUIDNAMED(KSCATEGORY_CAPTURE) + +#define STATIC_KSCATEGORY_RENDER \ + 0x65E8773EL, 0x8F56, 0x11D0, 0xA3, 0xB9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("65E8773E-8F56-11D0-A3B9-00A0C9223196", KSCATEGORY_RENDER); +#define KSCATEGORY_RENDER DEFINE_GUIDNAMED(KSCATEGORY_RENDER) + +#define STATIC_KSCATEGORY_MIXER \ + 0xAD809C00L, 0x7B88, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("AD809C00-7B88-11D0-A5D6-28DB04C10000", KSCATEGORY_MIXER); +#define KSCATEGORY_MIXER DEFINE_GUIDNAMED(KSCATEGORY_MIXER) + +#define STATIC_KSCATEGORY_SPLITTER \ + 0x0A4252A0L, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("0A4252A0-7E70-11D0-A5D6-28DB04C10000", KSCATEGORY_SPLITTER); +#define KSCATEGORY_SPLITTER DEFINE_GUIDNAMED(KSCATEGORY_SPLITTER) + +#define STATIC_KSCATEGORY_DATACOMPRESSOR \ + 0x1E84C900L, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("1E84C900-7E70-11D0-A5D6-28DB04C10000", KSCATEGORY_DATACOMPRESSOR); +#define KSCATEGORY_DATACOMPRESSOR DEFINE_GUIDNAMED(KSCATEGORY_DATACOMPRESSOR) + +#define STATIC_KSCATEGORY_DATADECOMPRESSOR \ + 0x2721AE20L, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("2721AE20-7E70-11D0-A5D6-28DB04C10000", KSCATEGORY_DATADECOMPRESSOR); +#define KSCATEGORY_DATADECOMPRESSOR DEFINE_GUIDNAMED(KSCATEGORY_DATADECOMPRESSOR) + +#define STATIC_KSCATEGORY_DATATRANSFORM \ + 0x2EB07EA0L, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("2EB07EA0-7E70-11D0-A5D6-28DB04C10000", KSCATEGORY_DATATRANSFORM); +#define KSCATEGORY_DATATRANSFORM DEFINE_GUIDNAMED(KSCATEGORY_DATATRANSFORM) + +#define STATIC_KSCATEGORY_COMMUNICATIONSTRANSFORM \ + 0xCF1DDA2CL, 0x9743, 0x11D0, 0xA3, 0xEE, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("CF1DDA2C-9743-11D0-A3EE-00A0C9223196", KSCATEGORY_COMMUNICATIONSTRANSFORM); +#define KSCATEGORY_COMMUNICATIONSTRANSFORM DEFINE_GUIDNAMED(KSCATEGORY_COMMUNICATIONSTRANSFORM) + +#define STATIC_KSCATEGORY_INTERFACETRANSFORM \ + 0xCF1DDA2DL, 0x9743, 0x11D0, 0xA3, 0xEE, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("CF1DDA2D-9743-11D0-A3EE-00A0C9223196", KSCATEGORY_INTERFACETRANSFORM); +#define KSCATEGORY_INTERFACETRANSFORM DEFINE_GUIDNAMED(KSCATEGORY_INTERFACETRANSFORM) + +#define STATIC_KSCATEGORY_MEDIUMTRANSFORM \ + 0xCF1DDA2EL, 0x9743, 0x11D0, 0xA3, 0xEE, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("CF1DDA2E-9743-11D0-A3EE-00A0C9223196", KSCATEGORY_MEDIUMTRANSFORM); +#define KSCATEGORY_MEDIUMTRANSFORM DEFINE_GUIDNAMED(KSCATEGORY_MEDIUMTRANSFORM) + +#define STATIC_KSCATEGORY_FILESYSTEM \ + 0x760FED5EL, 0x9357, 0x11D0, 0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("760FED5E-9357-11D0-A3CC-00A0C9223196", KSCATEGORY_FILESYSTEM); +#define KSCATEGORY_FILESYSTEM DEFINE_GUIDNAMED(KSCATEGORY_FILESYSTEM) + +// KSNAME_Clock +#define STATIC_KSCATEGORY_CLOCK \ + 0x53172480L, 0x4791, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("53172480-4791-11D0-A5D6-28DB04C10000", KSCATEGORY_CLOCK); +#define KSCATEGORY_CLOCK DEFINE_GUIDNAMED(KSCATEGORY_CLOCK) + +#define STATIC_KSCATEGORY_PROXY \ + 0x97EBAACAL, 0x95BD, 0x11D0, 0xA3, 0xEA, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("97EBAACA-95BD-11D0-A3EA-00A0C9223196", KSCATEGORY_PROXY); +#define KSCATEGORY_PROXY DEFINE_GUIDNAMED(KSCATEGORY_PROXY) + +#define STATIC_KSCATEGORY_QUALITY \ + 0x97EBAACBL, 0x95BD, 0x11D0, 0xA3, 0xEA, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("97EBAACB-95BD-11D0-A3EA-00A0C9223196", KSCATEGORY_QUALITY); +#define KSCATEGORY_QUALITY DEFINE_GUIDNAMED(KSCATEGORY_QUALITY) + +typedef struct { + ULONG FromNode; + ULONG FromNodePin; + ULONG ToNode; + ULONG ToNodePin; +} KSTOPOLOGY_CONNECTION, *PKSTOPOLOGY_CONNECTION; + +typedef struct { + ULONG CategoriesCount; + const GUID* Categories; + ULONG TopologyNodesCount; + const GUID* TopologyNodes; + ULONG TopologyConnectionsCount; + const KSTOPOLOGY_CONNECTION* TopologyConnections; + const GUID* TopologyNodesNames; + ULONG Reserved; +} KSTOPOLOGY, *PKSTOPOLOGY; + +#define KSFILTER_NODE ((ULONG)-1) +#define KSALL_NODES ((ULONG)-1) + +typedef struct { + ULONG CreateFlags; + ULONG Node; +} KSNODE_CREATE, *PKSNODE_CREATE; + +//=========================================================================== + +// TIME_FORMAT_NONE +#define STATIC_KSTIME_FORMAT_NONE STATIC_GUID_NULL +#define KSTIME_FORMAT_NONE GUID_NULL + +// TIME_FORMAT_FRAME +#define STATIC_KSTIME_FORMAT_FRAME\ + 0x7b785570L, 0x8c82, 0x11cf, 0xbc, 0x0c, 0x00, 0xaa, 0x00, 0xac, 0x74, 0xf6 +DEFINE_GUIDSTRUCT("7b785570-8c82-11cf-bc0c-00aa00ac74f6", KSTIME_FORMAT_FRAME); +#define KSTIME_FORMAT_FRAME DEFINE_GUIDNAMED(KSTIME_FORMAT_FRAME) + +// TIME_FORMAT_BYTE +#define STATIC_KSTIME_FORMAT_BYTE\ + 0x7b785571L, 0x8c82, 0x11cf, 0xbc, 0x0c, 0x00, 0xaa, 0x00, 0xac, 0x74, 0xf6 +DEFINE_GUIDSTRUCT("7b785571-8c82-11cf-bc0c-00aa00ac74f6", KSTIME_FORMAT_BYTE); +#define KSTIME_FORMAT_BYTE DEFINE_GUIDNAMED(KSTIME_FORMAT_BYTE) + +// TIME_FORMAT_SAMPLE +#define STATIC_KSTIME_FORMAT_SAMPLE\ + 0x7b785572L, 0x8c82, 0x11cf, 0xbc, 0x0c, 0x00, 0xaa, 0x00, 0xac, 0x74, 0xf6 +DEFINE_GUIDSTRUCT("7b785572-8c82-11cf-bc0c-00aa00ac74f6", KSTIME_FORMAT_SAMPLE); +#define KSTIME_FORMAT_SAMPLE DEFINE_GUIDNAMED(KSTIME_FORMAT_SAMPLE) + +// TIME_FORMAT_FIELD +#define STATIC_KSTIME_FORMAT_FIELD\ + 0x7b785573L, 0x8c82, 0x11cf, 0xbc, 0x0c, 0x00, 0xaa, 0x00, 0xac, 0x74, 0xf6 +DEFINE_GUIDSTRUCT("7b785573-8c82-11cf-bc0c-00aa00ac74f6", KSTIME_FORMAT_FIELD); +#define KSTIME_FORMAT_FIELD DEFINE_GUIDNAMED(KSTIME_FORMAT_FIELD) + +// TIME_FORMAT_MEDIA_TIME +#define STATIC_KSTIME_FORMAT_MEDIA_TIME\ + 0x7b785574L, 0x8c82, 0x11cf, 0xbc, 0x0c, 0x00, 0xaa, 0x00, 0xac, 0x74, 0xf6 +DEFINE_GUIDSTRUCT("7b785574-8c82-11cf-bc0c-00aa00ac74f6", KSTIME_FORMAT_MEDIA_TIME); +#define KSTIME_FORMAT_MEDIA_TIME DEFINE_GUIDNAMED(KSTIME_FORMAT_MEDIA_TIME) + +//=========================================================================== + +typedef KSIDENTIFIER KSPIN_INTERFACE, *PKSPIN_INTERFACE; + +#define STATIC_KSINTERFACESETID_Standard \ + 0x1A8766A0L, 0x62CE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("1A8766A0-62CE-11CF-A5D6-28DB04C10000", KSINTERFACESETID_Standard); +#define KSINTERFACESETID_Standard DEFINE_GUIDNAMED(KSINTERFACESETID_Standard) + +typedef enum { + KSINTERFACE_STANDARD_STREAMING, + KSINTERFACE_STANDARD_LOOPED_STREAMING, + KSINTERFACE_STANDARD_CONTROL +} KSINTERFACE_STANDARD; + +#define STATIC_KSINTERFACESETID_FileIo \ + 0x8C6F932CL, 0xE771, 0x11D0, 0xB8, 0xFF, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("8C6F932C-E771-11D0-B8FF-00A0C9223196", KSINTERFACESETID_FileIo); +#define KSINTERFACESETID_FileIo DEFINE_GUIDNAMED(KSINTERFACESETID_FileIo) + +typedef enum { + KSINTERFACE_FILEIO_STREAMING +} KSINTERFACE_FILEIO; + +//=========================================================================== + +#define KSMEDIUM_TYPE_ANYINSTANCE 0 + +#define STATIC_KSMEDIUMSETID_Standard \ + 0x4747B320L, 0x62CE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("4747B320-62CE-11CF-A5D6-28DB04C10000", KSMEDIUMSETID_Standard); +#define KSMEDIUMSETID_Standard DEFINE_GUIDNAMED(KSMEDIUMSETID_Standard) + +//For compatibility only +#define KSMEDIUM_STANDARD_DEVIO KSMEDIUM_TYPE_ANYINSTANCE + +//=========================================================================== + +#define STATIC_KSPROPSETID_Pin\ + 0x8C134960L, 0x51AD, 0x11CF, 0x87, 0x8A, 0x94, 0xF8, 0x01, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("8C134960-51AD-11CF-878A-94F801C10000", KSPROPSETID_Pin); +#define KSPROPSETID_Pin DEFINE_GUIDNAMED(KSPROPSETID_Pin) + +typedef enum { + KSPROPERTY_PIN_CINSTANCES, + KSPROPERTY_PIN_CTYPES, + KSPROPERTY_PIN_DATAFLOW, + KSPROPERTY_PIN_DATARANGES, + KSPROPERTY_PIN_DATAINTERSECTION, + KSPROPERTY_PIN_INTERFACES, + KSPROPERTY_PIN_MEDIUMS, + KSPROPERTY_PIN_COMMUNICATION, + KSPROPERTY_PIN_GLOBALCINSTANCES, + KSPROPERTY_PIN_NECESSARYINSTANCES, + KSPROPERTY_PIN_PHYSICALCONNECTION, + KSPROPERTY_PIN_CATEGORY, + KSPROPERTY_PIN_NAME, + KSPROPERTY_PIN_CONSTRAINEDDATARANGES, + KSPROPERTY_PIN_PROPOSEDATAFORMAT +} KSPROPERTY_PIN; + +typedef struct { + KSPROPERTY Property; + ULONG PinId; + ULONG Reserved; +} KSP_PIN, *PKSP_PIN; + +#define KSINSTANCE_INDETERMINATE ((ULONG)-1) + +typedef struct { + ULONG PossibleCount; + ULONG CurrentCount; +} KSPIN_CINSTANCES, *PKSPIN_CINSTANCES; + +typedef enum { + KSPIN_DATAFLOW_IN = 1, + KSPIN_DATAFLOW_OUT +} KSPIN_DATAFLOW, *PKSPIN_DATAFLOW; + +#define KSDATAFORMAT_BIT_TEMPORAL_COMPRESSION 0 +#define KSDATAFORMAT_TEMPORAL_COMPRESSION (1 << KSDATAFORMAT_BIT_TEMPORAL_COMPRESSION) +#define KSDATAFORMAT_BIT_ATTRIBUTES 1 +#define KSDATAFORMAT_ATTRIBUTES (1 << KSDATAFORMAT_BIT_ATTRIBUTES) + +#define KSDATARANGE_BIT_ATTRIBUTES 1 +#define KSDATARANGE_ATTRIBUTES (1 << KSDATARANGE_BIT_ATTRIBUTES) +#define KSDATARANGE_BIT_REQUIRED_ATTRIBUTES 2 +#define KSDATARANGE_REQUIRED_ATTRIBUTES (1 << KSDATARANGE_BIT_REQUIRED_ATTRIBUTES) + +#if !defined( _MSC_VER ) +typedef struct { + ULONG FormatSize; + ULONG Flags; + ULONG SampleSize; + ULONG Reserved; + GUID MajorFormat; + GUID SubFormat; + GUID Specifier; +} KSDATAFORMAT, *PKSDATAFORMAT, KSDATARANGE, *PKSDATARANGE; +#else +typedef union { + struct { + ULONG FormatSize; + ULONG Flags; + ULONG SampleSize; + ULONG Reserved; + GUID MajorFormat; + GUID SubFormat; + GUID Specifier; + }; + LONGLONG Alignment; +} KSDATAFORMAT, *PKSDATAFORMAT, KSDATARANGE, *PKSDATARANGE; +#endif + +#define KSATTRIBUTE_REQUIRED 0x00000001 + +typedef struct { + ULONG Size; + ULONG Flags; + GUID Attribute; +} KSATTRIBUTE, *PKSATTRIBUTE; + +#if defined(_NTDDK_) +typedef struct { + ULONG Count; + PKSATTRIBUTE* Attributes; +} KSATTRIBUTE_LIST, *PKSATTRIBUTE_LIST; +#endif // _NTDDK_ + +typedef enum { + KSPIN_COMMUNICATION_NONE, + KSPIN_COMMUNICATION_SINK, + KSPIN_COMMUNICATION_SOURCE, + KSPIN_COMMUNICATION_BOTH, + KSPIN_COMMUNICATION_BRIDGE +} KSPIN_COMMUNICATION, *PKSPIN_COMMUNICATION; + +typedef KSIDENTIFIER KSPIN_MEDIUM, *PKSPIN_MEDIUM; + +typedef struct { + KSPIN_INTERFACE Interface; + KSPIN_MEDIUM Medium; + ULONG PinId; + HANDLE PinToHandle; + KSPRIORITY Priority; +} KSPIN_CONNECT, *PKSPIN_CONNECT; + +typedef struct { + ULONG Size; + ULONG Pin; + WCHAR SymbolicLinkName[1]; +} KSPIN_PHYSICALCONNECTION, *PKSPIN_PHYSICALCONNECTION; + +#if defined(_NTDDK_) +typedef +NTSTATUS +(*PFNKSINTERSECTHANDLER)( + IN PIRP Irp, + IN PKSP_PIN Pin, + IN PKSDATARANGE DataRange, + OUT PVOID Data OPTIONAL + ); +typedef +NTSTATUS +(*PFNKSINTERSECTHANDLEREX)( + IN PVOID Context, + IN PIRP Irp, + IN PKSP_PIN Pin, + IN PKSDATARANGE DataRange, + IN PKSDATARANGE MatchingDataRange, + IN ULONG DataBufferSize, + OUT PVOID Data OPTIONAL, + OUT PULONG DataSize + ); +#endif // _NTDDK_ + +#define DEFINE_KSPIN_INTERFACE_TABLE(tablename)\ + const KSPIN_INTERFACE tablename[] = + +#define DEFINE_KSPIN_INTERFACE_ITEM(guid, interface)\ + {\ + STATICGUIDOF(guid),\ + (interface),\ + 0\ + } + +#define DEFINE_KSPIN_MEDIUM_TABLE( tablename )\ + const KSPIN_MEDIUM tablename[] = + +#define DEFINE_KSPIN_MEDIUM_ITEM(guid, medium)\ + DEFINE_KSPIN_INTERFACE_ITEM(guid, medium) + +#define DEFINE_KSPROPERTY_ITEM_PIN_CINSTANCES(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_PIN_CINSTANCES,\ + (Handler),\ + sizeof(KSP_PIN),\ + sizeof(KSPIN_CINSTANCES),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_CTYPES(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_PIN_CTYPES,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(ULONG),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_DATAFLOW(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_PIN_DATAFLOW,\ + (Handler),\ + sizeof(KSP_PIN),\ + sizeof(KSPIN_DATAFLOW),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_DATARANGES(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_PIN_DATARANGES,\ + (Handler),\ + sizeof(KSP_PIN),\ + 0,\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_DATAINTERSECTION(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_PIN_DATAINTERSECTION,\ + (Handler),\ + sizeof(KSP_PIN) + sizeof(KSMULTIPLE_ITEM),\ + 0,\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_INTERFACES(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_PIN_INTERFACES,\ + (Handler),\ + sizeof(KSP_PIN),\ + 0,\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_MEDIUMS(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_PIN_MEDIUMS,\ + (Handler),\ + sizeof(KSP_PIN),\ + 0,\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_COMMUNICATION(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_PIN_COMMUNICATION,\ + (Handler),\ + sizeof(KSP_PIN),\ + sizeof(KSPIN_COMMUNICATION),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_GLOBALCINSTANCES(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_PIN_GLOBALCINSTANCES,\ + (Handler),\ + sizeof(KSP_PIN),\ + sizeof(KSPIN_CINSTANCES),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_NECESSARYINSTANCES(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_PIN_NECESSARYINSTANCES,\ + (Handler),\ + sizeof(KSP_PIN),\ + sizeof(ULONG),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_PHYSICALCONNECTION(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_PIN_PHYSICALCONNECTION,\ + (Handler),\ + sizeof(KSP_PIN),\ + 0,\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_CATEGORY(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_PIN_CATEGORY,\ + (Handler),\ + sizeof(KSP_PIN),\ + sizeof(GUID),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_NAME(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_PIN_NAME,\ + (Handler),\ + sizeof(KSP_PIN),\ + 0,\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_CONSTRAINEDDATARANGES(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_PIN_CONSTRAINEDDATARANGES,\ + (Handler),\ + sizeof(KSP_PIN),\ + 0,\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_PIN_PROPOSEDATAFORMAT(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_PIN_PROPOSEDATAFORMAT,\ + NULL,\ + sizeof(KSP_PIN),\ + sizeof(KSDATAFORMAT),\ + (Handler), NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_PINSET(PinSet,\ + PropGeneral, PropInstances, PropIntersection)\ +DEFINE_KSPROPERTY_TABLE(PinSet) {\ + DEFINE_KSPROPERTY_ITEM_PIN_CINSTANCES(PropInstances),\ + DEFINE_KSPROPERTY_ITEM_PIN_CTYPES(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_DATAFLOW(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_DATARANGES(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_DATAINTERSECTION(PropIntersection),\ + DEFINE_KSPROPERTY_ITEM_PIN_INTERFACES(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_MEDIUMS(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_COMMUNICATION(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_CATEGORY(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_NAME(PropGeneral)\ +} + +#define DEFINE_KSPROPERTY_PINSETCONSTRAINED(PinSet,\ + PropGeneral, PropInstances, PropIntersection)\ +DEFINE_KSPROPERTY_TABLE(PinSet) {\ + DEFINE_KSPROPERTY_ITEM_PIN_CINSTANCES(PropInstances),\ + DEFINE_KSPROPERTY_ITEM_PIN_CTYPES(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_DATAFLOW(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_DATARANGES(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_DATAINTERSECTION(PropIntersection),\ + DEFINE_KSPROPERTY_ITEM_PIN_INTERFACES(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_MEDIUMS(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_COMMUNICATION(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_CATEGORY(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_NAME(PropGeneral),\ + DEFINE_KSPROPERTY_ITEM_PIN_CONSTRAINEDDATARANGES(PropGeneral)\ +} + +#define STATIC_KSNAME_Filter\ + 0x9b365890L, 0x165f, 0x11d0, 0xa1, 0x95, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4 +DEFINE_GUIDSTRUCT("9b365890-165f-11d0-a195-0020afd156e4", KSNAME_Filter); +#define KSNAME_Filter DEFINE_GUIDNAMED(KSNAME_Filter) + +#define KSSTRING_Filter L"{9B365890-165F-11D0-A195-0020AFD156E4}" + +#define STATIC_KSNAME_Pin\ + 0x146F1A80L, 0x4791, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("146F1A80-4791-11D0-A5D6-28DB04C10000", KSNAME_Pin); +#define KSNAME_Pin DEFINE_GUIDNAMED(KSNAME_Pin) + +#define KSSTRING_Pin L"{146F1A80-4791-11D0-A5D6-28DB04C10000}" + +#define STATIC_KSNAME_Clock\ + 0x53172480L, 0x4791, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("53172480-4791-11D0-A5D6-28DB04C10000", KSNAME_Clock); +#define KSNAME_Clock DEFINE_GUIDNAMED(KSNAME_Clock) + +#define KSSTRING_Clock L"{53172480-4791-11D0-A5D6-28DB04C10000}" + +#define STATIC_KSNAME_Allocator\ + 0x642F5D00L, 0x4791, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("642F5D00-4791-11D0-A5D6-28DB04C10000", KSNAME_Allocator); +#define KSNAME_Allocator DEFINE_GUIDNAMED(KSNAME_Allocator) + +#define KSSTRING_Allocator L"{642F5D00-4791-11D0-A5D6-28DB04C10000}" + +#define KSSTRING_AllocatorEx L"{091BB63B-603F-11D1-B067-00A0C9062802}" + +#define STATIC_KSNAME_TopologyNode\ + 0x0621061AL, 0xEE75, 0x11D0, 0xB9, 0x15, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("0621061A-EE75-11D0-B915-00A0C9223196", KSNAME_TopologyNode); +#define KSNAME_TopologyNode DEFINE_GUIDNAMED(KSNAME_TopologyNode) + +#define KSSTRING_TopologyNode L"{0621061A-EE75-11D0-B915-00A0C9223196}" + +#if defined(_NTDDK_) + +typedef struct { + ULONG InterfacesCount; + const KSPIN_INTERFACE* Interfaces; + ULONG MediumsCount; + const KSPIN_MEDIUM* Mediums; + ULONG DataRangesCount; + const PKSDATARANGE* DataRanges; + KSPIN_DATAFLOW DataFlow; + KSPIN_COMMUNICATION Communication; + const GUID* Category; + const GUID* Name; + union { + LONGLONG Reserved; + struct { + ULONG ConstrainedDataRangesCount; + PKSDATARANGE* ConstrainedDataRanges; + }; + }; +} KSPIN_DESCRIPTOR, *PKSPIN_DESCRIPTOR; +typedef const KSPIN_DESCRIPTOR *PCKSPIN_DESCRIPTOR; + +#define DEFINE_KSPIN_DESCRIPTOR_TABLE(tablename)\ + const KSPIN_DESCRIPTOR tablename[] = + +#define DEFINE_KSPIN_DESCRIPTOR_ITEM(\ + InterfacesCount, Interfaces,\ + MediumsCount, Mediums,\ + DataRangesCount, DataRanges,\ + DataFlow, Communication)\ +{\ + InterfacesCount, Interfaces, MediumsCount, Mediums,\ + DataRangesCount, DataRanges, DataFlow, Communication,\ + NULL, NULL, 0\ +} +#define DEFINE_KSPIN_DESCRIPTOR_ITEMEX(\ + InterfacesCount, Interfaces,\ + MediumsCount, Mediums,\ + DataRangesCount, DataRanges,\ + DataFlow, Communication,\ + Category, Name)\ +{\ + InterfacesCount, Interfaces, MediumsCount, Mediums,\ + DataRangesCount, DataRanges, DataFlow, Communication,\ + Category, Name, 0\ +} + +#endif // defined(_NTDDK_) + +//=========================================================================== + +// MEDIATYPE_NULL +#define STATIC_KSDATAFORMAT_TYPE_WILDCARD STATIC_GUID_NULL +#define KSDATAFORMAT_TYPE_WILDCARD GUID_NULL + +// MEDIASUBTYPE_NULL +#define STATIC_KSDATAFORMAT_SUBTYPE_WILDCARD STATIC_GUID_NULL +#define KSDATAFORMAT_SUBTYPE_WILDCARD GUID_NULL + +// MEDIATYPE_Stream +#define STATIC_KSDATAFORMAT_TYPE_STREAM\ + 0xE436EB83L, 0x524F, 0x11CE, 0x9F, 0x53, 0x00, 0x20, 0xAF, 0x0B, 0xA7, 0x70 +DEFINE_GUIDSTRUCT("E436EB83-524F-11CE-9F53-0020AF0BA770", KSDATAFORMAT_TYPE_STREAM); +#define KSDATAFORMAT_TYPE_STREAM DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_STREAM) + +// MEDIASUBTYPE_None +#define STATIC_KSDATAFORMAT_SUBTYPE_NONE\ + 0xE436EB8EL, 0x524F, 0x11CE, 0x9F, 0x53, 0x00, 0x20, 0xAF, 0x0B, 0xA7, 0x70 +DEFINE_GUIDSTRUCT("E436EB8E-524F-11CE-9F53-0020AF0BA770", KSDATAFORMAT_SUBTYPE_NONE); +#define KSDATAFORMAT_SUBTYPE_NONE DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_NONE) + +#define STATIC_KSDATAFORMAT_SPECIFIER_WILDCARD STATIC_GUID_NULL +#define KSDATAFORMAT_SPECIFIER_WILDCARD GUID_NULL + +#define STATIC_KSDATAFORMAT_SPECIFIER_FILENAME\ + 0xAA797B40L, 0xE974, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("AA797B40-E974-11CF-A5D6-28DB04C10000", KSDATAFORMAT_SPECIFIER_FILENAME); +#define KSDATAFORMAT_SPECIFIER_FILENAME DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_FILENAME) + +#define STATIC_KSDATAFORMAT_SPECIFIER_FILEHANDLE\ + 0x65E8773CL, 0x8F56, 0x11D0, 0xA3, 0xB9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("65E8773C-8F56-11D0-A3B9-00A0C9223196", KSDATAFORMAT_SPECIFIER_FILEHANDLE); +#define KSDATAFORMAT_SPECIFIER_FILEHANDLE DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_FILEHANDLE) + +// FORMAT_None +#define STATIC_KSDATAFORMAT_SPECIFIER_NONE\ + 0x0F6417D6L, 0xC318, 0x11D0, 0xA4, 0x3F, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("0F6417D6-C318-11D0-A43F-00A0C9223196", KSDATAFORMAT_SPECIFIER_NONE); +#define KSDATAFORMAT_SPECIFIER_NONE DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_NONE) + +//=========================================================================== + +#define STATIC_KSPROPSETID_Quality \ + 0xD16AD380L, 0xAC1A, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("D16AD380-AC1A-11CF-A5D6-28DB04C10000", KSPROPSETID_Quality); +#define KSPROPSETID_Quality DEFINE_GUIDNAMED(KSPROPSETID_Quality) + +typedef enum { + KSPROPERTY_QUALITY_REPORT, + KSPROPERTY_QUALITY_ERROR +} KSPROPERTY_QUALITY; + +#define DEFINE_KSPROPERTY_ITEM_QUALITY_REPORT(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_QUALITY_REPORT,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(KSQUALITY),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_QUALITY_ERROR(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_QUALITY_ERROR,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(KSERROR),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +//=========================================================================== + +#define STATIC_KSPROPSETID_Connection \ + 0x1D58C920L, 0xAC9B, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("1D58C920-AC9B-11CF-A5D6-28DB04C10000", KSPROPSETID_Connection); +#define KSPROPSETID_Connection DEFINE_GUIDNAMED(KSPROPSETID_Connection) + +typedef enum { + KSPROPERTY_CONNECTION_STATE, + KSPROPERTY_CONNECTION_PRIORITY, + KSPROPERTY_CONNECTION_DATAFORMAT, + KSPROPERTY_CONNECTION_ALLOCATORFRAMING, + KSPROPERTY_CONNECTION_PROPOSEDATAFORMAT, + KSPROPERTY_CONNECTION_ACQUIREORDERING, + KSPROPERTY_CONNECTION_ALLOCATORFRAMING_EX, + KSPROPERTY_CONNECTION_STARTAT +} KSPROPERTY_CONNECTION; + +#define DEFINE_KSPROPERTY_ITEM_CONNECTION_STATE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_CONNECTION_STATE,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(KSSTATE),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CONNECTION_PRIORITY(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_CONNECTION_PRIORITY,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(KSPRIORITY),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CONNECTION_DATAFORMAT(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_CONNECTION_DATAFORMAT,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + 0,\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CONNECTION_ALLOCATORFRAMING(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_CONNECTION_ALLOCATORFRAMING,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(KSALLOCATOR_FRAMING),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CONNECTION_ALLOCATORFRAMING_EX(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_CONNECTION_ALLOCATORFRAMING_EX,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(KSALLOCATOR_FRAMING_EX),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CONNECTION_PROPOSEDATAFORMAT(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_CONNECTION_PROPOSEDATAFORMAT,\ + NULL,\ + sizeof(KSPROPERTY),\ + sizeof(KSDATAFORMAT),\ + (Handler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CONNECTION_ACQUIREORDERING(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_CONNECTION_ACQUIREORDERING,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(int),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CONNECTION_STARTAT(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_CONNECTION_STARTAT,\ + NULL,\ + sizeof(KSPROPERTY),\ + sizeof(KSRELATIVEEVENT),\ + (Handler),\ + NULL, 0, NULL, NULL, 0) + +//=========================================================================== +// +// pins flags +// +#define KSALLOCATOR_REQUIREMENTF_INPLACE_MODIFIER 0x00000001 +#define KSALLOCATOR_REQUIREMENTF_SYSTEM_MEMORY 0x00000002 +#define KSALLOCATOR_REQUIREMENTF_FRAME_INTEGRITY 0x00000004 +#define KSALLOCATOR_REQUIREMENTF_MUST_ALLOCATE 0x00000008 +#define KSALLOCATOR_REQUIREMENTF_PREFERENCES_ONLY 0x80000000 + +#define KSALLOCATOR_OPTIONF_COMPATIBLE 0x00000001 +#define KSALLOCATOR_OPTIONF_SYSTEM_MEMORY 0x00000002 +#define KSALLOCATOR_OPTIONF_VALID 0x00000003 +// +// pins extended framing flags +// +#define KSALLOCATOR_FLAG_PARTIAL_READ_SUPPORT 0x00000010 +#define KSALLOCATOR_FLAG_DEVICE_SPECIFIC 0x00000020 +#define KSALLOCATOR_FLAG_CAN_ALLOCATE 0x00000040 +#define KSALLOCATOR_FLAG_INSIST_ON_FRAMESIZE_RATIO 0x00000080 +// +// allocator pipes flags +// +// there is at least one data modification in a pipe +#define KSALLOCATOR_FLAG_NO_FRAME_INTEGRITY 0x00000100 +#define KSALLOCATOR_FLAG_MULTIPLE_OUTPUT 0x00000200 +#define KSALLOCATOR_FLAG_CYCLE 0x00000400 +#define KSALLOCATOR_FLAG_ALLOCATOR_EXISTS 0x00000800 +// there is no framing dependency between neighbouring pipes. +#define KSALLOCATOR_FLAG_INDEPENDENT_RANGES 0x00001000 +#define KSALLOCATOR_FLAG_ATTENTION_STEPPING 0x00002000 + + +// +// old Framing structure +// +typedef struct { + union { + ULONG OptionsFlags; // allocator options (create) + ULONG RequirementsFlags; // allocation requirements (query) + }; +#if defined(_NTDDK_) + POOL_TYPE PoolType; +#else // !_NTDDK_ + ULONG PoolType; +#endif // !_NTDDK_ + ULONG Frames; // total number of allowable outstanding frames + ULONG FrameSize; // total size of frame + ULONG FileAlignment; + ULONG Reserved; +} KSALLOCATOR_FRAMING, *PKSALLOCATOR_FRAMING; + +#if defined(_NTDDK_) +typedef +PVOID +(*PFNKSDEFAULTALLOCATE)( + IN PVOID Context + ); + +typedef +VOID +(*PFNKSDEFAULTFREE)( + IN PVOID Context, + IN PVOID Buffer + ); + +typedef +NTSTATUS +(*PFNKSINITIALIZEALLOCATOR)( + IN PVOID InitialContext, + IN PKSALLOCATOR_FRAMING AllocatorFraming, + OUT PVOID* Context + ); + +typedef +VOID +(*PFNKSDELETEALLOCATOR)( + IN PVOID Context + ); +#endif // !_NTDDK_ + +// +// new Framing structure, eventually will replace KSALLOCATOR_FRAMING. +// +typedef struct { + ULONG MinFrameSize; + ULONG MaxFrameSize; + ULONG Stepping; +} KS_FRAMING_RANGE, *PKS_FRAMING_RANGE; + + +typedef struct { + KS_FRAMING_RANGE Range; + ULONG InPlaceWeight; + ULONG NotInPlaceWeight; +} KS_FRAMING_RANGE_WEIGHTED, *PKS_FRAMING_RANGE_WEIGHTED; + + +typedef struct { + ULONG RatioNumerator; // compression/expansion ratio + ULONG RatioDenominator; + ULONG RatioConstantMargin; +} KS_COMPRESSION, *PKS_COMPRESSION; + + +// +// Memory Types and Buses are repeated in each entry. +// Easiest to use but takes a little more memory than the varsize layout Pin\Memories\Buses\Ranges. +// +typedef struct { + GUID MemoryType; + GUID BusType; + ULONG MemoryFlags; + ULONG BusFlags; + ULONG Flags; + ULONG Frames; // total number of allowable outstanding frames + ULONG FileAlignment; + ULONG MemoryTypeWeight; // this memory type Weight pin-wide + KS_FRAMING_RANGE PhysicalRange; + KS_FRAMING_RANGE_WEIGHTED FramingRange; +} KS_FRAMING_ITEM, *PKS_FRAMING_ITEM; + + +typedef struct { + ULONG CountItems; // count of FramingItem-s below. + ULONG PinFlags; + KS_COMPRESSION OutputCompression; + ULONG PinWeight; // this pin framing's Weight graph-wide + KS_FRAMING_ITEM FramingItem[1]; +} KSALLOCATOR_FRAMING_EX, *PKSALLOCATOR_FRAMING_EX; + + + +// +// define memory type GUIDs +// +#define KSMEMORY_TYPE_WILDCARD GUID_NULL +#define STATIC_KSMEMORY_TYPE_WILDCARD STATIC_GUID_NULL + +#define KSMEMORY_TYPE_DONT_CARE GUID_NULL +#define STATIC_KSMEMORY_TYPE_DONT_CARE STATIC_GUID_NULL + +#define KS_TYPE_DONT_CARE GUID_NULL +#define STATIC_KS_TYPE_DONT_CARE STATIC_GUID_NULL + +#define STATIC_KSMEMORY_TYPE_SYSTEM \ + 0x091bb638L, 0x603f, 0x11d1, 0xb0, 0x67, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02 +DEFINE_GUIDSTRUCT("091bb638-603f-11d1-b067-00a0c9062802", KSMEMORY_TYPE_SYSTEM); +#define KSMEMORY_TYPE_SYSTEM DEFINE_GUIDNAMED(KSMEMORY_TYPE_SYSTEM) + +#define STATIC_KSMEMORY_TYPE_USER \ + 0x8cb0fc28L, 0x7893, 0x11d1, 0xb0, 0x69, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02 +DEFINE_GUIDSTRUCT("8cb0fc28-7893-11d1-b069-00a0c9062802", KSMEMORY_TYPE_USER); +#define KSMEMORY_TYPE_USER DEFINE_GUIDNAMED(KSMEMORY_TYPE_USER) + +#define STATIC_KSMEMORY_TYPE_KERNEL_PAGED \ + 0xd833f8f8L, 0x7894, 0x11d1, 0xb0, 0x69, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02 +DEFINE_GUIDSTRUCT("d833f8f8-7894-11d1-b069-00a0c9062802", KSMEMORY_TYPE_KERNEL_PAGED); +#define KSMEMORY_TYPE_KERNEL_PAGED DEFINE_GUIDNAMED(KSMEMORY_TYPE_KERNEL_PAGED) + +#define STATIC_KSMEMORY_TYPE_KERNEL_NONPAGED \ + 0x4a6d5fc4L, 0x7895, 0x11d1, 0xb0, 0x69, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02 +DEFINE_GUIDSTRUCT("4a6d5fc4-7895-11d1-b069-00a0c9062802", KSMEMORY_TYPE_KERNEL_NONPAGED); +#define KSMEMORY_TYPE_KERNEL_NONPAGED DEFINE_GUIDNAMED(KSMEMORY_TYPE_KERNEL_NONPAGED) + +// old KS clients did not specify the device memory type +#define STATIC_KSMEMORY_TYPE_DEVICE_UNKNOWN \ + 0x091bb639L, 0x603f, 0x11d1, 0xb0, 0x67, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02 +DEFINE_GUIDSTRUCT("091bb639-603f-11d1-b067-00a0c9062802", KSMEMORY_TYPE_DEVICE_UNKNOWN); +#define KSMEMORY_TYPE_DEVICE_UNKNOWN DEFINE_GUIDNAMED(KSMEMORY_TYPE_DEVICE_UNKNOWN) + +// +// Helper framing macros. +// +#define DECLARE_SIMPLE_FRAMING_EX(FramingExName, MemoryType, Flags, Frames, Alignment, MinFrameSize, MaxFrameSize) \ + const KSALLOCATOR_FRAMING_EX FramingExName = \ + {\ + 1, \ + 0, \ + {\ + 1, \ + 1, \ + 0 \ + }, \ + 0, \ + {\ + {\ + MemoryType, \ + STATIC_KS_TYPE_DONT_CARE, \ + 0, \ + 0, \ + Flags, \ + Frames, \ + Alignment, \ + 0, \ + {\ + 0, \ + (ULONG)-1, \ + 1 \ + }, \ + {\ + {\ + MinFrameSize, \ + MaxFrameSize, \ + 1 \ + }, \ + 0, \ + 0 \ + }\ + }\ + }\ + } + +#define SetDefaultKsCompression(KsCompressionPointer) \ +{\ + KsCompressionPointer->RatioNumerator = 1;\ + KsCompressionPointer->RatioDenominator = 1;\ + KsCompressionPointer->RatioConstantMargin = 0;\ +} + +#define SetDontCareKsFramingRange(KsFramingRangePointer) \ +{\ + KsFramingRangePointer->MinFrameSize = 0;\ + KsFramingRangePointer->MaxFrameSize = (ULONG) -1;\ + KsFramingRangePointer->Stepping = 1;\ +} + +#define SetKsFramingRange(KsFramingRangePointer, P_MinFrameSize, P_MaxFrameSize) \ +{\ + KsFramingRangePointer->MinFrameSize = P_MinFrameSize;\ + KsFramingRangePointer->MaxFrameSize = P_MaxFrameSize;\ + KsFramingRangePointer->Stepping = 1;\ +} + +#define SetKsFramingRangeWeighted(KsFramingRangeWeightedPointer, P_MinFrameSize, P_MaxFrameSize) \ +{\ + KS_FRAMING_RANGE *KsFramingRange = &KsFramingRangeWeightedPointer->Range;\ + SetKsFramingRange(KsFramingRange, P_MinFrameSize, P_MaxFrameSize);\ + KsFramingRangeWeightedPointer->InPlaceWeight = 0;\ + KsFramingRangeWeightedPointer->NotInPlaceWeight = 0;\ +} + +#define INITIALIZE_SIMPLE_FRAMING_EX(FramingExPointer, P_MemoryType, P_Flags, P_Frames, P_Alignment, P_MinFrameSize, P_MaxFrameSize) \ +{\ + KS_COMPRESSION *KsCompression = &FramingExPointer->OutputCompression;\ + KS_FRAMING_RANGE *KsFramingRange = &FramingExPointer->FramingItem[0].PhysicalRange;\ + KS_FRAMING_RANGE_WEIGHTED *KsFramingRangeWeighted = &FramingExPointer->FramingItem[0].FramingRange;\ + FramingExPointer->CountItems = 1;\ + FramingExPointer->PinFlags = 0;\ + SetDefaultKsCompression(KsCompression);\ + FramingExPointer->PinWeight = 0;\ + FramingExPointer->FramingItem[0].MemoryType = P_MemoryType;\ + FramingExPointer->FramingItem[0].BusType = KS_TYPE_DONT_CARE;\ + FramingExPointer->FramingItem[0].MemoryFlags = 0;\ + FramingExPointer->FramingItem[0].BusFlags = 0;\ + FramingExPointer->FramingItem[0].Flags = P_Flags;\ + FramingExPointer->FramingItem[0].Frames = P_Frames;\ + FramingExPointer->FramingItem[0].FileAlignment = P_Alignment;\ + FramingExPointer->FramingItem[0].MemoryTypeWeight = 0;\ + SetDontCareKsFramingRange(KsFramingRange);\ + SetKsFramingRangeWeighted(KsFramingRangeWeighted, P_MinFrameSize, P_MaxFrameSize);\ +} + + + +// KSEVENTSETID_StreamAllocator: {75D95571-073C-11d0-A161-0020AFD156E4} + +#define STATIC_KSEVENTSETID_StreamAllocator\ + 0x75d95571L, 0x073c, 0x11d0, 0xa1, 0x61, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4 +DEFINE_GUIDSTRUCT("75d95571-073c-11d0-a161-0020afd156e4", KSEVENTSETID_StreamAllocator); +#define KSEVENTSETID_StreamAllocator DEFINE_GUIDNAMED(KSEVENTSETID_StreamAllocator) + +typedef enum { + KSEVENT_STREAMALLOCATOR_INTERNAL_FREEFRAME, + KSEVENT_STREAMALLOCATOR_FREEFRAME +} KSEVENT_STREAMALLOCATOR; + +#define STATIC_KSMETHODSETID_StreamAllocator\ + 0xcf6e4341L, 0xec87, 0x11cf, 0xa1, 0x30, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4 +DEFINE_GUIDSTRUCT("cf6e4341-ec87-11cf-a130-0020afd156e4", KSMETHODSETID_StreamAllocator); +#define KSMETHODSETID_StreamAllocator DEFINE_GUIDNAMED(KSMETHODSETID_StreamAllocator) + +typedef enum { + KSMETHOD_STREAMALLOCATOR_ALLOC, + KSMETHOD_STREAMALLOCATOR_FREE +} KSMETHOD_STREAMALLOCATOR; + +#define DEFINE_KSMETHOD_ITEM_STREAMALLOCATOR_ALLOC(Handler)\ + DEFINE_KSMETHOD_ITEM(\ + KSMETHOD_STREAMALLOCATOR_ALLOC,\ + KSMETHOD_TYPE_WRITE,\ + (Handler),\ + sizeof(KSMETHOD),\ + sizeof(PVOID),\ + NULL) + +#define DEFINE_KSMETHOD_ITEM_STREAMALLOCATOR_FREE(Handler)\ + DEFINE_KSMETHOD_ITEM(\ + KSMETHOD_STREAMALLOCATOR_FREE,\ + KSMETHOD_TYPE_READ,\ + (Handler),\ + sizeof(KSMETHOD),\ + sizeof(PVOID),\ + NULL) + +#define DEFINE_KSMETHOD_ALLOCATORSET(AllocatorSet, MethodAlloc, MethodFree)\ +DEFINE_KSMETHOD_TABLE(AllocatorSet) {\ + DEFINE_KSMETHOD_ITEM_STREAMALLOCATOR_ALLOC(MethodAlloc),\ + DEFINE_KSMETHOD_ITEM_STREAMALLOCATOR_FREE(MethodFree)\ +} + +#define STATIC_KSPROPSETID_StreamAllocator\ + 0xcf6e4342L, 0xec87, 0x11cf, 0xa1, 0x30, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4 +DEFINE_GUIDSTRUCT("cf6e4342-ec87-11cf-a130-0020afd156e4", KSPROPSETID_StreamAllocator); +#define KSPROPSETID_StreamAllocator DEFINE_GUIDNAMED(KSPROPSETID_StreamAllocator) + +#if defined(_NTDDK_) +typedef enum { + KSPROPERTY_STREAMALLOCATOR_FUNCTIONTABLE, + KSPROPERTY_STREAMALLOCATOR_STATUS +} KSPROPERTY_STREAMALLOCATOR; + +#define DEFINE_KSPROPERTY_ITEM_STREAMALLOCATOR_FUNCTIONTABLE(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_STREAMALLOCATOR_FUNCTIONTABLE,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(KSSTREAMALLOCATOR_FUNCTIONTABLE),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_STREAMALLOCATOR_STATUS(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_STREAMALLOCATOR_STATUS,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(KSSTREAMALLOCATOR_STATUS),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ALLOCATORSET(AllocatorSet, PropFunctionTable, PropStatus)\ +DEFINE_KSPROPERTY_TABLE(AllocatorSet) {\ + DEFINE_KSPROPERTY_ITEM_STREAMALLOCATOR_STATUS(PropStatus),\ + DEFINE_KSPROPERTY_ITEM_STREAMALLOCATOR_FUNCTIONTABLE(PropFunctionTable)\ +} + +typedef +NTSTATUS +(*PFNALLOCATOR_ALLOCATEFRAME)( + IN PFILE_OBJECT FileObject, + PVOID *Frame + ); + +typedef +VOID +(*PFNALLOCATOR_FREEFRAME)( + IN PFILE_OBJECT FileObject, + IN PVOID Frame + ); + +typedef struct { + PFNALLOCATOR_ALLOCATEFRAME AllocateFrame; + PFNALLOCATOR_FREEFRAME FreeFrame; +} KSSTREAMALLOCATOR_FUNCTIONTABLE, *PKSSTREAMALLOCATOR_FUNCTIONTABLE; +#endif // defined(_NTDDK_) + +typedef struct { + KSALLOCATOR_FRAMING Framing; + ULONG AllocatedFrames; + ULONG Reserved; +} KSSTREAMALLOCATOR_STATUS, *PKSSTREAMALLOCATOR_STATUS; + +typedef struct { + KSALLOCATOR_FRAMING_EX Framing; + ULONG AllocatedFrames; + ULONG Reserved; +} KSSTREAMALLOCATOR_STATUS_EX, *PKSSTREAMALLOCATOR_STATUS_EX; + + +#define KSSTREAM_HEADER_OPTIONSF_SPLICEPOINT 0x00000001 +#define KSSTREAM_HEADER_OPTIONSF_PREROLL 0x00000002 +#define KSSTREAM_HEADER_OPTIONSF_DATADISCONTINUITY 0x00000004 +#define KSSTREAM_HEADER_OPTIONSF_TYPECHANGED 0x00000008 +#define KSSTREAM_HEADER_OPTIONSF_TIMEVALID 0x00000010 +#define KSSTREAM_HEADER_OPTIONSF_TIMEDISCONTINUITY 0x00000040 +#define KSSTREAM_HEADER_OPTIONSF_FLUSHONPAUSE 0x00000080 +#define KSSTREAM_HEADER_OPTIONSF_DURATIONVALID 0x00000100 +#define KSSTREAM_HEADER_OPTIONSF_ENDOFSTREAM 0x00000200 +#define KSSTREAM_HEADER_OPTIONSF_LOOPEDDATA 0x80000000 + +typedef struct { + LONGLONG Time; + ULONG Numerator; + ULONG Denominator; +} KSTIME, *PKSTIME; + +typedef struct { + ULONG Size; + ULONG TypeSpecificFlags; + KSTIME PresentationTime; + LONGLONG Duration; + ULONG FrameExtent; + ULONG DataUsed; + PVOID Data; + ULONG OptionsFlags; +#if _WIN64 + ULONG Reserved; +#endif +} KSSTREAM_HEADER, *PKSSTREAM_HEADER; + +#define STATIC_KSPROPSETID_StreamInterface\ + 0x1fdd8ee1L, 0x9cd3, 0x11d0, 0x82, 0xaa, 0x00, 0x00, 0xf8, 0x22, 0xfe, 0x8a +DEFINE_GUIDSTRUCT("1fdd8ee1-9cd3-11d0-82aa-0000f822fe8a", KSPROPSETID_StreamInterface); +#define KSPROPSETID_StreamInterface DEFINE_GUIDNAMED(KSPROPSETID_StreamInterface) + +typedef enum { + KSPROPERTY_STREAMINTERFACE_HEADERSIZE +} KSPROPERTY_STREAMINTERFACE; + +#define DEFINE_KSPROPERTY_ITEM_STREAMINTERFACE_HEADERSIZE( GetHandler )\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_STREAMINTERFACE_HEADERSIZE,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(ULONG),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_STREAMINTERFACESET(StreamInterfaceSet,\ + HeaderSizeHandler)\ +DEFINE_KSPROPERTY_TABLE(StreamInterfaceSet) {\ + DEFINE_KSPROPERTY_ITEM_STREAMINTERFACE_HEADERSIZE( HeaderSizeHandler )\ +} + +#define STATIC_KSPROPSETID_Stream\ + 0x65aaba60L, 0x98ae, 0x11cf, 0xa1, 0x0d, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4 +DEFINE_GUIDSTRUCT("65aaba60-98ae-11cf-a10d-0020afd156e4", KSPROPSETID_Stream); +#define KSPROPSETID_Stream DEFINE_GUIDNAMED(KSPROPSETID_Stream) + +typedef enum { + KSPROPERTY_STREAM_ALLOCATOR, + KSPROPERTY_STREAM_QUALITY, + KSPROPERTY_STREAM_DEGRADATION, + KSPROPERTY_STREAM_MASTERCLOCK, + KSPROPERTY_STREAM_TIMEFORMAT, + KSPROPERTY_STREAM_PRESENTATIONTIME, + KSPROPERTY_STREAM_PRESENTATIONEXTENT, + KSPROPERTY_STREAM_FRAMETIME, + KSPROPERTY_STREAM_RATECAPABILITY, + KSPROPERTY_STREAM_RATE, + KSPROPERTY_STREAM_PIPE_ID +} KSPROPERTY_STREAM; + +#define DEFINE_KSPROPERTY_ITEM_STREAM_ALLOCATOR(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_STREAM_ALLOCATOR,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(HANDLE),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_STREAM_QUALITY(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_STREAM_QUALITY,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(KSQUALITY_MANAGER),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_STREAM_DEGRADATION(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_STREAM_DEGRADATION,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + 0,\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_STREAM_MASTERCLOCK(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_STREAM_MASTERCLOCK,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(HANDLE),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_STREAM_TIMEFORMAT(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_STREAM_TIMEFORMAT,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(GUID),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_STREAM_PRESENTATIONTIME(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_STREAM_PRESENTATIONTIME,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(KSTIME),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_STREAM_PRESENTATIONEXTENT(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_STREAM_PRESENTATIONEXTENT,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(LONGLONG),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_STREAM_FRAMETIME(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_STREAM_FRAMETIME,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(KSFRAMETIME),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_STREAM_RATECAPABILITY(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_STREAM_RATECAPABILITY,\ + (Handler),\ + sizeof(KSRATE_CAPABILITY),\ + sizeof(KSRATE),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_STREAM_RATE(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_STREAM_RATE,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(KSRATE),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_STREAM_PIPE_ID(GetHandler, SetHandler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_STREAM_PIPE_ID,\ + (GetHandler),\ + sizeof(KSPROPERTY),\ + sizeof(HANDLE),\ + (SetHandler),\ + NULL, 0, NULL, NULL, 0) + +typedef struct { + HANDLE QualityManager; + PVOID Context; +} KSQUALITY_MANAGER, *PKSQUALITY_MANAGER; + +typedef struct { + LONGLONG Duration; + ULONG FrameFlags; + ULONG Reserved; +} KSFRAMETIME, *PKSFRAMETIME; + +#define KSFRAMETIME_VARIABLESIZE 0x00000001 + +typedef struct { + LONGLONG PresentationStart; + LONGLONG Duration; + KSPIN_INTERFACE Interface; + LONG Rate; + ULONG Flags; +} KSRATE, *PKSRATE; + +#define KSRATE_NOPRESENTATIONSTART 0x00000001 +#define KSRATE_NOPRESENTATIONDURATION 0x00000002 + +typedef struct { + KSPROPERTY Property; + KSRATE Rate; +} KSRATE_CAPABILITY, *PKSRATE_CAPABILITY; + +#define STATIC_KSPROPSETID_Clock \ + 0xDF12A4C0L, 0xAC17, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("DF12A4C0-AC17-11CF-A5D6-28DB04C10000", KSPROPSETID_Clock); +#define KSPROPSETID_Clock DEFINE_GUIDNAMED(KSPROPSETID_Clock) + +// +// Performs a x*y/z operation on 64 bit quantities by splitting the operation. The equation +// is simplified with respect to adding in the remainder for the upper 32 bits. +// +// (xh * 10000000 / Frequency) * 2^32 + ((((xh * 10000000) % Frequency) * 2^32 + (xl * 10000000)) / Frequency) +// +#define NANOSECONDS 10000000 +#define KSCONVERT_PERFORMANCE_TIME(Frequency, PerformanceTime) \ + ((((ULONGLONG)(ULONG)(PerformanceTime).HighPart * NANOSECONDS / (Frequency)) << 32) + \ + ((((((ULONGLONG)(ULONG)(PerformanceTime).HighPart * NANOSECONDS) % (Frequency)) << 32) + \ + ((ULONGLONG)(PerformanceTime).LowPart * NANOSECONDS)) / (Frequency))) + +typedef struct { + ULONG CreateFlags; +} KSCLOCK_CREATE, *PKSCLOCK_CREATE; + +typedef struct { + LONGLONG Time; + LONGLONG SystemTime; +} KSCORRELATED_TIME, *PKSCORRELATED_TIME; + +typedef struct { + LONGLONG Granularity; + LONGLONG Error; +} KSRESOLUTION, *PKSRESOLUTION; + +typedef enum { + KSPROPERTY_CLOCK_TIME, + KSPROPERTY_CLOCK_PHYSICALTIME, + KSPROPERTY_CLOCK_CORRELATEDTIME, + KSPROPERTY_CLOCK_CORRELATEDPHYSICALTIME, + KSPROPERTY_CLOCK_RESOLUTION, + KSPROPERTY_CLOCK_STATE, +#if defined(_NTDDK_) + KSPROPERTY_CLOCK_FUNCTIONTABLE +#endif // defined(_NTDDK_) +} KSPROPERTY_CLOCK; + +#if defined(_NTDDK_) + +typedef +LONGLONG +(FASTCALL *PFNKSCLOCK_GETTIME)( + IN PFILE_OBJECT FileObject + ); +typedef +LONGLONG +(FASTCALL *PFNKSCLOCK_CORRELATEDTIME)( + IN PFILE_OBJECT FileObject, + OUT PLONGLONG SystemTime); + +typedef struct { + PFNKSCLOCK_GETTIME GetTime; + PFNKSCLOCK_GETTIME GetPhysicalTime; + PFNKSCLOCK_CORRELATEDTIME GetCorrelatedTime; + PFNKSCLOCK_CORRELATEDTIME GetCorrelatedPhysicalTime; +} KSCLOCK_FUNCTIONTABLE, *PKSCLOCK_FUNCTIONTABLE; + +typedef +BOOLEAN +(*PFNKSSETTIMER)( + IN PVOID Context, + IN PKTIMER Timer, + IN LARGE_INTEGER DueTime, + IN PKDPC Dpc + ); + +typedef +BOOLEAN +(*PFNKSCANCELTIMER)( + IN PVOID Context, + IN PKTIMER Timer + ); + +typedef +LONGLONG +(FASTCALL *PFNKSCORRELATEDTIME)( + IN PVOID Context, + OUT PLONGLONG SystemTime); + +typedef PVOID PKSDEFAULTCLOCK; + +#define DEFINE_KSPROPERTY_ITEM_CLOCK_TIME(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_CLOCK_TIME,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(LONGLONG),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CLOCK_PHYSICALTIME(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_CLOCK_PHYSICALTIME,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(LONGLONG),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CLOCK_CORRELATEDTIME(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_CLOCK_CORRELATEDTIME,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(KSCORRELATED_TIME),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CLOCK_CORRELATEDPHYSICALTIME(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_CLOCK_CORRELATEDPHYSICALTIME,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(KSCORRELATED_TIME),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CLOCK_RESOLUTION(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_CLOCK_RESOLUTION,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(KSRESOLUTION),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CLOCK_STATE(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_CLOCK_STATE,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(KSSTATE),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_CLOCK_FUNCTIONTABLE(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_CLOCK_FUNCTIONTABLE,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(KSCLOCK_FUNCTIONTABLE),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_CLOCKSET(ClockSet,\ + PropTime, PropPhysicalTime,\ + PropCorrelatedTime, PropCorrelatedPhysicalTime,\ + PropResolution, PropState, PropFunctionTable)\ +DEFINE_KSPROPERTY_TABLE(ClockSet) {\ + DEFINE_KSPROPERTY_ITEM_CLOCK_TIME(PropTime),\ + DEFINE_KSPROPERTY_ITEM_CLOCK_PHYSICALTIME(PropPhysicalTime),\ + DEFINE_KSPROPERTY_ITEM_CLOCK_CORRELATEDTIME(PropCorrelatedTime),\ + DEFINE_KSPROPERTY_ITEM_CLOCK_CORRELATEDPHYSICALTIME(PropCorrelatedPhysicalTime),\ + DEFINE_KSPROPERTY_ITEM_CLOCK_RESOLUTION(PropResolution),\ + DEFINE_KSPROPERTY_ITEM_CLOCK_STATE(PropState),\ + DEFINE_KSPROPERTY_ITEM_CLOCK_FUNCTIONTABLE(PropFunctionTable),\ +} + +#endif // defined(_NTDDK_) + +#define STATIC_KSEVENTSETID_Clock \ + 0x364D8E20L, 0x62C7, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("364D8E20-62C7-11CF-A5D6-28DB04C10000", KSEVENTSETID_Clock); +#define KSEVENTSETID_Clock DEFINE_GUIDNAMED(KSEVENTSETID_Clock) + +typedef enum { + KSEVENT_CLOCK_INTERVAL_MARK, + KSEVENT_CLOCK_POSITION_MARK +} KSEVENT_CLOCK_POSITION; + +#define STATIC_KSEVENTSETID_Connection\ + 0x7f4bcbe0L, 0x9ea5, 0x11cf, 0xa5, 0xd6, 0x28, 0xdb, 0x04, 0xc1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("7f4bcbe0-9ea5-11cf-a5d6-28db04c10000", KSEVENTSETID_Connection); +#define KSEVENTSETID_Connection DEFINE_GUIDNAMED(KSEVENTSETID_Connection) + +typedef enum { + KSEVENT_CONNECTION_POSITIONUPDATE, + KSEVENT_CONNECTION_DATADISCONTINUITY, + KSEVENT_CONNECTION_TIMEDISCONTINUITY, + KSEVENT_CONNECTION_PRIORITY, + KSEVENT_CONNECTION_ENDOFSTREAM +} KSEVENT_CONNECTION; + +typedef struct { + PVOID Context; + ULONG Proportion; + LONGLONG DeltaTime; +} KSQUALITY, *PKSQUALITY; + +typedef struct { + PVOID Context; + ULONG Status; +} KSERROR, *PKSERROR; + +typedef KSIDENTIFIER KSDEGRADE, *PKSDEGRADE; + +#define STATIC_KSDEGRADESETID_Standard\ + 0x9F564180L, 0x704C, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("9F564180-704C-11D0-A5D6-28DB04C10000", KSDEGRADESETID_Standard); +#define KSDEGRADESETID_Standard DEFINE_GUIDNAMED(KSDEGRADESETID_Standard) + +typedef enum { + KSDEGRADE_STANDARD_SAMPLE, + KSDEGRADE_STANDARD_QUALITY, + KSDEGRADE_STANDARD_COMPUTATION, + KSDEGRADE_STANDARD_SKIP +} KSDEGRADE_STANDARD; + +#if defined(_NTDDK_) + +#define KSPROBE_STREAMREAD 0x00000000 +#define KSPROBE_STREAMWRITE 0x00000001 +#define KSPROBE_ALLOCATEMDL 0x00000010 +#define KSPROBE_PROBEANDLOCK 0x00000020 +#define KSPROBE_SYSTEMADDRESS 0x00000040 +#define KSPROBE_MODIFY 0x00000200 +#define KSPROBE_STREAMWRITEMODIFY (KSPROBE_MODIFY | KSPROBE_STREAMWRITE) +#define KSPROBE_ALLOWFORMATCHANGE 0x00000080 + +#define KSSTREAM_READ KSPROBE_STREAMREAD +#define KSSTREAM_WRITE KSPROBE_STREAMWRITE +#define KSSTREAM_PAGED_DATA 0x00000000 +#define KSSTREAM_NONPAGED_DATA 0x00000100 +#define KSSTREAM_SYNCHRONOUS 0x00001000 +#define KSSTREAM_FAILUREEXCEPTION 0x00002000 + +typedef +NTSTATUS +(*PFNKSCONTEXT_DISPATCH)( + IN PVOID Context, + IN PIRP Irp + ); + +typedef +NTSTATUS +(*PFNKSHANDLER)( + IN PIRP Irp, + IN PKSIDENTIFIER Request, + IN OUT PVOID Data + ); + +typedef +BOOLEAN +(*PFNKSFASTHANDLER)( + IN PFILE_OBJECT FileObject, + IN PKSIDENTIFIER UNALIGNED Request, + IN ULONG RequestLength, + IN OUT PVOID UNALIGNED Data, + IN ULONG DataLength, + OUT PIO_STATUS_BLOCK IoStatus + ); + +typedef +NTSTATUS +(*PFNKSALLOCATOR)( + IN PIRP Irp, + IN ULONG BufferSize, + IN BOOLEAN InputOperation + ); + +typedef struct { + KSPROPERTY_MEMBERSHEADER MembersHeader; + const VOID* Members; +} KSPROPERTY_MEMBERSLIST, *PKSPROPERTY_MEMBERSLIST; + +typedef struct { + KSIDENTIFIER PropTypeSet; + ULONG MembersListCount; + const KSPROPERTY_MEMBERSLIST* MembersList; +} KSPROPERTY_VALUES, *PKSPROPERTY_VALUES; + +#define DEFINE_KSPROPERTY_TABLE(tablename)\ + const KSPROPERTY_ITEM tablename[] = + +#define DEFINE_KSPROPERTY_ITEM(PropertyId, GetHandler,\ + MinProperty,\ + MinData,\ + SetHandler,\ + Values, RelationsCount, Relations, SupportHandler,\ + SerializedSize)\ +{\ + PropertyId, (PFNKSHANDLER)GetHandler, MinProperty, MinData,\ + (PFNKSHANDLER)SetHandler,\ + (PKSPROPERTY_VALUES)Values, RelationsCount, (PKSPROPERTY)Relations,\ + (PFNKSHANDLER)SupportHandler, (ULONG)SerializedSize\ +} + +typedef struct { + ULONG PropertyId; + union { + PFNKSHANDLER GetPropertyHandler; + BOOLEAN GetSupported; + }; + ULONG MinProperty; + ULONG MinData; + union { + PFNKSHANDLER SetPropertyHandler; + BOOLEAN SetSupported; + }; + const KSPROPERTY_VALUES*Values; + ULONG RelationsCount; + const KSPROPERTY* Relations; + PFNKSHANDLER SupportHandler; + ULONG SerializedSize; +} KSPROPERTY_ITEM, *PKSPROPERTY_ITEM; + +#define DEFINE_KSFASTPROPERTY_ITEM(PropertyId, GetHandler, SetHandler)\ +{\ + PropertyId, (PFNKSFASTHANDLER)GetHandler, (PFNKSFASTHANDLER)SetHandler, 0\ +} + +typedef struct { + ULONG PropertyId; + union { + PFNKSFASTHANDLER GetPropertyHandler; + BOOLEAN GetSupported; + }; + union { + PFNKSFASTHANDLER SetPropertyHandler; + BOOLEAN SetSupported; + }; + ULONG Reserved; +} KSFASTPROPERTY_ITEM, *PKSFASTPROPERTY_ITEM; + +#define DEFINE_KSPROPERTY_SET(Set,\ + PropertiesCount,\ + PropertyItem,\ + FastIoCount,\ + FastIoTable)\ +{\ + Set,\ + PropertiesCount,\ + PropertyItem,\ + FastIoCount,\ + FastIoTable\ +} + +#define DEFINE_KSPROPERTY_SET_TABLE(tablename)\ + const KSPROPERTY_SET tablename[] = + +typedef struct { + const GUID* Set; + ULONG PropertiesCount; + const KSPROPERTY_ITEM* PropertyItem; + ULONG FastIoCount; + const KSFASTPROPERTY_ITEM* FastIoTable; +} KSPROPERTY_SET, *PKSPROPERTY_SET; + +#define DEFINE_KSMETHOD_TABLE(tablename)\ + const KSMETHOD_ITEM tablename[] = + +#define DEFINE_KSMETHOD_ITEM(MethodId, Flags,\ + MethodHandler,\ + MinMethod, MinData, SupportHandler)\ +{\ + MethodId, (PFNKSHANDLER)MethodHandler, MinMethod, MinData,\ + SupportHandler, Flags\ +} + +typedef struct { + ULONG MethodId; + union { + PFNKSHANDLER MethodHandler; + BOOLEAN MethodSupported; + }; + ULONG MinMethod; + ULONG MinData; + PFNKSHANDLER SupportHandler; + ULONG Flags; +} KSMETHOD_ITEM, *PKSMETHOD_ITEM; + +#define DEFINE_KSFASTMETHOD_ITEM(MethodId, MethodHandler)\ +{\ + MethodId, (PFNKSFASTHANDLER)MethodHandler\ +} + +typedef struct { + ULONG MethodId; + union { + PFNKSFASTHANDLER MethodHandler; + BOOLEAN MethodSupported; + }; +} KSFASTMETHOD_ITEM, *PKSFASTMETHOD_ITEM; + +#define DEFINE_KSMETHOD_SET(Set,\ + MethodsCount,\ + MethodItem,\ + FastIoCount,\ + FastIoTable)\ +{\ + Set,\ + MethodsCount,\ + MethodItem,\ + FastIoCount,\ + FastIoTable\ +} + +#define DEFINE_KSMETHOD_SET_TABLE(tablename)\ + const KSMETHOD_SET tablename[] = + +typedef struct { + const GUID* Set; + ULONG MethodsCount; + const KSMETHOD_ITEM* MethodItem; + ULONG FastIoCount; + const KSFASTMETHOD_ITEM*FastIoTable; +} KSMETHOD_SET, *PKSMETHOD_SET; + +typedef struct _KSEVENT_ENTRY +KSEVENT_ENTRY, *PKSEVENT_ENTRY; + +typedef +NTSTATUS +(*PFNKSADDEVENT)( + IN PIRP Irp, + IN PKSEVENTDATA EventData, + IN struct _KSEVENT_ENTRY* EventEntry + ); + +typedef +VOID +(*PFNKSREMOVEEVENT)( + IN PFILE_OBJECT FileObject, + IN struct _KSEVENT_ENTRY* EventEntry + ); + +#define DEFINE_KSEVENT_TABLE(tablename)\ + const KSEVENT_ITEM tablename[] = + +#define DEFINE_KSEVENT_ITEM(EventId, DataInput, ExtraEntryData,\ + AddHandler, RemoveHandler, SupportHandler)\ +{\ + EventId,\ + DataInput,\ + ExtraEntryData,\ + AddHandler,\ + RemoveHandler,\ + SupportHandler\ +} + +typedef struct { + ULONG EventId; + ULONG DataInput; + ULONG ExtraEntryData; + PFNKSADDEVENT AddHandler; + PFNKSREMOVEEVENT RemoveHandler; + PFNKSHANDLER SupportHandler; +} KSEVENT_ITEM, *PKSEVENT_ITEM; + +#define DEFINE_KSEVENT_SET(Set,\ + EventsCount,\ + EventItem)\ +{\ + Set, EventsCount, EventItem\ +} + +#define DEFINE_KSEVENT_SET_TABLE(tablename)\ + const KSEVENT_SET tablename[] = + +typedef struct { + const GUID* Set; + ULONG EventsCount; + const KSEVENT_ITEM* EventItem; +} KSEVENT_SET, *PKSEVENT_SET; + +typedef struct { + KDPC Dpc; + ULONG ReferenceCount; + KSPIN_LOCK AccessLock; +} KSDPC_ITEM, *PKSDPC_ITEM; + +typedef struct { + KSDPC_ITEM DpcItem; + LIST_ENTRY BufferList; +} KSBUFFER_ITEM, *PKSBUFFER_ITEM; + +#define KSEVENT_ENTRY_DELETED 1 +#define KSEVENT_ENTRY_ONESHOT 2 +#define KSEVENT_ENTRY_BUFFERED 4 + +struct _KSEVENT_ENTRY { + LIST_ENTRY ListEntry; + PVOID Object; + union { + PKSDPC_ITEM DpcItem; + PKSBUFFER_ITEM BufferItem; + }; + PKSEVENTDATA EventData; + ULONG NotificationType; + const KSEVENT_SET* EventSet; + const KSEVENT_ITEM* EventItem; + PFILE_OBJECT FileObject; + ULONG SemaphoreAdjustment; + ULONG Reserved; + ULONG Flags; +}; + +typedef enum { + KSEVENTS_NONE, + KSEVENTS_SPINLOCK, + KSEVENTS_MUTEX, + KSEVENTS_FMUTEX, + KSEVENTS_FMUTEXUNSAFE, + KSEVENTS_INTERRUPT, + KSEVENTS_ERESOURCE +} KSEVENTS_LOCKTYPE; + +#define KSDISPATCH_FASTIO 0x80000000 + +typedef struct { + PDRIVER_DISPATCH Create; + PVOID Context; + UNICODE_STRING ObjectClass; + PSECURITY_DESCRIPTOR SecurityDescriptor; + ULONG Flags; +} KSOBJECT_CREATE_ITEM, *PKSOBJECT_CREATE_ITEM; + +typedef +VOID +(*PFNKSITEMFREECALLBACK)( + IN PKSOBJECT_CREATE_ITEM CreateItem + ); + +#define KSCREATE_ITEM_SECURITYCHANGED 0x00000001 +#define KSCREATE_ITEM_WILDCARD 0x00000002 +#define KSCREATE_ITEM_NOPARAMETERS 0x00000004 +#define KSCREATE_ITEM_FREEONSTOP 0x00000008 + +#define DEFINE_KSCREATE_DISPATCH_TABLE( tablename )\ + KSOBJECT_CREATE_ITEM tablename[] = + +#define DEFINE_KSCREATE_ITEM(DispatchCreate, TypeName, Context)\ +{\ + (DispatchCreate),\ + (PVOID)(Context),\ + {\ + sizeof(TypeName) - sizeof(UNICODE_NULL),\ + sizeof(TypeName),\ + (PWCHAR)(TypeName)\ + },\ + NULL, 0\ +} + +#define DEFINE_KSCREATE_ITEMEX(DispatchCreate, TypeName, Context, Flags)\ +{\ + (DispatchCreate),\ + (PVOID)(Context),\ + {\ + sizeof(TypeName) - sizeof(UNICODE_NULL),\ + sizeof(TypeName),\ + (PWCHAR)(TypeName)\ + },\ + NULL, (Flags)\ +} + +#define DEFINE_KSCREATE_ITEMNULL( DispatchCreate, Context )\ +{\ + DispatchCreate,\ + Context,\ + {\ + 0,\ + 0,\ + NULL,\ + },\ + NULL, 0\ +} + +typedef struct { + ULONG CreateItemsCount; + PKSOBJECT_CREATE_ITEM CreateItemsList; +} KSOBJECT_CREATE, *PKSOBJECT_CREATE; + +typedef struct { + PDRIVER_DISPATCH DeviceIoControl; + PDRIVER_DISPATCH Read; + PDRIVER_DISPATCH Write; + PDRIVER_DISPATCH Flush; + PDRIVER_DISPATCH Close; + PDRIVER_DISPATCH QuerySecurity; + PDRIVER_DISPATCH SetSecurity; + PFAST_IO_DEVICE_CONTROL FastDeviceIoControl; + PFAST_IO_READ FastRead; + PFAST_IO_WRITE FastWrite; +} KSDISPATCH_TABLE, *PKSDISPATCH_TABLE; + +#define DEFINE_KSDISPATCH_TABLE( tablename, DeviceIoControl, Read, Write,\ + Flush, Close, QuerySecurity, SetSecurity,\ + FastDeviceIoControl, FastRead, FastWrite )\ + const KSDISPATCH_TABLE tablename = \ + {\ + DeviceIoControl, \ + Read, \ + Write, \ + Flush, \ + Close, \ + QuerySecurity, \ + SetSecurity, \ + FastDeviceIoControl, \ + FastRead, \ + FastWrite, \ + } + +#define KSCREATE_ITEM_IRP_STORAGE(Irp) ((PKSOBJECT_CREATE_ITEM)(Irp)->Tail.Overlay.DriverContext[0]) +#define KSEVENT_SET_IRP_STORAGE(Irp) ((const KSEVENT_SET*)(Irp)->Tail.Overlay.DriverContext[0]) +#define KSEVENT_ITEM_IRP_STORAGE(Irp) ((const KSEVENT_ITEM*)(Irp)->Tail.Overlay.DriverContext[3]) +#define KSEVENT_ENTRY_IRP_STORAGE(Irp) ((PKSEVENT_ENTRY)(Irp)->Tail.Overlay.DriverContext[0]) +#define KSMETHOD_SET_IRP_STORAGE(Irp) ((const KSMETHOD_SET*)(Irp)->Tail.Overlay.DriverContext[0]) +#define KSMETHOD_ITEM_IRP_STORAGE(Irp) ((const KSMETHOD_ITEM*)(Irp)->Tail.Overlay.DriverContext[3]) +#define KSMETHOD_TYPE_IRP_STORAGE(Irp) ((ULONG_PTR)((Irp)->Tail.Overlay.DriverContext[2])) +#define KSQUEUE_SPINLOCK_IRP_STORAGE(Irp) ((PKSPIN_LOCK)(Irp)->Tail.Overlay.DriverContext[1]) +#define KSPROPERTY_SET_IRP_STORAGE(Irp) ((const KSPROPERTY_SET*)(Irp)->Tail.Overlay.DriverContext[0]) +#define KSPROPERTY_ITEM_IRP_STORAGE(Irp) ((const KSPROPERTY_ITEM*)(Irp)->Tail.Overlay.DriverContext[3]) +#define KSPROPERTY_ATTRIBUTES_IRP_STORAGE(Irp) ((PKSATTRIBUTE_LIST)(Irp)->Tail.Overlay.DriverContext[2]) + +typedef PVOID KSDEVICE_HEADER, KSOBJECT_HEADER; + +typedef enum { + KsInvokeOnSuccess = 1, + KsInvokeOnError = 2, + KsInvokeOnCancel = 4 +} KSCOMPLETION_INVOCATION; + +typedef enum { + KsListEntryTail, + KsListEntryHead +} KSLIST_ENTRY_LOCATION; + +typedef enum { + KsAcquireOnly, + KsAcquireAndRemove, + KsAcquireOnlySingleItem, + KsAcquireAndRemoveOnlySingleItem +} KSIRP_REMOVAL_OPERATION; + +typedef enum { + KsStackCopyToNewLocation, + KsStackReuseCurrentLocation, + KsStackUseNewLocation +} KSSTACK_USE; + +typedef enum { + KSTARGET_STATE_DISABLED, + KSTARGET_STATE_ENABLED +} KSTARGET_STATE; + +typedef +NTSTATUS +(*PFNKSIRPLISTCALLBACK)( + IN PIRP Irp, + IN PVOID Context + ); + +typedef +VOID +(*PFNREFERENCEDEVICEOBJECT)( + IN PVOID Context + ); + +typedef +VOID +(*PFNDEREFERENCEDEVICEOBJECT)( + IN PVOID Context + ); + +typedef +NTSTATUS +(*PFNQUERYREFERENCESTRING)( + IN PVOID Context, + IN OUT PWCHAR *String + ); + +#define BUS_INTERFACE_REFERENCE_VERSION 0x100 + +typedef struct { + // + // Standard interface header + // + + INTERFACE Interface; + + // + // Standard bus interfaces + // + + PFNREFERENCEDEVICEOBJECT ReferenceDeviceObject; + PFNDEREFERENCEDEVICEOBJECT DereferenceDeviceObject; + PFNQUERYREFERENCESTRING QueryReferenceString; + +} BUS_INTERFACE_REFERENCE, *PBUS_INTERFACE_REFERENCE; + +#define STATIC_REFERENCE_BUS_INTERFACE STATIC_KSMEDIUMSETID_Standard +#define REFERENCE_BUS_INTERFACE KSMEDIUMSETID_Standard + +typedef +NTSTATUS +(*PFNQUERYMEDIUMSLIST)( + IN PVOID Context, + OUT ULONG* MediumsCount, + OUT PKSPIN_MEDIUM* MediumList + ); + +typedef struct { + // + // Standard interface header + // + + INTERFACE Interface; + + // + // Interface definition + // + + PFNQUERYMEDIUMSLIST QueryMediumsList; + +} BUS_INTERFACE_MEDIUMS, *PBUS_INTERFACE_MEDIUMS; + +#define STATIC_GUID_BUS_INTERFACE_MEDIUMS \ + 0x4EC35C3EL, 0x201B, 0x11D2, 0x87, 0x45, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("4EC35C3E-201B-11D2-8745-00A0C9223196", GUID_BUS_INTERFACE_MEDIUMS); +#define GUID_BUS_INTERFACE_MEDIUMS DEFINE_GUIDNAMED(GUID_BUS_INTERFACE_MEDIUMS) + +#endif // defined(_NTDDK_) + +#if !defined( PACK_PRAGMAS_NOT_SUPPORTED ) +#include +#endif + +typedef struct { + GUID PropertySet; + ULONG Count; +} KSPROPERTY_SERIALHDR, *PKSPROPERTY_SERIALHDR; + +#if !defined( PACK_PRAGMAS_NOT_SUPPORTED ) +#include +#endif + +typedef struct { + KSIDENTIFIER PropTypeSet; + ULONG Id; + ULONG PropertyLength; +} KSPROPERTY_SERIAL, *PKSPROPERTY_SERIAL; + +#if defined(_NTDDK_) + +#define IOCTL_KS_HANDSHAKE CTL_CODE(FILE_DEVICE_KS, 0x007, METHOD_NEITHER, FILE_ANY_ACCESS) + +typedef struct { + GUID ProtocolId; + PVOID Argument1; + PVOID Argument2; +} KSHANDSHAKE, *PKSHANDSHAKE; + +typedef struct _KSGATE +KSGATE, *PKSGATE; + +struct _KSGATE { + LONG Count; + PKSGATE NextGate; +}; + +#ifndef _NTOS_ + +void __inline +KsGateTurnInputOn( + IN PKSGATE Gate OPTIONAL + ) +{ + while (Gate && (InterlockedIncrement(&Gate->Count) == 1)) { + Gate = Gate->NextGate; + } +} + +void __inline +KsGateTurnInputOff( + IN PKSGATE Gate OPTIONAL + ) +{ + while (Gate && (InterlockedDecrement(&Gate->Count) == 0)) { + Gate = Gate->NextGate; + } +} + +BOOLEAN __inline +KsGateGetStateUnsafe( + IN PKSGATE Gate + ) +{ + ASSERT(Gate); + return Gate->Count > 0; +} + +BOOLEAN __inline +KsGateCaptureThreshold( + IN PKSGATE Gate + ) +{ + BOOLEAN captured; + + ASSERT(Gate); + + captured = (InterlockedCompareExchange(&Gate->Count,0,1) == 1); + + // + // If we made a transition, it must be propagated. + // + if (captured) { + KsGateTurnInputOff(Gate->NextGate); + } + + // + // We return whatever the state was prior to the compare/exchange. If + // the state was on, the state is now off. + // + return captured; +} + +void __inline +KsGateInitialize( + IN PKSGATE Gate, + IN LONG InitialCount, + IN PKSGATE NextGate OPTIONAL, + IN BOOLEAN StateToPropagate // IN BOOLEAN NextGateIsAnOrGate + ) +{ + ASSERT(Gate); + Gate->Count = InitialCount; + Gate->NextGate = NextGate; + + if (NextGate) { + if (InitialCount > 0) { + if (StateToPropagate) { + KsGateTurnInputOn(NextGate); + } + } else { + if (! StateToPropagate) { + KsGateTurnInputOff(NextGate); + } + } + } +} + +void __inline +KsGateInitializeAnd( + IN PKSGATE AndGate, + IN PKSGATE NextOrGate OPTIONAL + ) +{ + KsGateInitialize(AndGate,1,NextOrGate,TRUE); +} + +void __inline +KsGateInitializeOr( + IN PKSGATE OrGate, + IN PKSGATE NextAndGate OPTIONAL + ) +{ + KsGateInitialize(OrGate,0,NextAndGate,FALSE); +} + +void __inline KsGateAddOnInputToAnd(IN PKSGATE AndGate) {} +void __inline KsGateAddOffInputToAnd(IN PKSGATE AndGate) { KsGateTurnInputOff(AndGate); } +void __inline KsGateRemoveOnInputFromAnd(IN PKSGATE AndGate) {} +void __inline KsGateRemoveOffInputFromAnd(IN PKSGATE AndGate) { KsGateTurnInputOn(AndGate); } + +void __inline KsGateAddOnInputToOr(IN PKSGATE OrGate) { KsGateTurnInputOn(OrGate); } +void __inline KsGateAddOffInputToOr(IN PKSGATE OrGate) {} +void __inline KsGateRemoveOnInputFromOr(IN PKSGATE OrGate) { KsGateTurnInputOff(OrGate); } +void __inline KsGateRemoveOffInputFromOr(IN PKSGATE OrGate) {} + +void __inline +KsGateTerminateAnd( + IN PKSGATE AndGate + ) +{ + ASSERT(AndGate); + if (KsGateGetStateUnsafe(AndGate)) { + KsGateRemoveOnInputFromOr(AndGate->NextGate); + } else { + KsGateRemoveOffInputFromOr(AndGate->NextGate); + } +} + +void __inline +KsGateTerminateOr( + IN PKSGATE OrGate + ) +{ + ASSERT(OrGate); + if (KsGateGetStateUnsafe(OrGate)) { + KsGateRemoveOnInputFromAnd(OrGate->NextGate); + } else { + KsGateRemoveOffInputFromAnd(OrGate->NextGate); + } +} + +#endif // !_NTOS_ + +typedef PVOID KSOBJECT_BAG; + +typedef +BOOLEAN +(*PFNKSGENERATEEVENTCALLBACK)( + IN PVOID Context, + IN PKSEVENT_ENTRY EventEntry + ); + +typedef +NTSTATUS +(*PFNKSDEVICECREATE)( + IN PKSDEVICE Device + ); +typedef +NTSTATUS +(*PFNKSDEVICEPNPSTART)( + IN PKSDEVICE Device, + IN PIRP Irp, + IN PCM_RESOURCE_LIST TranslatedResourceList OPTIONAL, + IN PCM_RESOURCE_LIST UntranslatedResourceList OPTIONAL + ); +typedef +NTSTATUS +(*PFNKSDEVICE)( + IN PKSDEVICE Device + ); +typedef +NTSTATUS +(*PFNKSDEVICEIRP)( + IN PKSDEVICE Device, + IN PIRP Irp + ); +typedef +void +(*PFNKSDEVICEIRPVOID)( + IN PKSDEVICE Device, + IN PIRP Irp + ); +typedef +NTSTATUS +(*PFNKSDEVICEQUERYCAPABILITIES)( + IN PKSDEVICE Device, + IN PIRP Irp, + IN OUT PDEVICE_CAPABILITIES Capabilities + ); +typedef +NTSTATUS +(*PFNKSDEVICEQUERYPOWER)( + IN PKSDEVICE Device, + IN PIRP Irp, + IN DEVICE_POWER_STATE DeviceTo, + IN DEVICE_POWER_STATE DeviceFrom, + IN SYSTEM_POWER_STATE SystemTo, + IN SYSTEM_POWER_STATE SystemFrom, + IN POWER_ACTION Action + ); +typedef +void +(*PFNKSDEVICESETPOWER)( + IN PKSDEVICE Device, + IN PIRP Irp, + IN DEVICE_POWER_STATE To, + IN DEVICE_POWER_STATE From + ); +typedef +NTSTATUS +(*PFNKSFILTERFACTORYVOID)( + IN PKSFILTERFACTORY FilterFactory + ); +typedef +void +(*PFNKSFILTERFACTORYPOWER)( + IN PKSFILTERFACTORY FilterFactory, + IN DEVICE_POWER_STATE State + ); +typedef +NTSTATUS +(*PFNKSFILTERIRP)( + IN PKSFILTER Filter, + IN PIRP Irp + ); +typedef +NTSTATUS +(*PFNKSFILTERPROCESS)( + IN PKSFILTER Filter, + IN PKSPROCESSPIN_INDEXENTRY Index + ); +typedef +NTSTATUS +(*PFNKSFILTERVOID)( + IN PKSFILTER Filter + ); +typedef +void +(*PFNKSFILTERPOWER)( + IN PKSFILTER Filter, + IN DEVICE_POWER_STATE State + ); +typedef +NTSTATUS +(*PFNKSPINIRP)( + IN PKSPIN Pin, + IN PIRP Irp + ); +typedef +NTSTATUS +(*PFNKSPINSETDEVICESTATE)( + IN PKSPIN Pin, + IN KSSTATE ToState, + IN KSSTATE FromState + ); +typedef +NTSTATUS +(*PFNKSPINSETDATAFORMAT)( + IN PKSPIN Pin, + IN PKSDATAFORMAT OldFormat OPTIONAL, + IN PKSMULTIPLE_ITEM OldAttributeList OPTIONAL, + IN const KSDATARANGE* DataRange, + IN const KSATTRIBUTE_LIST* AttributeRange OPTIONAL + ); +typedef +NTSTATUS +(*PFNKSPINHANDSHAKE)( + IN PKSPIN Pin, + IN PKSHANDSHAKE In, + IN PKSHANDSHAKE Out + ); +typedef +NTSTATUS +(*PFNKSPIN)( + IN PKSPIN Pin + ); +typedef +void +(*PFNKSPINVOID)( + IN PKSPIN Pin + ); +typedef +void +(*PFNKSPINPOWER)( + IN PKSPIN Pin, + IN DEVICE_POWER_STATE State + ); +typedef +BOOLEAN +(*PFNKSPINSETTIMER)( + IN PKSPIN Pin, + IN PKTIMER Timer, + IN LARGE_INTEGER DueTime, + IN PKDPC Dpc + ); +typedef +BOOLEAN +(*PFNKSPINCANCELTIMER)( + IN PKSPIN Pin, + IN PKTIMER Timer + ); +typedef +LONGLONG +(FASTCALL *PFNKSPINCORRELATEDTIME)( + IN PKSPIN Pin, + OUT PLONGLONG SystemTime + ); +typedef +void +(*PFNKSPINRESOLUTION)( + IN PKSPIN Pin, + OUT PKSRESOLUTION Resolution + ); +typedef +NTSTATUS +(*PFNKSPININITIALIZEALLOCATOR)( + IN PKSPIN Pin, + IN PKSALLOCATOR_FRAMING AllocatorFraming, + OUT PVOID* Context + ); +typedef +void +(*PFNKSSTREAMPOINTER)( + IN PKSSTREAM_POINTER StreamPointer + ); + +typedef struct KSAUTOMATION_TABLE_ +KSAUTOMATION_TABLE, *PKSAUTOMATION_TABLE; +struct KSAUTOMATION_TABLE_ { + ULONG PropertySetsCount; + ULONG PropertyItemSize; + const KSPROPERTY_SET* PropertySets; + ULONG MethodSetsCount; + ULONG MethodItemSize; + const KSMETHOD_SET* MethodSets; + ULONG EventSetsCount; + ULONG EventItemSize; + const KSEVENT_SET* EventSets; +#if !defined(_WIN64) + PVOID Alignment; +#endif // !defined(_WIN64) +}; + +#define DEFINE_KSAUTOMATION_TABLE(table)\ + const KSAUTOMATION_TABLE table = + +#define DEFINE_KSAUTOMATION_PROPERTIES(table)\ + SIZEOF_ARRAY(table),\ + sizeof(KSPROPERTY_ITEM),\ + table + +#define DEFINE_KSAUTOMATION_METHODS(table)\ + SIZEOF_ARRAY(table),\ + sizeof(KSMETHOD_ITEM),\ + table + +#define DEFINE_KSAUTOMATION_EVENTS(table)\ + SIZEOF_ARRAY(table),\ + sizeof(KSEVENT_ITEM),\ + table + +#define DEFINE_KSAUTOMATION_PROPERTIES_NULL\ + 0,\ + sizeof(KSPROPERTY_ITEM),\ + NULL + +#define DEFINE_KSAUTOMATION_METHODS_NULL\ + 0,\ + sizeof(KSMETHOD_ITEM),\ + NULL + +#define DEFINE_KSAUTOMATION_EVENTS_NULL\ + 0,\ + sizeof(KSEVENT_ITEM),\ + NULL + +#define MIN_DEV_VER_FOR_QI (0x100) + +struct _KSDEVICE_DISPATCH { + PFNKSDEVICECREATE Add; + PFNKSDEVICEPNPSTART Start; + PFNKSDEVICE PostStart; + PFNKSDEVICEIRP QueryStop; + PFNKSDEVICEIRPVOID CancelStop; + PFNKSDEVICEIRPVOID Stop; + PFNKSDEVICEIRP QueryRemove; + PFNKSDEVICEIRPVOID CancelRemove; + PFNKSDEVICEIRPVOID Remove; + PFNKSDEVICEQUERYCAPABILITIES QueryCapabilities; + PFNKSDEVICEIRPVOID SurpriseRemoval; + PFNKSDEVICEQUERYPOWER QueryPower; + PFNKSDEVICESETPOWER SetPower; + PFNKSDEVICEIRP QueryInterface; // added in version 0x100 +}; + +struct _KSFILTER_DISPATCH { + PFNKSFILTERIRP Create; + PFNKSFILTERIRP Close; + PFNKSFILTERPROCESS Process; + PFNKSFILTERVOID Reset; +}; + +struct _KSPIN_DISPATCH { + PFNKSPINIRP Create; + PFNKSPINIRP Close; + PFNKSPIN Process; + PFNKSPINVOID Reset; + PFNKSPINSETDATAFORMAT SetDataFormat; + PFNKSPINSETDEVICESTATE SetDeviceState; + PFNKSPIN Connect; + PFNKSPINVOID Disconnect; + const KSCLOCK_DISPATCH* Clock; + const KSALLOCATOR_DISPATCH* Allocator; +}; + +struct _KSCLOCK_DISPATCH { + PFNKSPINSETTIMER SetTimer; + PFNKSPINCANCELTIMER CancelTimer; + PFNKSPINCORRELATEDTIME CorrelatedTime; + PFNKSPINRESOLUTION Resolution; +}; + +struct _KSALLOCATOR_DISPATCH { + PFNKSPININITIALIZEALLOCATOR InitializeAllocator; + PFNKSDELETEALLOCATOR DeleteAllocator; + PFNKSDEFAULTALLOCATE Allocate; + PFNKSDEFAULTFREE Free; +}; + +#define KSDEVICE_DESCRIPTOR_VERSION (0x100) + +struct _KSDEVICE_DESCRIPTOR { + const KSDEVICE_DISPATCH* Dispatch; + ULONG FilterDescriptorsCount; + const KSFILTER_DESCRIPTOR*const* FilterDescriptors; + ULONG Version; // this is 0 for pre-version 100 driver + //#if !defined(_WIN64) + //PVOID Alignment; + //#endif //!defined(_WIN64) +}; + +struct _KSFILTER_DESCRIPTOR { + const KSFILTER_DISPATCH* Dispatch; + const KSAUTOMATION_TABLE* AutomationTable; + ULONG Version; +#define KSFILTER_DESCRIPTOR_VERSION ((ULONG)-1) + ULONG Flags; +#define KSFILTER_FLAG_DISPATCH_LEVEL_PROCESSING 0x00000001 +#define KSFILTER_FLAG_CRITICAL_PROCESSING 0x00000002 +#define KSFILTER_FLAG_HYPERCRITICAL_PROCESSING 0x00000004 + const GUID* ReferenceGuid; + ULONG PinDescriptorsCount; + ULONG PinDescriptorSize; + const KSPIN_DESCRIPTOR_EX* PinDescriptors; + ULONG CategoriesCount; + const GUID* Categories; + ULONG NodeDescriptorsCount; + ULONG NodeDescriptorSize; + const KSNODE_DESCRIPTOR* NodeDescriptors; + ULONG ConnectionsCount; + const KSTOPOLOGY_CONNECTION* Connections; + const KSCOMPONENTID* ComponentId; +}; + +#define DEFINE_KSFILTER_DESCRIPTOR(descriptor)\ + const KSFILTER_DESCRIPTOR descriptor = + +#define DEFINE_KSFILTER_PIN_DESCRIPTORS(table)\ + SIZEOF_ARRAY(table),\ + sizeof(table[0]),\ + table + +#define DEFINE_KSFILTER_CATEGORIES(table)\ + SIZEOF_ARRAY(table),\ + table + +#define DEFINE_KSFILTER_CATEGORY(category)\ + 1,\ + &(category) + +#define DEFINE_KSFILTER_CATEGORIES_NULL\ + 0,\ + NULL + +#define DEFINE_KSFILTER_NODE_DESCRIPTORS(table)\ + SIZEOF_ARRAY(table),\ + sizeof(table[0]),\ + table + +#define DEFINE_KSFILTER_NODE_DESCRIPTORS_NULL\ + 0,\ + sizeof(KSNODE_DESCRIPTOR),\ + NULL + +#define DEFINE_KSFILTER_CONNECTIONS(table)\ + SIZEOF_ARRAY(table),\ + table + +#define DEFINE_KSFILTER_DEFAULT_CONNECTIONS\ + 0,\ + NULL + +#define DEFINE_KSFILTER_DESCRIPTOR_TABLE(table)\ + const KSFILTER_DESCRIPTOR*const table[] = + +struct _KSPIN_DESCRIPTOR_EX { + const KSPIN_DISPATCH* Dispatch; + const KSAUTOMATION_TABLE* AutomationTable; + KSPIN_DESCRIPTOR PinDescriptor; + ULONG Flags; +#define KSPIN_FLAG_DISPATCH_LEVEL_PROCESSING KSFILTER_FLAG_DISPATCH_LEVEL_PROCESSING +#define KSPIN_FLAG_CRITICAL_PROCESSING KSFILTER_FLAG_CRITICAL_PROCESSING +#define KSPIN_FLAG_HYPERCRITICAL_PROCESSING KSFILTER_FLAG_HYPERCRITICAL_PROCESSING +#define KSPIN_FLAG_ASYNCHRONOUS_PROCESSING 0x00000008 +#define KSPIN_FLAG_DO_NOT_INITIATE_PROCESSING 0x00000010 +#define KSPIN_FLAG_INITIATE_PROCESSING_ON_EVERY_ARRIVAL 0x00000020 +#define KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING 0x00000040 +#define KSPIN_FLAG_ENFORCE_FIFO 0x00000080 + +#define KSPIN_FLAG_GENERATE_MAPPINGS 0x00000100 +#define KSPIN_FLAG_DISTINCT_TRAILING_EDGE 0x00000200 + +#define KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY 0x00010000 +#define KSPIN_FLAG_SPLITTER 0x00020000 +#define KSPIN_FLAG_USE_STANDARD_TRANSPORT 0x00040000 +#define KSPIN_FLAG_DO_NOT_USE_STANDARD_TRANSPORT 0x00080000 +#define KSPIN_FLAG_FIXED_FORMAT 0x00100000 +#define KSPIN_FLAG_GENERATE_EOS_EVENTS 0x00200000 +#define KSPIN_FLAG_RENDERER (KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY|KSPIN_FLAG_GENERATE_EOS_EVENTS) +#define KSPIN_FLAG_IMPLEMENT_CLOCK 0x00400000 + ULONG InstancesPossible; + ULONG InstancesNecessary; + const KSALLOCATOR_FRAMING_EX* AllocatorFraming; + PFNKSINTERSECTHANDLEREX IntersectHandler; +}; + +#define DEFINE_KSPIN_DEFAULT_INTERFACES\ + 0,\ + NULL + +#define DEFINE_KSPIN_DEFAULT_MEDIUMS\ + 0,\ + NULL + +struct _KSNODE_DESCRIPTOR { + const KSAUTOMATION_TABLE* AutomationTable; + const GUID* Type; + const GUID* Name; +#if !defined(_WIN64) + PVOID Alignment; +#endif // !defined(_WIN64) +}; + +#if !defined(_WIN64) +#define DEFINE_NODE_DESCRIPTOR(automation,type,name) \ + { (automation), (type), (name), NULL } +#else // !defined(_WIN64) +#define DEFINE_NODE_DESCRIPTOR(automation,type,name) \ + { (automation), (type), (name) } +#endif // !defined(_WIN64) + +struct _KSDEVICE { + const KSDEVICE_DESCRIPTOR* Descriptor; + KSOBJECT_BAG Bag; + PVOID Context; + PDEVICE_OBJECT FunctionalDeviceObject; + PDEVICE_OBJECT PhysicalDeviceObject; + PDEVICE_OBJECT NextDeviceObject; + BOOLEAN Started; + SYSTEM_POWER_STATE SystemPowerState; + DEVICE_POWER_STATE DevicePowerState; +}; + +struct _KSFILTERFACTORY { + const KSFILTER_DESCRIPTOR* FilterDescriptor; + KSOBJECT_BAG Bag; + PVOID Context; +}; + +struct _KSFILTER { + const KSFILTER_DESCRIPTOR* Descriptor; + KSOBJECT_BAG Bag; + PVOID Context; +}; + +struct _KSPIN { + const KSPIN_DESCRIPTOR_EX* Descriptor; + KSOBJECT_BAG Bag; + PVOID Context; + ULONG Id; + KSPIN_COMMUNICATION Communication; + BOOLEAN ConnectionIsExternal; + KSPIN_INTERFACE ConnectionInterface; + KSPIN_MEDIUM ConnectionMedium; + KSPRIORITY ConnectionPriority; + PKSDATAFORMAT ConnectionFormat; + PKSMULTIPLE_ITEM AttributeList; + ULONG StreamHeaderSize; + KSPIN_DATAFLOW DataFlow; + KSSTATE DeviceState; + KSRESET ResetState; +}; + +struct _KSMAPPING { + PHYSICAL_ADDRESS PhysicalAddress; + ULONG ByteCount; + ULONG Alignment; +}; + +struct _KSSTREAM_POINTER_OFFSET +{ +#if defined(_NTDDK_) + union { + PUCHAR Data; + PKSMAPPING Mappings; + }; +#else // !defined(_NTDDK_) + PUCHAR Data; +#endif // !defined(_NTDDK_) +#if !defined(_WIN64) + PVOID Alignment; +#endif // !defined(_WIN64) + ULONG Count; + ULONG Remaining; +}; + +struct _KSSTREAM_POINTER +{ + PVOID Context; + PKSPIN Pin; + PKSSTREAM_HEADER StreamHeader; + PKSSTREAM_POINTER_OFFSET Offset; + KSSTREAM_POINTER_OFFSET OffsetIn; + KSSTREAM_POINTER_OFFSET OffsetOut; +}; + +struct _KSPROCESSPIN { + PKSPIN Pin; + PKSSTREAM_POINTER StreamPointer; + PKSPROCESSPIN InPlaceCounterpart; + PKSPROCESSPIN DelegateBranch; + PKSPROCESSPIN CopySource; + PVOID Data; + ULONG BytesAvailable; + ULONG BytesUsed; + ULONG Flags; + BOOLEAN Terminate; +}; + +struct _KSPROCESSPIN_INDEXENTRY { + PKSPROCESSPIN *Pins; + ULONG Count; +}; + +typedef enum { + KsObjectTypeDevice, + KsObjectTypeFilterFactory, + KsObjectTypeFilter, + KsObjectTypePin +} KSOBJECTTYPE; + +typedef +void +(*PFNKSFREE)( + IN PVOID Data + ); + +typedef +void +(*PFNKSPINFRAMERETURN)( + IN PKSPIN Pin, + IN PVOID Data OPTIONAL, + IN ULONG Size OPTIONAL, + IN PMDL Mdl OPTIONAL, + IN PVOID Context OPTIONAL, + IN NTSTATUS Status + ); + +#if defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__) +#if !defined(_IKsControl_) +#define _IKsControl_ + +typedef interface IKsControl* PIKSCONTROL; + +#if !defined(DEFINE_ABSTRACT_UNKNOWN) + +#define DEFINE_ABSTRACT_UNKNOWN() \ + STDMETHOD_(NTSTATUS, QueryInterface)(THIS_ \ + REFIID InterfaceId, \ + PVOID* Interface \ + ) PURE; \ + STDMETHOD_(ULONG,AddRef)(THIS) PURE; \ + STDMETHOD_(ULONG,Release)(THIS) PURE; + +#endif //!defined(DEFINE_ABSTRACT_UNKNOWN) + +#undef INTERFACE +#define INTERFACE IKsControl +DECLARE_INTERFACE_(IKsControl,IUnknown) +{ + DEFINE_ABSTRACT_UNKNOWN() // For C + + STDMETHOD_(NTSTATUS, KsProperty)(THIS_ + IN PKSPROPERTY Property, + IN ULONG PropertyLength, + IN OUT PVOID PropertyData, + IN ULONG DataLength, + OUT ULONG* BytesReturned + ) PURE; + STDMETHOD_(NTSTATUS, KsMethod)(THIS_ + IN PKSMETHOD Method, + IN ULONG MethodLength, + IN OUT PVOID MethodData, + IN ULONG DataLength, + OUT ULONG* BytesReturned + ) PURE; + STDMETHOD_(NTSTATUS, KsEvent)(THIS_ + IN PKSEVENT Event OPTIONAL, + IN ULONG EventLength, + IN OUT PVOID EventData, + IN ULONG DataLength, + OUT ULONG* BytesReturned + ) PURE; +}; + +typedef interface IKsReferenceClock* PIKSREFERENCECLOCK; + +#undef INTERFACE +#define INTERFACE IKsReferenceClock +DECLARE_INTERFACE_(IKsReferenceClock,IUnknown) +{ + DEFINE_ABSTRACT_UNKNOWN() // For C + + STDMETHOD_(LONGLONG,GetTime)(THIS + ) PURE; + STDMETHOD_(LONGLONG,GetPhysicalTime)(THIS + ) PURE; + STDMETHOD_(LONGLONG,GetCorrelatedTime)(THIS_ + OUT PLONGLONG SystemTime + ) PURE; + STDMETHOD_(LONGLONG,GetCorrelatedPhysicalTime)(THIS_ + OUT PLONGLONG SystemTime + ) PURE; + STDMETHOD_(NTSTATUS, GetResolution)(THIS_ + OUT PKSRESOLUTION Resolution + ) PURE; + STDMETHOD_(NTSTATUS, GetState)(THIS_ + OUT PKSSTATE State + ) PURE; +}; +#undef INTERFACE + +#define STATIC_IID_IKsControl \ +0x28F54685L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUID(IID_IKsControl, +0x28F54685L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96); +#if defined(__cplusplus) && _MSC_VER >= 1100 +struct __declspec(uuid("28F54685-06FD-11D2-B27A-00A0C9223196")) IKsControl; +#endif + +#define STATIC_IID_IKsFastClock \ +0xc9902485, 0xc180, 0x11d2, 0x84, 0x73, 0xd4, 0x23, 0x94, 0x45, 0x9e, 0x5e +DEFINE_GUID(IID_IKsFastClock, +0xc9902485, 0xc180, 0x11d2, 0x84, 0x73, 0xd4, 0x23, 0x94, 0x45, 0x9e, 0x5e); +#if defined(__cplusplus) && _MSC_VER >= 1100 +struct __declspec(uuid("C9902485-C180-11d2-8473-D42394459E5E")) IKsFastClock; +#endif + +#endif // !defined(_IKsControl_) +#endif // defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__) + +#endif // defined(_NTDDK_) + +//=========================================================================== + +#if defined(__cplusplus) +extern "C" { +#endif // defined(__cplusplus) + +// +// exported prototypes +// + +#ifdef _KSDDK_ +#define KSDDKAPI +#else // !_KSDDK_ +#define KSDDKAPI DECLSPEC_IMPORT +#endif // _KSDDK_ + +#if defined(_NTDDK_) + +KSDDKAPI +NTSTATUS +NTAPI +KsEnableEvent( + IN PIRP Irp, + IN ULONG EventSetsCount, + IN const KSEVENT_SET* EventSet, + IN OUT PLIST_ENTRY EventsList OPTIONAL, + IN KSEVENTS_LOCKTYPE EventsFlags OPTIONAL, + IN PVOID EventsLock OPTIONAL + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsEnableEventWithAllocator( + IN PIRP Irp, + IN ULONG EventSetsCount, + IN const KSEVENT_SET* EventSet, + IN OUT PLIST_ENTRY EventsList OPTIONAL, + IN KSEVENTS_LOCKTYPE EventsFlags OPTIONAL, + IN PVOID EventsLock OPTIONAL, + IN PFNKSALLOCATOR Allocator OPTIONAL, + IN ULONG EventItemSize OPTIONAL + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsDisableEvent( + IN PIRP Irp, + IN OUT PLIST_ENTRY EventsList, + IN KSEVENTS_LOCKTYPE EventsFlags, + IN PVOID EventsLock + ); + +KSDDKAPI +VOID +NTAPI +KsDiscardEvent( + IN PKSEVENT_ENTRY EventEntry + ); + +KSDDKAPI +VOID +NTAPI +KsFreeEventList( + IN PFILE_OBJECT FileObject, + IN OUT PLIST_ENTRY EventsList, + IN KSEVENTS_LOCKTYPE EventsFlags, + IN PVOID EventsLock + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsGenerateEvent( + IN PKSEVENT_ENTRY EventEntry + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsGenerateDataEvent( + IN PKSEVENT_ENTRY EventEntry, + IN ULONG DataSize, + IN PVOID Data + ); + +KSDDKAPI +VOID +NTAPI +KsGenerateEventList( + IN GUID* Set OPTIONAL, + IN ULONG EventId, + IN PLIST_ENTRY EventsList, + IN KSEVENTS_LOCKTYPE EventsFlags, + IN PVOID EventsLock + ); + +// property.c: + +KSDDKAPI +NTSTATUS +NTAPI +KsPropertyHandler( + IN PIRP Irp, + IN ULONG PropertySetsCount, + IN const KSPROPERTY_SET* PropertySet + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsPropertyHandlerWithAllocator( + IN PIRP Irp, + IN ULONG PropertySetsCount, + IN const KSPROPERTY_SET* PropertySet, + IN PFNKSALLOCATOR Allocator OPTIONAL, + IN ULONG PropertyItemSize OPTIONAL + ); + +KSDDKAPI +BOOLEAN +NTAPI +KsFastPropertyHandler( + IN PFILE_OBJECT FileObject, + IN PKSPROPERTY UNALIGNED Property, + IN ULONG PropertyLength, + IN OUT PVOID UNALIGNED Data, + IN ULONG DataLength, + OUT PIO_STATUS_BLOCK IoStatus, + IN ULONG PropertySetsCount, + IN const KSPROPERTY_SET* PropertySet + ); + +// method.c: + +KSDDKAPI +NTSTATUS +NTAPI +KsMethodHandler( + IN PIRP Irp, + IN ULONG MethodSetsCount, + IN const KSMETHOD_SET* MethodSet + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsMethodHandlerWithAllocator( + IN PIRP Irp, + IN ULONG MethodSetsCount, + IN const KSMETHOD_SET* MethodSet, + IN PFNKSALLOCATOR Allocator OPTIONAL, + IN ULONG MethodItemSize OPTIONAL + ); + +KSDDKAPI +BOOLEAN +NTAPI +KsFastMethodHandler( + IN PFILE_OBJECT FileObject, + IN PKSMETHOD UNALIGNED Method, + IN ULONG MethodLength, + IN OUT PVOID UNALIGNED Data, + IN ULONG DataLength, + OUT PIO_STATUS_BLOCK IoStatus, + IN ULONG MethodSetsCount, + IN const KSMETHOD_SET* MethodSet + ); + +// alloc.c: + +KSDDKAPI +NTSTATUS +NTAPI +KsCreateDefaultAllocator( + IN PIRP Irp + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsCreateDefaultAllocatorEx( + IN PIRP Irp, + IN PVOID InitializeContext OPTIONAL, + IN PFNKSDEFAULTALLOCATE DefaultAllocate OPTIONAL, + IN PFNKSDEFAULTFREE DefaultFree OPTIONAL, + IN PFNKSINITIALIZEALLOCATOR InitializeAllocator OPTIONAL, + IN PFNKSDELETEALLOCATOR DeleteAllocator OPTIONAL + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsCreateAllocator( + IN HANDLE ConnectionHandle, + IN PKSALLOCATOR_FRAMING AllocatorFraming, + OUT PHANDLE AllocatorHandle + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsValidateAllocatorCreateRequest( + IN PIRP Irp, + OUT PKSALLOCATOR_FRAMING* AllocatorFraming + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsValidateAllocatorFramingEx( + IN PKSALLOCATOR_FRAMING_EX Framing, + IN ULONG BufferSize, + IN const KSALLOCATOR_FRAMING_EX *PinFraming + ); + +// clock.c: + +KSDDKAPI +NTSTATUS +NTAPI +KsAllocateDefaultClock( + OUT PKSDEFAULTCLOCK* DefaultClock + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsAllocateDefaultClockEx( + OUT PKSDEFAULTCLOCK* DefaultClock, + IN PVOID Context OPTIONAL, + IN PFNKSSETTIMER SetTimer OPTIONAL, + IN PFNKSCANCELTIMER CancelTimer OPTIONAL, + IN PFNKSCORRELATEDTIME CorrelatedTime OPTIONAL, + IN const KSRESOLUTION* Resolution OPTIONAL, + IN ULONG Flags + ); + +KSDDKAPI +VOID +NTAPI +KsFreeDefaultClock( + IN PKSDEFAULTCLOCK DefaultClock + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsCreateDefaultClock( + IN PIRP Irp, + IN PKSDEFAULTCLOCK DefaultClock + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsCreateClock( + IN HANDLE ConnectionHandle, + IN PKSCLOCK_CREATE ClockCreate, + OUT PHANDLE ClockHandle + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsValidateClockCreateRequest( + IN PIRP Irp, + OUT PKSCLOCK_CREATE* ClockCreate + ); + +KSDDKAPI +KSSTATE +NTAPI +KsGetDefaultClockState( + IN PKSDEFAULTCLOCK DefaultClock + ); + +KSDDKAPI +VOID +NTAPI +KsSetDefaultClockState( + IN PKSDEFAULTCLOCK DefaultClock, + IN KSSTATE State + ); + +KSDDKAPI +LONGLONG +NTAPI +KsGetDefaultClockTime( + IN PKSDEFAULTCLOCK DefaultClock + ); + +KSDDKAPI +VOID +NTAPI +KsSetDefaultClockTime( + IN PKSDEFAULTCLOCK DefaultClock, + IN LONGLONG Time + ); + +// connect.c: + +KSDDKAPI +NTSTATUS +NTAPI +KsCreatePin( + IN HANDLE FilterHandle, + IN PKSPIN_CONNECT Connect, + IN ACCESS_MASK DesiredAccess, + OUT PHANDLE ConnectionHandle + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsValidateConnectRequest( + IN PIRP Irp, + IN ULONG DescriptorsCount, + IN const KSPIN_DESCRIPTOR* Descriptor, + OUT PKSPIN_CONNECT* Connect + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsPinPropertyHandler( + IN PIRP Irp, + IN PKSPROPERTY Property, + IN OUT PVOID Data, + IN ULONG DescriptorsCount, + IN const KSPIN_DESCRIPTOR* Descriptor + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsPinDataIntersection( + IN PIRP Irp, + IN PKSP_PIN Pin, + OUT PVOID Data OPTIONAL, + IN ULONG DescriptorsCount, + IN const KSPIN_DESCRIPTOR* Descriptor, + IN PFNKSINTERSECTHANDLER IntersectHandler + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsPinDataIntersectionEx( + IN PIRP Irp, + IN PKSP_PIN Pin, + OUT PVOID Data, + IN ULONG DescriptorsCount, + IN const KSPIN_DESCRIPTOR* Descriptor, + IN ULONG DescriptorSize, + IN PFNKSINTERSECTHANDLEREX IntersectHandler OPTIONAL, + IN PVOID HandlerContext OPTIONAL + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsHandleSizedListQuery( + IN PIRP Irp, + IN ULONG DataItemsCount, + IN ULONG DataItemSize, + IN const VOID* DataItems + ); + +// image.c: + +#if (!defined( MAKEINTRESOURCE )) +#define MAKEINTRESOURCE( res ) ((ULONG_PTR) (USHORT) res) +#endif + +#if (!defined( RT_STRING )) +#define RT_STRING MAKEINTRESOURCE( 6 ) +#define RT_RCDATA MAKEINTRESOURCE( 10 ) +#endif + +KSDDKAPI +NTSTATUS +NTAPI +KsLoadResource( + IN PVOID ImageBase, + IN POOL_TYPE PoolType, + IN ULONG_PTR ResourceName, + IN ULONG ResourceType, + OUT PVOID *Resource, + OUT PULONG ResourceSize + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsGetImageNameAndResourceId( + IN HANDLE RegKey, + OUT PUNICODE_STRING ImageName, + OUT PULONG_PTR ResourceId, + OUT PULONG ValueType +); + +KSDDKAPI +NTSTATUS +NTAPI +KsMapModuleName( + IN PDEVICE_OBJECT PhysicalDeviceObject, + IN PUNICODE_STRING ModuleName, + OUT PUNICODE_STRING ImageName, + OUT PULONG_PTR ResourceId, + OUT PULONG ValueType + ); + +// irp.c: + +KSDDKAPI +NTSTATUS +NTAPI +KsReferenceBusObject( + IN KSDEVICE_HEADER Header + ); + +KSDDKAPI +VOID +NTAPI +KsDereferenceBusObject( + IN KSDEVICE_HEADER Header + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsDispatchQuerySecurity( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsDispatchSetSecurity( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsDispatchSpecificProperty( + IN PIRP Irp, + IN PFNKSHANDLER Handler + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsDispatchSpecificMethod( + IN PIRP Irp, + IN PFNKSHANDLER Handler + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsReadFile( + IN PFILE_OBJECT FileObject, + IN PKEVENT Event OPTIONAL, + IN PVOID PortContext OPTIONAL, + OUT PIO_STATUS_BLOCK IoStatusBlock, + OUT PVOID Buffer, + IN ULONG Length, + IN ULONG Key OPTIONAL, + IN KPROCESSOR_MODE RequestorMode + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsWriteFile( + IN PFILE_OBJECT FileObject, + IN PKEVENT Event OPTIONAL, + IN PVOID PortContext OPTIONAL, + OUT PIO_STATUS_BLOCK IoStatusBlock, + IN PVOID Buffer, + IN ULONG Length, + IN ULONG Key OPTIONAL, + IN KPROCESSOR_MODE RequestorMode + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsQueryInformationFile( + IN PFILE_OBJECT FileObject, + OUT PVOID FileInformation, + IN ULONG Length, + IN FILE_INFORMATION_CLASS FileInformationClass + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsSetInformationFile( + IN PFILE_OBJECT FileObject, + IN PVOID FileInformation, + IN ULONG Length, + IN FILE_INFORMATION_CLASS FileInformationClass + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsStreamIo( + IN PFILE_OBJECT FileObject, + IN PKEVENT Event OPTIONAL, + IN PVOID PortContext OPTIONAL, + IN PIO_COMPLETION_ROUTINE CompletionRoutine OPTIONAL, + IN PVOID CompletionContext OPTIONAL, + IN KSCOMPLETION_INVOCATION CompletionInvocationFlags OPTIONAL, + OUT PIO_STATUS_BLOCK IoStatusBlock, + IN OUT PVOID StreamHeaders, + IN ULONG Length, + IN ULONG Flags, + IN KPROCESSOR_MODE RequestorMode + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsProbeStreamIrp( + IN OUT PIRP Irp, + IN ULONG ProbeFlags, + IN ULONG HeaderSize OPTIONAL + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsAllocateExtraData( + IN OUT PIRP Irp, + IN ULONG ExtraSize, + OUT PVOID* ExtraBuffer + ); + +KSDDKAPI +VOID +NTAPI +KsNullDriverUnload( + IN PDRIVER_OBJECT DriverObject + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsSetMajorFunctionHandler( + IN PDRIVER_OBJECT DriverObject, + IN ULONG MajorFunction + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsDispatchInvalidDeviceRequest( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsDefaultDeviceIoCompletion( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsDispatchIrp( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp + ); + +KSDDKAPI +BOOLEAN +NTAPI +KsDispatchFastIoDeviceControlFailure( + IN PFILE_OBJECT FileObject, + IN BOOLEAN Wait, + IN PVOID InputBuffer OPTIONAL, + IN ULONG InputBufferLength, + OUT PVOID OutputBuffer OPTIONAL, + IN ULONG OutputBufferLength, + IN ULONG IoControlCode, + OUT PIO_STATUS_BLOCK IoStatus, + IN PDEVICE_OBJECT DeviceObject + ); + +KSDDKAPI +BOOLEAN +NTAPI +KsDispatchFastReadFailure( + IN PFILE_OBJECT FileObject, + IN PLARGE_INTEGER FileOffset, + IN ULONG Length, + IN BOOLEAN Wait, + IN ULONG LockKey, + OUT PVOID Buffer, + OUT PIO_STATUS_BLOCK IoStatus, + IN PDEVICE_OBJECT DeviceObject + ); + +#define KsDispatchFastWriteFailure KsDispatchFastReadFailure + +KSDDKAPI +VOID +NTAPI +KsCancelRoutine( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp + ); + +KSDDKAPI +VOID +NTAPI +KsCancelIo( + IN OUT PLIST_ENTRY QueueHead, + IN PKSPIN_LOCK SpinLock + ); + +KSDDKAPI +VOID +NTAPI +KsReleaseIrpOnCancelableQueue( + IN PIRP Irp, + IN PDRIVER_CANCEL DriverCancel OPTIONAL + ); + +KSDDKAPI +PIRP +NTAPI +KsRemoveIrpFromCancelableQueue( + IN OUT PLIST_ENTRY QueueHead, + IN PKSPIN_LOCK SpinLock, + IN KSLIST_ENTRY_LOCATION ListLocation, + IN KSIRP_REMOVAL_OPERATION RemovalOperation + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsMoveIrpsOnCancelableQueue( + IN OUT PLIST_ENTRY SourceList, + IN PKSPIN_LOCK SourceLock, + IN OUT PLIST_ENTRY DestinationList, + IN PKSPIN_LOCK DestinationLock OPTIONAL, + IN KSLIST_ENTRY_LOCATION ListLocation, + IN PFNKSIRPLISTCALLBACK ListCallback, + IN PVOID Context + ); + +KSDDKAPI +VOID +NTAPI +KsRemoveSpecificIrpFromCancelableQueue( + IN PIRP Irp + ); + +KSDDKAPI +VOID +NTAPI +KsAddIrpToCancelableQueue( + IN OUT PLIST_ENTRY QueueHead, + IN PKSPIN_LOCK SpinLock, + IN PIRP Irp, + IN KSLIST_ENTRY_LOCATION ListLocation, + IN PDRIVER_CANCEL DriverCancel OPTIONAL + ); + +// api.c: + +KSDDKAPI +NTSTATUS +NTAPI +KsAcquireResetValue( + IN PIRP Irp, + OUT KSRESET* ResetValue + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsTopologyPropertyHandler( + IN PIRP Irp, + IN PKSPROPERTY Property, + IN OUT PVOID Data, + IN const KSTOPOLOGY* Topology + ); + +KSDDKAPI +VOID +NTAPI +KsAcquireDeviceSecurityLock( + IN KSDEVICE_HEADER Header, + IN BOOLEAN Exclusive + ); + +KSDDKAPI +VOID +NTAPI +KsReleaseDeviceSecurityLock( + IN KSDEVICE_HEADER Header + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsDefaultDispatchPnp( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsDefaultDispatchPower( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsDefaultForwardIrp( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp + ); + +KSDDKAPI +VOID +NTAPI +KsSetDevicePnpAndBaseObject( + IN KSDEVICE_HEADER Header, + IN PDEVICE_OBJECT PnpDeviceObject, + IN PDEVICE_OBJECT BaseObject + ); + +KSDDKAPI +PDEVICE_OBJECT +NTAPI +KsQueryDevicePnpObject( + IN KSDEVICE_HEADER Header + ); + +KSDDKAPI +ACCESS_MASK +NTAPI +KsQueryObjectAccessMask( + IN KSOBJECT_HEADER Header + ); + +KSDDKAPI +VOID +NTAPI +KsRecalculateStackDepth( + IN KSDEVICE_HEADER Header, + IN BOOLEAN ReuseStackLocation + ); + +KSDDKAPI +VOID +NTAPI +KsSetTargetState( + IN KSOBJECT_HEADER Header, + IN KSTARGET_STATE TargetState + ); + +KSDDKAPI +VOID +NTAPI +KsSetTargetDeviceObject( + IN KSOBJECT_HEADER Header, + IN PDEVICE_OBJECT TargetDevice OPTIONAL + ); + +KSDDKAPI +VOID +NTAPI +KsSetPowerDispatch( + IN KSOBJECT_HEADER Header, + IN PFNKSCONTEXT_DISPATCH PowerDispatch OPTIONAL, + IN PVOID PowerContext OPTIONAL + ); + +KSDDKAPI +PKSOBJECT_CREATE_ITEM +NTAPI +KsQueryObjectCreateItem( + IN KSOBJECT_HEADER Header + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsAllocateDeviceHeader( + OUT KSDEVICE_HEADER* Header, + IN ULONG ItemsCount, + IN PKSOBJECT_CREATE_ITEM ItemsList OPTIONAL + ); + +KSDDKAPI +VOID +NTAPI +KsFreeDeviceHeader( + IN KSDEVICE_HEADER Header + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsAllocateObjectHeader( + OUT KSOBJECT_HEADER* Header, + IN ULONG ItemsCount, + IN PKSOBJECT_CREATE_ITEM ItemsList OPTIONAL, + IN PIRP Irp, + IN const KSDISPATCH_TABLE* Table + ); + +KSDDKAPI +VOID +NTAPI +KsFreeObjectHeader( + IN KSOBJECT_HEADER Header + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsAddObjectCreateItemToDeviceHeader( + IN KSDEVICE_HEADER Header, + IN PDRIVER_DISPATCH Create, + IN PVOID Context, + IN PWCHAR ObjectClass, + IN PSECURITY_DESCRIPTOR SecurityDescriptor OPTIONAL + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsAddObjectCreateItemToObjectHeader( + IN KSOBJECT_HEADER Header, + IN PDRIVER_DISPATCH Create, + IN PVOID Context, + IN PWCHAR ObjectClass, + IN PSECURITY_DESCRIPTOR SecurityDescriptor OPTIONAL + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsAllocateObjectCreateItem( + IN KSDEVICE_HEADER Header, + IN PKSOBJECT_CREATE_ITEM CreateItem, + IN BOOLEAN AllocateEntry, + IN PFNKSITEMFREECALLBACK ItemFreeCallback OPTIONAL + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsFreeObjectCreateItem( + IN KSDEVICE_HEADER Header, + IN PUNICODE_STRING CreateItem + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsFreeObjectCreateItemsByContext( + IN KSDEVICE_HEADER Header, + IN PVOID Context + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsCreateDefaultSecurity( + IN PSECURITY_DESCRIPTOR ParentSecurity OPTIONAL, + OUT PSECURITY_DESCRIPTOR* DefaultSecurity + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsForwardIrp( + IN PIRP Irp, + IN PFILE_OBJECT FileObject, + IN BOOLEAN ReuseStackLocation + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsForwardAndCatchIrp( + IN PDEVICE_OBJECT DeviceObject, + IN PIRP Irp, + IN PFILE_OBJECT FileObject, + IN KSSTACK_USE StackUse + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsSynchronousIoControlDevice( + IN PFILE_OBJECT FileObject, + IN KPROCESSOR_MODE RequestorMode, + IN ULONG IoControl, + IN PVOID InBuffer, + IN ULONG InSize, + OUT PVOID OutBuffer, + IN ULONG OutSize, + OUT PULONG BytesReturned + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsUnserializeObjectPropertiesFromRegistry( + IN PFILE_OBJECT FileObject, + IN HANDLE ParentKey OPTIONAL, + IN PUNICODE_STRING RegistryPath OPTIONAL + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsCacheMedium( + IN PUNICODE_STRING SymbolicLink, + IN PKSPIN_MEDIUM Medium, + IN ULONG PinDirection + ); + +// thread.c: + +KSDDKAPI +NTSTATUS +NTAPI +KsRegisterWorker( + IN WORK_QUEUE_TYPE WorkQueueType, + OUT PKSWORKER* Worker + ); +KSDDKAPI +NTSTATUS +NTAPI +KsRegisterCountedWorker( + IN WORK_QUEUE_TYPE WorkQueueType, + IN PWORK_QUEUE_ITEM CountedWorkItem, + OUT PKSWORKER* Worker + ); +KSDDKAPI +VOID +NTAPI +KsUnregisterWorker( + IN PKSWORKER Worker + ); +KSDDKAPI +NTSTATUS +NTAPI +KsQueueWorkItem( + IN PKSWORKER Worker, + IN PWORK_QUEUE_ITEM WorkItem + ); +KSDDKAPI +ULONG +NTAPI +KsIncrementCountedWorker( + IN PKSWORKER Worker + ); +KSDDKAPI +ULONG +NTAPI +KsDecrementCountedWorker( + IN PKSWORKER Worker + ); + +// topology.c: + +KSDDKAPI +NTSTATUS +NTAPI +KsCreateTopologyNode( + IN HANDLE ParentHandle, + IN PKSNODE_CREATE NodeCreate, + IN ACCESS_MASK DesiredAccess, + OUT PHANDLE NodeHandle + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsValidateTopologyNodeCreateRequest( + IN PIRP Irp, + IN PKSTOPOLOGY Topology, + OUT PKSNODE_CREATE* NodeCreate + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsMergeAutomationTables( + OUT PKSAUTOMATION_TABLE* AutomationTableAB, + IN PKSAUTOMATION_TABLE AutomationTableA OPTIONAL, + IN PKSAUTOMATION_TABLE AutomationTableB OPTIONAL, + IN KSOBJECT_BAG Bag OPTIONAL + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsInitializeDriver( + IN PDRIVER_OBJECT DriverObject, + IN PUNICODE_STRING RegistryPathName, + IN const KSDEVICE_DESCRIPTOR* Descriptor OPTIONAL + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsAddDevice( + IN PDRIVER_OBJECT DriverObject, + IN PDEVICE_OBJECT PhysicalDeviceObject + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsCreateDevice( + IN PDRIVER_OBJECT DriverObject, + IN PDEVICE_OBJECT PhysicalDeviceObject, + IN const KSDEVICE_DESCRIPTOR* Descriptor OPTIONAL, + IN ULONG ExtensionSize OPTIONAL, + OUT PKSDEVICE* Device OPTIONAL + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsInitializeDevice( + IN PDEVICE_OBJECT FunctionalDeviceObject, + IN PDEVICE_OBJECT PhysicalDeviceObject, + IN PDEVICE_OBJECT NextDeviceObject, + IN const KSDEVICE_DESCRIPTOR* Descriptor OPTIONAL + ); + +KSDDKAPI +void +NTAPI +KsTerminateDevice( + IN PDEVICE_OBJECT DeviceObject + ); + +KSDDKAPI +PKSDEVICE +NTAPI +KsGetDeviceForDeviceObject( + IN PDEVICE_OBJECT FunctionalDeviceObject + ); + +KSDDKAPI +void +NTAPI +KsAcquireDevice( + IN PKSDEVICE Device + ); + +KSDDKAPI +void +NTAPI +KsReleaseDevice( + IN PKSDEVICE Device + ); + +KSDDKAPI +void +NTAPI +KsDeviceRegisterAdapterObject( + IN PKSDEVICE Device, + IN PADAPTER_OBJECT AdapterObject, + IN ULONG MaxMappingsByteCount, + IN ULONG MappingTableStride + ); + +KSDDKAPI +ULONG +NTAPI +KsDeviceGetBusData( + IN PKSDEVICE Device, + IN ULONG DataType, + IN PVOID Buffer, + IN ULONG Offset, + IN ULONG Length + ); + +KSDDKAPI +ULONG +NTAPI +KsDeviceSetBusData( + IN PKSDEVICE Device, + IN ULONG DataType, + IN PVOID Buffer, + IN ULONG Offset, + IN ULONG Length + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsCreateFilterFactory( + IN PDEVICE_OBJECT DeviceObject, + IN const KSFILTER_DESCRIPTOR* Descriptor, + IN PWCHAR RefString OPTIONAL, + IN PSECURITY_DESCRIPTOR SecurityDescriptor OPTIONAL, + IN ULONG CreateItemFlags, + IN PFNKSFILTERFACTORYPOWER SleepCallback OPTIONAL, + IN PFNKSFILTERFACTORYPOWER WakeCallback OPTIONAL, + OUT PKSFILTERFACTORY* FilterFactory OPTIONAL + ); + +#define KsDeleteFilterFactory(FilterFactory) \ + KsFreeObjectCreateItemsByContext(\ + *(KSDEVICE_HEADER *)(\ + KsFilterFactoryGetParentDevice(FilterFactory)->FunctionalDeviceObject->\ + DeviceExtension),\ + FilterFactory) + +KSDDKAPI +NTSTATUS +NTAPI +KsFilterFactoryAddCreateItem( + IN PKSFILTERFACTORY FilterFactory, + IN PWCHAR RefString, + IN PSECURITY_DESCRIPTOR SecurityDescriptor OPTIONAL, + IN ULONG CreateItemFlags + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsFilterFactorySetDeviceClassesState( + IN PKSFILTERFACTORY FilterFactory, + IN BOOLEAN NewState + ); + +KSDDKAPI +PUNICODE_STRING +NTAPI +KsFilterFactoryGetSymbolicLink( + IN PKSFILTERFACTORY FilterFactory + ); + +KSDDKAPI +void +NTAPI +KsAddEvent( + IN PVOID Object, + IN PKSEVENT_ENTRY EventEntry + ); + +void _inline +KsFilterAddEvent( + IN PKSFILTER Filter, + IN PKSEVENT_ENTRY EventEntry + ) +{ + KsAddEvent(Filter,EventEntry); +} + +void _inline +KsPinAddEvent( + IN PKSPIN Pin, + IN PKSEVENT_ENTRY EventEntry + ) +{ + KsAddEvent(Pin,EventEntry); +} + +KSDDKAPI +NTSTATUS +NTAPI +KsDefaultAddEventHandler( + IN PIRP Irp, + IN PKSEVENTDATA EventData, + IN OUT PKSEVENT_ENTRY EventEntry + ); + +KSDDKAPI +void +NTAPI +KsGenerateEvents( + IN PVOID Object, + IN const GUID* EventSet OPTIONAL, + IN ULONG EventId, + IN ULONG DataSize, + IN PVOID Data OPTIONAL, + IN PFNKSGENERATEEVENTCALLBACK CallBack OPTIONAL, + IN PVOID CallBackContext OPTIONAL + ); + +void _inline +KsFilterGenerateEvents( + IN PKSFILTER Filter, + IN const GUID* EventSet OPTIONAL, + IN ULONG EventId, + IN ULONG DataSize, + IN PVOID Data OPTIONAL, + IN PFNKSGENERATEEVENTCALLBACK CallBack OPTIONAL, + IN PVOID CallBackContext OPTIONAL + ) +{ + KsGenerateEvents( + Filter, + EventSet, + EventId, + DataSize, + Data, + CallBack, + CallBackContext); +} + +void _inline +KsPinGenerateEvents( + IN PKSPIN Pin, + IN const GUID* EventSet OPTIONAL, + IN ULONG EventId, + IN ULONG DataSize, + IN PVOID Data OPTIONAL, + IN PFNKSGENERATEEVENTCALLBACK CallBack OPTIONAL, + IN PVOID CallBackContext OPTIONAL + ) +{ + KsGenerateEvents( + Pin, + EventSet, + EventId, + DataSize, + Data, + CallBack, + CallBackContext); +} + +typedef enum { + KSSTREAM_POINTER_STATE_UNLOCKED = 0, + KSSTREAM_POINTER_STATE_LOCKED +} KSSTREAM_POINTER_STATE; + +KSDDKAPI +NTSTATUS +NTAPI +KsPinGetAvailableByteCount( + IN PKSPIN Pin, + OUT PLONG InputDataBytes OPTIONAL, + OUT PLONG OutputBufferBytes OPTIONAL + ); + +KSDDKAPI +PKSSTREAM_POINTER +NTAPI +KsPinGetLeadingEdgeStreamPointer( + IN PKSPIN Pin, + IN KSSTREAM_POINTER_STATE State + ); + +KSDDKAPI +PKSSTREAM_POINTER +NTAPI +KsPinGetTrailingEdgeStreamPointer( + IN PKSPIN Pin, + IN KSSTREAM_POINTER_STATE State + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsStreamPointerLock( + IN PKSSTREAM_POINTER StreamPointer + ); + +KSDDKAPI +void +NTAPI +KsStreamPointerUnlock( + IN PKSSTREAM_POINTER StreamPointer, + IN BOOLEAN Eject + ); + +KSDDKAPI +void +NTAPI +KsStreamPointerAdvanceOffsetsAndUnlock( + IN PKSSTREAM_POINTER StreamPointer, + IN ULONG InUsed, + IN ULONG OutUsed, + IN BOOLEAN Eject + ); + +KSDDKAPI +void +NTAPI +KsStreamPointerDelete( + IN PKSSTREAM_POINTER StreamPointer + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsStreamPointerClone( + IN PKSSTREAM_POINTER StreamPointer, + IN PFNKSSTREAMPOINTER CancelCallback OPTIONAL, + IN ULONG ContextSize, + OUT PKSSTREAM_POINTER* CloneStreamPointer + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsStreamPointerAdvanceOffsets( + IN PKSSTREAM_POINTER StreamPointer, + IN ULONG InUsed, + IN ULONG OutUsed, + IN BOOLEAN Eject + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsStreamPointerAdvance( + IN PKSSTREAM_POINTER StreamPointer + ); + +KSDDKAPI +PMDL +NTAPI +KsStreamPointerGetMdl( + IN PKSSTREAM_POINTER StreamPointer + ); + +KSDDKAPI +PIRP +NTAPI +KsStreamPointerGetIrp( + IN PKSSTREAM_POINTER StreamPointer, + OUT PBOOLEAN FirstFrameInIrp OPTIONAL, + OUT PBOOLEAN LastFrameInIrp OPTIONAL + ); + +KSDDKAPI +void +NTAPI +KsStreamPointerScheduleTimeout( + IN PKSSTREAM_POINTER StreamPointer, + IN PFNKSSTREAMPOINTER Callback, + IN ULONGLONG Interval + ); + +KSDDKAPI +void +NTAPI +KsStreamPointerCancelTimeout( + IN PKSSTREAM_POINTER StreamPointer + ); + +KSDDKAPI +PKSSTREAM_POINTER +NTAPI +KsPinGetFirstCloneStreamPointer( + IN PKSPIN Pin + ); + +KSDDKAPI +PKSSTREAM_POINTER +NTAPI +KsStreamPointerGetNextClone( + IN PKSSTREAM_POINTER StreamPointer + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsPinHandshake( + IN PKSPIN Pin, + IN PKSHANDSHAKE In, + OUT PKSHANDSHAKE Out + ); + +KSDDKAPI +void +NTAPI +KsCompletePendingRequest( + IN PIRP Irp + ); + +KSDDKAPI +KSOBJECTTYPE +NTAPI +KsGetObjectTypeFromIrp( + IN PIRP Irp + ); + +KSDDKAPI +PVOID +NTAPI +KsGetObjectFromFileObject( + IN PFILE_OBJECT FileObject + ); + +KSDDKAPI +KSOBJECTTYPE +NTAPI +KsGetObjectTypeFromFileObject( + IN PFILE_OBJECT FileObject + ); + +PKSFILTER __inline +KsGetFilterFromFileObject( + IN PFILE_OBJECT FileObject + ) +{ + return (PKSFILTER) KsGetObjectFromFileObject(FileObject); +} + +PKSPIN __inline +KsGetPinFromFileObject( + IN PFILE_OBJECT FileObject + ) +{ + return (PKSPIN) KsGetObjectFromFileObject(FileObject); +} + +KSDDKAPI +PKSGATE +NTAPI +KsFilterGetAndGate( + IN PKSFILTER Filter + ); + +KSDDKAPI +void +NTAPI +KsFilterAcquireProcessingMutex( + IN PKSFILTER Filter + ); + +KSDDKAPI +void +NTAPI +KsFilterReleaseProcessingMutex( + IN PKSFILTER Filter + ); + +KSDDKAPI +void +NTAPI +KsFilterAttemptProcessing( + IN PKSFILTER Filter, + IN BOOLEAN Asynchronous + ); + +KSDDKAPI +PKSGATE +NTAPI +KsPinGetAndGate( + IN PKSPIN Pin + ); + +KSDDKAPI +void +NTAPI +KsPinAttachAndGate( + IN PKSPIN Pin, + IN PKSGATE AndGate OPTIONAL + ); + +KSDDKAPI +void +NTAPI +KsPinAttachOrGate( + IN PKSPIN Pin, + IN PKSGATE OrGate OPTIONAL + ); + +KSDDKAPI +void +NTAPI +KsPinAcquireProcessingMutex( + IN PKSPIN Pin + ); + +KSDDKAPI +void +NTAPI +KsPinReleaseProcessingMutex( + IN PKSPIN Pin + ); + +KSDDKAPI +BOOLEAN +NTAPI +KsProcessPinUpdate( + IN PKSPROCESSPIN ProcessPin + ); + +KSDDKAPI +void +NTAPI +KsPinAttemptProcessing( + IN PKSPIN Pin, + IN BOOLEAN Asynchronous + ); + +KSDDKAPI +PVOID +NTAPI +KsGetParent( + IN PVOID Object + ); + +PKSDEVICE __inline +KsFilterFactoryGetParentDevice( + IN PKSFILTERFACTORY FilterFactory + ) +{ + return (PKSDEVICE) KsGetParent((PVOID) FilterFactory); +} + +PKSFILTERFACTORY __inline +KsFilterGetParentFilterFactory( + IN PKSFILTER Filter + ) +{ + return (PKSFILTERFACTORY) KsGetParent((PVOID) Filter); +} + +KSDDKAPI +PKSFILTER +NTAPI +KsPinGetParentFilter( + IN PKSPIN Pin + ); + +KSDDKAPI +PVOID +NTAPI +KsGetFirstChild( + IN PVOID Object + ); + +PKSFILTERFACTORY __inline +KsDeviceGetFirstChildFilterFactory( + IN PKSDEVICE Device + ) +{ + return (PKSFILTERFACTORY) KsGetFirstChild((PVOID) Device); +} + +PKSFILTER __inline +KsFilterFactoryGetFirstChildFilter( + IN PKSFILTERFACTORY FilterFactory + ) +{ + return (PKSFILTER) KsGetFirstChild((PVOID) FilterFactory); +} + +KSDDKAPI +ULONG +NTAPI +KsFilterGetChildPinCount( + IN PKSFILTER Filter, + IN ULONG PinId + ); + +KSDDKAPI +PKSPIN +NTAPI +KsFilterGetFirstChildPin( + IN PKSFILTER Filter, + IN ULONG PinId + ); + +KSDDKAPI +PVOID +NTAPI +KsGetNextSibling( + IN PVOID Object + ); + +KSDDKAPI +PKSPIN +NTAPI +KsPinGetNextSiblingPin( + IN PKSPIN Pin + ); + +PKSFILTERFACTORY __inline +KsFilterFactoryGetNextSiblingFilterFactory( + IN PKSFILTERFACTORY FilterFactory + ) +{ + return (PKSFILTERFACTORY) KsGetNextSibling((PVOID) FilterFactory); +} + +PKSFILTER __inline +KsFilterGetNextSiblingFilter( + IN PKSFILTER Filter + ) +{ + return (PKSFILTER) KsGetNextSibling((PVOID) Filter); +} + + +KSDDKAPI +PKSDEVICE +NTAPI +KsGetDevice( + IN PVOID Object + ); + +PKSDEVICE __inline +KsFilterFactoryGetDevice( + IN PKSFILTERFACTORY FilterFactory + ) +{ + return KsGetDevice((PVOID) FilterFactory); +} + +PKSDEVICE __inline +KsFilterGetDevice( + IN PKSFILTER Filter + ) +{ + return KsGetDevice((PVOID) Filter); +} + +PKSDEVICE __inline +KsPinGetDevice( + IN PKSPIN Pin + ) +{ + return KsGetDevice((PVOID) Pin); +} + +KSDDKAPI +PKSFILTER +NTAPI +KsGetFilterFromIrp( + IN PIRP Irp + ); + +KSDDKAPI +PKSPIN +NTAPI +KsGetPinFromIrp( + IN PIRP Irp + ); + +KSDDKAPI +ULONG +NTAPI +KsGetNodeIdFromIrp( + IN PIRP Irp + ); + +KSDDKAPI +void +NTAPI +KsAcquireControl( + IN PVOID Object + ); + +KSDDKAPI +void +NTAPI +KsReleaseControl( + IN PVOID Object + ); + +void __inline +KsFilterAcquireControl( + IN PKSFILTER Filter + ) +{ + KsAcquireControl((PVOID) Filter); +} + +void __inline +KsFilterReleaseControl( + IN PKSFILTER Filter + ) +{ + KsReleaseControl((PVOID) Filter); +} + +void __inline +KsPinAcquireControl( + IN PKSPIN Pin + ) +{ + KsAcquireControl((PVOID) Pin); +} + +void __inline +KsPinReleaseControl( + IN PKSPIN Pin + ) +{ + KsReleaseControl((PVOID) Pin); +} + +KSDDKAPI +NTSTATUS +NTAPI +KsAddItemToObjectBag( + IN KSOBJECT_BAG ObjectBag, + IN PVOID Item, + IN PFNKSFREE Free OPTIONAL + ); + +KSDDKAPI +ULONG +NTAPI +KsRemoveItemFromObjectBag( + IN KSOBJECT_BAG ObjectBag, + IN PVOID Item, + IN BOOLEAN Free + ); + +#define KsDiscard(Object,Pointer)\ + KsRemoveItemFromObjectBag(\ + (Object)->Bag,\ + (PVOID)(Pointer),\ + TRUE) + +KSDDKAPI +NTSTATUS +NTAPI +KsAllocateObjectBag( + IN PKSDEVICE Device, + OUT KSOBJECT_BAG* ObjectBag + ); + +KSDDKAPI +void +NTAPI +KsFreeObjectBag( + IN KSOBJECT_BAG ObjectBag + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsCopyObjectBagItems( + IN KSOBJECT_BAG ObjectBagDestination, + IN KSOBJECT_BAG ObjectBagSource + ); + +KSDDKAPI +NTSTATUS +NTAPI +_KsEdit( + IN KSOBJECT_BAG ObjectBag, + IN OUT PVOID* PointerToPointerToItem, + IN ULONG NewSize, + IN ULONG OldSize, + IN ULONG Tag + ); + +#define KsEdit(Object,PointerToPointer,Tag)\ + _KsEdit(\ + (Object)->Bag,\ + (PVOID*)(PointerToPointer),\ + sizeof(**(PointerToPointer)),\ + sizeof(**(PointerToPointer)),\ + (Tag)) +#define KsEditSized(Object,PointerToPointer,NewSize,OldSize,Tag)\ + _KsEdit((Object)->Bag,(PVOID*)(PointerToPointer),(NewSize),(OldSize),(Tag)) + +KSDDKAPI +NTSTATUS +NTAPI +KsRegisterFilterWithNoKSPins( + IN PDEVICE_OBJECT DeviceObject, + IN const GUID * InterfaceClassGUID, + IN ULONG PinCount, + IN BOOL * PinDirection, + IN KSPIN_MEDIUM * MediumList, + IN OPTIONAL GUID * CategoryList +); + +KSDDKAPI +NTSTATUS +NTAPI +KsFilterCreatePinFactory ( + IN PKSFILTER Filter, + IN const KSPIN_DESCRIPTOR_EX *const PinDescriptor, + OUT PULONG PinID + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsFilterCreateNode ( + IN PKSFILTER Filter, + IN const KSNODE_DESCRIPTOR *const NodeDescriptor, + OUT PULONG NodeID + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsFilterAddTopologyConnections ( + IN PKSFILTER Filter, + IN ULONG NewConnectionsCount, + IN const KSTOPOLOGY_CONNECTION *const NewTopologyConnections + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsPinGetConnectedPinInterface( + IN PKSPIN Pin, + IN const GUID* InterfaceId, + OUT PVOID* Interface + ); + +KSDDKAPI +PFILE_OBJECT +NTAPI +KsPinGetConnectedPinFileObject( + IN PKSPIN Pin + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsPinGetConnectedFilterInterface( + IN PKSPIN Pin, + IN const GUID* InterfaceId, + OUT PVOID* Interface + ); + +#if defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__) + +KSDDKAPI +NTSTATUS +NTAPI +KsPinGetReferenceClockInterface( + IN PKSPIN Pin, + OUT PIKSREFERENCECLOCK* Interface + ); + +#endif //defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__) + +KSDDKAPI +VOID +NTAPI +KsPinSetPinClockTime( + IN PKSPIN Pin, + IN LONGLONG Time + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsPinSubmitFrame( + IN PKSPIN Pin, + IN PVOID Data OPTIONAL, + IN ULONG Size OPTIONAL, + IN PKSSTREAM_HEADER StreamHeader OPTIONAL, + IN PVOID Context OPTIONAL + ); + +KSDDKAPI +NTSTATUS +NTAPI +KsPinSubmitFrameMdl( + IN PKSPIN Pin, + IN PMDL Mdl OPTIONAL, + IN PKSSTREAM_HEADER StreamHeader OPTIONAL, + IN PVOID Context OPTIONAL + ); + +KSDDKAPI +void +NTAPI +KsPinRegisterFrameReturnCallback( + IN PKSPIN Pin, + IN PFNKSPINFRAMERETURN FrameReturn + ); + +KSDDKAPI +void +NTAPI +KsPinRegisterHandshakeCallback( + IN PKSPIN Pin, + IN PFNKSPINHANDSHAKE Handshake + ); + +KSDDKAPI +void +NTAPI +KsFilterRegisterPowerCallbacks( + IN PKSFILTER Filter, + IN PFNKSFILTERPOWER Sleep OPTIONAL, + IN PFNKSFILTERPOWER Wake OPTIONAL + ); + +KSDDKAPI +void +NTAPI +KsPinRegisterPowerCallbacks( + IN PKSPIN Pin, + IN PFNKSPINPOWER Sleep OPTIONAL, + IN PFNKSPINPOWER Wake OPTIONAL + ); + +#if defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__) + +KSDDKAPI +PUNKNOWN +NTAPI +KsRegisterAggregatedClientUnknown( + IN PVOID Object, + IN PUNKNOWN ClientUnknown + ); + +KSDDKAPI +PUNKNOWN +NTAPI +KsGetOuterUnknown( + IN PVOID Object + ); + +PUNKNOWN __inline +KsDeviceRegisterAggregatedClientUnknown( + IN PKSDEVICE Device, + IN PUNKNOWN ClientUnknown + ) +{ + return KsRegisterAggregatedClientUnknown((PVOID) Device,ClientUnknown); +} + +PUNKNOWN __inline +KsDeviceGetOuterUnknown( + IN PKSDEVICE Device + ) +{ + return KsGetOuterUnknown((PVOID) Device); +} + +PUNKNOWN __inline +KsFilterFactoryRegisterAggregatedClientUnknown( + IN PKSFILTERFACTORY FilterFactory, + IN PUNKNOWN ClientUnknown + ) +{ + return KsRegisterAggregatedClientUnknown((PVOID) FilterFactory,ClientUnknown); +} + +PUNKNOWN __inline +KsFilterFactoryGetOuterUnknown( + IN PKSFILTERFACTORY FilterFactory + ) +{ + return KsGetOuterUnknown((PVOID) FilterFactory); +} + +PUNKNOWN __inline +KsFilterRegisterAggregatedClientUnknown( + IN PKSFILTER Filter, + IN PUNKNOWN ClientUnknown + ) +{ + return KsRegisterAggregatedClientUnknown((PVOID) Filter,ClientUnknown); +} + +PUNKNOWN __inline +KsFilterGetOuterUnknown( + IN PKSFILTER Filter + ) +{ + return KsGetOuterUnknown((PVOID) Filter); +} + +PUNKNOWN __inline +KsPinRegisterAggregatedClientUnknown( + IN PKSPIN Pin, + IN PUNKNOWN ClientUnknown + ) +{ + return KsRegisterAggregatedClientUnknown((PVOID) Pin,ClientUnknown); +} + +PUNKNOWN __inline +KsPinGetOuterUnknown( + IN PKSPIN Pin + ) +{ + return KsGetOuterUnknown((PVOID) Pin); +} + +#endif // defined(_UNKNOWN_H_) || defined(__IUnknown_INTERFACE_DEFINED__) + +#else // !defined(_NTDDK_) + +#if !defined( KS_NO_CREATE_FUNCTIONS ) + +KSDDKAPI +DWORD +WINAPI +KsCreateAllocator( + IN HANDLE ConnectionHandle, + IN PKSALLOCATOR_FRAMING AllocatorFraming, + OUT PHANDLE AllocatorHandle + ); + +KSDDKAPI +DWORD +NTAPI +KsCreateClock( + IN HANDLE ConnectionHandle, + IN PKSCLOCK_CREATE ClockCreate, + OUT PHANDLE ClockHandle + ); + +KSDDKAPI +DWORD +WINAPI +KsCreatePin( + IN HANDLE FilterHandle, + IN PKSPIN_CONNECT Connect, + IN ACCESS_MASK DesiredAccess, + OUT PHANDLE ConnectionHandle + ); + +KSDDKAPI +DWORD +WINAPI +KsCreateTopologyNode( + IN HANDLE ParentHandle, + IN PKSNODE_CREATE NodeCreate, + IN ACCESS_MASK DesiredAccess, + OUT PHANDLE NodeHandle + ); + +#endif + +#endif // !defined(_NTDDK_) + +#if defined(__cplusplus) +} +#endif // defined(__cplusplus) + +#endif // !_KS_ diff --git a/windows_libs/mssdk/include/ksguid.h b/windows_libs/mssdk/include/ksguid.h new file mode 100644 index 00000000..60240f5b --- /dev/null +++ b/windows_libs/mssdk/include/ksguid.h @@ -0,0 +1,29 @@ +/*++ + +Copyright (C) Microsoft Corporation, 1996 - 1999 + +Module Name: + + ksguid.h + +Abstract: + + Define guids for non-C++. + +--*/ + +#define INITGUID +#include + +#if defined( DEFINE_GUIDEX ) + #undef DEFINE_GUIDEX +#endif +#define DEFINE_GUIDEX(name) EXTERN_C const CDECL GUID __declspec(selectany) name = { STATICGUIDOF(name) } + +#ifndef STATICGUIDOF + #define STATICGUIDOF(guid) STATIC_##guid +#endif // !defined(STATICGUIDOF) + +#if !defined( DEFINE_WAVEFORMATEX_GUID ) +#define DEFINE_WAVEFORMATEX_GUID(x) (USHORT)(x), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 +#endif diff --git a/windows_libs/mssdk/include/ksmedia.h b/windows_libs/mssdk/include/ksmedia.h new file mode 100644 index 00000000..dd0ce1f5 --- /dev/null +++ b/windows_libs/mssdk/include/ksmedia.h @@ -0,0 +1,4446 @@ +/*++ + +Copyright (C) Microsoft Corporation, 1996 - 2000 + +Module Name: + + ksmedia.h + +Abstract: + + WDM-CSA Multimedia Definitions. + +--*/ + +#if !defined(_KS_) +#error KS.H must be included before KSMEDIA.H +#endif // !defined(_KS_) + +#if !defined(_KSMEDIA_) +#define _KSMEDIA_ + +typedef struct { + KSPROPERTY Property; + KSMULTIPLE_ITEM MultipleItem; +} KSMULTIPLE_DATA_PROP, *PKSMULTIPLE_DATA_PROP; + +#define STATIC_KSMEDIUMSETID_MidiBus \ + 0x05908040L, 0x3246, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("05908040-3246-11D0-A5D6-28DB04C10000", KSMEDIUMSETID_MidiBus); +#define KSMEDIUMSETID_MidiBus DEFINE_GUIDNAMED(KSMEDIUMSETID_MidiBus) + +#define STATIC_KSMEDIUMSETID_VPBus \ + 0xA18C15ECL, 0xCE43, 0x11D0, 0xAB, 0xE7, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("A18C15EC-CE43-11D0-ABE7-00A0C9223196", KSMEDIUMSETID_VPBus); +#define KSMEDIUMSETID_VPBus DEFINE_GUIDNAMED(KSMEDIUMSETID_VPBus) + +#define STATIC_KSINTERFACESETID_Media \ + 0x3A13EB40L, 0x30A7, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("3A13EB40-30A7-11D0-A5D6-28DB04C10000", KSINTERFACESETID_Media); +#define KSINTERFACESETID_Media DEFINE_GUIDNAMED(KSINTERFACESETID_Media) + +typedef enum { + KSINTERFACE_MEDIA_MUSIC, + KSINTERFACE_MEDIA_WAVE_BUFFERED, + KSINTERFACE_MEDIA_WAVE_QUEUED +} KSINTERFACE_MEDIA; + + +// USB Terminals +#define INIT_USB_TERMINAL(guid, id)\ +{\ + (guid)->Data1 = 0xDFF219E0 + (USHORT)(id);\ + (guid)->Data2 = 0xF70F;\ + (guid)->Data3 = 0x11D0;\ + (guid)->Data4[0] = 0xb9;\ + (guid)->Data4[1] = 0x17;\ + (guid)->Data4[2] = 0x00;\ + (guid)->Data4[3] = 0xa0;\ + (guid)->Data4[4] = 0xc9;\ + (guid)->Data4[5] = 0x22;\ + (guid)->Data4[6] = 0x31;\ + (guid)->Data4[7] = 0x96;\ +} +#define EXTRACT_USB_TERMINAL(guid)\ + (USHORT)((guid)->Data1 - 0xDFF219E0) +#define DEFINE_USB_TERMINAL_GUID(id)\ + 0xDFF219E0+(USHORT)(id), 0xF70F, 0x11D0, 0xB9, 0x17, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 + +#define STATIC_KSNODETYPE_MICROPHONE\ + DEFINE_USB_TERMINAL_GUID(0x0201) +DEFINE_GUIDSTRUCT("DFF21BE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_MICROPHONE); +#define KSNODETYPE_MICROPHONE DEFINE_GUIDNAMED(KSNODETYPE_MICROPHONE) + +#define STATIC_KSNODETYPE_DESKTOP_MICROPHONE\ + DEFINE_USB_TERMINAL_GUID(0x0202) +DEFINE_GUIDSTRUCT("DFF21BE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DESKTOP_MICROPHONE); +#define KSNODETYPE_DESKTOP_MICROPHONE DEFINE_GUIDNAMED(KSNODETYPE_DESKTOP_MICROPHONE) + +#define STATIC_KSNODETYPE_PERSONAL_MICROPHONE\ + DEFINE_USB_TERMINAL_GUID(0x0203) +DEFINE_GUIDSTRUCT("DFF21BE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_PERSONAL_MICROPHONE); +#define KSNODETYPE_PERSONAL_MICROPHONE DEFINE_GUIDNAMED(KSNODETYPE_PERSONAL_MICROPHONE) + +#define STATIC_KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE\ + DEFINE_USB_TERMINAL_GUID(0x0204) +DEFINE_GUIDSTRUCT("DFF21BE4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE); +#define KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE DEFINE_GUIDNAMED(KSNODETYPE_OMNI_DIRECTIONAL_MICROPHONE) + +#define STATIC_KSNODETYPE_MICROPHONE_ARRAY\ + DEFINE_USB_TERMINAL_GUID(0x0205) +DEFINE_GUIDSTRUCT("DFF21BE5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_MICROPHONE_ARRAY); +#define KSNODETYPE_MICROPHONE_ARRAY DEFINE_GUIDNAMED(KSNODETYPE_MICROPHONE_ARRAY) + +#define STATIC_KSNODETYPE_PROCESSING_MICROPHONE_ARRAY\ + DEFINE_USB_TERMINAL_GUID(0x0206) +DEFINE_GUIDSTRUCT("DFF21BE6-F70F-11D0-B917-00A0C9223196", KSNODETYPE_PROCESSING_MICROPHONE_ARRAY); +#define KSNODETYPE_PROCESSING_MICROPHONE_ARRAY DEFINE_GUIDNAMED(KSNODETYPE_PROCESSING_MICROPHONE_ARRAY) + +#define STATIC_KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR \ + 0x830a44f2, 0xa32d, 0x476b, 0xbe, 0x97, 0x42, 0x84, 0x56, 0x73, 0xb3, 0x5a +DEFINE_GUIDSTRUCT("830a44f2-a32d-476b-be97-42845673b35a", KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR); +#define KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR DEFINE_GUIDNAMED(KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR) + +#define STATIC_KSNODETYPE_SPEAKER\ + DEFINE_USB_TERMINAL_GUID(0x0301) +DEFINE_GUIDSTRUCT("DFF21CE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SPEAKER); +#define KSNODETYPE_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_SPEAKER) + +#define STATIC_KSNODETYPE_HEADPHONES\ + DEFINE_USB_TERMINAL_GUID(0x0302) +DEFINE_GUIDSTRUCT("DFF21CE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_HEADPHONES); +#define KSNODETYPE_HEADPHONES DEFINE_GUIDNAMED(KSNODETYPE_HEADPHONES) + +#define STATIC_KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO\ + DEFINE_USB_TERMINAL_GUID(0x0303) +DEFINE_GUIDSTRUCT("DFF21CE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO); +#define KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_HEAD_MOUNTED_DISPLAY_AUDIO) + +#define STATIC_KSNODETYPE_DESKTOP_SPEAKER\ + DEFINE_USB_TERMINAL_GUID(0x0304) +DEFINE_GUIDSTRUCT("DFF21CE4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DESKTOP_SPEAKER); +#define KSNODETYPE_DESKTOP_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_DESKTOP_SPEAKER) + +#define STATIC_KSNODETYPE_ROOM_SPEAKER\ + DEFINE_USB_TERMINAL_GUID(0x0305) +DEFINE_GUIDSTRUCT("DFF21CE5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ROOM_SPEAKER); +#define KSNODETYPE_ROOM_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_ROOM_SPEAKER) + +#define STATIC_KSNODETYPE_COMMUNICATION_SPEAKER\ + DEFINE_USB_TERMINAL_GUID(0x0306) +DEFINE_GUIDSTRUCT("DFF21CE6-F70F-11D0-B917-00A0C9223196", KSNODETYPE_COMMUNICATION_SPEAKER); +#define KSNODETYPE_COMMUNICATION_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_COMMUNICATION_SPEAKER) + +#define STATIC_KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER\ + DEFINE_USB_TERMINAL_GUID(0x0307) +DEFINE_GUIDSTRUCT("DFF21CE7-F70F-11D0-B917-00A0C9223196", KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER); +#define KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER DEFINE_GUIDNAMED(KSNODETYPE_LOW_FREQUENCY_EFFECTS_SPEAKER) + +#define STATIC_KSNODETYPE_HANDSET\ + DEFINE_USB_TERMINAL_GUID(0x0401) +DEFINE_GUIDSTRUCT("DFF21DE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_HANDSET); +#define KSNODETYPE_HANDSET DEFINE_GUIDNAMED(KSNODETYPE_HANDSET) + +#define STATIC_KSNODETYPE_HEADSET\ + DEFINE_USB_TERMINAL_GUID(0x0402) +DEFINE_GUIDSTRUCT("DFF21DE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_HEADSET); +#define KSNODETYPE_HEADSET DEFINE_GUIDNAMED(KSNODETYPE_HEADSET) + +#define STATIC_KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION\ + DEFINE_USB_TERMINAL_GUID(0x0403) +DEFINE_GUIDSTRUCT("DFF21DE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION); +#define KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION DEFINE_GUIDNAMED(KSNODETYPE_SPEAKERPHONE_NO_ECHO_REDUCTION) + +#define STATIC_KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE\ + DEFINE_USB_TERMINAL_GUID(0x0404) +DEFINE_GUIDSTRUCT("DFF21DE4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE); +#define KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE DEFINE_GUIDNAMED(KSNODETYPE_ECHO_SUPPRESSING_SPEAKERPHONE) + +#define STATIC_KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE\ + DEFINE_USB_TERMINAL_GUID(0x0405) +DEFINE_GUIDSTRUCT("DFF21DE5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE); +#define KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE DEFINE_GUIDNAMED(KSNODETYPE_ECHO_CANCELING_SPEAKERPHONE) + +#define STATIC_KSNODETYPE_PHONE_LINE\ + DEFINE_USB_TERMINAL_GUID(0x0501) +DEFINE_GUIDSTRUCT("DFF21EE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_PHONE_LINE); +#define KSNODETYPE_PHONE_LINE DEFINE_GUIDNAMED(KSNODETYPE_PHONE_LINE) + +#define STATIC_KSNODETYPE_TELEPHONE\ + DEFINE_USB_TERMINAL_GUID(0x0502) +DEFINE_GUIDSTRUCT("DFF21EE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_TELEPHONE); +#define KSNODETYPE_TELEPHONE DEFINE_GUIDNAMED(KSNODETYPE_TELEPHONE) + +#define STATIC_KSNODETYPE_DOWN_LINE_PHONE\ + DEFINE_USB_TERMINAL_GUID(0x0503) +DEFINE_GUIDSTRUCT("DFF21EE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DOWN_LINE_PHONE); +#define KSNODETYPE_DOWN_LINE_PHONE DEFINE_GUIDNAMED(KSNODETYPE_DOWN_LINE_PHONE) + +#define STATIC_KSNODETYPE_ANALOG_CONNECTOR\ + DEFINE_USB_TERMINAL_GUID(0x601) +DEFINE_GUIDSTRUCT("DFF21FE1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ANALOG_CONNECTOR); +#define KSNODETYPE_ANALOG_CONNECTOR DEFINE_GUIDNAMED(KSNODETYPE_ANALOG_CONNECTOR) + +#define STATIC_KSNODETYPE_DIGITAL_AUDIO_INTERFACE\ + DEFINE_USB_TERMINAL_GUID(0x0602) +DEFINE_GUIDSTRUCT("DFF21FE2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DIGITAL_AUDIO_INTERFACE); +#define KSNODETYPE_DIGITAL_AUDIO_INTERFACE DEFINE_GUIDNAMED(KSNODETYPE_DIGITAL_AUDIO_INTERFACE) + +#define STATIC_KSNODETYPE_LINE_CONNECTOR\ + DEFINE_USB_TERMINAL_GUID(0x0603) +DEFINE_GUIDSTRUCT("DFF21FE3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_LINE_CONNECTOR); +#define KSNODETYPE_LINE_CONNECTOR DEFINE_GUIDNAMED(KSNODETYPE_LINE_CONNECTOR) + +#define STATIC_KSNODETYPE_LEGACY_AUDIO_CONNECTOR\ + DEFINE_USB_TERMINAL_GUID(0x0604) +DEFINE_GUIDSTRUCT("DFF21FE4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_LEGACY_AUDIO_CONNECTOR); +#define KSNODETYPE_LEGACY_AUDIO_CONNECTOR DEFINE_GUIDNAMED(KSNODETYPE_LEGACY_AUDIO_CONNECTOR) + +#define STATIC_KSNODETYPE_SPDIF_INTERFACE\ + DEFINE_USB_TERMINAL_GUID(0x0605) +DEFINE_GUIDSTRUCT("DFF21FE5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SPDIF_INTERFACE); +#define KSNODETYPE_SPDIF_INTERFACE DEFINE_GUIDNAMED(KSNODETYPE_SPDIF_INTERFACE) + +#define STATIC_KSNODETYPE_1394_DA_STREAM\ + DEFINE_USB_TERMINAL_GUID(0x0606) +DEFINE_GUIDSTRUCT("DFF21FE6-F70F-11D0-B917-00A0C9223196", KSNODETYPE_1394_DA_STREAM); +#define KSNODETYPE_1394_DA_STREAM DEFINE_GUIDNAMED(KSNODETYPE_1394_DA_STREAM) + +#define STATIC_KSNODETYPE_1394_DV_STREAM_SOUNDTRACK\ + DEFINE_USB_TERMINAL_GUID(0x0607) +DEFINE_GUIDSTRUCT("DFF21FE7-F70F-11D0-B917-00A0C9223196", KSNODETYPE_1394_DV_STREAM_SOUNDTRACK); +#define KSNODETYPE_1394_DV_STREAM_SOUNDTRACK DEFINE_GUIDNAMED(KSNODETYPE_1394_DV_STREAM_SOUNDTRACK) + +#define STATIC_KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE\ + DEFINE_USB_TERMINAL_GUID(0x0701) +DEFINE_GUIDSTRUCT("DFF220E1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE); +#define KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE DEFINE_GUIDNAMED(KSNODETYPE_LEVEL_CALIBRATION_NOISE_SOURCE) + +#define STATIC_KSNODETYPE_EQUALIZATION_NOISE\ + DEFINE_USB_TERMINAL_GUID(0x0702) +DEFINE_GUIDSTRUCT("DFF220E2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_EQUALIZATION_NOISE); +#define KSNODETYPE_EQUALIZATION_NOISE DEFINE_GUIDNAMED(KSNODETYPE_EQUALIZATION_NOISE) + +#define STATIC_KSNODETYPE_CD_PLAYER\ + DEFINE_USB_TERMINAL_GUID(0x0703) +DEFINE_GUIDSTRUCT("DFF220E3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_CD_PLAYER); +#define KSNODETYPE_CD_PLAYER DEFINE_GUIDNAMED(KSNODETYPE_CD_PLAYER) + +#define STATIC_KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE\ + DEFINE_USB_TERMINAL_GUID(0x0704) +DEFINE_GUIDSTRUCT("DFF220E4-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE); +#define KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE DEFINE_GUIDNAMED(KSNODETYPE_DAT_IO_DIGITAL_AUDIO_TAPE) + +#define STATIC_KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE\ + DEFINE_USB_TERMINAL_GUID(0x0705) +DEFINE_GUIDSTRUCT("DFF220E5-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE); +#define KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE DEFINE_GUIDNAMED(KSNODETYPE_DCC_IO_DIGITAL_COMPACT_CASSETTE) + +#define STATIC_KSNODETYPE_MINIDISK\ + DEFINE_USB_TERMINAL_GUID(0x0706) +DEFINE_GUIDSTRUCT("DFF220E6-F70F-11D0-B917-00A0C9223196", KSNODETYPE_MINIDISK); +#define KSNODETYPE_MINIDISK DEFINE_GUIDNAMED(KSNODETYPE_MINIDISK) + +#define STATIC_KSNODETYPE_ANALOG_TAPE\ + DEFINE_USB_TERMINAL_GUID(0x0707) +DEFINE_GUIDSTRUCT("DFF220E7-F70F-11D0-B917-00A0C9223196", KSNODETYPE_ANALOG_TAPE); +#define KSNODETYPE_ANALOG_TAPE DEFINE_GUIDNAMED(KSNODETYPE_ANALOG_TAPE) + +#define STATIC_KSNODETYPE_PHONOGRAPH\ + DEFINE_USB_TERMINAL_GUID(0x0708) +DEFINE_GUIDSTRUCT("DFF220E8-F70F-11D0-B917-00A0C9223196", KSNODETYPE_PHONOGRAPH); +#define KSNODETYPE_PHONOGRAPH DEFINE_GUIDNAMED(KSNODETYPE_PHONOGRAPH) + +#define STATIC_KSNODETYPE_VCR_AUDIO\ + DEFINE_USB_TERMINAL_GUID(0x0708) +DEFINE_GUIDSTRUCT("DFF220E9-F70F-11D0-B917-00A0C9223196", KSNODETYPE_VCR_AUDIO); +#define KSNODETYPE_VCR_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_VCR_AUDIO) + +#define STATIC_KSNODETYPE_VIDEO_DISC_AUDIO\ + DEFINE_USB_TERMINAL_GUID(0x070A) +DEFINE_GUIDSTRUCT("DFF220EA-F70F-11D0-B917-00A0C9223196", KSNODETYPE_VIDEO_DISC_AUDIO); +#define KSNODETYPE_VIDEO_DISC_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_VIDEO_DISC_AUDIO) + +#define STATIC_KSNODETYPE_DVD_AUDIO\ + DEFINE_USB_TERMINAL_GUID(0x070B) +DEFINE_GUIDSTRUCT("DFF220EB-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DVD_AUDIO); +#define KSNODETYPE_DVD_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_DVD_AUDIO) + +#define STATIC_KSNODETYPE_TV_TUNER_AUDIO\ + DEFINE_USB_TERMINAL_GUID(0x070C) +DEFINE_GUIDSTRUCT("DFF220EC-F70F-11D0-B917-00A0C9223196", KSNODETYPE_TV_TUNER_AUDIO); +#define KSNODETYPE_TV_TUNER_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_TV_TUNER_AUDIO) + +#define STATIC_KSNODETYPE_SATELLITE_RECEIVER_AUDIO\ + DEFINE_USB_TERMINAL_GUID(0x070D) +DEFINE_GUIDSTRUCT("DFF220ED-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SATELLITE_RECEIVER_AUDIO); +#define KSNODETYPE_SATELLITE_RECEIVER_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_SATELLITE_RECEIVER_AUDIO) + +#define STATIC_KSNODETYPE_CABLE_TUNER_AUDIO\ + DEFINE_USB_TERMINAL_GUID(0x070E) +DEFINE_GUIDSTRUCT("DFF220EE-F70F-11D0-B917-00A0C9223196", KSNODETYPE_CABLE_TUNER_AUDIO); +#define KSNODETYPE_CABLE_TUNER_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_CABLE_TUNER_AUDIO) + +#define STATIC_KSNODETYPE_DSS_AUDIO\ + DEFINE_USB_TERMINAL_GUID(0x070F) +DEFINE_GUIDSTRUCT("DFF220EF-F70F-11D0-B917-00A0C9223196", KSNODETYPE_DSS_AUDIO); +#define KSNODETYPE_DSS_AUDIO DEFINE_GUIDNAMED(KSNODETYPE_DSS_AUDIO) + +#define STATIC_KSNODETYPE_RADIO_RECEIVER\ + DEFINE_USB_TERMINAL_GUID(0x0710) +DEFINE_GUIDSTRUCT("DFF220F0-F70F-11D0-B917-00A0C9223196", KSNODETYPE_RADIO_RECEIVER); +#define KSNODETYPE_RADIO_RECEIVER DEFINE_GUIDNAMED(KSNODETYPE_RADIO_RECEIVER) + +#define STATIC_KSNODETYPE_RADIO_TRANSMITTER\ + DEFINE_USB_TERMINAL_GUID(0x0711) +DEFINE_GUIDSTRUCT("DFF220F1-F70F-11D0-B917-00A0C9223196", KSNODETYPE_RADIO_TRANSMITTER); +#define KSNODETYPE_RADIO_TRANSMITTER DEFINE_GUIDNAMED(KSNODETYPE_RADIO_TRANSMITTER) + +#define STATIC_KSNODETYPE_MULTITRACK_RECORDER\ + DEFINE_USB_TERMINAL_GUID(0x0712) +DEFINE_GUIDSTRUCT("DFF220F2-F70F-11D0-B917-00A0C9223196", KSNODETYPE_MULTITRACK_RECORDER); +#define KSNODETYPE_MULTITRACK_RECORDER DEFINE_GUIDNAMED(KSNODETYPE_MULTITRACK_RECORDER) + +#define STATIC_KSNODETYPE_SYNTHESIZER\ + DEFINE_USB_TERMINAL_GUID(0x0713) +DEFINE_GUIDSTRUCT("DFF220F3-F70F-11D0-B917-00A0C9223196", KSNODETYPE_SYNTHESIZER); +#define KSNODETYPE_SYNTHESIZER DEFINE_GUIDNAMED(KSNODETYPE_SYNTHESIZER) + +// Microsoft's WDMAUD virtual swsynth pin name guid + +#define STATIC_KSNODETYPE_SWSYNTH\ + 0x423274A0L, 0x8B81, 0x11D1, 0xA0, 0x50, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88 +DEFINE_GUIDSTRUCT("423274A0-8B81-11D1-A050-0000F8004788", KSNODETYPE_SWSYNTH); +#define KSNODETYPE_SWSYNTH DEFINE_GUIDNAMED(KSNODETYPE_SWSYNTH) + +// Microsoft's SWMIDI midi pin and node name guid + +#define STATIC_KSNODETYPE_SWMIDI\ + 0xCB9BEFA0L, 0xA251, 0x11D1, 0xA0, 0x50, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88 +DEFINE_GUIDSTRUCT("CB9BEFA0-A251-11D1-A050-0000F8004788", KSNODETYPE_SWMIDI); +#define KSNODETYPE_SWMIDI DEFINE_GUIDNAMED(KSNODETYPE_SWMIDI) + +#define STATIC_KSNODETYPE_DRM_DESCRAMBLE\ + 0xFFBB6E3FL, 0xCCFE, 0x4D84, 0x90, 0xD9, 0x42, 0x14, 0x18, 0xB0, 0x3A, 0x8E +DEFINE_GUIDSTRUCT("FFBB6E3F-CCFE-4D84-90D9-421418B03A8E", KSNODETYPE_DRM_DESCRAMBLE); +#define KSNODETYPE_DRM_DESCRAMBLE DEFINE_GUIDNAMED(KSNODETYPE_DRM_DESCRAMBLE) + +// General categories +#define STATIC_KSCATEGORY_AUDIO \ + 0x6994AD04L, 0x93EF, 0x11D0, 0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("6994AD04-93EF-11D0-A3CC-00A0C9223196", KSCATEGORY_AUDIO); +#define KSCATEGORY_AUDIO DEFINE_GUIDNAMED(KSCATEGORY_AUDIO) + +#define STATIC_KSCATEGORY_VIDEO \ + 0x6994AD05L, 0x93EF, 0x11D0, 0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("6994AD05-93EF-11D0-A3CC-00A0C9223196", KSCATEGORY_VIDEO); +#define KSCATEGORY_VIDEO DEFINE_GUIDNAMED(KSCATEGORY_VIDEO) + +#define STATIC_KSCATEGORY_TEXT \ + 0x6994AD06L, 0x93EF, 0x11D0, 0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("6994AD06-93EF-11D0-A3CC-00A0C9223196", KSCATEGORY_TEXT); +#define KSCATEGORY_TEXT DEFINE_GUIDNAMED(KSCATEGORY_TEXT) + +#define STATIC_KSCATEGORY_NETWORK \ + 0x67C9CC3CL, 0x69C4, 0x11D2, 0x87, 0x59, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("67C9CC3C-69C4-11D2-8759-00A0C9223196", KSCATEGORY_NETWORK); +#define KSCATEGORY_NETWORK DEFINE_GUIDNAMED(KSCATEGORY_NETWORK) + +#define STATIC_KSCATEGORY_TOPOLOGY \ + 0xDDA54A40L, 0x1E4C, 0x11D1, 0xA0, 0x50, 0x40, 0x57, 0x05, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("DDA54A40-1E4C-11D1-A050-405705C10000", KSCATEGORY_TOPOLOGY); +#define KSCATEGORY_TOPOLOGY DEFINE_GUIDNAMED(KSCATEGORY_TOPOLOGY) + +#define STATIC_KSCATEGORY_VIRTUAL \ + 0x3503EAC4L, 0x1F26, 0x11D1, 0x8A, 0xB0, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("3503EAC4-1F26-11D1-8AB0-00A0C9223196", KSCATEGORY_VIRTUAL); +#define KSCATEGORY_VIRTUAL DEFINE_GUIDNAMED(KSCATEGORY_VIRTUAL) + +#define STATIC_KSCATEGORY_ACOUSTIC_ECHO_CANCEL \ + 0xBF963D80L, 0xC559, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("BF963D80-C559-11D0-8A2B-00A0C9255AC1", KSCATEGORY_ACOUSTIC_ECHO_CANCEL); +#define KSCATEGORY_ACOUSTIC_ECHO_CANCEL DEFINE_GUIDNAMED(KSCATEGORY_ACOUSTIC_ECHO_CANCEL) + + +#define STATIC_KSCATEGORY_SYSAUDIO \ + 0xA7C7A5B1L, 0x5AF3, 0x11D1, 0x9C, 0xED, 0x00, 0xA0, 0x24, 0xBF, 0x04, 0x07 +DEFINE_GUIDSTRUCT("A7C7A5B1-5AF3-11D1-9CED-00A024BF0407", KSCATEGORY_SYSAUDIO); +#define KSCATEGORY_SYSAUDIO DEFINE_GUIDNAMED(KSCATEGORY_SYSAUDIO) + +#define STATIC_KSCATEGORY_WDMAUD \ + 0x3E227E76L, 0x690D, 0x11D2, 0x81, 0x61, 0x00, 0x00, 0xF8, 0x77, 0x5B, 0xF1 +DEFINE_GUIDSTRUCT("3E227E76-690D-11D2-8161-0000F8775BF1", KSCATEGORY_WDMAUD); +#define KSCATEGORY_WDMAUD DEFINE_GUIDNAMED(KSCATEGORY_WDMAUD) + +#define STATIC_KSCATEGORY_AUDIO_GFX \ + 0x9BAF9572L, 0x340C, 0x11D3, 0xAB, 0xDC, 0x00, 0xA0, 0xC9, 0x0A, 0xB1, 0x6F +DEFINE_GUIDSTRUCT("9BAF9572-340C-11D3-ABDC-00A0C90AB16F", KSCATEGORY_AUDIO_GFX); +#define KSCATEGORY_AUDIO_GFX DEFINE_GUIDNAMED(KSCATEGORY_AUDIO_GFX) + +#define STATIC_KSCATEGORY_AUDIO_SPLITTER \ + 0x9EA331FAL, 0xB91B, 0x45F8, 0x92, 0x85, 0xBD, 0x2B, 0xC7, 0x7A, 0xFC, 0xDE +DEFINE_GUIDSTRUCT("9EA331FA-B91B-45F8-9285-BD2BC77AFCDE", KSCATEGORY_AUDIO_SPLITTER); +#define KSCATEGORY_AUDIO_SPLITTER DEFINE_GUIDNAMED(KSCATEGORY_AUDIO_SPLITTER) + +#define STATIC_KSCATEGORY_SYNTHESIZER STATIC_KSNODETYPE_SYNTHESIZER +#define KSCATEGORY_SYNTHESIZER KSNODETYPE_SYNTHESIZER + +#define STATIC_KSCATEGORY_DRM_DESCRAMBLE STATIC_KSNODETYPE_DRM_DESCRAMBLE +#define KSCATEGORY_DRM_DESCRAMBLE KSNODETYPE_DRM_DESCRAMBLE + +#define STATIC_KSCATEGORY_AUDIO_DEVICE \ + 0xFBF6F530L, 0x07B9, 0x11D2, 0xA7, 0x1E, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88 +DEFINE_GUIDSTRUCT("FBF6F530-07B9-11D2-A71E-0000F8004788", KSCATEGORY_AUDIO_DEVICE); +#define KSCATEGORY_AUDIO_DEVICE DEFINE_GUIDNAMED(KSCATEGORY_AUDIO_DEVICE) + +#define STATIC_KSCATEGORY_PREFERRED_WAVEOUT_DEVICE \ + 0xD6C5066EL, 0x72C1, 0x11D2, 0x97, 0x55, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88 +DEFINE_GUIDSTRUCT("D6C5066E-72C1-11D2-9755-0000F8004788", KSCATEGORY_PREFERRED_WAVEOUT_DEVICE); +#define KSCATEGORY_PREFERRED_WAVEOUT_DEVICE DEFINE_GUIDNAMED(KSCATEGORY_PREFERRED_WAVEOUT_DEVICE) + +#define STATIC_KSCATEGORY_PREFERRED_WAVEIN_DEVICE \ + 0xD6C50671L, 0x72C1, 0x11D2, 0x97, 0x55, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88 +DEFINE_GUIDSTRUCT("D6C50671-72C1-11D2-9755-0000F8004788", KSCATEGORY_PREFERRED_WAVEIN_DEVICE); +#define KSCATEGORY_PREFERRED_WAVEIN_DEVICE DEFINE_GUIDNAMED(KSCATEGORY_PREFERRED_WAVEIN_DEVICE) + +#define STATIC_KSCATEGORY_PREFERRED_MIDIOUT_DEVICE \ + 0xD6C50674L, 0x72C1, 0x11D2, 0x97, 0x55, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88 +DEFINE_GUIDSTRUCT("D6C50674-72C1-11D2-9755-0000F8004788", KSCATEGORY_PREFERRED_MIDIOUT_DEVICE); +#define KSCATEGORY_PREFERRED_MIDIOUT_DEVICE DEFINE_GUIDNAMED(KSCATEGORY_PREFERRED_MIDIOUT_DEVICE) + +// Special pin category for wdmaud + +#define STATIC_KSCATEGORY_WDMAUD_USE_PIN_NAME \ + 0x47A4FA20L, 0xA251, 0x11D1, 0xA0, 0x50, 0x00, 0x00, 0xF8, 0x00, 0x47, 0x88 +DEFINE_GUIDSTRUCT("47A4FA20-A251-11D1-A050-0000F8004788", KSCATEGORY_WDMAUD_USE_PIN_NAME); +#define KSCATEGORY_WDMAUD_USE_PIN_NAME DEFINE_GUIDNAMED(KSCATEGORY_WDMAUD_USE_PIN_NAME) + +// Escalante Platform Interface + +#define STATIC_KSCATEGORY_ESCALANTE_PLATFORM_DRIVER \ + 0x74f3aea8L, 0x9768, 0x11d1, 0x8e, 0x07, 0x00, 0xa0, 0xc9, 0x5e, 0xc2, 0x2e +DEFINE_GUIDSTRUCT("74f3aea8-9768-11d1-8e07-00a0c95ec22e", KSCATEGORY_ESCALANTE_PLATFORM_DRIVER); +#define KSCATEGORY_ESCALANTE_PLATFORM_DRIVER DEFINE_GUIDNAMED(KSCATEGORY_ESCALANTE_PLATFORM_DRIVER) + +// -- major types --- + +// 'vids' == MEDIATYPE_Video, +#define STATIC_KSDATAFORMAT_TYPE_VIDEO\ + 0x73646976L, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 +DEFINE_GUIDSTRUCT("73646976-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_VIDEO); +#define KSDATAFORMAT_TYPE_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_VIDEO) + +// 'auds' == MEDIATYPE_Audio +#define STATIC_KSDATAFORMAT_TYPE_AUDIO\ + 0x73647561L, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 +DEFINE_GUIDSTRUCT("73647561-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_AUDIO); +#define KSDATAFORMAT_TYPE_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_AUDIO) + +// 'txts' == MEDIATYPE_Text +#define STATIC_KSDATAFORMAT_TYPE_TEXT\ + 0x73747874L, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 +DEFINE_GUIDSTRUCT("73747874-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_TEXT); +#define KSDATAFORMAT_TYPE_TEXT DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_TEXT) + +#if !defined( DEFINE_WAVEFORMATEX_GUID ) +#define DEFINE_WAVEFORMATEX_GUID(x) (USHORT)(x), 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 +#endif + +#define STATIC_KSDATAFORMAT_SUBTYPE_WAVEFORMATEX\ + 0x00000000L, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 +DEFINE_GUIDSTRUCT("00000000-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_WAVEFORMATEX); +#define KSDATAFORMAT_SUBTYPE_WAVEFORMATEX DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_WAVEFORMATEX) + +#define INIT_WAVEFORMATEX_GUID(Guid, x)\ +{\ + *(Guid) = KSDATAFORMAT_SUBTYPE_WAVEFORMATEX;\ + (Guid)->Data1 = (USHORT)(x);\ +} + +#define EXTRACT_WAVEFORMATEX_ID(Guid)\ + (USHORT)((Guid)->Data1) + +#define IS_VALID_WAVEFORMATEX_GUID(Guid)\ + (!memcmp(((PUSHORT)&KSDATAFORMAT_SUBTYPE_WAVEFORMATEX) + 1, ((PUSHORT)(Guid)) + 1, sizeof(GUID) - sizeof(USHORT))) + +#if !defined(INIT_MMREG_MID) +//{d5a47fa7-6d98-11d1-a21a-00a0c9223196} +#define INIT_MMREG_MID(guid, id)\ +{\ + (guid)->Data1 = 0xd5a47fa7 + (USHORT)(id);\ + (guid)->Data2 = 0x6d98;\ + (guid)->Data3 = 0x11d1;\ + (guid)->Data4[0] = 0xa2;\ + (guid)->Data4[1] = 0x1a;\ + (guid)->Data4[2] = 0x00;\ + (guid)->Data4[3] = 0xa0;\ + (guid)->Data4[4] = 0xc9;\ + (guid)->Data4[5] = 0x22;\ + (guid)->Data4[6] = 0x31;\ + (guid)->Data4[7] = 0x96;\ +} +#define EXTRACT_MMREG_MID(guid)\ + (USHORT)((guid)->Data1 - 0xd5a47fa7) +#define DEFINE_MMREG_MID_GUID(id)\ + 0xd5a47fa7+(USHORT)(id), 0x6d98, 0x11d1, 0xa2, 0x1a, 0x00, 0xa0, 0xc9, 0x22, 0x31, 0x96 + +#define IS_COMPATIBLE_MMREG_MID(guid)\ + (((guid)->Data1 >= 0xd5a47fa7) &&\ + ((guid)->Data1 < 0xd5a47fa7 + 0xffff) &&\ + ((guid)->Data2 == 0x6d98) &&\ + ((guid)->Data3 == 0x11d1) &&\ + ((guid)->Data4[0] == 0xa2) &&\ + ((guid)->Data4[1] == 0x1a) &&\ + ((guid)->Data4[2] == 0x00) &&\ + ((guid)->Data4[3] == 0xa0) &&\ + ((guid)->Data4[4] == 0xc9) &&\ + ((guid)->Data4[5] == 0x22) &&\ + ((guid)->Data4[6] == 0x31) &&\ + ((guid)->Data4[7] == 0x96)) +#endif // !defined(INIT_MMREG_MID) + +#if !defined(INIT_MMREG_PID) +//{e36dc2ac-6d9a-11d1-a21a-00a0c9223196} +#define INIT_MMREG_PID(guid, id)\ +{\ + (guid)->Data1 = 0xe36dc2ac + (USHORT)(id);\ + (guid)->Data2 = 0x6d9a;\ + (guid)->Data3 = 0x11d1;\ + (guid)->Data4[0] = 0xa2;\ + (guid)->Data4[1] = 0x1a;\ + (guid)->Data4[2] = 0x00;\ + (guid)->Data4[3] = 0xa0;\ + (guid)->Data4[4] = 0xc9;\ + (guid)->Data4[5] = 0x22;\ + (guid)->Data4[6] = 0x31;\ + (guid)->Data4[7] = 0x96;\ +} +#define EXTRACT_MMREG_PID(guid)\ + (USHORT)((guid)->Data1 - 0xe36dc2ac) +#define DEFINE_MMREG_PID_GUID(id)\ + 0xe36dc2ac+(USHORT)(id), 0x6d9a, 0x11d1, 0xa2, 0x1a, 0x00, 0xa0, 0xc9, 0x22, 0x31, 0x96 + +#define IS_COMPATIBLE_MMREG_PID(guid)\ + (((guid)->Data1 >= 0xe36dc2ac) &&\ + ((guid)->Data1 < 0xe36dc2ac + 0xffff) &&\ + ((guid)->Data2 == 0x6d9a) &&\ + ((guid)->Data3 == 0x11d1) &&\ + ((guid)->Data4[0] == 0xa2) &&\ + ((guid)->Data4[1] == 0x1a) &&\ + ((guid)->Data4[2] == 0x00) &&\ + ((guid)->Data4[3] == 0xa0) &&\ + ((guid)->Data4[4] == 0xc9) &&\ + ((guid)->Data4[5] == 0x22) &&\ + ((guid)->Data4[6] == 0x31) &&\ + ((guid)->Data4[7] == 0x96)) +#endif // !defined(INIT_MMREG_PID) + +#define STATIC_KSDATAFORMAT_SUBTYPE_ANALOG\ + 0x6dba3190L, 0x67bd, 0x11cf, 0xa0, 0xf7, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4 +DEFINE_GUIDSTRUCT("6dba3190-67bd-11cf-a0f7-0020afd156e4", KSDATAFORMAT_SUBTYPE_ANALOG); +#define KSDATAFORMAT_SUBTYPE_ANALOG DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_ANALOG) + +#define STATIC_KSDATAFORMAT_SUBTYPE_PCM\ + DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_PCM) +DEFINE_GUIDSTRUCT("00000001-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_PCM); +#define KSDATAFORMAT_SUBTYPE_PCM DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_PCM) + +#if defined(_INC_MMREG) +#define STATIC_KSDATAFORMAT_SUBTYPE_IEEE_FLOAT\ + DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_IEEE_FLOAT) +DEFINE_GUIDSTRUCT("00000003-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_IEEE_FLOAT); +#define KSDATAFORMAT_SUBTYPE_IEEE_FLOAT DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_IEEE_FLOAT) + +#define STATIC_KSDATAFORMAT_SUBTYPE_DRM\ + DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_DRM) +DEFINE_GUIDSTRUCT("00000009-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_DRM); +#define KSDATAFORMAT_SUBTYPE_DRM DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DRM) + +#define STATIC_KSDATAFORMAT_SUBTYPE_ALAW\ + DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_ALAW) +DEFINE_GUIDSTRUCT("00000006-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_ALAW); +#define KSDATAFORMAT_SUBTYPE_ALAW DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_ALAW) + +#define STATIC_KSDATAFORMAT_SUBTYPE_MULAW\ + DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_MULAW) +DEFINE_GUIDSTRUCT("00000007-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_MULAW); +#define KSDATAFORMAT_SUBTYPE_MULAW DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MULAW) + +#define STATIC_KSDATAFORMAT_SUBTYPE_ADPCM\ + DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_ADPCM) +DEFINE_GUIDSTRUCT("00000002-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_ADPCM); +#define KSDATAFORMAT_SUBTYPE_ADPCM DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_ADPCM) + +#define STATIC_KSDATAFORMAT_SUBTYPE_MPEG\ + DEFINE_WAVEFORMATEX_GUID(WAVE_FORMAT_MPEG) +DEFINE_GUIDSTRUCT("00000050-0000-0010-8000-00aa00389b71", KSDATAFORMAT_SUBTYPE_MPEG); +#define KSDATAFORMAT_SUBTYPE_MPEG DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG) +#endif // defined(_INC_MMREG) + +#define STATIC_KSDATAFORMAT_SPECIFIER_VC_ID\ + 0xAD98D184L, 0xAAC3, 0x11D0, 0xA4, 0x1C, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("AD98D184-AAC3-11D0-A41C-00A0C9223196", KSDATAFORMAT_SPECIFIER_VC_ID); +#define KSDATAFORMAT_SPECIFIER_VC_ID DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VC_ID) + +#define STATIC_KSDATAFORMAT_SPECIFIER_WAVEFORMATEX\ + 0x05589f81L, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a +DEFINE_GUIDSTRUCT("05589f81-c356-11ce-bf01-00aa0055595a", KSDATAFORMAT_SPECIFIER_WAVEFORMATEX); +#define KSDATAFORMAT_SPECIFIER_WAVEFORMATEX DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_WAVEFORMATEX) + +#define STATIC_KSDATAFORMAT_SPECIFIER_DSOUND\ + 0x518590a2L, 0xa184, 0x11d0, 0x85, 0x22, 0x00, 0xc0, 0x4f, 0xd9, 0xba, 0xf3 +DEFINE_GUIDSTRUCT("518590a2-a184-11d0-8522-00c04fd9baf3", KSDATAFORMAT_SPECIFIER_DSOUND); +#define KSDATAFORMAT_SPECIFIER_DSOUND DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DSOUND) + +#if defined(_INC_MMSYSTEM) || defined(_INC_MMREG) +#if !defined( PACK_PRAGMAS_NOT_SUPPORTED ) +#include +#endif +typedef struct { + KSDATAFORMAT DataFormat; + WAVEFORMATEX WaveFormatEx; +} KSDATAFORMAT_WAVEFORMATEX, *PKSDATAFORMAT_WAVEFORMATEX; + +#ifndef _WAVEFORMATEXTENSIBLE_ +#define _WAVEFORMATEXTENSIBLE_ +typedef struct { + WAVEFORMATEX Format; + union { + WORD wValidBitsPerSample; /* bits of precision */ + WORD wSamplesPerBlock; /* valid if wBitsPerSample==0 */ + WORD wReserved; /* If neither applies, set to zero. */ + } Samples; + DWORD dwChannelMask; /* which channels are */ + /* present in stream */ + GUID SubFormat; +} WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE; +#endif // !_WAVEFORMATEXTENSIBLE_ + +#if !defined(WAVE_FORMAT_EXTENSIBLE) +#define WAVE_FORMAT_EXTENSIBLE 0xFFFE +#endif // !defined(WAVE_FORMAT_EXTENSIBLE) + +// DirectSound buffer description +typedef struct { + ULONG Flags; + ULONG Control; + WAVEFORMATEX WaveFormatEx; +} KSDSOUND_BUFFERDESC, *PKSDSOUND_BUFFERDESC; + +// DirectSound format +typedef struct { + KSDATAFORMAT DataFormat; + KSDSOUND_BUFFERDESC BufferDesc; +} KSDATAFORMAT_DSOUND, *PKSDATAFORMAT_DSOUND; + +#if !defined( PACK_PRAGMAS_NOT_SUPPORTED ) +#include +#endif +#endif // defined(_INC_MMSYSTEM) || defined(_INC_MMREG) + + + +// DirectSound buffer flags +#define KSDSOUND_BUFFER_PRIMARY 0x00000001 +#define KSDSOUND_BUFFER_STATIC 0x00000002 +#define KSDSOUND_BUFFER_LOCHARDWARE 0x00000004 +#define KSDSOUND_BUFFER_LOCSOFTWARE 0x00000008 + +// DirectSound buffer control flags +#define KSDSOUND_BUFFER_CTRL_3D 0x00000001 +#define KSDSOUND_BUFFER_CTRL_FREQUENCY 0x00000002 +#define KSDSOUND_BUFFER_CTRL_PAN 0x00000004 +#define KSDSOUND_BUFFER_CTRL_VOLUME 0x00000008 +#define KSDSOUND_BUFFER_CTRL_POSITIONNOTIFY 0x00000010 + +#define KSDSOUND_BUFFER_CTRL_HRTF_3D 0x40000000 + +typedef struct { +#if defined(_NTDDK_) + ULONGLONG PlayOffset; + ULONGLONG WriteOffset; +#else // !_NTDDK_ + DWORDLONG PlayOffset; + DWORDLONG WriteOffset; +#endif // !_NTDDK_ +} KSAUDIO_POSITION, *PKSAUDIO_POSITION; + +// DirectSound3D FIR context +typedef struct { + LONG Channel; + FLOAT VolSmoothScale; + FLOAT TotalDryAttenuation; + FLOAT TotalWetAttenuation; + LONG SmoothFrequency; + LONG Delay; +} KSDS3D_ITD_PARAMS, *PKSDS3D_ITD_PARAMS; + +typedef struct { + ULONG Enabled; + KSDS3D_ITD_PARAMS LeftParams; + KSDS3D_ITD_PARAMS RightParams; + ULONG Reserved; +} KSDS3D_ITD_PARAMS_MSG, *PKSDS3D_ITD_PARAMS_MSG; + +// DirectSound3D HRTF messages + +typedef struct { + ULONG Size; // This is the size of the struct in bytes + ULONG Enabled; + BOOL SwapChannels; + BOOL ZeroAzimuth; + BOOL CrossFadeOutput; + ULONG FilterSize; // This is the additional size of the filter coeff in bytes +} KSDS3D_HRTF_PARAMS_MSG, *PKSDS3D_HRTF_PARAMS_MSG; + + +// HRTF filter quality levels +typedef enum { + FULL_FILTER, + LIGHT_FILTER, + KSDS3D_FILTER_QUALITY_COUNT +} KSDS3D_HRTF_FILTER_QUALITY; + +typedef struct { + ULONG Size; // This is the size of the struct in bytes + KSDS3D_HRTF_FILTER_QUALITY Quality; + FLOAT SampleRate; + ULONG MaxFilterSize; + ULONG FilterTransientMuteLength; + ULONG FilterOverlapBufferLength; + ULONG OutputOverlapBufferLength; + ULONG Reserved; +} KSDS3D_HRTF_INIT_MSG, *PKSDS3D_HRTF_INIT_MSG; + +// Coefficient formats +typedef enum { + FLOAT_COEFF, + SHORT_COEFF, + KSDS3D_COEFF_COUNT +} KSDS3D_HRTF_COEFF_FORMAT; + +// Filter methods +typedef enum { + DIRECT_FORM, + CASCADE_FORM, + KSDS3D_FILTER_METHOD_COUNT +} KSDS3D_HRTF_FILTER_METHOD; + +// Filter methods +typedef enum { + DS3D_HRTF_VERSION_1 +} KSDS3D_HRTF_FILTER_VERSION; + +typedef struct { + KSDS3D_HRTF_FILTER_METHOD FilterMethod; + KSDS3D_HRTF_COEFF_FORMAT CoeffFormat; + KSDS3D_HRTF_FILTER_VERSION Version; + ULONG Reserved; +} KSDS3D_HRTF_FILTER_FORMAT_MSG, *PKSDS3D_HRTF_FILTER_FORMAT_MSG; + +//=========================================================================== +// DirectSound3D HAL + + +typedef struct _DS3DVECTOR { + union { + FLOAT x; + FLOAT dvX; + }; + union { + FLOAT y; + FLOAT dvY; + }; + union { + FLOAT z; + FLOAT dvZ; + }; +} DS3DVECTOR, *PDS3DVECTOR; + + +//=========================================================================== +//=========================================================================== + +// KSPROPSETID_DirectSound3DListener : {437B3414-D060-11d0-8583-00C04FD9BAF3} + +#define STATIC_KSPROPSETID_DirectSound3DListener\ + 0x437b3414L, 0xd060, 0x11d0, 0x85, 0x83, 0x00, 0xc0, 0x4f, 0xd9, 0xba, 0xf3 +DEFINE_GUIDSTRUCT("437b3414-d060-11d0-8583-00c04fd9baf3",KSPROPSETID_DirectSound3DListener); +#define KSPROPSETID_DirectSound3DListener DEFINE_GUIDNAMED(KSPROPSETID_DirectSound3DListener) + +typedef enum { + KSPROPERTY_DIRECTSOUND3DLISTENER_ALL, + KSPROPERTY_DIRECTSOUND3DLISTENER_POSITION, + KSPROPERTY_DIRECTSOUND3DLISTENER_VELOCITY, + KSPROPERTY_DIRECTSOUND3DLISTENER_ORIENTATION, + KSPROPERTY_DIRECTSOUND3DLISTENER_DISTANCEFACTOR, + KSPROPERTY_DIRECTSOUND3DLISTENER_ROLLOFFFACTOR, + KSPROPERTY_DIRECTSOUND3DLISTENER_DOPPLERFACTOR, + KSPROPERTY_DIRECTSOUND3DLISTENER_BATCH, + KSPROPERTY_DIRECTSOUND3DLISTENER_ALLOCATION +} KSPROPERTY_DIRECTSOUND3DLISTENER; + +typedef struct { + DS3DVECTOR Position; + DS3DVECTOR Velocity; + DS3DVECTOR OrientFront; + DS3DVECTOR OrientTop; + FLOAT DistanceFactor; + FLOAT RolloffFactor; + FLOAT DopplerFactor; +} KSDS3D_LISTENER_ALL, *PKSDS3D_LISTENER_ALL; + +typedef struct { + DS3DVECTOR Front; + DS3DVECTOR Top; +} KSDS3D_LISTENER_ORIENTATION, *PKSDS3D_LISTENER_ORIENTATION; + + +//=========================================================================== +//=========================================================================== +// KSPROPSETID_DirectSound3DBuffer : {437B3411-D060-11d0-8583-00C04FD9BAF3} + +#define STATIC_KSPROPSETID_DirectSound3DBuffer\ + 0x437b3411L, 0xd060, 0x11d0, 0x85, 0x83, 0x00, 0xc0, 0x4f, 0xd9, 0xba, 0xf3 +DEFINE_GUIDSTRUCT("437b3411-d060-11d0-8583-00c04fd9baf3", KSPROPSETID_DirectSound3DBuffer); +#define KSPROPSETID_DirectSound3DBuffer DEFINE_GUIDNAMED(KSPROPSETID_DirectSound3DBuffer) + + +typedef enum { + KSPROPERTY_DIRECTSOUND3DBUFFER_ALL, + KSPROPERTY_DIRECTSOUND3DBUFFER_POSITION, + KSPROPERTY_DIRECTSOUND3DBUFFER_VELOCITY, + KSPROPERTY_DIRECTSOUND3DBUFFER_CONEANGLES, + KSPROPERTY_DIRECTSOUND3DBUFFER_CONEORIENTATION, + KSPROPERTY_DIRECTSOUND3DBUFFER_CONEOUTSIDEVOLUME, + KSPROPERTY_DIRECTSOUND3DBUFFER_MINDISTANCE, + KSPROPERTY_DIRECTSOUND3DBUFFER_MAXDISTANCE, + KSPROPERTY_DIRECTSOUND3DBUFFER_MODE +} KSPROPERTY_DIRECTSOUND3DBUFFER; + + +typedef struct { + DS3DVECTOR Position; + DS3DVECTOR Velocity; + ULONG InsideConeAngle; + ULONG OutsideConeAngle; + DS3DVECTOR ConeOrientation; + LONG ConeOutsideVolume; + FLOAT MinDistance; + FLOAT MaxDistance; + ULONG Mode; +} KSDS3D_BUFFER_ALL, *PKSDS3D_BUFFER_ALL; + +typedef struct { + ULONG InsideConeAngle; + ULONG OutsideConeAngle; +} KSDS3D_BUFFER_CONE_ANGLES, *PKSDS3D_BUFFER_CONE_ANGLES; + +#define KSAUDIO_STEREO_SPEAKER_GEOMETRY_HEADPHONE (-1) +#define KSAUDIO_STEREO_SPEAKER_GEOMETRY_MIN 5 +#define KSAUDIO_STEREO_SPEAKER_GEOMETRY_NARROW 10 +#define KSAUDIO_STEREO_SPEAKER_GEOMETRY_WIDE 20 +#define KSAUDIO_STEREO_SPEAKER_GEOMETRY_MAX 180 + +#define KSDSOUND_3D_MODE_NORMAL 0x00000000 +#define KSDSOUND_3D_MODE_HEADRELATIVE 0x00000001 +#define KSDSOUND_3D_MODE_DISABLE 0x00000002 + +typedef struct { + KSDATARANGE DataRange; + ULONG MaximumChannels; + ULONG MinimumBitsPerSample; + ULONG MaximumBitsPerSample; + ULONG MinimumSampleFrequency; + ULONG MaximumSampleFrequency; +} KSDATARANGE_AUDIO, *PKSDATARANGE_AUDIO; + +//--------------------------------------------------------------------------- + +#define STATIC_KSDATAFORMAT_SUBTYPE_RIFF\ + 0x4995DAEEL, 0x9EE6, 0x11D0, 0xA4, 0x0E, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("4995DAEE-9EE6-11D0-A40E-00A0C9223196", KSDATAFORMAT_SUBTYPE_RIFF); +#define KSDATAFORMAT_SUBTYPE_RIFF DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_RIFF) + +#define STATIC_KSDATAFORMAT_SUBTYPE_RIFFWAVE\ + 0xe436eb8bL, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 +DEFINE_GUIDSTRUCT("e436eb8b-524f-11ce-9f53-0020af0ba770", KSDATAFORMAT_SUBTYPE_RIFFWAVE); +#define KSDATAFORMAT_SUBTYPE_RIFFWAVE DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_RIFFWAVE) + +//=========================================================================== +//=========================================================================== + +#define STATIC_KSPROPSETID_Bibliographic \ + 0x07BA150EL, 0xE2B1, 0x11D0, 0xAC, 0x17, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("07BA150E-E2B1-11D0-AC17-00A0C9223196", KSPROPSETID_Bibliographic); +#define KSPROPSETID_Bibliographic DEFINE_GUIDNAMED(KSPROPSETID_Bibliographic) + +//Repeatable tags contain all entries within the property, each preceeded by length +typedef enum { + KSPROPERTY_BIBLIOGRAPHIC_LEADER = 'RDL ', + KSPROPERTY_BIBLIOGRAPHIC_LCCN = '010 ', + KSPROPERTY_BIBLIOGRAPHIC_ISBN = '020 ', + KSPROPERTY_BIBLIOGRAPHIC_ISSN = '220 ', + KSPROPERTY_BIBLIOGRAPHIC_CATALOGINGSOURCE = '040 ', + KSPROPERTY_BIBLIOGRAPHIC_MAINPERSONALNAME = '001 ', + KSPROPERTY_BIBLIOGRAPHIC_MAINCORPORATEBODY = '011 ', + KSPROPERTY_BIBLIOGRAPHIC_MAINMEETINGNAME = '111 ', + KSPROPERTY_BIBLIOGRAPHIC_MAINUNIFORMTITLE = '031 ', + KSPROPERTY_BIBLIOGRAPHIC_UNIFORMTITLE = '042 ', + KSPROPERTY_BIBLIOGRAPHIC_TITLESTATEMENT = '542 ', + KSPROPERTY_BIBLIOGRAPHIC_VARYINGFORMTITLE = '642 ', + KSPROPERTY_BIBLIOGRAPHIC_PUBLICATION = '062 ', + KSPROPERTY_BIBLIOGRAPHIC_PHYSICALDESCRIPTION = '003 ', + KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYTITLE = '044 ', + KSPROPERTY_BIBLIOGRAPHIC_SERIESSTATEMENT = '094 ', + KSPROPERTY_BIBLIOGRAPHIC_GENERALNOTE = '005 ', + KSPROPERTY_BIBLIOGRAPHIC_BIBLIOGRAPHYNOTE = '405 ', + KSPROPERTY_BIBLIOGRAPHIC_CONTENTSNOTE = '505 ', + KSPROPERTY_BIBLIOGRAPHIC_CREATIONCREDIT = '805 ', + KSPROPERTY_BIBLIOGRAPHIC_CITATION = '015 ', + KSPROPERTY_BIBLIOGRAPHIC_PARTICIPANT = '115 ', + KSPROPERTY_BIBLIOGRAPHIC_SUMMARY = '025 ', + KSPROPERTY_BIBLIOGRAPHIC_TARGETAUDIENCE = '125 ', + KSPROPERTY_BIBLIOGRAPHIC_ADDEDFORMAVAILABLE = '035 ', + KSPROPERTY_BIBLIOGRAPHIC_SYSTEMDETAILS = '835 ', + KSPROPERTY_BIBLIOGRAPHIC_AWARDS = '685 ', + KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYPERSONALNAME = '006 ', + KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYTOPICALTERM = '056 ', + KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYGEOGRAPHIC = '156 ', + KSPROPERTY_BIBLIOGRAPHIC_INDEXTERMGENRE = '556 ', + KSPROPERTY_BIBLIOGRAPHIC_INDEXTERMCURRICULUM = '856 ', + KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYUNIFORMTITLE = '037 ', + KSPROPERTY_BIBLIOGRAPHIC_ADDEDENTRYRELATED = '047 ', + KSPROPERTY_BIBLIOGRAPHIC_SERIESSTATEMENTPERSONALNAME = '008 ', + KSPROPERTY_BIBLIOGRAPHIC_SERIESSTATEMENTUNIFORMTITLE = '038 ' +} KSPROPERTY_BIBLIOGRAPHIC; + +#define STATIC_KSPROPSETID_TopologyNode\ + 0x45FFAAA1L, 0x6E1B, 0x11D0, 0xBC, 0xF2, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00 +DEFINE_GUIDSTRUCT("45FFAAA1-6E1B-11D0-BCF2-444553540000", KSPROPSETID_TopologyNode); +#define KSPROPSETID_TopologyNode DEFINE_GUIDNAMED(KSPROPSETID_TopologyNode) + +typedef enum { + KSPROPERTY_TOPOLOGYNODE_ENABLE = 1, + KSPROPERTY_TOPOLOGYNODE_RESET +} KSPROPERTY_TOPOLOGYNODE; + +//=========================================================================== +#define STATIC_KSPROPSETID_DrmAudioStream\ + 0x2f2c8ddd, 0x4198, 0x4fac, 0xba, 0x29, 0x61, 0xbb, 0x5, 0xb7, 0xde, 0x6 +DEFINE_GUIDSTRUCT("2F2C8DDD-4198-4fac-BA29-61BB05B7DE06", KSPROPSETID_DrmAudioStream); +#define KSPROPSETID_DrmAudioStream DEFINE_GUIDNAMED(KSPROPSETID_DrmAudioStream) + +typedef enum { + KSPROPERTY_DRMAUDIOSTREAM_CONTENTID, + KSPROPERTY_DRMAUDIOSTREAM_AUTHENTICATEFUNCTION +} KSPROPERTY_DRMAUDIOSTREAM; + +//=========================================================================== +#define STATIC_KSPROPSETID_Audio\ + 0x45FFAAA0L, 0x6E1B, 0x11D0, 0xBC, 0xF2, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00 +DEFINE_GUIDSTRUCT("45FFAAA0-6E1B-11D0-BCF2-444553540000", KSPROPSETID_Audio); +#define KSPROPSETID_Audio DEFINE_GUIDNAMED(KSPROPSETID_Audio) + +typedef enum { + KSPROPERTY_AUDIO_LATENCY = 1, + KSPROPERTY_AUDIO_COPY_PROTECTION, + KSPROPERTY_AUDIO_CHANNEL_CONFIG, + KSPROPERTY_AUDIO_VOLUMELEVEL, + KSPROPERTY_AUDIO_POSITION, + KSPROPERTY_AUDIO_DYNAMIC_RANGE, + KSPROPERTY_AUDIO_QUALITY, + KSPROPERTY_AUDIO_SAMPLING_RATE, + KSPROPERTY_AUDIO_DYNAMIC_SAMPLING_RATE, + KSPROPERTY_AUDIO_MIX_LEVEL_TABLE, + KSPROPERTY_AUDIO_MIX_LEVEL_CAPS, + KSPROPERTY_AUDIO_MUX_SOURCE, + KSPROPERTY_AUDIO_MUTE, + KSPROPERTY_AUDIO_BASS, + KSPROPERTY_AUDIO_MID, + KSPROPERTY_AUDIO_TREBLE, + KSPROPERTY_AUDIO_BASS_BOOST, + KSPROPERTY_AUDIO_EQ_LEVEL, + KSPROPERTY_AUDIO_NUM_EQ_BANDS, + KSPROPERTY_AUDIO_EQ_BANDS, + KSPROPERTY_AUDIO_AGC, + KSPROPERTY_AUDIO_DELAY, + KSPROPERTY_AUDIO_LOUDNESS, + KSPROPERTY_AUDIO_WIDE_MODE, + KSPROPERTY_AUDIO_WIDENESS, + KSPROPERTY_AUDIO_REVERB_LEVEL, + KSPROPERTY_AUDIO_CHORUS_LEVEL, + KSPROPERTY_AUDIO_DEV_SPECIFIC, + KSPROPERTY_AUDIO_DEMUX_DEST, + KSPROPERTY_AUDIO_STEREO_ENHANCE, + KSPROPERTY_AUDIO_MANUFACTURE_GUID, + KSPROPERTY_AUDIO_PRODUCT_GUID, + KSPROPERTY_AUDIO_CPU_RESOURCES, + KSPROPERTY_AUDIO_STEREO_SPEAKER_GEOMETRY, + KSPROPERTY_AUDIO_SURROUND_ENCODE, + KSPROPERTY_AUDIO_3D_INTERFACE, + KSPROPERTY_AUDIO_PEAKMETER, + KSPROPERTY_AUDIO_ALGORITHM_INSTANCE +} KSPROPERTY_AUDIO; + +// Audio quality constants +#define KSAUDIO_QUALITY_WORST 0x0 +#define KSAUDIO_QUALITY_PC 0x1 +#define KSAUDIO_QUALITY_BASIC 0x2 +#define KSAUDIO_QUALITY_ADVANCED 0x3 + +// Audio CPU resource constants +#define KSAUDIO_CPU_RESOURCES_NOT_HOST_CPU 0x00000000 +#define KSAUDIO_CPU_RESOURCES_HOST_CPU 0x7FFFFFFF + +typedef struct { + BOOL fCopyrighted; + BOOL fOriginal; +} KSAUDIO_COPY_PROTECTION, *PKSAUDIO_COPY_PROTECTION; + +typedef struct { + LONG ActiveSpeakerPositions; +} KSAUDIO_CHANNEL_CONFIG, *PKSAUDIO_CHANNEL_CONFIG; + +// Speaker Positions: +#define SPEAKER_FRONT_LEFT 0x1 +#define SPEAKER_FRONT_RIGHT 0x2 +#define SPEAKER_FRONT_CENTER 0x4 +#define SPEAKER_LOW_FREQUENCY 0x8 +#define SPEAKER_BACK_LEFT 0x10 +#define SPEAKER_BACK_RIGHT 0x20 +#define SPEAKER_FRONT_LEFT_OF_CENTER 0x40 +#define SPEAKER_FRONT_RIGHT_OF_CENTER 0x80 +#define SPEAKER_BACK_CENTER 0x100 +#define SPEAKER_SIDE_LEFT 0x200 +#define SPEAKER_SIDE_RIGHT 0x400 +#define SPEAKER_TOP_CENTER 0x800 +#define SPEAKER_TOP_FRONT_LEFT 0x1000 +#define SPEAKER_TOP_FRONT_CENTER 0x2000 +#define SPEAKER_TOP_FRONT_RIGHT 0x4000 +#define SPEAKER_TOP_BACK_LEFT 0x8000 +#define SPEAKER_TOP_BACK_CENTER 0x10000 +#define SPEAKER_TOP_BACK_RIGHT 0x20000 + +// Bit mask locations reserved for future use +#define SPEAKER_RESERVED 0x7FFC0000 + +// Used to specify that any possible permutation of speaker configurations +#define SPEAKER_ALL 0x80000000 + +// DirectSound Speaker Config +#define KSAUDIO_SPEAKER_MONO (SPEAKER_FRONT_CENTER) +#define KSAUDIO_SPEAKER_STEREO (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT) +#define KSAUDIO_SPEAKER_QUAD (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \ + SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT) +#define KSAUDIO_SPEAKER_SURROUND (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \ + SPEAKER_FRONT_CENTER | SPEAKER_BACK_CENTER) +#define KSAUDIO_SPEAKER_5POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \ + SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \ + SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT) +#define KSAUDIO_SPEAKER_7POINT1 (SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT | \ + SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY | \ + SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT | \ + SPEAKER_FRONT_LEFT_OF_CENTER | SPEAKER_FRONT_RIGHT_OF_CENTER) + +// DVD Speaker Positions +#define KSAUDIO_SPEAKER_GROUND_FRONT_LEFT SPEAKER_FRONT_LEFT +#define KSAUDIO_SPEAKER_GROUND_FRONT_CENTER SPEAKER_FRONT_CENTER +#define KSAUDIO_SPEAKER_GROUND_FRONT_RIGHT SPEAKER_FRONT_RIGHT +#define KSAUDIO_SPEAKER_GROUND_REAR_LEFT SPEAKER_BACK_LEFT +#define KSAUDIO_SPEAKER_GROUND_REAR_RIGHT SPEAKER_BACK_RIGHT +#define KSAUDIO_SPEAKER_TOP_MIDDLE SPEAKER_TOP_CENTER +#define KSAUDIO_SPEAKER_SUPER_WOOFER SPEAKER_LOW_FREQUENCY + +typedef struct { + ULONG QuietCompression; + ULONG LoudCompression; +} KSAUDIO_DYNAMIC_RANGE, *PKSAUDIO_DYNAMIC_RANGE; + +typedef struct { + BOOL Mute; + LONG Level; +} KSAUDIO_MIXLEVEL, *PKSAUDIO_MIXLEVEL; + +typedef struct { + BOOL Mute; + LONG Minimum; + LONG Maximum; + LONG Reset; +} KSAUDIO_MIX_CAPS, *PKSAUDIO_MIX_CAPS; + +typedef struct { + ULONG InputChannels; + ULONG OutputChannels; + KSAUDIO_MIX_CAPS Capabilities[1]; +} KSAUDIO_MIXCAP_TABLE, *PKSAUDIO_MIXCAP_TABLE; + +typedef enum { + SE_TECH_NONE, + SE_TECH_ANALOG_DEVICES_PHAT, + SE_TECH_CREATIVE, + SE_TECH_NATIONAL_SEMI, + SE_TECH_YAMAHA_YMERSION, + SE_TECH_BBE, + SE_TECH_CRYSTAL_SEMI, + SE_TECH_QSOUND_QXPANDER, + SE_TECH_SPATIALIZER, + SE_TECH_SRS, + SE_TECH_PLATFORM_TECH, + SE_TECH_AKM, + SE_TECH_AUREAL, + SE_TECH_AZTECH, + SE_TECH_BINAURA, + SE_TECH_ESS_TECH, + SE_TECH_HARMAN_VMAX, + SE_TECH_NVIDEA, + SE_TECH_PHILIPS_INCREDIBLE, + SE_TECH_TEXAS_INST, + SE_TECH_VLSI_TECH +} SE_TECHNIQUE; + +typedef struct { + SE_TECHNIQUE Technique; + ULONG Center; + ULONG Depth; + ULONG Reserved; +} KSAUDIO_STEREO_ENHANCE, *PKSAUDIO_STEREO_ENHANCE; + +//=========================================================================== +// Topology Node Type GUIDs + +#define STATIC_KSNODETYPE_DAC\ + 0x507AE360L, 0xC554, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("507AE360-C554-11D0-8A2B-00A0C9255AC1", KSNODETYPE_DAC); +#define KSNODETYPE_DAC DEFINE_GUIDNAMED(KSNODETYPE_DAC) + +#define STATIC_KSNODETYPE_ADC\ + 0x4D837FE0L, 0xC555, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("4D837FE0-C555-11D0-8A2B-00A0C9255AC1", KSNODETYPE_ADC); +#define KSNODETYPE_ADC DEFINE_GUIDNAMED(KSNODETYPE_ADC) + +#define STATIC_KSNODETYPE_SRC\ + 0x9DB7B9E0L, 0xC555, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("9DB7B9E0-C555-11D0-8A2B-00A0C9255AC1", KSNODETYPE_SRC); +#define KSNODETYPE_SRC DEFINE_GUIDNAMED(KSNODETYPE_SRC) + +#define STATIC_KSNODETYPE_SUPERMIX\ + 0xE573ADC0L, 0xC555, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("E573ADC0-C555-11D0-8A2B-00A0C9255AC1", KSNODETYPE_SUPERMIX); +#define KSNODETYPE_SUPERMIX DEFINE_GUIDNAMED(KSNODETYPE_SUPERMIX) + +#define STATIC_KSNODETYPE_MUX\ + 0x2CEAF780L, 0xC556, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("2CEAF780-C556-11D0-8A2B-00A0C9255AC1", KSNODETYPE_MUX); +#define KSNODETYPE_MUX DEFINE_GUIDNAMED(KSNODETYPE_MUX) + +#define STATIC_KSNODETYPE_DEMUX\ + 0xC0EB67D4L, 0xE807, 0x11D0, 0x95, 0x8A, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("C0EB67D4-E807-11D0-958A-00C04FB925D3", KSNODETYPE_DEMUX); +#define KSNODETYPE_DEMUX DEFINE_GUIDNAMED(KSNODETYPE_DEMUX) + +#define STATIC_KSNODETYPE_SUM\ + 0xDA441A60L, 0xC556, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("DA441A60-C556-11D0-8A2B-00A0C9255AC1", KSNODETYPE_SUM); +#define KSNODETYPE_SUM DEFINE_GUIDNAMED(KSNODETYPE_SUM) + +#define STATIC_KSNODETYPE_MUTE\ + 0x02B223C0L, 0xC557, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("02B223C0-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_MUTE); +#define KSNODETYPE_MUTE DEFINE_GUIDNAMED(KSNODETYPE_MUTE) + +#define STATIC_KSNODETYPE_VOLUME\ + 0x3A5ACC00L, 0xC557, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("3A5ACC00-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_VOLUME); +#define KSNODETYPE_VOLUME DEFINE_GUIDNAMED(KSNODETYPE_VOLUME) + +#define STATIC_KSNODETYPE_TONE\ + 0x7607E580L, 0xC557, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("7607E580-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_TONE); +#define KSNODETYPE_TONE DEFINE_GUIDNAMED(KSNODETYPE_TONE) + +#define STATIC_KSNODETYPE_EQUALIZER\ + 0x9D41B4A0L, 0xC557, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("9D41B4A0-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_EQUALIZER); +#define KSNODETYPE_EQUALIZER DEFINE_GUIDNAMED(KSNODETYPE_EQUALIZER) + +#define STATIC_KSNODETYPE_AGC\ + 0xE88C9BA0L, 0xC557, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("E88C9BA0-C557-11D0-8A2B-00A0C9255AC1", KSNODETYPE_AGC); +#define KSNODETYPE_AGC DEFINE_GUIDNAMED(KSNODETYPE_AGC) + +#define STATIC_KSNODETYPE_NOISE_SUPPRESS\ + 0xe07f903f, 0x62fd, 0x4e60, 0x8c, 0xdd, 0xde, 0xa7, 0x23, 0x66, 0x65, 0xb5 +DEFINE_GUIDSTRUCT("E07F903F-62FD-4e60-8CDD-DEA7236665B5", KSNODETYPE_NOISE_SUPPRESS); +#define KSNODETYPE_NOISE_SUPPRESS DEFINE_GUIDNAMED(KSNODETYPE_NOISE_SUPPRESS) + +#define STATIC_KSNODETYPE_DELAY\ + 0x144981E0L, 0xC558, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("144981E0-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_DELAY); +#define KSNODETYPE_DELAY DEFINE_GUIDNAMED(KSNODETYPE_DELAY) + +#define STATIC_KSNODETYPE_LOUDNESS\ + 0x41887440L, 0xC558, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("41887440-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_LOUDNESS); +#define KSNODETYPE_LOUDNESS DEFINE_GUIDNAMED(KSNODETYPE_LOUDNESS) + +#define STATIC_KSNODETYPE_PROLOGIC_DECODER\ + 0x831C2C80L, 0xC558, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("831C2C80-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_PROLOGIC_DECODER); +#define KSNODETYPE_PROLOGIC_DECODER DEFINE_GUIDNAMED(KSNODETYPE_PROLOGIC_DECODER) + +#define STATIC_KSNODETYPE_STEREO_WIDE\ + 0xA9E69800L, 0xC558, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("A9E69800-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_STEREO_WIDE); +#define KSNODETYPE_STEREO_WIDE DEFINE_GUIDNAMED(KSNODETYPE_STEREO_WIDE) + +#define STATIC_KSNODETYPE_STEREO_ENHANCE\ + 0xAF6878ACL, 0xE83F, 0x11D0, 0x95, 0x8A, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("AF6878AC-E83F-11D0-958A-00C04FB925D3", KSNODETYPE_STEREO_ENHANCE); +#define KSNODETYPE_STEREO_ENHANCE DEFINE_GUIDNAMED(KSNODETYPE_STEREO_ENHANCE) + +#define STATIC_KSNODETYPE_REVERB\ + 0xEF0328E0L, 0xC558, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("EF0328E0-C558-11D0-8A2B-00A0C9255AC1", KSNODETYPE_REVERB); +#define KSNODETYPE_REVERB DEFINE_GUIDNAMED(KSNODETYPE_REVERB) + +#define STATIC_KSNODETYPE_CHORUS\ + 0x20173F20L, 0xC559, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("20173F20-C559-11D0-8A2B-00A0C9255AC1", KSNODETYPE_CHORUS); +#define KSNODETYPE_CHORUS DEFINE_GUIDNAMED(KSNODETYPE_CHORUS) + +#define STATIC_KSNODETYPE_3D_EFFECTS\ + 0x55515860L, 0xC559, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("55515860-C559-11D0-8A2B-00A0C9255AC1", KSNODETYPE_3D_EFFECTS); +#define KSNODETYPE_3D_EFFECTS DEFINE_GUIDNAMED(KSNODETYPE_3D_EFFECTS) + +#define STATIC_KSNODETYPE_ACOUSTIC_ECHO_CANCEL STATIC_KSCATEGORY_ACOUSTIC_ECHO_CANCEL +#define KSNODETYPE_ACOUSTIC_ECHO_CANCEL KSCATEGORY_ACOUSTIC_ECHO_CANCEL + +#define STATIC_KSNODETYPE_MICROPHONE_ARRAY_PROCESSOR STATIC_KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR +#define KSNODETYPE_MICROPHONE_ARRAY_PROCESSOR KSCATEGORY_MICROPHONE_ARRAY_PROCESSOR + +#define STATIC_KSNODETYPE_DEV_SPECIFIC\ + 0x941C7AC0L, 0xC559, 0x11D0, 0x8A, 0x2B, 0x00, 0xA0, 0xC9, 0x25, 0x5A, 0xC1 +DEFINE_GUIDSTRUCT("941C7AC0-C559-11D0-8A2B-00A0C9255AC1", KSNODETYPE_DEV_SPECIFIC); +#define KSNODETYPE_DEV_SPECIFIC DEFINE_GUIDNAMED(KSNODETYPE_DEV_SPECIFIC) + +#define STATIC_KSNODETYPE_SURROUND_ENCODER\ + 0x8074C5B2L, 0x3C66, 0x11D2, 0xB4, 0x5A, 0x30, 0x78, 0x30, 0x2C, 0x20, 0x30 +DEFINE_GUIDSTRUCT("8074C5B2-3C66-11D2-B45A-3078302C2030", KSNODETYPE_SURROUND_ENCODER); +#define KSNODETYPE_SURROUND_ENCODER DEFINE_GUIDNAMED(KSNODETYPE_SURROUND_ENCODER) + +#define STATIC_KSNODETYPE_PEAKMETER\ + 0xa085651eL, 0x5f0d, 0x4b36, 0xa8, 0x69, 0xd1, 0x95, 0xd6, 0xab, 0x4b, 0x9e +DEFINE_GUIDSTRUCT("A085651E-5F0D-4b36-A869-D195D6AB4B9E", KSNODETYPE_PEAKMETER); +#define KSNODETYPE_PEAKMETER DEFINE_GUIDNAMED(KSNODETYPE_PEAKMETER) + +//=========================================================================== +// Topology Node Name GUIDs for common audio nodes +#define STATIC_KSAUDFNAME_BASS\ + 0x185FEDE0L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDE0-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_BASS); +#define KSAUDFNAME_BASS DEFINE_GUIDNAMED(KSAUDFNAME_BASS) + +#define STATIC_KSAUDFNAME_TREBLE\ + 0x185FEDE1L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDE1-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_TREBLE); +#define KSAUDFNAME_TREBLE DEFINE_GUIDNAMED(KSAUDFNAME_TREBLE) + +#define STATIC_KSAUDFNAME_3D_STEREO\ + 0x185FEDE2L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDE2-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_3D_STEREO); +#define KSAUDFNAME_3D_STEREO DEFINE_GUIDNAMED(KSAUDFNAME_3D_STEREO) + +#define STATIC_KSAUDFNAME_MASTER_VOLUME\ + 0x185FEDE3L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDE3-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MASTER_VOLUME); +#define KSAUDFNAME_MASTER_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MASTER_VOLUME) + +#define STATIC_KSAUDFNAME_MASTER_MUTE\ + 0x185FEDE4L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDE4-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MASTER_MUTE); +#define KSAUDFNAME_MASTER_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MASTER_MUTE) + +#define STATIC_KSAUDFNAME_WAVE_VOLUME\ + 0x185FEDE5L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDE5-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_WAVE_VOLUME); +#define KSAUDFNAME_WAVE_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_WAVE_VOLUME) + +#define STATIC_KSAUDFNAME_WAVE_MUTE\ + 0x185FEDE6L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDE6-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_WAVE_MUTE); +#define KSAUDFNAME_WAVE_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_WAVE_MUTE) + +#define STATIC_KSAUDFNAME_MIDI_VOLUME\ + 0x185FEDE7L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDE7-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIDI_VOLUME); +#define KSAUDFNAME_MIDI_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MIDI_VOLUME) + +#define STATIC_KSAUDFNAME_MIDI_MUTE\ + 0x185FEDE8L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDE8-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIDI_MUTE); +#define KSAUDFNAME_MIDI_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MIDI_MUTE) + +#define STATIC_KSAUDFNAME_CD_VOLUME\ + 0x185FEDE9L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDE9-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_CD_VOLUME); +#define KSAUDFNAME_CD_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_CD_VOLUME) + +#define STATIC_KSAUDFNAME_CD_MUTE\ + 0x185FEDEAL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDEA-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_CD_MUTE); +#define KSAUDFNAME_CD_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_CD_MUTE) + +#define STATIC_KSAUDFNAME_LINE_VOLUME\ + 0x185FEDEBL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDEB-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_LINE_VOLUME); +#define KSAUDFNAME_LINE_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_LINE_VOLUME) + +#define STATIC_KSAUDFNAME_LINE_MUTE\ + 0x185FEDECL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDEC-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_LINE_MUTE); +#define KSAUDFNAME_LINE_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_LINE_MUTE) + +#define STATIC_KSAUDFNAME_MIC_VOLUME\ + 0x185FEDEDL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDED-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIC_VOLUME); +#define KSAUDFNAME_MIC_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MIC_VOLUME) + +#define STATIC_KSAUDFNAME_MIC_MUTE\ + 0x185FEDEEL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDEE-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIC_MUTE); +#define KSAUDFNAME_MIC_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MIC_MUTE) + +#define STATIC_KSAUDFNAME_RECORDING_SOURCE\ + 0x185FEDEFL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDEF-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_RECORDING_SOURCE); +#define KSAUDFNAME_RECORDING_SOURCE DEFINE_GUIDNAMED(KSAUDFNAME_RECORDING_SOURCE) + +#define STATIC_KSAUDFNAME_PC_SPEAKER_VOLUME\ + 0x185FEDF0L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDF0-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_PC_SPEAKER_VOLUME); +#define KSAUDFNAME_PC_SPEAKER_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_PC_SPEAKER_VOLUME) + +#define STATIC_KSAUDFNAME_PC_SPEAKER_MUTE\ + 0x185FEDF1L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDF1-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_PC_SPEAKER_MUTE); +#define KSAUDFNAME_PC_SPEAKER_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_PC_SPEAKER_MUTE) + +#define STATIC_KSAUDFNAME_MIDI_IN_VOLUME\ + 0x185FEDF2L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDF2-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIDI_IN_VOLUME); +#define KSAUDFNAME_MIDI_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MIDI_IN_VOLUME) + +#define STATIC_KSAUDFNAME_CD_IN_VOLUME\ + 0x185FEDF3L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDF3-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_CD_IN_VOLUME); +#define KSAUDFNAME_CD_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_CD_IN_VOLUME) + +#define STATIC_KSAUDFNAME_LINE_IN_VOLUME\ + 0x185FEDF4L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDF4-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_LINE_IN_VOLUME); +#define KSAUDFNAME_LINE_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_LINE_IN_VOLUME) + +#define STATIC_KSAUDFNAME_MIC_IN_VOLUME\ + 0x185FEDF5L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDF5-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIC_IN_VOLUME); +#define KSAUDFNAME_MIC_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MIC_IN_VOLUME) + +#define STATIC_KSAUDFNAME_WAVE_IN_VOLUME\ + 0x185FEDF6L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDF6-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_WAVE_IN_VOLUME); +#define KSAUDFNAME_WAVE_IN_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_WAVE_IN_VOLUME) + +#define STATIC_KSAUDFNAME_VOLUME_CONTROL\ + 0x185FEDF7L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDF7-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_VOLUME_CONTROL); +#define KSAUDFNAME_VOLUME_CONTROL DEFINE_GUIDNAMED(KSAUDFNAME_VOLUME_CONTROL) + +#define STATIC_KSAUDFNAME_MIDI\ + 0x185FEDF8L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDF8-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_MIDI); +#define KSAUDFNAME_MIDI DEFINE_GUIDNAMED(KSAUDFNAME_MIDI) + +#define STATIC_KSAUDFNAME_LINE_IN\ + 0x185FEDF9L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDF9-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_LINE_IN); +#define KSAUDFNAME_LINE_IN DEFINE_GUIDNAMED(KSAUDFNAME_LINE_IN) + +#define STATIC_KSAUDFNAME_RECORDING_CONTROL\ + 0x185FEDFAL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDFA-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_RECORDING_CONTROL); +#define KSAUDFNAME_RECORDING_CONTROL DEFINE_GUIDNAMED(KSAUDFNAME_RECORDING_CONTROL) + +#define STATIC_KSAUDFNAME_CD_AUDIO\ + 0x185FEDFBL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDFB-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_CD_AUDIO); +#define KSAUDFNAME_CD_AUDIO DEFINE_GUIDNAMED(KSAUDFNAME_CD_AUDIO) + +#define STATIC_KSAUDFNAME_AUX_VOLUME\ + 0x185FEDFCL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDFC-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_AUX_VOLUME); +#define KSAUDFNAME_AUX_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_AUX_VOLUME) + +#define STATIC_KSAUDFNAME_AUX_MUTE\ + 0x185FEDFDL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDFD-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_AUX_MUTE); +#define KSAUDFNAME_AUX_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_AUX_MUTE) + +#define STATIC_KSAUDFNAME_AUX\ + 0x185FEDFEL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDFE-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_AUX); +#define KSAUDFNAME_AUX DEFINE_GUIDNAMED(KSAUDFNAME_AUX) + +#define STATIC_KSAUDFNAME_PC_SPEAKER\ + 0x185FEDFFL, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEDFF-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_PC_SPEAKER); +#define KSAUDFNAME_PC_SPEAKER DEFINE_GUIDNAMED(KSAUDFNAME_PC_SPEAKER) + +#define STATIC_KSAUDFNAME_WAVE_OUT_MIX\ + 0x185FEE00L, 0x9905, 0x11D1, 0x95, 0xA9, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("185FEE00-9905-11D1-95A9-00C04FB925D3", KSAUDFNAME_WAVE_OUT_MIX); +#define KSAUDFNAME_WAVE_OUT_MIX DEFINE_GUIDNAMED(KSAUDFNAME_WAVE_OUT_MIX) + +#define STATIC_KSAUDFNAME_MONO_OUT\ + 0xf9b41dc3L, 0x96e2, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68 +DEFINE_GUIDSTRUCT("F9B41DC3-96E2-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_OUT); +#define KSAUDFNAME_MONO_OUT DEFINE_GUIDNAMED(KSAUDFNAME_MONO_OUT) + +#define STATIC_KSAUDFNAME_STEREO_MIX\ + 0xdff077L, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68 +DEFINE_GUIDSTRUCT("00DFF077-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_STEREO_MIX); +#define KSAUDFNAME_STEREO_MIX DEFINE_GUIDNAMED(KSAUDFNAME_STEREO_MIX) + +#define STATIC_KSAUDFNAME_MONO_MIX\ + 0xdff078L, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68 +DEFINE_GUIDSTRUCT("00DFF078-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_MIX); +#define KSAUDFNAME_MONO_MIX DEFINE_GUIDNAMED(KSAUDFNAME_MONO_MIX) + +#define STATIC_KSAUDFNAME_MONO_OUT_VOLUME\ + 0x1ad247ebL, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68 +DEFINE_GUIDSTRUCT("1AD247EB-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_OUT_VOLUME); +#define KSAUDFNAME_MONO_OUT_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MONO_OUT_VOLUME) + +#define STATIC_KSAUDFNAME_MONO_OUT_MUTE\ + 0x1ad247ecL, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68 +DEFINE_GUIDSTRUCT("1AD247EC-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_OUT_MUTE); +#define KSAUDFNAME_MONO_OUT_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MONO_OUT_MUTE) + +#define STATIC_KSAUDFNAME_STEREO_MIX_VOLUME\ + 0x1ad247edL, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68 +DEFINE_GUIDSTRUCT("1AD247ED-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_STEREO_MIX_VOLUME); +#define KSAUDFNAME_STEREO_MIX_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_STEREO_MIX_VOLUME) + +#define STATIC_KSAUDFNAME_STEREO_MIX_MUTE\ + 0x22b0eafdL, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68 +DEFINE_GUIDSTRUCT("22B0EAFD-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_STEREO_MIX_MUTE); +#define KSAUDFNAME_STEREO_MIX_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_STEREO_MIX_MUTE) + +#define STATIC_KSAUDFNAME_MONO_MIX_VOLUME\ + 0x22b0eafeL, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68 +DEFINE_GUIDSTRUCT("22B0EAFE-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_MIX_VOLUME); +#define KSAUDFNAME_MONO_MIX_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_MONO_MIX_VOLUME) + +#define STATIC_KSAUDFNAME_MONO_MIX_MUTE\ + 0x2bc31d69L, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68 +DEFINE_GUIDSTRUCT("2BC31D69-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MONO_MIX_MUTE); +#define KSAUDFNAME_MONO_MIX_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_MONO_MIX_MUTE) + +#define STATIC_KSAUDFNAME_MICROPHONE_BOOST\ + 0x2bc31d6aL, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68 +DEFINE_GUIDSTRUCT("2BC31D6A-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_MICROPHONE_BOOST); +#define KSAUDFNAME_MICROPHONE_BOOST DEFINE_GUIDNAMED(KSAUDFNAME_MICROPHONE_BOOST) + +#define STATIC_KSAUDFNAME_ALTERNATE_MICROPHONE\ + 0x2bc31d6bL, 0x96e3, 0x11d2, 0xac, 0x4c, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68 +DEFINE_GUIDSTRUCT("2BC31D6B-96E3-11d2-AC4C-00C04F8EFB68", KSAUDFNAME_ALTERNATE_MICROPHONE); +#define KSAUDFNAME_ALTERNATE_MICROPHONE DEFINE_GUIDNAMED(KSAUDFNAME_ALTERNATE_MICROPHONE) + +#define STATIC_KSAUDFNAME_3D_DEPTH\ + 0x63ff5747L, 0x991f, 0x11d2, 0xac, 0x4d, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68 +DEFINE_GUIDSTRUCT("63FF5747-991F-11d2-AC4D-00C04F8EFB68", KSAUDFNAME_3D_DEPTH); +#define KSAUDFNAME_3D_DEPTH DEFINE_GUIDNAMED(KSAUDFNAME_3D_DEPTH) + +#define STATIC_KSAUDFNAME_3D_CENTER\ + 0x9f0670b4L, 0x991f, 0x11d2, 0xac, 0x4d, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68 +DEFINE_GUIDSTRUCT("9F0670B4-991F-11d2-AC4D-00C04F8EFB68", KSAUDFNAME_3D_CENTER); +#define KSAUDFNAME_3D_CENTER DEFINE_GUIDNAMED(KSAUDFNAME_3D_CENTER) + +#define STATIC_KSAUDFNAME_VIDEO_VOLUME\ + 0x9b46e708L, 0x992a, 0x11d2, 0xac, 0x4d, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68 +DEFINE_GUIDSTRUCT("9B46E708-992A-11d2-AC4D-00C04F8EFB68", KSAUDFNAME_VIDEO_VOLUME); +#define KSAUDFNAME_VIDEO_VOLUME DEFINE_GUIDNAMED(KSAUDFNAME_VIDEO_VOLUME) + +#define STATIC_KSAUDFNAME_VIDEO_MUTE\ + 0x9b46e709L, 0x992a, 0x11d2, 0xac, 0x4d, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68 +DEFINE_GUIDSTRUCT("9B46E709-992A-11d2-AC4D-00C04F8EFB68", KSAUDFNAME_VIDEO_MUTE); +#define KSAUDFNAME_VIDEO_MUTE DEFINE_GUIDNAMED(KSAUDFNAME_VIDEO_MUTE) + +#define STATIC_KSAUDFNAME_VIDEO\ + 0x915daec4L, 0xa434, 0x11d2, 0xac, 0x52, 0x0, 0xc0, 0x4f, 0x8e, 0xfb, 0x68 +DEFINE_GUIDSTRUCT("915DAEC4-A434-11d2-AC52-00C04F8EFB68", KSAUDFNAME_VIDEO); +#define KSAUDFNAME_VIDEO DEFINE_GUIDNAMED(KSAUDFNAME_VIDEO) + +#define STATIC_KSAUDFNAME_PEAKMETER\ + 0x57e24340L, 0xfc5b, 0x4612, 0xa5, 0x62, 0x72, 0xb1, 0x1a, 0x29, 0xdf, 0xae +DEFINE_GUIDSTRUCT("57E24340-FC5B-4612-A562-72B11A29DFAE", KSAUDFNAME_PEAKMETER); +#define KSAUDFNAME_PEAKMETER DEFINE_GUIDNAMED(KSAUDFNAME_PEAKMETER) + +// Internal topology node pin definitions + +#define KSNODEPIN_STANDARD_IN 1 +#define KSNODEPIN_STANDARD_OUT 0 + +#define KSNODEPIN_SUM_MUX_IN 1 // can be >= 1 +#define KSNODEPIN_SUM_MUX_OUT 0 + +#define KSNODEPIN_DEMUX_IN 0 +#define KSNODEPIN_DEMUX_OUT 1 // can be >= 1 + +#define KSNODEPIN_AEC_RENDER_IN 1 +#define KSNODEPIN_AEC_RENDER_OUT 0 +#define KSNODEPIN_AEC_CAPTURE_IN 2 +#define KSNODEPIN_AEC_CAPTURE_OUT 3 + +//=========================================================================== +//=========================================================================== + +#define STATIC_KSMETHODSETID_Wavetable\ + 0xDCEF31EBL, 0xD907, 0x11D0, 0x95, 0x83, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("DCEF31EB-D907-11D0-9583-00C04FB925D3", KSMETHODSETID_Wavetable); +#define KSMETHODSETID_Wavetable DEFINE_GUIDNAMED(KSMETHODSETID_Wavetable) + +typedef enum { + KSMETHOD_WAVETABLE_WAVE_ALLOC, + KSMETHOD_WAVETABLE_WAVE_FREE, + KSMETHOD_WAVETABLE_WAVE_FIND, + KSMETHOD_WAVETABLE_WAVE_WRITE +} KSMETHOD_WAVETABLE; + +typedef struct { + KSIDENTIFIER Identifier; // wave identifier + ULONG Size; // wave size + BOOL Looped; // wave looped flag + ULONG LoopPoint; // wave loop point + BOOL InROM; // wave InROM flag + KSDATAFORMAT Format; // wave format +} KSWAVETABLE_WAVE_DESC, *PKSWAVETABLE_WAVE_DESC; + + +//=========================================================================== +//=========================================================================== + +/* + Property sets and items +*/ + +//=========================================================================== +//=========================================================================== + +#define STATIC_KSPROPSETID_Itd3d\ + 0x6429f090L, 0x9fd9, 0x11d0, 0xa7, 0x5b, 0x00, 0xa0, 0xc9, 0x03, 0x65, 0xe3 +DEFINE_GUIDSTRUCT("6429f090-9fd9-11d0-a75b-00a0c90365e3", KSPROPSETID_Itd3d); +#define KSPROPSETID_Itd3d DEFINE_GUIDNAMED(KSPROPSETID_Itd3d) + +typedef enum { + KSPROPERTY_ITD3D_PARAMS = 0 +} KSPROPERTY_ITD3D; + +//=========================================================================== +//=========================================================================== + +#define STATIC_KSPROPSETID_Hrtf3d\ + 0xb66decb0L, 0xa083, 0x11d0, 0x85, 0x1e, 0x00, 0xc0, 0x4f, 0xd9, 0xba, 0xf3 +DEFINE_GUIDSTRUCT("b66decb0-a083-11d0-851e-00c04fd9baf3", KSPROPSETID_Hrtf3d); +#define KSPROPSETID_Hrtf3d DEFINE_GUIDNAMED(KSPROPSETID_Hrtf3d) + +typedef enum { + KSPROPERTY_HRTF3D_PARAMS = 0, + KSPROPERTY_HRTF3D_INITIALIZE, + KSPROPERTY_HRTF3D_FILTER_FORMAT +} KSPROPERTY_HRTF3D; + + +//=========================================================================== +//=========================================================================== + +#define STATIC_KSPROPSETID_Wave_Queued\ + 0x16a15b10L, 0x16f0, 0x11d0, 0xa1, 0x95, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4 +DEFINE_GUIDSTRUCT("16a15b10-16f0-11d0-a195-0020afd156e4", KSPROPSETID_Wave_Queued); +#define KSPROPSETID_Wave_Queued DEFINE_GUIDNAMED(KSPROPSETID_Wave_Queued) + +#define KSPROPERTY_WAVE_QUEUED_POSITION 0x00000001 + +#define STATIC_KSMETHODSETID_Wave_Queued\ + 0x7432c160L, 0x8827, 0x11cf, 0xa1, 0x02, 0x00, 0x20, 0xaf, 0xd1, 0x56, 0xe4 +DEFINE_GUIDSTRUCT("7432c160-8827-11cf-a102-0020afd156e4", KSMETHODSETID_Wave_Queued); +#define KSMETHODSETID_Wave_Queued DEFINE_GUIDNAMED(KSMETHODSETID_Wave_Queued) + +#define KSMETHOD_WAVE_QUEUED_BREAKLOOP 0x00000001 + +#define STATIC_KSPROPSETID_Wave\ + 0x924e54b0L, 0x630f, 0x11cf, 0xad, 0xa7, 0x08, 0x00, 0x3e, 0x30, 0x49, 0x4a +DEFINE_GUIDSTRUCT("924e54b0-630f-11cf-ada7-08003e30494a", KSPROPSETID_Wave); +#define KSPROPSETID_Wave DEFINE_GUIDNAMED(KSPROPSETID_Wave) + +typedef enum { + KSPROPERTY_WAVE_COMPATIBLE_CAPABILITIES, + KSPROPERTY_WAVE_INPUT_CAPABILITIES, + KSPROPERTY_WAVE_OUTPUT_CAPABILITIES, + KSPROPERTY_WAVE_BUFFER, + KSPROPERTY_WAVE_FREQUENCY, + KSPROPERTY_WAVE_VOLUME, + KSPROPERTY_WAVE_PAN +} KSPROPERTY_WAVE; + +typedef struct { + ULONG ulDeviceType; +} KSWAVE_COMPATCAPS, *PKSWAVE_COMPATCAPS; + +#define KSWAVE_COMPATCAPS_INPUT 0x00000000 +#define KSWAVE_COMPATCAPS_OUTPUT 0x00000001 + +typedef struct { + ULONG MaximumChannelsPerConnection; + ULONG MinimumBitsPerSample; + ULONG MaximumBitsPerSample; + ULONG MinimumSampleFrequency; + ULONG MaximumSampleFrequency; + ULONG TotalConnections; + ULONG ActiveConnections; +} KSWAVE_INPUT_CAPABILITIES, *PKSWAVE_INPUT_CAPABILITIES; + +typedef struct { + ULONG MaximumChannelsPerConnection; + ULONG MinimumBitsPerSample; + ULONG MaximumBitsPerSample; + ULONG MinimumSampleFrequency; + ULONG MaximumSampleFrequency; + ULONG TotalConnections; + ULONG StaticConnections; + ULONG StreamingConnections; + ULONG ActiveConnections; + ULONG ActiveStaticConnections; + ULONG ActiveStreamingConnections; + ULONG Total3DConnections; + ULONG Static3DConnections; + ULONG Streaming3DConnections; + ULONG Active3DConnections; + ULONG ActiveStatic3DConnections; + ULONG ActiveStreaming3DConnections; + ULONG TotalSampleMemory; + ULONG FreeSampleMemory; + ULONG LargestFreeContiguousSampleMemory; +} KSWAVE_OUTPUT_CAPABILITIES, *PKSWAVE_OUTPUT_CAPABILITIES; + +typedef struct { + LONG LeftAttenuation; + LONG RightAttenuation; +} KSWAVE_VOLUME, *PKSWAVE_VOLUME; + +#define KSWAVE_BUFFER_ATTRIBUTEF_LOOPING 0x00000001 +#define KSWAVE_BUFFER_ATTRIBUTEF_STATIC 0x00000002 + +typedef struct { + ULONG Attributes; + ULONG BufferSize; + PVOID BufferAddress; +} KSWAVE_BUFFER, *PKSWAVE_BUFFER; + +//=========================================================================== +//=========================================================================== + +#define STATIC_KSMUSIC_TECHNOLOGY_PORT\ + 0x86C92E60L, 0x62E8, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("86C92E60-62E8-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_PORT); +#define KSMUSIC_TECHNOLOGY_PORT DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_PORT) + +#define STATIC_KSMUSIC_TECHNOLOGY_SQSYNTH\ + 0x0ECF4380L, 0x62E9, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("0ECF4380-62E9-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_SQSYNTH); +#define KSMUSIC_TECHNOLOGY_SQSYNTH DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_SQSYNTH) + +#define STATIC_KSMUSIC_TECHNOLOGY_FMSYNTH\ + 0x252C5C80L, 0x62E9, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("252C5C80-62E9-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_FMSYNTH); +#define KSMUSIC_TECHNOLOGY_FMSYNTH DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_FMSYNTH) + +#define STATIC_KSMUSIC_TECHNOLOGY_WAVETABLE\ + 0x394EC7C0L, 0x62E9, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("394EC7C0-62E9-11CF-A5D6-28DB04C10000", KSMUSIC_TECHNOLOGY_WAVETABLE); +#define KSMUSIC_TECHNOLOGY_WAVETABLE DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_WAVETABLE) + +#define STATIC_KSMUSIC_TECHNOLOGY_SWSYNTH\ + 0x37407736L, 0x3620, 0x11D1, 0x85, 0xD3, 0x00, 0x00, 0xF8, 0x75, 0x43, 0x80 +DEFINE_GUIDSTRUCT("37407736-3620-11D1-85D3-0000F8754380", KSMUSIC_TECHNOLOGY_SWSYNTH); +#define KSMUSIC_TECHNOLOGY_SWSYNTH DEFINE_GUIDNAMED(KSMUSIC_TECHNOLOGY_SWSYNTH) + +#define STATIC_KSPROPSETID_WaveTable\ + 0x8539E660L, 0x62E9, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("8539E660-62E9-11CF-A5D6-28DB04C10000", KSPROPSETID_WaveTable); +#define KSPROPSETID_WaveTable DEFINE_GUIDNAMED(KSPROPSETID_WaveTable) + +typedef enum { + KSPROPERTY_WAVETABLE_LOAD_SAMPLE, + KSPROPERTY_WAVETABLE_UNLOAD_SAMPLE, + KSPROPERTY_WAVETABLE_MEMORY, + KSPROPERTY_WAVETABLE_VERSION +} KSPROPERTY_WAVETABLE; + +typedef struct { + KSDATARANGE DataRange; + GUID Technology; + ULONG Channels; + ULONG Notes; + ULONG ChannelMask; +} KSDATARANGE_MUSIC, *PKSDATARANGE_MUSIC; + +//=========================================================================== + +#define STATIC_KSEVENTSETID_Cyclic\ + 0x142C1AC0L, 0x072A, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("142C1AC0-072A-11D0-A5D6-28DB04C10000", KSEVENTSETID_Cyclic); +#define KSEVENTSETID_Cyclic DEFINE_GUIDNAMED(KSEVENTSETID_Cyclic) + +typedef enum { + KSEVENT_CYCLIC_TIME_INTERVAL, +} KSEVENT_CYCLIC_TIME; + +#define STATIC_KSPROPSETID_Cyclic\ + 0x3FFEAEA0L, 0x2BEE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("3FFEAEA0-2BEE-11CF-A5D6-28DB04C10000", KSPROPSETID_Cyclic); +#define KSPROPSETID_Cyclic DEFINE_GUIDNAMED(KSPROPSETID_Cyclic) + +typedef enum { + KSPROPERTY_CYCLIC_POSITION, +} KSPROPERTY_CYCLIC; + +//=========================================================================== +#define STATIC_KSEVENTSETID_AudioControlChange\ + 0xE85E9698L, 0xFA2F, 0x11D1, 0x95, 0xBD, 0x00, 0xC0, 0x4F, 0xB9, 0x25, 0xD3 +DEFINE_GUIDSTRUCT("E85E9698-FA2F-11D1-95BD-00C04FB925D3", KSEVENTSETID_AudioControlChange); +#define KSEVENTSETID_AudioControlChange DEFINE_GUIDNAMED(KSEVENTSETID_AudioControlChange) + +typedef enum { + KSEVENT_CONTROL_CHANGE, +} KSEVENT_AUDIO_CONTROL_CHANGE; + +//=========================================================================== + +#define STATIC_KSEVENTSETID_LoopedStreaming\ + 0x4682B940L, 0xC6EF, 0x11D0, 0x96, 0xD8, 0x00, 0xAA, 0x00, 0x51, 0xE5, 0x1D +DEFINE_GUIDSTRUCT("4682B940-C6EF-11D0-96D8-00AA0051E51D", KSEVENTSETID_LoopedStreaming); +#define KSEVENTSETID_LoopedStreaming DEFINE_GUIDNAMED(KSEVENTSETID_LoopedStreaming) + +typedef enum { + KSEVENT_LOOPEDSTREAMING_POSITION, +} KSEVENT_LOOPEDSTREAMING; + +typedef struct { + KSEVENTDATA KsEventData; +#if defined(_NTDDK_) + ULONGLONG Position; +#else // !_NTDDK_ + DWORDLONG Position; +#endif // !_NTDDK_ +} LOOPEDSTREAMING_POSITION_EVENT_DATA, *PLOOPEDSTREAMING_POSITION_EVENT_DATA ; + +#define STATIC_KSEVENTSETID_Sysaudio \ + 0x04800320L, 0x4491, 0x11D1, 0xA0, 0x50, 0x40, 0x57, 0x05, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("04800320-4491-11D1-A050-405705C10000", KSEVENTSETID_Sysaudio); +#define KSEVENTSETID_Sysaudio DEFINE_GUIDNAMED(KSEVENTSETID_Sysaudio) + +typedef enum { + KSEVENT_SYSAUDIO_ADDREMOVE_DEVICE, + KSEVENT_SYSAUDIO_CHANGE_DEVICE +} KSEVENT_SYSAUDIO; + +#define STATIC_KSPROPSETID_Sysaudio\ + 0xCBE3FAA0L, 0xCC75, 0x11D0, 0xB4, 0x65, 0x00, 0x00, 0x1A, 0x18, 0x18, 0xE6 +DEFINE_GUIDSTRUCT("CBE3FAA0-CC75-11D0-B465-00001A1818E6", KSPROPSETID_Sysaudio); +#define KSPROPSETID_Sysaudio DEFINE_GUIDNAMED(KSPROPSETID_Sysaudio) + +typedef enum { + KSPROPERTY_SYSAUDIO_DEVICE_COUNT = 1, + KSPROPERTY_SYSAUDIO_DEVICE_FRIENDLY_NAME, + KSPROPERTY_SYSAUDIO_DEVICE_INSTANCE, + KSPROPERTY_SYSAUDIO_DEVICE_INTERFACE_NAME, + KSPROPERTY_SYSAUDIO_SELECT_GRAPH, + KSPROPERTY_SYSAUDIO_CREATE_VIRTUAL_SOURCE, + KSPROPERTY_SYSAUDIO_DEVICE_DEFAULT, + KSPROPERTY_SYSAUDIO_ALWAYS_CREATE_VIRTUAL_SOURCE, + KSPROPERTY_SYSAUDIO_ADDREMOVE_LOCK, + KSPROPERTY_SYSAUDIO_ADDREMOVE_UNLOCK, + KSPROPERTY_SYSAUDIO_RENDER_PIN_INSTANCES, + KSPROPERTY_SYSAUDIO_RENDER_CONNECTION_INDEX, + KSPROPERTY_SYSAUDIO_CREATE_VIRTUAL_SOURCE_ONLY, + KSPROPERTY_SYSAUDIO_INSTANCE_INFO, + KSPROPERTY_SYSAUDIO_PREFERRED_DEVICE +} KSPROPERTY_SYSAUDIO; + +typedef struct { + KSPROPERTY Property; + GUID PinCategory; + GUID PinName; +} SYSAUDIO_CREATE_VIRTUAL_SOURCE, *PSYSAUDIO_CREATE_VIRTUAL_SOURCE; + +typedef struct { + KSPROPERTY Property; + ULONG PinId; + ULONG NodeId; + ULONG Flags; + ULONG Reserved; +} SYSAUDIO_SELECT_GRAPH, *PSYSAUDIO_SELECT_GRAPH; + +typedef struct { + KSPROPERTY Property; + ULONG Flags; + ULONG DeviceNumber; +} SYSAUDIO_INSTANCE_INFO, *PSYSAUDIO_INSTANCE_INFO; + +#define SYSAUDIO_FLAGS_DONT_COMBINE_PINS 0x00000001 + +typedef struct { + KSPROPERTY Property; + ULONG Flags; + ULONG Index; // KSPROPERTY_SYSAUDIO_DEFAULT_TYPE +} SYSAUDIO_PREFERRED_DEVICE, *PSYSAUDIO_PREFERRED_DEVICE; + +#define SYSAUDIO_FLAGS_CLEAR_PREFERRED 0x00000002 + +typedef enum { // preferred device index + KSPROPERTY_SYSAUDIO_NORMAL_DEFAULT = 0, + KSPROPERTY_SYSAUDIO_PLAYBACK_DEFAULT, + KSPROPERTY_SYSAUDIO_RECORD_DEFAULT, + KSPROPERTY_SYSAUDIO_MIDI_DEFAULT, + KSPROPERTY_SYSAUDIO_MIXER_DEFAULT +} KSPROPERTY_SYSAUDIO_DEFAULT_TYPE; + +#define STATIC_KSPROPSETID_Sysaudio_Pin \ + 0xA3A53220L, 0xC6E4, 0x11D0, 0xB4, 0x65, 0x00, 0x00, 0x1A, 0x18, 0x18, 0xE6 +DEFINE_GUIDSTRUCT("A3A53220-C6E4-11D0-B465-00001A1818E6", KSPROPSETID_Sysaudio_Pin); +#define KSPROPSETID_Sysaudio_Pin DEFINE_GUIDNAMED(KSPROPSETID_Sysaudio_Pin) + +typedef enum { + KSPROPERTY_SYSAUDIO_TOPOLOGY_CONNECTION_INDEX, + KSPROPERTY_SYSAUDIO_ATTACH_VIRTUAL_SOURCE, + KSPROPERTY_SYSAUDIO_PIN_VOLUME_NODE +} KSPROPERTY_SYSAUDIO_PIN; + +typedef struct { + KSPROPERTY Property; + ULONG MixerPinId; + ULONG Reserved; +} SYSAUDIO_ATTACH_VIRTUAL_SOURCE, *PSYSAUDIO_ATTACH_VIRTUAL_SOURCE; + +typedef struct { + KSPROPERTY Property; + ULONG NodeId; + ULONG Reserved; +} KSNODEPROPERTY, *PKSNODEPROPERTY; + +typedef struct { + KSNODEPROPERTY NodeProperty; + LONG Channel; // value to get or set + ULONG Reserved; +} KSNODEPROPERTY_AUDIO_CHANNEL, *PKSNODEPROPERTY_AUDIO_CHANNEL; + +typedef struct { + KSNODEPROPERTY NodeProperty; + ULONG DevSpecificId; + ULONG DeviceInfo; + ULONG Length; +} KSNODEPROPERTY_AUDIO_DEV_SPECIFIC, *PKSNODEPROPERTY_AUDIO_DEV_SPECIFIC; + +typedef struct { + KSNODEPROPERTY NodeProperty; + PVOID ListenerId; +#ifndef _WIN64 + ULONG Reserved; +#endif // _WIN64 +} KSNODEPROPERTY_AUDIO_3D_LISTENER, *PKSNODEPROPERTY_AUDIO_3D_LISTENER; + +typedef struct { + KSNODEPROPERTY NodeProperty; + PVOID AppContext; + ULONG Length; +#ifndef _WIN64 + ULONG Reserved; +#endif // _WIN64 +} KSNODEPROPERTY_AUDIO_PROPERTY, *PKSNODEPROPERTY_AUDIO_PROPERTY; + +//=========================================================================== + +#define STATIC_KSPROPSETID_Linear\ + 0x5A2FFE80L, 0x16B9, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("5A2FFE80-16B9-11D0-A5D6-28DB04C10000", KSPROPSETID_Linear); +#define KSPROPSETID_Linear DEFINE_GUIDNAMED(KSPROPSETID_Linear) + +typedef enum { + KSPROPERTY_LINEAR_POSITION, +} KSPROPERTY_LINEAR; + +//=========================================================================== + +// +// Midi definitions +// + +/* + Formats +*/ + +#define STATIC_KSDATAFORMAT_TYPE_MUSIC\ + 0xE725D360L, 0x62CC, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("E725D360-62CC-11CF-A5D6-28DB04C10000", KSDATAFORMAT_TYPE_MUSIC); +#define KSDATAFORMAT_TYPE_MUSIC DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MUSIC) + +// 'mids' == MEDIATYPE_Midi +#define STATIC_KSDATAFORMAT_TYPE_MIDI\ + 0x7364696DL, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 +DEFINE_GUIDSTRUCT("7364696D-0000-0010-8000-00aa00389b71", KSDATAFORMAT_TYPE_MIDI); +#define KSDATAFORMAT_TYPE_MIDI DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MIDI) + +#define STATIC_KSDATAFORMAT_SUBTYPE_MIDI\ + 0x1D262760L, 0xE957, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("1D262760-E957-11CF-A5D6-28DB04C10000", KSDATAFORMAT_SUBTYPE_MIDI); +#define KSDATAFORMAT_SUBTYPE_MIDI DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MIDI) + +#define STATIC_KSDATAFORMAT_SUBTYPE_MIDI_BUS\ + 0x2CA15FA0L, 0x6CFE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00 +DEFINE_GUIDSTRUCT("2CA15FA0-6CFE-11CF-A5D6-28DB04C10000", KSDATAFORMAT_SUBTYPE_MIDI_BUS); +#define KSDATAFORMAT_SUBTYPE_MIDI_BUS DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MIDI_BUS) + +#define STATIC_KSDATAFORMAT_SUBTYPE_RIFFMIDI\ + 0x4995DAF0L, 0x9EE6, 0x11D0, 0xA4, 0x0E, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("4995DAF0-9EE6-11D0-A40E-00A0C9223196", KSDATAFORMAT_SUBTYPE_RIFFMIDI); +#define KSDATAFORMAT_SUBTYPE_RIFFMIDI DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_RIFFMIDI) + +/* + KSDATAFORMAT_SUBTYPE_DIRECTMUSIC + see DMusicKS.h +*/ + +// WARNING! This structure MUST be dword aligned +// regardless of the number of data bytes. + +typedef struct { + ULONG TimeDeltaMs; // Delta Milliseconds from the previous midiformat + // in the packet. The first midiformat in the packet + // is a delta from the PTS in the KSSTREAM_HEADER. + ULONG ByteCount; // Number of bytes of data that follow this struct. +} KSMUSICFORMAT, *PKSMUSICFORMAT; + +// +// This entire set of MPEG Standard/Dialect Guids are obsolete. Do not use them. +// +//==================================================================================================== +//==================================================================================================== +// The following official MPEG Formats, Subtypes and Specifiers are listed as required or optional +// These official MPEG GUIDs are the preferred method of supporting MPEG/AC-3 media types in new code. +// Older MPEG GUIDs should also be supported for compatibilty, but these new modes are still required. +//==================================================================================================== +//==================================================================================================== + +/* +This is a summary of what media types/specifiers will be required for all DVD+DSS+DVB+DTV MPEG decoders. +These media types are what the decoder driver must accept, hardware support for all of these media types +may or may not actually be provided by the decoder natively. These media types are intended to define +the "officially" supported MPEG/AC-3 media types that all WHQL certified decoders must implement. This +specifically includes driver and/or hardware support for all the required standards and dialects. + +All MPEG video decoders must support all of the MPEG video modes shown as [required] below. +All MPEG audio decoders must support all of the MPEG audio modes shown as [required] below. +All AC-3 audio decoders must support all of the AC-3 audio modes shown as [required] below. +The line items shown as [optional] need not be implemented, but are possible formats that might be implemented. + +Note that the input/output pin formats are defined by 2 or 3 GUIDs: TYPE, SUBTYPE, and maybe SPECIFIER. +The specifiers are included if the data format is a "dialect" that needs to be differentiated during decoding. +The decoder MUST be prepared to deal with ALL requests for _required_ "Standard" formats OR _required_ "Dialects". + +STATIC_KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM [required] + STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO [required] + STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO [optional] + STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO [required] + STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO [optional] + STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO [required] + STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO [required] + STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO [required] + STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO [optional] + STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO [required] + STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO [optional] +STATIC_KSDATAFORMAT_TYPE_STANDARD_PES_PACKET [required] + STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO [optional] + STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO [optional] + STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO [optional] + STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO [optional] + STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO [required] + STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO [required] + STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO [required] + STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO [required] + STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO [required] + STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO [optional] +STATIC_KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER [required] + STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO [required] + STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO [required] + STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO [required] + STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO [optional] + STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO [required] + STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO [optional] + +Note that the SPECIFIER GUIDs normally identify particular versions of MPEG such as DSS and DVD. +This approach was taken to minimize the number of DSS/DVB/DVD/DTV etc. media SUBTYPES. +These specifiers are currently required to disambiguate MPEG syntax _parsing_ by the decoder +using alternate parsing routines or downloadable firmware or hardware decode settings. + +In the future these specifiers will be extended to cover new KS MPEG flavors such as DVB and DTV. +Thus, the optional specifiers will be subject to clarification and/or definition as they are needed. + +Important note: Per the ITU MPEG specs, MPEG 2 media may contain pure MPEG 1 syntax and +any "MPEG 2" PES packets may actually contain MPEG 1 payloads and MPEG 1 syntax. Some MPEG +broadcasts can revert from MPEG2 to MPEG1 format data at their discretion, without warning. + +CAUTION: Decoders MUST attempt to process MPEG data AS SOON AS POSSIBLE after reception. +In particular, elementary MPEG or MPEG PES packet streams should not be aggregated into DVD +"pack headers" internally before submission to the codec hardware if AT ALL POSSIBLE. The +reason is that mpeg data may need to be processed immediately but there may be no additional +MPEG data forthcoming to fill up the PES packet OR DVD "pack" in a timely fashion. This is +particularly true of MPEG dialects that utilize "repeat field signally" to reuse the last +decoded MPEG video field. + +*/ + +///////////////////////////////////////////////////////////////////////// +// The major data type GUIDs that define the data packet encapsulation // +///////////////////////////////////////////////////////////////////////// + +// STATIC_KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM +#define STATIC_KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM \ + 0x36523b11L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a +DEFINE_GUIDSTRUCT("36523B11-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM ); +#define KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_STANDARD_ELEMENTARY_STREAM) + +// STATIC_KSDATAFORMAT_TYPE_STANDARD_PES_PACKET +#define STATIC_KSDATAFORMAT_TYPE_STANDARD_PES_PACKET \ + 0x36523b12L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a +DEFINE_GUIDSTRUCT("36523B12-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_TYPE_STANDARD_PES_PACKET ); +#define KSDATAFORMAT_TYPE_STANDARD_PES_PACKET DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_STANDARD_PES_PACKET) + +// STATIC_KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER +#define STATIC_KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER \ + 0x36523b13L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a +DEFINE_GUIDSTRUCT("36523B13-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER ); +#define KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_STANDARD_PACK_HEADER) + +/////////////////////////////////////////////////////////////////////////////// +// The minor data subtype GUIDs that define the exact class of the data type.// +/////////////////////////////////////////////////////////////////////////////// + +// STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO +#define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO \ + 0x36523b21L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a +DEFINE_GUIDSTRUCT("36523B21-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO ); +#define KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_VIDEO) + +// STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO +#define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO \ + 0x36523b22L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a +DEFINE_GUIDSTRUCT("36523B22-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO ); +#define KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG1_AUDIO) + +// STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO +#define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO \ + 0x36523b23L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a +DEFINE_GUIDSTRUCT("36523B23-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO ); +#define KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_VIDEO) + +// STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO +#define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO \ + 0x36523b24L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a +DEFINE_GUIDSTRUCT("36523B24-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO ); +#define KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_MPEG2_AUDIO) + +// STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO +#define STATIC_KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO \ + 0x36523b25L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a +DEFINE_GUIDSTRUCT("36523B25-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO ); +#define KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_STANDARD_AC3_AUDIO) + +/////////////////////////////////////////////////////////////////////////////// +// The low-level specifier GUIDs that define the flavor of the data subtype. // +// Some SUBTYPES, notably MPEG2_VIDEO, MPEG2_AUDIO have different dialects. // +// These specifiers are intended to be accompanied by a specifier structure. // +/////////////////////////////////////////////////////////////////////////////// + +// STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO +#define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO \ + 0x36523b31L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a +DEFINE_GUIDSTRUCT("36523B31-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO ); +#define KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_VIDEO) + +// STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO +#define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO \ + 0x36523b32L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a +DEFINE_GUIDSTRUCT("36523B32-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO ); +#define KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG1_AUDIO) + +// STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO Associated with KS_MPEGVIDEOINFO2 defined later +#define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO \ + 0x36523b33L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a +DEFINE_GUIDSTRUCT("36523B33-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO ); +#define KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_VIDEO) + +// STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO Associated with KS_MPEGAUDIOINFO defined later +#define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO \ + 0x36523b34L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a +DEFINE_GUIDSTRUCT("36523B34-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO ); +#define KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_MPEG2_AUDIO) + +// STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO +#define STATIC_KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO \ + 0x36523b35L, 0x8ee5, 0x11d1, 0x8c, 0xa3, 0x00, 0x60, 0xb0, 0x57, 0x66, 0x4a +DEFINE_GUIDSTRUCT("36523B35-8EE5-11d1-8CA3-0060B057664A", KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO ); +#define KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_DIALECT_AC3_AUDIO) + +//==================================================================================================== +//==================================================================================================== +// *** COMPATIBILITY WARNING *** +// The *following* older DSS, MPEG, DVD & AC-3 GUID definitions are retained for backward compability. +// These MPEG GUIDs should also be supported for compatibilty, but the above newer modes are still required. +//==================================================================================================== +//==================================================================================================== + +// +// DSS definitions +// + +#define STATIC_KSDATAFORMAT_SUBTYPE_DSS_VIDEO\ + 0xa0af4f81L, 0xe163, 0x11d0, 0xba, 0xd9, 0x00, 0x60, 0x97, 0x44, 0x11, 0x1a +DEFINE_GUIDSTRUCT("a0af4f81-e163-11d0-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_DSS_VIDEO); +#define KSDATAFORMAT_SUBTYPE_DSS_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DSS_VIDEO) + +#define STATIC_KSDATAFORMAT_SUBTYPE_DSS_AUDIO\ + 0xa0af4f82L, 0xe163, 0x11d0, 0xba, 0xd9, 0x00, 0x60, 0x97, 0x44, 0x11, 0x1a +DEFINE_GUIDSTRUCT("a0af4f82-e163-11d0-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_DSS_AUDIO); +#define KSDATAFORMAT_SUBTYPE_DSS_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DSS_AUDIO) + +// +// End of obsolete MPEG definitions. +// + +// +// mpeg 1 definitions +// +#define STATIC_KSDATAFORMAT_SUBTYPE_MPEG1Packet\ + 0xe436eb80, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 +DEFINE_GUIDSTRUCT("e436eb80-524f-11ce-9F53-0020af0ba770", KSDATAFORMAT_SUBTYPE_MPEG1Packet); +#define KSDATAFORMAT_SUBTYPE_MPEG1Packet DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG1Packet) + +#define STATIC_KSDATAFORMAT_SUBTYPE_MPEG1Payload\ + 0xe436eb81, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 +DEFINE_GUIDSTRUCT("e436eb81-524f-11ce-9F53-0020af0ba770", KSDATAFORMAT_SUBTYPE_MPEG1Payload); +#define KSDATAFORMAT_SUBTYPE_MPEG1Payload DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG1Payload) + +// MEDIASUBTYPE_MPEG1Video +#define STATIC_KSDATAFORMAT_SUBTYPE_MPEG1Video\ + 0xe436eb86, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 +DEFINE_GUIDSTRUCT("e436eb86-524f-11ce-9f53-0020af0ba770", KSDATAFORMAT_SUBTYPE_MPEG1Video); +#define KSDATAFORMAT_SUBTYPE_MPEG1Video DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG1Video) + +//FORMAT_MPEGVideo +#define STATIC_KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO\ + 0x05589f82L, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a +DEFINE_GUIDSTRUCT("05589f82-c356-11ce-bf01-00aa0055595a", KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO); +#define KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_MPEG1_VIDEO) + +// +// mpeg 2 definitions +// +#define STATIC_KSDATAFORMAT_TYPE_MPEG2_PES\ + 0xe06d8020L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea +DEFINE_GUIDSTRUCT("e06d8020-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_TYPE_MPEG2_PES); +#define KSDATAFORMAT_TYPE_MPEG2_PES DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MPEG2_PES) + +#define STATIC_KSDATAFORMAT_TYPE_MPEG2_PROGRAM\ + 0xe06d8022L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea +DEFINE_GUIDSTRUCT("e06d8022-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_TYPE_MPEG2_PROGRAM); +#define KSDATAFORMAT_TYPE_MPEG2_PROGRAM DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MPEG2_PROGRAM) + +#define STATIC_KSDATAFORMAT_TYPE_MPEG2_TRANSPORT\ + 0xe06d8023L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea +DEFINE_GUIDSTRUCT("e06d8023-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_TYPE_MPEG2_TRANSPORT); +#define KSDATAFORMAT_TYPE_MPEG2_TRANSPORT DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_MPEG2_TRANSPORT) + +#define STATIC_KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO\ + 0xe06d8026L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea +DEFINE_GUIDSTRUCT("e06d8026-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO); +#define KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG2_VIDEO) + +// use MPEGVIDEOINFO2 (defined below) with KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO +#define STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO\ + 0xe06d80e3L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea +DEFINE_GUIDSTRUCT("e06d80e3-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO); +#define KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_MPEG2_VIDEO) + + +// +// Mpeg2 video properties +// + + +#define STATIC_KSPROPSETID_Mpeg2Vid\ + 0xC8E11B60L, 0x0CC9, 0x11D0, 0xBD, 0x69, 0x00, 0x35, 0x05, 0xC1, 0x03, 0xA9 +DEFINE_GUIDSTRUCT("C8E11B60-0CC9-11D0-BD69-003505C103A9", KSPROPSETID_Mpeg2Vid); +#define KSPROPSETID_Mpeg2Vid DEFINE_GUIDNAMED( KSPROPSETID_Mpeg2Vid ) + + +typedef enum { + KSPROPERTY_MPEG2VID_MODES, // available output modes of decoder + KSPROPERTY_MPEG2VID_CUR_MODE, // current mode of the decoder + KSPROPERTY_MPEG2VID_4_3_RECT, // output coordinates for 4:3 source + KSPROPERTY_MPEG2VID_16_9_RECT, // output coordinates for 16:9 source + KSPROPERTY_MPEG2VID_16_9_PANSCAN, // pan and scan vectors +} KSPROPERTY_MPEG2VID; + +// +// bit field definitions for MPEG2 VIDEO mode +// + +#define KSMPEGVIDMODE_PANSCAN 0x0001 +#define KSMPEGVIDMODE_LTRBOX 0x0002 +#define KSMPEGVIDMODE_SCALE 0x0004 + +// +// rectangle definitions for the 4/3 and 16/9 cropping properties of +// the MPEG2Video decoder +// + +typedef struct _KSMPEGVID_RECT { + ULONG StartX; + ULONG StartY; + ULONG EndX; + ULONG EndY; +} KSMPEGVID_RECT, *PKSMPEGVID_RECT; + +// +// Params for pan / scan +// + + +// +// MPEG2 Audio definition +// + +#define STATIC_KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO\ + 0xe06d802bL, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea +DEFINE_GUIDSTRUCT("e06d802b-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO); +#define KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_MPEG2_AUDIO) + +#define STATIC_KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO\ + 0xe06d80e5L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea +DEFINE_GUIDSTRUCT("e06d80e5-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO); +#define KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_MPEG2_AUDIO) + +// +// DVD LPCM Audio definition +// + +#define STATIC_KSDATAFORMAT_SUBTYPE_LPCM_AUDIO\ + 0xe06d8032L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea +DEFINE_GUIDSTRUCT("e06d8032-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_LPCM_AUDIO); +#define KSDATAFORMAT_SUBTYPE_LPCM_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_LPCM_AUDIO) + +#define STATIC_KSDATAFORMAT_SPECIFIER_LPCM_AUDIO\ + 0xe06d80e6L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea +DEFINE_GUIDSTRUCT("e06d80e6-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_LPCM_AUDIO); +#define KSDATAFORMAT_SPECIFIER_LPCM_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_LPCM_AUDIO) + +// +// AC-3 definition +// + +#define STATIC_KSDATAFORMAT_SUBTYPE_AC3_AUDIO\ + 0xe06d802cL, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea +DEFINE_GUIDSTRUCT("e06d802c-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_AC3_AUDIO); +#define KSDATAFORMAT_SUBTYPE_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_AC3_AUDIO) + +#define STATIC_KSDATAFORMAT_SPECIFIER_AC3_AUDIO\ + 0xe06d80e4L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea +DEFINE_GUIDSTRUCT("e06d80e4-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SPECIFIER_AC3_AUDIO); +#define KSDATAFORMAT_SPECIFIER_AC3_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_AC3_AUDIO) + +#define STATIC_KSPROPSETID_AC3\ + 0xBFABE720L, 0x6E1F, 0x11D0, 0xBC, 0xF2, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00 +DEFINE_GUIDSTRUCT("BFABE720-6E1F-11D0-BCF2-444553540000", KSPROPSETID_AC3); +#define KSPROPSETID_AC3 DEFINE_GUIDNAMED(KSPROPSETID_AC3) + +typedef enum { + KSPROPERTY_AC3_ERROR_CONCEALMENT = 1, + KSPROPERTY_AC3_ALTERNATE_AUDIO, + KSPROPERTY_AC3_DOWNMIX, + KSPROPERTY_AC3_BIT_STREAM_MODE, + KSPROPERTY_AC3_DIALOGUE_LEVEL, + KSPROPERTY_AC3_LANGUAGE_CODE, + KSPROPERTY_AC3_ROOM_TYPE +} KSPROPERTY_AC3; + +typedef struct { + BOOL fRepeatPreviousBlock; + BOOL fErrorInCurrentBlock; +} KSAC3_ERROR_CONCEALMENT, *PKSAC3_ERROR_CONCEALMENT; + +typedef struct { + BOOL fStereo; + ULONG DualMode; +} KSAC3_ALTERNATE_AUDIO, *PKSAC3_ALTERNATE_AUDIO; + +#define KSAC3_ALTERNATE_AUDIO_1 1 +#define KSAC3_ALTERNATE_AUDIO_2 2 +#define KSAC3_ALTERNATE_AUDIO_BOTH 3 + +typedef struct { + BOOL fDownMix; + BOOL fDolbySurround; +} KSAC3_DOWNMIX, *PKSAC3_DOWNMIX; + +typedef struct { + LONG BitStreamMode; +} KSAC3_BIT_STREAM_MODE, *PKSAC3_BIT_STREAM_MODE; + +#define KSAC3_SERVICE_MAIN_AUDIO 0 +#define KSAC3_SERVICE_NO_DIALOG 1 +#define KSAC3_SERVICE_VISUALLY_IMPAIRED 2 +#define KSAC3_SERVICE_HEARING_IMPAIRED 3 +#define KSAC3_SERVICE_DIALOG_ONLY 4 +#define KSAC3_SERVICE_COMMENTARY 5 +#define KSAC3_SERVICE_EMERGENCY_FLASH 6 +#define KSAC3_SERVICE_VOICE_OVER 7 + +typedef struct { + ULONG DialogueLevel; +} KSAC3_DIALOGUE_LEVEL, *PKSAC3_DIALOGUE_LEVEL; + +typedef struct { + BOOL fLargeRoom; +} KSAC3_ROOM_TYPE, *PKSAC3_ROOM_TYPE; + + +// +// DTS and SDDS definitions (media subtype GUIDs) +// +#define STATIC_KSDATAFORMAT_SUBTYPE_DTS_AUDIO\ + 0xe06d8033L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea +DEFINE_GUIDSTRUCT("e06d8033-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_DTS_AUDIO); +#define KSDATAFORMAT_SUBTYPE_DTS_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DTS_AUDIO) + +#define STATIC_KSDATAFORMAT_SUBTYPE_SDDS_AUDIO\ + 0xe06d8034L, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea +DEFINE_GUIDSTRUCT("e06d8034-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_SDDS_AUDIO); +#define KSDATAFORMAT_SUBTYPE_SDDS_AUDIO DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_SDDS_AUDIO) + + +// +// audio decoder output properties +// + +#define STATIC_KSPROPSETID_AudioDecoderOut\ + 0x6ca6e020L, 0x43bd, 0x11d0, 0xbd, 0x6a, 0x00, 0x35, 0x05, 0xc1, 0x03, 0xa9 +DEFINE_GUIDSTRUCT("6ca6e020-43bd-11d0-bd6a-003505c103a9", KSPROPSETID_AudioDecoderOut); +#define KSPROPSETID_AudioDecoderOut DEFINE_GUIDNAMED(KSPROPSETID_AudioDecoderOut) + +typedef enum { + KSPROPERTY_AUDDECOUT_MODES, // available output modes of decoder + KSPROPERTY_AUDDECOUT_CUR_MODE, // current mode of the decoder +} KSPROPERTY_AUDDECOUT; + +#define KSAUDDECOUTMODE_STEREO_ANALOG 0x0001 +#define KSAUDDECOUTMODE_PCM_51 0x0002 +#define KSAUDDECOUTMODE_SPDIFF 0x0004 + + + +// +// subpicture definition +// + +#define STATIC_KSDATAFORMAT_SUBTYPE_SUBPICTURE\ + 0xe06d802dL, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea +DEFINE_GUIDSTRUCT("e06d802d-db46-11cf-b4d1-00805f6cbbea", KSDATAFORMAT_SUBTYPE_SUBPICTURE); +#define KSDATAFORMAT_SUBTYPE_SUBPICTURE DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_SUBPICTURE) + + +#define STATIC_KSPROPSETID_DvdSubPic\ + 0xac390460L, 0x43af, 0x11d0, 0xbd, 0x6a, 0x00, 0x35, 0x05, 0xc1, 0x03, 0xa9 +DEFINE_GUIDSTRUCT("ac390460-43af-11d0-bd6a-003505c103a9", KSPROPSETID_DvdSubPic); +#define KSPROPSETID_DvdSubPic DEFINE_GUIDNAMED(KSPROPSETID_DvdSubPic) + +typedef enum { + KSPROPERTY_DVDSUBPIC_PALETTE, + KSPROPERTY_DVDSUBPIC_HLI, + KSPROPERTY_DVDSUBPIC_COMPOSIT_ON, // TRUE for subpicture is displayed +} KSPROPERTY_DVDSUBPIC; + +typedef struct _KS_DVD_YCrCb { + UCHAR Reserved; + UCHAR Y; + UCHAR Cr; + UCHAR Cb; +} KS_DVD_YCrCb, *PKS_DVD_YCrCb; + +/* The KS_DVD_YUV structure is now superseded by KS_DVD_YCrCb above and is + here for backward compatibility only */ + +typedef struct _KS_DVD_YUV { + UCHAR Reserved; + UCHAR Y; + UCHAR V; + UCHAR U; +} KS_DVD_YUV, *PKS_DVD_YUV; + +typedef struct _KSPROPERTY_SPPAL { + KS_DVD_YUV sppal[16]; +} KSPROPERTY_SPPAL, *PKSPROPERTY_SPPAL; + +typedef struct _KS_COLCON { + UCHAR emph1col:4; + UCHAR emph2col:4; + UCHAR backcol:4; + UCHAR patcol:4; + UCHAR emph1con:4; + UCHAR emph2con:4; + UCHAR backcon:4; + UCHAR patcon:4; + +} KS_COLCON, *PKS_COLCON; + +typedef struct _KSPROPERTY_SPHLI { + USHORT HLISS; + USHORT Reserved; + ULONG StartPTM; // start presentation time in x/90000 + ULONG EndPTM; // end PTM in x/90000 + USHORT StartX; + USHORT StartY; + USHORT StopX; + USHORT StopY; + KS_COLCON ColCon; // color contrast description (4 bytes as given in HLI) +} KSPROPERTY_SPHLI, *PKSPROPERTY_SPHLI; + +typedef BOOL KSPROPERTY_COMPOSIT_ON, *PKSPROPERTY_COMPOSIT_ON; + +#define STATIC_KSPROPSETID_CopyProt \ + 0x0E8A0A40L, 0x6AEF, 0x11D0, 0x9E, 0xD0, 0x00, 0xA0, 0x24, 0xCA, 0x19, 0xB3 +DEFINE_GUIDSTRUCT("0E8A0A40-6AEF-11D0-9ED0-00A024CA19B3", KSPROPSETID_CopyProt); +#define KSPROPSETID_CopyProt DEFINE_GUIDNAMED(KSPROPSETID_CopyProt) + +typedef enum { + + KSPROPERTY_DVDCOPY_CHLG_KEY = 0x01, + KSPROPERTY_DVDCOPY_DVD_KEY1, + KSPROPERTY_DVDCOPY_DEC_KEY2, + KSPROPERTY_DVDCOPY_TITLE_KEY, + KSPROPERTY_COPY_MACROVISION, + KSPROPERTY_DVDCOPY_REGION, + KSPROPERTY_DVDCOPY_SET_COPY_STATE, + KSPROPERTY_DVDCOPY_DISC_KEY = 0x80 + +} KSPROPERTY_COPYPROT; + +typedef struct _KS_DVDCOPY_CHLGKEY { + BYTE ChlgKey[10]; + BYTE Reserved[2]; +} KS_DVDCOPY_CHLGKEY, *PKS_DVDCOPY_CHLGKEY; + +typedef struct _KS_DVDCOPY_BUSKEY { + BYTE BusKey[5]; + BYTE Reserved[1]; +} KS_DVDCOPY_BUSKEY, *PKS_DVDCOPY_BUSKEY; + + +typedef struct _KS_DVDCOPY_DISCKEY { + BYTE DiscKey[2048]; +} KS_DVDCOPY_DISCKEY, *PKS_DVDCOPY_DISCKEY; + +typedef struct _KS_DVDCOPY_REGION { + UCHAR Reserved; + UCHAR RegionData; + UCHAR Reserved2[2]; +} KS_DVDCOPY_REGION, *PKS_DVDCOPY_REGION; + +typedef struct _KS_DVDCOPY_TITLEKEY { + ULONG KeyFlags; + ULONG ReservedNT[2]; + UCHAR TitleKey[6]; + UCHAR Reserved[2]; +} KS_DVDCOPY_TITLEKEY, *PKS_DVDCOPY_TITLEKEY; + +typedef struct _KS_COPY_MACROVISION { + ULONG MACROVISIONLevel; +} KS_COPY_MACROVISION, *PKS_COPY_MACROVISION; + +typedef struct _KS_DVDCOPY_SET_COPY_STATE { + ULONG DVDCopyState; +} KS_DVDCOPY_SET_COPY_STATE, *PKS_DVDCOPY_SET_COPY_STATE; + +typedef enum { + KS_DVDCOPYSTATE_INITIALIZE, // indicates we are starting a full + // copy protection sequence. + KS_DVDCOPYSTATE_INITIALIZE_TITLE, // indicates we are starting a title + // key copy protection sequence + KS_DVDCOPYSTATE_AUTHENTICATION_NOT_REQUIRED, + KS_DVDCOPYSTATE_AUTHENTICATION_REQUIRED, + KS_DVDCOPYSTATE_DONE, +} KS_DVDCOPYSTATE; + +typedef enum { + KS_MACROVISION_DISABLED, + KS_MACROVISION_LEVEL1, + KS_MACROVISION_LEVEL2, + KS_MACROVISION_LEVEL3 +} KS_COPY_MACROVISION_LEVEL, *PKS_COPY_MACROVISION_LEVEL; + +// +// CGMS Copy Protection Flags +// + +#define KS_DVD_CGMS_RESERVED_MASK 0x00000078 + +#define KS_DVD_CGMS_COPY_PROTECT_MASK 0x00000018 +#define KS_DVD_CGMS_COPY_PERMITTED 0x00000000 +#define KS_DVD_CGMS_COPY_ONCE 0x00000010 +#define KS_DVD_CGMS_NO_COPY 0x00000018 + +#define KS_DVD_COPYRIGHT_MASK 0x00000040 +#define KS_DVD_NOT_COPYRIGHTED 0x00000000 +#define KS_DVD_COPYRIGHTED 0x00000040 + +#define KS_DVD_SECTOR_PROTECT_MASK 0x00000020 +#define KS_DVD_SECTOR_NOT_PROTECTED 0x00000000 +#define KS_DVD_SECTOR_PROTECTED 0x00000020 + + +//=========================================================================== +// The following MUST match the structures in WinGDI.h and AMVideo.h +//=========================================================================== + +#define STATIC_KSCATEGORY_TVTUNER \ + 0xa799a800L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4 +DEFINE_GUIDSTRUCT("a799a800-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_TVTUNER); +#define KSCATEGORY_TVTUNER DEFINE_GUIDNAMED(KSCATEGORY_TVTUNER) + +#define STATIC_KSCATEGORY_CROSSBAR \ + 0xa799a801L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4 +DEFINE_GUIDSTRUCT("a799a801-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_CROSSBAR); +#define KSCATEGORY_CROSSBAR DEFINE_GUIDNAMED(KSCATEGORY_CROSSBAR) + +#define STATIC_KSCATEGORY_TVAUDIO \ + 0xa799a802L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4 +DEFINE_GUIDSTRUCT("a799a802-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_TVAUDIO); +#define KSCATEGORY_TVAUDIO DEFINE_GUIDNAMED(KSCATEGORY_TVAUDIO) + +#define STATIC_KSCATEGORY_VPMUX \ + 0xa799a803L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4 +DEFINE_GUIDSTRUCT("a799a803-a46d-11d0-a18c-00a02401dcd4", KSCATEGORY_VPMUX); +#define KSCATEGORY_VPMUX DEFINE_GUIDNAMED(KSCATEGORY_VPMUX) + +#define STATIC_KSCATEGORY_VBICODEC \ + 0x07dad660L, 0x22f1, 0x11d1, 0xa9, 0xf4, 0x00, 0xc0, 0x4f, 0xbb, 0xde, 0x8f +DEFINE_GUIDSTRUCT("07dad660-22f1-11d1-a9f4-00c04fbbde8f", KSCATEGORY_VBICODEC); +#define KSCATEGORY_VBICODEC DEFINE_GUIDNAMED(KSCATEGORY_VBICODEC) + +// SUBTYPE_VPVideo +#define STATIC_KSDATAFORMAT_SUBTYPE_VPVideo\ + 0x5a9b6a40L, 0x1a22, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a +DEFINE_GUIDSTRUCT("5a9b6a40-1a22-11d1-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_VPVideo); +#define KSDATAFORMAT_SUBTYPE_VPVideo DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_VPVideo) + +// SUBTYPE_VPVBI +#define STATIC_KSDATAFORMAT_SUBTYPE_VPVBI\ + 0x5a9b6a41L, 0x1a22, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a +DEFINE_GUIDSTRUCT("5a9b6a41-1a22-11d1-bad9-00609744111a", KSDATAFORMAT_SUBTYPE_VPVBI); +#define KSDATAFORMAT_SUBTYPE_VPVBI DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_VPVBI) + + +// FORMAT_VideoInfo +#define STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO\ + 0x05589f80L, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a +DEFINE_GUIDSTRUCT("05589f80-c356-11ce-bf01-00aa0055595a", KSDATAFORMAT_SPECIFIER_VIDEOINFO); +#define KSDATAFORMAT_SPECIFIER_VIDEOINFO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VIDEOINFO) + +// FORMAT_VideoInfo2 +#define STATIC_KSDATAFORMAT_SPECIFIER_VIDEOINFO2\ + 0xf72a76A0L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba +DEFINE_GUIDSTRUCT("f72a76A0-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SPECIFIER_VIDEOINFO2); +#define KSDATAFORMAT_SPECIFIER_VIDEOINFO2 DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VIDEOINFO2) + +// MEDIATYPE_AnalogVideo +#define STATIC_KSDATAFORMAT_TYPE_ANALOGVIDEO\ + 0x0482dde1L, 0x7817, 0x11cf, 0x8a, 0x03, 0x00, 0xaa, 0x00, 0x6e, 0xcb, 0x65 +DEFINE_GUIDSTRUCT("0482dde1-7817-11cf-8a03-00aa006ecb65", KSDATAFORMAT_TYPE_ANALOGVIDEO); +#define KSDATAFORMAT_TYPE_ANALOGVIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_ANALOGVIDEO) + +// FORMAT_AnalogVideo +#define STATIC_KSDATAFORMAT_SPECIFIER_ANALOGVIDEO\ + 0x0482dde0L, 0x7817, 0x11cf, 0x8a, 0x03, 0x00, 0xaa, 0x00, 0x6e, 0xcb, 0x65 +DEFINE_GUIDSTRUCT("0482dde0-7817-11cf-8a03-00aa006ecb65", KSDATAFORMAT_SPECIFIER_ANALOGVIDEO); +#define KSDATAFORMAT_SPECIFIER_ANALOGVIDEO DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_ANALOGVIDEO) + +// FORMAT_VBI +#define STATIC_KSDATAFORMAT_SPECIFIER_VBI\ + 0xf72a76e0L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba +DEFINE_GUIDSTRUCT("f72a76e0-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SPECIFIER_VBI); +#define KSDATAFORMAT_SPECIFIER_VBI DEFINE_GUIDNAMED(KSDATAFORMAT_SPECIFIER_VBI) + +// MEDIATYPE_VBI +#define STATIC_KSDATAFORMAT_TYPE_VBI\ + 0xf72a76e1L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba +DEFINE_GUIDSTRUCT("f72a76e1-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_TYPE_VBI); +#define KSDATAFORMAT_TYPE_VBI DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_VBI) + +// SUBTYPE_RAW8 +#define STATIC_KSDATAFORMAT_SUBTYPE_RAW8\ + 0xca20d9a0, 0x3e3e, 0x11d1, 0x9b, 0xf9, 0x0, 0xc0, 0x4f, 0xbb, 0xde, 0xbf +DEFINE_GUIDSTRUCT("ca20d9a0-3e3e-11d1-9bf9-00c04fbbdebf", KSDATAFORMAT_SUBTYPE_RAW8); +#define KSDATAFORMAT_SUBTYPE_RAW8 DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_RAW8) + +// MEDIASUBTYPE_CC +#define STATIC_KSDATAFORMAT_SUBTYPE_CC\ + 0x33214cc1, 0x11f, 0x11d2, 0xb4, 0xb1, 0x0, 0xa0, 0xd1, 0x2, 0xcf, 0xbe +DEFINE_GUIDSTRUCT("33214CC1-011F-11D2-B4B1-00A0D102CFBE", KSDATAFORMAT_SUBTYPE_CC); +#define KSDATAFORMAT_SUBTYPE_CC DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_CC) + +// MEDIASUBTYPE_NABTS +#define STATIC_KSDATAFORMAT_SUBTYPE_NABTS\ + 0xf72a76e2L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba +DEFINE_GUIDSTRUCT("f72a76e2-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SUBTYPE_NABTS); +#define KSDATAFORMAT_SUBTYPE_NABTS DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_NABTS) + +// MEDIASUBTYPE_TELETEXT +#define STATIC_KSDATAFORMAT_SUBTYPE_TELETEXT\ + 0xf72a76e3L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba +DEFINE_GUIDSTRUCT("f72a76e3-eb0a-11d0-ace4-0000c0cc16ba", KSDATAFORMAT_SUBTYPE_TELETEXT); +#define KSDATAFORMAT_SUBTYPE_TELETEXT DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_TELETEXT) + + + +/* constants for the biCompression field */ +#define KS_BI_RGB 0L +#define KS_BI_RLE8 1L +#define KS_BI_RLE4 2L +#define KS_BI_BITFIELDS 3L + +typedef struct tagKS_RGBQUAD { // rgbq + BYTE rgbBlue; + BYTE rgbGreen; + BYTE rgbRed; + BYTE rgbReserved; +} KS_RGBQUAD, *PKS_RGBQUAD; + +/* constants for palettes */ +#define KS_iPALETTE_COLORS 256 // Maximum colours in palette +#define KS_iEGA_COLORS 16 // Number colours in EGA palette +#define KS_iMASK_COLORS 3 // Maximum three components +#define KS_iTRUECOLOR 16 // Minimum true colour device +#define KS_iRED 0 // Index position for RED mask +#define KS_iGREEN 1 // Index position for GREEN mask +#define KS_iBLUE 2 // Index position for BLUE mask +#define KS_iPALETTE 8 // Maximum colour depth using a palette +#define KS_iMAXBITS 8 // Maximum bits per colour component +#define KS_SIZE_EGA_PALETTE (KS_iEGA_COLORS * sizeof(KS_RGBQUAD)) +#define KS_SIZE_PALETTE (KS_iPALETTE_COLORS * sizeof(KS_RGBQUAD)) + +typedef struct tagKS_BITMAPINFOHEADER{ + DWORD biSize; + LONG biWidth; + LONG biHeight; + WORD biPlanes; + WORD biBitCount; + DWORD biCompression; + DWORD biSizeImage; + LONG biXPelsPerMeter; + LONG biYPelsPerMeter; + DWORD biClrUsed; + DWORD biClrImportant; +} KS_BITMAPINFOHEADER, *PKS_BITMAPINFOHEADER; + +// Used for true colour images that also have a palette + +typedef struct tag_KS_TRUECOLORINFO { + DWORD dwBitMasks[KS_iMASK_COLORS]; + KS_RGBQUAD bmiColors[KS_iPALETTE_COLORS]; +} KS_TRUECOLORINFO, *PKS_TRUECOLORINFO; + + +#define KS_WIDTHBYTES(bits) ((DWORD)(((bits)+31) & (~31)) / 8) +#define KS_DIBWIDTHBYTES(bi) (DWORD)KS_WIDTHBYTES((DWORD)(bi).biWidth * (DWORD)(bi).biBitCount) +#define KS__DIBSIZE(bi) (KS_DIBWIDTHBYTES(bi) * (DWORD)(bi).biHeight) +#define KS_DIBSIZE(bi) ((bi).biHeight < 0 ? (-1)*(KS__DIBSIZE(bi)) : KS__DIBSIZE(bi)) + +typedef LONGLONG REFERENCE_TIME; + +// The BITMAPINFOHEADER contains all the details about the video stream such +// as the actual image dimensions and their pixel depth. A source filter may +// also request that the sink take only a section of the video by providing a +// clipping rectangle in rcSource. In the worst case where the sink filter +// forgets to check this on connection it will simply render the whole thing +// which isn't a disaster. Ideally a sink filter will check the rcSource and +// if it doesn't support image extraction and the rectangle is not empty then +// it will reject the connection. A filter should use SetRectEmpty to reset a +// rectangle to all zeroes (and IsRectEmpty to later check the rectangle). +// The rcTarget specifies the destination rectangle for the video, for most +// source filters they will set this to all zeroes, a downstream filter may +// request that the video be placed in a particular area of the buffers it +// supplies in which case it will call QueryAccept with a non empty target + +typedef struct tagKS_VIDEOINFOHEADER { + + RECT rcSource; // The bit we really want to use + RECT rcTarget; // Where the video should go + DWORD dwBitRate; // Approximate bit data rate + DWORD dwBitErrorRate; // Bit error rate for this stream + REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units) + + KS_BITMAPINFOHEADER bmiHeader; + +} KS_VIDEOINFOHEADER, *PKS_VIDEOINFOHEADER; + +// !!! WARNING !!! +// DO NOT use the following structure unless you are sure that the BITMAPINFOHEADER +// has a normal biSize == sizeof(BITMAPINFOHEADER) ! +// !!! WARNING !!! + +typedef struct tagKS_VIDEOINFO { + + RECT rcSource; // The bit we really want to use + RECT rcTarget; // Where the video should go + DWORD dwBitRate; // Approximate bit data rate + DWORD dwBitErrorRate; // Bit error rate for this stream + REFERENCE_TIME AvgTimePerFrame; // Average time per frame (100ns units) + + KS_BITMAPINFOHEADER bmiHeader; + + union { + KS_RGBQUAD bmiColors[KS_iPALETTE_COLORS]; // Colour palette + DWORD dwBitMasks[KS_iMASK_COLORS]; // True colour masks + KS_TRUECOLORINFO TrueColorInfo; // Both of the above + }; + +} KS_VIDEOINFO, *PKS_VIDEOINFO; + + +#define KS_SIZE_MASKS (KS_iMASK_COLORS * sizeof(DWORD)) +#define KS_SIZE_PREHEADER (FIELD_OFFSET(KS_VIDEOINFOHEADER,bmiHeader)) + +// For normal size +// #define KS_SIZE_VIDEOHEADER (sizeof(KS_BITMAPINFOHEADER) + KS_SIZE_PREHEADER) +// !!! for abnormal biSizes +#define KS_SIZE_VIDEOHEADER(pbmi) ((pbmi)->bmiHeader.biSize + KS_SIZE_PREHEADER) + +// VBI +// Used for NABTS, CC, Intercast, +typedef struct tagKS_VBIINFOHEADER { + ULONG StartLine; // inclusive + ULONG EndLine; // inclusive + ULONG SamplingFrequency; // Hz. + ULONG MinLineStartTime; // microSec * 100 from HSync LE + ULONG MaxLineStartTime; // microSec * 100 from HSync LE + ULONG ActualLineStartTime; // microSec * 100 from HSync LE + ULONG ActualLineEndTime; // microSec * 100 from HSync LE + ULONG VideoStandard; // KS_AnalogVideoStandard* + ULONG SamplesPerLine; + ULONG StrideInBytes; // May be > SamplesPerLine + ULONG BufferSize; // Bytes +} KS_VBIINFOHEADER, *PKS_VBIINFOHEADER; + +// VBI Sampling Rates +#define KS_VBIDATARATE_NABTS (5727272L) +#define KS_VBIDATARATE_CC ( 503493L) // ~= 1/1.986125e-6 +#define KS_VBISAMPLINGRATE_4X_NABTS ((long)(4*KS_VBIDATARATE_NABTS)) +#define KS_VBISAMPLINGRATE_47X_NABTS ((long)(27000000)) +#define KS_VBISAMPLINGRATE_5X_NABTS ((long)(5*KS_VBIDATARATE_NABTS)) + +#define KS_47NABTS_SCALER (KS_VBISAMPLINGRATE_47X_NABTS/(double)KS_VBIDATARATE_NABTS) + +// Analog video variant - Use this when the format is FORMAT_AnalogVideo +// +// rcSource defines the portion of the active video signal to use +// rcTarget defines the destination rectangle +// both of the above are relative to the dwActiveWidth and dwActiveHeight fields +// dwActiveWidth is currently set to 720 for all formats (but could change for HDTV) +// dwActiveHeight is 483 for NTSC and 575 for PAL/SECAM (but could change for HDTV) + +typedef struct tagKS_AnalogVideoInfo { + RECT rcSource; // Width max is 720, height varies w/ TransmissionStd + RECT rcTarget; // Where the video should go + DWORD dwActiveWidth; // Always 720 (CCIR-601 active samples per line) + DWORD dwActiveHeight; // 483 for NTSC, 575 for PAL/SECAM + REFERENCE_TIME AvgTimePerFrame; // Normal ActiveMovie units (100 nS) +} KS_ANALOGVIDEOINFO, *PKS_ANALOGVIDEOINFO; + +//=========================================================================== +// Data packet passed on Analog video stream channel change +//=========================================================================== + +#define KS_TVTUNER_CHANGE_BEGIN_TUNE 0x0001L // Starting a tuning operation +#define KS_TVTUNER_CHANGE_END_TUNE 0x0002L // Ending a tuning operation + +typedef struct tagKS_TVTUNER_CHANGE_INFO { + DWORD dwFlags; // KS_TVTUNER_CHANGE_* + DWORD dwCountryCode; + DWORD dwAnalogVideoStandard; // KS_AnalogVideoStandard + DWORD dwChannel; +} KS_TVTUNER_CHANGE_INFO, *PKS_TVTUNER_CHANGE_INFO; + +//=========================================================================== +// Video format blocks +//=========================================================================== + +typedef enum { + KS_MPEG2Level_Low, + KS_MPEG2Level_Main, + KS_MPEG2Level_High1440, + KS_MPEG2Level_High +} KS_MPEG2Level; + +typedef enum { + KS_MPEG2Profile_Simple, + KS_MPEG2Profile_Main, + KS_MPEG2Profile_SNRScalable, + KS_MPEG2Profile_SpatiallyScalable, + KS_MPEG2Profile_High +} KS_MPEG2Profile; + +#define KS_INTERLACE_IsInterlaced 0x00000001 // if 0, other interlace bits are irrelevent +#define KS_INTERLACE_1FieldPerSample 0x00000002 // else 2 fields per media sample +#define KS_INTERLACE_Field1First 0x00000004 // else Field 2 is first; top field in PAL is field 1, top field in NTSC is field 2? +#define KS_INTERLACE_UNUSED 0x00000008 // +#define KS_INTERLACE_FieldPatternMask 0x00000030 // use this mask with AMINTERLACE_FieldPat* +#define KS_INTERLACE_FieldPatField1Only 0x00000000 // Data never contains a Field2 +#define KS_INTERLACE_FieldPatField2Only 0x00000010 // Data never contains a Field1 +#define KS_INTERLACE_FieldPatBothRegular 0x00000020 // There will be a Field2 for every Field1 (required for Weave?) +#define KS_INTERLACE_FieldPatBothIrregular 0x00000030 // Random pattern of Field1s and Field2s +#define KS_INTERLACE_DisplayModeMask 0x000000c0 +#define KS_INTERLACE_DisplayModeBobOnly 0x00000000 +#define KS_INTERLACE_DisplayModeWeaveOnly 0x00000040 +#define KS_INTERLACE_DisplayModeBobOrWeave 0x00000080 + + + +#define KS_MPEG2_DoPanScan 0x00000001 //if set, the MPEG-2 video decoder should crop output image + // based on pan-scan vectors in picture_display_extension + // and change the picture aspect ratio accordingly. +#define KS_MPEG2_DVDLine21Field1 0x00000002 //if set, the MPEG-2 decoder must be able to produce an output + // pin for DVD style closed caption data found in GOP layer of field 1 +#define KS_MPEG2_DVDLine21Field2 0x00000004 //if set, the MPEG-2 decoder must be able to produce an output + // pin for DVD style closed caption data found in GOP layer of field 2 +#define KS_MPEG2_SourceIsLetterboxed 0x00000008 //if set, indicates that black bars have been encoded in the top + // and bottom of the video. +#define KS_MPEG2_FilmCameraMode 0x00000010 //if set, indicates "film mode" used for 625/50 content. If cleared, + // indicates that "camera mode" was used. +#define KS_MPEG2_LetterboxAnalogOut 0x00000020 //if set and this stream is sent to an analog output, it should + // be letterboxed. Streams sent to VGA should be letterboxed only by renderers. +#define KS_MPEG2_DSS_UserData 0x00000040 //if set, the MPEG-2 decoder must process DSS style user data +#define KS_MPEG2_DVB_UserData 0x00000080 //if set, the MPEG-2 decoder must process DVB style user data +#define KS_MPEG2_27MhzTimebase 0x00000100 //if set, the PTS,DTS timestamps advance at 27MHz rather than 90KHz + +typedef struct tagKS_VIDEOINFOHEADER2 { + RECT rcSource; + RECT rcTarget; + DWORD dwBitRate; + DWORD dwBitErrorRate; + REFERENCE_TIME AvgTimePerFrame; + DWORD dwInterlaceFlags; // use AMINTERLACE_* defines. Reject connection if undefined bits are not 0 + DWORD dwCopyProtectFlags; // use AMCOPYPROTECT_* defines. Reject connection if undefined bits are not 0 + DWORD dwPictAspectRatioX; // X dimension of picture aspect ratio, e.g. 16 for 16x9 display + DWORD dwPictAspectRatioY; // Y dimension of picture aspect ratio, e.g. 9 for 16x9 display + DWORD dwReserved1; // must be 0; reject connection otherwise + DWORD dwReserved2; // must be 0; reject connection otherwise + KS_BITMAPINFOHEADER bmiHeader; +} KS_VIDEOINFOHEADER2, *PKS_VIDEOINFOHEADER2; + +typedef struct tagKS_MPEG1VIDEOINFO { + KS_VIDEOINFOHEADER hdr; // Compatible with VIDEOINFO + DWORD dwStartTimeCode; // 25-bit Group of pictures time code at start of data + DWORD cbSequenceHeader; // Length in bytes of bSequenceHeader + BYTE bSequenceHeader[1]; // Sequence header including quantization matrices if any +} KS_MPEG1VIDEOINFO, *PKS_MPEG1VIDEOINFO; + +#define KS_MAX_SIZE_MPEG1_SEQUENCE_INFO 140 +#define KS_SIZE_MPEG1VIDEOINFO(pv) (FIELD_OFFSET(KS_MPEG1VIDEOINFO, bSequenceHeader[0]) + (pv)->cbSequenceHeader) +#define KS_MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader) + +typedef struct tagKS_MPEGVIDEOINFO2 { + KS_VIDEOINFOHEADER2 hdr; + DWORD dwStartTimeCode; // ?? not used for DVD ?? + DWORD cbSequenceHeader; // is 0 for DVD (no sequence header) + DWORD dwProfile; // use enum MPEG2Profile + DWORD dwLevel; // use enum MPEG2Level + DWORD dwFlags; // use AMMPEG2_* defines. Reject connection if undefined bits are not 0 + DWORD bSequenceHeader[1]; // DWORD instead of Byte for alignment purposes + // For MPEG-2, if a sequence_header is included, the sequence_extension + // should also be included +} KS_MPEGVIDEOINFO2, *PKS_MPEGVIDEOINFO2; + + +#define KS_SIZE_MPEGVIDEOINFO2(pv) (FIELD_OFFSET(KS_MPEGVIDEOINFO2, bSequenceHeader[0]) + (pv)->cbSequenceHeader) +#define KS_MPEG1_SEQUENCE_INFO(pv) ((const BYTE *)(pv)->bSequenceHeader) + +//=========================================================================== +// Audio format blocks +//=========================================================================== + +//if set, the PTS,DTS timestamps advance at 27MHz rather than 90KHz +#define KS_MPEGAUDIOINFO_27MhzTimebase 0x00000001 + +typedef struct tagKS_MPEAUDIOINFO { + DWORD dwFlags; // use KS_MPEGAUDIOINFO_* defines. Reject connection if undefined bits are not 0 + DWORD dwReserved1; // must be 0; reject connection otherwise + DWORD dwReserved2; // must be 0; reject connection otherwise + DWORD dwReserved3; // must be 0; reject connection otherwise +} KS_MPEGAUDIOINFO, *PKS_MPEGAUDIOINFO; + +//=========================================================================== +// Video DATAFORMATs +//=========================================================================== + +typedef struct tagKS_DATAFORMAT_VIDEOINFOHEADER { + KSDATAFORMAT DataFormat; + KS_VIDEOINFOHEADER VideoInfoHeader; +} KS_DATAFORMAT_VIDEOINFOHEADER, *PKS_DATAFORMAT_VIDEOINFOHEADER; + +typedef struct tagKS_DATAFORMAT_VIDEOINFOHEADER2 { + KSDATAFORMAT DataFormat; + KS_VIDEOINFOHEADER2 VideoInfoHeader2; +} KS_DATAFORMAT_VIDEOINFOHEADER2, *PKS_DATAFORMAT_VIDEOINFOHEADER2; + +typedef struct tagKS_DATAFORMAT_VIDEOINFO_PALETTE { + KSDATAFORMAT DataFormat; + KS_VIDEOINFO VideoInfo; +} KS_DATAFORMAT_VIDEOINFO_PALETTE, *PKS_DATAFORMAT_VIDEOINFO_PALETTE; + +typedef struct tagKS_DATAFORMAT_VBIINFOHEADER { + KSDATAFORMAT DataFormat; + KS_VBIINFOHEADER VBIInfoHeader; +} KS_DATAFORMAT_VBIINFOHEADER, *PKS_DATAFORMAT_VBIINFOHEADER; + +typedef struct _KS_VIDEO_STREAM_CONFIG_CAPS { + GUID guid; // will be MEDIATYPE_Video + ULONG VideoStandard; // logical OR of all AnalogVideoStandards + // supported + SIZE InputSize; // the inherent size of the incoming signal + // (every pixel unique) + SIZE MinCroppingSize; // smallest rcSrc cropping rect allowed + SIZE MaxCroppingSize; // largest rcSrc cropping rect allowed + int CropGranularityX; // granularity of cropping size + int CropGranularityY; + int CropAlignX; // alignment of cropping rect + int CropAlignY; + SIZE MinOutputSize; // smallest bitmap stream can produce + SIZE MaxOutputSize; // largest bitmap stream can produce + int OutputGranularityX; // granularity of output bitmap size + int OutputGranularityY; + int StretchTapsX; // 0, no stretch, 1 pix dup, 2 interp, ... + int StretchTapsY; // Describes quality of hardware scaler + int ShrinkTapsX; // + int ShrinkTapsY; // + LONGLONG MinFrameInterval; // 100 nS units + LONGLONG MaxFrameInterval; + LONG MinBitsPerSecond; + LONG MaxBitsPerSecond; +} KS_VIDEO_STREAM_CONFIG_CAPS, *PKS_VIDEO_STREAM_CONFIG_CAPS; + +//=========================================================================== +// Video DATARANGEs +//=========================================================================== + +typedef struct tagKS_DATARANGE_VIDEO { + KSDATARANGE DataRange; + BOOL bFixedSizeSamples; // all samples same size? + BOOL bTemporalCompression; // all I frames? + DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_* + DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_* + KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps; + KS_VIDEOINFOHEADER VideoInfoHeader; // default format +} KS_DATARANGE_VIDEO, *PKS_DATARANGE_VIDEO; + +typedef struct tagKS_DATARANGE_VIDEO2 { + KSDATARANGE DataRange; + BOOL bFixedSizeSamples; // all samples same size? + BOOL bTemporalCompression; // all I frames? + DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_* + DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_* + KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps; + KS_VIDEOINFOHEADER2 VideoInfoHeader; // default format +} KS_DATARANGE_VIDEO2, *PKS_DATARANGE_VIDEO2; + +typedef struct tagKS_DATARANGE_MPEG1_VIDEO { + KSDATARANGE DataRange; + BOOL bFixedSizeSamples; // all samples same size? + BOOL bTemporalCompression; // all I frames? + DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_* + DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_* + KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps; + KS_MPEG1VIDEOINFO VideoInfoHeader; // default format +} KS_DATARANGE_MPEG1_VIDEO, *PKS_DATARANGE_MPEG1_VIDEO; + +typedef struct tagKS_DATARANGE_MPEG2_VIDEO { + KSDATARANGE DataRange; + BOOL bFixedSizeSamples; // all samples same size? + BOOL bTemporalCompression; // all I frames? + DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_* + DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_* + KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps; + KS_MPEGVIDEOINFO2 VideoInfoHeader; // default format +} KS_DATARANGE_MPEG2_VIDEO, *PKS_DATARANGE_MPEG2_VIDEO; + +typedef struct tagKS_DATARANGE_VIDEO_PALETTE { + KSDATARANGE DataRange; + BOOL bFixedSizeSamples; // all samples same size? + BOOL bTemporalCompression; // all I frames? + DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_* + DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_* + KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps; + KS_VIDEOINFO VideoInfo; // default format +} KS_DATARANGE_VIDEO_PALETTE, *PKS_DATARANGE_VIDEO_PALETTE; + +typedef struct tagKS_DATARANGE_VIDEO_VBI { + KSDATARANGE DataRange; + BOOL bFixedSizeSamples; // all samples same size? + BOOL bTemporalCompression; // all I frames? + DWORD StreamDescriptionFlags; // KS_VIDEO_DESC_* + DWORD MemoryAllocationFlags; // KS_VIDEO_ALLOC_* + KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps; + KS_VBIINFOHEADER VBIInfoHeader; // default format +} KS_DATARANGE_VIDEO_VBI, *PKS_DATARANGE_VIDEO_VBI; + +typedef struct tagKS_DATARANGE_ANALOGVIDEO { + KSDATARANGE DataRange; + KS_ANALOGVIDEOINFO AnalogVideoInfo; +} KS_DATARANGE_ANALOGVIDEO, *PKS_DATARANGE_ANALOGVIDEO; + +//=========================================================================== +// StreamDescriptionFlags +// +// These define the "purpose" of each video stream +//=========================================================================== + +#define KS_VIDEOSTREAM_PREVIEW 0x0001 // Preview stream +#define KS_VIDEOSTREAM_CAPTURE 0x0002 // Capture stream +#define KS_VIDEOSTREAM_VBI 0x0010 // Field1 VBI +#define KS_VIDEOSTREAM_NABTS 0x0020 // Field1 NABTS +#define KS_VIDEOSTREAM_CC 0x0100 // Closed Captioning +#define KS_VIDEOSTREAM_EDS 0x0200 // Extended Data Services +#define KS_VIDEOSTREAM_TELETEXT 0x0400 // Field1 Teletext only +#define KS_VIDEOSTREAM_STILL 0x1000 // Still image input +#define KS_VIDEOSTREAM_IS_VPE 0x8000 // Is a VPE based stream? + +// MemoryAllocationFlags +#define KS_VIDEO_ALLOC_VPE_SYSTEM 0x0001 // VPE surface in system memory +#define KS_VIDEO_ALLOC_VPE_DISPLAY 0x0002 // VPE surface in display memory +#define KS_VIDEO_ALLOC_VPE_AGP 0x0004 // VPE surface in AGP memory + +////////////////////////////////////////////////////////////// +// Capture driver VBI property sets +////////////////////////////////////////////////////////////// + +// {F162C607-7B35-496f-AD7F-2DCA3B46B718} +#define STATIC_KSPROPSETID_VBICAP_PROPERTIES\ + 0xf162c607, 0x7b35, 0x496f, 0xad, 0x7f, 0x2d, 0xca, 0x3b, 0x46, 0xb7, 0x18 +DEFINE_GUIDSTRUCT("F162C607-7B35-496f-AD7F-2DCA3B46B718", KSPROPSETID_VBICAP_PROPERTIES); +#define KSPROPSETID_VBICAP_PROPERTIES DEFINE_GUIDNAMED(KSPROPSETID_VBICAP_PROPERTIES) + +typedef enum { + KSPROPERTY_VBICAP_PROPERTIES_PROTECTION = 0x01, +} KSPROPERTY_VBICAP; + +typedef struct _VBICAP_PROPERTIES_PROTECTION_S { + KSPROPERTY Property; + ULONG StreamIndex; // Index of stream + ULONG Status; +} VBICAP_PROPERTIES_PROTECTION_S, *PVBICAP_PROPERTIES_PROTECTION_S; +#define KS_VBICAP_PROTECTION_MV_PRESENT 0x0001L +#define KS_VBICAP_PROTECTION_MV_HARDWARE 0x0002L +#define KS_VBICAP_PROTECTION_MV_DETECTED 0x0004L + + +/***************************************************************************/ +/* VBI Related GUIDs, structs and properties for codecs(generic, cc, nabts)*/ +/***************************************************************************/ + +/////////////////////////////////////////////////////////////////////////////////////// +// IP/NABTS Protocol Reserved Group IDs - Overall Range 0x800-0x8FF [Decimal 2048-2079] +// Intervening values(0-F) are used if there are multiple providers at a particular tier +/////////////////////////////////////////////////////////////////////////////////////// + +// Used by individual content creators in show footage/data +#define KS_NABTS_GROUPID_ORIGINAL_CONTENT_BASE 0x800 +#define KS_NABTS_GROUPID_ORIGINAL_CONTENT_ADVERTISER_BASE 0x810 + +// Used by production company in finished show data +#define KS_NABTS_GROUPID_PRODUCTION_COMPANY_CONTENT_BASE 0x820 +#define KS_NABTS_GROUPID_PRODUCTION_COMPANY_ADVERTISER_BASE 0x830 + +// Used by broadcast syndicates in syndicated show data +#define KS_NABTS_GROUPID_SYNDICATED_SHOW_CONTENT_BASE 0x840 +#define KS_NABTS_GROUPID_SYNDICATED_SHOW_ADVERTISER_BASE 0x850 + +// Used by tv networks in network television data +#define KS_NABTS_GROUPID_NETWORK_WIDE_CONTENT_BASE 0x860 +#define KS_NABTS_GROUPID_NETWORK_WIDE_ADVERTISER_BASE 0x870 + +// Used by telvision stations in local programming data +#define KS_NABTS_GROUPID_TELEVISION_STATION_CONTENT_BASE 0x880 +#define KS_NABTS_GROUPID_TELEVISION_STATION_ADVERTISER_BASE 0x890 + +// Used by cable system in cable head-end originated data +#define KS_NABTS_GROUPID_LOCAL_CABLE_SYSTEM_CONTENT_BASE 0x8A0 +#define KS_NABTS_GROUPID_LOCAL_CABLE_SYSTEM_ADVERTISER_BASE 0x8B0 + +// The values between 0x8C0 - 0x8EF are reserved for future expansion + +// Used by Microsoft for Testing purposes (0x8F0 - 0x8FF) +#define KS_NABTS_GROUPID_MICROSOFT_RESERVED_TEST_DATA_BASE 0x8F0 + +////////////////////////////////////////////////////////////// +// Stream Format FEC-corrected NABTS bundles +////////////////////////////////////////////////////////////// + +#define STATIC_KSDATAFORMAT_TYPE_NABTS \ + 0xe757bca0, 0x39ac, 0x11d1, 0xa9, 0xf5, 0x0, 0xc0, 0x4f, 0xbb, 0xde, 0x8f +DEFINE_GUIDSTRUCT("E757BCA0-39AC-11d1-A9F5-00C04FBBDE8F", KSDATAFORMAT_TYPE_NABTS); +#define KSDATAFORMAT_TYPE_NABTS DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_NABTS) + +#define STATIC_KSDATAFORMAT_SUBTYPE_NABTS_FEC \ + 0xe757bca1, 0x39ac, 0x11d1, 0xa9, 0xf5, 0x0, 0xc0, 0x4f, 0xbb, 0xde, 0x8f +DEFINE_GUIDSTRUCT("E757BCA1-39AC-11d1-A9F5-00C04FBBDE8F", KSDATAFORMAT_SUBTYPE_NABTS_FEC); +#define KSDATAFORMAT_SUBTYPE_NABTS_FEC DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_NABTS_FEC) + + +////////////////////////////////////////////////////////////// +// NABTS Bundle data structure definition +////////////////////////////////////////////////////////////// + +#define MAX_NABTS_VBI_LINES_PER_FIELD 11 +#define NABTS_LINES_PER_BUNDLE 16 +#define NABTS_PAYLOAD_PER_LINE 28 +#define NABTS_BYTES_PER_LINE 36 + +typedef struct _NABTSFEC_BUFFER { + ULONG dataSize; + USHORT groupID; + USHORT Reserved; + UCHAR data[NABTS_LINES_PER_BUNDLE * NABTS_PAYLOAD_PER_LINE]; +} NABTSFEC_BUFFER, *PNABTSFEC_BUFFER; + +////////////////////////////////////////////////////////////// +// vbi codec filtering pin properties +////////////////////////////////////////////////////////////// + +#define STATIC_KSPROPSETID_VBICodecFiltering \ + 0xcafeb0caL, 0x8715, 0x11d0, 0xbd, 0x6a, 0x00, 0x35, 0xc0, 0xed, 0xba, 0xbe +DEFINE_GUIDSTRUCT("cafeb0ca-8715-11d0-bd6a-0035c0edbabe", KSPROPSETID_VBICodecFiltering); +#define KSPROPSETID_VBICodecFiltering DEFINE_GUIDNAMED(KSPROPSETID_VBICodecFiltering) + +typedef enum { + KSPROPERTY_VBICODECFILTERING_SCANLINES_REQUESTED_BIT_ARRAY = 0x01, + KSPROPERTY_VBICODECFILTERING_SCANLINES_DISCOVERED_BIT_ARRAY, + KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_REQUESTED_BIT_ARRAY, + KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_DISCOVERED_BIT_ARRAY, + KSPROPERTY_VBICODECFILTERING_STATISTICS, +} KSPROPERTY_VBICODECFILTERING; + +typedef struct _VBICODECFILTERING_SCANLINES { + DWORD DwordBitArray[32]; // An array of scanline bits 0..1024(32*32) +} VBICODECFILTERING_SCANLINES, *PVBICODECFILTERING_SCANLINES; + +typedef struct _VBICODECFILTERING_NABTS_SUBSTREAMS { + DWORD SubstreamMask[128]; // An array of 4096 bits (one for each NABTS GroupID) +} VBICODECFILTERING_NABTS_SUBSTREAMS, *PVBICODECFILTERING_NABTS_SUBSTREAMS; + +typedef struct _VBICODECFILTERING_CC_SUBSTREAMS { + DWORD SubstreamMask; // An array of 32 bits (see KS_CC_SUBSTREAM *) +} VBICODECFILTERING_CC_SUBSTREAMS, *PVBICODECFILTERING_CC_SUBSTREAMS; + +#define KS_CC_SUBSTREAM_ODD 0x0001L +#define KS_CC_SUBSTREAM_EVEN 0x0002L +#define KS_CC_SUBSTREAM_SERVICE_MASK_DC1 0x00F0L // DataChannel1: CC1,CC3,T1,T3 +#define KS_CC_SUBSTREAM_SERVICE_CC1 0x0010L +#define KS_CC_SUBSTREAM_SERVICE_CC3 0x0020L +#define KS_CC_SUBSTREAM_SERVICE_T1 0x0040L +#define KS_CC_SUBSTREAM_SERVICE_T3 0x0080L +#define KS_CC_SUBSTREAM_SERVICE_MASK_DC2 0x0F00L // DataChannel2: CC2,CC4,T2,T4 +#define KS_CC_SUBSTREAM_SERVICE_CC2 0x0100L +#define KS_CC_SUBSTREAM_SERVICE_CC4 0x0200L +#define KS_CC_SUBSTREAM_SERVICE_T2 0x0400L +#define KS_CC_SUBSTREAM_SERVICE_T4 0x0800L +#define KS_CC_SUBSTREAM_SERVICE_XDS 0x1000L + +/////////////////////////////////////////////////////////////////// +// Hardware decoded CC stream format +/////////////////////////////////////////////////////////////////// + +#define CC_MAX_HW_DECODE_LINES 12 +typedef struct _CC_BYTE_PAIR { + BYTE Decoded[2]; + USHORT Reserved; +} CC_BYTE_PAIR, *PCC_BYTE_PAIR; + +typedef struct _CC_HW_FIELD { + VBICODECFILTERING_SCANLINES ScanlinesRequested; + ULONG fieldFlags; // KS_VBI_FLAG_FIELD1,2 + LONGLONG PictureNumber; + CC_BYTE_PAIR Lines[CC_MAX_HW_DECODE_LINES]; +} CC_HW_FIELD, *PCC_HW_FIELD; + +/////////////////////////////////////////////////////////////////// +// Raw NABTS stream format (TYPE_NABTS, SUBTYPE_NABTS) +/////////////////////////////////////////////////////////////////// + +// These low-level structures are byte packed( -Zp1 ) +#if !defined( PACK_PRAGMAS_NOT_SUPPORTED ) +#include +#endif +typedef struct _NABTS_BUFFER_LINE { + BYTE Confidence; + BYTE Bytes[NABTS_BYTES_PER_LINE]; +} NABTS_BUFFER_LINE, *PNABTS_BUFFER_LINE; + +#define NABTS_BUFFER_PICTURENUMBER_SUPPORT 1 +typedef struct _NABTS_BUFFER { + VBICODECFILTERING_SCANLINES ScanlinesRequested; + LONGLONG PictureNumber; + NABTS_BUFFER_LINE NabtsLines[MAX_NABTS_VBI_LINES_PER_FIELD]; +} NABTS_BUFFER, *PNABTS_BUFFER; +#if !defined( PACK_PRAGMAS_NOT_SUPPORTED ) +#include +#endif + +// +// Common codec statistics +// + +typedef struct _VBICODECFILTERING_STATISTICS_COMMON { + DWORD InputSRBsProcessed; // upstream SRBs received + DWORD OutputSRBsProcessed; // downstream SRBs sent + DWORD SRBsIgnored; // SRBs ignored due to no requests + DWORD InputSRBsMissing; // SRBs dropped upstream + DWORD OutputSRBsMissing; // Output dropped because no SRB pending + DWORD OutputFailures; // dropped because of other failure + DWORD InternalErrors; // could not process due to int. failure + DWORD ExternalErrors; // could not process due to ext. failure + DWORD InputDiscontinuities; // discontinuities received + DWORD DSPFailures; // DSP confidence failure + DWORD TvTunerChanges; // number of received KS_TVTUNER_CHANGE_BEGIN_TUNE and KS_TVTUNER_CHANGE_END_TUNE pairs. + DWORD VBIHeaderChanges; // number of received KS_VBI_FLAG_VBIINFOHEADER_CHANGE + DWORD LineConfidenceAvg; // Average of all DSP confidence results + DWORD BytesOutput; // Bytes sent downstream +} VBICODECFILTERING_STATISTICS_COMMON, *PVBICODECFILTERING_STATISTICS_COMMON; + +typedef struct _VBICODECFILTERING_STATISTICS_COMMON_PIN { + DWORD SRBsProcessed; // SRBs sent/received + DWORD SRBsIgnored; // SRBs ignored due to filtering + DWORD SRBsMissing; // SRBs not sent/received + DWORD InternalErrors; // could not send/receive due to int. failure + DWORD ExternalErrors; // could not send/receive due to ext. failure + DWORD Discontinuities; // discontinuities received/sent + DWORD LineConfidenceAvg; // Average of all DSP confidence results for this pin + DWORD BytesOutput; // Bytes sent downstream +} VBICODECFILTERING_STATISTICS_COMMON_PIN, *PVBICODECFILTERING_STATISTICS_COMMON_PIN; + +// +// Codec-specific statistics - NABTS +// + +typedef struct _VBICODECFILTERING_STATISTICS_NABTS { + VBICODECFILTERING_STATISTICS_COMMON Common; // Generic VBI statistics + DWORD FECBundleBadLines; // Un-FEC-correctable lines + DWORD FECQueueOverflows; // Number of times FEC queue overflowed + DWORD FECCorrectedLines; // Lines CSUM corrected by FEC + DWORD FECUncorrectableLines; // FEC input lines not CSUM correctable + DWORD BundlesProcessed; // Bundles received from FEC + DWORD BundlesSent2IP; // Bundles sent to IP driver + DWORD FilteredLines; // Lines processed and then dropped + // because no one was interested +} VBICODECFILTERING_STATISTICS_NABTS, *PVBICODECFILTERING_STATISTICS_NABTS; + +typedef struct _VBICODECFILTERING_STATISTICS_NABTS_PIN { + VBICODECFILTERING_STATISTICS_COMMON_PIN Common;// Generic VBI pin statistics +} VBICODECFILTERING_STATISTICS_NABTS_PIN, *PVBICODECFILTERING_STATISTICS_NABTS_PIN; + +// +// Codec-specific statistics - Closed Caption +// + +typedef struct _VBICODECFILTERING_STATISTICS_CC { + VBICODECFILTERING_STATISTICS_COMMON Common; // Generic VBI statistics +} VBICODECFILTERING_STATISTICS_CC, *PVBICODECFILTERING_STATISTICS_CC; + + +typedef struct _VBICODECFILTERING_STATISTICS_CC_PIN { + VBICODECFILTERING_STATISTICS_COMMON_PIN Common;// Generic VBI pin statistics +} VBICODECFILTERING_STATISTICS_CC_PIN, *PVBICODECFILTERING_STATISTICS_CC_PIN; + +//////////////////////////////////////////////////////////////////////////// +// VBI codec property structures(based on KSPROPERTY_VBICODECFILTERING enum) +//////////////////////////////////////////////////////////////////////////// + +// *** Most codecs support this property +// KSPROPERTY_VBICODECFILTERING_SCANLINES_REQUESTED_BIT_ARRAY +// KSPROPERTY_VBICODECFILTERING_SCANLINES_DISCOVERED_BIT_ARRAY, +typedef struct { + KSPROPERTY Property; + VBICODECFILTERING_SCANLINES Scanlines; +} KSPROPERTY_VBICODECFILTERING_SCANLINES_S, *PKSPROPERTY_VBICODECFILTERING_SCANLINES_S; + +// *** NABTS codecs support this property +// KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_REQUESTED_BIT_ARRAY, +// KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_DISCOVERED_BIT_ARRAY, +typedef struct { + KSPROPERTY Property; + VBICODECFILTERING_NABTS_SUBSTREAMS Substreams; +} KSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S, *PKSPROPERTY_VBICODECFILTERING_NABTS_SUBSTREAMS_S; + +// *** Closed captioning codecs support this property +// KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_REQUESTED_BIT_ARRAY, +// KSPROPERTY_VBICODECFILTERING_SUBSTREAMS_DISCOVERED_BIT_ARRAY, +typedef struct { + KSPROPERTY Property; + VBICODECFILTERING_CC_SUBSTREAMS Substreams; +} KSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S, *PKSPROPERTY_VBICODECFILTERING_CC_SUBSTREAMS_S; + +// *** Most codecs support these versions of the global and pin properties +// KSPROPERTY_VBICODECFILTERING_STATISTICS +typedef struct { + KSPROPERTY Property; + VBICODECFILTERING_STATISTICS_COMMON Statistics; +} KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_S; + +typedef struct { + KSPROPERTY Property; + VBICODECFILTERING_STATISTICS_COMMON_PIN Statistics; +} KSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_COMMON_PIN_S; + +// *** NABTS codecs support this version of the global and pin properties +// KSPROPERTY_VBICODECFILTERING_STATISTICS +typedef struct { + KSPROPERTY Property; + VBICODECFILTERING_STATISTICS_NABTS Statistics; +} KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_S; + +typedef struct { + KSPROPERTY Property; + VBICODECFILTERING_STATISTICS_NABTS_PIN Statistics; +} KSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_NABTS_PIN_S; + +// *** Closed captioning codecs support this version of the global and pin properties +// KSPROPERTY_VBICODECFILTERING_STATISTICS + +typedef struct { + KSPROPERTY Property; + VBICODECFILTERING_STATISTICS_CC Statistics; +} KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_CC_S; + +typedef struct { + KSPROPERTY Property; + VBICODECFILTERING_STATISTICS_CC_PIN Statistics; +} KSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S, *PKSPROPERTY_VBICODECFILTERING_STATISTICS_CC_PIN_S; + +// Standard Pin Names for the video capture filter +//=========================================================================== + +#define STATIC_PINNAME_VIDEO_CAPTURE \ + 0xfb6c4281, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba +#define STATIC_PINNAME_CAPTURE STATIC_PINNAME_VIDEO_CAPTURE +DEFINE_GUIDSTRUCT("FB6C4281-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_CAPTURE); +#define PINNAME_VIDEO_CAPTURE DEFINE_GUIDNAMED(PINNAME_VIDEO_CAPTURE) +#define PINNAME_CAPTURE PINNAME_VIDEO_CAPTURE + +#define STATIC_PINNAME_VIDEO_CC_CAPTURE \ + 0x1aad8061, 0x12d, 0x11d2, 0xb4, 0xb1, 0x0, 0xa0, 0xd1, 0x2, 0xcf, 0xbe +#define STATIC_PINNAME_CC_CAPTURE STATIC_PINNAME_VIDEO_CC_CAPTURE +DEFINE_GUIDSTRUCT("1AAD8061-012D-11d2-B4B1-00A0D102CFBE", PINNAME_VIDEO_CC_CAPTURE); +#define PINNAME_VIDEO_CC_CAPTURE DEFINE_GUIDNAMED(PINNAME_VIDEO_CC_CAPTURE) + +#define STATIC_PINNAME_VIDEO_NABTS_CAPTURE \ + 0x29703660, 0x498a, 0x11d2, 0xb4, 0xb1, 0x0, 0xa0, 0xd1, 0x2, 0xcf, 0xbe +#define STATIC_PINNAME_NABTS_CAPTURE STATIC_PINNAME_VIDEO_NABTS_CAPTURE +DEFINE_GUIDSTRUCT("29703660-498A-11d2-B4B1-00A0D102CFBE", PINNAME_VIDEO_NABTS_CAPTURE); +#define PINNAME_VIDEO_NABTS_CAPTURE DEFINE_GUIDNAMED(PINNAME_VIDEO_NABTS_CAPTURE) + +#define STATIC_PINNAME_VIDEO_PREVIEW \ + 0xfb6c4282, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba +#define STATIC_PINNAME_PREVIEW STATIC_PINNAME_VIDEO_PREVIEW +DEFINE_GUIDSTRUCT("FB6C4282-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_PREVIEW); +#define PINNAME_VIDEO_PREVIEW DEFINE_GUIDNAMED(PINNAME_VIDEO_PREVIEW) +#define PINNAME_PREVIEW PINNAME_VIDEO_PREVIEW + +#define STATIC_PINNAME_VIDEO_ANALOGVIDEOIN \ + 0xfb6c4283, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba +DEFINE_GUIDSTRUCT("FB6C4283-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_ANALOGVIDEOIN); +#define PINNAME_VIDEO_ANALOGVIDEOIN DEFINE_GUIDNAMED(PINNAME_VIDEO_ANALOGVIDEOIN) + +#define STATIC_PINNAME_VIDEO_VBI \ + 0xfb6c4284, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba +DEFINE_GUIDSTRUCT("FB6C4284-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_VBI); +#define PINNAME_VIDEO_VBI DEFINE_GUIDNAMED(PINNAME_VIDEO_VBI) + +#define STATIC_PINNAME_VIDEO_VIDEOPORT \ + 0xfb6c4285, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba +DEFINE_GUIDSTRUCT("FB6C4285-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_VIDEOPORT); +#define PINNAME_VIDEO_VIDEOPORT DEFINE_GUIDNAMED(PINNAME_VIDEO_VIDEOPORT) + +#define STATIC_PINNAME_VIDEO_NABTS \ + 0xfb6c4286, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba +DEFINE_GUIDSTRUCT("FB6C4286-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_NABTS); +#define PINNAME_VIDEO_NABTS DEFINE_GUIDNAMED(PINNAME_VIDEO_NABTS) + +#define STATIC_PINNAME_VIDEO_EDS \ + 0xfb6c4287, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba +DEFINE_GUIDSTRUCT("FB6C4287-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_EDS); +#define PINNAME_VIDEO_EDS DEFINE_GUIDNAMED(PINNAME_VIDEO_EDS) + +#define STATIC_PINNAME_VIDEO_TELETEXT \ + 0xfb6c4288, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba +DEFINE_GUIDSTRUCT("FB6C4288-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_TELETEXT); +#define PINNAME_VIDEO_TELETEXT DEFINE_GUIDNAMED(PINNAME_VIDEO_TELETEXT) + +#define STATIC_PINNAME_VIDEO_CC \ + 0xfb6c4289, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba +DEFINE_GUIDSTRUCT("FB6C4289-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_CC); +#define PINNAME_VIDEO_CC DEFINE_GUIDNAMED(PINNAME_VIDEO_CC) + +#define STATIC_PINNAME_VIDEO_STILL \ + 0xfb6c428A, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba +DEFINE_GUIDSTRUCT("FB6C428A-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_STILL); +#define PINNAME_VIDEO_STILL DEFINE_GUIDNAMED(PINNAME_VIDEO_STILL) + +#define STATIC_PINNAME_VIDEO_TIMECODE \ + 0xfb6c428B, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba +DEFINE_GUIDSTRUCT("FB6C428B-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_TIMECODE); +#define PINNAME_VIDEO_TIMECODE DEFINE_GUIDNAMED(PINNAME_VIDEO_TIMECODE) + +#define STATIC_PINNAME_VIDEO_VIDEOPORT_VBI \ + 0xfb6c428C, 0x353, 0x11d1, 0x90, 0x5f, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba +DEFINE_GUIDSTRUCT("FB6C428C-0353-11d1-905F-0000C0CC16BA", PINNAME_VIDEO_VIDEOPORT_VBI); +#define PINNAME_VIDEO_VIDEOPORT_VBI DEFINE_GUIDNAMED(PINNAME_VIDEO_VIDEOPORT_VBI) + +//=========================================================================== +// KSSTREAM_HEADER extensions for digital video +//=========================================================================== + +#define KS_VIDEO_FLAG_FRAME 0x0000L // Frame or Field (default is frame) +#define KS_VIDEO_FLAG_FIELD1 0x0001L +#define KS_VIDEO_FLAG_FIELD2 0x0002L + +#define KS_VIDEO_FLAG_I_FRAME 0x0000L // I, B, or P (default is I) +#define KS_VIDEO_FLAG_P_FRAME 0x0010L +#define KS_VIDEO_FLAG_B_FRAME 0x0020L + +typedef struct tagKS_FRAME_INFO { + ULONG ExtendedHeaderSize; // Size of this extended header + DWORD dwFrameFlags; // Field1, Field2, or Frame + LONGLONG PictureNumber; + LONGLONG DropCount; + + // The following are only set when using OverlayMixer + HANDLE hDirectDraw; // user mode DDraw handle + HANDLE hSurfaceHandle; // user mode surface handle + RECT DirectDrawRect; // portion of surface locked + // Reserved fields, never reference these + DWORD Reserved1; + DWORD Reserved2; + DWORD Reserved3; + DWORD Reserved4; +} KS_FRAME_INFO, *PKS_FRAME_INFO; + +//=========================================================================== +// KSSTREAM_HEADER extensions for VBI +//=========================================================================== + +#define KS_VBI_FLAG_FIELD1 0x0001L +#define KS_VBI_FLAG_FIELD2 0x0002L + +#define KS_VBI_FLAG_MV_PRESENT 0x0100L +#define KS_VBI_FLAG_MV_HARDWARE 0x0200L +#define KS_VBI_FLAG_MV_DETECTED 0x0400L + +#define KS_VBI_FLAG_TVTUNER_CHANGE 0x0010L // TvTunerChangeInfo is valid +#define KS_VBI_FLAG_VBIINFOHEADER_CHANGE 0x0020L // VBIInfoHeader is valid + +typedef struct tagKS_VBI_FRAME_INFO { + ULONG ExtendedHeaderSize; // Size of this extended header + DWORD dwFrameFlags; // Field1, Field2, or Frame; & etc + LONGLONG PictureNumber; // Test only? + LONGLONG DropCount; // Test only? + DWORD dwSamplingFrequency; + KS_TVTUNER_CHANGE_INFO TvTunerChangeInfo; + KS_VBIINFOHEADER VBIInfoHeader; +} KS_VBI_FRAME_INFO, *PKS_VBI_FRAME_INFO; + + +//=========================================================================== +// Analog video formats, used with: +// Analog Video Decoders +// TVTuners +// Analog Video Encoders +// +// XXX_STANDARDS_SUPPORTED returns a bitmask +//=========================================================================== + +typedef enum +{ + KS_AnalogVideo_None = 0x00000000, // This is a digital sensor + KS_AnalogVideo_NTSC_M = 0x00000001, // 75 IRE Setup + KS_AnalogVideo_NTSC_M_J = 0x00000002, // Japan, 0 IRE Setup + KS_AnalogVideo_NTSC_433 = 0x00000004, + + KS_AnalogVideo_PAL_B = 0x00000010, + KS_AnalogVideo_PAL_D = 0x00000020, + KS_AnalogVideo_PAL_G = 0x00000040, + KS_AnalogVideo_PAL_H = 0x00000080, + KS_AnalogVideo_PAL_I = 0x00000100, + KS_AnalogVideo_PAL_M = 0x00000200, + KS_AnalogVideo_PAL_N = 0x00000400, + + KS_AnalogVideo_PAL_60 = 0x00000800, + + KS_AnalogVideo_SECAM_B = 0x00001000, + KS_AnalogVideo_SECAM_D = 0x00002000, + KS_AnalogVideo_SECAM_G = 0x00004000, + KS_AnalogVideo_SECAM_H = 0x00008000, + KS_AnalogVideo_SECAM_K = 0x00010000, + KS_AnalogVideo_SECAM_K1 = 0x00020000, + KS_AnalogVideo_SECAM_L = 0x00040000, + KS_AnalogVideo_SECAM_L1 = 0x00080000, + + KS_AnalogVideo_PAL_N_COMBO + = 0x00100000 +} KS_AnalogVideoStandard; + +#define KS_AnalogVideo_NTSC_Mask 0x00000007 +#define KS_AnalogVideo_PAL_Mask 0x00100FF0 +#define KS_AnalogVideo_SECAM_Mask 0x000FF000 + +//=========================================================================== +// Property set definitions +// The comments show whether a given property is: +// R : READ only +// w : WRITE only +// RW : READ / WRITE +// O : Optional (return E_UNSUPPORTED if you don't handle this) +//=========================================================================== + +#define STATIC_PROPSETID_ALLOCATOR_CONTROL\ + 0x53171960, 0x148e, 0x11d2, 0x99, 0x79, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba +DEFINE_GUIDSTRUCT("53171960-148E-11d2-9979-0000C0CC16BA", PROPSETID_ALLOCATOR_CONTROL); +#define PROPSETID_ALLOCATOR_CONTROL DEFINE_GUIDNAMED(PROPSETID_ALLOCATOR_CONTROL) +typedef enum { + KSPROPERTY_ALLOCATOR_CONTROL_HONOR_COUNT, // R O (will allocate exactly this number of buffers) + KSPROPERTY_ALLOCATOR_CONTROL_SURFACE_SIZE, // R O (return 2 DWORDs specifying surface size) +} KSPROPERTY_ALLOCATOR_CONTROL; + + +//=========================================================================== + +#define STATIC_PROPSETID_VIDCAP_VIDEOPROCAMP\ + 0xC6E13360L, 0x30AC, 0x11d0, 0xa1, 0x8c, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56 +DEFINE_GUIDSTRUCT("C6E13360-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_VIDEOPROCAMP); +#define PROPSETID_VIDCAP_VIDEOPROCAMP DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOPROCAMP) + +typedef enum { + KSPROPERTY_VIDEOPROCAMP_BRIGHTNESS, // RW O + KSPROPERTY_VIDEOPROCAMP_CONTRAST, // RW O + KSPROPERTY_VIDEOPROCAMP_HUE, // RW O + KSPROPERTY_VIDEOPROCAMP_SATURATION, // RW O + KSPROPERTY_VIDEOPROCAMP_SHARPNESS, // RW O + KSPROPERTY_VIDEOPROCAMP_GAMMA, // RW O + KSPROPERTY_VIDEOPROCAMP_COLORENABLE, // RW O + KSPROPERTY_VIDEOPROCAMP_WHITEBALANCE, // RW O + KSPROPERTY_VIDEOPROCAMP_BACKLIGHT_COMPENSATION,// RW O +} KSPROPERTY_VIDCAP_VIDEOPROCAMP; + +typedef struct { + KSPROPERTY Property; + LONG Value; // Value to set or get + ULONG Flags; // KSPROPERTY_VIDEOPROCAMP_FLAGS_* + ULONG Capabilities; // KSPROPERTY_VIDEOPROCAMP_FLAGS_* +} KSPROPERTY_VIDEOPROCAMP_S, *PKSPROPERTY_VIDEOPROCAMP_S; + +#define KSPROPERTY_VIDEOPROCAMP_FLAGS_AUTO 0X0001L +#define KSPROPERTY_VIDEOPROCAMP_FLAGS_MANUAL 0X0002L + +//=========================================================================== + +#define STATIC_PROPSETID_TUNER\ + 0x6a2e0605L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56 +DEFINE_GUIDSTRUCT("6a2e0605-28e4-11d0-a18c-00a0c9118956", PROPSETID_TUNER); +#define PROPSETID_TUNER DEFINE_GUIDNAMED(PROPSETID_TUNER) + +typedef enum { + KSPROPERTY_TUNER_CAPS, // R -overall device capabilities + KSPROPERTY_TUNER_MODE_CAPS, // R -capabilities in this mode + KSPROPERTY_TUNER_MODE, // RW -set a mode (TV, FM, AM, DSS) + KSPROPERTY_TUNER_STANDARD, // R -get TV standard (only if TV mode) + KSPROPERTY_TUNER_FREQUENCY, // RW -set/get frequency + KSPROPERTY_TUNER_INPUT, // RW -select an input + KSPROPERTY_TUNER_STATUS, // R -tuning status + KSPROPERTY_TUNER_IF_MEDIUM // R O-Medium for IF or Transport Pin +} KSPROPERTY_TUNER; + +typedef enum { + KSPROPERTY_TUNER_MODE_TV = 0X0001, + KSPROPERTY_TUNER_MODE_FM_RADIO = 0X0002, + KSPROPERTY_TUNER_MODE_AM_RADIO = 0X0004, + KSPROPERTY_TUNER_MODE_DSS = 0X0008, + KSPROPERTY_TUNER_MODE_ATSC = 0X0010, // also used for DVB-T, DVB-C +} KSPROPERTY_TUNER_MODES; + +// Describes how the device tunes. Only one of these flags may be set +// in KSPROPERTY_TUNER_MODE_CAPS_S.Strategy + +// Describe how the driver should attempt to tune: +// EXACT: just go to the frequency specified (no fine tuning) +// FINE: (slow) do an exhaustive search for the best signal +// COARSE: (fast) use larger frequency jumps to just determine if any signal + +typedef enum { + KS_TUNER_TUNING_EXACT = 1, // No fine tuning + KS_TUNER_TUNING_FINE, // Fine grained search + KS_TUNER_TUNING_COARSE, // Coarse search +}KS_TUNER_TUNING_FLAGS; + +typedef enum { + KS_TUNER_STRATEGY_PLL = 0X01, // Tune by PLL offset + KS_TUNER_STRATEGY_SIGNAL_STRENGTH = 0X02, // Tune by signal strength + KS_TUNER_STRATEGY_DRIVER_TUNES = 0X04, // Driver does fine tuning +}KS_TUNER_STRATEGY; + +typedef struct { + KSPROPERTY Property; + ULONG ModesSupported; // KS_PROPERTY_TUNER_MODES_* + KSPIN_MEDIUM VideoMedium; // GUID_NULL (no pin), or GUID + KSPIN_MEDIUM TVAudioMedium; // GUID_NULL (no pin), or GUID + KSPIN_MEDIUM RadioAudioMedium; // GUID_NULL (no pin), or GUID +} KSPROPERTY_TUNER_CAPS_S, *PKSPROPERTY_TUNER_CAPS_S; + +typedef struct { + KSPROPERTY Property; + KSPIN_MEDIUM IFMedium; // GUID_NULL (no pin), or GUID +} KSPROPERTY_TUNER_IF_MEDIUM_S, *PKSPROPERTY_TUNER_IF_MEDIUM_S; + +typedef struct { + KSPROPERTY Property; + ULONG Mode; // IN: KSPROPERTY_TUNER_MODE + ULONG StandardsSupported; // KS_AnalogVideo_* (if TV or DSS) + ULONG MinFrequency; // Hz + ULONG MaxFrequency; // Hz + ULONG TuningGranularity; // Hz + ULONG NumberOfInputs; // count of inputs + ULONG SettlingTime; // milliSeconds + ULONG Strategy; // KS_TUNER_STRATEGY +} KSPROPERTY_TUNER_MODE_CAPS_S, *PKSPROPERTY_TUNER_MODE_CAPS_S; + +typedef struct { + KSPROPERTY Property; + ULONG Mode; // IN: KSPROPERTY_TUNER_MODE +} KSPROPERTY_TUNER_MODE_S, *PKSPROPERTY_TUNER_MODE_S; + +typedef struct { + KSPROPERTY Property; + ULONG Frequency; // Hz + ULONG LastFrequency; // Hz (last known good) + ULONG TuningFlags; // KS_TUNER_TUNING_FLAGS + ULONG VideoSubChannel; // DSS + ULONG AudioSubChannel; // DSS + ULONG Channel; // VBI decoders + ULONG Country; // VBI decoders +} KSPROPERTY_TUNER_FREQUENCY_S, *PKSPROPERTY_TUNER_FREQUENCY_S; + +typedef struct { + KSPROPERTY Property; + ULONG Standard; // KS_AnalogVideo_* +} KSPROPERTY_TUNER_STANDARD_S, *PKSPROPERTY_TUNER_STANDARD_S; + +typedef struct { + KSPROPERTY Property; + ULONG InputIndex; // 0 to (n-1) inputs +} KSPROPERTY_TUNER_INPUT_S, *PKSPROPERTY_TUNER_INPUT_S; + +typedef struct { + KSPROPERTY Property; + ULONG CurrentFrequency; // Hz + ULONG PLLOffset; // if Strategy.KS_TUNER_STRATEGY_PLL + ULONG SignalStrength; // if Stretegy.KS_TUNER_STRATEGY_SIGNAL_STRENGTH + ULONG Busy; // TRUE if in the process of tuning +} KSPROPERTY_TUNER_STATUS_S, *PKSPROPERTY_TUNER_STATUS_S; + +#define STATIC_EVENTSETID_TUNER\ + 0x6a2e0606L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56 +DEFINE_GUIDSTRUCT("6a2e0606-28e4-11d0-a18c-00a0c9118956", EVENTSETID_TUNER); +#define EVENTSETID_TUNER DEFINE_GUIDNAMED(EVENTSETID_TUNER) + +typedef enum { + KSEVENT_TUNER_CHANGED +} KSEVENT_TUNER; + + +//=========================================================================== + +#define STATIC_PROPSETID_VIDCAP_VIDEOENCODER\ + 0x6a2e0610L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56 +DEFINE_GUIDSTRUCT("6a2e0610-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_VIDEOENCODER); +#define PROPSETID_VIDCAP_VIDEOENCODER DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOENCODER) + +typedef enum { + KSPROPERTY_VIDEOENCODER_CAPS, // R + KSPROPERTY_VIDEOENCODER_STANDARD, // RW + KSPROPERTY_VIDEOENCODER_COPYPROTECTION, // RW O + KSPROPERTY_VIDEOENCODER_CC_ENABLE, // RW O +} KSPROPERTY_VIDCAP_VIDEOENCODER; + +typedef struct { + KSPROPERTY Property; + LONG Value; // value to get or set + ULONG Flags; // + ULONG Capabilities; // +} KSPROPERTY_VIDEOENCODER_S, *PKSPROPERTY_VIDEOENCODER_S; + +//=========================================================================== + +#define STATIC_PROPSETID_VIDCAP_VIDEODECODER\ + 0xC6E13350L, 0x30AC, 0x11d0, 0xA1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56 +DEFINE_GUIDSTRUCT("C6E13350-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_VIDEODECODER); +#define PROPSETID_VIDCAP_VIDEODECODER DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEODECODER) + +typedef enum { + KSPROPERTY_VIDEODECODER_CAPS, // R + KSPROPERTY_VIDEODECODER_STANDARD, // RW + KSPROPERTY_VIDEODECODER_STATUS, // R + KSPROPERTY_VIDEODECODER_OUTPUT_ENABLE, // Rw O + KSPROPERTY_VIDEODECODER_VCR_TIMING, // RW O +} KSPROPERTY_VIDCAP_VIDEODECODER; + +typedef enum { + KS_VIDEODECODER_FLAGS_CAN_DISABLE_OUTPUT = 0X0001, // VP Output can tri-stae + KS_VIDEODECODER_FLAGS_CAN_USE_VCR_LOCKING = 0X0002, // VCR PLL timings + KS_VIDEODECODER_FLAGS_CAN_INDICATE_LOCKED = 0X0004, // Can indicate valid signal +}KS_VIDEODECODER_FLAGS; + +typedef struct { + KSPROPERTY Property; + ULONG StandardsSupported; // KS_AnalogVideo_* + ULONG Capabilities; // KS_VIDEODECODER_FLAGS_* + ULONG SettlingTime; // milliseconds + ULONG HSyncPerVSync; // Number of HSync Pulses per VSync +} KSPROPERTY_VIDEODECODER_CAPS_S, *PKSPROPERTY_VIDEODECODER_CAPS_S; + +typedef struct { + KSPROPERTY Property; + ULONG NumberOfLines; // 525 or 625 lines detected + ULONG SignalLocked; // TRUE if signal is locked +} KSPROPERTY_VIDEODECODER_STATUS_S, *PKSPROPERTY_VIDEODECODER_STATUS_S; + +typedef struct { + KSPROPERTY Property; + ULONG Value; // Get or set a value +} KSPROPERTY_VIDEODECODER_S, *PKSPROPERTY_VIDEODECODER_S; + +#define STATIC_EVENTSETID_VIDEODECODER\ + 0x6a2e0621L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56 +DEFINE_GUIDSTRUCT("6a2e0621-28e4-11d0-a18c-00a0c9118956", EVENTSETID_VIDEODECODER); +#define EVENTSETID_VIDEODECODER DEFINE_GUIDNAMED(EVENTSETID_VIDEODECODER) + +typedef enum { + KSEVENT_VIDEODECODER_CHANGED +} KSEVENT_VIDEODECODER; + +//=========================================================================== + +#define STATIC_PROPSETID_VIDCAP_CAMERACONTROL\ + 0xC6E13370L, 0x30AC, 0x11d0, 0xa1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56 +DEFINE_GUIDSTRUCT("C6E13370-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_CAMERACONTROL); +#define PROPSETID_VIDCAP_CAMERACONTROL DEFINE_GUIDNAMED(PROPSETID_VIDCAP_CAMERACONTROL) + +typedef enum { + KSPROPERTY_CAMERACONTROL_PAN, // RW O + KSPROPERTY_CAMERACONTROL_TILT, // RW O + KSPROPERTY_CAMERACONTROL_ROLL, // RW O + KSPROPERTY_CAMERACONTROL_ZOOM, // RW O + KSPROPERTY_CAMERACONTROL_EXPOSURE, // RW O + KSPROPERTY_CAMERACONTROL_IRIS, // RW O + KSPROPERTY_CAMERACONTROL_FOCUS, // RW O +} KSPROPERTY_VIDCAP_CAMERACONTROL; + +typedef struct { + KSPROPERTY Property; + LONG Value; // value to get or set + ULONG Flags; // KSPROPERTY_CAMERACONTROL_FLAGS_* + ULONG Capabilities; // KSPROPERTY_CAMERACONTROL_FLAGS_* +} KSPROPERTY_CAMERACONTROL_S, *PKSPROPERTY_CAMERACONTROL_S; + +#define KSPROPERTY_CAMERACONTROL_FLAGS_AUTO 0X0001L +#define KSPROPERTY_CAMERACONTROL_FLAGS_MANUAL 0X0002L + +#define KSPROPERTY_CAMERACONTROL_FLAGS_ABSOLUTE 0X0000L +#define KSPROPERTY_CAMERACONTROL_FLAGS_RELATIVE 0X0010L + + +//=========================================================================== + +#define STATIC_PROPSETID_VIDCAP_CROSSBAR\ + 0x6a2e0640L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56 +DEFINE_GUIDSTRUCT("6a2e0640-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_CROSSBAR); +#define PROPSETID_VIDCAP_CROSSBAR DEFINE_GUIDNAMED(PROPSETID_VIDCAP_CROSSBAR) + +typedef enum { + KSPROPERTY_CROSSBAR_CAPS, // R + KSPROPERTY_CROSSBAR_PININFO, // R + KSPROPERTY_CROSSBAR_CAN_ROUTE, // R + KSPROPERTY_CROSSBAR_ROUTE, // RW +} KSPROPERTY_VIDCAP_CROSSBAR; + +typedef struct { + KSPROPERTY Property; + ULONG NumberOfInputs; // the number of audio and video input pins + ULONG NumberOfOutputs; // the number of audio and video output pins +} KSPROPERTY_CROSSBAR_CAPS_S, *PKSPROPERTY_CROSSBAR_CAPS_S; + +typedef struct { + KSPROPERTY Property; + KSPIN_DATAFLOW Direction; // KSPIN_DATAFLOW_IN or KSPIN_DATAFLOW_OUT? + ULONG Index; // Which pin to return data for? + ULONG PinType; // KS_PhysConn_Video_* or KS_PhysConn_Audio_* + ULONG RelatedPinIndex; // For video pins, this is the related audio pin + KSPIN_MEDIUM Medium; // Identifies the hardware connection +} KSPROPERTY_CROSSBAR_PININFO_S, *PKSPROPERTY_CROSSBAR_PININFO_S; + +typedef struct { + KSPROPERTY Property; + ULONG IndexInputPin; // Zero based index of the input pin + ULONG IndexOutputPin; // Zero based index of the output pin + ULONG CanRoute; // returns non-zero on CAN_ROUTE if routing is possible +} KSPROPERTY_CROSSBAR_ROUTE_S, *PKSPROPERTY_CROSSBAR_ROUTE_S; + +#define STATIC_EVENTSETID_CROSSBAR\ + 0x6a2e0641L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56 +DEFINE_GUIDSTRUCT("6a2e0641-28e4-11d0-a18c-00a0c9118956", EVENTSETID_CROSSBAR); +#define EVENTSETID_CROSSBAR DEFINE_GUIDNAMED(EVENTSETID_CROSSBAR) + +typedef enum { + KSEVENT_CROSSBAR_CHANGED +} KSEVENT_CROSSBAR; + +// The following IDs should match the AM equivalents +typedef enum { + KS_PhysConn_Video_Tuner = 1, + KS_PhysConn_Video_Composite, + KS_PhysConn_Video_SVideo, + KS_PhysConn_Video_RGB, + KS_PhysConn_Video_YRYBY, + KS_PhysConn_Video_SerialDigital, + KS_PhysConn_Video_ParallelDigital, + KS_PhysConn_Video_SCSI, + KS_PhysConn_Video_AUX, + KS_PhysConn_Video_1394, + KS_PhysConn_Video_USB, + KS_PhysConn_Video_VideoDecoder, + KS_PhysConn_Video_VideoEncoder, + KS_PhysConn_Video_SCART, + + KS_PhysConn_Audio_Tuner = 4096, + KS_PhysConn_Audio_Line, + KS_PhysConn_Audio_Mic, + KS_PhysConn_Audio_AESDigital, + KS_PhysConn_Audio_SPDIFDigital, + KS_PhysConn_Audio_SCSI, + KS_PhysConn_Audio_AUX, + KS_PhysConn_Audio_1394, + KS_PhysConn_Audio_USB, + KS_PhysConn_Audio_AudioDecoder, +} KS_PhysicalConnectorType; + + +//=========================================================================== + +#define STATIC_PROPSETID_VIDCAP_TVAUDIO\ + 0x6a2e0650L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56 +DEFINE_GUIDSTRUCT("6a2e0650-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_TVAUDIO); +#define PROPSETID_VIDCAP_TVAUDIO DEFINE_GUIDNAMED(PROPSETID_VIDCAP_TVAUDIO) + +typedef enum { + KSPROPERTY_TVAUDIO_CAPS, // R + KSPROPERTY_TVAUDIO_MODE, // RW + KSPROPERTY_TVAUDIO_CURRENTLY_AVAILABLE_MODES // R +} KSPROPERTY_VIDCAP_TVAUDIO; + +#define KS_TVAUDIO_MODE_MONO 0x0001 // Mono +#define KS_TVAUDIO_MODE_STEREO 0x0002 // Stereo +#define KS_TVAUDIO_MODE_LANG_A 0x0010 // Primary language +#define KS_TVAUDIO_MODE_LANG_B 0x0020 // 2nd avail language +#define KS_TVAUDIO_MODE_LANG_C 0x0040 // 3rd avail language + +typedef struct { + KSPROPERTY Property; + ULONG Capabilities; // Bitmask of KS_TVAUDIO_MODE_* + KSPIN_MEDIUM InputMedium; + KSPIN_MEDIUM OutputMedium; +} KSPROPERTY_TVAUDIO_CAPS_S, *PKSPROPERTY_TVAUDIO_CAPS_S; + +typedef struct { + KSPROPERTY Property; + ULONG Mode; // KS_TVAUDIO_MODE_* +} KSPROPERTY_TVAUDIO_S, *PKSPROPERTY_TVAUDIO_S; + + +#define STATIC_KSEVENTSETID_VIDCAP_TVAUDIO\ + 0x6a2e0651L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56 +DEFINE_GUIDSTRUCT("6a2e0651-28e4-11d0-a18c-00a0c9118956", KSEVENTSETID_VIDCAP_TVAUDIO); +#define KSEVENTSETID_VIDCAP_TVAUDIO DEFINE_GUIDNAMED(KSEVENTSETID_VIDCAP_TVAUDIO) + +typedef enum { + KSEVENT_TVAUDIO_CHANGED, +} KSEVENT_TVAUDIO; + +//=========================================================================== +#define STATIC_PROPSETID_VIDCAP_VIDEOCOMPRESSION\ + 0xC6E13343L, 0x30AC, 0x11d0, 0xA1, 0x8C, 0x00, 0xA0, 0xC9, 0x11, 0x89, 0x56 +DEFINE_GUIDSTRUCT("C6E13343-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_VIDEOCOMPRESSION); +#define PROPSETID_VIDCAP_VIDEOCOMPRESSION DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOCOMPRESSION) + +typedef enum { + KSPROPERTY_VIDEOCOMPRESSION_GETINFO, // R + KSPROPERTY_VIDEOCOMPRESSION_KEYFRAME_RATE, // RW + KSPROPERTY_VIDEOCOMPRESSION_PFRAMES_PER_KEYFRAME, // RW + KSPROPERTY_VIDEOCOMPRESSION_QUALITY, // RW + KSPROPERTY_VIDEOCOMPRESSION_OVERRIDE_KEYFRAME, // W + KSPROPERTY_VIDEOCOMPRESSION_OVERRIDE_FRAME_SIZE, // W + KSPROPERTY_VIDEOCOMPRESSION_WINDOWSIZE, // RW +} KSPROPERTY_VIDCAP_VIDEOCOMPRESSION; + +typedef enum { + KS_CompressionCaps_CanQuality = 1, + KS_CompressionCaps_CanCrunch = 2, + KS_CompressionCaps_CanKeyFrame = 4, + KS_CompressionCaps_CanBFrame = 8, + KS_CompressionCaps_CanWindow = 0x10, +} KS_CompressionCaps; + +typedef struct { + KSPROPERTY Property; + // Note, no VersionString! + // Note, no DescriptionString! + ULONG StreamIndex; // zero based index of stream + LONG DefaultKeyFrameRate; // Key frame rate + LONG DefaultPFrameRate; // Predeicted frames per Key frame + LONG DefaultQuality; // 0 to 10000 + LONG NumberOfQualitySettings; // How many discreet quality settings? + LONG Capabilities; // KS_CompressionCaps_* +} KSPROPERTY_VIDEOCOMPRESSION_GETINFO_S, *PKSPROPERTY_VIDEOCOMPRESSION_GETINFO_S; + +typedef struct { + KSPROPERTY Property; + ULONG StreamIndex; // zero based index of stream + LONG Value; // value to get or set +} KSPROPERTY_VIDEOCOMPRESSION_S, *PKSPROPERTY_VIDEOCOMPRESSION_S; + +//=========================================================================== +// MEDIASUBTYPE_Overlay +#define STATIC_KSDATAFORMAT_SUBTYPE_OVERLAY\ + 0xe436eb7fL, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 +DEFINE_GUIDSTRUCT("e436eb7f-524f-11ce-9f53-0020af0ba770", KSDATAFORMAT_SUBTYPE_OVERLAY); +#define KSDATAFORMAT_SUBTYPE_OVERLAY DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_OVERLAY) + +#define STATIC_KSPROPSETID_OverlayUpdate\ + 0x490EA5CFL, 0x7681, 0x11D1, 0xA2, 0x1C, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +DEFINE_GUIDSTRUCT("490EA5CF-7681-11D1-A21C-00A0C9223196", KSPROPSETID_OverlayUpdate); +#define KSPROPSETID_OverlayUpdate DEFINE_GUIDNAMED(KSPROPSETID_OverlayUpdate) + +typedef enum { + KSPROPERTY_OVERLAYUPDATE_INTERESTS, + KSPROPERTY_OVERLAYUPDATE_CLIPLIST = 0x1, + KSPROPERTY_OVERLAYUPDATE_PALETTE = 0x2, + KSPROPERTY_OVERLAYUPDATE_COLORKEY = 0x4, + KSPROPERTY_OVERLAYUPDATE_VIDEOPOSITION = 0x8, + KSPROPERTY_OVERLAYUPDATE_DISPLAYCHANGE = 0x10, + KSPROPERTY_OVERLAYUPDATE_COLORREF = 0x10000000 +} KSPROPERTY_OVERLAYUPDATE; + +typedef struct { + ULONG PelsWidth; + ULONG PelsHeight; + ULONG BitsPerPel; + WCHAR DeviceID[1]; +} KSDISPLAYCHANGE, *PKSDISPLAYCHANGE; + +#define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_INTERESTS(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_OVERLAYUPDATE_INTERESTS,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(ULONG),\ + NULL, NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_PALETTE(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_OVERLAYUPDATE_PALETTE,\ + NULL,\ + sizeof(KSPROPERTY),\ + 0,\ + (Handler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_COLORKEY(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_OVERLAYUPDATE_COLORKEY,\ + NULL,\ + sizeof(KSPROPERTY),\ + sizeof(COLORKEY),\ + (Handler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_CLIPLIST(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_OVERLAYUPDATE_CLIPLIST,\ + NULL,\ + sizeof(KSPROPERTY),\ + 2 * sizeof(RECT) + sizeof(RGNDATAHEADER),\ + (Handler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_VIDEOPOSITION(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_OVERLAYUPDATE_VIDEOPOSITION,\ + NULL,\ + sizeof(KSPROPERTY),\ + 2 * sizeof(RECT),\ + (Handler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_DISPLAYCHANGE(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_OVERLAYUPDATE_DISPLAYCHANGE,\ + NULL,\ + sizeof(KSPROPERTY),\ + sizeof(KSDISPLAYCHANGE),\ + (Handler),\ + NULL, 0, NULL, NULL, 0) + +#define DEFINE_KSPROPERTY_ITEM_OVERLAYUPDATE_COLORREF(Handler)\ + DEFINE_KSPROPERTY_ITEM(\ + KSPROPERTY_OVERLAYUPDATE_COLORREF,\ + (Handler),\ + sizeof(KSPROPERTY),\ + sizeof(COLORREF),\ + NULL,\ + NULL, 0, NULL, NULL, 0) + +//=========================================================================== +#define STATIC_PROPSETID_VIDCAP_VIDEOCONTROL\ + 0x6a2e0670L, 0x28e4, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56 +DEFINE_GUIDSTRUCT("6a2e0670-28e4-11d0-a18c-00a0c9118956", PROPSETID_VIDCAP_VIDEOCONTROL); +#define PROPSETID_VIDCAP_VIDEOCONTROL DEFINE_GUIDNAMED(PROPSETID_VIDCAP_VIDEOCONTROL) + +typedef enum { + KSPROPERTY_VIDEOCONTROL_CAPS, // R + KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE, // R O + KSPROPERTY_VIDEOCONTROL_FRAME_RATES, // R O + KSPROPERTY_VIDEOCONTROL_MODE, // RWO +} KSPROPERTY_VIDCAP_VIDEOCONTROL; + +typedef enum { + KS_VideoControlFlag_FlipHorizontal = 0x0001, + KS_VideoControlFlag_FlipVertical = 0x0002, + KS_Obsolete_VideoControlFlag_ExternalTriggerEnable = 0x0010, // ***WARNING *** Flag msimatch with DSHOW. + KS_Obsolete_VideoControlFlag_Trigger = 0x0020, // ***WARNING *** Flag msimatch with DSHOW. + KS_VideoControlFlag_ExternalTriggerEnable = 0x0004, + KS_VideoControlFlag_Trigger = 0x0008, +} KS_VideoControlFlags; + +typedef struct { + KSPROPERTY Property; + ULONG StreamIndex; + ULONG VideoControlCaps; // KS_VideoControlFlags_* +} KSPROPERTY_VIDEOCONTROL_CAPS_S, *PKSPROPERTY_VIDEOCONTROL_CAPS_S; + +typedef struct { + KSPROPERTY Property; + ULONG StreamIndex; + LONG Mode; // KS_VideoControlFlags_* +} KSPROPERTY_VIDEOCONTROL_MODE_S, *PKSPROPERTY_VIDEOCONTROL_MODE_S; + +typedef struct { + KSPROPERTY Property; + ULONG StreamIndex; // Index of stream + ULONG RangeIndex; // Index of range + SIZE Dimensions; // Size of image + LONGLONG CurrentActualFrameRate; // Only correct if pin is open + LONGLONG CurrentMaxAvailableFrameRate; // Max Rate temporarily limited on USB or 1394? +} KSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S, *PKSPROPERTY_VIDEOCONTROL_ACTUAL_FRAME_RATE_S; + +// KSPROPERTY_VIDEOCONTROL_FRAME_RATES returns a list of available frame rates in 100 nS units +typedef struct { + KSPROPERTY Property; + ULONG StreamIndex; // Index of stream + ULONG RangeIndex; // Index of range + SIZE Dimensions; // Size of image +} KSPROPERTY_VIDEOCONTROL_FRAME_RATES_S, *PKSPROPERTY_VIDEOCONTROL_FRAME_RATES_S; + +//=========================================================================== +#define STATIC_PROPSETID_VIDCAP_DROPPEDFRAMES\ + 0xC6E13344L, 0x30AC, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56 +DEFINE_GUIDSTRUCT("C6E13344-30AC-11d0-A18C-00A0C9118956", PROPSETID_VIDCAP_DROPPEDFRAMES); +#define PROPSETID_VIDCAP_DROPPEDFRAMES DEFINE_GUIDNAMED(PROPSETID_VIDCAP_DROPPEDFRAMES) + +typedef enum { + KSPROPERTY_DROPPEDFRAMES_CURRENT // R +} KSPROPERTY_VIDCAP_DROPPEDFRAMES; + +typedef struct { + KSPROPERTY Property; + LONGLONG PictureNumber; // Current Picture Number + LONGLONG DropCount; // Count of frames dropped + ULONG AverageFrameSize; // Average size of frames captured +} KSPROPERTY_DROPPEDFRAMES_CURRENT_S, *PKSPROPERTY_DROPPEDFRAMES_CURRENT_S; + +//=========================================================================== +// VPE + +#define STATIC_KSPROPSETID_VPConfig\ + 0xbc29a660L, 0x30e3, 0x11d0, 0x9e, 0x69, 0x00, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b +DEFINE_GUIDSTRUCT("bc29a660-30e3-11d0-9e69-00c04fd7c15b", KSPROPSETID_VPConfig); +#define KSPROPSETID_VPConfig DEFINE_GUIDNAMED(KSPROPSETID_VPConfig) + +#define STATIC_KSPROPSETID_VPVBIConfig\ + 0xec529b00L, 0x1a1f, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a +DEFINE_GUIDSTRUCT("ec529b00-1a1f-11d1-bad9-00609744111a", KSPROPSETID_VPVBIConfig); +#define KSPROPSETID_VPVBIConfig DEFINE_GUIDNAMED(KSPROPSETID_VPVBIConfig) + +// Both of the above property sets use the same list of properties below + +typedef enum { + KSPROPERTY_VPCONFIG_NUMCONNECTINFO, + KSPROPERTY_VPCONFIG_GETCONNECTINFO, + KSPROPERTY_VPCONFIG_SETCONNECTINFO, + KSPROPERTY_VPCONFIG_VPDATAINFO, + KSPROPERTY_VPCONFIG_MAXPIXELRATE, + KSPROPERTY_VPCONFIG_INFORMVPINPUT, + KSPROPERTY_VPCONFIG_NUMVIDEOFORMAT, + KSPROPERTY_VPCONFIG_GETVIDEOFORMAT, + KSPROPERTY_VPCONFIG_SETVIDEOFORMAT, + KSPROPERTY_VPCONFIG_INVERTPOLARITY, + KSPROPERTY_VPCONFIG_DECIMATIONCAPABILITY, // E_NOTIMPL for VBI + KSPROPERTY_VPCONFIG_SCALEFACTOR, // E_NOTIMPL for VBI + KSPROPERTY_VPCONFIG_DDRAWHANDLE, + KSPROPERTY_VPCONFIG_VIDEOPORTID, + KSPROPERTY_VPCONFIG_DDRAWSURFACEHANDLE, + KSPROPERTY_VPCONFIG_SURFACEPARAMS +} KSPROPERTY_VPCONFIG; + +//========================= +// IBasicAudio +// +#define STATIC_CLSID_KsIBasicAudioInterfaceHandler\ + 0xb9f8ac3e, 0x0f71, 0x11d2, 0xb7, 0x2c, 0x00, 0xc0, 0x4f, 0xb6, 0xbd, 0x3d +DEFINE_GUIDSTRUCT("b9f8ac3e-0f71-11d2-b72c-00c04fb6bd3d", CLSID_KsIBasicAudioInterfaceHandler); +#define CLSID_KsIBasicAudioInterfaceHandler DEFINE_GUIDNAMED(CLSID_KsIBasicAudioInterfaceHandler) + + +#if defined(__IVPType__) + +typedef struct { + AMVPSIZE Size; + DWORD MaxPixelsPerSecond; + DWORD Reserved; +} KSVPMAXPIXELRATE, *PKSVPMAXPIXELRATE; + +typedef struct { + KSPROPERTY Property; + AMVPSIZE Size; +} KSVPSIZE_PROP, *PKSVPSIZE_PROP; + +typedef struct { + DWORD dwPitch; + DWORD dwXOrigin; + DWORD dwYOrigin; +} KSVPSURFACEPARAMS, *PKSVPSURFACEPARAMS; + +#else // !defined(__IVPType__) + +#if !defined(__DDRAW_INCLUDED__) + +//========================================================================== +// The following definitions must be in sync with DDraw.h in DirectX SDK +//========================================================================== + +/* + * The FourCC code is valid. + */ +#define DDPF_FOURCC 0x00000004l + + +typedef struct _DDPIXELFORMAT +{ + DWORD dwSize; // size of structure + DWORD dwFlags; // pixel format flags + DWORD dwFourCC; // (FOURCC code) + union + { + DWORD dwRGBBitCount; // how many bits per pixel (BD_1,2,4,8,16,24,32) + DWORD dwYUVBitCount; // how many bits per pixel (BD_4,8,16,24,32) + DWORD dwZBufferBitDepth; // how many bits for z buffers (BD_8,16,24,32) + DWORD dwAlphaBitDepth; // how many bits for alpha channels (BD_1,2,4,8) + }; + union + { + DWORD dwRBitMask; // mask for red bit + DWORD dwYBitMask; // mask for Y bits + }; + union + { + DWORD dwGBitMask; // mask for green bits + DWORD dwUBitMask; // mask for U bits + }; + union + { + DWORD dwBBitMask; // mask for blue bits + DWORD dwVBitMask; // mask for V bits + }; + union + { + DWORD dwRGBAlphaBitMask; // mask for alpha channel + DWORD dwYUVAlphaBitMask; // mask for alpha channel + DWORD dwRGBZBitMask; // mask for Z channel + DWORD dwYUVZBitMask; // mask for Z channel + }; +} DDPIXELFORMAT, * LPDDPIXELFORMAT; + +#endif // !defined(__DDRAW_INCLUDED__) + +//========================================================================== +// End of DDraw.h header info +//========================================================================== + +//========================================================================== +// The following definitions must be in sync with DVP.h in DirectX SDK +//========================================================================== + +#if !defined(__DVP_INCLUDED__) + +typedef struct _DDVIDEOPORTCONNECT { + DWORD dwSize; // size of the DDVIDEOPORTCONNECT structure + DWORD dwPortWidth; // Width of the video port + GUID guidTypeID; // Description of video port connection + DWORD dwFlags; // Connection flags + DWORD dwReserved1; // Reserved, set to zero. +} DDVIDEOPORTCONNECT, * LPDDVIDEOPORTCONNECT; + +#define DDVPTYPE_E_HREFH_VREFH \ + 0x54F39980L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 + +#define DDVPTYPE_E_HREFL_VREFL \ + 0xE09C77E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8 + +#endif // !defined(__DVP_INCLUDED__) + +//========================================================================== +// End of DVP.h header info +//========================================================================== + + +//========================================================================== +// The following definitions must be in sync with VPType.h in AM 2.0 SDK +//========================================================================== + +// pixel aspect ratios corresponding to a 720x480 NTSC image or a 720x576 image +typedef enum // AMPixAspectRatio +{ + KS_PixAspectRatio_NTSC4x3, + KS_PixAspectRatio_NTSC16x9, + KS_PixAspectRatio_PAL4x3, + KS_PixAspectRatio_PAL16x9, +} KS_AMPixAspectRatio ; + +typedef enum // AMVP_SELECTFORMATBY +{ + KS_AMVP_DO_NOT_CARE, + KS_AMVP_BEST_BANDWIDTH, + KS_AMVP_INPUT_SAME_AS_OUTPUT +} KS_AMVP_SELECTFORMATBY; + +typedef enum // AMVP_MODE +{ + KS_AMVP_MODE_WEAVE, + KS_AMVP_MODE_BOBINTERLEAVED, + KS_AMVP_MODE_BOBNONINTERLEAVED, + KS_AMVP_MODE_SKIPEVEN, + KS_AMVP_MODE_SKIPODD +} KS_AMVP_MODE ; + +typedef struct tagKS_AMVPDIMINFO // AMVPDIMINFO +{ + DWORD dwFieldWidth ; // [out] field width + DWORD dwFieldHeight ; // [out] field height + DWORD dwVBIWidth ; // [out] VBI data width + DWORD dwVBIHeight ; // [out] VBI data height + RECT rcValidRegion ; // [out] valid rect for data cropping +} KS_AMVPDIMINFO, *PKS_AMVPDIMINFO ; + +typedef struct tagKS_AMVPDATAINFO // AMVPDATAINFO +{ + DWORD dwSize; // Size of the struct + DWORD dwMicrosecondsPerField; // Time taken by each field + KS_AMVPDIMINFO amvpDimInfo; // Dimensional Information + DWORD dwPictAspectRatioX; // Pict aspect ratio in X dimn + DWORD dwPictAspectRatioY; // Pict aspect ratio in Y dimn + BOOL bEnableDoubleClock; // Videoport should enable double clocking + BOOL bEnableVACT; // Videoport should use an external VACT signal + BOOL bDataIsInterlaced; // Indicates that the signal is interlaced + LONG lHalfLinesOdd; // number of halflines in the odd field + BOOL bFieldPolarityInverted; // Device inverts the polarity by default + DWORD dwNumLinesInVREF; // Number of lines of data in VREF + LONG lHalfLinesEven; // number of halflines in the even field + DWORD dwReserved1; // Reserved for future use +} KS_AMVPDATAINFO, *PKS_AMVPDATAINFO; + +typedef struct tagKS_AMVPSIZE // AMVPSIZE +{ + DWORD dwWidth ; // [in] width in pixels + DWORD dwHeight ; // [in] height in pixels +} KS_AMVPSIZE, *PKS_AMVPSIZE ; + +//========================================================================== +// End of VPType.h header info +//========================================================================== + +typedef struct { + KS_AMVPSIZE Size; + DWORD MaxPixelsPerSecond; + DWORD Reserved; +} KSVPMAXPIXELRATE, *PKSVPMAXPIXELRATE; + +typedef struct { + KSPROPERTY Property; + KS_AMVPSIZE Size; +} KSVPSIZE_PROP, *PKSVPSIZE_PROP; + +typedef struct { + DWORD dwPitch; + DWORD dwXOrigin; + DWORD dwYOrigin; +} KSVPSURFACEPARAMS, *PKSVPSURFACEPARAMS; + +#endif // !defined(__IVPType__) + +// +// IVPNotify event notification +// +#define STATIC_KSEVENTSETID_VPNotify\ + 0x20c5598eL, 0xd3c8, 0x11d0, 0x8d, 0xfc, 0x00, 0xc0, 0x4f, 0xd7, 0xc0, 0x8b +DEFINE_GUIDSTRUCT("20c5598e-d3c8-11d0-8dfc-00c04fd7c08b", KSEVENTSETID_VPNotify); +#define KSEVENTSETID_VPNotify DEFINE_GUIDNAMED(KSEVENTSETID_VPNotify) + +typedef enum { + KSEVENT_VPNOTIFY_FORMATCHANGE, +} KSEVENT_VPNOTIFY; + +// +// VIDCAPTOSTI event notification +// +#define STATIC_KSEVENTSETID_VIDCAPTOSTI\ + 0xdb47de20, 0xf628, 0x11d1, 0xba, 0x41, 0x0, 0xa0, 0xc9, 0xd, 0x2b, 0x5 +DEFINE_GUIDSTRUCT("DB47DE20-F628-11d1-BA41-00A0C90D2B05", KSEVENTSETID_VIDCAPTOSTI); +#define KSEVENTSETID_VIDCAPNotify DEFINE_GUIDNAMED(KSEVENTSETID_VIDCAPTOSTI) + +typedef enum { + KSEVENT_VIDCAPTOSTI_EXT_TRIGGER, +} KSEVENT_VIDCAPTOSTI; + + +// +// IVPVBINotify event notification +// +#define STATIC_KSEVENTSETID_VPVBINotify\ + 0xec529b01L, 0x1a1f, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a +DEFINE_GUIDSTRUCT("ec529b01-1a1f-11d1-bad9-00609744111a", KSEVENTSETID_VPVBINotify); +#define KSEVENTSETID_VPVBINotify DEFINE_GUIDNAMED(KSEVENTSETID_VPVBINotify) + +typedef enum { + KSEVENT_VPVBINOTIFY_FORMATCHANGE, +} KSEVENT_VPVBINOTIFY; + + +// +// closed caption information +// + +#define STATIC_KSDATAFORMAT_TYPE_AUXLine21Data \ +0x670aea80L, 0x3a82, 0x11d0, 0xb7, 0x9b, 0x00, 0xaa, 0x00, 0x37, 0x67, 0xa7 +DEFINE_GUIDSTRUCT("670aea80-3a82-11d0-b79b-00aa003767a7", KSDATAFORMAT_TYPE_AUXLine21Data); +#define KSDATAFORMAT_TYPE_AUXLine21Data DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_AUXLine21Data) + +#define STATIC_KSDATAFORMAT_SUBTYPE_Line21_BytePair \ +0x6e8d4a22L, 0x310c, 0x11d0, 0xb7, 0x9a, 0x00, 0xaa, 0x00, 0x37, 0x67, 0xa7 +DEFINE_GUIDSTRUCT("6e8d4a22-310c-11d0-b79a-00aa003767a7", KSDATAFORMAT_SUBTYPE_Line21_BytePair); +#define KSDATAFORMAT_SUBTYPE_Line21_BytePair DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_Line21_BytePair) + +#define STATIC_KSDATAFORMAT_SUBTYPE_Line21_GOPPacket \ +0x6e8d4a23L, 0x310c, 0x11d0, 0xb7, 0x9a, 0x00, 0xaa, 0x00, 0x37, 0x67, 0xa7 +DEFINE_GUIDSTRUCT("6e8d4a23-310c-11d0-b79a-00aa003767a7", KSDATAFORMAT_SUBTYPE_Line21_GOPPacket); +#define KSDATAFORMAT_SUBTYPE_Line21_GOPPacket DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_Line21_GOPPacket) + +typedef struct _KSGOP_USERDATA { + ULONG sc; + ULONG reserved1; + BYTE cFields; + CHAR l21Data[3]; +} KSGOP_USERDATA, *PKSGOP_USERDATA; + +// +// DVD encrypted PACK format type definition +// + +#define STATIC_KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK\ + 0xed0b916a, 0x044d, 0x11d1, 0xaa, 0x78, 0x00, 0xc0, 0x4f, 0xc3, 0x1d, 0x60 +DEFINE_GUIDSTRUCT("ed0b916a-044d-11d1-aa78-00c04fc31d60", KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK); +#define KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK DEFINE_GUIDNAMED(KSDATAFORMAT_TYPE_DVD_ENCRYPTED_PACK) + +#define KS_AM_UseNewCSSKey 0x1 + + +// ----------------------------------------------------------------------- +// KS_AM_KSPROPSETID_TSRateChange property set definitions for time stamp +// rate changes. +// ----------------------------------------------------------------------- + + +#define STATIC_KSPROPSETID_TSRateChange\ + 0xa503c5c0, 0x1d1d, 0x11d1, 0xad, 0x80, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0 + +DEFINE_GUIDSTRUCT("A503C5C0-1D1D-11D1-AD80-444553540000", KSPROPSETID_TSRateChange); +#define KSPROPSETID_TSRateChange DEFINE_GUIDNAMED(KSPROPSETID_TSRateChange) +typedef enum { + KS_AM_RATE_SimpleRateChange=1, // rw, use KS_AM_SimpleRateChange + KS_AM_RATE_ExactRateChange=2, // rw, use KS_AM_ExactRateChange + KS_AM_RATE_MaxFullDataRate=3, // r, use KS_AM_MaxFullDataRate + KS_AM_RATE_Step=4 // w, use KS_AM_Step +} KS_AM_PROPERTY_TS_RATE_CHANGE; + +typedef struct { + // this is the simplest mechanism to set a time stamp rate change on + // a filter (simplest for the person setting the rate change, harder + // for the filter doing the rate change). + REFERENCE_TIME StartTime; //stream time at which to start this rate + LONG Rate; //new rate * 10000 (decimal) +} KS_AM_SimpleRateChange, *PKS_AM_SimpleRateChange; + +typedef struct { + REFERENCE_TIME OutputZeroTime; //input TS that maps to zero output TS + LONG Rate; //new rate * 10000 (decimal) +} KS_AM_ExactRateChange, *PKS_AM_ExactRateChange; + +typedef LONG KS_AM_MaxFullDataRate; //rate * 10000 (decimal) + +typedef DWORD KS_AM_Step; // number of frame to step + + +#endif // !defined(_KSMEDIA_) diff --git a/windows_libs/mssdk/include/ksproxy.h b/windows_libs/mssdk/include/ksproxy.h new file mode 100644 index 00000000..b90ea285 --- /dev/null +++ b/windows_libs/mssdk/include/ksproxy.h @@ -0,0 +1,845 @@ +/*++ + +Copyright (C) Microsoft Corporation, 1996 - 1999 + +Module Name: + + ksproxy.h + +Abstract: + + Interface definitions for WDM-CSA proxy filters. + +--*/ + +#ifndef __KSPROXY__ +#define __KSPROXY__ + +#ifdef __cplusplus +extern "C" { +#endif + +#undef KSDDKAPI +#ifdef _KSDDK_ +#define KSDDKAPI +#else // !_KSDDK_ +#define KSDDKAPI DECLSPEC_IMPORT +#endif // _KSDDK_ + +#define STATIC_IID_IKsObject\ + 0x423c13a2L, 0x2070, 0x11d0, 0x9e, 0xf7, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1 + +#define STATIC_IID_IKsPinEx\ + 0x7bb38260L, 0xd19c, 0x11d2, 0xb3, 0x8a, 0x00, 0xa0, 0xc9, 0x5e, 0xc2, 0x2e + +#define STATIC_IID_IKsPin\ + 0xb61178d1L, 0xa2d9, 0x11cf, 0x9e, 0x53, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1 + +#define STATIC_IID_IKsPinPipe\ + 0xe539cd90L, 0xa8b4, 0x11d1, 0x81, 0x89, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02 + +#define STATIC_IID_IKsDataTypeHandler\ + 0x5ffbaa02L, 0x49a3, 0x11d0, 0x9f, 0x36, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1 + +#define STATIC_IID_IKsDataTypeCompletion\ + 0x827D1A0EL, 0x0F73, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 + +#define STATIC_IID_IKsInterfaceHandler\ + 0xD3ABC7E0L, 0x9A61, 0x11D0, 0xA4, 0x0D, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 + +#define STATIC_IID_IKsClockPropertySet\ + 0x5C5CBD84L, 0xE755, 0x11D0, 0xAC, 0x18, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 + +#define STATIC_IID_IKsAllocator\ + 0x8da64899L, 0xc0d9, 0x11d0, 0x84, 0x13, 0x00, 0x00, 0xf8, 0x22, 0xfe, 0x8a + +#define STATIC_IID_IKsAllocatorEx\ + 0x091bb63aL, 0x603f, 0x11d1, 0xb0, 0x67, 0x00, 0xa0, 0xc9, 0x06, 0x28, 0x02 + + +#ifndef STATIC_IID_IKsPropertySet +#define STATIC_IID_IKsPropertySet\ + 0x31EFAC30L, 0x515C, 0x11d0, 0xA9, 0xAA, 0x00, 0xAA, 0x00, 0x61, 0xBE, 0x93 +#endif // STATIC_IID_IKsPropertySet + +#define STATIC_IID_IKsTopology\ + 0x28F54683L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 + +#ifndef STATIC_IID_IKsControl +#define STATIC_IID_IKsControl\ + 0x28F54685L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 +#endif // STATIC_IID_IKsControl + +#define STATIC_IID_IKsAggregateControl\ + 0x7F40EAC0L, 0x3947, 0x11D2, 0x87, 0x4E, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 + +#define STATIC_CLSID_Proxy \ + 0x17CCA71BL, 0xECD7, 0x11D0, 0xB9, 0x08, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96 + +#ifdef _KS_ + +#if !defined(__cplusplus) || _MSC_VER < 1100 +DEFINE_GUIDEX(IID_IKsObject); + +DEFINE_GUIDEX(IID_IKsPin); + +DEFINE_GUIDEX(IID_IKsPinEx); + +DEFINE_GUIDEX(IID_IKsPinPipe); + +DEFINE_GUIDEX(IID_IKsDataTypeHandler); + +DEFINE_GUIDEX(IID_IKsDataTypeCompletion); + +DEFINE_GUIDEX(IID_IKsInterfaceHandler); + +DEFINE_GUIDEX(IID_IKsClockPropertySet); + +DEFINE_GUIDEX(IID_IKsAllocator); + +DEFINE_GUIDEX(IID_IKsAllocatorEx); + +#define IID_IKsQualityForwarder KSCATEGORY_QUALITY +#endif // !defined(__cplusplus) || _MSC_VER < 1100 + +#define STATIC_IID_IKsQualityForwarder STATIC_KSCATEGORY_QUALITY + +typedef enum { + KsAllocatorMode_User, + KsAllocatorMode_Kernel +} KSALLOCATORMODE; + + +typedef enum { + FramingProp_Uninitialized, + FramingProp_None, + FramingProp_Old, + FramingProp_Ex +} FRAMING_PROP; + +typedef FRAMING_PROP *PFRAMING_PROP; + + +typedef enum { + Framing_Cache_Update, // request to bypass cache when read/write + Framing_Cache_ReadLast, + Framing_Cache_ReadOrig, + Framing_Cache_Write +} FRAMING_CACHE_OPS; + + +typedef struct { + LONGLONG MinTotalNominator; + LONGLONG MaxTotalNominator; + LONGLONG TotalDenominator; +} OPTIMAL_WEIGHT_TOTALS; + +// forward declaration +typedef struct IPin IPin; +typedef struct IKsPin IKsPin; +typedef struct IKsAllocator IKsAllocator; +typedef struct IKsAllocatorEx IKsAllocatorEx; + + +// +// allocators strategy is defined by graph manager +// +#define AllocatorStrategy_DontCare 0 + +// +// what to optimize +// +#define AllocatorStrategy_MinimizeNumberOfFrames 0x00000001 +#define AllocatorStrategy_MinimizeFrameSize 0x00000002 +#define AllocatorStrategy_MinimizeNumberOfAllocators 0x00000004 +#define AllocatorStrategy_MaximizeSpeed 0x00000008 + +// +// factors (flags) defining the Pipes properties +// +#define PipeFactor_None 0 +#define PipeFactor_UserModeUpstream 0x00000001 +#define PipeFactor_UserModeDownstream 0x00000002 +#define PipeFactor_MemoryTypes 0x00000004 +#define PipeFactor_Flags 0x00000008 +#define PipeFactor_PhysicalRanges 0x00000010 +#define PipeFactor_OptimalRanges 0x00000020 +#define PipeFactor_FixedCompression 0x00000040 +#define PipeFactor_UnknownCompression 0x00000080 + +#define PipeFactor_Buffers 0x00000100 +#define PipeFactor_Align 0x00000200 + +#define PipeFactor_PhysicalEnd 0x00000400 +#define PipeFactor_LogicalEnd 0x00000800 + + + +typedef enum { + PipeState_DontCare, + PipeState_RangeNotFixed, + PipeState_RangeFixed, + PipeState_CompressionUnknown, + PipeState_Finalized +} PIPE_STATE; + + +// +// pipe dimensions relative to BeginPin. +// + +typedef struct _PIPE_DIMENSIONS { + KS_COMPRESSION AllocatorPin; + KS_COMPRESSION MaxExpansionPin; + KS_COMPRESSION EndPin; +} PIPE_DIMENSIONS, *PPIPE_DIMENSIONS; + + +typedef enum { + Pipe_Allocator_None, + Pipe_Allocator_FirstPin, + Pipe_Allocator_LastPin, + Pipe_Allocator_MiddlePin +} PIPE_ALLOCATOR_PLACE; + +typedef PIPE_ALLOCATOR_PLACE *PPIPE_ALLOCATOR_PLACE; + + +typedef enum { + KS_MemoryTypeDontCare = 0, + KS_MemoryTypeKernelPaged, + KS_MemoryTypeKernelNonPaged, + KS_MemoryTypeDeviceHostMapped, + KS_MemoryTypeDeviceSpecific, + KS_MemoryTypeUser, + KS_MemoryTypeAnyHost +} KS_LogicalMemoryType; + +typedef KS_LogicalMemoryType *PKS_LogicalMemoryType; + + + +typedef struct _PIPE_TERMINATION { + ULONG Flags; + ULONG OutsideFactors; + ULONG Weigth; // outside weight + KS_FRAMING_RANGE PhysicalRange; + KS_FRAMING_RANGE_WEIGHTED OptimalRange; + KS_COMPRESSION Compression; // relative to the connected pin on a neighboring filter. +} PIPE_TERMINATION; + + +// +// extended allocator properties +// +typedef struct _ALLOCATOR_PROPERTIES_EX + { + long cBuffers; + long cbBuffer; + long cbAlign; + long cbPrefix; +// new part + GUID MemoryType; + GUID BusType; // one of the buses this pipe is using + PIPE_STATE State; + PIPE_TERMINATION Input; + PIPE_TERMINATION Output; + ULONG Strategy; + ULONG Flags; + ULONG Weight; + KS_LogicalMemoryType LogicalMemoryType; + PIPE_ALLOCATOR_PLACE AllocatorPlace; + PIPE_DIMENSIONS Dimensions; + KS_FRAMING_RANGE PhysicalRange; // on allocator pin + IKsAllocatorEx* PrevSegment; // doubly-linked list of KS allocators + ULONG CountNextSegments; // possible multiple dependent pipes + IKsAllocatorEx** NextSegments; + ULONG InsideFactors; // existing factors (different from "don't care") + ULONG NumberPins; +} ALLOCATOR_PROPERTIES_EX; + +typedef ALLOCATOR_PROPERTIES_EX *PALLOCATOR_PROPERTIES_EX; + + +#ifdef __STREAMS__ + +struct DECLSPEC_UUID("5C5CBD84-E755-11D0-AC18-00A0C9223196") IKsClockPropertySet; +#undef INTERFACE +#define INTERFACE IKsClockPropertySet +DECLARE_INTERFACE_(IKsClockPropertySet, IUnknown) +{ + STDMETHOD(KsGetTime)( + THIS_ + LONGLONG* Time + ) PURE; + STDMETHOD(KsSetTime)( + THIS_ + LONGLONG Time + ) PURE; + STDMETHOD(KsGetPhysicalTime)( + THIS_ + LONGLONG* Time + ) PURE; + STDMETHOD(KsSetPhysicalTime)( + THIS_ + LONGLONG Time + ) PURE; + STDMETHOD(KsGetCorrelatedTime)( + THIS_ + KSCORRELATED_TIME* CorrelatedTime + ) PURE; + STDMETHOD(KsSetCorrelatedTime)( + THIS_ + KSCORRELATED_TIME* CorrelatedTime + ) PURE; + STDMETHOD(KsGetCorrelatedPhysicalTime)( + THIS_ + KSCORRELATED_TIME* CorrelatedTime + ) PURE; + STDMETHOD(KsSetCorrelatedPhysicalTime)( + THIS_ + KSCORRELATED_TIME* CorrelatedTime + ) PURE; + STDMETHOD(KsGetResolution)( + THIS_ + KSRESOLUTION* Resolution + ) PURE; + STDMETHOD(KsGetState)( + THIS_ + KSSTATE* State + ) PURE; +}; + + +interface DECLSPEC_UUID("8da64899-c0d9-11d0-8413-0000f822fe8a") IKsAllocator; +#undef INTERFACE +#define INTERFACE IKsAllocator +DECLARE_INTERFACE_(IKsAllocator, IUnknown) +{ + STDMETHOD_(HANDLE, KsGetAllocatorHandle)( + THIS + ) PURE; + STDMETHOD_(KSALLOCATORMODE, KsGetAllocatorMode)( + THIS + ) PURE; + STDMETHOD(KsGetAllocatorStatus)( + THIS_ + PKSSTREAMALLOCATOR_STATUS AllocatorStatus + ) PURE; + STDMETHOD_(VOID, KsSetAllocatorMode)( + THIS_ + KSALLOCATORMODE Mode + ) PURE; +}; + +interface DECLSPEC_UUID("091bb63a-603f-11d1-b067-00a0c9062802") IKsAllocatorEx; +#undef INTERFACE +#define INTERFACE IKsAllocatorEx +DECLARE_INTERFACE_(IKsAllocatorEx, IKsAllocator) +{ + STDMETHOD_(PALLOCATOR_PROPERTIES_EX, KsGetProperties)( + THIS + ) PURE; + STDMETHOD_(VOID, KsSetProperties)( + THIS_ + PALLOCATOR_PROPERTIES_EX + ) PURE; + STDMETHOD_(VOID, KsSetAllocatorHandle)( + THIS_ + HANDLE AllocatorHandle + ) PURE; + STDMETHOD_(HANDLE, KsCreateAllocatorAndGetHandle)( + THIS_ + IKsPin* KsPin + ) PURE; +}; + +typedef enum { + KsPeekOperation_PeekOnly, + KsPeekOperation_AddRef +} KSPEEKOPERATION; + +typedef struct _KSSTREAM_SEGMENT *PKSSTREAM_SEGMENT; + +interface DECLSPEC_UUID("b61178d1-a2d9-11cf-9e53-00aa00a216a1") IKsPin; + +#undef INTERFACE +#define INTERFACE IKsPin +DECLARE_INTERFACE_(IKsPin, IUnknown) +{ + STDMETHOD(KsQueryMediums)( + THIS_ + PKSMULTIPLE_ITEM* MediumList + ) PURE; + STDMETHOD(KsQueryInterfaces)( + THIS_ + PKSMULTIPLE_ITEM* InterfaceList + ) PURE; + STDMETHOD(KsCreateSinkPinHandle)( + THIS_ + KSPIN_INTERFACE& Interface, + KSPIN_MEDIUM& Medium + ) PURE; + STDMETHOD(KsGetCurrentCommunication)( + THIS_ + KSPIN_COMMUNICATION *Communication, + KSPIN_INTERFACE *Interface, + KSPIN_MEDIUM *Medium + ) PURE; + STDMETHOD(KsPropagateAcquire)( + THIS + ) PURE; + STDMETHOD(KsDeliver)( + THIS_ + IMediaSample* Sample, + ULONG Flags + ) PURE; + STDMETHOD(KsMediaSamplesCompleted)( + THIS_ + PKSSTREAM_SEGMENT StreamSegment + ) PURE; + STDMETHOD_(IMemAllocator *, KsPeekAllocator)( + THIS_ + KSPEEKOPERATION Operation + ) PURE; + STDMETHOD(KsReceiveAllocator)( + THIS_ + IMemAllocator *MemAllocator + ) PURE; + STDMETHOD(KsRenegotiateAllocator)( + THIS + ) PURE; + STDMETHOD_(LONG, KsIncrementPendingIoCount)( + THIS + ) PURE; + STDMETHOD_(LONG, KsDecrementPendingIoCount)( + THIS + ) PURE; + STDMETHOD(KsQualityNotify)( + THIS_ + ULONG Proportion, + REFERENCE_TIME TimeDelta + ) PURE; +}; + +interface DECLSPEC_UUID("7bb38260-d19c-11d2-b38a-00a0c95ec22e") IKsPinEx; +#undef INTERFACE +#define INTERFACE IKsPinEx +DECLARE_INTERFACE_(IKsPinEx, IKsPin) +{ + STDMETHOD_(VOID, KsNotifyError)( + THIS_ + IMediaSample* Sample, + HRESULT hr + ) PURE; +}; + +interface DECLSPEC_UUID("e539cd90-a8b4-11d1-8189-00a0c9062802") IKsPinPipe; +#undef INTERFACE +#define INTERFACE IKsPinPipe +DECLARE_INTERFACE_(IKsPinPipe, IUnknown) +{ + STDMETHOD(KsGetPinFramingCache)( + THIS_ + PKSALLOCATOR_FRAMING_EX *FramingEx, + PFRAMING_PROP FramingProp, + FRAMING_CACHE_OPS Option + ) PURE; + STDMETHOD(KsSetPinFramingCache)( + THIS_ + PKSALLOCATOR_FRAMING_EX FramingEx, + PFRAMING_PROP FramingProp, + FRAMING_CACHE_OPS Option + ) PURE; + STDMETHOD_(IPin*, KsGetConnectedPin)( + THIS + ) PURE; + STDMETHOD_(IKsAllocatorEx*, KsGetPipe)( + THIS_ + KSPEEKOPERATION Operation + ) PURE; + STDMETHOD(KsSetPipe)( + THIS_ + IKsAllocatorEx *KsAllocator + ) PURE; + STDMETHOD_(ULONG, KsGetPipeAllocatorFlag)( + THIS + ) PURE; + STDMETHOD(KsSetPipeAllocatorFlag)( + THIS_ + ULONG Flag + ) PURE; + STDMETHOD_(GUID, KsGetPinBusCache)( + THIS + ) PURE; + STDMETHOD(KsSetPinBusCache)( + THIS_ + GUID Bus + ) PURE; +// +// very useful methods for tracing. +// + STDMETHOD_(PWCHAR, KsGetPinName)( + THIS + ) PURE; + STDMETHOD_(PWCHAR, KsGetFilterName)( + THIS + ) PURE; +}; + + +interface DECLSPEC_UUID("CD5EBE6B-8B6E-11D1-8AE0-00A0C9223196") IKsPinFactory; +#undef INTERFACE +#define INTERFACE IKsPinFactory +DECLARE_INTERFACE_(IKsPinFactory, IUnknown) +{ + STDMETHOD(KsPinFactory)( + THIS_ + ULONG* PinFactory + ) PURE; +}; + +typedef enum { + KsIoOperation_Write, + KsIoOperation_Read +} KSIOOPERATION; + +interface DECLSPEC_UUID("5ffbaa02-49a3-11d0-9f36-00aa00a216a1") IKsDataTypeHandler; +#undef INTERFACE +#define INTERFACE IKsDataTypeHandler +DECLARE_INTERFACE_(IKsDataTypeHandler, IUnknown) +{ + STDMETHOD(KsCompleteIoOperation)( + THIS_ + IMediaSample *Sample, + PVOID StreamHeader, + KSIOOPERATION IoOperation, + BOOL Cancelled + ) PURE; + STDMETHOD(KsIsMediaTypeInRanges)( + THIS_ + PVOID DataRanges + ) PURE; + STDMETHOD(KsPrepareIoOperation)( + THIS_ + IMediaSample *Sample, + PVOID StreamHeader, + KSIOOPERATION IoOperation + ) PURE; + STDMETHOD(KsQueryExtendedSize)( + THIS_ + ULONG* ExtendedSize + ) PURE; + STDMETHOD(KsSetMediaType)( + THIS_ + const AM_MEDIA_TYPE* AmMediaType + ) PURE; +}; + +interface DECLSPEC_UUID("827D1A0E-0F73-11D2-B27A-00A0C9223196") IKsDataTypeCompletion; +#undef INTERFACE +#define INTERFACE IKsDataTypeCompletion +DECLARE_INTERFACE_(IKsDataTypeCompletion, IUnknown) +{ + STDMETHOD(KsCompleteMediaType)( + THIS_ + HANDLE FilterHandle, + ULONG PinFactoryId, + AM_MEDIA_TYPE* AmMediaType + ) PURE; +}; + +interface DECLSPEC_UUID("D3ABC7E0-9A61-11d0-A40D-00A0C9223196") IKsInterfaceHandler; +#undef INTERFACE +#define INTERFACE IKsInterfaceHandler +DECLARE_INTERFACE_(IKsInterfaceHandler, IUnknown) +{ + STDMETHOD(KsSetPin)( + THIS_ + IKsPin *KsPin + ) PURE; + STDMETHOD(KsProcessMediaSamples)( + THIS_ + IKsDataTypeHandler *KsDataTypeHandler, + IMediaSample** SampleList, + PLONG SampleCount, + KSIOOPERATION IoOperation, + PKSSTREAM_SEGMENT *StreamSegment + ) PURE; + STDMETHOD(KsCompleteIo)( + THIS_ + PKSSTREAM_SEGMENT StreamSegment + ) PURE; +}; + + +// +// This structure definition is the common header required by the proxy to +// dispatch the stream segment to the interface handler. Interface handlers +// will create extended structures to include other information such as +// media samples, extended header size and so on. +// + +typedef struct _KSSTREAM_SEGMENT { + IKsInterfaceHandler *KsInterfaceHandler; + IKsDataTypeHandler *KsDataTypeHandler; + KSIOOPERATION IoOperation; + HANDLE CompletionEvent; + +} KSSTREAM_SEGMENT; + +interface DECLSPEC_UUID("423c13a2-2070-11d0-9ef7-00aa00a216a1") IKsObject; +#undef INTERFACE +#define INTERFACE IKsObject +DECLARE_INTERFACE_(IKsObject, IUnknown) +{ + STDMETHOD_(HANDLE, KsGetObjectHandle)( + THIS + ) PURE; +}; + +interface DECLSPEC_UUID("97ebaacb-95bd-11d0-a3ea-00a0c9223196") IKsQualityForwarder; +#undef INTERFACE +#define INTERFACE IKsQualityForwarder +DECLARE_INTERFACE_(IKsQualityForwarder, IKsObject) +{ + STDMETHOD_(VOID, KsFlushClient)( + THIS_ + IKsPin* Pin + ) PURE; +}; + +KSDDKAPI +HRESULT +WINAPI +KsResolveRequiredAttributes( + PKSDATARANGE DataRange, + PKSMULTIPLE_ITEM Attributes OPTIONAL + ); + +KSDDKAPI +HRESULT +WINAPI +KsOpenDefaultDevice( + REFGUID Category, + ACCESS_MASK Access, + PHANDLE DeviceHandle + ); +KSDDKAPI +HRESULT +WINAPI +KsSynchronousDeviceControl( + HANDLE Handle, + ULONG IoControl, + PVOID InBuffer, + ULONG InLength, + PVOID OutBuffer, + ULONG OutLength, + PULONG BytesReturned + ); +KSDDKAPI +HRESULT +WINAPI +KsGetMultiplePinFactoryItems( + HANDLE FilterHandle, + ULONG PinFactoryId, + ULONG PropertyId, + PVOID* Items + ); +KSDDKAPI +HRESULT +WINAPI +KsGetMediaTypeCount( + HANDLE FilterHandle, + ULONG PinFactoryId, + ULONG* MediaTypeCount + ); +KSDDKAPI +HRESULT +WINAPI +KsGetMediaType( + int Position, + AM_MEDIA_TYPE* AmMediaType, + HANDLE FilterHandle, + ULONG PinFactoryId + ); + +#endif // __STREAMS__ + +#ifndef _IKsPropertySet_ +#if !defined(__cplusplus) || _MSC_VER < 1100 +DEFINE_GUIDEX(IID_IKsPropertySet); +#endif // !defined(__cplusplus) || _MSC_VER < 1100 +#endif // _IKsPropertySet_ + +#ifndef _IKsControl_ +#if !defined(__cplusplus) || _MSC_VER < 1100 +DEFINE_GUIDEX(IID_IKsControl); +#endif // !defined(__cplusplus) || _MSC_VER < 1100 +#endif // _IKsControl_ + +#if !defined(__cplusplus) || _MSC_VER < 1100 +DEFINE_GUIDEX(IID_IKsAggregateControl); +#endif // !defined(__cplusplus) || _MSC_VER < 1100 + +#ifndef _IKsTopology_ +#if !defined(__cplusplus) || _MSC_VER < 1100 +DEFINE_GUIDEX(IID_IKsTopology); +#endif // !defined(__cplusplus) || _MSC_VER < 1100 +#endif // _IKsTopology_ + +DEFINE_GUIDSTRUCT("17CCA71B-ECD7-11D0-B908-00A0C9223196", CLSID_Proxy); +#define CLSID_Proxy DEFINE_GUIDNAMED(CLSID_Proxy) + +#else // !_KS_ + +#ifndef _IKsPropertySet_ +#if !defined(__cplusplus) || _MSC_VER < 1100 +DEFINE_GUID(IID_IKsPropertySet, STATIC_IID_IKsPropertySet); +#endif // !defined(__cplusplus) || _MSC_VER < 1100 +#endif // _IKsPropertySet_ + +#if !defined(__cplusplus) || _MSC_VER < 1100 +DEFINE_GUID(CLSID_Proxy, STATIC_CLSID_Proxy); +#else // defined(__cplusplus) && _MSC_VER >= 1100 +DECLSPEC_UUID("17CCA71B-ECD7-11D0-B908-00A0C9223196") CLSID_Proxy; +#endif // defined(__cplusplus) && _MSC_VER >= 1100 + +#endif // !_KS_ + +#ifndef _IKsPropertySet_ +#define _IKsPropertySet_ + +#define KSPROPERTY_SUPPORT_GET 1 +#define KSPROPERTY_SUPPORT_SET 2 + +#ifdef DECLARE_INTERFACE_ + +interface DECLSPEC_UUID("31EFAC30-515C-11d0-A9AA-00aa0061be93") IKsPropertySet; +#undef INTERFACE +#define INTERFACE IKsPropertySet +DECLARE_INTERFACE_(IKsPropertySet, IUnknown) +{ + STDMETHOD(Set)( + THIS_ + IN REFGUID PropSet, + IN ULONG Id, + IN LPVOID InstanceData, + IN ULONG InstanceLength, + IN LPVOID PropertyData, + IN ULONG DataLength + ) PURE; + + STDMETHOD(Get)( + THIS_ + IN REFGUID PropSet, + IN ULONG Id, + IN LPVOID InstanceData, + IN ULONG InstanceLength, + OUT LPVOID PropertyData, + IN ULONG DataLength, + OUT ULONG* BytesReturned + ) PURE; + + STDMETHOD(QuerySupported)( + THIS_ + IN REFGUID PropSet, + IN ULONG Id, + OUT ULONG* TypeSupport + ) PURE; +}; + +#endif // DECLARE_INTERFACE_ + +#endif // _IKsPropertySet_ + +#ifndef _IKsControl_ +#define _IKsControl_ + +#ifdef DECLARE_INTERFACE_ + +interface DECLSPEC_UUID("28F54685-06FD-11D2-B27A-00A0C9223196") IKsControl; +#undef INTERFACE +#define INTERFACE IKsControl +DECLARE_INTERFACE_(IKsControl, IUnknown) +{ + STDMETHOD(KsProperty)( + THIS_ + IN PKSPROPERTY Property, + IN ULONG PropertyLength, + IN OUT LPVOID PropertyData, + IN ULONG DataLength, + OUT ULONG* BytesReturned + ) PURE; + STDMETHOD(KsMethod)( + THIS_ + IN PKSMETHOD Method, + IN ULONG MethodLength, + IN OUT LPVOID MethodData, + IN ULONG DataLength, + OUT ULONG* BytesReturned + ) PURE; + STDMETHOD(KsEvent)( + THIS_ + IN PKSEVENT Event OPTIONAL, + IN ULONG EventLength, + IN OUT LPVOID EventData, + IN ULONG DataLength, + OUT ULONG* BytesReturned + ) PURE; +}; + +#endif // DECLARE_INTERFACE_ + +#endif // _IKsControl_ + + +#ifdef DECLARE_INTERFACE_ + +interface DECLSPEC_UUID("7F40EAC0-3947-11D2-874E-00A0C9223196") IKsAggregateControl; +#undef INTERFACE +#define INTERFACE IKsAggregateControl +DECLARE_INTERFACE_(IKsAggregateControl, IUnknown) +{ + STDMETHOD(KsAddAggregate)( + THIS_ + IN REFGUID AggregateClass + ) PURE; + STDMETHOD(KsRemoveAggregate)( + THIS_ + IN REFGUID AggregateClass + ) PURE; +}; + +#endif // DECLARE_INTERFACE_ + +#ifndef _IKsTopology_ +#define _IKsTopology_ + +#ifdef DECLARE_INTERFACE_ + +interface DECLSPEC_UUID("28F54683-06FD-11D2-B27A-00A0C9223196") IKsTopology; +#undef INTERFACE +#define INTERFACE IKsTopology +DECLARE_INTERFACE_(IKsTopology, IUnknown) +{ + STDMETHOD(CreateNodeInstance)( + THIS_ + IN ULONG NodeId, + IN ULONG Flags, + IN ACCESS_MASK DesiredAccess, + IN IUnknown* UnkOuter OPTIONAL, + IN REFGUID InterfaceId, + OUT LPVOID* Interface + ) PURE; +}; + +#endif // DECLARE_INTERFACE_ + +#endif // _IKsTopology_ + +#ifdef __cplusplus +} +#endif // __cplusplus + +#endif // __KSPROXY__ diff --git a/windows_libs/mssdk/include/ksuuids.h b/windows_libs/mssdk/include/ksuuids.h new file mode 100644 index 00000000..f7d68ae4 --- /dev/null +++ b/windows_libs/mssdk/include/ksuuids.h @@ -0,0 +1,224 @@ +//------------------------------------------------------------------------------ +// File: ksuuids.h +// +// Desc: Contains the GUIDs for the MediaType type, subtype fields and format +// types for DVD/MPEG2 media types. +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +// +// --- MPEG 2 definitions --- +// + +// 36523B13-8EE5-11d1-8CA3-0060B057664A +OUR_GUID_ENTRY(MEDIATYPE_MPEG2_PACK, +0x36523B13, 0x8EE5, 0x11d1, 0x8C, 0xA3, 0x00, 0x60, 0xB0, 0x57, 0x66, 0x4A) + +// e06d8020-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(MEDIATYPE_MPEG2_PES, +0xe06d8020, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea) + + +#if 0 +DEFINE_GUID(MEDIATYPE_CONTROL, +0xe06d8021, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea); +#endif // #if 0 + + +// e06d8026-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_VIDEO, +0xe06d8026, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea) + +// use MPEG2VIDEOINFO (defined below) with FORMAT_MPEG2_VIDEO +// e06d80e3-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(FORMAT_MPEG2_VIDEO, +0xe06d80e3, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x5f, 0x6c, 0xbb, 0xea) + +// F72A76A0-EB0A-11d0-ACE4-0000C0CC16BA (FORMAT_VideoInfo2) +OUR_GUID_ENTRY(FORMAT_VIDEOINFO2, +0xf72a76A0L, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x0, 0x0, 0xc0, 0xcc, 0x16, 0xba) + +// MPEG2 Other subtypes +// e06d8022-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_PROGRAM, +0xe06d8022, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea) + +// e06d8023-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_TRANSPORT, +0xe06d8023, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea) + +// e06d802b-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG2_AUDIO, +0xe06d802b, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea) + +// e06d802c-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(MEDIASUBTYPE_DOLBY_AC3, +0xe06d802c, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea) + +// e06d802d-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_SUBPICTURE, +0xe06d802d, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea) + +// e06d8032-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_LPCM_AUDIO, +0xe06d8032, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea) + +// e06d8033-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(MEDIASUBTYPE_DTS, +0xe06d8033, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea) + +// e06d8034-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(MEDIASUBTYPE_SDDS, +0xe06d8034, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea) + +// DVD-related mediatypes +// ED0B916A-044D-11d1-AA78-00C04FC31D60 +OUR_GUID_ENTRY(MEDIATYPE_DVD_ENCRYPTED_PACK, +0xed0b916a, 0x044d, 0x11d1, 0xaa, 0x78, 0x00, 0xc0, 0x04f, 0xc3, 0x1d, 0x60) + +// e06d802e-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(MEDIATYPE_DVD_NAVIGATION, +0xe06d802e, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea) + +// e06d802f-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_PCI, +0xe06d802f, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea) + +// e06d8030-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_DSI, +0xe06d8030, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea) + +// e06d8031-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(MEDIASUBTYPE_DVD_NAVIGATION_PROVIDER, +0xe06d8031, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea) + +// +// DVD - MPEG2/AC3-related Formats +// +// e06d80e3-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(FORMAT_MPEG2Video, +0xe06d80e3, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea) + +// e06d80e4-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(FORMAT_DolbyAC3, +0xe06d80e4, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea) + +// e06d80e5-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(FORMAT_MPEG2Audio, +0xe06d80e5, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea) + +// e06d80e6-db46-11cf-b4d1-00805f6cbbea +OUR_GUID_ENTRY(FORMAT_DVD_LPCMAudio, +0xe06d80e6, 0xdb46, 0x11cf, 0xb4, 0xd1, 0x00, 0x80, 0x05f, 0x6c, 0xbb, 0xea) + + +// +// KS Property Set Id (to communicate with the WDM Proxy filter) -- from +// ksmedia.h of WDM DDK. +// + +// BFABE720-6E1F-11D0-BCF2-444553540000 +OUR_GUID_ENTRY(AM_KSPROPSETID_AC3, +0xBFABE720, 0x6E1F, 0x11D0, 0xBC, 0xF2, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00) + +// ac390460-43af-11d0-bd6a-003505c103a9 +OUR_GUID_ENTRY(AM_KSPROPSETID_DvdSubPic, +0xac390460, 0x43af, 0x11d0, 0xbd, 0x6a, 0x00, 0x35, 0x05, 0xc1, 0x03, 0xa9) + +// 0E8A0A40L-6AEF-11D0-9ED0-00A024CA19B3 +OUR_GUID_ENTRY(AM_KSPROPSETID_CopyProt, +0x0E8A0A40, 0x6AEF, 0x11D0, 0x9E, 0xD0, 0x00, 0xA0, 0x24, 0xCA, 0x19, 0xB3) + +// A503C5C0-1D1D-11d1-AD80-444553540000 +OUR_GUID_ENTRY(AM_KSPROPSETID_TSRateChange, +0xa503c5c0, 0x1d1d, 0x11d1, 0xad, 0x80, 0x44, 0x45, 0x53, 0x54, 0x0, 0x0) + +// 3577EB09-9582-477f-B29C-B0C452A4FF9A +OUR_GUID_ENTRY(AM_KSPROPSETID_DVD_RateChange, +0x3577eb09, 0x9582, 0x477f, 0xb2, 0x9c, 0xb0, 0xc4, 0x52, 0xa4, 0xff, 0x9a) + +// ae4720ae-aa71-42d8-b82a-fffdf58b76fd +OUR_GUID_ENTRY(AM_KSPROPSETID_DvdKaraoke, +0xae4720ae, 0xaa71, 0x42d8, 0xb8, 0x2a, 0xff, 0xfd, 0xf5, 0x8b, 0x76, 0xfd) + +// c830acbd-ab07-492f-8852-45b6987c2979 +OUR_GUID_ENTRY(AM_KSPROPSETID_FrameStep, +0xc830acbd, 0xab07, 0x492f, 0x88, 0x52, 0x45, 0xb6, 0x98, 0x7c, 0x29, 0x79) + +// +// KS categories from ks.h and ksmedia.h +// +// + +// 65E8773D-8F56-11D0-A3B9-00A0C9223196 +OUR_GUID_ENTRY(AM_KSCATEGORY_CAPTURE, +0x65E8773DL, 0x8F56, 0x11D0, 0xA3, 0xB9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96) + +// 65E8773E-8F56-11D0-A3B9-00A0C9223196 +OUR_GUID_ENTRY(AM_KSCATEGORY_RENDER, +0x65E8773EL, 0x8F56, 0x11D0, 0xA3, 0xB9, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96) + +// 1E84C900-7E70-11D0-A5D6-28DB04C10000 +OUR_GUID_ENTRY(AM_KSCATEGORY_DATACOMPRESSOR, +0x1E84C900L, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00) + +// 6994AD04-93EF-11D0-A3CC-00A0C9223196 +OUR_GUID_ENTRY(AM_KSCATEGORY_AUDIO, +0x6994AD04L, 0x93EF, 0x11D0, 0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96) + +// 6994AD05-93EF-11D0-A3CC-00A0C9223196 +OUR_GUID_ENTRY(AM_KSCATEGORY_VIDEO, +0x6994AD05L, 0x93EF, 0x11D0, 0xA3, 0xCC, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96) + +// a799a800-a46d-11d0-a18c-00a02401dcd4 +OUR_GUID_ENTRY(AM_KSCATEGORY_TVTUNER, +0xa799a800L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4) + +// a799a801-a46d-11d0-a18c-00a02401dcd4 +OUR_GUID_ENTRY(AM_KSCATEGORY_CROSSBAR, +0xa799a801L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4) + +// a799a802-a46d-11d0-a18c-00a02401dcd4 +OUR_GUID_ENTRY(AM_KSCATEGORY_TVAUDIO, +0xa799a802L, 0xa46d, 0x11d0, 0xa1, 0x8c, 0x00, 0xa0, 0x24, 0x01, 0xdc, 0xd4) + + +// 07dad660L-22f1-11d1-a9f4-00c04fbbde8f +OUR_GUID_ENTRY(AM_KSCATEGORY_VBICODEC, +0x07dad660L, 0x22f1, 0x11d1, 0xa9, 0xf4, 0x00, 0xc0, 0x4f, 0xbb, 0xde, 0x8f) + + +// 0A4252A0L-7E70-11D0-A5D6-28DB04C10000 +OUR_GUID_ENTRY(AM_KSCATEGORY_SPLITTER, +0x0A4252A0L, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00) + + +// +// guids needed to support IKsPin interface +// + +// d3abc7e0l-9a61-11d0-a40d00a0c9223196 +OUR_GUID_ENTRY(IID_IKsInterfaceHandler, +0xD3ABC7E0L, 0x9A61, 0x11D0, 0xA4, 0x0D, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96) + +// 5ffbaa02l-49a3-11d0-9f3600aa00a216a1 +OUR_GUID_ENTRY(IID_IKsDataTypeHandler, +0x5FFBAA02L, 0x49A3, 0x11D0, 0x9F, 0x36, 0x00, 0xAA, 0x00, 0xA2, 0x16, 0xA1) + +// b61178d1-a2d9-11cf-9e53-00aa00a216a1 +OUR_GUID_ENTRY(IID_IKsPin, +0xb61178d1L, 0xa2d9, 0x11cf, 0x9e, 0x53, 0x00, 0xaa, 0x00, 0xa2, 0x16, 0xa1) + +// 28F54685-06FD-11D2-B27A-00A0C9223196 +OUR_GUID_ENTRY(IID_IKsControl, +0x28F54685L, 0x06FD, 0x11D2, 0xB2, 0x7A, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96) + +// CD5EBE6B-8B6E-11D1-8AE0-00A0C9223196 +OUR_GUID_ENTRY(IID_IKsPinFactory, +0xCD5EBE6BL, 0x8B6E, 0x11D1, 0x8A, 0xE0, 0x00, 0xA0, 0xC9, 0x22, 0x31, 0x96) + +// 1A8766A0-62CE-11CF-A5D6-28DB04C10000 +OUR_GUID_ENTRY(AM_INTERFACESETID_Standard, +0x1A8766A0L, 0x62CE, 0x11CF, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00) diff --git a/windows_libs/mssdk/include/mediaerr.h b/windows_libs/mssdk/include/mediaerr.h new file mode 100644 index 00000000..5203d554 --- /dev/null +++ b/windows_libs/mssdk/include/mediaerr.h @@ -0,0 +1,20 @@ +//------------------------------------------------------------------------------ +// File: MediaErr.h +// +// Desc: Shell error codes +// +// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef _MEDIAERR_H_ +#define _MEDIAERR_H_ + +#define DMO_E_INVALIDSTREAMINDEX 0x80040201 +#define DMO_E_INVALIDTYPE 0x80040202 +#define DMO_E_TYPE_NOT_SET 0x80040203 +#define DMO_E_NOTACCEPTING 0x80040204 +#define DMO_E_TYPE_NOT_ACCEPTED 0x80040205 +#define DMO_E_NO_MORE_ITEMS 0x80040206 + +#endif _MEDIAERR_H_ diff --git a/windows_libs/mssdk/include/mediaobj.h b/windows_libs/mssdk/include/mediaobj.h new file mode 100644 index 00000000..a0dca588 --- /dev/null +++ b/windows_libs/mssdk/include/mediaobj.h @@ -0,0 +1,1574 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0338 */ +/* Compiler settings for mediaobj.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __mediaobj_h__ +#define __mediaobj_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IMediaBuffer_FWD_DEFINED__ +#define __IMediaBuffer_FWD_DEFINED__ +typedef interface IMediaBuffer IMediaBuffer; +#endif /* __IMediaBuffer_FWD_DEFINED__ */ + + +#ifndef __IMediaObject_FWD_DEFINED__ +#define __IMediaObject_FWD_DEFINED__ +typedef interface IMediaObject IMediaObject; +#endif /* __IMediaObject_FWD_DEFINED__ */ + + +#ifndef __IEnumDMO_FWD_DEFINED__ +#define __IEnumDMO_FWD_DEFINED__ +typedef interface IEnumDMO IEnumDMO; +#endif /* __IEnumDMO_FWD_DEFINED__ */ + + +#ifndef __IMediaObjectInPlace_FWD_DEFINED__ +#define __IMediaObjectInPlace_FWD_DEFINED__ +typedef interface IMediaObjectInPlace IMediaObjectInPlace; +#endif /* __IMediaObjectInPlace_FWD_DEFINED__ */ + + +#ifndef __IDMOQualityControl_FWD_DEFINED__ +#define __IDMOQualityControl_FWD_DEFINED__ +typedef interface IDMOQualityControl IDMOQualityControl; +#endif /* __IDMOQualityControl_FWD_DEFINED__ */ + + +#ifndef __IDMOVideoOutputOptimizations_FWD_DEFINED__ +#define __IDMOVideoOutputOptimizations_FWD_DEFINED__ +typedef interface IDMOVideoOutputOptimizations IDMOVideoOutputOptimizations; +#endif /* __IDMOVideoOutputOptimizations_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "unknwn.h" +#include "objidl.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_mediaobj_0000 */ +/* [local] */ + +#ifdef __strmif_h__ +typedef AM_MEDIA_TYPE DMO_MEDIA_TYPE; +#else +typedef struct _DMOMediaType + { + GUID majortype; + GUID subtype; + BOOL bFixedSizeSamples; + BOOL bTemporalCompression; + ULONG lSampleSize; + GUID formattype; + IUnknown *pUnk; + ULONG cbFormat; + /* [size_is] */ BYTE *pbFormat; + } DMO_MEDIA_TYPE; + +typedef LONGLONG REFERENCE_TIME; + +#endif + +enum _DMO_INPUT_DATA_BUFFER_FLAGS + { DMO_INPUT_DATA_BUFFERF_SYNCPOINT = 0x1, + DMO_INPUT_DATA_BUFFERF_TIME = 0x2, + DMO_INPUT_DATA_BUFFERF_TIMELENGTH = 0x4 + } ; + +enum _DMO_OUTPUT_DATA_BUFFER_FLAGS + { DMO_OUTPUT_DATA_BUFFERF_SYNCPOINT = 0x1, + DMO_OUTPUT_DATA_BUFFERF_TIME = 0x2, + DMO_OUTPUT_DATA_BUFFERF_TIMELENGTH = 0x4, + DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE = 0x1000000 + } ; + +enum _DMO_INPUT_STATUS_FLAGS + { DMO_INPUT_STATUSF_ACCEPT_DATA = 0x1 + } ; + +enum _DMO_INPUT_STREAM_INFO_FLAGS + { DMO_INPUT_STREAMF_WHOLE_SAMPLES = 0x1, + DMO_INPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER = 0x2, + DMO_INPUT_STREAMF_FIXED_SAMPLE_SIZE = 0x4, + DMO_INPUT_STREAMF_HOLDS_BUFFERS = 0x8 + } ; + +enum _DMO_OUTPUT_STREAM_INFO_FLAGS + { DMO_OUTPUT_STREAMF_WHOLE_SAMPLES = 0x1, + DMO_OUTPUT_STREAMF_SINGLE_SAMPLE_PER_BUFFER = 0x2, + DMO_OUTPUT_STREAMF_FIXED_SAMPLE_SIZE = 0x4, + DMO_OUTPUT_STREAMF_DISCARDABLE = 0x8, + DMO_OUTPUT_STREAMF_OPTIONAL = 0x10 + } ; + +enum _DMO_SET_TYPE_FLAGS + { DMO_SET_TYPEF_TEST_ONLY = 0x1, + DMO_SET_TYPEF_CLEAR = 0x2 + } ; + +enum _DMO_PROCESS_OUTPUT_FLAGS + { DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER = 0x1 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_mediaobj_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_mediaobj_0000_v0_0_s_ifspec; + +#ifndef __IMediaBuffer_INTERFACE_DEFINED__ +#define __IMediaBuffer_INTERFACE_DEFINED__ + +/* interface IMediaBuffer */ +/* [uuid][object] */ + + +EXTERN_C const IID IID_IMediaBuffer; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("59eff8b9-938c-4a26-82f2-95cb84cdc837") + IMediaBuffer : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetLength( + DWORD cbLength) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMaxLength( + /* [out] */ DWORD *pcbMaxLength) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetBufferAndLength( + /* [out] */ BYTE **ppBuffer, + /* [out] */ DWORD *pcbLength) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaBufferVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaBuffer * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaBuffer * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaBuffer * This); + + HRESULT ( STDMETHODCALLTYPE *SetLength )( + IMediaBuffer * This, + DWORD cbLength); + + HRESULT ( STDMETHODCALLTYPE *GetMaxLength )( + IMediaBuffer * This, + /* [out] */ DWORD *pcbMaxLength); + + HRESULT ( STDMETHODCALLTYPE *GetBufferAndLength )( + IMediaBuffer * This, + /* [out] */ BYTE **ppBuffer, + /* [out] */ DWORD *pcbLength); + + END_INTERFACE + } IMediaBufferVtbl; + + interface IMediaBuffer + { + CONST_VTBL struct IMediaBufferVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaBuffer_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaBuffer_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaBuffer_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaBuffer_SetLength(This,cbLength) \ + (This)->lpVtbl -> SetLength(This,cbLength) + +#define IMediaBuffer_GetMaxLength(This,pcbMaxLength) \ + (This)->lpVtbl -> GetMaxLength(This,pcbMaxLength) + +#define IMediaBuffer_GetBufferAndLength(This,ppBuffer,pcbLength) \ + (This)->lpVtbl -> GetBufferAndLength(This,ppBuffer,pcbLength) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaBuffer_SetLength_Proxy( + IMediaBuffer * This, + DWORD cbLength); + + +void __RPC_STUB IMediaBuffer_SetLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaBuffer_GetMaxLength_Proxy( + IMediaBuffer * This, + /* [out] */ DWORD *pcbMaxLength); + + +void __RPC_STUB IMediaBuffer_GetMaxLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaBuffer_GetBufferAndLength_Proxy( + IMediaBuffer * This, + /* [out] */ BYTE **ppBuffer, + /* [out] */ DWORD *pcbLength); + + +void __RPC_STUB IMediaBuffer_GetBufferAndLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaBuffer_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_mediaobj_0085 */ +/* [local] */ + +typedef struct _DMO_OUTPUT_DATA_BUFFER + { + IMediaBuffer *pBuffer; + DWORD dwStatus; + REFERENCE_TIME rtTimestamp; + REFERENCE_TIME rtTimelength; + } DMO_OUTPUT_DATA_BUFFER; + +typedef struct _DMO_OUTPUT_DATA_BUFFER *PDMO_OUTPUT_DATA_BUFFER; + + + +extern RPC_IF_HANDLE __MIDL_itf_mediaobj_0085_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_mediaobj_0085_v0_0_s_ifspec; + +#ifndef __IMediaObject_INTERFACE_DEFINED__ +#define __IMediaObject_INTERFACE_DEFINED__ + +/* interface IMediaObject */ +/* [uuid][object] */ + + +EXTERN_C const IID IID_IMediaObject; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("d8ad0f58-5494-4102-97c5-ec798e59bcf4") + IMediaObject : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetStreamCount( + /* [out] */ DWORD *pcInputStreams, + /* [out] */ DWORD *pcOutputStreams) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInputStreamInfo( + DWORD dwInputStreamIndex, + /* [out] */ DWORD *pdwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetOutputStreamInfo( + DWORD dwOutputStreamIndex, + /* [out] */ DWORD *pdwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInputType( + DWORD dwInputStreamIndex, + DWORD dwTypeIndex, + /* [out] */ DMO_MEDIA_TYPE *pmt) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetOutputType( + DWORD dwOutputStreamIndex, + DWORD dwTypeIndex, + /* [out] */ DMO_MEDIA_TYPE *pmt) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetInputType( + DWORD dwInputStreamIndex, + /* [in] */ const DMO_MEDIA_TYPE *pmt, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOutputType( + DWORD dwOutputStreamIndex, + /* [in] */ const DMO_MEDIA_TYPE *pmt, + DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInputCurrentType( + DWORD dwInputStreamIndex, + /* [out] */ DMO_MEDIA_TYPE *pmt) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetOutputCurrentType( + DWORD dwOutputStreamIndex, + /* [out] */ DMO_MEDIA_TYPE *pmt) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInputSizeInfo( + DWORD dwInputStreamIndex, + /* [out] */ DWORD *pcbSize, + /* [out] */ DWORD *pcbMaxLookahead, + /* [out] */ DWORD *pcbAlignment) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetOutputSizeInfo( + DWORD dwOutputStreamIndex, + /* [out] */ DWORD *pcbSize, + /* [out] */ DWORD *pcbAlignment) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInputMaxLatency( + DWORD dwInputStreamIndex, + /* [out] */ REFERENCE_TIME *prtMaxLatency) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetInputMaxLatency( + DWORD dwInputStreamIndex, + REFERENCE_TIME rtMaxLatency) = 0; + + virtual HRESULT STDMETHODCALLTYPE Flush( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Discontinuity( + DWORD dwInputStreamIndex) = 0; + + virtual HRESULT STDMETHODCALLTYPE AllocateStreamingResources( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE FreeStreamingResources( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInputStatus( + DWORD dwInputStreamIndex, + /* [out] */ DWORD *dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE ProcessInput( + DWORD dwInputStreamIndex, + IMediaBuffer *pBuffer, + DWORD dwFlags, + REFERENCE_TIME rtTimestamp, + REFERENCE_TIME rtTimelength) = 0; + + virtual HRESULT STDMETHODCALLTYPE ProcessOutput( + DWORD dwFlags, + DWORD cOutputBufferCount, + /* [size_is][out][in] */ DMO_OUTPUT_DATA_BUFFER *pOutputBuffers, + /* [out] */ DWORD *pdwStatus) = 0; + + virtual HRESULT STDMETHODCALLTYPE Lock( + LONG bLock) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaObjectVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaObject * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaObject * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaObject * This); + + HRESULT ( STDMETHODCALLTYPE *GetStreamCount )( + IMediaObject * This, + /* [out] */ DWORD *pcInputStreams, + /* [out] */ DWORD *pcOutputStreams); + + HRESULT ( STDMETHODCALLTYPE *GetInputStreamInfo )( + IMediaObject * This, + DWORD dwInputStreamIndex, + /* [out] */ DWORD *pdwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetOutputStreamInfo )( + IMediaObject * This, + DWORD dwOutputStreamIndex, + /* [out] */ DWORD *pdwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetInputType )( + IMediaObject * This, + DWORD dwInputStreamIndex, + DWORD dwTypeIndex, + /* [out] */ DMO_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *GetOutputType )( + IMediaObject * This, + DWORD dwOutputStreamIndex, + DWORD dwTypeIndex, + /* [out] */ DMO_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *SetInputType )( + IMediaObject * This, + DWORD dwInputStreamIndex, + /* [in] */ const DMO_MEDIA_TYPE *pmt, + DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *SetOutputType )( + IMediaObject * This, + DWORD dwOutputStreamIndex, + /* [in] */ const DMO_MEDIA_TYPE *pmt, + DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetInputCurrentType )( + IMediaObject * This, + DWORD dwInputStreamIndex, + /* [out] */ DMO_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *GetOutputCurrentType )( + IMediaObject * This, + DWORD dwOutputStreamIndex, + /* [out] */ DMO_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *GetInputSizeInfo )( + IMediaObject * This, + DWORD dwInputStreamIndex, + /* [out] */ DWORD *pcbSize, + /* [out] */ DWORD *pcbMaxLookahead, + /* [out] */ DWORD *pcbAlignment); + + HRESULT ( STDMETHODCALLTYPE *GetOutputSizeInfo )( + IMediaObject * This, + DWORD dwOutputStreamIndex, + /* [out] */ DWORD *pcbSize, + /* [out] */ DWORD *pcbAlignment); + + HRESULT ( STDMETHODCALLTYPE *GetInputMaxLatency )( + IMediaObject * This, + DWORD dwInputStreamIndex, + /* [out] */ REFERENCE_TIME *prtMaxLatency); + + HRESULT ( STDMETHODCALLTYPE *SetInputMaxLatency )( + IMediaObject * This, + DWORD dwInputStreamIndex, + REFERENCE_TIME rtMaxLatency); + + HRESULT ( STDMETHODCALLTYPE *Flush )( + IMediaObject * This); + + HRESULT ( STDMETHODCALLTYPE *Discontinuity )( + IMediaObject * This, + DWORD dwInputStreamIndex); + + HRESULT ( STDMETHODCALLTYPE *AllocateStreamingResources )( + IMediaObject * This); + + HRESULT ( STDMETHODCALLTYPE *FreeStreamingResources )( + IMediaObject * This); + + HRESULT ( STDMETHODCALLTYPE *GetInputStatus )( + IMediaObject * This, + DWORD dwInputStreamIndex, + /* [out] */ DWORD *dwFlags); + + HRESULT ( STDMETHODCALLTYPE *ProcessInput )( + IMediaObject * This, + DWORD dwInputStreamIndex, + IMediaBuffer *pBuffer, + DWORD dwFlags, + REFERENCE_TIME rtTimestamp, + REFERENCE_TIME rtTimelength); + + HRESULT ( STDMETHODCALLTYPE *ProcessOutput )( + IMediaObject * This, + DWORD dwFlags, + DWORD cOutputBufferCount, + /* [size_is][out][in] */ DMO_OUTPUT_DATA_BUFFER *pOutputBuffers, + /* [out] */ DWORD *pdwStatus); + + HRESULT ( STDMETHODCALLTYPE *Lock )( + IMediaObject * This, + LONG bLock); + + END_INTERFACE + } IMediaObjectVtbl; + + interface IMediaObject + { + CONST_VTBL struct IMediaObjectVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaObject_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaObject_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaObject_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaObject_GetStreamCount(This,pcInputStreams,pcOutputStreams) \ + (This)->lpVtbl -> GetStreamCount(This,pcInputStreams,pcOutputStreams) + +#define IMediaObject_GetInputStreamInfo(This,dwInputStreamIndex,pdwFlags) \ + (This)->lpVtbl -> GetInputStreamInfo(This,dwInputStreamIndex,pdwFlags) + +#define IMediaObject_GetOutputStreamInfo(This,dwOutputStreamIndex,pdwFlags) \ + (This)->lpVtbl -> GetOutputStreamInfo(This,dwOutputStreamIndex,pdwFlags) + +#define IMediaObject_GetInputType(This,dwInputStreamIndex,dwTypeIndex,pmt) \ + (This)->lpVtbl -> GetInputType(This,dwInputStreamIndex,dwTypeIndex,pmt) + +#define IMediaObject_GetOutputType(This,dwOutputStreamIndex,dwTypeIndex,pmt) \ + (This)->lpVtbl -> GetOutputType(This,dwOutputStreamIndex,dwTypeIndex,pmt) + +#define IMediaObject_SetInputType(This,dwInputStreamIndex,pmt,dwFlags) \ + (This)->lpVtbl -> SetInputType(This,dwInputStreamIndex,pmt,dwFlags) + +#define IMediaObject_SetOutputType(This,dwOutputStreamIndex,pmt,dwFlags) \ + (This)->lpVtbl -> SetOutputType(This,dwOutputStreamIndex,pmt,dwFlags) + +#define IMediaObject_GetInputCurrentType(This,dwInputStreamIndex,pmt) \ + (This)->lpVtbl -> GetInputCurrentType(This,dwInputStreamIndex,pmt) + +#define IMediaObject_GetOutputCurrentType(This,dwOutputStreamIndex,pmt) \ + (This)->lpVtbl -> GetOutputCurrentType(This,dwOutputStreamIndex,pmt) + +#define IMediaObject_GetInputSizeInfo(This,dwInputStreamIndex,pcbSize,pcbMaxLookahead,pcbAlignment) \ + (This)->lpVtbl -> GetInputSizeInfo(This,dwInputStreamIndex,pcbSize,pcbMaxLookahead,pcbAlignment) + +#define IMediaObject_GetOutputSizeInfo(This,dwOutputStreamIndex,pcbSize,pcbAlignment) \ + (This)->lpVtbl -> GetOutputSizeInfo(This,dwOutputStreamIndex,pcbSize,pcbAlignment) + +#define IMediaObject_GetInputMaxLatency(This,dwInputStreamIndex,prtMaxLatency) \ + (This)->lpVtbl -> GetInputMaxLatency(This,dwInputStreamIndex,prtMaxLatency) + +#define IMediaObject_SetInputMaxLatency(This,dwInputStreamIndex,rtMaxLatency) \ + (This)->lpVtbl -> SetInputMaxLatency(This,dwInputStreamIndex,rtMaxLatency) + +#define IMediaObject_Flush(This) \ + (This)->lpVtbl -> Flush(This) + +#define IMediaObject_Discontinuity(This,dwInputStreamIndex) \ + (This)->lpVtbl -> Discontinuity(This,dwInputStreamIndex) + +#define IMediaObject_AllocateStreamingResources(This) \ + (This)->lpVtbl -> AllocateStreamingResources(This) + +#define IMediaObject_FreeStreamingResources(This) \ + (This)->lpVtbl -> FreeStreamingResources(This) + +#define IMediaObject_GetInputStatus(This,dwInputStreamIndex,dwFlags) \ + (This)->lpVtbl -> GetInputStatus(This,dwInputStreamIndex,dwFlags) + +#define IMediaObject_ProcessInput(This,dwInputStreamIndex,pBuffer,dwFlags,rtTimestamp,rtTimelength) \ + (This)->lpVtbl -> ProcessInput(This,dwInputStreamIndex,pBuffer,dwFlags,rtTimestamp,rtTimelength) + +#define IMediaObject_ProcessOutput(This,dwFlags,cOutputBufferCount,pOutputBuffers,pdwStatus) \ + (This)->lpVtbl -> ProcessOutput(This,dwFlags,cOutputBufferCount,pOutputBuffers,pdwStatus) + +#define IMediaObject_Lock(This,bLock) \ + (This)->lpVtbl -> Lock(This,bLock) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaObject_GetStreamCount_Proxy( + IMediaObject * This, + /* [out] */ DWORD *pcInputStreams, + /* [out] */ DWORD *pcOutputStreams); + + +void __RPC_STUB IMediaObject_GetStreamCount_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_GetInputStreamInfo_Proxy( + IMediaObject * This, + DWORD dwInputStreamIndex, + /* [out] */ DWORD *pdwFlags); + + +void __RPC_STUB IMediaObject_GetInputStreamInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_GetOutputStreamInfo_Proxy( + IMediaObject * This, + DWORD dwOutputStreamIndex, + /* [out] */ DWORD *pdwFlags); + + +void __RPC_STUB IMediaObject_GetOutputStreamInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_GetInputType_Proxy( + IMediaObject * This, + DWORD dwInputStreamIndex, + DWORD dwTypeIndex, + /* [out] */ DMO_MEDIA_TYPE *pmt); + + +void __RPC_STUB IMediaObject_GetInputType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_GetOutputType_Proxy( + IMediaObject * This, + DWORD dwOutputStreamIndex, + DWORD dwTypeIndex, + /* [out] */ DMO_MEDIA_TYPE *pmt); + + +void __RPC_STUB IMediaObject_GetOutputType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_SetInputType_Proxy( + IMediaObject * This, + DWORD dwInputStreamIndex, + /* [in] */ const DMO_MEDIA_TYPE *pmt, + DWORD dwFlags); + + +void __RPC_STUB IMediaObject_SetInputType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_SetOutputType_Proxy( + IMediaObject * This, + DWORD dwOutputStreamIndex, + /* [in] */ const DMO_MEDIA_TYPE *pmt, + DWORD dwFlags); + + +void __RPC_STUB IMediaObject_SetOutputType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_GetInputCurrentType_Proxy( + IMediaObject * This, + DWORD dwInputStreamIndex, + /* [out] */ DMO_MEDIA_TYPE *pmt); + + +void __RPC_STUB IMediaObject_GetInputCurrentType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_GetOutputCurrentType_Proxy( + IMediaObject * This, + DWORD dwOutputStreamIndex, + /* [out] */ DMO_MEDIA_TYPE *pmt); + + +void __RPC_STUB IMediaObject_GetOutputCurrentType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_GetInputSizeInfo_Proxy( + IMediaObject * This, + DWORD dwInputStreamIndex, + /* [out] */ DWORD *pcbSize, + /* [out] */ DWORD *pcbMaxLookahead, + /* [out] */ DWORD *pcbAlignment); + + +void __RPC_STUB IMediaObject_GetInputSizeInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_GetOutputSizeInfo_Proxy( + IMediaObject * This, + DWORD dwOutputStreamIndex, + /* [out] */ DWORD *pcbSize, + /* [out] */ DWORD *pcbAlignment); + + +void __RPC_STUB IMediaObject_GetOutputSizeInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_GetInputMaxLatency_Proxy( + IMediaObject * This, + DWORD dwInputStreamIndex, + /* [out] */ REFERENCE_TIME *prtMaxLatency); + + +void __RPC_STUB IMediaObject_GetInputMaxLatency_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_SetInputMaxLatency_Proxy( + IMediaObject * This, + DWORD dwInputStreamIndex, + REFERENCE_TIME rtMaxLatency); + + +void __RPC_STUB IMediaObject_SetInputMaxLatency_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_Flush_Proxy( + IMediaObject * This); + + +void __RPC_STUB IMediaObject_Flush_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_Discontinuity_Proxy( + IMediaObject * This, + DWORD dwInputStreamIndex); + + +void __RPC_STUB IMediaObject_Discontinuity_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_AllocateStreamingResources_Proxy( + IMediaObject * This); + + +void __RPC_STUB IMediaObject_AllocateStreamingResources_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_FreeStreamingResources_Proxy( + IMediaObject * This); + + +void __RPC_STUB IMediaObject_FreeStreamingResources_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_GetInputStatus_Proxy( + IMediaObject * This, + DWORD dwInputStreamIndex, + /* [out] */ DWORD *dwFlags); + + +void __RPC_STUB IMediaObject_GetInputStatus_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_ProcessInput_Proxy( + IMediaObject * This, + DWORD dwInputStreamIndex, + IMediaBuffer *pBuffer, + DWORD dwFlags, + REFERENCE_TIME rtTimestamp, + REFERENCE_TIME rtTimelength); + + +void __RPC_STUB IMediaObject_ProcessInput_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_ProcessOutput_Proxy( + IMediaObject * This, + DWORD dwFlags, + DWORD cOutputBufferCount, + /* [size_is][out][in] */ DMO_OUTPUT_DATA_BUFFER *pOutputBuffers, + /* [out] */ DWORD *pdwStatus); + + +void __RPC_STUB IMediaObject_ProcessOutput_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObject_Lock_Proxy( + IMediaObject * This, + LONG bLock); + + +void __RPC_STUB IMediaObject_Lock_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaObject_INTERFACE_DEFINED__ */ + + +#ifndef __IEnumDMO_INTERFACE_DEFINED__ +#define __IEnumDMO_INTERFACE_DEFINED__ + +/* interface IEnumDMO */ +/* [uuid][object] */ + + +EXTERN_C const IID IID_IEnumDMO; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("2c3cd98a-2bfa-4a53-9c27-5249ba64ba0f") + IEnumDMO : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + DWORD cItemsToFetch, + /* [length_is][size_is][out] */ CLSID *pCLSID, + /* [string][length_is][size_is][out] */ WCHAR **Names, + /* [out] */ DWORD *pcItemsFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + DWORD cItemsToSkip) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IEnumDMO **ppEnum) = 0; + + }; + +#else /* C style interface */ + + typedef struct IEnumDMOVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IEnumDMO * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IEnumDMO * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IEnumDMO * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IEnumDMO * This, + DWORD cItemsToFetch, + /* [length_is][size_is][out] */ CLSID *pCLSID, + /* [string][length_is][size_is][out] */ WCHAR **Names, + /* [out] */ DWORD *pcItemsFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IEnumDMO * This, + DWORD cItemsToSkip); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IEnumDMO * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IEnumDMO * This, + /* [out] */ IEnumDMO **ppEnum); + + END_INTERFACE + } IEnumDMOVtbl; + + interface IEnumDMO + { + CONST_VTBL struct IEnumDMOVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IEnumDMO_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IEnumDMO_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IEnumDMO_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IEnumDMO_Next(This,cItemsToFetch,pCLSID,Names,pcItemsFetched) \ + (This)->lpVtbl -> Next(This,cItemsToFetch,pCLSID,Names,pcItemsFetched) + +#define IEnumDMO_Skip(This,cItemsToSkip) \ + (This)->lpVtbl -> Skip(This,cItemsToSkip) + +#define IEnumDMO_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IEnumDMO_Clone(This,ppEnum) \ + (This)->lpVtbl -> Clone(This,ppEnum) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IEnumDMO_Next_Proxy( + IEnumDMO * This, + DWORD cItemsToFetch, + /* [length_is][size_is][out] */ CLSID *pCLSID, + /* [string][length_is][size_is][out] */ WCHAR **Names, + /* [out] */ DWORD *pcItemsFetched); + + +void __RPC_STUB IEnumDMO_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumDMO_Skip_Proxy( + IEnumDMO * This, + DWORD cItemsToSkip); + + +void __RPC_STUB IEnumDMO_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumDMO_Reset_Proxy( + IEnumDMO * This); + + +void __RPC_STUB IEnumDMO_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumDMO_Clone_Proxy( + IEnumDMO * This, + /* [out] */ IEnumDMO **ppEnum); + + +void __RPC_STUB IEnumDMO_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IEnumDMO_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_mediaobj_0087 */ +/* [local] */ + + +enum _DMO_INPLACE_PROCESS_FLAGS + { DMO_INPLACE_NORMAL = 0, + DMO_INPLACE_ZERO = 0x1 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_mediaobj_0087_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_mediaobj_0087_v0_0_s_ifspec; + +#ifndef __IMediaObjectInPlace_INTERFACE_DEFINED__ +#define __IMediaObjectInPlace_INTERFACE_DEFINED__ + +/* interface IMediaObjectInPlace */ +/* [uuid][object] */ + + +EXTERN_C const IID IID_IMediaObjectInPlace; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("651b9ad0-0fc7-4aa9-9538-d89931010741") + IMediaObjectInPlace : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Process( + /* [in] */ ULONG ulSize, + /* [size_is][out][in] */ BYTE *pData, + /* [in] */ REFERENCE_TIME refTimeStart, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IMediaObjectInPlace **ppMediaObject) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetLatency( + /* [out] */ REFERENCE_TIME *pLatencyTime) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaObjectInPlaceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaObjectInPlace * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaObjectInPlace * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaObjectInPlace * This); + + HRESULT ( STDMETHODCALLTYPE *Process )( + IMediaObjectInPlace * This, + /* [in] */ ULONG ulSize, + /* [size_is][out][in] */ BYTE *pData, + /* [in] */ REFERENCE_TIME refTimeStart, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IMediaObjectInPlace * This, + /* [out] */ IMediaObjectInPlace **ppMediaObject); + + HRESULT ( STDMETHODCALLTYPE *GetLatency )( + IMediaObjectInPlace * This, + /* [out] */ REFERENCE_TIME *pLatencyTime); + + END_INTERFACE + } IMediaObjectInPlaceVtbl; + + interface IMediaObjectInPlace + { + CONST_VTBL struct IMediaObjectInPlaceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaObjectInPlace_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaObjectInPlace_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaObjectInPlace_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaObjectInPlace_Process(This,ulSize,pData,refTimeStart,dwFlags) \ + (This)->lpVtbl -> Process(This,ulSize,pData,refTimeStart,dwFlags) + +#define IMediaObjectInPlace_Clone(This,ppMediaObject) \ + (This)->lpVtbl -> Clone(This,ppMediaObject) + +#define IMediaObjectInPlace_GetLatency(This,pLatencyTime) \ + (This)->lpVtbl -> GetLatency(This,pLatencyTime) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaObjectInPlace_Process_Proxy( + IMediaObjectInPlace * This, + /* [in] */ ULONG ulSize, + /* [size_is][out][in] */ BYTE *pData, + /* [in] */ REFERENCE_TIME refTimeStart, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IMediaObjectInPlace_Process_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObjectInPlace_Clone_Proxy( + IMediaObjectInPlace * This, + /* [out] */ IMediaObjectInPlace **ppMediaObject); + + +void __RPC_STUB IMediaObjectInPlace_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaObjectInPlace_GetLatency_Proxy( + IMediaObjectInPlace * This, + /* [out] */ REFERENCE_TIME *pLatencyTime); + + +void __RPC_STUB IMediaObjectInPlace_GetLatency_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaObjectInPlace_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_mediaobj_0088 */ +/* [local] */ + + +enum _DMO_QUALITY_STATUS_FLAGS + { DMO_QUALITY_STATUS_ENABLED = 0x1 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_mediaobj_0088_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_mediaobj_0088_v0_0_s_ifspec; + +#ifndef __IDMOQualityControl_INTERFACE_DEFINED__ +#define __IDMOQualityControl_INTERFACE_DEFINED__ + +/* interface IDMOQualityControl */ +/* [uuid][object] */ + + +EXTERN_C const IID IID_IDMOQualityControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("65abea96-cf36-453f-af8a-705e98f16260") + IDMOQualityControl : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetNow( + /* [in] */ REFERENCE_TIME rtNow) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetStatus( + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStatus( + /* [out] */ DWORD *pdwFlags) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDMOQualityControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDMOQualityControl * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDMOQualityControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDMOQualityControl * This); + + HRESULT ( STDMETHODCALLTYPE *SetNow )( + IDMOQualityControl * This, + /* [in] */ REFERENCE_TIME rtNow); + + HRESULT ( STDMETHODCALLTYPE *SetStatus )( + IDMOQualityControl * This, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetStatus )( + IDMOQualityControl * This, + /* [out] */ DWORD *pdwFlags); + + END_INTERFACE + } IDMOQualityControlVtbl; + + interface IDMOQualityControl + { + CONST_VTBL struct IDMOQualityControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDMOQualityControl_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDMOQualityControl_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDMOQualityControl_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDMOQualityControl_SetNow(This,rtNow) \ + (This)->lpVtbl -> SetNow(This,rtNow) + +#define IDMOQualityControl_SetStatus(This,dwFlags) \ + (This)->lpVtbl -> SetStatus(This,dwFlags) + +#define IDMOQualityControl_GetStatus(This,pdwFlags) \ + (This)->lpVtbl -> GetStatus(This,pdwFlags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDMOQualityControl_SetNow_Proxy( + IDMOQualityControl * This, + /* [in] */ REFERENCE_TIME rtNow); + + +void __RPC_STUB IDMOQualityControl_SetNow_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDMOQualityControl_SetStatus_Proxy( + IDMOQualityControl * This, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IDMOQualityControl_SetStatus_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDMOQualityControl_GetStatus_Proxy( + IDMOQualityControl * This, + /* [out] */ DWORD *pdwFlags); + + +void __RPC_STUB IDMOQualityControl_GetStatus_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDMOQualityControl_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_mediaobj_0089 */ +/* [local] */ + + +enum _DMO_VIDEO_OUTPUT_STREAM_FLAGS + { DMO_VOSF_NEEDS_PREVIOUS_SAMPLE = 0x1 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_mediaobj_0089_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_mediaobj_0089_v0_0_s_ifspec; + +#ifndef __IDMOVideoOutputOptimizations_INTERFACE_DEFINED__ +#define __IDMOVideoOutputOptimizations_INTERFACE_DEFINED__ + +/* interface IDMOVideoOutputOptimizations */ +/* [uuid][object] */ + + +EXTERN_C const IID IID_IDMOVideoOutputOptimizations; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("be8f4f4e-5b16-4d29-b350-7f6b5d9298ac") + IDMOVideoOutputOptimizations : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE QueryOperationModePreferences( + ULONG ulOutputStreamIndex, + DWORD *pdwRequestedCapabilities) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOperationMode( + ULONG ulOutputStreamIndex, + DWORD dwEnabledFeatures) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentOperationMode( + ULONG ulOutputStreamIndex, + DWORD *pdwEnabledFeatures) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentSampleRequirements( + ULONG ulOutputStreamIndex, + DWORD *pdwRequestedFeatures) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDMOVideoOutputOptimizationsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDMOVideoOutputOptimizations * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDMOVideoOutputOptimizations * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDMOVideoOutputOptimizations * This); + + HRESULT ( STDMETHODCALLTYPE *QueryOperationModePreferences )( + IDMOVideoOutputOptimizations * This, + ULONG ulOutputStreamIndex, + DWORD *pdwRequestedCapabilities); + + HRESULT ( STDMETHODCALLTYPE *SetOperationMode )( + IDMOVideoOutputOptimizations * This, + ULONG ulOutputStreamIndex, + DWORD dwEnabledFeatures); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentOperationMode )( + IDMOVideoOutputOptimizations * This, + ULONG ulOutputStreamIndex, + DWORD *pdwEnabledFeatures); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentSampleRequirements )( + IDMOVideoOutputOptimizations * This, + ULONG ulOutputStreamIndex, + DWORD *pdwRequestedFeatures); + + END_INTERFACE + } IDMOVideoOutputOptimizationsVtbl; + + interface IDMOVideoOutputOptimizations + { + CONST_VTBL struct IDMOVideoOutputOptimizationsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDMOVideoOutputOptimizations_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDMOVideoOutputOptimizations_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDMOVideoOutputOptimizations_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDMOVideoOutputOptimizations_QueryOperationModePreferences(This,ulOutputStreamIndex,pdwRequestedCapabilities) \ + (This)->lpVtbl -> QueryOperationModePreferences(This,ulOutputStreamIndex,pdwRequestedCapabilities) + +#define IDMOVideoOutputOptimizations_SetOperationMode(This,ulOutputStreamIndex,dwEnabledFeatures) \ + (This)->lpVtbl -> SetOperationMode(This,ulOutputStreamIndex,dwEnabledFeatures) + +#define IDMOVideoOutputOptimizations_GetCurrentOperationMode(This,ulOutputStreamIndex,pdwEnabledFeatures) \ + (This)->lpVtbl -> GetCurrentOperationMode(This,ulOutputStreamIndex,pdwEnabledFeatures) + +#define IDMOVideoOutputOptimizations_GetCurrentSampleRequirements(This,ulOutputStreamIndex,pdwRequestedFeatures) \ + (This)->lpVtbl -> GetCurrentSampleRequirements(This,ulOutputStreamIndex,pdwRequestedFeatures) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDMOVideoOutputOptimizations_QueryOperationModePreferences_Proxy( + IDMOVideoOutputOptimizations * This, + ULONG ulOutputStreamIndex, + DWORD *pdwRequestedCapabilities); + + +void __RPC_STUB IDMOVideoOutputOptimizations_QueryOperationModePreferences_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDMOVideoOutputOptimizations_SetOperationMode_Proxy( + IDMOVideoOutputOptimizations * This, + ULONG ulOutputStreamIndex, + DWORD dwEnabledFeatures); + + +void __RPC_STUB IDMOVideoOutputOptimizations_SetOperationMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDMOVideoOutputOptimizations_GetCurrentOperationMode_Proxy( + IDMOVideoOutputOptimizations * This, + ULONG ulOutputStreamIndex, + DWORD *pdwEnabledFeatures); + + +void __RPC_STUB IDMOVideoOutputOptimizations_GetCurrentOperationMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDMOVideoOutputOptimizations_GetCurrentSampleRequirements_Proxy( + IDMOVideoOutputOptimizations * This, + ULONG ulOutputStreamIndex, + DWORD *pdwRequestedFeatures); + + +void __RPC_STUB IDMOVideoOutputOptimizations_GetCurrentSampleRequirements_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDMOVideoOutputOptimizations_INTERFACE_DEFINED__ */ + + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/medparam.h b/windows_libs/mssdk/include/medparam.h new file mode 100644 index 00000000..f963b74e --- /dev/null +++ b/windows_libs/mssdk/include/medparam.h @@ -0,0 +1,581 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0338 */ +/* Compiler settings for medparam.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __medparam_h__ +#define __medparam_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IMediaParamInfo_FWD_DEFINED__ +#define __IMediaParamInfo_FWD_DEFINED__ +typedef interface IMediaParamInfo IMediaParamInfo; +#endif /* __IMediaParamInfo_FWD_DEFINED__ */ + + +#ifndef __IMediaParams_FWD_DEFINED__ +#define __IMediaParams_FWD_DEFINED__ +typedef interface IMediaParams IMediaParams; +#endif /* __IMediaParams_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "strmif.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_medparam_0000 */ +/* [local] */ + +typedef float MP_DATA; + +typedef +enum _MP_Type + { MPT_INT = 0, + MPT_FLOAT = MPT_INT + 1, + MPT_BOOL = MPT_FLOAT + 1, + MPT_ENUM = MPT_BOOL + 1, + MPT_MAX = MPT_ENUM + 1 + } MP_TYPE; + +#define MPBOOL_TRUE ( 1 ) + +#define MPBOOL_FALSE ( 0 ) + +typedef +enum _MP_CURVE_TYPE + { MP_CURVE_JUMP = 0x1, + MP_CURVE_LINEAR = 0x2, + MP_CURVE_SQUARE = 0x4, + MP_CURVE_INVSQUARE = 0x8, + MP_CURVE_SINE = 0x10 + } MP_CURVE_TYPE; + +typedef DWORD MP_CAPS; + +#define MP_CAPS_CURVE_JUMP ( MP_CURVE_JUMP ) + +#define MP_CAPS_CURVE_LINEAR ( MP_CURVE_LINEAR ) + +#define MP_CAPS_CURVE_SQUARE ( MP_CURVE_SQUARE ) + +#define MP_CAPS_CURVE_INVSQUARE ( MP_CURVE_INVSQUARE ) + +#define MP_CAPS_CURVE_SINE ( MP_CURVE_SINE ) + +typedef struct _MP_PARAMINFO + { + MP_TYPE mpType; + MP_CAPS mopCaps; + MP_DATA mpdMinValue; + MP_DATA mpdMaxValue; + MP_DATA mpdNeutralValue; + WCHAR szUnitText[ 32 ]; + WCHAR szLabel[ 32 ]; + } MP_PARAMINFO; + +typedef DWORD DWORD; + +#define DWORD_ALLPARAMS ( -1 ) + +typedef DWORD MP_TIMEDATA; + +DEFINE_GUID(GUID_TIME_REFERENCE, +0x93ad712b, 0xdaa0, 0x4ffe, 0xbc, 0x81, 0xb0, 0xce, 0x50, 0xf, 0xcd, 0xd9); +DEFINE_GUID(GUID_TIME_MUSIC, +0x574c49d, 0x5b04, 0x4b15, 0xa5, 0x42, 0xae, 0x28, 0x20, 0x30, 0x11, 0x7b); +DEFINE_GUID(GUID_TIME_SAMPLES, +0xa8593d05, 0xc43, 0x4984, 0x9a, 0x63, 0x97, 0xaf, 0x9e, 0x2, 0xc4, 0xc0); +typedef DWORD MP_FLAGS; + +#define MPF_ENVLP_STANDARD ( 0 ) + +#define MPF_ENVLP_BEGIN_CURRENTVAL ( 0x1 ) + +#define MPF_ENVLP_BEGIN_NEUTRALVAL ( 0x2 ) + +typedef struct _MP_ENVELOPE_SEGMENT + { + REFERENCE_TIME rtStart; + REFERENCE_TIME rtEnd; + MP_DATA valStart; + MP_DATA valEnd; + MP_CURVE_TYPE iCurve; + MP_FLAGS flags; + } MP_ENVELOPE_SEGMENT; + +#define MPF_PUNCHIN_REFTIME ( 0 ) + +#define MPF_PUNCHIN_NOW ( 0x1 ) + +#define MPF_PUNCHIN_STOPPED ( 0x2 ) + + + +extern RPC_IF_HANDLE __MIDL_itf_medparam_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_medparam_0000_v0_0_s_ifspec; + +#ifndef __IMediaParamInfo_INTERFACE_DEFINED__ +#define __IMediaParamInfo_INTERFACE_DEFINED__ + +/* interface IMediaParamInfo */ +/* [version][uuid][object] */ + + +EXTERN_C const IID IID_IMediaParamInfo; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6d6cbb60-a223-44aa-842f-a2f06750be6d") + IMediaParamInfo : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetParamCount( + /* [out] */ DWORD *pdwParams) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetParamInfo( + /* [in] */ DWORD dwParamIndex, + /* [out] */ MP_PARAMINFO *pInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetParamText( + /* [in] */ DWORD dwParamIndex, + /* [out] */ WCHAR **ppwchText) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetNumTimeFormats( + /* [out] */ DWORD *pdwNumTimeFormats) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSupportedTimeFormat( + /* [in] */ DWORD dwFormatIndex, + /* [out] */ GUID *pguidTimeFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentTimeFormat( + /* [out] */ GUID *pguidTimeFormat, + /* [out] */ MP_TIMEDATA *pTimeData) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaParamInfoVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaParamInfo * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaParamInfo * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaParamInfo * This); + + HRESULT ( STDMETHODCALLTYPE *GetParamCount )( + IMediaParamInfo * This, + /* [out] */ DWORD *pdwParams); + + HRESULT ( STDMETHODCALLTYPE *GetParamInfo )( + IMediaParamInfo * This, + /* [in] */ DWORD dwParamIndex, + /* [out] */ MP_PARAMINFO *pInfo); + + HRESULT ( STDMETHODCALLTYPE *GetParamText )( + IMediaParamInfo * This, + /* [in] */ DWORD dwParamIndex, + /* [out] */ WCHAR **ppwchText); + + HRESULT ( STDMETHODCALLTYPE *GetNumTimeFormats )( + IMediaParamInfo * This, + /* [out] */ DWORD *pdwNumTimeFormats); + + HRESULT ( STDMETHODCALLTYPE *GetSupportedTimeFormat )( + IMediaParamInfo * This, + /* [in] */ DWORD dwFormatIndex, + /* [out] */ GUID *pguidTimeFormat); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentTimeFormat )( + IMediaParamInfo * This, + /* [out] */ GUID *pguidTimeFormat, + /* [out] */ MP_TIMEDATA *pTimeData); + + END_INTERFACE + } IMediaParamInfoVtbl; + + interface IMediaParamInfo + { + CONST_VTBL struct IMediaParamInfoVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaParamInfo_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaParamInfo_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaParamInfo_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaParamInfo_GetParamCount(This,pdwParams) \ + (This)->lpVtbl -> GetParamCount(This,pdwParams) + +#define IMediaParamInfo_GetParamInfo(This,dwParamIndex,pInfo) \ + (This)->lpVtbl -> GetParamInfo(This,dwParamIndex,pInfo) + +#define IMediaParamInfo_GetParamText(This,dwParamIndex,ppwchText) \ + (This)->lpVtbl -> GetParamText(This,dwParamIndex,ppwchText) + +#define IMediaParamInfo_GetNumTimeFormats(This,pdwNumTimeFormats) \ + (This)->lpVtbl -> GetNumTimeFormats(This,pdwNumTimeFormats) + +#define IMediaParamInfo_GetSupportedTimeFormat(This,dwFormatIndex,pguidTimeFormat) \ + (This)->lpVtbl -> GetSupportedTimeFormat(This,dwFormatIndex,pguidTimeFormat) + +#define IMediaParamInfo_GetCurrentTimeFormat(This,pguidTimeFormat,pTimeData) \ + (This)->lpVtbl -> GetCurrentTimeFormat(This,pguidTimeFormat,pTimeData) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaParamInfo_GetParamCount_Proxy( + IMediaParamInfo * This, + /* [out] */ DWORD *pdwParams); + + +void __RPC_STUB IMediaParamInfo_GetParamCount_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaParamInfo_GetParamInfo_Proxy( + IMediaParamInfo * This, + /* [in] */ DWORD dwParamIndex, + /* [out] */ MP_PARAMINFO *pInfo); + + +void __RPC_STUB IMediaParamInfo_GetParamInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaParamInfo_GetParamText_Proxy( + IMediaParamInfo * This, + /* [in] */ DWORD dwParamIndex, + /* [out] */ WCHAR **ppwchText); + + +void __RPC_STUB IMediaParamInfo_GetParamText_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaParamInfo_GetNumTimeFormats_Proxy( + IMediaParamInfo * This, + /* [out] */ DWORD *pdwNumTimeFormats); + + +void __RPC_STUB IMediaParamInfo_GetNumTimeFormats_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaParamInfo_GetSupportedTimeFormat_Proxy( + IMediaParamInfo * This, + /* [in] */ DWORD dwFormatIndex, + /* [out] */ GUID *pguidTimeFormat); + + +void __RPC_STUB IMediaParamInfo_GetSupportedTimeFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaParamInfo_GetCurrentTimeFormat_Proxy( + IMediaParamInfo * This, + /* [out] */ GUID *pguidTimeFormat, + /* [out] */ MP_TIMEDATA *pTimeData); + + +void __RPC_STUB IMediaParamInfo_GetCurrentTimeFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaParamInfo_INTERFACE_DEFINED__ */ + + +#ifndef __IMediaParams_INTERFACE_DEFINED__ +#define __IMediaParams_INTERFACE_DEFINED__ + +/* interface IMediaParams */ +/* [version][uuid][object] */ + + +EXTERN_C const IID IID_IMediaParams; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6d6cbb61-a223-44aa-842f-a2f06750be6e") + IMediaParams : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetParam( + /* [in] */ DWORD dwParamIndex, + /* [out] */ MP_DATA *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetParam( + /* [in] */ DWORD dwParamIndex, + /* [in] */ MP_DATA value) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddEnvelope( + /* [in] */ DWORD dwParamIndex, + /* [in] */ DWORD cSegments, + /* [in] */ MP_ENVELOPE_SEGMENT *pEnvelopeSegments) = 0; + + virtual HRESULT STDMETHODCALLTYPE FlushEnvelope( + /* [in] */ DWORD dwParamIndex, + /* [in] */ REFERENCE_TIME refTimeStart, + /* [in] */ REFERENCE_TIME refTimeEnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTimeFormat( + /* [in] */ GUID guidTimeFormat, + /* [in] */ MP_TIMEDATA mpTimeData) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaParamsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaParams * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaParams * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaParams * This); + + HRESULT ( STDMETHODCALLTYPE *GetParam )( + IMediaParams * This, + /* [in] */ DWORD dwParamIndex, + /* [out] */ MP_DATA *pValue); + + HRESULT ( STDMETHODCALLTYPE *SetParam )( + IMediaParams * This, + /* [in] */ DWORD dwParamIndex, + /* [in] */ MP_DATA value); + + HRESULT ( STDMETHODCALLTYPE *AddEnvelope )( + IMediaParams * This, + /* [in] */ DWORD dwParamIndex, + /* [in] */ DWORD cSegments, + /* [in] */ MP_ENVELOPE_SEGMENT *pEnvelopeSegments); + + HRESULT ( STDMETHODCALLTYPE *FlushEnvelope )( + IMediaParams * This, + /* [in] */ DWORD dwParamIndex, + /* [in] */ REFERENCE_TIME refTimeStart, + /* [in] */ REFERENCE_TIME refTimeEnd); + + HRESULT ( STDMETHODCALLTYPE *SetTimeFormat )( + IMediaParams * This, + /* [in] */ GUID guidTimeFormat, + /* [in] */ MP_TIMEDATA mpTimeData); + + END_INTERFACE + } IMediaParamsVtbl; + + interface IMediaParams + { + CONST_VTBL struct IMediaParamsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaParams_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaParams_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaParams_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaParams_GetParam(This,dwParamIndex,pValue) \ + (This)->lpVtbl -> GetParam(This,dwParamIndex,pValue) + +#define IMediaParams_SetParam(This,dwParamIndex,value) \ + (This)->lpVtbl -> SetParam(This,dwParamIndex,value) + +#define IMediaParams_AddEnvelope(This,dwParamIndex,cSegments,pEnvelopeSegments) \ + (This)->lpVtbl -> AddEnvelope(This,dwParamIndex,cSegments,pEnvelopeSegments) + +#define IMediaParams_FlushEnvelope(This,dwParamIndex,refTimeStart,refTimeEnd) \ + (This)->lpVtbl -> FlushEnvelope(This,dwParamIndex,refTimeStart,refTimeEnd) + +#define IMediaParams_SetTimeFormat(This,guidTimeFormat,mpTimeData) \ + (This)->lpVtbl -> SetTimeFormat(This,guidTimeFormat,mpTimeData) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaParams_GetParam_Proxy( + IMediaParams * This, + /* [in] */ DWORD dwParamIndex, + /* [out] */ MP_DATA *pValue); + + +void __RPC_STUB IMediaParams_GetParam_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaParams_SetParam_Proxy( + IMediaParams * This, + /* [in] */ DWORD dwParamIndex, + /* [in] */ MP_DATA value); + + +void __RPC_STUB IMediaParams_SetParam_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaParams_AddEnvelope_Proxy( + IMediaParams * This, + /* [in] */ DWORD dwParamIndex, + /* [in] */ DWORD cSegments, + /* [in] */ MP_ENVELOPE_SEGMENT *pEnvelopeSegments); + + +void __RPC_STUB IMediaParams_AddEnvelope_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaParams_FlushEnvelope_Proxy( + IMediaParams * This, + /* [in] */ DWORD dwParamIndex, + /* [in] */ REFERENCE_TIME refTimeStart, + /* [in] */ REFERENCE_TIME refTimeEnd); + + +void __RPC_STUB IMediaParams_FlushEnvelope_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaParams_SetTimeFormat_Proxy( + IMediaParams * This, + /* [in] */ GUID guidTimeFormat, + /* [in] */ MP_TIMEDATA mpTimeData); + + +void __RPC_STUB IMediaParams_SetTimeFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaParams_INTERFACE_DEFINED__ */ + + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/mmstream.h b/windows_libs/mssdk/include/mmstream.h new file mode 100644 index 00000000..91d780b9 --- /dev/null +++ b/windows_libs/mssdk/include/mmstream.h @@ -0,0 +1,846 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0338 */ +/* Compiler settings for mmstream.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __mmstream_h__ +#define __mmstream_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IMultiMediaStream_FWD_DEFINED__ +#define __IMultiMediaStream_FWD_DEFINED__ +typedef interface IMultiMediaStream IMultiMediaStream; +#endif /* __IMultiMediaStream_FWD_DEFINED__ */ + + +#ifndef __IMediaStream_FWD_DEFINED__ +#define __IMediaStream_FWD_DEFINED__ +typedef interface IMediaStream IMediaStream; +#endif /* __IMediaStream_FWD_DEFINED__ */ + + +#ifndef __IStreamSample_FWD_DEFINED__ +#define __IStreamSample_FWD_DEFINED__ +typedef interface IStreamSample IStreamSample; +#endif /* __IStreamSample_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "unknwn.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_mmstream_0000 */ +/* [local] */ + +#define MS_ERROR_CODE(x) MAKE_HRESULT(1, FACILITY_ITF, (x) + 0x400) +#define MS_SUCCESS_CODE(x) MAKE_HRESULT(0, FACILITY_ITF, x) +#define MS_S_PENDING MS_SUCCESS_CODE(1) +#define MS_S_NOUPDATE MS_SUCCESS_CODE(2) +#define MS_S_ENDOFSTREAM MS_SUCCESS_CODE(3) +#define MS_E_SAMPLEALLOC MS_ERROR_CODE(1) +#define MS_E_PURPOSEID MS_ERROR_CODE(2) +#define MS_E_NOSTREAM MS_ERROR_CODE(3) +#define MS_E_NOSEEKING MS_ERROR_CODE(4) +#define MS_E_INCOMPATIBLE MS_ERROR_CODE(5) +#define MS_E_BUSY MS_ERROR_CODE(6) +#define MS_E_NOTINIT MS_ERROR_CODE(7) +#define MS_E_SOURCEALREADYDEFINED MS_ERROR_CODE(8) +#define MS_E_INVALIDSTREAMTYPE MS_ERROR_CODE(9) +#define MS_E_NOTRUNNING MS_ERROR_CODE(10) +// {A35FF56A-9FDA-11d0-8FDF-00C04FD9189D} +DEFINE_GUID(MSPID_PrimaryVideo, +0xa35ff56a, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d); +// {A35FF56B-9FDA-11d0-8FDF-00C04FD9189D} +DEFINE_GUID(MSPID_PrimaryAudio, +0xa35ff56b, 0x9fda, 0x11d0, 0x8f, 0xdf, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d); +#if(_WIN32_WINNT < 0x0400) +typedef void ( __stdcall *PAPCFUNC )( + DWORD_PTR dwParam); + +#endif +typedef LONGLONG STREAM_TIME; + +typedef GUID MSPID; + +typedef REFGUID REFMSPID; + +typedef /* [public][public][public] */ +enum __MIDL___MIDL_itf_mmstream_0000_0001 + { STREAMTYPE_READ = 0, + STREAMTYPE_WRITE = 1, + STREAMTYPE_TRANSFORM = 2 + } STREAM_TYPE; + +typedef /* [public][public][public] */ +enum __MIDL___MIDL_itf_mmstream_0000_0002 + { STREAMSTATE_STOP = 0, + STREAMSTATE_RUN = 1 + } STREAM_STATE; + +typedef /* [public] */ +enum __MIDL___MIDL_itf_mmstream_0000_0003 + { COMPSTAT_NOUPDATEOK = 0x1, + COMPSTAT_WAIT = 0x2, + COMPSTAT_ABORT = 0x4 + } COMPLETION_STATUS_FLAGS; + + +enum __MIDL___MIDL_itf_mmstream_0000_0004 + { MMSSF_HASCLOCK = 0x1, + MMSSF_SUPPORTSEEK = 0x2, + MMSSF_ASYNCHRONOUS = 0x4 + } ; + +enum __MIDL___MIDL_itf_mmstream_0000_0005 + { SSUPDATE_ASYNC = 0x1, + SSUPDATE_CONTINUOUS = 0x2 + } ; + + + + + +extern RPC_IF_HANDLE __MIDL_itf_mmstream_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_mmstream_0000_v0_0_s_ifspec; + +#ifndef __IMultiMediaStream_INTERFACE_DEFINED__ +#define __IMultiMediaStream_INTERFACE_DEFINED__ + +/* interface IMultiMediaStream */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IMultiMediaStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B502D1BC-9A57-11d0-8FDE-00C04FD9189D") + IMultiMediaStream : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetInformation( + /* [out] */ DWORD *pdwFlags, + /* [out] */ STREAM_TYPE *pStreamType) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMediaStream( + /* [in] */ REFMSPID idPurpose, + /* [out] */ IMediaStream **ppMediaStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumMediaStreams( + /* [in] */ long Index, + /* [out] */ IMediaStream **ppMediaStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetState( + /* [out] */ STREAM_STATE *pCurrentState) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetState( + /* [in] */ STREAM_STATE NewState) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTime( + /* [out] */ STREAM_TIME *pCurrentTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDuration( + /* [out] */ STREAM_TIME *pDuration) = 0; + + virtual HRESULT STDMETHODCALLTYPE Seek( + /* [in] */ STREAM_TIME SeekTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetEndOfStreamEventHandle( + /* [out] */ HANDLE *phEOS) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMultiMediaStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMultiMediaStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMultiMediaStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMultiMediaStream * This); + + HRESULT ( STDMETHODCALLTYPE *GetInformation )( + IMultiMediaStream * This, + /* [out] */ DWORD *pdwFlags, + /* [out] */ STREAM_TYPE *pStreamType); + + HRESULT ( STDMETHODCALLTYPE *GetMediaStream )( + IMultiMediaStream * This, + /* [in] */ REFMSPID idPurpose, + /* [out] */ IMediaStream **ppMediaStream); + + HRESULT ( STDMETHODCALLTYPE *EnumMediaStreams )( + IMultiMediaStream * This, + /* [in] */ long Index, + /* [out] */ IMediaStream **ppMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetState )( + IMultiMediaStream * This, + /* [out] */ STREAM_STATE *pCurrentState); + + HRESULT ( STDMETHODCALLTYPE *SetState )( + IMultiMediaStream * This, + /* [in] */ STREAM_STATE NewState); + + HRESULT ( STDMETHODCALLTYPE *GetTime )( + IMultiMediaStream * This, + /* [out] */ STREAM_TIME *pCurrentTime); + + HRESULT ( STDMETHODCALLTYPE *GetDuration )( + IMultiMediaStream * This, + /* [out] */ STREAM_TIME *pDuration); + + HRESULT ( STDMETHODCALLTYPE *Seek )( + IMultiMediaStream * This, + /* [in] */ STREAM_TIME SeekTime); + + HRESULT ( STDMETHODCALLTYPE *GetEndOfStreamEventHandle )( + IMultiMediaStream * This, + /* [out] */ HANDLE *phEOS); + + END_INTERFACE + } IMultiMediaStreamVtbl; + + interface IMultiMediaStream + { + CONST_VTBL struct IMultiMediaStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMultiMediaStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMultiMediaStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMultiMediaStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMultiMediaStream_GetInformation(This,pdwFlags,pStreamType) \ + (This)->lpVtbl -> GetInformation(This,pdwFlags,pStreamType) + +#define IMultiMediaStream_GetMediaStream(This,idPurpose,ppMediaStream) \ + (This)->lpVtbl -> GetMediaStream(This,idPurpose,ppMediaStream) + +#define IMultiMediaStream_EnumMediaStreams(This,Index,ppMediaStream) \ + (This)->lpVtbl -> EnumMediaStreams(This,Index,ppMediaStream) + +#define IMultiMediaStream_GetState(This,pCurrentState) \ + (This)->lpVtbl -> GetState(This,pCurrentState) + +#define IMultiMediaStream_SetState(This,NewState) \ + (This)->lpVtbl -> SetState(This,NewState) + +#define IMultiMediaStream_GetTime(This,pCurrentTime) \ + (This)->lpVtbl -> GetTime(This,pCurrentTime) + +#define IMultiMediaStream_GetDuration(This,pDuration) \ + (This)->lpVtbl -> GetDuration(This,pDuration) + +#define IMultiMediaStream_Seek(This,SeekTime) \ + (This)->lpVtbl -> Seek(This,SeekTime) + +#define IMultiMediaStream_GetEndOfStreamEventHandle(This,phEOS) \ + (This)->lpVtbl -> GetEndOfStreamEventHandle(This,phEOS) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMultiMediaStream_GetInformation_Proxy( + IMultiMediaStream * This, + /* [out] */ DWORD *pdwFlags, + /* [out] */ STREAM_TYPE *pStreamType); + + +void __RPC_STUB IMultiMediaStream_GetInformation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMultiMediaStream_GetMediaStream_Proxy( + IMultiMediaStream * This, + /* [in] */ REFMSPID idPurpose, + /* [out] */ IMediaStream **ppMediaStream); + + +void __RPC_STUB IMultiMediaStream_GetMediaStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMultiMediaStream_EnumMediaStreams_Proxy( + IMultiMediaStream * This, + /* [in] */ long Index, + /* [out] */ IMediaStream **ppMediaStream); + + +void __RPC_STUB IMultiMediaStream_EnumMediaStreams_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMultiMediaStream_GetState_Proxy( + IMultiMediaStream * This, + /* [out] */ STREAM_STATE *pCurrentState); + + +void __RPC_STUB IMultiMediaStream_GetState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMultiMediaStream_SetState_Proxy( + IMultiMediaStream * This, + /* [in] */ STREAM_STATE NewState); + + +void __RPC_STUB IMultiMediaStream_SetState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMultiMediaStream_GetTime_Proxy( + IMultiMediaStream * This, + /* [out] */ STREAM_TIME *pCurrentTime); + + +void __RPC_STUB IMultiMediaStream_GetTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMultiMediaStream_GetDuration_Proxy( + IMultiMediaStream * This, + /* [out] */ STREAM_TIME *pDuration); + + +void __RPC_STUB IMultiMediaStream_GetDuration_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMultiMediaStream_Seek_Proxy( + IMultiMediaStream * This, + /* [in] */ STREAM_TIME SeekTime); + + +void __RPC_STUB IMultiMediaStream_Seek_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMultiMediaStream_GetEndOfStreamEventHandle_Proxy( + IMultiMediaStream * This, + /* [out] */ HANDLE *phEOS); + + +void __RPC_STUB IMultiMediaStream_GetEndOfStreamEventHandle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMultiMediaStream_INTERFACE_DEFINED__ */ + + +#ifndef __IMediaStream_INTERFACE_DEFINED__ +#define __IMediaStream_INTERFACE_DEFINED__ + +/* interface IMediaStream */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMediaStream; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B502D1BD-9A57-11d0-8FDE-00C04FD9189D") + IMediaStream : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetMultiMediaStream( + /* [out] */ IMultiMediaStream **ppMultiMediaStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInformation( + /* [out] */ MSPID *pPurposeId, + /* [out] */ STREAM_TYPE *pType) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSameFormat( + /* [in] */ IMediaStream *pStreamThatHasDesiredFormat, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE AllocateSample( + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppSample) = 0; + + virtual HRESULT STDMETHODCALLTYPE CreateSharedSample( + /* [in] */ IStreamSample *pExistingSample, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppNewSample) = 0; + + virtual HRESULT STDMETHODCALLTYPE SendEndOfStream( + DWORD dwFlags) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaStreamVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaStream * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaStream * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaStream * This); + + HRESULT ( STDMETHODCALLTYPE *GetMultiMediaStream )( + IMediaStream * This, + /* [out] */ IMultiMediaStream **ppMultiMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetInformation )( + IMediaStream * This, + /* [out] */ MSPID *pPurposeId, + /* [out] */ STREAM_TYPE *pType); + + HRESULT ( STDMETHODCALLTYPE *SetSameFormat )( + IMediaStream * This, + /* [in] */ IMediaStream *pStreamThatHasDesiredFormat, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *AllocateSample )( + IMediaStream * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppSample); + + HRESULT ( STDMETHODCALLTYPE *CreateSharedSample )( + IMediaStream * This, + /* [in] */ IStreamSample *pExistingSample, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppNewSample); + + HRESULT ( STDMETHODCALLTYPE *SendEndOfStream )( + IMediaStream * This, + DWORD dwFlags); + + END_INTERFACE + } IMediaStreamVtbl; + + interface IMediaStream + { + CONST_VTBL struct IMediaStreamVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaStream_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaStream_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaStream_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaStream_GetMultiMediaStream(This,ppMultiMediaStream) \ + (This)->lpVtbl -> GetMultiMediaStream(This,ppMultiMediaStream) + +#define IMediaStream_GetInformation(This,pPurposeId,pType) \ + (This)->lpVtbl -> GetInformation(This,pPurposeId,pType) + +#define IMediaStream_SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) \ + (This)->lpVtbl -> SetSameFormat(This,pStreamThatHasDesiredFormat,dwFlags) + +#define IMediaStream_AllocateSample(This,dwFlags,ppSample) \ + (This)->lpVtbl -> AllocateSample(This,dwFlags,ppSample) + +#define IMediaStream_CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) \ + (This)->lpVtbl -> CreateSharedSample(This,pExistingSample,dwFlags,ppNewSample) + +#define IMediaStream_SendEndOfStream(This,dwFlags) \ + (This)->lpVtbl -> SendEndOfStream(This,dwFlags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaStream_GetMultiMediaStream_Proxy( + IMediaStream * This, + /* [out] */ IMultiMediaStream **ppMultiMediaStream); + + +void __RPC_STUB IMediaStream_GetMultiMediaStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStream_GetInformation_Proxy( + IMediaStream * This, + /* [out] */ MSPID *pPurposeId, + /* [out] */ STREAM_TYPE *pType); + + +void __RPC_STUB IMediaStream_GetInformation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStream_SetSameFormat_Proxy( + IMediaStream * This, + /* [in] */ IMediaStream *pStreamThatHasDesiredFormat, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IMediaStream_SetSameFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStream_AllocateSample_Proxy( + IMediaStream * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppSample); + + +void __RPC_STUB IMediaStream_AllocateSample_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStream_CreateSharedSample_Proxy( + IMediaStream * This, + /* [in] */ IStreamSample *pExistingSample, + /* [in] */ DWORD dwFlags, + /* [out] */ IStreamSample **ppNewSample); + + +void __RPC_STUB IMediaStream_CreateSharedSample_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaStream_SendEndOfStream_Proxy( + IMediaStream * This, + DWORD dwFlags); + + +void __RPC_STUB IMediaStream_SendEndOfStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaStream_INTERFACE_DEFINED__ */ + + +#ifndef __IStreamSample_INTERFACE_DEFINED__ +#define __IStreamSample_INTERFACE_DEFINED__ + +/* interface IStreamSample */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IStreamSample; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B502D1BE-9A57-11d0-8FDE-00C04FD9189D") + IStreamSample : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetMediaStream( + /* [in] */ IMediaStream **ppMediaStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSampleTimes( + /* [out] */ STREAM_TIME *pStartTime, + /* [out] */ STREAM_TIME *pEndTime, + /* [out] */ STREAM_TIME *pCurrentTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSampleTimes( + /* [in] */ const STREAM_TIME *pStartTime, + /* [in] */ const STREAM_TIME *pEndTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE Update( + /* [in] */ DWORD dwFlags, + /* [in] */ HANDLE hEvent, + /* [in] */ PAPCFUNC pfnAPC, + /* [in] */ DWORD_PTR dwAPCData) = 0; + + virtual HRESULT STDMETHODCALLTYPE CompletionStatus( + /* [in] */ DWORD dwFlags, + /* [in] */ DWORD dwMilliseconds) = 0; + + }; + +#else /* C style interface */ + + typedef struct IStreamSampleVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IStreamSample * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IStreamSample * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IStreamSample * This); + + HRESULT ( STDMETHODCALLTYPE *GetMediaStream )( + IStreamSample * This, + /* [in] */ IMediaStream **ppMediaStream); + + HRESULT ( STDMETHODCALLTYPE *GetSampleTimes )( + IStreamSample * This, + /* [out] */ STREAM_TIME *pStartTime, + /* [out] */ STREAM_TIME *pEndTime, + /* [out] */ STREAM_TIME *pCurrentTime); + + HRESULT ( STDMETHODCALLTYPE *SetSampleTimes )( + IStreamSample * This, + /* [in] */ const STREAM_TIME *pStartTime, + /* [in] */ const STREAM_TIME *pEndTime); + + HRESULT ( STDMETHODCALLTYPE *Update )( + IStreamSample * This, + /* [in] */ DWORD dwFlags, + /* [in] */ HANDLE hEvent, + /* [in] */ PAPCFUNC pfnAPC, + /* [in] */ DWORD_PTR dwAPCData); + + HRESULT ( STDMETHODCALLTYPE *CompletionStatus )( + IStreamSample * This, + /* [in] */ DWORD dwFlags, + /* [in] */ DWORD dwMilliseconds); + + END_INTERFACE + } IStreamSampleVtbl; + + interface IStreamSample + { + CONST_VTBL struct IStreamSampleVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IStreamSample_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IStreamSample_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IStreamSample_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IStreamSample_GetMediaStream(This,ppMediaStream) \ + (This)->lpVtbl -> GetMediaStream(This,ppMediaStream) + +#define IStreamSample_GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime) \ + (This)->lpVtbl -> GetSampleTimes(This,pStartTime,pEndTime,pCurrentTime) + +#define IStreamSample_SetSampleTimes(This,pStartTime,pEndTime) \ + (This)->lpVtbl -> SetSampleTimes(This,pStartTime,pEndTime) + +#define IStreamSample_Update(This,dwFlags,hEvent,pfnAPC,dwAPCData) \ + (This)->lpVtbl -> Update(This,dwFlags,hEvent,pfnAPC,dwAPCData) + +#define IStreamSample_CompletionStatus(This,dwFlags,dwMilliseconds) \ + (This)->lpVtbl -> CompletionStatus(This,dwFlags,dwMilliseconds) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IStreamSample_GetMediaStream_Proxy( + IStreamSample * This, + /* [in] */ IMediaStream **ppMediaStream); + + +void __RPC_STUB IStreamSample_GetMediaStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IStreamSample_GetSampleTimes_Proxy( + IStreamSample * This, + /* [out] */ STREAM_TIME *pStartTime, + /* [out] */ STREAM_TIME *pEndTime, + /* [out] */ STREAM_TIME *pCurrentTime); + + +void __RPC_STUB IStreamSample_GetSampleTimes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IStreamSample_SetSampleTimes_Proxy( + IStreamSample * This, + /* [in] */ const STREAM_TIME *pStartTime, + /* [in] */ const STREAM_TIME *pEndTime); + + +void __RPC_STUB IStreamSample_SetSampleTimes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IStreamSample_Update_Proxy( + IStreamSample * This, + /* [in] */ DWORD dwFlags, + /* [in] */ HANDLE hEvent, + /* [in] */ PAPCFUNC pfnAPC, + /* [in] */ DWORD_PTR dwAPCData); + + +void __RPC_STUB IStreamSample_Update_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IStreamSample_CompletionStatus_Proxy( + IStreamSample * This, + /* [in] */ DWORD dwFlags, + /* [in] */ DWORD dwMilliseconds); + + +void __RPC_STUB IStreamSample_CompletionStatus_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IStreamSample_INTERFACE_DEFINED__ */ + + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/mpconfig.h b/windows_libs/mssdk/include/mpconfig.h new file mode 100644 index 00000000..59171d32 --- /dev/null +++ b/windows_libs/mssdk/include/mpconfig.h @@ -0,0 +1,144 @@ +//------------------------------------------------------------------------------ +// File: MPConfig.h +// +// Desc: +// +// Copyright (c) 1997 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __IMPConfig__ +#define __IMPConfig__ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef enum _AM_ASPECT_RATIO_MODE +{ + AM_ARMODE_STRETCHED, // don't do any aspect ratio correction + AM_ARMODE_LETTER_BOX, // letter box the video, paint background color in the excess region + AM_ARMODE_CROP, // crop the video to the right aspect ratio + AM_ARMODE_STRETCHED_AS_PRIMARY // follow whatever the primary stream does (in terms of the mode as well as pict-aspect-ratio values) +} AM_ASPECT_RATIO_MODE; + + +DECLARE_INTERFACE_(IMixerPinConfig, IUnknown) +{ + // this function sets the position of the stream in the display window, assuming + // that the window coordinates are {0, 0, 10000, 10000}. Thus giving arguments + // (0, 0, 5000, 5000) will put the stream in the top-left quarter. Any value greater + // than 10000 is invalid. + STDMETHOD (SetRelativePosition)(THIS_ + IN DWORD dwLeft, + IN DWORD dwTop, + IN DWORD dwRight, + IN DWORD dwBottom + ) PURE; + + // this function gets the position of the stream in the display window, assuming + // that the window coordinates are {0, 0, 10000, 10000}. Thus if the values returned + // are (0, 0, 5000, 5000), then it means that the stream is in the top-left quarter. + STDMETHOD (GetRelativePosition)(THIS_ + OUT DWORD *pdwLeft, + OUT DWORD *pdwTop, + OUT DWORD *pdwRight, + OUT DWORD *pdwBottom + ) PURE; + + // this function sets the ZOrder of the stream. The ZOrder of 0 is the closest + // to the eyes of the user, and increasing values imply greater distance. + STDMETHOD (SetZOrder)(THIS_ + IN DWORD dwZOrder + ) PURE; + + + // this function gets the ZOrder of the stream. The ZOrder of 0 is the closest + // to the eyes of the user, and increasing values imply greater distance. + STDMETHOD (GetZOrder)(THIS_ + OUT DWORD *pdwZOrder + ) PURE; + + // this function sets the colorkey being used by the stream. Setting this value on the + // primary stream sets the destination colorkey being used by the overlay surface. Setting + // this value on the secondary pin makes sense only if the stream is transparent. By default + // the destination colorkey is used as the colorkey for all transparent (secondary) streams. + STDMETHOD (SetColorKey)(THIS_ + IN COLORKEY *pColorKey + ) PURE; + + // this function gets the colorkey being used by the stream. Getting this value on the + // primary stream gets the destination colorkey being used by the overlay surface. Getting + // this value on the secondary pin returns the colorkey being used by that particular stream. + // When using this method, you are allowed to pass NULL for either pColorKey or pColor but + // not both. + STDMETHOD (GetColorKey)(THIS_ + OUT COLORKEY *pColorKey, + OUT DWORD *pColor + ) PURE; + + // this function sets the blending parameter which in turn defines, how the secondary stream + // is going to be blended with the primary stream. A value of 0 makes the secondary stream + // invisible, a value of 255 makes the primary stream invisible (in that region only ofcourse), + // and any value inbetween, say x, blends the secondary and primary streams in the ratio x : (255-x). + // If no value is set, the default is 255. + // Any value less than 0 or greater than 255 is invalid. Calling this function on the primary + // stream would result in a return value of E_UNEXPECTED. + STDMETHOD (SetBlendingParameter)(THIS_ + IN DWORD dwBlendingParameter + ) PURE; + + // this function gets the blending parameter which in turn defines, how the secondary stream + // is currently being blended with the primary stream. + STDMETHOD (GetBlendingParameter)(THIS_ + OUT DWORD *pdwBlendingParameter + ) PURE; + + + // this function is used to set the Aspect Ratio Correction mode on the pin. + // If the mode is set to letter box, black color is painted on the excess region + STDMETHOD (SetAspectRatioMode)(THIS_ + IN AM_ASPECT_RATIO_MODE amAspectRatioMode + ) PURE; + + // this function is used to get the Aspect Ratio Correction mode on the pin. + STDMETHOD (GetAspectRatioMode)(THIS_ + OUT AM_ASPECT_RATIO_MODE* pamAspectRatioMode + ) PURE; + + // this function sets the stream to be transparent. That means that the stream is not going + // to occupy the whole of the rectangle (specified by SetRelativePosition), some of the region + // is going to be transparent i.e. the stream underneath, is going to see through. + // Calling this function on the primary stream would result in a return value of E_UNEXPECTED. + STDMETHOD (SetStreamTransparent)(THIS_ + IN BOOL bStreamTransparent + ) PURE; + + // this function is used to tell whether the stream is transparent or not. + STDMETHOD (GetStreamTransparent)(THIS_ + OUT BOOL *pbStreamTransparent + ) PURE; +}; + + +DECLARE_INTERFACE_(IMixerPinConfig2, IMixerPinConfig) +{ + // this functions sets the color-controls, if the vga chip supports it. + STDMETHOD (SetOverlaySurfaceColorControls)(THIS_ + IN LPDDCOLORCONTROL pColorControl + ) PURE; + + // this functions gets the color-controls. It also returns the capability of the vga hardware + // in the dwFlags value of the struct. + STDMETHOD (GetOverlaySurfaceColorControls)(THIS_ + OUT LPDDCOLORCONTROL pColorControl + ) PURE; +}; + +#ifdef __cplusplus +} +#endif + + +#endif // #define __IMPConfig__ + diff --git a/windows_libs/mssdk/include/mpegtype.h b/windows_libs/mssdk/include/mpegtype.h new file mode 100644 index 00000000..36c46d2c --- /dev/null +++ b/windows_libs/mssdk/include/mpegtype.h @@ -0,0 +1,119 @@ +//------------------------------------------------------------------------------ +// File: MPEGType.h +// +// Desc: MPEG system stream compound type definition +// +// Copyright (c) 1996 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __MPEGTYPE__ +#define __MPEGTYPE__ + +#ifdef __cplusplus +extern "C" { +#endif // __cplusplus + +// +// AM_MPEGSYSTEMTYPE defines the format block contents for +// data of type MEDIATYPE_MPEG1System when the format +// block GUID is FORMAT_MPEG1System +// +// The format block consists of elements of type +// AM_MPEGSYSTEMTYPE up to the length of the format block +// Each format block is 8-byte aligned from the start of +// the format block +// + +typedef struct tagAM_MPEGSTREAMTYPE +{ + DWORD dwStreamId; // Stream id of stream to process + DWORD dwReserved; // 8-byte alignment + AM_MEDIA_TYPE mt; // Type for substream - pbFormat is NULL + BYTE bFormat[1]; // Format data +} AM_MPEGSTREAMTYPE; + +typedef struct tagAM_MPEGSYSTEMTYPE +{ + DWORD dwBitRate; // Bits per second + DWORD cStreams; // Number of streams + AM_MPEGSTREAMTYPE Streams[1]; +} AM_MPEGSYSTEMTYPE; + +// +// Helper macros for AM_MPEGSTREAMTYPE +// +#define AM_MPEGSTREAMTYPE_ELEMENTLENGTH(pStreamType) \ + FIELD_OFFSET(AM_MPEGSTREAMTYPE, bFormat[(pStreamType)->mt.cbFormat]) +#define AM_MPEGSTREAMTYPE_NEXT(pStreamType) \ + ((AM_MPEGSTREAMTYPE *)((PBYTE)(pStreamType) + \ + ((AM_MPEGSTREAMTYPE_ELEMENTLENGTH(pStreamType) + 7) & ~7))) + +// +// IMpegAudioDecoder +// + +// Values for DualMode +#define AM_MPEG_AUDIO_DUAL_MERGE 0 +#define AM_MPEG_AUDIO_DUAL_LEFT 1 +#define AM_MPEG_AUDIO_DUAL_RIGHT 2 + +DECLARE_INTERFACE_(IMpegAudioDecoder, IUnknown) { + + STDMETHOD(get_FrequencyDivider) (THIS_ + unsigned long *pDivider /* [out] */ + ) PURE; + + STDMETHOD(put_FrequencyDivider) (THIS_ + unsigned long Divider /* [in] */ + ) PURE; + + STDMETHOD(get_DecoderAccuracy) (THIS_ + unsigned long *pAccuracy /* [out] */ + ) PURE; + + STDMETHOD(put_DecoderAccuracy) (THIS_ + unsigned long Accuracy /* [in] */ + ) PURE; + + STDMETHOD(get_Stereo) (THIS_ + unsigned long *pStereo /* [out] */ + ) PURE; + + STDMETHOD(put_Stereo) (THIS_ + unsigned long Stereo /* [in] */ + ) PURE; + + STDMETHOD(get_DecoderWordSize) (THIS_ + unsigned long *pWordSize /* [out] */ + ) PURE; + + STDMETHOD(put_DecoderWordSize) (THIS_ + unsigned long WordSize /* [in] */ + ) PURE; + + STDMETHOD(get_IntegerDecode) (THIS_ + unsigned long *pIntDecode /* [out] */ + ) PURE; + + STDMETHOD(put_IntegerDecode) (THIS_ + unsigned long IntDecode /* [in] */ + ) PURE; + + STDMETHOD(get_DualMode) (THIS_ + unsigned long *pIntDecode /* [out] */ + ) PURE; + + STDMETHOD(put_DualMode) (THIS_ + unsigned long IntDecode /* [in] */ + ) PURE; + + STDMETHOD(get_AudioFormat) (THIS_ + MPEG1WAVEFORMAT *lpFmt /* [out] */ + ) PURE; +}; + +#ifdef __cplusplus +} +#endif // __cplusplus +#endif // __MPEGTYPE__ diff --git a/windows_libs/mssdk/include/multimon.h b/windows_libs/mssdk/include/multimon.h new file mode 100644 index 00000000..1295b2e3 --- /dev/null +++ b/windows_libs/mssdk/include/multimon.h @@ -0,0 +1,484 @@ +//============================================================================= +// +// multimon.h -- Stub module that fakes multiple monitor apis on Win32 OSes +// without them. +// +// By using this header your code will get back default values from +// GetSystemMetrics() for new metrics, and the new multimonitor APIs +// will act like only one display is present on a Win32 OS without +// multimonitor APIs. +// +// Exactly one source must include this with COMPILE_MULTIMON_STUBS defined. +// +// Copyright (c) 1985-1998, Microsoft Corporation +// +//============================================================================= + +#ifdef __cplusplus +extern "C" { // Assume C declarations for C++ +#endif // __cplusplus + +// +// If we are building with Win95/NT4 headers, we need to declare +// the multimonitor-related metrics and APIs ourselves. +// +#ifndef SM_CMONITORS + +#define SM_XVIRTUALSCREEN 76 +#define SM_YVIRTUALSCREEN 77 +#define SM_CXVIRTUALSCREEN 78 +#define SM_CYVIRTUALSCREEN 79 +#define SM_CMONITORS 80 +#define SM_SAMEDISPLAYFORMAT 81 + +// HMONITOR is already declared if WINVER >= 0x0500 in windef.h +// This is for components built with an older version number. +// +#if !defined(HMONITOR_DECLARED) && (WINVER < 0x0500) +DECLARE_HANDLE(HMONITOR); +#define HMONITOR_DECLARED +#endif + +#define MONITOR_DEFAULTTONULL 0x00000000 +#define MONITOR_DEFAULTTOPRIMARY 0x00000001 +#define MONITOR_DEFAULTTONEAREST 0x00000002 + +#define MONITORINFOF_PRIMARY 0x00000001 + +typedef struct tagMONITORINFO +{ + DWORD cbSize; + RECT rcMonitor; + RECT rcWork; + DWORD dwFlags; +} MONITORINFO, *LPMONITORINFO; + +#ifndef CCHDEVICENAME +#define CCHDEVICENAME 32 +#endif + +#ifdef __cplusplus +typedef struct tagMONITORINFOEXA : public tagMONITORINFO +{ + CHAR szDevice[CCHDEVICENAME]; +} MONITORINFOEXA, *LPMONITORINFOEXA; +typedef struct tagMONITORINFOEXW : public tagMONITORINFO +{ + WCHAR szDevice[CCHDEVICENAME]; +} MONITORINFOEXW, *LPMONITORINFOEXW; +#ifdef UNICODE +typedef MONITORINFOEXW MONITORINFOEX; +typedef LPMONITORINFOEXW LPMONITORINFOEX; +#else +typedef MONITORINFOEXA MONITORINFOEX; +typedef LPMONITORINFOEXA LPMONITORINFOEX; +#endif // UNICODE +#else // ndef __cplusplus +typedef struct tagMONITORINFOEXA +{ + MONITORINFO; + CHAR szDevice[CCHDEVICENAME]; +} MONITORINFOEXA, *LPMONITORINFOEXA; +typedef struct tagMONITORINFOEXW +{ + MONITORINFO; + WCHAR szDevice[CCHDEVICENAME]; +} MONITORINFOEXW, *LPMONITORINFOEXW; +#ifdef UNICODE +typedef MONITORINFOEXW MONITORINFOEX; +typedef LPMONITORINFOEXW LPMONITORINFOEX; +#else +typedef MONITORINFOEXA MONITORINFOEX; +typedef LPMONITORINFOEXA LPMONITORINFOEX; +#endif // UNICODE +#endif + +typedef BOOL (CALLBACK* MONITORENUMPROC)(HMONITOR, HDC, LPRECT, LPARAM); + +#ifndef DISPLAY_DEVICE_ATTACHED_TO_DESKTOP +typedef struct _DISPLAY_DEVICEA { + DWORD cb; + CHAR DeviceName[32]; + CHAR DeviceString[128]; + DWORD StateFlags; + CHAR DeviceID[128]; + CHAR DeviceKey[128]; +} DISPLAY_DEVICEA, *PDISPLAY_DEVICEA, *LPDISPLAY_DEVICEA; +typedef struct _DISPLAY_DEVICEW { + DWORD cb; + WCHAR DeviceName[32]; + WCHAR DeviceString[128]; + DWORD StateFlags; + WCHAR DeviceID[128]; + WCHAR DeviceKey[128]; +} DISPLAY_DEVICEW, *PDISPLAY_DEVICEW, *LPDISPLAY_DEVICEW; +#ifdef UNICODE +typedef DISPLAY_DEVICEW DISPLAY_DEVICE; +typedef PDISPLAY_DEVICEW PDISPLAY_DEVICE; +typedef LPDISPLAY_DEVICEW LPDISPLAY_DEVICE; +#else +typedef DISPLAY_DEVICEA DISPLAY_DEVICE; +typedef PDISPLAY_DEVICEA PDISPLAY_DEVICE; +typedef LPDISPLAY_DEVICEA LPDISPLAY_DEVICE; +#endif // UNICODE + +#define DISPLAY_DEVICE_ATTACHED_TO_DESKTOP 0x00000001 +#define DISPLAY_DEVICE_MULTI_DRIVER 0x00000002 +#define DISPLAY_DEVICE_PRIMARY_DEVICE 0x00000004 +#define DISPLAY_DEVICE_MIRRORING_DRIVER 0x00000008 +#define DISPLAY_DEVICE_VGA_COMPATIBLE 0x00000010 +#endif + +#endif // SM_CMONITORS + +#undef GetMonitorInfo +#undef GetSystemMetrics +#undef MonitorFromWindow +#undef MonitorFromRect +#undef MonitorFromPoint +#undef EnumDisplayMonitors +#undef EnumDisplayDevices + +// +// Define COMPILE_MULTIMON_STUBS to compile the stubs; +// otherwise, you get the declarations. +// +#ifdef COMPILE_MULTIMON_STUBS + +//----------------------------------------------------------------------------- +// +// Implement the API stubs. +// +//----------------------------------------------------------------------------- + +#ifndef MULTIMON_FNS_DEFINED + +int (WINAPI* g_pfnGetSystemMetrics)(int) = NULL; +HMONITOR (WINAPI* g_pfnMonitorFromWindow)(HWND, DWORD) = NULL; +HMONITOR (WINAPI* g_pfnMonitorFromRect)(LPCRECT, DWORD) = NULL; +HMONITOR (WINAPI* g_pfnMonitorFromPoint)(POINT, DWORD) = NULL; +BOOL (WINAPI* g_pfnGetMonitorInfo)(HMONITOR, LPMONITORINFO) = NULL; +BOOL (WINAPI* g_pfnEnumDisplayMonitors)(HDC, LPCRECT, MONITORENUMPROC, LPARAM) = NULL; +BOOL (WINAPI* g_pfnEnumDisplayDevices)(PVOID, DWORD, PDISPLAY_DEVICE,DWORD) = NULL; +BOOL g_fMultiMonInitDone = FALSE; +BOOL g_fMultimonPlatformNT = FALSE; + +#endif + +BOOL IsPlatformNT() +{ + OSVERSIONINFOA osvi = {0}; + osvi.dwOSVersionInfoSize = sizeof(osvi); + GetVersionExA((OSVERSIONINFOA*)&osvi); + return (VER_PLATFORM_WIN32_NT == osvi.dwPlatformId); +} + +BOOL InitMultipleMonitorStubs(void) +{ + HMODULE hUser32; + if (g_fMultiMonInitDone) + { + return g_pfnGetMonitorInfo != NULL; + } + + g_fMultimonPlatformNT = IsPlatformNT(); + hUser32 = GetModuleHandle(TEXT("USER32")); + if (hUser32 && + (*(FARPROC*)&g_pfnGetSystemMetrics = GetProcAddress(hUser32,"GetSystemMetrics")) != NULL && + (*(FARPROC*)&g_pfnMonitorFromWindow = GetProcAddress(hUser32,"MonitorFromWindow")) != NULL && + (*(FARPROC*)&g_pfnMonitorFromRect = GetProcAddress(hUser32,"MonitorFromRect")) != NULL && + (*(FARPROC*)&g_pfnMonitorFromPoint = GetProcAddress(hUser32,"MonitorFromPoint")) != NULL && + (*(FARPROC*)&g_pfnEnumDisplayMonitors = GetProcAddress(hUser32,"EnumDisplayMonitors")) != NULL && +#ifdef UNICODE + (*(FARPROC*)&g_pfnEnumDisplayDevices = GetProcAddress(hUser32,"EnumDisplayDevicesW")) != NULL && + (*(FARPROC*)&g_pfnGetMonitorInfo = g_fMultimonPlatformNT ? GetProcAddress(hUser32,"GetMonitorInfoW") : + GetProcAddress(hUser32,"GetMonitorInfoA")) != NULL +#else + (*(FARPROC*)&g_pfnGetMonitorInfo = GetProcAddress(hUser32,"GetMonitorInfoA")) != NULL && + (*(FARPROC*)&g_pfnEnumDisplayDevices = GetProcAddress(hUser32,"EnumDisplayDevicesA")) != NULL +#endif + ) { + g_fMultiMonInitDone = TRUE; + return TRUE; + } + else + { + g_pfnGetSystemMetrics = NULL; + g_pfnMonitorFromWindow = NULL; + g_pfnMonitorFromRect = NULL; + g_pfnMonitorFromPoint = NULL; + g_pfnGetMonitorInfo = NULL; + g_pfnEnumDisplayMonitors = NULL; + g_pfnEnumDisplayDevices = NULL; + + g_fMultiMonInitDone = TRUE; + return FALSE; + } +} + +//----------------------------------------------------------------------------- +// +// fake implementations of Monitor APIs that work with the primary display +// no special parameter validation is made since these run in client code +// +//----------------------------------------------------------------------------- + +int WINAPI +xGetSystemMetrics(int nIndex) +{ + if (InitMultipleMonitorStubs()) + return g_pfnGetSystemMetrics(nIndex); + + switch (nIndex) + { + case SM_CMONITORS: + case SM_SAMEDISPLAYFORMAT: + return 1; + + case SM_XVIRTUALSCREEN: + case SM_YVIRTUALSCREEN: + return 0; + + case SM_CXVIRTUALSCREEN: + nIndex = SM_CXSCREEN; + break; + + case SM_CYVIRTUALSCREEN: + nIndex = SM_CYSCREEN; + break; + } + + return GetSystemMetrics(nIndex); +} + +#define xPRIMARY_MONITOR ((HMONITOR)0x12340042) + +HMONITOR WINAPI +xMonitorFromPoint(POINT ptScreenCoords, DWORD dwFlags) +{ + if (InitMultipleMonitorStubs()) + return g_pfnMonitorFromPoint(ptScreenCoords, dwFlags); + + if ((dwFlags & (MONITOR_DEFAULTTOPRIMARY | MONITOR_DEFAULTTONEAREST)) || + ((ptScreenCoords.x >= 0) && + (ptScreenCoords.x < GetSystemMetrics(SM_CXSCREEN)) && + (ptScreenCoords.y >= 0) && + (ptScreenCoords.y < GetSystemMetrics(SM_CYSCREEN)))) + { + return xPRIMARY_MONITOR; + } + + return NULL; +} + +HMONITOR WINAPI +xMonitorFromRect(LPCRECT lprcScreenCoords, DWORD dwFlags) +{ + if (InitMultipleMonitorStubs()) + return g_pfnMonitorFromRect(lprcScreenCoords, dwFlags); + + if ((dwFlags & (MONITOR_DEFAULTTOPRIMARY | MONITOR_DEFAULTTONEAREST)) || + ((lprcScreenCoords->right > 0) && + (lprcScreenCoords->bottom > 0) && + (lprcScreenCoords->left < GetSystemMetrics(SM_CXSCREEN)) && + (lprcScreenCoords->top < GetSystemMetrics(SM_CYSCREEN)))) + { + return xPRIMARY_MONITOR; + } + + return NULL; +} + +HMONITOR WINAPI +xMonitorFromWindow(HWND hWnd, DWORD dwFlags) +{ + WINDOWPLACEMENT wp; + + if (InitMultipleMonitorStubs()) + return g_pfnMonitorFromWindow(hWnd, dwFlags); + + if (dwFlags & (MONITOR_DEFAULTTOPRIMARY | MONITOR_DEFAULTTONEAREST)) + return xPRIMARY_MONITOR; + + if (IsIconic(hWnd) ? + GetWindowPlacement(hWnd, &wp) : + GetWindowRect(hWnd, &wp.rcNormalPosition)) { + + return xMonitorFromRect(&wp.rcNormalPosition, dwFlags); + } + + return NULL; +} + +BOOL WINAPI +xGetMonitorInfo(HMONITOR hMonitor, LPMONITORINFO lpMonitorInfo) +{ + RECT rcWork; + + if (InitMultipleMonitorStubs()) + { + BOOL f = g_pfnGetMonitorInfo(hMonitor, lpMonitorInfo); +#ifdef UNICODE + if (f && !g_fMultimonPlatformNT && (lpMonitorInfo->cbSize >= sizeof(MONITORINFOEX))) + { + MultiByteToWideChar(CP_ACP, 0, + (LPSTR)((MONITORINFOEX*)lpMonitorInfo)->szDevice, -1, + ((MONITORINFOEX*)lpMonitorInfo)->szDevice, (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR))); + } +#endif + return f; + } + + if ((hMonitor == xPRIMARY_MONITOR) && + lpMonitorInfo && + (lpMonitorInfo->cbSize >= sizeof(MONITORINFO)) && + SystemParametersInfoA(SPI_GETWORKAREA, 0, &rcWork, 0)) + { + lpMonitorInfo->rcMonitor.left = 0; + lpMonitorInfo->rcMonitor.top = 0; + lpMonitorInfo->rcMonitor.right = GetSystemMetrics(SM_CXSCREEN); + lpMonitorInfo->rcMonitor.bottom = GetSystemMetrics(SM_CYSCREEN); + lpMonitorInfo->rcWork = rcWork; + lpMonitorInfo->dwFlags = MONITORINFOF_PRIMARY; + + if (lpMonitorInfo->cbSize >= sizeof(MONITORINFOEX)) + { +#ifdef UNICODE + MultiByteToWideChar(CP_ACP, 0, "DISPLAY", -1, ((MONITORINFOEX*)lpMonitorInfo)->szDevice, (sizeof(((MONITORINFOEX*)lpMonitorInfo)->szDevice)/sizeof(TCHAR))); +#else // UNICODE + lstrcpy(((MONITORINFOEX*)lpMonitorInfo)->szDevice, TEXT("DISPLAY")); +#endif // UNICODE + } + + return TRUE; + } + + return FALSE; +} + +BOOL WINAPI +xEnumDisplayMonitors( + HDC hdcOptionalForPainting, + LPCRECT lprcEnumMonitorsThatIntersect, + MONITORENUMPROC lpfnEnumProc, + LPARAM dwData) +{ + RECT rcLimit; + + if (InitMultipleMonitorStubs()) { + return g_pfnEnumDisplayMonitors( + hdcOptionalForPainting, + lprcEnumMonitorsThatIntersect, + lpfnEnumProc, + dwData); + } + + if (!lpfnEnumProc) + return FALSE; + + rcLimit.left = 0; + rcLimit.top = 0; + rcLimit.right = GetSystemMetrics(SM_CXSCREEN); + rcLimit.bottom = GetSystemMetrics(SM_CYSCREEN); + + if (hdcOptionalForPainting) + { + RECT rcClip; + POINT ptOrg; + + switch (GetClipBox(hdcOptionalForPainting, &rcClip)) + { + default: + if (!GetDCOrgEx(hdcOptionalForPainting, &ptOrg)) + return FALSE; + + OffsetRect(&rcLimit, -ptOrg.x, -ptOrg.y); + if (IntersectRect(&rcLimit, &rcLimit, &rcClip) && + (!lprcEnumMonitorsThatIntersect || + IntersectRect(&rcLimit, &rcLimit, lprcEnumMonitorsThatIntersect))) { + + break; + } + //fall thru + case NULLREGION: + return TRUE; + case ERROR: + return FALSE; + } + } else { + if ( lprcEnumMonitorsThatIntersect && + !IntersectRect(&rcLimit, &rcLimit, lprcEnumMonitorsThatIntersect)) { + + return TRUE; + } + } + + return lpfnEnumProc( + xPRIMARY_MONITOR, + hdcOptionalForPainting, + &rcLimit, + dwData); +} + +BOOL WINAPI +xEnumDisplayDevices( + PVOID Unused, + DWORD iDevNum, + PDISPLAY_DEVICE lpDisplayDevice, + DWORD dwFlags) +{ + if (InitMultipleMonitorStubs()) + return g_pfnEnumDisplayDevices(Unused, iDevNum, lpDisplayDevice, dwFlags); + + if (Unused != NULL) + return FALSE; + + if (iDevNum != 0) + return FALSE; + + if (lpDisplayDevice == NULL || lpDisplayDevice->cb < sizeof(DISPLAY_DEVICE)) + return FALSE; + +#ifdef UNICODE + MultiByteToWideChar(CP_ACP, 0, "DISPLAY", -1, lpDisplayDevice->DeviceName, (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR))); + MultiByteToWideChar(CP_ACP, 0, "DISPLAY", -1, lpDisplayDevice->DeviceString, (sizeof(lpDisplayDevice->DeviceName)/sizeof(TCHAR))); +#else // UNICODE + lstrcpy((LPTSTR)lpDisplayDevice->DeviceName, TEXT("DISPLAY")); + lstrcpy((LPTSTR)lpDisplayDevice->DeviceString, TEXT("DISPLAY")); +#endif // UNICODE + + lpDisplayDevice->StateFlags = DISPLAY_DEVICE_ATTACHED_TO_DESKTOP | DISPLAY_DEVICE_PRIMARY_DEVICE; + + return TRUE; +} + +#undef xPRIMARY_MONITOR +#undef COMPILE_MULTIMON_STUBS + +#else // COMPILE_MULTIMON_STUBS + +extern int WINAPI xGetSystemMetrics(int); +extern HMONITOR WINAPI xMonitorFromWindow(HWND, DWORD); +extern HMONITOR WINAPI xMonitorFromRect(LPCRECT, DWORD); +extern HMONITOR WINAPI xMonitorFromPoint(POINT, DWORD); +extern BOOL WINAPI xGetMonitorInfo(HMONITOR, LPMONITORINFO); +extern BOOL WINAPI xEnumDisplayMonitors(HDC, LPCRECT, MONITORENUMPROC, LPARAM); +extern BOOL WINAPI xEnumDisplayDevices(PVOID, DWORD, PDISPLAY_DEVICE, DWORD); + +#endif // COMPILE_MULTIMON_STUBS + +// +// build defines that replace the regular APIs with our versions +// +#define GetSystemMetrics xGetSystemMetrics +#define MonitorFromWindow xMonitorFromWindow +#define MonitorFromRect xMonitorFromRect +#define MonitorFromPoint xMonitorFromPoint +#define GetMonitorInfo xGetMonitorInfo +#define EnumDisplayMonitors xEnumDisplayMonitors +#define EnumDisplayDevices xEnumDisplayDevices + +#ifdef __cplusplus +} +#endif // __cplusplus + diff --git a/windows_libs/mssdk/include/playlist.h b/windows_libs/mssdk/include/playlist.h new file mode 100644 index 00000000..60527560 --- /dev/null +++ b/windows_libs/mssdk/include/playlist.h @@ -0,0 +1,847 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 5.03.0286 */ +/* Compiler settings for playlist.idl: + Oicf (OptLev=i2), W1, Zp8, env=Win32 (32b run), ms_ext, c_ext, robust + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 475 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __playlist_h__ +#define __playlist_h__ + +/* Forward Declarations */ + +#ifndef __IAMPlayListItem_FWD_DEFINED__ +#define __IAMPlayListItem_FWD_DEFINED__ +typedef interface IAMPlayListItem IAMPlayListItem; +#endif /* __IAMPlayListItem_FWD_DEFINED__ */ + + +#ifndef __IAMPlayList_FWD_DEFINED__ +#define __IAMPlayList_FWD_DEFINED__ +typedef interface IAMPlayList IAMPlayList; +#endif /* __IAMPlayList_FWD_DEFINED__ */ + + +#ifndef __ISpecifyParticularPages_FWD_DEFINED__ +#define __ISpecifyParticularPages_FWD_DEFINED__ +typedef interface ISpecifyParticularPages ISpecifyParticularPages; +#endif /* __ISpecifyParticularPages_FWD_DEFINED__ */ + + +#ifndef __IAMRebuild_FWD_DEFINED__ +#define __IAMRebuild_FWD_DEFINED__ +typedef interface IAMRebuild IAMRebuild; +#endif /* __IAMRebuild_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "unknwn.h" +#include "strmif.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void __RPC_FAR * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void __RPC_FAR * ); + +/* interface __MIDL_itf_playlist_0000 */ +/* [local] */ + + +enum AMPlayListItemFlags + { AMPLAYLISTITEM_CANSKIP = 0x1, + AMPLAYLISTITEM_CANBIND = 0x2 + }; + + +extern RPC_IF_HANDLE __MIDL_itf_playlist_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_playlist_0000_v0_0_s_ifspec; + +#ifndef __IAMPlayListItem_INTERFACE_DEFINED__ +#define __IAMPlayListItem_INTERFACE_DEFINED__ + +/* interface IAMPlayListItem */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMPlayListItem; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868ff-0ad4-11ce-b03a-0020af0ba770") + IAMPlayListItem : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetFlags( + /* [out] */ DWORD __RPC_FAR *pdwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSourceCount( + /* [out] */ DWORD __RPC_FAR *pdwSources) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSourceURL( + /* [in] */ DWORD dwSourceIndex, + /* [out] */ BSTR __RPC_FAR *pbstrURL) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSourceStart( + /* [in] */ DWORD dwSourceIndex, + /* [out] */ REFERENCE_TIME __RPC_FAR *prtStart) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSourceDuration( + /* [in] */ DWORD dwSourceIndex, + /* [out] */ REFERENCE_TIME __RPC_FAR *prtDuration) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSourceStartMarker( + /* [in] */ DWORD dwSourceIndex, + /* [out] */ DWORD __RPC_FAR *pdwMarker) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSourceEndMarker( + /* [in] */ DWORD dwSourceIndex, + /* [out] */ DWORD __RPC_FAR *pdwMarker) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSourceStartMarkerName( + /* [in] */ DWORD dwSourceIndex, + /* [out] */ BSTR __RPC_FAR *pbstrStartMarker) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSourceEndMarkerName( + /* [in] */ DWORD dwSourceIndex, + /* [out] */ BSTR __RPC_FAR *pbstrEndMarker) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetLinkURL( + /* [out] */ BSTR __RPC_FAR *pbstrURL) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetScanDuration( + /* [in] */ DWORD dwSourceIndex, + /* [out] */ REFERENCE_TIME __RPC_FAR *prtScanDuration) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMPlayListItemVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + IAMPlayListItem __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + IAMPlayListItem __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetFlags )( + IAMPlayListItem __RPC_FAR * This, + /* [out] */ DWORD __RPC_FAR *pdwFlags); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetSourceCount )( + IAMPlayListItem __RPC_FAR * This, + /* [out] */ DWORD __RPC_FAR *pdwSources); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetSourceURL )( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ DWORD dwSourceIndex, + /* [out] */ BSTR __RPC_FAR *pbstrURL); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetSourceStart )( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ DWORD dwSourceIndex, + /* [out] */ REFERENCE_TIME __RPC_FAR *prtStart); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetSourceDuration )( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ DWORD dwSourceIndex, + /* [out] */ REFERENCE_TIME __RPC_FAR *prtDuration); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetSourceStartMarker )( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ DWORD dwSourceIndex, + /* [out] */ DWORD __RPC_FAR *pdwMarker); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetSourceEndMarker )( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ DWORD dwSourceIndex, + /* [out] */ DWORD __RPC_FAR *pdwMarker); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetSourceStartMarkerName )( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ DWORD dwSourceIndex, + /* [out] */ BSTR __RPC_FAR *pbstrStartMarker); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetSourceEndMarkerName )( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ DWORD dwSourceIndex, + /* [out] */ BSTR __RPC_FAR *pbstrEndMarker); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetLinkURL )( + IAMPlayListItem __RPC_FAR * This, + /* [out] */ BSTR __RPC_FAR *pbstrURL); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetScanDuration )( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ DWORD dwSourceIndex, + /* [out] */ REFERENCE_TIME __RPC_FAR *prtScanDuration); + + END_INTERFACE + } IAMPlayListItemVtbl; + + interface IAMPlayListItem + { + CONST_VTBL struct IAMPlayListItemVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMPlayListItem_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMPlayListItem_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMPlayListItem_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMPlayListItem_GetFlags(This,pdwFlags) \ + (This)->lpVtbl -> GetFlags(This,pdwFlags) + +#define IAMPlayListItem_GetSourceCount(This,pdwSources) \ + (This)->lpVtbl -> GetSourceCount(This,pdwSources) + +#define IAMPlayListItem_GetSourceURL(This,dwSourceIndex,pbstrURL) \ + (This)->lpVtbl -> GetSourceURL(This,dwSourceIndex,pbstrURL) + +#define IAMPlayListItem_GetSourceStart(This,dwSourceIndex,prtStart) \ + (This)->lpVtbl -> GetSourceStart(This,dwSourceIndex,prtStart) + +#define IAMPlayListItem_GetSourceDuration(This,dwSourceIndex,prtDuration) \ + (This)->lpVtbl -> GetSourceDuration(This,dwSourceIndex,prtDuration) + +#define IAMPlayListItem_GetSourceStartMarker(This,dwSourceIndex,pdwMarker) \ + (This)->lpVtbl -> GetSourceStartMarker(This,dwSourceIndex,pdwMarker) + +#define IAMPlayListItem_GetSourceEndMarker(This,dwSourceIndex,pdwMarker) \ + (This)->lpVtbl -> GetSourceEndMarker(This,dwSourceIndex,pdwMarker) + +#define IAMPlayListItem_GetSourceStartMarkerName(This,dwSourceIndex,pbstrStartMarker) \ + (This)->lpVtbl -> GetSourceStartMarkerName(This,dwSourceIndex,pbstrStartMarker) + +#define IAMPlayListItem_GetSourceEndMarkerName(This,dwSourceIndex,pbstrEndMarker) \ + (This)->lpVtbl -> GetSourceEndMarkerName(This,dwSourceIndex,pbstrEndMarker) + +#define IAMPlayListItem_GetLinkURL(This,pbstrURL) \ + (This)->lpVtbl -> GetLinkURL(This,pbstrURL) + +#define IAMPlayListItem_GetScanDuration(This,dwSourceIndex,prtScanDuration) \ + (This)->lpVtbl -> GetScanDuration(This,dwSourceIndex,prtScanDuration) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMPlayListItem_GetFlags_Proxy( + IAMPlayListItem __RPC_FAR * This, + /* [out] */ DWORD __RPC_FAR *pdwFlags); + + +void __RPC_STUB IAMPlayListItem_GetFlags_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPlayListItem_GetSourceCount_Proxy( + IAMPlayListItem __RPC_FAR * This, + /* [out] */ DWORD __RPC_FAR *pdwSources); + + +void __RPC_STUB IAMPlayListItem_GetSourceCount_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPlayListItem_GetSourceURL_Proxy( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ DWORD dwSourceIndex, + /* [out] */ BSTR __RPC_FAR *pbstrURL); + + +void __RPC_STUB IAMPlayListItem_GetSourceURL_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPlayListItem_GetSourceStart_Proxy( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ DWORD dwSourceIndex, + /* [out] */ REFERENCE_TIME __RPC_FAR *prtStart); + + +void __RPC_STUB IAMPlayListItem_GetSourceStart_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPlayListItem_GetSourceDuration_Proxy( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ DWORD dwSourceIndex, + /* [out] */ REFERENCE_TIME __RPC_FAR *prtDuration); + + +void __RPC_STUB IAMPlayListItem_GetSourceDuration_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPlayListItem_GetSourceStartMarker_Proxy( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ DWORD dwSourceIndex, + /* [out] */ DWORD __RPC_FAR *pdwMarker); + + +void __RPC_STUB IAMPlayListItem_GetSourceStartMarker_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPlayListItem_GetSourceEndMarker_Proxy( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ DWORD dwSourceIndex, + /* [out] */ DWORD __RPC_FAR *pdwMarker); + + +void __RPC_STUB IAMPlayListItem_GetSourceEndMarker_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPlayListItem_GetSourceStartMarkerName_Proxy( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ DWORD dwSourceIndex, + /* [out] */ BSTR __RPC_FAR *pbstrStartMarker); + + +void __RPC_STUB IAMPlayListItem_GetSourceStartMarkerName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPlayListItem_GetSourceEndMarkerName_Proxy( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ DWORD dwSourceIndex, + /* [out] */ BSTR __RPC_FAR *pbstrEndMarker); + + +void __RPC_STUB IAMPlayListItem_GetSourceEndMarkerName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPlayListItem_GetLinkURL_Proxy( + IAMPlayListItem __RPC_FAR * This, + /* [out] */ BSTR __RPC_FAR *pbstrURL); + + +void __RPC_STUB IAMPlayListItem_GetLinkURL_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPlayListItem_GetScanDuration_Proxy( + IAMPlayListItem __RPC_FAR * This, + /* [in] */ DWORD dwSourceIndex, + /* [out] */ REFERENCE_TIME __RPC_FAR *prtScanDuration); + + +void __RPC_STUB IAMPlayListItem_GetScanDuration_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMPlayListItem_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_playlist_0348 */ +/* [local] */ + + +enum AMPlayListFlags + { AMPLAYLIST_STARTINSCANMODE = 0x1, + AMPLAYLIST_FORCEBANNER = 0x2 + }; + +enum AMPlayListEventFlags + { AMPLAYLISTEVENT_RESUME = 0, + AMPLAYLISTEVENT_BREAK = 0x1, + AMPLAYLISTEVENT_NEXT = 0x2, + AMPLAYLISTEVENT_MASK = 0xf, + AMPLAYLISTEVENT_REFRESH = 0x10 + }; + + +extern RPC_IF_HANDLE __MIDL_itf_playlist_0348_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_playlist_0348_v0_0_s_ifspec; + +#ifndef __IAMPlayList_INTERFACE_DEFINED__ +#define __IAMPlayList_INTERFACE_DEFINED__ + +/* interface IAMPlayList */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMPlayList; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868fe-0ad4-11ce-b03a-0020af0ba770") + IAMPlayList : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetFlags( + /* [out] */ DWORD __RPC_FAR *pdwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetItemCount( + /* [out] */ DWORD __RPC_FAR *pdwItems) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetItem( + /* [in] */ DWORD dwItemIndex, + /* [out] */ IAMPlayListItem __RPC_FAR *__RPC_FAR *ppItem) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetNamedEvent( + /* [in] */ WCHAR __RPC_FAR *pwszEventName, + /* [in] */ DWORD dwItemIndex, + /* [out] */ IAMPlayListItem __RPC_FAR *__RPC_FAR *ppItem, + /* [out] */ DWORD __RPC_FAR *pdwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRepeatInfo( + /* [out] */ DWORD __RPC_FAR *pdwRepeatCount, + /* [out] */ DWORD __RPC_FAR *pdwRepeatStart, + /* [out] */ DWORD __RPC_FAR *pdwRepeatEnd) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMPlayListVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + IAMPlayList __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + IAMPlayList __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + IAMPlayList __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetFlags )( + IAMPlayList __RPC_FAR * This, + /* [out] */ DWORD __RPC_FAR *pdwFlags); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetItemCount )( + IAMPlayList __RPC_FAR * This, + /* [out] */ DWORD __RPC_FAR *pdwItems); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetItem )( + IAMPlayList __RPC_FAR * This, + /* [in] */ DWORD dwItemIndex, + /* [out] */ IAMPlayListItem __RPC_FAR *__RPC_FAR *ppItem); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetNamedEvent )( + IAMPlayList __RPC_FAR * This, + /* [in] */ WCHAR __RPC_FAR *pwszEventName, + /* [in] */ DWORD dwItemIndex, + /* [out] */ IAMPlayListItem __RPC_FAR *__RPC_FAR *ppItem, + /* [out] */ DWORD __RPC_FAR *pdwFlags); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetRepeatInfo )( + IAMPlayList __RPC_FAR * This, + /* [out] */ DWORD __RPC_FAR *pdwRepeatCount, + /* [out] */ DWORD __RPC_FAR *pdwRepeatStart, + /* [out] */ DWORD __RPC_FAR *pdwRepeatEnd); + + END_INTERFACE + } IAMPlayListVtbl; + + interface IAMPlayList + { + CONST_VTBL struct IAMPlayListVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMPlayList_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMPlayList_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMPlayList_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMPlayList_GetFlags(This,pdwFlags) \ + (This)->lpVtbl -> GetFlags(This,pdwFlags) + +#define IAMPlayList_GetItemCount(This,pdwItems) \ + (This)->lpVtbl -> GetItemCount(This,pdwItems) + +#define IAMPlayList_GetItem(This,dwItemIndex,ppItem) \ + (This)->lpVtbl -> GetItem(This,dwItemIndex,ppItem) + +#define IAMPlayList_GetNamedEvent(This,pwszEventName,dwItemIndex,ppItem,pdwFlags) \ + (This)->lpVtbl -> GetNamedEvent(This,pwszEventName,dwItemIndex,ppItem,pdwFlags) + +#define IAMPlayList_GetRepeatInfo(This,pdwRepeatCount,pdwRepeatStart,pdwRepeatEnd) \ + (This)->lpVtbl -> GetRepeatInfo(This,pdwRepeatCount,pdwRepeatStart,pdwRepeatEnd) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMPlayList_GetFlags_Proxy( + IAMPlayList __RPC_FAR * This, + /* [out] */ DWORD __RPC_FAR *pdwFlags); + + +void __RPC_STUB IAMPlayList_GetFlags_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPlayList_GetItemCount_Proxy( + IAMPlayList __RPC_FAR * This, + /* [out] */ DWORD __RPC_FAR *pdwItems); + + +void __RPC_STUB IAMPlayList_GetItemCount_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPlayList_GetItem_Proxy( + IAMPlayList __RPC_FAR * This, + /* [in] */ DWORD dwItemIndex, + /* [out] */ IAMPlayListItem __RPC_FAR *__RPC_FAR *ppItem); + + +void __RPC_STUB IAMPlayList_GetItem_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPlayList_GetNamedEvent_Proxy( + IAMPlayList __RPC_FAR * This, + /* [in] */ WCHAR __RPC_FAR *pwszEventName, + /* [in] */ DWORD dwItemIndex, + /* [out] */ IAMPlayListItem __RPC_FAR *__RPC_FAR *ppItem, + /* [out] */ DWORD __RPC_FAR *pdwFlags); + + +void __RPC_STUB IAMPlayList_GetNamedEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPlayList_GetRepeatInfo_Proxy( + IAMPlayList __RPC_FAR * This, + /* [out] */ DWORD __RPC_FAR *pdwRepeatCount, + /* [out] */ DWORD __RPC_FAR *pdwRepeatStart, + /* [out] */ DWORD __RPC_FAR *pdwRepeatEnd); + + +void __RPC_STUB IAMPlayList_GetRepeatInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMPlayList_INTERFACE_DEFINED__ */ + + +#ifndef __ISpecifyParticularPages_INTERFACE_DEFINED__ +#define __ISpecifyParticularPages_INTERFACE_DEFINED__ + +/* interface ISpecifyParticularPages */ +/* [object][helpstring][uuid] */ + + +EXTERN_C const IID IID_ISpecifyParticularPages; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("4C437B91-6E9E-11d1-A704-006097C4E476") + ISpecifyParticularPages : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetPages( + /* [in] */ REFGUID guidWhatPages, + /* [out] */ CAUUID __RPC_FAR *pPages) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISpecifyParticularPagesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + ISpecifyParticularPages __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + ISpecifyParticularPages __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + ISpecifyParticularPages __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *GetPages )( + ISpecifyParticularPages __RPC_FAR * This, + /* [in] */ REFGUID guidWhatPages, + /* [out] */ CAUUID __RPC_FAR *pPages); + + END_INTERFACE + } ISpecifyParticularPagesVtbl; + + interface ISpecifyParticularPages + { + CONST_VTBL struct ISpecifyParticularPagesVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISpecifyParticularPages_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISpecifyParticularPages_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISpecifyParticularPages_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISpecifyParticularPages_GetPages(This,guidWhatPages,pPages) \ + (This)->lpVtbl -> GetPages(This,guidWhatPages,pPages) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISpecifyParticularPages_GetPages_Proxy( + ISpecifyParticularPages __RPC_FAR * This, + /* [in] */ REFGUID guidWhatPages, + /* [out] */ CAUUID __RPC_FAR *pPages); + + +void __RPC_STUB ISpecifyParticularPages_GetPages_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISpecifyParticularPages_INTERFACE_DEFINED__ */ + + +#ifndef __IAMRebuild_INTERFACE_DEFINED__ +#define __IAMRebuild_INTERFACE_DEFINED__ + +/* interface IAMRebuild */ +/* [object][helpstring][uuid][local] */ + + +EXTERN_C const IID IID_IAMRebuild; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("02EF04DD-7580-11d1-BECE-00C04FB6E937") + IAMRebuild : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE RebuildNow( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMRebuildVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *QueryInterface )( + IAMRebuild __RPC_FAR * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *AddRef )( + IAMRebuild __RPC_FAR * This); + + ULONG ( STDMETHODCALLTYPE __RPC_FAR *Release )( + IAMRebuild __RPC_FAR * This); + + HRESULT ( STDMETHODCALLTYPE __RPC_FAR *RebuildNow )( + IAMRebuild __RPC_FAR * This); + + END_INTERFACE + } IAMRebuildVtbl; + + interface IAMRebuild + { + CONST_VTBL struct IAMRebuildVtbl __RPC_FAR *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMRebuild_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMRebuild_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMRebuild_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMRebuild_RebuildNow(This) \ + (This)->lpVtbl -> RebuildNow(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMRebuild_RebuildNow_Proxy( + IAMRebuild __RPC_FAR * This); + + +void __RPC_STUB IAMRebuild_RebuildNow_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMRebuild_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_playlist_0351 */ +/* [local] */ + +EXTERN_GUID(IID_IAMPlayListItem,0x56a868ff,0x0ad4,0x11ce,0xb0,0xa3,0x0,0x20,0xaf,0x0b,0xa7,0x70); +EXTERN_GUID(IID_IAMRebuild,0x2ef04dd,0x7580,0x11d1,0xbe,0xce,0x0,0xc0,0x4f,0xb6,0xe9,0x37); +EXTERN_GUID(IID_IAMPlayList,0x56a868fe,0x0ad4,0x11ce,0xb0,0xa3,0x0,0x20,0xaf,0x0b,0xa7,0x70); +EXTERN_GUID(SPECIFYPAGES_STATISTICS,0x4c437b92,0x6e9e,0x11d1,0xa7,0x4,0x0,0x60,0x97,0xc4,0xe4,0x76); +EXTERN_GUID(IID_ISpecifyParticularPages,0x4c437b91,0x6e9e,0x11d1,0xa7,0x4,0x0,0x60,0x97,0xc4,0xe4,0x76); + + +extern RPC_IF_HANDLE __MIDL_itf_playlist_0351_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_playlist_0351_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER BSTR_UserSize( unsigned long __RPC_FAR *, unsigned long , BSTR __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER BSTR_UserMarshal( unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, BSTR __RPC_FAR * ); +unsigned char __RPC_FAR * __RPC_USER BSTR_UserUnmarshal(unsigned long __RPC_FAR *, unsigned char __RPC_FAR *, BSTR __RPC_FAR * ); +void __RPC_USER BSTR_UserFree( unsigned long __RPC_FAR *, BSTR __RPC_FAR * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/qedit.h b/windows_libs/mssdk/include/qedit.h new file mode 100644 index 00000000..35b4212c --- /dev/null +++ b/windows_libs/mssdk/include/qedit.h @@ -0,0 +1,9910 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0338 */ +/* Compiler settings for qedit.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __qedit_h__ +#define __qedit_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IPropertySetter_FWD_DEFINED__ +#define __IPropertySetter_FWD_DEFINED__ +typedef interface IPropertySetter IPropertySetter; +#endif /* __IPropertySetter_FWD_DEFINED__ */ + + +#ifndef __IDxtCompositor_FWD_DEFINED__ +#define __IDxtCompositor_FWD_DEFINED__ +typedef interface IDxtCompositor IDxtCompositor; +#endif /* __IDxtCompositor_FWD_DEFINED__ */ + + +#ifndef __IDxtAlphaSetter_FWD_DEFINED__ +#define __IDxtAlphaSetter_FWD_DEFINED__ +typedef interface IDxtAlphaSetter IDxtAlphaSetter; +#endif /* __IDxtAlphaSetter_FWD_DEFINED__ */ + + +#ifndef __IDxtJpeg_FWD_DEFINED__ +#define __IDxtJpeg_FWD_DEFINED__ +typedef interface IDxtJpeg IDxtJpeg; +#endif /* __IDxtJpeg_FWD_DEFINED__ */ + + +#ifndef __IDxtKey_FWD_DEFINED__ +#define __IDxtKey_FWD_DEFINED__ +typedef interface IDxtKey IDxtKey; +#endif /* __IDxtKey_FWD_DEFINED__ */ + + +#ifndef __IMediaLocator_FWD_DEFINED__ +#define __IMediaLocator_FWD_DEFINED__ +typedef interface IMediaLocator IMediaLocator; +#endif /* __IMediaLocator_FWD_DEFINED__ */ + + +#ifndef __IMediaDet_FWD_DEFINED__ +#define __IMediaDet_FWD_DEFINED__ +typedef interface IMediaDet IMediaDet; +#endif /* __IMediaDet_FWD_DEFINED__ */ + + +#ifndef __IGrfCache_FWD_DEFINED__ +#define __IGrfCache_FWD_DEFINED__ +typedef interface IGrfCache IGrfCache; +#endif /* __IGrfCache_FWD_DEFINED__ */ + + +#ifndef __IRenderEngine_FWD_DEFINED__ +#define __IRenderEngine_FWD_DEFINED__ +typedef interface IRenderEngine IRenderEngine; +#endif /* __IRenderEngine_FWD_DEFINED__ */ + + +#ifndef __IFindCompressorCB_FWD_DEFINED__ +#define __IFindCompressorCB_FWD_DEFINED__ +typedef interface IFindCompressorCB IFindCompressorCB; +#endif /* __IFindCompressorCB_FWD_DEFINED__ */ + + +#ifndef __ISmartRenderEngine_FWD_DEFINED__ +#define __ISmartRenderEngine_FWD_DEFINED__ +typedef interface ISmartRenderEngine ISmartRenderEngine; +#endif /* __ISmartRenderEngine_FWD_DEFINED__ */ + + +#ifndef __IAMTimelineObj_FWD_DEFINED__ +#define __IAMTimelineObj_FWD_DEFINED__ +typedef interface IAMTimelineObj IAMTimelineObj; +#endif /* __IAMTimelineObj_FWD_DEFINED__ */ + + +#ifndef __IAMTimelineEffectable_FWD_DEFINED__ +#define __IAMTimelineEffectable_FWD_DEFINED__ +typedef interface IAMTimelineEffectable IAMTimelineEffectable; +#endif /* __IAMTimelineEffectable_FWD_DEFINED__ */ + + +#ifndef __IAMTimelineEffect_FWD_DEFINED__ +#define __IAMTimelineEffect_FWD_DEFINED__ +typedef interface IAMTimelineEffect IAMTimelineEffect; +#endif /* __IAMTimelineEffect_FWD_DEFINED__ */ + + +#ifndef __IAMTimelineTransable_FWD_DEFINED__ +#define __IAMTimelineTransable_FWD_DEFINED__ +typedef interface IAMTimelineTransable IAMTimelineTransable; +#endif /* __IAMTimelineTransable_FWD_DEFINED__ */ + + +#ifndef __IAMTimelineSplittable_FWD_DEFINED__ +#define __IAMTimelineSplittable_FWD_DEFINED__ +typedef interface IAMTimelineSplittable IAMTimelineSplittable; +#endif /* __IAMTimelineSplittable_FWD_DEFINED__ */ + + +#ifndef __IAMTimelineTrans_FWD_DEFINED__ +#define __IAMTimelineTrans_FWD_DEFINED__ +typedef interface IAMTimelineTrans IAMTimelineTrans; +#endif /* __IAMTimelineTrans_FWD_DEFINED__ */ + + +#ifndef __IAMTimelineSrc_FWD_DEFINED__ +#define __IAMTimelineSrc_FWD_DEFINED__ +typedef interface IAMTimelineSrc IAMTimelineSrc; +#endif /* __IAMTimelineSrc_FWD_DEFINED__ */ + + +#ifndef __IAMTimelineTrack_FWD_DEFINED__ +#define __IAMTimelineTrack_FWD_DEFINED__ +typedef interface IAMTimelineTrack IAMTimelineTrack; +#endif /* __IAMTimelineTrack_FWD_DEFINED__ */ + + +#ifndef __IAMTimelineVirtualTrack_FWD_DEFINED__ +#define __IAMTimelineVirtualTrack_FWD_DEFINED__ +typedef interface IAMTimelineVirtualTrack IAMTimelineVirtualTrack; +#endif /* __IAMTimelineVirtualTrack_FWD_DEFINED__ */ + + +#ifndef __IAMTimelineComp_FWD_DEFINED__ +#define __IAMTimelineComp_FWD_DEFINED__ +typedef interface IAMTimelineComp IAMTimelineComp; +#endif /* __IAMTimelineComp_FWD_DEFINED__ */ + + +#ifndef __IAMTimelineGroup_FWD_DEFINED__ +#define __IAMTimelineGroup_FWD_DEFINED__ +typedef interface IAMTimelineGroup IAMTimelineGroup; +#endif /* __IAMTimelineGroup_FWD_DEFINED__ */ + + +#ifndef __IAMTimeline_FWD_DEFINED__ +#define __IAMTimeline_FWD_DEFINED__ +typedef interface IAMTimeline IAMTimeline; +#endif /* __IAMTimeline_FWD_DEFINED__ */ + + +#ifndef __IXml2Dex_FWD_DEFINED__ +#define __IXml2Dex_FWD_DEFINED__ +typedef interface IXml2Dex IXml2Dex; +#endif /* __IXml2Dex_FWD_DEFINED__ */ + + +#ifndef __IAMErrorLog_FWD_DEFINED__ +#define __IAMErrorLog_FWD_DEFINED__ +typedef interface IAMErrorLog IAMErrorLog; +#endif /* __IAMErrorLog_FWD_DEFINED__ */ + + +#ifndef __IAMSetErrorLog_FWD_DEFINED__ +#define __IAMSetErrorLog_FWD_DEFINED__ +typedef interface IAMSetErrorLog IAMSetErrorLog; +#endif /* __IAMSetErrorLog_FWD_DEFINED__ */ + + +#ifndef __ISampleGrabberCB_FWD_DEFINED__ +#define __ISampleGrabberCB_FWD_DEFINED__ +typedef interface ISampleGrabberCB ISampleGrabberCB; +#endif /* __ISampleGrabberCB_FWD_DEFINED__ */ + + +#ifndef __ISampleGrabber_FWD_DEFINED__ +#define __ISampleGrabber_FWD_DEFINED__ +typedef interface ISampleGrabber ISampleGrabber; +#endif /* __ISampleGrabber_FWD_DEFINED__ */ + + +#ifndef __AMTimeline_FWD_DEFINED__ +#define __AMTimeline_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class AMTimeline AMTimeline; +#else +typedef struct AMTimeline AMTimeline; +#endif /* __cplusplus */ + +#endif /* __AMTimeline_FWD_DEFINED__ */ + + +#ifndef __AMTimelineObj_FWD_DEFINED__ +#define __AMTimelineObj_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class AMTimelineObj AMTimelineObj; +#else +typedef struct AMTimelineObj AMTimelineObj; +#endif /* __cplusplus */ + +#endif /* __AMTimelineObj_FWD_DEFINED__ */ + + +#ifndef __AMTimelineSrc_FWD_DEFINED__ +#define __AMTimelineSrc_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class AMTimelineSrc AMTimelineSrc; +#else +typedef struct AMTimelineSrc AMTimelineSrc; +#endif /* __cplusplus */ + +#endif /* __AMTimelineSrc_FWD_DEFINED__ */ + + +#ifndef __AMTimelineTrack_FWD_DEFINED__ +#define __AMTimelineTrack_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class AMTimelineTrack AMTimelineTrack; +#else +typedef struct AMTimelineTrack AMTimelineTrack; +#endif /* __cplusplus */ + +#endif /* __AMTimelineTrack_FWD_DEFINED__ */ + + +#ifndef __AMTimelineComp_FWD_DEFINED__ +#define __AMTimelineComp_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class AMTimelineComp AMTimelineComp; +#else +typedef struct AMTimelineComp AMTimelineComp; +#endif /* __cplusplus */ + +#endif /* __AMTimelineComp_FWD_DEFINED__ */ + + +#ifndef __AMTimelineGroup_FWD_DEFINED__ +#define __AMTimelineGroup_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class AMTimelineGroup AMTimelineGroup; +#else +typedef struct AMTimelineGroup AMTimelineGroup; +#endif /* __cplusplus */ + +#endif /* __AMTimelineGroup_FWD_DEFINED__ */ + + +#ifndef __AMTimelineTrans_FWD_DEFINED__ +#define __AMTimelineTrans_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class AMTimelineTrans AMTimelineTrans; +#else +typedef struct AMTimelineTrans AMTimelineTrans; +#endif /* __cplusplus */ + +#endif /* __AMTimelineTrans_FWD_DEFINED__ */ + + +#ifndef __AMTimelineEffect_FWD_DEFINED__ +#define __AMTimelineEffect_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class AMTimelineEffect AMTimelineEffect; +#else +typedef struct AMTimelineEffect AMTimelineEffect; +#endif /* __cplusplus */ + +#endif /* __AMTimelineEffect_FWD_DEFINED__ */ + + +#ifndef __RenderEngine_FWD_DEFINED__ +#define __RenderEngine_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class RenderEngine RenderEngine; +#else +typedef struct RenderEngine RenderEngine; +#endif /* __cplusplus */ + +#endif /* __RenderEngine_FWD_DEFINED__ */ + + +#ifndef __SmartRenderEngine_FWD_DEFINED__ +#define __SmartRenderEngine_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SmartRenderEngine SmartRenderEngine; +#else +typedef struct SmartRenderEngine SmartRenderEngine; +#endif /* __cplusplus */ + +#endif /* __SmartRenderEngine_FWD_DEFINED__ */ + + +#ifndef __AudMixer_FWD_DEFINED__ +#define __AudMixer_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class AudMixer AudMixer; +#else +typedef struct AudMixer AudMixer; +#endif /* __cplusplus */ + +#endif /* __AudMixer_FWD_DEFINED__ */ + + +#ifndef __Xml2Dex_FWD_DEFINED__ +#define __Xml2Dex_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class Xml2Dex Xml2Dex; +#else +typedef struct Xml2Dex Xml2Dex; +#endif /* __cplusplus */ + +#endif /* __Xml2Dex_FWD_DEFINED__ */ + + +#ifndef __MediaLocator_FWD_DEFINED__ +#define __MediaLocator_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class MediaLocator MediaLocator; +#else +typedef struct MediaLocator MediaLocator; +#endif /* __cplusplus */ + +#endif /* __MediaLocator_FWD_DEFINED__ */ + + +#ifndef __PropertySetter_FWD_DEFINED__ +#define __PropertySetter_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class PropertySetter PropertySetter; +#else +typedef struct PropertySetter PropertySetter; +#endif /* __cplusplus */ + +#endif /* __PropertySetter_FWD_DEFINED__ */ + + +#ifndef __MediaDet_FWD_DEFINED__ +#define __MediaDet_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class MediaDet MediaDet; +#else +typedef struct MediaDet MediaDet; +#endif /* __cplusplus */ + +#endif /* __MediaDet_FWD_DEFINED__ */ + + +#ifndef __SampleGrabber_FWD_DEFINED__ +#define __SampleGrabber_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SampleGrabber SampleGrabber; +#else +typedef struct SampleGrabber SampleGrabber; +#endif /* __cplusplus */ + +#endif /* __SampleGrabber_FWD_DEFINED__ */ + + +#ifndef __NullRenderer_FWD_DEFINED__ +#define __NullRenderer_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class NullRenderer NullRenderer; +#else +typedef struct NullRenderer NullRenderer; +#endif /* __cplusplus */ + +#endif /* __NullRenderer_FWD_DEFINED__ */ + + +#ifndef __DxtCompositor_FWD_DEFINED__ +#define __DxtCompositor_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DxtCompositor DxtCompositor; +#else +typedef struct DxtCompositor DxtCompositor; +#endif /* __cplusplus */ + +#endif /* __DxtCompositor_FWD_DEFINED__ */ + + +#ifndef __DxtAlphaSetter_FWD_DEFINED__ +#define __DxtAlphaSetter_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DxtAlphaSetter DxtAlphaSetter; +#else +typedef struct DxtAlphaSetter DxtAlphaSetter; +#endif /* __cplusplus */ + +#endif /* __DxtAlphaSetter_FWD_DEFINED__ */ + + +#ifndef __DxtJpeg_FWD_DEFINED__ +#define __DxtJpeg_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DxtJpeg DxtJpeg; +#else +typedef struct DxtJpeg DxtJpeg; +#endif /* __cplusplus */ + +#endif /* __DxtJpeg_FWD_DEFINED__ */ + + +#ifndef __ColorSource_FWD_DEFINED__ +#define __ColorSource_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class ColorSource ColorSource; +#else +typedef struct ColorSource ColorSource; +#endif /* __cplusplus */ + +#endif /* __ColorSource_FWD_DEFINED__ */ + + +#ifndef __DxtKey_FWD_DEFINED__ +#define __DxtKey_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DxtKey DxtKey; +#else +typedef struct DxtKey DxtKey; +#endif /* __cplusplus */ + +#endif /* __DxtKey_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "ocidl.h" +#include "dxtrans.h" +#include "amstream.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_qedit_0000 */ +/* [local] */ + + + + + + + + + + +typedef /* [public] */ +enum __MIDL___MIDL_itf_qedit_0000_0001 + { DEXTERF_JUMP = 0, + DEXTERF_INTERPOLATE = DEXTERF_JUMP + 1 + } DEXTERF; + +typedef /* [public][public][public][public] */ struct __MIDL___MIDL_itf_qedit_0000_0002 + { + BSTR Name; + DISPID dispID; + LONG nValues; + } DEXTER_PARAM; + +typedef /* [public][public][public][public] */ struct __MIDL___MIDL_itf_qedit_0000_0003 + { + VARIANT v; + REFERENCE_TIME rt; + DWORD dwInterp; + } DEXTER_VALUE; + + +enum __MIDL___MIDL_itf_qedit_0000_0004 + { DEXTER_AUDIO_JUMP = 0, + DEXTER_AUDIO_INTERPOLATE = DEXTER_AUDIO_JUMP + 1 + } ; +typedef /* [public] */ struct __MIDL___MIDL_itf_qedit_0000_0005 + { + REFERENCE_TIME rtEnd; + double dLevel; + BOOL bMethod; + } DEXTER_AUDIO_VOLUMEENVELOPE; + + +enum __MIDL___MIDL_itf_qedit_0000_0006 + { TIMELINE_INSERT_MODE_INSERT = 1, + TIMELINE_INSERT_MODE_OVERLAY = 2 + } ; +typedef /* [public][public][public][public][public][public][public][public] */ +enum __MIDL___MIDL_itf_qedit_0000_0007 + { TIMELINE_MAJOR_TYPE_COMPOSITE = 1, + TIMELINE_MAJOR_TYPE_TRACK = 2, + TIMELINE_MAJOR_TYPE_SOURCE = 4, + TIMELINE_MAJOR_TYPE_TRANSITION = 8, + TIMELINE_MAJOR_TYPE_EFFECT = 16, + TIMELINE_MAJOR_TYPE_GROUP = 128 + } TIMELINE_MAJOR_TYPE; + +typedef /* [public] */ +enum __MIDL___MIDL_itf_qedit_0000_0008 + { DEXTERF_BOUNDING = -1, + DEXTERF_EXACTLY_AT = 0, + DEXTERF_FORWARDS = 1 + } DEXTERF_TRACK_SEARCH_FLAGS; + +typedef struct _SCompFmt0 + { + long nFormatId; + AM_MEDIA_TYPE MediaType; + } SCompFmt0; + + +enum __MIDL___MIDL_itf_qedit_0000_0009 + { RESIZEF_STRETCH = 0, + RESIZEF_CROP = RESIZEF_STRETCH + 1, + RESIZEF_PRESERVEASPECTRATIO = RESIZEF_CROP + 1, + RESIZEF_PRESERVEASPECTRATIO_NOLETTERBOX = RESIZEF_PRESERVEASPECTRATIO + 1 + } ; + +enum __MIDL___MIDL_itf_qedit_0000_0010 + { CONNECTF_DYNAMIC_NONE = 0, + CONNECTF_DYNAMIC_SOURCES = 0x1, + CONNECTF_DYNAMIC_EFFECTS = 0x2 + } ; + +enum __MIDL___MIDL_itf_qedit_0000_0011 + { SFN_VALIDATEF_CHECK = 0x1, + SFN_VALIDATEF_POPUP = 0x2, + SFN_VALIDATEF_TELLME = 0x4, + SFN_VALIDATEF_REPLACE = 0x8, + SFN_VALIDATEF_USELOCAL = 0x10, + SFN_VALIDATEF_NOFIND = 0x20, + SFN_VALIDATEF_IGNOREMUTED = 0x40, + SFN_VALIDATEF_END = SFN_VALIDATEF_IGNOREMUTED + 1 + } ; + +enum __MIDL___MIDL_itf_qedit_0000_0012 + { DXTKEY_RGB = 0, + DXTKEY_NONRED = DXTKEY_RGB + 1, + DXTKEY_LUMINANCE = DXTKEY_NONRED + 1, + DXTKEY_ALPHA = DXTKEY_LUMINANCE + 1, + DXTKEY_HUE = DXTKEY_ALPHA + 1 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_qedit_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_qedit_0000_v0_0_s_ifspec; + +#ifndef __IPropertySetter_INTERFACE_DEFINED__ +#define __IPropertySetter_INTERFACE_DEFINED__ + +/* interface IPropertySetter */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IPropertySetter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("AE9472BD-B0C3-11D2-8D24-00A0C9441E20") + IPropertySetter : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE LoadXML( + /* [in] */ IUnknown *pxml) = 0; + + virtual HRESULT STDMETHODCALLTYPE PrintXML( + /* [out] */ char *pszXML, + /* [in] */ int cbXML, + /* [out] */ int *pcbPrinted, + /* [in] */ int indent) = 0; + + virtual HRESULT STDMETHODCALLTYPE CloneProps( + /* [out] */ IPropertySetter **ppSetter, + /* [in] */ REFERENCE_TIME rtStart, + /* [in] */ REFERENCE_TIME rtStop) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddProp( + /* [in] */ DEXTER_PARAM Param, + /* [in] */ DEXTER_VALUE *paValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetProps( + /* [out] */ LONG *pcParams, + /* [out] */ DEXTER_PARAM **paParam, + /* [out] */ DEXTER_VALUE **paValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE FreeProps( + /* [in] */ LONG cParams, + /* [in] */ DEXTER_PARAM *paParam, + /* [in] */ DEXTER_VALUE *paValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE ClearProps( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SaveToBlob( + /* [out] */ LONG *pcSize, + /* [out] */ BYTE **ppb) = 0; + + virtual HRESULT STDMETHODCALLTYPE LoadFromBlob( + /* [in] */ LONG cSize, + /* [in] */ BYTE *pb) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetProps( + /* [in] */ IUnknown *pTarget, + /* [in] */ REFERENCE_TIME rtNow) = 0; + + }; + +#else /* C style interface */ + + typedef struct IPropertySetterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IPropertySetter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IPropertySetter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IPropertySetter * This); + + HRESULT ( STDMETHODCALLTYPE *LoadXML )( + IPropertySetter * This, + /* [in] */ IUnknown *pxml); + + HRESULT ( STDMETHODCALLTYPE *PrintXML )( + IPropertySetter * This, + /* [out] */ char *pszXML, + /* [in] */ int cbXML, + /* [out] */ int *pcbPrinted, + /* [in] */ int indent); + + HRESULT ( STDMETHODCALLTYPE *CloneProps )( + IPropertySetter * This, + /* [out] */ IPropertySetter **ppSetter, + /* [in] */ REFERENCE_TIME rtStart, + /* [in] */ REFERENCE_TIME rtStop); + + HRESULT ( STDMETHODCALLTYPE *AddProp )( + IPropertySetter * This, + /* [in] */ DEXTER_PARAM Param, + /* [in] */ DEXTER_VALUE *paValue); + + HRESULT ( STDMETHODCALLTYPE *GetProps )( + IPropertySetter * This, + /* [out] */ LONG *pcParams, + /* [out] */ DEXTER_PARAM **paParam, + /* [out] */ DEXTER_VALUE **paValue); + + HRESULT ( STDMETHODCALLTYPE *FreeProps )( + IPropertySetter * This, + /* [in] */ LONG cParams, + /* [in] */ DEXTER_PARAM *paParam, + /* [in] */ DEXTER_VALUE *paValue); + + HRESULT ( STDMETHODCALLTYPE *ClearProps )( + IPropertySetter * This); + + HRESULT ( STDMETHODCALLTYPE *SaveToBlob )( + IPropertySetter * This, + /* [out] */ LONG *pcSize, + /* [out] */ BYTE **ppb); + + HRESULT ( STDMETHODCALLTYPE *LoadFromBlob )( + IPropertySetter * This, + /* [in] */ LONG cSize, + /* [in] */ BYTE *pb); + + HRESULT ( STDMETHODCALLTYPE *SetProps )( + IPropertySetter * This, + /* [in] */ IUnknown *pTarget, + /* [in] */ REFERENCE_TIME rtNow); + + END_INTERFACE + } IPropertySetterVtbl; + + interface IPropertySetter + { + CONST_VTBL struct IPropertySetterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IPropertySetter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IPropertySetter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IPropertySetter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IPropertySetter_LoadXML(This,pxml) \ + (This)->lpVtbl -> LoadXML(This,pxml) + +#define IPropertySetter_PrintXML(This,pszXML,cbXML,pcbPrinted,indent) \ + (This)->lpVtbl -> PrintXML(This,pszXML,cbXML,pcbPrinted,indent) + +#define IPropertySetter_CloneProps(This,ppSetter,rtStart,rtStop) \ + (This)->lpVtbl -> CloneProps(This,ppSetter,rtStart,rtStop) + +#define IPropertySetter_AddProp(This,Param,paValue) \ + (This)->lpVtbl -> AddProp(This,Param,paValue) + +#define IPropertySetter_GetProps(This,pcParams,paParam,paValue) \ + (This)->lpVtbl -> GetProps(This,pcParams,paParam,paValue) + +#define IPropertySetter_FreeProps(This,cParams,paParam,paValue) \ + (This)->lpVtbl -> FreeProps(This,cParams,paParam,paValue) + +#define IPropertySetter_ClearProps(This) \ + (This)->lpVtbl -> ClearProps(This) + +#define IPropertySetter_SaveToBlob(This,pcSize,ppb) \ + (This)->lpVtbl -> SaveToBlob(This,pcSize,ppb) + +#define IPropertySetter_LoadFromBlob(This,cSize,pb) \ + (This)->lpVtbl -> LoadFromBlob(This,cSize,pb) + +#define IPropertySetter_SetProps(This,pTarget,rtNow) \ + (This)->lpVtbl -> SetProps(This,pTarget,rtNow) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IPropertySetter_LoadXML_Proxy( + IPropertySetter * This, + /* [in] */ IUnknown *pxml); + + +void __RPC_STUB IPropertySetter_LoadXML_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPropertySetter_PrintXML_Proxy( + IPropertySetter * This, + /* [out] */ char *pszXML, + /* [in] */ int cbXML, + /* [out] */ int *pcbPrinted, + /* [in] */ int indent); + + +void __RPC_STUB IPropertySetter_PrintXML_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPropertySetter_CloneProps_Proxy( + IPropertySetter * This, + /* [out] */ IPropertySetter **ppSetter, + /* [in] */ REFERENCE_TIME rtStart, + /* [in] */ REFERENCE_TIME rtStop); + + +void __RPC_STUB IPropertySetter_CloneProps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPropertySetter_AddProp_Proxy( + IPropertySetter * This, + /* [in] */ DEXTER_PARAM Param, + /* [in] */ DEXTER_VALUE *paValue); + + +void __RPC_STUB IPropertySetter_AddProp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPropertySetter_GetProps_Proxy( + IPropertySetter * This, + /* [out] */ LONG *pcParams, + /* [out] */ DEXTER_PARAM **paParam, + /* [out] */ DEXTER_VALUE **paValue); + + +void __RPC_STUB IPropertySetter_GetProps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPropertySetter_FreeProps_Proxy( + IPropertySetter * This, + /* [in] */ LONG cParams, + /* [in] */ DEXTER_PARAM *paParam, + /* [in] */ DEXTER_VALUE *paValue); + + +void __RPC_STUB IPropertySetter_FreeProps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPropertySetter_ClearProps_Proxy( + IPropertySetter * This); + + +void __RPC_STUB IPropertySetter_ClearProps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPropertySetter_SaveToBlob_Proxy( + IPropertySetter * This, + /* [out] */ LONG *pcSize, + /* [out] */ BYTE **ppb); + + +void __RPC_STUB IPropertySetter_SaveToBlob_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPropertySetter_LoadFromBlob_Proxy( + IPropertySetter * This, + /* [in] */ LONG cSize, + /* [in] */ BYTE *pb); + + +void __RPC_STUB IPropertySetter_LoadFromBlob_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPropertySetter_SetProps_Proxy( + IPropertySetter * This, + /* [in] */ IUnknown *pTarget, + /* [in] */ REFERENCE_TIME rtNow); + + +void __RPC_STUB IPropertySetter_SetProps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IPropertySetter_INTERFACE_DEFINED__ */ + + +#ifndef __IDxtCompositor_INTERFACE_DEFINED__ +#define __IDxtCompositor_INTERFACE_DEFINED__ + +/* interface IDxtCompositor */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_IDxtCompositor; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("BB44391E-6ABD-422f-9E2E-385C9DFF51FC") + IDxtCompositor : public IDXEffect + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_OffsetX( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_OffsetX( + /* [in] */ long newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_OffsetY( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_OffsetY( + /* [in] */ long newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Width( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Width( + /* [in] */ long newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Height( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Height( + /* [in] */ long newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SrcOffsetX( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SrcOffsetX( + /* [in] */ long newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SrcOffsetY( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SrcOffsetY( + /* [in] */ long newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SrcWidth( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SrcWidth( + /* [in] */ long newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SrcHeight( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SrcHeight( + /* [in] */ long newVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDxtCompositorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDxtCompositor * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDxtCompositor * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDxtCompositor * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IDxtCompositor * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IDxtCompositor * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IDxtCompositor * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IDxtCompositor * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Capabilities )( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Progress )( + IDxtCompositor * This, + /* [retval][out] */ float *pVal); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Progress )( + IDxtCompositor * This, + /* [in] */ float newVal); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StepResolution )( + IDxtCompositor * This, + /* [retval][out] */ float *pVal); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Duration )( + IDxtCompositor * This, + /* [retval][out] */ float *pVal); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Duration )( + IDxtCompositor * This, + /* [in] */ float newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OffsetX )( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OffsetX )( + IDxtCompositor * This, + /* [in] */ long newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OffsetY )( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OffsetY )( + IDxtCompositor * This, + /* [in] */ long newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Width )( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Width )( + IDxtCompositor * This, + /* [in] */ long newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Height )( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Height )( + IDxtCompositor * This, + /* [in] */ long newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SrcOffsetX )( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SrcOffsetX )( + IDxtCompositor * This, + /* [in] */ long newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SrcOffsetY )( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SrcOffsetY )( + IDxtCompositor * This, + /* [in] */ long newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SrcWidth )( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SrcWidth )( + IDxtCompositor * This, + /* [in] */ long newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SrcHeight )( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SrcHeight )( + IDxtCompositor * This, + /* [in] */ long newVal); + + END_INTERFACE + } IDxtCompositorVtbl; + + interface IDxtCompositor + { + CONST_VTBL struct IDxtCompositorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDxtCompositor_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDxtCompositor_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDxtCompositor_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDxtCompositor_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IDxtCompositor_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IDxtCompositor_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IDxtCompositor_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IDxtCompositor_get_Capabilities(This,pVal) \ + (This)->lpVtbl -> get_Capabilities(This,pVal) + +#define IDxtCompositor_get_Progress(This,pVal) \ + (This)->lpVtbl -> get_Progress(This,pVal) + +#define IDxtCompositor_put_Progress(This,newVal) \ + (This)->lpVtbl -> put_Progress(This,newVal) + +#define IDxtCompositor_get_StepResolution(This,pVal) \ + (This)->lpVtbl -> get_StepResolution(This,pVal) + +#define IDxtCompositor_get_Duration(This,pVal) \ + (This)->lpVtbl -> get_Duration(This,pVal) + +#define IDxtCompositor_put_Duration(This,newVal) \ + (This)->lpVtbl -> put_Duration(This,newVal) + + +#define IDxtCompositor_get_OffsetX(This,pVal) \ + (This)->lpVtbl -> get_OffsetX(This,pVal) + +#define IDxtCompositor_put_OffsetX(This,newVal) \ + (This)->lpVtbl -> put_OffsetX(This,newVal) + +#define IDxtCompositor_get_OffsetY(This,pVal) \ + (This)->lpVtbl -> get_OffsetY(This,pVal) + +#define IDxtCompositor_put_OffsetY(This,newVal) \ + (This)->lpVtbl -> put_OffsetY(This,newVal) + +#define IDxtCompositor_get_Width(This,pVal) \ + (This)->lpVtbl -> get_Width(This,pVal) + +#define IDxtCompositor_put_Width(This,newVal) \ + (This)->lpVtbl -> put_Width(This,newVal) + +#define IDxtCompositor_get_Height(This,pVal) \ + (This)->lpVtbl -> get_Height(This,pVal) + +#define IDxtCompositor_put_Height(This,newVal) \ + (This)->lpVtbl -> put_Height(This,newVal) + +#define IDxtCompositor_get_SrcOffsetX(This,pVal) \ + (This)->lpVtbl -> get_SrcOffsetX(This,pVal) + +#define IDxtCompositor_put_SrcOffsetX(This,newVal) \ + (This)->lpVtbl -> put_SrcOffsetX(This,newVal) + +#define IDxtCompositor_get_SrcOffsetY(This,pVal) \ + (This)->lpVtbl -> get_SrcOffsetY(This,pVal) + +#define IDxtCompositor_put_SrcOffsetY(This,newVal) \ + (This)->lpVtbl -> put_SrcOffsetY(This,newVal) + +#define IDxtCompositor_get_SrcWidth(This,pVal) \ + (This)->lpVtbl -> get_SrcWidth(This,pVal) + +#define IDxtCompositor_put_SrcWidth(This,newVal) \ + (This)->lpVtbl -> put_SrcWidth(This,newVal) + +#define IDxtCompositor_get_SrcHeight(This,pVal) \ + (This)->lpVtbl -> get_SrcHeight(This,pVal) + +#define IDxtCompositor_put_SrcHeight(This,newVal) \ + (This)->lpVtbl -> put_SrcHeight(This,newVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_get_OffsetX_Proxy( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IDxtCompositor_get_OffsetX_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_put_OffsetX_Proxy( + IDxtCompositor * This, + /* [in] */ long newVal); + + +void __RPC_STUB IDxtCompositor_put_OffsetX_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_get_OffsetY_Proxy( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IDxtCompositor_get_OffsetY_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_put_OffsetY_Proxy( + IDxtCompositor * This, + /* [in] */ long newVal); + + +void __RPC_STUB IDxtCompositor_put_OffsetY_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_get_Width_Proxy( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IDxtCompositor_get_Width_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_put_Width_Proxy( + IDxtCompositor * This, + /* [in] */ long newVal); + + +void __RPC_STUB IDxtCompositor_put_Width_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_get_Height_Proxy( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IDxtCompositor_get_Height_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_put_Height_Proxy( + IDxtCompositor * This, + /* [in] */ long newVal); + + +void __RPC_STUB IDxtCompositor_put_Height_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_get_SrcOffsetX_Proxy( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IDxtCompositor_get_SrcOffsetX_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_put_SrcOffsetX_Proxy( + IDxtCompositor * This, + /* [in] */ long newVal); + + +void __RPC_STUB IDxtCompositor_put_SrcOffsetX_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_get_SrcOffsetY_Proxy( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IDxtCompositor_get_SrcOffsetY_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_put_SrcOffsetY_Proxy( + IDxtCompositor * This, + /* [in] */ long newVal); + + +void __RPC_STUB IDxtCompositor_put_SrcOffsetY_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_get_SrcWidth_Proxy( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IDxtCompositor_get_SrcWidth_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_put_SrcWidth_Proxy( + IDxtCompositor * This, + /* [in] */ long newVal); + + +void __RPC_STUB IDxtCompositor_put_SrcWidth_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_get_SrcHeight_Proxy( + IDxtCompositor * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IDxtCompositor_get_SrcHeight_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtCompositor_put_SrcHeight_Proxy( + IDxtCompositor * This, + /* [in] */ long newVal); + + +void __RPC_STUB IDxtCompositor_put_SrcHeight_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDxtCompositor_INTERFACE_DEFINED__ */ + + +#ifndef __IDxtAlphaSetter_INTERFACE_DEFINED__ +#define __IDxtAlphaSetter_INTERFACE_DEFINED__ + +/* interface IDxtAlphaSetter */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_IDxtAlphaSetter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("4EE9EAD9-DA4D-43d0-9383-06B90C08B12B") + IDxtAlphaSetter : public IDXEffect + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Alpha( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Alpha( + /* [in] */ long newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_AlphaRamp( + /* [retval][out] */ double *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_AlphaRamp( + /* [in] */ double newVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDxtAlphaSetterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDxtAlphaSetter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDxtAlphaSetter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDxtAlphaSetter * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IDxtAlphaSetter * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IDxtAlphaSetter * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IDxtAlphaSetter * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IDxtAlphaSetter * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Capabilities )( + IDxtAlphaSetter * This, + /* [retval][out] */ long *pVal); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Progress )( + IDxtAlphaSetter * This, + /* [retval][out] */ float *pVal); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Progress )( + IDxtAlphaSetter * This, + /* [in] */ float newVal); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StepResolution )( + IDxtAlphaSetter * This, + /* [retval][out] */ float *pVal); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Duration )( + IDxtAlphaSetter * This, + /* [retval][out] */ float *pVal); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Duration )( + IDxtAlphaSetter * This, + /* [in] */ float newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Alpha )( + IDxtAlphaSetter * This, + /* [retval][out] */ long *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Alpha )( + IDxtAlphaSetter * This, + /* [in] */ long newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_AlphaRamp )( + IDxtAlphaSetter * This, + /* [retval][out] */ double *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_AlphaRamp )( + IDxtAlphaSetter * This, + /* [in] */ double newVal); + + END_INTERFACE + } IDxtAlphaSetterVtbl; + + interface IDxtAlphaSetter + { + CONST_VTBL struct IDxtAlphaSetterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDxtAlphaSetter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDxtAlphaSetter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDxtAlphaSetter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDxtAlphaSetter_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IDxtAlphaSetter_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IDxtAlphaSetter_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IDxtAlphaSetter_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IDxtAlphaSetter_get_Capabilities(This,pVal) \ + (This)->lpVtbl -> get_Capabilities(This,pVal) + +#define IDxtAlphaSetter_get_Progress(This,pVal) \ + (This)->lpVtbl -> get_Progress(This,pVal) + +#define IDxtAlphaSetter_put_Progress(This,newVal) \ + (This)->lpVtbl -> put_Progress(This,newVal) + +#define IDxtAlphaSetter_get_StepResolution(This,pVal) \ + (This)->lpVtbl -> get_StepResolution(This,pVal) + +#define IDxtAlphaSetter_get_Duration(This,pVal) \ + (This)->lpVtbl -> get_Duration(This,pVal) + +#define IDxtAlphaSetter_put_Duration(This,newVal) \ + (This)->lpVtbl -> put_Duration(This,newVal) + + +#define IDxtAlphaSetter_get_Alpha(This,pVal) \ + (This)->lpVtbl -> get_Alpha(This,pVal) + +#define IDxtAlphaSetter_put_Alpha(This,newVal) \ + (This)->lpVtbl -> put_Alpha(This,newVal) + +#define IDxtAlphaSetter_get_AlphaRamp(This,pVal) \ + (This)->lpVtbl -> get_AlphaRamp(This,pVal) + +#define IDxtAlphaSetter_put_AlphaRamp(This,newVal) \ + (This)->lpVtbl -> put_AlphaRamp(This,newVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtAlphaSetter_get_Alpha_Proxy( + IDxtAlphaSetter * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IDxtAlphaSetter_get_Alpha_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtAlphaSetter_put_Alpha_Proxy( + IDxtAlphaSetter * This, + /* [in] */ long newVal); + + +void __RPC_STUB IDxtAlphaSetter_put_Alpha_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtAlphaSetter_get_AlphaRamp_Proxy( + IDxtAlphaSetter * This, + /* [retval][out] */ double *pVal); + + +void __RPC_STUB IDxtAlphaSetter_get_AlphaRamp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtAlphaSetter_put_AlphaRamp_Proxy( + IDxtAlphaSetter * This, + /* [in] */ double newVal); + + +void __RPC_STUB IDxtAlphaSetter_put_AlphaRamp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDxtAlphaSetter_INTERFACE_DEFINED__ */ + + +#ifndef __IDxtJpeg_INTERFACE_DEFINED__ +#define __IDxtJpeg_INTERFACE_DEFINED__ + +/* interface IDxtJpeg */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_IDxtJpeg; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("DE75D011-7A65-11D2-8CEA-00A0C9441E20") + IDxtJpeg : public IDXEffect + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MaskNum( + /* [retval][out] */ long *__MIDL_0018) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_MaskNum( + /* [in] */ long __MIDL_0019) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MaskName( + /* [retval][out] */ BSTR *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_MaskName( + /* [in] */ BSTR newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ScaleX( + /* [retval][out] */ double *__MIDL_0020) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ScaleX( + /* [in] */ double __MIDL_0021) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ScaleY( + /* [retval][out] */ double *__MIDL_0022) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ScaleY( + /* [in] */ double __MIDL_0023) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_OffsetX( + /* [retval][out] */ long *__MIDL_0024) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_OffsetX( + /* [in] */ long __MIDL_0025) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_OffsetY( + /* [retval][out] */ long *__MIDL_0026) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_OffsetY( + /* [in] */ long __MIDL_0027) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ReplicateX( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ReplicateX( + /* [in] */ long newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ReplicateY( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ReplicateY( + /* [in] */ long newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BorderColor( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_BorderColor( + /* [in] */ long newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BorderWidth( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_BorderWidth( + /* [in] */ long newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_BorderSoftness( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_BorderSoftness( + /* [in] */ long newVal) = 0; + + virtual HRESULT STDMETHODCALLTYPE ApplyChanges( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE LoadDefSettings( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDxtJpegVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDxtJpeg * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDxtJpeg * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDxtJpeg * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IDxtJpeg * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IDxtJpeg * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IDxtJpeg * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IDxtJpeg * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Capabilities )( + IDxtJpeg * This, + /* [retval][out] */ long *pVal); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Progress )( + IDxtJpeg * This, + /* [retval][out] */ float *pVal); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Progress )( + IDxtJpeg * This, + /* [in] */ float newVal); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StepResolution )( + IDxtJpeg * This, + /* [retval][out] */ float *pVal); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Duration )( + IDxtJpeg * This, + /* [retval][out] */ float *pVal); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Duration )( + IDxtJpeg * This, + /* [in] */ float newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MaskNum )( + IDxtJpeg * This, + /* [retval][out] */ long *__MIDL_0018); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MaskNum )( + IDxtJpeg * This, + /* [in] */ long __MIDL_0019); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MaskName )( + IDxtJpeg * This, + /* [retval][out] */ BSTR *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MaskName )( + IDxtJpeg * This, + /* [in] */ BSTR newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ScaleX )( + IDxtJpeg * This, + /* [retval][out] */ double *__MIDL_0020); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ScaleX )( + IDxtJpeg * This, + /* [in] */ double __MIDL_0021); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ScaleY )( + IDxtJpeg * This, + /* [retval][out] */ double *__MIDL_0022); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ScaleY )( + IDxtJpeg * This, + /* [in] */ double __MIDL_0023); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OffsetX )( + IDxtJpeg * This, + /* [retval][out] */ long *__MIDL_0024); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OffsetX )( + IDxtJpeg * This, + /* [in] */ long __MIDL_0025); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OffsetY )( + IDxtJpeg * This, + /* [retval][out] */ long *__MIDL_0026); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OffsetY )( + IDxtJpeg * This, + /* [in] */ long __MIDL_0027); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ReplicateX )( + IDxtJpeg * This, + /* [retval][out] */ long *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ReplicateX )( + IDxtJpeg * This, + /* [in] */ long newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ReplicateY )( + IDxtJpeg * This, + /* [retval][out] */ long *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ReplicateY )( + IDxtJpeg * This, + /* [in] */ long newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BorderColor )( + IDxtJpeg * This, + /* [retval][out] */ long *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BorderColor )( + IDxtJpeg * This, + /* [in] */ long newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BorderWidth )( + IDxtJpeg * This, + /* [retval][out] */ long *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BorderWidth )( + IDxtJpeg * This, + /* [in] */ long newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_BorderSoftness )( + IDxtJpeg * This, + /* [retval][out] */ long *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_BorderSoftness )( + IDxtJpeg * This, + /* [in] */ long newVal); + + HRESULT ( STDMETHODCALLTYPE *ApplyChanges )( + IDxtJpeg * This); + + HRESULT ( STDMETHODCALLTYPE *LoadDefSettings )( + IDxtJpeg * This); + + END_INTERFACE + } IDxtJpegVtbl; + + interface IDxtJpeg + { + CONST_VTBL struct IDxtJpegVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDxtJpeg_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDxtJpeg_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDxtJpeg_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDxtJpeg_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IDxtJpeg_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IDxtJpeg_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IDxtJpeg_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IDxtJpeg_get_Capabilities(This,pVal) \ + (This)->lpVtbl -> get_Capabilities(This,pVal) + +#define IDxtJpeg_get_Progress(This,pVal) \ + (This)->lpVtbl -> get_Progress(This,pVal) + +#define IDxtJpeg_put_Progress(This,newVal) \ + (This)->lpVtbl -> put_Progress(This,newVal) + +#define IDxtJpeg_get_StepResolution(This,pVal) \ + (This)->lpVtbl -> get_StepResolution(This,pVal) + +#define IDxtJpeg_get_Duration(This,pVal) \ + (This)->lpVtbl -> get_Duration(This,pVal) + +#define IDxtJpeg_put_Duration(This,newVal) \ + (This)->lpVtbl -> put_Duration(This,newVal) + + +#define IDxtJpeg_get_MaskNum(This,__MIDL_0018) \ + (This)->lpVtbl -> get_MaskNum(This,__MIDL_0018) + +#define IDxtJpeg_put_MaskNum(This,__MIDL_0019) \ + (This)->lpVtbl -> put_MaskNum(This,__MIDL_0019) + +#define IDxtJpeg_get_MaskName(This,pVal) \ + (This)->lpVtbl -> get_MaskName(This,pVal) + +#define IDxtJpeg_put_MaskName(This,newVal) \ + (This)->lpVtbl -> put_MaskName(This,newVal) + +#define IDxtJpeg_get_ScaleX(This,__MIDL_0020) \ + (This)->lpVtbl -> get_ScaleX(This,__MIDL_0020) + +#define IDxtJpeg_put_ScaleX(This,__MIDL_0021) \ + (This)->lpVtbl -> put_ScaleX(This,__MIDL_0021) + +#define IDxtJpeg_get_ScaleY(This,__MIDL_0022) \ + (This)->lpVtbl -> get_ScaleY(This,__MIDL_0022) + +#define IDxtJpeg_put_ScaleY(This,__MIDL_0023) \ + (This)->lpVtbl -> put_ScaleY(This,__MIDL_0023) + +#define IDxtJpeg_get_OffsetX(This,__MIDL_0024) \ + (This)->lpVtbl -> get_OffsetX(This,__MIDL_0024) + +#define IDxtJpeg_put_OffsetX(This,__MIDL_0025) \ + (This)->lpVtbl -> put_OffsetX(This,__MIDL_0025) + +#define IDxtJpeg_get_OffsetY(This,__MIDL_0026) \ + (This)->lpVtbl -> get_OffsetY(This,__MIDL_0026) + +#define IDxtJpeg_put_OffsetY(This,__MIDL_0027) \ + (This)->lpVtbl -> put_OffsetY(This,__MIDL_0027) + +#define IDxtJpeg_get_ReplicateX(This,pVal) \ + (This)->lpVtbl -> get_ReplicateX(This,pVal) + +#define IDxtJpeg_put_ReplicateX(This,newVal) \ + (This)->lpVtbl -> put_ReplicateX(This,newVal) + +#define IDxtJpeg_get_ReplicateY(This,pVal) \ + (This)->lpVtbl -> get_ReplicateY(This,pVal) + +#define IDxtJpeg_put_ReplicateY(This,newVal) \ + (This)->lpVtbl -> put_ReplicateY(This,newVal) + +#define IDxtJpeg_get_BorderColor(This,pVal) \ + (This)->lpVtbl -> get_BorderColor(This,pVal) + +#define IDxtJpeg_put_BorderColor(This,newVal) \ + (This)->lpVtbl -> put_BorderColor(This,newVal) + +#define IDxtJpeg_get_BorderWidth(This,pVal) \ + (This)->lpVtbl -> get_BorderWidth(This,pVal) + +#define IDxtJpeg_put_BorderWidth(This,newVal) \ + (This)->lpVtbl -> put_BorderWidth(This,newVal) + +#define IDxtJpeg_get_BorderSoftness(This,pVal) \ + (This)->lpVtbl -> get_BorderSoftness(This,pVal) + +#define IDxtJpeg_put_BorderSoftness(This,newVal) \ + (This)->lpVtbl -> put_BorderSoftness(This,newVal) + +#define IDxtJpeg_ApplyChanges(This) \ + (This)->lpVtbl -> ApplyChanges(This) + +#define IDxtJpeg_LoadDefSettings(This) \ + (This)->lpVtbl -> LoadDefSettings(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_MaskNum_Proxy( + IDxtJpeg * This, + /* [retval][out] */ long *__MIDL_0018); + + +void __RPC_STUB IDxtJpeg_get_MaskNum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_MaskNum_Proxy( + IDxtJpeg * This, + /* [in] */ long __MIDL_0019); + + +void __RPC_STUB IDxtJpeg_put_MaskNum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_MaskName_Proxy( + IDxtJpeg * This, + /* [retval][out] */ BSTR *pVal); + + +void __RPC_STUB IDxtJpeg_get_MaskName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_MaskName_Proxy( + IDxtJpeg * This, + /* [in] */ BSTR newVal); + + +void __RPC_STUB IDxtJpeg_put_MaskName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_ScaleX_Proxy( + IDxtJpeg * This, + /* [retval][out] */ double *__MIDL_0020); + + +void __RPC_STUB IDxtJpeg_get_ScaleX_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_ScaleX_Proxy( + IDxtJpeg * This, + /* [in] */ double __MIDL_0021); + + +void __RPC_STUB IDxtJpeg_put_ScaleX_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_ScaleY_Proxy( + IDxtJpeg * This, + /* [retval][out] */ double *__MIDL_0022); + + +void __RPC_STUB IDxtJpeg_get_ScaleY_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_ScaleY_Proxy( + IDxtJpeg * This, + /* [in] */ double __MIDL_0023); + + +void __RPC_STUB IDxtJpeg_put_ScaleY_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_OffsetX_Proxy( + IDxtJpeg * This, + /* [retval][out] */ long *__MIDL_0024); + + +void __RPC_STUB IDxtJpeg_get_OffsetX_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_OffsetX_Proxy( + IDxtJpeg * This, + /* [in] */ long __MIDL_0025); + + +void __RPC_STUB IDxtJpeg_put_OffsetX_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_OffsetY_Proxy( + IDxtJpeg * This, + /* [retval][out] */ long *__MIDL_0026); + + +void __RPC_STUB IDxtJpeg_get_OffsetY_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_OffsetY_Proxy( + IDxtJpeg * This, + /* [in] */ long __MIDL_0027); + + +void __RPC_STUB IDxtJpeg_put_OffsetY_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_ReplicateX_Proxy( + IDxtJpeg * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IDxtJpeg_get_ReplicateX_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_ReplicateX_Proxy( + IDxtJpeg * This, + /* [in] */ long newVal); + + +void __RPC_STUB IDxtJpeg_put_ReplicateX_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_ReplicateY_Proxy( + IDxtJpeg * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IDxtJpeg_get_ReplicateY_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_ReplicateY_Proxy( + IDxtJpeg * This, + /* [in] */ long newVal); + + +void __RPC_STUB IDxtJpeg_put_ReplicateY_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_BorderColor_Proxy( + IDxtJpeg * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IDxtJpeg_get_BorderColor_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_BorderColor_Proxy( + IDxtJpeg * This, + /* [in] */ long newVal); + + +void __RPC_STUB IDxtJpeg_put_BorderColor_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_BorderWidth_Proxy( + IDxtJpeg * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IDxtJpeg_get_BorderWidth_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_BorderWidth_Proxy( + IDxtJpeg * This, + /* [in] */ long newVal); + + +void __RPC_STUB IDxtJpeg_put_BorderWidth_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_get_BorderSoftness_Proxy( + IDxtJpeg * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IDxtJpeg_get_BorderSoftness_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtJpeg_put_BorderSoftness_Proxy( + IDxtJpeg * This, + /* [in] */ long newVal); + + +void __RPC_STUB IDxtJpeg_put_BorderSoftness_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDxtJpeg_ApplyChanges_Proxy( + IDxtJpeg * This); + + +void __RPC_STUB IDxtJpeg_ApplyChanges_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDxtJpeg_LoadDefSettings_Proxy( + IDxtJpeg * This); + + +void __RPC_STUB IDxtJpeg_LoadDefSettings_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDxtJpeg_INTERFACE_DEFINED__ */ + + +#ifndef __IDxtKey_INTERFACE_DEFINED__ +#define __IDxtKey_INTERFACE_DEFINED__ + +/* interface IDxtKey */ +/* [unique][helpstring][dual][uuid][object] */ + + +EXTERN_C const IID IID_IDxtKey; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3255de56-38fb-4901-b980-94b438010d7b") + IDxtKey : public IDXEffect + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_KeyType( + /* [retval][out] */ int *__MIDL_0028) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_KeyType( + /* [in] */ int __MIDL_0029) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Hue( + /* [retval][out] */ int *__MIDL_0030) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Hue( + /* [in] */ int __MIDL_0031) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Luminance( + /* [retval][out] */ int *__MIDL_0032) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Luminance( + /* [in] */ int __MIDL_0033) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_RGB( + /* [retval][out] */ DWORD *__MIDL_0034) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_RGB( + /* [in] */ DWORD __MIDL_0035) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Similarity( + /* [retval][out] */ int *__MIDL_0036) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Similarity( + /* [in] */ int __MIDL_0037) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Invert( + /* [retval][out] */ BOOL *__MIDL_0038) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Invert( + /* [in] */ BOOL __MIDL_0039) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDxtKeyVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDxtKey * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDxtKey * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDxtKey * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IDxtKey * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IDxtKey * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IDxtKey * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IDxtKey * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Capabilities )( + IDxtKey * This, + /* [retval][out] */ long *pVal); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Progress )( + IDxtKey * This, + /* [retval][out] */ float *pVal); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Progress )( + IDxtKey * This, + /* [in] */ float newVal); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StepResolution )( + IDxtKey * This, + /* [retval][out] */ float *pVal); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Duration )( + IDxtKey * This, + /* [retval][out] */ float *pVal); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Duration )( + IDxtKey * This, + /* [in] */ float newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_KeyType )( + IDxtKey * This, + /* [retval][out] */ int *__MIDL_0028); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_KeyType )( + IDxtKey * This, + /* [in] */ int __MIDL_0029); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Hue )( + IDxtKey * This, + /* [retval][out] */ int *__MIDL_0030); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Hue )( + IDxtKey * This, + /* [in] */ int __MIDL_0031); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Luminance )( + IDxtKey * This, + /* [retval][out] */ int *__MIDL_0032); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Luminance )( + IDxtKey * This, + /* [in] */ int __MIDL_0033); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_RGB )( + IDxtKey * This, + /* [retval][out] */ DWORD *__MIDL_0034); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_RGB )( + IDxtKey * This, + /* [in] */ DWORD __MIDL_0035); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Similarity )( + IDxtKey * This, + /* [retval][out] */ int *__MIDL_0036); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Similarity )( + IDxtKey * This, + /* [in] */ int __MIDL_0037); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Invert )( + IDxtKey * This, + /* [retval][out] */ BOOL *__MIDL_0038); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Invert )( + IDxtKey * This, + /* [in] */ BOOL __MIDL_0039); + + END_INTERFACE + } IDxtKeyVtbl; + + interface IDxtKey + { + CONST_VTBL struct IDxtKeyVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDxtKey_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDxtKey_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDxtKey_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDxtKey_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IDxtKey_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IDxtKey_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IDxtKey_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IDxtKey_get_Capabilities(This,pVal) \ + (This)->lpVtbl -> get_Capabilities(This,pVal) + +#define IDxtKey_get_Progress(This,pVal) \ + (This)->lpVtbl -> get_Progress(This,pVal) + +#define IDxtKey_put_Progress(This,newVal) \ + (This)->lpVtbl -> put_Progress(This,newVal) + +#define IDxtKey_get_StepResolution(This,pVal) \ + (This)->lpVtbl -> get_StepResolution(This,pVal) + +#define IDxtKey_get_Duration(This,pVal) \ + (This)->lpVtbl -> get_Duration(This,pVal) + +#define IDxtKey_put_Duration(This,newVal) \ + (This)->lpVtbl -> put_Duration(This,newVal) + + +#define IDxtKey_get_KeyType(This,__MIDL_0028) \ + (This)->lpVtbl -> get_KeyType(This,__MIDL_0028) + +#define IDxtKey_put_KeyType(This,__MIDL_0029) \ + (This)->lpVtbl -> put_KeyType(This,__MIDL_0029) + +#define IDxtKey_get_Hue(This,__MIDL_0030) \ + (This)->lpVtbl -> get_Hue(This,__MIDL_0030) + +#define IDxtKey_put_Hue(This,__MIDL_0031) \ + (This)->lpVtbl -> put_Hue(This,__MIDL_0031) + +#define IDxtKey_get_Luminance(This,__MIDL_0032) \ + (This)->lpVtbl -> get_Luminance(This,__MIDL_0032) + +#define IDxtKey_put_Luminance(This,__MIDL_0033) \ + (This)->lpVtbl -> put_Luminance(This,__MIDL_0033) + +#define IDxtKey_get_RGB(This,__MIDL_0034) \ + (This)->lpVtbl -> get_RGB(This,__MIDL_0034) + +#define IDxtKey_put_RGB(This,__MIDL_0035) \ + (This)->lpVtbl -> put_RGB(This,__MIDL_0035) + +#define IDxtKey_get_Similarity(This,__MIDL_0036) \ + (This)->lpVtbl -> get_Similarity(This,__MIDL_0036) + +#define IDxtKey_put_Similarity(This,__MIDL_0037) \ + (This)->lpVtbl -> put_Similarity(This,__MIDL_0037) + +#define IDxtKey_get_Invert(This,__MIDL_0038) \ + (This)->lpVtbl -> get_Invert(This,__MIDL_0038) + +#define IDxtKey_put_Invert(This,__MIDL_0039) \ + (This)->lpVtbl -> put_Invert(This,__MIDL_0039) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtKey_get_KeyType_Proxy( + IDxtKey * This, + /* [retval][out] */ int *__MIDL_0028); + + +void __RPC_STUB IDxtKey_get_KeyType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtKey_put_KeyType_Proxy( + IDxtKey * This, + /* [in] */ int __MIDL_0029); + + +void __RPC_STUB IDxtKey_put_KeyType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtKey_get_Hue_Proxy( + IDxtKey * This, + /* [retval][out] */ int *__MIDL_0030); + + +void __RPC_STUB IDxtKey_get_Hue_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtKey_put_Hue_Proxy( + IDxtKey * This, + /* [in] */ int __MIDL_0031); + + +void __RPC_STUB IDxtKey_put_Hue_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtKey_get_Luminance_Proxy( + IDxtKey * This, + /* [retval][out] */ int *__MIDL_0032); + + +void __RPC_STUB IDxtKey_get_Luminance_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtKey_put_Luminance_Proxy( + IDxtKey * This, + /* [in] */ int __MIDL_0033); + + +void __RPC_STUB IDxtKey_put_Luminance_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtKey_get_RGB_Proxy( + IDxtKey * This, + /* [retval][out] */ DWORD *__MIDL_0034); + + +void __RPC_STUB IDxtKey_get_RGB_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtKey_put_RGB_Proxy( + IDxtKey * This, + /* [in] */ DWORD __MIDL_0035); + + +void __RPC_STUB IDxtKey_put_RGB_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtKey_get_Similarity_Proxy( + IDxtKey * This, + /* [retval][out] */ int *__MIDL_0036); + + +void __RPC_STUB IDxtKey_get_Similarity_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtKey_put_Similarity_Proxy( + IDxtKey * This, + /* [in] */ int __MIDL_0037); + + +void __RPC_STUB IDxtKey_put_Similarity_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDxtKey_get_Invert_Proxy( + IDxtKey * This, + /* [retval][out] */ BOOL *__MIDL_0038); + + +void __RPC_STUB IDxtKey_get_Invert_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDxtKey_put_Invert_Proxy( + IDxtKey * This, + /* [in] */ BOOL __MIDL_0039); + + +void __RPC_STUB IDxtKey_put_Invert_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDxtKey_INTERFACE_DEFINED__ */ + + +#ifndef __IMediaLocator_INTERFACE_DEFINED__ +#define __IMediaLocator_INTERFACE_DEFINED__ + +/* interface IMediaLocator */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IMediaLocator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("288581E0-66CE-11d2-918F-00C0DF10D434") + IMediaLocator : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE FindMediaFile( + BSTR Input, + BSTR FilterString, + BSTR *pOutput, + long Flags) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddFoundLocation( + BSTR DirectoryName) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaLocatorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaLocator * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaLocator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaLocator * This); + + HRESULT ( STDMETHODCALLTYPE *FindMediaFile )( + IMediaLocator * This, + BSTR Input, + BSTR FilterString, + BSTR *pOutput, + long Flags); + + HRESULT ( STDMETHODCALLTYPE *AddFoundLocation )( + IMediaLocator * This, + BSTR DirectoryName); + + END_INTERFACE + } IMediaLocatorVtbl; + + interface IMediaLocator + { + CONST_VTBL struct IMediaLocatorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaLocator_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaLocator_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaLocator_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaLocator_FindMediaFile(This,Input,FilterString,pOutput,Flags) \ + (This)->lpVtbl -> FindMediaFile(This,Input,FilterString,pOutput,Flags) + +#define IMediaLocator_AddFoundLocation(This,DirectoryName) \ + (This)->lpVtbl -> AddFoundLocation(This,DirectoryName) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaLocator_FindMediaFile_Proxy( + IMediaLocator * This, + BSTR Input, + BSTR FilterString, + BSTR *pOutput, + long Flags); + + +void __RPC_STUB IMediaLocator_FindMediaFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaLocator_AddFoundLocation_Proxy( + IMediaLocator * This, + BSTR DirectoryName); + + +void __RPC_STUB IMediaLocator_AddFoundLocation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaLocator_INTERFACE_DEFINED__ */ + + +#ifndef __IMediaDet_INTERFACE_DEFINED__ +#define __IMediaDet_INTERFACE_DEFINED__ + +/* interface IMediaDet */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IMediaDet; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("65BD0710-24D2-4ff7-9324-ED2E5D3ABAFA") + IMediaDet : public IUnknown + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Filter( + /* [retval][out] */ IUnknown **pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Filter( + /* [in] */ IUnknown *newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_OutputStreams( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CurrentStream( + /* [retval][out] */ long *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_CurrentStream( + /* [in] */ long newVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StreamType( + /* [retval][out] */ GUID *pVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StreamTypeB( + /* [retval][out] */ BSTR *pVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StreamLength( + /* [retval][out] */ double *pVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Filename( + /* [retval][out] */ BSTR *pVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Filename( + /* [in] */ BSTR newVal) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetBitmapBits( + double StreamTime, + long *pBufferSize, + char *pBuffer, + long Width, + long Height) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE WriteBitmapBits( + double StreamTime, + long Width, + long Height, + BSTR Filename) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StreamMediaType( + /* [retval][out] */ AM_MEDIA_TYPE *pVal) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE GetSampleGrabber( + /* [out] */ ISampleGrabber **ppVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_FrameRate( + /* [retval][out] */ double *pVal) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE EnterBitmapGrabMode( + double SeekTime) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaDetVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaDet * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaDet * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaDet * This); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Filter )( + IMediaDet * This, + /* [retval][out] */ IUnknown **pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Filter )( + IMediaDet * This, + /* [in] */ IUnknown *newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OutputStreams )( + IMediaDet * This, + /* [retval][out] */ long *pVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CurrentStream )( + IMediaDet * This, + /* [retval][out] */ long *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_CurrentStream )( + IMediaDet * This, + /* [in] */ long newVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StreamType )( + IMediaDet * This, + /* [retval][out] */ GUID *pVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StreamTypeB )( + IMediaDet * This, + /* [retval][out] */ BSTR *pVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StreamLength )( + IMediaDet * This, + /* [retval][out] */ double *pVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Filename )( + IMediaDet * This, + /* [retval][out] */ BSTR *pVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Filename )( + IMediaDet * This, + /* [in] */ BSTR newVal); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetBitmapBits )( + IMediaDet * This, + double StreamTime, + long *pBufferSize, + char *pBuffer, + long Width, + long Height); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *WriteBitmapBits )( + IMediaDet * This, + double StreamTime, + long Width, + long Height, + BSTR Filename); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StreamMediaType )( + IMediaDet * This, + /* [retval][out] */ AM_MEDIA_TYPE *pVal); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *GetSampleGrabber )( + IMediaDet * This, + /* [out] */ ISampleGrabber **ppVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FrameRate )( + IMediaDet * This, + /* [retval][out] */ double *pVal); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *EnterBitmapGrabMode )( + IMediaDet * This, + double SeekTime); + + END_INTERFACE + } IMediaDetVtbl; + + interface IMediaDet + { + CONST_VTBL struct IMediaDetVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaDet_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaDet_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaDet_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaDet_get_Filter(This,pVal) \ + (This)->lpVtbl -> get_Filter(This,pVal) + +#define IMediaDet_put_Filter(This,newVal) \ + (This)->lpVtbl -> put_Filter(This,newVal) + +#define IMediaDet_get_OutputStreams(This,pVal) \ + (This)->lpVtbl -> get_OutputStreams(This,pVal) + +#define IMediaDet_get_CurrentStream(This,pVal) \ + (This)->lpVtbl -> get_CurrentStream(This,pVal) + +#define IMediaDet_put_CurrentStream(This,newVal) \ + (This)->lpVtbl -> put_CurrentStream(This,newVal) + +#define IMediaDet_get_StreamType(This,pVal) \ + (This)->lpVtbl -> get_StreamType(This,pVal) + +#define IMediaDet_get_StreamTypeB(This,pVal) \ + (This)->lpVtbl -> get_StreamTypeB(This,pVal) + +#define IMediaDet_get_StreamLength(This,pVal) \ + (This)->lpVtbl -> get_StreamLength(This,pVal) + +#define IMediaDet_get_Filename(This,pVal) \ + (This)->lpVtbl -> get_Filename(This,pVal) + +#define IMediaDet_put_Filename(This,newVal) \ + (This)->lpVtbl -> put_Filename(This,newVal) + +#define IMediaDet_GetBitmapBits(This,StreamTime,pBufferSize,pBuffer,Width,Height) \ + (This)->lpVtbl -> GetBitmapBits(This,StreamTime,pBufferSize,pBuffer,Width,Height) + +#define IMediaDet_WriteBitmapBits(This,StreamTime,Width,Height,Filename) \ + (This)->lpVtbl -> WriteBitmapBits(This,StreamTime,Width,Height,Filename) + +#define IMediaDet_get_StreamMediaType(This,pVal) \ + (This)->lpVtbl -> get_StreamMediaType(This,pVal) + +#define IMediaDet_GetSampleGrabber(This,ppVal) \ + (This)->lpVtbl -> GetSampleGrabber(This,ppVal) + +#define IMediaDet_get_FrameRate(This,pVal) \ + (This)->lpVtbl -> get_FrameRate(This,pVal) + +#define IMediaDet_EnterBitmapGrabMode(This,SeekTime) \ + (This)->lpVtbl -> EnterBitmapGrabMode(This,SeekTime) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_Filter_Proxy( + IMediaDet * This, + /* [retval][out] */ IUnknown **pVal); + + +void __RPC_STUB IMediaDet_get_Filter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IMediaDet_put_Filter_Proxy( + IMediaDet * This, + /* [in] */ IUnknown *newVal); + + +void __RPC_STUB IMediaDet_put_Filter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_OutputStreams_Proxy( + IMediaDet * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IMediaDet_get_OutputStreams_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_CurrentStream_Proxy( + IMediaDet * This, + /* [retval][out] */ long *pVal); + + +void __RPC_STUB IMediaDet_get_CurrentStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IMediaDet_put_CurrentStream_Proxy( + IMediaDet * This, + /* [in] */ long newVal); + + +void __RPC_STUB IMediaDet_put_CurrentStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_StreamType_Proxy( + IMediaDet * This, + /* [retval][out] */ GUID *pVal); + + +void __RPC_STUB IMediaDet_get_StreamType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_StreamTypeB_Proxy( + IMediaDet * This, + /* [retval][out] */ BSTR *pVal); + + +void __RPC_STUB IMediaDet_get_StreamTypeB_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_StreamLength_Proxy( + IMediaDet * This, + /* [retval][out] */ double *pVal); + + +void __RPC_STUB IMediaDet_get_StreamLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_Filename_Proxy( + IMediaDet * This, + /* [retval][out] */ BSTR *pVal); + + +void __RPC_STUB IMediaDet_get_Filename_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IMediaDet_put_Filename_Proxy( + IMediaDet * This, + /* [in] */ BSTR newVal); + + +void __RPC_STUB IMediaDet_put_Filename_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IMediaDet_GetBitmapBits_Proxy( + IMediaDet * This, + double StreamTime, + long *pBufferSize, + char *pBuffer, + long Width, + long Height); + + +void __RPC_STUB IMediaDet_GetBitmapBits_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IMediaDet_WriteBitmapBits_Proxy( + IMediaDet * This, + double StreamTime, + long Width, + long Height, + BSTR Filename); + + +void __RPC_STUB IMediaDet_WriteBitmapBits_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_StreamMediaType_Proxy( + IMediaDet * This, + /* [retval][out] */ AM_MEDIA_TYPE *pVal); + + +void __RPC_STUB IMediaDet_get_StreamMediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IMediaDet_GetSampleGrabber_Proxy( + IMediaDet * This, + /* [out] */ ISampleGrabber **ppVal); + + +void __RPC_STUB IMediaDet_GetSampleGrabber_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMediaDet_get_FrameRate_Proxy( + IMediaDet * This, + /* [retval][out] */ double *pVal); + + +void __RPC_STUB IMediaDet_get_FrameRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IMediaDet_EnterBitmapGrabMode_Proxy( + IMediaDet * This, + double SeekTime); + + +void __RPC_STUB IMediaDet_EnterBitmapGrabMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaDet_INTERFACE_DEFINED__ */ + + +#ifndef __IGrfCache_INTERFACE_DEFINED__ +#define __IGrfCache_INTERFACE_DEFINED__ + +/* interface IGrfCache */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IGrfCache; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("AE9472BE-B0C3-11D2-8D24-00A0C9441E20") + IGrfCache : public IDispatch + { + public: + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE AddFilter( + IGrfCache *ChainedCache, + LONGLONG ID, + const IBaseFilter *pFilter, + LPCWSTR pName) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ConnectPins( + IGrfCache *ChainedCache, + LONGLONG PinID1, + const IPin *pPin1, + LONGLONG PinID2, + const IPin *pPin2) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE SetGraph( + const IGraphBuilder *pGraph) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE DoConnectionsNow( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IGrfCacheVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IGrfCache * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IGrfCache * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IGrfCache * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IGrfCache * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IGrfCache * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IGrfCache * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IGrfCache * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *AddFilter )( + IGrfCache * This, + IGrfCache *ChainedCache, + LONGLONG ID, + const IBaseFilter *pFilter, + LPCWSTR pName); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *ConnectPins )( + IGrfCache * This, + IGrfCache *ChainedCache, + LONGLONG PinID1, + const IPin *pPin1, + LONGLONG PinID2, + const IPin *pPin2); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *SetGraph )( + IGrfCache * This, + const IGraphBuilder *pGraph); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *DoConnectionsNow )( + IGrfCache * This); + + END_INTERFACE + } IGrfCacheVtbl; + + interface IGrfCache + { + CONST_VTBL struct IGrfCacheVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IGrfCache_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IGrfCache_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IGrfCache_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IGrfCache_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IGrfCache_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IGrfCache_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IGrfCache_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IGrfCache_AddFilter(This,ChainedCache,ID,pFilter,pName) \ + (This)->lpVtbl -> AddFilter(This,ChainedCache,ID,pFilter,pName) + +#define IGrfCache_ConnectPins(This,ChainedCache,PinID1,pPin1,PinID2,pPin2) \ + (This)->lpVtbl -> ConnectPins(This,ChainedCache,PinID1,pPin1,PinID2,pPin2) + +#define IGrfCache_SetGraph(This,pGraph) \ + (This)->lpVtbl -> SetGraph(This,pGraph) + +#define IGrfCache_DoConnectionsNow(This) \ + (This)->lpVtbl -> DoConnectionsNow(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IGrfCache_AddFilter_Proxy( + IGrfCache * This, + IGrfCache *ChainedCache, + LONGLONG ID, + const IBaseFilter *pFilter, + LPCWSTR pName); + + +void __RPC_STUB IGrfCache_AddFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IGrfCache_ConnectPins_Proxy( + IGrfCache * This, + IGrfCache *ChainedCache, + LONGLONG PinID1, + const IPin *pPin1, + LONGLONG PinID2, + const IPin *pPin2); + + +void __RPC_STUB IGrfCache_ConnectPins_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IGrfCache_SetGraph_Proxy( + IGrfCache * This, + const IGraphBuilder *pGraph); + + +void __RPC_STUB IGrfCache_SetGraph_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IGrfCache_DoConnectionsNow_Proxy( + IGrfCache * This); + + +void __RPC_STUB IGrfCache_DoConnectionsNow_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IGrfCache_INTERFACE_DEFINED__ */ + + +#ifndef __IRenderEngine_INTERFACE_DEFINED__ +#define __IRenderEngine_INTERFACE_DEFINED__ + +/* interface IRenderEngine */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IRenderEngine; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6BEE3A81-66C9-11d2-918F-00C0DF10D434") + IRenderEngine : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetTimelineObject( + IAMTimeline *pTimeline) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTimelineObject( + /* [out] */ IAMTimeline **ppTimeline) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFilterGraph( + /* [out] */ IGraphBuilder **ppFG) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFilterGraph( + IGraphBuilder *pFG) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetInterestRange( + REFERENCE_TIME Start, + REFERENCE_TIME Stop) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetInterestRange2( + double Start, + double Stop) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetRenderRange( + REFERENCE_TIME Start, + REFERENCE_TIME Stop) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetRenderRange2( + double Start, + double Stop) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetGroupOutputPin( + long Group, + /* [out] */ IPin **ppRenderPin) = 0; + + virtual HRESULT STDMETHODCALLTYPE ScrapIt( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE RenderOutputPins( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVendorString( + /* [retval][out] */ BSTR *pVendorID) = 0; + + virtual HRESULT STDMETHODCALLTYPE ConnectFrontEnd( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSourceConnectCallback( + IGrfCache *pCallback) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDynamicReconnectLevel( + long Level) = 0; + + virtual HRESULT STDMETHODCALLTYPE DoSmartRecompression( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE UseInSmartRecompressionGraph( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSourceNameValidation( + BSTR FilterString, + IMediaLocator *pOverride, + LONG Flags) = 0; + + virtual HRESULT STDMETHODCALLTYPE Commit( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Decommit( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCaps( + long Index, + long *pReturn) = 0; + + }; + +#else /* C style interface */ + + typedef struct IRenderEngineVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IRenderEngine * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IRenderEngine * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IRenderEngine * This); + + HRESULT ( STDMETHODCALLTYPE *SetTimelineObject )( + IRenderEngine * This, + IAMTimeline *pTimeline); + + HRESULT ( STDMETHODCALLTYPE *GetTimelineObject )( + IRenderEngine * This, + /* [out] */ IAMTimeline **ppTimeline); + + HRESULT ( STDMETHODCALLTYPE *GetFilterGraph )( + IRenderEngine * This, + /* [out] */ IGraphBuilder **ppFG); + + HRESULT ( STDMETHODCALLTYPE *SetFilterGraph )( + IRenderEngine * This, + IGraphBuilder *pFG); + + HRESULT ( STDMETHODCALLTYPE *SetInterestRange )( + IRenderEngine * This, + REFERENCE_TIME Start, + REFERENCE_TIME Stop); + + HRESULT ( STDMETHODCALLTYPE *SetInterestRange2 )( + IRenderEngine * This, + double Start, + double Stop); + + HRESULT ( STDMETHODCALLTYPE *SetRenderRange )( + IRenderEngine * This, + REFERENCE_TIME Start, + REFERENCE_TIME Stop); + + HRESULT ( STDMETHODCALLTYPE *SetRenderRange2 )( + IRenderEngine * This, + double Start, + double Stop); + + HRESULT ( STDMETHODCALLTYPE *GetGroupOutputPin )( + IRenderEngine * This, + long Group, + /* [out] */ IPin **ppRenderPin); + + HRESULT ( STDMETHODCALLTYPE *ScrapIt )( + IRenderEngine * This); + + HRESULT ( STDMETHODCALLTYPE *RenderOutputPins )( + IRenderEngine * This); + + HRESULT ( STDMETHODCALLTYPE *GetVendorString )( + IRenderEngine * This, + /* [retval][out] */ BSTR *pVendorID); + + HRESULT ( STDMETHODCALLTYPE *ConnectFrontEnd )( + IRenderEngine * This); + + HRESULT ( STDMETHODCALLTYPE *SetSourceConnectCallback )( + IRenderEngine * This, + IGrfCache *pCallback); + + HRESULT ( STDMETHODCALLTYPE *SetDynamicReconnectLevel )( + IRenderEngine * This, + long Level); + + HRESULT ( STDMETHODCALLTYPE *DoSmartRecompression )( + IRenderEngine * This); + + HRESULT ( STDMETHODCALLTYPE *UseInSmartRecompressionGraph )( + IRenderEngine * This); + + HRESULT ( STDMETHODCALLTYPE *SetSourceNameValidation )( + IRenderEngine * This, + BSTR FilterString, + IMediaLocator *pOverride, + LONG Flags); + + HRESULT ( STDMETHODCALLTYPE *Commit )( + IRenderEngine * This); + + HRESULT ( STDMETHODCALLTYPE *Decommit )( + IRenderEngine * This); + + HRESULT ( STDMETHODCALLTYPE *GetCaps )( + IRenderEngine * This, + long Index, + long *pReturn); + + END_INTERFACE + } IRenderEngineVtbl; + + interface IRenderEngine + { + CONST_VTBL struct IRenderEngineVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IRenderEngine_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IRenderEngine_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IRenderEngine_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IRenderEngine_SetTimelineObject(This,pTimeline) \ + (This)->lpVtbl -> SetTimelineObject(This,pTimeline) + +#define IRenderEngine_GetTimelineObject(This,ppTimeline) \ + (This)->lpVtbl -> GetTimelineObject(This,ppTimeline) + +#define IRenderEngine_GetFilterGraph(This,ppFG) \ + (This)->lpVtbl -> GetFilterGraph(This,ppFG) + +#define IRenderEngine_SetFilterGraph(This,pFG) \ + (This)->lpVtbl -> SetFilterGraph(This,pFG) + +#define IRenderEngine_SetInterestRange(This,Start,Stop) \ + (This)->lpVtbl -> SetInterestRange(This,Start,Stop) + +#define IRenderEngine_SetInterestRange2(This,Start,Stop) \ + (This)->lpVtbl -> SetInterestRange2(This,Start,Stop) + +#define IRenderEngine_SetRenderRange(This,Start,Stop) \ + (This)->lpVtbl -> SetRenderRange(This,Start,Stop) + +#define IRenderEngine_SetRenderRange2(This,Start,Stop) \ + (This)->lpVtbl -> SetRenderRange2(This,Start,Stop) + +#define IRenderEngine_GetGroupOutputPin(This,Group,ppRenderPin) \ + (This)->lpVtbl -> GetGroupOutputPin(This,Group,ppRenderPin) + +#define IRenderEngine_ScrapIt(This) \ + (This)->lpVtbl -> ScrapIt(This) + +#define IRenderEngine_RenderOutputPins(This) \ + (This)->lpVtbl -> RenderOutputPins(This) + +#define IRenderEngine_GetVendorString(This,pVendorID) \ + (This)->lpVtbl -> GetVendorString(This,pVendorID) + +#define IRenderEngine_ConnectFrontEnd(This) \ + (This)->lpVtbl -> ConnectFrontEnd(This) + +#define IRenderEngine_SetSourceConnectCallback(This,pCallback) \ + (This)->lpVtbl -> SetSourceConnectCallback(This,pCallback) + +#define IRenderEngine_SetDynamicReconnectLevel(This,Level) \ + (This)->lpVtbl -> SetDynamicReconnectLevel(This,Level) + +#define IRenderEngine_DoSmartRecompression(This) \ + (This)->lpVtbl -> DoSmartRecompression(This) + +#define IRenderEngine_UseInSmartRecompressionGraph(This) \ + (This)->lpVtbl -> UseInSmartRecompressionGraph(This) + +#define IRenderEngine_SetSourceNameValidation(This,FilterString,pOverride,Flags) \ + (This)->lpVtbl -> SetSourceNameValidation(This,FilterString,pOverride,Flags) + +#define IRenderEngine_Commit(This) \ + (This)->lpVtbl -> Commit(This) + +#define IRenderEngine_Decommit(This) \ + (This)->lpVtbl -> Decommit(This) + +#define IRenderEngine_GetCaps(This,Index,pReturn) \ + (This)->lpVtbl -> GetCaps(This,Index,pReturn) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IRenderEngine_SetTimelineObject_Proxy( + IRenderEngine * This, + IAMTimeline *pTimeline); + + +void __RPC_STUB IRenderEngine_SetTimelineObject_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_GetTimelineObject_Proxy( + IRenderEngine * This, + /* [out] */ IAMTimeline **ppTimeline); + + +void __RPC_STUB IRenderEngine_GetTimelineObject_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_GetFilterGraph_Proxy( + IRenderEngine * This, + /* [out] */ IGraphBuilder **ppFG); + + +void __RPC_STUB IRenderEngine_GetFilterGraph_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_SetFilterGraph_Proxy( + IRenderEngine * This, + IGraphBuilder *pFG); + + +void __RPC_STUB IRenderEngine_SetFilterGraph_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_SetInterestRange_Proxy( + IRenderEngine * This, + REFERENCE_TIME Start, + REFERENCE_TIME Stop); + + +void __RPC_STUB IRenderEngine_SetInterestRange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_SetInterestRange2_Proxy( + IRenderEngine * This, + double Start, + double Stop); + + +void __RPC_STUB IRenderEngine_SetInterestRange2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_SetRenderRange_Proxy( + IRenderEngine * This, + REFERENCE_TIME Start, + REFERENCE_TIME Stop); + + +void __RPC_STUB IRenderEngine_SetRenderRange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_SetRenderRange2_Proxy( + IRenderEngine * This, + double Start, + double Stop); + + +void __RPC_STUB IRenderEngine_SetRenderRange2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_GetGroupOutputPin_Proxy( + IRenderEngine * This, + long Group, + /* [out] */ IPin **ppRenderPin); + + +void __RPC_STUB IRenderEngine_GetGroupOutputPin_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_ScrapIt_Proxy( + IRenderEngine * This); + + +void __RPC_STUB IRenderEngine_ScrapIt_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_RenderOutputPins_Proxy( + IRenderEngine * This); + + +void __RPC_STUB IRenderEngine_RenderOutputPins_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_GetVendorString_Proxy( + IRenderEngine * This, + /* [retval][out] */ BSTR *pVendorID); + + +void __RPC_STUB IRenderEngine_GetVendorString_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_ConnectFrontEnd_Proxy( + IRenderEngine * This); + + +void __RPC_STUB IRenderEngine_ConnectFrontEnd_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_SetSourceConnectCallback_Proxy( + IRenderEngine * This, + IGrfCache *pCallback); + + +void __RPC_STUB IRenderEngine_SetSourceConnectCallback_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_SetDynamicReconnectLevel_Proxy( + IRenderEngine * This, + long Level); + + +void __RPC_STUB IRenderEngine_SetDynamicReconnectLevel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_DoSmartRecompression_Proxy( + IRenderEngine * This); + + +void __RPC_STUB IRenderEngine_DoSmartRecompression_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_UseInSmartRecompressionGraph_Proxy( + IRenderEngine * This); + + +void __RPC_STUB IRenderEngine_UseInSmartRecompressionGraph_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_SetSourceNameValidation_Proxy( + IRenderEngine * This, + BSTR FilterString, + IMediaLocator *pOverride, + LONG Flags); + + +void __RPC_STUB IRenderEngine_SetSourceNameValidation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_Commit_Proxy( + IRenderEngine * This); + + +void __RPC_STUB IRenderEngine_Commit_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_Decommit_Proxy( + IRenderEngine * This); + + +void __RPC_STUB IRenderEngine_Decommit_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IRenderEngine_GetCaps_Proxy( + IRenderEngine * This, + long Index, + long *pReturn); + + +void __RPC_STUB IRenderEngine_GetCaps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IRenderEngine_INTERFACE_DEFINED__ */ + + +#ifndef __IFindCompressorCB_INTERFACE_DEFINED__ +#define __IFindCompressorCB_INTERFACE_DEFINED__ + +/* interface IFindCompressorCB */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IFindCompressorCB; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("F03FA8DE-879A-4d59-9B2C-26BB1CF83461") + IFindCompressorCB : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetCompressor( + AM_MEDIA_TYPE *pType, + AM_MEDIA_TYPE *pCompType, + /* [out] */ IBaseFilter **ppFilter) = 0; + + }; + +#else /* C style interface */ + + typedef struct IFindCompressorCBVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IFindCompressorCB * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IFindCompressorCB * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IFindCompressorCB * This); + + HRESULT ( STDMETHODCALLTYPE *GetCompressor )( + IFindCompressorCB * This, + AM_MEDIA_TYPE *pType, + AM_MEDIA_TYPE *pCompType, + /* [out] */ IBaseFilter **ppFilter); + + END_INTERFACE + } IFindCompressorCBVtbl; + + interface IFindCompressorCB + { + CONST_VTBL struct IFindCompressorCBVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IFindCompressorCB_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IFindCompressorCB_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IFindCompressorCB_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IFindCompressorCB_GetCompressor(This,pType,pCompType,ppFilter) \ + (This)->lpVtbl -> GetCompressor(This,pType,pCompType,ppFilter) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IFindCompressorCB_GetCompressor_Proxy( + IFindCompressorCB * This, + AM_MEDIA_TYPE *pType, + AM_MEDIA_TYPE *pCompType, + /* [out] */ IBaseFilter **ppFilter); + + +void __RPC_STUB IFindCompressorCB_GetCompressor_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IFindCompressorCB_INTERFACE_DEFINED__ */ + + +#ifndef __ISmartRenderEngine_INTERFACE_DEFINED__ +#define __ISmartRenderEngine_INTERFACE_DEFINED__ + +/* interface ISmartRenderEngine */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_ISmartRenderEngine; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("F03FA8CE-879A-4d59-9B2C-26BB1CF83461") + ISmartRenderEngine : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetGroupCompressor( + long Group, + IBaseFilter *pCompressor) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetGroupCompressor( + long Group, + IBaseFilter **pCompressor) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFindCompressorCB( + IFindCompressorCB *pCallback) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISmartRenderEngineVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISmartRenderEngine * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISmartRenderEngine * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISmartRenderEngine * This); + + HRESULT ( STDMETHODCALLTYPE *SetGroupCompressor )( + ISmartRenderEngine * This, + long Group, + IBaseFilter *pCompressor); + + HRESULT ( STDMETHODCALLTYPE *GetGroupCompressor )( + ISmartRenderEngine * This, + long Group, + IBaseFilter **pCompressor); + + HRESULT ( STDMETHODCALLTYPE *SetFindCompressorCB )( + ISmartRenderEngine * This, + IFindCompressorCB *pCallback); + + END_INTERFACE + } ISmartRenderEngineVtbl; + + interface ISmartRenderEngine + { + CONST_VTBL struct ISmartRenderEngineVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISmartRenderEngine_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISmartRenderEngine_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISmartRenderEngine_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISmartRenderEngine_SetGroupCompressor(This,Group,pCompressor) \ + (This)->lpVtbl -> SetGroupCompressor(This,Group,pCompressor) + +#define ISmartRenderEngine_GetGroupCompressor(This,Group,pCompressor) \ + (This)->lpVtbl -> GetGroupCompressor(This,Group,pCompressor) + +#define ISmartRenderEngine_SetFindCompressorCB(This,pCallback) \ + (This)->lpVtbl -> SetFindCompressorCB(This,pCallback) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISmartRenderEngine_SetGroupCompressor_Proxy( + ISmartRenderEngine * This, + long Group, + IBaseFilter *pCompressor); + + +void __RPC_STUB ISmartRenderEngine_SetGroupCompressor_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISmartRenderEngine_GetGroupCompressor_Proxy( + ISmartRenderEngine * This, + long Group, + IBaseFilter **pCompressor); + + +void __RPC_STUB ISmartRenderEngine_GetGroupCompressor_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISmartRenderEngine_SetFindCompressorCB_Proxy( + ISmartRenderEngine * This, + IFindCompressorCB *pCallback); + + +void __RPC_STUB ISmartRenderEngine_SetFindCompressorCB_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISmartRenderEngine_INTERFACE_DEFINED__ */ + + +#ifndef __IAMTimelineObj_INTERFACE_DEFINED__ +#define __IAMTimelineObj_INTERFACE_DEFINED__ + +/* interface IAMTimelineObj */ +/* [unique][helpstring][uuid][local][object] */ + + +EXTERN_C const IID IID_IAMTimelineObj; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("78530B77-61F9-11D2-8CAD-00A024580902") + IAMTimelineObj : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetStartStop( + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetStartStop2( + REFTIME *pStart, + REFTIME *pStop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE FixTimes( + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE FixTimes2( + REFTIME *pStart, + REFTIME *pStop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetStartStop( + REFERENCE_TIME Start, + REFERENCE_TIME Stop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetStartStop2( + REFTIME Start, + REFTIME Stop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPropertySetter( + /* [retval][out] */ IPropertySetter **pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetPropertySetter( + IPropertySetter *newVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSubObject( + /* [retval][out] */ IUnknown **pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetSubObject( + IUnknown *newVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetSubObjectGUID( + GUID newVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetSubObjectGUIDB( + BSTR newVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSubObjectGUID( + GUID *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSubObjectGUIDB( + /* [retval][out] */ BSTR *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSubObjectLoaded( + BOOL *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetTimelineType( + TIMELINE_MAJOR_TYPE *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetTimelineType( + TIMELINE_MAJOR_TYPE newVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetUserID( + long *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetUserID( + long newVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetGenID( + long *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetUserName( + /* [retval][out] */ BSTR *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetUserName( + BSTR newVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetUserData( + BYTE *pData, + long *pSize) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetUserData( + BYTE *pData, + long Size) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMuted( + BOOL *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMuted( + BOOL newVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetLocked( + BOOL *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetLocked( + BOOL newVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDirtyRange( + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDirtyRange2( + REFTIME *pStart, + REFTIME *pStop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetDirtyRange( + REFERENCE_TIME Start, + REFERENCE_TIME Stop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetDirtyRange2( + REFTIME Start, + REFTIME Stop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE ClearDirty( void) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Remove( void) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE RemoveAll( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTimelineNoRef( + IAMTimeline **ppResult) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetGroupIBelongTo( + /* [out] */ IAMTimelineGroup **ppGroup) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetEmbedDepth( + long *pVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTimelineObjVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTimelineObj * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTimelineObj * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTimelineObj * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetStartStop )( + IAMTimelineObj * This, + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetStartStop2 )( + IAMTimelineObj * This, + REFTIME *pStart, + REFTIME *pStop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *FixTimes )( + IAMTimelineObj * This, + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *FixTimes2 )( + IAMTimelineObj * This, + REFTIME *pStart, + REFTIME *pStop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetStartStop )( + IAMTimelineObj * This, + REFERENCE_TIME Start, + REFERENCE_TIME Stop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetStartStop2 )( + IAMTimelineObj * This, + REFTIME Start, + REFTIME Stop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPropertySetter )( + IAMTimelineObj * This, + /* [retval][out] */ IPropertySetter **pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetPropertySetter )( + IAMTimelineObj * This, + IPropertySetter *newVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSubObject )( + IAMTimelineObj * This, + /* [retval][out] */ IUnknown **pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetSubObject )( + IAMTimelineObj * This, + IUnknown *newVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetSubObjectGUID )( + IAMTimelineObj * This, + GUID newVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetSubObjectGUIDB )( + IAMTimelineObj * This, + BSTR newVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSubObjectGUID )( + IAMTimelineObj * This, + GUID *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSubObjectGUIDB )( + IAMTimelineObj * This, + /* [retval][out] */ BSTR *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSubObjectLoaded )( + IAMTimelineObj * This, + BOOL *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetTimelineType )( + IAMTimelineObj * This, + TIMELINE_MAJOR_TYPE *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetTimelineType )( + IAMTimelineObj * This, + TIMELINE_MAJOR_TYPE newVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetUserID )( + IAMTimelineObj * This, + long *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetUserID )( + IAMTimelineObj * This, + long newVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetGenID )( + IAMTimelineObj * This, + long *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetUserName )( + IAMTimelineObj * This, + /* [retval][out] */ BSTR *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetUserName )( + IAMTimelineObj * This, + BSTR newVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetUserData )( + IAMTimelineObj * This, + BYTE *pData, + long *pSize); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetUserData )( + IAMTimelineObj * This, + BYTE *pData, + long Size); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMuted )( + IAMTimelineObj * This, + BOOL *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMuted )( + IAMTimelineObj * This, + BOOL newVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetLocked )( + IAMTimelineObj * This, + BOOL *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetLocked )( + IAMTimelineObj * This, + BOOL newVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDirtyRange )( + IAMTimelineObj * This, + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDirtyRange2 )( + IAMTimelineObj * This, + REFTIME *pStart, + REFTIME *pStop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetDirtyRange )( + IAMTimelineObj * This, + REFERENCE_TIME Start, + REFERENCE_TIME Stop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetDirtyRange2 )( + IAMTimelineObj * This, + REFTIME Start, + REFTIME Stop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *ClearDirty )( + IAMTimelineObj * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Remove )( + IAMTimelineObj * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *RemoveAll )( + IAMTimelineObj * This); + + HRESULT ( STDMETHODCALLTYPE *GetTimelineNoRef )( + IAMTimelineObj * This, + IAMTimeline **ppResult); + + HRESULT ( STDMETHODCALLTYPE *GetGroupIBelongTo )( + IAMTimelineObj * This, + /* [out] */ IAMTimelineGroup **ppGroup); + + HRESULT ( STDMETHODCALLTYPE *GetEmbedDepth )( + IAMTimelineObj * This, + long *pVal); + + END_INTERFACE + } IAMTimelineObjVtbl; + + interface IAMTimelineObj + { + CONST_VTBL struct IAMTimelineObjVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTimelineObj_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTimelineObj_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTimelineObj_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTimelineObj_GetStartStop(This,pStart,pStop) \ + (This)->lpVtbl -> GetStartStop(This,pStart,pStop) + +#define IAMTimelineObj_GetStartStop2(This,pStart,pStop) \ + (This)->lpVtbl -> GetStartStop2(This,pStart,pStop) + +#define IAMTimelineObj_FixTimes(This,pStart,pStop) \ + (This)->lpVtbl -> FixTimes(This,pStart,pStop) + +#define IAMTimelineObj_FixTimes2(This,pStart,pStop) \ + (This)->lpVtbl -> FixTimes2(This,pStart,pStop) + +#define IAMTimelineObj_SetStartStop(This,Start,Stop) \ + (This)->lpVtbl -> SetStartStop(This,Start,Stop) + +#define IAMTimelineObj_SetStartStop2(This,Start,Stop) \ + (This)->lpVtbl -> SetStartStop2(This,Start,Stop) + +#define IAMTimelineObj_GetPropertySetter(This,pVal) \ + (This)->lpVtbl -> GetPropertySetter(This,pVal) + +#define IAMTimelineObj_SetPropertySetter(This,newVal) \ + (This)->lpVtbl -> SetPropertySetter(This,newVal) + +#define IAMTimelineObj_GetSubObject(This,pVal) \ + (This)->lpVtbl -> GetSubObject(This,pVal) + +#define IAMTimelineObj_SetSubObject(This,newVal) \ + (This)->lpVtbl -> SetSubObject(This,newVal) + +#define IAMTimelineObj_SetSubObjectGUID(This,newVal) \ + (This)->lpVtbl -> SetSubObjectGUID(This,newVal) + +#define IAMTimelineObj_SetSubObjectGUIDB(This,newVal) \ + (This)->lpVtbl -> SetSubObjectGUIDB(This,newVal) + +#define IAMTimelineObj_GetSubObjectGUID(This,pVal) \ + (This)->lpVtbl -> GetSubObjectGUID(This,pVal) + +#define IAMTimelineObj_GetSubObjectGUIDB(This,pVal) \ + (This)->lpVtbl -> GetSubObjectGUIDB(This,pVal) + +#define IAMTimelineObj_GetSubObjectLoaded(This,pVal) \ + (This)->lpVtbl -> GetSubObjectLoaded(This,pVal) + +#define IAMTimelineObj_GetTimelineType(This,pVal) \ + (This)->lpVtbl -> GetTimelineType(This,pVal) + +#define IAMTimelineObj_SetTimelineType(This,newVal) \ + (This)->lpVtbl -> SetTimelineType(This,newVal) + +#define IAMTimelineObj_GetUserID(This,pVal) \ + (This)->lpVtbl -> GetUserID(This,pVal) + +#define IAMTimelineObj_SetUserID(This,newVal) \ + (This)->lpVtbl -> SetUserID(This,newVal) + +#define IAMTimelineObj_GetGenID(This,pVal) \ + (This)->lpVtbl -> GetGenID(This,pVal) + +#define IAMTimelineObj_GetUserName(This,pVal) \ + (This)->lpVtbl -> GetUserName(This,pVal) + +#define IAMTimelineObj_SetUserName(This,newVal) \ + (This)->lpVtbl -> SetUserName(This,newVal) + +#define IAMTimelineObj_GetUserData(This,pData,pSize) \ + (This)->lpVtbl -> GetUserData(This,pData,pSize) + +#define IAMTimelineObj_SetUserData(This,pData,Size) \ + (This)->lpVtbl -> SetUserData(This,pData,Size) + +#define IAMTimelineObj_GetMuted(This,pVal) \ + (This)->lpVtbl -> GetMuted(This,pVal) + +#define IAMTimelineObj_SetMuted(This,newVal) \ + (This)->lpVtbl -> SetMuted(This,newVal) + +#define IAMTimelineObj_GetLocked(This,pVal) \ + (This)->lpVtbl -> GetLocked(This,pVal) + +#define IAMTimelineObj_SetLocked(This,newVal) \ + (This)->lpVtbl -> SetLocked(This,newVal) + +#define IAMTimelineObj_GetDirtyRange(This,pStart,pStop) \ + (This)->lpVtbl -> GetDirtyRange(This,pStart,pStop) + +#define IAMTimelineObj_GetDirtyRange2(This,pStart,pStop) \ + (This)->lpVtbl -> GetDirtyRange2(This,pStart,pStop) + +#define IAMTimelineObj_SetDirtyRange(This,Start,Stop) \ + (This)->lpVtbl -> SetDirtyRange(This,Start,Stop) + +#define IAMTimelineObj_SetDirtyRange2(This,Start,Stop) \ + (This)->lpVtbl -> SetDirtyRange2(This,Start,Stop) + +#define IAMTimelineObj_ClearDirty(This) \ + (This)->lpVtbl -> ClearDirty(This) + +#define IAMTimelineObj_Remove(This) \ + (This)->lpVtbl -> Remove(This) + +#define IAMTimelineObj_RemoveAll(This) \ + (This)->lpVtbl -> RemoveAll(This) + +#define IAMTimelineObj_GetTimelineNoRef(This,ppResult) \ + (This)->lpVtbl -> GetTimelineNoRef(This,ppResult) + +#define IAMTimelineObj_GetGroupIBelongTo(This,ppGroup) \ + (This)->lpVtbl -> GetGroupIBelongTo(This,ppGroup) + +#define IAMTimelineObj_GetEmbedDepth(This,pVal) \ + (This)->lpVtbl -> GetEmbedDepth(This,pVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetStartStop_Proxy( + IAMTimelineObj * This, + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop); + + +void __RPC_STUB IAMTimelineObj_GetStartStop_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetStartStop2_Proxy( + IAMTimelineObj * This, + REFTIME *pStart, + REFTIME *pStop); + + +void __RPC_STUB IAMTimelineObj_GetStartStop2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_FixTimes_Proxy( + IAMTimelineObj * This, + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop); + + +void __RPC_STUB IAMTimelineObj_FixTimes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_FixTimes2_Proxy( + IAMTimelineObj * This, + REFTIME *pStart, + REFTIME *pStop); + + +void __RPC_STUB IAMTimelineObj_FixTimes2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetStartStop_Proxy( + IAMTimelineObj * This, + REFERENCE_TIME Start, + REFERENCE_TIME Stop); + + +void __RPC_STUB IAMTimelineObj_SetStartStop_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetStartStop2_Proxy( + IAMTimelineObj * This, + REFTIME Start, + REFTIME Stop); + + +void __RPC_STUB IAMTimelineObj_SetStartStop2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetPropertySetter_Proxy( + IAMTimelineObj * This, + /* [retval][out] */ IPropertySetter **pVal); + + +void __RPC_STUB IAMTimelineObj_GetPropertySetter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetPropertySetter_Proxy( + IAMTimelineObj * This, + IPropertySetter *newVal); + + +void __RPC_STUB IAMTimelineObj_SetPropertySetter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetSubObject_Proxy( + IAMTimelineObj * This, + /* [retval][out] */ IUnknown **pVal); + + +void __RPC_STUB IAMTimelineObj_GetSubObject_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetSubObject_Proxy( + IAMTimelineObj * This, + IUnknown *newVal); + + +void __RPC_STUB IAMTimelineObj_SetSubObject_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetSubObjectGUID_Proxy( + IAMTimelineObj * This, + GUID newVal); + + +void __RPC_STUB IAMTimelineObj_SetSubObjectGUID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetSubObjectGUIDB_Proxy( + IAMTimelineObj * This, + BSTR newVal); + + +void __RPC_STUB IAMTimelineObj_SetSubObjectGUIDB_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetSubObjectGUID_Proxy( + IAMTimelineObj * This, + GUID *pVal); + + +void __RPC_STUB IAMTimelineObj_GetSubObjectGUID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetSubObjectGUIDB_Proxy( + IAMTimelineObj * This, + /* [retval][out] */ BSTR *pVal); + + +void __RPC_STUB IAMTimelineObj_GetSubObjectGUIDB_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetSubObjectLoaded_Proxy( + IAMTimelineObj * This, + BOOL *pVal); + + +void __RPC_STUB IAMTimelineObj_GetSubObjectLoaded_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetTimelineType_Proxy( + IAMTimelineObj * This, + TIMELINE_MAJOR_TYPE *pVal); + + +void __RPC_STUB IAMTimelineObj_GetTimelineType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetTimelineType_Proxy( + IAMTimelineObj * This, + TIMELINE_MAJOR_TYPE newVal); + + +void __RPC_STUB IAMTimelineObj_SetTimelineType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetUserID_Proxy( + IAMTimelineObj * This, + long *pVal); + + +void __RPC_STUB IAMTimelineObj_GetUserID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetUserID_Proxy( + IAMTimelineObj * This, + long newVal); + + +void __RPC_STUB IAMTimelineObj_SetUserID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetGenID_Proxy( + IAMTimelineObj * This, + long *pVal); + + +void __RPC_STUB IAMTimelineObj_GetGenID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetUserName_Proxy( + IAMTimelineObj * This, + /* [retval][out] */ BSTR *pVal); + + +void __RPC_STUB IAMTimelineObj_GetUserName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetUserName_Proxy( + IAMTimelineObj * This, + BSTR newVal); + + +void __RPC_STUB IAMTimelineObj_SetUserName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetUserData_Proxy( + IAMTimelineObj * This, + BYTE *pData, + long *pSize); + + +void __RPC_STUB IAMTimelineObj_GetUserData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetUserData_Proxy( + IAMTimelineObj * This, + BYTE *pData, + long Size); + + +void __RPC_STUB IAMTimelineObj_SetUserData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetMuted_Proxy( + IAMTimelineObj * This, + BOOL *pVal); + + +void __RPC_STUB IAMTimelineObj_GetMuted_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetMuted_Proxy( + IAMTimelineObj * This, + BOOL newVal); + + +void __RPC_STUB IAMTimelineObj_SetMuted_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetLocked_Proxy( + IAMTimelineObj * This, + BOOL *pVal); + + +void __RPC_STUB IAMTimelineObj_GetLocked_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetLocked_Proxy( + IAMTimelineObj * This, + BOOL newVal); + + +void __RPC_STUB IAMTimelineObj_SetLocked_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetDirtyRange_Proxy( + IAMTimelineObj * This, + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop); + + +void __RPC_STUB IAMTimelineObj_GetDirtyRange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetDirtyRange2_Proxy( + IAMTimelineObj * This, + REFTIME *pStart, + REFTIME *pStop); + + +void __RPC_STUB IAMTimelineObj_GetDirtyRange2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetDirtyRange_Proxy( + IAMTimelineObj * This, + REFERENCE_TIME Start, + REFERENCE_TIME Stop); + + +void __RPC_STUB IAMTimelineObj_SetDirtyRange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_SetDirtyRange2_Proxy( + IAMTimelineObj * This, + REFTIME Start, + REFTIME Stop); + + +void __RPC_STUB IAMTimelineObj_SetDirtyRange2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_ClearDirty_Proxy( + IAMTimelineObj * This); + + +void __RPC_STUB IAMTimelineObj_ClearDirty_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_Remove_Proxy( + IAMTimelineObj * This); + + +void __RPC_STUB IAMTimelineObj_Remove_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineObj_RemoveAll_Proxy( + IAMTimelineObj * This); + + +void __RPC_STUB IAMTimelineObj_RemoveAll_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetTimelineNoRef_Proxy( + IAMTimelineObj * This, + IAMTimeline **ppResult); + + +void __RPC_STUB IAMTimelineObj_GetTimelineNoRef_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetGroupIBelongTo_Proxy( + IAMTimelineObj * This, + /* [out] */ IAMTimelineGroup **ppGroup); + + +void __RPC_STUB IAMTimelineObj_GetGroupIBelongTo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineObj_GetEmbedDepth_Proxy( + IAMTimelineObj * This, + long *pVal); + + +void __RPC_STUB IAMTimelineObj_GetEmbedDepth_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTimelineObj_INTERFACE_DEFINED__ */ + + +#ifndef __IAMTimelineEffectable_INTERFACE_DEFINED__ +#define __IAMTimelineEffectable_INTERFACE_DEFINED__ + +/* interface IAMTimelineEffectable */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IAMTimelineEffectable; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("EAE58537-622E-11d2-8CAD-00A024580902") + IAMTimelineEffectable : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EffectInsBefore( + IAMTimelineObj *pFX, + long priority) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EffectSwapPriorities( + long PriorityA, + long PriorityB) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EffectGetCount( + long *pCount) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetEffect( + /* [out] */ IAMTimelineObj **ppFx, + long Which) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTimelineEffectableVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTimelineEffectable * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTimelineEffectable * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTimelineEffectable * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EffectInsBefore )( + IAMTimelineEffectable * This, + IAMTimelineObj *pFX, + long priority); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EffectSwapPriorities )( + IAMTimelineEffectable * This, + long PriorityA, + long PriorityB); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EffectGetCount )( + IAMTimelineEffectable * This, + long *pCount); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetEffect )( + IAMTimelineEffectable * This, + /* [out] */ IAMTimelineObj **ppFx, + long Which); + + END_INTERFACE + } IAMTimelineEffectableVtbl; + + interface IAMTimelineEffectable + { + CONST_VTBL struct IAMTimelineEffectableVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTimelineEffectable_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTimelineEffectable_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTimelineEffectable_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTimelineEffectable_EffectInsBefore(This,pFX,priority) \ + (This)->lpVtbl -> EffectInsBefore(This,pFX,priority) + +#define IAMTimelineEffectable_EffectSwapPriorities(This,PriorityA,PriorityB) \ + (This)->lpVtbl -> EffectSwapPriorities(This,PriorityA,PriorityB) + +#define IAMTimelineEffectable_EffectGetCount(This,pCount) \ + (This)->lpVtbl -> EffectGetCount(This,pCount) + +#define IAMTimelineEffectable_GetEffect(This,ppFx,Which) \ + (This)->lpVtbl -> GetEffect(This,ppFx,Which) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineEffectable_EffectInsBefore_Proxy( + IAMTimelineEffectable * This, + IAMTimelineObj *pFX, + long priority); + + +void __RPC_STUB IAMTimelineEffectable_EffectInsBefore_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineEffectable_EffectSwapPriorities_Proxy( + IAMTimelineEffectable * This, + long PriorityA, + long PriorityB); + + +void __RPC_STUB IAMTimelineEffectable_EffectSwapPriorities_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineEffectable_EffectGetCount_Proxy( + IAMTimelineEffectable * This, + long *pCount); + + +void __RPC_STUB IAMTimelineEffectable_EffectGetCount_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineEffectable_GetEffect_Proxy( + IAMTimelineEffectable * This, + /* [out] */ IAMTimelineObj **ppFx, + long Which); + + +void __RPC_STUB IAMTimelineEffectable_GetEffect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTimelineEffectable_INTERFACE_DEFINED__ */ + + +#ifndef __IAMTimelineEffect_INTERFACE_DEFINED__ +#define __IAMTimelineEffect_INTERFACE_DEFINED__ + +/* interface IAMTimelineEffect */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IAMTimelineEffect; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("BCE0C264-622D-11d2-8CAD-00A024580902") + IAMTimelineEffect : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EffectGetPriority( + long *pVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTimelineEffectVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTimelineEffect * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTimelineEffect * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTimelineEffect * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EffectGetPriority )( + IAMTimelineEffect * This, + long *pVal); + + END_INTERFACE + } IAMTimelineEffectVtbl; + + interface IAMTimelineEffect + { + CONST_VTBL struct IAMTimelineEffectVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTimelineEffect_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTimelineEffect_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTimelineEffect_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTimelineEffect_EffectGetPriority(This,pVal) \ + (This)->lpVtbl -> EffectGetPriority(This,pVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineEffect_EffectGetPriority_Proxy( + IAMTimelineEffect * This, + long *pVal); + + +void __RPC_STUB IAMTimelineEffect_EffectGetPriority_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTimelineEffect_INTERFACE_DEFINED__ */ + + +#ifndef __IAMTimelineTransable_INTERFACE_DEFINED__ +#define __IAMTimelineTransable_INTERFACE_DEFINED__ + +/* interface IAMTimelineTransable */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IAMTimelineTransable; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("378FA386-622E-11d2-8CAD-00A024580902") + IAMTimelineTransable : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE TransAdd( + IAMTimelineObj *pTrans) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE TransGetCount( + long *pCount) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetNextTrans( + /* [out] */ IAMTimelineObj **ppTrans, + REFERENCE_TIME *pInOut) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetNextTrans2( + /* [out] */ IAMTimelineObj **ppTrans, + REFTIME *pInOut) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetTransAtTime( + /* [out] */ IAMTimelineObj **ppObj, + REFERENCE_TIME Time, + long SearchDirection) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetTransAtTime2( + /* [out] */ IAMTimelineObj **ppObj, + REFTIME Time, + long SearchDirection) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTimelineTransableVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTimelineTransable * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTimelineTransable * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTimelineTransable * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *TransAdd )( + IAMTimelineTransable * This, + IAMTimelineObj *pTrans); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *TransGetCount )( + IAMTimelineTransable * This, + long *pCount); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetNextTrans )( + IAMTimelineTransable * This, + /* [out] */ IAMTimelineObj **ppTrans, + REFERENCE_TIME *pInOut); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetNextTrans2 )( + IAMTimelineTransable * This, + /* [out] */ IAMTimelineObj **ppTrans, + REFTIME *pInOut); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetTransAtTime )( + IAMTimelineTransable * This, + /* [out] */ IAMTimelineObj **ppObj, + REFERENCE_TIME Time, + long SearchDirection); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetTransAtTime2 )( + IAMTimelineTransable * This, + /* [out] */ IAMTimelineObj **ppObj, + REFTIME Time, + long SearchDirection); + + END_INTERFACE + } IAMTimelineTransableVtbl; + + interface IAMTimelineTransable + { + CONST_VTBL struct IAMTimelineTransableVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTimelineTransable_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTimelineTransable_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTimelineTransable_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTimelineTransable_TransAdd(This,pTrans) \ + (This)->lpVtbl -> TransAdd(This,pTrans) + +#define IAMTimelineTransable_TransGetCount(This,pCount) \ + (This)->lpVtbl -> TransGetCount(This,pCount) + +#define IAMTimelineTransable_GetNextTrans(This,ppTrans,pInOut) \ + (This)->lpVtbl -> GetNextTrans(This,ppTrans,pInOut) + +#define IAMTimelineTransable_GetNextTrans2(This,ppTrans,pInOut) \ + (This)->lpVtbl -> GetNextTrans2(This,ppTrans,pInOut) + +#define IAMTimelineTransable_GetTransAtTime(This,ppObj,Time,SearchDirection) \ + (This)->lpVtbl -> GetTransAtTime(This,ppObj,Time,SearchDirection) + +#define IAMTimelineTransable_GetTransAtTime2(This,ppObj,Time,SearchDirection) \ + (This)->lpVtbl -> GetTransAtTime2(This,ppObj,Time,SearchDirection) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTransable_TransAdd_Proxy( + IAMTimelineTransable * This, + IAMTimelineObj *pTrans); + + +void __RPC_STUB IAMTimelineTransable_TransAdd_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTransable_TransGetCount_Proxy( + IAMTimelineTransable * This, + long *pCount); + + +void __RPC_STUB IAMTimelineTransable_TransGetCount_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTransable_GetNextTrans_Proxy( + IAMTimelineTransable * This, + /* [out] */ IAMTimelineObj **ppTrans, + REFERENCE_TIME *pInOut); + + +void __RPC_STUB IAMTimelineTransable_GetNextTrans_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTransable_GetNextTrans2_Proxy( + IAMTimelineTransable * This, + /* [out] */ IAMTimelineObj **ppTrans, + REFTIME *pInOut); + + +void __RPC_STUB IAMTimelineTransable_GetNextTrans2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTransable_GetTransAtTime_Proxy( + IAMTimelineTransable * This, + /* [out] */ IAMTimelineObj **ppObj, + REFERENCE_TIME Time, + long SearchDirection); + + +void __RPC_STUB IAMTimelineTransable_GetTransAtTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTransable_GetTransAtTime2_Proxy( + IAMTimelineTransable * This, + /* [out] */ IAMTimelineObj **ppObj, + REFTIME Time, + long SearchDirection); + + +void __RPC_STUB IAMTimelineTransable_GetTransAtTime2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTimelineTransable_INTERFACE_DEFINED__ */ + + +#ifndef __IAMTimelineSplittable_INTERFACE_DEFINED__ +#define __IAMTimelineSplittable_INTERFACE_DEFINED__ + +/* interface IAMTimelineSplittable */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IAMTimelineSplittable; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A0F840A0-D590-11d2-8D55-00A0C9441E20") + IAMTimelineSplittable : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SplitAt( + REFERENCE_TIME Time) = 0; + + virtual HRESULT STDMETHODCALLTYPE SplitAt2( + REFTIME Time) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTimelineSplittableVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTimelineSplittable * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTimelineSplittable * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTimelineSplittable * This); + + HRESULT ( STDMETHODCALLTYPE *SplitAt )( + IAMTimelineSplittable * This, + REFERENCE_TIME Time); + + HRESULT ( STDMETHODCALLTYPE *SplitAt2 )( + IAMTimelineSplittable * This, + REFTIME Time); + + END_INTERFACE + } IAMTimelineSplittableVtbl; + + interface IAMTimelineSplittable + { + CONST_VTBL struct IAMTimelineSplittableVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTimelineSplittable_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTimelineSplittable_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTimelineSplittable_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTimelineSplittable_SplitAt(This,Time) \ + (This)->lpVtbl -> SplitAt(This,Time) + +#define IAMTimelineSplittable_SplitAt2(This,Time) \ + (This)->lpVtbl -> SplitAt2(This,Time) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMTimelineSplittable_SplitAt_Proxy( + IAMTimelineSplittable * This, + REFERENCE_TIME Time); + + +void __RPC_STUB IAMTimelineSplittable_SplitAt_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineSplittable_SplitAt2_Proxy( + IAMTimelineSplittable * This, + REFTIME Time); + + +void __RPC_STUB IAMTimelineSplittable_SplitAt2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTimelineSplittable_INTERFACE_DEFINED__ */ + + +#ifndef __IAMTimelineTrans_INTERFACE_DEFINED__ +#define __IAMTimelineTrans_INTERFACE_DEFINED__ + +/* interface IAMTimelineTrans */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IAMTimelineTrans; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("BCE0C265-622D-11d2-8CAD-00A024580902") + IAMTimelineTrans : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetCutPoint( + REFERENCE_TIME *pTLTime) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetCutPoint2( + REFTIME *pTLTime) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetCutPoint( + REFERENCE_TIME TLTime) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetCutPoint2( + REFTIME TLTime) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSwapInputs( + BOOL *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetSwapInputs( + BOOL pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetCutsOnly( + BOOL *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetCutsOnly( + BOOL pVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTimelineTransVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTimelineTrans * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTimelineTrans * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTimelineTrans * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetCutPoint )( + IAMTimelineTrans * This, + REFERENCE_TIME *pTLTime); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetCutPoint2 )( + IAMTimelineTrans * This, + REFTIME *pTLTime); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetCutPoint )( + IAMTimelineTrans * This, + REFERENCE_TIME TLTime); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetCutPoint2 )( + IAMTimelineTrans * This, + REFTIME TLTime); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSwapInputs )( + IAMTimelineTrans * This, + BOOL *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetSwapInputs )( + IAMTimelineTrans * This, + BOOL pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetCutsOnly )( + IAMTimelineTrans * This, + BOOL *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetCutsOnly )( + IAMTimelineTrans * This, + BOOL pVal); + + END_INTERFACE + } IAMTimelineTransVtbl; + + interface IAMTimelineTrans + { + CONST_VTBL struct IAMTimelineTransVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTimelineTrans_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTimelineTrans_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTimelineTrans_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTimelineTrans_GetCutPoint(This,pTLTime) \ + (This)->lpVtbl -> GetCutPoint(This,pTLTime) + +#define IAMTimelineTrans_GetCutPoint2(This,pTLTime) \ + (This)->lpVtbl -> GetCutPoint2(This,pTLTime) + +#define IAMTimelineTrans_SetCutPoint(This,TLTime) \ + (This)->lpVtbl -> SetCutPoint(This,TLTime) + +#define IAMTimelineTrans_SetCutPoint2(This,TLTime) \ + (This)->lpVtbl -> SetCutPoint2(This,TLTime) + +#define IAMTimelineTrans_GetSwapInputs(This,pVal) \ + (This)->lpVtbl -> GetSwapInputs(This,pVal) + +#define IAMTimelineTrans_SetSwapInputs(This,pVal) \ + (This)->lpVtbl -> SetSwapInputs(This,pVal) + +#define IAMTimelineTrans_GetCutsOnly(This,pVal) \ + (This)->lpVtbl -> GetCutsOnly(This,pVal) + +#define IAMTimelineTrans_SetCutsOnly(This,pVal) \ + (This)->lpVtbl -> SetCutsOnly(This,pVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrans_GetCutPoint_Proxy( + IAMTimelineTrans * This, + REFERENCE_TIME *pTLTime); + + +void __RPC_STUB IAMTimelineTrans_GetCutPoint_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrans_GetCutPoint2_Proxy( + IAMTimelineTrans * This, + REFTIME *pTLTime); + + +void __RPC_STUB IAMTimelineTrans_GetCutPoint2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrans_SetCutPoint_Proxy( + IAMTimelineTrans * This, + REFERENCE_TIME TLTime); + + +void __RPC_STUB IAMTimelineTrans_SetCutPoint_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrans_SetCutPoint2_Proxy( + IAMTimelineTrans * This, + REFTIME TLTime); + + +void __RPC_STUB IAMTimelineTrans_SetCutPoint2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrans_GetSwapInputs_Proxy( + IAMTimelineTrans * This, + BOOL *pVal); + + +void __RPC_STUB IAMTimelineTrans_GetSwapInputs_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrans_SetSwapInputs_Proxy( + IAMTimelineTrans * This, + BOOL pVal); + + +void __RPC_STUB IAMTimelineTrans_SetSwapInputs_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrans_GetCutsOnly_Proxy( + IAMTimelineTrans * This, + BOOL *pVal); + + +void __RPC_STUB IAMTimelineTrans_GetCutsOnly_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrans_SetCutsOnly_Proxy( + IAMTimelineTrans * This, + BOOL pVal); + + +void __RPC_STUB IAMTimelineTrans_SetCutsOnly_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTimelineTrans_INTERFACE_DEFINED__ */ + + +#ifndef __IAMTimelineSrc_INTERFACE_DEFINED__ +#define __IAMTimelineSrc_INTERFACE_DEFINED__ + +/* interface IAMTimelineSrc */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IAMTimelineSrc; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("78530B79-61F9-11D2-8CAD-00A024580902") + IAMTimelineSrc : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMediaTimes( + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMediaTimes2( + REFTIME *pStart, + REFTIME *pStop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE ModifyStopTime( + REFERENCE_TIME Stop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE ModifyStopTime2( + REFTIME Stop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE FixMediaTimes( + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE FixMediaTimes2( + REFTIME *pStart, + REFTIME *pStop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMediaTimes( + REFERENCE_TIME Start, + REFERENCE_TIME Stop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMediaTimes2( + REFTIME Start, + REFTIME Stop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMediaLength( + REFERENCE_TIME Length) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMediaLength2( + REFTIME Length) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMediaLength( + REFERENCE_TIME *pLength) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMediaLength2( + REFTIME *pLength) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMediaName( + /* [retval][out] */ BSTR *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMediaName( + BSTR newVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SpliceWithNext( + IAMTimelineObj *pNext) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetStreamNumber( + long *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetStreamNumber( + long Val) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsNormalRate( + BOOL *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDefaultFPS( + double *pFPS) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetDefaultFPS( + double FPS) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetStretchMode( + int *pnStretchMode) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetStretchMode( + int nStretchMode) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTimelineSrcVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTimelineSrc * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTimelineSrc * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTimelineSrc * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMediaTimes )( + IAMTimelineSrc * This, + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMediaTimes2 )( + IAMTimelineSrc * This, + REFTIME *pStart, + REFTIME *pStop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *ModifyStopTime )( + IAMTimelineSrc * This, + REFERENCE_TIME Stop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *ModifyStopTime2 )( + IAMTimelineSrc * This, + REFTIME Stop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *FixMediaTimes )( + IAMTimelineSrc * This, + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *FixMediaTimes2 )( + IAMTimelineSrc * This, + REFTIME *pStart, + REFTIME *pStop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMediaTimes )( + IAMTimelineSrc * This, + REFERENCE_TIME Start, + REFERENCE_TIME Stop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMediaTimes2 )( + IAMTimelineSrc * This, + REFTIME Start, + REFTIME Stop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMediaLength )( + IAMTimelineSrc * This, + REFERENCE_TIME Length); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMediaLength2 )( + IAMTimelineSrc * This, + REFTIME Length); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMediaLength )( + IAMTimelineSrc * This, + REFERENCE_TIME *pLength); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMediaLength2 )( + IAMTimelineSrc * This, + REFTIME *pLength); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMediaName )( + IAMTimelineSrc * This, + /* [retval][out] */ BSTR *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMediaName )( + IAMTimelineSrc * This, + BSTR newVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SpliceWithNext )( + IAMTimelineSrc * This, + IAMTimelineObj *pNext); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetStreamNumber )( + IAMTimelineSrc * This, + long *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetStreamNumber )( + IAMTimelineSrc * This, + long Val); + + HRESULT ( STDMETHODCALLTYPE *IsNormalRate )( + IAMTimelineSrc * This, + BOOL *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDefaultFPS )( + IAMTimelineSrc * This, + double *pFPS); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetDefaultFPS )( + IAMTimelineSrc * This, + double FPS); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetStretchMode )( + IAMTimelineSrc * This, + int *pnStretchMode); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetStretchMode )( + IAMTimelineSrc * This, + int nStretchMode); + + END_INTERFACE + } IAMTimelineSrcVtbl; + + interface IAMTimelineSrc + { + CONST_VTBL struct IAMTimelineSrcVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTimelineSrc_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTimelineSrc_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTimelineSrc_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTimelineSrc_GetMediaTimes(This,pStart,pStop) \ + (This)->lpVtbl -> GetMediaTimes(This,pStart,pStop) + +#define IAMTimelineSrc_GetMediaTimes2(This,pStart,pStop) \ + (This)->lpVtbl -> GetMediaTimes2(This,pStart,pStop) + +#define IAMTimelineSrc_ModifyStopTime(This,Stop) \ + (This)->lpVtbl -> ModifyStopTime(This,Stop) + +#define IAMTimelineSrc_ModifyStopTime2(This,Stop) \ + (This)->lpVtbl -> ModifyStopTime2(This,Stop) + +#define IAMTimelineSrc_FixMediaTimes(This,pStart,pStop) \ + (This)->lpVtbl -> FixMediaTimes(This,pStart,pStop) + +#define IAMTimelineSrc_FixMediaTimes2(This,pStart,pStop) \ + (This)->lpVtbl -> FixMediaTimes2(This,pStart,pStop) + +#define IAMTimelineSrc_SetMediaTimes(This,Start,Stop) \ + (This)->lpVtbl -> SetMediaTimes(This,Start,Stop) + +#define IAMTimelineSrc_SetMediaTimes2(This,Start,Stop) \ + (This)->lpVtbl -> SetMediaTimes2(This,Start,Stop) + +#define IAMTimelineSrc_SetMediaLength(This,Length) \ + (This)->lpVtbl -> SetMediaLength(This,Length) + +#define IAMTimelineSrc_SetMediaLength2(This,Length) \ + (This)->lpVtbl -> SetMediaLength2(This,Length) + +#define IAMTimelineSrc_GetMediaLength(This,pLength) \ + (This)->lpVtbl -> GetMediaLength(This,pLength) + +#define IAMTimelineSrc_GetMediaLength2(This,pLength) \ + (This)->lpVtbl -> GetMediaLength2(This,pLength) + +#define IAMTimelineSrc_GetMediaName(This,pVal) \ + (This)->lpVtbl -> GetMediaName(This,pVal) + +#define IAMTimelineSrc_SetMediaName(This,newVal) \ + (This)->lpVtbl -> SetMediaName(This,newVal) + +#define IAMTimelineSrc_SpliceWithNext(This,pNext) \ + (This)->lpVtbl -> SpliceWithNext(This,pNext) + +#define IAMTimelineSrc_GetStreamNumber(This,pVal) \ + (This)->lpVtbl -> GetStreamNumber(This,pVal) + +#define IAMTimelineSrc_SetStreamNumber(This,Val) \ + (This)->lpVtbl -> SetStreamNumber(This,Val) + +#define IAMTimelineSrc_IsNormalRate(This,pVal) \ + (This)->lpVtbl -> IsNormalRate(This,pVal) + +#define IAMTimelineSrc_GetDefaultFPS(This,pFPS) \ + (This)->lpVtbl -> GetDefaultFPS(This,pFPS) + +#define IAMTimelineSrc_SetDefaultFPS(This,FPS) \ + (This)->lpVtbl -> SetDefaultFPS(This,FPS) + +#define IAMTimelineSrc_GetStretchMode(This,pnStretchMode) \ + (This)->lpVtbl -> GetStretchMode(This,pnStretchMode) + +#define IAMTimelineSrc_SetStretchMode(This,nStretchMode) \ + (This)->lpVtbl -> SetStretchMode(This,nStretchMode) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_GetMediaTimes_Proxy( + IAMTimelineSrc * This, + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop); + + +void __RPC_STUB IAMTimelineSrc_GetMediaTimes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_GetMediaTimes2_Proxy( + IAMTimelineSrc * This, + REFTIME *pStart, + REFTIME *pStop); + + +void __RPC_STUB IAMTimelineSrc_GetMediaTimes2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_ModifyStopTime_Proxy( + IAMTimelineSrc * This, + REFERENCE_TIME Stop); + + +void __RPC_STUB IAMTimelineSrc_ModifyStopTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_ModifyStopTime2_Proxy( + IAMTimelineSrc * This, + REFTIME Stop); + + +void __RPC_STUB IAMTimelineSrc_ModifyStopTime2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_FixMediaTimes_Proxy( + IAMTimelineSrc * This, + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop); + + +void __RPC_STUB IAMTimelineSrc_FixMediaTimes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_FixMediaTimes2_Proxy( + IAMTimelineSrc * This, + REFTIME *pStart, + REFTIME *pStop); + + +void __RPC_STUB IAMTimelineSrc_FixMediaTimes2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SetMediaTimes_Proxy( + IAMTimelineSrc * This, + REFERENCE_TIME Start, + REFERENCE_TIME Stop); + + +void __RPC_STUB IAMTimelineSrc_SetMediaTimes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SetMediaTimes2_Proxy( + IAMTimelineSrc * This, + REFTIME Start, + REFTIME Stop); + + +void __RPC_STUB IAMTimelineSrc_SetMediaTimes2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SetMediaLength_Proxy( + IAMTimelineSrc * This, + REFERENCE_TIME Length); + + +void __RPC_STUB IAMTimelineSrc_SetMediaLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SetMediaLength2_Proxy( + IAMTimelineSrc * This, + REFTIME Length); + + +void __RPC_STUB IAMTimelineSrc_SetMediaLength2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_GetMediaLength_Proxy( + IAMTimelineSrc * This, + REFERENCE_TIME *pLength); + + +void __RPC_STUB IAMTimelineSrc_GetMediaLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_GetMediaLength2_Proxy( + IAMTimelineSrc * This, + REFTIME *pLength); + + +void __RPC_STUB IAMTimelineSrc_GetMediaLength2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_GetMediaName_Proxy( + IAMTimelineSrc * This, + /* [retval][out] */ BSTR *pVal); + + +void __RPC_STUB IAMTimelineSrc_GetMediaName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SetMediaName_Proxy( + IAMTimelineSrc * This, + BSTR newVal); + + +void __RPC_STUB IAMTimelineSrc_SetMediaName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SpliceWithNext_Proxy( + IAMTimelineSrc * This, + IAMTimelineObj *pNext); + + +void __RPC_STUB IAMTimelineSrc_SpliceWithNext_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_GetStreamNumber_Proxy( + IAMTimelineSrc * This, + long *pVal); + + +void __RPC_STUB IAMTimelineSrc_GetStreamNumber_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SetStreamNumber_Proxy( + IAMTimelineSrc * This, + long Val); + + +void __RPC_STUB IAMTimelineSrc_SetStreamNumber_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineSrc_IsNormalRate_Proxy( + IAMTimelineSrc * This, + BOOL *pVal); + + +void __RPC_STUB IAMTimelineSrc_IsNormalRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_GetDefaultFPS_Proxy( + IAMTimelineSrc * This, + double *pFPS); + + +void __RPC_STUB IAMTimelineSrc_GetDefaultFPS_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SetDefaultFPS_Proxy( + IAMTimelineSrc * This, + double FPS); + + +void __RPC_STUB IAMTimelineSrc_SetDefaultFPS_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_GetStretchMode_Proxy( + IAMTimelineSrc * This, + int *pnStretchMode); + + +void __RPC_STUB IAMTimelineSrc_GetStretchMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineSrc_SetStretchMode_Proxy( + IAMTimelineSrc * This, + int nStretchMode); + + +void __RPC_STUB IAMTimelineSrc_SetStretchMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTimelineSrc_INTERFACE_DEFINED__ */ + + +#ifndef __IAMTimelineTrack_INTERFACE_DEFINED__ +#define __IAMTimelineTrack_INTERFACE_DEFINED__ + +/* interface IAMTimelineTrack */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IAMTimelineTrack; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("EAE58538-622E-11d2-8CAD-00A024580902") + IAMTimelineTrack : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SrcAdd( + IAMTimelineObj *pSource) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetNextSrc( + /* [out] */ IAMTimelineObj **ppSrc, + REFERENCE_TIME *pInOut) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetNextSrc2( + /* [out] */ IAMTimelineObj **ppSrc, + REFTIME *pInOut) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE MoveEverythingBy( + REFERENCE_TIME Start, + REFERENCE_TIME MoveBy) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE MoveEverythingBy2( + REFTIME Start, + REFTIME MoveBy) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSourcesCount( + long *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AreYouBlank( + long *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSrcAtTime( + /* [out] */ IAMTimelineObj **ppSrc, + REFERENCE_TIME Time, + long SearchDirection) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetSrcAtTime2( + /* [out] */ IAMTimelineObj **ppSrc, + REFTIME Time, + long SearchDirection) = 0; + + virtual HRESULT STDMETHODCALLTYPE InsertSpace( + REFERENCE_TIME rtStart, + REFERENCE_TIME rtEnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE InsertSpace2( + REFTIME rtStart, + REFTIME rtEnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE ZeroBetween( + REFERENCE_TIME rtStart, + REFERENCE_TIME rtEnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE ZeroBetween2( + REFTIME rtStart, + REFTIME rtEnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetNextSrcEx( + IAMTimelineObj *pLast, + /* [out] */ IAMTimelineObj **ppNext) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTimelineTrackVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTimelineTrack * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTimelineTrack * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTimelineTrack * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SrcAdd )( + IAMTimelineTrack * This, + IAMTimelineObj *pSource); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetNextSrc )( + IAMTimelineTrack * This, + /* [out] */ IAMTimelineObj **ppSrc, + REFERENCE_TIME *pInOut); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetNextSrc2 )( + IAMTimelineTrack * This, + /* [out] */ IAMTimelineObj **ppSrc, + REFTIME *pInOut); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *MoveEverythingBy )( + IAMTimelineTrack * This, + REFERENCE_TIME Start, + REFERENCE_TIME MoveBy); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *MoveEverythingBy2 )( + IAMTimelineTrack * This, + REFTIME Start, + REFTIME MoveBy); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSourcesCount )( + IAMTimelineTrack * This, + long *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AreYouBlank )( + IAMTimelineTrack * This, + long *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSrcAtTime )( + IAMTimelineTrack * This, + /* [out] */ IAMTimelineObj **ppSrc, + REFERENCE_TIME Time, + long SearchDirection); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetSrcAtTime2 )( + IAMTimelineTrack * This, + /* [out] */ IAMTimelineObj **ppSrc, + REFTIME Time, + long SearchDirection); + + HRESULT ( STDMETHODCALLTYPE *InsertSpace )( + IAMTimelineTrack * This, + REFERENCE_TIME rtStart, + REFERENCE_TIME rtEnd); + + HRESULT ( STDMETHODCALLTYPE *InsertSpace2 )( + IAMTimelineTrack * This, + REFTIME rtStart, + REFTIME rtEnd); + + HRESULT ( STDMETHODCALLTYPE *ZeroBetween )( + IAMTimelineTrack * This, + REFERENCE_TIME rtStart, + REFERENCE_TIME rtEnd); + + HRESULT ( STDMETHODCALLTYPE *ZeroBetween2 )( + IAMTimelineTrack * This, + REFTIME rtStart, + REFTIME rtEnd); + + HRESULT ( STDMETHODCALLTYPE *GetNextSrcEx )( + IAMTimelineTrack * This, + IAMTimelineObj *pLast, + /* [out] */ IAMTimelineObj **ppNext); + + END_INTERFACE + } IAMTimelineTrackVtbl; + + interface IAMTimelineTrack + { + CONST_VTBL struct IAMTimelineTrackVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTimelineTrack_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTimelineTrack_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTimelineTrack_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTimelineTrack_SrcAdd(This,pSource) \ + (This)->lpVtbl -> SrcAdd(This,pSource) + +#define IAMTimelineTrack_GetNextSrc(This,ppSrc,pInOut) \ + (This)->lpVtbl -> GetNextSrc(This,ppSrc,pInOut) + +#define IAMTimelineTrack_GetNextSrc2(This,ppSrc,pInOut) \ + (This)->lpVtbl -> GetNextSrc2(This,ppSrc,pInOut) + +#define IAMTimelineTrack_MoveEverythingBy(This,Start,MoveBy) \ + (This)->lpVtbl -> MoveEverythingBy(This,Start,MoveBy) + +#define IAMTimelineTrack_MoveEverythingBy2(This,Start,MoveBy) \ + (This)->lpVtbl -> MoveEverythingBy2(This,Start,MoveBy) + +#define IAMTimelineTrack_GetSourcesCount(This,pVal) \ + (This)->lpVtbl -> GetSourcesCount(This,pVal) + +#define IAMTimelineTrack_AreYouBlank(This,pVal) \ + (This)->lpVtbl -> AreYouBlank(This,pVal) + +#define IAMTimelineTrack_GetSrcAtTime(This,ppSrc,Time,SearchDirection) \ + (This)->lpVtbl -> GetSrcAtTime(This,ppSrc,Time,SearchDirection) + +#define IAMTimelineTrack_GetSrcAtTime2(This,ppSrc,Time,SearchDirection) \ + (This)->lpVtbl -> GetSrcAtTime2(This,ppSrc,Time,SearchDirection) + +#define IAMTimelineTrack_InsertSpace(This,rtStart,rtEnd) \ + (This)->lpVtbl -> InsertSpace(This,rtStart,rtEnd) + +#define IAMTimelineTrack_InsertSpace2(This,rtStart,rtEnd) \ + (This)->lpVtbl -> InsertSpace2(This,rtStart,rtEnd) + +#define IAMTimelineTrack_ZeroBetween(This,rtStart,rtEnd) \ + (This)->lpVtbl -> ZeroBetween(This,rtStart,rtEnd) + +#define IAMTimelineTrack_ZeroBetween2(This,rtStart,rtEnd) \ + (This)->lpVtbl -> ZeroBetween2(This,rtStart,rtEnd) + +#define IAMTimelineTrack_GetNextSrcEx(This,pLast,ppNext) \ + (This)->lpVtbl -> GetNextSrcEx(This,pLast,ppNext) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_SrcAdd_Proxy( + IAMTimelineTrack * This, + IAMTimelineObj *pSource); + + +void __RPC_STUB IAMTimelineTrack_SrcAdd_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_GetNextSrc_Proxy( + IAMTimelineTrack * This, + /* [out] */ IAMTimelineObj **ppSrc, + REFERENCE_TIME *pInOut); + + +void __RPC_STUB IAMTimelineTrack_GetNextSrc_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_GetNextSrc2_Proxy( + IAMTimelineTrack * This, + /* [out] */ IAMTimelineObj **ppSrc, + REFTIME *pInOut); + + +void __RPC_STUB IAMTimelineTrack_GetNextSrc2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_MoveEverythingBy_Proxy( + IAMTimelineTrack * This, + REFERENCE_TIME Start, + REFERENCE_TIME MoveBy); + + +void __RPC_STUB IAMTimelineTrack_MoveEverythingBy_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_MoveEverythingBy2_Proxy( + IAMTimelineTrack * This, + REFTIME Start, + REFTIME MoveBy); + + +void __RPC_STUB IAMTimelineTrack_MoveEverythingBy2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_GetSourcesCount_Proxy( + IAMTimelineTrack * This, + long *pVal); + + +void __RPC_STUB IAMTimelineTrack_GetSourcesCount_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_AreYouBlank_Proxy( + IAMTimelineTrack * This, + long *pVal); + + +void __RPC_STUB IAMTimelineTrack_AreYouBlank_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_GetSrcAtTime_Proxy( + IAMTimelineTrack * This, + /* [out] */ IAMTimelineObj **ppSrc, + REFERENCE_TIME Time, + long SearchDirection); + + +void __RPC_STUB IAMTimelineTrack_GetSrcAtTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineTrack_GetSrcAtTime2_Proxy( + IAMTimelineTrack * This, + /* [out] */ IAMTimelineObj **ppSrc, + REFTIME Time, + long SearchDirection); + + +void __RPC_STUB IAMTimelineTrack_GetSrcAtTime2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineTrack_InsertSpace_Proxy( + IAMTimelineTrack * This, + REFERENCE_TIME rtStart, + REFERENCE_TIME rtEnd); + + +void __RPC_STUB IAMTimelineTrack_InsertSpace_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineTrack_InsertSpace2_Proxy( + IAMTimelineTrack * This, + REFTIME rtStart, + REFTIME rtEnd); + + +void __RPC_STUB IAMTimelineTrack_InsertSpace2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineTrack_ZeroBetween_Proxy( + IAMTimelineTrack * This, + REFERENCE_TIME rtStart, + REFERENCE_TIME rtEnd); + + +void __RPC_STUB IAMTimelineTrack_ZeroBetween_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineTrack_ZeroBetween2_Proxy( + IAMTimelineTrack * This, + REFTIME rtStart, + REFTIME rtEnd); + + +void __RPC_STUB IAMTimelineTrack_ZeroBetween2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineTrack_GetNextSrcEx_Proxy( + IAMTimelineTrack * This, + IAMTimelineObj *pLast, + /* [out] */ IAMTimelineObj **ppNext); + + +void __RPC_STUB IAMTimelineTrack_GetNextSrcEx_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTimelineTrack_INTERFACE_DEFINED__ */ + + +#ifndef __IAMTimelineVirtualTrack_INTERFACE_DEFINED__ +#define __IAMTimelineVirtualTrack_INTERFACE_DEFINED__ + +/* interface IAMTimelineVirtualTrack */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IAMTimelineVirtualTrack; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A8ED5F80-C2C7-11d2-8D39-00A0C9441E20") + IAMTimelineVirtualTrack : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE TrackGetPriority( + long *pPriority) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetTrackDirty( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTimelineVirtualTrackVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTimelineVirtualTrack * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTimelineVirtualTrack * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTimelineVirtualTrack * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *TrackGetPriority )( + IAMTimelineVirtualTrack * This, + long *pPriority); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetTrackDirty )( + IAMTimelineVirtualTrack * This); + + END_INTERFACE + } IAMTimelineVirtualTrackVtbl; + + interface IAMTimelineVirtualTrack + { + CONST_VTBL struct IAMTimelineVirtualTrackVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTimelineVirtualTrack_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTimelineVirtualTrack_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTimelineVirtualTrack_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTimelineVirtualTrack_TrackGetPriority(This,pPriority) \ + (This)->lpVtbl -> TrackGetPriority(This,pPriority) + +#define IAMTimelineVirtualTrack_SetTrackDirty(This) \ + (This)->lpVtbl -> SetTrackDirty(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineVirtualTrack_TrackGetPriority_Proxy( + IAMTimelineVirtualTrack * This, + long *pPriority); + + +void __RPC_STUB IAMTimelineVirtualTrack_TrackGetPriority_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineVirtualTrack_SetTrackDirty_Proxy( + IAMTimelineVirtualTrack * This); + + +void __RPC_STUB IAMTimelineVirtualTrack_SetTrackDirty_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTimelineVirtualTrack_INTERFACE_DEFINED__ */ + + +#ifndef __IAMTimelineComp_INTERFACE_DEFINED__ +#define __IAMTimelineComp_INTERFACE_DEFINED__ + +/* interface IAMTimelineComp */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IAMTimelineComp; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("EAE58536-622E-11d2-8CAD-00A024580902") + IAMTimelineComp : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VTrackInsBefore( + IAMTimelineObj *pVirtualTrack, + long Priority) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VTrackSwapPriorities( + long VirtualTrackA, + long VirtualTrackB) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE VTrackGetCount( + long *pVal) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetVTrack( + /* [out] */ IAMTimelineObj **ppVirtualTrack, + long Which) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetCountOfType( + long *pVal, + long *pValWithComps, + TIMELINE_MAJOR_TYPE MajorType) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetRecursiveLayerOfType( + /* [out] */ IAMTimelineObj **ppVirtualTrack, + long WhichLayer, + TIMELINE_MAJOR_TYPE Type) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetRecursiveLayerOfTypeI( + /* [out] */ IAMTimelineObj **ppVirtualTrack, + /* [out][in] */ long *pWhichLayer, + TIMELINE_MAJOR_TYPE Type) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetNextVTrack( + IAMTimelineObj *pVirtualTrack, + /* [out] */ IAMTimelineObj **ppNextVirtualTrack) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTimelineCompVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTimelineComp * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTimelineComp * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTimelineComp * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VTrackInsBefore )( + IAMTimelineComp * This, + IAMTimelineObj *pVirtualTrack, + long Priority); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VTrackSwapPriorities )( + IAMTimelineComp * This, + long VirtualTrackA, + long VirtualTrackB); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *VTrackGetCount )( + IAMTimelineComp * This, + long *pVal); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetVTrack )( + IAMTimelineComp * This, + /* [out] */ IAMTimelineObj **ppVirtualTrack, + long Which); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetCountOfType )( + IAMTimelineComp * This, + long *pVal, + long *pValWithComps, + TIMELINE_MAJOR_TYPE MajorType); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetRecursiveLayerOfType )( + IAMTimelineComp * This, + /* [out] */ IAMTimelineObj **ppVirtualTrack, + long WhichLayer, + TIMELINE_MAJOR_TYPE Type); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetRecursiveLayerOfTypeI )( + IAMTimelineComp * This, + /* [out] */ IAMTimelineObj **ppVirtualTrack, + /* [out][in] */ long *pWhichLayer, + TIMELINE_MAJOR_TYPE Type); + + HRESULT ( STDMETHODCALLTYPE *GetNextVTrack )( + IAMTimelineComp * This, + IAMTimelineObj *pVirtualTrack, + /* [out] */ IAMTimelineObj **ppNextVirtualTrack); + + END_INTERFACE + } IAMTimelineCompVtbl; + + interface IAMTimelineComp + { + CONST_VTBL struct IAMTimelineCompVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTimelineComp_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTimelineComp_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTimelineComp_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTimelineComp_VTrackInsBefore(This,pVirtualTrack,Priority) \ + (This)->lpVtbl -> VTrackInsBefore(This,pVirtualTrack,Priority) + +#define IAMTimelineComp_VTrackSwapPriorities(This,VirtualTrackA,VirtualTrackB) \ + (This)->lpVtbl -> VTrackSwapPriorities(This,VirtualTrackA,VirtualTrackB) + +#define IAMTimelineComp_VTrackGetCount(This,pVal) \ + (This)->lpVtbl -> VTrackGetCount(This,pVal) + +#define IAMTimelineComp_GetVTrack(This,ppVirtualTrack,Which) \ + (This)->lpVtbl -> GetVTrack(This,ppVirtualTrack,Which) + +#define IAMTimelineComp_GetCountOfType(This,pVal,pValWithComps,MajorType) \ + (This)->lpVtbl -> GetCountOfType(This,pVal,pValWithComps,MajorType) + +#define IAMTimelineComp_GetRecursiveLayerOfType(This,ppVirtualTrack,WhichLayer,Type) \ + (This)->lpVtbl -> GetRecursiveLayerOfType(This,ppVirtualTrack,WhichLayer,Type) + +#define IAMTimelineComp_GetRecursiveLayerOfTypeI(This,ppVirtualTrack,pWhichLayer,Type) \ + (This)->lpVtbl -> GetRecursiveLayerOfTypeI(This,ppVirtualTrack,pWhichLayer,Type) + +#define IAMTimelineComp_GetNextVTrack(This,pVirtualTrack,ppNextVirtualTrack) \ + (This)->lpVtbl -> GetNextVTrack(This,pVirtualTrack,ppNextVirtualTrack) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineComp_VTrackInsBefore_Proxy( + IAMTimelineComp * This, + IAMTimelineObj *pVirtualTrack, + long Priority); + + +void __RPC_STUB IAMTimelineComp_VTrackInsBefore_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineComp_VTrackSwapPriorities_Proxy( + IAMTimelineComp * This, + long VirtualTrackA, + long VirtualTrackB); + + +void __RPC_STUB IAMTimelineComp_VTrackSwapPriorities_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineComp_VTrackGetCount_Proxy( + IAMTimelineComp * This, + long *pVal); + + +void __RPC_STUB IAMTimelineComp_VTrackGetCount_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineComp_GetVTrack_Proxy( + IAMTimelineComp * This, + /* [out] */ IAMTimelineObj **ppVirtualTrack, + long Which); + + +void __RPC_STUB IAMTimelineComp_GetVTrack_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineComp_GetCountOfType_Proxy( + IAMTimelineComp * This, + long *pVal, + long *pValWithComps, + TIMELINE_MAJOR_TYPE MajorType); + + +void __RPC_STUB IAMTimelineComp_GetCountOfType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineComp_GetRecursiveLayerOfType_Proxy( + IAMTimelineComp * This, + /* [out] */ IAMTimelineObj **ppVirtualTrack, + long WhichLayer, + TIMELINE_MAJOR_TYPE Type); + + +void __RPC_STUB IAMTimelineComp_GetRecursiveLayerOfType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineComp_GetRecursiveLayerOfTypeI_Proxy( + IAMTimelineComp * This, + /* [out] */ IAMTimelineObj **ppVirtualTrack, + /* [out][in] */ long *pWhichLayer, + TIMELINE_MAJOR_TYPE Type); + + +void __RPC_STUB IAMTimelineComp_GetRecursiveLayerOfTypeI_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineComp_GetNextVTrack_Proxy( + IAMTimelineComp * This, + IAMTimelineObj *pVirtualTrack, + /* [out] */ IAMTimelineObj **ppNextVirtualTrack); + + +void __RPC_STUB IAMTimelineComp_GetNextVTrack_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTimelineComp_INTERFACE_DEFINED__ */ + + +#ifndef __IAMTimelineGroup_INTERFACE_DEFINED__ +#define __IAMTimelineGroup_INTERFACE_DEFINED__ + +/* interface IAMTimelineGroup */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IAMTimelineGroup; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9EED4F00-B8A6-11d2-8023-00C0DF10D434") + IAMTimelineGroup : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetTimeline( + IAMTimeline *pTimeline) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetTimeline( + /* [out] */ IAMTimeline **ppTimeline) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPriority( + long *pPriority) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetMediaType( + /* [out] */ AM_MEDIA_TYPE *__MIDL_0040) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMediaType( + /* [in] */ AM_MEDIA_TYPE *__MIDL_0041) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetOutputFPS( + double FPS) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetOutputFPS( + double *pFPS) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetGroupName( + BSTR pGroupName) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetGroupName( + /* [retval][out] */ BSTR *pGroupName) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetPreviewMode( + BOOL fPreview) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetPreviewMode( + BOOL *pfPreview) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetMediaTypeForVB( + /* [in] */ long Val) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetOutputBuffering( + /* [out] */ int *pnBuffer) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetOutputBuffering( + /* [in] */ int nBuffer) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSmartRecompressFormat( + long *pFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSmartRecompressFormat( + long **ppFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsSmartRecompressFormatSet( + BOOL *pVal) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsRecompressFormatDirty( + BOOL *pVal) = 0; + + virtual HRESULT STDMETHODCALLTYPE ClearRecompressFormatDirty( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetRecompFormatFromSource( + IAMTimelineSrc *pSource) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTimelineGroupVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTimelineGroup * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTimelineGroup * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTimelineGroup * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetTimeline )( + IAMTimelineGroup * This, + IAMTimeline *pTimeline); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetTimeline )( + IAMTimelineGroup * This, + /* [out] */ IAMTimeline **ppTimeline); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPriority )( + IAMTimelineGroup * This, + long *pPriority); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetMediaType )( + IAMTimelineGroup * This, + /* [out] */ AM_MEDIA_TYPE *__MIDL_0040); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMediaType )( + IAMTimelineGroup * This, + /* [in] */ AM_MEDIA_TYPE *__MIDL_0041); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetOutputFPS )( + IAMTimelineGroup * This, + double FPS); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetOutputFPS )( + IAMTimelineGroup * This, + double *pFPS); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetGroupName )( + IAMTimelineGroup * This, + BSTR pGroupName); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetGroupName )( + IAMTimelineGroup * This, + /* [retval][out] */ BSTR *pGroupName); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetPreviewMode )( + IAMTimelineGroup * This, + BOOL fPreview); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetPreviewMode )( + IAMTimelineGroup * This, + BOOL *pfPreview); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetMediaTypeForVB )( + IAMTimelineGroup * This, + /* [in] */ long Val); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetOutputBuffering )( + IAMTimelineGroup * This, + /* [out] */ int *pnBuffer); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetOutputBuffering )( + IAMTimelineGroup * This, + /* [in] */ int nBuffer); + + HRESULT ( STDMETHODCALLTYPE *SetSmartRecompressFormat )( + IAMTimelineGroup * This, + long *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetSmartRecompressFormat )( + IAMTimelineGroup * This, + long **ppFormat); + + HRESULT ( STDMETHODCALLTYPE *IsSmartRecompressFormatSet )( + IAMTimelineGroup * This, + BOOL *pVal); + + HRESULT ( STDMETHODCALLTYPE *IsRecompressFormatDirty )( + IAMTimelineGroup * This, + BOOL *pVal); + + HRESULT ( STDMETHODCALLTYPE *ClearRecompressFormatDirty )( + IAMTimelineGroup * This); + + HRESULT ( STDMETHODCALLTYPE *SetRecompFormatFromSource )( + IAMTimelineGroup * This, + IAMTimelineSrc *pSource); + + END_INTERFACE + } IAMTimelineGroupVtbl; + + interface IAMTimelineGroup + { + CONST_VTBL struct IAMTimelineGroupVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTimelineGroup_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTimelineGroup_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTimelineGroup_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTimelineGroup_SetTimeline(This,pTimeline) \ + (This)->lpVtbl -> SetTimeline(This,pTimeline) + +#define IAMTimelineGroup_GetTimeline(This,ppTimeline) \ + (This)->lpVtbl -> GetTimeline(This,ppTimeline) + +#define IAMTimelineGroup_GetPriority(This,pPriority) \ + (This)->lpVtbl -> GetPriority(This,pPriority) + +#define IAMTimelineGroup_GetMediaType(This,__MIDL_0040) \ + (This)->lpVtbl -> GetMediaType(This,__MIDL_0040) + +#define IAMTimelineGroup_SetMediaType(This,__MIDL_0041) \ + (This)->lpVtbl -> SetMediaType(This,__MIDL_0041) + +#define IAMTimelineGroup_SetOutputFPS(This,FPS) \ + (This)->lpVtbl -> SetOutputFPS(This,FPS) + +#define IAMTimelineGroup_GetOutputFPS(This,pFPS) \ + (This)->lpVtbl -> GetOutputFPS(This,pFPS) + +#define IAMTimelineGroup_SetGroupName(This,pGroupName) \ + (This)->lpVtbl -> SetGroupName(This,pGroupName) + +#define IAMTimelineGroup_GetGroupName(This,pGroupName) \ + (This)->lpVtbl -> GetGroupName(This,pGroupName) + +#define IAMTimelineGroup_SetPreviewMode(This,fPreview) \ + (This)->lpVtbl -> SetPreviewMode(This,fPreview) + +#define IAMTimelineGroup_GetPreviewMode(This,pfPreview) \ + (This)->lpVtbl -> GetPreviewMode(This,pfPreview) + +#define IAMTimelineGroup_SetMediaTypeForVB(This,Val) \ + (This)->lpVtbl -> SetMediaTypeForVB(This,Val) + +#define IAMTimelineGroup_GetOutputBuffering(This,pnBuffer) \ + (This)->lpVtbl -> GetOutputBuffering(This,pnBuffer) + +#define IAMTimelineGroup_SetOutputBuffering(This,nBuffer) \ + (This)->lpVtbl -> SetOutputBuffering(This,nBuffer) + +#define IAMTimelineGroup_SetSmartRecompressFormat(This,pFormat) \ + (This)->lpVtbl -> SetSmartRecompressFormat(This,pFormat) + +#define IAMTimelineGroup_GetSmartRecompressFormat(This,ppFormat) \ + (This)->lpVtbl -> GetSmartRecompressFormat(This,ppFormat) + +#define IAMTimelineGroup_IsSmartRecompressFormatSet(This,pVal) \ + (This)->lpVtbl -> IsSmartRecompressFormatSet(This,pVal) + +#define IAMTimelineGroup_IsRecompressFormatDirty(This,pVal) \ + (This)->lpVtbl -> IsRecompressFormatDirty(This,pVal) + +#define IAMTimelineGroup_ClearRecompressFormatDirty(This) \ + (This)->lpVtbl -> ClearRecompressFormatDirty(This) + +#define IAMTimelineGroup_SetRecompFormatFromSource(This,pSource) \ + (This)->lpVtbl -> SetRecompFormatFromSource(This,pSource) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetTimeline_Proxy( + IAMTimelineGroup * This, + IAMTimeline *pTimeline); + + +void __RPC_STUB IAMTimelineGroup_SetTimeline_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_GetTimeline_Proxy( + IAMTimelineGroup * This, + /* [out] */ IAMTimeline **ppTimeline); + + +void __RPC_STUB IAMTimelineGroup_GetTimeline_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_GetPriority_Proxy( + IAMTimelineGroup * This, + long *pPriority); + + +void __RPC_STUB IAMTimelineGroup_GetPriority_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_GetMediaType_Proxy( + IAMTimelineGroup * This, + /* [out] */ AM_MEDIA_TYPE *__MIDL_0040); + + +void __RPC_STUB IAMTimelineGroup_GetMediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetMediaType_Proxy( + IAMTimelineGroup * This, + /* [in] */ AM_MEDIA_TYPE *__MIDL_0041); + + +void __RPC_STUB IAMTimelineGroup_SetMediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetOutputFPS_Proxy( + IAMTimelineGroup * This, + double FPS); + + +void __RPC_STUB IAMTimelineGroup_SetOutputFPS_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_GetOutputFPS_Proxy( + IAMTimelineGroup * This, + double *pFPS); + + +void __RPC_STUB IAMTimelineGroup_GetOutputFPS_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetGroupName_Proxy( + IAMTimelineGroup * This, + BSTR pGroupName); + + +void __RPC_STUB IAMTimelineGroup_SetGroupName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_GetGroupName_Proxy( + IAMTimelineGroup * This, + /* [retval][out] */ BSTR *pGroupName); + + +void __RPC_STUB IAMTimelineGroup_GetGroupName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetPreviewMode_Proxy( + IAMTimelineGroup * This, + BOOL fPreview); + + +void __RPC_STUB IAMTimelineGroup_SetPreviewMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_GetPreviewMode_Proxy( + IAMTimelineGroup * This, + BOOL *pfPreview); + + +void __RPC_STUB IAMTimelineGroup_GetPreviewMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetMediaTypeForVB_Proxy( + IAMTimelineGroup * This, + /* [in] */ long Val); + + +void __RPC_STUB IAMTimelineGroup_SetMediaTypeForVB_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_GetOutputBuffering_Proxy( + IAMTimelineGroup * This, + /* [out] */ int *pnBuffer); + + +void __RPC_STUB IAMTimelineGroup_GetOutputBuffering_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetOutputBuffering_Proxy( + IAMTimelineGroup * This, + /* [in] */ int nBuffer); + + +void __RPC_STUB IAMTimelineGroup_SetOutputBuffering_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetSmartRecompressFormat_Proxy( + IAMTimelineGroup * This, + long *pFormat); + + +void __RPC_STUB IAMTimelineGroup_SetSmartRecompressFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineGroup_GetSmartRecompressFormat_Proxy( + IAMTimelineGroup * This, + long **ppFormat); + + +void __RPC_STUB IAMTimelineGroup_GetSmartRecompressFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineGroup_IsSmartRecompressFormatSet_Proxy( + IAMTimelineGroup * This, + BOOL *pVal); + + +void __RPC_STUB IAMTimelineGroup_IsSmartRecompressFormatSet_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineGroup_IsRecompressFormatDirty_Proxy( + IAMTimelineGroup * This, + BOOL *pVal); + + +void __RPC_STUB IAMTimelineGroup_IsRecompressFormatDirty_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineGroup_ClearRecompressFormatDirty_Proxy( + IAMTimelineGroup * This); + + +void __RPC_STUB IAMTimelineGroup_ClearRecompressFormatDirty_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimelineGroup_SetRecompFormatFromSource_Proxy( + IAMTimelineGroup * This, + IAMTimelineSrc *pSource); + + +void __RPC_STUB IAMTimelineGroup_SetRecompFormatFromSource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTimelineGroup_INTERFACE_DEFINED__ */ + + +#ifndef __IAMTimeline_INTERFACE_DEFINED__ +#define __IAMTimeline_INTERFACE_DEFINED__ + +/* interface IAMTimeline */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IAMTimeline; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("78530B74-61F9-11D2-8CAD-00A024580902") + IAMTimeline : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE CreateEmptyNode( + /* [out] */ IAMTimelineObj **ppObj, + TIMELINE_MAJOR_TYPE Type) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddGroup( + IAMTimelineObj *pGroup) = 0; + + virtual HRESULT STDMETHODCALLTYPE RemGroupFromList( + IAMTimelineObj *pGroup) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetGroup( + /* [out] */ IAMTimelineObj **ppGroup, + long WhichGroup) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetGroupCount( + long *pCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE ClearAllGroups( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInsertMode( + long *pMode) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetInsertMode( + long Mode) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EnableTransitions( + BOOL fEnabled) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE TransitionsEnabled( + BOOL *pfEnabled) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EnableEffects( + BOOL fEnabled) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE EffectsEnabled( + BOOL *pfEnabled) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetInterestRange( + REFERENCE_TIME Start, + REFERENCE_TIME Stop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDuration( + REFERENCE_TIME *pDuration) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDuration2( + double *pDuration) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SetDefaultFPS( + double FPS) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDefaultFPS( + double *pFPS) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE IsDirty( + BOOL *pDirty) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetDirtyRange( + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE GetCountOfType( + long Group, + long *pVal, + long *pValWithComps, + TIMELINE_MAJOR_TYPE MajorType) = 0; + + virtual HRESULT STDMETHODCALLTYPE ValidateSourceNames( + long ValidateFlags, + IMediaLocator *pOverride, + LONG_PTR NotifyEventHandle) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDefaultTransition( + GUID *pGuid) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDefaultTransition( + GUID *pGuid) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDefaultEffect( + GUID *pGuid) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDefaultEffect( + GUID *pGuid) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDefaultTransitionB( + BSTR pGuid) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDefaultTransitionB( + /* [retval][out] */ BSTR *pGuid) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDefaultEffectB( + BSTR pGuid) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDefaultEffectB( + /* [retval][out] */ BSTR *pGuid) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTimelineVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTimeline * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTimeline * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTimeline * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *CreateEmptyNode )( + IAMTimeline * This, + /* [out] */ IAMTimelineObj **ppObj, + TIMELINE_MAJOR_TYPE Type); + + HRESULT ( STDMETHODCALLTYPE *AddGroup )( + IAMTimeline * This, + IAMTimelineObj *pGroup); + + HRESULT ( STDMETHODCALLTYPE *RemGroupFromList )( + IAMTimeline * This, + IAMTimelineObj *pGroup); + + HRESULT ( STDMETHODCALLTYPE *GetGroup )( + IAMTimeline * This, + /* [out] */ IAMTimelineObj **ppGroup, + long WhichGroup); + + HRESULT ( STDMETHODCALLTYPE *GetGroupCount )( + IAMTimeline * This, + long *pCount); + + HRESULT ( STDMETHODCALLTYPE *ClearAllGroups )( + IAMTimeline * This); + + HRESULT ( STDMETHODCALLTYPE *GetInsertMode )( + IAMTimeline * This, + long *pMode); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetInsertMode )( + IAMTimeline * This, + long Mode); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EnableTransitions )( + IAMTimeline * This, + BOOL fEnabled); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *TransitionsEnabled )( + IAMTimeline * This, + BOOL *pfEnabled); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EnableEffects )( + IAMTimeline * This, + BOOL fEnabled); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *EffectsEnabled )( + IAMTimeline * This, + BOOL *pfEnabled); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetInterestRange )( + IAMTimeline * This, + REFERENCE_TIME Start, + REFERENCE_TIME Stop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDuration )( + IAMTimeline * This, + REFERENCE_TIME *pDuration); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDuration2 )( + IAMTimeline * This, + double *pDuration); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SetDefaultFPS )( + IAMTimeline * This, + double FPS); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDefaultFPS )( + IAMTimeline * This, + double *pFPS); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *IsDirty )( + IAMTimeline * This, + BOOL *pDirty); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetDirtyRange )( + IAMTimeline * This, + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *GetCountOfType )( + IAMTimeline * This, + long Group, + long *pVal, + long *pValWithComps, + TIMELINE_MAJOR_TYPE MajorType); + + HRESULT ( STDMETHODCALLTYPE *ValidateSourceNames )( + IAMTimeline * This, + long ValidateFlags, + IMediaLocator *pOverride, + LONG_PTR NotifyEventHandle); + + HRESULT ( STDMETHODCALLTYPE *SetDefaultTransition )( + IAMTimeline * This, + GUID *pGuid); + + HRESULT ( STDMETHODCALLTYPE *GetDefaultTransition )( + IAMTimeline * This, + GUID *pGuid); + + HRESULT ( STDMETHODCALLTYPE *SetDefaultEffect )( + IAMTimeline * This, + GUID *pGuid); + + HRESULT ( STDMETHODCALLTYPE *GetDefaultEffect )( + IAMTimeline * This, + GUID *pGuid); + + HRESULT ( STDMETHODCALLTYPE *SetDefaultTransitionB )( + IAMTimeline * This, + BSTR pGuid); + + HRESULT ( STDMETHODCALLTYPE *GetDefaultTransitionB )( + IAMTimeline * This, + /* [retval][out] */ BSTR *pGuid); + + HRESULT ( STDMETHODCALLTYPE *SetDefaultEffectB )( + IAMTimeline * This, + BSTR pGuid); + + HRESULT ( STDMETHODCALLTYPE *GetDefaultEffectB )( + IAMTimeline * This, + /* [retval][out] */ BSTR *pGuid); + + END_INTERFACE + } IAMTimelineVtbl; + + interface IAMTimeline + { + CONST_VTBL struct IAMTimelineVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTimeline_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTimeline_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTimeline_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTimeline_CreateEmptyNode(This,ppObj,Type) \ + (This)->lpVtbl -> CreateEmptyNode(This,ppObj,Type) + +#define IAMTimeline_AddGroup(This,pGroup) \ + (This)->lpVtbl -> AddGroup(This,pGroup) + +#define IAMTimeline_RemGroupFromList(This,pGroup) \ + (This)->lpVtbl -> RemGroupFromList(This,pGroup) + +#define IAMTimeline_GetGroup(This,ppGroup,WhichGroup) \ + (This)->lpVtbl -> GetGroup(This,ppGroup,WhichGroup) + +#define IAMTimeline_GetGroupCount(This,pCount) \ + (This)->lpVtbl -> GetGroupCount(This,pCount) + +#define IAMTimeline_ClearAllGroups(This) \ + (This)->lpVtbl -> ClearAllGroups(This) + +#define IAMTimeline_GetInsertMode(This,pMode) \ + (This)->lpVtbl -> GetInsertMode(This,pMode) + +#define IAMTimeline_SetInsertMode(This,Mode) \ + (This)->lpVtbl -> SetInsertMode(This,Mode) + +#define IAMTimeline_EnableTransitions(This,fEnabled) \ + (This)->lpVtbl -> EnableTransitions(This,fEnabled) + +#define IAMTimeline_TransitionsEnabled(This,pfEnabled) \ + (This)->lpVtbl -> TransitionsEnabled(This,pfEnabled) + +#define IAMTimeline_EnableEffects(This,fEnabled) \ + (This)->lpVtbl -> EnableEffects(This,fEnabled) + +#define IAMTimeline_EffectsEnabled(This,pfEnabled) \ + (This)->lpVtbl -> EffectsEnabled(This,pfEnabled) + +#define IAMTimeline_SetInterestRange(This,Start,Stop) \ + (This)->lpVtbl -> SetInterestRange(This,Start,Stop) + +#define IAMTimeline_GetDuration(This,pDuration) \ + (This)->lpVtbl -> GetDuration(This,pDuration) + +#define IAMTimeline_GetDuration2(This,pDuration) \ + (This)->lpVtbl -> GetDuration2(This,pDuration) + +#define IAMTimeline_SetDefaultFPS(This,FPS) \ + (This)->lpVtbl -> SetDefaultFPS(This,FPS) + +#define IAMTimeline_GetDefaultFPS(This,pFPS) \ + (This)->lpVtbl -> GetDefaultFPS(This,pFPS) + +#define IAMTimeline_IsDirty(This,pDirty) \ + (This)->lpVtbl -> IsDirty(This,pDirty) + +#define IAMTimeline_GetDirtyRange(This,pStart,pStop) \ + (This)->lpVtbl -> GetDirtyRange(This,pStart,pStop) + +#define IAMTimeline_GetCountOfType(This,Group,pVal,pValWithComps,MajorType) \ + (This)->lpVtbl -> GetCountOfType(This,Group,pVal,pValWithComps,MajorType) + +#define IAMTimeline_ValidateSourceNames(This,ValidateFlags,pOverride,NotifyEventHandle) \ + (This)->lpVtbl -> ValidateSourceNames(This,ValidateFlags,pOverride,NotifyEventHandle) + +#define IAMTimeline_SetDefaultTransition(This,pGuid) \ + (This)->lpVtbl -> SetDefaultTransition(This,pGuid) + +#define IAMTimeline_GetDefaultTransition(This,pGuid) \ + (This)->lpVtbl -> GetDefaultTransition(This,pGuid) + +#define IAMTimeline_SetDefaultEffect(This,pGuid) \ + (This)->lpVtbl -> SetDefaultEffect(This,pGuid) + +#define IAMTimeline_GetDefaultEffect(This,pGuid) \ + (This)->lpVtbl -> GetDefaultEffect(This,pGuid) + +#define IAMTimeline_SetDefaultTransitionB(This,pGuid) \ + (This)->lpVtbl -> SetDefaultTransitionB(This,pGuid) + +#define IAMTimeline_GetDefaultTransitionB(This,pGuid) \ + (This)->lpVtbl -> GetDefaultTransitionB(This,pGuid) + +#define IAMTimeline_SetDefaultEffectB(This,pGuid) \ + (This)->lpVtbl -> SetDefaultEffectB(This,pGuid) + +#define IAMTimeline_GetDefaultEffectB(This,pGuid) \ + (This)->lpVtbl -> GetDefaultEffectB(This,pGuid) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_CreateEmptyNode_Proxy( + IAMTimeline * This, + /* [out] */ IAMTimelineObj **ppObj, + TIMELINE_MAJOR_TYPE Type); + + +void __RPC_STUB IAMTimeline_CreateEmptyNode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimeline_AddGroup_Proxy( + IAMTimeline * This, + IAMTimelineObj *pGroup); + + +void __RPC_STUB IAMTimeline_AddGroup_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimeline_RemGroupFromList_Proxy( + IAMTimeline * This, + IAMTimelineObj *pGroup); + + +void __RPC_STUB IAMTimeline_RemGroupFromList_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimeline_GetGroup_Proxy( + IAMTimeline * This, + /* [out] */ IAMTimelineObj **ppGroup, + long WhichGroup); + + +void __RPC_STUB IAMTimeline_GetGroup_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimeline_GetGroupCount_Proxy( + IAMTimeline * This, + long *pCount); + + +void __RPC_STUB IAMTimeline_GetGroupCount_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimeline_ClearAllGroups_Proxy( + IAMTimeline * This); + + +void __RPC_STUB IAMTimeline_ClearAllGroups_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimeline_GetInsertMode_Proxy( + IAMTimeline * This, + long *pMode); + + +void __RPC_STUB IAMTimeline_GetInsertMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_SetInsertMode_Proxy( + IAMTimeline * This, + long Mode); + + +void __RPC_STUB IAMTimeline_SetInsertMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_EnableTransitions_Proxy( + IAMTimeline * This, + BOOL fEnabled); + + +void __RPC_STUB IAMTimeline_EnableTransitions_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_TransitionsEnabled_Proxy( + IAMTimeline * This, + BOOL *pfEnabled); + + +void __RPC_STUB IAMTimeline_TransitionsEnabled_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_EnableEffects_Proxy( + IAMTimeline * This, + BOOL fEnabled); + + +void __RPC_STUB IAMTimeline_EnableEffects_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_EffectsEnabled_Proxy( + IAMTimeline * This, + BOOL *pfEnabled); + + +void __RPC_STUB IAMTimeline_EffectsEnabled_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_SetInterestRange_Proxy( + IAMTimeline * This, + REFERENCE_TIME Start, + REFERENCE_TIME Stop); + + +void __RPC_STUB IAMTimeline_SetInterestRange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_GetDuration_Proxy( + IAMTimeline * This, + REFERENCE_TIME *pDuration); + + +void __RPC_STUB IAMTimeline_GetDuration_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_GetDuration2_Proxy( + IAMTimeline * This, + double *pDuration); + + +void __RPC_STUB IAMTimeline_GetDuration2_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_SetDefaultFPS_Proxy( + IAMTimeline * This, + double FPS); + + +void __RPC_STUB IAMTimeline_SetDefaultFPS_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_GetDefaultFPS_Proxy( + IAMTimeline * This, + double *pFPS); + + +void __RPC_STUB IAMTimeline_GetDefaultFPS_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_IsDirty_Proxy( + IAMTimeline * This, + BOOL *pDirty); + + +void __RPC_STUB IAMTimeline_IsDirty_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_GetDirtyRange_Proxy( + IAMTimeline * This, + REFERENCE_TIME *pStart, + REFERENCE_TIME *pStop); + + +void __RPC_STUB IAMTimeline_GetDirtyRange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMTimeline_GetCountOfType_Proxy( + IAMTimeline * This, + long Group, + long *pVal, + long *pValWithComps, + TIMELINE_MAJOR_TYPE MajorType); + + +void __RPC_STUB IAMTimeline_GetCountOfType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimeline_ValidateSourceNames_Proxy( + IAMTimeline * This, + long ValidateFlags, + IMediaLocator *pOverride, + LONG_PTR NotifyEventHandle); + + +void __RPC_STUB IAMTimeline_ValidateSourceNames_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimeline_SetDefaultTransition_Proxy( + IAMTimeline * This, + GUID *pGuid); + + +void __RPC_STUB IAMTimeline_SetDefaultTransition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimeline_GetDefaultTransition_Proxy( + IAMTimeline * This, + GUID *pGuid); + + +void __RPC_STUB IAMTimeline_GetDefaultTransition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimeline_SetDefaultEffect_Proxy( + IAMTimeline * This, + GUID *pGuid); + + +void __RPC_STUB IAMTimeline_SetDefaultEffect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimeline_GetDefaultEffect_Proxy( + IAMTimeline * This, + GUID *pGuid); + + +void __RPC_STUB IAMTimeline_GetDefaultEffect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimeline_SetDefaultTransitionB_Proxy( + IAMTimeline * This, + BSTR pGuid); + + +void __RPC_STUB IAMTimeline_SetDefaultTransitionB_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimeline_GetDefaultTransitionB_Proxy( + IAMTimeline * This, + /* [retval][out] */ BSTR *pGuid); + + +void __RPC_STUB IAMTimeline_GetDefaultTransitionB_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimeline_SetDefaultEffectB_Proxy( + IAMTimeline * This, + BSTR pGuid); + + +void __RPC_STUB IAMTimeline_SetDefaultEffectB_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimeline_GetDefaultEffectB_Proxy( + IAMTimeline * This, + /* [retval][out] */ BSTR *pGuid); + + +void __RPC_STUB IAMTimeline_GetDefaultEffectB_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTimeline_INTERFACE_DEFINED__ */ + + +#ifndef __IXml2Dex_INTERFACE_DEFINED__ +#define __IXml2Dex_INTERFACE_DEFINED__ + +/* interface IXml2Dex */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IXml2Dex; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("18C628ED-962A-11D2-8D08-00A0C9441E20") + IXml2Dex : public IDispatch + { + public: + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE CreateGraphFromFile( + /* [out] */ IUnknown **ppGraph, + IUnknown *pTimeline, + BSTR Filename) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE WriteGrfFile( + IUnknown *pGraph, + BSTR FileName) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE WriteXMLFile( + IUnknown *pTimeline, + BSTR FileName) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ReadXMLFile( + IUnknown *pTimeline, + BSTR XMLName) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Delete( + IUnknown *pTimeline, + double dStart, + double dEnd) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE WriteXMLPart( + IUnknown *pTimeline, + double dStart, + double dEnd, + BSTR FileName) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE PasteXMLFile( + IUnknown *pTimeline, + double dStart, + BSTR FileName) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE CopyXML( + IUnknown *pTimeline, + double dStart, + double dEnd) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE PasteXML( + IUnknown *pTimeline, + double dStart) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ReadXML( + IUnknown *pTimeline, + IUnknown *pXML) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE WriteXML( + IUnknown *pTimeline, + BSTR *pbstrXML) = 0; + + }; + +#else /* C style interface */ + + typedef struct IXml2DexVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IXml2Dex * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IXml2Dex * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IXml2Dex * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IXml2Dex * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IXml2Dex * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IXml2Dex * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IXml2Dex * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *CreateGraphFromFile )( + IXml2Dex * This, + /* [out] */ IUnknown **ppGraph, + IUnknown *pTimeline, + BSTR Filename); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *WriteGrfFile )( + IXml2Dex * This, + IUnknown *pGraph, + BSTR FileName); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *WriteXMLFile )( + IXml2Dex * This, + IUnknown *pTimeline, + BSTR FileName); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *ReadXMLFile )( + IXml2Dex * This, + IUnknown *pTimeline, + BSTR XMLName); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Delete )( + IXml2Dex * This, + IUnknown *pTimeline, + double dStart, + double dEnd); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *WriteXMLPart )( + IXml2Dex * This, + IUnknown *pTimeline, + double dStart, + double dEnd, + BSTR FileName); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *PasteXMLFile )( + IXml2Dex * This, + IUnknown *pTimeline, + double dStart, + BSTR FileName); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *CopyXML )( + IXml2Dex * This, + IUnknown *pTimeline, + double dStart, + double dEnd); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *PasteXML )( + IXml2Dex * This, + IUnknown *pTimeline, + double dStart); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Reset )( + IXml2Dex * This); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *ReadXML )( + IXml2Dex * This, + IUnknown *pTimeline, + IUnknown *pXML); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *WriteXML )( + IXml2Dex * This, + IUnknown *pTimeline, + BSTR *pbstrXML); + + END_INTERFACE + } IXml2DexVtbl; + + interface IXml2Dex + { + CONST_VTBL struct IXml2DexVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IXml2Dex_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IXml2Dex_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IXml2Dex_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IXml2Dex_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IXml2Dex_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IXml2Dex_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IXml2Dex_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IXml2Dex_CreateGraphFromFile(This,ppGraph,pTimeline,Filename) \ + (This)->lpVtbl -> CreateGraphFromFile(This,ppGraph,pTimeline,Filename) + +#define IXml2Dex_WriteGrfFile(This,pGraph,FileName) \ + (This)->lpVtbl -> WriteGrfFile(This,pGraph,FileName) + +#define IXml2Dex_WriteXMLFile(This,pTimeline,FileName) \ + (This)->lpVtbl -> WriteXMLFile(This,pTimeline,FileName) + +#define IXml2Dex_ReadXMLFile(This,pTimeline,XMLName) \ + (This)->lpVtbl -> ReadXMLFile(This,pTimeline,XMLName) + +#define IXml2Dex_Delete(This,pTimeline,dStart,dEnd) \ + (This)->lpVtbl -> Delete(This,pTimeline,dStart,dEnd) + +#define IXml2Dex_WriteXMLPart(This,pTimeline,dStart,dEnd,FileName) \ + (This)->lpVtbl -> WriteXMLPart(This,pTimeline,dStart,dEnd,FileName) + +#define IXml2Dex_PasteXMLFile(This,pTimeline,dStart,FileName) \ + (This)->lpVtbl -> PasteXMLFile(This,pTimeline,dStart,FileName) + +#define IXml2Dex_CopyXML(This,pTimeline,dStart,dEnd) \ + (This)->lpVtbl -> CopyXML(This,pTimeline,dStart,dEnd) + +#define IXml2Dex_PasteXML(This,pTimeline,dStart) \ + (This)->lpVtbl -> PasteXML(This,pTimeline,dStart) + +#define IXml2Dex_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IXml2Dex_ReadXML(This,pTimeline,pXML) \ + (This)->lpVtbl -> ReadXML(This,pTimeline,pXML) + +#define IXml2Dex_WriteXML(This,pTimeline,pbstrXML) \ + (This)->lpVtbl -> WriteXML(This,pTimeline,pbstrXML) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_CreateGraphFromFile_Proxy( + IXml2Dex * This, + /* [out] */ IUnknown **ppGraph, + IUnknown *pTimeline, + BSTR Filename); + + +void __RPC_STUB IXml2Dex_CreateGraphFromFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_WriteGrfFile_Proxy( + IXml2Dex * This, + IUnknown *pGraph, + BSTR FileName); + + +void __RPC_STUB IXml2Dex_WriteGrfFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_WriteXMLFile_Proxy( + IXml2Dex * This, + IUnknown *pTimeline, + BSTR FileName); + + +void __RPC_STUB IXml2Dex_WriteXMLFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_ReadXMLFile_Proxy( + IXml2Dex * This, + IUnknown *pTimeline, + BSTR XMLName); + + +void __RPC_STUB IXml2Dex_ReadXMLFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_Delete_Proxy( + IXml2Dex * This, + IUnknown *pTimeline, + double dStart, + double dEnd); + + +void __RPC_STUB IXml2Dex_Delete_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_WriteXMLPart_Proxy( + IXml2Dex * This, + IUnknown *pTimeline, + double dStart, + double dEnd, + BSTR FileName); + + +void __RPC_STUB IXml2Dex_WriteXMLPart_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_PasteXMLFile_Proxy( + IXml2Dex * This, + IUnknown *pTimeline, + double dStart, + BSTR FileName); + + +void __RPC_STUB IXml2Dex_PasteXMLFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_CopyXML_Proxy( + IXml2Dex * This, + IUnknown *pTimeline, + double dStart, + double dEnd); + + +void __RPC_STUB IXml2Dex_CopyXML_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_PasteXML_Proxy( + IXml2Dex * This, + IUnknown *pTimeline, + double dStart); + + +void __RPC_STUB IXml2Dex_PasteXML_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_Reset_Proxy( + IXml2Dex * This); + + +void __RPC_STUB IXml2Dex_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_ReadXML_Proxy( + IXml2Dex * This, + IUnknown *pTimeline, + IUnknown *pXML); + + +void __RPC_STUB IXml2Dex_ReadXML_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IXml2Dex_WriteXML_Proxy( + IXml2Dex * This, + IUnknown *pTimeline, + BSTR *pbstrXML); + + +void __RPC_STUB IXml2Dex_WriteXML_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IXml2Dex_INTERFACE_DEFINED__ */ + + +#ifndef __IAMErrorLog_INTERFACE_DEFINED__ +#define __IAMErrorLog_INTERFACE_DEFINED__ + +/* interface IAMErrorLog */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IAMErrorLog; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("E43E73A2-0EFA-11d3-9601-00A0C9441E20") + IAMErrorLog : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE LogError( + long Severity, + BSTR pErrorString, + long ErrorCode, + long hresult, + /* [in] */ VARIANT *pExtraInfo) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMErrorLogVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMErrorLog * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMErrorLog * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMErrorLog * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *LogError )( + IAMErrorLog * This, + long Severity, + BSTR pErrorString, + long ErrorCode, + long hresult, + /* [in] */ VARIANT *pExtraInfo); + + END_INTERFACE + } IAMErrorLogVtbl; + + interface IAMErrorLog + { + CONST_VTBL struct IAMErrorLogVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMErrorLog_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMErrorLog_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMErrorLog_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMErrorLog_LogError(This,Severity,pErrorString,ErrorCode,hresult,pExtraInfo) \ + (This)->lpVtbl -> LogError(This,Severity,pErrorString,ErrorCode,hresult,pExtraInfo) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IAMErrorLog_LogError_Proxy( + IAMErrorLog * This, + long Severity, + BSTR pErrorString, + long ErrorCode, + long hresult, + /* [in] */ VARIANT *pExtraInfo); + + +void __RPC_STUB IAMErrorLog_LogError_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMErrorLog_INTERFACE_DEFINED__ */ + + +#ifndef __IAMSetErrorLog_INTERFACE_DEFINED__ +#define __IAMSetErrorLog_INTERFACE_DEFINED__ + +/* interface IAMSetErrorLog */ +/* [unique][helpstring][uuid][object] */ + + +EXTERN_C const IID IID_IAMSetErrorLog; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("963566DA-BE21-4eaf-88E9-35704F8F52A1") + IAMSetErrorLog : public IUnknown + { + public: + virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_ErrorLog( + /* [retval][out] */ IAMErrorLog **pVal) = 0; + + virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_ErrorLog( + /* [in] */ IAMErrorLog *newVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMSetErrorLogVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMSetErrorLog * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMSetErrorLog * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMSetErrorLog * This); + + /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ErrorLog )( + IAMSetErrorLog * This, + /* [retval][out] */ IAMErrorLog **pVal); + + /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ErrorLog )( + IAMSetErrorLog * This, + /* [in] */ IAMErrorLog *newVal); + + END_INTERFACE + } IAMSetErrorLogVtbl; + + interface IAMSetErrorLog + { + CONST_VTBL struct IAMSetErrorLogVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMSetErrorLog_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMSetErrorLog_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMSetErrorLog_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMSetErrorLog_get_ErrorLog(This,pVal) \ + (This)->lpVtbl -> get_ErrorLog(This,pVal) + +#define IAMSetErrorLog_put_ErrorLog(This,newVal) \ + (This)->lpVtbl -> put_ErrorLog(This,newVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IAMSetErrorLog_get_ErrorLog_Proxy( + IAMSetErrorLog * This, + /* [retval][out] */ IAMErrorLog **pVal); + + +void __RPC_STUB IAMSetErrorLog_get_ErrorLog_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE IAMSetErrorLog_put_ErrorLog_Proxy( + IAMSetErrorLog * This, + /* [in] */ IAMErrorLog *newVal); + + +void __RPC_STUB IAMSetErrorLog_put_ErrorLog_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMSetErrorLog_INTERFACE_DEFINED__ */ + + +#ifndef __ISampleGrabberCB_INTERFACE_DEFINED__ +#define __ISampleGrabberCB_INTERFACE_DEFINED__ + +/* interface ISampleGrabberCB */ +/* [unique][helpstring][local][uuid][object] */ + + +EXTERN_C const IID IID_ISampleGrabberCB; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0579154A-2B53-4994-B0D0-E773148EFF85") + ISampleGrabberCB : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SampleCB( + double SampleTime, + IMediaSample *pSample) = 0; + + virtual HRESULT STDMETHODCALLTYPE BufferCB( + double SampleTime, + BYTE *pBuffer, + long BufferLen) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISampleGrabberCBVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISampleGrabberCB * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISampleGrabberCB * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISampleGrabberCB * This); + + HRESULT ( STDMETHODCALLTYPE *SampleCB )( + ISampleGrabberCB * This, + double SampleTime, + IMediaSample *pSample); + + HRESULT ( STDMETHODCALLTYPE *BufferCB )( + ISampleGrabberCB * This, + double SampleTime, + BYTE *pBuffer, + long BufferLen); + + END_INTERFACE + } ISampleGrabberCBVtbl; + + interface ISampleGrabberCB + { + CONST_VTBL struct ISampleGrabberCBVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISampleGrabberCB_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISampleGrabberCB_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISampleGrabberCB_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISampleGrabberCB_SampleCB(This,SampleTime,pSample) \ + (This)->lpVtbl -> SampleCB(This,SampleTime,pSample) + +#define ISampleGrabberCB_BufferCB(This,SampleTime,pBuffer,BufferLen) \ + (This)->lpVtbl -> BufferCB(This,SampleTime,pBuffer,BufferLen) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISampleGrabberCB_SampleCB_Proxy( + ISampleGrabberCB * This, + double SampleTime, + IMediaSample *pSample); + + +void __RPC_STUB ISampleGrabberCB_SampleCB_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISampleGrabberCB_BufferCB_Proxy( + ISampleGrabberCB * This, + double SampleTime, + BYTE *pBuffer, + long BufferLen); + + +void __RPC_STUB ISampleGrabberCB_BufferCB_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISampleGrabberCB_INTERFACE_DEFINED__ */ + + +#ifndef __ISampleGrabber_INTERFACE_DEFINED__ +#define __ISampleGrabber_INTERFACE_DEFINED__ + +/* interface ISampleGrabber */ +/* [unique][helpstring][local][uuid][object] */ + + +EXTERN_C const IID IID_ISampleGrabber; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6B652FFF-11FE-4fce-92AD-0266B5D7C78F") + ISampleGrabber : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetOneShot( + BOOL OneShot) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMediaType( + const AM_MEDIA_TYPE *pType) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetConnectedMediaType( + AM_MEDIA_TYPE *pType) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBufferSamples( + BOOL BufferThem) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentBuffer( + /* [out][in] */ long *pBufferSize, + /* [out] */ long *pBuffer) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentSample( + /* [retval][out] */ IMediaSample **ppSample) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetCallback( + ISampleGrabberCB *pCallback, + long WhichMethodToCallback) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISampleGrabberVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISampleGrabber * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISampleGrabber * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISampleGrabber * This); + + HRESULT ( STDMETHODCALLTYPE *SetOneShot )( + ISampleGrabber * This, + BOOL OneShot); + + HRESULT ( STDMETHODCALLTYPE *SetMediaType )( + ISampleGrabber * This, + const AM_MEDIA_TYPE *pType); + + HRESULT ( STDMETHODCALLTYPE *GetConnectedMediaType )( + ISampleGrabber * This, + AM_MEDIA_TYPE *pType); + + HRESULT ( STDMETHODCALLTYPE *SetBufferSamples )( + ISampleGrabber * This, + BOOL BufferThem); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentBuffer )( + ISampleGrabber * This, + /* [out][in] */ long *pBufferSize, + /* [out] */ long *pBuffer); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentSample )( + ISampleGrabber * This, + /* [retval][out] */ IMediaSample **ppSample); + + HRESULT ( STDMETHODCALLTYPE *SetCallback )( + ISampleGrabber * This, + ISampleGrabberCB *pCallback, + long WhichMethodToCallback); + + END_INTERFACE + } ISampleGrabberVtbl; + + interface ISampleGrabber + { + CONST_VTBL struct ISampleGrabberVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISampleGrabber_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISampleGrabber_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISampleGrabber_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISampleGrabber_SetOneShot(This,OneShot) \ + (This)->lpVtbl -> SetOneShot(This,OneShot) + +#define ISampleGrabber_SetMediaType(This,pType) \ + (This)->lpVtbl -> SetMediaType(This,pType) + +#define ISampleGrabber_GetConnectedMediaType(This,pType) \ + (This)->lpVtbl -> GetConnectedMediaType(This,pType) + +#define ISampleGrabber_SetBufferSamples(This,BufferThem) \ + (This)->lpVtbl -> SetBufferSamples(This,BufferThem) + +#define ISampleGrabber_GetCurrentBuffer(This,pBufferSize,pBuffer) \ + (This)->lpVtbl -> GetCurrentBuffer(This,pBufferSize,pBuffer) + +#define ISampleGrabber_GetCurrentSample(This,ppSample) \ + (This)->lpVtbl -> GetCurrentSample(This,ppSample) + +#define ISampleGrabber_SetCallback(This,pCallback,WhichMethodToCallback) \ + (This)->lpVtbl -> SetCallback(This,pCallback,WhichMethodToCallback) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISampleGrabber_SetOneShot_Proxy( + ISampleGrabber * This, + BOOL OneShot); + + +void __RPC_STUB ISampleGrabber_SetOneShot_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISampleGrabber_SetMediaType_Proxy( + ISampleGrabber * This, + const AM_MEDIA_TYPE *pType); + + +void __RPC_STUB ISampleGrabber_SetMediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISampleGrabber_GetConnectedMediaType_Proxy( + ISampleGrabber * This, + AM_MEDIA_TYPE *pType); + + +void __RPC_STUB ISampleGrabber_GetConnectedMediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISampleGrabber_SetBufferSamples_Proxy( + ISampleGrabber * This, + BOOL BufferThem); + + +void __RPC_STUB ISampleGrabber_SetBufferSamples_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISampleGrabber_GetCurrentBuffer_Proxy( + ISampleGrabber * This, + /* [out][in] */ long *pBufferSize, + /* [out] */ long *pBuffer); + + +void __RPC_STUB ISampleGrabber_GetCurrentBuffer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISampleGrabber_GetCurrentSample_Proxy( + ISampleGrabber * This, + /* [retval][out] */ IMediaSample **ppSample); + + +void __RPC_STUB ISampleGrabber_GetCurrentSample_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ISampleGrabber_SetCallback_Proxy( + ISampleGrabber * This, + ISampleGrabberCB *pCallback, + long WhichMethodToCallback); + + +void __RPC_STUB ISampleGrabber_SetCallback_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISampleGrabber_INTERFACE_DEFINED__ */ + + + +#ifndef __DexterLib_LIBRARY_DEFINED__ +#define __DexterLib_LIBRARY_DEFINED__ + +/* library DexterLib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_DexterLib; + +EXTERN_C const CLSID CLSID_AMTimeline; + +#ifdef __cplusplus + +class DECLSPEC_UUID("78530B75-61F9-11D2-8CAD-00A024580902") +AMTimeline; +#endif + +EXTERN_C const CLSID CLSID_AMTimelineObj; + +#ifdef __cplusplus + +class DECLSPEC_UUID("78530B78-61F9-11D2-8CAD-00A024580902") +AMTimelineObj; +#endif + +EXTERN_C const CLSID CLSID_AMTimelineSrc; + +#ifdef __cplusplus + +class DECLSPEC_UUID("78530B7A-61F9-11D2-8CAD-00A024580902") +AMTimelineSrc; +#endif + +EXTERN_C const CLSID CLSID_AMTimelineTrack; + +#ifdef __cplusplus + +class DECLSPEC_UUID("8F6C3C50-897B-11d2-8CFB-00A0C9441E20") +AMTimelineTrack; +#endif + +EXTERN_C const CLSID CLSID_AMTimelineComp; + +#ifdef __cplusplus + +class DECLSPEC_UUID("74D2EC80-6233-11d2-8CAD-00A024580902") +AMTimelineComp; +#endif + +EXTERN_C const CLSID CLSID_AMTimelineGroup; + +#ifdef __cplusplus + +class DECLSPEC_UUID("F6D371E1-B8A6-11d2-8023-00C0DF10D434") +AMTimelineGroup; +#endif + +EXTERN_C const CLSID CLSID_AMTimelineTrans; + +#ifdef __cplusplus + +class DECLSPEC_UUID("74D2EC81-6233-11d2-8CAD-00A024580902") +AMTimelineTrans; +#endif + +EXTERN_C const CLSID CLSID_AMTimelineEffect; + +#ifdef __cplusplus + +class DECLSPEC_UUID("74D2EC82-6233-11d2-8CAD-00A024580902") +AMTimelineEffect; +#endif + +EXTERN_C const CLSID CLSID_RenderEngine; + +#ifdef __cplusplus + +class DECLSPEC_UUID("64D8A8E0-80A2-11d2-8CF3-00A0C9441E20") +RenderEngine; +#endif + +EXTERN_C const CLSID CLSID_SmartRenderEngine; + +#ifdef __cplusplus + +class DECLSPEC_UUID("498B0949-BBE9-4072-98BE-6CCAEB79DC6F") +SmartRenderEngine; +#endif + +EXTERN_C const CLSID CLSID_AudMixer; + +#ifdef __cplusplus + +class DECLSPEC_UUID("036A9790-C153-11d2-9EF7-006008039E37") +AudMixer; +#endif + +EXTERN_C const CLSID CLSID_Xml2Dex; + +#ifdef __cplusplus + +class DECLSPEC_UUID("18C628EE-962A-11D2-8D08-00A0C9441E20") +Xml2Dex; +#endif + +EXTERN_C const CLSID CLSID_MediaLocator; + +#ifdef __cplusplus + +class DECLSPEC_UUID("CC1101F2-79DC-11D2-8CE6-00A0C9441E20") +MediaLocator; +#endif + +EXTERN_C const CLSID CLSID_PropertySetter; + +#ifdef __cplusplus + +class DECLSPEC_UUID("ADF95821-DED7-11d2-ACBE-0080C75E246E") +PropertySetter; +#endif + +EXTERN_C const CLSID CLSID_MediaDet; + +#ifdef __cplusplus + +class DECLSPEC_UUID("65BD0711-24D2-4ff7-9324-ED2E5D3ABAFA") +MediaDet; +#endif + +EXTERN_C const CLSID CLSID_SampleGrabber; + +#ifdef __cplusplus + +class DECLSPEC_UUID("C1F400A0-3F08-11d3-9F0B-006008039E37") +SampleGrabber; +#endif + +EXTERN_C const CLSID CLSID_NullRenderer; + +#ifdef __cplusplus + +class DECLSPEC_UUID("C1F400A4-3F08-11d3-9F0B-006008039E37") +NullRenderer; +#endif + +EXTERN_C const CLSID CLSID_DxtCompositor; + +#ifdef __cplusplus + +class DECLSPEC_UUID("BB44391D-6ABD-422f-9E2E-385C9DFF51FC") +DxtCompositor; +#endif + +EXTERN_C const CLSID CLSID_DxtAlphaSetter; + +#ifdef __cplusplus + +class DECLSPEC_UUID("506D89AE-909A-44f7-9444-ABD575896E35") +DxtAlphaSetter; +#endif + +EXTERN_C const CLSID CLSID_DxtJpeg; + +#ifdef __cplusplus + +class DECLSPEC_UUID("DE75D012-7A65-11D2-8CEA-00A0C9441E20") +DxtJpeg; +#endif + +EXTERN_C const CLSID CLSID_ColorSource; + +#ifdef __cplusplus + +class DECLSPEC_UUID("0cfdd070-581a-11d2-9ee6-006008039e37") +ColorSource; +#endif + +EXTERN_C const CLSID CLSID_DxtKey; + +#ifdef __cplusplus + +class DECLSPEC_UUID("C5B19592-145E-11d3-9F04-006008039E37") +DxtKey; +#endif +#endif /* __DexterLib_LIBRARY_DEFINED__ */ + +/* interface __MIDL_itf_qedit_0450 */ +/* [local] */ + + +enum __MIDL___MIDL_itf_qedit_0450_0001 + { E_NOTINTREE = 0x80040400, + E_RENDER_ENGINE_IS_BROKEN = 0x80040401, + E_MUST_INIT_RENDERER = 0x80040402, + E_NOTDETERMINED = 0x80040403, + E_NO_TIMELINE = 0x80040404, + S_WARN_OUTPUTRESET = 40404 + } ; +#define DEX_IDS_BAD_SOURCE_NAME 1400 +#define DEX_IDS_BAD_SOURCE_NAME2 1401 +#define DEX_IDS_MISSING_SOURCE_NAME 1402 +#define DEX_IDS_UNKNOWN_SOURCE 1403 +#define DEX_IDS_INSTALL_PROBLEM 1404 +#define DEX_IDS_NO_SOURCE_NAMES 1405 +#define DEX_IDS_BAD_MEDIATYPE 1406 +#define DEX_IDS_STREAM_NUMBER 1407 +#define DEX_IDS_OUTOFMEMORY 1408 +#define DEX_IDS_DIBSEQ_NOTALLSAME 1409 +#define DEX_IDS_CLIPTOOSHORT 1410 +#define DEX_IDS_INVALID_DXT 1411 +#define DEX_IDS_INVALID_DEFAULT_DXT 1412 +#define DEX_IDS_NO_3D 1413 +#define DEX_IDS_BROKEN_DXT 1414 +#define DEX_IDS_NO_SUCH_PROPERTY 1415 +#define DEX_IDS_ILLEGAL_PROPERTY_VAL 1416 +#define DEX_IDS_INVALID_XML 1417 +#define DEX_IDS_CANT_FIND_FILTER 1418 +#define DEX_IDS_DISK_WRITE_ERROR 1419 +#define DEX_IDS_INVALID_AUDIO_FX 1420 +#define DEX_IDS_CANT_FIND_COMPRESSOR 1421 +#define DEX_IDS_TIMELINE_PARSE 1426 +#define DEX_IDS_GRAPH_ERROR 1427 +#define DEX_IDS_GRID_ERROR 1428 +#define DEX_IDS_INTERFACE_ERROR 1429 +EXTERN_GUID(CLSID_VideoEffects1Category, 0xcc7bfb42, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59); +EXTERN_GUID(CLSID_VideoEffects2Category, 0xcc7bfb43, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59); +EXTERN_GUID(CLSID_AudioEffects1Category, 0xcc7bfb44, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59); +EXTERN_GUID(CLSID_AudioEffects2Category, 0xcc7bfb45, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59); + + +extern RPC_IF_HANDLE __MIDL_itf_qedit_0450_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_qedit_0450_v0_0_s_ifspec; + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * ); +unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * ); +unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); +void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * ); + +unsigned long __RPC_USER VARIANT_UserSize( unsigned long *, unsigned long , VARIANT * ); +unsigned char * __RPC_USER VARIANT_UserMarshal( unsigned long *, unsigned char *, VARIANT * ); +unsigned char * __RPC_USER VARIANT_UserUnmarshal(unsigned long *, unsigned char *, VARIANT * ); +void __RPC_USER VARIANT_UserFree( unsigned long *, VARIANT * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/qnetwork.h b/windows_libs/mssdk/include/qnetwork.h new file mode 100644 index 00000000..09ffc6e4 --- /dev/null +++ b/windows_libs/mssdk/include/qnetwork.h @@ -0,0 +1,548 @@ +/* This header file machine-generated by mktyplib.exe */ +/* Interface to type library: QuartzNetTypeLib */ + +#ifndef _QuartzNetTypeLib_H_ +#define _QuartzNetTypeLib_H_ + +DEFINE_GUID(LIBID_QuartzNetTypeLib,0x56A868B1L,0x0AD4,0x11CE,0xB0,0x3A,0x00,0x20,0xAF,0x0B,0xA7,0x70); +#ifndef BEGIN_INTERFACE +#define BEGIN_INTERFACE +#endif + +DEFINE_GUID(IID_IAMNetShowConfig,0xFA2AA8F1L,0x8B62,0x11D0,0xA5,0x20,0x00,0x00,0x00,0x00,0x00,0x00); + +/* Definition of interface: IAMNetShowConfig */ +#undef INTERFACE +#define INTERFACE IAMNetShowConfig + +DECLARE_INTERFACE_(IAMNetShowConfig, IDispatch) +{ +BEGIN_INTERFACE +#ifndef NO_BASEINTERFACE_FUNCS + + /* IUnknown methods */ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + /* IDispatch methods */ + STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE; + + STDMETHOD(GetTypeInfo)( + THIS_ + UINT itinfo, + LCID lcid, + ITypeInfo FAR* FAR* pptinfo) PURE; + + STDMETHOD(GetIDsOfNames)( + THIS_ + REFIID riid, + OLECHAR FAR* FAR* rgszNames, + UINT cNames, + LCID lcid, + DISPID FAR* rgdispid) PURE; + + STDMETHOD(Invoke)( + THIS_ + DISPID dispidMember, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS FAR* pdispparams, + VARIANT FAR* pvarResult, + EXCEPINFO FAR* pexcepinfo, + UINT FAR* puArgErr) PURE; +#endif + + /* IAMNetShowConfig methods */ + STDMETHOD(get_BufferingTime)(THIS_ double FAR* pBufferingTime) PURE; + STDMETHOD(put_BufferingTime)(THIS_ double BufferingTime) PURE; + STDMETHOD(get_UseFixedUDPPort)(THIS_ VARIANT_BOOL FAR* pUseFixedUDPPort) PURE; + STDMETHOD(put_UseFixedUDPPort)(THIS_ VARIANT_BOOL UseFixedUDPPort) PURE; + STDMETHOD(get_FixedUDPPort)(THIS_ long FAR* pFixedUDPPort) PURE; + STDMETHOD(put_FixedUDPPort)(THIS_ long FixedUDPPort) PURE; + STDMETHOD(get_UseHTTPProxy)(THIS_ VARIANT_BOOL FAR* pUseHTTPProxy) PURE; + STDMETHOD(put_UseHTTPProxy)(THIS_ VARIANT_BOOL UseHTTPProxy) PURE; + STDMETHOD(get_EnableAutoProxy)(THIS_ VARIANT_BOOL FAR* pEnableAutoProxy) PURE; + STDMETHOD(put_EnableAutoProxy)(THIS_ VARIANT_BOOL EnableAutoProxy) PURE; + STDMETHOD(get_HTTPProxyHost)(THIS_ BSTR FAR* pbstrHTTPProxyHost) PURE; + STDMETHOD(put_HTTPProxyHost)(THIS_ BSTR bstrHTTPProxyHost) PURE; + STDMETHOD(get_HTTPProxyPort)(THIS_ long FAR* pHTTPProxyPort) PURE; + STDMETHOD(put_HTTPProxyPort)(THIS_ long HTTPProxyPort) PURE; + STDMETHOD(get_EnableMulticast)(THIS_ VARIANT_BOOL FAR* pEnableMulticast) PURE; + STDMETHOD(put_EnableMulticast)(THIS_ VARIANT_BOOL EnableMulticast) PURE; + STDMETHOD(get_EnableUDP)(THIS_ VARIANT_BOOL FAR* pEnableUDP) PURE; + STDMETHOD(put_EnableUDP)(THIS_ VARIANT_BOOL EnableUDP) PURE; + STDMETHOD(get_EnableTCP)(THIS_ VARIANT_BOOL FAR* pEnableTCP) PURE; + STDMETHOD(put_EnableTCP)(THIS_ VARIANT_BOOL EnableTCP) PURE; + STDMETHOD(get_EnableHTTP)(THIS_ VARIANT_BOOL FAR* pEnableHTTP) PURE; + STDMETHOD(put_EnableHTTP)(THIS_ VARIANT_BOOL EnableHTTP) PURE; +}; + +DEFINE_GUID(IID_IAMChannelInfo,0xFA2AA8F2L,0x8B62,0x11D0,0xA5,0x20,0x00,0x00,0x00,0x00,0x00,0x00); + +/* Definition of interface: IAMChannelInfo */ +#undef INTERFACE +#define INTERFACE IAMChannelInfo + +DECLARE_INTERFACE_(IAMChannelInfo, IDispatch) +{ +BEGIN_INTERFACE +#ifndef NO_BASEINTERFACE_FUNCS + + /* IUnknown methods */ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + /* IDispatch methods */ + STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE; + + STDMETHOD(GetTypeInfo)( + THIS_ + UINT itinfo, + LCID lcid, + ITypeInfo FAR* FAR* pptinfo) PURE; + + STDMETHOD(GetIDsOfNames)( + THIS_ + REFIID riid, + OLECHAR FAR* FAR* rgszNames, + UINT cNames, + LCID lcid, + DISPID FAR* rgdispid) PURE; + + STDMETHOD(Invoke)( + THIS_ + DISPID dispidMember, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS FAR* pdispparams, + VARIANT FAR* pvarResult, + EXCEPINFO FAR* pexcepinfo, + UINT FAR* puArgErr) PURE; +#endif + + /* IAMChannelInfo methods */ + STDMETHOD(get_ChannelName)(THIS_ BSTR FAR* pbstrChannelName) PURE; + STDMETHOD(get_ChannelDescription)(THIS_ BSTR FAR* pbstrChannelDescription) PURE; + STDMETHOD(get_ChannelURL)(THIS_ BSTR FAR* pbstrChannelURL) PURE; + STDMETHOD(get_ContactAddress)(THIS_ BSTR FAR* pbstrContactAddress) PURE; + STDMETHOD(get_ContactPhone)(THIS_ BSTR FAR* pbstrContactPhone) PURE; + STDMETHOD(get_ContactEmail)(THIS_ BSTR FAR* pbstrContactEmail) PURE; +}; + +DEFINE_GUID(IID_IAMNetworkStatus,0xFA2AA8F3L,0x8B62,0x11D0,0xA5,0x20,0x00,0x00,0x00,0x00,0x00,0x00); + +/* Definition of interface: IAMNetworkStatus */ +#undef INTERFACE +#define INTERFACE IAMNetworkStatus + +DECLARE_INTERFACE_(IAMNetworkStatus, IDispatch) +{ +BEGIN_INTERFACE +#ifndef NO_BASEINTERFACE_FUNCS + + /* IUnknown methods */ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + /* IDispatch methods */ + STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE; + + STDMETHOD(GetTypeInfo)( + THIS_ + UINT itinfo, + LCID lcid, + ITypeInfo FAR* FAR* pptinfo) PURE; + + STDMETHOD(GetIDsOfNames)( + THIS_ + REFIID riid, + OLECHAR FAR* FAR* rgszNames, + UINT cNames, + LCID lcid, + DISPID FAR* rgdispid) PURE; + + STDMETHOD(Invoke)( + THIS_ + DISPID dispidMember, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS FAR* pdispparams, + VARIANT FAR* pvarResult, + EXCEPINFO FAR* pexcepinfo, + UINT FAR* puArgErr) PURE; +#endif + + /* IAMNetworkStatus methods */ + STDMETHOD(get_ReceivedPackets)(THIS_ long FAR* pReceivedPackets) PURE; + STDMETHOD(get_RecoveredPackets)(THIS_ long FAR* pRecoveredPackets) PURE; + STDMETHOD(get_LostPackets)(THIS_ long FAR* pLostPackets) PURE; + STDMETHOD(get_ReceptionQuality)(THIS_ long FAR* pReceptionQuality) PURE; + STDMETHOD(get_BufferingCount)(THIS_ long FAR* pBufferingCount) PURE; + STDMETHOD(get_IsBroadcast)(THIS_ VARIANT_BOOL FAR* pIsBroadcast) PURE; + STDMETHOD(get_BufferingProgress)(THIS_ long FAR* pBufferingProgress) PURE; +}; + +typedef enum { + AM_EXSEEK_CANSEEK = 1, + AM_EXSEEK_CANSCAN = 2, + AM_EXSEEK_MARKERSEEK = 4, + AM_EXSEEK_SCANWITHOUTCLOCK = 8, + AM_EXSEEK_NOSTANDARDREPAINT = 16, + AM_EXSEEK_BUFFERING = 32, + AM_EXSEEK_SENDS_VIDEOFRAMEREADY = 64 +} AMExtendedSeekingCapabilities; + +DEFINE_GUID(IID_IAMExtendedSeeking,0xFA2AA8F9L,0x8B62,0x11D0,0xA5,0x20,0x00,0x00,0x00,0x00,0x00,0x00); + +/* Definition of interface: IAMExtendedSeeking */ +#undef INTERFACE +#define INTERFACE IAMExtendedSeeking + +DECLARE_INTERFACE_(IAMExtendedSeeking, IDispatch) +{ +BEGIN_INTERFACE +#ifndef NO_BASEINTERFACE_FUNCS + + /* IUnknown methods */ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + /* IDispatch methods */ + STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE; + + STDMETHOD(GetTypeInfo)( + THIS_ + UINT itinfo, + LCID lcid, + ITypeInfo FAR* FAR* pptinfo) PURE; + + STDMETHOD(GetIDsOfNames)( + THIS_ + REFIID riid, + OLECHAR FAR* FAR* rgszNames, + UINT cNames, + LCID lcid, + DISPID FAR* rgdispid) PURE; + + STDMETHOD(Invoke)( + THIS_ + DISPID dispidMember, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS FAR* pdispparams, + VARIANT FAR* pvarResult, + EXCEPINFO FAR* pexcepinfo, + UINT FAR* puArgErr) PURE; +#endif + + /* IAMExtendedSeeking methods */ + STDMETHOD(get_ExSeekCapabilities)(THIS_ long FAR* pExCapabilities) PURE; + STDMETHOD(get_MarkerCount)(THIS_ long FAR* pMarkerCount) PURE; + STDMETHOD(get_CurrentMarker)(THIS_ long FAR* pCurrentMarker) PURE; + STDMETHOD(GetMarkerTime)(THIS_ long MarkerNum, double FAR* pMarkerTime) PURE; + STDMETHOD(GetMarkerName)(THIS_ long MarkerNum, BSTR FAR* pbstrMarkerName) PURE; + STDMETHOD(put_PlaybackSpeed)(THIS_ double Speed) PURE; + STDMETHOD(get_PlaybackSpeed)(THIS_ double FAR* pSpeed) PURE; +}; + +DEFINE_GUID(IID_IAMNetShowExProps,0xFA2AA8F5L,0x8B62,0x11D0,0xA5,0x20,0x00,0x00,0x00,0x00,0x00,0x00); + +/* Definition of interface: IAMNetShowExProps */ +#undef INTERFACE +#define INTERFACE IAMNetShowExProps + +DECLARE_INTERFACE_(IAMNetShowExProps, IDispatch) +{ +BEGIN_INTERFACE +#ifndef NO_BASEINTERFACE_FUNCS + + /* IUnknown methods */ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + /* IDispatch methods */ + STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE; + + STDMETHOD(GetTypeInfo)( + THIS_ + UINT itinfo, + LCID lcid, + ITypeInfo FAR* FAR* pptinfo) PURE; + + STDMETHOD(GetIDsOfNames)( + THIS_ + REFIID riid, + OLECHAR FAR* FAR* rgszNames, + UINT cNames, + LCID lcid, + DISPID FAR* rgdispid) PURE; + + STDMETHOD(Invoke)( + THIS_ + DISPID dispidMember, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS FAR* pdispparams, + VARIANT FAR* pvarResult, + EXCEPINFO FAR* pexcepinfo, + UINT FAR* puArgErr) PURE; +#endif + + /* IAMNetShowExProps methods */ + STDMETHOD(get_SourceProtocol)(THIS_ long FAR* pSourceProtocol) PURE; + STDMETHOD(get_Bandwidth)(THIS_ long FAR* pBandwidth) PURE; + STDMETHOD(get_ErrorCorrection)(THIS_ BSTR FAR* pbstrErrorCorrection) PURE; + STDMETHOD(get_CodecCount)(THIS_ long FAR* pCodecCount) PURE; + STDMETHOD(GetCodecInstalled)(THIS_ long CodecNum, VARIANT_BOOL FAR* pCodecInstalled) PURE; + STDMETHOD(GetCodecDescription)(THIS_ long CodecNum, BSTR FAR* pbstrCodecDescription) PURE; + STDMETHOD(GetCodecURL)(THIS_ long CodecNum, BSTR FAR* pbstrCodecURL) PURE; + STDMETHOD(get_CreationDate)(THIS_ DATE FAR* pCreationDate) PURE; + STDMETHOD(get_SourceLink)(THIS_ BSTR FAR* pbstrSourceLink) PURE; +}; + +DEFINE_GUID(IID_IAMExtendedErrorInfo,0xFA2AA8F6L,0x8B62,0x11D0,0xA5,0x20,0x00,0x00,0x00,0x00,0x00,0x00); + +/* Definition of interface: IAMExtendedErrorInfo */ +#undef INTERFACE +#define INTERFACE IAMExtendedErrorInfo + +DECLARE_INTERFACE_(IAMExtendedErrorInfo, IDispatch) +{ +BEGIN_INTERFACE +#ifndef NO_BASEINTERFACE_FUNCS + + /* IUnknown methods */ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + /* IDispatch methods */ + STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE; + + STDMETHOD(GetTypeInfo)( + THIS_ + UINT itinfo, + LCID lcid, + ITypeInfo FAR* FAR* pptinfo) PURE; + + STDMETHOD(GetIDsOfNames)( + THIS_ + REFIID riid, + OLECHAR FAR* FAR* rgszNames, + UINT cNames, + LCID lcid, + DISPID FAR* rgdispid) PURE; + + STDMETHOD(Invoke)( + THIS_ + DISPID dispidMember, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS FAR* pdispparams, + VARIANT FAR* pvarResult, + EXCEPINFO FAR* pexcepinfo, + UINT FAR* puArgErr) PURE; +#endif + + /* IAMExtendedErrorInfo methods */ + STDMETHOD(get_HasError)(THIS_ VARIANT_BOOL FAR* pHasError) PURE; + STDMETHOD(get_ErrorDescription)(THIS_ BSTR FAR* pbstrErrorDescription) PURE; + STDMETHOD(get_ErrorCode)(THIS_ long FAR* pErrorCode) PURE; +}; + +DEFINE_GUID(IID_IAMMediaContent,0xFA2AA8F4L,0x8B62,0x11D0,0xA5,0x20,0x00,0x00,0x00,0x00,0x00,0x00); + +/* Definition of interface: IAMMediaContent */ +#undef INTERFACE +#define INTERFACE IAMMediaContent + +DECLARE_INTERFACE_(IAMMediaContent, IDispatch) +{ +BEGIN_INTERFACE +#ifndef NO_BASEINTERFACE_FUNCS + + /* IUnknown methods */ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + /* IDispatch methods */ + STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE; + + STDMETHOD(GetTypeInfo)( + THIS_ + UINT itinfo, + LCID lcid, + ITypeInfo FAR* FAR* pptinfo) PURE; + + STDMETHOD(GetIDsOfNames)( + THIS_ + REFIID riid, + OLECHAR FAR* FAR* rgszNames, + UINT cNames, + LCID lcid, + DISPID FAR* rgdispid) PURE; + + STDMETHOD(Invoke)( + THIS_ + DISPID dispidMember, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS FAR* pdispparams, + VARIANT FAR* pvarResult, + EXCEPINFO FAR* pexcepinfo, + UINT FAR* puArgErr) PURE; +#endif + + /* IAMMediaContent methods */ + STDMETHOD(get_AuthorName)(THIS_ BSTR FAR* pbstrAuthorName) PURE; + STDMETHOD(get_Title)(THIS_ BSTR FAR* pbstrTitle) PURE; + STDMETHOD(get_Rating)(THIS_ BSTR FAR* pbstrRating) PURE; + STDMETHOD(get_Description)(THIS_ BSTR FAR* pbstrDescription) PURE; + STDMETHOD(get_Copyright)(THIS_ BSTR FAR* pbstrCopyright) PURE; + STDMETHOD(get_BaseURL)(THIS_ BSTR FAR* pbstrBaseURL) PURE; + STDMETHOD(get_LogoURL)(THIS_ BSTR FAR* pbstrLogoURL) PURE; + STDMETHOD(get_LogoIconURL)(THIS_ BSTR FAR* pbstrLogoURL) PURE; + STDMETHOD(get_WatermarkURL)(THIS_ BSTR FAR* pbstrWatermarkURL) PURE; + STDMETHOD(get_MoreInfoURL)(THIS_ BSTR FAR* pbstrMoreInfoURL) PURE; + STDMETHOD(get_MoreInfoBannerImage)(THIS_ BSTR FAR* pbstrMoreInfoBannerImage) PURE; + STDMETHOD(get_MoreInfoBannerURL)(THIS_ BSTR FAR* pbstrMoreInfoBannerURL) PURE; + STDMETHOD(get_MoreInfoText)(THIS_ BSTR FAR* pbstrMoreInfoText) PURE; +}; + +DEFINE_GUID(IID_IAMMediaContent2,0xCE8F78C1L,0x74D9,0x11D2,0xB0,0x9D,0x00,0xA0,0xC9,0xA8,0x11,0x17); + +/* Definition of interface: IAMMediaContent2 */ +#undef INTERFACE +#define INTERFACE IAMMediaContent2 + +DECLARE_INTERFACE_(IAMMediaContent2, IDispatch) +{ +BEGIN_INTERFACE +#ifndef NO_BASEINTERFACE_FUNCS + + /* IUnknown methods */ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + /* IDispatch methods */ + STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE; + + STDMETHOD(GetTypeInfo)( + THIS_ + UINT itinfo, + LCID lcid, + ITypeInfo FAR* FAR* pptinfo) PURE; + + STDMETHOD(GetIDsOfNames)( + THIS_ + REFIID riid, + OLECHAR FAR* FAR* rgszNames, + UINT cNames, + LCID lcid, + DISPID FAR* rgdispid) PURE; + + STDMETHOD(Invoke)( + THIS_ + DISPID dispidMember, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS FAR* pdispparams, + VARIANT FAR* pvarResult, + EXCEPINFO FAR* pexcepinfo, + UINT FAR* puArgErr) PURE; +#endif + + /* IAMMediaContent2 methods */ + STDMETHOD(get_MediaParameter)(THIS_ long EntryNum, BSTR bstrName, BSTR FAR* pbstrValue) PURE; + STDMETHOD(get_MediaParameterName)(THIS_ long EntryNum, long Index, BSTR FAR* pbstrName) PURE; + STDMETHOD(get_PlaylistCount)(THIS_ long FAR* pNumberEntries) PURE; +}; + +DEFINE_GUID(IID_IAMNetShowPreroll,0xAAE7E4E2L,0x6388,0x11D1,0x8D,0x93,0x00,0x60,0x97,0xC9,0xA2,0xB2); + +/* Definition of interface: IAMNetShowPreroll */ +#undef INTERFACE +#define INTERFACE IAMNetShowPreroll + +DECLARE_INTERFACE_(IAMNetShowPreroll, IDispatch) +{ +BEGIN_INTERFACE +#ifndef NO_BASEINTERFACE_FUNCS + + /* IUnknown methods */ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; + + /* IDispatch methods */ + STDMETHOD(GetTypeInfoCount)(THIS_ UINT FAR* pctinfo) PURE; + + STDMETHOD(GetTypeInfo)( + THIS_ + UINT itinfo, + LCID lcid, + ITypeInfo FAR* FAR* pptinfo) PURE; + + STDMETHOD(GetIDsOfNames)( + THIS_ + REFIID riid, + OLECHAR FAR* FAR* rgszNames, + UINT cNames, + LCID lcid, + DISPID FAR* rgdispid) PURE; + + STDMETHOD(Invoke)( + THIS_ + DISPID dispidMember, + REFIID riid, + LCID lcid, + WORD wFlags, + DISPPARAMS FAR* pdispparams, + VARIANT FAR* pvarResult, + EXCEPINFO FAR* pexcepinfo, + UINT FAR* puArgErr) PURE; +#endif + + /* IAMNetShowPreroll methods */ + STDMETHOD(put_Preroll)(THIS_ VARIANT_BOOL fPreroll) PURE; + STDMETHOD(get_Preroll)(THIS_ VARIANT_BOOL FAR* pfPreroll) PURE; +}; + +DEFINE_GUID(IID_IDShowPlugin,0x4746B7C8L,0x700E,0x11D1,0xBE,0xCC,0x00,0xC0,0x4F,0xB6,0xE9,0x37); + +/* Definition of interface: IDShowPlugin */ +#undef INTERFACE +#define INTERFACE IDShowPlugin + +DECLARE_INTERFACE_(IDShowPlugin, IUnknown) +{ +BEGIN_INTERFACE +#ifndef NO_BASEINTERFACE_FUNCS + + /* IUnknown methods */ + STDMETHOD(QueryInterface)(THIS_ REFIID riid, LPVOID FAR* ppvObj) PURE; + STDMETHOD_(ULONG, AddRef)(THIS) PURE; + STDMETHOD_(ULONG, Release)(THIS) PURE; +#endif + + /* IDShowPlugin methods */ + STDMETHOD(get_URL)(THIS_ BSTR FAR* pURL) PURE; + STDMETHOD(get_UserAgent)(THIS_ BSTR FAR* pUserAgent) PURE; +}; + +#endif diff --git a/windows_libs/mssdk/include/regbag.h b/windows_libs/mssdk/include/regbag.h new file mode 100644 index 00000000..1bdfa22a --- /dev/null +++ b/windows_libs/mssdk/include/regbag.h @@ -0,0 +1,178 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0338 */ +/* Compiler settings for regbag.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __regbag_h__ +#define __regbag_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ICreatePropBagOnRegKey_FWD_DEFINED__ +#define __ICreatePropBagOnRegKey_FWD_DEFINED__ +typedef interface ICreatePropBagOnRegKey ICreatePropBagOnRegKey; +#endif /* __ICreatePropBagOnRegKey_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "objidl.h" +#include "oaidl.h" +#include "ocidl.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +#ifndef __ICreatePropBagOnRegKey_INTERFACE_DEFINED__ +#define __ICreatePropBagOnRegKey_INTERFACE_DEFINED__ + +/* interface ICreatePropBagOnRegKey */ +/* [local][unique][helpstring][uuid][restricted][hidden][object] */ + + +EXTERN_C const IID IID_ICreatePropBagOnRegKey; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8A674B48-1F63-11d3-B64C-00C04F79498E") + ICreatePropBagOnRegKey : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Create( + /* [in] */ HKEY hkey, + /* [in] */ LPCOLESTR subkey, + /* [in] */ DWORD ulOptions, + /* [in] */ DWORD samDesired, + REFIID iid, + /* [out] */ LPVOID *ppBag) = 0; + + }; + +#else /* C style interface */ + + typedef struct ICreatePropBagOnRegKeyVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ICreatePropBagOnRegKey * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ICreatePropBagOnRegKey * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ICreatePropBagOnRegKey * This); + + HRESULT ( STDMETHODCALLTYPE *Create )( + ICreatePropBagOnRegKey * This, + /* [in] */ HKEY hkey, + /* [in] */ LPCOLESTR subkey, + /* [in] */ DWORD ulOptions, + /* [in] */ DWORD samDesired, + REFIID iid, + /* [out] */ LPVOID *ppBag); + + END_INTERFACE + } ICreatePropBagOnRegKeyVtbl; + + interface ICreatePropBagOnRegKey + { + CONST_VTBL struct ICreatePropBagOnRegKeyVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ICreatePropBagOnRegKey_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ICreatePropBagOnRegKey_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ICreatePropBagOnRegKey_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ICreatePropBagOnRegKey_Create(This,hkey,subkey,ulOptions,samDesired,iid,ppBag) \ + (This)->lpVtbl -> Create(This,hkey,subkey,ulOptions,samDesired,iid,ppBag) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ICreatePropBagOnRegKey_Create_Proxy( + ICreatePropBagOnRegKey * This, + /* [in] */ HKEY hkey, + /* [in] */ LPCOLESTR subkey, + /* [in] */ DWORD ulOptions, + /* [in] */ DWORD samDesired, + REFIID iid, + /* [out] */ LPVOID *ppBag); + + +void __RPC_STUB ICreatePropBagOnRegKey_Create_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ICreatePropBagOnRegKey_INTERFACE_DEFINED__ */ + + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/rmxfguid.h b/windows_libs/mssdk/include/rmxfguid.h new file mode 100644 index 00000000..d3326ccc --- /dev/null +++ b/windows_libs/mssdk/include/rmxfguid.h @@ -0,0 +1,223 @@ +/*************************************************************************** + * + * Copyright (C) 1998-1999 Microsoft Corporation. All Rights Reserved. + * + * File: rmxfguid.h + * + * Content: Defines GUIDs of D3DRM's templates. + * + ***************************************************************************/ + +#ifndef __RMXFGUID_H_ +#define __RMXFGUID_H_ + +/* {2B957100-9E9A-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMInfo, +0x2b957100, 0x9e9a, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {3D82AB44-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMMesh, +0x3d82ab44, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {3D82AB5E-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMVector, +0x3d82ab5e, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {3D82AB5F-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMMeshFace, +0x3d82ab5f, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {3D82AB4D-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMMaterial, +0x3d82ab4d, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {35FF44E1-6C7C-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMaterialArray, +0x35ff44e1, 0x6c7c, 0x11cf, 0x8F, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {3D82AB46-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMFrame, +0x3d82ab46, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {F6F23F41-7686-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMFrameTransformMatrix, +0xf6f23f41, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {F6F23F42-7686-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMeshMaterialList, +0xf6f23f42, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {F6F23F40-7686-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMeshTextureCoords, +0xf6f23f40, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {F6F23F43-7686-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMeshNormals, +0xf6f23f43, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {F6F23F44-7686-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMCoords2d, +0xf6f23f44, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {F6F23F45-7686-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMatrix4x4, +0xf6f23f45, 0x7686, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {3D82AB4F-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMAnimation, +0x3d82ab4f, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {3D82AB50-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMAnimationSet, +0x3d82ab50, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {10DD46A8-775B-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMAnimationKey, +0x10dd46a8, 0x775b, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); + +/* {10DD46A9-775B-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMFloatKeys, +0x10dd46a9, 0x775b, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); + +/* {01411840-7786-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMaterialAmbientColor, +0x01411840, 0x7786, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); + +/* {01411841-7786-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMaterialDiffuseColor, +0x01411841, 0x7786, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); + +/* {01411842-7786-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMaterialSpecularColor, +0x01411842, 0x7786, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); + +/* {D3E16E80-7835-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMaterialEmissiveColor, +0xd3e16e80, 0x7835, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {01411843-7786-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMaterialPower, +0x01411843, 0x7786, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); + +/* {35FF44E0-6C7C-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMColorRGBA, +0x35ff44e0, 0x6c7c, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xA3); + +/* {D3E16E81-7835-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMColorRGB, +0xd3e16e81, 0x7835, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {A42790E0-7810-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMGuid, +0xa42790e0, 0x7810, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {A42790E1-7810-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMTextureFilename, +0xa42790e1, 0x7810, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {A42790E2-7810-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMTextureReference, +0xa42790e2, 0x7810, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {1630B820-7842-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMIndexedColor, +0x1630b820, 0x7842, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {1630B821-7842-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMeshVertexColors, +0x1630b821, 0x7842, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {4885AE60-78E8-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMMaterialWrap, +0x4885ae60, 0x78e8, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {537DA6A0-CA37-11d0-941C-0080C80CFA7B} */ +DEFINE_GUID(TID_D3DRMBoolean, +0x537da6a0, 0xca37, 0x11d0, 0x94, 0x1c, 0x0, 0x80, 0xc8, 0xc, 0xfa, 0x7b); + +/* {ED1EC5C0-C0A8-11d0-941C-0080C80CFA7B} */ +DEFINE_GUID(TID_D3DRMMeshFaceWraps, +0xed1ec5c0, 0xc0a8, 0x11d0, 0x94, 0x1c, 0x0, 0x80, 0xc8, 0xc, 0xfa, 0x7b); + +/* {4885AE63-78E8-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMBoolean2d, +0x4885ae63, 0x78e8, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {F406B180-7B3B-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMTimedFloatKeys, +0xf406b180, 0x7b3b, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {E2BF56C0-840F-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMAnimationOptions, +0xe2bf56c0, 0x840f, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {E2BF56C1-840F-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMFramePosition, +0xe2bf56c1, 0x840f, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {E2BF56C2-840F-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMFrameVelocity, +0xe2bf56c2, 0x840f, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {E2BF56C3-840F-11cf-8F52-0040333594A3} */ +DEFINE_GUID(TID_D3DRMFrameRotation, +0xe2bf56c3, 0x840f, 0x11cf, 0x8f, 0x52, 0x0, 0x40, 0x33, 0x35, 0x94, 0xa3); + +/* {3D82AB4A-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMLight, +0x3d82ab4a, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {3D82AB51-62DA-11cf-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMCamera, +0x3d82ab51, 0x62da, 0x11cf, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {E5745280-B24F-11cf-9DD5-00AA00A71A2F} */ +DEFINE_GUID(TID_D3DRMAppData, +0xe5745280, 0xb24f, 0x11cf, 0x9d, 0xd5, 0x0, 0xaa, 0x0, 0xa7, 0x1a, 0x2f); + +/* {AED22740-B31F-11cf-9DD5-00AA00A71A2F} */ +DEFINE_GUID(TID_D3DRMLightUmbra, +0xaed22740, 0xb31f, 0x11cf, 0x9d, 0xd5, 0x0, 0xaa, 0x0, 0xa7, 0x1a, 0x2f); + +/* {AED22742-B31F-11cf-9DD5-00AA00A71A2F} */ +DEFINE_GUID(TID_D3DRMLightRange, +0xaed22742, 0xb31f, 0x11cf, 0x9d, 0xd5, 0x0, 0xaa, 0x0, 0xa7, 0x1a, 0x2f); + +/* {AED22741-B31F-11cf-9DD5-00AA00A71A2F} */ +DEFINE_GUID(TID_D3DRMLightPenumbra, +0xaed22741, 0xb31f, 0x11cf, 0x9d, 0xd5, 0x0, 0xaa, 0x0, 0xa7, 0x1a, 0x2f); + +/* {A8A98BA0-C5E5-11cf-B941-0080C80CFA7B} */ +DEFINE_GUID(TID_D3DRMLightAttenuation, +0xa8a98ba0, 0xc5e5, 0x11cf, 0xb9, 0x41, 0x0, 0x80, 0xc8, 0xc, 0xfa, 0x7b); + +/* {3A23EEA0-94B1-11d0-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMInlineData, +0x3a23eea0, 0x94b1, 0x11d0, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {3A23EEA1-94B1-11d0-AB39-0020AF71E433} */ +DEFINE_GUID(TID_D3DRMUrl, +0x3a23eea1, 0x94b1, 0x11d0, 0xab, 0x39, 0x0, 0x20, 0xaf, 0x71, 0xe4, 0x33); + +/* {8A63C360-997D-11d0-941C-0080C80CFA7B} */ +DEFINE_GUID(TID_D3DRMProgressiveMesh, +0x8A63C360, 0x997D, 0x11d0, 0x94, 0x1C, 0x0, 0x80, 0xC8, 0x0C, 0xFA, 0x7B); + +/* {98116AA0-BDBA-11d1-82C0-00A0C9697271} */ +DEFINE_GUID(TID_D3DRMExternalVisual, +0x98116AA0, 0xBDBA, 0x11d1, 0x82, 0xC0, 0x00, 0xA0, 0xC9, 0x69, 0x72, 0x71); + +/* {7F0F21E0-BFE1-11d1-82C0-00A0C9697271} */ +DEFINE_GUID(TID_D3DRMStringProperty, +0x7f0f21e0, 0xbfe1, 0x11d1, 0x82, 0xc0, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x71); + +/* {7F0F21E1-BFE1-11d1-82C0-00A0C9697271} */ +DEFINE_GUID(TID_D3DRMPropertyBag, +0x7f0f21e1, 0xbfe1, 0x11d1, 0x82, 0xc0, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x71); + +// {7F5D5EA0-D53A-11d1-82C0-00A0C9697271} +DEFINE_GUID(TID_D3DRMRightHanded, +0x7f5d5ea0, 0xd53a, 0x11d1, 0x82, 0xc0, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x71); + +#endif /* __RMXFGUID_H_ */ + diff --git a/windows_libs/mssdk/include/rmxftmpl.h b/windows_libs/mssdk/include/rmxftmpl.h new file mode 100644 index 00000000..e0018d04 --- /dev/null +++ b/windows_libs/mssdk/include/rmxftmpl.h @@ -0,0 +1,339 @@ +/* D3DRM XFile templates in binary form */ + +#ifndef _RMXFTMPL_H_ +#define _RMXFTMPL_H_ + +unsigned char D3DRM_XTEMPLATES[] = { + 0x78, 0x6f, 0x66, 0x20, 0x30, 0x33, 0x30, 0x32, 0x62, + 0x69, 0x6e, 0x20, 0x30, 0x30, 0x36, 0x34, 0x1f, 0, 0x1, + 0, 0x6, 0, 0, 0, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0xa, 0, 0x5, 0, 0x43, 0xab, 0x82, 0x3d, 0xda, + 0x62, 0xcf, 0x11, 0xab, 0x39, 0, 0x20, 0xaf, 0x71, 0xe4, + 0x33, 0x28, 0, 0x1, 0, 0x5, 0, 0, 0, 0x6d, + 0x61, 0x6a, 0x6f, 0x72, 0x14, 0, 0x28, 0, 0x1, 0, + 0x5, 0, 0, 0, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x14, + 0, 0x29, 0, 0x1, 0, 0x5, 0, 0, 0, 0x66, + 0x6c, 0x61, 0x67, 0x73, 0x14, 0, 0xb, 0, 0x1f, 0, + 0x1, 0, 0x6, 0, 0, 0, 0x56, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0xa, 0, 0x5, 0, 0x5e, 0xab, 0x82, 0x3d, + 0xda, 0x62, 0xcf, 0x11, 0xab, 0x39, 0, 0x20, 0xaf, 0x71, + 0xe4, 0x33, 0x2a, 0, 0x1, 0, 0x1, 0, 0, 0, + 0x78, 0x14, 0, 0x2a, 0, 0x1, 0, 0x1, 0, 0, + 0, 0x79, 0x14, 0, 0x2a, 0, 0x1, 0, 0x1, 0, + 0, 0, 0x7a, 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, + 0, 0x8, 0, 0, 0, 0x43, 0x6f, 0x6f, 0x72, 0x64, + 0x73, 0x32, 0x64, 0xa, 0, 0x5, 0, 0x44, 0x3f, 0xf2, + 0xf6, 0x86, 0x76, 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, 0x33, + 0x35, 0x94, 0xa3, 0x2a, 0, 0x1, 0, 0x1, 0, 0, + 0, 0x75, 0x14, 0, 0x2a, 0, 0x1, 0, 0x1, 0, + 0, 0, 0x76, 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, + 0, 0x9, 0, 0, 0, 0x4d, 0x61, 0x74, 0x72, 0x69, + 0x78, 0x34, 0x78, 0x34, 0xa, 0, 0x5, 0, 0x45, 0x3f, + 0xf2, 0xf6, 0x86, 0x76, 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, + 0x33, 0x35, 0x94, 0xa3, 0x34, 0, 0x2a, 0, 0x1, 0, + 0x6, 0, 0, 0, 0x6d, 0x61, 0x74, 0x72, 0x69, 0x78, + 0xe, 0, 0x3, 0, 0x10, 0, 0, 0, 0xf, 0, + 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, 0, 0x9, 0, + 0, 0, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x47, 0x42, + 0x41, 0xa, 0, 0x5, 0, 0xe0, 0x44, 0xff, 0x35, 0x7c, + 0x6c, 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, 0x33, 0x35, 0x94, + 0xa3, 0x2a, 0, 0x1, 0, 0x3, 0, 0, 0, 0x72, + 0x65, 0x64, 0x14, 0, 0x2a, 0, 0x1, 0, 0x5, 0, + 0, 0, 0x67, 0x72, 0x65, 0x65, 0x6e, 0x14, 0, 0x2a, + 0, 0x1, 0, 0x4, 0, 0, 0, 0x62, 0x6c, 0x75, + 0x65, 0x14, 0, 0x2a, 0, 0x1, 0, 0x5, 0, 0, + 0, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x14, 0, 0xb, 0, + 0x1f, 0, 0x1, 0, 0x8, 0, 0, 0, 0x43, 0x6f, + 0x6c, 0x6f, 0x72, 0x52, 0x47, 0x42, 0xa, 0, 0x5, 0, + 0x81, 0x6e, 0xe1, 0xd3, 0x35, 0x78, 0xcf, 0x11, 0x8f, 0x52, + 0, 0x40, 0x33, 0x35, 0x94, 0xa3, 0x2a, 0, 0x1, 0, + 0x3, 0, 0, 0, 0x72, 0x65, 0x64, 0x14, 0, 0x2a, + 0, 0x1, 0, 0x5, 0, 0, 0, 0x67, 0x72, 0x65, + 0x65, 0x6e, 0x14, 0, 0x2a, 0, 0x1, 0, 0x4, 0, + 0, 0, 0x62, 0x6c, 0x75, 0x65, 0x14, 0, 0xb, 0, + 0x1f, 0, 0x1, 0, 0xc, 0, 0, 0, 0x49, 0x6e, + 0x64, 0x65, 0x78, 0x65, 0x64, 0x43, 0x6f, 0x6c, 0x6f, 0x72, + 0xa, 0, 0x5, 0, 0x20, 0xb8, 0x30, 0x16, 0x42, 0x78, + 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, 0x33, 0x35, 0x94, 0xa3, + 0x29, 0, 0x1, 0, 0x5, 0, 0, 0, 0x69, 0x6e, + 0x64, 0x65, 0x78, 0x14, 0, 0x1, 0, 0x9, 0, 0, + 0, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x47, 0x42, 0x41, + 0x1, 0, 0xa, 0, 0, 0, 0x69, 0x6e, 0x64, 0x65, + 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x14, 0, 0xb, 0, + 0x1f, 0, 0x1, 0, 0x7, 0, 0, 0, 0x42, 0x6f, + 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0xa, 0, 0x5, 0, 0xa0, + 0xa6, 0x7d, 0x53, 0x37, 0xca, 0xd0, 0x11, 0x94, 0x1c, 0, + 0x80, 0xc8, 0xc, 0xfa, 0x7b, 0x29, 0, 0x1, 0, 0x9, + 0, 0, 0, 0x74, 0x72, 0x75, 0x65, 0x66, 0x61, 0x6c, + 0x73, 0x65, 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, 0, + 0x9, 0, 0, 0, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, + 0x6e, 0x32, 0x64, 0xa, 0, 0x5, 0, 0x63, 0xae, 0x85, + 0x48, 0xe8, 0x78, 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, 0x33, + 0x35, 0x94, 0xa3, 0x1, 0, 0x7, 0, 0, 0, 0x42, + 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x1, 0, 0x1, 0, + 0, 0, 0x75, 0x14, 0, 0x1, 0, 0x7, 0, 0, + 0, 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x1, 0, + 0x1, 0, 0, 0, 0x76, 0x14, 0, 0xb, 0, 0x1f, + 0, 0x1, 0, 0xc, 0, 0, 0, 0x4d, 0x61, 0x74, + 0x65, 0x72, 0x69, 0x61, 0x6c, 0x57, 0x72, 0x61, 0x70, 0xa, + 0, 0x5, 0, 0x60, 0xae, 0x85, 0x48, 0xe8, 0x78, 0xcf, + 0x11, 0x8f, 0x52, 0, 0x40, 0x33, 0x35, 0x94, 0xa3, 0x1, + 0, 0x7, 0, 0, 0, 0x42, 0x6f, 0x6f, 0x6c, 0x65, + 0x61, 0x6e, 0x1, 0, 0x1, 0, 0, 0, 0x75, 0x14, + 0, 0x1, 0, 0x7, 0, 0, 0, 0x42, 0x6f, 0x6f, + 0x6c, 0x65, 0x61, 0x6e, 0x1, 0, 0x1, 0, 0, 0, + 0x76, 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, 0, 0xf, + 0, 0, 0, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, + 0x46, 0x69, 0x6c, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0xa, 0, + 0x5, 0, 0xe1, 0x90, 0x27, 0xa4, 0x10, 0x78, 0xcf, 0x11, + 0x8f, 0x52, 0, 0x40, 0x33, 0x35, 0x94, 0xa3, 0x31, 0, + 0x1, 0, 0x8, 0, 0, 0, 0x66, 0x69, 0x6c, 0x65, + 0x6e, 0x61, 0x6d, 0x65, 0x14, 0, 0xb, 0, 0x1f, 0, + 0x1, 0, 0x8, 0, 0, 0, 0x4d, 0x61, 0x74, 0x65, + 0x72, 0x69, 0x61, 0x6c, 0xa, 0, 0x5, 0, 0x4d, 0xab, + 0x82, 0x3d, 0xda, 0x62, 0xcf, 0x11, 0xab, 0x39, 0, 0x20, + 0xaf, 0x71, 0xe4, 0x33, 0x1, 0, 0x9, 0, 0, 0, + 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x47, 0x42, 0x41, 0x1, + 0, 0x9, 0, 0, 0, 0x66, 0x61, 0x63, 0x65, 0x43, + 0x6f, 0x6c, 0x6f, 0x72, 0x14, 0, 0x2a, 0, 0x1, 0, + 0x5, 0, 0, 0, 0x70, 0x6f, 0x77, 0x65, 0x72, 0x14, + 0, 0x1, 0, 0x8, 0, 0, 0, 0x43, 0x6f, 0x6c, + 0x6f, 0x72, 0x52, 0x47, 0x42, 0x1, 0, 0xd, 0, 0, + 0, 0x73, 0x70, 0x65, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x43, + 0x6f, 0x6c, 0x6f, 0x72, 0x14, 0, 0x1, 0, 0x8, 0, + 0, 0, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x52, 0x47, 0x42, + 0x1, 0, 0xd, 0, 0, 0, 0x65, 0x6d, 0x69, 0x73, + 0x73, 0x69, 0x76, 0x65, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x14, + 0, 0xe, 0, 0x12, 0, 0x12, 0, 0x12, 0, 0xf, + 0, 0xb, 0, 0x1f, 0, 0x1, 0, 0x8, 0, 0, + 0, 0x4d, 0x65, 0x73, 0x68, 0x46, 0x61, 0x63, 0x65, 0xa, + 0, 0x5, 0, 0x5f, 0xab, 0x82, 0x3d, 0xda, 0x62, 0xcf, + 0x11, 0xab, 0x39, 0, 0x20, 0xaf, 0x71, 0xe4, 0x33, 0x29, + 0, 0x1, 0, 0x12, 0, 0, 0, 0x6e, 0x46, 0x61, + 0x63, 0x65, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x6e, + 0x64, 0x69, 0x63, 0x65, 0x73, 0x14, 0, 0x34, 0, 0x29, + 0, 0x1, 0, 0x11, 0, 0, 0, 0x66, 0x61, 0x63, + 0x65, 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x49, 0x6e, 0x64, + 0x69, 0x63, 0x65, 0x73, 0xe, 0, 0x1, 0, 0x12, 0, + 0, 0, 0x6e, 0x46, 0x61, 0x63, 0x65, 0x56, 0x65, 0x72, + 0x74, 0x65, 0x78, 0x49, 0x6e, 0x64, 0x69, 0x63, 0x65, 0x73, + 0xf, 0, 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, 0, + 0xd, 0, 0, 0, 0x4d, 0x65, 0x73, 0x68, 0x46, 0x61, + 0x63, 0x65, 0x57, 0x72, 0x61, 0x70, 0x73, 0xa, 0, 0x5, + 0, 0xc0, 0xc5, 0x1e, 0xed, 0xa8, 0xc0, 0xd0, 0x11, 0x94, + 0x1c, 0, 0x80, 0xc8, 0xc, 0xfa, 0x7b, 0x29, 0, 0x1, + 0, 0xf, 0, 0, 0, 0x6e, 0x46, 0x61, 0x63, 0x65, + 0x57, 0x72, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0x14, 0, 0x34, 0, 0x1, 0, 0x9, 0, 0, 0, + 0x42, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x32, 0x64, 0x1, + 0, 0xe, 0, 0, 0, 0x66, 0x61, 0x63, 0x65, 0x57, + 0x72, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0xe, + 0, 0x1, 0, 0xf, 0, 0, 0, 0x6e, 0x46, 0x61, + 0x63, 0x65, 0x57, 0x72, 0x61, 0x70, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0xf, 0, 0x14, 0, 0xb, 0, 0x1f, 0, + 0x1, 0, 0x11, 0, 0, 0, 0x4d, 0x65, 0x73, 0x68, + 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6f, + 0x72, 0x64, 0x73, 0xa, 0, 0x5, 0, 0x40, 0x3f, 0xf2, + 0xf6, 0x86, 0x76, 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, 0x33, + 0x35, 0x94, 0xa3, 0x29, 0, 0x1, 0, 0xe, 0, 0, + 0, 0x6e, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, + 0x6f, 0x6f, 0x72, 0x64, 0x73, 0x14, 0, 0x34, 0, 0x1, + 0, 0x8, 0, 0, 0, 0x43, 0x6f, 0x6f, 0x72, 0x64, + 0x73, 0x32, 0x64, 0x1, 0, 0xd, 0, 0, 0, 0x74, + 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, 0x6f, 0x72, + 0x64, 0x73, 0xe, 0, 0x1, 0, 0xe, 0, 0, 0, + 0x6e, 0x54, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x43, 0x6f, + 0x6f, 0x72, 0x64, 0x73, 0xf, 0, 0x14, 0, 0xb, 0, + 0x1f, 0, 0x1, 0, 0x10, 0, 0, 0, 0x4d, 0x65, + 0x73, 0x68, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, + 0x4c, 0x69, 0x73, 0x74, 0xa, 0, 0x5, 0, 0x42, 0x3f, + 0xf2, 0xf6, 0x86, 0x76, 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, + 0x33, 0x35, 0x94, 0xa3, 0x29, 0, 0x1, 0, 0xa, 0, + 0, 0, 0x6e, 0x4d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, + 0x6c, 0x73, 0x14, 0, 0x29, 0, 0x1, 0, 0xc, 0, + 0, 0, 0x6e, 0x46, 0x61, 0x63, 0x65, 0x49, 0x6e, 0x64, + 0x65, 0x78, 0x65, 0x73, 0x14, 0, 0x34, 0, 0x29, 0, + 0x1, 0, 0xb, 0, 0, 0, 0x66, 0x61, 0x63, 0x65, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0xe, 0, 0x1, + 0, 0xc, 0, 0, 0, 0x6e, 0x46, 0x61, 0x63, 0x65, + 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0xf, 0, 0x14, + 0, 0xe, 0, 0x1, 0, 0x8, 0, 0, 0, 0x4d, + 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0xf, 0, 0xb, + 0, 0x1f, 0, 0x1, 0, 0xb, 0, 0, 0, 0x4d, + 0x65, 0x73, 0x68, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x73, + 0xa, 0, 0x5, 0, 0x43, 0x3f, 0xf2, 0xf6, 0x86, 0x76, + 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, 0x33, 0x35, 0x94, 0xa3, + 0x29, 0, 0x1, 0, 0x8, 0, 0, 0, 0x6e, 0x4e, + 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x73, 0x14, 0, 0x34, 0, + 0x1, 0, 0x6, 0, 0, 0, 0x56, 0x65, 0x63, 0x74, + 0x6f, 0x72, 0x1, 0, 0x7, 0, 0, 0, 0x6e, 0x6f, + 0x72, 0x6d, 0x61, 0x6c, 0x73, 0xe, 0, 0x1, 0, 0x8, + 0, 0, 0, 0x6e, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, + 0x73, 0xf, 0, 0x14, 0, 0x29, 0, 0x1, 0, 0xc, + 0, 0, 0, 0x6e, 0x46, 0x61, 0x63, 0x65, 0x4e, 0x6f, + 0x72, 0x6d, 0x61, 0x6c, 0x73, 0x14, 0, 0x34, 0, 0x1, + 0, 0x8, 0, 0, 0, 0x4d, 0x65, 0x73, 0x68, 0x46, + 0x61, 0x63, 0x65, 0x1, 0, 0xb, 0, 0, 0, 0x66, + 0x61, 0x63, 0x65, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x73, + 0xe, 0, 0x1, 0, 0xc, 0, 0, 0, 0x6e, 0x46, + 0x61, 0x63, 0x65, 0x4e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x73, + 0xf, 0, 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, 0, + 0x10, 0, 0, 0, 0x4d, 0x65, 0x73, 0x68, 0x56, 0x65, + 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x73, + 0xa, 0, 0x5, 0, 0x21, 0xb8, 0x30, 0x16, 0x42, 0x78, + 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, 0x33, 0x35, 0x94, 0xa3, + 0x29, 0, 0x1, 0, 0xd, 0, 0, 0, 0x6e, 0x56, + 0x65, 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, + 0x73, 0x14, 0, 0x34, 0, 0x1, 0, 0xc, 0, 0, + 0, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x64, 0x43, 0x6f, + 0x6c, 0x6f, 0x72, 0x1, 0, 0xc, 0, 0, 0, 0x76, + 0x65, 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, + 0x73, 0xe, 0, 0x1, 0, 0xd, 0, 0, 0, 0x6e, + 0x56, 0x65, 0x72, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, + 0x72, 0x73, 0xf, 0, 0x14, 0, 0xb, 0, 0x1f, 0, + 0x1, 0, 0x4, 0, 0, 0, 0x4d, 0x65, 0x73, 0x68, + 0xa, 0, 0x5, 0, 0x44, 0xab, 0x82, 0x3d, 0xda, 0x62, + 0xcf, 0x11, 0xab, 0x39, 0, 0x20, 0xaf, 0x71, 0xe4, 0x33, + 0x29, 0, 0x1, 0, 0x9, 0, 0, 0, 0x6e, 0x56, + 0x65, 0x72, 0x74, 0x69, 0x63, 0x65, 0x73, 0x14, 0, 0x34, + 0, 0x1, 0, 0x6, 0, 0, 0, 0x56, 0x65, 0x63, + 0x74, 0x6f, 0x72, 0x1, 0, 0x8, 0, 0, 0, 0x76, + 0x65, 0x72, 0x74, 0x69, 0x63, 0x65, 0x73, 0xe, 0, 0x1, + 0, 0x9, 0, 0, 0, 0x6e, 0x56, 0x65, 0x72, 0x74, + 0x69, 0x63, 0x65, 0x73, 0xf, 0, 0x14, 0, 0x29, 0, + 0x1, 0, 0x6, 0, 0, 0, 0x6e, 0x46, 0x61, 0x63, + 0x65, 0x73, 0x14, 0, 0x34, 0, 0x1, 0, 0x8, 0, + 0, 0, 0x4d, 0x65, 0x73, 0x68, 0x46, 0x61, 0x63, 0x65, + 0x1, 0, 0x5, 0, 0, 0, 0x66, 0x61, 0x63, 0x65, + 0x73, 0xe, 0, 0x1, 0, 0x6, 0, 0, 0, 0x6e, + 0x46, 0x61, 0x63, 0x65, 0x73, 0xf, 0, 0x14, 0, 0xe, + 0, 0x12, 0, 0x12, 0, 0x12, 0, 0xf, 0, 0xb, + 0, 0x1f, 0, 0x1, 0, 0x14, 0, 0, 0, 0x46, + 0x72, 0x61, 0x6d, 0x65, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, + 0x6f, 0x72, 0x6d, 0x4d, 0x61, 0x74, 0x72, 0x69, 0x78, 0xa, + 0, 0x5, 0, 0x41, 0x3f, 0xf2, 0xf6, 0x86, 0x76, 0xcf, + 0x11, 0x8f, 0x52, 0, 0x40, 0x33, 0x35, 0x94, 0xa3, 0x1, + 0, 0x9, 0, 0, 0, 0x4d, 0x61, 0x74, 0x72, 0x69, + 0x78, 0x34, 0x78, 0x34, 0x1, 0, 0xb, 0, 0, 0, + 0x66, 0x72, 0x61, 0x6d, 0x65, 0x4d, 0x61, 0x74, 0x72, 0x69, + 0x78, 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, 0, 0x5, + 0, 0, 0, 0x46, 0x72, 0x61, 0x6d, 0x65, 0xa, 0, + 0x5, 0, 0x46, 0xab, 0x82, 0x3d, 0xda, 0x62, 0xcf, 0x11, + 0xab, 0x39, 0, 0x20, 0xaf, 0x71, 0xe4, 0x33, 0xe, 0, + 0x12, 0, 0x12, 0, 0x12, 0, 0xf, 0, 0xb, 0, + 0x1f, 0, 0x1, 0, 0x9, 0, 0, 0, 0x46, 0x6c, + 0x6f, 0x61, 0x74, 0x4b, 0x65, 0x79, 0x73, 0xa, 0, 0x5, + 0, 0xa9, 0x46, 0xdd, 0x10, 0x5b, 0x77, 0xcf, 0x11, 0x8f, + 0x52, 0, 0x40, 0x33, 0x35, 0x94, 0xa3, 0x29, 0, 0x1, + 0, 0x7, 0, 0, 0, 0x6e, 0x56, 0x61, 0x6c, 0x75, + 0x65, 0x73, 0x14, 0, 0x34, 0, 0x2a, 0, 0x1, 0, + 0x6, 0, 0, 0, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, + 0xe, 0, 0x1, 0, 0x7, 0, 0, 0, 0x6e, 0x56, + 0x61, 0x6c, 0x75, 0x65, 0x73, 0xf, 0, 0x14, 0, 0xb, + 0, 0x1f, 0, 0x1, 0, 0xe, 0, 0, 0, 0x54, + 0x69, 0x6d, 0x65, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x4b, + 0x65, 0x79, 0x73, 0xa, 0, 0x5, 0, 0x80, 0xb1, 0x6, + 0xf4, 0x3b, 0x7b, 0xcf, 0x11, 0x8f, 0x52, 0, 0x40, 0x33, + 0x35, 0x94, 0xa3, 0x29, 0, 0x1, 0, 0x4, 0, 0, + 0, 0x74, 0x69, 0x6d, 0x65, 0x14, 0, 0x1, 0, 0x9, + 0, 0, 0, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x4b, 0x65, + 0x79, 0x73, 0x1, 0, 0x6, 0, 0, 0, 0x74, 0x66, + 0x6b, 0x65, 0x79, 0x73, 0x14, 0, 0xb, 0, 0x1f, 0, + 0x1, 0, 0xc, 0, 0, 0, 0x41, 0x6e, 0x69, 0x6d, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4b, 0x65, 0x79, 0xa, 0, + 0x5, 0, 0xa8, 0x46, 0xdd, 0x10, 0x5b, 0x77, 0xcf, 0x11, + 0x8f, 0x52, 0, 0x40, 0x33, 0x35, 0x94, 0xa3, 0x29, 0, + 0x1, 0, 0x7, 0, 0, 0, 0x6b, 0x65, 0x79, 0x54, + 0x79, 0x70, 0x65, 0x14, 0, 0x29, 0, 0x1, 0, 0x5, + 0, 0, 0, 0x6e, 0x4b, 0x65, 0x79, 0x73, 0x14, 0, + 0x34, 0, 0x1, 0, 0xe, 0, 0, 0, 0x54, 0x69, + 0x6d, 0x65, 0x64, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x4b, 0x65, + 0x79, 0x73, 0x1, 0, 0x4, 0, 0, 0, 0x6b, 0x65, + 0x79, 0x73, 0xe, 0, 0x1, 0, 0x5, 0, 0, 0, + 0x6e, 0x4b, 0x65, 0x79, 0x73, 0xf, 0, 0x14, 0, 0xb, + 0, 0x1f, 0, 0x1, 0, 0x10, 0, 0, 0, 0x41, + 0x6e, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, + 0x74, 0x69, 0x6f, 0x6e, 0x73, 0xa, 0, 0x5, 0, 0xc0, + 0x56, 0xbf, 0xe2, 0xf, 0x84, 0xcf, 0x11, 0x8f, 0x52, 0, + 0x40, 0x33, 0x35, 0x94, 0xa3, 0x29, 0, 0x1, 0, 0xa, + 0, 0, 0, 0x6f, 0x70, 0x65, 0x6e, 0x63, 0x6c, 0x6f, + 0x73, 0x65, 0x64, 0x14, 0, 0x29, 0, 0x1, 0, 0xf, + 0, 0, 0, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x14, 0, + 0xb, 0, 0x1f, 0, 0x1, 0, 0x9, 0, 0, 0, + 0x41, 0x6e, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa, + 0, 0x5, 0, 0x4f, 0xab, 0x82, 0x3d, 0xda, 0x62, 0xcf, + 0x11, 0xab, 0x39, 0, 0x20, 0xaf, 0x71, 0xe4, 0x33, 0xe, + 0, 0x12, 0, 0x12, 0, 0x12, 0, 0xf, 0, 0xb, + 0, 0x1f, 0, 0x1, 0, 0xc, 0, 0, 0, 0x41, + 0x6e, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, + 0x74, 0xa, 0, 0x5, 0, 0x50, 0xab, 0x82, 0x3d, 0xda, + 0x62, 0xcf, 0x11, 0xab, 0x39, 0, 0x20, 0xaf, 0x71, 0xe4, + 0x33, 0xe, 0, 0x1, 0, 0x9, 0, 0, 0, 0x41, + 0x6e, 0x69, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xf, 0, + 0xb, 0, 0x1f, 0, 0x1, 0, 0xa, 0, 0, 0, + 0x49, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, + 0xa, 0, 0x5, 0, 0xa0, 0xee, 0x23, 0x3a, 0xb1, 0x94, + 0xd0, 0x11, 0xab, 0x39, 0, 0x20, 0xaf, 0x71, 0xe4, 0x33, + 0xe, 0, 0x1, 0, 0x6, 0, 0, 0, 0x42, 0x49, + 0x4e, 0x41, 0x52, 0x59, 0xf, 0, 0xb, 0, 0x1f, 0, + 0x1, 0, 0x3, 0, 0, 0, 0x55, 0x72, 0x6c, 0xa, + 0, 0x5, 0, 0xa1, 0xee, 0x23, 0x3a, 0xb1, 0x94, 0xd0, + 0x11, 0xab, 0x39, 0, 0x20, 0xaf, 0x71, 0xe4, 0x33, 0x29, + 0, 0x1, 0, 0x5, 0, 0, 0, 0x6e, 0x55, 0x72, + 0x6c, 0x73, 0x14, 0, 0x34, 0, 0x31, 0, 0x1, 0, + 0x4, 0, 0, 0, 0x75, 0x72, 0x6c, 0x73, 0xe, 0, + 0x1, 0, 0x5, 0, 0, 0, 0x6e, 0x55, 0x72, 0x6c, + 0x73, 0xf, 0, 0x14, 0, 0xb, 0, 0x1f, 0, 0x1, + 0, 0xf, 0, 0, 0, 0x50, 0x72, 0x6f, 0x67, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x68, + 0xa, 0, 0x5, 0, 0x60, 0xc3, 0x63, 0x8a, 0x7d, 0x99, + 0xd0, 0x11, 0x94, 0x1c, 0, 0x80, 0xc8, 0xc, 0xfa, 0x7b, + 0xe, 0, 0x1, 0, 0x3, 0, 0, 0, 0x55, 0x72, + 0x6c, 0x13, 0, 0x1, 0, 0xa, 0, 0, 0, 0x49, + 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x44, 0x61, 0x74, 0x61, 0xf, + 0, 0xb, 0, 0x1f, 0, 0x1, 0, 0x4, 0, 0, + 0, 0x47, 0x75, 0x69, 0x64, 0xa, 0, 0x5, 0, 0xe0, + 0x90, 0x27, 0xa4, 0x10, 0x78, 0xcf, 0x11, 0x8f, 0x52, 0, + 0x40, 0x33, 0x35, 0x94, 0xa3, 0x29, 0, 0x1, 0, 0x5, + 0, 0, 0, 0x64, 0x61, 0x74, 0x61, 0x31, 0x14, 0, + 0x28, 0, 0x1, 0, 0x5, 0, 0, 0, 0x64, 0x61, + 0x74, 0x61, 0x32, 0x14, 0, 0x28, 0, 0x1, 0, 0x5, + 0, 0, 0, 0x64, 0x61, 0x74, 0x61, 0x33, 0x14, 0, + 0x34, 0, 0x2d, 0, 0x1, 0, 0x5, 0, 0, 0, + 0x64, 0x61, 0x74, 0x61, 0x34, 0xe, 0, 0x3, 0, 0x8, + 0, 0, 0, 0xf, 0, 0x14, 0, 0xb, 0, 0x1f, + 0, 0x1, 0, 0xe, 0, 0, 0, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, + 0x79, 0xa, 0, 0x5, 0, 0xe0, 0x21, 0xf, 0x7f, 0xe1, + 0xbf, 0xd1, 0x11, 0x82, 0xc0, 0, 0xa0, 0xc9, 0x69, 0x72, + 0x71, 0x31, 0, 0x1, 0, 0x3, 0, 0, 0, 0x6b, + 0x65, 0x79, 0x14, 0, 0x31, 0, 0x1, 0, 0x5, 0, + 0, 0, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x14, 0, 0xb, + 0, 0x1f, 0, 0x1, 0, 0xb, 0, 0, 0, 0x50, + 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x42, 0x61, 0x67, + 0xa, 0, 0x5, 0, 0xe1, 0x21, 0xf, 0x7f, 0xe1, 0xbf, + 0xd1, 0x11, 0x82, 0xc0, 0, 0xa0, 0xc9, 0x69, 0x72, 0x71, + 0xe, 0, 0x1, 0, 0xe, 0, 0, 0, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x50, 0x72, 0x6f, 0x70, 0x65, 0x72, + 0x74, 0x79, 0xf, 0, 0xb, 0, 0x1f, 0, 0x1, 0, + 0xe, 0, 0, 0, 0x45, 0x78, 0x74, 0x65, 0x72, 0x6e, + 0x61, 0x6c, 0x56, 0x69, 0x73, 0x75, 0x61, 0x6c, 0xa, 0, + 0x5, 0, 0xa0, 0x6a, 0x11, 0x98, 0xba, 0xbd, 0xd1, 0x11, + 0x82, 0xc0, 0, 0xa0, 0xc9, 0x69, 0x72, 0x71, 0x1, 0, + 0x4, 0, 0, 0, 0x47, 0x75, 0x69, 0x64, 0x1, 0, + 0x12, 0, 0, 0, 0x67, 0x75, 0x69, 0x64, 0x45, 0x78, + 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x56, 0x69, 0x73, 0x75, + 0x61, 0x6c, 0x14, 0, 0xe, 0, 0x12, 0, 0x12, 0, + 0x12, 0, 0xf, 0, 0xb, 0, 0x1f, 0, 0x1, 0, + 0xb, 0, 0, 0, 0x52, 0x69, 0x67, 0x68, 0x74, 0x48, + 0x61, 0x6e, 0x64, 0x65, 0x64, 0xa, 0, 0x5, 0, 0xa0, + 0x5e, 0x5d, 0x7f, 0x3a, 0xd5, 0xd1, 0x11, 0x82, 0xc0, 0, + 0xa0, 0xc9, 0x69, 0x72, 0x71, 0x29, 0, 0x1, 0, 0xc, + 0, 0, 0, 0x62, 0x52, 0x69, 0x67, 0x68, 0x74, 0x48, + 0x61, 0x6e, 0x64, 0x65, 0x64, 0x14, 0, 0xb, 0 +}; + +#define D3DRM_XTEMPLATE_BYTES 3278 + +#endif /* _RMXFTMPL_H_ */ diff --git a/windows_libs/mssdk/include/strmif.h b/windows_libs/mssdk/include/strmif.h new file mode 100644 index 00000000..36383ea5 --- /dev/null +++ b/windows_libs/mssdk/include/strmif.h @@ -0,0 +1,26661 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0338 */ +/* Compiler settings for strmif.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __strmif_h__ +#define __strmif_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ICreateDevEnum_FWD_DEFINED__ +#define __ICreateDevEnum_FWD_DEFINED__ +typedef interface ICreateDevEnum ICreateDevEnum; +#endif /* __ICreateDevEnum_FWD_DEFINED__ */ + + +#ifndef __IPin_FWD_DEFINED__ +#define __IPin_FWD_DEFINED__ +typedef interface IPin IPin; +#endif /* __IPin_FWD_DEFINED__ */ + + +#ifndef __IEnumPins_FWD_DEFINED__ +#define __IEnumPins_FWD_DEFINED__ +typedef interface IEnumPins IEnumPins; +#endif /* __IEnumPins_FWD_DEFINED__ */ + + +#ifndef __IEnumMediaTypes_FWD_DEFINED__ +#define __IEnumMediaTypes_FWD_DEFINED__ +typedef interface IEnumMediaTypes IEnumMediaTypes; +#endif /* __IEnumMediaTypes_FWD_DEFINED__ */ + + +#ifndef __IFilterGraph_FWD_DEFINED__ +#define __IFilterGraph_FWD_DEFINED__ +typedef interface IFilterGraph IFilterGraph; +#endif /* __IFilterGraph_FWD_DEFINED__ */ + + +#ifndef __IEnumFilters_FWD_DEFINED__ +#define __IEnumFilters_FWD_DEFINED__ +typedef interface IEnumFilters IEnumFilters; +#endif /* __IEnumFilters_FWD_DEFINED__ */ + + +#ifndef __IMediaFilter_FWD_DEFINED__ +#define __IMediaFilter_FWD_DEFINED__ +typedef interface IMediaFilter IMediaFilter; +#endif /* __IMediaFilter_FWD_DEFINED__ */ + + +#ifndef __IBaseFilter_FWD_DEFINED__ +#define __IBaseFilter_FWD_DEFINED__ +typedef interface IBaseFilter IBaseFilter; +#endif /* __IBaseFilter_FWD_DEFINED__ */ + + +#ifndef __IReferenceClock_FWD_DEFINED__ +#define __IReferenceClock_FWD_DEFINED__ +typedef interface IReferenceClock IReferenceClock; +#endif /* __IReferenceClock_FWD_DEFINED__ */ + + +#ifndef __IReferenceClock2_FWD_DEFINED__ +#define __IReferenceClock2_FWD_DEFINED__ +typedef interface IReferenceClock2 IReferenceClock2; +#endif /* __IReferenceClock2_FWD_DEFINED__ */ + + +#ifndef __IMediaSample_FWD_DEFINED__ +#define __IMediaSample_FWD_DEFINED__ +typedef interface IMediaSample IMediaSample; +#endif /* __IMediaSample_FWD_DEFINED__ */ + + +#ifndef __IMediaSample2_FWD_DEFINED__ +#define __IMediaSample2_FWD_DEFINED__ +typedef interface IMediaSample2 IMediaSample2; +#endif /* __IMediaSample2_FWD_DEFINED__ */ + + +#ifndef __IMemAllocator_FWD_DEFINED__ +#define __IMemAllocator_FWD_DEFINED__ +typedef interface IMemAllocator IMemAllocator; +#endif /* __IMemAllocator_FWD_DEFINED__ */ + + +#ifndef __IMemAllocatorCallbackTemp_FWD_DEFINED__ +#define __IMemAllocatorCallbackTemp_FWD_DEFINED__ +typedef interface IMemAllocatorCallbackTemp IMemAllocatorCallbackTemp; +#endif /* __IMemAllocatorCallbackTemp_FWD_DEFINED__ */ + + +#ifndef __IMemAllocatorNotifyCallbackTemp_FWD_DEFINED__ +#define __IMemAllocatorNotifyCallbackTemp_FWD_DEFINED__ +typedef interface IMemAllocatorNotifyCallbackTemp IMemAllocatorNotifyCallbackTemp; +#endif /* __IMemAllocatorNotifyCallbackTemp_FWD_DEFINED__ */ + + +#ifndef __IMemInputPin_FWD_DEFINED__ +#define __IMemInputPin_FWD_DEFINED__ +typedef interface IMemInputPin IMemInputPin; +#endif /* __IMemInputPin_FWD_DEFINED__ */ + + +#ifndef __IAMovieSetup_FWD_DEFINED__ +#define __IAMovieSetup_FWD_DEFINED__ +typedef interface IAMovieSetup IAMovieSetup; +#endif /* __IAMovieSetup_FWD_DEFINED__ */ + + +#ifndef __IMediaSeeking_FWD_DEFINED__ +#define __IMediaSeeking_FWD_DEFINED__ +typedef interface IMediaSeeking IMediaSeeking; +#endif /* __IMediaSeeking_FWD_DEFINED__ */ + + +#ifndef __IEnumRegFilters_FWD_DEFINED__ +#define __IEnumRegFilters_FWD_DEFINED__ +typedef interface IEnumRegFilters IEnumRegFilters; +#endif /* __IEnumRegFilters_FWD_DEFINED__ */ + + +#ifndef __IFilterMapper_FWD_DEFINED__ +#define __IFilterMapper_FWD_DEFINED__ +typedef interface IFilterMapper IFilterMapper; +#endif /* __IFilterMapper_FWD_DEFINED__ */ + + +#ifndef __IFilterMapper2_FWD_DEFINED__ +#define __IFilterMapper2_FWD_DEFINED__ +typedef interface IFilterMapper2 IFilterMapper2; +#endif /* __IFilterMapper2_FWD_DEFINED__ */ + + +#ifndef __IFilterMapper3_FWD_DEFINED__ +#define __IFilterMapper3_FWD_DEFINED__ +typedef interface IFilterMapper3 IFilterMapper3; +#endif /* __IFilterMapper3_FWD_DEFINED__ */ + + +#ifndef __IQualityControl_FWD_DEFINED__ +#define __IQualityControl_FWD_DEFINED__ +typedef interface IQualityControl IQualityControl; +#endif /* __IQualityControl_FWD_DEFINED__ */ + + +#ifndef __IOverlayNotify_FWD_DEFINED__ +#define __IOverlayNotify_FWD_DEFINED__ +typedef interface IOverlayNotify IOverlayNotify; +#endif /* __IOverlayNotify_FWD_DEFINED__ */ + + +#ifndef __IOverlayNotify2_FWD_DEFINED__ +#define __IOverlayNotify2_FWD_DEFINED__ +typedef interface IOverlayNotify2 IOverlayNotify2; +#endif /* __IOverlayNotify2_FWD_DEFINED__ */ + + +#ifndef __IOverlay_FWD_DEFINED__ +#define __IOverlay_FWD_DEFINED__ +typedef interface IOverlay IOverlay; +#endif /* __IOverlay_FWD_DEFINED__ */ + + +#ifndef __IMediaEventSink_FWD_DEFINED__ +#define __IMediaEventSink_FWD_DEFINED__ +typedef interface IMediaEventSink IMediaEventSink; +#endif /* __IMediaEventSink_FWD_DEFINED__ */ + + +#ifndef __IFileSourceFilter_FWD_DEFINED__ +#define __IFileSourceFilter_FWD_DEFINED__ +typedef interface IFileSourceFilter IFileSourceFilter; +#endif /* __IFileSourceFilter_FWD_DEFINED__ */ + + +#ifndef __IFileSinkFilter_FWD_DEFINED__ +#define __IFileSinkFilter_FWD_DEFINED__ +typedef interface IFileSinkFilter IFileSinkFilter; +#endif /* __IFileSinkFilter_FWD_DEFINED__ */ + + +#ifndef __IFileSinkFilter2_FWD_DEFINED__ +#define __IFileSinkFilter2_FWD_DEFINED__ +typedef interface IFileSinkFilter2 IFileSinkFilter2; +#endif /* __IFileSinkFilter2_FWD_DEFINED__ */ + + +#ifndef __IGraphBuilder_FWD_DEFINED__ +#define __IGraphBuilder_FWD_DEFINED__ +typedef interface IGraphBuilder IGraphBuilder; +#endif /* __IGraphBuilder_FWD_DEFINED__ */ + + +#ifndef __ICaptureGraphBuilder_FWD_DEFINED__ +#define __ICaptureGraphBuilder_FWD_DEFINED__ +typedef interface ICaptureGraphBuilder ICaptureGraphBuilder; +#endif /* __ICaptureGraphBuilder_FWD_DEFINED__ */ + + +#ifndef __IAMCopyCaptureFileProgress_FWD_DEFINED__ +#define __IAMCopyCaptureFileProgress_FWD_DEFINED__ +typedef interface IAMCopyCaptureFileProgress IAMCopyCaptureFileProgress; +#endif /* __IAMCopyCaptureFileProgress_FWD_DEFINED__ */ + + +#ifndef __ICaptureGraphBuilder2_FWD_DEFINED__ +#define __ICaptureGraphBuilder2_FWD_DEFINED__ +typedef interface ICaptureGraphBuilder2 ICaptureGraphBuilder2; +#endif /* __ICaptureGraphBuilder2_FWD_DEFINED__ */ + + +#ifndef __IFilterGraph2_FWD_DEFINED__ +#define __IFilterGraph2_FWD_DEFINED__ +typedef interface IFilterGraph2 IFilterGraph2; +#endif /* __IFilterGraph2_FWD_DEFINED__ */ + + +#ifndef __IStreamBuilder_FWD_DEFINED__ +#define __IStreamBuilder_FWD_DEFINED__ +typedef interface IStreamBuilder IStreamBuilder; +#endif /* __IStreamBuilder_FWD_DEFINED__ */ + + +#ifndef __IAsyncReader_FWD_DEFINED__ +#define __IAsyncReader_FWD_DEFINED__ +typedef interface IAsyncReader IAsyncReader; +#endif /* __IAsyncReader_FWD_DEFINED__ */ + + +#ifndef __IGraphVersion_FWD_DEFINED__ +#define __IGraphVersion_FWD_DEFINED__ +typedef interface IGraphVersion IGraphVersion; +#endif /* __IGraphVersion_FWD_DEFINED__ */ + + +#ifndef __IResourceConsumer_FWD_DEFINED__ +#define __IResourceConsumer_FWD_DEFINED__ +typedef interface IResourceConsumer IResourceConsumer; +#endif /* __IResourceConsumer_FWD_DEFINED__ */ + + +#ifndef __IResourceManager_FWD_DEFINED__ +#define __IResourceManager_FWD_DEFINED__ +typedef interface IResourceManager IResourceManager; +#endif /* __IResourceManager_FWD_DEFINED__ */ + + +#ifndef __IDistributorNotify_FWD_DEFINED__ +#define __IDistributorNotify_FWD_DEFINED__ +typedef interface IDistributorNotify IDistributorNotify; +#endif /* __IDistributorNotify_FWD_DEFINED__ */ + + +#ifndef __IAMStreamControl_FWD_DEFINED__ +#define __IAMStreamControl_FWD_DEFINED__ +typedef interface IAMStreamControl IAMStreamControl; +#endif /* __IAMStreamControl_FWD_DEFINED__ */ + + +#ifndef __ISeekingPassThru_FWD_DEFINED__ +#define __ISeekingPassThru_FWD_DEFINED__ +typedef interface ISeekingPassThru ISeekingPassThru; +#endif /* __ISeekingPassThru_FWD_DEFINED__ */ + + +#ifndef __IAMStreamConfig_FWD_DEFINED__ +#define __IAMStreamConfig_FWD_DEFINED__ +typedef interface IAMStreamConfig IAMStreamConfig; +#endif /* __IAMStreamConfig_FWD_DEFINED__ */ + + +#ifndef __IConfigInterleaving_FWD_DEFINED__ +#define __IConfigInterleaving_FWD_DEFINED__ +typedef interface IConfigInterleaving IConfigInterleaving; +#endif /* __IConfigInterleaving_FWD_DEFINED__ */ + + +#ifndef __IConfigAviMux_FWD_DEFINED__ +#define __IConfigAviMux_FWD_DEFINED__ +typedef interface IConfigAviMux IConfigAviMux; +#endif /* __IConfigAviMux_FWD_DEFINED__ */ + + +#ifndef __IAMVideoCompression_FWD_DEFINED__ +#define __IAMVideoCompression_FWD_DEFINED__ +typedef interface IAMVideoCompression IAMVideoCompression; +#endif /* __IAMVideoCompression_FWD_DEFINED__ */ + + +#ifndef __IAMVfwCaptureDialogs_FWD_DEFINED__ +#define __IAMVfwCaptureDialogs_FWD_DEFINED__ +typedef interface IAMVfwCaptureDialogs IAMVfwCaptureDialogs; +#endif /* __IAMVfwCaptureDialogs_FWD_DEFINED__ */ + + +#ifndef __IAMVfwCompressDialogs_FWD_DEFINED__ +#define __IAMVfwCompressDialogs_FWD_DEFINED__ +typedef interface IAMVfwCompressDialogs IAMVfwCompressDialogs; +#endif /* __IAMVfwCompressDialogs_FWD_DEFINED__ */ + + +#ifndef __IAMDroppedFrames_FWD_DEFINED__ +#define __IAMDroppedFrames_FWD_DEFINED__ +typedef interface IAMDroppedFrames IAMDroppedFrames; +#endif /* __IAMDroppedFrames_FWD_DEFINED__ */ + + +#ifndef __IAMAudioInputMixer_FWD_DEFINED__ +#define __IAMAudioInputMixer_FWD_DEFINED__ +typedef interface IAMAudioInputMixer IAMAudioInputMixer; +#endif /* __IAMAudioInputMixer_FWD_DEFINED__ */ + + +#ifndef __IAMBufferNegotiation_FWD_DEFINED__ +#define __IAMBufferNegotiation_FWD_DEFINED__ +typedef interface IAMBufferNegotiation IAMBufferNegotiation; +#endif /* __IAMBufferNegotiation_FWD_DEFINED__ */ + + +#ifndef __IAMAnalogVideoDecoder_FWD_DEFINED__ +#define __IAMAnalogVideoDecoder_FWD_DEFINED__ +typedef interface IAMAnalogVideoDecoder IAMAnalogVideoDecoder; +#endif /* __IAMAnalogVideoDecoder_FWD_DEFINED__ */ + + +#ifndef __IAMVideoProcAmp_FWD_DEFINED__ +#define __IAMVideoProcAmp_FWD_DEFINED__ +typedef interface IAMVideoProcAmp IAMVideoProcAmp; +#endif /* __IAMVideoProcAmp_FWD_DEFINED__ */ + + +#ifndef __IAMCameraControl_FWD_DEFINED__ +#define __IAMCameraControl_FWD_DEFINED__ +typedef interface IAMCameraControl IAMCameraControl; +#endif /* __IAMCameraControl_FWD_DEFINED__ */ + + +#ifndef __IAMVideoControl_FWD_DEFINED__ +#define __IAMVideoControl_FWD_DEFINED__ +typedef interface IAMVideoControl IAMVideoControl; +#endif /* __IAMVideoControl_FWD_DEFINED__ */ + + +#ifndef __IAMCrossbar_FWD_DEFINED__ +#define __IAMCrossbar_FWD_DEFINED__ +typedef interface IAMCrossbar IAMCrossbar; +#endif /* __IAMCrossbar_FWD_DEFINED__ */ + + +#ifndef __IAMTuner_FWD_DEFINED__ +#define __IAMTuner_FWD_DEFINED__ +typedef interface IAMTuner IAMTuner; +#endif /* __IAMTuner_FWD_DEFINED__ */ + + +#ifndef __IAMTunerNotification_FWD_DEFINED__ +#define __IAMTunerNotification_FWD_DEFINED__ +typedef interface IAMTunerNotification IAMTunerNotification; +#endif /* __IAMTunerNotification_FWD_DEFINED__ */ + + +#ifndef __IAMTVTuner_FWD_DEFINED__ +#define __IAMTVTuner_FWD_DEFINED__ +typedef interface IAMTVTuner IAMTVTuner; +#endif /* __IAMTVTuner_FWD_DEFINED__ */ + + +#ifndef __IBPCSatelliteTuner_FWD_DEFINED__ +#define __IBPCSatelliteTuner_FWD_DEFINED__ +typedef interface IBPCSatelliteTuner IBPCSatelliteTuner; +#endif /* __IBPCSatelliteTuner_FWD_DEFINED__ */ + + +#ifndef __IAMTVAudio_FWD_DEFINED__ +#define __IAMTVAudio_FWD_DEFINED__ +typedef interface IAMTVAudio IAMTVAudio; +#endif /* __IAMTVAudio_FWD_DEFINED__ */ + + +#ifndef __IAMTVAudioNotification_FWD_DEFINED__ +#define __IAMTVAudioNotification_FWD_DEFINED__ +typedef interface IAMTVAudioNotification IAMTVAudioNotification; +#endif /* __IAMTVAudioNotification_FWD_DEFINED__ */ + + +#ifndef __IAMAnalogVideoEncoder_FWD_DEFINED__ +#define __IAMAnalogVideoEncoder_FWD_DEFINED__ +typedef interface IAMAnalogVideoEncoder IAMAnalogVideoEncoder; +#endif /* __IAMAnalogVideoEncoder_FWD_DEFINED__ */ + + +#ifndef __IKsPropertySet_FWD_DEFINED__ +#define __IKsPropertySet_FWD_DEFINED__ +typedef interface IKsPropertySet IKsPropertySet; +#endif /* __IKsPropertySet_FWD_DEFINED__ */ + + +#ifndef __IMediaPropertyBag_FWD_DEFINED__ +#define __IMediaPropertyBag_FWD_DEFINED__ +typedef interface IMediaPropertyBag IMediaPropertyBag; +#endif /* __IMediaPropertyBag_FWD_DEFINED__ */ + + +#ifndef __IPersistMediaPropertyBag_FWD_DEFINED__ +#define __IPersistMediaPropertyBag_FWD_DEFINED__ +typedef interface IPersistMediaPropertyBag IPersistMediaPropertyBag; +#endif /* __IPersistMediaPropertyBag_FWD_DEFINED__ */ + + +#ifndef __IAMPhysicalPinInfo_FWD_DEFINED__ +#define __IAMPhysicalPinInfo_FWD_DEFINED__ +typedef interface IAMPhysicalPinInfo IAMPhysicalPinInfo; +#endif /* __IAMPhysicalPinInfo_FWD_DEFINED__ */ + + +#ifndef __IAMExtDevice_FWD_DEFINED__ +#define __IAMExtDevice_FWD_DEFINED__ +typedef interface IAMExtDevice IAMExtDevice; +#endif /* __IAMExtDevice_FWD_DEFINED__ */ + + +#ifndef __IAMExtTransport_FWD_DEFINED__ +#define __IAMExtTransport_FWD_DEFINED__ +typedef interface IAMExtTransport IAMExtTransport; +#endif /* __IAMExtTransport_FWD_DEFINED__ */ + + +#ifndef __IAMTimecodeReader_FWD_DEFINED__ +#define __IAMTimecodeReader_FWD_DEFINED__ +typedef interface IAMTimecodeReader IAMTimecodeReader; +#endif /* __IAMTimecodeReader_FWD_DEFINED__ */ + + +#ifndef __IAMTimecodeGenerator_FWD_DEFINED__ +#define __IAMTimecodeGenerator_FWD_DEFINED__ +typedef interface IAMTimecodeGenerator IAMTimecodeGenerator; +#endif /* __IAMTimecodeGenerator_FWD_DEFINED__ */ + + +#ifndef __IAMTimecodeDisplay_FWD_DEFINED__ +#define __IAMTimecodeDisplay_FWD_DEFINED__ +typedef interface IAMTimecodeDisplay IAMTimecodeDisplay; +#endif /* __IAMTimecodeDisplay_FWD_DEFINED__ */ + + +#ifndef __IAMDevMemoryAllocator_FWD_DEFINED__ +#define __IAMDevMemoryAllocator_FWD_DEFINED__ +typedef interface IAMDevMemoryAllocator IAMDevMemoryAllocator; +#endif /* __IAMDevMemoryAllocator_FWD_DEFINED__ */ + + +#ifndef __IAMDevMemoryControl_FWD_DEFINED__ +#define __IAMDevMemoryControl_FWD_DEFINED__ +typedef interface IAMDevMemoryControl IAMDevMemoryControl; +#endif /* __IAMDevMemoryControl_FWD_DEFINED__ */ + + +#ifndef __IAMStreamSelect_FWD_DEFINED__ +#define __IAMStreamSelect_FWD_DEFINED__ +typedef interface IAMStreamSelect IAMStreamSelect; +#endif /* __IAMStreamSelect_FWD_DEFINED__ */ + + +#ifndef __IAMResourceControl_FWD_DEFINED__ +#define __IAMResourceControl_FWD_DEFINED__ +typedef interface IAMResourceControl IAMResourceControl; +#endif /* __IAMResourceControl_FWD_DEFINED__ */ + + +#ifndef __IAMClockAdjust_FWD_DEFINED__ +#define __IAMClockAdjust_FWD_DEFINED__ +typedef interface IAMClockAdjust IAMClockAdjust; +#endif /* __IAMClockAdjust_FWD_DEFINED__ */ + + +#ifndef __IAMFilterMiscFlags_FWD_DEFINED__ +#define __IAMFilterMiscFlags_FWD_DEFINED__ +typedef interface IAMFilterMiscFlags IAMFilterMiscFlags; +#endif /* __IAMFilterMiscFlags_FWD_DEFINED__ */ + + +#ifndef __IDrawVideoImage_FWD_DEFINED__ +#define __IDrawVideoImage_FWD_DEFINED__ +typedef interface IDrawVideoImage IDrawVideoImage; +#endif /* __IDrawVideoImage_FWD_DEFINED__ */ + + +#ifndef __IDecimateVideoImage_FWD_DEFINED__ +#define __IDecimateVideoImage_FWD_DEFINED__ +typedef interface IDecimateVideoImage IDecimateVideoImage; +#endif /* __IDecimateVideoImage_FWD_DEFINED__ */ + + +#ifndef __IAMVideoDecimationProperties_FWD_DEFINED__ +#define __IAMVideoDecimationProperties_FWD_DEFINED__ +typedef interface IAMVideoDecimationProperties IAMVideoDecimationProperties; +#endif /* __IAMVideoDecimationProperties_FWD_DEFINED__ */ + + +#ifndef __IVideoFrameStep_FWD_DEFINED__ +#define __IVideoFrameStep_FWD_DEFINED__ +typedef interface IVideoFrameStep IVideoFrameStep; +#endif /* __IVideoFrameStep_FWD_DEFINED__ */ + + +#ifndef __IAMLatency_FWD_DEFINED__ +#define __IAMLatency_FWD_DEFINED__ +typedef interface IAMLatency IAMLatency; +#endif /* __IAMLatency_FWD_DEFINED__ */ + + +#ifndef __IAMPushSource_FWD_DEFINED__ +#define __IAMPushSource_FWD_DEFINED__ +typedef interface IAMPushSource IAMPushSource; +#endif /* __IAMPushSource_FWD_DEFINED__ */ + + +#ifndef __IAMDeviceRemoval_FWD_DEFINED__ +#define __IAMDeviceRemoval_FWD_DEFINED__ +typedef interface IAMDeviceRemoval IAMDeviceRemoval; +#endif /* __IAMDeviceRemoval_FWD_DEFINED__ */ + + +#ifndef __IDVEnc_FWD_DEFINED__ +#define __IDVEnc_FWD_DEFINED__ +typedef interface IDVEnc IDVEnc; +#endif /* __IDVEnc_FWD_DEFINED__ */ + + +#ifndef __IIPDVDec_FWD_DEFINED__ +#define __IIPDVDec_FWD_DEFINED__ +typedef interface IIPDVDec IIPDVDec; +#endif /* __IIPDVDec_FWD_DEFINED__ */ + + +#ifndef __IDVSplitter_FWD_DEFINED__ +#define __IDVSplitter_FWD_DEFINED__ +typedef interface IDVSplitter IDVSplitter; +#endif /* __IDVSplitter_FWD_DEFINED__ */ + + +#ifndef __IAMAudioRendererStats_FWD_DEFINED__ +#define __IAMAudioRendererStats_FWD_DEFINED__ +typedef interface IAMAudioRendererStats IAMAudioRendererStats; +#endif /* __IAMAudioRendererStats_FWD_DEFINED__ */ + + +#ifndef __IAMGraphStreams_FWD_DEFINED__ +#define __IAMGraphStreams_FWD_DEFINED__ +typedef interface IAMGraphStreams IAMGraphStreams; +#endif /* __IAMGraphStreams_FWD_DEFINED__ */ + + +#ifndef __IAMOverlayFX_FWD_DEFINED__ +#define __IAMOverlayFX_FWD_DEFINED__ +typedef interface IAMOverlayFX IAMOverlayFX; +#endif /* __IAMOverlayFX_FWD_DEFINED__ */ + + +#ifndef __IAMOpenProgress_FWD_DEFINED__ +#define __IAMOpenProgress_FWD_DEFINED__ +typedef interface IAMOpenProgress IAMOpenProgress; +#endif /* __IAMOpenProgress_FWD_DEFINED__ */ + + +#ifndef __IMpeg2Demultiplexer_FWD_DEFINED__ +#define __IMpeg2Demultiplexer_FWD_DEFINED__ +typedef interface IMpeg2Demultiplexer IMpeg2Demultiplexer; +#endif /* __IMpeg2Demultiplexer_FWD_DEFINED__ */ + + +#ifndef __IEnumStreamIdMap_FWD_DEFINED__ +#define __IEnumStreamIdMap_FWD_DEFINED__ +typedef interface IEnumStreamIdMap IEnumStreamIdMap; +#endif /* __IEnumStreamIdMap_FWD_DEFINED__ */ + + +#ifndef __IMPEG2StreamIdMap_FWD_DEFINED__ +#define __IMPEG2StreamIdMap_FWD_DEFINED__ +typedef interface IMPEG2StreamIdMap IMPEG2StreamIdMap; +#endif /* __IMPEG2StreamIdMap_FWD_DEFINED__ */ + + +#ifndef __IAMovie_FWD_DEFINED__ +#define __IAMovie_FWD_DEFINED__ +typedef interface IAMovie IAMovie; +#endif /* __IAMovie_FWD_DEFINED__ */ + + +#ifndef __IDvdControl_FWD_DEFINED__ +#define __IDvdControl_FWD_DEFINED__ +typedef interface IDvdControl IDvdControl; +#endif /* __IDvdControl_FWD_DEFINED__ */ + + +#ifndef __IDvdInfo_FWD_DEFINED__ +#define __IDvdInfo_FWD_DEFINED__ +typedef interface IDvdInfo IDvdInfo; +#endif /* __IDvdInfo_FWD_DEFINED__ */ + + +#ifndef __IDvdCmd_FWD_DEFINED__ +#define __IDvdCmd_FWD_DEFINED__ +typedef interface IDvdCmd IDvdCmd; +#endif /* __IDvdCmd_FWD_DEFINED__ */ + + +#ifndef __IDvdState_FWD_DEFINED__ +#define __IDvdState_FWD_DEFINED__ +typedef interface IDvdState IDvdState; +#endif /* __IDvdState_FWD_DEFINED__ */ + + +#ifndef __IDvdControl2_FWD_DEFINED__ +#define __IDvdControl2_FWD_DEFINED__ +typedef interface IDvdControl2 IDvdControl2; +#endif /* __IDvdControl2_FWD_DEFINED__ */ + + +#ifndef __IDvdInfo2_FWD_DEFINED__ +#define __IDvdInfo2_FWD_DEFINED__ +typedef interface IDvdInfo2 IDvdInfo2; +#endif /* __IDvdInfo2_FWD_DEFINED__ */ + + +#ifndef __IDvdGraphBuilder_FWD_DEFINED__ +#define __IDvdGraphBuilder_FWD_DEFINED__ +typedef interface IDvdGraphBuilder IDvdGraphBuilder; +#endif /* __IDvdGraphBuilder_FWD_DEFINED__ */ + + +#ifndef __IDDrawExclModeVideo_FWD_DEFINED__ +#define __IDDrawExclModeVideo_FWD_DEFINED__ +typedef interface IDDrawExclModeVideo IDDrawExclModeVideo; +#endif /* __IDDrawExclModeVideo_FWD_DEFINED__ */ + + +#ifndef __IDDrawExclModeVideoCallback_FWD_DEFINED__ +#define __IDDrawExclModeVideoCallback_FWD_DEFINED__ +typedef interface IDDrawExclModeVideoCallback IDDrawExclModeVideoCallback; +#endif /* __IDDrawExclModeVideoCallback_FWD_DEFINED__ */ + + +#ifndef __IPinConnection_FWD_DEFINED__ +#define __IPinConnection_FWD_DEFINED__ +typedef interface IPinConnection IPinConnection; +#endif /* __IPinConnection_FWD_DEFINED__ */ + + +#ifndef __IPinFlowControl_FWD_DEFINED__ +#define __IPinFlowControl_FWD_DEFINED__ +typedef interface IPinFlowControl IPinFlowControl; +#endif /* __IPinFlowControl_FWD_DEFINED__ */ + + +#ifndef __IGraphConfig_FWD_DEFINED__ +#define __IGraphConfig_FWD_DEFINED__ +typedef interface IGraphConfig IGraphConfig; +#endif /* __IGraphConfig_FWD_DEFINED__ */ + + +#ifndef __IGraphConfigCallback_FWD_DEFINED__ +#define __IGraphConfigCallback_FWD_DEFINED__ +typedef interface IGraphConfigCallback IGraphConfigCallback; +#endif /* __IGraphConfigCallback_FWD_DEFINED__ */ + + +#ifndef __IFilterChain_FWD_DEFINED__ +#define __IFilterChain_FWD_DEFINED__ +typedef interface IFilterChain IFilterChain; +#endif /* __IFilterChain_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "unknwn.h" +#include "objidl.h" +#include "oaidl.h" +#include "ocidl.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_strmif_0000 */ +/* [local] */ + +#define CDEF_CLASS_DEFAULT 0x0001 +#define CDEF_BYPASS_CLASS_MANAGER 0x0002 +#define CDEF_MERIT_ABOVE_DO_NOT_USE 0x0008 + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0000_v0_0_s_ifspec; + +#ifndef __ICreateDevEnum_INTERFACE_DEFINED__ +#define __ICreateDevEnum_INTERFACE_DEFINED__ + +/* interface ICreateDevEnum */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_ICreateDevEnum; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("29840822-5B84-11D0-BD3B-00A0C911CE86") + ICreateDevEnum : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE CreateClassEnumerator( + /* [in] */ REFCLSID clsidDeviceClass, + /* [out] */ IEnumMoniker **ppEnumMoniker, + /* [in] */ DWORD dwFlags) = 0; + + }; + +#else /* C style interface */ + + typedef struct ICreateDevEnumVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ICreateDevEnum * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ICreateDevEnum * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ICreateDevEnum * This); + + HRESULT ( STDMETHODCALLTYPE *CreateClassEnumerator )( + ICreateDevEnum * This, + /* [in] */ REFCLSID clsidDeviceClass, + /* [out] */ IEnumMoniker **ppEnumMoniker, + /* [in] */ DWORD dwFlags); + + END_INTERFACE + } ICreateDevEnumVtbl; + + interface ICreateDevEnum + { + CONST_VTBL struct ICreateDevEnumVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ICreateDevEnum_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ICreateDevEnum_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ICreateDevEnum_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ICreateDevEnum_CreateClassEnumerator(This,clsidDeviceClass,ppEnumMoniker,dwFlags) \ + (This)->lpVtbl -> CreateClassEnumerator(This,clsidDeviceClass,ppEnumMoniker,dwFlags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ICreateDevEnum_CreateClassEnumerator_Proxy( + ICreateDevEnum * This, + /* [in] */ REFCLSID clsidDeviceClass, + /* [out] */ IEnumMoniker **ppEnumMoniker, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB ICreateDevEnum_CreateClassEnumerator_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ICreateDevEnum_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0108 */ +/* [local] */ + +#define CHARS_IN_GUID 39 +typedef struct _AMMediaType + { + GUID majortype; + GUID subtype; + BOOL bFixedSizeSamples; + BOOL bTemporalCompression; + ULONG lSampleSize; + GUID formattype; + IUnknown *pUnk; + ULONG cbFormat; + /* [size_is] */ BYTE *pbFormat; + } AM_MEDIA_TYPE; + +typedef +enum _PinDirection + { PINDIR_INPUT = 0, + PINDIR_OUTPUT = PINDIR_INPUT + 1 + } PIN_DIRECTION; + +#define MAX_PIN_NAME 128 +#define MAX_FILTER_NAME 128 +typedef LONGLONG REFERENCE_TIME; + +typedef double REFTIME; + +typedef DWORD_PTR HSEMAPHORE; + +typedef DWORD_PTR HEVENT; + +typedef struct _AllocatorProperties + { + long cBuffers; + long cbBuffer; + long cbAlign; + long cbPrefix; + } ALLOCATOR_PROPERTIES; + + + + + + + + + + + + + + + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0108_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0108_v0_0_s_ifspec; + +#ifndef __IPin_INTERFACE_DEFINED__ +#define __IPin_INTERFACE_DEFINED__ + +/* interface IPin */ +/* [unique][uuid][object] */ + +typedef struct _PinInfo + { + IBaseFilter *pFilter; + PIN_DIRECTION dir; + WCHAR achName[ 128 ]; + } PIN_INFO; + + +EXTERN_C const IID IID_IPin; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a86891-0ad4-11ce-b03a-0020af0ba770") + IPin : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Connect( + /* [in] */ IPin *pReceivePin, + /* [in] */ const AM_MEDIA_TYPE *pmt) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReceiveConnection( + /* [in] */ IPin *pConnector, + /* [in] */ const AM_MEDIA_TYPE *pmt) = 0; + + virtual HRESULT STDMETHODCALLTYPE Disconnect( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE ConnectedTo( + /* [out] */ IPin **pPin) = 0; + + virtual HRESULT STDMETHODCALLTYPE ConnectionMediaType( + /* [out] */ AM_MEDIA_TYPE *pmt) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryPinInfo( + /* [out] */ PIN_INFO *pInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryDirection( + /* [out] */ PIN_DIRECTION *pPinDir) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryId( + /* [out] */ LPWSTR *Id) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryAccept( + /* [in] */ const AM_MEDIA_TYPE *pmt) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumMediaTypes( + /* [out] */ IEnumMediaTypes **ppEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryInternalConnections( + /* [out] */ IPin **apPin, + /* [out][in] */ ULONG *nPin) = 0; + + virtual HRESULT STDMETHODCALLTYPE EndOfStream( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE BeginFlush( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE EndFlush( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE NewSegment( + /* [in] */ REFERENCE_TIME tStart, + /* [in] */ REFERENCE_TIME tStop, + /* [in] */ double dRate) = 0; + + }; + +#else /* C style interface */ + + typedef struct IPinVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IPin * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IPin * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IPin * This); + + HRESULT ( STDMETHODCALLTYPE *Connect )( + IPin * This, + /* [in] */ IPin *pReceivePin, + /* [in] */ const AM_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *ReceiveConnection )( + IPin * This, + /* [in] */ IPin *pConnector, + /* [in] */ const AM_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *Disconnect )( + IPin * This); + + HRESULT ( STDMETHODCALLTYPE *ConnectedTo )( + IPin * This, + /* [out] */ IPin **pPin); + + HRESULT ( STDMETHODCALLTYPE *ConnectionMediaType )( + IPin * This, + /* [out] */ AM_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *QueryPinInfo )( + IPin * This, + /* [out] */ PIN_INFO *pInfo); + + HRESULT ( STDMETHODCALLTYPE *QueryDirection )( + IPin * This, + /* [out] */ PIN_DIRECTION *pPinDir); + + HRESULT ( STDMETHODCALLTYPE *QueryId )( + IPin * This, + /* [out] */ LPWSTR *Id); + + HRESULT ( STDMETHODCALLTYPE *QueryAccept )( + IPin * This, + /* [in] */ const AM_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *EnumMediaTypes )( + IPin * This, + /* [out] */ IEnumMediaTypes **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *QueryInternalConnections )( + IPin * This, + /* [out] */ IPin **apPin, + /* [out][in] */ ULONG *nPin); + + HRESULT ( STDMETHODCALLTYPE *EndOfStream )( + IPin * This); + + HRESULT ( STDMETHODCALLTYPE *BeginFlush )( + IPin * This); + + HRESULT ( STDMETHODCALLTYPE *EndFlush )( + IPin * This); + + HRESULT ( STDMETHODCALLTYPE *NewSegment )( + IPin * This, + /* [in] */ REFERENCE_TIME tStart, + /* [in] */ REFERENCE_TIME tStop, + /* [in] */ double dRate); + + END_INTERFACE + } IPinVtbl; + + interface IPin + { + CONST_VTBL struct IPinVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IPin_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IPin_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IPin_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IPin_Connect(This,pReceivePin,pmt) \ + (This)->lpVtbl -> Connect(This,pReceivePin,pmt) + +#define IPin_ReceiveConnection(This,pConnector,pmt) \ + (This)->lpVtbl -> ReceiveConnection(This,pConnector,pmt) + +#define IPin_Disconnect(This) \ + (This)->lpVtbl -> Disconnect(This) + +#define IPin_ConnectedTo(This,pPin) \ + (This)->lpVtbl -> ConnectedTo(This,pPin) + +#define IPin_ConnectionMediaType(This,pmt) \ + (This)->lpVtbl -> ConnectionMediaType(This,pmt) + +#define IPin_QueryPinInfo(This,pInfo) \ + (This)->lpVtbl -> QueryPinInfo(This,pInfo) + +#define IPin_QueryDirection(This,pPinDir) \ + (This)->lpVtbl -> QueryDirection(This,pPinDir) + +#define IPin_QueryId(This,Id) \ + (This)->lpVtbl -> QueryId(This,Id) + +#define IPin_QueryAccept(This,pmt) \ + (This)->lpVtbl -> QueryAccept(This,pmt) + +#define IPin_EnumMediaTypes(This,ppEnum) \ + (This)->lpVtbl -> EnumMediaTypes(This,ppEnum) + +#define IPin_QueryInternalConnections(This,apPin,nPin) \ + (This)->lpVtbl -> QueryInternalConnections(This,apPin,nPin) + +#define IPin_EndOfStream(This) \ + (This)->lpVtbl -> EndOfStream(This) + +#define IPin_BeginFlush(This) \ + (This)->lpVtbl -> BeginFlush(This) + +#define IPin_EndFlush(This) \ + (This)->lpVtbl -> EndFlush(This) + +#define IPin_NewSegment(This,tStart,tStop,dRate) \ + (This)->lpVtbl -> NewSegment(This,tStart,tStop,dRate) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IPin_Connect_Proxy( + IPin * This, + /* [in] */ IPin *pReceivePin, + /* [in] */ const AM_MEDIA_TYPE *pmt); + + +void __RPC_STUB IPin_Connect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPin_ReceiveConnection_Proxy( + IPin * This, + /* [in] */ IPin *pConnector, + /* [in] */ const AM_MEDIA_TYPE *pmt); + + +void __RPC_STUB IPin_ReceiveConnection_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPin_Disconnect_Proxy( + IPin * This); + + +void __RPC_STUB IPin_Disconnect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPin_ConnectedTo_Proxy( + IPin * This, + /* [out] */ IPin **pPin); + + +void __RPC_STUB IPin_ConnectedTo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPin_ConnectionMediaType_Proxy( + IPin * This, + /* [out] */ AM_MEDIA_TYPE *pmt); + + +void __RPC_STUB IPin_ConnectionMediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPin_QueryPinInfo_Proxy( + IPin * This, + /* [out] */ PIN_INFO *pInfo); + + +void __RPC_STUB IPin_QueryPinInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPin_QueryDirection_Proxy( + IPin * This, + /* [out] */ PIN_DIRECTION *pPinDir); + + +void __RPC_STUB IPin_QueryDirection_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPin_QueryId_Proxy( + IPin * This, + /* [out] */ LPWSTR *Id); + + +void __RPC_STUB IPin_QueryId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPin_QueryAccept_Proxy( + IPin * This, + /* [in] */ const AM_MEDIA_TYPE *pmt); + + +void __RPC_STUB IPin_QueryAccept_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPin_EnumMediaTypes_Proxy( + IPin * This, + /* [out] */ IEnumMediaTypes **ppEnum); + + +void __RPC_STUB IPin_EnumMediaTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPin_QueryInternalConnections_Proxy( + IPin * This, + /* [out] */ IPin **apPin, + /* [out][in] */ ULONG *nPin); + + +void __RPC_STUB IPin_QueryInternalConnections_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPin_EndOfStream_Proxy( + IPin * This); + + +void __RPC_STUB IPin_EndOfStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPin_BeginFlush_Proxy( + IPin * This); + + +void __RPC_STUB IPin_BeginFlush_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPin_EndFlush_Proxy( + IPin * This); + + +void __RPC_STUB IPin_EndFlush_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPin_NewSegment_Proxy( + IPin * This, + /* [in] */ REFERENCE_TIME tStart, + /* [in] */ REFERENCE_TIME tStop, + /* [in] */ double dRate); + + +void __RPC_STUB IPin_NewSegment_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IPin_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0109 */ +/* [local] */ + +typedef IPin *PPIN; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0109_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0109_v0_0_s_ifspec; + +#ifndef __IEnumPins_INTERFACE_DEFINED__ +#define __IEnumPins_INTERFACE_DEFINED__ + +/* interface IEnumPins */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IEnumPins; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a86892-0ad4-11ce-b03a-0020af0ba770") + IEnumPins : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG cPins, + /* [size_is][out] */ IPin **ppPins, + /* [out] */ ULONG *pcFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG cPins) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IEnumPins **ppEnum) = 0; + + }; + +#else /* C style interface */ + + typedef struct IEnumPinsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IEnumPins * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IEnumPins * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IEnumPins * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IEnumPins * This, + /* [in] */ ULONG cPins, + /* [size_is][out] */ IPin **ppPins, + /* [out] */ ULONG *pcFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IEnumPins * This, + /* [in] */ ULONG cPins); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IEnumPins * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IEnumPins * This, + /* [out] */ IEnumPins **ppEnum); + + END_INTERFACE + } IEnumPinsVtbl; + + interface IEnumPins + { + CONST_VTBL struct IEnumPinsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IEnumPins_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IEnumPins_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IEnumPins_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IEnumPins_Next(This,cPins,ppPins,pcFetched) \ + (This)->lpVtbl -> Next(This,cPins,ppPins,pcFetched) + +#define IEnumPins_Skip(This,cPins) \ + (This)->lpVtbl -> Skip(This,cPins) + +#define IEnumPins_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IEnumPins_Clone(This,ppEnum) \ + (This)->lpVtbl -> Clone(This,ppEnum) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IEnumPins_Next_Proxy( + IEnumPins * This, + /* [in] */ ULONG cPins, + /* [size_is][out] */ IPin **ppPins, + /* [out] */ ULONG *pcFetched); + + +void __RPC_STUB IEnumPins_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumPins_Skip_Proxy( + IEnumPins * This, + /* [in] */ ULONG cPins); + + +void __RPC_STUB IEnumPins_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumPins_Reset_Proxy( + IEnumPins * This); + + +void __RPC_STUB IEnumPins_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumPins_Clone_Proxy( + IEnumPins * This, + /* [out] */ IEnumPins **ppEnum); + + +void __RPC_STUB IEnumPins_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IEnumPins_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0110 */ +/* [local] */ + +typedef IEnumPins *PENUMPINS; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0110_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0110_v0_0_s_ifspec; + +#ifndef __IEnumMediaTypes_INTERFACE_DEFINED__ +#define __IEnumMediaTypes_INTERFACE_DEFINED__ + +/* interface IEnumMediaTypes */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IEnumMediaTypes; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("89c31040-846b-11ce-97d3-00aa0055595a") + IEnumMediaTypes : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG cMediaTypes, + /* [size_is][out] */ AM_MEDIA_TYPE **ppMediaTypes, + /* [out] */ ULONG *pcFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG cMediaTypes) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IEnumMediaTypes **ppEnum) = 0; + + }; + +#else /* C style interface */ + + typedef struct IEnumMediaTypesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IEnumMediaTypes * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IEnumMediaTypes * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IEnumMediaTypes * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IEnumMediaTypes * This, + /* [in] */ ULONG cMediaTypes, + /* [size_is][out] */ AM_MEDIA_TYPE **ppMediaTypes, + /* [out] */ ULONG *pcFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IEnumMediaTypes * This, + /* [in] */ ULONG cMediaTypes); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IEnumMediaTypes * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IEnumMediaTypes * This, + /* [out] */ IEnumMediaTypes **ppEnum); + + END_INTERFACE + } IEnumMediaTypesVtbl; + + interface IEnumMediaTypes + { + CONST_VTBL struct IEnumMediaTypesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IEnumMediaTypes_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IEnumMediaTypes_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IEnumMediaTypes_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IEnumMediaTypes_Next(This,cMediaTypes,ppMediaTypes,pcFetched) \ + (This)->lpVtbl -> Next(This,cMediaTypes,ppMediaTypes,pcFetched) + +#define IEnumMediaTypes_Skip(This,cMediaTypes) \ + (This)->lpVtbl -> Skip(This,cMediaTypes) + +#define IEnumMediaTypes_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IEnumMediaTypes_Clone(This,ppEnum) \ + (This)->lpVtbl -> Clone(This,ppEnum) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IEnumMediaTypes_Next_Proxy( + IEnumMediaTypes * This, + /* [in] */ ULONG cMediaTypes, + /* [size_is][out] */ AM_MEDIA_TYPE **ppMediaTypes, + /* [out] */ ULONG *pcFetched); + + +void __RPC_STUB IEnumMediaTypes_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumMediaTypes_Skip_Proxy( + IEnumMediaTypes * This, + /* [in] */ ULONG cMediaTypes); + + +void __RPC_STUB IEnumMediaTypes_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumMediaTypes_Reset_Proxy( + IEnumMediaTypes * This); + + +void __RPC_STUB IEnumMediaTypes_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumMediaTypes_Clone_Proxy( + IEnumMediaTypes * This, + /* [out] */ IEnumMediaTypes **ppEnum); + + +void __RPC_STUB IEnumMediaTypes_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IEnumMediaTypes_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0111 */ +/* [local] */ + +typedef IEnumMediaTypes *PENUMMEDIATYPES; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0111_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0111_v0_0_s_ifspec; + +#ifndef __IFilterGraph_INTERFACE_DEFINED__ +#define __IFilterGraph_INTERFACE_DEFINED__ + +/* interface IFilterGraph */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IFilterGraph; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a8689f-0ad4-11ce-b03a-0020af0ba770") + IFilterGraph : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE AddFilter( + /* [in] */ IBaseFilter *pFilter, + /* [string][in] */ LPCWSTR pName) = 0; + + virtual HRESULT STDMETHODCALLTYPE RemoveFilter( + /* [in] */ IBaseFilter *pFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumFilters( + /* [out] */ IEnumFilters **ppEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE FindFilterByName( + /* [string][in] */ LPCWSTR pName, + /* [out] */ IBaseFilter **ppFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE ConnectDirect( + /* [in] */ IPin *ppinOut, + /* [in] */ IPin *ppinIn, + /* [unique][in] */ const AM_MEDIA_TYPE *pmt) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reconnect( + /* [in] */ IPin *ppin) = 0; + + virtual HRESULT STDMETHODCALLTYPE Disconnect( + /* [in] */ IPin *ppin) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDefaultSyncSource( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IFilterGraphVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IFilterGraph * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IFilterGraph * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IFilterGraph * This); + + HRESULT ( STDMETHODCALLTYPE *AddFilter )( + IFilterGraph * This, + /* [in] */ IBaseFilter *pFilter, + /* [string][in] */ LPCWSTR pName); + + HRESULT ( STDMETHODCALLTYPE *RemoveFilter )( + IFilterGraph * This, + /* [in] */ IBaseFilter *pFilter); + + HRESULT ( STDMETHODCALLTYPE *EnumFilters )( + IFilterGraph * This, + /* [out] */ IEnumFilters **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *FindFilterByName )( + IFilterGraph * This, + /* [string][in] */ LPCWSTR pName, + /* [out] */ IBaseFilter **ppFilter); + + HRESULT ( STDMETHODCALLTYPE *ConnectDirect )( + IFilterGraph * This, + /* [in] */ IPin *ppinOut, + /* [in] */ IPin *ppinIn, + /* [unique][in] */ const AM_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *Reconnect )( + IFilterGraph * This, + /* [in] */ IPin *ppin); + + HRESULT ( STDMETHODCALLTYPE *Disconnect )( + IFilterGraph * This, + /* [in] */ IPin *ppin); + + HRESULT ( STDMETHODCALLTYPE *SetDefaultSyncSource )( + IFilterGraph * This); + + END_INTERFACE + } IFilterGraphVtbl; + + interface IFilterGraph + { + CONST_VTBL struct IFilterGraphVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IFilterGraph_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IFilterGraph_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IFilterGraph_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IFilterGraph_AddFilter(This,pFilter,pName) \ + (This)->lpVtbl -> AddFilter(This,pFilter,pName) + +#define IFilterGraph_RemoveFilter(This,pFilter) \ + (This)->lpVtbl -> RemoveFilter(This,pFilter) + +#define IFilterGraph_EnumFilters(This,ppEnum) \ + (This)->lpVtbl -> EnumFilters(This,ppEnum) + +#define IFilterGraph_FindFilterByName(This,pName,ppFilter) \ + (This)->lpVtbl -> FindFilterByName(This,pName,ppFilter) + +#define IFilterGraph_ConnectDirect(This,ppinOut,ppinIn,pmt) \ + (This)->lpVtbl -> ConnectDirect(This,ppinOut,ppinIn,pmt) + +#define IFilterGraph_Reconnect(This,ppin) \ + (This)->lpVtbl -> Reconnect(This,ppin) + +#define IFilterGraph_Disconnect(This,ppin) \ + (This)->lpVtbl -> Disconnect(This,ppin) + +#define IFilterGraph_SetDefaultSyncSource(This) \ + (This)->lpVtbl -> SetDefaultSyncSource(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IFilterGraph_AddFilter_Proxy( + IFilterGraph * This, + /* [in] */ IBaseFilter *pFilter, + /* [string][in] */ LPCWSTR pName); + + +void __RPC_STUB IFilterGraph_AddFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterGraph_RemoveFilter_Proxy( + IFilterGraph * This, + /* [in] */ IBaseFilter *pFilter); + + +void __RPC_STUB IFilterGraph_RemoveFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterGraph_EnumFilters_Proxy( + IFilterGraph * This, + /* [out] */ IEnumFilters **ppEnum); + + +void __RPC_STUB IFilterGraph_EnumFilters_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterGraph_FindFilterByName_Proxy( + IFilterGraph * This, + /* [string][in] */ LPCWSTR pName, + /* [out] */ IBaseFilter **ppFilter); + + +void __RPC_STUB IFilterGraph_FindFilterByName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterGraph_ConnectDirect_Proxy( + IFilterGraph * This, + /* [in] */ IPin *ppinOut, + /* [in] */ IPin *ppinIn, + /* [unique][in] */ const AM_MEDIA_TYPE *pmt); + + +void __RPC_STUB IFilterGraph_ConnectDirect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterGraph_Reconnect_Proxy( + IFilterGraph * This, + /* [in] */ IPin *ppin); + + +void __RPC_STUB IFilterGraph_Reconnect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterGraph_Disconnect_Proxy( + IFilterGraph * This, + /* [in] */ IPin *ppin); + + +void __RPC_STUB IFilterGraph_Disconnect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterGraph_SetDefaultSyncSource_Proxy( + IFilterGraph * This); + + +void __RPC_STUB IFilterGraph_SetDefaultSyncSource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IFilterGraph_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0112 */ +/* [local] */ + +typedef IFilterGraph *PFILTERGRAPH; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0112_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0112_v0_0_s_ifspec; + +#ifndef __IEnumFilters_INTERFACE_DEFINED__ +#define __IEnumFilters_INTERFACE_DEFINED__ + +/* interface IEnumFilters */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IEnumFilters; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a86893-0ad4-11ce-b03a-0020af0ba770") + IEnumFilters : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG cFilters, + /* [out] */ IBaseFilter **ppFilter, + /* [out] */ ULONG *pcFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG cFilters) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IEnumFilters **ppEnum) = 0; + + }; + +#else /* C style interface */ + + typedef struct IEnumFiltersVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IEnumFilters * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IEnumFilters * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IEnumFilters * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IEnumFilters * This, + /* [in] */ ULONG cFilters, + /* [out] */ IBaseFilter **ppFilter, + /* [out] */ ULONG *pcFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IEnumFilters * This, + /* [in] */ ULONG cFilters); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IEnumFilters * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IEnumFilters * This, + /* [out] */ IEnumFilters **ppEnum); + + END_INTERFACE + } IEnumFiltersVtbl; + + interface IEnumFilters + { + CONST_VTBL struct IEnumFiltersVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IEnumFilters_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IEnumFilters_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IEnumFilters_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IEnumFilters_Next(This,cFilters,ppFilter,pcFetched) \ + (This)->lpVtbl -> Next(This,cFilters,ppFilter,pcFetched) + +#define IEnumFilters_Skip(This,cFilters) \ + (This)->lpVtbl -> Skip(This,cFilters) + +#define IEnumFilters_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IEnumFilters_Clone(This,ppEnum) \ + (This)->lpVtbl -> Clone(This,ppEnum) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IEnumFilters_Next_Proxy( + IEnumFilters * This, + /* [in] */ ULONG cFilters, + /* [out] */ IBaseFilter **ppFilter, + /* [out] */ ULONG *pcFetched); + + +void __RPC_STUB IEnumFilters_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumFilters_Skip_Proxy( + IEnumFilters * This, + /* [in] */ ULONG cFilters); + + +void __RPC_STUB IEnumFilters_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumFilters_Reset_Proxy( + IEnumFilters * This); + + +void __RPC_STUB IEnumFilters_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumFilters_Clone_Proxy( + IEnumFilters * This, + /* [out] */ IEnumFilters **ppEnum); + + +void __RPC_STUB IEnumFilters_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IEnumFilters_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0113 */ +/* [local] */ + +typedef IEnumFilters *PENUMFILTERS; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0113_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0113_v0_0_s_ifspec; + +#ifndef __IMediaFilter_INTERFACE_DEFINED__ +#define __IMediaFilter_INTERFACE_DEFINED__ + +/* interface IMediaFilter */ +/* [unique][uuid][object] */ + +typedef +enum _FilterState + { State_Stopped = 0, + State_Paused = State_Stopped + 1, + State_Running = State_Paused + 1 + } FILTER_STATE; + + +EXTERN_C const IID IID_IMediaFilter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a86899-0ad4-11ce-b03a-0020af0ba770") + IMediaFilter : public IPersist + { + public: + virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Pause( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Run( + REFERENCE_TIME tStart) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetState( + /* [in] */ DWORD dwMilliSecsTimeout, + /* [out] */ FILTER_STATE *State) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSyncSource( + /* [in] */ IReferenceClock *pClock) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSyncSource( + /* [out] */ IReferenceClock **pClock) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaFilterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaFilter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaFilter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaFilter * This); + + HRESULT ( STDMETHODCALLTYPE *GetClassID )( + IMediaFilter * This, + /* [out] */ CLSID *pClassID); + + HRESULT ( STDMETHODCALLTYPE *Stop )( + IMediaFilter * This); + + HRESULT ( STDMETHODCALLTYPE *Pause )( + IMediaFilter * This); + + HRESULT ( STDMETHODCALLTYPE *Run )( + IMediaFilter * This, + REFERENCE_TIME tStart); + + HRESULT ( STDMETHODCALLTYPE *GetState )( + IMediaFilter * This, + /* [in] */ DWORD dwMilliSecsTimeout, + /* [out] */ FILTER_STATE *State); + + HRESULT ( STDMETHODCALLTYPE *SetSyncSource )( + IMediaFilter * This, + /* [in] */ IReferenceClock *pClock); + + HRESULT ( STDMETHODCALLTYPE *GetSyncSource )( + IMediaFilter * This, + /* [out] */ IReferenceClock **pClock); + + END_INTERFACE + } IMediaFilterVtbl; + + interface IMediaFilter + { + CONST_VTBL struct IMediaFilterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaFilter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaFilter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaFilter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaFilter_GetClassID(This,pClassID) \ + (This)->lpVtbl -> GetClassID(This,pClassID) + + +#define IMediaFilter_Stop(This) \ + (This)->lpVtbl -> Stop(This) + +#define IMediaFilter_Pause(This) \ + (This)->lpVtbl -> Pause(This) + +#define IMediaFilter_Run(This,tStart) \ + (This)->lpVtbl -> Run(This,tStart) + +#define IMediaFilter_GetState(This,dwMilliSecsTimeout,State) \ + (This)->lpVtbl -> GetState(This,dwMilliSecsTimeout,State) + +#define IMediaFilter_SetSyncSource(This,pClock) \ + (This)->lpVtbl -> SetSyncSource(This,pClock) + +#define IMediaFilter_GetSyncSource(This,pClock) \ + (This)->lpVtbl -> GetSyncSource(This,pClock) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaFilter_Stop_Proxy( + IMediaFilter * This); + + +void __RPC_STUB IMediaFilter_Stop_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaFilter_Pause_Proxy( + IMediaFilter * This); + + +void __RPC_STUB IMediaFilter_Pause_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaFilter_Run_Proxy( + IMediaFilter * This, + REFERENCE_TIME tStart); + + +void __RPC_STUB IMediaFilter_Run_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaFilter_GetState_Proxy( + IMediaFilter * This, + /* [in] */ DWORD dwMilliSecsTimeout, + /* [out] */ FILTER_STATE *State); + + +void __RPC_STUB IMediaFilter_GetState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaFilter_SetSyncSource_Proxy( + IMediaFilter * This, + /* [in] */ IReferenceClock *pClock); + + +void __RPC_STUB IMediaFilter_SetSyncSource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaFilter_GetSyncSource_Proxy( + IMediaFilter * This, + /* [out] */ IReferenceClock **pClock); + + +void __RPC_STUB IMediaFilter_GetSyncSource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaFilter_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0114 */ +/* [local] */ + +typedef IMediaFilter *PMEDIAFILTER; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0114_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0114_v0_0_s_ifspec; + +#ifndef __IBaseFilter_INTERFACE_DEFINED__ +#define __IBaseFilter_INTERFACE_DEFINED__ + +/* interface IBaseFilter */ +/* [unique][uuid][object] */ + +typedef struct _FilterInfo + { + WCHAR achName[ 128 ]; + IFilterGraph *pGraph; + } FILTER_INFO; + + +EXTERN_C const IID IID_IBaseFilter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a86895-0ad4-11ce-b03a-0020af0ba770") + IBaseFilter : public IMediaFilter + { + public: + virtual HRESULT STDMETHODCALLTYPE EnumPins( + /* [out] */ IEnumPins **ppEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE FindPin( + /* [string][in] */ LPCWSTR Id, + /* [out] */ IPin **ppPin) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryFilterInfo( + /* [out] */ FILTER_INFO *pInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE JoinFilterGraph( + /* [in] */ IFilterGraph *pGraph, + /* [string][in] */ LPCWSTR pName) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryVendorInfo( + /* [string][out] */ LPWSTR *pVendorInfo) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBaseFilterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBaseFilter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBaseFilter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBaseFilter * This); + + HRESULT ( STDMETHODCALLTYPE *GetClassID )( + IBaseFilter * This, + /* [out] */ CLSID *pClassID); + + HRESULT ( STDMETHODCALLTYPE *Stop )( + IBaseFilter * This); + + HRESULT ( STDMETHODCALLTYPE *Pause )( + IBaseFilter * This); + + HRESULT ( STDMETHODCALLTYPE *Run )( + IBaseFilter * This, + REFERENCE_TIME tStart); + + HRESULT ( STDMETHODCALLTYPE *GetState )( + IBaseFilter * This, + /* [in] */ DWORD dwMilliSecsTimeout, + /* [out] */ FILTER_STATE *State); + + HRESULT ( STDMETHODCALLTYPE *SetSyncSource )( + IBaseFilter * This, + /* [in] */ IReferenceClock *pClock); + + HRESULT ( STDMETHODCALLTYPE *GetSyncSource )( + IBaseFilter * This, + /* [out] */ IReferenceClock **pClock); + + HRESULT ( STDMETHODCALLTYPE *EnumPins )( + IBaseFilter * This, + /* [out] */ IEnumPins **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *FindPin )( + IBaseFilter * This, + /* [string][in] */ LPCWSTR Id, + /* [out] */ IPin **ppPin); + + HRESULT ( STDMETHODCALLTYPE *QueryFilterInfo )( + IBaseFilter * This, + /* [out] */ FILTER_INFO *pInfo); + + HRESULT ( STDMETHODCALLTYPE *JoinFilterGraph )( + IBaseFilter * This, + /* [in] */ IFilterGraph *pGraph, + /* [string][in] */ LPCWSTR pName); + + HRESULT ( STDMETHODCALLTYPE *QueryVendorInfo )( + IBaseFilter * This, + /* [string][out] */ LPWSTR *pVendorInfo); + + END_INTERFACE + } IBaseFilterVtbl; + + interface IBaseFilter + { + CONST_VTBL struct IBaseFilterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBaseFilter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBaseFilter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBaseFilter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBaseFilter_GetClassID(This,pClassID) \ + (This)->lpVtbl -> GetClassID(This,pClassID) + + +#define IBaseFilter_Stop(This) \ + (This)->lpVtbl -> Stop(This) + +#define IBaseFilter_Pause(This) \ + (This)->lpVtbl -> Pause(This) + +#define IBaseFilter_Run(This,tStart) \ + (This)->lpVtbl -> Run(This,tStart) + +#define IBaseFilter_GetState(This,dwMilliSecsTimeout,State) \ + (This)->lpVtbl -> GetState(This,dwMilliSecsTimeout,State) + +#define IBaseFilter_SetSyncSource(This,pClock) \ + (This)->lpVtbl -> SetSyncSource(This,pClock) + +#define IBaseFilter_GetSyncSource(This,pClock) \ + (This)->lpVtbl -> GetSyncSource(This,pClock) + + +#define IBaseFilter_EnumPins(This,ppEnum) \ + (This)->lpVtbl -> EnumPins(This,ppEnum) + +#define IBaseFilter_FindPin(This,Id,ppPin) \ + (This)->lpVtbl -> FindPin(This,Id,ppPin) + +#define IBaseFilter_QueryFilterInfo(This,pInfo) \ + (This)->lpVtbl -> QueryFilterInfo(This,pInfo) + +#define IBaseFilter_JoinFilterGraph(This,pGraph,pName) \ + (This)->lpVtbl -> JoinFilterGraph(This,pGraph,pName) + +#define IBaseFilter_QueryVendorInfo(This,pVendorInfo) \ + (This)->lpVtbl -> QueryVendorInfo(This,pVendorInfo) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBaseFilter_EnumPins_Proxy( + IBaseFilter * This, + /* [out] */ IEnumPins **ppEnum); + + +void __RPC_STUB IBaseFilter_EnumPins_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBaseFilter_FindPin_Proxy( + IBaseFilter * This, + /* [string][in] */ LPCWSTR Id, + /* [out] */ IPin **ppPin); + + +void __RPC_STUB IBaseFilter_FindPin_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBaseFilter_QueryFilterInfo_Proxy( + IBaseFilter * This, + /* [out] */ FILTER_INFO *pInfo); + + +void __RPC_STUB IBaseFilter_QueryFilterInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBaseFilter_JoinFilterGraph_Proxy( + IBaseFilter * This, + /* [in] */ IFilterGraph *pGraph, + /* [string][in] */ LPCWSTR pName); + + +void __RPC_STUB IBaseFilter_JoinFilterGraph_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBaseFilter_QueryVendorInfo_Proxy( + IBaseFilter * This, + /* [string][out] */ LPWSTR *pVendorInfo); + + +void __RPC_STUB IBaseFilter_QueryVendorInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBaseFilter_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0115 */ +/* [local] */ + +typedef IBaseFilter *PFILTER; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0115_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0115_v0_0_s_ifspec; + +#ifndef __IReferenceClock_INTERFACE_DEFINED__ +#define __IReferenceClock_INTERFACE_DEFINED__ + +/* interface IReferenceClock */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IReferenceClock; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a86897-0ad4-11ce-b03a-0020af0ba770") + IReferenceClock : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetTime( + /* [out] */ REFERENCE_TIME *pTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE AdviseTime( + /* [in] */ REFERENCE_TIME baseTime, + /* [in] */ REFERENCE_TIME streamTime, + /* [in] */ HEVENT hEvent, + /* [out] */ DWORD_PTR *pdwAdviseCookie) = 0; + + virtual HRESULT STDMETHODCALLTYPE AdvisePeriodic( + /* [in] */ REFERENCE_TIME startTime, + /* [in] */ REFERENCE_TIME periodTime, + /* [in] */ HSEMAPHORE hSemaphore, + /* [out] */ DWORD_PTR *pdwAdviseCookie) = 0; + + virtual HRESULT STDMETHODCALLTYPE Unadvise( + /* [in] */ DWORD_PTR dwAdviseCookie) = 0; + + }; + +#else /* C style interface */ + + typedef struct IReferenceClockVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IReferenceClock * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IReferenceClock * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IReferenceClock * This); + + HRESULT ( STDMETHODCALLTYPE *GetTime )( + IReferenceClock * This, + /* [out] */ REFERENCE_TIME *pTime); + + HRESULT ( STDMETHODCALLTYPE *AdviseTime )( + IReferenceClock * This, + /* [in] */ REFERENCE_TIME baseTime, + /* [in] */ REFERENCE_TIME streamTime, + /* [in] */ HEVENT hEvent, + /* [out] */ DWORD_PTR *pdwAdviseCookie); + + HRESULT ( STDMETHODCALLTYPE *AdvisePeriodic )( + IReferenceClock * This, + /* [in] */ REFERENCE_TIME startTime, + /* [in] */ REFERENCE_TIME periodTime, + /* [in] */ HSEMAPHORE hSemaphore, + /* [out] */ DWORD_PTR *pdwAdviseCookie); + + HRESULT ( STDMETHODCALLTYPE *Unadvise )( + IReferenceClock * This, + /* [in] */ DWORD_PTR dwAdviseCookie); + + END_INTERFACE + } IReferenceClockVtbl; + + interface IReferenceClock + { + CONST_VTBL struct IReferenceClockVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IReferenceClock_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IReferenceClock_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IReferenceClock_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IReferenceClock_GetTime(This,pTime) \ + (This)->lpVtbl -> GetTime(This,pTime) + +#define IReferenceClock_AdviseTime(This,baseTime,streamTime,hEvent,pdwAdviseCookie) \ + (This)->lpVtbl -> AdviseTime(This,baseTime,streamTime,hEvent,pdwAdviseCookie) + +#define IReferenceClock_AdvisePeriodic(This,startTime,periodTime,hSemaphore,pdwAdviseCookie) \ + (This)->lpVtbl -> AdvisePeriodic(This,startTime,periodTime,hSemaphore,pdwAdviseCookie) + +#define IReferenceClock_Unadvise(This,dwAdviseCookie) \ + (This)->lpVtbl -> Unadvise(This,dwAdviseCookie) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IReferenceClock_GetTime_Proxy( + IReferenceClock * This, + /* [out] */ REFERENCE_TIME *pTime); + + +void __RPC_STUB IReferenceClock_GetTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IReferenceClock_AdviseTime_Proxy( + IReferenceClock * This, + /* [in] */ REFERENCE_TIME baseTime, + /* [in] */ REFERENCE_TIME streamTime, + /* [in] */ HEVENT hEvent, + /* [out] */ DWORD_PTR *pdwAdviseCookie); + + +void __RPC_STUB IReferenceClock_AdviseTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IReferenceClock_AdvisePeriodic_Proxy( + IReferenceClock * This, + /* [in] */ REFERENCE_TIME startTime, + /* [in] */ REFERENCE_TIME periodTime, + /* [in] */ HSEMAPHORE hSemaphore, + /* [out] */ DWORD_PTR *pdwAdviseCookie); + + +void __RPC_STUB IReferenceClock_AdvisePeriodic_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IReferenceClock_Unadvise_Proxy( + IReferenceClock * This, + /* [in] */ DWORD_PTR dwAdviseCookie); + + +void __RPC_STUB IReferenceClock_Unadvise_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IReferenceClock_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0116 */ +/* [local] */ + +typedef IReferenceClock *PREFERENCECLOCK; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0116_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0116_v0_0_s_ifspec; + +#ifndef __IReferenceClock2_INTERFACE_DEFINED__ +#define __IReferenceClock2_INTERFACE_DEFINED__ + +/* interface IReferenceClock2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IReferenceClock2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("36b73885-c2c8-11cf-8b46-00805f6cef60") + IReferenceClock2 : public IReferenceClock + { + public: + }; + +#else /* C style interface */ + + typedef struct IReferenceClock2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IReferenceClock2 * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IReferenceClock2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IReferenceClock2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetTime )( + IReferenceClock2 * This, + /* [out] */ REFERENCE_TIME *pTime); + + HRESULT ( STDMETHODCALLTYPE *AdviseTime )( + IReferenceClock2 * This, + /* [in] */ REFERENCE_TIME baseTime, + /* [in] */ REFERENCE_TIME streamTime, + /* [in] */ HEVENT hEvent, + /* [out] */ DWORD_PTR *pdwAdviseCookie); + + HRESULT ( STDMETHODCALLTYPE *AdvisePeriodic )( + IReferenceClock2 * This, + /* [in] */ REFERENCE_TIME startTime, + /* [in] */ REFERENCE_TIME periodTime, + /* [in] */ HSEMAPHORE hSemaphore, + /* [out] */ DWORD_PTR *pdwAdviseCookie); + + HRESULT ( STDMETHODCALLTYPE *Unadvise )( + IReferenceClock2 * This, + /* [in] */ DWORD_PTR dwAdviseCookie); + + END_INTERFACE + } IReferenceClock2Vtbl; + + interface IReferenceClock2 + { + CONST_VTBL struct IReferenceClock2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IReferenceClock2_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IReferenceClock2_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IReferenceClock2_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IReferenceClock2_GetTime(This,pTime) \ + (This)->lpVtbl -> GetTime(This,pTime) + +#define IReferenceClock2_AdviseTime(This,baseTime,streamTime,hEvent,pdwAdviseCookie) \ + (This)->lpVtbl -> AdviseTime(This,baseTime,streamTime,hEvent,pdwAdviseCookie) + +#define IReferenceClock2_AdvisePeriodic(This,startTime,periodTime,hSemaphore,pdwAdviseCookie) \ + (This)->lpVtbl -> AdvisePeriodic(This,startTime,periodTime,hSemaphore,pdwAdviseCookie) + +#define IReferenceClock2_Unadvise(This,dwAdviseCookie) \ + (This)->lpVtbl -> Unadvise(This,dwAdviseCookie) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IReferenceClock2_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0117 */ +/* [local] */ + +typedef IReferenceClock2 *PREFERENCECLOCK2; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0117_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0117_v0_0_s_ifspec; + +#ifndef __IMediaSample_INTERFACE_DEFINED__ +#define __IMediaSample_INTERFACE_DEFINED__ + +/* interface IMediaSample */ +/* [unique][uuid][object][local] */ + + +EXTERN_C const IID IID_IMediaSample; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a8689a-0ad4-11ce-b03a-0020af0ba770") + IMediaSample : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetPointer( + /* [out] */ BYTE **ppBuffer) = 0; + + virtual long STDMETHODCALLTYPE GetSize( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTime( + /* [out] */ REFERENCE_TIME *pTimeStart, + /* [out] */ REFERENCE_TIME *pTimeEnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTime( + /* [in] */ REFERENCE_TIME *pTimeStart, + /* [in] */ REFERENCE_TIME *pTimeEnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsSyncPoint( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSyncPoint( + BOOL bIsSyncPoint) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsPreroll( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPreroll( + BOOL bIsPreroll) = 0; + + virtual long STDMETHODCALLTYPE GetActualDataLength( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetActualDataLength( + long __MIDL_0010) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMediaType( + AM_MEDIA_TYPE **ppMediaType) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMediaType( + AM_MEDIA_TYPE *pMediaType) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsDiscontinuity( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDiscontinuity( + BOOL bDiscontinuity) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMediaTime( + /* [out] */ LONGLONG *pTimeStart, + /* [out] */ LONGLONG *pTimeEnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMediaTime( + /* [in] */ LONGLONG *pTimeStart, + /* [in] */ LONGLONG *pTimeEnd) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaSampleVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaSample * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaSample * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaSample * This); + + HRESULT ( STDMETHODCALLTYPE *GetPointer )( + IMediaSample * This, + /* [out] */ BYTE **ppBuffer); + + long ( STDMETHODCALLTYPE *GetSize )( + IMediaSample * This); + + HRESULT ( STDMETHODCALLTYPE *GetTime )( + IMediaSample * This, + /* [out] */ REFERENCE_TIME *pTimeStart, + /* [out] */ REFERENCE_TIME *pTimeEnd); + + HRESULT ( STDMETHODCALLTYPE *SetTime )( + IMediaSample * This, + /* [in] */ REFERENCE_TIME *pTimeStart, + /* [in] */ REFERENCE_TIME *pTimeEnd); + + HRESULT ( STDMETHODCALLTYPE *IsSyncPoint )( + IMediaSample * This); + + HRESULT ( STDMETHODCALLTYPE *SetSyncPoint )( + IMediaSample * This, + BOOL bIsSyncPoint); + + HRESULT ( STDMETHODCALLTYPE *IsPreroll )( + IMediaSample * This); + + HRESULT ( STDMETHODCALLTYPE *SetPreroll )( + IMediaSample * This, + BOOL bIsPreroll); + + long ( STDMETHODCALLTYPE *GetActualDataLength )( + IMediaSample * This); + + HRESULT ( STDMETHODCALLTYPE *SetActualDataLength )( + IMediaSample * This, + long __MIDL_0010); + + HRESULT ( STDMETHODCALLTYPE *GetMediaType )( + IMediaSample * This, + AM_MEDIA_TYPE **ppMediaType); + + HRESULT ( STDMETHODCALLTYPE *SetMediaType )( + IMediaSample * This, + AM_MEDIA_TYPE *pMediaType); + + HRESULT ( STDMETHODCALLTYPE *IsDiscontinuity )( + IMediaSample * This); + + HRESULT ( STDMETHODCALLTYPE *SetDiscontinuity )( + IMediaSample * This, + BOOL bDiscontinuity); + + HRESULT ( STDMETHODCALLTYPE *GetMediaTime )( + IMediaSample * This, + /* [out] */ LONGLONG *pTimeStart, + /* [out] */ LONGLONG *pTimeEnd); + + HRESULT ( STDMETHODCALLTYPE *SetMediaTime )( + IMediaSample * This, + /* [in] */ LONGLONG *pTimeStart, + /* [in] */ LONGLONG *pTimeEnd); + + END_INTERFACE + } IMediaSampleVtbl; + + interface IMediaSample + { + CONST_VTBL struct IMediaSampleVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaSample_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaSample_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaSample_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaSample_GetPointer(This,ppBuffer) \ + (This)->lpVtbl -> GetPointer(This,ppBuffer) + +#define IMediaSample_GetSize(This) \ + (This)->lpVtbl -> GetSize(This) + +#define IMediaSample_GetTime(This,pTimeStart,pTimeEnd) \ + (This)->lpVtbl -> GetTime(This,pTimeStart,pTimeEnd) + +#define IMediaSample_SetTime(This,pTimeStart,pTimeEnd) \ + (This)->lpVtbl -> SetTime(This,pTimeStart,pTimeEnd) + +#define IMediaSample_IsSyncPoint(This) \ + (This)->lpVtbl -> IsSyncPoint(This) + +#define IMediaSample_SetSyncPoint(This,bIsSyncPoint) \ + (This)->lpVtbl -> SetSyncPoint(This,bIsSyncPoint) + +#define IMediaSample_IsPreroll(This) \ + (This)->lpVtbl -> IsPreroll(This) + +#define IMediaSample_SetPreroll(This,bIsPreroll) \ + (This)->lpVtbl -> SetPreroll(This,bIsPreroll) + +#define IMediaSample_GetActualDataLength(This) \ + (This)->lpVtbl -> GetActualDataLength(This) + +#define IMediaSample_SetActualDataLength(This,__MIDL_0010) \ + (This)->lpVtbl -> SetActualDataLength(This,__MIDL_0010) + +#define IMediaSample_GetMediaType(This,ppMediaType) \ + (This)->lpVtbl -> GetMediaType(This,ppMediaType) + +#define IMediaSample_SetMediaType(This,pMediaType) \ + (This)->lpVtbl -> SetMediaType(This,pMediaType) + +#define IMediaSample_IsDiscontinuity(This) \ + (This)->lpVtbl -> IsDiscontinuity(This) + +#define IMediaSample_SetDiscontinuity(This,bDiscontinuity) \ + (This)->lpVtbl -> SetDiscontinuity(This,bDiscontinuity) + +#define IMediaSample_GetMediaTime(This,pTimeStart,pTimeEnd) \ + (This)->lpVtbl -> GetMediaTime(This,pTimeStart,pTimeEnd) + +#define IMediaSample_SetMediaTime(This,pTimeStart,pTimeEnd) \ + (This)->lpVtbl -> SetMediaTime(This,pTimeStart,pTimeEnd) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaSample_GetPointer_Proxy( + IMediaSample * This, + /* [out] */ BYTE **ppBuffer); + + +void __RPC_STUB IMediaSample_GetPointer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +long STDMETHODCALLTYPE IMediaSample_GetSize_Proxy( + IMediaSample * This); + + +void __RPC_STUB IMediaSample_GetSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSample_GetTime_Proxy( + IMediaSample * This, + /* [out] */ REFERENCE_TIME *pTimeStart, + /* [out] */ REFERENCE_TIME *pTimeEnd); + + +void __RPC_STUB IMediaSample_GetTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSample_SetTime_Proxy( + IMediaSample * This, + /* [in] */ REFERENCE_TIME *pTimeStart, + /* [in] */ REFERENCE_TIME *pTimeEnd); + + +void __RPC_STUB IMediaSample_SetTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSample_IsSyncPoint_Proxy( + IMediaSample * This); + + +void __RPC_STUB IMediaSample_IsSyncPoint_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSample_SetSyncPoint_Proxy( + IMediaSample * This, + BOOL bIsSyncPoint); + + +void __RPC_STUB IMediaSample_SetSyncPoint_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSample_IsPreroll_Proxy( + IMediaSample * This); + + +void __RPC_STUB IMediaSample_IsPreroll_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSample_SetPreroll_Proxy( + IMediaSample * This, + BOOL bIsPreroll); + + +void __RPC_STUB IMediaSample_SetPreroll_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +long STDMETHODCALLTYPE IMediaSample_GetActualDataLength_Proxy( + IMediaSample * This); + + +void __RPC_STUB IMediaSample_GetActualDataLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSample_SetActualDataLength_Proxy( + IMediaSample * This, + long __MIDL_0010); + + +void __RPC_STUB IMediaSample_SetActualDataLength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSample_GetMediaType_Proxy( + IMediaSample * This, + AM_MEDIA_TYPE **ppMediaType); + + +void __RPC_STUB IMediaSample_GetMediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSample_SetMediaType_Proxy( + IMediaSample * This, + AM_MEDIA_TYPE *pMediaType); + + +void __RPC_STUB IMediaSample_SetMediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSample_IsDiscontinuity_Proxy( + IMediaSample * This); + + +void __RPC_STUB IMediaSample_IsDiscontinuity_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSample_SetDiscontinuity_Proxy( + IMediaSample * This, + BOOL bDiscontinuity); + + +void __RPC_STUB IMediaSample_SetDiscontinuity_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSample_GetMediaTime_Proxy( + IMediaSample * This, + /* [out] */ LONGLONG *pTimeStart, + /* [out] */ LONGLONG *pTimeEnd); + + +void __RPC_STUB IMediaSample_GetMediaTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSample_SetMediaTime_Proxy( + IMediaSample * This, + /* [in] */ LONGLONG *pTimeStart, + /* [in] */ LONGLONG *pTimeEnd); + + +void __RPC_STUB IMediaSample_SetMediaTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaSample_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0118 */ +/* [local] */ + +typedef IMediaSample *PMEDIASAMPLE; + + +enum tagAM_SAMPLE_PROPERTY_FLAGS + { AM_SAMPLE_SPLICEPOINT = 0x1, + AM_SAMPLE_PREROLL = 0x2, + AM_SAMPLE_DATADISCONTINUITY = 0x4, + AM_SAMPLE_TYPECHANGED = 0x8, + AM_SAMPLE_TIMEVALID = 0x10, + AM_SAMPLE_TIMEDISCONTINUITY = 0x40, + AM_SAMPLE_FLUSH_ON_PAUSE = 0x80, + AM_SAMPLE_STOPVALID = 0x100, + AM_SAMPLE_ENDOFSTREAM = 0x200, + AM_STREAM_MEDIA = 0, + AM_STREAM_CONTROL = 1 + } ; +typedef struct tagAM_SAMPLE2_PROPERTIES + { + DWORD cbData; + DWORD dwTypeSpecificFlags; + DWORD dwSampleFlags; + LONG lActual; + REFERENCE_TIME tStart; + REFERENCE_TIME tStop; + DWORD dwStreamId; + AM_MEDIA_TYPE *pMediaType; + BYTE *pbBuffer; + LONG cbBuffer; + } AM_SAMPLE2_PROPERTIES; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0118_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0118_v0_0_s_ifspec; + +#ifndef __IMediaSample2_INTERFACE_DEFINED__ +#define __IMediaSample2_INTERFACE_DEFINED__ + +/* interface IMediaSample2 */ +/* [unique][uuid][object][local] */ + + +EXTERN_C const IID IID_IMediaSample2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("36b73884-c2c8-11cf-8b46-00805f6cef60") + IMediaSample2 : public IMediaSample + { + public: + virtual HRESULT STDMETHODCALLTYPE GetProperties( + /* [in] */ DWORD cbProperties, + /* [size_is][out] */ BYTE *pbProperties) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetProperties( + /* [in] */ DWORD cbProperties, + /* [size_is][in] */ const BYTE *pbProperties) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaSample2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaSample2 * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaSample2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaSample2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetPointer )( + IMediaSample2 * This, + /* [out] */ BYTE **ppBuffer); + + long ( STDMETHODCALLTYPE *GetSize )( + IMediaSample2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetTime )( + IMediaSample2 * This, + /* [out] */ REFERENCE_TIME *pTimeStart, + /* [out] */ REFERENCE_TIME *pTimeEnd); + + HRESULT ( STDMETHODCALLTYPE *SetTime )( + IMediaSample2 * This, + /* [in] */ REFERENCE_TIME *pTimeStart, + /* [in] */ REFERENCE_TIME *pTimeEnd); + + HRESULT ( STDMETHODCALLTYPE *IsSyncPoint )( + IMediaSample2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetSyncPoint )( + IMediaSample2 * This, + BOOL bIsSyncPoint); + + HRESULT ( STDMETHODCALLTYPE *IsPreroll )( + IMediaSample2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetPreroll )( + IMediaSample2 * This, + BOOL bIsPreroll); + + long ( STDMETHODCALLTYPE *GetActualDataLength )( + IMediaSample2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetActualDataLength )( + IMediaSample2 * This, + long __MIDL_0010); + + HRESULT ( STDMETHODCALLTYPE *GetMediaType )( + IMediaSample2 * This, + AM_MEDIA_TYPE **ppMediaType); + + HRESULT ( STDMETHODCALLTYPE *SetMediaType )( + IMediaSample2 * This, + AM_MEDIA_TYPE *pMediaType); + + HRESULT ( STDMETHODCALLTYPE *IsDiscontinuity )( + IMediaSample2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetDiscontinuity )( + IMediaSample2 * This, + BOOL bDiscontinuity); + + HRESULT ( STDMETHODCALLTYPE *GetMediaTime )( + IMediaSample2 * This, + /* [out] */ LONGLONG *pTimeStart, + /* [out] */ LONGLONG *pTimeEnd); + + HRESULT ( STDMETHODCALLTYPE *SetMediaTime )( + IMediaSample2 * This, + /* [in] */ LONGLONG *pTimeStart, + /* [in] */ LONGLONG *pTimeEnd); + + HRESULT ( STDMETHODCALLTYPE *GetProperties )( + IMediaSample2 * This, + /* [in] */ DWORD cbProperties, + /* [size_is][out] */ BYTE *pbProperties); + + HRESULT ( STDMETHODCALLTYPE *SetProperties )( + IMediaSample2 * This, + /* [in] */ DWORD cbProperties, + /* [size_is][in] */ const BYTE *pbProperties); + + END_INTERFACE + } IMediaSample2Vtbl; + + interface IMediaSample2 + { + CONST_VTBL struct IMediaSample2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaSample2_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaSample2_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaSample2_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaSample2_GetPointer(This,ppBuffer) \ + (This)->lpVtbl -> GetPointer(This,ppBuffer) + +#define IMediaSample2_GetSize(This) \ + (This)->lpVtbl -> GetSize(This) + +#define IMediaSample2_GetTime(This,pTimeStart,pTimeEnd) \ + (This)->lpVtbl -> GetTime(This,pTimeStart,pTimeEnd) + +#define IMediaSample2_SetTime(This,pTimeStart,pTimeEnd) \ + (This)->lpVtbl -> SetTime(This,pTimeStart,pTimeEnd) + +#define IMediaSample2_IsSyncPoint(This) \ + (This)->lpVtbl -> IsSyncPoint(This) + +#define IMediaSample2_SetSyncPoint(This,bIsSyncPoint) \ + (This)->lpVtbl -> SetSyncPoint(This,bIsSyncPoint) + +#define IMediaSample2_IsPreroll(This) \ + (This)->lpVtbl -> IsPreroll(This) + +#define IMediaSample2_SetPreroll(This,bIsPreroll) \ + (This)->lpVtbl -> SetPreroll(This,bIsPreroll) + +#define IMediaSample2_GetActualDataLength(This) \ + (This)->lpVtbl -> GetActualDataLength(This) + +#define IMediaSample2_SetActualDataLength(This,__MIDL_0010) \ + (This)->lpVtbl -> SetActualDataLength(This,__MIDL_0010) + +#define IMediaSample2_GetMediaType(This,ppMediaType) \ + (This)->lpVtbl -> GetMediaType(This,ppMediaType) + +#define IMediaSample2_SetMediaType(This,pMediaType) \ + (This)->lpVtbl -> SetMediaType(This,pMediaType) + +#define IMediaSample2_IsDiscontinuity(This) \ + (This)->lpVtbl -> IsDiscontinuity(This) + +#define IMediaSample2_SetDiscontinuity(This,bDiscontinuity) \ + (This)->lpVtbl -> SetDiscontinuity(This,bDiscontinuity) + +#define IMediaSample2_GetMediaTime(This,pTimeStart,pTimeEnd) \ + (This)->lpVtbl -> GetMediaTime(This,pTimeStart,pTimeEnd) + +#define IMediaSample2_SetMediaTime(This,pTimeStart,pTimeEnd) \ + (This)->lpVtbl -> SetMediaTime(This,pTimeStart,pTimeEnd) + + +#define IMediaSample2_GetProperties(This,cbProperties,pbProperties) \ + (This)->lpVtbl -> GetProperties(This,cbProperties,pbProperties) + +#define IMediaSample2_SetProperties(This,cbProperties,pbProperties) \ + (This)->lpVtbl -> SetProperties(This,cbProperties,pbProperties) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaSample2_GetProperties_Proxy( + IMediaSample2 * This, + /* [in] */ DWORD cbProperties, + /* [size_is][out] */ BYTE *pbProperties); + + +void __RPC_STUB IMediaSample2_GetProperties_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSample2_SetProperties_Proxy( + IMediaSample2 * This, + /* [in] */ DWORD cbProperties, + /* [size_is][in] */ const BYTE *pbProperties); + + +void __RPC_STUB IMediaSample2_SetProperties_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaSample2_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0119 */ +/* [local] */ + +typedef IMediaSample2 *PMEDIASAMPLE2; + +#define AM_GBF_PREVFRAMESKIPPED 1 +#define AM_GBF_NOTASYNCPOINT 2 +#define AM_GBF_NOWAIT 4 + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0119_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0119_v0_0_s_ifspec; + +#ifndef __IMemAllocator_INTERFACE_DEFINED__ +#define __IMemAllocator_INTERFACE_DEFINED__ + +/* interface IMemAllocator */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMemAllocator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a8689c-0ad4-11ce-b03a-0020af0ba770") + IMemAllocator : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetProperties( + /* [in] */ ALLOCATOR_PROPERTIES *pRequest, + /* [out] */ ALLOCATOR_PROPERTIES *pActual) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetProperties( + /* [out] */ ALLOCATOR_PROPERTIES *pProps) = 0; + + virtual HRESULT STDMETHODCALLTYPE Commit( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Decommit( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetBuffer( + /* [out] */ IMediaSample **ppBuffer, + /* [in] */ REFERENCE_TIME *pStartTime, + /* [in] */ REFERENCE_TIME *pEndTime, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer( + /* [in] */ IMediaSample *pBuffer) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMemAllocatorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMemAllocator * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMemAllocator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMemAllocator * This); + + HRESULT ( STDMETHODCALLTYPE *SetProperties )( + IMemAllocator * This, + /* [in] */ ALLOCATOR_PROPERTIES *pRequest, + /* [out] */ ALLOCATOR_PROPERTIES *pActual); + + HRESULT ( STDMETHODCALLTYPE *GetProperties )( + IMemAllocator * This, + /* [out] */ ALLOCATOR_PROPERTIES *pProps); + + HRESULT ( STDMETHODCALLTYPE *Commit )( + IMemAllocator * This); + + HRESULT ( STDMETHODCALLTYPE *Decommit )( + IMemAllocator * This); + + HRESULT ( STDMETHODCALLTYPE *GetBuffer )( + IMemAllocator * This, + /* [out] */ IMediaSample **ppBuffer, + /* [in] */ REFERENCE_TIME *pStartTime, + /* [in] */ REFERENCE_TIME *pEndTime, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )( + IMemAllocator * This, + /* [in] */ IMediaSample *pBuffer); + + END_INTERFACE + } IMemAllocatorVtbl; + + interface IMemAllocator + { + CONST_VTBL struct IMemAllocatorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMemAllocator_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMemAllocator_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMemAllocator_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMemAllocator_SetProperties(This,pRequest,pActual) \ + (This)->lpVtbl -> SetProperties(This,pRequest,pActual) + +#define IMemAllocator_GetProperties(This,pProps) \ + (This)->lpVtbl -> GetProperties(This,pProps) + +#define IMemAllocator_Commit(This) \ + (This)->lpVtbl -> Commit(This) + +#define IMemAllocator_Decommit(This) \ + (This)->lpVtbl -> Decommit(This) + +#define IMemAllocator_GetBuffer(This,ppBuffer,pStartTime,pEndTime,dwFlags) \ + (This)->lpVtbl -> GetBuffer(This,ppBuffer,pStartTime,pEndTime,dwFlags) + +#define IMemAllocator_ReleaseBuffer(This,pBuffer) \ + (This)->lpVtbl -> ReleaseBuffer(This,pBuffer) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMemAllocator_SetProperties_Proxy( + IMemAllocator * This, + /* [in] */ ALLOCATOR_PROPERTIES *pRequest, + /* [out] */ ALLOCATOR_PROPERTIES *pActual); + + +void __RPC_STUB IMemAllocator_SetProperties_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMemAllocator_GetProperties_Proxy( + IMemAllocator * This, + /* [out] */ ALLOCATOR_PROPERTIES *pProps); + + +void __RPC_STUB IMemAllocator_GetProperties_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMemAllocator_Commit_Proxy( + IMemAllocator * This); + + +void __RPC_STUB IMemAllocator_Commit_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMemAllocator_Decommit_Proxy( + IMemAllocator * This); + + +void __RPC_STUB IMemAllocator_Decommit_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMemAllocator_GetBuffer_Proxy( + IMemAllocator * This, + /* [out] */ IMediaSample **ppBuffer, + /* [in] */ REFERENCE_TIME *pStartTime, + /* [in] */ REFERENCE_TIME *pEndTime, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IMemAllocator_GetBuffer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMemAllocator_ReleaseBuffer_Proxy( + IMemAllocator * This, + /* [in] */ IMediaSample *pBuffer); + + +void __RPC_STUB IMemAllocator_ReleaseBuffer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMemAllocator_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0120 */ +/* [local] */ + +typedef IMemAllocator *PMEMALLOCATOR; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0120_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0120_v0_0_s_ifspec; + +#ifndef __IMemAllocatorCallbackTemp_INTERFACE_DEFINED__ +#define __IMemAllocatorCallbackTemp_INTERFACE_DEFINED__ + +/* interface IMemAllocatorCallbackTemp */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMemAllocatorCallbackTemp; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("379a0cf0-c1de-11d2-abf5-00a0c905f375") + IMemAllocatorCallbackTemp : public IMemAllocator + { + public: + virtual HRESULT STDMETHODCALLTYPE SetNotify( + /* [in] */ IMemAllocatorNotifyCallbackTemp *pNotify) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFreeCount( + /* [out] */ LONG *plBuffersFree) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMemAllocatorCallbackTempVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMemAllocatorCallbackTemp * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMemAllocatorCallbackTemp * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMemAllocatorCallbackTemp * This); + + HRESULT ( STDMETHODCALLTYPE *SetProperties )( + IMemAllocatorCallbackTemp * This, + /* [in] */ ALLOCATOR_PROPERTIES *pRequest, + /* [out] */ ALLOCATOR_PROPERTIES *pActual); + + HRESULT ( STDMETHODCALLTYPE *GetProperties )( + IMemAllocatorCallbackTemp * This, + /* [out] */ ALLOCATOR_PROPERTIES *pProps); + + HRESULT ( STDMETHODCALLTYPE *Commit )( + IMemAllocatorCallbackTemp * This); + + HRESULT ( STDMETHODCALLTYPE *Decommit )( + IMemAllocatorCallbackTemp * This); + + HRESULT ( STDMETHODCALLTYPE *GetBuffer )( + IMemAllocatorCallbackTemp * This, + /* [out] */ IMediaSample **ppBuffer, + /* [in] */ REFERENCE_TIME *pStartTime, + /* [in] */ REFERENCE_TIME *pEndTime, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )( + IMemAllocatorCallbackTemp * This, + /* [in] */ IMediaSample *pBuffer); + + HRESULT ( STDMETHODCALLTYPE *SetNotify )( + IMemAllocatorCallbackTemp * This, + /* [in] */ IMemAllocatorNotifyCallbackTemp *pNotify); + + HRESULT ( STDMETHODCALLTYPE *GetFreeCount )( + IMemAllocatorCallbackTemp * This, + /* [out] */ LONG *plBuffersFree); + + END_INTERFACE + } IMemAllocatorCallbackTempVtbl; + + interface IMemAllocatorCallbackTemp + { + CONST_VTBL struct IMemAllocatorCallbackTempVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMemAllocatorCallbackTemp_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMemAllocatorCallbackTemp_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMemAllocatorCallbackTemp_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMemAllocatorCallbackTemp_SetProperties(This,pRequest,pActual) \ + (This)->lpVtbl -> SetProperties(This,pRequest,pActual) + +#define IMemAllocatorCallbackTemp_GetProperties(This,pProps) \ + (This)->lpVtbl -> GetProperties(This,pProps) + +#define IMemAllocatorCallbackTemp_Commit(This) \ + (This)->lpVtbl -> Commit(This) + +#define IMemAllocatorCallbackTemp_Decommit(This) \ + (This)->lpVtbl -> Decommit(This) + +#define IMemAllocatorCallbackTemp_GetBuffer(This,ppBuffer,pStartTime,pEndTime,dwFlags) \ + (This)->lpVtbl -> GetBuffer(This,ppBuffer,pStartTime,pEndTime,dwFlags) + +#define IMemAllocatorCallbackTemp_ReleaseBuffer(This,pBuffer) \ + (This)->lpVtbl -> ReleaseBuffer(This,pBuffer) + + +#define IMemAllocatorCallbackTemp_SetNotify(This,pNotify) \ + (This)->lpVtbl -> SetNotify(This,pNotify) + +#define IMemAllocatorCallbackTemp_GetFreeCount(This,plBuffersFree) \ + (This)->lpVtbl -> GetFreeCount(This,plBuffersFree) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMemAllocatorCallbackTemp_SetNotify_Proxy( + IMemAllocatorCallbackTemp * This, + /* [in] */ IMemAllocatorNotifyCallbackTemp *pNotify); + + +void __RPC_STUB IMemAllocatorCallbackTemp_SetNotify_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMemAllocatorCallbackTemp_GetFreeCount_Proxy( + IMemAllocatorCallbackTemp * This, + /* [out] */ LONG *plBuffersFree); + + +void __RPC_STUB IMemAllocatorCallbackTemp_GetFreeCount_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMemAllocatorCallbackTemp_INTERFACE_DEFINED__ */ + + +#ifndef __IMemAllocatorNotifyCallbackTemp_INTERFACE_DEFINED__ +#define __IMemAllocatorNotifyCallbackTemp_INTERFACE_DEFINED__ + +/* interface IMemAllocatorNotifyCallbackTemp */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMemAllocatorNotifyCallbackTemp; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("92980b30-c1de-11d2-abf5-00a0c905f375") + IMemAllocatorNotifyCallbackTemp : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE NotifyRelease( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMemAllocatorNotifyCallbackTempVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMemAllocatorNotifyCallbackTemp * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMemAllocatorNotifyCallbackTemp * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMemAllocatorNotifyCallbackTemp * This); + + HRESULT ( STDMETHODCALLTYPE *NotifyRelease )( + IMemAllocatorNotifyCallbackTemp * This); + + END_INTERFACE + } IMemAllocatorNotifyCallbackTempVtbl; + + interface IMemAllocatorNotifyCallbackTemp + { + CONST_VTBL struct IMemAllocatorNotifyCallbackTempVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMemAllocatorNotifyCallbackTemp_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMemAllocatorNotifyCallbackTemp_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMemAllocatorNotifyCallbackTemp_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMemAllocatorNotifyCallbackTemp_NotifyRelease(This) \ + (This)->lpVtbl -> NotifyRelease(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMemAllocatorNotifyCallbackTemp_NotifyRelease_Proxy( + IMemAllocatorNotifyCallbackTemp * This); + + +void __RPC_STUB IMemAllocatorNotifyCallbackTemp_NotifyRelease_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMemAllocatorNotifyCallbackTemp_INTERFACE_DEFINED__ */ + + +#ifndef __IMemInputPin_INTERFACE_DEFINED__ +#define __IMemInputPin_INTERFACE_DEFINED__ + +/* interface IMemInputPin */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMemInputPin; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a8689d-0ad4-11ce-b03a-0020af0ba770") + IMemInputPin : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetAllocator( + /* [out] */ IMemAllocator **ppAllocator) = 0; + + virtual HRESULT STDMETHODCALLTYPE NotifyAllocator( + /* [in] */ IMemAllocator *pAllocator, + /* [in] */ BOOL bReadOnly) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAllocatorRequirements( + /* [out] */ ALLOCATOR_PROPERTIES *pProps) = 0; + + virtual HRESULT STDMETHODCALLTYPE Receive( + /* [in] */ IMediaSample *pSample) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReceiveMultiple( + /* [size_is][in] */ IMediaSample **pSamples, + /* [in] */ long nSamples, + /* [out] */ long *nSamplesProcessed) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReceiveCanBlock( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMemInputPinVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMemInputPin * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMemInputPin * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMemInputPin * This); + + HRESULT ( STDMETHODCALLTYPE *GetAllocator )( + IMemInputPin * This, + /* [out] */ IMemAllocator **ppAllocator); + + HRESULT ( STDMETHODCALLTYPE *NotifyAllocator )( + IMemInputPin * This, + /* [in] */ IMemAllocator *pAllocator, + /* [in] */ BOOL bReadOnly); + + HRESULT ( STDMETHODCALLTYPE *GetAllocatorRequirements )( + IMemInputPin * This, + /* [out] */ ALLOCATOR_PROPERTIES *pProps); + + HRESULT ( STDMETHODCALLTYPE *Receive )( + IMemInputPin * This, + /* [in] */ IMediaSample *pSample); + + HRESULT ( STDMETHODCALLTYPE *ReceiveMultiple )( + IMemInputPin * This, + /* [size_is][in] */ IMediaSample **pSamples, + /* [in] */ long nSamples, + /* [out] */ long *nSamplesProcessed); + + HRESULT ( STDMETHODCALLTYPE *ReceiveCanBlock )( + IMemInputPin * This); + + END_INTERFACE + } IMemInputPinVtbl; + + interface IMemInputPin + { + CONST_VTBL struct IMemInputPinVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMemInputPin_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMemInputPin_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMemInputPin_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMemInputPin_GetAllocator(This,ppAllocator) \ + (This)->lpVtbl -> GetAllocator(This,ppAllocator) + +#define IMemInputPin_NotifyAllocator(This,pAllocator,bReadOnly) \ + (This)->lpVtbl -> NotifyAllocator(This,pAllocator,bReadOnly) + +#define IMemInputPin_GetAllocatorRequirements(This,pProps) \ + (This)->lpVtbl -> GetAllocatorRequirements(This,pProps) + +#define IMemInputPin_Receive(This,pSample) \ + (This)->lpVtbl -> Receive(This,pSample) + +#define IMemInputPin_ReceiveMultiple(This,pSamples,nSamples,nSamplesProcessed) \ + (This)->lpVtbl -> ReceiveMultiple(This,pSamples,nSamples,nSamplesProcessed) + +#define IMemInputPin_ReceiveCanBlock(This) \ + (This)->lpVtbl -> ReceiveCanBlock(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMemInputPin_GetAllocator_Proxy( + IMemInputPin * This, + /* [out] */ IMemAllocator **ppAllocator); + + +void __RPC_STUB IMemInputPin_GetAllocator_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMemInputPin_NotifyAllocator_Proxy( + IMemInputPin * This, + /* [in] */ IMemAllocator *pAllocator, + /* [in] */ BOOL bReadOnly); + + +void __RPC_STUB IMemInputPin_NotifyAllocator_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMemInputPin_GetAllocatorRequirements_Proxy( + IMemInputPin * This, + /* [out] */ ALLOCATOR_PROPERTIES *pProps); + + +void __RPC_STUB IMemInputPin_GetAllocatorRequirements_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMemInputPin_Receive_Proxy( + IMemInputPin * This, + /* [in] */ IMediaSample *pSample); + + +void __RPC_STUB IMemInputPin_Receive_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMemInputPin_ReceiveMultiple_Proxy( + IMemInputPin * This, + /* [size_is][in] */ IMediaSample **pSamples, + /* [in] */ long nSamples, + /* [out] */ long *nSamplesProcessed); + + +void __RPC_STUB IMemInputPin_ReceiveMultiple_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMemInputPin_ReceiveCanBlock_Proxy( + IMemInputPin * This); + + +void __RPC_STUB IMemInputPin_ReceiveCanBlock_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMemInputPin_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0123 */ +/* [local] */ + +typedef IMemInputPin *PMEMINPUTPIN; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0123_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0123_v0_0_s_ifspec; + +#ifndef __IAMovieSetup_INTERFACE_DEFINED__ +#define __IAMovieSetup_INTERFACE_DEFINED__ + +/* interface IAMovieSetup */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMovieSetup; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("a3d8cec0-7e5a-11cf-bbc5-00805f6cef20") + IAMovieSetup : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Register( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Unregister( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMovieSetupVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMovieSetup * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMovieSetup * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMovieSetup * This); + + HRESULT ( STDMETHODCALLTYPE *Register )( + IAMovieSetup * This); + + HRESULT ( STDMETHODCALLTYPE *Unregister )( + IAMovieSetup * This); + + END_INTERFACE + } IAMovieSetupVtbl; + + interface IAMovieSetup + { + CONST_VTBL struct IAMovieSetupVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMovieSetup_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMovieSetup_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMovieSetup_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMovieSetup_Register(This) \ + (This)->lpVtbl -> Register(This) + +#define IAMovieSetup_Unregister(This) \ + (This)->lpVtbl -> Unregister(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMovieSetup_Register_Proxy( + IAMovieSetup * This); + + +void __RPC_STUB IAMovieSetup_Register_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovieSetup_Unregister_Proxy( + IAMovieSetup * This); + + +void __RPC_STUB IAMovieSetup_Unregister_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMovieSetup_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0124 */ +/* [local] */ + +typedef IAMovieSetup *PAMOVIESETUP; + +typedef +enum AM_SEEKING_SeekingFlags + { AM_SEEKING_NoPositioning = 0, + AM_SEEKING_AbsolutePositioning = 0x1, + AM_SEEKING_RelativePositioning = 0x2, + AM_SEEKING_IncrementalPositioning = 0x3, + AM_SEEKING_PositioningBitsMask = 0x3, + AM_SEEKING_SeekToKeyFrame = 0x4, + AM_SEEKING_ReturnTime = 0x8, + AM_SEEKING_Segment = 0x10, + AM_SEEKING_NoFlush = 0x20 + } AM_SEEKING_SEEKING_FLAGS; + +typedef +enum AM_SEEKING_SeekingCapabilities + { AM_SEEKING_CanSeekAbsolute = 0x1, + AM_SEEKING_CanSeekForwards = 0x2, + AM_SEEKING_CanSeekBackwards = 0x4, + AM_SEEKING_CanGetCurrentPos = 0x8, + AM_SEEKING_CanGetStopPos = 0x10, + AM_SEEKING_CanGetDuration = 0x20, + AM_SEEKING_CanPlayBackwards = 0x40, + AM_SEEKING_CanDoSegments = 0x80, + AM_SEEKING_Source = 0x100 + } AM_SEEKING_SEEKING_CAPABILITIES; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0124_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0124_v0_0_s_ifspec; + +#ifndef __IMediaSeeking_INTERFACE_DEFINED__ +#define __IMediaSeeking_INTERFACE_DEFINED__ + +/* interface IMediaSeeking */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMediaSeeking; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("36b73880-c2c8-11cf-8b46-00805f6cef60") + IMediaSeeking : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetCapabilities( + /* [out] */ DWORD *pCapabilities) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckCapabilities( + /* [out][in] */ DWORD *pCapabilities) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsFormatSupported( + /* [in] */ const GUID *pFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryPreferredFormat( + /* [out] */ GUID *pFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTimeFormat( + /* [out] */ GUID *pFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsUsingTimeFormat( + /* [in] */ const GUID *pFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTimeFormat( + /* [in] */ const GUID *pFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDuration( + /* [out] */ LONGLONG *pDuration) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStopPosition( + /* [out] */ LONGLONG *pStop) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentPosition( + /* [out] */ LONGLONG *pCurrent) = 0; + + virtual HRESULT STDMETHODCALLTYPE ConvertTimeFormat( + /* [out] */ LONGLONG *pTarget, + /* [in] */ const GUID *pTargetFormat, + /* [in] */ LONGLONG Source, + /* [in] */ const GUID *pSourceFormat) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPositions( + /* [out][in] */ LONGLONG *pCurrent, + /* [in] */ DWORD dwCurrentFlags, + /* [out][in] */ LONGLONG *pStop, + /* [in] */ DWORD dwStopFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPositions( + /* [out] */ LONGLONG *pCurrent, + /* [out] */ LONGLONG *pStop) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAvailable( + /* [out] */ LONGLONG *pEarliest, + /* [out] */ LONGLONG *pLatest) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetRate( + /* [in] */ double dRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRate( + /* [out] */ double *pdRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPreroll( + /* [out] */ LONGLONG *pllPreroll) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaSeekingVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaSeeking * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaSeeking * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaSeeking * This); + + HRESULT ( STDMETHODCALLTYPE *GetCapabilities )( + IMediaSeeking * This, + /* [out] */ DWORD *pCapabilities); + + HRESULT ( STDMETHODCALLTYPE *CheckCapabilities )( + IMediaSeeking * This, + /* [out][in] */ DWORD *pCapabilities); + + HRESULT ( STDMETHODCALLTYPE *IsFormatSupported )( + IMediaSeeking * This, + /* [in] */ const GUID *pFormat); + + HRESULT ( STDMETHODCALLTYPE *QueryPreferredFormat )( + IMediaSeeking * This, + /* [out] */ GUID *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetTimeFormat )( + IMediaSeeking * This, + /* [out] */ GUID *pFormat); + + HRESULT ( STDMETHODCALLTYPE *IsUsingTimeFormat )( + IMediaSeeking * This, + /* [in] */ const GUID *pFormat); + + HRESULT ( STDMETHODCALLTYPE *SetTimeFormat )( + IMediaSeeking * This, + /* [in] */ const GUID *pFormat); + + HRESULT ( STDMETHODCALLTYPE *GetDuration )( + IMediaSeeking * This, + /* [out] */ LONGLONG *pDuration); + + HRESULT ( STDMETHODCALLTYPE *GetStopPosition )( + IMediaSeeking * This, + /* [out] */ LONGLONG *pStop); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentPosition )( + IMediaSeeking * This, + /* [out] */ LONGLONG *pCurrent); + + HRESULT ( STDMETHODCALLTYPE *ConvertTimeFormat )( + IMediaSeeking * This, + /* [out] */ LONGLONG *pTarget, + /* [in] */ const GUID *pTargetFormat, + /* [in] */ LONGLONG Source, + /* [in] */ const GUID *pSourceFormat); + + HRESULT ( STDMETHODCALLTYPE *SetPositions )( + IMediaSeeking * This, + /* [out][in] */ LONGLONG *pCurrent, + /* [in] */ DWORD dwCurrentFlags, + /* [out][in] */ LONGLONG *pStop, + /* [in] */ DWORD dwStopFlags); + + HRESULT ( STDMETHODCALLTYPE *GetPositions )( + IMediaSeeking * This, + /* [out] */ LONGLONG *pCurrent, + /* [out] */ LONGLONG *pStop); + + HRESULT ( STDMETHODCALLTYPE *GetAvailable )( + IMediaSeeking * This, + /* [out] */ LONGLONG *pEarliest, + /* [out] */ LONGLONG *pLatest); + + HRESULT ( STDMETHODCALLTYPE *SetRate )( + IMediaSeeking * This, + /* [in] */ double dRate); + + HRESULT ( STDMETHODCALLTYPE *GetRate )( + IMediaSeeking * This, + /* [out] */ double *pdRate); + + HRESULT ( STDMETHODCALLTYPE *GetPreroll )( + IMediaSeeking * This, + /* [out] */ LONGLONG *pllPreroll); + + END_INTERFACE + } IMediaSeekingVtbl; + + interface IMediaSeeking + { + CONST_VTBL struct IMediaSeekingVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaSeeking_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaSeeking_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaSeeking_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaSeeking_GetCapabilities(This,pCapabilities) \ + (This)->lpVtbl -> GetCapabilities(This,pCapabilities) + +#define IMediaSeeking_CheckCapabilities(This,pCapabilities) \ + (This)->lpVtbl -> CheckCapabilities(This,pCapabilities) + +#define IMediaSeeking_IsFormatSupported(This,pFormat) \ + (This)->lpVtbl -> IsFormatSupported(This,pFormat) + +#define IMediaSeeking_QueryPreferredFormat(This,pFormat) \ + (This)->lpVtbl -> QueryPreferredFormat(This,pFormat) + +#define IMediaSeeking_GetTimeFormat(This,pFormat) \ + (This)->lpVtbl -> GetTimeFormat(This,pFormat) + +#define IMediaSeeking_IsUsingTimeFormat(This,pFormat) \ + (This)->lpVtbl -> IsUsingTimeFormat(This,pFormat) + +#define IMediaSeeking_SetTimeFormat(This,pFormat) \ + (This)->lpVtbl -> SetTimeFormat(This,pFormat) + +#define IMediaSeeking_GetDuration(This,pDuration) \ + (This)->lpVtbl -> GetDuration(This,pDuration) + +#define IMediaSeeking_GetStopPosition(This,pStop) \ + (This)->lpVtbl -> GetStopPosition(This,pStop) + +#define IMediaSeeking_GetCurrentPosition(This,pCurrent) \ + (This)->lpVtbl -> GetCurrentPosition(This,pCurrent) + +#define IMediaSeeking_ConvertTimeFormat(This,pTarget,pTargetFormat,Source,pSourceFormat) \ + (This)->lpVtbl -> ConvertTimeFormat(This,pTarget,pTargetFormat,Source,pSourceFormat) + +#define IMediaSeeking_SetPositions(This,pCurrent,dwCurrentFlags,pStop,dwStopFlags) \ + (This)->lpVtbl -> SetPositions(This,pCurrent,dwCurrentFlags,pStop,dwStopFlags) + +#define IMediaSeeking_GetPositions(This,pCurrent,pStop) \ + (This)->lpVtbl -> GetPositions(This,pCurrent,pStop) + +#define IMediaSeeking_GetAvailable(This,pEarliest,pLatest) \ + (This)->lpVtbl -> GetAvailable(This,pEarliest,pLatest) + +#define IMediaSeeking_SetRate(This,dRate) \ + (This)->lpVtbl -> SetRate(This,dRate) + +#define IMediaSeeking_GetRate(This,pdRate) \ + (This)->lpVtbl -> GetRate(This,pdRate) + +#define IMediaSeeking_GetPreroll(This,pllPreroll) \ + (This)->lpVtbl -> GetPreroll(This,pllPreroll) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_GetCapabilities_Proxy( + IMediaSeeking * This, + /* [out] */ DWORD *pCapabilities); + + +void __RPC_STUB IMediaSeeking_GetCapabilities_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_CheckCapabilities_Proxy( + IMediaSeeking * This, + /* [out][in] */ DWORD *pCapabilities); + + +void __RPC_STUB IMediaSeeking_CheckCapabilities_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_IsFormatSupported_Proxy( + IMediaSeeking * This, + /* [in] */ const GUID *pFormat); + + +void __RPC_STUB IMediaSeeking_IsFormatSupported_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_QueryPreferredFormat_Proxy( + IMediaSeeking * This, + /* [out] */ GUID *pFormat); + + +void __RPC_STUB IMediaSeeking_QueryPreferredFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_GetTimeFormat_Proxy( + IMediaSeeking * This, + /* [out] */ GUID *pFormat); + + +void __RPC_STUB IMediaSeeking_GetTimeFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_IsUsingTimeFormat_Proxy( + IMediaSeeking * This, + /* [in] */ const GUID *pFormat); + + +void __RPC_STUB IMediaSeeking_IsUsingTimeFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_SetTimeFormat_Proxy( + IMediaSeeking * This, + /* [in] */ const GUID *pFormat); + + +void __RPC_STUB IMediaSeeking_SetTimeFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_GetDuration_Proxy( + IMediaSeeking * This, + /* [out] */ LONGLONG *pDuration); + + +void __RPC_STUB IMediaSeeking_GetDuration_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_GetStopPosition_Proxy( + IMediaSeeking * This, + /* [out] */ LONGLONG *pStop); + + +void __RPC_STUB IMediaSeeking_GetStopPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_GetCurrentPosition_Proxy( + IMediaSeeking * This, + /* [out] */ LONGLONG *pCurrent); + + +void __RPC_STUB IMediaSeeking_GetCurrentPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_ConvertTimeFormat_Proxy( + IMediaSeeking * This, + /* [out] */ LONGLONG *pTarget, + /* [in] */ const GUID *pTargetFormat, + /* [in] */ LONGLONG Source, + /* [in] */ const GUID *pSourceFormat); + + +void __RPC_STUB IMediaSeeking_ConvertTimeFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_SetPositions_Proxy( + IMediaSeeking * This, + /* [out][in] */ LONGLONG *pCurrent, + /* [in] */ DWORD dwCurrentFlags, + /* [out][in] */ LONGLONG *pStop, + /* [in] */ DWORD dwStopFlags); + + +void __RPC_STUB IMediaSeeking_SetPositions_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_GetPositions_Proxy( + IMediaSeeking * This, + /* [out] */ LONGLONG *pCurrent, + /* [out] */ LONGLONG *pStop); + + +void __RPC_STUB IMediaSeeking_GetPositions_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_GetAvailable_Proxy( + IMediaSeeking * This, + /* [out] */ LONGLONG *pEarliest, + /* [out] */ LONGLONG *pLatest); + + +void __RPC_STUB IMediaSeeking_GetAvailable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_SetRate_Proxy( + IMediaSeeking * This, + /* [in] */ double dRate); + + +void __RPC_STUB IMediaSeeking_SetRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_GetRate_Proxy( + IMediaSeeking * This, + /* [out] */ double *pdRate); + + +void __RPC_STUB IMediaSeeking_GetRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMediaSeeking_GetPreroll_Proxy( + IMediaSeeking * This, + /* [out] */ LONGLONG *pllPreroll); + + +void __RPC_STUB IMediaSeeking_GetPreroll_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaSeeking_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0125 */ +/* [local] */ + +typedef IMediaSeeking *PMEDIASEEKING; + +enum tagAM_MEDIAEVENT_FLAGS +{ + AM_MEDIAEVENT_NONOTIFY = 0x01 +}; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +typedef /* [public][public] */ struct __MIDL___MIDL_itf_strmif_0125_0001 + { + CLSID Clsid; + LPWSTR Name; + } REGFILTER; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0125_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0125_v0_0_s_ifspec; + +#ifndef __IEnumRegFilters_INTERFACE_DEFINED__ +#define __IEnumRegFilters_INTERFACE_DEFINED__ + +/* interface IEnumRegFilters */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IEnumRegFilters; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868a4-0ad4-11ce-b03a-0020af0ba770") + IEnumRegFilters : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG cFilters, + /* [out] */ REGFILTER **apRegFilter, + /* [out] */ ULONG *pcFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG cFilters) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IEnumRegFilters **ppEnum) = 0; + + }; + +#else /* C style interface */ + + typedef struct IEnumRegFiltersVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IEnumRegFilters * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IEnumRegFilters * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IEnumRegFilters * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IEnumRegFilters * This, + /* [in] */ ULONG cFilters, + /* [out] */ REGFILTER **apRegFilter, + /* [out] */ ULONG *pcFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IEnumRegFilters * This, + /* [in] */ ULONG cFilters); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IEnumRegFilters * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IEnumRegFilters * This, + /* [out] */ IEnumRegFilters **ppEnum); + + END_INTERFACE + } IEnumRegFiltersVtbl; + + interface IEnumRegFilters + { + CONST_VTBL struct IEnumRegFiltersVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IEnumRegFilters_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IEnumRegFilters_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IEnumRegFilters_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IEnumRegFilters_Next(This,cFilters,apRegFilter,pcFetched) \ + (This)->lpVtbl -> Next(This,cFilters,apRegFilter,pcFetched) + +#define IEnumRegFilters_Skip(This,cFilters) \ + (This)->lpVtbl -> Skip(This,cFilters) + +#define IEnumRegFilters_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IEnumRegFilters_Clone(This,ppEnum) \ + (This)->lpVtbl -> Clone(This,ppEnum) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IEnumRegFilters_Next_Proxy( + IEnumRegFilters * This, + /* [in] */ ULONG cFilters, + /* [out] */ REGFILTER **apRegFilter, + /* [out] */ ULONG *pcFetched); + + +void __RPC_STUB IEnumRegFilters_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumRegFilters_Skip_Proxy( + IEnumRegFilters * This, + /* [in] */ ULONG cFilters); + + +void __RPC_STUB IEnumRegFilters_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumRegFilters_Reset_Proxy( + IEnumRegFilters * This); + + +void __RPC_STUB IEnumRegFilters_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumRegFilters_Clone_Proxy( + IEnumRegFilters * This, + /* [out] */ IEnumRegFilters **ppEnum); + + +void __RPC_STUB IEnumRegFilters_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IEnumRegFilters_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0127 */ +/* [local] */ + +typedef IEnumRegFilters *PENUMREGFILTERS; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0127_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0127_v0_0_s_ifspec; + +#ifndef __IFilterMapper_INTERFACE_DEFINED__ +#define __IFilterMapper_INTERFACE_DEFINED__ + +/* interface IFilterMapper */ +/* [unique][uuid][object] */ + + +enum __MIDL_IFilterMapper_0001 + { MERIT_PREFERRED = 0x800000, + MERIT_NORMAL = 0x600000, + MERIT_UNLIKELY = 0x400000, + MERIT_DO_NOT_USE = 0x200000, + MERIT_SW_COMPRESSOR = 0x100000, + MERIT_HW_COMPRESSOR = 0x100050 + } ; + +EXTERN_C const IID IID_IFilterMapper; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868a3-0ad4-11ce-b03a-0020af0ba770") + IFilterMapper : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE RegisterFilter( + /* [in] */ CLSID clsid, + /* [in] */ LPCWSTR Name, + /* [in] */ DWORD dwMerit) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterFilterInstance( + /* [in] */ CLSID clsid, + /* [in] */ LPCWSTR Name, + /* [out] */ CLSID *MRId) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterPin( + /* [in] */ CLSID Filter, + /* [in] */ LPCWSTR Name, + /* [in] */ BOOL bRendered, + /* [in] */ BOOL bOutput, + /* [in] */ BOOL bZero, + /* [in] */ BOOL bMany, + /* [in] */ CLSID ConnectsToFilter, + /* [in] */ LPCWSTR ConnectsToPin) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterPinType( + /* [in] */ CLSID clsFilter, + /* [in] */ LPCWSTR strName, + /* [in] */ CLSID clsMajorType, + /* [in] */ CLSID clsSubType) = 0; + + virtual HRESULT STDMETHODCALLTYPE UnregisterFilter( + /* [in] */ CLSID Filter) = 0; + + virtual HRESULT STDMETHODCALLTYPE UnregisterFilterInstance( + /* [in] */ CLSID MRId) = 0; + + virtual HRESULT STDMETHODCALLTYPE UnregisterPin( + /* [in] */ CLSID Filter, + /* [in] */ LPCWSTR Name) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumMatchingFilters( + /* [out] */ IEnumRegFilters **ppEnum, + /* [in] */ DWORD dwMerit, + /* [in] */ BOOL bInputNeeded, + /* [in] */ CLSID clsInMaj, + /* [in] */ CLSID clsInSub, + /* [in] */ BOOL bRender, + /* [in] */ BOOL bOututNeeded, + /* [in] */ CLSID clsOutMaj, + /* [in] */ CLSID clsOutSub) = 0; + + }; + +#else /* C style interface */ + + typedef struct IFilterMapperVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IFilterMapper * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IFilterMapper * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IFilterMapper * This); + + HRESULT ( STDMETHODCALLTYPE *RegisterFilter )( + IFilterMapper * This, + /* [in] */ CLSID clsid, + /* [in] */ LPCWSTR Name, + /* [in] */ DWORD dwMerit); + + HRESULT ( STDMETHODCALLTYPE *RegisterFilterInstance )( + IFilterMapper * This, + /* [in] */ CLSID clsid, + /* [in] */ LPCWSTR Name, + /* [out] */ CLSID *MRId); + + HRESULT ( STDMETHODCALLTYPE *RegisterPin )( + IFilterMapper * This, + /* [in] */ CLSID Filter, + /* [in] */ LPCWSTR Name, + /* [in] */ BOOL bRendered, + /* [in] */ BOOL bOutput, + /* [in] */ BOOL bZero, + /* [in] */ BOOL bMany, + /* [in] */ CLSID ConnectsToFilter, + /* [in] */ LPCWSTR ConnectsToPin); + + HRESULT ( STDMETHODCALLTYPE *RegisterPinType )( + IFilterMapper * This, + /* [in] */ CLSID clsFilter, + /* [in] */ LPCWSTR strName, + /* [in] */ CLSID clsMajorType, + /* [in] */ CLSID clsSubType); + + HRESULT ( STDMETHODCALLTYPE *UnregisterFilter )( + IFilterMapper * This, + /* [in] */ CLSID Filter); + + HRESULT ( STDMETHODCALLTYPE *UnregisterFilterInstance )( + IFilterMapper * This, + /* [in] */ CLSID MRId); + + HRESULT ( STDMETHODCALLTYPE *UnregisterPin )( + IFilterMapper * This, + /* [in] */ CLSID Filter, + /* [in] */ LPCWSTR Name); + + HRESULT ( STDMETHODCALLTYPE *EnumMatchingFilters )( + IFilterMapper * This, + /* [out] */ IEnumRegFilters **ppEnum, + /* [in] */ DWORD dwMerit, + /* [in] */ BOOL bInputNeeded, + /* [in] */ CLSID clsInMaj, + /* [in] */ CLSID clsInSub, + /* [in] */ BOOL bRender, + /* [in] */ BOOL bOututNeeded, + /* [in] */ CLSID clsOutMaj, + /* [in] */ CLSID clsOutSub); + + END_INTERFACE + } IFilterMapperVtbl; + + interface IFilterMapper + { + CONST_VTBL struct IFilterMapperVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IFilterMapper_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IFilterMapper_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IFilterMapper_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IFilterMapper_RegisterFilter(This,clsid,Name,dwMerit) \ + (This)->lpVtbl -> RegisterFilter(This,clsid,Name,dwMerit) + +#define IFilterMapper_RegisterFilterInstance(This,clsid,Name,MRId) \ + (This)->lpVtbl -> RegisterFilterInstance(This,clsid,Name,MRId) + +#define IFilterMapper_RegisterPin(This,Filter,Name,bRendered,bOutput,bZero,bMany,ConnectsToFilter,ConnectsToPin) \ + (This)->lpVtbl -> RegisterPin(This,Filter,Name,bRendered,bOutput,bZero,bMany,ConnectsToFilter,ConnectsToPin) + +#define IFilterMapper_RegisterPinType(This,clsFilter,strName,clsMajorType,clsSubType) \ + (This)->lpVtbl -> RegisterPinType(This,clsFilter,strName,clsMajorType,clsSubType) + +#define IFilterMapper_UnregisterFilter(This,Filter) \ + (This)->lpVtbl -> UnregisterFilter(This,Filter) + +#define IFilterMapper_UnregisterFilterInstance(This,MRId) \ + (This)->lpVtbl -> UnregisterFilterInstance(This,MRId) + +#define IFilterMapper_UnregisterPin(This,Filter,Name) \ + (This)->lpVtbl -> UnregisterPin(This,Filter,Name) + +#define IFilterMapper_EnumMatchingFilters(This,ppEnum,dwMerit,bInputNeeded,clsInMaj,clsInSub,bRender,bOututNeeded,clsOutMaj,clsOutSub) \ + (This)->lpVtbl -> EnumMatchingFilters(This,ppEnum,dwMerit,bInputNeeded,clsInMaj,clsInSub,bRender,bOututNeeded,clsOutMaj,clsOutSub) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IFilterMapper_RegisterFilter_Proxy( + IFilterMapper * This, + /* [in] */ CLSID clsid, + /* [in] */ LPCWSTR Name, + /* [in] */ DWORD dwMerit); + + +void __RPC_STUB IFilterMapper_RegisterFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterMapper_RegisterFilterInstance_Proxy( + IFilterMapper * This, + /* [in] */ CLSID clsid, + /* [in] */ LPCWSTR Name, + /* [out] */ CLSID *MRId); + + +void __RPC_STUB IFilterMapper_RegisterFilterInstance_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterMapper_RegisterPin_Proxy( + IFilterMapper * This, + /* [in] */ CLSID Filter, + /* [in] */ LPCWSTR Name, + /* [in] */ BOOL bRendered, + /* [in] */ BOOL bOutput, + /* [in] */ BOOL bZero, + /* [in] */ BOOL bMany, + /* [in] */ CLSID ConnectsToFilter, + /* [in] */ LPCWSTR ConnectsToPin); + + +void __RPC_STUB IFilterMapper_RegisterPin_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterMapper_RegisterPinType_Proxy( + IFilterMapper * This, + /* [in] */ CLSID clsFilter, + /* [in] */ LPCWSTR strName, + /* [in] */ CLSID clsMajorType, + /* [in] */ CLSID clsSubType); + + +void __RPC_STUB IFilterMapper_RegisterPinType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterMapper_UnregisterFilter_Proxy( + IFilterMapper * This, + /* [in] */ CLSID Filter); + + +void __RPC_STUB IFilterMapper_UnregisterFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterMapper_UnregisterFilterInstance_Proxy( + IFilterMapper * This, + /* [in] */ CLSID MRId); + + +void __RPC_STUB IFilterMapper_UnregisterFilterInstance_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterMapper_UnregisterPin_Proxy( + IFilterMapper * This, + /* [in] */ CLSID Filter, + /* [in] */ LPCWSTR Name); + + +void __RPC_STUB IFilterMapper_UnregisterPin_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterMapper_EnumMatchingFilters_Proxy( + IFilterMapper * This, + /* [out] */ IEnumRegFilters **ppEnum, + /* [in] */ DWORD dwMerit, + /* [in] */ BOOL bInputNeeded, + /* [in] */ CLSID clsInMaj, + /* [in] */ CLSID clsInSub, + /* [in] */ BOOL bRender, + /* [in] */ BOOL bOututNeeded, + /* [in] */ CLSID clsOutMaj, + /* [in] */ CLSID clsOutSub); + + +void __RPC_STUB IFilterMapper_EnumMatchingFilters_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IFilterMapper_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0129 */ +/* [local] */ + +typedef /* [public][public][public][public][public][public][public] */ struct __MIDL___MIDL_itf_strmif_0129_0001 + { + const CLSID *clsMajorType; + const CLSID *clsMinorType; + } REGPINTYPES; + +typedef /* [public][public][public] */ struct __MIDL___MIDL_itf_strmif_0129_0002 + { + LPWSTR strName; + BOOL bRendered; + BOOL bOutput; + BOOL bZero; + BOOL bMany; + const CLSID *clsConnectsToFilter; + const WCHAR *strConnectsToPin; + UINT nMediaTypes; + const REGPINTYPES *lpMediaType; + } REGFILTERPINS; + +typedef /* [public][public][public][public][public][public] */ struct __MIDL___MIDL_itf_strmif_0129_0003 + { + CLSID clsMedium; + DWORD dw1; + DWORD dw2; + } REGPINMEDIUM; + + +enum __MIDL___MIDL_itf_strmif_0129_0004 + { REG_PINFLAG_B_ZERO = 0x1, + REG_PINFLAG_B_RENDERER = 0x2, + REG_PINFLAG_B_MANY = 0x4, + REG_PINFLAG_B_OUTPUT = 0x8 + } ; +typedef /* [public][public][public] */ struct __MIDL___MIDL_itf_strmif_0129_0005 + { + DWORD dwFlags; + UINT cInstances; + UINT nMediaTypes; + /* [size_is] */ const REGPINTYPES *lpMediaType; + UINT nMediums; + /* [size_is] */ const REGPINMEDIUM *lpMedium; + const CLSID *clsPinCategory; + } REGFILTERPINS2; + +typedef /* [public][public] */ struct __MIDL___MIDL_itf_strmif_0129_0006 + { + DWORD dwVersion; + DWORD dwMerit; + /* [switch_type][switch_is] */ union + { + /* [case()] */ struct + { + ULONG cPins; + /* [size_is] */ const REGFILTERPINS *rgPins; + } ; + /* [case()] */ struct + { + ULONG cPins2; + /* [size_is] */ const REGFILTERPINS2 *rgPins2; + } ; + /* [default] */ /* Empty union arm */ + } ; + } REGFILTER2; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0129_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0129_v0_0_s_ifspec; + +#ifndef __IFilterMapper2_INTERFACE_DEFINED__ +#define __IFilterMapper2_INTERFACE_DEFINED__ + +/* interface IFilterMapper2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IFilterMapper2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("b79bb0b0-33c1-11d1-abe1-00a0c905f375") + IFilterMapper2 : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE CreateCategory( + /* [in] */ REFCLSID clsidCategory, + /* [in] */ DWORD dwCategoryMerit, + /* [in] */ LPCWSTR Description) = 0; + + virtual HRESULT STDMETHODCALLTYPE UnregisterFilter( + /* [in] */ const CLSID *pclsidCategory, + /* [in] */ const OLECHAR *szInstance, + /* [in] */ REFCLSID Filter) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterFilter( + /* [in] */ REFCLSID clsidFilter, + /* [in] */ LPCWSTR Name, + /* [out][in] */ IMoniker **ppMoniker, + /* [in] */ const CLSID *pclsidCategory, + /* [in] */ const OLECHAR *szInstance, + /* [in] */ const REGFILTER2 *prf2) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumMatchingFilters( + /* [out] */ IEnumMoniker **ppEnum, + /* [in] */ DWORD dwFlags, + /* [in] */ BOOL bExactMatch, + /* [in] */ DWORD dwMerit, + /* [in] */ BOOL bInputNeeded, + /* [in] */ DWORD cInputTypes, + /* [size_is] */ const GUID *pInputTypes, + /* [in] */ const REGPINMEDIUM *pMedIn, + /* [in] */ const CLSID *pPinCategoryIn, + /* [in] */ BOOL bRender, + /* [in] */ BOOL bOutputNeeded, + /* [in] */ DWORD cOutputTypes, + /* [size_is] */ const GUID *pOutputTypes, + /* [in] */ const REGPINMEDIUM *pMedOut, + /* [in] */ const CLSID *pPinCategoryOut) = 0; + + }; + +#else /* C style interface */ + + typedef struct IFilterMapper2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IFilterMapper2 * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IFilterMapper2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IFilterMapper2 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateCategory )( + IFilterMapper2 * This, + /* [in] */ REFCLSID clsidCategory, + /* [in] */ DWORD dwCategoryMerit, + /* [in] */ LPCWSTR Description); + + HRESULT ( STDMETHODCALLTYPE *UnregisterFilter )( + IFilterMapper2 * This, + /* [in] */ const CLSID *pclsidCategory, + /* [in] */ const OLECHAR *szInstance, + /* [in] */ REFCLSID Filter); + + HRESULT ( STDMETHODCALLTYPE *RegisterFilter )( + IFilterMapper2 * This, + /* [in] */ REFCLSID clsidFilter, + /* [in] */ LPCWSTR Name, + /* [out][in] */ IMoniker **ppMoniker, + /* [in] */ const CLSID *pclsidCategory, + /* [in] */ const OLECHAR *szInstance, + /* [in] */ const REGFILTER2 *prf2); + + HRESULT ( STDMETHODCALLTYPE *EnumMatchingFilters )( + IFilterMapper2 * This, + /* [out] */ IEnumMoniker **ppEnum, + /* [in] */ DWORD dwFlags, + /* [in] */ BOOL bExactMatch, + /* [in] */ DWORD dwMerit, + /* [in] */ BOOL bInputNeeded, + /* [in] */ DWORD cInputTypes, + /* [size_is] */ const GUID *pInputTypes, + /* [in] */ const REGPINMEDIUM *pMedIn, + /* [in] */ const CLSID *pPinCategoryIn, + /* [in] */ BOOL bRender, + /* [in] */ BOOL bOutputNeeded, + /* [in] */ DWORD cOutputTypes, + /* [size_is] */ const GUID *pOutputTypes, + /* [in] */ const REGPINMEDIUM *pMedOut, + /* [in] */ const CLSID *pPinCategoryOut); + + END_INTERFACE + } IFilterMapper2Vtbl; + + interface IFilterMapper2 + { + CONST_VTBL struct IFilterMapper2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IFilterMapper2_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IFilterMapper2_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IFilterMapper2_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IFilterMapper2_CreateCategory(This,clsidCategory,dwCategoryMerit,Description) \ + (This)->lpVtbl -> CreateCategory(This,clsidCategory,dwCategoryMerit,Description) + +#define IFilterMapper2_UnregisterFilter(This,pclsidCategory,szInstance,Filter) \ + (This)->lpVtbl -> UnregisterFilter(This,pclsidCategory,szInstance,Filter) + +#define IFilterMapper2_RegisterFilter(This,clsidFilter,Name,ppMoniker,pclsidCategory,szInstance,prf2) \ + (This)->lpVtbl -> RegisterFilter(This,clsidFilter,Name,ppMoniker,pclsidCategory,szInstance,prf2) + +#define IFilterMapper2_EnumMatchingFilters(This,ppEnum,dwFlags,bExactMatch,dwMerit,bInputNeeded,cInputTypes,pInputTypes,pMedIn,pPinCategoryIn,bRender,bOutputNeeded,cOutputTypes,pOutputTypes,pMedOut,pPinCategoryOut) \ + (This)->lpVtbl -> EnumMatchingFilters(This,ppEnum,dwFlags,bExactMatch,dwMerit,bInputNeeded,cInputTypes,pInputTypes,pMedIn,pPinCategoryIn,bRender,bOutputNeeded,cOutputTypes,pOutputTypes,pMedOut,pPinCategoryOut) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IFilterMapper2_CreateCategory_Proxy( + IFilterMapper2 * This, + /* [in] */ REFCLSID clsidCategory, + /* [in] */ DWORD dwCategoryMerit, + /* [in] */ LPCWSTR Description); + + +void __RPC_STUB IFilterMapper2_CreateCategory_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterMapper2_UnregisterFilter_Proxy( + IFilterMapper2 * This, + /* [in] */ const CLSID *pclsidCategory, + /* [in] */ const OLECHAR *szInstance, + /* [in] */ REFCLSID Filter); + + +void __RPC_STUB IFilterMapper2_UnregisterFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterMapper2_RegisterFilter_Proxy( + IFilterMapper2 * This, + /* [in] */ REFCLSID clsidFilter, + /* [in] */ LPCWSTR Name, + /* [out][in] */ IMoniker **ppMoniker, + /* [in] */ const CLSID *pclsidCategory, + /* [in] */ const OLECHAR *szInstance, + /* [in] */ const REGFILTER2 *prf2); + + +void __RPC_STUB IFilterMapper2_RegisterFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterMapper2_EnumMatchingFilters_Proxy( + IFilterMapper2 * This, + /* [out] */ IEnumMoniker **ppEnum, + /* [in] */ DWORD dwFlags, + /* [in] */ BOOL bExactMatch, + /* [in] */ DWORD dwMerit, + /* [in] */ BOOL bInputNeeded, + /* [in] */ DWORD cInputTypes, + /* [size_is] */ const GUID *pInputTypes, + /* [in] */ const REGPINMEDIUM *pMedIn, + /* [in] */ const CLSID *pPinCategoryIn, + /* [in] */ BOOL bRender, + /* [in] */ BOOL bOutputNeeded, + /* [in] */ DWORD cOutputTypes, + /* [size_is] */ const GUID *pOutputTypes, + /* [in] */ const REGPINMEDIUM *pMedOut, + /* [in] */ const CLSID *pPinCategoryOut); + + +void __RPC_STUB IFilterMapper2_EnumMatchingFilters_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IFilterMapper2_INTERFACE_DEFINED__ */ + + +#ifndef __IFilterMapper3_INTERFACE_DEFINED__ +#define __IFilterMapper3_INTERFACE_DEFINED__ + +/* interface IFilterMapper3 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IFilterMapper3; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("b79bb0b1-33c1-11d1-abe1-00a0c905f375") + IFilterMapper3 : public IFilterMapper2 + { + public: + virtual HRESULT STDMETHODCALLTYPE GetICreateDevEnum( + /* [out] */ ICreateDevEnum **ppEnum) = 0; + + }; + +#else /* C style interface */ + + typedef struct IFilterMapper3Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IFilterMapper3 * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IFilterMapper3 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IFilterMapper3 * This); + + HRESULT ( STDMETHODCALLTYPE *CreateCategory )( + IFilterMapper3 * This, + /* [in] */ REFCLSID clsidCategory, + /* [in] */ DWORD dwCategoryMerit, + /* [in] */ LPCWSTR Description); + + HRESULT ( STDMETHODCALLTYPE *UnregisterFilter )( + IFilterMapper3 * This, + /* [in] */ const CLSID *pclsidCategory, + /* [in] */ const OLECHAR *szInstance, + /* [in] */ REFCLSID Filter); + + HRESULT ( STDMETHODCALLTYPE *RegisterFilter )( + IFilterMapper3 * This, + /* [in] */ REFCLSID clsidFilter, + /* [in] */ LPCWSTR Name, + /* [out][in] */ IMoniker **ppMoniker, + /* [in] */ const CLSID *pclsidCategory, + /* [in] */ const OLECHAR *szInstance, + /* [in] */ const REGFILTER2 *prf2); + + HRESULT ( STDMETHODCALLTYPE *EnumMatchingFilters )( + IFilterMapper3 * This, + /* [out] */ IEnumMoniker **ppEnum, + /* [in] */ DWORD dwFlags, + /* [in] */ BOOL bExactMatch, + /* [in] */ DWORD dwMerit, + /* [in] */ BOOL bInputNeeded, + /* [in] */ DWORD cInputTypes, + /* [size_is] */ const GUID *pInputTypes, + /* [in] */ const REGPINMEDIUM *pMedIn, + /* [in] */ const CLSID *pPinCategoryIn, + /* [in] */ BOOL bRender, + /* [in] */ BOOL bOutputNeeded, + /* [in] */ DWORD cOutputTypes, + /* [size_is] */ const GUID *pOutputTypes, + /* [in] */ const REGPINMEDIUM *pMedOut, + /* [in] */ const CLSID *pPinCategoryOut); + + HRESULT ( STDMETHODCALLTYPE *GetICreateDevEnum )( + IFilterMapper3 * This, + /* [out] */ ICreateDevEnum **ppEnum); + + END_INTERFACE + } IFilterMapper3Vtbl; + + interface IFilterMapper3 + { + CONST_VTBL struct IFilterMapper3Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IFilterMapper3_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IFilterMapper3_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IFilterMapper3_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IFilterMapper3_CreateCategory(This,clsidCategory,dwCategoryMerit,Description) \ + (This)->lpVtbl -> CreateCategory(This,clsidCategory,dwCategoryMerit,Description) + +#define IFilterMapper3_UnregisterFilter(This,pclsidCategory,szInstance,Filter) \ + (This)->lpVtbl -> UnregisterFilter(This,pclsidCategory,szInstance,Filter) + +#define IFilterMapper3_RegisterFilter(This,clsidFilter,Name,ppMoniker,pclsidCategory,szInstance,prf2) \ + (This)->lpVtbl -> RegisterFilter(This,clsidFilter,Name,ppMoniker,pclsidCategory,szInstance,prf2) + +#define IFilterMapper3_EnumMatchingFilters(This,ppEnum,dwFlags,bExactMatch,dwMerit,bInputNeeded,cInputTypes,pInputTypes,pMedIn,pPinCategoryIn,bRender,bOutputNeeded,cOutputTypes,pOutputTypes,pMedOut,pPinCategoryOut) \ + (This)->lpVtbl -> EnumMatchingFilters(This,ppEnum,dwFlags,bExactMatch,dwMerit,bInputNeeded,cInputTypes,pInputTypes,pMedIn,pPinCategoryIn,bRender,bOutputNeeded,cOutputTypes,pOutputTypes,pMedOut,pPinCategoryOut) + + +#define IFilterMapper3_GetICreateDevEnum(This,ppEnum) \ + (This)->lpVtbl -> GetICreateDevEnum(This,ppEnum) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IFilterMapper3_GetICreateDevEnum_Proxy( + IFilterMapper3 * This, + /* [out] */ ICreateDevEnum **ppEnum); + + +void __RPC_STUB IFilterMapper3_GetICreateDevEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IFilterMapper3_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0132 */ +/* [local] */ + +typedef +enum tagQualityMessageType + { Famine = 0, + Flood = Famine + 1 + } QualityMessageType; + +typedef struct tagQuality + { + QualityMessageType Type; + long Proportion; + REFERENCE_TIME Late; + REFERENCE_TIME TimeStamp; + } Quality; + +typedef IQualityControl *PQUALITYCONTROL; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0132_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0132_v0_0_s_ifspec; + +#ifndef __IQualityControl_INTERFACE_DEFINED__ +#define __IQualityControl_INTERFACE_DEFINED__ + +/* interface IQualityControl */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IQualityControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868a5-0ad4-11ce-b03a-0020af0ba770") + IQualityControl : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Notify( + /* [in] */ IBaseFilter *pSelf, + /* [in] */ Quality q) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSink( + /* [in] */ IQualityControl *piqc) = 0; + + }; + +#else /* C style interface */ + + typedef struct IQualityControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IQualityControl * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IQualityControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IQualityControl * This); + + HRESULT ( STDMETHODCALLTYPE *Notify )( + IQualityControl * This, + /* [in] */ IBaseFilter *pSelf, + /* [in] */ Quality q); + + HRESULT ( STDMETHODCALLTYPE *SetSink )( + IQualityControl * This, + /* [in] */ IQualityControl *piqc); + + END_INTERFACE + } IQualityControlVtbl; + + interface IQualityControl + { + CONST_VTBL struct IQualityControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IQualityControl_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IQualityControl_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IQualityControl_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IQualityControl_Notify(This,pSelf,q) \ + (This)->lpVtbl -> Notify(This,pSelf,q) + +#define IQualityControl_SetSink(This,piqc) \ + (This)->lpVtbl -> SetSink(This,piqc) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IQualityControl_Notify_Proxy( + IQualityControl * This, + /* [in] */ IBaseFilter *pSelf, + /* [in] */ Quality q); + + +void __RPC_STUB IQualityControl_Notify_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IQualityControl_SetSink_Proxy( + IQualityControl * This, + /* [in] */ IQualityControl *piqc); + + +void __RPC_STUB IQualityControl_SetSink_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IQualityControl_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0133 */ +/* [local] */ + + +enum __MIDL___MIDL_itf_strmif_0133_0001 + { CK_NOCOLORKEY = 0, + CK_INDEX = 0x1, + CK_RGB = 0x2 + } ; +typedef struct tagCOLORKEY + { + DWORD KeyType; + DWORD PaletteIndex; + COLORREF LowColorValue; + COLORREF HighColorValue; + } COLORKEY; + + +enum __MIDL___MIDL_itf_strmif_0133_0002 + { ADVISE_NONE = 0, + ADVISE_CLIPPING = 0x1, + ADVISE_PALETTE = 0x2, + ADVISE_COLORKEY = 0x4, + ADVISE_POSITION = 0x8, + ADVISE_DISPLAY_CHANGE = 0x10 + } ; +#define ADVISE_ALL ( ADVISE_CLIPPING | ADVISE_PALETTE | ADVISE_COLORKEY | ADVISE_POSITION ) + +#define ADVISE_ALL2 ( ADVISE_ALL | ADVISE_DISPLAY_CHANGE ) + +#ifndef _WINGDI_ +typedef struct _RGNDATAHEADER + { + DWORD dwSize; + DWORD iType; + DWORD nCount; + DWORD nRgnSize; + RECT rcBound; + } RGNDATAHEADER; + +typedef struct _RGNDATA + { + RGNDATAHEADER rdh; + char Buffer[ 1 ]; + } RGNDATA; + +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0133_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0133_v0_0_s_ifspec; + +#ifndef __IOverlayNotify_INTERFACE_DEFINED__ +#define __IOverlayNotify_INTERFACE_DEFINED__ + +/* interface IOverlayNotify */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IOverlayNotify; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868a0-0ad4-11ce-b03a-0020af0ba770") + IOverlayNotify : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE OnPaletteChange( + /* [in] */ DWORD dwColors, + /* [in] */ const PALETTEENTRY *pPalette) = 0; + + virtual HRESULT STDMETHODCALLTYPE OnClipChange( + /* [in] */ const RECT *pSourceRect, + /* [in] */ const RECT *pDestinationRect, + /* [in] */ const RGNDATA *pRgnData) = 0; + + virtual HRESULT STDMETHODCALLTYPE OnColorKeyChange( + /* [in] */ const COLORKEY *pColorKey) = 0; + + virtual HRESULT STDMETHODCALLTYPE OnPositionChange( + /* [in] */ const RECT *pSourceRect, + /* [in] */ const RECT *pDestinationRect) = 0; + + }; + +#else /* C style interface */ + + typedef struct IOverlayNotifyVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IOverlayNotify * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IOverlayNotify * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IOverlayNotify * This); + + HRESULT ( STDMETHODCALLTYPE *OnPaletteChange )( + IOverlayNotify * This, + /* [in] */ DWORD dwColors, + /* [in] */ const PALETTEENTRY *pPalette); + + HRESULT ( STDMETHODCALLTYPE *OnClipChange )( + IOverlayNotify * This, + /* [in] */ const RECT *pSourceRect, + /* [in] */ const RECT *pDestinationRect, + /* [in] */ const RGNDATA *pRgnData); + + HRESULT ( STDMETHODCALLTYPE *OnColorKeyChange )( + IOverlayNotify * This, + /* [in] */ const COLORKEY *pColorKey); + + HRESULT ( STDMETHODCALLTYPE *OnPositionChange )( + IOverlayNotify * This, + /* [in] */ const RECT *pSourceRect, + /* [in] */ const RECT *pDestinationRect); + + END_INTERFACE + } IOverlayNotifyVtbl; + + interface IOverlayNotify + { + CONST_VTBL struct IOverlayNotifyVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IOverlayNotify_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IOverlayNotify_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IOverlayNotify_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IOverlayNotify_OnPaletteChange(This,dwColors,pPalette) \ + (This)->lpVtbl -> OnPaletteChange(This,dwColors,pPalette) + +#define IOverlayNotify_OnClipChange(This,pSourceRect,pDestinationRect,pRgnData) \ + (This)->lpVtbl -> OnClipChange(This,pSourceRect,pDestinationRect,pRgnData) + +#define IOverlayNotify_OnColorKeyChange(This,pColorKey) \ + (This)->lpVtbl -> OnColorKeyChange(This,pColorKey) + +#define IOverlayNotify_OnPositionChange(This,pSourceRect,pDestinationRect) \ + (This)->lpVtbl -> OnPositionChange(This,pSourceRect,pDestinationRect) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IOverlayNotify_OnPaletteChange_Proxy( + IOverlayNotify * This, + /* [in] */ DWORD dwColors, + /* [in] */ const PALETTEENTRY *pPalette); + + +void __RPC_STUB IOverlayNotify_OnPaletteChange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IOverlayNotify_OnClipChange_Proxy( + IOverlayNotify * This, + /* [in] */ const RECT *pSourceRect, + /* [in] */ const RECT *pDestinationRect, + /* [in] */ const RGNDATA *pRgnData); + + +void __RPC_STUB IOverlayNotify_OnClipChange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IOverlayNotify_OnColorKeyChange_Proxy( + IOverlayNotify * This, + /* [in] */ const COLORKEY *pColorKey); + + +void __RPC_STUB IOverlayNotify_OnColorKeyChange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IOverlayNotify_OnPositionChange_Proxy( + IOverlayNotify * This, + /* [in] */ const RECT *pSourceRect, + /* [in] */ const RECT *pDestinationRect); + + +void __RPC_STUB IOverlayNotify_OnPositionChange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IOverlayNotify_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0134 */ +/* [local] */ + +typedef IOverlayNotify *POVERLAYNOTIFY; + +#if !defined(HMONITOR_DECLARED) && !defined(HMONITOR) && (WINVER < 0x0500) +#define HMONITOR_DECLARED +#if 0 +typedef HANDLE HMONITOR; + +#endif +DECLARE_HANDLE(HMONITOR); +#endif + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0134_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0134_v0_0_s_ifspec; + +#ifndef __IOverlayNotify2_INTERFACE_DEFINED__ +#define __IOverlayNotify2_INTERFACE_DEFINED__ + +/* interface IOverlayNotify2 */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IOverlayNotify2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("680EFA10-D535-11D1-87C8-00A0C9223196") + IOverlayNotify2 : public IOverlayNotify + { + public: + virtual HRESULT STDMETHODCALLTYPE OnDisplayChange( + HMONITOR hMonitor) = 0; + + }; + +#else /* C style interface */ + + typedef struct IOverlayNotify2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IOverlayNotify2 * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IOverlayNotify2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IOverlayNotify2 * This); + + HRESULT ( STDMETHODCALLTYPE *OnPaletteChange )( + IOverlayNotify2 * This, + /* [in] */ DWORD dwColors, + /* [in] */ const PALETTEENTRY *pPalette); + + HRESULT ( STDMETHODCALLTYPE *OnClipChange )( + IOverlayNotify2 * This, + /* [in] */ const RECT *pSourceRect, + /* [in] */ const RECT *pDestinationRect, + /* [in] */ const RGNDATA *pRgnData); + + HRESULT ( STDMETHODCALLTYPE *OnColorKeyChange )( + IOverlayNotify2 * This, + /* [in] */ const COLORKEY *pColorKey); + + HRESULT ( STDMETHODCALLTYPE *OnPositionChange )( + IOverlayNotify2 * This, + /* [in] */ const RECT *pSourceRect, + /* [in] */ const RECT *pDestinationRect); + + HRESULT ( STDMETHODCALLTYPE *OnDisplayChange )( + IOverlayNotify2 * This, + HMONITOR hMonitor); + + END_INTERFACE + } IOverlayNotify2Vtbl; + + interface IOverlayNotify2 + { + CONST_VTBL struct IOverlayNotify2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IOverlayNotify2_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IOverlayNotify2_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IOverlayNotify2_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IOverlayNotify2_OnPaletteChange(This,dwColors,pPalette) \ + (This)->lpVtbl -> OnPaletteChange(This,dwColors,pPalette) + +#define IOverlayNotify2_OnClipChange(This,pSourceRect,pDestinationRect,pRgnData) \ + (This)->lpVtbl -> OnClipChange(This,pSourceRect,pDestinationRect,pRgnData) + +#define IOverlayNotify2_OnColorKeyChange(This,pColorKey) \ + (This)->lpVtbl -> OnColorKeyChange(This,pColorKey) + +#define IOverlayNotify2_OnPositionChange(This,pSourceRect,pDestinationRect) \ + (This)->lpVtbl -> OnPositionChange(This,pSourceRect,pDestinationRect) + + +#define IOverlayNotify2_OnDisplayChange(This,hMonitor) \ + (This)->lpVtbl -> OnDisplayChange(This,hMonitor) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IOverlayNotify2_OnDisplayChange_Proxy( + IOverlayNotify2 * This, + HMONITOR hMonitor); + + +void __RPC_STUB IOverlayNotify2_OnDisplayChange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IOverlayNotify2_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0135 */ +/* [local] */ + +typedef IOverlayNotify2 *POVERLAYNOTIFY2; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0135_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0135_v0_0_s_ifspec; + +#ifndef __IOverlay_INTERFACE_DEFINED__ +#define __IOverlay_INTERFACE_DEFINED__ + +/* interface IOverlay */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IOverlay; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868a1-0ad4-11ce-b03a-0020af0ba770") + IOverlay : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetPalette( + /* [out] */ DWORD *pdwColors, + /* [out] */ PALETTEENTRY **ppPalette) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPalette( + /* [in] */ DWORD dwColors, + /* [in] */ PALETTEENTRY *pPalette) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDefaultColorKey( + /* [out] */ COLORKEY *pColorKey) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetColorKey( + /* [out] */ COLORKEY *pColorKey) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetColorKey( + /* [out][in] */ COLORKEY *pColorKey) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetWindowHandle( + /* [out] */ HWND *pHwnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetClipList( + /* [out] */ RECT *pSourceRect, + /* [out] */ RECT *pDestinationRect, + /* [out] */ RGNDATA **ppRgnData) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVideoPosition( + /* [out] */ RECT *pSourceRect, + /* [out] */ RECT *pDestinationRect) = 0; + + virtual HRESULT STDMETHODCALLTYPE Advise( + /* [in] */ IOverlayNotify *pOverlayNotify, + /* [in] */ DWORD dwInterests) = 0; + + virtual HRESULT STDMETHODCALLTYPE Unadvise( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IOverlayVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IOverlay * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IOverlay * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IOverlay * This); + + HRESULT ( STDMETHODCALLTYPE *GetPalette )( + IOverlay * This, + /* [out] */ DWORD *pdwColors, + /* [out] */ PALETTEENTRY **ppPalette); + + HRESULT ( STDMETHODCALLTYPE *SetPalette )( + IOverlay * This, + /* [in] */ DWORD dwColors, + /* [in] */ PALETTEENTRY *pPalette); + + HRESULT ( STDMETHODCALLTYPE *GetDefaultColorKey )( + IOverlay * This, + /* [out] */ COLORKEY *pColorKey); + + HRESULT ( STDMETHODCALLTYPE *GetColorKey )( + IOverlay * This, + /* [out] */ COLORKEY *pColorKey); + + HRESULT ( STDMETHODCALLTYPE *SetColorKey )( + IOverlay * This, + /* [out][in] */ COLORKEY *pColorKey); + + HRESULT ( STDMETHODCALLTYPE *GetWindowHandle )( + IOverlay * This, + /* [out] */ HWND *pHwnd); + + HRESULT ( STDMETHODCALLTYPE *GetClipList )( + IOverlay * This, + /* [out] */ RECT *pSourceRect, + /* [out] */ RECT *pDestinationRect, + /* [out] */ RGNDATA **ppRgnData); + + HRESULT ( STDMETHODCALLTYPE *GetVideoPosition )( + IOverlay * This, + /* [out] */ RECT *pSourceRect, + /* [out] */ RECT *pDestinationRect); + + HRESULT ( STDMETHODCALLTYPE *Advise )( + IOverlay * This, + /* [in] */ IOverlayNotify *pOverlayNotify, + /* [in] */ DWORD dwInterests); + + HRESULT ( STDMETHODCALLTYPE *Unadvise )( + IOverlay * This); + + END_INTERFACE + } IOverlayVtbl; + + interface IOverlay + { + CONST_VTBL struct IOverlayVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IOverlay_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IOverlay_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IOverlay_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IOverlay_GetPalette(This,pdwColors,ppPalette) \ + (This)->lpVtbl -> GetPalette(This,pdwColors,ppPalette) + +#define IOverlay_SetPalette(This,dwColors,pPalette) \ + (This)->lpVtbl -> SetPalette(This,dwColors,pPalette) + +#define IOverlay_GetDefaultColorKey(This,pColorKey) \ + (This)->lpVtbl -> GetDefaultColorKey(This,pColorKey) + +#define IOverlay_GetColorKey(This,pColorKey) \ + (This)->lpVtbl -> GetColorKey(This,pColorKey) + +#define IOverlay_SetColorKey(This,pColorKey) \ + (This)->lpVtbl -> SetColorKey(This,pColorKey) + +#define IOverlay_GetWindowHandle(This,pHwnd) \ + (This)->lpVtbl -> GetWindowHandle(This,pHwnd) + +#define IOverlay_GetClipList(This,pSourceRect,pDestinationRect,ppRgnData) \ + (This)->lpVtbl -> GetClipList(This,pSourceRect,pDestinationRect,ppRgnData) + +#define IOverlay_GetVideoPosition(This,pSourceRect,pDestinationRect) \ + (This)->lpVtbl -> GetVideoPosition(This,pSourceRect,pDestinationRect) + +#define IOverlay_Advise(This,pOverlayNotify,dwInterests) \ + (This)->lpVtbl -> Advise(This,pOverlayNotify,dwInterests) + +#define IOverlay_Unadvise(This) \ + (This)->lpVtbl -> Unadvise(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IOverlay_GetPalette_Proxy( + IOverlay * This, + /* [out] */ DWORD *pdwColors, + /* [out] */ PALETTEENTRY **ppPalette); + + +void __RPC_STUB IOverlay_GetPalette_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IOverlay_SetPalette_Proxy( + IOverlay * This, + /* [in] */ DWORD dwColors, + /* [in] */ PALETTEENTRY *pPalette); + + +void __RPC_STUB IOverlay_SetPalette_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IOverlay_GetDefaultColorKey_Proxy( + IOverlay * This, + /* [out] */ COLORKEY *pColorKey); + + +void __RPC_STUB IOverlay_GetDefaultColorKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IOverlay_GetColorKey_Proxy( + IOverlay * This, + /* [out] */ COLORKEY *pColorKey); + + +void __RPC_STUB IOverlay_GetColorKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IOverlay_SetColorKey_Proxy( + IOverlay * This, + /* [out][in] */ COLORKEY *pColorKey); + + +void __RPC_STUB IOverlay_SetColorKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IOverlay_GetWindowHandle_Proxy( + IOverlay * This, + /* [out] */ HWND *pHwnd); + + +void __RPC_STUB IOverlay_GetWindowHandle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IOverlay_GetClipList_Proxy( + IOverlay * This, + /* [out] */ RECT *pSourceRect, + /* [out] */ RECT *pDestinationRect, + /* [out] */ RGNDATA **ppRgnData); + + +void __RPC_STUB IOverlay_GetClipList_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IOverlay_GetVideoPosition_Proxy( + IOverlay * This, + /* [out] */ RECT *pSourceRect, + /* [out] */ RECT *pDestinationRect); + + +void __RPC_STUB IOverlay_GetVideoPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IOverlay_Advise_Proxy( + IOverlay * This, + /* [in] */ IOverlayNotify *pOverlayNotify, + /* [in] */ DWORD dwInterests); + + +void __RPC_STUB IOverlay_Advise_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IOverlay_Unadvise_Proxy( + IOverlay * This); + + +void __RPC_STUB IOverlay_Unadvise_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IOverlay_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0136 */ +/* [local] */ + +typedef IOverlay *POVERLAY; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0136_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0136_v0_0_s_ifspec; + +#ifndef __IMediaEventSink_INTERFACE_DEFINED__ +#define __IMediaEventSink_INTERFACE_DEFINED__ + +/* interface IMediaEventSink */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IMediaEventSink; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868a2-0ad4-11ce-b03a-0020af0ba770") + IMediaEventSink : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Notify( + /* [in] */ long EventCode, + /* [in] */ LONG_PTR EventParam1, + /* [in] */ LONG_PTR EventParam2) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaEventSinkVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaEventSink * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaEventSink * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaEventSink * This); + + HRESULT ( STDMETHODCALLTYPE *Notify )( + IMediaEventSink * This, + /* [in] */ long EventCode, + /* [in] */ LONG_PTR EventParam1, + /* [in] */ LONG_PTR EventParam2); + + END_INTERFACE + } IMediaEventSinkVtbl; + + interface IMediaEventSink + { + CONST_VTBL struct IMediaEventSinkVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaEventSink_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaEventSink_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaEventSink_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaEventSink_Notify(This,EventCode,EventParam1,EventParam2) \ + (This)->lpVtbl -> Notify(This,EventCode,EventParam1,EventParam2) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaEventSink_Notify_Proxy( + IMediaEventSink * This, + /* [in] */ long EventCode, + /* [in] */ LONG_PTR EventParam1, + /* [in] */ LONG_PTR EventParam2); + + +void __RPC_STUB IMediaEventSink_Notify_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaEventSink_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0137 */ +/* [local] */ + +typedef IMediaEventSink *PMEDIAEVENTSINK; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0137_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0137_v0_0_s_ifspec; + +#ifndef __IFileSourceFilter_INTERFACE_DEFINED__ +#define __IFileSourceFilter_INTERFACE_DEFINED__ + +/* interface IFileSourceFilter */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IFileSourceFilter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868a6-0ad4-11ce-b03a-0020af0ba770") + IFileSourceFilter : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Load( + /* [in] */ LPCOLESTR pszFileName, + /* [unique][in] */ const AM_MEDIA_TYPE *pmt) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurFile( + /* [out] */ LPOLESTR *ppszFileName, + /* [out] */ AM_MEDIA_TYPE *pmt) = 0; + + }; + +#else /* C style interface */ + + typedef struct IFileSourceFilterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IFileSourceFilter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IFileSourceFilter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IFileSourceFilter * This); + + HRESULT ( STDMETHODCALLTYPE *Load )( + IFileSourceFilter * This, + /* [in] */ LPCOLESTR pszFileName, + /* [unique][in] */ const AM_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *GetCurFile )( + IFileSourceFilter * This, + /* [out] */ LPOLESTR *ppszFileName, + /* [out] */ AM_MEDIA_TYPE *pmt); + + END_INTERFACE + } IFileSourceFilterVtbl; + + interface IFileSourceFilter + { + CONST_VTBL struct IFileSourceFilterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IFileSourceFilter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IFileSourceFilter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IFileSourceFilter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IFileSourceFilter_Load(This,pszFileName,pmt) \ + (This)->lpVtbl -> Load(This,pszFileName,pmt) + +#define IFileSourceFilter_GetCurFile(This,ppszFileName,pmt) \ + (This)->lpVtbl -> GetCurFile(This,ppszFileName,pmt) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IFileSourceFilter_Load_Proxy( + IFileSourceFilter * This, + /* [in] */ LPCOLESTR pszFileName, + /* [unique][in] */ const AM_MEDIA_TYPE *pmt); + + +void __RPC_STUB IFileSourceFilter_Load_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFileSourceFilter_GetCurFile_Proxy( + IFileSourceFilter * This, + /* [out] */ LPOLESTR *ppszFileName, + /* [out] */ AM_MEDIA_TYPE *pmt); + + +void __RPC_STUB IFileSourceFilter_GetCurFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IFileSourceFilter_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0138 */ +/* [local] */ + +typedef IFileSourceFilter *PFILTERFILESOURCE; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0138_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0138_v0_0_s_ifspec; + +#ifndef __IFileSinkFilter_INTERFACE_DEFINED__ +#define __IFileSinkFilter_INTERFACE_DEFINED__ + +/* interface IFileSinkFilter */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IFileSinkFilter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("a2104830-7c70-11cf-8bce-00aa00a3f1a6") + IFileSinkFilter : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetFileName( + /* [in] */ LPCOLESTR pszFileName, + /* [unique][in] */ const AM_MEDIA_TYPE *pmt) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurFile( + /* [out] */ LPOLESTR *ppszFileName, + /* [out] */ AM_MEDIA_TYPE *pmt) = 0; + + }; + +#else /* C style interface */ + + typedef struct IFileSinkFilterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IFileSinkFilter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IFileSinkFilter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IFileSinkFilter * This); + + HRESULT ( STDMETHODCALLTYPE *SetFileName )( + IFileSinkFilter * This, + /* [in] */ LPCOLESTR pszFileName, + /* [unique][in] */ const AM_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *GetCurFile )( + IFileSinkFilter * This, + /* [out] */ LPOLESTR *ppszFileName, + /* [out] */ AM_MEDIA_TYPE *pmt); + + END_INTERFACE + } IFileSinkFilterVtbl; + + interface IFileSinkFilter + { + CONST_VTBL struct IFileSinkFilterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IFileSinkFilter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IFileSinkFilter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IFileSinkFilter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IFileSinkFilter_SetFileName(This,pszFileName,pmt) \ + (This)->lpVtbl -> SetFileName(This,pszFileName,pmt) + +#define IFileSinkFilter_GetCurFile(This,ppszFileName,pmt) \ + (This)->lpVtbl -> GetCurFile(This,ppszFileName,pmt) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IFileSinkFilter_SetFileName_Proxy( + IFileSinkFilter * This, + /* [in] */ LPCOLESTR pszFileName, + /* [unique][in] */ const AM_MEDIA_TYPE *pmt); + + +void __RPC_STUB IFileSinkFilter_SetFileName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFileSinkFilter_GetCurFile_Proxy( + IFileSinkFilter * This, + /* [out] */ LPOLESTR *ppszFileName, + /* [out] */ AM_MEDIA_TYPE *pmt); + + +void __RPC_STUB IFileSinkFilter_GetCurFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IFileSinkFilter_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0139 */ +/* [local] */ + +typedef IFileSinkFilter *PFILTERFILESINK; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0139_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0139_v0_0_s_ifspec; + +#ifndef __IFileSinkFilter2_INTERFACE_DEFINED__ +#define __IFileSinkFilter2_INTERFACE_DEFINED__ + +/* interface IFileSinkFilter2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IFileSinkFilter2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("00855B90-CE1B-11d0-BD4F-00A0C911CE86") + IFileSinkFilter2 : public IFileSinkFilter + { + public: + virtual HRESULT STDMETHODCALLTYPE SetMode( + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMode( + /* [out] */ DWORD *pdwFlags) = 0; + + }; + +#else /* C style interface */ + + typedef struct IFileSinkFilter2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IFileSinkFilter2 * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IFileSinkFilter2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IFileSinkFilter2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetFileName )( + IFileSinkFilter2 * This, + /* [in] */ LPCOLESTR pszFileName, + /* [unique][in] */ const AM_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *GetCurFile )( + IFileSinkFilter2 * This, + /* [out] */ LPOLESTR *ppszFileName, + /* [out] */ AM_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *SetMode )( + IFileSinkFilter2 * This, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetMode )( + IFileSinkFilter2 * This, + /* [out] */ DWORD *pdwFlags); + + END_INTERFACE + } IFileSinkFilter2Vtbl; + + interface IFileSinkFilter2 + { + CONST_VTBL struct IFileSinkFilter2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IFileSinkFilter2_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IFileSinkFilter2_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IFileSinkFilter2_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IFileSinkFilter2_SetFileName(This,pszFileName,pmt) \ + (This)->lpVtbl -> SetFileName(This,pszFileName,pmt) + +#define IFileSinkFilter2_GetCurFile(This,ppszFileName,pmt) \ + (This)->lpVtbl -> GetCurFile(This,ppszFileName,pmt) + + +#define IFileSinkFilter2_SetMode(This,dwFlags) \ + (This)->lpVtbl -> SetMode(This,dwFlags) + +#define IFileSinkFilter2_GetMode(This,pdwFlags) \ + (This)->lpVtbl -> GetMode(This,pdwFlags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IFileSinkFilter2_SetMode_Proxy( + IFileSinkFilter2 * This, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IFileSinkFilter2_SetMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFileSinkFilter2_GetMode_Proxy( + IFileSinkFilter2 * This, + /* [out] */ DWORD *pdwFlags); + + +void __RPC_STUB IFileSinkFilter2_GetMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IFileSinkFilter2_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0140 */ +/* [local] */ + +typedef IFileSinkFilter2 *PFILESINKFILTER2; + +typedef /* [public] */ +enum __MIDL___MIDL_itf_strmif_0140_0001 + { AM_FILE_OVERWRITE = 0x1 + } AM_FILESINK_FLAGS; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0140_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0140_v0_0_s_ifspec; + +#ifndef __IGraphBuilder_INTERFACE_DEFINED__ +#define __IGraphBuilder_INTERFACE_DEFINED__ + +/* interface IGraphBuilder */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IGraphBuilder; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868a9-0ad4-11ce-b03a-0020af0ba770") + IGraphBuilder : public IFilterGraph + { + public: + virtual HRESULT STDMETHODCALLTYPE Connect( + /* [in] */ IPin *ppinOut, + /* [in] */ IPin *ppinIn) = 0; + + virtual HRESULT STDMETHODCALLTYPE Render( + /* [in] */ IPin *ppinOut) = 0; + + virtual HRESULT STDMETHODCALLTYPE RenderFile( + /* [in] */ LPCWSTR lpcwstrFile, + /* [unique][in] */ LPCWSTR lpcwstrPlayList) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddSourceFilter( + /* [in] */ LPCWSTR lpcwstrFileName, + /* [unique][in] */ LPCWSTR lpcwstrFilterName, + /* [out] */ IBaseFilter **ppFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetLogFile( + /* [in] */ DWORD_PTR hFile) = 0; + + virtual HRESULT STDMETHODCALLTYPE Abort( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE ShouldOperationContinue( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IGraphBuilderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IGraphBuilder * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IGraphBuilder * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IGraphBuilder * This); + + HRESULT ( STDMETHODCALLTYPE *AddFilter )( + IGraphBuilder * This, + /* [in] */ IBaseFilter *pFilter, + /* [string][in] */ LPCWSTR pName); + + HRESULT ( STDMETHODCALLTYPE *RemoveFilter )( + IGraphBuilder * This, + /* [in] */ IBaseFilter *pFilter); + + HRESULT ( STDMETHODCALLTYPE *EnumFilters )( + IGraphBuilder * This, + /* [out] */ IEnumFilters **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *FindFilterByName )( + IGraphBuilder * This, + /* [string][in] */ LPCWSTR pName, + /* [out] */ IBaseFilter **ppFilter); + + HRESULT ( STDMETHODCALLTYPE *ConnectDirect )( + IGraphBuilder * This, + /* [in] */ IPin *ppinOut, + /* [in] */ IPin *ppinIn, + /* [unique][in] */ const AM_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *Reconnect )( + IGraphBuilder * This, + /* [in] */ IPin *ppin); + + HRESULT ( STDMETHODCALLTYPE *Disconnect )( + IGraphBuilder * This, + /* [in] */ IPin *ppin); + + HRESULT ( STDMETHODCALLTYPE *SetDefaultSyncSource )( + IGraphBuilder * This); + + HRESULT ( STDMETHODCALLTYPE *Connect )( + IGraphBuilder * This, + /* [in] */ IPin *ppinOut, + /* [in] */ IPin *ppinIn); + + HRESULT ( STDMETHODCALLTYPE *Render )( + IGraphBuilder * This, + /* [in] */ IPin *ppinOut); + + HRESULT ( STDMETHODCALLTYPE *RenderFile )( + IGraphBuilder * This, + /* [in] */ LPCWSTR lpcwstrFile, + /* [unique][in] */ LPCWSTR lpcwstrPlayList); + + HRESULT ( STDMETHODCALLTYPE *AddSourceFilter )( + IGraphBuilder * This, + /* [in] */ LPCWSTR lpcwstrFileName, + /* [unique][in] */ LPCWSTR lpcwstrFilterName, + /* [out] */ IBaseFilter **ppFilter); + + HRESULT ( STDMETHODCALLTYPE *SetLogFile )( + IGraphBuilder * This, + /* [in] */ DWORD_PTR hFile); + + HRESULT ( STDMETHODCALLTYPE *Abort )( + IGraphBuilder * This); + + HRESULT ( STDMETHODCALLTYPE *ShouldOperationContinue )( + IGraphBuilder * This); + + END_INTERFACE + } IGraphBuilderVtbl; + + interface IGraphBuilder + { + CONST_VTBL struct IGraphBuilderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IGraphBuilder_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IGraphBuilder_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IGraphBuilder_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IGraphBuilder_AddFilter(This,pFilter,pName) \ + (This)->lpVtbl -> AddFilter(This,pFilter,pName) + +#define IGraphBuilder_RemoveFilter(This,pFilter) \ + (This)->lpVtbl -> RemoveFilter(This,pFilter) + +#define IGraphBuilder_EnumFilters(This,ppEnum) \ + (This)->lpVtbl -> EnumFilters(This,ppEnum) + +#define IGraphBuilder_FindFilterByName(This,pName,ppFilter) \ + (This)->lpVtbl -> FindFilterByName(This,pName,ppFilter) + +#define IGraphBuilder_ConnectDirect(This,ppinOut,ppinIn,pmt) \ + (This)->lpVtbl -> ConnectDirect(This,ppinOut,ppinIn,pmt) + +#define IGraphBuilder_Reconnect(This,ppin) \ + (This)->lpVtbl -> Reconnect(This,ppin) + +#define IGraphBuilder_Disconnect(This,ppin) \ + (This)->lpVtbl -> Disconnect(This,ppin) + +#define IGraphBuilder_SetDefaultSyncSource(This) \ + (This)->lpVtbl -> SetDefaultSyncSource(This) + + +#define IGraphBuilder_Connect(This,ppinOut,ppinIn) \ + (This)->lpVtbl -> Connect(This,ppinOut,ppinIn) + +#define IGraphBuilder_Render(This,ppinOut) \ + (This)->lpVtbl -> Render(This,ppinOut) + +#define IGraphBuilder_RenderFile(This,lpcwstrFile,lpcwstrPlayList) \ + (This)->lpVtbl -> RenderFile(This,lpcwstrFile,lpcwstrPlayList) + +#define IGraphBuilder_AddSourceFilter(This,lpcwstrFileName,lpcwstrFilterName,ppFilter) \ + (This)->lpVtbl -> AddSourceFilter(This,lpcwstrFileName,lpcwstrFilterName,ppFilter) + +#define IGraphBuilder_SetLogFile(This,hFile) \ + (This)->lpVtbl -> SetLogFile(This,hFile) + +#define IGraphBuilder_Abort(This) \ + (This)->lpVtbl -> Abort(This) + +#define IGraphBuilder_ShouldOperationContinue(This) \ + (This)->lpVtbl -> ShouldOperationContinue(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IGraphBuilder_Connect_Proxy( + IGraphBuilder * This, + /* [in] */ IPin *ppinOut, + /* [in] */ IPin *ppinIn); + + +void __RPC_STUB IGraphBuilder_Connect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IGraphBuilder_Render_Proxy( + IGraphBuilder * This, + /* [in] */ IPin *ppinOut); + + +void __RPC_STUB IGraphBuilder_Render_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IGraphBuilder_RenderFile_Proxy( + IGraphBuilder * This, + /* [in] */ LPCWSTR lpcwstrFile, + /* [unique][in] */ LPCWSTR lpcwstrPlayList); + + +void __RPC_STUB IGraphBuilder_RenderFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IGraphBuilder_AddSourceFilter_Proxy( + IGraphBuilder * This, + /* [in] */ LPCWSTR lpcwstrFileName, + /* [unique][in] */ LPCWSTR lpcwstrFilterName, + /* [out] */ IBaseFilter **ppFilter); + + +void __RPC_STUB IGraphBuilder_AddSourceFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IGraphBuilder_SetLogFile_Proxy( + IGraphBuilder * This, + /* [in] */ DWORD_PTR hFile); + + +void __RPC_STUB IGraphBuilder_SetLogFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IGraphBuilder_Abort_Proxy( + IGraphBuilder * This); + + +void __RPC_STUB IGraphBuilder_Abort_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IGraphBuilder_ShouldOperationContinue_Proxy( + IGraphBuilder * This); + + +void __RPC_STUB IGraphBuilder_ShouldOperationContinue_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IGraphBuilder_INTERFACE_DEFINED__ */ + + +#ifndef __ICaptureGraphBuilder_INTERFACE_DEFINED__ +#define __ICaptureGraphBuilder_INTERFACE_DEFINED__ + +/* interface ICaptureGraphBuilder */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_ICaptureGraphBuilder; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("bf87b6e0-8c27-11d0-b3f0-00aa003761c5") + ICaptureGraphBuilder : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetFiltergraph( + /* [in] */ IGraphBuilder *pfg) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFiltergraph( + /* [out] */ IGraphBuilder **ppfg) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOutputFileName( + /* [in] */ const GUID *pType, + /* [in] */ LPCOLESTR lpstrFile, + /* [out] */ IBaseFilter **ppf, + /* [out] */ IFileSinkFilter **ppSink) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE FindInterface( + /* [unique][in] */ const GUID *pCategory, + /* [in] */ IBaseFilter *pf, + /* [in] */ REFIID riid, + /* [out] */ void **ppint) = 0; + + virtual HRESULT STDMETHODCALLTYPE RenderStream( + /* [in] */ const GUID *pCategory, + /* [in] */ IUnknown *pSource, + /* [in] */ IBaseFilter *pfCompressor, + /* [in] */ IBaseFilter *pfRenderer) = 0; + + virtual HRESULT STDMETHODCALLTYPE ControlStream( + /* [in] */ const GUID *pCategory, + /* [in] */ IBaseFilter *pFilter, + /* [in] */ REFERENCE_TIME *pstart, + /* [in] */ REFERENCE_TIME *pstop, + /* [in] */ WORD wStartCookie, + /* [in] */ WORD wStopCookie) = 0; + + virtual HRESULT STDMETHODCALLTYPE AllocCapFile( + /* [in] */ LPCOLESTR lpstr, + /* [in] */ DWORDLONG dwlSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE CopyCaptureFile( + /* [in] */ LPOLESTR lpwstrOld, + /* [in] */ LPOLESTR lpwstrNew, + /* [in] */ int fAllowEscAbort, + /* [in] */ IAMCopyCaptureFileProgress *pCallback) = 0; + + }; + +#else /* C style interface */ + + typedef struct ICaptureGraphBuilderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ICaptureGraphBuilder * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ICaptureGraphBuilder * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ICaptureGraphBuilder * This); + + HRESULT ( STDMETHODCALLTYPE *SetFiltergraph )( + ICaptureGraphBuilder * This, + /* [in] */ IGraphBuilder *pfg); + + HRESULT ( STDMETHODCALLTYPE *GetFiltergraph )( + ICaptureGraphBuilder * This, + /* [out] */ IGraphBuilder **ppfg); + + HRESULT ( STDMETHODCALLTYPE *SetOutputFileName )( + ICaptureGraphBuilder * This, + /* [in] */ const GUID *pType, + /* [in] */ LPCOLESTR lpstrFile, + /* [out] */ IBaseFilter **ppf, + /* [out] */ IFileSinkFilter **ppSink); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *FindInterface )( + ICaptureGraphBuilder * This, + /* [unique][in] */ const GUID *pCategory, + /* [in] */ IBaseFilter *pf, + /* [in] */ REFIID riid, + /* [out] */ void **ppint); + + HRESULT ( STDMETHODCALLTYPE *RenderStream )( + ICaptureGraphBuilder * This, + /* [in] */ const GUID *pCategory, + /* [in] */ IUnknown *pSource, + /* [in] */ IBaseFilter *pfCompressor, + /* [in] */ IBaseFilter *pfRenderer); + + HRESULT ( STDMETHODCALLTYPE *ControlStream )( + ICaptureGraphBuilder * This, + /* [in] */ const GUID *pCategory, + /* [in] */ IBaseFilter *pFilter, + /* [in] */ REFERENCE_TIME *pstart, + /* [in] */ REFERENCE_TIME *pstop, + /* [in] */ WORD wStartCookie, + /* [in] */ WORD wStopCookie); + + HRESULT ( STDMETHODCALLTYPE *AllocCapFile )( + ICaptureGraphBuilder * This, + /* [in] */ LPCOLESTR lpstr, + /* [in] */ DWORDLONG dwlSize); + + HRESULT ( STDMETHODCALLTYPE *CopyCaptureFile )( + ICaptureGraphBuilder * This, + /* [in] */ LPOLESTR lpwstrOld, + /* [in] */ LPOLESTR lpwstrNew, + /* [in] */ int fAllowEscAbort, + /* [in] */ IAMCopyCaptureFileProgress *pCallback); + + END_INTERFACE + } ICaptureGraphBuilderVtbl; + + interface ICaptureGraphBuilder + { + CONST_VTBL struct ICaptureGraphBuilderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ICaptureGraphBuilder_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ICaptureGraphBuilder_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ICaptureGraphBuilder_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ICaptureGraphBuilder_SetFiltergraph(This,pfg) \ + (This)->lpVtbl -> SetFiltergraph(This,pfg) + +#define ICaptureGraphBuilder_GetFiltergraph(This,ppfg) \ + (This)->lpVtbl -> GetFiltergraph(This,ppfg) + +#define ICaptureGraphBuilder_SetOutputFileName(This,pType,lpstrFile,ppf,ppSink) \ + (This)->lpVtbl -> SetOutputFileName(This,pType,lpstrFile,ppf,ppSink) + +#define ICaptureGraphBuilder_FindInterface(This,pCategory,pf,riid,ppint) \ + (This)->lpVtbl -> FindInterface(This,pCategory,pf,riid,ppint) + +#define ICaptureGraphBuilder_RenderStream(This,pCategory,pSource,pfCompressor,pfRenderer) \ + (This)->lpVtbl -> RenderStream(This,pCategory,pSource,pfCompressor,pfRenderer) + +#define ICaptureGraphBuilder_ControlStream(This,pCategory,pFilter,pstart,pstop,wStartCookie,wStopCookie) \ + (This)->lpVtbl -> ControlStream(This,pCategory,pFilter,pstart,pstop,wStartCookie,wStopCookie) + +#define ICaptureGraphBuilder_AllocCapFile(This,lpstr,dwlSize) \ + (This)->lpVtbl -> AllocCapFile(This,lpstr,dwlSize) + +#define ICaptureGraphBuilder_CopyCaptureFile(This,lpwstrOld,lpwstrNew,fAllowEscAbort,pCallback) \ + (This)->lpVtbl -> CopyCaptureFile(This,lpwstrOld,lpwstrNew,fAllowEscAbort,pCallback) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder_SetFiltergraph_Proxy( + ICaptureGraphBuilder * This, + /* [in] */ IGraphBuilder *pfg); + + +void __RPC_STUB ICaptureGraphBuilder_SetFiltergraph_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder_GetFiltergraph_Proxy( + ICaptureGraphBuilder * This, + /* [out] */ IGraphBuilder **ppfg); + + +void __RPC_STUB ICaptureGraphBuilder_GetFiltergraph_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder_SetOutputFileName_Proxy( + ICaptureGraphBuilder * This, + /* [in] */ const GUID *pType, + /* [in] */ LPCOLESTR lpstrFile, + /* [out] */ IBaseFilter **ppf, + /* [out] */ IFileSinkFilter **ppSink); + + +void __RPC_STUB ICaptureGraphBuilder_SetOutputFileName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [call_as] */ HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder_RemoteFindInterface_Proxy( + ICaptureGraphBuilder * This, + /* [unique][in] */ const GUID *pCategory, + /* [in] */ IBaseFilter *pf, + /* [in] */ REFIID riid, + /* [out] */ IUnknown **ppint); + + +void __RPC_STUB ICaptureGraphBuilder_RemoteFindInterface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder_RenderStream_Proxy( + ICaptureGraphBuilder * This, + /* [in] */ const GUID *pCategory, + /* [in] */ IUnknown *pSource, + /* [in] */ IBaseFilter *pfCompressor, + /* [in] */ IBaseFilter *pfRenderer); + + +void __RPC_STUB ICaptureGraphBuilder_RenderStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder_ControlStream_Proxy( + ICaptureGraphBuilder * This, + /* [in] */ const GUID *pCategory, + /* [in] */ IBaseFilter *pFilter, + /* [in] */ REFERENCE_TIME *pstart, + /* [in] */ REFERENCE_TIME *pstop, + /* [in] */ WORD wStartCookie, + /* [in] */ WORD wStopCookie); + + +void __RPC_STUB ICaptureGraphBuilder_ControlStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder_AllocCapFile_Proxy( + ICaptureGraphBuilder * This, + /* [in] */ LPCOLESTR lpstr, + /* [in] */ DWORDLONG dwlSize); + + +void __RPC_STUB ICaptureGraphBuilder_AllocCapFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder_CopyCaptureFile_Proxy( + ICaptureGraphBuilder * This, + /* [in] */ LPOLESTR lpwstrOld, + /* [in] */ LPOLESTR lpwstrNew, + /* [in] */ int fAllowEscAbort, + /* [in] */ IAMCopyCaptureFileProgress *pCallback); + + +void __RPC_STUB ICaptureGraphBuilder_CopyCaptureFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ICaptureGraphBuilder_INTERFACE_DEFINED__ */ + + +#ifndef __IAMCopyCaptureFileProgress_INTERFACE_DEFINED__ +#define __IAMCopyCaptureFileProgress_INTERFACE_DEFINED__ + +/* interface IAMCopyCaptureFileProgress */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMCopyCaptureFileProgress; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("670d1d20-a068-11d0-b3f0-00aa003761c5") + IAMCopyCaptureFileProgress : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Progress( + /* [in] */ int iProgress) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMCopyCaptureFileProgressVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMCopyCaptureFileProgress * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMCopyCaptureFileProgress * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMCopyCaptureFileProgress * This); + + HRESULT ( STDMETHODCALLTYPE *Progress )( + IAMCopyCaptureFileProgress * This, + /* [in] */ int iProgress); + + END_INTERFACE + } IAMCopyCaptureFileProgressVtbl; + + interface IAMCopyCaptureFileProgress + { + CONST_VTBL struct IAMCopyCaptureFileProgressVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMCopyCaptureFileProgress_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMCopyCaptureFileProgress_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMCopyCaptureFileProgress_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMCopyCaptureFileProgress_Progress(This,iProgress) \ + (This)->lpVtbl -> Progress(This,iProgress) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMCopyCaptureFileProgress_Progress_Proxy( + IAMCopyCaptureFileProgress * This, + /* [in] */ int iProgress); + + +void __RPC_STUB IAMCopyCaptureFileProgress_Progress_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMCopyCaptureFileProgress_INTERFACE_DEFINED__ */ + + +#ifndef __ICaptureGraphBuilder2_INTERFACE_DEFINED__ +#define __ICaptureGraphBuilder2_INTERFACE_DEFINED__ + +/* interface ICaptureGraphBuilder2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_ICaptureGraphBuilder2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("93E5A4E0-2D50-11d2-ABFA-00A0C9C6E38D") + ICaptureGraphBuilder2 : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetFiltergraph( + /* [in] */ IGraphBuilder *pfg) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFiltergraph( + /* [out] */ IGraphBuilder **ppfg) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOutputFileName( + /* [in] */ const GUID *pType, + /* [in] */ LPCOLESTR lpstrFile, + /* [out] */ IBaseFilter **ppf, + /* [out] */ IFileSinkFilter **ppSink) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE FindInterface( + /* [in] */ const GUID *pCategory, + /* [in] */ const GUID *pType, + /* [in] */ IBaseFilter *pf, + /* [in] */ REFIID riid, + /* [out] */ void **ppint) = 0; + + virtual HRESULT STDMETHODCALLTYPE RenderStream( + /* [in] */ const GUID *pCategory, + /* [in] */ const GUID *pType, + /* [in] */ IUnknown *pSource, + /* [in] */ IBaseFilter *pfCompressor, + /* [in] */ IBaseFilter *pfRenderer) = 0; + + virtual HRESULT STDMETHODCALLTYPE ControlStream( + /* [in] */ const GUID *pCategory, + /* [in] */ const GUID *pType, + /* [in] */ IBaseFilter *pFilter, + /* [in] */ REFERENCE_TIME *pstart, + /* [in] */ REFERENCE_TIME *pstop, + /* [in] */ WORD wStartCookie, + /* [in] */ WORD wStopCookie) = 0; + + virtual HRESULT STDMETHODCALLTYPE AllocCapFile( + /* [in] */ LPCOLESTR lpstr, + /* [in] */ DWORDLONG dwlSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE CopyCaptureFile( + /* [in] */ LPOLESTR lpwstrOld, + /* [in] */ LPOLESTR lpwstrNew, + /* [in] */ int fAllowEscAbort, + /* [in] */ IAMCopyCaptureFileProgress *pCallback) = 0; + + virtual HRESULT STDMETHODCALLTYPE FindPin( + /* [in] */ IUnknown *pSource, + /* [in] */ PIN_DIRECTION pindir, + /* [in] */ const GUID *pCategory, + /* [in] */ const GUID *pType, + /* [in] */ BOOL fUnconnected, + /* [in] */ int num, + /* [out] */ IPin **ppPin) = 0; + + }; + +#else /* C style interface */ + + typedef struct ICaptureGraphBuilder2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ICaptureGraphBuilder2 * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ICaptureGraphBuilder2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ICaptureGraphBuilder2 * This); + + HRESULT ( STDMETHODCALLTYPE *SetFiltergraph )( + ICaptureGraphBuilder2 * This, + /* [in] */ IGraphBuilder *pfg); + + HRESULT ( STDMETHODCALLTYPE *GetFiltergraph )( + ICaptureGraphBuilder2 * This, + /* [out] */ IGraphBuilder **ppfg); + + HRESULT ( STDMETHODCALLTYPE *SetOutputFileName )( + ICaptureGraphBuilder2 * This, + /* [in] */ const GUID *pType, + /* [in] */ LPCOLESTR lpstrFile, + /* [out] */ IBaseFilter **ppf, + /* [out] */ IFileSinkFilter **ppSink); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *FindInterface )( + ICaptureGraphBuilder2 * This, + /* [in] */ const GUID *pCategory, + /* [in] */ const GUID *pType, + /* [in] */ IBaseFilter *pf, + /* [in] */ REFIID riid, + /* [out] */ void **ppint); + + HRESULT ( STDMETHODCALLTYPE *RenderStream )( + ICaptureGraphBuilder2 * This, + /* [in] */ const GUID *pCategory, + /* [in] */ const GUID *pType, + /* [in] */ IUnknown *pSource, + /* [in] */ IBaseFilter *pfCompressor, + /* [in] */ IBaseFilter *pfRenderer); + + HRESULT ( STDMETHODCALLTYPE *ControlStream )( + ICaptureGraphBuilder2 * This, + /* [in] */ const GUID *pCategory, + /* [in] */ const GUID *pType, + /* [in] */ IBaseFilter *pFilter, + /* [in] */ REFERENCE_TIME *pstart, + /* [in] */ REFERENCE_TIME *pstop, + /* [in] */ WORD wStartCookie, + /* [in] */ WORD wStopCookie); + + HRESULT ( STDMETHODCALLTYPE *AllocCapFile )( + ICaptureGraphBuilder2 * This, + /* [in] */ LPCOLESTR lpstr, + /* [in] */ DWORDLONG dwlSize); + + HRESULT ( STDMETHODCALLTYPE *CopyCaptureFile )( + ICaptureGraphBuilder2 * This, + /* [in] */ LPOLESTR lpwstrOld, + /* [in] */ LPOLESTR lpwstrNew, + /* [in] */ int fAllowEscAbort, + /* [in] */ IAMCopyCaptureFileProgress *pCallback); + + HRESULT ( STDMETHODCALLTYPE *FindPin )( + ICaptureGraphBuilder2 * This, + /* [in] */ IUnknown *pSource, + /* [in] */ PIN_DIRECTION pindir, + /* [in] */ const GUID *pCategory, + /* [in] */ const GUID *pType, + /* [in] */ BOOL fUnconnected, + /* [in] */ int num, + /* [out] */ IPin **ppPin); + + END_INTERFACE + } ICaptureGraphBuilder2Vtbl; + + interface ICaptureGraphBuilder2 + { + CONST_VTBL struct ICaptureGraphBuilder2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ICaptureGraphBuilder2_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ICaptureGraphBuilder2_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ICaptureGraphBuilder2_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ICaptureGraphBuilder2_SetFiltergraph(This,pfg) \ + (This)->lpVtbl -> SetFiltergraph(This,pfg) + +#define ICaptureGraphBuilder2_GetFiltergraph(This,ppfg) \ + (This)->lpVtbl -> GetFiltergraph(This,ppfg) + +#define ICaptureGraphBuilder2_SetOutputFileName(This,pType,lpstrFile,ppf,ppSink) \ + (This)->lpVtbl -> SetOutputFileName(This,pType,lpstrFile,ppf,ppSink) + +#define ICaptureGraphBuilder2_FindInterface(This,pCategory,pType,pf,riid,ppint) \ + (This)->lpVtbl -> FindInterface(This,pCategory,pType,pf,riid,ppint) + +#define ICaptureGraphBuilder2_RenderStream(This,pCategory,pType,pSource,pfCompressor,pfRenderer) \ + (This)->lpVtbl -> RenderStream(This,pCategory,pType,pSource,pfCompressor,pfRenderer) + +#define ICaptureGraphBuilder2_ControlStream(This,pCategory,pType,pFilter,pstart,pstop,wStartCookie,wStopCookie) \ + (This)->lpVtbl -> ControlStream(This,pCategory,pType,pFilter,pstart,pstop,wStartCookie,wStopCookie) + +#define ICaptureGraphBuilder2_AllocCapFile(This,lpstr,dwlSize) \ + (This)->lpVtbl -> AllocCapFile(This,lpstr,dwlSize) + +#define ICaptureGraphBuilder2_CopyCaptureFile(This,lpwstrOld,lpwstrNew,fAllowEscAbort,pCallback) \ + (This)->lpVtbl -> CopyCaptureFile(This,lpwstrOld,lpwstrNew,fAllowEscAbort,pCallback) + +#define ICaptureGraphBuilder2_FindPin(This,pSource,pindir,pCategory,pType,fUnconnected,num,ppPin) \ + (This)->lpVtbl -> FindPin(This,pSource,pindir,pCategory,pType,fUnconnected,num,ppPin) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder2_SetFiltergraph_Proxy( + ICaptureGraphBuilder2 * This, + /* [in] */ IGraphBuilder *pfg); + + +void __RPC_STUB ICaptureGraphBuilder2_SetFiltergraph_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder2_GetFiltergraph_Proxy( + ICaptureGraphBuilder2 * This, + /* [out] */ IGraphBuilder **ppfg); + + +void __RPC_STUB ICaptureGraphBuilder2_GetFiltergraph_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder2_SetOutputFileName_Proxy( + ICaptureGraphBuilder2 * This, + /* [in] */ const GUID *pType, + /* [in] */ LPCOLESTR lpstrFile, + /* [out] */ IBaseFilter **ppf, + /* [out] */ IFileSinkFilter **ppSink); + + +void __RPC_STUB ICaptureGraphBuilder2_SetOutputFileName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [call_as] */ HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder2_RemoteFindInterface_Proxy( + ICaptureGraphBuilder2 * This, + /* [in] */ const GUID *pCategory, + /* [in] */ const GUID *pType, + /* [in] */ IBaseFilter *pf, + /* [in] */ REFIID riid, + /* [out] */ IUnknown **ppint); + + +void __RPC_STUB ICaptureGraphBuilder2_RemoteFindInterface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder2_RenderStream_Proxy( + ICaptureGraphBuilder2 * This, + /* [in] */ const GUID *pCategory, + /* [in] */ const GUID *pType, + /* [in] */ IUnknown *pSource, + /* [in] */ IBaseFilter *pfCompressor, + /* [in] */ IBaseFilter *pfRenderer); + + +void __RPC_STUB ICaptureGraphBuilder2_RenderStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder2_ControlStream_Proxy( + ICaptureGraphBuilder2 * This, + /* [in] */ const GUID *pCategory, + /* [in] */ const GUID *pType, + /* [in] */ IBaseFilter *pFilter, + /* [in] */ REFERENCE_TIME *pstart, + /* [in] */ REFERENCE_TIME *pstop, + /* [in] */ WORD wStartCookie, + /* [in] */ WORD wStopCookie); + + +void __RPC_STUB ICaptureGraphBuilder2_ControlStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder2_AllocCapFile_Proxy( + ICaptureGraphBuilder2 * This, + /* [in] */ LPCOLESTR lpstr, + /* [in] */ DWORDLONG dwlSize); + + +void __RPC_STUB ICaptureGraphBuilder2_AllocCapFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder2_CopyCaptureFile_Proxy( + ICaptureGraphBuilder2 * This, + /* [in] */ LPOLESTR lpwstrOld, + /* [in] */ LPOLESTR lpwstrNew, + /* [in] */ int fAllowEscAbort, + /* [in] */ IAMCopyCaptureFileProgress *pCallback); + + +void __RPC_STUB ICaptureGraphBuilder2_CopyCaptureFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder2_FindPin_Proxy( + ICaptureGraphBuilder2 * This, + /* [in] */ IUnknown *pSource, + /* [in] */ PIN_DIRECTION pindir, + /* [in] */ const GUID *pCategory, + /* [in] */ const GUID *pType, + /* [in] */ BOOL fUnconnected, + /* [in] */ int num, + /* [out] */ IPin **ppPin); + + +void __RPC_STUB ICaptureGraphBuilder2_FindPin_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ICaptureGraphBuilder2_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0144 */ +/* [local] */ + + +enum _AM_RENSDEREXFLAGS + { AM_RENDEREX_RENDERTOEXISTINGRENDERERS = 0x1 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0144_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0144_v0_0_s_ifspec; + +#ifndef __IFilterGraph2_INTERFACE_DEFINED__ +#define __IFilterGraph2_INTERFACE_DEFINED__ + +/* interface IFilterGraph2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IFilterGraph2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("36b73882-c2c8-11cf-8b46-00805f6cef60") + IFilterGraph2 : public IGraphBuilder + { + public: + virtual HRESULT STDMETHODCALLTYPE AddSourceFilterForMoniker( + /* [in] */ IMoniker *pMoniker, + /* [in] */ IBindCtx *pCtx, + /* [unique][in] */ LPCWSTR lpcwstrFilterName, + /* [out] */ IBaseFilter **ppFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReconnectEx( + /* [in] */ IPin *ppin, + /* [unique][in] */ const AM_MEDIA_TYPE *pmt) = 0; + + virtual HRESULT STDMETHODCALLTYPE RenderEx( + /* [in] */ IPin *pPinOut, + /* [in] */ DWORD dwFlags, + /* [out][in] */ DWORD *pvContext) = 0; + + }; + +#else /* C style interface */ + + typedef struct IFilterGraph2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IFilterGraph2 * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IFilterGraph2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IFilterGraph2 * This); + + HRESULT ( STDMETHODCALLTYPE *AddFilter )( + IFilterGraph2 * This, + /* [in] */ IBaseFilter *pFilter, + /* [string][in] */ LPCWSTR pName); + + HRESULT ( STDMETHODCALLTYPE *RemoveFilter )( + IFilterGraph2 * This, + /* [in] */ IBaseFilter *pFilter); + + HRESULT ( STDMETHODCALLTYPE *EnumFilters )( + IFilterGraph2 * This, + /* [out] */ IEnumFilters **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *FindFilterByName )( + IFilterGraph2 * This, + /* [string][in] */ LPCWSTR pName, + /* [out] */ IBaseFilter **ppFilter); + + HRESULT ( STDMETHODCALLTYPE *ConnectDirect )( + IFilterGraph2 * This, + /* [in] */ IPin *ppinOut, + /* [in] */ IPin *ppinIn, + /* [unique][in] */ const AM_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *Reconnect )( + IFilterGraph2 * This, + /* [in] */ IPin *ppin); + + HRESULT ( STDMETHODCALLTYPE *Disconnect )( + IFilterGraph2 * This, + /* [in] */ IPin *ppin); + + HRESULT ( STDMETHODCALLTYPE *SetDefaultSyncSource )( + IFilterGraph2 * This); + + HRESULT ( STDMETHODCALLTYPE *Connect )( + IFilterGraph2 * This, + /* [in] */ IPin *ppinOut, + /* [in] */ IPin *ppinIn); + + HRESULT ( STDMETHODCALLTYPE *Render )( + IFilterGraph2 * This, + /* [in] */ IPin *ppinOut); + + HRESULT ( STDMETHODCALLTYPE *RenderFile )( + IFilterGraph2 * This, + /* [in] */ LPCWSTR lpcwstrFile, + /* [unique][in] */ LPCWSTR lpcwstrPlayList); + + HRESULT ( STDMETHODCALLTYPE *AddSourceFilter )( + IFilterGraph2 * This, + /* [in] */ LPCWSTR lpcwstrFileName, + /* [unique][in] */ LPCWSTR lpcwstrFilterName, + /* [out] */ IBaseFilter **ppFilter); + + HRESULT ( STDMETHODCALLTYPE *SetLogFile )( + IFilterGraph2 * This, + /* [in] */ DWORD_PTR hFile); + + HRESULT ( STDMETHODCALLTYPE *Abort )( + IFilterGraph2 * This); + + HRESULT ( STDMETHODCALLTYPE *ShouldOperationContinue )( + IFilterGraph2 * This); + + HRESULT ( STDMETHODCALLTYPE *AddSourceFilterForMoniker )( + IFilterGraph2 * This, + /* [in] */ IMoniker *pMoniker, + /* [in] */ IBindCtx *pCtx, + /* [unique][in] */ LPCWSTR lpcwstrFilterName, + /* [out] */ IBaseFilter **ppFilter); + + HRESULT ( STDMETHODCALLTYPE *ReconnectEx )( + IFilterGraph2 * This, + /* [in] */ IPin *ppin, + /* [unique][in] */ const AM_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *RenderEx )( + IFilterGraph2 * This, + /* [in] */ IPin *pPinOut, + /* [in] */ DWORD dwFlags, + /* [out][in] */ DWORD *pvContext); + + END_INTERFACE + } IFilterGraph2Vtbl; + + interface IFilterGraph2 + { + CONST_VTBL struct IFilterGraph2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IFilterGraph2_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IFilterGraph2_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IFilterGraph2_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IFilterGraph2_AddFilter(This,pFilter,pName) \ + (This)->lpVtbl -> AddFilter(This,pFilter,pName) + +#define IFilterGraph2_RemoveFilter(This,pFilter) \ + (This)->lpVtbl -> RemoveFilter(This,pFilter) + +#define IFilterGraph2_EnumFilters(This,ppEnum) \ + (This)->lpVtbl -> EnumFilters(This,ppEnum) + +#define IFilterGraph2_FindFilterByName(This,pName,ppFilter) \ + (This)->lpVtbl -> FindFilterByName(This,pName,ppFilter) + +#define IFilterGraph2_ConnectDirect(This,ppinOut,ppinIn,pmt) \ + (This)->lpVtbl -> ConnectDirect(This,ppinOut,ppinIn,pmt) + +#define IFilterGraph2_Reconnect(This,ppin) \ + (This)->lpVtbl -> Reconnect(This,ppin) + +#define IFilterGraph2_Disconnect(This,ppin) \ + (This)->lpVtbl -> Disconnect(This,ppin) + +#define IFilterGraph2_SetDefaultSyncSource(This) \ + (This)->lpVtbl -> SetDefaultSyncSource(This) + + +#define IFilterGraph2_Connect(This,ppinOut,ppinIn) \ + (This)->lpVtbl -> Connect(This,ppinOut,ppinIn) + +#define IFilterGraph2_Render(This,ppinOut) \ + (This)->lpVtbl -> Render(This,ppinOut) + +#define IFilterGraph2_RenderFile(This,lpcwstrFile,lpcwstrPlayList) \ + (This)->lpVtbl -> RenderFile(This,lpcwstrFile,lpcwstrPlayList) + +#define IFilterGraph2_AddSourceFilter(This,lpcwstrFileName,lpcwstrFilterName,ppFilter) \ + (This)->lpVtbl -> AddSourceFilter(This,lpcwstrFileName,lpcwstrFilterName,ppFilter) + +#define IFilterGraph2_SetLogFile(This,hFile) \ + (This)->lpVtbl -> SetLogFile(This,hFile) + +#define IFilterGraph2_Abort(This) \ + (This)->lpVtbl -> Abort(This) + +#define IFilterGraph2_ShouldOperationContinue(This) \ + (This)->lpVtbl -> ShouldOperationContinue(This) + + +#define IFilterGraph2_AddSourceFilterForMoniker(This,pMoniker,pCtx,lpcwstrFilterName,ppFilter) \ + (This)->lpVtbl -> AddSourceFilterForMoniker(This,pMoniker,pCtx,lpcwstrFilterName,ppFilter) + +#define IFilterGraph2_ReconnectEx(This,ppin,pmt) \ + (This)->lpVtbl -> ReconnectEx(This,ppin,pmt) + +#define IFilterGraph2_RenderEx(This,pPinOut,dwFlags,pvContext) \ + (This)->lpVtbl -> RenderEx(This,pPinOut,dwFlags,pvContext) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IFilterGraph2_AddSourceFilterForMoniker_Proxy( + IFilterGraph2 * This, + /* [in] */ IMoniker *pMoniker, + /* [in] */ IBindCtx *pCtx, + /* [unique][in] */ LPCWSTR lpcwstrFilterName, + /* [out] */ IBaseFilter **ppFilter); + + +void __RPC_STUB IFilterGraph2_AddSourceFilterForMoniker_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterGraph2_ReconnectEx_Proxy( + IFilterGraph2 * This, + /* [in] */ IPin *ppin, + /* [unique][in] */ const AM_MEDIA_TYPE *pmt); + + +void __RPC_STUB IFilterGraph2_ReconnectEx_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterGraph2_RenderEx_Proxy( + IFilterGraph2 * This, + /* [in] */ IPin *pPinOut, + /* [in] */ DWORD dwFlags, + /* [out][in] */ DWORD *pvContext); + + +void __RPC_STUB IFilterGraph2_RenderEx_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IFilterGraph2_INTERFACE_DEFINED__ */ + + +#ifndef __IStreamBuilder_INTERFACE_DEFINED__ +#define __IStreamBuilder_INTERFACE_DEFINED__ + +/* interface IStreamBuilder */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IStreamBuilder; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868bf-0ad4-11ce-b03a-0020af0ba770") + IStreamBuilder : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Render( + /* [in] */ IPin *ppinOut, + /* [in] */ IGraphBuilder *pGraph) = 0; + + virtual HRESULT STDMETHODCALLTYPE Backout( + /* [in] */ IPin *ppinOut, + /* [in] */ IGraphBuilder *pGraph) = 0; + + }; + +#else /* C style interface */ + + typedef struct IStreamBuilderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IStreamBuilder * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IStreamBuilder * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IStreamBuilder * This); + + HRESULT ( STDMETHODCALLTYPE *Render )( + IStreamBuilder * This, + /* [in] */ IPin *ppinOut, + /* [in] */ IGraphBuilder *pGraph); + + HRESULT ( STDMETHODCALLTYPE *Backout )( + IStreamBuilder * This, + /* [in] */ IPin *ppinOut, + /* [in] */ IGraphBuilder *pGraph); + + END_INTERFACE + } IStreamBuilderVtbl; + + interface IStreamBuilder + { + CONST_VTBL struct IStreamBuilderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IStreamBuilder_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IStreamBuilder_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IStreamBuilder_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IStreamBuilder_Render(This,ppinOut,pGraph) \ + (This)->lpVtbl -> Render(This,ppinOut,pGraph) + +#define IStreamBuilder_Backout(This,ppinOut,pGraph) \ + (This)->lpVtbl -> Backout(This,ppinOut,pGraph) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IStreamBuilder_Render_Proxy( + IStreamBuilder * This, + /* [in] */ IPin *ppinOut, + /* [in] */ IGraphBuilder *pGraph); + + +void __RPC_STUB IStreamBuilder_Render_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IStreamBuilder_Backout_Proxy( + IStreamBuilder * This, + /* [in] */ IPin *ppinOut, + /* [in] */ IGraphBuilder *pGraph); + + +void __RPC_STUB IStreamBuilder_Backout_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IStreamBuilder_INTERFACE_DEFINED__ */ + + +#ifndef __IAsyncReader_INTERFACE_DEFINED__ +#define __IAsyncReader_INTERFACE_DEFINED__ + +/* interface IAsyncReader */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAsyncReader; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868aa-0ad4-11ce-b03a-0020af0ba770") + IAsyncReader : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE RequestAllocator( + /* [in] */ IMemAllocator *pPreferred, + /* [in] */ ALLOCATOR_PROPERTIES *pProps, + /* [out] */ IMemAllocator **ppActual) = 0; + + virtual HRESULT STDMETHODCALLTYPE Request( + /* [in] */ IMediaSample *pSample, + /* [in] */ DWORD_PTR dwUser) = 0; + + virtual HRESULT STDMETHODCALLTYPE WaitForNext( + /* [in] */ DWORD dwTimeout, + /* [out] */ IMediaSample **ppSample, + /* [out] */ DWORD_PTR *pdwUser) = 0; + + virtual HRESULT STDMETHODCALLTYPE SyncReadAligned( + /* [in] */ IMediaSample *pSample) = 0; + + virtual HRESULT STDMETHODCALLTYPE SyncRead( + /* [in] */ LONGLONG llPosition, + /* [in] */ LONG lLength, + /* [size_is][out] */ BYTE *pBuffer) = 0; + + virtual HRESULT STDMETHODCALLTYPE Length( + /* [out] */ LONGLONG *pTotal, + /* [out] */ LONGLONG *pAvailable) = 0; + + virtual HRESULT STDMETHODCALLTYPE BeginFlush( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE EndFlush( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAsyncReaderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAsyncReader * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAsyncReader * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAsyncReader * This); + + HRESULT ( STDMETHODCALLTYPE *RequestAllocator )( + IAsyncReader * This, + /* [in] */ IMemAllocator *pPreferred, + /* [in] */ ALLOCATOR_PROPERTIES *pProps, + /* [out] */ IMemAllocator **ppActual); + + HRESULT ( STDMETHODCALLTYPE *Request )( + IAsyncReader * This, + /* [in] */ IMediaSample *pSample, + /* [in] */ DWORD_PTR dwUser); + + HRESULT ( STDMETHODCALLTYPE *WaitForNext )( + IAsyncReader * This, + /* [in] */ DWORD dwTimeout, + /* [out] */ IMediaSample **ppSample, + /* [out] */ DWORD_PTR *pdwUser); + + HRESULT ( STDMETHODCALLTYPE *SyncReadAligned )( + IAsyncReader * This, + /* [in] */ IMediaSample *pSample); + + HRESULT ( STDMETHODCALLTYPE *SyncRead )( + IAsyncReader * This, + /* [in] */ LONGLONG llPosition, + /* [in] */ LONG lLength, + /* [size_is][out] */ BYTE *pBuffer); + + HRESULT ( STDMETHODCALLTYPE *Length )( + IAsyncReader * This, + /* [out] */ LONGLONG *pTotal, + /* [out] */ LONGLONG *pAvailable); + + HRESULT ( STDMETHODCALLTYPE *BeginFlush )( + IAsyncReader * This); + + HRESULT ( STDMETHODCALLTYPE *EndFlush )( + IAsyncReader * This); + + END_INTERFACE + } IAsyncReaderVtbl; + + interface IAsyncReader + { + CONST_VTBL struct IAsyncReaderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAsyncReader_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAsyncReader_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAsyncReader_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAsyncReader_RequestAllocator(This,pPreferred,pProps,ppActual) \ + (This)->lpVtbl -> RequestAllocator(This,pPreferred,pProps,ppActual) + +#define IAsyncReader_Request(This,pSample,dwUser) \ + (This)->lpVtbl -> Request(This,pSample,dwUser) + +#define IAsyncReader_WaitForNext(This,dwTimeout,ppSample,pdwUser) \ + (This)->lpVtbl -> WaitForNext(This,dwTimeout,ppSample,pdwUser) + +#define IAsyncReader_SyncReadAligned(This,pSample) \ + (This)->lpVtbl -> SyncReadAligned(This,pSample) + +#define IAsyncReader_SyncRead(This,llPosition,lLength,pBuffer) \ + (This)->lpVtbl -> SyncRead(This,llPosition,lLength,pBuffer) + +#define IAsyncReader_Length(This,pTotal,pAvailable) \ + (This)->lpVtbl -> Length(This,pTotal,pAvailable) + +#define IAsyncReader_BeginFlush(This) \ + (This)->lpVtbl -> BeginFlush(This) + +#define IAsyncReader_EndFlush(This) \ + (This)->lpVtbl -> EndFlush(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAsyncReader_RequestAllocator_Proxy( + IAsyncReader * This, + /* [in] */ IMemAllocator *pPreferred, + /* [in] */ ALLOCATOR_PROPERTIES *pProps, + /* [out] */ IMemAllocator **ppActual); + + +void __RPC_STUB IAsyncReader_RequestAllocator_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAsyncReader_Request_Proxy( + IAsyncReader * This, + /* [in] */ IMediaSample *pSample, + /* [in] */ DWORD_PTR dwUser); + + +void __RPC_STUB IAsyncReader_Request_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAsyncReader_WaitForNext_Proxy( + IAsyncReader * This, + /* [in] */ DWORD dwTimeout, + /* [out] */ IMediaSample **ppSample, + /* [out] */ DWORD_PTR *pdwUser); + + +void __RPC_STUB IAsyncReader_WaitForNext_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAsyncReader_SyncReadAligned_Proxy( + IAsyncReader * This, + /* [in] */ IMediaSample *pSample); + + +void __RPC_STUB IAsyncReader_SyncReadAligned_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAsyncReader_SyncRead_Proxy( + IAsyncReader * This, + /* [in] */ LONGLONG llPosition, + /* [in] */ LONG lLength, + /* [size_is][out] */ BYTE *pBuffer); + + +void __RPC_STUB IAsyncReader_SyncRead_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAsyncReader_Length_Proxy( + IAsyncReader * This, + /* [out] */ LONGLONG *pTotal, + /* [out] */ LONGLONG *pAvailable); + + +void __RPC_STUB IAsyncReader_Length_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAsyncReader_BeginFlush_Proxy( + IAsyncReader * This); + + +void __RPC_STUB IAsyncReader_BeginFlush_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAsyncReader_EndFlush_Proxy( + IAsyncReader * This); + + +void __RPC_STUB IAsyncReader_EndFlush_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAsyncReader_INTERFACE_DEFINED__ */ + + +#ifndef __IGraphVersion_INTERFACE_DEFINED__ +#define __IGraphVersion_INTERFACE_DEFINED__ + +/* interface IGraphVersion */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IGraphVersion; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868ab-0ad4-11ce-b03a-0020af0ba770") + IGraphVersion : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE QueryVersion( + LONG *pVersion) = 0; + + }; + +#else /* C style interface */ + + typedef struct IGraphVersionVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IGraphVersion * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IGraphVersion * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IGraphVersion * This); + + HRESULT ( STDMETHODCALLTYPE *QueryVersion )( + IGraphVersion * This, + LONG *pVersion); + + END_INTERFACE + } IGraphVersionVtbl; + + interface IGraphVersion + { + CONST_VTBL struct IGraphVersionVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IGraphVersion_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IGraphVersion_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IGraphVersion_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IGraphVersion_QueryVersion(This,pVersion) \ + (This)->lpVtbl -> QueryVersion(This,pVersion) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IGraphVersion_QueryVersion_Proxy( + IGraphVersion * This, + LONG *pVersion); + + +void __RPC_STUB IGraphVersion_QueryVersion_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IGraphVersion_INTERFACE_DEFINED__ */ + + +#ifndef __IResourceConsumer_INTERFACE_DEFINED__ +#define __IResourceConsumer_INTERFACE_DEFINED__ + +/* interface IResourceConsumer */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IResourceConsumer; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868ad-0ad4-11ce-b03a-0020af0ba770") + IResourceConsumer : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE AcquireResource( + /* [in] */ LONG idResource) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReleaseResource( + /* [in] */ LONG idResource) = 0; + + }; + +#else /* C style interface */ + + typedef struct IResourceConsumerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IResourceConsumer * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IResourceConsumer * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IResourceConsumer * This); + + HRESULT ( STDMETHODCALLTYPE *AcquireResource )( + IResourceConsumer * This, + /* [in] */ LONG idResource); + + HRESULT ( STDMETHODCALLTYPE *ReleaseResource )( + IResourceConsumer * This, + /* [in] */ LONG idResource); + + END_INTERFACE + } IResourceConsumerVtbl; + + interface IResourceConsumer + { + CONST_VTBL struct IResourceConsumerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IResourceConsumer_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IResourceConsumer_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IResourceConsumer_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IResourceConsumer_AcquireResource(This,idResource) \ + (This)->lpVtbl -> AcquireResource(This,idResource) + +#define IResourceConsumer_ReleaseResource(This,idResource) \ + (This)->lpVtbl -> ReleaseResource(This,idResource) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IResourceConsumer_AcquireResource_Proxy( + IResourceConsumer * This, + /* [in] */ LONG idResource); + + +void __RPC_STUB IResourceConsumer_AcquireResource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IResourceConsumer_ReleaseResource_Proxy( + IResourceConsumer * This, + /* [in] */ LONG idResource); + + +void __RPC_STUB IResourceConsumer_ReleaseResource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IResourceConsumer_INTERFACE_DEFINED__ */ + + +#ifndef __IResourceManager_INTERFACE_DEFINED__ +#define __IResourceManager_INTERFACE_DEFINED__ + +/* interface IResourceManager */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IResourceManager; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868ac-0ad4-11ce-b03a-0020af0ba770") + IResourceManager : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Register( + /* [in] */ LPCWSTR pName, + /* [in] */ LONG cResource, + /* [out] */ LONG *plToken) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterGroup( + /* [in] */ LPCWSTR pName, + /* [in] */ LONG cResource, + /* [size_is][in] */ LONG *palTokens, + /* [out] */ LONG *plToken) = 0; + + virtual HRESULT STDMETHODCALLTYPE RequestResource( + /* [in] */ LONG idResource, + /* [in] */ IUnknown *pFocusObject, + /* [in] */ IResourceConsumer *pConsumer) = 0; + + virtual HRESULT STDMETHODCALLTYPE NotifyAcquire( + /* [in] */ LONG idResource, + /* [in] */ IResourceConsumer *pConsumer, + /* [in] */ HRESULT hr) = 0; + + virtual HRESULT STDMETHODCALLTYPE NotifyRelease( + /* [in] */ LONG idResource, + /* [in] */ IResourceConsumer *pConsumer, + /* [in] */ BOOL bStillWant) = 0; + + virtual HRESULT STDMETHODCALLTYPE CancelRequest( + /* [in] */ LONG idResource, + /* [in] */ IResourceConsumer *pConsumer) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFocus( + /* [in] */ IUnknown *pFocusObject) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReleaseFocus( + /* [in] */ IUnknown *pFocusObject) = 0; + + }; + +#else /* C style interface */ + + typedef struct IResourceManagerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IResourceManager * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IResourceManager * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IResourceManager * This); + + HRESULT ( STDMETHODCALLTYPE *Register )( + IResourceManager * This, + /* [in] */ LPCWSTR pName, + /* [in] */ LONG cResource, + /* [out] */ LONG *plToken); + + HRESULT ( STDMETHODCALLTYPE *RegisterGroup )( + IResourceManager * This, + /* [in] */ LPCWSTR pName, + /* [in] */ LONG cResource, + /* [size_is][in] */ LONG *palTokens, + /* [out] */ LONG *plToken); + + HRESULT ( STDMETHODCALLTYPE *RequestResource )( + IResourceManager * This, + /* [in] */ LONG idResource, + /* [in] */ IUnknown *pFocusObject, + /* [in] */ IResourceConsumer *pConsumer); + + HRESULT ( STDMETHODCALLTYPE *NotifyAcquire )( + IResourceManager * This, + /* [in] */ LONG idResource, + /* [in] */ IResourceConsumer *pConsumer, + /* [in] */ HRESULT hr); + + HRESULT ( STDMETHODCALLTYPE *NotifyRelease )( + IResourceManager * This, + /* [in] */ LONG idResource, + /* [in] */ IResourceConsumer *pConsumer, + /* [in] */ BOOL bStillWant); + + HRESULT ( STDMETHODCALLTYPE *CancelRequest )( + IResourceManager * This, + /* [in] */ LONG idResource, + /* [in] */ IResourceConsumer *pConsumer); + + HRESULT ( STDMETHODCALLTYPE *SetFocus )( + IResourceManager * This, + /* [in] */ IUnknown *pFocusObject); + + HRESULT ( STDMETHODCALLTYPE *ReleaseFocus )( + IResourceManager * This, + /* [in] */ IUnknown *pFocusObject); + + END_INTERFACE + } IResourceManagerVtbl; + + interface IResourceManager + { + CONST_VTBL struct IResourceManagerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IResourceManager_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IResourceManager_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IResourceManager_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IResourceManager_Register(This,pName,cResource,plToken) \ + (This)->lpVtbl -> Register(This,pName,cResource,plToken) + +#define IResourceManager_RegisterGroup(This,pName,cResource,palTokens,plToken) \ + (This)->lpVtbl -> RegisterGroup(This,pName,cResource,palTokens,plToken) + +#define IResourceManager_RequestResource(This,idResource,pFocusObject,pConsumer) \ + (This)->lpVtbl -> RequestResource(This,idResource,pFocusObject,pConsumer) + +#define IResourceManager_NotifyAcquire(This,idResource,pConsumer,hr) \ + (This)->lpVtbl -> NotifyAcquire(This,idResource,pConsumer,hr) + +#define IResourceManager_NotifyRelease(This,idResource,pConsumer,bStillWant) \ + (This)->lpVtbl -> NotifyRelease(This,idResource,pConsumer,bStillWant) + +#define IResourceManager_CancelRequest(This,idResource,pConsumer) \ + (This)->lpVtbl -> CancelRequest(This,idResource,pConsumer) + +#define IResourceManager_SetFocus(This,pFocusObject) \ + (This)->lpVtbl -> SetFocus(This,pFocusObject) + +#define IResourceManager_ReleaseFocus(This,pFocusObject) \ + (This)->lpVtbl -> ReleaseFocus(This,pFocusObject) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IResourceManager_Register_Proxy( + IResourceManager * This, + /* [in] */ LPCWSTR pName, + /* [in] */ LONG cResource, + /* [out] */ LONG *plToken); + + +void __RPC_STUB IResourceManager_Register_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IResourceManager_RegisterGroup_Proxy( + IResourceManager * This, + /* [in] */ LPCWSTR pName, + /* [in] */ LONG cResource, + /* [size_is][in] */ LONG *palTokens, + /* [out] */ LONG *plToken); + + +void __RPC_STUB IResourceManager_RegisterGroup_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IResourceManager_RequestResource_Proxy( + IResourceManager * This, + /* [in] */ LONG idResource, + /* [in] */ IUnknown *pFocusObject, + /* [in] */ IResourceConsumer *pConsumer); + + +void __RPC_STUB IResourceManager_RequestResource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IResourceManager_NotifyAcquire_Proxy( + IResourceManager * This, + /* [in] */ LONG idResource, + /* [in] */ IResourceConsumer *pConsumer, + /* [in] */ HRESULT hr); + + +void __RPC_STUB IResourceManager_NotifyAcquire_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IResourceManager_NotifyRelease_Proxy( + IResourceManager * This, + /* [in] */ LONG idResource, + /* [in] */ IResourceConsumer *pConsumer, + /* [in] */ BOOL bStillWant); + + +void __RPC_STUB IResourceManager_NotifyRelease_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IResourceManager_CancelRequest_Proxy( + IResourceManager * This, + /* [in] */ LONG idResource, + /* [in] */ IResourceConsumer *pConsumer); + + +void __RPC_STUB IResourceManager_CancelRequest_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IResourceManager_SetFocus_Proxy( + IResourceManager * This, + /* [in] */ IUnknown *pFocusObject); + + +void __RPC_STUB IResourceManager_SetFocus_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IResourceManager_ReleaseFocus_Proxy( + IResourceManager * This, + /* [in] */ IUnknown *pFocusObject); + + +void __RPC_STUB IResourceManager_ReleaseFocus_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IResourceManager_INTERFACE_DEFINED__ */ + + +#ifndef __IDistributorNotify_INTERFACE_DEFINED__ +#define __IDistributorNotify_INTERFACE_DEFINED__ + +/* interface IDistributorNotify */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IDistributorNotify; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56a868af-0ad4-11ce-b03a-0020af0ba770") + IDistributorNotify : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Pause( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Run( + REFERENCE_TIME tStart) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSyncSource( + /* [in] */ IReferenceClock *pClock) = 0; + + virtual HRESULT STDMETHODCALLTYPE NotifyGraphChange( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDistributorNotifyVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDistributorNotify * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDistributorNotify * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDistributorNotify * This); + + HRESULT ( STDMETHODCALLTYPE *Stop )( + IDistributorNotify * This); + + HRESULT ( STDMETHODCALLTYPE *Pause )( + IDistributorNotify * This); + + HRESULT ( STDMETHODCALLTYPE *Run )( + IDistributorNotify * This, + REFERENCE_TIME tStart); + + HRESULT ( STDMETHODCALLTYPE *SetSyncSource )( + IDistributorNotify * This, + /* [in] */ IReferenceClock *pClock); + + HRESULT ( STDMETHODCALLTYPE *NotifyGraphChange )( + IDistributorNotify * This); + + END_INTERFACE + } IDistributorNotifyVtbl; + + interface IDistributorNotify + { + CONST_VTBL struct IDistributorNotifyVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDistributorNotify_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDistributorNotify_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDistributorNotify_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDistributorNotify_Stop(This) \ + (This)->lpVtbl -> Stop(This) + +#define IDistributorNotify_Pause(This) \ + (This)->lpVtbl -> Pause(This) + +#define IDistributorNotify_Run(This,tStart) \ + (This)->lpVtbl -> Run(This,tStart) + +#define IDistributorNotify_SetSyncSource(This,pClock) \ + (This)->lpVtbl -> SetSyncSource(This,pClock) + +#define IDistributorNotify_NotifyGraphChange(This) \ + (This)->lpVtbl -> NotifyGraphChange(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDistributorNotify_Stop_Proxy( + IDistributorNotify * This); + + +void __RPC_STUB IDistributorNotify_Stop_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDistributorNotify_Pause_Proxy( + IDistributorNotify * This); + + +void __RPC_STUB IDistributorNotify_Pause_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDistributorNotify_Run_Proxy( + IDistributorNotify * This, + REFERENCE_TIME tStart); + + +void __RPC_STUB IDistributorNotify_Run_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDistributorNotify_SetSyncSource_Proxy( + IDistributorNotify * This, + /* [in] */ IReferenceClock *pClock); + + +void __RPC_STUB IDistributorNotify_SetSyncSource_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDistributorNotify_NotifyGraphChange_Proxy( + IDistributorNotify * This); + + +void __RPC_STUB IDistributorNotify_NotifyGraphChange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDistributorNotify_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0151 */ +/* [local] */ + +typedef /* [public] */ +enum __MIDL___MIDL_itf_strmif_0151_0001 + { AM_STREAM_INFO_START_DEFINED = 0x1, + AM_STREAM_INFO_STOP_DEFINED = 0x2, + AM_STREAM_INFO_DISCARDING = 0x4, + AM_STREAM_INFO_STOP_SEND_EXTRA = 0x10 + } AM_STREAM_INFO_FLAGS; + +typedef /* [public][public] */ struct __MIDL___MIDL_itf_strmif_0151_0002 + { + REFERENCE_TIME tStart; + REFERENCE_TIME tStop; + DWORD dwStartCookie; + DWORD dwStopCookie; + DWORD dwFlags; + } AM_STREAM_INFO; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0151_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0151_v0_0_s_ifspec; + +#ifndef __IAMStreamControl_INTERFACE_DEFINED__ +#define __IAMStreamControl_INTERFACE_DEFINED__ + +/* interface IAMStreamControl */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMStreamControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("36b73881-c2c8-11cf-8b46-00805f6cef60") + IAMStreamControl : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE StartAt( + /* [in] */ const REFERENCE_TIME *ptStart, + /* [in] */ DWORD dwCookie) = 0; + + virtual HRESULT STDMETHODCALLTYPE StopAt( + /* [in] */ const REFERENCE_TIME *ptStop, + /* [in] */ BOOL bSendExtra, + /* [in] */ DWORD dwCookie) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInfo( + /* [out] */ AM_STREAM_INFO *pInfo) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMStreamControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMStreamControl * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMStreamControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMStreamControl * This); + + HRESULT ( STDMETHODCALLTYPE *StartAt )( + IAMStreamControl * This, + /* [in] */ const REFERENCE_TIME *ptStart, + /* [in] */ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *StopAt )( + IAMStreamControl * This, + /* [in] */ const REFERENCE_TIME *ptStop, + /* [in] */ BOOL bSendExtra, + /* [in] */ DWORD dwCookie); + + HRESULT ( STDMETHODCALLTYPE *GetInfo )( + IAMStreamControl * This, + /* [out] */ AM_STREAM_INFO *pInfo); + + END_INTERFACE + } IAMStreamControlVtbl; + + interface IAMStreamControl + { + CONST_VTBL struct IAMStreamControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMStreamControl_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMStreamControl_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMStreamControl_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMStreamControl_StartAt(This,ptStart,dwCookie) \ + (This)->lpVtbl -> StartAt(This,ptStart,dwCookie) + +#define IAMStreamControl_StopAt(This,ptStop,bSendExtra,dwCookie) \ + (This)->lpVtbl -> StopAt(This,ptStop,bSendExtra,dwCookie) + +#define IAMStreamControl_GetInfo(This,pInfo) \ + (This)->lpVtbl -> GetInfo(This,pInfo) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMStreamControl_StartAt_Proxy( + IAMStreamControl * This, + /* [in] */ const REFERENCE_TIME *ptStart, + /* [in] */ DWORD dwCookie); + + +void __RPC_STUB IAMStreamControl_StartAt_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMStreamControl_StopAt_Proxy( + IAMStreamControl * This, + /* [in] */ const REFERENCE_TIME *ptStop, + /* [in] */ BOOL bSendExtra, + /* [in] */ DWORD dwCookie); + + +void __RPC_STUB IAMStreamControl_StopAt_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMStreamControl_GetInfo_Proxy( + IAMStreamControl * This, + /* [out] */ AM_STREAM_INFO *pInfo); + + +void __RPC_STUB IAMStreamControl_GetInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMStreamControl_INTERFACE_DEFINED__ */ + + +#ifndef __ISeekingPassThru_INTERFACE_DEFINED__ +#define __ISeekingPassThru_INTERFACE_DEFINED__ + +/* interface ISeekingPassThru */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_ISeekingPassThru; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("36b73883-c2c8-11cf-8b46-00805f6cef60") + ISeekingPassThru : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Init( + /* [in] */ BOOL bSupportRendering, + /* [in] */ IPin *pPin) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISeekingPassThruVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISeekingPassThru * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISeekingPassThru * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISeekingPassThru * This); + + HRESULT ( STDMETHODCALLTYPE *Init )( + ISeekingPassThru * This, + /* [in] */ BOOL bSupportRendering, + /* [in] */ IPin *pPin); + + END_INTERFACE + } ISeekingPassThruVtbl; + + interface ISeekingPassThru + { + CONST_VTBL struct ISeekingPassThruVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISeekingPassThru_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISeekingPassThru_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISeekingPassThru_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISeekingPassThru_Init(This,bSupportRendering,pPin) \ + (This)->lpVtbl -> Init(This,bSupportRendering,pPin) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE ISeekingPassThru_Init_Proxy( + ISeekingPassThru * This, + /* [in] */ BOOL bSupportRendering, + /* [in] */ IPin *pPin); + + +void __RPC_STUB ISeekingPassThru_Init_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISeekingPassThru_INTERFACE_DEFINED__ */ + + +#ifndef __IAMStreamConfig_INTERFACE_DEFINED__ +#define __IAMStreamConfig_INTERFACE_DEFINED__ + +/* interface IAMStreamConfig */ +/* [unique][uuid][object] */ + +typedef struct _VIDEO_STREAM_CONFIG_CAPS + { + GUID guid; + ULONG VideoStandard; + SIZE InputSize; + SIZE MinCroppingSize; + SIZE MaxCroppingSize; + int CropGranularityX; + int CropGranularityY; + int CropAlignX; + int CropAlignY; + SIZE MinOutputSize; + SIZE MaxOutputSize; + int OutputGranularityX; + int OutputGranularityY; + int StretchTapsX; + int StretchTapsY; + int ShrinkTapsX; + int ShrinkTapsY; + LONGLONG MinFrameInterval; + LONGLONG MaxFrameInterval; + LONG MinBitsPerSecond; + LONG MaxBitsPerSecond; + } VIDEO_STREAM_CONFIG_CAPS; + +typedef struct _AUDIO_STREAM_CONFIG_CAPS + { + GUID guid; + ULONG MinimumChannels; + ULONG MaximumChannels; + ULONG ChannelsGranularity; + ULONG MinimumBitsPerSample; + ULONG MaximumBitsPerSample; + ULONG BitsPerSampleGranularity; + ULONG MinimumSampleFrequency; + ULONG MaximumSampleFrequency; + ULONG SampleFrequencyGranularity; + } AUDIO_STREAM_CONFIG_CAPS; + + +EXTERN_C const IID IID_IAMStreamConfig; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C6E13340-30AC-11d0-A18C-00A0C9118956") + IAMStreamConfig : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetFormat( + /* [in] */ AM_MEDIA_TYPE *pmt) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFormat( + /* [out] */ AM_MEDIA_TYPE **ppmt) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetNumberOfCapabilities( + /* [out] */ int *piCount, + /* [out] */ int *piSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStreamCaps( + /* [in] */ int iIndex, + /* [out] */ AM_MEDIA_TYPE **ppmt, + /* [out] */ BYTE *pSCC) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMStreamConfigVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMStreamConfig * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMStreamConfig * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMStreamConfig * This); + + HRESULT ( STDMETHODCALLTYPE *SetFormat )( + IAMStreamConfig * This, + /* [in] */ AM_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *GetFormat )( + IAMStreamConfig * This, + /* [out] */ AM_MEDIA_TYPE **ppmt); + + HRESULT ( STDMETHODCALLTYPE *GetNumberOfCapabilities )( + IAMStreamConfig * This, + /* [out] */ int *piCount, + /* [out] */ int *piSize); + + HRESULT ( STDMETHODCALLTYPE *GetStreamCaps )( + IAMStreamConfig * This, + /* [in] */ int iIndex, + /* [out] */ AM_MEDIA_TYPE **ppmt, + /* [out] */ BYTE *pSCC); + + END_INTERFACE + } IAMStreamConfigVtbl; + + interface IAMStreamConfig + { + CONST_VTBL struct IAMStreamConfigVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMStreamConfig_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMStreamConfig_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMStreamConfig_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMStreamConfig_SetFormat(This,pmt) \ + (This)->lpVtbl -> SetFormat(This,pmt) + +#define IAMStreamConfig_GetFormat(This,ppmt) \ + (This)->lpVtbl -> GetFormat(This,ppmt) + +#define IAMStreamConfig_GetNumberOfCapabilities(This,piCount,piSize) \ + (This)->lpVtbl -> GetNumberOfCapabilities(This,piCount,piSize) + +#define IAMStreamConfig_GetStreamCaps(This,iIndex,ppmt,pSCC) \ + (This)->lpVtbl -> GetStreamCaps(This,iIndex,ppmt,pSCC) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMStreamConfig_SetFormat_Proxy( + IAMStreamConfig * This, + /* [in] */ AM_MEDIA_TYPE *pmt); + + +void __RPC_STUB IAMStreamConfig_SetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMStreamConfig_GetFormat_Proxy( + IAMStreamConfig * This, + /* [out] */ AM_MEDIA_TYPE **ppmt); + + +void __RPC_STUB IAMStreamConfig_GetFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMStreamConfig_GetNumberOfCapabilities_Proxy( + IAMStreamConfig * This, + /* [out] */ int *piCount, + /* [out] */ int *piSize); + + +void __RPC_STUB IAMStreamConfig_GetNumberOfCapabilities_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMStreamConfig_GetStreamCaps_Proxy( + IAMStreamConfig * This, + /* [in] */ int iIndex, + /* [out] */ AM_MEDIA_TYPE **ppmt, + /* [out] */ BYTE *pSCC); + + +void __RPC_STUB IAMStreamConfig_GetStreamCaps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMStreamConfig_INTERFACE_DEFINED__ */ + + +#ifndef __IConfigInterleaving_INTERFACE_DEFINED__ +#define __IConfigInterleaving_INTERFACE_DEFINED__ + +/* interface IConfigInterleaving */ +/* [unique][uuid][object] */ + +typedef /* [public][public][public] */ +enum __MIDL_IConfigInterleaving_0001 + { INTERLEAVE_NONE = 0, + INTERLEAVE_CAPTURE = INTERLEAVE_NONE + 1, + INTERLEAVE_FULL = INTERLEAVE_CAPTURE + 1 + } InterleavingMode; + + +EXTERN_C const IID IID_IConfigInterleaving; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("BEE3D220-157B-11d0-BD23-00A0C911CE86") + IConfigInterleaving : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE put_Mode( + /* [in] */ InterleavingMode mode) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Mode( + /* [out] */ InterleavingMode *pMode) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_Interleaving( + /* [in] */ const REFERENCE_TIME *prtInterleave, + /* [in] */ const REFERENCE_TIME *prtPreroll) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Interleaving( + /* [out] */ REFERENCE_TIME *prtInterleave, + /* [out] */ REFERENCE_TIME *prtPreroll) = 0; + + }; + +#else /* C style interface */ + + typedef struct IConfigInterleavingVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IConfigInterleaving * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IConfigInterleaving * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IConfigInterleaving * This); + + HRESULT ( STDMETHODCALLTYPE *put_Mode )( + IConfigInterleaving * This, + /* [in] */ InterleavingMode mode); + + HRESULT ( STDMETHODCALLTYPE *get_Mode )( + IConfigInterleaving * This, + /* [out] */ InterleavingMode *pMode); + + HRESULT ( STDMETHODCALLTYPE *put_Interleaving )( + IConfigInterleaving * This, + /* [in] */ const REFERENCE_TIME *prtInterleave, + /* [in] */ const REFERENCE_TIME *prtPreroll); + + HRESULT ( STDMETHODCALLTYPE *get_Interleaving )( + IConfigInterleaving * This, + /* [out] */ REFERENCE_TIME *prtInterleave, + /* [out] */ REFERENCE_TIME *prtPreroll); + + END_INTERFACE + } IConfigInterleavingVtbl; + + interface IConfigInterleaving + { + CONST_VTBL struct IConfigInterleavingVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IConfigInterleaving_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IConfigInterleaving_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IConfigInterleaving_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IConfigInterleaving_put_Mode(This,mode) \ + (This)->lpVtbl -> put_Mode(This,mode) + +#define IConfigInterleaving_get_Mode(This,pMode) \ + (This)->lpVtbl -> get_Mode(This,pMode) + +#define IConfigInterleaving_put_Interleaving(This,prtInterleave,prtPreroll) \ + (This)->lpVtbl -> put_Interleaving(This,prtInterleave,prtPreroll) + +#define IConfigInterleaving_get_Interleaving(This,prtInterleave,prtPreroll) \ + (This)->lpVtbl -> get_Interleaving(This,prtInterleave,prtPreroll) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IConfigInterleaving_put_Mode_Proxy( + IConfigInterleaving * This, + /* [in] */ InterleavingMode mode); + + +void __RPC_STUB IConfigInterleaving_put_Mode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IConfigInterleaving_get_Mode_Proxy( + IConfigInterleaving * This, + /* [out] */ InterleavingMode *pMode); + + +void __RPC_STUB IConfigInterleaving_get_Mode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IConfigInterleaving_put_Interleaving_Proxy( + IConfigInterleaving * This, + /* [in] */ const REFERENCE_TIME *prtInterleave, + /* [in] */ const REFERENCE_TIME *prtPreroll); + + +void __RPC_STUB IConfigInterleaving_put_Interleaving_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IConfigInterleaving_get_Interleaving_Proxy( + IConfigInterleaving * This, + /* [out] */ REFERENCE_TIME *prtInterleave, + /* [out] */ REFERENCE_TIME *prtPreroll); + + +void __RPC_STUB IConfigInterleaving_get_Interleaving_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IConfigInterleaving_INTERFACE_DEFINED__ */ + + +#ifndef __IConfigAviMux_INTERFACE_DEFINED__ +#define __IConfigAviMux_INTERFACE_DEFINED__ + +/* interface IConfigAviMux */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IConfigAviMux; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("5ACD6AA0-F482-11ce-8B67-00AA00A3F1A6") + IConfigAviMux : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetMasterStream( + /* [in] */ LONG iStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMasterStream( + /* [out] */ LONG *pStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOutputCompatibilityIndex( + /* [in] */ BOOL fOldIndex) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetOutputCompatibilityIndex( + /* [out] */ BOOL *pfOldIndex) = 0; + + }; + +#else /* C style interface */ + + typedef struct IConfigAviMuxVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IConfigAviMux * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IConfigAviMux * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IConfigAviMux * This); + + HRESULT ( STDMETHODCALLTYPE *SetMasterStream )( + IConfigAviMux * This, + /* [in] */ LONG iStream); + + HRESULT ( STDMETHODCALLTYPE *GetMasterStream )( + IConfigAviMux * This, + /* [out] */ LONG *pStream); + + HRESULT ( STDMETHODCALLTYPE *SetOutputCompatibilityIndex )( + IConfigAviMux * This, + /* [in] */ BOOL fOldIndex); + + HRESULT ( STDMETHODCALLTYPE *GetOutputCompatibilityIndex )( + IConfigAviMux * This, + /* [out] */ BOOL *pfOldIndex); + + END_INTERFACE + } IConfigAviMuxVtbl; + + interface IConfigAviMux + { + CONST_VTBL struct IConfigAviMuxVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IConfigAviMux_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IConfigAviMux_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IConfigAviMux_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IConfigAviMux_SetMasterStream(This,iStream) \ + (This)->lpVtbl -> SetMasterStream(This,iStream) + +#define IConfigAviMux_GetMasterStream(This,pStream) \ + (This)->lpVtbl -> GetMasterStream(This,pStream) + +#define IConfigAviMux_SetOutputCompatibilityIndex(This,fOldIndex) \ + (This)->lpVtbl -> SetOutputCompatibilityIndex(This,fOldIndex) + +#define IConfigAviMux_GetOutputCompatibilityIndex(This,pfOldIndex) \ + (This)->lpVtbl -> GetOutputCompatibilityIndex(This,pfOldIndex) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IConfigAviMux_SetMasterStream_Proxy( + IConfigAviMux * This, + /* [in] */ LONG iStream); + + +void __RPC_STUB IConfigAviMux_SetMasterStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IConfigAviMux_GetMasterStream_Proxy( + IConfigAviMux * This, + /* [out] */ LONG *pStream); + + +void __RPC_STUB IConfigAviMux_GetMasterStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IConfigAviMux_SetOutputCompatibilityIndex_Proxy( + IConfigAviMux * This, + /* [in] */ BOOL fOldIndex); + + +void __RPC_STUB IConfigAviMux_SetOutputCompatibilityIndex_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IConfigAviMux_GetOutputCompatibilityIndex_Proxy( + IConfigAviMux * This, + /* [out] */ BOOL *pfOldIndex); + + +void __RPC_STUB IConfigAviMux_GetOutputCompatibilityIndex_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IConfigAviMux_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0158 */ +/* [local] */ + +typedef /* [public] */ +enum __MIDL___MIDL_itf_strmif_0158_0001 + { CompressionCaps_CanQuality = 0x1, + CompressionCaps_CanCrunch = 0x2, + CompressionCaps_CanKeyFrame = 0x4, + CompressionCaps_CanBFrame = 0x8, + CompressionCaps_CanWindow = 0x10 + } CompressionCaps; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0158_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0158_v0_0_s_ifspec; + +#ifndef __IAMVideoCompression_INTERFACE_DEFINED__ +#define __IAMVideoCompression_INTERFACE_DEFINED__ + +/* interface IAMVideoCompression */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMVideoCompression; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C6E13343-30AC-11d0-A18C-00A0C9118956") + IAMVideoCompression : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE put_KeyFrameRate( + /* [in] */ long KeyFrameRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_KeyFrameRate( + /* [out] */ long *pKeyFrameRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_PFramesPerKeyFrame( + /* [in] */ long PFramesPerKeyFrame) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_PFramesPerKeyFrame( + /* [out] */ long *pPFramesPerKeyFrame) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_Quality( + /* [in] */ double Quality) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Quality( + /* [out] */ double *pQuality) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_WindowSize( + /* [in] */ DWORDLONG WindowSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_WindowSize( + /* [out] */ DWORDLONG *pWindowSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInfo( + /* [size_is][out] */ WCHAR *pszVersion, + /* [out][in] */ int *pcbVersion, + /* [size_is][out] */ LPWSTR pszDescription, + /* [out][in] */ int *pcbDescription, + /* [out] */ long *pDefaultKeyFrameRate, + /* [out] */ long *pDefaultPFramesPerKey, + /* [out] */ double *pDefaultQuality, + /* [out] */ long *pCapabilities) = 0; + + virtual HRESULT STDMETHODCALLTYPE OverrideKeyFrame( + /* [in] */ long FrameNumber) = 0; + + virtual HRESULT STDMETHODCALLTYPE OverrideFrameSize( + /* [in] */ long FrameNumber, + /* [in] */ long Size) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMVideoCompressionVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMVideoCompression * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMVideoCompression * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMVideoCompression * This); + + HRESULT ( STDMETHODCALLTYPE *put_KeyFrameRate )( + IAMVideoCompression * This, + /* [in] */ long KeyFrameRate); + + HRESULT ( STDMETHODCALLTYPE *get_KeyFrameRate )( + IAMVideoCompression * This, + /* [out] */ long *pKeyFrameRate); + + HRESULT ( STDMETHODCALLTYPE *put_PFramesPerKeyFrame )( + IAMVideoCompression * This, + /* [in] */ long PFramesPerKeyFrame); + + HRESULT ( STDMETHODCALLTYPE *get_PFramesPerKeyFrame )( + IAMVideoCompression * This, + /* [out] */ long *pPFramesPerKeyFrame); + + HRESULT ( STDMETHODCALLTYPE *put_Quality )( + IAMVideoCompression * This, + /* [in] */ double Quality); + + HRESULT ( STDMETHODCALLTYPE *get_Quality )( + IAMVideoCompression * This, + /* [out] */ double *pQuality); + + HRESULT ( STDMETHODCALLTYPE *put_WindowSize )( + IAMVideoCompression * This, + /* [in] */ DWORDLONG WindowSize); + + HRESULT ( STDMETHODCALLTYPE *get_WindowSize )( + IAMVideoCompression * This, + /* [out] */ DWORDLONG *pWindowSize); + + HRESULT ( STDMETHODCALLTYPE *GetInfo )( + IAMVideoCompression * This, + /* [size_is][out] */ WCHAR *pszVersion, + /* [out][in] */ int *pcbVersion, + /* [size_is][out] */ LPWSTR pszDescription, + /* [out][in] */ int *pcbDescription, + /* [out] */ long *pDefaultKeyFrameRate, + /* [out] */ long *pDefaultPFramesPerKey, + /* [out] */ double *pDefaultQuality, + /* [out] */ long *pCapabilities); + + HRESULT ( STDMETHODCALLTYPE *OverrideKeyFrame )( + IAMVideoCompression * This, + /* [in] */ long FrameNumber); + + HRESULT ( STDMETHODCALLTYPE *OverrideFrameSize )( + IAMVideoCompression * This, + /* [in] */ long FrameNumber, + /* [in] */ long Size); + + END_INTERFACE + } IAMVideoCompressionVtbl; + + interface IAMVideoCompression + { + CONST_VTBL struct IAMVideoCompressionVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMVideoCompression_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMVideoCompression_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMVideoCompression_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMVideoCompression_put_KeyFrameRate(This,KeyFrameRate) \ + (This)->lpVtbl -> put_KeyFrameRate(This,KeyFrameRate) + +#define IAMVideoCompression_get_KeyFrameRate(This,pKeyFrameRate) \ + (This)->lpVtbl -> get_KeyFrameRate(This,pKeyFrameRate) + +#define IAMVideoCompression_put_PFramesPerKeyFrame(This,PFramesPerKeyFrame) \ + (This)->lpVtbl -> put_PFramesPerKeyFrame(This,PFramesPerKeyFrame) + +#define IAMVideoCompression_get_PFramesPerKeyFrame(This,pPFramesPerKeyFrame) \ + (This)->lpVtbl -> get_PFramesPerKeyFrame(This,pPFramesPerKeyFrame) + +#define IAMVideoCompression_put_Quality(This,Quality) \ + (This)->lpVtbl -> put_Quality(This,Quality) + +#define IAMVideoCompression_get_Quality(This,pQuality) \ + (This)->lpVtbl -> get_Quality(This,pQuality) + +#define IAMVideoCompression_put_WindowSize(This,WindowSize) \ + (This)->lpVtbl -> put_WindowSize(This,WindowSize) + +#define IAMVideoCompression_get_WindowSize(This,pWindowSize) \ + (This)->lpVtbl -> get_WindowSize(This,pWindowSize) + +#define IAMVideoCompression_GetInfo(This,pszVersion,pcbVersion,pszDescription,pcbDescription,pDefaultKeyFrameRate,pDefaultPFramesPerKey,pDefaultQuality,pCapabilities) \ + (This)->lpVtbl -> GetInfo(This,pszVersion,pcbVersion,pszDescription,pcbDescription,pDefaultKeyFrameRate,pDefaultPFramesPerKey,pDefaultQuality,pCapabilities) + +#define IAMVideoCompression_OverrideKeyFrame(This,FrameNumber) \ + (This)->lpVtbl -> OverrideKeyFrame(This,FrameNumber) + +#define IAMVideoCompression_OverrideFrameSize(This,FrameNumber,Size) \ + (This)->lpVtbl -> OverrideFrameSize(This,FrameNumber,Size) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMVideoCompression_put_KeyFrameRate_Proxy( + IAMVideoCompression * This, + /* [in] */ long KeyFrameRate); + + +void __RPC_STUB IAMVideoCompression_put_KeyFrameRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoCompression_get_KeyFrameRate_Proxy( + IAMVideoCompression * This, + /* [out] */ long *pKeyFrameRate); + + +void __RPC_STUB IAMVideoCompression_get_KeyFrameRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoCompression_put_PFramesPerKeyFrame_Proxy( + IAMVideoCompression * This, + /* [in] */ long PFramesPerKeyFrame); + + +void __RPC_STUB IAMVideoCompression_put_PFramesPerKeyFrame_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoCompression_get_PFramesPerKeyFrame_Proxy( + IAMVideoCompression * This, + /* [out] */ long *pPFramesPerKeyFrame); + + +void __RPC_STUB IAMVideoCompression_get_PFramesPerKeyFrame_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoCompression_put_Quality_Proxy( + IAMVideoCompression * This, + /* [in] */ double Quality); + + +void __RPC_STUB IAMVideoCompression_put_Quality_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoCompression_get_Quality_Proxy( + IAMVideoCompression * This, + /* [out] */ double *pQuality); + + +void __RPC_STUB IAMVideoCompression_get_Quality_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoCompression_put_WindowSize_Proxy( + IAMVideoCompression * This, + /* [in] */ DWORDLONG WindowSize); + + +void __RPC_STUB IAMVideoCompression_put_WindowSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoCompression_get_WindowSize_Proxy( + IAMVideoCompression * This, + /* [out] */ DWORDLONG *pWindowSize); + + +void __RPC_STUB IAMVideoCompression_get_WindowSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoCompression_GetInfo_Proxy( + IAMVideoCompression * This, + /* [size_is][out] */ WCHAR *pszVersion, + /* [out][in] */ int *pcbVersion, + /* [size_is][out] */ LPWSTR pszDescription, + /* [out][in] */ int *pcbDescription, + /* [out] */ long *pDefaultKeyFrameRate, + /* [out] */ long *pDefaultPFramesPerKey, + /* [out] */ double *pDefaultQuality, + /* [out] */ long *pCapabilities); + + +void __RPC_STUB IAMVideoCompression_GetInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoCompression_OverrideKeyFrame_Proxy( + IAMVideoCompression * This, + /* [in] */ long FrameNumber); + + +void __RPC_STUB IAMVideoCompression_OverrideKeyFrame_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoCompression_OverrideFrameSize_Proxy( + IAMVideoCompression * This, + /* [in] */ long FrameNumber, + /* [in] */ long Size); + + +void __RPC_STUB IAMVideoCompression_OverrideFrameSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMVideoCompression_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0159 */ +/* [local] */ + +typedef /* [public] */ +enum __MIDL___MIDL_itf_strmif_0159_0001 + { VfwCaptureDialog_Source = 0x1, + VfwCaptureDialog_Format = 0x2, + VfwCaptureDialog_Display = 0x4 + } VfwCaptureDialogs; + +typedef /* [public] */ +enum __MIDL___MIDL_itf_strmif_0159_0002 + { VfwCompressDialog_Config = 0x1, + VfwCompressDialog_About = 0x2, + VfwCompressDialog_QueryConfig = 0x4, + VfwCompressDialog_QueryAbout = 0x8 + } VfwCompressDialogs; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0159_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0159_v0_0_s_ifspec; + +#ifndef __IAMVfwCaptureDialogs_INTERFACE_DEFINED__ +#define __IAMVfwCaptureDialogs_INTERFACE_DEFINED__ + +/* interface IAMVfwCaptureDialogs */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IAMVfwCaptureDialogs; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("D8D715A0-6E5E-11D0-B3F0-00AA003761C5") + IAMVfwCaptureDialogs : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE HasDialog( + /* [in] */ int iDialog) = 0; + + virtual HRESULT STDMETHODCALLTYPE ShowDialog( + /* [in] */ int iDialog, + /* [in] */ HWND hwnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE SendDriverMessage( + /* [in] */ int iDialog, + /* [in] */ int uMsg, + /* [in] */ long dw1, + /* [in] */ long dw2) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMVfwCaptureDialogsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMVfwCaptureDialogs * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMVfwCaptureDialogs * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMVfwCaptureDialogs * This); + + HRESULT ( STDMETHODCALLTYPE *HasDialog )( + IAMVfwCaptureDialogs * This, + /* [in] */ int iDialog); + + HRESULT ( STDMETHODCALLTYPE *ShowDialog )( + IAMVfwCaptureDialogs * This, + /* [in] */ int iDialog, + /* [in] */ HWND hwnd); + + HRESULT ( STDMETHODCALLTYPE *SendDriverMessage )( + IAMVfwCaptureDialogs * This, + /* [in] */ int iDialog, + /* [in] */ int uMsg, + /* [in] */ long dw1, + /* [in] */ long dw2); + + END_INTERFACE + } IAMVfwCaptureDialogsVtbl; + + interface IAMVfwCaptureDialogs + { + CONST_VTBL struct IAMVfwCaptureDialogsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMVfwCaptureDialogs_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMVfwCaptureDialogs_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMVfwCaptureDialogs_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMVfwCaptureDialogs_HasDialog(This,iDialog) \ + (This)->lpVtbl -> HasDialog(This,iDialog) + +#define IAMVfwCaptureDialogs_ShowDialog(This,iDialog,hwnd) \ + (This)->lpVtbl -> ShowDialog(This,iDialog,hwnd) + +#define IAMVfwCaptureDialogs_SendDriverMessage(This,iDialog,uMsg,dw1,dw2) \ + (This)->lpVtbl -> SendDriverMessage(This,iDialog,uMsg,dw1,dw2) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMVfwCaptureDialogs_HasDialog_Proxy( + IAMVfwCaptureDialogs * This, + /* [in] */ int iDialog); + + +void __RPC_STUB IAMVfwCaptureDialogs_HasDialog_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVfwCaptureDialogs_ShowDialog_Proxy( + IAMVfwCaptureDialogs * This, + /* [in] */ int iDialog, + /* [in] */ HWND hwnd); + + +void __RPC_STUB IAMVfwCaptureDialogs_ShowDialog_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVfwCaptureDialogs_SendDriverMessage_Proxy( + IAMVfwCaptureDialogs * This, + /* [in] */ int iDialog, + /* [in] */ int uMsg, + /* [in] */ long dw1, + /* [in] */ long dw2); + + +void __RPC_STUB IAMVfwCaptureDialogs_SendDriverMessage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMVfwCaptureDialogs_INTERFACE_DEFINED__ */ + + +#ifndef __IAMVfwCompressDialogs_INTERFACE_DEFINED__ +#define __IAMVfwCompressDialogs_INTERFACE_DEFINED__ + +/* interface IAMVfwCompressDialogs */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IAMVfwCompressDialogs; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("D8D715A3-6E5E-11D0-B3F0-00AA003761C5") + IAMVfwCompressDialogs : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE ShowDialog( + /* [in] */ int iDialog, + /* [in] */ HWND hwnd) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetState( + /* [size_is][out] */ LPVOID pState, + /* [out][in] */ int *pcbState) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetState( + /* [size_is][in] */ LPVOID pState, + /* [in] */ int cbState) = 0; + + virtual HRESULT STDMETHODCALLTYPE SendDriverMessage( + /* [in] */ int uMsg, + /* [in] */ long dw1, + /* [in] */ long dw2) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMVfwCompressDialogsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMVfwCompressDialogs * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMVfwCompressDialogs * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMVfwCompressDialogs * This); + + HRESULT ( STDMETHODCALLTYPE *ShowDialog )( + IAMVfwCompressDialogs * This, + /* [in] */ int iDialog, + /* [in] */ HWND hwnd); + + HRESULT ( STDMETHODCALLTYPE *GetState )( + IAMVfwCompressDialogs * This, + /* [size_is][out] */ LPVOID pState, + /* [out][in] */ int *pcbState); + + HRESULT ( STDMETHODCALLTYPE *SetState )( + IAMVfwCompressDialogs * This, + /* [size_is][in] */ LPVOID pState, + /* [in] */ int cbState); + + HRESULT ( STDMETHODCALLTYPE *SendDriverMessage )( + IAMVfwCompressDialogs * This, + /* [in] */ int uMsg, + /* [in] */ long dw1, + /* [in] */ long dw2); + + END_INTERFACE + } IAMVfwCompressDialogsVtbl; + + interface IAMVfwCompressDialogs + { + CONST_VTBL struct IAMVfwCompressDialogsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMVfwCompressDialogs_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMVfwCompressDialogs_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMVfwCompressDialogs_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMVfwCompressDialogs_ShowDialog(This,iDialog,hwnd) \ + (This)->lpVtbl -> ShowDialog(This,iDialog,hwnd) + +#define IAMVfwCompressDialogs_GetState(This,pState,pcbState) \ + (This)->lpVtbl -> GetState(This,pState,pcbState) + +#define IAMVfwCompressDialogs_SetState(This,pState,cbState) \ + (This)->lpVtbl -> SetState(This,pState,cbState) + +#define IAMVfwCompressDialogs_SendDriverMessage(This,uMsg,dw1,dw2) \ + (This)->lpVtbl -> SendDriverMessage(This,uMsg,dw1,dw2) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMVfwCompressDialogs_ShowDialog_Proxy( + IAMVfwCompressDialogs * This, + /* [in] */ int iDialog, + /* [in] */ HWND hwnd); + + +void __RPC_STUB IAMVfwCompressDialogs_ShowDialog_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVfwCompressDialogs_GetState_Proxy( + IAMVfwCompressDialogs * This, + /* [size_is][out] */ LPVOID pState, + /* [out][in] */ int *pcbState); + + +void __RPC_STUB IAMVfwCompressDialogs_GetState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVfwCompressDialogs_SetState_Proxy( + IAMVfwCompressDialogs * This, + /* [size_is][in] */ LPVOID pState, + /* [in] */ int cbState); + + +void __RPC_STUB IAMVfwCompressDialogs_SetState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVfwCompressDialogs_SendDriverMessage_Proxy( + IAMVfwCompressDialogs * This, + /* [in] */ int uMsg, + /* [in] */ long dw1, + /* [in] */ long dw2); + + +void __RPC_STUB IAMVfwCompressDialogs_SendDriverMessage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMVfwCompressDialogs_INTERFACE_DEFINED__ */ + + +#ifndef __IAMDroppedFrames_INTERFACE_DEFINED__ +#define __IAMDroppedFrames_INTERFACE_DEFINED__ + +/* interface IAMDroppedFrames */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMDroppedFrames; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C6E13344-30AC-11d0-A18C-00A0C9118956") + IAMDroppedFrames : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetNumDropped( + /* [out] */ long *plDropped) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetNumNotDropped( + /* [out] */ long *plNotDropped) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDroppedInfo( + /* [in] */ long lSize, + /* [out] */ long *plArray, + /* [out] */ long *plNumCopied) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAverageFrameSize( + /* [out] */ long *plAverageSize) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMDroppedFramesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMDroppedFrames * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMDroppedFrames * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMDroppedFrames * This); + + HRESULT ( STDMETHODCALLTYPE *GetNumDropped )( + IAMDroppedFrames * This, + /* [out] */ long *plDropped); + + HRESULT ( STDMETHODCALLTYPE *GetNumNotDropped )( + IAMDroppedFrames * This, + /* [out] */ long *plNotDropped); + + HRESULT ( STDMETHODCALLTYPE *GetDroppedInfo )( + IAMDroppedFrames * This, + /* [in] */ long lSize, + /* [out] */ long *plArray, + /* [out] */ long *plNumCopied); + + HRESULT ( STDMETHODCALLTYPE *GetAverageFrameSize )( + IAMDroppedFrames * This, + /* [out] */ long *plAverageSize); + + END_INTERFACE + } IAMDroppedFramesVtbl; + + interface IAMDroppedFrames + { + CONST_VTBL struct IAMDroppedFramesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMDroppedFrames_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMDroppedFrames_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMDroppedFrames_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMDroppedFrames_GetNumDropped(This,plDropped) \ + (This)->lpVtbl -> GetNumDropped(This,plDropped) + +#define IAMDroppedFrames_GetNumNotDropped(This,plNotDropped) \ + (This)->lpVtbl -> GetNumNotDropped(This,plNotDropped) + +#define IAMDroppedFrames_GetDroppedInfo(This,lSize,plArray,plNumCopied) \ + (This)->lpVtbl -> GetDroppedInfo(This,lSize,plArray,plNumCopied) + +#define IAMDroppedFrames_GetAverageFrameSize(This,plAverageSize) \ + (This)->lpVtbl -> GetAverageFrameSize(This,plAverageSize) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMDroppedFrames_GetNumDropped_Proxy( + IAMDroppedFrames * This, + /* [out] */ long *plDropped); + + +void __RPC_STUB IAMDroppedFrames_GetNumDropped_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMDroppedFrames_GetNumNotDropped_Proxy( + IAMDroppedFrames * This, + /* [out] */ long *plNotDropped); + + +void __RPC_STUB IAMDroppedFrames_GetNumNotDropped_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMDroppedFrames_GetDroppedInfo_Proxy( + IAMDroppedFrames * This, + /* [in] */ long lSize, + /* [out] */ long *plArray, + /* [out] */ long *plNumCopied); + + +void __RPC_STUB IAMDroppedFrames_GetDroppedInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMDroppedFrames_GetAverageFrameSize_Proxy( + IAMDroppedFrames * This, + /* [out] */ long *plAverageSize); + + +void __RPC_STUB IAMDroppedFrames_GetAverageFrameSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMDroppedFrames_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0162 */ +/* [local] */ + +#define AMF_AUTOMATICGAIN -1.0 + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0162_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0162_v0_0_s_ifspec; + +#ifndef __IAMAudioInputMixer_INTERFACE_DEFINED__ +#define __IAMAudioInputMixer_INTERFACE_DEFINED__ + +/* interface IAMAudioInputMixer */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMAudioInputMixer; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("54C39221-8380-11d0-B3F0-00AA003761C5") + IAMAudioInputMixer : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE put_Enable( + /* [in] */ BOOL fEnable) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Enable( + /* [out] */ BOOL *pfEnable) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_Mono( + /* [in] */ BOOL fMono) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Mono( + /* [out] */ BOOL *pfMono) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_MixLevel( + /* [in] */ double Level) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_MixLevel( + /* [out] */ double *pLevel) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_Pan( + /* [in] */ double Pan) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Pan( + /* [out] */ double *pPan) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_Loudness( + /* [in] */ BOOL fLoudness) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Loudness( + /* [out] */ BOOL *pfLoudness) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_Treble( + /* [in] */ double Treble) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Treble( + /* [out] */ double *pTreble) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_TrebleRange( + /* [out] */ double *pRange) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_Bass( + /* [in] */ double Bass) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Bass( + /* [out] */ double *pBass) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_BassRange( + /* [out] */ double *pRange) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMAudioInputMixerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMAudioInputMixer * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMAudioInputMixer * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMAudioInputMixer * This); + + HRESULT ( STDMETHODCALLTYPE *put_Enable )( + IAMAudioInputMixer * This, + /* [in] */ BOOL fEnable); + + HRESULT ( STDMETHODCALLTYPE *get_Enable )( + IAMAudioInputMixer * This, + /* [out] */ BOOL *pfEnable); + + HRESULT ( STDMETHODCALLTYPE *put_Mono )( + IAMAudioInputMixer * This, + /* [in] */ BOOL fMono); + + HRESULT ( STDMETHODCALLTYPE *get_Mono )( + IAMAudioInputMixer * This, + /* [out] */ BOOL *pfMono); + + HRESULT ( STDMETHODCALLTYPE *put_MixLevel )( + IAMAudioInputMixer * This, + /* [in] */ double Level); + + HRESULT ( STDMETHODCALLTYPE *get_MixLevel )( + IAMAudioInputMixer * This, + /* [out] */ double *pLevel); + + HRESULT ( STDMETHODCALLTYPE *put_Pan )( + IAMAudioInputMixer * This, + /* [in] */ double Pan); + + HRESULT ( STDMETHODCALLTYPE *get_Pan )( + IAMAudioInputMixer * This, + /* [out] */ double *pPan); + + HRESULT ( STDMETHODCALLTYPE *put_Loudness )( + IAMAudioInputMixer * This, + /* [in] */ BOOL fLoudness); + + HRESULT ( STDMETHODCALLTYPE *get_Loudness )( + IAMAudioInputMixer * This, + /* [out] */ BOOL *pfLoudness); + + HRESULT ( STDMETHODCALLTYPE *put_Treble )( + IAMAudioInputMixer * This, + /* [in] */ double Treble); + + HRESULT ( STDMETHODCALLTYPE *get_Treble )( + IAMAudioInputMixer * This, + /* [out] */ double *pTreble); + + HRESULT ( STDMETHODCALLTYPE *get_TrebleRange )( + IAMAudioInputMixer * This, + /* [out] */ double *pRange); + + HRESULT ( STDMETHODCALLTYPE *put_Bass )( + IAMAudioInputMixer * This, + /* [in] */ double Bass); + + HRESULT ( STDMETHODCALLTYPE *get_Bass )( + IAMAudioInputMixer * This, + /* [out] */ double *pBass); + + HRESULT ( STDMETHODCALLTYPE *get_BassRange )( + IAMAudioInputMixer * This, + /* [out] */ double *pRange); + + END_INTERFACE + } IAMAudioInputMixerVtbl; + + interface IAMAudioInputMixer + { + CONST_VTBL struct IAMAudioInputMixerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMAudioInputMixer_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMAudioInputMixer_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMAudioInputMixer_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMAudioInputMixer_put_Enable(This,fEnable) \ + (This)->lpVtbl -> put_Enable(This,fEnable) + +#define IAMAudioInputMixer_get_Enable(This,pfEnable) \ + (This)->lpVtbl -> get_Enable(This,pfEnable) + +#define IAMAudioInputMixer_put_Mono(This,fMono) \ + (This)->lpVtbl -> put_Mono(This,fMono) + +#define IAMAudioInputMixer_get_Mono(This,pfMono) \ + (This)->lpVtbl -> get_Mono(This,pfMono) + +#define IAMAudioInputMixer_put_MixLevel(This,Level) \ + (This)->lpVtbl -> put_MixLevel(This,Level) + +#define IAMAudioInputMixer_get_MixLevel(This,pLevel) \ + (This)->lpVtbl -> get_MixLevel(This,pLevel) + +#define IAMAudioInputMixer_put_Pan(This,Pan) \ + (This)->lpVtbl -> put_Pan(This,Pan) + +#define IAMAudioInputMixer_get_Pan(This,pPan) \ + (This)->lpVtbl -> get_Pan(This,pPan) + +#define IAMAudioInputMixer_put_Loudness(This,fLoudness) \ + (This)->lpVtbl -> put_Loudness(This,fLoudness) + +#define IAMAudioInputMixer_get_Loudness(This,pfLoudness) \ + (This)->lpVtbl -> get_Loudness(This,pfLoudness) + +#define IAMAudioInputMixer_put_Treble(This,Treble) \ + (This)->lpVtbl -> put_Treble(This,Treble) + +#define IAMAudioInputMixer_get_Treble(This,pTreble) \ + (This)->lpVtbl -> get_Treble(This,pTreble) + +#define IAMAudioInputMixer_get_TrebleRange(This,pRange) \ + (This)->lpVtbl -> get_TrebleRange(This,pRange) + +#define IAMAudioInputMixer_put_Bass(This,Bass) \ + (This)->lpVtbl -> put_Bass(This,Bass) + +#define IAMAudioInputMixer_get_Bass(This,pBass) \ + (This)->lpVtbl -> get_Bass(This,pBass) + +#define IAMAudioInputMixer_get_BassRange(This,pRange) \ + (This)->lpVtbl -> get_BassRange(This,pRange) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMAudioInputMixer_put_Enable_Proxy( + IAMAudioInputMixer * This, + /* [in] */ BOOL fEnable); + + +void __RPC_STUB IAMAudioInputMixer_put_Enable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAudioInputMixer_get_Enable_Proxy( + IAMAudioInputMixer * This, + /* [out] */ BOOL *pfEnable); + + +void __RPC_STUB IAMAudioInputMixer_get_Enable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAudioInputMixer_put_Mono_Proxy( + IAMAudioInputMixer * This, + /* [in] */ BOOL fMono); + + +void __RPC_STUB IAMAudioInputMixer_put_Mono_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAudioInputMixer_get_Mono_Proxy( + IAMAudioInputMixer * This, + /* [out] */ BOOL *pfMono); + + +void __RPC_STUB IAMAudioInputMixer_get_Mono_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAudioInputMixer_put_MixLevel_Proxy( + IAMAudioInputMixer * This, + /* [in] */ double Level); + + +void __RPC_STUB IAMAudioInputMixer_put_MixLevel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAudioInputMixer_get_MixLevel_Proxy( + IAMAudioInputMixer * This, + /* [out] */ double *pLevel); + + +void __RPC_STUB IAMAudioInputMixer_get_MixLevel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAudioInputMixer_put_Pan_Proxy( + IAMAudioInputMixer * This, + /* [in] */ double Pan); + + +void __RPC_STUB IAMAudioInputMixer_put_Pan_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAudioInputMixer_get_Pan_Proxy( + IAMAudioInputMixer * This, + /* [out] */ double *pPan); + + +void __RPC_STUB IAMAudioInputMixer_get_Pan_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAudioInputMixer_put_Loudness_Proxy( + IAMAudioInputMixer * This, + /* [in] */ BOOL fLoudness); + + +void __RPC_STUB IAMAudioInputMixer_put_Loudness_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAudioInputMixer_get_Loudness_Proxy( + IAMAudioInputMixer * This, + /* [out] */ BOOL *pfLoudness); + + +void __RPC_STUB IAMAudioInputMixer_get_Loudness_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAudioInputMixer_put_Treble_Proxy( + IAMAudioInputMixer * This, + /* [in] */ double Treble); + + +void __RPC_STUB IAMAudioInputMixer_put_Treble_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAudioInputMixer_get_Treble_Proxy( + IAMAudioInputMixer * This, + /* [out] */ double *pTreble); + + +void __RPC_STUB IAMAudioInputMixer_get_Treble_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAudioInputMixer_get_TrebleRange_Proxy( + IAMAudioInputMixer * This, + /* [out] */ double *pRange); + + +void __RPC_STUB IAMAudioInputMixer_get_TrebleRange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAudioInputMixer_put_Bass_Proxy( + IAMAudioInputMixer * This, + /* [in] */ double Bass); + + +void __RPC_STUB IAMAudioInputMixer_put_Bass_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAudioInputMixer_get_Bass_Proxy( + IAMAudioInputMixer * This, + /* [out] */ double *pBass); + + +void __RPC_STUB IAMAudioInputMixer_get_Bass_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAudioInputMixer_get_BassRange_Proxy( + IAMAudioInputMixer * This, + /* [out] */ double *pRange); + + +void __RPC_STUB IAMAudioInputMixer_get_BassRange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMAudioInputMixer_INTERFACE_DEFINED__ */ + + +#ifndef __IAMBufferNegotiation_INTERFACE_DEFINED__ +#define __IAMBufferNegotiation_INTERFACE_DEFINED__ + +/* interface IAMBufferNegotiation */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMBufferNegotiation; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("56ED71A0-AF5F-11D0-B3F0-00AA003761C5") + IAMBufferNegotiation : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SuggestAllocatorProperties( + /* [in] */ const ALLOCATOR_PROPERTIES *pprop) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAllocatorProperties( + /* [out] */ ALLOCATOR_PROPERTIES *pprop) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMBufferNegotiationVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMBufferNegotiation * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMBufferNegotiation * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMBufferNegotiation * This); + + HRESULT ( STDMETHODCALLTYPE *SuggestAllocatorProperties )( + IAMBufferNegotiation * This, + /* [in] */ const ALLOCATOR_PROPERTIES *pprop); + + HRESULT ( STDMETHODCALLTYPE *GetAllocatorProperties )( + IAMBufferNegotiation * This, + /* [out] */ ALLOCATOR_PROPERTIES *pprop); + + END_INTERFACE + } IAMBufferNegotiationVtbl; + + interface IAMBufferNegotiation + { + CONST_VTBL struct IAMBufferNegotiationVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMBufferNegotiation_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMBufferNegotiation_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMBufferNegotiation_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMBufferNegotiation_SuggestAllocatorProperties(This,pprop) \ + (This)->lpVtbl -> SuggestAllocatorProperties(This,pprop) + +#define IAMBufferNegotiation_GetAllocatorProperties(This,pprop) \ + (This)->lpVtbl -> GetAllocatorProperties(This,pprop) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMBufferNegotiation_SuggestAllocatorProperties_Proxy( + IAMBufferNegotiation * This, + /* [in] */ const ALLOCATOR_PROPERTIES *pprop); + + +void __RPC_STUB IAMBufferNegotiation_SuggestAllocatorProperties_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMBufferNegotiation_GetAllocatorProperties_Proxy( + IAMBufferNegotiation * This, + /* [out] */ ALLOCATOR_PROPERTIES *pprop); + + +void __RPC_STUB IAMBufferNegotiation_GetAllocatorProperties_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMBufferNegotiation_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0164 */ +/* [local] */ + +typedef +enum tagAnalogVideoStandard + { AnalogVideo_None = 0, + AnalogVideo_NTSC_M = 0x1, + AnalogVideo_NTSC_M_J = 0x2, + AnalogVideo_NTSC_433 = 0x4, + AnalogVideo_PAL_B = 0x10, + AnalogVideo_PAL_D = 0x20, + AnalogVideo_PAL_G = 0x40, + AnalogVideo_PAL_H = 0x80, + AnalogVideo_PAL_I = 0x100, + AnalogVideo_PAL_M = 0x200, + AnalogVideo_PAL_N = 0x400, + AnalogVideo_PAL_60 = 0x800, + AnalogVideo_SECAM_B = 0x1000, + AnalogVideo_SECAM_D = 0x2000, + AnalogVideo_SECAM_G = 0x4000, + AnalogVideo_SECAM_H = 0x8000, + AnalogVideo_SECAM_K = 0x10000, + AnalogVideo_SECAM_K1 = 0x20000, + AnalogVideo_SECAM_L = 0x40000, + AnalogVideo_SECAM_L1 = 0x80000, + AnalogVideo_PAL_N_COMBO = 0x100000 + } AnalogVideoStandard; + +#define AnalogVideo_NTSC_Mask 0x00000007 +#define AnalogVideo_PAL_Mask 0x00100FF0 +#define AnalogVideo_SECAM_Mask 0x000FF000 +typedef +enum tagTunerInputType + { TunerInputCable = 0, + TunerInputAntenna = TunerInputCable + 1 + } TunerInputType; + +typedef /* [public] */ +enum __MIDL___MIDL_itf_strmif_0164_0001 + { VideoCopyProtectionMacrovisionBasic = 0, + VideoCopyProtectionMacrovisionCBI = VideoCopyProtectionMacrovisionBasic + 1 + } VideoCopyProtectionType; + +typedef +enum tagPhysicalConnectorType + { PhysConn_Video_Tuner = 1, + PhysConn_Video_Composite = PhysConn_Video_Tuner + 1, + PhysConn_Video_SVideo = PhysConn_Video_Composite + 1, + PhysConn_Video_RGB = PhysConn_Video_SVideo + 1, + PhysConn_Video_YRYBY = PhysConn_Video_RGB + 1, + PhysConn_Video_SerialDigital = PhysConn_Video_YRYBY + 1, + PhysConn_Video_ParallelDigital = PhysConn_Video_SerialDigital + 1, + PhysConn_Video_SCSI = PhysConn_Video_ParallelDigital + 1, + PhysConn_Video_AUX = PhysConn_Video_SCSI + 1, + PhysConn_Video_1394 = PhysConn_Video_AUX + 1, + PhysConn_Video_USB = PhysConn_Video_1394 + 1, + PhysConn_Video_VideoDecoder = PhysConn_Video_USB + 1, + PhysConn_Video_VideoEncoder = PhysConn_Video_VideoDecoder + 1, + PhysConn_Video_SCART = PhysConn_Video_VideoEncoder + 1, + PhysConn_Video_Black = PhysConn_Video_SCART + 1, + PhysConn_Audio_Tuner = 0x1000, + PhysConn_Audio_Line = PhysConn_Audio_Tuner + 1, + PhysConn_Audio_Mic = PhysConn_Audio_Line + 1, + PhysConn_Audio_AESDigital = PhysConn_Audio_Mic + 1, + PhysConn_Audio_SPDIFDigital = PhysConn_Audio_AESDigital + 1, + PhysConn_Audio_SCSI = PhysConn_Audio_SPDIFDigital + 1, + PhysConn_Audio_AUX = PhysConn_Audio_SCSI + 1, + PhysConn_Audio_1394 = PhysConn_Audio_AUX + 1, + PhysConn_Audio_USB = PhysConn_Audio_1394 + 1, + PhysConn_Audio_AudioDecoder = PhysConn_Audio_USB + 1 + } PhysicalConnectorType; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0164_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0164_v0_0_s_ifspec; + +#ifndef __IAMAnalogVideoDecoder_INTERFACE_DEFINED__ +#define __IAMAnalogVideoDecoder_INTERFACE_DEFINED__ + +/* interface IAMAnalogVideoDecoder */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMAnalogVideoDecoder; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C6E13350-30AC-11d0-A18C-00A0C9118956") + IAMAnalogVideoDecoder : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE get_AvailableTVFormats( + /* [out] */ long *lAnalogVideoStandard) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_TVFormat( + /* [in] */ long lAnalogVideoStandard) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_TVFormat( + /* [out] */ long *plAnalogVideoStandard) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_HorizontalLocked( + /* [out] */ long *plLocked) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_VCRHorizontalLocking( + /* [in] */ long lVCRHorizontalLocking) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_VCRHorizontalLocking( + /* [out] */ long *plVCRHorizontalLocking) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_NumberOfLines( + /* [out] */ long *plNumberOfLines) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_OutputEnable( + /* [in] */ long lOutputEnable) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_OutputEnable( + /* [out] */ long *plOutputEnable) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMAnalogVideoDecoderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMAnalogVideoDecoder * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMAnalogVideoDecoder * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMAnalogVideoDecoder * This); + + HRESULT ( STDMETHODCALLTYPE *get_AvailableTVFormats )( + IAMAnalogVideoDecoder * This, + /* [out] */ long *lAnalogVideoStandard); + + HRESULT ( STDMETHODCALLTYPE *put_TVFormat )( + IAMAnalogVideoDecoder * This, + /* [in] */ long lAnalogVideoStandard); + + HRESULT ( STDMETHODCALLTYPE *get_TVFormat )( + IAMAnalogVideoDecoder * This, + /* [out] */ long *plAnalogVideoStandard); + + HRESULT ( STDMETHODCALLTYPE *get_HorizontalLocked )( + IAMAnalogVideoDecoder * This, + /* [out] */ long *plLocked); + + HRESULT ( STDMETHODCALLTYPE *put_VCRHorizontalLocking )( + IAMAnalogVideoDecoder * This, + /* [in] */ long lVCRHorizontalLocking); + + HRESULT ( STDMETHODCALLTYPE *get_VCRHorizontalLocking )( + IAMAnalogVideoDecoder * This, + /* [out] */ long *plVCRHorizontalLocking); + + HRESULT ( STDMETHODCALLTYPE *get_NumberOfLines )( + IAMAnalogVideoDecoder * This, + /* [out] */ long *plNumberOfLines); + + HRESULT ( STDMETHODCALLTYPE *put_OutputEnable )( + IAMAnalogVideoDecoder * This, + /* [in] */ long lOutputEnable); + + HRESULT ( STDMETHODCALLTYPE *get_OutputEnable )( + IAMAnalogVideoDecoder * This, + /* [out] */ long *plOutputEnable); + + END_INTERFACE + } IAMAnalogVideoDecoderVtbl; + + interface IAMAnalogVideoDecoder + { + CONST_VTBL struct IAMAnalogVideoDecoderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMAnalogVideoDecoder_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMAnalogVideoDecoder_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMAnalogVideoDecoder_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMAnalogVideoDecoder_get_AvailableTVFormats(This,lAnalogVideoStandard) \ + (This)->lpVtbl -> get_AvailableTVFormats(This,lAnalogVideoStandard) + +#define IAMAnalogVideoDecoder_put_TVFormat(This,lAnalogVideoStandard) \ + (This)->lpVtbl -> put_TVFormat(This,lAnalogVideoStandard) + +#define IAMAnalogVideoDecoder_get_TVFormat(This,plAnalogVideoStandard) \ + (This)->lpVtbl -> get_TVFormat(This,plAnalogVideoStandard) + +#define IAMAnalogVideoDecoder_get_HorizontalLocked(This,plLocked) \ + (This)->lpVtbl -> get_HorizontalLocked(This,plLocked) + +#define IAMAnalogVideoDecoder_put_VCRHorizontalLocking(This,lVCRHorizontalLocking) \ + (This)->lpVtbl -> put_VCRHorizontalLocking(This,lVCRHorizontalLocking) + +#define IAMAnalogVideoDecoder_get_VCRHorizontalLocking(This,plVCRHorizontalLocking) \ + (This)->lpVtbl -> get_VCRHorizontalLocking(This,plVCRHorizontalLocking) + +#define IAMAnalogVideoDecoder_get_NumberOfLines(This,plNumberOfLines) \ + (This)->lpVtbl -> get_NumberOfLines(This,plNumberOfLines) + +#define IAMAnalogVideoDecoder_put_OutputEnable(This,lOutputEnable) \ + (This)->lpVtbl -> put_OutputEnable(This,lOutputEnable) + +#define IAMAnalogVideoDecoder_get_OutputEnable(This,plOutputEnable) \ + (This)->lpVtbl -> get_OutputEnable(This,plOutputEnable) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMAnalogVideoDecoder_get_AvailableTVFormats_Proxy( + IAMAnalogVideoDecoder * This, + /* [out] */ long *lAnalogVideoStandard); + + +void __RPC_STUB IAMAnalogVideoDecoder_get_AvailableTVFormats_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAnalogVideoDecoder_put_TVFormat_Proxy( + IAMAnalogVideoDecoder * This, + /* [in] */ long lAnalogVideoStandard); + + +void __RPC_STUB IAMAnalogVideoDecoder_put_TVFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAnalogVideoDecoder_get_TVFormat_Proxy( + IAMAnalogVideoDecoder * This, + /* [out] */ long *plAnalogVideoStandard); + + +void __RPC_STUB IAMAnalogVideoDecoder_get_TVFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAnalogVideoDecoder_get_HorizontalLocked_Proxy( + IAMAnalogVideoDecoder * This, + /* [out] */ long *plLocked); + + +void __RPC_STUB IAMAnalogVideoDecoder_get_HorizontalLocked_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAnalogVideoDecoder_put_VCRHorizontalLocking_Proxy( + IAMAnalogVideoDecoder * This, + /* [in] */ long lVCRHorizontalLocking); + + +void __RPC_STUB IAMAnalogVideoDecoder_put_VCRHorizontalLocking_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAnalogVideoDecoder_get_VCRHorizontalLocking_Proxy( + IAMAnalogVideoDecoder * This, + /* [out] */ long *plVCRHorizontalLocking); + + +void __RPC_STUB IAMAnalogVideoDecoder_get_VCRHorizontalLocking_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAnalogVideoDecoder_get_NumberOfLines_Proxy( + IAMAnalogVideoDecoder * This, + /* [out] */ long *plNumberOfLines); + + +void __RPC_STUB IAMAnalogVideoDecoder_get_NumberOfLines_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAnalogVideoDecoder_put_OutputEnable_Proxy( + IAMAnalogVideoDecoder * This, + /* [in] */ long lOutputEnable); + + +void __RPC_STUB IAMAnalogVideoDecoder_put_OutputEnable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAnalogVideoDecoder_get_OutputEnable_Proxy( + IAMAnalogVideoDecoder * This, + /* [out] */ long *plOutputEnable); + + +void __RPC_STUB IAMAnalogVideoDecoder_get_OutputEnable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMAnalogVideoDecoder_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0165 */ +/* [local] */ + +typedef +enum tagVideoProcAmpProperty + { VideoProcAmp_Brightness = 0, + VideoProcAmp_Contrast = VideoProcAmp_Brightness + 1, + VideoProcAmp_Hue = VideoProcAmp_Contrast + 1, + VideoProcAmp_Saturation = VideoProcAmp_Hue + 1, + VideoProcAmp_Sharpness = VideoProcAmp_Saturation + 1, + VideoProcAmp_Gamma = VideoProcAmp_Sharpness + 1, + VideoProcAmp_ColorEnable = VideoProcAmp_Gamma + 1, + VideoProcAmp_WhiteBalance = VideoProcAmp_ColorEnable + 1, + VideoProcAmp_BacklightCompensation = VideoProcAmp_WhiteBalance + 1, + VideoProcAmp_Gain = VideoProcAmp_BacklightCompensation + 1 + } VideoProcAmpProperty; + +typedef +enum tagVideoProcAmpFlags + { VideoProcAmp_Flags_Auto = 0x1, + VideoProcAmp_Flags_Manual = 0x2 + } VideoProcAmpFlags; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0165_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0165_v0_0_s_ifspec; + +#ifndef __IAMVideoProcAmp_INTERFACE_DEFINED__ +#define __IAMVideoProcAmp_INTERFACE_DEFINED__ + +/* interface IAMVideoProcAmp */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMVideoProcAmp; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C6E13360-30AC-11d0-A18C-00A0C9118956") + IAMVideoProcAmp : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetRange( + /* [in] */ long Property, + /* [out] */ long *pMin, + /* [out] */ long *pMax, + /* [out] */ long *pSteppingDelta, + /* [out] */ long *pDefault, + /* [out] */ long *pCapsFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE Set( + /* [in] */ long Property, + /* [in] */ long lValue, + /* [in] */ long Flags) = 0; + + virtual HRESULT STDMETHODCALLTYPE Get( + /* [in] */ long Property, + /* [out] */ long *lValue, + /* [out] */ long *Flags) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMVideoProcAmpVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMVideoProcAmp * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMVideoProcAmp * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMVideoProcAmp * This); + + HRESULT ( STDMETHODCALLTYPE *GetRange )( + IAMVideoProcAmp * This, + /* [in] */ long Property, + /* [out] */ long *pMin, + /* [out] */ long *pMax, + /* [out] */ long *pSteppingDelta, + /* [out] */ long *pDefault, + /* [out] */ long *pCapsFlags); + + HRESULT ( STDMETHODCALLTYPE *Set )( + IAMVideoProcAmp * This, + /* [in] */ long Property, + /* [in] */ long lValue, + /* [in] */ long Flags); + + HRESULT ( STDMETHODCALLTYPE *Get )( + IAMVideoProcAmp * This, + /* [in] */ long Property, + /* [out] */ long *lValue, + /* [out] */ long *Flags); + + END_INTERFACE + } IAMVideoProcAmpVtbl; + + interface IAMVideoProcAmp + { + CONST_VTBL struct IAMVideoProcAmpVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMVideoProcAmp_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMVideoProcAmp_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMVideoProcAmp_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMVideoProcAmp_GetRange(This,Property,pMin,pMax,pSteppingDelta,pDefault,pCapsFlags) \ + (This)->lpVtbl -> GetRange(This,Property,pMin,pMax,pSteppingDelta,pDefault,pCapsFlags) + +#define IAMVideoProcAmp_Set(This,Property,lValue,Flags) \ + (This)->lpVtbl -> Set(This,Property,lValue,Flags) + +#define IAMVideoProcAmp_Get(This,Property,lValue,Flags) \ + (This)->lpVtbl -> Get(This,Property,lValue,Flags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMVideoProcAmp_GetRange_Proxy( + IAMVideoProcAmp * This, + /* [in] */ long Property, + /* [out] */ long *pMin, + /* [out] */ long *pMax, + /* [out] */ long *pSteppingDelta, + /* [out] */ long *pDefault, + /* [out] */ long *pCapsFlags); + + +void __RPC_STUB IAMVideoProcAmp_GetRange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoProcAmp_Set_Proxy( + IAMVideoProcAmp * This, + /* [in] */ long Property, + /* [in] */ long lValue, + /* [in] */ long Flags); + + +void __RPC_STUB IAMVideoProcAmp_Set_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoProcAmp_Get_Proxy( + IAMVideoProcAmp * This, + /* [in] */ long Property, + /* [out] */ long *lValue, + /* [out] */ long *Flags); + + +void __RPC_STUB IAMVideoProcAmp_Get_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMVideoProcAmp_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0166 */ +/* [local] */ + +typedef +enum tagCameraControlProperty + { CameraControl_Pan = 0, + CameraControl_Tilt = CameraControl_Pan + 1, + CameraControl_Roll = CameraControl_Tilt + 1, + CameraControl_Zoom = CameraControl_Roll + 1, + CameraControl_Exposure = CameraControl_Zoom + 1, + CameraControl_Iris = CameraControl_Exposure + 1, + CameraControl_Focus = CameraControl_Iris + 1 + } CameraControlProperty; + +typedef +enum tagCameraControlFlags + { CameraControl_Flags_Auto = 0x1, + CameraControl_Flags_Manual = 0x2 + } CameraControlFlags; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0166_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0166_v0_0_s_ifspec; + +#ifndef __IAMCameraControl_INTERFACE_DEFINED__ +#define __IAMCameraControl_INTERFACE_DEFINED__ + +/* interface IAMCameraControl */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMCameraControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C6E13370-30AC-11d0-A18C-00A0C9118956") + IAMCameraControl : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetRange( + /* [in] */ long Property, + /* [out] */ long *pMin, + /* [out] */ long *pMax, + /* [out] */ long *pSteppingDelta, + /* [out] */ long *pDefault, + /* [out] */ long *pCapsFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE Set( + /* [in] */ long Property, + /* [in] */ long lValue, + /* [in] */ long Flags) = 0; + + virtual HRESULT STDMETHODCALLTYPE Get( + /* [in] */ long Property, + /* [out] */ long *lValue, + /* [out] */ long *Flags) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMCameraControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMCameraControl * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMCameraControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMCameraControl * This); + + HRESULT ( STDMETHODCALLTYPE *GetRange )( + IAMCameraControl * This, + /* [in] */ long Property, + /* [out] */ long *pMin, + /* [out] */ long *pMax, + /* [out] */ long *pSteppingDelta, + /* [out] */ long *pDefault, + /* [out] */ long *pCapsFlags); + + HRESULT ( STDMETHODCALLTYPE *Set )( + IAMCameraControl * This, + /* [in] */ long Property, + /* [in] */ long lValue, + /* [in] */ long Flags); + + HRESULT ( STDMETHODCALLTYPE *Get )( + IAMCameraControl * This, + /* [in] */ long Property, + /* [out] */ long *lValue, + /* [out] */ long *Flags); + + END_INTERFACE + } IAMCameraControlVtbl; + + interface IAMCameraControl + { + CONST_VTBL struct IAMCameraControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMCameraControl_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMCameraControl_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMCameraControl_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMCameraControl_GetRange(This,Property,pMin,pMax,pSteppingDelta,pDefault,pCapsFlags) \ + (This)->lpVtbl -> GetRange(This,Property,pMin,pMax,pSteppingDelta,pDefault,pCapsFlags) + +#define IAMCameraControl_Set(This,Property,lValue,Flags) \ + (This)->lpVtbl -> Set(This,Property,lValue,Flags) + +#define IAMCameraControl_Get(This,Property,lValue,Flags) \ + (This)->lpVtbl -> Get(This,Property,lValue,Flags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMCameraControl_GetRange_Proxy( + IAMCameraControl * This, + /* [in] */ long Property, + /* [out] */ long *pMin, + /* [out] */ long *pMax, + /* [out] */ long *pSteppingDelta, + /* [out] */ long *pDefault, + /* [out] */ long *pCapsFlags); + + +void __RPC_STUB IAMCameraControl_GetRange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMCameraControl_Set_Proxy( + IAMCameraControl * This, + /* [in] */ long Property, + /* [in] */ long lValue, + /* [in] */ long Flags); + + +void __RPC_STUB IAMCameraControl_Set_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMCameraControl_Get_Proxy( + IAMCameraControl * This, + /* [in] */ long Property, + /* [out] */ long *lValue, + /* [out] */ long *Flags); + + +void __RPC_STUB IAMCameraControl_Get_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMCameraControl_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0167 */ +/* [local] */ + +typedef +enum tagVideoControlFlags + { VideoControlFlag_FlipHorizontal = 0x1, + VideoControlFlag_FlipVertical = 0x2, + VideoControlFlag_ExternalTriggerEnable = 0x4, + VideoControlFlag_Trigger = 0x8 + } VideoControlFlags; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0167_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0167_v0_0_s_ifspec; + +#ifndef __IAMVideoControl_INTERFACE_DEFINED__ +#define __IAMVideoControl_INTERFACE_DEFINED__ + +/* interface IAMVideoControl */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMVideoControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6a2e0670-28e4-11d0-a18c-00a0c9118956") + IAMVideoControl : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetCaps( + /* [in] */ IPin *pPin, + /* [out] */ long *pCapsFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMode( + /* [in] */ IPin *pPin, + /* [in] */ long Mode) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMode( + /* [in] */ IPin *pPin, + /* [out] */ long *Mode) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentActualFrameRate( + /* [in] */ IPin *pPin, + /* [out] */ LONGLONG *ActualFrameRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMaxAvailableFrameRate( + /* [in] */ IPin *pPin, + /* [in] */ long iIndex, + /* [in] */ SIZE Dimensions, + /* [out] */ LONGLONG *MaxAvailableFrameRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFrameRateList( + /* [in] */ IPin *pPin, + /* [in] */ long iIndex, + /* [in] */ SIZE Dimensions, + /* [out] */ long *ListSize, + /* [out] */ LONGLONG **FrameRates) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMVideoControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMVideoControl * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMVideoControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMVideoControl * This); + + HRESULT ( STDMETHODCALLTYPE *GetCaps )( + IAMVideoControl * This, + /* [in] */ IPin *pPin, + /* [out] */ long *pCapsFlags); + + HRESULT ( STDMETHODCALLTYPE *SetMode )( + IAMVideoControl * This, + /* [in] */ IPin *pPin, + /* [in] */ long Mode); + + HRESULT ( STDMETHODCALLTYPE *GetMode )( + IAMVideoControl * This, + /* [in] */ IPin *pPin, + /* [out] */ long *Mode); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentActualFrameRate )( + IAMVideoControl * This, + /* [in] */ IPin *pPin, + /* [out] */ LONGLONG *ActualFrameRate); + + HRESULT ( STDMETHODCALLTYPE *GetMaxAvailableFrameRate )( + IAMVideoControl * This, + /* [in] */ IPin *pPin, + /* [in] */ long iIndex, + /* [in] */ SIZE Dimensions, + /* [out] */ LONGLONG *MaxAvailableFrameRate); + + HRESULT ( STDMETHODCALLTYPE *GetFrameRateList )( + IAMVideoControl * This, + /* [in] */ IPin *pPin, + /* [in] */ long iIndex, + /* [in] */ SIZE Dimensions, + /* [out] */ long *ListSize, + /* [out] */ LONGLONG **FrameRates); + + END_INTERFACE + } IAMVideoControlVtbl; + + interface IAMVideoControl + { + CONST_VTBL struct IAMVideoControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMVideoControl_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMVideoControl_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMVideoControl_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMVideoControl_GetCaps(This,pPin,pCapsFlags) \ + (This)->lpVtbl -> GetCaps(This,pPin,pCapsFlags) + +#define IAMVideoControl_SetMode(This,pPin,Mode) \ + (This)->lpVtbl -> SetMode(This,pPin,Mode) + +#define IAMVideoControl_GetMode(This,pPin,Mode) \ + (This)->lpVtbl -> GetMode(This,pPin,Mode) + +#define IAMVideoControl_GetCurrentActualFrameRate(This,pPin,ActualFrameRate) \ + (This)->lpVtbl -> GetCurrentActualFrameRate(This,pPin,ActualFrameRate) + +#define IAMVideoControl_GetMaxAvailableFrameRate(This,pPin,iIndex,Dimensions,MaxAvailableFrameRate) \ + (This)->lpVtbl -> GetMaxAvailableFrameRate(This,pPin,iIndex,Dimensions,MaxAvailableFrameRate) + +#define IAMVideoControl_GetFrameRateList(This,pPin,iIndex,Dimensions,ListSize,FrameRates) \ + (This)->lpVtbl -> GetFrameRateList(This,pPin,iIndex,Dimensions,ListSize,FrameRates) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMVideoControl_GetCaps_Proxy( + IAMVideoControl * This, + /* [in] */ IPin *pPin, + /* [out] */ long *pCapsFlags); + + +void __RPC_STUB IAMVideoControl_GetCaps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoControl_SetMode_Proxy( + IAMVideoControl * This, + /* [in] */ IPin *pPin, + /* [in] */ long Mode); + + +void __RPC_STUB IAMVideoControl_SetMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoControl_GetMode_Proxy( + IAMVideoControl * This, + /* [in] */ IPin *pPin, + /* [out] */ long *Mode); + + +void __RPC_STUB IAMVideoControl_GetMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoControl_GetCurrentActualFrameRate_Proxy( + IAMVideoControl * This, + /* [in] */ IPin *pPin, + /* [out] */ LONGLONG *ActualFrameRate); + + +void __RPC_STUB IAMVideoControl_GetCurrentActualFrameRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoControl_GetMaxAvailableFrameRate_Proxy( + IAMVideoControl * This, + /* [in] */ IPin *pPin, + /* [in] */ long iIndex, + /* [in] */ SIZE Dimensions, + /* [out] */ LONGLONG *MaxAvailableFrameRate); + + +void __RPC_STUB IAMVideoControl_GetMaxAvailableFrameRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoControl_GetFrameRateList_Proxy( + IAMVideoControl * This, + /* [in] */ IPin *pPin, + /* [in] */ long iIndex, + /* [in] */ SIZE Dimensions, + /* [out] */ long *ListSize, + /* [out] */ LONGLONG **FrameRates); + + +void __RPC_STUB IAMVideoControl_GetFrameRateList_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMVideoControl_INTERFACE_DEFINED__ */ + + +#ifndef __IAMCrossbar_INTERFACE_DEFINED__ +#define __IAMCrossbar_INTERFACE_DEFINED__ + +/* interface IAMCrossbar */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMCrossbar; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C6E13380-30AC-11d0-A18C-00A0C9118956") + IAMCrossbar : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE get_PinCounts( + /* [out] */ long *OutputPinCount, + /* [out] */ long *InputPinCount) = 0; + + virtual HRESULT STDMETHODCALLTYPE CanRoute( + /* [in] */ long OutputPinIndex, + /* [in] */ long InputPinIndex) = 0; + + virtual HRESULT STDMETHODCALLTYPE Route( + /* [in] */ long OutputPinIndex, + /* [in] */ long InputPinIndex) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_IsRoutedTo( + /* [in] */ long OutputPinIndex, + /* [out] */ long *InputPinIndex) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_CrossbarPinInfo( + /* [in] */ BOOL IsInputPin, + /* [in] */ long PinIndex, + /* [out] */ long *PinIndexRelated, + /* [out] */ long *PhysicalType) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMCrossbarVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMCrossbar * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMCrossbar * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMCrossbar * This); + + HRESULT ( STDMETHODCALLTYPE *get_PinCounts )( + IAMCrossbar * This, + /* [out] */ long *OutputPinCount, + /* [out] */ long *InputPinCount); + + HRESULT ( STDMETHODCALLTYPE *CanRoute )( + IAMCrossbar * This, + /* [in] */ long OutputPinIndex, + /* [in] */ long InputPinIndex); + + HRESULT ( STDMETHODCALLTYPE *Route )( + IAMCrossbar * This, + /* [in] */ long OutputPinIndex, + /* [in] */ long InputPinIndex); + + HRESULT ( STDMETHODCALLTYPE *get_IsRoutedTo )( + IAMCrossbar * This, + /* [in] */ long OutputPinIndex, + /* [out] */ long *InputPinIndex); + + HRESULT ( STDMETHODCALLTYPE *get_CrossbarPinInfo )( + IAMCrossbar * This, + /* [in] */ BOOL IsInputPin, + /* [in] */ long PinIndex, + /* [out] */ long *PinIndexRelated, + /* [out] */ long *PhysicalType); + + END_INTERFACE + } IAMCrossbarVtbl; + + interface IAMCrossbar + { + CONST_VTBL struct IAMCrossbarVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMCrossbar_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMCrossbar_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMCrossbar_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMCrossbar_get_PinCounts(This,OutputPinCount,InputPinCount) \ + (This)->lpVtbl -> get_PinCounts(This,OutputPinCount,InputPinCount) + +#define IAMCrossbar_CanRoute(This,OutputPinIndex,InputPinIndex) \ + (This)->lpVtbl -> CanRoute(This,OutputPinIndex,InputPinIndex) + +#define IAMCrossbar_Route(This,OutputPinIndex,InputPinIndex) \ + (This)->lpVtbl -> Route(This,OutputPinIndex,InputPinIndex) + +#define IAMCrossbar_get_IsRoutedTo(This,OutputPinIndex,InputPinIndex) \ + (This)->lpVtbl -> get_IsRoutedTo(This,OutputPinIndex,InputPinIndex) + +#define IAMCrossbar_get_CrossbarPinInfo(This,IsInputPin,PinIndex,PinIndexRelated,PhysicalType) \ + (This)->lpVtbl -> get_CrossbarPinInfo(This,IsInputPin,PinIndex,PinIndexRelated,PhysicalType) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMCrossbar_get_PinCounts_Proxy( + IAMCrossbar * This, + /* [out] */ long *OutputPinCount, + /* [out] */ long *InputPinCount); + + +void __RPC_STUB IAMCrossbar_get_PinCounts_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMCrossbar_CanRoute_Proxy( + IAMCrossbar * This, + /* [in] */ long OutputPinIndex, + /* [in] */ long InputPinIndex); + + +void __RPC_STUB IAMCrossbar_CanRoute_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMCrossbar_Route_Proxy( + IAMCrossbar * This, + /* [in] */ long OutputPinIndex, + /* [in] */ long InputPinIndex); + + +void __RPC_STUB IAMCrossbar_Route_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMCrossbar_get_IsRoutedTo_Proxy( + IAMCrossbar * This, + /* [in] */ long OutputPinIndex, + /* [out] */ long *InputPinIndex); + + +void __RPC_STUB IAMCrossbar_get_IsRoutedTo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMCrossbar_get_CrossbarPinInfo_Proxy( + IAMCrossbar * This, + /* [in] */ BOOL IsInputPin, + /* [in] */ long PinIndex, + /* [out] */ long *PinIndexRelated, + /* [out] */ long *PhysicalType); + + +void __RPC_STUB IAMCrossbar_get_CrossbarPinInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMCrossbar_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0169 */ +/* [local] */ + +typedef +enum tagAMTunerSubChannel + { AMTUNER_SUBCHAN_NO_TUNE = -2, + AMTUNER_SUBCHAN_DEFAULT = -1 + } AMTunerSubChannel; + +typedef +enum tagAMTunerSignalStrength + { AMTUNER_HASNOSIGNALSTRENGTH = -1, + AMTUNER_NOSIGNAL = 0, + AMTUNER_SIGNALPRESENT = 1 + } AMTunerSignalStrength; + +typedef +enum tagAMTunerModeType + { AMTUNER_MODE_DEFAULT = 0, + AMTUNER_MODE_TV = 0x1, + AMTUNER_MODE_FM_RADIO = 0x2, + AMTUNER_MODE_AM_RADIO = 0x4, + AMTUNER_MODE_DSS = 0x8 + } AMTunerModeType; + +typedef +enum tagAMTunerEventType + { AMTUNER_EVENT_CHANGED = 0x1 + } AMTunerEventType; + + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0169_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0169_v0_0_s_ifspec; + +#ifndef __IAMTuner_INTERFACE_DEFINED__ +#define __IAMTuner_INTERFACE_DEFINED__ + +/* interface IAMTuner */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMTuner; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("211A8761-03AC-11d1-8D13-00AA00BD8339") + IAMTuner : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE put_Channel( + /* [in] */ long lChannel, + /* [in] */ long lVideoSubChannel, + /* [in] */ long lAudioSubChannel) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Channel( + /* [out] */ long *plChannel, + /* [out] */ long *plVideoSubChannel, + /* [out] */ long *plAudioSubChannel) = 0; + + virtual HRESULT STDMETHODCALLTYPE ChannelMinMax( + /* [out] */ long *lChannelMin, + /* [out] */ long *lChannelMax) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_CountryCode( + /* [in] */ long lCountryCode) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_CountryCode( + /* [out] */ long *plCountryCode) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_TuningSpace( + /* [in] */ long lTuningSpace) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_TuningSpace( + /* [out] */ long *plTuningSpace) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE Logon( + /* [in] */ HANDLE hCurrentUser) = 0; + + virtual HRESULT STDMETHODCALLTYPE Logout( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SignalPresent( + /* [out] */ long *plSignalStrength) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_Mode( + /* [in] */ AMTunerModeType lMode) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Mode( + /* [out] */ AMTunerModeType *plMode) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAvailableModes( + /* [out] */ long *plModes) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterNotificationCallBack( + /* [in] */ IAMTunerNotification *pNotify, + /* [in] */ long lEvents) = 0; + + virtual HRESULT STDMETHODCALLTYPE UnRegisterNotificationCallBack( + /* [in] */ IAMTunerNotification *pNotify) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTunerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTuner * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTuner * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTuner * This); + + HRESULT ( STDMETHODCALLTYPE *put_Channel )( + IAMTuner * This, + /* [in] */ long lChannel, + /* [in] */ long lVideoSubChannel, + /* [in] */ long lAudioSubChannel); + + HRESULT ( STDMETHODCALLTYPE *get_Channel )( + IAMTuner * This, + /* [out] */ long *plChannel, + /* [out] */ long *plVideoSubChannel, + /* [out] */ long *plAudioSubChannel); + + HRESULT ( STDMETHODCALLTYPE *ChannelMinMax )( + IAMTuner * This, + /* [out] */ long *lChannelMin, + /* [out] */ long *lChannelMax); + + HRESULT ( STDMETHODCALLTYPE *put_CountryCode )( + IAMTuner * This, + /* [in] */ long lCountryCode); + + HRESULT ( STDMETHODCALLTYPE *get_CountryCode )( + IAMTuner * This, + /* [out] */ long *plCountryCode); + + HRESULT ( STDMETHODCALLTYPE *put_TuningSpace )( + IAMTuner * This, + /* [in] */ long lTuningSpace); + + HRESULT ( STDMETHODCALLTYPE *get_TuningSpace )( + IAMTuner * This, + /* [out] */ long *plTuningSpace); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Logon )( + IAMTuner * This, + /* [in] */ HANDLE hCurrentUser); + + HRESULT ( STDMETHODCALLTYPE *Logout )( + IAMTuner * This); + + HRESULT ( STDMETHODCALLTYPE *SignalPresent )( + IAMTuner * This, + /* [out] */ long *plSignalStrength); + + HRESULT ( STDMETHODCALLTYPE *put_Mode )( + IAMTuner * This, + /* [in] */ AMTunerModeType lMode); + + HRESULT ( STDMETHODCALLTYPE *get_Mode )( + IAMTuner * This, + /* [out] */ AMTunerModeType *plMode); + + HRESULT ( STDMETHODCALLTYPE *GetAvailableModes )( + IAMTuner * This, + /* [out] */ long *plModes); + + HRESULT ( STDMETHODCALLTYPE *RegisterNotificationCallBack )( + IAMTuner * This, + /* [in] */ IAMTunerNotification *pNotify, + /* [in] */ long lEvents); + + HRESULT ( STDMETHODCALLTYPE *UnRegisterNotificationCallBack )( + IAMTuner * This, + /* [in] */ IAMTunerNotification *pNotify); + + END_INTERFACE + } IAMTunerVtbl; + + interface IAMTuner + { + CONST_VTBL struct IAMTunerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTuner_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTuner_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTuner_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTuner_put_Channel(This,lChannel,lVideoSubChannel,lAudioSubChannel) \ + (This)->lpVtbl -> put_Channel(This,lChannel,lVideoSubChannel,lAudioSubChannel) + +#define IAMTuner_get_Channel(This,plChannel,plVideoSubChannel,plAudioSubChannel) \ + (This)->lpVtbl -> get_Channel(This,plChannel,plVideoSubChannel,plAudioSubChannel) + +#define IAMTuner_ChannelMinMax(This,lChannelMin,lChannelMax) \ + (This)->lpVtbl -> ChannelMinMax(This,lChannelMin,lChannelMax) + +#define IAMTuner_put_CountryCode(This,lCountryCode) \ + (This)->lpVtbl -> put_CountryCode(This,lCountryCode) + +#define IAMTuner_get_CountryCode(This,plCountryCode) \ + (This)->lpVtbl -> get_CountryCode(This,plCountryCode) + +#define IAMTuner_put_TuningSpace(This,lTuningSpace) \ + (This)->lpVtbl -> put_TuningSpace(This,lTuningSpace) + +#define IAMTuner_get_TuningSpace(This,plTuningSpace) \ + (This)->lpVtbl -> get_TuningSpace(This,plTuningSpace) + +#define IAMTuner_Logon(This,hCurrentUser) \ + (This)->lpVtbl -> Logon(This,hCurrentUser) + +#define IAMTuner_Logout(This) \ + (This)->lpVtbl -> Logout(This) + +#define IAMTuner_SignalPresent(This,plSignalStrength) \ + (This)->lpVtbl -> SignalPresent(This,plSignalStrength) + +#define IAMTuner_put_Mode(This,lMode) \ + (This)->lpVtbl -> put_Mode(This,lMode) + +#define IAMTuner_get_Mode(This,plMode) \ + (This)->lpVtbl -> get_Mode(This,plMode) + +#define IAMTuner_GetAvailableModes(This,plModes) \ + (This)->lpVtbl -> GetAvailableModes(This,plModes) + +#define IAMTuner_RegisterNotificationCallBack(This,pNotify,lEvents) \ + (This)->lpVtbl -> RegisterNotificationCallBack(This,pNotify,lEvents) + +#define IAMTuner_UnRegisterNotificationCallBack(This,pNotify) \ + (This)->lpVtbl -> UnRegisterNotificationCallBack(This,pNotify) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMTuner_put_Channel_Proxy( + IAMTuner * This, + /* [in] */ long lChannel, + /* [in] */ long lVideoSubChannel, + /* [in] */ long lAudioSubChannel); + + +void __RPC_STUB IAMTuner_put_Channel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTuner_get_Channel_Proxy( + IAMTuner * This, + /* [out] */ long *plChannel, + /* [out] */ long *plVideoSubChannel, + /* [out] */ long *plAudioSubChannel); + + +void __RPC_STUB IAMTuner_get_Channel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTuner_ChannelMinMax_Proxy( + IAMTuner * This, + /* [out] */ long *lChannelMin, + /* [out] */ long *lChannelMax); + + +void __RPC_STUB IAMTuner_ChannelMinMax_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTuner_put_CountryCode_Proxy( + IAMTuner * This, + /* [in] */ long lCountryCode); + + +void __RPC_STUB IAMTuner_put_CountryCode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTuner_get_CountryCode_Proxy( + IAMTuner * This, + /* [out] */ long *plCountryCode); + + +void __RPC_STUB IAMTuner_get_CountryCode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTuner_put_TuningSpace_Proxy( + IAMTuner * This, + /* [in] */ long lTuningSpace); + + +void __RPC_STUB IAMTuner_put_TuningSpace_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTuner_get_TuningSpace_Proxy( + IAMTuner * This, + /* [out] */ long *plTuningSpace); + + +void __RPC_STUB IAMTuner_get_TuningSpace_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [local] */ HRESULT STDMETHODCALLTYPE IAMTuner_Logon_Proxy( + IAMTuner * This, + /* [in] */ HANDLE hCurrentUser); + + +void __RPC_STUB IAMTuner_Logon_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTuner_Logout_Proxy( + IAMTuner * This); + + +void __RPC_STUB IAMTuner_Logout_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTuner_SignalPresent_Proxy( + IAMTuner * This, + /* [out] */ long *plSignalStrength); + + +void __RPC_STUB IAMTuner_SignalPresent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTuner_put_Mode_Proxy( + IAMTuner * This, + /* [in] */ AMTunerModeType lMode); + + +void __RPC_STUB IAMTuner_put_Mode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTuner_get_Mode_Proxy( + IAMTuner * This, + /* [out] */ AMTunerModeType *plMode); + + +void __RPC_STUB IAMTuner_get_Mode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTuner_GetAvailableModes_Proxy( + IAMTuner * This, + /* [out] */ long *plModes); + + +void __RPC_STUB IAMTuner_GetAvailableModes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTuner_RegisterNotificationCallBack_Proxy( + IAMTuner * This, + /* [in] */ IAMTunerNotification *pNotify, + /* [in] */ long lEvents); + + +void __RPC_STUB IAMTuner_RegisterNotificationCallBack_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTuner_UnRegisterNotificationCallBack_Proxy( + IAMTuner * This, + /* [in] */ IAMTunerNotification *pNotify); + + +void __RPC_STUB IAMTuner_UnRegisterNotificationCallBack_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTuner_INTERFACE_DEFINED__ */ + + +#ifndef __IAMTunerNotification_INTERFACE_DEFINED__ +#define __IAMTunerNotification_INTERFACE_DEFINED__ + +/* interface IAMTunerNotification */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMTunerNotification; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("211A8760-03AC-11d1-8D13-00AA00BD8339") + IAMTunerNotification : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE OnEvent( + /* [in] */ AMTunerEventType Event) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTunerNotificationVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTunerNotification * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTunerNotification * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTunerNotification * This); + + HRESULT ( STDMETHODCALLTYPE *OnEvent )( + IAMTunerNotification * This, + /* [in] */ AMTunerEventType Event); + + END_INTERFACE + } IAMTunerNotificationVtbl; + + interface IAMTunerNotification + { + CONST_VTBL struct IAMTunerNotificationVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTunerNotification_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTunerNotification_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTunerNotification_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTunerNotification_OnEvent(This,Event) \ + (This)->lpVtbl -> OnEvent(This,Event) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMTunerNotification_OnEvent_Proxy( + IAMTunerNotification * This, + /* [in] */ AMTunerEventType Event); + + +void __RPC_STUB IAMTunerNotification_OnEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTunerNotification_INTERFACE_DEFINED__ */ + + +#ifndef __IAMTVTuner_INTERFACE_DEFINED__ +#define __IAMTVTuner_INTERFACE_DEFINED__ + +/* interface IAMTVTuner */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMTVTuner; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("211A8766-03AC-11d1-8D13-00AA00BD8339") + IAMTVTuner : public IAMTuner + { + public: + virtual HRESULT STDMETHODCALLTYPE get_AvailableTVFormats( + /* [out] */ long *lAnalogVideoStandard) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_TVFormat( + /* [out] */ long *plAnalogVideoStandard) = 0; + + virtual HRESULT STDMETHODCALLTYPE AutoTune( + /* [in] */ long lChannel, + /* [out] */ long *plFoundSignal) = 0; + + virtual HRESULT STDMETHODCALLTYPE StoreAutoTune( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_NumInputConnections( + /* [out] */ long *plNumInputConnections) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_InputType( + /* [in] */ long lIndex, + /* [in] */ TunerInputType InputType) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_InputType( + /* [in] */ long lIndex, + /* [out] */ TunerInputType *pInputType) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_ConnectInput( + /* [in] */ long lIndex) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_ConnectInput( + /* [out] */ long *plIndex) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_VideoFrequency( + /* [out] */ long *lFreq) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_AudioFrequency( + /* [out] */ long *lFreq) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTVTunerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTVTuner * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTVTuner * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTVTuner * This); + + HRESULT ( STDMETHODCALLTYPE *put_Channel )( + IAMTVTuner * This, + /* [in] */ long lChannel, + /* [in] */ long lVideoSubChannel, + /* [in] */ long lAudioSubChannel); + + HRESULT ( STDMETHODCALLTYPE *get_Channel )( + IAMTVTuner * This, + /* [out] */ long *plChannel, + /* [out] */ long *plVideoSubChannel, + /* [out] */ long *plAudioSubChannel); + + HRESULT ( STDMETHODCALLTYPE *ChannelMinMax )( + IAMTVTuner * This, + /* [out] */ long *lChannelMin, + /* [out] */ long *lChannelMax); + + HRESULT ( STDMETHODCALLTYPE *put_CountryCode )( + IAMTVTuner * This, + /* [in] */ long lCountryCode); + + HRESULT ( STDMETHODCALLTYPE *get_CountryCode )( + IAMTVTuner * This, + /* [out] */ long *plCountryCode); + + HRESULT ( STDMETHODCALLTYPE *put_TuningSpace )( + IAMTVTuner * This, + /* [in] */ long lTuningSpace); + + HRESULT ( STDMETHODCALLTYPE *get_TuningSpace )( + IAMTVTuner * This, + /* [out] */ long *plTuningSpace); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Logon )( + IAMTVTuner * This, + /* [in] */ HANDLE hCurrentUser); + + HRESULT ( STDMETHODCALLTYPE *Logout )( + IAMTVTuner * This); + + HRESULT ( STDMETHODCALLTYPE *SignalPresent )( + IAMTVTuner * This, + /* [out] */ long *plSignalStrength); + + HRESULT ( STDMETHODCALLTYPE *put_Mode )( + IAMTVTuner * This, + /* [in] */ AMTunerModeType lMode); + + HRESULT ( STDMETHODCALLTYPE *get_Mode )( + IAMTVTuner * This, + /* [out] */ AMTunerModeType *plMode); + + HRESULT ( STDMETHODCALLTYPE *GetAvailableModes )( + IAMTVTuner * This, + /* [out] */ long *plModes); + + HRESULT ( STDMETHODCALLTYPE *RegisterNotificationCallBack )( + IAMTVTuner * This, + /* [in] */ IAMTunerNotification *pNotify, + /* [in] */ long lEvents); + + HRESULT ( STDMETHODCALLTYPE *UnRegisterNotificationCallBack )( + IAMTVTuner * This, + /* [in] */ IAMTunerNotification *pNotify); + + HRESULT ( STDMETHODCALLTYPE *get_AvailableTVFormats )( + IAMTVTuner * This, + /* [out] */ long *lAnalogVideoStandard); + + HRESULT ( STDMETHODCALLTYPE *get_TVFormat )( + IAMTVTuner * This, + /* [out] */ long *plAnalogVideoStandard); + + HRESULT ( STDMETHODCALLTYPE *AutoTune )( + IAMTVTuner * This, + /* [in] */ long lChannel, + /* [out] */ long *plFoundSignal); + + HRESULT ( STDMETHODCALLTYPE *StoreAutoTune )( + IAMTVTuner * This); + + HRESULT ( STDMETHODCALLTYPE *get_NumInputConnections )( + IAMTVTuner * This, + /* [out] */ long *plNumInputConnections); + + HRESULT ( STDMETHODCALLTYPE *put_InputType )( + IAMTVTuner * This, + /* [in] */ long lIndex, + /* [in] */ TunerInputType InputType); + + HRESULT ( STDMETHODCALLTYPE *get_InputType )( + IAMTVTuner * This, + /* [in] */ long lIndex, + /* [out] */ TunerInputType *pInputType); + + HRESULT ( STDMETHODCALLTYPE *put_ConnectInput )( + IAMTVTuner * This, + /* [in] */ long lIndex); + + HRESULT ( STDMETHODCALLTYPE *get_ConnectInput )( + IAMTVTuner * This, + /* [out] */ long *plIndex); + + HRESULT ( STDMETHODCALLTYPE *get_VideoFrequency )( + IAMTVTuner * This, + /* [out] */ long *lFreq); + + HRESULT ( STDMETHODCALLTYPE *get_AudioFrequency )( + IAMTVTuner * This, + /* [out] */ long *lFreq); + + END_INTERFACE + } IAMTVTunerVtbl; + + interface IAMTVTuner + { + CONST_VTBL struct IAMTVTunerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTVTuner_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTVTuner_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTVTuner_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTVTuner_put_Channel(This,lChannel,lVideoSubChannel,lAudioSubChannel) \ + (This)->lpVtbl -> put_Channel(This,lChannel,lVideoSubChannel,lAudioSubChannel) + +#define IAMTVTuner_get_Channel(This,plChannel,plVideoSubChannel,plAudioSubChannel) \ + (This)->lpVtbl -> get_Channel(This,plChannel,plVideoSubChannel,plAudioSubChannel) + +#define IAMTVTuner_ChannelMinMax(This,lChannelMin,lChannelMax) \ + (This)->lpVtbl -> ChannelMinMax(This,lChannelMin,lChannelMax) + +#define IAMTVTuner_put_CountryCode(This,lCountryCode) \ + (This)->lpVtbl -> put_CountryCode(This,lCountryCode) + +#define IAMTVTuner_get_CountryCode(This,plCountryCode) \ + (This)->lpVtbl -> get_CountryCode(This,plCountryCode) + +#define IAMTVTuner_put_TuningSpace(This,lTuningSpace) \ + (This)->lpVtbl -> put_TuningSpace(This,lTuningSpace) + +#define IAMTVTuner_get_TuningSpace(This,plTuningSpace) \ + (This)->lpVtbl -> get_TuningSpace(This,plTuningSpace) + +#define IAMTVTuner_Logon(This,hCurrentUser) \ + (This)->lpVtbl -> Logon(This,hCurrentUser) + +#define IAMTVTuner_Logout(This) \ + (This)->lpVtbl -> Logout(This) + +#define IAMTVTuner_SignalPresent(This,plSignalStrength) \ + (This)->lpVtbl -> SignalPresent(This,plSignalStrength) + +#define IAMTVTuner_put_Mode(This,lMode) \ + (This)->lpVtbl -> put_Mode(This,lMode) + +#define IAMTVTuner_get_Mode(This,plMode) \ + (This)->lpVtbl -> get_Mode(This,plMode) + +#define IAMTVTuner_GetAvailableModes(This,plModes) \ + (This)->lpVtbl -> GetAvailableModes(This,plModes) + +#define IAMTVTuner_RegisterNotificationCallBack(This,pNotify,lEvents) \ + (This)->lpVtbl -> RegisterNotificationCallBack(This,pNotify,lEvents) + +#define IAMTVTuner_UnRegisterNotificationCallBack(This,pNotify) \ + (This)->lpVtbl -> UnRegisterNotificationCallBack(This,pNotify) + + +#define IAMTVTuner_get_AvailableTVFormats(This,lAnalogVideoStandard) \ + (This)->lpVtbl -> get_AvailableTVFormats(This,lAnalogVideoStandard) + +#define IAMTVTuner_get_TVFormat(This,plAnalogVideoStandard) \ + (This)->lpVtbl -> get_TVFormat(This,plAnalogVideoStandard) + +#define IAMTVTuner_AutoTune(This,lChannel,plFoundSignal) \ + (This)->lpVtbl -> AutoTune(This,lChannel,plFoundSignal) + +#define IAMTVTuner_StoreAutoTune(This) \ + (This)->lpVtbl -> StoreAutoTune(This) + +#define IAMTVTuner_get_NumInputConnections(This,plNumInputConnections) \ + (This)->lpVtbl -> get_NumInputConnections(This,plNumInputConnections) + +#define IAMTVTuner_put_InputType(This,lIndex,InputType) \ + (This)->lpVtbl -> put_InputType(This,lIndex,InputType) + +#define IAMTVTuner_get_InputType(This,lIndex,pInputType) \ + (This)->lpVtbl -> get_InputType(This,lIndex,pInputType) + +#define IAMTVTuner_put_ConnectInput(This,lIndex) \ + (This)->lpVtbl -> put_ConnectInput(This,lIndex) + +#define IAMTVTuner_get_ConnectInput(This,plIndex) \ + (This)->lpVtbl -> get_ConnectInput(This,plIndex) + +#define IAMTVTuner_get_VideoFrequency(This,lFreq) \ + (This)->lpVtbl -> get_VideoFrequency(This,lFreq) + +#define IAMTVTuner_get_AudioFrequency(This,lFreq) \ + (This)->lpVtbl -> get_AudioFrequency(This,lFreq) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMTVTuner_get_AvailableTVFormats_Proxy( + IAMTVTuner * This, + /* [out] */ long *lAnalogVideoStandard); + + +void __RPC_STUB IAMTVTuner_get_AvailableTVFormats_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTVTuner_get_TVFormat_Proxy( + IAMTVTuner * This, + /* [out] */ long *plAnalogVideoStandard); + + +void __RPC_STUB IAMTVTuner_get_TVFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTVTuner_AutoTune_Proxy( + IAMTVTuner * This, + /* [in] */ long lChannel, + /* [out] */ long *plFoundSignal); + + +void __RPC_STUB IAMTVTuner_AutoTune_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTVTuner_StoreAutoTune_Proxy( + IAMTVTuner * This); + + +void __RPC_STUB IAMTVTuner_StoreAutoTune_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTVTuner_get_NumInputConnections_Proxy( + IAMTVTuner * This, + /* [out] */ long *plNumInputConnections); + + +void __RPC_STUB IAMTVTuner_get_NumInputConnections_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTVTuner_put_InputType_Proxy( + IAMTVTuner * This, + /* [in] */ long lIndex, + /* [in] */ TunerInputType InputType); + + +void __RPC_STUB IAMTVTuner_put_InputType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTVTuner_get_InputType_Proxy( + IAMTVTuner * This, + /* [in] */ long lIndex, + /* [out] */ TunerInputType *pInputType); + + +void __RPC_STUB IAMTVTuner_get_InputType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTVTuner_put_ConnectInput_Proxy( + IAMTVTuner * This, + /* [in] */ long lIndex); + + +void __RPC_STUB IAMTVTuner_put_ConnectInput_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTVTuner_get_ConnectInput_Proxy( + IAMTVTuner * This, + /* [out] */ long *plIndex); + + +void __RPC_STUB IAMTVTuner_get_ConnectInput_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTVTuner_get_VideoFrequency_Proxy( + IAMTVTuner * This, + /* [out] */ long *lFreq); + + +void __RPC_STUB IAMTVTuner_get_VideoFrequency_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTVTuner_get_AudioFrequency_Proxy( + IAMTVTuner * This, + /* [out] */ long *lFreq); + + +void __RPC_STUB IAMTVTuner_get_AudioFrequency_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTVTuner_INTERFACE_DEFINED__ */ + + +#ifndef __IBPCSatelliteTuner_INTERFACE_DEFINED__ +#define __IBPCSatelliteTuner_INTERFACE_DEFINED__ + +/* interface IBPCSatelliteTuner */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IBPCSatelliteTuner; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("211A8765-03AC-11d1-8D13-00AA00BD8339") + IBPCSatelliteTuner : public IAMTuner + { + public: + virtual HRESULT STDMETHODCALLTYPE get_DefaultSubChannelTypes( + /* [out] */ long *plDefaultVideoType, + /* [out] */ long *plDefaultAudioType) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_DefaultSubChannelTypes( + /* [in] */ long lDefaultVideoType, + /* [in] */ long lDefaultAudioType) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsTapingPermitted( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IBPCSatelliteTunerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IBPCSatelliteTuner * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IBPCSatelliteTuner * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IBPCSatelliteTuner * This); + + HRESULT ( STDMETHODCALLTYPE *put_Channel )( + IBPCSatelliteTuner * This, + /* [in] */ long lChannel, + /* [in] */ long lVideoSubChannel, + /* [in] */ long lAudioSubChannel); + + HRESULT ( STDMETHODCALLTYPE *get_Channel )( + IBPCSatelliteTuner * This, + /* [out] */ long *plChannel, + /* [out] */ long *plVideoSubChannel, + /* [out] */ long *plAudioSubChannel); + + HRESULT ( STDMETHODCALLTYPE *ChannelMinMax )( + IBPCSatelliteTuner * This, + /* [out] */ long *lChannelMin, + /* [out] */ long *lChannelMax); + + HRESULT ( STDMETHODCALLTYPE *put_CountryCode )( + IBPCSatelliteTuner * This, + /* [in] */ long lCountryCode); + + HRESULT ( STDMETHODCALLTYPE *get_CountryCode )( + IBPCSatelliteTuner * This, + /* [out] */ long *plCountryCode); + + HRESULT ( STDMETHODCALLTYPE *put_TuningSpace )( + IBPCSatelliteTuner * This, + /* [in] */ long lTuningSpace); + + HRESULT ( STDMETHODCALLTYPE *get_TuningSpace )( + IBPCSatelliteTuner * This, + /* [out] */ long *plTuningSpace); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Logon )( + IBPCSatelliteTuner * This, + /* [in] */ HANDLE hCurrentUser); + + HRESULT ( STDMETHODCALLTYPE *Logout )( + IBPCSatelliteTuner * This); + + HRESULT ( STDMETHODCALLTYPE *SignalPresent )( + IBPCSatelliteTuner * This, + /* [out] */ long *plSignalStrength); + + HRESULT ( STDMETHODCALLTYPE *put_Mode )( + IBPCSatelliteTuner * This, + /* [in] */ AMTunerModeType lMode); + + HRESULT ( STDMETHODCALLTYPE *get_Mode )( + IBPCSatelliteTuner * This, + /* [out] */ AMTunerModeType *plMode); + + HRESULT ( STDMETHODCALLTYPE *GetAvailableModes )( + IBPCSatelliteTuner * This, + /* [out] */ long *plModes); + + HRESULT ( STDMETHODCALLTYPE *RegisterNotificationCallBack )( + IBPCSatelliteTuner * This, + /* [in] */ IAMTunerNotification *pNotify, + /* [in] */ long lEvents); + + HRESULT ( STDMETHODCALLTYPE *UnRegisterNotificationCallBack )( + IBPCSatelliteTuner * This, + /* [in] */ IAMTunerNotification *pNotify); + + HRESULT ( STDMETHODCALLTYPE *get_DefaultSubChannelTypes )( + IBPCSatelliteTuner * This, + /* [out] */ long *plDefaultVideoType, + /* [out] */ long *plDefaultAudioType); + + HRESULT ( STDMETHODCALLTYPE *put_DefaultSubChannelTypes )( + IBPCSatelliteTuner * This, + /* [in] */ long lDefaultVideoType, + /* [in] */ long lDefaultAudioType); + + HRESULT ( STDMETHODCALLTYPE *IsTapingPermitted )( + IBPCSatelliteTuner * This); + + END_INTERFACE + } IBPCSatelliteTunerVtbl; + + interface IBPCSatelliteTuner + { + CONST_VTBL struct IBPCSatelliteTunerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IBPCSatelliteTuner_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IBPCSatelliteTuner_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IBPCSatelliteTuner_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IBPCSatelliteTuner_put_Channel(This,lChannel,lVideoSubChannel,lAudioSubChannel) \ + (This)->lpVtbl -> put_Channel(This,lChannel,lVideoSubChannel,lAudioSubChannel) + +#define IBPCSatelliteTuner_get_Channel(This,plChannel,plVideoSubChannel,plAudioSubChannel) \ + (This)->lpVtbl -> get_Channel(This,plChannel,plVideoSubChannel,plAudioSubChannel) + +#define IBPCSatelliteTuner_ChannelMinMax(This,lChannelMin,lChannelMax) \ + (This)->lpVtbl -> ChannelMinMax(This,lChannelMin,lChannelMax) + +#define IBPCSatelliteTuner_put_CountryCode(This,lCountryCode) \ + (This)->lpVtbl -> put_CountryCode(This,lCountryCode) + +#define IBPCSatelliteTuner_get_CountryCode(This,plCountryCode) \ + (This)->lpVtbl -> get_CountryCode(This,plCountryCode) + +#define IBPCSatelliteTuner_put_TuningSpace(This,lTuningSpace) \ + (This)->lpVtbl -> put_TuningSpace(This,lTuningSpace) + +#define IBPCSatelliteTuner_get_TuningSpace(This,plTuningSpace) \ + (This)->lpVtbl -> get_TuningSpace(This,plTuningSpace) + +#define IBPCSatelliteTuner_Logon(This,hCurrentUser) \ + (This)->lpVtbl -> Logon(This,hCurrentUser) + +#define IBPCSatelliteTuner_Logout(This) \ + (This)->lpVtbl -> Logout(This) + +#define IBPCSatelliteTuner_SignalPresent(This,plSignalStrength) \ + (This)->lpVtbl -> SignalPresent(This,plSignalStrength) + +#define IBPCSatelliteTuner_put_Mode(This,lMode) \ + (This)->lpVtbl -> put_Mode(This,lMode) + +#define IBPCSatelliteTuner_get_Mode(This,plMode) \ + (This)->lpVtbl -> get_Mode(This,plMode) + +#define IBPCSatelliteTuner_GetAvailableModes(This,plModes) \ + (This)->lpVtbl -> GetAvailableModes(This,plModes) + +#define IBPCSatelliteTuner_RegisterNotificationCallBack(This,pNotify,lEvents) \ + (This)->lpVtbl -> RegisterNotificationCallBack(This,pNotify,lEvents) + +#define IBPCSatelliteTuner_UnRegisterNotificationCallBack(This,pNotify) \ + (This)->lpVtbl -> UnRegisterNotificationCallBack(This,pNotify) + + +#define IBPCSatelliteTuner_get_DefaultSubChannelTypes(This,plDefaultVideoType,plDefaultAudioType) \ + (This)->lpVtbl -> get_DefaultSubChannelTypes(This,plDefaultVideoType,plDefaultAudioType) + +#define IBPCSatelliteTuner_put_DefaultSubChannelTypes(This,lDefaultVideoType,lDefaultAudioType) \ + (This)->lpVtbl -> put_DefaultSubChannelTypes(This,lDefaultVideoType,lDefaultAudioType) + +#define IBPCSatelliteTuner_IsTapingPermitted(This) \ + (This)->lpVtbl -> IsTapingPermitted(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IBPCSatelliteTuner_get_DefaultSubChannelTypes_Proxy( + IBPCSatelliteTuner * This, + /* [out] */ long *plDefaultVideoType, + /* [out] */ long *plDefaultAudioType); + + +void __RPC_STUB IBPCSatelliteTuner_get_DefaultSubChannelTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBPCSatelliteTuner_put_DefaultSubChannelTypes_Proxy( + IBPCSatelliteTuner * This, + /* [in] */ long lDefaultVideoType, + /* [in] */ long lDefaultAudioType); + + +void __RPC_STUB IBPCSatelliteTuner_put_DefaultSubChannelTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IBPCSatelliteTuner_IsTapingPermitted_Proxy( + IBPCSatelliteTuner * This); + + +void __RPC_STUB IBPCSatelliteTuner_IsTapingPermitted_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IBPCSatelliteTuner_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0173 */ +/* [local] */ + +typedef +enum tagTVAudioMode + { AMTVAUDIO_MODE_MONO = 0x1, + AMTVAUDIO_MODE_STEREO = 0x2, + AMTVAUDIO_MODE_LANG_A = 0x10, + AMTVAUDIO_MODE_LANG_B = 0x20, + AMTVAUDIO_MODE_LANG_C = 0x40 + } TVAudioMode; + +typedef +enum tagAMTVAudioEventType + { AMTVAUDIO_EVENT_CHANGED = 0x1 + } AMTVAudioEventType; + + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0173_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0173_v0_0_s_ifspec; + +#ifndef __IAMTVAudio_INTERFACE_DEFINED__ +#define __IAMTVAudio_INTERFACE_DEFINED__ + +/* interface IAMTVAudio */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IAMTVAudio; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("83EC1C30-23D1-11d1-99E6-00A0C9560266") + IAMTVAudio : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetHardwareSupportedTVAudioModes( + /* [out] */ long *plModes) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAvailableTVAudioModes( + /* [out] */ long *plModes) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_TVAudioMode( + /* [out] */ long *plMode) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_TVAudioMode( + /* [in] */ long lMode) = 0; + + virtual HRESULT STDMETHODCALLTYPE RegisterNotificationCallBack( + /* [in] */ IAMTunerNotification *pNotify, + /* [in] */ long lEvents) = 0; + + virtual HRESULT STDMETHODCALLTYPE UnRegisterNotificationCallBack( + IAMTunerNotification *pNotify) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTVAudioVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTVAudio * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTVAudio * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTVAudio * This); + + HRESULT ( STDMETHODCALLTYPE *GetHardwareSupportedTVAudioModes )( + IAMTVAudio * This, + /* [out] */ long *plModes); + + HRESULT ( STDMETHODCALLTYPE *GetAvailableTVAudioModes )( + IAMTVAudio * This, + /* [out] */ long *plModes); + + HRESULT ( STDMETHODCALLTYPE *get_TVAudioMode )( + IAMTVAudio * This, + /* [out] */ long *plMode); + + HRESULT ( STDMETHODCALLTYPE *put_TVAudioMode )( + IAMTVAudio * This, + /* [in] */ long lMode); + + HRESULT ( STDMETHODCALLTYPE *RegisterNotificationCallBack )( + IAMTVAudio * This, + /* [in] */ IAMTunerNotification *pNotify, + /* [in] */ long lEvents); + + HRESULT ( STDMETHODCALLTYPE *UnRegisterNotificationCallBack )( + IAMTVAudio * This, + IAMTunerNotification *pNotify); + + END_INTERFACE + } IAMTVAudioVtbl; + + interface IAMTVAudio + { + CONST_VTBL struct IAMTVAudioVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTVAudio_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTVAudio_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTVAudio_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTVAudio_GetHardwareSupportedTVAudioModes(This,plModes) \ + (This)->lpVtbl -> GetHardwareSupportedTVAudioModes(This,plModes) + +#define IAMTVAudio_GetAvailableTVAudioModes(This,plModes) \ + (This)->lpVtbl -> GetAvailableTVAudioModes(This,plModes) + +#define IAMTVAudio_get_TVAudioMode(This,plMode) \ + (This)->lpVtbl -> get_TVAudioMode(This,plMode) + +#define IAMTVAudio_put_TVAudioMode(This,lMode) \ + (This)->lpVtbl -> put_TVAudioMode(This,lMode) + +#define IAMTVAudio_RegisterNotificationCallBack(This,pNotify,lEvents) \ + (This)->lpVtbl -> RegisterNotificationCallBack(This,pNotify,lEvents) + +#define IAMTVAudio_UnRegisterNotificationCallBack(This,pNotify) \ + (This)->lpVtbl -> UnRegisterNotificationCallBack(This,pNotify) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMTVAudio_GetHardwareSupportedTVAudioModes_Proxy( + IAMTVAudio * This, + /* [out] */ long *plModes); + + +void __RPC_STUB IAMTVAudio_GetHardwareSupportedTVAudioModes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTVAudio_GetAvailableTVAudioModes_Proxy( + IAMTVAudio * This, + /* [out] */ long *plModes); + + +void __RPC_STUB IAMTVAudio_GetAvailableTVAudioModes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTVAudio_get_TVAudioMode_Proxy( + IAMTVAudio * This, + /* [out] */ long *plMode); + + +void __RPC_STUB IAMTVAudio_get_TVAudioMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTVAudio_put_TVAudioMode_Proxy( + IAMTVAudio * This, + /* [in] */ long lMode); + + +void __RPC_STUB IAMTVAudio_put_TVAudioMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTVAudio_RegisterNotificationCallBack_Proxy( + IAMTVAudio * This, + /* [in] */ IAMTunerNotification *pNotify, + /* [in] */ long lEvents); + + +void __RPC_STUB IAMTVAudio_RegisterNotificationCallBack_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTVAudio_UnRegisterNotificationCallBack_Proxy( + IAMTVAudio * This, + IAMTunerNotification *pNotify); + + +void __RPC_STUB IAMTVAudio_UnRegisterNotificationCallBack_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTVAudio_INTERFACE_DEFINED__ */ + + +#ifndef __IAMTVAudioNotification_INTERFACE_DEFINED__ +#define __IAMTVAudioNotification_INTERFACE_DEFINED__ + +/* interface IAMTVAudioNotification */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IAMTVAudioNotification; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("83EC1C33-23D1-11d1-99E6-00A0C9560266") + IAMTVAudioNotification : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE OnEvent( + /* [in] */ AMTVAudioEventType Event) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTVAudioNotificationVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTVAudioNotification * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTVAudioNotification * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTVAudioNotification * This); + + HRESULT ( STDMETHODCALLTYPE *OnEvent )( + IAMTVAudioNotification * This, + /* [in] */ AMTVAudioEventType Event); + + END_INTERFACE + } IAMTVAudioNotificationVtbl; + + interface IAMTVAudioNotification + { + CONST_VTBL struct IAMTVAudioNotificationVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTVAudioNotification_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTVAudioNotification_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTVAudioNotification_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTVAudioNotification_OnEvent(This,Event) \ + (This)->lpVtbl -> OnEvent(This,Event) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMTVAudioNotification_OnEvent_Proxy( + IAMTVAudioNotification * This, + /* [in] */ AMTVAudioEventType Event); + + +void __RPC_STUB IAMTVAudioNotification_OnEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTVAudioNotification_INTERFACE_DEFINED__ */ + + +#ifndef __IAMAnalogVideoEncoder_INTERFACE_DEFINED__ +#define __IAMAnalogVideoEncoder_INTERFACE_DEFINED__ + +/* interface IAMAnalogVideoEncoder */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMAnalogVideoEncoder; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("C6E133B0-30AC-11d0-A18C-00A0C9118956") + IAMAnalogVideoEncoder : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE get_AvailableTVFormats( + /* [out] */ long *lAnalogVideoStandard) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_TVFormat( + /* [in] */ long lAnalogVideoStandard) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_TVFormat( + /* [out] */ long *plAnalogVideoStandard) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_CopyProtection( + /* [in] */ long lVideoCopyProtection) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_CopyProtection( + /* [out] */ long *lVideoCopyProtection) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_CCEnable( + /* [in] */ long lCCEnable) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_CCEnable( + /* [out] */ long *lCCEnable) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMAnalogVideoEncoderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMAnalogVideoEncoder * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMAnalogVideoEncoder * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMAnalogVideoEncoder * This); + + HRESULT ( STDMETHODCALLTYPE *get_AvailableTVFormats )( + IAMAnalogVideoEncoder * This, + /* [out] */ long *lAnalogVideoStandard); + + HRESULT ( STDMETHODCALLTYPE *put_TVFormat )( + IAMAnalogVideoEncoder * This, + /* [in] */ long lAnalogVideoStandard); + + HRESULT ( STDMETHODCALLTYPE *get_TVFormat )( + IAMAnalogVideoEncoder * This, + /* [out] */ long *plAnalogVideoStandard); + + HRESULT ( STDMETHODCALLTYPE *put_CopyProtection )( + IAMAnalogVideoEncoder * This, + /* [in] */ long lVideoCopyProtection); + + HRESULT ( STDMETHODCALLTYPE *get_CopyProtection )( + IAMAnalogVideoEncoder * This, + /* [out] */ long *lVideoCopyProtection); + + HRESULT ( STDMETHODCALLTYPE *put_CCEnable )( + IAMAnalogVideoEncoder * This, + /* [in] */ long lCCEnable); + + HRESULT ( STDMETHODCALLTYPE *get_CCEnable )( + IAMAnalogVideoEncoder * This, + /* [out] */ long *lCCEnable); + + END_INTERFACE + } IAMAnalogVideoEncoderVtbl; + + interface IAMAnalogVideoEncoder + { + CONST_VTBL struct IAMAnalogVideoEncoderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMAnalogVideoEncoder_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMAnalogVideoEncoder_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMAnalogVideoEncoder_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMAnalogVideoEncoder_get_AvailableTVFormats(This,lAnalogVideoStandard) \ + (This)->lpVtbl -> get_AvailableTVFormats(This,lAnalogVideoStandard) + +#define IAMAnalogVideoEncoder_put_TVFormat(This,lAnalogVideoStandard) \ + (This)->lpVtbl -> put_TVFormat(This,lAnalogVideoStandard) + +#define IAMAnalogVideoEncoder_get_TVFormat(This,plAnalogVideoStandard) \ + (This)->lpVtbl -> get_TVFormat(This,plAnalogVideoStandard) + +#define IAMAnalogVideoEncoder_put_CopyProtection(This,lVideoCopyProtection) \ + (This)->lpVtbl -> put_CopyProtection(This,lVideoCopyProtection) + +#define IAMAnalogVideoEncoder_get_CopyProtection(This,lVideoCopyProtection) \ + (This)->lpVtbl -> get_CopyProtection(This,lVideoCopyProtection) + +#define IAMAnalogVideoEncoder_put_CCEnable(This,lCCEnable) \ + (This)->lpVtbl -> put_CCEnable(This,lCCEnable) + +#define IAMAnalogVideoEncoder_get_CCEnable(This,lCCEnable) \ + (This)->lpVtbl -> get_CCEnable(This,lCCEnable) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMAnalogVideoEncoder_get_AvailableTVFormats_Proxy( + IAMAnalogVideoEncoder * This, + /* [out] */ long *lAnalogVideoStandard); + + +void __RPC_STUB IAMAnalogVideoEncoder_get_AvailableTVFormats_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAnalogVideoEncoder_put_TVFormat_Proxy( + IAMAnalogVideoEncoder * This, + /* [in] */ long lAnalogVideoStandard); + + +void __RPC_STUB IAMAnalogVideoEncoder_put_TVFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAnalogVideoEncoder_get_TVFormat_Proxy( + IAMAnalogVideoEncoder * This, + /* [out] */ long *plAnalogVideoStandard); + + +void __RPC_STUB IAMAnalogVideoEncoder_get_TVFormat_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAnalogVideoEncoder_put_CopyProtection_Proxy( + IAMAnalogVideoEncoder * This, + /* [in] */ long lVideoCopyProtection); + + +void __RPC_STUB IAMAnalogVideoEncoder_put_CopyProtection_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAnalogVideoEncoder_get_CopyProtection_Proxy( + IAMAnalogVideoEncoder * This, + /* [out] */ long *lVideoCopyProtection); + + +void __RPC_STUB IAMAnalogVideoEncoder_get_CopyProtection_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAnalogVideoEncoder_put_CCEnable_Proxy( + IAMAnalogVideoEncoder * This, + /* [in] */ long lCCEnable); + + +void __RPC_STUB IAMAnalogVideoEncoder_put_CCEnable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMAnalogVideoEncoder_get_CCEnable_Proxy( + IAMAnalogVideoEncoder * This, + /* [out] */ long *lCCEnable); + + +void __RPC_STUB IAMAnalogVideoEncoder_get_CCEnable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMAnalogVideoEncoder_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0176 */ +/* [local] */ + +typedef /* [public] */ +enum __MIDL___MIDL_itf_strmif_0176_0001 + { AMPROPERTY_PIN_CATEGORY = 0, + AMPROPERTY_PIN_MEDIUM = AMPROPERTY_PIN_CATEGORY + 1 + } AMPROPERTY_PIN; + +#ifndef _IKsPropertySet_ +#define _IKsPropertySet_ +#define KSPROPERTY_SUPPORT_GET 1 +#define KSPROPERTY_SUPPORT_SET 2 + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0176_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0176_v0_0_s_ifspec; + +#ifndef __IKsPropertySet_INTERFACE_DEFINED__ +#define __IKsPropertySet_INTERFACE_DEFINED__ + +/* interface IKsPropertySet */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IKsPropertySet; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("31EFAC30-515C-11d0-A9AA-00AA0061BE93") + IKsPropertySet : public IUnknown + { + public: + virtual /* [local] */ HRESULT STDMETHODCALLTYPE Set( + /* [in] */ REFGUID guidPropSet, + /* [in] */ DWORD dwPropID, + /* [size_is][in] */ LPVOID pInstanceData, + /* [in] */ DWORD cbInstanceData, + /* [size_is][in] */ LPVOID pPropData, + /* [in] */ DWORD cbPropData) = 0; + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE Get( + /* [in] */ REFGUID guidPropSet, + /* [in] */ DWORD dwPropID, + /* [size_is][in] */ LPVOID pInstanceData, + /* [in] */ DWORD cbInstanceData, + /* [size_is][out] */ LPVOID pPropData, + /* [in] */ DWORD cbPropData, + /* [out] */ DWORD *pcbReturned) = 0; + + virtual HRESULT STDMETHODCALLTYPE QuerySupported( + /* [in] */ REFGUID guidPropSet, + /* [in] */ DWORD dwPropID, + /* [out] */ DWORD *pTypeSupport) = 0; + + }; + +#else /* C style interface */ + + typedef struct IKsPropertySetVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IKsPropertySet * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IKsPropertySet * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IKsPropertySet * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Set )( + IKsPropertySet * This, + /* [in] */ REFGUID guidPropSet, + /* [in] */ DWORD dwPropID, + /* [size_is][in] */ LPVOID pInstanceData, + /* [in] */ DWORD cbInstanceData, + /* [size_is][in] */ LPVOID pPropData, + /* [in] */ DWORD cbPropData); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Get )( + IKsPropertySet * This, + /* [in] */ REFGUID guidPropSet, + /* [in] */ DWORD dwPropID, + /* [size_is][in] */ LPVOID pInstanceData, + /* [in] */ DWORD cbInstanceData, + /* [size_is][out] */ LPVOID pPropData, + /* [in] */ DWORD cbPropData, + /* [out] */ DWORD *pcbReturned); + + HRESULT ( STDMETHODCALLTYPE *QuerySupported )( + IKsPropertySet * This, + /* [in] */ REFGUID guidPropSet, + /* [in] */ DWORD dwPropID, + /* [out] */ DWORD *pTypeSupport); + + END_INTERFACE + } IKsPropertySetVtbl; + + interface IKsPropertySet + { + CONST_VTBL struct IKsPropertySetVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IKsPropertySet_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IKsPropertySet_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IKsPropertySet_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IKsPropertySet_Set(This,guidPropSet,dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData) \ + (This)->lpVtbl -> Set(This,guidPropSet,dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData) + +#define IKsPropertySet_Get(This,guidPropSet,dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData,pcbReturned) \ + (This)->lpVtbl -> Get(This,guidPropSet,dwPropID,pInstanceData,cbInstanceData,pPropData,cbPropData,pcbReturned) + +#define IKsPropertySet_QuerySupported(This,guidPropSet,dwPropID,pTypeSupport) \ + (This)->lpVtbl -> QuerySupported(This,guidPropSet,dwPropID,pTypeSupport) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [call_as] */ HRESULT STDMETHODCALLTYPE IKsPropertySet_RemoteSet_Proxy( + IKsPropertySet * This, + /* [in] */ REFGUID guidPropSet, + /* [in] */ DWORD dwPropID, + /* [size_is][in] */ byte *pInstanceData, + /* [in] */ DWORD cbInstanceData, + /* [size_is][in] */ byte *pPropData, + /* [in] */ DWORD cbPropData); + + +void __RPC_STUB IKsPropertySet_RemoteSet_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [call_as] */ HRESULT STDMETHODCALLTYPE IKsPropertySet_RemoteGet_Proxy( + IKsPropertySet * This, + /* [in] */ REFGUID guidPropSet, + /* [in] */ DWORD dwPropID, + /* [size_is][in] */ byte *pInstanceData, + /* [in] */ DWORD cbInstanceData, + /* [size_is][out] */ byte *pPropData, + /* [in] */ DWORD cbPropData, + /* [out] */ DWORD *pcbReturned); + + +void __RPC_STUB IKsPropertySet_RemoteGet_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IKsPropertySet_QuerySupported_Proxy( + IKsPropertySet * This, + /* [in] */ REFGUID guidPropSet, + /* [in] */ DWORD dwPropID, + /* [out] */ DWORD *pTypeSupport); + + +void __RPC_STUB IKsPropertySet_QuerySupported_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IKsPropertySet_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0177 */ +/* [local] */ + +#endif // _IKsPropertySet_ + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0177_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0177_v0_0_s_ifspec; + +#ifndef __IMediaPropertyBag_INTERFACE_DEFINED__ +#define __IMediaPropertyBag_INTERFACE_DEFINED__ + +/* interface IMediaPropertyBag */ +/* [unique][uuid][object] */ + +typedef IMediaPropertyBag *LPMEDIAPROPERTYBAG; + + +EXTERN_C const IID IID_IMediaPropertyBag; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6025A880-C0D5-11d0-BD4E-00A0C911CE86") + IMediaPropertyBag : public IPropertyBag + { + public: + virtual HRESULT STDMETHODCALLTYPE EnumProperty( + /* [in] */ ULONG iProperty, + /* [out][in] */ VARIANT *pvarPropertyName, + /* [out][in] */ VARIANT *pvarPropertyValue) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMediaPropertyBagVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMediaPropertyBag * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMediaPropertyBag * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMediaPropertyBag * This); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Read )( + IMediaPropertyBag * This, + /* [in] */ LPCOLESTR pszPropName, + /* [out][in] */ VARIANT *pVar, + /* [in] */ IErrorLog *pErrorLog); + + HRESULT ( STDMETHODCALLTYPE *Write )( + IMediaPropertyBag * This, + /* [in] */ LPCOLESTR pszPropName, + /* [in] */ VARIANT *pVar); + + HRESULT ( STDMETHODCALLTYPE *EnumProperty )( + IMediaPropertyBag * This, + /* [in] */ ULONG iProperty, + /* [out][in] */ VARIANT *pvarPropertyName, + /* [out][in] */ VARIANT *pvarPropertyValue); + + END_INTERFACE + } IMediaPropertyBagVtbl; + + interface IMediaPropertyBag + { + CONST_VTBL struct IMediaPropertyBagVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMediaPropertyBag_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMediaPropertyBag_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMediaPropertyBag_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMediaPropertyBag_Read(This,pszPropName,pVar,pErrorLog) \ + (This)->lpVtbl -> Read(This,pszPropName,pVar,pErrorLog) + +#define IMediaPropertyBag_Write(This,pszPropName,pVar) \ + (This)->lpVtbl -> Write(This,pszPropName,pVar) + + +#define IMediaPropertyBag_EnumProperty(This,iProperty,pvarPropertyName,pvarPropertyValue) \ + (This)->lpVtbl -> EnumProperty(This,iProperty,pvarPropertyName,pvarPropertyValue) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMediaPropertyBag_EnumProperty_Proxy( + IMediaPropertyBag * This, + /* [in] */ ULONG iProperty, + /* [out][in] */ VARIANT *pvarPropertyName, + /* [out][in] */ VARIANT *pvarPropertyValue); + + +void __RPC_STUB IMediaPropertyBag_EnumProperty_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMediaPropertyBag_INTERFACE_DEFINED__ */ + + +#ifndef __IPersistMediaPropertyBag_INTERFACE_DEFINED__ +#define __IPersistMediaPropertyBag_INTERFACE_DEFINED__ + +/* interface IPersistMediaPropertyBag */ +/* [unique][uuid][object] */ + +typedef IPersistMediaPropertyBag *LPPERSISTMEDIAPROPERTYBAG; + + +EXTERN_C const IID IID_IPersistMediaPropertyBag; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("5738E040-B67F-11d0-BD4D-00A0C911CE86") + IPersistMediaPropertyBag : public IPersist + { + public: + virtual HRESULT STDMETHODCALLTYPE InitNew( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Load( + /* [in] */ IMediaPropertyBag *pPropBag, + /* [in] */ IErrorLog *pErrorLog) = 0; + + virtual HRESULT STDMETHODCALLTYPE Save( + /* [in] */ IMediaPropertyBag *pPropBag, + /* [in] */ BOOL fClearDirty, + /* [in] */ BOOL fSaveAllProperties) = 0; + + }; + +#else /* C style interface */ + + typedef struct IPersistMediaPropertyBagVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IPersistMediaPropertyBag * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IPersistMediaPropertyBag * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IPersistMediaPropertyBag * This); + + HRESULT ( STDMETHODCALLTYPE *GetClassID )( + IPersistMediaPropertyBag * This, + /* [out] */ CLSID *pClassID); + + HRESULT ( STDMETHODCALLTYPE *InitNew )( + IPersistMediaPropertyBag * This); + + HRESULT ( STDMETHODCALLTYPE *Load )( + IPersistMediaPropertyBag * This, + /* [in] */ IMediaPropertyBag *pPropBag, + /* [in] */ IErrorLog *pErrorLog); + + HRESULT ( STDMETHODCALLTYPE *Save )( + IPersistMediaPropertyBag * This, + /* [in] */ IMediaPropertyBag *pPropBag, + /* [in] */ BOOL fClearDirty, + /* [in] */ BOOL fSaveAllProperties); + + END_INTERFACE + } IPersistMediaPropertyBagVtbl; + + interface IPersistMediaPropertyBag + { + CONST_VTBL struct IPersistMediaPropertyBagVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IPersistMediaPropertyBag_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IPersistMediaPropertyBag_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IPersistMediaPropertyBag_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IPersistMediaPropertyBag_GetClassID(This,pClassID) \ + (This)->lpVtbl -> GetClassID(This,pClassID) + + +#define IPersistMediaPropertyBag_InitNew(This) \ + (This)->lpVtbl -> InitNew(This) + +#define IPersistMediaPropertyBag_Load(This,pPropBag,pErrorLog) \ + (This)->lpVtbl -> Load(This,pPropBag,pErrorLog) + +#define IPersistMediaPropertyBag_Save(This,pPropBag,fClearDirty,fSaveAllProperties) \ + (This)->lpVtbl -> Save(This,pPropBag,fClearDirty,fSaveAllProperties) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IPersistMediaPropertyBag_InitNew_Proxy( + IPersistMediaPropertyBag * This); + + +void __RPC_STUB IPersistMediaPropertyBag_InitNew_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPersistMediaPropertyBag_Load_Proxy( + IPersistMediaPropertyBag * This, + /* [in] */ IMediaPropertyBag *pPropBag, + /* [in] */ IErrorLog *pErrorLog); + + +void __RPC_STUB IPersistMediaPropertyBag_Load_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPersistMediaPropertyBag_Save_Proxy( + IPersistMediaPropertyBag * This, + /* [in] */ IMediaPropertyBag *pPropBag, + /* [in] */ BOOL fClearDirty, + /* [in] */ BOOL fSaveAllProperties); + + +void __RPC_STUB IPersistMediaPropertyBag_Save_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IPersistMediaPropertyBag_INTERFACE_DEFINED__ */ + + +#ifndef __IAMPhysicalPinInfo_INTERFACE_DEFINED__ +#define __IAMPhysicalPinInfo_INTERFACE_DEFINED__ + +/* interface IAMPhysicalPinInfo */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMPhysicalPinInfo; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("F938C991-3029-11cf-8C44-00AA006B6814") + IAMPhysicalPinInfo : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetPhysicalType( + /* [out] */ long *pType, + /* [out] */ LPOLESTR *ppszType) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMPhysicalPinInfoVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMPhysicalPinInfo * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMPhysicalPinInfo * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMPhysicalPinInfo * This); + + HRESULT ( STDMETHODCALLTYPE *GetPhysicalType )( + IAMPhysicalPinInfo * This, + /* [out] */ long *pType, + /* [out] */ LPOLESTR *ppszType); + + END_INTERFACE + } IAMPhysicalPinInfoVtbl; + + interface IAMPhysicalPinInfo + { + CONST_VTBL struct IAMPhysicalPinInfoVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMPhysicalPinInfo_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMPhysicalPinInfo_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMPhysicalPinInfo_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMPhysicalPinInfo_GetPhysicalType(This,pType,ppszType) \ + (This)->lpVtbl -> GetPhysicalType(This,pType,ppszType) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMPhysicalPinInfo_GetPhysicalType_Proxy( + IAMPhysicalPinInfo * This, + /* [out] */ long *pType, + /* [out] */ LPOLESTR *ppszType); + + +void __RPC_STUB IAMPhysicalPinInfo_GetPhysicalType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMPhysicalPinInfo_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0322 */ +/* [local] */ + +typedef IAMPhysicalPinInfo *PAMPHYSICALPININFO; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0322_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0322_v0_0_s_ifspec; + +#ifndef __IAMExtDevice_INTERFACE_DEFINED__ +#define __IAMExtDevice_INTERFACE_DEFINED__ + +/* interface IAMExtDevice */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMExtDevice; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B5730A90-1A2C-11cf-8C23-00AA006B6814") + IAMExtDevice : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetCapability( + /* [in] */ long Capability, + /* [out] */ long *pValue, + /* [out] */ double *pdblValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_ExternalDeviceID( + /* [out] */ LPOLESTR *ppszData) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_ExternalDeviceVersion( + /* [out] */ LPOLESTR *ppszData) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_DevicePower( + /* [in] */ long PowerMode) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_DevicePower( + /* [out] */ long *pPowerMode) = 0; + + virtual HRESULT STDMETHODCALLTYPE Calibrate( + /* [in] */ HEVENT hEvent, + /* [in] */ long Mode, + /* [out] */ long *pStatus) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_DevicePort( + /* [in] */ long DevicePort) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_DevicePort( + /* [out] */ long *pDevicePort) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMExtDeviceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMExtDevice * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMExtDevice * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMExtDevice * This); + + HRESULT ( STDMETHODCALLTYPE *GetCapability )( + IAMExtDevice * This, + /* [in] */ long Capability, + /* [out] */ long *pValue, + /* [out] */ double *pdblValue); + + HRESULT ( STDMETHODCALLTYPE *get_ExternalDeviceID )( + IAMExtDevice * This, + /* [out] */ LPOLESTR *ppszData); + + HRESULT ( STDMETHODCALLTYPE *get_ExternalDeviceVersion )( + IAMExtDevice * This, + /* [out] */ LPOLESTR *ppszData); + + HRESULT ( STDMETHODCALLTYPE *put_DevicePower )( + IAMExtDevice * This, + /* [in] */ long PowerMode); + + HRESULT ( STDMETHODCALLTYPE *get_DevicePower )( + IAMExtDevice * This, + /* [out] */ long *pPowerMode); + + HRESULT ( STDMETHODCALLTYPE *Calibrate )( + IAMExtDevice * This, + /* [in] */ HEVENT hEvent, + /* [in] */ long Mode, + /* [out] */ long *pStatus); + + HRESULT ( STDMETHODCALLTYPE *put_DevicePort )( + IAMExtDevice * This, + /* [in] */ long DevicePort); + + HRESULT ( STDMETHODCALLTYPE *get_DevicePort )( + IAMExtDevice * This, + /* [out] */ long *pDevicePort); + + END_INTERFACE + } IAMExtDeviceVtbl; + + interface IAMExtDevice + { + CONST_VTBL struct IAMExtDeviceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMExtDevice_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMExtDevice_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMExtDevice_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMExtDevice_GetCapability(This,Capability,pValue,pdblValue) \ + (This)->lpVtbl -> GetCapability(This,Capability,pValue,pdblValue) + +#define IAMExtDevice_get_ExternalDeviceID(This,ppszData) \ + (This)->lpVtbl -> get_ExternalDeviceID(This,ppszData) + +#define IAMExtDevice_get_ExternalDeviceVersion(This,ppszData) \ + (This)->lpVtbl -> get_ExternalDeviceVersion(This,ppszData) + +#define IAMExtDevice_put_DevicePower(This,PowerMode) \ + (This)->lpVtbl -> put_DevicePower(This,PowerMode) + +#define IAMExtDevice_get_DevicePower(This,pPowerMode) \ + (This)->lpVtbl -> get_DevicePower(This,pPowerMode) + +#define IAMExtDevice_Calibrate(This,hEvent,Mode,pStatus) \ + (This)->lpVtbl -> Calibrate(This,hEvent,Mode,pStatus) + +#define IAMExtDevice_put_DevicePort(This,DevicePort) \ + (This)->lpVtbl -> put_DevicePort(This,DevicePort) + +#define IAMExtDevice_get_DevicePort(This,pDevicePort) \ + (This)->lpVtbl -> get_DevicePort(This,pDevicePort) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMExtDevice_GetCapability_Proxy( + IAMExtDevice * This, + /* [in] */ long Capability, + /* [out] */ long *pValue, + /* [out] */ double *pdblValue); + + +void __RPC_STUB IAMExtDevice_GetCapability_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtDevice_get_ExternalDeviceID_Proxy( + IAMExtDevice * This, + /* [out] */ LPOLESTR *ppszData); + + +void __RPC_STUB IAMExtDevice_get_ExternalDeviceID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtDevice_get_ExternalDeviceVersion_Proxy( + IAMExtDevice * This, + /* [out] */ LPOLESTR *ppszData); + + +void __RPC_STUB IAMExtDevice_get_ExternalDeviceVersion_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtDevice_put_DevicePower_Proxy( + IAMExtDevice * This, + /* [in] */ long PowerMode); + + +void __RPC_STUB IAMExtDevice_put_DevicePower_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtDevice_get_DevicePower_Proxy( + IAMExtDevice * This, + /* [out] */ long *pPowerMode); + + +void __RPC_STUB IAMExtDevice_get_DevicePower_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtDevice_Calibrate_Proxy( + IAMExtDevice * This, + /* [in] */ HEVENT hEvent, + /* [in] */ long Mode, + /* [out] */ long *pStatus); + + +void __RPC_STUB IAMExtDevice_Calibrate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtDevice_put_DevicePort_Proxy( + IAMExtDevice * This, + /* [in] */ long DevicePort); + + +void __RPC_STUB IAMExtDevice_put_DevicePort_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtDevice_get_DevicePort_Proxy( + IAMExtDevice * This, + /* [out] */ long *pDevicePort); + + +void __RPC_STUB IAMExtDevice_get_DevicePort_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMExtDevice_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0323 */ +/* [local] */ + +typedef IAMExtDevice *PEXTDEVICE; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0323_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0323_v0_0_s_ifspec; + +#ifndef __IAMExtTransport_INTERFACE_DEFINED__ +#define __IAMExtTransport_INTERFACE_DEFINED__ + +/* interface IAMExtTransport */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMExtTransport; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A03CD5F0-3045-11cf-8C44-00AA006B6814") + IAMExtTransport : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetCapability( + /* [in] */ long Capability, + /* [out] */ long *pValue, + /* [out] */ double *pdblValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_MediaState( + /* [in] */ long State) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_MediaState( + /* [out] */ long *pState) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_LocalControl( + /* [in] */ long State) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_LocalControl( + /* [out] */ long *pState) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStatus( + /* [in] */ long StatusItem, + /* [out] */ long *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTransportBasicParameters( + /* [in] */ long Param, + /* [out] */ long *pValue, + /* [out] */ LPOLESTR *ppszData) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTransportBasicParameters( + /* [in] */ long Param, + /* [in] */ long Value, + /* [in] */ LPCOLESTR pszData) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTransportVideoParameters( + /* [in] */ long Param, + /* [out] */ long *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTransportVideoParameters( + /* [in] */ long Param, + /* [in] */ long Value) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTransportAudioParameters( + /* [in] */ long Param, + /* [out] */ long *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTransportAudioParameters( + /* [in] */ long Param, + /* [in] */ long Value) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_Mode( + /* [in] */ long Mode) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Mode( + /* [out] */ long *pMode) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_Rate( + /* [in] */ double dblRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Rate( + /* [out] */ double *pdblRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetChase( + /* [out] */ long *pEnabled, + /* [out] */ long *pOffset, + /* [out] */ HEVENT *phEvent) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetChase( + /* [in] */ long Enable, + /* [in] */ long Offset, + /* [in] */ HEVENT hEvent) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetBump( + /* [out] */ long *pSpeed, + /* [out] */ long *pDuration) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetBump( + /* [in] */ long Speed, + /* [in] */ long Duration) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_AntiClogControl( + /* [out] */ long *pEnabled) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_AntiClogControl( + /* [in] */ long Enable) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetEditPropertySet( + /* [in] */ long EditID, + /* [out] */ long *pState) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetEditPropertySet( + /* [out][in] */ long *pEditID, + /* [in] */ long State) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetEditProperty( + /* [in] */ long EditID, + /* [in] */ long Param, + /* [out] */ long *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetEditProperty( + /* [in] */ long EditID, + /* [in] */ long Param, + /* [in] */ long Value) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_EditStart( + /* [out] */ long *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_EditStart( + /* [in] */ long Value) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMExtTransportVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMExtTransport * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMExtTransport * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMExtTransport * This); + + HRESULT ( STDMETHODCALLTYPE *GetCapability )( + IAMExtTransport * This, + /* [in] */ long Capability, + /* [out] */ long *pValue, + /* [out] */ double *pdblValue); + + HRESULT ( STDMETHODCALLTYPE *put_MediaState )( + IAMExtTransport * This, + /* [in] */ long State); + + HRESULT ( STDMETHODCALLTYPE *get_MediaState )( + IAMExtTransport * This, + /* [out] */ long *pState); + + HRESULT ( STDMETHODCALLTYPE *put_LocalControl )( + IAMExtTransport * This, + /* [in] */ long State); + + HRESULT ( STDMETHODCALLTYPE *get_LocalControl )( + IAMExtTransport * This, + /* [out] */ long *pState); + + HRESULT ( STDMETHODCALLTYPE *GetStatus )( + IAMExtTransport * This, + /* [in] */ long StatusItem, + /* [out] */ long *pValue); + + HRESULT ( STDMETHODCALLTYPE *GetTransportBasicParameters )( + IAMExtTransport * This, + /* [in] */ long Param, + /* [out] */ long *pValue, + /* [out] */ LPOLESTR *ppszData); + + HRESULT ( STDMETHODCALLTYPE *SetTransportBasicParameters )( + IAMExtTransport * This, + /* [in] */ long Param, + /* [in] */ long Value, + /* [in] */ LPCOLESTR pszData); + + HRESULT ( STDMETHODCALLTYPE *GetTransportVideoParameters )( + IAMExtTransport * This, + /* [in] */ long Param, + /* [out] */ long *pValue); + + HRESULT ( STDMETHODCALLTYPE *SetTransportVideoParameters )( + IAMExtTransport * This, + /* [in] */ long Param, + /* [in] */ long Value); + + HRESULT ( STDMETHODCALLTYPE *GetTransportAudioParameters )( + IAMExtTransport * This, + /* [in] */ long Param, + /* [out] */ long *pValue); + + HRESULT ( STDMETHODCALLTYPE *SetTransportAudioParameters )( + IAMExtTransport * This, + /* [in] */ long Param, + /* [in] */ long Value); + + HRESULT ( STDMETHODCALLTYPE *put_Mode )( + IAMExtTransport * This, + /* [in] */ long Mode); + + HRESULT ( STDMETHODCALLTYPE *get_Mode )( + IAMExtTransport * This, + /* [out] */ long *pMode); + + HRESULT ( STDMETHODCALLTYPE *put_Rate )( + IAMExtTransport * This, + /* [in] */ double dblRate); + + HRESULT ( STDMETHODCALLTYPE *get_Rate )( + IAMExtTransport * This, + /* [out] */ double *pdblRate); + + HRESULT ( STDMETHODCALLTYPE *GetChase )( + IAMExtTransport * This, + /* [out] */ long *pEnabled, + /* [out] */ long *pOffset, + /* [out] */ HEVENT *phEvent); + + HRESULT ( STDMETHODCALLTYPE *SetChase )( + IAMExtTransport * This, + /* [in] */ long Enable, + /* [in] */ long Offset, + /* [in] */ HEVENT hEvent); + + HRESULT ( STDMETHODCALLTYPE *GetBump )( + IAMExtTransport * This, + /* [out] */ long *pSpeed, + /* [out] */ long *pDuration); + + HRESULT ( STDMETHODCALLTYPE *SetBump )( + IAMExtTransport * This, + /* [in] */ long Speed, + /* [in] */ long Duration); + + HRESULT ( STDMETHODCALLTYPE *get_AntiClogControl )( + IAMExtTransport * This, + /* [out] */ long *pEnabled); + + HRESULT ( STDMETHODCALLTYPE *put_AntiClogControl )( + IAMExtTransport * This, + /* [in] */ long Enable); + + HRESULT ( STDMETHODCALLTYPE *GetEditPropertySet )( + IAMExtTransport * This, + /* [in] */ long EditID, + /* [out] */ long *pState); + + HRESULT ( STDMETHODCALLTYPE *SetEditPropertySet )( + IAMExtTransport * This, + /* [out][in] */ long *pEditID, + /* [in] */ long State); + + HRESULT ( STDMETHODCALLTYPE *GetEditProperty )( + IAMExtTransport * This, + /* [in] */ long EditID, + /* [in] */ long Param, + /* [out] */ long *pValue); + + HRESULT ( STDMETHODCALLTYPE *SetEditProperty )( + IAMExtTransport * This, + /* [in] */ long EditID, + /* [in] */ long Param, + /* [in] */ long Value); + + HRESULT ( STDMETHODCALLTYPE *get_EditStart )( + IAMExtTransport * This, + /* [out] */ long *pValue); + + HRESULT ( STDMETHODCALLTYPE *put_EditStart )( + IAMExtTransport * This, + /* [in] */ long Value); + + END_INTERFACE + } IAMExtTransportVtbl; + + interface IAMExtTransport + { + CONST_VTBL struct IAMExtTransportVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMExtTransport_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMExtTransport_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMExtTransport_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMExtTransport_GetCapability(This,Capability,pValue,pdblValue) \ + (This)->lpVtbl -> GetCapability(This,Capability,pValue,pdblValue) + +#define IAMExtTransport_put_MediaState(This,State) \ + (This)->lpVtbl -> put_MediaState(This,State) + +#define IAMExtTransport_get_MediaState(This,pState) \ + (This)->lpVtbl -> get_MediaState(This,pState) + +#define IAMExtTransport_put_LocalControl(This,State) \ + (This)->lpVtbl -> put_LocalControl(This,State) + +#define IAMExtTransport_get_LocalControl(This,pState) \ + (This)->lpVtbl -> get_LocalControl(This,pState) + +#define IAMExtTransport_GetStatus(This,StatusItem,pValue) \ + (This)->lpVtbl -> GetStatus(This,StatusItem,pValue) + +#define IAMExtTransport_GetTransportBasicParameters(This,Param,pValue,ppszData) \ + (This)->lpVtbl -> GetTransportBasicParameters(This,Param,pValue,ppszData) + +#define IAMExtTransport_SetTransportBasicParameters(This,Param,Value,pszData) \ + (This)->lpVtbl -> SetTransportBasicParameters(This,Param,Value,pszData) + +#define IAMExtTransport_GetTransportVideoParameters(This,Param,pValue) \ + (This)->lpVtbl -> GetTransportVideoParameters(This,Param,pValue) + +#define IAMExtTransport_SetTransportVideoParameters(This,Param,Value) \ + (This)->lpVtbl -> SetTransportVideoParameters(This,Param,Value) + +#define IAMExtTransport_GetTransportAudioParameters(This,Param,pValue) \ + (This)->lpVtbl -> GetTransportAudioParameters(This,Param,pValue) + +#define IAMExtTransport_SetTransportAudioParameters(This,Param,Value) \ + (This)->lpVtbl -> SetTransportAudioParameters(This,Param,Value) + +#define IAMExtTransport_put_Mode(This,Mode) \ + (This)->lpVtbl -> put_Mode(This,Mode) + +#define IAMExtTransport_get_Mode(This,pMode) \ + (This)->lpVtbl -> get_Mode(This,pMode) + +#define IAMExtTransport_put_Rate(This,dblRate) \ + (This)->lpVtbl -> put_Rate(This,dblRate) + +#define IAMExtTransport_get_Rate(This,pdblRate) \ + (This)->lpVtbl -> get_Rate(This,pdblRate) + +#define IAMExtTransport_GetChase(This,pEnabled,pOffset,phEvent) \ + (This)->lpVtbl -> GetChase(This,pEnabled,pOffset,phEvent) + +#define IAMExtTransport_SetChase(This,Enable,Offset,hEvent) \ + (This)->lpVtbl -> SetChase(This,Enable,Offset,hEvent) + +#define IAMExtTransport_GetBump(This,pSpeed,pDuration) \ + (This)->lpVtbl -> GetBump(This,pSpeed,pDuration) + +#define IAMExtTransport_SetBump(This,Speed,Duration) \ + (This)->lpVtbl -> SetBump(This,Speed,Duration) + +#define IAMExtTransport_get_AntiClogControl(This,pEnabled) \ + (This)->lpVtbl -> get_AntiClogControl(This,pEnabled) + +#define IAMExtTransport_put_AntiClogControl(This,Enable) \ + (This)->lpVtbl -> put_AntiClogControl(This,Enable) + +#define IAMExtTransport_GetEditPropertySet(This,EditID,pState) \ + (This)->lpVtbl -> GetEditPropertySet(This,EditID,pState) + +#define IAMExtTransport_SetEditPropertySet(This,pEditID,State) \ + (This)->lpVtbl -> SetEditPropertySet(This,pEditID,State) + +#define IAMExtTransport_GetEditProperty(This,EditID,Param,pValue) \ + (This)->lpVtbl -> GetEditProperty(This,EditID,Param,pValue) + +#define IAMExtTransport_SetEditProperty(This,EditID,Param,Value) \ + (This)->lpVtbl -> SetEditProperty(This,EditID,Param,Value) + +#define IAMExtTransport_get_EditStart(This,pValue) \ + (This)->lpVtbl -> get_EditStart(This,pValue) + +#define IAMExtTransport_put_EditStart(This,Value) \ + (This)->lpVtbl -> put_EditStart(This,Value) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_GetCapability_Proxy( + IAMExtTransport * This, + /* [in] */ long Capability, + /* [out] */ long *pValue, + /* [out] */ double *pdblValue); + + +void __RPC_STUB IAMExtTransport_GetCapability_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_put_MediaState_Proxy( + IAMExtTransport * This, + /* [in] */ long State); + + +void __RPC_STUB IAMExtTransport_put_MediaState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_get_MediaState_Proxy( + IAMExtTransport * This, + /* [out] */ long *pState); + + +void __RPC_STUB IAMExtTransport_get_MediaState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_put_LocalControl_Proxy( + IAMExtTransport * This, + /* [in] */ long State); + + +void __RPC_STUB IAMExtTransport_put_LocalControl_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_get_LocalControl_Proxy( + IAMExtTransport * This, + /* [out] */ long *pState); + + +void __RPC_STUB IAMExtTransport_get_LocalControl_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_GetStatus_Proxy( + IAMExtTransport * This, + /* [in] */ long StatusItem, + /* [out] */ long *pValue); + + +void __RPC_STUB IAMExtTransport_GetStatus_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_GetTransportBasicParameters_Proxy( + IAMExtTransport * This, + /* [in] */ long Param, + /* [out] */ long *pValue, + /* [out] */ LPOLESTR *ppszData); + + +void __RPC_STUB IAMExtTransport_GetTransportBasicParameters_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_SetTransportBasicParameters_Proxy( + IAMExtTransport * This, + /* [in] */ long Param, + /* [in] */ long Value, + /* [in] */ LPCOLESTR pszData); + + +void __RPC_STUB IAMExtTransport_SetTransportBasicParameters_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_GetTransportVideoParameters_Proxy( + IAMExtTransport * This, + /* [in] */ long Param, + /* [out] */ long *pValue); + + +void __RPC_STUB IAMExtTransport_GetTransportVideoParameters_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_SetTransportVideoParameters_Proxy( + IAMExtTransport * This, + /* [in] */ long Param, + /* [in] */ long Value); + + +void __RPC_STUB IAMExtTransport_SetTransportVideoParameters_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_GetTransportAudioParameters_Proxy( + IAMExtTransport * This, + /* [in] */ long Param, + /* [out] */ long *pValue); + + +void __RPC_STUB IAMExtTransport_GetTransportAudioParameters_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_SetTransportAudioParameters_Proxy( + IAMExtTransport * This, + /* [in] */ long Param, + /* [in] */ long Value); + + +void __RPC_STUB IAMExtTransport_SetTransportAudioParameters_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_put_Mode_Proxy( + IAMExtTransport * This, + /* [in] */ long Mode); + + +void __RPC_STUB IAMExtTransport_put_Mode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_get_Mode_Proxy( + IAMExtTransport * This, + /* [out] */ long *pMode); + + +void __RPC_STUB IAMExtTransport_get_Mode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_put_Rate_Proxy( + IAMExtTransport * This, + /* [in] */ double dblRate); + + +void __RPC_STUB IAMExtTransport_put_Rate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_get_Rate_Proxy( + IAMExtTransport * This, + /* [out] */ double *pdblRate); + + +void __RPC_STUB IAMExtTransport_get_Rate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_GetChase_Proxy( + IAMExtTransport * This, + /* [out] */ long *pEnabled, + /* [out] */ long *pOffset, + /* [out] */ HEVENT *phEvent); + + +void __RPC_STUB IAMExtTransport_GetChase_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_SetChase_Proxy( + IAMExtTransport * This, + /* [in] */ long Enable, + /* [in] */ long Offset, + /* [in] */ HEVENT hEvent); + + +void __RPC_STUB IAMExtTransport_SetChase_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_GetBump_Proxy( + IAMExtTransport * This, + /* [out] */ long *pSpeed, + /* [out] */ long *pDuration); + + +void __RPC_STUB IAMExtTransport_GetBump_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_SetBump_Proxy( + IAMExtTransport * This, + /* [in] */ long Speed, + /* [in] */ long Duration); + + +void __RPC_STUB IAMExtTransport_SetBump_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_get_AntiClogControl_Proxy( + IAMExtTransport * This, + /* [out] */ long *pEnabled); + + +void __RPC_STUB IAMExtTransport_get_AntiClogControl_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_put_AntiClogControl_Proxy( + IAMExtTransport * This, + /* [in] */ long Enable); + + +void __RPC_STUB IAMExtTransport_put_AntiClogControl_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_GetEditPropertySet_Proxy( + IAMExtTransport * This, + /* [in] */ long EditID, + /* [out] */ long *pState); + + +void __RPC_STUB IAMExtTransport_GetEditPropertySet_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_SetEditPropertySet_Proxy( + IAMExtTransport * This, + /* [out][in] */ long *pEditID, + /* [in] */ long State); + + +void __RPC_STUB IAMExtTransport_SetEditPropertySet_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_GetEditProperty_Proxy( + IAMExtTransport * This, + /* [in] */ long EditID, + /* [in] */ long Param, + /* [out] */ long *pValue); + + +void __RPC_STUB IAMExtTransport_GetEditProperty_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_SetEditProperty_Proxy( + IAMExtTransport * This, + /* [in] */ long EditID, + /* [in] */ long Param, + /* [in] */ long Value); + + +void __RPC_STUB IAMExtTransport_SetEditProperty_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_get_EditStart_Proxy( + IAMExtTransport * This, + /* [out] */ long *pValue); + + +void __RPC_STUB IAMExtTransport_get_EditStart_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMExtTransport_put_EditStart_Proxy( + IAMExtTransport * This, + /* [in] */ long Value); + + +void __RPC_STUB IAMExtTransport_put_EditStart_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMExtTransport_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0324 */ +/* [local] */ + +typedef IAMExtTransport *PIAMEXTTRANSPORT; + +#if 0 +/* the following is what MIDL knows how to remote */ +typedef struct tagTIMECODE + { + WORD wFrameRate; + WORD wFrameFract; + DWORD dwFrames; + } TIMECODE; + +#else /* 0 */ +#ifndef TIMECODE_DEFINED +#define TIMECODE_DEFINED +typedef union _timecode { + struct { + WORD wFrameRate; + WORD wFrameFract; + DWORD dwFrames; + }; + DWORDLONG qw; + } TIMECODE; + +#endif /* TIMECODE_DEFINED */ +#endif /* 0 */ +typedef TIMECODE *PTIMECODE; + +typedef struct tagTIMECODE_SAMPLE + { + LONGLONG qwTick; + TIMECODE timecode; + DWORD dwUser; + DWORD dwFlags; + } TIMECODE_SAMPLE; + +typedef TIMECODE_SAMPLE *PTIMECODE_SAMPLE; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0324_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0324_v0_0_s_ifspec; + +#ifndef __IAMTimecodeReader_INTERFACE_DEFINED__ +#define __IAMTimecodeReader_INTERFACE_DEFINED__ + +/* interface IAMTimecodeReader */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMTimecodeReader; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B496CE1-811B-11cf-8C77-00AA006B6814") + IAMTimecodeReader : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetTCRMode( + /* [in] */ long Param, + /* [out] */ long *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTCRMode( + /* [in] */ long Param, + /* [in] */ long Value) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_VITCLine( + /* [in] */ long Line) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_VITCLine( + /* [out] */ long *pLine) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTimecode( + /* [out] */ PTIMECODE_SAMPLE pTimecodeSample) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTimecodeReaderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTimecodeReader * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTimecodeReader * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTimecodeReader * This); + + HRESULT ( STDMETHODCALLTYPE *GetTCRMode )( + IAMTimecodeReader * This, + /* [in] */ long Param, + /* [out] */ long *pValue); + + HRESULT ( STDMETHODCALLTYPE *SetTCRMode )( + IAMTimecodeReader * This, + /* [in] */ long Param, + /* [in] */ long Value); + + HRESULT ( STDMETHODCALLTYPE *put_VITCLine )( + IAMTimecodeReader * This, + /* [in] */ long Line); + + HRESULT ( STDMETHODCALLTYPE *get_VITCLine )( + IAMTimecodeReader * This, + /* [out] */ long *pLine); + + HRESULT ( STDMETHODCALLTYPE *GetTimecode )( + IAMTimecodeReader * This, + /* [out] */ PTIMECODE_SAMPLE pTimecodeSample); + + END_INTERFACE + } IAMTimecodeReaderVtbl; + + interface IAMTimecodeReader + { + CONST_VTBL struct IAMTimecodeReaderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTimecodeReader_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTimecodeReader_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTimecodeReader_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTimecodeReader_GetTCRMode(This,Param,pValue) \ + (This)->lpVtbl -> GetTCRMode(This,Param,pValue) + +#define IAMTimecodeReader_SetTCRMode(This,Param,Value) \ + (This)->lpVtbl -> SetTCRMode(This,Param,Value) + +#define IAMTimecodeReader_put_VITCLine(This,Line) \ + (This)->lpVtbl -> put_VITCLine(This,Line) + +#define IAMTimecodeReader_get_VITCLine(This,pLine) \ + (This)->lpVtbl -> get_VITCLine(This,pLine) + +#define IAMTimecodeReader_GetTimecode(This,pTimecodeSample) \ + (This)->lpVtbl -> GetTimecode(This,pTimecodeSample) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMTimecodeReader_GetTCRMode_Proxy( + IAMTimecodeReader * This, + /* [in] */ long Param, + /* [out] */ long *pValue); + + +void __RPC_STUB IAMTimecodeReader_GetTCRMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimecodeReader_SetTCRMode_Proxy( + IAMTimecodeReader * This, + /* [in] */ long Param, + /* [in] */ long Value); + + +void __RPC_STUB IAMTimecodeReader_SetTCRMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimecodeReader_put_VITCLine_Proxy( + IAMTimecodeReader * This, + /* [in] */ long Line); + + +void __RPC_STUB IAMTimecodeReader_put_VITCLine_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimecodeReader_get_VITCLine_Proxy( + IAMTimecodeReader * This, + /* [out] */ long *pLine); + + +void __RPC_STUB IAMTimecodeReader_get_VITCLine_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimecodeReader_GetTimecode_Proxy( + IAMTimecodeReader * This, + /* [out] */ PTIMECODE_SAMPLE pTimecodeSample); + + +void __RPC_STUB IAMTimecodeReader_GetTimecode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTimecodeReader_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0325 */ +/* [local] */ + +typedef IAMTimecodeReader *PIAMTIMECODEREADER; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0325_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0325_v0_0_s_ifspec; + +#ifndef __IAMTimecodeGenerator_INTERFACE_DEFINED__ +#define __IAMTimecodeGenerator_INTERFACE_DEFINED__ + +/* interface IAMTimecodeGenerator */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMTimecodeGenerator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B496CE0-811B-11cf-8C77-00AA006B6814") + IAMTimecodeGenerator : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetTCGMode( + /* [in] */ long Param, + /* [out] */ long *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTCGMode( + /* [in] */ long Param, + /* [in] */ long Value) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_VITCLine( + /* [in] */ long Line) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_VITCLine( + /* [out] */ long *pLine) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTimecode( + /* [in] */ PTIMECODE_SAMPLE pTimecodeSample) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTimecode( + /* [out] */ PTIMECODE_SAMPLE pTimecodeSample) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTimecodeGeneratorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTimecodeGenerator * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTimecodeGenerator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTimecodeGenerator * This); + + HRESULT ( STDMETHODCALLTYPE *GetTCGMode )( + IAMTimecodeGenerator * This, + /* [in] */ long Param, + /* [out] */ long *pValue); + + HRESULT ( STDMETHODCALLTYPE *SetTCGMode )( + IAMTimecodeGenerator * This, + /* [in] */ long Param, + /* [in] */ long Value); + + HRESULT ( STDMETHODCALLTYPE *put_VITCLine )( + IAMTimecodeGenerator * This, + /* [in] */ long Line); + + HRESULT ( STDMETHODCALLTYPE *get_VITCLine )( + IAMTimecodeGenerator * This, + /* [out] */ long *pLine); + + HRESULT ( STDMETHODCALLTYPE *SetTimecode )( + IAMTimecodeGenerator * This, + /* [in] */ PTIMECODE_SAMPLE pTimecodeSample); + + HRESULT ( STDMETHODCALLTYPE *GetTimecode )( + IAMTimecodeGenerator * This, + /* [out] */ PTIMECODE_SAMPLE pTimecodeSample); + + END_INTERFACE + } IAMTimecodeGeneratorVtbl; + + interface IAMTimecodeGenerator + { + CONST_VTBL struct IAMTimecodeGeneratorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTimecodeGenerator_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTimecodeGenerator_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTimecodeGenerator_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTimecodeGenerator_GetTCGMode(This,Param,pValue) \ + (This)->lpVtbl -> GetTCGMode(This,Param,pValue) + +#define IAMTimecodeGenerator_SetTCGMode(This,Param,Value) \ + (This)->lpVtbl -> SetTCGMode(This,Param,Value) + +#define IAMTimecodeGenerator_put_VITCLine(This,Line) \ + (This)->lpVtbl -> put_VITCLine(This,Line) + +#define IAMTimecodeGenerator_get_VITCLine(This,pLine) \ + (This)->lpVtbl -> get_VITCLine(This,pLine) + +#define IAMTimecodeGenerator_SetTimecode(This,pTimecodeSample) \ + (This)->lpVtbl -> SetTimecode(This,pTimecodeSample) + +#define IAMTimecodeGenerator_GetTimecode(This,pTimecodeSample) \ + (This)->lpVtbl -> GetTimecode(This,pTimecodeSample) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMTimecodeGenerator_GetTCGMode_Proxy( + IAMTimecodeGenerator * This, + /* [in] */ long Param, + /* [out] */ long *pValue); + + +void __RPC_STUB IAMTimecodeGenerator_GetTCGMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimecodeGenerator_SetTCGMode_Proxy( + IAMTimecodeGenerator * This, + /* [in] */ long Param, + /* [in] */ long Value); + + +void __RPC_STUB IAMTimecodeGenerator_SetTCGMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimecodeGenerator_put_VITCLine_Proxy( + IAMTimecodeGenerator * This, + /* [in] */ long Line); + + +void __RPC_STUB IAMTimecodeGenerator_put_VITCLine_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimecodeGenerator_get_VITCLine_Proxy( + IAMTimecodeGenerator * This, + /* [out] */ long *pLine); + + +void __RPC_STUB IAMTimecodeGenerator_get_VITCLine_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimecodeGenerator_SetTimecode_Proxy( + IAMTimecodeGenerator * This, + /* [in] */ PTIMECODE_SAMPLE pTimecodeSample); + + +void __RPC_STUB IAMTimecodeGenerator_SetTimecode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimecodeGenerator_GetTimecode_Proxy( + IAMTimecodeGenerator * This, + /* [out] */ PTIMECODE_SAMPLE pTimecodeSample); + + +void __RPC_STUB IAMTimecodeGenerator_GetTimecode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTimecodeGenerator_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0326 */ +/* [local] */ + +typedef IAMTimecodeGenerator *PIAMTIMECODEGENERATOR; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0326_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0326_v0_0_s_ifspec; + +#ifndef __IAMTimecodeDisplay_INTERFACE_DEFINED__ +#define __IAMTimecodeDisplay_INTERFACE_DEFINED__ + +/* interface IAMTimecodeDisplay */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMTimecodeDisplay; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("9B496CE2-811B-11cf-8C77-00AA006B6814") + IAMTimecodeDisplay : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetTCDisplayEnable( + /* [out] */ long *pState) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTCDisplayEnable( + /* [in] */ long State) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTCDisplay( + /* [in] */ long Param, + /* [out] */ long *pValue) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetTCDisplay( + /* [in] */ long Param, + /* [in] */ long Value) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMTimecodeDisplayVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMTimecodeDisplay * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMTimecodeDisplay * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMTimecodeDisplay * This); + + HRESULT ( STDMETHODCALLTYPE *GetTCDisplayEnable )( + IAMTimecodeDisplay * This, + /* [out] */ long *pState); + + HRESULT ( STDMETHODCALLTYPE *SetTCDisplayEnable )( + IAMTimecodeDisplay * This, + /* [in] */ long State); + + HRESULT ( STDMETHODCALLTYPE *GetTCDisplay )( + IAMTimecodeDisplay * This, + /* [in] */ long Param, + /* [out] */ long *pValue); + + HRESULT ( STDMETHODCALLTYPE *SetTCDisplay )( + IAMTimecodeDisplay * This, + /* [in] */ long Param, + /* [in] */ long Value); + + END_INTERFACE + } IAMTimecodeDisplayVtbl; + + interface IAMTimecodeDisplay + { + CONST_VTBL struct IAMTimecodeDisplayVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMTimecodeDisplay_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMTimecodeDisplay_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMTimecodeDisplay_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMTimecodeDisplay_GetTCDisplayEnable(This,pState) \ + (This)->lpVtbl -> GetTCDisplayEnable(This,pState) + +#define IAMTimecodeDisplay_SetTCDisplayEnable(This,State) \ + (This)->lpVtbl -> SetTCDisplayEnable(This,State) + +#define IAMTimecodeDisplay_GetTCDisplay(This,Param,pValue) \ + (This)->lpVtbl -> GetTCDisplay(This,Param,pValue) + +#define IAMTimecodeDisplay_SetTCDisplay(This,Param,Value) \ + (This)->lpVtbl -> SetTCDisplay(This,Param,Value) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMTimecodeDisplay_GetTCDisplayEnable_Proxy( + IAMTimecodeDisplay * This, + /* [out] */ long *pState); + + +void __RPC_STUB IAMTimecodeDisplay_GetTCDisplayEnable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimecodeDisplay_SetTCDisplayEnable_Proxy( + IAMTimecodeDisplay * This, + /* [in] */ long State); + + +void __RPC_STUB IAMTimecodeDisplay_SetTCDisplayEnable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimecodeDisplay_GetTCDisplay_Proxy( + IAMTimecodeDisplay * This, + /* [in] */ long Param, + /* [out] */ long *pValue); + + +void __RPC_STUB IAMTimecodeDisplay_GetTCDisplay_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMTimecodeDisplay_SetTCDisplay_Proxy( + IAMTimecodeDisplay * This, + /* [in] */ long Param, + /* [in] */ long Value); + + +void __RPC_STUB IAMTimecodeDisplay_SetTCDisplay_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMTimecodeDisplay_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0327 */ +/* [local] */ + +typedef IAMTimecodeDisplay *PIAMTIMECODEDISPLAY; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0327_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0327_v0_0_s_ifspec; + +#ifndef __IAMDevMemoryAllocator_INTERFACE_DEFINED__ +#define __IAMDevMemoryAllocator_INTERFACE_DEFINED__ + +/* interface IAMDevMemoryAllocator */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMDevMemoryAllocator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("c6545bf0-e76b-11d0-bd52-00a0c911ce86") + IAMDevMemoryAllocator : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetInfo( + /* [out] */ DWORD *pdwcbTotalFree, + /* [out] */ DWORD *pdwcbLargestFree, + /* [out] */ DWORD *pdwcbTotalMemory, + /* [out] */ DWORD *pdwcbMinimumChunk) = 0; + + virtual HRESULT STDMETHODCALLTYPE CheckMemory( + /* [in] */ const BYTE *pBuffer) = 0; + + virtual HRESULT STDMETHODCALLTYPE Alloc( + /* [out] */ BYTE **ppBuffer, + /* [out][in] */ DWORD *pdwcbBuffer) = 0; + + virtual HRESULT STDMETHODCALLTYPE Free( + /* [in] */ BYTE *pBuffer) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDevMemoryObject( + /* [out] */ IUnknown **ppUnkInnner, + /* [in] */ IUnknown *pUnkOuter) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMDevMemoryAllocatorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMDevMemoryAllocator * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMDevMemoryAllocator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMDevMemoryAllocator * This); + + HRESULT ( STDMETHODCALLTYPE *GetInfo )( + IAMDevMemoryAllocator * This, + /* [out] */ DWORD *pdwcbTotalFree, + /* [out] */ DWORD *pdwcbLargestFree, + /* [out] */ DWORD *pdwcbTotalMemory, + /* [out] */ DWORD *pdwcbMinimumChunk); + + HRESULT ( STDMETHODCALLTYPE *CheckMemory )( + IAMDevMemoryAllocator * This, + /* [in] */ const BYTE *pBuffer); + + HRESULT ( STDMETHODCALLTYPE *Alloc )( + IAMDevMemoryAllocator * This, + /* [out] */ BYTE **ppBuffer, + /* [out][in] */ DWORD *pdwcbBuffer); + + HRESULT ( STDMETHODCALLTYPE *Free )( + IAMDevMemoryAllocator * This, + /* [in] */ BYTE *pBuffer); + + HRESULT ( STDMETHODCALLTYPE *GetDevMemoryObject )( + IAMDevMemoryAllocator * This, + /* [out] */ IUnknown **ppUnkInnner, + /* [in] */ IUnknown *pUnkOuter); + + END_INTERFACE + } IAMDevMemoryAllocatorVtbl; + + interface IAMDevMemoryAllocator + { + CONST_VTBL struct IAMDevMemoryAllocatorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMDevMemoryAllocator_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMDevMemoryAllocator_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMDevMemoryAllocator_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMDevMemoryAllocator_GetInfo(This,pdwcbTotalFree,pdwcbLargestFree,pdwcbTotalMemory,pdwcbMinimumChunk) \ + (This)->lpVtbl -> GetInfo(This,pdwcbTotalFree,pdwcbLargestFree,pdwcbTotalMemory,pdwcbMinimumChunk) + +#define IAMDevMemoryAllocator_CheckMemory(This,pBuffer) \ + (This)->lpVtbl -> CheckMemory(This,pBuffer) + +#define IAMDevMemoryAllocator_Alloc(This,ppBuffer,pdwcbBuffer) \ + (This)->lpVtbl -> Alloc(This,ppBuffer,pdwcbBuffer) + +#define IAMDevMemoryAllocator_Free(This,pBuffer) \ + (This)->lpVtbl -> Free(This,pBuffer) + +#define IAMDevMemoryAllocator_GetDevMemoryObject(This,ppUnkInnner,pUnkOuter) \ + (This)->lpVtbl -> GetDevMemoryObject(This,ppUnkInnner,pUnkOuter) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMDevMemoryAllocator_GetInfo_Proxy( + IAMDevMemoryAllocator * This, + /* [out] */ DWORD *pdwcbTotalFree, + /* [out] */ DWORD *pdwcbLargestFree, + /* [out] */ DWORD *pdwcbTotalMemory, + /* [out] */ DWORD *pdwcbMinimumChunk); + + +void __RPC_STUB IAMDevMemoryAllocator_GetInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMDevMemoryAllocator_CheckMemory_Proxy( + IAMDevMemoryAllocator * This, + /* [in] */ const BYTE *pBuffer); + + +void __RPC_STUB IAMDevMemoryAllocator_CheckMemory_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMDevMemoryAllocator_Alloc_Proxy( + IAMDevMemoryAllocator * This, + /* [out] */ BYTE **ppBuffer, + /* [out][in] */ DWORD *pdwcbBuffer); + + +void __RPC_STUB IAMDevMemoryAllocator_Alloc_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMDevMemoryAllocator_Free_Proxy( + IAMDevMemoryAllocator * This, + /* [in] */ BYTE *pBuffer); + + +void __RPC_STUB IAMDevMemoryAllocator_Free_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMDevMemoryAllocator_GetDevMemoryObject_Proxy( + IAMDevMemoryAllocator * This, + /* [out] */ IUnknown **ppUnkInnner, + /* [in] */ IUnknown *pUnkOuter); + + +void __RPC_STUB IAMDevMemoryAllocator_GetDevMemoryObject_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMDevMemoryAllocator_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0328 */ +/* [local] */ + +typedef IAMDevMemoryAllocator *PAMDEVMEMORYALLOCATOR; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0328_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0328_v0_0_s_ifspec; + +#ifndef __IAMDevMemoryControl_INTERFACE_DEFINED__ +#define __IAMDevMemoryControl_INTERFACE_DEFINED__ + +/* interface IAMDevMemoryControl */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMDevMemoryControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("c6545bf1-e76b-11d0-bd52-00a0c911ce86") + IAMDevMemoryControl : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE QueryWriteSync( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE WriteSync( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDevId( + /* [out] */ DWORD *pdwDevId) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMDevMemoryControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMDevMemoryControl * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMDevMemoryControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMDevMemoryControl * This); + + HRESULT ( STDMETHODCALLTYPE *QueryWriteSync )( + IAMDevMemoryControl * This); + + HRESULT ( STDMETHODCALLTYPE *WriteSync )( + IAMDevMemoryControl * This); + + HRESULT ( STDMETHODCALLTYPE *GetDevId )( + IAMDevMemoryControl * This, + /* [out] */ DWORD *pdwDevId); + + END_INTERFACE + } IAMDevMemoryControlVtbl; + + interface IAMDevMemoryControl + { + CONST_VTBL struct IAMDevMemoryControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMDevMemoryControl_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMDevMemoryControl_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMDevMemoryControl_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMDevMemoryControl_QueryWriteSync(This) \ + (This)->lpVtbl -> QueryWriteSync(This) + +#define IAMDevMemoryControl_WriteSync(This) \ + (This)->lpVtbl -> WriteSync(This) + +#define IAMDevMemoryControl_GetDevId(This,pdwDevId) \ + (This)->lpVtbl -> GetDevId(This,pdwDevId) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMDevMemoryControl_QueryWriteSync_Proxy( + IAMDevMemoryControl * This); + + +void __RPC_STUB IAMDevMemoryControl_QueryWriteSync_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMDevMemoryControl_WriteSync_Proxy( + IAMDevMemoryControl * This); + + +void __RPC_STUB IAMDevMemoryControl_WriteSync_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMDevMemoryControl_GetDevId_Proxy( + IAMDevMemoryControl * This, + /* [out] */ DWORD *pdwDevId); + + +void __RPC_STUB IAMDevMemoryControl_GetDevId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMDevMemoryControl_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0329 */ +/* [local] */ + +typedef IAMDevMemoryControl *PAMDEVMEMORYCONTROL; + + +enum _AMSTREAMSELECTINFOFLAGS + { AMSTREAMSELECTINFO_ENABLED = 0x1, + AMSTREAMSELECTINFO_EXCLUSIVE = 0x2 + } ; + +enum _AMSTREAMSELECTENABLEFLAGS + { AMSTREAMSELECTENABLE_ENABLE = 0x1, + AMSTREAMSELECTENABLE_ENABLEALL = 0x2 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0329_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0329_v0_0_s_ifspec; + +#ifndef __IAMStreamSelect_INTERFACE_DEFINED__ +#define __IAMStreamSelect_INTERFACE_DEFINED__ + +/* interface IAMStreamSelect */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMStreamSelect; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("c1960960-17f5-11d1-abe1-00a0c905f375") + IAMStreamSelect : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Count( + /* [out] */ DWORD *pcStreams) = 0; + + virtual HRESULT STDMETHODCALLTYPE Info( + /* [in] */ long lIndex, + /* [out] */ AM_MEDIA_TYPE **ppmt, + /* [out] */ DWORD *pdwFlags, + /* [out] */ LCID *plcid, + /* [out] */ DWORD *pdwGroup, + /* [out] */ WCHAR **ppszName, + /* [out] */ IUnknown **ppObject, + /* [out] */ IUnknown **ppUnk) = 0; + + virtual HRESULT STDMETHODCALLTYPE Enable( + /* [in] */ long lIndex, + /* [in] */ DWORD dwFlags) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMStreamSelectVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMStreamSelect * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMStreamSelect * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMStreamSelect * This); + + HRESULT ( STDMETHODCALLTYPE *Count )( + IAMStreamSelect * This, + /* [out] */ DWORD *pcStreams); + + HRESULT ( STDMETHODCALLTYPE *Info )( + IAMStreamSelect * This, + /* [in] */ long lIndex, + /* [out] */ AM_MEDIA_TYPE **ppmt, + /* [out] */ DWORD *pdwFlags, + /* [out] */ LCID *plcid, + /* [out] */ DWORD *pdwGroup, + /* [out] */ WCHAR **ppszName, + /* [out] */ IUnknown **ppObject, + /* [out] */ IUnknown **ppUnk); + + HRESULT ( STDMETHODCALLTYPE *Enable )( + IAMStreamSelect * This, + /* [in] */ long lIndex, + /* [in] */ DWORD dwFlags); + + END_INTERFACE + } IAMStreamSelectVtbl; + + interface IAMStreamSelect + { + CONST_VTBL struct IAMStreamSelectVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMStreamSelect_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMStreamSelect_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMStreamSelect_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMStreamSelect_Count(This,pcStreams) \ + (This)->lpVtbl -> Count(This,pcStreams) + +#define IAMStreamSelect_Info(This,lIndex,ppmt,pdwFlags,plcid,pdwGroup,ppszName,ppObject,ppUnk) \ + (This)->lpVtbl -> Info(This,lIndex,ppmt,pdwFlags,plcid,pdwGroup,ppszName,ppObject,ppUnk) + +#define IAMStreamSelect_Enable(This,lIndex,dwFlags) \ + (This)->lpVtbl -> Enable(This,lIndex,dwFlags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMStreamSelect_Count_Proxy( + IAMStreamSelect * This, + /* [out] */ DWORD *pcStreams); + + +void __RPC_STUB IAMStreamSelect_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMStreamSelect_Info_Proxy( + IAMStreamSelect * This, + /* [in] */ long lIndex, + /* [out] */ AM_MEDIA_TYPE **ppmt, + /* [out] */ DWORD *pdwFlags, + /* [out] */ LCID *plcid, + /* [out] */ DWORD *pdwGroup, + /* [out] */ WCHAR **ppszName, + /* [out] */ IUnknown **ppObject, + /* [out] */ IUnknown **ppUnk); + + +void __RPC_STUB IAMStreamSelect_Info_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMStreamSelect_Enable_Proxy( + IAMStreamSelect * This, + /* [in] */ long lIndex, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IAMStreamSelect_Enable_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMStreamSelect_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0330 */ +/* [local] */ + +typedef IAMStreamSelect *PAMSTREAMSELECT; + + +enum _AMRESCTL_RESERVEFLAGS + { AMRESCTL_RESERVEFLAGS_RESERVE = 0, + AMRESCTL_RESERVEFLAGS_UNRESERVE = 0x1 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0330_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0330_v0_0_s_ifspec; + +#ifndef __IAMResourceControl_INTERFACE_DEFINED__ +#define __IAMResourceControl_INTERFACE_DEFINED__ + +/* interface IAMResourceControl */ +/* [local][unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMResourceControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8389d2d0-77d7-11d1-abe6-00a0c905f375") + IAMResourceControl : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Reserve( + /* [in] */ DWORD dwFlags, + /* [in] */ PVOID pvReserved) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMResourceControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMResourceControl * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMResourceControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMResourceControl * This); + + HRESULT ( STDMETHODCALLTYPE *Reserve )( + IAMResourceControl * This, + /* [in] */ DWORD dwFlags, + /* [in] */ PVOID pvReserved); + + END_INTERFACE + } IAMResourceControlVtbl; + + interface IAMResourceControl + { + CONST_VTBL struct IAMResourceControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMResourceControl_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMResourceControl_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMResourceControl_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMResourceControl_Reserve(This,dwFlags,pvReserved) \ + (This)->lpVtbl -> Reserve(This,dwFlags,pvReserved) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMResourceControl_Reserve_Proxy( + IAMResourceControl * This, + /* [in] */ DWORD dwFlags, + /* [in] */ PVOID pvReserved); + + +void __RPC_STUB IAMResourceControl_Reserve_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMResourceControl_INTERFACE_DEFINED__ */ + + +#ifndef __IAMClockAdjust_INTERFACE_DEFINED__ +#define __IAMClockAdjust_INTERFACE_DEFINED__ + +/* interface IAMClockAdjust */ +/* [local][unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMClockAdjust; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("4d5466b0-a49c-11d1-abe8-00a0c905f375") + IAMClockAdjust : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetClockDelta( + /* [in] */ REFERENCE_TIME rtDelta) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMClockAdjustVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMClockAdjust * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMClockAdjust * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMClockAdjust * This); + + HRESULT ( STDMETHODCALLTYPE *SetClockDelta )( + IAMClockAdjust * This, + /* [in] */ REFERENCE_TIME rtDelta); + + END_INTERFACE + } IAMClockAdjustVtbl; + + interface IAMClockAdjust + { + CONST_VTBL struct IAMClockAdjustVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMClockAdjust_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMClockAdjust_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMClockAdjust_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMClockAdjust_SetClockDelta(This,rtDelta) \ + (This)->lpVtbl -> SetClockDelta(This,rtDelta) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMClockAdjust_SetClockDelta_Proxy( + IAMClockAdjust * This, + /* [in] */ REFERENCE_TIME rtDelta); + + +void __RPC_STUB IAMClockAdjust_SetClockDelta_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMClockAdjust_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0332 */ +/* [local] */ + + +enum _AM_FILTER_MISC_FLAGS + { AM_FILTER_MISC_FLAGS_IS_RENDERER = 0x1, + AM_FILTER_MISC_FLAGS_IS_SOURCE = 0x2 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0332_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0332_v0_0_s_ifspec; + +#ifndef __IAMFilterMiscFlags_INTERFACE_DEFINED__ +#define __IAMFilterMiscFlags_INTERFACE_DEFINED__ + +/* interface IAMFilterMiscFlags */ +/* [local][unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMFilterMiscFlags; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("2dd74950-a890-11d1-abe8-00a0c905f375") + IAMFilterMiscFlags : public IUnknown + { + public: + virtual ULONG STDMETHODCALLTYPE GetMiscFlags( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMFilterMiscFlagsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMFilterMiscFlags * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMFilterMiscFlags * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMFilterMiscFlags * This); + + ULONG ( STDMETHODCALLTYPE *GetMiscFlags )( + IAMFilterMiscFlags * This); + + END_INTERFACE + } IAMFilterMiscFlagsVtbl; + + interface IAMFilterMiscFlags + { + CONST_VTBL struct IAMFilterMiscFlagsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMFilterMiscFlags_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMFilterMiscFlags_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMFilterMiscFlags_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMFilterMiscFlags_GetMiscFlags(This) \ + (This)->lpVtbl -> GetMiscFlags(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +ULONG STDMETHODCALLTYPE IAMFilterMiscFlags_GetMiscFlags_Proxy( + IAMFilterMiscFlags * This); + + +void __RPC_STUB IAMFilterMiscFlags_GetMiscFlags_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMFilterMiscFlags_INTERFACE_DEFINED__ */ + + +#ifndef __IDrawVideoImage_INTERFACE_DEFINED__ +#define __IDrawVideoImage_INTERFACE_DEFINED__ + +/* interface IDrawVideoImage */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IDrawVideoImage; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("48efb120-ab49-11d2-aed2-00a0c995e8d5") + IDrawVideoImage : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE DrawVideoImageBegin( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE DrawVideoImageEnd( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE DrawVideoImageDraw( + /* [in] */ HDC hdc, + /* [in] */ LPRECT lprcSrc, + /* [in] */ LPRECT lprcDst) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDrawVideoImageVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDrawVideoImage * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDrawVideoImage * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDrawVideoImage * This); + + HRESULT ( STDMETHODCALLTYPE *DrawVideoImageBegin )( + IDrawVideoImage * This); + + HRESULT ( STDMETHODCALLTYPE *DrawVideoImageEnd )( + IDrawVideoImage * This); + + HRESULT ( STDMETHODCALLTYPE *DrawVideoImageDraw )( + IDrawVideoImage * This, + /* [in] */ HDC hdc, + /* [in] */ LPRECT lprcSrc, + /* [in] */ LPRECT lprcDst); + + END_INTERFACE + } IDrawVideoImageVtbl; + + interface IDrawVideoImage + { + CONST_VTBL struct IDrawVideoImageVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDrawVideoImage_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDrawVideoImage_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDrawVideoImage_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDrawVideoImage_DrawVideoImageBegin(This) \ + (This)->lpVtbl -> DrawVideoImageBegin(This) + +#define IDrawVideoImage_DrawVideoImageEnd(This) \ + (This)->lpVtbl -> DrawVideoImageEnd(This) + +#define IDrawVideoImage_DrawVideoImageDraw(This,hdc,lprcSrc,lprcDst) \ + (This)->lpVtbl -> DrawVideoImageDraw(This,hdc,lprcSrc,lprcDst) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDrawVideoImage_DrawVideoImageBegin_Proxy( + IDrawVideoImage * This); + + +void __RPC_STUB IDrawVideoImage_DrawVideoImageBegin_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDrawVideoImage_DrawVideoImageEnd_Proxy( + IDrawVideoImage * This); + + +void __RPC_STUB IDrawVideoImage_DrawVideoImageEnd_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDrawVideoImage_DrawVideoImageDraw_Proxy( + IDrawVideoImage * This, + /* [in] */ HDC hdc, + /* [in] */ LPRECT lprcSrc, + /* [in] */ LPRECT lprcDst); + + +void __RPC_STUB IDrawVideoImage_DrawVideoImageDraw_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDrawVideoImage_INTERFACE_DEFINED__ */ + + +#ifndef __IDecimateVideoImage_INTERFACE_DEFINED__ +#define __IDecimateVideoImage_INTERFACE_DEFINED__ + +/* interface IDecimateVideoImage */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IDecimateVideoImage; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("2e5ea3e0-e924-11d2-b6da-00a0c995e8df") + IDecimateVideoImage : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetDecimationImageSize( + /* [in] */ long lWidth, + /* [in] */ long lHeight) = 0; + + virtual HRESULT STDMETHODCALLTYPE ResetDecimationImageSize( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDecimateVideoImageVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDecimateVideoImage * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDecimateVideoImage * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDecimateVideoImage * This); + + HRESULT ( STDMETHODCALLTYPE *SetDecimationImageSize )( + IDecimateVideoImage * This, + /* [in] */ long lWidth, + /* [in] */ long lHeight); + + HRESULT ( STDMETHODCALLTYPE *ResetDecimationImageSize )( + IDecimateVideoImage * This); + + END_INTERFACE + } IDecimateVideoImageVtbl; + + interface IDecimateVideoImage + { + CONST_VTBL struct IDecimateVideoImageVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDecimateVideoImage_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDecimateVideoImage_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDecimateVideoImage_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDecimateVideoImage_SetDecimationImageSize(This,lWidth,lHeight) \ + (This)->lpVtbl -> SetDecimationImageSize(This,lWidth,lHeight) + +#define IDecimateVideoImage_ResetDecimationImageSize(This) \ + (This)->lpVtbl -> ResetDecimationImageSize(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDecimateVideoImage_SetDecimationImageSize_Proxy( + IDecimateVideoImage * This, + /* [in] */ long lWidth, + /* [in] */ long lHeight); + + +void __RPC_STUB IDecimateVideoImage_SetDecimationImageSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDecimateVideoImage_ResetDecimationImageSize_Proxy( + IDecimateVideoImage * This); + + +void __RPC_STUB IDecimateVideoImage_ResetDecimationImageSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDecimateVideoImage_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0335 */ +/* [local] */ + +typedef +enum _DECIMATION_USAGE + { DECIMATION_LEGACY = 0, + DECIMATION_USE_DECODER_ONLY = DECIMATION_LEGACY + 1, + DECIMATION_USE_VIDEOPORT_ONLY = DECIMATION_USE_DECODER_ONLY + 1, + DECIMATION_USE_OVERLAY_ONLY = DECIMATION_USE_VIDEOPORT_ONLY + 1, + DECIMATION_DEFAULT = DECIMATION_USE_OVERLAY_ONLY + 1 + } DECIMATION_USAGE; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0335_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0335_v0_0_s_ifspec; + +#ifndef __IAMVideoDecimationProperties_INTERFACE_DEFINED__ +#define __IAMVideoDecimationProperties_INTERFACE_DEFINED__ + +/* interface IAMVideoDecimationProperties */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IAMVideoDecimationProperties; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("60d32930-13da-11d3-9ec6-c4fcaef5c7be") + IAMVideoDecimationProperties : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE QueryDecimationUsage( + /* [out] */ DECIMATION_USAGE *lpUsage) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDecimationUsage( + /* [in] */ DECIMATION_USAGE Usage) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMVideoDecimationPropertiesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMVideoDecimationProperties * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMVideoDecimationProperties * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMVideoDecimationProperties * This); + + HRESULT ( STDMETHODCALLTYPE *QueryDecimationUsage )( + IAMVideoDecimationProperties * This, + /* [out] */ DECIMATION_USAGE *lpUsage); + + HRESULT ( STDMETHODCALLTYPE *SetDecimationUsage )( + IAMVideoDecimationProperties * This, + /* [in] */ DECIMATION_USAGE Usage); + + END_INTERFACE + } IAMVideoDecimationPropertiesVtbl; + + interface IAMVideoDecimationProperties + { + CONST_VTBL struct IAMVideoDecimationPropertiesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMVideoDecimationProperties_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMVideoDecimationProperties_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMVideoDecimationProperties_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMVideoDecimationProperties_QueryDecimationUsage(This,lpUsage) \ + (This)->lpVtbl -> QueryDecimationUsage(This,lpUsage) + +#define IAMVideoDecimationProperties_SetDecimationUsage(This,Usage) \ + (This)->lpVtbl -> SetDecimationUsage(This,Usage) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMVideoDecimationProperties_QueryDecimationUsage_Proxy( + IAMVideoDecimationProperties * This, + /* [out] */ DECIMATION_USAGE *lpUsage); + + +void __RPC_STUB IAMVideoDecimationProperties_QueryDecimationUsage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoDecimationProperties_SetDecimationUsage_Proxy( + IAMVideoDecimationProperties * This, + /* [in] */ DECIMATION_USAGE Usage); + + +void __RPC_STUB IAMVideoDecimationProperties_SetDecimationUsage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMVideoDecimationProperties_INTERFACE_DEFINED__ */ + + +#ifndef __IVideoFrameStep_INTERFACE_DEFINED__ +#define __IVideoFrameStep_INTERFACE_DEFINED__ + +/* interface IVideoFrameStep */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IVideoFrameStep; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("e46a9787-2b71-444d-a4b5-1fab7b708d6a") + IVideoFrameStep : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Step( + DWORD dwFrames, + /* [unique] */ IUnknown *pStepObject) = 0; + + virtual HRESULT STDMETHODCALLTYPE CanStep( + long bMultiple, + /* [unique] */ IUnknown *pStepObject) = 0; + + virtual HRESULT STDMETHODCALLTYPE CancelStep( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IVideoFrameStepVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IVideoFrameStep * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IVideoFrameStep * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IVideoFrameStep * This); + + HRESULT ( STDMETHODCALLTYPE *Step )( + IVideoFrameStep * This, + DWORD dwFrames, + /* [unique] */ IUnknown *pStepObject); + + HRESULT ( STDMETHODCALLTYPE *CanStep )( + IVideoFrameStep * This, + long bMultiple, + /* [unique] */ IUnknown *pStepObject); + + HRESULT ( STDMETHODCALLTYPE *CancelStep )( + IVideoFrameStep * This); + + END_INTERFACE + } IVideoFrameStepVtbl; + + interface IVideoFrameStep + { + CONST_VTBL struct IVideoFrameStepVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IVideoFrameStep_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IVideoFrameStep_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IVideoFrameStep_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IVideoFrameStep_Step(This,dwFrames,pStepObject) \ + (This)->lpVtbl -> Step(This,dwFrames,pStepObject) + +#define IVideoFrameStep_CanStep(This,bMultiple,pStepObject) \ + (This)->lpVtbl -> CanStep(This,bMultiple,pStepObject) + +#define IVideoFrameStep_CancelStep(This) \ + (This)->lpVtbl -> CancelStep(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IVideoFrameStep_Step_Proxy( + IVideoFrameStep * This, + DWORD dwFrames, + /* [unique] */ IUnknown *pStepObject); + + +void __RPC_STUB IVideoFrameStep_Step_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IVideoFrameStep_CanStep_Proxy( + IVideoFrameStep * This, + long bMultiple, + /* [unique] */ IUnknown *pStepObject); + + +void __RPC_STUB IVideoFrameStep_CanStep_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IVideoFrameStep_CancelStep_Proxy( + IVideoFrameStep * This); + + +void __RPC_STUB IVideoFrameStep_CancelStep_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IVideoFrameStep_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0337 */ +/* [local] */ + + +enum _AM_PUSHSOURCE_FLAGS + { AM_PUSHSOURCECAPS_INTERNAL_RM = 0x1, + AM_PUSHSOURCECAPS_NOT_LIVE = 0x2, + AM_PUSHSOURCECAPS_PRIVATE_CLOCK = 0x4, + AM_PUSHSOURCEREQS_USE_STREAM_CLOCK = 0x10000 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0337_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0337_v0_0_s_ifspec; + +#ifndef __IAMLatency_INTERFACE_DEFINED__ +#define __IAMLatency_INTERFACE_DEFINED__ + +/* interface IAMLatency */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMLatency; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("62EA93BA-EC62-11d2-B770-00C04FB6BD3D") + IAMLatency : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetLatency( + /* [in] */ REFERENCE_TIME *prtLatency) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMLatencyVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMLatency * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMLatency * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMLatency * This); + + HRESULT ( STDMETHODCALLTYPE *GetLatency )( + IAMLatency * This, + /* [in] */ REFERENCE_TIME *prtLatency); + + END_INTERFACE + } IAMLatencyVtbl; + + interface IAMLatency + { + CONST_VTBL struct IAMLatencyVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMLatency_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMLatency_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMLatency_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMLatency_GetLatency(This,prtLatency) \ + (This)->lpVtbl -> GetLatency(This,prtLatency) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMLatency_GetLatency_Proxy( + IAMLatency * This, + /* [in] */ REFERENCE_TIME *prtLatency); + + +void __RPC_STUB IAMLatency_GetLatency_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMLatency_INTERFACE_DEFINED__ */ + + +#ifndef __IAMPushSource_INTERFACE_DEFINED__ +#define __IAMPushSource_INTERFACE_DEFINED__ + +/* interface IAMPushSource */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMPushSource; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("F185FE76-E64E-11d2-B76E-00C04FB6BD3D") + IAMPushSource : public IAMLatency + { + public: + virtual HRESULT STDMETHODCALLTYPE GetPushSourceFlags( + /* [out] */ ULONG *pFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetPushSourceFlags( + /* [in] */ ULONG Flags) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetStreamOffset( + /* [in] */ REFERENCE_TIME rtOffset) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStreamOffset( + /* [out] */ REFERENCE_TIME *prtOffset) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMaxStreamOffset( + /* [out] */ REFERENCE_TIME *prtMaxOffset) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMaxStreamOffset( + /* [in] */ REFERENCE_TIME rtMaxOffset) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMPushSourceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMPushSource * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMPushSource * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMPushSource * This); + + HRESULT ( STDMETHODCALLTYPE *GetLatency )( + IAMPushSource * This, + /* [in] */ REFERENCE_TIME *prtLatency); + + HRESULT ( STDMETHODCALLTYPE *GetPushSourceFlags )( + IAMPushSource * This, + /* [out] */ ULONG *pFlags); + + HRESULT ( STDMETHODCALLTYPE *SetPushSourceFlags )( + IAMPushSource * This, + /* [in] */ ULONG Flags); + + HRESULT ( STDMETHODCALLTYPE *SetStreamOffset )( + IAMPushSource * This, + /* [in] */ REFERENCE_TIME rtOffset); + + HRESULT ( STDMETHODCALLTYPE *GetStreamOffset )( + IAMPushSource * This, + /* [out] */ REFERENCE_TIME *prtOffset); + + HRESULT ( STDMETHODCALLTYPE *GetMaxStreamOffset )( + IAMPushSource * This, + /* [out] */ REFERENCE_TIME *prtMaxOffset); + + HRESULT ( STDMETHODCALLTYPE *SetMaxStreamOffset )( + IAMPushSource * This, + /* [in] */ REFERENCE_TIME rtMaxOffset); + + END_INTERFACE + } IAMPushSourceVtbl; + + interface IAMPushSource + { + CONST_VTBL struct IAMPushSourceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMPushSource_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMPushSource_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMPushSource_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMPushSource_GetLatency(This,prtLatency) \ + (This)->lpVtbl -> GetLatency(This,prtLatency) + + +#define IAMPushSource_GetPushSourceFlags(This,pFlags) \ + (This)->lpVtbl -> GetPushSourceFlags(This,pFlags) + +#define IAMPushSource_SetPushSourceFlags(This,Flags) \ + (This)->lpVtbl -> SetPushSourceFlags(This,Flags) + +#define IAMPushSource_SetStreamOffset(This,rtOffset) \ + (This)->lpVtbl -> SetStreamOffset(This,rtOffset) + +#define IAMPushSource_GetStreamOffset(This,prtOffset) \ + (This)->lpVtbl -> GetStreamOffset(This,prtOffset) + +#define IAMPushSource_GetMaxStreamOffset(This,prtMaxOffset) \ + (This)->lpVtbl -> GetMaxStreamOffset(This,prtMaxOffset) + +#define IAMPushSource_SetMaxStreamOffset(This,rtMaxOffset) \ + (This)->lpVtbl -> SetMaxStreamOffset(This,rtMaxOffset) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMPushSource_GetPushSourceFlags_Proxy( + IAMPushSource * This, + /* [out] */ ULONG *pFlags); + + +void __RPC_STUB IAMPushSource_GetPushSourceFlags_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPushSource_SetPushSourceFlags_Proxy( + IAMPushSource * This, + /* [in] */ ULONG Flags); + + +void __RPC_STUB IAMPushSource_SetPushSourceFlags_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPushSource_SetStreamOffset_Proxy( + IAMPushSource * This, + /* [in] */ REFERENCE_TIME rtOffset); + + +void __RPC_STUB IAMPushSource_SetStreamOffset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPushSource_GetStreamOffset_Proxy( + IAMPushSource * This, + /* [out] */ REFERENCE_TIME *prtOffset); + + +void __RPC_STUB IAMPushSource_GetStreamOffset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPushSource_GetMaxStreamOffset_Proxy( + IAMPushSource * This, + /* [out] */ REFERENCE_TIME *prtMaxOffset); + + +void __RPC_STUB IAMPushSource_GetMaxStreamOffset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMPushSource_SetMaxStreamOffset_Proxy( + IAMPushSource * This, + /* [in] */ REFERENCE_TIME rtMaxOffset); + + +void __RPC_STUB IAMPushSource_SetMaxStreamOffset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMPushSource_INTERFACE_DEFINED__ */ + + +#ifndef __IAMDeviceRemoval_INTERFACE_DEFINED__ +#define __IAMDeviceRemoval_INTERFACE_DEFINED__ + +/* interface IAMDeviceRemoval */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMDeviceRemoval; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("f90a6130-b658-11d2-ae49-0000f8754b99") + IAMDeviceRemoval : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE DeviceInfo( + /* [out] */ CLSID *pclsidInterfaceClass, + /* [out] */ WCHAR **pwszSymbolicLink) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reassociate( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Disassociate( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMDeviceRemovalVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMDeviceRemoval * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMDeviceRemoval * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMDeviceRemoval * This); + + HRESULT ( STDMETHODCALLTYPE *DeviceInfo )( + IAMDeviceRemoval * This, + /* [out] */ CLSID *pclsidInterfaceClass, + /* [out] */ WCHAR **pwszSymbolicLink); + + HRESULT ( STDMETHODCALLTYPE *Reassociate )( + IAMDeviceRemoval * This); + + HRESULT ( STDMETHODCALLTYPE *Disassociate )( + IAMDeviceRemoval * This); + + END_INTERFACE + } IAMDeviceRemovalVtbl; + + interface IAMDeviceRemoval + { + CONST_VTBL struct IAMDeviceRemovalVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMDeviceRemoval_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMDeviceRemoval_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMDeviceRemoval_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMDeviceRemoval_DeviceInfo(This,pclsidInterfaceClass,pwszSymbolicLink) \ + (This)->lpVtbl -> DeviceInfo(This,pclsidInterfaceClass,pwszSymbolicLink) + +#define IAMDeviceRemoval_Reassociate(This) \ + (This)->lpVtbl -> Reassociate(This) + +#define IAMDeviceRemoval_Disassociate(This) \ + (This)->lpVtbl -> Disassociate(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMDeviceRemoval_DeviceInfo_Proxy( + IAMDeviceRemoval * This, + /* [out] */ CLSID *pclsidInterfaceClass, + /* [out] */ WCHAR **pwszSymbolicLink); + + +void __RPC_STUB IAMDeviceRemoval_DeviceInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMDeviceRemoval_Reassociate_Proxy( + IAMDeviceRemoval * This); + + +void __RPC_STUB IAMDeviceRemoval_Reassociate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMDeviceRemoval_Disassociate_Proxy( + IAMDeviceRemoval * This); + + +void __RPC_STUB IAMDeviceRemoval_Disassociate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMDeviceRemoval_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0339 */ +/* [local] */ + +typedef /* [public][public][public] */ struct __MIDL___MIDL_itf_strmif_0339_0001 + { + DWORD dwDVAAuxSrc; + DWORD dwDVAAuxCtl; + DWORD dwDVAAuxSrc1; + DWORD dwDVAAuxCtl1; + DWORD dwDVVAuxSrc; + DWORD dwDVVAuxCtl; + DWORD dwDVReserved[ 2 ]; + } DVINFO; + +typedef struct __MIDL___MIDL_itf_strmif_0339_0001 *PDVINFO; + + +enum _DVENCODERRESOLUTION + { DVENCODERRESOLUTION_720x480 = 2012, + DVENCODERRESOLUTION_360x240 = 2013, + DVENCODERRESOLUTION_180x120 = 2014, + DVENCODERRESOLUTION_88x60 = 2015 + } ; + +enum _DVENCODERVIDEOFORMAT + { DVENCODERVIDEOFORMAT_NTSC = 2000, + DVENCODERVIDEOFORMAT_PAL = 2001 + } ; + +enum _DVENCODERFORMAT + { DVENCODERFORMAT_DVSD = 2007, + DVENCODERFORMAT_DVHD = 2008, + DVENCODERFORMAT_DVSL = 2009 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0339_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0339_v0_0_s_ifspec; + +#ifndef __IDVEnc_INTERFACE_DEFINED__ +#define __IDVEnc_INTERFACE_DEFINED__ + +/* interface IDVEnc */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IDVEnc; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("d18e17a0-aacb-11d0-afb0-00aa00b67a42") + IDVEnc : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE get_IFormatResolution( + /* [out] */ int *VideoFormat, + /* [out] */ int *DVFormat, + /* [out] */ int *Resolution, + /* [in] */ BYTE fDVInfo, + /* [out] */ DVINFO *sDVInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_IFormatResolution( + /* [in] */ int VideoFormat, + /* [in] */ int DVFormat, + /* [in] */ int Resolution, + /* [in] */ BYTE fDVInfo, + /* [in] */ DVINFO *sDVInfo) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDVEncVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDVEnc * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDVEnc * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDVEnc * This); + + HRESULT ( STDMETHODCALLTYPE *get_IFormatResolution )( + IDVEnc * This, + /* [out] */ int *VideoFormat, + /* [out] */ int *DVFormat, + /* [out] */ int *Resolution, + /* [in] */ BYTE fDVInfo, + /* [out] */ DVINFO *sDVInfo); + + HRESULT ( STDMETHODCALLTYPE *put_IFormatResolution )( + IDVEnc * This, + /* [in] */ int VideoFormat, + /* [in] */ int DVFormat, + /* [in] */ int Resolution, + /* [in] */ BYTE fDVInfo, + /* [in] */ DVINFO *sDVInfo); + + END_INTERFACE + } IDVEncVtbl; + + interface IDVEnc + { + CONST_VTBL struct IDVEncVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDVEnc_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDVEnc_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDVEnc_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDVEnc_get_IFormatResolution(This,VideoFormat,DVFormat,Resolution,fDVInfo,sDVInfo) \ + (This)->lpVtbl -> get_IFormatResolution(This,VideoFormat,DVFormat,Resolution,fDVInfo,sDVInfo) + +#define IDVEnc_put_IFormatResolution(This,VideoFormat,DVFormat,Resolution,fDVInfo,sDVInfo) \ + (This)->lpVtbl -> put_IFormatResolution(This,VideoFormat,DVFormat,Resolution,fDVInfo,sDVInfo) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDVEnc_get_IFormatResolution_Proxy( + IDVEnc * This, + /* [out] */ int *VideoFormat, + /* [out] */ int *DVFormat, + /* [out] */ int *Resolution, + /* [in] */ BYTE fDVInfo, + /* [out] */ DVINFO *sDVInfo); + + +void __RPC_STUB IDVEnc_get_IFormatResolution_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDVEnc_put_IFormatResolution_Proxy( + IDVEnc * This, + /* [in] */ int VideoFormat, + /* [in] */ int DVFormat, + /* [in] */ int Resolution, + /* [in] */ BYTE fDVInfo, + /* [in] */ DVINFO *sDVInfo); + + +void __RPC_STUB IDVEnc_put_IFormatResolution_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDVEnc_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0340 */ +/* [local] */ + + +enum _DVDECODERRESOLUTION + { DVDECODERRESOLUTION_720x480 = 1000, + DVDECODERRESOLUTION_360x240 = 1001, + DVDECODERRESOLUTION_180x120 = 1002, + DVDECODERRESOLUTION_88x60 = 1003 + } ; + +enum _DVRESOLUTION + { DVRESOLUTION_FULL = 1000, + DVRESOLUTION_HALF = 1001, + DVRESOLUTION_QUARTER = 1002, + DVRESOLUTION_DC = 1003 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0340_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0340_v0_0_s_ifspec; + +#ifndef __IIPDVDec_INTERFACE_DEFINED__ +#define __IIPDVDec_INTERFACE_DEFINED__ + +/* interface IIPDVDec */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IIPDVDec; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("b8e8bd60-0bfe-11d0-af91-00aa00b67a42") + IIPDVDec : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE get_IPDisplay( + /* [out] */ int *displayPix) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_IPDisplay( + /* [in] */ int displayPix) = 0; + + }; + +#else /* C style interface */ + + typedef struct IIPDVDecVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IIPDVDec * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IIPDVDec * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IIPDVDec * This); + + HRESULT ( STDMETHODCALLTYPE *get_IPDisplay )( + IIPDVDec * This, + /* [out] */ int *displayPix); + + HRESULT ( STDMETHODCALLTYPE *put_IPDisplay )( + IIPDVDec * This, + /* [in] */ int displayPix); + + END_INTERFACE + } IIPDVDecVtbl; + + interface IIPDVDec + { + CONST_VTBL struct IIPDVDecVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IIPDVDec_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IIPDVDec_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IIPDVDec_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IIPDVDec_get_IPDisplay(This,displayPix) \ + (This)->lpVtbl -> get_IPDisplay(This,displayPix) + +#define IIPDVDec_put_IPDisplay(This,displayPix) \ + (This)->lpVtbl -> put_IPDisplay(This,displayPix) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IIPDVDec_get_IPDisplay_Proxy( + IIPDVDec * This, + /* [out] */ int *displayPix); + + +void __RPC_STUB IIPDVDec_get_IPDisplay_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IIPDVDec_put_IPDisplay_Proxy( + IIPDVDec * This, + /* [in] */ int displayPix); + + +void __RPC_STUB IIPDVDec_put_IPDisplay_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IIPDVDec_INTERFACE_DEFINED__ */ + + +#ifndef __IDVSplitter_INTERFACE_DEFINED__ +#define __IDVSplitter_INTERFACE_DEFINED__ + +/* interface IDVSplitter */ +/* [uuid][object] */ + + +EXTERN_C const IID IID_IDVSplitter; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("92a3a302-da7c-4a1f-ba7e-1802bb5d2d02") + IDVSplitter : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE DiscardAlternateVideoFrames( + /* [in] */ int nDiscard) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDVSplitterVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDVSplitter * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDVSplitter * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDVSplitter * This); + + HRESULT ( STDMETHODCALLTYPE *DiscardAlternateVideoFrames )( + IDVSplitter * This, + /* [in] */ int nDiscard); + + END_INTERFACE + } IDVSplitterVtbl; + + interface IDVSplitter + { + CONST_VTBL struct IDVSplitterVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDVSplitter_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDVSplitter_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDVSplitter_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDVSplitter_DiscardAlternateVideoFrames(This,nDiscard) \ + (This)->lpVtbl -> DiscardAlternateVideoFrames(This,nDiscard) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDVSplitter_DiscardAlternateVideoFrames_Proxy( + IDVSplitter * This, + /* [in] */ int nDiscard); + + +void __RPC_STUB IDVSplitter_DiscardAlternateVideoFrames_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDVSplitter_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0342 */ +/* [local] */ + + +enum _AM_AUDIO_RENDERER_STAT_PARAM + { AM_AUDREND_STAT_PARAM_BREAK_COUNT = 1, + AM_AUDREND_STAT_PARAM_SLAVE_MODE = AM_AUDREND_STAT_PARAM_BREAK_COUNT + 1, + AM_AUDREND_STAT_PARAM_SILENCE_DUR = AM_AUDREND_STAT_PARAM_SLAVE_MODE + 1, + AM_AUDREND_STAT_PARAM_LAST_BUFFER_DUR = AM_AUDREND_STAT_PARAM_SILENCE_DUR + 1, + AM_AUDREND_STAT_PARAM_DISCONTINUITIES = AM_AUDREND_STAT_PARAM_LAST_BUFFER_DUR + 1, + AM_AUDREND_STAT_PARAM_SLAVE_RATE = AM_AUDREND_STAT_PARAM_DISCONTINUITIES + 1, + AM_AUDREND_STAT_PARAM_SLAVE_DROPWRITE_DUR = AM_AUDREND_STAT_PARAM_SLAVE_RATE + 1, + AM_AUDREND_STAT_PARAM_SLAVE_HIGHLOWERROR = AM_AUDREND_STAT_PARAM_SLAVE_DROPWRITE_DUR + 1, + AM_AUDREND_STAT_PARAM_SLAVE_LASTHIGHLOWERROR = AM_AUDREND_STAT_PARAM_SLAVE_HIGHLOWERROR + 1, + AM_AUDREND_STAT_PARAM_SLAVE_ACCUMERROR = AM_AUDREND_STAT_PARAM_SLAVE_LASTHIGHLOWERROR + 1, + AM_AUDREND_STAT_PARAM_BUFFERFULLNESS = AM_AUDREND_STAT_PARAM_SLAVE_ACCUMERROR + 1, + AM_AUDREND_STAT_PARAM_JITTER = AM_AUDREND_STAT_PARAM_BUFFERFULLNESS + 1 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0342_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0342_v0_0_s_ifspec; + +#ifndef __IAMAudioRendererStats_INTERFACE_DEFINED__ +#define __IAMAudioRendererStats_INTERFACE_DEFINED__ + +/* interface IAMAudioRendererStats */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMAudioRendererStats; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("22320CB2-D41A-11d2-BF7C-D7CB9DF0BF93") + IAMAudioRendererStats : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetStatParam( + /* [in] */ DWORD dwParam, + /* [out] */ DWORD *pdwParam1, + /* [out] */ DWORD *pdwParam2) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMAudioRendererStatsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMAudioRendererStats * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMAudioRendererStats * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMAudioRendererStats * This); + + HRESULT ( STDMETHODCALLTYPE *GetStatParam )( + IAMAudioRendererStats * This, + /* [in] */ DWORD dwParam, + /* [out] */ DWORD *pdwParam1, + /* [out] */ DWORD *pdwParam2); + + END_INTERFACE + } IAMAudioRendererStatsVtbl; + + interface IAMAudioRendererStats + { + CONST_VTBL struct IAMAudioRendererStatsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMAudioRendererStats_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMAudioRendererStats_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMAudioRendererStats_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMAudioRendererStats_GetStatParam(This,dwParam,pdwParam1,pdwParam2) \ + (This)->lpVtbl -> GetStatParam(This,dwParam,pdwParam1,pdwParam2) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMAudioRendererStats_GetStatParam_Proxy( + IAMAudioRendererStats * This, + /* [in] */ DWORD dwParam, + /* [out] */ DWORD *pdwParam1, + /* [out] */ DWORD *pdwParam2); + + +void __RPC_STUB IAMAudioRendererStats_GetStatParam_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMAudioRendererStats_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0344 */ +/* [local] */ + + +enum _AM_INTF_SEARCH_FLAGS + { AM_INTF_SEARCH_INPUT_PIN = 0x1, + AM_INTF_SEARCH_OUTPUT_PIN = 0x2, + AM_INTF_SEARCH_FILTER = 0x4 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0344_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0344_v0_0_s_ifspec; + +#ifndef __IAMGraphStreams_INTERFACE_DEFINED__ +#define __IAMGraphStreams_INTERFACE_DEFINED__ + +/* interface IAMGraphStreams */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMGraphStreams; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("632105FA-072E-11d3-8AF9-00C04FB6BD3D") + IAMGraphStreams : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE FindUpstreamInterface( + /* [in] */ IPin *pPin, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvInterface, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE SyncUsingStreamOffset( + /* [in] */ BOOL bUseStreamOffset) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetMaxGraphLatency( + /* [in] */ REFERENCE_TIME rtMaxGraphLatency) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMGraphStreamsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMGraphStreams * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMGraphStreams * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMGraphStreams * This); + + HRESULT ( STDMETHODCALLTYPE *FindUpstreamInterface )( + IAMGraphStreams * This, + /* [in] */ IPin *pPin, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvInterface, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *SyncUsingStreamOffset )( + IAMGraphStreams * This, + /* [in] */ BOOL bUseStreamOffset); + + HRESULT ( STDMETHODCALLTYPE *SetMaxGraphLatency )( + IAMGraphStreams * This, + /* [in] */ REFERENCE_TIME rtMaxGraphLatency); + + END_INTERFACE + } IAMGraphStreamsVtbl; + + interface IAMGraphStreams + { + CONST_VTBL struct IAMGraphStreamsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMGraphStreams_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMGraphStreams_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMGraphStreams_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMGraphStreams_FindUpstreamInterface(This,pPin,riid,ppvInterface,dwFlags) \ + (This)->lpVtbl -> FindUpstreamInterface(This,pPin,riid,ppvInterface,dwFlags) + +#define IAMGraphStreams_SyncUsingStreamOffset(This,bUseStreamOffset) \ + (This)->lpVtbl -> SyncUsingStreamOffset(This,bUseStreamOffset) + +#define IAMGraphStreams_SetMaxGraphLatency(This,rtMaxGraphLatency) \ + (This)->lpVtbl -> SetMaxGraphLatency(This,rtMaxGraphLatency) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMGraphStreams_FindUpstreamInterface_Proxy( + IAMGraphStreams * This, + /* [in] */ IPin *pPin, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvInterface, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IAMGraphStreams_FindUpstreamInterface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMGraphStreams_SyncUsingStreamOffset_Proxy( + IAMGraphStreams * This, + /* [in] */ BOOL bUseStreamOffset); + + +void __RPC_STUB IAMGraphStreams_SyncUsingStreamOffset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMGraphStreams_SetMaxGraphLatency_Proxy( + IAMGraphStreams * This, + /* [in] */ REFERENCE_TIME rtMaxGraphLatency); + + +void __RPC_STUB IAMGraphStreams_SetMaxGraphLatency_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMGraphStreams_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0345 */ +/* [local] */ + + +enum AMOVERLAYFX + { AMOVERFX_NOFX = 0, + AMOVERFX_MIRRORLEFTRIGHT = 0x2, + AMOVERFX_MIRRORUPDOWN = 0x4, + AMOVERFX_DEINTERLACE = 0x8 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0345_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0345_v0_0_s_ifspec; + +#ifndef __IAMOverlayFX_INTERFACE_DEFINED__ +#define __IAMOverlayFX_INTERFACE_DEFINED__ + +/* interface IAMOverlayFX */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMOverlayFX; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("62fae250-7e65-4460-bfc9-6398b322073c") + IAMOverlayFX : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE QueryOverlayFXCaps( + /* [out] */ DWORD *lpdwOverlayFXCaps) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOverlayFX( + /* [in] */ DWORD dwOverlayFX) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetOverlayFX( + /* [out] */ DWORD *lpdwOverlayFX) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMOverlayFXVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMOverlayFX * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMOverlayFX * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMOverlayFX * This); + + HRESULT ( STDMETHODCALLTYPE *QueryOverlayFXCaps )( + IAMOverlayFX * This, + /* [out] */ DWORD *lpdwOverlayFXCaps); + + HRESULT ( STDMETHODCALLTYPE *SetOverlayFX )( + IAMOverlayFX * This, + /* [in] */ DWORD dwOverlayFX); + + HRESULT ( STDMETHODCALLTYPE *GetOverlayFX )( + IAMOverlayFX * This, + /* [out] */ DWORD *lpdwOverlayFX); + + END_INTERFACE + } IAMOverlayFXVtbl; + + interface IAMOverlayFX + { + CONST_VTBL struct IAMOverlayFXVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMOverlayFX_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMOverlayFX_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMOverlayFX_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMOverlayFX_QueryOverlayFXCaps(This,lpdwOverlayFXCaps) \ + (This)->lpVtbl -> QueryOverlayFXCaps(This,lpdwOverlayFXCaps) + +#define IAMOverlayFX_SetOverlayFX(This,dwOverlayFX) \ + (This)->lpVtbl -> SetOverlayFX(This,dwOverlayFX) + +#define IAMOverlayFX_GetOverlayFX(This,lpdwOverlayFX) \ + (This)->lpVtbl -> GetOverlayFX(This,lpdwOverlayFX) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMOverlayFX_QueryOverlayFXCaps_Proxy( + IAMOverlayFX * This, + /* [out] */ DWORD *lpdwOverlayFXCaps); + + +void __RPC_STUB IAMOverlayFX_QueryOverlayFXCaps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMOverlayFX_SetOverlayFX_Proxy( + IAMOverlayFX * This, + /* [in] */ DWORD dwOverlayFX); + + +void __RPC_STUB IAMOverlayFX_SetOverlayFX_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMOverlayFX_GetOverlayFX_Proxy( + IAMOverlayFX * This, + /* [out] */ DWORD *lpdwOverlayFX); + + +void __RPC_STUB IAMOverlayFX_GetOverlayFX_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMOverlayFX_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0346 */ +/* [local] */ + +#define __OP_H__ + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0346_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0346_v0_0_s_ifspec; + +#ifndef __IAMOpenProgress_INTERFACE_DEFINED__ +#define __IAMOpenProgress_INTERFACE_DEFINED__ + +/* interface IAMOpenProgress */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMOpenProgress; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8E1C39A1-DE53-11cf-AA63-0080C744528D") + IAMOpenProgress : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE QueryProgress( + /* [out] */ LONGLONG *pllTotal, + /* [out] */ LONGLONG *pllCurrent) = 0; + + virtual HRESULT STDMETHODCALLTYPE AbortOperation( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMOpenProgressVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMOpenProgress * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMOpenProgress * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMOpenProgress * This); + + HRESULT ( STDMETHODCALLTYPE *QueryProgress )( + IAMOpenProgress * This, + /* [out] */ LONGLONG *pllTotal, + /* [out] */ LONGLONG *pllCurrent); + + HRESULT ( STDMETHODCALLTYPE *AbortOperation )( + IAMOpenProgress * This); + + END_INTERFACE + } IAMOpenProgressVtbl; + + interface IAMOpenProgress + { + CONST_VTBL struct IAMOpenProgressVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMOpenProgress_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMOpenProgress_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMOpenProgress_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMOpenProgress_QueryProgress(This,pllTotal,pllCurrent) \ + (This)->lpVtbl -> QueryProgress(This,pllTotal,pllCurrent) + +#define IAMOpenProgress_AbortOperation(This) \ + (This)->lpVtbl -> AbortOperation(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMOpenProgress_QueryProgress_Proxy( + IAMOpenProgress * This, + /* [out] */ LONGLONG *pllTotal, + /* [out] */ LONGLONG *pllCurrent); + + +void __RPC_STUB IAMOpenProgress_QueryProgress_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMOpenProgress_AbortOperation_Proxy( + IAMOpenProgress * This); + + +void __RPC_STUB IAMOpenProgress_AbortOperation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMOpenProgress_INTERFACE_DEFINED__ */ + + +#ifndef __IMpeg2Demultiplexer_INTERFACE_DEFINED__ +#define __IMpeg2Demultiplexer_INTERFACE_DEFINED__ + +/* interface IMpeg2Demultiplexer */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IMpeg2Demultiplexer; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("436eee9c-264f-4242-90e1-4e330c107512") + IMpeg2Demultiplexer : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE CreateOutputPin( + /* [in] */ AM_MEDIA_TYPE *pMediaType, + /* [in] */ LPWSTR pszPinName, + /* [out] */ IPin **ppIPin) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOutputPinMediaType( + /* [in] */ LPWSTR pszPinName, + /* [in] */ AM_MEDIA_TYPE *pMediaType) = 0; + + virtual HRESULT STDMETHODCALLTYPE DeleteOutputPin( + /* [in] */ LPWSTR pszPinName) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMpeg2DemultiplexerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMpeg2Demultiplexer * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMpeg2Demultiplexer * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMpeg2Demultiplexer * This); + + HRESULT ( STDMETHODCALLTYPE *CreateOutputPin )( + IMpeg2Demultiplexer * This, + /* [in] */ AM_MEDIA_TYPE *pMediaType, + /* [in] */ LPWSTR pszPinName, + /* [out] */ IPin **ppIPin); + + HRESULT ( STDMETHODCALLTYPE *SetOutputPinMediaType )( + IMpeg2Demultiplexer * This, + /* [in] */ LPWSTR pszPinName, + /* [in] */ AM_MEDIA_TYPE *pMediaType); + + HRESULT ( STDMETHODCALLTYPE *DeleteOutputPin )( + IMpeg2Demultiplexer * This, + /* [in] */ LPWSTR pszPinName); + + END_INTERFACE + } IMpeg2DemultiplexerVtbl; + + interface IMpeg2Demultiplexer + { + CONST_VTBL struct IMpeg2DemultiplexerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMpeg2Demultiplexer_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMpeg2Demultiplexer_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMpeg2Demultiplexer_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMpeg2Demultiplexer_CreateOutputPin(This,pMediaType,pszPinName,ppIPin) \ + (This)->lpVtbl -> CreateOutputPin(This,pMediaType,pszPinName,ppIPin) + +#define IMpeg2Demultiplexer_SetOutputPinMediaType(This,pszPinName,pMediaType) \ + (This)->lpVtbl -> SetOutputPinMediaType(This,pszPinName,pMediaType) + +#define IMpeg2Demultiplexer_DeleteOutputPin(This,pszPinName) \ + (This)->lpVtbl -> DeleteOutputPin(This,pszPinName) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMpeg2Demultiplexer_CreateOutputPin_Proxy( + IMpeg2Demultiplexer * This, + /* [in] */ AM_MEDIA_TYPE *pMediaType, + /* [in] */ LPWSTR pszPinName, + /* [out] */ IPin **ppIPin); + + +void __RPC_STUB IMpeg2Demultiplexer_CreateOutputPin_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMpeg2Demultiplexer_SetOutputPinMediaType_Proxy( + IMpeg2Demultiplexer * This, + /* [in] */ LPWSTR pszPinName, + /* [in] */ AM_MEDIA_TYPE *pMediaType); + + +void __RPC_STUB IMpeg2Demultiplexer_SetOutputPinMediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMpeg2Demultiplexer_DeleteOutputPin_Proxy( + IMpeg2Demultiplexer * This, + /* [in] */ LPWSTR pszPinName); + + +void __RPC_STUB IMpeg2Demultiplexer_DeleteOutputPin_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMpeg2Demultiplexer_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0348 */ +/* [local] */ + +#define MPEG2_PROGRAM_STREAM_MAP 0x00000000 +#define MPEG2_PROGRAM_ELEMENTARY_STREAM 0x00000001 +#define MPEG2_PROGRAM_DIRECTORY_PES_PACKET 0x00000002 +#define MPEG2_PROGRAM_PACK_HEADER 0x00000003 +#define MPEG2_PROGRAM_PES_STREAM 0x00000004 +#define MPEG2_PROGRAM_SYSTEM_HEADER 0x00000005 +#define SUBSTREAM_FILTER_VAL_NONE 0x10000000 +typedef /* [public][public] */ struct __MIDL___MIDL_itf_strmif_0348_0001 + { + ULONG stream_id; + DWORD dwMediaSampleContent; + ULONG ulSubstreamFilterValue; + int iDataOffset; + } STREAM_ID_MAP; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0348_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0348_v0_0_s_ifspec; + +#ifndef __IEnumStreamIdMap_INTERFACE_DEFINED__ +#define __IEnumStreamIdMap_INTERFACE_DEFINED__ + +/* interface IEnumStreamIdMap */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IEnumStreamIdMap; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("945C1566-6202-46fc-96C7-D87F289C6534") + IEnumStreamIdMap : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG cRequest, + /* [size_is][out][in] */ STREAM_ID_MAP *pStreamIdMap, + /* [out] */ ULONG *pcReceived) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG cRecords) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IEnumStreamIdMap **ppIEnumStreamIdMap) = 0; + + }; + +#else /* C style interface */ + + typedef struct IEnumStreamIdMapVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IEnumStreamIdMap * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IEnumStreamIdMap * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IEnumStreamIdMap * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IEnumStreamIdMap * This, + /* [in] */ ULONG cRequest, + /* [size_is][out][in] */ STREAM_ID_MAP *pStreamIdMap, + /* [out] */ ULONG *pcReceived); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IEnumStreamIdMap * This, + /* [in] */ ULONG cRecords); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IEnumStreamIdMap * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IEnumStreamIdMap * This, + /* [out] */ IEnumStreamIdMap **ppIEnumStreamIdMap); + + END_INTERFACE + } IEnumStreamIdMapVtbl; + + interface IEnumStreamIdMap + { + CONST_VTBL struct IEnumStreamIdMapVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IEnumStreamIdMap_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IEnumStreamIdMap_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IEnumStreamIdMap_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IEnumStreamIdMap_Next(This,cRequest,pStreamIdMap,pcReceived) \ + (This)->lpVtbl -> Next(This,cRequest,pStreamIdMap,pcReceived) + +#define IEnumStreamIdMap_Skip(This,cRecords) \ + (This)->lpVtbl -> Skip(This,cRecords) + +#define IEnumStreamIdMap_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IEnumStreamIdMap_Clone(This,ppIEnumStreamIdMap) \ + (This)->lpVtbl -> Clone(This,ppIEnumStreamIdMap) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IEnumStreamIdMap_Next_Proxy( + IEnumStreamIdMap * This, + /* [in] */ ULONG cRequest, + /* [size_is][out][in] */ STREAM_ID_MAP *pStreamIdMap, + /* [out] */ ULONG *pcReceived); + + +void __RPC_STUB IEnumStreamIdMap_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumStreamIdMap_Skip_Proxy( + IEnumStreamIdMap * This, + /* [in] */ ULONG cRecords); + + +void __RPC_STUB IEnumStreamIdMap_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumStreamIdMap_Reset_Proxy( + IEnumStreamIdMap * This); + + +void __RPC_STUB IEnumStreamIdMap_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumStreamIdMap_Clone_Proxy( + IEnumStreamIdMap * This, + /* [out] */ IEnumStreamIdMap **ppIEnumStreamIdMap); + + +void __RPC_STUB IEnumStreamIdMap_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IEnumStreamIdMap_INTERFACE_DEFINED__ */ + + +#ifndef __IMPEG2StreamIdMap_INTERFACE_DEFINED__ +#define __IMPEG2StreamIdMap_INTERFACE_DEFINED__ + +/* interface IMPEG2StreamIdMap */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IMPEG2StreamIdMap; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("D0E04C47-25B8-4369-925A-362A01D95444") + IMPEG2StreamIdMap : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE MapStreamId( + /* [in] */ ULONG ulStreamId, + /* [in] */ DWORD MediaSampleContent, + /* [in] */ ULONG ulSubstreamFilterValue, + /* [in] */ int iDataOffset) = 0; + + virtual HRESULT STDMETHODCALLTYPE UnmapStreamId( + /* [in] */ ULONG culStreamId, + /* [in] */ ULONG *pulStreamId) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumStreamIdMap( + /* [out] */ IEnumStreamIdMap **ppIEnumStreamIdMap) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMPEG2StreamIdMapVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMPEG2StreamIdMap * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMPEG2StreamIdMap * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMPEG2StreamIdMap * This); + + HRESULT ( STDMETHODCALLTYPE *MapStreamId )( + IMPEG2StreamIdMap * This, + /* [in] */ ULONG ulStreamId, + /* [in] */ DWORD MediaSampleContent, + /* [in] */ ULONG ulSubstreamFilterValue, + /* [in] */ int iDataOffset); + + HRESULT ( STDMETHODCALLTYPE *UnmapStreamId )( + IMPEG2StreamIdMap * This, + /* [in] */ ULONG culStreamId, + /* [in] */ ULONG *pulStreamId); + + HRESULT ( STDMETHODCALLTYPE *EnumStreamIdMap )( + IMPEG2StreamIdMap * This, + /* [out] */ IEnumStreamIdMap **ppIEnumStreamIdMap); + + END_INTERFACE + } IMPEG2StreamIdMapVtbl; + + interface IMPEG2StreamIdMap + { + CONST_VTBL struct IMPEG2StreamIdMapVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMPEG2StreamIdMap_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMPEG2StreamIdMap_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMPEG2StreamIdMap_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMPEG2StreamIdMap_MapStreamId(This,ulStreamId,MediaSampleContent,ulSubstreamFilterValue,iDataOffset) \ + (This)->lpVtbl -> MapStreamId(This,ulStreamId,MediaSampleContent,ulSubstreamFilterValue,iDataOffset) + +#define IMPEG2StreamIdMap_UnmapStreamId(This,culStreamId,pulStreamId) \ + (This)->lpVtbl -> UnmapStreamId(This,culStreamId,pulStreamId) + +#define IMPEG2StreamIdMap_EnumStreamIdMap(This,ppIEnumStreamIdMap) \ + (This)->lpVtbl -> EnumStreamIdMap(This,ppIEnumStreamIdMap) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IMPEG2StreamIdMap_MapStreamId_Proxy( + IMPEG2StreamIdMap * This, + /* [in] */ ULONG ulStreamId, + /* [in] */ DWORD MediaSampleContent, + /* [in] */ ULONG ulSubstreamFilterValue, + /* [in] */ int iDataOffset); + + +void __RPC_STUB IMPEG2StreamIdMap_MapStreamId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMPEG2StreamIdMap_UnmapStreamId_Proxy( + IMPEG2StreamIdMap * This, + /* [in] */ ULONG culStreamId, + /* [in] */ ULONG *pulStreamId); + + +void __RPC_STUB IMPEG2StreamIdMap_UnmapStreamId_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IMPEG2StreamIdMap_EnumStreamIdMap_Proxy( + IMPEG2StreamIdMap * This, + /* [out] */ IEnumStreamIdMap **ppIEnumStreamIdMap); + + +void __RPC_STUB IMPEG2StreamIdMap_EnumStreamIdMap_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMPEG2StreamIdMap_INTERFACE_DEFINED__ */ + + +#ifndef __IAMovie_INTERFACE_DEFINED__ +#define __IAMovie_INTERFACE_DEFINED__ + +/* interface IAMovie */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IAMovie; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("359ace10-7688-11cf-8b23-00805f6cef60") + IAMovie : public IFilterGraph + { + public: + virtual HRESULT STDMETHODCALLTYPE Connect( + /* [in] */ IPin *ppinOut, + /* [in] */ IPin *ppinIn) = 0; + + virtual HRESULT STDMETHODCALLTYPE Render( + /* [in] */ IPin *ppinOut) = 0; + + virtual HRESULT STDMETHODCALLTYPE Run( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Pause( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetState( + /* [in] */ LONG msTimeout, + /* [out] */ FILTER_STATE *pfs) = 0; + + virtual HRESULT STDMETHODCALLTYPE RenderFile( + /* [in] */ LPCWSTR strFilename) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddSourceFilter( + /* [in] */ LPCWSTR strFilename, + /* [out] */ IBaseFilter **ppUnk) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetEventHandle( + /* [out] */ HEVENT *hEvent) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetEvent( + /* [out] */ long *lEventCode, + /* [out] */ long *lParam1, + /* [out] */ long *lParam2, + /* [in] */ long msTimeout) = 0; + + virtual HRESULT STDMETHODCALLTYPE WaitForCompletion( + /* [in] */ long msTimeout, + /* [out] */ long *pEvCode) = 0; + + virtual HRESULT STDMETHODCALLTYPE CancelDefaultHandling( + /* [in] */ long lEvCode) = 0; + + virtual HRESULT STDMETHODCALLTYPE RestoreDefaultHandling( + /* [in] */ long lEvCode) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Duration( + /* [out] */ REFTIME *plength) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_CurrentPosition( + /* [in] */ REFTIME llTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_CurrentPosition( + /* [out] */ REFTIME *pllTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_StopTime( + /* [out] */ REFTIME *pllTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_StopTime( + /* [in] */ REFTIME llTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_PrerollTime( + /* [out] */ REFTIME *pllTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_PrerollTime( + /* [in] */ REFTIME llTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE put_Rate( + /* [in] */ double dRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE get_Rate( + /* [out] */ double *pdRate) = 0; + + virtual HRESULT STDMETHODCALLTYPE RemoveAllFilters( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Play( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PlayFile( + /* [in] */ LPCWSTR strFilename) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumFiltersByInterface( + /* [in] */ REFIID riid, + /* [out] */ IEnumFilters **ppEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumPins( + /* [out] */ IEnumPins **ppEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumPinsIn( + /* [out] */ IEnumPins **ppEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumPinsOut( + /* [out] */ IEnumPins **ppEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE RenderAll( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE RenderNewFile( + /* [in] */ LPCWSTR strFilename) = 0; + + virtual HRESULT STDMETHODCALLTYPE FreeEventParams( + /* [in] */ long lEvCode, + /* [in] */ long lParam1, + /* [in] */ long lParam2) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMovieVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMovie * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMovie * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMovie * This); + + HRESULT ( STDMETHODCALLTYPE *AddFilter )( + IAMovie * This, + /* [in] */ IBaseFilter *pFilter, + /* [string][in] */ LPCWSTR pName); + + HRESULT ( STDMETHODCALLTYPE *RemoveFilter )( + IAMovie * This, + /* [in] */ IBaseFilter *pFilter); + + HRESULT ( STDMETHODCALLTYPE *EnumFilters )( + IAMovie * This, + /* [out] */ IEnumFilters **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *FindFilterByName )( + IAMovie * This, + /* [string][in] */ LPCWSTR pName, + /* [out] */ IBaseFilter **ppFilter); + + HRESULT ( STDMETHODCALLTYPE *ConnectDirect )( + IAMovie * This, + /* [in] */ IPin *ppinOut, + /* [in] */ IPin *ppinIn, + /* [unique][in] */ const AM_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *Reconnect )( + IAMovie * This, + /* [in] */ IPin *ppin); + + HRESULT ( STDMETHODCALLTYPE *Disconnect )( + IAMovie * This, + /* [in] */ IPin *ppin); + + HRESULT ( STDMETHODCALLTYPE *SetDefaultSyncSource )( + IAMovie * This); + + HRESULT ( STDMETHODCALLTYPE *Connect )( + IAMovie * This, + /* [in] */ IPin *ppinOut, + /* [in] */ IPin *ppinIn); + + HRESULT ( STDMETHODCALLTYPE *Render )( + IAMovie * This, + /* [in] */ IPin *ppinOut); + + HRESULT ( STDMETHODCALLTYPE *Run )( + IAMovie * This); + + HRESULT ( STDMETHODCALLTYPE *Pause )( + IAMovie * This); + + HRESULT ( STDMETHODCALLTYPE *Stop )( + IAMovie * This); + + HRESULT ( STDMETHODCALLTYPE *GetState )( + IAMovie * This, + /* [in] */ LONG msTimeout, + /* [out] */ FILTER_STATE *pfs); + + HRESULT ( STDMETHODCALLTYPE *RenderFile )( + IAMovie * This, + /* [in] */ LPCWSTR strFilename); + + HRESULT ( STDMETHODCALLTYPE *AddSourceFilter )( + IAMovie * This, + /* [in] */ LPCWSTR strFilename, + /* [out] */ IBaseFilter **ppUnk); + + HRESULT ( STDMETHODCALLTYPE *GetEventHandle )( + IAMovie * This, + /* [out] */ HEVENT *hEvent); + + HRESULT ( STDMETHODCALLTYPE *GetEvent )( + IAMovie * This, + /* [out] */ long *lEventCode, + /* [out] */ long *lParam1, + /* [out] */ long *lParam2, + /* [in] */ long msTimeout); + + HRESULT ( STDMETHODCALLTYPE *WaitForCompletion )( + IAMovie * This, + /* [in] */ long msTimeout, + /* [out] */ long *pEvCode); + + HRESULT ( STDMETHODCALLTYPE *CancelDefaultHandling )( + IAMovie * This, + /* [in] */ long lEvCode); + + HRESULT ( STDMETHODCALLTYPE *RestoreDefaultHandling )( + IAMovie * This, + /* [in] */ long lEvCode); + + HRESULT ( STDMETHODCALLTYPE *get_Duration )( + IAMovie * This, + /* [out] */ REFTIME *plength); + + HRESULT ( STDMETHODCALLTYPE *put_CurrentPosition )( + IAMovie * This, + /* [in] */ REFTIME llTime); + + HRESULT ( STDMETHODCALLTYPE *get_CurrentPosition )( + IAMovie * This, + /* [out] */ REFTIME *pllTime); + + HRESULT ( STDMETHODCALLTYPE *get_StopTime )( + IAMovie * This, + /* [out] */ REFTIME *pllTime); + + HRESULT ( STDMETHODCALLTYPE *put_StopTime )( + IAMovie * This, + /* [in] */ REFTIME llTime); + + HRESULT ( STDMETHODCALLTYPE *get_PrerollTime )( + IAMovie * This, + /* [out] */ REFTIME *pllTime); + + HRESULT ( STDMETHODCALLTYPE *put_PrerollTime )( + IAMovie * This, + /* [in] */ REFTIME llTime); + + HRESULT ( STDMETHODCALLTYPE *put_Rate )( + IAMovie * This, + /* [in] */ double dRate); + + HRESULT ( STDMETHODCALLTYPE *get_Rate )( + IAMovie * This, + /* [out] */ double *pdRate); + + HRESULT ( STDMETHODCALLTYPE *RemoveAllFilters )( + IAMovie * This); + + HRESULT ( STDMETHODCALLTYPE *Play )( + IAMovie * This); + + HRESULT ( STDMETHODCALLTYPE *PlayFile )( + IAMovie * This, + /* [in] */ LPCWSTR strFilename); + + HRESULT ( STDMETHODCALLTYPE *EnumFiltersByInterface )( + IAMovie * This, + /* [in] */ REFIID riid, + /* [out] */ IEnumFilters **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *EnumPins )( + IAMovie * This, + /* [out] */ IEnumPins **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *EnumPinsIn )( + IAMovie * This, + /* [out] */ IEnumPins **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *EnumPinsOut )( + IAMovie * This, + /* [out] */ IEnumPins **ppEnum); + + HRESULT ( STDMETHODCALLTYPE *RenderAll )( + IAMovie * This); + + HRESULT ( STDMETHODCALLTYPE *RenderNewFile )( + IAMovie * This, + /* [in] */ LPCWSTR strFilename); + + HRESULT ( STDMETHODCALLTYPE *FreeEventParams )( + IAMovie * This, + /* [in] */ long lEvCode, + /* [in] */ long lParam1, + /* [in] */ long lParam2); + + END_INTERFACE + } IAMovieVtbl; + + interface IAMovie + { + CONST_VTBL struct IAMovieVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMovie_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMovie_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMovie_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMovie_AddFilter(This,pFilter,pName) \ + (This)->lpVtbl -> AddFilter(This,pFilter,pName) + +#define IAMovie_RemoveFilter(This,pFilter) \ + (This)->lpVtbl -> RemoveFilter(This,pFilter) + +#define IAMovie_EnumFilters(This,ppEnum) \ + (This)->lpVtbl -> EnumFilters(This,ppEnum) + +#define IAMovie_FindFilterByName(This,pName,ppFilter) \ + (This)->lpVtbl -> FindFilterByName(This,pName,ppFilter) + +#define IAMovie_ConnectDirect(This,ppinOut,ppinIn,pmt) \ + (This)->lpVtbl -> ConnectDirect(This,ppinOut,ppinIn,pmt) + +#define IAMovie_Reconnect(This,ppin) \ + (This)->lpVtbl -> Reconnect(This,ppin) + +#define IAMovie_Disconnect(This,ppin) \ + (This)->lpVtbl -> Disconnect(This,ppin) + +#define IAMovie_SetDefaultSyncSource(This) \ + (This)->lpVtbl -> SetDefaultSyncSource(This) + + +#define IAMovie_Connect(This,ppinOut,ppinIn) \ + (This)->lpVtbl -> Connect(This,ppinOut,ppinIn) + +#define IAMovie_Render(This,ppinOut) \ + (This)->lpVtbl -> Render(This,ppinOut) + +#define IAMovie_Run(This) \ + (This)->lpVtbl -> Run(This) + +#define IAMovie_Pause(This) \ + (This)->lpVtbl -> Pause(This) + +#define IAMovie_Stop(This) \ + (This)->lpVtbl -> Stop(This) + +#define IAMovie_GetState(This,msTimeout,pfs) \ + (This)->lpVtbl -> GetState(This,msTimeout,pfs) + +#define IAMovie_RenderFile(This,strFilename) \ + (This)->lpVtbl -> RenderFile(This,strFilename) + +#define IAMovie_AddSourceFilter(This,strFilename,ppUnk) \ + (This)->lpVtbl -> AddSourceFilter(This,strFilename,ppUnk) + +#define IAMovie_GetEventHandle(This,hEvent) \ + (This)->lpVtbl -> GetEventHandle(This,hEvent) + +#define IAMovie_GetEvent(This,lEventCode,lParam1,lParam2,msTimeout) \ + (This)->lpVtbl -> GetEvent(This,lEventCode,lParam1,lParam2,msTimeout) + +#define IAMovie_WaitForCompletion(This,msTimeout,pEvCode) \ + (This)->lpVtbl -> WaitForCompletion(This,msTimeout,pEvCode) + +#define IAMovie_CancelDefaultHandling(This,lEvCode) \ + (This)->lpVtbl -> CancelDefaultHandling(This,lEvCode) + +#define IAMovie_RestoreDefaultHandling(This,lEvCode) \ + (This)->lpVtbl -> RestoreDefaultHandling(This,lEvCode) + +#define IAMovie_get_Duration(This,plength) \ + (This)->lpVtbl -> get_Duration(This,plength) + +#define IAMovie_put_CurrentPosition(This,llTime) \ + (This)->lpVtbl -> put_CurrentPosition(This,llTime) + +#define IAMovie_get_CurrentPosition(This,pllTime) \ + (This)->lpVtbl -> get_CurrentPosition(This,pllTime) + +#define IAMovie_get_StopTime(This,pllTime) \ + (This)->lpVtbl -> get_StopTime(This,pllTime) + +#define IAMovie_put_StopTime(This,llTime) \ + (This)->lpVtbl -> put_StopTime(This,llTime) + +#define IAMovie_get_PrerollTime(This,pllTime) \ + (This)->lpVtbl -> get_PrerollTime(This,pllTime) + +#define IAMovie_put_PrerollTime(This,llTime) \ + (This)->lpVtbl -> put_PrerollTime(This,llTime) + +#define IAMovie_put_Rate(This,dRate) \ + (This)->lpVtbl -> put_Rate(This,dRate) + +#define IAMovie_get_Rate(This,pdRate) \ + (This)->lpVtbl -> get_Rate(This,pdRate) + +#define IAMovie_RemoveAllFilters(This) \ + (This)->lpVtbl -> RemoveAllFilters(This) + +#define IAMovie_Play(This) \ + (This)->lpVtbl -> Play(This) + +#define IAMovie_PlayFile(This,strFilename) \ + (This)->lpVtbl -> PlayFile(This,strFilename) + +#define IAMovie_EnumFiltersByInterface(This,riid,ppEnum) \ + (This)->lpVtbl -> EnumFiltersByInterface(This,riid,ppEnum) + +#define IAMovie_EnumPins(This,ppEnum) \ + (This)->lpVtbl -> EnumPins(This,ppEnum) + +#define IAMovie_EnumPinsIn(This,ppEnum) \ + (This)->lpVtbl -> EnumPinsIn(This,ppEnum) + +#define IAMovie_EnumPinsOut(This,ppEnum) \ + (This)->lpVtbl -> EnumPinsOut(This,ppEnum) + +#define IAMovie_RenderAll(This) \ + (This)->lpVtbl -> RenderAll(This) + +#define IAMovie_RenderNewFile(This,strFilename) \ + (This)->lpVtbl -> RenderNewFile(This,strFilename) + +#define IAMovie_FreeEventParams(This,lEvCode,lParam1,lParam2) \ + (This)->lpVtbl -> FreeEventParams(This,lEvCode,lParam1,lParam2) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMovie_Connect_Proxy( + IAMovie * This, + /* [in] */ IPin *ppinOut, + /* [in] */ IPin *ppinIn); + + +void __RPC_STUB IAMovie_Connect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_Render_Proxy( + IAMovie * This, + /* [in] */ IPin *ppinOut); + + +void __RPC_STUB IAMovie_Render_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_Run_Proxy( + IAMovie * This); + + +void __RPC_STUB IAMovie_Run_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_Pause_Proxy( + IAMovie * This); + + +void __RPC_STUB IAMovie_Pause_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_Stop_Proxy( + IAMovie * This); + + +void __RPC_STUB IAMovie_Stop_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_GetState_Proxy( + IAMovie * This, + /* [in] */ LONG msTimeout, + /* [out] */ FILTER_STATE *pfs); + + +void __RPC_STUB IAMovie_GetState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_RenderFile_Proxy( + IAMovie * This, + /* [in] */ LPCWSTR strFilename); + + +void __RPC_STUB IAMovie_RenderFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_AddSourceFilter_Proxy( + IAMovie * This, + /* [in] */ LPCWSTR strFilename, + /* [out] */ IBaseFilter **ppUnk); + + +void __RPC_STUB IAMovie_AddSourceFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_GetEventHandle_Proxy( + IAMovie * This, + /* [out] */ HEVENT *hEvent); + + +void __RPC_STUB IAMovie_GetEventHandle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_GetEvent_Proxy( + IAMovie * This, + /* [out] */ long *lEventCode, + /* [out] */ long *lParam1, + /* [out] */ long *lParam2, + /* [in] */ long msTimeout); + + +void __RPC_STUB IAMovie_GetEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_WaitForCompletion_Proxy( + IAMovie * This, + /* [in] */ long msTimeout, + /* [out] */ long *pEvCode); + + +void __RPC_STUB IAMovie_WaitForCompletion_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_CancelDefaultHandling_Proxy( + IAMovie * This, + /* [in] */ long lEvCode); + + +void __RPC_STUB IAMovie_CancelDefaultHandling_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_RestoreDefaultHandling_Proxy( + IAMovie * This, + /* [in] */ long lEvCode); + + +void __RPC_STUB IAMovie_RestoreDefaultHandling_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_get_Duration_Proxy( + IAMovie * This, + /* [out] */ REFTIME *plength); + + +void __RPC_STUB IAMovie_get_Duration_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_put_CurrentPosition_Proxy( + IAMovie * This, + /* [in] */ REFTIME llTime); + + +void __RPC_STUB IAMovie_put_CurrentPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_get_CurrentPosition_Proxy( + IAMovie * This, + /* [out] */ REFTIME *pllTime); + + +void __RPC_STUB IAMovie_get_CurrentPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_get_StopTime_Proxy( + IAMovie * This, + /* [out] */ REFTIME *pllTime); + + +void __RPC_STUB IAMovie_get_StopTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_put_StopTime_Proxy( + IAMovie * This, + /* [in] */ REFTIME llTime); + + +void __RPC_STUB IAMovie_put_StopTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_get_PrerollTime_Proxy( + IAMovie * This, + /* [out] */ REFTIME *pllTime); + + +void __RPC_STUB IAMovie_get_PrerollTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_put_PrerollTime_Proxy( + IAMovie * This, + /* [in] */ REFTIME llTime); + + +void __RPC_STUB IAMovie_put_PrerollTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_put_Rate_Proxy( + IAMovie * This, + /* [in] */ double dRate); + + +void __RPC_STUB IAMovie_put_Rate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_get_Rate_Proxy( + IAMovie * This, + /* [out] */ double *pdRate); + + +void __RPC_STUB IAMovie_get_Rate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_RemoveAllFilters_Proxy( + IAMovie * This); + + +void __RPC_STUB IAMovie_RemoveAllFilters_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_Play_Proxy( + IAMovie * This); + + +void __RPC_STUB IAMovie_Play_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_PlayFile_Proxy( + IAMovie * This, + /* [in] */ LPCWSTR strFilename); + + +void __RPC_STUB IAMovie_PlayFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_EnumFiltersByInterface_Proxy( + IAMovie * This, + /* [in] */ REFIID riid, + /* [out] */ IEnumFilters **ppEnum); + + +void __RPC_STUB IAMovie_EnumFiltersByInterface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_EnumPins_Proxy( + IAMovie * This, + /* [out] */ IEnumPins **ppEnum); + + +void __RPC_STUB IAMovie_EnumPins_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_EnumPinsIn_Proxy( + IAMovie * This, + /* [out] */ IEnumPins **ppEnum); + + +void __RPC_STUB IAMovie_EnumPinsIn_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_EnumPinsOut_Proxy( + IAMovie * This, + /* [out] */ IEnumPins **ppEnum); + + +void __RPC_STUB IAMovie_EnumPinsOut_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_RenderAll_Proxy( + IAMovie * This); + + +void __RPC_STUB IAMovie_RenderAll_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_RenderNewFile_Proxy( + IAMovie * This, + /* [in] */ LPCWSTR strFilename); + + +void __RPC_STUB IAMovie_RenderNewFile_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMovie_FreeEventParams_Proxy( + IAMovie * This, + /* [in] */ long lEvCode, + /* [in] */ long lParam1, + /* [in] */ long lParam2); + + +void __RPC_STUB IAMovie_FreeEventParams_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMovie_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0351 */ +/* [local] */ + +#include + + + + + + + + + +typedef +enum tagDVD_DOMAIN + { DVD_DOMAIN_FirstPlay = 1, + DVD_DOMAIN_VideoManagerMenu = DVD_DOMAIN_FirstPlay + 1, + DVD_DOMAIN_VideoTitleSetMenu = DVD_DOMAIN_VideoManagerMenu + 1, + DVD_DOMAIN_Title = DVD_DOMAIN_VideoTitleSetMenu + 1, + DVD_DOMAIN_Stop = DVD_DOMAIN_Title + 1 + } DVD_DOMAIN; + +typedef +enum tagDVD_MENU_ID + { DVD_MENU_Title = 2, + DVD_MENU_Root = 3, + DVD_MENU_Subpicture = 4, + DVD_MENU_Audio = 5, + DVD_MENU_Angle = 6, + DVD_MENU_Chapter = 7 + } DVD_MENU_ID; + +typedef +enum tagDVD_DISC_SIDE + { DVD_SIDE_A = 1, + DVD_SIDE_B = 2 + } DVD_DISC_SIDE; + +typedef +enum tagDVD_PREFERRED_DISPLAY_MODE + { DISPLAY_CONTENT_DEFAULT = 0, + DISPLAY_16x9 = 1, + DISPLAY_4x3_PANSCAN_PREFERRED = 2, + DISPLAY_4x3_LETTERBOX_PREFERRED = 3 + } DVD_PREFERRED_DISPLAY_MODE; + +typedef WORD DVD_REGISTER; + +typedef DVD_REGISTER GPRMARRAY[ 16 ]; + +typedef DVD_REGISTER SPRMARRAY[ 24 ]; + +typedef struct tagDVD_ATR + { + ULONG ulCAT; + BYTE pbATRI[ 768 ]; + } DVD_ATR; + +typedef BYTE DVD_VideoATR[ 2 ]; + +typedef BYTE DVD_AudioATR[ 8 ]; + +typedef BYTE DVD_SubpictureATR[ 6 ]; + +typedef +enum tagDVD_FRAMERATE + { DVD_FPS_25 = 1, + DVD_FPS_30NonDrop = 3 + } DVD_FRAMERATE; + +typedef struct tagDVD_TIMECODE +{ + ULONG Hours1 :4; // Hours + ULONG Hours10 :4; // Tens of Hours + + ULONG Minutes1 :4; // Minutes + ULONG Minutes10:4; // Tens of Minutes + + ULONG Seconds1 :4; // Seconds + ULONG Seconds10:4; // Tens of Seconds + + ULONG Frames1 :4; // Frames + ULONG Frames10 :2; // Tens of Frames + + ULONG FrameRateCode: 2; // use DVD_FRAMERATE to indicate frames/sec and drop/non-drop +} DVD_TIMECODE; +typedef +enum tagDVD_TIMECODE_FLAGS + { DVD_TC_FLAG_25fps = 0x1, + DVD_TC_FLAG_30fps = 0x2, + DVD_TC_FLAG_DropFrame = 0x4, + DVD_TC_FLAG_Interpolated = 0x8 + } DVD_TIMECODE_FLAGS; + +typedef struct tagDVD_HMSF_TIMECODE + { + BYTE bHours; + BYTE bMinutes; + BYTE bSeconds; + BYTE bFrames; + } DVD_HMSF_TIMECODE; + +typedef struct tagDVD_PLAYBACK_LOCATION2 + { + ULONG TitleNum; + ULONG ChapterNum; + DVD_HMSF_TIMECODE TimeCode; + ULONG TimeCodeFlags; + } DVD_PLAYBACK_LOCATION2; + +typedef struct tagDVD_PLAYBACK_LOCATION + { + ULONG TitleNum; + ULONG ChapterNum; + ULONG TimeCode; + } DVD_PLAYBACK_LOCATION; + +typedef DWORD VALID_UOP_SOMTHING_OR_OTHER; + +typedef /* [public] */ +enum __MIDL___MIDL_itf_strmif_0351_0001 + { UOP_FLAG_Play_Title_Or_AtTime = 0x1, + UOP_FLAG_Play_Chapter = 0x2, + UOP_FLAG_Play_Title = 0x4, + UOP_FLAG_Stop = 0x8, + UOP_FLAG_ReturnFromSubMenu = 0x10, + UOP_FLAG_Play_Chapter_Or_AtTime = 0x20, + UOP_FLAG_PlayPrev_Or_Replay_Chapter = 0x40, + UOP_FLAG_PlayNext_Chapter = 0x80, + UOP_FLAG_Play_Forwards = 0x100, + UOP_FLAG_Play_Backwards = 0x200, + UOP_FLAG_ShowMenu_Title = 0x400, + UOP_FLAG_ShowMenu_Root = 0x800, + UOP_FLAG_ShowMenu_SubPic = 0x1000, + UOP_FLAG_ShowMenu_Audio = 0x2000, + UOP_FLAG_ShowMenu_Angle = 0x4000, + UOP_FLAG_ShowMenu_Chapter = 0x8000, + UOP_FLAG_Resume = 0x10000, + UOP_FLAG_Select_Or_Activate_Button = 0x20000, + UOP_FLAG_Still_Off = 0x40000, + UOP_FLAG_Pause_On = 0x80000, + UOP_FLAG_Select_Audio_Stream = 0x100000, + UOP_FLAG_Select_SubPic_Stream = 0x200000, + UOP_FLAG_Select_Angle = 0x400000, + UOP_FLAG_Select_Karaoke_Audio_Presentation_Mode = 0x800000, + UOP_FLAG_Select_Video_Mode_Preference = 0x1000000 + } VALID_UOP_FLAG; + +typedef /* [public] */ +enum __MIDL___MIDL_itf_strmif_0351_0002 + { DVD_CMD_FLAG_None = 0, + DVD_CMD_FLAG_Flush = 0x1, + DVD_CMD_FLAG_SendEvents = 0x2, + DVD_CMD_FLAG_Block = 0x4, + DVD_CMD_FLAG_StartWhenRendered = 0x8, + DVD_CMD_FLAG_EndAfterRendered = 0x10 + } DVD_CMD_FLAGS; + +typedef /* [public][public] */ +enum __MIDL___MIDL_itf_strmif_0351_0003 + { DVD_ResetOnStop = 1, + DVD_NotifyParentalLevelChange = 2, + DVD_HMSF_TimeCodeEvents = 3 + } DVD_OPTION_FLAG; + +typedef /* [public][public] */ +enum __MIDL___MIDL_itf_strmif_0351_0004 + { DVD_Relative_Upper = 1, + DVD_Relative_Lower = 2, + DVD_Relative_Left = 3, + DVD_Relative_Right = 4 + } DVD_RELATIVE_BUTTON; + +typedef +enum tagDVD_PARENTAL_LEVEL + { DVD_PARENTAL_LEVEL_8 = 0x8000, + DVD_PARENTAL_LEVEL_7 = 0x4000, + DVD_PARENTAL_LEVEL_6 = 0x2000, + DVD_PARENTAL_LEVEL_5 = 0x1000, + DVD_PARENTAL_LEVEL_4 = 0x800, + DVD_PARENTAL_LEVEL_3 = 0x400, + DVD_PARENTAL_LEVEL_2 = 0x200, + DVD_PARENTAL_LEVEL_1 = 0x100 + } DVD_PARENTAL_LEVEL; + +typedef +enum tagDVD_AUDIO_LANG_EXT + { DVD_AUD_EXT_NotSpecified = 0, + DVD_AUD_EXT_Captions = 1, + DVD_AUD_EXT_VisuallyImpaired = 2, + DVD_AUD_EXT_DirectorComments1 = 3, + DVD_AUD_EXT_DirectorComments2 = 4 + } DVD_AUDIO_LANG_EXT; + +typedef +enum tagDVD_SUBPICTURE_LANG_EXT + { DVD_SP_EXT_NotSpecified = 0, + DVD_SP_EXT_Caption_Normal = 1, + DVD_SP_EXT_Caption_Big = 2, + DVD_SP_EXT_Caption_Children = 3, + DVD_SP_EXT_CC_Normal = 5, + DVD_SP_EXT_CC_Big = 6, + DVD_SP_EXT_CC_Children = 7, + DVD_SP_EXT_Forced = 9, + DVD_SP_EXT_DirectorComments_Normal = 13, + DVD_SP_EXT_DirectorComments_Big = 14, + DVD_SP_EXT_DirectorComments_Children = 15 + } DVD_SUBPICTURE_LANG_EXT; + +typedef +enum tagDVD_AUDIO_APPMODE + { DVD_AudioMode_None = 0, + DVD_AudioMode_Karaoke = 1, + DVD_AudioMode_Surround = 2, + DVD_AudioMode_Other = 3 + } DVD_AUDIO_APPMODE; + +typedef +enum tagDVD_AUDIO_FORMAT + { DVD_AudioFormat_AC3 = 0, + DVD_AudioFormat_MPEG1 = 1, + DVD_AudioFormat_MPEG1_DRC = 2, + DVD_AudioFormat_MPEG2 = 3, + DVD_AudioFormat_MPEG2_DRC = 4, + DVD_AudioFormat_LPCM = 5, + DVD_AudioFormat_DTS = 6, + DVD_AudioFormat_SDDS = 7, + DVD_AudioFormat_Other = 8 + } DVD_AUDIO_FORMAT; + +typedef +enum tagDVD_KARAOKE_DOWNMIX + { DVD_Mix_0to0 = 0x1, + DVD_Mix_1to0 = 0x2, + DVD_Mix_2to0 = 0x4, + DVD_Mix_3to0 = 0x8, + DVD_Mix_4to0 = 0x10, + DVD_Mix_Lto0 = 0x20, + DVD_Mix_Rto0 = 0x40, + DVD_Mix_0to1 = 0x100, + DVD_Mix_1to1 = 0x200, + DVD_Mix_2to1 = 0x400, + DVD_Mix_3to1 = 0x800, + DVD_Mix_4to1 = 0x1000, + DVD_Mix_Lto1 = 0x2000, + DVD_Mix_Rto1 = 0x4000 + } DVD_KARAOKE_DOWNMIX; + +typedef struct tagDVD_AudioAttributes + { + DVD_AUDIO_APPMODE AppMode; + BYTE AppModeData; + DVD_AUDIO_FORMAT AudioFormat; + LCID Language; + DVD_AUDIO_LANG_EXT LanguageExtension; + BOOL fHasMultichannelInfo; + DWORD dwFrequency; + BYTE bQuantization; + BYTE bNumberOfChannels; + DWORD dwReserved[ 2 ]; + } DVD_AudioAttributes; + +typedef struct tagDVD_MUA_MixingInfo + { + BOOL fMixTo0; + BOOL fMixTo1; + BOOL fMix0InPhase; + BOOL fMix1InPhase; + DWORD dwSpeakerPosition; + } DVD_MUA_MixingInfo; + +typedef struct tagDVD_MUA_Coeff + { + double log2_alpha; + double log2_beta; + } DVD_MUA_Coeff; + +typedef struct tagDVD_MultichannelAudioAttributes + { + DVD_MUA_MixingInfo Info[ 8 ]; + DVD_MUA_Coeff Coeff[ 8 ]; + } DVD_MultichannelAudioAttributes; + +typedef +enum tagDVD_KARAOKE_CONTENTS + { DVD_Karaoke_GuideVocal1 = 0x1, + DVD_Karaoke_GuideVocal2 = 0x2, + DVD_Karaoke_GuideMelody1 = 0x4, + DVD_Karaoke_GuideMelody2 = 0x8, + DVD_Karaoke_GuideMelodyA = 0x10, + DVD_Karaoke_GuideMelodyB = 0x20, + DVD_Karaoke_SoundEffectA = 0x40, + DVD_Karaoke_SoundEffectB = 0x80 + } DVD_KARAOKE_CONTENTS; + +typedef +enum tagDVD_KARAOKE_ASSIGNMENT + { DVD_Assignment_reserved0 = 0, + DVD_Assignment_reserved1 = 1, + DVD_Assignment_LR = 2, + DVD_Assignment_LRM = 3, + DVD_Assignment_LR1 = 4, + DVD_Assignment_LRM1 = 5, + DVD_Assignment_LR12 = 6, + DVD_Assignment_LRM12 = 7 + } DVD_KARAOKE_ASSIGNMENT; + +typedef struct tagDVD_KaraokeAttributes + { + BYTE bVersion; + BOOL fMasterOfCeremoniesInGuideVocal1; + BOOL fDuet; + DVD_KARAOKE_ASSIGNMENT ChannelAssignment; + WORD wChannelContents[ 8 ]; + } DVD_KaraokeAttributes; + +typedef +enum tagDVD_VIDEO_COMPRESSION + { DVD_VideoCompression_Other = 0, + DVD_VideoCompression_MPEG1 = 1, + DVD_VideoCompression_MPEG2 = 2 + } DVD_VIDEO_COMPRESSION; + +typedef struct tagDVD_VideoAttributes + { + BOOL fPanscanPermitted; + BOOL fLetterboxPermitted; + ULONG ulAspectX; + ULONG ulAspectY; + ULONG ulFrameRate; + ULONG ulFrameHeight; + DVD_VIDEO_COMPRESSION Compression; + BOOL fLine21Field1InGOP; + BOOL fLine21Field2InGOP; + ULONG ulSourceResolutionX; + ULONG ulSourceResolutionY; + BOOL fIsSourceLetterboxed; + BOOL fIsFilmMode; + } DVD_VideoAttributes; + +typedef +enum tagDVD_SUBPICTURE_TYPE + { DVD_SPType_NotSpecified = 0, + DVD_SPType_Language = 1, + DVD_SPType_Other = 2 + } DVD_SUBPICTURE_TYPE; + +typedef +enum tagDVD_SUBPICTURE_CODING + { DVD_SPCoding_RunLength = 0, + DVD_SPCoding_Extended = 1, + DVD_SPCoding_Other = 2 + } DVD_SUBPICTURE_CODING; + +typedef struct tagDVD_SubpictureAttributes + { + DVD_SUBPICTURE_TYPE Type; + DVD_SUBPICTURE_CODING CodingMode; + LCID Language; + DVD_SUBPICTURE_LANG_EXT LanguageExtension; + } DVD_SubpictureAttributes; + +typedef +enum tagDVD_TITLE_APPMODE + { DVD_AppMode_Not_Specified = 0, + DVD_AppMode_Karaoke = 1, + DVD_AppMode_Other = 3 + } DVD_TITLE_APPMODE; + +typedef struct tagDVD_TitleMainAttributes + { + DVD_TITLE_APPMODE AppMode; + DVD_VideoAttributes VideoAttributes; + ULONG ulNumberOfAudioStreams; + DVD_AudioAttributes AudioAttributes[ 8 ]; + DVD_MultichannelAudioAttributes MultichannelAudioAttributes[ 8 ]; + ULONG ulNumberOfSubpictureStreams; + DVD_SubpictureAttributes SubpictureAttributes[ 32 ]; + } DVD_TitleAttributes; + +typedef struct tagDVD_MenuAttributes + { + BOOL fCompatibleRegion[ 8 ]; + DVD_VideoAttributes VideoAttributes; + BOOL fAudioPresent; + DVD_AudioAttributes AudioAttributes; + BOOL fSubpicturePresent; + DVD_SubpictureAttributes SubpictureAttributes; + } DVD_MenuAttributes; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0351_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0351_v0_0_s_ifspec; + +#ifndef __IDvdControl_INTERFACE_DEFINED__ +#define __IDvdControl_INTERFACE_DEFINED__ + +/* interface IDvdControl */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IDvdControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A70EFE61-E2A3-11d0-A9BE-00AA0061BE93") + IDvdControl : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE TitlePlay( + /* [in] */ ULONG ulTitle) = 0; + + virtual HRESULT STDMETHODCALLTYPE ChapterPlay( + /* [in] */ ULONG ulTitle, + /* [in] */ ULONG ulChapter) = 0; + + virtual HRESULT STDMETHODCALLTYPE TimePlay( + /* [in] */ ULONG ulTitle, + /* [in] */ ULONG bcdTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE StopForResume( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE GoUp( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE TimeSearch( + /* [in] */ ULONG bcdTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE ChapterSearch( + /* [in] */ ULONG ulChapter) = 0; + + virtual HRESULT STDMETHODCALLTYPE PrevPGSearch( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE TopPGSearch( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE NextPGSearch( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE ForwardScan( + /* [in] */ double dwSpeed) = 0; + + virtual HRESULT STDMETHODCALLTYPE BackwardScan( + /* [in] */ double dwSpeed) = 0; + + virtual HRESULT STDMETHODCALLTYPE MenuCall( + /* [in] */ DVD_MENU_ID MenuID) = 0; + + virtual HRESULT STDMETHODCALLTYPE Resume( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE UpperButtonSelect( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE LowerButtonSelect( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE LeftButtonSelect( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE RightButtonSelect( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE ButtonActivate( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE ButtonSelectAndActivate( + /* [in] */ ULONG ulButton) = 0; + + virtual HRESULT STDMETHODCALLTYPE StillOff( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PauseOn( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE PauseOff( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE MenuLanguageSelect( + /* [in] */ LCID Language) = 0; + + virtual HRESULT STDMETHODCALLTYPE AudioStreamChange( + /* [in] */ ULONG ulAudio) = 0; + + virtual HRESULT STDMETHODCALLTYPE SubpictureStreamChange( + /* [in] */ ULONG ulSubPicture, + /* [in] */ BOOL bDisplay) = 0; + + virtual HRESULT STDMETHODCALLTYPE AngleChange( + /* [in] */ ULONG ulAngle) = 0; + + virtual HRESULT STDMETHODCALLTYPE ParentalLevelSelect( + /* [in] */ ULONG ulParentalLevel) = 0; + + virtual HRESULT STDMETHODCALLTYPE ParentalCountrySelect( + /* [in] */ WORD wCountry) = 0; + + virtual HRESULT STDMETHODCALLTYPE KaraokeAudioPresentationModeChange( + /* [in] */ ULONG ulMode) = 0; + + virtual HRESULT STDMETHODCALLTYPE VideoModePreferrence( + /* [in] */ ULONG ulPreferredDisplayMode) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetRoot( + /* [in] */ LPCWSTR pszPath) = 0; + + virtual HRESULT STDMETHODCALLTYPE MouseActivate( + /* [in] */ POINT point) = 0; + + virtual HRESULT STDMETHODCALLTYPE MouseSelect( + /* [in] */ POINT point) = 0; + + virtual HRESULT STDMETHODCALLTYPE ChapterPlayAutoStop( + /* [in] */ ULONG ulTitle, + /* [in] */ ULONG ulChapter, + /* [in] */ ULONG ulChaptersToPlay) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDvdControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDvdControl * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDvdControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDvdControl * This); + + HRESULT ( STDMETHODCALLTYPE *TitlePlay )( + IDvdControl * This, + /* [in] */ ULONG ulTitle); + + HRESULT ( STDMETHODCALLTYPE *ChapterPlay )( + IDvdControl * This, + /* [in] */ ULONG ulTitle, + /* [in] */ ULONG ulChapter); + + HRESULT ( STDMETHODCALLTYPE *TimePlay )( + IDvdControl * This, + /* [in] */ ULONG ulTitle, + /* [in] */ ULONG bcdTime); + + HRESULT ( STDMETHODCALLTYPE *StopForResume )( + IDvdControl * This); + + HRESULT ( STDMETHODCALLTYPE *GoUp )( + IDvdControl * This); + + HRESULT ( STDMETHODCALLTYPE *TimeSearch )( + IDvdControl * This, + /* [in] */ ULONG bcdTime); + + HRESULT ( STDMETHODCALLTYPE *ChapterSearch )( + IDvdControl * This, + /* [in] */ ULONG ulChapter); + + HRESULT ( STDMETHODCALLTYPE *PrevPGSearch )( + IDvdControl * This); + + HRESULT ( STDMETHODCALLTYPE *TopPGSearch )( + IDvdControl * This); + + HRESULT ( STDMETHODCALLTYPE *NextPGSearch )( + IDvdControl * This); + + HRESULT ( STDMETHODCALLTYPE *ForwardScan )( + IDvdControl * This, + /* [in] */ double dwSpeed); + + HRESULT ( STDMETHODCALLTYPE *BackwardScan )( + IDvdControl * This, + /* [in] */ double dwSpeed); + + HRESULT ( STDMETHODCALLTYPE *MenuCall )( + IDvdControl * This, + /* [in] */ DVD_MENU_ID MenuID); + + HRESULT ( STDMETHODCALLTYPE *Resume )( + IDvdControl * This); + + HRESULT ( STDMETHODCALLTYPE *UpperButtonSelect )( + IDvdControl * This); + + HRESULT ( STDMETHODCALLTYPE *LowerButtonSelect )( + IDvdControl * This); + + HRESULT ( STDMETHODCALLTYPE *LeftButtonSelect )( + IDvdControl * This); + + HRESULT ( STDMETHODCALLTYPE *RightButtonSelect )( + IDvdControl * This); + + HRESULT ( STDMETHODCALLTYPE *ButtonActivate )( + IDvdControl * This); + + HRESULT ( STDMETHODCALLTYPE *ButtonSelectAndActivate )( + IDvdControl * This, + /* [in] */ ULONG ulButton); + + HRESULT ( STDMETHODCALLTYPE *StillOff )( + IDvdControl * This); + + HRESULT ( STDMETHODCALLTYPE *PauseOn )( + IDvdControl * This); + + HRESULT ( STDMETHODCALLTYPE *PauseOff )( + IDvdControl * This); + + HRESULT ( STDMETHODCALLTYPE *MenuLanguageSelect )( + IDvdControl * This, + /* [in] */ LCID Language); + + HRESULT ( STDMETHODCALLTYPE *AudioStreamChange )( + IDvdControl * This, + /* [in] */ ULONG ulAudio); + + HRESULT ( STDMETHODCALLTYPE *SubpictureStreamChange )( + IDvdControl * This, + /* [in] */ ULONG ulSubPicture, + /* [in] */ BOOL bDisplay); + + HRESULT ( STDMETHODCALLTYPE *AngleChange )( + IDvdControl * This, + /* [in] */ ULONG ulAngle); + + HRESULT ( STDMETHODCALLTYPE *ParentalLevelSelect )( + IDvdControl * This, + /* [in] */ ULONG ulParentalLevel); + + HRESULT ( STDMETHODCALLTYPE *ParentalCountrySelect )( + IDvdControl * This, + /* [in] */ WORD wCountry); + + HRESULT ( STDMETHODCALLTYPE *KaraokeAudioPresentationModeChange )( + IDvdControl * This, + /* [in] */ ULONG ulMode); + + HRESULT ( STDMETHODCALLTYPE *VideoModePreferrence )( + IDvdControl * This, + /* [in] */ ULONG ulPreferredDisplayMode); + + HRESULT ( STDMETHODCALLTYPE *SetRoot )( + IDvdControl * This, + /* [in] */ LPCWSTR pszPath); + + HRESULT ( STDMETHODCALLTYPE *MouseActivate )( + IDvdControl * This, + /* [in] */ POINT point); + + HRESULT ( STDMETHODCALLTYPE *MouseSelect )( + IDvdControl * This, + /* [in] */ POINT point); + + HRESULT ( STDMETHODCALLTYPE *ChapterPlayAutoStop )( + IDvdControl * This, + /* [in] */ ULONG ulTitle, + /* [in] */ ULONG ulChapter, + /* [in] */ ULONG ulChaptersToPlay); + + END_INTERFACE + } IDvdControlVtbl; + + interface IDvdControl + { + CONST_VTBL struct IDvdControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDvdControl_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDvdControl_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDvdControl_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDvdControl_TitlePlay(This,ulTitle) \ + (This)->lpVtbl -> TitlePlay(This,ulTitle) + +#define IDvdControl_ChapterPlay(This,ulTitle,ulChapter) \ + (This)->lpVtbl -> ChapterPlay(This,ulTitle,ulChapter) + +#define IDvdControl_TimePlay(This,ulTitle,bcdTime) \ + (This)->lpVtbl -> TimePlay(This,ulTitle,bcdTime) + +#define IDvdControl_StopForResume(This) \ + (This)->lpVtbl -> StopForResume(This) + +#define IDvdControl_GoUp(This) \ + (This)->lpVtbl -> GoUp(This) + +#define IDvdControl_TimeSearch(This,bcdTime) \ + (This)->lpVtbl -> TimeSearch(This,bcdTime) + +#define IDvdControl_ChapterSearch(This,ulChapter) \ + (This)->lpVtbl -> ChapterSearch(This,ulChapter) + +#define IDvdControl_PrevPGSearch(This) \ + (This)->lpVtbl -> PrevPGSearch(This) + +#define IDvdControl_TopPGSearch(This) \ + (This)->lpVtbl -> TopPGSearch(This) + +#define IDvdControl_NextPGSearch(This) \ + (This)->lpVtbl -> NextPGSearch(This) + +#define IDvdControl_ForwardScan(This,dwSpeed) \ + (This)->lpVtbl -> ForwardScan(This,dwSpeed) + +#define IDvdControl_BackwardScan(This,dwSpeed) \ + (This)->lpVtbl -> BackwardScan(This,dwSpeed) + +#define IDvdControl_MenuCall(This,MenuID) \ + (This)->lpVtbl -> MenuCall(This,MenuID) + +#define IDvdControl_Resume(This) \ + (This)->lpVtbl -> Resume(This) + +#define IDvdControl_UpperButtonSelect(This) \ + (This)->lpVtbl -> UpperButtonSelect(This) + +#define IDvdControl_LowerButtonSelect(This) \ + (This)->lpVtbl -> LowerButtonSelect(This) + +#define IDvdControl_LeftButtonSelect(This) \ + (This)->lpVtbl -> LeftButtonSelect(This) + +#define IDvdControl_RightButtonSelect(This) \ + (This)->lpVtbl -> RightButtonSelect(This) + +#define IDvdControl_ButtonActivate(This) \ + (This)->lpVtbl -> ButtonActivate(This) + +#define IDvdControl_ButtonSelectAndActivate(This,ulButton) \ + (This)->lpVtbl -> ButtonSelectAndActivate(This,ulButton) + +#define IDvdControl_StillOff(This) \ + (This)->lpVtbl -> StillOff(This) + +#define IDvdControl_PauseOn(This) \ + (This)->lpVtbl -> PauseOn(This) + +#define IDvdControl_PauseOff(This) \ + (This)->lpVtbl -> PauseOff(This) + +#define IDvdControl_MenuLanguageSelect(This,Language) \ + (This)->lpVtbl -> MenuLanguageSelect(This,Language) + +#define IDvdControl_AudioStreamChange(This,ulAudio) \ + (This)->lpVtbl -> AudioStreamChange(This,ulAudio) + +#define IDvdControl_SubpictureStreamChange(This,ulSubPicture,bDisplay) \ + (This)->lpVtbl -> SubpictureStreamChange(This,ulSubPicture,bDisplay) + +#define IDvdControl_AngleChange(This,ulAngle) \ + (This)->lpVtbl -> AngleChange(This,ulAngle) + +#define IDvdControl_ParentalLevelSelect(This,ulParentalLevel) \ + (This)->lpVtbl -> ParentalLevelSelect(This,ulParentalLevel) + +#define IDvdControl_ParentalCountrySelect(This,wCountry) \ + (This)->lpVtbl -> ParentalCountrySelect(This,wCountry) + +#define IDvdControl_KaraokeAudioPresentationModeChange(This,ulMode) \ + (This)->lpVtbl -> KaraokeAudioPresentationModeChange(This,ulMode) + +#define IDvdControl_VideoModePreferrence(This,ulPreferredDisplayMode) \ + (This)->lpVtbl -> VideoModePreferrence(This,ulPreferredDisplayMode) + +#define IDvdControl_SetRoot(This,pszPath) \ + (This)->lpVtbl -> SetRoot(This,pszPath) + +#define IDvdControl_MouseActivate(This,point) \ + (This)->lpVtbl -> MouseActivate(This,point) + +#define IDvdControl_MouseSelect(This,point) \ + (This)->lpVtbl -> MouseSelect(This,point) + +#define IDvdControl_ChapterPlayAutoStop(This,ulTitle,ulChapter,ulChaptersToPlay) \ + (This)->lpVtbl -> ChapterPlayAutoStop(This,ulTitle,ulChapter,ulChaptersToPlay) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDvdControl_TitlePlay_Proxy( + IDvdControl * This, + /* [in] */ ULONG ulTitle); + + +void __RPC_STUB IDvdControl_TitlePlay_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_ChapterPlay_Proxy( + IDvdControl * This, + /* [in] */ ULONG ulTitle, + /* [in] */ ULONG ulChapter); + + +void __RPC_STUB IDvdControl_ChapterPlay_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_TimePlay_Proxy( + IDvdControl * This, + /* [in] */ ULONG ulTitle, + /* [in] */ ULONG bcdTime); + + +void __RPC_STUB IDvdControl_TimePlay_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_StopForResume_Proxy( + IDvdControl * This); + + +void __RPC_STUB IDvdControl_StopForResume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_GoUp_Proxy( + IDvdControl * This); + + +void __RPC_STUB IDvdControl_GoUp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_TimeSearch_Proxy( + IDvdControl * This, + /* [in] */ ULONG bcdTime); + + +void __RPC_STUB IDvdControl_TimeSearch_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_ChapterSearch_Proxy( + IDvdControl * This, + /* [in] */ ULONG ulChapter); + + +void __RPC_STUB IDvdControl_ChapterSearch_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_PrevPGSearch_Proxy( + IDvdControl * This); + + +void __RPC_STUB IDvdControl_PrevPGSearch_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_TopPGSearch_Proxy( + IDvdControl * This); + + +void __RPC_STUB IDvdControl_TopPGSearch_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_NextPGSearch_Proxy( + IDvdControl * This); + + +void __RPC_STUB IDvdControl_NextPGSearch_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_ForwardScan_Proxy( + IDvdControl * This, + /* [in] */ double dwSpeed); + + +void __RPC_STUB IDvdControl_ForwardScan_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_BackwardScan_Proxy( + IDvdControl * This, + /* [in] */ double dwSpeed); + + +void __RPC_STUB IDvdControl_BackwardScan_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_MenuCall_Proxy( + IDvdControl * This, + /* [in] */ DVD_MENU_ID MenuID); + + +void __RPC_STUB IDvdControl_MenuCall_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_Resume_Proxy( + IDvdControl * This); + + +void __RPC_STUB IDvdControl_Resume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_UpperButtonSelect_Proxy( + IDvdControl * This); + + +void __RPC_STUB IDvdControl_UpperButtonSelect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_LowerButtonSelect_Proxy( + IDvdControl * This); + + +void __RPC_STUB IDvdControl_LowerButtonSelect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_LeftButtonSelect_Proxy( + IDvdControl * This); + + +void __RPC_STUB IDvdControl_LeftButtonSelect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_RightButtonSelect_Proxy( + IDvdControl * This); + + +void __RPC_STUB IDvdControl_RightButtonSelect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_ButtonActivate_Proxy( + IDvdControl * This); + + +void __RPC_STUB IDvdControl_ButtonActivate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_ButtonSelectAndActivate_Proxy( + IDvdControl * This, + /* [in] */ ULONG ulButton); + + +void __RPC_STUB IDvdControl_ButtonSelectAndActivate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_StillOff_Proxy( + IDvdControl * This); + + +void __RPC_STUB IDvdControl_StillOff_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_PauseOn_Proxy( + IDvdControl * This); + + +void __RPC_STUB IDvdControl_PauseOn_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_PauseOff_Proxy( + IDvdControl * This); + + +void __RPC_STUB IDvdControl_PauseOff_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_MenuLanguageSelect_Proxy( + IDvdControl * This, + /* [in] */ LCID Language); + + +void __RPC_STUB IDvdControl_MenuLanguageSelect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_AudioStreamChange_Proxy( + IDvdControl * This, + /* [in] */ ULONG ulAudio); + + +void __RPC_STUB IDvdControl_AudioStreamChange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_SubpictureStreamChange_Proxy( + IDvdControl * This, + /* [in] */ ULONG ulSubPicture, + /* [in] */ BOOL bDisplay); + + +void __RPC_STUB IDvdControl_SubpictureStreamChange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_AngleChange_Proxy( + IDvdControl * This, + /* [in] */ ULONG ulAngle); + + +void __RPC_STUB IDvdControl_AngleChange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_ParentalLevelSelect_Proxy( + IDvdControl * This, + /* [in] */ ULONG ulParentalLevel); + + +void __RPC_STUB IDvdControl_ParentalLevelSelect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_ParentalCountrySelect_Proxy( + IDvdControl * This, + /* [in] */ WORD wCountry); + + +void __RPC_STUB IDvdControl_ParentalCountrySelect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_KaraokeAudioPresentationModeChange_Proxy( + IDvdControl * This, + /* [in] */ ULONG ulMode); + + +void __RPC_STUB IDvdControl_KaraokeAudioPresentationModeChange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_VideoModePreferrence_Proxy( + IDvdControl * This, + /* [in] */ ULONG ulPreferredDisplayMode); + + +void __RPC_STUB IDvdControl_VideoModePreferrence_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_SetRoot_Proxy( + IDvdControl * This, + /* [in] */ LPCWSTR pszPath); + + +void __RPC_STUB IDvdControl_SetRoot_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_MouseActivate_Proxy( + IDvdControl * This, + /* [in] */ POINT point); + + +void __RPC_STUB IDvdControl_MouseActivate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_MouseSelect_Proxy( + IDvdControl * This, + /* [in] */ POINT point); + + +void __RPC_STUB IDvdControl_MouseSelect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl_ChapterPlayAutoStop_Proxy( + IDvdControl * This, + /* [in] */ ULONG ulTitle, + /* [in] */ ULONG ulChapter, + /* [in] */ ULONG ulChaptersToPlay); + + +void __RPC_STUB IDvdControl_ChapterPlayAutoStop_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDvdControl_INTERFACE_DEFINED__ */ + + +#ifndef __IDvdInfo_INTERFACE_DEFINED__ +#define __IDvdInfo_INTERFACE_DEFINED__ + +/* interface IDvdInfo */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IDvdInfo; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("A70EFE60-E2A3-11d0-A9BE-00AA0061BE93") + IDvdInfo : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetCurrentDomain( + /* [out] */ DVD_DOMAIN *pDomain) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentLocation( + /* [out] */ DVD_PLAYBACK_LOCATION *pLocation) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTotalTitleTime( + /* [out] */ ULONG *pulTotalTime) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentButton( + /* [out] */ ULONG *pulButtonsAvailable, + /* [out] */ ULONG *pulCurrentButton) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentAngle( + /* [out] */ ULONG *pulAnglesAvailable, + /* [out] */ ULONG *pulCurrentAngle) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentAudio( + /* [out] */ ULONG *pulStreamsAvailable, + /* [out] */ ULONG *pulCurrentStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentSubpicture( + /* [out] */ ULONG *pulStreamsAvailable, + /* [out] */ ULONG *pulCurrentStream, + /* [out] */ BOOL *pIsDisabled) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentUOPS( + /* [out] */ VALID_UOP_SOMTHING_OR_OTHER *pUOP) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAllSPRMs( + /* [out] */ SPRMARRAY *pRegisterArray) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAllGPRMs( + /* [out] */ GPRMARRAY *pRegisterArray) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAudioLanguage( + /* [in] */ ULONG ulStream, + /* [out] */ LCID *pLanguage) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSubpictureLanguage( + /* [in] */ ULONG ulStream, + /* [out] */ LCID *pLanguage) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTitleAttributes( + /* [in] */ ULONG ulTitle, + /* [out] */ DVD_ATR *pATR) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVMGAttributes( + /* [out] */ DVD_ATR *pATR) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentVideoAttributes( + /* [out] */ DVD_VideoATR *pATR) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentAudioAttributes( + /* [out] */ DVD_AudioATR *pATR) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentSubpictureAttributes( + /* [out] */ DVD_SubpictureATR *pATR) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentVolumeInfo( + /* [out] */ ULONG *pulNumOfVol, + /* [out] */ ULONG *pulThisVolNum, + /* [out] */ DVD_DISC_SIDE *pSide, + /* [out] */ ULONG *pulNumOfTitles) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDVDTextInfo( + /* [size_is][out] */ BYTE *pTextManager, + /* [in] */ ULONG ulBufSize, + /* [out] */ ULONG *pulActualSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPlayerParentalLevel( + /* [out] */ ULONG *pulParentalLevel, + /* [out] */ ULONG *pulCountryCode) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetNumberOfChapters( + /* [in] */ ULONG ulTitle, + /* [out] */ ULONG *pulNumberOfChapters) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTitleParentalLevels( + /* [in] */ ULONG ulTitle, + /* [out] */ ULONG *pulParentalLevels) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetRoot( + /* [size_is][out] */ LPSTR pRoot, + /* [in] */ ULONG ulBufSize, + /* [out] */ ULONG *pulActualSize) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDvdInfoVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDvdInfo * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDvdInfo * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDvdInfo * This); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentDomain )( + IDvdInfo * This, + /* [out] */ DVD_DOMAIN *pDomain); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentLocation )( + IDvdInfo * This, + /* [out] */ DVD_PLAYBACK_LOCATION *pLocation); + + HRESULT ( STDMETHODCALLTYPE *GetTotalTitleTime )( + IDvdInfo * This, + /* [out] */ ULONG *pulTotalTime); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentButton )( + IDvdInfo * This, + /* [out] */ ULONG *pulButtonsAvailable, + /* [out] */ ULONG *pulCurrentButton); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentAngle )( + IDvdInfo * This, + /* [out] */ ULONG *pulAnglesAvailable, + /* [out] */ ULONG *pulCurrentAngle); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentAudio )( + IDvdInfo * This, + /* [out] */ ULONG *pulStreamsAvailable, + /* [out] */ ULONG *pulCurrentStream); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentSubpicture )( + IDvdInfo * This, + /* [out] */ ULONG *pulStreamsAvailable, + /* [out] */ ULONG *pulCurrentStream, + /* [out] */ BOOL *pIsDisabled); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentUOPS )( + IDvdInfo * This, + /* [out] */ VALID_UOP_SOMTHING_OR_OTHER *pUOP); + + HRESULT ( STDMETHODCALLTYPE *GetAllSPRMs )( + IDvdInfo * This, + /* [out] */ SPRMARRAY *pRegisterArray); + + HRESULT ( STDMETHODCALLTYPE *GetAllGPRMs )( + IDvdInfo * This, + /* [out] */ GPRMARRAY *pRegisterArray); + + HRESULT ( STDMETHODCALLTYPE *GetAudioLanguage )( + IDvdInfo * This, + /* [in] */ ULONG ulStream, + /* [out] */ LCID *pLanguage); + + HRESULT ( STDMETHODCALLTYPE *GetSubpictureLanguage )( + IDvdInfo * This, + /* [in] */ ULONG ulStream, + /* [out] */ LCID *pLanguage); + + HRESULT ( STDMETHODCALLTYPE *GetTitleAttributes )( + IDvdInfo * This, + /* [in] */ ULONG ulTitle, + /* [out] */ DVD_ATR *pATR); + + HRESULT ( STDMETHODCALLTYPE *GetVMGAttributes )( + IDvdInfo * This, + /* [out] */ DVD_ATR *pATR); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentVideoAttributes )( + IDvdInfo * This, + /* [out] */ DVD_VideoATR *pATR); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentAudioAttributes )( + IDvdInfo * This, + /* [out] */ DVD_AudioATR *pATR); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentSubpictureAttributes )( + IDvdInfo * This, + /* [out] */ DVD_SubpictureATR *pATR); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentVolumeInfo )( + IDvdInfo * This, + /* [out] */ ULONG *pulNumOfVol, + /* [out] */ ULONG *pulThisVolNum, + /* [out] */ DVD_DISC_SIDE *pSide, + /* [out] */ ULONG *pulNumOfTitles); + + HRESULT ( STDMETHODCALLTYPE *GetDVDTextInfo )( + IDvdInfo * This, + /* [size_is][out] */ BYTE *pTextManager, + /* [in] */ ULONG ulBufSize, + /* [out] */ ULONG *pulActualSize); + + HRESULT ( STDMETHODCALLTYPE *GetPlayerParentalLevel )( + IDvdInfo * This, + /* [out] */ ULONG *pulParentalLevel, + /* [out] */ ULONG *pulCountryCode); + + HRESULT ( STDMETHODCALLTYPE *GetNumberOfChapters )( + IDvdInfo * This, + /* [in] */ ULONG ulTitle, + /* [out] */ ULONG *pulNumberOfChapters); + + HRESULT ( STDMETHODCALLTYPE *GetTitleParentalLevels )( + IDvdInfo * This, + /* [in] */ ULONG ulTitle, + /* [out] */ ULONG *pulParentalLevels); + + HRESULT ( STDMETHODCALLTYPE *GetRoot )( + IDvdInfo * This, + /* [size_is][out] */ LPSTR pRoot, + /* [in] */ ULONG ulBufSize, + /* [out] */ ULONG *pulActualSize); + + END_INTERFACE + } IDvdInfoVtbl; + + interface IDvdInfo + { + CONST_VTBL struct IDvdInfoVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDvdInfo_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDvdInfo_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDvdInfo_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDvdInfo_GetCurrentDomain(This,pDomain) \ + (This)->lpVtbl -> GetCurrentDomain(This,pDomain) + +#define IDvdInfo_GetCurrentLocation(This,pLocation) \ + (This)->lpVtbl -> GetCurrentLocation(This,pLocation) + +#define IDvdInfo_GetTotalTitleTime(This,pulTotalTime) \ + (This)->lpVtbl -> GetTotalTitleTime(This,pulTotalTime) + +#define IDvdInfo_GetCurrentButton(This,pulButtonsAvailable,pulCurrentButton) \ + (This)->lpVtbl -> GetCurrentButton(This,pulButtonsAvailable,pulCurrentButton) + +#define IDvdInfo_GetCurrentAngle(This,pulAnglesAvailable,pulCurrentAngle) \ + (This)->lpVtbl -> GetCurrentAngle(This,pulAnglesAvailable,pulCurrentAngle) + +#define IDvdInfo_GetCurrentAudio(This,pulStreamsAvailable,pulCurrentStream) \ + (This)->lpVtbl -> GetCurrentAudio(This,pulStreamsAvailable,pulCurrentStream) + +#define IDvdInfo_GetCurrentSubpicture(This,pulStreamsAvailable,pulCurrentStream,pIsDisabled) \ + (This)->lpVtbl -> GetCurrentSubpicture(This,pulStreamsAvailable,pulCurrentStream,pIsDisabled) + +#define IDvdInfo_GetCurrentUOPS(This,pUOP) \ + (This)->lpVtbl -> GetCurrentUOPS(This,pUOP) + +#define IDvdInfo_GetAllSPRMs(This,pRegisterArray) \ + (This)->lpVtbl -> GetAllSPRMs(This,pRegisterArray) + +#define IDvdInfo_GetAllGPRMs(This,pRegisterArray) \ + (This)->lpVtbl -> GetAllGPRMs(This,pRegisterArray) + +#define IDvdInfo_GetAudioLanguage(This,ulStream,pLanguage) \ + (This)->lpVtbl -> GetAudioLanguage(This,ulStream,pLanguage) + +#define IDvdInfo_GetSubpictureLanguage(This,ulStream,pLanguage) \ + (This)->lpVtbl -> GetSubpictureLanguage(This,ulStream,pLanguage) + +#define IDvdInfo_GetTitleAttributes(This,ulTitle,pATR) \ + (This)->lpVtbl -> GetTitleAttributes(This,ulTitle,pATR) + +#define IDvdInfo_GetVMGAttributes(This,pATR) \ + (This)->lpVtbl -> GetVMGAttributes(This,pATR) + +#define IDvdInfo_GetCurrentVideoAttributes(This,pATR) \ + (This)->lpVtbl -> GetCurrentVideoAttributes(This,pATR) + +#define IDvdInfo_GetCurrentAudioAttributes(This,pATR) \ + (This)->lpVtbl -> GetCurrentAudioAttributes(This,pATR) + +#define IDvdInfo_GetCurrentSubpictureAttributes(This,pATR) \ + (This)->lpVtbl -> GetCurrentSubpictureAttributes(This,pATR) + +#define IDvdInfo_GetCurrentVolumeInfo(This,pulNumOfVol,pulThisVolNum,pSide,pulNumOfTitles) \ + (This)->lpVtbl -> GetCurrentVolumeInfo(This,pulNumOfVol,pulThisVolNum,pSide,pulNumOfTitles) + +#define IDvdInfo_GetDVDTextInfo(This,pTextManager,ulBufSize,pulActualSize) \ + (This)->lpVtbl -> GetDVDTextInfo(This,pTextManager,ulBufSize,pulActualSize) + +#define IDvdInfo_GetPlayerParentalLevel(This,pulParentalLevel,pulCountryCode) \ + (This)->lpVtbl -> GetPlayerParentalLevel(This,pulParentalLevel,pulCountryCode) + +#define IDvdInfo_GetNumberOfChapters(This,ulTitle,pulNumberOfChapters) \ + (This)->lpVtbl -> GetNumberOfChapters(This,ulTitle,pulNumberOfChapters) + +#define IDvdInfo_GetTitleParentalLevels(This,ulTitle,pulParentalLevels) \ + (This)->lpVtbl -> GetTitleParentalLevels(This,ulTitle,pulParentalLevels) + +#define IDvdInfo_GetRoot(This,pRoot,ulBufSize,pulActualSize) \ + (This)->lpVtbl -> GetRoot(This,pRoot,ulBufSize,pulActualSize) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetCurrentDomain_Proxy( + IDvdInfo * This, + /* [out] */ DVD_DOMAIN *pDomain); + + +void __RPC_STUB IDvdInfo_GetCurrentDomain_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetCurrentLocation_Proxy( + IDvdInfo * This, + /* [out] */ DVD_PLAYBACK_LOCATION *pLocation); + + +void __RPC_STUB IDvdInfo_GetCurrentLocation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetTotalTitleTime_Proxy( + IDvdInfo * This, + /* [out] */ ULONG *pulTotalTime); + + +void __RPC_STUB IDvdInfo_GetTotalTitleTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetCurrentButton_Proxy( + IDvdInfo * This, + /* [out] */ ULONG *pulButtonsAvailable, + /* [out] */ ULONG *pulCurrentButton); + + +void __RPC_STUB IDvdInfo_GetCurrentButton_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetCurrentAngle_Proxy( + IDvdInfo * This, + /* [out] */ ULONG *pulAnglesAvailable, + /* [out] */ ULONG *pulCurrentAngle); + + +void __RPC_STUB IDvdInfo_GetCurrentAngle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetCurrentAudio_Proxy( + IDvdInfo * This, + /* [out] */ ULONG *pulStreamsAvailable, + /* [out] */ ULONG *pulCurrentStream); + + +void __RPC_STUB IDvdInfo_GetCurrentAudio_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetCurrentSubpicture_Proxy( + IDvdInfo * This, + /* [out] */ ULONG *pulStreamsAvailable, + /* [out] */ ULONG *pulCurrentStream, + /* [out] */ BOOL *pIsDisabled); + + +void __RPC_STUB IDvdInfo_GetCurrentSubpicture_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetCurrentUOPS_Proxy( + IDvdInfo * This, + /* [out] */ VALID_UOP_SOMTHING_OR_OTHER *pUOP); + + +void __RPC_STUB IDvdInfo_GetCurrentUOPS_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetAllSPRMs_Proxy( + IDvdInfo * This, + /* [out] */ SPRMARRAY *pRegisterArray); + + +void __RPC_STUB IDvdInfo_GetAllSPRMs_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetAllGPRMs_Proxy( + IDvdInfo * This, + /* [out] */ GPRMARRAY *pRegisterArray); + + +void __RPC_STUB IDvdInfo_GetAllGPRMs_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetAudioLanguage_Proxy( + IDvdInfo * This, + /* [in] */ ULONG ulStream, + /* [out] */ LCID *pLanguage); + + +void __RPC_STUB IDvdInfo_GetAudioLanguage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetSubpictureLanguage_Proxy( + IDvdInfo * This, + /* [in] */ ULONG ulStream, + /* [out] */ LCID *pLanguage); + + +void __RPC_STUB IDvdInfo_GetSubpictureLanguage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetTitleAttributes_Proxy( + IDvdInfo * This, + /* [in] */ ULONG ulTitle, + /* [out] */ DVD_ATR *pATR); + + +void __RPC_STUB IDvdInfo_GetTitleAttributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetVMGAttributes_Proxy( + IDvdInfo * This, + /* [out] */ DVD_ATR *pATR); + + +void __RPC_STUB IDvdInfo_GetVMGAttributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetCurrentVideoAttributes_Proxy( + IDvdInfo * This, + /* [out] */ DVD_VideoATR *pATR); + + +void __RPC_STUB IDvdInfo_GetCurrentVideoAttributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetCurrentAudioAttributes_Proxy( + IDvdInfo * This, + /* [out] */ DVD_AudioATR *pATR); + + +void __RPC_STUB IDvdInfo_GetCurrentAudioAttributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetCurrentSubpictureAttributes_Proxy( + IDvdInfo * This, + /* [out] */ DVD_SubpictureATR *pATR); + + +void __RPC_STUB IDvdInfo_GetCurrentSubpictureAttributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetCurrentVolumeInfo_Proxy( + IDvdInfo * This, + /* [out] */ ULONG *pulNumOfVol, + /* [out] */ ULONG *pulThisVolNum, + /* [out] */ DVD_DISC_SIDE *pSide, + /* [out] */ ULONG *pulNumOfTitles); + + +void __RPC_STUB IDvdInfo_GetCurrentVolumeInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetDVDTextInfo_Proxy( + IDvdInfo * This, + /* [size_is][out] */ BYTE *pTextManager, + /* [in] */ ULONG ulBufSize, + /* [out] */ ULONG *pulActualSize); + + +void __RPC_STUB IDvdInfo_GetDVDTextInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetPlayerParentalLevel_Proxy( + IDvdInfo * This, + /* [out] */ ULONG *pulParentalLevel, + /* [out] */ ULONG *pulCountryCode); + + +void __RPC_STUB IDvdInfo_GetPlayerParentalLevel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetNumberOfChapters_Proxy( + IDvdInfo * This, + /* [in] */ ULONG ulTitle, + /* [out] */ ULONG *pulNumberOfChapters); + + +void __RPC_STUB IDvdInfo_GetNumberOfChapters_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetTitleParentalLevels_Proxy( + IDvdInfo * This, + /* [in] */ ULONG ulTitle, + /* [out] */ ULONG *pulParentalLevels); + + +void __RPC_STUB IDvdInfo_GetTitleParentalLevels_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo_GetRoot_Proxy( + IDvdInfo * This, + /* [size_is][out] */ LPSTR pRoot, + /* [in] */ ULONG ulBufSize, + /* [out] */ ULONG *pulActualSize); + + +void __RPC_STUB IDvdInfo_GetRoot_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDvdInfo_INTERFACE_DEFINED__ */ + + +#ifndef __IDvdCmd_INTERFACE_DEFINED__ +#define __IDvdCmd_INTERFACE_DEFINED__ + +/* interface IDvdCmd */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IDvdCmd; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("5a4a97e4-94ee-4a55-9751-74b5643aa27d") + IDvdCmd : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE WaitForStart( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE WaitForEnd( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDvdCmdVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDvdCmd * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDvdCmd * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDvdCmd * This); + + HRESULT ( STDMETHODCALLTYPE *WaitForStart )( + IDvdCmd * This); + + HRESULT ( STDMETHODCALLTYPE *WaitForEnd )( + IDvdCmd * This); + + END_INTERFACE + } IDvdCmdVtbl; + + interface IDvdCmd + { + CONST_VTBL struct IDvdCmdVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDvdCmd_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDvdCmd_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDvdCmd_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDvdCmd_WaitForStart(This) \ + (This)->lpVtbl -> WaitForStart(This) + +#define IDvdCmd_WaitForEnd(This) \ + (This)->lpVtbl -> WaitForEnd(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDvdCmd_WaitForStart_Proxy( + IDvdCmd * This); + + +void __RPC_STUB IDvdCmd_WaitForStart_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdCmd_WaitForEnd_Proxy( + IDvdCmd * This); + + +void __RPC_STUB IDvdCmd_WaitForEnd_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDvdCmd_INTERFACE_DEFINED__ */ + + +#ifndef __IDvdState_INTERFACE_DEFINED__ +#define __IDvdState_INTERFACE_DEFINED__ + +/* interface IDvdState */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IDvdState; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("86303d6d-1c4a-4087-ab42-f711167048ef") + IDvdState : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetDiscID( + /* [out] */ ULONGLONG *pullUniqueID) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetParentalLevel( + /* [out] */ ULONG *pulParentalLevel) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDvdStateVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDvdState * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDvdState * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDvdState * This); + + HRESULT ( STDMETHODCALLTYPE *GetDiscID )( + IDvdState * This, + /* [out] */ ULONGLONG *pullUniqueID); + + HRESULT ( STDMETHODCALLTYPE *GetParentalLevel )( + IDvdState * This, + /* [out] */ ULONG *pulParentalLevel); + + END_INTERFACE + } IDvdStateVtbl; + + interface IDvdState + { + CONST_VTBL struct IDvdStateVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDvdState_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDvdState_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDvdState_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDvdState_GetDiscID(This,pullUniqueID) \ + (This)->lpVtbl -> GetDiscID(This,pullUniqueID) + +#define IDvdState_GetParentalLevel(This,pulParentalLevel) \ + (This)->lpVtbl -> GetParentalLevel(This,pulParentalLevel) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDvdState_GetDiscID_Proxy( + IDvdState * This, + /* [out] */ ULONGLONG *pullUniqueID); + + +void __RPC_STUB IDvdState_GetDiscID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdState_GetParentalLevel_Proxy( + IDvdState * This, + /* [out] */ ULONG *pulParentalLevel); + + +void __RPC_STUB IDvdState_GetParentalLevel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDvdState_INTERFACE_DEFINED__ */ + + +#ifndef __IDvdControl2_INTERFACE_DEFINED__ +#define __IDvdControl2_INTERFACE_DEFINED__ + +/* interface IDvdControl2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IDvdControl2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("33BC7430-EEC0-11D2-8201-00A0C9D74842") + IDvdControl2 : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE PlayTitle( + /* [in] */ ULONG ulTitle, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE PlayChapterInTitle( + /* [in] */ ULONG ulTitle, + /* [in] */ ULONG ulChapter, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE PlayAtTimeInTitle( + /* [in] */ ULONG ulTitle, + /* [in] */ DVD_HMSF_TIMECODE *pStartTime, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE Stop( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReturnFromSubmenu( + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE PlayAtTime( + /* [in] */ DVD_HMSF_TIMECODE *pTime, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE PlayChapter( + /* [in] */ ULONG ulChapter, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE PlayPrevChapter( + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReplayChapter( + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE PlayNextChapter( + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE PlayForwards( + /* [in] */ double dSpeed, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE PlayBackwards( + /* [in] */ double dSpeed, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE ShowMenu( + /* [in] */ DVD_MENU_ID MenuID, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE Resume( + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectRelativeButton( + DVD_RELATIVE_BUTTON buttonDir) = 0; + + virtual HRESULT STDMETHODCALLTYPE ActivateButton( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectButton( + /* [in] */ ULONG ulButton) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectAndActivateButton( + /* [in] */ ULONG ulButton) = 0; + + virtual HRESULT STDMETHODCALLTYPE StillOff( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Pause( + /* [in] */ BOOL bState) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectAudioStream( + /* [in] */ ULONG ulAudio, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectSubpictureStream( + /* [in] */ ULONG ulSubPicture, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetSubpictureState( + /* [in] */ BOOL bState, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectAngle( + /* [in] */ ULONG ulAngle, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectParentalLevel( + /* [in] */ ULONG ulParentalLevel) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectParentalCountry( + /* [in] */ BYTE bCountry[ 2 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectKaraokeAudioPresentationMode( + /* [in] */ ULONG ulMode) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectVideoModePreference( + /* [in] */ ULONG ulPreferredDisplayMode) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDVDDirectory( + /* [in] */ LPCWSTR pszwPath) = 0; + + virtual HRESULT STDMETHODCALLTYPE ActivateAtPosition( + /* [in] */ POINT point) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectAtPosition( + /* [in] */ POINT point) = 0; + + virtual HRESULT STDMETHODCALLTYPE PlayChaptersAutoStop( + /* [in] */ ULONG ulTitle, + /* [in] */ ULONG ulChapter, + /* [in] */ ULONG ulChaptersToPlay, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE AcceptParentalLevelChange( + /* [in] */ BOOL bAccept) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetOption( + /* [in] */ DVD_OPTION_FLAG flag, + /* [in] */ BOOL fState) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetState( + /* [in] */ IDvdState *pState, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE PlayPeriodInTitleAutoStop( + /* [in] */ ULONG ulTitle, + /* [in] */ DVD_HMSF_TIMECODE *pStartTime, + /* [in] */ DVD_HMSF_TIMECODE *pEndTime, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetGPRM( + /* [in] */ ULONG ulIndex, + /* [in] */ WORD wValue, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectDefaultMenuLanguage( + /* [in] */ LCID Language) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectDefaultAudioLanguage( + /* [in] */ LCID Language, + /* [in] */ DVD_AUDIO_LANG_EXT audioExtension) = 0; + + virtual HRESULT STDMETHODCALLTYPE SelectDefaultSubpictureLanguage( + /* [in] */ LCID Language, + /* [in] */ DVD_SUBPICTURE_LANG_EXT subpictureExtension) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDvdControl2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDvdControl2 * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDvdControl2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDvdControl2 * This); + + HRESULT ( STDMETHODCALLTYPE *PlayTitle )( + IDvdControl2 * This, + /* [in] */ ULONG ulTitle, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *PlayChapterInTitle )( + IDvdControl2 * This, + /* [in] */ ULONG ulTitle, + /* [in] */ ULONG ulChapter, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *PlayAtTimeInTitle )( + IDvdControl2 * This, + /* [in] */ ULONG ulTitle, + /* [in] */ DVD_HMSF_TIMECODE *pStartTime, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *Stop )( + IDvdControl2 * This); + + HRESULT ( STDMETHODCALLTYPE *ReturnFromSubmenu )( + IDvdControl2 * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *PlayAtTime )( + IDvdControl2 * This, + /* [in] */ DVD_HMSF_TIMECODE *pTime, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *PlayChapter )( + IDvdControl2 * This, + /* [in] */ ULONG ulChapter, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *PlayPrevChapter )( + IDvdControl2 * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *ReplayChapter )( + IDvdControl2 * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *PlayNextChapter )( + IDvdControl2 * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *PlayForwards )( + IDvdControl2 * This, + /* [in] */ double dSpeed, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *PlayBackwards )( + IDvdControl2 * This, + /* [in] */ double dSpeed, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *ShowMenu )( + IDvdControl2 * This, + /* [in] */ DVD_MENU_ID MenuID, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *Resume )( + IDvdControl2 * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *SelectRelativeButton )( + IDvdControl2 * This, + DVD_RELATIVE_BUTTON buttonDir); + + HRESULT ( STDMETHODCALLTYPE *ActivateButton )( + IDvdControl2 * This); + + HRESULT ( STDMETHODCALLTYPE *SelectButton )( + IDvdControl2 * This, + /* [in] */ ULONG ulButton); + + HRESULT ( STDMETHODCALLTYPE *SelectAndActivateButton )( + IDvdControl2 * This, + /* [in] */ ULONG ulButton); + + HRESULT ( STDMETHODCALLTYPE *StillOff )( + IDvdControl2 * This); + + HRESULT ( STDMETHODCALLTYPE *Pause )( + IDvdControl2 * This, + /* [in] */ BOOL bState); + + HRESULT ( STDMETHODCALLTYPE *SelectAudioStream )( + IDvdControl2 * This, + /* [in] */ ULONG ulAudio, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *SelectSubpictureStream )( + IDvdControl2 * This, + /* [in] */ ULONG ulSubPicture, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *SetSubpictureState )( + IDvdControl2 * This, + /* [in] */ BOOL bState, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *SelectAngle )( + IDvdControl2 * This, + /* [in] */ ULONG ulAngle, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *SelectParentalLevel )( + IDvdControl2 * This, + /* [in] */ ULONG ulParentalLevel); + + HRESULT ( STDMETHODCALLTYPE *SelectParentalCountry )( + IDvdControl2 * This, + /* [in] */ BYTE bCountry[ 2 ]); + + HRESULT ( STDMETHODCALLTYPE *SelectKaraokeAudioPresentationMode )( + IDvdControl2 * This, + /* [in] */ ULONG ulMode); + + HRESULT ( STDMETHODCALLTYPE *SelectVideoModePreference )( + IDvdControl2 * This, + /* [in] */ ULONG ulPreferredDisplayMode); + + HRESULT ( STDMETHODCALLTYPE *SetDVDDirectory )( + IDvdControl2 * This, + /* [in] */ LPCWSTR pszwPath); + + HRESULT ( STDMETHODCALLTYPE *ActivateAtPosition )( + IDvdControl2 * This, + /* [in] */ POINT point); + + HRESULT ( STDMETHODCALLTYPE *SelectAtPosition )( + IDvdControl2 * This, + /* [in] */ POINT point); + + HRESULT ( STDMETHODCALLTYPE *PlayChaptersAutoStop )( + IDvdControl2 * This, + /* [in] */ ULONG ulTitle, + /* [in] */ ULONG ulChapter, + /* [in] */ ULONG ulChaptersToPlay, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *AcceptParentalLevelChange )( + IDvdControl2 * This, + /* [in] */ BOOL bAccept); + + HRESULT ( STDMETHODCALLTYPE *SetOption )( + IDvdControl2 * This, + /* [in] */ DVD_OPTION_FLAG flag, + /* [in] */ BOOL fState); + + HRESULT ( STDMETHODCALLTYPE *SetState )( + IDvdControl2 * This, + /* [in] */ IDvdState *pState, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *PlayPeriodInTitleAutoStop )( + IDvdControl2 * This, + /* [in] */ ULONG ulTitle, + /* [in] */ DVD_HMSF_TIMECODE *pStartTime, + /* [in] */ DVD_HMSF_TIMECODE *pEndTime, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *SetGPRM )( + IDvdControl2 * This, + /* [in] */ ULONG ulIndex, + /* [in] */ WORD wValue, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + HRESULT ( STDMETHODCALLTYPE *SelectDefaultMenuLanguage )( + IDvdControl2 * This, + /* [in] */ LCID Language); + + HRESULT ( STDMETHODCALLTYPE *SelectDefaultAudioLanguage )( + IDvdControl2 * This, + /* [in] */ LCID Language, + /* [in] */ DVD_AUDIO_LANG_EXT audioExtension); + + HRESULT ( STDMETHODCALLTYPE *SelectDefaultSubpictureLanguage )( + IDvdControl2 * This, + /* [in] */ LCID Language, + /* [in] */ DVD_SUBPICTURE_LANG_EXT subpictureExtension); + + END_INTERFACE + } IDvdControl2Vtbl; + + interface IDvdControl2 + { + CONST_VTBL struct IDvdControl2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDvdControl2_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDvdControl2_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDvdControl2_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDvdControl2_PlayTitle(This,ulTitle,dwFlags,ppCmd) \ + (This)->lpVtbl -> PlayTitle(This,ulTitle,dwFlags,ppCmd) + +#define IDvdControl2_PlayChapterInTitle(This,ulTitle,ulChapter,dwFlags,ppCmd) \ + (This)->lpVtbl -> PlayChapterInTitle(This,ulTitle,ulChapter,dwFlags,ppCmd) + +#define IDvdControl2_PlayAtTimeInTitle(This,ulTitle,pStartTime,dwFlags,ppCmd) \ + (This)->lpVtbl -> PlayAtTimeInTitle(This,ulTitle,pStartTime,dwFlags,ppCmd) + +#define IDvdControl2_Stop(This) \ + (This)->lpVtbl -> Stop(This) + +#define IDvdControl2_ReturnFromSubmenu(This,dwFlags,ppCmd) \ + (This)->lpVtbl -> ReturnFromSubmenu(This,dwFlags,ppCmd) + +#define IDvdControl2_PlayAtTime(This,pTime,dwFlags,ppCmd) \ + (This)->lpVtbl -> PlayAtTime(This,pTime,dwFlags,ppCmd) + +#define IDvdControl2_PlayChapter(This,ulChapter,dwFlags,ppCmd) \ + (This)->lpVtbl -> PlayChapter(This,ulChapter,dwFlags,ppCmd) + +#define IDvdControl2_PlayPrevChapter(This,dwFlags,ppCmd) \ + (This)->lpVtbl -> PlayPrevChapter(This,dwFlags,ppCmd) + +#define IDvdControl2_ReplayChapter(This,dwFlags,ppCmd) \ + (This)->lpVtbl -> ReplayChapter(This,dwFlags,ppCmd) + +#define IDvdControl2_PlayNextChapter(This,dwFlags,ppCmd) \ + (This)->lpVtbl -> PlayNextChapter(This,dwFlags,ppCmd) + +#define IDvdControl2_PlayForwards(This,dSpeed,dwFlags,ppCmd) \ + (This)->lpVtbl -> PlayForwards(This,dSpeed,dwFlags,ppCmd) + +#define IDvdControl2_PlayBackwards(This,dSpeed,dwFlags,ppCmd) \ + (This)->lpVtbl -> PlayBackwards(This,dSpeed,dwFlags,ppCmd) + +#define IDvdControl2_ShowMenu(This,MenuID,dwFlags,ppCmd) \ + (This)->lpVtbl -> ShowMenu(This,MenuID,dwFlags,ppCmd) + +#define IDvdControl2_Resume(This,dwFlags,ppCmd) \ + (This)->lpVtbl -> Resume(This,dwFlags,ppCmd) + +#define IDvdControl2_SelectRelativeButton(This,buttonDir) \ + (This)->lpVtbl -> SelectRelativeButton(This,buttonDir) + +#define IDvdControl2_ActivateButton(This) \ + (This)->lpVtbl -> ActivateButton(This) + +#define IDvdControl2_SelectButton(This,ulButton) \ + (This)->lpVtbl -> SelectButton(This,ulButton) + +#define IDvdControl2_SelectAndActivateButton(This,ulButton) \ + (This)->lpVtbl -> SelectAndActivateButton(This,ulButton) + +#define IDvdControl2_StillOff(This) \ + (This)->lpVtbl -> StillOff(This) + +#define IDvdControl2_Pause(This,bState) \ + (This)->lpVtbl -> Pause(This,bState) + +#define IDvdControl2_SelectAudioStream(This,ulAudio,dwFlags,ppCmd) \ + (This)->lpVtbl -> SelectAudioStream(This,ulAudio,dwFlags,ppCmd) + +#define IDvdControl2_SelectSubpictureStream(This,ulSubPicture,dwFlags,ppCmd) \ + (This)->lpVtbl -> SelectSubpictureStream(This,ulSubPicture,dwFlags,ppCmd) + +#define IDvdControl2_SetSubpictureState(This,bState,dwFlags,ppCmd) \ + (This)->lpVtbl -> SetSubpictureState(This,bState,dwFlags,ppCmd) + +#define IDvdControl2_SelectAngle(This,ulAngle,dwFlags,ppCmd) \ + (This)->lpVtbl -> SelectAngle(This,ulAngle,dwFlags,ppCmd) + +#define IDvdControl2_SelectParentalLevel(This,ulParentalLevel) \ + (This)->lpVtbl -> SelectParentalLevel(This,ulParentalLevel) + +#define IDvdControl2_SelectParentalCountry(This,bCountry) \ + (This)->lpVtbl -> SelectParentalCountry(This,bCountry) + +#define IDvdControl2_SelectKaraokeAudioPresentationMode(This,ulMode) \ + (This)->lpVtbl -> SelectKaraokeAudioPresentationMode(This,ulMode) + +#define IDvdControl2_SelectVideoModePreference(This,ulPreferredDisplayMode) \ + (This)->lpVtbl -> SelectVideoModePreference(This,ulPreferredDisplayMode) + +#define IDvdControl2_SetDVDDirectory(This,pszwPath) \ + (This)->lpVtbl -> SetDVDDirectory(This,pszwPath) + +#define IDvdControl2_ActivateAtPosition(This,point) \ + (This)->lpVtbl -> ActivateAtPosition(This,point) + +#define IDvdControl2_SelectAtPosition(This,point) \ + (This)->lpVtbl -> SelectAtPosition(This,point) + +#define IDvdControl2_PlayChaptersAutoStop(This,ulTitle,ulChapter,ulChaptersToPlay,dwFlags,ppCmd) \ + (This)->lpVtbl -> PlayChaptersAutoStop(This,ulTitle,ulChapter,ulChaptersToPlay,dwFlags,ppCmd) + +#define IDvdControl2_AcceptParentalLevelChange(This,bAccept) \ + (This)->lpVtbl -> AcceptParentalLevelChange(This,bAccept) + +#define IDvdControl2_SetOption(This,flag,fState) \ + (This)->lpVtbl -> SetOption(This,flag,fState) + +#define IDvdControl2_SetState(This,pState,dwFlags,ppCmd) \ + (This)->lpVtbl -> SetState(This,pState,dwFlags,ppCmd) + +#define IDvdControl2_PlayPeriodInTitleAutoStop(This,ulTitle,pStartTime,pEndTime,dwFlags,ppCmd) \ + (This)->lpVtbl -> PlayPeriodInTitleAutoStop(This,ulTitle,pStartTime,pEndTime,dwFlags,ppCmd) + +#define IDvdControl2_SetGPRM(This,ulIndex,wValue,dwFlags,ppCmd) \ + (This)->lpVtbl -> SetGPRM(This,ulIndex,wValue,dwFlags,ppCmd) + +#define IDvdControl2_SelectDefaultMenuLanguage(This,Language) \ + (This)->lpVtbl -> SelectDefaultMenuLanguage(This,Language) + +#define IDvdControl2_SelectDefaultAudioLanguage(This,Language,audioExtension) \ + (This)->lpVtbl -> SelectDefaultAudioLanguage(This,Language,audioExtension) + +#define IDvdControl2_SelectDefaultSubpictureLanguage(This,Language,subpictureExtension) \ + (This)->lpVtbl -> SelectDefaultSubpictureLanguage(This,Language,subpictureExtension) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDvdControl2_PlayTitle_Proxy( + IDvdControl2 * This, + /* [in] */ ULONG ulTitle, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_PlayTitle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_PlayChapterInTitle_Proxy( + IDvdControl2 * This, + /* [in] */ ULONG ulTitle, + /* [in] */ ULONG ulChapter, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_PlayChapterInTitle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_PlayAtTimeInTitle_Proxy( + IDvdControl2 * This, + /* [in] */ ULONG ulTitle, + /* [in] */ DVD_HMSF_TIMECODE *pStartTime, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_PlayAtTimeInTitle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_Stop_Proxy( + IDvdControl2 * This); + + +void __RPC_STUB IDvdControl2_Stop_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_ReturnFromSubmenu_Proxy( + IDvdControl2 * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_ReturnFromSubmenu_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_PlayAtTime_Proxy( + IDvdControl2 * This, + /* [in] */ DVD_HMSF_TIMECODE *pTime, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_PlayAtTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_PlayChapter_Proxy( + IDvdControl2 * This, + /* [in] */ ULONG ulChapter, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_PlayChapter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_PlayPrevChapter_Proxy( + IDvdControl2 * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_PlayPrevChapter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_ReplayChapter_Proxy( + IDvdControl2 * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_ReplayChapter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_PlayNextChapter_Proxy( + IDvdControl2 * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_PlayNextChapter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_PlayForwards_Proxy( + IDvdControl2 * This, + /* [in] */ double dSpeed, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_PlayForwards_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_PlayBackwards_Proxy( + IDvdControl2 * This, + /* [in] */ double dSpeed, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_PlayBackwards_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_ShowMenu_Proxy( + IDvdControl2 * This, + /* [in] */ DVD_MENU_ID MenuID, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_ShowMenu_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_Resume_Proxy( + IDvdControl2 * This, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_Resume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SelectRelativeButton_Proxy( + IDvdControl2 * This, + DVD_RELATIVE_BUTTON buttonDir); + + +void __RPC_STUB IDvdControl2_SelectRelativeButton_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_ActivateButton_Proxy( + IDvdControl2 * This); + + +void __RPC_STUB IDvdControl2_ActivateButton_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SelectButton_Proxy( + IDvdControl2 * This, + /* [in] */ ULONG ulButton); + + +void __RPC_STUB IDvdControl2_SelectButton_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SelectAndActivateButton_Proxy( + IDvdControl2 * This, + /* [in] */ ULONG ulButton); + + +void __RPC_STUB IDvdControl2_SelectAndActivateButton_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_StillOff_Proxy( + IDvdControl2 * This); + + +void __RPC_STUB IDvdControl2_StillOff_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_Pause_Proxy( + IDvdControl2 * This, + /* [in] */ BOOL bState); + + +void __RPC_STUB IDvdControl2_Pause_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SelectAudioStream_Proxy( + IDvdControl2 * This, + /* [in] */ ULONG ulAudio, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_SelectAudioStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SelectSubpictureStream_Proxy( + IDvdControl2 * This, + /* [in] */ ULONG ulSubPicture, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_SelectSubpictureStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SetSubpictureState_Proxy( + IDvdControl2 * This, + /* [in] */ BOOL bState, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_SetSubpictureState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SelectAngle_Proxy( + IDvdControl2 * This, + /* [in] */ ULONG ulAngle, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_SelectAngle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SelectParentalLevel_Proxy( + IDvdControl2 * This, + /* [in] */ ULONG ulParentalLevel); + + +void __RPC_STUB IDvdControl2_SelectParentalLevel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SelectParentalCountry_Proxy( + IDvdControl2 * This, + /* [in] */ BYTE bCountry[ 2 ]); + + +void __RPC_STUB IDvdControl2_SelectParentalCountry_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SelectKaraokeAudioPresentationMode_Proxy( + IDvdControl2 * This, + /* [in] */ ULONG ulMode); + + +void __RPC_STUB IDvdControl2_SelectKaraokeAudioPresentationMode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SelectVideoModePreference_Proxy( + IDvdControl2 * This, + /* [in] */ ULONG ulPreferredDisplayMode); + + +void __RPC_STUB IDvdControl2_SelectVideoModePreference_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SetDVDDirectory_Proxy( + IDvdControl2 * This, + /* [in] */ LPCWSTR pszwPath); + + +void __RPC_STUB IDvdControl2_SetDVDDirectory_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_ActivateAtPosition_Proxy( + IDvdControl2 * This, + /* [in] */ POINT point); + + +void __RPC_STUB IDvdControl2_ActivateAtPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SelectAtPosition_Proxy( + IDvdControl2 * This, + /* [in] */ POINT point); + + +void __RPC_STUB IDvdControl2_SelectAtPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_PlayChaptersAutoStop_Proxy( + IDvdControl2 * This, + /* [in] */ ULONG ulTitle, + /* [in] */ ULONG ulChapter, + /* [in] */ ULONG ulChaptersToPlay, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_PlayChaptersAutoStop_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_AcceptParentalLevelChange_Proxy( + IDvdControl2 * This, + /* [in] */ BOOL bAccept); + + +void __RPC_STUB IDvdControl2_AcceptParentalLevelChange_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SetOption_Proxy( + IDvdControl2 * This, + /* [in] */ DVD_OPTION_FLAG flag, + /* [in] */ BOOL fState); + + +void __RPC_STUB IDvdControl2_SetOption_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SetState_Proxy( + IDvdControl2 * This, + /* [in] */ IDvdState *pState, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_SetState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_PlayPeriodInTitleAutoStop_Proxy( + IDvdControl2 * This, + /* [in] */ ULONG ulTitle, + /* [in] */ DVD_HMSF_TIMECODE *pStartTime, + /* [in] */ DVD_HMSF_TIMECODE *pEndTime, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_PlayPeriodInTitleAutoStop_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SetGPRM_Proxy( + IDvdControl2 * This, + /* [in] */ ULONG ulIndex, + /* [in] */ WORD wValue, + /* [in] */ DWORD dwFlags, + /* [out] */ IDvdCmd **ppCmd); + + +void __RPC_STUB IDvdControl2_SetGPRM_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SelectDefaultMenuLanguage_Proxy( + IDvdControl2 * This, + /* [in] */ LCID Language); + + +void __RPC_STUB IDvdControl2_SelectDefaultMenuLanguage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SelectDefaultAudioLanguage_Proxy( + IDvdControl2 * This, + /* [in] */ LCID Language, + /* [in] */ DVD_AUDIO_LANG_EXT audioExtension); + + +void __RPC_STUB IDvdControl2_SelectDefaultAudioLanguage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdControl2_SelectDefaultSubpictureLanguage_Proxy( + IDvdControl2 * This, + /* [in] */ LCID Language, + /* [in] */ DVD_SUBPICTURE_LANG_EXT subpictureExtension); + + +void __RPC_STUB IDvdControl2_SelectDefaultSubpictureLanguage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDvdControl2_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0362 */ +/* [local] */ + + +enum DVD_TextStringType + { DVD_Struct_Volume = 0x1, + DVD_Struct_Title = 0x2, + DVD_Struct_ParentalID = 0x3, + DVD_Struct_PartOfTitle = 0x4, + DVD_Struct_Cell = 0x5, + DVD_Stream_Audio = 0x10, + DVD_Stream_Subpicture = 0x11, + DVD_Stream_Angle = 0x12, + DVD_Channel_Audio = 0x20, + DVD_General_Name = 0x30, + DVD_General_Comments = 0x31, + DVD_Title_Series = 0x38, + DVD_Title_Movie = 0x39, + DVD_Title_Video = 0x3a, + DVD_Title_Album = 0x3b, + DVD_Title_Song = 0x3c, + DVD_Title_Other = 0x3f, + DVD_Title_Sub_Series = 0x40, + DVD_Title_Sub_Movie = 0x41, + DVD_Title_Sub_Video = 0x42, + DVD_Title_Sub_Album = 0x43, + DVD_Title_Sub_Song = 0x44, + DVD_Title_Sub_Other = 0x47, + DVD_Title_Orig_Series = 0x48, + DVD_Title_Orig_Movie = 0x49, + DVD_Title_Orig_Video = 0x4a, + DVD_Title_Orig_Album = 0x4b, + DVD_Title_Orig_Song = 0x4c, + DVD_Title_Orig_Other = 0x4f, + DVD_Other_Scene = 0x50, + DVD_Other_Cut = 0x51, + DVD_Other_Take = 0x52 + } ; + +enum DVD_TextCharSet + { DVD_CharSet_Unicode = 0, + DVD_CharSet_ISO646 = 1, + DVD_CharSet_JIS_Roman_Kanji = 2, + DVD_CharSet_ISO8859_1 = 3, + DVD_CharSet_ShiftJIS_Kanji_Roman_Katakana = 4 + } ; +#define DVD_TITLE_MENU 0x000 +#define DVD_STREAM_DATA_CURRENT 0x800 +#define DVD_STREAM_DATA_VMGM 0x400 +#define DVD_STREAM_DATA_VTSM 0x401 +#define DVD_DEFAULT_AUDIO_STREAM 0x0f +typedef struct tagDVD_DECODER_CAPS + { + DWORD dwSize; + DWORD dwAudioCaps; + double dFwdMaxRateVideo; + double dFwdMaxRateAudio; + double dFwdMaxRateSP; + double dBwdMaxRateVideo; + double dBwdMaxRateAudio; + double dBwdMaxRateSP; + DWORD dwRes1; + DWORD dwRes2; + DWORD dwRes3; + DWORD dwRes4; + } DVD_DECODER_CAPS; + +#define DVD_AUDIO_CAPS_AC3 0x00000001 +#define DVD_AUDIO_CAPS_MPEG2 0x00000002 +#define DVD_AUDIO_CAPS_LPCM 0x00000004 +#define DVD_AUDIO_CAPS_DTS 0x00000008 +#define DVD_AUDIO_CAPS_SDDS 0x00000010 + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0362_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0362_v0_0_s_ifspec; + +#ifndef __IDvdInfo2_INTERFACE_DEFINED__ +#define __IDvdInfo2_INTERFACE_DEFINED__ + +/* interface IDvdInfo2 */ +/* [unique][uuid][object] */ + + +EXTERN_C const IID IID_IDvdInfo2; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("34151510-EEC0-11D2-8201-00A0C9D74842") + IDvdInfo2 : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetCurrentDomain( + /* [out] */ DVD_DOMAIN *pDomain) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentLocation( + /* [out] */ DVD_PLAYBACK_LOCATION2 *pLocation) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTotalTitleTime( + /* [out] */ DVD_HMSF_TIMECODE *pTotalTime, + /* [out] */ ULONG *ulTimeCodeFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentButton( + /* [out] */ ULONG *pulButtonsAvailable, + /* [out] */ ULONG *pulCurrentButton) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentAngle( + /* [out] */ ULONG *pulAnglesAvailable, + /* [out] */ ULONG *pulCurrentAngle) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentAudio( + /* [out] */ ULONG *pulStreamsAvailable, + /* [out] */ ULONG *pulCurrentStream) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentSubpicture( + /* [out] */ ULONG *pulStreamsAvailable, + /* [out] */ ULONG *pulCurrentStream, + /* [out] */ BOOL *pbIsDisabled) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentUOPS( + /* [out] */ ULONG *pulUOPs) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAllSPRMs( + /* [out] */ SPRMARRAY *pRegisterArray) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAllGPRMs( + /* [out] */ GPRMARRAY *pRegisterArray) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAudioLanguage( + /* [in] */ ULONG ulStream, + /* [out] */ LCID *pLanguage) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSubpictureLanguage( + /* [in] */ ULONG ulStream, + /* [out] */ LCID *pLanguage) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTitleAttributes( + /* [in] */ ULONG ulTitle, + /* [out] */ DVD_MenuAttributes *pMenu, + /* [out] */ DVD_TitleAttributes *pTitle) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetVMGAttributes( + /* [out] */ DVD_MenuAttributes *pATR) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCurrentVideoAttributes( + /* [out] */ DVD_VideoAttributes *pATR) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetAudioAttributes( + /* [in] */ ULONG ulStream, + /* [out] */ DVD_AudioAttributes *pATR) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetKaraokeAttributes( + /* [in] */ ULONG ulStream, + /* [out] */ DVD_KaraokeAttributes *pAttributes) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetSubpictureAttributes( + /* [in] */ ULONG ulStream, + /* [out] */ DVD_SubpictureAttributes *pATR) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDVDVolumeInfo( + /* [out] */ ULONG *pulNumOfVolumes, + /* [out] */ ULONG *pulVolume, + /* [out] */ DVD_DISC_SIDE *pSide, + /* [out] */ ULONG *pulNumOfTitles) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDVDTextNumberOfLanguages( + /* [out] */ ULONG *pulNumOfLangs) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDVDTextLanguageInfo( + /* [in] */ ULONG ulLangIndex, + /* [out] */ ULONG *pulNumOfStrings, + /* [out] */ LCID *pLangCode, + /* [out] */ enum DVD_TextCharSet *pbCharacterSet) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDVDTextStringAsNative( + /* [in] */ ULONG ulLangIndex, + /* [in] */ ULONG ulStringIndex, + /* [out] */ BYTE *pbBuffer, + /* [in] */ ULONG ulMaxBufferSize, + /* [out] */ ULONG *pulActualSize, + /* [out] */ enum DVD_TextStringType *pType) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDVDTextStringAsUnicode( + /* [in] */ ULONG ulLangIndex, + /* [in] */ ULONG ulStringIndex, + /* [out] */ WCHAR *pchwBuffer, + /* [in] */ ULONG ulMaxBufferSize, + /* [out] */ ULONG *pulActualSize, + /* [out] */ enum DVD_TextStringType *pType) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetPlayerParentalLevel( + /* [out] */ ULONG *pulParentalLevel, + /* [out] */ BYTE pbCountryCode[ 2 ]) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetNumberOfChapters( + /* [in] */ ULONG ulTitle, + /* [out] */ ULONG *pulNumOfChapters) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetTitleParentalLevels( + /* [in] */ ULONG ulTitle, + /* [out] */ ULONG *pulParentalLevels) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDVDDirectory( + /* [size_is][out] */ LPWSTR pszwPath, + /* [in] */ ULONG ulMaxSize, + /* [out] */ ULONG *pulActualSize) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsAudioStreamEnabled( + /* [in] */ ULONG ulStreamNum, + /* [out] */ BOOL *pbEnabled) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDiscID( + /* [in] */ LPCWSTR pszwPath, + /* [out] */ ULONGLONG *pullDiscID) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetState( + /* [out] */ IDvdState **pStateData) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetMenuLanguages( + /* [out] */ LCID *pLanguages, + /* [in] */ ULONG ulMaxLanguages, + /* [out] */ ULONG *pulActualLanguages) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetButtonAtPosition( + /* [in] */ POINT point, + /* [out] */ ULONG *pulButtonIndex) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCmdFromEvent( + /* [in] */ LONG_PTR lParam1, + /* [out] */ IDvdCmd **pCmdObj) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDefaultMenuLanguage( + /* [out] */ LCID *pLanguage) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDefaultAudioLanguage( + /* [out] */ LCID *pLanguage, + /* [out] */ DVD_AUDIO_LANG_EXT *pAudioExtension) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDefaultSubpictureLanguage( + /* [out] */ LCID *pLanguage, + /* [out] */ DVD_SUBPICTURE_LANG_EXT *pSubpictureExtension) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDecoderCaps( + /* [out] */ DVD_DECODER_CAPS *pCaps) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetButtonRect( + /* [in] */ ULONG ulButton, + /* [out] */ RECT *pRect) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsSubpictureStreamEnabled( + /* [in] */ ULONG ulStreamNum, + /* [out] */ BOOL *pbEnabled) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDvdInfo2Vtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDvdInfo2 * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDvdInfo2 * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDvdInfo2 * This); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentDomain )( + IDvdInfo2 * This, + /* [out] */ DVD_DOMAIN *pDomain); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentLocation )( + IDvdInfo2 * This, + /* [out] */ DVD_PLAYBACK_LOCATION2 *pLocation); + + HRESULT ( STDMETHODCALLTYPE *GetTotalTitleTime )( + IDvdInfo2 * This, + /* [out] */ DVD_HMSF_TIMECODE *pTotalTime, + /* [out] */ ULONG *ulTimeCodeFlags); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentButton )( + IDvdInfo2 * This, + /* [out] */ ULONG *pulButtonsAvailable, + /* [out] */ ULONG *pulCurrentButton); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentAngle )( + IDvdInfo2 * This, + /* [out] */ ULONG *pulAnglesAvailable, + /* [out] */ ULONG *pulCurrentAngle); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentAudio )( + IDvdInfo2 * This, + /* [out] */ ULONG *pulStreamsAvailable, + /* [out] */ ULONG *pulCurrentStream); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentSubpicture )( + IDvdInfo2 * This, + /* [out] */ ULONG *pulStreamsAvailable, + /* [out] */ ULONG *pulCurrentStream, + /* [out] */ BOOL *pbIsDisabled); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentUOPS )( + IDvdInfo2 * This, + /* [out] */ ULONG *pulUOPs); + + HRESULT ( STDMETHODCALLTYPE *GetAllSPRMs )( + IDvdInfo2 * This, + /* [out] */ SPRMARRAY *pRegisterArray); + + HRESULT ( STDMETHODCALLTYPE *GetAllGPRMs )( + IDvdInfo2 * This, + /* [out] */ GPRMARRAY *pRegisterArray); + + HRESULT ( STDMETHODCALLTYPE *GetAudioLanguage )( + IDvdInfo2 * This, + /* [in] */ ULONG ulStream, + /* [out] */ LCID *pLanguage); + + HRESULT ( STDMETHODCALLTYPE *GetSubpictureLanguage )( + IDvdInfo2 * This, + /* [in] */ ULONG ulStream, + /* [out] */ LCID *pLanguage); + + HRESULT ( STDMETHODCALLTYPE *GetTitleAttributes )( + IDvdInfo2 * This, + /* [in] */ ULONG ulTitle, + /* [out] */ DVD_MenuAttributes *pMenu, + /* [out] */ DVD_TitleAttributes *pTitle); + + HRESULT ( STDMETHODCALLTYPE *GetVMGAttributes )( + IDvdInfo2 * This, + /* [out] */ DVD_MenuAttributes *pATR); + + HRESULT ( STDMETHODCALLTYPE *GetCurrentVideoAttributes )( + IDvdInfo2 * This, + /* [out] */ DVD_VideoAttributes *pATR); + + HRESULT ( STDMETHODCALLTYPE *GetAudioAttributes )( + IDvdInfo2 * This, + /* [in] */ ULONG ulStream, + /* [out] */ DVD_AudioAttributes *pATR); + + HRESULT ( STDMETHODCALLTYPE *GetKaraokeAttributes )( + IDvdInfo2 * This, + /* [in] */ ULONG ulStream, + /* [out] */ DVD_KaraokeAttributes *pAttributes); + + HRESULT ( STDMETHODCALLTYPE *GetSubpictureAttributes )( + IDvdInfo2 * This, + /* [in] */ ULONG ulStream, + /* [out] */ DVD_SubpictureAttributes *pATR); + + HRESULT ( STDMETHODCALLTYPE *GetDVDVolumeInfo )( + IDvdInfo2 * This, + /* [out] */ ULONG *pulNumOfVolumes, + /* [out] */ ULONG *pulVolume, + /* [out] */ DVD_DISC_SIDE *pSide, + /* [out] */ ULONG *pulNumOfTitles); + + HRESULT ( STDMETHODCALLTYPE *GetDVDTextNumberOfLanguages )( + IDvdInfo2 * This, + /* [out] */ ULONG *pulNumOfLangs); + + HRESULT ( STDMETHODCALLTYPE *GetDVDTextLanguageInfo )( + IDvdInfo2 * This, + /* [in] */ ULONG ulLangIndex, + /* [out] */ ULONG *pulNumOfStrings, + /* [out] */ LCID *pLangCode, + /* [out] */ enum DVD_TextCharSet *pbCharacterSet); + + HRESULT ( STDMETHODCALLTYPE *GetDVDTextStringAsNative )( + IDvdInfo2 * This, + /* [in] */ ULONG ulLangIndex, + /* [in] */ ULONG ulStringIndex, + /* [out] */ BYTE *pbBuffer, + /* [in] */ ULONG ulMaxBufferSize, + /* [out] */ ULONG *pulActualSize, + /* [out] */ enum DVD_TextStringType *pType); + + HRESULT ( STDMETHODCALLTYPE *GetDVDTextStringAsUnicode )( + IDvdInfo2 * This, + /* [in] */ ULONG ulLangIndex, + /* [in] */ ULONG ulStringIndex, + /* [out] */ WCHAR *pchwBuffer, + /* [in] */ ULONG ulMaxBufferSize, + /* [out] */ ULONG *pulActualSize, + /* [out] */ enum DVD_TextStringType *pType); + + HRESULT ( STDMETHODCALLTYPE *GetPlayerParentalLevel )( + IDvdInfo2 * This, + /* [out] */ ULONG *pulParentalLevel, + /* [out] */ BYTE pbCountryCode[ 2 ]); + + HRESULT ( STDMETHODCALLTYPE *GetNumberOfChapters )( + IDvdInfo2 * This, + /* [in] */ ULONG ulTitle, + /* [out] */ ULONG *pulNumOfChapters); + + HRESULT ( STDMETHODCALLTYPE *GetTitleParentalLevels )( + IDvdInfo2 * This, + /* [in] */ ULONG ulTitle, + /* [out] */ ULONG *pulParentalLevels); + + HRESULT ( STDMETHODCALLTYPE *GetDVDDirectory )( + IDvdInfo2 * This, + /* [size_is][out] */ LPWSTR pszwPath, + /* [in] */ ULONG ulMaxSize, + /* [out] */ ULONG *pulActualSize); + + HRESULT ( STDMETHODCALLTYPE *IsAudioStreamEnabled )( + IDvdInfo2 * This, + /* [in] */ ULONG ulStreamNum, + /* [out] */ BOOL *pbEnabled); + + HRESULT ( STDMETHODCALLTYPE *GetDiscID )( + IDvdInfo2 * This, + /* [in] */ LPCWSTR pszwPath, + /* [out] */ ULONGLONG *pullDiscID); + + HRESULT ( STDMETHODCALLTYPE *GetState )( + IDvdInfo2 * This, + /* [out] */ IDvdState **pStateData); + + HRESULT ( STDMETHODCALLTYPE *GetMenuLanguages )( + IDvdInfo2 * This, + /* [out] */ LCID *pLanguages, + /* [in] */ ULONG ulMaxLanguages, + /* [out] */ ULONG *pulActualLanguages); + + HRESULT ( STDMETHODCALLTYPE *GetButtonAtPosition )( + IDvdInfo2 * This, + /* [in] */ POINT point, + /* [out] */ ULONG *pulButtonIndex); + + HRESULT ( STDMETHODCALLTYPE *GetCmdFromEvent )( + IDvdInfo2 * This, + /* [in] */ LONG_PTR lParam1, + /* [out] */ IDvdCmd **pCmdObj); + + HRESULT ( STDMETHODCALLTYPE *GetDefaultMenuLanguage )( + IDvdInfo2 * This, + /* [out] */ LCID *pLanguage); + + HRESULT ( STDMETHODCALLTYPE *GetDefaultAudioLanguage )( + IDvdInfo2 * This, + /* [out] */ LCID *pLanguage, + /* [out] */ DVD_AUDIO_LANG_EXT *pAudioExtension); + + HRESULT ( STDMETHODCALLTYPE *GetDefaultSubpictureLanguage )( + IDvdInfo2 * This, + /* [out] */ LCID *pLanguage, + /* [out] */ DVD_SUBPICTURE_LANG_EXT *pSubpictureExtension); + + HRESULT ( STDMETHODCALLTYPE *GetDecoderCaps )( + IDvdInfo2 * This, + /* [out] */ DVD_DECODER_CAPS *pCaps); + + HRESULT ( STDMETHODCALLTYPE *GetButtonRect )( + IDvdInfo2 * This, + /* [in] */ ULONG ulButton, + /* [out] */ RECT *pRect); + + HRESULT ( STDMETHODCALLTYPE *IsSubpictureStreamEnabled )( + IDvdInfo2 * This, + /* [in] */ ULONG ulStreamNum, + /* [out] */ BOOL *pbEnabled); + + END_INTERFACE + } IDvdInfo2Vtbl; + + interface IDvdInfo2 + { + CONST_VTBL struct IDvdInfo2Vtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDvdInfo2_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDvdInfo2_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDvdInfo2_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDvdInfo2_GetCurrentDomain(This,pDomain) \ + (This)->lpVtbl -> GetCurrentDomain(This,pDomain) + +#define IDvdInfo2_GetCurrentLocation(This,pLocation) \ + (This)->lpVtbl -> GetCurrentLocation(This,pLocation) + +#define IDvdInfo2_GetTotalTitleTime(This,pTotalTime,ulTimeCodeFlags) \ + (This)->lpVtbl -> GetTotalTitleTime(This,pTotalTime,ulTimeCodeFlags) + +#define IDvdInfo2_GetCurrentButton(This,pulButtonsAvailable,pulCurrentButton) \ + (This)->lpVtbl -> GetCurrentButton(This,pulButtonsAvailable,pulCurrentButton) + +#define IDvdInfo2_GetCurrentAngle(This,pulAnglesAvailable,pulCurrentAngle) \ + (This)->lpVtbl -> GetCurrentAngle(This,pulAnglesAvailable,pulCurrentAngle) + +#define IDvdInfo2_GetCurrentAudio(This,pulStreamsAvailable,pulCurrentStream) \ + (This)->lpVtbl -> GetCurrentAudio(This,pulStreamsAvailable,pulCurrentStream) + +#define IDvdInfo2_GetCurrentSubpicture(This,pulStreamsAvailable,pulCurrentStream,pbIsDisabled) \ + (This)->lpVtbl -> GetCurrentSubpicture(This,pulStreamsAvailable,pulCurrentStream,pbIsDisabled) + +#define IDvdInfo2_GetCurrentUOPS(This,pulUOPs) \ + (This)->lpVtbl -> GetCurrentUOPS(This,pulUOPs) + +#define IDvdInfo2_GetAllSPRMs(This,pRegisterArray) \ + (This)->lpVtbl -> GetAllSPRMs(This,pRegisterArray) + +#define IDvdInfo2_GetAllGPRMs(This,pRegisterArray) \ + (This)->lpVtbl -> GetAllGPRMs(This,pRegisterArray) + +#define IDvdInfo2_GetAudioLanguage(This,ulStream,pLanguage) \ + (This)->lpVtbl -> GetAudioLanguage(This,ulStream,pLanguage) + +#define IDvdInfo2_GetSubpictureLanguage(This,ulStream,pLanguage) \ + (This)->lpVtbl -> GetSubpictureLanguage(This,ulStream,pLanguage) + +#define IDvdInfo2_GetTitleAttributes(This,ulTitle,pMenu,pTitle) \ + (This)->lpVtbl -> GetTitleAttributes(This,ulTitle,pMenu,pTitle) + +#define IDvdInfo2_GetVMGAttributes(This,pATR) \ + (This)->lpVtbl -> GetVMGAttributes(This,pATR) + +#define IDvdInfo2_GetCurrentVideoAttributes(This,pATR) \ + (This)->lpVtbl -> GetCurrentVideoAttributes(This,pATR) + +#define IDvdInfo2_GetAudioAttributes(This,ulStream,pATR) \ + (This)->lpVtbl -> GetAudioAttributes(This,ulStream,pATR) + +#define IDvdInfo2_GetKaraokeAttributes(This,ulStream,pAttributes) \ + (This)->lpVtbl -> GetKaraokeAttributes(This,ulStream,pAttributes) + +#define IDvdInfo2_GetSubpictureAttributes(This,ulStream,pATR) \ + (This)->lpVtbl -> GetSubpictureAttributes(This,ulStream,pATR) + +#define IDvdInfo2_GetDVDVolumeInfo(This,pulNumOfVolumes,pulVolume,pSide,pulNumOfTitles) \ + (This)->lpVtbl -> GetDVDVolumeInfo(This,pulNumOfVolumes,pulVolume,pSide,pulNumOfTitles) + +#define IDvdInfo2_GetDVDTextNumberOfLanguages(This,pulNumOfLangs) \ + (This)->lpVtbl -> GetDVDTextNumberOfLanguages(This,pulNumOfLangs) + +#define IDvdInfo2_GetDVDTextLanguageInfo(This,ulLangIndex,pulNumOfStrings,pLangCode,pbCharacterSet) \ + (This)->lpVtbl -> GetDVDTextLanguageInfo(This,ulLangIndex,pulNumOfStrings,pLangCode,pbCharacterSet) + +#define IDvdInfo2_GetDVDTextStringAsNative(This,ulLangIndex,ulStringIndex,pbBuffer,ulMaxBufferSize,pulActualSize,pType) \ + (This)->lpVtbl -> GetDVDTextStringAsNative(This,ulLangIndex,ulStringIndex,pbBuffer,ulMaxBufferSize,pulActualSize,pType) + +#define IDvdInfo2_GetDVDTextStringAsUnicode(This,ulLangIndex,ulStringIndex,pchwBuffer,ulMaxBufferSize,pulActualSize,pType) \ + (This)->lpVtbl -> GetDVDTextStringAsUnicode(This,ulLangIndex,ulStringIndex,pchwBuffer,ulMaxBufferSize,pulActualSize,pType) + +#define IDvdInfo2_GetPlayerParentalLevel(This,pulParentalLevel,pbCountryCode) \ + (This)->lpVtbl -> GetPlayerParentalLevel(This,pulParentalLevel,pbCountryCode) + +#define IDvdInfo2_GetNumberOfChapters(This,ulTitle,pulNumOfChapters) \ + (This)->lpVtbl -> GetNumberOfChapters(This,ulTitle,pulNumOfChapters) + +#define IDvdInfo2_GetTitleParentalLevels(This,ulTitle,pulParentalLevels) \ + (This)->lpVtbl -> GetTitleParentalLevels(This,ulTitle,pulParentalLevels) + +#define IDvdInfo2_GetDVDDirectory(This,pszwPath,ulMaxSize,pulActualSize) \ + (This)->lpVtbl -> GetDVDDirectory(This,pszwPath,ulMaxSize,pulActualSize) + +#define IDvdInfo2_IsAudioStreamEnabled(This,ulStreamNum,pbEnabled) \ + (This)->lpVtbl -> IsAudioStreamEnabled(This,ulStreamNum,pbEnabled) + +#define IDvdInfo2_GetDiscID(This,pszwPath,pullDiscID) \ + (This)->lpVtbl -> GetDiscID(This,pszwPath,pullDiscID) + +#define IDvdInfo2_GetState(This,pStateData) \ + (This)->lpVtbl -> GetState(This,pStateData) + +#define IDvdInfo2_GetMenuLanguages(This,pLanguages,ulMaxLanguages,pulActualLanguages) \ + (This)->lpVtbl -> GetMenuLanguages(This,pLanguages,ulMaxLanguages,pulActualLanguages) + +#define IDvdInfo2_GetButtonAtPosition(This,point,pulButtonIndex) \ + (This)->lpVtbl -> GetButtonAtPosition(This,point,pulButtonIndex) + +#define IDvdInfo2_GetCmdFromEvent(This,lParam1,pCmdObj) \ + (This)->lpVtbl -> GetCmdFromEvent(This,lParam1,pCmdObj) + +#define IDvdInfo2_GetDefaultMenuLanguage(This,pLanguage) \ + (This)->lpVtbl -> GetDefaultMenuLanguage(This,pLanguage) + +#define IDvdInfo2_GetDefaultAudioLanguage(This,pLanguage,pAudioExtension) \ + (This)->lpVtbl -> GetDefaultAudioLanguage(This,pLanguage,pAudioExtension) + +#define IDvdInfo2_GetDefaultSubpictureLanguage(This,pLanguage,pSubpictureExtension) \ + (This)->lpVtbl -> GetDefaultSubpictureLanguage(This,pLanguage,pSubpictureExtension) + +#define IDvdInfo2_GetDecoderCaps(This,pCaps) \ + (This)->lpVtbl -> GetDecoderCaps(This,pCaps) + +#define IDvdInfo2_GetButtonRect(This,ulButton,pRect) \ + (This)->lpVtbl -> GetButtonRect(This,ulButton,pRect) + +#define IDvdInfo2_IsSubpictureStreamEnabled(This,ulStreamNum,pbEnabled) \ + (This)->lpVtbl -> IsSubpictureStreamEnabled(This,ulStreamNum,pbEnabled) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetCurrentDomain_Proxy( + IDvdInfo2 * This, + /* [out] */ DVD_DOMAIN *pDomain); + + +void __RPC_STUB IDvdInfo2_GetCurrentDomain_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetCurrentLocation_Proxy( + IDvdInfo2 * This, + /* [out] */ DVD_PLAYBACK_LOCATION2 *pLocation); + + +void __RPC_STUB IDvdInfo2_GetCurrentLocation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetTotalTitleTime_Proxy( + IDvdInfo2 * This, + /* [out] */ DVD_HMSF_TIMECODE *pTotalTime, + /* [out] */ ULONG *ulTimeCodeFlags); + + +void __RPC_STUB IDvdInfo2_GetTotalTitleTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetCurrentButton_Proxy( + IDvdInfo2 * This, + /* [out] */ ULONG *pulButtonsAvailable, + /* [out] */ ULONG *pulCurrentButton); + + +void __RPC_STUB IDvdInfo2_GetCurrentButton_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetCurrentAngle_Proxy( + IDvdInfo2 * This, + /* [out] */ ULONG *pulAnglesAvailable, + /* [out] */ ULONG *pulCurrentAngle); + + +void __RPC_STUB IDvdInfo2_GetCurrentAngle_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetCurrentAudio_Proxy( + IDvdInfo2 * This, + /* [out] */ ULONG *pulStreamsAvailable, + /* [out] */ ULONG *pulCurrentStream); + + +void __RPC_STUB IDvdInfo2_GetCurrentAudio_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetCurrentSubpicture_Proxy( + IDvdInfo2 * This, + /* [out] */ ULONG *pulStreamsAvailable, + /* [out] */ ULONG *pulCurrentStream, + /* [out] */ BOOL *pbIsDisabled); + + +void __RPC_STUB IDvdInfo2_GetCurrentSubpicture_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetCurrentUOPS_Proxy( + IDvdInfo2 * This, + /* [out] */ ULONG *pulUOPs); + + +void __RPC_STUB IDvdInfo2_GetCurrentUOPS_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetAllSPRMs_Proxy( + IDvdInfo2 * This, + /* [out] */ SPRMARRAY *pRegisterArray); + + +void __RPC_STUB IDvdInfo2_GetAllSPRMs_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetAllGPRMs_Proxy( + IDvdInfo2 * This, + /* [out] */ GPRMARRAY *pRegisterArray); + + +void __RPC_STUB IDvdInfo2_GetAllGPRMs_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetAudioLanguage_Proxy( + IDvdInfo2 * This, + /* [in] */ ULONG ulStream, + /* [out] */ LCID *pLanguage); + + +void __RPC_STUB IDvdInfo2_GetAudioLanguage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetSubpictureLanguage_Proxy( + IDvdInfo2 * This, + /* [in] */ ULONG ulStream, + /* [out] */ LCID *pLanguage); + + +void __RPC_STUB IDvdInfo2_GetSubpictureLanguage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetTitleAttributes_Proxy( + IDvdInfo2 * This, + /* [in] */ ULONG ulTitle, + /* [out] */ DVD_MenuAttributes *pMenu, + /* [out] */ DVD_TitleAttributes *pTitle); + + +void __RPC_STUB IDvdInfo2_GetTitleAttributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetVMGAttributes_Proxy( + IDvdInfo2 * This, + /* [out] */ DVD_MenuAttributes *pATR); + + +void __RPC_STUB IDvdInfo2_GetVMGAttributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetCurrentVideoAttributes_Proxy( + IDvdInfo2 * This, + /* [out] */ DVD_VideoAttributes *pATR); + + +void __RPC_STUB IDvdInfo2_GetCurrentVideoAttributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetAudioAttributes_Proxy( + IDvdInfo2 * This, + /* [in] */ ULONG ulStream, + /* [out] */ DVD_AudioAttributes *pATR); + + +void __RPC_STUB IDvdInfo2_GetAudioAttributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetKaraokeAttributes_Proxy( + IDvdInfo2 * This, + /* [in] */ ULONG ulStream, + /* [out] */ DVD_KaraokeAttributes *pAttributes); + + +void __RPC_STUB IDvdInfo2_GetKaraokeAttributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetSubpictureAttributes_Proxy( + IDvdInfo2 * This, + /* [in] */ ULONG ulStream, + /* [out] */ DVD_SubpictureAttributes *pATR); + + +void __RPC_STUB IDvdInfo2_GetSubpictureAttributes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetDVDVolumeInfo_Proxy( + IDvdInfo2 * This, + /* [out] */ ULONG *pulNumOfVolumes, + /* [out] */ ULONG *pulVolume, + /* [out] */ DVD_DISC_SIDE *pSide, + /* [out] */ ULONG *pulNumOfTitles); + + +void __RPC_STUB IDvdInfo2_GetDVDVolumeInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetDVDTextNumberOfLanguages_Proxy( + IDvdInfo2 * This, + /* [out] */ ULONG *pulNumOfLangs); + + +void __RPC_STUB IDvdInfo2_GetDVDTextNumberOfLanguages_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetDVDTextLanguageInfo_Proxy( + IDvdInfo2 * This, + /* [in] */ ULONG ulLangIndex, + /* [out] */ ULONG *pulNumOfStrings, + /* [out] */ LCID *pLangCode, + /* [out] */ enum DVD_TextCharSet *pbCharacterSet); + + +void __RPC_STUB IDvdInfo2_GetDVDTextLanguageInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetDVDTextStringAsNative_Proxy( + IDvdInfo2 * This, + /* [in] */ ULONG ulLangIndex, + /* [in] */ ULONG ulStringIndex, + /* [out] */ BYTE *pbBuffer, + /* [in] */ ULONG ulMaxBufferSize, + /* [out] */ ULONG *pulActualSize, + /* [out] */ enum DVD_TextStringType *pType); + + +void __RPC_STUB IDvdInfo2_GetDVDTextStringAsNative_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetDVDTextStringAsUnicode_Proxy( + IDvdInfo2 * This, + /* [in] */ ULONG ulLangIndex, + /* [in] */ ULONG ulStringIndex, + /* [out] */ WCHAR *pchwBuffer, + /* [in] */ ULONG ulMaxBufferSize, + /* [out] */ ULONG *pulActualSize, + /* [out] */ enum DVD_TextStringType *pType); + + +void __RPC_STUB IDvdInfo2_GetDVDTextStringAsUnicode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetPlayerParentalLevel_Proxy( + IDvdInfo2 * This, + /* [out] */ ULONG *pulParentalLevel, + /* [out] */ BYTE pbCountryCode[ 2 ]); + + +void __RPC_STUB IDvdInfo2_GetPlayerParentalLevel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetNumberOfChapters_Proxy( + IDvdInfo2 * This, + /* [in] */ ULONG ulTitle, + /* [out] */ ULONG *pulNumOfChapters); + + +void __RPC_STUB IDvdInfo2_GetNumberOfChapters_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetTitleParentalLevels_Proxy( + IDvdInfo2 * This, + /* [in] */ ULONG ulTitle, + /* [out] */ ULONG *pulParentalLevels); + + +void __RPC_STUB IDvdInfo2_GetTitleParentalLevels_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetDVDDirectory_Proxy( + IDvdInfo2 * This, + /* [size_is][out] */ LPWSTR pszwPath, + /* [in] */ ULONG ulMaxSize, + /* [out] */ ULONG *pulActualSize); + + +void __RPC_STUB IDvdInfo2_GetDVDDirectory_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_IsAudioStreamEnabled_Proxy( + IDvdInfo2 * This, + /* [in] */ ULONG ulStreamNum, + /* [out] */ BOOL *pbEnabled); + + +void __RPC_STUB IDvdInfo2_IsAudioStreamEnabled_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetDiscID_Proxy( + IDvdInfo2 * This, + /* [in] */ LPCWSTR pszwPath, + /* [out] */ ULONGLONG *pullDiscID); + + +void __RPC_STUB IDvdInfo2_GetDiscID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetState_Proxy( + IDvdInfo2 * This, + /* [out] */ IDvdState **pStateData); + + +void __RPC_STUB IDvdInfo2_GetState_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetMenuLanguages_Proxy( + IDvdInfo2 * This, + /* [out] */ LCID *pLanguages, + /* [in] */ ULONG ulMaxLanguages, + /* [out] */ ULONG *pulActualLanguages); + + +void __RPC_STUB IDvdInfo2_GetMenuLanguages_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetButtonAtPosition_Proxy( + IDvdInfo2 * This, + /* [in] */ POINT point, + /* [out] */ ULONG *pulButtonIndex); + + +void __RPC_STUB IDvdInfo2_GetButtonAtPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetCmdFromEvent_Proxy( + IDvdInfo2 * This, + /* [in] */ LONG_PTR lParam1, + /* [out] */ IDvdCmd **pCmdObj); + + +void __RPC_STUB IDvdInfo2_GetCmdFromEvent_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetDefaultMenuLanguage_Proxy( + IDvdInfo2 * This, + /* [out] */ LCID *pLanguage); + + +void __RPC_STUB IDvdInfo2_GetDefaultMenuLanguage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetDefaultAudioLanguage_Proxy( + IDvdInfo2 * This, + /* [out] */ LCID *pLanguage, + /* [out] */ DVD_AUDIO_LANG_EXT *pAudioExtension); + + +void __RPC_STUB IDvdInfo2_GetDefaultAudioLanguage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetDefaultSubpictureLanguage_Proxy( + IDvdInfo2 * This, + /* [out] */ LCID *pLanguage, + /* [out] */ DVD_SUBPICTURE_LANG_EXT *pSubpictureExtension); + + +void __RPC_STUB IDvdInfo2_GetDefaultSubpictureLanguage_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetDecoderCaps_Proxy( + IDvdInfo2 * This, + /* [out] */ DVD_DECODER_CAPS *pCaps); + + +void __RPC_STUB IDvdInfo2_GetDecoderCaps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_GetButtonRect_Proxy( + IDvdInfo2 * This, + /* [in] */ ULONG ulButton, + /* [out] */ RECT *pRect); + + +void __RPC_STUB IDvdInfo2_GetButtonRect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdInfo2_IsSubpictureStreamEnabled_Proxy( + IDvdInfo2 * This, + /* [in] */ ULONG ulStreamNum, + /* [out] */ BOOL *pbEnabled); + + +void __RPC_STUB IDvdInfo2_IsSubpictureStreamEnabled_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDvdInfo2_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0364 */ +/* [local] */ + +typedef +enum _AM_DVD_GRAPH_FLAGS + { AM_DVD_HWDEC_PREFER = 0x1, + AM_DVD_HWDEC_ONLY = 0x2, + AM_DVD_SWDEC_PREFER = 0x4, + AM_DVD_SWDEC_ONLY = 0x8, + AM_DVD_NOVPE = 0x100 + } AM_DVD_GRAPH_FLAGS; + +typedef +enum _AM_DVD_STREAM_FLAGS + { AM_DVD_STREAM_VIDEO = 0x1, + AM_DVD_STREAM_AUDIO = 0x2, + AM_DVD_STREAM_SUBPIC = 0x4 + } AM_DVD_STREAM_FLAGS; + +typedef /* [public][public] */ struct __MIDL___MIDL_itf_strmif_0364_0001 + { + HRESULT hrVPEStatus; + BOOL bDvdVolInvalid; + BOOL bDvdVolUnknown; + BOOL bNoLine21In; + BOOL bNoLine21Out; + int iNumStreams; + int iNumStreamsFailed; + DWORD dwFailedStreamsFlag; + } AM_DVD_RENDERSTATUS; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0364_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0364_v0_0_s_ifspec; + +#ifndef __IDvdGraphBuilder_INTERFACE_DEFINED__ +#define __IDvdGraphBuilder_INTERFACE_DEFINED__ + +/* interface IDvdGraphBuilder */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IDvdGraphBuilder; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("FCC152B6-F372-11d0-8E00-00C04FD7C08B") + IDvdGraphBuilder : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetFiltergraph( + /* [out] */ IGraphBuilder **ppGB) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDvdInterface( + /* [in] */ REFIID riid, + /* [out] */ void **ppvIF) = 0; + + virtual HRESULT STDMETHODCALLTYPE RenderDvdVideoVolume( + /* [in] */ LPCWSTR lpcwszPathName, + /* [in] */ DWORD dwFlags, + /* [out] */ AM_DVD_RENDERSTATUS *pStatus) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDvdGraphBuilderVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDvdGraphBuilder * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDvdGraphBuilder * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDvdGraphBuilder * This); + + HRESULT ( STDMETHODCALLTYPE *GetFiltergraph )( + IDvdGraphBuilder * This, + /* [out] */ IGraphBuilder **ppGB); + + HRESULT ( STDMETHODCALLTYPE *GetDvdInterface )( + IDvdGraphBuilder * This, + /* [in] */ REFIID riid, + /* [out] */ void **ppvIF); + + HRESULT ( STDMETHODCALLTYPE *RenderDvdVideoVolume )( + IDvdGraphBuilder * This, + /* [in] */ LPCWSTR lpcwszPathName, + /* [in] */ DWORD dwFlags, + /* [out] */ AM_DVD_RENDERSTATUS *pStatus); + + END_INTERFACE + } IDvdGraphBuilderVtbl; + + interface IDvdGraphBuilder + { + CONST_VTBL struct IDvdGraphBuilderVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDvdGraphBuilder_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDvdGraphBuilder_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDvdGraphBuilder_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDvdGraphBuilder_GetFiltergraph(This,ppGB) \ + (This)->lpVtbl -> GetFiltergraph(This,ppGB) + +#define IDvdGraphBuilder_GetDvdInterface(This,riid,ppvIF) \ + (This)->lpVtbl -> GetDvdInterface(This,riid,ppvIF) + +#define IDvdGraphBuilder_RenderDvdVideoVolume(This,lpcwszPathName,dwFlags,pStatus) \ + (This)->lpVtbl -> RenderDvdVideoVolume(This,lpcwszPathName,dwFlags,pStatus) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDvdGraphBuilder_GetFiltergraph_Proxy( + IDvdGraphBuilder * This, + /* [out] */ IGraphBuilder **ppGB); + + +void __RPC_STUB IDvdGraphBuilder_GetFiltergraph_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdGraphBuilder_GetDvdInterface_Proxy( + IDvdGraphBuilder * This, + /* [in] */ REFIID riid, + /* [out] */ void **ppvIF); + + +void __RPC_STUB IDvdGraphBuilder_GetDvdInterface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDvdGraphBuilder_RenderDvdVideoVolume_Proxy( + IDvdGraphBuilder * This, + /* [in] */ LPCWSTR lpcwszPathName, + /* [in] */ DWORD dwFlags, + /* [out] */ AM_DVD_RENDERSTATUS *pStatus); + + +void __RPC_STUB IDvdGraphBuilder_RenderDvdVideoVolume_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDvdGraphBuilder_INTERFACE_DEFINED__ */ + + +#ifndef __IDDrawExclModeVideo_INTERFACE_DEFINED__ +#define __IDDrawExclModeVideo_INTERFACE_DEFINED__ + +/* interface IDDrawExclModeVideo */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IDDrawExclModeVideo; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("153ACC21-D83B-11d1-82BF-00A0C9696C8F") + IDDrawExclModeVideo : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE SetDDrawObject( + /* [in] */ IDirectDraw *pDDrawObject) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDDrawObject( + /* [out] */ IDirectDraw **ppDDrawObject, + /* [out] */ BOOL *pbUsingExternal) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDDrawSurface( + /* [in] */ IDirectDrawSurface *pDDrawSurface) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetDDrawSurface( + /* [out] */ IDirectDrawSurface **ppDDrawSurface, + /* [out] */ BOOL *pbUsingExternal) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetDrawParameters( + /* [in] */ const RECT *prcSource, + /* [in] */ const RECT *prcTarget) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetNativeVideoProps( + /* [out] */ DWORD *pdwVideoWidth, + /* [out] */ DWORD *pdwVideoHeight, + /* [out] */ DWORD *pdwPictAspectRatioX, + /* [out] */ DWORD *pdwPictAspectRatioY) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetCallbackInterface( + /* [in] */ IDDrawExclModeVideoCallback *pCallback, + /* [in] */ DWORD dwFlags) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDDrawExclModeVideoVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDDrawExclModeVideo * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDDrawExclModeVideo * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDDrawExclModeVideo * This); + + HRESULT ( STDMETHODCALLTYPE *SetDDrawObject )( + IDDrawExclModeVideo * This, + /* [in] */ IDirectDraw *pDDrawObject); + + HRESULT ( STDMETHODCALLTYPE *GetDDrawObject )( + IDDrawExclModeVideo * This, + /* [out] */ IDirectDraw **ppDDrawObject, + /* [out] */ BOOL *pbUsingExternal); + + HRESULT ( STDMETHODCALLTYPE *SetDDrawSurface )( + IDDrawExclModeVideo * This, + /* [in] */ IDirectDrawSurface *pDDrawSurface); + + HRESULT ( STDMETHODCALLTYPE *GetDDrawSurface )( + IDDrawExclModeVideo * This, + /* [out] */ IDirectDrawSurface **ppDDrawSurface, + /* [out] */ BOOL *pbUsingExternal); + + HRESULT ( STDMETHODCALLTYPE *SetDrawParameters )( + IDDrawExclModeVideo * This, + /* [in] */ const RECT *prcSource, + /* [in] */ const RECT *prcTarget); + + HRESULT ( STDMETHODCALLTYPE *GetNativeVideoProps )( + IDDrawExclModeVideo * This, + /* [out] */ DWORD *pdwVideoWidth, + /* [out] */ DWORD *pdwVideoHeight, + /* [out] */ DWORD *pdwPictAspectRatioX, + /* [out] */ DWORD *pdwPictAspectRatioY); + + HRESULT ( STDMETHODCALLTYPE *SetCallbackInterface )( + IDDrawExclModeVideo * This, + /* [in] */ IDDrawExclModeVideoCallback *pCallback, + /* [in] */ DWORD dwFlags); + + END_INTERFACE + } IDDrawExclModeVideoVtbl; + + interface IDDrawExclModeVideo + { + CONST_VTBL struct IDDrawExclModeVideoVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDDrawExclModeVideo_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDDrawExclModeVideo_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDDrawExclModeVideo_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDDrawExclModeVideo_SetDDrawObject(This,pDDrawObject) \ + (This)->lpVtbl -> SetDDrawObject(This,pDDrawObject) + +#define IDDrawExclModeVideo_GetDDrawObject(This,ppDDrawObject,pbUsingExternal) \ + (This)->lpVtbl -> GetDDrawObject(This,ppDDrawObject,pbUsingExternal) + +#define IDDrawExclModeVideo_SetDDrawSurface(This,pDDrawSurface) \ + (This)->lpVtbl -> SetDDrawSurface(This,pDDrawSurface) + +#define IDDrawExclModeVideo_GetDDrawSurface(This,ppDDrawSurface,pbUsingExternal) \ + (This)->lpVtbl -> GetDDrawSurface(This,ppDDrawSurface,pbUsingExternal) + +#define IDDrawExclModeVideo_SetDrawParameters(This,prcSource,prcTarget) \ + (This)->lpVtbl -> SetDrawParameters(This,prcSource,prcTarget) + +#define IDDrawExclModeVideo_GetNativeVideoProps(This,pdwVideoWidth,pdwVideoHeight,pdwPictAspectRatioX,pdwPictAspectRatioY) \ + (This)->lpVtbl -> GetNativeVideoProps(This,pdwVideoWidth,pdwVideoHeight,pdwPictAspectRatioX,pdwPictAspectRatioY) + +#define IDDrawExclModeVideo_SetCallbackInterface(This,pCallback,dwFlags) \ + (This)->lpVtbl -> SetCallbackInterface(This,pCallback,dwFlags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDDrawExclModeVideo_SetDDrawObject_Proxy( + IDDrawExclModeVideo * This, + /* [in] */ IDirectDraw *pDDrawObject); + + +void __RPC_STUB IDDrawExclModeVideo_SetDDrawObject_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDDrawExclModeVideo_GetDDrawObject_Proxy( + IDDrawExclModeVideo * This, + /* [out] */ IDirectDraw **ppDDrawObject, + /* [out] */ BOOL *pbUsingExternal); + + +void __RPC_STUB IDDrawExclModeVideo_GetDDrawObject_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDDrawExclModeVideo_SetDDrawSurface_Proxy( + IDDrawExclModeVideo * This, + /* [in] */ IDirectDrawSurface *pDDrawSurface); + + +void __RPC_STUB IDDrawExclModeVideo_SetDDrawSurface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDDrawExclModeVideo_GetDDrawSurface_Proxy( + IDDrawExclModeVideo * This, + /* [out] */ IDirectDrawSurface **ppDDrawSurface, + /* [out] */ BOOL *pbUsingExternal); + + +void __RPC_STUB IDDrawExclModeVideo_GetDDrawSurface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDDrawExclModeVideo_SetDrawParameters_Proxy( + IDDrawExclModeVideo * This, + /* [in] */ const RECT *prcSource, + /* [in] */ const RECT *prcTarget); + + +void __RPC_STUB IDDrawExclModeVideo_SetDrawParameters_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDDrawExclModeVideo_GetNativeVideoProps_Proxy( + IDDrawExclModeVideo * This, + /* [out] */ DWORD *pdwVideoWidth, + /* [out] */ DWORD *pdwVideoHeight, + /* [out] */ DWORD *pdwPictAspectRatioX, + /* [out] */ DWORD *pdwPictAspectRatioY); + + +void __RPC_STUB IDDrawExclModeVideo_GetNativeVideoProps_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDDrawExclModeVideo_SetCallbackInterface_Proxy( + IDDrawExclModeVideo * This, + /* [in] */ IDDrawExclModeVideoCallback *pCallback, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IDDrawExclModeVideo_SetCallbackInterface_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDDrawExclModeVideo_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0366 */ +/* [local] */ + + +enum _AM_OVERLAY_NOTIFY_FLAGS + { AM_OVERLAY_NOTIFY_VISIBLE_CHANGE = 0x1, + AM_OVERLAY_NOTIFY_SOURCE_CHANGE = 0x2, + AM_OVERLAY_NOTIFY_DEST_CHANGE = 0x4 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0366_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0366_v0_0_s_ifspec; + +#ifndef __IDDrawExclModeVideoCallback_INTERFACE_DEFINED__ +#define __IDDrawExclModeVideoCallback_INTERFACE_DEFINED__ + +/* interface IDDrawExclModeVideoCallback */ +/* [unique][uuid][local][object] */ + + +EXTERN_C const IID IID_IDDrawExclModeVideoCallback; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("913c24a0-20ab-11d2-9038-00a0c9697298") + IDDrawExclModeVideoCallback : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE OnUpdateOverlay( + /* [in] */ BOOL bBefore, + /* [in] */ DWORD dwFlags, + /* [in] */ BOOL bOldVisible, + /* [in] */ const RECT *prcOldSrc, + /* [in] */ const RECT *prcOldDest, + /* [in] */ BOOL bNewVisible, + /* [in] */ const RECT *prcNewSrc, + /* [in] */ const RECT *prcNewDest) = 0; + + virtual HRESULT STDMETHODCALLTYPE OnUpdateColorKey( + /* [in] */ const COLORKEY *pKey, + /* [in] */ DWORD dwColor) = 0; + + virtual HRESULT STDMETHODCALLTYPE OnUpdateSize( + /* [in] */ DWORD dwWidth, + /* [in] */ DWORD dwHeight, + /* [in] */ DWORD dwARWidth, + /* [in] */ DWORD dwARHeight) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDDrawExclModeVideoCallbackVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDDrawExclModeVideoCallback * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDDrawExclModeVideoCallback * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDDrawExclModeVideoCallback * This); + + HRESULT ( STDMETHODCALLTYPE *OnUpdateOverlay )( + IDDrawExclModeVideoCallback * This, + /* [in] */ BOOL bBefore, + /* [in] */ DWORD dwFlags, + /* [in] */ BOOL bOldVisible, + /* [in] */ const RECT *prcOldSrc, + /* [in] */ const RECT *prcOldDest, + /* [in] */ BOOL bNewVisible, + /* [in] */ const RECT *prcNewSrc, + /* [in] */ const RECT *prcNewDest); + + HRESULT ( STDMETHODCALLTYPE *OnUpdateColorKey )( + IDDrawExclModeVideoCallback * This, + /* [in] */ const COLORKEY *pKey, + /* [in] */ DWORD dwColor); + + HRESULT ( STDMETHODCALLTYPE *OnUpdateSize )( + IDDrawExclModeVideoCallback * This, + /* [in] */ DWORD dwWidth, + /* [in] */ DWORD dwHeight, + /* [in] */ DWORD dwARWidth, + /* [in] */ DWORD dwARHeight); + + END_INTERFACE + } IDDrawExclModeVideoCallbackVtbl; + + interface IDDrawExclModeVideoCallback + { + CONST_VTBL struct IDDrawExclModeVideoCallbackVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDDrawExclModeVideoCallback_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDDrawExclModeVideoCallback_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDDrawExclModeVideoCallback_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDDrawExclModeVideoCallback_OnUpdateOverlay(This,bBefore,dwFlags,bOldVisible,prcOldSrc,prcOldDest,bNewVisible,prcNewSrc,prcNewDest) \ + (This)->lpVtbl -> OnUpdateOverlay(This,bBefore,dwFlags,bOldVisible,prcOldSrc,prcOldDest,bNewVisible,prcNewSrc,prcNewDest) + +#define IDDrawExclModeVideoCallback_OnUpdateColorKey(This,pKey,dwColor) \ + (This)->lpVtbl -> OnUpdateColorKey(This,pKey,dwColor) + +#define IDDrawExclModeVideoCallback_OnUpdateSize(This,dwWidth,dwHeight,dwARWidth,dwARHeight) \ + (This)->lpVtbl -> OnUpdateSize(This,dwWidth,dwHeight,dwARWidth,dwARHeight) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IDDrawExclModeVideoCallback_OnUpdateOverlay_Proxy( + IDDrawExclModeVideoCallback * This, + /* [in] */ BOOL bBefore, + /* [in] */ DWORD dwFlags, + /* [in] */ BOOL bOldVisible, + /* [in] */ const RECT *prcOldSrc, + /* [in] */ const RECT *prcOldDest, + /* [in] */ BOOL bNewVisible, + /* [in] */ const RECT *prcNewSrc, + /* [in] */ const RECT *prcNewDest); + + +void __RPC_STUB IDDrawExclModeVideoCallback_OnUpdateOverlay_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDDrawExclModeVideoCallback_OnUpdateColorKey_Proxy( + IDDrawExclModeVideoCallback * This, + /* [in] */ const COLORKEY *pKey, + /* [in] */ DWORD dwColor); + + +void __RPC_STUB IDDrawExclModeVideoCallback_OnUpdateColorKey_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IDDrawExclModeVideoCallback_OnUpdateSize_Proxy( + IDDrawExclModeVideoCallback * This, + /* [in] */ DWORD dwWidth, + /* [in] */ DWORD dwHeight, + /* [in] */ DWORD dwARWidth, + /* [in] */ DWORD dwARHeight); + + +void __RPC_STUB IDDrawExclModeVideoCallback_OnUpdateSize_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDDrawExclModeVideoCallback_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0367 */ +/* [local] */ + + + + + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0367_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0367_v0_0_s_ifspec; + +#ifndef __IPinConnection_INTERFACE_DEFINED__ +#define __IPinConnection_INTERFACE_DEFINED__ + +/* interface IPinConnection */ +/* [unique][uuid][object][local] */ + + +EXTERN_C const IID IID_IPinConnection; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("4a9a62d3-27d4-403d-91e9-89f540e55534") + IPinConnection : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE DynamicQueryAccept( + /* [in] */ const AM_MEDIA_TYPE *pmt) = 0; + + virtual HRESULT STDMETHODCALLTYPE NotifyEndOfStream( + /* [in] */ HANDLE hNotifyEvent) = 0; + + virtual HRESULT STDMETHODCALLTYPE IsEndPin( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE DynamicDisconnect( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IPinConnectionVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IPinConnection * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IPinConnection * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IPinConnection * This); + + HRESULT ( STDMETHODCALLTYPE *DynamicQueryAccept )( + IPinConnection * This, + /* [in] */ const AM_MEDIA_TYPE *pmt); + + HRESULT ( STDMETHODCALLTYPE *NotifyEndOfStream )( + IPinConnection * This, + /* [in] */ HANDLE hNotifyEvent); + + HRESULT ( STDMETHODCALLTYPE *IsEndPin )( + IPinConnection * This); + + HRESULT ( STDMETHODCALLTYPE *DynamicDisconnect )( + IPinConnection * This); + + END_INTERFACE + } IPinConnectionVtbl; + + interface IPinConnection + { + CONST_VTBL struct IPinConnectionVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IPinConnection_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IPinConnection_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IPinConnection_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IPinConnection_DynamicQueryAccept(This,pmt) \ + (This)->lpVtbl -> DynamicQueryAccept(This,pmt) + +#define IPinConnection_NotifyEndOfStream(This,hNotifyEvent) \ + (This)->lpVtbl -> NotifyEndOfStream(This,hNotifyEvent) + +#define IPinConnection_IsEndPin(This) \ + (This)->lpVtbl -> IsEndPin(This) + +#define IPinConnection_DynamicDisconnect(This) \ + (This)->lpVtbl -> DynamicDisconnect(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IPinConnection_DynamicQueryAccept_Proxy( + IPinConnection * This, + /* [in] */ const AM_MEDIA_TYPE *pmt); + + +void __RPC_STUB IPinConnection_DynamicQueryAccept_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPinConnection_NotifyEndOfStream_Proxy( + IPinConnection * This, + /* [in] */ HANDLE hNotifyEvent); + + +void __RPC_STUB IPinConnection_NotifyEndOfStream_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPinConnection_IsEndPin_Proxy( + IPinConnection * This); + + +void __RPC_STUB IPinConnection_IsEndPin_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IPinConnection_DynamicDisconnect_Proxy( + IPinConnection * This); + + +void __RPC_STUB IPinConnection_DynamicDisconnect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IPinConnection_INTERFACE_DEFINED__ */ + + +#ifndef __IPinFlowControl_INTERFACE_DEFINED__ +#define __IPinFlowControl_INTERFACE_DEFINED__ + +/* interface IPinFlowControl */ +/* [unique][uuid][object][local] */ + + +EXTERN_C const IID IID_IPinFlowControl; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("c56e9858-dbf3-4f6b-8119-384af2060deb") + IPinFlowControl : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Block( + /* [in] */ DWORD dwBlockFlags, + /* [in] */ HANDLE hEvent) = 0; + + }; + +#else /* C style interface */ + + typedef struct IPinFlowControlVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IPinFlowControl * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IPinFlowControl * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IPinFlowControl * This); + + HRESULT ( STDMETHODCALLTYPE *Block )( + IPinFlowControl * This, + /* [in] */ DWORD dwBlockFlags, + /* [in] */ HANDLE hEvent); + + END_INTERFACE + } IPinFlowControlVtbl; + + interface IPinFlowControl + { + CONST_VTBL struct IPinFlowControlVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IPinFlowControl_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IPinFlowControl_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IPinFlowControl_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IPinFlowControl_Block(This,dwBlockFlags,hEvent) \ + (This)->lpVtbl -> Block(This,dwBlockFlags,hEvent) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IPinFlowControl_Block_Proxy( + IPinFlowControl * This, + /* [in] */ DWORD dwBlockFlags, + /* [in] */ HANDLE hEvent); + + +void __RPC_STUB IPinFlowControl_Block_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IPinFlowControl_INTERFACE_DEFINED__ */ + + +/* interface __MIDL_itf_strmif_0369 */ +/* [local] */ + + +enum _AM_PIN_FLOW_CONTROL_BLOCK_FLAGS + { AM_PIN_FLOW_CONTROL_BLOCK = 0x1 + } ; +typedef +enum _AM_GRAPH_CONFIG_RECONNECT_FLAGS + { AM_GRAPH_CONFIG_RECONNECT_DIRECTCONNECT = 0x1, + AM_GRAPH_CONFIG_RECONNECT_CACHE_REMOVED_FILTERS = 0x2, + AM_GRAPH_CONFIG_RECONNECT_USE_ONLY_CACHED_FILTERS = 0x4 + } AM_GRAPH_CONFIG_RECONNECT_FLAGS; + + +enum _REM_FILTER_FLAGS + { REMFILTERF_LEAVECONNECTED = 0x1 + } ; +typedef +enum _AM_FILTER_FLAGS + { AM_FILTER_FLAGS_REMOVABLE = 0x1 + } AM_FILTER_FLAGS; + + + +extern RPC_IF_HANDLE __MIDL_itf_strmif_0369_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_strmif_0369_v0_0_s_ifspec; + +#ifndef __IGraphConfig_INTERFACE_DEFINED__ +#define __IGraphConfig_INTERFACE_DEFINED__ + +/* interface IGraphConfig */ +/* [unique][uuid][object][local] */ + + +EXTERN_C const IID IID_IGraphConfig; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("03A1EB8E-32BF-4245-8502-114D08A9CB88") + IGraphConfig : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Reconnect( + /* [in] */ IPin *pOutputPin, + /* [in] */ IPin *pInputPin, + /* [in] */ const AM_MEDIA_TYPE *pmtFirstConnection, + /* [in] */ IBaseFilter *pUsingFilter, + /* [in] */ HANDLE hAbortEvent, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reconfigure( + /* [in] */ IGraphConfigCallback *pCallback, + /* [in] */ PVOID pvContext, + /* [in] */ DWORD dwFlags, + /* [in] */ HANDLE hAbortEvent) = 0; + + virtual HRESULT STDMETHODCALLTYPE AddFilterToCache( + /* [in] */ IBaseFilter *pFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE EnumCacheFilter( + /* [out] */ IEnumFilters **pEnum) = 0; + + virtual HRESULT STDMETHODCALLTYPE RemoveFilterFromCache( + /* [in] */ IBaseFilter *pFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetStartTime( + /* [out] */ REFERENCE_TIME *prtStart) = 0; + + virtual HRESULT STDMETHODCALLTYPE PushThroughData( + /* [in] */ IPin *pOutputPin, + /* [in] */ IPinConnection *pConnection, + /* [in] */ HANDLE hEventAbort) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetFilterFlags( + /* [in] */ IBaseFilter *pFilter, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetFilterFlags( + /* [in] */ IBaseFilter *pFilter, + /* [out] */ DWORD *pdwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE RemoveFilterEx( + /* [in] */ IBaseFilter *pFilter, + DWORD Flags) = 0; + + }; + +#else /* C style interface */ + + typedef struct IGraphConfigVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IGraphConfig * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IGraphConfig * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IGraphConfig * This); + + HRESULT ( STDMETHODCALLTYPE *Reconnect )( + IGraphConfig * This, + /* [in] */ IPin *pOutputPin, + /* [in] */ IPin *pInputPin, + /* [in] */ const AM_MEDIA_TYPE *pmtFirstConnection, + /* [in] */ IBaseFilter *pUsingFilter, + /* [in] */ HANDLE hAbortEvent, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *Reconfigure )( + IGraphConfig * This, + /* [in] */ IGraphConfigCallback *pCallback, + /* [in] */ PVOID pvContext, + /* [in] */ DWORD dwFlags, + /* [in] */ HANDLE hAbortEvent); + + HRESULT ( STDMETHODCALLTYPE *AddFilterToCache )( + IGraphConfig * This, + /* [in] */ IBaseFilter *pFilter); + + HRESULT ( STDMETHODCALLTYPE *EnumCacheFilter )( + IGraphConfig * This, + /* [out] */ IEnumFilters **pEnum); + + HRESULT ( STDMETHODCALLTYPE *RemoveFilterFromCache )( + IGraphConfig * This, + /* [in] */ IBaseFilter *pFilter); + + HRESULT ( STDMETHODCALLTYPE *GetStartTime )( + IGraphConfig * This, + /* [out] */ REFERENCE_TIME *prtStart); + + HRESULT ( STDMETHODCALLTYPE *PushThroughData )( + IGraphConfig * This, + /* [in] */ IPin *pOutputPin, + /* [in] */ IPinConnection *pConnection, + /* [in] */ HANDLE hEventAbort); + + HRESULT ( STDMETHODCALLTYPE *SetFilterFlags )( + IGraphConfig * This, + /* [in] */ IBaseFilter *pFilter, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *GetFilterFlags )( + IGraphConfig * This, + /* [in] */ IBaseFilter *pFilter, + /* [out] */ DWORD *pdwFlags); + + HRESULT ( STDMETHODCALLTYPE *RemoveFilterEx )( + IGraphConfig * This, + /* [in] */ IBaseFilter *pFilter, + DWORD Flags); + + END_INTERFACE + } IGraphConfigVtbl; + + interface IGraphConfig + { + CONST_VTBL struct IGraphConfigVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IGraphConfig_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IGraphConfig_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IGraphConfig_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IGraphConfig_Reconnect(This,pOutputPin,pInputPin,pmtFirstConnection,pUsingFilter,hAbortEvent,dwFlags) \ + (This)->lpVtbl -> Reconnect(This,pOutputPin,pInputPin,pmtFirstConnection,pUsingFilter,hAbortEvent,dwFlags) + +#define IGraphConfig_Reconfigure(This,pCallback,pvContext,dwFlags,hAbortEvent) \ + (This)->lpVtbl -> Reconfigure(This,pCallback,pvContext,dwFlags,hAbortEvent) + +#define IGraphConfig_AddFilterToCache(This,pFilter) \ + (This)->lpVtbl -> AddFilterToCache(This,pFilter) + +#define IGraphConfig_EnumCacheFilter(This,pEnum) \ + (This)->lpVtbl -> EnumCacheFilter(This,pEnum) + +#define IGraphConfig_RemoveFilterFromCache(This,pFilter) \ + (This)->lpVtbl -> RemoveFilterFromCache(This,pFilter) + +#define IGraphConfig_GetStartTime(This,prtStart) \ + (This)->lpVtbl -> GetStartTime(This,prtStart) + +#define IGraphConfig_PushThroughData(This,pOutputPin,pConnection,hEventAbort) \ + (This)->lpVtbl -> PushThroughData(This,pOutputPin,pConnection,hEventAbort) + +#define IGraphConfig_SetFilterFlags(This,pFilter,dwFlags) \ + (This)->lpVtbl -> SetFilterFlags(This,pFilter,dwFlags) + +#define IGraphConfig_GetFilterFlags(This,pFilter,pdwFlags) \ + (This)->lpVtbl -> GetFilterFlags(This,pFilter,pdwFlags) + +#define IGraphConfig_RemoveFilterEx(This,pFilter,Flags) \ + (This)->lpVtbl -> RemoveFilterEx(This,pFilter,Flags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IGraphConfig_Reconnect_Proxy( + IGraphConfig * This, + /* [in] */ IPin *pOutputPin, + /* [in] */ IPin *pInputPin, + /* [in] */ const AM_MEDIA_TYPE *pmtFirstConnection, + /* [in] */ IBaseFilter *pUsingFilter, + /* [in] */ HANDLE hAbortEvent, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IGraphConfig_Reconnect_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IGraphConfig_Reconfigure_Proxy( + IGraphConfig * This, + /* [in] */ IGraphConfigCallback *pCallback, + /* [in] */ PVOID pvContext, + /* [in] */ DWORD dwFlags, + /* [in] */ HANDLE hAbortEvent); + + +void __RPC_STUB IGraphConfig_Reconfigure_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IGraphConfig_AddFilterToCache_Proxy( + IGraphConfig * This, + /* [in] */ IBaseFilter *pFilter); + + +void __RPC_STUB IGraphConfig_AddFilterToCache_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IGraphConfig_EnumCacheFilter_Proxy( + IGraphConfig * This, + /* [out] */ IEnumFilters **pEnum); + + +void __RPC_STUB IGraphConfig_EnumCacheFilter_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IGraphConfig_RemoveFilterFromCache_Proxy( + IGraphConfig * This, + /* [in] */ IBaseFilter *pFilter); + + +void __RPC_STUB IGraphConfig_RemoveFilterFromCache_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IGraphConfig_GetStartTime_Proxy( + IGraphConfig * This, + /* [out] */ REFERENCE_TIME *prtStart); + + +void __RPC_STUB IGraphConfig_GetStartTime_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IGraphConfig_PushThroughData_Proxy( + IGraphConfig * This, + /* [in] */ IPin *pOutputPin, + /* [in] */ IPinConnection *pConnection, + /* [in] */ HANDLE hEventAbort); + + +void __RPC_STUB IGraphConfig_PushThroughData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IGraphConfig_SetFilterFlags_Proxy( + IGraphConfig * This, + /* [in] */ IBaseFilter *pFilter, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IGraphConfig_SetFilterFlags_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IGraphConfig_GetFilterFlags_Proxy( + IGraphConfig * This, + /* [in] */ IBaseFilter *pFilter, + /* [out] */ DWORD *pdwFlags); + + +void __RPC_STUB IGraphConfig_GetFilterFlags_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IGraphConfig_RemoveFilterEx_Proxy( + IGraphConfig * This, + /* [in] */ IBaseFilter *pFilter, + DWORD Flags); + + +void __RPC_STUB IGraphConfig_RemoveFilterEx_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IGraphConfig_INTERFACE_DEFINED__ */ + + +#ifndef __IGraphConfigCallback_INTERFACE_DEFINED__ +#define __IGraphConfigCallback_INTERFACE_DEFINED__ + +/* interface IGraphConfigCallback */ +/* [unique][uuid][object][local] */ + + +EXTERN_C const IID IID_IGraphConfigCallback; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("ade0fd60-d19d-11d2-abf6-00a0c905f375") + IGraphConfigCallback : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Reconfigure( + PVOID pvContext, + DWORD dwFlags) = 0; + + }; + +#else /* C style interface */ + + typedef struct IGraphConfigCallbackVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IGraphConfigCallback * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IGraphConfigCallback * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IGraphConfigCallback * This); + + HRESULT ( STDMETHODCALLTYPE *Reconfigure )( + IGraphConfigCallback * This, + PVOID pvContext, + DWORD dwFlags); + + END_INTERFACE + } IGraphConfigCallbackVtbl; + + interface IGraphConfigCallback + { + CONST_VTBL struct IGraphConfigCallbackVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IGraphConfigCallback_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IGraphConfigCallback_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IGraphConfigCallback_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IGraphConfigCallback_Reconfigure(This,pvContext,dwFlags) \ + (This)->lpVtbl -> Reconfigure(This,pvContext,dwFlags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IGraphConfigCallback_Reconfigure_Proxy( + IGraphConfigCallback * This, + PVOID pvContext, + DWORD dwFlags); + + +void __RPC_STUB IGraphConfigCallback_Reconfigure_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IGraphConfigCallback_INTERFACE_DEFINED__ */ + + +#ifndef __IFilterChain_INTERFACE_DEFINED__ +#define __IFilterChain_INTERFACE_DEFINED__ + +/* interface IFilterChain */ +/* [unique][uuid][object][local] */ + + +EXTERN_C const IID IID_IFilterChain; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("DCFBDCF6-0DC2-45f5-9AB2-7C330EA09C29") + IFilterChain : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE StartChain( + /* [in] */ IBaseFilter *pStartFilter, + /* [in] */ IBaseFilter *pEndFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE PauseChain( + /* [in] */ IBaseFilter *pStartFilter, + /* [in] */ IBaseFilter *pEndFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE StopChain( + /* [in] */ IBaseFilter *pStartFilter, + /* [in] */ IBaseFilter *pEndFilter) = 0; + + virtual HRESULT STDMETHODCALLTYPE RemoveChain( + /* [in] */ IBaseFilter *pStartFilter, + /* [in] */ IBaseFilter *pEndFilter) = 0; + + }; + +#else /* C style interface */ + + typedef struct IFilterChainVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IFilterChain * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IFilterChain * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IFilterChain * This); + + HRESULT ( STDMETHODCALLTYPE *StartChain )( + IFilterChain * This, + /* [in] */ IBaseFilter *pStartFilter, + /* [in] */ IBaseFilter *pEndFilter); + + HRESULT ( STDMETHODCALLTYPE *PauseChain )( + IFilterChain * This, + /* [in] */ IBaseFilter *pStartFilter, + /* [in] */ IBaseFilter *pEndFilter); + + HRESULT ( STDMETHODCALLTYPE *StopChain )( + IFilterChain * This, + /* [in] */ IBaseFilter *pStartFilter, + /* [in] */ IBaseFilter *pEndFilter); + + HRESULT ( STDMETHODCALLTYPE *RemoveChain )( + IFilterChain * This, + /* [in] */ IBaseFilter *pStartFilter, + /* [in] */ IBaseFilter *pEndFilter); + + END_INTERFACE + } IFilterChainVtbl; + + interface IFilterChain + { + CONST_VTBL struct IFilterChainVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IFilterChain_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IFilterChain_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IFilterChain_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IFilterChain_StartChain(This,pStartFilter,pEndFilter) \ + (This)->lpVtbl -> StartChain(This,pStartFilter,pEndFilter) + +#define IFilterChain_PauseChain(This,pStartFilter,pEndFilter) \ + (This)->lpVtbl -> PauseChain(This,pStartFilter,pEndFilter) + +#define IFilterChain_StopChain(This,pStartFilter,pEndFilter) \ + (This)->lpVtbl -> StopChain(This,pStartFilter,pEndFilter) + +#define IFilterChain_RemoveChain(This,pStartFilter,pEndFilter) \ + (This)->lpVtbl -> RemoveChain(This,pStartFilter,pEndFilter) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IFilterChain_StartChain_Proxy( + IFilterChain * This, + /* [in] */ IBaseFilter *pStartFilter, + /* [in] */ IBaseFilter *pEndFilter); + + +void __RPC_STUB IFilterChain_StartChain_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterChain_PauseChain_Proxy( + IFilterChain * This, + /* [in] */ IBaseFilter *pStartFilter, + /* [in] */ IBaseFilter *pEndFilter); + + +void __RPC_STUB IFilterChain_PauseChain_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterChain_StopChain_Proxy( + IFilterChain * This, + /* [in] */ IBaseFilter *pStartFilter, + /* [in] */ IBaseFilter *pEndFilter); + + +void __RPC_STUB IFilterChain_StopChain_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IFilterChain_RemoveChain_Proxy( + IFilterChain * This, + /* [in] */ IBaseFilter *pStartFilter, + /* [in] */ IBaseFilter *pEndFilter); + + +void __RPC_STUB IFilterChain_RemoveChain_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IFilterChain_INTERFACE_DEFINED__ */ + + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER VARIANT_UserSize( unsigned long *, unsigned long , VARIANT * ); +unsigned char * __RPC_USER VARIANT_UserMarshal( unsigned long *, unsigned char *, VARIANT * ); +unsigned char * __RPC_USER VARIANT_UserUnmarshal(unsigned long *, unsigned char *, VARIANT * ); +void __RPC_USER VARIANT_UserFree( unsigned long *, VARIANT * ); + +/* [local] */ HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder_FindInterface_Proxy( + ICaptureGraphBuilder * This, + /* [unique][in] */ const GUID *pCategory, + /* [in] */ IBaseFilter *pf, + /* [in] */ REFIID riid, + /* [out] */ void **ppint); + + +/* [call_as] */ HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder_FindInterface_Stub( + ICaptureGraphBuilder * This, + /* [unique][in] */ const GUID *pCategory, + /* [in] */ IBaseFilter *pf, + /* [in] */ REFIID riid, + /* [out] */ IUnknown **ppint); + +/* [local] */ HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder2_FindInterface_Proxy( + ICaptureGraphBuilder2 * This, + /* [in] */ const GUID *pCategory, + /* [in] */ const GUID *pType, + /* [in] */ IBaseFilter *pf, + /* [in] */ REFIID riid, + /* [out] */ void **ppint); + + +/* [call_as] */ HRESULT STDMETHODCALLTYPE ICaptureGraphBuilder2_FindInterface_Stub( + ICaptureGraphBuilder2 * This, + /* [in] */ const GUID *pCategory, + /* [in] */ const GUID *pType, + /* [in] */ IBaseFilter *pf, + /* [in] */ REFIID riid, + /* [out] */ IUnknown **ppint); + +/* [local] */ HRESULT STDMETHODCALLTYPE IKsPropertySet_Set_Proxy( + IKsPropertySet * This, + /* [in] */ REFGUID guidPropSet, + /* [in] */ DWORD dwPropID, + /* [size_is][in] */ LPVOID pInstanceData, + /* [in] */ DWORD cbInstanceData, + /* [size_is][in] */ LPVOID pPropData, + /* [in] */ DWORD cbPropData); + + +/* [call_as] */ HRESULT STDMETHODCALLTYPE IKsPropertySet_Set_Stub( + IKsPropertySet * This, + /* [in] */ REFGUID guidPropSet, + /* [in] */ DWORD dwPropID, + /* [size_is][in] */ byte *pInstanceData, + /* [in] */ DWORD cbInstanceData, + /* [size_is][in] */ byte *pPropData, + /* [in] */ DWORD cbPropData); + +/* [local] */ HRESULT STDMETHODCALLTYPE IKsPropertySet_Get_Proxy( + IKsPropertySet * This, + /* [in] */ REFGUID guidPropSet, + /* [in] */ DWORD dwPropID, + /* [size_is][in] */ LPVOID pInstanceData, + /* [in] */ DWORD cbInstanceData, + /* [size_is][out] */ LPVOID pPropData, + /* [in] */ DWORD cbPropData, + /* [out] */ DWORD *pcbReturned); + + +/* [call_as] */ HRESULT STDMETHODCALLTYPE IKsPropertySet_Get_Stub( + IKsPropertySet * This, + /* [in] */ REFGUID guidPropSet, + /* [in] */ DWORD dwPropID, + /* [size_is][in] */ byte *pInstanceData, + /* [in] */ DWORD cbInstanceData, + /* [size_is][out] */ byte *pPropData, + /* [in] */ DWORD cbPropData, + /* [out] */ DWORD *pcbReturned); + + + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/tune.h b/windows_libs/mssdk/include/tune.h new file mode 100644 index 00000000..b72ff96f --- /dev/null +++ b/windows_libs/mssdk/include/tune.h @@ -0,0 +1,812 @@ +//------------------------------------------------------------------------------ +// File: Tune.h +// +// Desc: Additional infrastructure to extend the tuner.idl. Works nicely +// from C++. +// +// Copyright (c) 1999 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#pragma once + +#ifndef TUNE_H +#define TUNE_H + +#include + +namespace BDATuningModel { + +const long DEFAULT_MIN_CHANNEL = 2; +const long DEFAULT_MAX_CHANNEL = 999; +const long DEFAULT_MIN_FREQUENCY = 535; //bottom us am +const long DEFAULT_MAX_FREQUENCY = 108000; // top us fm +const long DEFAULT_ANALOG_TUNER_COUNTRY_CODE = 1; //usa +const TunerInputType DEFAULT_ANALOG_TUNER_INPUT_TYPE = TunerInputCable; //usa + +typedef CComQIPtr PQTuningSpaceContainer; +typedef CComQIPtr PQTuningSpace; +typedef CComQIPtr PQAnalogRadioTuningSpace; +typedef CComQIPtr PQAnalogTVTuningSpace; +typedef CComQIPtr PQATSCTuningSpace; +typedef CComQIPtr PQTuneRequest; +typedef CComQIPtr PQChannelTuneRequest; +typedef CComQIPtr PQATSCChannelTuneRequest; +typedef CComQIPtr PQLocator; +typedef CComQIPtr PQATSCLocator; +typedef CComQIPtr PQDVBTuningSpace; +typedef CComQIPtr PQDVBTuneRequest; +typedef CComQIPtr PQDVBSLocator; +typedef CComQIPtr PQDVBTLocator; + +// tuning space container +class TNTuningSpaceContainer : public PQTuningSpaceContainer { + TNTuningSpaceContainer() {} + TNTuningSpaceContainer(const PQTuningSpaceContainer &a) : PQTuningSpaceContainer(a) {} + TNTuningSpaceContainer(ITuningSpace *p) : PQTuningSpaceContainer(p) {} + TNTuningSpaceContainer(IUnknown *p) : PQTuningSpaceContainer(p) {} + TNTuningSpaceContainer(const TNTuningSpaceContainer &a) : PQTuningSpaceContainer(a) {} + TNTuningSpaceContainer& operator=(TNTuningSpaceContainer& rhs) { + PQTuningSpaceContainer::operator=(rhs); + return *this; + } + +}; + +// tuning spaces +template class TNTuningSpaceHelper : public TUNINGSPACETYPE { +public: + TNTuningSpaceHelper() {} + TNTuningSpaceHelper(const TUNINGSPACETYPE &a) : TUNINGSPACETYPE(a) {} + TNTuningSpaceHelper(ITuningSpace *p) : TUNINGSPACETYPE(p) {} + TNTuningSpaceHelper(IUnknown *p) : TUNINGSPACETYPE(p) {} + TNTuningSpaceHelper(const TNTuningSpaceHelper &a) : TUNINGSPACETYPE(a) {} + TNTuningSpaceHelper& operator=(TNTuningSpaceHelper& rhs) { + TUNINGSPACETYPE::operator=(rhs); + return *this; + } + TNTuningSpaceHelper& operator=(TUNINGSPACETYPE& rhs) { + TUNINGSPACETYPE::operator=(rhs); + return *this; + } + TNTuningSpaceHelper& operator=(IUnknown *rhs) { + TUNINGSPACETYPE::operator=(rhs); + return *this; + } + TNTuningSpaceHelper& operator=(ITuningSpace *rhs) { + TUNINGSPACETYPE::operator=(rhs); + return *this; + } + bool operator==(TUNINGSPACETYPE& rhs) { + CComBSTR rhsname; + HRESULT hr = rhs->get_UniqueName(&rhsname); + if (FAILED(hr)) { + return false; + } + CComBSTR name; + hr = (*this)->get_UniqueName(&name); + if (FAILED(hr)) { + return false; + } + return name == rhsname; + } + PQTuneRequest CreateTuneRequest() { + PQTuneRequest p; + HRESULT hr = (*this)->CreateTuneRequest(&p); + if (FAILED(hr)) { + return PQTuneRequest(); + } + return p; + } + + PQLocator Locator() { + _ASSERT(*this); + PQLocator ts; + HRESULT hr = (*this)->get_DefaultLocator(&ts); + if (FAILED(hr)) { + return PQLocator(); + } + return ts; + } + + HRESULT Locator(PQLocator& l) { + _ASSERT(*this); + return (*this)->put_Locator(l); + } + + void Clone() { + PQTuningSpace t; + HRESULT hr = (*this)->Clone(&t); + if (FAILED(hr) || !t) { + Release(); // clone failed, clear ourselves + return; + } + TUNINGSPACETYPE::operator=(t); + } + +}; + +typedef TNTuningSpaceHelper TNTuningSpace; + +template class TNAnalogRadioTuningSpaceHelper : public TNTuningSpaceHelper { +public: + TNAnalogRadioTuningSpaceHelper() {} + TNAnalogRadioTuningSpaceHelper(const TUNINGSPACETYPE &a) : TNTuningSpaceHelper(a) {} + TNAnalogRadioTuningSpaceHelper(IUnknown *p) : TNTuningSpaceHelper(p) {} + TNAnalogRadioTuningSpaceHelper(const TNAnalogRadioTuningSpaceHelper &a) : TNTuningSpaceHelper(a) {} + TNAnalogRadioTuningSpaceHelper& operator=(TNAnalogRadioTuningSpaceHelper& rhs) { + TNTuningSpaceHelper::operator=(rhs); + return *this; + } + template TNAnalogRadioTuningSpaceHelper& operator=(TNTuningSpaceHelper& rhs) { + TNTuningSpaceHelper::operator=(TUNINGSPACETYPE(rhs)); + return *this; + } + TNAnalogRadioTuningSpaceHelper& operator=(TUNINGSPACETYPE& rhs) { + TNTuningSpaceHelper::operator=(rhs); + return *this; + } + TNAnalogRadioTuningSpaceHelper& operator=(IUnknown* rhs) { + TNTuningSpaceHelper::operator=(rhs); + return *this; + } + long MaxFrequency() { + _ASSERT(*this); + long freq; + HRESULT hr = (*this)->get_MaxFrequency(&freq); + if (FAILED(hr)) { + freq = DEFAULT_MAX_FREQUENCY; + } + return freq; + } + HRESULT MaxFrequency(long freq) { + _ASSERT(*this); + return (*this)->put_MaxFrequency(freq); + } + long MinFrequency() { + _ASSERT(*this); + long freq; + HRESULT hr = (*this)->get_MinFrequency(&freq); + if (FAILED(hr)) { + freq = DEFAULT_MIN_FREQUENCY; + } + return freq; + } + HRESULT MinFrequency(long freq) { + _ASSERT(*this); + return (*this)->put_MinFrequency(freq); + } +}; +typedef TNAnalogRadioTuningSpaceHelper TNAnalogRadioTuningSpace; + +template class TNAnalogTVTuningSpaceHelper : public TNTuningSpaceHelper { +public: + TNAnalogTVTuningSpaceHelper() {} + TNAnalogTVTuningSpaceHelper(const TUNINGSPACETYPE &a) : TNTuningSpaceHelper(a) {} + TNAnalogTVTuningSpaceHelper(IUnknown *p) : TNTuningSpaceHelper(p) {} + TNAnalogTVTuningSpaceHelper(const TNAnalogTVTuningSpaceHelper &a) : TNTuningSpaceHelper(a) {} + TNAnalogTVTuningSpaceHelper& operator=(TNAnalogTVTuningSpaceHelper& rhs) { + TNTuningSpaceHelper::operator=(rhs); + return *this; + } + template TNAnalogTVTuningSpaceHelper& operator=(TNTuningSpaceHelper& rhs) { + TNTuningSpaceHelper::operator=(TUNINGSPACETYPE(rhs)); + return *this; + } + TNAnalogTVTuningSpaceHelper& operator=(TUNINGSPACETYPE& rhs) { + TNTuningSpaceHelper::operator=(rhs); + return *this; + } + TNAnalogTVTuningSpaceHelper& operator=(IUnknown* rhs) { + TNTuningSpaceHelper::operator=(rhs); + return *this; + } + TunerInputType InputType() { + _ASSERT(*this); + TunerInputType ti; + HRESULT hr = (*this)->get_InputType(&ti); + if (FAILED(hr)) { + ti = DEFAULT_ANALOG_TUNER_INPUT_TYPE; + } + return ti; + } + HRESULT InputType(TunerInputType ti) { + _ASSERT(*this); + return (*this)->put_InputType(&ti); + } + long CountryCode() { + _ASSERT(*this); + long cc; + HRESULT hr = (*this)->get_CountryCode(&cc); + if (FAILED(hr)) { + cc = DEFAULT_ANALOG_TUNER_INPUT_TYPE; + } + return cc; + } + HRESULT CountryCode(long cc) { + _ASSERT(*this); + return (*this)->put_CountryCode(cc); + } + long MinChannel() { + _ASSERT(*this); + long chan; + HRESULT hr = (*this)->get_MinChannel(&chan); + if (FAILED(hr)) { + chan = DEFAULT_MIN_CHANNEL; + } + return chan; + } + HRESULT MinChannel(long chan) { + _ASSERT(*this); + return (*this)->put_MinChannel(chan); + } + long MaxChannel() { + _ASSERT(*this); + long chan; + HRESULT hr = (*this)->get_MaxChannel(&chan); + if (FAILED(hr)) { + chan = DEFAULT_MAX_CHANNEL; + } + return chan; + } + HRESULT MaxChannel(long chan) { + _ASSERT(*this); + return (*this)->put_MaxChannel(chan); + } +}; +typedef TNAnalogTVTuningSpaceHelper TNAnalogTVTuningSpace; + +template class TNATSCTuningSpaceHelper : public TNAnalogTVTuningSpaceHelper { +public: + TNATSCTuningSpaceHelper() {} + TNATSCTuningSpaceHelper(const TUNINGSPACETYPE &a) : TNAnalogTVTuningSpaceHelper(a) {} + TNATSCTuningSpaceHelper(IUnknown *p) : TNAnalogTVTuningSpaceHelper(p) {} + TNATSCTuningSpaceHelper(const TNATSCTuningSpaceHelper &a) : TNAnalogTVTuningSpaceHelper(a) {} + + TNATSCTuningSpaceHelper& operator=(TNATSCTuningSpaceHelper& rhs) { + TNAnalogTVTuningSpaceHelper::operator=(rhs); + return *this; + } + template TNATSCTuningSpaceHelper& operator=(TNTuningSpaceHelper& rhs) { + TNAnalogTVTuningSpaceHelper::operator=(TUNINGSPACETYPE(rhs)); + return *this; + } + TNATSCTuningSpaceHelper& operator=(TUNINGSPACETYPE& rhs) { + TNAnalogTVTuningSpaceHelper::operator=(rhs); + return *this; + } + TNATSCTuningSpaceHelper& operator=(IUnknown* rhs) { + TNAnalogTVTuningSpaceHelper::operator=(rhs); + return *this; + } + long MinMinorChannel() { + _ASSERT(*this); + long chan; + HRESULT hr = (*this)->get_MinMinorChannel(&chan); + if (FAILED(hr)) { + chan = DEFAULT_MIN_CHANNEL; + } + return chan; + } + HRESULT MinMinorChannel(long chan) { + _ASSERT(*this); + return (*this)->put_MinMinorChannel(chan); + } + + long MaxMinorChannel() { + _ASSERT(*this); + long chan; + HRESULT hr = (*this)->get_MaxMinorChannel(&chan); + if (FAILED(hr)) { + chan = DEFAULT_MAX_CHANNEL; + } + return chan; + } + HRESULT MaxMinorChannel(long chan) { + _ASSERT(*this); + return (*this)->put_MaxMinorChannel(chan); + } + long MinPhysicalChannel() { + _ASSERT(*this); + long chan; + HRESULT hr = (*this)->get_MinPhysicalChannel(&chan); + if (FAILED(hr)) { + chan = DEFAULT_MIN_CHANNEL; + } + return chan; + } + HRESULT MinPhysicalChannel(long chan) { + _ASSERT(*this); + return (*this)->put_MinPhysicalChannel(chan); + } + + long MaxPhysicalChannel() { + _ASSERT(*this); + long chan; + HRESULT hr = (*this)->get_MaxPhysicalChannel(&chan); + if (FAILED(hr)) { + chan = DEFAULT_MAX_CHANNEL; + } + return chan; + } + + HRESULT MaxPhysicalChannel(long chan) { + _ASSERT(*this); + return (*this)->put_MaxPhysicalChannel(chan); + } +}; +typedef TNATSCTuningSpaceHelper TNATSCTuningSpace; + +// dvb tuning space +template class TNDVBTuningSpaceHelper : public TNTuningSpaceHelper { +public: + TNDVBTuningSpaceHelper() {} + TNDVBTuningSpaceHelper(const TUNINGSPACETYPE &a) : TNTuningSpaceHelper(a) {} + TNDVBTuningSpaceHelper(IUnknown *p) : TNTuningSpaceHelper(p) {} + TNDVBTuningSpaceHelper(const TNDVBTuningSpaceHelper &a) : TNTuningSpaceHelper(a) {} + TNDVBTuningSpaceHelper& operator=(TNDVBTuningSpaceHelper& rhs) { + TNTuningSpaceHelper::operator=(rhs); + return *this; + } + template TNDVBTuningSpaceHelper& operator=(TNTuningSpaceHelper& rhs) { + TNTuningSpaceHelper::operator=(TUNINGSPACETYPE(rhs)); + return *this; + } + TNDVBTuningSpaceHelper& operator=(TUNINGSPACETYPE& rhs) { + TNTuningSpaceHelper::operator=(rhs); + return *this; + } + TNDVBTuningSpaceHelper& operator=(IUnknown* rhs) { + TNTuningSpaceHelper::operator=(rhs); + return *this; + } + DVBSystemType SystemType() const { + DVBSystemType st; + HRESULT hr = (*this)->get_SystemType(&st); + if (FAILED(hr)) { + return DVB_Cable; + } + return st; + } + HRESULT SystemType(DVBSystemType st) { + _ASSERT(*this); + return (*this)->put_SystemType(st); + } +}; +typedef TNDVBTuningSpaceHelper TNDVBTuningSpace; + +// locators +template class TNLocatorHelper : public LOCATORTYPE { +public: + TNLocatorHelper() {} + TNLocatorHelper(const LOCATORTYPE &a) : LOCATORTYPE(a) {} + TNLocatorHelper(IUnknown *p) : LOCATORTYPE(p) {} + TNLocatorHelper(const TNLocatorHelper &a) : LOCATORTYPE(a) {} + TNLocatorHelper(ILocator *p) : LOCATORTYPE(p) {} + TNLocatorHelper& operator=(TNLocatorHelper& rhs) { + LOCATORTYPE::operator=(rhs); + return *this; + } + TNLocatorHelper& operator=(LOCATORTYPE& rhs) { + LOCATORTYPE::operator=(rhs); + return *this; + } + TNLocatorHelper& operator=(ILocator* rhs) { + LOCATORTYPE::operator=(rhs); + return *this; + } + TNLocatorHelper& operator=(IUnknown* rhs) { + LOCATORTYPE::operator=(rhs); + return *this; + } + + void Clone() { + PQLocator t; + HRESULT hr = (*this)->Clone(&t); + if (FAILED(hr) || !t) { + Release(); // clone failed, clear ourselves + return; + } + LOCATORTYPE::operator=(t); + } + + long CarrierFrequency() { + _ASSERT(*this); + long f; + HRESULT hr = (*this)->get_CarrierFrequency(&f); + if (FAILED(hr)) { + return -1; + } + return f; + } + HRESULT CarrierFrequency(long f) { + _ASSERT(*this); + return (*this)->put_CarrierFrequency(f); + } + + FECMethod InnerFEC() { + _ASSERT(*this); + FECMethod f; + HRESULT hr = (*this)->get_InnerFEC(&f); + if (FAILED(hr)) { + return BDA_FEC_METHOD_NOT_SET; + } + return f; + } + HRESULT InnerFEC(FECMethod f) { + _ASSERT(*this); + return (*this)->put_InnerFEC(f); + } + BinaryConvolutionCodeRate InnerFECRate() { + _ASSERT(*this); + BinaryConvolutionCodeRate f; + HRESULT hr = (*this)->get_InnerFECRate(&f); + if (FAILED(hr)) { + return BDA_BCC_RATE_NOT_SET; + } + return f; + } + HRESULT InnerFECRate(BinaryConvolutionCodeRate f) { + _ASSERT(*this); + return (*this)->put_InnerFECRate(f); + } + FECMethod OuterFEC() { + _ASSERT(*this); + FECMethod f; + HRESULT hr = (*this)->get_OuterFEC(&f); + if (FAILED(hr)) { + return BDA_FEC_METHOD_NOT_SET; + } + return f; + } + HRESULT OuterFEC(FECMethod f) { + _ASSERT(*this); + return (*this)->put_OuterFEC(f); + } + BinaryConvolutionCodeRate OuterFECRate() { + _ASSERT(*this); + BinaryConvolutionCodeRate f; + HRESULT hr = (*this)->get_OuterFECRate(&f); + if (FAILED(hr)) { + return BDA_BCC_RATE_NOT_SET; + } + return f; + } + HRESULT OuterFECRate(BinaryConvolutionCodeRate f) { + _ASSERT(*this); + return (*this)->put_OuterFECRate(f); + } + ModulationType Modulation() { + _ASSERT(*this); + ModulationType f; + HRESULT hr = (*this)->get_Modulation(&f); + if (FAILED(hr)) { + return BDA_MOD_NOT_SET; + } + return f; + } + HRESULT Modulation(ModulationType f) { + _ASSERT(*this); + return (*this)->put_Modulation(f); + } + + long SymbolRate() { + _ASSERT(*this); + long f; + HRESULT hr = (*this)->get_SymbolRate(&f); + if (FAILED(hr)) { + return -1; + } + return f; + } + HRESULT SymbolRate(long f) { + _ASSERT(*this); + return (*this)->put_SymbolRate(f); + } + +}; +typedef TNLocatorHelper TNLocator; + +template class TNATSCLocatorHelper : public TNLocatorHelper { +public: + TNATSCLocatorHelper() {} + TNATSCLocatorHelper(const LOCATORTYPE &a) : TNLocatorHelper(a) {} + TNATSCLocatorHelper(IUnknown *p) : TNLocatorHelper(p) {} + TNATSCLocatorHelper(const TNATSCLocatorHelper &a) : TNLocatorHelper(a) {} + TNATSCLocatorHelper(IATSCLocator *p) : TNLocatorHelper(p) {} + TNATSCLocatorHelper(const TNLocatorHelper &a) : TNLocatorHelper(a) {} + TNATSCLocatorHelper& operator=(TNATSCLocatorHelper& rhs) { + TNLocatorHelper::operator=(rhs); + return *this; + } + TNATSCLocatorHelper& operator=(TNLocatorHelper& rhs) { + TNLocatorHelper::operator=(rhs); + return *this; + } + TNATSCLocatorHelper& operator=(LOCATORTYPE& rhs) { + TNLocatorHelper::operator=(rhs); + return *this; + } + TNATSCLocatorHelper& operator=(IATSCLocator* rhs) { + TNLocatorHelper::operator=(rhs); + return *this; + } + TNATSCLocatorHelper& operator=(IUnknown* rhs) { + TNLocatorHelper::operator=(rhs); + return *this; + } + + long PhysicalChannel() { + _ASSERT(*this); + long pc; + HRESULT hr = (*this)->get_PhysicalChannel(&pc); + if (FAILED(hr)) { + return -1; + } + return pc; + } + HRESULT PhysicalChannel(long pc) { + _ASSERT(*this); + return (*this)->put_PhysicalChannel(pc); + } + + long TSID() { + _ASSERT(*this); + long pc; + HRESULT hr = (*this)->get_TSID(&pc); + if (FAILED(hr)) { + return -1; + } + return pc; + } + HRESULT TSID(long pc) { + _ASSERT(*this); + return (*this)->put_TSID(pc); + } + + long ProgramNumber() { + _ASSERT(*this); + long pc; + HRESULT hr = (*this)->get_ProgramNumber(&pc); + if (FAILED(hr)) { + return -1; + } + return pc; + } + HRESULT ProgramNumber(long pc) { + _ASSERT(*this); + return (*this)->put_ProgramNumber(pc); + } +}; +typedef TNATSCLocatorHelper TNATSCLocator; + +// tune requests +template class TNTuneRequestHelper : public TUNEREQUESTTYPE { +public: + TNTuneRequestHelper() {} + TNTuneRequestHelper(const TUNEREQUESTTYPE &a) : TUNEREQUESTTYPE(a) {} + TNTuneRequestHelper(IUnknown *p) : TUNEREQUESTTYPE(p) {} + TNTuneRequestHelper(const TNTuneRequestHelper &a) : TUNEREQUESTTYPE(a) {} + TNTuneRequestHelper(ITuneRequest *p) : TUNEREQUESTTYPE(p) {} + TNTuneRequestHelper& operator=(TNTuneRequestHelper& rhs) { + TUNEREQUESTTYPE::operator=(rhs); + return *this; + } + TNTuneRequestHelper& operator=(TUNEREQUESTTYPE& rhs) { + TUNEREQUESTTYPE::operator=(rhs); + return *this; + } + TNTuneRequestHelper& operator=(ITuneRequest* rhs) { + TUNEREQUESTTYPE::operator=(rhs); + return *this; + } + TNTuneRequestHelper& operator=(IUnknown* rhs) { + TUNEREQUESTTYPE::operator=(rhs); + return *this; + } + // this function creates a new instance of the base ITuneRequest* and copies + // all the values of the current ITuneRequest and sets this to the new one + // this provides the value semantics needed by the network providers + void Clone() { + PQTuneRequest t; + HRESULT hr = (*this)->Clone(&t); + if (FAILED(hr) || !t) { + Release(); // clone failed, clear ourselves + return; + } + TUNEREQUESTTYPE::operator=(t); + } + + PQTuningSpace TuningSpace() { + _ASSERT(*this); + PQTuningSpace ts; + HRESULT hr = (*this)->get_TuningSpace(&ts); + if (FAILED(hr)) { + return PQTuningSpace(); + } + return ts; + } + + LOCATORTYPE Locator() { + _ASSERT(*this); + PQLocator pc; + HRESULT hr = (*this)->get_Locator(&pc); + if (FAILED(hr)) { + return PQLocator(); + } + return pc; + } + HRESULT Locator(LOCATORTYPE& pc) { + _ASSERT(*this); + return (*this)->put_Locator(pc); + } +}; + +typedef TNTuneRequestHelper TNTuneRequest; + +template class TNChannelTuneRequestHelper : public TNTuneRequestHelper { +public: + TNChannelTuneRequestHelper() {} + TNChannelTuneRequestHelper(const TNTuneRequest &a) : TNTuneRequestHelper(a) {} + TNChannelTuneRequestHelper(IChannelTuneRequest *p) : TNTuneRequestHelper(p) {} + TNChannelTuneRequestHelper(IUnknown *p) : TNTuneRequestHelper(p) {} + TNChannelTuneRequestHelper(const TNTuneRequestHelper &a) : TNTuneRequestHelper(a) {} + TNChannelTuneRequestHelper(const TNChannelTuneRequestHelper &a) : TNTuneRequestHelper(a) {} + TNChannelTuneRequestHelper& operator=(TNChannelTuneRequestHelper& rhs) { + TNTuneRequestHelper::operator=(rhs); + return *this; + } + template TNChannelTuneRequestHelper& operator=(TNTuneRequestHelper& rhs) { + TNTuneRequestHelper::operator=(TUNEREQUESTTYPE(rhs)); + return *this; + } + TNChannelTuneRequestHelper& operator=(TUNEREQUESTTYPE& rhs) { + TNTuneRequestHelper::operator=(rhs); + return *this; + } + TNChannelTuneRequestHelper& operator=(IChannelTuneRequest* rhs) { + TNTuneRequestHelper::operator=(rhs); + return *this; + } + TNChannelTuneRequestHelper& operator=(IUnknown* rhs) { + TUNEREQUESTTYPE::operator=(rhs); + return *this; + } + long Channel() { + _ASSERT(*this); + long c; + HRESULT hr = (*this)->get_Channel(&c); + if (FAILED(hr)) { + return -1; + } + return c; + } + HRESULT Channel(long c) { + _ASSERT(*this); + return (*this)->put_Channel(c); + } +}; + +typedef TNChannelTuneRequestHelper TNChannelTuneRequest; + +template class TNATSCChannelTuneRequestHelper : public TNChannelTuneRequestHelper { +public: + TNATSCChannelTuneRequestHelper() {} + TNATSCChannelTuneRequestHelper(const TNTuneRequest &a) : TNChannelTuneRequestHelper(a) {} + TNATSCChannelTuneRequestHelper(IATSCChannelTuneRequest *p) : TNChannelTuneRequestHelper(p) {} + TNATSCChannelTuneRequestHelper(IUnknown *p) : TNChannelTuneRequestHelper(p) {} + TNATSCChannelTuneRequestHelper(const TNChannelTuneRequestHelper &a) : TNChannelTuneRequestHelper(a) {} + TNATSCChannelTuneRequestHelper(const TNATSCChannelTuneRequestHelper &a) : TNChannelTuneRequestHelper(a) {} + TNATSCChannelTuneRequestHelper& operator=(TNATSCChannelTuneRequestHelper& rhs) { + TNChannelTuneRequestHelper::operator=(rhs); + return *this; + } + templateTNATSCChannelTuneRequestHelper& operator=(TNTuneRequestHelper& rhs) { + TNChannelTuneRequestHelper::operator=(TR(rhs)); + return *this; + } + TNATSCChannelTuneRequestHelper& operator=(TUNEREQUESTTYPE& rhs) { + TNChannelTuneRequestHelper::operator=(rhs); + return *this; + } + TNATSCChannelTuneRequestHelper& operator=(IATSCChannelTuneRequest *rhs) { + TNChannelTuneRequestHelper::operator=(rhs); + return *this; + } + TNTuneRequestHelper& operator=(IUnknown* rhs) { + TUNEREQUESTTYPE::operator=(rhs); + return *this; + } + long MinorChannel() { + _ASSERT(*this); + long mc; + HRESULT hr = (*this)->get_MinorChannel(&mc); + if (FAILED(hr)) { + return -1; + } + return mc; + } + HRESULT MinorChannel(long mc) { + _ASSERT(*this); + return (*this)->put_MinorChannel(mc); + } +}; +typedef TNATSCChannelTuneRequestHelper TNATSCChannelTuneRequest; + +template class TNDVBTuneRequestHelper : public TNTuneRequestHelper { +public: + TNDVBTuneRequestHelper() {} + TNDVBTuneRequestHelper(const TNTuneRequest &a) : TNTuneRequestHelper(a) {} + TNDVBTuneRequestHelper(IDVBTuneRequest *p) : TNTuneRequestHelper(p) {} + TNDVBTuneRequestHelper(IUnknown *p) : TNTuneRequestHelper(p) {} + TNDVBTuneRequestHelper(const TNTuneRequestHelper &a) : TNTuneRequestHelper(a) {} + TNDVBTuneRequestHelper(const TNDVBTuneRequestHelper &a) : TNTuneRequestHelper(a) {} + TNDVBTuneRequestHelper& operator=(TNDVBTuneRequestHelper& rhs) { + TNTuneRequestHelper::operator=(rhs); + return *this; + } + template TNDVBTuneRequestHelper& operator=(TNTuneRequestHelper& rhs) { + TNTuneRequestHelper::operator=(TUNEREQUESTTYPE(rhs)); + return *this; + } + TNDVBTuneRequestHelper& operator=(TUNEREQUESTTYPE& rhs) { + TNTuneRequestHelper::operator=(rhs); + return *this; + } + TNDVBTuneRequestHelper& operator=(IDVBTuneRequest* rhs) { + TNTuneRequestHelper::operator=(rhs); + return *this; + } + TNDVBTuneRequestHelper& operator=(IUnknown* rhs) { + TUNEREQUESTTYPE::operator=(rhs); + return *this; + } + long ONID() { + _ASSERT(*this); + long c; + HRESULT hr = (*this)->get_ONID(&c); + if (FAILED(hr)) { + return -1; + } + return c; + } + HRESULT ONID(long c) { + _ASSERT(*this); + return (*this)->put_ONID(c); + } + long TSID() { + _ASSERT(*this); + long c; + HRESULT hr = (*this)->get_TSID(&c); + if (FAILED(hr)) { + return -1; + } + return c; + } + HRESULT TSID(long c) { + _ASSERT(*this); + return (*this)->put_TSID(c); + } + long SID() { + _ASSERT(*this); + long c; + HRESULT hr = (*this)->get_SID(&c); + if (FAILED(hr)) { + return -1; + } + return c; + } + HRESULT SID(long c) { + _ASSERT(*this); + return (*this)->put_SID(c); + } +}; +typedef TNDVBTuneRequestHelper TNDVBTuneRequest; +}; // namespace + +#ifndef NO_DEFAULT_BDATUNINGMODEL_NAMESPACE +using namespace BDATuningModel; +#endif + +#endif +// end of file - tune.h diff --git a/windows_libs/mssdk/include/tuner.h b/windows_libs/mssdk/include/tuner.h new file mode 100644 index 00000000..c799c3d7 --- /dev/null +++ b/windows_libs/mssdk/include/tuner.h @@ -0,0 +1,10115 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0338 */ +/* Compiler settings for tuner.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __tuner_h__ +#define __tuner_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __ITuningSpaces_FWD_DEFINED__ +#define __ITuningSpaces_FWD_DEFINED__ +typedef interface ITuningSpaces ITuningSpaces; +#endif /* __ITuningSpaces_FWD_DEFINED__ */ + + +#ifndef __ITuningSpaceContainer_FWD_DEFINED__ +#define __ITuningSpaceContainer_FWD_DEFINED__ +typedef interface ITuningSpaceContainer ITuningSpaceContainer; +#endif /* __ITuningSpaceContainer_FWD_DEFINED__ */ + + +#ifndef __ITuningSpace_FWD_DEFINED__ +#define __ITuningSpace_FWD_DEFINED__ +typedef interface ITuningSpace ITuningSpace; +#endif /* __ITuningSpace_FWD_DEFINED__ */ + + +#ifndef __IEnumTuningSpaces_FWD_DEFINED__ +#define __IEnumTuningSpaces_FWD_DEFINED__ +typedef interface IEnumTuningSpaces IEnumTuningSpaces; +#endif /* __IEnumTuningSpaces_FWD_DEFINED__ */ + + +#ifndef __IDVBTuningSpace_FWD_DEFINED__ +#define __IDVBTuningSpace_FWD_DEFINED__ +typedef interface IDVBTuningSpace IDVBTuningSpace; +#endif /* __IDVBTuningSpace_FWD_DEFINED__ */ + + +#ifndef __IAnalogTVTuningSpace_FWD_DEFINED__ +#define __IAnalogTVTuningSpace_FWD_DEFINED__ +typedef interface IAnalogTVTuningSpace IAnalogTVTuningSpace; +#endif /* __IAnalogTVTuningSpace_FWD_DEFINED__ */ + + +#ifndef __IATSCTuningSpace_FWD_DEFINED__ +#define __IATSCTuningSpace_FWD_DEFINED__ +typedef interface IATSCTuningSpace IATSCTuningSpace; +#endif /* __IATSCTuningSpace_FWD_DEFINED__ */ + + +#ifndef __IAnalogRadioTuningSpace_FWD_DEFINED__ +#define __IAnalogRadioTuningSpace_FWD_DEFINED__ +typedef interface IAnalogRadioTuningSpace IAnalogRadioTuningSpace; +#endif /* __IAnalogRadioTuningSpace_FWD_DEFINED__ */ + + +#ifndef __ITuneRequest_FWD_DEFINED__ +#define __ITuneRequest_FWD_DEFINED__ +typedef interface ITuneRequest ITuneRequest; +#endif /* __ITuneRequest_FWD_DEFINED__ */ + + +#ifndef __IChannelTuneRequest_FWD_DEFINED__ +#define __IChannelTuneRequest_FWD_DEFINED__ +typedef interface IChannelTuneRequest IChannelTuneRequest; +#endif /* __IChannelTuneRequest_FWD_DEFINED__ */ + + +#ifndef __IATSCChannelTuneRequest_FWD_DEFINED__ +#define __IATSCChannelTuneRequest_FWD_DEFINED__ +typedef interface IATSCChannelTuneRequest IATSCChannelTuneRequest; +#endif /* __IATSCChannelTuneRequest_FWD_DEFINED__ */ + + +#ifndef __IDVBTuneRequest_FWD_DEFINED__ +#define __IDVBTuneRequest_FWD_DEFINED__ +typedef interface IDVBTuneRequest IDVBTuneRequest; +#endif /* __IDVBTuneRequest_FWD_DEFINED__ */ + + +#ifndef __ITuner_FWD_DEFINED__ +#define __ITuner_FWD_DEFINED__ +typedef interface ITuner ITuner; +#endif /* __ITuner_FWD_DEFINED__ */ + + +#ifndef __IScanningTuner_FWD_DEFINED__ +#define __IScanningTuner_FWD_DEFINED__ +typedef interface IScanningTuner IScanningTuner; +#endif /* __IScanningTuner_FWD_DEFINED__ */ + + +#ifndef __ITunerEvents_FWD_DEFINED__ +#define __ITunerEvents_FWD_DEFINED__ +typedef interface ITunerEvents ITunerEvents; +#endif /* __ITunerEvents_FWD_DEFINED__ */ + + +#ifndef __ISignalEvents_FWD_DEFINED__ +#define __ISignalEvents_FWD_DEFINED__ +typedef interface ISignalEvents ISignalEvents; +#endif /* __ISignalEvents_FWD_DEFINED__ */ + + +#ifndef __IComponentType_FWD_DEFINED__ +#define __IComponentType_FWD_DEFINED__ +typedef interface IComponentType IComponentType; +#endif /* __IComponentType_FWD_DEFINED__ */ + + +#ifndef __ILanguageComponentType_FWD_DEFINED__ +#define __ILanguageComponentType_FWD_DEFINED__ +typedef interface ILanguageComponentType ILanguageComponentType; +#endif /* __ILanguageComponentType_FWD_DEFINED__ */ + + +#ifndef __IMPEG2ComponentType_FWD_DEFINED__ +#define __IMPEG2ComponentType_FWD_DEFINED__ +typedef interface IMPEG2ComponentType IMPEG2ComponentType; +#endif /* __IMPEG2ComponentType_FWD_DEFINED__ */ + + +#ifndef __IATSCComponentType_FWD_DEFINED__ +#define __IATSCComponentType_FWD_DEFINED__ +typedef interface IATSCComponentType IATSCComponentType; +#endif /* __IATSCComponentType_FWD_DEFINED__ */ + + +#ifndef __IEnumComponentTypes_FWD_DEFINED__ +#define __IEnumComponentTypes_FWD_DEFINED__ +typedef interface IEnumComponentTypes IEnumComponentTypes; +#endif /* __IEnumComponentTypes_FWD_DEFINED__ */ + + +#ifndef __IComponentTypes_FWD_DEFINED__ +#define __IComponentTypes_FWD_DEFINED__ +typedef interface IComponentTypes IComponentTypes; +#endif /* __IComponentTypes_FWD_DEFINED__ */ + + +#ifndef __IComponent_FWD_DEFINED__ +#define __IComponent_FWD_DEFINED__ +typedef interface IComponent IComponent; +#endif /* __IComponent_FWD_DEFINED__ */ + + +#ifndef __IMPEG2Component_FWD_DEFINED__ +#define __IMPEG2Component_FWD_DEFINED__ +typedef interface IMPEG2Component IMPEG2Component; +#endif /* __IMPEG2Component_FWD_DEFINED__ */ + + +#ifndef __IEnumComponents_FWD_DEFINED__ +#define __IEnumComponents_FWD_DEFINED__ +typedef interface IEnumComponents IEnumComponents; +#endif /* __IEnumComponents_FWD_DEFINED__ */ + + +#ifndef __IComponents_FWD_DEFINED__ +#define __IComponents_FWD_DEFINED__ +typedef interface IComponents IComponents; +#endif /* __IComponents_FWD_DEFINED__ */ + + +#ifndef __ILocator_FWD_DEFINED__ +#define __ILocator_FWD_DEFINED__ +typedef interface ILocator ILocator; +#endif /* __ILocator_FWD_DEFINED__ */ + + +#ifndef __IATSCLocator_FWD_DEFINED__ +#define __IATSCLocator_FWD_DEFINED__ +typedef interface IATSCLocator IATSCLocator; +#endif /* __IATSCLocator_FWD_DEFINED__ */ + + +#ifndef __IDVBTLocator_FWD_DEFINED__ +#define __IDVBTLocator_FWD_DEFINED__ +typedef interface IDVBTLocator IDVBTLocator; +#endif /* __IDVBTLocator_FWD_DEFINED__ */ + + +#ifndef __IDVBSLocator_FWD_DEFINED__ +#define __IDVBSLocator_FWD_DEFINED__ +typedef interface IDVBSLocator IDVBSLocator; +#endif /* __IDVBSLocator_FWD_DEFINED__ */ + + +#ifndef __IDVBCLocator_FWD_DEFINED__ +#define __IDVBCLocator_FWD_DEFINED__ +typedef interface IDVBCLocator IDVBCLocator; +#endif /* __IDVBCLocator_FWD_DEFINED__ */ + + +#ifndef __SystemTuningSpaces_FWD_DEFINED__ +#define __SystemTuningSpaces_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class SystemTuningSpaces SystemTuningSpaces; +#else +typedef struct SystemTuningSpaces SystemTuningSpaces; +#endif /* __cplusplus */ + +#endif /* __SystemTuningSpaces_FWD_DEFINED__ */ + + +#ifndef __TuningSpace_FWD_DEFINED__ +#define __TuningSpace_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class TuningSpace TuningSpace; +#else +typedef struct TuningSpace TuningSpace; +#endif /* __cplusplus */ + +#endif /* __TuningSpace_FWD_DEFINED__ */ + + +#ifndef __ATSCTuningSpace_FWD_DEFINED__ +#define __ATSCTuningSpace_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class ATSCTuningSpace ATSCTuningSpace; +#else +typedef struct ATSCTuningSpace ATSCTuningSpace; +#endif /* __cplusplus */ + +#endif /* __ATSCTuningSpace_FWD_DEFINED__ */ + + +#ifndef __AnalogRadioTuningSpace_FWD_DEFINED__ +#define __AnalogRadioTuningSpace_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class AnalogRadioTuningSpace AnalogRadioTuningSpace; +#else +typedef struct AnalogRadioTuningSpace AnalogRadioTuningSpace; +#endif /* __cplusplus */ + +#endif /* __AnalogRadioTuningSpace_FWD_DEFINED__ */ + + +#ifndef __AnalogTVTuningSpace_FWD_DEFINED__ +#define __AnalogTVTuningSpace_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class AnalogTVTuningSpace AnalogTVTuningSpace; +#else +typedef struct AnalogTVTuningSpace AnalogTVTuningSpace; +#endif /* __cplusplus */ + +#endif /* __AnalogTVTuningSpace_FWD_DEFINED__ */ + + +#ifndef __DVBTuningSpace_FWD_DEFINED__ +#define __DVBTuningSpace_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DVBTuningSpace DVBTuningSpace; +#else +typedef struct DVBTuningSpace DVBTuningSpace; +#endif /* __cplusplus */ + +#endif /* __DVBTuningSpace_FWD_DEFINED__ */ + + +#ifndef __ComponentTypes_FWD_DEFINED__ +#define __ComponentTypes_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class ComponentTypes ComponentTypes; +#else +typedef struct ComponentTypes ComponentTypes; +#endif /* __cplusplus */ + +#endif /* __ComponentTypes_FWD_DEFINED__ */ + + +#ifndef __ComponentType_FWD_DEFINED__ +#define __ComponentType_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class ComponentType ComponentType; +#else +typedef struct ComponentType ComponentType; +#endif /* __cplusplus */ + +#endif /* __ComponentType_FWD_DEFINED__ */ + + +#ifndef __LanguageComponentType_FWD_DEFINED__ +#define __LanguageComponentType_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class LanguageComponentType LanguageComponentType; +#else +typedef struct LanguageComponentType LanguageComponentType; +#endif /* __cplusplus */ + +#endif /* __LanguageComponentType_FWD_DEFINED__ */ + + +#ifndef __MPEG2ComponentType_FWD_DEFINED__ +#define __MPEG2ComponentType_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class MPEG2ComponentType MPEG2ComponentType; +#else +typedef struct MPEG2ComponentType MPEG2ComponentType; +#endif /* __cplusplus */ + +#endif /* __MPEG2ComponentType_FWD_DEFINED__ */ + + +#ifndef __ATSCComponentType_FWD_DEFINED__ +#define __ATSCComponentType_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class ATSCComponentType ATSCComponentType; +#else +typedef struct ATSCComponentType ATSCComponentType; +#endif /* __cplusplus */ + +#endif /* __ATSCComponentType_FWD_DEFINED__ */ + + +#ifndef __Components_FWD_DEFINED__ +#define __Components_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class Components Components; +#else +typedef struct Components Components; +#endif /* __cplusplus */ + +#endif /* __Components_FWD_DEFINED__ */ + + +#ifndef __Component_FWD_DEFINED__ +#define __Component_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class Component Component; +#else +typedef struct Component Component; +#endif /* __cplusplus */ + +#endif /* __Component_FWD_DEFINED__ */ + + +#ifndef __MPEG2Component_FWD_DEFINED__ +#define __MPEG2Component_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class MPEG2Component MPEG2Component; +#else +typedef struct MPEG2Component MPEG2Component; +#endif /* __cplusplus */ + +#endif /* __MPEG2Component_FWD_DEFINED__ */ + + +#ifndef __TuneRequest_FWD_DEFINED__ +#define __TuneRequest_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class TuneRequest TuneRequest; +#else +typedef struct TuneRequest TuneRequest; +#endif /* __cplusplus */ + +#endif /* __TuneRequest_FWD_DEFINED__ */ + + +#ifndef __ChannelTuneRequest_FWD_DEFINED__ +#define __ChannelTuneRequest_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class ChannelTuneRequest ChannelTuneRequest; +#else +typedef struct ChannelTuneRequest ChannelTuneRequest; +#endif /* __cplusplus */ + +#endif /* __ChannelTuneRequest_FWD_DEFINED__ */ + + +#ifndef __ATSCChannelTuneRequest_FWD_DEFINED__ +#define __ATSCChannelTuneRequest_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class ATSCChannelTuneRequest ATSCChannelTuneRequest; +#else +typedef struct ATSCChannelTuneRequest ATSCChannelTuneRequest; +#endif /* __cplusplus */ + +#endif /* __ATSCChannelTuneRequest_FWD_DEFINED__ */ + + +#ifndef __Locator_FWD_DEFINED__ +#define __Locator_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class Locator Locator; +#else +typedef struct Locator Locator; +#endif /* __cplusplus */ + +#endif /* __Locator_FWD_DEFINED__ */ + + +#ifndef __ATSCLocator_FWD_DEFINED__ +#define __ATSCLocator_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class ATSCLocator ATSCLocator; +#else +typedef struct ATSCLocator ATSCLocator; +#endif /* __cplusplus */ + +#endif /* __ATSCLocator_FWD_DEFINED__ */ + + +#ifndef __DVBTLocator_FWD_DEFINED__ +#define __DVBTLocator_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DVBTLocator DVBTLocator; +#else +typedef struct DVBTLocator DVBTLocator; +#endif /* __cplusplus */ + +#endif /* __DVBTLocator_FWD_DEFINED__ */ + + +#ifndef __DVBSLocator_FWD_DEFINED__ +#define __DVBSLocator_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DVBSLocator DVBSLocator; +#else +typedef struct DVBSLocator DVBSLocator; +#endif /* __cplusplus */ + +#endif /* __DVBSLocator_FWD_DEFINED__ */ + + +#ifndef __DVBCLocator_FWD_DEFINED__ +#define __DVBCLocator_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DVBCLocator DVBCLocator; +#else +typedef struct DVBCLocator DVBCLocator; +#endif /* __cplusplus */ + +#endif /* __DVBCLocator_FWD_DEFINED__ */ + + +#ifndef __DVBTuneRequest_FWD_DEFINED__ +#define __DVBTuneRequest_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class DVBTuneRequest DVBTuneRequest; +#else +typedef struct DVBTuneRequest DVBTuneRequest; +#endif /* __cplusplus */ + +#endif /* __DVBTuneRequest_FWD_DEFINED__ */ + + +#ifndef __CreatePropBagOnRegKey_FWD_DEFINED__ +#define __CreatePropBagOnRegKey_FWD_DEFINED__ + +#ifdef __cplusplus +typedef class CreatePropBagOnRegKey CreatePropBagOnRegKey; +#else +typedef struct CreatePropBagOnRegKey CreatePropBagOnRegKey; +#endif /* __cplusplus */ + +#endif /* __CreatePropBagOnRegKey_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "oaidl.h" +#include "comcat.h" +#include "strmif.h" +#include "bdatypes.h" +#include "regbag.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_tuner_0000 */ +/* [local] */ + +//+------------------------------------------------------------------------- +// +// Microsoft Windows +// Copyright (C) Microsoft Corporation, 1999-2000. +// +//-------------------------------------------------------------------------- +#pragma once +#include + + + + + + + + + + + + + + + + + + + + + +enum __MIDL___MIDL_itf_tuner_0000_0001 + { DISPID_TUNER_TS_UNIQUENAME = 1, + DISPID_TUNER_TS_FRIENDLYNAME = 2, + DISPID_TUNER_TS_CLSID = 3, + DISPID_TUNER_TS_NETWORKTYPE = 4, + DISPID_TUNER_TS__NETWORKTYPE = 5, + DISPID_TUNER_TS_CREATETUNEREQUEST = 6, + DISPID_TUNER_TS_ENUMCATEGORYGUIDS = 7, + DISPID_TUNER_TS_ENUMDEVICEMONIKERS = 8, + DISPID_TUNER_TS_DEFAULTPREFERREDCOMPONENTTYPES = 9, + DISPID_TUNER_TS_FREQMAP = 10, + DISPID_TUNER_TS_DEFLOCATOR = 11, + DISPID_TUNER_TS_CLONE = 12, + DISPID_TUNER_TR_TUNINGSPACE = 1, + DISPID_TUNER_TR_COMPONENTS = 2, + DISPID_TUNER_TR_CLONE = 3, + DISPID_TUNER_TR_LOCATOR = 4, + DISPID_TUNER_CT_CATEGORY = 1, + DISPID_TUNER_CT_MEDIAMAJORTYPE = 2, + DISPID_TUNER_CT__MEDIAMAJORTYPE = 3, + DISPID_TUNER_CT_MEDIASUBTYPE = 4, + DISPID_TUNER_CT__MEDIASUBTYPE = 5, + DISPID_TUNER_CT_MEDIAFORMATTYPE = 6, + DISPID_TUNER_CT__MEDIAFORMATTYPE = 7, + DISPID_TUNER_CT_MEDIATYPE = 8, + DISPID_TUNER_CT_CLONE = 9, + DISPID_TUNER_LCT_LANGID = 100, + DISPID_TUNER_MP2CT_TYPE = 200, + DISPID_TUNER_ATSCCT_FLAGS = 300, + DISPID_TUNER_L_CARRFREQ = 1, + DISPID_TUNER_L_INNERFECMETHOD = 2, + DISPID_TUNER_L_INNERFECRATE = 3, + DISPID_TUNER_L_OUTERFECMETHOD = 4, + DISPID_TUNER_L_OUTERFECRATE = 5, + DISPID_TUNER_L_MOD = 6, + DISPID_TUNER_L_SYMRATE = 7, + DISPID_TUNER_L_CLONE = 8, + DISPID_TUNER_L_ATSC_PHYS_CHANNEL = 201, + DISPID_TUNER_L_ATSC_TSID = 202, + DISPID_TUNER_L_DVBT_BANDWIDTH = 301, + DISPID_TUNER_L_DVBT_LPINNERFECMETHOD = 302, + DISPID_TUNER_L_DVBT_LPINNERFECRATE = 303, + DISPID_TUNER_L_DVBT_GUARDINTERVAL = 304, + DISPID_TUNER_L_DVBT_HALPHA = 305, + DISPID_TUNER_L_DVBT_TRANSMISSIONMODE = 306, + DISPID_TUNER_L_DVBT_INUSE = 307, + DISPID_TUNER_L_DVBS_POLARISATION = 401, + DISPID_TUNER_L_DVBS_WEST = 402, + DISPID_TUNER_L_DVBS_ORBITAL = 403, + DISPID_TUNER_L_DVBS_AZIMUTH = 404, + DISPID_TUNER_L_DVBS_ELEVATION = 405, + DISPID_TUNER_C_TYPE = 1, + DISPID_TUNER_C_STATUS = 2, + DISPID_TUNER_C_LANGID = 3, + DISPID_TUNER_C_DESCRIPTION = 4, + DISPID_TUNER_C_CLONE = 5, + DISPID_TUNER_C_MP2_PID = 101, + DISPID_TUNER_C_MP2_PCRPID = 102, + DISPID_TUNER_C_MP2_PROGNO = 103, + DISPID_TUNER_TS_DVB_SYSTEMTYPE = 101, + DISPID_TUNER_TS_AR_MINFREQUENCY = 101, + DISPID_TUNER_TS_AR_MAXFREQUENCY = 102, + DISPID_TUNER_TS_AR_STEP = 103, + DISPID_TUNER_TS_ATV_MINCHANNEL = 101, + DISPID_TUNER_TS_ATV_MAXCHANNEL = 102, + DISPID_TUNER_TS_ATV_INPUTTYPE = 103, + DISPID_TUNER_TS_ATV_COUNTRYCODE = 104, + DISPID_TUNER_TS_ATSC_MINMINORCHANNEL = 201, + DISPID_TUNER_TS_ATSC_MAXMINORCHANNEL = 202, + DISPID_TUNER_TS_ATSC_MINPHYSCHANNEL = 203, + DISPID_TUNER_TS_ATSC_MAXPHYSCHANNEL = 204, + DISPID_CHTUNER_ATVAC_CHANNEL = 101, + DISPID_CHTUNER_ATVDC_SYSTEM = 101, + DISPID_CHTUNER_ATVDC_CONTENT = 102, + DISPID_CHTUNER_CTR_CHANNEL = 101, + DISPID_CHTUNER_ACTR_MINOR_CHANNEL = 201, + DISPID_DVBTUNER_DVBC_ATTRIBUTESVALID = 101, + DISPID_DVBTUNER_DVBC_PID = 102, + DISPID_DVBTUNER_DVBC_TAG = 103, + DISPID_DVBTUNER_DVBC_COMPONENTTYPE = 104, + DISPID_DVBTUNER_ONID = 101, + DISPID_DVBTUNER_TSID = 102, + DISPID_DVBTUNER_SID = 103 + } ; + + +extern RPC_IF_HANDLE __MIDL_itf_tuner_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_tuner_0000_v0_0_s_ifspec; + +#ifndef __ITuningSpaces_INTERFACE_DEFINED__ +#define __ITuningSpaces_INTERFACE_DEFINED__ + +/* interface ITuningSpaces */ +/* [unique][helpstring][nonextensible][oleautomation][dual][uuid][object] */ + + +EXTERN_C const IID IID_ITuningSpaces; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("901284E4-33FE-4b69-8D63-634A596F3756") + ITuningSpaces : public IDispatch + { + public: + virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Count( + /* [retval][out] */ long *Count) = 0; + + virtual /* [restricted][hidden][id][propget] */ HRESULT STDMETHODCALLTYPE get__NewEnum( + /* [retval][out] */ IEnumVARIANT **NewEnum) = 0; + + virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Item( + /* [in] */ VARIANT varIndex, + /* [retval][out] */ ITuningSpace **TuningSpace) = 0; + + virtual /* [helpstring][restricted][hidden][propget] */ HRESULT STDMETHODCALLTYPE get_EnumTuningSpaces( + /* [retval][out] */ IEnumTuningSpaces **NewEnum) = 0; + + }; + +#else /* C style interface */ + + typedef struct ITuningSpacesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ITuningSpaces * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ITuningSpaces * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ITuningSpaces * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ITuningSpaces * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ITuningSpaces * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ITuningSpaces * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ITuningSpaces * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( + ITuningSpaces * This, + /* [retval][out] */ long *Count); + + /* [restricted][hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( + ITuningSpaces * This, + /* [retval][out] */ IEnumVARIANT **NewEnum); + + /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Item )( + ITuningSpaces * This, + /* [in] */ VARIANT varIndex, + /* [retval][out] */ ITuningSpace **TuningSpace); + + /* [helpstring][restricted][hidden][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EnumTuningSpaces )( + ITuningSpaces * This, + /* [retval][out] */ IEnumTuningSpaces **NewEnum); + + END_INTERFACE + } ITuningSpacesVtbl; + + interface ITuningSpaces + { + CONST_VTBL struct ITuningSpacesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ITuningSpaces_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ITuningSpaces_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ITuningSpaces_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ITuningSpaces_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ITuningSpaces_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ITuningSpaces_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ITuningSpaces_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ITuningSpaces_get_Count(This,Count) \ + (This)->lpVtbl -> get_Count(This,Count) + +#define ITuningSpaces_get__NewEnum(This,NewEnum) \ + (This)->lpVtbl -> get__NewEnum(This,NewEnum) + +#define ITuningSpaces_get_Item(This,varIndex,TuningSpace) \ + (This)->lpVtbl -> get_Item(This,varIndex,TuningSpace) + +#define ITuningSpaces_get_EnumTuningSpaces(This,NewEnum) \ + (This)->lpVtbl -> get_EnumTuningSpaces(This,NewEnum) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE ITuningSpaces_get_Count_Proxy( + ITuningSpaces * This, + /* [retval][out] */ long *Count); + + +void __RPC_STUB ITuningSpaces_get_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][hidden][id][propget] */ HRESULT STDMETHODCALLTYPE ITuningSpaces_get__NewEnum_Proxy( + ITuningSpaces * This, + /* [retval][out] */ IEnumVARIANT **NewEnum); + + +void __RPC_STUB ITuningSpaces_get__NewEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE ITuningSpaces_get_Item_Proxy( + ITuningSpaces * This, + /* [in] */ VARIANT varIndex, + /* [retval][out] */ ITuningSpace **TuningSpace); + + +void __RPC_STUB ITuningSpaces_get_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][restricted][hidden][propget] */ HRESULT STDMETHODCALLTYPE ITuningSpaces_get_EnumTuningSpaces_Proxy( + ITuningSpaces * This, + /* [retval][out] */ IEnumTuningSpaces **NewEnum); + + +void __RPC_STUB ITuningSpaces_get_EnumTuningSpaces_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ITuningSpaces_INTERFACE_DEFINED__ */ + + +#ifndef __ITuningSpaceContainer_INTERFACE_DEFINED__ +#define __ITuningSpaceContainer_INTERFACE_DEFINED__ + +/* interface ITuningSpaceContainer */ +/* [unique][helpstring][nonextensible][hidden][oleautomation][dual][uuid][object] */ + + +EXTERN_C const IID IID_ITuningSpaceContainer; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("5B692E84-E2F1-11d2-9493-00C04F72D980") + ITuningSpaceContainer : public IDispatch + { + public: + virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Count( + /* [retval][out] */ long *Count) = 0; + + virtual /* [restricted][hidden][id][propget] */ HRESULT STDMETHODCALLTYPE get__NewEnum( + /* [retval][out] */ IEnumVARIANT **NewEnum) = 0; + + virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Item( + /* [in] */ VARIANT varIndex, + /* [retval][out] */ ITuningSpace **TuningSpace) = 0; + + virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_Item( + /* [in] */ VARIANT varIndex, + /* [in] */ ITuningSpace *TuningSpace) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE TuningSpacesForCLSID( + /* [in] */ BSTR SpaceCLSID, + /* [retval][out] */ ITuningSpaces **NewColl) = 0; + + virtual /* [helpstring][restricted][hidden] */ HRESULT STDMETHODCALLTYPE _TuningSpacesForCLSID( + /* [in] */ REFCLSID SpaceCLSID, + /* [retval][out] */ ITuningSpaces **NewColl) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE TuningSpacesForName( + /* [in] */ BSTR Name, + /* [retval][out] */ ITuningSpaces **NewColl) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE FindID( + /* [in] */ ITuningSpace *TuningSpace, + /* [retval][out] */ long *ID) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Add( + /* [in] */ ITuningSpace *TuningSpace, + /* [retval][out] */ VARIANT *NewIndex) = 0; + + virtual /* [helpstring][restricted][hidden][propget] */ HRESULT STDMETHODCALLTYPE get_EnumTuningSpaces( + /* [retval][out] */ IEnumTuningSpaces **ppEnum) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Remove( + /* [in] */ VARIANT Index) = 0; + + virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_MaxCount( + /* [retval][out] */ long *MaxCount) = 0; + + virtual /* [helpstring][restricted][hidden][propput] */ HRESULT STDMETHODCALLTYPE put_MaxCount( + /* [in] */ long MaxCount) = 0; + + }; + +#else /* C style interface */ + + typedef struct ITuningSpaceContainerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ITuningSpaceContainer * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ITuningSpaceContainer * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ITuningSpaceContainer * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ITuningSpaceContainer * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ITuningSpaceContainer * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ITuningSpaceContainer * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ITuningSpaceContainer * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( + ITuningSpaceContainer * This, + /* [retval][out] */ long *Count); + + /* [restricted][hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( + ITuningSpaceContainer * This, + /* [retval][out] */ IEnumVARIANT **NewEnum); + + /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Item )( + ITuningSpaceContainer * This, + /* [in] */ VARIANT varIndex, + /* [retval][out] */ ITuningSpace **TuningSpace); + + /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Item )( + ITuningSpaceContainer * This, + /* [in] */ VARIANT varIndex, + /* [in] */ ITuningSpace *TuningSpace); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *TuningSpacesForCLSID )( + ITuningSpaceContainer * This, + /* [in] */ BSTR SpaceCLSID, + /* [retval][out] */ ITuningSpaces **NewColl); + + /* [helpstring][restricted][hidden] */ HRESULT ( STDMETHODCALLTYPE *_TuningSpacesForCLSID )( + ITuningSpaceContainer * This, + /* [in] */ REFCLSID SpaceCLSID, + /* [retval][out] */ ITuningSpaces **NewColl); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *TuningSpacesForName )( + ITuningSpaceContainer * This, + /* [in] */ BSTR Name, + /* [retval][out] */ ITuningSpaces **NewColl); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *FindID )( + ITuningSpaceContainer * This, + /* [in] */ ITuningSpace *TuningSpace, + /* [retval][out] */ long *ID); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Add )( + ITuningSpaceContainer * This, + /* [in] */ ITuningSpace *TuningSpace, + /* [retval][out] */ VARIANT *NewIndex); + + /* [helpstring][restricted][hidden][propget] */ HRESULT ( STDMETHODCALLTYPE *get_EnumTuningSpaces )( + ITuningSpaceContainer * This, + /* [retval][out] */ IEnumTuningSpaces **ppEnum); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Remove )( + ITuningSpaceContainer * This, + /* [in] */ VARIANT Index); + + /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MaxCount )( + ITuningSpaceContainer * This, + /* [retval][out] */ long *MaxCount); + + /* [helpstring][restricted][hidden][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MaxCount )( + ITuningSpaceContainer * This, + /* [in] */ long MaxCount); + + END_INTERFACE + } ITuningSpaceContainerVtbl; + + interface ITuningSpaceContainer + { + CONST_VTBL struct ITuningSpaceContainerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ITuningSpaceContainer_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ITuningSpaceContainer_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ITuningSpaceContainer_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ITuningSpaceContainer_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ITuningSpaceContainer_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ITuningSpaceContainer_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ITuningSpaceContainer_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ITuningSpaceContainer_get_Count(This,Count) \ + (This)->lpVtbl -> get_Count(This,Count) + +#define ITuningSpaceContainer_get__NewEnum(This,NewEnum) \ + (This)->lpVtbl -> get__NewEnum(This,NewEnum) + +#define ITuningSpaceContainer_get_Item(This,varIndex,TuningSpace) \ + (This)->lpVtbl -> get_Item(This,varIndex,TuningSpace) + +#define ITuningSpaceContainer_put_Item(This,varIndex,TuningSpace) \ + (This)->lpVtbl -> put_Item(This,varIndex,TuningSpace) + +#define ITuningSpaceContainer_TuningSpacesForCLSID(This,SpaceCLSID,NewColl) \ + (This)->lpVtbl -> TuningSpacesForCLSID(This,SpaceCLSID,NewColl) + +#define ITuningSpaceContainer__TuningSpacesForCLSID(This,SpaceCLSID,NewColl) \ + (This)->lpVtbl -> _TuningSpacesForCLSID(This,SpaceCLSID,NewColl) + +#define ITuningSpaceContainer_TuningSpacesForName(This,Name,NewColl) \ + (This)->lpVtbl -> TuningSpacesForName(This,Name,NewColl) + +#define ITuningSpaceContainer_FindID(This,TuningSpace,ID) \ + (This)->lpVtbl -> FindID(This,TuningSpace,ID) + +#define ITuningSpaceContainer_Add(This,TuningSpace,NewIndex) \ + (This)->lpVtbl -> Add(This,TuningSpace,NewIndex) + +#define ITuningSpaceContainer_get_EnumTuningSpaces(This,ppEnum) \ + (This)->lpVtbl -> get_EnumTuningSpaces(This,ppEnum) + +#define ITuningSpaceContainer_Remove(This,Index) \ + (This)->lpVtbl -> Remove(This,Index) + +#define ITuningSpaceContainer_get_MaxCount(This,MaxCount) \ + (This)->lpVtbl -> get_MaxCount(This,MaxCount) + +#define ITuningSpaceContainer_put_MaxCount(This,MaxCount) \ + (This)->lpVtbl -> put_MaxCount(This,MaxCount) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE ITuningSpaceContainer_get_Count_Proxy( + ITuningSpaceContainer * This, + /* [retval][out] */ long *Count); + + +void __RPC_STUB ITuningSpaceContainer_get_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][hidden][id][propget] */ HRESULT STDMETHODCALLTYPE ITuningSpaceContainer_get__NewEnum_Proxy( + ITuningSpaceContainer * This, + /* [retval][out] */ IEnumVARIANT **NewEnum); + + +void __RPC_STUB ITuningSpaceContainer_get__NewEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE ITuningSpaceContainer_get_Item_Proxy( + ITuningSpaceContainer * This, + /* [in] */ VARIANT varIndex, + /* [retval][out] */ ITuningSpace **TuningSpace); + + +void __RPC_STUB ITuningSpaceContainer_get_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE ITuningSpaceContainer_put_Item_Proxy( + ITuningSpaceContainer * This, + /* [in] */ VARIANT varIndex, + /* [in] */ ITuningSpace *TuningSpace); + + +void __RPC_STUB ITuningSpaceContainer_put_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE ITuningSpaceContainer_TuningSpacesForCLSID_Proxy( + ITuningSpaceContainer * This, + /* [in] */ BSTR SpaceCLSID, + /* [retval][out] */ ITuningSpaces **NewColl); + + +void __RPC_STUB ITuningSpaceContainer_TuningSpacesForCLSID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][restricted][hidden] */ HRESULT STDMETHODCALLTYPE ITuningSpaceContainer__TuningSpacesForCLSID_Proxy( + ITuningSpaceContainer * This, + /* [in] */ REFCLSID SpaceCLSID, + /* [retval][out] */ ITuningSpaces **NewColl); + + +void __RPC_STUB ITuningSpaceContainer__TuningSpacesForCLSID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE ITuningSpaceContainer_TuningSpacesForName_Proxy( + ITuningSpaceContainer * This, + /* [in] */ BSTR Name, + /* [retval][out] */ ITuningSpaces **NewColl); + + +void __RPC_STUB ITuningSpaceContainer_TuningSpacesForName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE ITuningSpaceContainer_FindID_Proxy( + ITuningSpaceContainer * This, + /* [in] */ ITuningSpace *TuningSpace, + /* [retval][out] */ long *ID); + + +void __RPC_STUB ITuningSpaceContainer_FindID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ITuningSpaceContainer_Add_Proxy( + ITuningSpaceContainer * This, + /* [in] */ ITuningSpace *TuningSpace, + /* [retval][out] */ VARIANT *NewIndex); + + +void __RPC_STUB ITuningSpaceContainer_Add_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][restricted][hidden][propget] */ HRESULT STDMETHODCALLTYPE ITuningSpaceContainer_get_EnumTuningSpaces_Proxy( + ITuningSpaceContainer * This, + /* [retval][out] */ IEnumTuningSpaces **ppEnum); + + +void __RPC_STUB ITuningSpaceContainer_get_EnumTuningSpaces_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ITuningSpaceContainer_Remove_Proxy( + ITuningSpaceContainer * This, + /* [in] */ VARIANT Index); + + +void __RPC_STUB ITuningSpaceContainer_Remove_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE ITuningSpaceContainer_get_MaxCount_Proxy( + ITuningSpaceContainer * This, + /* [retval][out] */ long *MaxCount); + + +void __RPC_STUB ITuningSpaceContainer_get_MaxCount_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][restricted][hidden][propput] */ HRESULT STDMETHODCALLTYPE ITuningSpaceContainer_put_MaxCount_Proxy( + ITuningSpaceContainer * This, + /* [in] */ long MaxCount); + + +void __RPC_STUB ITuningSpaceContainer_put_MaxCount_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ITuningSpaceContainer_INTERFACE_DEFINED__ */ + + +#ifndef __ITuningSpace_INTERFACE_DEFINED__ +#define __ITuningSpace_INTERFACE_DEFINED__ + +/* interface ITuningSpace */ +/* [unique][helpstring][nonextensible][oleautomation][dual][uuid][object] */ + + +EXTERN_C const IID IID_ITuningSpace; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("061C6E30-E622-11d2-9493-00C04F72D980") + ITuningSpace : public IDispatch + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_UniqueName( + /* [retval][out] */ BSTR *Name) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_UniqueName( + /* [in] */ BSTR Name) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_FriendlyName( + /* [retval][out] */ BSTR *Name) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_FriendlyName( + /* [in] */ BSTR Name) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CLSID( + /* [retval][out] */ BSTR *SpaceCLSID) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_NetworkType( + /* [retval][out] */ BSTR *NetworkTypeGuid) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_NetworkType( + /* [in] */ BSTR NetworkTypeGuid) = 0; + + virtual /* [restricted][hidden][helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get__NetworkType( + /* [retval][out] */ GUID *NetworkTypeGuid) = 0; + + virtual /* [restricted][hidden][helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put__NetworkType( + /* [in] */ REFCLSID NetworkTypeGuid) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE CreateTuneRequest( + /* [retval][out] */ ITuneRequest **TuneRequest) = 0; + + virtual /* [restricted][hidden][id] */ HRESULT STDMETHODCALLTYPE EnumCategoryGUIDs( + /* [retval][out] */ IEnumGUID **ppEnum) = 0; + + virtual /* [restricted][hidden][id] */ HRESULT STDMETHODCALLTYPE EnumDeviceMonikers( + /* [retval][out] */ IEnumMoniker **ppEnum) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_DefaultPreferredComponentTypes( + /* [retval][out] */ IComponentTypes **ComponentTypes) = 0; + + virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_DefaultPreferredComponentTypes( + /* [in] */ IComponentTypes *NewComponentTypes) = 0; + + virtual /* [restricted][hidden][id][propget] */ HRESULT STDMETHODCALLTYPE get_FrequencyMapping( + /* [retval][out] */ BSTR *pMapping) = 0; + + virtual /* [restricted][hidden][id][propput] */ HRESULT STDMETHODCALLTYPE put_FrequencyMapping( + BSTR Mapping) = 0; + + virtual /* [id][propget] */ HRESULT STDMETHODCALLTYPE get_DefaultLocator( + /* [retval][out] */ ILocator **LocatorVal) = 0; + + virtual /* [id][propput] */ HRESULT STDMETHODCALLTYPE put_DefaultLocator( + /* [in] */ ILocator *LocatorVal) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [retval][out] */ ITuningSpace **NewTS) = 0; + + }; + +#else /* C style interface */ + + typedef struct ITuningSpaceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ITuningSpace * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ITuningSpace * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ITuningSpace * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ITuningSpace * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ITuningSpace * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ITuningSpace * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ITuningSpace * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UniqueName )( + ITuningSpace * This, + /* [retval][out] */ BSTR *Name); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_UniqueName )( + ITuningSpace * This, + /* [in] */ BSTR Name); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FriendlyName )( + ITuningSpace * This, + /* [retval][out] */ BSTR *Name); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_FriendlyName )( + ITuningSpace * This, + /* [in] */ BSTR Name); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CLSID )( + ITuningSpace * This, + /* [retval][out] */ BSTR *SpaceCLSID); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_NetworkType )( + ITuningSpace * This, + /* [retval][out] */ BSTR *NetworkTypeGuid); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_NetworkType )( + ITuningSpace * This, + /* [in] */ BSTR NetworkTypeGuid); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NetworkType )( + ITuningSpace * This, + /* [retval][out] */ GUID *NetworkTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__NetworkType )( + ITuningSpace * This, + /* [in] */ REFCLSID NetworkTypeGuid); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *CreateTuneRequest )( + ITuningSpace * This, + /* [retval][out] */ ITuneRequest **TuneRequest); + + /* [restricted][hidden][id] */ HRESULT ( STDMETHODCALLTYPE *EnumCategoryGUIDs )( + ITuningSpace * This, + /* [retval][out] */ IEnumGUID **ppEnum); + + /* [restricted][hidden][id] */ HRESULT ( STDMETHODCALLTYPE *EnumDeviceMonikers )( + ITuningSpace * This, + /* [retval][out] */ IEnumMoniker **ppEnum); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultPreferredComponentTypes )( + ITuningSpace * This, + /* [retval][out] */ IComponentTypes **ComponentTypes); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_DefaultPreferredComponentTypes )( + ITuningSpace * This, + /* [in] */ IComponentTypes *NewComponentTypes); + + /* [restricted][hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FrequencyMapping )( + ITuningSpace * This, + /* [retval][out] */ BSTR *pMapping); + + /* [restricted][hidden][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_FrequencyMapping )( + ITuningSpace * This, + BSTR Mapping); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultLocator )( + ITuningSpace * This, + /* [retval][out] */ ILocator **LocatorVal); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_DefaultLocator )( + ITuningSpace * This, + /* [in] */ ILocator *LocatorVal); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + ITuningSpace * This, + /* [retval][out] */ ITuningSpace **NewTS); + + END_INTERFACE + } ITuningSpaceVtbl; + + interface ITuningSpace + { + CONST_VTBL struct ITuningSpaceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ITuningSpace_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ITuningSpace_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ITuningSpace_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ITuningSpace_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ITuningSpace_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ITuningSpace_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ITuningSpace_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ITuningSpace_get_UniqueName(This,Name) \ + (This)->lpVtbl -> get_UniqueName(This,Name) + +#define ITuningSpace_put_UniqueName(This,Name) \ + (This)->lpVtbl -> put_UniqueName(This,Name) + +#define ITuningSpace_get_FriendlyName(This,Name) \ + (This)->lpVtbl -> get_FriendlyName(This,Name) + +#define ITuningSpace_put_FriendlyName(This,Name) \ + (This)->lpVtbl -> put_FriendlyName(This,Name) + +#define ITuningSpace_get_CLSID(This,SpaceCLSID) \ + (This)->lpVtbl -> get_CLSID(This,SpaceCLSID) + +#define ITuningSpace_get_NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> get_NetworkType(This,NetworkTypeGuid) + +#define ITuningSpace_put_NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> put_NetworkType(This,NetworkTypeGuid) + +#define ITuningSpace_get__NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> get__NetworkType(This,NetworkTypeGuid) + +#define ITuningSpace_put__NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> put__NetworkType(This,NetworkTypeGuid) + +#define ITuningSpace_CreateTuneRequest(This,TuneRequest) \ + (This)->lpVtbl -> CreateTuneRequest(This,TuneRequest) + +#define ITuningSpace_EnumCategoryGUIDs(This,ppEnum) \ + (This)->lpVtbl -> EnumCategoryGUIDs(This,ppEnum) + +#define ITuningSpace_EnumDeviceMonikers(This,ppEnum) \ + (This)->lpVtbl -> EnumDeviceMonikers(This,ppEnum) + +#define ITuningSpace_get_DefaultPreferredComponentTypes(This,ComponentTypes) \ + (This)->lpVtbl -> get_DefaultPreferredComponentTypes(This,ComponentTypes) + +#define ITuningSpace_put_DefaultPreferredComponentTypes(This,NewComponentTypes) \ + (This)->lpVtbl -> put_DefaultPreferredComponentTypes(This,NewComponentTypes) + +#define ITuningSpace_get_FrequencyMapping(This,pMapping) \ + (This)->lpVtbl -> get_FrequencyMapping(This,pMapping) + +#define ITuningSpace_put_FrequencyMapping(This,Mapping) \ + (This)->lpVtbl -> put_FrequencyMapping(This,Mapping) + +#define ITuningSpace_get_DefaultLocator(This,LocatorVal) \ + (This)->lpVtbl -> get_DefaultLocator(This,LocatorVal) + +#define ITuningSpace_put_DefaultLocator(This,LocatorVal) \ + (This)->lpVtbl -> put_DefaultLocator(This,LocatorVal) + +#define ITuningSpace_Clone(This,NewTS) \ + (This)->lpVtbl -> Clone(This,NewTS) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ITuningSpace_get_UniqueName_Proxy( + ITuningSpace * This, + /* [retval][out] */ BSTR *Name); + + +void __RPC_STUB ITuningSpace_get_UniqueName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ITuningSpace_put_UniqueName_Proxy( + ITuningSpace * This, + /* [in] */ BSTR Name); + + +void __RPC_STUB ITuningSpace_put_UniqueName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ITuningSpace_get_FriendlyName_Proxy( + ITuningSpace * This, + /* [retval][out] */ BSTR *Name); + + +void __RPC_STUB ITuningSpace_get_FriendlyName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ITuningSpace_put_FriendlyName_Proxy( + ITuningSpace * This, + /* [in] */ BSTR Name); + + +void __RPC_STUB ITuningSpace_put_FriendlyName_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ITuningSpace_get_CLSID_Proxy( + ITuningSpace * This, + /* [retval][out] */ BSTR *SpaceCLSID); + + +void __RPC_STUB ITuningSpace_get_CLSID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ITuningSpace_get_NetworkType_Proxy( + ITuningSpace * This, + /* [retval][out] */ BSTR *NetworkTypeGuid); + + +void __RPC_STUB ITuningSpace_get_NetworkType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ITuningSpace_put_NetworkType_Proxy( + ITuningSpace * This, + /* [in] */ BSTR NetworkTypeGuid); + + +void __RPC_STUB ITuningSpace_put_NetworkType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][hidden][helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ITuningSpace_get__NetworkType_Proxy( + ITuningSpace * This, + /* [retval][out] */ GUID *NetworkTypeGuid); + + +void __RPC_STUB ITuningSpace_get__NetworkType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][hidden][helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ITuningSpace_put__NetworkType_Proxy( + ITuningSpace * This, + /* [in] */ REFCLSID NetworkTypeGuid); + + +void __RPC_STUB ITuningSpace_put__NetworkType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ITuningSpace_CreateTuneRequest_Proxy( + ITuningSpace * This, + /* [retval][out] */ ITuneRequest **TuneRequest); + + +void __RPC_STUB ITuningSpace_CreateTuneRequest_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][hidden][id] */ HRESULT STDMETHODCALLTYPE ITuningSpace_EnumCategoryGUIDs_Proxy( + ITuningSpace * This, + /* [retval][out] */ IEnumGUID **ppEnum); + + +void __RPC_STUB ITuningSpace_EnumCategoryGUIDs_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][hidden][id] */ HRESULT STDMETHODCALLTYPE ITuningSpace_EnumDeviceMonikers_Proxy( + ITuningSpace * This, + /* [retval][out] */ IEnumMoniker **ppEnum); + + +void __RPC_STUB ITuningSpace_EnumDeviceMonikers_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE ITuningSpace_get_DefaultPreferredComponentTypes_Proxy( + ITuningSpace * This, + /* [retval][out] */ IComponentTypes **ComponentTypes); + + +void __RPC_STUB ITuningSpace_get_DefaultPreferredComponentTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propput] */ HRESULT STDMETHODCALLTYPE ITuningSpace_put_DefaultPreferredComponentTypes_Proxy( + ITuningSpace * This, + /* [in] */ IComponentTypes *NewComponentTypes); + + +void __RPC_STUB ITuningSpace_put_DefaultPreferredComponentTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][hidden][id][propget] */ HRESULT STDMETHODCALLTYPE ITuningSpace_get_FrequencyMapping_Proxy( + ITuningSpace * This, + /* [retval][out] */ BSTR *pMapping); + + +void __RPC_STUB ITuningSpace_get_FrequencyMapping_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][hidden][id][propput] */ HRESULT STDMETHODCALLTYPE ITuningSpace_put_FrequencyMapping_Proxy( + ITuningSpace * This, + BSTR Mapping); + + +void __RPC_STUB ITuningSpace_put_FrequencyMapping_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propget] */ HRESULT STDMETHODCALLTYPE ITuningSpace_get_DefaultLocator_Proxy( + ITuningSpace * This, + /* [retval][out] */ ILocator **LocatorVal); + + +void __RPC_STUB ITuningSpace_get_DefaultLocator_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [id][propput] */ HRESULT STDMETHODCALLTYPE ITuningSpace_put_DefaultLocator_Proxy( + ITuningSpace * This, + /* [in] */ ILocator *LocatorVal); + + +void __RPC_STUB ITuningSpace_put_DefaultLocator_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE ITuningSpace_Clone_Proxy( + ITuningSpace * This, + /* [retval][out] */ ITuningSpace **NewTS); + + +void __RPC_STUB ITuningSpace_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ITuningSpace_INTERFACE_DEFINED__ */ + + +#ifndef __IEnumTuningSpaces_INTERFACE_DEFINED__ +#define __IEnumTuningSpaces_INTERFACE_DEFINED__ + +/* interface IEnumTuningSpaces */ +/* [unique][uuid][object][restricted][hidden] */ + + +EXTERN_C const IID IID_IEnumTuningSpaces; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8B8EB248-FC2B-11d2-9D8C-00C04F72D980") + IEnumTuningSpaces : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ ITuningSpace **rgelt, + /* [out] */ ULONG *pceltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG celt) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IEnumTuningSpaces **ppEnum) = 0; + + }; + +#else /* C style interface */ + + typedef struct IEnumTuningSpacesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IEnumTuningSpaces * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IEnumTuningSpaces * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IEnumTuningSpaces * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IEnumTuningSpaces * This, + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ ITuningSpace **rgelt, + /* [out] */ ULONG *pceltFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IEnumTuningSpaces * This, + /* [in] */ ULONG celt); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IEnumTuningSpaces * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IEnumTuningSpaces * This, + /* [out] */ IEnumTuningSpaces **ppEnum); + + END_INTERFACE + } IEnumTuningSpacesVtbl; + + interface IEnumTuningSpaces + { + CONST_VTBL struct IEnumTuningSpacesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IEnumTuningSpaces_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IEnumTuningSpaces_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IEnumTuningSpaces_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IEnumTuningSpaces_Next(This,celt,rgelt,pceltFetched) \ + (This)->lpVtbl -> Next(This,celt,rgelt,pceltFetched) + +#define IEnumTuningSpaces_Skip(This,celt) \ + (This)->lpVtbl -> Skip(This,celt) + +#define IEnumTuningSpaces_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IEnumTuningSpaces_Clone(This,ppEnum) \ + (This)->lpVtbl -> Clone(This,ppEnum) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IEnumTuningSpaces_Next_Proxy( + IEnumTuningSpaces * This, + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ ITuningSpace **rgelt, + /* [out] */ ULONG *pceltFetched); + + +void __RPC_STUB IEnumTuningSpaces_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumTuningSpaces_Skip_Proxy( + IEnumTuningSpaces * This, + /* [in] */ ULONG celt); + + +void __RPC_STUB IEnumTuningSpaces_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumTuningSpaces_Reset_Proxy( + IEnumTuningSpaces * This); + + +void __RPC_STUB IEnumTuningSpaces_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumTuningSpaces_Clone_Proxy( + IEnumTuningSpaces * This, + /* [out] */ IEnumTuningSpaces **ppEnum); + + +void __RPC_STUB IEnumTuningSpaces_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IEnumTuningSpaces_INTERFACE_DEFINED__ */ + + +#ifndef __IDVBTuningSpace_INTERFACE_DEFINED__ +#define __IDVBTuningSpace_INTERFACE_DEFINED__ + +/* interface IDVBTuningSpace */ +/* [unique][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_IDVBTuningSpace; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("ADA0B268-3B19-4e5b-ACC4-49F852BE13BA") + IDVBTuningSpace : public ITuningSpace + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SystemType( + /* [retval][out] */ DVBSystemType *SysType) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SystemType( + /* [in] */ DVBSystemType SysType) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDVBTuningSpaceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDVBTuningSpace * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDVBTuningSpace * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDVBTuningSpace * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IDVBTuningSpace * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IDVBTuningSpace * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IDVBTuningSpace * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IDVBTuningSpace * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UniqueName )( + IDVBTuningSpace * This, + /* [retval][out] */ BSTR *Name); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_UniqueName )( + IDVBTuningSpace * This, + /* [in] */ BSTR Name); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FriendlyName )( + IDVBTuningSpace * This, + /* [retval][out] */ BSTR *Name); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_FriendlyName )( + IDVBTuningSpace * This, + /* [in] */ BSTR Name); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CLSID )( + IDVBTuningSpace * This, + /* [retval][out] */ BSTR *SpaceCLSID); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_NetworkType )( + IDVBTuningSpace * This, + /* [retval][out] */ BSTR *NetworkTypeGuid); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_NetworkType )( + IDVBTuningSpace * This, + /* [in] */ BSTR NetworkTypeGuid); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NetworkType )( + IDVBTuningSpace * This, + /* [retval][out] */ GUID *NetworkTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__NetworkType )( + IDVBTuningSpace * This, + /* [in] */ REFCLSID NetworkTypeGuid); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *CreateTuneRequest )( + IDVBTuningSpace * This, + /* [retval][out] */ ITuneRequest **TuneRequest); + + /* [restricted][hidden][id] */ HRESULT ( STDMETHODCALLTYPE *EnumCategoryGUIDs )( + IDVBTuningSpace * This, + /* [retval][out] */ IEnumGUID **ppEnum); + + /* [restricted][hidden][id] */ HRESULT ( STDMETHODCALLTYPE *EnumDeviceMonikers )( + IDVBTuningSpace * This, + /* [retval][out] */ IEnumMoniker **ppEnum); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultPreferredComponentTypes )( + IDVBTuningSpace * This, + /* [retval][out] */ IComponentTypes **ComponentTypes); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_DefaultPreferredComponentTypes )( + IDVBTuningSpace * This, + /* [in] */ IComponentTypes *NewComponentTypes); + + /* [restricted][hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FrequencyMapping )( + IDVBTuningSpace * This, + /* [retval][out] */ BSTR *pMapping); + + /* [restricted][hidden][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_FrequencyMapping )( + IDVBTuningSpace * This, + BSTR Mapping); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultLocator )( + IDVBTuningSpace * This, + /* [retval][out] */ ILocator **LocatorVal); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_DefaultLocator )( + IDVBTuningSpace * This, + /* [in] */ ILocator *LocatorVal); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IDVBTuningSpace * This, + /* [retval][out] */ ITuningSpace **NewTS); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SystemType )( + IDVBTuningSpace * This, + /* [retval][out] */ DVBSystemType *SysType); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SystemType )( + IDVBTuningSpace * This, + /* [in] */ DVBSystemType SysType); + + END_INTERFACE + } IDVBTuningSpaceVtbl; + + interface IDVBTuningSpace + { + CONST_VTBL struct IDVBTuningSpaceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDVBTuningSpace_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDVBTuningSpace_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDVBTuningSpace_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDVBTuningSpace_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IDVBTuningSpace_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IDVBTuningSpace_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IDVBTuningSpace_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IDVBTuningSpace_get_UniqueName(This,Name) \ + (This)->lpVtbl -> get_UniqueName(This,Name) + +#define IDVBTuningSpace_put_UniqueName(This,Name) \ + (This)->lpVtbl -> put_UniqueName(This,Name) + +#define IDVBTuningSpace_get_FriendlyName(This,Name) \ + (This)->lpVtbl -> get_FriendlyName(This,Name) + +#define IDVBTuningSpace_put_FriendlyName(This,Name) \ + (This)->lpVtbl -> put_FriendlyName(This,Name) + +#define IDVBTuningSpace_get_CLSID(This,SpaceCLSID) \ + (This)->lpVtbl -> get_CLSID(This,SpaceCLSID) + +#define IDVBTuningSpace_get_NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> get_NetworkType(This,NetworkTypeGuid) + +#define IDVBTuningSpace_put_NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> put_NetworkType(This,NetworkTypeGuid) + +#define IDVBTuningSpace_get__NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> get__NetworkType(This,NetworkTypeGuid) + +#define IDVBTuningSpace_put__NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> put__NetworkType(This,NetworkTypeGuid) + +#define IDVBTuningSpace_CreateTuneRequest(This,TuneRequest) \ + (This)->lpVtbl -> CreateTuneRequest(This,TuneRequest) + +#define IDVBTuningSpace_EnumCategoryGUIDs(This,ppEnum) \ + (This)->lpVtbl -> EnumCategoryGUIDs(This,ppEnum) + +#define IDVBTuningSpace_EnumDeviceMonikers(This,ppEnum) \ + (This)->lpVtbl -> EnumDeviceMonikers(This,ppEnum) + +#define IDVBTuningSpace_get_DefaultPreferredComponentTypes(This,ComponentTypes) \ + (This)->lpVtbl -> get_DefaultPreferredComponentTypes(This,ComponentTypes) + +#define IDVBTuningSpace_put_DefaultPreferredComponentTypes(This,NewComponentTypes) \ + (This)->lpVtbl -> put_DefaultPreferredComponentTypes(This,NewComponentTypes) + +#define IDVBTuningSpace_get_FrequencyMapping(This,pMapping) \ + (This)->lpVtbl -> get_FrequencyMapping(This,pMapping) + +#define IDVBTuningSpace_put_FrequencyMapping(This,Mapping) \ + (This)->lpVtbl -> put_FrequencyMapping(This,Mapping) + +#define IDVBTuningSpace_get_DefaultLocator(This,LocatorVal) \ + (This)->lpVtbl -> get_DefaultLocator(This,LocatorVal) + +#define IDVBTuningSpace_put_DefaultLocator(This,LocatorVal) \ + (This)->lpVtbl -> put_DefaultLocator(This,LocatorVal) + +#define IDVBTuningSpace_Clone(This,NewTS) \ + (This)->lpVtbl -> Clone(This,NewTS) + + +#define IDVBTuningSpace_get_SystemType(This,SysType) \ + (This)->lpVtbl -> get_SystemType(This,SysType) + +#define IDVBTuningSpace_put_SystemType(This,SysType) \ + (This)->lpVtbl -> put_SystemType(This,SysType) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDVBTuningSpace_get_SystemType_Proxy( + IDVBTuningSpace * This, + /* [retval][out] */ DVBSystemType *SysType); + + +void __RPC_STUB IDVBTuningSpace_get_SystemType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDVBTuningSpace_put_SystemType_Proxy( + IDVBTuningSpace * This, + /* [in] */ DVBSystemType SysType); + + +void __RPC_STUB IDVBTuningSpace_put_SystemType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDVBTuningSpace_INTERFACE_DEFINED__ */ + + +#ifndef __IAnalogTVTuningSpace_INTERFACE_DEFINED__ +#define __IAnalogTVTuningSpace_INTERFACE_DEFINED__ + +/* interface IAnalogTVTuningSpace */ +/* [unique][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_IAnalogTVTuningSpace; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("2A6E293C-2595-11d3-B64C-00C04F79498E") + IAnalogTVTuningSpace : public ITuningSpace + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MinChannel( + /* [retval][out] */ long *MinChannelVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_MinChannel( + /* [in] */ long NewMinChannelVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MaxChannel( + /* [retval][out] */ long *MaxChannelVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_MaxChannel( + /* [in] */ long NewMaxChannelVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_InputType( + /* [retval][out] */ TunerInputType *InputTypeVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_InputType( + /* [in] */ TunerInputType NewInputTypeVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CountryCode( + /* [retval][out] */ long *CountryCodeVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_CountryCode( + /* [in] */ long NewCountryCodeVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAnalogTVTuningSpaceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAnalogTVTuningSpace * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAnalogTVTuningSpace * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAnalogTVTuningSpace * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IAnalogTVTuningSpace * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IAnalogTVTuningSpace * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IAnalogTVTuningSpace * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IAnalogTVTuningSpace * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UniqueName )( + IAnalogTVTuningSpace * This, + /* [retval][out] */ BSTR *Name); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_UniqueName )( + IAnalogTVTuningSpace * This, + /* [in] */ BSTR Name); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FriendlyName )( + IAnalogTVTuningSpace * This, + /* [retval][out] */ BSTR *Name); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_FriendlyName )( + IAnalogTVTuningSpace * This, + /* [in] */ BSTR Name); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CLSID )( + IAnalogTVTuningSpace * This, + /* [retval][out] */ BSTR *SpaceCLSID); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_NetworkType )( + IAnalogTVTuningSpace * This, + /* [retval][out] */ BSTR *NetworkTypeGuid); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_NetworkType )( + IAnalogTVTuningSpace * This, + /* [in] */ BSTR NetworkTypeGuid); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NetworkType )( + IAnalogTVTuningSpace * This, + /* [retval][out] */ GUID *NetworkTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__NetworkType )( + IAnalogTVTuningSpace * This, + /* [in] */ REFCLSID NetworkTypeGuid); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *CreateTuneRequest )( + IAnalogTVTuningSpace * This, + /* [retval][out] */ ITuneRequest **TuneRequest); + + /* [restricted][hidden][id] */ HRESULT ( STDMETHODCALLTYPE *EnumCategoryGUIDs )( + IAnalogTVTuningSpace * This, + /* [retval][out] */ IEnumGUID **ppEnum); + + /* [restricted][hidden][id] */ HRESULT ( STDMETHODCALLTYPE *EnumDeviceMonikers )( + IAnalogTVTuningSpace * This, + /* [retval][out] */ IEnumMoniker **ppEnum); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultPreferredComponentTypes )( + IAnalogTVTuningSpace * This, + /* [retval][out] */ IComponentTypes **ComponentTypes); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_DefaultPreferredComponentTypes )( + IAnalogTVTuningSpace * This, + /* [in] */ IComponentTypes *NewComponentTypes); + + /* [restricted][hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FrequencyMapping )( + IAnalogTVTuningSpace * This, + /* [retval][out] */ BSTR *pMapping); + + /* [restricted][hidden][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_FrequencyMapping )( + IAnalogTVTuningSpace * This, + BSTR Mapping); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultLocator )( + IAnalogTVTuningSpace * This, + /* [retval][out] */ ILocator **LocatorVal); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_DefaultLocator )( + IAnalogTVTuningSpace * This, + /* [in] */ ILocator *LocatorVal); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IAnalogTVTuningSpace * This, + /* [retval][out] */ ITuningSpace **NewTS); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MinChannel )( + IAnalogTVTuningSpace * This, + /* [retval][out] */ long *MinChannelVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MinChannel )( + IAnalogTVTuningSpace * This, + /* [in] */ long NewMinChannelVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MaxChannel )( + IAnalogTVTuningSpace * This, + /* [retval][out] */ long *MaxChannelVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MaxChannel )( + IAnalogTVTuningSpace * This, + /* [in] */ long NewMaxChannelVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InputType )( + IAnalogTVTuningSpace * This, + /* [retval][out] */ TunerInputType *InputTypeVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_InputType )( + IAnalogTVTuningSpace * This, + /* [in] */ TunerInputType NewInputTypeVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CountryCode )( + IAnalogTVTuningSpace * This, + /* [retval][out] */ long *CountryCodeVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_CountryCode )( + IAnalogTVTuningSpace * This, + /* [in] */ long NewCountryCodeVal); + + END_INTERFACE + } IAnalogTVTuningSpaceVtbl; + + interface IAnalogTVTuningSpace + { + CONST_VTBL struct IAnalogTVTuningSpaceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAnalogTVTuningSpace_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAnalogTVTuningSpace_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAnalogTVTuningSpace_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAnalogTVTuningSpace_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IAnalogTVTuningSpace_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IAnalogTVTuningSpace_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IAnalogTVTuningSpace_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IAnalogTVTuningSpace_get_UniqueName(This,Name) \ + (This)->lpVtbl -> get_UniqueName(This,Name) + +#define IAnalogTVTuningSpace_put_UniqueName(This,Name) \ + (This)->lpVtbl -> put_UniqueName(This,Name) + +#define IAnalogTVTuningSpace_get_FriendlyName(This,Name) \ + (This)->lpVtbl -> get_FriendlyName(This,Name) + +#define IAnalogTVTuningSpace_put_FriendlyName(This,Name) \ + (This)->lpVtbl -> put_FriendlyName(This,Name) + +#define IAnalogTVTuningSpace_get_CLSID(This,SpaceCLSID) \ + (This)->lpVtbl -> get_CLSID(This,SpaceCLSID) + +#define IAnalogTVTuningSpace_get_NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> get_NetworkType(This,NetworkTypeGuid) + +#define IAnalogTVTuningSpace_put_NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> put_NetworkType(This,NetworkTypeGuid) + +#define IAnalogTVTuningSpace_get__NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> get__NetworkType(This,NetworkTypeGuid) + +#define IAnalogTVTuningSpace_put__NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> put__NetworkType(This,NetworkTypeGuid) + +#define IAnalogTVTuningSpace_CreateTuneRequest(This,TuneRequest) \ + (This)->lpVtbl -> CreateTuneRequest(This,TuneRequest) + +#define IAnalogTVTuningSpace_EnumCategoryGUIDs(This,ppEnum) \ + (This)->lpVtbl -> EnumCategoryGUIDs(This,ppEnum) + +#define IAnalogTVTuningSpace_EnumDeviceMonikers(This,ppEnum) \ + (This)->lpVtbl -> EnumDeviceMonikers(This,ppEnum) + +#define IAnalogTVTuningSpace_get_DefaultPreferredComponentTypes(This,ComponentTypes) \ + (This)->lpVtbl -> get_DefaultPreferredComponentTypes(This,ComponentTypes) + +#define IAnalogTVTuningSpace_put_DefaultPreferredComponentTypes(This,NewComponentTypes) \ + (This)->lpVtbl -> put_DefaultPreferredComponentTypes(This,NewComponentTypes) + +#define IAnalogTVTuningSpace_get_FrequencyMapping(This,pMapping) \ + (This)->lpVtbl -> get_FrequencyMapping(This,pMapping) + +#define IAnalogTVTuningSpace_put_FrequencyMapping(This,Mapping) \ + (This)->lpVtbl -> put_FrequencyMapping(This,Mapping) + +#define IAnalogTVTuningSpace_get_DefaultLocator(This,LocatorVal) \ + (This)->lpVtbl -> get_DefaultLocator(This,LocatorVal) + +#define IAnalogTVTuningSpace_put_DefaultLocator(This,LocatorVal) \ + (This)->lpVtbl -> put_DefaultLocator(This,LocatorVal) + +#define IAnalogTVTuningSpace_Clone(This,NewTS) \ + (This)->lpVtbl -> Clone(This,NewTS) + + +#define IAnalogTVTuningSpace_get_MinChannel(This,MinChannelVal) \ + (This)->lpVtbl -> get_MinChannel(This,MinChannelVal) + +#define IAnalogTVTuningSpace_put_MinChannel(This,NewMinChannelVal) \ + (This)->lpVtbl -> put_MinChannel(This,NewMinChannelVal) + +#define IAnalogTVTuningSpace_get_MaxChannel(This,MaxChannelVal) \ + (This)->lpVtbl -> get_MaxChannel(This,MaxChannelVal) + +#define IAnalogTVTuningSpace_put_MaxChannel(This,NewMaxChannelVal) \ + (This)->lpVtbl -> put_MaxChannel(This,NewMaxChannelVal) + +#define IAnalogTVTuningSpace_get_InputType(This,InputTypeVal) \ + (This)->lpVtbl -> get_InputType(This,InputTypeVal) + +#define IAnalogTVTuningSpace_put_InputType(This,NewInputTypeVal) \ + (This)->lpVtbl -> put_InputType(This,NewInputTypeVal) + +#define IAnalogTVTuningSpace_get_CountryCode(This,CountryCodeVal) \ + (This)->lpVtbl -> get_CountryCode(This,CountryCodeVal) + +#define IAnalogTVTuningSpace_put_CountryCode(This,NewCountryCodeVal) \ + (This)->lpVtbl -> put_CountryCode(This,NewCountryCodeVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IAnalogTVTuningSpace_get_MinChannel_Proxy( + IAnalogTVTuningSpace * This, + /* [retval][out] */ long *MinChannelVal); + + +void __RPC_STUB IAnalogTVTuningSpace_get_MinChannel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IAnalogTVTuningSpace_put_MinChannel_Proxy( + IAnalogTVTuningSpace * This, + /* [in] */ long NewMinChannelVal); + + +void __RPC_STUB IAnalogTVTuningSpace_put_MinChannel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IAnalogTVTuningSpace_get_MaxChannel_Proxy( + IAnalogTVTuningSpace * This, + /* [retval][out] */ long *MaxChannelVal); + + +void __RPC_STUB IAnalogTVTuningSpace_get_MaxChannel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IAnalogTVTuningSpace_put_MaxChannel_Proxy( + IAnalogTVTuningSpace * This, + /* [in] */ long NewMaxChannelVal); + + +void __RPC_STUB IAnalogTVTuningSpace_put_MaxChannel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IAnalogTVTuningSpace_get_InputType_Proxy( + IAnalogTVTuningSpace * This, + /* [retval][out] */ TunerInputType *InputTypeVal); + + +void __RPC_STUB IAnalogTVTuningSpace_get_InputType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IAnalogTVTuningSpace_put_InputType_Proxy( + IAnalogTVTuningSpace * This, + /* [in] */ TunerInputType NewInputTypeVal); + + +void __RPC_STUB IAnalogTVTuningSpace_put_InputType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IAnalogTVTuningSpace_get_CountryCode_Proxy( + IAnalogTVTuningSpace * This, + /* [retval][out] */ long *CountryCodeVal); + + +void __RPC_STUB IAnalogTVTuningSpace_get_CountryCode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IAnalogTVTuningSpace_put_CountryCode_Proxy( + IAnalogTVTuningSpace * This, + /* [in] */ long NewCountryCodeVal); + + +void __RPC_STUB IAnalogTVTuningSpace_put_CountryCode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAnalogTVTuningSpace_INTERFACE_DEFINED__ */ + + +#ifndef __IATSCTuningSpace_INTERFACE_DEFINED__ +#define __IATSCTuningSpace_INTERFACE_DEFINED__ + +/* interface IATSCTuningSpace */ +/* [unique][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_IATSCTuningSpace; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0369B4E2-45B6-11d3-B650-00C04F79498E") + IATSCTuningSpace : public IAnalogTVTuningSpace + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MinMinorChannel( + /* [retval][out] */ long *MinMinorChannelVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_MinMinorChannel( + /* [in] */ long NewMinMinorChannelVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MaxMinorChannel( + /* [retval][out] */ long *MaxMinorChannelVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_MaxMinorChannel( + /* [in] */ long NewMaxMinorChannelVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MinPhysicalChannel( + /* [retval][out] */ long *MinPhysicalChannelVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_MinPhysicalChannel( + /* [in] */ long NewMinPhysicalChannelVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MaxPhysicalChannel( + /* [retval][out] */ long *MaxPhysicalChannelVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_MaxPhysicalChannel( + /* [in] */ long NewMaxPhysicalChannelVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct IATSCTuningSpaceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IATSCTuningSpace * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IATSCTuningSpace * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IATSCTuningSpace * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IATSCTuningSpace * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IATSCTuningSpace * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IATSCTuningSpace * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IATSCTuningSpace * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UniqueName )( + IATSCTuningSpace * This, + /* [retval][out] */ BSTR *Name); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_UniqueName )( + IATSCTuningSpace * This, + /* [in] */ BSTR Name); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FriendlyName )( + IATSCTuningSpace * This, + /* [retval][out] */ BSTR *Name); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_FriendlyName )( + IATSCTuningSpace * This, + /* [in] */ BSTR Name); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CLSID )( + IATSCTuningSpace * This, + /* [retval][out] */ BSTR *SpaceCLSID); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_NetworkType )( + IATSCTuningSpace * This, + /* [retval][out] */ BSTR *NetworkTypeGuid); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_NetworkType )( + IATSCTuningSpace * This, + /* [in] */ BSTR NetworkTypeGuid); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NetworkType )( + IATSCTuningSpace * This, + /* [retval][out] */ GUID *NetworkTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__NetworkType )( + IATSCTuningSpace * This, + /* [in] */ REFCLSID NetworkTypeGuid); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *CreateTuneRequest )( + IATSCTuningSpace * This, + /* [retval][out] */ ITuneRequest **TuneRequest); + + /* [restricted][hidden][id] */ HRESULT ( STDMETHODCALLTYPE *EnumCategoryGUIDs )( + IATSCTuningSpace * This, + /* [retval][out] */ IEnumGUID **ppEnum); + + /* [restricted][hidden][id] */ HRESULT ( STDMETHODCALLTYPE *EnumDeviceMonikers )( + IATSCTuningSpace * This, + /* [retval][out] */ IEnumMoniker **ppEnum); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultPreferredComponentTypes )( + IATSCTuningSpace * This, + /* [retval][out] */ IComponentTypes **ComponentTypes); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_DefaultPreferredComponentTypes )( + IATSCTuningSpace * This, + /* [in] */ IComponentTypes *NewComponentTypes); + + /* [restricted][hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FrequencyMapping )( + IATSCTuningSpace * This, + /* [retval][out] */ BSTR *pMapping); + + /* [restricted][hidden][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_FrequencyMapping )( + IATSCTuningSpace * This, + BSTR Mapping); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultLocator )( + IATSCTuningSpace * This, + /* [retval][out] */ ILocator **LocatorVal); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_DefaultLocator )( + IATSCTuningSpace * This, + /* [in] */ ILocator *LocatorVal); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IATSCTuningSpace * This, + /* [retval][out] */ ITuningSpace **NewTS); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MinChannel )( + IATSCTuningSpace * This, + /* [retval][out] */ long *MinChannelVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MinChannel )( + IATSCTuningSpace * This, + /* [in] */ long NewMinChannelVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MaxChannel )( + IATSCTuningSpace * This, + /* [retval][out] */ long *MaxChannelVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MaxChannel )( + IATSCTuningSpace * This, + /* [in] */ long NewMaxChannelVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InputType )( + IATSCTuningSpace * This, + /* [retval][out] */ TunerInputType *InputTypeVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_InputType )( + IATSCTuningSpace * This, + /* [in] */ TunerInputType NewInputTypeVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CountryCode )( + IATSCTuningSpace * This, + /* [retval][out] */ long *CountryCodeVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_CountryCode )( + IATSCTuningSpace * This, + /* [in] */ long NewCountryCodeVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MinMinorChannel )( + IATSCTuningSpace * This, + /* [retval][out] */ long *MinMinorChannelVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MinMinorChannel )( + IATSCTuningSpace * This, + /* [in] */ long NewMinMinorChannelVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MaxMinorChannel )( + IATSCTuningSpace * This, + /* [retval][out] */ long *MaxMinorChannelVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MaxMinorChannel )( + IATSCTuningSpace * This, + /* [in] */ long NewMaxMinorChannelVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MinPhysicalChannel )( + IATSCTuningSpace * This, + /* [retval][out] */ long *MinPhysicalChannelVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MinPhysicalChannel )( + IATSCTuningSpace * This, + /* [in] */ long NewMinPhysicalChannelVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MaxPhysicalChannel )( + IATSCTuningSpace * This, + /* [retval][out] */ long *MaxPhysicalChannelVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MaxPhysicalChannel )( + IATSCTuningSpace * This, + /* [in] */ long NewMaxPhysicalChannelVal); + + END_INTERFACE + } IATSCTuningSpaceVtbl; + + interface IATSCTuningSpace + { + CONST_VTBL struct IATSCTuningSpaceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IATSCTuningSpace_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IATSCTuningSpace_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IATSCTuningSpace_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IATSCTuningSpace_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IATSCTuningSpace_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IATSCTuningSpace_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IATSCTuningSpace_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IATSCTuningSpace_get_UniqueName(This,Name) \ + (This)->lpVtbl -> get_UniqueName(This,Name) + +#define IATSCTuningSpace_put_UniqueName(This,Name) \ + (This)->lpVtbl -> put_UniqueName(This,Name) + +#define IATSCTuningSpace_get_FriendlyName(This,Name) \ + (This)->lpVtbl -> get_FriendlyName(This,Name) + +#define IATSCTuningSpace_put_FriendlyName(This,Name) \ + (This)->lpVtbl -> put_FriendlyName(This,Name) + +#define IATSCTuningSpace_get_CLSID(This,SpaceCLSID) \ + (This)->lpVtbl -> get_CLSID(This,SpaceCLSID) + +#define IATSCTuningSpace_get_NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> get_NetworkType(This,NetworkTypeGuid) + +#define IATSCTuningSpace_put_NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> put_NetworkType(This,NetworkTypeGuid) + +#define IATSCTuningSpace_get__NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> get__NetworkType(This,NetworkTypeGuid) + +#define IATSCTuningSpace_put__NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> put__NetworkType(This,NetworkTypeGuid) + +#define IATSCTuningSpace_CreateTuneRequest(This,TuneRequest) \ + (This)->lpVtbl -> CreateTuneRequest(This,TuneRequest) + +#define IATSCTuningSpace_EnumCategoryGUIDs(This,ppEnum) \ + (This)->lpVtbl -> EnumCategoryGUIDs(This,ppEnum) + +#define IATSCTuningSpace_EnumDeviceMonikers(This,ppEnum) \ + (This)->lpVtbl -> EnumDeviceMonikers(This,ppEnum) + +#define IATSCTuningSpace_get_DefaultPreferredComponentTypes(This,ComponentTypes) \ + (This)->lpVtbl -> get_DefaultPreferredComponentTypes(This,ComponentTypes) + +#define IATSCTuningSpace_put_DefaultPreferredComponentTypes(This,NewComponentTypes) \ + (This)->lpVtbl -> put_DefaultPreferredComponentTypes(This,NewComponentTypes) + +#define IATSCTuningSpace_get_FrequencyMapping(This,pMapping) \ + (This)->lpVtbl -> get_FrequencyMapping(This,pMapping) + +#define IATSCTuningSpace_put_FrequencyMapping(This,Mapping) \ + (This)->lpVtbl -> put_FrequencyMapping(This,Mapping) + +#define IATSCTuningSpace_get_DefaultLocator(This,LocatorVal) \ + (This)->lpVtbl -> get_DefaultLocator(This,LocatorVal) + +#define IATSCTuningSpace_put_DefaultLocator(This,LocatorVal) \ + (This)->lpVtbl -> put_DefaultLocator(This,LocatorVal) + +#define IATSCTuningSpace_Clone(This,NewTS) \ + (This)->lpVtbl -> Clone(This,NewTS) + + +#define IATSCTuningSpace_get_MinChannel(This,MinChannelVal) \ + (This)->lpVtbl -> get_MinChannel(This,MinChannelVal) + +#define IATSCTuningSpace_put_MinChannel(This,NewMinChannelVal) \ + (This)->lpVtbl -> put_MinChannel(This,NewMinChannelVal) + +#define IATSCTuningSpace_get_MaxChannel(This,MaxChannelVal) \ + (This)->lpVtbl -> get_MaxChannel(This,MaxChannelVal) + +#define IATSCTuningSpace_put_MaxChannel(This,NewMaxChannelVal) \ + (This)->lpVtbl -> put_MaxChannel(This,NewMaxChannelVal) + +#define IATSCTuningSpace_get_InputType(This,InputTypeVal) \ + (This)->lpVtbl -> get_InputType(This,InputTypeVal) + +#define IATSCTuningSpace_put_InputType(This,NewInputTypeVal) \ + (This)->lpVtbl -> put_InputType(This,NewInputTypeVal) + +#define IATSCTuningSpace_get_CountryCode(This,CountryCodeVal) \ + (This)->lpVtbl -> get_CountryCode(This,CountryCodeVal) + +#define IATSCTuningSpace_put_CountryCode(This,NewCountryCodeVal) \ + (This)->lpVtbl -> put_CountryCode(This,NewCountryCodeVal) + + +#define IATSCTuningSpace_get_MinMinorChannel(This,MinMinorChannelVal) \ + (This)->lpVtbl -> get_MinMinorChannel(This,MinMinorChannelVal) + +#define IATSCTuningSpace_put_MinMinorChannel(This,NewMinMinorChannelVal) \ + (This)->lpVtbl -> put_MinMinorChannel(This,NewMinMinorChannelVal) + +#define IATSCTuningSpace_get_MaxMinorChannel(This,MaxMinorChannelVal) \ + (This)->lpVtbl -> get_MaxMinorChannel(This,MaxMinorChannelVal) + +#define IATSCTuningSpace_put_MaxMinorChannel(This,NewMaxMinorChannelVal) \ + (This)->lpVtbl -> put_MaxMinorChannel(This,NewMaxMinorChannelVal) + +#define IATSCTuningSpace_get_MinPhysicalChannel(This,MinPhysicalChannelVal) \ + (This)->lpVtbl -> get_MinPhysicalChannel(This,MinPhysicalChannelVal) + +#define IATSCTuningSpace_put_MinPhysicalChannel(This,NewMinPhysicalChannelVal) \ + (This)->lpVtbl -> put_MinPhysicalChannel(This,NewMinPhysicalChannelVal) + +#define IATSCTuningSpace_get_MaxPhysicalChannel(This,MaxPhysicalChannelVal) \ + (This)->lpVtbl -> get_MaxPhysicalChannel(This,MaxPhysicalChannelVal) + +#define IATSCTuningSpace_put_MaxPhysicalChannel(This,NewMaxPhysicalChannelVal) \ + (This)->lpVtbl -> put_MaxPhysicalChannel(This,NewMaxPhysicalChannelVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IATSCTuningSpace_get_MinMinorChannel_Proxy( + IATSCTuningSpace * This, + /* [retval][out] */ long *MinMinorChannelVal); + + +void __RPC_STUB IATSCTuningSpace_get_MinMinorChannel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IATSCTuningSpace_put_MinMinorChannel_Proxy( + IATSCTuningSpace * This, + /* [in] */ long NewMinMinorChannelVal); + + +void __RPC_STUB IATSCTuningSpace_put_MinMinorChannel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IATSCTuningSpace_get_MaxMinorChannel_Proxy( + IATSCTuningSpace * This, + /* [retval][out] */ long *MaxMinorChannelVal); + + +void __RPC_STUB IATSCTuningSpace_get_MaxMinorChannel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IATSCTuningSpace_put_MaxMinorChannel_Proxy( + IATSCTuningSpace * This, + /* [in] */ long NewMaxMinorChannelVal); + + +void __RPC_STUB IATSCTuningSpace_put_MaxMinorChannel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IATSCTuningSpace_get_MinPhysicalChannel_Proxy( + IATSCTuningSpace * This, + /* [retval][out] */ long *MinPhysicalChannelVal); + + +void __RPC_STUB IATSCTuningSpace_get_MinPhysicalChannel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IATSCTuningSpace_put_MinPhysicalChannel_Proxy( + IATSCTuningSpace * This, + /* [in] */ long NewMinPhysicalChannelVal); + + +void __RPC_STUB IATSCTuningSpace_put_MinPhysicalChannel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IATSCTuningSpace_get_MaxPhysicalChannel_Proxy( + IATSCTuningSpace * This, + /* [retval][out] */ long *MaxPhysicalChannelVal); + + +void __RPC_STUB IATSCTuningSpace_get_MaxPhysicalChannel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IATSCTuningSpace_put_MaxPhysicalChannel_Proxy( + IATSCTuningSpace * This, + /* [in] */ long NewMaxPhysicalChannelVal); + + +void __RPC_STUB IATSCTuningSpace_put_MaxPhysicalChannel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IATSCTuningSpace_INTERFACE_DEFINED__ */ + + +#ifndef __IAnalogRadioTuningSpace_INTERFACE_DEFINED__ +#define __IAnalogRadioTuningSpace_INTERFACE_DEFINED__ + +/* interface IAnalogRadioTuningSpace */ +/* [unique][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_IAnalogRadioTuningSpace; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("2A6E293B-2595-11d3-B64C-00C04F79498E") + IAnalogRadioTuningSpace : public ITuningSpace + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MinFrequency( + /* [retval][out] */ long *MinFrequencyVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_MinFrequency( + /* [in] */ long NewMinFrequencyVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MaxFrequency( + /* [retval][out] */ long *MaxFrequencyVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_MaxFrequency( + /* [in] */ long NewMaxFrequencyVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Step( + /* [retval][out] */ long *StepVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Step( + /* [in] */ long NewStepVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAnalogRadioTuningSpaceVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAnalogRadioTuningSpace * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAnalogRadioTuningSpace * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAnalogRadioTuningSpace * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IAnalogRadioTuningSpace * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IAnalogRadioTuningSpace * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IAnalogRadioTuningSpace * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IAnalogRadioTuningSpace * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_UniqueName )( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ BSTR *Name); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_UniqueName )( + IAnalogRadioTuningSpace * This, + /* [in] */ BSTR Name); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FriendlyName )( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ BSTR *Name); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_FriendlyName )( + IAnalogRadioTuningSpace * This, + /* [in] */ BSTR Name); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CLSID )( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ BSTR *SpaceCLSID); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_NetworkType )( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ BSTR *NetworkTypeGuid); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_NetworkType )( + IAnalogRadioTuningSpace * This, + /* [in] */ BSTR NetworkTypeGuid); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NetworkType )( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ GUID *NetworkTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__NetworkType )( + IAnalogRadioTuningSpace * This, + /* [in] */ REFCLSID NetworkTypeGuid); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *CreateTuneRequest )( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ ITuneRequest **TuneRequest); + + /* [restricted][hidden][id] */ HRESULT ( STDMETHODCALLTYPE *EnumCategoryGUIDs )( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ IEnumGUID **ppEnum); + + /* [restricted][hidden][id] */ HRESULT ( STDMETHODCALLTYPE *EnumDeviceMonikers )( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ IEnumMoniker **ppEnum); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultPreferredComponentTypes )( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ IComponentTypes **ComponentTypes); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_DefaultPreferredComponentTypes )( + IAnalogRadioTuningSpace * This, + /* [in] */ IComponentTypes *NewComponentTypes); + + /* [restricted][hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_FrequencyMapping )( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ BSTR *pMapping); + + /* [restricted][hidden][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_FrequencyMapping )( + IAnalogRadioTuningSpace * This, + BSTR Mapping); + + /* [id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DefaultLocator )( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ ILocator **LocatorVal); + + /* [id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_DefaultLocator )( + IAnalogRadioTuningSpace * This, + /* [in] */ ILocator *LocatorVal); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ ITuningSpace **NewTS); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MinFrequency )( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ long *MinFrequencyVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MinFrequency )( + IAnalogRadioTuningSpace * This, + /* [in] */ long NewMinFrequencyVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MaxFrequency )( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ long *MaxFrequencyVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MaxFrequency )( + IAnalogRadioTuningSpace * This, + /* [in] */ long NewMaxFrequencyVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Step )( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ long *StepVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Step )( + IAnalogRadioTuningSpace * This, + /* [in] */ long NewStepVal); + + END_INTERFACE + } IAnalogRadioTuningSpaceVtbl; + + interface IAnalogRadioTuningSpace + { + CONST_VTBL struct IAnalogRadioTuningSpaceVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAnalogRadioTuningSpace_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAnalogRadioTuningSpace_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAnalogRadioTuningSpace_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAnalogRadioTuningSpace_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IAnalogRadioTuningSpace_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IAnalogRadioTuningSpace_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IAnalogRadioTuningSpace_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IAnalogRadioTuningSpace_get_UniqueName(This,Name) \ + (This)->lpVtbl -> get_UniqueName(This,Name) + +#define IAnalogRadioTuningSpace_put_UniqueName(This,Name) \ + (This)->lpVtbl -> put_UniqueName(This,Name) + +#define IAnalogRadioTuningSpace_get_FriendlyName(This,Name) \ + (This)->lpVtbl -> get_FriendlyName(This,Name) + +#define IAnalogRadioTuningSpace_put_FriendlyName(This,Name) \ + (This)->lpVtbl -> put_FriendlyName(This,Name) + +#define IAnalogRadioTuningSpace_get_CLSID(This,SpaceCLSID) \ + (This)->lpVtbl -> get_CLSID(This,SpaceCLSID) + +#define IAnalogRadioTuningSpace_get_NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> get_NetworkType(This,NetworkTypeGuid) + +#define IAnalogRadioTuningSpace_put_NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> put_NetworkType(This,NetworkTypeGuid) + +#define IAnalogRadioTuningSpace_get__NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> get__NetworkType(This,NetworkTypeGuid) + +#define IAnalogRadioTuningSpace_put__NetworkType(This,NetworkTypeGuid) \ + (This)->lpVtbl -> put__NetworkType(This,NetworkTypeGuid) + +#define IAnalogRadioTuningSpace_CreateTuneRequest(This,TuneRequest) \ + (This)->lpVtbl -> CreateTuneRequest(This,TuneRequest) + +#define IAnalogRadioTuningSpace_EnumCategoryGUIDs(This,ppEnum) \ + (This)->lpVtbl -> EnumCategoryGUIDs(This,ppEnum) + +#define IAnalogRadioTuningSpace_EnumDeviceMonikers(This,ppEnum) \ + (This)->lpVtbl -> EnumDeviceMonikers(This,ppEnum) + +#define IAnalogRadioTuningSpace_get_DefaultPreferredComponentTypes(This,ComponentTypes) \ + (This)->lpVtbl -> get_DefaultPreferredComponentTypes(This,ComponentTypes) + +#define IAnalogRadioTuningSpace_put_DefaultPreferredComponentTypes(This,NewComponentTypes) \ + (This)->lpVtbl -> put_DefaultPreferredComponentTypes(This,NewComponentTypes) + +#define IAnalogRadioTuningSpace_get_FrequencyMapping(This,pMapping) \ + (This)->lpVtbl -> get_FrequencyMapping(This,pMapping) + +#define IAnalogRadioTuningSpace_put_FrequencyMapping(This,Mapping) \ + (This)->lpVtbl -> put_FrequencyMapping(This,Mapping) + +#define IAnalogRadioTuningSpace_get_DefaultLocator(This,LocatorVal) \ + (This)->lpVtbl -> get_DefaultLocator(This,LocatorVal) + +#define IAnalogRadioTuningSpace_put_DefaultLocator(This,LocatorVal) \ + (This)->lpVtbl -> put_DefaultLocator(This,LocatorVal) + +#define IAnalogRadioTuningSpace_Clone(This,NewTS) \ + (This)->lpVtbl -> Clone(This,NewTS) + + +#define IAnalogRadioTuningSpace_get_MinFrequency(This,MinFrequencyVal) \ + (This)->lpVtbl -> get_MinFrequency(This,MinFrequencyVal) + +#define IAnalogRadioTuningSpace_put_MinFrequency(This,NewMinFrequencyVal) \ + (This)->lpVtbl -> put_MinFrequency(This,NewMinFrequencyVal) + +#define IAnalogRadioTuningSpace_get_MaxFrequency(This,MaxFrequencyVal) \ + (This)->lpVtbl -> get_MaxFrequency(This,MaxFrequencyVal) + +#define IAnalogRadioTuningSpace_put_MaxFrequency(This,NewMaxFrequencyVal) \ + (This)->lpVtbl -> put_MaxFrequency(This,NewMaxFrequencyVal) + +#define IAnalogRadioTuningSpace_get_Step(This,StepVal) \ + (This)->lpVtbl -> get_Step(This,StepVal) + +#define IAnalogRadioTuningSpace_put_Step(This,NewStepVal) \ + (This)->lpVtbl -> put_Step(This,NewStepVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IAnalogRadioTuningSpace_get_MinFrequency_Proxy( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ long *MinFrequencyVal); + + +void __RPC_STUB IAnalogRadioTuningSpace_get_MinFrequency_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IAnalogRadioTuningSpace_put_MinFrequency_Proxy( + IAnalogRadioTuningSpace * This, + /* [in] */ long NewMinFrequencyVal); + + +void __RPC_STUB IAnalogRadioTuningSpace_put_MinFrequency_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IAnalogRadioTuningSpace_get_MaxFrequency_Proxy( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ long *MaxFrequencyVal); + + +void __RPC_STUB IAnalogRadioTuningSpace_get_MaxFrequency_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IAnalogRadioTuningSpace_put_MaxFrequency_Proxy( + IAnalogRadioTuningSpace * This, + /* [in] */ long NewMaxFrequencyVal); + + +void __RPC_STUB IAnalogRadioTuningSpace_put_MaxFrequency_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IAnalogRadioTuningSpace_get_Step_Proxy( + IAnalogRadioTuningSpace * This, + /* [retval][out] */ long *StepVal); + + +void __RPC_STUB IAnalogRadioTuningSpace_get_Step_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IAnalogRadioTuningSpace_put_Step_Proxy( + IAnalogRadioTuningSpace * This, + /* [in] */ long NewStepVal); + + +void __RPC_STUB IAnalogRadioTuningSpace_put_Step_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAnalogRadioTuningSpace_INTERFACE_DEFINED__ */ + + +#ifndef __ITuneRequest_INTERFACE_DEFINED__ +#define __ITuneRequest_INTERFACE_DEFINED__ + +/* interface ITuneRequest */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][object] */ + + +EXTERN_C const IID IID_ITuneRequest; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("07DDC146-FC3D-11d2-9D8C-00C04F72D980") + ITuneRequest : public IDispatch + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_TuningSpace( + /* [retval][out] */ ITuningSpace **TuningSpace) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Components( + /* [retval][out] */ IComponents **Components) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Clone( + /* [retval][out] */ ITuneRequest **NewTuneRequest) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Locator( + /* [retval][out] */ ILocator **Locator) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Locator( + /* [in] */ ILocator *Locator) = 0; + + }; + +#else /* C style interface */ + + typedef struct ITuneRequestVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ITuneRequest * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ITuneRequest * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ITuneRequest * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ITuneRequest * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ITuneRequest * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ITuneRequest * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ITuneRequest * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_TuningSpace )( + ITuneRequest * This, + /* [retval][out] */ ITuningSpace **TuningSpace); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Components )( + ITuneRequest * This, + /* [retval][out] */ IComponents **Components); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + ITuneRequest * This, + /* [retval][out] */ ITuneRequest **NewTuneRequest); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Locator )( + ITuneRequest * This, + /* [retval][out] */ ILocator **Locator); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Locator )( + ITuneRequest * This, + /* [in] */ ILocator *Locator); + + END_INTERFACE + } ITuneRequestVtbl; + + interface ITuneRequest + { + CONST_VTBL struct ITuneRequestVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ITuneRequest_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ITuneRequest_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ITuneRequest_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ITuneRequest_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ITuneRequest_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ITuneRequest_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ITuneRequest_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ITuneRequest_get_TuningSpace(This,TuningSpace) \ + (This)->lpVtbl -> get_TuningSpace(This,TuningSpace) + +#define ITuneRequest_get_Components(This,Components) \ + (This)->lpVtbl -> get_Components(This,Components) + +#define ITuneRequest_Clone(This,NewTuneRequest) \ + (This)->lpVtbl -> Clone(This,NewTuneRequest) + +#define ITuneRequest_get_Locator(This,Locator) \ + (This)->lpVtbl -> get_Locator(This,Locator) + +#define ITuneRequest_put_Locator(This,Locator) \ + (This)->lpVtbl -> put_Locator(This,Locator) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ITuneRequest_get_TuningSpace_Proxy( + ITuneRequest * This, + /* [retval][out] */ ITuningSpace **TuningSpace); + + +void __RPC_STUB ITuneRequest_get_TuningSpace_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ITuneRequest_get_Components_Proxy( + ITuneRequest * This, + /* [retval][out] */ IComponents **Components); + + +void __RPC_STUB ITuneRequest_get_Components_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ITuneRequest_Clone_Proxy( + ITuneRequest * This, + /* [retval][out] */ ITuneRequest **NewTuneRequest); + + +void __RPC_STUB ITuneRequest_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ITuneRequest_get_Locator_Proxy( + ITuneRequest * This, + /* [retval][out] */ ILocator **Locator); + + +void __RPC_STUB ITuneRequest_get_Locator_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ITuneRequest_put_Locator_Proxy( + ITuneRequest * This, + /* [in] */ ILocator *Locator); + + +void __RPC_STUB ITuneRequest_put_Locator_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ITuneRequest_INTERFACE_DEFINED__ */ + + +#ifndef __IChannelTuneRequest_INTERFACE_DEFINED__ +#define __IChannelTuneRequest_INTERFACE_DEFINED__ + +/* interface IChannelTuneRequest */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][object] */ + + +EXTERN_C const IID IID_IChannelTuneRequest; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0369B4E0-45B6-11d3-B650-00C04F79498E") + IChannelTuneRequest : public ITuneRequest + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Channel( + /* [retval][out] */ long *Channel) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Channel( + /* [in] */ long Channel) = 0; + + }; + +#else /* C style interface */ + + typedef struct IChannelTuneRequestVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IChannelTuneRequest * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IChannelTuneRequest * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IChannelTuneRequest * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IChannelTuneRequest * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IChannelTuneRequest * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IChannelTuneRequest * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IChannelTuneRequest * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_TuningSpace )( + IChannelTuneRequest * This, + /* [retval][out] */ ITuningSpace **TuningSpace); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Components )( + IChannelTuneRequest * This, + /* [retval][out] */ IComponents **Components); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + IChannelTuneRequest * This, + /* [retval][out] */ ITuneRequest **NewTuneRequest); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Locator )( + IChannelTuneRequest * This, + /* [retval][out] */ ILocator **Locator); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Locator )( + IChannelTuneRequest * This, + /* [in] */ ILocator *Locator); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Channel )( + IChannelTuneRequest * This, + /* [retval][out] */ long *Channel); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Channel )( + IChannelTuneRequest * This, + /* [in] */ long Channel); + + END_INTERFACE + } IChannelTuneRequestVtbl; + + interface IChannelTuneRequest + { + CONST_VTBL struct IChannelTuneRequestVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IChannelTuneRequest_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IChannelTuneRequest_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IChannelTuneRequest_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IChannelTuneRequest_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IChannelTuneRequest_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IChannelTuneRequest_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IChannelTuneRequest_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IChannelTuneRequest_get_TuningSpace(This,TuningSpace) \ + (This)->lpVtbl -> get_TuningSpace(This,TuningSpace) + +#define IChannelTuneRequest_get_Components(This,Components) \ + (This)->lpVtbl -> get_Components(This,Components) + +#define IChannelTuneRequest_Clone(This,NewTuneRequest) \ + (This)->lpVtbl -> Clone(This,NewTuneRequest) + +#define IChannelTuneRequest_get_Locator(This,Locator) \ + (This)->lpVtbl -> get_Locator(This,Locator) + +#define IChannelTuneRequest_put_Locator(This,Locator) \ + (This)->lpVtbl -> put_Locator(This,Locator) + + +#define IChannelTuneRequest_get_Channel(This,Channel) \ + (This)->lpVtbl -> get_Channel(This,Channel) + +#define IChannelTuneRequest_put_Channel(This,Channel) \ + (This)->lpVtbl -> put_Channel(This,Channel) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IChannelTuneRequest_get_Channel_Proxy( + IChannelTuneRequest * This, + /* [retval][out] */ long *Channel); + + +void __RPC_STUB IChannelTuneRequest_get_Channel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IChannelTuneRequest_put_Channel_Proxy( + IChannelTuneRequest * This, + /* [in] */ long Channel); + + +void __RPC_STUB IChannelTuneRequest_put_Channel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IChannelTuneRequest_INTERFACE_DEFINED__ */ + + +#ifndef __IATSCChannelTuneRequest_INTERFACE_DEFINED__ +#define __IATSCChannelTuneRequest_INTERFACE_DEFINED__ + +/* interface IATSCChannelTuneRequest */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][object] */ + + +EXTERN_C const IID IID_IATSCChannelTuneRequest; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0369B4E1-45B6-11d3-B650-00C04F79498E") + IATSCChannelTuneRequest : public IChannelTuneRequest + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MinorChannel( + /* [retval][out] */ long *MinorChannel) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_MinorChannel( + /* [in] */ long MinorChannel) = 0; + + }; + +#else /* C style interface */ + + typedef struct IATSCChannelTuneRequestVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IATSCChannelTuneRequest * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IATSCChannelTuneRequest * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IATSCChannelTuneRequest * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IATSCChannelTuneRequest * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IATSCChannelTuneRequest * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IATSCChannelTuneRequest * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IATSCChannelTuneRequest * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_TuningSpace )( + IATSCChannelTuneRequest * This, + /* [retval][out] */ ITuningSpace **TuningSpace); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Components )( + IATSCChannelTuneRequest * This, + /* [retval][out] */ IComponents **Components); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + IATSCChannelTuneRequest * This, + /* [retval][out] */ ITuneRequest **NewTuneRequest); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Locator )( + IATSCChannelTuneRequest * This, + /* [retval][out] */ ILocator **Locator); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Locator )( + IATSCChannelTuneRequest * This, + /* [in] */ ILocator *Locator); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Channel )( + IATSCChannelTuneRequest * This, + /* [retval][out] */ long *Channel); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Channel )( + IATSCChannelTuneRequest * This, + /* [in] */ long Channel); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MinorChannel )( + IATSCChannelTuneRequest * This, + /* [retval][out] */ long *MinorChannel); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MinorChannel )( + IATSCChannelTuneRequest * This, + /* [in] */ long MinorChannel); + + END_INTERFACE + } IATSCChannelTuneRequestVtbl; + + interface IATSCChannelTuneRequest + { + CONST_VTBL struct IATSCChannelTuneRequestVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IATSCChannelTuneRequest_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IATSCChannelTuneRequest_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IATSCChannelTuneRequest_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IATSCChannelTuneRequest_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IATSCChannelTuneRequest_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IATSCChannelTuneRequest_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IATSCChannelTuneRequest_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IATSCChannelTuneRequest_get_TuningSpace(This,TuningSpace) \ + (This)->lpVtbl -> get_TuningSpace(This,TuningSpace) + +#define IATSCChannelTuneRequest_get_Components(This,Components) \ + (This)->lpVtbl -> get_Components(This,Components) + +#define IATSCChannelTuneRequest_Clone(This,NewTuneRequest) \ + (This)->lpVtbl -> Clone(This,NewTuneRequest) + +#define IATSCChannelTuneRequest_get_Locator(This,Locator) \ + (This)->lpVtbl -> get_Locator(This,Locator) + +#define IATSCChannelTuneRequest_put_Locator(This,Locator) \ + (This)->lpVtbl -> put_Locator(This,Locator) + + +#define IATSCChannelTuneRequest_get_Channel(This,Channel) \ + (This)->lpVtbl -> get_Channel(This,Channel) + +#define IATSCChannelTuneRequest_put_Channel(This,Channel) \ + (This)->lpVtbl -> put_Channel(This,Channel) + + +#define IATSCChannelTuneRequest_get_MinorChannel(This,MinorChannel) \ + (This)->lpVtbl -> get_MinorChannel(This,MinorChannel) + +#define IATSCChannelTuneRequest_put_MinorChannel(This,MinorChannel) \ + (This)->lpVtbl -> put_MinorChannel(This,MinorChannel) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IATSCChannelTuneRequest_get_MinorChannel_Proxy( + IATSCChannelTuneRequest * This, + /* [retval][out] */ long *MinorChannel); + + +void __RPC_STUB IATSCChannelTuneRequest_get_MinorChannel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IATSCChannelTuneRequest_put_MinorChannel_Proxy( + IATSCChannelTuneRequest * This, + /* [in] */ long MinorChannel); + + +void __RPC_STUB IATSCChannelTuneRequest_put_MinorChannel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IATSCChannelTuneRequest_INTERFACE_DEFINED__ */ + + +#ifndef __IDVBTuneRequest_INTERFACE_DEFINED__ +#define __IDVBTuneRequest_INTERFACE_DEFINED__ + +/* interface IDVBTuneRequest */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][object] */ + + +EXTERN_C const IID IID_IDVBTuneRequest; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0D6F567E-A636-42bb-83BA-CE4C1704AFA2") + IDVBTuneRequest : public ITuneRequest + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ONID( + /* [retval][out] */ long *ONID) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ONID( + /* [in] */ long ONID) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_TSID( + /* [retval][out] */ long *TSID) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_TSID( + /* [in] */ long TSID) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SID( + /* [retval][out] */ long *SID) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SID( + /* [in] */ long SID) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDVBTuneRequestVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDVBTuneRequest * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDVBTuneRequest * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDVBTuneRequest * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IDVBTuneRequest * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IDVBTuneRequest * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IDVBTuneRequest * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IDVBTuneRequest * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_TuningSpace )( + IDVBTuneRequest * This, + /* [retval][out] */ ITuningSpace **TuningSpace); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Components )( + IDVBTuneRequest * This, + /* [retval][out] */ IComponents **Components); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + IDVBTuneRequest * This, + /* [retval][out] */ ITuneRequest **NewTuneRequest); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Locator )( + IDVBTuneRequest * This, + /* [retval][out] */ ILocator **Locator); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Locator )( + IDVBTuneRequest * This, + /* [in] */ ILocator *Locator); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ONID )( + IDVBTuneRequest * This, + /* [retval][out] */ long *ONID); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ONID )( + IDVBTuneRequest * This, + /* [in] */ long ONID); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_TSID )( + IDVBTuneRequest * This, + /* [retval][out] */ long *TSID); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_TSID )( + IDVBTuneRequest * This, + /* [in] */ long TSID); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SID )( + IDVBTuneRequest * This, + /* [retval][out] */ long *SID); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SID )( + IDVBTuneRequest * This, + /* [in] */ long SID); + + END_INTERFACE + } IDVBTuneRequestVtbl; + + interface IDVBTuneRequest + { + CONST_VTBL struct IDVBTuneRequestVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDVBTuneRequest_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDVBTuneRequest_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDVBTuneRequest_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDVBTuneRequest_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IDVBTuneRequest_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IDVBTuneRequest_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IDVBTuneRequest_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IDVBTuneRequest_get_TuningSpace(This,TuningSpace) \ + (This)->lpVtbl -> get_TuningSpace(This,TuningSpace) + +#define IDVBTuneRequest_get_Components(This,Components) \ + (This)->lpVtbl -> get_Components(This,Components) + +#define IDVBTuneRequest_Clone(This,NewTuneRequest) \ + (This)->lpVtbl -> Clone(This,NewTuneRequest) + +#define IDVBTuneRequest_get_Locator(This,Locator) \ + (This)->lpVtbl -> get_Locator(This,Locator) + +#define IDVBTuneRequest_put_Locator(This,Locator) \ + (This)->lpVtbl -> put_Locator(This,Locator) + + +#define IDVBTuneRequest_get_ONID(This,ONID) \ + (This)->lpVtbl -> get_ONID(This,ONID) + +#define IDVBTuneRequest_put_ONID(This,ONID) \ + (This)->lpVtbl -> put_ONID(This,ONID) + +#define IDVBTuneRequest_get_TSID(This,TSID) \ + (This)->lpVtbl -> get_TSID(This,TSID) + +#define IDVBTuneRequest_put_TSID(This,TSID) \ + (This)->lpVtbl -> put_TSID(This,TSID) + +#define IDVBTuneRequest_get_SID(This,SID) \ + (This)->lpVtbl -> get_SID(This,SID) + +#define IDVBTuneRequest_put_SID(This,SID) \ + (This)->lpVtbl -> put_SID(This,SID) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDVBTuneRequest_get_ONID_Proxy( + IDVBTuneRequest * This, + /* [retval][out] */ long *ONID); + + +void __RPC_STUB IDVBTuneRequest_get_ONID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDVBTuneRequest_put_ONID_Proxy( + IDVBTuneRequest * This, + /* [in] */ long ONID); + + +void __RPC_STUB IDVBTuneRequest_put_ONID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDVBTuneRequest_get_TSID_Proxy( + IDVBTuneRequest * This, + /* [retval][out] */ long *TSID); + + +void __RPC_STUB IDVBTuneRequest_get_TSID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDVBTuneRequest_put_TSID_Proxy( + IDVBTuneRequest * This, + /* [in] */ long TSID); + + +void __RPC_STUB IDVBTuneRequest_put_TSID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDVBTuneRequest_get_SID_Proxy( + IDVBTuneRequest * This, + /* [retval][out] */ long *SID); + + +void __RPC_STUB IDVBTuneRequest_get_SID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDVBTuneRequest_put_SID_Proxy( + IDVBTuneRequest * This, + /* [in] */ long SID); + + +void __RPC_STUB IDVBTuneRequest_put_SID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDVBTuneRequest_INTERFACE_DEFINED__ */ + + +#ifndef __ITuner_INTERFACE_DEFINED__ +#define __ITuner_INTERFACE_DEFINED__ + +/* interface ITuner */ +/* [unique][helpstring][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_ITuner; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("28C52640-018A-11d3-9D8E-00C04F72D980") + ITuner : public IUnknown + { + public: + virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_TuningSpace( + /* [retval][out] */ ITuningSpace **TuningSpace) = 0; + + virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_TuningSpace( + /* [in] */ ITuningSpace *TuningSpace) = 0; + + virtual /* [helpstring][restricted][hidden] */ HRESULT STDMETHODCALLTYPE EnumTuningSpaces( + /* [retval][out] */ IEnumTuningSpaces **ppEnum) = 0; + + virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_TuneRequest( + /* [retval][out] */ ITuneRequest **TuneRequest) = 0; + + virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_TuneRequest( + /* [in] */ ITuneRequest *TuneRequest) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Validate( + /* [in] */ ITuneRequest *TuneRequest) = 0; + + virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_PreferredComponentTypes( + /* [retval][out] */ IComponentTypes **ComponentTypes) = 0; + + virtual /* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE put_PreferredComponentTypes( + /* [in] */ IComponentTypes *ComponentTypes) = 0; + + virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_SignalStrength( + /* [retval][out] */ long *Strength) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE TriggerSignalEvents( + /* [in] */ long Interval) = 0; + + }; + +#else /* C style interface */ + + typedef struct ITunerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ITuner * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ITuner * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ITuner * This); + + /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_TuningSpace )( + ITuner * This, + /* [retval][out] */ ITuningSpace **TuningSpace); + + /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_TuningSpace )( + ITuner * This, + /* [in] */ ITuningSpace *TuningSpace); + + /* [helpstring][restricted][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumTuningSpaces )( + ITuner * This, + /* [retval][out] */ IEnumTuningSpaces **ppEnum); + + /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_TuneRequest )( + ITuner * This, + /* [retval][out] */ ITuneRequest **TuneRequest); + + /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_TuneRequest )( + ITuner * This, + /* [in] */ ITuneRequest *TuneRequest); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Validate )( + ITuner * This, + /* [in] */ ITuneRequest *TuneRequest); + + /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PreferredComponentTypes )( + ITuner * This, + /* [retval][out] */ IComponentTypes **ComponentTypes); + + /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PreferredComponentTypes )( + ITuner * This, + /* [in] */ IComponentTypes *ComponentTypes); + + /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SignalStrength )( + ITuner * This, + /* [retval][out] */ long *Strength); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *TriggerSignalEvents )( + ITuner * This, + /* [in] */ long Interval); + + END_INTERFACE + } ITunerVtbl; + + interface ITuner + { + CONST_VTBL struct ITunerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ITuner_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ITuner_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ITuner_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ITuner_get_TuningSpace(This,TuningSpace) \ + (This)->lpVtbl -> get_TuningSpace(This,TuningSpace) + +#define ITuner_put_TuningSpace(This,TuningSpace) \ + (This)->lpVtbl -> put_TuningSpace(This,TuningSpace) + +#define ITuner_EnumTuningSpaces(This,ppEnum) \ + (This)->lpVtbl -> EnumTuningSpaces(This,ppEnum) + +#define ITuner_get_TuneRequest(This,TuneRequest) \ + (This)->lpVtbl -> get_TuneRequest(This,TuneRequest) + +#define ITuner_put_TuneRequest(This,TuneRequest) \ + (This)->lpVtbl -> put_TuneRequest(This,TuneRequest) + +#define ITuner_Validate(This,TuneRequest) \ + (This)->lpVtbl -> Validate(This,TuneRequest) + +#define ITuner_get_PreferredComponentTypes(This,ComponentTypes) \ + (This)->lpVtbl -> get_PreferredComponentTypes(This,ComponentTypes) + +#define ITuner_put_PreferredComponentTypes(This,ComponentTypes) \ + (This)->lpVtbl -> put_PreferredComponentTypes(This,ComponentTypes) + +#define ITuner_get_SignalStrength(This,Strength) \ + (This)->lpVtbl -> get_SignalStrength(This,Strength) + +#define ITuner_TriggerSignalEvents(This,Interval) \ + (This)->lpVtbl -> TriggerSignalEvents(This,Interval) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE ITuner_get_TuningSpace_Proxy( + ITuner * This, + /* [retval][out] */ ITuningSpace **TuningSpace); + + +void __RPC_STUB ITuner_get_TuningSpace_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE ITuner_put_TuningSpace_Proxy( + ITuner * This, + /* [in] */ ITuningSpace *TuningSpace); + + +void __RPC_STUB ITuner_put_TuningSpace_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][restricted][hidden] */ HRESULT STDMETHODCALLTYPE ITuner_EnumTuningSpaces_Proxy( + ITuner * This, + /* [retval][out] */ IEnumTuningSpaces **ppEnum); + + +void __RPC_STUB ITuner_EnumTuningSpaces_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE ITuner_get_TuneRequest_Proxy( + ITuner * This, + /* [retval][out] */ ITuneRequest **TuneRequest); + + +void __RPC_STUB ITuner_get_TuneRequest_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE ITuner_put_TuneRequest_Proxy( + ITuner * This, + /* [in] */ ITuneRequest *TuneRequest); + + +void __RPC_STUB ITuner_put_TuneRequest_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE ITuner_Validate_Proxy( + ITuner * This, + /* [in] */ ITuneRequest *TuneRequest); + + +void __RPC_STUB ITuner_Validate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE ITuner_get_PreferredComponentTypes_Proxy( + ITuner * This, + /* [retval][out] */ IComponentTypes **ComponentTypes); + + +void __RPC_STUB ITuner_get_PreferredComponentTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propput] */ HRESULT STDMETHODCALLTYPE ITuner_put_PreferredComponentTypes_Proxy( + ITuner * This, + /* [in] */ IComponentTypes *ComponentTypes); + + +void __RPC_STUB ITuner_put_PreferredComponentTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE ITuner_get_SignalStrength_Proxy( + ITuner * This, + /* [retval][out] */ long *Strength); + + +void __RPC_STUB ITuner_get_SignalStrength_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE ITuner_TriggerSignalEvents_Proxy( + ITuner * This, + /* [in] */ long Interval); + + +void __RPC_STUB ITuner_TriggerSignalEvents_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ITuner_INTERFACE_DEFINED__ */ + + +#ifndef __IScanningTuner_INTERFACE_DEFINED__ +#define __IScanningTuner_INTERFACE_DEFINED__ + +/* interface IScanningTuner */ +/* [unique][helpstring][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_IScanningTuner; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1DFD0A5C-0284-11d3-9D8E-00C04F72D980") + IScanningTuner : public ITuner + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SeekUp( void) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE SeekDown( void) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE ScanUp( + /* [in] */ long MillisecondsPause) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE ScanDown( + /* [in] */ long MillisecondsPause) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE AutoProgram( void) = 0; + + }; + +#else /* C style interface */ + + typedef struct IScanningTunerVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IScanningTuner * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IScanningTuner * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IScanningTuner * This); + + /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_TuningSpace )( + IScanningTuner * This, + /* [retval][out] */ ITuningSpace **TuningSpace); + + /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_TuningSpace )( + IScanningTuner * This, + /* [in] */ ITuningSpace *TuningSpace); + + /* [helpstring][restricted][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumTuningSpaces )( + IScanningTuner * This, + /* [retval][out] */ IEnumTuningSpaces **ppEnum); + + /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_TuneRequest )( + IScanningTuner * This, + /* [retval][out] */ ITuneRequest **TuneRequest); + + /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_TuneRequest )( + IScanningTuner * This, + /* [in] */ ITuneRequest *TuneRequest); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Validate )( + IScanningTuner * This, + /* [in] */ ITuneRequest *TuneRequest); + + /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PreferredComponentTypes )( + IScanningTuner * This, + /* [retval][out] */ IComponentTypes **ComponentTypes); + + /* [helpstring][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PreferredComponentTypes )( + IScanningTuner * This, + /* [in] */ IComponentTypes *ComponentTypes); + + /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SignalStrength )( + IScanningTuner * This, + /* [retval][out] */ long *Strength); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *TriggerSignalEvents )( + IScanningTuner * This, + /* [in] */ long Interval); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SeekUp )( + IScanningTuner * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *SeekDown )( + IScanningTuner * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *ScanUp )( + IScanningTuner * This, + /* [in] */ long MillisecondsPause); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *ScanDown )( + IScanningTuner * This, + /* [in] */ long MillisecondsPause); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *AutoProgram )( + IScanningTuner * This); + + END_INTERFACE + } IScanningTunerVtbl; + + interface IScanningTuner + { + CONST_VTBL struct IScanningTunerVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IScanningTuner_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IScanningTuner_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IScanningTuner_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IScanningTuner_get_TuningSpace(This,TuningSpace) \ + (This)->lpVtbl -> get_TuningSpace(This,TuningSpace) + +#define IScanningTuner_put_TuningSpace(This,TuningSpace) \ + (This)->lpVtbl -> put_TuningSpace(This,TuningSpace) + +#define IScanningTuner_EnumTuningSpaces(This,ppEnum) \ + (This)->lpVtbl -> EnumTuningSpaces(This,ppEnum) + +#define IScanningTuner_get_TuneRequest(This,TuneRequest) \ + (This)->lpVtbl -> get_TuneRequest(This,TuneRequest) + +#define IScanningTuner_put_TuneRequest(This,TuneRequest) \ + (This)->lpVtbl -> put_TuneRequest(This,TuneRequest) + +#define IScanningTuner_Validate(This,TuneRequest) \ + (This)->lpVtbl -> Validate(This,TuneRequest) + +#define IScanningTuner_get_PreferredComponentTypes(This,ComponentTypes) \ + (This)->lpVtbl -> get_PreferredComponentTypes(This,ComponentTypes) + +#define IScanningTuner_put_PreferredComponentTypes(This,ComponentTypes) \ + (This)->lpVtbl -> put_PreferredComponentTypes(This,ComponentTypes) + +#define IScanningTuner_get_SignalStrength(This,Strength) \ + (This)->lpVtbl -> get_SignalStrength(This,Strength) + +#define IScanningTuner_TriggerSignalEvents(This,Interval) \ + (This)->lpVtbl -> TriggerSignalEvents(This,Interval) + + +#define IScanningTuner_SeekUp(This) \ + (This)->lpVtbl -> SeekUp(This) + +#define IScanningTuner_SeekDown(This) \ + (This)->lpVtbl -> SeekDown(This) + +#define IScanningTuner_ScanUp(This,MillisecondsPause) \ + (This)->lpVtbl -> ScanUp(This,MillisecondsPause) + +#define IScanningTuner_ScanDown(This,MillisecondsPause) \ + (This)->lpVtbl -> ScanDown(This,MillisecondsPause) + +#define IScanningTuner_AutoProgram(This) \ + (This)->lpVtbl -> AutoProgram(This) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IScanningTuner_SeekUp_Proxy( + IScanningTuner * This); + + +void __RPC_STUB IScanningTuner_SeekUp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IScanningTuner_SeekDown_Proxy( + IScanningTuner * This); + + +void __RPC_STUB IScanningTuner_SeekDown_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IScanningTuner_ScanUp_Proxy( + IScanningTuner * This, + /* [in] */ long MillisecondsPause); + + +void __RPC_STUB IScanningTuner_ScanUp_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IScanningTuner_ScanDown_Proxy( + IScanningTuner * This, + /* [in] */ long MillisecondsPause); + + +void __RPC_STUB IScanningTuner_ScanDown_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IScanningTuner_AutoProgram_Proxy( + IScanningTuner * This); + + +void __RPC_STUB IScanningTuner_AutoProgram_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IScanningTuner_INTERFACE_DEFINED__ */ + + +#ifndef __ITunerEvents_INTERFACE_DEFINED__ +#define __ITunerEvents_INTERFACE_DEFINED__ + +/* interface ITunerEvents */ +/* [unique][helpstring][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_ITunerEvents; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("68481420-0280-11d3-9D8E-00C04F72D980") + ITunerEvents : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE OnTune( + /* [in] */ ITuneRequest **Request, + /* [in] */ long *Strength) = 0; + + }; + +#else /* C style interface */ + + typedef struct ITunerEventsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ITunerEvents * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ITunerEvents * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ITunerEvents * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *OnTune )( + ITunerEvents * This, + /* [in] */ ITuneRequest **Request, + /* [in] */ long *Strength); + + END_INTERFACE + } ITunerEventsVtbl; + + interface ITunerEvents + { + CONST_VTBL struct ITunerEventsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ITunerEvents_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ITunerEvents_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ITunerEvents_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ITunerEvents_OnTune(This,Request,Strength) \ + (This)->lpVtbl -> OnTune(This,Request,Strength) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE ITunerEvents_OnTune_Proxy( + ITunerEvents * This, + /* [in] */ ITuneRequest **Request, + /* [in] */ long *Strength); + + +void __RPC_STUB ITunerEvents_OnTune_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ITunerEvents_INTERFACE_DEFINED__ */ + + +#ifndef __ISignalEvents_INTERFACE_DEFINED__ +#define __ISignalEvents_INTERFACE_DEFINED__ + +/* interface ISignalEvents */ +/* [unique][helpstring][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_ISignalEvents; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("85E2439E-0E23-11d3-9D8E-00C04F72D980") + ISignalEvents : public IUnknown + { + public: + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE OnSignal( + /* [out] */ long *Strength) = 0; + + }; + +#else /* C style interface */ + + typedef struct ISignalEventsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ISignalEvents * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ISignalEvents * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ISignalEvents * This); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *OnSignal )( + ISignalEvents * This, + /* [out] */ long *Strength); + + END_INTERFACE + } ISignalEventsVtbl; + + interface ISignalEvents + { + CONST_VTBL struct ISignalEventsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ISignalEvents_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ISignalEvents_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ISignalEvents_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ISignalEvents_OnSignal(This,Strength) \ + (This)->lpVtbl -> OnSignal(This,Strength) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE ISignalEvents_OnSignal_Proxy( + ISignalEvents * This, + /* [out] */ long *Strength); + + +void __RPC_STUB ISignalEvents_OnSignal_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ISignalEvents_INTERFACE_DEFINED__ */ + + +#ifndef __IComponentType_INTERFACE_DEFINED__ +#define __IComponentType_INTERFACE_DEFINED__ + +/* interface IComponentType */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_IComponentType; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6A340DC0-0311-11d3-9D8E-00C04F72D980") + IComponentType : public IDispatch + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Category( + /* [retval][out] */ ComponentCategory *Category) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Category( + /* [in] */ ComponentCategory Category) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MediaMajorType( + /* [retval][out] */ BSTR *MediaMajorType) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_MediaMajorType( + /* [in] */ BSTR MediaMajorType) = 0; + + virtual /* [restricted][hidden][helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get__MediaMajorType( + /* [retval][out] */ GUID *MediaMajorTypeGuid) = 0; + + virtual /* [restricted][hidden][helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put__MediaMajorType( + /* [in] */ REFCLSID MediaMajorTypeGuid) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MediaSubType( + /* [retval][out] */ BSTR *MediaSubType) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_MediaSubType( + /* [in] */ BSTR MediaSubType) = 0; + + virtual /* [restricted][hidden][helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get__MediaSubType( + /* [retval][out] */ GUID *MediaSubTypeGuid) = 0; + + virtual /* [restricted][hidden][helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put__MediaSubType( + /* [in] */ REFCLSID MediaSubTypeGuid) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_MediaFormatType( + /* [retval][out] */ BSTR *MediaFormatType) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_MediaFormatType( + /* [in] */ BSTR MediaFormatType) = 0; + + virtual /* [restricted][hidden][helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get__MediaFormatType( + /* [retval][out] */ GUID *MediaFormatTypeGuid) = 0; + + virtual /* [restricted][hidden][helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put__MediaFormatType( + /* [in] */ REFCLSID MediaFormatTypeGuid) = 0; + + virtual /* [helpstring][restricted][hidden][id][propget] */ HRESULT STDMETHODCALLTYPE get_MediaType( + /* [retval][out] */ AM_MEDIA_TYPE *MediaType) = 0; + + virtual /* [helpstring][restricted][hidden][id][propput] */ HRESULT STDMETHODCALLTYPE put_MediaType( + /* [in] */ AM_MEDIA_TYPE *MediaType) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Clone( + /* [retval][out] */ IComponentType **NewCT) = 0; + + }; + +#else /* C style interface */ + + typedef struct IComponentTypeVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IComponentType * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IComponentType * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IComponentType * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IComponentType * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IComponentType * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IComponentType * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IComponentType * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Category )( + IComponentType * This, + /* [retval][out] */ ComponentCategory *Category); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Category )( + IComponentType * This, + /* [in] */ ComponentCategory Category); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaMajorType )( + IComponentType * This, + /* [retval][out] */ BSTR *MediaMajorType); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MediaMajorType )( + IComponentType * This, + /* [in] */ BSTR MediaMajorType); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__MediaMajorType )( + IComponentType * This, + /* [retval][out] */ GUID *MediaMajorTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__MediaMajorType )( + IComponentType * This, + /* [in] */ REFCLSID MediaMajorTypeGuid); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaSubType )( + IComponentType * This, + /* [retval][out] */ BSTR *MediaSubType); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MediaSubType )( + IComponentType * This, + /* [in] */ BSTR MediaSubType); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__MediaSubType )( + IComponentType * This, + /* [retval][out] */ GUID *MediaSubTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__MediaSubType )( + IComponentType * This, + /* [in] */ REFCLSID MediaSubTypeGuid); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaFormatType )( + IComponentType * This, + /* [retval][out] */ BSTR *MediaFormatType); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MediaFormatType )( + IComponentType * This, + /* [in] */ BSTR MediaFormatType); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__MediaFormatType )( + IComponentType * This, + /* [retval][out] */ GUID *MediaFormatTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__MediaFormatType )( + IComponentType * This, + /* [in] */ REFCLSID MediaFormatTypeGuid); + + /* [helpstring][restricted][hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaType )( + IComponentType * This, + /* [retval][out] */ AM_MEDIA_TYPE *MediaType); + + /* [helpstring][restricted][hidden][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MediaType )( + IComponentType * This, + /* [in] */ AM_MEDIA_TYPE *MediaType); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + IComponentType * This, + /* [retval][out] */ IComponentType **NewCT); + + END_INTERFACE + } IComponentTypeVtbl; + + interface IComponentType + { + CONST_VTBL struct IComponentTypeVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IComponentType_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IComponentType_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IComponentType_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IComponentType_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IComponentType_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IComponentType_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IComponentType_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IComponentType_get_Category(This,Category) \ + (This)->lpVtbl -> get_Category(This,Category) + +#define IComponentType_put_Category(This,Category) \ + (This)->lpVtbl -> put_Category(This,Category) + +#define IComponentType_get_MediaMajorType(This,MediaMajorType) \ + (This)->lpVtbl -> get_MediaMajorType(This,MediaMajorType) + +#define IComponentType_put_MediaMajorType(This,MediaMajorType) \ + (This)->lpVtbl -> put_MediaMajorType(This,MediaMajorType) + +#define IComponentType_get__MediaMajorType(This,MediaMajorTypeGuid) \ + (This)->lpVtbl -> get__MediaMajorType(This,MediaMajorTypeGuid) + +#define IComponentType_put__MediaMajorType(This,MediaMajorTypeGuid) \ + (This)->lpVtbl -> put__MediaMajorType(This,MediaMajorTypeGuid) + +#define IComponentType_get_MediaSubType(This,MediaSubType) \ + (This)->lpVtbl -> get_MediaSubType(This,MediaSubType) + +#define IComponentType_put_MediaSubType(This,MediaSubType) \ + (This)->lpVtbl -> put_MediaSubType(This,MediaSubType) + +#define IComponentType_get__MediaSubType(This,MediaSubTypeGuid) \ + (This)->lpVtbl -> get__MediaSubType(This,MediaSubTypeGuid) + +#define IComponentType_put__MediaSubType(This,MediaSubTypeGuid) \ + (This)->lpVtbl -> put__MediaSubType(This,MediaSubTypeGuid) + +#define IComponentType_get_MediaFormatType(This,MediaFormatType) \ + (This)->lpVtbl -> get_MediaFormatType(This,MediaFormatType) + +#define IComponentType_put_MediaFormatType(This,MediaFormatType) \ + (This)->lpVtbl -> put_MediaFormatType(This,MediaFormatType) + +#define IComponentType_get__MediaFormatType(This,MediaFormatTypeGuid) \ + (This)->lpVtbl -> get__MediaFormatType(This,MediaFormatTypeGuid) + +#define IComponentType_put__MediaFormatType(This,MediaFormatTypeGuid) \ + (This)->lpVtbl -> put__MediaFormatType(This,MediaFormatTypeGuid) + +#define IComponentType_get_MediaType(This,MediaType) \ + (This)->lpVtbl -> get_MediaType(This,MediaType) + +#define IComponentType_put_MediaType(This,MediaType) \ + (This)->lpVtbl -> put_MediaType(This,MediaType) + +#define IComponentType_Clone(This,NewCT) \ + (This)->lpVtbl -> Clone(This,NewCT) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IComponentType_get_Category_Proxy( + IComponentType * This, + /* [retval][out] */ ComponentCategory *Category); + + +void __RPC_STUB IComponentType_get_Category_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IComponentType_put_Category_Proxy( + IComponentType * This, + /* [in] */ ComponentCategory Category); + + +void __RPC_STUB IComponentType_put_Category_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IComponentType_get_MediaMajorType_Proxy( + IComponentType * This, + /* [retval][out] */ BSTR *MediaMajorType); + + +void __RPC_STUB IComponentType_get_MediaMajorType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IComponentType_put_MediaMajorType_Proxy( + IComponentType * This, + /* [in] */ BSTR MediaMajorType); + + +void __RPC_STUB IComponentType_put_MediaMajorType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][hidden][helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IComponentType_get__MediaMajorType_Proxy( + IComponentType * This, + /* [retval][out] */ GUID *MediaMajorTypeGuid); + + +void __RPC_STUB IComponentType_get__MediaMajorType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][hidden][helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IComponentType_put__MediaMajorType_Proxy( + IComponentType * This, + /* [in] */ REFCLSID MediaMajorTypeGuid); + + +void __RPC_STUB IComponentType_put__MediaMajorType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IComponentType_get_MediaSubType_Proxy( + IComponentType * This, + /* [retval][out] */ BSTR *MediaSubType); + + +void __RPC_STUB IComponentType_get_MediaSubType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IComponentType_put_MediaSubType_Proxy( + IComponentType * This, + /* [in] */ BSTR MediaSubType); + + +void __RPC_STUB IComponentType_put_MediaSubType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][hidden][helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IComponentType_get__MediaSubType_Proxy( + IComponentType * This, + /* [retval][out] */ GUID *MediaSubTypeGuid); + + +void __RPC_STUB IComponentType_get__MediaSubType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][hidden][helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IComponentType_put__MediaSubType_Proxy( + IComponentType * This, + /* [in] */ REFCLSID MediaSubTypeGuid); + + +void __RPC_STUB IComponentType_put__MediaSubType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IComponentType_get_MediaFormatType_Proxy( + IComponentType * This, + /* [retval][out] */ BSTR *MediaFormatType); + + +void __RPC_STUB IComponentType_get_MediaFormatType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IComponentType_put_MediaFormatType_Proxy( + IComponentType * This, + /* [in] */ BSTR MediaFormatType); + + +void __RPC_STUB IComponentType_put_MediaFormatType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][hidden][helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IComponentType_get__MediaFormatType_Proxy( + IComponentType * This, + /* [retval][out] */ GUID *MediaFormatTypeGuid); + + +void __RPC_STUB IComponentType_get__MediaFormatType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][hidden][helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IComponentType_put__MediaFormatType_Proxy( + IComponentType * This, + /* [in] */ REFCLSID MediaFormatTypeGuid); + + +void __RPC_STUB IComponentType_put__MediaFormatType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][restricted][hidden][id][propget] */ HRESULT STDMETHODCALLTYPE IComponentType_get_MediaType_Proxy( + IComponentType * This, + /* [retval][out] */ AM_MEDIA_TYPE *MediaType); + + +void __RPC_STUB IComponentType_get_MediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][restricted][hidden][id][propput] */ HRESULT STDMETHODCALLTYPE IComponentType_put_MediaType_Proxy( + IComponentType * This, + /* [in] */ AM_MEDIA_TYPE *MediaType); + + +void __RPC_STUB IComponentType_put_MediaType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IComponentType_Clone_Proxy( + IComponentType * This, + /* [retval][out] */ IComponentType **NewCT); + + +void __RPC_STUB IComponentType_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IComponentType_INTERFACE_DEFINED__ */ + + +#ifndef __ILanguageComponentType_INTERFACE_DEFINED__ +#define __ILanguageComponentType_INTERFACE_DEFINED__ + +/* interface ILanguageComponentType */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_ILanguageComponentType; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("B874C8BA-0FA2-11d3-9D8E-00C04F72D980") + ILanguageComponentType : public IComponentType + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_LangID( + /* [retval][out] */ long *LangID) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_LangID( + /* [in] */ long LangID) = 0; + + }; + +#else /* C style interface */ + + typedef struct ILanguageComponentTypeVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ILanguageComponentType * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ILanguageComponentType * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ILanguageComponentType * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ILanguageComponentType * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ILanguageComponentType * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ILanguageComponentType * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ILanguageComponentType * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Category )( + ILanguageComponentType * This, + /* [retval][out] */ ComponentCategory *Category); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Category )( + ILanguageComponentType * This, + /* [in] */ ComponentCategory Category); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaMajorType )( + ILanguageComponentType * This, + /* [retval][out] */ BSTR *MediaMajorType); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MediaMajorType )( + ILanguageComponentType * This, + /* [in] */ BSTR MediaMajorType); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__MediaMajorType )( + ILanguageComponentType * This, + /* [retval][out] */ GUID *MediaMajorTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__MediaMajorType )( + ILanguageComponentType * This, + /* [in] */ REFCLSID MediaMajorTypeGuid); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaSubType )( + ILanguageComponentType * This, + /* [retval][out] */ BSTR *MediaSubType); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MediaSubType )( + ILanguageComponentType * This, + /* [in] */ BSTR MediaSubType); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__MediaSubType )( + ILanguageComponentType * This, + /* [retval][out] */ GUID *MediaSubTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__MediaSubType )( + ILanguageComponentType * This, + /* [in] */ REFCLSID MediaSubTypeGuid); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaFormatType )( + ILanguageComponentType * This, + /* [retval][out] */ BSTR *MediaFormatType); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MediaFormatType )( + ILanguageComponentType * This, + /* [in] */ BSTR MediaFormatType); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__MediaFormatType )( + ILanguageComponentType * This, + /* [retval][out] */ GUID *MediaFormatTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__MediaFormatType )( + ILanguageComponentType * This, + /* [in] */ REFCLSID MediaFormatTypeGuid); + + /* [helpstring][restricted][hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaType )( + ILanguageComponentType * This, + /* [retval][out] */ AM_MEDIA_TYPE *MediaType); + + /* [helpstring][restricted][hidden][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MediaType )( + ILanguageComponentType * This, + /* [in] */ AM_MEDIA_TYPE *MediaType); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + ILanguageComponentType * This, + /* [retval][out] */ IComponentType **NewCT); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LangID )( + ILanguageComponentType * This, + /* [retval][out] */ long *LangID); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_LangID )( + ILanguageComponentType * This, + /* [in] */ long LangID); + + END_INTERFACE + } ILanguageComponentTypeVtbl; + + interface ILanguageComponentType + { + CONST_VTBL struct ILanguageComponentTypeVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ILanguageComponentType_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ILanguageComponentType_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ILanguageComponentType_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ILanguageComponentType_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ILanguageComponentType_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ILanguageComponentType_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ILanguageComponentType_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ILanguageComponentType_get_Category(This,Category) \ + (This)->lpVtbl -> get_Category(This,Category) + +#define ILanguageComponentType_put_Category(This,Category) \ + (This)->lpVtbl -> put_Category(This,Category) + +#define ILanguageComponentType_get_MediaMajorType(This,MediaMajorType) \ + (This)->lpVtbl -> get_MediaMajorType(This,MediaMajorType) + +#define ILanguageComponentType_put_MediaMajorType(This,MediaMajorType) \ + (This)->lpVtbl -> put_MediaMajorType(This,MediaMajorType) + +#define ILanguageComponentType_get__MediaMajorType(This,MediaMajorTypeGuid) \ + (This)->lpVtbl -> get__MediaMajorType(This,MediaMajorTypeGuid) + +#define ILanguageComponentType_put__MediaMajorType(This,MediaMajorTypeGuid) \ + (This)->lpVtbl -> put__MediaMajorType(This,MediaMajorTypeGuid) + +#define ILanguageComponentType_get_MediaSubType(This,MediaSubType) \ + (This)->lpVtbl -> get_MediaSubType(This,MediaSubType) + +#define ILanguageComponentType_put_MediaSubType(This,MediaSubType) \ + (This)->lpVtbl -> put_MediaSubType(This,MediaSubType) + +#define ILanguageComponentType_get__MediaSubType(This,MediaSubTypeGuid) \ + (This)->lpVtbl -> get__MediaSubType(This,MediaSubTypeGuid) + +#define ILanguageComponentType_put__MediaSubType(This,MediaSubTypeGuid) \ + (This)->lpVtbl -> put__MediaSubType(This,MediaSubTypeGuid) + +#define ILanguageComponentType_get_MediaFormatType(This,MediaFormatType) \ + (This)->lpVtbl -> get_MediaFormatType(This,MediaFormatType) + +#define ILanguageComponentType_put_MediaFormatType(This,MediaFormatType) \ + (This)->lpVtbl -> put_MediaFormatType(This,MediaFormatType) + +#define ILanguageComponentType_get__MediaFormatType(This,MediaFormatTypeGuid) \ + (This)->lpVtbl -> get__MediaFormatType(This,MediaFormatTypeGuid) + +#define ILanguageComponentType_put__MediaFormatType(This,MediaFormatTypeGuid) \ + (This)->lpVtbl -> put__MediaFormatType(This,MediaFormatTypeGuid) + +#define ILanguageComponentType_get_MediaType(This,MediaType) \ + (This)->lpVtbl -> get_MediaType(This,MediaType) + +#define ILanguageComponentType_put_MediaType(This,MediaType) \ + (This)->lpVtbl -> put_MediaType(This,MediaType) + +#define ILanguageComponentType_Clone(This,NewCT) \ + (This)->lpVtbl -> Clone(This,NewCT) + + +#define ILanguageComponentType_get_LangID(This,LangID) \ + (This)->lpVtbl -> get_LangID(This,LangID) + +#define ILanguageComponentType_put_LangID(This,LangID) \ + (This)->lpVtbl -> put_LangID(This,LangID) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ILanguageComponentType_get_LangID_Proxy( + ILanguageComponentType * This, + /* [retval][out] */ long *LangID); + + +void __RPC_STUB ILanguageComponentType_get_LangID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ILanguageComponentType_put_LangID_Proxy( + ILanguageComponentType * This, + /* [in] */ long LangID); + + +void __RPC_STUB ILanguageComponentType_put_LangID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ILanguageComponentType_INTERFACE_DEFINED__ */ + + +#ifndef __IMPEG2ComponentType_INTERFACE_DEFINED__ +#define __IMPEG2ComponentType_INTERFACE_DEFINED__ + +/* interface IMPEG2ComponentType */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_IMPEG2ComponentType; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("2C073D84-B51C-48c9-AA9F-68971E1F6E38") + IMPEG2ComponentType : public ILanguageComponentType + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_StreamType( + /* [retval][out] */ MPEG2StreamType *MP2StreamType) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_StreamType( + /* [in] */ MPEG2StreamType MP2StreamType) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMPEG2ComponentTypeVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMPEG2ComponentType * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMPEG2ComponentType * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMPEG2ComponentType * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IMPEG2ComponentType * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IMPEG2ComponentType * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IMPEG2ComponentType * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IMPEG2ComponentType * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Category )( + IMPEG2ComponentType * This, + /* [retval][out] */ ComponentCategory *Category); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Category )( + IMPEG2ComponentType * This, + /* [in] */ ComponentCategory Category); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaMajorType )( + IMPEG2ComponentType * This, + /* [retval][out] */ BSTR *MediaMajorType); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MediaMajorType )( + IMPEG2ComponentType * This, + /* [in] */ BSTR MediaMajorType); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__MediaMajorType )( + IMPEG2ComponentType * This, + /* [retval][out] */ GUID *MediaMajorTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__MediaMajorType )( + IMPEG2ComponentType * This, + /* [in] */ REFCLSID MediaMajorTypeGuid); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaSubType )( + IMPEG2ComponentType * This, + /* [retval][out] */ BSTR *MediaSubType); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MediaSubType )( + IMPEG2ComponentType * This, + /* [in] */ BSTR MediaSubType); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__MediaSubType )( + IMPEG2ComponentType * This, + /* [retval][out] */ GUID *MediaSubTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__MediaSubType )( + IMPEG2ComponentType * This, + /* [in] */ REFCLSID MediaSubTypeGuid); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaFormatType )( + IMPEG2ComponentType * This, + /* [retval][out] */ BSTR *MediaFormatType); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MediaFormatType )( + IMPEG2ComponentType * This, + /* [in] */ BSTR MediaFormatType); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__MediaFormatType )( + IMPEG2ComponentType * This, + /* [retval][out] */ GUID *MediaFormatTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__MediaFormatType )( + IMPEG2ComponentType * This, + /* [in] */ REFCLSID MediaFormatTypeGuid); + + /* [helpstring][restricted][hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaType )( + IMPEG2ComponentType * This, + /* [retval][out] */ AM_MEDIA_TYPE *MediaType); + + /* [helpstring][restricted][hidden][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MediaType )( + IMPEG2ComponentType * This, + /* [in] */ AM_MEDIA_TYPE *MediaType); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + IMPEG2ComponentType * This, + /* [retval][out] */ IComponentType **NewCT); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LangID )( + IMPEG2ComponentType * This, + /* [retval][out] */ long *LangID); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_LangID )( + IMPEG2ComponentType * This, + /* [in] */ long LangID); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StreamType )( + IMPEG2ComponentType * This, + /* [retval][out] */ MPEG2StreamType *MP2StreamType); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_StreamType )( + IMPEG2ComponentType * This, + /* [in] */ MPEG2StreamType MP2StreamType); + + END_INTERFACE + } IMPEG2ComponentTypeVtbl; + + interface IMPEG2ComponentType + { + CONST_VTBL struct IMPEG2ComponentTypeVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMPEG2ComponentType_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMPEG2ComponentType_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMPEG2ComponentType_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMPEG2ComponentType_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IMPEG2ComponentType_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IMPEG2ComponentType_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IMPEG2ComponentType_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IMPEG2ComponentType_get_Category(This,Category) \ + (This)->lpVtbl -> get_Category(This,Category) + +#define IMPEG2ComponentType_put_Category(This,Category) \ + (This)->lpVtbl -> put_Category(This,Category) + +#define IMPEG2ComponentType_get_MediaMajorType(This,MediaMajorType) \ + (This)->lpVtbl -> get_MediaMajorType(This,MediaMajorType) + +#define IMPEG2ComponentType_put_MediaMajorType(This,MediaMajorType) \ + (This)->lpVtbl -> put_MediaMajorType(This,MediaMajorType) + +#define IMPEG2ComponentType_get__MediaMajorType(This,MediaMajorTypeGuid) \ + (This)->lpVtbl -> get__MediaMajorType(This,MediaMajorTypeGuid) + +#define IMPEG2ComponentType_put__MediaMajorType(This,MediaMajorTypeGuid) \ + (This)->lpVtbl -> put__MediaMajorType(This,MediaMajorTypeGuid) + +#define IMPEG2ComponentType_get_MediaSubType(This,MediaSubType) \ + (This)->lpVtbl -> get_MediaSubType(This,MediaSubType) + +#define IMPEG2ComponentType_put_MediaSubType(This,MediaSubType) \ + (This)->lpVtbl -> put_MediaSubType(This,MediaSubType) + +#define IMPEG2ComponentType_get__MediaSubType(This,MediaSubTypeGuid) \ + (This)->lpVtbl -> get__MediaSubType(This,MediaSubTypeGuid) + +#define IMPEG2ComponentType_put__MediaSubType(This,MediaSubTypeGuid) \ + (This)->lpVtbl -> put__MediaSubType(This,MediaSubTypeGuid) + +#define IMPEG2ComponentType_get_MediaFormatType(This,MediaFormatType) \ + (This)->lpVtbl -> get_MediaFormatType(This,MediaFormatType) + +#define IMPEG2ComponentType_put_MediaFormatType(This,MediaFormatType) \ + (This)->lpVtbl -> put_MediaFormatType(This,MediaFormatType) + +#define IMPEG2ComponentType_get__MediaFormatType(This,MediaFormatTypeGuid) \ + (This)->lpVtbl -> get__MediaFormatType(This,MediaFormatTypeGuid) + +#define IMPEG2ComponentType_put__MediaFormatType(This,MediaFormatTypeGuid) \ + (This)->lpVtbl -> put__MediaFormatType(This,MediaFormatTypeGuid) + +#define IMPEG2ComponentType_get_MediaType(This,MediaType) \ + (This)->lpVtbl -> get_MediaType(This,MediaType) + +#define IMPEG2ComponentType_put_MediaType(This,MediaType) \ + (This)->lpVtbl -> put_MediaType(This,MediaType) + +#define IMPEG2ComponentType_Clone(This,NewCT) \ + (This)->lpVtbl -> Clone(This,NewCT) + + +#define IMPEG2ComponentType_get_LangID(This,LangID) \ + (This)->lpVtbl -> get_LangID(This,LangID) + +#define IMPEG2ComponentType_put_LangID(This,LangID) \ + (This)->lpVtbl -> put_LangID(This,LangID) + + +#define IMPEG2ComponentType_get_StreamType(This,MP2StreamType) \ + (This)->lpVtbl -> get_StreamType(This,MP2StreamType) + +#define IMPEG2ComponentType_put_StreamType(This,MP2StreamType) \ + (This)->lpVtbl -> put_StreamType(This,MP2StreamType) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMPEG2ComponentType_get_StreamType_Proxy( + IMPEG2ComponentType * This, + /* [retval][out] */ MPEG2StreamType *MP2StreamType); + + +void __RPC_STUB IMPEG2ComponentType_get_StreamType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IMPEG2ComponentType_put_StreamType_Proxy( + IMPEG2ComponentType * This, + /* [in] */ MPEG2StreamType MP2StreamType); + + +void __RPC_STUB IMPEG2ComponentType_put_StreamType_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMPEG2ComponentType_INTERFACE_DEFINED__ */ + + +#ifndef __IATSCComponentType_INTERFACE_DEFINED__ +#define __IATSCComponentType_INTERFACE_DEFINED__ + +/* interface IATSCComponentType */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_IATSCComponentType; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("FC189E4D-7BD4-4125-B3B3-3A76A332CC96") + IATSCComponentType : public IMPEG2ComponentType + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Flags( + /* [retval][out] */ long *Flags) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Flags( + /* [in] */ long flags) = 0; + + }; + +#else /* C style interface */ + + typedef struct IATSCComponentTypeVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IATSCComponentType * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IATSCComponentType * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IATSCComponentType * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IATSCComponentType * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IATSCComponentType * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IATSCComponentType * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IATSCComponentType * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Category )( + IATSCComponentType * This, + /* [retval][out] */ ComponentCategory *Category); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Category )( + IATSCComponentType * This, + /* [in] */ ComponentCategory Category); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaMajorType )( + IATSCComponentType * This, + /* [retval][out] */ BSTR *MediaMajorType); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MediaMajorType )( + IATSCComponentType * This, + /* [in] */ BSTR MediaMajorType); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__MediaMajorType )( + IATSCComponentType * This, + /* [retval][out] */ GUID *MediaMajorTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__MediaMajorType )( + IATSCComponentType * This, + /* [in] */ REFCLSID MediaMajorTypeGuid); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaSubType )( + IATSCComponentType * This, + /* [retval][out] */ BSTR *MediaSubType); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MediaSubType )( + IATSCComponentType * This, + /* [in] */ BSTR MediaSubType); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__MediaSubType )( + IATSCComponentType * This, + /* [retval][out] */ GUID *MediaSubTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__MediaSubType )( + IATSCComponentType * This, + /* [in] */ REFCLSID MediaSubTypeGuid); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaFormatType )( + IATSCComponentType * This, + /* [retval][out] */ BSTR *MediaFormatType); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MediaFormatType )( + IATSCComponentType * This, + /* [in] */ BSTR MediaFormatType); + + /* [restricted][hidden][helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__MediaFormatType )( + IATSCComponentType * This, + /* [retval][out] */ GUID *MediaFormatTypeGuid); + + /* [restricted][hidden][helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put__MediaFormatType )( + IATSCComponentType * This, + /* [in] */ REFCLSID MediaFormatTypeGuid); + + /* [helpstring][restricted][hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_MediaType )( + IATSCComponentType * This, + /* [retval][out] */ AM_MEDIA_TYPE *MediaType); + + /* [helpstring][restricted][hidden][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_MediaType )( + IATSCComponentType * This, + /* [in] */ AM_MEDIA_TYPE *MediaType); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + IATSCComponentType * This, + /* [retval][out] */ IComponentType **NewCT); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LangID )( + IATSCComponentType * This, + /* [retval][out] */ long *LangID); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_LangID )( + IATSCComponentType * This, + /* [in] */ long LangID); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_StreamType )( + IATSCComponentType * This, + /* [retval][out] */ MPEG2StreamType *MP2StreamType); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_StreamType )( + IATSCComponentType * This, + /* [in] */ MPEG2StreamType MP2StreamType); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Flags )( + IATSCComponentType * This, + /* [retval][out] */ long *Flags); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Flags )( + IATSCComponentType * This, + /* [in] */ long flags); + + END_INTERFACE + } IATSCComponentTypeVtbl; + + interface IATSCComponentType + { + CONST_VTBL struct IATSCComponentTypeVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IATSCComponentType_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IATSCComponentType_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IATSCComponentType_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IATSCComponentType_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IATSCComponentType_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IATSCComponentType_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IATSCComponentType_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IATSCComponentType_get_Category(This,Category) \ + (This)->lpVtbl -> get_Category(This,Category) + +#define IATSCComponentType_put_Category(This,Category) \ + (This)->lpVtbl -> put_Category(This,Category) + +#define IATSCComponentType_get_MediaMajorType(This,MediaMajorType) \ + (This)->lpVtbl -> get_MediaMajorType(This,MediaMajorType) + +#define IATSCComponentType_put_MediaMajorType(This,MediaMajorType) \ + (This)->lpVtbl -> put_MediaMajorType(This,MediaMajorType) + +#define IATSCComponentType_get__MediaMajorType(This,MediaMajorTypeGuid) \ + (This)->lpVtbl -> get__MediaMajorType(This,MediaMajorTypeGuid) + +#define IATSCComponentType_put__MediaMajorType(This,MediaMajorTypeGuid) \ + (This)->lpVtbl -> put__MediaMajorType(This,MediaMajorTypeGuid) + +#define IATSCComponentType_get_MediaSubType(This,MediaSubType) \ + (This)->lpVtbl -> get_MediaSubType(This,MediaSubType) + +#define IATSCComponentType_put_MediaSubType(This,MediaSubType) \ + (This)->lpVtbl -> put_MediaSubType(This,MediaSubType) + +#define IATSCComponentType_get__MediaSubType(This,MediaSubTypeGuid) \ + (This)->lpVtbl -> get__MediaSubType(This,MediaSubTypeGuid) + +#define IATSCComponentType_put__MediaSubType(This,MediaSubTypeGuid) \ + (This)->lpVtbl -> put__MediaSubType(This,MediaSubTypeGuid) + +#define IATSCComponentType_get_MediaFormatType(This,MediaFormatType) \ + (This)->lpVtbl -> get_MediaFormatType(This,MediaFormatType) + +#define IATSCComponentType_put_MediaFormatType(This,MediaFormatType) \ + (This)->lpVtbl -> put_MediaFormatType(This,MediaFormatType) + +#define IATSCComponentType_get__MediaFormatType(This,MediaFormatTypeGuid) \ + (This)->lpVtbl -> get__MediaFormatType(This,MediaFormatTypeGuid) + +#define IATSCComponentType_put__MediaFormatType(This,MediaFormatTypeGuid) \ + (This)->lpVtbl -> put__MediaFormatType(This,MediaFormatTypeGuid) + +#define IATSCComponentType_get_MediaType(This,MediaType) \ + (This)->lpVtbl -> get_MediaType(This,MediaType) + +#define IATSCComponentType_put_MediaType(This,MediaType) \ + (This)->lpVtbl -> put_MediaType(This,MediaType) + +#define IATSCComponentType_Clone(This,NewCT) \ + (This)->lpVtbl -> Clone(This,NewCT) + + +#define IATSCComponentType_get_LangID(This,LangID) \ + (This)->lpVtbl -> get_LangID(This,LangID) + +#define IATSCComponentType_put_LangID(This,LangID) \ + (This)->lpVtbl -> put_LangID(This,LangID) + + +#define IATSCComponentType_get_StreamType(This,MP2StreamType) \ + (This)->lpVtbl -> get_StreamType(This,MP2StreamType) + +#define IATSCComponentType_put_StreamType(This,MP2StreamType) \ + (This)->lpVtbl -> put_StreamType(This,MP2StreamType) + + +#define IATSCComponentType_get_Flags(This,Flags) \ + (This)->lpVtbl -> get_Flags(This,Flags) + +#define IATSCComponentType_put_Flags(This,flags) \ + (This)->lpVtbl -> put_Flags(This,flags) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IATSCComponentType_get_Flags_Proxy( + IATSCComponentType * This, + /* [retval][out] */ long *Flags); + + +void __RPC_STUB IATSCComponentType_get_Flags_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IATSCComponentType_put_Flags_Proxy( + IATSCComponentType * This, + /* [in] */ long flags); + + +void __RPC_STUB IATSCComponentType_put_Flags_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IATSCComponentType_INTERFACE_DEFINED__ */ + + +#ifndef __IEnumComponentTypes_INTERFACE_DEFINED__ +#define __IEnumComponentTypes_INTERFACE_DEFINED__ + +/* interface IEnumComponentTypes */ +/* [unique][uuid][object][restricted][hidden] */ + + +EXTERN_C const IID IID_IEnumComponentTypes; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8A674B4A-1F63-11d3-B64C-00C04F79498E") + IEnumComponentTypes : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ IComponentType **rgelt, + /* [out] */ ULONG *pceltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG celt) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IEnumComponentTypes **ppEnum) = 0; + + }; + +#else /* C style interface */ + + typedef struct IEnumComponentTypesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IEnumComponentTypes * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IEnumComponentTypes * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IEnumComponentTypes * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IEnumComponentTypes * This, + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ IComponentType **rgelt, + /* [out] */ ULONG *pceltFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IEnumComponentTypes * This, + /* [in] */ ULONG celt); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IEnumComponentTypes * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IEnumComponentTypes * This, + /* [out] */ IEnumComponentTypes **ppEnum); + + END_INTERFACE + } IEnumComponentTypesVtbl; + + interface IEnumComponentTypes + { + CONST_VTBL struct IEnumComponentTypesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IEnumComponentTypes_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IEnumComponentTypes_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IEnumComponentTypes_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IEnumComponentTypes_Next(This,celt,rgelt,pceltFetched) \ + (This)->lpVtbl -> Next(This,celt,rgelt,pceltFetched) + +#define IEnumComponentTypes_Skip(This,celt) \ + (This)->lpVtbl -> Skip(This,celt) + +#define IEnumComponentTypes_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IEnumComponentTypes_Clone(This,ppEnum) \ + (This)->lpVtbl -> Clone(This,ppEnum) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IEnumComponentTypes_Next_Proxy( + IEnumComponentTypes * This, + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ IComponentType **rgelt, + /* [out] */ ULONG *pceltFetched); + + +void __RPC_STUB IEnumComponentTypes_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumComponentTypes_Skip_Proxy( + IEnumComponentTypes * This, + /* [in] */ ULONG celt); + + +void __RPC_STUB IEnumComponentTypes_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumComponentTypes_Reset_Proxy( + IEnumComponentTypes * This); + + +void __RPC_STUB IEnumComponentTypes_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumComponentTypes_Clone_Proxy( + IEnumComponentTypes * This, + /* [out] */ IEnumComponentTypes **ppEnum); + + +void __RPC_STUB IEnumComponentTypes_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IEnumComponentTypes_INTERFACE_DEFINED__ */ + + +#ifndef __IComponentTypes_INTERFACE_DEFINED__ +#define __IComponentTypes_INTERFACE_DEFINED__ + +/* interface IComponentTypes */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_IComponentTypes; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("0DC13D4A-0313-11d3-9D8E-00C04F72D980") + IComponentTypes : public IDispatch + { + public: + virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Count( + /* [retval][out] */ long *Count) = 0; + + virtual /* [restricted][hidden][id][propget] */ HRESULT STDMETHODCALLTYPE get__NewEnum( + /* [retval][out] */ IEnumVARIANT **ppNewEnum) = 0; + + virtual /* [helpstring][restricted][hidden] */ HRESULT STDMETHODCALLTYPE EnumComponentTypes( + /* [retval][out] */ IEnumComponentTypes **ppNewEnum) = 0; + + virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Item( + /* [in] */ VARIANT Index, + /* [retval][out] */ IComponentType **ComponentType) = 0; + + virtual /* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE put_Item( + /* [in] */ VARIANT Index, + /* [in] */ IComponentType *ComponentType) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Add( + /* [in] */ IComponentType *ComponentType, + /* [retval][out] */ VARIANT *NewIndex) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Remove( + /* [in] */ VARIANT Index) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Clone( + /* [retval][out] */ IComponentTypes **NewList) = 0; + + }; + +#else /* C style interface */ + + typedef struct IComponentTypesVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IComponentTypes * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IComponentTypes * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IComponentTypes * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IComponentTypes * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IComponentTypes * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IComponentTypes * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IComponentTypes * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( + IComponentTypes * This, + /* [retval][out] */ long *Count); + + /* [restricted][hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( + IComponentTypes * This, + /* [retval][out] */ IEnumVARIANT **ppNewEnum); + + /* [helpstring][restricted][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumComponentTypes )( + IComponentTypes * This, + /* [retval][out] */ IEnumComponentTypes **ppNewEnum); + + /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Item )( + IComponentTypes * This, + /* [in] */ VARIANT Index, + /* [retval][out] */ IComponentType **ComponentType); + + /* [helpstring][propput][id] */ HRESULT ( STDMETHODCALLTYPE *put_Item )( + IComponentTypes * This, + /* [in] */ VARIANT Index, + /* [in] */ IComponentType *ComponentType); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Add )( + IComponentTypes * This, + /* [in] */ IComponentType *ComponentType, + /* [retval][out] */ VARIANT *NewIndex); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Remove )( + IComponentTypes * This, + /* [in] */ VARIANT Index); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + IComponentTypes * This, + /* [retval][out] */ IComponentTypes **NewList); + + END_INTERFACE + } IComponentTypesVtbl; + + interface IComponentTypes + { + CONST_VTBL struct IComponentTypesVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IComponentTypes_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IComponentTypes_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IComponentTypes_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IComponentTypes_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IComponentTypes_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IComponentTypes_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IComponentTypes_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IComponentTypes_get_Count(This,Count) \ + (This)->lpVtbl -> get_Count(This,Count) + +#define IComponentTypes_get__NewEnum(This,ppNewEnum) \ + (This)->lpVtbl -> get__NewEnum(This,ppNewEnum) + +#define IComponentTypes_EnumComponentTypes(This,ppNewEnum) \ + (This)->lpVtbl -> EnumComponentTypes(This,ppNewEnum) + +#define IComponentTypes_get_Item(This,Index,ComponentType) \ + (This)->lpVtbl -> get_Item(This,Index,ComponentType) + +#define IComponentTypes_put_Item(This,Index,ComponentType) \ + (This)->lpVtbl -> put_Item(This,Index,ComponentType) + +#define IComponentTypes_Add(This,ComponentType,NewIndex) \ + (This)->lpVtbl -> Add(This,ComponentType,NewIndex) + +#define IComponentTypes_Remove(This,Index) \ + (This)->lpVtbl -> Remove(This,Index) + +#define IComponentTypes_Clone(This,NewList) \ + (This)->lpVtbl -> Clone(This,NewList) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IComponentTypes_get_Count_Proxy( + IComponentTypes * This, + /* [retval][out] */ long *Count); + + +void __RPC_STUB IComponentTypes_get_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][hidden][id][propget] */ HRESULT STDMETHODCALLTYPE IComponentTypes_get__NewEnum_Proxy( + IComponentTypes * This, + /* [retval][out] */ IEnumVARIANT **ppNewEnum); + + +void __RPC_STUB IComponentTypes_get__NewEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][restricted][hidden] */ HRESULT STDMETHODCALLTYPE IComponentTypes_EnumComponentTypes_Proxy( + IComponentTypes * This, + /* [retval][out] */ IEnumComponentTypes **ppNewEnum); + + +void __RPC_STUB IComponentTypes_EnumComponentTypes_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IComponentTypes_get_Item_Proxy( + IComponentTypes * This, + /* [in] */ VARIANT Index, + /* [retval][out] */ IComponentType **ComponentType); + + +void __RPC_STUB IComponentTypes_get_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propput][id] */ HRESULT STDMETHODCALLTYPE IComponentTypes_put_Item_Proxy( + IComponentTypes * This, + /* [in] */ VARIANT Index, + /* [in] */ IComponentType *ComponentType); + + +void __RPC_STUB IComponentTypes_put_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IComponentTypes_Add_Proxy( + IComponentTypes * This, + /* [in] */ IComponentType *ComponentType, + /* [retval][out] */ VARIANT *NewIndex); + + +void __RPC_STUB IComponentTypes_Add_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IComponentTypes_Remove_Proxy( + IComponentTypes * This, + /* [in] */ VARIANT Index); + + +void __RPC_STUB IComponentTypes_Remove_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IComponentTypes_Clone_Proxy( + IComponentTypes * This, + /* [retval][out] */ IComponentTypes **NewList); + + +void __RPC_STUB IComponentTypes_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IComponentTypes_INTERFACE_DEFINED__ */ + + +#ifndef __IComponent_INTERFACE_DEFINED__ +#define __IComponent_INTERFACE_DEFINED__ + +/* interface IComponent */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][object] */ + + +EXTERN_C const IID IID_IComponent; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1A5576FC-0E19-11d3-9D8E-00C04F72D980") + IComponent : public IDispatch + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Type( + /* [retval][out] */ IComponentType **CT) = 0; + + virtual /* [helpstring][id][propput][restricted][hidden] */ HRESULT STDMETHODCALLTYPE put_Type( + /* [in] */ IComponentType *CT) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_DescLangID( + /* [retval][out] */ long *LangID) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_DescLangID( + /* [in] */ long LangID) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Status( + /* [retval][out] */ ComponentStatus *Status) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Status( + /* [in] */ ComponentStatus Status) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Description( + /* [retval][out] */ BSTR *Description) = 0; + + virtual /* [helpstring][id][propput][restricted][hidden] */ HRESULT STDMETHODCALLTYPE put_Description( + /* [in] */ BSTR Description) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Clone( + /* [retval][out] */ IComponent **NewComponent) = 0; + + }; + +#else /* C style interface */ + + typedef struct IComponentVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IComponent * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IComponent * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IComponent * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IComponent * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IComponent * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IComponent * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IComponent * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Type )( + IComponent * This, + /* [retval][out] */ IComponentType **CT); + + /* [helpstring][id][propput][restricted][hidden] */ HRESULT ( STDMETHODCALLTYPE *put_Type )( + IComponent * This, + /* [in] */ IComponentType *CT); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DescLangID )( + IComponent * This, + /* [retval][out] */ long *LangID); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_DescLangID )( + IComponent * This, + /* [in] */ long LangID); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Status )( + IComponent * This, + /* [retval][out] */ ComponentStatus *Status); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Status )( + IComponent * This, + /* [in] */ ComponentStatus Status); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Description )( + IComponent * This, + /* [retval][out] */ BSTR *Description); + + /* [helpstring][id][propput][restricted][hidden] */ HRESULT ( STDMETHODCALLTYPE *put_Description )( + IComponent * This, + /* [in] */ BSTR Description); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + IComponent * This, + /* [retval][out] */ IComponent **NewComponent); + + END_INTERFACE + } IComponentVtbl; + + interface IComponent + { + CONST_VTBL struct IComponentVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IComponent_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IComponent_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IComponent_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IComponent_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IComponent_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IComponent_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IComponent_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IComponent_get_Type(This,CT) \ + (This)->lpVtbl -> get_Type(This,CT) + +#define IComponent_put_Type(This,CT) \ + (This)->lpVtbl -> put_Type(This,CT) + +#define IComponent_get_DescLangID(This,LangID) \ + (This)->lpVtbl -> get_DescLangID(This,LangID) + +#define IComponent_put_DescLangID(This,LangID) \ + (This)->lpVtbl -> put_DescLangID(This,LangID) + +#define IComponent_get_Status(This,Status) \ + (This)->lpVtbl -> get_Status(This,Status) + +#define IComponent_put_Status(This,Status) \ + (This)->lpVtbl -> put_Status(This,Status) + +#define IComponent_get_Description(This,Description) \ + (This)->lpVtbl -> get_Description(This,Description) + +#define IComponent_put_Description(This,Description) \ + (This)->lpVtbl -> put_Description(This,Description) + +#define IComponent_Clone(This,NewComponent) \ + (This)->lpVtbl -> Clone(This,NewComponent) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IComponent_get_Type_Proxy( + IComponent * This, + /* [retval][out] */ IComponentType **CT); + + +void __RPC_STUB IComponent_get_Type_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput][restricted][hidden] */ HRESULT STDMETHODCALLTYPE IComponent_put_Type_Proxy( + IComponent * This, + /* [in] */ IComponentType *CT); + + +void __RPC_STUB IComponent_put_Type_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IComponent_get_DescLangID_Proxy( + IComponent * This, + /* [retval][out] */ long *LangID); + + +void __RPC_STUB IComponent_get_DescLangID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IComponent_put_DescLangID_Proxy( + IComponent * This, + /* [in] */ long LangID); + + +void __RPC_STUB IComponent_put_DescLangID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IComponent_get_Status_Proxy( + IComponent * This, + /* [retval][out] */ ComponentStatus *Status); + + +void __RPC_STUB IComponent_get_Status_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IComponent_put_Status_Proxy( + IComponent * This, + /* [in] */ ComponentStatus Status); + + +void __RPC_STUB IComponent_put_Status_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IComponent_get_Description_Proxy( + IComponent * This, + /* [retval][out] */ BSTR *Description); + + +void __RPC_STUB IComponent_get_Description_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput][restricted][hidden] */ HRESULT STDMETHODCALLTYPE IComponent_put_Description_Proxy( + IComponent * This, + /* [in] */ BSTR Description); + + +void __RPC_STUB IComponent_put_Description_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IComponent_Clone_Proxy( + IComponent * This, + /* [retval][out] */ IComponent **NewComponent); + + +void __RPC_STUB IComponent_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IComponent_INTERFACE_DEFINED__ */ + + +#ifndef __IMPEG2Component_INTERFACE_DEFINED__ +#define __IMPEG2Component_INTERFACE_DEFINED__ + +/* interface IMPEG2Component */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][object] */ + + +EXTERN_C const IID IID_IMPEG2Component; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("1493E353-1EB6-473c-802D-8E6B8EC9D2A9") + IMPEG2Component : public IComponent + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_PID( + /* [retval][out] */ long *PID) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_PID( + /* [in] */ long PID) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_PCRPID( + /* [retval][out] */ long *PCRPID) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_PCRPID( + /* [in] */ long PCRPID) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_ProgramNumber( + /* [retval][out] */ long *ProgramNumber) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_ProgramNumber( + /* [in] */ long ProgramNumber) = 0; + + }; + +#else /* C style interface */ + + typedef struct IMPEG2ComponentVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IMPEG2Component * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IMPEG2Component * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IMPEG2Component * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IMPEG2Component * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IMPEG2Component * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IMPEG2Component * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IMPEG2Component * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Type )( + IMPEG2Component * This, + /* [retval][out] */ IComponentType **CT); + + /* [helpstring][id][propput][restricted][hidden] */ HRESULT ( STDMETHODCALLTYPE *put_Type )( + IMPEG2Component * This, + /* [in] */ IComponentType *CT); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_DescLangID )( + IMPEG2Component * This, + /* [retval][out] */ long *LangID); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_DescLangID )( + IMPEG2Component * This, + /* [in] */ long LangID); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Status )( + IMPEG2Component * This, + /* [retval][out] */ ComponentStatus *Status); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Status )( + IMPEG2Component * This, + /* [in] */ ComponentStatus Status); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Description )( + IMPEG2Component * This, + /* [retval][out] */ BSTR *Description); + + /* [helpstring][id][propput][restricted][hidden] */ HRESULT ( STDMETHODCALLTYPE *put_Description )( + IMPEG2Component * This, + /* [in] */ BSTR Description); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + IMPEG2Component * This, + /* [retval][out] */ IComponent **NewComponent); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PID )( + IMPEG2Component * This, + /* [retval][out] */ long *PID); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PID )( + IMPEG2Component * This, + /* [in] */ long PID); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PCRPID )( + IMPEG2Component * This, + /* [retval][out] */ long *PCRPID); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PCRPID )( + IMPEG2Component * This, + /* [in] */ long PCRPID); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_ProgramNumber )( + IMPEG2Component * This, + /* [retval][out] */ long *ProgramNumber); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_ProgramNumber )( + IMPEG2Component * This, + /* [in] */ long ProgramNumber); + + END_INTERFACE + } IMPEG2ComponentVtbl; + + interface IMPEG2Component + { + CONST_VTBL struct IMPEG2ComponentVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IMPEG2Component_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IMPEG2Component_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IMPEG2Component_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IMPEG2Component_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IMPEG2Component_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IMPEG2Component_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IMPEG2Component_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IMPEG2Component_get_Type(This,CT) \ + (This)->lpVtbl -> get_Type(This,CT) + +#define IMPEG2Component_put_Type(This,CT) \ + (This)->lpVtbl -> put_Type(This,CT) + +#define IMPEG2Component_get_DescLangID(This,LangID) \ + (This)->lpVtbl -> get_DescLangID(This,LangID) + +#define IMPEG2Component_put_DescLangID(This,LangID) \ + (This)->lpVtbl -> put_DescLangID(This,LangID) + +#define IMPEG2Component_get_Status(This,Status) \ + (This)->lpVtbl -> get_Status(This,Status) + +#define IMPEG2Component_put_Status(This,Status) \ + (This)->lpVtbl -> put_Status(This,Status) + +#define IMPEG2Component_get_Description(This,Description) \ + (This)->lpVtbl -> get_Description(This,Description) + +#define IMPEG2Component_put_Description(This,Description) \ + (This)->lpVtbl -> put_Description(This,Description) + +#define IMPEG2Component_Clone(This,NewComponent) \ + (This)->lpVtbl -> Clone(This,NewComponent) + + +#define IMPEG2Component_get_PID(This,PID) \ + (This)->lpVtbl -> get_PID(This,PID) + +#define IMPEG2Component_put_PID(This,PID) \ + (This)->lpVtbl -> put_PID(This,PID) + +#define IMPEG2Component_get_PCRPID(This,PCRPID) \ + (This)->lpVtbl -> get_PCRPID(This,PCRPID) + +#define IMPEG2Component_put_PCRPID(This,PCRPID) \ + (This)->lpVtbl -> put_PCRPID(This,PCRPID) + +#define IMPEG2Component_get_ProgramNumber(This,ProgramNumber) \ + (This)->lpVtbl -> get_ProgramNumber(This,ProgramNumber) + +#define IMPEG2Component_put_ProgramNumber(This,ProgramNumber) \ + (This)->lpVtbl -> put_ProgramNumber(This,ProgramNumber) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMPEG2Component_get_PID_Proxy( + IMPEG2Component * This, + /* [retval][out] */ long *PID); + + +void __RPC_STUB IMPEG2Component_get_PID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IMPEG2Component_put_PID_Proxy( + IMPEG2Component * This, + /* [in] */ long PID); + + +void __RPC_STUB IMPEG2Component_put_PID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMPEG2Component_get_PCRPID_Proxy( + IMPEG2Component * This, + /* [retval][out] */ long *PCRPID); + + +void __RPC_STUB IMPEG2Component_get_PCRPID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IMPEG2Component_put_PCRPID_Proxy( + IMPEG2Component * This, + /* [in] */ long PCRPID); + + +void __RPC_STUB IMPEG2Component_put_PCRPID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IMPEG2Component_get_ProgramNumber_Proxy( + IMPEG2Component * This, + /* [retval][out] */ long *ProgramNumber); + + +void __RPC_STUB IMPEG2Component_get_ProgramNumber_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IMPEG2Component_put_ProgramNumber_Proxy( + IMPEG2Component * This, + /* [in] */ long ProgramNumber); + + +void __RPC_STUB IMPEG2Component_put_ProgramNumber_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IMPEG2Component_INTERFACE_DEFINED__ */ + + +#ifndef __IEnumComponents_INTERFACE_DEFINED__ +#define __IEnumComponents_INTERFACE_DEFINED__ + +/* interface IEnumComponents */ +/* [unique][uuid][object][restricted][hidden] */ + + +EXTERN_C const IID IID_IEnumComponents; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("2A6E2939-2595-11d3-B64C-00C04F79498E") + IEnumComponents : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE Next( + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ IComponent **rgelt, + /* [out] */ ULONG *pceltFetched) = 0; + + virtual HRESULT STDMETHODCALLTYPE Skip( + /* [in] */ ULONG celt) = 0; + + virtual HRESULT STDMETHODCALLTYPE Reset( void) = 0; + + virtual HRESULT STDMETHODCALLTYPE Clone( + /* [out] */ IEnumComponents **ppEnum) = 0; + + }; + +#else /* C style interface */ + + typedef struct IEnumComponentsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IEnumComponents * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IEnumComponents * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IEnumComponents * This); + + HRESULT ( STDMETHODCALLTYPE *Next )( + IEnumComponents * This, + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ IComponent **rgelt, + /* [out] */ ULONG *pceltFetched); + + HRESULT ( STDMETHODCALLTYPE *Skip )( + IEnumComponents * This, + /* [in] */ ULONG celt); + + HRESULT ( STDMETHODCALLTYPE *Reset )( + IEnumComponents * This); + + HRESULT ( STDMETHODCALLTYPE *Clone )( + IEnumComponents * This, + /* [out] */ IEnumComponents **ppEnum); + + END_INTERFACE + } IEnumComponentsVtbl; + + interface IEnumComponents + { + CONST_VTBL struct IEnumComponentsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IEnumComponents_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IEnumComponents_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IEnumComponents_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IEnumComponents_Next(This,celt,rgelt,pceltFetched) \ + (This)->lpVtbl -> Next(This,celt,rgelt,pceltFetched) + +#define IEnumComponents_Skip(This,celt) \ + (This)->lpVtbl -> Skip(This,celt) + +#define IEnumComponents_Reset(This) \ + (This)->lpVtbl -> Reset(This) + +#define IEnumComponents_Clone(This,ppEnum) \ + (This)->lpVtbl -> Clone(This,ppEnum) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IEnumComponents_Next_Proxy( + IEnumComponents * This, + /* [in] */ ULONG celt, + /* [length_is][size_is][out] */ IComponent **rgelt, + /* [out] */ ULONG *pceltFetched); + + +void __RPC_STUB IEnumComponents_Next_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumComponents_Skip_Proxy( + IEnumComponents * This, + /* [in] */ ULONG celt); + + +void __RPC_STUB IEnumComponents_Skip_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumComponents_Reset_Proxy( + IEnumComponents * This); + + +void __RPC_STUB IEnumComponents_Reset_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IEnumComponents_Clone_Proxy( + IEnumComponents * This, + /* [out] */ IEnumComponents **ppEnum); + + +void __RPC_STUB IEnumComponents_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IEnumComponents_INTERFACE_DEFINED__ */ + + +#ifndef __IComponents_INTERFACE_DEFINED__ +#define __IComponents_INTERFACE_DEFINED__ + +/* interface IComponents */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][object] */ + + +EXTERN_C const IID IID_IComponents; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("FCD01846-0E19-11d3-9D8E-00C04F72D980") + IComponents : public IDispatch + { + public: + virtual /* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE get_Count( + /* [retval][out] */ long *Count) = 0; + + virtual /* [restricted][hidden][id][propget] */ HRESULT STDMETHODCALLTYPE get__NewEnum( + /* [retval][out] */ IEnumVARIANT **ppNewEnum) = 0; + + virtual /* [helpstring][restricted][hidden] */ HRESULT STDMETHODCALLTYPE EnumComponents( + /* [retval][out] */ IEnumComponents **ppNewEnum) = 0; + + virtual /* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE get_Item( + /* [in] */ VARIANT Index, + /* [retval][out] */ IComponent **ppComponent) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Add( + /* [in] */ IComponent *Component, + /* [retval][out] */ VARIANT *NewIndex) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Remove( + /* [in] */ VARIANT Index) = 0; + + virtual /* [helpstring] */ HRESULT STDMETHODCALLTYPE Clone( + /* [retval][out] */ IComponents **NewList) = 0; + + }; + +#else /* C style interface */ + + typedef struct IComponentsVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IComponents * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IComponents * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IComponents * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IComponents * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IComponents * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IComponents * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IComponents * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Count )( + IComponents * This, + /* [retval][out] */ long *Count); + + /* [restricted][hidden][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get__NewEnum )( + IComponents * This, + /* [retval][out] */ IEnumVARIANT **ppNewEnum); + + /* [helpstring][restricted][hidden] */ HRESULT ( STDMETHODCALLTYPE *EnumComponents )( + IComponents * This, + /* [retval][out] */ IEnumComponents **ppNewEnum); + + /* [helpstring][propget][id] */ HRESULT ( STDMETHODCALLTYPE *get_Item )( + IComponents * This, + /* [in] */ VARIANT Index, + /* [retval][out] */ IComponent **ppComponent); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Add )( + IComponents * This, + /* [in] */ IComponent *Component, + /* [retval][out] */ VARIANT *NewIndex); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Remove )( + IComponents * This, + /* [in] */ VARIANT Index); + + /* [helpstring] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + IComponents * This, + /* [retval][out] */ IComponents **NewList); + + END_INTERFACE + } IComponentsVtbl; + + interface IComponents + { + CONST_VTBL struct IComponentsVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IComponents_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IComponents_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IComponents_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IComponents_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IComponents_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IComponents_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IComponents_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IComponents_get_Count(This,Count) \ + (This)->lpVtbl -> get_Count(This,Count) + +#define IComponents_get__NewEnum(This,ppNewEnum) \ + (This)->lpVtbl -> get__NewEnum(This,ppNewEnum) + +#define IComponents_EnumComponents(This,ppNewEnum) \ + (This)->lpVtbl -> EnumComponents(This,ppNewEnum) + +#define IComponents_get_Item(This,Index,ppComponent) \ + (This)->lpVtbl -> get_Item(This,Index,ppComponent) + +#define IComponents_Add(This,Component,NewIndex) \ + (This)->lpVtbl -> Add(This,Component,NewIndex) + +#define IComponents_Remove(This,Index) \ + (This)->lpVtbl -> Remove(This,Index) + +#define IComponents_Clone(This,NewList) \ + (This)->lpVtbl -> Clone(This,NewList) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][propget] */ HRESULT STDMETHODCALLTYPE IComponents_get_Count_Proxy( + IComponents * This, + /* [retval][out] */ long *Count); + + +void __RPC_STUB IComponents_get_Count_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [restricted][hidden][id][propget] */ HRESULT STDMETHODCALLTYPE IComponents_get__NewEnum_Proxy( + IComponents * This, + /* [retval][out] */ IEnumVARIANT **ppNewEnum); + + +void __RPC_STUB IComponents_get__NewEnum_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][restricted][hidden] */ HRESULT STDMETHODCALLTYPE IComponents_EnumComponents_Proxy( + IComponents * This, + /* [retval][out] */ IEnumComponents **ppNewEnum); + + +void __RPC_STUB IComponents_EnumComponents_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][propget][id] */ HRESULT STDMETHODCALLTYPE IComponents_get_Item_Proxy( + IComponents * This, + /* [in] */ VARIANT Index, + /* [retval][out] */ IComponent **ppComponent); + + +void __RPC_STUB IComponents_get_Item_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IComponents_Add_Proxy( + IComponents * This, + /* [in] */ IComponent *Component, + /* [retval][out] */ VARIANT *NewIndex); + + +void __RPC_STUB IComponents_Add_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE IComponents_Remove_Proxy( + IComponents * This, + /* [in] */ VARIANT Index); + + +void __RPC_STUB IComponents_Remove_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring] */ HRESULT STDMETHODCALLTYPE IComponents_Clone_Proxy( + IComponents * This, + /* [retval][out] */ IComponents **NewList); + + +void __RPC_STUB IComponents_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IComponents_INTERFACE_DEFINED__ */ + + +#ifndef __ILocator_INTERFACE_DEFINED__ +#define __ILocator_INTERFACE_DEFINED__ + +/* interface ILocator */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][object] */ + + +EXTERN_C const IID IID_ILocator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("286D7F89-760C-4F89-80C4-66841D2507AA") + ILocator : public IDispatch + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_CarrierFrequency( + /* [retval][out] */ long *Frequency) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_CarrierFrequency( + /* [in] */ long Frequency) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_InnerFEC( + /* [retval][out] */ FECMethod *FEC) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_InnerFEC( + /* [in] */ FECMethod FEC) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_InnerFECRate( + /* [retval][out] */ BinaryConvolutionCodeRate *FEC) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_InnerFECRate( + /* [in] */ BinaryConvolutionCodeRate FEC) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_OuterFEC( + /* [retval][out] */ FECMethod *FEC) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_OuterFEC( + /* [in] */ FECMethod FEC) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_OuterFECRate( + /* [retval][out] */ BinaryConvolutionCodeRate *FEC) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_OuterFECRate( + /* [in] */ BinaryConvolutionCodeRate FEC) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Modulation( + /* [retval][out] */ ModulationType *Modulation) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Modulation( + /* [in] */ ModulationType Modulation) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SymbolRate( + /* [retval][out] */ long *Rate) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SymbolRate( + /* [in] */ long Rate) = 0; + + virtual /* [helpstring][id] */ HRESULT STDMETHODCALLTYPE Clone( + /* [retval][out] */ ILocator **NewLocator) = 0; + + }; + +#else /* C style interface */ + + typedef struct ILocatorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + ILocator * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + ILocator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + ILocator * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + ILocator * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + ILocator * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + ILocator * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + ILocator * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CarrierFrequency )( + ILocator * This, + /* [retval][out] */ long *Frequency); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_CarrierFrequency )( + ILocator * This, + /* [in] */ long Frequency); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InnerFEC )( + ILocator * This, + /* [retval][out] */ FECMethod *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_InnerFEC )( + ILocator * This, + /* [in] */ FECMethod FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InnerFECRate )( + ILocator * This, + /* [retval][out] */ BinaryConvolutionCodeRate *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_InnerFECRate )( + ILocator * This, + /* [in] */ BinaryConvolutionCodeRate FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OuterFEC )( + ILocator * This, + /* [retval][out] */ FECMethod *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OuterFEC )( + ILocator * This, + /* [in] */ FECMethod FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OuterFECRate )( + ILocator * This, + /* [retval][out] */ BinaryConvolutionCodeRate *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OuterFECRate )( + ILocator * This, + /* [in] */ BinaryConvolutionCodeRate FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Modulation )( + ILocator * This, + /* [retval][out] */ ModulationType *Modulation); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Modulation )( + ILocator * This, + /* [in] */ ModulationType Modulation); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SymbolRate )( + ILocator * This, + /* [retval][out] */ long *Rate); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SymbolRate )( + ILocator * This, + /* [in] */ long Rate); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + ILocator * This, + /* [retval][out] */ ILocator **NewLocator); + + END_INTERFACE + } ILocatorVtbl; + + interface ILocator + { + CONST_VTBL struct ILocatorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define ILocator_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define ILocator_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define ILocator_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define ILocator_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define ILocator_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define ILocator_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define ILocator_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define ILocator_get_CarrierFrequency(This,Frequency) \ + (This)->lpVtbl -> get_CarrierFrequency(This,Frequency) + +#define ILocator_put_CarrierFrequency(This,Frequency) \ + (This)->lpVtbl -> put_CarrierFrequency(This,Frequency) + +#define ILocator_get_InnerFEC(This,FEC) \ + (This)->lpVtbl -> get_InnerFEC(This,FEC) + +#define ILocator_put_InnerFEC(This,FEC) \ + (This)->lpVtbl -> put_InnerFEC(This,FEC) + +#define ILocator_get_InnerFECRate(This,FEC) \ + (This)->lpVtbl -> get_InnerFECRate(This,FEC) + +#define ILocator_put_InnerFECRate(This,FEC) \ + (This)->lpVtbl -> put_InnerFECRate(This,FEC) + +#define ILocator_get_OuterFEC(This,FEC) \ + (This)->lpVtbl -> get_OuterFEC(This,FEC) + +#define ILocator_put_OuterFEC(This,FEC) \ + (This)->lpVtbl -> put_OuterFEC(This,FEC) + +#define ILocator_get_OuterFECRate(This,FEC) \ + (This)->lpVtbl -> get_OuterFECRate(This,FEC) + +#define ILocator_put_OuterFECRate(This,FEC) \ + (This)->lpVtbl -> put_OuterFECRate(This,FEC) + +#define ILocator_get_Modulation(This,Modulation) \ + (This)->lpVtbl -> get_Modulation(This,Modulation) + +#define ILocator_put_Modulation(This,Modulation) \ + (This)->lpVtbl -> put_Modulation(This,Modulation) + +#define ILocator_get_SymbolRate(This,Rate) \ + (This)->lpVtbl -> get_SymbolRate(This,Rate) + +#define ILocator_put_SymbolRate(This,Rate) \ + (This)->lpVtbl -> put_SymbolRate(This,Rate) + +#define ILocator_Clone(This,NewLocator) \ + (This)->lpVtbl -> Clone(This,NewLocator) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ILocator_get_CarrierFrequency_Proxy( + ILocator * This, + /* [retval][out] */ long *Frequency); + + +void __RPC_STUB ILocator_get_CarrierFrequency_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ILocator_put_CarrierFrequency_Proxy( + ILocator * This, + /* [in] */ long Frequency); + + +void __RPC_STUB ILocator_put_CarrierFrequency_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ILocator_get_InnerFEC_Proxy( + ILocator * This, + /* [retval][out] */ FECMethod *FEC); + + +void __RPC_STUB ILocator_get_InnerFEC_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ILocator_put_InnerFEC_Proxy( + ILocator * This, + /* [in] */ FECMethod FEC); + + +void __RPC_STUB ILocator_put_InnerFEC_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ILocator_get_InnerFECRate_Proxy( + ILocator * This, + /* [retval][out] */ BinaryConvolutionCodeRate *FEC); + + +void __RPC_STUB ILocator_get_InnerFECRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ILocator_put_InnerFECRate_Proxy( + ILocator * This, + /* [in] */ BinaryConvolutionCodeRate FEC); + + +void __RPC_STUB ILocator_put_InnerFECRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ILocator_get_OuterFEC_Proxy( + ILocator * This, + /* [retval][out] */ FECMethod *FEC); + + +void __RPC_STUB ILocator_get_OuterFEC_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ILocator_put_OuterFEC_Proxy( + ILocator * This, + /* [in] */ FECMethod FEC); + + +void __RPC_STUB ILocator_put_OuterFEC_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ILocator_get_OuterFECRate_Proxy( + ILocator * This, + /* [retval][out] */ BinaryConvolutionCodeRate *FEC); + + +void __RPC_STUB ILocator_get_OuterFECRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ILocator_put_OuterFECRate_Proxy( + ILocator * This, + /* [in] */ BinaryConvolutionCodeRate FEC); + + +void __RPC_STUB ILocator_put_OuterFECRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ILocator_get_Modulation_Proxy( + ILocator * This, + /* [retval][out] */ ModulationType *Modulation); + + +void __RPC_STUB ILocator_get_Modulation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ILocator_put_Modulation_Proxy( + ILocator * This, + /* [in] */ ModulationType Modulation); + + +void __RPC_STUB ILocator_put_Modulation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE ILocator_get_SymbolRate_Proxy( + ILocator * This, + /* [retval][out] */ long *Rate); + + +void __RPC_STUB ILocator_get_SymbolRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE ILocator_put_SymbolRate_Proxy( + ILocator * This, + /* [in] */ long Rate); + + +void __RPC_STUB ILocator_put_SymbolRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id] */ HRESULT STDMETHODCALLTYPE ILocator_Clone_Proxy( + ILocator * This, + /* [retval][out] */ ILocator **NewLocator); + + +void __RPC_STUB ILocator_Clone_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __ILocator_INTERFACE_DEFINED__ */ + + +#ifndef __IATSCLocator_INTERFACE_DEFINED__ +#define __IATSCLocator_INTERFACE_DEFINED__ + +/* interface IATSCLocator */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_IATSCLocator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("BF8D986F-8C2B-4131-94D7-4D3D9FCC21EF") + IATSCLocator : public ILocator + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_PhysicalChannel( + /* [retval][out] */ long *PhysicalChannel) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_PhysicalChannel( + /* [in] */ long PhysicalChannel) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_TSID( + /* [retval][out] */ long *TSID) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_TSID( + /* [in] */ long TSID) = 0; + + }; + +#else /* C style interface */ + + typedef struct IATSCLocatorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IATSCLocator * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IATSCLocator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IATSCLocator * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IATSCLocator * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IATSCLocator * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IATSCLocator * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IATSCLocator * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CarrierFrequency )( + IATSCLocator * This, + /* [retval][out] */ long *Frequency); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_CarrierFrequency )( + IATSCLocator * This, + /* [in] */ long Frequency); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InnerFEC )( + IATSCLocator * This, + /* [retval][out] */ FECMethod *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_InnerFEC )( + IATSCLocator * This, + /* [in] */ FECMethod FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InnerFECRate )( + IATSCLocator * This, + /* [retval][out] */ BinaryConvolutionCodeRate *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_InnerFECRate )( + IATSCLocator * This, + /* [in] */ BinaryConvolutionCodeRate FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OuterFEC )( + IATSCLocator * This, + /* [retval][out] */ FECMethod *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OuterFEC )( + IATSCLocator * This, + /* [in] */ FECMethod FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OuterFECRate )( + IATSCLocator * This, + /* [retval][out] */ BinaryConvolutionCodeRate *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OuterFECRate )( + IATSCLocator * This, + /* [in] */ BinaryConvolutionCodeRate FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Modulation )( + IATSCLocator * This, + /* [retval][out] */ ModulationType *Modulation); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Modulation )( + IATSCLocator * This, + /* [in] */ ModulationType Modulation); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SymbolRate )( + IATSCLocator * This, + /* [retval][out] */ long *Rate); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SymbolRate )( + IATSCLocator * This, + /* [in] */ long Rate); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + IATSCLocator * This, + /* [retval][out] */ ILocator **NewLocator); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_PhysicalChannel )( + IATSCLocator * This, + /* [retval][out] */ long *PhysicalChannel); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_PhysicalChannel )( + IATSCLocator * This, + /* [in] */ long PhysicalChannel); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_TSID )( + IATSCLocator * This, + /* [retval][out] */ long *TSID); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_TSID )( + IATSCLocator * This, + /* [in] */ long TSID); + + END_INTERFACE + } IATSCLocatorVtbl; + + interface IATSCLocator + { + CONST_VTBL struct IATSCLocatorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IATSCLocator_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IATSCLocator_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IATSCLocator_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IATSCLocator_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IATSCLocator_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IATSCLocator_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IATSCLocator_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IATSCLocator_get_CarrierFrequency(This,Frequency) \ + (This)->lpVtbl -> get_CarrierFrequency(This,Frequency) + +#define IATSCLocator_put_CarrierFrequency(This,Frequency) \ + (This)->lpVtbl -> put_CarrierFrequency(This,Frequency) + +#define IATSCLocator_get_InnerFEC(This,FEC) \ + (This)->lpVtbl -> get_InnerFEC(This,FEC) + +#define IATSCLocator_put_InnerFEC(This,FEC) \ + (This)->lpVtbl -> put_InnerFEC(This,FEC) + +#define IATSCLocator_get_InnerFECRate(This,FEC) \ + (This)->lpVtbl -> get_InnerFECRate(This,FEC) + +#define IATSCLocator_put_InnerFECRate(This,FEC) \ + (This)->lpVtbl -> put_InnerFECRate(This,FEC) + +#define IATSCLocator_get_OuterFEC(This,FEC) \ + (This)->lpVtbl -> get_OuterFEC(This,FEC) + +#define IATSCLocator_put_OuterFEC(This,FEC) \ + (This)->lpVtbl -> put_OuterFEC(This,FEC) + +#define IATSCLocator_get_OuterFECRate(This,FEC) \ + (This)->lpVtbl -> get_OuterFECRate(This,FEC) + +#define IATSCLocator_put_OuterFECRate(This,FEC) \ + (This)->lpVtbl -> put_OuterFECRate(This,FEC) + +#define IATSCLocator_get_Modulation(This,Modulation) \ + (This)->lpVtbl -> get_Modulation(This,Modulation) + +#define IATSCLocator_put_Modulation(This,Modulation) \ + (This)->lpVtbl -> put_Modulation(This,Modulation) + +#define IATSCLocator_get_SymbolRate(This,Rate) \ + (This)->lpVtbl -> get_SymbolRate(This,Rate) + +#define IATSCLocator_put_SymbolRate(This,Rate) \ + (This)->lpVtbl -> put_SymbolRate(This,Rate) + +#define IATSCLocator_Clone(This,NewLocator) \ + (This)->lpVtbl -> Clone(This,NewLocator) + + +#define IATSCLocator_get_PhysicalChannel(This,PhysicalChannel) \ + (This)->lpVtbl -> get_PhysicalChannel(This,PhysicalChannel) + +#define IATSCLocator_put_PhysicalChannel(This,PhysicalChannel) \ + (This)->lpVtbl -> put_PhysicalChannel(This,PhysicalChannel) + +#define IATSCLocator_get_TSID(This,TSID) \ + (This)->lpVtbl -> get_TSID(This,TSID) + +#define IATSCLocator_put_TSID(This,TSID) \ + (This)->lpVtbl -> put_TSID(This,TSID) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IATSCLocator_get_PhysicalChannel_Proxy( + IATSCLocator * This, + /* [retval][out] */ long *PhysicalChannel); + + +void __RPC_STUB IATSCLocator_get_PhysicalChannel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IATSCLocator_put_PhysicalChannel_Proxy( + IATSCLocator * This, + /* [in] */ long PhysicalChannel); + + +void __RPC_STUB IATSCLocator_put_PhysicalChannel_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IATSCLocator_get_TSID_Proxy( + IATSCLocator * This, + /* [retval][out] */ long *TSID); + + +void __RPC_STUB IATSCLocator_get_TSID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IATSCLocator_put_TSID_Proxy( + IATSCLocator * This, + /* [in] */ long TSID); + + +void __RPC_STUB IATSCLocator_put_TSID_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IATSCLocator_INTERFACE_DEFINED__ */ + + +#ifndef __IDVBTLocator_INTERFACE_DEFINED__ +#define __IDVBTLocator_INTERFACE_DEFINED__ + +/* interface IDVBTLocator */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_IDVBTLocator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("8664DA16-DDA2-42ac-926A-C18F9127C302") + IDVBTLocator : public ILocator + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Bandwidth( + /* [retval][out] */ long *BandWidthVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Bandwidth( + /* [in] */ long BandwidthVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_LPInnerFEC( + /* [retval][out] */ FECMethod *FEC) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_LPInnerFEC( + /* [in] */ FECMethod FEC) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_LPInnerFECRate( + /* [retval][out] */ BinaryConvolutionCodeRate *FEC) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_LPInnerFECRate( + /* [in] */ BinaryConvolutionCodeRate FEC) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_HAlpha( + /* [retval][out] */ HierarchyAlpha *Alpha) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_HAlpha( + /* [in] */ HierarchyAlpha Alpha) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Guard( + /* [retval][out] */ GuardInterval *GI) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Guard( + /* [in] */ GuardInterval GI) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Mode( + /* [retval][out] */ TransmissionMode *mode) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Mode( + /* [in] */ TransmissionMode mode) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_OtherFrequencyInUse( + /* [retval][out] */ VARIANT_BOOL *OtherFrequencyInUseVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_OtherFrequencyInUse( + /* [in] */ VARIANT_BOOL OtherFrequencyInUseVal) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDVBTLocatorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDVBTLocator * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDVBTLocator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDVBTLocator * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IDVBTLocator * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IDVBTLocator * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IDVBTLocator * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IDVBTLocator * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CarrierFrequency )( + IDVBTLocator * This, + /* [retval][out] */ long *Frequency); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_CarrierFrequency )( + IDVBTLocator * This, + /* [in] */ long Frequency); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InnerFEC )( + IDVBTLocator * This, + /* [retval][out] */ FECMethod *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_InnerFEC )( + IDVBTLocator * This, + /* [in] */ FECMethod FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InnerFECRate )( + IDVBTLocator * This, + /* [retval][out] */ BinaryConvolutionCodeRate *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_InnerFECRate )( + IDVBTLocator * This, + /* [in] */ BinaryConvolutionCodeRate FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OuterFEC )( + IDVBTLocator * This, + /* [retval][out] */ FECMethod *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OuterFEC )( + IDVBTLocator * This, + /* [in] */ FECMethod FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OuterFECRate )( + IDVBTLocator * This, + /* [retval][out] */ BinaryConvolutionCodeRate *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OuterFECRate )( + IDVBTLocator * This, + /* [in] */ BinaryConvolutionCodeRate FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Modulation )( + IDVBTLocator * This, + /* [retval][out] */ ModulationType *Modulation); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Modulation )( + IDVBTLocator * This, + /* [in] */ ModulationType Modulation); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SymbolRate )( + IDVBTLocator * This, + /* [retval][out] */ long *Rate); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SymbolRate )( + IDVBTLocator * This, + /* [in] */ long Rate); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + IDVBTLocator * This, + /* [retval][out] */ ILocator **NewLocator); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Bandwidth )( + IDVBTLocator * This, + /* [retval][out] */ long *BandWidthVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Bandwidth )( + IDVBTLocator * This, + /* [in] */ long BandwidthVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LPInnerFEC )( + IDVBTLocator * This, + /* [retval][out] */ FECMethod *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_LPInnerFEC )( + IDVBTLocator * This, + /* [in] */ FECMethod FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_LPInnerFECRate )( + IDVBTLocator * This, + /* [retval][out] */ BinaryConvolutionCodeRate *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_LPInnerFECRate )( + IDVBTLocator * This, + /* [in] */ BinaryConvolutionCodeRate FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_HAlpha )( + IDVBTLocator * This, + /* [retval][out] */ HierarchyAlpha *Alpha); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_HAlpha )( + IDVBTLocator * This, + /* [in] */ HierarchyAlpha Alpha); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Guard )( + IDVBTLocator * This, + /* [retval][out] */ GuardInterval *GI); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Guard )( + IDVBTLocator * This, + /* [in] */ GuardInterval GI); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Mode )( + IDVBTLocator * This, + /* [retval][out] */ TransmissionMode *mode); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Mode )( + IDVBTLocator * This, + /* [in] */ TransmissionMode mode); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OtherFrequencyInUse )( + IDVBTLocator * This, + /* [retval][out] */ VARIANT_BOOL *OtherFrequencyInUseVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OtherFrequencyInUse )( + IDVBTLocator * This, + /* [in] */ VARIANT_BOOL OtherFrequencyInUseVal); + + END_INTERFACE + } IDVBTLocatorVtbl; + + interface IDVBTLocator + { + CONST_VTBL struct IDVBTLocatorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDVBTLocator_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDVBTLocator_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDVBTLocator_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDVBTLocator_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IDVBTLocator_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IDVBTLocator_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IDVBTLocator_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IDVBTLocator_get_CarrierFrequency(This,Frequency) \ + (This)->lpVtbl -> get_CarrierFrequency(This,Frequency) + +#define IDVBTLocator_put_CarrierFrequency(This,Frequency) \ + (This)->lpVtbl -> put_CarrierFrequency(This,Frequency) + +#define IDVBTLocator_get_InnerFEC(This,FEC) \ + (This)->lpVtbl -> get_InnerFEC(This,FEC) + +#define IDVBTLocator_put_InnerFEC(This,FEC) \ + (This)->lpVtbl -> put_InnerFEC(This,FEC) + +#define IDVBTLocator_get_InnerFECRate(This,FEC) \ + (This)->lpVtbl -> get_InnerFECRate(This,FEC) + +#define IDVBTLocator_put_InnerFECRate(This,FEC) \ + (This)->lpVtbl -> put_InnerFECRate(This,FEC) + +#define IDVBTLocator_get_OuterFEC(This,FEC) \ + (This)->lpVtbl -> get_OuterFEC(This,FEC) + +#define IDVBTLocator_put_OuterFEC(This,FEC) \ + (This)->lpVtbl -> put_OuterFEC(This,FEC) + +#define IDVBTLocator_get_OuterFECRate(This,FEC) \ + (This)->lpVtbl -> get_OuterFECRate(This,FEC) + +#define IDVBTLocator_put_OuterFECRate(This,FEC) \ + (This)->lpVtbl -> put_OuterFECRate(This,FEC) + +#define IDVBTLocator_get_Modulation(This,Modulation) \ + (This)->lpVtbl -> get_Modulation(This,Modulation) + +#define IDVBTLocator_put_Modulation(This,Modulation) \ + (This)->lpVtbl -> put_Modulation(This,Modulation) + +#define IDVBTLocator_get_SymbolRate(This,Rate) \ + (This)->lpVtbl -> get_SymbolRate(This,Rate) + +#define IDVBTLocator_put_SymbolRate(This,Rate) \ + (This)->lpVtbl -> put_SymbolRate(This,Rate) + +#define IDVBTLocator_Clone(This,NewLocator) \ + (This)->lpVtbl -> Clone(This,NewLocator) + + +#define IDVBTLocator_get_Bandwidth(This,BandWidthVal) \ + (This)->lpVtbl -> get_Bandwidth(This,BandWidthVal) + +#define IDVBTLocator_put_Bandwidth(This,BandwidthVal) \ + (This)->lpVtbl -> put_Bandwidth(This,BandwidthVal) + +#define IDVBTLocator_get_LPInnerFEC(This,FEC) \ + (This)->lpVtbl -> get_LPInnerFEC(This,FEC) + +#define IDVBTLocator_put_LPInnerFEC(This,FEC) \ + (This)->lpVtbl -> put_LPInnerFEC(This,FEC) + +#define IDVBTLocator_get_LPInnerFECRate(This,FEC) \ + (This)->lpVtbl -> get_LPInnerFECRate(This,FEC) + +#define IDVBTLocator_put_LPInnerFECRate(This,FEC) \ + (This)->lpVtbl -> put_LPInnerFECRate(This,FEC) + +#define IDVBTLocator_get_HAlpha(This,Alpha) \ + (This)->lpVtbl -> get_HAlpha(This,Alpha) + +#define IDVBTLocator_put_HAlpha(This,Alpha) \ + (This)->lpVtbl -> put_HAlpha(This,Alpha) + +#define IDVBTLocator_get_Guard(This,GI) \ + (This)->lpVtbl -> get_Guard(This,GI) + +#define IDVBTLocator_put_Guard(This,GI) \ + (This)->lpVtbl -> put_Guard(This,GI) + +#define IDVBTLocator_get_Mode(This,mode) \ + (This)->lpVtbl -> get_Mode(This,mode) + +#define IDVBTLocator_put_Mode(This,mode) \ + (This)->lpVtbl -> put_Mode(This,mode) + +#define IDVBTLocator_get_OtherFrequencyInUse(This,OtherFrequencyInUseVal) \ + (This)->lpVtbl -> get_OtherFrequencyInUse(This,OtherFrequencyInUseVal) + +#define IDVBTLocator_put_OtherFrequencyInUse(This,OtherFrequencyInUseVal) \ + (This)->lpVtbl -> put_OtherFrequencyInUse(This,OtherFrequencyInUseVal) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDVBTLocator_get_Bandwidth_Proxy( + IDVBTLocator * This, + /* [retval][out] */ long *BandWidthVal); + + +void __RPC_STUB IDVBTLocator_get_Bandwidth_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDVBTLocator_put_Bandwidth_Proxy( + IDVBTLocator * This, + /* [in] */ long BandwidthVal); + + +void __RPC_STUB IDVBTLocator_put_Bandwidth_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDVBTLocator_get_LPInnerFEC_Proxy( + IDVBTLocator * This, + /* [retval][out] */ FECMethod *FEC); + + +void __RPC_STUB IDVBTLocator_get_LPInnerFEC_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDVBTLocator_put_LPInnerFEC_Proxy( + IDVBTLocator * This, + /* [in] */ FECMethod FEC); + + +void __RPC_STUB IDVBTLocator_put_LPInnerFEC_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDVBTLocator_get_LPInnerFECRate_Proxy( + IDVBTLocator * This, + /* [retval][out] */ BinaryConvolutionCodeRate *FEC); + + +void __RPC_STUB IDVBTLocator_get_LPInnerFECRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDVBTLocator_put_LPInnerFECRate_Proxy( + IDVBTLocator * This, + /* [in] */ BinaryConvolutionCodeRate FEC); + + +void __RPC_STUB IDVBTLocator_put_LPInnerFECRate_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDVBTLocator_get_HAlpha_Proxy( + IDVBTLocator * This, + /* [retval][out] */ HierarchyAlpha *Alpha); + + +void __RPC_STUB IDVBTLocator_get_HAlpha_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDVBTLocator_put_HAlpha_Proxy( + IDVBTLocator * This, + /* [in] */ HierarchyAlpha Alpha); + + +void __RPC_STUB IDVBTLocator_put_HAlpha_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDVBTLocator_get_Guard_Proxy( + IDVBTLocator * This, + /* [retval][out] */ GuardInterval *GI); + + +void __RPC_STUB IDVBTLocator_get_Guard_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDVBTLocator_put_Guard_Proxy( + IDVBTLocator * This, + /* [in] */ GuardInterval GI); + + +void __RPC_STUB IDVBTLocator_put_Guard_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDVBTLocator_get_Mode_Proxy( + IDVBTLocator * This, + /* [retval][out] */ TransmissionMode *mode); + + +void __RPC_STUB IDVBTLocator_get_Mode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDVBTLocator_put_Mode_Proxy( + IDVBTLocator * This, + /* [in] */ TransmissionMode mode); + + +void __RPC_STUB IDVBTLocator_put_Mode_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDVBTLocator_get_OtherFrequencyInUse_Proxy( + IDVBTLocator * This, + /* [retval][out] */ VARIANT_BOOL *OtherFrequencyInUseVal); + + +void __RPC_STUB IDVBTLocator_get_OtherFrequencyInUse_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDVBTLocator_put_OtherFrequencyInUse_Proxy( + IDVBTLocator * This, + /* [in] */ VARIANT_BOOL OtherFrequencyInUseVal); + + +void __RPC_STUB IDVBTLocator_put_OtherFrequencyInUse_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDVBTLocator_INTERFACE_DEFINED__ */ + + +#ifndef __IDVBSLocator_INTERFACE_DEFINED__ +#define __IDVBSLocator_INTERFACE_DEFINED__ + +/* interface IDVBSLocator */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_IDVBSLocator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("3D7C353C-0D04-45f1-A742-F97CC1188DC8") + IDVBSLocator : public ILocator + { + public: + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_SignalPolarisation( + /* [retval][out] */ Polarisation *PolarisationVal) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_SignalPolarisation( + /* [in] */ Polarisation PolarisationVal) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_WestPosition( + /* [retval][out] */ VARIANT_BOOL *WestLongitude) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_WestPosition( + /* [in] */ VARIANT_BOOL WestLongitude) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_OrbitalPosition( + /* [retval][out] */ long *longitude) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_OrbitalPosition( + /* [in] */ long longitude) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Azimuth( + /* [retval][out] */ long *Azimuth) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Azimuth( + /* [in] */ long Azimuth) = 0; + + virtual /* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE get_Elevation( + /* [retval][out] */ long *Elevation) = 0; + + virtual /* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE put_Elevation( + /* [in] */ long Elevation) = 0; + + }; + +#else /* C style interface */ + + typedef struct IDVBSLocatorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDVBSLocator * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDVBSLocator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDVBSLocator * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IDVBSLocator * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IDVBSLocator * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IDVBSLocator * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IDVBSLocator * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CarrierFrequency )( + IDVBSLocator * This, + /* [retval][out] */ long *Frequency); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_CarrierFrequency )( + IDVBSLocator * This, + /* [in] */ long Frequency); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InnerFEC )( + IDVBSLocator * This, + /* [retval][out] */ FECMethod *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_InnerFEC )( + IDVBSLocator * This, + /* [in] */ FECMethod FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InnerFECRate )( + IDVBSLocator * This, + /* [retval][out] */ BinaryConvolutionCodeRate *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_InnerFECRate )( + IDVBSLocator * This, + /* [in] */ BinaryConvolutionCodeRate FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OuterFEC )( + IDVBSLocator * This, + /* [retval][out] */ FECMethod *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OuterFEC )( + IDVBSLocator * This, + /* [in] */ FECMethod FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OuterFECRate )( + IDVBSLocator * This, + /* [retval][out] */ BinaryConvolutionCodeRate *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OuterFECRate )( + IDVBSLocator * This, + /* [in] */ BinaryConvolutionCodeRate FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Modulation )( + IDVBSLocator * This, + /* [retval][out] */ ModulationType *Modulation); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Modulation )( + IDVBSLocator * This, + /* [in] */ ModulationType Modulation); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SymbolRate )( + IDVBSLocator * This, + /* [retval][out] */ long *Rate); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SymbolRate )( + IDVBSLocator * This, + /* [in] */ long Rate); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + IDVBSLocator * This, + /* [retval][out] */ ILocator **NewLocator); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SignalPolarisation )( + IDVBSLocator * This, + /* [retval][out] */ Polarisation *PolarisationVal); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SignalPolarisation )( + IDVBSLocator * This, + /* [in] */ Polarisation PolarisationVal); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_WestPosition )( + IDVBSLocator * This, + /* [retval][out] */ VARIANT_BOOL *WestLongitude); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_WestPosition )( + IDVBSLocator * This, + /* [in] */ VARIANT_BOOL WestLongitude); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OrbitalPosition )( + IDVBSLocator * This, + /* [retval][out] */ long *longitude); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OrbitalPosition )( + IDVBSLocator * This, + /* [in] */ long longitude); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Azimuth )( + IDVBSLocator * This, + /* [retval][out] */ long *Azimuth); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Azimuth )( + IDVBSLocator * This, + /* [in] */ long Azimuth); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Elevation )( + IDVBSLocator * This, + /* [retval][out] */ long *Elevation); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Elevation )( + IDVBSLocator * This, + /* [in] */ long Elevation); + + END_INTERFACE + } IDVBSLocatorVtbl; + + interface IDVBSLocator + { + CONST_VTBL struct IDVBSLocatorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDVBSLocator_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDVBSLocator_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDVBSLocator_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDVBSLocator_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IDVBSLocator_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IDVBSLocator_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IDVBSLocator_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IDVBSLocator_get_CarrierFrequency(This,Frequency) \ + (This)->lpVtbl -> get_CarrierFrequency(This,Frequency) + +#define IDVBSLocator_put_CarrierFrequency(This,Frequency) \ + (This)->lpVtbl -> put_CarrierFrequency(This,Frequency) + +#define IDVBSLocator_get_InnerFEC(This,FEC) \ + (This)->lpVtbl -> get_InnerFEC(This,FEC) + +#define IDVBSLocator_put_InnerFEC(This,FEC) \ + (This)->lpVtbl -> put_InnerFEC(This,FEC) + +#define IDVBSLocator_get_InnerFECRate(This,FEC) \ + (This)->lpVtbl -> get_InnerFECRate(This,FEC) + +#define IDVBSLocator_put_InnerFECRate(This,FEC) \ + (This)->lpVtbl -> put_InnerFECRate(This,FEC) + +#define IDVBSLocator_get_OuterFEC(This,FEC) \ + (This)->lpVtbl -> get_OuterFEC(This,FEC) + +#define IDVBSLocator_put_OuterFEC(This,FEC) \ + (This)->lpVtbl -> put_OuterFEC(This,FEC) + +#define IDVBSLocator_get_OuterFECRate(This,FEC) \ + (This)->lpVtbl -> get_OuterFECRate(This,FEC) + +#define IDVBSLocator_put_OuterFECRate(This,FEC) \ + (This)->lpVtbl -> put_OuterFECRate(This,FEC) + +#define IDVBSLocator_get_Modulation(This,Modulation) \ + (This)->lpVtbl -> get_Modulation(This,Modulation) + +#define IDVBSLocator_put_Modulation(This,Modulation) \ + (This)->lpVtbl -> put_Modulation(This,Modulation) + +#define IDVBSLocator_get_SymbolRate(This,Rate) \ + (This)->lpVtbl -> get_SymbolRate(This,Rate) + +#define IDVBSLocator_put_SymbolRate(This,Rate) \ + (This)->lpVtbl -> put_SymbolRate(This,Rate) + +#define IDVBSLocator_Clone(This,NewLocator) \ + (This)->lpVtbl -> Clone(This,NewLocator) + + +#define IDVBSLocator_get_SignalPolarisation(This,PolarisationVal) \ + (This)->lpVtbl -> get_SignalPolarisation(This,PolarisationVal) + +#define IDVBSLocator_put_SignalPolarisation(This,PolarisationVal) \ + (This)->lpVtbl -> put_SignalPolarisation(This,PolarisationVal) + +#define IDVBSLocator_get_WestPosition(This,WestLongitude) \ + (This)->lpVtbl -> get_WestPosition(This,WestLongitude) + +#define IDVBSLocator_put_WestPosition(This,WestLongitude) \ + (This)->lpVtbl -> put_WestPosition(This,WestLongitude) + +#define IDVBSLocator_get_OrbitalPosition(This,longitude) \ + (This)->lpVtbl -> get_OrbitalPosition(This,longitude) + +#define IDVBSLocator_put_OrbitalPosition(This,longitude) \ + (This)->lpVtbl -> put_OrbitalPosition(This,longitude) + +#define IDVBSLocator_get_Azimuth(This,Azimuth) \ + (This)->lpVtbl -> get_Azimuth(This,Azimuth) + +#define IDVBSLocator_put_Azimuth(This,Azimuth) \ + (This)->lpVtbl -> put_Azimuth(This,Azimuth) + +#define IDVBSLocator_get_Elevation(This,Elevation) \ + (This)->lpVtbl -> get_Elevation(This,Elevation) + +#define IDVBSLocator_put_Elevation(This,Elevation) \ + (This)->lpVtbl -> put_Elevation(This,Elevation) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDVBSLocator_get_SignalPolarisation_Proxy( + IDVBSLocator * This, + /* [retval][out] */ Polarisation *PolarisationVal); + + +void __RPC_STUB IDVBSLocator_get_SignalPolarisation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDVBSLocator_put_SignalPolarisation_Proxy( + IDVBSLocator * This, + /* [in] */ Polarisation PolarisationVal); + + +void __RPC_STUB IDVBSLocator_put_SignalPolarisation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDVBSLocator_get_WestPosition_Proxy( + IDVBSLocator * This, + /* [retval][out] */ VARIANT_BOOL *WestLongitude); + + +void __RPC_STUB IDVBSLocator_get_WestPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDVBSLocator_put_WestPosition_Proxy( + IDVBSLocator * This, + /* [in] */ VARIANT_BOOL WestLongitude); + + +void __RPC_STUB IDVBSLocator_put_WestPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDVBSLocator_get_OrbitalPosition_Proxy( + IDVBSLocator * This, + /* [retval][out] */ long *longitude); + + +void __RPC_STUB IDVBSLocator_get_OrbitalPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDVBSLocator_put_OrbitalPosition_Proxy( + IDVBSLocator * This, + /* [in] */ long longitude); + + +void __RPC_STUB IDVBSLocator_put_OrbitalPosition_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDVBSLocator_get_Azimuth_Proxy( + IDVBSLocator * This, + /* [retval][out] */ long *Azimuth); + + +void __RPC_STUB IDVBSLocator_get_Azimuth_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDVBSLocator_put_Azimuth_Proxy( + IDVBSLocator * This, + /* [in] */ long Azimuth); + + +void __RPC_STUB IDVBSLocator_put_Azimuth_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propget] */ HRESULT STDMETHODCALLTYPE IDVBSLocator_get_Elevation_Proxy( + IDVBSLocator * This, + /* [retval][out] */ long *Elevation); + + +void __RPC_STUB IDVBSLocator_get_Elevation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +/* [helpstring][id][propput] */ HRESULT STDMETHODCALLTYPE IDVBSLocator_put_Elevation_Proxy( + IDVBSLocator * This, + /* [in] */ long Elevation); + + +void __RPC_STUB IDVBSLocator_put_Elevation_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IDVBSLocator_INTERFACE_DEFINED__ */ + + +#ifndef __IDVBCLocator_INTERFACE_DEFINED__ +#define __IDVBCLocator_INTERFACE_DEFINED__ + +/* interface IDVBCLocator */ +/* [unique][helpstring][oleautomation][dual][uuid][nonextensible][hidden][object] */ + + +EXTERN_C const IID IID_IDVBCLocator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("6E42F36E-1DD2-43c4-9F78-69D25AE39034") + IDVBCLocator : public ILocator + { + public: + }; + +#else /* C style interface */ + + typedef struct IDVBCLocatorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IDVBCLocator * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IDVBCLocator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IDVBCLocator * This); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfoCount )( + IDVBCLocator * This, + /* [out] */ UINT *pctinfo); + + HRESULT ( STDMETHODCALLTYPE *GetTypeInfo )( + IDVBCLocator * This, + /* [in] */ UINT iTInfo, + /* [in] */ LCID lcid, + /* [out] */ ITypeInfo **ppTInfo); + + HRESULT ( STDMETHODCALLTYPE *GetIDsOfNames )( + IDVBCLocator * This, + /* [in] */ REFIID riid, + /* [size_is][in] */ LPOLESTR *rgszNames, + /* [in] */ UINT cNames, + /* [in] */ LCID lcid, + /* [size_is][out] */ DISPID *rgDispId); + + /* [local] */ HRESULT ( STDMETHODCALLTYPE *Invoke )( + IDVBCLocator * This, + /* [in] */ DISPID dispIdMember, + /* [in] */ REFIID riid, + /* [in] */ LCID lcid, + /* [in] */ WORD wFlags, + /* [out][in] */ DISPPARAMS *pDispParams, + /* [out] */ VARIANT *pVarResult, + /* [out] */ EXCEPINFO *pExcepInfo, + /* [out] */ UINT *puArgErr); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_CarrierFrequency )( + IDVBCLocator * This, + /* [retval][out] */ long *Frequency); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_CarrierFrequency )( + IDVBCLocator * This, + /* [in] */ long Frequency); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InnerFEC )( + IDVBCLocator * This, + /* [retval][out] */ FECMethod *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_InnerFEC )( + IDVBCLocator * This, + /* [in] */ FECMethod FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_InnerFECRate )( + IDVBCLocator * This, + /* [retval][out] */ BinaryConvolutionCodeRate *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_InnerFECRate )( + IDVBCLocator * This, + /* [in] */ BinaryConvolutionCodeRate FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OuterFEC )( + IDVBCLocator * This, + /* [retval][out] */ FECMethod *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OuterFEC )( + IDVBCLocator * This, + /* [in] */ FECMethod FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_OuterFECRate )( + IDVBCLocator * This, + /* [retval][out] */ BinaryConvolutionCodeRate *FEC); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_OuterFECRate )( + IDVBCLocator * This, + /* [in] */ BinaryConvolutionCodeRate FEC); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_Modulation )( + IDVBCLocator * This, + /* [retval][out] */ ModulationType *Modulation); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_Modulation )( + IDVBCLocator * This, + /* [in] */ ModulationType Modulation); + + /* [helpstring][id][propget] */ HRESULT ( STDMETHODCALLTYPE *get_SymbolRate )( + IDVBCLocator * This, + /* [retval][out] */ long *Rate); + + /* [helpstring][id][propput] */ HRESULT ( STDMETHODCALLTYPE *put_SymbolRate )( + IDVBCLocator * This, + /* [in] */ long Rate); + + /* [helpstring][id] */ HRESULT ( STDMETHODCALLTYPE *Clone )( + IDVBCLocator * This, + /* [retval][out] */ ILocator **NewLocator); + + END_INTERFACE + } IDVBCLocatorVtbl; + + interface IDVBCLocator + { + CONST_VTBL struct IDVBCLocatorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IDVBCLocator_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IDVBCLocator_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IDVBCLocator_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IDVBCLocator_GetTypeInfoCount(This,pctinfo) \ + (This)->lpVtbl -> GetTypeInfoCount(This,pctinfo) + +#define IDVBCLocator_GetTypeInfo(This,iTInfo,lcid,ppTInfo) \ + (This)->lpVtbl -> GetTypeInfo(This,iTInfo,lcid,ppTInfo) + +#define IDVBCLocator_GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) \ + (This)->lpVtbl -> GetIDsOfNames(This,riid,rgszNames,cNames,lcid,rgDispId) + +#define IDVBCLocator_Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) \ + (This)->lpVtbl -> Invoke(This,dispIdMember,riid,lcid,wFlags,pDispParams,pVarResult,pExcepInfo,puArgErr) + + +#define IDVBCLocator_get_CarrierFrequency(This,Frequency) \ + (This)->lpVtbl -> get_CarrierFrequency(This,Frequency) + +#define IDVBCLocator_put_CarrierFrequency(This,Frequency) \ + (This)->lpVtbl -> put_CarrierFrequency(This,Frequency) + +#define IDVBCLocator_get_InnerFEC(This,FEC) \ + (This)->lpVtbl -> get_InnerFEC(This,FEC) + +#define IDVBCLocator_put_InnerFEC(This,FEC) \ + (This)->lpVtbl -> put_InnerFEC(This,FEC) + +#define IDVBCLocator_get_InnerFECRate(This,FEC) \ + (This)->lpVtbl -> get_InnerFECRate(This,FEC) + +#define IDVBCLocator_put_InnerFECRate(This,FEC) \ + (This)->lpVtbl -> put_InnerFECRate(This,FEC) + +#define IDVBCLocator_get_OuterFEC(This,FEC) \ + (This)->lpVtbl -> get_OuterFEC(This,FEC) + +#define IDVBCLocator_put_OuterFEC(This,FEC) \ + (This)->lpVtbl -> put_OuterFEC(This,FEC) + +#define IDVBCLocator_get_OuterFECRate(This,FEC) \ + (This)->lpVtbl -> get_OuterFECRate(This,FEC) + +#define IDVBCLocator_put_OuterFECRate(This,FEC) \ + (This)->lpVtbl -> put_OuterFECRate(This,FEC) + +#define IDVBCLocator_get_Modulation(This,Modulation) \ + (This)->lpVtbl -> get_Modulation(This,Modulation) + +#define IDVBCLocator_put_Modulation(This,Modulation) \ + (This)->lpVtbl -> put_Modulation(This,Modulation) + +#define IDVBCLocator_get_SymbolRate(This,Rate) \ + (This)->lpVtbl -> get_SymbolRate(This,Rate) + +#define IDVBCLocator_put_SymbolRate(This,Rate) \ + (This)->lpVtbl -> put_SymbolRate(This,Rate) + +#define IDVBCLocator_Clone(This,NewLocator) \ + (This)->lpVtbl -> Clone(This,NewLocator) + + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + + +#endif /* __IDVBCLocator_INTERFACE_DEFINED__ */ + + + +#ifndef __TunerLib_LIBRARY_DEFINED__ +#define __TunerLib_LIBRARY_DEFINED__ + +/* library TunerLib */ +/* [helpstring][version][uuid] */ + + +EXTERN_C const IID LIBID_TunerLib; + +EXTERN_C const CLSID CLSID_SystemTuningSpaces; + +#ifdef __cplusplus + +class DECLSPEC_UUID("D02AAC50-027E-11d3-9D8E-00C04F72D980") +SystemTuningSpaces; +#endif + +EXTERN_C const CLSID CLSID_TuningSpace; + +#ifdef __cplusplus + +class DECLSPEC_UUID("5FFDC5E6-B83A-4b55-B6E8-C69E765FE9DB") +TuningSpace; +#endif + +EXTERN_C const CLSID CLSID_ATSCTuningSpace; + +#ifdef __cplusplus + +class DECLSPEC_UUID("A2E30750-6C3D-11d3-B653-00C04F79498E") +ATSCTuningSpace; +#endif + +EXTERN_C const CLSID CLSID_AnalogRadioTuningSpace; + +#ifdef __cplusplus + +class DECLSPEC_UUID("8A674B4C-1F63-11d3-B64C-00C04F79498E") +AnalogRadioTuningSpace; +#endif + +EXTERN_C const CLSID CLSID_AnalogTVTuningSpace; + +#ifdef __cplusplus + +class DECLSPEC_UUID("8A674B4D-1F63-11d3-B64C-00C04F79498E") +AnalogTVTuningSpace; +#endif + +EXTERN_C const CLSID CLSID_DVBTuningSpace; + +#ifdef __cplusplus + +class DECLSPEC_UUID("C6B14B32-76AA-4a86-A7AC-5C79AAF58DA7") +DVBTuningSpace; +#endif + +EXTERN_C const CLSID CLSID_ComponentTypes; + +#ifdef __cplusplus + +class DECLSPEC_UUID("A1A2B1C4-0E3A-11d3-9D8E-00C04F72D980") +ComponentTypes; +#endif + +EXTERN_C const CLSID CLSID_ComponentType; + +#ifdef __cplusplus + +class DECLSPEC_UUID("823535A0-0318-11d3-9D8E-00C04F72D980") +ComponentType; +#endif + +EXTERN_C const CLSID CLSID_LanguageComponentType; + +#ifdef __cplusplus + +class DECLSPEC_UUID("1BE49F30-0E1B-11d3-9D8E-00C04F72D980") +LanguageComponentType; +#endif + +EXTERN_C const CLSID CLSID_MPEG2ComponentType; + +#ifdef __cplusplus + +class DECLSPEC_UUID("418008F3-CF67-4668-9628-10DC52BE1D08") +MPEG2ComponentType; +#endif + +EXTERN_C const CLSID CLSID_ATSCComponentType; + +#ifdef __cplusplus + +class DECLSPEC_UUID("A8DCF3D5-0780-4ef4-8A83-2CFFAACB8ACE") +ATSCComponentType; +#endif + +EXTERN_C const CLSID CLSID_Components; + +#ifdef __cplusplus + +class DECLSPEC_UUID("809B6661-94C4-49e6-B6EC-3F0F862215AA") +Components; +#endif + +EXTERN_C const CLSID CLSID_Component; + +#ifdef __cplusplus + +class DECLSPEC_UUID("59DC47A8-116C-11d3-9D8E-00C04F72D980") +Component; +#endif + +EXTERN_C const CLSID CLSID_MPEG2Component; + +#ifdef __cplusplus + +class DECLSPEC_UUID("055CB2D7-2969-45cd-914B-76890722F112") +MPEG2Component; +#endif + +EXTERN_C const CLSID CLSID_TuneRequest; + +#ifdef __cplusplus + +class DECLSPEC_UUID("B46E0D38-AB35-4a06-A137-70576B01B39F") +TuneRequest; +#endif + +EXTERN_C const CLSID CLSID_ChannelTuneRequest; + +#ifdef __cplusplus + +class DECLSPEC_UUID("0369B4E5-45B6-11d3-B650-00C04F79498E") +ChannelTuneRequest; +#endif + +EXTERN_C const CLSID CLSID_ATSCChannelTuneRequest; + +#ifdef __cplusplus + +class DECLSPEC_UUID("0369B4E6-45B6-11d3-B650-00C04F79498E") +ATSCChannelTuneRequest; +#endif + +EXTERN_C const CLSID CLSID_Locator; + +#ifdef __cplusplus + +class DECLSPEC_UUID("0888C883-AC4F-4943-B516-2C38D9B34562") +Locator; +#endif + +EXTERN_C const CLSID CLSID_ATSCLocator; + +#ifdef __cplusplus + +class DECLSPEC_UUID("8872FF1B-98FA-4d7a-8D93-C9F1055F85BB") +ATSCLocator; +#endif + +EXTERN_C const CLSID CLSID_DVBTLocator; + +#ifdef __cplusplus + +class DECLSPEC_UUID("9CD64701-BDF3-4d14-8E03-F12983D86664") +DVBTLocator; +#endif + +EXTERN_C const CLSID CLSID_DVBSLocator; + +#ifdef __cplusplus + +class DECLSPEC_UUID("1DF7D126-4050-47f0-A7CF-4C4CA9241333") +DVBSLocator; +#endif + +EXTERN_C const CLSID CLSID_DVBCLocator; + +#ifdef __cplusplus + +class DECLSPEC_UUID("C531D9FD-9685-4028-8B68-6E1232079F1E") +DVBCLocator; +#endif + +EXTERN_C const CLSID CLSID_DVBTuneRequest; + +#ifdef __cplusplus + +class DECLSPEC_UUID("15D6504A-5494-499c-886C-973C9E53B9F1") +DVBTuneRequest; +#endif + +EXTERN_C const CLSID CLSID_CreatePropBagOnRegKey; + +#ifdef __cplusplus + +class DECLSPEC_UUID("8A674B49-1F63-11d3-B64C-00C04F79498E") +CreatePropBagOnRegKey; +#endif +#endif /* __TunerLib_LIBRARY_DEFINED__ */ + +/* Additional Prototypes for ALL interfaces */ + +unsigned long __RPC_USER BSTR_UserSize( unsigned long *, unsigned long , BSTR * ); +unsigned char * __RPC_USER BSTR_UserMarshal( unsigned long *, unsigned char *, BSTR * ); +unsigned char * __RPC_USER BSTR_UserUnmarshal(unsigned long *, unsigned char *, BSTR * ); +void __RPC_USER BSTR_UserFree( unsigned long *, BSTR * ); + +unsigned long __RPC_USER VARIANT_UserSize( unsigned long *, unsigned long , VARIANT * ); +unsigned char * __RPC_USER VARIANT_UserMarshal( unsigned long *, unsigned char *, VARIANT * ); +unsigned char * __RPC_USER VARIANT_UserUnmarshal(unsigned long *, unsigned char *, VARIANT * ); +void __RPC_USER VARIANT_UserFree( unsigned long *, VARIANT * ); + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/uuids.h b/windows_libs/mssdk/include/uuids.h new file mode 100644 index 00000000..521db62a --- /dev/null +++ b/windows_libs/mssdk/include/uuids.h @@ -0,0 +1,1153 @@ +//------------------------------------------------------------------------------ +// File: uuids.h +// +// Desc: Contains the GUIDs for the MediaType type, subtype fields and format +// types for standard media types, and also class ids for well-known +// components. +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +// +// We want to use this list for generating strings for debugging too +// so we redefine OUR_GUID_ENTRY depending on what we want to do +// +// It is imperative that all entries in this file are declared using +// OUR_GUID_ENTRY as that macro might have been defined in advance of +// including this file. See wxdebug.cpp in sdk\classes\base. +// + +#ifndef OUR_GUID_ENTRY + #define OUR_GUID_ENTRY(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \ + DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8); +#endif + + +// -- to allow consistent labeling of Media types and subtypes -- + +#define MEDIATYPE_NULL GUID_NULL +#define MEDIASUBTYPE_NULL GUID_NULL + +// -- Use this subtype if you don't have a use for a subtype for your type +// e436eb8e-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_None +OUR_GUID_ENTRY(MEDIASUBTYPE_None, +0xe436eb8e, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + + +// -- major types --- + + +// 73646976-0000-0010-8000-00AA00389B71 'vids' == MEDIATYPE_Video +OUR_GUID_ENTRY(MEDIATYPE_Video, +0x73646976, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 73647561-0000-0010-8000-00AA00389B71 'auds' == MEDIATYPE_Audio +OUR_GUID_ENTRY(MEDIATYPE_Audio, +0x73647561, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 73747874-0000-0010-8000-00AA00389B71 'txts' == MEDIATYPE_Text +OUR_GUID_ENTRY(MEDIATYPE_Text, +0x73747874, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 7364696D-0000-0010-8000-00AA00389B71 'mids' == MEDIATYPE_Midi +OUR_GUID_ENTRY(MEDIATYPE_Midi, +0x7364696D, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// e436eb83-524f-11ce-9f53-0020af0ba770 MEDIATYPE_Stream +OUR_GUID_ENTRY(MEDIATYPE_Stream, +0xe436eb83, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// 73(s)76(v)61(a)69(i)-0000-0010-8000-00AA00389B71 'iavs' == MEDIATYPE_Interleaved +OUR_GUID_ENTRY(MEDIATYPE_Interleaved, +0x73766169, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 656c6966-0000-0010-8000-00AA00389B71 'file' == MEDIATYPE_File +OUR_GUID_ENTRY(MEDIATYPE_File, +0x656c6966, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 73636d64-0000-0010-8000-00AA00389B71 'scmd' == MEDIATYPE_ScriptCommand +OUR_GUID_ENTRY(MEDIATYPE_ScriptCommand, +0x73636d64, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 670AEA80-3A82-11d0-B79B-00AA003767A7 MEDIATYPE_AUXLine21Data +OUR_GUID_ENTRY(MEDIATYPE_AUXLine21Data, +0x670aea80, 0x3a82, 0x11d0, 0xb7, 0x9b, 0x0, 0xaa, 0x0, 0x37, 0x67, 0xa7) + +// 0482DEE3-7817-11cf-8a03-00aa006ecb65 +OUR_GUID_ENTRY(MEDIATYPE_Timecode, +0x482dee3, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// 74726c6d-0000-0010-8000-00AA00389B71 'lmrt' == MEDIATYPE_LMRT +OUR_GUID_ENTRY(MEDIATYPE_LMRT, +0x74726c6d, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 74726c6d-0000-0010-8000-00AA00389B71 'urls' == MEDIATYPE_URL_STREAM +OUR_GUID_ENTRY(MEDIATYPE_URL_STREAM, +0x736c7275, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// -- sub types --- + +// 4C504C43-0000-0010-8000-00AA00389B71 'CLPL' == MEDIASUBTYPE_CLPL +OUR_GUID_ENTRY(MEDIASUBTYPE_CLPL, +0x4C504C43, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 56595559-0000-0010-8000-00AA00389B71 'YUYV' == MEDIASUBTYPE_YUYV +OUR_GUID_ENTRY(MEDIASUBTYPE_YUYV, +0x56595559, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 56555949-0000-0010-8000-00AA00389B71 'IYUV' == MEDIASUBTYPE_IYUV +OUR_GUID_ENTRY(MEDIASUBTYPE_IYUV, +0x56555949, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 39555659-0000-0010-8000-00AA00389B71 'YVU9' == MEDIASUBTYPE_YVU9 +OUR_GUID_ENTRY(MEDIASUBTYPE_YVU9, +0x39555659, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 31313459-0000-0010-8000-00AA00389B71 'Y411' == MEDIASUBTYPE_Y411 +OUR_GUID_ENTRY(MEDIASUBTYPE_Y411, +0x31313459, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 50313459-0000-0010-8000-00AA00389B71 'Y41P' == MEDIASUBTYPE_Y41P +OUR_GUID_ENTRY(MEDIASUBTYPE_Y41P, +0x50313459, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 32595559-0000-0010-8000-00AA00389B71 'YUY2' == MEDIASUBTYPE_YUY2 +OUR_GUID_ENTRY(MEDIASUBTYPE_YUY2, +0x32595559, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 55595659-0000-0010-8000-00AA00389B71 'YVYU' == MEDIASUBTYPE_YVYU +OUR_GUID_ENTRY(MEDIASUBTYPE_YVYU, +0x55595659, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 59565955-0000-0010-8000-00AA00389B71 'UYVY' == MEDIASUBTYPE_UYVY +OUR_GUID_ENTRY(MEDIASUBTYPE_UYVY, +0x59565955, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 31313259-0000-0010-8000-00AA00389B71 'Y211' == MEDIASUBTYPE_Y211 +OUR_GUID_ENTRY(MEDIASUBTYPE_Y211, +0x31313259, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 31313259-0000-0010-8000-00AA00389B71 'YV12' == MEDIASUBTYPE_YV12 +OUR_GUID_ENTRY(MEDIASUBTYPE_YV12, +0x32315659, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 524a4c43-0000-0010-8000-00AA00389B71 'CLJR' == MEDIASUBTYPE_CLJR +OUR_GUID_ENTRY(MEDIASUBTYPE_CLJR, +0x524a4c43, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 39304649-0000-0010-8000-00AA00389B71 'IF09' == MEDIASUBTYPE_IF09 +OUR_GUID_ENTRY(MEDIASUBTYPE_IF09, +0x39304649, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 414c5043-0000-0010-8000-00AA00389B71 'CPLA' == MEDIASUBTYPE_CPLA +OUR_GUID_ENTRY(MEDIASUBTYPE_CPLA, +0x414c5043, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 47504A4D-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_MJPG +OUR_GUID_ENTRY(MEDIASUBTYPE_MJPG, +0x47504A4D, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 4A4D5654-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_TVMJ +OUR_GUID_ENTRY(MEDIASUBTYPE_TVMJ, +0x4A4D5654, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 454B4157-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_WAKE +OUR_GUID_ENTRY(MEDIASUBTYPE_WAKE, +0x454B4157, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 43434643-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_CFCC +OUR_GUID_ENTRY(MEDIASUBTYPE_CFCC, +0x43434643, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 47504A49-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_IJPG +OUR_GUID_ENTRY(MEDIASUBTYPE_IJPG, +0x47504A49, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 6D756C50-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_Plum +OUR_GUID_ENTRY(MEDIASUBTYPE_Plum, +0x6D756C50, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// FAST DV-Master +// 53435644-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_DVCS +OUR_GUID_ENTRY(MEDIASUBTYPE_DVCS, +0x53435644, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// FAST DV-Master +// 44535644-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_DVSD +OUR_GUID_ENTRY(MEDIASUBTYPE_DVSD, +0x44535644, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// MIROVideo DV +// 4656444D-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_MDVF +OUR_GUID_ENTRY(MEDIASUBTYPE_MDVF, +0x4656444D, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// e436eb78-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB1 +// e436eb78-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB1 +OUR_GUID_ENTRY(MEDIASUBTYPE_RGB1, +0xe436eb78, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436eb79-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB4 +OUR_GUID_ENTRY(MEDIASUBTYPE_RGB4, +0xe436eb79, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436eb7a-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB8 +OUR_GUID_ENTRY(MEDIASUBTYPE_RGB8, +0xe436eb7a, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436eb7b-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB565 +OUR_GUID_ENTRY(MEDIASUBTYPE_RGB565, +0xe436eb7b, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436eb7c-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB555 +OUR_GUID_ENTRY(MEDIASUBTYPE_RGB555, +0xe436eb7c, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436eb7d-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB24 +OUR_GUID_ENTRY(MEDIASUBTYPE_RGB24, +0xe436eb7d, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436eb7e-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_RGB32 +OUR_GUID_ENTRY(MEDIASUBTYPE_RGB32, +0xe436eb7e, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// 773c9ac0-3274-11d0-B724-00aa006c1A01 MEDIASUBTYPE_ARGB32 +OUR_GUID_ENTRY(MEDIASUBTYPE_ARGB32, +0x773c9ac0, 0x3274, 0x11d0, 0xb7, 0x24, 0x0, 0xaa, 0x0, 0x6c, 0x1a, 0x1 ) + +// e436eb7f-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_Overlay +OUR_GUID_ENTRY(MEDIASUBTYPE_Overlay, +0xe436eb7f, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436eb80-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_MPEGPacket +OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1Packet, +0xe436eb80, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436eb81-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_MPEG1Payload +OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1Payload, +0xe436eb81, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// 00000050-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_MPEG1AudioPayload +OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1AudioPayload, +0x00000050, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71) + +// e436eb82-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_MPEG1SystemStream +OUR_GUID_ENTRY(MEDIATYPE_MPEG1SystemStream, +0xe436eb82, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// the next consecutive number is assigned to MEDIATYPE_Stream and appears higher up +// e436eb84-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_MPEG1System +OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1System, +0xe436eb84, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436eb85-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_MPEG1VideoCD +OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1VideoCD, +0xe436eb85, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436eb86-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_MPEG1Video +OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1Video, +0xe436eb86, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436eb87-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_MPEG1Audio +OUR_GUID_ENTRY(MEDIASUBTYPE_MPEG1Audio, +0xe436eb87, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436eb88-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_Avi +OUR_GUID_ENTRY(MEDIASUBTYPE_Avi, +0xe436eb88, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// {3DB80F90-9412-11d1-ADED-0000F8754B99} MEDIASUBTYPE_Asf +OUR_GUID_ENTRY(MEDIASUBTYPE_Asf, +0x3db80f90, 0x9412, 0x11d1, 0xad, 0xed, 0x0, 0x0, 0xf8, 0x75, 0x4b, 0x99) + +// e436eb89-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_QTMovie +OUR_GUID_ENTRY(MEDIASUBTYPE_QTMovie, +0xe436eb89, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// 617a7072-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_Rpza +OUR_GUID_ENTRY(MEDIASUBTYPE_QTRpza, +0x617a7072, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 20636d73-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_Smc +OUR_GUID_ENTRY(MEDIASUBTYPE_QTSmc, +0x20636d73, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 20656c72-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_Rle +OUR_GUID_ENTRY(MEDIASUBTYPE_QTRle, +0x20656c72, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 6765706a-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_Jpeg +OUR_GUID_ENTRY(MEDIASUBTYPE_QTJpeg, +0x6765706a, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// e436eb8a-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_PCMAudio_Obsolete +OUR_GUID_ENTRY(MEDIASUBTYPE_PCMAudio_Obsolete, +0xe436eb8a, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// 00000001-0000-0010-8000-00AA00389B71 MEDIASUBTYPE_PCM +OUR_GUID_ENTRY(MEDIASUBTYPE_PCM, +0x00000001, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xAA, 0x00, 0x38, 0x9B, 0x71) + +// e436eb8b-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_WAVE +OUR_GUID_ENTRY(MEDIASUBTYPE_WAVE, +0xe436eb8b, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436eb8c-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_AU +OUR_GUID_ENTRY(MEDIASUBTYPE_AU, +0xe436eb8c, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436eb8d-524f-11ce-9f53-0020af0ba770 MEDIASUBTYPE_AIFF +OUR_GUID_ENTRY(MEDIASUBTYPE_AIFF, +0xe436eb8d, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// 64(d)73(s)76(v)64(d)-0000-0010-8000-00AA00389B71 'dvsd' == MEDIASUBTYPE_dvsd +OUR_GUID_ENTRY(MEDIASUBTYPE_dvsd, +0x64737664, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 64(d)68(h)76(v)64(d)-0000-0010-8000-00AA00389B71 'dvhd' == MEDIASUBTYPE_dvhd +OUR_GUID_ENTRY(MEDIASUBTYPE_dvhd, +0x64687664, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 6c(l)73(s)76(v)64(d)-0000-0010-8000-00AA00389B71 'dvsl' == MEDIASUBTYPE_dvsl +OUR_GUID_ENTRY(MEDIASUBTYPE_dvsl, +0x6c737664, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// 6E8D4A22-310C-11d0-B79A-00AA003767A7 MEDIASUBTYPE_Line21_BytePair +OUR_GUID_ENTRY(MEDIASUBTYPE_Line21_BytePair, +0x6e8d4a22, 0x310c, 0x11d0, 0xb7, 0x9a, 0x0, 0xaa, 0x0, 0x37, 0x67, 0xa7) + +// 6E8D4A23-310C-11d0-B79A-00AA003767A7 MEDIASUBTYPE_Line21_GOPPacket +OUR_GUID_ENTRY(MEDIASUBTYPE_Line21_GOPPacket, +0x6e8d4a23, 0x310c, 0x11d0, 0xb7, 0x9a, 0x0, 0xaa, 0x0, 0x37, 0x67, 0xa7) + +// 6E8D4A24-310C-11d0-B79A-00AA003767A7 MEDIASUBTYPE_Line21_VBIRawData +OUR_GUID_ENTRY(MEDIASUBTYPE_Line21_VBIRawData, +0x6e8d4a24, 0x310c, 0x11d0, 0xb7, 0x9a, 0x0, 0xaa, 0x0, 0x37, 0x67, 0xa7) + +// derived from WAVE_FORMAT_DRM +// 00000009-0000-0010-8000-00aa00389b71 +OUR_GUID_ENTRY(MEDIASUBTYPE_DRM_Audio, +0x00000009, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// derived from WAVE_FORMAT_IEEE_FLOAT +// 00000003-0000-0010-8000-00aa00389b71 +OUR_GUID_ENTRY(MEDIASUBTYPE_IEEE_FLOAT, +0x00000003, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// derived from WAVE_FORMAT_DOLBY_AC3_SPDIF +// 00000092-0000-0010-8000-00aa00389b71 +OUR_GUID_ENTRY(MEDIASUBTYPE_DOLBY_AC3_SPDIF, +0x00000092, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// derived from WAVE_FORMAT_RAW_SPORT +// 00000240-0000-0010-8000-00aa00389b71 +OUR_GUID_ENTRY(MEDIASUBTYPE_RAW_SPORT, +0x00000240, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + +// derived from wave format tag 0x241, call it SPDIF_TAG_241h for now +// 00000241-0000-0010-8000-00aa00389b71 +OUR_GUID_ENTRY(MEDIASUBTYPE_SPDIF_TAG_241h, +0x00000241, 0x0000, 0x0010, 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71) + + + +// DirectShow DSS definitions + +// A0AF4F81-E163-11d0-BAD9-00609744111A +OUR_GUID_ENTRY(MEDIASUBTYPE_DssVideo, +0xa0af4f81, 0xe163, 0x11d0, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a) + +// A0AF4F82-E163-11d0-BAD9-00609744111A +OUR_GUID_ENTRY(MEDIASUBTYPE_DssAudio, +0xa0af4f82, 0xe163, 0x11d0, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a) + +// 5A9B6A40-1A22-11D1-BAD9-00609744111A +OUR_GUID_ENTRY(MEDIASUBTYPE_VPVideo, +0x5a9b6a40, 0x1a22, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a) + +// 5A9B6A41-1A22-11D1-BAD9-00609744111A +OUR_GUID_ENTRY(MEDIASUBTYPE_VPVBI, +0x5a9b6a41, 0x1a22, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a) + +// BF87B6E0-8C27-11d0-B3F0-00AA003761C5 Capture graph building +OUR_GUID_ENTRY(CLSID_CaptureGraphBuilder, +0xBF87B6E0, 0x8C27, 0x11d0, 0xB3, 0xF0, 0x0, 0xAA, 0x00, 0x37, 0x61, 0xC5) + +// BF87B6E1-8C27-11d0-B3F0-00AA003761C5 New Capture graph building +OUR_GUID_ENTRY(CLSID_CaptureGraphBuilder2, +0xBF87B6E1, 0x8C27, 0x11d0, 0xB3, 0xF0, 0x0, 0xAA, 0x00, 0x37, 0x61, 0xC5) + +// e436ebb0-524f-11ce-9f53-0020af0ba770 Prototype filtergraph +OUR_GUID_ENTRY(CLSID_ProtoFilterGraph, +0xe436ebb0, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436ebb1-524f-11ce-9f53-0020af0ba770 Reference clock +OUR_GUID_ENTRY(CLSID_SystemClock, +0xe436ebb1, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436ebb2-524f-11ce-9f53-0020af0ba770 Filter Mapper +OUR_GUID_ENTRY(CLSID_FilterMapper, +0xe436ebb2, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436ebb3-524f-11ce-9f53-0020af0ba770 Filter Graph +OUR_GUID_ENTRY(CLSID_FilterGraph, +0xe436ebb3, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e436ebb8-524f-11ce-9f53-0020af0ba770 Filter Graph no thread +OUR_GUID_ENTRY(CLSID_FilterGraphNoThread, +0xe436ebb8, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// e4bbd160-4269-11ce-838d-00aa0055595a MPEG System stream +OUR_GUID_ENTRY(CLSID_MPEG1Doc, +0xe4bbd160, 0x4269, 0x11ce, 0x83, 0x8d, 0x0, 0xaa, 0x0, 0x55, 0x59, 0x5a) + +// 701722e0-8ae3-11ce-a85c-00aa002feab5 MPEG file reader +OUR_GUID_ENTRY(CLSID_FileSource, +0x701722e0, 0x8ae3, 0x11ce, 0xa8, 0x5c, 0x00, 0xaa, 0x00, 0x2f, 0xea, 0xb5) + +// 26C25940-4CA9-11ce-A828-00AA002FEAB5 Takes MPEG1 packets as input +OUR_GUID_ENTRY(CLSID_MPEG1PacketPlayer, +0x26c25940, 0x4ca9, 0x11ce, 0xa8, 0x28, 0x0, 0xaa, 0x0, 0x2f, 0xea, 0xb5) + +// 336475d0-942a-11ce-a870-00aa002feab5 MPEG splitter +OUR_GUID_ENTRY(CLSID_MPEG1Splitter, +0x336475d0, 0x942a, 0x11ce, 0xa8, 0x70, 0x00, 0xaa, 0x00, 0x2f, 0xea, 0xb5) + +// feb50740-7bef-11ce-9bd9-0000e202599c MPEG video decoder +OUR_GUID_ENTRY(CLSID_CMpegVideoCodec, +0xfeb50740, 0x7bef, 0x11ce, 0x9b, 0xd9, 0x0, 0x0, 0xe2, 0x2, 0x59, 0x9c) + +// 4a2286e0-7bef-11ce-9bd9-0000e202599c MPEG audio decoder +OUR_GUID_ENTRY(CLSID_CMpegAudioCodec, +0x4a2286e0, 0x7bef, 0x11ce, 0x9b, 0xd9, 0x0, 0x0, 0xe2, 0x2, 0x59, 0x9c) + +// e30629d3-27e5-11ce-875d-00608cb78066 Text renderer +OUR_GUID_ENTRY(CLSID_TextRender, +0xe30629d3, 0x27e5, 0x11ce, 0x87, 0x5d, 0x0, 0x60, 0x8c, 0xb7, 0x80, 0x66) + + + +// {F8388A40-D5BB-11d0-BE5A-0080C706568E} +OUR_GUID_ENTRY(CLSID_InfTee, +0xf8388a40, 0xd5bb, 0x11d0, 0xbe, 0x5a, 0x0, 0x80, 0xc7, 0x6, 0x56, 0x8e) + +// 1b544c20-fd0b-11ce-8c63-00aa0044b51e Avi Stream Splitter +OUR_GUID_ENTRY(CLSID_AviSplitter, +0x1b544c20, 0xfd0b, 0x11ce, 0x8c, 0x63, 0x0, 0xaa, 0x00, 0x44, 0xb5, 0x1e) + +// 1b544c21-fd0b-11ce-8c63-00aa0044b51e Avi File Reader +OUR_GUID_ENTRY(CLSID_AviReader, +0x1b544c21, 0xfd0b, 0x11ce, 0x8c, 0x63, 0x0, 0xaa, 0x00, 0x44, 0xb5, 0x1e) + +// 1b544c22-fd0b-11ce-8c63-00aa0044b51e Vfw 2.0 Capture Driver +OUR_GUID_ENTRY(CLSID_VfwCapture, +0x1b544c22, 0xfd0b, 0x11ce, 0x8c, 0x63, 0x0, 0xaa, 0x00, 0x44, 0xb5, 0x1e) + +OUR_GUID_ENTRY(CLSID_CaptureProperties, +0x1B544c22, 0xFD0B, 0x11ce, 0x8C, 0x63, 0x00, 0xAA, 0x00, 0x44, 0xB5, 0x1F) + +//e436ebb4-524f-11ce-9f53-0020af0ba770 Control Distributor +OUR_GUID_ENTRY(CLSID_FGControl, +0xe436ebb4, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// 44584800-F8EE-11ce-B2D4-00DD01101B85 .MOV reader (old) +OUR_GUID_ENTRY(CLSID_MOVReader, +0x44584800, 0xf8ee, 0x11ce, 0xb2, 0xd4, 0x00, 0xdd, 0x1, 0x10, 0x1b, 0x85) + +// D51BD5A0-7548-11cf-A520-0080C77EF58A QT Splitter +OUR_GUID_ENTRY(CLSID_QuickTimeParser, +0xd51bd5a0, 0x7548, 0x11cf, 0xa5, 0x20, 0x0, 0x80, 0xc7, 0x7e, 0xf5, 0x8a) + +// FDFE9681-74A3-11d0-AFA7-00AA00B67A42 QT Decoder +OUR_GUID_ENTRY(CLSID_QTDec, +0xfdfe9681, 0x74a3, 0x11d0, 0xaf, 0xa7, 0x0, 0xaa, 0x0, 0xb6, 0x7a, 0x42) + +// D3588AB0-0781-11ce-B03A-0020AF0BA770 AVIFile-based reader +OUR_GUID_ENTRY(CLSID_AVIDoc, +0xd3588ab0, 0x0781, 0x11ce, 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0xb, 0xa7, 0x70) + +// 70e102b0-5556-11ce-97c0-00aa0055595a Video renderer +OUR_GUID_ENTRY(CLSID_VideoRenderer, +0x70e102b0, 0x5556, 0x11ce, 0x97, 0xc0, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a) + +// 1643e180-90f5-11ce-97d5-00aa0055595a Colour space convertor +OUR_GUID_ENTRY(CLSID_Colour, +0x1643e180, 0x90f5, 0x11ce, 0x97, 0xd5, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a) + +// 1da08500-9edc-11cf-bc10-00aa00ac74f6 VGA 16 color ditherer +OUR_GUID_ENTRY(CLSID_Dither, +0x1da08500, 0x9edc, 0x11cf, 0xbc, 0x10, 0x00, 0xaa, 0x00, 0xac, 0x74, 0xf6) + +// 07167665-5011-11cf-BF33-00AA0055595A Modex video renderer +OUR_GUID_ENTRY(CLSID_ModexRenderer, +0x7167665, 0x5011, 0x11cf, 0xbf, 0x33, 0x0, 0xaa, 0x0, 0x55, 0x59, 0x5a) + +// e30629d1-27e5-11ce-875d-00608cb78066 Waveout audio renderer +OUR_GUID_ENTRY(CLSID_AudioRender, +0xe30629d1, 0x27e5, 0x11ce, 0x87, 0x5d, 0x0, 0x60, 0x8c, 0xb7, 0x80, 0x66) + +// 05589faf-c356-11ce-bf01-00aa0055595a Audio Renderer Property Page +OUR_GUID_ENTRY(CLSID_AudioProperties, +0x05589faf, 0xc356, 0x11ce, 0xbf, 0x01, 0x0, 0xaa, 0x0, 0x55, 0x59, 0x5a) + +// 79376820-07D0-11cf-A24D-0020AFD79767 DSound audio renderer +OUR_GUID_ENTRY(CLSID_DSoundRender, +0x79376820, 0x07D0, 0x11CF, 0xA2, 0x4D, 0x0, 0x20, 0xAF, 0xD7, 0x97, 0x67) + +// e30629d2-27e5-11ce-875d-00608cb78066 Wavein audio recorder +OUR_GUID_ENTRY(CLSID_AudioRecord, +0xe30629d2, 0x27e5, 0x11ce, 0x87, 0x5d, 0x0, 0x60, 0x8c, 0xb7, 0x80, 0x66) + +// {2CA8CA52-3C3F-11d2-B73D-00C04FB6BD3D} IAMAudioInputMixer property page +OUR_GUID_ENTRY(CLSID_AudioInputMixerProperties, +0x2ca8ca52, 0x3c3f, 0x11d2, 0xb7, 0x3d, 0x0, 0xc0, 0x4f, 0xb6, 0xbd, 0x3d) + +// {CF49D4E0-1115-11ce-B03A-0020AF0BA770} AVI Decoder +OUR_GUID_ENTRY(CLSID_AVIDec, +0xcf49d4e0, 0x1115, 0x11ce, 0xb0, 0x3a, 0x0, 0x20, 0xaf, 0xb, 0xa7, 0x70) + +// {A888DF60-1E90-11cf-AC98-00AA004C0FA9} AVI ICDraw* wrapper +OUR_GUID_ENTRY(CLSID_AVIDraw, +0xa888df60, 0x1e90, 0x11cf, 0xac, 0x98, 0x0, 0xaa, 0x0, 0x4c, 0xf, 0xa9) + +// 6a08cf80-0e18-11cf-a24d-0020afd79767 ACM Wrapper +OUR_GUID_ENTRY(CLSID_ACMWrapper, +0x6a08cf80, 0x0e18, 0x11cf, 0xa2, 0x4d, 0x0, 0x20, 0xaf, 0xd7, 0x97, 0x67) + +// {e436ebb5-524f-11ce-9f53-0020af0ba770} Async File Reader +OUR_GUID_ENTRY(CLSID_AsyncReader, +0xe436ebb5, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// {e436ebb6-524f-11ce-9f53-0020af0ba770} Async URL Reader +OUR_GUID_ENTRY(CLSID_URLReader, +0xe436ebb6, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// {e436ebb7-524f-11ce-9f53-0020af0ba770} IPersistMoniker PID +OUR_GUID_ENTRY(CLSID_PersistMonikerPID, +0xe436ebb7, 0x524f, 0x11ce, 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70) + +// {5f2759c0-7685-11cf-8b23-00805f6cef60} IAMovie plug-in distributor +OUR_GUID_ENTRY(CLSID_AMovie, +0x5f2759c0, 0x7685, 0x11cf, 0x8b, 0x23, 0x00, 0x80, 0x5f, 0x6c, 0xef, 0x60) + +// {D76E2820-1563-11cf-AC98-00AA004C0FA9} +OUR_GUID_ENTRY(CLSID_AVICo, +0xd76e2820, 0x1563, 0x11cf, 0xac, 0x98, 0x0, 0xaa, 0x0, 0x4c, 0xf, 0xa9) + +// {8596E5F0-0DA5-11d0-BD21-00A0C911CE86} +OUR_GUID_ENTRY(CLSID_FileWriter, +0x8596e5f0, 0xda5, 0x11d0, 0xbd, 0x21, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86) + +// {E2510970-F137-11CE-8B67-00AA00A3F1A6} AVI mux filter +OUR_GUID_ENTRY(CLSID_AviDest, +0xe2510970, 0xf137, 0x11ce, 0x8b, 0x67, 0x0, 0xaa, 0x0, 0xa3, 0xf1, 0xa6) + +// {C647B5C0-157C-11d0-BD23-00A0C911CE86} +OUR_GUID_ENTRY(CLSID_AviMuxProptyPage, +0xc647b5c0, 0x157c, 0x11d0, 0xbd, 0x23, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86) + +// {0A9AE910-85C0-11d0-BD42-00A0C911CE86} +OUR_GUID_ENTRY(CLSID_AviMuxProptyPage1, +0xa9ae910, 0x85c0, 0x11d0, 0xbd, 0x42, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86) + +// {07b65360-c445-11ce-afde-00aa006c14f4} +OUR_GUID_ENTRY(CLSID_AVIMIDIRender, +0x07b65360, 0xc445, 0x11ce, 0xaf, 0xde, 0x00, 0xaa, 0x00, 0x6c, 0x14, 0xf4) + +// {187463A0-5BB7-11d3-ACBE-0080C75E246E} WMSDK-based ASF reader +OUR_GUID_ENTRY(CLSID_WMAsfReader, +0x187463a0, 0x5bb7, 0x11d3, 0xac, 0xbe, 0x0, 0x80, 0xc7, 0x5e, 0x24, 0x6e) + +// {7c23220e-55bb-11d3-8b16-00c04fb6bd3d} WMSDK-based ASF writer +OUR_GUID_ENTRY(CLSID_WMAsfWriter, +0x7c23220e, 0x55bb, 0x11d3, 0x8b, 0x16, 0x0, 0xc0, 0x4f, 0xb6, 0xbd, 0x3d) + +// {afb6c280-2c41-11d3-8a60-0000f81e0e4a} +OUR_GUID_ENTRY(CLSID_MPEG2Demultiplexer, +0xafb6c280, 0x2c41, 0x11d3, 0x8a, 0x60, 0x00, 0x00, 0xf8, 0x1e, 0x0e, 0x4a) + +// {3ae86b20-7be8-11d1-abe6-00a0c905f375} +OUR_GUID_ENTRY(CLSID_MMSPLITTER, +0x3ae86b20, 0x7be8, 0x11d1, 0xab, 0xe6, 0x00, 0xa0, 0xc9, 0x05, 0xf3, 0x75) + + +// {B1B77C00-C3E4-11cf-AF79-00AA00B67A42} DV video decoder +OUR_GUID_ENTRY(CLSID_DVVideoCodec, +0xb1b77c00, 0xc3e4, 0x11cf, 0xaf, 0x79, 0x0, 0xaa, 0x0, 0xb6, 0x7a, 0x42) + +// {13AA3650-BB6F-11d0-AFB9-00AA00B67A42} DV video encoder +OUR_GUID_ENTRY(CLSID_DVVideoEnc, +0x13aa3650, 0xbb6f, 0x11d0, 0xaf, 0xb9, 0x0, 0xaa, 0x0, 0xb6, 0x7a, 0x42) + +// {4EB31670-9FC6-11cf-AF6E-00AA00B67A42} DV splitter +OUR_GUID_ENTRY(CLSID_DVSplitter, +0x4eb31670, 0x9fc6, 0x11cf, 0xaf, 0x6e, 0x0, 0xaa, 0x0, 0xb6, 0x7a, 0x42) + +// {129D7E40-C10D-11d0-AFB9-00AA00B67A42} DV muxer +OUR_GUID_ENTRY(CLSID_DVMux, +0x129d7e40, 0xc10d, 0x11d0, 0xaf, 0xb9, 0x0, 0xaa, 0x0, 0xb6, 0x7a, 0x42) + +// {060AF76C-68DD-11d0-8FC1-00C04FD9189D} +OUR_GUID_ENTRY(CLSID_SeekingPassThru, +0x60af76c, 0x68dd, 0x11d0, 0x8f, 0xc1, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0x9d) + +// 6E8D4A20-310C-11d0-B79A-00AA003767A7 Line21 (CC) Decoder +OUR_GUID_ENTRY(CLSID_Line21Decoder, +0x6e8d4a20, 0x310c, 0x11d0, 0xb7, 0x9a, 0x0, 0xaa, 0x0, 0x37, 0x67, 0xa7) + +// {CD8743A1-3736-11d0-9E69-00C04FD7C15B} +OUR_GUID_ENTRY(CLSID_OverlayMixer, +0xcd8743a1, 0x3736, 0x11d0, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b) + +// {814B9800-1C88-11d1-BAD9-00609744111A} +OUR_GUID_ENTRY(CLSID_VBISurfaces, +0x814b9800, 0x1c88, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a) + +// pnp objects and categories +// 62BE5D10-60EB-11d0-BD3B-00A0C911CE86 ICreateDevEnum +OUR_GUID_ENTRY(CLSID_SystemDeviceEnum, +0x62BE5D10,0x60EB,0x11d0,0xBD,0x3B,0x00,0xA0,0xC9,0x11,0xCE,0x86) + +// 4315D437-5B8C-11d0-BD3B-00A0C911CE86 +OUR_GUID_ENTRY(CLSID_CDeviceMoniker, +0x4315D437,0x5B8C,0x11d0,0xBD,0x3B,0x00,0xA0,0xC9,0x11,0xCE,0x86) + +// 860BB310-5D01-11d0-BD3B-00A0C911CE86 Video capture category +OUR_GUID_ENTRY(CLSID_VideoInputDeviceCategory, +0x860BB310,0x5D01,0x11d0,0xBD,0x3B,0x00,0xA0,0xC9,0x11,0xCE,0x86) +OUR_GUID_ENTRY(CLSID_CVidCapClassManager, +0x860BB310,0x5D01,0x11d0,0xBD,0x3B,0x00,0xA0,0xC9,0x11,0xCE,0x86) + +// 083863F1-70DE-11d0-BD40-00A0C911CE86 Filter category +OUR_GUID_ENTRY(CLSID_LegacyAmFilterCategory, +0x083863F1,0x70DE,0x11d0,0xBD,0x40,0x00,0xA0,0xC9,0x11,0xCE,0x86) +OUR_GUID_ENTRY(CLSID_CQzFilterClassManager, +0x083863F1,0x70DE,0x11d0,0xBD,0x40,0x00,0xA0,0xC9,0x11,0xCE,0x86) + +// 33D9A760-90C8-11d0-BD43-00A0C911CE86 +OUR_GUID_ENTRY(CLSID_VideoCompressorCategory, +0x33d9a760, 0x90c8, 0x11d0, 0xbd, 0x43, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86) +OUR_GUID_ENTRY(CLSID_CIcmCoClassManager, +0x33d9a760, 0x90c8, 0x11d0, 0xbd, 0x43, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86) + +// 33D9A761-90C8-11d0-BD43-00A0C911CE86 +OUR_GUID_ENTRY(CLSID_AudioCompressorCategory, +0x33d9a761, 0x90c8, 0x11d0, 0xbd, 0x43, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86) +OUR_GUID_ENTRY(CLSID_CAcmCoClassManager, +0x33d9a761, 0x90c8, 0x11d0, 0xbd, 0x43, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86) + +// 33D9A762-90C8-11d0-BD43-00A0C911CE86 Audio source cateogry +OUR_GUID_ENTRY(CLSID_AudioInputDeviceCategory, +0x33d9a762, 0x90c8, 0x11d0, 0xbd, 0x43, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86) +OUR_GUID_ENTRY(CLSID_CWaveinClassManager, +0x33d9a762, 0x90c8, 0x11d0, 0xbd, 0x43, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86) + +// E0F158E1-CB04-11d0-BD4E-00A0C911CE86 Audio renderer category +OUR_GUID_ENTRY(CLSID_AudioRendererCategory, +0xe0f158e1, 0xcb04, 0x11d0, 0xbd, 0x4e, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86) +OUR_GUID_ENTRY(CLSID_CWaveOutClassManager, +0xe0f158e1, 0xcb04, 0x11d0, 0xbd, 0x4e, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86) + +// 4EFE2452-168A-11d1-BC76-00C04FB9453B Midi renderer category +OUR_GUID_ENTRY(CLSID_MidiRendererCategory, +0x4EfE2452, 0x168A, 0x11d1, 0xBC, 0x76, 0x0, 0xc0, 0x4F, 0xB9, 0x45, 0x3B) +OUR_GUID_ENTRY(CLSID_CMidiOutClassManager, +0x4EfE2452, 0x168A, 0x11d1, 0xBC, 0x76, 0x0, 0xc0, 0x4F, 0xB9, 0x45, 0x3B) + +// CC7BFB41-F175-11d1-A392-00E0291F3959 External Renderers Category +OUR_GUID_ENTRY(CLSID_TransmitCategory, +0xcc7bfb41, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59) + +// CC7BFB46-F175-11d1-A392-00E0291F3959 Device Control Filters +OUR_GUID_ENTRY(CLSID_DeviceControlCategory, +0xcc7bfb46, 0xf175, 0x11d1, 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59) + +// DA4E3DA0-D07D-11d0-BD50-00A0C911CE86 +OUR_GUID_ENTRY(CLSID_ActiveMovieCategories, +0xda4e3da0, 0xd07d, 0x11d0, 0xbd, 0x50, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86) + +// 2721AE20-7E70-11D0-A5D6-28DB04C10000 +OUR_GUID_ENTRY(CLSID_DVDHWDecodersCategory, +0x2721AE20, 0x7E70, 0x11D0, 0xA5, 0xD6, 0x28, 0xDB, 0x04, 0xC1, 0x00, 0x00) + +// CDA42200-BD88-11d0-BD4E-00A0C911CE86 +OUR_GUID_ENTRY(CLSID_FilterMapper2, +0xcda42200, 0xbd88, 0x11d0, 0xbd, 0x4e, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86) + + +// 1e651cc0-b199-11d0-8212-00c04fc32c45 +OUR_GUID_ENTRY(CLSID_MemoryAllocator, +0x1e651cc0, 0xb199, 0x11d0, 0x82, 0x12, 0x00, 0xc0, 0x4f, 0xc3, 0x2c, 0x45) + +// CDBD8D00-C193-11d0-BD4E-00A0C911CE86 +OUR_GUID_ENTRY(CLSID_MediaPropertyBag, +0xcdbd8d00, 0xc193, 0x11d0, 0xbd, 0x4e, 0x0, 0xa0, 0xc9, 0x11, 0xce, 0x86) + +// FCC152B7-F372-11d0-8E00-00C04FD7C08B +OUR_GUID_ENTRY(CLSID_DvdGraphBuilder, +0xFCC152B7, 0xF372, 0x11d0, 0x8E, 0x00, 0x00, 0xC0, 0x4F, 0xD7, 0xC0, 0x8B) + +// 9B8C4620-2C1A-11d0-8493-00A02438AD48 +OUR_GUID_ENTRY(CLSID_DVDNavigator, +0x9b8c4620, 0x2c1a, 0x11d0, 0x84, 0x93, 0x0, 0xa0, 0x24, 0x38, 0xad, 0x48) + +// f963c5cf-a659-4a93-9638-caf3cd277d13 +OUR_GUID_ENTRY(CLSID_DVDState, +0xf963c5cf, 0xa659, 0x4a93, 0x96, 0x38, 0xca, 0xf3, 0xcd, 0x27, 0x7d, 0x13) + +// CC58E280-8AA1-11d1-B3F1-00AA003761C5 +OUR_GUID_ENTRY(CLSID_SmartTee, +0xcc58e280, 0x8aa1, 0x11d1, 0xb3, 0xf1, 0x0, 0xaa, 0x0, 0x37, 0x61, 0xc5) + +// -- format types --- + +// 0F6417D6-C318-11D0-A43F-00A0C9223196 FORMAT_None +OUR_GUID_ENTRY(FORMAT_None, +0x0F6417D6, 0xc318, 0x11d0, 0xa4, 0x3f, 0x00, 0xa0, 0xc9, 0x22, 0x31, 0x96) + +// 05589f80-c356-11ce-bf01-00aa0055595a FORMAT_VideoInfo +OUR_GUID_ENTRY(FORMAT_VideoInfo, +0x05589f80, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a) + +// F72A76A0-EB0A-11d0-ACE4-0000C0CC16BA FORMAT_VideoInfo2 +OUR_GUID_ENTRY(FORMAT_VideoInfo2, +0xf72a76A0, 0xeb0a, 0x11d0, 0xac, 0xe4, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba) + +// 05589f81-c356-11ce-bf01-00aa0055595a FORMAT_WaveFormatEx +OUR_GUID_ENTRY(FORMAT_WaveFormatEx, +0x05589f81, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a) + +// 05589f82-c356-11ce-bf01-00aa0055595a FORMAT_MPEGVideo +OUR_GUID_ENTRY(FORMAT_MPEGVideo, +0x05589f82, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a) + +// 05589f83-c356-11ce-bf01-00aa0055595a FORMAT_MPEGStreams +OUR_GUID_ENTRY(FORMAT_MPEGStreams, +0x05589f83, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a) + +// 05589f84-c356-11ce-bf01-00aa0055595a FORMAT_DvInfo, DVINFO +OUR_GUID_ENTRY(FORMAT_DvInfo, +0x05589f84, 0xc356, 0x11ce, 0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a) + + +// -- Video related GUIDs --- + + +// 944d4c00-dd52-11ce-bf0e-00aa0055595a +OUR_GUID_ENTRY(CLSID_DirectDrawProperties, +0x944d4c00, 0xdd52, 0x11ce, 0xbf, 0x0e, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a) + +// 59ce6880-acf8-11cf-b56e-0080c7c4b68a +OUR_GUID_ENTRY(CLSID_PerformanceProperties, +0x59ce6880, 0xacf8, 0x11cf, 0xb5, 0x6e, 0x00, 0x80, 0xc7, 0xc4, 0xb6, 0x8a) + +// 418afb70-f8b8-11ce-aac6-0020af0b99a3 +OUR_GUID_ENTRY(CLSID_QualityProperties, +0x418afb70, 0xf8b8, 0x11ce, 0xaa, 0xc6, 0x00, 0x20, 0xaf, 0x0b, 0x99, 0xa3) + +// 61ded640-e912-11ce-a099-00aa00479a58 +OUR_GUID_ENTRY(IID_IBaseVideoMixer, +0x61ded640, 0xe912, 0x11ce, 0xa0, 0x99, 0x00, 0xaa, 0x00, 0x47, 0x9a, 0x58) + +// 36d39eb0-dd75-11ce-bf0e-00aa0055595a +OUR_GUID_ENTRY(IID_IDirectDrawVideo, +0x36d39eb0, 0xdd75, 0x11ce, 0xbf, 0x0e, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a) + +// bd0ecb0-f8e2-11ce-aac6-0020af0b99a3 +OUR_GUID_ENTRY(IID_IQualProp, +0x1bd0ecb0, 0xf8e2, 0x11ce, 0xaa, 0xc6, 0x00, 0x20, 0xaf, 0x0b, 0x99, 0xa3) + +// {CE292861-FC88-11d0-9E69-00C04FD7C15B} +OUR_GUID_ENTRY(CLSID_VPObject, +0xce292861, 0xfc88, 0x11d0, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b) + +// {CE292862-FC88-11d0-9E69-00C04FD7C15B} +OUR_GUID_ENTRY(IID_IVPObject, +0xce292862, 0xfc88, 0x11d0, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b) + +// {25DF12C1-3DE0-11d1-9E69-00C04FD7C15B} +OUR_GUID_ENTRY(IID_IVPControl, +0x25df12c1, 0x3de0, 0x11d1, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b) + +// {814B9801-1C88-11d1-BAD9-00609744111A} +OUR_GUID_ENTRY(CLSID_VPVBIObject, +0x814b9801, 0x1c88, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a) + +// {814B9802-1C88-11d1-BAD9-00609744111A} +OUR_GUID_ENTRY(IID_IVPVBIObject, +0x814b9802, 0x1c88, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a) + +// {BC29A660-30E3-11d0-9E69-00C04FD7C15B} +OUR_GUID_ENTRY(IID_IVPConfig, +0xbc29a660, 0x30e3, 0x11d0, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b) + +// {C76794A1-D6C5-11d0-9E69-00C04FD7C15B} +OUR_GUID_ENTRY(IID_IVPNotify, +0xc76794a1, 0xd6c5, 0x11d0, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b) + +// {EBF47183-8764-11d1-9E69-00C04FD7C15B} +OUR_GUID_ENTRY(IID_IVPNotify2, +0xebf47183, 0x8764, 0x11d1, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b) + + +// {EC529B00-1A1F-11D1-BAD9-00609744111A} +OUR_GUID_ENTRY(IID_IVPVBIConfig, +0xec529b00, 0x1a1f, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a) + +// {EC529B01-1A1F-11D1-BAD9-00609744111A} +OUR_GUID_ENTRY(IID_IVPVBINotify, +0xec529b01, 0x1a1f, 0x11d1, 0xba, 0xd9, 0x0, 0x60, 0x97, 0x44, 0x11, 0x1a) + +// {593CDDE1-0759-11d1-9E69-00C04FD7C15B} +OUR_GUID_ENTRY(IID_IMixerPinConfig, +0x593cdde1, 0x759, 0x11d1, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b) + +// {EBF47182-8764-11d1-9E69-00C04FD7C15B} +OUR_GUID_ENTRY(IID_IMixerPinConfig2, +0xebf47182, 0x8764, 0x11d1, 0x9e, 0x69, 0x0, 0xc0, 0x4f, 0xd7, 0xc1, 0x5b) + + +// This is a real pain in the neck. The OLE GUIDs are separated out into a +// different file from the main header files. The header files can then be +// included multiple times and are protected with the following statements, +// +// #ifndef __SOMETHING_DEFINED__ +// #define __SOMETHING_DEFINED__ +// all the header contents +// #endif // __SOMETHING_DEFINED__ +// +// When the actual GUIDs are to be defined (using initguid) the GUID header +// file can then be included to really define them just once. Unfortunately +// DirectDraw has the GUIDs defined in the main header file. So if the base +// classes bring in ddraw.h to get at the DirectDraw structures and so on +// nobody would then be able to really include ddraw.h to allocate the GUID +// memory structures because of the aforementioned header file protection +// Therefore the DirectDraw GUIDs are defined and allocated for real here + +#ifndef __DDRAW_INCLUDED__ +OUR_GUID_ENTRY(CLSID_DirectDraw, 0xD7B70EE0,0x4340,0x11CF,0xB0,0x63,0x00,0x20,0xAF,0xC2,0xCD,0x35) +OUR_GUID_ENTRY(CLSID_DirectDrawClipper, 0x593817A0,0x7DB3,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xb9,0x33,0x56) +OUR_GUID_ENTRY(IID_IDirectDraw, 0x6C14DB80,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60) +OUR_GUID_ENTRY(IID_IDirectDraw2, 0xB3A6F3E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56) +OUR_GUID_ENTRY(IID_IDirectDrawSurface, 0x6C14DB81,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60) +OUR_GUID_ENTRY(IID_IDirectDrawSurface2, 0x57805885,0x6eec,0x11cf,0x94,0x41,0xa8,0x23,0x03,0xc1,0x0e,0x27) +OUR_GUID_ENTRY(IID_IDirectDrawSurface3, 0xDA044E00,0x69B2,0x11D0,0xA1,0xD5,0x00,0xAA,0x00,0xB8,0xDF,0xBB) +OUR_GUID_ENTRY(IID_IDirectDrawSurface4, 0x0B2B8630,0xAD35,0x11D0,0x8E,0xA6,0x00,0x60,0x97,0x97,0xEA,0x5B) +OUR_GUID_ENTRY(IID_IDirectDrawSurface7, 0x06675a80,0x3b9b,0x11d2,0xb9,0x2f,0x00,0x60,0x97,0x97,0xea,0x5b) +OUR_GUID_ENTRY(IID_IDirectDrawPalette, 0x6C14DB84,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60) +OUR_GUID_ENTRY(IID_IDirectDrawClipper, 0x6C14DB85,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60) +OUR_GUID_ENTRY(IID_IDirectDrawColorControl, 0x4B9F0EE0,0x0D7E,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8) +#endif + +#ifndef __DVP_INCLUDED__ +OUR_GUID_ENTRY(IID_IDDVideoPortContainer, 0x6C142760,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60) +#endif + +#ifndef __DDKM_INCLUDED__ +OUR_GUID_ENTRY(IID_IDirectDrawKernel, 0x8D56C120,0x6A08,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8) +OUR_GUID_ENTRY(IID_IDirectDrawSurfaceKernel, 0x60755DA0,0x6A40,0x11D0,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8) +#endif + +// 0618aa30-6bc4-11cf-bf36-00aa0055595a +OUR_GUID_ENTRY(CLSID_ModexProperties, +0x0618aa30, 0x6bc4, 0x11cf, 0xbf, 0x36, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a) + +// dd1d7110-7836-11cf-bf47-00aa0055595a +OUR_GUID_ENTRY(IID_IFullScreenVideo, +0xdd1d7110, 0x7836, 0x11cf, 0xbf, 0x47, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a) + +// 53479470-f1dd-11cf-bc42-00aa00ac74f6 +OUR_GUID_ENTRY(IID_IFullScreenVideoEx, +0x53479470, 0xf1dd, 0x11cf, 0xbc, 0x42, 0x00, 0xaa, 0x00, 0xac, 0x74, 0xf6) + +// {101193C0-0BFE-11d0-AF91-00AA00B67A42} DV decoder property +OUR_GUID_ENTRY(CLSID_DVDecPropertiesPage, +0x101193c0, 0xbfe, 0x11d0, 0xaf, 0x91, 0x0, 0xaa, 0x0, 0xb6, 0x7a, 0x42) + +// {4150F050-BB6F-11d0-AFB9-00AA00B67A42} DV encoder property +OUR_GUID_ENTRY(CLSID_DVEncPropertiesPage, +0x4150f050, 0xbb6f, 0x11d0, 0xaf, 0xb9, 0x0, 0xaa, 0x0, 0xb6, 0x7a, 0x42) + +// {4DB880E0-C10D-11d0-AFB9-00AA00B67A42} DV Muxer property +OUR_GUID_ENTRY(CLSID_DVMuxPropertyPage, +0x4db880e0, 0xc10d, 0x11d0, 0xaf, 0xb9, 0x0, 0xaa, 0x0, 0xb6, 0x7a, 0x42) + + +// -- Direct Sound Audio related GUID --- + +// 546F4260-D53E-11cf-B3F0-00AA003761C5 +OUR_GUID_ENTRY(IID_IAMDirectSound, +0x546f4260, 0xd53e, 0x11cf, 0xb3, 0xf0, 0x0, 0xaa, 0x0, 0x37, 0x61, 0xc5) + +// -- MPEG audio decoder properties + +// {b45dd570-3c77-11d1-abe1-00a0c905f375} +OUR_GUID_ENTRY(IID_IMpegAudioDecoder, +0xb45dd570, 0x3c77, 0x11d1, 0xab, 0xe1, 0x00, 0xa0, 0xc9, 0x05, 0xf3, 0x75) + +// --- Line21 Decoder interface GUID --- + +// 6E8D4A21-310C-11d0-B79A-00AA003767A7 IID_IAMLine21Decoder +OUR_GUID_ENTRY(IID_IAMLine21Decoder, +0x6e8d4a21, 0x310c, 0x11d0, 0xb7, 0x9a, 0x0, 0xaa, 0x0, 0x37, 0x67, 0xa7) + +// -- Analog video related GUIDs --- + + +// -- format types --- +// 0482DDE0-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(FORMAT_AnalogVideo, +0x482dde0, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + + +// -- major type, Analog Video + +// 0482DDE1-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIATYPE_AnalogVideo, +0x482dde1, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + + +// -- Analog Video subtypes, NTSC + +// 0482DDE2-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_NTSC_M, +0x482dde2, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// -- Analog Video subtypes, PAL + +// 0482DDE5-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_B, +0x482dde5, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// 0482DDE6-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_D, +0x482dde6, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// 0482DDE7-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_G, +0x482dde7, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// 0482DDE8-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_H, +0x482dde8, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// 0482DDE9-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_I, +0x482dde9, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// 0482DDEA-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_M, +0x482ddea, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// 0482DDEB-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_N, +0x482ddeb, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// 0482DDEC-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_PAL_N_COMBO, +0x482ddec, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// -- Analog Video subtypes, SECAM + +// 0482DDF0-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_B, +0x482ddf0, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// 0482DDF1-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_D, +0x482ddf1, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// 0482DDF2-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_G, +0x482ddf2, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// 0482DDF3-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_H, +0x482ddf3, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// 0482DDF4-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_K, +0x482ddf4, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// 0482DDF5-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_K1, +0x482ddf5, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// 0482DDF6-7817-11cf-8A03-00AA006ECB65 +OUR_GUID_ENTRY(MEDIASUBTYPE_AnalogVideo_SECAM_L, +0x482ddf6, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + + +// -- External audio related GUIDs --- + +// -- major types, Analog Audio + +// 0482DEE1-7817-11cf-8a03-00aa006ecb65 +OUR_GUID_ENTRY(MEDIATYPE_AnalogAudio, +0x482dee1, 0x7817, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// +// DirectShow's include file based on ksmedia.h from WDM DDK +// +#include "ksuuids.h" + + +// -- Well known time format GUIDs --- + + +// 00000000-0000-0000-0000-000000000000 +OUR_GUID_ENTRY(TIME_FORMAT_NONE, +0L, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) + +// 7b785570-8c82-11cf-bc0c-00aa00ac74f6 +OUR_GUID_ENTRY(TIME_FORMAT_FRAME, +0x7b785570, 0x8c82, 0x11cf, 0xbc, 0xc, 0x0, 0xaa, 0x0, 0xac, 0x74, 0xf6) + +// 7b785571-8c82-11cf-bc0c-00aa00ac74f6 +OUR_GUID_ENTRY(TIME_FORMAT_BYTE, +0x7b785571, 0x8c82, 0x11cf, 0xbc, 0xc, 0x0, 0xaa, 0x0, 0xac, 0x74, 0xf6) + +// 7b785572-8c82-11cf-bc0c-00aa00ac74f6 +OUR_GUID_ENTRY(TIME_FORMAT_SAMPLE, +0x7b785572, 0x8c82, 0x11cf, 0xbc, 0xc, 0x0, 0xaa, 0x0, 0xac, 0x74, 0xf6) + +// 7b785573-8c82-11cf-bc0c-00aa00ac74f6 +OUR_GUID_ENTRY(TIME_FORMAT_FIELD, +0x7b785573, 0x8c82, 0x11cf, 0xbc, 0xc, 0x0, 0xaa, 0x0, 0xac, 0x74, 0xf6) + + +// 7b785574-8c82-11cf-bc0c-00aa00ac74f6 +OUR_GUID_ENTRY(TIME_FORMAT_MEDIA_TIME, +0x7b785574, 0x8c82, 0x11cf, 0xbc, 0xc, 0x0, 0xaa, 0x0, 0xac, 0x74, 0xf6) + + +// for IKsPropertySet + +// 9B00F101-1567-11d1-B3F1-00AA003761C5 +OUR_GUID_ENTRY(AMPROPSETID_Pin, +0x9b00f101, 0x1567, 0x11d1, 0xb3, 0xf1, 0x0, 0xaa, 0x0, 0x37, 0x61, 0xc5) + +// fb6c4281-0353-11d1-905f-0000c0cc16ba +OUR_GUID_ENTRY(PIN_CATEGORY_CAPTURE, +0xfb6c4281, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba) + +// fb6c4282-0353-11d1-905f-0000c0cc16ba +OUR_GUID_ENTRY(PIN_CATEGORY_PREVIEW, +0xfb6c4282, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba) + +// fb6c4283-0353-11d1-905f-0000c0cc16ba +OUR_GUID_ENTRY(PIN_CATEGORY_ANALOGVIDEOIN, +0xfb6c4283, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba) + +// fb6c4284-0353-11d1-905f-0000c0cc16ba +OUR_GUID_ENTRY(PIN_CATEGORY_VBI, +0xfb6c4284, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba) + +// fb6c4285-0353-11d1-905f-0000c0cc16ba +OUR_GUID_ENTRY(PIN_CATEGORY_VIDEOPORT, +0xfb6c4285, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba) + +// fb6c4286-0353-11d1-905f-0000c0cc16ba +OUR_GUID_ENTRY(PIN_CATEGORY_NABTS, +0xfb6c4286, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba) + +// fb6c4287-0353-11d1-905f-0000c0cc16ba +OUR_GUID_ENTRY(PIN_CATEGORY_EDS, +0xfb6c4287, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba) + +// fb6c4288-0353-11d1-905f-0000c0cc16ba +OUR_GUID_ENTRY(PIN_CATEGORY_TELETEXT, +0xfb6c4288, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba) + +// fb6c4289-0353-11d1-905f-0000c0cc16ba +OUR_GUID_ENTRY(PIN_CATEGORY_CC, +0xfb6c4289, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba) + +// fb6c428a-0353-11d1-905f-0000c0cc16ba +OUR_GUID_ENTRY(PIN_CATEGORY_STILL, +0xfb6c428a, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba) + +// fb6c428b-0353-11d1-905f-0000c0cc16ba +OUR_GUID_ENTRY(PIN_CATEGORY_TIMECODE, +0xfb6c428b, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba) + +// fb6c428c-0353-11d1-905f-0000c0cc16ba +OUR_GUID_ENTRY(PIN_CATEGORY_VIDEOPORT_VBI, +0xfb6c428c, 0x0353, 0x11d1, 0x90, 0x5f, 0x00, 0x00, 0xc0, 0xcc, 0x16, 0xba) + + +// the following special GUIDS are used by ICaptureGraphBuilder::FindInterface + +// {AC798BE0-98E3-11d1-B3F1-00AA003761C5} +OUR_GUID_ENTRY(LOOK_UPSTREAM_ONLY, +0xac798be0, 0x98e3, 0x11d1, 0xb3, 0xf1, 0x0, 0xaa, 0x0, 0x37, 0x61, 0xc5) + +// {AC798BE1-98E3-11d1-B3F1-00AA003761C5} +OUR_GUID_ENTRY(LOOK_DOWNSTREAM_ONLY, +0xac798be1, 0x98e3, 0x11d1, 0xb3, 0xf1, 0x0, 0xaa, 0x0, 0x37, 0x61, 0xc5) + +// ------------------------------------------------------------------------- +// KSProxy GUIDS +// ------------------------------------------------------------------------- + +// {266EEE41-6C63-11cf-8A03-00AA006ECB65} +OUR_GUID_ENTRY(CLSID_TVTunerFilterPropertyPage, +0x266eee41, 0x6c63, 0x11cf, 0x8a, 0x3, 0x0, 0xaa, 0x0, 0x6e, 0xcb, 0x65) + +// {71F96461-78F3-11d0-A18C-00A0C9118956} +OUR_GUID_ENTRY(CLSID_CrossbarFilterPropertyPage, +0x71f96461, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x0, 0xa0, 0xc9, 0x11, 0x89, 0x56) + +// {71F96463-78F3-11d0-A18C-00A0C9118956} +OUR_GUID_ENTRY(CLSID_TVAudioFilterPropertyPage, +0x71f96463, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x0, 0xa0, 0xc9, 0x11, 0x89, 0x56) + +// {71F96464-78F3-11d0-A18C-00A0C9118956} +OUR_GUID_ENTRY(CLSID_VideoProcAmpPropertyPage, +0x71f96464, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x0, 0xa0, 0xc9, 0x11, 0x89, 0x56) + +// {71F96465-78F3-11d0-A18C-00A0C9118956} +OUR_GUID_ENTRY(CLSID_CameraControlPropertyPage, +0x71f96465, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x0, 0xa0, 0xc9, 0x11, 0x89, 0x56) + +// {71F96466-78F3-11d0-A18C-00A0C9118956} +OUR_GUID_ENTRY(CLSID_AnalogVideoDecoderPropertyPage, +0x71f96466, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x0, 0xa0, 0xc9, 0x11, 0x89, 0x56) + +// {71F96467-78F3-11d0-A18C-00A0C9118956} +OUR_GUID_ENTRY(CLSID_VideoStreamConfigPropertyPage, +0x71f96467, 0x78f3, 0x11d0, 0xa1, 0x8c, 0x0, 0xa0, 0xc9, 0x11, 0x89, 0x56) + +// {37E92A92-D9AA-11d2-BF84-8EF2B1555AED} Audio Renderer Advanced Property Page +OUR_GUID_ENTRY(CLSID_AudioRendererAdvancedProperties, +0x37e92a92, 0xd9aa, 0x11d2, 0xbf, 0x84, 0x8e, 0xf2, 0xb1, 0x55, 0x5a, 0xed) + + +// ------------------------------------------------------------------------- +// VMRender GUIDS +// ------------------------------------------------------------------------- + +// {B87BEB7B-8D29-423f-AE4D-6582C10175AC} +OUR_GUID_ENTRY(CLSID_VideoMixingRenderer, +0xB87BEB7B, 0x8D29, 0x423f, 0xAE, 0x4D, 0x65, 0x82, 0xC1, 0x01, 0x75, 0xAC) + + +// ------------------------------------------------------------------------- +// BDA Network Provider GUIDS +// ------------------------------------------------------------------------- + +// {0DAD2FDD-5FD7-11D3-8F50-00C04F7971E2} +OUR_GUID_ENTRY(CLSID_ATSCNetworkProvider, +0x0dad2fdd, 0x5fd7, 0x11d3, 0x8f, 0x50, 0x00, 0xc0, 0x4f, 0x79, 0x71, 0xe2) + +// {E3444D16-5AC4-4386-88DF-13FD230E1DDA} +OUR_GUID_ENTRY(CLSID_ATSCNetworkPropertyPage, +0xe3444d16, 0x5ac4, 0x4386, 0x88, 0xdf, 0x13, 0xfd, 0x23, 0x0e, 0x1d, 0xda) + +// {FA4B375A-45B4-4d45-8440-263957B11623} +OUR_GUID_ENTRY(CLSID_DVBSNetworkProvider, +0xfa4b375a, 0x45b4, 0x4d45, 0x84, 0x40, 0x26, 0x39, 0x57, 0xb1, 0x16, 0x23) + + +#undef OUR_GUID_ENTRY diff --git a/windows_libs/mssdk/include/vfwmsgs.h b/windows_libs/mssdk/include/vfwmsgs.h new file mode 100644 index 00000000..10195b73 --- /dev/null +++ b/windows_libs/mssdk/include/vfwmsgs.h @@ -0,0 +1,1316 @@ + // no longer used - but might get + // our own facility in the future? + // FacilityNames=(FACILITY_VFW=0x4) + // To add a message: + // + // The MessageId is the number of the message. + // Accepted severities are 'Success' and 'Warning'. + // + // Facility should be FACILITY_ITF (was FACILITY_VFW). + // + // The SymbolicName is the name used in the code to identify the message. + // The text of a message starts the line after 'Language=' and + // ends before a line with only a '.' in column one. +// +// Values are 32 bit values layed out as follows: +// +// 3 3 2 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 +// 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 +// +---+-+-+-----------------------+-------------------------------+ +// |Sev|C|R| Facility | Code | +// +---+-+-+-----------------------+-------------------------------+ +// +// where +// +// Sev - is the severity code +// +// 00 - Success +// 01 - Informational +// 10 - Warning +// 11 - Error +// +// C - is the Customer code flag +// +// R - is a reserved bit +// +// Facility - is the facility code +// +// Code - is the facility's status code +// +// +// Define the facility codes +// + + +// +// Define the severity codes +// + + +// +// MessageId: VFW_E_INVALIDMEDIATYPE +// +// MessageText: +// +// An invalid media type was specified.%0 +// +#define VFW_E_INVALIDMEDIATYPE ((HRESULT)0x80040200L) + +// +// MessageId: VFW_E_INVALIDSUBTYPE +// +// MessageText: +// +// An invalid media subtype was specified.%0 +// +#define VFW_E_INVALIDSUBTYPE ((HRESULT)0x80040201L) + +// +// MessageId: VFW_E_NEED_OWNER +// +// MessageText: +// +// This object can only be created as an aggregated object.%0 +// +#define VFW_E_NEED_OWNER ((HRESULT)0x80040202L) + +// +// MessageId: VFW_E_ENUM_OUT_OF_SYNC +// +// MessageText: +// +// The enumerator has become invalid.%0 +// +#define VFW_E_ENUM_OUT_OF_SYNC ((HRESULT)0x80040203L) + +// +// MessageId: VFW_E_ALREADY_CONNECTED +// +// MessageText: +// +// At least one of the pins involved in the operation is already connected.%0 +// +#define VFW_E_ALREADY_CONNECTED ((HRESULT)0x80040204L) + +// +// MessageId: VFW_E_FILTER_ACTIVE +// +// MessageText: +// +// This operation cannot be performed because the filter is active.%0 +// +#define VFW_E_FILTER_ACTIVE ((HRESULT)0x80040205L) + +// +// MessageId: VFW_E_NO_TYPES +// +// MessageText: +// +// One of the specified pins supports no media types.%0 +// +#define VFW_E_NO_TYPES ((HRESULT)0x80040206L) + +// +// MessageId: VFW_E_NO_ACCEPTABLE_TYPES +// +// MessageText: +// +// There is no common media type between these pins.%0 +// +#define VFW_E_NO_ACCEPTABLE_TYPES ((HRESULT)0x80040207L) + +// +// MessageId: VFW_E_INVALID_DIRECTION +// +// MessageText: +// +// Two pins of the same direction cannot be connected together.%0 +// +#define VFW_E_INVALID_DIRECTION ((HRESULT)0x80040208L) + +// +// MessageId: VFW_E_NOT_CONNECTED +// +// MessageText: +// +// The operation cannot be performed because the pins are not connected.%0 +// +#define VFW_E_NOT_CONNECTED ((HRESULT)0x80040209L) + +// +// MessageId: VFW_E_NO_ALLOCATOR +// +// MessageText: +// +// No sample buffer allocator is available.%0 +// +#define VFW_E_NO_ALLOCATOR ((HRESULT)0x8004020AL) + +// +// MessageId: VFW_E_RUNTIME_ERROR +// +// MessageText: +// +// A run-time error occurred.%0 +// +#define VFW_E_RUNTIME_ERROR ((HRESULT)0x8004020BL) + +// +// MessageId: VFW_E_BUFFER_NOTSET +// +// MessageText: +// +// No buffer space has been set.%0 +// +#define VFW_E_BUFFER_NOTSET ((HRESULT)0x8004020CL) + +// +// MessageId: VFW_E_BUFFER_OVERFLOW +// +// MessageText: +// +// The buffer is not big enough.%0 +// +#define VFW_E_BUFFER_OVERFLOW ((HRESULT)0x8004020DL) + +// +// MessageId: VFW_E_BADALIGN +// +// MessageText: +// +// An invalid alignment was specified.%0 +// +#define VFW_E_BADALIGN ((HRESULT)0x8004020EL) + +// +// MessageId: VFW_E_ALREADY_COMMITTED +// +// MessageText: +// +// Cannot change allocated memory while the filter is active.%0 +// +#define VFW_E_ALREADY_COMMITTED ((HRESULT)0x8004020FL) + +// +// MessageId: VFW_E_BUFFERS_OUTSTANDING +// +// MessageText: +// +// One or more buffers are still active.%0 +// +#define VFW_E_BUFFERS_OUTSTANDING ((HRESULT)0x80040210L) + +// +// MessageId: VFW_E_NOT_COMMITTED +// +// MessageText: +// +// Cannot allocate a sample when the allocator is not active.%0 +// +#define VFW_E_NOT_COMMITTED ((HRESULT)0x80040211L) + +// +// MessageId: VFW_E_SIZENOTSET +// +// MessageText: +// +// Cannot allocate memory because no size has been set.%0 +// +#define VFW_E_SIZENOTSET ((HRESULT)0x80040212L) + +// +// MessageId: VFW_E_NO_CLOCK +// +// MessageText: +// +// Cannot lock for synchronization because no clock has been defined.%0 +// +#define VFW_E_NO_CLOCK ((HRESULT)0x80040213L) + +// +// MessageId: VFW_E_NO_SINK +// +// MessageText: +// +// Quality messages could not be sent because no quality sink has been defined.%0 +// +#define VFW_E_NO_SINK ((HRESULT)0x80040214L) + +// +// MessageId: VFW_E_NO_INTERFACE +// +// MessageText: +// +// A required interface has not been implemented.%0 +// +#define VFW_E_NO_INTERFACE ((HRESULT)0x80040215L) + +// +// MessageId: VFW_E_NOT_FOUND +// +// MessageText: +// +// An object or name was not found.%0 +// +#define VFW_E_NOT_FOUND ((HRESULT)0x80040216L) + +// +// MessageId: VFW_E_CANNOT_CONNECT +// +// MessageText: +// +// No combination of intermediate filters could be found to make the connection.%0 +// +#define VFW_E_CANNOT_CONNECT ((HRESULT)0x80040217L) + +// +// MessageId: VFW_E_CANNOT_RENDER +// +// MessageText: +// +// No combination of filters could be found to render the stream.%0 +// +#define VFW_E_CANNOT_RENDER ((HRESULT)0x80040218L) + +// +// MessageId: VFW_E_CHANGING_FORMAT +// +// MessageText: +// +// Could not change formats dynamically.%0 +// +#define VFW_E_CHANGING_FORMAT ((HRESULT)0x80040219L) + +// +// MessageId: VFW_E_NO_COLOR_KEY_SET +// +// MessageText: +// +// No color key has been set.%0 +// +#define VFW_E_NO_COLOR_KEY_SET ((HRESULT)0x8004021AL) + +// +// MessageId: VFW_E_NOT_OVERLAY_CONNECTION +// +// MessageText: +// +// Current pin connection is not using the IOverlay transport.%0 +// +#define VFW_E_NOT_OVERLAY_CONNECTION ((HRESULT)0x8004021BL) + +// +// MessageId: VFW_E_NOT_SAMPLE_CONNECTION +// +// MessageText: +// +// Current pin connection is not using the IMemInputPin transport.%0 +// +#define VFW_E_NOT_SAMPLE_CONNECTION ((HRESULT)0x8004021CL) + +// +// MessageId: VFW_E_PALETTE_SET +// +// MessageText: +// +// Setting a color key would conflict with the palette already set.%0 +// +#define VFW_E_PALETTE_SET ((HRESULT)0x8004021DL) + +// +// MessageId: VFW_E_COLOR_KEY_SET +// +// MessageText: +// +// Setting a palette would conflict with the color key already set.%0 +// +#define VFW_E_COLOR_KEY_SET ((HRESULT)0x8004021EL) + +// +// MessageId: VFW_E_NO_COLOR_KEY_FOUND +// +// MessageText: +// +// No matching color key is available.%0 +// +#define VFW_E_NO_COLOR_KEY_FOUND ((HRESULT)0x8004021FL) + +// +// MessageId: VFW_E_NO_PALETTE_AVAILABLE +// +// MessageText: +// +// No palette is available.%0 +// +#define VFW_E_NO_PALETTE_AVAILABLE ((HRESULT)0x80040220L) + +// +// MessageId: VFW_E_NO_DISPLAY_PALETTE +// +// MessageText: +// +// Display does not use a palette.%0 +// +#define VFW_E_NO_DISPLAY_PALETTE ((HRESULT)0x80040221L) + +// +// MessageId: VFW_E_TOO_MANY_COLORS +// +// MessageText: +// +// Too many colors for the current display settings.%0 +// +#define VFW_E_TOO_MANY_COLORS ((HRESULT)0x80040222L) + +// +// MessageId: VFW_E_STATE_CHANGED +// +// MessageText: +// +// The state changed while waiting to process the sample.%0 +// +#define VFW_E_STATE_CHANGED ((HRESULT)0x80040223L) + +// +// MessageId: VFW_E_NOT_STOPPED +// +// MessageText: +// +// The operation could not be performed because the filter is not stopped.%0 +// +#define VFW_E_NOT_STOPPED ((HRESULT)0x80040224L) + +// +// MessageId: VFW_E_NOT_PAUSED +// +// MessageText: +// +// The operation could not be performed because the filter is not paused.%0 +// +#define VFW_E_NOT_PAUSED ((HRESULT)0x80040225L) + +// +// MessageId: VFW_E_NOT_RUNNING +// +// MessageText: +// +// The operation could not be performed because the filter is not running.%0 +// +#define VFW_E_NOT_RUNNING ((HRESULT)0x80040226L) + +// +// MessageId: VFW_E_WRONG_STATE +// +// MessageText: +// +// The operation could not be performed because the filter is in the wrong state.%0 +// +#define VFW_E_WRONG_STATE ((HRESULT)0x80040227L) + +// +// MessageId: VFW_E_START_TIME_AFTER_END +// +// MessageText: +// +// The sample start time is after the sample end time.%0 +// +#define VFW_E_START_TIME_AFTER_END ((HRESULT)0x80040228L) + +// +// MessageId: VFW_E_INVALID_RECT +// +// MessageText: +// +// The supplied rectangle is invalid.%0 +// +#define VFW_E_INVALID_RECT ((HRESULT)0x80040229L) + +// +// MessageId: VFW_E_TYPE_NOT_ACCEPTED +// +// MessageText: +// +// This pin cannot use the supplied media type.%0 +// +#define VFW_E_TYPE_NOT_ACCEPTED ((HRESULT)0x8004022AL) + +// +// MessageId: VFW_E_SAMPLE_REJECTED +// +// MessageText: +// +// This sample cannot be rendered.%0 +// +#define VFW_E_SAMPLE_REJECTED ((HRESULT)0x8004022BL) + +// +// MessageId: VFW_E_SAMPLE_REJECTED_EOS +// +// MessageText: +// +// This sample cannot be rendered because the end of the stream has been reached.%0 +// +#define VFW_E_SAMPLE_REJECTED_EOS ((HRESULT)0x8004022CL) + +// +// MessageId: VFW_E_DUPLICATE_NAME +// +// MessageText: +// +// An attempt to add a filter with a duplicate name failed.%0 +// +#define VFW_E_DUPLICATE_NAME ((HRESULT)0x8004022DL) + +// +// MessageId: VFW_S_DUPLICATE_NAME +// +// MessageText: +// +// An attempt to add a filter with a duplicate name succeeded with a modified name.%0 +// +#define VFW_S_DUPLICATE_NAME ((HRESULT)0x0004022DL) + +// +// MessageId: VFW_E_TIMEOUT +// +// MessageText: +// +// A time-out has expired.%0 +// +#define VFW_E_TIMEOUT ((HRESULT)0x8004022EL) + +// +// MessageId: VFW_E_INVALID_FILE_FORMAT +// +// MessageText: +// +// The file format is invalid.%0 +// +#define VFW_E_INVALID_FILE_FORMAT ((HRESULT)0x8004022FL) + +// +// MessageId: VFW_E_ENUM_OUT_OF_RANGE +// +// MessageText: +// +// The list has already been exhausted.%0 +// +#define VFW_E_ENUM_OUT_OF_RANGE ((HRESULT)0x80040230L) + +// +// MessageId: VFW_E_CIRCULAR_GRAPH +// +// MessageText: +// +// The filter graph is circular.%0 +// +#define VFW_E_CIRCULAR_GRAPH ((HRESULT)0x80040231L) + +// +// MessageId: VFW_E_NOT_ALLOWED_TO_SAVE +// +// MessageText: +// +// Updates are not allowed in this state.%0 +// +#define VFW_E_NOT_ALLOWED_TO_SAVE ((HRESULT)0x80040232L) + +// +// MessageId: VFW_E_TIME_ALREADY_PASSED +// +// MessageText: +// +// An attempt was made to queue a command for a time in the past.%0 +// +#define VFW_E_TIME_ALREADY_PASSED ((HRESULT)0x80040233L) + +// +// MessageId: VFW_E_ALREADY_CANCELLED +// +// MessageText: +// +// The queued command has already been canceled.%0 +// +#define VFW_E_ALREADY_CANCELLED ((HRESULT)0x80040234L) + +// +// MessageId: VFW_E_CORRUPT_GRAPH_FILE +// +// MessageText: +// +// Cannot render the file because it is corrupt.%0 +// +#define VFW_E_CORRUPT_GRAPH_FILE ((HRESULT)0x80040235L) + +// +// MessageId: VFW_E_ADVISE_ALREADY_SET +// +// MessageText: +// +// An overlay advise link already exists.%0 +// +#define VFW_E_ADVISE_ALREADY_SET ((HRESULT)0x80040236L) + +// +// MessageId: VFW_S_STATE_INTERMEDIATE +// +// MessageText: +// +// The state transition has not completed.%0 +// +#define VFW_S_STATE_INTERMEDIATE ((HRESULT)0x00040237L) + +// +// MessageId: VFW_E_NO_MODEX_AVAILABLE +// +// MessageText: +// +// No full-screen modes are available.%0 +// +#define VFW_E_NO_MODEX_AVAILABLE ((HRESULT)0x80040238L) + +// +// MessageId: VFW_E_NO_ADVISE_SET +// +// MessageText: +// +// This Advise cannot be canceled because it was not successfully set.%0 +// +#define VFW_E_NO_ADVISE_SET ((HRESULT)0x80040239L) + +// +// MessageId: VFW_E_NO_FULLSCREEN +// +// MessageText: +// +// A full-screen mode is not available.%0 +// +#define VFW_E_NO_FULLSCREEN ((HRESULT)0x8004023AL) + +// +// MessageId: VFW_E_IN_FULLSCREEN_MODE +// +// MessageText: +// +// Cannot call IVideoWindow methods while in full-screen mode.%0 +// +#define VFW_E_IN_FULLSCREEN_MODE ((HRESULT)0x8004023BL) + +// +// MessageId: VFW_E_UNKNOWN_FILE_TYPE +// +// MessageText: +// +// The media type of this file is not recognized.%0 +// +#define VFW_E_UNKNOWN_FILE_TYPE ((HRESULT)0x80040240L) + +// +// MessageId: VFW_E_CANNOT_LOAD_SOURCE_FILTER +// +// MessageText: +// +// The source filter for this file could not be loaded.%0 +// +#define VFW_E_CANNOT_LOAD_SOURCE_FILTER ((HRESULT)0x80040241L) + +// +// MessageId: VFW_S_PARTIAL_RENDER +// +// MessageText: +// +// Some of the streams in this movie are in an unsupported format.%0 +// +#define VFW_S_PARTIAL_RENDER ((HRESULT)0x00040242L) + +// +// MessageId: VFW_E_FILE_TOO_SHORT +// +// MessageText: +// +// A file appeared to be incomplete.%0 +// +#define VFW_E_FILE_TOO_SHORT ((HRESULT)0x80040243L) + +// +// MessageId: VFW_E_INVALID_FILE_VERSION +// +// MessageText: +// +// The version number of the file is invalid.%0 +// +#define VFW_E_INVALID_FILE_VERSION ((HRESULT)0x80040244L) + +// +// MessageId: VFW_S_SOME_DATA_IGNORED +// +// MessageText: +// +// The file contained some property settings that were not used.%0 +// +#define VFW_S_SOME_DATA_IGNORED ((HRESULT)0x00040245L) + +// +// MessageId: VFW_S_CONNECTIONS_DEFERRED +// +// MessageText: +// +// Some connections have failed and have been deferred.%0 +// +#define VFW_S_CONNECTIONS_DEFERRED ((HRESULT)0x00040246L) + +// +// MessageId: VFW_E_INVALID_CLSID +// +// MessageText: +// +// This file is corrupt: it contains an invalid class identifier.%0 +// +#define VFW_E_INVALID_CLSID ((HRESULT)0x80040247L) + +// +// MessageId: VFW_E_INVALID_MEDIA_TYPE +// +// MessageText: +// +// This file is corrupt: it contains an invalid media type.%0 +// +#define VFW_E_INVALID_MEDIA_TYPE ((HRESULT)0x80040248L) + + // Message id from WINWarning.H +// +// MessageId: VFW_E_BAD_KEY +// +// MessageText: +// +// A registry entry is corrupt.%0 +// +#define VFW_E_BAD_KEY ((HRESULT)0x800403F2L) + + // Message id from WINWarning.H +// +// MessageId: VFW_S_NO_MORE_ITEMS +// +// MessageText: +// +// The end of the list has been reached.%0 +// +#define VFW_S_NO_MORE_ITEMS ((HRESULT)0x00040103L) + +// +// MessageId: VFW_E_SAMPLE_TIME_NOT_SET +// +// MessageText: +// +// No time stamp has been set for this sample.%0 +// +#define VFW_E_SAMPLE_TIME_NOT_SET ((HRESULT)0x80040249L) + +// +// MessageId: VFW_S_RESOURCE_NOT_NEEDED +// +// MessageText: +// +// The resource specified is no longer needed.%0 +// +#define VFW_S_RESOURCE_NOT_NEEDED ((HRESULT)0x00040250L) + +// +// MessageId: VFW_E_MEDIA_TIME_NOT_SET +// +// MessageText: +// +// No media time stamp has been set for this sample.%0 +// +#define VFW_E_MEDIA_TIME_NOT_SET ((HRESULT)0x80040251L) + +// +// MessageId: VFW_E_NO_TIME_FORMAT_SET +// +// MessageText: +// +// No media time format has been selected.%0 +// +#define VFW_E_NO_TIME_FORMAT_SET ((HRESULT)0x80040252L) + +// +// MessageId: VFW_E_MONO_AUDIO_HW +// +// MessageText: +// +// Cannot change balance because audio device is mono only.%0 +// +#define VFW_E_MONO_AUDIO_HW ((HRESULT)0x80040253L) + +// +// MessageId: VFW_S_MEDIA_TYPE_IGNORED +// +// MessageText: +// +// A connection could not be made with the media type in the persistent graph,%0 +// but has been made with a negotiated media type.%0 +// +#define VFW_S_MEDIA_TYPE_IGNORED ((HRESULT)0x00040254L) + +// +// MessageId: VFW_E_NO_DECOMPRESSOR +// +// MessageText: +// +// Cannot play back the video stream: no suitable decompressor could be found.%0 +// +#define VFW_E_NO_DECOMPRESSOR ((HRESULT)0x80040255L) + +// +// MessageId: VFW_E_NO_AUDIO_HARDWARE +// +// MessageText: +// +// Cannot play back the audio stream: no audio hardware is available, or the hardware is not responding.%0 +// +#define VFW_E_NO_AUDIO_HARDWARE ((HRESULT)0x80040256L) + +// +// MessageId: VFW_S_VIDEO_NOT_RENDERED +// +// MessageText: +// +// Cannot play back the video stream: no suitable decompressor could be found.%0 +// +#define VFW_S_VIDEO_NOT_RENDERED ((HRESULT)0x00040257L) + +// +// MessageId: VFW_S_AUDIO_NOT_RENDERED +// +// MessageText: +// +// Cannot play back the audio stream: no audio hardware is available.%0 +// +#define VFW_S_AUDIO_NOT_RENDERED ((HRESULT)0x00040258L) + +// +// MessageId: VFW_E_RPZA +// +// MessageText: +// +// Cannot play back the video stream: format 'RPZA' is not supported.%0 +// +#define VFW_E_RPZA ((HRESULT)0x80040259L) + +// +// MessageId: VFW_S_RPZA +// +// MessageText: +// +// Cannot play back the video stream: format 'RPZA' is not supported.%0 +// +#define VFW_S_RPZA ((HRESULT)0x0004025AL) + +// +// MessageId: VFW_E_PROCESSOR_NOT_SUITABLE +// +// MessageText: +// +// ActiveMovie cannot play MPEG movies on this processor.%0 +// +#define VFW_E_PROCESSOR_NOT_SUITABLE ((HRESULT)0x8004025BL) + +// +// MessageId: VFW_E_UNSUPPORTED_AUDIO +// +// MessageText: +// +// Cannot play back the audio stream: the audio format is not supported.%0 +// +#define VFW_E_UNSUPPORTED_AUDIO ((HRESULT)0x8004025CL) + +// +// MessageId: VFW_E_UNSUPPORTED_VIDEO +// +// MessageText: +// +// Cannot play back the video stream: the video format is not supported.%0 +// +#define VFW_E_UNSUPPORTED_VIDEO ((HRESULT)0x8004025DL) + +// +// MessageId: VFW_E_MPEG_NOT_CONSTRAINED +// +// MessageText: +// +// ActiveMovie cannot play this video stream because it falls outside the constrained standard.%0 +// +#define VFW_E_MPEG_NOT_CONSTRAINED ((HRESULT)0x8004025EL) + +// +// MessageId: VFW_E_NOT_IN_GRAPH +// +// MessageText: +// +// Cannot perform the requested function on an object that is not in the filter graph.%0 +// +#define VFW_E_NOT_IN_GRAPH ((HRESULT)0x8004025FL) + +// +// MessageId: VFW_S_ESTIMATED +// +// MessageText: +// +// The value returned had to be estimated. It's accuracy can not be guaranteed.%0 +// +#define VFW_S_ESTIMATED ((HRESULT)0x00040260L) + +// +// MessageId: VFW_E_NO_TIME_FORMAT +// +// MessageText: +// +// Cannot get or set time related information on an object that is using a time format of TIME_FORMAT_NONE.%0 +// +#define VFW_E_NO_TIME_FORMAT ((HRESULT)0x80040261L) + +// +// MessageId: VFW_E_READ_ONLY +// +// MessageText: +// +// The connection cannot be made because the stream is read only and the filter alters the data.%0 +// +#define VFW_E_READ_ONLY ((HRESULT)0x80040262L) + +// +// MessageId: VFW_S_RESERVED +// +// MessageText: +// +// This success code is reserved for internal purposes within ActiveMovie.%0 +// +#define VFW_S_RESERVED ((HRESULT)0x00040263L) + +// +// MessageId: VFW_E_BUFFER_UNDERFLOW +// +// MessageText: +// +// The buffer is not full enough.%0 +// +#define VFW_E_BUFFER_UNDERFLOW ((HRESULT)0x80040264L) + +// +// MessageId: VFW_E_UNSUPPORTED_STREAM +// +// MessageText: +// +// Cannot play back the file. The format is not supported.%0 +// +#define VFW_E_UNSUPPORTED_STREAM ((HRESULT)0x80040265L) + +// +// MessageId: VFW_E_NO_TRANSPORT +// +// MessageText: +// +// Pins cannot connect due to not supporting the same transport.%0 +// +#define VFW_E_NO_TRANSPORT ((HRESULT)0x80040266L) + +// +// MessageId: VFW_S_STREAM_OFF +// +// MessageText: +// +// The stream has been turned off.%0 +// +#define VFW_S_STREAM_OFF ((HRESULT)0x00040267L) + +// +// MessageId: VFW_S_CANT_CUE +// +// MessageText: +// +// The graph can't be cued because of lack of or corrupt data.%0 +// +#define VFW_S_CANT_CUE ((HRESULT)0x00040268L) + +// +// MessageId: VFW_E_BAD_VIDEOCD +// +// MessageText: +// +// The Video CD can't be read correctly by the device or is the data is corrupt.%0 +// +#define VFW_E_BAD_VIDEOCD ((HRESULT)0x80040269L) + +// +// MessageId: VFW_S_NO_STOP_TIME +// +// MessageText: +// +// The stop time for the sample was not set.%0 +// +#define VFW_S_NO_STOP_TIME ((HRESULT)0x00040270L) + +// +// MessageId: VFW_E_OUT_OF_VIDEO_MEMORY +// +// MessageText: +// +// There is not enough Video Memory at this display resolution and number of colors. Reducing resolution might help.%0 +// +#define VFW_E_OUT_OF_VIDEO_MEMORY ((HRESULT)0x80040271L) + +// +// MessageId: VFW_E_VP_NEGOTIATION_FAILED +// +// MessageText: +// +// The VideoPort connection negotiation process has failed.%0 +// +#define VFW_E_VP_NEGOTIATION_FAILED ((HRESULT)0x80040272L) + +// +// MessageId: VFW_E_DDRAW_CAPS_NOT_SUITABLE +// +// MessageText: +// +// Either DirectDraw has not been installed or the Video Card capabilities are not suitable. Make sure the display is not in 16 color mode.%0 +// +#define VFW_E_DDRAW_CAPS_NOT_SUITABLE ((HRESULT)0x80040273L) + +// +// MessageId: VFW_E_NO_VP_HARDWARE +// +// MessageText: +// +// No VideoPort hardware is available, or the hardware is not responding.%0 +// +#define VFW_E_NO_VP_HARDWARE ((HRESULT)0x80040274L) + +// +// MessageId: VFW_E_NO_CAPTURE_HARDWARE +// +// MessageText: +// +// No Capture hardware is available, or the hardware is not responding.%0 +// +#define VFW_E_NO_CAPTURE_HARDWARE ((HRESULT)0x80040275L) + +// +// MessageId: VFW_E_DVD_OPERATION_INHIBITED +// +// MessageText: +// +// This User Operation is inhibited by DVD Content at this time.%0 +// +#define VFW_E_DVD_OPERATION_INHIBITED ((HRESULT)0x80040276L) + +// +// MessageId: VFW_E_DVD_INVALIDDOMAIN +// +// MessageText: +// +// This Operation is not permitted in the current domain.%0 +// +#define VFW_E_DVD_INVALIDDOMAIN ((HRESULT)0x80040277L) + +// +// MessageId: VFW_E_DVD_NO_BUTTON +// +// MessageText: +// +// The specified button is invalid or is not present at the current time, or there is no button present at the specified location.%0 +// +#define VFW_E_DVD_NO_BUTTON ((HRESULT)0x80040278L) + +// +// MessageId: VFW_E_DVD_GRAPHNOTREADY +// +// MessageText: +// +// DVD-Video playback graph has not been built yet.%0 +// +#define VFW_E_DVD_GRAPHNOTREADY ((HRESULT)0x80040279L) + +// +// MessageId: VFW_E_DVD_RENDERFAIL +// +// MessageText: +// +// DVD-Video playback graph building failed.%0 +// +#define VFW_E_DVD_RENDERFAIL ((HRESULT)0x8004027AL) + +// +// MessageId: VFW_E_DVD_DECNOTENOUGH +// +// MessageText: +// +// DVD-Video playback graph could not be built due to insufficient decoders.%0 +// +#define VFW_E_DVD_DECNOTENOUGH ((HRESULT)0x8004027BL) + +// +// MessageId: VFW_E_DDRAW_VERSION_NOT_SUITABLE +// +// MessageText: +// +// Version number of DirectDraw not suitable. Make sure to install dx5 or higher version.%0 +// +#define VFW_E_DDRAW_VERSION_NOT_SUITABLE ((HRESULT)0x8004027CL) + +// +// MessageId: VFW_E_COPYPROT_FAILED +// +// MessageText: +// +// Copy protection cannot be enabled. Please make sure any other copy protected content is not being shown now.%0 +// +#define VFW_E_COPYPROT_FAILED ((HRESULT)0x8004027DL) + +// +// MessageId: VFW_S_NOPREVIEWPIN +// +// MessageText: +// +// There was no preview pin available, so the capture pin output is being split to provide both capture and preview.%0 +// +#define VFW_S_NOPREVIEWPIN ((HRESULT)0x0004027EL) + +// +// MessageId: VFW_E_TIME_EXPIRED +// +// MessageText: +// +// This object cannot be used anymore as its time has expired.%0 +// +#define VFW_E_TIME_EXPIRED ((HRESULT)0x8004027FL) + +// +// MessageId: VFW_S_DVD_NON_ONE_SEQUENTIAL +// +// MessageText: +// +// The current title was not a sequential set of chapters (PGC), and the returned timing information might not be continuous.%0 +// +#define VFW_S_DVD_NON_ONE_SEQUENTIAL ((HRESULT)0x00040280L) + +// +// MessageId: VFW_E_DVD_WRONG_SPEED +// +// MessageText: +// +// The operation cannot be performed at the current playback speed.%0 +// +#define VFW_E_DVD_WRONG_SPEED ((HRESULT)0x80040281L) + +// +// MessageId: VFW_E_DVD_MENU_DOES_NOT_EXIST +// +// MessageText: +// +// The specified menu doesn't exist.%0 +// +#define VFW_E_DVD_MENU_DOES_NOT_EXIST ((HRESULT)0x80040282L) + +// +// MessageId: VFW_E_DVD_CMD_CANCELLED +// +// MessageText: +// +// The specified command was either cancelled or no longer exists.%0 +// +#define VFW_E_DVD_CMD_CANCELLED ((HRESULT)0x80040283L) + +// +// MessageId: VFW_E_DVD_STATE_WRONG_VERSION +// +// MessageText: +// +// The data did not contain a recognized version.%0 +// +#define VFW_E_DVD_STATE_WRONG_VERSION ((HRESULT)0x80040284L) + +// +// MessageId: VFW_E_DVD_STATE_CORRUPT +// +// MessageText: +// +// The state data was corrupt.%0 +// +#define VFW_E_DVD_STATE_CORRUPT ((HRESULT)0x80040285L) + +// +// MessageId: VFW_E_DVD_STATE_WRONG_DISC +// +// MessageText: +// +// The state data is from a different disc.%0 +// +#define VFW_E_DVD_STATE_WRONG_DISC ((HRESULT)0x80040286L) + +// +// MessageId: VFW_E_DVD_INCOMPATIBLE_REGION +// +// MessageText: +// +// The region was not compatible with the current drive.%0 +// +#define VFW_E_DVD_INCOMPATIBLE_REGION ((HRESULT)0x80040287L) + +// +// MessageId: VFW_E_DVD_NO_ATTRIBUTES +// +// MessageText: +// +// The requested DVD stream attribute does not exist.%0 +// +#define VFW_E_DVD_NO_ATTRIBUTES ((HRESULT)0x80040288L) + +// +// MessageId: VFW_E_DVD_NO_GOUP_PGC +// +// MessageText: +// +// Currently there is no GoUp (Annex J user function) program chain (PGC).%0 +// +#define VFW_E_DVD_NO_GOUP_PGC ((HRESULT)0x80040289L) + +// +// MessageId: VFW_E_DVD_LOW_PARENTAL_LEVEL +// +// MessageText: +// +// The current parental level was too low.%0 +// +#define VFW_E_DVD_LOW_PARENTAL_LEVEL ((HRESULT)0x8004028AL) + +// +// MessageId: VFW_E_DVD_NOT_IN_KARAOKE_MODE +// +// MessageText: +// +// The current audio is not karaoke content.%0 +// +#define VFW_E_DVD_NOT_IN_KARAOKE_MODE ((HRESULT)0x8004028BL) + +// +// MessageId: VFW_S_DVD_CHANNEL_CONTENTS_NOT_AVAILABLE +// +// MessageText: +// +// The audio stream did not contain sufficient information to determine the contents of each channel.%0 +// +#define VFW_S_DVD_CHANNEL_CONTENTS_NOT_AVAILABLE ((HRESULT)0x0004028CL) + +// +// MessageId: VFW_S_DVD_NOT_ACCURATE +// +// MessageText: +// +// The seek into the movie was not frame accurate.%0 +// +#define VFW_S_DVD_NOT_ACCURATE ((HRESULT)0x0004028DL) + +// +// MessageId: VFW_E_FRAME_STEP_UNSUPPORTED +// +// MessageText: +// +// Frame step is not supported on this configuration.%0 +// +#define VFW_E_FRAME_STEP_UNSUPPORTED ((HRESULT)0x8004028EL) + +// +// MessageId: VFW_E_DVD_STREAM_DISABLED +// +// MessageText: +// +// The specified stream is disabled and cannot be selected.%0 +// +#define VFW_E_DVD_STREAM_DISABLED ((HRESULT)0x8004028FL) + +// +// MessageId: VFW_E_DVD_TITLE_UNKNOWN +// +// MessageText: +// +// The operation depends on the current title number, however the navigator has not yet entered the VTSM or the title domains, +// so the 'current' title index is unknown.%0 +// +#define VFW_E_DVD_TITLE_UNKNOWN ((HRESULT)0x80040290L) + +// +// MessageId: VFW_E_DVD_INVALID_DISC +// +// MessageText: +// +// The specified path does not point to a valid DVD disc.%0 +// +#define VFW_E_DVD_INVALID_DISC ((HRESULT)0x80040291L) + +// +// MessageId: VFW_E_DVD_NO_RESUME_INFORMATION +// +// MessageText: +// +// There is currently no resume information.%0 +// +#define VFW_E_DVD_NO_RESUME_INFORMATION ((HRESULT)0x80040292L) + +// +// MessageId: VFW_E_PIN_ALREADY_BLOCKED_ON_THIS_THREAD +// +// MessageText: +// +// This thread has already blocked this output pin. There is no need to call IPinFlowControl::Block() again.%0 +// +#define VFW_E_PIN_ALREADY_BLOCKED_ON_THIS_THREAD ((HRESULT)0x80040293L) + +// +// MessageId: VFW_E_PIN_ALREADY_BLOCKED +// +// MessageText: +// +// IPinFlowControl::Block() has been called on another thread. The current thread cannot make any assumptions about this pin's block state.%0 +// +#define VFW_E_PIN_ALREADY_BLOCKED ((HRESULT)0x80040294L) + +// +// MessageId: VFW_E_CERTIFICATION_FAILURE +// +// MessageText: +// +// An operation failed due to a certification failure.%0 +// +#define VFW_E_CERTIFICATION_FAILURE ((HRESULT)0x80040295L) + +// +// +// E_PROP_SET_UNSUPPORTED and E_PROP_ID_UNSUPPORTED are added here using +// HRESULT_FROM_WIN32() because VC5 doesn't have WinNT's new error codes +// from winerror.h, and because it is more convienent to have them already +// formed as HRESULTs. These should correspond to: +// HRESULT_FROM_WIN32(ERROR_NOT_FOUND) == E_PROP_ID_UNSUPPORTED +// HRESULT_FROM_WIN32(ERROR_SET_NOT_FOUND) == E_PROP_SET_UNSUPPORTED +#if !defined(E_PROP_SET_UNSUPPORTED) +// +// MessageId: E_PROP_SET_UNSUPPORTED +// +// MessageText: +// +// The Specified property set is not supported.%0 +// +#define E_PROP_SET_UNSUPPORTED ((HRESULT)0x80070492L) + +#endif //!defined(E_PROP_SET_UNSUPPORTED) +#if !defined(E_PROP_ID_UNSUPPORTED) +// +// MessageId: E_PROP_ID_UNSUPPORTED +// +// MessageText: +// +// The specified property ID is not supported for the specified property set.%0 +// +#define E_PROP_ID_UNSUPPORTED ((HRESULT)0x80070490L) + +#endif //!defined(E_PROP_ID_UNSUPPORTED) diff --git a/windows_libs/mssdk/include/videoacc.h b/windows_libs/mssdk/include/videoacc.h new file mode 100644 index 00000000..9ce5901c --- /dev/null +++ b/windows_libs/mssdk/include/videoacc.h @@ -0,0 +1,661 @@ + +#pragma warning( disable: 4049 ) /* more than 64k source lines */ + +/* this ALWAYS GENERATED file contains the definitions for the interfaces */ + + + /* File created by MIDL compiler version 6.00.0338 */ +/* Compiler settings for videoacc.idl: + Oicf, W1, Zp8, env=Win32 (32b run) + protocol : dce , ms_ext, c_ext + error checks: allocation ref bounds_check enum stub_data + VC __declspec() decoration level: + __declspec(uuid()), __declspec(selectany), __declspec(novtable) + DECLSPEC_UUID(), MIDL_INTERFACE() +*/ +//@@MIDL_FILE_HEADING( ) + + +/* verify that the version is high enough to compile this file*/ +#ifndef __REQUIRED_RPCNDR_H_VERSION__ +#define __REQUIRED_RPCNDR_H_VERSION__ 440 +#endif + +#include "rpc.h" +#include "rpcndr.h" + +#ifndef __RPCNDR_H_VERSION__ +#error this stub requires an updated version of +#endif // __RPCNDR_H_VERSION__ + +#ifndef COM_NO_WINDOWS_H +#include "windows.h" +#include "ole2.h" +#endif /*COM_NO_WINDOWS_H*/ + +#ifndef __videoacc_h__ +#define __videoacc_h__ + +#if defined(_MSC_VER) && (_MSC_VER >= 1020) +#pragma once +#endif + +/* Forward Declarations */ + +#ifndef __IAMVideoAcceleratorNotify_FWD_DEFINED__ +#define __IAMVideoAcceleratorNotify_FWD_DEFINED__ +typedef interface IAMVideoAcceleratorNotify IAMVideoAcceleratorNotify; +#endif /* __IAMVideoAcceleratorNotify_FWD_DEFINED__ */ + + +#ifndef __IAMVideoAccelerator_FWD_DEFINED__ +#define __IAMVideoAccelerator_FWD_DEFINED__ +typedef interface IAMVideoAccelerator IAMVideoAccelerator; +#endif /* __IAMVideoAccelerator_FWD_DEFINED__ */ + + +/* header files for imported files */ +#include "unknwn.h" + +#ifdef __cplusplus +extern "C"{ +#endif + +void * __RPC_USER MIDL_user_allocate(size_t); +void __RPC_USER MIDL_user_free( void * ); + +/* interface __MIDL_itf_videoacc_0000 */ +/* [local] */ + +// +// The following declarations within the 'if 0' block are dummy typedefs used to make +// the motncomp.idl file build. The actual definitions are contained in ddraw.h and amva.h +// +#if 0 +typedef void *LPVOID; + +typedef void *LPGUID; + +typedef void *LPDIRECTDRAWSURFACE; + +typedef void *LPDDPIXELFORMAT; + +typedef void *LPAMVAInternalMemInfo; + +typedef void AMVAUncompDataInfo; + +typedef void *LPAMVACompBufferInfo; + +typedef void AMVABUFFERINFO; + +typedef void AMVAEndFrameInfo; + +typedef void *LPAMVAUncompBufferInfo; + +typedef void AMVABeginFrameInfo; + +typedef IUnknown *IMediaSample; + +#endif +#include +#include + + +extern RPC_IF_HANDLE __MIDL_itf_videoacc_0000_v0_0_c_ifspec; +extern RPC_IF_HANDLE __MIDL_itf_videoacc_0000_v0_0_s_ifspec; + +#ifndef __IAMVideoAcceleratorNotify_INTERFACE_DEFINED__ +#define __IAMVideoAcceleratorNotify_INTERFACE_DEFINED__ + +/* interface IAMVideoAcceleratorNotify */ +/* [unique][helpstring][uuid][object][local] */ + + +EXTERN_C const IID IID_IAMVideoAcceleratorNotify; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("256A6A21-FBAD-11d1-82BF-00A0C9696C8F") + IAMVideoAcceleratorNotify : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetUncompSurfacesInfo( + /* [in] */ const GUID *pGuid, + /* [out][in] */ LPAMVAUncompBufferInfo pUncompBufferInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE SetUncompSurfacesInfo( + /* [in] */ DWORD dwActualUncompSurfacesAllocated) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCreateVideoAcceleratorData( + /* [in] */ const GUID *pGuid, + /* [out] */ LPDWORD pdwSizeMiscData, + /* [out] */ LPVOID *ppMiscData) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMVideoAcceleratorNotifyVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMVideoAcceleratorNotify * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMVideoAcceleratorNotify * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMVideoAcceleratorNotify * This); + + HRESULT ( STDMETHODCALLTYPE *GetUncompSurfacesInfo )( + IAMVideoAcceleratorNotify * This, + /* [in] */ const GUID *pGuid, + /* [out][in] */ LPAMVAUncompBufferInfo pUncompBufferInfo); + + HRESULT ( STDMETHODCALLTYPE *SetUncompSurfacesInfo )( + IAMVideoAcceleratorNotify * This, + /* [in] */ DWORD dwActualUncompSurfacesAllocated); + + HRESULT ( STDMETHODCALLTYPE *GetCreateVideoAcceleratorData )( + IAMVideoAcceleratorNotify * This, + /* [in] */ const GUID *pGuid, + /* [out] */ LPDWORD pdwSizeMiscData, + /* [out] */ LPVOID *ppMiscData); + + END_INTERFACE + } IAMVideoAcceleratorNotifyVtbl; + + interface IAMVideoAcceleratorNotify + { + CONST_VTBL struct IAMVideoAcceleratorNotifyVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMVideoAcceleratorNotify_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMVideoAcceleratorNotify_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMVideoAcceleratorNotify_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMVideoAcceleratorNotify_GetUncompSurfacesInfo(This,pGuid,pUncompBufferInfo) \ + (This)->lpVtbl -> GetUncompSurfacesInfo(This,pGuid,pUncompBufferInfo) + +#define IAMVideoAcceleratorNotify_SetUncompSurfacesInfo(This,dwActualUncompSurfacesAllocated) \ + (This)->lpVtbl -> SetUncompSurfacesInfo(This,dwActualUncompSurfacesAllocated) + +#define IAMVideoAcceleratorNotify_GetCreateVideoAcceleratorData(This,pGuid,pdwSizeMiscData,ppMiscData) \ + (This)->lpVtbl -> GetCreateVideoAcceleratorData(This,pGuid,pdwSizeMiscData,ppMiscData) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMVideoAcceleratorNotify_GetUncompSurfacesInfo_Proxy( + IAMVideoAcceleratorNotify * This, + /* [in] */ const GUID *pGuid, + /* [out][in] */ LPAMVAUncompBufferInfo pUncompBufferInfo); + + +void __RPC_STUB IAMVideoAcceleratorNotify_GetUncompSurfacesInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoAcceleratorNotify_SetUncompSurfacesInfo_Proxy( + IAMVideoAcceleratorNotify * This, + /* [in] */ DWORD dwActualUncompSurfacesAllocated); + + +void __RPC_STUB IAMVideoAcceleratorNotify_SetUncompSurfacesInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoAcceleratorNotify_GetCreateVideoAcceleratorData_Proxy( + IAMVideoAcceleratorNotify * This, + /* [in] */ const GUID *pGuid, + /* [out] */ LPDWORD pdwSizeMiscData, + /* [out] */ LPVOID *ppMiscData); + + +void __RPC_STUB IAMVideoAcceleratorNotify_GetCreateVideoAcceleratorData_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMVideoAcceleratorNotify_INTERFACE_DEFINED__ */ + + +#ifndef __IAMVideoAccelerator_INTERFACE_DEFINED__ +#define __IAMVideoAccelerator_INTERFACE_DEFINED__ + +/* interface IAMVideoAccelerator */ +/* [unique][helpstring][uuid][object][local] */ + + +EXTERN_C const IID IID_IAMVideoAccelerator; + +#if defined(__cplusplus) && !defined(CINTERFACE) + + MIDL_INTERFACE("256A6A22-FBAD-11d1-82BF-00A0C9696C8F") + IAMVideoAccelerator : public IUnknown + { + public: + virtual HRESULT STDMETHODCALLTYPE GetVideoAcceleratorGUIDs( + /* [out][in] */ LPDWORD pdwNumGuidsSupported, + /* [out][in] */ LPGUID pGuidsSupported) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetUncompFormatsSupported( + /* [in] */ const GUID *pGuid, + /* [out][in] */ LPDWORD pdwNumFormatsSupported, + /* [out][in] */ LPDDPIXELFORMAT pFormatsSupported) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInternalMemInfo( + /* [in] */ const GUID *pGuid, + /* [in] */ const AMVAUncompDataInfo *pamvaUncompDataInfo, + /* [out][in] */ LPAMVAInternalMemInfo pamvaInternalMemInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetCompBufferInfo( + /* [in] */ const GUID *pGuid, + /* [in] */ const AMVAUncompDataInfo *pamvaUncompDataInfo, + /* [out][in] */ LPDWORD pdwNumTypesCompBuffers, + /* [out] */ LPAMVACompBufferInfo pamvaCompBufferInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetInternalCompBufferInfo( + /* [out][in] */ LPDWORD pdwNumTypesCompBuffers, + /* [out] */ LPAMVACompBufferInfo pamvaCompBufferInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE BeginFrame( + /* [in] */ const AMVABeginFrameInfo *amvaBeginFrameInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE EndFrame( + /* [in] */ const AMVAEndFrameInfo *pEndFrameInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE GetBuffer( + /* [in] */ DWORD dwTypeIndex, + /* [in] */ DWORD dwBufferIndex, + /* [in] */ BOOL bReadOnly, + /* [out] */ LPVOID *ppBuffer, + /* [out] */ LONG *lpStride) = 0; + + virtual HRESULT STDMETHODCALLTYPE ReleaseBuffer( + /* [in] */ DWORD dwTypeIndex, + /* [in] */ DWORD dwBufferIndex) = 0; + + virtual HRESULT STDMETHODCALLTYPE Execute( + /* [in] */ DWORD dwFunction, + /* [in] */ LPVOID lpPrivateInputData, + /* [in] */ DWORD cbPrivateInputData, + /* [in] */ LPVOID lpPrivateOutputDat, + /* [in] */ DWORD cbPrivateOutputData, + /* [in] */ DWORD dwNumBuffers, + /* [in] */ const AMVABUFFERINFO *pamvaBufferInfo) = 0; + + virtual HRESULT STDMETHODCALLTYPE QueryRenderStatus( + /* [in] */ DWORD dwTypeIndex, + /* [in] */ DWORD dwBufferIndex, + /* [in] */ DWORD dwFlags) = 0; + + virtual HRESULT STDMETHODCALLTYPE DisplayFrame( + /* [in] */ DWORD dwFlipToIndex, + /* [in] */ IMediaSample *pMediaSample) = 0; + + }; + +#else /* C style interface */ + + typedef struct IAMVideoAcceleratorVtbl + { + BEGIN_INTERFACE + + HRESULT ( STDMETHODCALLTYPE *QueryInterface )( + IAMVideoAccelerator * This, + /* [in] */ REFIID riid, + /* [iid_is][out] */ void **ppvObject); + + ULONG ( STDMETHODCALLTYPE *AddRef )( + IAMVideoAccelerator * This); + + ULONG ( STDMETHODCALLTYPE *Release )( + IAMVideoAccelerator * This); + + HRESULT ( STDMETHODCALLTYPE *GetVideoAcceleratorGUIDs )( + IAMVideoAccelerator * This, + /* [out][in] */ LPDWORD pdwNumGuidsSupported, + /* [out][in] */ LPGUID pGuidsSupported); + + HRESULT ( STDMETHODCALLTYPE *GetUncompFormatsSupported )( + IAMVideoAccelerator * This, + /* [in] */ const GUID *pGuid, + /* [out][in] */ LPDWORD pdwNumFormatsSupported, + /* [out][in] */ LPDDPIXELFORMAT pFormatsSupported); + + HRESULT ( STDMETHODCALLTYPE *GetInternalMemInfo )( + IAMVideoAccelerator * This, + /* [in] */ const GUID *pGuid, + /* [in] */ const AMVAUncompDataInfo *pamvaUncompDataInfo, + /* [out][in] */ LPAMVAInternalMemInfo pamvaInternalMemInfo); + + HRESULT ( STDMETHODCALLTYPE *GetCompBufferInfo )( + IAMVideoAccelerator * This, + /* [in] */ const GUID *pGuid, + /* [in] */ const AMVAUncompDataInfo *pamvaUncompDataInfo, + /* [out][in] */ LPDWORD pdwNumTypesCompBuffers, + /* [out] */ LPAMVACompBufferInfo pamvaCompBufferInfo); + + HRESULT ( STDMETHODCALLTYPE *GetInternalCompBufferInfo )( + IAMVideoAccelerator * This, + /* [out][in] */ LPDWORD pdwNumTypesCompBuffers, + /* [out] */ LPAMVACompBufferInfo pamvaCompBufferInfo); + + HRESULT ( STDMETHODCALLTYPE *BeginFrame )( + IAMVideoAccelerator * This, + /* [in] */ const AMVABeginFrameInfo *amvaBeginFrameInfo); + + HRESULT ( STDMETHODCALLTYPE *EndFrame )( + IAMVideoAccelerator * This, + /* [in] */ const AMVAEndFrameInfo *pEndFrameInfo); + + HRESULT ( STDMETHODCALLTYPE *GetBuffer )( + IAMVideoAccelerator * This, + /* [in] */ DWORD dwTypeIndex, + /* [in] */ DWORD dwBufferIndex, + /* [in] */ BOOL bReadOnly, + /* [out] */ LPVOID *ppBuffer, + /* [out] */ LONG *lpStride); + + HRESULT ( STDMETHODCALLTYPE *ReleaseBuffer )( + IAMVideoAccelerator * This, + /* [in] */ DWORD dwTypeIndex, + /* [in] */ DWORD dwBufferIndex); + + HRESULT ( STDMETHODCALLTYPE *Execute )( + IAMVideoAccelerator * This, + /* [in] */ DWORD dwFunction, + /* [in] */ LPVOID lpPrivateInputData, + /* [in] */ DWORD cbPrivateInputData, + /* [in] */ LPVOID lpPrivateOutputDat, + /* [in] */ DWORD cbPrivateOutputData, + /* [in] */ DWORD dwNumBuffers, + /* [in] */ const AMVABUFFERINFO *pamvaBufferInfo); + + HRESULT ( STDMETHODCALLTYPE *QueryRenderStatus )( + IAMVideoAccelerator * This, + /* [in] */ DWORD dwTypeIndex, + /* [in] */ DWORD dwBufferIndex, + /* [in] */ DWORD dwFlags); + + HRESULT ( STDMETHODCALLTYPE *DisplayFrame )( + IAMVideoAccelerator * This, + /* [in] */ DWORD dwFlipToIndex, + /* [in] */ IMediaSample *pMediaSample); + + END_INTERFACE + } IAMVideoAcceleratorVtbl; + + interface IAMVideoAccelerator + { + CONST_VTBL struct IAMVideoAcceleratorVtbl *lpVtbl; + }; + + + +#ifdef COBJMACROS + + +#define IAMVideoAccelerator_QueryInterface(This,riid,ppvObject) \ + (This)->lpVtbl -> QueryInterface(This,riid,ppvObject) + +#define IAMVideoAccelerator_AddRef(This) \ + (This)->lpVtbl -> AddRef(This) + +#define IAMVideoAccelerator_Release(This) \ + (This)->lpVtbl -> Release(This) + + +#define IAMVideoAccelerator_GetVideoAcceleratorGUIDs(This,pdwNumGuidsSupported,pGuidsSupported) \ + (This)->lpVtbl -> GetVideoAcceleratorGUIDs(This,pdwNumGuidsSupported,pGuidsSupported) + +#define IAMVideoAccelerator_GetUncompFormatsSupported(This,pGuid,pdwNumFormatsSupported,pFormatsSupported) \ + (This)->lpVtbl -> GetUncompFormatsSupported(This,pGuid,pdwNumFormatsSupported,pFormatsSupported) + +#define IAMVideoAccelerator_GetInternalMemInfo(This,pGuid,pamvaUncompDataInfo,pamvaInternalMemInfo) \ + (This)->lpVtbl -> GetInternalMemInfo(This,pGuid,pamvaUncompDataInfo,pamvaInternalMemInfo) + +#define IAMVideoAccelerator_GetCompBufferInfo(This,pGuid,pamvaUncompDataInfo,pdwNumTypesCompBuffers,pamvaCompBufferInfo) \ + (This)->lpVtbl -> GetCompBufferInfo(This,pGuid,pamvaUncompDataInfo,pdwNumTypesCompBuffers,pamvaCompBufferInfo) + +#define IAMVideoAccelerator_GetInternalCompBufferInfo(This,pdwNumTypesCompBuffers,pamvaCompBufferInfo) \ + (This)->lpVtbl -> GetInternalCompBufferInfo(This,pdwNumTypesCompBuffers,pamvaCompBufferInfo) + +#define IAMVideoAccelerator_BeginFrame(This,amvaBeginFrameInfo) \ + (This)->lpVtbl -> BeginFrame(This,amvaBeginFrameInfo) + +#define IAMVideoAccelerator_EndFrame(This,pEndFrameInfo) \ + (This)->lpVtbl -> EndFrame(This,pEndFrameInfo) + +#define IAMVideoAccelerator_GetBuffer(This,dwTypeIndex,dwBufferIndex,bReadOnly,ppBuffer,lpStride) \ + (This)->lpVtbl -> GetBuffer(This,dwTypeIndex,dwBufferIndex,bReadOnly,ppBuffer,lpStride) + +#define IAMVideoAccelerator_ReleaseBuffer(This,dwTypeIndex,dwBufferIndex) \ + (This)->lpVtbl -> ReleaseBuffer(This,dwTypeIndex,dwBufferIndex) + +#define IAMVideoAccelerator_Execute(This,dwFunction,lpPrivateInputData,cbPrivateInputData,lpPrivateOutputDat,cbPrivateOutputData,dwNumBuffers,pamvaBufferInfo) \ + (This)->lpVtbl -> Execute(This,dwFunction,lpPrivateInputData,cbPrivateInputData,lpPrivateOutputDat,cbPrivateOutputData,dwNumBuffers,pamvaBufferInfo) + +#define IAMVideoAccelerator_QueryRenderStatus(This,dwTypeIndex,dwBufferIndex,dwFlags) \ + (This)->lpVtbl -> QueryRenderStatus(This,dwTypeIndex,dwBufferIndex,dwFlags) + +#define IAMVideoAccelerator_DisplayFrame(This,dwFlipToIndex,pMediaSample) \ + (This)->lpVtbl -> DisplayFrame(This,dwFlipToIndex,pMediaSample) + +#endif /* COBJMACROS */ + + +#endif /* C style interface */ + + + +HRESULT STDMETHODCALLTYPE IAMVideoAccelerator_GetVideoAcceleratorGUIDs_Proxy( + IAMVideoAccelerator * This, + /* [out][in] */ LPDWORD pdwNumGuidsSupported, + /* [out][in] */ LPGUID pGuidsSupported); + + +void __RPC_STUB IAMVideoAccelerator_GetVideoAcceleratorGUIDs_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoAccelerator_GetUncompFormatsSupported_Proxy( + IAMVideoAccelerator * This, + /* [in] */ const GUID *pGuid, + /* [out][in] */ LPDWORD pdwNumFormatsSupported, + /* [out][in] */ LPDDPIXELFORMAT pFormatsSupported); + + +void __RPC_STUB IAMVideoAccelerator_GetUncompFormatsSupported_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoAccelerator_GetInternalMemInfo_Proxy( + IAMVideoAccelerator * This, + /* [in] */ const GUID *pGuid, + /* [in] */ const AMVAUncompDataInfo *pamvaUncompDataInfo, + /* [out][in] */ LPAMVAInternalMemInfo pamvaInternalMemInfo); + + +void __RPC_STUB IAMVideoAccelerator_GetInternalMemInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoAccelerator_GetCompBufferInfo_Proxy( + IAMVideoAccelerator * This, + /* [in] */ const GUID *pGuid, + /* [in] */ const AMVAUncompDataInfo *pamvaUncompDataInfo, + /* [out][in] */ LPDWORD pdwNumTypesCompBuffers, + /* [out] */ LPAMVACompBufferInfo pamvaCompBufferInfo); + + +void __RPC_STUB IAMVideoAccelerator_GetCompBufferInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoAccelerator_GetInternalCompBufferInfo_Proxy( + IAMVideoAccelerator * This, + /* [out][in] */ LPDWORD pdwNumTypesCompBuffers, + /* [out] */ LPAMVACompBufferInfo pamvaCompBufferInfo); + + +void __RPC_STUB IAMVideoAccelerator_GetInternalCompBufferInfo_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoAccelerator_BeginFrame_Proxy( + IAMVideoAccelerator * This, + /* [in] */ const AMVABeginFrameInfo *amvaBeginFrameInfo); + + +void __RPC_STUB IAMVideoAccelerator_BeginFrame_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoAccelerator_EndFrame_Proxy( + IAMVideoAccelerator * This, + /* [in] */ const AMVAEndFrameInfo *pEndFrameInfo); + + +void __RPC_STUB IAMVideoAccelerator_EndFrame_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoAccelerator_GetBuffer_Proxy( + IAMVideoAccelerator * This, + /* [in] */ DWORD dwTypeIndex, + /* [in] */ DWORD dwBufferIndex, + /* [in] */ BOOL bReadOnly, + /* [out] */ LPVOID *ppBuffer, + /* [out] */ LONG *lpStride); + + +void __RPC_STUB IAMVideoAccelerator_GetBuffer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoAccelerator_ReleaseBuffer_Proxy( + IAMVideoAccelerator * This, + /* [in] */ DWORD dwTypeIndex, + /* [in] */ DWORD dwBufferIndex); + + +void __RPC_STUB IAMVideoAccelerator_ReleaseBuffer_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoAccelerator_Execute_Proxy( + IAMVideoAccelerator * This, + /* [in] */ DWORD dwFunction, + /* [in] */ LPVOID lpPrivateInputData, + /* [in] */ DWORD cbPrivateInputData, + /* [in] */ LPVOID lpPrivateOutputDat, + /* [in] */ DWORD cbPrivateOutputData, + /* [in] */ DWORD dwNumBuffers, + /* [in] */ const AMVABUFFERINFO *pamvaBufferInfo); + + +void __RPC_STUB IAMVideoAccelerator_Execute_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoAccelerator_QueryRenderStatus_Proxy( + IAMVideoAccelerator * This, + /* [in] */ DWORD dwTypeIndex, + /* [in] */ DWORD dwBufferIndex, + /* [in] */ DWORD dwFlags); + + +void __RPC_STUB IAMVideoAccelerator_QueryRenderStatus_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + +HRESULT STDMETHODCALLTYPE IAMVideoAccelerator_DisplayFrame_Proxy( + IAMVideoAccelerator * This, + /* [in] */ DWORD dwFlipToIndex, + /* [in] */ IMediaSample *pMediaSample); + + +void __RPC_STUB IAMVideoAccelerator_DisplayFrame_Stub( + IRpcStubBuffer *This, + IRpcChannelBuffer *_pRpcChannelBuffer, + PRPC_MESSAGE _pRpcMessage, + DWORD *_pdwStubPhase); + + + +#endif /* __IAMVideoAccelerator_INTERFACE_DEFINED__ */ + + +/* Additional Prototypes for ALL interfaces */ + +/* end of Additional Prototypes */ + +#ifdef __cplusplus +} +#endif + +#endif + + diff --git a/windows_libs/mssdk/include/vpconfig.h b/windows_libs/mssdk/include/vpconfig.h new file mode 100644 index 00000000..1c3fab83 --- /dev/null +++ b/windows_libs/mssdk/include/vpconfig.h @@ -0,0 +1,135 @@ +//------------------------------------------------------------------------------ +// File: VPConfig.h +// +// Desc: An interface exposed by the decoder to help it and the filter +// configuring the videoport to communicate. +// +// Copyright (c) 1992 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __IVPConfig__ +#define __IVPConfig__ + +#ifdef __cplusplus +extern "C" { +#endif + +// IVPBaseConfig +DECLARE_INTERFACE_(IVPBaseConfig, IUnknown) +{ +public: + + // gets the various connection information structures (guid, portwidth) + // in an array of structures. If the pointer to the array is NULL, first + // parameter returns the total number of formats supported. + STDMETHOD (GetConnectInfo)(THIS_ + IN OUT LPDWORD pdwNumConnectInfo, + IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo + ) PURE; + + // sets the connection entry chosen (0, 1, .. ,(dwNumProposedEntries-1)) + STDMETHOD (SetConnectInfo)(THIS_ + IN DWORD dwChosenEntry + ) PURE; + + // gets various data parameters, includes dimensionnal info + STDMETHOD (GetVPDataInfo)(THIS_ + IN OUT LPAMVPDATAINFO pamvpDataInfo + ) PURE; + + // retrives maximum pixels per second rate expected for a given + // format and a given scaling factor. If decoder does not support + // those scaling factors, then it gives the rate and the nearest + // scaling factors. + STDMETHOD (GetMaxPixelRate)(THIS_ + IN OUT LPAMVPSIZE pamvpSize, + OUT LPDWORD pdwMaxPixelsPerSecond + ) PURE; + + // informs the callee of the videoformats supported by the videoport + STDMETHOD (InformVPInputFormats)(THIS_ + IN DWORD dwNumFormats, + IN LPDDPIXELFORMAT pDDPixelFormats + ) PURE; + + // gets the various formats supported by the decoder in an array + // of structures. If the pointer to the array is NULL, first parameter + // returns the total number of formats supported. + STDMETHOD (GetVideoFormats)(THIS_ + IN OUT LPDWORD pdwNumFormats, + IN OUT LPDDPIXELFORMAT pddPixelFormats + ) PURE; + + // sets the format entry chosen (0, 1, .. ,(dwNumProposedEntries-1)) + STDMETHOD (SetVideoFormat)(THIS_ + IN DWORD dwChosenEntry + ) PURE; + + // asks the decoder to treat even fields like odd fields and visa versa + STDMETHOD (SetInvertPolarity)(THIS_ + ) PURE; + + // the mixer uses this function to determine if the callee wants + // the vpmixer to use its overlay surface and if so to get a pointer to it + STDMETHOD (GetOverlaySurface)(THIS_ + OUT LPDIRECTDRAWSURFACE* ppddOverlaySurface + ) PURE; + + // sets the direct draw kernel handle + STDMETHOD (SetDirectDrawKernelHandle)(THIS_ + IN ULONG_PTR dwDDKernelHandle + ) PURE; + + // sets the video port id + STDMETHOD (SetVideoPortID)(THIS_ + IN DWORD dwVideoPortID + ) PURE; + + // sets the direct draw surface kernel handle + STDMETHOD (SetDDSurfaceKernelHandles)(THIS_ + IN DWORD cHandles, + IN ULONG_PTR *rgDDKernelHandles + ) PURE; + + // Tells driver about surface created on its behalf by ovmixer/vbisurf and + // returned from videoport/ddraw. Should always return NOERROR or E_NOIMPL. + // dwPitch is the pitch of the surface (distance in pixels between the start + // pixels of two consecutive lines of the surface). (dwXOrigin, dwYOrigin) + // are the (X, Y) coordinates of the pixel at which valid data starts. + STDMETHOD (SetSurfaceParameters)(THIS_ + IN DWORD dwPitch, + IN DWORD dwXOrigin, + IN DWORD dwYOrigin + ) PURE; +}; + +// IVPConfig +DECLARE_INTERFACE_(IVPConfig, IVPBaseConfig) +{ +public: + // the mixer uses this function to determine if the callee wants + // the mixer to decimate VIDEO data at its own descrition + STDMETHOD (IsVPDecimationAllowed)(THIS_ + OUT LPBOOL pbIsDecimationAllowed + ) PURE; + + // sets the scaling factors. If decoder does not support these, + // then it sets the values to the nearest factors it can support + STDMETHOD (SetScalingFactors)(THIS_ + IN LPAMVPSIZE pamvpSize + ) PURE; +}; + +// IVPVBIConfig +DECLARE_INTERFACE_(IVPVBIConfig, IVPBaseConfig) +{ +public: +}; + +#ifdef __cplusplus +} +#endif + + +#endif // __IVPConfig__ diff --git a/windows_libs/mssdk/include/vpnotify.h b/windows_libs/mssdk/include/vpnotify.h new file mode 100644 index 00000000..05832e8e --- /dev/null +++ b/windows_libs/mssdk/include/vpnotify.h @@ -0,0 +1,92 @@ +//------------------------------------------------------------------------------ +// File: VPNotify.h +// +// Desc: +// +// Copyright (c) 1997 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __IVPNotify__ +#define __IVPNotify__ + +#ifdef __cplusplus +extern "C" { +#endif + +// interface IVPBaseNotify +DECLARE_INTERFACE_(IVPBaseNotify, IUnknown) +{ +public: + // this function initializes the reconnection to the decoder. + STDMETHOD (RenegotiateVPParameters)(THIS_ + ) PURE; + +}; + +// interface IVPNotify +DECLARE_INTERFACE_(IVPNotify, IVPBaseNotify) +{ +public: + // function to set the mode (bob, weave etc) + STDMETHOD (SetDeinterlaceMode)(THIS_ + IN AMVP_MODE mode + ) PURE; + + // function to get the mode (bob, weave etc) + STDMETHOD (GetDeinterlaceMode)(THIS_ + OUT AMVP_MODE *pMode + ) PURE; +}; + +// interface IVPNotify +DECLARE_INTERFACE_(IVPNotify2, IVPNotify) +{ +public: +// function to set the mode (bob, weave etc) + STDMETHOD (SetVPSyncMaster)(THIS_ + IN BOOL bVPSyncMaster + ) PURE; + + // function to get the mode (bob, weave etc) + STDMETHOD (GetVPSyncMaster)(THIS_ + OUT BOOL *pbVPSyncMaster + ) PURE; + + /* + // this function sets the directdraw surface that the mixer is supposed to use. + STDMETHOD (SetDirectDrawSurface)(THIS_ + IN LPDIRECTDRAWSURFACE pDirectDrawSurface + ) PURE; + + // this function gets the directdraw surface that the mixer is using + STDMETHOD (GetDirectDrawSurface)(THIS_ + OUT LPDIRECTDRAWSURFACE *ppDirectDrawSurface + ) PURE; + + // this functions sets the color-controls, if the chip supports it. + STDMETHOD (SetVPColorControls)(THIS_ + IN LPDDCOLORCONTROL pColorControl + ) PURE; + + // this functions also returns the capability of the hardware in the dwFlags + // value of the struct. + STDMETHOD (GetVPColorControls)(THIS_ + OUT LPDDCOLORCONTROL *ppColorControl + ) PURE; + */ +}; + + +// interface IVPVBINotify +DECLARE_INTERFACE_(IVPVBINotify, IVPBaseNotify) +{ +public: +}; + +#ifdef __cplusplus +} +#endif + + +#endif // __IVPNotify__ diff --git a/windows_libs/mssdk/include/vptype.h b/windows_libs/mssdk/include/vptype.h new file mode 100644 index 00000000..5ca8f205 --- /dev/null +++ b/windows_libs/mssdk/include/vptype.h @@ -0,0 +1,78 @@ +//------------------------------------------------------------------------------ +// File: VPType.h +// +// Desc: This file includes all the data structures defined for the IVPConfig +// interface. +// +// Copyright (c) 1997 - 2000, Microsoft Corporation. All rights reserved. +//------------------------------------------------------------------------------ + + +#ifndef __IVPType__ +#define __IVPType__ + +#ifdef __cplusplus +extern "C" { +#endif + + // enum to specify the criterion, which the vpmixer is supposed to use + // in order to select the video format + typedef enum _AMVP_SELECT_FORMAT_BY + { + AMVP_DO_NOT_CARE, + AMVP_BEST_BANDWIDTH, + AMVP_INPUT_SAME_AS_OUTPUT + } AMVP_SELECT_FORMAT_BY; + + // enum to specify the various mode + typedef enum _AMVP_MODE + { + AMVP_MODE_WEAVE, + AMVP_MODE_BOBINTERLEAVED, + AMVP_MODE_BOBNONINTERLEAVED, + AMVP_MODE_SKIPEVEN, + AMVP_MODE_SKIPODD + } AMVP_MODE; + + // struct to specify the width and height. The context could be anything + // such as scaling cropping etc. + typedef struct _AMVPSIZE + { + DWORD dwWidth; // the width + DWORD dwHeight; // the height + } AMVPSIZE, *LPAMVPSIZE; + + // struct to specify the dimensional characteristics of the input stream + typedef struct _AMVPDIMINFO + { + DWORD dwFieldWidth; // Field height of the data + DWORD dwFieldHeight; // Field width of the data + DWORD dwVBIWidth; // Width of the VBI data + DWORD dwVBIHeight; // Height of the VBI data + RECT rcValidRegion; // The vaild rectangle, used for cropping + } AMVPDIMINFO, *LPAMVPDIMINFO; + + // struct to specify the various data specific characteristics of the input stream + typedef struct _AMVPDATAINFO + { + DWORD dwSize; // Size of the struct + DWORD dwMicrosecondsPerField; // Time taken by each field + AMVPDIMINFO amvpDimInfo; // Dimensional Information + DWORD dwPictAspectRatioX; // X dimension of Picture Aspect Ratio + DWORD dwPictAspectRatioY; // Y dimension of Picture Aspect Ratio + BOOL bEnableDoubleClock; // Videoport should enable double clocking + BOOL bEnableVACT; // Videoport should use an external VACT signal + BOOL bDataIsInterlaced; // Indicates that the signal is interlaced + LONG lHalfLinesOdd; // number of halflines in the odd field + BOOL bFieldPolarityInverted; // Device inverts the polarity by default + DWORD dwNumLinesInVREF; // Number of lines of data in VREF + LONG lHalfLinesEven; // number of halflines in the even field + DWORD dwReserved1; // Reserved for future use + } AMVPDATAINFO, *LPAMVPDATAINFO; + + +#ifdef __cplusplus +} +#endif + +#endif // __IVPType__ diff --git a/windows_libs/mssdk/include/xprtdefs.h b/windows_libs/mssdk/include/xprtdefs.h new file mode 100644 index 00000000..bd070552 --- /dev/null +++ b/windows_libs/mssdk/include/xprtdefs.h @@ -0,0 +1,647 @@ +//=========================================================================== +// +// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY +// KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +// IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR +// PURPOSE. +// +// Copyright (c) 1992 - 1999 Microsoft Corporation. All Rights Reserved. +// +//=========================================================================== +// +// filename XPrtDefs.h (Derived from edevdefs.h) +// +// External Device (like a VCR) control interface parameter and value definitions +// +// Note:new constants added: ED_BASE+800L -> ED_BASE+811L +// +// 1-30-98: +// New constant added for DVCR: ED_BASE+900L -> ED_BASE+1000L +// + +#ifndef __XPRTDEFS__ +#define __XPRTDEFS__ + + +#define ED_BASE 0x1000L + +// this is used to tell the device communications object which +// physical communications port to use. +#define DEV_PORT_SIM 1 +#define DEV_PORT_COM1 2 // standard serial ports +#define DEV_PORT_COM2 3 +#define DEV_PORT_COM3 4 +#define DEV_PORT_COM4 5 +#define DEV_PORT_DIAQ 6 // Diaquest driver +#define DEV_PORT_ARTI 7 // ARTI driver +#define DEV_PORT_1394 8 // IEEE 1394 Bus +#define DEV_PORT_USB 9 // Universal Serial Bus +#define DEV_PORT_MIN DEV_PORT_SIM +#define DEV_PORT_MAX DEV_PORT_USB + + +// IAMExtDevice Capability Items: unless otherwise specified, these items return +// OATRUE or OAFALSE. All return values are in pdwValue unless otherwise specified: + +#define ED_DEVCAP_CAN_RECORD ED_BASE+1L +#define ED_DEVCAP_CAN_RECORD_STROBE ED_BASE+2L // for multitrack devices: + // switches currently recording tracks off + // and selected non-recording tracks into record +#define ED_DEVCAP_HAS_AUDIO ED_BASE+3L +#define ED_DEVCAP_HAS_VIDEO ED_BASE+4L +#define ED_DEVCAP_USES_FILES ED_BASE+5L +#define ED_DEVCAP_CAN_SAVE ED_BASE+6L + +#define ED_DEVCAP_DEVICE_TYPE ED_BASE+7L // returns one of the following: +#define ED_DEVTYPE_VCR ED_BASE+8L +#define ED_DEVTYPE_LASERDISK ED_BASE+9L +#define ED_DEVTYPE_ATR ED_BASE+10L +#define ED_DEVTYPE_DDR ED_BASE+11L +#define ED_DEVTYPE_ROUTER ED_BASE+12L +#define ED_DEVTYPE_KEYER ED_BASE+13L +#define ED_DEVTYPE_MIXER_VIDEO ED_BASE+14L +#define ED_DEVTYPE_DVE ED_BASE+15L +#define ED_DEVTYPE_WIPEGEN ED_BASE+16L +#define ED_DEVTYPE_MIXER_AUDIO ED_BASE+17L +#define ED_DEVTYPE_CG ED_BASE+18L +#define ED_DEVTYPE_TBC ED_BASE+19L +#define ED_DEVTYPE_TCG ED_BASE+20L +#define ED_DEVTYPE_GPI ED_BASE+21L +#define ED_DEVTYPE_JOYSTICK ED_BASE+22L +#define ED_DEVTYPE_KEYBOARD ED_BASE+23L + +// returns mfr-specific ID from external device. +#define ED_DEVCAP_EXTERNAL_DEVICE_ID ED_BASE+24L + +#define ED_DEVCAP_TIMECODE_READ ED_BASE+25L +#define ED_DEVCAP_TIMECODE_WRITE ED_BASE+26L +// used for seekable non-timecode enabled devices +#define ED_DEVCAP_CTLTRK_READ ED_BASE+27L +// used for seekable non-timecode enabled devices +#define ED_DEVCAP_INDEX_READ ED_BASE+28L + +// returns device preroll time in current time format +#define ED_DEVCAP_PREROLL ED_BASE+29L +// returns device postroll time in current time format +#define ED_DEVCAP_POSTROLL ED_BASE+30L + +// returns indication of device’s synchronization accuracy. +#define ED_DEVCAP_SYNC_ACCURACY ED_BASE+31L // returns one of the following: +#define ED_SYNCACC_PRECISE ED_BASE+32L +#define ED_SYNCACC_FRAME ED_BASE+33L +#define ED_SYNCACC_ROUGH ED_BASE+34L + +// returns device’s normal framerate. +#define ED_DEVCAP_NORMAL_RATE ED_BASE+35L // returns one of the following: +#define ED_RATE_24 ED_BASE+36L +#define ED_RATE_25 ED_BASE+37L +#define ED_RATE_2997 ED_BASE+38L +#define ED_RATE_30 ED_BASE+39L + +#define ED_DEVCAP_CAN_PREVIEW ED_BASE+40L +#define ED_DEVCAP_CAN_MONITOR_SOURCES ED_BASE+41L + +// indicates implementation allows testing of methods/parameters by +// setting the hi bit of a parm that makes sense - see individual methods +// for details. +#define ED_DEVCAP_CAN_TEST ED_BASE+42L + +// indicates device accepts video as an input. +#define ED_DEVCAP_VIDEO_INPUTS ED_BASE+43L + +// indicates device accepts audio as an input. +#define ED_DEVCAP_AUDIO_INPUTS ED_BASE+44L + +#define ED_DEVCAP_NEEDS_CALIBRATING ED_BASE+45L + +#define ED_DEVCAP_SEEK_TYPE ED_BASE+46L // returns one of the following: +#define ED_SEEK_PERFECT ED_BASE+47L // indicates device can execute seek + // within 1 video frames without signal + // break (like a DDR) +#define ED_SEEK_FAST ED_BASE+48L // indicates device can move pretty quick + // with short break in signal +#define ED_SEEK_SLOW ED_BASE+49L // seeks like a tape transport + +#define ED_POWER_ON ED_BASE+50L +#define ED_POWER_OFF ED_BASE+51L +#define ED_POWER_STANDBY ED_BASE+52L + +#define ED_ACTIVE ED_BASE+53L +#define ED_INACTIVE ED_BASE+54L +#define ED_ALL ED_BASE+55L +#define ED_TEST ED_BASE+56L + +// IAMExtTransport Capability Items: unless otherwise specified, these items return +// OATRUE or OAFALSE. All return values are in pdwValue unless otherwise specified: + +#define ED_TRANSCAP_CAN_EJECT ED_BASE+100L +#define ED_TRANSCAP_CAN_BUMP_PLAY ED_BASE+101L // variable speed for synchronizing +#define ED_TRANSCAP_CAN_PLAY_BACKWARDS ED_BASE+102L // servo locked for use during an edit +#define ED_TRANSCAP_CAN_SET_EE ED_BASE+103L // show device’s input on its output +#define ED_TRANSCAP_CAN_SET_PB ED_BASE+104L // show media playback on device’s output +#define ED_TRANSCAP_CAN_DELAY_VIDEO_IN ED_BASE+105L // transport can do delayed-in video edits +#define ED_TRANSCAP_CAN_DELAY_VIDEO_OUT ED_BASE+106L // transport can do delayed-out video edits +#define ED_TRANSCAP_CAN_DELAY_AUDIO_IN ED_BASE+107L // transport can do delayed-in audio edits +#define ED_TRANSCAP_CAN_DELAY_AUDIO_OUT ED_BASE+108L // transport can do delayed-out audio edits +#define ED_TRANSCAP_FWD_VARIABLE_MAX ED_BASE+109L // max forward speed (multiple of play speed) + // in pdblValue +#define ED_TRANSCAP_FWD_VARIABLE_MIN ED_BASE+800L // min forward speed (multiple of play speed) + // in pdblValue +#define ED_TRANSCAP_REV_VARIABLE_MAX ED_BASE+110L // max reverse speed (multiple of play speed) in + // pdblValue +#define ED_TRANSCAP_REV_VARIABLE_MIN ED_BASE+801L // min reverse speed (multiple of play speed) + // in pdblValue +#define ED_TRANSCAP_FWD_SHUTTLE_MAX ED_BASE+802L // max forward speed in Shuttle mode (multiple + // of play speed) in pdblValue +#define ED_TRANSCAP_FWD_SHUTTLE_MIN ED_BASE+803L // min forward speed in Shuttle mode (multiple + // of play speed) in pdblValue +#define ED_TRANSCAP_REV_SHUTTLE_MAX ED_BASE+804L // max reverse speed in Shuttle mode (multiple + // of play speed) in pdblValue +#define ED_TRANSCAP_REV_SHUTTLE_MIN ED_BASE+805L // min reverse speed in Shuttle mode (multiple + // of play speed) in pdblValue +#define ED_TRANSCAP_NUM_AUDIO_TRACKS ED_BASE+111L // returns number of audio tracks +#define ED_TRANSCAP_LTC_TRACK ED_BASE+112L // returns track number of LTC timecode track. + // ED_ALL means no dedicated timecode track +#define ED_TRANSCAP_NEEDS_TBC ED_BASE+113L // device’s output not stable +#define ED_TRANSCAP_NEEDS_CUEING ED_BASE+114L // device must be cued prior to performing edit +#define ED_TRANSCAP_CAN_INSERT ED_BASE+115L +#define ED_TRANSCAP_CAN_ASSEMBLE ED_BASE+116L +#define ED_TRANSCAP_FIELD_STEP ED_BASE+117L // device responds to Frame Advance command by + // advancing one field +#define ED_TRANSCAP_CLOCK_INC_RATE ED_BASE+118L // VISCA command - keep for compatibility +#define ED_TRANSCAP_CAN_DETECT_LENGTH ED_BASE+119L +#define ED_TRANSCAP_CAN_FREEZE ED_BASE+120L +#define ED_TRANSCAP_HAS_TUNER ED_BASE+121L +#define ED_TRANSCAP_HAS_TIMER ED_BASE+122L +#define ED_TRANSCAP_HAS_CLOCK ED_BASE+123L +#define ED_TRANSCAP_MULTIPLE_EDITS ED_BASE+806L // OATRUE means device/filter can support + // multiple edit events +#define ED_TRANSCAP_IS_MASTER ED_BASE+807L // OATRUE means device is the master clock + // for synchronizing (this sets timecode-to- + // reference clock offset for editing) +#define ED_TRANSCAP_HAS_DT ED_BASE+814L // OATRUE means device has Dynamic Tracking + +// IAMExtTransport Media States +#define ED_MEDIA_SPIN_UP ED_BASE+130L +#define ED_MEDIA_SPIN_DOWN ED_BASE+131L +#define ED_MEDIA_UNLOAD ED_BASE+132L + +// IAMExtTransport Modes +#define ED_MODE_PLAY ED_BASE+200L +#define ED_MODE_STOP ED_BASE+201L +#define ED_MODE_FREEZE ED_BASE+202L // really "pause" +#define ED_MODE_THAW ED_BASE+203L +#define ED_MODE_FF ED_BASE+204L +#define ED_MODE_REW ED_BASE+205L +#define ED_MODE_RECORD ED_BASE+206L +#define ED_MODE_RECORD_STROBE ED_BASE+207L +#define ED_MODE_RECORD_FREEZE ED_BASE+808L // never "put", only "get" +#define ED_MODE_STEP ED_BASE+208L // same as "jog" +#define ED_MODE_STEP_FWD ED_BASE+208L // same as ED_MODE_STEP +#define ED_MODE_STEP_REV ED_BASE+809L +#define ED_MODE_SHUTTLE ED_BASE+209L +#define ED_MODE_EDIT_CUE ED_BASE+210L +#define ED_MODE_VAR_SPEED ED_BASE+211L +#define ED_MODE_PERFORM ED_BASE+212L // returned status only +#define ED_MODE_LINK_ON ED_BASE+280L +#define ED_MODE_LINK_OFF ED_BASE+281L +#define ED_MODE_NOTIFY_ENABLE ED_BASE+810L +#define ED_MODE_NOTIFY_DISABLE ED_BASE+811L +#define ED_MODE_SHOT_SEARCH ED_BASE+812L + +// IAMTimecodeReader/Generator/Display defines +// +// Timecode Generator Mode params and values: +// +#define ED_TCG_TIMECODE_TYPE ED_BASE+400L // can be one of the following: +#define ED_TCG_SMPTE_LTC ED_BASE+401L +#define ED_TCG_SMPTE_VITC ED_BASE+402L +#define ED_TCG_MIDI_QF ED_BASE+403L +#define ED_TCG_MIDI_FULL ED_BASE+404L + +#define ED_TCG_FRAMERATE ED_BASE+405L // can be one of the following: +#define ED_FORMAT_SMPTE_30 ED_BASE+406L +#define ED_FORMAT_SMPTE_30DROP ED_BASE+407L +#define ED_FORMAT_SMPTE_25 ED_BASE+408L +#define ED_FORMAT_SMPTE_24 ED_BASE+409L + +#define ED_TCG_SYNC_SOURCE ED_BASE+410L // can be one of the following: +#define ED_TCG_VIDEO ED_BASE+411L +#define ED_TCG_READER ED_BASE+412L +#define ED_TCG_FREE ED_BASE+413L + +#define ED_TCG_REFERENCE_SOURCE ED_BASE+414L // can have one these values: + // ED_TCG_FREE || ED_TCG_READER + // (for regen/jamsync) + +// TimeCodeReader Mode params and values: +#define ED_TCR_SOURCE ED_BASE+416L // can be one of the following: +// ED_TCG (already defined) +#define ED_TCR_LTC ED_BASE+417L +#define ED_TCR_VITC ED_BASE+418L +#define ED_TCR_CT ED_BASE+419L // Control Track +#define ED_TCR_FTC ED_BASE+420L // File TimeCode - for file-based devices + // that wish they were transports +// ED_MODE_NOTIFY_ENABLE can be OATRUE or OAFALSE (defined in transport mode +// section of this file). +#define ED_TCR_LAST_VALUE ED_BASE+421L // for notification mode - + // successive calls to GetTimecode + // return the last read value +// TimeCode Display Mode params and values: +// +#define ED_TCD_SOURCE ED_BASE+422L // can be one of the following: +#define ED_TCR ED_BASE+423L +#define ED_TCG ED_BASE+424L + +#define ED_TCD_SIZE ED_BASE+425L // can be one of the following: +#define ED_SMALL ED_BASE+426L +#define ED_MED ED_BASE+427L +#define ED_LARGE ED_BASE+428L + +#define ED_TCD_POSITION ED_BASE+429L // can be one of the following: +#define ED_TOP 0x0001 +#define ED_MIDDLE 0x0002 +#define ED_BOTTOM 0x0004 // or’d with +#define ED_LEFT 0x0100 +#define ED_CENTER 0x0200 +#define ED_RIGHT 0x0400 + +#define ED_TCD_INTENSITY ED_BASE+436L // can be one of the following: +#define ED_HIGH ED_BASE+437L +#define ED_LOW ED_BASE+438L + +#define ED_TCD_TRANSPARENCY ED_BASE+439L // 0-4, 0 is opaque + +#define ED_TCD_INVERT ED_BASE+440L // OATRUE=black on white + // OAFALSE=white on black +// IAMExtTransport defines +// +// Transport status, params and values +// + +// IAMExtTransport Status items and and values: +#define ED_MODE ED_BASE+500L // see ED_MODE_xxx values above +#define ED_ERROR ED_BASE+501L +#define ED_LOCAL ED_BASE+502L +#define ED_RECORD_INHIBIT ED_BASE+503L +#define ED_SERVO_LOCK ED_BASE+504L +#define ED_MEDIA_PRESENT ED_BASE+505L +#define ED_MEDIA_LENGTH ED_BASE+506L +#define ED_MEDIA_SIZE ED_BASE+507L +#define ED_MEDIA_TRACK_COUNT ED_BASE+508L +#define ED_MEDIA_TRACK_LENGTH ED_BASE+509L +#define ED_MEDIA_SIDE ED_BASE+510L + +#define ED_MEDIA_TYPE ED_BASE+511L // can be one of the following: +#define ED_MEDIA_VHS ED_BASE+512L +#define ED_MEDIA_SVHS ED_BASE+513L +#define ED_MEDIA_HI8 ED_BASE+514L +#define ED_MEDIA_UMATIC ED_BASE+515L +#define ED_MEDIA_DVC ED_BASE+516L +#define ED_MEDIA_1_INCH ED_BASE+517L +#define ED_MEDIA_D1 ED_BASE+518L +#define ED_MEDIA_D2 ED_BASE+519L +#define ED_MEDIA_D3 ED_BASE+520L +#define ED_MEDIA_D5 ED_BASE+521L +#define ED_MEDIA_DBETA ED_BASE+522L +#define ED_MEDIA_BETA ED_BASE+523L +#define ED_MEDIA_8MM ED_BASE+524L +#define ED_MEDIA_DDR ED_BASE+525L +#define ED_MEDIA_SX ED_BASE+813L +#define ED_MEDIA_OTHER ED_BASE+526L +#define ED_MEDIA_CLV ED_BASE+527L +#define ED_MEDIA_CAV ED_BASE+528L +#define ED_MEDIA_POSITION ED_BASE+529L + +#define ED_LINK_MODE ED_BASE+530L // OATRUE if transport controls + // are linked to graph's RUN, + // STOP, and PAUSE methods + +// IAMExtTransport Basic Parms +#define ED_TRANSBASIC_TIME_FORMAT ED_BASE+540L // can be one of the following: +#define ED_FORMAT_MILLISECONDS ED_BASE+541L +#define ED_FORMAT_FRAMES ED_BASE+542L +#define ED_FORMAT_REFERENCE_TIME ED_BASE+543L + +#define ED_FORMAT_HMSF ED_BASE+547L +#define ED_FORMAT_TMSF ED_BASE+548L + +#define ED_TRANSBASIC_TIME_REFERENCE ED_BASE+549L // can be one of the following: +#define ED_TIMEREF_TIMECODE ED_BASE+550L +#define ED_TIMEREF_CONTROL_TRACK ED_BASE+551L +#define ED_TIMEREF_INDEX ED_BASE+552L + +#define ED_TRANSBASIC_SUPERIMPOSE ED_BASE+553L // enable/disable onscreen display +#define ED_TRANSBASIC_END_STOP_ACTION ED_BASE+554L // can be one of: ED_MODE_STOP | + // ED_MODE_REWIND | ED_MODE_FREEZE +#define ED_TRANSBASIC_RECORD_FORMAT ED_BASE+555L // can be one of the following: +#define ED_RECORD_FORMAT_SP ED_BASE+556L +#define ED_RECORD_FORMAT_LP ED_BASE+557L +#define ED_RECORD_FORMAT_EP ED_BASE+558L + +#define ED_TRANSBASIC_STEP_COUNT ED_BASE+559L +#define ED_TRANSBASIC_STEP_UNIT ED_BASE+560L // can be one of the following: +#define ED_STEP_FIELD ED_BASE+561L +#define ED_STEP_FRAME ED_BASE+562L +#define ED_STEP_3_2 ED_BASE+563L + +#define ED_TRANSBASIC_PREROLL ED_BASE+564L +#define ED_TRANSBASIC_RECPREROLL ED_BASE+565L +#define ED_TRANSBASIC_POSTROLL ED_BASE+566L +#define ED_TRANSBASIC_EDIT_DELAY ED_BASE+567L +#define ED_TRANSBASIC_PLAYTC_DELAY ED_BASE+568L +#define ED_TRANSBASIC_RECTC_DELAY ED_BASE+569L +#define ED_TRANSBASIC_EDIT_FIELD ED_BASE+570L +#define ED_TRANSBASIC_FRAME_SERVO ED_BASE+571L +#define ED_TRANSBASIC_CF_SERVO ED_BASE+572L +#define ED_TRANSBASIC_SERVO_REF ED_BASE+573L // can be one of the following: +#define ED_REF_EXTERNAL ED_BASE+574L +#define ED_REF_INPUT ED_BASE+575L +#define ED_REF_INTERNAL ED_BASE+576L +#define ED_REF_AUTO ED_BASE+577L + +#define ED_TRANSBASIC_WARN_GL ED_BASE+578L +#define ED_TRANSBASIC_SET_TRACKING ED_BASE+579L // can be one of the following: +#define ED_TRACKING_PLUS ED_BASE+580L +#define ED_TRACKING_MINUS ED_BASE+581L +#define ED_TRACKING_RESET ED_BASE+582L + +#define ED_TRANSBASIC_SET_FREEZE_TIMEOUT ED_BASE+583L +#define ED_TRANSBASIC_VOLUME_NAME ED_BASE+584L +#define ED_TRANSBASIC_BALLISTIC_1 ED_BASE+585L // space for proprietary data +#define ED_TRANSBASIC_BALLISTIC_2 ED_BASE+586L +#define ED_TRANSBASIC_BALLISTIC_3 ED_BASE+587L +#define ED_TRANSBASIC_BALLISTIC_4 ED_BASE+588L +#define ED_TRANSBASIC_BALLISTIC_5 ED_BASE+589L +#define ED_TRANSBASIC_BALLISTIC_6 ED_BASE+590L +#define ED_TRANSBASIC_BALLISTIC_7 ED_BASE+591L +#define ED_TRANSBASIC_BALLISTIC_8 ED_BASE+592L +#define ED_TRANSBASIC_BALLISTIC_9 ED_BASE+593L +#define ED_TRANSBASIC_BALLISTIC_10 ED_BASE+594L +#define ED_TRANSBASIC_BALLISTIC_11 ED_BASE+595L +#define ED_TRANSBASIC_BALLISTIC_12 ED_BASE+596L +#define ED_TRANSBASIC_BALLISTIC_13 ED_BASE+597L +#define ED_TRANSBASIC_BALLISTIC_14 ED_BASE+598L +#define ED_TRANSBASIC_BALLISTIC_15 ED_BASE+599L +#define ED_TRANSBASIC_BALLISTIC_16 ED_BASE+600L +#define ED_TRANSBASIC_BALLISTIC_17 ED_BASE+601L +#define ED_TRANSBASIC_BALLISTIC_18 ED_BASE+602L +#define ED_TRANSBASIC_BALLISTIC_19 ED_BASE+603L +#define ED_TRANSBASIC_BALLISTIC_20 ED_BASE+604L + +// consumer VCR items +#define ED_TRANSBASIC_SETCLOCK ED_BASE+605L +#define ED_TRANSBASIC_SET_COUNTER_FORMAT ED_BASE+606L // uses time format flags +#define ED_TRANSBASIC_SET_COUNTER_VALUE ED_BASE+607L + +#define ED_TRANSBASIC_SETTUNER_CH_UP ED_BASE+608L +#define ED_TRANSBASIC_SETTUNER_CH_DN ED_BASE+609L +#define ED_TRANSBASIC_SETTUNER_SK_UP ED_BASE+610L +#define ED_TRANSBASIC_SETTUNER_SK_DN ED_BASE+611L +#define ED_TRANSBASIC_SETTUNER_CH ED_BASE+612L +#define ED_TRANSBASIC_SETTUNER_NUM ED_BASE+613L + +#define ED_TRANSBASIC_SETTIMER_EVENT ED_BASE+614L +#define ED_TRANSBASIC_SETTIMER_STARTDAY ED_BASE+615L +#define ED_TRANSBASIC_SETTIMER_STARTTIME ED_BASE+616L +#define ED_TRANSBASIC_SETTIMER_STOPDAY ED_BASE+617L +#define ED_TRANSBASIC_SETTIMER_STOPTIME ED_BASE+618L + +// IAMExtTransport video parameters +#define ED_TRANSVIDEO_SET_OUTPUT ED_BASE+630L // can be one of the following: +#define ED_E2E ED_BASE+631L +#define ED_PLAYBACK ED_BASE+632L +#define ED_OFF ED_BASE+633L + +#define ED_TRANSVIDEO_SET_SOURCE ED_BASE+634L + +// IAMExtTransport audio parameters +#define ED_TRANSAUDIO_ENABLE_OUTPUT ED_BASE+640L // can be the following: +#define ED_AUDIO_ALL 0x10000000 // or any of the following OR'd together +#define ED_AUDIO_1 0x0000001L +#define ED_AUDIO_2 0x0000002L +#define ED_AUDIO_3 0x0000004L +#define ED_AUDIO_4 0x0000008L +#define ED_AUDIO_5 0x0000010L +#define ED_AUDIO_6 0x0000020L +#define ED_AUDIO_7 0x0000040L +#define ED_AUDIO_8 0x0000080L +#define ED_AUDIO_9 0x0000100L +#define ED_AUDIO_10 0x0000200L +#define ED_AUDIO_11 0x0000400L +#define ED_AUDIO_12 0x0000800L +#define ED_AUDIO_13 0x0001000L +#define ED_AUDIO_14 0x0002000L +#define ED_AUDIO_15 0x0004000L +#define ED_AUDIO_16 0x0008000L +#define ED_AUDIO_17 0x0010000L +#define ED_AUDIO_18 0x0020000L +#define ED_AUDIO_19 0x0040000L +#define ED_AUDIO_20 0x0080000L +#define ED_AUDIO_21 0x0100000L +#define ED_AUDIO_22 0x0200000L +#define ED_AUDIO_23 0x0400000L +#define ED_AUDIO_24 0x0800000L +#define ED_VIDEO 0x2000000L // for Edit props below + +#define ED_TRANSAUDIO_ENABLE_RECORD ED_BASE+642L +#define ED_TRANSAUDIO_ENABLE_SELSYNC ED_BASE+643L +#define ED_TRANSAUDIO_SET_SOURCE ED_BASE+644L +#define ED_TRANSAUDIO_SET_MONITOR ED_BASE+645L + + +// Edit Property Set-related defs + +// The following values reflect (and control) the state of an +// edit property set +#define ED_INVALID ED_BASE+652L +#define ED_EXECUTING ED_BASE+653L +#define ED_REGISTER ED_BASE+654L +#define ED_DELETE ED_BASE+655L + +// Edit property set parameters and values +#define ED_EDIT_HEVENT ED_BASE+656L // event handle to signal event + // completion +#define ED_EDIT_TEST ED_BASE+657L // returns OAFALSE if filter thinks + // edit can be done, OATRUE if not +#define ED_EDIT_IMMEDIATE ED_BASE+658L // OATRUE means start put the + // device into edit mode (editing + // "on the fly") immediately upon + // execution of Mode(ED_MODE_EDIT_CUE) +#define ED_EDIT_MODE ED_BASE+659L +// can be one of the following values: +#define ED_EDIT_MODE_ASSEMBLE ED_BASE+660L +#define ED_EDIT_MODE_INSERT ED_BASE+661L +#define ED_EDIT_MODE_CRASH_RECORD ED_BASE+662L +#define ED_EDIT_MODE_BOOKMARK_TIME ED_BASE+663L // these two are for +#define ED_EDIT_MODE_BOOKMARK_CHAPTER ED_BASE+664L // laserdisks + +#define ED_EDIT_MASTER ED_BASE+666L // OATRUE causes device + // not to synchronize + +#define ED_EDIT_TRACK ED_BASE+667L +// can be one of the following possible OR'd values: +// ED_VIDEO, ED_AUDIO_1 thru ED_AUDIO_24 (or ED_AUDIO_ALL) + +#define ED_EDIT_SRC_INPOINT ED_BASE+668L // in current time format +#define ED_EDIT_SRC_OUTPOINT ED_BASE+669L // in current time format +#define ED_EDIT_REC_INPOINT ED_BASE+670L // in current time format +#define ED_EDIT_REC_OUTPOINT ED_BASE+671L // in current time format + +#define ED_EDIT_REHEARSE_MODE ED_BASE+672L +// can be one of the following possible values: +#define ED_EDIT_BVB ED_BASE+673L // means rehearse the edit with + // "black-video-black" +#define ED_EDIT_VBV ED_BASE+674L +#define ED_EDIT_VVV ED_BASE+675L +#define ED_EDIT_PERFORM ED_BASE+676L // means perform the edit with no + // rehearsal. + +// Set this property to OATRUE to kill the edit if in progress +#define ED_EDIT_ABORT ED_BASE+677L +// how long to wait for edit to complete +#define ED_EDIT_TIMEOUT ED_BASE+678L // in current time format + +// This property causes the device to seek to a point specified by +// ED_EDIT_SEEK_MODE (see below). NOTE: Only one event at a time can seek. +#define ED_EDIT_SEEK ED_BASE+679L // OATRUE means do it now. +#define ED_EDIT_SEEK_MODE ED_BASE+680L +//possible values: +#define ED_EDIT_SEEK_EDIT_IN ED_BASE+681L // seek to edit's inpoint +#define ED_EDIT_SEEK_EDIT_OUT ED_BASE+682L // seek to edit's outpoint +#define ED_EDIT_SEEK_PREROLL ED_BASE+683L // seek to edit's + // inpoint-preroll +#define ED_EDIT_SEEK_PREROLL_CT ED_BASE+684L // seek to preroll point + // using control track (used for tapes with + // discontinuoustimecode before edit point: seek + // to inpoint using timecode, then backup to + // preroll point using control track) +#define ED_EDIT_SEEK_BOOKMARK ED_BASE+685L // seek to bookmark (just like + // timecode search) +// This property is used for multiple-VCR systems where each machine must +// cue to a different location relative to the graph's reference clock. The +// basic idea is that an edit event is setup with an ED_EDIT_OFFSET property +// that tells the VCR what offset to maintain between it's timecode (converted +// to reference clock units) and the reference clock. +#define ED_EDIT_OFFSET ED_BASE+686L // in current time format + +#define ED_EDIT_PREREAD ED_BASE+815L // OATRUE means device supports + // pre-read (recorder can also be + // player + +// +// Some error codes: +// +// device could be in local mode +#define ED_ERR_DEVICE_NOT_READY ED_BASE+700L + + + + + + +// ************************************************** +// +// New constants added for implementation of DVCR +// +// ************************************************** + + +// +// New Device type (a DV has two subunits: camera and VCR) +// +#define ED_DEVTYPE_CAMERA ED_BASE+900L + +#define ED_DEVTYPE_TUNER ED_BASE+901L + +#define ED_DEVTYPE_DVHS ED_BASE+902L + +#define ED_DEVTYPE_UNKNOWN ED_BASE+903L + +// +// Unknownn capability +// Instead of return E_NOTIMPL, or S_OK with OAFALSE, it may return S_OK with _UNKNOWN +// +#define ED_CAPABILITY_UNKNOWN ED_BASE+910L + + +// +// Send RAW extenal device command via Get/SetTransportBasicParameters() +// +#define ED_RAW_EXT_DEV_CMD ED_BASE+920L + + +// +// MEDIUM INFO +// +#define ED_MEDIA_VHSC ED_BASE+925L // New media type +#define ED_MEDIA_UNKNOWN ED_BASE+926L // Unknown media +#define ED_MEDIA_NOT_PRESENT ED_BASE+927L + + +// +// Device Control command that can result in pending state. +// +#define ED_CONTROL_HEVENT_GET ED_BASE+928L // To get a sychronous event handle +#define ED_CONTROL_HEVENT_RELEASE ED_BASE+929L // To release sychronous event handle must match what it got + +#define ED_DEV_REMOVED_HEVENT_GET ED_BASE+960L // To be a notify event and will be signal if device is removed. +#define ED_DEV_REMOVED_HEVENT_RELEASE ED_BASE+961L // Release this event handle + + +// +// TRANSPORT STATE +// +#define ED_NOTIFY_HEVENT_GET ED_BASE+930L // To get a sychronous event handle +#define ED_NOTIFY_HEVENT_RELEASE ED_BASE+931L // To release sychronous event handle must match what it got +#define ED_MODE_CHANGE_NOTIFY ED_BASE+932L // This is asynchronous operation, wait for event. + +#define ED_MODE_PLAY_FASTEST_FWD ED_BASE+933L +#define ED_MODE_PLAY_SLOWEST_FWD ED_BASE+934L +#define ED_MODE_PLAY_FASTEST_REV ED_BASE+935L +#define ED_MODE_PLAY_SLOWEST_REV ED_BASE+936L + +#define ED_MODE_WIND ED_BASE+937L +#define ED_MODE_REW_FASTEST ED_BASE+938L // High speed rewind + +#define ED_MODE_REV_PLAY ED_BASE+939L // x1 speed reverse play + + + +// +// TRANSPOSRTBASIC: input and output signal +// +#define ED_TRANSBASIC_INPUT_SIGNAL ED_BASE+940L +#define ED_TRANSBASIC_OUTPUT_SIGNAL ED_BASE+941L + +#define ED_TRANSBASIC_SIGNAL_525_60_SD ED_BASE+942L +#define ED_TRANSBASIC_SIGNAL_525_60_SDL ED_BASE+943L +#define ED_TRANSBASIC_SIGNAL_625_50_SD ED_BASE+944L +#define ED_TRANSBASIC_SIGNAL_625_50_SDL ED_BASE+945L + +#define ED_TRANSBASIC_SIGNAL_MPEG2TS ED_BASE+946L + +// +// TIMECODE/AbsoluteTrackNumber/RealTimeCounter read/seek/write +// +#define ED_DEVCAP_TIMECODE_SEEK ED_BASE+950L + +#define ED_DEVCAP_ATN_READ ED_BASE+951L +#define ED_DEVCAP_ATN_SEEK ED_BASE+952L +#define ED_DEVCAP_ATN_WRITE ED_BASE+953L + +#define ED_DEVCAP_RTC_READ ED_BASE+954L +#define ED_DEVCAP_RTC_SEEK ED_BASE+955L +#define ED_DEVCAP_RTC_WRITE ED_BASE+956L + +// +// Basic parameter +// +#define ED_TIMEREF_ATN ED_BASE+958L + + + + +#endif // __XPRTDEFS__ + +// eof XPrtDefs.h diff --git a/windows_libs/mssdk/lib/DSETUP.lib b/windows_libs/mssdk/lib/DSETUP.lib new file mode 100644 index 00000000..ac7cecb5 Binary files /dev/null and b/windows_libs/mssdk/lib/DSETUP.lib differ diff --git a/windows_libs/mssdk/lib/amstrmid.lib b/windows_libs/mssdk/lib/amstrmid.lib new file mode 100644 index 00000000..314344e0 Binary files /dev/null and b/windows_libs/mssdk/lib/amstrmid.lib differ diff --git a/windows_libs/mssdk/lib/d3d8.lib b/windows_libs/mssdk/lib/d3d8.lib new file mode 100644 index 00000000..8966e620 Binary files /dev/null and b/windows_libs/mssdk/lib/d3d8.lib differ diff --git a/windows_libs/mssdk/lib/d3dx.lib b/windows_libs/mssdk/lib/d3dx.lib new file mode 100644 index 00000000..8cea21e0 Binary files /dev/null and b/windows_libs/mssdk/lib/d3dx.lib differ diff --git a/windows_libs/mssdk/lib/d3dx8.lib b/windows_libs/mssdk/lib/d3dx8.lib new file mode 100644 index 00000000..d2a81eb6 Binary files /dev/null and b/windows_libs/mssdk/lib/d3dx8.lib differ diff --git a/windows_libs/mssdk/lib/d3dx8d.lib b/windows_libs/mssdk/lib/d3dx8d.lib new file mode 100644 index 00000000..ab2d221e Binary files /dev/null and b/windows_libs/mssdk/lib/d3dx8d.lib differ diff --git a/windows_libs/mssdk/lib/d3dx8dt.lib b/windows_libs/mssdk/lib/d3dx8dt.lib new file mode 100644 index 00000000..ffbecfa6 Binary files /dev/null and b/windows_libs/mssdk/lib/d3dx8dt.lib differ diff --git a/windows_libs/mssdk/lib/d3dxd.lib b/windows_libs/mssdk/lib/d3dxd.lib new file mode 100644 index 00000000..8fe687ef Binary files /dev/null and b/windows_libs/mssdk/lib/d3dxd.lib differ diff --git a/windows_libs/mssdk/lib/d3dxof.lib b/windows_libs/mssdk/lib/d3dxof.lib new file mode 100644 index 00000000..c7e51781 Binary files /dev/null and b/windows_libs/mssdk/lib/d3dxof.lib differ diff --git a/windows_libs/mssdk/lib/ddraw.lib b/windows_libs/mssdk/lib/ddraw.lib new file mode 100644 index 00000000..566ceebf Binary files /dev/null and b/windows_libs/mssdk/lib/ddraw.lib differ diff --git a/windows_libs/mssdk/lib/dinput.lib b/windows_libs/mssdk/lib/dinput.lib new file mode 100644 index 00000000..aa74b3fc Binary files /dev/null and b/windows_libs/mssdk/lib/dinput.lib differ diff --git a/windows_libs/mssdk/lib/dinput8.lib b/windows_libs/mssdk/lib/dinput8.lib new file mode 100644 index 00000000..fb025289 Binary files /dev/null and b/windows_libs/mssdk/lib/dinput8.lib differ diff --git a/windows_libs/mssdk/lib/dmoguids.lib b/windows_libs/mssdk/lib/dmoguids.lib new file mode 100644 index 00000000..fe3a8f22 Binary files /dev/null and b/windows_libs/mssdk/lib/dmoguids.lib differ diff --git a/windows_libs/mssdk/lib/dplayx.lib b/windows_libs/mssdk/lib/dplayx.lib new file mode 100644 index 00000000..0ca6bfe8 Binary files /dev/null and b/windows_libs/mssdk/lib/dplayx.lib differ diff --git a/windows_libs/mssdk/lib/dpnaddr.lib b/windows_libs/mssdk/lib/dpnaddr.lib new file mode 100644 index 00000000..850aa9a6 Binary files /dev/null and b/windows_libs/mssdk/lib/dpnaddr.lib differ diff --git a/windows_libs/mssdk/lib/dpnet.lib b/windows_libs/mssdk/lib/dpnet.lib new file mode 100644 index 00000000..73ac2a3a Binary files /dev/null and b/windows_libs/mssdk/lib/dpnet.lib differ diff --git a/windows_libs/mssdk/lib/dpnlobby.lib b/windows_libs/mssdk/lib/dpnlobby.lib new file mode 100644 index 00000000..dfdd2bb3 Binary files /dev/null and b/windows_libs/mssdk/lib/dpnlobby.lib differ diff --git a/windows_libs/mssdk/lib/dpvoice.lib b/windows_libs/mssdk/lib/dpvoice.lib new file mode 100644 index 00000000..bb3faf25 Binary files /dev/null and b/windows_libs/mssdk/lib/dpvoice.lib differ diff --git a/windows_libs/mssdk/lib/dsound.lib b/windows_libs/mssdk/lib/dsound.lib new file mode 100644 index 00000000..7e2f1313 Binary files /dev/null and b/windows_libs/mssdk/lib/dsound.lib differ diff --git a/windows_libs/mssdk/lib/dxerr8.lib b/windows_libs/mssdk/lib/dxerr8.lib new file mode 100644 index 00000000..833170c8 Binary files /dev/null and b/windows_libs/mssdk/lib/dxerr8.lib differ diff --git a/windows_libs/mssdk/lib/dxguid.lib b/windows_libs/mssdk/lib/dxguid.lib new file mode 100644 index 00000000..528f4486 Binary files /dev/null and b/windows_libs/mssdk/lib/dxguid.lib differ diff --git a/windows_libs/mssdk/lib/dxtrans.lib b/windows_libs/mssdk/lib/dxtrans.lib new file mode 100644 index 00000000..2983bbee Binary files /dev/null and b/windows_libs/mssdk/lib/dxtrans.lib differ diff --git a/windows_libs/mssdk/lib/ksproxy.lib b/windows_libs/mssdk/lib/ksproxy.lib new file mode 100644 index 00000000..c7914eaa Binary files /dev/null and b/windows_libs/mssdk/lib/ksproxy.lib differ diff --git a/windows_libs/mssdk/lib/ksuser.lib b/windows_libs/mssdk/lib/ksuser.lib new file mode 100644 index 00000000..9219604f Binary files /dev/null and b/windows_libs/mssdk/lib/ksuser.lib differ diff --git a/windows_libs/mssdk/lib/msdmo.lib b/windows_libs/mssdk/lib/msdmo.lib new file mode 100644 index 00000000..536f640a Binary files /dev/null and b/windows_libs/mssdk/lib/msdmo.lib differ diff --git a/windows_libs/mssdk/lib/qedit.lib b/windows_libs/mssdk/lib/qedit.lib new file mode 100644 index 00000000..97bbe51b Binary files /dev/null and b/windows_libs/mssdk/lib/qedit.lib differ diff --git a/windows_libs/mssdk/lib/quartz.lib b/windows_libs/mssdk/lib/quartz.lib new file mode 100644 index 00000000..06cb77d5 Binary files /dev/null and b/windows_libs/mssdk/lib/quartz.lib differ diff --git a/windows_libs/mssdk/lib/strmiids.lib b/windows_libs/mssdk/lib/strmiids.lib new file mode 100644 index 00000000..314344e0 Binary files /dev/null and b/windows_libs/mssdk/lib/strmiids.lib differ