├── .gitattributes ├── .github └── workflows │ ├── ada.yml │ └── main.yml ├── .gitignore ├── LICENSE.md ├── Makefile ├── README.md ├── TODO.txt ├── _config.yml ├── alire.toml ├── asfml.gpr ├── asfml_opengl.gpr ├── doc ├── blank.html ├── docs │ ├── sf___spec.html │ ├── sf___spec.js │ ├── sf__audio___spec.html │ ├── sf__audio___spec.js │ ├── sf__audio__listener___spec.html │ ├── sf__audio__listener___spec.js │ ├── sf__audio__music___spec.html │ ├── sf__audio__music___spec.js │ ├── sf__audio__sound___spec.html │ ├── sf__audio__sound___spec.js │ ├── sf__audio__soundbuffer___spec.html │ ├── sf__audio__soundbuffer___spec.js │ ├── sf__audio__soundbufferrecorder___spec.html │ ├── sf__audio__soundbufferrecorder___spec.js │ ├── sf__audio__soundrecorder___spec.html │ ├── sf__audio__soundrecorder___spec.js │ ├── sf__audio__soundstatus___spec.html │ ├── sf__audio__soundstatus___spec.js │ ├── sf__audio__soundstream___spec.html │ ├── sf__audio__soundstream___spec.js │ ├── sf__graphics___spec.html │ ├── sf__graphics___spec.js │ ├── sf__graphics__blendmode___spec.html │ ├── sf__graphics__blendmode___spec.js │ ├── sf__graphics__circleshape___spec.html │ ├── sf__graphics__circleshape___spec.js │ ├── sf__graphics__color___spec.html │ ├── sf__graphics__color___spec.js │ ├── sf__graphics__convexshape___spec.html │ ├── sf__graphics__convexshape___spec.js │ ├── sf__graphics__font___spec.html │ ├── sf__graphics__font___spec.js │ ├── sf__graphics__fontinfo___spec.html │ ├── sf__graphics__fontinfo___spec.js │ ├── sf__graphics__glsl___spec.html │ ├── sf__graphics__glsl___spec.js │ ├── sf__graphics__glyph___spec.html │ ├── sf__graphics__glyph___spec.js │ ├── sf__graphics__image___spec.html │ ├── sf__graphics__image___spec.js │ ├── sf__graphics__primitivetype___spec.html │ ├── sf__graphics__primitivetype___spec.js │ ├── sf__graphics__rect___spec.html │ ├── sf__graphics__rect___spec.js │ ├── sf__graphics__rectangleshape___spec.html │ ├── sf__graphics__rectangleshape___spec.js │ ├── sf__graphics__renderstates___spec.html │ ├── sf__graphics__renderstates___spec.js │ ├── sf__graphics__rendertexture___spec.html │ ├── sf__graphics__rendertexture___spec.js │ ├── sf__graphics__renderwindow___mouse___spec.html │ ├── sf__graphics__renderwindow___mouse___spec.js │ ├── sf__graphics__renderwindow___spec.html │ ├── sf__graphics__renderwindow___spec.js │ ├── sf__graphics__renderwindow___touch___spec.html │ ├── sf__graphics__renderwindow___touch___spec.js │ ├── sf__graphics__shader___spec.html │ ├── sf__graphics__shader___spec.js │ ├── sf__graphics__shape___spec.html │ ├── sf__graphics__shape___spec.js │ ├── sf__graphics__sprite___spec.html │ ├── sf__graphics__sprite___spec.js │ ├── sf__graphics__text___spec.html │ ├── sf__graphics__text___spec.js │ ├── sf__graphics__texture___spec.html │ ├── sf__graphics__texture___spec.js │ ├── sf__graphics__transform___spec.html │ ├── sf__graphics__transform___spec.js │ ├── sf__graphics__transformable___spec.html │ ├── sf__graphics__transformable___spec.js │ ├── sf__graphics__vertex___spec.html │ ├── sf__graphics__vertex___spec.js │ ├── sf__graphics__vertexarray___spec.html │ ├── sf__graphics__vertexarray___spec.js │ ├── sf__graphics__vertexbuffer___spec.html │ ├── sf__graphics__vertexbuffer___spec.js │ ├── sf__graphics__view___spec.html │ ├── sf__graphics__view___spec.js │ ├── sf__network___spec.html │ ├── sf__network___spec.js │ ├── sf__network__ftp___directoryresponse___spec.html │ ├── sf__network__ftp___directoryresponse___spec.js │ ├── sf__network__ftp___listingresponse___spec.html │ ├── sf__network__ftp___listingresponse___spec.js │ ├── sf__network__ftp___response___spec.html │ ├── sf__network__ftp___response___spec.js │ ├── sf__network__ftp___spec.html │ ├── sf__network__ftp___spec.js │ ├── sf__network__http___request___spec.html │ ├── sf__network__http___request___spec.js │ ├── sf__network__http___response___spec.html │ ├── sf__network__http___response___spec.js │ ├── sf__network__http___spec.html │ ├── sf__network__http___spec.js │ ├── sf__network__ipaddress___spec.html │ ├── sf__network__ipaddress___spec.js │ ├── sf__network__packet___spec.html │ ├── sf__network__packet___spec.js │ ├── sf__network__socketselector___spec.html │ ├── sf__network__socketselector___spec.js │ ├── sf__network__socketstatus___spec.html │ ├── sf__network__socketstatus___spec.js │ ├── sf__network__tcplistener___spec.html │ ├── sf__network__tcplistener___spec.js │ ├── sf__network__tcpsocket___spec.html │ ├── sf__network__tcpsocket___spec.js │ ├── sf__network__udpsocket___spec.html │ ├── sf__network__udpsocket___spec.js │ ├── sf__system___spec.html │ ├── sf__system___spec.js │ ├── sf__system__buffer___spec.html │ ├── sf__system__buffer___spec.js │ ├── sf__system__clock___spec.html │ ├── sf__system__clock___spec.js │ ├── sf__system__inputstream___spec.html │ ├── sf__system__inputstream___spec.js │ ├── sf__system__mutex___spec.html │ ├── sf__system__mutex___spec.js │ ├── sf__system__sleep___spec.html │ ├── sf__system__sleep___spec.js │ ├── sf__system__thread___spec.html │ ├── sf__system__thread___spec.js │ ├── sf__system__time___spec.html │ ├── sf__system__time___spec.js │ ├── sf__system__vector2___spec.html │ ├── sf__system__vector2___spec.js │ ├── sf__system__vector3___spec.html │ ├── sf__system__vector3___spec.js │ ├── sf__window___spec.html │ ├── sf__window___spec.js │ ├── sf__window__clipboard___spec.html │ ├── sf__window__clipboard___spec.js │ ├── sf__window__context___spec.html │ ├── sf__window__context___spec.js │ ├── sf__window__cursor___spec.html │ ├── sf__window__cursor___spec.js │ ├── sf__window__event___spec.html │ ├── sf__window__event___spec.js │ ├── sf__window__gl___spec.html │ ├── sf__window__gl___spec.js │ ├── sf__window__glu___spec.html │ ├── sf__window__glu___spec.js │ ├── sf__window__joystick___spec.html │ ├── sf__window__joystick___spec.js │ ├── sf__window__joystickidentification___spec.html │ ├── sf__window__joystickidentification___spec.js │ ├── sf__window__keyboard___spec.html │ ├── sf__window__keyboard___spec.js │ ├── sf__window__mouse___spec.html │ ├── sf__window__mouse___spec.js │ ├── sf__window__sensor___spec.html │ ├── sf__window__sensor___spec.js │ ├── sf__window__touch___spec.html │ ├── sf__window__touch___spec.js │ ├── sf__window__videomode___spec.html │ ├── sf__window__videomode___spec.js │ ├── sf__window__vulkan___spec.html │ ├── sf__window__vulkan___spec.js │ ├── sf__window__window___spec.html │ ├── sf__window__window___spec.js │ ├── sf__window__windowbase___spec.html │ ├── sf__window__windowbase___spec.js │ ├── sf__window__windowhandle___spec.html │ └── sf__window__windowhandle___spec.js ├── documentation_index.js ├── entities │ ├── access_types.html │ ├── access_types.js │ ├── objects.html │ ├── objects.js │ ├── packages.html │ ├── packages.js │ ├── record_types.html │ ├── record_types.js │ ├── simple_types.html │ ├── simple_types.js │ ├── subprograms.html │ └── subprograms.js ├── entities_categories_index.js ├── gnatdoc.css ├── gnatdoc.js ├── images │ └── ASFML_Logo.svg ├── index.html ├── index.js ├── inheritance_index.html ├── inheritance_index.js ├── source_file_index.js └── srcs │ ├── sf-audio-listener.ads.html │ ├── sf-audio-listener.ads.js │ ├── sf-audio-music.ads.html │ ├── sf-audio-music.ads.js │ ├── sf-audio-sound.ads.html │ ├── sf-audio-sound.ads.js │ ├── sf-audio-soundbuffer.ads.html │ ├── sf-audio-soundbuffer.ads.js │ ├── sf-audio-soundbufferrecorder.ads.html │ ├── sf-audio-soundbufferrecorder.ads.js │ ├── sf-audio-soundrecorder.ads.html │ ├── sf-audio-soundrecorder.ads.js │ ├── sf-audio-soundstatus.ads.html │ ├── sf-audio-soundstatus.ads.js │ ├── sf-audio-soundstream.ads.html │ ├── sf-audio-soundstream.ads.js │ ├── sf-audio.ads.html │ ├── sf-audio.ads.js │ ├── sf-graphics-blendmode.ads.html │ ├── sf-graphics-blendmode.ads.js │ ├── sf-graphics-circleshape.ads.html │ ├── sf-graphics-circleshape.ads.js │ ├── sf-graphics-color.ads.html │ ├── sf-graphics-color.ads.js │ ├── sf-graphics-convexshape.ads.html │ ├── sf-graphics-convexshape.ads.js │ ├── sf-graphics-font.ads.html │ ├── sf-graphics-font.ads.js │ ├── sf-graphics-fontinfo.ads.html │ ├── sf-graphics-fontinfo.ads.js │ ├── sf-graphics-glsl.ads.html │ ├── sf-graphics-glsl.ads.js │ ├── sf-graphics-glyph.ads.html │ ├── sf-graphics-glyph.ads.js │ ├── sf-graphics-image.ads.html │ ├── sf-graphics-image.ads.js │ ├── sf-graphics-primitivetype.ads.html │ ├── sf-graphics-primitivetype.ads.js │ ├── sf-graphics-rect.ads.html │ ├── sf-graphics-rect.ads.js │ ├── sf-graphics-rectangleshape.ads.html │ ├── sf-graphics-rectangleshape.ads.js │ ├── sf-graphics-renderstates.ads.html │ ├── sf-graphics-renderstates.ads.js │ ├── sf-graphics-rendertexture.ads.html │ ├── sf-graphics-rendertexture.ads.js │ ├── sf-graphics-renderwindow.ads.html │ ├── sf-graphics-renderwindow.ads.js │ ├── sf-graphics-shader.ads.html │ ├── sf-graphics-shader.ads.js │ ├── sf-graphics-shape.ads.html │ ├── sf-graphics-shape.ads.js │ ├── sf-graphics-sprite.ads.html │ ├── sf-graphics-sprite.ads.js │ ├── sf-graphics-text.ads.html │ ├── sf-graphics-text.ads.js │ ├── sf-graphics-texture.ads.html │ ├── sf-graphics-texture.ads.js │ ├── sf-graphics-transform.ads.html │ ├── sf-graphics-transform.ads.js │ ├── sf-graphics-transformable.ads.html │ ├── sf-graphics-transformable.ads.js │ ├── sf-graphics-vertex.ads.html │ ├── sf-graphics-vertex.ads.js │ ├── sf-graphics-vertexarray.ads.html │ ├── sf-graphics-vertexarray.ads.js │ ├── sf-graphics-vertexbuffer.ads.html │ ├── sf-graphics-vertexbuffer.ads.js │ ├── sf-graphics-view.ads.html │ ├── sf-graphics-view.ads.js │ ├── sf-graphics.ads.html │ ├── sf-graphics.ads.js │ ├── sf-network-ftp.ads.html │ ├── sf-network-ftp.ads.js │ ├── sf-network-http.ads.html │ ├── sf-network-http.ads.js │ ├── sf-network-ipaddress.ads.html │ ├── sf-network-ipaddress.ads.js │ ├── sf-network-packet.ads.html │ ├── sf-network-packet.ads.js │ ├── sf-network-socketselector.ads.html │ ├── sf-network-socketselector.ads.js │ ├── sf-network-socketstatus.ads.html │ ├── sf-network-socketstatus.ads.js │ ├── sf-network-tcplistener.ads.html │ ├── sf-network-tcplistener.ads.js │ ├── sf-network-tcpsocket.ads.html │ ├── sf-network-tcpsocket.ads.js │ ├── sf-network-udpsocket.ads.html │ ├── sf-network-udpsocket.ads.js │ ├── sf-network.ads.html │ ├── sf-network.ads.js │ ├── sf-system-buffer.ads.html │ ├── sf-system-buffer.ads.js │ ├── sf-system-clock.ads.html │ ├── sf-system-clock.ads.js │ ├── sf-system-inputstream.ads.html │ ├── sf-system-inputstream.ads.js │ ├── sf-system-mutex.ads.html │ ├── sf-system-mutex.ads.js │ ├── sf-system-sleep.ads.html │ ├── sf-system-sleep.ads.js │ ├── sf-system-thread.ads.html │ ├── sf-system-thread.ads.js │ ├── sf-system-time.ads.html │ ├── sf-system-time.ads.js │ ├── sf-system-vector2.ads.html │ ├── sf-system-vector2.ads.js │ ├── sf-system-vector3.ads.html │ ├── sf-system-vector3.ads.js │ ├── sf-system.ads.html │ ├── sf-system.ads.js │ ├── sf-window-clipboard.ads.html │ ├── sf-window-clipboard.ads.js │ ├── sf-window-context.ads.html │ ├── sf-window-context.ads.js │ ├── sf-window-cursor.ads.html │ ├── sf-window-cursor.ads.js │ ├── sf-window-event.ads.html │ ├── sf-window-event.ads.js │ ├── sf-window-gl.ads.html │ ├── sf-window-gl.ads.js │ ├── sf-window-glu.ads.html │ ├── sf-window-glu.ads.js │ ├── sf-window-joystick.ads.html │ ├── sf-window-joystick.ads.js │ ├── sf-window-joystickidentification.ads.html │ ├── sf-window-joystickidentification.ads.js │ ├── sf-window-keyboard.ads.html │ ├── sf-window-keyboard.ads.js │ ├── sf-window-mouse.ads.html │ ├── sf-window-mouse.ads.js │ ├── sf-window-sensor.ads.html │ ├── sf-window-sensor.ads.js │ ├── sf-window-touch.ads.html │ ├── sf-window-touch.ads.js │ ├── sf-window-videomode.ads.html │ ├── sf-window-videomode.ads.js │ ├── sf-window-vulkan.ads.html │ ├── sf-window-vulkan.ads.js │ ├── sf-window-window.ads.html │ ├── sf-window-window.ads.js │ ├── sf-window-windowbase.ads.html │ ├── sf-window-windowbase.ads.js │ ├── sf-window-windowhandle.ads.html │ ├── sf-window-windowhandle.ads.js │ ├── sf-window.ads.html │ ├── sf-window.ads.js │ ├── sf.ads.html │ └── sf.ads.js ├── images ├── ASFML_Logo-inkscape.svg ├── ASFML_Logo.png ├── ASFML_Logo.svg └── sfml-icon.png ├── include ├── generated │ ├── .gitignore │ ├── Makefile │ ├── check.sh │ ├── constants.txt │ ├── gen.sh │ └── postprocess.awk ├── sf-audio-listener.ads ├── sf-audio-music.adb ├── sf-audio-music.ads ├── sf-audio-sound.ads ├── sf-audio-soundbuffer.adb ├── sf-audio-soundbuffer.ads ├── sf-audio-soundbufferrecorder.adb ├── sf-audio-soundbufferrecorder.ads ├── sf-audio-soundrecorder.adb ├── sf-audio-soundrecorder.ads ├── sf-audio-soundstatus.ads ├── sf-audio-soundstream.ads ├── sf-audio.ads ├── sf-graphics-blendmode.ads ├── sf-graphics-circleshape.ads ├── sf-graphics-color.ads ├── sf-graphics-convexshape.ads ├── sf-graphics-font.adb ├── sf-graphics-font.ads ├── sf-graphics-fontinfo.ads ├── sf-graphics-glsl.ads ├── sf-graphics-glyph.ads ├── sf-graphics-image.adb ├── sf-graphics-image.ads ├── sf-graphics-primitivetype.ads ├── sf-graphics-rect.ads ├── sf-graphics-rectangleshape.ads ├── sf-graphics-renderstates.ads ├── sf-graphics-rendertexture.ads ├── sf-graphics-renderwindow.adb ├── sf-graphics-renderwindow.ads ├── sf-graphics-shader.adb ├── sf-graphics-shader.ads ├── sf-graphics-shape.ads ├── sf-graphics-sprite.ads ├── sf-graphics-text.adb ├── sf-graphics-text.ads ├── sf-graphics-texture.adb ├── sf-graphics-texture.ads ├── sf-graphics-transform.ads ├── sf-graphics-transformable.ads ├── sf-graphics-vertex.ads ├── sf-graphics-vertexarray.ads ├── sf-graphics-vertexbuffer.ads ├── sf-graphics-view.ads ├── sf-graphics.ads ├── sf-network-ftp.adb ├── sf-network-ftp.ads ├── sf-network-http.adb ├── sf-network-http.ads ├── sf-network-ipaddress.adb ├── sf-network-ipaddress.ads ├── sf-network-packet.adb ├── sf-network-packet.ads ├── sf-network-socketselector.ads ├── sf-network-socketstatus.ads ├── sf-network-tcplistener.ads ├── sf-network-tcpsocket.ads ├── sf-network-udpsocket.ads ├── sf-network.ads ├── sf-system-buffer.ads ├── sf-system-clock.ads ├── sf-system-inputstream.ads ├── sf-system-mutex.ads ├── sf-system-sleep.adb ├── sf-system-sleep.ads ├── sf-system-thread.ads ├── sf-system-time.ads ├── sf-system-vector2.ads ├── sf-system-vector3.ads ├── sf-system.ads ├── sf-window-clipboard.adb ├── sf-window-clipboard.ads ├── sf-window-context.adb ├── sf-window-context.ads ├── sf-window-cursor.ads ├── sf-window-event.ads ├── sf-window-gl.ads ├── sf-window-glu.ads ├── sf-window-joystick.ads ├── sf-window-joystickidentification.ads ├── sf-window-keyboard.adb ├── sf-window-keyboard.ads ├── sf-window-mouse.ads ├── sf-window-sensor.ads ├── sf-window-touch.ads ├── sf-window-videomode.ads ├── sf-window-vulkan.adb ├── sf-window-vulkan.ads ├── sf-window-window.adb ├── sf-window-window.ads ├── sf-window-windowbase.adb ├── sf-window-windowbase.ads ├── sf-window-windowhandle.ads ├── sf-window.ads └── sf.ads ├── tests ├── .gitignore ├── Makefile ├── clock │ ├── Makefile │ ├── main.adb │ └── main.gpr ├── doodle_pop.ogg ├── example │ ├── Makefile │ ├── main.adb │ └── main.gpr ├── ftp │ ├── Makefile │ ├── main.adb │ └── main.gpr ├── graphics │ ├── Makefile │ ├── main.adb │ └── main.gpr ├── music │ ├── Makefile │ ├── main.adb │ └── main.gpr ├── opengl │ ├── Makefile │ ├── main.adb │ ├── main.adb.stdout │ └── main.gpr ├── pong │ ├── Makefile │ ├── README.md │ ├── ping_pong_8bit_beeep.ogg │ ├── pong.adb │ └── pong.gpr ├── renderwindow │ ├── DejaVuSans.ttf │ ├── Makefile │ ├── aerial.ttf │ ├── icon64x64.png │ ├── logo.png │ ├── main.adb │ ├── main.gpr │ └── unicode.adb ├── sound │ ├── Makefile │ ├── main.adb │ └── main.gpr ├── thread │ ├── Makefile │ ├── main.adb │ ├── main.gpr │ ├── thread_func.adb │ └── thread_func.ads ├── tuffy.ttf ├── vulkan │ ├── Makefile │ ├── main.adb │ └── main.gpr └── window │ ├── Makefile │ ├── main.adb │ ├── main.gpr │ └── unicode.adb └── tools ├── gnatdoc_html └── static │ ├── gnatdoc.css │ └── images │ └── ASFML_Logo.svg └── sfml-doc-tags.py /.gitattributes: -------------------------------------------------------------------------------- 1 | # GNAT Project files 2 | *.gpr linguist-language=Ada 3 | -------------------------------------------------------------------------------- /.github/workflows/ada.yml: -------------------------------------------------------------------------------- 1 | name: Ada (GNAT) 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | build: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v2 17 | 18 | - name: Set up GNAT toolchain and dependencies 19 | run: > 20 | sudo apt-get update && 21 | sudo apt-get install gnat gprbuild libcsfml-dev libglu1-mesa-dev 22 | 23 | - name: Build 24 | run: gprbuild -j0 -p asfml.gpr 25 | 26 | - name: Build tests 27 | run: > 28 | make -k -C tests 29 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | # Build using Alire. 2 | name: Build 3 | 4 | on: 5 | push: 6 | branches: [ master ] 7 | pull_request: 8 | branches: [ master ] 9 | 10 | jobs: 11 | build: 12 | name: CI on ${{ matrix.os }} 13 | 14 | runs-on: ${{ matrix.os }} 15 | 16 | strategy: 17 | matrix: 18 | os: [windows-latest, ubuntu-latest, macos-latest] 19 | 20 | steps: 21 | - name: Checkout 22 | uses: actions/checkout@v2 23 | - name: alire-project/setup-alire 24 | uses: alire-project/setup-alire@v2 25 | - name: Update apt 26 | if: runner.os == 'Linux' 27 | run: sudo apt-get update 28 | - name: Update 29 | run: alr index --update-all 30 | - name: Build 31 | run: alr --non-interactive build 32 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.tmp 2 | obj 3 | *~ 4 | *.o 5 | *.a 6 | *.so 7 | *.so.[0-9] 8 | *.so.[0-9].[0-9] 9 | *.so.[0-9].[0-9].[0-9] 10 | *.ali 11 | *.stderr 12 | *.stdout 13 | *.bexch 14 | .#* 15 | alire/ 16 | config/ 17 | lib/ 18 | alire.lock 19 | main -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | # ASFML 2 | 3 | ASFML, the Ada binding for SFML, is distributed under the same license as CSFML. 4 | 5 | # CSFML 6 | 7 | CSFML - Copyright (C) 2007-2023 Laurent Gomila - laurent@sfml-dev.org 8 | 9 | This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. 10 | 11 | Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 12 | 13 | 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 14 | 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 15 | 3. This notice may not be removed or altered from any source distribution. 16 | 17 | ## External libraries used by CSFML 18 | 19 | * _SFML_ is under the zlib/png license 20 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY : all build tests doc clean 2 | 3 | all: build tests doc 4 | 5 | build: 6 | gprbuild -j0 -P asfml.gpr 7 | 8 | tests: 9 | $(MAKE) -C tests 10 | 11 | doc: 12 | gnatdoc -P asfml.gpr 13 | 14 | clean: 15 | gprclean -P asfml.gpr 16 | -------------------------------------------------------------------------------- /TODO.txt: -------------------------------------------------------------------------------- 1 | See open issues in 2 | https://github.com/mgrojo/ASFML/issues 3 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-cayman -------------------------------------------------------------------------------- /alire.toml: -------------------------------------------------------------------------------- 1 | name = "asfml" 2 | description = "Ada binding to SFML, the Simple and Fast Multimedia Library" 3 | version = "2.6.2-dev" 4 | long-description = """ 5 | [![ASFML logo](https://raw.githubusercontent.com/mgrojo/ASFML/master/images/ASFML_Logo.svg)](https://www.sfml-dev.org) 6 | ![Ada (GNAT)](https://github.com/mgrojo/ASFML/workflows/Ada%20(GNAT)/badge.svg) 7 | [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/ada-lang/Lobby) 8 | [![Mentioned in Awesome Ada](https://awesome.re/mentioned-badge.svg)](https://github.com/ohenley/awesome-ada) 9 | 10 | ASFML is an Ada semi-thick binding to the 11 | [SFML](https://www.sfml-dev.org/) library. It uses Ada types and 12 | portable defined types which eliminates the inclusion of Ada interface 13 | libraries, but most of the functions are directly imported. 14 | 15 | # Documentation 16 | Generated API documentation can be consulted [online](https://mgrojo.github.io/ASFML/doc/). 17 | 18 | The Ada API follows the [CSFML](https://26.customprotocol.com/csfml/index.htm) interface, but 19 | with some changes and additions for ease of use. 20 | 21 | Applicability of the [SFML documentation](https://www.sfml-dev.org/learn.php) is usually straightforward. 22 | 23 | """ 24 | 25 | authors = ["Manuel Gomez", "Dan Lee Vazquez Garcia"] 26 | maintainers = ["Manuel Gomez "] 27 | maintainers-logins = ["mgrojo"] 28 | 29 | licenses = "custom-zlib-acknowledgement" 30 | website = "https://mgrojo.github.io/ASFML/" 31 | tags = ["audio", "games", "opengl", "cross-platform", "multimedia", "binding", "graphics", "sfml"] 32 | 33 | [[depends-on]] 34 | libcsfml = "^2.6.1" 35 | -------------------------------------------------------------------------------- /asfml_opengl.gpr: -------------------------------------------------------------------------------- 1 | 2 | library project ASFML_OpenGL is 3 | 4 | type T_OS is ("Windows_NT", "Linux"); 5 | V_OS : T_OS := external ("OS", "Linux"); 6 | 7 | for Languages use ("Ada"); 8 | 9 | for Create_Missing_Dirs use "True"; 10 | 11 | for Source_Dirs use ("include"); 12 | for Object_Dir use "obj"; 13 | 14 | for Library_Name use "asfml"; 15 | 16 | for Library_Dir use "lib"; 17 | for Library_ALI_Dir use "lib"; 18 | for Library_Kind use "static"; 19 | 20 | package Linker is 21 | case V_OS is 22 | when "Windows_NT" => 23 | for Linker_Options use 24 | ("-LD:\Libraries\CSFML-2.5\lib\gcc", 25 | "-lcsfml-system", "-lcsfml-audio", "-lcsfml-network", "-lcsfml-audio", 26 | "-lcsfml-graphics", "-lcsfml-window", 27 | "-LD:\Libraries\OpenGL32\lib", "-lopengl32", "-lglu32", "-lasfml"); 28 | when others => 29 | for Linker_Options use 30 | ( 31 | -- Add this if you need to provide your own compiled version of SFML/CSFML 32 | -- "-L../../SFML/SFML/lib", "-L../../SFML/CSFML/lib", 33 | -- "-lsfml-system", "-lsfml-audio", "-lsfml-network", 34 | -- "-lsfml-audio", "-lsfml-graphics", "-lsfml-window", 35 | -- End 36 | "-lcsfml-system", "-lcsfml-audio", "-lcsfml-network", "-lcsfml-audio", 37 | "-lcsfml-graphics", "-lcsfml-window", "-lOpenGL", "-lGLU", "-lasfml"); 38 | end case; 39 | end Linker; 40 | 41 | end ASFML_OpenGL; 42 | -------------------------------------------------------------------------------- /doc/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /doc/docs/sf___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__audio___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__audio__listener___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__audio__music___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__audio__sound___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__audio__soundbuffer___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__audio__soundbufferrecorder___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__audio__soundrecorder___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__audio__soundstatus___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__audio__soundstream___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__blendmode___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__circleshape___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__color___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__convexshape___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__font___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__fontinfo___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__glsl___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__glyph___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__image___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__primitivetype___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__rect___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__rectangleshape___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__renderstates___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__rendertexture___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__renderwindow___mouse___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__renderwindow___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__renderwindow___touch___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__shader___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__shape___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__sprite___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__text___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__texture___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__transform___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__transformable___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__vertex___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__vertexarray___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__vertexbuffer___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__graphics__view___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__network___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__network__ftp___directoryresponse___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__network__ftp___listingresponse___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__network__ftp___response___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__network__ftp___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__network__http___request___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__network__http___response___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__network__http___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__network__ipaddress___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__network__packet___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__network__socketselector___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__network__socketstatus___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__network__tcplistener___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__network__tcpsocket___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__network__udpsocket___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__system___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__system__buffer___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__system__clock___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__system__inputstream___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__system__mutex___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__system__sleep___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__system__thread___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__system__time___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__system__vector2___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__system__vector3___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__clipboard___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__context___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__cursor___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__event___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__gl___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__glu___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__joystick___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__joystickidentification___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__keyboard___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__mouse___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__sensor___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__touch___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__videomode___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__vulkan___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__window___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__windowbase___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/docs/sf__window__windowhandle___spec.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/entities/access_types.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/entities/objects.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/entities/packages.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/entities/packages.js: -------------------------------------------------------------------------------- 1 | GNATdoc.EntitiesCategory = { 2 | "label": "Packages", 3 | "entities": [ 4 | { 5 | "label": "DirectoryResponse", 6 | "docHref": "docs/sf__network__ftp___directoryresponse___spec.html#L174C12", 7 | "declared": "Sf.Network.Ftp", 8 | "declared_qualifier": "(nested)", 9 | "srcHref": "srcs/sf-network-ftp.ads.html#L174" 10 | }, 11 | { 12 | "label": "ListingResponse", 13 | "docHref": "docs/sf__network__ftp___listingresponse___spec.html#L102C12", 14 | "declared": "Sf.Network.Ftp", 15 | "declared_qualifier": "(nested)", 16 | "srcHref": "srcs/sf-network-ftp.ads.html#L102" 17 | }, 18 | { 19 | "label": "Mouse", 20 | "docHref": "docs/sf__graphics__renderwindow___mouse___spec.html#L639C12", 21 | "declared": "Sf.Graphics.RenderWindow", 22 | "declared_qualifier": "(nested)", 23 | "srcHref": "srcs/sf-graphics-renderwindow.ads.html#L639" 24 | }, 25 | { 26 | "label": "Request", 27 | "docHref": "docs/sf__network__http___request___spec.html#L76C12", 28 | "declared": "Sf.Network.Http", 29 | "declared_qualifier": "(nested)", 30 | "srcHref": "srcs/sf-network-http.ads.html#L76" 31 | }, 32 | { 33 | "label": "Response", 34 | "docHref": "docs/sf__network__ftp___response___spec.html#L235C12", 35 | "declared": "Sf.Network.Ftp", 36 | "declared_qualifier": "(nested)", 37 | "srcHref": "srcs/sf-network-ftp.ads.html#L235" 38 | }, 39 | { 40 | "label": "Response", 41 | "docHref": "docs/sf__network__http___response___spec.html#L178C12", 42 | "declared": "Sf.Network.Http", 43 | "declared_qualifier": "(nested)", 44 | "srcHref": "srcs/sf-network-http.ads.html#L178" 45 | }, 46 | { 47 | "label": "Touch", 48 | "docHref": "docs/sf__graphics__renderwindow___touch___spec.html#L674C12", 49 | "declared": "Sf.Graphics.RenderWindow", 50 | "declared_qualifier": "(nested)", 51 | "srcHref": "srcs/sf-graphics-renderwindow.ads.html#L674" 52 | } 53 | ] 54 | }; -------------------------------------------------------------------------------- /doc/entities/record_types.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/entities/simple_types.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/entities/subprograms.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/entities_categories_index.js: -------------------------------------------------------------------------------- 1 | GNATdoc.EntitiesCategoriesIndex = [ 2 | { 3 | "label": "Constants & Variables", 4 | "href": "entities/objects.html" 5 | }, 6 | { 7 | "label": "Simple Types", 8 | "href": "entities/simple_types.html" 9 | }, 10 | { 11 | "label": "Access Types", 12 | "href": "entities/access_types.html" 13 | }, 14 | { 15 | "label": "Record Types", 16 | "href": "entities/record_types.html" 17 | }, 18 | { 19 | "label": "Subprograms", 20 | "href": "entities/subprograms.html" 21 | }, 22 | { 23 | "label": "Packages", 24 | "href": "entities/packages.html" 25 | } 26 | ]; -------------------------------------------------------------------------------- /doc/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 26 | 29 | 30 | 31 |
17 |

