Hollywood SDK 9.0 the Cross-Platform Multimedia Application Layer
Total Page:16
File Type:pdf, Size:1020Kb
Hollywood SDK 9.0 The Cross-Platform Multimedia Application Layer Andreas Falkenhahn i Table of Contents 1 General information::::::::::::::::::::::::::::: 1 1.1 Introduction :::::::::::::::::::::::::::::::::::::::::::::::::::: 1 1.2 Terms and conditions ::::::::::::::::::::::::::::::::::::::::::: 1 1.3 Requirements::::::::::::::::::::::::::::::::::::::::::::::::::: 3 1.4 Examples::::::::::::::::::::::::::::::::::::::::::::::::::::::: 3 1.5 History ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 4 1.6 Contact :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 5 2 Conceptual overview :::::::::::::::::::::::::::: 7 2.1 Getting started ::::::::::::::::::::::::::::::::::::::::::::::::: 7 2.2 Plugin types and Hollywood APIs :::::::::::::::::::::::::::::: 7 2.3 What is a Hollywood plugin? ::::::::::::::::::::::::::::::::::: 9 2.4 Basic plugin design :::::::::::::::::::::::::::::::::::::::::::: 10 2.5 Auto and manual init plugins :::::::::::::::::::::::::::::::::: 10 2.6 Compiling plugins ::::::::::::::::::::::::::::::::::::::::::::: 13 2.7 Error codes:::::::::::::::::::::::::::::::::::::::::::::::::::: 14 2.8 Data types :::::::::::::::::::::::::::::::::::::::::::::::::::: 14 2.9 Version compatibility :::::::::::::::::::::::::::::::::::::::::: 14 2.10 Tag lists ::::::::::::::::::::::::::::::::::::::::::::::::::::: 16 2.11 Unicode support ::::::::::::::::::::::::::::::::::::::::::::: 16 2.12 File IO information::::::::::::::::::::::::::::::::::::::::::: 18 2.13 File attributes :::::::::::::::::::::::::::::::::::::::::::::::: 18 2.14 Bitmap information :::::::::::::::::::::::::::::::::::::::::: 19 2.15 Pixel formats::::::::::::::::::::::::::::::::::::::::::::::::: 20 2.16 Differences between Hollywood and Lua :::::::::::::::::::::: 22 2.17 Object identifiers ::::::::::::::::::::::::::::::::::::::::::::: 23 2.18 Designer compatibility:::::::::::::::::::::::::::::::::::::::: 25 2.19 Multithreading ::::::::::::::::::::::::::::::::::::::::::::::: 26 2.20 Legacy plugins ::::::::::::::::::::::::::::::::::::::::::::::: 26 3 AmigaOS peculiarities ::::::::::::::::::::::::: 27 3.1 Glue code ::::::::::::::::::::::::::::::::::::::::::::::::::::: 27 3.2 C runtime limitations:::::::::::::::::::::::::::::::::::::::::: 28 3.3 clib2 versus newlib :::::::::::::::::::::::::::::::::::::::::::: 29 3.4 saveds keyword :::::::::::::::::::::::::::::::::::::::::::::: 29 3.5 Building for 68881 and 68882 :::::::::::::::::::::::::::::::::: 30 3.6 Building for WarpOS :::::::::::::::::::::::::::::::::::::::::: 31 4 Anim plugins ::::::::::::::::::::::::::::::::::: 33 4.1 Overview :::::::::::::::::::::::::::::::::::::::::::::::::::::: 33 4.2 CloseAnim :::::::::::::::::::::::::::::::::::::::::::::::::::: 33 4.3 FreeFrame::::::::::::::::::::::::::::::::::::::::::::::::::::: 34 ii Hollywood SDK 4.4 FreeVectorFrame :::::::::::::::::::::::::::::::::::::::::::::: 34 4.5 GetFrame ::::::::::::::::::::::::::::::::::::::::::::::::::::: 34 4.6 GetFrameDelay:::::::::::::::::::::::::::::::::::::::::::::::: 35 4.7 LoadFrame :::::::::::::::::::::::::::::::::::::::::::::::::::: 36 4.8 OpenAnim :::::::::::::::::::::::::::::::::::::::::::::::::::: 38 4.9 TransformFrame::::::::::::::::::::::::::::::::::::::::::::::: 40 5 Anim saver plugins::::::::::::::::::::::::::::: 43 5.1 Overview :::::::::::::::::::::::::::::::::::::::::::::::::::::: 43 5.2 BeginAnimStream ::::::::::::::::::::::::::::::::::::::::::::: 43 5.3 FinishAnimStream :::::::::::::::::::::::::::::::::::::::::::: 44 5.4 RegisterAnimSaver :::::::::::::::::::::::::::::::::::::::::::: 45 5.5 WriteAnimFrame :::::::::::::::::::::::::::::::::::::::::::::: 46 6 Audio adapter plugins ::::::::::::::::::::::::: 49 6.1 Overview :::::::::::::::::::::::::::::::::::::::::::::::::::::: 49 6.2 AllocAudioChannel :::::::::::::::::::::::::::::::::::::::::::: 49 6.3 CloseAudio :::::::::::::::::::::::::::::::::::::::::::::::::::: 51 6.4 FreeAudioChannel ::::::::::::::::::::::::::::::::::::::::::::: 51 6.5 OpenAudio:::::::::::::::::::::::::::::::::::::::::::::::::::: 51 6.6 SetChannelAttributes:::::::::::::::::::::::::::::::::::::::::: 52 7 Base plugin functions :::::::::::::::::::::::::: 53 7.1 Overview :::::::::::::::::::::::::::::::::::::::::::::::::::::: 53 7.2 ClosePlugin ::::::::::::::::::::::::::::::::::::::::::::::::::: 53 7.3 InitPlugin ::::::::::::::::::::::::::::::::::::::::::::::::::::: 53 8 Convert script plugins ::::::::::::::::::::::::: 59 8.1 Overview :::::::::::::::::::::::::::::::::::::::::::::::::::::: 59 8.2 FreeScript ::::::::::::::::::::::::::::::::::::::::::::::::::::: 59 8.3 GetScript ::::::::::::::::::::::::::::::::::::::::::::::::::::: 59 9 Directory adapter plugins ::::::::::::::::::::: 61 9.1 Overview :::::::::::::::::::::::::::::::::::::::::::::::::::::: 61 9.2 CloseDir :::::::::::::::::::::::::::::::::::::::::::::::::::::: 61 9.3 NextDirEntry ::::::::::::::::::::::::::::::::::::::::::::::::: 62 9.4 OpenDir :::::::::::::::::::::::::::::::::::::::::::::::::::::: 63 9.5 RewindDir :::::::::::::::::::::::::::::::::::::::::::::::::::: 64 9.6 StatDir:::::::::::::::::::::::::::::::::::::::::::::::::::::::: 64 iii 10 Display adapter plugins :::::::::::::::::::::: 67 10.1 Overview::::::::::::::::::::::::::::::::::::::::::::::::::::: 67 10.2 ActivateDisplay :::::::::::::::::::::::::::::::::::::::::::::: 69 10.3 AdapterMainLoop :::::::::::::::::::::::::::::::::::::::::::: 69 10.4 AllocBitMap ::::::::::::::::::::::::::::::::::::::::::::::::: 70 10.5 AllocVideoBitMap ::::::::::::::::::::::::::::::::::::::::::: 72 10.6 BeginDoubleBuffer ::::::::::::::::::::::::::::::::::::::::::: 75 10.7 BltBitMap ::::::::::::::::::::::::::::::::::::::::::::::::::: 75 10.8 ChangeBufferSize::::::::::::::::::::::::::::::::::::::::::::: 80 10.9 CloseDisplay ::::::::::::::::::::::::::::::::::::::::::::::::: 81 10.10 Cls:::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 81 10.11 CreatePointer ::::::::::::::::::::::::::::::::::::::::::::::: 82 10.12 DetermineBorderSizes ::::::::::::::::::::::::::::::::::::::: 83 10.13 DoVideoBitMapMethod ::::::::::::::::::::::::::::::::::::: 83 10.14 EndDoubleBuffer:::::::::::::::::::::::::::::::::::::::::::: 84 10.15 Flip ::::::::::::::::::::::::::::::::::::::::::::::::::::::::: 85 10.16 ForceEventLoopIteration :::::::::::::::::::::::::::::::::::: 85 10.17 FreeBitMap ::::::::::::::::::::::::::::::::::::::::::::::::: 86 10.18 FreeGrabScreenPixels ::::::::::::::::::::::::::::::::::::::: 86 10.19 FreeMonitorInfo ::::::::::::::::::::::::::::::::::::::::::::: 86 10.20 FreePointer ::::::::::::::::::::::::::::::::::::::::::::::::: 87 10.21 FreeVideoBitMap ::::::::::::::::::::::::::::::::::::::::::: 87 10.22 FreeVideoPixels ::::::::::::::::::::::::::::::::::::::::::::: 87 10.23 GetBitMapAttr ::::::::::::::::::::::::::::::::::::::::::::: 88 10.24 GetMenuAttributes ::::::::::::::::::::::::::::::::::::::::: 89 10.25 GetMonitorInfo ::::::::::::::::::::::::::::::::::::::::::::: 89 10.26 GetMousePos ::::::::::::::::::::::::::::::::::::::::::::::: 91 10.27 GetQualifiers:::::::::::::::::::::::::::::::::::::::::::::::: 92 10.28 GrabScreenPixels ::::::::::::::::::::::::::::::::::::::::::: 92 10.29 HandleEvents ::::::::::::::::::::::::::::::::::::::::::::::: 93 10.30 Line :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 94 10.31 LockBitMap :::::::::::::::::::::::::::::::::::::::::::::::: 96 10.32 MovePointer :::::::::::::::::::::::::::::::::::::::::::::::: 98 10.33 OpenDisplay :::::::::::::::::::::::::::::::::::::::::::::::: 98 10.34 ReadVideoPixels ::::::::::::::::::::::::::::::::::::::::::: 102 10.35 RectFill:::::::::::::::::::::::::::::::::::::::::::::::::::: 103 10.36 SetDisplayAttributes ::::::::::::::::::::::::::::::::::::::: 105 10.37 SetDisplayTitle :::::::::::::::::::::::::::::::::::::::::::: 105 10.38 SetMenuAttributes ::::::::::::::::::::::::::::::::::::::::: 106 10.39 SetMenuBar ::::::::::::::::::::::::::::::::::::::::::::::: 107 10.40 SetPalette ::::::::::::::::::::::::::::::::::::::::::::::::: 108 10.41 SetPointer ::::::::::::::::::::::::::::::::::::::::::::::::: 109 10.42 SetTrayIcon:::::::::::::::::::::::::::::::::::::::::::::::: 109 10.43 ShowHideDisplay :::::::::::::::::::::::::::::::::::::::::: 110 10.44 ShowHidePointer::::::::::::::::::::::::::::::::::::::::::: 110 10.45 SizeMoveDisplay ::::::::::::::::::::::::::::::::::::::::::: 111 10.46 Sleep :::::::::::::::::::::::::::::::::::::::::::::::::::::: 112 10.47 UnLockBitMap :::::::::::::::::::::::::::::::::::::::::::: 112 iv Hollywood SDK 10.48 VWait ::::::::::::::::::::::::::::::::::::::::::::::::::::: 113 10.49 WaitEvents :::::::::::::::::::::::::::::::::::::::::::::::: 113 10.50 WritePixel ::::::::::::::::::::::::::::::::::::::::::::::::: 114 11 Extension plugins:::::::::::::::::::::::::::: 117 11.1 Overview:::::::::::::::::::::::::::::::::::::::::::::::::::: 117 11.2 GetExtensions :::::::::::::::::::::::::::::::::::::::::::::: 117 12 File adapter plugins ::::::::::::::::::::::::: 121 12.1 Overview:::::::::::::::::::::::::::::::::::::::::::::::::::: 121 12.2 FClose :::::::::::::::::::::::::::::::::::::::::::::::::::::: 121 12.3 FEof :::::::::::::::::::::::::::::::::::::::::::::::::::::::: 121 12.4 FFlush :::::::::::::::::::::::::::::::::::::::::::::::::::::: 122 12.5 FGetC :::::::::::::::::::::::::::::::::::::::::::::::::::::: 122 12.6 FOpen :::::::::::::::::::::::::::::::::::::::::::::::::::::: 123 12.7 FPutC :::::::::::::::::::::::::::::::::::::::::::::::::::::: 125 12.8 FRead :::::::::::::::::::::::::::::::::::::::::::::::::::::: 125 12.9 FSeek ::::::::::::::::::::::::::::::::::::::::::::::::::::::: 126 12.10 FStat ::::::::::::::::::::::::::::::::::::::::::::::::::::::