├── .gitignore ├── .travis.yml ├── .travis ├── setup_linux └── setup_osx ├── COMMITTERS.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── dub.json ├── lib ├── linux │ └── libsoloud_x86.so ├── osx │ └── libsoloud_x86.dylib └── windows │ ├── Awesomium.lib │ └── soloud_dll_x86.lib ├── source └── dash │ ├── components │ ├── animation.d │ ├── assets.d │ ├── audio.d │ ├── camera.d │ ├── component.d │ ├── lights.d │ ├── material.d │ ├── mesh.d │ ├── package.d │ └── userinterface.d │ ├── core │ ├── dgame.d │ ├── gameobject.d │ ├── main.d │ ├── package.d │ ├── prefabs.d │ ├── properties.d │ └── scene.d │ ├── editor │ ├── editor.d │ ├── events.d │ ├── package.d │ └── websockets.d │ ├── graphics │ ├── adapters │ │ ├── adapter.d │ │ ├── gl.d │ │ ├── linux.d │ │ ├── package.d │ │ ├── sdl.d │ │ └── win32gl.d │ ├── graphics.d │ ├── package.d │ └── shaders │ │ ├── glsl │ │ ├── ambientlight.d │ │ ├── animatedgeometry.d │ │ ├── directionallight.d │ │ ├── geometry.d │ │ ├── package.d │ │ ├── pointlight.d │ │ ├── shadowmap.d │ │ └── userinterface.d │ │ ├── package.d │ │ └── shaders.d │ ├── net │ ├── connection.d │ ├── connectionmanager.d │ ├── package.d │ ├── packets.d │ └── webconnection.d │ ├── package.d │ └── utility │ ├── bindings │ ├── awesomium.d │ └── soloud.d │ ├── concurrency.d │ ├── config.d │ ├── data │ ├── package.d │ ├── serialization.d │ └── yaml.d │ ├── input │ ├── input.d │ ├── inputsystem.d │ ├── keyboard.d │ ├── mouse.d │ └── package.d │ ├── math.d │ ├── output.d │ ├── package.d │ ├── profiler.d │ ├── resources.d │ ├── string.d │ ├── tasks.d │ └── time.d └── third_party ├── Awesomium ├── Awesomium.lib └── awesomium_capi.h └── DWinProgramming └── win32 ├── accctrl.d ├── aclapi.d ├── aclui.d ├── basetsd.d ├── basetyps.d ├── cderr.d ├── cguid.d ├── comcat.d ├── commctrl.d ├── commdlg.d ├── core.d ├── cpl.d ├── cplext.d ├── custcntl.d ├── dbt.d ├── dde.d ├── ddeml.d ├── dhcpcsdk.d ├── dlgs.d ├── docobj.d ├── errorrep.d ├── exdisp.d ├── exdispid.d ├── httpext.d ├── idispids.d ├── imagehlp.d ├── imm.d ├── intshcut.d ├── ipexport.d ├── iphlpapi.d ├── ipifcons.d ├── iprtrmib.d ├── iptypes.d ├── isguids.d ├── lm.d ├── lmaccess.d ├── lmalert.d ├── lmapibuf.d ├── lmat.d ├── lmaudit.d ├── lmbrowsr.d ├── lmchdev.d ├── lmconfig.d ├── lmcons.d ├── lmerr.d ├── lmerrlog.d ├── lmmsg.d ├── lmremutl.d ├── lmrepl.d ├── lmserver.d ├── lmshare.d ├── lmsname.d ├── lmstats.d ├── lmsvc.d ├── lmuse.d ├── lmuseflg.d ├── lmwksta.d ├── lzexpand.d ├── mapi.d ├── mciavi.d ├── mcx.d ├── mgmtapi.d ├── mmsystem.d ├── msacm.d ├── mshtml.d ├── mswsock.d ├── nb30.d ├── nddeapi.d ├── nspapi.d ├── ntdef.d ├── ntdll.d ├── ntldap.d ├── ntsecapi.d ├── oaidl.d ├── objbase.d ├── objfwd.d ├── objidl.d ├── objsafe.d ├── ocidl.d ├── odbcinst.d ├── ole.d ├── ole2.d ├── ole2ver.d ├── oleacc.d ├── oleauto.d ├── olectl.d ├── olectlid.d ├── oledlg.d ├── oleidl.d ├── pbt.d ├── powrprof.d ├── prsht.d ├── psapi.d ├── rapi.d ├── ras.d ├── rasdlg.d ├── raserror.d ├── rassapi.d ├── reason.d ├── regstr.d ├── richedit.d ├── richole.d ├── rpc.d ├── rpcdce.d ├── rpcdce2.d ├── rpcdcep.d ├── rpcndr.d ├── rpcnsi.d ├── rpcnsip.d ├── rpcnterr.d ├── schannel.d ├── secext.d ├── servprov.d ├── setupapi.d ├── shellapi.d ├── shldisp.d ├── shlguid.d ├── shlobj.d ├── shlwapi.d ├── snmp.d ├── sql.d ├── sqlext.d ├── sqltypes.d ├── sqlucode.d ├── subauth.d ├── tlhelp32.d ├── tmschema.d ├── unknwn.d ├── usp10.d ├── uuid.d ├── vfw.d ├── w32api.d ├── winbase.d ├── winber.d ├── wincon.d ├── wincrypt.d ├── windef.d ├── windows.d ├── winerror.d ├── wingdi.d ├── wininet.d ├── winioctl.d ├── winldap.d ├── winnetwk.d ├── winnls.d ├── winnt.d ├── winperf.d ├── winreg.d ├── winsock2.d ├── winspool.d ├── winsvc.d ├── winuser.d ├── winver.d ├── ws2tcpip.d └── wtypes.d /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by http://gitignore.io 2 | 3 | ### VisualStudio ### 4 | ## Ignore Visual Studio temporary files, build results, and 5 | ## files generated by popular Visual Studio add-ons. 6 | 7 | # User-specific files 8 | *.suo 9 | *.user 10 | *.sln.docstates 11 | 12 | # Build results 13 | 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | x64/ 18 | build/ 19 | [Oo]bj/ 20 | 21 | # MSTest test Results 22 | [Tt]est[Rr]esult*/ 23 | [Bb]uild[Ll]og.* 24 | 25 | *_i.c 26 | *_p.c 27 | *.ilk 28 | *.meta 29 | *.pch 30 | *.pdb 31 | *.pgc 32 | *.pgd 33 | *.rsp 34 | *.sbr 35 | *.tlb 36 | *.tli 37 | *.tlh 38 | *.tmp 39 | *.tmp_proj 40 | *.log 41 | *.vspscc 42 | *.vssscc 43 | .builds 44 | *.pidb 45 | *.log 46 | *.scc 47 | *.lib 48 | 49 | # Visual C++ cache files 50 | ipch/ 51 | *.aps 52 | *.ncb 53 | *.opensdf 54 | *.sdf 55 | *.cachefile 56 | 57 | # Visual Studio profiler 58 | *.psess 59 | *.vsp 60 | *.vspx 61 | 62 | # Guidance Automation Toolkit 63 | *.gpState 64 | 65 | # ReSharper is a .NET coding add-in 66 | _ReSharper*/ 67 | *.[Rr]e[Ss]harper 68 | 69 | # TeamCity is a build add-in 70 | _TeamCity* 71 | 72 | # DotCover is a Code Coverage Tool 73 | *.dotCover 74 | 75 | # NCrunch 76 | *.ncrunch* 77 | .*crunch*.local.xml 78 | 79 | # Installshield output folder 80 | [Ee]xpress/ 81 | 82 | # DocProject is a documentation generator add-in 83 | DocProject/buildhelp/ 84 | DocProject/Help/*.HxT 85 | DocProject/Help/*.HxC 86 | DocProject/Help/*.hhc 87 | DocProject/Help/*.hhk 88 | DocProject/Help/*.hhp 89 | DocProject/Help/Html2 90 | DocProject/Help/html 91 | 92 | # Click-Once directory 93 | publish/ 94 | 95 | # Publish Web Output 96 | *.Publish.xml 97 | *.pubxml 98 | 99 | # NuGet Packages Directory 100 | ## TODO: If you have NuGet Package Restore enabled, uncomment the next line 101 | #packages/ 102 | 103 | # Windows Azure Build Output 104 | csx 105 | *.build.csdef 106 | 107 | # Windows Store app package directory 108 | AppPackages/ 109 | 110 | # Others 111 | sql/ 112 | *.Cache 113 | ClientBin/ 114 | [Ss]tyle[Cc]op.* 115 | ~$* 116 | *~ 117 | *.dbmdl 118 | *.[Pp]ublish.xml 119 | *.pfx 120 | *.publishsettings 121 | 122 | # RIA/Silverlight projects 123 | Generated_Code/ 124 | 125 | # Backup & report files from converting an old project file to a newer 126 | # Visual Studio version. Backup files are not needed, because we have git ;-) 127 | _UpgradeReport_Files/ 128 | Backup*/ 129 | UpgradeLog*.XML 130 | UpgradeLog*.htm 131 | 132 | # SQL Server files 133 | App_Data/*.mdf 134 | App_Data/*.ldf 135 | 136 | # Business Intelligence projects 137 | *.rdl.data 138 | *.bim.layout 139 | *.bim_*.settings 140 | 141 | # ========================= 142 | # Windows detritus 143 | # ========================= 144 | 145 | # Windows image file caches 146 | Thumbs.db 147 | ehthumbs.db 148 | 149 | # Folder config file 150 | Desktop.ini 151 | 152 | # Recycle Bin used on file shares 153 | $RECYCLE.BIN/ 154 | 155 | # Mac crap 156 | .DS_Store 157 | 158 | ### MonoDevelop ### 159 | #User Specific 160 | *.userprefs 161 | *.usertasks 162 | 163 | #Mono Project Files 164 | *.pidb 165 | *.resources 166 | test-results/ 167 | 168 | ### SublimeText ### 169 | # workspace files are user-specific 170 | *.sublime-workspace 171 | *.sublime-project 172 | 173 | # Merge leftovers 174 | *.orig 175 | 176 | # ======================== 177 | # Dash stuffs 178 | # ======================== 179 | 180 | .dub/ 181 | *.sln 182 | *.visualdproj 183 | *.dproj 184 | *.exe 185 | *.exe_cv 186 | *.dll 187 | *.dll_cv 188 | *.lib_cv 189 | __dummy.html 190 | docs.json 191 | libdash.a 192 | __test__*__ 193 | dub.selections.json 194 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: d 2 | d: 3 | - dmd-2.066.1 4 | - dmd-2.067.1 5 | - ldc-0.15.1 6 | - ldc-0.15.2-beta2 7 | - gdc-4.9.2 8 | os: 9 | - linux 10 | - osx 11 | 12 | matrix: 13 | allow_failures: 14 | - d: dmd-2.067.1 15 | - d: ldc-0.15.1 16 | - d: ldc-0.15.2-beta2 17 | - d: gdc-4.9.2 18 | 19 | install: 20 | - sudo cp ./lib/$TRAVIS_OS_NAME/* /usr/lib 21 | - bash .travis/setup_linux 22 | - bash .travis/setup_osx 23 | script: 24 | - dub fetch x11 --version="~>1.0" 25 | - dub fetch derelict-sdl2 --version="==1.9.5" 26 | - dub upgrade 27 | - dub test --compiler=${DC} 28 | 29 | notifications: 30 | webhooks: 31 | urls: 32 | - https://webhooks.gitter.im/e/89d5205a2483bcd72a32 33 | on_success: change 34 | on_failure: always 35 | on_start: never 36 | -------------------------------------------------------------------------------- /.travis/setup_linux: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Only run on Linux 3 | if [[ $TRAVIS_OS_NAME == "linux" ]]; then 4 | # Install other dependencies 5 | sudo apt-get install libfreeimage-dev libjpeg62-dev libevent-dev libssl-dev 6 | fi 7 | -------------------------------------------------------------------------------- /.travis/setup_osx: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Only run on OSX 3 | if [[ $TRAVIS_OS_NAME == "osx" ]]; then 4 | # Install Brew dependencies 5 | brew update 6 | brew install freeimage 7 | brew install libevent 8 | fi 9 | -------------------------------------------------------------------------------- /COMMITTERS.md: -------------------------------------------------------------------------------- 1 | Dash Contributors 2 | ============================================ 3 | 4 | ### Circular Studios Engine Team 5 | 6 | * **[Daniel Jost](https://github.com/PxlBuzzard)**: Engine Team Lead 7 | 8 | * Responsible for keeping the engine team on track and progressing at a steady pace. 9 | * Lead programmer for Spectral Robot Task Force. 10 | 11 | * **[Colden Cullen](https://github.com/ColdenCullen)**: Lead Engine(er) 12 | 13 | * Responsible for core systems and developer experience. 14 | * The creator of the engine. 15 | 16 | * **[Tyler Wozniak](https://github.com/zeDoctor)**: External Developer Relations, Graphics Engineer 17 | 18 | * Responsible for managing external contributors, as well as the deferred rendering systems and pipelines. 19 | * Engine Team Lead for Spring 2014. 20 | 21 | * **[Brandon Littell](https://github.com/BrandonLittell)**: Lead UI Systems Engineer 22 | 23 | * Responsible for the User Interface system, as well as some core systems. 24 | * First implementing Awesomium and later CEF. 25 | * Created engine states to give game creators flexibility in running different parts of the engine. 26 | 27 | * **[Eric Christenson](https://github.com/ericchristenson)**: Graphics Engineer 28 | 29 | * Responsible for deferred rendering and lights. 30 | 31 | * **[Sean Brennan](https://github.com/ScrappyOrc)**: Lead Networking Engineer 32 | 33 | * Responsible for [Speed](https://github.com/Circular-Studios/Speed), the networking library used by Dash. 34 | 35 | * **[Timothy Reynolds](https://github.com/tmr9209)**: Lead Animation Engineer 36 | 37 | * Responsible for Assimp integration, and animated transforms. 38 | 39 | ### External Contributors 40 | 41 | * **[Anton Gushcha](https://github.com/NCrashed)** 42 | 43 | * Early contributor who helped with Linux builds and bug fixes. 44 | 45 | * **[Théo Bueno](https://github.com/Munrek)** 46 | 47 | * Early contributor who helped with Linux builds. 48 | 49 | **[Full Contributors List](https://github.com/Circular-Studios/Dash/graphs/contributors).** 50 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to Dash 2 | 3 | First of all, thanks for choosing Dash! We really hope you enjoy your time working with our engine. To get setup with the engine, see our page on [setting up your environment](https://github.com/Circular-Studios/Dash/wiki/Setting-Up-Your-Environment). 4 | 5 | ## Communication 6 | 7 | Most communication takes place as comments in issues and pull requests. When more immediate communication is required, we will use our [gitter.im room](https://gitter.im/Circular-Studios/Dash). 8 | 9 | ## Coding Standards 10 | 11 | We here at Circular Studios loosely follow the [Official D Style](http://dlang.org/dstyle.html), however we do have some more specialized coding standards that you can read about [here](https://github.com/Circular-Studios/Dash/wiki/Coding-Standards). 12 | 13 | ## Git Workflow 14 | 15 | Dash uses [Git Flow](http://nvie.com/posts/a-successful-git-branching-model/) as its branching model. 16 | 17 | We use [semantic versioning](http://semver.org/). Each minor version gets a milestone, and release branches for them start when the milestone is complete. They are merged to master once it is decided that the release is stable. Patch versions are only created though hotfix branches, which do not need pull requests. 18 | 19 | All major features or enhancements being added are done on feature branches, then merged to develop through Pull Requests. Pull requests should be named as `Type: Name`, where `Type` could be `Feature`, `Refactor`, `Cleanup`, etc. 20 | 21 | ## Issue Tracking 22 | 23 | Now that you know how to contribute, you may be wondering what to work on. In order to help all of our contributors work effectively on tasks, we will maintain a straightforward issue tracking strategy through Dash's [waffle.io page](https://waffle.io/circular-studios/dash). 24 | 25 | If you are looking for something to work on, your first step should be to go to the **Ready** column, however here is an overview of the tracking strategy we've adopted: 26 | 27 | * **New**: if you find a bug, want to suggest a feature, or see a need for optimization, feel free to create a new issue. These issues will be tracked in the New column until we have had time to review them. 28 | * **Accepted**: tracks issues that we have approved as relevant to the project. For bugs, this means that we've reporduced the bug and accept that it's not as-intended. For features, this means we have reviewed that the feature fits with our vision of the Dash engine and is something we actually plan to support. 29 | * **Ready**: tracks issues which we have determined are ready for implementation. Sometimes features will be accepted, but the current state of the engine is not at a place where the issue is worth working on. Once we feel the engine is ready to support a given issue, we will transition the issue to ready. 30 | * **In Progress**: tracks issues which are currently being developed. If you are beginning work on an issue, please comment on the issue with a relevant fork branch, and we will move the issue to this column. 31 | * **Done**: closed issues end up here. 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-2016 Circular Studios 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | [![Dash Logo](https://cloud.githubusercontent.com/assets/512416/2726786/6618d624-c5c2-11e3-9049-23637e5a1739.png)](https://github.com/Circular-Studios/Dash/wiki) 2 | 3 | [![Build Status](http://img.shields.io/travis/Circular-Studios/Dash/develop.svg?style=flat)](https://travis-ci.org/Circular-Studios/Dash) [![Docs](http://img.shields.io/badge/docs-ddoc-yellow.svg?style=flat)](http://dash.circularstudios.com/api/latest/) [![Gitter Chat](http://img.shields.io/badge/chat-gitter-brightgreen.svg?style=flat)](https://gitter.im/Circular-Studios/Dash) [![Release](https://img.shields.io/dub/v/dash.svg?style=flat)](http://code.dlang.org/packages/dash) 4 | --- 5 | 6 | If you're reading this page, chances are you fall into one of the following categories: 7 | 8 | #### I am a game developer interested in making games with Dash: 9 | 10 | Our [documentation page](http://dash.circularstudios.com/guides/) has all the info you could ever want for building a game with Dash. Pro tip: you'll want to read up on [YAML](http://www.yaml.org/) and [D](http://dlang.org) before getting started. 11 | 12 | #### I am an engine developer looking to contribute to Dash: 13 | 14 | Great! We'd love to have your support/input/code. Check out [CONTRIBUTING.md](https://github.com/Circular-Studios/Dash/blob/develop/CONTRIBUTING.md) for a guide on how to get started. 15 | 16 | #### I have no idea what this is, I just want to see it running: 17 | 18 | The easiest way to get Dash running (on Windows) is to head over to our [Releases](https://github.com/Circular-Studios/Dash/releases) page and download the most recent `dash-game.zip`, and double clicking on `Dash Game`. On Linux, you'll want to check out the simple instructions at [Setting up Your Environment page](https://github.com/Circular-Studios/Dash/wiki/Setting-Up-Your-Environment). 19 | 20 | ### Contact Us 21 | 22 | We'd love to hear from you, feel free to get in touch using [gitter](https://gitter.im/Circular-Studios/Dash) (our public chat room) or email us at dash [at] circularstudios [dot] com. We'll do our best to have the appropriate team member respond as quickly as we can. 23 | -------------------------------------------------------------------------------- /dub.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dash", 3 | "description": "A free and open 3D game engine written in D.", 4 | "copyright": "Circular Studios 2013 - 2014", 5 | "license": "MIT", 6 | "homepage": "http://circularstudios.com", 7 | "authors": [ 8 | "Colden Cullen", 9 | "Brandon Littell", 10 | "Eric Christenson", 11 | "Tyler Wozniak", 12 | "Sean Brennan", 13 | "Timothy Reynolds", 14 | "Dan Wild", 15 | "Jim Arnold", 16 | "Derin Yarsuvat" 17 | ], 18 | 19 | "dependencies": { 20 | "derelict-gl3": "~>1.0", 21 | "derelict-fi": "~>1.0", 22 | "derelict-assimp3": "~>1.0", 23 | "dyaml": "~>0.5", 24 | "gl3n": "==1.0.1", 25 | "gfm:sdl2": "==2.3.26", 26 | "logger": "==0.3.3", 27 | "colorize": "==1.0.5", 28 | "msgpack-d": "==0.9.2", 29 | "vibe-d": "0.7.21", 30 | "tharsis-prof": "==0.5.2", 31 | "x11": { "version": "~>1.0", "optional": true } 32 | }, 33 | 34 | "targetName": "dash", 35 | "targetType": "library", 36 | 37 | "mainSourceFile": "source/dash/core/main.d", 38 | "sourcePaths": [ "source/" ], 39 | "importPaths": [ "source/" ], 40 | 41 | "versions": [ 42 | "DashUseGl3n", 43 | "VibeCustomMain" 44 | ], 45 | 46 | "-ddoxFilterArgs": [ "--min-protection=Protected" ], 47 | 48 | "importPaths-windows": [ "third_party/DWinProgramming" ], 49 | "sourceFiles-windows": [ 50 | "third_party/DWinProgramming/win32/windef.d" 51 | ], 52 | "preBuildCommands-windows": [ 53 | "robocopy $PACKAGE_DIR\\lib\\windows\\ .\\ /MIR /XX /NFL /NDL /NJH /NJS || (exit 0)" 54 | ], 55 | "libs-windows": [ 56 | "Awesomium", "soloud_dll_x86", 57 | "gdi32", "ole32", "kernel32", 58 | "user32", "comctl32", "comdlg32" 59 | ], 60 | 61 | "preBuildCommands-osx": [ 62 | "cp $PACKAGE_DIR/lib/osx/* /usr/local/lib/ || True" 63 | ], 64 | "libs-osx": [ 65 | "soloud_x86" 66 | ], 67 | 68 | "preBuildCommands-linux": [ 69 | "cp $PACKAGE_DIR/lib/linux/* /usr/lib/ || true" 70 | ], 71 | "libs-linux": [ 72 | "soloud_x86" 73 | ] 74 | } 75 | -------------------------------------------------------------------------------- /lib/linux/libsoloud_x86.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Circular-Studios/Dash/b7d589ad4ca8993445c136b6a4ae170932bb7962/lib/linux/libsoloud_x86.so -------------------------------------------------------------------------------- /lib/osx/libsoloud_x86.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Circular-Studios/Dash/b7d589ad4ca8993445c136b6a4ae170932bb7962/lib/osx/libsoloud_x86.dylib -------------------------------------------------------------------------------- /lib/windows/Awesomium.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Circular-Studios/Dash/b7d589ad4ca8993445c136b6a4ae170932bb7962/lib/windows/Awesomium.lib -------------------------------------------------------------------------------- /lib/windows/soloud_dll_x86.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Circular-Studios/Dash/b7d589ad4ca8993445c136b6a4ae170932bb7962/lib/windows/soloud_dll_x86.lib -------------------------------------------------------------------------------- /source/dash/components/audio.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Defines audio related classes, such as the listener and emitter 3 | */ 4 | module dash.components.audio; 5 | import dash.core.properties, dash.components, dash.utility, dash.utility.bindings.soloud; 6 | import std.string; 7 | 8 | /** 9 | * Listener object that hears sounds and sends them to the audio output device 10 | * (usually attaced to the camera) 11 | */ 12 | class Listener : ComponentReg!Listener 13 | { 14 | private: 15 | 16 | public: 17 | /** 18 | * Create a listener object 19 | */ 20 | this() 21 | { 22 | // Constructor code 23 | } 24 | 25 | override void update() 26 | { 27 | Audio.soloud.update3dAudio(); 28 | Audio.soloud.set3dListenerAt(owner.transform.position.x, 29 | owner.transform.position.y, 30 | owner.transform.position.z); 31 | } 32 | } 33 | 34 | /** 35 | * Emitter object that plays sounds that listeners can hear 36 | */ 37 | class Emitter : ComponentReg!Emitter 38 | { 39 | private: 40 | Modplug toPlay; 41 | uint[] handles; 42 | public: 43 | /** 44 | * Create an emmiter object 45 | */ 46 | this() 47 | { 48 | // Constructor Code 49 | } 50 | 51 | override void initialize() { 52 | super.initialize; 53 | toPlay = Modplug.create(); 54 | } 55 | 56 | // call: 57 | // emmiter.play( filename ); 58 | void play( string soundName ) 59 | { 60 | // Load in the sound 61 | toPlay.load( Audio.sounds[soundName].toStringz() ); 62 | 63 | // play the sound from the location of the parent object 64 | Audio.soloud.play3d(toPlay, 65 | owner.transform.position.x, 66 | owner.transform.position.y, 67 | owner.transform.position.z); 68 | } 69 | 70 | 71 | /** 72 | * Plays a sound that will follow the emitter for however long you set the length to be. 73 | */ 74 | void playFollow( string soundName ) { 75 | // Load in the sound 76 | toPlay.load( Audio.sounds[soundName].toStringz() ); 77 | 78 | // play the sound from the location of the parent object 79 | // and set the sound to move with the emitter 80 | handles ~= Audio.soloud.play3d( toPlay, 81 | owner.transform.position.x, 82 | owner.transform.position.y, 83 | owner.transform.position.z ); 84 | 85 | } 86 | 87 | override void update() 88 | { 89 | foreach_reverse( i, handle; handles ) 90 | { 91 | if( !Audio.soloud.isValidVoiceHandle( handle ) ) 92 | { 93 | auto end = handles[i+1..$]; 94 | handles = handles[0..i]; 95 | handles ~= end; 96 | } else { 97 | Audio.soloud.set3dSourcePosition( handle, 98 | owner.transform.position.x, 99 | owner.transform.position.y, 100 | owner.transform.position.z ); 101 | } 102 | } 103 | } 104 | 105 | 106 | 107 | void playFollow( string soundName, float soundLength ) 108 | { 109 | 110 | } 111 | } 112 | 113 | /** 114 | * TODO 115 | * implement sound struct 116 | struct Sound 117 | { 118 | Wav soundfile; 119 | } 120 | */ 121 | 122 | final abstract class Audio 123 | { 124 | static: 125 | //private: 126 | Soloud soloud; 127 | 128 | public: 129 | string[string] sounds; 130 | 131 | void initialize() 132 | { 133 | soloud = Soloud.create(); 134 | soloud.init(); 135 | 136 | foreach( file; scanDirectory( Resources.Audio ) ) 137 | { 138 | sounds[file.baseFileName] = file.relativePath; 139 | } 140 | } 141 | 142 | void shutdown() 143 | { 144 | soloud.deinit(); 145 | soloud.destroy(); 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /source/dash/components/package.d: -------------------------------------------------------------------------------- 1 | module dash.components; 2 | public: 3 | import dash.components.component; 4 | import dash.components.animation; 5 | import dash.components.assets; 6 | import dash.components.material; 7 | import dash.components.mesh; 8 | import dash.components.camera; 9 | import dash.components.lights; 10 | import dash.components.userinterface; 11 | import dash.components.audio; -------------------------------------------------------------------------------- /source/dash/core/main.d: -------------------------------------------------------------------------------- 1 | module dash.core.main; 2 | import dash.core.dgame, dash.editor.editor; 3 | 4 | /** 5 | * Initializes reflection things. 6 | */ 7 | static this() 8 | { 9 | ClassInfo gameType = typeid(DGame); 10 | ClassInfo editorType = typeid(Editor); 11 | 12 | foreach( mod; ModuleInfo ) 13 | { 14 | foreach( klass; mod.localClasses ) 15 | { 16 | // Find the appropriate game loop. 17 | if( klass.base == typeid(DGame) ) 18 | gameType = klass; 19 | else if( klass.base == typeid(Editor) ) 20 | editorType = klass; 21 | } 22 | } 23 | 24 | DGame.instance = cast(DGame)gameType.create(); 25 | DGame.instance.editor = cast(Editor)editorType.create(); 26 | } 27 | 28 | version( unittest ) { } 29 | else 30 | { 31 | import dash.core.dgame; 32 | import std.stdio; 33 | 34 | /// Does exactly what you think it does. 35 | void main() 36 | { 37 | if( !DGame.instance ) 38 | { 39 | writeln( "No game supplied." ); 40 | return; 41 | } 42 | 43 | DGame.instance.run(); 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /source/dash/core/package.d: -------------------------------------------------------------------------------- 1 | module dash.core; 2 | public: 3 | import dash.core.dgame; 4 | import dash.core.gameobject; 5 | import dash.core.scene; 6 | import dash.core.prefabs; 7 | import dash.core.properties; 8 | import dash.core.main; 9 | -------------------------------------------------------------------------------- /source/dash/core/prefabs.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains Prefabs and Prefab, manages creation and management of prefabs. 3 | */ 4 | module dash.core.prefabs; 5 | import dash.core, dash.components, dash.utility; 6 | 7 | mixin( registerComponents!() ); 8 | 9 | /** 10 | * Prefabs manages prefabs and allows access to them. 11 | */ 12 | final abstract class Prefabs 13 | { 14 | static: 15 | public: 16 | /// The AA of prefabs. 17 | Prefab[string] prefabs; 18 | 19 | /// Allows functions to be called on this like it were the AA. 20 | alias prefabs this; 21 | 22 | // Not sure what this is all about, but opIndex no longer forwards as of 2.066. 23 | static if( __VERSION__ > 2065 ) 24 | { 25 | Prefab opIndex( string index ) 26 | { 27 | if( auto fab = index in prefabs ) 28 | { 29 | return *fab; 30 | } 31 | else 32 | { 33 | warningf( "Prefab %s not found.", index ); 34 | return null; 35 | } 36 | } 37 | 38 | Prefab opIndexAssign( Prefab newFab, string index ) 39 | { 40 | prefabs[ index ] = newFab; 41 | return newFab; 42 | } 43 | } 44 | 45 | /** 46 | * Load and initialize all prefabs in FilePath.Resources.Prefabs. 47 | */ 48 | void initialize() 49 | { 50 | foreach( key; prefabs.keys ) 51 | prefabs.remove( key ); 52 | 53 | foreach( res; scanDirectory( Resources.Prefabs ) ) 54 | { 55 | foreach( fabDesc; res.deserializeMultiFile!( GameObject.Description )() ) 56 | { 57 | auto newFab = new Prefab( fabDesc, res ); 58 | prefabs[ newFab.name ] = newFab; 59 | prefabResources[ res ] ~= newFab; 60 | } 61 | } 62 | } 63 | 64 | /** 65 | * Refreshes prefabs that are outdated. 66 | */ 67 | void refresh() 68 | { 69 | //TODO: Implement 70 | } 71 | 72 | private: 73 | Prefab[][Resource] prefabResources; 74 | } 75 | 76 | /** 77 | * A prefab that allows for quick object creation. 78 | */ 79 | final class Prefab : Asset 80 | { 81 | public: 82 | /// The name of the prefab. 83 | const(string) name() @property 84 | { 85 | return description.name; 86 | } 87 | /// The description to create objects from. 88 | GameObject.Description description; 89 | 90 | /// Creates a prefab from a description. 91 | this( GameObject.Description desc, Resource filePath ) 92 | { 93 | description = desc; 94 | super( filePath ); 95 | } 96 | 97 | /** 98 | * Creates a GameObject instance from the prefab. 99 | * 100 | * Returns: 101 | * The new GameObject from the Prefab. 102 | */ 103 | GameObject createInstance() const 104 | { 105 | return GameObject.create( description ); 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /source/dash/editor/events.d: -------------------------------------------------------------------------------- 1 | module dash.editor.events; 2 | import dash.editor.editor, dash.editor.websockets; 3 | import dash.core, dash.components.component; 4 | 5 | import vibe.data.json; 6 | import std.typecons, std.functional; 7 | 8 | package: 9 | void registerGameEvents( Editor ed, DGame game ) 10 | { 11 | // Triggers an engine refresh 12 | ed.registerEventHandler( "dgame:refresh", ( Json _ ) { 13 | game.currentState = EngineState.Refresh; 14 | } ); 15 | 16 | ed.registerEventHandler( "dgame:scene:get_objects", ( Json _ ) { 17 | return game.activeScene.root.children; 18 | } ); 19 | } 20 | 21 | void registerObjectEvents( Editor ed, DGame game ) 22 | { 23 | // Refresh an object 24 | static struct RefreshRequest 25 | { 26 | string objectName; 27 | GameObject.Description description; 28 | } 29 | ed.registerEventHandler( "object:refresh", ( RefreshRequest req ) { 30 | if( auto obj = game.activeScene[ req.objectName ] ) 31 | { 32 | obj.refresh( req.description ); 33 | } 34 | else 35 | { 36 | throw new Exception( "Object " ~ req.objectName ~ " not found." ); 37 | } 38 | } ); 39 | 40 | // Refresh a component 41 | static struct ComponentRefreshRequest 42 | { 43 | string objectName; 44 | string componentName; 45 | Component.Description description; 46 | } 47 | ed.registerEventHandler( "object:component:refresh", ( ComponentRefreshRequest req ) { 48 | if( auto obj = game.activeScene[ req.objectName ] ) 49 | { 50 | obj.refreshComponent( req.componentName, req.description ); 51 | } 52 | else 53 | { 54 | throw new Exception( "Object " ~ req.objectName ~ " not found." ); 55 | } 56 | } ); 57 | 58 | // Refresh a transform 59 | static struct TransformRefreshRequest 60 | { 61 | string objectName; 62 | Transform.Description description; 63 | } 64 | ed.registerEventHandler( "object:transform:refresh", ( TransformRefreshRequest req ) { 65 | if( auto obj = game.activeScene[ req.objectName ] ) 66 | { 67 | obj.transform.refresh( req.description ); 68 | } 69 | else 70 | { 71 | throw new Exception( "Object " ~ req.objectName ~ " not found." ); 72 | } 73 | } ); 74 | } 75 | -------------------------------------------------------------------------------- /source/dash/editor/package.d: -------------------------------------------------------------------------------- 1 | module dash.editor; 2 | public: 3 | import dash.editor.editor; 4 | -------------------------------------------------------------------------------- /source/dash/graphics/adapters/adapter.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Contains all core code for the Graphics adapters, which is similar across all platforms 3 | */ 4 | module dash.graphics.adapters.adapter; 5 | import dash.core.properties, dash.components.userinterface, dash.utility.config, dash.utility.math; 6 | 7 | import std.typecons: BlackHole; 8 | 9 | alias NullAdapter = BlackHole!Adapter; 10 | 11 | /** 12 | * Base class for core rendering logic 13 | */ 14 | abstract class Adapter 15 | { 16 | private: 17 | uint _width, _screenWidth; 18 | uint _height, _screenHeight; 19 | bool _backfaceCulling, _vsync; 20 | WindowType _windowType; 21 | 22 | public: 23 | /// Pixel width of the rendering area 24 | mixin( Property!_width ); 25 | /// Pixel width of the actual window 26 | mixin( Property!_screenWidth ); 27 | /// Pixel height of the rendering area 28 | mixin( Property!_height ); 29 | /// Pixel height of the actual window 30 | mixin( Property!_screenHeight ); 31 | /// Hiding backsides of triangles 32 | mixin( Property!_backfaceCulling ); 33 | /// Vertical Syncing 34 | mixin( Property!_vsync ); 35 | /// The type for our main window 36 | /// (Fullscreen, FullscreenDesktop, or Windowed) 37 | mixin( Property!_windowType ); 38 | 39 | /** 40 | * Initializes the Adapter, called in loading 41 | */ 42 | abstract void initialize(); 43 | /** 44 | * Shuts down the Adapter 45 | */ 46 | abstract void shutdown(); 47 | /** 48 | * Resizes the window and updates FBOs 49 | */ 50 | abstract void resize(); 51 | /** 52 | * Reloads the Adapter without closing 53 | */ 54 | abstract void refresh(); 55 | /** 56 | * Swaps the back buffer to the screen 57 | */ 58 | abstract void swapBuffers(); 59 | 60 | /** 61 | * Opens the window 62 | */ 63 | abstract void openWindow(); 64 | /** 65 | * Closes the window 66 | */ 67 | abstract void closeWindow(); 68 | 69 | /** 70 | * TODO 71 | */ 72 | abstract void messageLoop(); 73 | 74 | /** 75 | * Currently the entire rendering pass for the active Scene. TODO: Refactor the name 76 | */ 77 | abstract void endDraw(); 78 | 79 | /** 80 | * Read from the depth buffer at the given point. 81 | */ 82 | abstract float getDepthAtScreenPoint( vec2ui point ); 83 | 84 | /** 85 | * Read from the depth buffer at the given point. 86 | */ 87 | abstract uint getObjectIDAtScreenPoint( vec2ui point ); 88 | 89 | /// TODO: Remove in favor of pipelines 90 | abstract void initializeDeferredRendering(); 91 | 92 | protected: 93 | /** 94 | * Loads rendering properties from Config 95 | */ 96 | final void loadProperties() 97 | { 98 | windowType = config.display.windowMode; 99 | if( windowType == WindowType.Fullscreen) 100 | { 101 | width = screenWidth; 102 | height = screenHeight; 103 | } 104 | else 105 | { 106 | width = config.display.width; 107 | height = config.display.height; 108 | } 109 | 110 | backfaceCulling = config.graphics.backfaceCulling; 111 | vsync = config.graphics.vsync; 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /source/dash/graphics/adapters/package.d: -------------------------------------------------------------------------------- 1 | module dash.graphics.adapters; 2 | public: 3 | import dash.graphics.adapters.adapter; 4 | import dash.graphics.adapters.sdl; 5 | import dash.graphics.adapters.gl; 6 | -------------------------------------------------------------------------------- /source/dash/graphics/graphics.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Container for the graphics adapter needed for the appropriate platform 3 | */ 4 | module dash.graphics.graphics; 5 | import dash.graphics.adapters, dash.graphics.shaders; 6 | 7 | /** 8 | * Abstract class to store the appropriate Adapter 9 | */ 10 | final abstract class Graphics 11 | { 12 | public static: 13 | /// The active Adapter 14 | Adapter adapter; 15 | /// Aliases adapter to Graphics 16 | alias adapter this; 17 | 18 | /** 19 | * Initialize the controllers. 20 | */ 21 | final void initialize() 22 | { 23 | version( DashUseNativeAdapter ) 24 | { 25 | version( Windows ) 26 | { 27 | import dash.graphics.adapters.win32gl; 28 | adapter = new Win32GL; 29 | } 30 | else version( linux ) 31 | { 32 | import dash.graphics.adapters.linux; 33 | adapter = new Linux; 34 | } 35 | } 36 | else 37 | { 38 | adapter = new Sdl; 39 | } 40 | 41 | adapter.initialize(); 42 | adapter.initializeDeferredRendering(); 43 | Shaders.initialize(); 44 | } 45 | 46 | /** 47 | * Shutdown the adapter and shaders. 48 | */ 49 | final void shutdown() 50 | { 51 | Shaders.shutdown(); 52 | adapter.shutdown(); 53 | } 54 | 55 | private: 56 | this() { } 57 | } 58 | -------------------------------------------------------------------------------- /source/dash/graphics/package.d: -------------------------------------------------------------------------------- 1 | module dash.graphics; 2 | public: 3 | import dash.graphics.graphics; 4 | import dash.graphics.shaders; 5 | import dash.graphics.adapters; 6 | -------------------------------------------------------------------------------- /source/dash/graphics/shaders/glsl/ambientlight.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Lighting Pass shader for ambient lights 3 | */ 4 | module dash.graphics.shaders.glsl.ambientlight; 5 | import dash.graphics.shaders.glsl; 6 | 7 | package: 8 | 9 | /// Takes in a clip-space quad and interpolates the UVs 10 | immutable string ambientlightVS = glslVersion ~ q{ 11 | layout(location = 0) in vec3 vPosition_s; 12 | layout(location = 1) in vec2 vUV; 13 | 14 | out vec4 fPosition_s; 15 | out vec2 fUV; 16 | 17 | void main( void ) 18 | { 19 | fPosition_s = vec4( vPosition_s, 1.0f ); 20 | gl_Position = fPosition_s; 21 | fUV = vUV; 22 | } 23 | }; 24 | 25 | /// Outputs the color for the diffuse * the ambient light value 26 | immutable string ambientlightFS = glslVersion ~ q{ 27 | struct AmbientLight 28 | { 29 | vec3 color; 30 | }; 31 | 32 | in vec4 fPosition; 33 | in vec2 fUV; 34 | 35 | // this diffuse should be set to the geometry output 36 | uniform sampler2D diffuseTexture; 37 | uniform AmbientLight light; 38 | 39 | // https://stackoverflow.com/questions/9222217/how-does-the-fragment-shader-know-what-variable-to-use-for-the-color-of-a-pixel 40 | out vec4 color; 41 | 42 | void main( void ) 43 | { 44 | color = vec4( light.color * texture( diffuseTexture, fUV ).xyz, 1.0f ); 45 | } 46 | }; -------------------------------------------------------------------------------- /source/dash/graphics/shaders/glsl/animatedgeometry.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Geometry pash shader for bone-animated meshes. Uses standard Geometry fragment shader 3 | */ 4 | module dash.graphics.shaders.glsl.animatedgeometry; 5 | import dash.graphics.shaders.glsl; 6 | 7 | package: 8 | 9 | /// Animated Geometry Shader. Transforms vertices by bone-weights 10 | immutable string animatedGeometryVS = glslVersion ~ q{ 11 | layout(location = 0) in vec3 vPosition_m; 12 | layout(location = 1) in vec2 vUV; 13 | layout(location = 2) in vec3 vNormal_m; 14 | layout(location = 3) in vec3 vTangent_m; 15 | layout(location = 4) in vec4 vBone_m; 16 | layout(location = 5) in vec4 vWeight_m; 17 | 18 | out vec4 fPosition_s; 19 | out vec3 fNormal_v; 20 | out vec2 fUV; 21 | out vec3 fTangent_v; 22 | flat out uint fObjectId; 23 | 24 | uniform mat4 worldView; 25 | uniform mat4 worldViewProj; 26 | uniform uint objectId; 27 | 28 | uniform mat4[100] bones; 29 | 30 | void main( void ) 31 | { 32 | // Calculate vertex change from animation 33 | mat4 boneTransform = bones[ int(vBone_m[ 0 ]) ] * vWeight_m[ 0 ]; 34 | boneTransform += bones[ int(vBone_m[ 1 ]) ] * vWeight_m[ 1 ]; 35 | boneTransform += bones[ int(vBone_m[ 2 ]) ] * vWeight_m[ 2 ]; 36 | boneTransform += bones[ int(vBone_m[ 3 ]) ] * vWeight_m[ 3 ]; 37 | 38 | // gl_Position is like SV_Position 39 | fPosition_s = worldViewProj * ( boneTransform * vec4( vPosition_m, 1.0f ) ); 40 | gl_Position = fPosition_s; 41 | fUV = vUV; 42 | 43 | fNormal_v = ( worldView * boneTransform * vec4( vNormal_m, 0.0f ) ).xyz; 44 | fTangent_v = ( worldView * boneTransform * vec4( vTangent_m, 0.0f ) ).xyz; 45 | fObjectId = objectId; 46 | } 47 | }; -------------------------------------------------------------------------------- /source/dash/graphics/shaders/glsl/geometry.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Geometry pass shader for standard meshes 3 | */ 4 | module dash.graphics.shaders.glsl.geometry; 5 | import dash.graphics.shaders.glsl; 6 | 7 | package: 8 | 9 | /// Standard mesh vertex shader, transforms position to screen space and normals/tangents to view space 10 | immutable string geometryVS = glslVersion ~ q{ 11 | layout(location = 0) in vec3 vPosition_m; 12 | layout(location = 1) in vec2 vUV; 13 | layout(location = 2) in vec3 vNormal_m; 14 | layout(location = 3) in vec3 vTangent_m; 15 | 16 | out vec4 fPosition_s; 17 | out vec3 fNormal_v; 18 | out vec2 fUV; 19 | out vec3 fTangent_v; 20 | flat out uint fObjectId; 21 | 22 | uniform mat4 worldView; 23 | uniform mat4 worldViewProj; 24 | uniform uint objectId; 25 | 26 | void main( void ) 27 | { 28 | // gl_Position is like SV_Position 29 | fPosition_s = worldViewProj * vec4( vPosition_m, 1.0f ); 30 | gl_Position = fPosition_s; 31 | fUV = vUV; 32 | 33 | fNormal_v = ( worldView * vec4( vNormal_m, 0.0f ) ).xyz; 34 | fTangent_v = ( worldView * vec4( vTangent_m, 0.0f ) ).xyz; 35 | fObjectId = objectId; 36 | } 37 | }; 38 | 39 | /// Saves diffuse, specular, mappedNormals (encoded to spheremapped XY), and object ID to appropriate FBO textures 40 | immutable string geometryFS = glslVersion ~ q{ 41 | in vec4 fPosition_s; 42 | in vec3 fNormal_v; 43 | in vec2 fUV; 44 | in vec3 fTangent_v; 45 | flat in uint fObjectId; 46 | 47 | layout( location = 0 ) out vec4 color; 48 | layout( location = 1 ) out vec4 normal_v; 49 | 50 | uniform sampler2D diffuseTexture; 51 | uniform sampler2D normalTexture; 52 | uniform sampler2D specularTexture; 53 | 54 | vec2 encode( vec3 normal ) 55 | { 56 | float t = sqrt( 2 / ( 1 - normal.z ) ); 57 | return normal.xy * t; 58 | } 59 | 60 | vec3 calculateMappedNormal() 61 | { 62 | vec3 normal = normalize( fNormal_v ); 63 | vec3 tangent = normalize( fTangent_v ); 64 | //Use Gramm-Schmidt process to orthogonalize the two 65 | tangent = normalize( tangent - dot( tangent, normal ) * normal ); 66 | vec3 bitangent = -cross( tangent, normal ); 67 | vec3 normalMap = ((texture( normalTexture, fUV ).xyz) * 2) - 1; 68 | mat3 TBN = mat3( tangent, bitangent, normal ); 69 | return normalize( TBN * normalMap ); 70 | } 71 | 72 | void main( void ) 73 | { 74 | color = texture( diffuseTexture, fUV ); 75 | // specular intensity 76 | vec3 specularSample = texture( specularTexture, fUV ).xyz; 77 | color.w = ( specularSample.x + specularSample.y + specularSample.z ) / 3; 78 | normal_v = vec4( calculateMappedNormal(), float(fObjectId) ); 79 | } 80 | }; 81 | 82 | -------------------------------------------------------------------------------- /source/dash/graphics/shaders/glsl/package.d: -------------------------------------------------------------------------------- 1 | module dash.graphics.shaders.glsl; 2 | public: 3 | import dash.graphics.shaders.glsl.ambientlight; 4 | import dash.graphics.shaders.glsl.directionallight; 5 | import dash.graphics.shaders.glsl.geometry; 6 | import dash.graphics.shaders.glsl.pointlight; 7 | import dash.graphics.shaders.glsl.animatedgeometry; 8 | import dash.graphics.shaders.glsl.userinterface; 9 | import dash.graphics.shaders.glsl.shadowmap; 10 | 11 | package: 12 | enum glslVersion = "#version 400\n"; 13 | -------------------------------------------------------------------------------- /source/dash/graphics/shaders/glsl/pointlight.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Lighting pass shader for Point Lights 3 | */ 4 | module dash.graphics.shaders.glsl.pointlight; 5 | import dash.graphics.shaders.glsl; 6 | 7 | package: 8 | 9 | /// Takes a mesh representing the possible area of the light and creates a ray to each vertex 10 | immutable string pointlightVS = glslVersion ~ q{ 11 | layout(location = 0) in vec3 vPosition_m; 12 | layout(location = 1) in vec2 vUV; 13 | layout(location = 2) in vec3 vNormal_m; 14 | layout(location = 3) in vec3 vTangent_m; 15 | 16 | out vec4 fPosition_s; 17 | out vec3 fViewRay; 18 | 19 | //uniform mat4 world; 20 | uniform mat4 worldView; 21 | uniform mat4 worldViewProj; 22 | 23 | void main( void ) 24 | { 25 | // gl_Position is like SV_Position 26 | fPosition_s = worldViewProj * vec4( vPosition_m, 1.0f ); 27 | gl_Position = fPosition_s; 28 | 29 | fViewRay = ( worldView * vec4( vPosition_m, 1.0 ) ).xyz; 30 | 31 | } 32 | }; 33 | 34 | /// Outputs diffuse and specular color from the light, using the view ray to reconstruct position and a falloff rate to attenuate 35 | immutable string pointlightFS = glslVersion ~ q{ 36 | struct PointLight{ 37 | vec3 pos_v; 38 | vec3 color; 39 | float radius; 40 | float falloffRate; 41 | }; 42 | 43 | in vec4 fPosition_s; 44 | in vec3 fViewRay; 45 | 46 | out vec4 color; 47 | 48 | uniform sampler2D diffuseTexture; 49 | uniform sampler2D normalTexture; 50 | uniform sampler2D depthTexture; 51 | uniform PointLight light; 52 | // A pair of constants for reconstructing the linear Z 53 | // [ (-Far * Near ) / ( Far - Near ), Far / ( Far - Near ) ] 54 | uniform vec2 projectionConstants; 55 | 56 | // Function for decoding normals 57 | vec3 decode( vec2 enc ) 58 | { 59 | float t = ( ( enc.x * enc.x ) + ( enc.y * enc.y ) ) / 4; 60 | float ti = sqrt( 1 - t ); 61 | return vec3( ti * enc.x, ti * enc.y, -1 + t * 2 ); 62 | } 63 | 64 | void main( void ) 65 | { 66 | // The viewray should have interpolated across the pixels covered by the light, so we should just be able to clamp it's depth to 1 67 | vec3 viewRay = vec3( fViewRay.xy / fViewRay.z, 1.0f ); 68 | vec2 UV = ( ( fPosition_s.xy / fPosition_s.w ) + 1 ) / 2; 69 | vec3 textureColor = texture( diffuseTexture, UV ).xyz; 70 | float specularIntensity = texture( diffuseTexture, UV ).w; 71 | vec3 normal_v = texture( normalTexture, UV ).xyz; 72 | 73 | // Reconstruct position from depth 74 | float depth = texture( depthTexture, UV ).x; 75 | float linearDepth = projectionConstants.x / ( projectionConstants.y - depth ); 76 | vec3 position_v = viewRay * linearDepth; 77 | 78 | // calculate normalized light direction, and distance 79 | vec3 lightDir_v = light.pos_v - position_v; 80 | float distance = sqrt( dot(lightDir_v,lightDir_v) ); 81 | lightDir_v = normalize( lightDir_v ); 82 | 83 | // calculate exponential attenuation 84 | float attenuation = pow( max( 1-distance/light.radius, 0), light.falloffRate + 1.0f ); 85 | 86 | // Diffuse lighting calculations 87 | float diffuseScale = clamp( dot( normal_v, lightDir_v ), 0, 1 ); 88 | 89 | // Specular lighting calculations 90 | // Usually in these you see an "eyeDirection" variable, but in view space that is our position 91 | float specularScale = clamp( dot( normalize( position_v ), reflect( lightDir_v, normal_v ) ), 0, 1 ); 92 | 93 | vec3 diffuse = ( diffuseScale * light.color ) * textureColor ; 94 | // "8" is the reflectiveness 95 | // textureColor.w is the shininess 96 | // specularIntensity is the light's contribution 97 | vec3 specular = ( pow( specularScale, 8 ) * light.color * specularIntensity); 98 | 99 | color = vec4((diffuse + specular ) * attenuation, 1.0f ) ; 100 | //color = vec4( vec3(1,0,0), 1.0f ); 101 | 102 | } 103 | }; -------------------------------------------------------------------------------- /source/dash/graphics/shaders/glsl/shadowmap.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Shader to output depth for a shadowmap 3 | */ 4 | module dash.graphics.shaders.glsl.shadowmap; 5 | import dash.graphics.shaders.glsl; 6 | 7 | package: 8 | 9 | /// Vertex Shader for inaminate objects 10 | immutable string shadowmapVS = glslVersion ~ q{ 11 | layout(location = 0) in vec3 vPosition_m; 12 | 13 | uniform mat4 worldViewProj; 14 | 15 | void main() 16 | { 17 | gl_Position = worldViewProj * vec4( vPosition_m, 1.0f ); 18 | } 19 | 20 | }; 21 | 22 | /// Vertex shader for animated objects 23 | immutable string animatedshadowmapVS = glslVersion ~ q{ 24 | layout(location = 0) in vec3 vPosition_m; 25 | //layout(location = 1) in vec2 vUV; 26 | //layout(location = 2) in vec3 vNormal_m; 27 | //layout(location = 3) in vec3 vTangent_m; 28 | layout(location = 4) in vec4 vBone_m; 29 | layout(location = 5) in vec4 vWeight_m; 30 | 31 | uniform mat4 worldViewProj; 32 | uniform mat4[100] bones; 33 | 34 | void main() 35 | { 36 | // Calculate vertex change from animation 37 | mat4 boneTransform = bones[ int(vBone_m[ 0 ]) ] * vWeight_m[ 0 ]; 38 | boneTransform += bones[ int(vBone_m[ 1 ]) ] * vWeight_m[ 1 ]; 39 | boneTransform += bones[ int(vBone_m[ 2 ]) ] * vWeight_m[ 2 ]; 40 | boneTransform += bones[ int(vBone_m[ 3 ]) ] * vWeight_m[ 3 ]; 41 | 42 | gl_Position = worldViewProj * ( boneTransform * vec4( vPosition_m, 1.0f ) ); 43 | } 44 | }; 45 | 46 | /// Fragment Shader, just output depth 47 | immutable string shadowmapFS = glslVersion ~ q{ 48 | layout(location = 0) out float fragDepth; 49 | 50 | void main() { } 51 | 52 | }; -------------------------------------------------------------------------------- /source/dash/graphics/shaders/glsl/userinterface.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Post-Processing pass shader to render User Interfaces 3 | */ 4 | module dash.graphics.shaders.glsl.userinterface; 5 | import dash.graphics.shaders.glsl; 6 | 7 | package: 8 | 9 | /// 10 | /// User interface shader 11 | /// Just for transferring a texture (from awesomium) to the screen 12 | /// 13 | immutable string userinterfaceVS = glslVersion ~ q{ 14 | in vec3 vPosition; 15 | in vec2 vUV; 16 | 17 | out vec2 fUV; 18 | 19 | uniform mat4 worldProj; 20 | 21 | void main( void ) 22 | { 23 | gl_Position = worldProj * vec4( vPosition, 1.0f ); 24 | 25 | fUV = vUV; 26 | } 27 | 28 | }; 29 | 30 | /// Put the texture on the screen. 31 | immutable string userinterfaceFS = glslVersion ~ q{ 32 | in vec2 fUV; 33 | 34 | out vec4 color; 35 | 36 | uniform sampler2D uiTexture; 37 | 38 | void main( void ) 39 | { 40 | color = texture( uiTexture, fUV ); 41 | } 42 | 43 | 44 | }; -------------------------------------------------------------------------------- /source/dash/graphics/shaders/package.d: -------------------------------------------------------------------------------- 1 | module dash.graphics.shaders; 2 | public: 3 | import dash.graphics.shaders.shaders; -------------------------------------------------------------------------------- /source/dash/net/connectionmanager.d: -------------------------------------------------------------------------------- 1 | module dash.net.connectionmanager; 2 | import dash.net; 3 | 4 | import core.time; 5 | import std.concurrency, std.parallelism, std.stdio; 6 | 7 | shared class ConnectionManager 8 | { 9 | public: 10 | static shared(ConnectionManager) open() 11 | { 12 | auto conman = new shared ConnectionManager; 13 | 14 | conman.closing = false; 15 | 16 | return conman; 17 | } 18 | 19 | void delegate( shared Connection )[] onNewConnection; 20 | 21 | void send( T... )( T args, ConnectionType type = ConnectionType.TCP ) if ( T.length > 0 ) 22 | { 23 | foreach( conn; parallel( cast()connections.dup ) ) 24 | { 25 | conn.send( args, type ); 26 | } 27 | } 28 | 29 | void start() 30 | { 31 | spawn( &startReceive, this ); 32 | } 33 | 34 | void close() 35 | { 36 | // Open a connection to this to stop blocking operation of waiting for a new thread. 37 | closing = true; 38 | Connection.open( "127.0.0.1", false, ConnectionType.TCP ); 39 | 40 | foreach( thread; childrenThreads ) 41 | std.concurrency.send( cast(Tid)thread, "done" ); 42 | 43 | foreach( conn; connections ) 44 | conn.close(); 45 | } 46 | 47 | @property shared(Connection[]) connections() { return _connections; } 48 | 49 | private: 50 | Connection[] _connections; 51 | Tid[] childrenThreads; 52 | bool closing; 53 | 54 | this() { } 55 | 56 | static void startReceive( shared ConnectionManager conman ) 57 | { 58 | writeln( "Waiting for new connection." ); 59 | auto newCon = Connection.open( "localhost", true, ConnectionType.TCP ); 60 | 61 | synchronized( conman ) 62 | { 63 | foreach( event; conman.onNewConnection ) 64 | { 65 | event( newCon ); 66 | } 67 | 68 | conman._connections ~= newCon; 69 | } 70 | 71 | if( conman.closing ) 72 | return; 73 | 74 | ++conman.childrenThreads.length; 75 | conman.childrenThreads[ $-1 ] = cast(shared)spawn( &startReceive, conman ); 76 | 77 | while( true ) 78 | { 79 | if( receiveTimeout( dur!"msecs"( 0 ), (string x) { } ) ) 80 | break; 81 | 82 | try 83 | { 84 | newCon.update(); 85 | } 86 | catch 87 | { 88 | synchronized( conman ) 89 | { 90 | import std.algorithm; 91 | auto thisIdx = (cast(Connection[])conman.connections).countUntil( cast()newCon ); 92 | // Get tasks after one being removed 93 | auto end = conman.connections[ thisIdx+1..$ ]; 94 | // Get tasks before one being removed 95 | conman._connections = conman.connections[ 0..thisIdx ]; 96 | // Add end back 97 | conman._connections ~= end; 98 | 99 | writeln( "Connection ", thisIdx, " closed." ); 100 | } 101 | 102 | return; 103 | } 104 | } 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /source/dash/net/package.d: -------------------------------------------------------------------------------- 1 | module dash.net; 2 | public: 3 | import dash.net.connection; 4 | import dash.net.connectionmanager; 5 | import dash.net.webconnection : ConnectionType; 6 | -------------------------------------------------------------------------------- /source/dash/net/packets.d: -------------------------------------------------------------------------------- 1 | module dash.net.packets; 2 | 3 | enum PacketType : ubyte 4 | { 5 | Login, 6 | Logoff, 7 | Whisper, 8 | ChangePassword, 9 | UploadFile, 10 | Data, 11 | } 12 | 13 | class Packet 14 | { 15 | 16 | } 17 | 18 | class LoginPacket : Packet 19 | { 20 | string username; 21 | } 22 | 23 | class LogoffPacket : Packet 24 | { 25 | string username; 26 | } 27 | 28 | class WhisperPacket : Packet 29 | { 30 | string target; 31 | string message; 32 | } 33 | 34 | class DataPacket : Packet 35 | { 36 | string type; 37 | ubyte[] data; 38 | } 39 | -------------------------------------------------------------------------------- /source/dash/net/webconnection.d: -------------------------------------------------------------------------------- 1 | module dash.net.webconnection; 2 | 3 | import std.socket, std.bitmanip, std.stdio; 4 | 5 | enum ConnectionType : ushort 6 | { 7 | TCP = 0x01, 8 | UDP = 0x02, 9 | } 10 | 11 | immutable ubyte[] terminator = [ 0, 0, 0, 0 ]; 12 | 13 | package abstract class WebConnection 14 | { 15 | const ConnectionType type; 16 | 17 | abstract shared void send( const ubyte[] args ); 18 | shared bool recv( ref shared ubyte[] buf ) 19 | { 20 | ubyte[] tempBuf = new ubyte[ 1024 ]; 21 | buf.length = 0; 22 | 23 | do 24 | { 25 | auto size = (cast(Socket)socket).receive( tempBuf ); 26 | 27 | if( size <= 0 ) 28 | return false; 29 | 30 | tempBuf.length = size; 31 | 32 | buf ~= tempBuf; 33 | } while( cast(ubyte[])buf[ $-terminator.length..$ ] != terminator ); 34 | 35 | 36 | 37 | return true; 38 | } 39 | abstract shared void close(); 40 | 41 | Socket socket; 42 | 43 | protected: 44 | shared protected this( ConnectionType type ) 45 | { 46 | this.type = type; 47 | } 48 | } 49 | 50 | package class TCPConnection : WebConnection 51 | { 52 | shared static TcpSocket listener; 53 | 54 | shared this( string address, bool host ) 55 | { 56 | super( ConnectionType.TCP ); 57 | 58 | if( host ) 59 | { 60 | if( listener is null ) 61 | { 62 | auto tmplistener = new TcpSocket; 63 | tmplistener.bind( new InternetAddress( 8080 ) ); 64 | tmplistener.listen( 10 ); 65 | listener = cast(shared)tmplistener; 66 | } 67 | 68 | auto tmp = (cast()listener).accept(); 69 | writeln( "TCP Connection accepted." ); 70 | socket = cast(shared)tmp; 71 | } 72 | else 73 | { 74 | socket = cast(shared) new TcpSocket( new InternetAddress( address, 8080 ) ); 75 | } 76 | } 77 | 78 | shared static ~this() 79 | { 80 | if( listener ) 81 | (cast()listener).close(); 82 | } 83 | 84 | override shared void send( const ubyte[] args ) 85 | { 86 | auto sizeSent = (cast(Socket)socket).send( args ~ terminator ); 87 | 88 | assert( args.length + terminator.length == sizeSent, "Not all bytes sent." ); 89 | } 90 | 91 | override shared void close() 92 | { 93 | (cast(Socket)socket).close(); 94 | } 95 | } 96 | 97 | package class UDPConnection : WebConnection 98 | { 99 | InternetAddress address; 100 | 101 | shared this( string addr, bool host ) 102 | { 103 | super( ConnectionType.UDP ); 104 | 105 | address = cast(shared) new InternetAddress( addr, 8080 ); 106 | socket = cast(shared) new UdpSocket(); 107 | 108 | (cast(Socket)socket).bind( new InternetAddress( 8080 ) ); 109 | (cast(Socket)socket).connect( cast(Address)address ); 110 | } 111 | 112 | override shared void send( const ubyte[] args ) 113 | { 114 | auto sizeSent = (cast(Socket)socket).sendTo( args ~ terminator, cast(Address)address ); 115 | 116 | assert( args.length + terminator.length == sizeSent, "Not all bytes sent." ); 117 | } 118 | 119 | override shared void close() 120 | { 121 | (cast(Socket)socket).close(); 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /source/dash/package.d: -------------------------------------------------------------------------------- 1 | module dash; 2 | public: 3 | import dash.core; 4 | import dash.editor; 5 | import dash.components; 6 | import dash.graphics; 7 | import dash.utility; 8 | import dash.net; 9 | -------------------------------------------------------------------------------- /source/dash/utility/concurrency.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Defines some useful helpers for running the engine concurrently. 3 | */ 4 | module dash.utility.concurrency; 5 | 6 | public import core.thread, std.concurrency, std.parallelism; 7 | 8 | /// The ID of the main thread 9 | @property Tid mainThread() { return cast()_mainThread; } 10 | /// Returns true if called by main thread 11 | @property bool onMainThread() { return thisTid == mainThread; } 12 | 13 | shared static this() 14 | { 15 | _mainThread = cast(shared)thisTid; 16 | } 17 | 18 | private shared Tid _mainThread; 19 | -------------------------------------------------------------------------------- /source/dash/utility/config.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Defines the static class Config, which handles all configuration options. 3 | */ 4 | module dash.utility.config; 5 | import dash.utility.resources, dash.utility.data; 6 | 7 | import std.experimental.logger; 8 | import std.datetime; 9 | 10 | /** 11 | * The global instance of config. 12 | */ 13 | private Config configInst; 14 | /// ditto 15 | const(Config) config() @property 16 | { 17 | return configInst; 18 | } 19 | 20 | enum WindowType 21 | { 22 | Fullscreen, 23 | FullscreenWindowed, 24 | Windowed, 25 | BorderlessWindow 26 | } 27 | 28 | /** 29 | * Static class which handles the configuration options and YAML interactions. 30 | */ 31 | struct Config 32 | { 33 | public: 34 | @rename( "Logging" ) @optional 35 | LoggerSettings logging; 36 | @rename( "Display" ) @optional 37 | DisplaySettings display; 38 | @rename( "Graphics" ) @optional 39 | GraphicsSettings graphics; 40 | @rename( "UserInterface" ) @optional 41 | UserInterfaceSettings userInterface; 42 | @rename( "Editor" ) @optional 43 | EditorSettings editor; 44 | 45 | static struct LoggerSettings 46 | { 47 | @rename( "FilePath" ) @optional 48 | string filePath = "dash.log"; 49 | @rename( "Debug" ) @optional 50 | Verbosities debug_ = Verbosities( LogLevel.all, LogLevel.all ); 51 | @rename( "Release" ) @optional 52 | Verbosities release = Verbosities( LogLevel.off, LogLevel.error ); 53 | 54 | @ignore 55 | Verbosities verbosities() const @property pure @safe nothrow @nogc 56 | { 57 | debug return debug_; 58 | else return release; 59 | } 60 | 61 | static struct Verbosities 62 | { 63 | @rename( "OutputVerbosity" ) @optional @byName 64 | LogLevel outputVerbosity = LogLevel.info; 65 | @rename( "LoggingVerbosity" ) @optional @byName 66 | LogLevel loggingVerbosity = LogLevel.all; 67 | } 68 | } 69 | 70 | static struct DisplaySettings 71 | { 72 | @rename( "WindowType" ) @optional @byName 73 | WindowType windowMode = WindowType.Windowed; 74 | @rename( "Height" ) @optional 75 | uint height = 1920; 76 | @rename( "Width" ) @optional 77 | uint width = 720; 78 | } 79 | 80 | static struct GraphicsSettings 81 | { 82 | @rename( "BackfaceCulling" ) @optional 83 | bool backfaceCulling = true; 84 | @rename( "VSync" ) @optional 85 | bool vsync = false; 86 | @rename( "OpenGL33" ) @optional 87 | bool usingGl33 = false; 88 | } 89 | 90 | static struct UserInterfaceSettings 91 | { 92 | @rename( "FilePath" ) @optional 93 | string filePath = null; 94 | } 95 | 96 | static struct EditorSettings 97 | { 98 | @rename( "Port" ) @optional 99 | ushort port = 8080; 100 | @rename( "Route" ) @optional 101 | string route = "ws"; 102 | } 103 | 104 | static: 105 | @ignore 106 | private Resource resource = internalResource; 107 | 108 | void initialize() 109 | { 110 | auto res = deserializeFileByName!Config( Resources.ConfigFile ); 111 | configInst = res[ 0 ]; 112 | resource = res[ 1 ]; 113 | } 114 | 115 | void refresh() 116 | { 117 | if( resource.needsRefresh ) 118 | { 119 | configInst = deserializeFile!Config( resource ); 120 | } 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /source/dash/utility/data/package.d: -------------------------------------------------------------------------------- 1 | module dash.utility.data; 2 | public: 3 | import dash.utility.data.yaml; 4 | import dash.utility.data.serialization; 5 | -------------------------------------------------------------------------------- /source/dash/utility/input/mouse.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Defines the Mouse input device. 3 | */ 4 | module dash.utility.input.mouse; 5 | import dash.utility.input.inputsystem; 6 | 7 | /// Defines the Mouse input device. 8 | alias Mouse = InputSystem!( MouseButtons, MouseAxes ); 9 | 10 | package: 11 | // Enums of inputs 12 | enum MouseButtons 13 | { 14 | Left = 0x01, /// Left mouse button 15 | Right = 0x02, /// Right mouse button 16 | Middle = 0x04, /// Middle mouse button 17 | X1 = 0x05, /// X1 mouse button 18 | X2 = 0x06, /// X2 mouse button 19 | END, 20 | } 21 | 22 | /// Axes of input for the mouse. 23 | enum MouseAxes 24 | { 25 | ScrollWheel, 26 | XPos, 27 | YPos, 28 | END, 29 | } -------------------------------------------------------------------------------- /source/dash/utility/input/package.d: -------------------------------------------------------------------------------- 1 | module dash.utility.input; 2 | public: 3 | import dash.utility.input.input; 4 | import dash.utility.input.inputsystem; 5 | import dash.utility.input.keyboard; 6 | import dash.utility.input.mouse; 7 | -------------------------------------------------------------------------------- /source/dash/utility/math.d: -------------------------------------------------------------------------------- 1 | module dash.utility.math; 2 | 3 | version( DashUseGl3n ) 4 | { 5 | public: 6 | // Linear Algebra types 7 | import gl3n.linalg; 8 | 9 | // Vectors 10 | alias vec2f = Vector!( float, 2 ); 11 | alias vec2ui = Vector!( uint, 2 ); 12 | alias vec3f = Vector!( float, 3 ); 13 | alias vec4f = Vector!( float, 4 ); 14 | 15 | // Quaternions 16 | alias quatf = Quaternion!float; 17 | 18 | inout(Matrix!( Floating, Size, Size )) toMatrix( uint Size, Floating )( inout Quaternion!Floating q ) @property 19 | if( Size == 3 || Size == 4 ) 20 | { 21 | return q.to_matrix!( Size, Size ); 22 | } 23 | 24 | inout(Vector!( Floating, 3 )) toEulerAngles( Floating )( inout Quaternion!Floating q ) @property 25 | { 26 | return typeof(return)( q.pitch, q.yaw, q.roll ); 27 | } 28 | 29 | Quaternion!Floating fromEulerAngles( Floating = float )( Floating pitch, Floating yaw, Floating roll ) 30 | { 31 | return Quaternion!Floating.identity.rotatex( pitch.radians ).rotatey( yaw.radians ).rotatez( roll.radians ); 32 | } 33 | 34 | Quaternion!Floating fromEulerAngles( Floating = float )( Vector!( Floating, 3 ) vec ) 35 | { 36 | return fromEulerAngles( vec.x, vec.y, vec.z ); 37 | } 38 | 39 | Quaternion!Floating fromEulerAngles( Floating = float )( Floating[] angles ) 40 | in 41 | { 42 | assert( angles.length >= 3, "Invalid array given." ); 43 | } 44 | body 45 | { 46 | return fromEulerAngles( angles[ 0 ], angles[ 1 ], angles[ 2 ] ); 47 | } 48 | 49 | // Matrices 50 | alias mat4f = Matrix!( float, 4, 4 ); 51 | 52 | mat4f perspectiveMat( float width, float height, float fov, float near, float far ) 53 | { 54 | return mat4f.perspective( width, height, fov, near, far ); 55 | } 56 | 57 | // Interpolation functions 58 | import gl3n.interpolate; 59 | 60 | // AABB types 61 | import gl3n.aabb; 62 | alias box3f = AABBT!float; 63 | 64 | void expandInPlace( Floating )( ref AABBT!Floating box, Vector!( Floating, 3 ) v ) 65 | { 66 | box.expand( v ); 67 | } 68 | 69 | // Other functions 70 | import gl3n.frustum; 71 | import gl3n.math; 72 | } 73 | else version( DashUseGfmMath ) 74 | { 75 | 76 | } -------------------------------------------------------------------------------- /source/dash/utility/package.d: -------------------------------------------------------------------------------- 1 | module dash.utility; 2 | public: 3 | import dash.utility.data; 4 | import dash.utility.config; 5 | import dash.utility.input; 6 | import dash.utility.math; 7 | import dash.utility.output; 8 | import dash.utility.time; 9 | import dash.utility.profiler; 10 | import dash.utility.string; 11 | import dash.utility.concurrency; 12 | import dash.utility.tasks; 13 | import dash.utility.resources; 14 | -------------------------------------------------------------------------------- /source/dash/utility/profiler.d: -------------------------------------------------------------------------------- 1 | module dash.utility.profiler; 2 | 3 | // Enable profiler in debug mode. 4 | debug version = DashUseProfiler; 5 | 6 | version( DashUseProfiler ) 7 | { 8 | import tharsis.prof; 9 | public import tharsis.prof: Zone; 10 | 11 | private enum profileDataSize = Profiler.maxEventBytes * 1024; 12 | } 13 | else 14 | { 15 | struct Zone { } 16 | } 17 | 18 | abstract class DashProfiler 19 | { 20 | static: 21 | public: 22 | void initialize() 23 | { 24 | version( DashUseProfiler ) 25 | { 26 | tharsis = new Profiler( profileData[] ); 27 | } 28 | } 29 | 30 | void update() 31 | { 32 | version( DashUseProfiler ) 33 | { 34 | import std.array: array; 35 | import std.algorithm: map; 36 | import dash.core.dgame: DGame; 37 | 38 | DGame.instance.editor.send( "dash:perf:zone_data", tharsis.profileData.zoneRange.map!( z => DashZone( z ) ) .array ); 39 | 40 | tharsis.reset(); 41 | } 42 | } 43 | 44 | Zone startZone( string name ) 45 | { 46 | version( DashUseProfiler ) 47 | return Zone( tharsis, name ); 48 | else 49 | return Zone(); 50 | } 51 | 52 | private: 53 | version( DashUseProfiler ) 54 | { 55 | Profiler tharsis; 56 | ubyte[profileDataSize] profileData; 57 | } 58 | } 59 | 60 | private struct DashZone 61 | { 62 | uint id; 63 | uint parentID; 64 | ushort nestLevel; 65 | ulong startTime; 66 | ulong duration; 67 | string info; 68 | ulong endTime; 69 | 70 | this( ZoneData zone ) 71 | { 72 | import std.conv: to; 73 | id = zone.id; 74 | parentID = zone.parentID; 75 | nestLevel = zone.nestLevel; 76 | startTime = zone.startTime; 77 | duration = zone.duration; 78 | info = zone.info.to!string; 79 | endTime = zone.endTime; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /source/dash/utility/string.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Defines utility functions for strings 3 | */ 4 | module dash.utility.string; 5 | 6 | import std.array, std.traits; 7 | 8 | // std.string.fromStringz was introduced in https://github.com/D-Programming-Language/phobos/pull/1607 9 | static if( __VERSION__ < 2066 ) 10 | { 11 | /** 12 | * Returns new string formed from C-style (null-terminated) string $(D msg). Usefull 13 | * when interfacing with C libraries. For D-style to C-style convertion use std.string.toStringz. 14 | * 15 | * Params: 16 | * msg = The C string to convert. 17 | * 18 | * Authors: NCrashed 19 | */ 20 | string fromStringz( const char* msg ) pure nothrow 21 | { 22 | scope(failure) return ""; 23 | if( msg is null ) return ""; 24 | 25 | auto buff = appender!(char[]); 26 | uint i = 0; 27 | while( msg[i] != cast(char)0 ) 28 | { 29 | buff.put(msg[i++]); 30 | } 31 | 32 | return buff.data.idup; 33 | } 34 | /// Example 35 | unittest 36 | { 37 | char[] cstring = "some string".dup ~ cast(char)0; 38 | 39 | assert(cstring.ptr.fromStringz == "some string"); 40 | assert(null.fromStringz == ""); 41 | } 42 | } 43 | 44 | /** 45 | * Replaces each key in replaceMap with it's value. 46 | * 47 | * Params: 48 | * base = The string to replace on. 49 | * replaceMap = The map to use to replace things. 50 | * 51 | * Returns: The updated string. 52 | */ 53 | T replaceMap( T, TKey, TValue )( T base, TKey[TValue] replaceMap ) 54 | if( isSomeString!T && isSomeString!TKey && isSomeString!TValue ) 55 | { 56 | scope(failure) return ""; 57 | if( base is null ) return ""; 58 | 59 | auto result = base; 60 | 61 | foreach( key, value; replaceMap ) 62 | { 63 | result = result.replace( key, value ); 64 | } 65 | 66 | return result; 67 | } 68 | /// Example 69 | unittest 70 | { 71 | assert( "$val1 $val2 val3".replaceMap( [ "$val1": "test1", "$val2": "test2", "$val3": "test3" ] ) == "test1 test2 val3" ); 72 | } 73 | -------------------------------------------------------------------------------- /source/dash/utility/time.d: -------------------------------------------------------------------------------- 1 | /** 2 | * Defines the static Time class, which manages all game time related things. 3 | */ 4 | module dash.utility.time; 5 | import dash.utility; 6 | 7 | import std.datetime; 8 | 9 | /** 10 | * Converts a duration to a float of seconds. 11 | * 12 | * Params: 13 | * dur = The duration to convert. 14 | * 15 | * Returns: The duration in seconds. 16 | */ 17 | float toSeconds( Duration dur ) 18 | { 19 | return cast(float)dur.total!"hnsecs" / cast(float)1.convert!( "seconds", "hnsecs" ); 20 | } 21 | 22 | TimeManager Time; 23 | 24 | static this() 25 | { 26 | Time = new TimeManager; 27 | } 28 | 29 | /** 30 | * Manages time and delta time. 31 | */ 32 | final class TimeManager 33 | { 34 | private: 35 | Duration delta; 36 | Duration total; 37 | 38 | public: 39 | /** 40 | * Time since last frame in seconds. 41 | */ 42 | @property float deltaTime() { return delta.toSeconds; } 43 | /** 44 | * Total time spent running in seconds. 45 | */ 46 | @property float totalTime() { return total.toSeconds; } 47 | 48 | /** 49 | * Update the times. Only call once per frame! 50 | */ 51 | void update() 52 | { 53 | assert( onMainThread, "Must call Time.update from main thread." ); 54 | 55 | updateTime(); 56 | 57 | import dash.core.dgame: DGame; 58 | DGame.instance.editor.send( "dash:perf:frametime", deltaTime ); 59 | } 60 | 61 | private: 62 | this() 63 | { 64 | delta = total = Duration.zero; 65 | } 66 | } 67 | 68 | private: 69 | StopWatch sw; 70 | TickDuration cur; 71 | TickDuration prev; 72 | Duration delta; 73 | Duration total; 74 | Duration second; 75 | int frameCount; 76 | 77 | /** 78 | * Initialize the time controller with initial values. 79 | */ 80 | static this() 81 | { 82 | cur = prev = TickDuration.min; 83 | total = delta = second = Duration.zero; 84 | frameCount = 0; 85 | } 86 | 87 | /** 88 | * Thread local time update. 89 | */ 90 | void updateTime() 91 | { 92 | if( !sw.running ) 93 | { 94 | sw.start(); 95 | cur = prev = sw.peek(); 96 | } 97 | 98 | delta = cast(Duration)( cur - prev ); 99 | 100 | prev = cur; 101 | cur = sw.peek(); 102 | 103 | // Pass to values 104 | Time.total = cast(Duration)cur; 105 | Time.delta = delta; 106 | 107 | // Update framerate 108 | ++frameCount; 109 | second += delta; 110 | if( second >= 1.seconds ) 111 | { 112 | tracef( "Framerate: %d", frameCount ); 113 | second = Duration.zero; 114 | frameCount = 0; 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /third_party/Awesomium/Awesomium.lib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Circular-Studios/Dash/b7d589ad4ca8993445c136b6a4ae170932bb7962/third_party/Awesomium/Awesomium.lib -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/basetyps.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * basetyps.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW API for MS-Windows 3.10 * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.basetyps; 11 | 12 | private import win32.windef, win32.basetsd; 13 | 14 | align(1) struct GUID { // size is 16 15 | DWORD Data1; 16 | WORD Data2; 17 | WORD Data3; 18 | BYTE[8] Data4; 19 | } 20 | alias GUID UUID, IID, CLSID, FMTID, uuid_t; 21 | alias GUID* LPGUID, LPCLSID, LPIID; 22 | alias CPtr!(GUID) REFGUID, REFIID, REFCLSID, REFFMTID; 23 | 24 | alias uint error_status_t, PROPID; 25 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/cderr.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * cderr.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.cderr; 11 | 12 | enum { 13 | CDERR_DIALOGFAILURE = 0xFFFF, 14 | CDERR_GENERALCODES = 0x0000, 15 | CDERR_STRUCTSIZE, 16 | CDERR_INITIALIZATION, 17 | CDERR_NOTEMPLATE, 18 | CDERR_NOHINSTANCE, 19 | CDERR_LOADSTRFAILURE, 20 | CDERR_FINDRESFAILURE, 21 | CDERR_LOADRESFAILURE, 22 | CDERR_LOCKRESFAILURE, 23 | CDERR_MEMALLOCFAILURE, 24 | CDERR_MEMLOCKFAILURE, 25 | CDERR_NOHOOK, 26 | CDERR_REGISTERMSGFAIL, 27 | PDERR_PRINTERCODES = 0x1000, 28 | PDERR_SETUPFAILURE, 29 | PDERR_PARSEFAILURE, 30 | PDERR_RETDEFFAILURE, 31 | PDERR_LOADDRVFAILURE, 32 | PDERR_GETDEVMODEFAIL, 33 | PDERR_INITFAILURE, 34 | PDERR_NODEVICES, 35 | PDERR_NODEFAULTPRN, 36 | PDERR_DNDMMISMATCH, 37 | PDERR_CREATEICFAILURE, 38 | PDERR_PRINTERNOTFOUND, 39 | PDERR_DEFAULTDIFFERENT, 40 | CFERR_CHOOSEFONTCODES = 0x2000, 41 | CFERR_NOFONTS, 42 | CFERR_MAXLESSTHANMIN, 43 | FNERR_FILENAMECODES = 0x3000, 44 | FNERR_SUBCLASSFAILURE, 45 | FNERR_INVALIDFILENAME, 46 | FNERR_BUFFERTOOSMALL, 47 | FRERR_FINDREPLACECODES = 0x4000, 48 | FRERR_BUFFERLENGTHZERO, 49 | CCERR_CHOOSECOLORCODES = 0x5000 50 | } 51 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/cguid.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * cguid.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.cguid; 11 | 12 | private import win32.basetyps; 13 | 14 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/comcat.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * comcat.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.comcat; 12 | 13 | import win32.windows, win32.ole2; 14 | private import win32.basetyps, win32.cguid, win32.objbase, win32.unknwn, 15 | win32.windef, win32.wtypes; 16 | 17 | alias IEnumGUID* LPENUMGUID; 18 | 19 | interface IEnumGUID : IUnknown { 20 | HRESULT Next(ULONG, GUID*, ULONG*); 21 | HRESULT Skip(ULONG); 22 | HRESULT Reset(); 23 | HRESULT Clone(LPENUMGUID*); 24 | } 25 | 26 | alias GUID CATID; 27 | alias REFGUID REFCATID; 28 | alias GUID_NULL CATID_NULL; 29 | alias IsEqualGUID IsEqualCATID; 30 | 31 | struct CATEGORYINFO { 32 | CATID catid; 33 | LCID lcid; 34 | OLECHAR[128] szDescription; 35 | } 36 | alias CATEGORYINFO* LPCATEGORYINFO; 37 | 38 | alias IEnumGUID IEnumCATID; 39 | alias LPENUMGUID LPENUMCATID; 40 | alias IID_IEnumGUID IID_IEnumCATID; 41 | 42 | alias IEnumGUID IEnumCLSID; 43 | alias LPENUMGUID LPENUMCLSID; 44 | alias IID_IEnumGUID IID_IEnumCLSID; 45 | 46 | interface ICatInformation : IUnknown { 47 | HRESULT EnumCategories(LCID, LPENUMCATEGORYINFO*); 48 | HRESULT GetCategoryDesc(REFCATID, LCID, PWCHAR*); 49 | HRESULT EnumClassesOfCategories(ULONG, CATID*, ULONG, CATID*, 50 | LPENUMCLSID*); 51 | HRESULT IsClassOfCategories(REFCLSID, ULONG, CATID*, ULONG, CATID*); 52 | HRESULT EnumImplCategoriesOfClass(REFCLSID, LPENUMCATID*); 53 | HRESULT EnumReqCategoriesOfClass(REFCLSID, LPENUMCATID*); 54 | } 55 | alias ICatInformation* LPCATINFORMATION; 56 | 57 | interface ICatRegister : IUnknown { 58 | HRESULT RegisterCategories(ULONG, CATEGORYINFO*); 59 | HRESULT UnRegisterCategories(ULONG, CATID*); 60 | HRESULT RegisterClassImplCategories(REFCLSID, ULONG, CATID*); 61 | HRESULT UnRegisterClassImplCategories(REFCLSID, ULONG, CATID*); 62 | HRESULT RegisterClassReqCategories(REFCLSID, ULONG, CATID*); 63 | HRESULT UnRegisterClassReqCategories(REFCLSID, ULONG, CATID*); 64 | } 65 | alias ICatRegister* LPCATREGISTER; 66 | 67 | interface IEnumCATEGORYINFO : IUnknown { 68 | HRESULT Next(ULONG, CATEGORYINFO*, ULONG*); 69 | HRESULT Skip(ULONG); 70 | HRESULT Reset(); 71 | HRESULT Clone(LPENUMCATEGORYINFO*); 72 | } 73 | alias IEnumCATEGORYINFO* LPENUMCATEGORYINFO; 74 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/core.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * core.d * 3 | * * 4 | * Helper module for the Windows API * 5 | * * 6 | * Placed into public domain * 7 | \***********************************************************************/ 8 | module win32.core; 9 | 10 | /** 11 | The core Windows API functions. 12 | 13 | Importing this file is equivalent to the C code: 14 | --- 15 | #define WIN32_LEAN_AND_MEAN 16 | #include "windows.h" 17 | --- 18 | 19 | */ 20 | 21 | public import win32.windef; 22 | public import win32.winnt; 23 | public import win32.wincon; 24 | public import win32.winbase; 25 | public import win32.wingdi; 26 | public import win32.winuser; 27 | public import win32.winnls; 28 | public import win32.winver; 29 | public import win32.winnetwk; 30 | 31 | // We can't use static if for imports, build gets confused. 32 | // static if (_WIN32_WINNT_ONLY) import win32.winsvc; 33 | version (WindowsVista) { 34 | version = WIN32_WINNT_ONLY; 35 | } else version (Windows2003) { 36 | version = WIN32_WINNT_ONLY; 37 | } else version (WindowsXP) { 38 | version = WIN32_WINNT_ONLY; 39 | } else version (WindowsNTonly) { 40 | version = WIN32_WINNT_ONLY; 41 | } 42 | 43 | version (WIN32_WINNT_ONLY) { 44 | public import win32.winsvc; 45 | } 46 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/cpl.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * cpl.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.cpl; 12 | 13 | private import win32.windef, win32.winuser; 14 | 15 | enum : uint { 16 | WM_CPL_LAUNCH = WM_USER + 1000, 17 | WM_CPL_LAUNCHED 18 | } 19 | 20 | enum : uint { 21 | CPL_DYNAMIC_RES, 22 | CPL_INIT, 23 | CPL_GETCOUNT, 24 | CPL_INQUIRE, 25 | CPL_SELECT, 26 | CPL_DBLCLK, 27 | CPL_STOP, 28 | CPL_EXIT, 29 | CPL_NEWINQUIRE, 30 | CPL_STARTWPARMSA, 31 | CPL_STARTWPARMSW, // = 10 32 | CPL_SETUP = 200 33 | } 34 | 35 | extern (Windows) alias LONG function(HWND, UINT, LONG, LONG) APPLET_PROC; 36 | 37 | struct CPLINFO { 38 | int idIcon; 39 | int idName; 40 | int idInfo; 41 | LONG lData; 42 | } 43 | alias CPLINFO* LPCPLINFO; 44 | 45 | struct NEWCPLINFOA { 46 | DWORD dwSize = NEWCPLINFOA.sizeof; 47 | DWORD dwFlags; 48 | DWORD dwHelpContext; 49 | LONG lData; 50 | HICON hIcon; 51 | CHAR[32] szName; 52 | CHAR[64] szInfo; 53 | CHAR[128] szHelpFile; 54 | } 55 | alias NEWCPLINFOA* LPNEWCPLINFOA; 56 | 57 | struct NEWCPLINFOW { 58 | DWORD dwSize = NEWCPLINFOW.sizeof; 59 | DWORD dwFlags; 60 | DWORD dwHelpContext; 61 | LONG lData; 62 | HICON hIcon; 63 | WCHAR[32] szName; 64 | WCHAR[64] szInfo; 65 | WCHAR[128] szHelpFile; 66 | } 67 | alias NEWCPLINFOW* LPNEWCPLINFOW; 68 | 69 | version (Unicode) { 70 | alias CPL_STARTWPARMSW CPL_STARTWPARMS; 71 | alias NEWCPLINFOW NEWCPLINFO; 72 | } else { 73 | alias CPL_STARTWPARMSA CPL_STARTWPARMS; 74 | alias NEWCPLINFOA NEWCPLINFO; 75 | } 76 | 77 | alias NEWCPLINFO* LPNEWCPLINFO; 78 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/cplext.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * cplext.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW API for MS-Windows 3.10 * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.cplext; 12 | 13 | enum : uint { 14 | CPLPAGE_MOUSE_BUTTONS = 1, 15 | CPLPAGE_MOUSE_PTRMOTION = 2, 16 | CPLPAGE_MOUSE_WHEEL = 3, 17 | CPLPAGE_KEYBOARD_SPEED = 1, 18 | CPLPAGE_DISPLAY_BACKGROUND = 1 19 | } 20 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/custcntl.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * custcntl.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.custcntl; 12 | 13 | private import win32.windef; 14 | 15 | // FIXME: check type 16 | const CCF_NOTEXT = 1; 17 | 18 | const size_t 19 | CCHCCCLASS = 32, 20 | CCHCCDESC = 32, 21 | CCHCCTEXT = 256; 22 | 23 | struct CCSTYLEA { 24 | DWORD flStyle; 25 | DWORD flExtStyle; 26 | CHAR[CCHCCTEXT] szText; 27 | LANGID lgid; 28 | WORD wReserved1; 29 | } 30 | alias CCSTYLEA* LPCCSTYLEA; 31 | 32 | struct CCSTYLEW { 33 | DWORD flStyle; 34 | DWORD flExtStyle; 35 | WCHAR[CCHCCTEXT] szText; 36 | LANGID lgid; 37 | WORD wReserved1; 38 | } 39 | alias CCSTYLEW* LPCCSTYLEW; 40 | 41 | struct CCSTYLEFLAGA { 42 | DWORD flStyle; 43 | DWORD flStyleMask; 44 | LPSTR pszStyle; 45 | } 46 | alias CCSTYLEFLAGA* LPCCSTYLEFLAGA; 47 | 48 | struct CCSTYLEFLAGW { 49 | DWORD flStyle; 50 | DWORD flStyleMask; 51 | LPWSTR pszStyle; 52 | } 53 | alias CCSTYLEFLAGW* LPCCSTYLEFLAGW; 54 | 55 | struct CCINFOA { 56 | CHAR[CCHCCCLASS] szClass; 57 | DWORD flOptions; 58 | CHAR[CCHCCDESC] szDesc; 59 | UINT cxDefault; 60 | UINT cyDefault; 61 | DWORD flStyleDefault; 62 | DWORD flExtStyleDefault; 63 | DWORD flCtrlTypeMask; 64 | CHAR[CCHCCTEXT] szTextDefault; 65 | INT cStyleFlags; 66 | LPCCSTYLEFLAGA aStyleFlags; 67 | LPFNCCSTYLEA lpfnStyle; 68 | LPFNCCSIZETOTEXTA lpfnSizeToText; 69 | DWORD dwReserved1; 70 | DWORD dwReserved2; 71 | } 72 | alias CCINFOA* LPCCINFOA; 73 | 74 | struct CCINFOW { 75 | WCHAR[CCHCCCLASS] szClass; 76 | DWORD flOptions; 77 | WCHAR[CCHCCDESC] szDesc; 78 | UINT cxDefault; 79 | UINT cyDefault; 80 | DWORD flStyleDefault; 81 | DWORD flExtStyleDefault; 82 | DWORD flCtrlTypeMask; 83 | WCHAR[CCHCCTEXT] szTextDefault; 84 | INT cStyleFlags; 85 | LPCCSTYLEFLAGW aStyleFlags; 86 | LPFNCCSTYLEW lpfnStyle; 87 | LPFNCCSIZETOTEXTW lpfnSizeToText; 88 | DWORD dwReserved1; 89 | DWORD dwReserved2; 90 | } 91 | alias CCINFOW* LPCCINFOW; 92 | 93 | extern (Windows) { 94 | alias BOOL function(HWND, LPCCSTYLEA) LPFNCCSTYLEA; 95 | alias BOOL function(HWND, LPCCSTYLEW) LPFNCCSTYLEW; 96 | alias INT function(DWORD, DWORD, HFONT, LPSTR) LPFNCCSIZETOTEXTA; 97 | alias INT function(DWORD, DWORD, HFONT, LPWSTR) LPFNCCSIZETOTEXTW; 98 | alias UINT function(LPCCINFOA) LPFNCCINFOA; 99 | alias UINT function(LPCCINFOW) LPFNCCINFOW; 100 | UINT CustomControlInfoA(LPCCINFOA acci); 101 | UINT CustomControlInfoW(LPCCINFOW acci); 102 | } 103 | 104 | version (Unicode) { 105 | alias CCSTYLEW CCSTYLE; 106 | alias CCSTYLEFLAGW CCSTYLEFLAG; 107 | alias CCINFOW CCINFO; 108 | alias LPFNCCSTYLEW LPFNCCSTYLE; 109 | alias LPFNCCSIZETOTEXTW LPFNCCSIZETOTEXT; 110 | alias LPFNCCINFOW LPFNCCINFO; 111 | } else { 112 | alias CCSTYLEA CCSTYLE; 113 | alias CCSTYLEFLAGA CCSTYLEFLAG; 114 | alias CCINFOA CCINFO; 115 | alias LPFNCCSTYLEA LPFNCCSTYLE; 116 | alias LPFNCCSIZETOTEXTA LPFNCCSIZETOTEXT; 117 | alias LPFNCCINFOA LPFNCCINFO; 118 | } 119 | 120 | alias CCSTYLE* LPCCSTYLE; 121 | alias CCSTYLEFLAG* LPCCSTYLEFLAG; 122 | alias CCINFO* LPCCINFO; 123 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/dhcpcsdk.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * dhcpcsdk.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.dhcpcsdk; 12 | 13 | private import win32.w32api, win32.windef; 14 | 15 | static assert (_WIN32_WINNT_ONLY && _WIN32_WINNT >= 0x500, 16 | "win32.dhcpcsdk is available only if version WindowsXP, Windows2003 17 | or WindowsVista is set, or both Windows2000 and WindowsNTonly are set"); 18 | 19 | //#if (_WIN32_WINNT >= 0x0500) 20 | 21 | // FIXME: check type 22 | const DHCPCAPI_REGISTER_HANDLE_EVENT = 1; 23 | const DHCPCAPI_REQUEST_PERSISTENT = 1; 24 | const DHCPCAPI_REQUEST_SYNCHRONOUS = 2; 25 | 26 | struct DHCPCAPI_CLASSID { 27 | ULONG Flags; 28 | LPBYTE Data; 29 | ULONG nBytesData; 30 | } 31 | alias DHCPCAPI_CLASSID* PDHCPCAPI_CLASSID, LPDHCPCAPI_CLASSID; 32 | 33 | struct DHCPAPI_PARAMS { 34 | ULONG Flags; 35 | ULONG OptionId; 36 | BOOL IsVendor; 37 | LPBYTE Data; 38 | DWORD nBytesData; 39 | } 40 | alias DHCPAPI_PARAMS* PDHCPAPI_PARAMS, LPDHCPAPI_PARAMS; 41 | 42 | struct DHCPCAPI_PARAMS_ARRAY { 43 | ULONG nParams; 44 | LPDHCPAPI_PARAMS Params; 45 | } 46 | alias DHCPCAPI_PARAMS_ARRAY* PDHCPCAPI_PARAMS_ARRAY, LPDHCPCAPI_PARAMS_ARRAY; 47 | 48 | extern (Windows) { 49 | void DhcpCApiCleanup(); 50 | DWORD DhcpCApiInitialize(LPDWORD); 51 | DWORD DhcpDeRegisterParamChange(DWORD, LPVOID, LPVOID); 52 | DWORD DhcpRegisterParamChange(DWORD, LPVOID, PWSTR, LPDHCPCAPI_CLASSID, 53 | DHCPCAPI_PARAMS_ARRAY, LPVOID); 54 | DWORD DhcpRemoveDNSRegistrations(); 55 | DWORD DhcpUndoRequestParams(DWORD, LPVOID, LPWSTR, LPWSTR); 56 | } 57 | 58 | //#endif // (_WIN32_WINNT >= 0x0500) 59 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/docobj.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * docobj.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.docobj; 11 | 12 | private import win32.basetyps, win32.oaidl, win32.objidl, win32.oleidl, 13 | win32.unknwn, win32.windef, win32.wtypes; 14 | 15 | // FIXME: remove inherited methods from interface definitions 16 | 17 | enum { 18 | OLECMDERR_E_UNKNOWNGROUP = -2147221244, 19 | OLECMDERR_E_CANCELED = -2147221245, 20 | OLECMDERR_E_NOHELP = -2147221246, 21 | OLECMDERR_E_DISABLED = -2147221247, 22 | OLECMDERR_E_NOTSUPPORTED = -2147221248 23 | } 24 | 25 | enum OLECMDID { 26 | OLECMDID_OPEN = 1, 27 | OLECMDID_NEW = 2, 28 | OLECMDID_SAVE = 3, 29 | OLECMDID_SAVEAS = 4, 30 | OLECMDID_SAVECOPYAS = 5, 31 | OLECMDID_PRINT = 6, 32 | OLECMDID_PRINTPREVIEW = 7, 33 | OLECMDID_PAGESETUP = 8, 34 | OLECMDID_SPELL = 9, 35 | OLECMDID_PROPERTIES = 10, 36 | OLECMDID_CUT = 11, 37 | OLECMDID_COPY = 12, 38 | OLECMDID_PASTE = 13, 39 | OLECMDID_PASTESPECIAL = 14, 40 | OLECMDID_UNDO = 15, 41 | OLECMDID_REDO = 16, 42 | OLECMDID_SELECTALL = 17, 43 | OLECMDID_CLEARSELECTION = 18, 44 | OLECMDID_ZOOM = 19, 45 | OLECMDID_GETZOOMRANGE = 20, 46 | OLECMDID_UPDATECOMMANDS = 21, 47 | OLECMDID_REFRESH = 22, 48 | OLECMDID_STOP = 23, 49 | OLECMDID_HIDETOOLBARS = 24, 50 | OLECMDID_SETPROGRESSMAX = 25, 51 | OLECMDID_SETPROGRESSPOS = 26, 52 | OLECMDID_SETPROGRESSTEXT = 27, 53 | OLECMDID_SETTITLE = 28, 54 | OLECMDID_SETDOWNLOADSTATE = 29, 55 | OLECMDID_STOPDOWNLOAD = 30 56 | } 57 | 58 | enum OLECMDF { 59 | OLECMDF_SUPPORTED = 1, 60 | OLECMDF_ENABLED = 2, 61 | OLECMDF_LATCHED = 4, 62 | OLECMDF_NINCHED = 8 63 | } 64 | 65 | enum OLECMDEXECOPT { 66 | OLECMDEXECOPT_DODEFAULT = 0, 67 | OLECMDEXECOPT_PROMPTUSER = 1, 68 | OLECMDEXECOPT_DONTPROMPTUSER = 2, 69 | OLECMDEXECOPT_SHOWHELP = 3 70 | } 71 | 72 | struct OLECMDTEXT { 73 | DWORD cmdtextf; 74 | ULONG cwActual; 75 | ULONG cwBuf; 76 | wchar rgwz[1]; 77 | } 78 | 79 | struct OLECMD { 80 | ULONG cmdID; 81 | DWORD cmdf; 82 | } 83 | 84 | alias IOleInPlaceSite* LPOLEINPLACESITE; 85 | alias IEnumOleDocumentViews* LPENUMOLEDOCUMENTVIEWS; 86 | 87 | extern (C) extern const IID 88 | IID_IContinueCallback, 89 | IID_IEnumOleDocumentViews, 90 | IID_IPrint, 91 | IID_IOleDocumentView, 92 | IID_IOleDocument, 93 | IID_IOleCommandTarget, 94 | IID_IOleDocumentSite; 95 | 96 | 97 | interface IOleDocumentView : IUnknown { 98 | HRESULT SetInPlaceSite(LPOLEINPLACESITE); 99 | HRESULT GetInPlaceSite(LPOLEINPLACESITE*); 100 | HRESULT GetDocument(IUnknown**); 101 | HRESULT SetRect(LPRECT); 102 | HRESULT GetRect(LPRECT); 103 | HRESULT SetRectComplex(LPRECT, LPRECT, LPRECT, LPRECT); 104 | HRESULT Show(BOOL); 105 | HRESULT UIActivate(BOOL); 106 | HRESULT Open(); 107 | HRESULT Close(DWORD); 108 | HRESULT SaveViewState(IStream*); 109 | HRESULT ApplyViewState(IStream*); 110 | HRESULT Clone(LPOLEINPLACESITE, IOleDocumentView**); 111 | } 112 | 113 | interface IEnumOleDocumentViews : IUnknown { 114 | HRESULT Next(ULONG, IOleDocumentView*, ULONG*); 115 | HRESULT Skip(ULONG); 116 | HRESULT Reset(); 117 | HRESULT Clone(IEnumOleDocumentViews**); 118 | } 119 | 120 | interface IOleDocument : IUnknown { 121 | HRESULT CreateView(LPOLEINPLACESITE, IStream*, DWORD, IOleDocumentView**); 122 | HRESULT GetDocMiscStatus(DWORD*); 123 | HRESULT EnumViews(LPENUMOLEDOCUMENTVIEWS*, IOleDocumentView**); 124 | } 125 | 126 | interface IOleCommandTarget : IUnknown { 127 | HRESULT QueryStatus(CPtr!(GUID), ULONG, OLECMD*, OLECMDTEXT*); 128 | HRESULT Exec(CPtr!(GUID), DWORD, DWORD, VARIANTARG*, VARIANTARG*); 129 | } 130 | 131 | interface IOleDocumentSite : IUnknown { 132 | HRESULT ActivateMe(IOleDocumentView*); 133 | } 134 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/errorrep.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * errorrep.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.errorrep; 12 | 13 | private import win32.w32api, win32.windef; 14 | 15 | static assert (_WIN32_WINNT >= 0x501, 16 | "win32.errorrep is available only if version WindowsXP, Windows2003 " 17 | "or WindowsVista is set"); 18 | 19 | enum EFaultRepRetVal { 20 | frrvOk, 21 | frrvOkManifest, 22 | frrvOkQueued, 23 | frrvErr, 24 | frrvErrNoDW, 25 | frrvErrTimeout, 26 | frrvLaunchDebugger, 27 | frrvOkHeadless // = 7 28 | } 29 | 30 | extern (Windows) { 31 | BOOL AddERExcludedApplicationA(LPCSTR); 32 | BOOL AddERExcludedApplicationW(LPCWSTR); 33 | EFaultRepRetVal ReportFault(LPEXCEPTION_POINTERS, DWORD); 34 | } 35 | 36 | version (Unicode) { 37 | alias AddERExcludedApplicationW AddERExcludedApplication; 38 | } else { 39 | alias AddERExcludedApplicationA AddERExcludedApplication; 40 | } 41 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/exdispid.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * exdispid.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW API for MS-Windows 3.10 * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.exdispid; 12 | 13 | enum : int { 14 | DISPID_STATUSTEXTCHANGE = 102, 15 | DISPID_PROGRESSCHANGE = 108, 16 | DISPID_TITLECHANGE = 113, 17 | DISPID_BEFORENAVIGATE2 = 250, 18 | DISPID_NEWWINDOW2 = 251, 19 | DISPID_DOCUMENTCOMPLETE = 259 20 | } 21 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/httpext.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * httpext.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.httpext; 11 | 12 | /* Comment from MinGW 13 | httpext.h - Header for ISAPI extensions. 14 | 15 | This file is part of a free library for the Win32 API. 16 | 17 | This library is distributed in the hope that it will be useful, 18 | but WITHOUT ANY WARRANTY; without even the implied warranty of 19 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 20 | */ 21 | 22 | private import win32.windows; 23 | 24 | enum { 25 | HSE_VERSION_MAJOR = 2, 26 | HSE_VERSION_MINOR = 0, 27 | HSE_LOG_BUFFER_LEN = 80, 28 | HSE_MAX_EXT_DLL_NAME_LEN = 256, 29 | HSE_STATUS_SUCCESS = 1, 30 | HSE_STATUS_SUCCESS_AND_KEEP_CONN, 31 | HSE_STATUS_PENDING, 32 | HSE_STATUS_ERROR, 33 | HSE_REQ_BASE = 0, 34 | HSE_REQ_SEND_URL_REDIRECT_RESP, 35 | HSE_REQ_SEND_URL, 36 | HSE_REQ_SEND_RESPONSE_HEADER, 37 | HSE_REQ_DONE_WITH_SESSION, 38 | HSE_REQ_SEND_RESPONSE_HEADER_EX = 1016, 39 | HSE_REQ_END_RESERVED = 1000, 40 | HSE_TERM_ADVISORY_UNLOAD = 0x00000001, 41 | HSE_TERM_MUST_UNLOAD, 42 | HSE_IO_SYNC = 0x00000001, 43 | HSE_IO_ASYNC, 44 | HSE_IO_DISCONNECT_AFTER_SEND = 0x00000004, 45 | HSE_IO_SEND_HEADERS = 0x00000008 46 | } 47 | 48 | alias HANDLE HCONN; 49 | 50 | struct HSE_VERSION_INFO { 51 | DWORD dwExtensionVersion; 52 | CHAR[HSE_MAX_EXT_DLL_NAME_LEN] lpszExtensionDesc; 53 | } 54 | alias HSE_VERSION_INFO* LPHSE_VERSION_INFO; 55 | 56 | struct EXTENSION_CONTROL_BLOCK { 57 | DWORD cbSize = EXTENSION_CONTROL_BLOCK.sizeof; 58 | DWORD dwVersion; 59 | HCONN ConnID; 60 | DWORD dwHttpStatusCode; 61 | CHAR[HSE_LOG_BUFFER_LEN] lpszLogData; 62 | LPSTR lpszMethod; 63 | LPSTR lpszQueryString; 64 | LPSTR lpszPathInfo; 65 | LPSTR lpszPathTranslated; 66 | DWORD cbTotalBytes; 67 | DWORD cbAvailable; 68 | LPBYTE lpbData; 69 | LPSTR lpszContentType; 70 | extern(Pascal) BOOL function(HCONN, LPSTR, LPVOID, LPDWORD) 71 | GetServerVariable; 72 | extern(Pascal) BOOL function(HCONN, LPVOID, LPDWORD, DWORD) WriteClient; 73 | extern(Pascal) BOOL function(HCONN, LPVOID, LPDWORD) ReadClient; 74 | extern(Pascal) BOOL function(HCONN, DWORD, LPVOID, LPDWORD, LPDWORD) 75 | ServerSupportFunction; 76 | } 77 | alias EXTENSION_CONTROL_BLOCK* LPEXTENSION_CONTROL_BLOCK; 78 | 79 | extern (Pascal) { 80 | alias BOOL function(HSE_VERSION_INFO*) PFN_GETEXTENSIONVERSION; 81 | alias DWORD function(EXTENSION_CONTROL_BLOCK*) PFN_HTTPEXTENSIONPROC; 82 | alias BOOL function(DWORD) PFN_TERMINATEEXTENSION; 83 | alias VOID function(EXTENSION_CONTROL_BLOCK*, PVOID, DWORD, DWORD) PFN_HSE_IO_COMPLETION; 84 | } 85 | 86 | struct HSE_TF_INFO { 87 | PFN_HSE_IO_COMPLETION pfnHseIO; 88 | PVOID pContext; 89 | HANDLE hFile; 90 | LPCSTR pszStatusCode; 91 | DWORD BytesToWrite; 92 | DWORD Offset; 93 | PVOID pHead; 94 | DWORD HeadLength; 95 | PVOID pTail; 96 | DWORD TailLength; 97 | DWORD dwFlags; 98 | } 99 | alias HSE_TF_INFO* LPHSE_TF_INFO; 100 | 101 | struct HSE_SEND_HEADER_EX_INFO { 102 | LPCSTR pszStatus; 103 | LPCSTR pszHeader; 104 | DWORD cchStatus; 105 | DWORD cchHeader; 106 | BOOL fKeepConn; 107 | } 108 | alias HSE_SEND_HEADER_EX_INFO* LPHSE_SEND_HEADER_EX_INF; 109 | 110 | extern (Pascal) { 111 | BOOL GetExtensionVersion(HSE_VERSION_INFO*); 112 | DWORD HttpExtensionProc(EXTENSION_CONTROL_BLOCK*); 113 | BOOL TerminateExtension(DWORD); 114 | } 115 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/idispids.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * idispids.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW API for MS-Windows 3.10 * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.idispids; 12 | 13 | enum : int { 14 | DISPID_AMBIENT_OFFLINEIFNOTCONNECTED = -5501, 15 | DISPID_AMBIENT_SILENT = -5502 16 | } 17 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/intshcut.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * intshcut.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.intshcut; 12 | 13 | private import win32.unknwn, win32.windef; 14 | 15 | enum : SCODE { 16 | E_FLAGS = 0x80041000, 17 | // = MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x1000) 18 | URL_E_INVALID_SYNTAX = 0x80041001, 19 | // = MAKE_SCODE(SEVERITY_ERROR, FACILITY_ITF, 0x1001) 20 | URL_E_UNREGISTERED_PROTOCOL = 0x80041002, // etc. 21 | IS_E_EXEC_FAILED = 0x80042002 22 | } 23 | 24 | enum IURL_SETURL_FLAGS { 25 | IURL_SETURL_FL_GUESS_PROTOCOL = 1, 26 | IURL_SETURL_FL_USE_DEFAULT_PROTOCOL, 27 | ALL_IURL_SETURL_FLAGS 28 | } 29 | 30 | enum IURL_INVOKECOMMAND_FLAGS { 31 | IURL_INVOKECOMMAND_FL_ALLOW_UI = 1, 32 | IURL_INVOKECOMMAND_FL_USE_DEFAULT_VERB, 33 | ALL_IURL_INVOKECOMMAND_FLAGS 34 | } 35 | 36 | enum TRANSLATEURL_IN_FLAGS { 37 | TRANSLATEURL_FL_GUESS_PROTOCOL = 1, 38 | TRANSLATEURL_FL_USE_DEFAULT_PROTOCOL, 39 | ALL_TRANSLATEURL_FLAGS 40 | } 41 | 42 | enum URLASSOCIATIONDIALOG_IN_FLAGS { 43 | URLASSOCDLG_FL_USE_DEFAULT_NAME = 1, 44 | URLASSOCDLG_FL_REGISTER_ASSOC, 45 | ALL_URLASSOCDLG_FLAGS 46 | } 47 | 48 | enum MIMEASSOCIATIONDIALOG_IN_FLAGS { 49 | MIMEASSOCDLG_FL_REGISTER_ASSOC = 1, 50 | ALL_MIMEASSOCDLG_FLAGS = MIMEASSOCDLG_FL_REGISTER_ASSOC 51 | } 52 | 53 | struct URLINVOKECOMMANDINFO { 54 | DWORD dwcbSize = URLINVOKECOMMANDINFO.sizeof; 55 | DWORD dwFlags; 56 | HWND hwndParent; 57 | PCSTR pcszVerb; 58 | } 59 | alias URLINVOKECOMMANDINFO CURLINVOKECOMMANDINFO; 60 | alias URLINVOKECOMMANDINFO* PURLINVOKECOMMANDINFO, PCURLINVOKECOMMANDINFO; 61 | 62 | interface IUniformResourceLocator : IUnknown { 63 | HRESULT SetURL(PCSTR, DWORD); 64 | HRESULT GetURL(PSTR*); 65 | HRESULT InvokeCommand(PURLINVOKECOMMANDINFO); 66 | } 67 | alias IUniformResourceLocator CIUniformResourceLocator; 68 | alias IUniformResourceLocator* PIUniformResourceLocator, 69 | PCIUniformResourceLocator; 70 | 71 | extern (Windows) { 72 | BOOL InetIsOffline(DWORD); 73 | HRESULT MIMEAssociationDialogA(HWND, DWORD, PCSTR, PCSTR, PSTR, UINT); 74 | HRESULT MIMEAssociationDialogW(HWND, DWORD, PCWSTR, PCWSTR, PWSTR, UINT); 75 | HRESULT TranslateURLA(PCSTR, DWORD, PSTR*); 76 | HRESULT TranslateURLW(PCWSTR, DWORD, PWSTR*); 77 | HRESULT URLAssociationDialogA(HWND, DWORD, PCSTR, PCSTR, PSTR, UINT); 78 | HRESULT URLAssociationDialogW(HWND, DWORD, PCWSTR, PCWSTR, PWSTR, UINT); 79 | } 80 | 81 | version (Unicode) { 82 | alias TranslateURLW TranslateURL; 83 | alias MIMEAssociationDialogW MIMEAssociationDialog; 84 | alias URLAssociationDialogW URLAssociationDialog; 85 | } else { 86 | alias TranslateURLA TranslateURL; 87 | alias MIMEAssociationDialogA MIMEAssociationDialog; 88 | alias URLAssociationDialogA URLAssociationDialog; 89 | } 90 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/ipexport.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * ipexport.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.ipexport; 12 | 13 | private import win32.windef; 14 | 15 | const size_t MAX_ADAPTER_NAME = 128; 16 | 17 | // IP STATUS flags 18 | enum : IP_STATUS { 19 | IP_SUCCESS = 0, 20 | IP_STATUS_BASE = 11000, 21 | IP_BUF_TOO_SMALL, 22 | IP_DEST_NET_UNREACHABLE, 23 | IP_DEST_HOST_UNREACHABLE, 24 | IP_DEST_PROT_UNREACHABLE, 25 | IP_DEST_PORT_UNREACHABLE, 26 | IP_NO_RESOURCES, 27 | IP_BAD_OPTION, 28 | IP_HW_ERROR, 29 | IP_PACKET_TOO_BIG, 30 | IP_REQ_TIMED_OUT, 31 | IP_BAD_REQ, 32 | IP_BAD_ROUTE, 33 | IP_TTL_EXPIRED_TRANSIT, 34 | IP_TTL_EXPIRED_REASSEM, 35 | IP_PARAM_PROBLEM, 36 | IP_SOURCE_QUENCH, 37 | IP_OPTION_TOO_BIG, 38 | IP_BAD_DESTINATION, 39 | IP_ADDR_DELETED, 40 | IP_SPEC_MTU_CHANGE, 41 | IP_MTU_CHANGE, 42 | IP_UNLOAD, // = IP_STATUS_BASE + 22 43 | IP_GENERAL_FAILURE = IP_STATUS_BASE + 50, 44 | MAX_IP_STATUS = IP_GENERAL_FAILURE, 45 | IP_PENDING = IP_STATUS_BASE + 255 46 | } 47 | 48 | // IP header Flags values 49 | const byte IP_FLAG_DF = 2; 50 | 51 | // IP Option types 52 | enum : ubyte { 53 | IP_OPT_EOL = 0, 54 | IP_OPT_NOP = 0x01, 55 | IP_OPT_RR = 0x07, 56 | IP_OPT_SECURITY = 0x82, 57 | IP_OPT_LSRR = 0x83, 58 | IP_OPT_SSRR = 0x89, 59 | IP_OPT_TS = 0x44, 60 | IP_OPT_SID = 0x88, 61 | IP_OPT_ROUTER_ALERT = 0x94 62 | } 63 | 64 | const ubyte MAX_OPT_SIZE = 40; 65 | 66 | alias uint IPAddr, IPMask, IP_STATUS; 67 | 68 | struct IP_OPTION_INFORMATION { 69 | ubyte Ttl; 70 | ubyte Tos; 71 | ubyte Flags; 72 | ubyte OptionsSize; 73 | ubyte* OptionsData; 74 | } 75 | alias IP_OPTION_INFORMATION* PIP_OPTION_INFORMATION; 76 | 77 | struct ICMP_ECHO_REPLY { 78 | IPAddr Address; 79 | uint Status; 80 | uint RoundTripTime; 81 | ushort DataSize; 82 | ushort Reserved; 83 | void* Data; 84 | IP_OPTION_INFORMATION Options; 85 | } 86 | alias ICMP_ECHO_REPLY* PICMP_ECHO_REPLY; 87 | 88 | struct IP_ADAPTER_INDEX_MAP { 89 | ULONG Index; 90 | WCHAR[MAX_ADAPTER_NAME] Name; 91 | } 92 | alias IP_ADAPTER_INDEX_MAP* PIP_ADAPTER_INDEX_MAP; 93 | 94 | struct IP_INTERFACE_INFO { 95 | LONG NumAdapters; 96 | IP_ADAPTER_INDEX_MAP[1] _Adapter; 97 | 98 | IP_ADAPTER_INDEX_MAP* Adapter() { return _Adapter.ptr; } 99 | } 100 | alias IP_INTERFACE_INFO* PIP_INTERFACE_INFO; 101 | 102 | struct IP_UNIDIRECTIONAL_ADAPTER_ADDRESS { 103 | ULONG NumAdapters; 104 | IPAddr[1] _Address; 105 | 106 | IPAddr* Address() { return _Address.ptr; } 107 | } 108 | alias IP_UNIDIRECTIONAL_ADAPTER_ADDRESS* PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS; 109 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/iphlpapi.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * iphlpapi.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.iphlpapi; 12 | 13 | import win32.ipexport, win32.iprtrmib, win32.iptypes; 14 | private import win32.winbase, win32.windef; 15 | 16 | extern (Windows) { 17 | DWORD AddIPAddress(IPAddr, IPMask, DWORD, PULONG, PULONG); 18 | DWORD CreateIpForwardEntry(PMIB_IPFORWARDROW); 19 | DWORD CreateIpNetEntry(PMIB_IPNETROW); 20 | DWORD CreateProxyArpEntry(DWORD, DWORD, DWORD); 21 | DWORD DeleteIPAddress(ULONG); 22 | DWORD DeleteIpForwardEntry(PMIB_IPFORWARDROW); 23 | DWORD DeleteIpNetEntry(PMIB_IPNETROW); 24 | DWORD DeleteProxyArpEntry(DWORD, DWORD, DWORD); 25 | DWORD EnableRouter(HANDLE*, OVERLAPPED*); 26 | DWORD FlushIpNetTable(DWORD); 27 | DWORD GetAdapterIndex(LPWSTR, PULONG); 28 | DWORD GetAdaptersInfo(PIP_ADAPTER_INFO, PULONG); 29 | DWORD GetBestInterface(IPAddr, PDWORD); 30 | DWORD GetBestRoute(DWORD, DWORD, PMIB_IPFORWARDROW); 31 | DWORD GetFriendlyIfIndex(DWORD); 32 | DWORD GetIcmpStatistics(PMIB_ICMP); 33 | DWORD GetIfEntry(PMIB_IFROW); 34 | DWORD GetIfTable(PMIB_IFTABLE, PULONG, BOOL); 35 | DWORD GetInterfaceInfo(PIP_INTERFACE_INFO, PULONG); 36 | DWORD GetIpAddrTable(PMIB_IPADDRTABLE, PULONG, BOOL); 37 | DWORD GetIpForwardTable(PMIB_IPFORWARDTABLE, PULONG, BOOL); 38 | DWORD GetIpNetTable(PMIB_IPNETTABLE, PULONG, BOOL); 39 | DWORD GetIpStatistics(PMIB_IPSTATS); 40 | DWORD GetNetworkParams(PFIXED_INFO, PULONG); 41 | DWORD GetNumberOfInterfaces(PDWORD); 42 | DWORD GetPerAdapterInfo(ULONG, PIP_PER_ADAPTER_INFO, PULONG); 43 | BOOL GetRTTAndHopCount(IPAddr, PULONG, ULONG, PULONG); 44 | DWORD GetTcpStatistics(PMIB_TCPSTATS); 45 | DWORD GetTcpTable(PMIB_TCPTABLE, PDWORD, BOOL); 46 | DWORD GetUniDirectionalAdapterInfo(PIP_UNIDIRECTIONAL_ADAPTER_ADDRESS, 47 | PULONG); 48 | DWORD GetUdpStatistics(PMIB_UDPSTATS); 49 | DWORD GetUdpTable(PMIB_UDPTABLE, PDWORD, BOOL); 50 | DWORD IpReleaseAddress(PIP_ADAPTER_INDEX_MAP); 51 | DWORD IpRenewAddress(PIP_ADAPTER_INDEX_MAP); 52 | DWORD NotifyAddrChange(PHANDLE, LPOVERLAPPED); 53 | DWORD NotifyRouteChange(PHANDLE, LPOVERLAPPED); 54 | DWORD SendARP(IPAddr, IPAddr, PULONG, PULONG); 55 | DWORD SetIfEntry(PMIB_IFROW); 56 | DWORD SetIpForwardEntry(PMIB_IPFORWARDROW); 57 | DWORD SetIpNetEntry(PMIB_IPNETROW); 58 | DWORD SetIpStatistics(PMIB_IPSTATS); 59 | DWORD SetIpTTL(UINT); 60 | DWORD SetTcpEntry(PMIB_TCPROW); 61 | DWORD UnenableRouter(OVERLAPPED*, LPDWORD); 62 | } 63 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/ipifcons.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * ipifcons.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.ipifcons; 12 | 13 | // FIXME: check types of constants 14 | 15 | enum { 16 | MIB_IF_ADMIN_STATUS_UP = 1, 17 | MIB_IF_ADMIN_STATUS_DOWN, 18 | MIB_IF_ADMIN_STATUS_TESTING, 19 | } 20 | 21 | enum { 22 | MIB_IF_OPER_STATUS_NON_OPERATIONAL, 23 | MIB_IF_OPER_STATUS_UNREACHABLE, 24 | MIB_IF_OPER_STATUS_DISCONNECTED, 25 | MIB_IF_OPER_STATUS_CONNECTING, 26 | MIB_IF_OPER_STATUS_CONNECTED, 27 | MIB_IF_OPER_STATUS_OPERATIONAL // = 5 28 | } 29 | 30 | enum { 31 | MIB_IF_TYPE_OTHER = 1, 32 | MIB_IF_TYPE_ETHERNET = 6, 33 | MIB_IF_TYPE_TOKENRING = 9, 34 | MIB_IF_TYPE_FDDI = 15, 35 | MIB_IF_TYPE_PPP = 23, 36 | MIB_IF_TYPE_LOOPBACK = 24, 37 | MIB_IF_TYPE_SLIP = 28 38 | } 39 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/iptypes.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * iptypes.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.iptypes; 12 | 13 | import win32.windef; 14 | version(Tango){ 15 | private import tango.stdc.time; 16 | }else{ 17 | private import std.c.time; 18 | } 19 | //#include 20 | 21 | const size_t 22 | DEFAULT_MINIMUM_ENTITIES = 32, 23 | MAX_ADAPTER_ADDRESS_LENGTH = 8, 24 | MAX_ADAPTER_DESCRIPTION_LENGTH = 128, 25 | MAX_ADAPTER_NAME_LENGTH = 256, 26 | MAX_DOMAIN_NAME_LEN = 128, 27 | MAX_HOSTNAME_LEN = 128, 28 | MAX_SCOPE_ID_LEN = 256; 29 | 30 | const UINT 31 | BROADCAST_NODETYPE = 1, 32 | PEER_TO_PEER_NODETYPE = 2, 33 | MIXED_NODETYPE = 4, 34 | HYBRID_NODETYPE = 8; 35 | 36 | enum : UINT { 37 | IF_OTHER_ADAPTERTYPE, 38 | IF_ETHERNET_ADAPTERTYPE, 39 | IF_TOKEN_RING_ADAPTERTYPE, 40 | IF_FDDI_ADAPTERTYPE, 41 | IF_PPP_ADAPTERTYPE, 42 | IF_LOOPBACK_ADAPTERTYPE // = 5 43 | } 44 | 45 | struct IP_ADDRESS_STRING { 46 | char[16] String; 47 | } 48 | alias IP_ADDRESS_STRING IP_MASK_STRING; 49 | alias IP_ADDRESS_STRING* PIP_ADDRESS_STRING, PIP_MASK_STRING; 50 | 51 | struct IP_ADDR_STRING { 52 | IP_ADDR_STRING* Next; 53 | IP_ADDRESS_STRING IpAddress; 54 | IP_MASK_STRING IpMask; 55 | DWORD Context; 56 | } 57 | alias IP_ADDR_STRING* PIP_ADDR_STRING; 58 | 59 | struct IP_ADAPTER_INFO { 60 | IP_ADAPTER_INFO* Next; 61 | DWORD ComboIndex; 62 | char[MAX_ADAPTER_NAME_LENGTH+4] AdapterName; 63 | char[MAX_ADAPTER_DESCRIPTION_LENGTH+4] Description; 64 | UINT AddressLength; 65 | BYTE[MAX_ADAPTER_ADDRESS_LENGTH] Address; 66 | DWORD Index; 67 | UINT Type; 68 | UINT DhcpEnabled; 69 | PIP_ADDR_STRING CurrentIpAddress; 70 | IP_ADDR_STRING IpAddressList; 71 | IP_ADDR_STRING GatewayList; 72 | IP_ADDR_STRING DhcpServer; 73 | BOOL HaveWins; 74 | IP_ADDR_STRING PrimaryWinsServer; 75 | IP_ADDR_STRING SecondaryWinsServer; 76 | time_t LeaseObtained; 77 | time_t LeaseExpires; 78 | } 79 | alias IP_ADAPTER_INFO* PIP_ADAPTER_INFO; 80 | 81 | struct IP_PER_ADAPTER_INFO { 82 | UINT AutoconfigEnabled; 83 | UINT AutoconfigActive; 84 | PIP_ADDR_STRING CurrentDnsServer; 85 | IP_ADDR_STRING DnsServerList; 86 | } 87 | alias IP_PER_ADAPTER_INFO* PIP_PER_ADAPTER_INFO; 88 | 89 | struct FIXED_INFO { 90 | char[MAX_HOSTNAME_LEN+4] HostName; 91 | char[MAX_DOMAIN_NAME_LEN+4] DomainName; 92 | PIP_ADDR_STRING CurrentDnsServer; 93 | IP_ADDR_STRING DnsServerList; 94 | UINT NodeType; 95 | char[MAX_SCOPE_ID_LEN+4] ScopeId; 96 | UINT EnableRouting; 97 | UINT EnableProxy; 98 | UINT EnableDns; 99 | } 100 | alias FIXED_INFO* PFIXED_INFO; 101 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/isguids.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * isguids.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW API for MS-Windows 3.10 * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.isguids; 12 | 13 | private import win32.basetyps; 14 | 15 | extern (C) extern const GUID 16 | CLSID_InternetShortcut, 17 | IID_IUniformResourceLocator; 18 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/lm.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * lm.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.lm; 11 | 12 | version (WindowsVista) { 13 | version = WIN32_WINNT_ONLY; 14 | } else version (Windows2003) { 15 | version = WIN32_WINNT_ONLY; 16 | } else version (WindowsXP) { 17 | version = WIN32_WINNT_ONLY; 18 | } else version (WindowsNTonly) { 19 | version = WIN32_WINNT_ONLY; 20 | } 21 | 22 | public import win32.lmcons; 23 | public import win32.lmaccess; 24 | public import win32.lmalert; 25 | public import win32.lmat; 26 | public import win32.lmerr; 27 | public import win32.lmshare; 28 | public import win32.lmapibuf; 29 | public import win32.lmremutl; 30 | public import win32.lmrepl; 31 | public import win32.lmuse; 32 | public import win32.lmstats; 33 | 34 | version (WIN32_WINNT_ONLY) { 35 | public import win32.lmwksta; 36 | public import win32.lmserver; 37 | } 38 | version (WindowsVista) { 39 | public import win32.lmmsg; 40 | } else version (Windows2003) { 41 | public import win32.lmmsg; 42 | } else version (WindowsXP) { 43 | public import win32.lmmsg; 44 | } 45 | 46 | // FIXME: Everything in these next files seems to be deprecated! 47 | import win32.lmaudit; 48 | import win32.lmchdev; // can't find many docs for functions from this file. 49 | import win32.lmconfig; 50 | import win32.lmerrlog; 51 | import win32.lmsvc; 52 | import win32.lmsname; // in MinGW, this was publicly included by lm.lmsvc 53 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/lmalert.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * lmalert.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.lmalert; 11 | pragma(lib, "netapi32.lib"); 12 | 13 | private import win32.lmcons, win32.windef; 14 | 15 | const TCHAR[] 16 | ALERTER_MAILSLOT = `\\.\MAILSLOT\Alerter`, 17 | ALERT_PRINT_EVENT = "PRINTING", 18 | ALERT_MESSAGE_EVENT = "MESSAGE", 19 | ALERT_ERRORLOG_EVENT = "ERRORLOG", 20 | ALERT_ADMIN_EVENT = "ADMIN", 21 | ALERT_USER_EVENT = "USER"; 22 | //MACRO #define ALERT_OTHER_INFO(x) ((PBYTE)(x)+sizeof(STD_ALERT)) 23 | 24 | //MACRO #define ALERT_VAR_DATA(p) ((PBYTE)(p)+sizeof(*p)) 25 | 26 | const PRJOB_QSTATUS = 3; 27 | const PRJOB_DEVSTATUS = 508; 28 | const PRJOB_COMPLETE = 4; 29 | const PRJOB_INTERV = 8; 30 | const PRJOB_ = 16; 31 | const PRJOB_DESTOFFLINE = 32; 32 | const PRJOB_DESTPAUSED = 64; 33 | const PRJOB_NOTIFY = 128; 34 | const PRJOB_DESTNOPAPER = 256; 35 | const PRJOB_DELETED = 32768; 36 | const PRJOB_QS_QUEUED = 0; 37 | const PRJOB_QS_PAUSED = 1; 38 | const PRJOB_QS_SPOOLING = 2; 39 | const PRJOB_QS_PRINTING = 3; 40 | 41 | struct ADMIN_OTHER_INFO{ 42 | DWORD alrtad_errcode; 43 | DWORD alrtad_numstrings; 44 | } 45 | alias ADMIN_OTHER_INFO* PADMIN_OTHER_INFO, LPADMIN_OTHER_INFO; 46 | 47 | struct STD_ALERT{ 48 | DWORD alrt_timestamp; 49 | TCHAR alrt_eventname[EVLEN+1]; 50 | TCHAR alrt_servicename[SNLEN+1]; 51 | } 52 | alias STD_ALERT* PSTD_ALERT, LPSTD_ALERT; 53 | 54 | struct ERRLOG_OTHER_INFO{ 55 | DWORD alrter_errcode; 56 | DWORD alrter_offset; 57 | } 58 | alias ERRLOG_OTHER_INFO* PERRLOG_OTHER_INFO, LPERRLOG_OTHER_INFO; 59 | 60 | struct PRINT_OTHER_INFO{ 61 | DWORD alrtpr_jobid; 62 | DWORD alrtpr_status; 63 | DWORD alrtpr_submitted; 64 | DWORD alrtpr_size; 65 | } 66 | alias PRINT_OTHER_INFO* PPRINT_OTHER_INFO, LPPRINT_OTHER_INFO; 67 | 68 | struct USER_OTHER_INFO{ 69 | DWORD alrtus_errcode; 70 | DWORD alrtus_numstrings; 71 | } 72 | alias USER_OTHER_INFO* PUSER_OTHER_INFO, LPUSER_OTHER_INFO; 73 | 74 | extern (Windows) { 75 | NET_API_STATUS NetAlertRaise(LPCWSTR,PVOID,DWORD); 76 | NET_API_STATUS NetAlertRaiseEx(LPCWSTR,PVOID,DWORD,LPCWSTR); 77 | } 78 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/lmapibuf.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * lmapibuf.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.lmapibuf; 11 | pragma(lib, "netapi32.lib"); 12 | 13 | private import win32.lmcons, win32.windef; 14 | 15 | extern (Windows) { 16 | NET_API_STATUS NetApiBufferAllocate(DWORD, PVOID*); 17 | NET_API_STATUS NetApiBufferFree(PVOID); 18 | NET_API_STATUS NetApiBufferReallocate(PVOID, DWORD, PVOID*); 19 | NET_API_STATUS NetApiBufferSize(PVOID, PDWORD); 20 | NET_API_STATUS NetapipBufferAllocate(DWORD, PVOID*); 21 | } 22 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/lmat.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * lmat.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.lmat; 11 | pragma(lib, "netapi32.lib"); 12 | 13 | private import win32.lmcons, win32.windef; 14 | 15 | const JOB_RUN_PERIODICALLY = 1; 16 | const JOB_EXEC_ERROR = 2; 17 | const JOB_RUNS_TODAY = 4; 18 | const JOB_ADD_CURRENT_DATE = 8; 19 | const JOB_NONINTERACTIVE = 16; 20 | const JOB_INPUT_FLAGS = JOB_RUN_PERIODICALLY | JOB_ADD_CURRENT_DATE 21 | | JOB_NONINTERACTIVE; 22 | const JOB_OUTPUT_FLAGS = JOB_RUN_PERIODICALLY | JOB_EXEC_ERROR 23 | | JOB_RUNS_TODAY | JOB_NONINTERACTIVE; 24 | 25 | struct AT_ENUM { 26 | DWORD JobId; 27 | DWORD JobTime; 28 | DWORD DaysOfMonth; 29 | UCHAR DaysOfWeek; 30 | UCHAR Flags; 31 | LPWSTR Command; 32 | } 33 | alias AT_ENUM* PAT_ENUM, LPAT_ENUM; 34 | 35 | struct AT_INFO { 36 | DWORD JobTime; 37 | DWORD DaysOfMonth; 38 | UCHAR DaysOfWeek; 39 | UCHAR Flags; 40 | LPWSTR Command; 41 | } 42 | alias AT_INFO* PAT_INFO, LPAT_INFO; 43 | 44 | extern (Windows) { 45 | NET_API_STATUS NetScheduleJobAdd(LPWSTR, PBYTE, LPDWORD); 46 | NET_API_STATUS NetScheduleJobDel(LPWSTR, DWORD, DWORD); 47 | NET_API_STATUS NetScheduleJobEnum(LPWSTR, PBYTE*, DWORD, PDWORD, PDWORD, 48 | PDWORD); 49 | NET_API_STATUS NetScheduleJobGetInfo(LPWSTR, DWORD, PBYTE*); 50 | } 51 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/lmbrowsr.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * lmbrowsr.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.lmbrowsr; 11 | 12 | private import win32.lmcons, win32.windef; 13 | 14 | const BROWSER_ROLE_PDC = 1; 15 | const BROWSER_ROLE_BDC = 2; 16 | 17 | struct BROWSER_STATISTICS { 18 | LARGE_INTEGER StatisticsStartTime; 19 | LARGE_INTEGER NumberOfServerAnnouncements; 20 | LARGE_INTEGER NumberOfDomainAnnouncements; 21 | ULONG NumberOfElectionPackets; 22 | ULONG NumberOfMailslotWrites; 23 | ULONG NumberOfGetBrowserServerListRequests; 24 | ULONG NumberOfServerEnumerations; 25 | ULONG NumberOfDomainEnumerations; 26 | ULONG NumberOfOtherEnumerations; 27 | ULONG NumberOfMissedServerAnnouncements; 28 | ULONG NumberOfMissedMailslotDatagrams; 29 | ULONG NumberOfMissedGetBrowserServerListRequests; 30 | ULONG NumberOfFailedServerAnnounceAllocations; 31 | ULONG NumberOfFailedMailslotAllocations; 32 | ULONG NumberOfFailedMailslotReceives; 33 | ULONG NumberOfFailedMailslotWrites; 34 | ULONG NumberOfFailedMailslotOpens; 35 | ULONG NumberOfDuplicateMasterAnnouncements; 36 | LARGE_INTEGER NumberOfIllegalDatagrams; 37 | } 38 | alias BROWSER_STATISTICS* PBROWSER_STATISTICS, LPBROWSER_STATISTICS; 39 | 40 | struct BROWSER_STATISTICS_100 { 41 | LARGE_INTEGER StartTime; 42 | LARGE_INTEGER NumberOfServerAnnouncements; 43 | LARGE_INTEGER NumberOfDomainAnnouncements; 44 | ULONG NumberOfElectionPackets; 45 | ULONG NumberOfMailslotWrites; 46 | ULONG NumberOfGetBrowserServerListRequests; 47 | LARGE_INTEGER NumberOfIllegalDatagrams; 48 | } 49 | alias BROWSER_STATISTICS_100* PBROWSER_STATISTICS_100; 50 | 51 | struct BROWSER_STATISTICS_101 { 52 | LARGE_INTEGER StartTime; 53 | LARGE_INTEGER NumberOfServerAnnouncements; 54 | LARGE_INTEGER NumberOfDomainAnnouncements; 55 | ULONG NumberOfElectionPackets; 56 | ULONG NumberOfMailslotWrites; 57 | ULONG NumberOfGetBrowserServerListRequests; 58 | LARGE_INTEGER NumberOfIllegalDatagrams; 59 | ULONG NumberOfMissedServerAnnouncements; 60 | ULONG NumberOfMissedMailslotDatagrams; 61 | ULONG NumberOfMissedGetBrowserServerListRequests; 62 | ULONG NumberOfFailedServerAnnounceAllocations; 63 | ULONG NumberOfFailedMailslotAllocations; 64 | ULONG NumberOfFailedMailslotReceives; 65 | ULONG NumberOfFailedMailslotWrites; 66 | ULONG NumberOfFailedMailslotOpens; 67 | ULONG NumberOfDuplicateMasterAnnouncements; 68 | } 69 | alias BROWSER_STATISTICS_101* PBROWSER_STATISTICS_101; 70 | 71 | extern (Windows) { 72 | NET_API_STATUS I_BrowserServerEnum(LPCWSTR, LPCWSTR, LPCWSTR, DWORD, 73 | PBYTE*, DWORD, PDWORD, PDWORD, DWORD, LPCWSTR, PDWORD); 74 | NET_API_STATUS I_BrowserServerEnumEx(LPCWSTR, LPCWSTR, LPCWSTR, DWORD, 75 | PBYTE*, DWORD, PDWORD, PDWORD, DWORD, LPCWSTR, LPCWSTR); 76 | NET_API_STATUS I_BrowserQueryEmulatedDomains(LPWSTR, PBYTE*, PDWORD); 77 | NET_API_STATUS I_BrowserQueryOtherDomains(LPCWSTR, PBYTE*, PDWORD, PDWORD); 78 | NET_API_STATUS I_BrowserResetNetlogonState(LPCWSTR); 79 | NET_API_STATUS I_BrowserSetNetlogonState(LPWSTR, LPWSTR, LPWSTR, DWORD); 80 | NET_API_STATUS I_BrowserQueryStatistics(LPCWSTR, LPBROWSER_STATISTICS*); 81 | NET_API_STATUS I_BrowserResetStatistics(LPCWSTR); 82 | WORD I_BrowserServerEnumForXactsrv(LPCWSTR, LPCWSTR, ULONG, USHORT, PVOID, 83 | WORD, DWORD, PDWORD, PDWORD, DWORD, LPCWSTR, LPCWSTR, PWORD); 84 | NET_API_STATUS I_BrowserDebugTrace(PWCHAR, PCHAR); 85 | } 86 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/lmchdev.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * lmchdev.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.lmchdev; 11 | 12 | // COMMENT: This file might be deprecated. 13 | 14 | private import win32.lmcons, win32.windef; 15 | 16 | const CHARDEVQ_NO_REQUESTS = -1; 17 | const CHARDEV_CLOSE = 0; 18 | const CHARDEVQ_MAX_PRIORITY = 1; 19 | const CHARDEVQ_DEV_PARMNUM = 1; 20 | 21 | const HANDLE_INFO_LEVEL_1 = 1; 22 | const HANDLE_CHARTIME_PARMNUM = 1; 23 | const HANDLE_CHARCOUNT_PARMNUM = 2; 24 | 25 | const CHARDEV_STAT_OPENED = 2; 26 | const CHARDEVQ_PRIORITY_PARMNUM = 2; 27 | const CHARDEVQ_DEVS_PARMNUM = 3; 28 | const CHARDEV_STAT_ERROR = 4; 29 | const CHARDEVQ_NUMUSERS_PARMNUM = 4; 30 | const CHARDEVQ_NUMAHEAD_PARMNUM = 5; 31 | const CHARDEVQ_DEF_PRIORITY = 5; 32 | const CHARDEVQ_PRIORITY_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+CHARDEVQ_PRIORITY_PARMNUM; 33 | const CHARDEVQ_DEVS_INFOLEVEL = PARMNUM_BASE_INFOLEVEL+CHARDEVQ_DEVS_PARMNUM; 34 | const CHARDEVQ_MIN_PRIORITY = 9; 35 | 36 | struct CHARDEV_INFO_0 { 37 | LPWSTR ch0_dev; 38 | } 39 | alias CHARDEV_INFO_0* PCHARDEV_INFO_0, LPCHARDEV_INFO_0; 40 | 41 | struct CHARDEV_INFO_1{ 42 | LPWSTR ch1_dev; 43 | DWORD ch1_status; 44 | LPWSTR ch1_username; 45 | DWORD ch1_time; 46 | } 47 | alias CHARDEV_INFO_1* PCHARDEV_INFO_1, LPCHARDEV_INFO_1; 48 | 49 | struct CHARDEVQ_INFO_0 { 50 | LPWSTR cq0_dev; 51 | } 52 | alias CHARDEVQ_INFO_0* PCHARDEVQ_INFO_0, LPCHARDEVQ_INFO_0; 53 | 54 | struct CHARDEVQ_INFO_1{ 55 | LPWSTR cq1_dev; 56 | DWORD cq1_priority; 57 | LPWSTR cq1_devs; 58 | DWORD cq1_numusers; 59 | DWORD cq1_numahead; 60 | } 61 | alias CHARDEVQ_INFO_1* PCHARDEVQ_INFO_1, LPCHARDEVQ_INFO_1; 62 | 63 | struct CHARDEVQ_INFO_1002 { 64 | DWORD cq1002_priority; 65 | } 66 | alias CHARDEVQ_INFO_1002* PCHARDEVQ_INFO_1002, LPCHARDEVQ_INFO_1002; 67 | 68 | struct CHARDEVQ_INFO_1003 { 69 | LPWSTR cq1003_devs; 70 | } 71 | alias CHARDEVQ_INFO_1003* PCHARDEVQ_INFO_1003, LPCHARDEVQ_INFO_1003; 72 | 73 | struct HANDLE_INFO_1{ 74 | DWORD hdli1_chartime; 75 | DWORD hdli1_charcount; 76 | } 77 | alias HANDLE_INFO_1* PHANDLE_INFO_1, LPHANDLE_INFO_1; 78 | 79 | extern (Windows) { 80 | NET_API_STATUS NetCharDevEnum(LPCWSTR, DWORD, PBYTE*, DWORD, PDWORD, PDWORD, PDWORD); 81 | NET_API_STATUS NetCharDevGetInfo(LPCWSTR, LPCWSTR, DWORD, PBYTE*); 82 | NET_API_STATUS NetCharDevControl(LPCWSTR, LPCWSTR, DWORD); 83 | NET_API_STATUS NetCharDevQEnum(LPCWSTR, LPCWSTR, DWORD, PBYTE*, DWORD, PDWORD, PDWORD, PDWORD); 84 | NET_API_STATUS NetCharDevQGetInfo(LPCWSTR, LPCWSTR, LPCWSTR, DWORD, PBYTE*); 85 | NET_API_STATUS NetCharDevQSetInfo(LPCWSTR, LPCWSTR, DWORD, PBYTE, PDWORD); 86 | NET_API_STATUS NetCharDevQPurge(LPCWSTR, LPCWSTR); 87 | NET_API_STATUS NetCharDevQPurgeSelf(LPCWSTR, LPCWSTR, LPCWSTR); 88 | NET_API_STATUS NetHandleGetInfo(HANDLE, DWORD, PBYTE*); 89 | NET_API_STATUS NetHandleSetInfo(HANDLE, DWORD, PBYTE, DWORD, PDWORD); 90 | } 91 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/lmconfig.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * lmconfig.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.lmconfig; 11 | 12 | // All functions in this file are deprecated! 13 | 14 | private import win32.lmcons, win32.windef; 15 | 16 | deprecated { 17 | struct CONFIG_INFO_0 { 18 | LPWSTR cfgi0_key; 19 | LPWSTR cfgi0_data; 20 | } 21 | 22 | alias CONFIG_INFO_0* PCONFIG_INFO_0, LPCONFIG_INFO_0; 23 | 24 | extern (Windows) { 25 | NET_API_STATUS NetConfigGet(LPCWSTR, LPCWSTR, LPCWSTR, PBYTE*); 26 | NET_API_STATUS NetConfigGetAll(LPCWSTR, LPCWSTR, PBYTE*); 27 | NET_API_STATUS NetConfigSet(LPCWSTR, LPCWSTR, LPCWSTR, DWORD, DWORD, 28 | PBYTE, DWORD); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/lmcons.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * lmcons.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.lmcons; 11 | 12 | private import win32.windef; 13 | private import win32.lmerr; // for NERR_BASE 14 | 15 | const TCHAR[] 16 | MESSAGE_FILENAME = "NETMSG", 17 | OS2MSG_FILENAME = "BASE", 18 | HELP_MSG_FILENAME = "NETH"; 19 | 20 | alias DWORD NET_API_STATUS, API_RET_TYPE; 21 | 22 | const MIN_LANMAN_MESSAGE_ID = NERR_BASE; 23 | const MAX_LANMAN_MESSAGE_ID = 5799; 24 | 25 | const CNLEN = 15; /* also in nddeapi.h */ 26 | const UNCLEN = CNLEN + 2; 27 | 28 | const DNLEN = 15; 29 | const LM20_CNLEN = 15; 30 | const LM20_DNLEN = 15; 31 | const LM20_SNLEN = 15; 32 | const LM20_STXTLEN = 63; 33 | const LM20_UNCLEN = LM20_CNLEN + 2; 34 | const LM20_NNLEN = 12; 35 | const LM20_RMLEN = LM20_UNCLEN + 1 + LM20_NNLEN; 36 | const NNLEN = 80; 37 | const RMLEN = UNCLEN + 1 + NNLEN; 38 | const SNLEN = 80; 39 | const STXTLEN = 256; 40 | const PATHLEN = 256; 41 | const LM20_PATHLEN = 256; 42 | const DEVLEN = 80; 43 | const LM20_DEVLEN = 8; 44 | const EVLEN = 16; 45 | const UNLEN = 256; 46 | const LM20_UNLEN = 20; 47 | const GNLEN = UNLEN; 48 | const LM20_GNLEN = LM20_UNLEN; 49 | const PWLEN = 256; 50 | const LM20_PWLEN = 14; 51 | const SHPWLEN = 8; 52 | const CLTYPE_LEN = 12; 53 | const QNLEN = NNLEN; 54 | const LM20_QNLEN = LM20_NNLEN; 55 | 56 | const MAXCOMMENTSZ = 256; 57 | const LM20_MAXCOMMENTSZ = 48; 58 | const ALERTSZ = 128; 59 | const MAXDEVENTRIES = 32;// (sizeof(int)*8); 60 | const NETBIOS_NAME_LEN = 16; 61 | const DWORD MAX_PREFERRED_LENGTH = -1; 62 | const CRYPT_KEY_LEN = 7; 63 | const CRYPT_TXT_LEN = 8; 64 | const ENCRYPTED_PWLEN = 16; 65 | const SESSION_PWLEN = 24; 66 | const SESSION_CRYPT_KLEN = 21; 67 | 68 | const PARMNUM_ALL = 0; 69 | const DWORD PARM_ERROR_UNKNOWN = -1; 70 | const PARM_ERROR_NONE = 0; 71 | const PARMNUM_BASE_INFOLEVEL = 1000; 72 | 73 | const PLATFORM_ID_DOS = 300; 74 | const PLATFORM_ID_OS2 = 400; 75 | const PLATFORM_ID_NT = 500; 76 | const PLATFORM_ID_OSF = 600; 77 | const PLATFORM_ID_VMS = 700; 78 | 79 | // this is a new typedef in W2K, but it should be harmless for earlier Windows versions. 80 | version (Unicode) { 81 | alias LPWSTR LMSTR; 82 | alias LPCWSTR LMCSTR; 83 | } else { 84 | alias LPSTR LMSTR; 85 | alias LPCSTR LMCSTR; 86 | } 87 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/lmmsg.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * lmmsg.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.lmmsg; 11 | pragma(lib, "netapi32.lib"); 12 | 13 | private import win32.lmcons, win32.windef, win32.w32api; 14 | 15 | static assert (_WIN32_WINNT_ONLY && _WIN32_WINNT >= 0x501, 16 | "win32.lmmsg is available only if version WindowsXP, Windows2003 " 17 | "or WindowsVista is set"); 18 | 19 | const MSGNAME_NOT_FORWARDED = 0; 20 | const MSGNAME_FORWARDED_TO = 4; 21 | const MSGNAME_FORWARDED_FROM = 16; 22 | 23 | struct MSG_INFO_0 { 24 | LPWSTR msgi0_name; 25 | } 26 | alias MSG_INFO_0* PMSG_INFO_0, LPMSG_INFO_0; 27 | 28 | struct MSG_INFO_1 { 29 | LPWSTR msgi1_name; 30 | DWORD msgi1_forward_flag; 31 | LPWSTR msgi1_forward; 32 | } 33 | alias MSG_INFO_1* PMSG_INFO_1, LPMSG_INFO_1; 34 | 35 | extern (Windows) { 36 | NET_API_STATUS NetMessageBufferSend(LPCWSTR, LPCWSTR, LPCWSTR, PBYTE, 37 | DWORD); 38 | NET_API_STATUS NetMessageNameAdd(LPCWSTR, LPCWSTR); 39 | NET_API_STATUS NetMessageNameDel(LPCWSTR, LPCWSTR); 40 | NET_API_STATUS NetMessageNameEnum(LPCWSTR, DWORD, PBYTE*, DWORD, PDWORD, 41 | PDWORD, PDWORD); 42 | NET_API_STATUS NetMessageNameGetInfo(LPCWSTR, LPCWSTR, DWORD, PBYTE*); 43 | } 44 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/lmremutl.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * lmremutl.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.lmremutl; 11 | pragma(lib, "netapi32.lib"); 12 | 13 | // D Conversion Note: DESC_CHAR is defined as TCHAR. 14 | 15 | private import win32.lmcons, win32.windef; 16 | 17 | const SUPPORTS_REMOTE_ADMIN_PROTOCOL = 2; 18 | const SUPPORTS_RPC = 4; 19 | const SUPPORTS_SAM_PROTOCOL = 8; 20 | const SUPPORTS_UNICODE = 16; 21 | const SUPPORTS_LOCAL = 32; 22 | const SUPPORTS_ANY = 0xFFFFFFFF; 23 | 24 | const NO_PERMISSION_REQUIRED = 1; 25 | const ALLOCATE_RESPONSE = 2; 26 | const USE_SPECIFIC_TRANSPORT = 0x80000000; 27 | 28 | //[Yes] #ifndef DESC_CHAR_UNICODE 29 | //alias CHAR DESC_CHAR; 30 | //} else { 31 | //[No] #else 32 | //[No] typedef WCHAR DESC_CHAR; 33 | //[No] #endif 34 | // FIXME (D): Is this OK? 35 | alias TCHAR DESC_CHAR; 36 | 37 | alias DESC_CHAR* LPDESC; 38 | 39 | struct TIME_OF_DAY_INFO { 40 | DWORD tod_elapsedt; 41 | DWORD tod_msecs; 42 | DWORD tod_hours; 43 | DWORD tod_mins; 44 | DWORD tod_secs; 45 | DWORD tod_hunds; 46 | LONG tod_timezone; 47 | DWORD tod_tinterval; 48 | DWORD tod_day; 49 | DWORD tod_month; 50 | DWORD tod_year; 51 | DWORD tod_weekday; 52 | } 53 | alias TIME_OF_DAY_INFO* PTIME_OF_DAY_INFO, LPTIME_OF_DAY_INFO; 54 | 55 | extern (Windows) { 56 | NET_API_STATUS NetRemoteTOD(LPCWSTR, PBYTE*); 57 | NET_API_STATUS NetRemoteComputerSupports(LPCWSTR, DWORD, PDWORD); 58 | NET_API_STATUS RxRemoteApi(DWORD, LPCWSTR, LPDESC, LPDESC, LPDESC, 59 | LPDESC, LPDESC, LPDESC, LPDESC, DWORD, ...); 60 | } 61 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/lmsname.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * lmsname.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.lmsname; 11 | 12 | private import win32.windef; 13 | 14 | const TCHAR[] 15 | SERVICE_WORKSTATION = "LanmanWorkstation", 16 | SERVICE_LM20_WORKSTATION = "WORKSTATION", 17 | WORKSTATION_DISPLAY_NAME = "Workstation", 18 | SERVICE_SERVER = "LanmanServer", 19 | SERVICE_LM20_SERVER = "SERVER", 20 | SERVER_DISPLAY_NAME = "Server", 21 | SERVICE_BROWSER = "BROWSER", 22 | SERVICE_LM20_BROWSER = SERVICE_BROWSER, 23 | SERVICE_MESSENGER = "MESSENGER", 24 | SERVICE_LM20_MESSENGER = SERVICE_MESSENGER, 25 | SERVICE_NETRUN = "NETRUN", 26 | SERVICE_LM20_NETRUN = SERVICE_NETRUN, 27 | SERVICE_SPOOLER = "SPOOLER", 28 | SERVICE_LM20_SPOOLER = SERVICE_SPOOLER, 29 | SERVICE_ALERTER = "ALERTER", 30 | SERVICE_LM20_ALERTER = SERVICE_ALERTER, 31 | SERVICE_NETLOGON = "NETLOGON", 32 | SERVICE_LM20_NETLOGON = SERVICE_NETLOGON, 33 | SERVICE_NETPOPUP = "NETPOPUP", 34 | SERVICE_LM20_NETPOPUP = SERVICE_NETPOPUP, 35 | SERVICE_SQLSERVER = "SQLSERVER", 36 | SERVICE_LM20_SQLSERVER = SERVICE_SQLSERVER, 37 | SERVICE_REPL = "REPLICATOR", 38 | SERVICE_LM20_REPL = SERVICE_REPL, 39 | SERVICE_RIPL = "REMOTEBOOT", 40 | SERVICE_LM20_RIPL = SERVICE_RIPL, 41 | SERVICE_TIMESOURCE = "TIMESOURCE", 42 | SERVICE_LM20_TIMESOURCE = SERVICE_TIMESOURCE, 43 | SERVICE_AFP = "AFP", 44 | SERVICE_LM20_AFP = SERVICE_AFP, 45 | SERVICE_UPS = "UPS", 46 | SERVICE_LM20_UPS = SERVICE_UPS, 47 | SERVICE_XACTSRV = "XACTSRV", 48 | SERVICE_LM20_XACTSRV = SERVICE_XACTSRV, 49 | SERVICE_TCPIP = "TCPIP", 50 | SERVICE_LM20_TCPIP = SERVICE_TCPIP, 51 | SERVICE_NBT = "NBT", 52 | SERVICE_LM20_NBT = SERVICE_NBT, 53 | SERVICE_LMHOSTS = "LMHOSTS", 54 | SERVICE_LM20_LMHOSTS = SERVICE_LMHOSTS, 55 | SERVICE_TELNET = "Telnet", 56 | SERVICE_LM20_TELNET = SERVICE_TELNET, 57 | SERVICE_SCHEDULE = "Schedule", 58 | SERVICE_LM20_SCHEDULE = SERVICE_SCHEDULE, 59 | SERVICE_NTLMSSP = "NtLmSsp", 60 | SERVICE_DHCP = "DHCP", 61 | SERVICE_LM20_DHCP = SERVICE_DHCP, 62 | SERVICE_NWSAP = "NwSapAgent", 63 | SERVICE_LM20_NWSAP = SERVICE_NWSAP, 64 | NWSAP_DISPLAY_NAME = "NW Sap Agent", 65 | SERVICE_NWCS = "NWCWorkstation"; 66 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/lmstats.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * lmstats.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.lmstats; 11 | pragma(lib, "netapi32.lib"); 12 | 13 | private import win32.lmcons, win32.windef; 14 | 15 | const ULONG 16 | STATSOPT_CLR = 1, 17 | STATS_NO_VALUE = -1, 18 | STATS_OVERFLOW = -2; 19 | 20 | struct STAT_SERVER_0{ 21 | DWORD sts0_start; 22 | DWORD sts0_fopens; 23 | DWORD sts0_devopens; 24 | DWORD sts0_jobsqueued; 25 | DWORD sts0_sopens; 26 | DWORD sts0_stimedout; 27 | DWORD sts0_serrorout; 28 | DWORD sts0_pwerrors; 29 | DWORD sts0_permerrors; 30 | DWORD sts0_syserrors; 31 | DWORD sts0_bytessent_low; 32 | DWORD sts0_bytessent_high; 33 | DWORD sts0_bytesrcvd_low; 34 | DWORD sts0_bytesrcvd_high; 35 | DWORD sts0_avresponse; 36 | DWORD sts0_reqbufneed; 37 | DWORD sts0_bigbufneed; 38 | } 39 | alias STAT_SERVER_0* PSTAT_SERVER_0, LPSTAT_SERVER_0; 40 | 41 | // #ifdef LM20_WORKSTATION_STATISTICS 42 | // typedef struct _STAT_WORKSTATION_0 { 43 | // DWORD stw0_start; 44 | // DWORD stw0_numNCB_r; 45 | // DWORD stw0_numNCB_s; 46 | // DWORD stw0_numNCB_a; 47 | // DWORD stw0_fiNCB_r; 48 | // DWORD stw0_fiNCB_s; 49 | // DWORD stw0_fiNCB_a; 50 | // DWORD stw0_fcNCB_r; 51 | // DWORD stw0_fcNCB_s; 52 | // DWORD stw0_fcNCB_a; 53 | // DWORD stw0_sesstart; 54 | // DWORD stw0_sessfailcon; 55 | // DWORD stw0_sessbroke; 56 | // DWORD stw0_uses; 57 | // DWORD stw0_usefail; 58 | // DWORD stw0_autorec; 59 | // DWORD stw0_bytessent_r_lo; 60 | // DWORD stw0_bytessent_r_hi; 61 | // DWORD stw0_bytesrcvd_r_lo; 62 | // DWORD stw0_bytesrcvd_r_hi; 63 | // DWORD stw0_bytessent_s_lo; 64 | // DWORD stw0_bytessent_s_hi; 65 | // DWORD stw0_bytesrcvd_s_lo; 66 | // DWORD stw0_bytesrcvd_s_hi; 67 | // DWORD stw0_bytessent_a_lo; 68 | // DWORD stw0_bytessent_a_hi; 69 | // DWORD stw0_bytesrcvd_a_lo; 70 | // DWORD stw0_bytesrcvd_a_hi; 71 | // DWORD stw0_reqbufneed; 72 | // DWORD stw0_bigbufneed; 73 | // } STAT_WORKSTATION_0,*PSTAT_WORKSTATION_0,*LPSTAT_WORKSTATION_0; 74 | // #else 75 | 76 | struct STAT_WORKSTATION_0{ 77 | LARGE_INTEGER StatisticsStartTime; 78 | LARGE_INTEGER BytesReceived; 79 | LARGE_INTEGER SmbsReceived; 80 | LARGE_INTEGER PagingReadBytesRequested; 81 | LARGE_INTEGER NonPagingReadBytesRequested; 82 | LARGE_INTEGER CacheReadBytesRequested; 83 | LARGE_INTEGER NetworkReadBytesRequested; 84 | LARGE_INTEGER BytesTransmitted; 85 | LARGE_INTEGER SmbsTransmitted; 86 | LARGE_INTEGER PagingWriteBytesRequested; 87 | LARGE_INTEGER NonPagingWriteBytesRequested; 88 | LARGE_INTEGER CacheWriteBytesRequested; 89 | LARGE_INTEGER NetworkWriteBytesRequested; 90 | DWORD InitiallyFailedOperations; 91 | DWORD FailedCompletionOperations; 92 | DWORD ReadOperations; 93 | DWORD RandomReadOperations; 94 | DWORD ReadSmbs; 95 | DWORD LargeReadSmbs; 96 | DWORD SmallReadSmbs; 97 | DWORD WriteOperations; 98 | DWORD RandomWriteOperations; 99 | DWORD WriteSmbs; 100 | DWORD LargeWriteSmbs; 101 | DWORD SmallWriteSmbs; 102 | DWORD RawReadsDenied; 103 | DWORD RawWritesDenied; 104 | DWORD NetworkErrors; 105 | DWORD Sessions; 106 | DWORD FailedSessions; 107 | DWORD Reconnects; 108 | DWORD CoreConnects; 109 | DWORD Lanman20Connects; 110 | DWORD Lanman21Connects; 111 | DWORD LanmanNtConnects; 112 | DWORD ServerDisconnects; 113 | DWORD HungSessions; 114 | DWORD UseCount; 115 | DWORD FailedUseCount; 116 | DWORD CurrentCommands; 117 | } 118 | alias STAT_WORKSTATION_0* PSTAT_WORKSTATION_0, LPSTAT_WORKSTATION_0; 119 | 120 | extern (Windows): 121 | NET_API_STATUS NetStatisticsGet(LPWSTR,LPWSTR,DWORD,DWORD,PBYTE*); 122 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/lmuse.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * lmuse.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.lmuse; 11 | pragma(lib, "netapi32.lib"); 12 | 13 | import win32.lmuseflg; 14 | private import win32.lmcons, win32.windef; 15 | 16 | enum { 17 | USE_LOCAL_PARMNUM = 1, 18 | USE_REMOTE_PARMNUM, 19 | USE_PASSWORD_PARMNUM, 20 | USE_ASGTYPE_PARMNUM, 21 | USE_USERNAME_PARMNUM, 22 | USE_DOMAINNAME_PARMNUM 23 | } 24 | 25 | enum { 26 | USE_OK, 27 | USE_PAUSED, 28 | USE_SESSLOST, 29 | USE_DISCONN = USE_SESSLOST, 30 | USE_NETERR, 31 | USE_CONN, 32 | USE_RECONN 33 | } 34 | 35 | const DWORD USE_WILDCARD = -1; 36 | 37 | enum { 38 | USE_DISKDEV, 39 | USE_SPOOLDEV, 40 | USE_CHARDEV, 41 | USE_IPC 42 | } 43 | 44 | struct USE_INFO_0 { 45 | LPWSTR ui0_local; 46 | LPWSTR ui0_remote; 47 | } 48 | alias USE_INFO_0* PUSE_INFO_0, LPUSE_INFO_0; 49 | 50 | struct USE_INFO_1 { 51 | LPWSTR ui1_local; 52 | LPWSTR ui1_remote; 53 | LPWSTR ui1_password; 54 | DWORD ui1_status; 55 | DWORD ui1_asg_type; 56 | DWORD ui1_refcount; 57 | DWORD ui1_usecount; 58 | } 59 | alias USE_INFO_1* PUSE_INFO_1, LPUSE_INFO_1; 60 | 61 | struct USE_INFO_2 { 62 | LPWSTR ui2_local; 63 | LPWSTR ui2_remote; 64 | LPWSTR ui2_password; 65 | DWORD ui2_status; 66 | DWORD ui2_asg_type; 67 | DWORD ui2_refcount; 68 | DWORD ui2_usecount; 69 | LPWSTR ui2_username; 70 | LPWSTR ui2_domainname; 71 | } 72 | alias USE_INFO_2* PUSE_INFO_2, LPUSE_INFO_2; 73 | 74 | extern (Windows) { 75 | NET_API_STATUS NetUseAdd(LPWSTR, DWORD, PBYTE, PDWORD); 76 | NET_API_STATUS NetUseDel(LPWSTR, LPWSTR, DWORD); 77 | NET_API_STATUS NetUseEnum(LPWSTR, DWORD, PBYTE*, DWORD, PDWORD, PDWORD, 78 | PDWORD); 79 | NET_API_STATUS NetUseGetInfo(LPWSTR, LPWSTR, DWORD, PBYTE*); 80 | } 81 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/lmuseflg.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * lmuseflg.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW API for MS-Windows 3.10 * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.lmuseflg; 11 | 12 | enum : uint { 13 | USE_NOFORCE = 0, 14 | USE_FORCE, 15 | USE_LOTS_OF_FORCE // = 2 16 | } 17 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/lzexpand.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * lzexpand.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.lzexpand; 11 | pragma(lib, "lz32.lib"); 12 | 13 | private import win32.winbase, win32.windef; 14 | 15 | enum : LONG { 16 | LZERROR_BADINHANDLE = -1, 17 | LZERROR_BADOUTHANDLE = -2, 18 | LZERROR_READ = -3, 19 | LZERROR_WRITE = -4, 20 | LZERROR_GLOBALLOC = -5, 21 | LZERROR_GLOBLOCK = -6, 22 | LZERROR_BADVALUE = -7, 23 | LZERROR_UNKNOWNALG = -8 24 | } 25 | 26 | extern (Windows): 27 | deprecated { 28 | LONG CopyLZFile(INT, INT); 29 | void LZDone(); 30 | INT LZStart(); 31 | } 32 | INT GetExpandedNameA(LPSTR, LPSTR); 33 | INT GetExpandedNameW(LPWSTR, LPWSTR); 34 | void LZClose(INT); 35 | LONG LZCopy(INT, INT); 36 | INT LZInit(INT); 37 | INT LZOpenFileA(LPSTR, LPOFSTRUCT, WORD); 38 | INT LZOpenFileW(LPWSTR, LPOFSTRUCT, WORD); 39 | INT LZRead(INT, LPSTR, INT); 40 | LONG LZSeek(INT, LONG, INT); 41 | 42 | version (Unicode) { 43 | alias GetExpandedNameW GetExpandedName; 44 | alias LZOpenFileW LZOpenFile; 45 | } else { 46 | alias GetExpandedNameA GetExpandedName; 47 | alias LZOpenFileA LZOpenFile; 48 | } 49 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/mciavi.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * mciavi.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.mciavi; 12 | 13 | private import win32.mmsystem; 14 | 15 | // FIXME: check types and grouping of constants 16 | 17 | const MCI_MCIAVI_PLAY_WINDOW = 0x01000000; 18 | const MCI_MCIAVI_PLAY_FULLSCREEN = 0x02000000; 19 | const MCI_MCIAVI_PLAY_FULLBY2 = 0x04000000; 20 | 21 | enum { 22 | MCI_AVI_STATUS_FRAMES_SKIPPED = 0x00008001, 23 | MCI_AVI_STATUS_LAST_PLAY_SPEED = 0x00008002, 24 | MCI_AVI_STATUS_AUDIO_BREAKS = 0x00008003, 25 | MCI_AVI_SETVIDEO_DRAW_PROCEDURE = 0x00008000, 26 | MCI_AVI_SETVIDEO_PALETTE_COLOR = 0x00008100, 27 | MCI_AVI_SETVIDEO_PALETTE_HALFTONE = 0x0000FFFF 28 | } 29 | 30 | enum { 31 | MCIERR_AVI_OLDAVIFORMAT = MCIERR_CUSTOM_DRIVER_BASE + 100, 32 | MCIERR_AVI_NOTINTERLEAVED, 33 | MCIERR_AVI_NODISPDIB, 34 | MCIERR_AVI_CANTPLAYFULLSCREEN, 35 | MCIERR_AVI_TOOBIGFORVGA, 36 | MCIERR_AVI_NOCOMPRESSOR, 37 | MCIERR_AVI_DISPLAYERROR, 38 | MCIERR_AVI_AUDIOERROR, 39 | MCIERR_AVI_BADPALETTE // = MCIERR_CUSTOM_DRIVER_BASE + 108 40 | } 41 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/mcx.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * mcx.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.mcx; 12 | 13 | private import win32.windef; 14 | 15 | const DWORD 16 | DIALOPTION_BILLING = 64, 17 | DIALOPTION_QUIET = 128, 18 | DIALOPTION_DIALTONE = 256; 19 | 20 | const DWORD 21 | MDMVOLFLAG_LOW = 1, 22 | MDMVOLFLAG_MEDIUM = 2, 23 | MDMVOLFLAG_HIGH = 4; 24 | 25 | enum : DWORD { 26 | MDMVOL_LOW = 0, 27 | MDMVOL_MEDIUM = 1, 28 | MDMVOL_HIGH = 2 29 | } 30 | 31 | const DWORD 32 | MDMSPKRFLAG_OFF = 1, 33 | MDMSPKRFLAG_DIAL = 2, 34 | MDMSPKRFLAG_ON = 4, 35 | MDMSPKRFLAG_CALLSETUP = 8; 36 | 37 | enum : DWORD { 38 | MDMSPKR_OFF, 39 | MDMSPKR_DIAL, 40 | MDMSPKR_ON, 41 | MDMSPKR_CALLSETUP 42 | } 43 | 44 | const DWORD 45 | MDM_COMPRESSION = 0x0001, 46 | MDM_ERROR_CONTROL = 0x0002, 47 | MDM_FORCED_EC = 0x0004, 48 | MDM_CELLULAR = 0x0008, 49 | MDM_FLOWCONTROL_HARD = 0x0010, 50 | MDM_FLOWCONTROL_SOFT = 0x0020, 51 | MDM_CCITT_OVERRIDE = 0x0040, 52 | MDM_SPEED_ADJUST = 0x0080, 53 | MDM_TONE_DIAL = 0x0100, 54 | MDM_BLIND_DIAL = 0x0200, 55 | MDM_V23_OVERRIDE = 0x0400; 56 | 57 | struct MODEMDEVCAPS { 58 | DWORD dwActualSize; 59 | DWORD dwRequiredSize; 60 | DWORD dwDevSpecificOffset; 61 | DWORD dwDevSpecificSize; 62 | DWORD dwModemProviderVersion; 63 | DWORD dwModemManufacturerOffset; 64 | DWORD dwModemManufacturerSize; 65 | DWORD dwModemModelOffset; 66 | DWORD dwModemModelSize; 67 | DWORD dwModemVersionOffset; 68 | DWORD dwModemVersionSize; 69 | DWORD dwDialOptions; 70 | DWORD dwCallSetupFailTimer; 71 | DWORD dwInactivityTimeout; 72 | DWORD dwSpeakerVolume; 73 | DWORD dwSpeakerMode; 74 | DWORD dwModemOptions; 75 | DWORD dwMaxDTERate; 76 | DWORD dwMaxDCERate; 77 | BYTE _abVariablePortion; 78 | 79 | BYTE* abVariablePortion() { return &_abVariablePortion; } 80 | } 81 | alias MODEMDEVCAPS* PMODEMDEVCAPS, LPMODEMDEVCAPS; 82 | 83 | struct MODEMSETTINGS { 84 | DWORD dwActualSize; 85 | DWORD dwRequiredSize; 86 | DWORD dwDevSpecificOffset; 87 | DWORD dwDevSpecificSize; 88 | DWORD dwCallSetupFailTimer; 89 | DWORD dwInactivityTimeout; 90 | DWORD dwSpeakerVolume; 91 | DWORD dwSpeakerMode; 92 | DWORD dwPreferredModemOptions; 93 | DWORD dwNegotiatedModemOptions; 94 | DWORD dwNegotiatedDCERate; 95 | BYTE _abVariablePortion; 96 | 97 | BYTE* abVariablePortion() { return &_abVariablePortion; } 98 | } 99 | alias MODEMSETTINGS* PMODEMSETTINGS, LPMODEMSETTINGS; 100 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/mgmtapi.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * mgmtapi.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.mgmtapi; 12 | 13 | import win32.snmp; 14 | private import win32.windef; 15 | 16 | enum { 17 | SNMP_MGMTAPI_TIMEOUT = 40, 18 | SNMP_MGMTAPI_SELECT_FDERRORS, 19 | SNMP_MGMTAPI_TRAP_ERRORS, 20 | SNMP_MGMTAPI_TRAP_DUPINIT, 21 | SNMP_MGMTAPI_NOTRAPS, 22 | SNMP_MGMTAPI_AGAIN, 23 | SNMP_MGMTAPI_INVALID_CTL, 24 | SNMP_MGMTAPI_INVALID_SESSION, 25 | SNMP_MGMTAPI_INVALID_BUFFER // = 48 26 | } 27 | 28 | const MGMCTL_SETAGENTPORT = 1; 29 | 30 | alias PVOID LPSNMP_MGR_SESSION; 31 | 32 | extern (Windows) { 33 | BOOL SnmpMgrClose(LPSNMP_MGR_SESSION); 34 | BOOL SnmpMgrCtl(LPSNMP_MGR_SESSION, DWORD, LPVOID, DWORD, LPVOID, DWORD, 35 | LPDWORD); 36 | BOOL SnmpMgrGetTrap(AsnObjectIdentifier*, AsnNetworkAddress*, 37 | AsnInteger*, AsnInteger*, AsnTimeticks*, SnmpVarBindList*); 38 | BOOL SnmpMgrGetTrapEx(AsnObjectIdentifier*, AsnNetworkAddress*, 39 | AsnNetworkAddress*, AsnInteger*, AsnInteger*, AsnOctetString*, 40 | AsnTimeticks*, SnmpVarBindList*); 41 | BOOL SnmpMgrOidToStr(AsnObjectIdentifier*, LPSTR*); 42 | LPSNMP_MGR_SESSION SnmpMgrOpen(LPSTR, LPSTR, INT, INT); 43 | INT SnmpMgrRequest(LPSNMP_MGR_SESSION, BYTE, SnmpVarBindList*, 44 | AsnInteger*, AsnInteger*); 45 | BOOL SnmpMgrStrToOid(LPSTR, AsnObjectIdentifier*); 46 | BOOL SnmpMgrTrapListen(HANDLE*); 47 | } 48 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/ntdef.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * ntdef.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.ntdef; 12 | 13 | private import win32.basetsd, win32.subauth, win32.windef, win32.winnt; 14 | 15 | const uint 16 | OBJ_INHERIT = 0x0002, 17 | OBJ_PERMANENT = 0x0010, 18 | OBJ_EXCLUSIVE = 0x0020, 19 | OBJ_CASE_INSENSITIVE = 0x0040, 20 | OBJ_OPENIF = 0x0080, 21 | OBJ_OPENLINK = 0x0100, 22 | OBJ_VALID_ATTRIBUTES = 0x01F2; 23 | 24 | void InitializeObjectAttributes(OBJECT_ATTRIBUTES* p, UNICODE_STRING* n, 25 | uint a, HANDLE r, void* s) { 26 | with (*p) { 27 | Length = OBJECT_ATTRIBUTES.sizeof; 28 | RootDirectory = r; 29 | Attributes = a; 30 | ObjectName = n; 31 | SecurityDescriptor = s; 32 | SecurityQualityOfService = null; 33 | } 34 | } 35 | 36 | bool NT_SUCCESS(int x) { return x >= 0; } 37 | 38 | /* In MinGW, NTSTATUS, UNICODE_STRING, STRING and their associated pointer 39 | * type aliases are defined in ntdef.h, ntsecapi.h and subauth.h, each of 40 | * which checks that none of the others is already included. 41 | */ 42 | alias int NTSTATUS; 43 | alias int* PNTSTATUS; 44 | 45 | struct UNICODE_STRING { 46 | USHORT Length; 47 | USHORT MaximumLength; 48 | PWSTR Buffer; 49 | } 50 | alias UNICODE_STRING* PUNICODE_STRING; 51 | alias CPtr!(UNICODE_STRING) PCUNICODE_STRING; 52 | 53 | struct STRING { 54 | USHORT Length; 55 | USHORT MaximumLength; 56 | PCHAR Buffer; 57 | } 58 | alias STRING ANSI_STRING, OEM_STRING; 59 | alias STRING* PSTRING, PANSI_STRING, POEM_STRING; 60 | 61 | alias LARGE_INTEGER PHYSICAL_ADDRESS; 62 | alias LARGE_INTEGER* PPHYSICAL_ADDRESS; 63 | 64 | enum SECTION_INHERIT { 65 | ViewShare = 1, 66 | ViewUnmap 67 | } 68 | 69 | /* In MinGW, this is defined in ntdef.h and ntsecapi.h, each of which checks 70 | * that the other isn't already included. 71 | */ 72 | struct OBJECT_ATTRIBUTES { 73 | ULONG Length = OBJECT_ATTRIBUTES.sizeof; 74 | HANDLE RootDirectory; 75 | PUNICODE_STRING ObjectName; 76 | ULONG Attributes; 77 | PVOID SecurityDescriptor; 78 | PVOID SecurityQualityOfService; 79 | } 80 | alias OBJECT_ATTRIBUTES* POBJECT_ATTRIBUTES; 81 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/ntdll.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * ntdll.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW API for MS-Windows 3.10 * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.ntdll; 12 | 13 | private import win32.w32api; 14 | 15 | // http://www.matcode.com/undocwin.h.txt 16 | static assert (_WIN32_WINNT_ONLY, 17 | "win32.ntdll is available only if version WindowsNTonly, WindowsXP, " 18 | "Windows2003 or WindowsVista is set"); 19 | 20 | 21 | enum SHUTDOWN_ACTION { 22 | ShutdownNoReboot, 23 | ShutdownReboot, 24 | ShutdownPowerOff 25 | } 26 | 27 | extern (Windows) uint NtShutdownSystem(SHUTDOWN_ACTION Action); 28 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/ntldap.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * ntldap.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.ntldap; 12 | 13 | /* TOTHINKABOUT: These constants don't have ANSI/Unicode versioned 14 | * aliases. Should we merge them anyway? 15 | */ 16 | 17 | const char[] 18 | LDAP_SERVER_ASQ_OID = "1.2.840.113556.1.4.1504", 19 | LDAP_SERVER_DIRSYNC_OID = "1.2.840.113556.1.4.841", 20 | LDAP_SERVER_SD_FLAGS_OID = "1.2.840.113556.1.4.801", 21 | LDAP_SERVER_FAST_BIND_OID = "1.2.840.113556.1.4.1781", 22 | LDAP_MATCHING_RULE_BIT_OR = "1.2.840.113556.1.4.804", 23 | LDAP_MATCHING_RULE_BIT_AND = "1.2.840.113556.1.4.803", 24 | LDAP_SERVER_EXTENDED_DN_OID = "1.2.840.113556.1.4.529", 25 | LDAP_SERVER_LAZY_COMMIT_OID = "1.2.840.113556.1.4.619", 26 | LDAP_SERVER_TREE_DELETE_OID = "1.2.840.113556.1.4.805", 27 | LDAP_SERVER_VERIFY_NAME_OID = "1.2.840.113556.1.4.1338", 28 | LDAP_SERVER_SHOW_DELETED_OID = "1.2.840.113556.1.4.417", 29 | LDAP_SERVER_NOTIFICATION_OID = "1.2.840.113556.1.4.528", 30 | LDAP_SERVER_DOMAIN_SCOPE_OID = "1.2.840.113556.1.4.1339", 31 | LDAP_CAP_ACTIVE_DIRECTORY_OID = "1.2.840.113556.1.4.800", 32 | LDAP_SERVER_SEARCH_OPTIONS_OID = "1.2.840.113556.1.4.1340", 33 | LDAP_CAP_ACTIVE_DIRECTORY_V51_OID = "1.2.840.113556.1.4.1670", 34 | LDAP_SERVER_PERMISSIVE_MODIFY_OID = "1.2.840.113556.1.4.1413", 35 | LDAP_SERVER_CROSSDOM_MOVE_TARGET_OID = "1.2.840.113556.1.4.521"; 36 | 37 | const wchar[] 38 | LDAP_SERVER_ASQ_OID_W = "1.2.840.113556.1.4.1504", 39 | LDAP_SERVER_DIRSYNC_OID_W = "1.2.840.113556.1.4.841", 40 | LDAP_SERVER_SD_FLAGS_OID_W = "1.2.840.113556.1.4.801", 41 | LDAP_SERVER_FAST_BIND_OID_W = "1.2.840.113556.1.4.1781", 42 | LDAP_MATCHING_RULE_BIT_OR_W = "1.2.840.113556.1.4.804", 43 | LDAP_MATCHING_RULE_BIT_AND_W = "1.2.840.113556.1.4.803", 44 | LDAP_SERVER_EXTENDED_DN_OID_W = "1.2.840.113556.1.4.529", 45 | LDAP_SERVER_LAZY_COMMIT_OID_W = "1.2.840.113556.1.4.619", 46 | LDAP_SERVER_TREE_DELETE_OID_W = "1.2.840.113556.1.4.805", 47 | LDAP_SERVER_VERIFY_NAME_OID_W = "1.2.840.113556.1.4.1338", 48 | LDAP_SERVER_SHOW_DELETED_OID_W = "1.2.840.113556.1.4.417", 49 | LDAP_SERVER_NOTIFICATION_OID_W = "1.2.840.113556.1.4.528", 50 | LDAP_SERVER_DOMAIN_SCOPE_OID_W = "1.2.840.113556.1.4.1339", 51 | LDAP_CAP_ACTIVE_DIRECTORY_OID_W = "1.2.840.113556.1.4.800", 52 | LDAP_SERVER_SEARCH_OPTIONS_OID_W = "1.2.840.113556.1.4.1340", 53 | LDAP_CAP_ACTIVE_DIRECTORY_V51_OID_W = "1.2.840.113556.1.4.1670", 54 | LDAP_SERVER_PERMISSIVE_MODIFY_OID_W = "1.2.840.113556.1.4.1413", 55 | LDAP_SERVER_CROSSDOM_MOVE_TARGET_OID_W = "1.2.840.113556.1.4.521"; 56 | 57 | const SERVER_SEARCH_FLAG_DOMAIN_SCOPE = 1; 58 | const SERVER_SEARCH_FLAG_PHANTOM_ROOT = 2; 59 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/objfwd.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * objfwd.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.objfwd; 11 | 12 | private import win32.objidl; 13 | 14 | /+ 15 | // Forward declararions are not necessary in D. 16 | extern(Windows) { 17 | interface IMoniker; 18 | interface IStream; 19 | interface IMarshal; 20 | interface IMalloc; 21 | interface IMallocSpy; 22 | interface IMessageFilter; 23 | interface IPersist; 24 | interface IPersistStream; 25 | interface IRunningObjectTable; 26 | interface IBindCtx; 27 | interface IAdviseSink; 28 | interface IAdviseSink2; 29 | interface IDataObject; 30 | interface IDataAdviseHolder; 31 | 32 | interface IEnumMoniker; 33 | interface IEnumFORMATETC; 34 | interface IEnumSTATDATA; 35 | interface IEnumSTATSTG; 36 | interface IEnumSTATPROPSTG; 37 | interface IEnumString; 38 | interface IEnumUnknown; 39 | interface IStorage; 40 | interface IPersistStorage; 41 | interface ILockBytes; 42 | interface IStdMarshalInfo; 43 | interface IExternalConnection; 44 | interface IRunnableObject; 45 | interface IROTData; 46 | interface IPersistFile; 47 | interface IRootStorage; 48 | interface IPropertyStorage; 49 | interface IEnumSTATPROPSETSTG; 50 | interface IPropertySetStorage; 51 | interface IClientSecurity; 52 | interface IServerSecurity; 53 | interface IClassActivator; 54 | interface IFillLockBytes; 55 | interface IProgressNotify; 56 | interface ILayoutStorage; 57 | interface IRpcProxyBuffer; 58 | interface IRpcChannelBuffer; 59 | interface IRpcStubBuffer; 60 | } 61 | +/ 62 | alias IMoniker LPMONIKER; 63 | alias IStream LPSTREAM; 64 | alias IMarshal LPMARSHAL; 65 | alias IMalloc LPMALLOC; 66 | alias IMallocSpy LPMALLOCSPY; 67 | alias IMessageFilter LPMESSAGEFILTER; 68 | alias IPersist LPPERSIST; 69 | alias IPersistStream LPPERSISTSTREAM; 70 | alias IRunningObjectTable LPRUNNINGOBJECTTABLE; 71 | alias IBindCtx LPBINDCTX, LPBC; 72 | alias IAdviseSink LPADVISESINK; 73 | alias IAdviseSink2 LPADVISESINK2; 74 | alias IDataObject LPDATAOBJECT; 75 | alias IDataAdviseHolder LPDATAADVISEHOLDER; 76 | alias IEnumMoniker LPENUMMONIKER; 77 | alias IEnumFORMATETC LPENUMFORMATETC; 78 | alias IEnumSTATDATA LPENUMSTATDATA; 79 | alias IEnumSTATSTG LPENUMSTATSTG; 80 | alias IEnumSTATPROPSTG LPENUMSTATPROPSTG; 81 | alias IEnumString LPENUMSTRING; 82 | alias IEnumUnknown LPENUMUNKNOWN; 83 | alias IStorage LPSTORAGE; 84 | alias IPersistStorage LPPERSISTSTORAGE; 85 | alias ILockBytes LPLOCKBYTES; 86 | alias IStdMarshalInfo LPSTDMARSHALINFO; 87 | alias IExternalConnection LPEXTERNALCONNECTION; 88 | alias IRunnableObject LPRUNNABLEOBJECT; 89 | alias IROTData LPROTDATA; 90 | alias IPersistFile LPPERSISTFILE; 91 | alias IRootStorage LPROOTSTORAGE; 92 | alias IRpcChannelBuffer LPRPCCHANNELBUFFER; 93 | alias IRpcProxyBuffer LPRPCPROXYBUFFER; 94 | alias IRpcStubBuffer LPRPCSTUBBUFFER; 95 | alias IPropertyStorage LPPROPERTYSTORAGE; 96 | alias IEnumSTATPROPSETSTG LPENUMSTATPROPSETSTG; 97 | alias IPropertySetStorage LPPROPERTYSETSTORAGE; 98 | alias IClientSecurity LPCLIENTSECURITY; 99 | alias IServerSecurity LPSERVERSECURITY; 100 | alias IClassActivator LPCLASSACTIVATOR; 101 | alias IFillLockBytes LPFILLLOCKBYTES; 102 | alias IProgressNotify LPPROGRESSNOTIFY; 103 | alias ILayoutStorage LPLAYOUTSTORAGE; 104 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/objsafe.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * objsafe.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.objsafe; 12 | 13 | private import win32.basetyps, win32.unknwn, win32.windef; 14 | 15 | enum { 16 | INTERFACESAFE_FOR_UNTRUSTED_CALLER = 1, 17 | INTERFACESAFE_FOR_UNTRUSTED_DATA 18 | } 19 | 20 | interface IObjectSafety : IUnknown { 21 | HRESULT GetInterfaceSafetyOptions(REFIID, DWORD*, DWORD*); 22 | HRESULT SetInterfaceSafetyOptions(REFIID, DWORD, DWORD); 23 | } 24 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/ole2ver.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * ole2ver.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW API for MS-Windows 3.10 * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.ole2ver; 11 | 12 | // These are apparently not documented on the MSDN site 13 | const rmm = 23; 14 | const rup = 639; 15 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/olectlid.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * olectlid.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.olectlid; 11 | 12 | private import win32.basetyps; 13 | 14 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/pbt.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * pbt.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.pbt; 12 | 13 | private import win32.windef; 14 | 15 | enum : WPARAM { 16 | PBT_APMQUERYSUSPEND, 17 | PBT_APMQUERYSTANDBY, 18 | PBT_APMQUERYSUSPENDFAILED, 19 | PBT_APMQUERYSTANDBYFAILED, 20 | PBT_APMSUSPEND, 21 | PBT_APMSTANDBY, 22 | PBT_APMRESUMECRITICAL, 23 | PBT_APMRESUMESUSPEND, 24 | PBT_APMRESUMESTANDBY, 25 | PBT_APMBATTERYLOW, 26 | PBT_APMPOWERSTATUSCHANGE, 27 | PBT_APMOEMEVENT // = 11 28 | } 29 | 30 | const LPARAM PBTF_APMRESUMEFROMFAILURE = 1; 31 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/rapi.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * rapi.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.rapi; 12 | 13 | /* Comment from MinGW 14 | NOTE: This strictly does not belong in the Win32 API since it's 15 | really part of Platform SDK. 16 | */ 17 | 18 | private import win32.winbase, win32.windef; 19 | 20 | struct IRAPIStream { 21 | IRAPIStreamVtbl* lpVtbl; 22 | } 23 | 24 | enum RAPISTREAMFLAG { 25 | STREAM_TIMEOUT_READ 26 | } 27 | 28 | extern (Windows) { 29 | alias HRESULT function(IRAPIStream*, RAPISTREAMFLAG, DWORD) _SetRapiStat; 30 | alias HRESULT function(IRAPIStream*, RAPISTREAMFLAG, DWORD*) _GetRapiStat; 31 | } 32 | 33 | struct IRAPIStreamVtbl { 34 | _SetRapiStat SetRapiStat; 35 | _GetRapiStat GetRapiStat; 36 | } 37 | 38 | // FIXME: what's this? 39 | //typedef HRESULT(STDAPICALLTYPE RAPIEXT)(DWORD, BYTE, DWORD, BYTE, IRAPIStream*); 40 | 41 | struct RAPIINIT { 42 | DWORD cbSize = this.sizeof; 43 | HANDLE heRapiInit; 44 | HRESULT hrRapiInit; 45 | } 46 | 47 | extern (Windows) { 48 | HRESULT CeRapiInit(); 49 | HRESULT CeRapiInitEx(RAPIINIT*); 50 | BOOL CeCreateProcess(LPCWSTR, LPCWSTR, LPSECURITY_ATTRIBUTES, 51 | LPSECURITY_ATTRIBUTES, BOOL, DWORD, LPVOID, LPWSTR, LPSTARTUPINFO, 52 | LPPROCESS_INFORMATION); 53 | HRESULT CeRapiUninit(); 54 | BOOL CeWriteFile(HANDLE, LPCVOID, DWORD, LPDWORD, LPOVERLAPPED); 55 | HANDLE CeCreateFile(LPCWSTR, DWORD, DWORD, LPSECURITY_ATTRIBUTES, DWORD, 56 | DWORD, HANDLE); 57 | BOOL CeCreateDirectory(LPCWSTR, LPSECURITY_ATTRIBUTES); 58 | DWORD CeGetLastError(); 59 | BOOL CeGetFileTime(HANDLE, LPFILETIME, LPFILETIME, LPFILETIME); 60 | BOOL CeCloseHandle(HANDLE); 61 | } 62 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/reason.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * reason.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.reason; 12 | 13 | private import win32.w32api, win32.windef; 14 | 15 | static assert (_WIN32_WINNT >= 0x501, 16 | "win32.reason is only available on WindowsXP and later"); 17 | 18 | 19 | enum : DWORD { 20 | SHTDN_REASON_MAJOR_OTHER = 0x00000000, 21 | SHTDN_REASON_MAJOR_HARDWARE = 0x00010000, 22 | SHTDN_REASON_MAJOR_OPERATINGSYSTEM = 0x00020000, 23 | SHTDN_REASON_MAJOR_SOFTWARE = 0x00030000, 24 | SHTDN_REASON_MAJOR_APPLICATION = 0x00040000, 25 | SHTDN_REASON_MAJOR_SYSTEM = 0x00050000, 26 | SHTDN_REASON_MAJOR_POWER = 0x00060000, 27 | SHTDN_REASON_MAJOR_LEGACY_API = 0x00070000 28 | } 29 | 30 | enum : DWORD { 31 | SHTDN_REASON_MINOR_OTHER, 32 | SHTDN_REASON_MINOR_MAINTENANCE, 33 | SHTDN_REASON_MINOR_INSTALLATION, 34 | SHTDN_REASON_MINOR_UPGRADE, 35 | SHTDN_REASON_MINOR_RECONFIG, 36 | SHTDN_REASON_MINOR_HUNG, 37 | SHTDN_REASON_MINOR_UNSTABLE, 38 | SHTDN_REASON_MINOR_DISK, 39 | SHTDN_REASON_MINOR_PROCESSOR, 40 | SHTDN_REASON_MINOR_NETWORKCARD, 41 | SHTDN_REASON_MINOR_POWER_SUPPLY, 42 | SHTDN_REASON_MINOR_CORDUNPLUGGED, 43 | SHTDN_REASON_MINOR_ENVIRONMENT, 44 | SHTDN_REASON_MINOR_HARDWARE_DRIVER, 45 | SHTDN_REASON_MINOR_OTHERDRIVER, 46 | SHTDN_REASON_MINOR_BLUESCREEN, 47 | SHTDN_REASON_MINOR_SERVICEPACK, 48 | SHTDN_REASON_MINOR_HOTFIX, 49 | SHTDN_REASON_MINOR_SECURITYFIX, 50 | SHTDN_REASON_MINOR_SECURITY, 51 | SHTDN_REASON_MINOR_NETWORK_CONNECTIVITY, 52 | SHTDN_REASON_MINOR_WMI, 53 | SHTDN_REASON_MINOR_SERVICEPACK_UNINSTALL, 54 | SHTDN_REASON_MINOR_HOTFIX_UNINSTALL, 55 | SHTDN_REASON_MINOR_SECURITYFIX_UNINSTALL, 56 | SHTDN_REASON_MINOR_MMC, // = 0x00000019 57 | SHTDN_REASON_MINOR_TERMSRV = 0x00000020 58 | } 59 | 60 | enum : DWORD { 61 | SHTDN_REASON_FLAG_USER_DEFINED = 0x40000000, 62 | SHTDN_REASON_FLAG_PLANNED = 0x80000000 63 | } 64 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/richole.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * richole.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.richole; 11 | 12 | private import win32.objfwd, win32.objidl, win32.ole2, win32.unknwn, 13 | win32.windef; 14 | private import win32.richedit; // for CHARRANGE 15 | 16 | align(4): 17 | 18 | const ULONG 19 | REO_GETOBJ_NO_INTERFACES = 0, 20 | REO_GETOBJ_POLEOBJ = 1, 21 | REO_GETOBJ_PSTG = 2, 22 | REO_GETOBJ_POLESITE = 4, 23 | REO_GETOBJ_ALL_INTERFACES = 7, 24 | REO_CP_SELECTION = -1, 25 | REO_IOB_SELECTION = -1, 26 | REO_IOB_USE_CP = -2, 27 | REO_NULL = 0, 28 | REO_READWRITEMASK = 0x3F, 29 | REO_DONTNEEDPALETTE = 32, 30 | REO_BLANK = 16, 31 | REO_DYNAMICSIZE = 8, 32 | REO_INVERTEDSELECT = 4, 33 | REO_BELOWBASELINE = 2, 34 | REO_RESIZABLE = 1, 35 | REO_LINK = 0x80000000, 36 | REO_STATIC = 0x40000000, 37 | REO_SELECTED = 0x08000000, 38 | REO_OPEN = 0x4000000, 39 | REO_INPLACEACTIVE = 0x2000000, 40 | REO_HILITED = 0x1000000, 41 | REO_LINKAVAILABLE = 0x800000, 42 | REO_GETMETAFILE = 0x400000; 43 | 44 | enum { 45 | RECO_PASTE = 0, 46 | RECO_DROP, 47 | RECO_COPY, 48 | RECO_CUT, 49 | RECO_DRAG // = 4 50 | } 51 | 52 | extern (C) extern const GUID 53 | IID_IRichEditOle, 54 | IID_IRichEditOleCallback; 55 | 56 | struct REOBJECT { 57 | DWORD cbStruct = REOBJECT.sizeof; 58 | LONG cp; 59 | CLSID clsid; 60 | LPOLEOBJECT poleobj; 61 | LPSTORAGE pstg; 62 | LPOLECLIENTSITE polesite; 63 | SIZEL sizel; 64 | DWORD dvaspect; 65 | DWORD dwFlags; 66 | DWORD dwUser; 67 | } 68 | 69 | interface IRichEditOle : IUnknown { 70 | HRESULT GetClientSite(LPOLECLIENTSITE*); 71 | LONG GetObjectCount(); 72 | LONG GetLinkCount(); 73 | HRESULT GetObject(LONG, REOBJECT*, DWORD); 74 | HRESULT InsertObject(REOBJECT*); 75 | HRESULT ConvertObject(LONG, REFCLSID, LPCSTR); 76 | HRESULT ActivateAs(REFCLSID, REFCLSID); 77 | HRESULT SetHostNames(LPCSTR, LPCSTR); 78 | HRESULT SetLinkAvailable(LONG, BOOL); 79 | HRESULT SetDvaspect(LONG, DWORD); 80 | HRESULT HandsOffStorage(LONG); 81 | HRESULT SaveCompleted(LONG, LPSTORAGE); 82 | HRESULT InPlaceDeactivate(); 83 | HRESULT ContextSensitiveHelp(BOOL); 84 | HRESULT GetClipboardData(CHARRANGE*, DWORD, LPDATAOBJECT*); 85 | HRESULT ImportDataObject(LPDATAOBJECT, CLIPFORMAT, HGLOBAL); 86 | }; 87 | alias IRichEditOle* LPRICHEDITOLE; 88 | 89 | interface IRichEditOleCallback : IUnknown { 90 | HRESULT GetNewStorage(LPSTORAGE*); 91 | HRESULT GetInPlaceContext(LPOLEINPLACEFRAME*, LPOLEINPLACEUIWINDOW*, LPOLEINPLACEFRAMEINFO); 92 | HRESULT ShowContainerUI(BOOL); 93 | HRESULT QueryInsertObject(LPCLSID, LPSTORAGE, LONG); 94 | HRESULT DeleteObject(LPOLEOBJECT); 95 | HRESULT QueryAcceptData(LPDATAOBJECT, CLIPFORMAT*, DWORD, BOOL, HGLOBAL); 96 | HRESULT ContextSensitiveHelp(BOOL); 97 | HRESULT GetClipboardData(CHARRANGE*, DWORD, LPDATAOBJECT*); 98 | HRESULT GetDragDropEffect(BOOL, DWORD, PDWORD); 99 | HRESULT GetContextMenu(WORD, LPOLEOBJECT, CHARRANGE*, HMENU*); 100 | }; 101 | alias IRichEditOleCallback* LPRICHEDITOLECALLBACK; 102 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/rpc.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * rpc.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.rpc; 11 | 12 | /* Moved to rpcdecp (duplicate definition). 13 | typedef void *I_RPC_HANDLE; 14 | alias long RPC_STATUS; 15 | // Moved to rpcdce: 16 | RpcImpersonateClient 17 | RpcRevertToSelf 18 | */ 19 | 20 | public import win32.unknwn; 21 | public import win32.rpcdce; // also pulls in rpcdcep 22 | public import win32.rpcnsi; 23 | public import win32.rpcnterr; 24 | public import win32.winerror; 25 | 26 | alias MIDL_user_allocate midl_user_allocate; 27 | alias MIDL_user_free midl_user_free; 28 | 29 | extern (Windows) { 30 | int I_RpcMapWin32Status(RPC_STATUS); 31 | } 32 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/rpcdce2.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * rpcdce2.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.rpcdce2; 11 | 12 | import win32.rpcdce; 13 | private import win32.basetyps; 14 | 15 | // FIXME: deal with RPC_UNICODE_SUPPORTED 16 | // FIXME: check types of constants 17 | 18 | enum { 19 | RPC_C_EP_ALL_ELTS, 20 | RPC_C_EP_MATCH_BY_IF, 21 | RPC_C_EP_MATCH_BY_OBJ, 22 | RPC_C_EP_MATCH_BY_BOTH 23 | } 24 | 25 | enum { 26 | RPC_C_VERS_ALL = 1, 27 | RPC_C_VERS_COMPATIBLE, 28 | RPC_C_VERS_EXACT, 29 | RPC_C_VERS_MAJOR_ONLY, 30 | RPC_C_VERS_UPTO 31 | } 32 | 33 | const size_t DCE_C_ERROR_STRING_LEN = 256; 34 | 35 | enum { 36 | RPC_C_MGMT_INQ_IF_IDS, 37 | RPC_C_MGMT_INQ_PRINC_NAME, 38 | RPC_C_MGMT_INQ_STATS, 39 | RPC_C_MGMT_IS_SERVER_LISTEN, 40 | RPC_C_MGMT_STOP_SERVER_LISTEN 41 | } 42 | 43 | extern (Windows) { 44 | int UuidCompare(UUID*, UUID*, RPC_STATUS*); 45 | RPC_STATUS UuidCreateNil(UUID*); 46 | int UuidEqual(UUID*, UUID*, RPC_STATUS*); 47 | ushort UuidHash(UUID*, RPC_STATUS*); 48 | int UuidIsNil(UUID*, RPC_STATUS*); 49 | 50 | RPC_STATUS RpcMgmtEpEltInqBegin(RPC_BINDING_HANDLE, uint, RPC_IF_ID*, 51 | uint, UUID*, RPC_EP_INQ_HANDLE*); 52 | RPC_STATUS RpcMgmtEpEltInqDone(RPC_EP_INQ_HANDLE*); 53 | RPC_STATUS RpcMgmtEpUnregister(RPC_BINDING_HANDLE, RPC_IF_ID*, 54 | RPC_BINDING_HANDLE, UUID*); 55 | RPC_STATUS RpcMgmtSetAuthorizationFn(RPC_MGMT_AUTHORIZATION_FN); 56 | } 57 | 58 | 59 | //#ifdef RPC_UNICODE_SUPPORTED 60 | RPC_STATUS DceErrorInqTextA(RPC_STATUS, char*); 61 | RPC_STATUS DceErrorInqTextW(RPC_STATUS, wchar*); 62 | RPC_STATUS RpcMgmtEpEltInqNextA(RPC_EP_INQ_HANDLE, RPC_IF_ID*, 63 | RPC_BINDING_HANDLE*, UUID*, char**); 64 | RPC_STATUS RpcMgmtEpEltInqNextW(RPC_EP_INQ_HANDLE, RPC_IF_ID*, 65 | RPC_BINDING_HANDLE*, UUID*, wchar**); 66 | version (Unicode) { 67 | alias RpcMgmtEpEltInqNextW RpcMgmtEpEltInqNext; 68 | alias DceErrorInqTextW DceErrorInqText; 69 | } else { 70 | alias RpcMgmtEpEltInqNextA RpcMgmtEpEltInqNext; 71 | alias DceErrorInqTextA DceErrorInqText; 72 | } 73 | /+ 74 | #else /* RPC_UNICODE_SUPPORTED */ 75 | RPC_STATUS RPC_ENTRY DceErrorInqText(RPC_STATUS,unsigned char*); 76 | RPC_STATUS RPC_ENTRY RpcMgmtEpEltInqNext(RPC_EP_INQ_HANDLE,RPC_IF_ID*,RPC_BINDING_HANDLE*,UUID*,unsigned char**); 77 | #endif 78 | +/ 79 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/rpcnsip.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * rpcnsip.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.rpcnsip; 11 | 12 | private import win32.rpcdce, win32.rpcdcep, win32.rpcnsi; 13 | 14 | struct RPC_IMPORT_CONTEXT_P { 15 | RPC_NS_HANDLE LookupContext; 16 | RPC_BINDING_HANDLE ProposedHandle; 17 | RPC_BINDING_VECTOR* Bindings; 18 | } 19 | alias RPC_IMPORT_CONTEXT_P* PRPC_IMPORT_CONTEXT_P; 20 | 21 | extern(Windows) { 22 | RPC_STATUS I_RpcNsGetBuffer(PRPC_MESSAGE); 23 | RPC_STATUS I_RpcNsSendReceive(PRPC_MESSAGE, RPC_BINDING_HANDLE*); 24 | void I_RpcNsRaiseException(PRPC_MESSAGE, RPC_STATUS); 25 | RPC_STATUS I_RpcReBindBuffer(PRPC_MESSAGE); 26 | RPC_STATUS I_NsServerBindSearch(); 27 | RPC_STATUS I_NsClientBindSearch(); 28 | void I_NsClientBindDone(); 29 | } 30 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/rpcnterr.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * rpcnterr.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.rpcnterr; 11 | 12 | import win32.winerror; 13 | 14 | enum : uint { 15 | RPC_S_OK = ERROR_SUCCESS, 16 | RPC_S_INVALID_ARG = ERROR_INVALID_PARAMETER, 17 | RPC_S_OUT_OF_MEMORY = ERROR_OUTOFMEMORY, 18 | RPC_S_OUT_OF_THREADS = ERROR_MAX_THRDS_REACHED, 19 | RPC_S_INVALID_LEVEL = ERROR_INVALID_PARAMETER, 20 | RPC_S_BUFFER_TOO_SMALL = ERROR_INSUFFICIENT_BUFFER, 21 | RPC_S_INVALID_SECURITY_DESC = ERROR_INVALID_SECURITY_DESCR, 22 | RPC_S_ACCESS_DENIED = ERROR_ACCESS_DENIED, 23 | RPC_S_SERVER_OUT_OF_MEMORY = ERROR_NOT_ENOUGH_SERVER_MEMORY, 24 | RPC_X_NO_MEMORY = RPC_S_OUT_OF_MEMORY, 25 | RPC_X_INVALID_BOUND = RPC_S_INVALID_BOUND, 26 | RPC_X_INVALID_TAG = RPC_S_INVALID_TAG, 27 | RPC_X_ENUM_VALUE_TOO_LARGE = RPC_X_ENUM_VALUE_OUT_OF_RANGE, 28 | RPC_X_SS_CONTEXT_MISMATCH = ERROR_INVALID_HANDLE, 29 | RPC_X_INVALID_BUFFER = ERROR_INVALID_USER_BUFFER, 30 | RPC_X_INVALID_PIPE_OPERATION = RPC_X_WRONG_PIPE_ORDER 31 | } 32 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/schannel.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * schannel.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.schannel; 12 | 13 | import win32.wincrypt; 14 | private import win32.windef; 15 | 16 | const DWORD SCHANNEL_CRED_VERSION = 4; 17 | const SCHANNEL_SHUTDOWN = 1; 18 | /* Comment from MinGW 19 | ? Do these belong here or in wincrypt.h 20 | */ 21 | enum : DWORD { 22 | AUTHTYPE_CLIENT = 1, 23 | AUTHTYPE_SERVER = 2 24 | } 25 | 26 | const DWORD 27 | SP_PROT_PCT1_SERVER = 0x01, 28 | SP_PROT_PCT1_CLIENT = 0x02, 29 | SP_PROT_SSL2_SERVER = 0x04, 30 | SP_PROT_SSL2_CLIENT = 0x08, 31 | SP_PROT_SSL3_SERVER = 0x10, 32 | SP_PROT_SSL3_CLIENT = 0x20, 33 | SP_PROT_TLS1_SERVER = 0x40, 34 | SP_PROT_TLS1_CLIENT = 0x80, 35 | SP_PROT_PCT1 = SP_PROT_PCT1_CLIENT | SP_PROT_PCT1_SERVER, 36 | SP_PROT_TLS1 = SP_PROT_TLS1_CLIENT | SP_PROT_TLS1_SERVER, 37 | SP_PROT_SSL2 = SP_PROT_SSL2_CLIENT | SP_PROT_SSL2_SERVER, 38 | SP_PROT_SSL3 = SP_PROT_SSL3_CLIENT | SP_PROT_SSL3_SERVER; 39 | 40 | const DWORD 41 | SCH_CRED_NO_SYSTEM_MAPPER = 0x0002, 42 | SCH_CRED_NO_SERVERNAME_CHECK = 0x0004, 43 | SCH_CRED_MANUAL_CRED_VALIDATION = 0x0008, 44 | SCH_CRED_NO_DEFAULT_CREDS = 0x0010, 45 | SCH_CRED_AUTO_CRED_VALIDATION = 0x0020, 46 | SCH_CRED_USE_DEFAULT_CREDS = 0x0040, 47 | SCH_CRED_REVOCATION_CHECK_END_CERT = 0x0100, 48 | SCH_CRED_REVOCATION_CHECK_CHAIN = 0x0200, 49 | SCH_CRED_REVOCATION_CHECK_CHAIN_EXCLUDE_ROOT = 0x0400, 50 | SCH_CRED_IGNORE_NO_REVOCATION_CHECK = 0x0800, 51 | SCH_CRED_IGNORE_REVOCATION_OFFLINE = 0x1000; 52 | 53 | // No definition - presumably an opaque structure 54 | struct _HMAPPER; 55 | 56 | struct SCHANNEL_CRED { 57 | DWORD dwVersion = SCHANNEL_CRED_VERSION; 58 | DWORD cCreds; 59 | PCCERT_CONTEXT* paCred; 60 | HCERTSTORE hRootStore; 61 | DWORD cMappers; 62 | _HMAPPER** aphMappers; 63 | DWORD cSupportedAlgs; 64 | ALG_ID* palgSupportedAlgs; 65 | DWORD grbitEnabledProtocols; 66 | DWORD dwMinimumCypherStrength; 67 | DWORD dwMaximumCypherStrength; 68 | DWORD dwSessionLifespan; 69 | DWORD dwFlags; 70 | DWORD reserved; 71 | } 72 | alias SCHANNEL_CRED* PSCHANNEL_CRED; 73 | 74 | struct SecPkgCred_SupportedAlgs { 75 | DWORD cSupportedAlgs; 76 | ALG_ID* palgSupportedAlgs; 77 | } 78 | alias SecPkgCred_SupportedAlgs* PSecPkgCred_SupportedAlgs; 79 | 80 | struct SecPkgCred_CypherStrengths { 81 | DWORD dwMinimumCypherStrength; 82 | DWORD dwMaximumCypherStrength; 83 | } 84 | alias SecPkgCred_CypherStrengths* PSecPkgCred_CypherStrengths; 85 | 86 | struct SecPkgCred_SupportedProtocols { 87 | DWORD grbitProtocol; 88 | } 89 | alias SecPkgCred_SupportedProtocols* PSecPkgCred_SupportedProtocols; 90 | 91 | struct SecPkgContext_IssuerListInfoEx { 92 | PCERT_NAME_BLOB aIssuers; 93 | DWORD cIssuers; 94 | } 95 | alias SecPkgContext_IssuerListInfoEx* PSecPkgContext_IssuerListInfoEx; 96 | 97 | struct SecPkgContext_ConnectionInfo { 98 | DWORD dwProtocol; 99 | ALG_ID aiCipher; 100 | DWORD dwCipherStrength; 101 | ALG_ID aiHash; 102 | DWORD dwHashStrength; 103 | ALG_ID aiExch; 104 | DWORD dwExchStrength; 105 | } 106 | alias SecPkgContext_ConnectionInfo* PSecPkgContext_ConnectionInfo; 107 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/secext.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * secext.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | // Don't include this file directly, use win32.security instead. 11 | module win32.secext; 12 | pragma(lib, "secur32.lib"); 13 | 14 | private import win32.w32api, win32.windef; 15 | 16 | static assert (_WIN32_WINNT >= 0x0501, 17 | "SecExt is only available on WindowsXP and later"); 18 | 19 | enum EXTENDED_NAME_FORMAT { 20 | NameUnknown, 21 | NameFullyQualifiedDN, 22 | NameSamCompatible, 23 | NameDisplay, // = 3 24 | NameUniqueId = 6, 25 | NameCanonical, 26 | NameUserPrincipal, 27 | NameCanonicalEx, 28 | NameServicePrincipal, // = 10 29 | NameDnsDomain = 12 30 | } 31 | alias EXTENDED_NAME_FORMAT* PEXTENDED_NAME_FORMAT; 32 | 33 | extern (Windows) { 34 | BOOLEAN GetComputerObjectNameA(EXTENDED_NAME_FORMAT, LPSTR, PULONG); 35 | BOOLEAN GetComputerObjectNameW(EXTENDED_NAME_FORMAT, LPWSTR, PULONG); 36 | BOOLEAN GetUserNameExA(EXTENDED_NAME_FORMAT, LPSTR, PULONG); 37 | BOOLEAN GetUserNameExW(EXTENDED_NAME_FORMAT, LPWSTR, PULONG); 38 | BOOLEAN TranslateNameA(LPCSTR, EXTENDED_NAME_FORMAT, 39 | EXTENDED_NAME_FORMAT, LPSTR, PULONG); 40 | BOOLEAN TranslateNameW(LPCWSTR, EXTENDED_NAME_FORMAT, 41 | EXTENDED_NAME_FORMAT, LPWSTR, PULONG); 42 | } 43 | 44 | version (Unicode) { 45 | alias GetComputerObjectNameW GetComputerObjectName; 46 | alias GetUserNameExW GetUserNameEx; 47 | alias TranslateNameW TranslateName; 48 | } else { 49 | alias GetComputerObjectNameA GetComputerObjectName; 50 | alias GetUserNameExA GetUserNameEx; 51 | alias TranslateNameA TranslateName; 52 | } 53 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/servprov.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * servprov.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW API for MS-Windows 3.10 * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.servprov; 11 | 12 | private import win32.basetyps, win32.unknwn, win32.windef, win32.wtypes; 13 | 14 | interface IServiceProvider : IUnknown { 15 | HRESULT QueryService(REFGUID, REFIID, void**); 16 | } 17 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/shldisp.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * shldisp.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.shldisp; 11 | 12 | private import win32.unknwn, win32.windef, win32.wtypes; 13 | 14 | // options for IAutoComplete2 15 | const DWORD ACO_AUTOSUGGEST = 0x01; 16 | 17 | interface IAutoComplete : IUnknown { 18 | HRESULT Init(HWND, IUnknown*, LPCOLESTR, LPCOLESTR); 19 | HRESULT Enable(BOOL); 20 | } 21 | alias IAutoComplete* LPAUTOCOMPLETE; 22 | 23 | interface IAutoComplete2 : IAutoComplete { 24 | HRESULT SetOptions(DWORD); 25 | HRESULT GetOptions(DWORD*); 26 | } 27 | alias IAutoComplete2* LPAUTOCOMPLETE2; 28 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/shlguid.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * shlguid.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.shlguid; 11 | 12 | private import win32.basetyps, win32.w32api; 13 | 14 | // FIXME: clean up Windows version support 15 | 16 | // I think this is just a helper macro for other win32 headers? 17 | //MACRO #define DEFINE_SHLGUID(n,l,w1,w2) DEFINE_GUID(n,l,w1,w2,0xC0,0,0,0,0,0,0,0x46) 18 | 19 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/sqltypes.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * sqltypes.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.sqltypes; 11 | 12 | /* Conversion notes: 13 | It's assumed that ODBC >= 0x0300. 14 | */ 15 | 16 | private import win32.windef; 17 | private import win32.basetyps; // for GUID 18 | 19 | alias byte SCHAR, SQLSCHAR; 20 | alias int SDWORD, SLONG, SQLINTEGER; 21 | alias short SWORD, SSHORT, RETCODE, SQLSMALLINT; 22 | alias ULONG UDWORD; 23 | alias USHORT UWORD, SQLUSMALLINT; 24 | alias double SDOUBLE, LDOUBLE; 25 | alias float SFLOAT; 26 | alias PVOID PTR, HENV, HDBC, HSTMT, SQLPOINTER; 27 | alias UCHAR SQLCHAR; 28 | // #ifndef _WIN64 29 | alias UDWORD SQLUINTEGER; 30 | // #endif 31 | 32 | //static if (ODBCVER >= 0x0300) { 33 | alias HANDLE SQLHANDLE; 34 | alias SQLHANDLE SQLHENV, SQLHDBC, SQLHSTMT, SQLHDESC; 35 | /* 36 | } else { 37 | alias void* SQLHENV; 38 | alias void* SQLHDBC; 39 | alias void* SQLHSTMT; 40 | } 41 | */ 42 | alias SQLSMALLINT SQLRETURN; 43 | alias HWND SQLHWND; 44 | alias ULONG BOOKMARK; 45 | 46 | alias SQLINTEGER SQLLEN, SQLROWOFFSET; 47 | alias SQLUINTEGER SQLROWCOUNT, SQLULEN; 48 | alias DWORD SQLTRANSID; 49 | alias SQLUSMALLINT SQLSETPOSIROW; 50 | alias wchar SQLWCHAR; 51 | 52 | version(Unicode) { 53 | alias SQLWCHAR SQLTCHAR; 54 | } else { 55 | alias SQLCHAR SQLTCHAR; 56 | } 57 | //static if (ODBCVER >= 0x0300) { 58 | alias ubyte SQLDATE, SQLDECIMAL; 59 | alias double SQLDOUBLE, SQLFLOAT; 60 | alias ubyte SQLNUMERIC; 61 | alias float SQLREAL; 62 | alias ubyte SQLTIME, SQLTIMESTAMP, SQLVARCHAR; 63 | alias long ODBCINT64, SQLBIGINT; 64 | alias ulong SQLUBIGINT; 65 | //} 66 | 67 | struct DATE_STRUCT { 68 | SQLSMALLINT year; 69 | SQLUSMALLINT month; 70 | SQLUSMALLINT day; 71 | } 72 | 73 | struct TIME_STRUCT { 74 | SQLUSMALLINT hour; 75 | SQLUSMALLINT minute; 76 | SQLUSMALLINT second; 77 | } 78 | 79 | struct TIMESTAMP_STRUCT { 80 | SQLSMALLINT year; 81 | SQLUSMALLINT month; 82 | SQLUSMALLINT day; 83 | SQLUSMALLINT hour; 84 | SQLUSMALLINT minute; 85 | SQLUSMALLINT second; 86 | SQLUINTEGER fraction; 87 | } 88 | 89 | //static if (ODBCVER >= 0x0300) { 90 | alias DATE_STRUCT SQL_DATE_STRUCT; 91 | alias TIME_STRUCT SQL_TIME_STRUCT; 92 | alias TIMESTAMP_STRUCT SQL_TIMESTAMP_STRUCT; 93 | 94 | enum SQLINTERVAL { 95 | SQL_IS_YEAR = 1, 96 | SQL_IS_MONTH, 97 | SQL_IS_DAY, 98 | SQL_IS_HOUR, 99 | SQL_IS_MINUTE, 100 | SQL_IS_SECOND, 101 | SQL_IS_YEAR_TO_MONTH, 102 | SQL_IS_DAY_TO_HOUR, 103 | SQL_IS_DAY_TO_MINUTE, 104 | SQL_IS_DAY_TO_SECOND, 105 | SQL_IS_HOUR_TO_MINUTE, 106 | SQL_IS_HOUR_TO_SECOND, 107 | SQL_IS_MINUTE_TO_SECOND 108 | } 109 | 110 | struct SQL_YEAR_MONTH_STRUCT { 111 | SQLUINTEGER year; 112 | SQLUINTEGER month; 113 | } 114 | 115 | struct SQL_DAY_SECOND_STRUCT { 116 | SQLUINTEGER day; 117 | SQLUINTEGER hour; 118 | SQLUINTEGER minute; 119 | SQLUINTEGER second; 120 | SQLUINTEGER fraction; 121 | } 122 | 123 | struct SQL_INTERVAL_STRUCT { 124 | SQLINTERVAL interval_type; 125 | SQLSMALLINT interval_sign; 126 | union _intval { 127 | SQL_YEAR_MONTH_STRUCT year_month; 128 | SQL_DAY_SECOND_STRUCT day_second; 129 | } 130 | _intval intval; 131 | } 132 | 133 | const SQL_MAX_NUMERIC_LEN = 16; 134 | 135 | struct SQL_NUMERIC_STRUCT { 136 | SQLCHAR precision; 137 | SQLSCHAR scale; 138 | SQLCHAR sign; 139 | SQLCHAR val[SQL_MAX_NUMERIC_LEN]; 140 | } 141 | // } ODBCVER >= 0x0300 142 | alias GUID SQLGUID; 143 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/unknwn.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * unknwn.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.unknwn; 11 | 12 | import win32.objfwd, win32.windef, win32.wtypes; 13 | private import win32.basetyps; 14 | 15 | extern (Windows) { 16 | void* MIDL_user_allocate(size_t); 17 | void MIDL_user_free(void*); 18 | } 19 | 20 | 21 | extern (Windows) { 22 | 23 | interface IUnknown { 24 | HRESULT QueryInterface(IID* riid, void** pvObject); 25 | ULONG AddRef(); 26 | ULONG Release(); 27 | } 28 | 29 | alias IUnknown LPUNKNOWN; 30 | 31 | interface IClassFactory : IUnknown { 32 | HRESULT CreateInstance(IUnknown UnkOuter, IID* riid, void** pvObject); 33 | HRESULT LockServer(BOOL fLock); 34 | } 35 | alias IClassFactory LPCLASSFACTORY; 36 | 37 | /+ 38 | // These do not seem to be necessary (or desirable) for D. 39 | HRESULT IUnknown_QueryInterface_Proxy(IUnknown*,REFIID,void**); 40 | ULONG IUnknown_AddRef_Proxy(IUnknown*); 41 | ULONG IUnknown_Release_Proxy(IUnknown*); 42 | HRESULT IClassFactory_RemoteCreateInstance_Proxy(IClassFactory*,REFIID,IUnknown**); 43 | HRESULT IClassFactory_RemoteLockServer_Proxy(IClassFactory*,BOOL); 44 | HRESULT IClassFactory_CreateInstance_Proxy(IClassFactory*,IUnknown*,REFIID,void**); 45 | HRESULT IClassFactory_CreateInstance_Stub(IClassFactory*,REFIID,IUnknown**); 46 | HRESULT IClassFactory_LockServer_Proxy(IClassFactory*,BOOL); 47 | HRESULT IClassFactory_LockServer_Stub(IClassFactory*,BOOL); 48 | 49 | void IUnknown_QueryInterface_Stub(LPRPCSTUBBUFFER,LPRPCCHANNELBUFFER,PRPC_MESSAGE,PDWORD); 50 | void IUnknown_AddRef_Stub(LPRPCSTUBBUFFER,LPRPCCHANNELBUFFER,PRPC_MESSAGE,PDWORD); 51 | void IUnknown_Release_Stub(LPRPCSTUBBUFFER,LPRPCCHANNELBUFFER,PRPC_MESSAGE,PDWORD); 52 | void IClassFactory_RemoteCreateInstance_Stub(LPRPCSTUBBUFFER,LPRPCCHANNELBUFFER,PRPC_MESSAGE,PDWORD); 53 | void IClassFactory_RemoteLockServer_Stub(LPRPCSTUBBUFFER,LPRPCCHANNELBUFFER,PRPC_MESSAGE,PDWORD); 54 | +/ 55 | } 56 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/w32api.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * w32api.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW API for MS-Windows 3.12 * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.w32api; 12 | 13 | const __W32API_VERSION = 3.12; 14 | const __W32API_MAJOR_VERSION = 3; 15 | const __W32API_MINOR_VERSION = 12; 16 | 17 | /* These version identifiers are used to specify the minimum version of 18 | * Windows that an application will support. 19 | * 20 | * The programmer should set two version identifiers: one for the 21 | * minimum Windows NT version and one for the minimum Windows 9x 22 | * version. If no Windows NT version is specified, Windows NT 4 is 23 | * assumed. If no Windows 9x version is specified, Windows 95 is 24 | * assumed, unless WindowsNTonly, WindowsXP, Windows2003 or WindowsVista 25 | * is specified, implying that the application supports only the NT line of 26 | * versions. 27 | */ 28 | 29 | /* For Windows XP and later, assume no Windows 9x support. 30 | * API features new to Windows Vista are not yet included in this 31 | * translation or in MinGW, but this is here ready to start adding them. 32 | */ 33 | version (WindowsVista) { 34 | const uint 35 | _WIN32_WINNT = 0x600, 36 | _WIN32_WINDOWS = uint.max; 37 | 38 | } else version (Windows2003) { 39 | const uint 40 | _WIN32_WINNT = 0x502, 41 | _WIN32_WINDOWS = uint.max; 42 | 43 | } else version (WindowsXP) { 44 | const uint 45 | _WIN32_WINNT = 0x501, 46 | _WIN32_WINDOWS = uint.max; 47 | 48 | } else { 49 | /* for earlier Windows versions, separate version identifiers into 50 | * the NT and 9x lines 51 | */ 52 | version (Windows2000) { 53 | const uint _WIN32_WINNT = 0x500; 54 | } else { 55 | const uint _WIN32_WINNT = 0x400; 56 | } 57 | 58 | version (WindowsNTonly) { 59 | const uint _WIN32_WINDOWS = uint.max; 60 | } else version (WindowsME) { 61 | const uint _WIN32_WINDOWS = 0x500; 62 | } else version (Windows98) { 63 | const uint _WIN32_WINDOWS = 0x410; 64 | } else { 65 | const uint _WIN32_WINDOWS = 0x400; 66 | } 67 | } 68 | 69 | // Just a bit of syntactic sugar for the static ifs 70 | const uint WINVER = _WIN32_WINDOWS < _WIN32_WINNT ? 71 | _WIN32_WINDOWS : _WIN32_WINNT; 72 | const bool _WIN32_WINNT_ONLY = _WIN32_WINDOWS == uint.max; 73 | 74 | version (IE7) { 75 | const uint _WIN32_IE = 0x700; 76 | } else version (IE602) { 77 | const uint _WIN32_IE = 0x603; 78 | } else version (IE601) { 79 | const uint _WIN32_IE = 0x601; 80 | } else version (IE6) { 81 | const uint _WIN32_IE = 0x600; 82 | } else version (IE56) { 83 | const uint _WIN32_IE = 0x560; 84 | } else version (IE501) { 85 | const uint _WIN32_IE = 0x501; 86 | } else version (IE5) { 87 | const uint _WIN32_IE = 0x500; 88 | } else version (IE401) { 89 | const uint _WIN32_IE = 0x401; 90 | } else version (IE4) { 91 | const uint _WIN32_IE = 0x400; 92 | } else version (IE3) { 93 | const uint _WIN32_IE = 0x300; 94 | } else static if (WINVER >= 0x410) { 95 | const uint _WIN32_IE = 0x400; 96 | } else { 97 | const uint _WIN32_IE = 0; 98 | } 99 | 100 | debug (WindowsUnitTest) { 101 | unittest { 102 | printf("Windows NT version: %03x\n", _WIN32_WINNT); 103 | printf("Windows 9x version: %03x\n", _WIN32_WINDOWS); 104 | printf("IE version: %03x\n", _WIN32_IE); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/winber.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * winber.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW Windows headers * 7 | * by Stewart Gordon * 8 | * * 9 | * Placed into public domain * 10 | \***********************************************************************/ 11 | module win32.winber; 12 | 13 | /* Comment from MinGW 14 | winber.h - Header file for the Windows LDAP Basic Encoding Rules API 15 | 16 | Written by Filip Navara 17 | 18 | References: 19 | The C LDAP Application Program Interface 20 | http://www.watersprings.org/pub/id/draft-ietf-ldapext-ldap-c-api-05.txt 21 | 22 | Lightweight Directory Access Protocol Reference 23 | http://msdn.microsoft.com/library/en-us/netdir/ldap/ldap_reference.asp 24 | 25 | This library is distributed in the hope that it will be useful, 26 | but WITHOUT ANY WARRANTY; without even the implied warranty of 27 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 28 | */ 29 | 30 | import win32.basetsd; 31 | 32 | /* Opaque structure 33 | * http://msdn.microsoft.com/library/en-us/ldap/ldap/berelement.asp 34 | */ 35 | struct BerElement; 36 | 37 | alias int ber_int_t, ber_slen_t; 38 | alias uint ber_uint_t, ber_len_t, ber_tag_t; 39 | 40 | align(4): 41 | struct BerValue { 42 | ber_len_t bv_len; 43 | char* bv_val; 44 | } 45 | alias BerValue LDAP_BERVAL, BERVAL; 46 | alias BerValue* PLDAP_BERVAL, PBERVAL; 47 | 48 | const ber_tag_t 49 | LBER_ERROR = -1, 50 | LBER_DEFAULT = -1, 51 | LBER_USE_DER = 1; 52 | 53 | /* FIXME: In MinGW, these are WINBERAPI == DECLSPEC_IMPORT. Linkage 54 | * attribute? 55 | */ 56 | extern (C) { 57 | BerElement* ber_init(CPtr!(BerValue)); 58 | int ber_printf(BerElement*, CPtr!(char), ...); 59 | int ber_flatten(BerElement*, BerValue**); 60 | ber_tag_t ber_scanf(BerElement*, CPtr!(char), ...); 61 | ber_tag_t ber_peek_tag(BerElement*, ber_len_t*); 62 | ber_tag_t ber_skip_tag(BerElement*, ber_len_t*); 63 | ber_tag_t ber_first_element(BerElement*, ber_len_t*, char**); 64 | ber_tag_t ber_next_element(BerElement*, ber_len_t*, char*); 65 | void ber_bvfree(BerValue*); 66 | void ber_bvecfree(BerValue**); 67 | void ber_free(BerElement*, int); 68 | BerValue* ber_bvdup(BerValue*); 69 | BerElement* ber_alloc_t(int); 70 | } 71 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/windef.d: -------------------------------------------------------------------------------- 1 | 2 | /***********************************************************************\ 3 | * windef.d * 4 | * * 5 | * Windows API header module * 6 | * * 7 | * Translated from MinGW Windows headers * 8 | * by Stewart Gordon * 9 | * * 10 | * Placed into public domain * 11 | \***********************************************************************/ 12 | module win32.windef; 13 | 14 | public import win32.winnt; 15 | private import win32.w32api; 16 | 17 | const size_t MAX_PATH = 260; 18 | 19 | ushort MAKEWORD(ubyte a, ubyte b) 20 | { 21 | return cast(ushort) ((b << 8) | a); 22 | } 23 | 24 | 25 | uint MAKELONG(ushort a, ushort b) 26 | { 27 | return cast(uint) ((b << 16) | a); 28 | } 29 | 30 | 31 | ushort LOWORD(uint l) 32 | { 33 | return cast(ushort) l; 34 | } 35 | 36 | 37 | ushort HIWORD(uint l) 38 | { 39 | return cast(ushort) (l >>> 16); 40 | } 41 | 42 | 43 | ubyte LOBYTE(ushort w) 44 | { 45 | return cast(ubyte) w; 46 | } 47 | 48 | 49 | ubyte HIBYTE(ushort w) 50 | { 51 | return cast(ubyte) (w >>> 8); 52 | } 53 | 54 | 55 | template max(T) { 56 | T max(T a, T b) 57 | { 58 | return a > b ? a : b; 59 | } 60 | } 61 | 62 | template min(T) { 63 | T min(T a, T b) 64 | { 65 | return a < b ? a : b; 66 | } 67 | } 68 | 69 | enum NULL = null; 70 | //~ alias null NULL; 71 | //~ const void *NULL = null; 72 | alias ubyte BYTE; 73 | alias ubyte *PBYTE, LPBYTE; 74 | alias ushort USHORT, WORD, ATOM; 75 | alias ushort*PUSHORT, PWORD, LPWORD; 76 | alias uint ULONG, DWORD, UINT, COLORREF; 77 | alias uint *PULONG, PDWORD, LPDWORD, PUINT, LPUINT; 78 | alias int WINBOOL, BOOL, INT, LONG, HFILE, HRESULT; 79 | alias int*PWINBOOL, LPWINBOOL, PBOOL, LPBOOL, PINT, LPINT, LPLONG; 80 | alias float FLOAT; 81 | alias float*PFLOAT; 82 | alias CPtr!(void) PCVOID, LPCVOID; 83 | 84 | alias UINT_PTR WPARAM; 85 | alias LONG_PTR LPARAM, LRESULT; 86 | 87 | alias HANDLE HGLOBAL, HLOCAL, GLOBALHANDLE, LOCALHANDLE, HGDIOBJ, HACCEL, 88 | HBITMAP, HBRUSH, HCOLORSPACE, HDC, HGLRC, HDESK, HENHMETAFILE, HFONT, 89 | HICON, HINSTANCE, HKEY, HMENU, HMETAFILE, HMODULE, HMONITOR, HPALETTE, HPEN, 90 | HRGN, HRSRC, HSTR, HTASK, HWND, HWINSTA, HKL, HCURSOR; 91 | alias HANDLE*PHKEY; 92 | 93 | static 94 | 95 | if (WINVER >= 0x500) 96 | { 97 | alias HANDLE HTERMINAL, HWINEVENTHOOK; 98 | } 99 | 100 | alias extern (Windows) int function() FARPROC, NEARPROC, PROC; 101 | 102 | struct RECT 103 | { 104 | LONG left; 105 | LONG top; 106 | LONG right; 107 | LONG bottom; 108 | } 109 | alias RECT RECTL; 110 | alias RECT*PRECT, LPRECT, PRECTL, LPRECTL; 111 | alias CPtr!(RECT) LPCRECT, LPCRECTL; 112 | 113 | struct POINT 114 | { 115 | LONG x; 116 | LONG y; 117 | alias x e1; 118 | alias y e2; 119 | } 120 | alias POINT POINTL; 121 | alias POINT*PPOINT, LPPOINT, PPOINTL, LPPOINTL; 122 | 123 | struct SIZE 124 | { 125 | LONG cx; 126 | LONG cy; 127 | } 128 | alias SIZE SIZEL; 129 | alias SIZE*PSIZE, LPSIZE, PSIZEL, LPSIZEL; 130 | 131 | struct POINTS 132 | { 133 | SHORT x; 134 | SHORT y; 135 | } 136 | alias POINTS*PPOINTS, LPPOINTS; 137 | 138 | enum : BOOL { 139 | FALSE = 0, 140 | TRUE = 1 141 | } 142 | -------------------------------------------------------------------------------- /third_party/DWinProgramming/win32/windows.d: -------------------------------------------------------------------------------- 1 | /***********************************************************************\ 2 | * windows.d * 3 | * * 4 | * Windows API header module * 5 | * * 6 | * Translated from MinGW API for MS-Windows 3.10 * 7 | * * 8 | * Placed into public domain * 9 | \***********************************************************************/ 10 | module win32.windows; 11 | 12 | /* 13 | windows.h - main header file for the Win32 API 14 | 15 | Written by Anders Norlander 16 | 17 | This file is part of a free library for the Win32 API. 18 | 19 | This library is distributed in the hope that it will be useful, 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 22 | 23 | */ 24 | 25 | public import win32.w32api; 26 | public import win32.core; 27 | 28 | // We can't use static if for imports, build gets confused. 29 | version (WindowsVista) { 30 | public import win32.winsvc; 31 | } else version (Windows2003) { 32 | public import win32.winsvc; 33 | } else version (WindowsXP) { 34 | public import win32.winsvc; 35 | } else version (WindowsNTonly) { 36 | public import win32.winsvc; 37 | } 38 | 39 | public import win32.cderr; 40 | public import win32.dde; 41 | public import win32.ddeml; 42 | public import win32.dlgs; 43 | public import win32.imm; 44 | public import win32.lzexpand; 45 | public import win32.mmsystem; 46 | public import win32.nb30; 47 | 48 | 49 | 50 | public import win32.rpc; 51 | public import win32.shellapi; 52 | public import win32.winperf; 53 | public import win32.commdlg; 54 | public import win32.winspool; 55 | public import win32.ole2; 56 | 57 | // Select correct version of winsock. Importing the incorrect 58 | // module will cause a static assert to prevent problems later on. 59 | version (Win32_Winsock1) { 60 | public import win32.winsock; 61 | } else { 62 | public import win32.winsock2; 63 | public import win32.ws2tcpip; 64 | } 65 | 66 | /+ 67 | #if (_WIN32_WINNT >= 0x0400) 68 | #include 69 | /* 70 | * MS likes to include mswsock.h here as well, 71 | * but that can cause undefined symbols if 72 | * winsock2.h is included before windows.h 73 | */ 74 | #else 75 | #include 76 | #endif /* (_WIN32_WINNT >= 0x0400) */ 77 | +/ 78 | --------------------------------------------------------------------------------