18 |

Date:

19 |
20 |
21 |
22 |
23 |
24 |
25 |
27 | 28 |
32 | 33 | 34 | -------------------------------------------------------------------------------- /doc/index.js: -------------------------------------------------------------------------------- 1 | GNATdoc.Index = { 2 | "project": "ASFML", 3 | "timestamp": "2024-09-04 18:25:32" 4 | }; -------------------------------------------------------------------------------- /doc/inheritance_index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /doc/inheritance_index.js: -------------------------------------------------------------------------------- 1 | GNATdoc.InheritanceIndex = [ 2 | ]; -------------------------------------------------------------------------------- /doc/srcs/sf-audio-listener.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-audio-music.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-audio-sound.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-audio-soundbuffer.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-audio-soundbufferrecorder.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-audio-soundrecorder.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-audio-soundstatus.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-audio-soundstream.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-audio.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-blendmode.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-circleshape.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-color.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-convexshape.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-font.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-fontinfo.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-glsl.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-glyph.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-image.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-primitivetype.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-rect.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-rectangleshape.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-renderstates.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-rendertexture.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-renderwindow.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-shader.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-shape.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-sprite.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-text.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-texture.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-transform.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-transformable.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-vertex.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-vertexarray.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-vertexbuffer.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics-view.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-graphics.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-network-ftp.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-network-http.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-network-ipaddress.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-network-packet.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-network-socketselector.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-network-socketstatus.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-network-tcplistener.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-network-tcpsocket.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-network-udpsocket.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-network.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-system-buffer.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-system-clock.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-system-inputstream.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-system-mutex.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-system-sleep.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-system-thread.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-system-time.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-system-vector2.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-system-vector3.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-system.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-clipboard.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-context.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-cursor.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-event.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-gl.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-glu.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-joystick.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-joystickidentification.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-keyboard.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-mouse.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-sensor.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-touch.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-videomode.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-vulkan.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-window.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-windowbase.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window-windowhandle.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf-window.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /doc/srcs/sf.ads.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 |
12 | 13 | -------------------------------------------------------------------------------- /images/ASFML_Logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgrojo/ASFML/412f22195c153e1eab9777f11ce14f123197dc8f/images/ASFML_Logo.png -------------------------------------------------------------------------------- /images/sfml-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgrojo/ASFML/412f22195c153e1eab9777f11ce14f123197dc8f/images/sfml-icon.png -------------------------------------------------------------------------------- /include/generated/.gitignore: -------------------------------------------------------------------------------- 1 | # We generate code here which is draft and temporary 2 | *.ads 3 | *.adb 4 | -------------------------------------------------------------------------------- /include/generated/Makefile: -------------------------------------------------------------------------------- 1 | CSFML_PREFIX=$(HOME)/src/github/SFML/CSFML 2 | 3 | .PHONY: all check generate 4 | 5 | all: check generate 6 | 7 | generate: 8 | ./gen.sh $(CSFML_PREFIX) 9 | 10 | check: 11 | ./check.sh $(CSFML_PREFIX) 12 | -------------------------------------------------------------------------------- /include/generated/check.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Author: Manuel Gomez 3 | # Description: Checks completeness and correctness of the imported interface. 4 | # Platform: Ubuntu Linux 22.04 LTS 5 | 6 | set -o nounset 7 | 8 | CSFML_PREFIX=$1 9 | 10 | awk '/with Import, Convention => C, External_Name =>/ {print $8} 11 | /^ *External_Name =>/ {print $3} 12 | /pragma *Import.*sf[A-Z].*/ {print $5} 13 | /sf.* : constant sfColor/ {print $1}' ../*.ad[sb] | sed 's/.*"\(.*\)".*/\1/' | \ 14 | sort -u > imports.txt 15 | 16 | nm -D ${CSFML_PREFIX}/lib/libcsfml-*.so | grep -wo 'sf.*' | \ 17 | sort -u > exports.txt 18 | 19 | diff -U 0 exports.txt imports.txt 20 | -------------------------------------------------------------------------------- /include/generated/gen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Author: Manuel Gomez 3 | # Description: Helper for generating most of the binding. 4 | # Manual adjustments must be done afterwards. 5 | # Platform: Ubuntu Linux 18.04 LTS 6 | # Ubuntu Linux 20.01 LTS (install gnat-7 for the generation) 7 | # Dependencies: CSFML development packages 8 | # Usage: pass headers to generate from, like: ./gen.sh /usr/include/SFML/*/*.h 9 | 10 | set -o nounset 11 | set -o errexit 12 | 13 | function PackageTofile 14 | { 15 | tr '[:upper:]' '[:lower:]' | sed 's/\./-/g; s/$/.ads/' 16 | } 17 | 18 | CSFML_PREFIX=$1 19 | 20 | for file in ${CSFML_PREFIX}/include/CSFML/*/*.h 21 | do 22 | PARENT_DIRNAME=$(dirname $(dirname $file)) 23 | GRANDPARENT_DIRNAME=$(dirname $PARENT_DIRNAME) 24 | PARENT=$(dirname $file | sed "s%${PARENT_DIRNAME}%Sf%g; s%/%.%g;") 25 | JUST_PARENT=$(basename $(dirname $file)) 26 | PACKAGE=$(echo $file | sed "s%${GRANDPARENT_DIRNAME}/%%g; s%[/\.]%_%g;") 27 | FILE=$(echo $PARENT-$PACKAGE | PackageTofile) 28 | 29 | NEW_PACKAGE=$(basename $file .h) 30 | NEW_FILE=$(echo $PARENT.$NEW_PACKAGE | PackageTofile) 31 | 32 | gnatgcc -c -I${CSFML_PREFIX}/include -fdump-ada-spec-slim -fada-spec-parent=$PARENT -C $file 33 | 34 | awk -f postprocess.awk $FILE > $NEW_FILE 35 | rm $FILE 36 | sed -i "s/${PARENT}\.SFML_\([A-Za-z][A-Za-z0-9]*\)_h/Sf.\1/g; 37 | s/${PARENT}\.SFML_\([A-Za-z][A-Za-z0-9]*\)_\([A-Za-z][A-Za-z0-9]*\)_h/Sf.\1.\2/g; 38 | s/SFML_${JUST_PARENT}_\([A-Za-z][A-Za-z0-9_]*\)_h/\1/g; 39 | s/data : System\.Address/data : Standard.System.Address/g; 40 | s/\([A-Za-z]\)\([A-Za-z0-9]*\) : System\.Address/\1\2 : sf\u\1\2_Ptr/g; 41 | s/return System\.Address/return sf${NEW_PACKAGE}_Ptr/g; 42 | s%-- ${CSFML_PREFIX}/%-- %g; 43 | s/Sf\.Config\.//g; 44 | s/\\\\/@/g " $NEW_FILE 45 | 46 | emacs -batch $NEW_FILE \ 47 | --eval '(load "~/.emacs")' \ 48 | -f mark-whole-buffer \ 49 | -f indent-for-tab-command \ 50 | -f delete-trailing-whitespace \ 51 | -f save-buffer \ 52 | -f save-buffers-kill-emacs || \ 53 | echo "$0: warning: $FILE could not be formatted by Emacs" >&2 54 | echo $NEW_FILE 55 | 56 | done 57 | -------------------------------------------------------------------------------- /include/sf-audio-music.adb: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- // 3 | -- // SFML - Simple and Fast Multimedia Library 4 | -- // Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com) 5 | -- // 6 | -- // This software is provided 'as-is', without any express or implied 7 | -- // warranty. 8 | -- // In no event will the authors be held liable for any damages arising from 9 | -- // the use of this software. 10 | -- // 11 | -- // Permission is granted to anyone to use this software for any purpose, 12 | -- // including commercial applications, and to alter it and redistribute it 13 | -- // freely, 14 | -- // subject to the following restrictions: 15 | -- // 16 | -- // 1. The origin of this software must not be misrepresented; 17 | -- // you must not claim that you wrote the original software. 18 | -- // If you use this software in a product, an acknowledgment 19 | -- // in the product documentation would be appreciated but is not required. 20 | -- // 21 | -- // 2. Altered source versions must be plainly marked as such, 22 | -- // and must not be misrepresented as being the original software. 23 | -- // 24 | -- // 3. This notice may not be removed or altered from any source 25 | -- // distribution. 26 | -- // 27 | --////////////////////////////////////////////////////////// 28 | 29 | --////////////////////////////////////////////////////////// 30 | 31 | --////////////////////////////////////////////////////////// 32 | with Interfaces.C.Strings; 33 | 34 | package body Sf.Audio.Music is 35 | use Interfaces.C.Strings; 36 | 37 | --////////////////////////////////////////////////////////// 38 | --/ Create a new music and load it from a file 39 | --/ 40 | --/ @param Filename Path of the music file to open 41 | --/ 42 | --/ @return A new sfMusic object (NULL if failed) 43 | --/ 44 | --////////////////////////////////////////////////////////// 45 | function CreateFromFile (Filename : String) return sfMusic_Ptr is 46 | function Internal (Filename : chars_ptr) return sfMusic_Ptr; 47 | pragma Import (C, Internal, "sfMusic_createFromFile"); 48 | Temp : chars_ptr := New_String (Filename); 49 | R : constant sfMusic_Ptr := Internal (Temp); 50 | begin 51 | Free (Temp); 52 | return R; 53 | end CreateFromFile; 54 | 55 | end Sf.Audio.Music; 56 | -------------------------------------------------------------------------------- /include/sf-audio-soundbuffer.adb: -------------------------------------------------------------------------------- 1 | with Interfaces.C.Strings; 2 | 3 | package body Sf.Audio.SoundBuffer is 4 | use Interfaces.C.Strings; 5 | 6 | --////////////////////////////////////////////////////////// 7 | --/ Create a new sound buffer and load it from a file 8 | --/ 9 | --/ @param Filename Path of the music file to open 10 | --/ 11 | --/ @return A new sfSoundBuffer object (NULL if failed) 12 | --/ 13 | --////////////////////////////////////////////////////////// 14 | function CreateFromFile (Filename : String) return sfSoundBuffer_Ptr is 15 | function Internal (Filename : chars_ptr) return sfSoundBuffer_Ptr; 16 | pragma Import (C, Internal, "sfSoundBuffer_createFromFile"); 17 | Temp : chars_ptr := New_String (Filename); 18 | R : constant sfSoundBuffer_Ptr := Internal (Temp); 19 | begin 20 | Free (Temp); 21 | return R; 22 | end CreateFromFile; 23 | 24 | --////////////////////////////////////////////////////////// 25 | --/ Save a sound buffer to a file 26 | --/ 27 | --/ @param SoundBuffer Sound buffer to save 28 | --/ @param Filename Path of the sound file to write 29 | --/ 30 | --/ @return sfTrue if saving has been successful 31 | --/ 32 | --////////////////////////////////////////////////////////// 33 | function SaveToFile (SoundBuffer : sfSoundBuffer_Ptr; Filename : String) return sfBool is 34 | function Internal (SoundBuffer : sfSoundBuffer_Ptr; Filename : chars_ptr) return sfBool; 35 | pragma Import (C, Internal, "sfSoundBuffer_saveToFile"); 36 | Temp : chars_ptr := New_String (Filename); 37 | R : constant sfBool := Internal (SoundBuffer, Temp); 38 | begin 39 | Free (Temp); 40 | return R; 41 | end SaveToFile; 42 | 43 | end Sf.Audio.SoundBuffer; 44 | -------------------------------------------------------------------------------- /include/sf-audio-soundbufferrecorder.adb: -------------------------------------------------------------------------------- 1 | with Interfaces.C.Strings; use Interfaces.C; 2 | 3 | package body Sf.Audio.SoundBufferRecorder is 4 | 5 | --////////////////////////////////////////////////////////// 6 | --/ @brief Set the audio capture device 7 | --/ 8 | --/ This function sets the audio capture device to the device 9 | --/ with the given name. It can be called on the fly (i.e: 10 | --/ while recording). If you do so while recording and 11 | --/ opening the device fails, it stops the recording. 12 | --/ 13 | --/ @param soundRecorder Sound recorder object 14 | --/ @param name The name of the audio capture device 15 | --/ 16 | --/ @return sfTrue, if it was able to set the requested device 17 | --/ 18 | --////////////////////////////////////////////////////////// 19 | function setDevice 20 | (soundBufferRecorder : sfSoundBufferRecorder_Ptr; name : String) 21 | return sfBool is 22 | 23 | function Internal 24 | (soundBufferRecorder : sfSoundBufferRecorder_Ptr; name : Interfaces.C.Strings.chars_ptr) 25 | return sfBool; 26 | pragma Import (C, Internal, "sfSoundBufferRecorder_setDevice"); 27 | 28 | Temp : Interfaces.C.Strings.chars_ptr := Interfaces.C.Strings.New_String (name); 29 | Result : constant sfBool := Internal (soundBufferRecorder, Temp); 30 | begin 31 | Interfaces.C.Strings.Free (Temp); 32 | return Result; 33 | end setDevice; 34 | 35 | --////////////////////////////////////////////////////////// 36 | --/ @brief Get the name of the current audio capture device 37 | --/ 38 | --/ @param soundBufferRecorder Sound recorder object 39 | --/ 40 | --/ @return The name of the current audio capture device 41 | --/ 42 | --////////////////////////////////////////////////////////// 43 | function getDevice (soundBufferRecorder : sfSoundBufferRecorder_Ptr) return String is 44 | function Internal (soundBufferRecorder : sfSoundBufferRecorder_Ptr) return Interfaces.C.Strings.chars_ptr; 45 | pragma Import (C, Internal, "sfSoundBufferRecorder_getDevice"); 46 | begin 47 | 48 | return Interfaces.C.Strings.Value (Internal (soundBufferRecorder)); 49 | end getDevice; 50 | 51 | end Sf.Audio.SoundBufferRecorder; 52 | -------------------------------------------------------------------------------- /include/sf-audio-soundstatus.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | package Sf.Audio.SoundStatus is 19 | 20 | type sfSoundStatus is ( 21 | sfStopped, --/< Sound / music is not playing 22 | sfPaused, --/< Sound / music is paused 23 | sfPlaying --/< Sound / music is playing 24 | ); 25 | 26 | private 27 | 28 | pragma Convention (C, sfSoundStatus); 29 | 30 | end Sf.Audio.SoundStatus; 31 | -------------------------------------------------------------------------------- /include/sf-audio.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- // 3 | -- // SFML - Simple and Fast Multimedia Library 4 | -- // Copyright (C) 2007-2023 Laurent Gomila (laurent.gom@gmail.com) 5 | -- // 6 | -- // This software is provided 'as-is', without any express or implied warranty. 7 | -- // In no event will the authors be held liable for any damages arising from the use of this software. 8 | -- // 9 | -- // Permission is granted to anyone to use this software for any purpose, 10 | -- // including commercial applications, and to alter it and redistribute it freely, 11 | -- // subject to the following restrictions: 12 | -- // 13 | -- // 1. The origin of this software must not be misrepresented; 14 | -- // you must not claim that you wrote the original software. 15 | -- // If you use this software in a product, an acknowledgment 16 | -- // in the product documentation would be appreciated but is not required. 17 | -- // 18 | -- // 2. Altered source versions must be plainly marked as such, 19 | -- // and must not be misrepresented as being the original software. 20 | -- // 21 | -- // 3. This notice may not be removed or altered from any source distribution. 22 | -- // 23 | --////////////////////////////////////////////////////////// 24 | 25 | --/ @summary 26 | --/ Audio module 27 | --/ 28 | --/ @description 29 | --/ Sounds, streaming (musics or custom sources), recording, 30 | --/ spatialization. 31 | --/ 32 | package Sf.Audio is 33 | 34 | type sfMusic is null record; 35 | type sfMusic_Ptr is access all sfMusic; 36 | type sfSound is null record; 37 | type sfSound_Ptr is access all sfSound; 38 | type sfSoundBuffer is null record; 39 | type sfSoundBuffer_Ptr is access all sfSoundBuffer; 40 | type sfSoundBufferRecorder is null record; 41 | type sfSoundBufferRecorder_Ptr is access all sfSoundBufferRecorder; 42 | type sfSoundRecorder is null record; 43 | type sfSoundRecorder_Ptr is access all sfSoundRecorder; 44 | type sfSoundStream is null record; 45 | type sfSoundStream_Ptr is access all sfSoundStream; 46 | 47 | private 48 | 49 | pragma Convention (C, sfMusic); 50 | pragma Convention (C, sfMusic_Ptr); 51 | pragma Convention (C, sfSound); 52 | pragma Convention (C, sfSound_Ptr); 53 | pragma Convention (C, sfSoundBuffer); 54 | pragma Convention (C, sfSoundBuffer_Ptr); 55 | pragma Convention (C, sfSoundBufferRecorder); 56 | pragma Convention (C, sfSoundBufferRecorder_Ptr); 57 | pragma Convention (C, sfSoundRecorder); 58 | pragma Convention (C, sfSoundRecorder_Ptr); 59 | pragma Convention (C, sfSoundStream); 60 | pragma Convention (C, sfSoundStream_Ptr); 61 | 62 | end Sf.Audio; 63 | -------------------------------------------------------------------------------- /include/sf-graphics-font.adb: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- // 3 | -- // SFML - Simple and Fast Multimedia Library 4 | -- // Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com) 5 | -- // 6 | -- // This software is provided 'as-is', without any express or implied warranty. 7 | -- // In no event will the authors be held liable for any damages arising from the use of this software. 8 | -- // 9 | -- // Permission is granted to anyone to use this software for any purpose, 10 | -- // including commercial applications, and to alter it and redistribute it freely, 11 | -- // subject to the following restrictions: 12 | -- // 13 | -- // 1. The origin of this software must not be misrepresented; 14 | -- // you must not claim that you wrote the original software. 15 | -- // If you use this software in a product, an acknowledgment 16 | -- // in the product documentation would be appreciated but is not required. 17 | -- // 18 | -- // 2. Altered source versions must be plainly marked as such, 19 | -- // and must not be misrepresented as being the original software. 20 | -- // 21 | -- // 3. This notice may not be removed or altered from any source distribution. 22 | -- // 23 | --////////////////////////////////////////////////////////// 24 | 25 | --////////////////////////////////////////////////////////// 26 | 27 | --////////////////////////////////////////////////////////// 28 | with Interfaces.C.Strings; 29 | 30 | package body Sf.Graphics.Font is 31 | use Interfaces.C.Strings; 32 | 33 | --////////////////////////////////////////////////////////// 34 | --/ @brief Create a new font from a file 35 | --/ 36 | --/ @param Filename Path of the font file to load 37 | --/ 38 | --/ @return A new sfFont object, or NULL if it failed 39 | --/ 40 | --////////////////////////////////////////////////////////// 41 | function CreateFromFile 42 | (Filename : String) return sfFont_Ptr 43 | is 44 | function Internal 45 | (Filename : chars_ptr) 46 | return sfFont_Ptr; 47 | pragma Import (C, Internal, "sfFont_createFromFile"); 48 | Temp : chars_ptr := New_String (Filename); 49 | R : constant sfFont_Ptr := Internal (Temp); 50 | begin 51 | Free (Temp); 52 | return R; 53 | end CreateFromFile; 54 | 55 | end Sf.Graphics.Font; 56 | -------------------------------------------------------------------------------- /include/sf-graphics-fontinfo.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | --////////////////////////////////////////////////////////// 19 | 20 | 21 | with Interfaces.C.Strings; 22 | 23 | package Sf.Graphics.FontInfo is 24 | 25 | --////////////////////////////////////////////////////////// 26 | --////////////////////////////////////////////////////////// 27 | --/ sfFontInfo holds various information about a font 28 | --////////////////////////////////////////////////////////// 29 | type sfFontInfo is record 30 | family : Interfaces.C.Strings.chars_ptr; 31 | end record; 32 | pragma Convention (C_Pass_By_Copy, sfFontInfo); 33 | 34 | end Sf.Graphics.FontInfo; 35 | -------------------------------------------------------------------------------- /include/sf-graphics-glyph.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | --////////////////////////////////////////////////////////// 19 | 20 | with Sf.Graphics.Rect; 21 | 22 | package Sf.Graphics.Glyph is 23 | 24 | --////////////////////////////////////////////////////////// 25 | --////////////////////////////////////////////////////////// 26 | --////////////////////////////////////////////////////////// 27 | 28 | --////////////////////////////////////////////////////////// 29 | --////////////////////////////////////////////////////////// 30 | --/ @brief sfGlyph describes a glyph (a visual character) 31 | --/ 32 | --////////////////////////////////////////////////////////// 33 | type sfGlyph is record 34 | advance : aliased float; --/< Offset to move horizontically to the next character 35 | bounds : aliased Sf.Graphics.Rect.sfFloatRect; --/< Bounding rectangle of the glyph, in coordinates relative to the baseline 36 | textureRect : aliased Sf.Graphics.Rect.sfIntRect; --/< Texture coordinates of the glyph inside the font's image 37 | end record; 38 | pragma Convention (C_Pass_By_Copy, sfGlyph); 39 | 40 | private 41 | 42 | 43 | 44 | end Sf.Graphics.Glyph; 45 | -------------------------------------------------------------------------------- /include/sf-graphics-primitivetype.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | 19 | package Sf.Graphics.PrimitiveType is 20 | 21 | --////////////////////////////////////////////////////////// 22 | --/ @brief Types of primitives that a sf::VertexArray can render 23 | --/ 24 | --/ Points and lines have no area, therefore their thickness 25 | --/ will always be 1 pixel, regardless the current transform 26 | --/ and view. 27 | --/ 28 | --////////////////////////////////////////////////////////// 29 | subtype sfPrimitiveType is sfUint32; 30 | sfPoints : constant sfPrimitiveType := 0; --/< List of individual points 31 | sfLines : constant sfPrimitiveType := 1; --/< List of individual lines 32 | sfLineStrip : constant sfPrimitiveType := 2; --/< List of connected lines, a point uses the previous point to form a line 33 | sfTriangles : constant sfPrimitiveType := 3; --/< List of individual triangles 34 | sfTriangleStrip : constant sfPrimitiveType := 4; --/< List of connected triangles, a point uses the two previous points to form a triangle 35 | sfTriangleFan : constant sfPrimitiveType := 5; --/< List of connected triangles, a point uses the common center and the previous point to form a triangle 36 | sfQuads : constant sfPrimitiveType := 6; --/< List of individual quads 37 | sfLinesStrip : constant sfPrimitiveType := 2; --/< @deprecated Use sfLineStrip instead 38 | sfTrianglesStrip : constant sfPrimitiveType := 4; --/< @deprecated Use sfTriangleStrip instead 39 | sfTrianglesFan : constant sfPrimitiveType := 5; --/< @deprecated Use sfTriangleFan instead 40 | 41 | end Sf.Graphics.PrimitiveType; 42 | -------------------------------------------------------------------------------- /include/sf-graphics-renderstates.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | --////////////////////////////////////////////////////////// 19 | 20 | with Sf.Graphics.BlendMode; 21 | with Sf.Graphics.Transform; 22 | 23 | package Sf.Graphics.RenderStates is 24 | 25 | --////////////////////////////////////////////////////////// 26 | --/ @brief Define the states used for drawing to a RenderTarget 27 | --/ 28 | --////////////////////////////////////////////////////////// 29 | type sfRenderStates is record 30 | blendMode : aliased Sf.Graphics.BlendMode.sfBlendMode := Sf.Graphics.BlendMode.sfBlendAlpha; 31 | --/< Blending mode 32 | transform : aliased Sf.Graphics.Transform.sfTransform := Sf.Graphics.Transform.Identity; 33 | --/< Transform 34 | texture : sfTexture_Ptr := null; 35 | --/< Texture 36 | shader : sfShader_Ptr := null; 37 | --/< Shader 38 | end record; 39 | type sfRenderStates_Ptr is access all sfRenderStates; 40 | 41 | 42 | --////////////////////////////////////////////////////////// 43 | --/ @brief Construct a set of render states with all its attributes. 44 | --/ 45 | --/ If you want to use a single specific render state, 46 | --/ for example a shader, you can call create with only one of the parameters, 47 | --/ and then pass the result to the draw subprogram. 48 | --/ 49 | --/ @param blendMode Blend mode to use 50 | --/ @param transform Transform to use 51 | --/ @param texture Texture to use 52 | --/ @param shader Shader to use 53 | --/ 54 | --////////////////////////////////////////////////////////// 55 | function create 56 | (blendMode : Sf.Graphics.BlendMode.sfBlendMode := Sf.Graphics.BlendMode.sfBlendAlpha; 57 | transform : Sf.Graphics.Transform.sfTransform := Sf.Graphics.Transform.Identity; 58 | texture : sfTexture_Ptr := null; 59 | shader : sfShader_Ptr := null) return sfRenderStates 60 | is (blendMode => blendMode, 61 | transform => transform, 62 | texture => texture, 63 | shader => shader); 64 | 65 | --////////////////////////////////////////////////////////// 66 | --/ @brief Define the default values for a RenderState 67 | --/ 68 | --////////////////////////////////////////////////////////// 69 | function default return sfRenderStates; 70 | 71 | private 72 | pragma Convention (C_Pass_By_Copy, sfRenderStates); 73 | pragma Convention (C, sfRenderStates_Ptr); 74 | 75 | pragma Import (C, default, "sfRenderStates_default"); 76 | 77 | end Sf.Graphics.RenderStates; 78 | -------------------------------------------------------------------------------- /include/sf-graphics-texture.adb: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- // 3 | -- // SFML - Simple and Fast Multimedia Library 4 | -- // Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com) 5 | -- // 6 | -- // This software is provided 'as-is', without any express or implied warranty. 7 | -- // In no event will the authors be held liable for any damages arising from the use of this software. 8 | -- // 9 | -- // Permission is granted to anyone to use this software for any purpose, 10 | -- // including commercial applications, and to alter it and redistribute it freely, 11 | -- // subject to the following restrictions: 12 | -- // 13 | -- // 1. The origin of this software must not be misrepresented; 14 | -- // you must not claim that you wrote the original software. 15 | -- // If you use this software in a product, an acknowledgment 16 | -- // in the product documentation would be appreciated but is not required. 17 | -- // 18 | -- // 2. Altered source versions must be plainly marked as such, 19 | -- // and must not be misrepresented as being the original software. 20 | -- // 21 | -- // 3. This notice may not be removed or altered from any source distribution. 22 | -- // 23 | --////////////////////////////////////////////////////////// 24 | 25 | --////////////////////////////////////////////////////////// 26 | 27 | --////////////////////////////////////////////////////////// 28 | with Interfaces.C.Strings; 29 | 30 | package body Sf.Graphics.Texture is 31 | use Interfaces.C.Strings; 32 | 33 | --////////////////////////////////////////////////////////// 34 | --/ Create a new image from a file 35 | --/ 36 | --/ @param Filename Path of the image file to load 37 | --/ 38 | --/ @return A new sfTexture object, or NULL if it failed 39 | --/ 40 | --////////////////////////////////////////////////////////// 41 | function createFromFile 42 | (filename : String; 43 | area : access constant Sf.Graphics.Rect.sfIntRect := Sf.Graphics.Rect.sfNullRectangle'Access) return sfTexture_Ptr is 44 | function Internal (filename : Interfaces.C.Strings.chars_ptr; 45 | Area : access constant Sf.Graphics.Rect.sfIntRect) return sfTexture_Ptr; 46 | pragma Import (C, Internal, "sfTexture_createFromFile"); 47 | Temp : chars_ptr := New_String (Filename); 48 | R : constant sfTexture_Ptr := Internal (Temp, Area); 49 | begin 50 | Free (Temp); 51 | return R; 52 | end createFromFile; 53 | 54 | function createSrgbFromFile (filename : String; 55 | area : access constant Sf.Graphics.Rect.sfIntRect := 56 | Sf.Graphics.Rect.sfNullRectangle'Access) 57 | return sfTexture_Ptr is 58 | function Internal (filename : Interfaces.C.Strings.chars_ptr; 59 | area : access constant Sf.Graphics.Rect.sfIntRect) return sfTexture_Ptr; 60 | pragma Import (C, Internal, "sfTexture_createSrgbFromFile"); 61 | Temp : chars_ptr := New_String (filename); 62 | R : constant sfTexture_Ptr := Internal (Temp, area); 63 | begin 64 | Free (Temp); 65 | return R; 66 | end createSrgbFromFile; 67 | 68 | end Sf.Graphics.Texture; 69 | -------------------------------------------------------------------------------- /include/sf-graphics-vertex.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | with Sf.System.Vector2; 19 | with Sf.Graphics.Color; 20 | 21 | package Sf.Graphics.Vertex is 22 | 23 | --////////////////////////////////////////////////////////// 24 | --/ Define a point with color and texture coordinates 25 | --////////////////////////////////////////////////////////// 26 | --/ @field position Position of the vertex 27 | --/ @field color Color of the vertex 28 | --/ @field texCoords Coordinates of the texture's pixel to map to the vertex 29 | type sfVertex is record 30 | position : aliased Sf.System.Vector2.sfVector2f; 31 | color : aliased Sf.Graphics.Color.sfColor; 32 | texCoords : aliased Sf.System.Vector2.sfVector2f; 33 | end record; 34 | 35 | private 36 | 37 | pragma Convention (C_Pass_By_Copy, sfVertex); 38 | 39 | end Sf.Graphics.Vertex; 40 | -------------------------------------------------------------------------------- /include/sf-network-ipaddress.adb: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- // 3 | -- // SFML - Simple and Fast Multimedia Library 4 | -- // Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com) 5 | -- // 6 | -- // This software is provided 'as-is', without any express or implied warranty. 7 | -- // In no event will the authors be held liable for any damages arising from the use of this software. 8 | -- // 9 | -- // Permission is granted to anyone to use this software for any purpose, 10 | -- // including commercial applications, and to alter it and redistribute it freely, 11 | -- // subject to the following restrictions: 12 | -- // 13 | -- // 1. The origin of this software must not be misrepresented; 14 | -- // you must not claim that you wrote the original software. 15 | -- // If you use this software in a product, an acknowledgment 16 | -- // in the product documentation would be appreciated but is not required. 17 | -- // 18 | -- // 2. Altered source versions must be plainly marked as such, 19 | -- // and must not be misrepresented as being the original software. 20 | -- // 21 | -- // 3. This notice may not be removed or altered from any source distribution. 22 | -- // 23 | --////////////////////////////////////////////////////////// 24 | 25 | --////////////////////////////////////////////////////////// 26 | 27 | --////////////////////////////////////////////////////////// 28 | with Interfaces.C.Strings; 29 | 30 | package body Sf.Network.IpAddress is 31 | use Interfaces.C.Strings; 32 | 33 | --////////////////////////////////////////////////////////// 34 | --/ Construct an address from a string 35 | --/ 36 | --/ @param String IP address ("xxx.xxx.xxx.xxx") or network name 37 | --/ 38 | --/ @return Resulting address 39 | --/ 40 | --////////////////////////////////////////////////////////// 41 | function FromString (str : String) return sfIpAddress is 42 | function Internal (Str : chars_ptr) return sfIpAddress; 43 | pragma Import (C, Internal, "sfIpAddress_fromString"); 44 | Temp : chars_ptr := New_String (Str); 45 | R : constant sfIpAddress := Internal (Temp); 46 | begin 47 | Free (Temp); 48 | return R; 49 | end FromString; 50 | 51 | --////////////////////////////////////////////////////////// 52 | --/ Get a string representation of an address 53 | --/ 54 | --/ @param Address Address to convert 55 | --/ @param String Char array to fill (size must be >= 16) 56 | --/ 57 | --////////////////////////////////////////////////////////// 58 | procedure ToString (Address : sfIpAddress; Str : out String) is 59 | procedure Internal (Address : sfIpAddress; Str : chars_ptr); 60 | pragma Import (C, Internal, "sfIpAddress_toString"); 61 | Temp : chars_ptr; 62 | begin 63 | Internal (Address, Temp); 64 | Str (Str'FIRST .. Str'FIRST + 16) := Value (Temp) (0 .. 15); 65 | end ToString; 66 | 67 | end Sf.Network.IpAddress; 68 | -------------------------------------------------------------------------------- /include/sf-network-packet.adb: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- // 3 | -- // SFML - Simple and Fast Multimedia Library 4 | -- // Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com) 5 | -- // 6 | -- // This software is provided 'as-is', without any express or implied warranty. 7 | -- // In no event will the authors be held liable for any damages arising from the use of this software. 8 | -- // 9 | -- // Permission is granted to anyone to use this software for any purpose, 10 | -- // including commercial applications, and to alter it and redistribute it freely, 11 | -- // subject to the following restrictions: 12 | -- // 13 | -- // 1. The origin of this software must not be misrepresented; 14 | -- // you must not claim that you wrote the original software. 15 | -- // If you use this software in a product, an acknowledgment 16 | -- // in the product documentation would be appreciated but is not required. 17 | -- // 18 | -- // 2. Altered source versions must be plainly marked as such, 19 | -- // and must not be misrepresented as being the original software. 20 | -- // 21 | -- // 3. This notice may not be removed or altered from any source distribution. 22 | -- // 23 | --////////////////////////////////////////////////////////// 24 | 25 | --////////////////////////////////////////////////////////// 26 | 27 | --////////////////////////////////////////////////////////// 28 | with Interfaces.C.Strings; 29 | 30 | package body Sf.Network.Packet is 31 | use Interfaces.C.Strings; 32 | 33 | --////////////////////////////////////////////////////////// 34 | --/ Functions to extract data from a packet 35 | --/ 36 | --/ @param Packet Packet to read 37 | --/ 38 | --////////////////////////////////////////////////////////// 39 | procedure ReadString (packet : sfPacket_Ptr; Str : out String) is 40 | procedure Internal (packet : sfPacket_Ptr; Str : chars_ptr); 41 | pragma Import (C, Internal, "sfPacket_readString"); 42 | Temp : chars_ptr; 43 | begin 44 | Internal (packet, Temp); 45 | Str := Value (Temp) (Str'RANGE); 46 | Free (Temp); 47 | end ReadString; 48 | 49 | --////////////////////////////////////////////////////////// 50 | --/ Functions to insert data into a packet 51 | --/ 52 | --/ @param Packet Packet to write 53 | --/ 54 | --////////////////////////////////////////////////////////// 55 | procedure WriteString (packet : sfPacket_Ptr; item : String) is 56 | procedure Internal (packet : sfPacket_Ptr; Str : chars_ptr); 57 | pragma Import (C, Internal, "sfPacket_writeString"); 58 | Temp : chars_ptr := New_String (item); 59 | begin 60 | Internal (Packet, Temp); 61 | Free (Temp); 62 | end WriteString; 63 | 64 | procedure writeWideString (packet : sfPacket_Ptr; 65 | item : Wide_Wide_String) is 66 | procedure Internal (packet : sfPacket_Ptr; Str : C.char32_array); 67 | pragma Import (C, Internal, "sfPacket_writeWideString"); 68 | begin 69 | Internal (Packet, C.To_C (item)); 70 | end writeWideString; 71 | 72 | end Sf.Network.Packet; 73 | -------------------------------------------------------------------------------- /include/sf-network-socketstatus.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | --////////////////////////////////////////////////////////// 19 | 20 | 21 | package Sf.Network.SocketStatus is 22 | 23 | --////////////////////////////////////////////////////////// 24 | --////////////////////////////////////////////////////////// 25 | --////////////////////////////////////////////////////////// 26 | --/ @brief Define the status that can be returned by the socket functions 27 | --/ 28 | --////////////////////////////////////////////////////////// 29 | type sfSocketStatus is 30 | (sfSocketDone, --/< The socket has sent / received the data 31 | sfSocketNotReady, --/< The socket is not ready to send / receive data yet 32 | sfSocketPartial, --/< The socket sent a part of the data 33 | sfSocketDisconnected,--/< The TCP socket has been disconnected 34 | sfSocketError --/< An unexpected error happened 35 | ); 36 | 37 | private 38 | 39 | pragma Convention (C, sfSocketStatus); 40 | 41 | end Sf.Network.SocketStatus; 42 | -------------------------------------------------------------------------------- /include/sf-system-buffer.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | 19 | package Sf.System.Buffer is 20 | 21 | --////////////////////////////////////////////////////////// 22 | --////////////////////////////////////////////////////////// 23 | --////////////////////////////////////////////////////////// 24 | 25 | --////////////////////////////////////////////////////////// 26 | --////////////////////////////////////////////////////////// 27 | --/ @brief Create an empty buffer 28 | --/ 29 | --/ @return A new sfBuffer object, or NULL if it failed 30 | --/ 31 | --////////////////////////////////////////////////////////// 32 | function create return sfBuffer_Ptr; 33 | 34 | --////////////////////////////////////////////////////////// 35 | --/ @brief Destroy an existing buffer 36 | --/ 37 | --/ @param buffer Buffer to delete 38 | --/ 39 | --////////////////////////////////////////////////////////// 40 | procedure destroy (buffer : sfBuffer_Ptr); 41 | 42 | --////////////////////////////////////////////////////////// 43 | --/ @brief Return the size of a buffer 44 | --/ 45 | --/ @param buffer Buffer object 46 | --/ 47 | --/ @return Size in bytes 48 | --/ 49 | --////////////////////////////////////////////////////////// 50 | function getSize (buffer : in sfBuffer_Ptr) return sfSize_t; 51 | 52 | --////////////////////////////////////////////////////////// 53 | --/ @brief Get a read-only pointer to the array of bytes of a buffer 54 | --/ 55 | --/ @param buffer Buffer object 56 | --/ 57 | --/ @return Read-only pointer to the array of bytes 58 | --/ 59 | --////////////////////////////////////////////////////////// 60 | function getData (buffer : in sfBuffer_Ptr) return access sfUint8; 61 | 62 | private 63 | 64 | pragma Import (C, create, "sfBuffer_create"); 65 | pragma Import (C, destroy, "sfBuffer_destroy"); 66 | pragma Import (C, getSize, "sfBuffer_getSize"); 67 | pragma Import (C, getData, "sfBuffer_getData"); 68 | 69 | end Sf.System.Buffer; 70 | -------------------------------------------------------------------------------- /include/sf-system-inputstream.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | --////////////////////////////////////////////////////////// 19 | 20 | with System; 21 | 22 | package Sf.System.InputStream is 23 | 24 | --////////////////////////////////////////////////////////// 25 | --////////////////////////////////////////////////////////// 26 | --////////////////////////////////////////////////////////// 27 | 28 | --////////////////////////////////////////////////////////// 29 | type sfInputStreamReadFunc is access function 30 | (data : Standard.System.Address; 31 | size : sfInt64; 32 | userData : Standard.System.Address) return sfInt64; 33 | 34 | type sfInputStreamSeekFunc is access function (position : sfInt64; 35 | userData : Standard.System.Address) return sfInt64; 36 | 37 | type sfInputStreamTellFunc is access function (userData : Standard.System.Address) return sfInt64; 38 | 39 | type sfInputStreamGetSizeFunc is access function (userData : Standard.System.Address) return sfInt64; 40 | 41 | --////////////////////////////////////////////////////////// 42 | --/ @brief Set of callbacks that allow users to define custom file streams 43 | --/ 44 | --////////////////////////////////////////////////////////// 45 | type sfInputStream is record 46 | read : sfInputStreamReadFunc; --/< Function to read data from the stream 47 | seek : sfInputStreamSeekFunc; --/< Function to set the current read position 48 | tell : sfInputStreamTellFunc; --/< Function to get the current read position 49 | getSize : sfInputStreamGetSizeFunc;--/< Function to get the total number of bytes in the stream 50 | userData : Standard.System.Address; --/< User data that will be passed to the callbacks 51 | end record; 52 | 53 | private 54 | 55 | pragma Convention (C, sfInputStreamGetSizeFunc); 56 | pragma Convention (C, sfInputStreamTellFunc); 57 | pragma Convention (C, sfInputStreamSeekFunc); 58 | pragma Convention (C, sfInputStreamReadFunc); 59 | 60 | pragma Convention (C_Pass_By_Copy, sfInputStream); 61 | 62 | end Sf.System.InputStream; 63 | -------------------------------------------------------------------------------- /include/sf-system-mutex.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | --////////////////////////////////////////////////////////// 19 | 20 | 21 | package Sf.System.Mutex is 22 | 23 | --////////////////////////////////////////////////////////// 24 | --////////////////////////////////////////////////////////// 25 | --////////////////////////////////////////////////////////// 26 | 27 | --////////////////////////////////////////////////////////// 28 | --////////////////////////////////////////////////////////// 29 | --/ @brief Create a new mutex 30 | --/ 31 | --/ @return A new sfMutex object 32 | --/ 33 | --////////////////////////////////////////////////////////// 34 | function create return sfMutex_Ptr; 35 | 36 | --////////////////////////////////////////////////////////// 37 | --/ @brief Destroy a mutex 38 | --/ 39 | --/ @param mutex Mutex to destroy 40 | --/ 41 | --////////////////////////////////////////////////////////// 42 | procedure destroy (mutex : sfMutex_Ptr); 43 | 44 | --////////////////////////////////////////////////////////// 45 | --/ @brief Lock a mutex 46 | --/ 47 | --/ @param mutex Mutex object 48 | --/ 49 | --////////////////////////////////////////////////////////// 50 | procedure lock (mutex : sfMutex_Ptr); 51 | 52 | --////////////////////////////////////////////////////////// 53 | --/ @brief Unlock a mutex 54 | --/ 55 | --/ @param mutex Mutex object 56 | --/ 57 | --////////////////////////////////////////////////////////// 58 | procedure unlock (mutex : sfMutex_Ptr); 59 | 60 | private 61 | 62 | pragma Import (C, create, "sfMutex_create"); 63 | pragma Import (C, destroy, "sfMutex_destroy"); 64 | pragma Import (C, lock, "sfMutex_lock"); 65 | pragma Import (C, unlock, "sfMutex_unlock"); 66 | 67 | 68 | end Sf.System.Mutex; 69 | -------------------------------------------------------------------------------- /include/sf-system-sleep.adb: -------------------------------------------------------------------------------- 1 | 2 | package body Sf.System.Sleep is 3 | 4 | procedure sfDelay (Seconds : Duration) is 5 | begin 6 | sfSleep (Duration => Time.sfSeconds (Float (Seconds))); 7 | end sfDelay; 8 | 9 | end Sf.System.Sleep; 10 | -------------------------------------------------------------------------------- /include/sf-system-sleep.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | --////////////////////////////////////////////////////////// 19 | 20 | with Sf.System.Time; 21 | 22 | package Sf.System.Sleep is 23 | 24 | --////////////////////////////////////////////////////////// 25 | --////////////////////////////////////////////////////////// 26 | --////////////////////////////////////////////////////////// 27 | 28 | --////////////////////////////////////////////////////////// 29 | --////////////////////////////////////////////////////////// 30 | --/ @brief Make the current thread sleep for a given duration 31 | --/ 32 | --/ sfSleep is the best way to block a program or one of its 33 | --/ threads, as it doesn't consume any CPU power. 34 | --/ 35 | --/ @param duration Time to sleep 36 | --/ 37 | --////////////////////////////////////////////////////////// 38 | procedure sfSleep (duration : Sf.System.Time.sfTime); 39 | 40 | --////////////////////////////////////////////////////////// 41 | --/ @brief Make the current thread sleep for a given time 42 | --/ 43 | --/ @param seconds Time to sleep, in seconds (Ada duration) 44 | --/ 45 | --////////////////////////////////////////////////////////// 46 | procedure sfDelay (seconds : Duration); 47 | 48 | private 49 | 50 | pragma Import (C, sfSleep, "sfSleep"); 51 | 52 | 53 | end Sf.System.Sleep; 54 | -------------------------------------------------------------------------------- /include/sf-system-vector2.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | 19 | package Sf.System.Vector2 is 20 | 21 | --////////////////////////////////////////////////////////// 22 | --/ @brief 2-component vector of integers 23 | --/ 24 | --////////////////////////////////////////////////////////// 25 | type sfVector2i is record 26 | x : aliased sfInt32; 27 | y : aliased sfInt32; 28 | end record; 29 | 30 | --////////////////////////////////////////////////////////// 31 | --/ @brief 2-component vector of unsigned integers 32 | --/ 33 | --////////////////////////////////////////////////////////// 34 | type sfVector2u is record 35 | x : aliased sfUint32; 36 | y : aliased sfUint32; 37 | end record; 38 | 39 | --////////////////////////////////////////////////////////// 40 | --/ @brief 2-component vector of floats 41 | --/ 42 | --////////////////////////////////////////////////////////// 43 | type sfVector2f is record 44 | x : aliased Float; 45 | y : aliased Float; 46 | end record; 47 | 48 | private 49 | 50 | pragma Convention (C_Pass_By_Copy, sfVector2i); 51 | pragma Convention (C_Pass_By_Copy, sfVector2u); 52 | pragma Convention (C_Pass_By_Copy, sfVector2f); 53 | 54 | end Sf.System.Vector2; 55 | -------------------------------------------------------------------------------- /include/sf-system-vector3.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | --////////////////////////////////////////////////////////// 19 | 20 | 21 | package Sf.System.Vector3 is 22 | 23 | --////////////////////////////////////////////////////////// 24 | --////////////////////////////////////////////////////////// 25 | --////////////////////////////////////////////////////////// 26 | 27 | --////////////////////////////////////////////////////////// 28 | --////////////////////////////////////////////////////////// 29 | --/ @brief 3-component vector of floats 30 | --/ 31 | --////////////////////////////////////////////////////////// 32 | type sfVector3f is record 33 | x : aliased float; 34 | y : aliased float; 35 | z : aliased float; 36 | end record; 37 | pragma Convention (C_Pass_By_Copy, sfVector3f); 38 | 39 | end Sf.System.Vector3; 40 | -------------------------------------------------------------------------------- /include/sf-system.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | --////////////////////////////////////////////////////////// 19 | 20 | --/ @summary 21 | --/ System module 22 | --/ 23 | --/ @description 24 | --/ Base module of SFML, defining various utilities. It provides 25 | --/ vector classes, Unicode strings and conversion functions, 26 | --/ threads and mutexes, timing classes. 27 | --/ 28 | package Sf.System is 29 | 30 | type sfBuffer is null record; 31 | type sfBuffer_Ptr is access all sfBuffer; 32 | type sfClock is null record; 33 | type sfClock_Ptr is access all sfClock; 34 | type sfMutex is null record; 35 | type sfMutex_Ptr is access all sfMutex; 36 | type sfThread is null record; 37 | type sfThread_Ptr is access all sfThread; 38 | 39 | private 40 | 41 | pragma Convention (C, sfBuffer); 42 | pragma Convention (C, sfBuffer_Ptr); 43 | pragma Convention (C, sfClock); 44 | pragma Convention (C, sfClock_Ptr); 45 | pragma Convention (C, sfMutex); 46 | pragma Convention (C, sfMutex_Ptr); 47 | pragma Convention (C, sfThread); 48 | pragma Convention (C, sfThread_Ptr); 49 | 50 | end Sf.System; 51 | -------------------------------------------------------------------------------- /include/sf-window-clipboard.adb: -------------------------------------------------------------------------------- 1 | with Interfaces.C.Strings; 2 | 3 | package body Sf.Window.Clipboard is 4 | use Interfaces.C.Strings; 5 | 6 | function getString return String 7 | is 8 | function Internal 9 | return chars_ptr; 10 | pragma Import (C, Internal, "sfClipboard_getString"); 11 | Result : constant chars_ptr := Internal; 12 | begin 13 | return Value(Result); 14 | end getString; 15 | 16 | procedure setString (text : String) is 17 | procedure Internal (text : Interfaces.C.char_array); 18 | pragma Import (C, Internal, "sfClipboard_setString"); 19 | begin 20 | Internal (C.To_C(text)); 21 | end setString; 22 | 23 | function sfClipboard_getUnicodeString 24 | return access C.char32_t; 25 | pragma Import (C, sfClipboard_getUnicodeString, "sfClipboard_getUnicodeString"); 26 | 27 | function getUnicodeString return Wide_Wide_String 28 | is 29 | begin 30 | return C.To_Ada (Char32_Ptrs.Value (sfClipboard_getUnicodeString)); 31 | end getUnicodeString; 32 | 33 | procedure setUnicodeString (text : Wide_Wide_String) is 34 | procedure Internal (text : Interfaces.C.char32_array); 35 | pragma Import (C, Internal, "sfClipboard_setUnicodeString"); 36 | begin 37 | Internal (Interfaces.C.To_C (text)); 38 | end setUnicodeString; 39 | 40 | end Sf.Window.Clipboard; 41 | -------------------------------------------------------------------------------- /include/sf-window-clipboard.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | --////////////////////////////////////////////////////////// 19 | 20 | 21 | package Sf.Window.Clipboard is 22 | 23 | --////////////////////////////////////////////////////////// 24 | --////////////////////////////////////////////////////////// 25 | --////////////////////////////////////////////////////////// 26 | 27 | --////////////////////////////////////////////////////////// 28 | --////////////////////////////////////////////////////////// 29 | --/ @brief Get the content of the clipboard as string data (returns an ANSI string) 30 | --/ 31 | --/ This function returns the content of the clipboard 32 | --/ as a string. If the clipboard does not contain string 33 | --/ it returns an empty string. 34 | --/ 35 | --/ @return Clipboard contents as a locale-dependent ANSI string 36 | --/ 37 | --////////////////////////////////////////////////////////// 38 | function getString return String; 39 | 40 | --////////////////////////////////////////////////////////// 41 | --/ @brief Get the content of the clipboard as string data (returns a Unicode string) 42 | --/ 43 | --/ This function returns the content of the clipboard 44 | --/ as a string. If the clipboard does not contain string 45 | --/ it returns an empty string. 46 | --/ 47 | --/ @return Clipboard contents as UTF-32 48 | --/ 49 | --////////////////////////////////////////////////////////// 50 | function getUnicodeString return Wide_Wide_String; 51 | 52 | --////////////////////////////////////////////////////////// 53 | --/ @brief Set the content of the clipboard as ANSI string data 54 | --/ 55 | --/ This function sets the content of the clipboard as an 56 | --/ ANSI string. 57 | --/ 58 | --/ @param text ANSI string containing the data to be sent 59 | --/ to the clipboard 60 | --/ 61 | --////////////////////////////////////////////////////////// 62 | procedure setString (text : String); 63 | 64 | --////////////////////////////////////////////////////////// 65 | --/ @brief Set the content of the clipboard as Unicode string data 66 | --/ 67 | --/ This function sets the content of the clipboard as a 68 | --/ Unicode string. 69 | --/ 70 | --/ @param text Unicode string containing the data to be sent 71 | --/ to the clipboard 72 | --/ 73 | --////////////////////////////////////////////////////////// 74 | procedure setUnicodeString (text : Wide_Wide_String); 75 | 76 | end Sf.Window.Clipboard; 77 | -------------------------------------------------------------------------------- /include/sf-window-context.adb: -------------------------------------------------------------------------------- 1 | with Interfaces.C.Strings; use Interfaces.C.Strings; 2 | 3 | package body Sf.Window.Context is 4 | 5 | 6 | 7 | --////////////////////////////////////////////////////////// 8 | --/ @brief Check whether a given OpenGL extension is available. 9 | --/ 10 | --/ @param Name of the extension to check for 11 | --/ 12 | --/ @return True if available, false if unavailable 13 | --/ 14 | --////////////////////////////////////////////////////////// 15 | function isExtensionAvailable (name : String) return sfBool is 16 | function Internal (name : Interfaces.C.Strings.chars_ptr) return sfBool; 17 | pragma Import (C, Internal, "sfContext_isExtensionAvailable"); 18 | Temp : chars_ptr := New_String (name); 19 | R : constant sfBool := Internal (Temp); 20 | begin 21 | Free (Temp); 22 | return R; 23 | end isExtensionAvailable; 24 | 25 | --////////////////////////////////////////////////////////// 26 | --/ @brief Get the address of an OpenGL function. 27 | --/ 28 | --/ @param name Name of the function to get the address of 29 | --/ 30 | --/ @return Address of the OpenGL function, 0 on failure 31 | --/ 32 | --////////////////////////////////////////////////////////// 33 | function getFunction (name : String) return GlFunctionPointer is 34 | function Internal (name : Interfaces.C.Strings.chars_ptr) return GlFunctionPointer; 35 | pragma Import (C, Internal, "sfContext_getFunction"); 36 | Temp : chars_ptr := New_String (name); 37 | R : constant GlFunctionPointer := Internal (Temp); 38 | begin 39 | Free (Temp); 40 | return R; 41 | end getFunction; 42 | 43 | end Sf.Window.Context; 44 | -------------------------------------------------------------------------------- /include/sf-window-joystickidentification.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | --////////////////////////////////////////////////////////// 19 | 20 | 21 | with Interfaces.C.Strings; 22 | 23 | package Sf.Window.JoystickIdentification is 24 | 25 | --////////////////////////////////////////////////////////// 26 | --////////////////////////////////////////////////////////// 27 | --/ sfJoystickIdentification holds a joystick's identification 28 | --////////////////////////////////////////////////////////// 29 | type sfJoystickIdentification is record 30 | name : Interfaces.C.Strings.chars_ptr; 31 | vendorId : aliased sfUint32; 32 | productId : aliased sfUint32; 33 | end record; 34 | 35 | private 36 | 37 | pragma Convention (C_Pass_By_Copy, sfJoystickIdentification); 38 | 39 | end Sf.Window.JoystickIdentification; 40 | -------------------------------------------------------------------------------- /include/sf-window-keyboard.adb: -------------------------------------------------------------------------------- 1 | with Interfaces.C.Strings; 2 | 3 | package body Sf.Window.Keyboard is 4 | 5 | function getDescription (code : sfScancode) return String is 6 | use Interfaces.C; use Interfaces.C.Strings; 7 | function Internal (code : sfScancode) return chars_ptr; 8 | pragma Import (C, Internal, "sfKeyboard_getDescription"); 9 | C_Result : chars_ptr := Internal (code); 10 | Result : constant String := Value (C_Result); 11 | begin 12 | Free (C_Result); 13 | return Result; 14 | end getDescription; 15 | 16 | end sf.Window.Keyboard; 17 | -------------------------------------------------------------------------------- /include/sf-window-touch.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | --////////////////////////////////////////////////////////// 19 | 20 | 21 | with Sf.System.Vector2; 22 | 23 | package Sf.Window.Touch is 24 | 25 | --////////////////////////////////////////////////////////// 26 | --////////////////////////////////////////////////////////// 27 | --/ @brief Check if a touch event is currently down 28 | --/ 29 | --/ @param finger Finger index 30 | --/ 31 | --/ @return sfTrue if @a finger is currently touching the screen, sfFalse otherwise 32 | --/ 33 | --////////////////////////////////////////////////////////// 34 | function isDown (finger : sfUint32) return sfBool; 35 | 36 | --////////////////////////////////////////////////////////// 37 | --/ @brief Get the current position of a touch in window coordinates 38 | --/ 39 | --/ This function returns the current touch position 40 | --/ relative to the given window, or desktop if NULL is passed. 41 | --/ 42 | --/ @param finger Finger index 43 | --/ @param relativeTo Reference window 44 | --/ 45 | --/ @return Current position of @a finger, or undefined if it's not down 46 | --/ 47 | --////////////////////////////////////////////////////////// 48 | function getPosition (finger : sfUint32; 49 | relativeTo : sfWindow_Ptr) 50 | return Sf.System.Vector2.sfVector2i; 51 | 52 | 53 | --////////////////////////////////////////////////////////// 54 | --/ @brief Get the current position of a touch in window coordinates 55 | --/ 56 | --/ This function returns the current touch position 57 | --/ relative to the given window base, or desktop if NULL is passed. 58 | --/ 59 | --/ @param finger Finger index 60 | --/ @param relativeTo Reference window 61 | --/ 62 | --/ @return Current position of @a finger, or undefined if it's not down 63 | --/ 64 | --////////////////////////////////////////////////////////// 65 | function getPositionWindowBase (finger : sfUint32; relativeTo : sfWindowBase_Ptr) 66 | return Sf.System.Vector2.sfVector2i; 67 | 68 | private 69 | 70 | pragma Import (C, isDown, "sfTouch_isDown"); 71 | pragma Import (C, getPosition, "sfTouch_getPosition"); 72 | pragma Import (C, getPositionWindowBase, "sfTouch_getPositionWindowBase"); 73 | 74 | 75 | end Sf.Window.Touch; 76 | -------------------------------------------------------------------------------- /include/sf-window-vulkan.adb: -------------------------------------------------------------------------------- 1 | with System; 2 | with Interfaces.C.Strings; 3 | 4 | package body Sf.Window.Vulkan is 5 | 6 | function getGraphicsRequiredInstanceExtensions return sfArrayOfStrings is 7 | use Interfaces.C; 8 | 9 | function Internal (count : access sfSize_t) return Standard.System.Address; 10 | pragma Import (C, Internal, "sfVulkan_getGraphicsRequiredInstanceExtensions"); 11 | 12 | count : aliased sfSize_t; 13 | result : constant Standard.System.Address := Internal (count'access); 14 | 15 | begin 16 | declare 17 | subtype Array_Of_Strings_Type is Strings.Chars_Ptr_Array (0 .. size_t (count) - 1); 18 | cArray_Of_Strings : Array_Of_Strings_Type; 19 | pragma Import (Ada, cArray_Of_Strings); 20 | for cArray_Of_Strings'Address use result; 21 | 22 | AdaArray_Of_Strings : sfArrayOfStrings (0 .. count - 1); 23 | 24 | begin 25 | for i in Array_Of_Strings_Type'Range loop 26 | AdaArray_Of_Strings(sfSize_t(i)) := Ada.Strings.Unbounded.To_Unbounded_String 27 | (Interfaces.C.Strings.Value (cArray_Of_Strings(i))); 28 | end loop; 29 | 30 | return AdaArray_Of_Strings; 31 | end; 32 | end getGraphicsRequiredInstanceExtensions; 33 | 34 | end Sf.Window.Vulkan; 35 | -------------------------------------------------------------------------------- /include/sf-window-vulkan.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | package Sf.Window.Vulkan is 19 | 20 | --////////////////////////////////////////////////////////// 21 | --////////////////////////////////////////////////////////// 22 | --////////////////////////////////////////////////////////// 23 | 24 | --////////////////////////////////////////////////////////// 25 | type VkInstance_T is null record; 26 | 27 | type VkInstance is access all VkInstance_T; 28 | 29 | type VkSurfaceKHR_T is null record; 30 | 31 | type VkSurfaceKHR is access all VkSurfaceKHR_T; 32 | 33 | type VkAllocationCallbacks is null record; 34 | 35 | type sfVulkanFunctionPointer is access procedure; 36 | 37 | --////////////////////////////////////////////////////////// 38 | --/ @brief Tell whether or not the system supports Vulkan 39 | --/ 40 | --/ This function should always be called before using 41 | --/ the Vulkan features. If it returns false, then 42 | --/ any attempt to use Vulkan will fail. 43 | --/ 44 | --/ If only compute is required, set @a requireGraphics 45 | --/ to false to skip checking for the extensions necessary 46 | --/ for graphics rendering. 47 | --/ 48 | --/ @param requireGraphics 49 | --/ 50 | --/ @return True if Vulkan is supported, false otherwise 51 | --/ 52 | --////////////////////////////////////////////////////////// 53 | function isAvailable (requireGraphics : sfBool) return sfBool; 54 | 55 | --////////////////////////////////////////////////////////// 56 | --/ @brief Get the address of a Vulkan function 57 | --/ 58 | --/ @param name Name of the function to get the address of 59 | --/ 60 | --/ @return Address of the Vulkan function, null on failure 61 | --/ 62 | --////////////////////////////////////////////////////////// 63 | function getFunction (name : String) return sfVulkanFunctionPointer; 64 | 65 | --////////////////////////////////////////////////////////// 66 | --/ @brief Get Vulkan instance extensions required for graphics 67 | --/ 68 | --/ @return Vulkan instance extensions required for graphics 69 | --/ 70 | --/ @warning This function is broken. See https://github.com/SFML/CSFML/issues/227 71 | --/ 72 | --////////////////////////////////////////////////////////// 73 | function getGraphicsRequiredInstanceExtensions return sfArrayOfStrings; 74 | 75 | private 76 | 77 | pragma Convention (C, sfVulkanFunctionPointer); 78 | 79 | pragma Import (C, isAvailable, "sfVulkan_isAvailable"); 80 | pragma Import (C, getFunction, "sfVulkan_getFunction"); 81 | 82 | end Sf.Window.Vulkan; 83 | -------------------------------------------------------------------------------- /include/sf-window-windowbase.adb: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- // 3 | -- // SFML - Simple and Fast Multimedia Library 4 | -- // Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com) 5 | -- // 6 | -- // This software is provided 'as-is', without any express or implied warranty. 7 | -- // In no event will the authors be held liable for any damages arising from the use of this software. 8 | -- // 9 | -- // Permission is granted to anyone to use this software for any purpose, 10 | -- // including commercial applications, and to alter it and redistribute it freely, 11 | -- // subject to the following restrictions: 12 | -- // 13 | -- // 1. The origin of this software must not be misrepresented; 14 | -- // you must not claim that you wrote the original software. 15 | -- // If you use this software in a product, an acknowledgment 16 | -- // in the product documentation would be appreciated but is not required. 17 | -- // 18 | -- // 2. Altered source versions must be plainly marked as such, 19 | -- // and must not be misrepresented as being the original software. 20 | -- // 21 | -- // 3. This notice may not be removed or altered from any source distribution. 22 | -- // 23 | --////////////////////////////////////////////////////////// 24 | 25 | with Interfaces.C.Strings; 26 | 27 | package body Sf.Window.Windowbase is 28 | use Interfaces.C.Strings; 29 | 30 | function create 31 | (mode : Sf.Window.VideoMode.sfVideoMode; 32 | title : String; 33 | style : sfWindowStyle := sfResize or sfClose) 34 | return sfWindowBase_Ptr 35 | is 36 | function Internal 37 | (Mode : Sf.Window.VideoMode.sfVideoMode; 38 | Title : Interfaces.C.char_array; 39 | Style : sfWindowStyle) 40 | return sfWindowBase_Ptr; 41 | pragma Import (C, Internal, "sfWindowBase_create"); 42 | R : constant sfWindowBase_Ptr := Internal (mode, Interfaces.C.To_C (Title), style); 43 | begin 44 | return R; 45 | end Create; 46 | 47 | procedure setTitle (windowBase : sfWindowBase_Ptr; title : Standard.String) is 48 | 49 | procedure Internal (windowBase : sfWindowBase_Ptr; title : Interfaces.C.Strings.chars_ptr); 50 | pragma Import (C, Internal, "sfWindowBase_setTitle"); 51 | Temp : chars_ptr := New_String (Title); 52 | begin 53 | Internal (windowBase, Temp); 54 | Free (Temp); 55 | end setTitle; 56 | 57 | function createUnicode 58 | (mode : Sf.Window.VideoMode.sfVideoMode; 59 | title : Wide_Wide_String; 60 | style : sfWindowStyle := sfResize or sfClose) 61 | return sfWindowBase_Ptr 62 | is 63 | function Internal 64 | (mode : Sf.Window.VideoMode.sfVideoMode; 65 | title : C.char32_array; 66 | style : sfWindowStyle) 67 | return sfWindowBase_Ptr; 68 | pragma Import (C, Internal, "sfWindowBase_createUnicode"); 69 | R : constant sfWindowBase_Ptr := Internal (mode, C.To_C (title), style); 70 | begin 71 | return R; 72 | end createUnicode; 73 | 74 | procedure setUnicodeTitle (windowBase : sfWindowBase_Ptr; title : Wide_Wide_String) is 75 | 76 | procedure Internal (windowBase : sfWindowBase_Ptr; title : C.char32_array); 77 | pragma Import (C, Internal, "sfWindowBase_setUnicodeTitle"); 78 | begin 79 | Internal (windowBase, C.To_C (title)); 80 | end setUnicodeTitle; 81 | 82 | end Sf.Window.Windowbase; 83 | -------------------------------------------------------------------------------- /include/sf-window-windowhandle.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | package Sf.Window.WindowHandle is 19 | 20 | --////////////////////////////////////////////////////////// 21 | --/ Define a low-level window handle type, specific to 22 | --/ each platform 23 | --////////////////////////////////////////////////////////// 24 | type sfWindowHandle is null record; 25 | type sfWindowHandle_Ptr is access all sfWindowHandle; 26 | 27 | private 28 | 29 | pragma Convention (C, sfWindowHandle); 30 | pragma Convention (C, sfWindowHandle_Ptr); 31 | 32 | end Sf.Window.WindowHandle; 33 | -------------------------------------------------------------------------------- /include/sf-window.ads: -------------------------------------------------------------------------------- 1 | --////////////////////////////////////////////////////////// 2 | -- SFML - Simple and Fast Multimedia Library 3 | -- Copyright (C) 2007-2023 Laurent Gomila (laurent@sfml-dev.org) 4 | -- This software is provided 'as-is', without any express or implied warranty. 5 | -- In no event will the authors be held liable for any damages arising from the use of this software. 6 | -- Permission is granted to anyone to use this software for any purpose, 7 | -- including commercial applications, and to alter it and redistribute it freely, 8 | -- subject to the following restrictions: 9 | -- 1. The origin of this software must not be misrepresented; 10 | -- you must not claim that you wrote the original software. 11 | -- If you use this software in a product, an acknowledgment 12 | -- in the product documentation would be appreciated but is not required. 13 | -- 2. Altered source versions must be plainly marked as such, 14 | -- and must not be misrepresented as being the original software. 15 | -- 3. This notice may not be removed or altered from any source distribution. 16 | --////////////////////////////////////////////////////////// 17 | 18 | --////////////////////////////////////////////////////////// 19 | 20 | --/ @summary 21 | --/ Window module 22 | --/ 23 | --/ @description 24 | --/ Provides OpenGL-based windows, and abstractions for 25 | --/ events and input handling. 26 | package Sf.Window is 27 | 28 | 29 | --////////////////////////////////////////////////////////// 30 | --/ @brief Enumeration of window creation styles 31 | --/ 32 | --////////////////////////////////////////////////////////// 33 | 34 | type sfWindowStyle is new sfUint32; 35 | sfNone : constant sfWindowStyle := 0; 36 | --/< No border / title bar (this flag and all others are mutually exclusive) 37 | sfTitlebar : constant sfWindowStyle := 1; 38 | --/< Title bar + fixed border 39 | sfResize : constant sfWindowStyle := 2; 40 | --/< Titlebar + resizable border + maximize button 41 | sfClose : constant sfWindowStyle := 4; 42 | --/< Titlebar + close button 43 | sfFullscreen : constant sfWindowStyle := 8; 44 | --/< Fullscreen mode (this flag and all others are mutually exclusive) 45 | sfDefaultStyle : constant sfWindowStyle := 7; 46 | --/< Default window style 47 | 48 | type sfContext is null record; 49 | type sfContext_Ptr is access all sfContext; 50 | 51 | type sfInput is null record; 52 | type sfInput_Ptr is access all sfInput; 53 | 54 | type sfWindow is null record; 55 | type sfWindow_Ptr is access all sfWindow; 56 | 57 | type sfWindowBase is null record; 58 | type sfWindowBase_Ptr is access all sfWindowBase; 59 | 60 | type sfCursor is null record; 61 | type sfCursor_Ptr is access all sfCursor; 62 | 63 | private 64 | 65 | pragma Convention (C, sfContext); 66 | pragma Convention (C, sfContext_Ptr); 67 | pragma Convention (C, sfInput); 68 | pragma Convention (C, sfInput_Ptr); 69 | pragma Convention (C, sfWindowBase); 70 | pragma Convention (C, sfWindowBase_Ptr); 71 | pragma Convention (C, sfWindow); 72 | pragma Convention (C, sfWindow_Ptr); 73 | pragma Convention (C, sfCursor); 74 | pragma Convention (C, sfCursor_Ptr); 75 | 76 | end Sf.Window; 77 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | main 2 | pong 3 | unicode 4 | -------------------------------------------------------------------------------- /tests/Makefile: -------------------------------------------------------------------------------- 1 | SUBDIRS:=clock example graphics music opengl pong renderwindow thread window vulkan ftp sound 2 | 3 | .PHONY: all clean run 4 | 5 | all: 6 | for dir in $(SUBDIRS) ; \ 7 | do \ 8 | $(MAKE) -C $$dir ; \ 9 | done 10 | 11 | 12 | clean: 13 | for dir in $(SUBDIRS) ; \ 14 | do \ 15 | $(MAKE) -C $$dir clean; \ 16 | done 17 | 18 | run: 19 | for dir in $(SUBDIRS) ; \ 20 | do \ 21 | $(MAKE) -C $$dir run; \ 22 | done 23 | -------------------------------------------------------------------------------- /tests/clock/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all clean run 2 | 3 | all: 4 | gprbuild 5 | 6 | clean: 7 | gprclean 8 | 9 | run: 10 | ./main 11 | -------------------------------------------------------------------------------- /tests/clock/main.adb: -------------------------------------------------------------------------------- 1 | with Ada.Text_IO; use Ada.Text_IO; 2 | with Ada.Float_Text_IO; use Ada.Float_Text_IO; 3 | with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; 4 | 5 | with Sf.System.Clock; use Sf.System, Sf.System.Clock; 6 | with Sf.System.Sleep; use Sf.System.Sleep; 7 | with Sf.System.Time; use Sf.System.Time; 8 | 9 | procedure Main is 10 | 11 | My_Clock : sfClock_Ptr; 12 | 13 | begin 14 | 15 | My_Clock := Create; 16 | sfDelay(0.05); 17 | Put ("Time elapsed(s): "); 18 | Put (asSeconds (GetElapsedTime (My_Clock)), Fore => 0, Aft => 3, Exp => 0); 19 | New_Line; 20 | Put ("Time elapsed(ms) since start: "); 21 | Put (Integer (asMilliseconds (Restart (My_Clock)))); 22 | New_Line; 23 | sfSleep(sfMilliseconds(1050)); 24 | Put ("Time elapsed(ms): "); 25 | Put (Integer (asMilliseconds (GetElapsedTime (My_Clock)))); 26 | New_Line; 27 | Destroy (My_Clock); 28 | 29 | end Main; 30 | -------------------------------------------------------------------------------- /tests/clock/main.gpr: -------------------------------------------------------------------------------- 1 | with "../../asfml.gpr"; 2 | 3 | project Main is 4 | 5 | for Create_Missing_Dirs use "True"; 6 | 7 | for Source_Dirs use ("."); 8 | for Object_Dir use "obj"; 9 | for Main use ("main.adb"); 10 | for Exec_Dir use "."; 11 | 12 | end Main; -------------------------------------------------------------------------------- /tests/doodle_pop.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgrojo/ASFML/412f22195c153e1eab9777f11ce14f123197dc8f/tests/doodle_pop.ogg -------------------------------------------------------------------------------- /tests/example/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all clean run 2 | 3 | all: 4 | gprbuild 5 | 6 | clean: 7 | gprclean 8 | 9 | run: 10 | ./main 11 | -------------------------------------------------------------------------------- /tests/example/main.adb: -------------------------------------------------------------------------------- 1 | -- Here is a short example, to show you how simple it is to use ASFML. 2 | -- This is the official SFML example converted to Ada. 3 | -- The program is expected to be run from the current directory 4 | -- so the multimedia resources included in this repository are correctly 5 | -- referenced. 6 | 7 | with Ada.Command_Line; 8 | 9 | with Sf.Window.Videomode; use Sf, Sf.Window, Sf.Window.Videomode; 10 | with Sf.Window.Event; use Sf.Window.Event; 11 | with Sf.Window.Window; use Sf.Window.Window; 12 | 13 | with Sf.Graphics.Color; use Sf.Graphics, Sf.Graphics.Color; 14 | with Sf.Graphics.RenderWindow; use Sf.Graphics.RenderWindow; 15 | with Sf.Graphics.Sprite; use Sf.Graphics.Sprite; 16 | with Sf.Graphics.Texture; use Sf.Graphics.Texture; 17 | with Sf.Graphics.Font; use Sf.Graphics.Font; 18 | with Sf.Graphics.Text; use Sf.Graphics.Text; 19 | 20 | with Sf.Audio.Music; use Sf.Audio, Sf.Audio.Music; 21 | 22 | 23 | procedure Main is 24 | 25 | Resource_Unavailable : exception; 26 | 27 | Mode : VideoMode.sfVideoMode := (Width => 800, Height => 600, BitsPerPixel => 32); 28 | Window : sfRenderWindow_Ptr; 29 | Texture : sfTexture_Ptr; 30 | Sprite : sfSprite_Ptr; 31 | Font : sfFont_Ptr; 32 | Text : sfText_Ptr; 33 | Music : sfMusic_Ptr; 34 | event : sfEvent; 35 | 36 | begin 37 | 38 | Resources: begin 39 | 40 | -- Create the main Window 41 | Window := create(Mode, "SFML window"); 42 | 43 | -- Load a sprite to display 44 | Texture := createFromFile("../../images/ASFML_Logo.png"); 45 | 46 | if Texture = null then 47 | raise Resource_Unavailable; 48 | end if; 49 | 50 | Sprite := create; 51 | setTexture(Sprite, Texture, sfTrue); 52 | setPosition(Sprite, (x => 200.0, y => 200.0)); 53 | 54 | -- Create a graphical text to display 55 | Font := createFromFile("../tuffy.ttf"); 56 | 57 | if Font = null then 58 | raise Resource_Unavailable; 59 | end if; 60 | 61 | Text := create; 62 | setString(Text, "Hello SFML"); 63 | setFont(Text, Font); 64 | setCharacterSize(Text, 50); 65 | 66 | -- Load a music file to play 67 | Music := createFromFile("../doodle_pop.ogg"); 68 | 69 | if Music = null then 70 | raise Resource_Unavailable; 71 | end if; 72 | 73 | -- Play the music 74 | play(Music); 75 | 76 | -- Start the game loop 77 | while isOpen(Window) loop 78 | 79 | -- Process events 80 | while pollEvent(Window, event) loop 81 | 82 | -- Close window: exit 83 | if (event.eventType = sfEvtClosed) then 84 | close(Window); 85 | end if; 86 | end loop; 87 | 88 | -- Clear the screen 89 | clear(Window); 90 | 91 | -- Draw the sprite 92 | drawSprite(Window, Sprite); 93 | 94 | -- Draw the text 95 | drawText(Window, Text); 96 | 97 | -- Update the window 98 | display(Window); 99 | end loop; 100 | 101 | exception 102 | when Resource_Unavailable => 103 | -- Useful message already printed by SFML 104 | Ada.Command_Line.Set_Exit_Status (Ada.Command_Line.Failure); 105 | end Resources; 106 | 107 | -- Cleanup resources 108 | destroy(Music); 109 | destroy(Text); 110 | destroy(Font); 111 | destroy(Sprite); 112 | destroy(Texture); 113 | destroy(Window); 114 | 115 | end Main; 116 | -------------------------------------------------------------------------------- /tests/example/main.gpr: -------------------------------------------------------------------------------- 1 | with "../../asfml.gpr"; 2 | 3 | project Main is 4 | 5 | for Create_Missing_Dirs use "True"; 6 | 7 | for Source_Dirs use ("."); 8 | for Object_Dir use "obj"; 9 | for Main use ("main.adb"); 10 | for Exec_Dir use "."; 11 | 12 | end Main; -------------------------------------------------------------------------------- /tests/ftp/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all clean run 2 | 3 | all: 4 | gprbuild 5 | 6 | clean: 7 | gprclean 8 | 9 | run: 10 | ./main 11 | -------------------------------------------------------------------------------- /tests/ftp/main.adb: -------------------------------------------------------------------------------- 1 | with Ada.Text_IO; 2 | with Sf.Network.Ftp; 3 | with Sf.Network.IpAddress; 4 | with Sf.System.Time; 5 | 6 | procedure Main is 7 | use Sf; use Sf.Network; use Sf.Network.Ftp; 8 | FTP_Error : exception; 9 | 10 | FTP_Object : constant sfFtp_Ptr := create; 11 | 12 | procedure Check_Response (FTP_Response : sfFtpResponse_Ptr) is 13 | Message : constant String := Response.getMessage (FTP_Response); 14 | begin 15 | Response.destroy (FTP_Response); 16 | if not Response.isOk (FTP_Response) then 17 | raise FTP_Error with Message; 18 | else 19 | Ada.Text_IO.Put_Line ("OK: " & Message); 20 | end if; 21 | end Check_Response; 22 | 23 | procedure List_Directory (Path : String) is 24 | Response : sfFtpListingResponse_Ptr; 25 | begin 26 | Response := getDirectoryListing (FTP_Object, Path); 27 | if ListingResponse.isOk (Response) then 28 | for Index in 0 .. ListingResponse.getCount (Response) - 1 loop 29 | Ada.Text_IO.Put_Line (ListingResponse.getName (Response, Index)); 30 | end loop; 31 | else 32 | Ada.Text_IO.Put_Line (ListingResponse.getMessage (Response)); 33 | end if; 34 | ListingResponse.destroy (Response); 35 | end List_Directory; 36 | 37 | begin 38 | 39 | Check_Response 40 | (connect (FTP_Object, 41 | server => IpAddress.fromString ("speedtest.tele2.net"), 42 | port => 21, 43 | timeout => Sf.System.Time.sfSeconds (30.0))); 44 | 45 | Check_Response (loginAnonymous (FTP_Object)); 46 | 47 | Check_Response (changeDirectory (FTP_Object, "/upload")); 48 | Check_Response (changeDirectory (FTP_Object, "/")); 49 | 50 | List_Directory ("."); 51 | 52 | Check_Response (download (FTP_Object, 53 | remoteFile => "100KB.zip", 54 | localPath => ".", 55 | mode => sfFtpBinary)); 56 | destroy (FTP_Object); 57 | end Main; 58 | -------------------------------------------------------------------------------- /tests/ftp/main.gpr: -------------------------------------------------------------------------------- 1 | with "../../asfml.gpr"; 2 | 3 | project Main is 4 | 5 | for Create_Missing_Dirs use "True"; 6 | 7 | for Source_Dirs use ("."); 8 | for Object_Dir use "obj"; 9 | for Main use ("main.adb"); 10 | for Exec_Dir use "."; 11 | 12 | end Main; -------------------------------------------------------------------------------- /tests/graphics/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all clean run 2 | 3 | all: 4 | gprbuild 5 | 6 | clean: 7 | gprclean 8 | 9 | run: 10 | ./main 11 | -------------------------------------------------------------------------------- /tests/graphics/main.adb: -------------------------------------------------------------------------------- 1 | with Sf.Graphics.Rect; 2 | with Sf.System.Vector2; 3 | with Ada.Wide_Wide_Text_IO; use Ada.Wide_Wide_Text_IO; 4 | 5 | procedure Main is 6 | 7 | FloatRectangle : aliased constant Sf.Graphics.Rect.sfFloatRect := (0.00, 0.00, 100.00, 100.00); 8 | IntegerRectangle : aliased constant Sf.Graphics.Rect.sfIntRect := (0, 0, 100, 100); 9 | 10 | FloatPoint : constant Sf.System.Vector2.sfVector2f := (10.00, 10.00); 11 | IntegerPoint : constant Sf.System.Vector2.sfVector2i := (10, 10); 12 | 13 | OutFloatPoint : constant Sf.System.Vector2.sfVector2f := (200.00, 10.00); 14 | OutIntegerPoint : constant Sf.System.Vector2.sfVector2i := (200, 10); 15 | 16 | begin 17 | 18 | 19 | case 20 | Sf.Graphics.Rect.contains (rect => FloatRectangle'Access, 21 | x => FloatPoint.x, 22 | y => FloatPoint.y) 23 | is 24 | when Sf.sfTrue => 25 | Put_Line ("OK: Floatpoint is inside."); 26 | 27 | when Sf.sfFalse => 28 | Put_Line ("Fail: Floatpoint is outside."); 29 | end case; 30 | 31 | case 32 | Sf.Graphics.Rect.contains (rect => IntegerRectangle'Access, 33 | x => Integer (IntegerPoint.x), 34 | y => Integer (IntegerPoint.y)) 35 | is 36 | when Sf.sfTrue => 37 | Put_Line ("OK: Integerpoint is inside."); 38 | 39 | when Sf.sfFalse => 40 | Put_Line ("Fail: Integerpoint is outside."); 41 | end case; 42 | 43 | 44 | case 45 | Sf.Graphics.Rect.contains (rect => FloatRectangle'Access, 46 | x => OutFloatPoint.x, 47 | y => OutFloatPoint.y) 48 | is 49 | when Sf.sfTrue => 50 | Put_Line ("Fail: OutFloatpoint is inside."); 51 | 52 | when Sf.sfFalse => 53 | Put_Line ("OK: OutFloatpoint is outside."); 54 | end case; 55 | 56 | case 57 | Sf.Graphics.Rect.contains (rect => IntegerRectangle'Access, 58 | x => Integer (OutIntegerPoint.x), 59 | y => Integer (OutIntegerPoint.y)) 60 | is 61 | when Sf.sfTrue => 62 | Put_Line ("Fail: OutIntegerpoint is inside."); 63 | 64 | when Sf.sfFalse => 65 | Put_Line ("OK: OutIntegerpoint is outside."); 66 | end case; 67 | 68 | end Main; 69 | -------------------------------------------------------------------------------- /tests/graphics/main.gpr: -------------------------------------------------------------------------------- 1 | with "../../asfml.gpr"; 2 | 3 | project Main is 4 | 5 | for Create_Missing_Dirs use "True"; 6 | 7 | for Source_Dirs use ("."); 8 | for Object_Dir use "obj"; 9 | for Main use ("main.adb"); 10 | for Exec_Dir use "."; 11 | 12 | package Compiler is 13 | 14 | -- This flag is for strings to be interpreted in UTF-8 by 15 | -- compiler. 16 | for Default_Switches ("Ada") use ("-gnatW8"); 17 | 18 | end Compiler; 19 | 20 | end Main; 21 | -------------------------------------------------------------------------------- /tests/music/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all clean run 2 | 3 | all: 4 | gprbuild 5 | 6 | clean: 7 | gprclean 8 | 9 | run: 10 | ./main ../doodle_pop.ogg 11 | -------------------------------------------------------------------------------- /tests/music/main.adb: -------------------------------------------------------------------------------- 1 | with Ada.Text_IO; use Ada.Text_IO; 2 | with Ada.Float_Text_IO; use Ada.Float_Text_IO; 3 | with Ada.Integer_Text_IO; use Ada.Integer_Text_IO; 4 | with Ada.Float_Text_IO; use Ada.Float_Text_IO; 5 | 6 | with Sf.System.Sleep; use Sf, Sf.System, Sf.System.Sleep; 7 | with Sf.System.Time; use Sf.System.Time; 8 | with Sf.Audio.Music; use Sf.Audio, Sf.Audio.Music; 9 | with Sf.Audio.SoundStatus; use Sf.Audio.SoundStatus; 10 | 11 | with Ada.Command_Line; 12 | 13 | procedure Main is 14 | 15 | Music : sfMusic_Ptr; 16 | Duration : sfTime; 17 | ChCount : sfUint32; 18 | SampRate : sfUint32; 19 | 20 | begin 21 | 22 | if Ada.Command_Line.Argument_Count /= 1 then 23 | Put_Line (Standard_Error, "Error: no music file passed as unique argument"); 24 | return; 25 | end if; 26 | 27 | Music := createFromFile (Ada.Command_Line.Argument (1)); 28 | if Music = null then 29 | Put_Line (Standard_Error, "Error: Music file not found!"); 30 | return; 31 | end if; 32 | 33 | setLoop (Music, sfFalse); 34 | setPitch (Music, 1.0); 35 | setVolume (Music, 100.0); 36 | 37 | Duration := getDuration (Music); 38 | ChCount := getChannelCount (Music); 39 | SampRate := getSampleRate (Music); 40 | 41 | Put ("Duration : "); 42 | Put (Integer (asMilliseconds (Duration))); 43 | Put (" milliseconds"); 44 | New_Line; 45 | Put ("Channels count : "); 46 | Put (Integer (ChCount), 0); 47 | Put (" channels"); 48 | New_Line; 49 | Put ("Sample rate : "); 50 | Put (Integer (SampRate), 0); 51 | Put (" channels/second"); 52 | New_Line; 53 | 54 | play (Music); 55 | 56 | Put ("Playing... "); 57 | while getStatus (Music) = sfPlaying loop 58 | 59 | -- Display the playing position 60 | Put (Integer (asMilliseconds (getPlayingOffset(Music)))); 61 | Put (" "); 62 | delay 0.1; 63 | 64 | end loop; 65 | 66 | destroy (Music); 67 | 68 | end Main; 69 | -------------------------------------------------------------------------------- /tests/music/main.gpr: -------------------------------------------------------------------------------- 1 | with "../../asfml.gpr"; 2 | 3 | project Main is 4 | 5 | for Create_Missing_Dirs use "True"; 6 | 7 | for Source_Dirs use ("."); 8 | for Object_Dir use "obj"; 9 | for Main use ("main.adb"); 10 | for Exec_Dir use "."; 11 | 12 | end Main; -------------------------------------------------------------------------------- /tests/opengl/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all clean run 2 | 3 | all: 4 | gprbuild 5 | 6 | clean: 7 | gprclean 8 | 9 | run: 10 | ./main 11 | -------------------------------------------------------------------------------- /tests/opengl/main.adb.stdout: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgrojo/ASFML/412f22195c153e1eab9777f11ce14f123197dc8f/tests/opengl/main.adb.stdout -------------------------------------------------------------------------------- /tests/opengl/main.gpr: -------------------------------------------------------------------------------- 1 | with "../../asfml_opengl.gpr"; 2 | 3 | project Main is 4 | 5 | for Create_Missing_Dirs use "True"; 6 | 7 | for Source_Dirs use ("."); 8 | for Object_Dir use "obj"; 9 | for Main use ("main.adb"); 10 | for Exec_Dir use "."; 11 | 12 | end Main; -------------------------------------------------------------------------------- /tests/pong/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all clean run 2 | 3 | all: 4 | gprbuild 5 | 6 | clean: 7 | gprclean 8 | 9 | run: 10 | ./pong 11 | -------------------------------------------------------------------------------- /tests/pong/README.md: -------------------------------------------------------------------------------- 1 | # Pong 2 | 3 | Implementation of the Classical Pong game based on the Pascal version (PasSFML). 4 | https://github.com/CWBudde/PasSFML/blob/master/Examples/Pong/Pong.dpr 5 | 6 | Ported to Ada with the help of [P2Ada](http://p2ada.sourceforge.net/) V1.4a 7 | 8 | Sound file (`ping_pong_8bit_beeep.ogg`) is in the Public Domain and was obtained from 9 | https://opengameart.org/content/3-ping-pong-sounds-8-bit-style -------------------------------------------------------------------------------- /tests/pong/ping_pong_8bit_beeep.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgrojo/ASFML/412f22195c153e1eab9777f11ce14f123197dc8f/tests/pong/ping_pong_8bit_beeep.ogg -------------------------------------------------------------------------------- /tests/pong/pong.gpr: -------------------------------------------------------------------------------- 1 | with "../../asfml.gpr"; 2 | 3 | project Pong is 4 | 5 | for Create_Missing_Dirs use "True"; 6 | 7 | for Source_Dirs use ("."); 8 | for Object_Dir use "obj"; 9 | for Main use ("pong.adb"); 10 | for Exec_Dir use "."; 11 | 12 | package Compiler is 13 | 14 | -- This flag is for strings to be interpreted in UTF-8 by 15 | -- compiler. 16 | for Default_Switches ("Ada") use ("-gnatwa", "-gnatW8"); 17 | 18 | end Compiler; 19 | 20 | end Pong; 21 | -------------------------------------------------------------------------------- /tests/renderwindow/DejaVuSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgrojo/ASFML/412f22195c153e1eab9777f11ce14f123197dc8f/tests/renderwindow/DejaVuSans.ttf -------------------------------------------------------------------------------- /tests/renderwindow/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all clean run 2 | 3 | all: 4 | gprbuild 5 | 6 | clean: 7 | gprclean 8 | 9 | run: 10 | ./main 11 | ./unicode 12 | -------------------------------------------------------------------------------- /tests/renderwindow/aerial.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgrojo/ASFML/412f22195c153e1eab9777f11ce14f123197dc8f/tests/renderwindow/aerial.ttf -------------------------------------------------------------------------------- /tests/renderwindow/icon64x64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgrojo/ASFML/412f22195c153e1eab9777f11ce14f123197dc8f/tests/renderwindow/icon64x64.png -------------------------------------------------------------------------------- /tests/renderwindow/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgrojo/ASFML/412f22195c153e1eab9777f11ce14f123197dc8f/tests/renderwindow/logo.png -------------------------------------------------------------------------------- /tests/renderwindow/main.gpr: -------------------------------------------------------------------------------- 1 | with "../../asfml.gpr"; 2 | 3 | project Main is 4 | 5 | for Create_Missing_Dirs use "True"; 6 | 7 | for Source_Dirs use ("."); 8 | for Object_Dir use "obj"; 9 | for Main use ("main.adb", "unicode.adb"); 10 | for Exec_Dir use "."; 11 | 12 | package Compiler is 13 | 14 | -- This flag is for strings to be interpreted in UTF-8 by 15 | -- compiler. 16 | for Default_Switches ("Ada") use ("-gnatW8"); 17 | 18 | end Compiler; 19 | 20 | end Main; 21 | -------------------------------------------------------------------------------- /tests/sound/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all clean run 2 | 3 | all: 4 | gprbuild 5 | 6 | clean: 7 | gprclean 8 | 9 | run: 10 | ./main 11 | -------------------------------------------------------------------------------- /tests/sound/main.adb: -------------------------------------------------------------------------------- 1 | with Sf.Audio.SoundBufferRecorder; 2 | with Sf.Audio.SoundBuffer; 3 | with Ada.Text_IO; 4 | 5 | procedure Main is 6 | use Sf, Sf.Audio, Ada.Text_IO; 7 | Sound_Buffer_Recorder : constant sfSoundBufferRecorder_Ptr := 8 | SoundBufferRecorder.create; 9 | Sound_Buffer : sfSoundBuffer_Ptr; 10 | Sound_File : constant String := "output.ogg"; 11 | begin 12 | 13 | if Sound_Buffer_Recorder = null then 14 | Put_Line (Standard_Error, "Error: sound recorder not available!"); 15 | return; 16 | end if; 17 | 18 | SoundBufferRecorder.setChannelCount (Sound_Buffer_Recorder, 2); 19 | 20 | -- By default the recording is in 16-bit mono. Using the 21 | -- setChannelCount method you can change the number of channels 22 | -- used by the audio capture device to record. 23 | if SoundBufferRecorder.start (Sound_Buffer_Recorder, sampleRate => 44_100) /= sfTrue then 24 | Put_Line (Standard_Error, "Error: sound recorder cannot start!"); 25 | return; 26 | end if; 27 | 28 | delay 10.0; 29 | SoundBufferRecorder.stop (Sound_Buffer_Recorder); 30 | 31 | Sound_Buffer := SoundBufferRecorder.getBuffer (Sound_Buffer_Recorder); 32 | if SoundBuffer.saveToFile (Sound_Buffer, filename => Sound_File) /= sfTrue then 33 | Put_Line (Standard_Error, "Error: recorded sound could not be saved!"); 34 | end if; 35 | 36 | Put_Line ("Saved sound in `" & Sound_File & "` with "); 37 | Put_Line ("- Channel count: " & 38 | SoundBufferRecorder.getChannelCount (Sound_Buffer_Recorder)'Image); 39 | Put_Line ("- Sample rate: " & 40 | SoundBufferRecorder.getSampleRate (Sound_Buffer_Recorder)'Image); 41 | 42 | SoundBufferRecorder.destroy (Sound_Buffer_Recorder); 43 | end Main; 44 | -------------------------------------------------------------------------------- /tests/sound/main.gpr: -------------------------------------------------------------------------------- 1 | with "../../asfml.gpr"; 2 | 3 | project Main is 4 | 5 | for Create_Missing_Dirs use "True"; 6 | 7 | for Source_Dirs use ("."); 8 | for Object_Dir use "obj"; 9 | for Main use ("main.adb"); 10 | for Exec_Dir use "."; 11 | 12 | end Main; -------------------------------------------------------------------------------- /tests/thread/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all clean run 2 | 3 | all: 4 | gprbuild 5 | 6 | clean: 7 | gprclean 8 | 9 | run: 10 | ./main 11 | -------------------------------------------------------------------------------- /tests/thread/main.adb: -------------------------------------------------------------------------------- 1 | with Ada.Text_IO; use Ada.Text_IO; 2 | 3 | with Sf.System.Thread; use Sf, Sf.System, Sf.System.Thread; 4 | with Sf.System.Sleep; use Sf.System.Sleep; 5 | 6 | with Thread_Func; 7 | 8 | procedure Main is 9 | 10 | Thread : sfThread_Ptr; 11 | TFunc : sfThreadFunc_Ptr := Thread_Func'Access; 12 | UData : String := "Hello"; 13 | 14 | begin 15 | 16 | Thread := Create (TFunc, UData'Address); 17 | Launch (Thread); 18 | 19 | for I in 1 .. 10 loop 20 | Put_Line ("I'm main thread"); 21 | sfDelay (0.001); 22 | end loop; 23 | 24 | Destroy (Thread); 25 | 26 | end Main; 27 | -------------------------------------------------------------------------------- /tests/thread/main.gpr: -------------------------------------------------------------------------------- 1 | with "../../asfml.gpr"; 2 | 3 | project Main is 4 | 5 | for Create_Missing_Dirs use "True"; 6 | 7 | for Source_Dirs use ("."); 8 | for Object_Dir use "obj"; 9 | for Main use ("main.adb"); 10 | for Exec_Dir use "."; 11 | 12 | end Main; -------------------------------------------------------------------------------- /tests/thread/thread_func.adb: -------------------------------------------------------------------------------- 1 | with Ada.Text_IO; use Ada.Text_IO; 2 | 3 | with Sf.System.Sleep; use Sf.System.Sleep; 4 | 5 | procedure Thread_Func (Arg : System.Address) is 6 | User_Data : String (1..5); 7 | for User_Data'Address use Arg; 8 | pragma Import (Ada, User_Data); 9 | begin 10 | for I in 1 .. 10 loop 11 | Put (User_Data); 12 | Put_Line (", I'm thread 1"); 13 | sfDelay (0.001); 14 | end loop; 15 | end Thread_Func; 16 | -------------------------------------------------------------------------------- /tests/thread/thread_func.ads: -------------------------------------------------------------------------------- 1 | with System; 2 | 3 | procedure Thread_Func (Arg : System.Address); 4 | pragma Convention (C, Thread_Func); 5 | -------------------------------------------------------------------------------- /tests/tuffy.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgrojo/ASFML/412f22195c153e1eab9777f11ce14f123197dc8f/tests/tuffy.ttf -------------------------------------------------------------------------------- /tests/vulkan/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all clean run 2 | 3 | all: 4 | gprbuild 5 | 6 | clean: 7 | gprclean 8 | 9 | run: 10 | ./main 11 | -------------------------------------------------------------------------------- /tests/vulkan/main.adb: -------------------------------------------------------------------------------- 1 | with Ada.Strings.Unbounded.Text_IO; 2 | with Ada.Text_IO; use Ada.Text_IO; 3 | 4 | with Sf.Window.WindowBase; use Sf, Sf.Window, Sf.Window.WindowBase; 5 | with Sf.Window.VideoMode; use Sf.Window.VideoMode; 6 | with Sf.Window.Event; use Sf.Window.Event; 7 | with Sf.Window.Keyboard; use Sf.Window.Keyboard; 8 | with Sf.Window.Vulkan; 9 | 10 | 11 | procedure Main is 12 | 13 | Window : sfWindowBase_Ptr; 14 | Mode : sfVideoMode := (800, 600, 32); 15 | Event : aliased sfEvent; 16 | begin 17 | 18 | Window := Create (Mode, "Vulkan"); 19 | if Window = null then 20 | Put_Line ("Failed to create window"); 21 | return; 22 | end if; 23 | 24 | SetVisible (Window, sfTrue); 25 | 26 | 27 | if Sf.Window.Vulkan.isAvailable (requireGraphics => sf.sfTrue) then 28 | Ada.Text_IO.Put_Line ("Vulkan with Graphics supported"); 29 | for Extension of Sf.Window.Vulkan.getGraphicsRequiredInstanceExtensions loop 30 | Ada.Strings.Unbounded.Text_IO.Put_Line (Extension); 31 | end loop; 32 | else 33 | if Sf.Window.Vulkan.isAvailable (requireGraphics => sf.sfFalse) then 34 | Ada.Text_IO.Put_Line ("Vulkan without Graphics supported"); 35 | else 36 | Ada.Text_IO.Put_Line ("Vulkan not supported"); 37 | end if; 38 | end if; 39 | 40 | while IsOpen (Window) = sfTrue loop 41 | while PollEvent (Window, Event'ACCESS) = sfTrue loop 42 | if Event.eventType = sfEvtClosed then 43 | Close (Window); 44 | Put_Line ("Attempting to close"); 45 | elsif Event.eventType = sfEvtKeyPressed and then isKeyPressed (sfKeyEscape) = sfTrue then 46 | Close (Window); 47 | Put_Line ("Attempting to close"); 48 | end if; 49 | end loop; 50 | end loop; 51 | Destroy (Window); 52 | 53 | end Main; 54 | -------------------------------------------------------------------------------- /tests/vulkan/main.gpr: -------------------------------------------------------------------------------- 1 | with "../../asfml.gpr"; 2 | 3 | project Main is 4 | 5 | for Create_Missing_Dirs use "True"; 6 | 7 | for Source_Dirs use ("."); 8 | for Object_Dir use "obj"; 9 | for Main use ("main.adb"); 10 | for Exec_Dir use "."; 11 | 12 | end Main; 13 | -------------------------------------------------------------------------------- /tests/window/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all clean run 2 | 3 | all: 4 | gprbuild 5 | 6 | clean: 7 | gprclean 8 | 9 | run: 10 | ./main 11 | ./unicode 12 | 13 | -------------------------------------------------------------------------------- /tests/window/main.adb: -------------------------------------------------------------------------------- 1 | with Ada.Text_IO; use Ada.Text_IO; 2 | with Sf.Window.Window; use Sf, Sf.Window, Sf.Window.Window; 3 | with Sf.Window.VideoMode; use Sf.Window.VideoMode; 4 | with Sf.Window.Event; use Sf.Window.Event; 5 | with Sf.Window.Keyboard; use Sf.Window.Keyboard; 6 | with Sf.Window.Clipboard; 7 | with Sf.Window.Cursor; 8 | 9 | with Sf.System.Time; use Sf.System.Time; 10 | with Sf.System.Sleep; use Sf.System.Sleep; 11 | 12 | procedure Main is 13 | 14 | Window : sfWindow_Ptr; 15 | Mode : sfVideoMode := (640, 480, 32); 16 | Event : aliased sfEvent; 17 | CursorHand : sfCursor_Ptr := Cursor.createFromSystem(Cursor.sfCursorHand); 18 | begin 19 | 20 | Window := Create (Mode, "Window"); 21 | if Window = null then 22 | Put_Line ("Failed to create window"); 23 | return; 24 | end if; 25 | setMouseCursor (Window, CursorHand); 26 | SetFramerateLimit (Window, 32); 27 | SetVerticalSyncEnabled (Window, sfTrue); 28 | 29 | while IsOpen (Window) = sfTrue loop 30 | while PollEvent (Window, Event'Access) = sfTrue loop 31 | if Event.eventType = sfEvtClosed then 32 | Close (Window); 33 | Put_Line ("Attempting to close"); 34 | end if; 35 | if Event.eventType = sfEvtKeyPressed then 36 | if Event.key.code = sfKeyEscape then 37 | Close (Window); 38 | Put_Line ("Attempting to close"); 39 | elsif 40 | Event.key.code = sfKeyC and 41 | Event.key.control = sfTrue then 42 | sf.Window.Clipboard.setString ("ASFML has copied to Clipboard"); 43 | setTitle (Window, "ASFML has copied to Clipboard"); 44 | elsif Event.key.code = sfKeyV and 45 | Event.key.control = sfTrue then 46 | Put_Line (sf.Window.Clipboard.getString); 47 | setTitle (Window, "ASFML has pasted to standard output"); 48 | end if; 49 | end if; 50 | end loop; 51 | Display (Window); 52 | sfSleep (sfSeconds (0.001)); 53 | end loop; 54 | Destroy (Window); 55 | 56 | end Main; 57 | -------------------------------------------------------------------------------- /tests/window/main.gpr: -------------------------------------------------------------------------------- 1 | with "../../asfml.gpr"; 2 | 3 | project Main is 4 | 5 | for Create_Missing_Dirs use "True"; 6 | 7 | for Source_Dirs use ("."); 8 | for Object_Dir use "obj"; 9 | for Main use ("main.adb", "unicode.adb"); 10 | for Exec_Dir use "."; 11 | 12 | package Compiler is 13 | 14 | -- This flag is for strings to be interpretedin UTF-8 by 15 | -- compiler. 16 | for Default_Switches ("Ada") use ("-gnatW8"); 17 | 18 | end Compiler; 19 | 20 | end Main; 21 | -------------------------------------------------------------------------------- /tests/window/unicode.adb: -------------------------------------------------------------------------------- 1 | with Ada.Wide_Wide_Text_IO; use Ada.Wide_Wide_Text_IO; 2 | with Sf.Window.Window; use Sf, Sf.Window, Sf.Window.Window; 3 | with Sf.Window.VideoMode; use Sf.Window.VideoMode; 4 | with Sf.Window.Event; use Sf.Window.Event; 5 | with Sf.Window.Keyboard; use Sf.Window.Keyboard; 6 | with Sf.Window.Clipboard; 7 | with Sf.Window.Cursor; 8 | 9 | with Sf.System.Time; use Sf.System.Time; 10 | with Sf.System.Sleep; use Sf.System.Sleep; 11 | 12 | procedure Unicode is 13 | 14 | Window : sfWindow_Ptr; 15 | Mode : sfVideoMode := (640, 480, 32); 16 | Event : aliased sfEvent; 17 | CursorHand : sfCursor_Ptr := Cursor.createFromSystem(Cursor.sfCursorHand); 18 | begin 19 | 20 | Window := Create (Mode, "Window"); 21 | if Window = null then 22 | Put_Line ("Failed to create window"); 23 | return; 24 | end if; 25 | setMouseCursor (Window, CursorHand); 26 | SetFramerateLimit (Window, 32); 27 | SetVerticalSyncEnabled (Window, sfTrue); 28 | 29 | while IsOpen (Window) = sfTrue loop 30 | while waitEvent (Window, Event'Access) = sfTrue loop 31 | if Event.eventType = sfEvtClosed then 32 | Close (Window); 33 | Put_Line ("Attempting to close"); 34 | end if; 35 | if Event.eventType = sfEvtKeyPressed then 36 | if Event.key.code = sfKeyEscape then 37 | Close (Window); 38 | Put_Line ("Attempting to close"); 39 | elsif 40 | Event.key.code = sfKeyC and 41 | Event.key.control = sfTrue then 42 | sf.Window.Clipboard.setUnicodeString ("„ASFML“ hat in die Zwischenablage kopiert"); 43 | setUnicodeTitle (Window, "„ASFML“ hat in die Zwischenablage kopiert"); 44 | elsif Event.key.code = sfKeyV and 45 | Event.key.control = sfTrue then 46 | Put_Line (sf.Window.Clipboard.getUnicodeString); 47 | setUnicodeTitle (Window, "„ASFML“ hat aus der Zwischenablage eingefügt"); 48 | end if; 49 | end if; 50 | end loop; 51 | Display (Window); 52 | end loop; 53 | Destroy (Window); 54 | 55 | end Unicode; 56 | -------------------------------------------------------------------------------- /tools/sfml-doc-tags.py: -------------------------------------------------------------------------------- 1 | class BriefTagHandler(GPS.InlineTagHandler): 2 | def __init__(self): 3 | super(BriefTagHandler, self).__init__('brief') 4 | 5 | def has_parameter(self): 6 | return False 7 | 8 | def to_markup(self, writer, parameter): 9 | writer.html('') 10 | 11 | class SeeTagHandler(GPS.InlineTagHandler): 12 | def __init__(self): 13 | super(SeeTagHandler, self).__init__('see') 14 | 15 | def has_parameter(self): 16 | return False 17 | 18 | def to_markup(self, writer, parameter): 19 | writer.html('

See: ') 20 | 21 | 22 | class WarningTagHandler(GPS.InlineTagHandler): 23 | def __init__(self): 24 | super(WarningTagHandler, self).__init__('warning') 25 | 26 | def has_parameter(self): 27 | return False 28 | 29 | def to_markup(self, writer, parameter): 30 | writer.html('

Warning! ') 31 | 32 | 33 | class DeprecatedTagHandler(GPS.InlineTagHandler): 34 | def __init__(self): 35 | super(DeprecatedTagHandler, self).__init__('deprecated') 36 | 37 | def has_parameter(self): 38 | return False 39 | 40 | def to_markup(self, writer, parameter): 41 | writer.html('

Deprecated! ') 42 | 43 | 44 | class ATagHandler(GPS.InlineTagHandler): 45 | def __init__(self): 46 | super(ATagHandler, self).__init__('a') 47 | 48 | def has_parameter(self): 49 | return True 50 | 51 | def to_markup(self, writer, parameter): 52 | writer.html(' %s ' % parameter) 53 | 54 | 55 | class PTagHandler(GPS.InlineTagHandler): 56 | def __init__(self): 57 | super(PTagHandler, self).__init__('p') 58 | 59 | def has_parameter(self): 60 | return True 61 | 62 | def to_markup(self, writer, parameter): 63 | writer.html(' %s ' % parameter) 64 | 65 | 66 | class CodeTagHandler(GPS.InlineTagHandler): 67 | def __init__(self): 68 | super(CodeTagHandler, self).__init__('code') 69 | 70 | def has_parameter(self): 71 | return False 72 | 73 | def to_markup(self, writer, parameter): 74 | writer.html('') 75 | 76 | 77 | class EndcodeTagHandler(GPS.InlineTagHandler): 78 | def __init__(self): 79 | super(EndcodeTagHandler, self).__init__('endcode') 80 | 81 | def has_parameter(self): 82 | return False 83 | 84 | def to_markup(self, writer, parameter): 85 | writer.html('') 86 | 87 | 88 | class LiTagHandler(GPS.InlineTagHandler): 89 | def __init__(self): 90 | super(LiTagHandler, self).__init__('li') 91 | 92 | def has_parameter(self): 93 | return False 94 | 95 | def to_markup(self, writer, parameter): 96 | writer.html('
• ') 97 | 98 | 99 | GPS.register_tag_handler(BriefTagHandler()) 100 | GPS.register_tag_handler(SeeTagHandler()) 101 | GPS.register_tag_handler(WarningTagHandler()) 102 | GPS.register_tag_handler(DeprecatedTagHandler()) 103 | GPS.register_tag_handler(ATagHandler()) 104 | GPS.register_tag_handler(PTagHandler()) 105 | GPS.register_tag_handler(CodeTagHandler()) 106 | GPS.register_tag_handler(EndcodeTagHandler()) 107 | GPS.register_tag_handler(LiTagHandler()) 108 | --------------------------------------------------------------------------------