Full Code of xyproto/sdl2-examples for AI

main 68d49f34dd12 cached
306 files
1.1 MB
314.4k tokens
4515 symbols
1 requests
Download .txt
Showing preview only (1,169K chars total). Download the full file or copy to clipboard to get everything.
Repository: xyproto/sdl2-examples
Branch: main
Commit: 68d49f34dd12
Files: 306
Total size: 1.1 MB

Directory structure:
gitextract_uhvoelxn/

├── .github/
│   ├── dependabot.yml
│   └── workflows/
│       ├── assembly.yml
│       ├── c.yml
│       ├── cplusplus.yml
│       ├── expired.yml
│       └── other.yml
├── .gitignore
├── COMPILES.md
├── LICENSE
├── Makefile
├── README.md
├── assembly/
│   ├── Makefile
│   ├── README.md
│   ├── linux-i386/
│   │   ├── Makefile
│   │   ├── README.md
│   │   └── main.asm
│   ├── linux-x86_64/
│   │   ├── Makefile
│   │   ├── README.md
│   │   └── main.asm
│   ├── macos-x86_64/
│   │   ├── Makefile
│   │   ├── README.md
│   │   └── main.asm
│   └── windows-x86_64/
│       ├── README.md
│       └── main.asm
├── bench.sh
├── c++11/
│   ├── Makefile
│   └── main.cpp
├── c++11-cmake/
│   ├── CMakeLists.txt
│   ├── README.md
│   └── main.cpp
├── c++14-cmake/
│   ├── CMakeLists.txt
│   ├── README.md
│   └── main.cpp
├── c++17-cmake/
│   ├── CMakeLists.txt
│   ├── README.md
│   └── main.cpp
├── c++20-cmake/
│   ├── CMakeLists.txt
│   ├── README.md
│   └── main.cpp
├── c++23-cmake/
│   ├── CMakeLists.txt
│   ├── README.md
│   └── main.cpp
├── c++98/
│   ├── Makefile
│   ├── README.md
│   └── main.cpp
├── c11/
│   ├── Makefile
│   ├── README.md
│   └── main.c
├── c18/
│   ├── Makefile
│   ├── README.md
│   └── main.c
├── c2x/
│   ├── Makefile
│   ├── README.md
│   └── main.c
├── c89/
│   ├── Makefile
│   ├── README.md
│   └── main.c
├── c99/
│   ├── Makefile
│   ├── README.md
│   └── main.c
├── crystal/
│   ├── Makefile
│   ├── README.md
│   ├── main.cr
│   └── shard.yml
├── csharp/
│   ├── Makefile
│   ├── README.md
│   ├── main.cs
│   └── main.csproj
├── d/
│   ├── .gitignore
│   ├── Makefile
│   ├── README.md
│   ├── dub.json
│   ├── dub.selections.json
│   └── source/
│       └── app.d
├── dart/
│   ├── Makefile
│   ├── main.dart
│   └── pubspec.yaml
├── freebasic/
│   ├── Makefile
│   ├── README.md
│   └── main.bas
├── fsharp/
│   ├── Makefile
│   ├── main.fs
│   └── main.fsproj
├── gambas/
│   ├── .directory
│   ├── .gitignore
│   ├── .project
│   ├── .src/
│   │   └── MMain.module
│   └── Makefile
├── gccgo/
│   ├── Makefile
│   ├── README.md
│   ├── go.mod
│   ├── go.sum
│   ├── main.go
│   └── vendor/
│       ├── github.com/
│       │   └── veandco/
│       │       └── go-sdl2/
│       │           ├── CONTRIBUTORS.md
│       │           ├── LICENSE
│       │           ├── _libs/
│       │           │   └── dummy.go
│       │           ├── img/
│       │           │   ├── sdl_image.go
│       │           │   ├── sdl_image_cgo.go
│       │           │   ├── sdl_image_cgo_static.go
│       │           │   └── sdl_image_wrapper.h
│       │           └── sdl/
│       │               ├── TODO.md
│       │               ├── audio.go
│       │               ├── blendmode.go
│       │               ├── clipboard.go
│       │               ├── cpuinfo.go
│       │               ├── endian.go
│       │               ├── error.go
│       │               ├── events.c
│       │               ├── events.go
│       │               ├── events.h
│       │               ├── filesystem.go
│       │               ├── gamecontroller.go
│       │               ├── gesture.go
│       │               ├── guid.go
│       │               ├── haptic.go
│       │               ├── helpers.go
│       │               ├── hidapi.go
│       │               ├── hints.c
│       │               ├── hints.go
│       │               ├── hints.h
│       │               ├── joystick.go
│       │               ├── keyboard.go
│       │               ├── keycode.go
│       │               ├── loadso.go
│       │               ├── log.c
│       │               ├── log.go
│       │               ├── log.h
│       │               ├── mouse.go
│       │               ├── mutex.go
│       │               ├── pixels.go
│       │               ├── power.go
│       │               ├── rect.go
│       │               ├── render.go
│       │               ├── rwops.go
│       │               ├── scancode.go
│       │               ├── sdl.go
│       │               ├── sdl_cgo.go
│       │               ├── sdl_cgo_static.go
│       │               ├── sdl_wrapper.h
│       │               ├── sensor.go
│       │               ├── shape.go
│       │               ├── surface.go
│       │               ├── sysrender.go
│       │               ├── system.c
│       │               ├── system.go
│       │               ├── system.h
│       │               ├── system_android.go
│       │               ├── system_linux.go
│       │               ├── system_windows.go
│       │               ├── syswm.go
│       │               ├── syswm_cocoa.go
│       │               ├── syswm_dfb.go
│       │               ├── syswm_uikit.go
│       │               ├── syswm_vivante.go
│       │               ├── syswm_windows.go
│       │               ├── syswm_x11.go
│       │               ├── thread.go
│       │               ├── timer.go
│       │               ├── touch.go
│       │               ├── version.go
│       │               ├── video.go
│       │               └── vulkan.go
│       └── modules.txt
├── go/
│   ├── Makefile
│   ├── README.md
│   ├── go.mod
│   ├── go.sum
│   ├── main.go
│   └── vendor/
│       ├── github.com/
│       │   └── veandco/
│       │       └── go-sdl2/
│       │           ├── CONTRIBUTORS.md
│       │           ├── LICENSE
│       │           ├── _libs/
│       │           │   └── dummy.go
│       │           ├── img/
│       │           │   ├── sdl_image.go
│       │           │   ├── sdl_image_cgo.go
│       │           │   ├── sdl_image_cgo_static.go
│       │           │   └── sdl_image_wrapper.h
│       │           └── sdl/
│       │               ├── TODO.md
│       │               ├── audio.go
│       │               ├── blendmode.go
│       │               ├── clipboard.go
│       │               ├── cpuinfo.go
│       │               ├── endian.go
│       │               ├── error.go
│       │               ├── events.c
│       │               ├── events.go
│       │               ├── events.h
│       │               ├── filesystem.go
│       │               ├── gamecontroller.go
│       │               ├── gesture.go
│       │               ├── guid.go
│       │               ├── haptic.go
│       │               ├── helpers.go
│       │               ├── hidapi.go
│       │               ├── hints.c
│       │               ├── hints.go
│       │               ├── hints.h
│       │               ├── joystick.go
│       │               ├── keyboard.go
│       │               ├── keycode.go
│       │               ├── loadso.go
│       │               ├── log.c
│       │               ├── log.go
│       │               ├── log.h
│       │               ├── mouse.go
│       │               ├── mutex.go
│       │               ├── pixels.go
│       │               ├── power.go
│       │               ├── rect.go
│       │               ├── render.go
│       │               ├── rwops.go
│       │               ├── scancode.go
│       │               ├── sdl.go
│       │               ├── sdl_cgo.go
│       │               ├── sdl_cgo_static.go
│       │               ├── sdl_wrapper.h
│       │               ├── sensor.go
│       │               ├── shape.go
│       │               ├── surface.go
│       │               ├── sysrender.go
│       │               ├── system.c
│       │               ├── system.go
│       │               ├── system.h
│       │               ├── system_android.go
│       │               ├── system_linux.go
│       │               ├── system_windows.go
│       │               ├── syswm.go
│       │               ├── syswm_cocoa.go
│       │               ├── syswm_dfb.go
│       │               ├── syswm_uikit.go
│       │               ├── syswm_vivante.go
│       │               ├── syswm_windows.go
│       │               ├── syswm_x11.go
│       │               ├── thread.go
│       │               ├── timer.go
│       │               ├── touch.go
│       │               ├── version.go
│       │               ├── video.go
│       │               └── vulkan.go
│       └── modules.txt
├── haskell/
│   ├── .gitignore
│   ├── Makefile
│   ├── README.md
│   ├── Setup.hs
│   ├── app/
│   │   └── Main.hs
│   ├── grumpycat.cabal
│   ├── package.yaml
│   ├── src/
│   │   └── Lib.hs
│   ├── stack.yaml
│   └── test/
│       └── Spec.hs
├── include/
│   └── sdl2.h
├── java22/
│   ├── Main.java
│   ├── Makefile
│   └── README.md
├── kotlin/
│   ├── .gitignore
│   ├── Main.kt
│   ├── Makefile
│   ├── README.md
│   └── sdl2.def
├── lisp/
│   ├── Makefile
│   ├── README.md
│   └── main.lisp
├── lua/
│   ├── Makefile
│   ├── README.md
│   └── main.lua
├── mruby/
│   ├── Makefile
│   ├── README.md
│   └── main.rb
├── nim/
│   ├── Makefile
│   ├── README.md
│   └── main.nim
├── objc-cmake/
│   ├── CMakeLists.txt
│   ├── README.md
│   └── main.m
├── objectpascal/
│   ├── Makefile
│   ├── README.md
│   ├── checkout.sh
│   └── main.pas
├── ocaml/
│   ├── Makefile
│   ├── README.md
│   └── main.ml
├── odin/
│   ├── Makefile
│   ├── README.md
│   └── main.odin
├── python/
│   ├── Makefile
│   ├── README.md
│   └── main.py
├── ring/
│   ├── Makefile
│   ├── README.md
│   └── main.ring
├── run.sh
├── rust/
│   ├── .gitignore
│   ├── Cargo.toml
│   ├── Makefile
│   ├── README.md
│   └── src/
│       └── main.rs
├── scala/
│   ├── Main.scala
│   ├── Makefile
│   ├── README.md
│   ├── build.sbt
│   └── project/
│       └── plugins.sbt
├── v/
│   ├── Makefile
│   ├── README.md
│   └── main.v
└── zig/
    ├── Makefile
    ├── README.md
    ├── build.zig
    └── main.zig

================================================
FILE CONTENTS
================================================

================================================
FILE: .github/dependabot.yml
================================================
# Set update schedule for GitHub Actions

version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      # Check for updates to GitHub Actions every weekday
      interval: "daily" 


================================================
FILE: .github/workflows/assembly.yml
================================================
name: assembly-examples

on:
  push:
    branches:
    - '*'
    paths:
      - assembly/**
  pull_request:
    branches:
    - '*'
    paths:
      - assembly/**
  workflow_dispatch:

jobs:
  make:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        tests_list:
        - { folder: "assembly/linux-x86_64" }
    steps:
      - uses: actions/checkout@v4
      - name: install_dependencies
        run: |
          sudo apt update
          sudo apt install -y gnupg libgmp-dev libsdl2-dev libsdl2-image-dev nasm ninja-build
      - name: build
        run: |
              cd ${{ matrix.tests_list.folder }}
              make all


================================================
FILE: .github/workflows/c.yml
================================================
name: c-examples

on:
  push:
    branches:
    - '*'
    paths:
      - c1*/**
      - c2*/**
      - c8*/**
      - c9*/**
  pull_request:
    branches:
    - '*'
    paths:
      - c1*/**
      - c2*/**
      - c8*/**
      - c9*/**
  workflow_dispatch:

jobs:
  make:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        tests_list:
        - { folder: "c89" }
        - { folder: "c99" }
        - { folder: "c11" }
        - { folder: "c18" }
        - { folder: "c2x" }
    steps:
      - uses: actions/checkout@v4
      - name: install_dependencies
        run: |
          sudo apt update
          sudo apt install -y cmake curl gnupg libgmp-dev libsdl2-dev libsdl2-image-dev nasm ninja-build
      - name: build
        run: |
              cd ${{ matrix.tests_list.folder }}
              make all


================================================
FILE: .github/workflows/cplusplus.yml
================================================
name: c-plus-plus-examples

on:
  push:
    branches:
    - '*'
    paths:
    - 'c*-*/**'
  pull_request:
    branches:
    - '*'
    paths:
    - 'c*-*/**'

jobs:
  cmake:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        tests_list:
        - { folder: "c++11-cmake" }
        - { folder: "c++14-cmake" }
        - { folder: "c++17-cmake" }
        - { folder: "c++20-cmake" }
        - { folder: "c++23-cmake" }
    steps:
      - uses: actions/checkout@v4
      - name: install_dependencies
        run: |
          sudo apt update
          sudo apt install -y libsdl2-dev ninja-build cmake
      - name: build
        run: |
              cd ${{ matrix.tests_list.folder }}
              cmake -S . -B build -G Ninja
              ninja -C build
  make:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        tests_list:
        - { folder: "c++98" }
        - { folder: "c++11" }
    steps:
      - uses: actions/checkout@v4
      - name: install_dependencies
        run: |
          sudo apt update
          sudo apt install -y cmake curl gnupg libgmp-dev libsdl2-dev libsdl2-image-dev mono-devel mono-mcs mono-runtime mono-vbnc nasm ninja-build
          curl -fsSL https://crystal-lang.org/install.sh | sudo bash -s -- --channel=stable
      - name: build
        run: |
              cd ${{ matrix.tests_list.folder }}
              make all


================================================
FILE: .github/workflows/expired.yml
================================================
name: 'Close stale issues and PRs'
on:
  schedule:
    - cron: '0 */8 * * *'
jobs:
  stale:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/stale@v9
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}
          exempt-issue-milestones: 'future,alpha,beta,release,bugfix,improvement,enhancement,help wanted'
          exempt-pr-milestones: 'bugfix,improvement,enhancement,help wanted'
          exempt-all-pr-assignees: true
          stale-issue-message: 'This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
          stale-pr-message: 'This PR is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 30 days.'
          close-issue-message: 'This issue was closed because it has been stalled for 30 days with no activity.'
          close-pr-message: 'This PR was closed because it has been stalled for 30 days with no activity.'
          days-before-issue-stale: 120
          days-before-pr-stale: 120
          days-before-issue-close: 30
          days-before-pr-close: 30


================================================
FILE: .github/workflows/other.yml
================================================
name: other-examples

on:
  push:
    branches:
    - '*'
    paths:
      - crystal/
      - csharp/
  pull_request:
    branches:
    - '*'
    paths:
      - crystal/
      - csharp/
  workflow_dispatch:

jobs:
  make:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        tests_list:
        - { folder: "crystal" }
        - { folder: "csharp" }
    steps:
      - uses: actions/checkout@v4
      - name: install_dependencies
        run: |
          sudo apt update
          sudo apt install -y cmake curl gnupg libgmp-dev libsdl2-dev libsdl2-image-dev mono-devel mono-mcs mono-runtime mono-vbnc nasm ninja-build
          curl -fsSL https://crystal-lang.org/install.sh | sudo bash -s -- --channel=stable
      - name: build
        run: |
              cd ${{ matrix.tests_list.folder }}
              make all


================================================
FILE: .gitignore
================================================
# macOS
.DS_Store

# C3
*.dSYM

# Java
*.jar

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Compiled Dynamic libraries
*.so
*.dylib

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Crystal
crystal/sdl.cr/
crystal/lib
crystal/bin/

# F#
fsharp/bin/
fsharp/obj/

# OCaml
*.cmi
*.cmx

# Executables
*.exe
*.out
*.app
main
small
go/go

# Nimrod cache
nimcache

# Rust
rust/sdl2/
Cargo.lock

# C++
c++20-cxx/c++20-cxx
c*/*.asm

# Temporary databases
*.dblite

# CMake
build/
CMakeCache.txt
CMakeFiles
inst/

# Ada
*.ali
*.ads
*.adb
*.adb.std*
*.bexch

# Zig
zig/zig-cache
zig/*.s
zig/zig

# Common Lisp
lisp/quicklisp/
lisp/quicklisp.lisp

# FreeBASIC
freebasic/main

# Odin
odin/main

# Object Pascal
fpc/*.res
objectpascal/*.res
*.ppu
fpc/SDL2/
objectpascal/SDL2/

# Scala
scalanative/project/build.properties
scalanative/target/
scalanative/project/target/
scalanative/project/project/
scalanative/main.jar

# Dart
dart/.dart_tool
dart/pubspec.lock

# C#
csharp/bin/
csharp/obj/
csharp/*.exe

zig/.*cache*


================================================
FILE: COMPILES.md
================================================
## Does it compile and/or run?

| Directory    | ArchLinux | macOS/M2 | Comment                                          |
|--------------|-----------|----------|--------------------------------------------------|
| ada          | yes       | no       | look into Alire                                  |
| c++11        |           | yes      |                                                  |
| c++11-cmake  |           | yes      |                                                  |
| c++14-cmake  |           | yes      |                                                  |
| c++17-cmake  |           | yes      |                                                  |
| c++20-cmake  |           | yes      |                                                  |
| c++23-cmake  |           | yes      |                                                  |
| c++98        |           | yes      |                                                  |
| c2x          |           | yes      |                                                  |
| c11          |           | yes      |                                                  |
| c18          |           | yes      |                                                  |
| c89          |           | yes      |                                                  |
| c99          |           | yes      |                                                  |
| crystal      |           | yes      |                                                  |
| csharp       |           | yes      | does not run on M2                               |
| d            |           | yes      | does not run on M2                               |
| freebasic    |           |          | not in homebrew                                  |
| gambas       |           |          | not in homebrew                                  |
| gccgo        | yes       |          | not in homebrew (might be, with the right flags) |
| go           | yes       | yes      |                                                  |
| haskell      |           |          |                                                  |
| lisp         |           | no       |                                                  |
| lua          |           |          |                                                  |
| mruby        |           |          |                                                  |
| nim          |           |          |                                                  |
| objectpascal |           |          |                                                  |
| ocaml        |           |          |                                                  |
| odin         |           |          |                                                  |
| pony         |           |          |                                                  |
| python       |           |          |                                                  |
| ring         |           |          |                                                  |
| rust         |           | no       | needs homebrew paths                             |
| v            |           |          |                                                  |
| zig          |           | no       | tried adding lib, include and framework paths    |


================================================
FILE: LICENSE
================================================
Copyright 2023 Alexander F. Rødseth

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


================================================
FILE: Makefile
================================================
SAMPLES = assembly c89 c99 c11 c18 c++98 c++11 d objectivepascal go haskell mruby nim odin pony python ring rust v zig

# These two currently does not build:
# SAMPLES += ocaml

# gccgo works, but installing gccgo conflicts with go
# SAMPLES += gccgo

.PHONY: all run clean fullclean

all:
	@-$(foreach x,$(SAMPLES),make -C $(x);)

run:
	@-$(foreach x,$(SAMPLES),make -C $(x) run;)

clean:
	@-$(foreach x,$(SAMPLES),make -C $(x) clean;)

fullclean:
	@-$(foreach x,$(SAMPLES),make -C $(x) fullclean;)


================================================
FILE: README.md
================================================
SDL2 Examples
=============

[![sdl2-examples](https://github.com/xyproto/sdl2-examples/actions/workflows/main.yml/badge.svg)](https://github.com/xyproto/sdl2-examples/actions/workflows/main.yml)

"hello world" for SDL2 for various programming languages.

Each sample creates a window, displays an image, then waits two seconds and quits.

All executables should ideally build and run on Linux, macOS, Windows, BSD* and more, but they should at least work on Linux. Most subdirectories contains `README.md` files with more details, and a `Makefile` to have one way of building each sample.

For newer versions of macOS, the programs also appear to need an event loop for the window to show up, so I'm in the process of adding that to each example. The window just isn't shown if there is no event loop.


Requirements
------------

* The SDL 2 library.
* See the README.md file per sample for more information.


Requirements for some of the languages
--------------------------------------

* C compiler that supports C89 (ANSI C), C99 or C11, for the C samples
* A C++ compiler for the C++ sample
* GCC 4.8 or later (or clang++) for the C++11 sample
* Go 1.1 or later and the sdl2 go package (`go get github.com/veandco/go-sdl2/sdl`)
* MRuby with SDL2 added to the configuration file
* Nim 0.9.4 and sdl2 installed with babel
* Python 2 or 3 and PySDL2
* FPC 2.6.4 (or later than 2.4.0, must have Uint8, Uint16 and Uint32)
* Lua (tested with Lua 5.3) and lua-sdl2
* If `tcc` is used for compiling one of the C examples, make sure to add [`-DSDL_DISABLE_IMMINTRIN_H=1`](https://www.mail-archive.com/tinycc-devel@nongnu.org/msg08821.html).


Languages that are not added yet
--------------------------------

- [ ] Ada (but there is an `ada` branch if you wish to give it a spin. Please create a PR if it works on Arch Linux and/or the Linux CI test passes!).
- [ ] C3 (but there is a `c3` branch with "Hello World" in C3).
- [ ] Fortran
- [ ] Scheme

Pull requests are welcome.


General information
----------------------

* License: BSD-3


================================================
FILE: assembly/Makefile
================================================
PLATFORMS = linux-i386 linux-x86_64

.PHONY: all run clean fullclean

all:
	@-$(foreach x,$(PLATFORMS),make -C $(x);)

run:
	@-$(foreach x,$(PLATFORMS),make -C $(x) run;)

clean:
	@-$(foreach x,$(PLATFORMS),make -C $(x) clean;)

fullclean:
	@-$(foreach x,$(PLATFORMS),make -C $(x) fullclean;)


================================================
FILE: assembly/README.md
================================================
Note that the executables that are generated from Assembly are only intended to work on the target system they are crafted for.


================================================
FILE: assembly/linux-i386/Makefile
================================================
.PHONY: all msg clean fullclean

# Look for libraries in /usr/lib32 when linking if on i386, i686 or x86_32
ifeq ($(findstring $(shell uname -m),i386 i686 x86_32),)
LDFLAGS+=-L/usr/lib32
endif

all: msg main

msg:
	@echo '--- i386 ---'

main:
	nasm -felf32 main.asm -o main.o
	ld -m elf_i386 main.o -o main -dynamic-linker /lib/ld-linux.so.* -lc -lSDL2 $(LDFLAGS)

run: msg main
	time ./main

clean:
	rm -f main main.o

fullclean: clean


================================================
FILE: assembly/linux-i386/README.md
================================================
Requirements
------------

* nasm
* sdl2


================================================
FILE: assembly/linux-i386/main.asm
================================================
section .text
global _start

extern printf
extern exit
extern SDL_Init
extern SDL_CreateWindow
extern SDL_CreateRenderer
extern SDL_LoadBMP_RW
extern SDL_RWFromFile
extern SDL_CreateTextureFromSurface
extern SDL_FreeSurface
extern SDL_RenderClear
extern SDL_RenderCopy
extern SDL_RenderPresent
extern SDL_Delay
extern SDL_DestroyTexture
extern SDL_DestroyRenderer
extern SDL_DestroyWindow
extern SDL_Quit
extern SDL_GetError

_start:
  push 62001
  call SDL_Init
  add esp, 4
  cmp eax, 0
  jl init_err
  push 4
  push 387
  push 620
  push 100
  push 100
  push create_window_arg0
  call SDL_CreateWindow
  add esp, 24
  cmp eax, 0
  je create_window_err
  mov ebx, eax
  push 6
  push -1
  push eax
  call SDL_CreateRenderer
  add esp, 12
  cmp eax, 0
  je create_renderer_err
  mov esi, eax
  push readbin
  push bmp_path
  call SDL_RWFromFile
  add esp, 8
  push 1
  push eax
  call SDL_LoadBMP_RW
  add esp, 8
  cmp eax, 0
  je load_bmp_err
  mov edi, eax
  push eax
  push esi
  call SDL_CreateTextureFromSurface
  add esp, 8
  cmp eax, 0
  je create_tfs_err
  push edi
  mov edi, eax
  call SDL_FreeSurface
  add esp, 4
  push ebx
  xor ebx, ebx
loop0:
  push esi
  call SDL_RenderClear
  add esp, 4
  push 0
  push 0
  push edi
  push esi
  call SDL_RenderCopy
  add esp, 16
  push esi
  call SDL_RenderPresent
  add esp, 4
  push 100
  call SDL_Delay
  add esp, 4
  inc ebx
  cmp ebx, 20
  jl loop0
  pop ebx
  push edi
  call SDL_DestroyTexture
  add esp, 4
  push esi
  call SDL_DestroyRenderer
  add esp, 4
  push ebx
  call SDL_DestroyWindow
  add esp, 4
  call SDL_Quit
  push 0
  call exit
init_err:
  call SDL_GetError
  push eax
  push init_err_msg
  call printf
  add esp, 8
  push 8
  call exit
create_window_err:
  call SDL_GetError
  push eax
  push create_window_err_msg
  call printf
  add esp, 8
  push 8
  call exit
create_renderer_err:
  call SDL_GetError
  push eax
  push create_renderer_err_msg
  call printf
  add esp, 8
  push ebx
  call SDL_DestroyWindow
  add esp, 4
  call SDL_Quit
  push 8
  call exit
load_bmp_err:
  call SDL_GetError
  push eax
  push load_bmp_err_msg
  call printf
  add esp, 8
  push esi
  call SDL_DestroyRenderer
  add esp, 4
  push ebx
  call SDL_DestroyWindow
  add esp, 4
  call SDL_Quit
  push 8
  call exit
create_tfs_err:
  call SDL_GetError
  push eax
  push create_tfs_err_msg
  call printf
  add esp, 8
  push edi
  call SDL_FreeSurface
  add esp, 4
  push esi
  call SDL_DestroyRenderer
  add esp, 4
  push ebx
  call SDL_DestroyWindow
  add esp, 4
  call SDL_Quit
  push 8
  call exit


section .data

init_err_msg            db "SDL_Init Error: %s", 10, 0

create_window_arg0      db "Hello World!", 0

create_window_err_msg   db "SDL_CreateWindow Error: %s", 10, 0

create_renderer_err_msg db "SDL_CreateRenderer Error: %s", 10, 0

bmp_path                db "../../img/grumpy-cat.bmp", 0

readbin                 db "rb", 0

load_bmp_err_msg        db "SDL_LoadBMP Error: %s", 10, 0

create_tfs_err_msg      db "SDL_CreateTextureFromSurface Error: %s", 10, 0


================================================
FILE: assembly/linux-x86_64/Makefile
================================================
.PHONY: all msg clean fullclean

all: msg main

msg:
	@echo '--- x86_64 ---'

main:
	nasm -felf64 main.asm -o main.o
	ld main.o -o main -dynamic-linker /lib64/ld-linux-x86-64.so.* -lc -lSDL2

run: msg main
	time ./main

clean:
	rm -f main main.o

fullclean: clean


================================================
FILE: assembly/linux-x86_64/README.md
================================================
Requirements
------------

* nasm
* sdl2


================================================
FILE: assembly/linux-x86_64/main.asm
================================================
section .text
global _start

extern printf
extern exit
extern SDL_Init
extern SDL_CreateWindow
extern SDL_CreateRenderer
extern SDL_LoadBMP_RW
extern SDL_RWFromFile
extern SDL_CreateTextureFromSurface
extern SDL_FreeSurface
extern SDL_RenderClear
extern SDL_RenderCopy
extern SDL_RenderPresent
extern SDL_Delay
extern SDL_DestroyTexture
extern SDL_DestroyRenderer
extern SDL_DestroyWindow
extern SDL_Quit
extern SDL_GetError

_start:
  mov rdi, 62001
  call SDL_Init
  cmp rax, 0
  jl init_err
  mov rdi, create_window_arg0
  mov rsi, 100
  mov rdx, 100
  mov rcx, 620
  mov r8, 387
  mov r9, 4
  call SDL_CreateWindow
  cmp rax, 0
  je create_window_err
  mov r12, rax
  mov rdi, rax
  mov rsi, -1
  mov rdx, 6
  call SDL_CreateRenderer
  cmp rax, 0
  je create_renderer_err
  mov r13, rax
  mov rdi, bmp_path
  mov rsi, readbin
  call SDL_RWFromFile
  mov rdi, rax
  mov rsi, 1
  call SDL_LoadBMP_RW
  cmp rax, 0
  je load_bmp_err
  mov r14, rax
  mov rdi, r13
  mov rsi, rax
  call SDL_CreateTextureFromSurface
  cmp rax, 0
  je create_tfs_err
  mov r15, rax
  mov rdi, r14
  call SDL_FreeSurface
  xor r14, r14
loop0:
  mov rdi, r13
  call SDL_RenderClear
  mov rdi, r13
  mov rsi, r15
  mov rdx, 0
  mov rcx, 0
  call SDL_RenderCopy
  mov rdi, r13
  call SDL_RenderPresent
  mov rdi, 100
  call SDL_Delay
  inc r14
  cmp r14, 20
  jl loop0
  mov rdi, r15
  call SDL_DestroyTexture
  mov rdi, r13
  call SDL_DestroyRenderer
  mov rdi, r12
  call SDL_DestroyWindow
  call SDL_Quit
  mov rdi, 0
  call exit
init_err:
  call SDL_GetError
  mov rsi, rax
  mov rdi, init_err_msg
  call printf
  mov rdi, 8
  call exit
create_window_err:
  call SDL_GetError
  mov rsi, rax
  mov rdi, create_window_err_msg
  call printf
  mov rdi, 8
  call exit
create_renderer_err:
  call SDL_GetError
  mov rsi, rax
  mov rdi, create_renderer_err_msg
  call printf
  mov rdi, r12
  call SDL_DestroyWindow
  call SDL_Quit
  mov rdi, 8
  call exit
load_bmp_err:
  call SDL_GetError
  mov rsi, rax
  mov rdi, load_bmp_err_msg
  call printf
  mov rdi, r13
  call SDL_DestroyRenderer
  mov rdi, r12
  call SDL_DestroyWindow
  call SDL_Quit
  mov rdi, 8
  call exit
create_tfs_err:
  call SDL_GetError
  mov rsi, rax
  mov rdi, create_tfs_err_msg
  call printf
  mov rdi, r14
  call SDL_FreeSurface
  mov rdi, r13
  call SDL_DestroyRenderer
  mov rdi, r12
  call SDL_DestroyWindow
  call SDL_Quit
  mov rdi, 8
  call exit


section .data

init_err_msg            db "SDL_Init Error: %s", 10, 0

create_window_arg0      db "Hello World!", 0

create_window_err_msg   db "SDL_CreateWindow Error: %s", 10, 0

create_renderer_err_msg db "SDL_CreateRenderer Error: %s", 10, 0

bmp_path                db "../../img/grumpy-cat.bmp", 0

readbin                 db "rb", 0

load_bmp_err_msg        db "SDL_LoadBMP Error: %s", 10, 0

create_tfs_err_msg      db "SDL_CreateTextureFromSurface Error: %s", 10, 0

;asdf


================================================
FILE: assembly/macos-x86_64/Makefile
================================================
.PHONY: all msg clean fullclean

all: msg main

msg:
	@echo '--- x86_64 ---'

main:
	nasm -fmacho64 main.asm -o main.o
	ld main.o -o main -lc -lSDL2

run: msg main
	time ./main

clean:
	rm -f main main.o

fullclean: clean


================================================
FILE: assembly/macos-x86_64/README.md
================================================
Requirements
------------

* nasm
* Xcode Command Line Tools
* sdl2


================================================
FILE: assembly/macos-x86_64/main.asm
================================================
section .text
global _main

extern _printf
extern _exit
extern _SDL_Init
extern _SDL_CreateWindow
extern _SDL_CreateRenderer
extern _SDL_LoadBMP_RW
extern _SDL_RWFromFile
extern _SDL_CreateTextureFromSurface
extern _SDL_FreeSurface
extern _SDL_RenderClear
extern _SDL_RenderCopy
extern _SDL_RenderPresent
extern _SDL_Delay	
extern _SDL_DestroyTexture
extern _SDL_DestroyRenderer
extern _SDL_DestroyWindow
extern _SDL_Quit
extern _SDL_GetError

_main:
	sub rsp, 8
	mov rdi, 62001
	call _SDL_Init
	cmp rax, 0
	jl init_err
	mov rdi, create_window_arg0
	mov rsi, 100
	mov rdx, 100
	mov rcx, 960
	mov r8, 720
	mov r9, 4
	call _SDL_CreateWindow
	cmp rax, 0
	je create_window_err
	mov r12, rax
	mov rdi, rax
	mov rsi, -1
	mov rdx, 6
	call _SDL_CreateRenderer
	cmp rax, 0
	je create_renderer_err
	mov r13, rax
	mov rdi, bmp_path
	mov rsi, readbin
	call _SDL_RWFromFile
	mov rdi, rax
	mov rsi, 1
	call _SDL_LoadBMP_RW
	cmp rax, 0
	je load_bmp_err
	mov r14, rax
	mov rdi, r13
	mov rsi, rax
	call _SDL_CreateTextureFromSurface
	cmp rax, 0
	je create_tfs_err
	mov r15, rax
	mov rdi, r14
	call _SDL_FreeSurface
	xor r14, r14
loop0:
	mov rdi, r13
	call _SDL_RenderClear
	mov rdi, r13
	mov rsi, r15
	mov rdx, 0
	mov rcx, 0
	call _SDL_RenderCopy	
	mov rdi, r13
	call _SDL_RenderPresent	
	mov rdi, 100
	call _SDL_Delay
	inc r14
	cmp r14, 20
	jl loop0
	mov rdi, r15
	call _SDL_DestroyTexture
	mov rdi, r13
	call _SDL_DestroyRenderer
	mov rdi, r12
	call _SDL_DestroyWindow
	call _SDL_Quit
	mov rdi, 0
	call _exit
init_err:
	call _SDL_GetError
	mov rsi, rax
	mov rdi, init_err_msg
	call _printf
	mov rdi, 8
	call _exit
create_window_err:
	call _SDL_GetError
	mov rsi, rax
	mov rdi, create_window_err_msg
	call _printf
	mov rdi, 8
	call _exit
create_renderer_err:
	call _SDL_GetError
	mov rsi, rax
	mov rdi, create_renderer_err_msg
	call _printf
	mov rdi, r12
	call _SDL_DestroyWindow
	call _SDL_Quit
	mov rdi, 8
	call _exit
load_bmp_err:
	call _SDL_GetError
	mov rsi, rax
	mov rdi, load_bmp_err_msg
	call _printf
	mov rdi, r13
	call _SDL_DestroyRenderer
	mov rdi, r12
	call _SDL_DestroyWindow
	call _SDL_Quit
	mov rdi, 8
	call _exit
create_tfs_err:
	call _SDL_GetError
	mov rsi, rax
	mov rdi, create_tfs_err_msg
	call _printf
	mov rdi, r14
	call _SDL_FreeSurface
	mov rdi, r13
	call _SDL_DestroyRenderer
	mov rdi, r12
	call _SDL_DestroyWindow
	call _SDL_Quit
	mov rdi, 8
	call _exit


section .data

init_err_msg            db "SDL_Init Error: %s", 10, 0

create_window_arg0      db "Hello World!", 0
	
create_window_err_msg   db "SDL_CreateWindow Error: %s", 10, 0

create_renderer_err_msg db "SDL_CreateRenderer Error: %s", 10, 0

bmp_path                db "../../img/grumpy-cat.bmp", 0

readbin                 db "rb", 0

load_bmp_err_msg        db "SDL_LoadBMP Error: %s", 10, 0

create_tfs_err_msg      db "SDL_CreateTextureFromSurface Error: %s", 10, 0


================================================
FILE: assembly/windows-x86_64/README.md
================================================
Requirements
------------

* nasm
* GoLink
* sdl2


================================================
FILE: assembly/windows-x86_64/main.asm
================================================
section .text
global Start

extern printf
extern exit
extern SDL_Init
extern SDL_CreateWindow
extern SDL_CreateRenderer
extern SDL_LoadBMP_RW
extern SDL_RWFromFile
extern SDL_CreateTextureFromSurface
extern SDL_FreeSurface
extern SDL_RenderClear
extern SDL_RenderCopy
extern SDL_RenderPresent
extern SDL_Delay	
extern SDL_DestroyTexture
extern SDL_DestroyRenderer
extern SDL_DestroyWindow
extern SDL_Quit
extern SDL_GetError

Start:
	sub rsp, 56
	mov rcx, 62001
	call SDL_Init
	cmp rax, 0
	jl init_err
	mov rcx, create_window_arg0
	mov rdx, 100
	mov r8, 100
	mov r9, 960
	mov qword [rsp+32], 720
	mov qword [rsp+40], 4
	call SDL_CreateWindow
	cmp rax, 0
	je create_window_err
	mov r12, rax
	mov rcx, rax
	mov rdx, -1
	mov r8, 6
	call SDL_CreateRenderer
	cmp rax, 0
	je create_renderer_err
	mov r13, rax
	mov rcx, bmp_path
	mov rdx, readbin
	call SDL_RWFromFile
	mov rcx, rax
	mov rdx, 1
	call SDL_LoadBMP_RW
	cmp rax, 0
	je load_bmp_err
	mov r14, rax
	mov rcx, r13
	mov rdx, rax
	call SDL_CreateTextureFromSurface
	cmp rax, 0
	je create_tfs_err
	mov r15, rax
	mov rcx, r14
	call SDL_FreeSurface
	xor r14, r14
loop0:
	mov rcx, r13
	call SDL_RenderClear
	mov rcx, r13
	mov rdx, r15
	mov r8, 0
	mov r9, 0
	call SDL_RenderCopy	
	mov rcx, r13
	call SDL_RenderPresent	
	mov rcx, 100
	call SDL_Delay
	inc r14
	cmp r14, 20
	jl loop0
	mov rcx, r15
	call SDL_DestroyTexture
	mov rcx, r13
	call SDL_DestroyRenderer
	mov rcx, r12
	call SDL_DestroyWindow
	call SDL_Quit
	add rsp, 56
	mov rcx, 0
	call exit
init_err:
	call SDL_GetError
	mov rdx, rax
	mov rcx, init_err_msg
	call printf
	add rsp, 56
	mov rcx, 8
	call exit
create_window_err:
	call SDL_GetError
	mov rdx, rax
	mov rcx, create_window_err_msg
	call printf
	add rsp, 56
	mov rcx, 8
	call exit
create_renderer_err:
	call SDL_GetError
	mov rdx, rax
	mov rcx, create_renderer_err_msg
	call printf
	mov rcx, r12
	call SDL_DestroyWindow
	call SDL_Quit
	add rsp, 56
	mov rcx, 8
	call exit
load_bmp_err:
	call SDL_GetError
	mov rdx, rax
	mov rcx, load_bmp_err_msg
	call printf
	mov rcx, r13
	call SDL_DestroyRenderer
	mov rcx, r12
	call SDL_DestroyWindow
	call SDL_Quit
	add rsp, 56
	mov rcx, 8
	call exit
create_tfs_err:
	call SDL_GetError
	mov rdx, rax
	mov rcx, create_tfs_err_msg
	call printf
	mov rcx, r14
	call SDL_FreeSurface
	mov rcx, r13
	call SDL_DestroyRenderer
	mov rcx, r12
	call SDL_DestroyWindow
	call SDL_Quit
	add rsp, 56
	mov rcx, 8
	call exit


section .data

init_err_msg            db "SDL_Init Error: %s", 10, 0

create_window_arg0      db "Hello World!", 0
	
create_window_err_msg   db "SDL_CreateWindow Error: %s", 10, 0

create_renderer_err_msg db "SDL_CreateRenderer Error: %s", 10, 0

bmp_path                db "..\..\img\grumpy-cat.bmp", 0

readbin                 db "rb", 0

load_bmp_err_msg        db "SDL_LoadBMP Error: %s", 10, 0

create_tfs_err_msg      db "SDL_CreateTextureFromSurface Error: %s", 10, 0	


================================================
FILE: bench.sh
================================================
#!/bin/sh
#
# csv.sh
#
# Measure approximately how long it takes to build each example,
# and how large the resulting executable is.
#
# The examples are (mostly) not size-optimized, so the sizes will vary
# a lot, without saying much about the programming language.
#
# For instance, Go produces large executables by default, but when using
# gccgo, -Os and upx, the executables are orders of magnitude smaller.
#

bench() {
  echo -n "$1;"
  pushd "$1" > /dev/null
  make -s clean > /dev/null
  echo -n $(time -f "%es" make -s 2>&1 | tail -1)
  echo -n ';'
  echo -n $(du -b "$2" | sed 's/[^0-9]//g')
  popd > /dev/null
  echo
}

cmakebench() {
  echo -n "$1;"
  pushd "$1" > /dev/null
  test -d build && rm -r build || true
  echo -n $(time -f "%es" cmake -S . -B build 2>&1 > /dev/null && make -C build 2>&1 >/dev/null | tr -d '\n')
  echo -n ';'
  echo -n $(du -b "build/$2" | sed 's/[^0-9]//g')
  popd > /dev/null
  echo
}

cxxbench() {
  echo -n "$1;"
  pushd "$1" > /dev/null
  cxx clean > /dev/null
  echo -n $(time -f "%es" cxx 2>&1 >/dev/null | tr -d '\n')
  echo -n ';'
  echo -n $(du -b "$2" | sed 's/[^0-9]//g')
  popd > /dev/null
  echo

}

stackbench() {
  echo -n "$1;"
  pushd "$1" > /dev/null
  stack clean > /dev/null
  echo -n $(time -f "%es" stack build 2>&1 | tail -1)
  echo -n ';'
  local filename=$(find . -executable -type f -name grumpycat-exe -printf "%T@ %Tc %p\n" | sort -n | tail -1 | rev | cut -d' ' -f1 | rev)
  echo -n $(du -b $filename) | tr ' ' '\n' | head -1 | tr -d '\n'
  popd > /dev/null
  echo
}

main() {
  echo 'language;compilation;bytesize'
  bench go go
  bench ada main
  for f in c89 c++98 c99 c11 c++11 c18 c2x; do
    bench "$f" main
  done
  for f in *-cmake; do
    cmakebench "$f" main
  done
  #cxxbench c++20-cxx c++20-cxx
  bench crystal bin/main
  bench csharp main
  bench d main
  bench objectivepascal main
  bench freebasic main
  stackbench haskell
  # TODO: Add the other languages as well, except for gccgo, mruby, lua and python
}

main


================================================
FILE: c++11/Makefile
================================================
CXX?=c++
SDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs)
CXXFLAGS?=-std=c++11 -Wall -pedantic -Werror -Wshadow -Wstrict-aliasing -Wstrict-overflow

.PHONY: all msg clean fullclean

all: msg main

msg:
	@echo '--- C++11 ---'

main: main.cpp
	${CXX} ${CXXFLAGS} -O2 -o $@ $< ${SDL2FLAGS}

small: main.cpp
	${CXX} ${CXXFLAGS} -Os -o main $< ${SDL2FLAGS}
	-strip main
	-sstrip main

debug: main.cpp
	${CXX} ${CXXFLAGS} -O0 -g -o main $< ${SDL2FLAGS}

asm: main.asm

main.asm: main.cpp
	${CXX} ${CFLAGS} -S -masm=intel -Og -o main.asm $< ${SDL2FLAGS}

run: msg main
	time ./main

clean:
	rm -f main *.o main.asm

fullclean: clean


================================================
FILE: c++11/main.cpp
================================================
#include <SDL2/SDL.h>
#include <cstdlib>
#include <iostream>

int main()
{
    using std::cerr;
    using std::endl;

    if (SDL_Init(SDL_INIT_EVERYTHING) != 0) {
        cerr << "SDL_Init Error: " << SDL_GetError() << endl;
        return EXIT_FAILURE;
    }

    SDL_Window* win = SDL_CreateWindow("Hello World!", 100, 100, 620, 387, SDL_WINDOW_SHOWN);
    if (win == nullptr) {
        cerr << "SDL_CreateWindow Error: " << SDL_GetError() << endl;
        return EXIT_FAILURE;
    }

    SDL_Renderer* ren
        = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
    if (ren == nullptr) {
        cerr << "SDL_CreateRenderer Error" << SDL_GetError() << endl;
		if (win != nullptr) {
			SDL_DestroyWindow(win);
		}
		SDL_Quit();
        return EXIT_FAILURE;
    }

    SDL_Surface* bmp = SDL_LoadBMP("../img/grumpy-cat.bmp");
    if (bmp == nullptr) {
        cerr << "SDL_LoadBMP Error: " << SDL_GetError() << endl;
		if (ren != nullptr) {
			SDL_DestroyRenderer(ren);
		}
		if (win != nullptr) {
			SDL_DestroyWindow(win);
		}
		SDL_Quit();
        return EXIT_FAILURE;
    }

    SDL_Texture* tex = SDL_CreateTextureFromSurface(ren, bmp);
    if (tex == nullptr) {
        cerr << "SDL_CreateTextureFromSurface Error: " << SDL_GetError() << endl;
		if (bmp != nullptr) {
			SDL_FreeSurface(bmp);
		}
		if (ren != nullptr) {
			SDL_DestroyRenderer(ren);
		}
		if (win != nullptr) {
			SDL_DestroyWindow(win);
		}
		SDL_Quit();
        return EXIT_FAILURE;
    }
    SDL_FreeSurface(bmp);

    for (int i = 0; i < 20; i++) {
        SDL_RenderClear(ren);
        SDL_RenderCopy(ren, tex, nullptr, nullptr);
        SDL_RenderPresent(ren);
        SDL_Delay(100);
    }

    SDL_DestroyTexture(tex);
    SDL_DestroyRenderer(ren);
    SDL_DestroyWindow(win);
    SDL_Quit();

    return EXIT_SUCCESS;
}


================================================
FILE: c++11-cmake/CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.26)

project(main)

aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})

target_include_directories(${PROJECT_NAME} PRIVATE ../include)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
target_compile_definitions(${PROJECT_NAME} PRIVATE IMGDIR="../img/")

# For macOS M2 systems with SDL2 installed via Homebrew
list(APPEND CMAKE_MODULE_PATH "/usr/local/lib/cmake/SDL2" "/opt/homebrew/lib/cmake/SDL2")
list(APPEND CMAKE_PREFIX_PATH "/usr/local" "/opt/homebrew")

find_package(SDL2 QUIET)

if (SDL2_FOUND)
    message("Using SDL2 from find_package")
    target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
    target_link_libraries(${PROJECT_NAME} PRIVATE ${SDL2_LIBRARIES})
else()
    # Fall back on pkg-config
    include(FindPkgConfig)
    pkg_search_module(SDL2 REQUIRED sdl2)
    message("Using SDL2 from pkg-config")
    target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
    target_link_libraries(${PROJECT_NAME} PRIVATE ${SDL2_LIBRARIES})
endif()


================================================
FILE: c++11-cmake/README.md
================================================
SDL2, C++11 and CMake
=====================

Requirements
------------

* CMake
* Compiler that supports C++ (recent version of g++ or clang++)
* SDL2

One way of building with C++11, SDL2 and CMake
----------------------------------------------

    cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
    make -C build

Running
-------

    build/main

Cleaning up the binary file and build directory
-----------------------------------------------

    rm -rf build/ main


================================================
FILE: c++11-cmake/main.cpp
================================================
#include <SDL2/SDL.h>
#include <cstdlib>
#include <iostream>

int main()
{
    using std::cerr;
    using std::endl;

    if (SDL_Init(SDL_INIT_EVERYTHING) != 0) {
        cerr << "SDL_Init Error: " << SDL_GetError() << endl;
        return EXIT_FAILURE;
    }

    SDL_Window* win = SDL_CreateWindow("Hello World!", 100, 100, 620, 387, SDL_WINDOW_SHOWN);
    if (win == nullptr) {
        cerr << "SDL_CreateWindow Error: " << SDL_GetError() << endl;
        return EXIT_FAILURE;
    }

    SDL_Renderer* ren
        = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
    if (ren == nullptr) {
        cerr << "SDL_CreateRenderer Error" << SDL_GetError() << endl;
        SDL_DestroyWindow(win);
        SDL_Quit();
        return EXIT_FAILURE;
    }

    SDL_Surface* bmp = SDL_LoadBMP("../img/grumpy-cat.bmp");
    if (bmp == nullptr) {
        cerr << "SDL_LoadBMP Error: " << SDL_GetError() << endl;
        SDL_DestroyRenderer(ren);
        SDL_DestroyWindow(win);
        SDL_Quit();
        return EXIT_FAILURE;
    }

    SDL_Texture* tex = SDL_CreateTextureFromSurface(ren, bmp);
    if (tex == nullptr) {
        cerr << "SDL_CreateTextureFromSurface Error: " << SDL_GetError() << endl;
        SDL_FreeSurface(bmp);
        SDL_DestroyRenderer(ren);
        SDL_DestroyWindow(win);
        SDL_Quit();
        return EXIT_FAILURE;
    }
    SDL_FreeSurface(bmp);

    for (int i = 0; i < 20; i++) {
        SDL_RenderClear(ren);
        SDL_RenderCopy(ren, tex, nullptr, nullptr);
        SDL_RenderPresent(ren);
        SDL_Delay(100);
    }

    SDL_DestroyTexture(tex);
    SDL_DestroyRenderer(ren);
    SDL_DestroyWindow(win);
    SDL_Quit();

    return EXIT_SUCCESS;
}


================================================
FILE: c++14-cmake/CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.26)

project(main)

aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})

target_include_directories(${PROJECT_NAME} PRIVATE ../include)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14)
target_compile_definitions(${PROJECT_NAME} PRIVATE IMGDIR="../img/")

# For macOS M2 systems with SDL2 installed via Homebrew
list(APPEND CMAKE_MODULE_PATH "/usr/local/lib/cmake/SDL2" "/opt/homebrew/lib/cmake/SDL2")
list(APPEND CMAKE_PREFIX_PATH "/usr/local" "/opt/homebrew")

# Try the modern way first
find_package(SDL2 QUIET)

if (SDL2_FOUND)
    message("Using SDL2 from find_package")
    target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
    target_link_libraries(${PROJECT_NAME} PRIVATE ${SDL2_LIBRARIES})
else()
    # Fall back on pkg-config
    include(FindPkgConfig)
    pkg_search_module(SDL2 REQUIRED sdl2)
    message("Using SDL2 from pkg-config")
    target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
    target_link_libraries(${PROJECT_NAME} PRIVATE ${SDL2_LIBRARIES})
endif()


================================================
FILE: c++14-cmake/README.md
================================================
SDL2, C++14 and CMake
=====================

Requirements
------------

* CMake
* Compiler that supports C++14 (recent version of `g++` or `clang++`)
* SDL2

One way of building with C++14, SDL2 and CMake
----------------------------------------------

    cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
    make -C build


Running
-------

    build/main

Cleaning up the binary file and build directory
-----------------------------------------------

    rm -rf build/


================================================
FILE: c++14-cmake/main.cpp
================================================
#include <SDL2/SDL.h>
#include <iostream>

#include "sdl2.h"

auto main() -> int
{
    using std::cerr;
    using std::endl;

    auto sys = sdl2::make_sdlsystem(SDL_INIT_EVERYTHING);
    if (!sys) {
        cerr << "Error creating SDL2 system: " << SDL_GetError() << endl;
        return 1;
    }

    auto win = sdl2::make_window("Hello World!", 100, 100, 620, 387, SDL_WINDOW_SHOWN);
    if (!win) {
        cerr << "Error creating window: " << SDL_GetError() << endl;
        return 1;
    }

    auto ren
        = sdl2::make_renderer(win.get(), -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
    if (!ren) {
        cerr << "Error creating renderer: " << SDL_GetError() << endl;
        return 1;
    }

    auto file = SDL_RWFromFile(IMGDIR "grumpy-cat.bmp", "rb");
    if (file == nullptr) {
        cerr << "Error reading file: " << SDL_GetError() << endl;
        return 1;
    }

    auto bmp = sdl2::make_bmp(file);
    if (!bmp) {
        cerr << "Error creating surface: " << SDL_GetError() << endl;
        return 1;
    }

    auto tex = sdl2::make_texture(ren.get(), bmp.get());
    if (!tex) {
        cerr << "Error creating texture: " << SDL_GetError() << endl;
        return 1;
    }

    for (int i = 0; i < 20; i++) {
        SDL_RenderClear(ren.get());
        SDL_RenderCopy(ren.get(), tex.get(), nullptr, nullptr);
        SDL_RenderPresent(ren.get());
        SDL_Delay(100);
    }

    return 0;
}


================================================
FILE: c++17-cmake/CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.26)

project(main)

aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})

target_include_directories(${PROJECT_NAME} PRIVATE ../include)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
target_compile_definitions(${PROJECT_NAME} PRIVATE IMGDIR="../img/")

# For macOS M2 systems with SDL2 installed via Homebrew
list(APPEND CMAKE_MODULE_PATH "/usr/local/lib/cmake/SDL2" "/opt/homebrew/lib/cmake/SDL2")
list(APPEND CMAKE_PREFIX_PATH "/usr/local" "/opt/homebrew")

find_package(SDL2 QUIET)

if (SDL2_FOUND)
    message("Using SDL2 from find_package")
    target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
    target_link_libraries(${PROJECT_NAME} PRIVATE ${SDL2_LIBRARIES})
else()
    # Fall back on pkg-config
    include(FindPkgConfig)
    pkg_search_module(SDL2 REQUIRED sdl2)
    message("Using SDL2 from pkg-config")
    target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
    target_link_libraries(${PROJECT_NAME} PRIVATE ${SDL2_LIBRARIES})
endif()


================================================
FILE: c++17-cmake/README.md
================================================
SDL2, C++17 and CMake
=====================

Requirements
------------

* CMake
* Compiler that supports C++17 (recent version of `g++` or `clang++`)
* SDL2

One way of building with C++17, SDL2 and CMake
----------------------------------------------

    cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
    make -C build

Running
-------

    build/main

Cleaning up the binary file and build directory
-----------------------------------------------

    rm -rf build/


================================================
FILE: c++17-cmake/main.cpp
================================================
#include <SDL2/SDL.h>
#include <iostream>

#include "sdl2.h"

auto main() -> int
{
    using std::cerr;
    using std::endl;

    auto sys = sdl2::make_sdlsystem(SDL_INIT_EVERYTHING);
    if (!sys) {
        cerr << "Error creating SDL2 system: " << SDL_GetError() << endl;
        return 1;
    }

    auto win = sdl2::make_window("Hello World!", 100, 100, 620, 387, SDL_WINDOW_SHOWN);
    if (!win) {
        cerr << "Error creating window: " << SDL_GetError() << endl;
        return 1;
    }

    auto ren
        = sdl2::make_renderer(win.get(), -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
    if (!ren) {
        cerr << "Error creating renderer: " << SDL_GetError() << endl;
        return 1;
    }

    auto file = SDL_RWFromFile(IMGDIR "grumpy-cat.bmp", "rb");
    if (file == nullptr) {
        cerr << "Error reading file: " << SDL_GetError() << endl;
        return 1;
    }

    auto bmp = sdl2::make_bmp(file);
    if (!bmp) {
        cerr << "Error creating surface: " << SDL_GetError() << endl;
        return 1;
    }

    auto tex = sdl2::make_texture(ren.get(), bmp.get());
    if (!tex) {
        cerr << "Error creating texture: " << SDL_GetError() << endl;
        return 1;
    }

    for (int i = 0; i < 20; i++) {
        SDL_RenderClear(ren.get());
        SDL_RenderCopy(ren.get(), tex.get(), nullptr, nullptr);
        SDL_RenderPresent(ren.get());
        SDL_Delay(100);
    }

    return 0;
}


================================================
FILE: c++20-cmake/CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.26)

project(main)

aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})

target_include_directories(${PROJECT_NAME} PRIVATE ../include)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20)
target_compile_definitions(${PROJECT_NAME} PRIVATE IMGDIR="../img/")

# For macOS M2 systems with SDL2 installed via Homebrew
list(APPEND CMAKE_MODULE_PATH "/usr/local/lib/cmake/SDL2" "/opt/homebrew/lib/cmake/SDL2")
list(APPEND CMAKE_PREFIX_PATH "/usr/local" "/opt/homebrew")

find_package(SDL2 QUIET)

if (SDL2_FOUND)
    message("Using SDL2 from find_package")
    target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
    target_link_libraries(${PROJECT_NAME} PRIVATE ${SDL2_LIBRARIES})
else()
    # Fall back on pkg-config
    include(FindPkgConfig)
    pkg_search_module(SDL2 REQUIRED sdl2)
    message("Using SDL2 from pkg-config")
    target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
    target_link_libraries(${PROJECT_NAME} PRIVATE ${SDL2_LIBRARIES})
endif()


================================================
FILE: c++20-cmake/README.md
================================================
SDL2, C++20 and CMake
=====================

Requirements
------------

* CMake
* Compiler that supports C++20 (recent version of `g++` or `clang++`)
* SDL2

One way of building with C++20, SDL2 and CMake
----------------------------------------------

    cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
    make -C build

Running
-------

    build/main

Cleaning up the binary file and build directory
-----------------------------------------------

    rm -rf build/


================================================
FILE: c++20-cmake/main.cpp
================================================
#include <SDL2/SDL.h>
#include <iostream>

#include "sdl2.h"

auto main() -> int
{
    using std::cerr;
    using std::endl;

    auto sys = sdl2::make_sdlsystem(SDL_INIT_EVERYTHING);
    if (!sys) {
        cerr << "Error creating SDL2 system: " << SDL_GetError() << endl;
        return 1;
    }

    auto win = sdl2::make_window("Hello World!", 100, 100, 620, 387, SDL_WINDOW_SHOWN);
    if (!win) {
        cerr << "Error creating window: " << SDL_GetError() << endl;
        return 1;
    }

    auto ren
        = sdl2::make_renderer(win.get(), -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
    if (!ren) {
        cerr << "Error creating renderer: " << SDL_GetError() << endl;
        return 1;
    }

    auto file = SDL_RWFromFile(IMGDIR "grumpy-cat.bmp", "rb");
    if (file == nullptr) {
        cerr << "Error reading file: " << SDL_GetError() << endl;
        return 1;
    }

    auto bmp = sdl2::make_bmp(file);
    if (!bmp) {
        cerr << "Error creating surface: " << SDL_GetError() << endl;
        return 1;
    }

    auto tex = sdl2::make_texture(ren.get(), bmp.get());
    if (!tex) {
        cerr << "Error creating texture: " << SDL_GetError() << endl;
        return 1;
    }

    for (int i = 0; i < 20; i++) {
        SDL_RenderClear(ren.get());
        SDL_RenderCopy(ren.get(), tex.get(), nullptr, nullptr);
        SDL_RenderPresent(ren.get());
        SDL_Delay(100);
    }

    return 0;
}


================================================
FILE: c++23-cmake/CMakeLists.txt
================================================
cmake_minimum_required(VERSION 3.26)

project(main)

aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})

target_include_directories(${PROJECT_NAME} PRIVATE ../include)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_23)
target_compile_definitions(${PROJECT_NAME} PRIVATE IMGDIR="../img/")

# For macOS M2 systems with SDL2 installed via Homebrew
list(APPEND CMAKE_MODULE_PATH "/usr/local/lib/cmake/SDL2" "/opt/homebrew/lib/cmake/SDL2")
list(APPEND CMAKE_PREFIX_PATH "/usr/local" "/opt/homebrew")

find_package(SDL2 QUIET)

if (SDL2_FOUND)
    message("Using SDL2 from find_package")
    target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
    target_link_libraries(${PROJECT_NAME} PRIVATE ${SDL2_LIBRARIES})
else()
    # Fall back on pkg-config
    include(FindPkgConfig)
    pkg_search_module(SDL2 REQUIRED sdl2)
    message("Using SDL2 from pkg-config")
    target_include_directories(${PROJECT_NAME} PRIVATE ${SDL2_INCLUDE_DIRS})
    target_link_libraries(${PROJECT_NAME} PRIVATE ${SDL2_LIBRARIES})
endif()


================================================
FILE: c++23-cmake/README.md
================================================
SDL2, C++23 and CMake
=====================

Requirements
------------

* CMake
* Compiler that supports C++23 (recent versions of `g++` or `clang++`, like GCC 11, supports `-std=c++2b`)
* SDL2

One way of building with C++23, SDL2 and CMake
----------------------------------------------

    cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
    make -C build

Running
-------

    build/main

Cleaning up the binary file and build directory
-----------------------------------------------

    rm -rf build/


================================================
FILE: c++23-cmake/main.cpp
================================================
#include <SDL2/SDL.h>
#include <iostream>

#include "sdl2.h"

auto main() -> int
{
    using std::cerr;
    using std::endl;

    auto sys = sdl2::make_sdlsystem(SDL_INIT_EVERYTHING);
    if (!sys) {
        cerr << "Error creating SDL2 system: " << SDL_GetError() << endl;
        return 1;
    }

    auto win = sdl2::make_window("Hello World!", 100, 100, 620, 387, SDL_WINDOW_SHOWN);
    if (!win) {
        cerr << "Error creating window: " << SDL_GetError() << endl;
        return 1;
    }

    auto ren
        = sdl2::make_renderer(win.get(), -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
    if (!ren) {
        cerr << "Error creating renderer: " << SDL_GetError() << endl;
        return 1;
    }

    auto file = SDL_RWFromFile(IMGDIR "grumpy-cat.bmp", "rb");
    if (file == nullptr) {
        cerr << "Error reading file: " << SDL_GetError() << endl;
        return 1;
    }

    auto bmp = sdl2::make_bmp(file);
    if (!bmp) {
        cerr << "Error creating surface: " << SDL_GetError() << endl;
        return 1;
    }

    auto tex = sdl2::make_texture(ren.get(), bmp.get());
    if (!tex) {
        cerr << "Error creating texture: " << SDL_GetError() << endl;
        return 1;
    }

    for (int i = 0; i < 20; i++) {
        SDL_RenderClear(ren.get());
        SDL_RenderCopy(ren.get(), tex.get(), nullptr, nullptr);
        SDL_RenderPresent(ren.get());
        SDL_Delay(100);
    }

    return 0;
}


================================================
FILE: c++98/Makefile
================================================
CXX?=c++
SDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs)
CXXFLAGS?=-std=c++98 -Wall -pedantic -Werror -Wshadow -Wstrict-aliasing -Wstrict-overflow

.PHONY: all msg clean fullclean

all: msg main

msg:
	@echo '--- C++98 ---'

main: main.cpp
	${CXX} ${CXXFLAGS} -O2 -o $@ $< ${SDL2FLAGS}

small: main.cpp
	${CXX} ${CXXFLAGS} -Os -o main $< ${SDL2FLAGS}
	-strip main
	-sstrip main

debug: main.cpp
	${CXX} ${CXXFLAGS} -O0 -g -o main $< ${SDL2FLAGS}

asm: main.asm

main.asm: main.cpp
	${CXX} ${CFLAGS} -S -masm=intel -Og -o main.asm $< ${SDL2FLAGS}

run: msg main
	time ./main

clean:
	rm -f main *.o main.asm

fullclean: clean


================================================
FILE: c++98/README.md
================================================
SDL2, C++98 and Make
====================

Requirements
------------

* Compiler that supports C++98
* pkg-config
* SDL2

macOS
-----

Install pkg-config using brew, or use `-LSDL2` in the Makefile instead of using pkg-config.



================================================
FILE: c++98/main.cpp
================================================
#include <SDL2/SDL.h>
#include <cstdlib>
#include <iostream>

int main()
{
    if (SDL_Init(SDL_INIT_EVERYTHING) != 0) {
        std::cerr << "SDL_Init Error: " << SDL_GetError() << std::endl;
        return EXIT_FAILURE;
    }

    SDL_Window* win = SDL_CreateWindow("Hello World!", 100, 100, 620, 387, SDL_WINDOW_SHOWN);
    if (win == NULL) {
        std::cerr << "SDL_CreateWindow Error: " << SDL_GetError() << std::endl;
        return EXIT_FAILURE;
    }

    SDL_Renderer* ren
        = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
    if (ren == NULL) {
        std::cerr << "SDL_CreateRenderer Error: " << SDL_GetError() << std::endl;
        SDL_DestroyWindow(win);
        SDL_Quit();
        return EXIT_FAILURE;
    }

    SDL_Surface* bmp = SDL_LoadBMP("../img/grumpy-cat.bmp");
    if (bmp == NULL) {
        std::cerr << "SDL_LoadBMP Error: " << SDL_GetError() << std::endl;
        SDL_DestroyRenderer(ren);
        SDL_DestroyWindow(win);
        SDL_Quit();
        return EXIT_FAILURE;
    }

    SDL_Texture* tex = SDL_CreateTextureFromSurface(ren, bmp);
    if (tex == NULL) {
        std::cerr << "SDL_CreateTextureFromSurface Error: " << SDL_GetError() << std::endl;
        SDL_FreeSurface(bmp);
        SDL_DestroyRenderer(ren);
        SDL_DestroyWindow(win);
        SDL_Quit();
        return EXIT_FAILURE;
    }
    SDL_FreeSurface(bmp);

    for (int i = 0; i < 20; i++) {
        SDL_RenderClear(ren);
        SDL_RenderCopy(ren, tex, NULL, NULL);
        SDL_RenderPresent(ren);
        SDL_Delay(100);
    }

    SDL_DestroyTexture(tex);
    SDL_DestroyRenderer(ren);
    SDL_DestroyWindow(win);
    SDL_Quit();

    return EXIT_SUCCESS;
}


================================================
FILE: c11/Makefile
================================================
CC?=gcc
SDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs)
CFLAGS?=-std=c11 -Wall -pedantic -Werror -Wshadow -Wstrict-aliasing -Wstrict-overflow

.PHONY: all msg clean fullclean

all: msg main

msg:
	@echo '--- C11 ---'

main: main.c
	${CC} ${CFLAGS} -O2 -o $@ $< ${SDL2FLAGS}

small: main.c
	${CC} ${CFLAGS} -Os -o main $< ${SDL2FLAGS}
	-strip main
	-sstrip main

debug: main.c
	${CC} ${CFLAGS} -O1 -g -o main $< ${SDL2FLAGS}

asm: main.asm

main.asm: main.c
	${CC} ${CFLAGS} -S -masm=intel -Og -o main.asm $< ${SDL2FLAGS}

run: msg main
	time ./main

clean:
	rm -f main *.o main.asm

fullclean: clean


================================================
FILE: c11/README.md
================================================
## Requirements

* C11 compiler
* pkg-config
* SDL2

## macOS

Install pkg-config using brew, or use `-LSDL2` in the Makefile instead of using pkg-config.


================================================
FILE: c11/main.c
================================================
#include <SDL2/SDL.h>
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
	if (SDL_Init(SDL_INIT_EVERYTHING) != 0) {
		fprintf(stderr, "SDL_Init Error: %s\n", SDL_GetError());
		return EXIT_FAILURE;
	}

	SDL_Window* win = SDL_CreateWindow("Hello World!", 100, 100, 620, 387, SDL_WINDOW_SHOWN);
	if (win == NULL) {
		fprintf(stderr, "SDL_CreateWindow Error: %s\n", SDL_GetError());
		return EXIT_FAILURE;
	}

	SDL_Renderer* ren = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
	if (ren == NULL) {
		fprintf(stderr, "SDL_CreateRenderer Error: %s\n", SDL_GetError());
		SDL_DestroyWindow(win);
		SDL_Quit();
		return EXIT_FAILURE;
	}

	SDL_Surface* bmp = SDL_LoadBMP("../img/grumpy-cat.bmp");
	if (bmp == NULL) {
		fprintf(stderr, "SDL_LoadBMP Error: %s\n", SDL_GetError());
		SDL_DestroyRenderer(ren);
		SDL_DestroyWindow(win);
		SDL_Quit();
		return EXIT_FAILURE;
	}

	SDL_Texture* tex = SDL_CreateTextureFromSurface(ren, bmp);
	if (tex == NULL) {
		fprintf(stderr, "SDL_CreateTextureFromSurface Error: %s\n", SDL_GetError());
		SDL_FreeSurface(bmp);
		SDL_DestroyRenderer(ren);
		SDL_DestroyWindow(win);
		SDL_Quit();
		return EXIT_FAILURE;
	}
	SDL_FreeSurface(bmp);

	for (int i = 0; i < 20; i++) {
		SDL_RenderClear(ren);
		SDL_RenderCopy(ren, tex, NULL, NULL);
		SDL_RenderPresent(ren);
		SDL_Delay(100);
	}

	SDL_DestroyTexture(tex);
	SDL_DestroyRenderer(ren);
	SDL_DestroyWindow(win);
	SDL_Quit();

	return EXIT_SUCCESS;
}


================================================
FILE: c18/Makefile
================================================
CC?=gcc
SDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs)
CFLAGS?=-std=c18 -Wall -pedantic -Werror -Wshadow -Wstrict-aliasing -Wstrict-overflow

.PHONY: all msg clean fullclean

all: msg main

msg:
	@echo '--- C18 ---'

main: main.c
	${CC} ${CFLAGS} -O2 -o $@ $< ${SDL2FLAGS}

small: main.c
	${CC} ${CFLAGS} -Os -o main $< ${SDL2FLAGS}
	-strip main
	-sstrip main

debug: main.c
	${CC} ${CFLAGS} -O1 -g -o main $< ${SDL2FLAGS}

asm: main.asm

main.asm: main.c
	${CC} ${CFLAGS} -S -masm=intel -Og -o main.asm $< ${SDL2FLAGS}

run: msg main
	time ./main

clean:
	rm -f main *.o main.asm

fullclean: clean


================================================
FILE: c18/README.md
================================================
## Requirements

* C18 compiler
* pkg-config
* SDL2

## macOS

Install pkg-config using brew, or use `-LSDL2` in the Makefile instead of using pkg-config.


================================================
FILE: c18/main.c
================================================
#include <SDL2/SDL.h>
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
	if (SDL_Init(SDL_INIT_EVERYTHING) != 0) {
		fprintf(stderr, "SDL_Init Error: %s\n", SDL_GetError());
		return EXIT_FAILURE;
	}

	SDL_Window* win = SDL_CreateWindow("Hello World!", 100, 100, 620, 387, SDL_WINDOW_SHOWN);
	if (win == NULL) {
		fprintf(stderr, "SDL_CreateWindow Error: %s\n", SDL_GetError());
		return EXIT_FAILURE;
	}

	SDL_Renderer* ren = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
	if (ren == NULL) {
		fprintf(stderr, "SDL_CreateRenderer Error: %s\n", SDL_GetError());
		if (win != NULL) {
			SDL_DestroyWindow(win);
		}
		SDL_Quit();
		return EXIT_FAILURE;
	}

	SDL_Surface* bmp = SDL_LoadBMP("../img/grumpy-cat.bmp");
	if (bmp == NULL) {
		fprintf(stderr, "SDL_LoadBMP Error: %s\n", SDL_GetError());
		SDL_DestroyRenderer(ren);
		SDL_DestroyWindow(win);
		SDL_Quit();
		return EXIT_FAILURE;
	}

	SDL_Texture* tex = SDL_CreateTextureFromSurface(ren, bmp);
	if (tex == NULL) {
		fprintf(stderr, "SDL_CreateTextureFromSurface Error: %s\n", SDL_GetError());
		SDL_FreeSurface(bmp);
		SDL_DestroyRenderer(ren);
		SDL_DestroyWindow(win);
		SDL_Quit();
		return EXIT_FAILURE;
	}
	SDL_FreeSurface(bmp);

	for (int i = 0; i < 20; i++) {
		SDL_RenderClear(ren);
		SDL_RenderCopy(ren, tex, NULL, NULL);
		SDL_RenderPresent(ren);
		SDL_Delay(100);
	}

	SDL_DestroyTexture(tex);
	SDL_DestroyRenderer(ren);
	SDL_DestroyWindow(win);
	SDL_Quit();

	return EXIT_SUCCESS;
}


================================================
FILE: c2x/Makefile
================================================
CC?=gcc
SDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs)
CFLAGS?=-std=c2x -Wall -pedantic -Werror -Wshadow -Wstrict-aliasing -Wstrict-overflow

.PHONY: all msg clean fullclean

all: msg main

msg:
	@echo '--- C2X ---'

main: main.c
	${CC} ${CFLAGS} -O2 -o $@ $< ${SDL2FLAGS}

small: main.c
	${CC} ${CFLAGS} -Os -o main $< ${SDL2FLAGS}
	-strip main
	-sstrip main

debug: main.c
	${CC} ${CFLAGS} -O1 -g -o main $< ${SDL2FLAGS}

asm: main.asm

main.asm: main.c
	${CC} ${CFLAGS} -S -masm=intel -Og -o main.asm $< ${SDL2FLAGS}

run: msg main
	time ./main

clean:
	rm -f main *.o main.asm

fullclean: clean


================================================
FILE: c2x/README.md
================================================
## Requirements

* C2X compiler (GCC 9 or later, Clang 9 or later)
* pkg-config
* SDL2

## macOS

Install pkg-config using brew, or use `-LSDL2` in the Makefile instead of using pkg-config.


================================================
FILE: c2x/main.c
================================================
#include <SDL2/SDL.h>
#include <stdio.h>
#include <stdlib.h>

int main()
{
	if (SDL_Init(SDL_INIT_EVERYTHING) != 0) {
		fprintf(stderr, "SDL_Init Error: %s\n", SDL_GetError());
		return EXIT_FAILURE;
	}

	SDL_Window* win = SDL_CreateWindow("Hello World!", 100, 100, 620, 387, SDL_WINDOW_SHOWN);
	if (win == NULL) {
		fprintf(stderr, "SDL_CreateWindow Error: %s\n", SDL_GetError());
		return EXIT_FAILURE;
	}

	SDL_Renderer* ren = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
	if (ren == NULL) {
		fprintf(stderr, "SDL_CreateRenderer Error: %s\n", SDL_GetError());
		SDL_DestroyWindow(win);
		SDL_Quit();
		return EXIT_FAILURE;
	}

	SDL_Surface* bmp = SDL_LoadBMP("../img/grumpy-cat.bmp");
	if (bmp == NULL) {
		fprintf(stderr, "SDL_LoadBMP Error: %s\n", SDL_GetError());
		SDL_DestroyRenderer(ren);
		SDL_DestroyWindow(win);
		SDL_Quit();
		return EXIT_FAILURE;
	}

	SDL_Texture* tex = SDL_CreateTextureFromSurface(ren, bmp);
	if (tex == NULL) {
		fprintf(stderr, "SDL_CreateTextureFromSurface Error: %s\n", SDL_GetError());
		SDL_FreeSurface(bmp);
		SDL_DestroyRenderer(ren);
		SDL_DestroyWindow(win);
		SDL_Quit();
		return EXIT_FAILURE;
	}
	SDL_FreeSurface(bmp);

	for (int i = 0; i < 20; i++) {
		SDL_RenderClear(ren);
		SDL_RenderCopy(ren, tex, NULL, NULL);
		SDL_RenderPresent(ren);
		SDL_Delay(100);
	}

	SDL_DestroyTexture(tex);
	SDL_DestroyRenderer(ren);
	SDL_DestroyWindow(win);
	SDL_Quit();

	return EXIT_SUCCESS;
}


================================================
FILE: c89/Makefile
================================================
CC?=gcc
SDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs)
CFLAGS?=-ansi -Wall -pedantic -Werror -Wshadow -Wstrict-aliasing -Wstrict-overflow

.PHONY: all msg clean fullclean

all: msg main

msg:
	@echo '--- C89 (ANSI C) ---'

main: main.c
	${CC} ${CFLAGS} -O2 -o $@ $< ${SDL2FLAGS}

small: main.c
	${CC} ${CFLAGS} -Os -o main $< ${SDL2FLAGS}
	-strip main
	-sstrip main

debug: main.c
	${CC} ${CFLAGS} -O1 -g -o main $< ${SDL2FLAGS}

asm: main.asm

main.asm: main.c
	${CC} ${CFLAGS} -S -masm=intel -Og -o main.asm $< ${SDL2FLAGS}

run: msg main
	time ./main

clean:
	rm -f main *.o main.asm

fullclean: clean


================================================
FILE: c89/README.md
================================================
## Requirements

* C89 (ANSI C) compiler
* pkg-config
* SDL2

## macOS

Install pkg-config using brew, or use `-LSDL2` in the Makefile instead of using pkg-config.


================================================
FILE: c89/main.c
================================================
#include <SDL2/SDL.h>
#include <stdio.h>
#include <stdlib.h>

int main(void)
{
	SDL_Window* win;
	SDL_Renderer* ren;
	SDL_Surface* bmp;
	SDL_Texture* tex;
	int i;

	if (SDL_Init(SDL_INIT_EVERYTHING) != 0) {
		fprintf(stderr, "SDL_Init Error: %s\n", SDL_GetError());
		return EXIT_FAILURE;
	}

	win = SDL_CreateWindow("Hello World!", 100, 100, 620, 387, SDL_WINDOW_SHOWN);
	if (win == NULL) {
		fprintf(stderr, "SDL_CreateWindow Error: %s\n", SDL_GetError());
		return EXIT_FAILURE;
	}

	ren = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
	if (ren == NULL) {
		fprintf(stderr, "SDL_CreateRenderer Error: %s\n", SDL_GetError());
		SDL_DestroyWindow(win);
		SDL_Quit();
		return EXIT_FAILURE;
	}

	bmp = SDL_LoadBMP("../img/grumpy-cat.bmp");
	if (bmp == NULL) {
		fprintf(stderr, "SDL_LoadBMP Error: %s\n", SDL_GetError());
		SDL_DestroyRenderer(ren);
		SDL_DestroyWindow(win);
		SDL_Quit();
		return EXIT_FAILURE;
	}

	tex = SDL_CreateTextureFromSurface(ren, bmp);
	if (tex == NULL) {
		fprintf(stderr, "SDL_CreateTextureFromSurface Error: %s\n", SDL_GetError());
		SDL_FreeSurface(bmp);
		SDL_DestroyRenderer(ren);
		SDL_DestroyWindow(win);
		SDL_Quit();
		return EXIT_FAILURE;
	}
	SDL_FreeSurface(bmp);

	for (i = 0; i < 20; i++) {
		SDL_RenderClear(ren);
		SDL_RenderCopy(ren, tex, NULL, NULL);
		SDL_RenderPresent(ren);
		SDL_Delay(100);
	}

	SDL_DestroyTexture(tex);
	SDL_DestroyRenderer(ren);
	SDL_DestroyWindow(win);
	SDL_Quit();

	return EXIT_SUCCESS;
}


================================================
FILE: c99/Makefile
================================================
CC?=gcc
SDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs)
CFLAGS?=-std=c99 -Wall -pedantic -Werror -Wshadow -Wstrict-aliasing -Wstrict-overflow

.PHONY: all msg clean fullclean

all: msg main

msg:
	@echo '--- C99 ---'

main: main.c
	${CC} ${CFLAGS} -O2 -o $@ $< ${SDL2FLAGS}

small: main.c
	${CC} ${CFLAGS} -Os -o main $< ${SDL2FLAGS}
	-strip main
	-sstrip main

debug: main.c
	${CC} ${CFLAGS} -O1 -g -o main $< ${SDL2FLAGS}

asm: main.asm

main.asm: main.c
	${CC} ${CFLAGS} -S -masm=intel -Og -o main.asm $< ${SDL2FLAGS}

run: msg main
	time ./main

clean:
	rm -f main *.o main.asm

fullclean: clean


================================================
FILE: c99/README.md
================================================
## Requirements

* C99 compiler
* pkg-config
* SDL2

## macOS

Install pkg-config using brew, or use `-LSDL2` in the Makefile instead of using pkg-config.


================================================
FILE: c99/main.c
================================================
#include <SDL2/SDL.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>

int main(void)
{
    if (SDL_Init(SDL_INIT_EVERYTHING) != 0) {
        fprintf(stderr, "SDL_Init Error: %s\n", SDL_GetError());
        return EXIT_FAILURE;
    }

    SDL_Window* win = SDL_CreateWindow("Hello World!", -1, -1, 620, 387, SDL_WINDOW_SHOWN);
    if (win == NULL) {
        fprintf(stderr, "SDL_CreateWindow Error: %s\n", SDL_GetError());
        return EXIT_FAILURE;
    }

    SDL_Renderer* ren = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);
    if (ren == NULL) {
        fprintf(stderr, "SDL_CreateRenderer Error: %s\n", SDL_GetError());
        SDL_DestroyWindow(win);
        SDL_Quit();
        return EXIT_FAILURE;
    }

    SDL_Surface* bmp = SDL_LoadBMP("../img/grumpy-cat.bmp");
    if (bmp == NULL) {
        fprintf(stderr, "SDL_LoadBMP Error: %s\n", SDL_GetError());
        SDL_DestroyRenderer(ren);
        SDL_DestroyWindow(win);
        SDL_Quit();
        return EXIT_FAILURE;
    }

    SDL_Texture* tex = SDL_CreateTextureFromSurface(ren, bmp);
    if (tex == NULL) {
        fprintf(stderr, "SDL_CreateTextureFromSurface Error: %s\n", SDL_GetError());
        SDL_FreeSurface(bmp);
        SDL_DestroyRenderer(ren);
        SDL_DestroyWindow(win);
        SDL_Quit();
        return EXIT_FAILURE;
    }
    SDL_FreeSurface(bmp);

    SDL_Event e;
    bool quit = false;
    Uint32 startTime = SDL_GetTicks();

    while (!quit) {
        while (SDL_PollEvent(&e)) {
            if (e.type == SDL_QUIT) {
                quit = true;
            }
            if (e.type == SDL_KEYDOWN) {
                if (e.key.keysym.sym == SDLK_ESCAPE) {
                    quit = true;
                }
            }
        }

        Uint32 elapsedTime = SDL_GetTicks() - startTime;
        if (elapsedTime > 2000) {
            break;
        }

        SDL_RenderClear(ren);
        SDL_RenderCopy(ren, tex, NULL, NULL);
        SDL_RenderPresent(ren);
        SDL_Delay(100);
    }

    SDL_DestroyTexture(tex);
    SDL_DestroyRenderer(ren);
    SDL_DestroyWindow(win);
    SDL_Quit();

    return EXIT_SUCCESS;
}


================================================
FILE: crystal/Makefile
================================================
.PHONY: all msg sdl2 clean fullclean

all: msg bin/main

msg:
	@echo '--- Crystal ---'

bin/main: shard.yml main.cr
	@echo -n '[main] Compiling...'
	@shards -q build
	@echo 'ok'

run: msg bin/main
	time ./bin/main

clean:
	rm -f bin/main

fullclean: clean
	rm -rf bin lib


================================================
FILE: crystal/README.md
================================================
# Crystal SDL2 example

Tested with Crystal 1.0.0 and Crystal 1.1.0 on Arch Linux.

Requires both `crystal` and `shards`.


================================================
FILE: crystal/main.cr
================================================
require "sdl"
require "sdl/image"

begin
  SDL.init(SDL::Init::VIDEO)
  at_exit { SDL.quit }

  SDL::IMG.init(SDL::IMG::Init::PNG)
  at_exit { SDL::IMG.quit }

  window = SDL::Window.new("Hello World!", 620, 387)
  renderer = SDL::Renderer.new(window, SDL::Renderer::Flags::ACCELERATED | SDL::Renderer::Flags::PRESENTVSYNC)

  texture = SDL::IMG.load(File.join(__DIR__, "..", "img", "grumpy-cat.png"), renderer)

  start_time = Time.monotonic
  quit = false

  until quit
    case event = SDL::Event.poll
    when SDL::Event::Quit
      quit = true
    when SDL::Event::Keyboard
      quit = true if event.keydown? && event.sym.escape?
    end

    break if (Time.monotonic - start_time) > 2.seconds

    renderer.clear
    renderer.copy(texture)
    renderer.present

    sleep(100.milliseconds)
  end
rescue ex
  abort "Error: #{ex.message}"
end


================================================
FILE: crystal/shard.yml
================================================
name: main
version: 0.1.0

authors:
  - Alexander F. Rødseth <xyproto@archlinux.org>

dependencies:
  sdl:
    github: ysbaddaden/sdl.cr

targets:
  main:
    main: main.cr

crystal: 1.1.1

license: MIT


================================================
FILE: csharp/Makefile
================================================
.PHONY: all msg clean fullclean check-config

MONO_VERSION ?= 4.5

ifeq ($(shell uname -s), Darwin)
	MONO_ETC := $(shell dirname $(shell dirname $(shell realpath $(shell which mono))))/etc/mono
else
	MONO_ETC := /etc/mono
endif

MONO_CONFIG := $(MONO_ETC)/config
MACHINE_CONFIG := $(MONO_ETC)/$(MONO_VERSION)/machine.config

all: msg check-config main

msg:
	@echo '--- C# ---'

main.exe: main.cs
	mcs -unsafe -out:$@ $<

main: main.exe
	@echo "Mono config file: $(MONO_CONFIG)"
	@echo "Machine config file: $(MACHINE_CONFIG)"
	mkbundle -o $@ --deps --simple --static --i18n none --machine-config $(MACHINE_CONFIG) --config $(MONO_CONFIG) $<
	rm -f main.exe

run: msg main
	time ./main

clean:
	rm -f main main.exe temp.* *crash*.json

check-config:
	@if [ ! -f $(MACHINE_CONFIG) ]; then \
		echo "ERROR: The file $(MACHINE_CONFIG) does not exist."; \
		exit 1; \
	fi
	@if [ ! -f $(MONO_CONFIG) ]; then \
		echo "ERROR: The file $(MONO_CONFIG) does not exist."; \
		exit 1; \
	fi


================================================
FILE: csharp/README.md
================================================
# C# + SDL2 example

SDL2 must either be installed, or be available as a shared library.

## Arch Linux

### Building and running with Mono

Building:

    msc /unsafe main.cs

Running:

    mono main.exe

### Building and running as a native executable

`mkbundle` comes with `mono`.

Building:

    make

Running:

    ./main

### Building with `csc` and running with Wine

This builds a Windows GUI executable.

Building:

    csc /target:winexe /unsafe main.cs

Running:

    wine main.exe

## Windows

### Building

Either place csc.exe in the `PATH` and build with that, using:

    csc /target:winexe /unsafe main.cs

Or use the full path, for example:

    C:\Windows\Microsoft.NET\Framework\v3.5\csc /target:winexe /unsafe main.cs

## macOS

Apple Silicon (M1/M2/M3/aarch64) is not currently supported (as of 2024-08-06).

Running `make run` will:

* Create a `main.exe` file, but for the wrong CPU.
* Bundle the `main.exe` file into a `main` executable, which will look correct when using `file`.

But running `./main` will output an error message a bit like this one:

     Error mapping file: mono_file_map_error failed file:./main length:0x4685824X offset:0x3944448X error:Invalid argument(0x16)

Here is the status of macOS/M1/M2/aarch64 support for Mono:

* https://github.com/mono/mono/issues/21092

### SDL2

`SDL2.dll` is included (zlib license). It can also be downloaded from here: https://www.libsdl.org/download-2.0.php

This text came together with the `SDL2.dll` binary:

```
The Simple DirectMedia Layer (SDL for short) is a cross-platform library
designed to make it easy to write multi-media software, such as games
and emulators.

The Simple DirectMedia Layer library source code is available from:
https://www.libsdl.org/

This library is distributed under the terms of the zlib license:
http://www.zlib.net/zlib_license.html
```

## macOS

On a macOS with a M2 CPU, a main.exe and main file is built, but they did not run correctly here, neither directly, with mono or with wine. Pull requests are welcome.


================================================
FILE: csharp/main.cs
================================================
using System;
using System.Runtime.InteropServices;
using System.Text;

public class HelloWorld
{
    // From SDL.h
    private const UInt32 SDL_INIT_VIDEO = 0x00000020;

    // From SDL_video.h
    private const Int32 SDL_WINDOWPOS_UNDEFINED = 0x1FFF0000;
    private const UInt32 SDL_WINDOW_SHOWN = 0x00000004;

    // From SDL_render.h
    private const UInt32 SDL_RENDERER_ACCELERATED = 0x00000002;
    private const UInt32 SDL_RENDERER_PRESENTVSYNC = 0x00000004;

    [DllImport("SDL2")]
    private static extern unsafe Int32 SDL_Init(UInt32 flags);

    [DllImport("SDL2")]
    private static extern unsafe IntPtr SDL_CreateWindow(
        [MarshalAs(UnmanagedType.LPStr)] string title,
        int x,
        int y,
        int w,
        int h,
        uint flags
    );

    [DllImport("SDL2")]
    private static extern unsafe IntPtr SDL_CreateRenderer(
        IntPtr win,
        int index,
        uint flags
    );

    [DllImport("SDL2")]
    private static extern unsafe IntPtr SDL_CreateTextureFromSurface(
        IntPtr renderer,
        IntPtr surface
    );

    [DllImport("SDL2")]
    private static extern unsafe void SDL_DestroyRenderer(
        IntPtr renderer
    );

    [DllImport("SDL2")]
    private static extern unsafe void SDL_DestroyWindow(
        IntPtr window
    );

    [DllImport("SDL2")]
    private static extern unsafe void SDL_FreeSurface(
        IntPtr surface
    );

    [DllImport("SDL2")]
    private static extern unsafe void SDL_DestroyTexture(
        IntPtr texture
    );

    [DllImport("SDL2")]
    private static extern unsafe Int32 SDL_RenderClear(
        IntPtr renderer
    );

    [DllImport("SDL2")]
    private static extern unsafe Int32 SDL_RenderCopy(
        IntPtr renderer,
        IntPtr texture,
        IntPtr srcrect,
        IntPtr dstrect
    );

    [DllImport("SDL2")]
    private static extern unsafe void SDL_RenderPresent(
        IntPtr renderer
    );

    [DllImport("SDL2")]
    private static extern unsafe IntPtr SDL_LoadBMP_RW(
        IntPtr src,
        int freesrc
    );

    [DllImport("SDL2")]
    private static extern unsafe IntPtr SDL_RWFromFile(
        [MarshalAs(UnmanagedType.LPStr)] string filename,
        [MarshalAs(UnmanagedType.LPStr)] string permissions
    );

    [DllImport("SDL2")]
    private static extern unsafe void SDL_Quit();

    [DllImport("SDL2")]
    private static extern unsafe byte* SDL_GetError();

    // Call SDL_GetError() and return the C string as a C# String
    private static unsafe string SDL_GetErrorString()
    {
        StringBuilder sb = new StringBuilder();
        byte* errStr = SDL_GetError();
        int i = 0;
        while (errStr[i] != 0) // trust that the string returned from SDL_GetError() is properly terminated
        {
            sb.Append(Convert.ToChar(errStr[i]));
            i++;
        }
        return sb.ToString();
    }

    // Print the SDL_GetError() error message to stderr, with a preceding topic and also " Error: "
    private static void PrintErr(string topic)
    {
        Console.Error.WriteLine(topic + " Error: " + SDL_GetErrorString());
    }

    public class SDLWindow : IDisposable
    {
        public IntPtr Handle { get; private set; }

        public SDLWindow(string title, int x, int y, int w, int h, uint flags)
        {
            Handle = SDL_CreateWindow(title, x, y, w, h, flags);
            if (Handle == IntPtr.Zero)
            {
                throw new Exception("SDL_CreateWindow Error: " + SDL_GetErrorString());
            }
        }

        public void Dispose()
        {
            if (Handle != IntPtr.Zero)
            {
                SDL_DestroyWindow(Handle);
                Handle = IntPtr.Zero;
            }
        }
    }

    public class SDLRenderer : IDisposable
    {
        public IntPtr Handle { get; private set; }

        public SDLRenderer(SDLWindow window, int index, uint flags)
        {
            Handle = SDL_CreateRenderer(window.Handle, index, flags);
            if (Handle == IntPtr.Zero)
            {
                throw new Exception("SDL_CreateRenderer Error: " + SDL_GetErrorString());
            }
        }

        public void Dispose()
        {
            if (Handle != IntPtr.Zero)
            {
                SDL_DestroyRenderer(Handle);
                Handle = IntPtr.Zero;
            }
        }
    }

    public class SDLTexture : IDisposable
    {
        public IntPtr Handle { get; private set; }

        public SDLTexture(SDLRenderer renderer, IntPtr surface)
        {
            Handle = SDL_CreateTextureFromSurface(renderer.Handle, surface);
            if (Handle == IntPtr.Zero)
            {
                throw new Exception("SDL_CreateTextureFromSurface Error: " + SDL_GetErrorString());
            }
        }

        public void Dispose()
        {
            if (Handle != IntPtr.Zero)
            {
                SDL_DestroyTexture(Handle);
                Handle = IntPtr.Zero;
            }
        }
    }

    public static int Main(string[] args)
    {
        if (SDL_Init(SDL_INIT_VIDEO) != 0)
        {
            PrintErr("SDL_Init");
            return 1;
        }

        using (var window = new SDLWindow("Hello, World!", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 620, 387, SDL_WINDOW_SHOWN))
        using (var renderer = new SDLRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC))
        {
            IntPtr rwop = SDL_RWFromFile("../img/grumpy-cat.bmp", "rb");
            if (rwop == IntPtr.Zero)
            {
                PrintErr("SDL_RWFromFile");
                return 1;
            }

            IntPtr bmp = SDL_LoadBMP_RW(rwop, 1); // this also frees rwop
            if (bmp == IntPtr.Zero)
            {
                PrintErr("SDL_LoadBMP_RW");
                return 1;
            }

            using (var texture = new SDLTexture(renderer, bmp))
            {
                SDL_FreeSurface(bmp);

                for (int i = 0; i < 20; i++)
                {
                    SDL_RenderClear(renderer.Handle);
                    SDL_RenderCopy(renderer.Handle, texture.Handle, IntPtr.Zero, IntPtr.Zero);
                    SDL_RenderPresent(renderer.Handle);
                    System.Threading.Thread.Sleep(100);
                }
            }
        }

        SDL_Quit();

        return 0;
    }
}


================================================
FILE: csharp/main.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">
  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>
</Project>


================================================
FILE: d/.gitignore
================================================
bin/
main


================================================
FILE: d/Makefile
================================================
.PHONY: all msg clean fullclean

all: msg main

msg:
	@echo '--- D ---'

main: source/app.d
	@echo -n '[main] Compiling...'
	@dub -q build
	@echo 'ok'

run: msg main
	time ./main

clean:
	rm -f main

fullclean: clean


================================================
FILE: d/README.md
================================================
# D + SDL2

This example is based on public domain code from Peter Cartwright

https://github.com/pokedpeter/dlang-derelict-sdl2-example1


================================================
FILE: d/dub.json
================================================
{
	"name": "main",
	"authors": [
		"Peter Cartwright"
	],
	"description": "An example using Derelict and SDL2 in d",
	"copyright": "Copyright © 2016, Peter Cartwright",
	"license": "public domain",
	"dependencies": {
		"derelict-sdl2": "~>2.1.4"
	},
	"targetPath": "."
}


================================================
FILE: d/dub.selections.json
================================================
{
	"fileVersion": 1,
	"versions": {
		"derelict-sdl2": "2.1.4",
		"derelict-util": "2.0.6"
	}
}


================================================
FILE: d/source/app.d
================================================
// Based on https://github.com/pokedpeter/dlang-derelict-sdl2-example1

import std.stdio;
import derelict.sdl2.sdl;
import derelict.sdl2.image;
import std.conv;

void main()
{
    DerelictSDL2.load();
    DerelictSDL2Image.load();

    // Initialise SDL
    if (SDL_Init(SDL_INIT_VIDEO) != 0) {
        writeln("SDL_Init: ", SDL_GetError());
    }

    // Initialise IMG
    int flags = IMG_INIT_PNG;
    if ((IMG_Init(flags) & flags) != flags) {
        writeln("IMG_Init: ", to!string(IMG_GetError()));
    }

    // Load image
    SDL_Surface *imgSurf = IMG_Load("../img/grumpy-cat.png");
    if (imgSurf is null) {
        writeln("IMG_Load: ", to!string(IMG_GetError()));
    }

    // Create a window
    SDL_Window* appWin = SDL_CreateWindow(
        "Hello, World!",
        SDL_WINDOWPOS_UNDEFINED,
        SDL_WINDOWPOS_UNDEFINED,
        imgSurf.w,
        imgSurf.h,
        SDL_WINDOW_OPENGL
    );

    if (appWin is null) {
        writefln("SDL_CreateWindow: ", SDL_GetError());
        return;
    }

    // Get the window surface
    SDL_Surface *winSurf = SDL_GetWindowSurface(appWin);
    if (winSurf is null) {
        writeln("SDL_GetWindowSurface: ", SDL_GetError());
    }

    // Define a colour for the surface, based on RGB values
    int colour = SDL_MapRGB(winSurf.format, 0xFF, 0xFF, 0xFF);

    // Fill the window surface with the colour
    SDL_FillRect(winSurf, null, colour);

    // Copy loaded image to window surface
    SDL_Rect dstRect;
    dstRect.x = 0;
    dstRect.y = 0;
    SDL_BlitSurface(imgSurf, null, winSurf, &dstRect);

    // Copy the window surface to the screen
    SDL_UpdateWindowSurface(appWin);

    // Polling for events
    for (int i = 0; i < 20; i++) {
        SDL_Delay(100);
    }

    // Close and destroy the window
    if (appWin !is null) {
        SDL_DestroyWindow(appWin);
    }

    // Tidy up
    IMG_Quit();
    SDL_Quit();
}


================================================
FILE: dart/Makefile
================================================
.PHONY: msg run clean

all: msg main

msg:
	@echo '--- Dart ---'

pubspec.lock: pubspec.yaml
	dart pub get

main: pubspec.lock main.dart
	dart compile exe main.dart -o main

run:
	time ./main

clean:
	rm -f main

fullclean: clean
	rm -f pubspec.lock


================================================
FILE: dart/main.dart
================================================
import 'dart:ffi';
import 'package:ffi/ffi.dart';

// From SDL.h
const int SDL_INIT_VIDEO = 0x00000020;

// From SDL_video.h
const int SDL_WINDOWPOS_UNDEFINED = 0x1FFF0000;
const int SDL_WINDOW_SHOWN = 0x00000004;

// From SDL_render.h
const int SDL_RENDERER_ACCELERATED = 0x00000002;
const int SDL_RENDERER_PRESENTVSYNC = 0x00000004;

// Load the SDL2 library
final DynamicLibrary sdlLib = DynamicLibrary.open('libSDL2.so');

// Define the signature of the C functions
typedef SDL_InitC = Int32 Function(Uint32 flags);
typedef SDL_InitDart = int Function(int flags);

typedef SDL_CreateWindowC = Pointer Function(Pointer<Utf8> title, Int32 x, Int32 y, Int32 w, Int32 h, Uint32 flags);
typedef SDL_CreateWindowDart = Pointer Function(Pointer<Utf8> title, int x, int y, int w, int h, int flags);

typedef SDL_CreateRendererC = Pointer Function(Pointer win, Int32 index, Uint32 flags);
typedef SDL_CreateRendererDart = Pointer Function(Pointer win, int index, int flags);

typedef SDL_CreateTextureFromSurfaceC = Pointer Function(Pointer renderer, Pointer surface);
typedef SDL_CreateTextureFromSurfaceDart = Pointer Function(Pointer renderer, Pointer surface);

typedef SDL_DestroyRendererC = Void Function(Pointer renderer);
typedef SDL_DestroyRendererDart = void Function(Pointer renderer);

typedef SDL_DestroyWindowC = Void Function(Pointer window);
typedef SDL_DestroyWindowDart = void Function(Pointer window);

typedef SDL_FreeSurfaceC = Void Function(Pointer surface);
typedef SDL_FreeSurfaceDart = void Function(Pointer surface);

typedef SDL_DestroyTextureC = Void Function(Pointer texture);
typedef SDL_DestroyTextureDart = void Function(Pointer texture);

typedef SDL_RenderClearC = Int32 Function(Pointer renderer);
typedef SDL_RenderClearDart = int Function(Pointer renderer);

typedef SDL_RenderCopyC = Int32 Function(Pointer renderer, Pointer texture, Pointer srcrect, Pointer dstrect);
typedef SDL_RenderCopyDart = int Function(Pointer renderer, Pointer texture, Pointer srcrect, Pointer dstrect);

typedef SDL_RenderPresentC = Void Function(Pointer renderer);
typedef SDL_RenderPresentDart = void Function(Pointer renderer);

typedef SDL_RWFromFileC = Pointer Function(Pointer<Utf8> file, Pointer<Utf8> mode);
typedef SDL_RWFromFileDart = Pointer Function(Pointer<Utf8> file, Pointer<Utf8> mode);

typedef SDL_LoadBMP_RWC = Pointer Function(Pointer src, Int32 freesrc);
typedef SDL_LoadBMP_RWDart = Pointer Function(Pointer src, int freesrc);

typedef SDL_DelayC = Void Function(Uint32 ms);
typedef SDL_DelayDart = void Function(int ms);

typedef SDL_QuitC = Void Function();
typedef SDL_QuitDart = void Function();

void main() {
  // Look up the functions
  final SDL_Init = sdlLib.lookupFunction<SDL_InitC, SDL_InitDart>('SDL_Init');
  final SDL_CreateWindow = sdlLib.lookupFunction<SDL_CreateWindowC, SDL_CreateWindowDart>('SDL_CreateWindow');
  final SDL_CreateRenderer = sdlLib.lookupFunction<SDL_CreateRendererC, SDL_CreateRendererDart>('SDL_CreateRenderer');
  final SDL_CreateTextureFromSurface = sdlLib.lookupFunction<SDL_CreateTextureFromSurfaceC, SDL_CreateTextureFromSurfaceDart>('SDL_CreateTextureFromSurface');
  final SDL_DestroyRenderer = sdlLib.lookupFunction<SDL_DestroyRendererC, SDL_DestroyRendererDart>('SDL_DestroyRenderer');
  final SDL_DestroyWindow = sdlLib.lookupFunction<SDL_DestroyWindowC, SDL_DestroyWindowDart>('SDL_DestroyWindow');
  final SDL_FreeSurface = sdlLib.lookupFunction<SDL_FreeSurfaceC, SDL_FreeSurfaceDart>('SDL_FreeSurface');
  final SDL_DestroyTexture = sdlLib.lookupFunction<SDL_DestroyTextureC, SDL_DestroyTextureDart>('SDL_DestroyTexture');
  final SDL_RenderClear = sdlLib.lookupFunction<SDL_RenderClearC, SDL_RenderClearDart>('SDL_RenderClear');
  final SDL_RenderCopy = sdlLib.lookupFunction<SDL_RenderCopyC, SDL_RenderCopyDart>('SDL_RenderCopy');
  final SDL_RenderPresent = sdlLib.lookupFunction<SDL_RenderPresentC, SDL_RenderPresentDart>('SDL_RenderPresent');
  final SDL_RWFromFile = sdlLib.lookupFunction<SDL_RWFromFileC, SDL_RWFromFileDart>('SDL_RWFromFile');
  final SDL_LoadBMP_RW = sdlLib.lookupFunction<SDL_LoadBMP_RWC, SDL_LoadBMP_RWDart>('SDL_LoadBMP_RW');
  final SDL_Delay = sdlLib.lookupFunction<SDL_DelayC, SDL_DelayDart>('SDL_Delay');
  final SDL_Quit = sdlLib.lookupFunction<SDL_QuitC, SDL_QuitDart>('SDL_Quit');

  SDL_Init(SDL_INIT_VIDEO);

  final titleCString = 'Hello, World!'.toNativeUtf8();
  var window = SDL_CreateWindow(titleCString, SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 620, 387, SDL_WINDOW_SHOWN);

  var renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC);

  final bmpFileCString = '../img/grumpy-cat.bmp'.toNativeUtf8();
  final modeCString = 'rb'.toNativeUtf8();
  var rwop = SDL_RWFromFile(bmpFileCString, modeCString);

  var bmp = SDL_LoadBMP_RW(rwop, 1);
  var texture = SDL_CreateTextureFromSurface(renderer, bmp);
  SDL_FreeSurface(bmp);

  for (int i = 0; i < 20; i++) {
    SDL_RenderClear(renderer);
    SDL_RenderCopy(renderer, texture, nullptr, nullptr);
    SDL_RenderPresent(renderer);
    SDL_Delay(100);
  }

  SDL_DestroyTexture(texture);
  SDL_DestroyRenderer(renderer);
  SDL_DestroyWindow(window);

  calloc.free(titleCString);
  calloc.free(bmpFileCString);
  calloc.free(modeCString);

  SDL_Quit();
}


================================================
FILE: dart/pubspec.yaml
================================================
name: main
description: SDL2 Example
version: 1.0.0
homepage: https://github.com/xyproto/sdl2-examples

environment:
  sdk: '>=3.0.0 <4.0.0'

dependencies:
  ffi: ^2.0.2

executables:
  main:


================================================
FILE: freebasic/Makefile
================================================
.PHONY: all msg clean fullclean

all: msg main

msg:
	@echo '--- FreeBASIC ---'

main: main.bas
	@echo -n '[main] Compiling...'
	@fbc main.bas
	@echo 'ok'

run: msg main
	time ./main

fullclean:
clean:
	rm -f *.o main


================================================
FILE: freebasic/README.md
================================================
# FreeBASIC

Tested on Arch Linux with the `fbc-git` package from AUR.

SDL2 must be included with the FreeBASIC installation on your system for this example to work.


================================================
FILE: freebasic/main.bas
================================================
#include "SDL2/SDL.bi"
#include "SDL2/SDL_image.bi"
#include "SDL2/SDL_ttf.bi"

SDL_Init(SDL_INIT_VIDEO)
IMG_Init(0)

var win = SDL_CreateWindow("Hello world!", 100, 100, 620, 387, 0)
var ren = SDL_CreateRenderer(win, -1, 0)

'' Load the image into a surface and then into a texture
var img = IMG_Load("../img/grumpy-cat.bmp")
var tex = SDL_CreateTextureFromSurface(ren, img)
SDL_FreeSurface(img) : img = NULL

for i as Integer = 0 to 20
  SDL_RenderClear(ren)
  SDL_RenderCopy(ren, tex, NULL, NULL)
  SDL_RenderPresent(ren)
  SDL_Delay(100)
next i

SDL_DestroyTexture(tex)
SDL_DestroyRenderer(ren)
SDL_DestroyWindow(win)
SDL_Quit()


================================================
FILE: fsharp/Makefile
================================================
.PHONY: all msg clean

all: msg bin

msg:
	@echo '--- F# ---'

bin: main.fsproj main.fs
	dotnet build --sc --nologo --ucr

run: msg bin
	time dotnet run

clean:
	rm -rf bin/ obj/


================================================
FILE: fsharp/main.fs
================================================
module Main

open System
open System.Runtime.InteropServices
open System.Text
open Microsoft.FSharp.NativeInterop

let SDL_INIT_VIDEO : uint32 = 0x00000020u
let SDL_WINDOWPOS_UNDEFINED : int32 = 0x1FFF0000
let SDL_WINDOW_SHOWN : uint32 = 0x00000004u
let SDL_RENDERER_ACCELERATED : uint32 = 0x00000002u
let SDL_RENDERER_PRESENTVSYNC : uint32 = 0x00000004u

[<DllImport("SDL2")>]
extern int32 SDL_Init(uint32 flags)

[<DllImport("SDL2")>]
extern IntPtr SDL_CreateWindow(string title, int x, int y, int w, int h, uint32 flags)

[<DllImport("SDL2")>]
extern IntPtr SDL_CreateRenderer(IntPtr win, int index, uint32 flags)

[<DllImport("SDL2")>]
extern IntPtr SDL_CreateTextureFromSurface(IntPtr renderer, IntPtr surface)

[<DllImport("SDL2")>]
extern void SDL_DestroyRenderer(IntPtr renderer)

[<DllImport("SDL2")>]
extern void SDL_DestroyWindow(IntPtr window)

[<DllImport("SDL2")>]
extern void SDL_FreeSurface(IntPtr surface)

[<DllImport("SDL2")>]
extern void SDL_DestroyTexture(IntPtr texture)

[<DllImport("SDL2")>]
extern int32 SDL_RenderClear(IntPtr renderer)

[<DllImport("SDL2")>]
extern int32 SDL_RenderCopy(IntPtr renderer, IntPtr texture, IntPtr srcrect, IntPtr dstrect)

[<DllImport("SDL2")>]
extern void SDL_RenderPresent(IntPtr renderer)

[<DllImport("SDL2")>]
extern IntPtr SDL_LoadBMP_RW(IntPtr src, int freesrc)

[<DllImport("SDL2")>]
extern IntPtr SDL_RWFromFile(string filename, string permissions)

[<DllImport("SDL2")>]
extern void SDL_Quit()

[<DllImport("SDL2")>]
extern IntPtr SDL_GetError()

let printErr (topic: string) =
    let errPtr = SDL_GetError()
    let errString = Marshal.PtrToStringAnsi(errPtr)
    Console.Error.WriteLine($"{topic} Error: {errString}")

[<EntryPoint>]
let main argv =
    if SDL_Init(SDL_INIT_VIDEO) <> 0 then
        printErr "SDL_Init"
        1
    else
        let win = SDL_CreateWindow("Hello, World!", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 620, 387, SDL_WINDOW_SHOWN)
        if win = IntPtr.Zero then
            printErr "SDL_CreateWindow"
            1
        else
            let ren = SDL_CreateRenderer(win, -1, SDL_RENDERER_ACCELERATED ||| SDL_RENDERER_PRESENTVSYNC)
            if ren = IntPtr.Zero then
                printErr "SDL_CreateRenderer"
                SDL_DestroyWindow win
                SDL_Quit()
                1
            else
                let rwop = SDL_RWFromFile("../img/grumpy-cat.bmp", "rb")
                if rwop = IntPtr.Zero then
                    printErr "SDL_RWFromFile"
                    SDL_DestroyRenderer ren
                    SDL_DestroyWindow win
                    SDL_Quit()
                    1
                else
                    let bmp = SDL_LoadBMP_RW(rwop, 1) // this also frees rwop
                    if bmp = IntPtr.Zero then
                        printErr "SDL_LoadBMP_RW"
                        SDL_DestroyRenderer ren
                        SDL_DestroyWindow win
                        SDL_Quit()
                        1
                    else
                        let tex = SDL_CreateTextureFromSurface(ren, bmp)
                        SDL_FreeSurface(bmp)
                        if tex = IntPtr.Zero then
                            printErr "SDL_CreateTextureFromSurface"
                            SDL_DestroyRenderer ren
                            SDL_DestroyWindow win
                            SDL_Quit()
                            1
                        else
                            for i in 1 .. 20 do
                                SDL_RenderClear ren |> ignore
                                SDL_RenderCopy(ren, tex, IntPtr.Zero, IntPtr.Zero) |> ignore
                                SDL_RenderPresent ren
                                System.Threading.Thread.Sleep(100)
                            SDL_DestroyTexture tex
                            SDL_DestroyRenderer ren
                            SDL_DestroyWindow win
                            SDL_Quit()
                            0


================================================
FILE: fsharp/main.fsproj
================================================
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <Configuration>Release</Configuration>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <RootNamespace>YourNamespace</RootNamespace>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>

  <ItemGroup>
    <Compile Include="main.fs" />
  </ItemGroup>

</Project>


================================================
FILE: gambas/.directory
================================================
[Desktop Entry]
Icon=./.icon.png


================================================
FILE: gambas/.gitignore
================================================
#---- Gambas files to ignore (v5)
*.gambas
.lock
*~
core
core.*
vgcore
vgcore.*
.kdbg*
.*.prof
.lang/*.pot
.gambas/*
.settings
.startup
.list
.info
main
#----


================================================
FILE: gambas/.project
================================================
# Gambas Project File 3.0
Title=Grumpy Cat
Startup=MMain
Version=1.0.12
Component=gb.image
Component=gb.sdl2
Component=gb.opengl
TabSize=2
Language=en_US
Packager=1


================================================
FILE: gambas/.src/MMain.module
================================================
' Gambas module file

Private hWindow As Window
Private hTimer As Timer
Private hImage As Image

Public Sub Main()

  hWindow = New Window As "MainWindow"
  With hWindow
    .Resize(620, 387)
    .Resizable = False
    .FrameRate = 60
    .Title = "Hello World!"
    .Show
  End With

  hImage = Image.Load(Application.Dir &/ "../img/grumpy-cat.bmp")

  hTimer = New Timer As "QuitTimer"
  With hTimer
    .Delay = 2000
    .Enabled = True
  End With
End

Public Sub MainWindow_Draw()
  Draw.Clear
  Draw.Image(hImage, 0, 0, 620, 387)
End

Public Sub QuitTimer_Timer()
  hTimer.Enabled = False
  hWindow.Close()
  Quit
End


================================================
FILE: gambas/Makefile
================================================
.PHONY: all main msg clean fullclean

all: msg main

msg:
	@echo '--- Gambas ---'

main: main.bas
	gbc3
	gba3 -o main

run: msg main
	time ./main

clean:
	rm -f main

fullclean: clean


================================================
FILE: gccgo/Makefile
================================================
.PHONY: all clean debug main msg run small static

CFLAGS?=$(shell pkg-config sdl2 --cflags --libs)

all: CFLAGS+=-O2
all: main

small: CFLAGS+=-Os
small: main
	sstrip main

debug: CFLAGS+=-O0 -g
debug: main

static: CFLAGS+=-O2 -static
static: main

main:
	go build -v -compiler gccgo -gccgoflags '${CFLAGS}' -o main

msg:
	@echo '--- GCCGO ---'

run:
	./main

clean:
	go clean


================================================
FILE: gccgo/README.md
================================================
Works with gccgo 8.2.1 and the latest version of go-sdl2.

Requirements:

* The SDL2 library and headers installed on your system.
* For macOS, remember to install the Development Libraries (place the SDL2 framework in `/Library/Frameworks`).
* The latest version of `gccgo` (tested with `gccgo 8.2.1`).
* The `sdl2` package:

    go get github.com/veandco/go-sdl2/sdl

Building:

    make

Running:

    ./main


================================================
FILE: gccgo/go.mod
================================================
module github.com/xyproto/sdl2-examples/gccgo

go 1.18

require github.com/veandco/go-sdl2 v0.4.36


================================================
FILE: gccgo/go.sum
================================================
github.com/veandco/go-sdl2 v0.4.36 h1:Ltydev536rRQodmIrTWFZ3dRp5A+/6t5CYvbi4Kvia0=
github.com/veandco/go-sdl2 v0.4.36/go.mod h1:OROqMhHD43nT4/i9crJukyVecjPNYYuCofep6SNiAjY=


================================================
FILE: gccgo/main.go
================================================
package main

import (
	"log"
	"path/filepath"

	"github.com/veandco/go-sdl2/img"
	"github.com/veandco/go-sdl2/sdl"
)

func main() {
	// Initialize
	if err := sdl.Init(sdl.INIT_EVERYTHING); err != nil {
		log.Fatalln("Init Error:", err)
	}
	// Make sure to quit when the function returns
	defer sdl.Quit()

	// Create the window
	win, err := sdl.CreateWindow("Hello World!", 100, 100, 620, 387, sdl.WINDOW_SHOWN)
	if err != nil {
		log.Fatalln("CreateWindow Error:", err)
	}
	defer win.Destroy()

	// Create a renderer
	ren, err := sdl.CreateRenderer(win, -1, sdl.RENDERER_ACCELERATED|sdl.RENDERER_PRESENTVSYNC)
	if err != nil {
		log.Fatalln("CreateRenderer Error:", err)
	}
	defer ren.Destroy()

	// Load the image as a texture
	tex, err := img.LoadTexture(ren, filepath.Join("..", "img", "grumpy-cat.png"))
	if err != nil {
		log.Fatalln("LoadTexture Error:", err)
	}
	defer tex.Destroy()

	for i := 0; i < 20; i++ {
		// Clear the renderer and display the image/texture
		ren.Clear()
		ren.Copy(tex, nil, nil)
		ren.Present()

		// Wait 100 ms
		sdl.Delay(100)
	}
}


================================================
FILE: gccgo/vendor/github.com/veandco/go-sdl2/CONTRIBUTORS.md
================================================
Contributors
============
Here's the list of contributors with their respective Github URLs.
* [Jacky Boen](https://github.com/jackyb)
* [HardWareGuy](https://github.com/HardWareGuy)
* [akovaski](https://github.com/akovaski)
* [Jeromy Johnson](https://github.com/whyrusleeping)
* [Cai Lei](https://github.com/ccll)
* [Arne Döring](https://github.com/krux02)
* [Marcus von Appen](https://github.com/marcusva)
* [Tom Murray](https://github.com/TomMurray)
* [Ian Davis](https://github.com/iand)
* [hschendel](https://github.com/hschendel)
* [Ingo Oeser](https://github.com/nightlyone)
* [nlordell](https://github.com/nlordell)
* [Ben Davies](https://github.com/JalfResi)
* [Bastien Dejean](https://github.com/baskerville)
* [Pirmin Tapken](https://github.com/PirminTapken)
* [Robert Lillack](https://github.com/roblillack)
* [Marcell Jusztin](https://github.com/morcmarc)
* [Stan Schwertly](https://github.com/Stantheman)
* [Michael Vetter](https://github.com/jubalh)
* [Tom Fogal](https://github.com/tfogal)
* [Philipp Meinen](https://github.com/PhiCode)
* [Thomas McGrew](https://github.com/mcgrew)
* [Geoff Catlin](https://github.com/gcatlin)
* [Schobers](https://github.com/Schobers)
* [Jan Tuitman](https://github.com/jantuitman)
* [Nick Powell](https://github.com/THUNDERGROOVE)
* [Steven R. Wiley](https://github.com/srwiley)
* [Franco Lazzarino](https://github.com/flazz)
* [Jason Alan Palmer](https://github.com/jalan)
* [Seuk Won Kang](https://github.com/kasworld)
* [Brandon Mulcahy](https://github.com/jangler)
* [Tim Anema](https://github.com/tanema)
* [Tyler Compton](https://github.com/velovix)
* [Nicolas Hess](https://github.com/n0dev)
* [Stephen Noonan](https://github.com/tycho)
* [Guilherme Freitas Nemeth](https://github.com/glhrmfrts)
* [Charney Kaye](https://github.com/charneykaye)
* [Lars Scheme](https://github.com/gonutz)
* [Emil Laine](https://github.com/emlai)
* [Sergey Parshukov](https://github.com/jBugman)
* [Casey DeLorme](https://github.com/cdelorme)
* [Andreas T. Jonsson](https://github.com/andreas-jonsson)
* [Milan Nikolic](https://github.com/gen2brain)
* [Mike Gerow](https://github.com/gerow)
* [Lilis Iskandar](https://github.com/veeableful)
* [tfriedel6](https://github.com/tfriedel6)
* [Eric Bronner](https://github.com/MoonWatcher582)
* [Julien Castelain](https://github.com/julien)
* [Robert Wallis](https://github.com/robert-wallis)
* [Chae-Young Song](https://github.com/chaeyoungsong)
* [Robert Wallis](https://github.com/robert-wallis)
* [Lennart Buhl](https://github.com/r41d)
* [Giovanni Bajo](https://github.com/rasky)
* [Laurent Vaucher](https://github.com/slowfrog)
* [Mike](https://github.com/barbeque)
* [Tomas Virgl](https://github.com/tvi)
* [Aye Aye Maung](https://github.com/ZeroXLR)
* [Anton Malashin](https://github.com/malashin)
* [John Perkins](https://github.com/mpath)
* [jclc](https://github.com/jclc)
* [flga](https://github.com/flga)

_if anyone is missing, let me know!.. or you can add yourself in :)_


================================================
FILE: gccgo/vendor/github.com/veandco/go-sdl2/LICENSE
================================================
Copyright (c) 2013, Go-SDL2 Authors
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

	* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
	* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
	* Neither the name of Go-SDL2 nor the names of its contributors may be
used to endorse or promote products derived from this software without specific
prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


================================================
FILE: gccgo/vendor/github.com/veandco/go-sdl2/_libs/dummy.go
================================================
package dummy


================================================
FILE: gccgo/vendor/github.com/veandco/go-sdl2/img/sdl_image.go
================================================
// Package img is a simple library to load images of various formats as SDL surfaces.
package img

//#include <stdlib.h>
//#include "sdl_image_wrapper.h"
import "C"
import "unsafe"
import "errors"
import "github.com/veandco/go-sdl2/sdl"

// Flags which may be passed to img.Init() to load support of image formats, can be bitwise OR'd together.
const (
	INIT_JPG  = 0x00000001 // JPG
	INIT_PNG  = 0x00000002 // PNG
	INIT_TIF  = 0x00000004 // TIF
	INIT_WEBP = 0x00000008 // WebP
)

// LinkedVersion returns the version of the dynamically linked SDL_image library.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_7.html)
func LinkedVersion() *sdl.Version {
	return (*sdl.Version)(unsafe.Pointer(C.IMG_Linked_Version()))
}

// Init loads dynamic libraries and prepares them for use. Flags should be one or more flags from IMG_InitFlags OR'd together. It returns the flags successfully initialized, or 0 on failure.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_8.html)
func Init(flags int) error {
	_flags := (C.int)(flags)
	ret := int(C.IMG_Init(_flags))
	if ret == 0 {
		return GetError()
	}
	return nil
}

// Quit unloads libraries loaded with img.Init().
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_9.html)
func Quit() {
	C.IMG_Quit()
}

// GetError returns the last error that occurred, or an empty string if there hasn't been an error message set since the last call to sdl.ClearError().
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_45.html)
func GetError() error {
	e := C.IMG_GetError()
	if e == nil {
		return nil
	}
	return errors.New(C.GoString(e))
}

// LoadTypedRW loads an image from an SDL data source. The 'type' may be one of: "BMP", "GIF", "PNG", etc. If the image format supports a transparent pixel, SDL will set the colorkey for the surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_13.html)
func LoadTypedRW(src *sdl.RWops, freesrc bool, type_ string) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_freesrc := (C.int)(sdl.Btoi(freesrc))
	_type := C.CString(type_)
	defer C.free(unsafe.Pointer(_type))
	_surface := C.IMG_LoadTyped_RW(_src, _freesrc, _type)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// Load loads a file for use as an image in a new surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_11.html)
func Load(file string) (*sdl.Surface, error) {
	_file := C.CString(file)
	defer C.free(unsafe.Pointer(_file))
	_surface := C.IMG_Load(_file)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// LoadRW loads an image from an SDL data source for use as a surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_12.html)
func LoadRW(src *sdl.RWops, freesrc bool) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_freesrc := (C.int)(sdl.Btoi(freesrc))
	_surface := C.IMG_Load_RW(_src, _freesrc)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// LoadTexture loads an image directly into a render texture.
func LoadTexture(renderer *sdl.Renderer, file string) (*sdl.Texture, error) {
	_renderer := (*C.SDL_Renderer)(unsafe.Pointer(renderer))
	_file := C.CString(file)
	defer C.free(unsafe.Pointer(_file))
	_surface := C.IMG_LoadTexture(_renderer, _file)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Texture)(unsafe.Pointer(_surface)), nil
}

// LoadTextureRW loads an image from an SDL data source directly into a render texture.
func LoadTextureRW(renderer *sdl.Renderer, src *sdl.RWops, freesrc bool) (*sdl.Texture, error) {
	_renderer := (*C.SDL_Renderer)(unsafe.Pointer(renderer))
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_freesrc := (C.int)(sdl.Btoi(freesrc))
	_surface := C.IMG_LoadTexture_RW(_renderer, _src, _freesrc)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Texture)(unsafe.Pointer(_surface)), nil
}

// IsICO reports whether ICO format is supported and image data is readable as an ICO.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_31.html)
func IsICO(src *sdl.RWops) bool {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	return int(C.IMG_isICO(_src)) > 0
}

// IsCUR reports whether CUR format is supported and image data is readable as a CUR.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_30.html)
func IsCUR(src *sdl.RWops) bool {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	return int(C.IMG_isCUR(_src)) > 0
}

// IsBMP reports whether BMP format is supported and image data is readable as a BMP.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_32.html)
func IsBMP(src *sdl.RWops) bool {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	return int(C.IMG_isBMP(_src)) > 0
}

// IsGIF reports whether GIF format is supported and image data is readable as a GIF.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_37.html)
func IsGIF(src *sdl.RWops) bool {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	return int(C.IMG_isGIF(_src)) > 0
}

// IsJPG reports whether JPG format is supported and image data is readable as a JPG.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_38.html)
func IsJPG(src *sdl.RWops) bool {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	return int(C.IMG_isJPG(_src)) > 0
}

// IsLBM reports whether LBM format is supported and image data is readable as an LBM.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_41.html)
func IsLBM(src *sdl.RWops) bool {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	return int(C.IMG_isLBM(_src)) > 0
}

// IsPCX reports whether PCX format is supported and image data is readable as a PCX.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_36.html)
func IsPCX(src *sdl.RWops) bool {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	return int(C.IMG_isPCX(_src)) > 0
}

// IsPNG reports whether PNG format is supported and image data is readable as a PNG.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_40.html)
func IsPNG(src *sdl.RWops) bool {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	return int(C.IMG_isPNG(_src)) > 0
}

// IsPNM reports whether PNM format is supported and image data is readable as a PNM.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_33.html)
func IsPNM(src *sdl.RWops) bool {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	return int(C.IMG_isPNM(_src)) > 0
}

// IsTIF reports whether TIF format is supported and image data is readable as a TIF.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_39.html)
func IsTIF(src *sdl.RWops) bool {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	return int(C.IMG_isTIF(_src)) > 0
}

// IsXCF reports whether XCF format is supported and image data is readable as an XCF.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_35.html)
func IsXCF(src *sdl.RWops) bool {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	return int(C.IMG_isXCF(_src)) > 0
}

// IsXPM reports whether XPM format is supported and image data is readable as an XPM.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_34.html)
func IsXPM(src *sdl.RWops) bool {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	return int(C.IMG_isXPM(_src)) > 0
}

// IsXV reports whether XV format is supported and image data is readable as an XV thumbnail.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_42.html)
func IsXV(src *sdl.RWops) bool {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	return int(C.IMG_isXV(_src)) > 0
}

// IsWEBP reports whether WEBP format is supported and image data is readable as a WEBP.
func IsWEBP(src *sdl.RWops) bool {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	return int(C.IMG_isWEBP(_src)) > 0
}

// LoadICORW loads an ICO image from an SDL data source for use as a surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_15.html)
func LoadICORW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadICO_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// LoadCURRW loads a CUR image from an SDL data source for use as a surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_14.html)
func LoadCURRW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadCUR_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// LoadBMPRW loads a BMP image from an SDL data source for use as a surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_16.html)
func LoadBMPRW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadBMP_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// LoadGIFRW loads a GIF image from an SDL data source for use as a surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_21.html)
func LoadGIFRW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadGIF_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// LoadJPGRW loads a JPG image from an SDL data source for use as a surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_22.html)
func LoadJPGRW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadJPG_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// LoadLBMRW loads an LBM image from an SDL data source for use as a surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_26.html)
func LoadLBMRW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadLBM_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// LoadPCXRW loads a PCX image from an SDL data source for use as a surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_20.html)
func LoadPCXRW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadPCX_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// LoadPNGRW loads a PNG image from an SDL data source for use as a surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_24.html)
func LoadPNGRW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadPNG_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// LoadPNMRW loads a PNM image from an SDL data source for use as a surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_17.html)
func LoadPNMRW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadPNM_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// LoadTGARW loads a TGA image from an SDL data source for use as a surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_25.html)
func LoadTGARW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadTGA_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// LoadTIFRW loads a TIF image from an SDL data source for use as a surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_23.html)
func LoadTIFRW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadTIF_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// LoadXCFRW loads an XCF image from an SDL data source for use as a surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_19.html)
func LoadXCFRW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadXCF_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// LoadXPMRW loads an XPM image from an SDL data source for use as a surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_18.html)
func LoadXPMRW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadXPM_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// LoadXVRW loads an XV thumbnail image from an SDL data source for use as a surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_27.html)
func LoadXVRW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadXV_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// LoadWEBPRW loads a WEBP image from an SDL data source for use as a surface.
func LoadWEBPRW(src *sdl.RWops) (*sdl.Surface, error) {
	_src := (*C.SDL_RWops)(unsafe.Pointer(src))
	_surface := C.IMG_LoadWEBP_RW(_src)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// ReadXPMFromArray loads an XPM image from xpm data for use as a surface.
// (http://www.libsdl.org/projects/SDL_image/docs/SDL_image_28.html)
func ReadXPMFromArray(xpm string) (*sdl.Surface, error) {
	_xpm := C.CString(xpm)
	defer C.free(unsafe.Pointer(_xpm))
	_surface := C.IMG_ReadXPMFromArray(&_xpm)
	if _surface == nil {
		return nil, GetError()
	}
	return (*sdl.Surface)(unsafe.Pointer(_surface)), nil
}

// SavePNG saves a surface as PNG file.
func SavePNG(surface *sdl.Surface, file string) error {
	_surface := (*C.SDL_Surface)(unsafe.Pointer(surface))
	_file := C.CString(file)
	defer C.free(unsafe.Pointer(_file))
	_ret := C.IMG_SavePNG(_surface, _file)
	if _ret < 0 {
		return GetError()
	}
	return nil
}

// SavePNGRW saves a surface to an SDL data source.
func SavePNGRW(surface *sdl.Surface, dst *sdl.RWops, freedst int) error {
	_surface := (*C.SDL_Surface)(unsafe.Pointer(surface))
	_dst := (*C.SDL_RWops)(unsafe.Pointer(dst))
	_freedst := (C.int)(freedst)
	_ret := C.IMG_SavePNG_RW(_surface, _dst, _freedst)
	if _ret < 0 {
		return GetError()
	}
	return nil
}


================================================
FILE: gccgo/vendor/github.com/veandco/go-sdl2/img/sdl_image_cgo.go
================================================
// +build !static

package img

//#cgo linux freebsd darwin pkg-config: sdl2
//#cgo linux freebsd darwin LDFLAGS: -lSDL2_image
//#cgo windows LDFLAGS: -lSDL2 -lSDL2_image
import "C"


================================================
FILE: gccgo/vendor/github.com/veandco/go-sdl2/img/sdl_image_cgo_static.go
================================================
// +build static

package img

//#cgo CFLAGS: -I${SRCDIR}/../_libs/include -I${SRCDIR}/../_libs/include/SDL2
//#cgo LDFLAGS: -L${SRCDIR}/../_libs
//#cgo linux,386 LDFLAGS: -lSDL2_image_linux_386 -Wl,--no-undefined -lpng_linux_386 -ljpeg_linux_386 -lSDL2_linux_386 -lm -ldl -lz -lasound -lm -ldl -lpthread -lX11 -lXext -lXcursor -lXinerama -lXi -lXrandr -lXss -lXxf86vm -lpthread -lrt
//#cgo linux,amd64 LDFLAGS: -lSDL2_image_linux_amd64 -Wl,--no-undefined -lpng_linux_amd64 -ljpeg_linux_amd64 -lSDL2_linux_amd64 -lm -ldl -lz -lasound -lm -ldl -lpthread -lX11 -lXext -lXcursor -lXinerama -lXi -lXrandr -lXss -lXxf86vm -lpthread -lrt
//#cgo windows,386 LDFLAGS: -lSDL2_image_windows_386 -Wl,--no-undefined -lpng_windows_386 -ljpeg_windows_386 -lz_windows_386 -lSDL2_windows_386 -lSDL2main_windows_386 -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -lsetupapi -static-libgcc
//#cgo windows,amd64 LDFLAGS: -lSDL2_image_windows_amd64 -Wl,--no-undefined -lpng_windows_amd64 -ljpeg_windows_amd64 -lz_windows_amd64 -lSDL2_windows_amd64 -lSDL2main_windows_amd64 -Wl,--no-undefined -lm -ldinput8 -ldxguid -ldxerr8 -luser32 -lgdi32 -lwinmm -limm32 -lole32 -loleaut32 -lshell32 -lversion -luuid -lsetupapi -static-libgcc
//#cgo darwin,amd64 LDFLAGS: -lSDL2_image_darwin_amd64 -lSDL2_darwin_amd64 -lpng_darwin_amd64 -ljpeg_darwin_amd64 -lm -lz -liconv -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,ForceFeedback -lobjc -Wl,-framework,CoreVideo -Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-framework,Metal
//#cgo darwin,arm64 LDFLAGS: -lSDL2_image_darwin_arm64 -lSDL2_darwin_arm64 -lpng_darwin_arm64 -ljpeg_darwin_arm64 -lm -lz -liconv -Wl,-framework,CoreAudio -Wl,-framework,AudioToolbox -Wl,-framework,ForceFeedback -lobjc -Wl,-framework,CoreVideo -Wl,-framework,Cocoa -Wl,-framework,Carbon -Wl,-framework,IOKit -Wl,-framework,Metal
//#cgo android,arm LDFLAGS: -lSDL2_image_android_arm -Wl,--no-undefined -lpng_android_arm -ljpeg_android_arm -lSDL2_android_arm -lm -ldl -lz -llog -landroid -lGLESv2 -lGLESv1_CM
//#cgo linux,arm,!android LDFLAGS: -L/opt/vc/lib -L/opt/vc/lib64 -lSDL2_image_linux_arm -Wl,--no-undefined -lpng_linux_arm -ljpeg_linux_arm -lSDL2_linux_arm -lm -ldl -lz -liconv -lbcm_host -lvcos -lvchiq_arm -pthread
import "C"


================================================
FILE: gccgo/vendor/github.com/veandco/go-sdl2/img/sdl_image_wrapper.h
================================================
#if defined(__WIN32)
	#include <SDL2/SDL_image.h>
	#include <stdlib.h>
#else
	#include <SDL_image.h>
#endif


================================================
FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/TODO.md
================================================
## 2.0.16

[x] SDL_FlashWindow() to get a user’s attention
[x] SDL_GetAudioDeviceSpec() to get the preferred audio format of a device
[x] SDL_SetWindowAlwaysOnTop() to dynamically change the SDL_WINDOW_ALWAYS_ON_TOP flag for a window
[x] SDL_SetWindowKeyboardGrab() to support grabbing the keyboard independently of the mouse
[x] SDL_SoftStretchLinear() to do bilinear scaling between 32-bit software surfaces
[x] SDL_UpdateNVTexture() to update streaming NV12/21 textures
[x] SDL_GameControllerSendEffect() and SDL_JoystickSendEffect() to allow sending custom trigger effects to the DualSense controller
[x] SDL_GameControllerGetSensorDataRate() to get the sensor data rate for PlayStation and Nintendo Switch controllers

### Windows

[?] SDL_SetWindowsMessageHook() to set a function that is called for all Windows messages
[?] SDL_RenderGetD3D11Device() to get the D3D11 device used by the SDL renderer

### Linux

[x] SDL_HINT_AUDIO_INCLUDE_MONITORS to control whether PulseAudio recording should include monitor devices
[x] SDL_HINT_AUDIO_DEVICE_STREAM_ROLE to describe the role of your application for audio control panels

### Android:

[?] SDL_AndroidShowToast() to show a lightweight notification

## 2.0.14

[x] SDL_GameControllerGetSerial()
[x] SDL_GameControllerHasAxis()
[x] SDL_GameControllerHasButton()
[x] SDL_GameControllerGetNumTouchpads()
[x] SDL_GameControllerGetNumTouchpadFingers()
[x] SDL_GameControllerGetTouchpadFinger()
[x] SDL_GameControllerHasSensor()
[x] SDL_GameControllerSetSensorEnabled()
[x] SDL_GameControllerIsSensorEnabled()
[x] SDL_GameControllerGetSensorData
[x] SDL_GameControllerRumbleTriggers()
[x] SDL_GameControllerHasLED()
[x] SDL_GameControllerSetLED()
[x] SDL_JoystickGetSerial()
[x] SDL_JoystickRumbleTriggers()
[x] SDL_JoystickHasLED()
[x] SDL_JoystickSetLED()
[x] SDL_JoystickAttachVirtual()
[x] SDL_JoystickDetachVirtual()
[x] SDL_JoystickIsVirtual()
[x] SDL_JoystickSetVirtualAxis()
[x] SDL_JoystickSetVirtualButton()
[x] SDL_JoystickSetVirtualHat()
[x] SDL_LockSensors()
[x] SDL_UnlockSensors()
[x] SDL_HAPTIC_STEERING_AXIS
[x] SDL_GetPreferredLocales()
[x] SDL_OpenURL()
[x] SDL_HasSurfaceRLE()
[x] SDL_SIMDRealloc()
[x] SDL_GetErrorMsg()
[x] SDL_Metal_GetLayer()
[x] SDL_Metal_GetDrawableSize()
[x] SDL_HINT_JOYSTICK_HIDAPI_PS5
[x] SDL_HINT_MOUSE_RELATIVE_SCALING
[x] SDL_HINT_PREFERRED_LOCALES
[x] SDL_HINT_JOYSTICK_RAWINPUT
[x] SDL_HINT_JOYSTICK_HIDAPI_CORRELATE_XINPUT
[x] SDL_HINT_AUDIO_DEVICE_APP_NAME
[x] SDL_HINT_AUDIO_DEVICE_STREAM_NAME
[x] SDL_HINT_LINUX_JOYSTICK_DEADZONES
[x] SDL_HINT_THREAD_PRIORITY_POLICY
[x] SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL
[x] SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO
[x] SDL_HINT_EMSCRIPTEN_ASYNCIFY
[x] SDL_PIXELFORMAT_XRGB4444
[x] SDL_PIXELFORMAT_XBGR4444
[x] SDL_PIXELFORMAT_XRGB1555
[x] SDL_PIXELFORMAT_XBGR1555
[x] SDL_PIXELFORMAT_XRGB8888
[x] SDL_PIXELFORMAT_XBGR8888
[x] SDL_WINDOW_METAL
[x] SDL_AndroidRequestPermission()

## 2.0.12

[x] SDL_GameControllerTypeForIndex
[x] SDL_GameControllerGetType
[x] SDL_GameControllerFromPlayerIndex
[x] SDL_GameControllerSetPlayerIndex
[x] SDL_JoystickFromPlayerIndex
[x] SDL_JoystickSetPlayerIndex
[x] SDL_GetTextureScaleMode
[x] SDL_SetTextureScaleMode
[x] SDL_LockTextureToSurface
[x] SDL_BLENDMODE_MUL
[x] SDL_TouchFingerEvent update
[x] SDL_HasARMSIMD
[x] SDL_HINT_DISPLAY_USABLE_BOUNDS
[x] SDL_HINT_GAMECONTROLLERTYPE
[x] SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS
[x] SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE
[x] SDL_HINT_VIDEO_X11_WINDOW_VISUALID
[x] SDL_HINT_VIDEO_X11_FORCE_EGL
[x] SDL_Metal_CreateView
[x] SDL_Metal_DestroyView
[x] SDL_GetAndroidSDKVersion

## 2.0.10

[x] SDL_SIMDGetAlignment
[x] SDL_SIMDAlloc
[x] SDL_SIMDFree
[x] SDL_RenderDrawPointF
[x] SDL_RenderDrawPointsF
[x] SDL_RenderDrawLineF
[x] SDL_RenderDrawLinesF
[x] SDL_RenderDrawRectF
[x] SDL_RenderDrawRectsF
[x] SDL_RenderFillRectF
[x] SDL_RenderFillRectsF
[x] SDL_RenderCopyF
[x] SDL_RenderCopyExF
[x] SDL_GetTouchDeviceType
[x] SDL_RenderFlush
[x] SDL_HINT_RENDER_BATCHING
[x] SDL_HINT_EVENT_LOGGING
[x] SDL_HINT_GAMECONTROLLERCONFIG_FILE
[x] SDL_HINT_MOUSE_TOUCH_EVENTS

## 2.0.9

[x] SDL_SENSORUPDATE
[x] SDL_DISPLAYEVENT
[x] SDL_JoystickGetDevicePlayerIndex
[x] SDL_JoystickGetPlayerIndex
[x] SDL_GameControllerGetPlayerIndex
[x] SDL_GameControllerRumble
[x] SDL_JoystickRumble
[x] SDL_GameControllerMappingForDeviceIndex
[x] SDL_HINT_MOUSE_DOUBLE_CLICK_TIME
[x] SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS
[x] SDL_HasColorKey
[x] SDL_HasAVX512F
[x] SDL_IsTablet
[?] SDL_THREAD_PRIORITY_TIME_CRITICAL

## 2.0.8

### Hints

[x] SDL_HINT_IOS_HIDE_HOME_INDICATOR
[x] SDL_HINT_RETURN_KEY_HIDES_IME
[x] SDL_HINT_TV_REMOTE_AS_JOYSTICK
[x] SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR
[x] SDL_HINT_VIDEO_DOUBLE_BUFFER

### Surface

[x] SDL_SetYUVConversionMode()
[x] SDL_GetYUVConversionMode()

### Android

[x] SDL_IsAndroidTV()

### Mac OS X / iOS / tvOS

[x] SDL_RenderGetMetalLayer()
[x] SDL_RenderGetMetalCommandEncoder()

### Windows UWP

[ ] SDL_WinRTGetDeviceFamily()

## 2.0.7

### General

Audio

- [x] SDL_NewAudioStream()
- [x] SDL_AudioStreamPut()
- [x] SDL_AudioStreamGet()
- [x] SDL_AudioStreamAvailable()
- [x] SDL_AudioStreamFlush()
- [x] SDL_AudioStreamClear()
- [x] SDL_FreeAudioStream()

Joystick

- [x] SDL_LockJoysticks()
- [x] SDL_UnlockJoysticks()

Stdinc

- [ ] SDL_GetMemoryFunctions()
- [ ] SDL_SetMemoryFunctions()
- [ ] SDL_GetNumAllocations()

## 2.0.6

### General

Blend Mode

- [x] SDL_ComposeCustomBlendMode()

CPU Info

- [x] SDL_HasNEON()

Game Controller

- [x] SDL_GameControllerGetVendor()
- [x] SDL_GameControllerGetProduct()
- [x] SDL_GameControllerGetProductVersion()
- [x] SDL_GameControllerNumMappings()
- [x] SDL_GameControllerMappingForIndex()

Hints

- [x] SDL_HINT_AUDIO_RESAMPLING_MODE
- [x] SDL_HINT_RENDER_LOGICAL_SIZE_MODE
- [x] SDL_HINT_MOUSE_NORMAL_SPEED_SCALE
- [x] SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE
- [x] SDL_HINT_TOUCH_MOUSE_EVENTS

Joystick

- [x] SDL_JoystickGetDeviceVendor()
- [x] SDL_JoystickGetDeviceProduct()
- [x] SDL_JoystickGetDeviceProductVersion()
- [x] SDL_JoystickGetDeviceType()
- [x] SDL_JoystickGetDeviceInstanceID()
- [x] SDL_JoystickGetVendor()
- [x] SDL_JoystickGetProduct()
- [x] SDL_JoystickGetProductVersion()
- [x] SDL_JoystickGetType()
- [x] SDL_JoystickGetAxisInitialState()

RW Ops

- [x] SDL_LoadFile()
- [x] SDL_LoadFile_RW()

Surface

- [x] SDL_DuplicateSurface()

Vulkan

- [x] SDL_Vulkan_LoadLibrary()
- [x] SDL_Vulkan_GetVkGetInstanceProcAddr()
- [x] SDL_Vulkan_GetInstanceExtensions()
- [x] SDL_Vulkan_CreateSurface()
- [x] SDL_Vulkan_GetDrawableSize()
- [x] SDL_Vulkan_UnloadLibrary()

### Windows

Hints

- [x] SDL_HINT_WINDOWS_INTRESOURCE_ICON
- [x] SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL

## Miscellaneous

- [ ] Add ability to set window title bar color on runtime


================================================
FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/audio.go
================================================
package sdl

/*
#include "sdl_wrapper.h"

#if !(SDL_VERSION_ATLEAST(2,0,4))

#if defined(WARN_OUTDATED)
#pragma message("SDL_QueueAudio is not supported before SDL 2.0.4")
#endif

static int SDL_QueueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len)
{
	return -1;
}
static Uint32 SDL_GetQueuedAudioSize(SDL_AudioDeviceID dev_id)
{
	return 0;
}
static void SDL_ClearQueuedAudio(SDL_AudioDeviceID dev)
{
}
#endif

#if !(SDL_VERSION_ATLEAST(2,0,5))

#if defined(WARN_OUTDATED)
#pragma message("SDL_DequeueAudio is not supported before SDL 2.0.5")
#endif

static int SDL_DequeueAudio(SDL_AudioDeviceID dev, const void *data, Uint32 len)
{
	return -1;
}
#endif

#if !(SDL_VERSION_ATLEAST(2,0,7))

struct _SDL_AudioStream;
typedef struct _SDL_AudioStream SDL_AudioStream;


#if defined(WARN_OUTDATED)
#pragma message("SDL_NewAudioStream is not supported before SDL 2.0.7")
#endif

static SDL_AudioStream * SDL_NewAudioStream(const SDL_AudioFormat src_format, const Uint8 src_channels, const int src_rate, const SDL_AudioFormat dst_format, const Uint8 dst_channels, const int dst_rate)
{
	return 0;
}


#if defined(WARN_OUTDATED)
#pragma message("SDL_AudioStreamPut is not supported before SDL 2.0.7")
#endif

static int SDL_AudioStreamPut(SDL_AudioStream *stream, const void *buf, int len)
{
	return -1;
}


#if defined(WARN_OUTDATED)
#pragma message("SDL_AudioStreamGet is not supported before SDL 2.0.7")
#endif

static int SDL_AudioStreamGet(SDL_AudioStream *stream, void *buf, int len)
{
	return -1;
}


#if defined(WARN_OUTDATED)
#pragma message("SDL_AudioStreamAvailable is not supported before SDL 2.0.7")
#endif

static int SDL_AudioStreamAvailable(SDL_AudioStream *stream)
{
	return -1;
}


#if defined(WARN_OUTDATED)
#pragma message("SDL_AudioStreamFlush is not supported before SDL 2.0.7")
#endif

static int SDL_AudioStreamFlush(SDL_AudioStream *stream)
{
	return -1;
}


#if defined(WARN_OUTDATED)
#pragma message("SDL_AudioStreamClear is not supported before SDL 2.0.7")
#endif

static int SDL_AudioStreamClear(SDL_AudioStream *stream)
{
	return -1;
}


#if defined(WARN_OUTDATED)
#pragma message("SDL_FreeAudioStream is not supported before SDL 2.0.7")
#endif

static void SDL_FreeAudioStream(SDL_AudioStream *stream)
{
}

#endif

#if !(SDL_VERSION_ATLEAST(2,0,16))

#if defined(WARN_OUTDATED)
#pragma message("SDL_GetAudioDeviceSpec is not supported before SDL 2.0.16")
#endif

static int SDL_GetAudioDeviceSpec(int index, int iscapture, SDL_AudioSpec *spec)
{
	return -1;
}


#endif
*/
import "C"
import (
	"reflect"
	"unsafe"
)

// Audio format masks.
// (https://wiki.libsdl.org/SDL_AudioFormat)
const (
	AUDIO_MASK_BITSIZE  = C.SDL_AUDIO_MASK_BITSIZE  // (0xFF)
	AUDIO_MASK_DATATYPE = C.SDL_AUDIO_MASK_DATATYPE // (1<<8)
	AUDIO_MASK_ENDIAN   = C.SDL_AUDIO_MASK_ENDIAN   // (1<<12)
	AUDIO_MASK_SIGNED   = C.SDL_AUDIO_MASK_SIGNED   // (1<<15)
)

// Audio format values.
// (https://wiki.libsdl.org/SDL_AudioFormat)
const (
	AUDIO_S8 = C.AUDIO_S8 // signed 8-bit samples
	AUDIO_U8 = C.AUDIO_U8 // unsigned 8-bit samples

	AUDIO_S16LSB = C.AUDIO_S16LSB // signed 16-bit samples in little-endian byte order
	AUDIO_S16MSB = C.AUDIO_S16MSB // signed 16-bit samples in big-endian byte order
	AUDIO_S16SYS = C.AUDIO_S16SYS // signed 16-bit samples in native byte order
	AUDIO_S16    = C.AUDIO_S16    // AUDIO_S16LSB
	AUDIO_U16LSB = C.AUDIO_U16LSB // unsigned 16-bit samples in little-endian byte order
	AUDIO_U16MSB = C.AUDIO_U16MSB // unsigned 16-bit samples in big-endian byte order
	AUDIO_U16SYS = C.AUDIO_U16SYS // unsigned 16-bit samples in native byte order
	AUDIO_U16    = C.AUDIO_U16    // AUDIO_U16LSB

	AUDIO_S32LSB = C.AUDIO_S32LSB // 32-bit integer samples in little-endian byte order
	AUDIO_S32MSB = C.AUDIO_S32MSB // 32-bit integer samples in big-endian byte order
	AUDIO_S32SYS = C.AUDIO_S32SYS // 32-bit integer samples in native byte order
	AUDIO_S32    = C.AUDIO_S32    // AUDIO_S32LSB

	AUDIO_F32LSB = C.AUDIO_F32LSB // 32-bit floating point samples in little-endian byte order
	AUDIO_F32MSB = C.AUDIO_F32MSB // 32-bit floating point samples in big-endian byte order
	AUDIO_F32SYS = C.AUDIO_F32SYS // 32-bit floating point samples in native byte order
	AUDIO_F32    = C.AUDIO_F32    // AUDIO_F32LSB
)

// AllowedChanges flags specify how SDL should behave when a device cannot offer a specific feature. If the application requests a feature that the hardware doesn't offer, SDL will always try to get the closest equivalent. Used in OpenAudioDevice().
// (https://wiki.libsdl.org/SDL_OpenAudioDevice)
const (
	AUDIO_ALLOW_FREQUENCY_CHANGE = C.SDL_AUDIO_ALLOW_FREQUENCY_CHANGE
	AUDIO_ALLOW_FORMAT_CHANGE    = C.SDL_AUDIO_ALLOW_FORMAT_CHANGE
	AUDIO_ALLOW_CHANNELS_CHANGE  = C.SDL_AUDIO_ALLOW_CHANNELS_CHANGE
	AUDIO_ALLOW_ANY_CHANGE       = C.SDL_AUDIO_ALLOW_ANY_CHANGE
)

// An enumeration of audio device states used in GetAudioDeviceStatus() and GetAudioStatus().
// (https://wiki.libsdl.org/SDL_AudioStatus)
const (
	AUDIO_STOPPED AudioStatus = C.SDL_AUDIO_STOPPED // audio device is stopped
	AUDIO_PLAYING             = C.SDL_AUDIO_PLAYING // audio device is playing
	AUDIO_PAUSED              = C.SDL_AUDIO_PAUSED  // audio device is paused
)

// MIX_MAXVOLUME is the full audio volume value used in MixAudioFormat() and AudioFormat().
// (https://wiki.libsdl.org/SDL_MixAudioFormat)
const MIX_MAXVOLUME = C.SDL_MIX_MAXVOLUME // full audio volume

// AudioFormat is an enumeration of audio formats.
// (https://wiki.libsdl.org/SDL_AudioFormat)
type AudioFormat uint16

// AudioCallback is a function to call when the audio device needs more data.`
// (https://wiki.libsdl.org/SDL_AudioSpec)
type AudioCallback C.SDL_AudioCallback

// AudioFilter is the filter list used in AudioCVT() (internal use)
// (https://wiki.libsdl.org/SDL_AudioCVT)
type AudioFilter C.SDL_AudioFilter

// AudioDeviceID is ID of an audio device previously opened with OpenAudioDevice().
// (https://wiki.libsdl.org/SDL_OpenAudioDevice)
type AudioDeviceID uint32

// AudioStatus is an enumeration of audio device states.
// (https://wiki.libsdl.org/SDL_AudioStatus)
type AudioStatus uint32
type cAudioStatus C.SDL_AudioStatus

// AudioSpec contains the audio output format. It also contains a callback that is called when the audio device needs more data.
// (https://wiki.libsdl.org/SDL_AudioSpec)
type AudioSpec struct {
	Freq     int32          // DSP frequency (samples per second)
	Format   AudioFormat    // audio data format
	Channels uint8          // number of separate sound channels
	Silence  uint8          // audio buffer silence value (calculated)
	Samples  uint16         // audio buffer size in samples (power of 2)
	_        uint16         // padding
	Size     uint32         // audio buffer size in bytes (calculated)
	Callback AudioCallback  // the function to call when the audio device needs more data
	UserData unsafe.Pointer // a pointer that is passed to callback (otherwise ignored by SDL)
}
type cAudioSpec C.SDL_AudioSpec

// AudioCVT contains audio data conversion information.
// (https://wiki.libsdl.org/SDL_AudioCVT)
type AudioCVT struct {
	Needed      int32           // set to 1 if conversion possible
	SrcFormat   AudioFormat     // source audio format
	DstFormat   AudioFormat     // target audio format
	RateIncr    float64         // rate conversion increment
	Buf         unsafe.Pointer  // the buffer to hold entire audio data. Use AudioCVT.BufAsSlice() for access via a Go slice
	Len         int32           // length of original audio buffer
	LenCVT      int32           // length of converted audio buffer
	LenMult     int32           // buf must be len*len_mult big
	LenRatio    float64         // given len, final size is len*len_ratio
	filters     [10]AudioFilter // filter list (internal use)
	filterIndex int32           // current audio conversion function (internal use)
}
type cAudioCVT C.SDL_AudioCVT

// AudioStream is a new audio conversion interface.
// (https://wiki.libsdl.org/SDL_AudioStream)
type AudioStream C.SDL_AudioStream

func (fmt AudioFormat) c() C.SDL_AudioFormat {
	return C.SDL_AudioFormat(fmt)
}

func (id AudioDeviceID) c() C.SDL_AudioDeviceID {
	return C.SDL_AudioDeviceID(id)
}

func (as *AudioSpec) cptr() *C.SDL_AudioSpec {
	return (*C.SDL_AudioSpec)(unsafe.Pointer(as))
}

func (cvt *AudioCVT) cptr() *C.SDL_AudioCVT {
	return (*C.SDL_AudioCVT)(unsafe.Pointer(cvt))
}

func (stream *AudioStream) cptr() *C.SDL_AudioStream {
	return (*C.SDL_AudioStream)(unsafe.Pointer(stream))
}

// BitSize returns audio formats bit size.
// (https://wiki.libsdl.org/SDL_AudioFormat)
func (fmt AudioFormat) BitSize() uint8 {
	return uint8(fmt & AUDIO_MASK_BITSIZE)
}

// IsFloat reports whether audio format is float.
// (https://wiki.libsdl.org/SDL_AudioFormat)
func (fmt AudioFormat) IsFloat() bool {
	return (fmt & AUDIO_MASK_DATATYPE) > 0
}

// IsBigEndian reports whether audio format is big-endian.
// (https://wiki.libsdl.org/SDL_AudioFormat)
func (fmt AudioFormat) IsBigEndian() bool {
	return (fmt & AUDIO_MASK_ENDIAN) > 0
}

// IsSigned reports whether audio format is signed.
// (https://wiki.libsdl.org/SDL_AudioFormat)
func (fmt AudioFormat) IsSigned() bool {
	return (fmt & AUDIO_MASK_SIGNED) > 0
}

// IsInt reports whether audio format is integer.
// (https://wiki.libsdl.org/SDL_AudioFormat)
func (fmt AudioFormat) IsInt() bool {
	return !fmt.IsFloat()
}

// IsLittleEndian reports whether audio format is little-endian.
// (https://wiki.libsdl.org/SDL_AudioFormat)
func (fmt AudioFormat) IsLittleEndian() bool {
	return !fmt.IsBigEndian()
}

// IsUnsigned reports whether audio format is unsigned.
// (https://wiki.libsdl.org/SDL_AudioFormat)
func (fmt AudioFormat) IsUnsigned() bool {
	return !fmt.IsSigned()
}

// AllocBuf allocates the requested memory for AudioCVT buffer.
func (cvt *AudioCVT) AllocBuf(size uintptr) {
	cvt.Buf = C.malloc(C.size_t(size))
}

// FreeBuf deallocates the memory previously allocated from AudioCVT buffer.
func (cvt *AudioCVT) FreeBuf() {
	C.free(cvt.Buf)
}

// BufAsSlice returns AudioCVT.buf as byte slice.
// NOTE: Must be used after ConvertAudio() because it uses LenCVT as slice length.
func (cvt AudioCVT) BufAsSlice() []byte {
	var b []byte
	sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&b))
	sliceHeader.Len = int(cvt.LenCVT)
	sliceHeader.Cap = int(cvt.Len * cvt.LenMult)
	sliceHeader.Data = uintptr(unsafe.Pointer(cvt.Buf))
	return b
}

// GetNumAudioDrivers returns the number of built-in audio drivers.
// (https://wiki.libsdl.org/SDL_GetNumAudioDrivers)
func GetNumAudioDrivers() int {
	return int(C.SDL_GetNumAudioDrivers())
}

// GetAudioDriver returns the name of a built in audio driver.
// (https://wiki.libsdl.org/SDL_GetAudioDriver)
func GetAudioDriver(index int) string {
	return string(C.GoString(C.SDL_GetAudioDriver(C.int(index))))
}

// AudioInit initializes a particular audio driver.
// (https://wiki.libsdl.org/SDL_AudioInit)
func AudioInit(driverName string) error {
	_driverName := C.CString(driverName)
	defer C.free(unsafe.Pointer(_driverName))
	if C.SDL_AudioInit(_driverName) != 0 {
		return GetError()
	}
	return nil
}

// AudioQuit shuts down audio if you initialized it with AudioInit().
// (https://wiki.libsdl.org/SDL_AudioQuit)
func AudioQuit() {
	C.SDL_AudioQuit()
}

// GetCurrentAudioDriver returns the name of the current audio driver.
// (https://wiki.libsdl.org/SDL_GetCurrentAudioDriver)
func GetCurrentAudioDriver() string {
	return string(C.GoString(C.SDL_GetCurrentAudioDriver()))
}

// OpenAudio opens the audio device. New programs might want to use OpenAudioDevice() instead.
// (https://wiki.libsdl.org/SDL_OpenAudio)
func OpenAudio(desired, obtained *AudioSpec) error {
	if C.SDL_OpenAudio(desired.cptr(), obtained.cptr()) != 0 {
		return GetError()
	}
	return nil
}

// GetNumAudioDevices returns the number of built-in audio devices.
// (https://wiki.libsdl.org/SDL_GetNumAudioDevices)
func GetNumAudioDevices(isCapture bool) int {
	return int(C.SDL_GetNumAudioDevices(C.int(Btoi(isCapture))))
}

// GetAudioDeviceName returns the name of a specific audio device.
// (https://wiki.libsdl.org/SDL_GetAudioDeviceName)
func GetAudioDeviceName(index int, isCapture bool) string {
	return string(C.GoString(C.SDL_GetAudioDeviceName(C.int(index), C.int(Btoi(isCapture)))))
}

// OpenAudioDevice opens a specific audio device.
// (https://wiki.libsdl.org/SDL_OpenAudioDevice)
func OpenAudioDevice(device string, isCapture bool, desired, obtained *AudioSpec, allowedChanges int) (AudioDeviceID, error) {
	_device := C.CString(device)
	if device == "" {
		_device = nil
	}
	defer C.free(unsafe.Pointer(_device))
	if id := AudioDeviceID(C.SDL_OpenAudioDevice(_device, C.int(Btoi(isCapture)), desired.cptr(), obtained.cptr(), C.int(allowedChanges))); id > 0 {
		return id, nil
	}
	return 0, GetError()
}

// GetAudioStatus returns the current audio state of the audio device. New programs might want to use GetAudioDeviceStatus() instead.
// (https://wiki.libsdl.org/SDL_GetAudioStatus)
func GetAudioStatus() AudioStatus {
	return (AudioStatus)(C.SDL_GetAudioStatus())
}

// GetAudioDeviceStatus returns the current audio state of an audio device.
// (https://wiki.libsdl.org/SDL_GetAudioDeviceStatus)
func GetAudioDeviceStatus(dev AudioDeviceID) AudioStatus {
	return (AudioStatus)(C.SDL_GetAudioDeviceStatus(dev.c()))
}

// PauseAudio pauses and unpauses the audio device. New programs might want to use SDL_PauseAudioDevice() instead.
// (https://wiki.libsdl.org/SDL_PauseAudio)
func PauseAudio(pauseOn bool) {
	C.SDL_PauseAudio(C.int(Btoi(pauseOn)))
}

// PauseAudioDevice pauses and unpauses audio playback on a specified device.
// (https://wiki.libsdl.org/SDL_PauseAudioDevice)
func PauseAudioDevice(dev AudioDeviceID, pauseOn bool) {
	C.SDL_PauseAudioDevice(dev.c(), C.int(Btoi(pauseOn)))
}

// LoadWAVRW loads a WAVE from the data source, automatically freeing that source if freeSrc is true.
// (https://wiki.libsdl.org/SDL_LoadWAV_RW)
func LoadWAVRW(src *RWops, freeSrc bool) ([]byte, *AudioSpec) {
	var _audioBuf *C.Uint8
	var _audioLen C.Uint32
	audioSpec := (*AudioSpec)(unsafe.Pointer(C.SDL_LoadWAV_RW(src.cptr(), C.int(Btoi(freeSrc)), (&AudioSpec{}).cptr(), &_audioBuf, &_audioLen)))

	var b []byte
	sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&b))
	sliceHeader.Len = (int)(_audioLen)
	sliceHeader.Cap = (int)(_audioLen)
	sliceHeader.Data = uintptr(unsafe.Pointer(_audioBuf))
	return b, audioSpec
}

// LoadWAV loads a WAVE from a file.
// (https://wiki.libsdl.org/SDL_LoadWAV)
func LoadWAV(file string) ([]byte, *AudioSpec) {
	_file := C.CString(file)
	_rb := C.CString("rb")
	defer C.free(unsafe.Pointer(_file))
	defer C.free(unsafe.Pointer(_rb))

	var _audioBuf *C.Uint8
	var _audioLen C.Uint32
	audioSpec := (*AudioSpec)(unsafe.Pointer(C.SDL_LoadWAV_RW(C.SDL_RWFromFile(_file, _rb), 1, (&AudioSpec{}).cptr(), &_audioBuf, &_audioLen)))

	var b []byte
	sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&b))
	sliceHeader.Len = (int)(_audioLen)
	sliceHeader.Cap = (int)(_audioLen)
	sliceHeader.Data = uintptr(unsafe.Pointer(_audioBuf))
	return b, audioSpec
}

// FreeWAV frees data previously allocated with LoadWAV() or LoadWAVRW().
// (https://wiki.libsdl.org/SDL_FreeWAV)
func FreeWAV(audioBuf []uint8) {
	sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&audioBuf))
	_audioBuf := (*C.Uint8)(unsafe.Pointer(sliceHeader.Data))
	C.SDL_FreeWAV(_audioBuf)
}

// BuildAudioCVT initializes an AudioCVT structure for conversion.
// (https://wiki.libsdl.org/SDL_BuildAudioCVT)
func BuildAudioCVT(cvt *AudioCVT, srcFormat AudioFormat, srcChannels uint8, srcRate int, dstFormat AudioFormat, dstChannels uint8, dstRate int) (converted bool, err error) {
	switch int(C.SDL_BuildAudioCVT(cvt.cptr(), srcFormat.c(), C.Uint8(srcChannels), C.int(srcRate), dstFormat.c(), C.Uint8(dstChannels), C.int(dstRate))) {
	case 1:
		return true, nil
	case 0:
		return false, nil
	}
	return false, GetError()
}

// ConvertAudio converts audio data to a desired audio format.
// (https://wiki.libsdl.org/SDL_ConvertAudio)
func ConvertAudio(cvt *AudioCVT) error {
	_cvt := (*C.SDL_AudioCVT)(unsafe.Pointer(cvt))
	if C.SDL_ConvertAudio(_cvt) != 0 {
		return GetError()
	}
	return nil
}

// QueueAudio queues more audio on non-callback devices.
// (https://wiki.libsdl.org/SDL_QueueAudio)
func QueueAudio(dev AudioDeviceID, data []byte) error {
	sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&data))
	_data := unsafe.Pointer(sliceHeader.Data)
	_len := (C.Uint32)(sliceHeader.Len)
	if C.SDL_QueueAudio(dev.c(), _data, _len) != 0 {
		return GetError()
	}
	return nil
}

// DequeueAudio dequeues more audio on non-callback devices. Returns the number of bytes dequeued, which could be less than requested
// (https://wiki.libsdl.org/SDL_DequeueAudio)
func DequeueAudio(dev AudioDeviceID, data []byte) (n int, err error) {
	sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&data))
	_data := unsafe.Pointer(sliceHeader.Data)
	_len := (C.Uint32)(sliceHeader.Len)
	if dequeued := int(C.SDL_DequeueAudio(dev.c(), _data, _len)); dequeued > 0 {
		return dequeued, nil
	}
	return 0, GetError()
}

// GetQueuedAudioSize returns the number of bytes of still-queued audio.
// (https://wiki.libsdl.org/SDL_GetQueuedAudioSize)
func GetQueuedAudioSize(dev AudioDeviceID) uint32 {
	return uint32(C.SDL_GetQueuedAudioSize(dev.c()))
}

// ClearQueuedAudio drops any queued audio data waiting to be sent to the hardware.
// (https://wiki.libsdl.org/SDL_ClearQueuedAudio)
func ClearQueuedAudio(dev AudioDeviceID) {
	C.SDL_ClearQueuedAudio(dev.c())
}

// MixAudio mixes audio data. New programs might want to use MixAudioFormat() instead.
// (https://wiki.libsdl.org/SDL_MixAudio)
func MixAudio(dst, src *uint8, len uint32, volume int) {
	_dst := (*C.Uint8)(unsafe.Pointer(dst))
	_src := (*C.Uint8)(unsafe.Pointer(src))
	C.SDL_MixAudio(_dst, _src, C.Uint32(len), C.int(volume))
}

// MixAudioFormat mixes audio data in a specified format.
// (https://wiki.libsdl.org/SDL_MixAudioFormat)
func MixAudioFormat(dst, src *uint8, format AudioFormat, len uint32, volume int) {
	_dst := (*C.Uint8)(unsafe.Pointer(dst))
	_src := (*C.Uint8)(unsafe.Pointer(src))
	C.SDL_MixAudioFormat(_dst, _src, format.c(), C.Uint32(len), C.int(volume))
}

// LockAudio locks the audio device. New programs might want to use LockAudioDevice() instead.
// (https://wiki.libsdl.org/SDL_LockAudio)
func LockAudio() {
	C.SDL_LockAudio()
}

// LockAudioDevice locks out the audio callback function for a specified device.
// (https://wiki.libsdl.org/SDL_LockAudioDevice)
func LockAudioDevice(dev AudioDeviceID) {
	C.SDL_LockAudioDevice(dev.c())
}

// UnlockAudio unlocks the audio device. New programs might want to use UnlockAudioDevice() instead.
// (https://wiki.libsdl.org/SDL_UnlockAudio)
func UnlockAudio() {
	C.SDL_UnlockAudio()
}

// UnlockAudioDevice unlocks the audio callback function for a specified device.
// (https://wiki.libsdl.org/SDL_UnlockAudioDevice)
func UnlockAudioDevice(dev AudioDeviceID) {
	C.SDL_UnlockAudioDevice(dev.c())
}

// CloseAudio closes the audio device. New programs might want to use CloseAudioDevice() instead.
// (https://wiki.libsdl.org/SDL_CloseAudio)
func CloseAudio() {
	C.SDL_CloseAudio()
}

// CloseAudioDevice shuts down audio processing and closes the audio device.
// (https://wiki.libsdl.org/SDL_CloseAudioDevice)
func CloseAudioDevice(dev AudioDeviceID) {
	C.SDL_CloseAudioDevice(dev.c())
}

// NewAudioStream creates a new audio stream
// TODO: (https://wiki.libsdl.org/SDL_NewAudioStream)
func NewAudioStream(srcFormat AudioFormat, srcChannels uint8, srcRate int, dstFormat AudioFormat, dstChannels uint8, dstRate int) (stream *AudioStream, err error) {
	_srcFormat := C.SDL_AudioFormat(srcFormat)
	_srcChannels := C.Uint8(srcChannels)
	_srcRate := C.int(srcRate)
	_dstFormat := C.SDL_AudioFormat(dstFormat)
	_dstChannels := C.Uint8(dstChannels)
	_dstRate := C.int(dstRate)

	stream = (*AudioStream)(C.SDL_NewAudioStream(_srcFormat, _srcChannels, _srcRate, _dstFormat, _dstChannels, _dstRate))
	if stream == nil {
		err = GetError()
	}
	return
}

// Put adds data to be converted/resampled to the stream
// TODO: (https://wiki.libsdl.org/SDL_AudioStreamPut)
func (stream *AudioStream) Put(buf []byte) (err error) {
	sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
	_buf := unsafe.Pointer(sliceHeader.Data)
	_len := C.int(len(buf))
	ret := int(C.SDL_AudioStreamPut(stream.cptr(), _buf, _len))
	err = errorFromInt(ret)
	return
}

// Get gets converted/resampled data from the stream. Returns the number of bytes read from the stream.
// (https://wiki.libsdl.org/SDL_AudioStreamGet)
func (stream *AudioStream) Get(buf []byte) (n int, err error) {
	sliceHeader := (*reflect.SliceHeader)(unsafe.Pointer(&buf))
	_buf := unsafe.Pointer(sliceHeader.Data)
	_len := C.int(len(buf))
	if ret := int(C.SDL_AudioStreamGet(stream.cptr(), _buf, _len)); ret < 0 {
		return 0, errorFromInt(ret)
	} else {
		return ret, nil
	}
}

// Available gets the number of converted/resampled bytes available
// TODO: (https://wiki.libsdl.org/SDL_AudioStreamAvailable)
func (stream *AudioStream) Available() (err error) {
	ret := int(C.SDL_AudioStreamAvailable(stream.cptr()))
	err = errorFromInt(ret)
	return
}

// Flush tells the stream that you're done sending data, and anything being buffered
// should be converted/resampled and made available immediately.
// TODO: (https://wiki.libsdl.org/SDL_AudioStreamFlush)
func (stream *AudioStream) Flush() (err error) {
	ret := int(C.SDL_AudioStreamFlush(stream.cptr()))
	err = errorFromInt(ret)
	return
}

// Clear clears any pending data in the stream without converting it
// TODO: (https://wiki.libsdl.org/SDL_AudioStreamClear)
func (stream *AudioStream) Clear() {
	C.SDL_AudioStreamClear(stream.cptr())
}

// Free frees the audio stream
// TODO: (https://wiki.libsdl.org/SDL_AudoiStreamFree)
func (stream *AudioStream) Free() {
	C.SDL_FreeAudioStream(stream.cptr())
}

// GetAudioDeviceSpec returns the preferred audio format of a specific audio device.
// (https://wiki.libsdl.org/SDL_GetAudioDeviceSpec)
func GetAudioDeviceSpec(index int, isCapture bool) (spec *AudioSpec, err error) {
	spec = &AudioSpec{}
	err = errorFromInt(int(C.SDL_GetAudioDeviceSpec(C.int(index), C.int(Btoi(isCapture)), spec.cptr())))
	return
}


================================================
FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/blendmode.go
================================================
package sdl

/*
#include "sdl_wrapper.h"

#if !(SDL_VERSION_ATLEAST(2,0,6))


#if defined(WARN_OUTDATED)
#pragma message("SDL_BLENDMODE_INVALID is not supported before SDL 2.0.6")
#endif

#define SDL_BLENDMODE_INVALID (0x7FFFFFFF)


#if defined(WARN_OUTDATED)
#pragma message("SDL_BlendOperation is not supported before SDL 2.0.6")
#endif

typedef enum
{
    SDL_BLENDOPERATION_ADD              = 0x1,
    SDL_BLENDOPERATION_SUBTRACT         = 0x2,
    SDL_BLENDOPERATION_REV_SUBTRACT     = 0x3,
    SDL_BLENDOPERATION_MINIMUM          = 0x4,
    SDL_BLENDOPERATION_MAXIMUM          = 0x5
} SDL_BlendOperation;


#if defined(WARN_OUTDATED)
#pragma message("SDL_BlendFactor is not supported before SDL 2.0.6")
#endif

typedef enum
{
    SDL_BLENDFACTOR_ZERO                = 0x1,
    SDL_BLENDFACTOR_ONE                 = 0x2,
    SDL_BLENDFACTOR_SRC_COLOR           = 0x3,
    SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR = 0x4,
    SDL_BLENDFACTOR_SRC_ALPHA           = 0x5,
    SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA = 0x6,
    SDL_BLENDFACTOR_DST_COLOR           = 0x7,
    SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR = 0x8,
    SDL_BLENDFACTOR_DST_ALPHA           = 0x9,
    SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA = 0xA

} SDL_BlendFactor;


#if defined(WARN_OUTDATED)
#pragma message("SDL_ComposeCustomBlendMode is not supported before SDL 2.0.6")
#endif

SDL_BlendMode SDLCALL SDL_ComposeCustomBlendMode(SDL_BlendFactor srcColorFactor, SDL_BlendFactor dstColorFactor, SDL_BlendOperation colorOperation, SDL_BlendFactor srcAlphaFactor, SDL_BlendFactor dstAlphaFactor, SDL_BlendOperation alphaOperation)
{
	return SDL_BLENDMODE_NONE;
}
#endif
*/
import "C"
import "unsafe"

// BlendMode is an enumeration of blend modes used in Render.Copy() and drawing operations.
// (https://wiki.libsdl.org/SDL_BlendMode)
type BlendMode uint32

const (
	BLENDMODE_NONE    = C.SDL_BLENDMODE_NONE  // no blending
	BLENDMODE_BLEND   = C.SDL_BLENDMODE_BLEND // alpha blending
	BLENDMODE_ADD     = C.SDL_BLENDMODE_ADD   // additive blending
	BLENDMODE_MOD     = C.SDL_BLENDMODE_MOD   // color modulate
	BLENDMODE_INVALID = C.SDL_BLENDMODE_INVALID
)

func (bm BlendMode) c() C.SDL_BlendMode {
	return C.SDL_BlendMode(C.Uint32(bm))
}

func (bm *BlendMode) cptr() *C.SDL_BlendMode {
	return (*C.SDL_BlendMode)(unsafe.Pointer(bm))
}

// BlendOperation is an enumeration of blend operations used when creating a custom blend mode with ComposeCustomBlendMode().
// (https://wiki.libsdl.org/SDL_BlendOperation)
type BlendOperation C.SDL_BlendOperation

const (
	BLENDOPERATION_ADD          = C.SDL_BLENDOPERATION_ADD
	BLENDOPERATION_SUBTRACT     = C.SDL_BLENDOPERATION_SUBTRACT
	BLENDOPERATION_REV_SUBTRACT = C.SDL_BLENDOPERATION_REV_SUBTRACT
	BLENDOPERATION_MINIMUM      = C.SDL_BLENDOPERATION_MINIMUM
	BLENDOPERATION_MAXIMUM      = C.SDL_BLENDOPERATION_MAXIMUM
)

// BlendFactor is an enumeration of blend factors used when creating a custom blend mode with ComposeCustomBlendMode().
// (https://wiki.libsdl.org/SDL_BlendFactor)
type BlendFactor C.SDL_BlendFactor

const (
	BLENDFACTOR_ZERO                = C.SDL_BLENDFACTOR_ZERO                // 0, 0, 0, 0
	BLENDFACTOR_ONE                 = C.SDL_BLENDFACTOR_ONE                 // 1, 1, 1, 1
	BLENDFACTOR_SRC_COLOR           = C.SDL_BLENDFACTOR_SRC_COLOR           // srcR, srcG, srcB, srcA
	BLENDFACTOR_ONE_MINUS_SRC_COLOR = C.SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR // 1-srcR, 1-srcG, 1-srcB, 1-srcA
	BLENDFACTOR_SRC_ALPHA           = C.SDL_BLENDFACTOR_SRC_ALPHA           // srcA, srcA, srcA, srcA
	BLENDFACTOR_ONE_MINUS_SRC_ALPHA = C.SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA // 1-srcA, 1-srcA, 1-srcA, 1-srcA
	BLENDFACTOR_DST_COLOR           = C.SDL_BLENDFACTOR_DST_COLOR           // dstR, dstG, dstB, dstA
	BLENDFACTOR_ONE_MINUS_DST_COLOR = C.SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR // 1-dstR, 1-dstG, 1-dstB, 1-dstA
	BLENDFACTOR_DST_ALPHA           = C.SDL_BLENDFACTOR_DST_ALPHA           // dstA, dstA, dstA, dstA
	BLENDFACTOR_ONE_MINUS_DST_ALPHA = C.SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA // 1-dstA, 1-dstA, 1-dstA, 1-dstA
)

// ComposeCustomBlendMode creates a custom blend mode, which may or may not be supported by a given renderer
// The result of the blend mode operation will be:
//     dstRGB = dstRGB * dstColorFactor colorOperation srcRGB * srcColorFactor
// and
//     dstA = dstA * dstAlphaFactor alphaOperation srcA * srcAlphaFactor
// (https://wiki.libsdl.org/SDL_ComposeCustomBlendMode)
func ComposeCustomBlendMode(srcColorFactor, dstColorFactor BlendFactor, colorOperation BlendOperation, srcAlphaFactor, dstAlphaFactor BlendFactor, alphaOperation BlendOperation) BlendMode {
	_srcColorFactor := C.SDL_BlendFactor(srcColorFactor)
	_dstColorFactor := C.SDL_BlendFactor(dstColorFactor)
	_colorOperation := C.SDL_BlendOperation(colorOperation)
	_srcAlphaFactor := C.SDL_BlendFactor(srcAlphaFactor)
	_dstAlphaFactor := C.SDL_BlendFactor(dstAlphaFactor)
	_alphaOperation := C.SDL_BlendOperation(alphaOperation)
	return BlendMode(C.SDL_ComposeCustomBlendMode(_srcColorFactor, _dstColorFactor, _colorOperation, _srcAlphaFactor, _dstAlphaFactor, _alphaOperation))
}


================================================
FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/clipboard.go
================================================
package sdl

// #include "sdl_wrapper.h"
import "C"
import "unsafe"

// SetClipboardText puts UTF-8 text into the clipboard.
// (https://wiki.libsdl.org/SDL_SetClipboardText)
func SetClipboardText(text string) error {
	_text := C.CString(text)
	defer C.free(unsafe.Pointer(_text))
	if C.SDL_SetClipboardText(_text) < 0 {
		return GetError()
	}
	return nil
}

// GetClipboardText returns UTF-8 text from the clipboard.
// (https://wiki.libsdl.org/SDL_GetClipboardText)
func GetClipboardText() (string, error) {
	text := C.SDL_GetClipboardText()
	if text == nil {
		return "", GetError()
	}
	defer C.SDL_free(unsafe.Pointer(text))
	_text := C.GoString(text)
	return _text, nil
}

// HasClipboardText reports whether the clipboard exists and contains a text string that is non-empty.
// (https://wiki.libsdl.org/SDL_HasClipboardText)
func HasClipboardText() bool {
	return C.SDL_HasClipboardText() > 0
}


================================================
FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/cpuinfo.go
================================================
package sdl

/*
#include "sdl_wrapper.h"

#if !(SDL_VERSION_ATLEAST(2,0,9))

#if defined(WARN_OUTDATED)
#pragma message("SDL_HasAVX512F is not supported before SDL 2.0.9")
#endif

static inline SDL_bool SDL_HasAVX512F()
{
	return SDL_FALSE;
}

#endif

#if !(SDL_VERSION_ATLEAST(2,0,1))

#if defined(WARN_OUTDATED)
#pragma message("SDL_GetSystemRAM is not supported before SDL 2.0.1")
#endif

static inline int SDL_GetSystemRAM()
{
	return -1;
}
#endif

#if !(SDL_VERSION_ATLEAST(2,0,2))

#if defined(WARN_OUTDATED)
#pragma message("SDL_HasAVX is not supported before SDL 2.0.2")
#endif

static inline SDL_bool SDL_HasAVX()
{
	return SDL_FALSE;
}
#endif

#if !(SDL_VERSION_ATLEAST(2,0,4))

#if defined(WARN_OUTDATED)
#pragma message("SDL_HasAVX2 is not supported before SDL 2.0.4")
#endif

static inline SDL_bool SDL_HasAVX2()
{
	return SDL_FALSE;
}
#endif

#if !(SDL_VERSION_ATLEAST(2,0,6))

#if defined(WARN_OUTDATED)
#pragma message("SDL_HasNEON is not supported before SDL 2.0.4")
#endif

static inline SDL_bool SDL_HasNEON()
{
	return SDL_FALSE;
}
#endif

#if !(SDL_VERSION_ATLEAST(2,0,10))

#if defined(WARN_OUTDATED)
#pragma message("SDL_SIMDGetAlignment is not supported before SDL 2.0.10")
#endif

static inline size_t SDL_SIMDGetAlignment(void)
{
	return 0;
}

#if defined(WARN_OUTDATED)
#pragma message("SDL_SIMDAlloc is not supported before SDL 2.0.10")
#endif

static inline void * SDL_SIMDAlloc(const size_t len)
{
	return NULL;
}

#if defined(WARN_OUTDATED)
#pragma message("SDL_SIMDFree is not supported before SDL 2.0.10")
#endif

static inline void SDL_SIMDFree(void *ptr)
{
}

#endif

*/
import "C"
import "unsafe"

// CACHELINE_SIZE is a cacheline size used for padding.
const CACHELINE_SIZE = C.SDL_CACHELINE_SIZE

// GetCPUCount returns the number of CPU cores available.
// (https://wiki.libsdl.org/SDL_GetCPUCount)
func GetCPUCount() int {
	return int(C.SDL_GetCPUCount())
}

// GetCPUCacheLineSize returns the L1 cache line size of the CPU.
// (https://wiki.libsdl.org/SDL_GetCPUCacheLineSize)
func GetCPUCacheLineSize() int {
	return int(C.SDL_GetCPUCacheLineSize())
}

// HasRDTSC reports whether the CPU has the RDTSC instruction.
// (https://wiki.libsdl.org/SDL_HasRDTSC)
func HasRDTSC() bool {
	return C.SDL_HasRDTSC() > 0
}

// HasAltiVec reports whether the CPU has AltiVec features.
// (https://wiki.libsdl.org/SDL_HasAltiVec)
func HasAltiVec() bool {
	return C.SDL_HasAltiVec() > 0
}

// HasMMX reports whether the CPU has MMX features.
// (https://wiki.libsdl.org/SDL_HasMMX)
func HasMMX() bool {
	return C.SDL_HasMMX() > 0
}

// Has3DNow reports whether the CPU has 3DNow! features.
// (https://wiki.libsdl.org/SDL_Has3DNow)
func Has3DNow() bool {
	return C.SDL_Has3DNow() > 0
}

// HasSSE reports whether the CPU has SSE features.
// (https://wiki.libsdl.org/SDL_HasSSE)
func HasSSE() bool {
	return C.SDL_HasSSE() > 0
}

// HasSSE2 reports whether the CPU has SSE2 features.
// (https://wiki.libsdl.org/SDL_HasSSE2)
func HasSSE2() bool {
	return C.SDL_HasSSE2() > 0
}

// HasSSE3 reports whether the CPU has SSE3 features.
// (https://wiki.libsdl.org/SDL_HasSSE3)
func HasSSE3() bool {
	return C.SDL_HasSSE3() > 0
}

// HasSSE41 reports whether the CPU has SSE4.1 features.
// (https://wiki.libsdl.org/SDL_HasSSE41)
func HasSSE41() bool {
	return C.SDL_HasSSE41() > 0
}

// HasSSE42 reports whether the CPU has SSE4.2 features.
// (https://wiki.libsdl.org/SDL_HasSSE42)
func HasSSE42() bool {
	return C.SDL_HasSSE42() > 0
}

// GetSystemRAM returns the amount of RAM configured in the system.
// (https://wiki.libsdl.org/SDL_GetSystemRAM)
func GetSystemRAM() int {
	return int(C.SDL_GetSystemRAM())
}

// HasAVX reports whether the CPU has AVX features.
// (https://wiki.libsdl.org/SDL_HasAVX)
func HasAVX() bool {
	return C.SDL_HasAVX() > 0
}

// HasAVX512F reports whether the CPU has AVX-512F (foundation) features.
// TODO: (https://wiki.libsdl.org/SDL_HasAVX512F)
func HasAVX512F() bool {
	return C.SDL_HasAVX512F() > 0
}

// HasAVX2 reports whether the CPU has AVX2 features.
// (https://wiki.libsdl.org/SDL_HasAVX2)
func HasAVX2() bool {
	return C.SDL_HasAVX2() > 0
}

// HasNEON reports whether the CPU has NEON features.
// (https://wiki.libsdl.org/SDL_HasNEON)
func HasNEON() bool {
	return C.SDL_HasNEON() > 0
}

// SIMDGetAlignment reports the alignment this system needs for SIMD allocations.
// TODO: (https://wiki.libsdl.org/SDL_SIMDGetAlignment)
func SIMDGetAlignment() int {
	return int(C.SDL_SIMDGetAlignment())
}

// SIMDAlloc allocates memory in a SIMD-friendly way.
// TODO: (https://wiki.libsdl.org/SDL_SIMDAlloc)
func SIMDAlloc(_len int) unsafe.Pointer {
	return C.SDL_SIMDAlloc(C.size_t(_len))
}

// SIMDFree deallocates memory obtained from SDL_SIMDAlloc.
// TODO: (https://wiki.libsdl.org/SDL_SIMDFree)
func SIMDFree(p unsafe.Pointer) {
	C.SDL_SIMDFree(p)
}


================================================
FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/endian.go
================================================
package sdl

// #include "sdl_wrapper.h"
import "C"

// Endian-specific values.
// (https://wiki.libsdl.org/CategoryEndian)
const (
	BYTEORDER  = C.SDL_BYTEORDER  // macro that corresponds to the byte order used by the processor type it was compiled for
	LIL_ENDIAN = C.SDL_LIL_ENDIAN // byte order is 1234, where the least significant byte is stored first
	BIG_ENDIAN = C.SDL_BIG_ENDIAN // byte order is 4321, where the most significant byte is stored first
)


================================================
FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/error.go
================================================
package sdl

/*
#include "sdl_wrapper.h"

void GoSetError(const char *fmt) {
  SDL_SetError("%s", fmt);
}

*/
// #include "sdl_wrapper.h"
import "C"
import "errors"

var emptyCString *C.char = C.CString("")
var ErrInvalidParameters = errors.New("Invalid Parameters")

// SDL error codes with their corresponding predefined strings.
const (
	ENOMEM      ErrorCode = C.SDL_ENOMEM      // out of memory
	EFREAD                = C.SDL_EFREAD      // error reading from datastream
	EFWRITE               = C.SDL_EFWRITE     // error writing to datastream
	EFSEEK                = C.SDL_EFSEEK      // error seeking in datastream
	UNSUPPORTED           = C.SDL_UNSUPPORTED // that operation is not supported
	LASTERROR             = C.SDL_LASTERROR   // the highest numbered predefined error
)

// ErrorCode is an error code used in SDL error messages.
type ErrorCode uint32
type cErrorCode C.SDL_errorcode

func (ec ErrorCode) c() C.SDL_errorcode {
	return C.SDL_errorcode(ec)
}

// GetError returns the last error that occurred, or an empty string if there hasn't been an error message set since the last call to ClearError().
// (https://wiki.libsdl.org/SDL_GetError)
func GetError() error {
	if err := C.SDL_GetError(); err != nil {
		gostr := C.GoString(err)
		// SDL_GetError returns "an empty string if there hasn't been an error message"
		if len(gostr) > 0 {
			return errors.New(gostr)
		}
	}
	return nil
}

// SetError set the SDL error message.
// (https://wiki.libsdl.org/SDL_SetError)
func SetError(err error) {
	if err != nil {
		C.GoSetError(C.CString(err.Error()))
		return
	}
	C.GoSetError(emptyCString)
}

// ClearError clears any previous error message.
// (https://wiki.libsdl.org/SDL_ClearError)
func ClearError() {
	C.SDL_ClearError()
}

// Error sets the SDL error message to the specified error code.
func Error(code ErrorCode) {
	C.SDL_Error(code.c())
}

// OutOfMemory sets SDL error message to ENOMEM (out of memory).
func OutOfMemory() {
	Error(ENOMEM)
}

// Unsupported sets SDL error message to UNSUPPORTED (that operation is not supported).
func Unsupported() {
	Error(UNSUPPORTED)
}

// errorFromInt returns GetError() if passed negative value, otherwise it returns nil.
func errorFromInt(code int) (err error) {
	if code < 0 {
		err = GetError()
		if err == nil {
			err = errors.New("Unknown error (probably using old version of SDL2 and the function called is not supported?)")
		}
	}
	return
}


================================================
FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/events.c
================================================
#include "_cgo_export.h"
#include "events.h"

SDL_Event event;

void setEventFilter()
{
	SDL_SetEventFilter((SDL_EventFilter)goSetEventFilterCallback, NULL);
}

void clearEventFilter()
{
	SDL_SetEventFilter(NULL, NULL);
}

void filterEvents(void *userdata)
{
	SDL_FilterEvents((SDL_EventFilter)goEventFilterCallback, userdata);
}

void addEventWatch(void *userdata)
{
	SDL_AddEventWatch((SDL_EventFilter)goEventFilterCallback, userdata);
}

void delEventWatch(void *userdata)
{
	SDL_DelEventWatch((SDL_EventFilter)goEventFilterCallback, userdata);
}

int PollEvent()
{
	return SDL_PollEvent(&event);
}

================================================
FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/events.go
================================================
package sdl

/*
#include "sdl_wrapper.h"
#include "events.h"

#if !SDL_VERSION_ATLEAST(2,0,9)
#define SDL_DISPLAYEVENT (0x150)
#endif

#if !SDL_VERSION_ATLEAST(2,0,2)
#define SDL_RENDER_TARGETS_RESET (0x2000)
#endif

#if !SDL_VERSION_ATLEAST(2,0,4)

#if defined(WARN_OUTDATED)
#pragma message("SDL_KEYMAPCHANGED is not supported before SDL 2.0.4")
#endif

#define SDL_KEYMAPCHANGED (0x304)


#if defined(WARN_OUTDATED)
#pragma message("SDL_AUDIODEVICEADDED is not supported before SDL 2.0.4")
#endif

#define SDL_AUDIODEVICEADDED (0x1100)


#if defined(WARN_OUTDATED)
#pragma message("SDL_AUDIODEVICEREMOVED is not supported before SDL 2.0.4")
#endif

#define SDL_AUDIODEVICEREMOVED (0x1101)


#if defined(WARN_OUTDATED)
#pragma message("SDL_RENDER_DEVICE_RESET is not supported before SDL 2.0.4")
#endif

#define SDL_RENDER_DEVICE_RESET (0x2001)


#if defined(WARN_OUTDATED)
#pragma message("SDL_AudioDeviceEvent is not supported before SDL 2.0.4")
#endif

typedef struct SDL_AudioDeviceEvent
{
    Uint32 type;
    Uint32 timestamp;
    Uint32 which;
    Uint8  iscapture;
    Uint8  padding1;
    Uint8  padding2;
    Uint8  padding3;
} SDL_AudioDeviceEvent;
#endif

#if !SDL_VERSION_ATLEAST(2,0,5)

#if defined(WARN_OUTDATED)
#pragma message("SDL_DROPTEXT is not supported before SDL 2.0.5")
#endif

#define SDL_DROPTEXT (0x1001)


#if defined(WARN_OUTDATED)
#pragma message("SDL_DROPBEGIN is not supported before SDL 2.0.5")
#endif

#define SDL_DROPBEGIN (0x1002)


#if defined(WARN_OUTDATED)
#pragma message("SDL_DROPCOMPLETE is not supported before SDL 2.0.5")
#endif

#define SDL_DROPCOMPLETE (0x1003)
#endif

#if !SDL_VERSION_ATLEAST(2,0,9)
#define SDL_SENSORUPDATE (0x1200)

typedef struct SDL_SensorEvent {
    Uint32 type;
    Uint32 timestamp;
    Sint32 which;
    float data[6];
} SDL_SensorEvent;
#endif

#if !SDL_VERSION_ATLEAST(2,0,22)
#if defined(WARN_OUTDATED)
#pragma message("SDL_TEXTEDITING_EXT is not supported before SDL 2.0.22")
#endif

#define SDL_TEXTEDITING_EXT (0x305)
#endif

// NOTE: To prevent build from failing when using older SDL2, we create a
// structure definiton that directly maps to the SDL2 struct definition if
// using the latest SDL2. Otherwise, we copy the latest definition and paste
// it here.
#if SDL_VERSION_ATLEAST(2,0,22)
typedef SDL_MouseButtonEvent MouseButtonEvent;
typedef SDL_MouseWheelEvent MouseWheelEvent;
typedef SDL_TouchFingerEvent TouchFingerEvent;
typedef SDL_DropEvent DropEvent;
#else
typedef struct MouseButtonEvent
{
    Uint32 type;        // ::SDL_MOUSEBUTTONDOWN or ::SDL_MOUSEBUTTONUP
    Uint32 timestamp;
    Uint32 windowID;    // The window with mouse focus, if any
    Uint32 which;       // The mouse instance id, or SDL_TOUCH_MOUSEID
    Uint8 button;       // The mouse button index
    Uint8 state;        // ::SDL_PRESSED or ::SDL_RELEASED
    Uint8 clicks;       // 1 for single-click, 2 for double-click, etc.
    Uint8 padding1;
    Sint32 x;           // X coordinate, relative to window
    Sint32 y;           // Y coordinate, relative to window
} MouseButtonEvent;

typedef struct MouseWheelEvent
{
    Uint32 type;        // ::SDL_MOUSEWHEEL
    Uint32 timestamp;   // In milliseconds, populated using SDL_GetTicks()
    Uint32 windowID;    // The window with mouse focus, if any
    Uint32 which;       // The mouse instance id, or SDL_TOUCH_MOUSEID
    Sint32 x;           // The amount scrolled horizontally, positive to the right and negative to the left
    Sint32 y;           // The amount scrolled vertically, positive away from the user and negative toward the user
    Uint32 direction;   // Set to one of the SDL_MOUSEWHEEL_* defines. When FLIPPED the values in X and Y will be opposite. Multiply by -1 to change them back
    float preciseX;     // The amount scrolled horizontally, positive to the right and negative to the left, with float precision (added in 2.0.18)
    float preciseY;     // The amount scrolled vertically, positive away from the user and negative toward the user, with float precision (added in 2.0.18)
} MouseWheelEvent;

typedef struct TouchFingerEvent
{
    Uint32 type;           // ::SDL_FINGERMOTION or ::SDL_FINGERDOWN or ::SDL_FINGERUP
    Uint32 timestamp;      // In milliseconds, populated using SDL_GetTicks()
    SDL_TouchID touchId;   // The touch device id
    SDL_FingerID fingerId; //
    float x;               // Normalized in the range 0...1
    float y;               // Normalized in the range 0...1
    float dx;              // Normalized in the range -1...1
    float dy;              // Normalized in the range -1...1
    float pressure;        // Normalized in the range 0...1
    Uint32 windowID;       // The window underneath the finger, if any
} TouchFingerEvent;

typedef struct DropEvent
{
    Uint32 type;        // ::SDL_DROPBEGIN or ::SDL_DROPFILE or ::SDL_DROPTEXT or ::SDL_DROPCOMPLETE
    Uint32 timestamp;   // In milliseconds, populated using SDL_GetTicks()
    char *file;         // The file name, which should be freed with SDL_free(), is NULL on begin/complete
    Uint32 windowID;    // The window that was dropped on, if any
} DropEvent;

#endif

#if !SDL_VERSION_ATLEAST(2,24,0)
#if defined(WARN_OUTDATED)
#pragma message("SDL_JOYBATTEYUPDATED is not supported before SDL 2.24.0")
#endif

#define SDL_JOYBATTERYUPDATED (1543)

#if !SDL_VERSION_ATLEAST(2,0,4)
typedef enum
{
    SDL_JOYSTICK_POWER_UNKNOWN = -1,
    SDL_JOYSTICK_POWER_EMPTY,
    SDL_JOYSTICK_POWER_LOW,
    SDL_JOYSTICK_POWER_MEDIUM,
    SDL_JOYSTICK_POWER_FULL,
    SDL_JOYSTICK_POWER_WIRED,
    SDL_JOYSTICK_POWER_MAX
} SDL_JoystickPowerLevel;
#endif

typedef struct SDL_JoyBatteryEvent
{
    Uint32 type;
    Uint32 timestamp;
    SDL_JoystickID which;
    SDL_JoystickPowerLevel level;
} SDL_JoyBatteryEvent;

#endif
*/
import "C"
import (
	"reflect"
	"sync"
	"unsafe"
)

var (
	eventFilterCache          EventFilter
	eventWatches              = make(map[EventWatchHandle]*eventFilterCallbackContext)
	lastEventWatchHandleMutex sync.Mutex
	lastEventWatchHandle      EventWatchHandle
	cevent                    C.SDL_Event
)

// Enumeration of the types of events that can be delivered.
// (https://wiki.libsdl.org/SDL_EventType)
const (
	FIRSTEVENT = C.SDL_FIRSTEVENT // do not remove (unused)

	// Application events
	QUIT = C.SDL_QUIT // user-requested quit

	// Android, iOS and WinRT events
	APP_TERMINATING         = C.SDL_APP_TERMINATING         // OS is terminating the application
	APP_LOWMEMORY           = C.SDL_APP_LOWMEMORY           // OS is low on memory; free some
	APP_WILLENTERBACKGROUND = C.SDL_APP_WILLENTERBACKGROUND // application is entering background
	APP_DIDENTERBACKGROUND  = C.SDL_APP_DIDENTERBACKGROUND  //application entered background
	APP_WILLENTERFOREGROUND = C.SDL_APP_WILLENTERFOREGROUND // application is entering foreground
	APP_DIDENTERFOREGROUND  = C.SDL_APP_DIDENTERFOREGROUND  // application entered foreground

	// Display events
	DISPLAYEVENT = C.SDL_DISPLAYEVENT // Display state change

	// Window events
	WINDOWEVENT = C.SDL_WINDOWEVENT // window state change
	SYSWMEVENT  = C.SDL_SYSWMEVENT  // system specific event

	// Keyboard events
	KEYDOWN         = C.SDL_KEYDOWN         // key pressed
	KEYUP           = C.SDL_KEYUP           // key released
	TEXTEDITING     = C.SDL_TEXTEDITING     // keyboard text editing (composition)
	TEXTINPUT       = C.SDL_TEXTINPUT       // keyboard text input
	TEXTEDITING_EXT = C.SDL_TEXTEDITING_EXT // keyboard text editing (composition)
	KEYMAPCHANGED   = C.SDL_KEYMAPCHANGED   // keymap changed due to a system event such as an input language or keyboard layout change (>= SDL 2.0.4)

	// Mouse events
	MOUSEMOTION     = C.SDL_MOUSEMOTION     // mouse moved
	MOUSEBUTTONDOWN = C.SDL_MOUSEBUTTONDOWN // mouse button pressed
	MOUSEBUTTONUP   = C.SDL_MOUSEBUTTONUP   // mouse button released
	MOUSEWHEEL      = C.SDL_MOUSEWHEEL      // mouse wheel motion

	// Joystick events
	JOYAXISMOTION    = C.SDL_JOYAXISMOTION    // joystick axis motion
	JOYBALLMOTION    = C.SDL_JOYBALLMOTION    // joystick trackball motion
	JOYHATMOTION     = C.SDL_JOYHATMOTION     // joystick hat position change
	JOYBUTTONDOWN    = C.SDL_JOYBUTTONDOWN    // joystick button pressed
	JOYBUTTONUP      = C.SDL_JOYBUTTONUP      // joystick button released
	JOYDEVICEADDED   = C.SDL_JOYDEVICEADDED   // joystick connected
	JOYDEVICEREMOVED = C.SDL_JOYDEVICEREMOVED // joystick disconnected

	// Game controller events
	CONTROLLERAXISMOTION     = C.SDL_CONTROLLERAXISMOTION     // controller axis motion
	CONTROLLERBUTTONDOWN     = C.SDL_CONTROLLERBUTTONDOWN     // controller button pressed
	CONTROLLERBUTTONUP       = C.SDL_CONTROLLERBUTTONUP       // controller button released
	CONTROLLERDEVICEADDED    = C.SDL_CONTROLLERDEVICEADDED    // controller connected
	CONTROLLERDEVICEREMOVED  = C.SDL_CONTROLLERDEVICEREMOVED  // controller disconnected
	CONTROLLERDEVICEREMAPPED = C.SDL_CONTROLLERDEVICEREMAPPED // controller mapping updated

	// Touch events
	FINGERDOWN   = C.SDL_FINGERDOWN   // user has touched input device
	FINGERUP     = C.SDL_FINGERUP     // user stopped touching input device
	FINGERMOTION = C.SDL_FINGERMOTION // user is dragging finger on input device

	// Gesture events
	DOLLARGESTURE = C.SDL_DOLLARGESTURE
	DOLLARRECORD  = C.SDL_DOLLARRECORD
	MULTIGESTURE  = C.SDL_MULTIGESTURE

	// Clipboard events
	CLIPBOARDUPDATE = C.SDL_CLIPBOARDUPDATE // the clipboard changed

	// Drag and drop events
	DROPFILE     = C.SDL_DROPFILE     // the system requests a file open
	DROPTEXT     = C.SDL_DROPTEXT     // text/plain drag-and-drop event
	DROPBEGIN    = C.SDL_DROPBEGIN    // a new set of drops is beginning (NULL filename)
	DROPCOMPLETE = C.SDL_DROPCOMPLETE // current set of drops is now complete (NULL filename)

	// Audio hotplug events
	AUDIODEVICEADDED   = C.SDL_AUDIODEVICEADDED   // a new audio device is available (>= SDL 2.0.4)
	AUDIODEVICEREMOVED = C.SDL_AUDIODEVICEREMOVED // an audio device has been removed (>= SDL 2.0.4)

	// Sensor events
	SENSORUPDATE = C.SDL_SENSORUPDATE // a sensor was updated

	// Render events
	RENDER_TARGETS_RESET = C.SDL_RENDER_TARGETS_RESET // the render targets have been reset and their contents need to be updated (>= SDL 2.0.2)
	RENDER_DEVICE_RESET  = C.SDL_RENDER_DEVICE_RESET  // the device has been reset and all textures need to be recreated (>= SDL 2.0.4)

	// These are for your use, and should be allocated with RegisterEvents()
	USEREVENT = C.SDL_USEREVENT // a user-specified event
	LASTEVENT = C.SDL_LASTEVENT // (only for bounding internal arrays)
)

// Actions for PeepEvents().
// (https://wiki.libsdl.org/SDL_PeepEvents)
const (
	ADDEVENT  = C.SDL_ADDEVENT  // up to numevents events will be added to the back of the event queue
	PEEKEVENT = C.SDL_PEEKEVENT // up to numevents events at the front of the event queue, within the specified minimum and maximum type, will be returned and will not be removed from the queue
	GETEVENT  = C.SDL_GETEVENT  // up to numevents events at the front of the event queue, within the specified minimum and maximum type, will be returned and will be removed from the queue
)

// Toggles for different event state functions.
const (
	QUERY   = C.SDL_QUERY
	IGNORE  = C.SDL_IGNORE
	DISABLE = C.SDL_DISABLE
	ENABLE  = C.SDL_ENABLE
)

// Event is a union of all event structures used in SDL.
// (https://wiki.libsdl.org/SDL_Event)
type Event interface {
	GetType() uint32      // GetType returns the event type
	GetTimestamp() uint32 // GetTimestamp returns the timestamp of the event
}

// CEvent is a union of all event structures used in SDL.
// (https://wiki.libsdl.org/SDL_Event)
type CEvent struct {
	Type uint32
	_    [52]byte // padding
}

// CommonEvent contains common event data.
// (https://wiki.libsdl.org/SDL_Event)
type CommonEvent struct {
	Type      uint32 // the event type
	Timestamp uint32 // timestamp of the event
}

// GetType returns the event type.
func (e *CommonEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *CommonEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// DisplayEvent contains common event data.
// (https://wiki.libsdl.org/SDL_Event)
type DisplayEvent struct {
	Type      uint32 // the event type
	Timestamp uint32 // timestamp of the event
	Display   uint32 // the associated display index
	Event     uint8  // TODO: (https://wiki.libsdl.org/SDL_DisplayEventID)
	_         uint8  // padding
	_         uint8  // padding
	_         uint8  // padding
	Data1     int32  // event dependent data
}

// GetType returns the event type.
func (e *DisplayEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *DisplayEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// WindowEvent contains window state change event data.
// (https://wiki.libsdl.org/SDL_WindowEvent)
type WindowEvent struct {
	Type      uint32 // WINDOWEVENT
	Timestamp uint32 // timestamp of the event
	WindowID  uint32 // the associated window
	Event     uint8  // (https://wiki.libsdl.org/SDL_WindowEventID)
	_         uint8  // padding
	_         uint8  // padding
	_         uint8  // padding
	Data1     int32  // event dependent data
	Data2     int32  // event dependent data
}
type cWindowEvent C.SDL_WindowEvent

// GetType returns the event type.
func (e *WindowEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *WindowEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// KeyboardEvent contains keyboard key down event information.
// (https://wiki.libsdl.org/SDL_KeyboardEvent)
type KeyboardEvent struct {
	Type      uint32 // KEYDOWN, KEYUP
	Timestamp uint32 // timestamp of the event
	WindowID  uint32 // the window with keyboard focus, if any
	State     uint8  // PRESSED, RELEASED
	Repeat    uint8  // non-zero if this is a key repeat
	_         uint8  // padding
	_         uint8  // padding
	Keysym    Keysym // Keysym representing the key that was pressed or released
}
type cKeyboardEvent C.SDL_KeyboardEvent

// GetType returns the event type.
func (e *KeyboardEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *KeyboardEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// TextEditingEvent contains keyboard text editing event information.
// (https://wiki.libsdl.org/SDL_TextEditingEvent)
type TextEditingEvent struct {
	Type      uint32                               // TEXTEDITING
	Timestamp uint32                               // timestamp of the event
	WindowID  uint32                               // the window with keyboard focus, if any
	Text      [C.SDL_TEXTINPUTEVENT_TEXT_SIZE]byte // the null-terminated editing text in UTF-8 encoding
	Start     int32                                // the location to begin editing from
	Length    int32                                // the number of characters to edit from the start point
}
type cTextEditingEvent C.SDL_TextEditingEvent

// GetType returns the event type.
func (e *TextEditingEvent) GetType() uint32 {
	return e.Type
}

// GetText returns the text as string
func (e *TextEditingEvent) GetText() string {
	length := func(buf []byte) int {
		for i := range buf {
			if buf[i] == 0 {
				return i
			}
		}

		return 0
	}(e.Text[:])

	text := e.Text[:length]
	return string(text)
}

// GetTimestamp returns the timestamp of the event.
func (e *TextEditingEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// TextInputEvent contains keyboard text input event information.
// (https://wiki.libsdl.org/SDL_TextInputEvent)
type TextInputEvent struct {
	Type      uint32                               // TEXTINPUT
	Timestamp uint32                               // timestamp of the event
	WindowID  uint32                               // the window with keyboard focus, if any
	Text      [C.SDL_TEXTINPUTEVENT_TEXT_SIZE]byte // the null-terminated input text in UTF-8 encoding
}
type cTextInputEvent C.SDL_TextInputEvent

// GetType returns the event type.
func (e *TextInputEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *TextInputEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// GetText returns the text as string
func (e *TextInputEvent) GetText() string {
	length := func(buf []byte) int {
		for i := range buf {
			if buf[i] == 0 {
				return i
			}
		}

		return 0
	}(e.Text[:])

	text := e.Text[:length]
	return string(text)
}

// MouseMotionEvent contains mouse motion event information.
// (https://wiki.libsdl.org/SDL_MouseMotionEvent)
type MouseMotionEvent struct {
	Type      uint32 // MOUSEMOTION
	Timestamp uint32 // timestamp of the event
	WindowID  uint32 // the window with mouse focus, if any
	Which     uint32 // the mouse instance id, or TOUCH_MOUSEID
	State     uint32 // BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT, BUTTON_X1, BUTTON_X2
	X         int32  // X coordinate, relative to window
	Y         int32  // Y coordinate, relative to window
	XRel      int32  // relative motion in the X direction
	YRel      int32  // relative motion in the Y direction
}
type cMouseMotionEvent C.SDL_MouseMotionEvent

// GetType returns the event type.
func (e *MouseMotionEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *MouseMotionEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// MouseButtonEvent contains mouse button event information.
// (https://wiki.libsdl.org/SDL_MouseButtonEvent)
type MouseButtonEvent struct {
	Type      uint32 // MOUSEBUTTONDOWN, MOUSEBUTTONUP
	Timestamp uint32 // timestamp of the event
	WindowID  uint32 // the window with mouse focus, if any
	Which     uint32 // the mouse instance id, or TOUCH_MOUSEID
	Button    uint8  // BUTTON_LEFT, BUTTON_MIDDLE, BUTTON_RIGHT, BUTTON_X1, BUTTON_X2
	State     uint8  // PRESSED, RELEASED
	Clicks    uint8  // 1 for single-click, 2 for double-click, etc. (>= SDL 2.0.2)
	_         uint8  // padding
	X         int32  // X coordinate, relative to window
	Y         int32  // Y coordinate, relative to window
}
type cMouseButtonEvent C.SDL_MouseButtonEvent

// GetType returns the event type.
func (e *MouseButtonEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *MouseButtonEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// MouseWheelEvent contains mouse wheel event information.
// (https://wiki.libsdl.org/SDL_MouseWheelEvent)
type MouseWheelEvent struct {
	Type      uint32  // MOUSEWHEEL
	Timestamp uint32  // timestamp of the event
	WindowID  uint32  // the window with mouse focus, if any
	Which     uint32  // the mouse instance id, or TOUCH_MOUSEID
	X         int32   // the amount scrolled horizontally, positive to the right and negative to the left
	Y         int32   // the amount scrolled vertically, positive away from the user and negative toward the user
	Direction uint32  // MOUSEWHEEL_NORMAL, MOUSEWHEEL_FLIPPED (>= SDL 2.0.4)
	PreciseX  float32 // The amount scrolled horizontally, positive to the right and negative to the left, with float precision (added in 2.0.18)
	PreciseY  float32 // The amount scrolled vertically, positive away from the user and negative toward the user, with float precision (added in 2.0.18)
}
type cMouseWheelEvent C.SDL_MouseWheelEvent

// GetType returns the event type.
func (e *MouseWheelEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *MouseWheelEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// JoyAxisEvent contains joystick axis motion event information.
// (https://wiki.libsdl.org/SDL_JoyAxisEvent)
type JoyAxisEvent struct {
	Type      uint32     // JOYAXISMOTION
	Timestamp uint32     // timestamp of the event
	Which     JoystickID // the instance id of the joystick that reported the event
	Axis      uint8      // the index of the axis that changed
	_         uint8      // padding
	_         uint8      // padding
	_         uint8      // padding
	Value     int16      // the current position of the axis (range: -32768 to 32767)
	_         uint16     // padding
}
type cJoyAxisEvent C.SDL_JoyAxisEvent

// GetType returns the event type.
func (e *JoyAxisEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *JoyAxisEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// JoyBallEvent contains joystick trackball motion event information.
// (https://wiki.libsdl.org/SDL_JoyBallEvent)
type JoyBallEvent struct {
	Type      uint32     // JOYBALLMOTION
	Timestamp uint32     // timestamp of the event
	Which     JoystickID // the instance id of the joystick that reported the event
	Ball      uint8      // the index of the trackball that changed
	_         uint8      // padding
	_         uint8      // padding
	_         uint8      // padding
	XRel      int16      // the relative motion in the X direction
	YRel      int16      // the relative motion in the Y direction
}
type cJoyBallEvent C.SDL_JoyBallEvent

// GetType returns the event type.
func (e *JoyBallEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *JoyBallEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// JoyHatEvent contains joystick hat position change event information.
// (https://wiki.libsdl.org/SDL_JoyHatEvent)
type JoyHatEvent struct {
	Type      uint32     // JOYHATMOTION
	Timestamp uint32     // timestamp of the event
	Which     JoystickID // the instance id of the joystick that reported the event
	Hat       uint8      // the index of the hat that changed
	Value     uint8      // HAT_LEFTUP, HAT_UP, HAT_RIGHTUP, HAT_LEFT, HAT_CENTERED, HAT_RIGHT, HAT_LEFTDOWN, HAT_DOWN, HAT_RIGHTDOWN
	_         uint8      // padding
	_         uint8      // padding
}
type cJoyHatEvent C.SDL_JoyHatEvent

// GetType returns the event type.
func (e *JoyHatEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *JoyHatEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// JoyButtonEvent contains joystick button event information.
// (https://wiki.libsdl.org/SDL_JoyButtonEvent)
type JoyButtonEvent struct {
	Type      uint32     // JOYBUTTONDOWN, JOYBUTTONUP
	Timestamp uint32     // timestamp of the event
	Which     JoystickID // the instance id of the joystick that reported the event
	Button    uint8      // the index of the button that changed
	State     uint8      // PRESSED, RELEASED
	_         uint8      // padding
	_         uint8      // padding
}
type cJoyButtonEvent C.SDL_JoyButtonEvent

// GetType returns the event type.
func (e *JoyButtonEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *JoyButtonEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// JoyDeviceAddedEvent contains joystick device event information.
// (https://wiki.libsdl.org/SDL_JoyDeviceEvent)
type JoyDeviceAddedEvent struct {
	Type      uint32     // JOYDEVICEADDED
	Timestamp uint32     // the timestamp of the event
	Which     JoystickID // the joystick device index
}

// GetType returns the event type.
func (e *JoyDeviceAddedEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *JoyDeviceAddedEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// JoyDeviceRemovedEvent contains joystick device event information.
// (https://wiki.libsdl.org/SDL_JoyDeviceEvent)
type JoyDeviceRemovedEvent struct {
	Type      uint32     // JOYDEVICEREMOVED
	Timestamp uint32     // the timestamp of the event
	Which     JoystickID // the instance id
}

// GetType returns the event type.
func (e *JoyDeviceRemovedEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *JoyDeviceRemovedEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// ControllerAxisEvent contains game controller axis motion event information.
// (https://wiki.libsdl.org/SDL_ControllerAxisEvent)
type ControllerAxisEvent struct {
	Type      uint32     // CONTROLLERAXISMOTION
	Timestamp uint32     // the timestamp of the event
	Which     JoystickID // the joystick instance id
	Axis      uint8      // the controller axis (https://wiki.libsdl.org/SDL_GameControllerAxis)
	_         uint8      // padding
	_         uint8      // padding
	_         uint8      // padding
	Value     int16      // the axis value (range: -32768 to 32767)
	_         uint16     // padding
}
type cControllerAxisEvent C.SDL_ControllerAxisEvent

// GetType returns the event type.
func (e *ControllerAxisEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *ControllerAxisEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// ControllerButtonEvent contains game controller button event information.
// (https://wiki.libsdl.org/SDL_ControllerButtonEvent)
type ControllerButtonEvent struct {
	Type      uint32     // CONTROLLERBUTTONDOWN, CONTROLLERBUTTONUP
	Timestamp uint32     // the timestamp of the event
	Which     JoystickID // the joystick instance id
	Button    uint8      // the controller button (https://wiki.libsdl.org/SDL_GameControllerButton)
	State     uint8      // PRESSED, RELEASED
	_         uint8      // padding
	_         uint8      // padding
}
type cControllerButtonEvent C.SDL_ControllerButtonEvent

// GetType returns the event type.
func (e *ControllerButtonEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *ControllerButtonEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// ControllerDeviceEvent contains controller device event information.
// (https://wiki.libsdl.org/SDL_ControllerDeviceEvent)
type ControllerDeviceEvent struct {
	Type      uint32     // CONTROLLERDEVICEADDED, CONTROLLERDEVICEREMOVED, SDL_CONTROLLERDEVICEREMAPPED
	Timestamp uint32     // the timestamp of the event
	Which     JoystickID // the joystick device index for the CONTROLLERDEVICEADDED event or instance id for the CONTROLLERDEVICEREMOVED or CONTROLLERDEVICEREMAPPED event
}
type cControllerDeviceEvent C.SDL_ControllerDeviceEvent

// GetType returns the event type.
func (e *ControllerDeviceEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *ControllerDeviceEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// AudioDeviceEvent contains audio device event information.
// (https://wiki.libsdl.org/SDL_AudioDeviceEvent)
type AudioDeviceEvent struct {
	Type      uint32 // AUDIODEVICEADDED, AUDIODEVICEREMOVED
	Timestamp uint32 // the timestamp of the event
	Which     uint32 // the audio device index for the AUDIODEVICEADDED event (valid until next GetNumAudioDevices() call), AudioDeviceID for the AUDIODEVICEREMOVED event
	IsCapture uint8  // zero if an audio output device, non-zero if an audio capture device
	_         uint8  // padding
	_         uint8  // padding
	_         uint8  // padding
}
type cAudioDeviceEvent C.SDL_AudioDeviceEvent

// GetType returns the event type.
func (e *AudioDeviceEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *AudioDeviceEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// TouchFingerEvent contains finger touch event information.
// (https://wiki.libsdl.org/SDL_TouchFingerEvent)
type TouchFingerEvent struct {
	Type      uint32   // FINGERMOTION, FINGERDOWN, FINGERUP
	Timestamp uint32   // timestamp of the event
	TouchID   TouchID  // the touch device id
	FingerID  FingerID // the finger id
	X         float32  // the x-axis location of the touch event, normalized (0...1)
	Y         float32  // the y-axis location of the touch event, normalized (0...1)
	DX        float32  // the distance moved in the x-axis, normalized (-1...1)
	DY        float32  // the distance moved in the y-axis, normalized (-1...1)
	Pressure  float32  // the quantity of pressure applied, normalized (0...1)
}
type cTouchFingerEvent C.SDL_TouchFingerEvent

// GetType returns the event type.
func (e *TouchFingerEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *TouchFingerEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// MultiGestureEvent contains multiple finger gesture event information.
// (https://wiki.libsdl.org/SDL_MultiGestureEvent)
type MultiGestureEvent struct {
	Type       uint32  // MULTIGESTURE
	Timestamp  uint32  // timestamp of the event
	TouchID    TouchID // the touch device id
	DTheta     float32 // the amount that the fingers rotated during this motion
	DDist      float32 // the amount that the fingers pinched during this motion
	X          float32 // the normalized center of gesture
	Y          float32 // the normalized center of gesture
	NumFingers uint16  // the number of fingers used in the gesture
	_          uint16  // padding
}
type cMultiGestureEvent C.SDL_MultiGestureEvent

// GetType returns the event type.
func (e *MultiGestureEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *MultiGestureEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// DollarGestureEvent contains complex gesture event information.
// (https://wiki.libsdl.org/SDL_DollarGestureEvent)
type DollarGestureEvent struct {
	Type       uint32    // DOLLARGESTURE, DOLLARRECORD
	Timestamp  uint32    // timestamp of the event
	TouchID    TouchID   // the touch device id
	GestureID  GestureID // the unique id of the closest gesture to the performed stroke
	NumFingers uint32    // the number of fingers used to draw the stroke
	Error      float32   // the difference between the gesture template and the actual performed gesture (lower error is a better match)
	X          float32   // the normalized center of gesture
	Y          float32   // the normalized center of gesture
}
type cDollarGestureEvent C.SDL_DollarGestureEvent

// GetType returns the event type.
func (e *DollarGestureEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *DollarGestureEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// DropEvent contains an event used to request a file open by the system.
// (https://wiki.libsdl.org/SDL_DropEvent)
type DropEvent struct {
	Type      uint32 // DROPFILE, DROPTEXT, DROPBEGIN, DROPCOMPLETE
	Timestamp uint32 // timestamp of the event
	File      string // the file name
	WindowID  uint32 // the window that was dropped on, if any
}

type tDropEvent struct {
	Type      uint32
	Timestamp uint32
	File      unsafe.Pointer
	WindowID  uint32
}
type cDropEvent C.SDL_DropEvent

// GetType returns the event type.
func (e *DropEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *DropEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// SensorEvent contains data from sensors such as accelerometer and gyroscope
// (https://wiki.libsdl.org/SDL_SensorEvent)
type SensorEvent struct {
	Type      uint32     // SDL_SENSORUPDATE
	Timestamp uint32     // In milliseconds, populated using SDL_GetTicks()
	Which     int32      // The instance ID of the sensor
	Data      [6]float32 // Up to 6 values from the sensor - additional values can be queried using SDL_SensorGetData()
}
type cSensorEvent C.SDL_SensorEvent

// GetType returns the event type.
func (e *SensorEvent) GetType() uint32 {
	return e.Type
}

// GetTimestamp returns the timestamp of the event.
func (e *SensorEvent) GetTimestamp() uint32 {
	return e.Timestamp
}

// RenderEvent contains render event information.
// (https://wiki.l
Download .txt
gitextract_uhvoelxn/

├── .github/
│   ├── dependabot.yml
│   └── workflows/
│       ├── assembly.yml
│       ├── c.yml
│       ├── cplusplus.yml
│       ├── expired.yml
│       └── other.yml
├── .gitignore
├── COMPILES.md
├── LICENSE
├── Makefile
├── README.md
├── assembly/
│   ├── Makefile
│   ├── README.md
│   ├── linux-i386/
│   │   ├── Makefile
│   │   ├── README.md
│   │   └── main.asm
│   ├── linux-x86_64/
│   │   ├── Makefile
│   │   ├── README.md
│   │   └── main.asm
│   ├── macos-x86_64/
│   │   ├── Makefile
│   │   ├── README.md
│   │   └── main.asm
│   └── windows-x86_64/
│       ├── README.md
│       └── main.asm
├── bench.sh
├── c++11/
│   ├── Makefile
│   └── main.cpp
├── c++11-cmake/
│   ├── CMakeLists.txt
│   ├── README.md
│   └── main.cpp
├── c++14-cmake/
│   ├── CMakeLists.txt
│   ├── README.md
│   └── main.cpp
├── c++17-cmake/
│   ├── CMakeLists.txt
│   ├── README.md
│   └── main.cpp
├── c++20-cmake/
│   ├── CMakeLists.txt
│   ├── README.md
│   └── main.cpp
├── c++23-cmake/
│   ├── CMakeLists.txt
│   ├── README.md
│   └── main.cpp
├── c++98/
│   ├── Makefile
│   ├── README.md
│   └── main.cpp
├── c11/
│   ├── Makefile
│   ├── README.md
│   └── main.c
├── c18/
│   ├── Makefile
│   ├── README.md
│   └── main.c
├── c2x/
│   ├── Makefile
│   ├── README.md
│   └── main.c
├── c89/
│   ├── Makefile
│   ├── README.md
│   └── main.c
├── c99/
│   ├── Makefile
│   ├── README.md
│   └── main.c
├── crystal/
│   ├── Makefile
│   ├── README.md
│   ├── main.cr
│   └── shard.yml
├── csharp/
│   ├── Makefile
│   ├── README.md
│   ├── main.cs
│   └── main.csproj
├── d/
│   ├── .gitignore
│   ├── Makefile
│   ├── README.md
│   ├── dub.json
│   ├── dub.selections.json
│   └── source/
│       └── app.d
├── dart/
│   ├── Makefile
│   ├── main.dart
│   └── pubspec.yaml
├── freebasic/
│   ├── Makefile
│   ├── README.md
│   └── main.bas
├── fsharp/
│   ├── Makefile
│   ├── main.fs
│   └── main.fsproj
├── gambas/
│   ├── .directory
│   ├── .gitignore
│   ├── .project
│   ├── .src/
│   │   └── MMain.module
│   └── Makefile
├── gccgo/
│   ├── Makefile
│   ├── README.md
│   ├── go.mod
│   ├── go.sum
│   ├── main.go
│   └── vendor/
│       ├── github.com/
│       │   └── veandco/
│       │       └── go-sdl2/
│       │           ├── CONTRIBUTORS.md
│       │           ├── LICENSE
│       │           ├── _libs/
│       │           │   └── dummy.go
│       │           ├── img/
│       │           │   ├── sdl_image.go
│       │           │   ├── sdl_image_cgo.go
│       │           │   ├── sdl_image_cgo_static.go
│       │           │   └── sdl_image_wrapper.h
│       │           └── sdl/
│       │               ├── TODO.md
│       │               ├── audio.go
│       │               ├── blendmode.go
│       │               ├── clipboard.go
│       │               ├── cpuinfo.go
│       │               ├── endian.go
│       │               ├── error.go
│       │               ├── events.c
│       │               ├── events.go
│       │               ├── events.h
│       │               ├── filesystem.go
│       │               ├── gamecontroller.go
│       │               ├── gesture.go
│       │               ├── guid.go
│       │               ├── haptic.go
│       │               ├── helpers.go
│       │               ├── hidapi.go
│       │               ├── hints.c
│       │               ├── hints.go
│       │               ├── hints.h
│       │               ├── joystick.go
│       │               ├── keyboard.go
│       │               ├── keycode.go
│       │               ├── loadso.go
│       │               ├── log.c
│       │               ├── log.go
│       │               ├── log.h
│       │               ├── mouse.go
│       │               ├── mutex.go
│       │               ├── pixels.go
│       │               ├── power.go
│       │               ├── rect.go
│       │               ├── render.go
│       │               ├── rwops.go
│       │               ├── scancode.go
│       │               ├── sdl.go
│       │               ├── sdl_cgo.go
│       │               ├── sdl_cgo_static.go
│       │               ├── sdl_wrapper.h
│       │               ├── sensor.go
│       │               ├── shape.go
│       │               ├── surface.go
│       │               ├── sysrender.go
│       │               ├── system.c
│       │               ├── system.go
│       │               ├── system.h
│       │               ├── system_android.go
│       │               ├── system_linux.go
│       │               ├── system_windows.go
│       │               ├── syswm.go
│       │               ├── syswm_cocoa.go
│       │               ├── syswm_dfb.go
│       │               ├── syswm_uikit.go
│       │               ├── syswm_vivante.go
│       │               ├── syswm_windows.go
│       │               ├── syswm_x11.go
│       │               ├── thread.go
│       │               ├── timer.go
│       │               ├── touch.go
│       │               ├── version.go
│       │               ├── video.go
│       │               └── vulkan.go
│       └── modules.txt
├── go/
│   ├── Makefile
│   ├── README.md
│   ├── go.mod
│   ├── go.sum
│   ├── main.go
│   └── vendor/
│       ├── github.com/
│       │   └── veandco/
│       │       └── go-sdl2/
│       │           ├── CONTRIBUTORS.md
│       │           ├── LICENSE
│       │           ├── _libs/
│       │           │   └── dummy.go
│       │           ├── img/
│       │           │   ├── sdl_image.go
│       │           │   ├── sdl_image_cgo.go
│       │           │   ├── sdl_image_cgo_static.go
│       │           │   └── sdl_image_wrapper.h
│       │           └── sdl/
│       │               ├── TODO.md
│       │               ├── audio.go
│       │               ├── blendmode.go
│       │               ├── clipboard.go
│       │               ├── cpuinfo.go
│       │               ├── endian.go
│       │               ├── error.go
│       │               ├── events.c
│       │               ├── events.go
│       │               ├── events.h
│       │               ├── filesystem.go
│       │               ├── gamecontroller.go
│       │               ├── gesture.go
│       │               ├── guid.go
│       │               ├── haptic.go
│       │               ├── helpers.go
│       │               ├── hidapi.go
│       │               ├── hints.c
│       │               ├── hints.go
│       │               ├── hints.h
│       │               ├── joystick.go
│       │               ├── keyboard.go
│       │               ├── keycode.go
│       │               ├── loadso.go
│       │               ├── log.c
│       │               ├── log.go
│       │               ├── log.h
│       │               ├── mouse.go
│       │               ├── mutex.go
│       │               ├── pixels.go
│       │               ├── power.go
│       │               ├── rect.go
│       │               ├── render.go
│       │               ├── rwops.go
│       │               ├── scancode.go
│       │               ├── sdl.go
│       │               ├── sdl_cgo.go
│       │               ├── sdl_cgo_static.go
│       │               ├── sdl_wrapper.h
│       │               ├── sensor.go
│       │               ├── shape.go
│       │               ├── surface.go
│       │               ├── sysrender.go
│       │               ├── system.c
│       │               ├── system.go
│       │               ├── system.h
│       │               ├── system_android.go
│       │               ├── system_linux.go
│       │               ├── system_windows.go
│       │               ├── syswm.go
│       │               ├── syswm_cocoa.go
│       │               ├── syswm_dfb.go
│       │               ├── syswm_uikit.go
│       │               ├── syswm_vivante.go
│       │               ├── syswm_windows.go
│       │               ├── syswm_x11.go
│       │               ├── thread.go
│       │               ├── timer.go
│       │               ├── touch.go
│       │               ├── version.go
│       │               ├── video.go
│       │               └── vulkan.go
│       └── modules.txt
├── haskell/
│   ├── .gitignore
│   ├── Makefile
│   ├── README.md
│   ├── Setup.hs
│   ├── app/
│   │   └── Main.hs
│   ├── grumpycat.cabal
│   ├── package.yaml
│   ├── src/
│   │   └── Lib.hs
│   ├── stack.yaml
│   └── test/
│       └── Spec.hs
├── include/
│   └── sdl2.h
├── java22/
│   ├── Main.java
│   ├── Makefile
│   └── README.md
├── kotlin/
│   ├── .gitignore
│   ├── Main.kt
│   ├── Makefile
│   ├── README.md
│   └── sdl2.def
├── lisp/
│   ├── Makefile
│   ├── README.md
│   └── main.lisp
├── lua/
│   ├── Makefile
│   ├── README.md
│   └── main.lua
├── mruby/
│   ├── Makefile
│   ├── README.md
│   └── main.rb
├── nim/
│   ├── Makefile
│   ├── README.md
│   └── main.nim
├── objc-cmake/
│   ├── CMakeLists.txt
│   ├── README.md
│   └── main.m
├── objectpascal/
│   ├── Makefile
│   ├── README.md
│   ├── checkout.sh
│   └── main.pas
├── ocaml/
│   ├── Makefile
│   ├── README.md
│   └── main.ml
├── odin/
│   ├── Makefile
│   ├── README.md
│   └── main.odin
├── python/
│   ├── Makefile
│   ├── README.md
│   └── main.py
├── ring/
│   ├── Makefile
│   ├── README.md
│   └── main.ring
├── run.sh
├── rust/
│   ├── .gitignore
│   ├── Cargo.toml
│   ├── Makefile
│   ├── README.md
│   └── src/
│       └── main.rs
├── scala/
│   ├── Main.scala
│   ├── Makefile
│   ├── README.md
│   ├── build.sbt
│   └── project/
│       └── plugins.sbt
├── v/
│   ├── Makefile
│   ├── README.md
│   └── main.v
└── zig/
    ├── Makefile
    ├── README.md
    ├── build.zig
    └── main.zig
Download .txt
Showing preview only (380K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (4515 symbols across 132 files)

FILE: c++11-cmake/main.cpp
  function main (line 5) | int main()

FILE: c++11/main.cpp
  function main (line 5) | int main()

FILE: c++14-cmake/main.cpp
  function main (line 6) | auto main() -> int

FILE: c++17-cmake/main.cpp
  function main (line 6) | auto main() -> int

FILE: c++20-cmake/main.cpp
  function main (line 6) | auto main() -> int

FILE: c++23-cmake/main.cpp
  function main (line 6) | auto main() -> int

FILE: c++98/main.cpp
  function main (line 5) | int main()

FILE: c11/main.c
  function main (line 5) | int main(void)

FILE: c18/main.c
  function main (line 5) | int main(void)

FILE: c2x/main.c
  function main (line 5) | int main()

FILE: c89/main.c
  function main (line 5) | int main(void)

FILE: c99/main.c
  function main (line 6) | int main(void)

FILE: csharp/main.cs
  class HelloWorld (line 5) | public class HelloWorld
    method SDL_Init (line 18) | [DllImport("SDL2")]
    method SDL_CreateWindow (line 21) | [DllImport("SDL2")]
    method SDL_CreateRenderer (line 31) | [DllImport("SDL2")]
    method SDL_CreateTextureFromSurface (line 38) | [DllImport("SDL2")]
    method SDL_DestroyRenderer (line 44) | [DllImport("SDL2")]
    method SDL_DestroyWindow (line 49) | [DllImport("SDL2")]
    method SDL_FreeSurface (line 54) | [DllImport("SDL2")]
    method SDL_DestroyTexture (line 59) | [DllImport("SDL2")]
    method SDL_RenderClear (line 64) | [DllImport("SDL2")]
    method SDL_RenderCopy (line 69) | [DllImport("SDL2")]
    method SDL_RenderPresent (line 77) | [DllImport("SDL2")]
    method SDL_LoadBMP_RW (line 82) | [DllImport("SDL2")]
    method SDL_RWFromFile (line 88) | [DllImport("SDL2")]
    method SDL_Quit (line 94) | [DllImport("SDL2")]
    method SDL_GetError (line 97) | [DllImport("SDL2")]
    method SDL_GetErrorString (line 101) | private static unsafe string SDL_GetErrorString()
    method PrintErr (line 115) | private static void PrintErr(string topic)
    class SDLWindow (line 120) | public class SDLWindow : IDisposable
      method SDLWindow (line 124) | public SDLWindow(string title, int x, int y, int w, int h, uint flags)
      method Dispose (line 133) | public void Dispose()
    class SDLRenderer (line 143) | public class SDLRenderer : IDisposable
      method SDLRenderer (line 147) | public SDLRenderer(SDLWindow window, int index, uint flags)
      method Dispose (line 156) | public void Dispose()
    class SDLTexture (line 166) | public class SDLTexture : IDisposable
      method SDLTexture (line 170) | public SDLTexture(SDLRenderer renderer, IntPtr surface)
      method Dispose (line 179) | public void Dispose()
    method Main (line 189) | public static int Main(string[] args)

FILE: dart/main.dart
  type SDL_InitC (line 19) | typedef SDL_InitC = Int32 Function(Uint32 flags);
  type SDL_InitDart (line 20) | typedef SDL_InitDart = int Function(int flags);
  type SDL_CreateWindowC (line 22) | typedef SDL_CreateWindowC = Pointer Function(Pointer<Utf8> title, Int32 ...
  type SDL_CreateWindowDart (line 23) | typedef SDL_CreateWindowDart = Pointer Function(Pointer<Utf8> title, int...
  type SDL_CreateRendererC (line 25) | typedef SDL_CreateRendererC = Pointer Function(Pointer win, Int32 index,...
  type SDL_CreateRendererDart (line 26) | typedef SDL_CreateRendererDart = Pointer Function(Pointer win, int index...
  type SDL_CreateTextureFromSurfaceC (line 28) | typedef SDL_CreateTextureFromSurfaceC = Pointer Function(Pointer rendere...
  type SDL_CreateTextureFromSurfaceDart (line 29) | typedef SDL_CreateTextureFromSurfaceDart = Pointer Function(Pointer rend...
  type SDL_DestroyRendererC (line 31) | typedef SDL_DestroyRendererC = Void Function(Pointer renderer);
  type SDL_DestroyRendererDart (line 32) | typedef SDL_DestroyRendererDart = void Function(Pointer renderer);
  type SDL_DestroyWindowC (line 34) | typedef SDL_DestroyWindowC = Void Function(Pointer window);
  type SDL_DestroyWindowDart (line 35) | typedef SDL_DestroyWindowDart = void Function(Pointer window);
  type SDL_FreeSurfaceC (line 37) | typedef SDL_FreeSurfaceC = Void Function(Pointer surface);
  type SDL_FreeSurfaceDart (line 38) | typedef SDL_FreeSurfaceDart = void Function(Pointer surface);
  type SDL_DestroyTextureC (line 40) | typedef SDL_DestroyTextureC = Void Function(Pointer texture);
  type SDL_DestroyTextureDart (line 41) | typedef SDL_DestroyTextureDart = void Function(Pointer texture);
  type SDL_RenderClearC (line 43) | typedef SDL_RenderClearC = Int32 Function(Pointer renderer);
  type SDL_RenderClearDart (line 44) | typedef SDL_RenderClearDart = int Function(Pointer renderer);
  type SDL_RenderCopyC (line 46) | typedef SDL_RenderCopyC = Int32 Function(Pointer renderer, Pointer textu...
  type SDL_RenderCopyDart (line 47) | typedef SDL_RenderCopyDart = int Function(Pointer renderer, Pointer text...
  type SDL_RenderPresentC (line 49) | typedef SDL_RenderPresentC = Void Function(Pointer renderer);
  type SDL_RenderPresentDart (line 50) | typedef SDL_RenderPresentDart = void Function(Pointer renderer);
  type SDL_RWFromFileC (line 52) | typedef SDL_RWFromFileC = Pointer Function(Pointer<Utf8> file, Pointer<U...
  type SDL_RWFromFileDart (line 53) | typedef SDL_RWFromFileDart = Pointer Function(Pointer<Utf8> file, Pointe...
  type SDL_LoadBMP_RWC (line 55) | typedef SDL_LoadBMP_RWC = Pointer Function(Pointer src, Int32 freesrc);
  type SDL_LoadBMP_RWDart (line 56) | typedef SDL_LoadBMP_RWDart = Pointer Function(Pointer src, int freesrc);
  type SDL_DelayC (line 58) | typedef SDL_DelayC = Void Function(Uint32 ms);
  type SDL_DelayDart (line 59) | typedef SDL_DelayDart = void Function(int ms);
  type SDL_QuitC (line 61) | typedef SDL_QuitC = Void Function();
  type SDL_QuitDart (line 62) | typedef SDL_QuitDart = void Function();
  function main (line 64) | void main()

FILE: gccgo/main.go
  function main (line 11) | func main() {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/img/sdl_image.go
  constant INIT_JPG (line 13) | INIT_JPG  = 0x00000001
  constant INIT_PNG (line 14) | INIT_PNG  = 0x00000002
  constant INIT_TIF (line 15) | INIT_TIF  = 0x00000004
  constant INIT_WEBP (line 16) | INIT_WEBP = 0x00000008
  function LinkedVersion (line 21) | func LinkedVersion() *sdl.Version {
  function Init (line 27) | func Init(flags int) error {
  function Quit (line 38) | func Quit() {
  function GetError (line 44) | func GetError() error {
  function LoadTypedRW (line 54) | func LoadTypedRW(src *sdl.RWops, freesrc bool, type_ string) (*sdl.Surfa...
  function Load (line 68) | func Load(file string) (*sdl.Surface, error) {
  function LoadRW (line 80) | func LoadRW(src *sdl.RWops, freesrc bool) (*sdl.Surface, error) {
  function LoadTexture (line 91) | func LoadTexture(renderer *sdl.Renderer, file string) (*sdl.Texture, err...
  function LoadTextureRW (line 103) | func LoadTextureRW(renderer *sdl.Renderer, src *sdl.RWops, freesrc bool)...
  function IsICO (line 116) | func IsICO(src *sdl.RWops) bool {
  function IsCUR (line 123) | func IsCUR(src *sdl.RWops) bool {
  function IsBMP (line 130) | func IsBMP(src *sdl.RWops) bool {
  function IsGIF (line 137) | func IsGIF(src *sdl.RWops) bool {
  function IsJPG (line 144) | func IsJPG(src *sdl.RWops) bool {
  function IsLBM (line 151) | func IsLBM(src *sdl.RWops) bool {
  function IsPCX (line 158) | func IsPCX(src *sdl.RWops) bool {
  function IsPNG (line 165) | func IsPNG(src *sdl.RWops) bool {
  function IsPNM (line 172) | func IsPNM(src *sdl.RWops) bool {
  function IsTIF (line 179) | func IsTIF(src *sdl.RWops) bool {
  function IsXCF (line 186) | func IsXCF(src *sdl.RWops) bool {
  function IsXPM (line 193) | func IsXPM(src *sdl.RWops) bool {
  function IsXV (line 200) | func IsXV(src *sdl.RWops) bool {
  function IsWEBP (line 206) | func IsWEBP(src *sdl.RWops) bool {
  function LoadICORW (line 213) | func LoadICORW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadCURRW (line 224) | func LoadCURRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadBMPRW (line 235) | func LoadBMPRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadGIFRW (line 246) | func LoadGIFRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadJPGRW (line 257) | func LoadJPGRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadLBMRW (line 268) | func LoadLBMRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadPCXRW (line 279) | func LoadPCXRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadPNGRW (line 290) | func LoadPNGRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadPNMRW (line 301) | func LoadPNMRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadTGARW (line 312) | func LoadTGARW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadTIFRW (line 323) | func LoadTIFRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadXCFRW (line 334) | func LoadXCFRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadXPMRW (line 345) | func LoadXPMRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadXVRW (line 356) | func LoadXVRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadWEBPRW (line 366) | func LoadWEBPRW(src *sdl.RWops) (*sdl.Surface, error) {
  function ReadXPMFromArray (line 377) | func ReadXPMFromArray(xpm string) (*sdl.Surface, error) {
  function SavePNG (line 388) | func SavePNG(surface *sdl.Surface, file string) error {
  function SavePNGRW (line 400) | func SavePNGRW(surface *sdl.Surface, dst *sdl.RWops, freedst int) error {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/audio.go
  constant AUDIO_MASK_BITSIZE (line 136) | AUDIO_MASK_BITSIZE  = C.SDL_AUDIO_MASK_BITSIZE
  constant AUDIO_MASK_DATATYPE (line 137) | AUDIO_MASK_DATATYPE = C.SDL_AUDIO_MASK_DATATYPE
  constant AUDIO_MASK_ENDIAN (line 138) | AUDIO_MASK_ENDIAN   = C.SDL_AUDIO_MASK_ENDIAN
  constant AUDIO_MASK_SIGNED (line 139) | AUDIO_MASK_SIGNED   = C.SDL_AUDIO_MASK_SIGNED
  constant AUDIO_S8 (line 145) | AUDIO_S8 = C.AUDIO_S8
  constant AUDIO_U8 (line 146) | AUDIO_U8 = C.AUDIO_U8
  constant AUDIO_S16LSB (line 148) | AUDIO_S16LSB = C.AUDIO_S16LSB
  constant AUDIO_S16MSB (line 149) | AUDIO_S16MSB = C.AUDIO_S16MSB
  constant AUDIO_S16SYS (line 150) | AUDIO_S16SYS = C.AUDIO_S16SYS
  constant AUDIO_S16 (line 151) | AUDIO_S16    = C.AUDIO_S16
  constant AUDIO_U16LSB (line 152) | AUDIO_U16LSB = C.AUDIO_U16LSB
  constant AUDIO_U16MSB (line 153) | AUDIO_U16MSB = C.AUDIO_U16MSB
  constant AUDIO_U16SYS (line 154) | AUDIO_U16SYS = C.AUDIO_U16SYS
  constant AUDIO_U16 (line 155) | AUDIO_U16    = C.AUDIO_U16
  constant AUDIO_S32LSB (line 157) | AUDIO_S32LSB = C.AUDIO_S32LSB
  constant AUDIO_S32MSB (line 158) | AUDIO_S32MSB = C.AUDIO_S32MSB
  constant AUDIO_S32SYS (line 159) | AUDIO_S32SYS = C.AUDIO_S32SYS
  constant AUDIO_S32 (line 160) | AUDIO_S32    = C.AUDIO_S32
  constant AUDIO_F32LSB (line 162) | AUDIO_F32LSB = C.AUDIO_F32LSB
  constant AUDIO_F32MSB (line 163) | AUDIO_F32MSB = C.AUDIO_F32MSB
  constant AUDIO_F32SYS (line 164) | AUDIO_F32SYS = C.AUDIO_F32SYS
  constant AUDIO_F32 (line 165) | AUDIO_F32    = C.AUDIO_F32
  constant AUDIO_ALLOW_FREQUENCY_CHANGE (line 171) | AUDIO_ALLOW_FREQUENCY_CHANGE = C.SDL_AUDIO_ALLOW_FREQUENCY_CHANGE
  constant AUDIO_ALLOW_FORMAT_CHANGE (line 172) | AUDIO_ALLOW_FORMAT_CHANGE    = C.SDL_AUDIO_ALLOW_FORMAT_CHANGE
  constant AUDIO_ALLOW_CHANNELS_CHANGE (line 173) | AUDIO_ALLOW_CHANNELS_CHANGE  = C.SDL_AUDIO_ALLOW_CHANNELS_CHANGE
  constant AUDIO_ALLOW_ANY_CHANGE (line 174) | AUDIO_ALLOW_ANY_CHANGE       = C.SDL_AUDIO_ALLOW_ANY_CHANGE
  constant AUDIO_STOPPED (line 180) | AUDIO_STOPPED AudioStatus = C.SDL_AUDIO_STOPPED
  constant AUDIO_PLAYING (line 181) | AUDIO_PLAYING             = C.SDL_AUDIO_PLAYING
  constant AUDIO_PAUSED (line 182) | AUDIO_PAUSED              = C.SDL_AUDIO_PAUSED
  constant MIX_MAXVOLUME (line 187) | MIX_MAXVOLUME = C.SDL_MIX_MAXVOLUME
  type AudioFormat (line 191) | type AudioFormat
    method c (line 246) | func (fmt AudioFormat) c() C.SDL_AudioFormat {
    method BitSize (line 268) | func (fmt AudioFormat) BitSize() uint8 {
    method IsFloat (line 274) | func (fmt AudioFormat) IsFloat() bool {
    method IsBigEndian (line 280) | func (fmt AudioFormat) IsBigEndian() bool {
    method IsSigned (line 286) | func (fmt AudioFormat) IsSigned() bool {
    method IsInt (line 292) | func (fmt AudioFormat) IsInt() bool {
    method IsLittleEndian (line 298) | func (fmt AudioFormat) IsLittleEndian() bool {
    method IsUnsigned (line 304) | func (fmt AudioFormat) IsUnsigned() bool {
  type AudioCallback (line 195) | type AudioCallback
  type AudioFilter (line 199) | type AudioFilter
  type AudioDeviceID (line 203) | type AudioDeviceID
    method c (line 250) | func (id AudioDeviceID) c() C.SDL_AudioDeviceID {
  type AudioStatus (line 207) | type AudioStatus
  type cAudioStatus (line 208) | type cAudioStatus
  type AudioSpec (line 212) | type AudioSpec struct
    method cptr (line 254) | func (as *AudioSpec) cptr() *C.SDL_AudioSpec {
  type cAudioSpec (line 223) | type cAudioSpec
  type AudioCVT (line 227) | type AudioCVT struct
    method cptr (line 258) | func (cvt *AudioCVT) cptr() *C.SDL_AudioCVT {
    method AllocBuf (line 309) | func (cvt *AudioCVT) AllocBuf(size uintptr) {
    method FreeBuf (line 314) | func (cvt *AudioCVT) FreeBuf() {
    method BufAsSlice (line 320) | func (cvt AudioCVT) BufAsSlice() []byte {
  type cAudioCVT (line 240) | type cAudioCVT
  type AudioStream (line 244) | type AudioStream
    method cptr (line 262) | func (stream *AudioStream) cptr() *C.SDL_AudioStream {
    method Put (line 595) | func (stream *AudioStream) Put(buf []byte) (err error) {
    method Get (line 606) | func (stream *AudioStream) Get(buf []byte) (n int, err error) {
    method Available (line 619) | func (stream *AudioStream) Available() (err error) {
    method Flush (line 628) | func (stream *AudioStream) Flush() (err error) {
    method Clear (line 636) | func (stream *AudioStream) Clear() {
    method Free (line 642) | func (stream *AudioStream) Free() {
  function GetNumAudioDrivers (line 331) | func GetNumAudioDrivers() int {
  function GetAudioDriver (line 337) | func GetAudioDriver(index int) string {
  function AudioInit (line 343) | func AudioInit(driverName string) error {
  function AudioQuit (line 354) | func AudioQuit() {
  function GetCurrentAudioDriver (line 360) | func GetCurrentAudioDriver() string {
  function OpenAudio (line 366) | func OpenAudio(desired, obtained *AudioSpec) error {
  function GetNumAudioDevices (line 375) | func GetNumAudioDevices(isCapture bool) int {
  function GetAudioDeviceName (line 381) | func GetAudioDeviceName(index int, isCapture bool) string {
  function OpenAudioDevice (line 387) | func OpenAudioDevice(device string, isCapture bool, desired, obtained *A...
  function GetAudioStatus (line 401) | func GetAudioStatus() AudioStatus {
  function GetAudioDeviceStatus (line 407) | func GetAudioDeviceStatus(dev AudioDeviceID) AudioStatus {
  function PauseAudio (line 413) | func PauseAudio(pauseOn bool) {
  function PauseAudioDevice (line 419) | func PauseAudioDevice(dev AudioDeviceID, pauseOn bool) {
  function LoadWAVRW (line 425) | func LoadWAVRW(src *RWops, freeSrc bool) ([]byte, *AudioSpec) {
  function LoadWAV (line 440) | func LoadWAV(file string) ([]byte, *AudioSpec) {
  function FreeWAV (line 460) | func FreeWAV(audioBuf []uint8) {
  function BuildAudioCVT (line 468) | func BuildAudioCVT(cvt *AudioCVT, srcFormat AudioFormat, srcChannels uin...
  function ConvertAudio (line 480) | func ConvertAudio(cvt *AudioCVT) error {
  function QueueAudio (line 490) | func QueueAudio(dev AudioDeviceID, data []byte) error {
  function DequeueAudio (line 502) | func DequeueAudio(dev AudioDeviceID, data []byte) (n int, err error) {
  function GetQueuedAudioSize (line 514) | func GetQueuedAudioSize(dev AudioDeviceID) uint32 {
  function ClearQueuedAudio (line 520) | func ClearQueuedAudio(dev AudioDeviceID) {
  function MixAudio (line 526) | func MixAudio(dst, src *uint8, len uint32, volume int) {
  function MixAudioFormat (line 534) | func MixAudioFormat(dst, src *uint8, format AudioFormat, len uint32, vol...
  function LockAudio (line 542) | func LockAudio() {
  function LockAudioDevice (line 548) | func LockAudioDevice(dev AudioDeviceID) {
  function UnlockAudio (line 554) | func UnlockAudio() {
  function UnlockAudioDevice (line 560) | func UnlockAudioDevice(dev AudioDeviceID) {
  function CloseAudio (line 566) | func CloseAudio() {
  function CloseAudioDevice (line 572) | func CloseAudioDevice(dev AudioDeviceID) {
  function NewAudioStream (line 578) | func NewAudioStream(srcFormat AudioFormat, srcChannels uint8, srcRate in...
  function GetAudioDeviceSpec (line 648) | func GetAudioDeviceSpec(index int, isCapture bool) (spec *AudioSpec, err...

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/blendmode.go
  type BlendMode (line 65) | type BlendMode
    method c (line 75) | func (bm BlendMode) c() C.SDL_BlendMode {
    method cptr (line 79) | func (bm *BlendMode) cptr() *C.SDL_BlendMode {
  constant BLENDMODE_NONE (line 68) | BLENDMODE_NONE    = C.SDL_BLENDMODE_NONE
  constant BLENDMODE_BLEND (line 69) | BLENDMODE_BLEND   = C.SDL_BLENDMODE_BLEND
  constant BLENDMODE_ADD (line 70) | BLENDMODE_ADD     = C.SDL_BLENDMODE_ADD
  constant BLENDMODE_MOD (line 71) | BLENDMODE_MOD     = C.SDL_BLENDMODE_MOD
  constant BLENDMODE_INVALID (line 72) | BLENDMODE_INVALID = C.SDL_BLENDMODE_INVALID
  type BlendOperation (line 85) | type BlendOperation
  constant BLENDOPERATION_ADD (line 88) | BLENDOPERATION_ADD          = C.SDL_BLENDOPERATION_ADD
  constant BLENDOPERATION_SUBTRACT (line 89) | BLENDOPERATION_SUBTRACT     = C.SDL_BLENDOPERATION_SUBTRACT
  constant BLENDOPERATION_REV_SUBTRACT (line 90) | BLENDOPERATION_REV_SUBTRACT = C.SDL_BLENDOPERATION_REV_SUBTRACT
  constant BLENDOPERATION_MINIMUM (line 91) | BLENDOPERATION_MINIMUM      = C.SDL_BLENDOPERATION_MINIMUM
  constant BLENDOPERATION_MAXIMUM (line 92) | BLENDOPERATION_MAXIMUM      = C.SDL_BLENDOPERATION_MAXIMUM
  type BlendFactor (line 97) | type BlendFactor
  constant BLENDFACTOR_ZERO (line 100) | BLENDFACTOR_ZERO                = C.SDL_BLENDFACTOR_ZERO
  constant BLENDFACTOR_ONE (line 101) | BLENDFACTOR_ONE                 = C.SDL_BLENDFACTOR_ONE
  constant BLENDFACTOR_SRC_COLOR (line 102) | BLENDFACTOR_SRC_COLOR           = C.SDL_BLENDFACTOR_SRC_COLOR
  constant BLENDFACTOR_ONE_MINUS_SRC_COLOR (line 103) | BLENDFACTOR_ONE_MINUS_SRC_COLOR = C.SDL_BLENDFACTOR_ONE_MINUS_SRC_COLOR
  constant BLENDFACTOR_SRC_ALPHA (line 104) | BLENDFACTOR_SRC_ALPHA           = C.SDL_BLENDFACTOR_SRC_ALPHA
  constant BLENDFACTOR_ONE_MINUS_SRC_ALPHA (line 105) | BLENDFACTOR_ONE_MINUS_SRC_ALPHA = C.SDL_BLENDFACTOR_ONE_MINUS_SRC_ALPHA
  constant BLENDFACTOR_DST_COLOR (line 106) | BLENDFACTOR_DST_COLOR           = C.SDL_BLENDFACTOR_DST_COLOR
  constant BLENDFACTOR_ONE_MINUS_DST_COLOR (line 107) | BLENDFACTOR_ONE_MINUS_DST_COLOR = C.SDL_BLENDFACTOR_ONE_MINUS_DST_COLOR
  constant BLENDFACTOR_DST_ALPHA (line 108) | BLENDFACTOR_DST_ALPHA           = C.SDL_BLENDFACTOR_DST_ALPHA
  constant BLENDFACTOR_ONE_MINUS_DST_ALPHA (line 109) | BLENDFACTOR_ONE_MINUS_DST_ALPHA = C.SDL_BLENDFACTOR_ONE_MINUS_DST_ALPHA
  function ComposeCustomBlendMode (line 118) | func ComposeCustomBlendMode(srcColorFactor, dstColorFactor BlendFactor, ...

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/clipboard.go
  function SetClipboardText (line 9) | func SetClipboardText(text string) error {
  function GetClipboardText (line 20) | func GetClipboardText() (string, error) {
  function HasClipboardText (line 32) | func HasClipboardText() bool {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/cpuinfo.go
  constant CACHELINE_SIZE (line 102) | CACHELINE_SIZE = C.SDL_CACHELINE_SIZE
  function GetCPUCount (line 106) | func GetCPUCount() int {
  function GetCPUCacheLineSize (line 112) | func GetCPUCacheLineSize() int {
  function HasRDTSC (line 118) | func HasRDTSC() bool {
  function HasAltiVec (line 124) | func HasAltiVec() bool {
  function HasMMX (line 130) | func HasMMX() bool {
  function Has3DNow (line 136) | func Has3DNow() bool {
  function HasSSE (line 142) | func HasSSE() bool {
  function HasSSE2 (line 148) | func HasSSE2() bool {
  function HasSSE3 (line 154) | func HasSSE3() bool {
  function HasSSE41 (line 160) | func HasSSE41() bool {
  function HasSSE42 (line 166) | func HasSSE42() bool {
  function GetSystemRAM (line 172) | func GetSystemRAM() int {
  function HasAVX (line 178) | func HasAVX() bool {
  function HasAVX512F (line 184) | func HasAVX512F() bool {
  function HasAVX2 (line 190) | func HasAVX2() bool {
  function HasNEON (line 196) | func HasNEON() bool {
  function SIMDGetAlignment (line 202) | func SIMDGetAlignment() int {
  function SIMDAlloc (line 208) | func SIMDAlloc(_len int) unsafe.Pointer {
  function SIMDFree (line 214) | func SIMDFree(p unsafe.Pointer) {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/endian.go
  constant BYTEORDER (line 9) | BYTEORDER  = C.SDL_BYTEORDER
  constant LIL_ENDIAN (line 10) | LIL_ENDIAN = C.SDL_LIL_ENDIAN
  constant BIG_ENDIAN (line 11) | BIG_ENDIAN = C.SDL_BIG_ENDIAN

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/error.go
  constant ENOMEM (line 20) | ENOMEM      ErrorCode = C.SDL_ENOMEM
  constant EFREAD (line 21) | EFREAD                = C.SDL_EFREAD
  constant EFWRITE (line 22) | EFWRITE               = C.SDL_EFWRITE
  constant EFSEEK (line 23) | EFSEEK                = C.SDL_EFSEEK
  constant UNSUPPORTED (line 24) | UNSUPPORTED           = C.SDL_UNSUPPORTED
  constant LASTERROR (line 25) | LASTERROR             = C.SDL_LASTERROR
  type ErrorCode (line 29) | type ErrorCode
    method c (line 32) | func (ec ErrorCode) c() C.SDL_errorcode {
  type cErrorCode (line 30) | type cErrorCode
  function GetError (line 38) | func GetError() error {
  function SetError (line 51) | func SetError(err error) {
  function ClearError (line 61) | func ClearError() {
  function Error (line 66) | func Error(code ErrorCode) {
  function OutOfMemory (line 71) | func OutOfMemory() {
  function Unsupported (line 76) | func Unsupported() {
  function errorFromInt (line 81) | func errorFromInt(code int) (err error) {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/events.c
  function setEventFilter (line 6) | void setEventFilter()
  function clearEventFilter (line 11) | void clearEventFilter()
  function filterEvents (line 16) | void filterEvents(void *userdata)
  function addEventWatch (line 21) | void addEventWatch(void *userdata)
  function delEventWatch (line 26) | void delEventWatch(void *userdata)
  function PollEvent (line 31) | int PollEvent()

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/events.go
  constant FIRSTEVENT (line 212) | FIRSTEVENT = C.SDL_FIRSTEVENT
  constant QUIT (line 215) | QUIT = C.SDL_QUIT
  constant APP_TERMINATING (line 218) | APP_TERMINATING         = C.SDL_APP_TERMINATING
  constant APP_LOWMEMORY (line 219) | APP_LOWMEMORY           = C.SDL_APP_LOWMEMORY
  constant APP_WILLENTERBACKGROUND (line 220) | APP_WILLENTERBACKGROUND = C.SDL_APP_WILLENTERBACKGROUND
  constant APP_DIDENTERBACKGROUND (line 221) | APP_DIDENTERBACKGROUND  = C.SDL_APP_DIDENTERBACKGROUND
  constant APP_WILLENTERFOREGROUND (line 222) | APP_WILLENTERFOREGROUND = C.SDL_APP_WILLENTERFOREGROUND
  constant APP_DIDENTERFOREGROUND (line 223) | APP_DIDENTERFOREGROUND  = C.SDL_APP_DIDENTERFOREGROUND
  constant DISPLAYEVENT (line 226) | DISPLAYEVENT = C.SDL_DISPLAYEVENT
  constant WINDOWEVENT (line 229) | WINDOWEVENT = C.SDL_WINDOWEVENT
  constant SYSWMEVENT (line 230) | SYSWMEVENT  = C.SDL_SYSWMEVENT
  constant KEYDOWN (line 233) | KEYDOWN         = C.SDL_KEYDOWN
  constant KEYUP (line 234) | KEYUP           = C.SDL_KEYUP
  constant TEXTEDITING (line 235) | TEXTEDITING     = C.SDL_TEXTEDITING
  constant TEXTINPUT (line 236) | TEXTINPUT       = C.SDL_TEXTINPUT
  constant TEXTEDITING_EXT (line 237) | TEXTEDITING_EXT = C.SDL_TEXTEDITING_EXT
  constant KEYMAPCHANGED (line 238) | KEYMAPCHANGED   = C.SDL_KEYMAPCHANGED
  constant MOUSEMOTION (line 241) | MOUSEMOTION     = C.SDL_MOUSEMOTION
  constant MOUSEBUTTONDOWN (line 242) | MOUSEBUTTONDOWN = C.SDL_MOUSEBUTTONDOWN
  constant MOUSEBUTTONUP (line 243) | MOUSEBUTTONUP   = C.SDL_MOUSEBUTTONUP
  constant MOUSEWHEEL (line 244) | MOUSEWHEEL      = C.SDL_MOUSEWHEEL
  constant JOYAXISMOTION (line 247) | JOYAXISMOTION    = C.SDL_JOYAXISMOTION
  constant JOYBALLMOTION (line 248) | JOYBALLMOTION    = C.SDL_JOYBALLMOTION
  constant JOYHATMOTION (line 249) | JOYHATMOTION     = C.SDL_JOYHATMOTION
  constant JOYBUTTONDOWN (line 250) | JOYBUTTONDOWN    = C.SDL_JOYBUTTONDOWN
  constant JOYBUTTONUP (line 251) | JOYBUTTONUP      = C.SDL_JOYBUTTONUP
  constant JOYDEVICEADDED (line 252) | JOYDEVICEADDED   = C.SDL_JOYDEVICEADDED
  constant JOYDEVICEREMOVED (line 253) | JOYDEVICEREMOVED = C.SDL_JOYDEVICEREMOVED
  constant CONTROLLERAXISMOTION (line 256) | CONTROLLERAXISMOTION     = C.SDL_CONTROLLERAXISMOTION
  constant CONTROLLERBUTTONDOWN (line 257) | CONTROLLERBUTTONDOWN     = C.SDL_CONTROLLERBUTTONDOWN
  constant CONTROLLERBUTTONUP (line 258) | CONTROLLERBUTTONUP       = C.SDL_CONTROLLERBUTTONUP
  constant CONTROLLERDEVICEADDED (line 259) | CONTROLLERDEVICEADDED    = C.SDL_CONTROLLERDEVICEADDED
  constant CONTROLLERDEVICEREMOVED (line 260) | CONTROLLERDEVICEREMOVED  = C.SDL_CONTROLLERDEVICEREMOVED
  constant CONTROLLERDEVICEREMAPPED (line 261) | CONTROLLERDEVICEREMAPPED = C.SDL_CONTROLLERDEVICEREMAPPED
  constant FINGERDOWN (line 264) | FINGERDOWN   = C.SDL_FINGERDOWN
  constant FINGERUP (line 265) | FINGERUP     = C.SDL_FINGERUP
  constant FINGERMOTION (line 266) | FINGERMOTION = C.SDL_FINGERMOTION
  constant DOLLARGESTURE (line 269) | DOLLARGESTURE = C.SDL_DOLLARGESTURE
  constant DOLLARRECORD (line 270) | DOLLARRECORD  = C.SDL_DOLLARRECORD
  constant MULTIGESTURE (line 271) | MULTIGESTURE  = C.SDL_MULTIGESTURE
  constant CLIPBOARDUPDATE (line 274) | CLIPBOARDUPDATE = C.SDL_CLIPBOARDUPDATE
  constant DROPFILE (line 277) | DROPFILE     = C.SDL_DROPFILE
  constant DROPTEXT (line 278) | DROPTEXT     = C.SDL_DROPTEXT
  constant DROPBEGIN (line 279) | DROPBEGIN    = C.SDL_DROPBEGIN
  constant DROPCOMPLETE (line 280) | DROPCOMPLETE = C.SDL_DROPCOMPLETE
  constant AUDIODEVICEADDED (line 283) | AUDIODEVICEADDED   = C.SDL_AUDIODEVICEADDED
  constant AUDIODEVICEREMOVED (line 284) | AUDIODEVICEREMOVED = C.SDL_AUDIODEVICEREMOVED
  constant SENSORUPDATE (line 287) | SENSORUPDATE = C.SDL_SENSORUPDATE
  constant RENDER_TARGETS_RESET (line 290) | RENDER_TARGETS_RESET = C.SDL_RENDER_TARGETS_RESET
  constant RENDER_DEVICE_RESET (line 291) | RENDER_DEVICE_RESET  = C.SDL_RENDER_DEVICE_RESET
  constant USEREVENT (line 294) | USEREVENT = C.SDL_USEREVENT
  constant LASTEVENT (line 295) | LASTEVENT = C.SDL_LASTEVENT
  constant ADDEVENT (line 301) | ADDEVENT  = C.SDL_ADDEVENT
  constant PEEKEVENT (line 302) | PEEKEVENT = C.SDL_PEEKEVENT
  constant GETEVENT (line 303) | GETEVENT  = C.SDL_GETEVENT
  constant QUERY (line 308) | QUERY   = C.SDL_QUERY
  constant IGNORE (line 309) | IGNORE  = C.SDL_IGNORE
  constant DISABLE (line 310) | DISABLE = C.SDL_DISABLE
  constant ENABLE (line 311) | ENABLE  = C.SDL_ENABLE
  type Event (line 316) | type Event interface
  type CEvent (line 323) | type CEvent struct
  type CommonEvent (line 330) | type CommonEvent struct
    method GetType (line 336) | func (e *CommonEvent) GetType() uint32 {
    method GetTimestamp (line 341) | func (e *CommonEvent) GetTimestamp() uint32 {
  type DisplayEvent (line 347) | type DisplayEvent struct
    method GetType (line 359) | func (e *DisplayEvent) GetType() uint32 {
    method GetTimestamp (line 364) | func (e *DisplayEvent) GetTimestamp() uint32 {
  type WindowEvent (line 370) | type WindowEvent struct
    method GetType (line 384) | func (e *WindowEvent) GetType() uint32 {
    method GetTimestamp (line 389) | func (e *WindowEvent) GetTimestamp() uint32 {
  type cWindowEvent (line 381) | type cWindowEvent
  type KeyboardEvent (line 395) | type KeyboardEvent struct
    method GetType (line 408) | func (e *KeyboardEvent) GetType() uint32 {
    method GetTimestamp (line 413) | func (e *KeyboardEvent) GetTimestamp() uint32 {
  type cKeyboardEvent (line 405) | type cKeyboardEvent
  type TextEditingEvent (line 419) | type TextEditingEvent struct
    method GetType (line 430) | func (e *TextEditingEvent) GetType() uint32 {
    method GetText (line 435) | func (e *TextEditingEvent) GetText() string {
    method GetTimestamp (line 451) | func (e *TextEditingEvent) GetTimestamp() uint32 {
  type cTextEditingEvent (line 427) | type cTextEditingEvent
  type TextInputEvent (line 457) | type TextInputEvent struct
    method GetType (line 466) | func (e *TextInputEvent) GetType() uint32 {
    method GetTimestamp (line 471) | func (e *TextInputEvent) GetTimestamp() uint32 {
    method GetText (line 476) | func (e *TextInputEvent) GetText() string {
  type cTextInputEvent (line 463) | type cTextInputEvent
  type MouseMotionEvent (line 493) | type MouseMotionEvent struct
    method GetType (line 507) | func (e *MouseMotionEvent) GetType() uint32 {
    method GetTimestamp (line 512) | func (e *MouseMotionEvent) GetTimestamp() uint32 {
  type cMouseMotionEvent (line 504) | type cMouseMotionEvent
  type MouseButtonEvent (line 518) | type MouseButtonEvent struct
    method GetType (line 533) | func (e *MouseButtonEvent) GetType() uint32 {
    method GetTimestamp (line 538) | func (e *MouseButtonEvent) GetTimestamp() uint32 {
  type cMouseButtonEvent (line 530) | type cMouseButtonEvent
  type MouseWheelEvent (line 544) | type MouseWheelEvent struct
    method GetType (line 558) | func (e *MouseWheelEvent) GetType() uint32 {
    method GetTimestamp (line 563) | func (e *MouseWheelEvent) GetTimestamp() uint32 {
  type cMouseWheelEvent (line 555) | type cMouseWheelEvent
  type JoyAxisEvent (line 569) | type JoyAxisEvent struct
    method GetType (line 583) | func (e *JoyAxisEvent) GetType() uint32 {
    method GetTimestamp (line 588) | func (e *JoyAxisEvent) GetTimestamp() uint32 {
  type cJoyAxisEvent (line 580) | type cJoyAxisEvent
  type JoyBallEvent (line 594) | type JoyBallEvent struct
    method GetType (line 608) | func (e *JoyBallEvent) GetType() uint32 {
    method GetTimestamp (line 613) | func (e *JoyBallEvent) GetTimestamp() uint32 {
  type cJoyBallEvent (line 605) | type cJoyBallEvent
  type JoyHatEvent (line 619) | type JoyHatEvent struct
    method GetType (line 631) | func (e *JoyHatEvent) GetType() uint32 {
    method GetTimestamp (line 636) | func (e *JoyHatEvent) GetTimestamp() uint32 {
  type cJoyHatEvent (line 628) | type cJoyHatEvent
  type JoyButtonEvent (line 642) | type JoyButtonEvent struct
    method GetType (line 654) | func (e *JoyButtonEvent) GetType() uint32 {
    method GetTimestamp (line 659) | func (e *JoyButtonEvent) GetTimestamp() uint32 {
  type cJoyButtonEvent (line 651) | type cJoyButtonEvent
  type JoyDeviceAddedEvent (line 665) | type JoyDeviceAddedEvent struct
    method GetType (line 672) | func (e *JoyDeviceAddedEvent) GetType() uint32 {
    method GetTimestamp (line 677) | func (e *JoyDeviceAddedEvent) GetTimestamp() uint32 {
  type JoyDeviceRemovedEvent (line 683) | type JoyDeviceRemovedEvent struct
    method GetType (line 690) | func (e *JoyDeviceRemovedEvent) GetType() uint32 {
    method GetTimestamp (line 695) | func (e *JoyDeviceRemovedEvent) GetTimestamp() uint32 {
  type ControllerAxisEvent (line 701) | type ControllerAxisEvent struct
    method GetType (line 715) | func (e *ControllerAxisEvent) GetType() uint32 {
    method GetTimestamp (line 720) | func (e *ControllerAxisEvent) GetTimestamp() uint32 {
  type cControllerAxisEvent (line 712) | type cControllerAxisEvent
  type ControllerButtonEvent (line 726) | type ControllerButtonEvent struct
    method GetType (line 738) | func (e *ControllerButtonEvent) GetType() uint32 {
    method GetTimestamp (line 743) | func (e *ControllerButtonEvent) GetTimestamp() uint32 {
  type cControllerButtonEvent (line 735) | type cControllerButtonEvent
  type ControllerDeviceEvent (line 749) | type ControllerDeviceEvent struct
    method GetType (line 757) | func (e *ControllerDeviceEvent) GetType() uint32 {
    method GetTimestamp (line 762) | func (e *ControllerDeviceEvent) GetTimestamp() uint32 {
  type cControllerDeviceEvent (line 754) | type cControllerDeviceEvent
  type AudioDeviceEvent (line 768) | type AudioDeviceEvent struct
    method GetType (line 780) | func (e *AudioDeviceEvent) GetType() uint32 {
    method GetTimestamp (line 785) | func (e *AudioDeviceEvent) GetTimestamp() uint32 {
  type cAudioDeviceEvent (line 777) | type cAudioDeviceEvent
  type TouchFingerEvent (line 791) | type TouchFingerEvent struct
    method GetType (line 805) | func (e *TouchFingerEvent) GetType() uint32 {
    method GetTimestamp (line 810) | func (e *TouchFingerEvent) GetTimestamp() uint32 {
  type cTouchFingerEvent (line 802) | type cTouchFingerEvent
  type MultiGestureEvent (line 816) | type MultiGestureEvent struct
    method GetType (line 830) | func (e *MultiGestureEvent) GetType() uint32 {
    method GetTimestamp (line 835) | func (e *MultiGestureEvent) GetTimestamp() uint32 {
  type cMultiGestureEvent (line 827) | type cMultiGestureEvent
  type DollarGestureEvent (line 841) | type DollarGestureEvent struct
    method GetType (line 854) | func (e *DollarGestureEvent) GetType() uint32 {
    method GetTimestamp (line 859) | func (e *DollarGestureEvent) GetTimestamp() uint32 {
  type cDollarGestureEvent (line 851) | type cDollarGestureEvent
  type DropEvent (line 865) | type DropEvent struct
    method GetType (line 881) | func (e *DropEvent) GetType() uint32 {
    method GetTimestamp (line 886) | func (e *DropEvent) GetTimestamp() uint32 {
  type tDropEvent (line 872) | type tDropEvent struct
  type cDropEvent (line 878) | type cDropEvent
  type SensorEvent (line 892) | type SensorEvent struct
    method GetType (line 901) | func (e *SensorEvent) GetType() uint32 {
    method GetTimestamp (line 906) | func (e *SensorEvent) GetTimestamp() uint32 {
  type cSensorEvent (line 898) | type cSensorEvent
  type RenderEvent (line 912) | type RenderEvent struct
    method GetType (line 918) | func (e *RenderEvent) GetType() uint32 {
    method GetTimestamp (line 923) | func (e *RenderEvent) GetTimestamp() uint32 {
  type QuitEvent (line 929) | type QuitEvent struct
    method GetType (line 935) | func (e *QuitEvent) GetType() uint32 {
    method GetTimestamp (line 940) | func (e *QuitEvent) GetTimestamp() uint32 {
  type OSEvent (line 945) | type OSEvent struct
    method GetType (line 951) | func (e *OSEvent) GetType() uint32 {
    method GetTimestamp (line 956) | func (e *OSEvent) GetTimestamp() uint32 {
  type ClipboardEvent (line 962) | type ClipboardEvent struct
    method GetType (line 968) | func (e *ClipboardEvent) GetType() uint32 {
    method GetTimestamp (line 973) | func (e *ClipboardEvent) GetTimestamp() uint32 {
  type UserEvent (line 979) | type UserEvent struct
    method GetType (line 990) | func (e *UserEvent) GetType() uint32 {
    method GetTimestamp (line 995) | func (e *UserEvent) GetTimestamp() uint32 {
  type cUserEvent (line 987) | type cUserEvent
  type SysWMEvent (line 1001) | type SysWMEvent struct
    method GetType (line 1009) | func (e *SysWMEvent) GetType() uint32 {
    method GetTimestamp (line 1014) | func (e *SysWMEvent) GetTimestamp() uint32 {
  type cSysWMEvent (line 1006) | type cSysWMEvent
  type EventAction (line 1020) | type EventAction
    method c (line 1039) | func (action EventAction) c() C.SDL_eventaction {
  type EventFilter (line 1024) | type EventFilter interface
  type eventFilterFunc (line 1028) | type eventFilterFunc
    method FilterEvent (line 1224) | func (ef eventFilterFunc) FilterEvent(e Event, userdata interface{}) b...
  type eventFilterCallbackContext (line 1030) | type eventFilterCallbackContext struct
    method cptr (line 1245) | func (e *eventFilterCallbackContext) cptr() unsafe.Pointer {
  type EventWatchHandle (line 1037) | type EventWatchHandle
  function PumpEvents (line 1045) | func PumpEvents() {
  function PeepEvents (line 1051) | func PeepEvents(events []Event, action EventAction, minType, maxType uin...
  function HasEvent (line 1082) | func HasEvent(type_ uint32) bool {
  function HasEvents (line 1088) | func HasEvents(minType, maxType uint32) bool {
  function FlushEvent (line 1094) | func FlushEvent(type_ uint32) {
  function FlushEvents (line 1100) | func FlushEvents(minType, maxType uint32) {
  function PollEvent (line 1106) | func PollEvent() Event {
  function goEvent (line 1114) | func goEvent(cevent *CEvent) Event {
  function cEvent (line 1182) | func cEvent(event Event) *CEvent {
  function WaitEventTimeout (line 1190) | func WaitEventTimeout(timeout int) Event {
  function WaitEvent (line 1202) | func WaitEvent() Event {
  function PushEvent (line 1214) | func PushEvent(event Event) (filtered bool, err error) {
  function newEventFilterCallbackContext (line 1228) | func newEventFilterCallbackContext(filter EventFilter, userdata interfac...
  function goSetEventFilterCallback (line 1250) | func goSetEventFilterCallback(data unsafe.Pointer, e *C.SDL_Event) C.int {
  function goEventFilterCallback (line 1260) | func goEventFilterCallback(userdata unsafe.Pointer, e *C.SDL_Event) C.int {
  function wrapEventFilterCallback (line 1270) | func wrapEventFilterCallback(filter EventFilter, e *C.SDL_Event, userdat...
  function SetEventFilter (line 1282) | func SetEventFilter(filter EventFilter, userdata interface{}) {
  function SetEventFilterFunc (line 1303) | func SetEventFilterFunc(filterFunc eventFilterFunc, userdata interface{}) {
  function GetEventFilter (line 1309) | func GetEventFilter() EventFilter {
  function isCEventFilterSet (line 1313) | func isCEventFilterSet() bool {
  function FilterEvents (line 1319) | func FilterEvents(filter EventFilter, userdata interface{}) {
  function FilterEventsFunc (line 1326) | func FilterEventsFunc(filter eventFilterFunc, userdata interface{}) {
  function AddEventWatch (line 1332) | func AddEventWatch(filter EventFilter, userdata interface{}) EventWatchH...
  function AddEventWatchFunc (line 1340) | func AddEventWatchFunc(filterFunc eventFilterFunc, userdata interface{})...
  function DelEventWatch (line 1346) | func DelEventWatch(handle EventWatchHandle) {
  function EventState (line 1357) | func EventState(type_ uint32, state int) uint8 {
  function GetEventState (line 1363) | func GetEventState(type_ uint32) uint8 {
  function RegisterEvents (line 1369) | func RegisterEvents(numEvents int) uint32 {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/filesystem.go
  function GetBasePath (line 34) | func GetBasePath() string {
  function GetPrefPath (line 42) | func GetPrefPath(org, app string) string {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/gamecontroller.go
  constant CONTROLLER_BINDTYPE_NONE (line 281) | CONTROLLER_BINDTYPE_NONE   = C.SDL_CONTROLLER_BINDTYPE_NONE
  constant CONTROLLER_BINDTYPE_BUTTON (line 282) | CONTROLLER_BINDTYPE_BUTTON = C.SDL_CONTROLLER_BINDTYPE_BUTTON
  constant CONTROLLER_BINDTYPE_AXIS (line 283) | CONTROLLER_BINDTYPE_AXIS   = C.SDL_CONTROLLER_BINDTYPE_AXIS
  constant CONTROLLER_BINDTYPE_HAT (line 284) | CONTROLLER_BINDTYPE_HAT    = C.SDL_CONTROLLER_BINDTYPE_HAT
  constant CONTROLLER_AXIS_INVALID (line 290) | CONTROLLER_AXIS_INVALID      = C.SDL_CONTROLLER_AXIS_INVALID
  constant CONTROLLER_AXIS_LEFTX (line 291) | CONTROLLER_AXIS_LEFTX        = C.SDL_CONTROLLER_AXIS_LEFTX
  constant CONTROLLER_AXIS_LEFTY (line 292) | CONTROLLER_AXIS_LEFTY        = C.SDL_CONTROLLER_AXIS_LEFTY
  constant CONTROLLER_AXIS_RIGHTX (line 293) | CONTROLLER_AXIS_RIGHTX       = C.SDL_CONTROLLER_AXIS_RIGHTX
  constant CONTROLLER_AXIS_RIGHTY (line 294) | CONTROLLER_AXIS_RIGHTY       = C.SDL_CONTROLLER_AXIS_RIGHTY
  constant CONTROLLER_AXIS_TRIGGERLEFT (line 295) | CONTROLLER_AXIS_TRIGGERLEFT  = C.SDL_CONTROLLER_AXIS_TRIGGERLEFT
  constant CONTROLLER_AXIS_TRIGGERRIGHT (line 296) | CONTROLLER_AXIS_TRIGGERRIGHT = C.SDL_CONTROLLER_AXIS_TRIGGERRIGHT
  constant CONTROLLER_AXIS_MAX (line 297) | CONTROLLER_AXIS_MAX          = C.SDL_CONTROLLER_AXIS_MAX
  constant CONTROLLER_BUTTON_INVALID (line 303) | CONTROLLER_BUTTON_INVALID       = C.SDL_CONTROLLER_BUTTON_INVALID
  constant CONTROLLER_BUTTON_A (line 304) | CONTROLLER_BUTTON_A             = C.SDL_CONTROLLER_BUTTON_A
  constant CONTROLLER_BUTTON_B (line 305) | CONTROLLER_BUTTON_B             = C.SDL_CONTROLLER_BUTTON_B
  constant CONTROLLER_BUTTON_X (line 306) | CONTROLLER_BUTTON_X             = C.SDL_CONTROLLER_BUTTON_X
  constant CONTROLLER_BUTTON_Y (line 307) | CONTROLLER_BUTTON_Y             = C.SDL_CONTROLLER_BUTTON_Y
  constant CONTROLLER_BUTTON_BACK (line 308) | CONTROLLER_BUTTON_BACK          = C.SDL_CONTROLLER_BUTTON_BACK
  constant CONTROLLER_BUTTON_GUIDE (line 309) | CONTROLLER_BUTTON_GUIDE         = C.SDL_CONTROLLER_BUTTON_GUIDE
  constant CONTROLLER_BUTTON_START (line 310) | CONTROLLER_BUTTON_START         = C.SDL_CONTROLLER_BUTTON_START
  constant CONTROLLER_BUTTON_LEFTSTICK (line 311) | CONTROLLER_BUTTON_LEFTSTICK     = C.SDL_CONTROLLER_BUTTON_LEFTSTICK
  constant CONTROLLER_BUTTON_RIGHTSTICK (line 312) | CONTROLLER_BUTTON_RIGHTSTICK    = C.SDL_CONTROLLER_BUTTON_RIGHTSTICK
  constant CONTROLLER_BUTTON_LEFTSHOULDER (line 313) | CONTROLLER_BUTTON_LEFTSHOULDER  = C.SDL_CONTROLLER_BUTTON_LEFTSHOULDER
  constant CONTROLLER_BUTTON_RIGHTSHOULDER (line 314) | CONTROLLER_BUTTON_RIGHTSHOULDER = C.SDL_CONTROLLER_BUTTON_RIGHTSHOULDER
  constant CONTROLLER_BUTTON_DPAD_UP (line 315) | CONTROLLER_BUTTON_DPAD_UP       = C.SDL_CONTROLLER_BUTTON_DPAD_UP
  constant CONTROLLER_BUTTON_DPAD_DOWN (line 316) | CONTROLLER_BUTTON_DPAD_DOWN     = C.SDL_CONTROLLER_BUTTON_DPAD_DOWN
  constant CONTROLLER_BUTTON_DPAD_LEFT (line 317) | CONTROLLER_BUTTON_DPAD_LEFT     = C.SDL_CONTROLLER_BUTTON_DPAD_LEFT
  constant CONTROLLER_BUTTON_DPAD_RIGHT (line 318) | CONTROLLER_BUTTON_DPAD_RIGHT    = C.SDL_CONTROLLER_BUTTON_DPAD_RIGHT
  constant CONTROLLER_BUTTON_MAX (line 319) | CONTROLLER_BUTTON_MAX           = C.SDL_CONTROLLER_BUTTON_MAX
  type GameControllerBindType (line 323) | type GameControllerBindType
  type GameControllerAxis (line 327) | type GameControllerAxis
    method c (line 343) | func (axis GameControllerAxis) c() C.SDL_GameControllerAxis {
  type GameControllerButton (line 331) | type GameControllerButton
    method c (line 347) | func (btn GameControllerButton) c() C.SDL_GameControllerButton {
  type GameController (line 334) | type GameController
    method cptr (line 339) | func (ctrl *GameController) cptr() *C.SDL_GameController {
    method Name (line 412) | func (ctrl *GameController) Name() string {
    method PlayerIndex (line 418) | func (ctrl *GameController) PlayerIndex() int {
    method Vendor (line 423) | func (ctrl *GameController) Vendor() int {
    method Product (line 428) | func (ctrl *GameController) Product() int {
    method ProductVersion (line 433) | func (ctrl *GameController) ProductVersion() int {
    method Attached (line 439) | func (ctrl *GameController) Attached() bool {
    method Mapping (line 445) | func (ctrl *GameController) Mapping() string {
    method Joystick (line 453) | func (ctrl *GameController) Joystick() *Joystick {
    method BindForAxis (line 485) | func (ctrl *GameController) BindForAxis(axis GameControllerAxis) GameC...
    method Axis (line 491) | func (ctrl *GameController) Axis(axis GameControllerAxis) int16 {
    method BindForButton (line 511) | func (ctrl *GameController) BindForButton(btn GameControllerButton) Ga...
    method Rumble (line 525) | func (ctrl *GameController) Rumble(lowFrequencyRumble, highFrequencyRu...
    method Button (line 531) | func (ctrl *GameController) Button(btn GameControllerButton) byte {
    method Close (line 537) | func (ctrl *GameController) Close() {
    method SendEffect (line 572) | func (ctrl *GameController) SendEffect(data []byte) (err error) {
    method SensorDataRate (line 579) | func (ctrl *GameController) SensorDataRate(typ SensorType) (rate float...
    method HasRumble (line 585) | func (ctrl *GameController) HasRumble() bool {
    method HasRumbleTriggers (line 591) | func (ctrl *GameController) HasRumbleTriggers() bool {
    method GetAppleSFSymbolsNameForButton (line 597) | func (ctrl *GameController) GetAppleSFSymbolsNameForButton(button Game...
    method SDL_GameControllerGetAppleSFSymbolsNameForAxis (line 606) | func (ctrl *GameController) SDL_GameControllerGetAppleSFSymbolsNameFor...
  type GameControllerButtonBind (line 337) | type GameControllerButtonBind
    method Type (line 542) | func (bind *GameControllerButtonBind) Type() int {
    method Button (line 547) | func (bind *GameControllerButtonBind) Button() int {
    method Axis (line 553) | func (bind *GameControllerButtonBind) Axis() int {
    method Hat (line 559) | func (bind *GameControllerButtonBind) Hat() int {
    method HatMask (line 565) | func (bind *GameControllerButtonBind) HatMask() int {
  function GameControllerAddMapping (line 353) | func GameControllerAddMapping(mappingString string) int {
  function GameControllerNumMappings (line 360) | func GameControllerNumMappings() int {
  function GameControllerMappingForIndex (line 365) | func GameControllerMappingForIndex(index int) string {
  function GameControllerMappingForGUID (line 373) | func GameControllerMappingForGUID(guid JoystickGUID) string {
  function IsGameController (line 381) | func IsGameController(index int) bool {
  function GameControllerNameForIndex (line 387) | func GameControllerNameForIndex(index int) string {
  function GameControllerMappingForDeviceIndex (line 392) | func GameControllerMappingForDeviceIndex(index int) string {
  function GameControllerOpen (line 400) | func GameControllerOpen(index int) *GameController {
  function GameControllerFromInstanceID (line 406) | func GameControllerFromInstanceID(joyid JoystickID) *GameController {
  function GameControllerEventState (line 459) | func GameControllerEventState(state int) int {
  function GameControllerUpdate (line 465) | func GameControllerUpdate() {
  function GameControllerGetAxisFromString (line 471) | func GameControllerGetAxisFromString(pchString string) GameControllerAxis {
  function GameControllerGetStringForAxis (line 479) | func GameControllerGetStringForAxis(axis GameControllerAxis) string {
  function GameControllerGetButtonFromString (line 497) | func GameControllerGetButtonFromString(pchString string) GameControllerB...
  function GameControllerGetStringForButton (line 505) | func GameControllerGetStringForButton(btn GameControllerButton) string {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/gesture.go
  type GestureID (line 7) | type GestureID
    method c (line 9) | func (g GestureID) c() C.SDL_GestureID {
  function RecordGesture (line 15) | func RecordGesture(t TouchID) int {
  function SaveAllDollarTemplates (line 21) | func SaveAllDollarTemplates(src *RWops) int {
  function SaveDollarTemplate (line 27) | func SaveDollarTemplate(g GestureID, src *RWops) int {
  function LoadDollarTemplates (line 33) | func LoadDollarTemplates(t TouchID, src *RWops) int {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/guid.go
  type GUID (line 33) | type GUID
    method ToString (line 36) | func (guid GUID) ToString() (ascii string) {
  function GUIDFromString (line 45) | func GUIDFromString(ascii string) (guid GUID) {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/haptic.go
  constant HAPTIC_CONSTANT (line 10) | HAPTIC_CONSTANT     = C.SDL_HAPTIC_CONSTANT
  constant HAPTIC_SINE (line 11) | HAPTIC_SINE         = C.SDL_HAPTIC_SINE
  constant HAPTIC_LEFTRIGHT (line 12) | HAPTIC_LEFTRIGHT    = C.SDL_HAPTIC_LEFTRIGHT
  constant HAPTIC_TRIANGLE (line 13) | HAPTIC_TRIANGLE     = C.SDL_HAPTIC_TRIANGLE
  constant HAPTIC_SAWTOOTHUP (line 14) | HAPTIC_SAWTOOTHUP   = C.SDL_HAPTIC_SAWTOOTHUP
  constant HAPTIC_SAWTOOTHDOWN (line 15) | HAPTIC_SAWTOOTHDOWN = C.SDL_HAPTIC_SAWTOOTHDOWN
  constant HAPTIC_RAMP (line 16) | HAPTIC_RAMP         = C.SDL_HAPTIC_RAMP
  constant HAPTIC_SPRING (line 17) | HAPTIC_SPRING       = C.SDL_HAPTIC_SPRING
  constant HAPTIC_DAMPER (line 18) | HAPTIC_DAMPER       = C.SDL_HAPTIC_DAMPER
  constant HAPTIC_INERTIA (line 19) | HAPTIC_INERTIA      = C.SDL_HAPTIC_INERTIA
  constant HAPTIC_FRICTION (line 20) | HAPTIC_FRICTION     = C.SDL_HAPTIC_FRICTION
  constant HAPTIC_CUSTOM (line 21) | HAPTIC_CUSTOM       = C.SDL_HAPTIC_CUSTOM
  constant HAPTIC_GAIN (line 22) | HAPTIC_GAIN         = C.SDL_HAPTIC_GAIN
  constant HAPTIC_AUTOCENTER (line 23) | HAPTIC_AUTOCENTER   = C.SDL_HAPTIC_AUTOCENTER
  constant HAPTIC_STATUS (line 24) | HAPTIC_STATUS       = C.SDL_HAPTIC_STATUS
  constant HAPTIC_PAUSE (line 25) | HAPTIC_PAUSE        = C.SDL_HAPTIC_PAUSE
  constant HAPTIC_POLAR (line 32) | HAPTIC_POLAR     = C.SDL_HAPTIC_POLAR
  constant HAPTIC_CARTESIAN (line 33) | HAPTIC_CARTESIAN = C.SDL_HAPTIC_CARTESIAN
  constant HAPTIC_SPHERICAL (line 34) | HAPTIC_SPHERICAL = C.SDL_HAPTIC_SPHERICAL
  constant HAPTIC_INFINITY (line 35) | HAPTIC_INFINITY  = C.SDL_HAPTIC_INFINITY
  type Haptic (line 40) | type Haptic
    method cptr (line 176) | func (h *Haptic) cptr() *C.SDL_Haptic {
    method Close (line 260) | func (h *Haptic) Close() {
    method NumAxes (line 266) | func (h *Haptic) NumAxes() (int, error) {
    method NumEffects (line 273) | func (h *Haptic) NumEffects() (int, error) {
    method NumEffectsPlaying (line 280) | func (h *Haptic) NumEffectsPlaying() (int, error) {
    method Query (line 287) | func (h *Haptic) Query() (uint32, error) {
    method EffectSupported (line 298) | func (h *Haptic) EffectSupported(he HapticEffect) (bool, error) {
    method NewEffect (line 308) | func (h *Haptic) NewEffect(he HapticEffect) (int, error) {
    method UpdateEffect (line 318) | func (h *Haptic) UpdateEffect(effect int, data HapticEffect) error {
    method RunEffect (line 328) | func (h *Haptic) RunEffect(effect int, iterations uint32) error {
    method StopEffect (line 338) | func (h *Haptic) StopEffect(effect int) error {
    method DestroyEffect (line 345) | func (h *Haptic) DestroyEffect(effect int) {
    method GetEffectStatus (line 351) | func (h *Haptic) GetEffectStatus(effect int) (int, error) {
    method SetGain (line 359) | func (h *Haptic) SetGain(gain int) error {
    method SetAutocenter (line 366) | func (h *Haptic) SetAutocenter(autocenter int) error {
    method Pause (line 373) | func (h *Haptic) Pause() error {
    method Unpause (line 380) | func (h *Haptic) Unpause() error {
    method StopAll (line 387) | func (h *Haptic) StopAll() error {
    method RumbleSupported (line 394) | func (h *Haptic) RumbleSupported() (bool, error) {
    method RumbleInit (line 401) | func (h *Haptic) RumbleInit() error {
    method RumblePlay (line 408) | func (h *Haptic) RumblePlay(strength float32, length uint32) error {
    method RumbleStop (line 415) | func (h *Haptic) RumbleStop() error {
  type HapticDirection (line 44) | type HapticDirection struct
  type HapticConstant (line 51) | type HapticConstant struct
    method cHapticEffect (line 65) | func (he *HapticConstant) cHapticEffect() *C.SDL_HapticEffect {
  type HapticPeriodic (line 71) | type HapticPeriodic struct
    method cHapticEffect (line 88) | func (he *HapticPeriodic) cHapticEffect() *C.SDL_HapticEffect {
  type HapticCondition (line 94) | type HapticCondition struct
    method cHapticEffect (line 109) | func (he *HapticCondition) cHapticEffect() *C.SDL_HapticEffect {
  type HapticRamp (line 115) | type HapticRamp struct
    method cHapticEffect (line 130) | func (he *HapticRamp) cHapticEffect() *C.SDL_HapticEffect {
  type HapticLeftRight (line 136) | type HapticLeftRight struct
    method cHapticEffect (line 143) | func (he *HapticLeftRight) cHapticEffect() *C.SDL_HapticEffect {
  type HapticCustom (line 149) | type HapticCustom struct
    method cHapticEffect (line 166) | func (he *HapticCustom) cHapticEffect() *C.SDL_HapticEffect {
  type HapticEffect (line 172) | type HapticEffect interface
  function NumHaptics (line 182) | func NumHaptics() (int, error) {
  function HapticName (line 189) | func HapticName(index int) (string, error) {
  function HapticOpen (line 199) | func HapticOpen(index int) (*Haptic, error) {
  function HapticOpened (line 209) | func HapticOpened(index int) (bool, error) {
  function HapticIndex (line 219) | func HapticIndex(h *Haptic) (int, error) {
  function MouseIsHaptic (line 226) | func MouseIsHaptic() (bool, error) {
  function HapticOpenFromMouse (line 233) | func HapticOpenFromMouse() (*Haptic, error) {
  function JoystickIsHaptic (line 243) | func JoystickIsHaptic(joy *Joystick) (bool, error) {
  function HapticOpenFromJoystick (line 250) | func HapticOpenFromJoystick(joy *Joystick) (*Haptic, error) {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/helpers.go
  function Btoi (line 4) | func Btoi(b bool) int {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/hidapi.go
  type HIDDevice (line 177) | type HIDDevice
    method Write (line 260) | func (device *HIDDevice) Write(data []byte) (n int, err error) {
    method ReadTimeout (line 270) | func (device *HIDDevice) ReadTimeout(data []byte, milliseconds int) (n...
    method Read (line 281) | func (device *HIDDevice) Read(data []byte) (n int, err error) {
    method SetNonBlocking (line 291) | func (device *HIDDevice) SetNonBlocking(nonblock bool) (err error) {
    method SendFeatureReport (line 299) | func (device *HIDDevice) SendFeatureReport(data []byte) (n int, err er...
    method GetFeatureReport (line 309) | func (device *HIDDevice) GetFeatureReport(data []byte) (n int, err err...
    method Close (line 319) | func (device *HIDDevice) Close() {
    method GetManufacturerString (line 326) | func (device *HIDDevice) GetManufacturerString(_str *C.wchar_t, _maxle...
    method GetProductString (line 333) | func (device *HIDDevice) GetProductString(_str *C.wchar_t, _maxlen C.s...
    method GetSerialNumberString (line 340) | func (device *HIDDevice) GetSerialNumberString(_str *C.wchar_t, _maxle...
    method GetIndexedString (line 347) | func (device *HIDDevice) GetIndexedString(index int, _str *C.wchar_t, ...
    method HIDBLEScan (line 355) | func (device *HIDDevice) HIDBLEScan(active bool) {
  type HIDDeviceInfo (line 179) | type HIDDeviceInfo struct
    method Path (line 196) | func (info *HIDDeviceInfo) Path() string {
  function HIDInit (line 202) | func HIDInit() (err error) {
  function HIDExit (line 209) | func HIDExit() (err error) {
  function HIDDeviceChangeCount (line 216) | func HIDDeviceChangeCount() (n uint32) {
  function HIDEnumerate (line 222) | func HIDEnumerate(vendorID, productID uint16) (info *HIDDeviceInfo) {
  function HIDFreeEnumeration (line 231) | func HIDFreeEnumeration(info *HIDDeviceInfo) {
  function HIDOpen (line 238) | func HIDOpen(vendorID, productID uint16, _serialNumber *C.wchar_t) (devi...
  function HIDOpenPath (line 247) | func HIDOpenPath(path string, exclusive bool) (device *HIDDevice) {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/hints.c
  function hintCallback (line 6) | void hintCallback(void *userdata, const char *name, const char *oldValue...
  function addHintCallback (line 11) | void addHintCallback(const char *name)
  function delHintCallback (line 16) | void delHintCallback(const char *name)

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/hints.go
  constant HINT_FRAMEBUFFER_ACCELERATION (line 164) | HINT_FRAMEBUFFER_ACCELERATION                 = C.SDL_HINT_FRAMEBUFFER_A...
  constant HINT_RENDER_DRIVER (line 165) | HINT_RENDER_DRIVER                            = C.SDL_HINT_RENDER_DRIVER
  constant HINT_RENDER_OPENGL_SHADERS (line 166) | HINT_RENDER_OPENGL_SHADERS                    = C.SDL_HINT_RENDER_OPENGL...
  constant HINT_RENDER_DIRECT3D_THREADSAFE (line 167) | HINT_RENDER_DIRECT3D_THREADSAFE               = C.SDL_HINT_RENDER_DIRECT...
  constant HINT_RENDER_DIRECT3D11_DEBUG (line 168) | HINT_RENDER_DIRECT3D11_DEBUG                  = C.SDL_HINT_RENDER_DIRECT...
  constant HINT_RENDER_SCALE_QUALITY (line 169) | HINT_RENDER_SCALE_QUALITY                     = C.SDL_HINT_RENDER_SCALE_...
  constant HINT_RENDER_VSYNC (line 170) | HINT_RENDER_VSYNC                             = C.SDL_HINT_RENDER_VSYNC
  constant HINT_VIDEO_ALLOW_SCREENSAVER (line 171) | HINT_VIDEO_ALLOW_SCREENSAVER                  = C.SDL_HINT_VIDEO_ALLOW_S...
  constant HINT_VIDEO_X11_NET_WM_PING (line 172) | HINT_VIDEO_X11_NET_WM_PING                    = C.SDL_HINT_VIDEO_X11_NET...
  constant HINT_VIDEO_X11_XVIDMODE (line 173) | HINT_VIDEO_X11_XVIDMODE                       = C.SDL_HINT_VIDEO_X11_XVI...
  constant HINT_VIDEO_X11_XINERAMA (line 174) | HINT_VIDEO_X11_XINERAMA                       = C.SDL_HINT_VIDEO_X11_XIN...
  constant HINT_VIDEO_X11_XRANDR (line 175) | HINT_VIDEO_X11_XRANDR                         = C.SDL_HINT_VIDEO_X11_XRANDR
  constant HINT_GRAB_KEYBOARD (line 176) | HINT_GRAB_KEYBOARD                            = C.SDL_HINT_GRAB_KEYBOARD
  constant HINT_MOUSE_DOUBLE_CLICK_TIME (line 177) | HINT_MOUSE_DOUBLE_CLICK_TIME                  = C.SDL_HINT_MOUSE_DOUBLE_...
  constant HINT_MOUSE_DOUBLE_CLICK_RADIUS (line 178) | HINT_MOUSE_DOUBLE_CLICK_RADIUS                = C.SDL_HINT_MOUSE_DOUBLE_...
  constant HINT_MOUSE_RELATIVE_MODE_WARP (line 179) | HINT_MOUSE_RELATIVE_MODE_WARP                 = C.SDL_HINT_MOUSE_RELATIV...
  constant HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS (line 180) | HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS             = C.SDL_HINT_VIDEO_MINIMIZ...
  constant HINT_IDLE_TIMER_DISABLED (line 181) | HINT_IDLE_TIMER_DISABLED                      = C.SDL_HINT_IDLE_TIMER_DI...
  constant HINT_IME_INTERNAL_EDITING (line 182) | HINT_IME_INTERNAL_EDITING                     = C.SDL_HINT_IME_INTERNAL_...
  constant HINT_ORIENTATIONS (line 183) | HINT_ORIENTATIONS                             = C.SDL_HINT_ORIENTATIONS
  constant HINT_ACCELEROMETER_AS_JOYSTICK (line 184) | HINT_ACCELEROMETER_AS_JOYSTICK                = C.SDL_HINT_ACCELEROMETER...
  constant HINT_XINPUT_ENABLED (line 185) | HINT_XINPUT_ENABLED                           = C.SDL_HINT_XINPUT_ENABLED
  constant HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING (line 186) | HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING          = C.SDL_HINT_XINPUT_USE_OL...
  constant HINT_GAMECONTROLLERCONFIG (line 187) | HINT_GAMECONTROLLERCONFIG                     = C.SDL_HINT_GAMECONTROLLE...
  constant HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS (line 188) | HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS         = C.SDL_HINT_JOYSTICK_ALLO...
  constant HINT_ALLOW_TOPMOST (line 189) | HINT_ALLOW_TOPMOST                            = C.SDL_HINT_ALLOW_TOPMOST
  constant HINT_THREAD_STACK_SIZE (line 190) | HINT_THREAD_STACK_SIZE                        = C.SDL_HINT_THREAD_STACK_...
  constant HINT_TIMER_RESOLUTION (line 191) | HINT_TIMER_RESOLUTION                         = C.SDL_HINT_TIMER_RESOLUTION
  constant HINT_VIDEO_HIGHDPI_DISABLED (line 192) | HINT_VIDEO_HIGHDPI_DISABLED                   = C.SDL_HINT_VIDEO_HIGHDPI...
  constant HINT_MAC_BACKGROUND_APP (line 193) | HINT_MAC_BACKGROUND_APP                       = C.SDL_HINT_MAC_BACKGROUN...
  constant HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK (line 194) | HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK       = C.SDL_HINT_MAC_CTRL_CLIC...
  constant HINT_VIDEO_WIN_D3DCOMPILER (line 195) | HINT_VIDEO_WIN_D3DCOMPILER                    = C.SDL_HINT_VIDEO_WIN_D3D...
  constant HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT (line 196) | HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT          = C.SDL_HINT_VIDEO_WINDOW_...
  constant HINT_WINRT_PRIVACY_POLICY_URL (line 197) | HINT_WINRT_PRIVACY_POLICY_URL                 = C.SDL_HINT_WINRT_PRIVACY...
  constant HINT_WINRT_PRIVACY_POLICY_LABEL (line 198) | HINT_WINRT_PRIVACY_POLICY_LABEL               = C.SDL_HINT_WINRT_PRIVACY...
  constant HINT_WINRT_HANDLE_BACK_BUTTON (line 199) | HINT_WINRT_HANDLE_BACK_BUTTON                 = C.SDL_HINT_WINRT_HANDLE_...
  constant HINT_VIDEO_MAC_FULLSCREEN_SPACES (line 200) | HINT_VIDEO_MAC_FULLSCREEN_SPACES              = C.SDL_HINT_VIDEO_MAC_FUL...
  constant HINT_NO_SIGNAL_HANDLERS (line 201) | HINT_NO_SIGNAL_HANDLERS                       = C.SDL_HINT_NO_SIGNAL_HAN...
  constant HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN (line 202) | HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN  = C.SDL_HINT_WINDOW_FRAME_...
  constant HINT_WINDOWS_ENABLE_MESSAGELOOP (line 203) | HINT_WINDOWS_ENABLE_MESSAGELOOP               = C.SDL_HINT_WINDOWS_ENABL...
  constant HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 (line 204) | HINT_WINDOWS_NO_CLOSE_ON_ALT_F4               = C.SDL_HINT_WINDOWS_NO_CL...
  constant HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH (line 205) | HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH         = C.SDL_HINT_ANDROID_SEPAR...
  constant HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION (line 206) | HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION  = C.SDL_HINT_ANDROID_APK_E...
  constant HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION (line 207) | HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION = C.SDL_HINT_ANDROID_APK_E...
  constant HINT_AUDIO_RESAMPLING_MODE (line 208) | HINT_AUDIO_RESAMPLING_MODE                    = C.SDL_HINT_AUDIO_RESAMPL...
  constant HINT_RENDER_LOGICAL_SIZE_MODE (line 209) | HINT_RENDER_LOGICAL_SIZE_MODE                 = C.SDL_HINT_RENDER_LOGICA...
  constant HINT_MOUSE_NORMAL_SPEED_SCALE (line 210) | HINT_MOUSE_NORMAL_SPEED_SCALE                 = C.SDL_HINT_MOUSE_NORMAL_...
  constant HINT_MOUSE_RELATIVE_SPEED_SCALE (line 211) | HINT_MOUSE_RELATIVE_SPEED_SCALE               = C.SDL_HINT_MOUSE_RELATIV...
  constant HINT_MOUSE_TOUCH_EVENTS (line 212) | HINT_MOUSE_TOUCH_EVENTS                       = C.SDL_HINT_MOUSE_TOUCH_E...
  constant HINT_TOUCH_MOUSE_EVENTS (line 213) | HINT_TOUCH_MOUSE_EVENTS                       = C.SDL_HINT_TOUCH_MOUSE_E...
  constant HINT_WINDOWS_INTRESOURCE_ICON (line 214) | HINT_WINDOWS_INTRESOURCE_ICON                 = C.SDL_HINT_WINDOWS_INTRE...
  constant HINT_WINDOWS_INTRESOURCE_ICON_SMALL (line 215) | HINT_WINDOWS_INTRESOURCE_ICON_SMALL           = C.SDL_HINT_WINDOWS_INTRE...
  constant HINT_IOS_HIDE_HOME_INDICATOR (line 216) | HINT_IOS_HIDE_HOME_INDICATOR                  = C.SDL_HINT_IOS_HIDE_HOME...
  constant HINT_RETURN_KEY_HIDES_IME (line 217) | HINT_RETURN_KEY_HIDES_IME                     = C.SDL_HINT_RETURN_KEY_HI...
  constant HINT_TV_REMOTE_AS_JOYSTICK (line 218) | HINT_TV_REMOTE_AS_JOYSTICK                    = C.SDL_HINT_TV_REMOTE_AS_...
  constant HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR (line 219) | HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR       = C.SDL_HINT_VIDEO_X11_NET...
  constant HINT_VIDEO_DOUBLE_BUFFER (line 220) | HINT_VIDEO_DOUBLE_BUFFER                      = C.SDL_HINT_VIDEO_DOUBLE_...
  constant HINT_RENDER_BATCHING (line 221) | HINT_RENDER_BATCHING                          = C.SDL_HINT_RENDER_BATCHING
  constant HINT_EVENT_LOGGING (line 222) | HINT_EVENT_LOGGING                            = C.SDL_HINT_EVENT_LOGGING
  constant HINT_GAMECONTROLLERCONFIG_FILE (line 223) | HINT_GAMECONTROLLERCONFIG_FILE                = C.SDL_HINT_GAMECONTROLLE...
  constant HINT_ANDROID_BLOCK_ON_PAUSE (line 224) | HINT_ANDROID_BLOCK_ON_PAUSE                   = C.SDL_HINT_ANDROID_BLOCK...
  constant HINT_DISPLAY_USABLE_BOUNDS (line 225) | HINT_DISPLAY_USABLE_BOUNDS                    = C.SDL_HINT_DISPLAY_USABL...
  constant HINT_GAMECONTROLLERTYPE (line 226) | HINT_GAMECONTROLLERTYPE                       = C.SDL_HINT_GAMECONTROLLE...
  constant HINT_GAMECONTROLLER_USE_BUTTON_LABELS (line 227) | HINT_GAMECONTROLLER_USE_BUTTON_LABELS         = C.SDL_HINT_GAMECONTROLLE...
  constant HINT_JOYSTICK_HIDAPI_GAMECUBE (line 228) | HINT_JOYSTICK_HIDAPI_GAMECUBE                 = C.SDL_HINT_JOYSTICK_HIDA...
  constant HINT_VIDEO_X11_WINDOW_VISUALID (line 229) | HINT_VIDEO_X11_WINDOW_VISUALID                = C.SDL_HINT_VIDEO_X11_WIN...
  constant HINT_VIDEO_X11_FORCE_EGL (line 230) | HINT_VIDEO_X11_FORCE_EGL                      = C.SDL_HINT_VIDEO_X11_FOR...
  constant HINT_JOYSTICK_HIDAPI_PS5 (line 231) | HINT_JOYSTICK_HIDAPI_PS5                      = C.SDL_HINT_JOYSTICK_HIDA...
  constant HINT_MOUSE_RELATIVE_SCALING (line 232) | HINT_MOUSE_RELATIVE_SCALING                   = C.SDL_HINT_MOUSE_RELATIV...
  constant HINT_PREFERRED_LOCALES (line 233) | HINT_PREFERRED_LOCALES                        = C.SDL_HINT_PREFERRED_LOC...
  constant HINT_JOYSTICK_RAWINPUT (line 234) | HINT_JOYSTICK_RAWINPUT                        = C.SDL_HINT_JOYSTICK_RAWI...
  constant HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT (line 235) | HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT       = C.SDL_HINT_JOYSTICK_RAWI...
  constant HINT_JOYSTICK_HIDAPI_CORRELATE_XINPUT (line 236) | HINT_JOYSTICK_HIDAPI_CORRELATE_XINPUT         = C.SDL_HINT_JOYSTICK_HIDA...
  constant HINT_AUDIO_DEVICE_APP_NAME (line 237) | HINT_AUDIO_DEVICE_APP_NAME                    = C.SDL_HINT_AUDIO_DEVICE_...
  constant HINT_AUDIO_DEVICE_STREAM_NAME (line 238) | HINT_AUDIO_DEVICE_STREAM_NAME                 = C.SDL_HINT_AUDIO_DEVICE_...
  constant HINT_LINUX_JOYSTICK_DEADZONES (line 239) | HINT_LINUX_JOYSTICK_DEADZONES                 = C.SDL_HINT_LINUX_JOYSTIC...
  constant HINT_THREAD_PRIORITY_POLICY (line 240) | HINT_THREAD_PRIORITY_POLICY                   = C.SDL_HINT_THREAD_PRIORI...
  constant HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL (line 241) | HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL      = C.SDL_HINT_THREAD_FORCE_...
  constant HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO (line 242) | HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO        = C.SDL_HINT_ANDROID_BLOCK...
  constant HINT_EMSCRIPTEN_ASYNCIFY (line 243) | HINT_EMSCRIPTEN_ASYNCIFY                      = C.SDL_HINT_EMSCRIPTEN_AS...
  constant HINT_AUDIO_INCLUDE_MONITORS (line 244) | HINT_AUDIO_INCLUDE_MONITORS                   = C.SDL_HINT_AUDIO_INCLUDE...
  constant HINT_AUDIO_DEVICE_STREAM_ROLE (line 245) | HINT_AUDIO_DEVICE_STREAM_ROLE                 = C.SDL_HINT_AUDIO_DEVICE_...
  constant HINT_APP_NAME (line 246) | HINT_APP_NAME                                 = C.SDL_HINT_APP_NAME
  constant HINT_VIDEO_EGL_ALLOW_TRANSPARENCY (line 247) | HINT_VIDEO_EGL_ALLOW_TRANSPARENCY             = C.SDL_HINT_VIDEO_EGL_ALL...
  constant HINT_IME_SHOW_UI (line 248) | HINT_IME_SHOW_UI                              = C.SDL_HINT_IME_SHOW_UI
  constant HINT_IME_SUPPORT_EXTENDED_TEXT (line 249) | HINT_IME_SUPPORT_EXTENDED_TEXT                = C.SDL_HINT_IME_SUPPORT_E...
  constant HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME (line 250) | HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME        = C.SDL_HINT_SCREENSAVER_I...
  constant HINT_LINUX_JOYSTICK_CLASSIC (line 251) | HINT_LINUX_JOYSTICK_CLASSIC                   = C.SDL_HINT_LINUX_JOYSTIC...
  constant HINT_JOYSTICK_DEVICE (line 252) | HINT_JOYSTICK_DEVICE                          = C.SDL_HINT_JOYSTICK_DEVICE
  constant HINT_JOYSTICK_HIDAPI_STEAM (line 253) | HINT_JOYSTICK_HIDAPI_STEAM                    = C.SDL_HINT_JOYSTICK_HIDA...
  constant HINT_RENDER_LINE_METHOD (line 254) | HINT_RENDER_LINE_METHOD                       = C.SDL_HINT_RENDER_LINE_M...
  constant HINT_MOUSE_RELATIVE_MODE_CENTER (line 255) | HINT_MOUSE_RELATIVE_MODE_CENTER               = C.SDL_HINT_MOUSE_RELATIV...
  constant HINT_MOUSE_AUTO_CAPTURE (line 256) | HINT_MOUSE_AUTO_CAPTURE                       = C.SDL_HINT_MOUSE_AUTO_CA...
  constant HINT_VIDEO_FOREIGN_WINDOW_OPENGL (line 257) | HINT_VIDEO_FOREIGN_WINDOW_OPENGL              = C.SDL_HINT_VIDEO_FOREIGN...
  constant HINT_VIDEO_FOREIGN_WINDOW_VULKAN (line 258) | HINT_VIDEO_FOREIGN_WINDOW_VULKAN              = C.SDL_HINT_VIDEO_FOREIGN...
  constant HINT_QUIT_ON_LAST_WINDOW_CLOSE (line 259) | HINT_QUIT_ON_LAST_WINDOW_CLOSE                = C.SDL_HINT_QUIT_ON_LAST_...
  constant HINT_JOYSTICK_ROG_CHAKRAM (line 260) | HINT_JOYSTICK_ROG_CHAKRAM                     = C.SDL_HINT_JOYSTICK_ROG_...
  constant HINT_X11_WINDOW_TYPE (line 261) | HINT_X11_WINDOW_TYPE                          = C.SDL_HINT_X11_WINDOW_TYPE
  constant HINT_VIDEO_WAYLAND_PREFER_LIBDECOR (line 262) | HINT_VIDEO_WAYLAND_PREFER_LIBDECOR            = C.SDL_HINT_VIDEO_WAYLAND...
  constant HINT_DEFAULT (line 268) | HINT_DEFAULT  = C.SDL_HINT_DEFAULT
  constant HINT_NORMAL (line 269) | HINT_NORMAL   = C.SDL_HINT_NORMAL
  constant HINT_OVERRIDE (line 270) | HINT_OVERRIDE = C.SDL_HINT_OVERRIDE
  type HintCallback (line 274) | type HintCallback
  type HintCallbackAndData (line 277) | type HintCallbackAndData struct
  type HintPriority (line 286) | type HintPriority
    method c (line 288) | func (hp HintPriority) c() C.SDL_HintPriority {
  function SetHintWithPriority (line 294) | func SetHintWithPriority(name, value string, hp HintPriority) bool {
  function SetHint (line 304) | func SetHint(name, value string) bool {
  function GetHint (line 314) | func GetHint(name string) string {
  function ClearHints (line 322) | func ClearHints() {
  function AddHintCallback (line 328) | func AddHintCallback(name string, fn HintCallback, data interface{}) {
  function DelHintCallback (line 339) | func DelHintCallback(name string) {
  function goHintCallback (line 346) | func goHintCallback(_name, _oldValue, _newValue *C.char) {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/joystick.go
  constant HAT_CENTERED (line 244) | HAT_CENTERED  = C.SDL_HAT_CENTERED
  constant HAT_UP (line 245) | HAT_UP        = C.SDL_HAT_UP
  constant HAT_RIGHT (line 246) | HAT_RIGHT     = C.SDL_HAT_RIGHT
  constant HAT_DOWN (line 247) | HAT_DOWN      = C.SDL_HAT_DOWN
  constant HAT_LEFT (line 248) | HAT_LEFT      = C.SDL_HAT_LEFT
  constant HAT_RIGHTUP (line 249) | HAT_RIGHTUP   = C.SDL_HAT_RIGHTUP
  constant HAT_RIGHTDOWN (line 250) | HAT_RIGHTDOWN = C.SDL_HAT_RIGHTDOWN
  constant HAT_LEFTUP (line 251) | HAT_LEFTUP    = C.SDL_HAT_LEFTUP
  constant HAT_LEFTDOWN (line 252) | HAT_LEFTDOWN  = C.SDL_HAT_LEFTDOWN
  constant JOYSTICK_TYPE_UNKNOWN (line 257) | JOYSTICK_TYPE_UNKNOWN        = C.SDL_JOYSTICK_TYPE_UNKNOWN
  constant JOYSTICK_TYPE_GAMECONTROLLER (line 258) | JOYSTICK_TYPE_GAMECONTROLLER = C.SDL_JOYSTICK_TYPE_GAMECONTROLLER
  constant JOYSTICK_TYPE_WHEEL (line 259) | JOYSTICK_TYPE_WHEEL          = C.SDL_JOYSTICK_TYPE_WHEEL
  constant JOYSTICK_TYPE_ARCADE_STICK (line 260) | JOYSTICK_TYPE_ARCADE_STICK   = C.SDL_JOYSTICK_TYPE_ARCADE_STICK
  constant JOYSTICK_TYPE_FLIGHT_STICK (line 261) | JOYSTICK_TYPE_FLIGHT_STICK   = C.SDL_JOYSTICK_TYPE_FLIGHT_STICK
  constant JOYSTICK_TYPE_DANCE_PAD (line 262) | JOYSTICK_TYPE_DANCE_PAD      = C.SDL_JOYSTICK_TYPE_DANCE_PAD
  constant JOYSTICK_TYPE_GUITAR (line 263) | JOYSTICK_TYPE_GUITAR         = C.SDL_JOYSTICK_TYPE_GUITAR
  constant JOYSTICK_TYPE_DRUM_KIT (line 264) | JOYSTICK_TYPE_DRUM_KIT       = C.SDL_JOYSTICK_TYPE_DRUM_KIT
  constant JOYSTICK_TYPE_ARCADE_PAD (line 265) | JOYSTICK_TYPE_ARCADE_PAD     = C.SDL_JOYSTICK_TYPE_ARCADE_PAD
  constant JOYSTICK_TYPE_THROTTLE (line 266) | JOYSTICK_TYPE_THROTTLE       = C.SDL_JOYSTICK_TYPE_THROTTLE
  constant JOYSTICK_POWER_UNKNOWN (line 272) | JOYSTICK_POWER_UNKNOWN = C.SDL_JOYSTICK_POWER_UNKNOWN
  constant JOYSTICK_POWER_EMPTY (line 273) | JOYSTICK_POWER_EMPTY   = C.SDL_JOYSTICK_POWER_EMPTY
  constant JOYSTICK_POWER_LOW (line 274) | JOYSTICK_POWER_LOW     = C.SDL_JOYSTICK_POWER_LOW
  constant JOYSTICK_POWER_MEDIUM (line 275) | JOYSTICK_POWER_MEDIUM  = C.SDL_JOYSTICK_POWER_MEDIUM
  constant JOYSTICK_POWER_FULL (line 276) | JOYSTICK_POWER_FULL    = C.SDL_JOYSTICK_POWER_FULL
  constant JOYSTICK_POWER_WIRED (line 277) | JOYSTICK_POWER_WIRED   = C.SDL_JOYSTICK_POWER_WIRED
  constant JOYSTICK_POWER_MAX (line 278) | JOYSTICK_POWER_MAX     = C.SDL_JOYSTICK_POWER_MAX
  type Joystick (line 282) | type Joystick
    method cptr (line 296) | func (joy *Joystick) cptr() *C.SDL_Joystick {
    method Name (line 413) | func (joy *Joystick) Name() string {
    method PlayerIndex (line 419) | func (joy *Joystick) PlayerIndex() int {
    method GUID (line 425) | func (joy *Joystick) GUID() JoystickGUID {
    method Vendor (line 430) | func (joy *Joystick) Vendor() int {
    method Product (line 435) | func (joy *Joystick) Product() int {
    method ProductVersion (line 440) | func (joy *Joystick) ProductVersion() int {
    method Type (line 445) | func (joy *Joystick) Type() JoystickType {
    method Attached (line 451) | func (joy *Joystick) Attached() bool {
    method InstanceID (line 457) | func (joy *Joystick) InstanceID() JoystickID {
    method NumAxes (line 463) | func (joy *Joystick) NumAxes() int {
    method NumBalls (line 469) | func (joy *Joystick) NumBalls() int {
    method NumHats (line 475) | func (joy *Joystick) NumHats() int {
    method NumButtons (line 481) | func (joy *Joystick) NumButtons() int {
    method Axis (line 487) | func (joy *Joystick) Axis(axis int) int16 {
    method AxisInitialState (line 492) | func (joy *Joystick) AxisInitialState(axis int) (state int16, ok bool) {
    method Hat (line 499) | func (joy *Joystick) Hat(hat int) byte {
    method Ball (line 505) | func (joy *Joystick) Ball(ball int, dx, dy *int32) int {
    method Button (line 513) | func (joy *Joystick) Button(button int) byte {
    method Rumble (line 527) | func (joy *Joystick) Rumble(lowFrequencyRumble, highFrequencyRumble ui...
    method Close (line 533) | func (joy *Joystick) Close() {
    method CurrentPowerLevel (line 539) | func (joy *Joystick) CurrentPowerLevel() JoystickPowerLevel {
    method HasRumble (line 545) | func (ctrl *Joystick) HasRumble() bool {
    method HasRumbleTriggers (line 551) | func (ctrl *Joystick) HasRumbleTriggers() bool {
  type JoystickGUID (line 285) | type JoystickGUID
    method c (line 300) | func (guid JoystickGUID) c() C.SDL_JoystickGUID {
  type JoystickID (line 288) | type JoystickID
    method c (line 304) | func (joyid JoystickID) c() C.SDL_JoystickID {
  type JoystickType (line 291) | type JoystickType
  type JoystickPowerLevel (line 294) | type JoystickPowerLevel
  function NumJoysticks (line 310) | func NumJoysticks() int {
  function JoystickNameForIndex (line 316) | func JoystickNameForIndex(index int) string {
  function JoystickGetDevicePlayerIndex (line 322) | func JoystickGetDevicePlayerIndex(index int) int {
  function JoystickGetDeviceGUID (line 328) | func JoystickGetDeviceGUID(index int) JoystickGUID {
  function JoystickGetDeviceVendor (line 333) | func JoystickGetDeviceVendor(index int) int {
  function JoystickGetDeviceProduct (line 338) | func JoystickGetDeviceProduct(index int) int {
  function JoystickGetDeviceProductVersion (line 343) | func JoystickGetDeviceProductVersion(index int) int {
  function JoystickGetDeviceType (line 348) | func JoystickGetDeviceType(index int) JoystickType {
  function JoystickGetDeviceInstanceID (line 353) | func JoystickGetDeviceInstanceID(index int) JoystickID {
  function JoystickGetGUIDString (line 359) | func JoystickGetGUIDString(guid JoystickGUID) string {
  function JoystickGetGUIDFromString (line 369) | func JoystickGetGUIDFromString(pchGUID string) JoystickGUID {
  function JoystickUpdate (line 377) | func JoystickUpdate() {
  function JoystickEventState (line 383) | func JoystickEventState(state int) int {
  function JoystickOpen (line 389) | func JoystickOpen(index int) *Joystick {
  function JoystickFromInstanceID (line 395) | func JoystickFromInstanceID(joyid JoystickID) *Joystick {
  function LockJoysticks (line 401) | func LockJoysticks() {
  function UnlockJoysticks (line 407) | func UnlockJoysticks() {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/keyboard.go
  type Keysym (line 32) | type Keysym struct
  function GetKeyboardFocus (line 41) | func GetKeyboardFocus() *Window {
  function GetKeyboardState (line 47) | func GetKeyboardState() []uint8 {
  function GetModState (line 59) | func GetModState() Keymod {
  function SetModState (line 65) | func SetModState(mod Keymod) {
  function GetKeyFromScancode (line 71) | func GetKeyFromScancode(code Scancode) Keycode {
  function GetScancodeFromKey (line 77) | func GetScancodeFromKey(code Keycode) Scancode {
  function GetScancodeName (line 83) | func GetScancodeName(code Scancode) string {
  function GetScancodeFromName (line 89) | func GetScancodeFromName(name string) Scancode {
  function GetKeyName (line 97) | func GetKeyName(code Keycode) string {
  function GetKeyFromName (line 103) | func GetKeyFromName(name string) Keycode {
  function StartTextInput (line 111) | func StartTextInput() {
  function IsTextInputActive (line 117) | func IsTextInputActive() bool {
  function StopTextInput (line 123) | func StopTextInput() {
  function SetTextInputRect (line 129) | func SetTextInputRect(rect *Rect) {
  function HasScreenKeyboardSupport (line 135) | func HasScreenKeyboardSupport() bool {
  function IsScreenKeyboardShown (line 141) | func IsScreenKeyboardShown(window *Window) bool {
  function IsTextInputShown (line 147) | func IsTextInputShown() bool {
  function ClearComposition (line 153) | func ClearComposition() {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/keycode.go
  constant K_SCANCODE_MASK (line 6) | K_SCANCODE_MASK = 1 << 30
  constant K_UNKNOWN (line 12) | K_UNKNOWN = C.SDLK_UNKNOWN
  constant K_RETURN (line 14) | K_RETURN     = C.SDLK_RETURN
  constant K_ESCAPE (line 15) | K_ESCAPE     = C.SDLK_ESCAPE
  constant K_BACKSPACE (line 16) | K_BACKSPACE  = C.SDLK_BACKSPACE
  constant K_TAB (line 17) | K_TAB        = C.SDLK_TAB
  constant K_SPACE (line 18) | K_SPACE      = C.SDLK_SPACE
  constant K_EXCLAIM (line 19) | K_EXCLAIM    = C.SDLK_EXCLAIM
  constant K_QUOTEDBL (line 20) | K_QUOTEDBL   = C.SDLK_QUOTEDBL
  constant K_HASH (line 21) | K_HASH       = C.SDLK_HASH
  constant K_PERCENT (line 22) | K_PERCENT    = C.SDLK_PERCENT
  constant K_DOLLAR (line 23) | K_DOLLAR     = C.SDLK_DOLLAR
  constant K_AMPERSAND (line 24) | K_AMPERSAND  = C.SDLK_AMPERSAND
  constant K_QUOTE (line 25) | K_QUOTE      = C.SDLK_QUOTE
  constant K_LEFTPAREN (line 26) | K_LEFTPAREN  = C.SDLK_LEFTPAREN
  constant K_RIGHTPAREN (line 27) | K_RIGHTPAREN = C.SDLK_RIGHTPAREN
  constant K_ASTERISK (line 28) | K_ASTERISK   = C.SDLK_ASTERISK
  constant K_PLUS (line 29) | K_PLUS       = C.SDLK_PLUS
  constant K_COMMA (line 30) | K_COMMA      = C.SDLK_COMMA
  constant K_MINUS (line 31) | K_MINUS      = C.SDLK_MINUS
  constant K_PERIOD (line 32) | K_PERIOD     = C.SDLK_PERIOD
  constant K_SLASH (line 33) | K_SLASH      = C.SDLK_SLASH
  constant K_0 (line 34) | K_0          = C.SDLK_0
  constant K_1 (line 35) | K_1          = C.SDLK_1
  constant K_2 (line 36) | K_2          = C.SDLK_2
  constant K_3 (line 37) | K_3          = C.SDLK_3
  constant K_4 (line 38) | K_4          = C.SDLK_4
  constant K_5 (line 39) | K_5          = C.SDLK_5
  constant K_6 (line 40) | K_6          = C.SDLK_6
  constant K_7 (line 41) | K_7          = C.SDLK_7
  constant K_8 (line 42) | K_8          = C.SDLK_8
  constant K_9 (line 43) | K_9          = C.SDLK_9
  constant K_COLON (line 44) | K_COLON      = C.SDLK_COLON
  constant K_SEMICOLON (line 45) | K_SEMICOLON  = C.SDLK_SEMICOLON
  constant K_LESS (line 46) | K_LESS       = C.SDLK_LESS
  constant K_EQUALS (line 47) | K_EQUALS     = C.SDLK_EQUALS
  constant K_GREATER (line 48) | K_GREATER    = C.SDLK_GREATER
  constant K_QUESTION (line 49) | K_QUESTION   = C.SDLK_QUESTION
  constant K_AT (line 50) | K_AT         = C.SDLK_AT
  constant K_LEFTBRACKET (line 54) | K_LEFTBRACKET  = C.SDLK_LEFTBRACKET
  constant K_BACKSLASH (line 55) | K_BACKSLASH    = C.SDLK_BACKSLASH
  constant K_RIGHTBRACKET (line 56) | K_RIGHTBRACKET = C.SDLK_RIGHTBRACKET
  constant K_CARET (line 57) | K_CARET        = C.SDLK_CARET
  constant K_UNDERSCORE (line 58) | K_UNDERSCORE   = C.SDLK_UNDERSCORE
  constant K_BACKQUOTE (line 59) | K_BACKQUOTE    = C.SDLK_BACKQUOTE
  constant K_a (line 60) | K_a            = C.SDLK_a
  constant K_b (line 61) | K_b            = C.SDLK_b
  constant K_c (line 62) | K_c            = C.SDLK_c
  constant K_d (line 63) | K_d            = C.SDLK_d
  constant K_e (line 64) | K_e            = C.SDLK_e
  constant K_f (line 65) | K_f            = C.SDLK_f
  constant K_g (line 66) | K_g            = C.SDLK_g
  constant K_h (line 67) | K_h            = C.SDLK_h
  constant K_i (line 68) | K_i            = C.SDLK_i
  constant K_j (line 69) | K_j            = C.SDLK_j
  constant K_k (line 70) | K_k            = C.SDLK_k
  constant K_l (line 71) | K_l            = C.SDLK_l
  constant K_m (line 72) | K_m            = C.SDLK_m
  constant K_n (line 73) | K_n            = C.SDLK_n
  constant K_o (line 74) | K_o            = C.SDLK_o
  constant K_p (line 75) | K_p            = C.SDLK_p
  constant K_q (line 76) | K_q            = C.SDLK_q
  constant K_r (line 77) | K_r            = C.SDLK_r
  constant K_s (line 78) | K_s            = C.SDLK_s
  constant K_t (line 79) | K_t            = C.SDLK_t
  constant K_u (line 80) | K_u            = C.SDLK_u
  constant K_v (line 81) | K_v            = C.SDLK_v
  constant K_w (line 82) | K_w            = C.SDLK_w
  constant K_x (line 83) | K_x            = C.SDLK_x
  constant K_y (line 84) | K_y            = C.SDLK_y
  constant K_z (line 85) | K_z            = C.SDLK_z
  constant K_CAPSLOCK (line 87) | K_CAPSLOCK = C.SDLK_CAPSLOCK
  constant K_F1 (line 89) | K_F1  = C.SDLK_F1
  constant K_F2 (line 90) | K_F2  = C.SDLK_F2
  constant K_F3 (line 91) | K_F3  = C.SDLK_F3
  constant K_F4 (line 92) | K_F4  = C.SDLK_F4
  constant K_F5 (line 93) | K_F5  = C.SDLK_F5
  constant K_F6 (line 94) | K_F6  = C.SDLK_F6
  constant K_F7 (line 95) | K_F7  = C.SDLK_F7
  constant K_F8 (line 96) | K_F8  = C.SDLK_F8
  constant K_F9 (line 97) | K_F9  = C.SDLK_F9
  constant K_F10 (line 98) | K_F10 = C.SDLK_F10
  constant K_F11 (line 99) | K_F11 = C.SDLK_F11
  constant K_F12 (line 100) | K_F12 = C.SDLK_F12
  constant K_PRINTSCREEN (line 102) | K_PRINTSCREEN = C.SDLK_PRINTSCREEN
  constant K_SCROLLLOCK (line 103) | K_SCROLLLOCK  = C.SDLK_SCROLLLOCK
  constant K_PAUSE (line 104) | K_PAUSE       = C.SDLK_PAUSE
  constant K_INSERT (line 105) | K_INSERT      = C.SDLK_INSERT
  constant K_HOME (line 106) | K_HOME        = C.SDLK_HOME
  constant K_PAGEUP (line 107) | K_PAGEUP      = C.SDLK_PAGEUP
  constant K_DELETE (line 108) | K_DELETE      = C.SDLK_DELETE
  constant K_END (line 109) | K_END         = C.SDLK_END
  constant K_PAGEDOWN (line 110) | K_PAGEDOWN    = C.SDLK_PAGEDOWN
  constant K_RIGHT (line 111) | K_RIGHT       = C.SDLK_RIGHT
  constant K_LEFT (line 112) | K_LEFT        = C.SDLK_LEFT
  constant K_DOWN (line 113) | K_DOWN        = C.SDLK_DOWN
  constant K_UP (line 114) | K_UP          = C.SDLK_UP
  constant K_NUMLOCKCLEAR (line 116) | K_NUMLOCKCLEAR = C.SDLK_NUMLOCKCLEAR
  constant K_KP_DIVIDE (line 117) | K_KP_DIVIDE    = C.SDLK_KP_DIVIDE
  constant K_KP_MULTIPLY (line 118) | K_KP_MULTIPLY  = C.SDLK_KP_MULTIPLY
  constant K_KP_MINUS (line 119) | K_KP_MINUS     = C.SDLK_KP_MINUS
  constant K_KP_PLUS (line 120) | K_KP_PLUS      = C.SDLK_KP_PLUS
  constant K_KP_ENTER (line 121) | K_KP_ENTER     = C.SDLK_KP_ENTER
  constant K_KP_1 (line 122) | K_KP_1         = C.SDLK_KP_1
  constant K_KP_2 (line 123) | K_KP_2         = C.SDLK_KP_2
  constant K_KP_3 (line 124) | K_KP_3         = C.SDLK_KP_3
  constant K_KP_4 (line 125) | K_KP_4         = C.SDLK_KP_4
  constant K_KP_5 (line 126) | K_KP_5         = C.SDLK_KP_5
  constant K_KP_6 (line 127) | K_KP_6         = C.SDLK_KP_6
  constant K_KP_7 (line 128) | K_KP_7         = C.SDLK_KP_7
  constant K_KP_8 (line 129) | K_KP_8         = C.SDLK_KP_8
  constant K_KP_9 (line 130) | K_KP_9         = C.SDLK_KP_9
  constant K_KP_0 (line 131) | K_KP_0         = C.SDLK_KP_0
  constant K_KP_PERIOD (line 132) | K_KP_PERIOD    = C.SDLK_KP_PERIOD
  constant K_APPLICATION (line 134) | K_APPLICATION    = C.SDLK_APPLICATION
  constant K_POWER (line 135) | K_POWER          = C.SDLK_POWER
  constant K_KP_EQUALS (line 136) | K_KP_EQUALS      = C.SDLK_KP_EQUALS
  constant K_F13 (line 137) | K_F13            = C.SDLK_F13
  constant K_F14 (line 138) | K_F14            = C.SDLK_F14
  constant K_F15 (line 139) | K_F15            = C.SDLK_F15
  constant K_F16 (line 140) | K_F16            = C.SDLK_F16
  constant K_F17 (line 141) | K_F17            = C.SDLK_F17
  constant K_F18 (line 142) | K_F18            = C.SDLK_F18
  constant K_F19 (line 143) | K_F19            = C.SDLK_F19
  constant K_F20 (line 144) | K_F20            = C.SDLK_F20
  constant K_F21 (line 145) | K_F21            = C.SDLK_F21
  constant K_F22 (line 146) | K_F22            = C.SDLK_F22
  constant K_F23 (line 147) | K_F23            = C.SDLK_F23
  constant K_F24 (line 148) | K_F24            = C.SDLK_F24
  constant K_EXECUTE (line 149) | K_EXECUTE        = C.SDLK_EXECUTE
  constant K_HELP (line 150) | K_HELP           = C.SDLK_HELP
  constant K_MENU (line 151) | K_MENU           = C.SDLK_MENU
  constant K_SELECT (line 152) | K_SELECT         = C.SDLK_SELECT
  constant K_STOP (line 153) | K_STOP           = C.SDLK_STOP
  constant K_AGAIN (line 154) | K_AGAIN          = C.SDLK_AGAIN
  constant K_UNDO (line 155) | K_UNDO           = C.SDLK_UNDO
  constant K_CUT (line 156) | K_CUT            = C.SDLK_CUT
  constant K_COPY (line 157) | K_COPY           = C.SDLK_COPY
  constant K_PASTE (line 158) | K_PASTE          = C.SDLK_PASTE
  constant K_FIND (line 159) | K_FIND           = C.SDLK_FIND
  constant K_MUTE (line 160) | K_MUTE           = C.SDLK_MUTE
  constant K_VOLUMEUP (line 161) | K_VOLUMEUP       = C.SDLK_VOLUMEUP
  constant K_VOLUMEDOWN (line 162) | K_VOLUMEDOWN     = C.SDLK_VOLUMEDOWN
  constant K_KP_COMMA (line 163) | K_KP_COMMA       = C.SDLK_KP_COMMA
  constant K_KP_EQUALSAS400 (line 164) | K_KP_EQUALSAS400 = C.SDLK_KP_EQUALSAS400
  constant K_ALTERASE (line 166) | K_ALTERASE   = C.SDLK_ALTERASE
  constant K_SYSREQ (line 167) | K_SYSREQ     = C.SDLK_SYSREQ
  constant K_CANCEL (line 168) | K_CANCEL     = C.SDLK_CANCEL
  constant K_CLEAR (line 169) | K_CLEAR      = C.SDLK_CLEAR
  constant K_PRIOR (line 170) | K_PRIOR      = C.SDLK_PRIOR
  constant K_RETURN2 (line 171) | K_RETURN2    = C.SDLK_RETURN2
  constant K_SEPARATOR (line 172) | K_SEPARATOR  = C.SDLK_SEPARATOR
  constant K_OUT (line 173) | K_OUT        = C.SDLK_OUT
  constant K_OPER (line 174) | K_OPER       = C.SDLK_OPER
  constant K_CLEARAGAIN (line 175) | K_CLEARAGAIN = C.SDLK_CLEARAGAIN
  constant K_CRSEL (line 176) | K_CRSEL      = C.SDLK_CRSEL
  constant K_EXSEL (line 177) | K_EXSEL      = C.SDLK_EXSEL
  constant K_KP_00 (line 179) | K_KP_00              = C.SDLK_KP_00
  constant K_KP_000 (line 180) | K_KP_000             = C.SDLK_KP_000
  constant K_THOUSANDSSEPARATOR (line 181) | K_THOUSANDSSEPARATOR = C.SDLK_THOUSANDSSEPARATOR
  constant K_DECIMALSEPARATOR (line 182) | K_DECIMALSEPARATOR   = C.SDLK_DECIMALSEPARATOR
  constant K_CURRENCYUNIT (line 183) | K_CURRENCYUNIT       = C.SDLK_CURRENCYUNIT
  constant K_CURRENCYSUBUNIT (line 184) | K_CURRENCYSUBUNIT    = C.SDLK_CURRENCYSUBUNIT
  constant K_KP_LEFTPAREN (line 185) | K_KP_LEFTPAREN       = C.SDLK_KP_LEFTPAREN
  constant K_KP_RIGHTPAREN (line 186) | K_KP_RIGHTPAREN      = C.SDLK_KP_RIGHTPAREN
  constant K_KP_LEFTBRACE (line 187) | K_KP_LEFTBRACE       = C.SDLK_KP_LEFTBRACE
  constant K_KP_RIGHTBRACE (line 188) | K_KP_RIGHTBRACE      = C.SDLK_KP_RIGHTBRACE
  constant K_KP_TAB (line 189) | K_KP_TAB             = C.SDLK_KP_TAB
  constant K_KP_BACKSPACE (line 190) | K_KP_BACKSPACE       = C.SDLK_KP_BACKSPACE
  constant K_KP_A (line 191) | K_KP_A               = C.SDLK_KP_A
  constant K_KP_B (line 192) | K_KP_B               = C.SDLK_KP_B
  constant K_KP_C (line 193) | K_KP_C               = C.SDLK_KP_C
  constant K_KP_D (line 194) | K_KP_D               = C.SDLK_KP_D
  constant K_KP_E (line 195) | K_KP_E               = C.SDLK_KP_E
  constant K_KP_F (line 196) | K_KP_F               = C.SDLK_KP_F
  constant K_KP_XOR (line 197) | K_KP_XOR             = C.SDLK_KP_XOR
  constant K_KP_POWER (line 198) | K_KP_POWER           = C.SDLK_KP_POWER
  constant K_KP_PERCENT (line 199) | K_KP_PERCENT         = C.SDLK_KP_PERCENT
  constant K_KP_LESS (line 200) | K_KP_LESS            = C.SDLK_KP_LESS
  constant K_KP_GREATER (line 201) | K_KP_GREATER         = C.SDLK_KP_GREATER
  constant K_KP_AMPERSAND (line 202) | K_KP_AMPERSAND       = C.SDLK_KP_AMPERSAND
  constant K_KP_DBLAMPERSAND (line 203) | K_KP_DBLAMPERSAND    = C.SDLK_KP_DBLAMPERSAND
  constant K_KP_VERTICALBAR (line 204) | K_KP_VERTICALBAR     = C.SDLK_KP_VERTICALBAR
  constant K_KP_DBLVERTICALBAR (line 205) | K_KP_DBLVERTICALBAR  = C.SDLK_KP_DBLVERTICALBAR
  constant K_KP_COLON (line 206) | K_KP_COLON           = C.SDLK_KP_COLON
  constant K_KP_HASH (line 207) | K_KP_HASH            = C.SDLK_KP_HASH
  constant K_KP_SPACE (line 208) | K_KP_SPACE           = C.SDLK_KP_SPACE
  constant K_KP_AT (line 209) | K_KP_AT              = C.SDLK_KP_AT
  constant K_KP_EXCLAM (line 210) | K_KP_EXCLAM          = C.SDLK_KP_EXCLAM
  constant K_KP_MEMSTORE (line 211) | K_KP_MEMSTORE        = C.SDLK_KP_MEMSTORE
  constant K_KP_MEMRECALL (line 212) | K_KP_MEMRECALL       = C.SDLK_KP_MEMRECALL
  constant K_KP_MEMCLEAR (line 213) | K_KP_MEMCLEAR        = C.SDLK_KP_MEMCLEAR
  constant K_KP_MEMADD (line 214) | K_KP_MEMADD          = C.SDLK_KP_MEMADD
  constant K_KP_MEMSUBTRACT (line 215) | K_KP_MEMSUBTRACT     = C.SDLK_KP_MEMSUBTRACT
  constant K_KP_MEMMULTIPLY (line 216) | K_KP_MEMMULTIPLY     = C.SDLK_KP_MEMMULTIPLY
  constant K_KP_MEMDIVIDE (line 217) | K_KP_MEMDIVIDE       = C.SDLK_KP_MEMDIVIDE
  constant K_KP_PLUSMINUS (line 218) | K_KP_PLUSMINUS       = C.SDLK_KP_PLUSMINUS
  constant K_KP_CLEAR (line 219) | K_KP_CLEAR           = C.SDLK_KP_CLEAR
  constant K_KP_CLEARENTRY (line 220) | K_KP_CLEARENTRY      = C.SDLK_KP_CLEARENTRY
  constant K_KP_BINARY (line 221) | K_KP_BINARY          = C.SDLK_KP_BINARY
  constant K_KP_OCTAL (line 222) | K_KP_OCTAL           = C.SDLK_KP_OCTAL
  constant K_KP_DECIMAL (line 223) | K_KP_DECIMAL         = C.SDLK_KP_DECIMAL
  constant K_KP_HEXADECIMAL (line 224) | K_KP_HEXADECIMAL     = C.SDLK_KP_HEXADECIMAL
  constant K_LCTRL (line 226) | K_LCTRL  = C.SDLK_LCTRL
  constant K_LSHIFT (line 227) | K_LSHIFT = C.SDLK_LSHIFT
  constant K_LALT (line 228) | K_LALT   = C.SDLK_LALT
  constant K_LGUI (line 229) | K_LGUI   = C.SDLK_LGUI
  constant K_RCTRL (line 230) | K_RCTRL  = C.SDLK_RCTRL
  constant K_RSHIFT (line 231) | K_RSHIFT = C.SDLK_RSHIFT
  constant K_RALT (line 232) | K_RALT   = C.SDLK_RALT
  constant K_RGUI (line 233) | K_RGUI   = C.SDLK_RGUI
  constant K_MODE (line 235) | K_MODE = C.SDLK_MODE
  constant K_AUDIONEXT (line 237) | K_AUDIONEXT    = C.SDLK_AUDIONEXT
  constant K_AUDIOPREV (line 238) | K_AUDIOPREV    = C.SDLK_AUDIOPREV
  constant K_AUDIOSTOP (line 239) | K_AUDIOSTOP    = C.SDLK_AUDIOSTOP
  constant K_AUDIOPLAY (line 240) | K_AUDIOPLAY    = C.SDLK_AUDIOPLAY
  constant K_AUDIOMUTE (line 241) | K_AUDIOMUTE    = C.SDLK_AUDIOMUTE
  constant K_MEDIASELECT (line 242) | K_MEDIASELECT  = C.SDLK_MEDIASELECT
  constant K_WWW (line 243) | K_WWW          = C.SDLK_WWW
  constant K_MAIL (line 244) | K_MAIL         = C.SDLK_MAIL
  constant K_CALCULATOR (line 245) | K_CALCULATOR   = C.SDLK_CALCULATOR
  constant K_COMPUTER (line 246) | K_COMPUTER     = C.SDLK_COMPUTER
  constant K_AC_SEARCH (line 247) | K_AC_SEARCH    = C.SDLK_AC_SEARCH
  constant K_AC_HOME (line 248) | K_AC_HOME      = C.SDLK_AC_HOME
  constant K_AC_BACK (line 249) | K_AC_BACK      = C.SDLK_AC_BACK
  constant K_AC_FORWARD (line 250) | K_AC_FORWARD   = C.SDLK_AC_FORWARD
  constant K_AC_STOP (line 251) | K_AC_STOP      = C.SDLK_AC_STOP
  constant K_AC_REFRESH (line 252) | K_AC_REFRESH   = C.SDLK_AC_REFRESH
  constant K_AC_BOOKMARKS (line 253) | K_AC_BOOKMARKS = C.SDLK_AC_BOOKMARKS
  constant K_BRIGHTNESSDOWN (line 255) | K_BRIGHTNESSDOWN = C.SDLK_BRIGHTNESSDOWN
  constant K_BRIGHTNESSUP (line 256) | K_BRIGHTNESSUP   = C.SDLK_BRIGHTNESSUP
  constant K_DISPLAYSWITCH (line 257) | K_DISPLAYSWITCH  = C.SDLK_DISPLAYSWITCH
  constant K_KBDILLUMTOGGLE (line 258) | K_KBDILLUMTOGGLE = C.SDLK_KBDILLUMTOGGLE
  constant K_KBDILLUMDOWN (line 259) | K_KBDILLUMDOWN   = C.SDLK_KBDILLUMDOWN
  constant K_KBDILLUMUP (line 260) | K_KBDILLUMUP     = C.SDLK_KBDILLUMUP
  constant K_EJECT (line 261) | K_EJECT          = C.SDLK_EJECT
  constant K_SLEEP (line 262) | K_SLEEP          = C.SDLK_SLEEP
  constant KMOD_NONE (line 268) | KMOD_NONE     = C.KMOD_NONE
  constant KMOD_LSHIFT (line 269) | KMOD_LSHIFT   = C.KMOD_LSHIFT
  constant KMOD_RSHIFT (line 270) | KMOD_RSHIFT   = C.KMOD_RSHIFT
  constant KMOD_LCTRL (line 271) | KMOD_LCTRL    = C.KMOD_LCTRL
  constant KMOD_RCTRL (line 272) | KMOD_RCTRL    = C.KMOD_RCTRL
  constant KMOD_LALT (line 273) | KMOD_LALT     = C.KMOD_LALT
  constant KMOD_RALT (line 274) | KMOD_RALT     = C.KMOD_RALT
  constant KMOD_LGUI (line 275) | KMOD_LGUI     = C.KMOD_LGUI
  constant KMOD_RGUI (line 276) | KMOD_RGUI     = C.KMOD_RGUI
  constant KMOD_NUM (line 277) | KMOD_NUM      = C.KMOD_NUM
  constant KMOD_CAPS (line 278) | KMOD_CAPS     = C.KMOD_CAPS
  constant KMOD_MODE (line 279) | KMOD_MODE     = C.KMOD_MODE
  constant KMOD_CTRL (line 280) | KMOD_CTRL     = C.KMOD_CTRL
  constant KMOD_SHIFT (line 281) | KMOD_SHIFT    = C.KMOD_SHIFT
  constant KMOD_ALT (line 282) | KMOD_ALT      = C.KMOD_ALT
  constant KMOD_GUI (line 283) | KMOD_GUI      = C.KMOD_GUI
  constant KMOD_RESERVED (line 284) | KMOD_RESERVED = C.KMOD_RESERVED
  type Keycode (line 289) | type Keycode
    method c (line 295) | func (code Keycode) c() C.SDL_Keycode {
  type Keymod (line 293) | type Keymod
    method c (line 299) | func (mod Keymod) c() C.SDL_Keymod {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/loadso.go
  type SharedObject (line 8) | type SharedObject
    method LoadFunction (line 20) | func (handle SharedObject) LoadFunction(name string) unsafe.Pointer {
    method Unload (line 28) | func (handle SharedObject) Unload() {
  function LoadObject (line 12) | func LoadObject(sofile string) SharedObject {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/log.c
  function LogSetOutputFunction (line 3) | void LogSetOutputFunction(void *data)

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/log.go
  constant LOG_CATEGORY_APPLICATION (line 54) | LOG_CATEGORY_APPLICATION = iota
  constant LOG_CATEGORY_ERROR (line 55) | LOG_CATEGORY_ERROR
  constant LOG_CATEGORY_ASSERT (line 56) | LOG_CATEGORY_ASSERT
  constant LOG_CATEGORY_SYSTEM (line 57) | LOG_CATEGORY_SYSTEM
  constant LOG_CATEGORY_AUDIO (line 58) | LOG_CATEGORY_AUDIO
  constant LOG_CATEGORY_VIDEO (line 59) | LOG_CATEGORY_VIDEO
  constant LOG_CATEGORY_RENDER (line 60) | LOG_CATEGORY_RENDER
  constant LOG_CATEGORY_INPUT (line 61) | LOG_CATEGORY_INPUT
  constant LOG_CATEGORY_TEST (line 62) | LOG_CATEGORY_TEST
  constant LOG_CATEGORY_RESERVED1 (line 63) | LOG_CATEGORY_RESERVED1
  constant LOG_CATEGORY_RESERVED2 (line 64) | LOG_CATEGORY_RESERVED2
  constant LOG_CATEGORY_RESERVED3 (line 65) | LOG_CATEGORY_RESERVED3
  constant LOG_CATEGORY_RESERVED4 (line 66) | LOG_CATEGORY_RESERVED4
  constant LOG_CATEGORY_RESERVED5 (line 67) | LOG_CATEGORY_RESERVED5
  constant LOG_CATEGORY_RESERVED6 (line 68) | LOG_CATEGORY_RESERVED6
  constant LOG_CATEGORY_RESERVED7 (line 69) | LOG_CATEGORY_RESERVED7
  constant LOG_CATEGORY_RESERVED8 (line 70) | LOG_CATEGORY_RESERVED8
  constant LOG_CATEGORY_RESERVED9 (line 71) | LOG_CATEGORY_RESERVED9
  constant LOG_CATEGORY_RESERVED10 (line 72) | LOG_CATEGORY_RESERVED10
  constant LOG_CATEGORY_CUSTOM (line 73) | LOG_CATEGORY_CUSTOM
  constant LOG_PRIORITY_VERBOSE (line 79) | LOG_PRIORITY_VERBOSE  = iota + 1
  constant LOG_PRIORITY_DEBUG (line 80) | LOG_PRIORITY_DEBUG
  constant LOG_PRIORITY_INFO (line 81) | LOG_PRIORITY_INFO
  constant LOG_PRIORITY_WARN (line 82) | LOG_PRIORITY_WARN
  constant LOG_PRIORITY_ERROR (line 83) | LOG_PRIORITY_ERROR
  constant LOG_PRIORITY_CRITICAL (line 84) | LOG_PRIORITY_CRITICAL
  constant NUM_LOG_PRIORITIES (line 85) | NUM_LOG_PRIORITIES
  type LogPriority (line 90) | type LogPriority
    method c (line 92) | func (p LogPriority) c() C.SDL_LogPriority {
  function LogSetAllPriority (line 98) | func LogSetAllPriority(p LogPriority) {
  function LogSetPriority (line 104) | func LogSetPriority(category int, p LogPriority) {
  function LogGetPriority (line 110) | func LogGetPriority(category int) LogPriority {
  function LogResetPriorities (line 116) | func LogResetPriorities() {
  function Log (line 122) | func Log(str string, args ...interface{}) {
  function LogVerbose (line 133) | func LogVerbose(category int, str string, args ...interface{}) {
  function LogDebug (line 144) | func LogDebug(category int, str string, args ...interface{}) {
  function LogInfo (line 155) | func LogInfo(category int, str string, args ...interface{}) {
  function LogWarn (line 166) | func LogWarn(category int, str string, args ...interface{}) {
  function LogError (line 177) | func LogError(category int, str string, args ...interface{}) {
  function LogCritical (line 188) | func LogCritical(category int, str string, args ...interface{}) {
  function LogMessage (line 199) | func LogMessage(category int, pri LogPriority, str string, args ...inter...
  type LogOutputFunction (line 209) | type LogOutputFunction
  type logOutputFunctionCtx (line 211) | type logOutputFunctionCtx struct
  function logOutputFunction (line 219) | func logOutputFunction(data unsafe.Pointer, category C.int, pri C.SDL_Lo...
  function LogGetOutputFunction (line 232) | func LogGetOutputFunction() (LogOutputFunction, interface{}) {
  function LogSetOutputFunction (line 238) | func LogSetOutputFunction(f LogOutputFunction, data interface{}) {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/mouse.go
  constant SYSTEM_CURSOR_ARROW (line 63) | SYSTEM_CURSOR_ARROW     = C.SDL_SYSTEM_CURSOR_ARROW
  constant SYSTEM_CURSOR_IBEAM (line 64) | SYSTEM_CURSOR_IBEAM     = C.SDL_SYSTEM_CURSOR_IBEAM
  constant SYSTEM_CURSOR_WAIT (line 65) | SYSTEM_CURSOR_WAIT      = C.SDL_SYSTEM_CURSOR_WAIT
  constant SYSTEM_CURSOR_CROSSHAIR (line 66) | SYSTEM_CURSOR_CROSSHAIR = C.SDL_SYSTEM_CURSOR_CROSSHAIR
  constant SYSTEM_CURSOR_WAITARROW (line 67) | SYSTEM_CURSOR_WAITARROW = C.SDL_SYSTEM_CURSOR_WAITARROW
  constant SYSTEM_CURSOR_SIZENWSE (line 68) | SYSTEM_CURSOR_SIZENWSE  = C.SDL_SYSTEM_CURSOR_SIZENWSE
  constant SYSTEM_CURSOR_SIZENESW (line 69) | SYSTEM_CURSOR_SIZENESW  = C.SDL_SYSTEM_CURSOR_SIZENESW
  constant SYSTEM_CURSOR_SIZEWE (line 70) | SYSTEM_CURSOR_SIZEWE    = C.SDL_SYSTEM_CURSOR_SIZEWE
  constant SYSTEM_CURSOR_SIZENS (line 71) | SYSTEM_CURSOR_SIZENS    = C.SDL_SYSTEM_CURSOR_SIZENS
  constant SYSTEM_CURSOR_SIZEALL (line 72) | SYSTEM_CURSOR_SIZEALL   = C.SDL_SYSTEM_CURSOR_SIZEALL
  constant SYSTEM_CURSOR_NO (line 73) | SYSTEM_CURSOR_NO        = C.SDL_SYSTEM_CURSOR_NO
  constant SYSTEM_CURSOR_HAND (line 74) | SYSTEM_CURSOR_HAND      = C.SDL_SYSTEM_CURSOR_HAND
  constant NUM_SYSTEM_CURSORS (line 75) | NUM_SYSTEM_CURSORS      = C.SDL_NUM_SYSTEM_CURSORS
  constant MOUSEWHEEL_NORMAL (line 80) | MOUSEWHEEL_NORMAL  = C.SDL_MOUSEWHEEL_NORMAL
  constant MOUSEWHEEL_FLIPPED (line 81) | MOUSEWHEEL_FLIPPED = C.SDL_MOUSEWHEEL_FLIPPED
  constant BUTTON_LEFT (line 86) | BUTTON_LEFT   = C.SDL_BUTTON_LEFT
  constant BUTTON_MIDDLE (line 87) | BUTTON_MIDDLE = C.SDL_BUTTON_MIDDLE
  constant BUTTON_RIGHT (line 88) | BUTTON_RIGHT  = C.SDL_BUTTON_RIGHT
  constant BUTTON_X1 (line 89) | BUTTON_X1     = C.SDL_BUTTON_X1
  constant BUTTON_X2 (line 90) | BUTTON_X2     = C.SDL_BUTTON_X2
  type Cursor (line 94) | type Cursor
    method cptr (line 99) | func (c *Cursor) cptr() *C.SDL_Cursor {
  type SystemCursor (line 97) | type SystemCursor
    method c (line 103) | func (c SystemCursor) c() C.SDL_SystemCursor {
  function GetMouseFocus (line 109) | func GetMouseFocus() *Window {
  function GetGlobalMouseState (line 115) | func GetGlobalMouseState() (x, y int32, state uint32) {
  function GetMouseState (line 123) | func GetMouseState() (x, y int32, state uint32) {
  function GetRelativeMouseState (line 131) | func GetRelativeMouseState() (x, y int32, state uint32) {
  method WarpMouseInWindow (line 139) | func (window *Window) WarpMouseInWindow(x, y int32) {
  function SetRelativeMouseMode (line 145) | func SetRelativeMouseMode(enabled bool) int {
  function GetRelativeMouseMode (line 151) | func GetRelativeMouseMode() bool {
  function CreateCursor (line 157) | func CreateCursor(data, mask *uint8, w, h, hotX, hotY int32) *Cursor {
  function CreateColorCursor (line 165) | func CreateColorCursor(surface *Surface, hotX, hotY int32) *Cursor {
  function CreateSystemCursor (line 171) | func CreateSystemCursor(id SystemCursor) *Cursor {
  function SetCursor (line 177) | func SetCursor(cursor *Cursor) {
  function GetCursor (line 183) | func GetCursor() *Cursor {
  function GetDefaultCursor (line 189) | func GetDefaultCursor() *Cursor {
  function FreeCursor (line 195) | func FreeCursor(cursor *Cursor) {
  function ShowCursor (line 201) | func ShowCursor(toggle int) (int, error) {
  function CaptureMouse (line 208) | func CaptureMouse(toggle bool) error {
  function Button (line 222) | func Button(flag uint32) uint32 {
  function ButtonLMask (line 227) | func ButtonLMask() uint32 {
  function ButtonMMask (line 232) | func ButtonMMask() uint32 {
  function ButtonRMask (line 237) | func ButtonRMask() uint32 {
  function ButtonX1Mask (line 242) | func ButtonX1Mask() uint32 {
  function ButtonX2Mask (line 247) | func ButtonX2Mask() uint32 {
  function WarpMouseGlobal (line 253) | func WarpMouseGlobal(x, y int32) error {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/mutex.go
  type ThreadID (line 8) | type ThreadID
  type Mutex (line 11) | type Mutex struct
    method cptr (line 34) | func (m *Mutex) cptr() *C.SDL_mutex {
    method Lock (line 58) | func (mutex *Mutex) Lock() error {
    method TryLock (line 68) | func (mutex *Mutex) TryLock() error {
    method Unlock (line 78) | func (mutex *Mutex) Unlock() error {
    method Destroy (line 88) | func (mutex *Mutex) Destroy() {
  type Sem (line 18) | type Sem struct
    method cptr (line 38) | func (s *Sem) cptr() *C.SDL_sem {
    method Destroy (line 104) | func (sem *Sem) Destroy() {
    method Wait (line 110) | func (sem *Sem) Wait() error {
    method TryWait (line 120) | func (sem *Sem) TryWait() error {
    method WaitTimeout (line 130) | func (sem *Sem) WaitTimeout(ms uint32) error {
    method Post (line 140) | func (sem *Sem) Post() error {
    method Value (line 150) | func (sem *Sem) Value() uint32 {
  type Cond (line 26) | type Cond struct
    method cptr (line 42) | func (c *Cond) cptr() *C.SDL_cond {
    method Destroy (line 161) | func (cond *Cond) Destroy() {
    method Signal (line 167) | func (cond *Cond) Signal() error {
    method Broadcast (line 177) | func (cond *Cond) Broadcast() error {
    method Wait (line 187) | func (cond *Cond) Wait(mutex *Mutex) error {
    method WaitTimeout (line 197) | func (cond *Cond) WaitTimeout(mutex *Mutex, ms uint32) error {
  function CreateMutex (line 48) | func CreateMutex() (*Mutex, error) {
  function CreateSemaphore (line 94) | func CreateSemaphore(initialValue uint32) (*Sem, error) {
  function CreateCond (line 155) | func CreateCond() *Cond {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/pixels.go
  type PixelFormat (line 39) | type PixelFormat struct
    method cptr (line 200) | func (format *PixelFormat) cptr() *C.SDL_PixelFormat {
    method Free (line 249) | func (format *PixelFormat) Free() {
    method SetPalette (line 265) | func (format *PixelFormat) SetPalette(palette *Palette) error {
  type cPixelFormat (line 60) | type cPixelFormat
  type Palette (line 64) | type Palette struct
    method cptr (line 204) | func (palette *Palette) cptr() *C.SDL_Palette {
    method SetColors (line 276) | func (palette *Palette) SetColors(colors []Color) error {
    method Free (line 295) | func (palette *Palette) Free() {
  type cPalette (line 70) | type cPalette
  type Color (line 74) | type Color
    method Uint32 (line 77) | func (c Color) Uint32() uint32 {
  constant PIXELTYPE_UNKNOWN (line 88) | PIXELTYPE_UNKNOWN  = C.SDL_PIXELTYPE_UNKNOWN
  constant PIXELTYPE_INDEX1 (line 89) | PIXELTYPE_INDEX1   = C.SDL_PIXELTYPE_INDEX1
  constant PIXELTYPE_INDEX4 (line 90) | PIXELTYPE_INDEX4   = C.SDL_PIXELTYPE_INDEX4
  constant PIXELTYPE_INDEX8 (line 91) | PIXELTYPE_INDEX8   = C.SDL_PIXELTYPE_INDEX8
  constant PIXELTYPE_PACKED8 (line 92) | PIXELTYPE_PACKED8  = C.SDL_PIXELTYPE_PACKED8
  constant PIXELTYPE_PACKED16 (line 93) | PIXELTYPE_PACKED16 = C.SDL_PIXELTYPE_PACKED16
  constant PIXELTYPE_PACKED32 (line 94) | PIXELTYPE_PACKED32 = C.SDL_PIXELTYPE_PACKED32
  constant PIXELTYPE_ARRAYU8 (line 95) | PIXELTYPE_ARRAYU8  = C.SDL_PIXELTYPE_ARRAYU8
  constant PIXELTYPE_ARRAYU16 (line 96) | PIXELTYPE_ARRAYU16 = C.SDL_PIXELTYPE_ARRAYU16
  constant PIXELTYPE_ARRAYU32 (line 97) | PIXELTYPE_ARRAYU32 = C.SDL_PIXELTYPE_ARRAYU32
  constant PIXELTYPE_ARRAYF16 (line 98) | PIXELTYPE_ARRAYF16 = C.SDL_PIXELTYPE_ARRAYF16
  constant PIXELTYPE_ARRAYF32 (line 99) | PIXELTYPE_ARRAYF32 = C.SDL_PIXELTYPE_ARRAYF32
  constant BITMAPORDER_NONE (line 104) | BITMAPORDER_NONE = C.SDL_BITMAPORDER_NONE
  constant BITMAPORDER_4321 (line 105) | BITMAPORDER_4321 = C.SDL_BITMAPORDER_4321
  constant BITMAPORDER_1234 (line 106) | BITMAPORDER_1234 = C.SDL_BITMAPORDER_1234
  constant PACKEDORDER_NONE (line 111) | PACKEDORDER_NONE = C.SDL_PACKEDORDER_NONE
  constant PACKEDORDER_XRGB (line 112) | PACKEDORDER_XRGB = C.SDL_PACKEDORDER_XRGB
  constant PACKEDORDER_RGBX (line 113) | PACKEDORDER_RGBX = C.SDL_PACKEDORDER_RGBX
  constant PACKEDORDER_ARGB (line 114) | PACKEDORDER_ARGB = C.SDL_PACKEDORDER_ARGB
  constant PACKEDORDER_RGBA (line 115) | PACKEDORDER_RGBA = C.SDL_PACKEDORDER_RGBA
  constant PACKEDORDER_XBGR (line 116) | PACKEDORDER_XBGR = C.SDL_PACKEDORDER_XBGR
  constant PACKEDORDER_BGRX (line 117) | PACKEDORDER_BGRX = C.SDL_PACKEDORDER_BGRX
  constant PACKEDORDER_ABGR (line 118) | PACKEDORDER_ABGR = C.SDL_PACKEDORDER_ABGR
  constant PACKEDORDER_BGRA (line 119) | PACKEDORDER_BGRA = C.SDL_PACKEDORDER_BGRA
  constant ARRAYORDER_NONE (line 124) | ARRAYORDER_NONE = C.SDL_ARRAYORDER_NONE
  constant ARRAYORDER_RGB (line 125) | ARRAYORDER_RGB  = C.SDL_ARRAYORDER_RGB
  constant ARRAYORDER_RGBA (line 126) | ARRAYORDER_RGBA = C.SDL_ARRAYORDER_RGBA
  constant ARRAYORDER_ARGB (line 127) | ARRAYORDER_ARGB = C.SDL_ARRAYORDER_ARGB
  constant ARRAYORDER_BGR (line 128) | ARRAYORDER_BGR  = C.SDL_ARRAYORDER_BGR
  constant ARRAYORDER_BGRA (line 129) | ARRAYORDER_BGRA = C.SDL_ARRAYORDER_BGRA
  constant ARRAYORDER_ABGR (line 130) | ARRAYORDER_ABGR = C.SDL_ARRAYORDER_ABGR
  constant PACKEDLAYOUT_NONE (line 135) | PACKEDLAYOUT_NONE    = C.SDL_PACKEDLAYOUT_NONE
  constant PACKEDLAYOUT_332 (line 136) | PACKEDLAYOUT_332     = C.SDL_PACKEDLAYOUT_332
  constant PACKEDLAYOUT_4444 (line 137) | PACKEDLAYOUT_4444    = C.SDL_PACKEDLAYOUT_4444
  constant PACKEDLAYOUT_1555 (line 138) | PACKEDLAYOUT_1555    = C.SDL_PACKEDLAYOUT_1555
  constant PACKEDLAYOUT_5551 (line 139) | PACKEDLAYOUT_5551    = C.SDL_PACKEDLAYOUT_5551
  constant PACKEDLAYOUT_565 (line 140) | PACKEDLAYOUT_565     = C.SDL_PACKEDLAYOUT_565
  constant PACKEDLAYOUT_8888 (line 141) | PACKEDLAYOUT_8888    = C.SDL_PACKEDLAYOUT_8888
  constant PACKEDLAYOUT_2101010 (line 142) | PACKEDLAYOUT_2101010 = C.SDL_PACKEDLAYOUT_2101010
  constant PACKEDLAYOUT_1010102 (line 143) | PACKEDLAYOUT_1010102 = C.SDL_PACKEDLAYOUT_1010102
  constant PIXELFORMAT_UNKNOWN (line 148) | PIXELFORMAT_UNKNOWN     = C.SDL_PIXELFORMAT_UNKNOWN
  constant PIXELFORMAT_INDEX1LSB (line 149) | PIXELFORMAT_INDEX1LSB   = C.SDL_PIXELFORMAT_INDEX1LSB
  constant PIXELFORMAT_INDEX1MSB (line 150) | PIXELFORMAT_INDEX1MSB   = C.SDL_PIXELFORMAT_INDEX1MSB
  constant PIXELFORMAT_INDEX4LSB (line 151) | PIXELFORMAT_INDEX4LSB   = C.SDL_PIXELFORMAT_INDEX4LSB
  constant PIXELFORMAT_INDEX4MSB (line 152) | PIXELFORMAT_INDEX4MSB   = C.SDL_PIXELFORMAT_INDEX4MSB
  constant PIXELFORMAT_INDEX8 (line 153) | PIXELFORMAT_INDEX8      = C.SDL_PIXELFORMAT_INDEX8
  constant PIXELFORMAT_RGB332 (line 154) | PIXELFORMAT_RGB332      = C.SDL_PIXELFORMAT_RGB332
  constant PIXELFORMAT_RGB444 (line 155) | PIXELFORMAT_RGB444      = C.SDL_PIXELFORMAT_RGB444
  constant PIXELFORMAT_RGB555 (line 156) | PIXELFORMAT_RGB555      = C.SDL_PIXELFORMAT_RGB555
  constant PIXELFORMAT_BGR555 (line 157) | PIXELFORMAT_BGR555      = C.SDL_PIXELFORMAT_BGR555
  constant PIXELFORMAT_ARGB4444 (line 158) | PIXELFORMAT_ARGB4444    = C.SDL_PIXELFORMAT_ARGB4444
  constant PIXELFORMAT_RGBA4444 (line 159) | PIXELFORMAT_RGBA4444    = C.SDL_PIXELFORMAT_RGBA4444
  constant PIXELFORMAT_ABGR4444 (line 160) | PIXELFORMAT_ABGR4444    = C.SDL_PIXELFORMAT_ABGR4444
  constant PIXELFORMAT_BGRA4444 (line 161) | PIXELFORMAT_BGRA4444    = C.SDL_PIXELFORMAT_BGRA4444
  constant PIXELFORMAT_ARGB1555 (line 162) | PIXELFORMAT_ARGB1555    = C.SDL_PIXELFORMAT_ARGB1555
  constant PIXELFORMAT_RGBA5551 (line 163) | PIXELFORMAT_RGBA5551    = C.SDL_PIXELFORMAT_RGBA5551
  constant PIXELFORMAT_ABGR1555 (line 164) | PIXELFORMAT_ABGR1555    = C.SDL_PIXELFORMAT_ABGR1555
  constant PIXELFORMAT_BGRA5551 (line 165) | PIXELFORMAT_BGRA5551    = C.SDL_PIXELFORMAT_BGRA5551
  constant PIXELFORMAT_RGB565 (line 166) | PIXELFORMAT_RGB565      = C.SDL_PIXELFORMAT_RGB565
  constant PIXELFORMAT_BGR565 (line 167) | PIXELFORMAT_BGR565      = C.SDL_PIXELFORMAT_BGR565
  constant PIXELFORMAT_RGB24 (line 168) | PIXELFORMAT_RGB24       = C.SDL_PIXELFORMAT_RGB24
  constant PIXELFORMAT_BGR24 (line 169) | PIXELFORMAT_BGR24       = C.SDL_PIXELFORMAT_BGR24
  constant PIXELFORMAT_RGB888 (line 170) | PIXELFORMAT_RGB888      = C.SDL_PIXELFORMAT_RGB888
  constant PIXELFORMAT_RGBX8888 (line 171) | PIXELFORMAT_RGBX8888    = C.SDL_PIXELFORMAT_RGBX8888
  constant PIXELFORMAT_BGR888 (line 172) | PIXELFORMAT_BGR888      = C.SDL_PIXELFORMAT_BGR888
  constant PIXELFORMAT_BGRX8888 (line 173) | PIXELFORMAT_BGRX8888    = C.SDL_PIXELFORMAT_BGRX8888
  constant PIXELFORMAT_ARGB8888 (line 174) | PIXELFORMAT_ARGB8888    = C.SDL_PIXELFORMAT_ARGB8888
  constant PIXELFORMAT_RGBA8888 (line 175) | PIXELFORMAT_RGBA8888    = C.SDL_PIXELFORMAT_RGBA8888
  constant PIXELFORMAT_ABGR8888 (line 176) | PIXELFORMAT_ABGR8888    = C.SDL_PIXELFORMAT_ABGR8888
  constant PIXELFORMAT_BGRA8888 (line 177) | PIXELFORMAT_BGRA8888    = C.SDL_PIXELFORMAT_BGRA8888
  constant PIXELFORMAT_ARGB2101010 (line 178) | PIXELFORMAT_ARGB2101010 = C.SDL_PIXELFORMAT_ARGB2101010
  constant PIXELFORMAT_YV12 (line 179) | PIXELFORMAT_YV12        = C.SDL_PIXELFORMAT_YV12
  constant PIXELFORMAT_IYUV (line 180) | PIXELFORMAT_IYUV        = C.SDL_PIXELFORMAT_IYUV
  constant PIXELFORMAT_YUY2 (line 181) | PIXELFORMAT_YUY2        = C.SDL_PIXELFORMAT_YUY2
  constant PIXELFORMAT_UYVY (line 182) | PIXELFORMAT_UYVY        = C.SDL_PIXELFORMAT_UYVY
  constant PIXELFORMAT_YVYU (line 183) | PIXELFORMAT_YVYU        = C.SDL_PIXELFORMAT_YVYU
  constant ALPHA_OPAQUE (line 196) | ALPHA_OPAQUE      = C.SDL_ALPHA_OPAQUE
  constant ALPHA_TRANSPARENT (line 197) | ALPHA_TRANSPARENT = C.SDL_ALPHA_TRANSPARENT
  function GetPixelFormatName (line 214) | func GetPixelFormatName(format uint) string {
  function PixelFormatEnumToMasks (line 220) | func PixelFormatEnumToMasks(format uint) (bpp int, rmask, gmask, bmask, ...
  function MasksToPixelFormatEnum (line 232) | func MasksToPixelFormatEnum(bpp int, rmask, gmask, bmask, amask uint32) ...
  function AllocFormat (line 239) | func AllocFormat(format uint) (*PixelFormat, error) {
  function AllocPalette (line 255) | func AllocPalette(ncolors int) (*Palette, error) {
  function MapRGB (line 301) | func MapRGB(format *PixelFormat, r, g, b uint8) uint32 {
  function MapRGBA (line 308) | func MapRGBA(format *PixelFormat, r, g, b, a uint8) uint32 {
  function GetRGB (line 315) | func GetRGB(pixel uint32, format *PixelFormat) (r, g, b uint8) {
  function GetRGBA (line 323) | func GetRGBA(pixel uint32, format *PixelFormat) (r, g, b, a uint8) {
  function CalculateGammaRamp (line 331) | func CalculateGammaRamp(gamma float32, ramp *[256]uint16) {
  function BytesPerPixel (line 336) | func BytesPerPixel(format uint32) int {
  function BitsPerPixel (line 341) | func BitsPerPixel(format uint32) int {
  type RGB444 (line 364) | type RGB444 struct
    method RGBA (line 368) | func (c RGB444) RGBA() (r, g, b, a uint32) {
  function rgb444Model (line 378) | func rgb444Model(c color.Color) color.Color {
  type RGB332 (line 390) | type RGB332 struct
    method RGBA (line 394) | func (c RGB332) RGBA() (r, g, b, a uint32) {
  function rgb332Model (line 404) | func rgb332Model(c color.Color) color.Color {
  type RGB565 (line 416) | type RGB565 struct
    method RGBA (line 420) | func (c RGB565) RGBA() (r, g, b, a uint32) {
  function rgb565Model (line 430) | func rgb565Model(c color.Color) color.Color {
  type RGB555 (line 442) | type RGB555 struct
    method RGBA (line 446) | func (c RGB555) RGBA() (r, g, b, a uint32) {
  function rgb555Model (line 456) | func rgb555Model(c color.Color) color.Color {
  type BGR565 (line 468) | type BGR565 struct
    method RGBA (line 472) | func (c BGR565) RGBA() (r, g, b, a uint32) {
  function bgr565Model (line 482) | func bgr565Model(c color.Color) color.Color {
  type BGR555 (line 494) | type BGR555 struct
    method RGBA (line 498) | func (c BGR555) RGBA() (r, g, b, a uint32) {
  function bgr555Model (line 508) | func bgr555Model(c color.Color) color.Color {
  type RGB888 (line 520) | type RGB888 struct
    method RGBA (line 524) | func (c RGB888) RGBA() (r, g, b, a uint32) {
  function rgb888Model (line 534) | func rgb888Model(c color.Color) color.Color {
  type BGR888 (line 546) | type BGR888 struct
    method RGBA (line 550) | func (c BGR888) RGBA() (r, g, b, a uint32) {
  function bgr888Model (line 560) | func bgr888Model(c color.Color) color.Color {
  type ARGB4444 (line 572) | type ARGB4444 struct
    method RGBA (line 576) | func (c ARGB4444) RGBA() (r, g, b, a uint32) {
  function argb4444Model (line 586) | func argb4444Model(c color.Color) color.Color {
  type ABGR4444 (line 599) | type ABGR4444 struct
    method RGBA (line 603) | func (c ABGR4444) RGBA() (r, g, b, a uint32) {
  function abgr4444Model (line 613) | func abgr4444Model(c color.Color) color.Color {
  type RGBA4444 (line 626) | type RGBA4444 struct
    method RGBA (line 630) | func (c RGBA4444) RGBA() (r, g, b, a uint32) {
  function rgba4444Model (line 640) | func rgba4444Model(c color.Color) color.Color {
  type BGRA4444 (line 653) | type BGRA4444 struct
    method RGBA (line 657) | func (c BGRA4444) RGBA() (r, g, b, a uint32) {
  function bgra4444Model (line 667) | func bgra4444Model(c color.Color) color.Color {
  type ARGB1555 (line 680) | type ARGB1555 struct
    method RGBA (line 684) | func (c ARGB1555) RGBA() (r, g, b, a uint32) {
  function argb1555Model (line 694) | func argb1555Model(c color.Color) color.Color {
  type RGBA5551 (line 707) | type RGBA5551 struct
    method RGBA (line 711) | func (c RGBA5551) RGBA() (r, g, b, a uint32) {
  function rgba5551Model (line 721) | func rgba5551Model(c color.Color) color.Color {
  type ABGR1555 (line 734) | type ABGR1555 struct
    method RGBA (line 738) | func (c ABGR1555) RGBA() (r, g, b, a uint32) {
  function abgr1555Model (line 748) | func abgr1555Model(c color.Color) color.Color {
  type BGRA5551 (line 761) | type BGRA5551 struct
    method RGBA (line 765) | func (c BGRA5551) RGBA() (r, g, b, a uint32) {
  function bgra5551Model (line 775) | func bgra5551Model(c color.Color) color.Color {
  type RGBA8888 (line 788) | type RGBA8888 struct
    method RGBA (line 792) | func (c RGBA8888) RGBA() (r, g, b, a uint32) {
  function rgba8888Model (line 802) | func rgba8888Model(c color.Color) color.Color {
  type BGRA8888 (line 815) | type BGRA8888 struct
    method RGBA (line 819) | func (c BGRA8888) RGBA() (r, g, b, a uint32) {
  function bgra8888Model (line 829) | func bgra8888Model(c color.Color) color.Color {
  type ARGB8888 (line 842) | type ARGB8888 struct
    method RGBA (line 846) | func (c ARGB8888) RGBA() (r, g, b, a uint32) {
  function argb8888Model (line 856) | func argb8888Model(c color.Color) color.Color {
  type ABGR8888 (line 869) | type ABGR8888 struct
    method RGBA (line 873) | func (c ABGR8888) RGBA() (r, g, b, a uint32) {
  function abgr8888Model (line 883) | func abgr8888Model(c color.Color) color.Color {
  function downscale8to1bit (line 896) | func downscale8to1bit(alpha byte) byte {
  function downscale8to2bit (line 903) | func downscale8to2bit(in byte) byte {
  function downscale8to3bit (line 907) | func downscale8to3bit(in byte) byte {
  function downscale8to4bit (line 911) | func downscale8to4bit(in byte) byte {
  function downscale8to5bit (line 915) | func downscale8to5bit(in byte) byte {
  function downscale8to6bit (line 919) | func downscale8to6bit(in byte) byte {
  function upscale1to8bit (line 923) | func upscale1to8bit(alphaBit byte) byte {
  function upscale2to8bit (line 930) | func upscale2to8bit(in byte) byte {
  function upscale3to8bit (line 934) | func upscale3to8bit(in byte) byte {
  function upscale4to8bit (line 938) | func upscale4to8bit(in byte) byte {
  function upscale5to8bit (line 942) | func upscale5to8bit(in byte) byte {
  function upscale6to8bit (line 946) | func upscale6to8bit(in byte) byte {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/power.go
  constant POWERSTATE_UNKNOWN (line 9) | POWERSTATE_UNKNOWN    = C.SDL_POWERSTATE_UNKNOWN
  constant POWERSTATE_ON_BATTERY (line 10) | POWERSTATE_ON_BATTERY = C.SDL_POWERSTATE_ON_BATTERY
  constant POWERSTATE_NO_BATTERY (line 11) | POWERSTATE_NO_BATTERY = C.SDL_POWERSTATE_NO_BATTERY
  constant POWERSTATE_CHARGING (line 12) | POWERSTATE_CHARGING   = C.SDL_POWERSTATE_CHARGING
  constant POWERSTATE_CHARGED (line 13) | POWERSTATE_CHARGED    = C.SDL_POWERSTATE_CHARGED
  type PowerState (line 18) | type PowerState
  function GetPowerInfo (line 22) | func GetPowerInfo() (int, int, int) {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/rect.go
  type Point (line 12) | type Point struct
    method cptr (line 42) | func (p *Point) cptr() *C.SDL_Point {
    method InRect (line 60) | func (p *Point) InRect(r *Rect) bool {
  type Rect (line 19) | type Rect struct
    method cptr (line 46) | func (a *Rect) cptr() *C.SDL_Rect {
    method Empty (line 80) | func (a *Rect) Empty() bool {
    method Equals (line 86) | func (a *Rect) Equals(b *Rect) bool {
    method HasIntersection (line 97) | func (a *Rect) HasIntersection(b *Rect) bool {
    method Intersect (line 116) | func (a *Rect) Intersect(b *Rect) (Rect, bool) {
    method Union (line 161) | func (a *Rect) Union(b *Rect) Rect {
    method IntersectLine (line 550) | func (a *Rect) IntersectLine(X1, Y1, X2, Y2 *int32) bool {
  type FPoint (line 28) | type FPoint struct
    method cptr (line 50) | func (p *FPoint) cptr() *C.SDL_FPoint {
    method InRect (line 70) | func (p *FPoint) InRect(r *FRect) bool {
  type FRect (line 35) | type FRect struct
    method cptr (line 54) | func (a *FRect) cptr() *C.SDL_FRect {
    method Empty (line 208) | func (a *FRect) Empty() bool {
    method Equals (line 214) | func (a *FRect) Equals(b *FRect) bool {
    method EqualsEpsilon (line 225) | func (a *FRect) EqualsEpsilon(b *FRect, epsilon float32) bool {
    method HasIntersection (line 238) | func (a *FRect) HasIntersection(b *FRect) bool {
    method Intersect (line 257) | func (a *FRect) Intersect(b *FRect) (FRect, bool) {
    method Union (line 302) | func (a *FRect) Union(b *FRect) FRect {
    method IntersectLine (line 667) | func (a *FRect) IntersectLine(X1, Y1, X2, Y2 *float32) bool {
  function EnclosePoints (line 349) | func EnclosePoints(points []Point, clip *Rect) (Rect, bool) {
  function EncloseFPoints (line 431) | func EncloseFPoints(points []FPoint, clip *FRect) (result FRect, enclose...
  constant codeBottom (line 510) | codeBottom = 1
  constant codeTop (line 511) | codeTop    = 2
  constant codeLeft (line 512) | codeLeft   = 4
  constant codeRight (line 513) | codeRight  = 8
  function computeOutCode (line 516) | func computeOutCode(rect *Rect, x, y int32) int {
  function computeFOutCode (line 532) | func computeFOutCode(rect *FRect, x, y float32) int {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/render.go
  constant RENDERER_SOFTWARE (line 321) | RENDERER_SOFTWARE      = C.SDL_RENDERER_SOFTWARE
  constant RENDERER_ACCELERATED (line 322) | RENDERER_ACCELERATED   = C.SDL_RENDERER_ACCELERATED
  constant RENDERER_PRESENTVSYNC (line 323) | RENDERER_PRESENTVSYNC  = C.SDL_RENDERER_PRESENTVSYNC
  constant RENDERER_TARGETTEXTURE (line 324) | RENDERER_TARGETTEXTURE = C.SDL_RENDERER_TARGETTEXTURE
  type ScaleMode (line 327) | type ScaleMode
  constant ScaleModeNearest (line 331) | ScaleModeNearest ScaleMode = C.SDL_ScaleModeNearest
  constant ScaleModeLinear (line 332) | ScaleModeLinear            = C.SDL_ScaleModeLinear
  constant ScaleModeBest (line 333) | ScaleModeBest              = C.SDL_ScaleModeBest
  constant TEXTUREACCESS_STATIC (line 339) | TEXTUREACCESS_STATIC    = C.SDL_TEXTUREACCESS_STATIC
  constant TEXTUREACCESS_STREAMING (line 340) | TEXTUREACCESS_STREAMING = C.SDL_TEXTUREACCESS_STREAMING
  constant TEXTUREACCESS_TARGET (line 341) | TEXTUREACCESS_TARGET    = C.SDL_TEXTUREACCESS_TARGET
  constant TEXTUREMODULATE_NONE (line 347) | TEXTUREMODULATE_NONE  = C.SDL_TEXTUREMODULATE_NONE
  constant TEXTUREMODULATE_COLOR (line 348) | TEXTUREMODULATE_COLOR = C.SDL_TEXTUREMODULATE_COLOR
  constant TEXTUREMODULATE_ALPHA (line 349) | TEXTUREMODULATE_ALPHA = C.SDL_TEXTUREMODULATE_ALPHA
  constant FLIP_NONE (line 355) | FLIP_NONE       RendererFlip = C.SDL_FLIP_NONE
  constant FLIP_HORIZONTAL (line 356) | FLIP_HORIZONTAL              = C.SDL_FLIP_HORIZONTAL
  constant FLIP_VERTICAL (line 357) | FLIP_VERTICAL                = C.SDL_FLIP_VERTICAL
  type RendererInfo (line 362) | type RendererInfo struct
    method cptr (line 382) | func (info *RendererInfo) cptr() *C.SDL_RendererInfo {
  type cRendererInfo (line 367) | type cRendererInfo struct
    method cptr (line 386) | func (info *cRendererInfo) cptr() *C.SDL_RendererInfo {
  type RendererInfoData (line 374) | type RendererInfoData struct
  type RendererFlip (line 392) | type RendererFlip
    method c (line 402) | func (flip RendererFlip) c() C.SDL_RendererFlip {
  type cRendererFlip (line 393) | type cRendererFlip
  type Vertex (line 396) | type Vertex struct
  function GetNumRenderDrivers (line 408) | func GetNumRenderDrivers() (int, error) {
  function GetRenderDriverInfo (line 415) | func GetRenderDriverInfo(index int, info *RendererInfo) (int, error) {
  function CreateWindowAndRenderer (line 429) | func CreateWindowAndRenderer(w, h int32, flags uint32) (*Window, *Render...
  function CreateRenderer (line 446) | func CreateRenderer(window *Window, index int, flags uint32) (*Renderer,...
  function CreateSoftwareRenderer (line 456) | func CreateSoftwareRenderer(surface *Surface) (*Renderer, error) {
  method GetRenderer (line 466) | func (window *Window) GetRenderer() (*Renderer, error) {
  method GetInfo (line 476) | func (renderer *Renderer) GetInfo() (RendererInfo, error) {
  method GetOutputSize (line 491) | func (renderer *Renderer) GetOutputSize() (w, h int32, err error) {
  method CreateTexture (line 502) | func (renderer *Renderer) CreateTexture(format uint32, access int, w, h ...
  method CreateTextureFromSurface (line 517) | func (renderer *Renderer) CreateTextureFromSurface(surface *Surface) (*T...
  method Query (line 527) | func (texture *Texture) Query() (format uint32, access int, width int32,...
  method SetColorMod (line 546) | func (texture *Texture) SetColorMod(r uint8, g uint8, b uint8) error {
  method SetAlphaMod (line 557) | func (texture *Texture) SetAlphaMod(alpha uint8) error {
  method GetAlphaMod (line 564) | func (texture *Texture) GetAlphaMod() (alpha uint8, err error) {
  method SetBlendMode (line 571) | func (texture *Texture) SetBlendMode(bm BlendMode) error {
  method GetBlendMode (line 578) | func (texture *Texture) GetBlendMode() (bm BlendMode, err error) {
  method Update (line 585) | func (texture *Texture) Update(rect *Rect, pixels unsafe.Pointer, pitch ...
  method UpdateRGBA (line 599) | func (texture *Texture) UpdateRGBA(rect *Rect, pixels []uint32, pitch in...
  method UpdateYUV (line 613) | func (texture *Texture) UpdateYUV(rect *Rect, yPlane []byte, yPitch int,...
  method Lock (line 638) | func (texture *Texture) Lock(rect *Rect) ([]byte, int, error) {
  method Unlock (line 671) | func (texture *Texture) Unlock() {
  method RenderTargetSupported (line 677) | func (renderer *Renderer) RenderTargetSupported() bool {
  method SetRenderTarget (line 683) | func (renderer *Renderer) SetRenderTarget(texture *Texture) error {
  method GetRenderTarget (line 691) | func (renderer *Renderer) GetRenderTarget() *Texture {
  method SetLogicalSize (line 697) | func (renderer *Renderer) SetLogicalSize(w, h int32) error {
  method GetLogicalSize (line 704) | func (renderer *Renderer) GetLogicalSize() (w, h int32) {
  method SetViewport (line 714) | func (renderer *Renderer) SetViewport(rect *Rect) error {
  method GetViewport (line 721) | func (renderer *Renderer) GetViewport() (rect Rect) {
  method IsClipEnabled (line 728) | func (renderer *Renderer) IsClipEnabled() bool {
  method SetClipRect (line 734) | func (renderer *Renderer) SetClipRect(rect *Rect) error {
  method GetClipRect (line 741) | func (renderer *Renderer) GetClipRect() (rect Rect) {
  method SetScale (line 748) | func (renderer *Renderer) SetScale(scaleX, scaleY float32) error {
  method GetScale (line 758) | func (renderer *Renderer) GetScale() (scaleX, scaleY float32) {
  method SetIntegerScale (line 774) | func (renderer *Renderer) SetIntegerScale(v bool) error {
  method GetIntegerScale (line 787) | func (renderer *Renderer) GetIntegerScale() (bool, error) {
  method SetDrawColor (line 797) | func (renderer *Renderer) SetDrawColor(r, g, b, a uint8) error {
  method SetDrawColorArray (line 808) | func (renderer *Renderer) SetDrawColorArray(bs ...uint8) error {
  method GetDrawColor (line 824) | func (renderer *Renderer) GetDrawColor() (r, g, b, a uint8, err error) {
  method SetDrawBlendMode (line 836) | func (renderer *Renderer) SetDrawBlendMode(bm BlendMode) error {
  method GetDrawBlendMode (line 843) | func (renderer *Renderer) GetDrawBlendMode(bm *BlendMode) error {
  method Clear (line 850) | func (renderer *Renderer) Clear() error {
  method DrawPoint (line 857) | func (renderer *Renderer) DrawPoint(x, y int32) error {
  method DrawPoints (line 864) | func (renderer *Renderer) DrawPoints(points []Point) error {
  method DrawLine (line 874) | func (renderer *Renderer) DrawLine(x1, y1, x2, y2 int32) error {
  method DrawLines (line 886) | func (renderer *Renderer) DrawLines(points []Point) error {
  method DrawRect (line 896) | func (renderer *Renderer) DrawRect(rect *Rect) error {
  method DrawRects (line 903) | func (renderer *Renderer) DrawRects(rects []Rect) error {
  method FillRect (line 913) | func (renderer *Renderer) FillRect(rect *Rect) error {
  method FillRects (line 920) | func (renderer *Renderer) FillRects(rects []Rect) error {
  method Copy (line 930) | func (renderer *Renderer) Copy(texture *Texture, src, dst *Rect) error {
  method CopyEx (line 949) | func (renderer *Renderer) CopyEx(texture *Texture, src, dst *Rect, angle...
  method DrawPointF (line 963) | func (renderer *Renderer) DrawPointF(x, y float32) error {
  method DrawPointsF (line 970) | func (renderer *Renderer) DrawPointsF(points []FPoint) error {
  method DrawLineF (line 980) | func (renderer *Renderer) DrawLineF(x1, y1, x2, y2 float32) error {
  method DrawLinesF (line 992) | func (renderer *Renderer) DrawLinesF(points []FPoint) error {
  method DrawRectF (line 1002) | func (renderer *Renderer) DrawRectF(rect *FRect) error {
  method DrawRectsF (line 1009) | func (renderer *Renderer) DrawRectsF(rects []FRect) error {
  method FillRectF (line 1019) | func (renderer *Renderer) FillRectF(rect *FRect) error {
  method FillRectsF (line 1026) | func (renderer *Renderer) FillRectsF(rects []FRect) error {
  method CopyF (line 1036) | func (renderer *Renderer) CopyF(texture *Texture, src *Rect, dst *FRect)...
  method CopyExF (line 1047) | func (renderer *Renderer) CopyExF(texture *Texture, src *Rect, dst *FRec...
  method ReadPixels (line 1061) | func (renderer *Renderer) ReadPixels(rect *Rect, format uint32, pixels u...
  method Present (line 1073) | func (renderer *Renderer) Present() {
  method Destroy (line 1079) | func (texture *Texture) Destroy() error {
  method Destroy (line 1093) | func (renderer *Renderer) Destroy() error {
  method Flush (line 1107) | func (renderer *Renderer) Flush() error {
  method GLBind (line 1113) | func (texture *Texture) GLBind(texw, texh *float32) error {
  method GLUnbind (line 1123) | func (texture *Texture) GLUnbind() error {
  method GetMetalLayer (line 1130) | func (renderer *Renderer) GetMetalLayer() (layer unsafe.Pointer, err err...
  method GetMetalCommandEncoder (line 1140) | func (renderer *Renderer) GetMetalCommandEncoder() (encoder unsafe.Point...
  method UpdateNV (line 1150) | func (texture *Texture) UpdateNV(rect *Rect, yPlane []byte, yPitch int, ...
  method RenderGeometry (line 1172) | func (renderer *Renderer) RenderGeometry(texture *Texture, vertices []Ve...
  method RenderGeometryRaw (line 1190) | func (renderer *Renderer) RenderGeometryRaw(texture *Texture, xy *float3...
  method SetTextureUserData (line 1209) | func (texture *Texture) SetTextureUserData(userdata unsafe.Pointer) (err...
  method GetTextureUserData (line 1216) | func (texture *Texture) GetTextureUserData() (userdata unsafe.Pointer) {
  method RenderWindowToLogical (line 1228) | func (renderer *Renderer) RenderWindowToLogical(windowX, windowY int) (l...
  method RenderLogicalToWindow (line 1242) | func (renderer *Renderer) RenderLogicalToWindow(logicalX, logicalY float...
  method RenderSetVSync (line 1255) | func (renderer *Renderer) RenderSetVSync(vsync bool) (err error) {
  method GetWindow (line 1263) | func (renderer *Renderer) GetWindow() (window *Window, err error) {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/rwops.go
  constant RWOPS_UNKNOWN (line 50) | RWOPS_UNKNOWN   = 0
  constant RWOPS_WINFILE (line 51) | RWOPS_WINFILE   = 1
  constant RWOPS_STDFILE (line 52) | RWOPS_STDFILE   = 2
  constant RWOPS_JNIFILE (line 53) | RWOPS_JNIFILE   = 3
  constant RWOPS_MEMORY (line 54) | RWOPS_MEMORY    = 4
  constant RWOPS_MEMORY_RO (line 55) | RWOPS_MEMORY_RO = 5
  constant RW_SEEK_SET (line 60) | RW_SEEK_SET = C.RW_SEEK_SET
  constant RW_SEEK_CUR (line 61) | RW_SEEK_CUR = C.RW_SEEK_CUR
  constant RW_SEEK_END (line 62) | RW_SEEK_END = C.RW_SEEK_END
  type RWops (line 67) | type RWops
    method cptr (line 69) | func (rwops *RWops) cptr() *C.SDL_RWops {
    method Free (line 108) | func (rwops *RWops) Free() error {
    method Size (line 119) | func (rwops *RWops) Size() (int64, error) {
    method Seek (line 129) | func (rwops *RWops) Seek(offset int64, whence int) (int64, error) {
    method Read (line 143) | func (rwops *RWops) Read(buf []byte) (n int, err error) {
    method Read2 (line 149) | func (rwops *RWops) Read2(buf []byte, size, maxnum uint) (n int, err e...
    method Tell (line 166) | func (rwops *RWops) Tell() (int64, error) {
    method Write (line 180) | func (rwops *RWops) Write(buf []byte) (n int, err error) {
    method Write2 (line 186) | func (rwops *RWops) Write2(buf []byte, size, num uint) (n int, err err...
    method Close (line 203) | func (rwops *RWops) Close() error {
    method ReadU8 (line 212) | func (rwops *RWops) ReadU8() uint8 {
    method ReadLE16 (line 221) | func (rwops *RWops) ReadLE16() uint16 {
    method ReadBE16 (line 230) | func (rwops *RWops) ReadBE16() uint16 {
    method ReadLE32 (line 239) | func (rwops *RWops) ReadLE32() uint32 {
    method ReadBE32 (line 248) | func (rwops *RWops) ReadBE32() uint32 {
    method ReadLE64 (line 257) | func (rwops *RWops) ReadLE64() uint64 {
    method ReadBE64 (line 266) | func (rwops *RWops) ReadBE64() uint64 {
    method LoadFileRW (line 275) | func (src *RWops) LoadFileRW(freesrc bool) (data []byte, size int) {
    method WriteU8 (line 300) | func (rwops *RWops) WriteU8(value uint8) uint {
    method WriteLE16 (line 309) | func (rwops *RWops) WriteLE16(value uint16) uint {
    method WriteBE16 (line 318) | func (rwops *RWops) WriteBE16(value uint16) uint {
    method WriteLE32 (line 327) | func (rwops *RWops) WriteLE32(value uint32) uint {
    method WriteBE32 (line 336) | func (rwops *RWops) WriteBE32(value uint32) uint {
    method WriteLE64 (line 345) | func (rwops *RWops) WriteLE64(value uint64) uint {
    method WriteBE64 (line 354) | func (rwops *RWops) WriteBE64(value uint64) uint {
  function RWFromFile (line 75) | func RWFromFile(file, mode string) *RWops {
  function RWFromMem (line 85) | func RWFromMem(mem []byte) (*RWops, error) {
  function AllocRW (line 102) | func AllocRW() *RWops {
  function LoadFile (line 294) | func LoadFile(file string) (data []byte, size int) {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/scancode.go
  constant SCANCODE_UNKNOWN (line 10) | SCANCODE_UNKNOWN = 0
  constant SCANCODE_A (line 12) | SCANCODE_A = C.SDL_SCANCODE_A
  constant SCANCODE_B (line 13) | SCANCODE_B = C.SDL_SCANCODE_B
  constant SCANCODE_C (line 14) | SCANCODE_C = C.SDL_SCANCODE_C
  constant SCANCODE_D (line 15) | SCANCODE_D = C.SDL_SCANCODE_D
  constant SCANCODE_E (line 16) | SCANCODE_E = C.SDL_SCANCODE_E
  constant SCANCODE_F (line 17) | SCANCODE_F = C.SDL_SCANCODE_F
  constant SCANCODE_G (line 18) | SCANCODE_G = C.SDL_SCANCODE_G
  constant SCANCODE_H (line 19) | SCANCODE_H = C.SDL_SCANCODE_H
  constant SCANCODE_I (line 20) | SCANCODE_I = C.SDL_SCANCODE_I
  constant SCANCODE_J (line 21) | SCANCODE_J = C.SDL_SCANCODE_J
  constant SCANCODE_K (line 22) | SCANCODE_K = C.SDL_SCANCODE_K
  constant SCANCODE_L (line 23) | SCANCODE_L = C.SDL_SCANCODE_L
  constant SCANCODE_M (line 24) | SCANCODE_M = C.SDL_SCANCODE_M
  constant SCANCODE_N (line 25) | SCANCODE_N = C.SDL_SCANCODE_N
  constant SCANCODE_O (line 26) | SCANCODE_O = C.SDL_SCANCODE_O
  constant SCANCODE_P (line 27) | SCANCODE_P = C.SDL_SCANCODE_P
  constant SCANCODE_Q (line 28) | SCANCODE_Q = C.SDL_SCANCODE_Q
  constant SCANCODE_R (line 29) | SCANCODE_R = C.SDL_SCANCODE_R
  constant SCANCODE_S (line 30) | SCANCODE_S = C.SDL_SCANCODE_S
  constant SCANCODE_T (line 31) | SCANCODE_T = C.SDL_SCANCODE_T
  constant SCANCODE_U (line 32) | SCANCODE_U = C.SDL_SCANCODE_U
  constant SCANCODE_V (line 33) | SCANCODE_V = C.SDL_SCANCODE_V
  constant SCANCODE_W (line 34) | SCANCODE_W = C.SDL_SCANCODE_W
  constant SCANCODE_X (line 35) | SCANCODE_X = C.SDL_SCANCODE_X
  constant SCANCODE_Y (line 36) | SCANCODE_Y = C.SDL_SCANCODE_Y
  constant SCANCODE_Z (line 37) | SCANCODE_Z = C.SDL_SCANCODE_Z
  constant SCANCODE_1 (line 39) | SCANCODE_1 = C.SDL_SCANCODE_1
  constant SCANCODE_2 (line 40) | SCANCODE_2 = C.SDL_SCANCODE_2
  constant SCANCODE_3 (line 41) | SCANCODE_3 = C.SDL_SCANCODE_3
  constant SCANCODE_4 (line 42) | SCANCODE_4 = C.SDL_SCANCODE_4
  constant SCANCODE_5 (line 43) | SCANCODE_5 = C.SDL_SCANCODE_5
  constant SCANCODE_6 (line 44) | SCANCODE_6 = C.SDL_SCANCODE_6
  constant SCANCODE_7 (line 45) | SCANCODE_7 = C.SDL_SCANCODE_7
  constant SCANCODE_8 (line 46) | SCANCODE_8 = C.SDL_SCANCODE_8
  constant SCANCODE_9 (line 47) | SCANCODE_9 = C.SDL_SCANCODE_9
  constant SCANCODE_0 (line 48) | SCANCODE_0 = C.SDL_SCANCODE_0
  constant SCANCODE_RETURN (line 50) | SCANCODE_RETURN    = C.SDL_SCANCODE_RETURN
  constant SCANCODE_ESCAPE (line 51) | SCANCODE_ESCAPE    = C.SDL_SCANCODE_ESCAPE
  constant SCANCODE_BACKSPACE (line 52) | SCANCODE_BACKSPACE = C.SDL_SCANCODE_BACKSPACE
  constant SCANCODE_TAB (line 53) | SCANCODE_TAB       = C.SDL_SCANCODE_TAB
  constant SCANCODE_SPACE (line 54) | SCANCODE_SPACE     = C.SDL_SCANCODE_SPACE
  constant SCANCODE_MINUS (line 56) | SCANCODE_MINUS        = C.SDL_SCANCODE_MINUS
  constant SCANCODE_EQUALS (line 57) | SCANCODE_EQUALS       = C.SDL_SCANCODE_EQUALS
  constant SCANCODE_LEFTBRACKET (line 58) | SCANCODE_LEFTBRACKET  = C.SDL_SCANCODE_LEFTBRACKET
  constant SCANCODE_RIGHTBRACKET (line 59) | SCANCODE_RIGHTBRACKET = C.SDL_SCANCODE_RIGHTBRACKET
  constant SCANCODE_BACKSLASH (line 60) | SCANCODE_BACKSLASH    = C.SDL_SCANCODE_BACKSLASH
  constant SCANCODE_NONUSHASH (line 61) | SCANCODE_NONUSHASH    = C.SDL_SCANCODE_NONUSHASH
  constant SCANCODE_SEMICOLON (line 62) | SCANCODE_SEMICOLON    = C.SDL_SCANCODE_SEMICOLON
  constant SCANCODE_APOSTROPHE (line 63) | SCANCODE_APOSTROPHE   = C.SDL_SCANCODE_APOSTROPHE
  constant SCANCODE_GRAVE (line 64) | SCANCODE_GRAVE        = C.SDL_SCANCODE_GRAVE
  constant SCANCODE_COMMA (line 65) | SCANCODE_COMMA        = C.SDL_SCANCODE_COMMA
  constant SCANCODE_PERIOD (line 66) | SCANCODE_PERIOD       = C.SDL_SCANCODE_PERIOD
  constant SCANCODE_SLASH (line 67) | SCANCODE_SLASH        = C.SDL_SCANCODE_SLASH
  constant SCANCODE_CAPSLOCK (line 68) | SCANCODE_CAPSLOCK     = C.SDL_SCANCODE_CAPSLOCK
  constant SCANCODE_F1 (line 69) | SCANCODE_F1           = C.SDL_SCANCODE_F1
  constant SCANCODE_F2 (line 70) | SCANCODE_F2           = C.SDL_SCANCODE_F2
  constant SCANCODE_F3 (line 71) | SCANCODE_F3           = C.SDL_SCANCODE_F3
  constant SCANCODE_F4 (line 72) | SCANCODE_F4           = C.SDL_SCANCODE_F4
  constant SCANCODE_F5 (line 73) | SCANCODE_F5           = C.SDL_SCANCODE_F5
  constant SCANCODE_F6 (line 74) | SCANCODE_F6           = C.SDL_SCANCODE_F6
  constant SCANCODE_F7 (line 75) | SCANCODE_F7           = C.SDL_SCANCODE_F7
  constant SCANCODE_F8 (line 76) | SCANCODE_F8           = C.SDL_SCANCODE_F8
  constant SCANCODE_F9 (line 77) | SCANCODE_F9           = C.SDL_SCANCODE_F9
  constant SCANCODE_F10 (line 78) | SCANCODE_F10          = C.SDL_SCANCODE_F10
  constant SCANCODE_F11 (line 79) | SCANCODE_F11          = C.SDL_SCANCODE_F11
  constant SCANCODE_F12 (line 80) | SCANCODE_F12          = C.SDL_SCANCODE_F12
  constant SCANCODE_PRINTSCREEN (line 81) | SCANCODE_PRINTSCREEN  = C.SDL_SCANCODE_PRINTSCREEN
  constant SCANCODE_SCROLLLOCK (line 82) | SCANCODE_SCROLLLOCK   = C.SDL_SCANCODE_SCROLLLOCK
  constant SCANCODE_PAUSE (line 83) | SCANCODE_PAUSE        = C.SDL_SCANCODE_PAUSE
  constant SCANCODE_INSERT (line 84) | SCANCODE_INSERT       = C.SDL_SCANCODE_INSERT
  constant SCANCODE_HOME (line 85) | SCANCODE_HOME         = C.SDL_SCANCODE_HOME
  constant SCANCODE_PAGEUP (line 86) | SCANCODE_PAGEUP       = C.SDL_SCANCODE_PAGEUP
  constant SCANCODE_DELETE (line 87) | SCANCODE_DELETE       = C.SDL_SCANCODE_DELETE
  constant SCANCODE_END (line 88) | SCANCODE_END          = C.SDL_SCANCODE_END
  constant SCANCODE_PAGEDOWN (line 89) | SCANCODE_PAGEDOWN     = C.SDL_SCANCODE_PAGEDOWN
  constant SCANCODE_RIGHT (line 90) | SCANCODE_RIGHT        = C.SDL_SCANCODE_RIGHT
  constant SCANCODE_LEFT (line 91) | SCANCODE_LEFT         = C.SDL_SCANCODE_LEFT
  constant SCANCODE_DOWN (line 92) | SCANCODE_DOWN         = C.SDL_SCANCODE_DOWN
  constant SCANCODE_UP (line 93) | SCANCODE_UP           = C.SDL_SCANCODE_UP
  constant SCANCODE_NUMLOCKCLEAR (line 95) | SCANCODE_NUMLOCKCLEAR = C.SDL_SCANCODE_NUMLOCKCLEAR
  constant SCANCODE_KP_DIVIDE (line 96) | SCANCODE_KP_DIVIDE    = C.SDL_SCANCODE_KP_DIVIDE
  constant SCANCODE_KP_MULTIPLY (line 97) | SCANCODE_KP_MULTIPLY  = C.SDL_SCANCODE_KP_MULTIPLY
  constant SCANCODE_KP_MINUS (line 98) | SCANCODE_KP_MINUS     = C.SDL_SCANCODE_KP_MINUS
  constant SCANCODE_KP_PLUS (line 99) | SCANCODE_KP_PLUS      = C.SDL_SCANCODE_KP_PLUS
  constant SCANCODE_KP_ENTER (line 100) | SCANCODE_KP_ENTER     = C.SDL_SCANCODE_KP_ENTER
  constant SCANCODE_KP_1 (line 101) | SCANCODE_KP_1         = C.SDL_SCANCODE_KP_1
  constant SCANCODE_KP_2 (line 102) | SCANCODE_KP_2         = C.SDL_SCANCODE_KP_2
  constant SCANCODE_KP_3 (line 103) | SCANCODE_KP_3         = C.SDL_SCANCODE_KP_3
  constant SCANCODE_KP_4 (line 104) | SCANCODE_KP_4         = C.SDL_SCANCODE_KP_4
  constant SCANCODE_KP_5 (line 105) | SCANCODE_KP_5         = C.SDL_SCANCODE_KP_5
  constant SCANCODE_KP_6 (line 106) | SCANCODE_KP_6         = C.SDL_SCANCODE_KP_6
  constant SCANCODE_KP_7 (line 107) | SCANCODE_KP_7         = C.SDL_SCANCODE_KP_7
  constant SCANCODE_KP_8 (line 108) | SCANCODE_KP_8         = C.SDL_SCANCODE_KP_8
  constant SCANCODE_KP_9 (line 109) | SCANCODE_KP_9         = C.SDL_SCANCODE_KP_9
  constant SCANCODE_KP_0 (line 110) | SCANCODE_KP_0         = C.SDL_SCANCODE_KP_0
  constant SCANCODE_KP_PERIOD (line 111) | SCANCODE_KP_PERIOD    = C.SDL_SCANCODE_KP_PERIOD
  constant SCANCODE_NONUSBACKSLASH (line 113) | SCANCODE_NONUSBACKSLASH = C.SDL_SCANCODE_NONUSBACKSLASH
  constant SCANCODE_APPLICATION (line 114) | SCANCODE_APPLICATION    = C.SDL_SCANCODE_APPLICATION
  constant SCANCODE_POWER (line 115) | SCANCODE_POWER          = C.SDL_SCANCODE_POWER
  constant SCANCODE_KP_EQUALS (line 116) | SCANCODE_KP_EQUALS      = C.SDL_SCANCODE_KP_EQUALS
  constant SCANCODE_F13 (line 117) | SCANCODE_F13            = C.SDL_SCANCODE_F13
  constant SCANCODE_F14 (line 118) | SCANCODE_F14            = C.SDL_SCANCODE_F14
  constant SCANCODE_F15 (line 119) | SCANCODE_F15            = C.SDL_SCANCODE_F15
  constant SCANCODE_F16 (line 120) | SCANCODE_F16            = C.SDL_SCANCODE_F16
  constant SCANCODE_F17 (line 121) | SCANCODE_F17            = C.SDL_SCANCODE_F17
  constant SCANCODE_F18 (line 122) | SCANCODE_F18            = C.SDL_SCANCODE_F18
  constant SCANCODE_F19 (line 123) | SCANCODE_F19            = C.SDL_SCANCODE_F19
  constant SCANCODE_F20 (line 124) | SCANCODE_F20            = C.SDL_SCANCODE_F20
  constant SCANCODE_F21 (line 125) | SCANCODE_F21            = C.SDL_SCANCODE_F21
  constant SCANCODE_F22 (line 126) | SCANCODE_F22            = C.SDL_SCANCODE_F22
  constant SCANCODE_F23 (line 127) | SCANCODE_F23            = C.SDL_SCANCODE_F23
  constant SCANCODE_F24 (line 128) | SCANCODE_F24            = C.SDL_SCANCODE_F24
  constant SCANCODE_EXECUTE (line 129) | SCANCODE_EXECUTE        = C.SDL_SCANCODE_EXECUTE
  constant SCANCODE_HELP (line 130) | SCANCODE_HELP           = C.SDL_SCANCODE_HELP
  constant SCANCODE_MENU (line 131) | SCANCODE_MENU           = C.SDL_SCANCODE_MENU
  constant SCANCODE_SELECT (line 132) | SCANCODE_SELECT         = C.SDL_SCANCODE_SELECT
  constant SCANCODE_STOP (line 133) | SCANCODE_STOP           = C.SDL_SCANCODE_STOP
  constant SCANCODE_AGAIN (line 134) | SCANCODE_AGAIN          = C.SDL_SCANCODE_AGAIN
  constant SCANCODE_UNDO (line 135) | SCANCODE_UNDO           = C.SDL_SCANCODE_UNDO
  constant SCANCODE_CUT (line 136) | SCANCODE_CUT            = C.SDL_SCANCODE_CUT
  constant SCANCODE_COPY (line 137) | SCANCODE_COPY           = C.SDL_SCANCODE_COPY
  constant SCANCODE_PASTE (line 138) | SCANCODE_PASTE          = C.SDL_SCANCODE_PASTE
  constant SCANCODE_FIND (line 139) | SCANCODE_FIND           = C.SDL_SCANCODE_FIND
  constant SCANCODE_MUTE (line 140) | SCANCODE_MUTE           = C.SDL_SCANCODE_MUTE
  constant SCANCODE_VOLUMEUP (line 141) | SCANCODE_VOLUMEUP       = C.SDL_SCANCODE_VOLUMEUP
  constant SCANCODE_VOLUMEDOWN (line 142) | SCANCODE_VOLUMEDOWN     = C.SDL_SCANCODE_VOLUMEDOWN
  constant SCANCODE_KP_COMMA (line 143) | SCANCODE_KP_COMMA       = C.SDL_SCANCODE_KP_COMMA
  constant SCANCODE_KP_EQUALSAS400 (line 144) | SCANCODE_KP_EQUALSAS400 = C.SDL_SCANCODE_KP_EQUALSAS400
  constant SCANCODE_INTERNATIONAL1 (line 146) | SCANCODE_INTERNATIONAL1 = C.SDL_SCANCODE_INTERNATIONAL1
  constant SCANCODE_INTERNATIONAL2 (line 147) | SCANCODE_INTERNATIONAL2 = C.SDL_SCANCODE_INTERNATIONAL2
  constant SCANCODE_INTERNATIONAL3 (line 148) | SCANCODE_INTERNATIONAL3 = C.SDL_SCANCODE_INTERNATIONAL3
  constant SCANCODE_INTERNATIONAL4 (line 149) | SCANCODE_INTERNATIONAL4 = C.SDL_SCANCODE_INTERNATIONAL4
  constant SCANCODE_INTERNATIONAL5 (line 150) | SCANCODE_INTERNATIONAL5 = C.SDL_SCANCODE_INTERNATIONAL5
  constant SCANCODE_INTERNATIONAL6 (line 151) | SCANCODE_INTERNATIONAL6 = C.SDL_SCANCODE_INTERNATIONAL6
  constant SCANCODE_INTERNATIONAL7 (line 152) | SCANCODE_INTERNATIONAL7 = C.SDL_SCANCODE_INTERNATIONAL7
  constant SCANCODE_INTERNATIONAL8 (line 153) | SCANCODE_INTERNATIONAL8 = C.SDL_SCANCODE_INTERNATIONAL8
  constant SCANCODE_INTERNATIONAL9 (line 154) | SCANCODE_INTERNATIONAL9 = C.SDL_SCANCODE_INTERNATIONAL9
  constant SCANCODE_LANG1 (line 155) | SCANCODE_LANG1          = C.SDL_SCANCODE_LANG1
  constant SCANCODE_LANG2 (line 156) | SCANCODE_LANG2          = C.SDL_SCANCODE_LANG2
  constant SCANCODE_LANG3 (line 157) | SCANCODE_LANG3          = C.SDL_SCANCODE_LANG3
  constant SCANCODE_LANG4 (line 158) | SCANCODE_LANG4          = C.SDL_SCANCODE_LANG4
  constant SCANCODE_LANG5 (line 159) | SCANCODE_LANG5          = C.SDL_SCANCODE_LANG5
  constant SCANCODE_LANG6 (line 160) | SCANCODE_LANG6          = C.SDL_SCANCODE_LANG6
  constant SCANCODE_LANG7 (line 161) | SCANCODE_LANG7          = C.SDL_SCANCODE_LANG7
  constant SCANCODE_LANG8 (line 162) | SCANCODE_LANG8          = C.SDL_SCANCODE_LANG8
  constant SCANCODE_LANG9 (line 163) | SCANCODE_LANG9          = C.SDL_SCANCODE_LANG9
  constant SCANCODE_ALTERASE (line 165) | SCANCODE_ALTERASE   = C.SDL_SCANCODE_ALTERASE
  constant SCANCODE_SYSREQ (line 166) | SCANCODE_SYSREQ     = C.SDL_SCANCODE_SYSREQ
  constant SCANCODE_CANCEL (line 167) | SCANCODE_CANCEL     = C.SDL_SCANCODE_CANCEL
  constant SCANCODE_CLEAR (line 168) | SCANCODE_CLEAR      = C.SDL_SCANCODE_CLEAR
  constant SCANCODE_PRIOR (line 169) | SCANCODE_PRIOR      = C.SDL_SCANCODE_PRIOR
  constant SCANCODE_RETURN2 (line 170) | SCANCODE_RETURN2    = C.SDL_SCANCODE_RETURN2
  constant SCANCODE_SEPARATOR (line 171) | SCANCODE_SEPARATOR  = C.SDL_SCANCODE_SEPARATOR
  constant SCANCODE_OUT (line 172) | SCANCODE_OUT        = C.SDL_SCANCODE_OUT
  constant SCANCODE_OPER (line 173) | SCANCODE_OPER       = C.SDL_SCANCODE_OPER
  constant SCANCODE_CLEARAGAIN (line 174) | SCANCODE_CLEARAGAIN = C.SDL_SCANCODE_CLEARAGAIN
  constant SCANCODE_CRSEL (line 175) | SCANCODE_CRSEL      = C.SDL_SCANCODE_CRSEL
  constant SCANCODE_EXSEL (line 176) | SCANCODE_EXSEL      = C.SDL_SCANCODE_EXSEL
  constant SCANCODE_KP_00 (line 178) | SCANCODE_KP_00              = C.SDL_SCANCODE_KP_00
  constant SCANCODE_KP_000 (line 179) | SCANCODE_KP_000             = C.SDL_SCANCODE_KP_000
  constant SCANCODE_THOUSANDSSEPARATOR (line 180) | SCANCODE_THOUSANDSSEPARATOR = C.SDL_SCANCODE_THOUSANDSSEPARATOR
  constant SCANCODE_DECIMALSEPARATOR (line 181) | SCANCODE_DECIMALSEPARATOR   = C.SDL_SCANCODE_DECIMALSEPARATOR
  constant SCANCODE_CURRENCYUNIT (line 182) | SCANCODE_CURRENCYUNIT       = C.SDL_SCANCODE_CURRENCYUNIT
  constant SCANCODE_CURRENCYSUBUNIT (line 183) | SCANCODE_CURRENCYSUBUNIT    = C.SDL_SCANCODE_CURRENCYSUBUNIT
  constant SCANCODE_KP_LEFTPAREN (line 184) | SCANCODE_KP_LEFTPAREN       = C.SDL_SCANCODE_KP_LEFTPAREN
  constant SCANCODE_KP_RIGHTPAREN (line 185) | SCANCODE_KP_RIGHTPAREN      = C.SDL_SCANCODE_KP_RIGHTPAREN
  constant SCANCODE_KP_LEFTBRACE (line 186) | SCANCODE_KP_LEFTBRACE       = C.SDL_SCANCODE_KP_LEFTBRACE
  constant SCANCODE_KP_RIGHTBRACE (line 187) | SCANCODE_KP_RIGHTBRACE      = C.SDL_SCANCODE_KP_RIGHTBRACE
  constant SCANCODE_KP_TAB (line 188) | SCANCODE_KP_TAB             = C.SDL_SCANCODE_KP_TAB
  constant SCANCODE_KP_BACKSPACE (line 189) | SCANCODE_KP_BACKSPACE       = C.SDL_SCANCODE_KP_BACKSPACE
  constant SCANCODE_KP_A (line 190) | SCANCODE_KP_A               = C.SDL_SCANCODE_KP_A
  constant SCANCODE_KP_B (line 191) | SCANCODE_KP_B               = C.SDL_SCANCODE_KP_B
  constant SCANCODE_KP_C (line 192) | SCANCODE_KP_C               = C.SDL_SCANCODE_KP_C
  constant SCANCODE_KP_D (line 193) | SCANCODE_KP_D               = C.SDL_SCANCODE_KP_D
  constant SCANCODE_KP_E (line 194) | SCANCODE_KP_E               = C.SDL_SCANCODE_KP_E
  constant SCANCODE_KP_F (line 195) | SCANCODE_KP_F               = C.SDL_SCANCODE_KP_F
  constant SCANCODE_KP_XOR (line 196) | SCANCODE_KP_XOR             = C.SDL_SCANCODE_KP_XOR
  constant SCANCODE_KP_POWER (line 197) | SCANCODE_KP_POWER           = C.SDL_SCANCODE_KP_POWER
  constant SCANCODE_KP_PERCENT (line 198) | SCANCODE_KP_PERCENT         = C.SDL_SCANCODE_KP_PERCENT
  constant SCANCODE_KP_LESS (line 199) | SCANCODE_KP_LESS            = C.SDL_SCANCODE_KP_LESS
  constant SCANCODE_KP_GREATER (line 200) | SCANCODE_KP_GREATER         = C.SDL_SCANCODE_KP_GREATER
  constant SCANCODE_KP_AMPERSAND (line 201) | SCANCODE_KP_AMPERSAND       = C.SDL_SCANCODE_KP_AMPERSAND
  constant SCANCODE_KP_DBLAMPERSAND (line 202) | SCANCODE_KP_DBLAMPERSAND    = C.SDL_SCANCODE_KP_DBLAMPERSAND
  constant SCANCODE_KP_VERTICALBAR (line 203) | SCANCODE_KP_VERTICALBAR     = C.SDL_SCANCODE_KP_VERTICALBAR
  constant SCANCODE_KP_DBLVERTICALBAR (line 204) | SCANCODE_KP_DBLVERTICALBAR  = C.SDL_SCANCODE_KP_DBLVERTICALBAR
  constant SCANCODE_KP_COLON (line 205) | SCANCODE_KP_COLON           = C.SDL_SCANCODE_KP_COLON
  constant SCANCODE_KP_HASH (line 206) | SCANCODE_KP_HASH            = C.SDL_SCANCODE_KP_HASH
  constant SCANCODE_KP_SPACE (line 207) | SCANCODE_KP_SPACE           = C.SDL_SCANCODE_KP_SPACE
  constant SCANCODE_KP_AT (line 208) | SCANCODE_KP_AT              = C.SDL_SCANCODE_KP_AT
  constant SCANCODE_KP_EXCLAM (line 209) | SCANCODE_KP_EXCLAM          = C.SDL_SCANCODE_KP_EXCLAM
  constant SCANCODE_KP_MEMSTORE (line 210) | SCANCODE_KP_MEMSTORE        = C.SDL_SCANCODE_KP_MEMSTORE
  constant SCANCODE_KP_MEMRECALL (line 211) | SCANCODE_KP_MEMRECALL       = C.SDL_SCANCODE_KP_MEMRECALL
  constant SCANCODE_KP_MEMCLEAR (line 212) | SCANCODE_KP_MEMCLEAR        = C.SDL_SCANCODE_KP_MEMCLEAR
  constant SCANCODE_KP_MEMADD (line 213) | SCANCODE_KP_MEMADD          = C.SDL_SCANCODE_KP_MEMADD
  constant SCANCODE_KP_MEMSUBTRACT (line 214) | SCANCODE_KP_MEMSUBTRACT     = C.SDL_SCANCODE_KP_MEMSUBTRACT
  constant SCANCODE_KP_MEMMULTIPLY (line 215) | SCANCODE_KP_MEMMULTIPLY     = C.SDL_SCANCODE_KP_MEMMULTIPLY
  constant SCANCODE_KP_MEMDIVIDE (line 216) | SCANCODE_KP_MEMDIVIDE       = C.SDL_SCANCODE_KP_MEMDIVIDE
  constant SCANCODE_KP_PLUSMINUS (line 217) | SCANCODE_KP_PLUSMINUS       = C.SDL_SCANCODE_KP_PLUSMINUS
  constant SCANCODE_KP_CLEAR (line 218) | SCANCODE_KP_CLEAR           = C.SDL_SCANCODE_KP_CLEAR
  constant SCANCODE_KP_CLEARENTRY (line 219) | SCANCODE_KP_CLEARENTRY      = C.SDL_SCANCODE_KP_CLEARENTRY
  constant SCANCODE_KP_BINARY (line 220) | SCANCODE_KP_BINARY          = C.SDL_SCANCODE_KP_BINARY
  constant SCANCODE_KP_OCTAL (line 221) | SCANCODE_KP_OCTAL           = C.SDL_SCANCODE_KP_OCTAL
  constant SCANCODE_KP_DECIMAL (line 222) | SCANCODE_KP_DECIMAL         = C.SDL_SCANCODE_KP_DECIMAL
  constant SCANCODE_KP_HEXADECIMAL (line 223) | SCANCODE_KP_HEXADECIMAL     = C.SDL_SCANCODE_KP_HEXADECIMAL
  constant SCANCODE_LCTRL (line 225) | SCANCODE_LCTRL          = C.SDL_SCANCODE_LCTRL
  constant SCANCODE_LSHIFT (line 226) | SCANCODE_LSHIFT         = C.SDL_SCANCODE_LSHIFT
  constant SCANCODE_LALT (line 227) | SCANCODE_LALT           = C.SDL_SCANCODE_LALT
  constant SCANCODE_LGUI (line 228) | SCANCODE_LGUI           = C.SDL_SCANCODE_LGUI
  constant SCANCODE_RCTRL (line 229) | SCANCODE_RCTRL          = C.SDL_SCANCODE_RCTRL
  constant SCANCODE_RSHIFT (line 230) | SCANCODE_RSHIFT         = C.SDL_SCANCODE_RSHIFT
  constant SCANCODE_RALT (line 231) | SCANCODE_RALT           = C.SDL_SCANCODE_RALT
  constant SCANCODE_RGUI (line 232) | SCANCODE_RGUI           = C.SDL_SCANCODE_RGUI
  constant SCANCODE_MODE (line 233) | SCANCODE_MODE           = C.SDL_SCANCODE_MODE
  constant SCANCODE_AUDIONEXT (line 234) | SCANCODE_AUDIONEXT      = C.SDL_SCANCODE_AUDIONEXT
  constant SCANCODE_AUDIOPREV (line 235) | SCANCODE_AUDIOPREV      = C.SDL_SCANCODE_AUDIOPREV
  constant SCANCODE_AUDIOSTOP (line 236) | SCANCODE_AUDIOSTOP      = C.SDL_SCANCODE_AUDIOSTOP
  constant SCANCODE_AUDIOPLAY (line 237) | SCANCODE_AUDIOPLAY      = C.SDL_SCANCODE_AUDIOPLAY
  constant SCANCODE_AUDIOMUTE (line 238) | SCANCODE_AUDIOMUTE      = C.SDL_SCANCODE_AUDIOMUTE
  constant SCANCODE_MEDIASELECT (line 239) | SCANCODE_MEDIASELECT    = C.SDL_SCANCODE_MEDIASELECT
  constant SCANCODE_WWW (line 240) | SCANCODE_WWW            = C.SDL_SCANCODE_WWW
  constant SCANCODE_MAIL (line 241) | SCANCODE_MAIL           = C.SDL_SCANCODE_MAIL
  constant SCANCODE_CALCULATOR (line 242) | SCANCODE_CALCULATOR     = C.SDL_SCANCODE_CALCULATOR
  constant SCANCODE_COMPUTER (line 243) | SCANCODE_COMPUTER       = C.SDL_SCANCODE_COMPUTER
  constant SCANCODE_AC_SEARCH (line 244) | SCANCODE_AC_SEARCH      = C.SDL_SCANCODE_AC_SEARCH
  constant SCANCODE_AC_HOME (line 245) | SCANCODE_AC_HOME        = C.SDL_SCANCODE_AC_HOME
  constant SCANCODE_AC_BACK (line 246) | SCANCODE_AC_BACK        = C.SDL_SCANCODE_AC_BACK
  constant SCANCODE_AC_FORWARD (line 247) | SCANCODE_AC_FORWARD     = C.SDL_SCANCODE_AC_FORWARD
  constant SCANCODE_AC_STOP (line 248) | SCANCODE_AC_STOP        = C.SDL_SCANCODE_AC_STOP
  constant SCANCODE_AC_REFRESH (line 249) | SCANCODE_AC_REFRESH     = C.SDL_SCANCODE_AC_REFRESH
  constant SCANCODE_AC_BOOKMARKS (line 250) | SCANCODE_AC_BOOKMARKS   = C.SDL_SCANCODE_AC_BOOKMARKS
  constant SCANCODE_BRIGHTNESSDOWN (line 251) | SCANCODE_BRIGHTNESSDOWN = C.SDL_SCANCODE_BRIGHTNESSDOWN
  constant SCANCODE_BRIGHTNESSUP (line 252) | SCANCODE_BRIGHTNESSUP   = C.SDL_SCANCODE_BRIGHTNESSUP
  constant SCANCODE_DISPLAYSWITCH (line 253) | SCANCODE_DISPLAYSWITCH  = C.SDL_SCANCODE_DISPLAYSWITCH
  constant SCANCODE_KBDILLUMTOGGLE (line 254) | SCANCODE_KBDILLUMTOGGLE = C.SDL_SCANCODE_KBDILLUMTOGGLE
  constant SCANCODE_KBDILLUMDOWN (line 255) | SCANCODE_KBDILLUMDOWN   = C.SDL_SCANCODE_KBDILLUMDOWN
  constant SCANCODE_KBDILLUMUP (line 256) | SCANCODE_KBDILLUMUP     = C.SDL_SCANCODE_KBDILLUMUP
  constant SCANCODE_EJECT (line 257) | SCANCODE_EJECT          = C.SDL_SCANCODE_EJECT
  constant SCANCODE_SLEEP (line 258) | SCANCODE_SLEEP          = C.SDL_SCANCODE_SLEEP
  constant SCANCODE_APP1 (line 259) | SCANCODE_APP1           = C.SDL_SCANCODE_APP1
  constant SCANCODE_APP2 (line 260) | SCANCODE_APP2           = C.SDL_SCANCODE_APP2
  constant NUM_SCANCODES (line 261) | NUM_SCANCODES           = C.SDL_NUM_SCANCODES
  type Scancode (line 266) | type Scancode
    method c (line 268) | func (code Scancode) c() C.SDL_Scancode {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/sdl.go
  constant INIT_TIMER (line 25) | INIT_TIMER          = C.SDL_INIT_TIMER
  constant INIT_AUDIO (line 26) | INIT_AUDIO          = C.SDL_INIT_AUDIO
  constant INIT_VIDEO (line 27) | INIT_VIDEO          = C.SDL_INIT_VIDEO
  constant INIT_JOYSTICK (line 28) | INIT_JOYSTICK       = C.SDL_INIT_JOYSTICK
  constant INIT_HAPTIC (line 29) | INIT_HAPTIC         = C.SDL_INIT_HAPTIC
  constant INIT_GAMECONTROLLER (line 30) | INIT_GAMECONTROLLER = C.SDL_INIT_GAMECONTROLLER
  constant INIT_EVENTS (line 31) | INIT_EVENTS         = C.SDL_INIT_EVENTS
  constant INIT_NOPARACHUTE (line 32) | INIT_NOPARACHUTE    = C.SDL_INIT_NOPARACHUTE
  constant INIT_SENSOR (line 33) | INIT_SENSOR         = C.SDL_INIT_SENSOR
  constant INIT_EVERYTHING (line 34) | INIT_EVERYTHING     = C.SDL_INIT_EVERYTHING
  constant RELEASED (line 38) | RELEASED = 0
  constant PRESSED (line 39) | PRESSED  = 1
  function init (line 48) | func init() {
  function Main (line 78) | func Main(main func()) {
  function Do (line 107) | func Do(f func()) {
  function Init (line 113) | func Init(flags uint32) error {
  function Quit (line 122) | func Quit() {
  function InitSubSystem (line 133) | func InitSubSystem(flags uint32) error {
  function QuitSubSystem (line 142) | func QuitSubSystem(flags uint32) {
  function WasInit (line 148) | func WasInit(flags uint32) uint32 {
  function GetPlatform (line 154) | func GetPlatform() string {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/sdl_wrapper.h
  type SDL_FPoint (line 17) | typedef struct SDL_FPoint
  type SDL_FRect (line 27) | typedef struct SDL_FRect

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/sensor.go
  constant STANDARD_GRAVITY (line 162) | STANDARD_GRAVITY = 9.80665
  constant SENSOR_INVALID (line 172) | SENSOR_INVALID SensorType = C.SDL_SENSOR_INVALID
  constant SENSOR_UNKNOWN (line 173) | SENSOR_UNKNOWN SensorType = C.SDL_SENSOR_UNKNOWN
  constant SENSOR_ACCEL (line 174) | SENSOR_ACCEL   SensorType = C.SDL_SENSOR_ACCEL
  constant SENSOR_GYRO (line 175) | SENSOR_GYRO    SensorType = C.SDL_SENSOR_GYRO
  type Sensor (line 178) | type Sensor
    method GetName (line 254) | func (sensor *Sensor) GetName() (name string) {
    method GetType (line 265) | func (sensor *Sensor) GetType() (typ SensorType) {
    method GetNonPortableType (line 276) | func (sensor *Sensor) GetNonPortableType() (typ int) {
    method GetInstanceID (line 287) | func (sensor *Sensor) GetInstanceID() (id SensorID) {
    method GetData (line 296) | func (sensor *Sensor) GetData(data []float32) (err error) {
    method Close (line 308) | func (sensor *Sensor) Close() {
  type SensorID (line 179) | type SensorID
  type SensorType (line 180) | type SensorType
  function NumSensors (line 184) | func NumSensors() int {
  function SensorGetDeviceName (line 194) | func SensorGetDeviceName(deviceIndex int) (name string) {
  function SensorGetDeviceType (line 205) | func SensorGetDeviceType(deviceIndex int) (typ SensorType) {
  function SensorGetDeviceNonPortableType (line 216) | func SensorGetDeviceNonPortableType(deviceIndex int) (typ int) {
  function SensorGetDeviceInstanceID (line 227) | func SensorGetDeviceInstanceID(deviceIndex int) (id SensorID) {
  function SensorOpen (line 238) | func SensorOpen(deviceIndex int) (sensor *Sensor) {
  function SensorFromInstanceID (line 245) | func SensorFromInstanceID(id SensorID) (sensor *Sensor) {
  function SensorUpdate (line 318) | func SensorUpdate() {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/shape.go
  constant NONSHAPEABLE_WINDOW (line 19) | NONSHAPEABLE_WINDOW    = C.SDL_NONSHAPEABLE_WINDOW
  constant INVALID_SHAPE_ARGUMENT (line 20) | INVALID_SHAPE_ARGUMENT = C.SDL_INVALID_SHAPE_ARGUMENT
  constant WINDOW_LACKS_SHAPE (line 21) | WINDOW_LACKS_SHAPE     = C.SDL_WINDOW_LACKS_SHAPE
  type WindowShapeModeKind (line 24) | type WindowShapeModeKind
  constant ShapeModeDefaultKind (line 27) | ShapeModeDefaultKind              WindowShapeModeKind = C.ShapeModeDefault
  constant ShapeModeBinarizeAlphaKind (line 28) | ShapeModeBinarizeAlphaKind        WindowShapeModeKind = C.ShapeModeBinar...
  constant ShapeModeReverseBinarizeAlphaKind (line 29) | ShapeModeReverseBinarizeAlphaKind WindowShapeModeKind = C.ShapeModeRever...
  constant ShapeModeColorKeyKind (line 30) | ShapeModeColorKeyKind             WindowShapeModeKind = C.ShapeModeColorKey
  function SHAPEMODEALPHA (line 33) | func SHAPEMODEALPHA(mode WindowShapeModeKind) bool {
  type cWindowShapeParams (line 41) | type cWindowShapeParams
  type cWindowShapeMode (line 43) | type cWindowShapeMode struct
    method goWSM (line 111) | func (cwsm cWindowShapeMode) goWSM() WindowShapeMode {
    method cptr (line 142) | func (wsm *cWindowShapeMode) cptr() *C.SDL_WindowShapeMode {
  type WindowShapeMode (line 48) | type WindowShapeMode interface
  type ShapeModeDefault (line 53) | type ShapeModeDefault struct
    method Mode (line 55) | func (smd ShapeModeDefault) Mode() WindowShapeModeKind {
    method cWSM (line 59) | func (smd ShapeModeDefault) cWSM() cWindowShapeMode {
  type ShapeModeBinarizeAlpha (line 66) | type ShapeModeBinarizeAlpha struct
    method Mode (line 70) | func (smba ShapeModeBinarizeAlpha) Mode() WindowShapeModeKind {
    method cWSM (line 74) | func (smba ShapeModeBinarizeAlpha) cWSM() cWindowShapeMode {
  type ShapeModeReverseBinarizeAlpha (line 81) | type ShapeModeReverseBinarizeAlpha struct
    method Mode (line 85) | func (smba ShapeModeReverseBinarizeAlpha) Mode() WindowShapeModeKind {
    method cWSM (line 89) | func (smba ShapeModeReverseBinarizeAlpha) cWSM() cWindowShapeMode {
  type ShapeModeColorKey (line 96) | type ShapeModeColorKey struct
    method Mode (line 100) | func (smck ShapeModeColorKey) Mode() WindowShapeModeKind {
    method cWSM (line 104) | func (smck ShapeModeColorKey) cWSM() cWindowShapeMode {
  function CreateShapedWindow (line 148) | func CreateShapedWindow(title string, x, y, w, h uint32, flags uint32) (...
  method IsShaped (line 158) | func (window *Window) IsShaped() bool {
  method SetShape (line 164) | func (window *Window) SetShape(shape *Surface, shape_mode WindowShapeMod...
  method GetShapeMode (line 175) | func (window *Window) GetShapeMode() (WindowShapeMode, int32) {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/surface.go
  constant SWSURFACE (line 128) | SWSURFACE = C.SDL_SWSURFACE
  constant PREALLOC (line 129) | PREALLOC  = C.SDL_PREALLOC
  constant RLEACCEL (line 130) | RLEACCEL  = C.SDL_RLEACCEL
  constant DONTFREE (line 131) | DONTFREE  = C.SDL_DONTFREE
  type YUV_CONVERSION_MODE (line 134) | type YUV_CONVERSION_MODE
  constant YUV_CONVERSION_JPEG (line 138) | YUV_CONVERSION_JPEG      YUV_CONVERSION_MODE = C.SDL_YUV_CONVERSION_JPEG
  constant YUV_CONVERSION_BT601 (line 139) | YUV_CONVERSION_BT601                         = C.SDL_YUV_CONVERSION_BT601
  constant YUV_CONVERSION_BT709 (line 140) | YUV_CONVERSION_BT709                         = C.SDL_YUV_CONVERSION_BT709
  constant YUV_CONVERSION_AUTOMATIC (line 141) | YUV_CONVERSION_AUTOMATIC                     = C.SDL_YUV_CONVERSION_AUTO...
  type Surface (line 146) | type Surface struct
    method cptr (line 162) | func (surface *Surface) cptr() *C.SDL_Surface {
    method MustLock (line 168) | func (surface *Surface) MustLock() bool {
    method Free (line 263) | func (surface *Surface) Free() {
    method SetPalette (line 269) | func (surface *Surface) SetPalette(palette *Palette) error {
    method Lock (line 278) | func (surface *Surface) Lock() error {
    method Unlock (line 287) | func (surface *Surface) Unlock() {
    method SaveBMPRW (line 309) | func (surface *Surface) SaveBMPRW(dst *RWops, freeDst bool) error {
    method SaveBMP (line 318) | func (surface *Surface) SaveBMP(file string) error {
    method SetRLE (line 324) | func (surface *Surface) SetRLE(flag bool) error {
    method SetColorKey (line 333) | func (surface *Surface) SetColorKey(flag bool, key uint32) error {
    method HasColorKey (line 342) | func (surface *Surface) HasColorKey() bool {
    method GetColorKey (line 348) | func (surface *Surface) GetColorKey() (key uint32, err error) {
    method SetColorMod (line 358) | func (surface *Surface) SetColorMod(r, g, b uint8) error {
    method GetColorMod (line 367) | func (surface *Surface) GetColorMod() (r, g, b uint8, err error) {
    method SetAlphaMod (line 379) | func (surface *Surface) SetAlphaMod(alpha uint8) error {
    method GetAlphaMod (line 388) | func (surface *Surface) GetAlphaMod() (alpha uint8, err error) {
    method SetBlendMode (line 398) | func (surface *Surface) SetBlendMode(bm BlendMode) error {
    method GetBlendMode (line 407) | func (surface *Surface) GetBlendMode() (bm BlendMode, err error) {
    method SetClipRect (line 416) | func (surface *Surface) SetClipRect(rect *Rect) bool {
    method GetClipRect (line 422) | func (surface *Surface) GetClipRect(rect *Rect) {
    method Convert (line 428) | func (surface *Surface) Convert(fmt *PixelFormat, flags uint32) (*Surf...
    method ConvertFormat (line 438) | func (surface *Surface) ConvertFormat(pixelFormat uint32, flags uint32...
    method FillRect (line 458) | func (surface *Surface) FillRect(rect *Rect, color uint32) error {
    method FillRects (line 467) | func (surface *Surface) FillRects(rects []Rect, color uint32) error {
    method Blit (line 476) | func (surface *Surface) Blit(srcRect *Rect, dst *Surface, dstRect *Rec...
    method BlitScaled (line 485) | func (surface *Surface) BlitScaled(srcRect *Rect, dst *Surface, dstRec...
    method UpperBlit (line 494) | func (surface *Surface) UpperBlit(srcRect *Rect, dst *Surface, dstRect...
    method LowerBlit (line 503) | func (surface *Surface) LowerBlit(srcRect *Rect, dst *Surface, dstRect...
    method SoftStretch (line 512) | func (surface *Surface) SoftStretch(srcRect *Rect, dst *Surface, dstRe...
    method UpperBlitScaled (line 521) | func (surface *Surface) UpperBlitScaled(srcRect *Rect, dst *Surface, d...
    method LowerBlitScaled (line 530) | func (surface *Surface) LowerBlitScaled(srcRect *Rect, dst *Surface, d...
    method PixelNum (line 538) | func (surface *Surface) PixelNum() int {
    method BytesPerPixel (line 543) | func (surface *Surface) BytesPerPixel() int {
    method Pixels (line 548) | func (surface *Surface) Pixels() []byte {
    method Data (line 559) | func (surface *Surface) Data() unsafe.Pointer {
    method Duplicate (line 564) | func (surface *Surface) Duplicate() (newSurface *Surface, err error) {
    method ColorModel (line 576) | func (surface *Surface) ColorModel() color.Model {
    method Bounds (line 621) | func (surface *Surface) Bounds() image.Rectangle {
    method At (line 626) | func (surface *Surface) At(x, y int) color.Color {
    method Set (line 636) | func (surface *Surface) Set(x, y int, c color.Color) {
    method SoftStretchLinear (line 784) | func (surface *Surface) SoftStretchLinear(srcRect *Rect, dst *Surface,...
  type cSurface (line 160) | type cSurface
  function CreateRGBSurface (line 174) | func CreateRGBSurface(flags uint32, width, height, depth int32, Rmask, G...
  function CreateRGBSurfaceFrom (line 192) | func CreateRGBSurfaceFrom(pixels unsafe.Pointer, width, height int32, de...
  function CreateRGBSurfaceWithFormat (line 211) | func CreateRGBSurfaceWithFormat(flags uint32, width, height, depth int32...
  function CreateRGBSurfaceWithFormatFrom (line 226) | func CreateRGBSurfaceWithFormatFrom(pixels unsafe.Pointer, width, height...
  function SetYUVConversionMode (line 242) | func SetYUVConversionMode(mode YUV_CONVERSION_MODE) {
  function GetYUVConversionMode (line 249) | func GetYUVConversionMode() YUV_CONVERSION_MODE {
  function GetYUVConversionModeForResolution (line 255) | func GetYUVConversionModeForResolution(width, height int) YUV_CONVERSION...
  function LoadBMPRW (line 293) | func LoadBMPRW(src *RWops, freeSrc bool) (*Surface, error) {
  function LoadBMP (line 303) | func LoadBMP(file string) (*Surface, error) {
  function ConvertPixels (line 448) | func ConvertPixels(width, height int32, srcFormat uint32, src unsafe.Poi...
  function PremultiplyAlpha (line 795) | func PremultiplyAlpha(width, height int, srcFormat uint32, src []byte, s...

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/sysrender.go
  type Texture (line 9) | type Texture
    method cptr (line 15) | func (t *Texture) cptr() *C.SDL_Texture {
  type Renderer (line 13) | type Renderer
    method cptr (line 19) | func (r *Renderer) cptr() *C.SDL_Renderer {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/system.c
  function SetWindowsMessageHook (line 5) | void SetWindowsMessageHook()

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/system.go
  function IsTablet (line 23) | func IsTablet() bool {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/system_android.go
  constant ANDROID_EXTERNAL_STORAGE_READ (line 42) | ANDROID_EXTERNAL_STORAGE_READ  = C.SDL_ANDROID_EXTERNAL_STORAGE_READ
  constant ANDROID_EXTERNAL_STORAGE_WRITE (line 43) | ANDROID_EXTERNAL_STORAGE_WRITE = C.SDL_ANDROID_EXTERNAL_STORAGE_WRITE
  function AndroidGetInternalStoragePath (line 48) | func AndroidGetInternalStoragePath() string {
  function AndroidGetExternalStoragePath (line 54) | func AndroidGetExternalStoragePath() string {
  function AndroidGetExternalStorageState (line 60) | func AndroidGetExternalStorageState() int {
  function AndroidGetJNIEnv (line 66) | func AndroidGetJNIEnv() unsafe.Pointer {
  function AndroidGetActivity (line 72) | func AndroidGetActivity() unsafe.Pointer {
  function IsAndroidTV (line 78) | func IsAndroidTV() bool {
  function AndroidShowToast (line 84) | func AndroidShowToast(message string, duration, gravity, xoffset, yoffse...

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/system_linux.go
  function LinuxSetThreadPriority (line 41) | func LinuxSetThreadPriority(threadID int64, priority int) (err error) {
  function LinuxSetThreadPriorityAndPolicy (line 52) | func LinuxSetThreadPriorityAndPolicy(threadID int64, sdlPriority, schedP...

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/system_windows.go
  type WindowsMessageHook (line 27) | type WindowsMessageHook
  type ID3D11Device (line 30) | type ID3D11Device
  function SetWindowsMessageHook (line 34) | func SetWindowsMessageHook(callback WindowsMessageHook, userdata interfa...
  function goWindowsMessageHook (line 40) | func goWindowsMessageHook(userdata interface{}, hWnd unsafe.Pointer, mes...
  method GetD3D11Device (line 49) | func (renderer *Renderer) GetD3D11Device() (device *ID3D11Device, err er...

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/syswm.go
  constant SYSWM_UNKNOWN (line 49) | SYSWM_UNKNOWN  = C.SDL_SYSWM_UNKNOWN
  constant SYSWM_WINDOWS (line 50) | SYSWM_WINDOWS  = C.SDL_SYSWM_WINDOWS
  constant SYSWM_X11 (line 51) | SYSWM_X11      = C.SDL_SYSWM_X11
  constant SYSWM_DIRECTFB (line 52) | SYSWM_DIRECTFB = C.SDL_SYSWM_DIRECTFB
  constant SYSWM_COCOA (line 53) | SYSWM_COCOA    = C.SDL_SYSWM_COCOA
  constant SYSWM_UIKIT (line 54) | SYSWM_UIKIT    = C.SDL_SYSWM_UIKIT
  constant SYSWM_WAYLAND (line 55) | SYSWM_WAYLAND  = C.SDL_SYSWM_WAYLAND
  constant SYSWM_MIR (line 56) | SYSWM_MIR      = C.SDL_SYSWM_MIR
  constant SYSWM_WINRT (line 57) | SYSWM_WINRT    = C.SDL_SYSWM_WINRT
  constant SYSWM_ANDROID (line 58) | SYSWM_ANDROID  = C.SDL_SYSWM_ANDROID
  constant SYSWM_VIVANTE (line 59) | SYSWM_VIVANTE  = C.SDL_SYSWM_VIVANTE
  type SysWMInfo (line 64) | type SysWMInfo struct
    method cptr (line 108) | func (info *SysWMInfo) cptr() *C.SDL_SysWMinfo {
    method GetWindowsInfo (line 124) | func (info *SysWMInfo) GetWindowsInfo() *WindowsInfo {
    method GetX11Info (line 129) | func (info *SysWMInfo) GetX11Info() *X11Info {
    method GetDFBInfo (line 134) | func (info *SysWMInfo) GetDFBInfo() *DFBInfo {
    method GetCocoaInfo (line 139) | func (info *SysWMInfo) GetCocoaInfo() *CocoaInfo {
    method GetUIKitInfo (line 144) | func (info *SysWMInfo) GetUIKitInfo() *UIKitInfo {
  type WindowsInfo (line 71) | type WindowsInfo struct
  type X11Info (line 78) | type X11Info struct
  type DFBInfo (line 84) | type DFBInfo struct
  type CocoaInfo (line 91) | type CocoaInfo struct
  type UIKitInfo (line 96) | type UIKitInfo struct
  type SysWMmsg (line 102) | type SysWMmsg struct
  method GetWMInfo (line 114) | func (window *Window) GetWMInfo() (*SysWMInfo, error) {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/syswm_cocoa.go
  type CocoaMsg (line 9) | type CocoaMsg struct
  method Cocoa (line 14) | func (msg *SysWMmsg) Cocoa() *CocoaMsg {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/syswm_dfb.go
  type DFBMsg (line 9) | type DFBMsg struct
  method DFB (line 14) | func (msg *SysWMmsg) DFB() *DFBMsg {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/syswm_uikit.go
  type UIKitMsg (line 9) | type UIKitMsg struct
  method UIKit (line 14) | func (msg *SysWMmsg) UIKit() *UIKitMsg {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/syswm_vivante.go
  type VivanteKitMsg (line 9) | type VivanteKitMsg struct
  method Vivante (line 14) | func (msg *SysWMmsg) Vivante() *VivanteMsg {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/syswm_windows.go
  type WindowsMsg (line 12) | type WindowsMsg struct
  method Windows (line 20) | func (msg *SysWMmsg) Windows() *WindowsMsg {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/syswm_x11.go
  type X11Msg (line 12) | type X11Msg struct
  method X11 (line 17) | func (msg *SysWMmsg) X11() *X11Msg {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/thread.go
  function CurrentThreadID (line 8) | func CurrentThreadID() uint {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/timer.go
  function GetTicks (line 29) | func GetTicks() uint32 {
  function GetTicks64 (line 35) | func GetTicks64() uint64 {
  function GetPerformanceCounter (line 41) | func GetPerformanceCounter() uint64 {
  function GetPerformanceFrequency (line 47) | func GetPerformanceFrequency() uint64 {
  function Delay (line 53) | func Delay(ms uint32) {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/touch.go
  constant TOUCH_MOUSEID (line 32) | TOUCH_MOUSEID = C.SDL_TOUCH_MOUSEID
  type TouchID (line 35) | type TouchID
    method c (line 58) | func (t TouchID) c() C.SDL_TouchID {
  type FingerID (line 38) | type FingerID
  type TouchDeviceType (line 41) | type TouchDeviceType
  constant TOUCH_DEVICE_INVALID (line 44) | TOUCH_DEVICE_INVALID           TouchDeviceType = C.SDL_TOUCH_DEVICE_INVALID
  constant TOUCH_DEVICE_DIRECT (line 45) | TOUCH_DEVICE_DIRECT                            = C.SDL_TOUCH_DEVICE_DIRECT
  constant TOUCH_DEVICE_INDIRECT_ABSOLUTE (line 46) | TOUCH_DEVICE_INDIRECT_ABSOLUTE                 = C.SDL_TOUCH_DEVICE_INDI...
  constant TOUCH_DEVICE_INDIRECT_RELATIVE (line 47) | TOUCH_DEVICE_INDIRECT_RELATIVE                 = C.SDL_TOUCH_DEVICE_INDI...
  type Finger (line 51) | type Finger struct
  function GetNumTouchDevices (line 64) | func GetNumTouchDevices() int {
  function GetTouchDevice (line 70) | func GetTouchDevice(index int) TouchID {
  function GetTouchDeviceType (line 76) | func GetTouchDeviceType(id TouchID) TouchDeviceType {
  function GetNumTouchFingers (line 82) | func GetNumTouchFingers(t TouchID) int {
  function GetTouchFinger (line 88) | func GetTouchFinger(t TouchID, index int) *Finger {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/version.go
  constant MAJOR_VERSION (line 27) | MAJOR_VERSION = C.SDL_MAJOR_VERSION
  constant MINOR_VERSION (line 28) | MINOR_VERSION = C.SDL_MINOR_VERSION
  constant PATCHLEVEL (line 29) | PATCHLEVEL    = C.SDL_PATCHLEVEL
  type Version (line 34) | type Version struct
    method cptr (line 41) | func (v *Version) cptr() *C.SDL_version {
  type cVersion (line 39) | type cVersion
  function VERSION (line 47) | func VERSION(v *Version) {
  function VERSIONNUM (line 55) | func VERSIONNUM(x, y, z int) int {
  function COMPILEDVERSION (line 61) | func COMPILEDVERSION() int {
  function VERSION_ATLEAST (line 67) | func VERSION_ATLEAST(x, y, z int) bool {
  function GetVersion (line 73) | func GetVersion(v *Version) {
  function GetRevision (line 79) | func GetRevision() string {
  function GetRevisionNumber (line 84) | func GetRevisionNumber() int {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/video.go
  constant WINDOW_FULLSCREEN (line 241) | WINDOW_FULLSCREEN         = C.SDL_WINDOW_FULLSCREEN
  constant WINDOW_OPENGL (line 242) | WINDOW_OPENGL             = C.SDL_WINDOW_OPENGL
  constant WINDOW_SHOWN (line 243) | WINDOW_SHOWN              = C.SDL_WINDOW_SHOWN
  constant WINDOW_HIDDEN (line 244) | WINDOW_HIDDEN             = C.SDL_WINDOW_HIDDEN
  constant WINDOW_BORDERLESS (line 245) | WINDOW_BORDERLESS         = C.SDL_WINDOW_BORDERLESS
  constant WINDOW_RESIZABLE (line 246) | WINDOW_RESIZABLE          = C.SDL_WINDOW_RESIZABLE
  constant WINDOW_MINIMIZED (line 247) | WINDOW_MINIMIZED          = C.SDL_WINDOW_MINIMIZED
  constant WINDOW_MAXIMIZED (line 248) | WINDOW_MAXIMIZED          = C.SDL_WINDOW_MAXIMIZED
  constant WINDOW_INPUT_GRABBED (line 249) | WINDOW_INPUT_GRABBED      = C.SDL_WINDOW_INPUT_GRABBED
  constant WINDOW_INPUT_FOCUS (line 250) | WINDOW_INPUT_FOCUS        = C.SDL_WINDOW_INPUT_FOCUS
  constant WINDOW_MOUSE_FOCUS (line 251) | WINDOW_MOUSE_FOCUS        = C.SDL_WINDOW_MOUSE_FOCUS
  constant WINDOW_FULLSCREEN_DESKTOP (line 252) | WINDOW_FULLSCREEN_DESKTOP = C.SDL_WINDOW_FULLSCREEN_DESKTOP
  constant WINDOW_FOREIGN (line 253) | WINDOW_FOREIGN            = C.SDL_WINDOW_FOREIGN
  constant WINDOW_ALLOW_HIGHDPI (line 254) | WINDOW_ALLOW_HIGHDPI      = C.SDL_WINDOW_ALLOW_HIGHDPI
  constant WINDOW_MOUSE_CAPTURE (line 255) | WINDOW_MOUSE_CAPTURE      = C.SDL_WINDOW_MOUSE_CAPTURE
  constant WINDOW_ALWAYS_ON_TOP (line 256) | WINDOW_ALWAYS_ON_TOP      = C.SDL_WINDOW_ALWAYS_ON_TOP
  constant WINDOW_SKIP_TASKBAR (line 257) | WINDOW_SKIP_TASKBAR       = C.SDL_WINDOW_SKIP_TASKBAR
  constant WINDOW_UTILITY (line 258) | WINDOW_UTILITY            = C.SDL_WINDOW_UTILITY
  constant WINDOW_TOOLTIP (line 259) | WINDOW_TOOLTIP            = C.SDL_WINDOW_TOOLTIP
  constant WINDOW_POPUP_MENU (line 260) | WINDOW_POPUP_MENU         = C.SDL_WINDOW_POPUP_MENU
  constant WINDOW_VULKAN (line 261) | WINDOW_VULKAN             = C.SDL_WINDOW_VULKAN
  constant WINDOWEVENT_NONE (line 267) | WINDOWEVENT_NONE            = C.SDL_WINDOWEVENT_NONE
  constant WINDOWEVENT_SHOWN (line 268) | WINDOWEVENT_SHOWN           = C.SDL_WINDOWEVENT_SHOWN
  constant WINDOWEVENT_HIDDEN (line 269) | WINDOWEVENT_HIDDEN          = C.SDL_WINDOWEVENT_HIDDEN
  constant WINDOWEVENT_EXPOSED (line 270) | WINDOWEVENT_EXPOSED         = C.SDL_WINDOWEVENT_EXPOSED
  constant WINDOWEVENT_MOVED (line 271) | WINDOWEVENT_MOVED           = C.SDL_WINDOWEVENT_MOVED
  constant WINDOWEVENT_RESIZED (line 272) | WINDOWEVENT_RESIZED         = C.SDL_WINDOWEVENT_RESIZED
  constant WINDOWEVENT_SIZE_CHANGED (line 273) | WINDOWEVENT_SIZE_CHANGED    = C.SDL_WINDOWEVENT_SIZE_CHANGED
  constant WINDOWEVENT_MINIMIZED (line 274) | WINDOWEVENT_MINIMIZED       = C.SDL_WINDOWEVENT_MINIMIZED
  constant WINDOWEVENT_MAXIMIZED (line 275) | WINDOWEVENT_MAXIMIZED       = C.SDL_WINDOWEVENT_MAXIMIZED
  constant WINDOWEVENT_RESTORED (line 276) | WINDOWEVENT_RESTORED        = C.SDL_WINDOWEVENT_RESTORED
  constant WINDOWEVENT_ENTER (line 277) | WINDOWEVENT_ENTER           = C.SDL_WINDOWEVENT_ENTER
  constant WINDOWEVENT_LEAVE (line 278) | WINDOWEVENT_LEAVE           = C.SDL_WINDOWEVENT_LEAVE
  constant WINDOWEVENT_FOCUS_GAINED (line 279) | WINDOWEVENT_FOCUS_GAINED    = C.SDL_WINDOWEVENT_FOCUS_GAINED
  constant WINDOWEVENT_FOCUS_LOST (line 280) | WINDOWEVENT_FOCUS_LOST      = C.SDL_WINDOWEVENT_FOCUS_LOST
  constant WINDOWEVENT_CLOSE (line 281) | WINDOWEVENT_CLOSE           = C.SDL_WINDOWEVENT_CLOSE
  constant WINDOWEVENT_TAKE_FOCUS (line 282) | WINDOWEVENT_TAKE_FOCUS      = C.SDL_WINDOWEVENT_TAKE_FOCUS
  constant WINDOWEVENT_HIT_TEST (line 283) | WINDOWEVENT_HIT_TEST        = C.SDL_WINDOWEVENT_HIT_TEST
  constant WINDOWEVENT_ICCPROF_CHANGED (line 284) | WINDOWEVENT_ICCPROF_CHANGED = C.SDL_WINDOWEVENT_ICCPROF_CHANGED
  constant WINDOWEVENT_DISPLAY_CHANGED (line 285) | WINDOWEVENT_DISPLAY_CHANGED = C.SDL_WINDOWEVENT_DISPLAY_CHANGED
  constant WINDOWPOS_UNDEFINED_MASK (line 291) | WINDOWPOS_UNDEFINED_MASK = C.SDL_WINDOWPOS_UNDEFINED_MASK
  constant WINDOWPOS_UNDEFINED (line 292) | WINDOWPOS_UNDEFINED      = C.SDL_WINDOWPOS_UNDEFINED
  constant WINDOWPOS_CENTERED_MASK (line 293) | WINDOWPOS_CENTERED_MASK  = C.SDL_WINDOWPOS_CENTERED_MASK
  constant WINDOWPOS_CENTERED (line 294) | WINDOWPOS_CENTERED       = C.SDL_WINDOWPOS_CENTERED
  constant MESSAGEBOX_ERROR (line 300) | MESSAGEBOX_ERROR       = C.SDL_MESSAGEBOX_ERROR
  constant MESSAGEBOX_WARNING (line 301) | MESSAGEBOX_WARNING     = C.SDL_MESSAGEBOX_WARNING
  constant MESSAGEBOX_INFORMATION (line 302) | MESSAGEBOX_INFORMATION = C.SDL_MESSAGEBOX_INFORMATION
  constant MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT (line 307) | MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT = C.SDL_MESSAGEBOX_BUTTON_RETURNKEY_...
  constant MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT (line 308) | MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT = C.SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_...
  constant GL_RED_SIZE (line 314) | GL_RED_SIZE                   = C.SDL_GL_RED_SIZE
  constant GL_GREEN_SIZE (line 315) | GL_GREEN_SIZE                 = C.SDL_GL_GREEN_SIZE
  constant GL_BLUE_SIZE (line 316) | GL_BLUE_SIZE                  = C.SDL_GL_BLUE_SIZE
  constant GL_ALPHA_SIZE (line 317) | GL_ALPHA_SIZE                 = C.SDL_GL_ALPHA_SIZE
  constant GL_BUFFER_SIZE (line 318) | GL_BUFFER_SIZE                = C.SDL_GL_BUFFER_SIZE
  constant GL_DOUBLEBUFFER (line 319) | GL_DOUBLEBUFFER               = C.SDL_GL_DOUBLEBUFFER
  constant GL_DEPTH_SIZE (line 320) | GL_DEPTH_SIZE                 = C.SDL_GL_DEPTH_SIZE
  constant GL_STENCIL_SIZE (line 321) | GL_STENCIL_SIZE               = C.SDL_GL_STENCIL_SIZE
  constant GL_ACCUM_RED_SIZE (line 322) | GL_ACCUM_RED_SIZE             = C.SDL_GL_ACCUM_RED_SIZE
  constant GL_ACCUM_GREEN_SIZE (line 323) | GL_ACCUM_GREEN_SIZE           = C.SDL_GL_ACCUM_GREEN_SIZE
  constant GL_ACCUM_BLUE_SIZE (line 324) | GL_ACCUM_BLUE_SIZE            = C.SDL_GL_ACCUM_BLUE_SIZE
  constant GL_ACCUM_ALPHA_SIZE (line 325) | GL_ACCUM_ALPHA_SIZE           = C.SDL_GL_ALPHA_SIZE
  constant GL_STEREO (line 326) | GL_STEREO                     = C.SDL_GL_STEREO
  constant GL_MULTISAMPLEBUFFERS (line 327) | GL_MULTISAMPLEBUFFERS         = C.SDL_GL_MULTISAMPLEBUFFERS
  constant GL_MULTISAMPLESAMPLES (line 328) | GL_MULTISAMPLESAMPLES         = C.SDL_GL_MULTISAMPLESAMPLES
  constant GL_ACCELERATED_VISUAL (line 329) | GL_ACCELERATED_VISUAL         = C.SDL_GL_ACCELERATED_VISUAL
  constant GL_RETAINED_BACKING (line 330) | GL_RETAINED_BACKING           = C.SDL_GL_RETAINED_BACKING
  constant GL_CONTEXT_MAJOR_VERSION (line 331) | GL_CONTEXT_MAJOR_VERSION      = C.SDL_GL_CONTEXT_MAJOR_VERSION
  constant GL_CONTEXT_MINOR_VERSION (line 332) | GL_CONTEXT_MINOR_VERSION      = C.SDL_GL_CONTEXT_MINOR_VERSION
  constant GL_CONTEXT_EGL (line 333) | GL_CONTEXT_EGL                = C.SDL_GL_CONTEXT_EGL
  constant GL_CONTEXT_FLAGS (line 334) | GL_CONTEXT_FLAGS              = C.SDL_GL_CONTEXT_FLAGS
  constant GL_CONTEXT_PROFILE_MASK (line 335) | GL_CONTEXT_PROFILE_MASK       = C.SDL_GL_CONTEXT_PROFILE_MASK
  constant GL_SHARE_WITH_CURRENT_CONTEXT (line 336) | GL_SHARE_WITH_CURRENT_CONTEXT = C.SDL_GL_SHARE_WITH_CURRENT_CONTEXT
  constant GL_FRAMEBUFFER_SRGB_CAPABLE (line 337) | GL_FRAMEBUFFER_SRGB_CAPABLE   = C.SDL_GL_FRAMEBUFFER_SRGB_CAPABLE
  constant GL_CONTEXT_RELEASE_BEHAVIOR (line 338) | GL_CONTEXT_RELEASE_BEHAVIOR   = C.SDL_GL_CONTEXT_RELEASE_BEHAVIOR
  constant GL_CONTEXT_RESET_NOTIFICATION (line 339) | GL_CONTEXT_RESET_NOTIFICATION = C.SDL_GL_CONTEXT_RESET_NOTIFICATION
  constant GL_CONTEXT_NO_ERROR (line 340) | GL_CONTEXT_NO_ERROR           = C.SDL_GL_CONTEXT_NO_ERROR
  constant GL_CONTEXT_PROFILE_CORE (line 346) | GL_CONTEXT_PROFILE_CORE          = C.SDL_GL_CONTEXT_PROFILE_CORE
  constant GL_CONTEXT_PROFILE_COMPATIBILITY (line 347) | GL_CONTEXT_PROFILE_COMPATIBILITY = C.SDL_GL_CONTEXT_PROFILE_COMPATIBILITY
  constant GL_CONTEXT_PROFILE_ES (line 348) | GL_CONTEXT_PROFILE_ES            = C.SDL_GL_CONTEXT_PROFILE_ES
  constant GL_CONTEXT_DEBUG_FLAG (line 354) | GL_CONTEXT_DEBUG_FLAG              = C.SDL_GL_CONTEXT_DEBUG_FLAG
  constant GL_CONTEXT_FORWARD_COMPATIBLE_FLAG (line 355) | GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = C.SDL_GL_CONTEXT_FORWARD_COMPATIBLE...
  constant GL_CONTEXT_ROBUST_ACCESS_FLAG (line 356) | GL_CONTEXT_ROBUST_ACCESS_FLAG      = C.SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG
  constant GL_CONTEXT_RESET_ISOLATION_FLAG (line 357) | GL_CONTEXT_RESET_ISOLATION_FLAG    = C.SDL_GL_CONTEXT_RESET_ISOLATION_FLAG
  constant FLASH_CANCEL (line 364) | FLASH_CANCEL        FlashOperation = C.SDL_FLASH_CANCEL
  constant FLASH_BRIEFLY (line 365) | FLASH_BRIEFLY                      = C.SDL_FLASH_BRIEFLY
  constant FLASH_UNTIL_FOCUSED (line 366) | FLASH_UNTIL_FOCUSED                = C.SDL_FLASH_UNTIL_FOCUSED
  type FlashOperation (line 369) | type FlashOperation
  type DisplayMode (line 373) | type DisplayMode struct
    method cptr (line 431) | func (dm *DisplayMode) cptr() *C.SDL_DisplayMode {
  type cDisplayMode (line 380) | type cDisplayMode
  type Window (line 383) | type Window
    method cptr (line 427) | func (window *Window) cptr() *C.SDL_Window {
    method GetDisplayIndex (line 575) | func (window *Window) GetDisplayIndex() (int, error) {
    method SetDisplayMode (line 582) | func (window *Window) SetDisplayMode(mode *DisplayMode) error {
    method GetDisplayMode (line 589) | func (window *Window) GetDisplayMode() (mode DisplayMode, err error) {
    method GetPixelFormat (line 597) | func (window *Window) GetPixelFormat() (uint32, error) {
    method Destroy (line 627) | func (window *Window) Destroy() error {
    method GetID (line 641) | func (window *Window) GetID() (uint32, error) {
    method GetFlags (line 661) | func (window *Window) GetFlags() uint32 {
    method SetTitle (line 667) | func (window *Window) SetTitle(title string) {
    method GetTitle (line 673) | func (window *Window) GetTitle() string {
    method SetIcon (line 679) | func (window *Window) SetIcon(icon *Surface) {
    method SetData (line 685) | func (window *Window) SetData(name string, userdata unsafe.Pointer) un...
    method GetData (line 691) | func (window *Window) GetData(name string) unsafe.Pointer {
    method SetPosition (line 697) | func (window *Window) SetPosition(x, y int32) {
    method GetPosition (line 703) | func (window *Window) GetPosition() (x, y int32) {
    method SetResizable (line 711) | func (window *Window) SetResizable(resizable bool) {
    method SetSize (line 717) | func (window *Window) SetSize(w, h int32) {
    method GetSize (line 723) | func (window *Window) GetSize() (w, h int32) {
    method SetMinimumSize (line 731) | func (window *Window) SetMinimumSize(minW, minH int32) {
    method GetMinimumSize (line 737) | func (window *Window) GetMinimumSize() (w, h int32) {
    method SetMaximumSize (line 745) | func (window *Window) SetMaximumSize(maxW, maxH int32) {
    method GetMaximumSize (line 751) | func (window *Window) GetMaximumSize() (w, h int32) {
    method SetBordered (line 759) | func (window *Window) SetBordered(bordered bool) {
    method Show (line 765) | func (window *Window) Show() {
    method Hide (line 771) | func (window *Window) Hide() {
    method Raise (line 777) | func (window *Window) Raise() {
    method Maximize (line 783) | func (window *Window) Maximize() {
    method Minimize (line 789) | func (window *Window) Minimize() {
    method Restore (line 795) | func (window *Window) Restore() {
    method SetFullscreen (line 801) | func (window *Window) SetFullscreen(flags uint32) error {
    method GetSurface (line 808) | func (window *Window) GetSurface() (*Surface, error) {
    method UpdateSurface (line 818) | func (window *Window) UpdateSurface() error {
    method UpdateSurfaceRects (line 825) | func (window *Window) UpdateSurfaceRects(rects []Rect) error {
    method SetGrab (line 832) | func (window *Window) SetGrab(grabbed bool) {
    method GetGrab (line 838) | func (window *Window) GetGrab() bool {
    method SetBrightness (line 844) | func (window *Window) SetBrightness(brightness float32) error {
    method GetBrightness (line 851) | func (window *Window) GetBrightness() float32 {
    method SetGammaRamp (line 857) | func (window *Window) SetGammaRamp(red, green, blue *[256]uint16) error {
    method GetGammaRamp (line 868) | func (window *Window) GetGammaRamp() (red, green, blue *[256]uint16, e...
    method SetWindowOpacity (line 879) | func (window *Window) SetWindowOpacity(opacity float32) error {
    method GetWindowOpacity (line 886) | func (window *Window) GetWindowOpacity() (opacity float32, err error) {
    method GLCreateContext (line 1010) | func (window *Window) GLCreateContext() (GLContext, error) {
    method GLMakeCurrent (line 1020) | func (window *Window) GLMakeCurrent(glcontext GLContext) error {
    method GLGetDrawableSize (line 1048) | func (window *Window) GLGetDrawableSize() (w, h int32) {
    method GLSwap (line 1056) | func (window *Window) GLSwap() {
    method Flash (line 1068) | func (window *Window) Flash(operation FlashOperation) (err error) {
    method SetAlwaysOnTop (line 1074) | func (window *Window) SetAlwaysOnTop(onTop bool) {
    method SetKeyboardGrab (line 1080) | func (window *Window) SetKeyboardGrab(grabbed bool) {
    method GetICCProfile (line 1089) | func (window *Window) GetICCProfile() (iccProfile unsafe.Pointer, size...
    method SetMouseRect (line 1104) | func (window *Window) SetMouseRect(rect Rect) (err error) {
    method GetMouseRect (line 1112) | func (window *Window) GetMouseRect() (rect Rect) {
  type GLContext (line 386) | type GLContext
  type GLattr (line 390) | type GLattr
    method c (line 451) | func (attr GLattr) c() C.SDL_GLattr {
  type MessageBoxColor (line 394) | type MessageBoxColor struct
    method cptr (line 435) | func (mc *MessageBoxColor) cptr() *C.SDL_MessageBoxColor {
  type cMessageBoxColor (line 399) | type cMessageBoxColor
  type MessageBoxColorScheme (line 403) | type MessageBoxColorScheme struct
    method cptr (line 439) | func (mcs *MessageBoxColorScheme) cptr() *C.SDL_MessageBoxColorScheme {
  type cMessageBoxColorScheme (line 406) | type cMessageBoxColorScheme
  type MessageBoxButtonData (line 410) | type MessageBoxButtonData struct
    method cptr (line 443) | func (mbd *MessageBoxButtonData) cptr() *C.SDL_MessageBoxButtonData {
  type MessageBoxData (line 418) | type MessageBoxData struct
    method cptr (line 447) | func (md *MessageBoxData) cptr() *C.SDL_MessageBoxData {
  function GetDisplayName (line 457) | func GetDisplayName(displayIndex int) (string, error) {
  function GetNumVideoDisplays (line 467) | func GetNumVideoDisplays() (int, error) {
  function GetNumVideoDrivers (line 474) | func GetNumVideoDrivers() (int, error) {
  function GetVideoDriver (line 481) | func GetVideoDriver(index int) string {
  function VideoInit (line 487) | func VideoInit(driverName string) error {
  function VideoQuit (line 494) | func VideoQuit() {
  function GetCurrentVideoDriver (line 500) | func GetCurrentVideoDriver() (string, error) {
  function GetNumDisplayModes (line 510) | func GetNumDisplayModes(displayIndex int) (int, error) {
  function GetDisplayBounds (line 517) | func GetDisplayBounds(displayIndex int) (rect Rect, err error) {
  function GetDisplayUsableBounds (line 525) | func GetDisplayUsableBounds(displayIndex int) (rect Rect, err error) {
  function GetDisplayMode (line 533) | func GetDisplayMode(displayIndex int, modeIndex int) (mode DisplayMode, ...
  function GetDesktopDisplayMode (line 541) | func GetDesktopDisplayMode(displayIndex int) (mode DisplayMode, err erro...
  function GetCurrentDisplayMode (line 549) | func GetCurrentDisplayMode(displayIndex int) (mode DisplayMode, err erro...
  function GetClosestDisplayMode (line 557) | func GetClosestDisplayMode(displayIndex int, mode *DisplayMode, closest ...
  function GetDisplayDPI (line 567) | func GetDisplayDPI(displayIndex int) (ddpi, hdpi, vdpi float32, err erro...
  function CreateWindow (line 607) | func CreateWindow(title string, x, y, w, h int32, flags uint32) (*Window...
  function CreateWindowFrom (line 617) | func CreateWindowFrom(data unsafe.Pointer) (*Window, error) {
  function GetWindowFromID (line 651) | func GetWindowFromID(id uint32) (*Window, error) {
  function ShowSimpleMessageBox (line 893) | func ShowSimpleMessageBox(flags uint32, title, message string, window *W...
  function ShowMessageBox (line 904) | func ShowMessageBox(data *MessageBoxData) (buttonid int32, err error) {
  function IsScreenSaverEnabled (line 950) | func IsScreenSaverEnabled() bool {
  function EnableScreenSaver (line 956) | func EnableScreenSaver() {
  function DisableScreenSaver (line 962) | func DisableScreenSaver() {
  function GLLoadLibrary (line 968) | func GLLoadLibrary(path string) error {
  function GLGetProcAddress (line 975) | func GLGetProcAddress(proc string) unsafe.Pointer {
  function GLUnloadLibrary (line 981) | func GLUnloadLibrary() {
  function GLExtensionSupported (line 987) | func GLExtensionSupported(extension string) bool {
  function GLSetAttribute (line 993) | func GLSetAttribute(attr GLattr, value int) error {
  function GLGetAttribute (line 1000) | func GLGetAttribute(attr GLattr) (int, error) {
  function GLSetSwapInterval (line 1027) | func GLSetSwapInterval(interval int) error {
  function GLGetSwapInterval (line 1034) | func GLGetSwapInterval() (int, error) {
  function GLDeleteContext (line 1062) | func GLDeleteContext(context GLContext) {

FILE: gccgo/vendor/github.com/veandco/go-sdl2/sdl/vulkan.go
  function VulkanLoadLibrary (line 94) | func VulkanLoadLibrary(path string) error {
  function VulkanGetVkGetInstanceProcAddr (line 111) | func VulkanGetVkGetInstanceProcAddr() unsafe.Pointer {
  function VulkanUnloadLibrary (line 117) | func VulkanUnloadLibrary() {
  method VulkanGetInstanceExtensions (line 123) | func (window *Window) VulkanGetInstanceExtensions() []string {
  method VulkanCreateSurface (line 141) | func (window *Window) VulkanCreateSurface(instance interface{}) (surface...
  method VulkanGetDrawableSize (line 161) | func (window *Window) VulkanGetDrawableSize() (w, h int32) {

FILE: go/main.go
  function main (line 11) | func main() {

FILE: go/vendor/github.com/veandco/go-sdl2/img/sdl_image.go
  constant INIT_JPG (line 13) | INIT_JPG  = 0x00000001
  constant INIT_PNG (line 14) | INIT_PNG  = 0x00000002
  constant INIT_TIF (line 15) | INIT_TIF  = 0x00000004
  constant INIT_WEBP (line 16) | INIT_WEBP = 0x00000008
  function LinkedVersion (line 21) | func LinkedVersion() *sdl.Version {
  function Init (line 27) | func Init(flags int) error {
  function Quit (line 38) | func Quit() {
  function GetError (line 44) | func GetError() error {
  function LoadTypedRW (line 54) | func LoadTypedRW(src *sdl.RWops, freesrc bool, type_ string) (*sdl.Surfa...
  function Load (line 68) | func Load(file string) (*sdl.Surface, error) {
  function LoadRW (line 80) | func LoadRW(src *sdl.RWops, freesrc bool) (*sdl.Surface, error) {
  function LoadTexture (line 91) | func LoadTexture(renderer *sdl.Renderer, file string) (*sdl.Texture, err...
  function LoadTextureRW (line 103) | func LoadTextureRW(renderer *sdl.Renderer, src *sdl.RWops, freesrc bool)...
  function IsICO (line 116) | func IsICO(src *sdl.RWops) bool {
  function IsCUR (line 123) | func IsCUR(src *sdl.RWops) bool {
  function IsBMP (line 130) | func IsBMP(src *sdl.RWops) bool {
  function IsGIF (line 137) | func IsGIF(src *sdl.RWops) bool {
  function IsJPG (line 144) | func IsJPG(src *sdl.RWops) bool {
  function IsLBM (line 151) | func IsLBM(src *sdl.RWops) bool {
  function IsPCX (line 158) | func IsPCX(src *sdl.RWops) bool {
  function IsPNG (line 165) | func IsPNG(src *sdl.RWops) bool {
  function IsPNM (line 172) | func IsPNM(src *sdl.RWops) bool {
  function IsTIF (line 179) | func IsTIF(src *sdl.RWops) bool {
  function IsXCF (line 186) | func IsXCF(src *sdl.RWops) bool {
  function IsXPM (line 193) | func IsXPM(src *sdl.RWops) bool {
  function IsXV (line 200) | func IsXV(src *sdl.RWops) bool {
  function IsWEBP (line 206) | func IsWEBP(src *sdl.RWops) bool {
  function LoadICORW (line 213) | func LoadICORW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadCURRW (line 224) | func LoadCURRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadBMPRW (line 235) | func LoadBMPRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadGIFRW (line 246) | func LoadGIFRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadJPGRW (line 257) | func LoadJPGRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadLBMRW (line 268) | func LoadLBMRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadPCXRW (line 279) | func LoadPCXRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadPNGRW (line 290) | func LoadPNGRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadPNMRW (line 301) | func LoadPNMRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadTGARW (line 312) | func LoadTGARW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadTIFRW (line 323) | func LoadTIFRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadXCFRW (line 334) | func LoadXCFRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadXPMRW (line 345) | func LoadXPMRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadXVRW (line 356) | func LoadXVRW(src *sdl.RWops) (*sdl.Surface, error) {
  function LoadWEBPRW (line 366) | func LoadWEBPRW(src *sdl.RWops) (*sdl.Surface, error) {
  function ReadXPMFromArray (line 377) | func ReadXPMFromArray(xpm string) (*sdl.Surface, error) {
  function SavePNG (line 388) | func SavePNG(surface *sdl.Surface, file string) error {
  function SavePNGRW (line 400) | func SavePNGRW(surface *sdl.Surface, dst *sdl.RWops, freedst int) error {

FILE: go/vendor/github.com/veandco/go-sdl2/sdl/audio.go
  constant AUDIO_MASK_BITSIZE (line 136) | AUDIO_MASK_BITSIZE  = C.SDL_AUDIO_MASK_BITSIZE
  constant AUDIO_MASK_DATATYPE (line 137) | AUDIO_MASK_DATATYPE = C.SDL_AUDIO_MASK_DATATYPE
  constant AUDIO_MASK_ENDIAN (line 138) | AUDIO_MASK_ENDIAN   = C.SDL_AUDIO_MASK_ENDIAN
  constant AUDIO_MASK_SIGNED (line 139) | AUDIO_MASK_SIGNED   = C.SDL_AUDIO_MASK_SIGNED
  constant AUDIO_S8 (line 145) | AUDIO_S8 = C.AUDIO_S8
  constant AUDIO_U8 (line 146) | AUDIO_U8 = C.AUDIO_U8
  constant AUDIO_S16LSB (line 148) | AUDIO_S16LSB = C.AUDIO_S16LSB
  constant AUDIO_S16MSB (line 149) | AUDIO_S16MSB = C.AUDIO_S16MSB
  constant AUDIO_S16SYS (line 150) | AUDIO_S16SYS = C.AUDIO_S16SYS
  constant AUDIO_S16 (line 151) | AUDIO_S16    = C.AUDIO_S16
  constant AUDIO_U16LSB (line 152) | AUDIO_U16LSB = C.AUDIO_U16LSB
  constant AUDIO_U16MSB (line 153) | AUDIO_U16MSB = C.AUDIO_U16MSB
  constant AUDIO_U16SYS (line 154) | AUDIO_U16SYS = C.AUDIO_U16SYS
  constant AUDIO_U16 (line 155) | AUDIO_U16    = C.AUDIO_U16
  constant AUDIO_S32LSB (line 157) | AUDIO_S32LSB = C.AUDIO_S32LSB
  constant AUDIO_S32MSB (line 158) | AUDIO_S32MSB = C.AUDIO_S32MSB
  constant AUDIO_S32SYS (line 159) | AUDIO_S32SYS = C.AUDIO_S32SYS
  constant AUDIO_S32 (line 160) | AUDIO_S32    = C.AUDIO_S32
  constant AUDIO_F32LSB (line 162) | AUDIO_F32LSB = C.AUDIO_F32LSB
  constant AUDIO_F32MSB (line 163) | AUDIO_F32MSB = C.AUDIO_F32MSB
  constant AUDIO_F32SYS (line 164) | AUDIO_F32SYS = C.AUDIO_F32SYS
  constant AUDIO_F32 (line 165) | AUDIO_F32    = C.AUDIO_F32
  constant AUDIO_ALLOW_FREQUENCY_CHANGE (line 171) | AUDIO_ALLOW_FREQUENCY_CHANGE = C.SDL_AUDIO_ALLOW_FREQUENCY_CHANGE
  constant AUDIO_ALLOW_FORMAT_CHANGE (line 172) | AUDIO_ALLOW_FORMAT_CHANGE    = C.SDL_AUDIO_ALLOW_FORMAT_CHANGE
  constant AUDIO_ALLOW_CHANNELS_CHANGE (line 173) | AUDIO_ALLOW_CHANNELS_CHANGE  = C.SDL_AUDIO_ALLOW_CHANNELS_CHANGE
  constant AUDIO_ALLOW_ANY_CHANGE (line 174) | AUDIO_ALLOW_ANY_CHANGE       = C.SDL_AUDIO_ALLOW_ANY_CHANGE
  constant AUDIO_STOPPED (line 180) | AUDIO_STOPPED AudioStatus = C.SDL_AUDIO_STOPPED
  constant AUDIO_PLAYING (line 181) | AUDIO_PLAYING             = C.SDL_AUDIO_PLAYING
  constant AUDIO_PAUSED (line 182) | AUDIO_PAUSED              = C.SDL_AUDIO_PAUSED
  constant MIX_MAXVOLUME (line 187) | MIX_MAXVOLUME = C.SDL_MIX_MAXVOLUME
  type AudioFormat (line 191) | type AudioFormat
    method c (line 246) | func (fmt AudioFormat) c() C.SDL_AudioFormat {
    method BitSize (line 268) | func (fmt AudioFormat) BitSize() uint8 {
    method IsFloat (line 274) | func (fmt AudioFormat) IsFloat() bool {
    method IsBigEndian (line 280) | func (fmt AudioFormat) IsBigEndian() bool {
    method IsSigned (line 286) | func (fmt AudioFormat) IsSigned() bool {
    method IsInt (line 292) | func (fmt AudioFormat) IsInt() bool {
    method IsLittleEndian (line 298) | func (fmt AudioFormat) IsLittleEndian() bool {
    method IsUnsigned (line 304) | func (fmt AudioFormat) IsUnsigned() bool {
  type AudioCallback (line 195) | type AudioCallback
  type AudioFilter (line 199) | type AudioFilter
  type AudioDeviceID (line 203) | type AudioDeviceID
    method c (line 250) | func (id AudioDeviceID) c() C.SDL_AudioDeviceID {
  type AudioStatus (line 207) | type AudioStatus
  type cAudioStatus (line 208) | type cAudioStatus
  type AudioSpec (line 212) | type AudioSpec struct
    method cptr (line 254) | func (as *AudioSpec) cptr() *C.SDL_AudioSpec {
  type cAudioSpec (line 223) | type cAudioSpec
  type AudioCVT (line 227) | type AudioCVT struct
    method cptr (line 258) | func (cvt *AudioCVT) cptr() *C.SDL_AudioCVT {
    method AllocBuf (line 309) | func (cvt *AudioCVT) AllocBuf(size uintptr) {
    method FreeBuf (line 314) | func (cvt *AudioCVT) FreeBuf() {
    method BufAsSlice (line 320) | func (cvt AudioCVT) BufAsSlice() []byte {
  type cAudioCVT (line 240) | type cAud
Condensed preview — 306 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,187K chars).
[
  {
    "path": ".github/dependabot.yml",
    "chars": 218,
    "preview": "# Set update schedule for GitHub Actions\n\nversion: 2\nupdates:\n  - package-ecosystem: \"github-actions\"\n    directory: \"/\""
  },
  {
    "path": ".github/workflows/assembly.yml",
    "chars": 665,
    "preview": "name: assembly-examples\n\non:\n  push:\n    branches:\n    - '*'\n    paths:\n      - assembly/**\n  pull_request:\n    branches"
  },
  {
    "path": ".github/workflows/c.yml",
    "chars": 843,
    "preview": "name: c-examples\n\non:\n  push:\n    branches:\n    - '*'\n    paths:\n      - c1*/**\n      - c2*/**\n      - c8*/**\n      - c9"
  },
  {
    "path": ".github/workflows/cplusplus.yml",
    "chars": 1423,
    "preview": "name: c-plus-plus-examples\n\non:\n  push:\n    branches:\n    - '*'\n    paths:\n    - 'c*-*/**'\n  pull_request:\n    branches:"
  },
  {
    "path": ".github/workflows/expired.yml",
    "chars": 1150,
    "preview": "name: 'Close stale issues and PRs'\non:\n  schedule:\n    - cron: '0 */8 * * *'\njobs:\n  stale:\n    runs-on: ubuntu-latest\n "
  },
  {
    "path": ".github/workflows/other.yml",
    "chars": 851,
    "preview": "name: other-examples\n\non:\n  push:\n    branches:\n    - '*'\n    paths:\n      - crystal/\n      - csharp/\n  pull_request:\n  "
  },
  {
    "path": ".gitignore",
    "chars": 1010,
    "preview": "# macOS\n.DS_Store\n\n# C3\n*.dSYM\n\n# Java\n*.jar\n\n# Compiled Object files\n*.slo\n*.lo\n*.o\n*.obj\n\n# Compiled Dynamic libraries"
  },
  {
    "path": "COMPILES.md",
    "chars": 3308,
    "preview": "## Does it compile and/or run?\n\n| Directory    | ArchLinux | macOS/M2 | Comment                                         "
  },
  {
    "path": "LICENSE",
    "chars": 1465,
    "preview": "Copyright 2023 Alexander F. Rødseth\n\nRedistribution and use in source and binary forms, with or without modification, ar"
  },
  {
    "path": "Makefile",
    "chars": 500,
    "preview": "SAMPLES = assembly c89 c99 c11 c18 c++98 c++11 d objectivepascal go haskell mruby nim odin pony python ring rust v zig\n\n"
  },
  {
    "path": "README.md",
    "chars": 2042,
    "preview": "SDL2 Examples\n=============\n\n[![sdl2-examples](https://github.com/xyproto/sdl2-examples/actions/workflows/main.yml/badge"
  },
  {
    "path": "assembly/Makefile",
    "chars": 293,
    "preview": "PLATFORMS = linux-i386 linux-x86_64\n\n.PHONY: all run clean fullclean\n\nall:\n\t@-$(foreach x,$(PLATFORMS),make -C $(x);)\n\nr"
  },
  {
    "path": "assembly/README.md",
    "chars": 128,
    "preview": "Note that the executables that are generated from Assembly are only intended to work on the target system they are craft"
  },
  {
    "path": "assembly/linux-i386/Makefile",
    "chars": 437,
    "preview": ".PHONY: all msg clean fullclean\n\n# Look for libraries in /usr/lib32 when linking if on i386, i686 or x86_32\nifeq ($(find"
  },
  {
    "path": "assembly/linux-i386/README.md",
    "chars": 41,
    "preview": "Requirements\n------------\n\n* nasm\n* sdl2\n"
  },
  {
    "path": "assembly/linux-i386/main.asm",
    "chars": 3031,
    "preview": "section .text\nglobal _start\n\nextern printf\nextern exit\nextern SDL_Init\nextern SDL_CreateWindow\nextern SDL_CreateRenderer"
  },
  {
    "path": "assembly/linux-x86_64/Makefile",
    "chars": 264,
    "preview": ".PHONY: all msg clean fullclean\n\nall: msg main\n\nmsg:\n\t@echo '--- x86_64 ---'\n\nmain:\n\tnasm -felf64 main.asm -o main.o\n\tld"
  },
  {
    "path": "assembly/linux-x86_64/README.md",
    "chars": 41,
    "preview": "Requirements\n------------\n\n* nasm\n* sdl2\n"
  },
  {
    "path": "assembly/linux-x86_64/main.asm",
    "chars": 2883,
    "preview": "section .text\nglobal _start\n\nextern printf\nextern exit\nextern SDL_Init\nextern SDL_CreateWindow\nextern SDL_CreateRenderer"
  },
  {
    "path": "assembly/macos-x86_64/Makefile",
    "chars": 222,
    "preview": ".PHONY: all msg clean fullclean\n\nall: msg main\n\nmsg:\n\t@echo '--- x86_64 ---'\n\nmain:\n\tnasm -fmacho64 main.asm -o main.o\n\t"
  },
  {
    "path": "assembly/macos-x86_64/README.md",
    "chars": 68,
    "preview": "Requirements\n------------\n\n* nasm\n* Xcode Command Line Tools\n* sdl2\n"
  },
  {
    "path": "assembly/macos-x86_64/main.asm",
    "chars": 2841,
    "preview": "section .text\nglobal _main\n\nextern _printf\nextern _exit\nextern _SDL_Init\nextern _SDL_CreateWindow\nextern _SDL_CreateRend"
  },
  {
    "path": "assembly/windows-x86_64/README.md",
    "chars": 50,
    "preview": "Requirements\n------------\n\n* nasm\n* GoLink\n* sdl2\n"
  },
  {
    "path": "assembly/windows-x86_64/main.asm",
    "chars": 2882,
    "preview": "section .text\nglobal Start\n\nextern printf\nextern exit\nextern SDL_Init\nextern SDL_CreateWindow\nextern SDL_CreateRenderer\n"
  },
  {
    "path": "bench.sh",
    "chars": 2003,
    "preview": "#!/bin/sh\n#\n# csv.sh\n#\n# Measure approximately how long it takes to build each example,\n# and how large the resulting ex"
  },
  {
    "path": "c++11/Makefile",
    "chars": 628,
    "preview": "CXX?=c++\nSDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs)\nCXXFLAGS?=-std=c++11 -Wall -pedantic -Werror -Wshadow -Wstri"
  },
  {
    "path": "c++11/main.cpp",
    "chars": 1841,
    "preview": "#include <SDL2/SDL.h>\n#include <cstdlib>\n#include <iostream>\n\nint main()\n{\n    using std::cerr;\n    using std::endl;\n\n  "
  },
  {
    "path": "c++11-cmake/CMakeLists.txt",
    "chars": 1065,
    "preview": "cmake_minimum_required(VERSION 3.26)\n\nproject(main)\n\naux_source_directory(. SRC_LIST)\nadd_executable(${PROJECT_NAME} ${S"
  },
  {
    "path": "c++11-cmake/README.md",
    "chars": 470,
    "preview": "SDL2, C++11 and CMake\n=====================\n\nRequirements\n------------\n\n* CMake\n* Compiler that supports C++ (recent ver"
  },
  {
    "path": "c++11-cmake/main.cpp",
    "chars": 1721,
    "preview": "#include <SDL2/SDL.h>\n#include <cstdlib>\n#include <iostream>\n\nint main()\n{\n    using std::cerr;\n    using std::endl;\n\n  "
  },
  {
    "path": "c++14-cmake/CMakeLists.txt",
    "chars": 1092,
    "preview": "cmake_minimum_required(VERSION 3.26)\n\nproject(main)\n\naux_source_directory(. SRC_LIST)\nadd_executable(${PROJECT_NAME} ${S"
  },
  {
    "path": "c++14-cmake/README.md",
    "chars": 472,
    "preview": "SDL2, C++14 and CMake\n=====================\n\nRequirements\n------------\n\n* CMake\n* Compiler that supports C++14 (recent v"
  },
  {
    "path": "c++14-cmake/main.cpp",
    "chars": 1439,
    "preview": "#include <SDL2/SDL.h>\n#include <iostream>\n\n#include \"sdl2.h\"\n\nauto main() -> int\n{\n    using std::cerr;\n    using std::e"
  },
  {
    "path": "c++17-cmake/CMakeLists.txt",
    "chars": 1065,
    "preview": "cmake_minimum_required(VERSION 3.26)\n\nproject(main)\n\naux_source_directory(. SRC_LIST)\nadd_executable(${PROJECT_NAME} ${S"
  },
  {
    "path": "c++17-cmake/README.md",
    "chars": 471,
    "preview": "SDL2, C++17 and CMake\n=====================\n\nRequirements\n------------\n\n* CMake\n* Compiler that supports C++17 (recent v"
  },
  {
    "path": "c++17-cmake/main.cpp",
    "chars": 1439,
    "preview": "#include <SDL2/SDL.h>\n#include <iostream>\n\n#include \"sdl2.h\"\n\nauto main() -> int\n{\n    using std::cerr;\n    using std::e"
  },
  {
    "path": "c++20-cmake/CMakeLists.txt",
    "chars": 1065,
    "preview": "cmake_minimum_required(VERSION 3.26)\n\nproject(main)\n\naux_source_directory(. SRC_LIST)\nadd_executable(${PROJECT_NAME} ${S"
  },
  {
    "path": "c++20-cmake/README.md",
    "chars": 471,
    "preview": "SDL2, C++20 and CMake\n=====================\n\nRequirements\n------------\n\n* CMake\n* Compiler that supports C++20 (recent v"
  },
  {
    "path": "c++20-cmake/main.cpp",
    "chars": 1439,
    "preview": "#include <SDL2/SDL.h>\n#include <iostream>\n\n#include \"sdl2.h\"\n\nauto main() -> int\n{\n    using std::cerr;\n    using std::e"
  },
  {
    "path": "c++23-cmake/CMakeLists.txt",
    "chars": 1065,
    "preview": "cmake_minimum_required(VERSION 3.26)\n\nproject(main)\n\naux_source_directory(. SRC_LIST)\nadd_executable(${PROJECT_NAME} ${S"
  },
  {
    "path": "c++23-cmake/README.md",
    "chars": 508,
    "preview": "SDL2, C++23 and CMake\n=====================\n\nRequirements\n------------\n\n* CMake\n* Compiler that supports C++23 (recent v"
  },
  {
    "path": "c++23-cmake/main.cpp",
    "chars": 1439,
    "preview": "#include <SDL2/SDL.h>\n#include <iostream>\n\n#include \"sdl2.h\"\n\nauto main() -> int\n{\n    using std::cerr;\n    using std::e"
  },
  {
    "path": "c++98/Makefile",
    "chars": 628,
    "preview": "CXX?=c++\nSDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs)\nCXXFLAGS?=-std=c++98 -Wall -pedantic -Werror -Wshadow -Wstri"
  },
  {
    "path": "c++98/README.md",
    "chars": 228,
    "preview": "SDL2, C++98 and Make\n====================\n\nRequirements\n------------\n\n* Compiler that supports C++98\n* pkg-config\n* SDL2"
  },
  {
    "path": "c++98/main.cpp",
    "chars": 1712,
    "preview": "#include <SDL2/SDL.h>\n#include <cstdlib>\n#include <iostream>\n\nint main()\n{\n    if (SDL_Init(SDL_INIT_EVERYTHING) != 0) {"
  },
  {
    "path": "c11/Makefile",
    "chars": 603,
    "preview": "CC?=gcc\nSDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs)\nCFLAGS?=-std=c11 -Wall -pedantic -Werror -Wshadow -Wstrict-al"
  },
  {
    "path": "c11/README.md",
    "chars": 155,
    "preview": "## Requirements\n\n* C11 compiler\n* pkg-config\n* SDL2\n\n## macOS\n\nInstall pkg-config using brew, or use `-LSDL2` in the Mak"
  },
  {
    "path": "c11/main.c",
    "chars": 1469,
    "preview": "#include <SDL2/SDL.h>\n#include <stdio.h>\n#include <stdlib.h>\n\nint main(void)\n{\n\tif (SDL_Init(SDL_INIT_EVERYTHING) != 0) "
  },
  {
    "path": "c18/Makefile",
    "chars": 603,
    "preview": "CC?=gcc\nSDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs)\nCFLAGS?=-std=c18 -Wall -pedantic -Werror -Wshadow -Wstrict-al"
  },
  {
    "path": "c18/README.md",
    "chars": 155,
    "preview": "## Requirements\n\n* C18 compiler\n* pkg-config\n* SDL2\n\n## macOS\n\nInstall pkg-config using brew, or use `-LSDL2` in the Mak"
  },
  {
    "path": "c18/main.c",
    "chars": 1495,
    "preview": "#include <SDL2/SDL.h>\n#include <stdio.h>\n#include <stdlib.h>\n\nint main(void)\n{\n\tif (SDL_Init(SDL_INIT_EVERYTHING) != 0) "
  },
  {
    "path": "c2x/Makefile",
    "chars": 603,
    "preview": "CC?=gcc\nSDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs)\nCFLAGS?=-std=c2x -Wall -pedantic -Werror -Wshadow -Wstrict-al"
  },
  {
    "path": "c2x/README.md",
    "chars": 190,
    "preview": "## Requirements\n\n* C2X compiler (GCC 9 or later, Clang 9 or later)\n* pkg-config\n* SDL2\n\n## macOS\n\nInstall pkg-config usi"
  },
  {
    "path": "c2x/main.c",
    "chars": 1465,
    "preview": "#include <SDL2/SDL.h>\n#include <stdio.h>\n#include <stdlib.h>\n\nint main()\n{\n\tif (SDL_Init(SDL_INIT_EVERYTHING) != 0) {\n\t\t"
  },
  {
    "path": "c89/Makefile",
    "chars": 609,
    "preview": "CC?=gcc\nSDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs)\nCFLAGS?=-ansi -Wall -pedantic -Werror -Wshadow -Wstrict-alias"
  },
  {
    "path": "c89/README.md",
    "chars": 164,
    "preview": "## Requirements\n\n* C89 (ANSI C) compiler\n* pkg-config\n* SDL2\n\n## macOS\n\nInstall pkg-config using brew, or use `-LSDL2` i"
  },
  {
    "path": "c89/main.c",
    "chars": 1498,
    "preview": "#include <SDL2/SDL.h>\n#include <stdio.h>\n#include <stdlib.h>\n\nint main(void)\n{\n\tSDL_Window* win;\n\tSDL_Renderer* ren;\n\tSD"
  },
  {
    "path": "c99/Makefile",
    "chars": 603,
    "preview": "CC?=gcc\nSDL2FLAGS=$(shell pkg-config sdl2 --cflags --libs)\nCFLAGS?=-std=c99 -Wall -pedantic -Werror -Wshadow -Wstrict-al"
  },
  {
    "path": "c99/README.md",
    "chars": 155,
    "preview": "## Requirements\n\n* C99 compiler\n* pkg-config\n* SDL2\n\n## macOS\n\nInstall pkg-config using brew, or use `-LSDL2` in the Mak"
  },
  {
    "path": "c99/main.c",
    "chars": 2167,
    "preview": "#include <SDL2/SDL.h>\n#include <stdio.h>\n#include <stdlib.h>\n#include <stdbool.h>\n\nint main(void)\n{\n    if (SDL_Init(SDL"
  },
  {
    "path": "crystal/Makefile",
    "chars": 272,
    "preview": ".PHONY: all msg sdl2 clean fullclean\n\nall: msg bin/main\n\nmsg:\n\t@echo '--- Crystal ---'\n\nbin/main: shard.yml main.cr\n\t@ec"
  },
  {
    "path": "crystal/README.md",
    "chars": 122,
    "preview": "# Crystal SDL2 example\n\nTested with Crystal 1.0.0 and Crystal 1.1.0 on Arch Linux.\n\nRequires both `crystal` and `shards`"
  },
  {
    "path": "crystal/main.cr",
    "chars": 848,
    "preview": "require \"sdl\"\nrequire \"sdl/image\"\n\nbegin\n  SDL.init(SDL::Init::VIDEO)\n  at_exit { SDL.quit }\n\n  SDL::IMG.init(SDL::IMG::"
  },
  {
    "path": "crystal/shard.yml",
    "chars": 203,
    "preview": "name: main\nversion: 0.1.0\n\nauthors:\n  - Alexander F. Rødseth <xyproto@archlinux.org>\n\ndependencies:\n  sdl:\n    github: y"
  },
  {
    "path": "csharp/Makefile",
    "chars": 980,
    "preview": ".PHONY: all msg clean fullclean check-config\n\nMONO_VERSION ?= 4.5\n\nifeq ($(shell uname -s), Darwin)\n\tMONO_ETC := $(shell"
  },
  {
    "path": "csharp/README.md",
    "chars": 2037,
    "preview": "# C# + SDL2 example\n\nSDL2 must either be installed, or be available as a shared library.\n\n## Arch Linux\n\n### Building an"
  },
  {
    "path": "csharp/main.cs",
    "chars": 6388,
    "preview": "using System;\nusing System.Runtime.InteropServices;\nusing System.Text;\n\npublic class HelloWorld\n{\n    // From SDL.h\n    "
  },
  {
    "path": "csharp/main.csproj",
    "chars": 286,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n  <PropertyGroup>\n    <OutputType>Exe</OutputType>\n    <TargetFramework>net8.0</Targe"
  },
  {
    "path": "d/.gitignore",
    "chars": 10,
    "preview": "bin/\nmain\n"
  },
  {
    "path": "d/Makefile",
    "chars": 217,
    "preview": ".PHONY: all msg clean fullclean\n\nall: msg main\n\nmsg:\n\t@echo '--- D ---'\n\nmain: source/app.d\n\t@echo -n '[main] Compiling."
  },
  {
    "path": "d/README.md",
    "chars": 138,
    "preview": "# D + SDL2\n\nThis example is based on public domain code from Peter Cartwright\n\nhttps://github.com/pokedpeter/dlang-derel"
  },
  {
    "path": "d/dub.json",
    "chars": 271,
    "preview": "{\n\t\"name\": \"main\",\n\t\"authors\": [\n\t\t\"Peter Cartwright\"\n\t],\n\t\"description\": \"An example using Derelict and SDL2 in d\",\n\t\"c"
  },
  {
    "path": "d/dub.selections.json",
    "chars": 96,
    "preview": "{\n\t\"fileVersion\": 1,\n\t\"versions\": {\n\t\t\"derelict-sdl2\": \"2.1.4\",\n\t\t\"derelict-util\": \"2.0.6\"\n\t}\n}\n"
  },
  {
    "path": "d/source/app.d",
    "chars": 1899,
    "preview": "// Based on https://github.com/pokedpeter/dlang-derelict-sdl2-example1\n\nimport std.stdio;\nimport derelict.sdl2.sdl;\nimpo"
  },
  {
    "path": "dart/Makefile",
    "chars": 250,
    "preview": ".PHONY: msg run clean\n\nall: msg main\n\nmsg:\n\t@echo '--- Dart ---'\n\npubspec.lock: pubspec.yaml\n\tdart pub get\n\nmain: pubspe"
  },
  {
    "path": "dart/main.dart",
    "chars": 5283,
    "preview": "import 'dart:ffi';\nimport 'package:ffi/ffi.dart';\n\n// From SDL.h\nconst int SDL_INIT_VIDEO = 0x00000020;\n\n// From SDL_vid"
  },
  {
    "path": "dart/pubspec.yaml",
    "chars": 192,
    "preview": "name: main\ndescription: SDL2 Example\nversion: 1.0.0\nhomepage: https://github.com/xyproto/sdl2-examples\n\nenvironment:\n  s"
  },
  {
    "path": "freebasic/Makefile",
    "chars": 218,
    "preview": ".PHONY: all msg clean fullclean\n\nall: msg main\n\nmsg:\n\t@echo '--- FreeBASIC ---'\n\nmain: main.bas\n\t@echo -n '[main] Compil"
  },
  {
    "path": "freebasic/README.md",
    "chars": 167,
    "preview": "# FreeBASIC\n\nTested on Arch Linux with the `fbc-git` package from AUR.\n\nSDL2 must be included with the FreeBASIC install"
  },
  {
    "path": "freebasic/main.bas",
    "chars": 633,
    "preview": "#include \"SDL2/SDL.bi\"\n#include \"SDL2/SDL_image.bi\"\n#include \"SDL2/SDL_ttf.bi\"\n\nSDL_Init(SDL_INIT_VIDEO)\nIMG_Init(0)\n\nva"
  },
  {
    "path": "fsharp/Makefile",
    "chars": 179,
    "preview": ".PHONY: all msg clean\n\nall: msg bin\n\nmsg:\n\t@echo '--- F# ---'\n\nbin: main.fsproj main.fs\n\tdotnet build --sc --nologo --uc"
  },
  {
    "path": "fsharp/main.fs",
    "chars": 3987,
    "preview": "module Main\n\nopen System\nopen System.Runtime.InteropServices\nopen System.Text\nopen Microsoft.FSharp.NativeInterop\n\nlet S"
  },
  {
    "path": "fsharp/main.fsproj",
    "chars": 367,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <PropertyGroup>\n    <Configuration>Release</Configuration>\n    <OutputType>Exe</Out"
  },
  {
    "path": "gambas/.directory",
    "chars": 33,
    "preview": "[Desktop Entry]\nIcon=./.icon.png\n"
  },
  {
    "path": "gambas/.gitignore",
    "chars": 159,
    "preview": "#---- Gambas files to ignore (v5)\n*.gambas\n.lock\n*~\ncore\ncore.*\nvgcore\nvgcore.*\n.kdbg*\n.*.prof\n.lang/*.pot\n.gambas/*\n.se"
  },
  {
    "path": "gambas/.project",
    "chars": 165,
    "preview": "# Gambas Project File 3.0\nTitle=Grumpy Cat\nStartup=MMain\nVersion=1.0.12\nComponent=gb.image\nComponent=gb.sdl2\nComponent=g"
  },
  {
    "path": "gambas/.src/MMain.module",
    "chars": 623,
    "preview": "' Gambas module file\n\nPrivate hWindow As Window\nPrivate hTimer As Timer\nPrivate hImage As Image\n\nPublic Sub Main()\n\n  hW"
  },
  {
    "path": "gambas/Makefile",
    "chars": 184,
    "preview": ".PHONY: all main msg clean fullclean\n\nall: msg main\n\nmsg:\n\t@echo '--- Gambas ---'\n\nmain: main.bas\n\tgbc3\n\tgba3 -o main\n\nr"
  },
  {
    "path": "gccgo/Makefile",
    "chars": 379,
    "preview": ".PHONY: all clean debug main msg run small static\n\nCFLAGS?=$(shell pkg-config sdl2 --cflags --libs)\n\nall: CFLAGS+=-O2\nal"
  },
  {
    "path": "gccgo/README.md",
    "chars": 412,
    "preview": "Works with gccgo 8.2.1 and the latest version of go-sdl2.\n\nRequirements:\n\n* The SDL2 library and headers installed on yo"
  },
  {
    "path": "gccgo/go.mod",
    "chars": 99,
    "preview": "module github.com/xyproto/sdl2-examples/gccgo\n\ngo 1.18\n\nrequire github.com/veandco/go-sdl2 v0.4.36\n"
  },
  {
    "path": "gccgo/go.sum",
    "chars": 173,
    "preview": "github.com/veandco/go-sdl2 v0.4.36 h1:Ltydev536rRQodmIrTWFZ3dRp5A+/6t5CYvbi4Kvia0=\ngithub.com/veandco/go-sdl2 v0.4.36/go"
  },
  {
    "path": "gccgo/main.go",
    "chars": 1070,
    "preview": "package main\n\nimport (\n\t\"log\"\n\t\"path/filepath\"\n\n\t\"github.com/veandco/go-sdl2/img\"\n\t\"github.com/veandco/go-sdl2/sdl\"\n)\n\nf"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/CONTRIBUTORS.md",
    "chars": 2971,
    "preview": "Contributors\n============\nHere's the list of contributors with their respective Github URLs.\n* [Jacky Boen](https://gith"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/LICENSE",
    "chars": 1471,
    "preview": "Copyright (c) 2013, Go-SDL2 Authors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or wit"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/_libs/dummy.go",
    "chars": 14,
    "preview": "package dummy\n"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/img/sdl_image.go",
    "chars": 14626,
    "preview": "// Package img is a simple library to load images of various formats as SDL surfaces.\npackage img\n\n//#include <stdlib.h>"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/img/sdl_image_cgo.go",
    "chars": 182,
    "preview": "// +build !static\n\npackage img\n\n//#cgo linux freebsd darwin pkg-config: sdl2\n//#cgo linux freebsd darwin LDFLAGS: -lSDL2"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/img/sdl_image_cgo_static.go",
    "chars": 2356,
    "preview": "// +build static\n\npackage img\n\n//#cgo CFLAGS: -I${SRCDIR}/../_libs/include -I${SRCDIR}/../_libs/include/SDL2\n//#cgo LDFL"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/img/sdl_image_wrapper.h",
    "chars": 108,
    "preview": "#if defined(__WIN32)\n\t#include <SDL2/SDL_image.h>\n\t#include <stdlib.h>\n#else\n\t#include <SDL_image.h>\n#endif\n"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/TODO.md",
    "chars": 6774,
    "preview": "## 2.0.16\n\n[x] SDL_FlashWindow() to get a user’s attention\n[x] SDL_GetAudioDeviceSpec() to get the preferred audio forma"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/audio.go",
    "chars": 22244,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,4))\n\n#if defined(WARN_OUTDATED)\n#pragma message("
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/blendmode.go",
    "chars": 5079,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,6))\n\n\n#if defined(WARN_OUTDATED)\n#pragma message"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/clipboard.go",
    "chars": 901,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\nimport \"unsafe\"\n\n// SetClipboardText puts UTF-8 text into the clipbo"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/cpuinfo.go",
    "chars": 4821,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,9))\n\n#if defined(WARN_OUTDATED)\n#pragma message("
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/endian.go",
    "chars": 461,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\n\n// Endian-specific values.\n// (https://wiki.libsdl.org/CategoryEndi"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/error.go",
    "chars": 2425,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\nvoid GoSetError(const char *fmt) {\n  SDL_SetError(\"%s\", fmt);\n}\n\n*/\n// #includ"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/events.c",
    "chars": 601,
    "preview": "#include \"_cgo_export.h\"\n#include \"events.h\"\n\nSDL_Event event;\n\nvoid setEventFilter()\n{\n\tSDL_SetEventFilter((SDL_EventFi"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/events.go",
    "chars": 46340,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n#include \"events.h\"\n\n#if !SDL_VERSION_ATLEAST(2,0,9)\n#define SDL_DISPLAYEVENT ("
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/events.h",
    "chars": 387,
    "preview": "#ifndef _GO_SDL_EVENTS_H\n#define _GO_SDL_EVENTS_H\n\n#if defined(_WIN32)\n\t#include <SDL2/SDL_events.h>\n#else\n\t#include <SD"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/filesystem.go",
    "chars": 1310,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,1))\n\n#if defined(WARN_OUTDATED)\n#pragma message("
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/gamecontroller.go",
    "chars": 22879,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,4))\n\n#if defined(WARN_OUTDATED)\n#pragma message("
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/gesture.go",
    "chars": 1165,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\n\n// GestureID is the unique id of the closest gesture to the perform"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/guid.go",
    "chars": 1043,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !SDL_VERSION_ATLEAST(2,24,0)\n#if defined(WARN_OUTDATED)\n#pragma message(\"S"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/haptic.go",
    "chars": 16821,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\nimport \"unsafe\"\n\n// Haptic effects.\n// (https://wiki.libsdl.org/SDL_"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/helpers.go",
    "chars": 132,
    "preview": "package sdl\n\n// Btoi returns 0 or 1 according to the value of b.\nfunc Btoi(b bool) int {\n\tif b == true {\n\t\treturn 1\n\t}\n\n"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/hidapi.go",
    "chars": 11409,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,18))\n\n#if defined(WARN_OUTDATED)\n#pragma message"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/hints.c",
    "chars": 424,
    "preview": "#include \"_cgo_export.h\"\n\n#include \"sdl_wrapper.h\"\n#include \"hints.h\"\n\nvoid hintCallback(void *userdata, const char *nam"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/hints.go",
    "chars": 26158,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n#include \"hints.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,20))\n#define SDL_HINT_RENDER_"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/hints.h",
    "chars": 177,
    "preview": "void hintCallback(void *userdata, const char *name, const char *oldValue, const char *newValue);\nvoid addHintCallback(co"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/joystick.go",
    "chars": 16750,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,4))\n\n#if defined(WARN_OUTDATED)\n#pragma message("
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/keyboard.go",
    "chars": 4821,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,22))\n\n#if defined(WARN_OUTDATED)\n#pragma message"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/keycode.go",
    "chars": 17552,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\n\nconst K_SCANCODE_MASK = 1 << 30\n\n// The SDL virtual key representat"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/loadso.go",
    "chars": 970,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\nimport \"unsafe\"\n\n// SharedObject is a pointer to the object handle.\n"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/log.c",
    "chars": 146,
    "preview": "#include \"_cgo_export.h\"\n\nvoid LogSetOutputFunction(void *data)\n{\n    SDL_LogSetOutputFunction((SDL_LogOutputFunction)lo"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/log.go",
    "chars": 7340,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n#include \"log.h\"\n\nstatic inline void _SDL_Log(const char *fmt)\n{\n    SDL_Log(\"%"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/log.h",
    "chars": 39,
    "preview": "void LogSetOutputFunction(void *data);\n"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/mouse.go",
    "chars": 8019,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if defined(__WIN32)\n#include <SDL2/SDL_syswm.h>\n#else\n#include <SDL_syswm.h>\n"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/mutex.go",
    "chars": 4924,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\nimport \"unsafe\"\n\n// ThreadID is the thread identifier for a thread.\n"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/pixels.go",
    "chars": 24017,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\n//\n// #if !(SDL_VERSION_ATLEAST(2,0,5))\n//\n// enum\n// {\n// #if SDL_BYTEORDER =="
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/power.go",
    "chars": 1043,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\n\n// An enumeration of the basic state of the system's power supply.\n"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/rect.go",
    "chars": 15722,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\nimport (\n\t\"math\"\n\t\"unsafe\"\n)\n\n// Point defines a two dimensional poi"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/render.go",
    "chars": 41761,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,1))\n\n#if defined(WARN_OUTDATED)\n#pragma message("
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/rwops.go",
    "chars": 9586,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\nstatic Sint64 RWsize(SDL_RWops *ctx)\n{\n\treturn ctx->size(ctx);\n}\n\nstatic Sint64"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/scancode.go",
    "chars": 21111,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\n\n// The SDL keyboard scancode representation.\n// (https://wiki.libsd"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/sdl.go",
    "chars": 4693,
    "preview": "// Package sdl is SDL2 wrapped for Go users. It enables interoperability between Go and the SDL2 library which is writte"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/sdl_cgo.go",
    "chars": 127,
    "preview": "// +build !static\n\npackage sdl\n\n//#cgo windows LDFLAGS: -lSDL2\n//#cgo linux freebsd darwin openbsd pkg-config: sdl2\nimpo"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/sdl_cgo_static.go",
    "chars": 1793,
    "preview": "// +build static\n\npackage sdl\n\n//#cgo CFLAGS: -I${SRCDIR}/../_libs/include -I${SRCDIR}/../_libs/include/SDL2\n//#cgo LDFL"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/sdl_wrapper.h",
    "chars": 554,
    "preview": "#if defined(_WIN32)\n\t#include <SDL2/SDL.h>\n\t#include <stdlib.h>\n#else\n\t#include <SDL.h>\n#endif\n\n#if !defined(SDL_2_0_10)"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/sensor.go",
    "chars": 8379,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,9))\ntypedef struct _SDL_Sensor SDL_Sensor;\n\ntype"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/shape.go",
    "chars": 5127,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n// until SDL 2.0.6 SDL_shape.h was not included in SDL.h\n#if !(SDL_VERSION_ATL"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/surface.go",
    "chars": 25624,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,9))\n\n#if defined(WARN_OUTDATED)\n#pragma message("
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/sysrender.go",
    "chars": 510,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\nimport \"unsafe\"\n\n// Texture contains an efficient, driver-specific r"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/system.c",
    "chars": 187,
    "preview": "#include \"_cgo_export.h\"\n#include \"system.h\"\n\n#if defined(_WIN32)\nvoid SetWindowsMessageHook()\n{\n\tSDL_SetWindowsMessageH"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/system.go",
    "chars": 433,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,9))\n\n#if defined(WARN_OUTDATED)\n#pragma message("
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/system.h",
    "chars": 124,
    "preview": "#ifndef _GO_SDL_SYSTEM_H\n#define _GO_SDL_SYSTEM_H\n\n#if defined(_WIN32)\n\textern void SetWindowsMessageHook();\n#endif\n\n#en"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/system_android.go",
    "chars": 2736,
    "preview": "// +build go1.4\n\npackage sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,8))\n\n#if defined(WARN_OUTDATED)"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/system_linux.go",
    "chars": 1563,
    "preview": "// +build !android\n\npackage sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,9))\n\n#if defined(WARN_OUTDAT"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/system_windows.go",
    "chars": 1466,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n#include \"system.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,16))\n\n#if defined(WARN_OUTDA"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/syswm.go",
    "chars": 4293,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if defined(__WIN32)\n#include <SDL2/SDL_syswm.h>\n#else\n#include <SDL_syswm.h>\n"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/syswm_cocoa.go",
    "chars": 299,
    "preview": "// +build cocoa OR darwin\n\npackage sdl\n\nimport \"C\"\nimport \"unsafe\"\n\n// CocoaMsg contains Apple Mac OS X window informati"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/syswm_dfb.go",
    "chars": 268,
    "preview": "// +build dfb\n\npackage sdl\n\nimport \"C\"\nimport \"unsafe\"\n\n// DFBMsg contains DirectFB window information.\ntype DFBMsg stru"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/syswm_uikit.go",
    "chars": 279,
    "preview": "// +build uikit\n\npackage sdl\n\nimport \"C\"\nimport \"unsafe\"\n\n// UIKitMsg contains Apple iOS window information.\ntype UIKitM"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/syswm_vivante.go",
    "chars": 295,
    "preview": "// +build vivante\n\npackage sdl\n\nimport \"C\"\nimport \"unsafe\"\n\n// VivanteKitMsg contains Vivante window information.\ntype V"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/syswm_windows.go",
    "chars": 386,
    "preview": "// +build windows\n\npackage sdl\n\n/*\n#include <windef.h>\n*/\nimport \"C\"\nimport \"unsafe\"\n\n// WindowsMsg contains Microsoft W"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/syswm_x11.go",
    "chars": 308,
    "preview": "// +build x11\n\npackage sdl\n\n/*\n#include <X11/Xlib.h>\n*/\nimport \"C\"\nimport \"unsafe\"\n\n// X11Msg contains X Window System w"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/thread.go",
    "chars": 228,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\n\n// CurrentThreadID gets the thread identifier for the current threa"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/timer.go",
    "chars": 1602,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,18))\n\n#if defined(WARN_OUTDATED)\n#pragma message"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/touch.go",
    "chars": 3064,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,10))\n\ntypedef enum\n{\n    SDL_TOUCH_DEVICE_INVALI"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/version.go",
    "chars": 2287,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if SDL_VERSION_ATLEAST(2,0,16)\n\nstatic inline int GetRevisionNumber(void)\n{\n\t"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/video.go",
    "chars": 43242,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\nstatic inline Sint32 ShowMessageBox(SDL_MessageBoxData data)\n{\n\tSint32 buttonid"
  },
  {
    "path": "gccgo/vendor/github.com/veandco/go-sdl2/sdl/vulkan.go",
    "chars": 4688,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if (SDL_VERSION_ATLEAST(2,0,6))\n#if defined(_WIN32)\n\t#include <SDL2/SDL_vulka"
  },
  {
    "path": "gccgo/vendor/modules.txt",
    "chars": 153,
    "preview": "# github.com/veandco/go-sdl2 v0.4.36\n## explicit; go 1.15\ngithub.com/veandco/go-sdl2/_libs\ngithub.com/veandco/go-sdl2/im"
  },
  {
    "path": "go/Makefile",
    "chars": 201,
    "preview": ".PHONY: all msg clean fullclean\n\nall: msg go\n\nmsg:\n\t@echo '--- Go ---'\n\ngo: main.go\n\tgo build -mod=vendor -v\n\nrun: msg g"
  },
  {
    "path": "go/README.md",
    "chars": 421,
    "preview": "SDL2 and Go\n===========\n\nRequirements\n------------\n\n* The SDL2 library and headers.\n* The latest version of Go.\n* The sd"
  },
  {
    "path": "go/go.mod",
    "chars": 96,
    "preview": "module github.com/xyproto/sdl2-examples/go\n\ngo 1.18\n\nrequire github.com/veandco/go-sdl2 v0.4.36\n"
  },
  {
    "path": "go/go.sum",
    "chars": 173,
    "preview": "github.com/veandco/go-sdl2 v0.4.36 h1:Ltydev536rRQodmIrTWFZ3dRp5A+/6t5CYvbi4Kvia0=\ngithub.com/veandco/go-sdl2 v0.4.36/go"
  },
  {
    "path": "go/main.go",
    "chars": 1070,
    "preview": "package main\n\nimport (\n\t\"log\"\n\t\"path/filepath\"\n\n\t\"github.com/veandco/go-sdl2/img\"\n\t\"github.com/veandco/go-sdl2/sdl\"\n)\n\nf"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/CONTRIBUTORS.md",
    "chars": 2971,
    "preview": "Contributors\n============\nHere's the list of contributors with their respective Github URLs.\n* [Jacky Boen](https://gith"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/LICENSE",
    "chars": 1471,
    "preview": "Copyright (c) 2013, Go-SDL2 Authors\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or wit"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/_libs/dummy.go",
    "chars": 14,
    "preview": "package dummy\n"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/img/sdl_image.go",
    "chars": 14626,
    "preview": "// Package img is a simple library to load images of various formats as SDL surfaces.\npackage img\n\n//#include <stdlib.h>"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/img/sdl_image_cgo.go",
    "chars": 182,
    "preview": "// +build !static\n\npackage img\n\n//#cgo linux freebsd darwin pkg-config: sdl2\n//#cgo linux freebsd darwin LDFLAGS: -lSDL2"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/img/sdl_image_cgo_static.go",
    "chars": 2356,
    "preview": "// +build static\n\npackage img\n\n//#cgo CFLAGS: -I${SRCDIR}/../_libs/include -I${SRCDIR}/../_libs/include/SDL2\n//#cgo LDFL"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/img/sdl_image_wrapper.h",
    "chars": 108,
    "preview": "#if defined(__WIN32)\n\t#include <SDL2/SDL_image.h>\n\t#include <stdlib.h>\n#else\n\t#include <SDL_image.h>\n#endif\n"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/TODO.md",
    "chars": 6774,
    "preview": "## 2.0.16\n\n[x] SDL_FlashWindow() to get a user’s attention\n[x] SDL_GetAudioDeviceSpec() to get the preferred audio forma"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/audio.go",
    "chars": 22244,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,4))\n\n#if defined(WARN_OUTDATED)\n#pragma message("
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/blendmode.go",
    "chars": 5079,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,6))\n\n\n#if defined(WARN_OUTDATED)\n#pragma message"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/clipboard.go",
    "chars": 901,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\nimport \"unsafe\"\n\n// SetClipboardText puts UTF-8 text into the clipbo"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/cpuinfo.go",
    "chars": 4821,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,9))\n\n#if defined(WARN_OUTDATED)\n#pragma message("
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/endian.go",
    "chars": 461,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\n\n// Endian-specific values.\n// (https://wiki.libsdl.org/CategoryEndi"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/error.go",
    "chars": 2425,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\nvoid GoSetError(const char *fmt) {\n  SDL_SetError(\"%s\", fmt);\n}\n\n*/\n// #includ"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/events.c",
    "chars": 601,
    "preview": "#include \"_cgo_export.h\"\n#include \"events.h\"\n\nSDL_Event event;\n\nvoid setEventFilter()\n{\n\tSDL_SetEventFilter((SDL_EventFi"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/events.go",
    "chars": 46340,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n#include \"events.h\"\n\n#if !SDL_VERSION_ATLEAST(2,0,9)\n#define SDL_DISPLAYEVENT ("
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/events.h",
    "chars": 387,
    "preview": "#ifndef _GO_SDL_EVENTS_H\n#define _GO_SDL_EVENTS_H\n\n#if defined(_WIN32)\n\t#include <SDL2/SDL_events.h>\n#else\n\t#include <SD"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/filesystem.go",
    "chars": 1310,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,1))\n\n#if defined(WARN_OUTDATED)\n#pragma message("
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/gamecontroller.go",
    "chars": 22879,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,4))\n\n#if defined(WARN_OUTDATED)\n#pragma message("
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/gesture.go",
    "chars": 1165,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\n\n// GestureID is the unique id of the closest gesture to the perform"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/guid.go",
    "chars": 1043,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !SDL_VERSION_ATLEAST(2,24,0)\n#if defined(WARN_OUTDATED)\n#pragma message(\"S"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/haptic.go",
    "chars": 16821,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\nimport \"unsafe\"\n\n// Haptic effects.\n// (https://wiki.libsdl.org/SDL_"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/helpers.go",
    "chars": 132,
    "preview": "package sdl\n\n// Btoi returns 0 or 1 according to the value of b.\nfunc Btoi(b bool) int {\n\tif b == true {\n\t\treturn 1\n\t}\n\n"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/hidapi.go",
    "chars": 11409,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,18))\n\n#if defined(WARN_OUTDATED)\n#pragma message"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/hints.c",
    "chars": 424,
    "preview": "#include \"_cgo_export.h\"\n\n#include \"sdl_wrapper.h\"\n#include \"hints.h\"\n\nvoid hintCallback(void *userdata, const char *nam"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/hints.go",
    "chars": 26158,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n#include \"hints.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,20))\n#define SDL_HINT_RENDER_"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/hints.h",
    "chars": 177,
    "preview": "void hintCallback(void *userdata, const char *name, const char *oldValue, const char *newValue);\nvoid addHintCallback(co"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/joystick.go",
    "chars": 16750,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,4))\n\n#if defined(WARN_OUTDATED)\n#pragma message("
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/keyboard.go",
    "chars": 4821,
    "preview": "package sdl\n\n/*\n#include \"sdl_wrapper.h\"\n\n#if !(SDL_VERSION_ATLEAST(2,0,22))\n\n#if defined(WARN_OUTDATED)\n#pragma message"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/keycode.go",
    "chars": 17552,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\n\nconst K_SCANCODE_MASK = 1 << 30\n\n// The SDL virtual key representat"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/loadso.go",
    "chars": 970,
    "preview": "package sdl\n\n// #include \"sdl_wrapper.h\"\nimport \"C\"\nimport \"unsafe\"\n\n// SharedObject is a pointer to the object handle.\n"
  },
  {
    "path": "go/vendor/github.com/veandco/go-sdl2/sdl/log.c",
    "chars": 146,
    "preview": "#include \"_cgo_export.h\"\n\nvoid LogSetOutputFunction(void *data)\n{\n    SDL_LogSetOutputFunction((SDL_LogOutputFunction)lo"
  }
]

// ... and 106 more files (download for full content)

About this extraction

This page contains the full source code of the xyproto/sdl2-examples GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 306 files (1.1 MB), approximately 314.4k tokens, and a symbol index with 4515 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!