This commit was manufactured by cvs2svn to create branch

'AVIARY_1_0_20040515_BRANCH'.

git-svn-id: svn://10.0.0.236/branches/AVIARY_1_0_20040515_BRANCH@156431 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
(no author)
2004-05-15 19:32:54 +00:00
parent 6c06bfad8c
commit b4b70055bb
25186 changed files with 5675670 additions and 0 deletions

View File

@@ -0,0 +1,530 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<?codewarrior exportversion="1.0.1" ideversion="4.2" ?>
<!DOCTYPE PROJECT [
<!ELEMENT PROJECT (TARGETLIST, TARGETORDER, GROUPLIST, DESIGNLIST?)>
<!ELEMENT TARGETLIST (TARGET+)>
<!ELEMENT TARGET (NAME, SETTINGLIST, FILELIST?, LINKORDER?, SEGMENTLIST?, OVERLAYGROUPLIST?, SUBTARGETLIST?, SUBPROJECTLIST?, FRAMEWORKLIST)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT USERSOURCETREETYPE (#PCDATA)>
<!ELEMENT PATH (#PCDATA)>
<!ELEMENT FILELIST (FILE*)>
<!ELEMENT FILE (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?, ROOTFILEREF?, FILEKIND?, FILEFLAGS?)>
<!ELEMENT PATHTYPE (#PCDATA)>
<!ELEMENT PATHROOT (#PCDATA)>
<!ELEMENT ACCESSPATH (#PCDATA)>
<!ELEMENT PATHFORMAT (#PCDATA)>
<!ELEMENT ROOTFILEREF (PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>
<!ELEMENT FILEKIND (#PCDATA)>
<!ELEMENT FILEFLAGS (#PCDATA)>
<!ELEMENT FILEREF (TARGETNAME?, PATHTYPE, PATHROOT?, ACCESSPATH?, PATH, PATHFORMAT?)>
<!ELEMENT TARGETNAME (#PCDATA)>
<!ELEMENT SETTINGLIST ((SETTING|PANELDATA)+)>
<!ELEMENT SETTING (NAME?, (VALUE|(SETTING+)))>
<!ELEMENT PANELDATA (NAME, VALUE)>
<!ELEMENT VALUE (#PCDATA)>
<!ELEMENT LINKORDER (FILEREF*)>
<!ELEMENT SEGMENTLIST (SEGMENT+)>
<!ELEMENT SEGMENT (NAME, ATTRIBUTES?, FILEREF*)>
<!ELEMENT ATTRIBUTES (#PCDATA)>
<!ELEMENT OVERLAYGROUPLIST (OVERLAYGROUP+)>
<!ELEMENT OVERLAYGROUP (NAME, BASEADDRESS, OVERLAY*)>
<!ELEMENT BASEADDRESS (#PCDATA)>
<!ELEMENT OVERLAY (NAME, FILEREF*)>
<!ELEMENT SUBTARGETLIST (SUBTARGET+)>
<!ELEMENT SUBTARGET (TARGETNAME, ATTRIBUTES?, FILEREF?)>
<!ELEMENT SUBPROJECTLIST (SUBPROJECT+)>
<!ELEMENT SUBPROJECT (FILEREF, SUBPROJECTTARGETLIST)>
<!ELEMENT SUBPROJECTTARGETLIST (SUBPROJECTTARGET*)>
<!ELEMENT SUBPROJECTTARGET (TARGETNAME, ATTRIBUTES?, FILEREF?)>
<!ELEMENT FRAMEWORKLIST (FRAMEWORK+)>
<!ELEMENT FRAMEWORK (FILEREF, LIBRARYFILE?, VERSION?)>
<!ELEMENT LIBRARYFILE (FILEREF)>
<!ELEMENT VERSION (#PCDATA)>
<!ELEMENT TARGETORDER (ORDEREDTARGET|ORDEREDDESIGN)*>
<!ELEMENT ORDEREDTARGET (NAME)>
<!ELEMENT ORDEREDDESIGN (NAME, ORDEREDTARGET+)>
<!ELEMENT GROUPLIST (GROUP|FILEREF)*>
<!ELEMENT GROUP (NAME, (GROUP|FILEREF)*)>
<!ELEMENT DESIGNLIST (DESIGN+)>
<!ELEMENT DESIGN (NAME, DESIGNDATA)>
<!ELEMENT DESIGNDATA (#PCDATA)>
]>
<PROJECT>
<TARGETLIST>
<TARGET>
<NAME>BasicPluginCarbon</NAME>
<SETTINGLIST>
<!-- Settings for "Source Trees" panel -->
<SETTING><NAME>UserSourceTrees</NAME><VALUE></VALUE></SETTING>
<!-- Settings for "Access Paths" panel -->
<SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>RequireFrameworkStyleIncludes</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>UserSearchPaths</NAME>
<SETTING>
<SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>::</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
</SETTING>
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>:::include:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
</SETTING>
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>:::common:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
</SETTING>
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>::::include:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
</SETTING>
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
</SETTING>
</SETTING>
<SETTING><NAME>SystemSearchPaths</NAME>
<SETTING>
<SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>:MSL:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>
</SETTING>
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>:MacOS Support:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>CodeWarrior</VALUE></SETTING>
</SETTING>
<SETTING><NAME>Recursive</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>FrameworkPath</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>HostFlags</NAME><VALUE>MacOS</VALUE></SETTING>
</SETTING>
</SETTING>
<!-- Settings for "Debugger Runtime" panel -->
<SETTING><NAME>MWRuntimeSettings_WorkingDirectory</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWRuntimeSettings_CommandLine</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWRuntimeSettings_HostApplication</NAME>
<SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>
</SETTING>
<SETTING><NAME>MWRuntimeSettings_EnvVars</NAME><VALUE></VALUE></SETTING>
<!-- Settings for "Target Settings" panel -->
<SETTING><NAME>Linker</NAME><VALUE>MacOS PPC Linker</VALUE></SETTING>
<SETTING><NAME>PreLinker</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>PostLinker</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Targetname</NAME><VALUE>BasicPluginCarbon</VALUE></SETTING>
<SETTING><NAME>OutputDirectory</NAME>
<SETTING><NAME>Path</NAME><VALUE>:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Project</VALUE></SETTING>
</SETTING>
<SETTING><NAME>SaveEntriesUsingRelativePaths</NAME><VALUE>false</VALUE></SETTING>
<!-- Settings for "File Mappings" panel -->
<SETTING><NAME>FileMappings</NAME>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>APPL</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>Appl</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>MMLB</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>MPLF</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>Lib Import PPC</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>MWCD</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>RSRC</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE>.bh</VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>Balloon Help</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE>.c</VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE>.c++</VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE>.cc</VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE>.cp</VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE>.cpp</VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE>.exp</VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE>.h</VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE>.p</VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE>.pas</VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>MW Pascal PPC</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE>.pch</VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE>.pch++</VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>MW C/C++ PPC</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE>C/C++</VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE>.r</VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>Rez</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE>Rez</VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>TEXT</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE>.s</VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>PPCAsm</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>XCOF</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>XCOFF Import PPC</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>docu</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>rsrc</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>shlb</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileType</NAME><VALUE>stub</VALUE></SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE>PEF Import PPC</VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>false</VALUE></SETTING>
</SETTING>
<SETTING>
<SETTING><NAME>FileExtension</NAME><VALUE>.doc</VALUE></SETTING>
<SETTING><NAME>Compiler</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>EditLanguage</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>Precompile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>Launchable</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>ResourceFile</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>IgnoredByMake</NAME><VALUE>true</VALUE></SETTING>
</SETTING>
</SETTING>
<!-- Settings for "Build Extras" panel -->
<SETTING><NAME>CacheModDates</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ActivateBrowser</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>DumpBrowserInfo</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>CacheSubprojects</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>UseThirdPartyDebugger</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>DebuggerAppPath</NAME>
<SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>
</SETTING>
<SETTING><NAME>DebuggerCmdLineArgs</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>DebuggerWorkingDir</NAME>
<SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>
</SETTING>
<!-- Settings for "Debugger Target" panel -->
<SETTING><NAME>LogSystemMessages</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>AutoTargetDLLs</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>StopAtWatchpoints</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>PauseWhileRunning</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>PauseInterval</NAME><VALUE>5</VALUE></SETTING>
<SETTING><NAME>PauseUIFlags</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>AltExePath</NAME>
<SETTING><NAME>Path</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>Generic</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>
</SETTING>
<SETTING><NAME>StopAtTempBPOnLaunch</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>CacheSymbolics</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>TempBPFunctionName</NAME><VALUE>main</VALUE></SETTING>
<SETTING><NAME>TempBPType</NAME><VALUE>0</VALUE></SETTING>
<!-- Settings for "Remote Debug" panel -->
<SETTING><NAME>Enabled</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>ConnectionName</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>DownloadPath</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>LaunchRemoteApp</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>RemoteAppPath</NAME><VALUE></VALUE></SETTING>
<!-- Settings for "Auto-target" panel -->
<SETTING><NAME>OtherExecutables</NAME><VALUE></VALUE></SETTING>
<!-- Settings for "Custom Keywords" panel -->
<SETTING><NAME>CustomColor1</NAME>
<SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>Green</NAME><VALUE>39321</VALUE></SETTING>
<SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>
</SETTING>
<SETTING><NAME>CustomColor2</NAME>
<SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>
<SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>
</SETTING>
<SETTING><NAME>CustomColor3</NAME>
<SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>
<SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>
</SETTING>
<SETTING><NAME>CustomColor4</NAME>
<SETTING><NAME>Red</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>Green</NAME><VALUE>32767</VALUE></SETTING>
<SETTING><NAME>Blue</NAME><VALUE>0</VALUE></SETTING>
</SETTING>
<!-- Settings for "C/C++ Compiler" panel -->
<SETTING><NAME>MWFrontEnd_C_cplusplus</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_checkprotos</NAME><VALUE>1</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_arm</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_trigraphs</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>1</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>pluginCarbonPrefix.h</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_enableexceptions</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_dontreusestrings</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_poolstrings</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_dontinline</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_useRTTI</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_multibyteaware</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_unsignedchars</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_autoinline</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_booltruefalse</NAME><VALUE>1</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_direct_to_som</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_som_env_check</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_alwaysinline</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_inlinelevel</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_ecplusplus</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_objective_c</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_defer_codegen</NAME><VALUE>0</VALUE></SETTING>
<!-- Settings for "C/C++ Warnings" panel -->
<SETTING><NAME>MWWarning_C_warn_illpragma</NAME><VALUE>1</VALUE></SETTING>
<SETTING><NAME>MWWarning_C_warn_emptydecl</NAME><VALUE>1</VALUE></SETTING>
<SETTING><NAME>MWWarning_C_warn_possunwant</NAME><VALUE>1</VALUE></SETTING>
<SETTING><NAME>MWWarning_C_warn_unusedvar</NAME><VALUE>1</VALUE></SETTING>
<SETTING><NAME>MWWarning_C_warn_unusedarg</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWWarning_C_warn_extracomma</NAME><VALUE>1</VALUE></SETTING>
<SETTING><NAME>MWWarning_C_pedantic</NAME><VALUE>1</VALUE></SETTING>
<SETTING><NAME>MWWarning_C_warningerrors</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWWarning_C_warn_hidevirtual</NAME><VALUE>1</VALUE></SETTING>
<SETTING><NAME>MWWarning_C_warn_implicitconv</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWWarning_C_warn_notinlined</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWWarning_C_warn_structclass</NAME><VALUE>0</VALUE></SETTING>
<!-- Settings for "FTP Panel" panel -->
<SETTING><NAME>MWFTP_Post_hostName</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_username</NAME><VALUE></VALUE></SETTING>
<SETTING><NAME>MWFTP_Post_password</NAME><VALUE>263pi6sn63j4esi,p'

View File

@@ -0,0 +1,296 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "plugin.h"
#include <string.h>
#if !TARGET_API_MAC_CARBON
extern QDGlobals* gQDPtr;
#endif
//////////////////////////////////////
//
// general initialization and shutdown
//
NPError NS_PluginInitialize()
{
return NPERR_NO_ERROR;
}
void NS_PluginShutdown()
{
}
/////////////////////////////////////////////////////////////
//
// construction and destruction of our plugin instance object
//
nsPluginInstanceBase * NS_NewPluginInstance(nsPluginCreateData * aCreateDataStruct)
{
if(!aCreateDataStruct)
return NULL;
nsPluginInstance * plugin = new nsPluginInstance(aCreateDataStruct->instance);
return plugin;
}
void NS_DestroyPluginInstance(nsPluginInstanceBase * aPlugin)
{
if(aPlugin)
delete (nsPluginInstance *)aPlugin;
}
////////////////////////////////////////
//
// nsPluginInstance class implementation
//
nsPluginInstance::nsPluginInstance(NPP aInstance) : nsPluginInstanceBase(),
mInstance(aInstance),
mInitialized(FALSE)
{
mWindow = NULL;
}
nsPluginInstance::~nsPluginInstance()
{
}
NPBool nsPluginInstance::init(NPWindow* aWindow)
{
if(aWindow == NULL)
return FALSE;
mWindow = aWindow;
mInitialized = TRUE;
mSaveClip = NewRgn();
return TRUE;
}
void nsPluginInstance::shut()
{
mWindow = NULL;
mInitialized = FALSE;
}
NPBool nsPluginInstance::isInitialized()
{
return mInitialized;
}
const char * nsPluginInstance::getVersion()
{
return NPN_UserAgent(mInstance);
}
/////////////////////////////////////////////////////////////
//
// DrawString
//
void
nsPluginInstance::DrawString(const unsigned char* text,
short width,
short height,
short centerX,
Rect drawRect)
{
short length, textHeight, textWidth;
if(text == NULL)
return;
length = strlen((char*)text);
TextFont(1);
TextFace(bold);
TextMode(srcCopy);
TextSize(12);
FontInfo fontInfo;
GetFontInfo(&fontInfo);
textHeight = fontInfo.ascent + fontInfo.descent + fontInfo.leading;
textWidth = TextWidth(text, 0, length);
if (width > textWidth && height > textHeight)
{
MoveTo(centerX - (textWidth >> 1), height >> 1);
DrawText(text, 0, length);
}
}
/////////////////////////////////////////////////////////////
//
// DoDraw - paint
//
void
nsPluginInstance::DoDraw(void)
{
Rect drawRect;
RGBColor black = { 0x0000, 0x0000, 0x0000 };
RGBColor white = { 0xFFFF, 0xFFFF, 0xFFFF };
SInt32 height = mWindow->height;
SInt32 width = mWindow->width;
SInt32 centerX = (width) >> 1;
SInt32 centerY = (height) >> 1;
const char * ua = getVersion();
char* pascalString = (char*) NPN_MemAlloc(strlen(ua) + 1);
strcpy(pascalString, ua);
UInt8 *pTheText = (unsigned char*) ua;
drawRect.top = 0;
drawRect.left = 0;
drawRect.bottom = drawRect.top + height;
drawRect.right = drawRect.left + width;
PenNormal();
RGBForeColor(&black);
RGBBackColor(&white);
#if !TARGET_API_MAC_CARBON
FillRect(&drawRect, &(gQDPtr->white));
#else
Pattern qdWhite;
FillRect(&drawRect, GetQDGlobalsWhite(&qdWhite));
#endif
FrameRect(&drawRect);
DrawString(pTheText, width, height, centerX, drawRect);
}
/////////////////////////////////////////////////////////////
//
// SetWindow
//
NPError
nsPluginInstance::SetWindow(NPWindow* window)
{
mWindow = window;
if( StartDraw(window) ) {
DoDraw();
EndDraw(window);
}
return NPERR_NO_ERROR;
}
/////////////////////////////////////////////////////////////
//
// HandleEvent
//
uint16
nsPluginInstance::HandleEvent(void* event)
{
int16 eventHandled = FALSE;
EventRecord* ev = (EventRecord*) event;
if (event != NULL)
{
switch (ev->what)
{
/*
* Draw ourselves on update events
*/
case updateEvt:
if( StartDraw(mWindow) ) {
DoDraw();
EndDraw(mWindow);
}
eventHandled = true;
break;
default:
break;
}
}
return eventHandled;
}
/////////////////////////////////////////////////////////////
//
// StartDraw - setup port state
//
NPBool
nsPluginInstance::StartDraw(NPWindow* window)
{
if (mWindow == NULL)
return false;
NP_Port* npport = (NP_Port*) mWindow->window;
CGrafPtr ourPort = npport->port;
if (mWindow->clipRect.left < mWindow->clipRect.right)
{
GetPort(&mSavePort);
SetPort((GrafPtr) ourPort);
Rect portRect;
#if !TARGET_API_MAC_CARBON
portRect = ourPort->portRect;
#else
GetPortBounds(ourPort, &portRect);
#endif
mSavePortTop = portRect.top;
mSavePortLeft = portRect.left;
GetClip(mSaveClip);
mRevealedRect.top = mWindow->clipRect.top + npport->porty;
mRevealedRect.left = mWindow->clipRect.left + npport->portx;
mRevealedRect.bottom = mWindow->clipRect.bottom + npport->porty;
mRevealedRect.right = mWindow->clipRect.right + npport->portx;
SetOrigin(npport->portx, npport->porty);
ClipRect(&mRevealedRect);
return true;
}
else
return false;
}
/////////////////////////////////////////////////////////////
//
// EndDraw - restore port state
//
void
nsPluginInstance::EndDraw(NPWindow* window)
{
SetOrigin(mSavePortLeft, mSavePortTop);
SetClip(mSaveClip);
SetPort(mSavePort);
}

View File

@@ -0,0 +1,73 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __PLUGIN_H__
#define __PLUGIN_H__
#include "pluginbase.h"
class nsPluginInstance : public nsPluginInstanceBase
{
public:
nsPluginInstance(NPP aInstance);
~nsPluginInstance();
NPBool init(NPWindow* aWindow);
void shut();
NPBool isInitialized();
NPError SetWindow(NPWindow* pNPWindow);
uint16 HandleEvent(void* event);
private:
// locals
const char * getVersion();
void DoDraw();
NPBool StartDraw(NPWindow* window);
void EndDraw(NPWindow* window);
void DrawString(const unsigned char* text, short width, short height, short centerX, Rect drawRect);
NPWindow * mWindow;
NPP mInstance;
NPBool mInitialized;
GrafPtr mSavePort;
RgnHandle mSaveClip;
Rect mRevealedRect;
short mSavePortTop;
short mSavePortLeft;
};
#endif // __PLUGIN_H__

View File

@@ -0,0 +1,25 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#define XP_MAC 1
#define TARGET_CARBON 1
#define MOZILLA_STRICT_API

View File

@@ -0,0 +1,24 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* The contents of this file are subject to the Netscape Public
* License Version 1.1 (the "License"); you may not use this file
* except in compliance with the License. You may obtain a copy of
* the License at http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
* implied. See the License for the specific language governing
* rights and limitations under the License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is Netscape
* Communications Corporation. Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation. All
* Rights Reserved.
*
* Contributor(s):
*/
#define XP_MAC 1
#define MOZILLA_STRICT_API

View File

@@ -0,0 +1,16 @@
<html>
<body>
<center><h1>Basic Plugin Example for Mozilla Test Case</h1></center>
This test case is to demonstrate the Basic Plugin example. You should see the
plugin window with the black frame aroung it and the browser user agent string
which plugin draws inside the window.
<br><br>
<center>
<embed type="application/basic-plugin" width=600 height=40>
</center>
</html>
</body>

View File

@@ -0,0 +1,63 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
#
DEPTH = ../../../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
LIBRARY_NAME = npSDKbasic
REQUIRES = java \
idl \
xpcom \
nspr \
$(NULL)
CPPSRCS = plugin.cpp
SHARED_LIBRARY_LIBS = \
$(DIST)/lib/libplugingate_s.$(LIB_SUFFIX) \
include $(topsrcdir)/config/rules.mk
DEFINES += -DMOZILLA_STRICT_API
EXTRA_DSO_LDOPTS += $(XLDFLAGS) -rdynamic -lXi -lXext -lX11 -lm -lXt
INSTALL_PLUGIN = $(CONFIG_TOOLS)/nsinstall -R
INSTALL = true
ifeq ($(OS_ARCH), UNIX)
# This needs to get defined for npapi.h on unix platforms.
DEFINES += -DXP_UNIX
endif
LOCAL_INCLUDES += -I$(srcdir)/../../include -I$(srcdir)/../../../include
install-plugin: $(SHARED_LIBRARY)
ifdef SHARED_LIBRARY
$(INSTALL_PLUGIN) $(SHARED_LIBRARY) $(DIST)/bin/plugins
endif
libs:: install-plugin

View File

@@ -0,0 +1,230 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include "plugin.h"
#define MIME_TYPES_HANDLED "application/basic-plugin"
#define PLUGIN_NAME "Basic Example Plug-in for Mozilla"
#define MIME_TYPES_DESCRIPTION MIME_TYPES_HANDLED":bsc:"PLUGIN_NAME
fine PLUGIN_DESCRIPTION PLUGIN_NAME " (Plug-ins SDK sample)"
char* NPP_GetMIMEDescription(void)
{
return(MIME_TYPES_DESCRIPTION);
}
/////////////////////////////////////
// general initialization and shutdown
//
NPError NS_PluginInitialize()
{
return NPERR_NO_ERROR;
}
void NS_PluginShutdown()
{
}
// get values per plugin
NPError NS_PluginGetValue(NPPVariable aVariable, void *aValue)
{
NPError err = NPERR_NO_ERROR;
switch (aVariable) {
case NPPVpluginNameString:
*((char **)aValue) = PLUGIN_NAME;
break;
case NPPVpluginDescriptionString:
*((char **)aValue) = PLUGIN_DESCRIPTION;
break;
default:
err = NPERR_INVALID_PARAM;
break;
}
return err;
}
/////////////////////////////////////////////////////////////
//
// construction and destruction of our plugin instance object
//
nsPluginInstanceBase * NS_NewPluginInstance(nsPluginCreateData * aCreateDataStruct)
{
if(!aCreateDataStruct)
return NULL;
nsPluginInstance * plugin = new nsPluginInstance(aCreateDataStruct->instance);
return plugin;
}
void NS_DestroyPluginInstance(nsPluginInstanceBase * aPlugin)
{
if(aPlugin)
delete (nsPluginInstance *)aPlugin;
}
////////////////////////////////////////
//
// nsPluginInstance class implementation
//
nsPluginInstance::nsPluginInstance(NPP aInstance) : nsPluginInstanceBase(),
mInstance(aInstance),
mInitialized(FALSE),
mWindow(0),
mXtwidget(0),
mFontInfo(0)
{
}
nsPluginInstance::~nsPluginInstance()
{
}
static void
xt_event_handler(Widget xtwidget, nsPluginInstance *plugin, XEvent *xevent, Boolean *b)
{
switch (xevent->type) {
case Expose:
// get rid of all other exposure events
if (plugin) {
//while(XCheckTypedWindowEvent(plugin->Display(), plugin->Window(), Expose, xevent));
plugin->draw();
}
default:
break;
}
}
void nsPluginInstance::draw()
{
unsigned int h = mHeight/2;
unsigned int w = 3 * mWidth/4;
int x = (mWidth - w)/2; // center
int y = h/2;
if (x >= 0 && y >= 0) {
GC gc = XCreateGC(mDisplay, mWindow, 0, NULL);
if (!gc)
return;
XDrawRectangle(mDisplay, mWindow, gc, x, y, w, h);
const char *string = getVersion();
if (string && *string) {
int l = strlen(string);
int fmba = mFontInfo->max_bounds.ascent;
int fmbd = mFontInfo->max_bounds.descent;
int fh = fmba + fmbd;
y += fh;
x += 32;
XDrawString(mDisplay, mWindow, gc, x, y, string, l);
}
XFreeGC(mDisplay, gc);
}
}
NPBool nsPluginInstance::init(NPWindow* aWindow)
{
if(aWindow == NULL)
return FALSE;
if (SetWindow(aWindow))
mInitialized = TRUE;
return mInitialized;
}
void nsPluginInstance::shut()
{
mInitialized = FALSE;
}
const char * nsPluginInstance::getVersion()
{
return NPN_UserAgent(mInstance);
}
NPError nsPluginInstance::GetValue(NPPVariable aVariable, void *aValue)
{
NPError err = NPERR_NO_ERROR;
switch (aVariable) {
case NPPVpluginNameString:
case NPPVpluginDescriptionString:
return NS_PluginGetValue(aVariable, aValue) ;
break;
default:
err = NPERR_INVALID_PARAM;
break;
}
return err;
}
NPError nsPluginInstance::SetWindow(NPWindow* aWindow)
{
if(aWindow == NULL)
return FALSE;
mX = aWindow->x;
mY = aWindow->y;
mWidth = aWindow->width;
mHeight = aWindow->height;
if (mWindow == (Window) aWindow->window) {
// The page with the plugin is being resized.
// Save any UI information because the next time
// around expect a SetWindow with a new window id.
} else {
mWindow = (Window) aWindow->window;
NPSetWindowCallbackStruct *ws_info = (NPSetWindowCallbackStruct *)aWindow->ws_info;
mDisplay = ws_info->display;
mVisual = ws_info->visual;
mDepth = ws_info->depth;
mColormap = ws_info->colormap;
if (!mFontInfo) {
if (!(mFontInfo = XLoadQueryFont(mDisplay, "9x15")))
printf("Cannot open 9X15 font\n");
}
// add xt event handler
Widget xtwidget = XtWindowToWidget(mDisplay, mWindow);
if (xtwidget && mXtwidget != xtwidget) {
mXtwidget = xtwidget;
long event_mask = ExposureMask;
XSelectInput(mDisplay, mWindow, event_mask);
XtAddEventHandler(xtwidget, event_mask, False, (XtEventHandler)xt_event_handler, this);
}
}
draw();
return TRUE;
}

View File

@@ -0,0 +1,80 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __PLUGIN_H__
#define __PLUGIN_H__
/* Xlib/Xt stuff */
#include <X11/Xlib.h>
#include <X11/Intrinsic.h>
#include <X11/cursorfont.h>
#include "pluginbase.h"
class nsPluginInstance : public nsPluginInstanceBase
{
public:
nsPluginInstance(NPP aInstance);
virtual ~nsPluginInstance();
NPBool init(NPWindow* aWindow);
void shut();
NPBool isInitialized() {return mInitialized;}
NPError GetValue(NPPVariable variable, void *value);
NPError SetWindow(NPWindow* aWindow);
// locals
const char * getVersion();
void draw();
private:
NPP mInstance;
NPBool mInitialized;
Window mWindow;
Display *mDisplay;
Widget mXtwidget;
int mX, mY;
int mWidth, mHeight;
Visual* mVisual;
Colormap mColormap;
unsigned int mDepth;
XFontStruct *mFontInfo;
GC mGC;
};
#endif // __PLUGIN_H__

View File

@@ -0,0 +1,54 @@
#
# The contents of this file are subject to the Netscape Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/NPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is Netscape
# Communications Corporation. Portions created by Netscape are
# Copyright (C) 1998 Netscape Communications Corporation. All
# Rights Reserved.
#
# Contributor(s):
DEPTH = ../../../../../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
XPIDL_MODULE = npbasic
LIBRARY_NAME = npbasic
NO_DIST_INSTALL = 1
REQUIRES = plugin \
java \
$(NULL)
CPPSRCS = plugin.cpp
SHARED_LIBRARY_LIBS = ../../common/$(LIB_PREFIX)plugingate_s.$(LIB_SUFFIX)
DEFFILE = $(srcdir)/basic.def
RESFILE = basic.res
ifdef GNU_CC
OS_LIBS += -lgdi32
endif
include $(topsrcdir)/config/rules.mk
DEFINES += -DMOZILLA_STRICT_API
LOCAL_INCLUDES = -I$(srcdir)/../../include \
-I$(srcdir)/../../../include \
$(NULL)

View File

@@ -0,0 +1,6 @@
LIBRARY NPBASIC
EXPORTS
NP_GetEntryPoints @1
NP_Initialize @2
NP_Shutdown @3

View File

@@ -0,0 +1,112 @@
//Microsoft Developer Studio generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 2 resource.
//
#include "winresrc.h"
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
#ifdef _WIN32
LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
#pragma code_page(1252)
#endif //_WIN32
#ifndef _MAC
/////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 1,0,0,1
PRODUCTVERSION 1,0,0,1
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x40004L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904e4"
BEGIN
VALUE "Comments", "\0"
VALUE "CompanyName", " \0"
VALUE "FileDescription", "npbasic\0"
VALUE "FileExtents", "bic\0"
VALUE "FileOpenName", "npbasic\0"
VALUE "FileVersion", "1, 0, 0, 1\0"
VALUE "InternalName", "npbasic\0"
VALUE "LegalCopyright", "Copyright © 2001\0"
VALUE "LegalTrademarks", "\0"
VALUE "MIMEType", "application/basic-plugin\0"
VALUE "OriginalFilename", "npbasic.dll\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Basic Example Plugin for Mozilla\0"
VALUE "ProductVersion", "1, 0, 0, 1\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1252
END
END
#endif // !_MAC
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE DISCARDABLE
BEGIN
"resource.h\0"
END
2 TEXTINCLUDE DISCARDABLE
BEGIN
"#include ""winresrc.h""\r\n"
"\0"
END
3 TEXTINCLUDE DISCARDABLE
BEGIN
"\r\n"
"\0"
END
#endif // APSTUDIO_INVOKED
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@@ -0,0 +1,131 @@
# Microsoft Developer Studio Project File - Name="npbasic" - Package Owner=<4>
# Microsoft Developer Studio Generated Build File, Format Version 6.00
# ** DO NOT EDIT **
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=npbasic - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
!MESSAGE
!MESSAGE NMAKE /f "npbasic.mak".
!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
!MESSAGE
!MESSAGE NMAKE /f "npbasic.mak" CFG="npbasic - Win32 Debug"
!MESSAGE
!MESSAGE Possible choices for configuration are:
!MESSAGE
!MESSAGE "npbasic - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "npbasic - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# PROP Scc_ProjName ""
# PROP Scc_LocalPath ""
CPP=cl.exe
MTL=midl.exe
RSC=rc.exe
!IF "$(CFG)" == "npbasic - Win32 Release"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 0
# PROP BASE Output_Dir "Release"
# PROP BASE Intermediate_Dir "Release"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 0
# PROP Output_Dir "Release"
# PROP Intermediate_Dir "Release"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPBASIC_EXPORTS" /YX /FD /c
# ADD CPP /nologo /MT /W3 /GX /O2 /I "..\..\include" /I "..\..\..\include" /D "NDEBUG" /D "MOZILLA_STRICT_API" /D "XP_WIN" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPBASIC_EXPORTS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "NDEBUG"
# ADD RSC /l 0x409 /d "NDEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
# ADD LINK32 kernel32.lib user32.lib gdi32.lib /nologo /dll /machine:I386
!ELSEIF "$(CFG)" == "npbasic - Win32 Debug"
# PROP BASE Use_MFC 0
# PROP BASE Use_Debug_Libraries 1
# PROP BASE Output_Dir "Debug"
# PROP BASE Intermediate_Dir "Debug"
# PROP BASE Target_Dir ""
# PROP Use_MFC 0
# PROP Use_Debug_Libraries 1
# PROP Output_Dir "Debug"
# PROP Intermediate_Dir "Debug"
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPBASIC_EXPORTS" /YX /FD /GZ /c
# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\include" /I "..\..\..\include" /D "_DEBUG" /D "MOZILLA_STRICT_API" /D "XP_WIN" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NPBASIC_EXPORTS" /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0x409 /d "_DEBUG"
# ADD RSC /l 0x409 /d "_DEBUG"
BSC32=bscmake.exe
# ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
!ENDIF
# Begin Target
# Name "npbasic - Win32 Release"
# Name "npbasic - Win32 Debug"
# Begin Group "Source Files"
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
# Begin Source File
SOURCE=.\basic.def
# End Source File
# Begin Source File
SOURCE=..\..\common\np_entry.cpp
# End Source File
# Begin Source File
SOURCE=..\..\common\npn_gate.cpp
# End Source File
# Begin Source File
SOURCE=..\..\common\npp_gate.cpp
# End Source File
# Begin Source File
SOURCE=.\plugin.cpp
# End Source File
# End Group
# Begin Group "Header Files"
# PROP Default_Filter "h;hpp;hxx;hm;inl"
# Begin Source File
SOURCE=.\plugin.h
# End Source File
# End Group
# Begin Group "Resource Files"
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
# Begin Source File
SOURCE=.\basic.rc
# End Source File
# End Group
# End Target
# End Project

View File

@@ -0,0 +1,29 @@
Microsoft Developer Studio Workspace File, Format Version 6.00
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
###############################################################################
Project: "npbasic"=.\npbasic.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
}}}
###############################################################################
Global:
Package=<5>
{{{
}}}
Package=<3>
{{{
}}}
###############################################################################

View File

@@ -0,0 +1,164 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#include <windows.h>
#include <windowsx.h>
#include "plugin.h"
//////////////////////////////////////
//
// general initialization and shutdown
//
NPError NS_PluginInitialize()
{
return NPERR_NO_ERROR;
}
void NS_PluginShutdown()
{
}
/////////////////////////////////////////////////////////////
//
// construction and destruction of our plugin instance object
//
nsPluginInstanceBase * NS_NewPluginInstance(nsPluginCreateData * aCreateDataStruct)
{
if(!aCreateDataStruct)
return NULL;
nsPluginInstance * plugin = new nsPluginInstance(aCreateDataStruct->instance);
return plugin;
}
void NS_DestroyPluginInstance(nsPluginInstanceBase * aPlugin)
{
if(aPlugin)
delete (nsPluginInstance *)aPlugin;
}
////////////////////////////////////////
//
// nsPluginInstance class implementation
//
nsPluginInstance::nsPluginInstance(NPP aInstance) : nsPluginInstanceBase(),
mInstance(aInstance),
mInitialized(FALSE)
{
mhWnd = NULL;
}
nsPluginInstance::~nsPluginInstance()
{
}
static LRESULT CALLBACK PluginWinProc(HWND, UINT, WPARAM, LPARAM);
static WNDPROC lpOldProc = NULL;
NPBool nsPluginInstance::init(NPWindow* aWindow)
{
if(aWindow == NULL)
return FALSE;
mhWnd = (HWND)aWindow->window;
if(mhWnd == NULL)
return FALSE;
// subclass window so we can intercept window messages and
// do our drawing to it
lpOldProc = SubclassWindow(mhWnd, (WNDPROC)PluginWinProc);
// associate window with our nsPluginInstance object so we can access
// it in the window procedure
SetWindowLong(mhWnd, GWL_USERDATA, (LONG)this);
mInitialized = TRUE;
return TRUE;
}
void nsPluginInstance::shut()
{
// subclass it back
SubclassWindow(mhWnd, lpOldProc);
mhWnd = NULL;
mInitialized = FALSE;
}
NPBool nsPluginInstance::isInitialized()
{
return mInitialized;
}
const char * nsPluginInstance::getVersion()
{
return NPN_UserAgent(mInstance);
}
static LRESULT CALLBACK PluginWinProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
switch (msg) {
case WM_PAINT:
{
// draw a frame and display the string
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hWnd, &ps);
RECT rc;
GetClientRect(hWnd, &rc);
FrameRect(hdc, &rc, GetStockBrush(BLACK_BRUSH));
// get our plugin instance object and ask it for the version string
nsPluginInstance *plugin = (nsPluginInstance *)GetWindowLong(hWnd, GWL_USERDATA);
if (plugin) {
const char * string = plugin->getVersion();
DrawText(hdc, string, strlen(string), &rc, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
}
else {
char string[] = "Error occured";
DrawText(hdc, string, strlen(string), &rc, DT_SINGLELINE | DT_CENTER | DT_VCENTER);
}
EndPaint(hWnd, &ps);
}
break;
default:
break;
}
return DefWindowProc(hWnd, msg, wParam, lParam);
}

View File

@@ -0,0 +1,62 @@
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Netscape Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/NPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the NPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the NPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
#ifndef __PLUGIN_H__
#define __PLUGIN_H__
#include "pluginbase.h"
class nsPluginInstance : public nsPluginInstanceBase
{
public:
nsPluginInstance(NPP aInstance);
~nsPluginInstance();
NPBool init(NPWindow* aWindow);
void shut();
NPBool isInitialized();
// locals
const char * getVersion();
private:
NPP mInstance;
NPBool mInitialized;
HWND mhWnd;
};
#endif // __PLUGIN_H__

View File

@@ -0,0 +1,20 @@
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by basic.rc
//
#define IDD_MAIN 101
#define IDC_BUTTON_GO 1002
#define IDC_STATIC_UA 1003
#define IDC_BUTTON1 1005
#define IDC_BUTTON_DONT 1005
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 102
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1006
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif